@ekzo-dev/bootstrap-addons 5.3.10 → 5.3.11
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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ekzo-dev/bootstrap-addons",
|
|
3
3
|
"description": "Aurelia Bootstrap additional component",
|
|
4
|
-
"version": "5.3.
|
|
4
|
+
"version": "5.3.11",
|
|
5
5
|
"homepage": "https://github.com/ekzo-dev/aurelia-components/tree/main/packages/bootstrap-addons",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -23,20 +23,20 @@ type DurationLabels = {
|
|
|
23
23
|
export class BsDurationInput extends BaseField implements EventListenerObject {
|
|
24
24
|
@bindable({ mode: BindingMode.twoWay })
|
|
25
25
|
get value(): string {
|
|
26
|
-
const {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
hours,
|
|
34
|
-
minutes,
|
|
35
|
-
seconds,
|
|
36
|
-
}).toString();
|
|
26
|
+
const { duration } = this;
|
|
27
|
+
|
|
28
|
+
if (Object.values(duration).every((v) => v == null || v.toString() === '')) {
|
|
29
|
+
return '';
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return Temporal.Duration.from(duration).toString();
|
|
37
33
|
}
|
|
38
34
|
set value(value: unknown) {
|
|
39
|
-
|
|
35
|
+
if (value == null || value === '') {
|
|
36
|
+
this.duration = {};
|
|
37
|
+
} else {
|
|
38
|
+
this._parseDuration(value.toString());
|
|
39
|
+
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
@bindable()
|
|
@@ -97,15 +97,9 @@ export class BsDurationInput extends BaseField implements EventListenerObject {
|
|
|
97
97
|
this.controls.item(0).focus();
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
private _parseDuration(value:
|
|
101
|
-
if (value == null || value === '') {
|
|
102
|
-
this.duration = {};
|
|
103
|
-
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
|
|
100
|
+
private _parseDuration(value: string) {
|
|
107
101
|
try {
|
|
108
|
-
const duration = Temporal.Duration.from(value
|
|
102
|
+
const duration = Temporal.Duration.from(value);
|
|
109
103
|
|
|
110
104
|
this.duration = {
|
|
111
105
|
years: duration.years,
|