@coreui/angular-pro 4.2.28 → 4.2.30
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/esm2020/lib/multi-select/multi-select/multi-select.component.mjs +9 -5
- package/esm2020/lib/multi-select/multi-select-option/multi-select-option.component.mjs +8 -6
- package/esm2020/lib/offcanvas/offcanvas/offcanvas.component.mjs +5 -3
- package/fesm2015/coreui-angular-pro.mjs +19 -11
- package/fesm2015/coreui-angular-pro.mjs.map +1 -1
- package/fesm2020/coreui-angular-pro.mjs +19 -11
- package/fesm2020/coreui-angular-pro.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -8385,11 +8385,13 @@ class MultiSelectOptionComponent {
|
|
|
8385
8385
|
return this.selected;
|
|
8386
8386
|
}
|
|
8387
8387
|
onKeyUp($event) {
|
|
8388
|
-
if (
|
|
8389
|
-
$event.
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
|
|
8388
|
+
if (this.dropdownVisible) {
|
|
8389
|
+
if (['Enter', 'Space'].includes($event.code)) {
|
|
8390
|
+
$event.stopImmediatePropagation();
|
|
8391
|
+
$event.preventDefault();
|
|
8392
|
+
this.selected = this.disabled ? this.selected : !this.selected;
|
|
8393
|
+
this.focus('keyboard');
|
|
8394
|
+
}
|
|
8393
8395
|
}
|
|
8394
8396
|
}
|
|
8395
8397
|
onClick() {
|
|
@@ -8861,8 +8863,13 @@ class MultiSelectComponent {
|
|
|
8861
8863
|
this.selectOptions();
|
|
8862
8864
|
});
|
|
8863
8865
|
this.multiselectVisibleSubscription = this.multiSelectService.multiSelectVisible$.subscribe((visible) => {
|
|
8864
|
-
this.isDropdownVisible
|
|
8865
|
-
|
|
8866
|
+
if (this.isDropdownVisible !== visible) {
|
|
8867
|
+
this.isDropdownVisible = visible;
|
|
8868
|
+
this.visibleChange.emit(visible);
|
|
8869
|
+
if (!visible) {
|
|
8870
|
+
this.setFocus('program', 'multiSelectVisible$');
|
|
8871
|
+
}
|
|
8872
|
+
}
|
|
8866
8873
|
});
|
|
8867
8874
|
this.multiselectStateSubscription = this.multiSelectService.multiSelectState$.subscribe((option) => {
|
|
8868
8875
|
if (option.selected === true && !this.multiple) {
|
|
@@ -8875,7 +8882,6 @@ class MultiSelectComponent {
|
|
|
8875
8882
|
// close dropdown for single select (!multiple)
|
|
8876
8883
|
this.visible = false;
|
|
8877
8884
|
this.searchValue = '';
|
|
8878
|
-
this.setFocus('program', 'multiselectSubscribe');
|
|
8879
8885
|
}
|
|
8880
8886
|
// todo?
|
|
8881
8887
|
// if (!!option) {
|
|
@@ -8892,7 +8898,7 @@ class MultiSelectComponent {
|
|
|
8892
8898
|
selectOptions() {
|
|
8893
8899
|
this.multiSelectOptions?.forEach((option, index) => {
|
|
8894
8900
|
option.optionsStyle = this.optionsStyle;
|
|
8895
|
-
option.selected = option.value !== undefined ? this.
|
|
8901
|
+
option.selected = option.value !== undefined ? this._value.includes(option.value) : !!option.selected;
|
|
8896
8902
|
});
|
|
8897
8903
|
}
|
|
8898
8904
|
clearAllOptions($event) {
|
|
@@ -10274,8 +10280,10 @@ class OffcanvasComponent {
|
|
|
10274
10280
|
ngOnInit() {
|
|
10275
10281
|
__classPrivateFieldSet(this, _OffcanvasComponent_scrollbarWidth, this.backdropService.scrollbarWidth, "f");
|
|
10276
10282
|
this.stateToggleSubscribe();
|
|
10277
|
-
|
|
10278
|
-
|
|
10283
|
+
setTimeout(() => {
|
|
10284
|
+
// hotfix to avoid offcanvas flicker on the first render
|
|
10285
|
+
this.renderer.setStyle(this.hostElement.nativeElement, 'display', 'flex');
|
|
10286
|
+
});
|
|
10279
10287
|
}
|
|
10280
10288
|
ngOnDestroy() {
|
|
10281
10289
|
this.offcanvasService.toggle({ show: false, id: this.id });
|