@kuzntsv/uikit 1.0.45 → 1.0.47
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.
|
@@ -2709,7 +2709,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2709
2709
|
var BaseSignalPageClass = class BaseSignalPageClass {
|
|
2710
2710
|
dialog = inject(MatDialog);
|
|
2711
2711
|
entityService;
|
|
2712
|
-
entityType;
|
|
2713
2712
|
entityEditComponent;
|
|
2714
2713
|
extraData;
|
|
2715
2714
|
defaultPageIndex = 0;
|
|
@@ -2869,9 +2868,10 @@ var BaseSignalPageClass = class BaseSignalPageClass {
|
|
|
2869
2868
|
}
|
|
2870
2869
|
newEvent() {
|
|
2871
2870
|
if (this.entityEditComponent) {
|
|
2871
|
+
const defaultEntity = this.schema.parse({});
|
|
2872
2872
|
const data = {
|
|
2873
2873
|
action: Action.Add,
|
|
2874
|
-
entity:
|
|
2874
|
+
entity: defaultEntity
|
|
2875
2875
|
};
|
|
2876
2876
|
if (this.beforeOpenDialogOnNewEvent) this.beforeOpenDialogOnNewEvent(data.entity, data.extraData);
|
|
2877
2877
|
const dialogRef = this.openDialog(this.entityEditComponent, data, this.dialog);
|
|
@@ -3007,7 +3007,7 @@ var BaseSignalPageClass = class BaseSignalPageClass {
|
|
|
3007
3007
|
dialogConfig.autoFocus = true;
|
|
3008
3008
|
dialogConfig.width = this.dialogEditWidth;
|
|
3009
3009
|
dialogConfig.data = data;
|
|
3010
|
-
dialogConfig.panelClass = this.
|
|
3010
|
+
dialogConfig.panelClass = this.constructor.name + "-edit-dialog";
|
|
3011
3011
|
return dialog.open(entityComponent, dialogConfig);
|
|
3012
3012
|
}
|
|
3013
3013
|
openDialogRemoveConfirm(removalMessage) {
|
|
@@ -3086,6 +3086,7 @@ var BaseSignalServiceClass = class BaseSignalServiceClass {
|
|
|
3086
3086
|
return { url: this.baseRoute };
|
|
3087
3087
|
}, {
|
|
3088
3088
|
...this.getHttpContext(),
|
|
3089
|
+
defaultValue: [],
|
|
3089
3090
|
parse: (data) => {
|
|
3090
3091
|
if (!data) return [];
|
|
3091
3092
|
return z.array(this.schema).parse(data);
|
|
@@ -3101,6 +3102,7 @@ var BaseSignalServiceClass = class BaseSignalServiceClass {
|
|
|
3101
3102
|
return { url: `${this.baseRoute}${currentId}` };
|
|
3102
3103
|
}, {
|
|
3103
3104
|
...this.getHttpContext(),
|
|
3105
|
+
defaultValue: null,
|
|
3104
3106
|
parse: (data) => {
|
|
3105
3107
|
if (!data) return null;
|
|
3106
3108
|
return this.schema.parse(data);
|
|
@@ -3113,6 +3115,7 @@ var BaseSignalServiceClass = class BaseSignalServiceClass {
|
|
|
3113
3115
|
return { url: `${this.baseRoute}${this.countRoute}` };
|
|
3114
3116
|
}, {
|
|
3115
3117
|
...this.getHttpContext(),
|
|
3118
|
+
defaultValue: 0,
|
|
3116
3119
|
parse: (data) => z.coerce.number().parse(data)
|
|
3117
3120
|
});
|
|
3118
3121
|
}
|
|
@@ -3130,6 +3133,7 @@ var BaseSignalServiceClass = class BaseSignalServiceClass {
|
|
|
3130
3133
|
};
|
|
3131
3134
|
}, {
|
|
3132
3135
|
...this.getHttpContext(),
|
|
3136
|
+
defaultValue: [],
|
|
3133
3137
|
parse: (data) => {
|
|
3134
3138
|
if (!data) return [];
|
|
3135
3139
|
return z.array(this.schema).parse(data);
|