@vaadin/time-picker 23.1.0-beta1 → 23.1.0-beta2
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.1.0-
|
|
3
|
+
"version": "23.1.0-beta2",
|
|
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.1.0-
|
|
38
|
-
"@vaadin/component-base": "23.1.0-
|
|
39
|
-
"@vaadin/field-base": "23.1.0-
|
|
40
|
-
"@vaadin/input-container": "23.1.0-
|
|
41
|
-
"@vaadin/vaadin-lumo-styles": "23.1.0-
|
|
42
|
-
"@vaadin/vaadin-material-styles": "23.1.0-
|
|
43
|
-
"@vaadin/vaadin-themable-mixin": "23.1.0-
|
|
37
|
+
"@vaadin/combo-box": "23.1.0-beta2",
|
|
38
|
+
"@vaadin/component-base": "23.1.0-beta2",
|
|
39
|
+
"@vaadin/field-base": "23.1.0-beta2",
|
|
40
|
+
"@vaadin/input-container": "23.1.0-beta2",
|
|
41
|
+
"@vaadin/vaadin-lumo-styles": "23.1.0-beta2",
|
|
42
|
+
"@vaadin/vaadin-material-styles": "23.1.0-beta2",
|
|
43
|
+
"@vaadin/vaadin-themable-mixin": "23.1.0-beta2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@esm-bundle/chai": "^4.3.4",
|
|
47
47
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
48
48
|
"sinon": "^13.0.2"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "f11f9245a0b5e6bf912725a501c27c24b74e7c8d"
|
|
51
51
|
}
|
|
@@ -16,8 +16,8 @@ export interface TimePickerTime {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export interface TimePickerI18n {
|
|
19
|
-
parseTime
|
|
20
|
-
formatTime
|
|
19
|
+
parseTime(time: string): TimePickerTime | undefined;
|
|
20
|
+
formatTime(time: TimePickerTime | undefined): string;
|
|
21
21
|
clear: string;
|
|
22
22
|
selector: string;
|
|
23
23
|
}
|
|
@@ -370,7 +370,7 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
370
370
|
|
|
371
371
|
/** @private */
|
|
372
372
|
__validDayDivisor(step) {
|
|
373
|
-
//
|
|
373
|
+
// Valid if undefined, or exact divides a day, or has millisecond resolution
|
|
374
374
|
return !step || (24 * 3600) % step === 0 || (step < 1 && ((step % 1) * 1000) % 1 === 0);
|
|
375
375
|
}
|
|
376
376
|
|
|
@@ -455,11 +455,11 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
455
455
|
msec += stepMsec;
|
|
456
456
|
}
|
|
457
457
|
|
|
458
|
-
|
|
458
|
+
const hh = Math.floor(msec / 1000 / 60 / 60);
|
|
459
459
|
msec -= hh * 1000 * 60 * 60;
|
|
460
|
-
|
|
460
|
+
const mm = Math.floor(msec / 1000 / 60);
|
|
461
461
|
msec -= mm * 1000 * 60;
|
|
462
|
-
|
|
462
|
+
const ss = Math.floor(msec / 1000);
|
|
463
463
|
msec -= ss * 1000;
|
|
464
464
|
|
|
465
465
|
return { hours: hh < 24 ? hh : 0, minutes: mm, seconds: ss, milliseconds: msec };
|