@vaadin/date-picker 23.2.0-alpha2 → 23.2.0-dev.48e5e3967
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/date-picker",
|
|
3
|
-
"version": "23.2.0-
|
|
3
|
+
"version": "23.2.0-dev.48e5e3967",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -34,19 +34,19 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
36
36
|
"@polymer/polymer": "^3.2.0",
|
|
37
|
-
"@vaadin/button": "23.2.0-
|
|
38
|
-
"@vaadin/component-base": "23.2.0-
|
|
39
|
-
"@vaadin/field-base": "23.2.0-
|
|
40
|
-
"@vaadin/input-container": "23.2.0-
|
|
41
|
-
"@vaadin/vaadin-lumo-styles": "23.2.0-
|
|
42
|
-
"@vaadin/vaadin-material-styles": "23.2.0-
|
|
43
|
-
"@vaadin/vaadin-overlay": "23.2.0-
|
|
44
|
-
"@vaadin/vaadin-themable-mixin": "23.2.0-
|
|
37
|
+
"@vaadin/button": "23.2.0-dev.48e5e3967",
|
|
38
|
+
"@vaadin/component-base": "23.2.0-dev.48e5e3967",
|
|
39
|
+
"@vaadin/field-base": "23.2.0-dev.48e5e3967",
|
|
40
|
+
"@vaadin/input-container": "23.2.0-dev.48e5e3967",
|
|
41
|
+
"@vaadin/vaadin-lumo-styles": "23.2.0-dev.48e5e3967",
|
|
42
|
+
"@vaadin/vaadin-material-styles": "23.2.0-dev.48e5e3967",
|
|
43
|
+
"@vaadin/vaadin-overlay": "23.2.0-dev.48e5e3967",
|
|
44
|
+
"@vaadin/vaadin-themable-mixin": "23.2.0-dev.48e5e3967"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@esm-bundle/chai": "^4.3.4",
|
|
48
48
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
49
49
|
"sinon": "^13.0.2"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "961bc4ae5b707c3c02f12b99819b3c12c9b478aa"
|
|
52
52
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
+
import { ValidateMixin } from '@vaadin/field-base/src/validate-mixin.js';
|
|
6
7
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
7
8
|
import { DatePickerMixin } from './vaadin-date-picker-mixin.js';
|
|
8
9
|
export { DatePickerDate, DatePickerI18n } from './vaadin-date-picker-mixin.js';
|
|
@@ -80,7 +81,7 @@ export interface DatePickerLightEventMap extends HTMLElementEventMap, DatePicker
|
|
|
80
81
|
* @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
|
|
81
82
|
* @fires {CustomEvent} value-changed - Fired when the `value` property changes.
|
|
82
83
|
*/
|
|
83
|
-
declare class DatePickerLight extends ThemableMixin(DatePickerMixin(HTMLElement)) {
|
|
84
|
+
declare class DatePickerLight extends ThemableMixin(DatePickerMixin(ValidateMixin(HTMLElement))) {
|
|
84
85
|
/**
|
|
85
86
|
* Name of the two-way data-bindable property representing the
|
|
86
87
|
* value of the custom input field.
|
|
@@ -7,6 +7,7 @@ import './vaadin-date-picker-overlay.js';
|
|
|
7
7
|
import './vaadin-date-picker-overlay-content.js';
|
|
8
8
|
import { dashToCamelCase } from '@polymer/polymer/lib/utils/case-map.js';
|
|
9
9
|
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
10
|
+
import { ValidateMixin } from '@vaadin/field-base/src/validate-mixin.js';
|
|
10
11
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
11
12
|
import { DatePickerMixin } from './vaadin-date-picker-mixin.js';
|
|
12
13
|
|
|
@@ -53,7 +54,7 @@ import { DatePickerMixin } from './vaadin-date-picker-mixin.js';
|
|
|
53
54
|
* @mixes ThemableMixin
|
|
54
55
|
* @mixes DatePickerMixin
|
|
55
56
|
*/
|
|
56
|
-
class DatePickerLight extends ThemableMixin(DatePickerMixin(PolymerElement)) {
|
|
57
|
+
class DatePickerLight extends ThemableMixin(DatePickerMixin(ValidateMixin(PolymerElement))) {
|
|
57
58
|
static get template() {
|
|
58
59
|
return html`
|
|
59
60
|
<style>
|
|
@@ -188,13 +188,6 @@ export declare class DatePickerMixinClass {
|
|
|
188
188
|
*/
|
|
189
189
|
close(): void;
|
|
190
190
|
|
|
191
|
-
/**
|
|
192
|
-
* Returns true if `value` is valid, and sets the `invalid` flag appropriately.
|
|
193
|
-
*
|
|
194
|
-
* @returns True if the value is valid and sets the `invalid` flag appropriately
|
|
195
|
-
*/
|
|
196
|
-
validate(): boolean;
|
|
197
|
-
|
|
198
191
|
/**
|
|
199
192
|
* Returns true if the current input value satisfies all constraints (if any)
|
|
200
193
|
*
|
|
@@ -510,15 +510,6 @@ export const DatePickerMixin = (subclass) =>
|
|
|
510
510
|
this.addEventListener('touchstart', () => this.__bringToFront());
|
|
511
511
|
}
|
|
512
512
|
|
|
513
|
-
/**
|
|
514
|
-
* Returns true if `value` is valid, and sets the `invalid` flag appropriately.
|
|
515
|
-
*
|
|
516
|
-
* @return {boolean} True if the value is valid and sets the `invalid` flag appropriately
|
|
517
|
-
*/
|
|
518
|
-
validate() {
|
|
519
|
-
return !(this.invalid = !this.checkValidity());
|
|
520
|
-
}
|
|
521
|
-
|
|
522
513
|
/**
|
|
523
514
|
* Returns true if the current input value satisfies all constraints (if any)
|
|
524
515
|
*
|
|
@@ -529,7 +520,7 @@ export const DatePickerMixin = (subclass) =>
|
|
|
529
520
|
checkValidity() {
|
|
530
521
|
const inputValid =
|
|
531
522
|
!this._inputValue ||
|
|
532
|
-
(this._selectedDate && this._inputValue === this._getFormattedDate(this.i18n.formatDate, this._selectedDate));
|
|
523
|
+
(!!this._selectedDate && this._inputValue === this._getFormattedDate(this.i18n.formatDate, this._selectedDate));
|
|
533
524
|
const minMaxValid = !this._selectedDate || dateAllowed(this._selectedDate, this._minDate, this._maxDate);
|
|
534
525
|
|
|
535
526
|
let inputValidity = true;
|