Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vaadin/date-picker

Package Overview
Dependencies
Maintainers
19
Versions
390
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/date-picker - npm Package Compare versions

Comparing version 22.0.2 to 22.0.3

24

package.json
{
"name": "@vaadin/date-picker",
"version": "22.0.2",
"version": "22.0.3",
"publishConfig": {

@@ -38,19 +38,19 @@ "access": "public"

"@polymer/polymer": "^3.2.0",
"@vaadin/button": "^22.0.2",
"@vaadin/component-base": "^22.0.2",
"@vaadin/field-base": "^22.0.2",
"@vaadin/input-container": "^22.0.2",
"@vaadin/vaadin-lumo-styles": "^22.0.2",
"@vaadin/vaadin-material-styles": "^22.0.2",
"@vaadin/vaadin-overlay": "^22.0.2",
"@vaadin/vaadin-themable-mixin": "^22.0.2"
"@vaadin/button": "^22.0.3",
"@vaadin/component-base": "^22.0.3",
"@vaadin/field-base": "^22.0.3",
"@vaadin/input-container": "^22.0.3",
"@vaadin/vaadin-lumo-styles": "^22.0.3",
"@vaadin/vaadin-material-styles": "^22.0.3",
"@vaadin/vaadin-overlay": "^22.0.3",
"@vaadin/vaadin-themable-mixin": "^22.0.3"
},
"devDependencies": {
"@esm-bundle/chai": "^4.3.4",
"@vaadin/dialog": "^22.0.2",
"@vaadin/polymer-legacy-adapter": "^22.0.2",
"@vaadin/dialog": "^22.0.3",
"@vaadin/polymer-legacy-adapter": "^22.0.3",
"@vaadin/testing-helpers": "^0.3.2",
"sinon": "^9.2.0"
},
"gitHead": "df21370c4a655a38eac11f79686021ab3b0887ad"
"gitHead": "935ad1ea65a79b0f9ecb10d767689479b36c4e07"
}
/**
* @license
* Copyright (c) 2021 Vaadin Ltd.
* Copyright (c) 2016 - 2022 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/

@@ -5,0 +5,0 @@ */

/**
* @license
* Copyright (c) 2021 Vaadin Ltd.
* Copyright (c) 2016 - 2022 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/

@@ -5,0 +5,0 @@ */

/**
* @license
* Copyright (c) 2021 Vaadin Ltd.
* Copyright (c) 2016 - 2022 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/

@@ -5,0 +5,0 @@ */

/**
* @license
* Copyright (c) 2021 Vaadin Ltd.
* Copyright (c) 2016 - 2022 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/

@@ -5,0 +5,0 @@ */

/**
* @license
* Copyright (c) 2021 Vaadin Ltd.
* Copyright (c) 2016 - 2022 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/

@@ -5,0 +5,0 @@ */

/**
* @license
* Copyright (c) 2021 Vaadin Ltd.
* Copyright (c) 2016 - 2022 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/

@@ -409,14 +409,18 @@ */

*/
revealDate(date) {
revealDate(date, animate = true) {
if (date) {
var diff = this._differenceInMonths(date, this._originDate);
var scrolledAboveViewport = this.$.monthScroller.position > diff;
const diff = this._differenceInMonths(date, this._originDate);
const scrolledAboveViewport = this.$.monthScroller.position > diff;
var visibleItems = this.$.monthScroller.clientHeight / this.$.monthScroller.itemHeight;
var scrolledBelowViewport = this.$.monthScroller.position + visibleItems - 1 < diff;
const visibleArea = Math.max(
this.$.monthScroller.itemHeight,
this.$.monthScroller.clientHeight - this.$.monthScroller.bufferOffset * 2
);
const visibleItems = visibleArea / this.$.monthScroller.itemHeight;
const scrolledBelowViewport = this.$.monthScroller.position + visibleItems - 1 < diff;
if (scrolledAboveViewport) {
this._scrollToPosition(diff, true);
this._scrollToPosition(diff, animate);
} else if (scrolledBelowViewport) {
this._scrollToPosition(diff - visibleItems + 1, true);
this._scrollToPosition(diff - visibleItems + 1, animate);
}

@@ -423,0 +427,0 @@ }

/**
* @license
* Copyright (c) 2021 Vaadin Ltd.
* Copyright (c) 2016 - 2022 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/

@@ -5,0 +5,0 @@ */

/**
* @license
* Copyright (c) 2021 Vaadin Ltd.
* Copyright (c) 2016 - 2022 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/

@@ -5,0 +5,0 @@ */

/**
* @license
* Copyright (c) 2021 Vaadin Ltd.
* Copyright (c) 2016 - 2022 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/

@@ -5,0 +5,0 @@ */

/**
* @license
* Copyright (c) 2021 Vaadin Ltd.
* Copyright (c) 2016 - 2022 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/

@@ -216,3 +216,3 @@ */

);
this.addController(new LabelledInputController(this.inputElement, this._labelNode));
this.addController(new LabelledInputController(this.inputElement, this._labelController));
}

@@ -219,0 +219,0 @@

/**
* @license
* Copyright (c) 2021 Vaadin Ltd.
* Copyright (c) 2016 - 2022 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/

@@ -189,5 +189,5 @@ */

// Check if we scrolled enough to translate the buffer positions.
const bufferOffset = this.root.querySelector('.buffer').offsetTop;
const upperThresholdReached = scrollTop > this._buffers[1].translateY + this.itemHeight + bufferOffset;
const lowerThresholdReached = scrollTop < this._buffers[0].translateY + this.itemHeight + bufferOffset;
const offset = this.itemHeight + this.bufferOffset;
const upperThresholdReached = scrollTop > this._buffers[1].translateY + offset;
const lowerThresholdReached = scrollTop < this._buffers[0].translateY + offset;

@@ -214,5 +214,19 @@ if (upperThresholdReached || lowerThresholdReached) {

/**
* @return {number}
*/
get bufferOffset() {
return this._buffers[0].offsetTop;
}
/**
* @return {number}
*/
get position() {
return (this.$.scroller.scrollTop - this._buffers[0].translateY) / this.itemHeight + this._firstIndex;
}
/**
* Current scroller position as index. Can be a fractional number.
*
* @type {Number}
* @type {number}
*/

@@ -244,8 +258,4 @@ set position(index) {

/**
* @private
* @return {number}
*/
get position() {
return (this.$.scroller.scrollTop - this._buffers[0].translateY) / this.itemHeight + this._firstIndex;
}
get itemHeight() {

@@ -252,0 +262,0 @@ if (!this._itemHeightVal) {

/**
* @license
* Copyright (c) 2021 Vaadin Ltd.
* Copyright (c) 2016 - 2022 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/

@@ -5,0 +5,0 @@ */

@@ -113,3 +113,3 @@ import '@vaadin/vaadin-material-styles/color.js';

[part='months'] {
--vaadin-infinite-scroller-item-height: 320px;
--vaadin-infinite-scroller-item-height: 328px;
text-align: center;

@@ -116,0 +116,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc