@masterteam/properties 0.0.30 → 0.0.32

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.
@@ -19,7 +19,7 @@ import { toSignal } from '@angular/core/rxjs-interop';
19
19
  import { Page } from '@masterteam/components/page';
20
20
  import { DynamicForm } from '@masterteam/forms/dynamic-form';
21
21
  import * as i1$1 from '@angular/forms';
22
- import { FormGroup, FormControl, FormArray, Validators, ReactiveFormsModule, NG_VALUE_ACCESSOR, ControlContainer, FormGroupDirective } from '@angular/forms';
22
+ import { FormGroup, FormControl, Validators, FormArray, ReactiveFormsModule, NG_VALUE_ACCESSOR, NG_VALIDATORS, ControlContainer, FormGroupDirective } from '@angular/forms';
23
23
  import * as i2 from 'primeng/skeleton';
24
24
  import { SkeletonModule } from 'primeng/skeleton';
25
25
  import { FormulaBuilder } from '@masterteam/formula-builder';
@@ -262,14 +262,23 @@ let PropertiesState = class PropertiesState extends CrudStateBase {
262
262
  // ============================================================================
263
263
  getAll(ctx, action) {
264
264
  const state = ctx.getState();
265
- const moduleType = state.moduleType ?? undefined;
266
- const moduleId = state.moduleId ?? undefined;
267
- const parentPath = state.parentPath ?? '';
268
- const params = { ...action.params };
269
265
  ctx.patchState({
270
- lastQueryParams: params ?? null,
266
+ lastQueryParams: action.params ?? null,
271
267
  });
272
- const req$ = this.http.get(`${this.baseUrl}${parentPath}/${moduleType}/${moduleId}`, { params });
268
+ // Build contextKey in format "Level:5/Module:10" or "Level:5" or "Module:10"
269
+ const contextParts = [];
270
+ if (state.parentModuleType && state.parentModuleId) {
271
+ contextParts.push(`${state.parentModuleType}:${state.parentModuleId}`);
272
+ }
273
+ if (state.moduleType && state.moduleId) {
274
+ contextParts.push(`${state.moduleType}:${state.moduleId}`);
275
+ }
276
+ const contextKey = contextParts.join('/');
277
+ const params = {
278
+ ...action.params,
279
+ contextKey,
280
+ };
281
+ const req$ = this.http.get(`${this.baseUrl}/catalog`, { params });
273
282
  return handleApiRequest({
274
283
  ctx,
275
284
  key: PropertiesActionKey.GetAll,
@@ -1021,12 +1030,19 @@ class ApiConfiguration {
1021
1030
  validators: [Validators.required],
1022
1031
  }),
1023
1032
  headers: new FormArray([]),
1024
- key: new FormControl(null),
1025
- value: new FormControl(null),
1033
+ key: new FormControl('', {
1034
+ nonNullable: true,
1035
+ validators: [Validators.required],
1036
+ }),
1037
+ value: new FormControl('', {
1038
+ nonNullable: true,
1039
+ validators: [Validators.required],
1040
+ }),
1026
1041
  supportMultiSelect: new FormControl(false, { nonNullable: true }),
1027
1042
  });
1028
1043
  onChange = () => { };
1029
1044
  onTouched = () => { };
1045
+ onValidatorChange = () => { };
1030
1046
  formChanges = toSignal(this.form.valueChanges, {
1031
1047
  initialValue: this.form.getRawValue(),
1032
1048
  });
@@ -1035,6 +1051,7 @@ class ApiConfiguration {
1035
1051
  effect(() => {
1036
1052
  this.formChanges();
1037
1053
  this.emitValue();
1054
+ this.onValidatorChange();
1038
1055
  });
1039
1056
  effect(() => {
1040
1057
  const latestSchema = this.facade.apiSchema();
@@ -1058,8 +1075,8 @@ class ApiConfiguration {
1058
1075
  if (!value) {
1059
1076
  this.form.reset({
1060
1077
  endpoint: '',
1061
- key: null,
1062
- value: null,
1078
+ key: '',
1079
+ value: '',
1063
1080
  supportMultiSelect: false,
1064
1081
  }, { emitEvent: false });
1065
1082
  this.setHeadersFromRecord({});
@@ -1070,8 +1087,8 @@ class ApiConfiguration {
1070
1087
  this.schema.set(value.schema ?? null);
1071
1088
  this.form.patchValue({
1072
1089
  endpoint: value.endpoint ?? '',
1073
- key: value.key ?? null,
1074
- value: value.value ?? null,
1090
+ key: value.key ?? '',
1091
+ value: value.value ?? '',
1075
1092
  supportMultiSelect: !!value.supportMultiSelect,
1076
1093
  }, { emitEvent: false });
1077
1094
  this.setHeadersFromRecord(value.headers ?? {});
@@ -1080,6 +1097,7 @@ class ApiConfiguration {
1080
1097
  finally {
1081
1098
  this.isWriting = false;
1082
1099
  this.emitValue(false);
1100
+ this.onValidatorChange();
1083
1101
  }
1084
1102
  }
1085
1103
  registerOnChange(fn) {
@@ -1088,6 +1106,12 @@ class ApiConfiguration {
1088
1106
  registerOnTouched(fn) {
1089
1107
  this.onTouched = fn;
1090
1108
  }
1109
+ validate(_) {
1110
+ return this.form.valid ? null : { apiConfigurationInvalid: true };
1111
+ }
1112
+ registerOnValidatorChange(fn) {
1113
+ this.onValidatorChange = fn;
1114
+ }
1091
1115
  setDisabledState(isDisabled) {
1092
1116
  if (isDisabled) {
1093
1117
  this.form.disable({ emitEvent: false });
@@ -1123,8 +1147,8 @@ class ApiConfiguration {
1123
1147
  const value = {
1124
1148
  endpoint: this.form.controls.endpoint.value,
1125
1149
  headers,
1126
- key: this.form.controls.key.value ?? undefined,
1127
- value: this.form.controls.value.value ?? undefined,
1150
+ key: this.form.controls.key.value,
1151
+ value: this.form.controls.value.value,
1128
1152
  supportMultiSelect: this.form.controls.supportMultiSelect.value,
1129
1153
  schema: this.schema(),
1130
1154
  };
@@ -1164,7 +1188,12 @@ class ApiConfiguration {
1164
1188
  useExisting: forwardRef(() => ApiConfiguration),
1165
1189
  multi: true,
1166
1190
  },
1167
- ], ngImport: i0, template: "<div [formGroup]=\"form\" class=\"space-y-6\">\r\n <div class=\"space-y-4 rounded-xl bg-content px-6 py-4 shadow-sm\">\r\n <div class=\"grid items-end gap-3 md:grid-cols-[minmax(0,1fr)_auto]\">\r\n <mt-text-field\r\n formControlName=\"endpoint\"\r\n [label]=\"'properties.form.endpoint' | transloco\"\r\n [placeholder]=\"'properties.form.endpointPlaceholder' | transloco\"\r\n />\r\n <div class=\"flex justify-end gap-2\">\r\n <mt-button\r\n type=\"button\"\r\n [text]=\"true\"\r\n icon=\"general.plus\"\r\n [label]=\"'properties.form.addHeader' | transloco\"\r\n (click)=\"addHeader()\"\r\n />\r\n <mt-button\r\n type=\"button\"\r\n [label]=\"'properties.form.testApi' | transloco\"\r\n [loading]=\"isTesting()\"\r\n (click)=\"testApi()\"\r\n />\r\n </div>\r\n </div>\r\n\r\n @if (headers.controls.length) {\r\n <div class=\"space-y-3\">\r\n <div class=\"text-sm font-medium text-surface-500\">\r\n {{ \"properties.form.headers\" | transloco }}\r\n </div>\r\n <div class=\"space-y-3\">\r\n @for (\r\n headerCtrl of headers.controls;\r\n track headerCtrl;\r\n let i = $index\r\n ) {\r\n <div\r\n [formGroup]=\"headerCtrl\"\r\n class=\"grid items-end gap-3 md:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_auto]\"\r\n >\r\n <mt-text-field\r\n formControlName=\"key\"\r\n [label]=\"'properties.form.headerKey' | transloco\"\r\n />\r\n <mt-text-field\r\n formControlName=\"value\"\r\n [label]=\"'properties.form.headerValue' | transloco\"\r\n />\r\n <mt-button\r\n type=\"button\"\r\n [text]=\"true\"\r\n icon=\"general.trash-01\"\r\n (click)=\"removeHeader(i)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n } @else {\r\n <p class=\"text-xs text-surface-400\">\r\n {{ \"properties.form.noHeadersMessage\" | transloco }}\r\n </p>\r\n }\r\n </div>\r\n\r\n <div class=\"space-y-4 rounded-xl bg-content px-6 py-4 shadow-sm\">\r\n @if (hasDetectedSchema()) {\r\n <div class=\"grid gap-4 md:grid-cols-2\">\r\n <mt-select-field\r\n formControlName=\"key\"\r\n [options]=\"apiProperties()\"\r\n [showClear]=\"true\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n [label]=\"'properties.form.keyField' | transloco\"\r\n />\r\n <mt-select-field\r\n formControlName=\"value\"\r\n [options]=\"apiProperties()\"\r\n [showClear]=\"true\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n [label]=\"'properties.form.valueField' | transloco\"\r\n />\r\n </div>\r\n } @else {\r\n <p class=\"text-xs text-surface-400\">\r\n {{ \"properties.form.messageTestApiPrompt\" | transloco }}\r\n </p>\r\n }\r\n\r\n <div class=\"flex items-center justify-between gap-4\">\r\n <mt-toggle-field\r\n formControlName=\"supportMultiSelect\"\r\n [label]=\"'properties.form.labelSupportMultiSelect' | transloco\"\r\n />\r\n @if (isTesting()) {\r\n <span class=\"text-xs text-surface-400\">\r\n {{ \"properties.form.messageTesting\" | transloco }}\r\n </span>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "icon", "iconPosition"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading"], outputs: ["onChange"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "pipe", type: i1.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1191
+ {
1192
+ provide: NG_VALIDATORS,
1193
+ useExisting: forwardRef(() => ApiConfiguration),
1194
+ multi: true,
1195
+ },
1196
+ ], ngImport: i0, template: "<div [formGroup]=\"form\" class=\"space-y-6\">\r\n <div class=\"space-y-4 rounded-xl bg-content px-6 py-4 shadow-sm\">\r\n <div class=\"grid items-end gap-3 md:grid-cols-[minmax(0,1fr)_auto]\">\r\n <mt-text-field\r\n formControlName=\"endpoint\"\r\n [label]=\"'properties.form.endpoint' | transloco\"\r\n [placeholder]=\"'properties.form.endpointPlaceholder' | transloco\"\r\n />\r\n <div class=\"flex justify-end gap-2\">\r\n <mt-button\r\n type=\"button\"\r\n [text]=\"true\"\r\n icon=\"general.plus\"\r\n [label]=\"'properties.form.addHeader' | transloco\"\r\n (click)=\"addHeader()\"\r\n />\r\n <mt-button\r\n type=\"button\"\r\n [label]=\"'properties.form.testApi' | transloco\"\r\n [loading]=\"isTesting()\"\r\n (click)=\"testApi()\"\r\n />\r\n </div>\r\n </div>\r\n\r\n @if (headers.controls.length) {\r\n <div class=\"space-y-3\">\r\n <div class=\"text-sm font-medium text-surface-500\">\r\n {{ \"properties.form.headers\" | transloco }}\r\n </div>\r\n <div class=\"space-y-3\">\r\n @for (\r\n headerCtrl of headers.controls;\r\n track headerCtrl;\r\n let i = $index\r\n ) {\r\n <div\r\n [formGroup]=\"headerCtrl\"\r\n class=\"grid items-end gap-3 md:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_auto]\"\r\n >\r\n <mt-text-field\r\n formControlName=\"key\"\r\n [label]=\"'properties.form.headerKey' | transloco\"\r\n />\r\n <mt-text-field\r\n formControlName=\"value\"\r\n [label]=\"'properties.form.headerValue' | transloco\"\r\n />\r\n <mt-button\r\n type=\"button\"\r\n [text]=\"true\"\r\n icon=\"general.trash-01\"\r\n (click)=\"removeHeader(i)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n } @else {\r\n <p class=\"text-xs text-surface-400\">\r\n {{ \"properties.form.noHeadersMessage\" | transloco }}\r\n </p>\r\n }\r\n </div>\r\n\r\n <div class=\"space-y-4 rounded-xl bg-content px-6 py-4 shadow-sm\">\r\n @if (hasDetectedSchema()) {\r\n <div class=\"grid gap-4 md:grid-cols-2\">\r\n <mt-select-field\r\n formControlName=\"key\"\r\n [options]=\"apiProperties()\"\r\n [showClear]=\"true\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n [label]=\"'properties.form.keyField' | transloco\"\r\n />\r\n <mt-select-field\r\n formControlName=\"value\"\r\n [options]=\"apiProperties()\"\r\n [showClear]=\"true\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n [label]=\"'properties.form.valueField' | transloco\"\r\n />\r\n </div>\r\n } @else {\r\n <p class=\"text-xs text-surface-400\">\r\n {{ \"properties.form.messageTestApiPrompt\" | transloco }}\r\n </p>\r\n }\r\n\r\n <div class=\"flex items-center justify-between gap-4\">\r\n <mt-toggle-field\r\n formControlName=\"supportMultiSelect\"\r\n [label]=\"'properties.form.labelSupportMultiSelect' | transloco\"\r\n />\r\n @if (isTesting()) {\r\n <span class=\"text-xs text-surface-400\">\r\n {{ \"properties.form.messageTesting\" | transloco }}\r\n </span>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "icon", "iconPosition"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "pipe", type: i1.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1168
1197
  }
1169
1198
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ApiConfiguration, decorators: [{
1170
1199
  type: Component,
@@ -1182,6 +1211,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
1182
1211
  useExisting: forwardRef(() => ApiConfiguration),
1183
1212
  multi: true,
1184
1213
  },
1214
+ {
1215
+ provide: NG_VALIDATORS,
1216
+ useExisting: forwardRef(() => ApiConfiguration),
1217
+ multi: true,
1218
+ },
1185
1219
  ], template: "<div [formGroup]=\"form\" class=\"space-y-6\">\r\n <div class=\"space-y-4 rounded-xl bg-content px-6 py-4 shadow-sm\">\r\n <div class=\"grid items-end gap-3 md:grid-cols-[minmax(0,1fr)_auto]\">\r\n <mt-text-field\r\n formControlName=\"endpoint\"\r\n [label]=\"'properties.form.endpoint' | transloco\"\r\n [placeholder]=\"'properties.form.endpointPlaceholder' | transloco\"\r\n />\r\n <div class=\"flex justify-end gap-2\">\r\n <mt-button\r\n type=\"button\"\r\n [text]=\"true\"\r\n icon=\"general.plus\"\r\n [label]=\"'properties.form.addHeader' | transloco\"\r\n (click)=\"addHeader()\"\r\n />\r\n <mt-button\r\n type=\"button\"\r\n [label]=\"'properties.form.testApi' | transloco\"\r\n [loading]=\"isTesting()\"\r\n (click)=\"testApi()\"\r\n />\r\n </div>\r\n </div>\r\n\r\n @if (headers.controls.length) {\r\n <div class=\"space-y-3\">\r\n <div class=\"text-sm font-medium text-surface-500\">\r\n {{ \"properties.form.headers\" | transloco }}\r\n </div>\r\n <div class=\"space-y-3\">\r\n @for (\r\n headerCtrl of headers.controls;\r\n track headerCtrl;\r\n let i = $index\r\n ) {\r\n <div\r\n [formGroup]=\"headerCtrl\"\r\n class=\"grid items-end gap-3 md:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_auto]\"\r\n >\r\n <mt-text-field\r\n formControlName=\"key\"\r\n [label]=\"'properties.form.headerKey' | transloco\"\r\n />\r\n <mt-text-field\r\n formControlName=\"value\"\r\n [label]=\"'properties.form.headerValue' | transloco\"\r\n />\r\n <mt-button\r\n type=\"button\"\r\n [text]=\"true\"\r\n icon=\"general.trash-01\"\r\n (click)=\"removeHeader(i)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n } @else {\r\n <p class=\"text-xs text-surface-400\">\r\n {{ \"properties.form.noHeadersMessage\" | transloco }}\r\n </p>\r\n }\r\n </div>\r\n\r\n <div class=\"space-y-4 rounded-xl bg-content px-6 py-4 shadow-sm\">\r\n @if (hasDetectedSchema()) {\r\n <div class=\"grid gap-4 md:grid-cols-2\">\r\n <mt-select-field\r\n formControlName=\"key\"\r\n [options]=\"apiProperties()\"\r\n [showClear]=\"true\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n [label]=\"'properties.form.keyField' | transloco\"\r\n />\r\n <mt-select-field\r\n formControlName=\"value\"\r\n [options]=\"apiProperties()\"\r\n [showClear]=\"true\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n [label]=\"'properties.form.valueField' | transloco\"\r\n />\r\n </div>\r\n } @else {\r\n <p class=\"text-xs text-surface-400\">\r\n {{ \"properties.form.messageTestApiPrompt\" | transloco }}\r\n </p>\r\n }\r\n\r\n <div class=\"flex items-center justify-between gap-4\">\r\n <mt-toggle-field\r\n formControlName=\"supportMultiSelect\"\r\n [label]=\"'properties.form.labelSupportMultiSelect' | transloco\"\r\n />\r\n @if (isTesting()) {\r\n <span class=\"text-xs text-surface-400\">\r\n {{ \"properties.form.messageTesting\" | transloco }}\r\n </span>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n" }]
1186
1220
  }], ctorParameters: () => [] });
1187
1221
 
@@ -1260,7 +1294,7 @@ class CheckListFormConfiguration {
1260
1294
  this.propertiesFacade.resetConfigProperties();
1261
1295
  }
1262
1296
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: CheckListFormConfiguration, deps: [], target: i0.ɵɵFactoryTarget.Component });
1263
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: CheckListFormConfiguration, isStandalone: true, selector: "mt-check-list-form-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\r\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
1297
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: CheckListFormConfiguration, isStandalone: true, selector: "mt-check-list-form-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\r\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig", "forcedHiddenFieldKeys", "preserveForcedHiddenValues"], outputs: ["runtimeMessagesChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
1264
1298
  { provide: ControlContainer, useExisting: FormGroupDirective },
1265
1299
  ] });
