@vaadin/time-picker 23.0.9 → 23.0.12
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/time-picker",
|
|
3
|
-
"version": "23.0.
|
|
3
|
+
"version": "23.0.12",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -34,18 +34,18 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@polymer/polymer": "^3.0.0",
|
|
37
|
-
"@vaadin/combo-box": "^23.0.
|
|
38
|
-
"@vaadin/component-base": "^23.0.
|
|
39
|
-
"@vaadin/field-base": "^23.0.
|
|
40
|
-
"@vaadin/input-container": "^23.0.
|
|
41
|
-
"@vaadin/vaadin-lumo-styles": "^23.0.
|
|
42
|
-
"@vaadin/vaadin-material-styles": "^23.0.
|
|
43
|
-
"@vaadin/vaadin-themable-mixin": "^23.0.
|
|
37
|
+
"@vaadin/combo-box": "^23.0.12",
|
|
38
|
+
"@vaadin/component-base": "^23.0.12",
|
|
39
|
+
"@vaadin/field-base": "^23.0.12",
|
|
40
|
+
"@vaadin/input-container": "^23.0.12",
|
|
41
|
+
"@vaadin/vaadin-lumo-styles": "^23.0.12",
|
|
42
|
+
"@vaadin/vaadin-material-styles": "^23.0.12",
|
|
43
|
+
"@vaadin/vaadin-themable-mixin": "^23.0.12"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@esm-bundle/chai": "^4.3.4",
|
|
47
47
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
48
48
|
"sinon": "^9.2.0"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "717908c222c1e241259e30b4144cd5ba32734819"
|
|
51
51
|
}
|
|
@@ -198,13 +198,13 @@ declare class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(El
|
|
|
198
198
|
addEventListener<K extends keyof TimePickerEventMap>(
|
|
199
199
|
type: K,
|
|
200
200
|
listener: (this: TimePicker, ev: TimePickerEventMap[K]) => void,
|
|
201
|
-
options?: boolean | AddEventListenerOptions
|
|
201
|
+
options?: boolean | AddEventListenerOptions,
|
|
202
202
|
): void;
|
|
203
203
|
|
|
204
204
|
removeEventListener<K extends keyof TimePickerEventMap>(
|
|
205
205
|
type: K,
|
|
206
206
|
listener: (this: TimePicker, ev: TimePickerEventMap[K]) => void,
|
|
207
|
-
options?: boolean | EventListenerOptions
|
|
207
|
+
options?: boolean | EventListenerOptions,
|
|
208
208
|
): void;
|
|
209
209
|
}
|
|
210
210
|
|
|
@@ -106,6 +106,7 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
106
106
|
value="{{_comboBoxValue}}"
|
|
107
107
|
disabled="[[disabled]]"
|
|
108
108
|
readonly="[[readonly]]"
|
|
109
|
+
clear-button-visible="[[clearButtonVisible]]"
|
|
109
110
|
auto-open-disabled="[[autoOpenDisabled]]"
|
|
110
111
|
position-target="[[_inputContainer]]"
|
|
111
112
|
theme$="[[theme]]"
|
|
@@ -150,7 +151,7 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
150
151
|
value: {
|
|
151
152
|
type: String,
|
|
152
153
|
notify: true,
|
|
153
|
-
value: ''
|
|
154
|
+
value: '',
|
|
154
155
|
},
|
|
155
156
|
|
|
156
157
|
/**
|
|
@@ -164,7 +165,7 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
164
165
|
*/
|
|
165
166
|
min: {
|
|
166
167
|
type: String,
|
|
167
|
-
value: '00:00:00.000'
|
|
168
|
+
value: '00:00:00.000',
|
|
168
169
|
},
|
|
169
170
|
|
|
170
171
|
/**
|
|
@@ -178,7 +179,7 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
178
179
|
*/
|
|
179
180
|
max: {
|
|
180
181
|
type: String,
|
|
181
|
-
value: '23:59:59.999'
|
|
182
|
+
value: '23:59:59.999',
|
|
182
183
|
},
|
|
183
184
|
|
|
184
185
|
/**
|
|
@@ -198,7 +199,7 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
198
199
|
* not recommended to use it for better UX experience.
|
|
199
200
|
*/
|
|
200
201
|
step: {
|
|
201
|
-
type: Number
|
|
202
|
+
type: Number,
|
|
202
203
|
},
|
|
203
204
|
|
|
204
205
|
/**
|
|
@@ -209,7 +210,7 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
209
210
|
|
|
210
211
|
/** @private */
|
|
211
212
|
__dropdownItems: {
|
|
212
|
-
type: Array
|
|
213
|
+
type: Array,
|
|
213
214
|
},
|
|
214
215
|
|
|
215
216
|
/**
|
|
@@ -267,7 +268,7 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
267
268
|
const MATCH_SECONDS = MATCH_MINUTES;
|
|
268
269
|
const MATCH_MILLISECONDS = '(\\d{1,3})';
|
|
269
270
|
const re = new RegExp(
|
|
270
|
-
`^${MATCH_HOURS}(?::${MATCH_MINUTES}(?::${MATCH_SECONDS}(?:\\.${MATCH_MILLISECONDS})?)?)
|
|
271
|
+
`^${MATCH_HOURS}(?::${MATCH_MINUTES}(?::${MATCH_SECONDS}(?:\\.${MATCH_MILLISECONDS})?)?)?$`,
|
|
271
272
|
);
|
|
272
273
|
const parts = re.exec(text);
|
|
273
274
|
if (parts) {
|
|
@@ -279,19 +280,19 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
279
280
|
}
|
|
280
281
|
return { hours: parts[1], minutes: parts[2], seconds: parts[3], milliseconds: parts[4] };
|
|
281
282
|
}
|
|
282
|
-
}
|
|
283
|
+
},
|
|
283
284
|
};
|
|
284
|
-
}
|
|
285
|
+
},
|
|
285
286
|
},
|
|
286
287
|
|
|
287
288
|
/** @private */
|
|
288
289
|
_comboBoxValue: {
|
|
289
290
|
type: String,
|
|
290
|
-
observer: '__comboBoxValueChanged'
|
|
291
|
+
observer: '__comboBoxValueChanged',
|
|
291
292
|
},
|
|
292
293
|
|
|
293
294
|
/** @private */
|
|
294
|
-
_inputContainer: Object
|
|
295
|
+
_inputContainer: Object,
|
|
295
296
|
};
|
|
296
297
|
}
|
|
297
298
|
|
|
@@ -318,7 +319,7 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
318
319
|
this._setFocusElement(input);
|
|
319
320
|
this.stateTarget = input;
|
|
320
321
|
this.ariaTarget = input;
|
|
321
|
-
})
|
|
322
|
+
}),
|
|
322
323
|
);
|
|
323
324
|
this.addController(new LabelledInputController(this.inputElement, this._labelController));
|
|
324
325
|
this._inputContainer = this.shadowRoot.querySelector('[part~="input-field"]');
|
|
@@ -532,7 +533,7 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
532
533
|
const newValue = this.__formatISO(parsedObj) || '';
|
|
533
534
|
|
|
534
535
|
if (this.value !== '' && this.value !== null && !parsedObj) {
|
|
535
|
-
this.value = oldValue;
|
|
536
|
+
this.value = oldValue === undefined ? '' : oldValue;
|
|
536
537
|
} else if (this.value !== newValue) {
|
|
537
538
|
this.value = newValue;
|
|
538
539
|
} else {
|