@coreui/angular-pro 4.4.12 → 4.4.13
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 +15 -5
- package/fesm2015/coreui-angular-pro.mjs +14 -4
- package/fesm2015/coreui-angular-pro.mjs.map +1 -1
- package/fesm2020/coreui-angular-pro.mjs +14 -4
- package/fesm2020/coreui-angular-pro.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -8915,7 +8915,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
8915
8915
|
type: Output
|
|
8916
8916
|
}] } });
|
|
8917
8917
|
|
|
8918
|
-
var _MultiSelectComponent_destroy$, _MultiSelectComponent_optionsReady$, _MultiSelectComponent_options, _MultiSelectComponent_value;
|
|
8918
|
+
var _MultiSelectComponent_destroy$, _MultiSelectComponent_optionsReady$, _MultiSelectComponent_options, _MultiSelectComponent_optionsContent, _MultiSelectComponent_value;
|
|
8919
8919
|
// @ts-ignore
|
|
8920
8920
|
const observeReferenceModifier = {
|
|
8921
8921
|
name: 'observeReferenceModifier', enabled: true, phase: 'main', fn({ state }) { },
|
|
@@ -8953,6 +8953,7 @@ class MultiSelectComponent {
|
|
|
8953
8953
|
this.optionsSelected$ = new BehaviorSubject([]);
|
|
8954
8954
|
this.optionsSelected = new Map();
|
|
8955
8955
|
this.value$ = new BehaviorSubject([]);
|
|
8956
|
+
_MultiSelectComponent_optionsContent.set(this, []);
|
|
8956
8957
|
this.onChange = (value) => { };
|
|
8957
8958
|
this.onTouched = () => { };
|
|
8958
8959
|
/**
|
|
@@ -9135,6 +9136,7 @@ class MultiSelectComponent {
|
|
|
9135
9136
|
*/
|
|
9136
9137
|
set options(options) {
|
|
9137
9138
|
if (Array.isArray(options)) {
|
|
9139
|
+
__classPrivateFieldGet(this, _MultiSelectComponent_options, "f").clear();
|
|
9138
9140
|
this.makeOptions(options);
|
|
9139
9141
|
}
|
|
9140
9142
|
}
|
|
@@ -9218,7 +9220,9 @@ class MultiSelectComponent {
|
|
|
9218
9220
|
const visible = coerceBooleanProperty(value);
|
|
9219
9221
|
if (visible !== this._visible) {
|
|
9220
9222
|
this._visible = visible;
|
|
9221
|
-
|
|
9223
|
+
setTimeout(() => {
|
|
9224
|
+
this.multiSelectService.toggleVisible(visible);
|
|
9225
|
+
});
|
|
9222
9226
|
if (!visible) {
|
|
9223
9227
|
// this.searchValue = '';
|
|
9224
9228
|
}
|
|
@@ -9523,7 +9527,12 @@ class MultiSelectComponent {
|
|
|
9523
9527
|
.pipe(takeUntil$1(__classPrivateFieldGet(this, _MultiSelectComponent_destroy$, "f")), delay(0), distinctUntilChanged((previous, current) => {
|
|
9524
9528
|
const prev = previous.toArray().map(option => option.value);
|
|
9525
9529
|
const curr = current.toArray().map(option => option.value);
|
|
9526
|
-
|
|
9530
|
+
if (this.virtualScroller) {
|
|
9531
|
+
return JSON.stringify(prev) === JSON.stringify(curr);
|
|
9532
|
+
}
|
|
9533
|
+
return JSON.stringify(__classPrivateFieldGet(this, _MultiSelectComponent_optionsContent, "f")) === JSON.stringify(curr);
|
|
9534
|
+
}), tap(changes => {
|
|
9535
|
+
__classPrivateFieldSet(this, _MultiSelectComponent_optionsContent, changes.toArray().map(option => option.value), "f");
|
|
9527
9536
|
}))
|
|
9528
9537
|
.subscribe(next => {
|
|
9529
9538
|
this.visibleOptions = this.multiSelectOptionsContent?.filter((option) => option.visible).length;
|
|
@@ -9728,6 +9737,7 @@ class MultiSelectComponent {
|
|
|
9728
9737
|
// if no template found, get defaultMultiSelectOptionTemplate from view
|
|
9729
9738
|
if (!this.templates['multiSelectOptionTemplate']) {
|
|
9730
9739
|
this.multiSelectOptionsContent = this.multiSelectOptionsView;
|
|
9740
|
+
this.multiSelectOptionsContent.notifyOnChanges();
|
|
9731
9741
|
}
|
|
9732
9742
|
// multiSelectOptionsContent gets out of order on changes
|
|
9733
9743
|
// do sort() and reset()
|
|
@@ -9818,7 +9828,7 @@ class MultiSelectComponent {
|
|
|
9818
9828
|
this.activeOption = this.listKeyManager?.activeItem ?? null;
|
|
9819
9829
|
}
|
|
9820
9830
|
}
|
|
9821
|
-
_MultiSelectComponent_destroy$ = new WeakMap(), _MultiSelectComponent_optionsReady$ = new WeakMap(), _MultiSelectComponent_options = new WeakMap(), _MultiSelectComponent_value = new WeakMap();
|
|
9831
|
+
_MultiSelectComponent_destroy$ = new WeakMap(), _MultiSelectComponent_optionsReady$ = new WeakMap(), _MultiSelectComponent_options = new WeakMap(), _MultiSelectComponent_optionsContent = new WeakMap(), _MultiSelectComponent_value = new WeakMap();
|
|
9822
9832
|
MultiSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MultiSelectComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i0.ViewContainerRef }, { token: i1$5.FocusMonitor }, { token: MultiSelectService }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Component });
|
|
9823
9833
|
MultiSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: MultiSelectComponent, isStandalone: true, selector: "c-multi-select", inputs: { cleaner: "cleaner", disabled: "disabled", multiple: "multiple", nativeFormId: "nativeFormId", nativeId: "nativeId", nativeName: "nativeName", options: "options", optionsMaxHeight: "optionsMaxHeight", optionsStyle: "optionsStyle", placeholder: "placeholder", search: "search", searchNoResultsLabel: "searchNoResultsLabel", searchValue: "searchValue", selectAll: "selectAll", selectAllLabel: "selectAllLabel", selectionType: "selectionType", selectionTypeCounterText: "selectionTypeCounterText", selectionTypeCounterTextPluralMap: "selectionTypeCounterTextPluralMap", size: "size", value: "value", valid: "valid", virtualScroller: "virtualScroller", visibleItems: "visibleItems", itemSize: "itemSize", itemMinWidth: "itemMinWidth", visible: "visible", popperjsOptions: ["popperOptions", "popperjsOptions"] }, outputs: { searchValueChange: "searchValueChange", valueChange: "valueChange", visibleChange: "visibleChange" }, host: { listeners: { "keyup": "onKeyUp($event)", "keydown": "onKeyDown($event)", "click": "onClick($event)" }, properties: { "class": "this.hostClasses", "attr.aria-multiselectable": "this.ariaMultiSelectable", "attr.tabindex": "this.tabIndex" } }, providers: [
|
|
9824
9834
|
MultiSelectService,
|