@ekzo-dev/bootstrap-addons 5.3.7 → 5.3.9
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.9",
|
|
5
5
|
"homepage": "https://github.com/ekzo-dev/aurelia-components/tree/main/packages/bootstrap-addons",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"json-schema-library": "^10.5.1"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"aurelia": "^2.0.0-
|
|
23
|
+
"aurelia": "^2.0.0-rc.0",
|
|
24
24
|
"bootstrap": "~5.3.7",
|
|
25
25
|
"@popperjs/core": "^2.11.8",
|
|
26
26
|
"vanilla-jsoneditor": "~3.7.0",
|
|
@@ -35,8 +35,8 @@ export class BsDurationInput extends BaseField implements EventListenerObject {
|
|
|
35
35
|
seconds,
|
|
36
36
|
}).toString();
|
|
37
37
|
}
|
|
38
|
-
set value(value:
|
|
39
|
-
this._parseDuration(value);
|
|
38
|
+
set value(value: unknown) {
|
|
39
|
+
this._parseDuration(value != null ? value.toString() : 'PT0S');
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
@bindable()
|
|
@@ -49,6 +49,12 @@ export class BsSelect extends BaseBsSelect implements ICustomElementViewModel {
|
|
|
49
49
|
this.setPopperConfig();
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
valueChanged(value: unknown): void {
|
|
53
|
+
if (this.multiple && !Array.isArray(value)) {
|
|
54
|
+
this.value = [];
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
52
58
|
setPopperConfig() {
|
|
53
59
|
const { host } = this;
|
|
54
60
|
const parentModal = host.closest('.modal-body,.popover-body,.offcanvas-body');
|
|
@@ -78,9 +84,9 @@ export class BsSelect extends BaseBsSelect implements ICustomElementViewModel {
|
|
|
78
84
|
if (this.multiple) {
|
|
79
85
|
const { options, value } = this;
|
|
80
86
|
|
|
81
|
-
return (value
|
|
82
|
-
.map((val) => (options as ISelectOption[]).find((option) => option.value === val).text)
|
|
83
|
-
|
|
87
|
+
return Array.isArray(value)
|
|
88
|
+
? value.map((val) => (options as ISelectOption[]).find((option) => option.value === val).text).join(', ')
|
|
89
|
+
: '';
|
|
84
90
|
}
|
|
85
91
|
|
|
86
92
|
const { selectedOption, emptyOption } = this;
|
|
@@ -96,7 +102,7 @@ export class BsSelect extends BaseBsSelect implements ICustomElementViewModel {
|
|
|
96
102
|
return (
|
|
97
103
|
!this.disabled &&
|
|
98
104
|
((this.emptyOption && this.selectedOption?.value !== this.emptyOption.value) ||
|
|
99
|
-
(this.multiple && (this.value
|
|
105
|
+
(this.multiple && Array.isArray(this.value) && this.value.length > 0))
|
|
100
106
|
);
|
|
101
107
|
}
|
|
102
108
|
|