1266
1300
  }
@@ -1271,265 +1305,169 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
1271
1305
  ], template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\r\n" }]
1272
1306
  }], ctorParameters: () => [] });
1273
1307
 
1274
- class DynamicListConfiguration {
1308
+ class EntityListConfiguration {
1275
1309
  propertiesFacade = inject(PropertiesFacade);
1276
1310
  controlContainer = inject(ControlContainer);
1277
1311
  parentGroup = this.controlContainer.control;
1278
1312
  transloco = inject(TranslocoService);
1313
+ previousModuleId = signal(null, ...(ngDevMode ? [{ debugName: "previousModuleId" }] : []));
1314
+ configurationControl = this.parentGroup.get('configuration');
1279
1315
  configScopes = this.propertiesFacade.configScopes;
1280
1316
  configProperties = this.propertiesFacade.configProperties;
1281
1317
  configuration = toSignal(this.parentGroup.valueChanges.pipe(startWith(this.parentGroup.value), map((value) => value?.configuration), distinctUntilChanged()), { initialValue: this.parentGroup.value?.configuration });
1282
- scopeItems = computed(() => {
1318
+ moduleItems = computed(() => {
1283
1319
  const scope = this.configScopes()[0];
1284
1320
  return scope?.items ?? [];
1285
- }, ...(ngDevMode ? [{ debugName: "scopeItems" }] : []));
1321
+ }, ...(ngDevMode ? [{ debugName: "moduleItems" }] : []));
1322
+ accessOptions = [
1323
+ { label: 'Auto', value: 'Auto' },
1324
+ { label: 'Read', value: 'Read' },
1325
+ { label: 'Write', value: 'Write' },
1326
+ { label: 'ReadWrite', value: 'ReadWrite' },
1327
+ { label: 'None', value: 'None' },
1328
+ ];
1329
+ snapshotModeOptions = [
1330
+ { label: 'Snapshot', value: 'Snapshot' },
1331
+ { label: 'Realtime', value: 'Realtime' },
1332
+ ];
1286
1333
  formConfig = linkedSignal(() => ({
1287
1334
  sections: [
1288
1335
  {
1289
1336
  key: 'configuration',
1290
1337
  label: this.transloco.translate('properties.form.configurationSection'),
1291
- cssClass: ' rounded-xl bg-content \
1292
- shadow-sm \
1338
+ cssClass: ' rounded-xl bg-content \
1339
+ shadow-sm \
1293
1340
  px-6 py-4',
1294
1341
  type: 'header',
1295
1342
  bodyClass: 'grid grid-cols-1 md:grid-cols-2 gap-3',
1296
1343
  fields: [
1297
1344
  {
1298
- key: 'scopeId',
1345
+ key: 'moduleId',
1299
1346
  type: 'select',
1300
1347
  label: this.transloco.translate('properties.form.selectScope'),
1301
1348
  optionLabel: 'name',
1302
1349
  optionValue: 'id',
1350
+ options: this.moduleItems(),
1303
1351
  filter: true,
1304
- options: this.scopeItems(),
1305
1352
  },
1306
- new PickListFieldConfig({
1307
- key: 'properties',
1308
- cssClass: 'md:col-span-2',
1309
- options: this.configProperties(),
1310
- optionLabel: 'name.display',
1311
- optionValue: 'key',
1312
- sourceHeader: this.transloco.translate('properties.form.availableProperties'),
1313
- targetHeader: this.transloco.translate('properties.form.selectedProperties'),
1314
- }),
1315
1353
  {
1316
- key: 'mappingBehaviour',
1317
- type: 'toggle',
1318
- label: this.transloco.translate('properties.form.mapToActual'),
1319
- cssClass: 'md:col-span-2',
1354
+ key: 'access',
1355
+ type: 'select',
1356
+ label: 'Access',
1357
+ optionLabel: 'label',
1358
+ optionValue: 'value',
1359
+ options: this.accessOptions,
1320
1360
  },
1321
- ],
1322
- },
1323
- ],
1324
- }), ...(ngDevMode ? [{ debugName: "formConfig" }] : []));
1325
- constructor() {
1326
- effect(() => {
1327
- const scopeId = this.configuration()?.scopeId;
1328
- if (scopeId) {
1329
- const scopeType = this.configScopes()[0]?.scope;
1330
- if (scopeType) {
1331
- this.propertiesFacade.loadPropertiesForConfigType(scopeType, scopeId);
1332
- }
1333
- }
1334
- });
1335
- }
1336
- ngOnDestroy() {
1337
- this.propertiesFacade.resetConfigProperties();
1338
- }
1339
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DynamicListConfiguration, deps: [], target: i0.ɵɵFactoryTarget.Component });
1340
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: DynamicListConfiguration, isStandalone: true, selector: "mt-dynamic-list-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\r\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
1341
- { provide: ControlContainer, useExisting: FormGroupDirective },
1342
- ] });
1343
- }
1344
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DynamicListConfiguration, decorators: [{
1345
- type: Component,
1346
- args: [{ selector: 'mt-dynamic-list-configuration', imports: [DynamicForm, ReactiveFormsModule], viewProviders: [
1347
- { provide: ControlContainer, useExisting: FormGroupDirective },
1348
- ], template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\r\n" }]
1349
- }], ctorParameters: () => [] });
1350
-
1351
- class EditableListViewConfiguration {
1352
- propertiesFacade = inject(PropertiesFacade);
1353
- controlContainer = inject(ControlContainer);
1354
- parentGroup = this.controlContainer.control;
1355
- transloco = inject(TranslocoService);
1356
- configScopes = this.propertiesFacade.configScopes;
1357
- configProperties = this.propertiesFacade.configProperties;
1358
- configuration = toSignal(this.parentGroup.valueChanges.pipe(startWith(this.parentGroup.value), map((value) => value?.configuration), distinctUntilChanged()), { initialValue: this.parentGroup.value?.configuration });
1359
- scopeItems = computed(() => {
1360
- const scope = this.configScopes()[0];
1361
- return scope?.items ?? [];
1362
- }, ...(ngDevMode ? [{ debugName: "scopeItems" }] : []));
1363
- formConfig = linkedSignal(() => ({
1364
- sections: [
1365
- {
1366
- key: 'configuration',
1367
- label: this.transloco.translate('properties.form.configurationSection'),
1368
- cssClass: ' rounded-xl bg-content \
1369
- shadow-sm \
1370
- px-6 py-4',
1371
- type: 'header',
1372
- bodyClass: 'grid grid-cols-1 md:grid-cols-2 gap-3',
1373
- fields: [
1374
1361
  {
1375
- key: 'scopeId',
1362
+ key: 'snapshotMode',
1376
1363
  type: 'select',
1377
- label: this.transloco.translate('properties.form.selectScope'),
1378
- optionLabel: 'name',
1379
- optionValue: 'id',
1380
- options: this.scopeItems(),
1364
+ label: 'Snapshot Mode',
1365
+ optionLabel: 'label',
1366
+ optionValue: 'value',
1367
+ options: this.snapshotModeOptions,
1381
1368
  },
1382
1369
  new PickListFieldConfig({
1383
- key: 'Properties',
1370
+ key: 'readFields',
1384
1371
  cssClass: 'md:col-span-2',
1385
1372
  options: this.configProperties(),
1386
1373
  optionLabel: 'name.display',
1387
1374
  optionValue: 'key',
1388
- sourceHeader: this.transloco.translate('properties.form.availableProperties'),
1389
- targetHeader: this.transloco.translate('properties.form.selectedProperties'),
1375
+ sourceHeader: 'Available Read Fields',
1376
+ targetHeader: 'Selected Read Fields',
1390
1377
  }),
1391
- {
1392
- key: 'isEditable',
1393
- type: 'toggle',
1394
- label: this.transloco.translate('properties.form.isEditable'),
1395
- },
1396
- {
1397
- key: 'preserveValue',
1398
- type: 'toggle',
1399
- label: this.transloco.translate('properties.form.preserveValue'),
1400
- },
1401
- ],
1402
- },
1403
- ],
1404
- }), ...(ngDevMode ? [{ debugName: "formConfig" }] : []));
1405
- constructor() {
1406
- effect(() => {
1407
- const scopeId = this.configuration()?.scopeId;
1408
- if (scopeId) {
1409
- const scopeType = this.configScopes()[0]?.scope;
1410
- if (scopeType) {
1411
- this.propertiesFacade.loadPropertiesForConfigType(scopeType, scopeId);
1412
- }
1413
- }
1414
- });
1415
- }
1416
- ngOnDestroy() {
1417
- this.propertiesFacade.resetConfigProperties();
1418
- }
1419
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: EditableListViewConfiguration, deps: [], target: i0.ɵɵFactoryTarget.Component });
1420
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: EditableListViewConfiguration, isStandalone: true, selector: "mt-editable-list-view-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\r\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
1421
- { provide: ControlContainer, useExisting: FormGroupDirective },
1422
- ] });
1423
- }
1424
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: EditableListViewConfiguration, decorators: [{
1425
- type: Component,
1426
- args: [{ selector: 'mt-editable-list-view-configuration', imports: [DynamicForm, ReactiveFormsModule], viewProviders: [
1427
- { provide: ControlContainer, useExisting: FormGroupDirective },
1428
- ], template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\r\n" }]
1429
- }], ctorParameters: () => [] });
1430
-
1431
- class InternalModuleConfiguration {
1432
- // private readonly workspaceStructureFacade = inject(WorkspaceStructureFacade);
1433
- // = this.workspaceStructureFacade.workspaceNodes;
1434
- levels;
1435
- propertiesFacade = inject(PropertiesFacade);
1436
- cc = inject(ControlContainer);
1437
- transloco = inject(TranslocoService);
1438
- parentGroup = this.cc.control;
1439
- configProperties = this.propertiesFacade.configProperties;
1440
- configScopes = this.propertiesFacade.configScopes;
1441
- configuration = toSignal(this.parentGroup.valueChanges.pipe(startWith(this.parentGroup.value), map((v) => v?.configuration), distinctUntilChanged()), { initialValue: this.parentGroup.value?.configuration });
1442
- PrevModuleId = signal(null, ...(ngDevMode ? [{ debugName: "PrevModuleId" }] : []));
1443
- scopeItems = computed(() => {
1444
- const selectedType = this.configuration()?.type;
1445
- if (!selectedType)
1446
- return [];
1447
- const scope = this.configScopes().find((s) => s.scope === selectedType);
1448
- return scope?.items ?? [];
1449
- }, ...(ngDevMode ? [{ debugName: "scopeItems" }] : []));
1450
- formConfig = linkedSignal(() => ({
1451
- sections: [
1452
- {
1453
- key: 'configuration',
1454
- label: this.transloco.translate('properties.form.configurationSection'),
1455
- cssClass: ' rounded-xl bg-content \
1456
- shadow-sm \
1457
- px-6 py-4',
1458
- type: 'header',
1459
- bodyClass: 'grid grid-cols-1 md:grid-cols-2 gap-3 align-items-end ',
1460
- fields: [
1461
- {
1462
- key: 'type',
1463
- type: 'select',
1464
- label: this.transloco.translate('properties.form.type'),
1465
- optionLabel: 'scope',
1466
- optionValue: 'scope',
1467
- options: this.configScopes(),
1468
- },
1469
- {
1470
- key: 'scopeId',
1471
- type: 'select',
1472
- label: this.transloco.translate('properties.form.selectScope'),
1473
- optionLabel: 'name',
1474
- optionValue: 'id',
1475
- filter: true,
1476
- options: this.scopeItems(),
1477
- },
1478
- {
1479
- type: 'select',
1480
- key: 'property',
1481
- label: this.transloco.translate('properties.form.valueProperty'),
1482
- optionLabel: 'name.display',
1483
- optionValue: 'key',
1484
- options: this.configProperties(),
1485
- },
1486
1378
  new PickListFieldConfig({
1487
- cssClass: 'md:col-span-2 mt-2',
1488
- key: 'propertyDetails',
1379
+ key: 'writeFields',
1380
+ cssClass: 'md:col-span-2',
1489
1381
  options: this.configProperties(),
1490
1382
  optionLabel: 'name.display',
1491
1383
  optionValue: 'key',
1492
- sourceHeader: this.transloco.translate('properties.form.availableProperties'),
1493
- targetHeader: this.transloco.translate('properties.form.selectedProperties'),
1384
+ sourceHeader: 'Available Write Fields',
1385
+ targetHeader: 'Selected Write Fields',
1386
+ relations: [
1387
+ { action: 'show', key: 'access', value: 'Write' },
1388
+ { action: 'show', key: 'access', value: 'ReadWrite' },
1389
+ { action: 'show', key: 'access', value: 'Auto' },
1390
+ ],
1494
1391
  }),
1495
1392
  {
1393
+ key: 'readFilter',
1394
+ type: 'text',
1496
1395
  cssClass: 'md:col-span-2',
1497
- key: 'preserveValue',
1498
- type: 'toggle',
1499
- label: this.transloco.translate('properties.form.labelPreserveValue'),
1396
+ label: 'Read Filter',
1397
+ placeholder: 'status == "completed"',
1500
1398
  },
1501
1399
  ],
1502
1400
  },
1503
1401
  ],
1504
1402
  }), ...(ngDevMode ? [{ debugName: "formConfig" }] : []));
1505
1403
  constructor() {
1404
+ this.applyEntityListDefaults();
1405
+ this.syncLegacyScopeAlias();
1406
+ this.loadModuleProperties();
1407
+ }
1408
+ applyEntityListDefaults() {
1409
+ const config = this.configurationControl.value;
1410
+ if (config)
1411
+ return;
1412
+ this.configurationControl.setValue({
1413
+ moduleId: 0,
1414
+ access: 'Auto',
1415
+ snapshotMode: 'Snapshot',
1416
+ readFields: [],
1417
+ writeFields: [],
1418
+ readFilter: '',
1419
+ }, { emitEvent: true });
1420
+ }
1421
+ syncLegacyScopeAlias() {
1506
1422
  effect(() => {
1507
- if (this.configuration()?.scopeId) {
1508
- const moduleType = this.configuration()?.type;
1509
- const moduleId = this.configuration()?.scopeId;
1510
- if (moduleId == this.PrevModuleId()) {
1511
- return;
1512
- }
1513
- if (moduleType && moduleId) {
1514
- this.PrevModuleId.set(moduleId);
1515
- this.propertiesFacade.loadPropertiesForConfigType(moduleType, moduleId);
1516
- }
1423
+ const config = this.configuration();
1424
+ if (!config || typeof config !== 'object')
1425
+ return;
1426
+ const moduleId = config.moduleId;
1427
+ const scopeId = config.scopeId;
1428
+ if ((moduleId === null || moduleId === undefined || moduleId === '') &&
1429
+ scopeId !== null &&
1430
+ scopeId !== undefined &&
1431
+ scopeId !== '') {
1432
+ this.configurationControl.patchValue({ ...config, moduleId: scopeId }, { emitEvent: true });
1433
+ return;
1434
+ }
1435
+ if (moduleId !== null &&
1436
+ moduleId !== undefined &&
1437
+ moduleId !== '' &&
1438
+ moduleId !== scopeId) {
1439
+ this.configurationControl.patchValue({ ...config, scopeId: moduleId }, { emitEvent: true });
1517
1440
  }
1518
1441
  });
1519
1442
  }
1443
+ loadModuleProperties() {
1444
+ effect(() => {
1445
+ const config = this.configuration();
1446
+ const moduleId = config?.moduleId ?? config?.scopeId;
1447
+ if (!moduleId || moduleId === this.previousModuleId()) {
1448
+ return;
1449
+ }
1450
+ const scopeType = this.configScopes()[0]?.scope;
1451
+ if (!scopeType) {
1452
+ return;
1453
+ }
1454
+ this.previousModuleId.set(moduleId);
1455
+ this.propertiesFacade.loadPropertiesForConfigType(scopeType, moduleId);
1456
+ });
1457
+ }
1520
1458
  ngOnDestroy() {
1521
1459
  this.propertiesFacade.resetConfigProperties();
1522
1460
  }
1523
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: InternalModuleConfiguration, deps: [], target: i0.ɵɵFactoryTarget.Component });
1524
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: InternalModuleConfiguration, isStandalone: true, selector: "mt-internal-module-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\r\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
1461
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: EntityListConfiguration, deps: [], target: i0.ɵɵFactoryTarget.Component });
1462
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: EntityListConfiguration, isStandalone: true, selector: "mt-entity-list-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig", "forcedHiddenFieldKeys", "preserveForcedHiddenValues"], outputs: ["runtimeMessagesChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
1525
1463
  { provide: ControlContainer, useExisting: FormGroupDirective },
1526
1464
  ] });
1527
1465
  }
1528
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: InternalModuleConfiguration, decorators: [{
1466
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: EntityListConfiguration, decorators: [{
1529
1467
  type: Component,
1530
- args: [{ selector: 'mt-internal-module-configuration', imports: [DynamicForm, ReactiveFormsModule], viewProviders: [
1468
+ args: [{ selector: 'mt-entity-list-configuration', imports: [DynamicForm, ReactiveFormsModule], viewProviders: [
1531
1469
  { provide: ControlContainer, useExisting: FormGroupDirective },
1532
- ], template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\r\n" }]
1470
+ ], template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\n" }]
1533
1471
  }], ctorParameters: () => [] });
1534
1472
 
1535
1473
  class LocationConfiguration {
@@ -1568,7 +1506,7 @@ class LocationConfiguration {
1568
1506
  });
1569
1507
  }
1570
1508
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: LocationConfiguration, deps: [], target: i0.ɵɵFactoryTarget.Component });
1571
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: LocationConfiguration, isStandalone: true, selector: "mt-location-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\r\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
1509
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: LocationConfiguration, isStandalone: true, selector: "mt-location-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\r\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig", "forcedHiddenFieldKeys", "preserveForcedHiddenValues"], outputs: ["runtimeMessagesChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
1572
1510
  { provide: ControlContainer, useExisting: FormGroupDirective },
1573
1511
  ] });
1574
1512
  }
@@ -1615,7 +1553,7 @@ class LookupConfiguration {
1615
1553
  });
1616
1554
  }
1617
1555
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: LookupConfiguration, deps: [], target: i0.ɵɵFactoryTarget.Component });
1618
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: LookupConfiguration, isStandalone: true, selector: "mt-lookup-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\r\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
1556
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: LookupConfiguration, isStandalone: true, selector: "mt-lookup-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\r\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig", "forcedHiddenFieldKeys", "preserveForcedHiddenValues"], outputs: ["runtimeMessagesChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
1619
1557
  { provide: ControlContainer, useExisting: FormGroupDirective },
1620
1558
  ] });
1621
1559
  }
@@ -1649,7 +1587,7 @@ class PercentageConfiguration {
1649
1587
  ],
1650
1588
  }, ...(ngDevMode ? [{ debugName: "formConfig" }] : []));
1651
1589
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: PercentageConfiguration, deps: [], target: i0.ɵɵFactoryTarget.Component });
1652
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: PercentageConfiguration, isStandalone: true, selector: "mt-percentage-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\r\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
1590
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: PercentageConfiguration, isStandalone: true, selector: "mt-percentage-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\r\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig", "forcedHiddenFieldKeys", "preserveForcedHiddenValues"], outputs: ["runtimeMessagesChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
1653
1591
  { provide: ControlContainer, useExisting: FormGroupDirective },
1654
1592
  ] });
