@kuzntsv/uikit 1.0.53 → 1.0.56
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.
|
@@ -2638,6 +2638,33 @@ var BaseSignalFilterClass = class BaseSignalFilterClass {
|
|
|
2638
2638
|
defaultDebounceTime = 500;
|
|
2639
2639
|
filters = model({}, ...ngDevMode ? [{ debugName: "filters" }] : /* istanbul ignore next */ []);
|
|
2640
2640
|
clearFilter = input(null, ...ngDevMode ? [{ debugName: "clearFilter" }] : /* istanbul ignore next */ []);
|
|
2641
|
+
isUseInternalFilterSignal = 0;
|
|
2642
|
+
internalFilterSignal = signal({ ...this.filters() }, ...ngDevMode ? [{ debugName: "internalFilterSignal" }] : /* istanbul ignore next */ []);
|
|
2643
|
+
constructor() {
|
|
2644
|
+
effect(() => {
|
|
2645
|
+
if (this.isUseInternalFilterSignal) {
|
|
2646
|
+
const stableLocalValue = this.internalFilterSignal();
|
|
2647
|
+
if (JSON.stringify(stableLocalValue) !== JSON.stringify(this.filters())) this.filters.set(stableLocalValue);
|
|
2648
|
+
}
|
|
2649
|
+
});
|
|
2650
|
+
effect(() => {
|
|
2651
|
+
this.clearFilter();
|
|
2652
|
+
if (this.isUseInternalFilterSignal) this.internalFilterSignal.set({ ...this.DEFAULT_FILTER });
|
|
2653
|
+
else this.filters.set({ ...this.DEFAULT_FILTER });
|
|
2654
|
+
});
|
|
2655
|
+
}
|
|
2656
|
+
clearField(fieldName, defaultValue) {
|
|
2657
|
+
this.filters.update((prev) => ({
|
|
2658
|
+
...prev,
|
|
2659
|
+
[fieldName]: defaultValue
|
|
2660
|
+
}));
|
|
2661
|
+
}
|
|
2662
|
+
clearFieldInternal(fieldName, defaultValue) {
|
|
2663
|
+
this.internalFilterSignal.update((prev) => ({
|
|
2664
|
+
...prev,
|
|
2665
|
+
[fieldName]: defaultValue
|
|
2666
|
+
}));
|
|
2667
|
+
}
|
|
2641
2668
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2642
2669
|
minVersion: "12.0.0",
|
|
2643
2670
|
version: "22.2.2",
|
|
@@ -2677,6 +2704,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2677
2704
|
ngImport: i0,
|
|
2678
2705
|
type: BaseSignalFilterClass,
|
|
2679
2706
|
decorators: [{ type: Directive }],
|
|
2707
|
+
ctorParameters: () => [],
|
|
2680
2708
|
propDecorators: {
|
|
2681
2709
|
filters: [{
|
|
2682
2710
|
type: i0.Input,
|
|
@@ -2701,7 +2729,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2701
2729
|
});
|
|
2702
2730
|
var BaseSignalPageClass = class BaseSignalPageClass {
|
|
2703
2731
|
dialog = inject(MatDialog);
|
|
2704
|
-
entityType;
|
|
2705
2732
|
entityService;
|
|
2706
2733
|
entityEditComponent;
|
|
2707
2734
|
extraData;
|
|
@@ -3041,7 +3068,7 @@ var BaseSignalPageClass = class BaseSignalPageClass {
|
|
|
3041
3068
|
dialogConfig.autoFocus = true;
|
|
3042
3069
|
dialogConfig.width = this.dialogEditWidth;
|
|
3043
3070
|
dialogConfig.data = data;
|
|
3044
|
-
dialogConfig.panelClass = this.
|
|
3071
|
+
dialogConfig.panelClass = this.constructor.name + "-edit-dialog";
|
|
3045
3072
|
return dialog.open(entityComponent, dialogConfig);
|
|
3046
3073
|
}
|
|
3047
3074
|
openDialogRemoveConfirm(removalMessage) {
|