@everymatrix/general-registration 1.55.1 → 1.56.0
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/dist/cjs/checkbox-group-input_13.cjs.entry.js +268 -197
- package/dist/esm/checkbox-group-input_13.entry.js +268 -197
- package/dist/general-registration/general-registration.esm.js +1 -1
- package/dist/general-registration/{p-252a6d81.entry.js → p-5f37e4ba.entry.js} +189 -187
- package/package.json +1 -1
|
@@ -161,13 +161,55 @@ const tooltipIconSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD
|
|
|
161
161
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
162
162
|
*/
|
|
163
163
|
|
|
164
|
-
|
|
164
|
+
window.Vaadin ||= {};
|
|
165
|
+
window.Vaadin.featureFlags ||= {};
|
|
166
|
+
|
|
167
|
+
function dashToCamelCase$1(dash) {
|
|
168
|
+
return dash.replace(/-[a-z]/gu, (m) => m[1].toUpperCase());
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
const experimentalMap = {};
|
|
172
|
+
|
|
173
|
+
function defineCustomElement(CustomElement, version = '24.6.5') {
|
|
165
174
|
Object.defineProperty(CustomElement, 'version', {
|
|
166
175
|
get() {
|
|
167
176
|
return version;
|
|
168
177
|
},
|
|
169
178
|
});
|
|
170
179
|
|
|
180
|
+
if (CustomElement.experimental) {
|
|
181
|
+
const featureFlagKey =
|
|
182
|
+
typeof CustomElement.experimental === 'string'
|
|
183
|
+
? CustomElement.experimental
|
|
184
|
+
: `${dashToCamelCase$1(CustomElement.is.split('-').slice(1).join('-'))}Component`;
|
|
185
|
+
|
|
186
|
+
if (!window.Vaadin.featureFlags[featureFlagKey] && !experimentalMap[featureFlagKey]) {
|
|
187
|
+
// Add setter to define experimental component when it's set to true
|
|
188
|
+
experimentalMap[featureFlagKey] = new Set();
|
|
189
|
+
experimentalMap[featureFlagKey].add(CustomElement);
|
|
190
|
+
|
|
191
|
+
Object.defineProperty(window.Vaadin.featureFlags, featureFlagKey, {
|
|
192
|
+
get() {
|
|
193
|
+
return experimentalMap[featureFlagKey].size === 0;
|
|
194
|
+
},
|
|
195
|
+
set(value) {
|
|
196
|
+
if (!!value && experimentalMap[featureFlagKey].size > 0) {
|
|
197
|
+
experimentalMap[featureFlagKey].forEach((elementClass) => {
|
|
198
|
+
customElements.define(elementClass.is, elementClass);
|
|
199
|
+
});
|
|
200
|
+
experimentalMap[featureFlagKey].clear();
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
return;
|
|
206
|
+
} else if (experimentalMap[featureFlagKey]) {
|
|
207
|
+
// Allow to register multiple components with single flag
|
|
208
|
+
experimentalMap[featureFlagKey].add(CustomElement);
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
171
213
|
const defined = customElements.get(CustomElement.is);
|
|
172
214
|
if (!defined) {
|
|
173
215
|
customElements.define(CustomElement.is, CustomElement);
|
|
@@ -916,7 +958,7 @@ registerStyles('', color, { moduleId: 'lumo-color' });
|
|
|
916
958
|
const fontIcons = i$3`
|
|
917
959
|
@font-face {
|
|
918
960
|
font-family: 'lumo-icons';
|
|
919
|
-
src: url(data:application/font-woff;charset=utf-8;base64,
|
|
961
|
+
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABHAAAsAAAAAI6AAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAQwAAAFZAIUuNY21hcAAAAYgAAAD+AAADymne8hxnbHlmAAACiAAAC+gAABioIzlOlWhlYWQAAA5wAAAAMAAAADZa/6SsaGhlYQAADqAAAAAdAAAAJAbpA4BobXR4AAAOwAAAABAAAAC0q+AAAGxvY2EAAA7QAAAAXAAAAFyF7o1GbWF4cAAADywAAAAfAAAAIAFMAXBuYW1lAAAPTAAAATEAAAIuUUJZCHBvc3QAAB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trGDXexhHwc4xBGOcYJTnOEcF7jEFa5xg1vc4R4PeMQTnvGCV2R4C1Khy9xkkkxNnPRC03s97pHLvKgTYXJNmbKfZom9o8POEffsq0Qw28+ltcPe2uHS2rGvRjPBmSwE1+GMtI6l0GSU4JEsSM4XgudpQx9sTRf3K9rAyUr0962UryKprZwPpM0jyda5uP2qrVBjxSLPCmGUplixrdpBSKqsI2oO4gF9Udq8TJVOzDSpcEHGR4vSeJdaVsSkMl26OqoKa6jttQ0rLb6a5l3YjO2QqV01YXLlNy2XDR0JlkXojbJTb/5GDX3V+kPviIPgB9AUks0AAAA=)
|
|
920
962
|
format('woff');
|
|
921
963
|
font-weight: normal;
|
|
922
964
|
font-style: normal;
|
|
@@ -946,25 +988,27 @@ const fontIcons = i$3`
|
|
|
946
988
|
--lumo-icons-cog: '\\ea15';
|
|
947
989
|
--lumo-icons-cross: '\\ea16';
|
|
948
990
|
--lumo-icons-download: '\\ea17';
|
|
949
|
-
--lumo-icons-
|
|
950
|
-
--lumo-icons-
|
|
951
|
-
--lumo-icons-
|
|
952
|
-
--lumo-icons-
|
|
953
|
-
--lumo-icons-eye
|
|
954
|
-
--lumo-icons-
|
|
955
|
-
--lumo-icons-
|
|
956
|
-
--lumo-icons-
|
|
957
|
-
--lumo-icons-
|
|
958
|
-
--lumo-icons-
|
|
959
|
-
--lumo-icons-
|
|
960
|
-
--lumo-icons-
|
|
961
|
-
--lumo-icons-
|
|
962
|
-
--lumo-icons-
|
|
963
|
-
--lumo-icons-
|
|
964
|
-
--lumo-icons-
|
|
965
|
-
--lumo-icons-
|
|
966
|
-
--lumo-icons-
|
|
967
|
-
--lumo-icons-
|
|
991
|
+
--lumo-icons-drag-handle: '\\ea18';
|
|
992
|
+
--lumo-icons-dropdown: '\\ea19';
|
|
993
|
+
--lumo-icons-edit: '\\ea1a';
|
|
994
|
+
--lumo-icons-error: '\\ea1b';
|
|
995
|
+
--lumo-icons-eye: '\\ea1c';
|
|
996
|
+
--lumo-icons-eye-disabled: '\\ea1d';
|
|
997
|
+
--lumo-icons-menu: '\\ea1e';
|
|
998
|
+
--lumo-icons-minus: '\\ea1f';
|
|
999
|
+
--lumo-icons-ordered-list: '\\ea20';
|
|
1000
|
+
--lumo-icons-phone: '\\ea21';
|
|
1001
|
+
--lumo-icons-photo: '\\ea22';
|
|
1002
|
+
--lumo-icons-play: '\\ea23';
|
|
1003
|
+
--lumo-icons-plus: '\\ea24';
|
|
1004
|
+
--lumo-icons-redo: '\\ea25';
|
|
1005
|
+
--lumo-icons-reload: '\\ea26';
|
|
1006
|
+
--lumo-icons-resize-handle: '\\ea27';
|
|
1007
|
+
--lumo-icons-search: '\\ea28';
|
|
1008
|
+
--lumo-icons-undo: '\\ea29';
|
|
1009
|
+
--lumo-icons-unordered-list: '\\ea2a';
|
|
1010
|
+
--lumo-icons-upload: '\\ea2b';
|
|
1011
|
+
--lumo-icons-user: '\\ea2c';
|
|
968
1012
|
}
|
|
969
1013
|
`;
|
|
970
1014
|
|
|
@@ -11309,6 +11353,7 @@ const DisabledMixin = dedupingMixin(
|
|
|
11309
11353
|
value: false,
|
|
11310
11354
|
observer: '_disabledChanged',
|
|
11311
11355
|
reflectToAttribute: true,
|
|
11356
|
+
sync: true,
|
|
11312
11357
|
},
|
|
11313
11358
|
};
|
|
11314
11359
|
}
|
|
@@ -12432,6 +12477,8 @@ const InputMixin = dedupingMixin(
|
|
|
12432
12477
|
if (this.inputElement) {
|
|
12433
12478
|
this.inputElement[this._inputElementValueProperty] = value;
|
|
12434
12479
|
}
|
|
12480
|
+
|
|
12481
|
+
this._hasInputValue = value && value.length > 0;
|
|
12435
12482
|
}
|
|
12436
12483
|
|
|
12437
12484
|
/**
|
|
@@ -12625,6 +12672,7 @@ const CheckedMixin = dedupingMixin(
|
|
|
12625
12672
|
value: false,
|
|
12626
12673
|
notify: true,
|
|
12627
12674
|
reflectToAttribute: true,
|
|
12675
|
+
sync: true,
|
|
12628
12676
|
},
|
|
12629
12677
|
};
|
|
12630
12678
|
}
|
|
@@ -13660,6 +13708,22 @@ const ValidateMixin = dedupingMixin(
|
|
|
13660
13708
|
value: false,
|
|
13661
13709
|
},
|
|
13662
13710
|
|
|
13711
|
+
/**
|
|
13712
|
+
* Set to true to enable manual validation mode. This mode disables automatic
|
|
13713
|
+
* constraint validation, allowing you to control the validation process yourself.
|
|
13714
|
+
* You can still trigger constraint validation manually with the `validate()` method
|
|
13715
|
+
* or use `checkValidity()` to assess the component's validity without affecting
|
|
13716
|
+
* the invalid state. In manual validation mode, you can also manipulate
|
|
13717
|
+
* the `invalid` property directly through your application logic without conflicts
|
|
13718
|
+
* with the component's internal validation.
|
|
13719
|
+
*
|
|
13720
|
+
* @attr {boolean} manual-validation
|
|
13721
|
+
*/
|
|
13722
|
+
manualValidation: {
|
|
13723
|
+
type: Boolean,
|
|
13724
|
+
value: false,
|
|
13725
|
+
},
|
|
13726
|
+
|
|
13663
13727
|
/**
|
|
13664
13728
|
* Specifies that the user must fill in a value.
|
|
13665
13729
|
*/
|
|
@@ -13714,6 +13778,14 @@ const ValidateMixin = dedupingMixin(
|
|
|
13714
13778
|
return true;
|
|
13715
13779
|
}
|
|
13716
13780
|
|
|
13781
|
+
/** @protected */
|
|
13782
|
+
_requestValidation() {
|
|
13783
|
+
if (!this.manualValidation) {
|
|
13784
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
13785
|
+
this.validate();
|
|
13786
|
+
}
|
|
13787
|
+
}
|
|
13788
|
+
|
|
13717
13789
|
/**
|
|
13718
13790
|
* Fired whenever the field is validated.
|
|
13719
13791
|
*
|
|
@@ -14236,14 +14308,14 @@ const CheckboxMixin = (superclass) =>
|
|
|
14236
14308
|
// Do not validate when focusout is caused by document
|
|
14237
14309
|
// losing focus, which happens on browser tab switch.
|
|
14238
14310
|
if (!focused && document.hasFocus()) {
|
|
14239
|
-
this.
|
|
14311
|
+
this._requestValidation();
|
|
14240
14312
|
}
|
|
14241
14313
|
}
|
|
14242
14314
|
|
|
14243
14315
|
/** @private */
|
|
14244
14316
|
_checkedChanged(checked) {
|
|
14245
14317
|
if (checked || this.__oldChecked) {
|
|
14246
|
-
this.
|
|
14318
|
+
this._requestValidation();
|
|
14247
14319
|
}
|
|
14248
14320
|
|
|
14249
14321
|
this.__oldChecked = checked;
|
|
@@ -14260,7 +14332,7 @@ const CheckboxMixin = (superclass) =>
|
|
|
14260
14332
|
super._requiredChanged(required);
|
|
14261
14333
|
|
|
14262
14334
|
if (required === false) {
|
|
14263
|
-
this.
|
|
14335
|
+
this._requestValidation();
|
|
14264
14336
|
}
|
|
14265
14337
|
}
|
|
14266
14338
|
|
|
@@ -14960,7 +15032,7 @@ const CheckboxGroupMixin = (superclass) =>
|
|
|
14960
15032
|
});
|
|
14961
15033
|
|
|
14962
15034
|
if (oldValue !== undefined) {
|
|
14963
|
-
this.
|
|
15035
|
+
this._requestValidation();
|
|
14964
15036
|
}
|
|
14965
15037
|
}
|
|
14966
15038
|
|
|
@@ -15000,7 +15072,7 @@ const CheckboxGroupMixin = (superclass) =>
|
|
|
15000
15072
|
// Do not validate when focusout is caused by document
|
|
15001
15073
|
// losing focus, which happens on browser tab switch.
|
|
15002
15074
|
if (!focused && document.hasFocus()) {
|
|
15003
|
-
this.
|
|
15075
|
+
this._requestValidation();
|
|
15004
15076
|
}
|
|
15005
15077
|
}
|
|
15006
15078
|
};
|
|
@@ -17678,6 +17750,7 @@ const OverlayMixin = (superClass) =>
|
|
|
17678
17750
|
notify: true,
|
|
17679
17751
|
observer: '_openedChanged',
|
|
17680
17752
|
reflectToAttribute: true,
|
|
17753
|
+
sync: true,
|
|
17681
17754
|
},
|
|
17682
17755
|
|
|
17683
17756
|
/**
|
|
@@ -17686,6 +17759,7 @@ const OverlayMixin = (superClass) =>
|
|
|
17686
17759
|
*/
|
|
17687
17760
|
owner: {
|
|
17688
17761
|
type: Object,
|
|
17762
|
+
sync: true,
|
|
17689
17763
|
},
|
|
17690
17764
|
|
|
17691
17765
|
/**
|
|
@@ -17693,6 +17767,7 @@ const OverlayMixin = (superClass) =>
|
|
|
17693
17767
|
*/
|
|
17694
17768
|
model: {
|
|
17695
17769
|
type: Object,
|
|
17770
|
+
sync: true,
|
|
17696
17771
|
},
|
|
17697
17772
|
|
|
17698
17773
|
/**
|
|
@@ -17706,6 +17781,7 @@ const OverlayMixin = (superClass) =>
|
|
|
17706
17781
|
*/
|
|
17707
17782
|
renderer: {
|
|
17708
17783
|
type: Object,
|
|
17784
|
+
sync: true,
|
|
17709
17785
|
},
|
|
17710
17786
|
|
|
17711
17787
|
/**
|
|
@@ -17718,6 +17794,7 @@ const OverlayMixin = (superClass) =>
|
|
|
17718
17794
|
value: false,
|
|
17719
17795
|
reflectToAttribute: true,
|
|
17720
17796
|
observer: '_modelessChanged',
|
|
17797
|
+
sync: true,
|
|
17721
17798
|
},
|
|
17722
17799
|
|
|
17723
17800
|
/**
|
|
@@ -17729,6 +17806,7 @@ const OverlayMixin = (superClass) =>
|
|
|
17729
17806
|
type: Boolean,
|
|
17730
17807
|
reflectToAttribute: true,
|
|
17731
17808
|
observer: '_hiddenChanged',
|
|
17809
|
+
sync: true,
|
|
17732
17810
|
},
|
|
17733
17811
|
|
|
17734
17812
|
/**
|
|
@@ -17739,6 +17817,7 @@ const OverlayMixin = (superClass) =>
|
|
|
17739
17817
|
type: Boolean,
|
|
17740
17818
|
value: false,
|
|
17741
17819
|
reflectToAttribute: true,
|
|
17820
|
+
sync: true,
|
|
17742
17821
|
},
|
|
17743
17822
|
};
|
|
17744
17823
|
}
|
|
@@ -19567,6 +19646,21 @@ class InfiniteScroller extends HTMLElement {
|
|
|
19567
19646
|
}
|
|
19568
19647
|
}
|
|
19569
19648
|
|
|
19649
|
+
/** @protected */
|
|
19650
|
+
disconnectedCallback() {
|
|
19651
|
+
if (this._debouncerScrollFinish) {
|
|
19652
|
+
this._debouncerScrollFinish.cancel();
|
|
19653
|
+
}
|
|
19654
|
+
|
|
19655
|
+
if (this._debouncerUpdateClones) {
|
|
19656
|
+
this._debouncerUpdateClones.cancel();
|
|
19657
|
+
}
|
|
19658
|
+
|
|
19659
|
+
if (this.__pendingFinishInit) {
|
|
19660
|
+
cancelAnimationFrame(this.__pendingFinishInit);
|
|
19661
|
+
}
|
|
19662
|
+
}
|
|
19663
|
+
|
|
19570
19664
|
/**
|
|
19571
19665
|
* Force the scroller to update clones after a reset, without
|
|
19572
19666
|
* waiting for the debouncer to resolve.
|
|
@@ -19714,8 +19808,9 @@ class InfiniteScroller extends HTMLElement {
|
|
|
19714
19808
|
}
|
|
19715
19809
|
});
|
|
19716
19810
|
|
|
19717
|
-
requestAnimationFrame(() => {
|
|
19811
|
+
this.__pendingFinishInit = requestAnimationFrame(() => {
|
|
19718
19812
|
this._finishInit();
|
|
19813
|
+
this.__pendingFinishInit = null;
|
|
19719
19814
|
});
|
|
19720
19815
|
}
|
|
19721
19816
|
|
|
@@ -19730,6 +19825,10 @@ class InfiniteScroller extends HTMLElement {
|
|
|
19730
19825
|
itemWrapper.instance = this._createElement();
|
|
19731
19826
|
itemWrapper.appendChild(itemWrapper.instance);
|
|
19732
19827
|
|
|
19828
|
+
if (itemWrapper.instance.performUpdate) {
|
|
19829
|
+
itemWrapper.instance.performUpdate();
|
|
19830
|
+
}
|
|
19831
|
+
|
|
19733
19832
|
Object.keys(tmpInstance).forEach((prop) => {
|
|
19734
19833
|
itemWrapper.instance[prop] = tmpInstance[prop];
|
|
19735
19834
|
});
|
|
@@ -21747,6 +21846,10 @@ const MonthCalendarMixin = (superClass) =>
|
|
|
21747
21846
|
value: () => false,
|
|
21748
21847
|
},
|
|
21749
21848
|
|
|
21849
|
+
enteredDate: {
|
|
21850
|
+
type: Date,
|
|
21851
|
+
},
|
|
21852
|
+
|
|
21750
21853
|
disabled: {
|
|
21751
21854
|
type: Boolean,
|
|
21752
21855
|
reflectToAttribute: true,
|
|
@@ -21766,6 +21869,11 @@ const MonthCalendarMixin = (superClass) =>
|
|
|
21766
21869
|
_notTapping: {
|
|
21767
21870
|
type: Boolean,
|
|
21768
21871
|
},
|
|
21872
|
+
|
|
21873
|
+
/** @private */
|
|
21874
|
+
__hasFocus: {
|
|
21875
|
+
type: Boolean,
|
|
21876
|
+
},
|
|
21769
21877
|
};
|
|
21770
21878
|
}
|
|
21771
21879
|
|
|
@@ -21785,6 +21893,12 @@ const MonthCalendarMixin = (superClass) =>
|
|
|
21785
21893
|
addListener(this.$.monthGrid, 'tap', this._handleTap.bind(this));
|
|
21786
21894
|
}
|
|
21787
21895
|
|
|
21896
|
+
/** @override */
|
|
21897
|
+
_setFocused(focused) {
|
|
21898
|
+
super._setFocused(focused);
|
|
21899
|
+
this.__hasFocus = focused;
|
|
21900
|
+
}
|
|
21901
|
+
|
|
21788
21902
|
/**
|
|
21789
21903
|
* Returns true if all the dates in the month are out of the allowed range
|
|
21790
21904
|
* @protected
|
|
@@ -22080,7 +22194,7 @@ class MonthCalendar extends MonthCalendarMixin(ThemableMixin(PolymerElement)) {
|
|
|
22080
22194
|
<template is="dom-repeat" items="[[week]]">
|
|
22081
22195
|
<td
|
|
22082
22196
|
role="gridcell"
|
|
22083
|
-
part$="[[__getDatePart(item, focusedDate, selectedDate, minDate, maxDate, isDateDisabled)]]"
|
|
22197
|
+
part$="[[__getDatePart(item, focusedDate, selectedDate, minDate, maxDate, isDateDisabled, enteredDate, __hasFocus)]]"
|
|
22084
22198
|
date="[[item]]"
|
|
22085
22199
|
tabindex$="[[__getDayTabindex(item, focusedDate)]]"
|
|
22086
22200
|
disabled$="[[__isDayDisabled(item, minDate, maxDate, isDateDisabled)]]"
|
|
@@ -22138,7 +22252,7 @@ class MonthCalendar extends MonthCalendarMixin(ThemableMixin(PolymerElement)) {
|
|
|
22138
22252
|
|
|
22139
22253
|
/** @private */
|
|
22140
22254
|
// eslint-disable-next-line @typescript-eslint/max-params
|
|
22141
|
-
__getDatePart(date, focusedDate, selectedDate, minDate, maxDate, isDateDisabled) {
|
|
22255
|
+
__getDatePart(date, focusedDate, selectedDate, minDate, maxDate, isDateDisabled, enteredDate, hasFocus) {
|
|
22142
22256
|
const result = ['date'];
|
|
22143
22257
|
const greaterThanToday = date > normalizeDate(new Date());
|
|
22144
22258
|
const lessThanToday = date < normalizeDate(new Date());
|
|
@@ -22147,7 +22261,7 @@ class MonthCalendar extends MonthCalendarMixin(ThemableMixin(PolymerElement)) {
|
|
|
22147
22261
|
result.push('disabled');
|
|
22148
22262
|
}
|
|
22149
22263
|
|
|
22150
|
-
if (
|
|
22264
|
+
if (dateEquals(date, focusedDate) && (hasFocus || dateEquals(date, enteredDate))) {
|
|
22151
22265
|
result.push('focused');
|
|
22152
22266
|
}
|
|
22153
22267
|
|
|
@@ -22170,11 +22284,6 @@ class MonthCalendar extends MonthCalendarMixin(ThemableMixin(PolymerElement)) {
|
|
|
22170
22284
|
return result.join(' ');
|
|
22171
22285
|
}
|
|
22172
22286
|
|
|
22173
|
-
/** @private */
|
|
22174
|
-
__isDayFocused(date, focusedDate) {
|
|
22175
|
-
return dateEquals(date, focusedDate);
|
|
22176
|
-
}
|
|
22177
|
-
|
|
22178
22287
|
/** @private */
|
|
22179
22288
|
__isDaySelected(date, selectedDate) {
|
|
22180
22289
|
return dateEquals(date, selectedDate);
|
|
@@ -22205,11 +22314,7 @@ class MonthCalendar extends MonthCalendarMixin(ThemableMixin(PolymerElement)) {
|
|
|
22205
22314
|
|
|
22206
22315
|
/** @private */
|
|
22207
22316
|
__getDayTabindex(date, focusedDate) {
|
|
22208
|
-
|
|
22209
|
-
return '0';
|
|
22210
|
-
}
|
|
22211
|
-
|
|
22212
|
-
return '-1';
|
|
22317
|
+
return dateEquals(date, focusedDate) ? '0' : '-1';
|
|
22213
22318
|
}
|
|
22214
22319
|
}
|
|
22215
22320
|
|
|
@@ -22328,6 +22433,7 @@ const DatePickerOverlayContentMixin = (superClass) =>
|
|
|
22328
22433
|
initialPosition: {
|
|
22329
22434
|
type: Object,
|
|
22330
22435
|
observer: '_initialPositionChanged',
|
|
22436
|
+
sync: true,
|
|
22331
22437
|
},
|
|
22332
22438
|
|
|
22333
22439
|
_originDate: {
|
|
@@ -22395,6 +22501,11 @@ const DatePickerOverlayContentMixin = (superClass) =>
|
|
|
22395
22501
|
type: Function,
|
|
22396
22502
|
},
|
|
22397
22503
|
|
|
22504
|
+
enteredDate: {
|
|
22505
|
+
type: Date,
|
|
22506
|
+
sync: true,
|
|
22507
|
+
},
|
|
22508
|
+
|
|
22398
22509
|
/**
|
|
22399
22510
|
* Input label
|
|
22400
22511
|
*/
|
|
@@ -22422,7 +22533,7 @@ const DatePickerOverlayContentMixin = (superClass) =>
|
|
|
22422
22533
|
|
|
22423
22534
|
static get observers() {
|
|
22424
22535
|
return [
|
|
22425
|
-
'__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme, isDateDisabled)',
|
|
22536
|
+
'__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme, isDateDisabled, enteredDate)',
|
|
22426
22537
|
'__updateCancelButton(_cancelButton, i18n)',
|
|
22427
22538
|
'__updateTodayButton(_todayButton, i18n, minDate, maxDate, isDateDisabled)',
|
|
22428
22539
|
'__updateYears(years, selectedDate, _theme)',
|
|
@@ -22610,6 +22721,7 @@ const DatePickerOverlayContentMixin = (superClass) =>
|
|
|
22610
22721
|
ignoreTaps,
|
|
22611
22722
|
theme,
|
|
22612
22723
|
isDateDisabled,
|
|
22724
|
+
enteredDate,
|
|
22613
22725
|
) {
|
|
22614
22726
|
if (calendars && calendars.length) {
|
|
22615
22727
|
calendars.forEach((calendar) => {
|
|
@@ -22621,6 +22733,7 @@ const DatePickerOverlayContentMixin = (superClass) =>
|
|
|
22621
22733
|
calendar.selectedDate = selectedDate;
|
|
22622
22734
|
calendar.showWeekNumbers = showWeekNumbers;
|
|
22623
22735
|
calendar.ignoreTaps = ignoreTaps;
|
|
22736
|
+
calendar.enteredDate = enteredDate;
|
|
22624
22737
|
|
|
22625
22738
|
if (theme) {
|
|
22626
22739
|
calendar.setAttribute('theme', theme);
|
|
@@ -23729,8 +23842,8 @@ const InputConstraintsMixin = dedupingMixin(
|
|
|
23729
23842
|
const isLastConstraintRemoved = this.__previousHasConstraints && !hasConstraints;
|
|
23730
23843
|
|
|
23731
23844
|
if ((this._hasValue || this.invalid) && hasConstraints) {
|
|
23732
|
-
this.
|
|
23733
|
-
} else if (isLastConstraintRemoved) {
|
|
23845
|
+
this._requestValidation();
|
|
23846
|
+
} else if (isLastConstraintRemoved && !this.manualValidation) {
|
|
23734
23847
|
this._setInvalid(false);
|
|
23735
23848
|
}
|
|
23736
23849
|
|
|
@@ -23748,7 +23861,7 @@ const InputConstraintsMixin = dedupingMixin(
|
|
|
23748
23861
|
_onChange(event) {
|
|
23749
23862
|
event.stopPropagation();
|
|
23750
23863
|
|
|
23751
|
-
this.
|
|
23864
|
+
this._requestValidation();
|
|
23752
23865
|
|
|
23753
23866
|
this.dispatchEvent(
|
|
23754
23867
|
new CustomEvent('change', {
|
|
@@ -23891,30 +24004,6 @@ const InputControlMixin = (superclass) =>
|
|
|
23891
24004
|
}
|
|
23892
24005
|
}
|
|
23893
24006
|
|
|
23894
|
-
/**
|
|
23895
|
-
* Override an event listener inherited from `InputMixin`
|
|
23896
|
-
* to capture native `change` event and make sure that
|
|
23897
|
-
* a new one is dispatched after validation runs.
|
|
23898
|
-
* @param {Event} event
|
|
23899
|
-
* @protected
|
|
23900
|
-
* @override
|
|
23901
|
-
*/
|
|
23902
|
-
_onChange(event) {
|
|
23903
|
-
event.stopPropagation();
|
|
23904
|
-
|
|
23905
|
-
this.validate();
|
|
23906
|
-
|
|
23907
|
-
this.dispatchEvent(
|
|
23908
|
-
new CustomEvent('change', {
|
|
23909
|
-
detail: {
|
|
23910
|
-
sourceEvent: event,
|
|
23911
|
-
},
|
|
23912
|
-
bubbles: event.bubbles,
|
|
23913
|
-
cancelable: event.cancelable,
|
|
23914
|
-
}),
|
|
23915
|
-
);
|
|
23916
|
-
}
|
|
23917
|
-
|
|
23918
24007
|
/**
|
|
23919
24008
|
* Override a method from `InputMixin`.
|
|
23920
24009
|
* @param {!HTMLElement} input
|
|
@@ -24250,6 +24339,62 @@ class VirtualKeyboardController {
|
|
|
24250
24339
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
24251
24340
|
*/
|
|
24252
24341
|
|
|
24342
|
+
const datePickerI18nDefaults = Object.freeze({
|
|
24343
|
+
monthNames: [
|
|
24344
|
+
'January',
|
|
24345
|
+
'February',
|
|
24346
|
+
'March',
|
|
24347
|
+
'April',
|
|
24348
|
+
'May',
|
|
24349
|
+
'June',
|
|
24350
|
+
'July',
|
|
24351
|
+
'August',
|
|
24352
|
+
'September',
|
|
24353
|
+
'October',
|
|
24354
|
+
'November',
|
|
24355
|
+
'December',
|
|
24356
|
+
],
|
|
24357
|
+
weekdays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
|
24358
|
+
weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
24359
|
+
firstDayOfWeek: 0,
|
|
24360
|
+
today: 'Today',
|
|
24361
|
+
cancel: 'Cancel',
|
|
24362
|
+
referenceDate: '',
|
|
24363
|
+
formatDate(d) {
|
|
24364
|
+
const yearStr = String(d.year).replace(/\d+/u, (y) => '0000'.substr(y.length) + y);
|
|
24365
|
+
return [d.month + 1, d.day, yearStr].join('/');
|
|
24366
|
+
},
|
|
24367
|
+
parseDate(text) {
|
|
24368
|
+
const parts = text.split('/');
|
|
24369
|
+
const today = new Date();
|
|
24370
|
+
let date,
|
|
24371
|
+
month = today.getMonth(),
|
|
24372
|
+
year = today.getFullYear();
|
|
24373
|
+
|
|
24374
|
+
if (parts.length === 3) {
|
|
24375
|
+
month = parseInt(parts[0]) - 1;
|
|
24376
|
+
date = parseInt(parts[1]);
|
|
24377
|
+
year = parseInt(parts[2]);
|
|
24378
|
+
if (parts[2].length < 3 && year >= 0) {
|
|
24379
|
+
const usedReferenceDate = this.referenceDate ? parseDate(this.referenceDate) : new Date();
|
|
24380
|
+
year = getAdjustedYear(usedReferenceDate, year, month, date);
|
|
24381
|
+
}
|
|
24382
|
+
} else if (parts.length === 2) {
|
|
24383
|
+
month = parseInt(parts[0]) - 1;
|
|
24384
|
+
date = parseInt(parts[1]);
|
|
24385
|
+
} else if (parts.length === 1) {
|
|
24386
|
+
date = parseInt(parts[0]);
|
|
24387
|
+
}
|
|
24388
|
+
|
|
24389
|
+
if (date !== undefined) {
|
|
24390
|
+
return { day: date, month, year };
|
|
24391
|
+
}
|
|
24392
|
+
},
|
|
24393
|
+
formatTitle: (monthName, fullYear) => {
|
|
24394
|
+
return `${monthName} ${fullYear}`;
|
|
24395
|
+
},
|
|
24396
|
+
});
|
|
24397
|
+
|
|
24253
24398
|
/**
|
|
24254
24399
|
* @polymerMixin
|
|
24255
24400
|
* @mixes ControllerMixin
|
|
@@ -24323,7 +24468,10 @@ const DatePickerMixin = (subclass) =>
|
|
|
24323
24468
|
* Set true to prevent the overlay from opening automatically.
|
|
24324
24469
|
* @attr {boolean} auto-open-disabled
|
|
24325
24470
|
*/
|
|
24326
|
-
autoOpenDisabled:
|
|
24471
|
+
autoOpenDisabled: {
|
|
24472
|
+
type: Boolean,
|
|
24473
|
+
sync: true,
|
|
24474
|
+
},
|
|
24327
24475
|
|
|
24328
24476
|
/**
|
|
24329
24477
|
* Set true to display ISO-8601 week numbers in the calendar. Notice that
|
|
@@ -24444,63 +24592,7 @@ const DatePickerMixin = (subclass) =>
|
|
|
24444
24592
|
i18n: {
|
|
24445
24593
|
type: Object,
|
|
24446
24594
|
sync: true,
|
|
24447
|
-
value: () => {
|
|
24448
|
-
return {
|
|
24449
|
-
monthNames: [
|
|
24450
|
-
'January',
|
|
24451
|
-
'February',
|
|
24452
|
-
'March',
|
|
24453
|
-
'April',
|
|
24454
|
-
'May',
|
|
24455
|
-
'June',
|
|
24456
|
-
'July',
|
|
24457
|
-
'August',
|
|
24458
|
-
'September',
|
|
24459
|
-
'October',
|
|
24460
|
-
'November',
|
|
24461
|
-
'December',
|
|
24462
|
-
],
|
|
24463
|
-
weekdays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
|
24464
|
-
weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
24465
|
-
firstDayOfWeek: 0,
|
|
24466
|
-
today: 'Today',
|
|
24467
|
-
cancel: 'Cancel',
|
|
24468
|
-
referenceDate: '',
|
|
24469
|
-
formatDate(d) {
|
|
24470
|
-
const yearStr = String(d.year).replace(/\d+/u, (y) => '0000'.substr(y.length) + y);
|
|
24471
|
-
return [d.month + 1, d.day, yearStr].join('/');
|
|
24472
|
-
},
|
|
24473
|
-
parseDate(text) {
|
|
24474
|
-
const parts = text.split('/');
|
|
24475
|
-
const today = new Date();
|
|
24476
|
-
let date,
|
|
24477
|
-
month = today.getMonth(),
|
|
24478
|
-
year = today.getFullYear();
|
|
24479
|
-
|
|
24480
|
-
if (parts.length === 3) {
|
|
24481
|
-
month = parseInt(parts[0]) - 1;
|
|
24482
|
-
date = parseInt(parts[1]);
|
|
24483
|
-
year = parseInt(parts[2]);
|
|
24484
|
-
if (parts[2].length < 3 && year >= 0) {
|
|
24485
|
-
const usedReferenceDate = this.referenceDate ? parseDate(this.referenceDate) : new Date();
|
|
24486
|
-
year = getAdjustedYear(usedReferenceDate, year, month, date);
|
|
24487
|
-
}
|
|
24488
|
-
} else if (parts.length === 2) {
|
|
24489
|
-
month = parseInt(parts[0]) - 1;
|
|
24490
|
-
date = parseInt(parts[1]);
|
|
24491
|
-
} else if (parts.length === 1) {
|
|
24492
|
-
date = parseInt(parts[0]);
|
|
24493
|
-
}
|
|
24494
|
-
|
|
24495
|
-
if (date !== undefined) {
|
|
24496
|
-
return { day: date, month, year };
|
|
24497
|
-
}
|
|
24498
|
-
},
|
|
24499
|
-
formatTitle: (monthName, fullYear) => {
|
|
24500
|
-
return `${monthName} ${fullYear}`;
|
|
24501
|
-
},
|
|
24502
|
-
};
|
|
24503
|
-
},
|
|
24595
|
+
value: () => ({ ...datePickerI18nDefaults }),
|
|
24504
24596
|
},
|
|
24505
24597
|
|
|
24506
24598
|
/**
|
|
@@ -24585,18 +24677,10 @@ const DatePickerMixin = (subclass) =>
|
|
|
24585
24677
|
sync: true,
|
|
24586
24678
|
},
|
|
24587
24679
|
|
|
24588
|
-
/**
|
|
24589
|
-
|
|
24590
|
-
|
|
24591
|
-
|
|
24592
|
-
* Read more about why this workaround is needed:
|
|
24593
|
-
* https://github.com/vaadin/web-components/issues/5639
|
|
24594
|
-
*
|
|
24595
|
-
* @protected
|
|
24596
|
-
* @override
|
|
24597
|
-
*/
|
|
24598
|
-
_hasInputValue: {
|
|
24599
|
-
type: Boolean,
|
|
24680
|
+
/** @private */
|
|
24681
|
+
__enteredDate: {
|
|
24682
|
+
type: Date,
|
|
24683
|
+
sync: true,
|
|
24600
24684
|
},
|
|
24601
24685
|
};
|
|
24602
24686
|
}
|
|
@@ -24605,7 +24689,7 @@ const DatePickerMixin = (subclass) =>
|
|
|
24605
24689
|
return [
|
|
24606
24690
|
'_selectedDateChanged(_selectedDate, i18n)',
|
|
24607
24691
|
'_focusedDateChanged(_focusedDate, i18n)',
|
|
24608
|
-
'__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers, isDateDisabled)',
|
|
24692
|
+
'__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers, isDateDisabled, __enteredDate)',
|
|
24609
24693
|
'__updateOverlayContentTheme(_overlayContent, _theme)',
|
|
24610
24694
|
'__updateOverlayContentFullScreen(_overlayContent, _fullscreen)',
|
|
24611
24695
|
];
|
|
@@ -24623,28 +24707,17 @@ const DatePickerMixin = (subclass) =>
|
|
|
24623
24707
|
this._boundOverlayRenderer = this._overlayRenderer.bind(this);
|
|
24624
24708
|
}
|
|
24625
24709
|
|
|
24626
|
-
/**
|
|
24627
|
-
* @override
|
|
24628
|
-
* @protected
|
|
24629
|
-
*/
|
|
24710
|
+
/** @override */
|
|
24630
24711
|
get _inputElementValue() {
|
|
24631
24712
|
return super._inputElementValue;
|
|
24632
24713
|
}
|
|
24633
24714
|
|
|
24634
|
-
/**
|
|
24635
|
-
* The setter is overridden to reset the `_hasInputValue` property
|
|
24636
|
-
* to false when the input element's value is updated programmatically.
|
|
24637
|
-
* In date-picker, `_hasInputValue` is supposed to indicate true only
|
|
24638
|
-
* if the input has been entered by the user.
|
|
24639
|
-
* Read more about why this workaround is needed:
|
|
24640
|
-
* https://github.com/vaadin/web-components/issues/5639
|
|
24641
|
-
*
|
|
24642
|
-
* @override
|
|
24643
|
-
* @protected
|
|
24644
|
-
*/
|
|
24715
|
+
/** @override */
|
|
24645
24716
|
set _inputElementValue(value) {
|
|
24646
24717
|
super._inputElementValue = value;
|
|
24647
|
-
|
|
24718
|
+
|
|
24719
|
+
const parsedDate = this.__parseDate(value);
|
|
24720
|
+
this.__setEnteredDate(parsedDate);
|
|
24648
24721
|
}
|
|
24649
24722
|
|
|
24650
24723
|
/**
|
|
@@ -24706,7 +24779,7 @@ const DatePickerMixin = (subclass) =>
|
|
|
24706
24779
|
// Do not validate when focusout is caused by document
|
|
24707
24780
|
// losing focus, which happens on browser tab switch.
|
|
24708
24781
|
if (document.hasFocus()) {
|
|
24709
|
-
this.
|
|
24782
|
+
this._requestValidation();
|
|
24710
24783
|
}
|
|
24711
24784
|
}
|
|
24712
24785
|
}
|
|
@@ -24851,13 +24924,8 @@ const DatePickerMixin = (subclass) =>
|
|
|
24851
24924
|
!this._selectedDate || dateAllowed(this._selectedDate, this._minDate, this._maxDate, this.isDateDisabled);
|
|
24852
24925
|
|
|
24853
24926
|
let inputValidity = true;
|
|
24854
|
-
if (this.inputElement) {
|
|
24855
|
-
|
|
24856
|
-
inputValidity = this.inputElement.checkValidity();
|
|
24857
|
-
} else if (this.inputElement.validate) {
|
|
24858
|
-
// Iron-form-elements have the validate API
|
|
24859
|
-
inputValidity = this.inputElement.validate();
|
|
24860
|
-
}
|
|
24927
|
+
if (this.inputElement && this.inputElement.checkValidity) {
|
|
24928
|
+
inputValidity = this.inputElement.checkValidity();
|
|
24861
24929
|
}
|
|
24862
24930
|
|
|
24863
24931
|
return inputValid && isDateValid && inputValidity;
|
|
@@ -24944,10 +25012,10 @@ const DatePickerMixin = (subclass) =>
|
|
|
24944
25012
|
const unparsableValue = this.__unparsableValue;
|
|
24945
25013
|
|
|
24946
25014
|
if (this.__committedValue !== this.value) {
|
|
24947
|
-
this.
|
|
25015
|
+
this._requestValidation();
|
|
24948
25016
|
this.dispatchEvent(new CustomEvent('change', { bubbles: true }));
|
|
24949
25017
|
} else if (this.__committedUnparsableValue !== unparsableValue) {
|
|
24950
|
-
this.
|
|
25018
|
+
this._requestValidation();
|
|
24951
25019
|
this.dispatchEvent(new CustomEvent('unparsable-change'));
|
|
24952
25020
|
}
|
|
24953
25021
|
|
|
@@ -25076,7 +25144,7 @@ const DatePickerMixin = (subclass) =>
|
|
|
25076
25144
|
|
|
25077
25145
|
if (oldValue !== undefined) {
|
|
25078
25146
|
// Validate only if `value` changes after initialization.
|
|
25079
|
-
this.
|
|
25147
|
+
this._requestValidation();
|
|
25080
25148
|
}
|
|
25081
25149
|
}
|
|
25082
25150
|
} else {
|
|
@@ -25103,6 +25171,7 @@ const DatePickerMixin = (subclass) =>
|
|
|
25103
25171
|
selectedDate,
|
|
25104
25172
|
showWeekNumbers,
|
|
25105
25173
|
isDateDisabled,
|
|
25174
|
+
enteredDate,
|
|
25106
25175
|
) {
|
|
25107
25176
|
if (overlayContent) {
|
|
25108
25177
|
overlayContent.i18n = i18n;
|
|
@@ -25113,6 +25182,7 @@ const DatePickerMixin = (subclass) =>
|
|
|
25113
25182
|
overlayContent.selectedDate = selectedDate;
|
|
25114
25183
|
overlayContent.showWeekNumbers = showWeekNumbers;
|
|
25115
25184
|
overlayContent.isDateDisabled = isDateDisabled;
|
|
25185
|
+
overlayContent.enteredDate = enteredDate;
|
|
25116
25186
|
}
|
|
25117
25187
|
}
|
|
25118
25188
|
|
|
@@ -25242,7 +25312,7 @@ const DatePickerMixin = (subclass) =>
|
|
|
25242
25312
|
// Needed in case the value was not changed: open and close dropdown,
|
|
25243
25313
|
// especially on outside click. On Esc key press, do not validate.
|
|
25244
25314
|
if (!this.value && !this._keyboardActive) {
|
|
25245
|
-
this.
|
|
25315
|
+
this._requestValidation();
|
|
25246
25316
|
}
|
|
25247
25317
|
}
|
|
25248
25318
|
|
|
@@ -25434,15 +25504,32 @@ const DatePickerMixin = (subclass) =>
|
|
|
25434
25504
|
this.open();
|
|
25435
25505
|
}
|
|
25436
25506
|
|
|
25437
|
-
|
|
25438
|
-
|
|
25439
|
-
|
|
25440
|
-
|
|
25441
|
-
|
|
25442
|
-
this._focusedDate = parsedDate;
|
|
25443
|
-
}
|
|
25444
|
-
this._ignoreFocusedDateChange = false;
|
|
25507
|
+
const parsedDate = this.__parseDate(this._inputElementValue || '');
|
|
25508
|
+
if (parsedDate) {
|
|
25509
|
+
this._ignoreFocusedDateChange = true;
|
|
25510
|
+
if (!dateEquals(parsedDate, this._focusedDate)) {
|
|
25511
|
+
this._focusedDate = parsedDate;
|
|
25445
25512
|
}
|
|
25513
|
+
this._ignoreFocusedDateChange = false;
|
|
25514
|
+
}
|
|
25515
|
+
|
|
25516
|
+
this.__setEnteredDate(parsedDate);
|
|
25517
|
+
}
|
|
25518
|
+
|
|
25519
|
+
/**
|
|
25520
|
+
* @param {Date} date
|
|
25521
|
+
* @private
|
|
25522
|
+
*/
|
|
25523
|
+
__setEnteredDate(date) {
|
|
25524
|
+
if (date) {
|
|
25525
|
+
if (!dateEquals(this.__enteredDate, date)) {
|
|
25526
|
+
this.__enteredDate = date;
|
|
25527
|
+
}
|
|
25528
|
+
} else if (this.__enteredDate != null) {
|
|
25529
|
+
// Do not override initial undefined value with null
|
|
25530
|
+
// to avoid triggering a Lit update that can cause
|
|
25531
|
+
// other scheduled properties to flush too early.
|
|
25532
|
+
this.__enteredDate = null;
|
|
25446
25533
|
}
|
|
25447
25534
|
}
|
|
25448
25535
|
|
|
@@ -25726,6 +25813,7 @@ class DatePicker extends DatePickerMixin(InputControlMixin(ThemableMixin(Element
|
|
|
25726
25813
|
|
|
25727
25814
|
/** @private */
|
|
25728
25815
|
_onVaadinOverlayClose(e) {
|
|
25816
|
+
// Prevent closing the overlay on label element click
|
|
25729
25817
|
if (e.detail.sourceEvent && e.detail.sourceEvent.composedPath().includes(this)) {
|
|
25730
25818
|
e.preventDefault();
|
|
25731
25819
|
}
|
|
@@ -38574,7 +38662,7 @@ const InputFieldMixin = (superclass) =>
|
|
|
38574
38662
|
// Do not validate when focusout is caused by document
|
|
38575
38663
|
// losing focus, which happens on browser tab switch.
|
|
38576
38664
|
if (!focused && document.hasFocus()) {
|
|
38577
|
-
this.
|
|
38665
|
+
this._requestValidation();
|
|
38578
38666
|
}
|
|
38579
38667
|
}
|
|
38580
38668
|
|
|
@@ -38589,7 +38677,7 @@ const InputFieldMixin = (superclass) =>
|
|
|
38589
38677
|
super._onInput(event);
|
|
38590
38678
|
|
|
38591
38679
|
if (this.invalid) {
|
|
38592
|
-
this.
|
|
38680
|
+
this._requestValidation();
|
|
38593
38681
|
}
|
|
38594
38682
|
}
|
|
38595
38683
|
|
|
@@ -38610,7 +38698,7 @@ const InputFieldMixin = (superclass) =>
|
|
|
38610
38698
|
}
|
|
38611
38699
|
|
|
38612
38700
|
if (this.invalid) {
|
|
38613
|
-
this.
|
|
38701
|
+
this._requestValidation();
|
|
38614
38702
|
}
|
|
38615
38703
|
}
|
|
38616
38704
|
};
|
|
@@ -38804,24 +38892,6 @@ class TextField extends TextFieldMixin(ThemableMixin(ElementMixin(PolymerElement
|
|
|
38804
38892
|
`;
|
|
38805
38893
|
}
|
|
38806
38894
|
|
|
38807
|
-
static get properties() {
|
|
38808
|
-
return {
|
|
38809
|
-
/**
|
|
38810
|
-
* Maximum number of characters (in Unicode code points) that the user can enter.
|
|
38811
|
-
*/
|
|
38812
|
-
maxlength: {
|
|
38813
|
-
type: Number,
|
|
38814
|
-
},
|
|
38815
|
-
|
|
38816
|
-
/**
|
|
38817
|
-
* Minimum number of characters (in Unicode code points) that the user can enter.
|
|
38818
|
-
*/
|
|
38819
|
-
minlength: {
|
|
38820
|
-
type: Number,
|
|
38821
|
-
},
|
|
38822
|
-
};
|
|
38823
|
-
}
|
|
38824
|
-
|
|
38825
38895
|
/** @protected */
|
|
38826
38896
|
ready() {
|
|
38827
38897
|
super.ready();
|
|
@@ -43844,6 +43914,7 @@ const ComboBoxMixin = (subclass) =>
|
|
|
43844
43914
|
/**
|
|
43845
43915
|
* Override LitElement lifecycle callback to handle filter property change.
|
|
43846
43916
|
* @param {Object} props
|
|
43917
|
+
* @protected
|
|
43847
43918
|
*/
|
|
43848
43919
|
updated(props) {
|
|
43849
43920
|
super.updated(props);
|
|
@@ -44565,7 +44636,7 @@ const ComboBoxMixin = (subclass) =>
|
|
|
44565
44636
|
// Do not validate when focusout is caused by document
|
|
44566
44637
|
// losing focus, which happens on browser tab switch.
|
|
44567
44638
|
if (document.hasFocus()) {
|
|
44568
|
-
this.
|
|
44639
|
+
this._requestValidation();
|
|
44569
44640
|
}
|
|
44570
44641
|
|
|
44571
44642
|
if (this.value !== this._lastCommittedValue) {
|