1655
1593
  }
@@ -1696,7 +1634,7 @@ class UserConfiguration {
1696
1634
  });
1697
1635
  }
1698
1636
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: UserConfiguration, deps: [], target: i0.ɵɵFactoryTarget.Component });
1699
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: UserConfiguration, isStandalone: true, selector: "mt-user-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\r\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
1637
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: UserConfiguration, isStandalone: true, selector: "mt-user-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\r\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig", "forcedHiddenFieldKeys", "preserveForcedHiddenValues"], outputs: ["runtimeMessagesChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
1700
1638
  { provide: ControlContainer, useExisting: FormGroupDirective },
1701
1639
  ] });
1702
1640
  }
@@ -1849,7 +1787,7 @@ class AttachmentConfiguration {
1849
1787
  ],
1850
1788
  }, ...(ngDevMode ? [{ debugName: "formConfig" }] : []));
1851
1789
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: AttachmentConfiguration, deps: [], target: i0.ɵɵFactoryTarget.Component });
1852
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: AttachmentConfiguration, isStandalone: true, selector: "mt-attachment-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\r\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
1790
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: AttachmentConfiguration, isStandalone: true, selector: "mt-attachment-configuration", ngImport: i0, template: "<mt-dynamic-form formControlName=\"configuration\" [formConfig]=\"formConfig()\" />\r\n", styles: [""], dependencies: [{ kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig", "forcedHiddenFieldKeys", "preserveForcedHiddenValues"], outputs: ["runtimeMessagesChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [
1853
1791
  { provide: ControlContainer, useExisting: FormGroupDirective },
1854
1792
  ] });
1855
1793
  }
@@ -1867,6 +1805,11 @@ class PropertyForm {
1867
1805
  transloco = inject(TranslocoService);
1868
1806
  propertyId = input('', ...(ngDevMode ? [{ debugName: "propertyId" }] : []));
1869
1807
  propertyTypes = this.facade.propertyTypes;
1808
+ legacyReplacedViewTypes = [
1809
+ 'DynamicList',
1810
+ 'EditableListView',
1811
+ 'InternalModule',
1812
+ ];
1870
1813
  submitLabel = computed(() => this.propertyId()
1871
1814
  ? this.transloco.translate('properties.form.updateButton')
1872
1815
  : this.transloco.translate('properties.form.createButton'), ...(ngDevMode ? [{ debugName: "submitLabel" }] : []));
@@ -1877,7 +1820,7 @@ class PropertyForm {
1877
1820
  isCalculated: false,
1878
1821
  viewType: null,
1879
1822
  name: { ar: '', en: '' },
1880
- description: '',
1823
+ description: { ar: '', en: '' },
1881
1824
  }),
1882
1825
  configuration: new FormControl(null),
1883
1826
  formula: new FormControl(null),
@@ -1894,6 +1837,10 @@ class PropertyForm {
1894
1837
  initialValue: Boolean(this.mainControl.value?.isCalculated),
1895
1838
  });
1896
1839
  formulaSchemaId = computed(() => this.resolveSchemaId(this.facade.parentModuleId() ?? this.facade.moduleId()), ...(ngDevMode ? [{ debugName: "formulaSchemaId" }] : []));
