nexheal-lib 0.0.61 → 0.0.63
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/fesm2022/nexheal-lib.mjs +15 -12
- package/fesm2022/nexheal-lib.mjs.map +1 -1
- package/index.d.ts +2 -2
- package/package.json +1 -1
package/fesm2022/nexheal-lib.mjs
CHANGED
|
@@ -975,7 +975,7 @@ class CalendarControl {
|
|
|
975
975
|
this.onChangeFn(out);
|
|
976
976
|
this.onTouchedFn();
|
|
977
977
|
this.weekSelected.emit({ start, end });
|
|
978
|
-
this.dateSelected.emit(
|
|
978
|
+
this.dateSelected.emit(base);
|
|
979
979
|
this.isOpen = false;
|
|
980
980
|
return;
|
|
981
981
|
}
|
|
@@ -2658,7 +2658,6 @@ class MultiselectControl {
|
|
|
2658
2658
|
});
|
|
2659
2659
|
// Initialize filteredOptions to match all options
|
|
2660
2660
|
this.filteredOptions = [...this.options];
|
|
2661
|
-
// Sync the input display in case selectedItems was set before init
|
|
2662
2661
|
this._updateSelectedItemList();
|
|
2663
2662
|
}
|
|
2664
2663
|
ngAfterViewChecked() {
|
|
@@ -2679,6 +2678,11 @@ class MultiselectControl {
|
|
|
2679
2678
|
this.filteredOptions = [...this.options];
|
|
2680
2679
|
this._recomputeSelectAllState();
|
|
2681
2680
|
}
|
|
2681
|
+
if (changes["selectedItems"] ||
|
|
2682
|
+
changes["optionDisplayProperty"] ||
|
|
2683
|
+
changes["options"]) {
|
|
2684
|
+
this._updateSelectedItemList();
|
|
2685
|
+
}
|
|
2682
2686
|
}
|
|
2683
2687
|
writeValue(value) {
|
|
2684
2688
|
// If parent gave us something that is not an array, clear selection
|
|
@@ -2703,10 +2707,7 @@ class MultiselectControl {
|
|
|
2703
2707
|
if (value.length > 0 &&
|
|
2704
2708
|
typeof value[0] === "object" &&
|
|
2705
2709
|
value[0][this.optionValueProperty] != null) {
|
|
2706
|
-
//
|
|
2707
|
-
this.selectedItems = [...value];
|
|
2708
|
-
this._updateSelectedItemList();
|
|
2709
|
-
// Also set up pending mapping to sync with option references when available
|
|
2710
|
+
// Convert to an array of IDs, then treat exactly like CASE A
|
|
2710
2711
|
const idArray = value.map((obj) => obj[this.optionValueProperty]);
|
|
2711
2712
|
this._isPrimitivePatch = true;
|
|
2712
2713
|
this._pendingPrimitiveValues = idArray;
|
|
@@ -2964,17 +2965,19 @@ class MultiselectControl {
|
|
|
2964
2965
|
this._recomputeSelectAllState();
|
|
2965
2966
|
}
|
|
2966
2967
|
_updateSelectedItemList() {
|
|
2967
|
-
|
|
2968
|
+
const items = this.selectedItems ?? [];
|
|
2969
|
+
if (this._options && this._options.length > 0 && items.length === this._options.length) {
|
|
2968
2970
|
this.selectedItemList = "All Items Selected";
|
|
2969
2971
|
}
|
|
2970
2972
|
else {
|
|
2971
|
-
this.selectedItemList =
|
|
2972
|
-
.map((item) => item[this.optionDisplayProperty])
|
|
2973
|
+
this.selectedItemList = items
|
|
2974
|
+
.map((item) => item?.[this.optionDisplayProperty])
|
|
2975
|
+
.filter((label) => label != null && String(label).trim() !== "")
|
|
2973
2976
|
.join(", ");
|
|
2974
2977
|
}
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
+
if (this.inputControl.value !== this.selectedItemList) {
|
|
2979
|
+
this.inputControl.setValue(this.selectedItemList, { emitEvent: false });
|
|
2980
|
+
}
|
|
2978
2981
|
}
|
|
2979
2982
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: MultiselectControl, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2980
2983
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: MultiselectControl, isStandalone: true, selector: "multiselect-control", inputs: { title: "title", selectedItems: "selectedItems", required: "required", placeholder: "placeholder", customClass: "customClass", clearVal: "clearVal", deFocus: "deFocus", optionValueProperty: "optionValueProperty", inputLoader: "inputLoader", error: "error", errorMessage: "errorMessage", autocomplete: "autocomplete", showSearch: "showSearch", optionDisplayProperty: "optionDisplayProperty", options: "options", readonly: "readonly", disabled: "disabled" }, outputs: { optionsSelected: "optionsSelected", selectionCleared: "selectionCleared", blurEvent: "blurEvent" }, host: { listeners: { "window:keydown": "handleWindowKeydown($event)" } }, providers: [
|