1840
+ availablePropertyTypes = computed(() => {
1841
+ const allTypes = this.propertyTypes()?.value ?? [];
1842
+ return allTypes.filter((item) => !this.legacyReplacedViewTypes.includes(item?.viewType ?? ''));
1843
+ }, ...(ngDevMode ? [{ debugName: "availablePropertyTypes" }] : []));
1897
1844
  selectedPropertyTypeConfiguration = computed(() => {
1898
1845
  const propertyTypesSetting = this.propertyTypes();
1899
1846
  const selectedViewType = this.propertyType();
@@ -1933,7 +1880,7 @@ class PropertyForm {
1933
1880
  optionLabel: 'label.en',
1934
1881
  optionValue: 'viewType',
1935
1882
  cssClass: 'w-1/2',
1936
- options: this.propertyTypes()?.value,
1883
+ options: this.availablePropertyTypes(),
1937
1884
  disabled: this.isEditing(),
1938
1885
  filter: true,
1939
1886
  hasPlaceholderPrefix: false,
@@ -2018,10 +1965,14 @@ class PropertyForm {
2018
1965
  validators: [new ValidatorConfig({ type: 'required' })],
2019
1966
  },
2020
1967
  {
2021
- key: 'description',
2022
- label: this.transloco.translate('properties.form.description'),
1968
+ key: 'description.en',
1969
+ label: this.transloco.translate('properties.form.englishDescription'),
1970
+ type: 'textarea',
1971
+ },
1972
+ {
1973
+ key: 'description.ar',
1974
+ label: this.transloco.translate('properties.form.arabicDescription'),
2023
1975
  type: 'textarea',
2024
- cssClass: 'md:col-span-2',
2025
1976
  },
2026
1977
  // {
2027
1978
  // key: 'defaultValue',
@@ -2063,14 +2014,12 @@ class PropertyForm {
2063
2014
  // Reset config scopes before loading new ones
2064
2015
  this.facade.resetConfigScopes();
2065
2016
  // Load config scopes for specific property types
2066
- const supportedTypes = [
2067
- 'InternalModule',
2068
- 'DynamicList',
2069
- 'EditableListView',
2070
- 'LookupLog',
2071
- ];
2017
+ const supportedTypes = ['EntityList', 'LookupModuleCheckList'];
2072
2018
  if (supportedTypes.includes(currentPropertyType)) {
2073
- this.facade.loadConfigAsType(currentPropertyType);
2019
+ const configScopeType = currentPropertyType === 'LookupModuleCheckList'
2020
+ ? 'LookupLog'
2021
+ : currentPropertyType;
2022
+ this.facade.loadConfigAsType(configScopeType);
2074
2023
  }
2075
2024
  });
2076
2025
  effect(() => {
@@ -2219,7 +2168,7 @@ class PropertyForm {
2219
2168
  this.destroyConfigurationComponent();
2220
2169
  }
2221
2170
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: PropertyForm, deps: [], target: i0.ɵɵFactoryTarget.Component });
2222
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: PropertyForm, isStandalone: true, selector: "mt-property-form", inputs: { propertyId: { classPropertyName: "propertyId", publicName: "propertyId", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "configurationHost", first: true, predicate: ["configurationHost"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<mt-page\r\n [title]=\"\r\n propertyId()\r\n ? ('properties.form.editProperty' | transloco)\r\n : ('properties.form.createNewProperty' | transloco)\r\n \"\r\n avatarIcon=\"custom.products-and-services\"\r\n [avatarStyle]=\"{\r\n '--p-avatar-background': 'var(--p-sky-50)',\r\n '--p-avatar-color': 'var(--p-sky-700)',\r\n }\"\r\n (backButtonClick)=\"goBack()\"\r\n backButton\r\n class=\"h-full\"\r\n>\r\n <ng-template #headerEnd>\r\n <mt-button\r\n class=\"mx-2\"\r\n [label]=\"submitLabel()\"\r\n [icon]=\"isEditing() ? 'custom.pencil' : 'general.plus'\"\r\n [loading]=\"submitting()\"\r\n [disabled]=\"submitDisabled() || this.propertyForm.invalid\"\r\n (click)=\"createOrEditProperty()\"\r\n />\r\n </ng-template>\r\n <div\r\n [formGroup]=\"propertyForm\"\r\n class=\"h-full py-4 h-full overflow-y-auto flex justify-center\"\r\n >\r\n <div class=\"w-2/3 flex flex-col gap-6\">\r\n @if (loading()) {\r\n <!-- Skeleton Loading State -->\r\n <div class=\"rounded-xl bg-white shadow-sm p-6 space-y-4\">\r\n <div class=\"flex justify-between items-center gap-6\">\r\n <p-skeleton width=\"50%\" height=\"3rem\"></p-skeleton>\r\n <p-skeleton width=\"8rem\" height=\"2.5rem\"></p-skeleton>\r\n </div>\r\n </div>\r\n\r\n <div class=\"rounded-xl bg-white shadow-sm p-6 space-y-4\">\r\n <p-skeleton\r\n width=\"12rem\"\r\n height=\"1.5rem\"\r\n styleClass=\"mb-4\"\r\n ></p-skeleton>\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\r\n <p-skeleton height=\"3rem\"></p-skeleton>\r\n <p-skeleton height=\"3rem\"></p-skeleton>\r\n <p-skeleton height=\"6rem\" styleClass=\"md:col-span-2\"></p-skeleton>\r\n <p-skeleton height=\"3rem\" styleClass=\"md:col-span-2\"></p-skeleton>\r\n </div>\r\n </div>\r\n\r\n <div class=\"rounded-xl bg-white shadow-sm p-6 space-y-4\">\r\n <p-skeleton\r\n width=\"10rem\"\r\n height=\"1.5rem\"\r\n styleClass=\"mb-4\"\r\n ></p-skeleton>\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\r\n <p-skeleton height=\"3rem\"></p-skeleton>\r\n <p-skeleton height=\"3rem\"></p-skeleton>\r\n <p-skeleton height=\"8rem\" styleClass=\"md:col-span-2\"></p-skeleton>\r\n </div>\r\n </div>\r\n } @else {\r\n <mt-dynamic-form\r\n [formConfig]=\"dynamicFormConfigMain()\"\r\n [formControlName]=\"'main'\"\r\n />\r\n @if (configurationFormConfig()) {\r\n <mt-dynamic-form\r\n formControlName=\"configuration\"\r\n [formConfig]=\"configurationFormConfig()!\"\r\n />\r\n } @else {\r\n <ng-container #configurationHost></ng-container>\r\n @if (!configurationComponentExists()) {\r\n @switch (propertyType()) {\r\n @case (\"User\") {\r\n <mt-user-configuration />\r\n }\r\n @case (\"Percentage\") {\r\n <mt-percentage-configuration />\r\n }\r\n @case (\"Lookup\") {\r\n <mt-lookup-configuration />\r\n }\r\n @case (\"LookupMultiSelect\") {\r\n <mt-lookup-configuration />\r\n }\r\n @case (\"InternalModule\") {\r\n <mt-internal-module-configuration />\r\n }\r\n @case (\"DynamicList\") {\r\n <mt-dynamic-list-configuration />\r\n }\r\n @case (\"API\") {\r\n <mt-api-configuration formControlName=\"configuration\" />\r\n }\r\n <!-- @case('ViewList') { REMOVED FOR NOW\r\n <mt-view-list-configuration />\r\n } -->\r\n @case (\"Attachment\") {\r\n <mt-attachment-configuration />\r\n }\r\n <!-- @case('ReferenceProperty') { REMOVED FOR NOW\r\n } -->\r\n @case (\"EditableListView\") {\r\n <mt-editable-list-view-configuration />\r\n }\r\n @case (\"LookupLog\") {\r\n <mt-check-list-form-configuration />\r\n }\r\n <!-- @case('LookupMatrix') { REMOVED FOR NOW\r\n <mt-lookup-configuration />\r\n } -->\r\n @case (\"Location\") {\r\n <mt-location-configuration />\r\n }\r\n }\r\n }\r\n }\r\n @if (isCalculated()) {\r\n <mt-card title=\"Formula\">\r\n <mt-formula-builder\r\n formControlName=\"formula\"\r\n [levelSchemaId]=\"formulaSchemaId()\"\r\n />\r\n </mt-card>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</mt-page>\r\n", styles: [""], dependencies: [{ kind: "component", type: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: FormulaBuilder, selector: "mt-formula-builder", inputs: ["propertiesByPath", "levelSchemaId", "templateId", "placeholder", "hideToolbar", "hideStatusBar"], outputs: ["validationChange", "tokensChange"] }, { kind: "component", type: ApiConfiguration, selector: "mt-api-configuration" }, { kind: "component", type: CheckListFormConfiguration, selector: "mt-check-list-form-configuration" }, { kind: "component", type: DynamicListConfiguration, selector: "mt-dynamic-list-configuration" }, { kind: "component", type: EditableListViewConfiguration, selector: "mt-editable-list-view-configuration" }, { kind: "component", type: InternalModuleConfiguration, selector: "mt-internal-module-configuration" }, { kind: "component", type: LocationConfiguration, selector: "mt-location-configuration" }, { kind: "component", type: LookupConfiguration, selector: "mt-lookup-configuration" }, { kind: "component", type: PercentageConfiguration, selector: "mt-percentage-configuration" }, { kind: "component", type: UserConfiguration, selector: "mt-user-configuration" }, { kind: "component", type: AttachmentConfiguration, selector: "mt-attachment-configuration" }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i2.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "pipe", type: i1.TranslocoPipe, name: "transloco" }] });
2171
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: PropertyForm, isStandalone: true, selector: "mt-property-form", inputs: { propertyId: { classPropertyName: "propertyId", publicName: "propertyId", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "configurationHost", first: true, predicate: ["configurationHost"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<mt-page\r\n [title]=\"\r\n propertyId()\r\n ? ('properties.form.editProperty' | transloco)\r\n : ('properties.form.createNewProperty' | transloco)\r\n \"\r\n avatarIcon=\"custom.products-and-services\"\r\n [avatarStyle]=\"{\r\n '--p-avatar-background': 'var(--p-sky-50)',\r\n '--p-avatar-color': 'var(--p-sky-700)',\r\n }\"\r\n (backButtonClick)=\"goBack()\"\r\n backButton\r\n class=\"h-full\"\r\n>\r\n <ng-template #headerEnd>\r\n <mt-button\r\n class=\"mx-2\"\r\n [label]=\"submitLabel()\"\r\n [icon]=\"isEditing() ? 'custom.pencil' : 'general.plus'\"\r\n [loading]=\"submitting()\"\r\n [disabled]=\"submitDisabled() || this.propertyForm.invalid\"\r\n (click)=\"createOrEditProperty()\"\r\n />\r\n </ng-template>\r\n <div\r\n [formGroup]=\"propertyForm\"\r\n class=\"h-full py-4 h-full overflow-y-auto flex justify-center\"\r\n >\r\n <div class=\"w-2/3 flex flex-col gap-6\">\r\n @if (loading()) {\r\n <!-- Skeleton Loading State -->\r\n <div class=\"rounded-xl bg-white shadow-sm p-6 space-y-4\">\r\n <div class=\"flex justify-between items-center gap-6\">\r\n <p-skeleton width=\"50%\" height=\"3rem\"></p-skeleton>\r\n <p-skeleton width=\"8rem\" height=\"2.5rem\"></p-skeleton>\r\n </div>\r\n </div>\r\n\r\n <div class=\"rounded-xl bg-white shadow-sm p-6 space-y-4\">\r\n <p-skeleton\r\n width=\"12rem\"\r\n height=\"1.5rem\"\r\n styleClass=\"mb-4\"\r\n ></p-skeleton>\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\r\n <p-skeleton height=\"3rem\"></p-skeleton>\r\n <p-skeleton height=\"3rem\"></p-skeleton>\r\n <p-skeleton height=\"6rem\" styleClass=\"md:col-span-2\"></p-skeleton>\r\n <p-skeleton height=\"3rem\" styleClass=\"md:col-span-2\"></p-skeleton>\r\n </div>\r\n </div>\r\n\r\n <div class=\"rounded-xl bg-white shadow-sm p-6 space-y-4\">\r\n <p-skeleton\r\n width=\"10rem\"\r\n height=\"1.5rem\"\r\n styleClass=\"mb-4\"\r\n ></p-skeleton>\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\r\n <p-skeleton height=\"3rem\"></p-skeleton>\r\n <p-skeleton height=\"3rem\"></p-skeleton>\r\n <p-skeleton height=\"8rem\" styleClass=\"md:col-span-2\"></p-skeleton>\r\n </div>\r\n </div>\r\n } @else {\r\n <mt-dynamic-form\r\n [formConfig]=\"dynamicFormConfigMain()\"\r\n [formControlName]=\"'main'\"\r\n />\r\n @if (configurationFormConfig()) {\r\n <mt-dynamic-form\r\n formControlName=\"configuration\"\r\n [formConfig]=\"configurationFormConfig()!\"\r\n />\r\n } @else {\r\n <ng-container #configurationHost></ng-container>\r\n @if (!configurationComponentExists()) {\r\n @switch (propertyType()) {\r\n @case (\"User\") {\r\n <mt-user-configuration />\r\n }\r\n @case (\"Percentage\") {\r\n <mt-percentage-configuration />\r\n }\r\n @case (\"Lookup\") {\r\n <mt-lookup-configuration />\r\n }\r\n @case (\"LookupMultiSelect\") {\n <mt-lookup-configuration />\n }\n @case (\"EntityList\") {\n <mt-entity-list-configuration />\n }\n @case (\"API\") {\n <mt-api-configuration formControlName=\"configuration\" />\n }\n <!-- @case('ViewList') { REMOVED FOR NOW\r\n <mt-view-list-configuration />\r\n } -->\r\n @case (\"Attachment\") {\r\n <mt-attachment-configuration />\r\n }\r\n <!-- @case('ReferenceProperty') { REMOVED FOR NOW\r\n } -->\r\n @case (\"LookupModuleCheckList\") {\n <mt-check-list-form-configuration />\n }\n <!-- @case('LookupMatrix') { REMOVED FOR NOW\r\n <mt-lookup-configuration />\r\n } -->\r\n @case (\"Location\") {\r\n <mt-location-configuration />\r\n }\r\n }\r\n }\r\n }\r\n @if (isCalculated()) {\r\n <mt-card title=\"Formula\">\r\n <mt-formula-builder\r\n formControlName=\"formula\"\r\n [levelSchemaId]=\"formulaSchemaId()\"\r\n />\r\n </mt-card>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</mt-page>\r\n", styles: [""], dependencies: [{ kind: "component", type: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig", "forcedHiddenFieldKeys", "preserveForcedHiddenValues"], outputs: ["runtimeMessagesChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: FormulaBuilder, selector: "mt-formula-builder", inputs: ["propertiesByPath", "levelSchemaId", "templateId", "placeholder", "hideToolbar", "hideStatusBar"], outputs: ["validationChange", "tokensChange"] }, { kind: "component", type: ApiConfiguration, selector: "mt-api-configuration" }, { kind: "component", type: CheckListFormConfiguration, selector: "mt-check-list-form-configuration" }, { kind: "component", type: EntityListConfiguration, selector: "mt-entity-list-configuration" }, { kind: "component", type: LocationConfiguration, selector: "mt-location-configuration" }, { kind: "component", type: LookupConfiguration, selector: "mt-lookup-configuration" }, { kind: "component", type: PercentageConfiguration, selector: "mt-percentage-configuration" }, { kind: "component", type: UserConfiguration, selector: "mt-user-configuration" }, { kind: "component", type: AttachmentConfiguration, selector: "mt-attachment-configuration" }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i2.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "pipe", type: i1.TranslocoPipe, name: "transloco" }] });
2223
2172
  }
2224
2173
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: PropertyForm, decorators: [{
2225
2174
  type: Component,
@@ -2232,9 +2181,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
2232
2181
  FormulaBuilder,
2233
2182
  ApiConfiguration,
2234
2183
  CheckListFormConfiguration,
2235
- DynamicListConfiguration,
2236
- EditableListViewConfiguration,
2237
- InternalModuleConfiguration,
2184
+ EntityListConfiguration,
2238
2185
  LocationConfiguration,
2239
2186
  LookupConfiguration,
2240
2187
  PercentageConfiguration,
@@ -2242,7 +2189,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
2242
2189
  AttachmentConfiguration,
2243
2190
  SkeletonModule,
2244
2191
  TranslocoModule,
2245
- ], template: "<mt-page\r\n [title]=\"\r\n propertyId()\r\n ? ('properties.form.editProperty' | transloco)\r\n : ('properties.form.createNewProperty' | transloco)\r\n \"\r\n avatarIcon=\"custom.products-and-services\"\r\n [avatarStyle]=\"{\r\n '--p-avatar-background': 'var(--p-sky-50)',\r\n '--p-avatar-color': 'var(--p-sky-700)',\r\n }\"\r\n (backButtonClick)=\"goBack()\"\r\n backButton\r\n class=\"h-full\"\r\n>\r\n <ng-template #headerEnd>\r\n <mt-button\r\n class=\"mx-2\"\r\n [label]=\"submitLabel()\"\r\n [icon]=\"isEditing() ? 'custom.pencil' : 'general.plus'\"\r\n [loading]=\"submitting()\"\r\n [disabled]=\"submitDisabled() || this.propertyForm.invalid\"\r\n (click)=\"createOrEditProperty()\"\r\n />\r\n </ng-template>\r\n <div\r\n [formGroup]=\"propertyForm\"\r\n class=\"h-full py-4 h-full overflow-y-auto flex justify-center\"\r\n >\r\n <div class=\"w-2/3 flex flex-col gap-6\">\r\n @if (loading()) {\r\n <!-- Skeleton Loading State -->\r\n <div class=\"rounded-xl bg-white shadow-sm p-6 space-y-4\">\r\n <div class=\"flex justify-between items-center gap-6\">\r\n <p-skeleton width=\"50%\" height=\"3rem\"></p-skeleton>\r\n <p-skeleton width=\"8rem\" height=\"2.5rem\"></p-skeleton>\r\n </div>\r\n </div>\r\n\r\n <div class=\"rounded-xl bg-white shadow-sm p-6 space-y-4\">\r\n <p-skeleton\r\n width=\"12rem\"\r\n height=\"1.5rem\"\r\n styleClass=\"mb-4\"\r\n ></p-skeleton>\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\r\n <p-skeleton height=\"3rem\"></p-skeleton>\r\n <p-skeleton height=\"3rem\"></p-skeleton>\r\n <p-skeleton height=\"6rem\" styleClass=\"md:col-span-2\"></p-skeleton>\r\n <p-skeleton height=\"3rem\" styleClass=\"md:col-span-2\"></p-skeleton>\r\n </div>\r\n </div>\r\n\r\n <div class=\"rounded-xl bg-white shadow-sm p-6 space-y-4\">\r\n <p-skeleton\r\n width=\"10rem\"\r\n height=\"1.5rem\"\r\n styleClass=\"mb-4\"\r\n ></p-skeleton>\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\r\n <p-skeleton height=\"3rem\"></p-skeleton>\r\n <p-skeleton height=\"3rem\"></p-skeleton>\r\n <p-skeleton height=\"8rem\" styleClass=\"md:col-span-2\"></p-skeleton>\r\n </div>\r\n </div>\r\n } @else {\r\n <mt-dynamic-form\r\n [formConfig]=\"dynamicFormConfigMain()\"\r\n [formControlName]=\"'main'\"\r\n />\r\n @if (configurationFormConfig()) {\r\n <mt-dynamic-form\r\n formControlName=\"configuration\"\r\n [formConfig]=\"configurationFormConfig()!\"\r\n />\r\n } @else {\r\n <ng-container #configurationHost></ng-container>\r\n @if (!configurationComponentExists()) {\r\n @switch (propertyType()) {\r\n @case (\"User\") {\r\n <mt-user-configuration />\r\n }\r\n @case (\"Percentage\") {\r\n <mt-percentage-configuration />\r\n }\r\n @case (\"Lookup\") {\r\n <mt-lookup-configuration />\r\n }\r\n @case (\"LookupMultiSelect\") {\r\n <mt-lookup-configuration />\r\n }\r\n @case (\"InternalModule\") {\r\n <mt-internal-module-configuration />\r\n }\r\n @case (\"DynamicList\") {\r\n <mt-dynamic-list-configuration />\r\n }\r\n @case (\"API\") {\r\n <mt-api-configuration formControlName=\"configuration\" />\r\n }\r\n <!-- @case('ViewList') { REMOVED FOR NOW\r\n <mt-view-list-configuration />\r\n } -->\r\n @case (\"Attachment\") {\r\n <mt-attachment-configuration />\r\n }\r\n <!-- @case('ReferenceProperty') { REMOVED FOR NOW\r\n } -->\r\n @case (\"EditableListView\") {\r\n <mt-editable-list-view-configuration />\r\n }\r\n @case (\"LookupLog\") {\r\n <mt-check-list-form-configuration />\r\n }\r\n <!-- @case('LookupMatrix') { REMOVED FOR NOW\r\n <mt-lookup-configuration />\r\n } -->\r\n @case (\"Location\") {\r\n <mt-location-configuration />\r\n }\r\n }\r\n }\r\n }\r\n @if (isCalculated()) {\r\n <mt-card title=\"Formula\">\r\n <mt-formula-builder\r\n formControlName=\"formula\"\r\n [levelSchemaId]=\"formulaSchemaId()\"\r\n />\r\n </mt-card>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</mt-page>\r\n" }]
2192
+ ], template: "<mt-page\r\n [title]=\"\r\n propertyId()\r\n ? ('properties.form.editProperty' | transloco)\r\n : ('properties.form.createNewProperty' | transloco)\r\n \"\r\n avatarIcon=\"custom.products-and-services\"\r\n [avatarStyle]=\"{\r\n '--p-avatar-background': 'var(--p-sky-50)',\r\n '--p-avatar-color': 'var(--p-sky-700)',\r\n }\"\r\n (backButtonClick)=\"goBack()\"\r\n backButton\r\n class=\"h-full\"\r\n>\r\n <ng-template #headerEnd>\r\n <mt-button\r\n class=\"mx-2\"\r\n [label]=\"submitLabel()\"\r\n [icon]=\"isEditing() ? 'custom.pencil' : 'general.plus'\"\r\n [loading]=\"submitting()\"\r\n [disabled]=\"submitDisabled() || this.propertyForm.invalid\"\r\n (click)=\"createOrEditProperty()\"\r\n />\r\n </ng-template>\r\n <div\r\n [formGroup]=\"propertyForm\"\r\n class=\"h-full py-4 h-full overflow-y-auto flex justify-center\"\r\n >\r\n <div class=\"w-2/3 flex flex-col gap-6\">\r\n @if (loading()) {\r\n <!-- Skeleton Loading State -->\r\n <div class=\"rounded-xl bg-white shadow-sm p-6 space-y-4\">\r\n <div class=\"flex justify-between items-center gap-6\">\r\n <p-skeleton width=\"50%\" height=\"3rem\"></p-skeleton>\r\n <p-skeleton width=\"8rem\" height=\"2.5rem\"></p-skeleton>\r\n </div>\r\n </div>\r\n\r\n <div class=\"rounded-xl bg-white shadow-sm p-6 space-y-4\">\r\n <p-skeleton\r\n width=\"12rem\"\r\n height=\"1.5rem\"\r\n styleClass=\"mb-4\"\r\n ></p-skeleton>\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\r\n <p-skeleton height=\"3rem\"></p-skeleton>\r\n <p-skeleton height=\"3rem\"></p-skeleton>\r\n <p-skeleton height=\"6rem\" styleClass=\"md:col-span-2\"></p-skeleton>\r\n <p-skeleton height=\"3rem\" styleClass=\"md:col-span-2\"></p-skeleton>\r\n </div>\r\n </div>\r\n\r\n <div class=\"rounded-xl bg-white shadow-sm p-6 space-y-4\">\r\n <p-skeleton\r\n width=\"10rem\"\r\n height=\"1.5rem\"\r\n styleClass=\"mb-4\"\r\n ></p-skeleton>\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\r\n <p-skeleton height=\"3rem\"></p-skeleton>\r\n <p-skeleton height=\"3rem\"></p-skeleton>\r\n <p-skeleton height=\"8rem\" styleClass=\"md:col-span-2\"></p-skeleton>\r\n </div>\r\n </div>\r\n } @else {\r\n <mt-dynamic-form\r\n [formConfig]=\"dynamicFormConfigMain()\"\r\n [formControlName]=\"'main'\"\r\n />\r\n @if (configurationFormConfig()) {\r\n <mt-dynamic-form\r\n formControlName=\"configuration\"\r\n [formConfig]=\"configurationFormConfig()!\"\r\n />\r\n } @else {\r\n <ng-container #configurationHost></ng-container>\r\n @if (!configurationComponentExists()) {\r\n @switch (propertyType()) {\r\n @case (\"User\") {\r\n <mt-user-configuration />\r\n }\r\n @case (\"Percentage\") {\r\n <mt-percentage-configuration />\r\n }\r\n @case (\"Lookup\") {\r\n <mt-lookup-configuration />\r\n }\r\n @case (\"LookupMultiSelect\") {\n <mt-lookup-configuration />\n }\n @case (\"EntityList\") {\n <mt-entity-list-configuration />\n }\n @case (\"API\") {\n <mt-api-configuration formControlName=\"configuration\" />\n }\n <!-- @case('ViewList') { REMOVED FOR NOW\r\n <mt-view-list-configuration />\r\n } -->\r\n @case (\"Attachment\") {\r\n <mt-attachment-configuration />\r\n }\r\n <!-- @case('ReferenceProperty') { REMOVED FOR NOW\r\n } -->\r\n @case (\"LookupModuleCheckList\") {\n <mt-check-list-form-configuration />\n }\n <!-- @case('LookupMatrix') { REMOVED FOR NOW\r\n <mt-lookup-configuration />\r\n } -->\r\n @case (\"Location\") {\r\n <mt-location-configuration />\r\n }\r\n }\r\n }\r\n }\r\n @if (isCalculated()) {\r\n <mt-card title=\"Formula\">\r\n <mt-formula-builder\r\n formControlName=\"formula\"\r\n [levelSchemaId]=\"formulaSchemaId()\"\r\n />\r\n </mt-card>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</mt-page>\r\n" }]
2246
2193
  }], ctorParameters: () => [], propDecorators: { propertyId: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertyId", required: false }] }], configurationHost: [{
2247
2194
  type: ViewChild,
2248
2195
  args: ['configurationHost', { read: ViewContainerRef }]