@masterteam/customization 0.0.15 → 0.0.16

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.
@@ -8,7 +8,7 @@ import { TextField } from '@masterteam/components/text-field';
8
8
  import { ToggleField } from '@masterteam/components/toggle-field';
9
9
  import { Button } from '@masterteam/components/button';
10
10
  import { Tabs } from '@masterteam/components/tabs';
11
- import { EntitiesManage } from '@masterteam/components/entities';
11
+ import { buildDisplayEntities, isLeafDetailsSyntheticKey, LEAF_DETAILS_KEY_SEPARATOR, EntitiesManage } from '@masterteam/components/entities';
12
12
  import { ModalService } from '@masterteam/components/modal';
13
13
  import { Icon } from '@masterteam/icons';
14
14
  import { Skeleton } from 'primeng/skeleton';
@@ -25,6 +25,7 @@ const BORDER_VIEW_TYPES = [
25
25
  'Currency',
26
26
  'Date',
27
27
  'DateTime',
28
+ 'LeafDetails',
28
29
  ];
29
30
  /** ViewTypes that support user-specific toggles */
30
31
  const USER_VIEW_TYPES = ['User'];
@@ -38,6 +39,7 @@ const EDITABLE_VIEW_TYPES = [
38
39
  'Currency',
39
40
  'Date',
40
41
  'DateTime',
42
+ 'LeafDetails',
41
43
  'Percentage',
42
44
  'Status',
43
45
  'Checkbox',
@@ -211,30 +213,23 @@ let CustomizationState = class CustomizationState extends CrudStateBase {
211
213
  bulkReplaceConfigurations(ctx, action) {
212
214
  const state = ctx.getState();
213
215
  const contextKey = this.buildContextKey(state);
216
+ const previousConfigurations = state.configurations;
217
+ const nextConfigurations = this.toDisplayConfigurations(contextKey, action.items);
214
218
  const req$ = this.http.put(`${this.displayConfigUrl}/bulk-replace`, {
215
219
  contextKey,
216
220
  items: action.items,
217
221
  });
222
+ ctx.patchState({
223
+ configurations: nextConfigurations,
224
+ });
218
225
  return handleApiRequest({
219
226
  ctx,
220
227
  key: CustomizationActionKey.BulkReplaceConfigurations,
221
228
  request$: req$,
222
- onSuccess: () => {
223
- // Rebuild configurations from the items payload
224
- const newConfigs = [];
225
- for (const item of action.items) {
226
- for (const da of item.displayAreas) {
227
- newConfigs.push({
228
- contextKey,
229
- areaKey: da.areaKey,
230
- propertyKey: item.propertyKey,
231
- order: da.order,
232
- configuration: da.configuration,
233
- });
234
- }
235
- }
236
- return { configurations: newConfigs };
237
- },
229
+ onSuccess: () => undefined,
230
+ onError: () => ({
231
+ configurations: previousConfigurations,
232
+ }),
238
233
  });
239
234
  }
240
235
  // ============================================================================
@@ -250,6 +245,21 @@ let CustomizationState = class CustomizationState extends CrudStateBase {
250
245
  }
251
246
  return contextParts.join('/');
252
247
  }
248
+ toDisplayConfigurations(contextKey, items) {
249
+ const configurations = [];
250
+ for (const item of items) {
251
+ for (const displayArea of item.displayAreas) {
252
+ configurations.push({
253
+ contextKey,
254
+ areaKey: displayArea.areaKey,
255
+ propertyKey: item.propertyKey,
256
+ order: displayArea.order,
257
+ configuration: displayArea.configuration,
258
+ });
259
+ }
260
+ }
261
+ return configurations;
262
+ }
253
263
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CustomizationState, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
254
264
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CustomizationState });
255
265
  };
@@ -402,6 +412,7 @@ class PropertyConfigDrawer {
402
412
  // ─── Computed visibility flags ───
403
413
  isBorderViewType = computed(() => BORDER_VIEW_TYPES.includes(this.viewType()), ...(ngDevMode ? [{ debugName: "isBorderViewType" }] : /* istanbul ignore next */ []));
404
414
  isUserViewType = computed(() => USER_VIEW_TYPES.includes(this.viewType()), ...(ngDevMode ? [{ debugName: "isUserViewType" }] : /* istanbul ignore next */ []));
415
+ isLeafDetailsViewType = computed(() => this.viewType() === 'LeafDetails', ...(ngDevMode ? [{ debugName: "isLeafDetailsViewType" }] : /* istanbul ignore next */ []));
405
416
  /** True when the document direction is RTL */
406
417
  isRtl = signal(this.doc.documentElement.getAttribute('dir') === 'rtl', ...(ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []));
407
418
  /** Align-end icon: right in LTR, left in RTL */
@@ -425,19 +436,27 @@ class PropertyConfigDrawer {
425
436
  .configurations()
426
437
  .find((c) => c.propertyKey === this.propertyKey() && c.areaKey === this.areaKey());
427
438
  const existingSize = existingConfig?.configuration?.['size'];
439
+ const existingLeafLevels = existingConfig?.configuration?.['leafLevels'];
428
440
  const configuration = {};
429
441
  // Carry over size so drag-resize value is not lost
430
442
  if (existingSize != null) {
431
443
  configuration['size'] = existingSize;
432
444
  }
433
- // Keep both keys for backward compatibility while the shared entities
434
- // layer now prefers hideLabel.
435
- configuration['hideName'] = this.hideNameControl.value ?? false;
436
- configuration['hideLabel'] = this.hideNameControl.value ?? false;
445
+ if (existingLeafLevels != null) {
446
+ configuration['leafLevels'] = existingLeafLevels;
447
+ }
448
+ if (!this.isLeafDetailsViewType()) {
449
+ // Keep both keys for backward compatibility while the shared entities
450
+ // layer now prefers hideLabel.
451
+ configuration['hideName'] = this.hideNameControl.value ?? false;
452
+ configuration['hideLabel'] = this.hideNameControl.value ?? false;
453
+ }
437
454
  configuration['labelPosition'] = this.labelOnTopControl.value
438
455
  ? 'top'
439
456
  : 'bottom';
440
- configuration['alignEnd'] = this.alignEndControl.value ?? false;
457
+ if (!this.isLeafDetailsViewType()) {
458
+ configuration['alignEnd'] = this.alignEndControl.value ?? false;
459
+ }
441
460
  if (this.isBorderViewType()) {
442
461
  configuration['showBorder'] = this.showBorderControl.value ?? false;
443
462
  }
@@ -487,23 +506,25 @@ class PropertyConfigDrawer {
487
506
  this.ref.close(null);
488
507
  }
489
508
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PropertyConfigDrawer, deps: [], target: i0.ɵɵFactoryTarget.Component });
490
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: PropertyConfigDrawer, isStandalone: true, selector: "mt-property-config-drawer", inputs: { propertyKey: { classPropertyName: "propertyKey", publicName: "propertyKey", isSignal: true, isRequired: false, transformFunction: null }, propertyName: { classPropertyName: "propertyName", publicName: "propertyName", isSignal: true, isRequired: false, transformFunction: null }, viewType: { classPropertyName: "viewType", publicName: "viewType", isSignal: true, isRequired: false, transformFunction: null }, areaKey: { classPropertyName: "areaKey", publicName: "areaKey", isSignal: true, isRequired: false, transformFunction: null }, currentOrder: { classPropertyName: "currentOrder", publicName: "currentOrder", isSignal: true, isRequired: false, transformFunction: null }, initialConfig: { classPropertyName: "initialConfig", publicName: "initialConfig", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'customization'\">\r\n <div [class]=\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\">\r\n <div class=\"mt-2 h-full overflow-y-auto pb-10 flex flex-col gap-5\">\r\n <!-- Hide Name Toggle (all entity types) -->\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('hide-name')\"\r\n icon=\"general.eye-off\"\r\n [formControl]=\"hideNameControl\"\r\n ></mt-toggle-field>\r\n\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('label-on-top')\"\r\n icon=\"layout.align-right-02\"\r\n [formControl]=\"labelOnTopControl\"\r\n ></mt-toggle-field>\r\n\r\n <!-- Align End Toggle (all entity types) -->\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('align-end')\"\r\n [icon]=\"alignEndIcon()\"\r\n [formControl]=\"alignEndControl\"\r\n ></mt-toggle-field>\r\n\r\n <!-- Show Border Toggle (Text, Currency, Date, DateTime) -->\r\n @if (isBorderViewType()) {\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('show-border')\"\r\n icon=\"layout.layout-grid-01\"\r\n [formControl]=\"showBorderControl\"\r\n ></mt-toggle-field>\r\n }\r\n\r\n <!-- User-specific Toggles -->\r\n @if (isUserViewType()) {\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('show-display-name')\"\r\n icon=\"user.user-circle\"\r\n [formControl]=\"showDisplayNameControl\"\r\n ></mt-toggle-field>\r\n\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('show-phone-number')\"\r\n icon=\"communication.phone\"\r\n [formControl]=\"showPhoneNumberControl\"\r\n ></mt-toggle-field>\r\n\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('show-email')\"\r\n icon=\"communication.mail-01\"\r\n [formControl]=\"showEmailControl\"\r\n ></mt-toggle-field>\r\n }\r\n </div>\r\n </div>\r\n\r\n <div [class]=\"modalService.footerClass\">\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n severity=\"secondary\"\r\n [disabled]=\"submitting()\"\r\n (onClick)=\"onCancel()\"\r\n ></mt-button>\r\n <mt-button\r\n [label]=\"t('save')\"\r\n severity=\"primary\"\r\n [loading]=\"submitting()\"\r\n (onClick)=\"onSave()\"\r\n ></mt-button>\r\n </div>\r\n</ng-container>\r\n", dependencies: [{ kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { 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: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }] });
509
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: PropertyConfigDrawer, isStandalone: true, selector: "mt-property-config-drawer", inputs: { propertyKey: { classPropertyName: "propertyKey", publicName: "propertyKey", isSignal: true, isRequired: false, transformFunction: null }, propertyName: { classPropertyName: "propertyName", publicName: "propertyName", isSignal: true, isRequired: false, transformFunction: null }, viewType: { classPropertyName: "viewType", publicName: "viewType", isSignal: true, isRequired: false, transformFunction: null }, areaKey: { classPropertyName: "areaKey", publicName: "areaKey", isSignal: true, isRequired: false, transformFunction: null }, currentOrder: { classPropertyName: "currentOrder", publicName: "currentOrder", isSignal: true, isRequired: false, transformFunction: null }, initialConfig: { classPropertyName: "initialConfig", publicName: "initialConfig", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'customization'\">\r\n <div [class]=\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\">\r\n <div class=\"mt-2 h-full overflow-y-auto pb-10 flex flex-col gap-5\">\r\n @if (!isLeafDetailsViewType()) {\r\n <!-- Hide Name Toggle -->\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('hide-name')\"\r\n icon=\"general.eye-off\"\r\n [formControl]=\"hideNameControl\"\r\n ></mt-toggle-field>\r\n }\r\n\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('label-on-top')\"\r\n icon=\"layout.align-right-02\"\r\n [formControl]=\"labelOnTopControl\"\r\n ></mt-toggle-field>\r\n\r\n @if (!isLeafDetailsViewType()) {\r\n <!-- Align End Toggle -->\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('align-end')\"\r\n [icon]=\"alignEndIcon()\"\r\n [formControl]=\"alignEndControl\"\r\n ></mt-toggle-field>\r\n }\r\n\r\n <!-- Show Border Toggle (Text, Currency, Date, DateTime) -->\r\n @if (isBorderViewType()) {\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('show-border')\"\r\n icon=\"layout.layout-grid-01\"\r\n [formControl]=\"showBorderControl\"\r\n ></mt-toggle-field>\r\n }\r\n\r\n <!-- User-specific Toggles -->\r\n @if (isUserViewType()) {\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('show-display-name')\"\r\n icon=\"user.user-circle\"\r\n [formControl]=\"showDisplayNameControl\"\r\n ></mt-toggle-field>\r\n\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('show-phone-number')\"\r\n icon=\"communication.phone\"\r\n [formControl]=\"showPhoneNumberControl\"\r\n ></mt-toggle-field>\r\n\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('show-email')\"\r\n icon=\"communication.mail-01\"\r\n [formControl]=\"showEmailControl\"\r\n ></mt-toggle-field>\r\n }\r\n </div>\r\n </div>\r\n\r\n <div [class]=\"modalService.footerClass\">\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n severity=\"secondary\"\r\n [disabled]=\"submitting()\"\r\n (onClick)=\"onCancel()\"\r\n ></mt-button>\r\n <mt-button\r\n [label]=\"t('save')\"\r\n severity=\"primary\"\r\n [loading]=\"submitting()\"\r\n (onClick)=\"onSave()\"\r\n ></mt-button>\r\n </div>\r\n</ng-container>\r\n", dependencies: [{ kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { 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: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }] });
491
510
  }
492
511
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PropertyConfigDrawer, decorators: [{
493
512
  type: Component,
494
- args: [{ selector: 'mt-property-config-drawer', standalone: true, imports: [TranslocoDirective, ReactiveFormsModule, Button, ToggleField], template: "<ng-container *transloco=\"let t; prefix: 'customization'\">\r\n <div [class]=\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\">\r\n <div class=\"mt-2 h-full overflow-y-auto pb-10 flex flex-col gap-5\">\r\n <!-- Hide Name Toggle (all entity types) -->\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('hide-name')\"\r\n icon=\"general.eye-off\"\r\n [formControl]=\"hideNameControl\"\r\n ></mt-toggle-field>\r\n\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('label-on-top')\"\r\n icon=\"layout.align-right-02\"\r\n [formControl]=\"labelOnTopControl\"\r\n ></mt-toggle-field>\r\n\r\n <!-- Align End Toggle (all entity types) -->\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('align-end')\"\r\n [icon]=\"alignEndIcon()\"\r\n [formControl]=\"alignEndControl\"\r\n ></mt-toggle-field>\r\n\r\n <!-- Show Border Toggle (Text, Currency, Date, DateTime) -->\r\n @if (isBorderViewType()) {\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('show-border')\"\r\n icon=\"layout.layout-grid-01\"\r\n [formControl]=\"showBorderControl\"\r\n ></mt-toggle-field>\r\n }\r\n\r\n <!-- User-specific Toggles -->\r\n @if (isUserViewType()) {\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('show-display-name')\"\r\n icon=\"user.user-circle\"\r\n [formControl]=\"showDisplayNameControl\"\r\n ></mt-toggle-field>\r\n\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('show-phone-number')\"\r\n icon=\"communication.phone\"\r\n [formControl]=\"showPhoneNumberControl\"\r\n ></mt-toggle-field>\r\n\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('show-email')\"\r\n icon=\"communication.mail-01\"\r\n [formControl]=\"showEmailControl\"\r\n ></mt-toggle-field>\r\n }\r\n </div>\r\n </div>\r\n\r\n <div [class]=\"modalService.footerClass\">\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n severity=\"secondary\"\r\n [disabled]=\"submitting()\"\r\n (onClick)=\"onCancel()\"\r\n ></mt-button>\r\n <mt-button\r\n [label]=\"t('save')\"\r\n severity=\"primary\"\r\n [loading]=\"submitting()\"\r\n (onClick)=\"onSave()\"\r\n ></mt-button>\r\n </div>\r\n</ng-container>\r\n" }]
513
+ args: [{ selector: 'mt-property-config-drawer', standalone: true, imports: [TranslocoDirective, ReactiveFormsModule, Button, ToggleField], template: "<ng-container *transloco=\"let t; prefix: 'customization'\">\r\n <div [class]=\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\">\r\n <div class=\"mt-2 h-full overflow-y-auto pb-10 flex flex-col gap-5\">\r\n @if (!isLeafDetailsViewType()) {\r\n <!-- Hide Name Toggle -->\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('hide-name')\"\r\n icon=\"general.eye-off\"\r\n [formControl]=\"hideNameControl\"\r\n ></mt-toggle-field>\r\n }\r\n\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('label-on-top')\"\r\n icon=\"layout.align-right-02\"\r\n [formControl]=\"labelOnTopControl\"\r\n ></mt-toggle-field>\r\n\r\n @if (!isLeafDetailsViewType()) {\r\n <!-- Align End Toggle -->\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('align-end')\"\r\n [icon]=\"alignEndIcon()\"\r\n [formControl]=\"alignEndControl\"\r\n ></mt-toggle-field>\r\n }\r\n\r\n <!-- Show Border Toggle (Text, Currency, Date, DateTime) -->\r\n @if (isBorderViewType()) {\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('show-border')\"\r\n icon=\"layout.layout-grid-01\"\r\n [formControl]=\"showBorderControl\"\r\n ></mt-toggle-field>\r\n }\r\n\r\n <!-- User-specific Toggles -->\r\n @if (isUserViewType()) {\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('show-display-name')\"\r\n icon=\"user.user-circle\"\r\n [formControl]=\"showDisplayNameControl\"\r\n ></mt-toggle-field>\r\n\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('show-phone-number')\"\r\n icon=\"communication.phone\"\r\n [formControl]=\"showPhoneNumberControl\"\r\n ></mt-toggle-field>\r\n\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('show-email')\"\r\n icon=\"communication.mail-01\"\r\n [formControl]=\"showEmailControl\"\r\n ></mt-toggle-field>\r\n }\r\n </div>\r\n </div>\r\n\r\n <div [class]=\"modalService.footerClass\">\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n severity=\"secondary\"\r\n [disabled]=\"submitting()\"\r\n (onClick)=\"onCancel()\"\r\n ></mt-button>\r\n <mt-button\r\n [label]=\"t('save')\"\r\n severity=\"primary\"\r\n [loading]=\"submitting()\"\r\n (onClick)=\"onSave()\"\r\n ></mt-button>\r\n </div>\r\n</ng-container>\r\n" }]
495
514
  }], ctorParameters: () => [], propDecorators: { propertyKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertyKey", required: false }] }], propertyName: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertyName", required: false }] }], viewType: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewType", required: false }] }], areaKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "areaKey", required: false }] }], currentOrder: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentOrder", required: false }] }], initialConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialConfig", required: false }] }] } });
496
515
 
497
516
  class LeafDetailsSelector {
498
517
  property = input.required(...(ngDevMode ? [{ debugName: "property" }] : /* istanbul ignore next */ []));
499
518
  leafLevels = input({}, ...(ngDevMode ? [{ debugName: "leafLevels" }] : /* istanbul ignore next */ []));
519
+ showEditAction = input(false, ...(ngDevMode ? [{ debugName: "showEditAction" }] : /* istanbul ignore next */ []));
500
520
  configChange = output();
521
+ editRequested = output();
501
522
  levels = computed(() => this.property().configuration ?? [], ...(ngDevMode ? [{ debugName: "levels" }] : /* istanbul ignore next */ []));
502
523
  isLevelEnabled(levelId) {
503
524
  return this.leafLevels()[String(levelId)] != null;
504
525
  }
505
526
  isStatusSelected(levelId, statusKey) {
506
- return this.leafLevels()[String(levelId)]?.selectedStatuses.includes(statusKey) ?? false;
527
+ return (this.leafLevels()[String(levelId)]?.selectedStatuses.includes(statusKey) ?? false);
507
528
  }
508
529
  /** Section toggle — show or hide the entire level in the preview */
509
530
  toggleLevel(levelId, enabled) {
@@ -535,16 +556,17 @@ class LeafDetailsSelector {
535
556
  };
536
557
  this.configChange.emit(current);
537
558
  }
559
+ onEditClick() {
560
+ this.editRequested.emit();
561
+ }
538
562
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LeafDetailsSelector, deps: [], target: i0.ɵɵFactoryTarget.Component });
539
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: LeafDetailsSelector, isStandalone: true, selector: "mt-leaf-details-selector", inputs: { property: { classPropertyName: "property", publicName: "property", isSignal: true, isRequired: true, transformFunction: null }, leafLevels: { classPropertyName: "leafLevels", publicName: "leafLevels", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { configChange: "configChange" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'customization'\">\n <div class=\"space-y-2 pt-1\">\n\n <p class=\"text-sm font-semibold text-color px-1\">\n {{ t('leaf-details-target-statuses') }}\n </p>\n\n @for (level of levels(); track $index) {\n <div class=\"rounded-lg border border-surface-200 overflow-hidden\">\n\n <!-- Level header: icon + name | section toggle (show/hide this level) -->\n <div class=\"flex items-center gap-2 px-3 py-2.5\">\n <mt-icon [name]=\"level.levelIcon\" size=\"xs\" class=\"text-color-secondary shrink-0\" />\n <span class=\"flex-1 text-sm font-medium truncate\">{{ level.levelName }}</span>\n <mt-toggle-field\n [ngModel]=\"isLevelEnabled(level.levelId)\"\n (ngModelChange)=\"toggleLevel(level.levelId, $event)\"\n size=\"small\"\n class=\"shrink-0\"\n />\n </div>\n\n <!-- Status rows: each toggle shows/hides that status badge in the preview -->\n @if (isLevelEnabled(level.levelId)) {\n <div class=\"border-t border-surface-200 divide-y divide-surface-100\">\n @for (status of level.statuses; track $index) {\n <div class=\"flex items-center gap-2.5 px-3 py-2\">\n <span\n class=\"w-2.5 h-2.5 rounded-full shrink-0 border border-black/10\"\n [style.background-color]=\"status.color ?? '#9CA3AF'\"\n ></span>\n <span class=\"text-sm flex-1 truncate\">{{ status.display }}</span>\n <mt-toggle-field\n [ngModel]=\"isStatusSelected(level.levelId, status.key)\"\n (ngModelChange)=\"toggleStatus(level.levelId, status.key)\"\n size=\"small\"\n class=\"shrink-0\"\n />\n </div>\n }\n </div>\n }\n\n </div>\n }\n </div>\n</ng-container>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }] });
563
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: LeafDetailsSelector, isStandalone: true, selector: "mt-leaf-details-selector", inputs: { property: { classPropertyName: "property", publicName: "property", isSignal: true, isRequired: true, transformFunction: null }, leafLevels: { classPropertyName: "leafLevels", publicName: "leafLevels", isSignal: true, isRequired: false, transformFunction: null }, showEditAction: { classPropertyName: "showEditAction", publicName: "showEditAction", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { configChange: "configChange", editRequested: "editRequested" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'customization'\">\r\n <div class=\"space-y-2 pt-1\">\r\n <div class=\"flex items-center gap-1 px-1\">\r\n <p class=\"text-sm font-semibold text-color\">\r\n {{ t(\"leaf-details-target-statuses\") }}\r\n </p>\r\n @if (showEditAction()) {\r\n <mt-button\r\n icon=\"editor.pencil-01\"\r\n variant=\"text\"\r\n severity=\"primary\"\r\n (onClick)=\"onEditClick()\"\r\n />\r\n }\r\n </div>\r\n\r\n @for (level of levels(); track $index) {\r\n <div class=\"rounded-lg border border-surface-200 overflow-hidden\">\r\n <!-- Level header: icon + name | section toggle (show/hide this level) -->\r\n <div class=\"flex items-center gap-2 px-3 py-2.5\">\r\n <mt-icon\r\n [icon]=\"level.levelIcon\"\r\n size=\"xs\"\r\n class=\"text-color-secondary shrink-0\"\r\n />\r\n <span class=\"flex-1 text-sm font-medium truncate\">{{\r\n level.levelName\r\n }}</span>\r\n <mt-toggle-field\r\n [ngModel]=\"isLevelEnabled(level.levelId)\"\r\n (ngModelChange)=\"toggleLevel(level.levelId, $event)\"\r\n size=\"small\"\r\n class=\"shrink-0\"\r\n />\r\n </div>\r\n\r\n <!-- Status rows: each toggle shows/hides that status badge in the preview -->\r\n @if (isLevelEnabled(level.levelId)) {\r\n <div class=\"border-t border-surface-200 divide-y divide-surface-100\">\r\n @for (status of level.statuses; track $index) {\r\n <div class=\"flex items-center gap-2.5 px-3 py-2\">\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full shrink-0 border border-black/10\"\r\n [style.background-color]=\"status.color ?? '#9CA3AF'\"\r\n ></span>\r\n <span class=\"text-sm flex-1 truncate\">{{\r\n status.display\r\n }}</span>\r\n <mt-toggle-field\r\n [ngModel]=\"isStatusSelected(level.levelId, status.key)\"\r\n (ngModelChange)=\"toggleStatus(level.levelId, status.key)\"\r\n size=\"small\"\r\n class=\"shrink-0\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</ng-container>\r\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "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"] }] });
540
564
  }
541
565
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LeafDetailsSelector, decorators: [{
542
566
  type: Component,
543
- args: [{ selector: 'mt-leaf-details-selector', standalone: true, imports: [FormsModule, TranslocoDirective, Icon, ToggleField], template: "<ng-container *transloco=\"let t; prefix: 'customization'\">\n <div class=\"space-y-2 pt-1\">\n\n <p class=\"text-sm font-semibold text-color px-1\">\n {{ t('leaf-details-target-statuses') }}\n </p>\n\n @for (level of levels(); track $index) {\n <div class=\"rounded-lg border border-surface-200 overflow-hidden\">\n\n <!-- Level header: icon + name | section toggle (show/hide this level) -->\n <div class=\"flex items-center gap-2 px-3 py-2.5\">\n <mt-icon [name]=\"level.levelIcon\" size=\"xs\" class=\"text-color-secondary shrink-0\" />\n <span class=\"flex-1 text-sm font-medium truncate\">{{ level.levelName }}</span>\n <mt-toggle-field\n [ngModel]=\"isLevelEnabled(level.levelId)\"\n (ngModelChange)=\"toggleLevel(level.levelId, $event)\"\n size=\"small\"\n class=\"shrink-0\"\n />\n </div>\n\n <!-- Status rows: each toggle shows/hides that status badge in the preview -->\n @if (isLevelEnabled(level.levelId)) {\n <div class=\"border-t border-surface-200 divide-y divide-surface-100\">\n @for (status of level.statuses; track $index) {\n <div class=\"flex items-center gap-2.5 px-3 py-2\">\n <span\n class=\"w-2.5 h-2.5 rounded-full shrink-0 border border-black/10\"\n [style.background-color]=\"status.color ?? '#9CA3AF'\"\n ></span>\n <span class=\"text-sm flex-1 truncate\">{{ status.display }}</span>\n <mt-toggle-field\n [ngModel]=\"isStatusSelected(level.levelId, status.key)\"\n (ngModelChange)=\"toggleStatus(level.levelId, status.key)\"\n size=\"small\"\n class=\"shrink-0\"\n />\n </div>\n }\n </div>\n }\n\n </div>\n }\n </div>\n</ng-container>\n" }]
544
- }], propDecorators: { property: [{ type: i0.Input, args: [{ isSignal: true, alias: "property", required: true }] }], leafLevels: [{ type: i0.Input, args: [{ isSignal: true, alias: "leafLevels", required: false }] }], configChange: [{ type: i0.Output, args: ["configChange"] }] } });
567
+ args: [{ selector: 'mt-leaf-details-selector', standalone: true, imports: [FormsModule, TranslocoDirective, Icon, ToggleField, Button], template: "<ng-container *transloco=\"let t; prefix: 'customization'\">\r\n <div class=\"space-y-2 pt-1\">\r\n <div class=\"flex items-center gap-1 px-1\">\r\n <p class=\"text-sm font-semibold text-color\">\r\n {{ t(\"leaf-details-target-statuses\") }}\r\n </p>\r\n @if (showEditAction()) {\r\n <mt-button\r\n icon=\"editor.pencil-01\"\r\n variant=\"text\"\r\n severity=\"primary\"\r\n (onClick)=\"onEditClick()\"\r\n />\r\n }\r\n </div>\r\n\r\n @for (level of levels(); track $index) {\r\n <div class=\"rounded-lg border border-surface-200 overflow-hidden\">\r\n <!-- Level header: icon + name | section toggle (show/hide this level) -->\r\n <div class=\"flex items-center gap-2 px-3 py-2.5\">\r\n <mt-icon\r\n [icon]=\"level.levelIcon\"\r\n size=\"xs\"\r\n class=\"text-color-secondary shrink-0\"\r\n />\r\n <span class=\"flex-1 text-sm font-medium truncate\">{{\r\n level.levelName\r\n }}</span>\r\n <mt-toggle-field\r\n [ngModel]=\"isLevelEnabled(level.levelId)\"\r\n (ngModelChange)=\"toggleLevel(level.levelId, $event)\"\r\n size=\"small\"\r\n class=\"shrink-0\"\r\n />\r\n </div>\r\n\r\n <!-- Status rows: each toggle shows/hides that status badge in the preview -->\r\n @if (isLevelEnabled(level.levelId)) {\r\n <div class=\"border-t border-surface-200 divide-y divide-surface-100\">\r\n @for (status of level.statuses; track $index) {\r\n <div class=\"flex items-center gap-2.5 px-3 py-2\">\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full shrink-0 border border-black/10\"\r\n [style.background-color]=\"status.color ?? '#9CA3AF'\"\r\n ></span>\r\n <span class=\"text-sm flex-1 truncate\">{{\r\n status.display\r\n }}</span>\r\n <mt-toggle-field\r\n [ngModel]=\"isStatusSelected(level.levelId, status.key)\"\r\n (ngModelChange)=\"toggleStatus(level.levelId, status.key)\"\r\n size=\"small\"\r\n class=\"shrink-0\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</ng-container>\r\n" }]
568
+ }], propDecorators: { property: [{ type: i0.Input, args: [{ isSignal: true, alias: "property", required: true }] }], leafLevels: [{ type: i0.Input, args: [{ isSignal: true, alias: "leafLevels", required: false }] }], showEditAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "showEditAction", required: false }] }], configChange: [{ type: i0.Output, args: ["configChange"] }], editRequested: [{ type: i0.Output, args: ["editRequested"] }] } });
545
569
 
546
- /** Separator used to build synthetic entity keys for LeafDetails sub-entities */
547
- const LEAF_DETAILS_SEP = '::leaflevel::';
548
570
  class Customization {
549
571
  facade = inject(CustomizationFacade);
550
572
  modalService = inject(ModalService);
@@ -612,7 +634,9 @@ class Customization {
612
634
  if (config.areaKey !== area)
613
635
  continue;
614
636
  const leafLevels = config.configuration?.['leafLevels'];
615
- if (leafLevels && typeof leafLevels === 'object' && !Array.isArray(leafLevels)) {
637
+ if (leafLevels &&
638
+ typeof leafLevels === 'object' &&
639
+ !Array.isArray(leafLevels)) {
616
640
  result[config.propertyKey] = leafLevels;
617
641
  }
618
642
  }
@@ -638,19 +662,7 @@ class Customization {
638
662
  return;
639
663
  }
640
664
  const areaConfigs = configs.filter((c) => c.areaKey === area);
641
- const all = areaConfigs.flatMap((config) => this.buildEntitiesFromConfig(config, props));
642
- // Regular entities come first, LeafDetails always last.
643
- // Orders are reassigned sequentially so EntitiesManage's internal sort stays consistent.
644
- const regular = all
645
- .filter((e) => !e.key?.includes(LEAF_DETAILS_SEP))
646
- .sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
647
- const leafEntities = all
648
- .filter((e) => e.key?.includes(LEAF_DETAILS_SEP))
649
- .sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
650
- const entities = [
651
- ...regular.map((e, i) => ({ ...e, order: i + 1 })),
652
- ...leafEntities.map((e, i) => ({ ...e, order: regular.length + i + 1 })),
653
- ];
665
+ const entities = buildDisplayEntities(areaConfigs.flatMap((config) => this.buildEntitiesFromConfig(config, props)));
654
666
  this.previewEntities.set(entities);
655
667
  });
656
668
  }
@@ -682,18 +694,19 @@ class Customization {
682
694
  }
683
695
  onEntityClicked(entity) {
684
696
  // LeafDetails sub-entities are configured inline — not via drawer
685
- if (entity.key?.includes(LEAF_DETAILS_SEP))
686
- return;
687
697
  const area = this.activeArea();
688
698
  if (!area || !entity.key)
689
699
  return;
690
- if (!this.editableViewTypes.has(entity.viewType))
691
- return;
692
- const prop = this.properties().find((p) => p.key === entity.key);
700
+ const propertyKey = isLeafDetailsSyntheticKey(entity.key)
701
+ ? entity.key.split(LEAF_DETAILS_KEY_SEPARATOR)[0]
702
+ : entity.key;
703
+ const prop = this.properties().find((p) => p.key === propertyKey);
693
704
  if (!prop)
694
705
  return;
706
+ if (!this.editableViewTypes.has(prop.viewType))
707
+ return;
695
708
  const configs = this.validConfigurations();
696
- const existingConfig = configs.find((c) => c.areaKey === area && c.propertyKey === entity.key);
709
+ const existingConfig = configs.find((c) => c.areaKey === area && c.propertyKey === propertyKey);
697
710
  this.openDrawer(prop, {
698
711
  currentOrder: existingConfig?.order,
699
712
  configuration: existingConfig?.configuration,
@@ -705,8 +718,8 @@ class Customization {
705
718
  return;
706
719
  const configs = this.validConfigurations();
707
720
  // ── LeafDetails sub-entity resize ──
708
- if (event.entity.key?.includes(LEAF_DETAILS_SEP)) {
709
- const [propKey, levelId] = event.entity.key.split(LEAF_DETAILS_SEP);
721
+ if (isLeafDetailsSyntheticKey(event.entity.key)) {
722
+ const [propKey, levelId] = event.entity.key.split(LEAF_DETAILS_KEY_SEPARATOR);
710
723
  const existingConfig = configs.find((c) => c.areaKey === area && c.propertyKey === propKey);
711
724
  const leafLevels = {
712
725
  ...(existingConfig?.configuration?.['leafLevels'] ?? {}),
@@ -717,14 +730,18 @@ class Customization {
717
730
  const updatedConfigs = configs.map((c) => c.areaKey === area && c.propertyKey === propKey
718
731
  ? { ...c, configuration: { ...c.configuration, leafLevels } }
719
732
  : c);
720
- this.facade.bulkReplaceConfigurations(this.groupConfigsByProperty(updatedConfigs)).subscribe();
733
+ this.facade
734
+ .bulkReplaceConfigurations(this.groupConfigsByProperty(updatedConfigs))
735
+ .subscribe();
721
736
  return;
722
737
  }
723
738
  // ── Regular entity resize ──
724
739
  const updatedConfigs = configs.map((c) => c.areaKey === area && c.propertyKey === event.entity.key
725
740
  ? { ...c, configuration: { ...c.configuration, size: event.newSize } }
726
741
  : c);
727
- this.facade.bulkReplaceConfigurations(this.groupConfigsByProperty(updatedConfigs)).subscribe();
742
+ this.facade
743
+ .bulkReplaceConfigurations(this.groupConfigsByProperty(updatedConfigs))
744
+ .subscribe();
728
745
  }
729
746
  onEntitiesReordered(entities) {
730
747
  const area = this.activeArea();
@@ -732,8 +749,8 @@ class Customization {
732
749
  return;
733
750
  const configs = this.validConfigurations();
734
751
  // Separate regular entities from LeafDetails sub-entities
735
- const regularEntities = entities.filter((e) => !e.key?.includes(LEAF_DETAILS_SEP));
736
- const leafEntities = entities.filter((e) => e.key?.includes(LEAF_DETAILS_SEP));
752
+ const regularEntities = entities.filter((e) => !isLeafDetailsSyntheticKey(e.key));
753
+ const leafEntities = entities.filter((e) => isLeafDetailsSyntheticKey(e.key));
737
754
  // Regular entities → BulkReplaceItems
738
755
  const regularItems = regularEntities.map((entity) => {
739
756
  const existingConfig = configs.find((c) => c.areaKey === area && c.propertyKey === entity.key);
@@ -751,7 +768,7 @@ class Customization {
751
768
  // Leaf entities → group by parent propertyKey, update per-level order
752
769
  const leafByProp = new Map();
753
770
  for (const entity of leafEntities) {
754
- const [propKey, levelId] = entity.key.split(LEAF_DETAILS_SEP);
771
+ const [propKey, levelId] = entity.key.split(LEAF_DETAILS_KEY_SEPARATOR);
755
772
  if (!leafByProp.has(propKey))
756
773
  leafByProp.set(propKey, []);
757
774
  leafByProp.get(propKey).push({ levelId, order: entity.order });
@@ -796,7 +813,8 @@ class Customization {
796
813
  const configs = this.validConfigurations();
797
814
  const existingConfig = configs.find((c) => c.areaKey === area && c.propertyKey === prop.key);
798
815
  // Ensure every level has an order assigned
799
- let nextOrder = configs.filter((c) => c.areaKey === area && c.propertyKey !== prop.key).length + 1;
816
+ let nextOrder = configs.filter((c) => c.areaKey === area && c.propertyKey !== prop.key)
817
+ .length + 1;
800
818
  const normalizedLevels = {};
801
819
  for (const [levelId, levelCfg] of Object.entries(leafLevels)) {
802
820
  normalizedLevels[levelId] = levelCfg.order
@@ -817,11 +835,16 @@ class Customization {
817
835
  {
818
836
  areaKey: area,
819
837
  order: existingConfig?.order ?? minOrder,
820
- configuration: { leafLevels: normalizedLevels },
838
+ configuration: {
839
+ ...existingConfig?.configuration,
840
+ leafLevels: normalizedLevels,
841
+ },
821
842
  },
822
843
  ],
823
844
  };
824
- this.facade.bulkReplaceConfigurations(this.mergeItems([newItem], otherItems)).subscribe();
845
+ this.facade
846
+ .bulkReplaceConfigurations(this.mergeItems([newItem], otherItems))
847
+ .subscribe();
825
848
  }
826
849
  // ── Private helpers ──
827
850
  /**
@@ -838,39 +861,38 @@ class Customization {
838
861
  const entity = this.buildEntityFromConfig(config, props);
839
862
  return entity ? [entity] : [];
840
863
  }
841
- /** Builds one EntityData per enabled level from a LeafDetails display config. */
864
+ /** Builds the shared LeafDetails entity that preview/manage will expand. */
842
865
  buildLeafDetailsEntities(config, prop) {
843
866
  const levels = prop.configuration ?? [];
844
867
  const leafLevels = config.configuration?.['leafLevels'];
845
868
  if (!leafLevels)
846
869
  return [];
847
- const result = [];
848
- for (const level of levels) {
849
- const levelCfg = leafLevels[String(level.levelId)];
850
- if (!levelCfg)
851
- continue;
852
- const selectedKeys = new Set(levelCfg.selectedStatuses);
853
- const value = {
854
- levelId: level.levelId,
855
- levelName: level.levelName,
856
- levelIcon: level.levelIcon,
857
- statuses: level.statuses
858
- .filter((s) => selectedKeys.has(s.key))
859
- .map((s) => ({ key: s.key, display: s.display, color: s.color, count: 0 })),
860
- };
861
- result.push({
870
+ return [
871
+ {
862
872
  id: prop.id,
863
873
  propertyId: prop.id,
864
- key: `${prop.key}${LEAF_DETAILS_SEP}${level.levelId}`,
865
- name: level.levelName,
866
- // Cast needed until entities package is rebuilt with LeafDetailsEntityValue in the union
867
- value: value,
874
+ key: prop.key,
875
+ name: this.getPropertyDisplayName(prop),
876
+ propertyConfiguration: prop.configuration,
877
+ value: levels.map((level) => ({
878
+ levelId: level.levelId,
879
+ levelName: level.levelName,
880
+ levelIcon: level.levelIcon,
881
+ statuses: level.statuses.map((status) => ({
882
+ key: status.key,
883
+ display: status.display,
884
+ color: status.color,
885
+ count: 0,
886
+ })),
887
+ })),
868
888
  viewType: 'LeafDetails',
869
- order: levelCfg.order,
870
- configuration: levelCfg.size ? { size: levelCfg.size } : undefined,
871
- });
872
- }
873
- return result;
889
+ order: config.order,
890
+ configuration: {
891
+ ...config.configuration,
892
+ leafLevels,
893
+ },
894
+ },
895
+ ];
874
896
  }
875
897
  activateProperty(prop, openConfigAfterSave = false) {
876
898
  const area = this.activeArea();
@@ -902,7 +924,9 @@ class Customization {
902
924
  }
903
925
  if (!itemsMap.has(prop.key))
904
926
  itemsMap.set(prop.key, []);
905
- itemsMap.get(prop.key).push({ areaKey: area, order: nextOrder, configuration });
927
+ itemsMap
928
+ .get(prop.key)
929
+ .push({ areaKey: area, order: nextOrder, configuration });
906
930
  const items = Array.from(itemsMap.entries()).map(([propertyKey, displayAreas]) => ({ propertyKey, displayAreas }));
907
931
  this.facade.bulkReplaceConfigurations(items).subscribe({
908
932
  next: () => {
@@ -1005,6 +1029,7 @@ class Customization {
1005
1029
  rawValue: this.getPlaceholderRawValue(viewType, displayName),
1006
1030
  viewType,
1007
1031
  order: config.order,
1032
+ propertyConfiguration: prop.configuration,
1008
1033
  configuration: config.configuration,
1009
1034
  };
1010
1035
  }
@@ -1065,7 +1090,7 @@ class Customization {
1065
1090
  }
1066
1091
  }
1067
1092
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Customization, deps: [], target: i0.ɵɵFactoryTarget.Component });
1068
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: Customization, isStandalone: true, selector: "mt-customization", ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'customization'\">\r\n <div\r\n class=\"flex gap-6 h-full w-full overflow-hidden max-[1025px]:min-h-0 max-[1025px]:min-w-0 max-[1025px]:flex-col max-[1025px]:gap-4 max-[1025px]:overflow-x-hidden max-[1025px]:overflow-y-auto\"\r\n >\r\n <!-- \u2500\u2500\u2500 Left Sidebar: Attributes Panel \u2500\u2500\u2500 -->\r\n <mt-card\r\n class=\"w-1/5 h-full flex flex-col overflow-hidden pb-3 max-[1025px]:h-auto max-[1025px]:max-h-[42vh] max-[1025px]:min-h-0 max-[1025px]:w-full\"\r\n >\r\n <ng-template #headless>\r\n <!-- Header -->\r\n <h3 class=\"text-xl font-semibold px-4 pt-5 pb-3\">\r\n {{ t(\"attributes\") }}\r\n </h3>\r\n\r\n <!-- Properties List -->\r\n <div class=\"flex-1 overflow-y-auto px-4 pb-4 space-y-3\">\r\n <!-- Search Field -->\r\n <div class=\"sticky top-0 bg-surface-0 mb-0 py-3 pb-2 mb-1 z-10\">\r\n <mt-text-field\r\n [placeholder]=\"t('search-properties')\"\r\n [(ngModel)]=\"searchQuery\"\r\n icon=\"general.search-lg\"\r\n />\r\n </div>\r\n @if (isLoading()) {\r\n @for (i of [1, 2, 3, 4, 5, 6]; track i) {\r\n <div class=\"flex items-center gap-1 p-1 rounded-lg\">\r\n <p-skeleton height=\"4rem\" />\r\n </div>\r\n }\r\n } @else {\r\n @for (prop of filteredProperties(); track prop.id) {\r\n @if (prop.viewType === 'LeafDetails') {\r\n <!-- \u2500\u2500 LeafDetails: always first, title is \"Target Statuses\" inside the selector \u2500\u2500 -->\r\n <div class=\"rounded-lg border border-gray-300 border-dashed px-4 py-3\">\r\n <mt-leaf-details-selector\r\n [property]=\"prop\"\r\n [leafLevels]=\"leafConfigsByProp()[prop.key] ?? {}\"\r\n (configChange)=\"onLeafConfigChange(prop, $event)\"\r\n />\r\n </div>\r\n } @else {\r\n <!-- \u2500\u2500 Normal property toggle row \u2500\u2500 -->\r\n <div\r\n class=\"flex items-center gap-3 px-4 rounded-lg border border-gray-300 border-dashed hover:bg-emphasis transition-colors\"\r\n >\r\n <!-- Property Name -->\r\n <div class=\"flex-1 min-w-0 py-4\">\r\n <span\r\n class=\"text-sm font-medium truncate block\"\r\n [class.text-primary]=\"prop.enabled\"\r\n >\r\n {{ prop.name?.display }}\r\n </span>\r\n </div>\r\n\r\n <!-- Edit Button (visible when enabled and viewType has configurable fields) -->\r\n @if (prop.enabled && editableViewTypes.has(prop.viewType)) {\r\n <mt-button\r\n icon=\"editor.pencil-01\"\r\n variant=\"text\"\r\n severity=\"primary\"\r\n (onClick)=\"onEditProperty(prop)\"\r\n />\r\n }\r\n\r\n <!-- Toggle -->\r\n <mt-toggle-field\r\n [ngModel]=\"prop.enabled\"\r\n (ngModelChange)=\"onPropertyToggle(prop, $event)\"\r\n class=\"shrink-0\"\r\n size=\"small\"\r\n ></mt-toggle-field>\r\n </div>\r\n }\r\n }\r\n\r\n @if (filteredProperties().length === 0) {\r\n <div class=\"py-8 text-center text-muted-color\">\r\n <p class=\"text-sm\">{{ t(\"no-properties\") }}</p>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </ng-template>\r\n </mt-card>\r\n\r\n <!-- \u2500\u2500\u2500 Main Area: Preview \u2500\u2500\u2500 -->\r\n <div\r\n class=\"w-3/5 flex flex-col gap-4 h-full overflow-hidden items-center max-[1025px]:h-auto max-[1025px]:min-h-0 max-[1025px]:min-w-0 max-[1025px]:w-full max-[1025px]:flex-1 max-[1025px]:items-stretch max-[1025px]:overflow-visible max-[1025px]:pb-4\"\r\n >\r\n <!-- Area Tabs -->\r\n @if (isLoadingAreas()) {\r\n <div class=\"flex gap-2 py-1\">\r\n @for (i of [1, 2, 3]; track i) {\r\n <p-skeleton width=\"6rem\" height=\"2.25rem\" borderRadius=\"8px\" />\r\n }\r\n </div>\r\n } @else if (areasTabs().length > 0) {\r\n <div class=\"max-[1025px]:w-full\">\r\n <div\r\n class=\"max-[1025px]:w-full max-[1025px]:min-w-0 max-[1025px]:overflow-x-auto max-[1025px]:pb-1\"\r\n >\r\n <mt-tabs\r\n class=\"max-[1025px]:min-w-max\"\r\n [options]=\"areasTabs()\"\r\n [(active)]=\"activeArea\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- Entities Preview -->\r\n <mt-card\r\n class=\"w-130 flex-1 overflow-hidden max-[1025px]:w-full max-[1025px]:min-h-[24rem]\"\r\n >\r\n <div>\r\n <ng-template #headless>\r\n <div class=\"overflow-auto h-full my-2 py-3 px-4\">\r\n @if (isLoadingPreview()) {\r\n <div\r\n class=\"grid grid-cols-24 gap-x-4 gap-y-5 p-4 max-[640px]:grid-cols-1 max-[640px]:gap-4\"\r\n >\r\n <div\r\n class=\"col-span-20 flex items-center gap-2.5 p-3 max-[640px]:col-span-1\"\r\n >\r\n <p-skeleton size=\"4rem\" shape=\"circle\" />\r\n <div class=\"flex flex-col gap-1 flex-1\">\r\n <p-skeleton height=\"2.5rem\" borderRadius=\"4px\" />\r\n </div>\r\n </div>\r\n @for (i of [1, 2, 3, 4]; track i) {\r\n <div\r\n class=\"col-span-8 flex flex-col gap-1.5 p-3 max-[640px]:col-span-1\"\r\n >\r\n <p-skeleton height=\"4rem\" borderRadius=\"6px\" />\r\n </div>\r\n }\r\n </div>\r\n } @else if (previewEntities().length > 0) {\r\n <mt-entities-manage\r\n [(entities)]=\"previewEntities\"\r\n (entitiesReordered)=\"onEntitiesReordered($event)\"\r\n (entityResized)=\"onEntityResized($event)\"\r\n (entityClicked)=\"onEntityClicked($event)\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-full text-muted-color gap-3 text-center px-4\"\r\n >\r\n <mt-icon\r\n name=\"general.eye-off\"\r\n size=\"xl\"\r\n class=\"opacity-40\"\r\n />\r\n <p class=\"text-sm font-medium\">{{ t(\"no-preview-items\") }}</p>\r\n <p class=\"text-xs\">{{ t(\"no-preview-items-hint\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n </div>\r\n </mt-card>\r\n </div>\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:block;height:100%;width:100%;min-height:0;min-width:0}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "icon", "iconPosition"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "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: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "size", "fluid", "disabled"], outputs: ["activeChange", "onChange"] }, { kind: "component", type: Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: EntitiesManage, selector: "mt-entities-manage", inputs: ["entities"], outputs: ["entitiesChange", "entitiesReordered", "entityClicked"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: LeafDetailsSelector, selector: "mt-leaf-details-selector", inputs: ["property", "leafLevels"], outputs: ["configChange"] }] });
1093
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: Customization, isStandalone: true, selector: "mt-customization", ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'customization'\">\r\n <div\r\n class=\"flex gap-6 h-full w-full overflow-hidden max-[1025px]:min-h-0 max-[1025px]:min-w-0 max-[1025px]:flex-col max-[1025px]:gap-4 max-[1025px]:overflow-x-hidden max-[1025px]:overflow-y-auto\"\r\n >\r\n <!-- \u2500\u2500\u2500 Left Sidebar: Attributes Panel \u2500\u2500\u2500 -->\r\n <mt-card\r\n class=\"w-1/5 h-full flex flex-col overflow-hidden pb-3 max-[1025px]:h-auto max-[1025px]:max-h-[42vh] max-[1025px]:min-h-0 max-[1025px]:w-full\"\r\n >\r\n <ng-template #headless>\r\n <!-- Header -->\r\n <h3 class=\"text-xl font-semibold px-4 pt-5 pb-3\">\r\n {{ t(\"attributes\") }}\r\n </h3>\r\n\r\n <!-- Properties List -->\r\n <div class=\"flex-1 overflow-y-auto px-4 pb-4 space-y-3\">\r\n <!-- Search Field -->\r\n <div class=\"sticky top-0 bg-surface-0 mb-0 py-3 pb-2 mb-1 z-10\">\r\n <mt-text-field\r\n [placeholder]=\"t('search-properties')\"\r\n [(ngModel)]=\"searchQuery\"\r\n icon=\"general.search-lg\"\r\n />\r\n </div>\r\n @if (isLoading()) {\r\n @for (i of [1, 2, 3, 4, 5, 6]; track i) {\r\n <div class=\"flex items-center gap-1 p-1 rounded-lg\">\r\n <p-skeleton height=\"4rem\" />\r\n </div>\r\n }\r\n } @else {\r\n @for (prop of filteredProperties(); track prop.id) {\r\n @if (prop.viewType === \"LeafDetails\") {\r\n <!-- \u2500\u2500 LeafDetails: always first, title is \"Target Statuses\" inside the selector \u2500\u2500 -->\r\n <div\r\n class=\"rounded-lg border border-gray-300 border-dashed px-4 py-3\"\r\n >\r\n <mt-leaf-details-selector\r\n [property]=\"prop\"\r\n [leafLevels]=\"leafConfigsByProp()[prop.key] ?? {}\"\r\n [showEditAction]=\"prop.enabled && editableViewTypes.has(prop.viewType)\"\r\n (configChange)=\"onLeafConfigChange(prop, $event)\"\r\n (editRequested)=\"onEditProperty(prop)\"\r\n />\r\n </div>\r\n } @else {\r\n <!-- \u2500\u2500 Normal property toggle row \u2500\u2500 -->\r\n <div\r\n class=\"flex items-center gap-3 px-4 rounded-lg border border-gray-300 border-dashed hover:bg-emphasis transition-colors\"\r\n >\r\n <!-- Property Name -->\r\n <div class=\"flex-1 min-w-0 py-4\">\r\n <span\r\n class=\"text-sm font-medium truncate block\"\r\n [class.text-primary]=\"prop.enabled\"\r\n >\r\n {{ prop.name?.display }}\r\n </span>\r\n </div>\r\n\r\n <!-- Edit Button (visible when enabled and viewType has configurable fields) -->\r\n @if (prop.enabled && editableViewTypes.has(prop.viewType)) {\r\n <mt-button\r\n icon=\"editor.pencil-01\"\r\n variant=\"text\"\r\n severity=\"primary\"\r\n (onClick)=\"onEditProperty(prop)\"\r\n />\r\n }\r\n\r\n <!-- Toggle -->\r\n <mt-toggle-field\r\n [ngModel]=\"prop.enabled\"\r\n (ngModelChange)=\"onPropertyToggle(prop, $event)\"\r\n class=\"shrink-0\"\r\n size=\"small\"\r\n ></mt-toggle-field>\r\n </div>\r\n }\r\n }\r\n\r\n @if (filteredProperties().length === 0) {\r\n <div class=\"py-8 text-center text-muted-color\">\r\n <p class=\"text-sm\">{{ t(\"no-properties\") }}</p>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </ng-template>\r\n </mt-card>\r\n\r\n <!-- \u2500\u2500\u2500 Main Area: Preview \u2500\u2500\u2500 -->\r\n <div\r\n class=\"w-3/5 flex flex-col gap-4 h-full overflow-hidden items-center max-[1025px]:h-auto max-[1025px]:min-h-0 max-[1025px]:min-w-0 max-[1025px]:w-full max-[1025px]:flex-1 max-[1025px]:items-stretch max-[1025px]:overflow-visible max-[1025px]:pb-4\"\r\n >\r\n <!-- Area Tabs -->\r\n @if (isLoadingAreas()) {\r\n <div class=\"flex gap-2 py-1\">\r\n @for (i of [1, 2, 3]; track i) {\r\n <p-skeleton width=\"6rem\" height=\"2.25rem\" borderRadius=\"8px\" />\r\n }\r\n </div>\r\n } @else if (areasTabs().length > 0) {\r\n <div class=\"max-[1025px]:w-full\">\r\n <div\r\n class=\"max-[1025px]:w-full max-[1025px]:min-w-0 max-[1025px]:overflow-x-auto max-[1025px]:pb-1\"\r\n >\r\n <mt-tabs\r\n class=\"max-[1025px]:min-w-max\"\r\n [options]=\"areasTabs()\"\r\n [(active)]=\"activeArea\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- Entities Preview -->\r\n <mt-card\r\n class=\"w-130 flex-1 overflow-hidden max-[1025px]:w-full max-[1025px]:min-h-[24rem]\"\r\n >\r\n <div>\r\n <ng-template #headless>\r\n <div class=\"overflow-auto h-full my-2 py-3 px-4\">\r\n @if (isLoadingPreview()) {\r\n <div\r\n class=\"grid grid-cols-24 gap-x-4 gap-y-5 p-4 max-[640px]:grid-cols-1 max-[640px]:gap-4\"\r\n >\r\n <div\r\n class=\"col-span-20 flex items-center gap-2.5 p-3 max-[640px]:col-span-1\"\r\n >\r\n <p-skeleton size=\"4rem\" shape=\"circle\" />\r\n <div class=\"flex flex-col gap-1 flex-1\">\r\n <p-skeleton height=\"2.5rem\" borderRadius=\"4px\" />\r\n </div>\r\n </div>\r\n @for (i of [1, 2, 3, 4]; track i) {\r\n <div\r\n class=\"col-span-8 flex flex-col gap-1.5 p-3 max-[640px]:col-span-1\"\r\n >\r\n <p-skeleton height=\"4rem\" borderRadius=\"6px\" />\r\n </div>\r\n }\r\n </div>\r\n } @else if (previewEntities().length > 0) {\r\n <mt-entities-manage\r\n [(entities)]=\"previewEntities\"\r\n (entitiesReordered)=\"onEntitiesReordered($event)\"\r\n (entityResized)=\"onEntityResized($event)\"\r\n (entityClicked)=\"onEntityClicked($event)\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-full text-muted-color gap-3 text-center px-4\"\r\n >\r\n <mt-icon\r\n name=\"general.eye-off\"\r\n size=\"xl\"\r\n class=\"opacity-40\"\r\n />\r\n <p class=\"text-sm font-medium\">{{ t(\"no-preview-items\") }}</p>\r\n <p class=\"text-xs\">{{ t(\"no-preview-items-hint\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n </div>\r\n </mt-card>\r\n </div>\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:block;height:100%;width:100%;min-height:0;min-width:0}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "icon", "iconPosition"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "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: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "size", "fluid", "disabled"], outputs: ["activeChange", "onChange"] }, { kind: "component", type: Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: EntitiesManage, selector: "mt-entities-manage", inputs: ["entities"], outputs: ["entitiesChange", "entitiesReordered", "entityClicked"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: LeafDetailsSelector, selector: "mt-leaf-details-selector", inputs: ["property", "leafLevels", "showEditAction"], outputs: ["configChange", "editRequested"] }] });
1069
1094
  }
1070
1095
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Customization, decorators: [{
1071
1096
  type: Component,
@@ -1081,7 +1106,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
1081
1106
  EntitiesManage,
1082
1107
  Icon,
1083
1108
  LeafDetailsSelector,
1084
- ], template: "<ng-container *transloco=\"let t; prefix: 'customization'\">\r\n <div\r\n class=\"flex gap-6 h-full w-full overflow-hidden max-[1025px]:min-h-0 max-[1025px]:min-w-0 max-[1025px]:flex-col max-[1025px]:gap-4 max-[1025px]:overflow-x-hidden max-[1025px]:overflow-y-auto\"\r\n >\r\n <!-- \u2500\u2500\u2500 Left Sidebar: Attributes Panel \u2500\u2500\u2500 -->\r\n <mt-card\r\n class=\"w-1/5 h-full flex flex-col overflow-hidden pb-3 max-[1025px]:h-auto max-[1025px]:max-h-[42vh] max-[1025px]:min-h-0 max-[1025px]:w-full\"\r\n >\r\n <ng-template #headless>\r\n <!-- Header -->\r\n <h3 class=\"text-xl font-semibold px-4 pt-5 pb-3\">\r\n {{ t(\"attributes\") }}\r\n </h3>\r\n\r\n <!-- Properties List -->\r\n <div class=\"flex-1 overflow-y-auto px-4 pb-4 space-y-3\">\r\n <!-- Search Field -->\r\n <div class=\"sticky top-0 bg-surface-0 mb-0 py-3 pb-2 mb-1 z-10\">\r\n <mt-text-field\r\n [placeholder]=\"t('search-properties')\"\r\n [(ngModel)]=\"searchQuery\"\r\n icon=\"general.search-lg\"\r\n />\r\n </div>\r\n @if (isLoading()) {\r\n @for (i of [1, 2, 3, 4, 5, 6]; track i) {\r\n <div class=\"flex items-center gap-1 p-1 rounded-lg\">\r\n <p-skeleton height=\"4rem\" />\r\n </div>\r\n }\r\n } @else {\r\n @for (prop of filteredProperties(); track prop.id) {\r\n @if (prop.viewType === 'LeafDetails') {\r\n <!-- \u2500\u2500 LeafDetails: always first, title is \"Target Statuses\" inside the selector \u2500\u2500 -->\r\n <div class=\"rounded-lg border border-gray-300 border-dashed px-4 py-3\">\r\n <mt-leaf-details-selector\r\n [property]=\"prop\"\r\n [leafLevels]=\"leafConfigsByProp()[prop.key] ?? {}\"\r\n (configChange)=\"onLeafConfigChange(prop, $event)\"\r\n />\r\n </div>\r\n } @else {\r\n <!-- \u2500\u2500 Normal property toggle row \u2500\u2500 -->\r\n <div\r\n class=\"flex items-center gap-3 px-4 rounded-lg border border-gray-300 border-dashed hover:bg-emphasis transition-colors\"\r\n >\r\n <!-- Property Name -->\r\n <div class=\"flex-1 min-w-0 py-4\">\r\n <span\r\n class=\"text-sm font-medium truncate block\"\r\n [class.text-primary]=\"prop.enabled\"\r\n >\r\n {{ prop.name?.display }}\r\n </span>\r\n </div>\r\n\r\n <!-- Edit Button (visible when enabled and viewType has configurable fields) -->\r\n @if (prop.enabled && editableViewTypes.has(prop.viewType)) {\r\n <mt-button\r\n icon=\"editor.pencil-01\"\r\n variant=\"text\"\r\n severity=\"primary\"\r\n (onClick)=\"onEditProperty(prop)\"\r\n />\r\n }\r\n\r\n <!-- Toggle -->\r\n <mt-toggle-field\r\n [ngModel]=\"prop.enabled\"\r\n (ngModelChange)=\"onPropertyToggle(prop, $event)\"\r\n class=\"shrink-0\"\r\n size=\"small\"\r\n ></mt-toggle-field>\r\n </div>\r\n }\r\n }\r\n\r\n @if (filteredProperties().length === 0) {\r\n <div class=\"py-8 text-center text-muted-color\">\r\n <p class=\"text-sm\">{{ t(\"no-properties\") }}</p>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </ng-template>\r\n </mt-card>\r\n\r\n <!-- \u2500\u2500\u2500 Main Area: Preview \u2500\u2500\u2500 -->\r\n <div\r\n class=\"w-3/5 flex flex-col gap-4 h-full overflow-hidden items-center max-[1025px]:h-auto max-[1025px]:min-h-0 max-[1025px]:min-w-0 max-[1025px]:w-full max-[1025px]:flex-1 max-[1025px]:items-stretch max-[1025px]:overflow-visible max-[1025px]:pb-4\"\r\n >\r\n <!-- Area Tabs -->\r\n @if (isLoadingAreas()) {\r\n <div class=\"flex gap-2 py-1\">\r\n @for (i of [1, 2, 3]; track i) {\r\n <p-skeleton width=\"6rem\" height=\"2.25rem\" borderRadius=\"8px\" />\r\n }\r\n </div>\r\n } @else if (areasTabs().length > 0) {\r\n <div class=\"max-[1025px]:w-full\">\r\n <div\r\n class=\"max-[1025px]:w-full max-[1025px]:min-w-0 max-[1025px]:overflow-x-auto max-[1025px]:pb-1\"\r\n >\r\n <mt-tabs\r\n class=\"max-[1025px]:min-w-max\"\r\n [options]=\"areasTabs()\"\r\n [(active)]=\"activeArea\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- Entities Preview -->\r\n <mt-card\r\n class=\"w-130 flex-1 overflow-hidden max-[1025px]:w-full max-[1025px]:min-h-[24rem]\"\r\n >\r\n <div>\r\n <ng-template #headless>\r\n <div class=\"overflow-auto h-full my-2 py-3 px-4\">\r\n @if (isLoadingPreview()) {\r\n <div\r\n class=\"grid grid-cols-24 gap-x-4 gap-y-5 p-4 max-[640px]:grid-cols-1 max-[640px]:gap-4\"\r\n >\r\n <div\r\n class=\"col-span-20 flex items-center gap-2.5 p-3 max-[640px]:col-span-1\"\r\n >\r\n <p-skeleton size=\"4rem\" shape=\"circle\" />\r\n <div class=\"flex flex-col gap-1 flex-1\">\r\n <p-skeleton height=\"2.5rem\" borderRadius=\"4px\" />\r\n </div>\r\n </div>\r\n @for (i of [1, 2, 3, 4]; track i) {\r\n <div\r\n class=\"col-span-8 flex flex-col gap-1.5 p-3 max-[640px]:col-span-1\"\r\n >\r\n <p-skeleton height=\"4rem\" borderRadius=\"6px\" />\r\n </div>\r\n }\r\n </div>\r\n } @else if (previewEntities().length > 0) {\r\n <mt-entities-manage\r\n [(entities)]=\"previewEntities\"\r\n (entitiesReordered)=\"onEntitiesReordered($event)\"\r\n (entityResized)=\"onEntityResized($event)\"\r\n (entityClicked)=\"onEntityClicked($event)\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-full text-muted-color gap-3 text-center px-4\"\r\n >\r\n <mt-icon\r\n name=\"general.eye-off\"\r\n size=\"xl\"\r\n class=\"opacity-40\"\r\n />\r\n <p class=\"text-sm font-medium\">{{ t(\"no-preview-items\") }}</p>\r\n <p class=\"text-xs\">{{ t(\"no-preview-items-hint\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n </div>\r\n </mt-card>\r\n </div>\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:block;height:100%;width:100%;min-height:0;min-width:0}\n"] }]
1109
+ ], template: "<ng-container *transloco=\"let t; prefix: 'customization'\">\r\n <div\r\n class=\"flex gap-6 h-full w-full overflow-hidden max-[1025px]:min-h-0 max-[1025px]:min-w-0 max-[1025px]:flex-col max-[1025px]:gap-4 max-[1025px]:overflow-x-hidden max-[1025px]:overflow-y-auto\"\r\n >\r\n <!-- \u2500\u2500\u2500 Left Sidebar: Attributes Panel \u2500\u2500\u2500 -->\r\n <mt-card\r\n class=\"w-1/5 h-full flex flex-col overflow-hidden pb-3 max-[1025px]:h-auto max-[1025px]:max-h-[42vh] max-[1025px]:min-h-0 max-[1025px]:w-full\"\r\n >\r\n <ng-template #headless>\r\n <!-- Header -->\r\n <h3 class=\"text-xl font-semibold px-4 pt-5 pb-3\">\r\n {{ t(\"attributes\") }}\r\n </h3>\r\n\r\n <!-- Properties List -->\r\n <div class=\"flex-1 overflow-y-auto px-4 pb-4 space-y-3\">\r\n <!-- Search Field -->\r\n <div class=\"sticky top-0 bg-surface-0 mb-0 py-3 pb-2 mb-1 z-10\">\r\n <mt-text-field\r\n [placeholder]=\"t('search-properties')\"\r\n [(ngModel)]=\"searchQuery\"\r\n icon=\"general.search-lg\"\r\n />\r\n </div>\r\n @if (isLoading()) {\r\n @for (i of [1, 2, 3, 4, 5, 6]; track i) {\r\n <div class=\"flex items-center gap-1 p-1 rounded-lg\">\r\n <p-skeleton height=\"4rem\" />\r\n </div>\r\n }\r\n } @else {\r\n @for (prop of filteredProperties(); track prop.id) {\r\n @if (prop.viewType === \"LeafDetails\") {\r\n <!-- \u2500\u2500 LeafDetails: always first, title is \"Target Statuses\" inside the selector \u2500\u2500 -->\r\n <div\r\n class=\"rounded-lg border border-gray-300 border-dashed px-4 py-3\"\r\n >\r\n <mt-leaf-details-selector\r\n [property]=\"prop\"\r\n [leafLevels]=\"leafConfigsByProp()[prop.key] ?? {}\"\r\n [showEditAction]=\"prop.enabled && editableViewTypes.has(prop.viewType)\"\r\n (configChange)=\"onLeafConfigChange(prop, $event)\"\r\n (editRequested)=\"onEditProperty(prop)\"\r\n />\r\n </div>\r\n } @else {\r\n <!-- \u2500\u2500 Normal property toggle row \u2500\u2500 -->\r\n <div\r\n class=\"flex items-center gap-3 px-4 rounded-lg border border-gray-300 border-dashed hover:bg-emphasis transition-colors\"\r\n >\r\n <!-- Property Name -->\r\n <div class=\"flex-1 min-w-0 py-4\">\r\n <span\r\n class=\"text-sm font-medium truncate block\"\r\n [class.text-primary]=\"prop.enabled\"\r\n >\r\n {{ prop.name?.display }}\r\n </span>\r\n </div>\r\n\r\n <!-- Edit Button (visible when enabled and viewType has configurable fields) -->\r\n @if (prop.enabled && editableViewTypes.has(prop.viewType)) {\r\n <mt-button\r\n icon=\"editor.pencil-01\"\r\n variant=\"text\"\r\n severity=\"primary\"\r\n (onClick)=\"onEditProperty(prop)\"\r\n />\r\n }\r\n\r\n <!-- Toggle -->\r\n <mt-toggle-field\r\n [ngModel]=\"prop.enabled\"\r\n (ngModelChange)=\"onPropertyToggle(prop, $event)\"\r\n class=\"shrink-0\"\r\n size=\"small\"\r\n ></mt-toggle-field>\r\n </div>\r\n }\r\n }\r\n\r\n @if (filteredProperties().length === 0) {\r\n <div class=\"py-8 text-center text-muted-color\">\r\n <p class=\"text-sm\">{{ t(\"no-properties\") }}</p>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </ng-template>\r\n </mt-card>\r\n\r\n <!-- \u2500\u2500\u2500 Main Area: Preview \u2500\u2500\u2500 -->\r\n <div\r\n class=\"w-3/5 flex flex-col gap-4 h-full overflow-hidden items-center max-[1025px]:h-auto max-[1025px]:min-h-0 max-[1025px]:min-w-0 max-[1025px]:w-full max-[1025px]:flex-1 max-[1025px]:items-stretch max-[1025px]:overflow-visible max-[1025px]:pb-4\"\r\n >\r\n <!-- Area Tabs -->\r\n @if (isLoadingAreas()) {\r\n <div class=\"flex gap-2 py-1\">\r\n @for (i of [1, 2, 3]; track i) {\r\n <p-skeleton width=\"6rem\" height=\"2.25rem\" borderRadius=\"8px\" />\r\n }\r\n </div>\r\n } @else if (areasTabs().length > 0) {\r\n <div class=\"max-[1025px]:w-full\">\r\n <div\r\n class=\"max-[1025px]:w-full max-[1025px]:min-w-0 max-[1025px]:overflow-x-auto max-[1025px]:pb-1\"\r\n >\r\n <mt-tabs\r\n class=\"max-[1025px]:min-w-max\"\r\n [options]=\"areasTabs()\"\r\n [(active)]=\"activeArea\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- Entities Preview -->\r\n <mt-card\r\n class=\"w-130 flex-1 overflow-hidden max-[1025px]:w-full max-[1025px]:min-h-[24rem]\"\r\n >\r\n <div>\r\n <ng-template #headless>\r\n <div class=\"overflow-auto h-full my-2 py-3 px-4\">\r\n @if (isLoadingPreview()) {\r\n <div\r\n class=\"grid grid-cols-24 gap-x-4 gap-y-5 p-4 max-[640px]:grid-cols-1 max-[640px]:gap-4\"\r\n >\r\n <div\r\n class=\"col-span-20 flex items-center gap-2.5 p-3 max-[640px]:col-span-1\"\r\n >\r\n <p-skeleton size=\"4rem\" shape=\"circle\" />\r\n <div class=\"flex flex-col gap-1 flex-1\">\r\n <p-skeleton height=\"2.5rem\" borderRadius=\"4px\" />\r\n </div>\r\n </div>\r\n @for (i of [1, 2, 3, 4]; track i) {\r\n <div\r\n class=\"col-span-8 flex flex-col gap-1.5 p-3 max-[640px]:col-span-1\"\r\n >\r\n <p-skeleton height=\"4rem\" borderRadius=\"6px\" />\r\n </div>\r\n }\r\n </div>\r\n } @else if (previewEntities().length > 0) {\r\n <mt-entities-manage\r\n [(entities)]=\"previewEntities\"\r\n (entitiesReordered)=\"onEntitiesReordered($event)\"\r\n (entityResized)=\"onEntityResized($event)\"\r\n (entityClicked)=\"onEntityClicked($event)\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-full text-muted-color gap-3 text-center px-4\"\r\n >\r\n <mt-icon\r\n name=\"general.eye-off\"\r\n size=\"xl\"\r\n class=\"opacity-40\"\r\n />\r\n <p class=\"text-sm font-medium\">{{ t(\"no-preview-items\") }}</p>\r\n <p class=\"text-xs\">{{ t(\"no-preview-items-hint\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n </div>\r\n </mt-card>\r\n </div>\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:block;height:100%;width:100%;min-height:0;min-width:0}\n"] }]
1085
1110
  }], ctorParameters: () => [] });
1086
1111
 
1087
1112
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"masterteam-customization.mjs","sources":["../../../../packages/masterteam/customization/src/lib/customization.model.ts","../../../../packages/masterteam/customization/src/store/customization/customization.actions.ts","../../../../packages/masterteam/customization/src/store/customization/customization.model.ts","../../../../packages/masterteam/customization/src/store/customization/customization.state.ts","../../../../packages/masterteam/customization/src/store/customization/customization.facade.ts","../../../../packages/masterteam/customization/src/lib/property-config-drawer/property-config-drawer.ts","../../../../packages/masterteam/customization/src/lib/property-config-drawer/property-config-drawer.html","../../../../packages/masterteam/customization/src/lib/leaf-details-selector/leaf-details-selector.ts","../../../../packages/masterteam/customization/src/lib/leaf-details-selector/leaf-details-selector.html","../../../../packages/masterteam/customization/src/lib/customization.ts","../../../../packages/masterteam/customization/src/lib/customization.html","../../../../packages/masterteam/customization/src/masterteam-customization.ts"],"sourcesContent":["// Re-export entity types from the canonical source\r\nexport type {\r\n EntityViewType,\r\n EntitySize,\r\n EntityData,\r\n EntityStatusValue,\r\n EntityLookupValue,\r\n EntityUserValue,\r\n EntityResizeEvent,\r\n EntityLabelPosition,\r\n} from '@masterteam/components/entities';\r\n\r\nimport type {\r\n EntityLabelPosition,\r\n EntityViewType,\r\n} from '@masterteam/components/entities';\r\n\r\n// ── Preview-specific models ──\r\n\r\n/**\r\n * Configuration for a property that can be edited via the drawer.\r\n * Note: `size` is managed via mouse-drag resize, not the edit drawer.\r\n */\r\nexport interface PropertyEditConfig {\r\n /** All viewTypes */\r\n hideName: boolean;\r\n labelPosition: EntityLabelPosition;\r\n showBorder: boolean;\r\n alignEnd: boolean;\r\n /** User viewType only */\r\n showDisplayName: boolean;\r\n showPhoneNumber: boolean;\r\n showEmail: boolean;\r\n}\r\n\r\n/** ViewTypes that support the 'showBorder' toggle */\r\nexport const BORDER_VIEW_TYPES: EntityViewType[] = [\r\n 'Text',\r\n 'LongText',\r\n 'Currency',\r\n 'Date',\r\n 'DateTime',\r\n];\r\n\r\n/** ViewTypes that support user-specific toggles */\r\nexport const USER_VIEW_TYPES: EntityViewType[] = ['User'];\r\n\r\n/**\r\n * ViewTypes that have editable configuration fields in the drawer.\r\n * All types support hideName; additional toggles appear based on viewType.\r\n */\r\nexport const EDITABLE_VIEW_TYPES: EntityViewType[] = [\r\n 'Text',\r\n 'LongText',\r\n 'Currency',\r\n 'Date',\r\n 'DateTime',\r\n 'Percentage',\r\n 'Status',\r\n 'Checkbox',\r\n 'Lookup',\r\n 'LookupMatrix',\r\n 'Attachment',\r\n 'User',\r\n];\r\n","import type { BulkReplaceItem } from './api.model';\r\n\r\nexport class GetCustomization {\r\n static readonly type = '[Customization] Get Properties';\r\n\r\n constructor(public readonly params?: Record<string, unknown>) {}\r\n}\r\n\r\nexport class GetManagePreviewAreas {\r\n static readonly type = '[Customization] Get Areas';\r\n}\r\n\r\nexport class GetManagePreviewConfigurations {\r\n static readonly type = '[Customization] Get Configurations';\r\n\r\n constructor(public readonly areaKeys?: string[]) {}\r\n}\r\n\r\nexport class SetManagePreviewModuleInfo {\r\n static readonly type = '[Customization] Set Module Info';\r\n\r\n constructor(\r\n public readonly moduleType: string,\r\n public readonly moduleId: string | number,\r\n public readonly parentModuleType?: string,\r\n public readonly parentModuleId?: string | number,\r\n public readonly parentPath?: string,\r\n ) {}\r\n}\r\n\r\nexport class BulkReplaceConfigurations {\r\n static readonly type = '[Customization] Bulk Replace Configurations';\r\n\r\n constructor(public readonly items: BulkReplaceItem[]) {}\r\n}\r\n","import type { LoadingStateShape } from '@masterteam/components';\r\nimport type { DisplayArea, DisplayConfiguration } from './api.model';\r\n\r\nexport interface ManagePreviewPropertyItem {\r\n id: number;\r\n key: string;\r\n viewType: string;\r\n viewTypeLabel: string;\r\n name: string | Record<string, string>;\r\n description?: Record<string, string>;\r\n defaultValue?: unknown;\r\n order?: number;\r\n enabled?: boolean;\r\n isSystem?: boolean;\r\n isBasic?: boolean;\r\n isCalculated?: boolean;\r\n isConfigurable?: boolean;\r\n isRequired?: boolean;\r\n isTranslatable?: boolean;\r\n shownInTable?: boolean;\r\n includeInSummary?: boolean;\r\n category?: string;\r\n /** Regular properties: object config. LeafDetails: LeafLevelConfig[] */\r\n configuration?: Record<string, unknown> | unknown[];\r\n [key: string]: unknown;\r\n}\r\n\r\nexport enum CustomizationActionKey {\r\n GetProperties = 'getProperties',\r\n GetAreas = 'getAreas',\r\n GetConfigurations = 'getConfigurations',\r\n BulkReplaceConfigurations = 'bulkReplaceConfigurations',\r\n}\r\n\r\nexport interface CustomizationStateModel extends LoadingStateShape<CustomizationActionKey> {\r\n properties: ManagePreviewPropertyItem[];\r\n areas: DisplayArea[];\r\n configurations: DisplayConfiguration[];\r\n moduleType: string | null;\r\n moduleId: string | number | null;\r\n parentModuleType: string | null;\r\n parentModuleId: string | number | null;\r\n parentPath: string;\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable, inject } from '@angular/core';\r\nimport { Action, Selector, State, StateContext } from '@ngxs/store';\r\nimport { CrudStateBase, handleApiRequest } from '@masterteam/components';\r\nimport {\r\n CustomizationActionKey,\r\n CustomizationStateModel,\r\n ManagePreviewPropertyItem,\r\n} from './customization.model';\r\nimport {\r\n GetCustomization,\r\n GetManagePreviewAreas,\r\n GetManagePreviewConfigurations,\r\n SetManagePreviewModuleInfo,\r\n BulkReplaceConfigurations,\r\n} from './customization.actions';\r\nimport {\r\n CatalogPropertyDto,\r\n DisplayArea,\r\n DisplayConfiguration,\r\n PropertyCatalogResponseDto,\r\n Response,\r\n} from './api.model';\r\n\r\nconst DEFAULT_STATE: CustomizationStateModel = {\r\n properties: [],\r\n areas: [],\r\n configurations: [],\r\n loadingActive: [],\r\n errors: {},\r\n moduleType: null,\r\n moduleId: null,\r\n parentModuleType: null,\r\n parentModuleId: null,\r\n parentPath: '',\r\n};\r\n\r\n@State<CustomizationStateModel>({\r\n name: 'customization',\r\n defaults: DEFAULT_STATE,\r\n})\r\n@Injectable()\r\nexport class CustomizationState extends CrudStateBase<\r\n ManagePreviewPropertyItem,\r\n CustomizationStateModel,\r\n CustomizationActionKey\r\n> {\r\n private readonly http = inject(HttpClient);\r\n private readonly baseUrl = 'Properties';\r\n private readonly displayConfigUrl = 'display-configurations';\r\n\r\n // ============================================================================\r\n // Data Selectors - Individual for fine-grained reactivity\r\n // ============================================================================\r\n\r\n @Selector()\r\n static getProperties(\r\n state: CustomizationStateModel,\r\n ): ManagePreviewPropertyItem[] {\r\n return state.properties;\r\n }\r\n\r\n @Selector()\r\n static getAreas(state: CustomizationStateModel): DisplayArea[] {\r\n return state.areas;\r\n }\r\n\r\n @Selector()\r\n static getConfigurations(\r\n state: CustomizationStateModel,\r\n ): DisplayConfiguration[] {\r\n return state.configurations;\r\n }\r\n\r\n @Selector()\r\n static getModuleId(state: CustomizationStateModel): string | number | null {\r\n return state.moduleId;\r\n }\r\n\r\n @Selector()\r\n static getModuleType(state: CustomizationStateModel): string | null {\r\n return state.moduleType;\r\n }\r\n\r\n // ============================================================================\r\n // Loading/Error Slice Selectors - REQUIRED for optimal performance\r\n // ============================================================================\r\n\r\n @Selector()\r\n static getLoadingActive(state: CustomizationStateModel): string[] {\r\n return state.loadingActive;\r\n }\r\n\r\n @Selector()\r\n static getErrors(\r\n state: CustomizationStateModel,\r\n ): Record<string, string | null> {\r\n return state.errors;\r\n }\r\n\r\n // ============================================================================\r\n // Actions\r\n // ============================================================================\r\n\r\n @Action(GetManagePreviewAreas)\r\n getAreas(ctx: StateContext<CustomizationStateModel>) {\r\n const req$ = this.http.get<Response<DisplayArea[]>>(\r\n `${this.displayConfigUrl}/areas`,\r\n );\r\n\r\n return handleApiRequest({\r\n ctx,\r\n key: CustomizationActionKey.GetAreas,\r\n request$: req$,\r\n onSuccess: (response) => ({\r\n areas: response.data ?? [],\r\n }),\r\n });\r\n }\r\n\r\n @Action(GetCustomization)\r\n getProperties(\r\n ctx: StateContext<CustomizationStateModel>,\r\n action: GetCustomization,\r\n ) {\r\n const state = ctx.getState();\r\n const contextKey = this.buildContextKey(state);\r\n\r\n const params = {\r\n ...action.params,\r\n contextKey,\r\n };\r\n\r\n const req$ = this.http.get<Response<PropertyCatalogResponseDto>>(\r\n `${this.baseUrl}/catalog`,\r\n { params },\r\n );\r\n\r\n return handleApiRequest({\r\n ctx,\r\n key: CustomizationActionKey.GetProperties,\r\n request$: req$,\r\n onSuccess: (response) => ({\r\n properties: (response.data?.properties ?? []).map(\r\n mapCatalogPropertyToManagePreview,\r\n ),\r\n }),\r\n });\r\n }\r\n\r\n @Action(GetManagePreviewConfigurations)\r\n getConfigurations(\r\n ctx: StateContext<CustomizationStateModel>,\r\n action: GetManagePreviewConfigurations,\r\n ) {\r\n const state = ctx.getState();\r\n const contextKey = this.buildContextKey(state);\r\n\r\n const params: Record<string, string | string[]> = { contextKey };\r\n if (action.areaKeys?.length) {\r\n params['areaKeys'] = action.areaKeys;\r\n }\r\n\r\n const req$ = this.http.get<Response<DisplayConfiguration[]>>(\r\n this.displayConfigUrl,\r\n { params },\r\n );\r\n\r\n return handleApiRequest({\r\n ctx,\r\n key: CustomizationActionKey.GetConfigurations,\r\n request$: req$,\r\n onSuccess: (response) => ({\r\n configurations: response.data ?? [],\r\n }),\r\n });\r\n }\r\n\r\n @Action(SetManagePreviewModuleInfo)\r\n setModuleInfo(\r\n ctx: StateContext<CustomizationStateModel>,\r\n action: SetManagePreviewModuleInfo,\r\n ) {\r\n let parentPath = '';\r\n if (action.parentModuleType && action.parentModuleId) {\r\n parentPath = `/${action.parentModuleType}/${action.parentModuleId}`;\r\n } else if (action.parentPath) {\r\n parentPath = action.parentPath;\r\n }\r\n\r\n ctx.patchState({\r\n moduleType: action.moduleType,\r\n moduleId: action.moduleId,\r\n parentModuleType: action.parentModuleType ?? null,\r\n parentModuleId: action.parentModuleId ?? null,\r\n parentPath: parentPath ?? '',\r\n });\r\n }\r\n\r\n @Action(BulkReplaceConfigurations)\r\n bulkReplaceConfigurations(\r\n ctx: StateContext<CustomizationStateModel>,\r\n action: BulkReplaceConfigurations,\r\n ) {\r\n const state = ctx.getState();\r\n const contextKey = this.buildContextKey(state);\r\n\r\n const req$ = this.http.put<Response<boolean>>(\r\n `${this.displayConfigUrl}/bulk-replace`,\r\n {\r\n contextKey,\r\n items: action.items,\r\n },\r\n );\r\n\r\n return handleApiRequest({\r\n ctx,\r\n key: CustomizationActionKey.BulkReplaceConfigurations,\r\n request$: req$,\r\n onSuccess: () => {\r\n // Rebuild configurations from the items payload\r\n const newConfigs: DisplayConfiguration[] = [];\r\n for (const item of action.items) {\r\n for (const da of item.displayAreas) {\r\n newConfigs.push({\r\n contextKey,\r\n areaKey: da.areaKey,\r\n propertyKey: item.propertyKey,\r\n order: da.order,\r\n configuration: da.configuration,\r\n });\r\n }\r\n }\r\n return { configurations: newConfigs };\r\n },\r\n });\r\n }\r\n\r\n // ============================================================================\r\n // Private Helpers\r\n // ============================================================================\r\n\r\n private buildContextKey(state: CustomizationStateModel): string {\r\n const contextParts: string[] = [];\r\n if (state.parentModuleType && state.parentModuleId) {\r\n contextParts.push(`${state.parentModuleType}:${state.parentModuleId}`);\r\n }\r\n if (state.moduleType && state.moduleId) {\r\n contextParts.push(`${state.moduleType}:${state.moduleId}`);\r\n }\r\n return contextParts.join('/');\r\n }\r\n}\r\n\r\nfunction mapCatalogPropertyToManagePreview(\r\n property: CatalogPropertyDto,\r\n): ManagePreviewPropertyItem {\r\n return {\r\n id: property.id,\r\n key: property.key,\r\n viewType: property.viewType,\r\n viewTypeLabel: property.viewType,\r\n name: { display: property.label },\r\n order: property.order,\r\n isRequired: property.isRequired,\r\n isSystem: property.isSystem,\r\n isCalculated: property.source?.toLowerCase().includes('calculated'),\r\n configuration: property.configuration ?? undefined,\r\n };\r\n}\r\n","import { Injectable, computed, inject } from '@angular/core';\r\nimport { select, Store } from '@ngxs/store';\r\nimport type { Observable } from 'rxjs';\r\nimport { CustomizationActionKey } from './customization.model';\r\nimport {\r\n GetCustomization,\r\n GetManagePreviewAreas,\r\n GetManagePreviewConfigurations,\r\n SetManagePreviewModuleInfo,\r\n BulkReplaceConfigurations,\r\n} from './customization.actions';\r\nimport { CustomizationState } from './customization.state';\r\nimport type { BulkReplaceItem } from './api.model';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class CustomizationFacade {\r\n private readonly store = inject(Store);\r\n\r\n // ============================================================================\r\n // Data Selectors - Memoized by NGXS (fine-grained reactivity)\r\n // ============================================================================\r\n readonly properties = select(CustomizationState.getProperties);\r\n readonly areas = select(CustomizationState.getAreas);\r\n readonly configurations = select(CustomizationState.getConfigurations);\r\n readonly moduleId = select(CustomizationState.getModuleId);\r\n readonly moduleType = select(CustomizationState.getModuleType);\r\n\r\n // ============================================================================\r\n // Loading/Error Slices - Memoized by NGXS\r\n // ============================================================================\r\n private readonly loadingActive = select(CustomizationState.getLoadingActive);\r\n private readonly errors = select(CustomizationState.getErrors);\r\n\r\n // ============================================================================\r\n // Loading Signals - Computed from slice (minimal reactivity)\r\n // ============================================================================\r\n readonly isLoadingProperties = computed(() =>\r\n this.loadingActive().includes(CustomizationActionKey.GetProperties),\r\n );\r\n\r\n readonly isLoadingAreas = computed(() =>\r\n this.loadingActive().includes(CustomizationActionKey.GetAreas),\r\n );\r\n\r\n readonly isLoadingConfigurations = computed(() =>\r\n this.loadingActive().includes(CustomizationActionKey.GetConfigurations),\r\n );\r\n\r\n readonly isBulkReplacing = computed(() =>\r\n this.loadingActive().includes(\r\n CustomizationActionKey.BulkReplaceConfigurations,\r\n ),\r\n );\r\n\r\n // ============================================================================\r\n // Error Signals - Computed from slice (minimal reactivity)\r\n // ============================================================================\r\n readonly propertiesError = computed(\r\n () => this.errors()[CustomizationActionKey.GetProperties] ?? null,\r\n );\r\n\r\n readonly areasError = computed(\r\n () => this.errors()[CustomizationActionKey.GetAreas] ?? null,\r\n );\r\n\r\n readonly configurationsError = computed(\r\n () => this.errors()[CustomizationActionKey.GetConfigurations] ?? null,\r\n );\r\n\r\n readonly bulkReplaceError = computed(\r\n () =>\r\n this.errors()[CustomizationActionKey.BulkReplaceConfigurations] ?? null,\r\n );\r\n\r\n // ============================================================================\r\n // Action Dispatchers\r\n // ============================================================================\r\n\r\n loadAreas(): Observable<unknown> {\r\n return this.store.dispatch(new GetManagePreviewAreas());\r\n }\r\n\r\n loadProperties(params?: Record<string, unknown>): Observable<unknown> {\r\n return this.store.dispatch(new GetCustomization(params));\r\n }\r\n\r\n loadConfigurations(areaKeys?: string[]): Observable<unknown> {\r\n return this.store.dispatch(new GetManagePreviewConfigurations(areaKeys));\r\n }\r\n\r\n bulkReplaceConfigurations(items: BulkReplaceItem[]): Observable<unknown> {\r\n return this.store.dispatch(new BulkReplaceConfigurations(items));\r\n }\r\n\r\n setModuleInfo(\r\n moduleType: string,\r\n moduleId: string | number,\r\n parentModuleType?: string,\r\n parentModuleId?: string | number,\r\n parentPath?: string,\r\n ): Observable<unknown> {\r\n return this.store.dispatch(\r\n new SetManagePreviewModuleInfo(\r\n moduleType,\r\n moduleId,\r\n parentModuleType,\r\n parentModuleId,\r\n parentPath,\r\n ),\r\n );\r\n }\r\n}\r\n","import {\r\n Component,\r\n computed,\r\n effect,\r\n inject,\r\n input,\r\n signal,\r\n} from '@angular/core';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { TranslocoDirective } from '@jsverse/transloco';\r\nimport { Button } from '@masterteam/components/button';\r\nimport { ToggleField } from '@masterteam/components/toggle-field';\r\nimport { ModalService } from '@masterteam/components/modal';\r\nimport { ModalRef } from '@masterteam/components/dialog';\r\nimport type {\r\n EntityViewType,\r\n PropertyEditConfig,\r\n} from '../customization.model';\r\nimport { BORDER_VIEW_TYPES, USER_VIEW_TYPES } from '../customization.model';\r\nimport { CustomizationFacade } from '../../store';\r\nimport type { BulkReplaceItem } from '../../store/customization';\r\n\r\n@Component({\r\n selector: 'mt-property-config-drawer',\r\n standalone: true,\r\n imports: [TranslocoDirective, ReactiveFormsModule, Button, ToggleField],\r\n templateUrl: './property-config-drawer.html',\r\n})\r\nexport class PropertyConfigDrawer {\r\n protected readonly modalService = inject(ModalService);\r\n private readonly ref = inject(ModalRef);\r\n private readonly facade = inject(CustomizationFacade);\r\n private readonly doc = inject(DOCUMENT);\r\n\r\n // ─── Inputs (passed via drawer inputValues) ───\r\n readonly propertyKey = input<string>('');\r\n readonly propertyName = input<string>('');\r\n readonly viewType = input<EntityViewType>('Text');\r\n readonly areaKey = input<string>('card');\r\n readonly currentOrder = input<number>(1);\r\n readonly initialConfig = input<PropertyEditConfig>({\r\n hideName: false,\r\n labelPosition: 'bottom',\r\n showBorder: false,\r\n alignEnd: false,\r\n showDisplayName: true,\r\n showPhoneNumber: false,\r\n showEmail: false,\r\n });\r\n\r\n // ─── UI state ───\r\n readonly submitting = signal(false);\r\n readonly hideNameControl = new FormControl(false);\r\n readonly labelOnTopControl = new FormControl(false);\r\n readonly showBorderControl = new FormControl(false);\r\n readonly alignEndControl = new FormControl(false);\r\n readonly showDisplayNameControl = new FormControl(false);\r\n readonly showPhoneNumberControl = new FormControl(false);\r\n readonly showEmailControl = new FormControl(false);\r\n\r\n // ─── Computed visibility flags ───\r\n readonly isBorderViewType = computed(() =>\r\n BORDER_VIEW_TYPES.includes(this.viewType()),\r\n );\r\n readonly isUserViewType = computed(() =>\r\n USER_VIEW_TYPES.includes(this.viewType()),\r\n );\r\n\r\n /** True when the document direction is RTL */\r\n private readonly isRtl = signal(\r\n this.doc.documentElement.getAttribute('dir') === 'rtl',\r\n );\r\n\r\n /** Align-end icon: right in LTR, left in RTL */\r\n readonly alignEndIcon = computed(() =>\r\n this.isRtl() ? 'layout.align-left-01' : 'layout.align-right-01',\r\n );\r\n\r\n constructor() {\r\n // Initialize form from input config\r\n effect(() => {\r\n const config = this.initialConfig();\r\n this.hideNameControl.patchValue(config.hideName ?? false);\r\n this.labelOnTopControl.patchValue(config.labelPosition === 'top');\r\n this.showBorderControl.patchValue(config.showBorder ?? false);\r\n this.alignEndControl.patchValue(config.alignEnd ?? false);\r\n this.showDisplayNameControl.patchValue(config.showDisplayName ?? true);\r\n this.showPhoneNumberControl.patchValue(config.showPhoneNumber ?? false);\r\n this.showEmailControl.patchValue(config.showEmail ?? false);\r\n });\r\n }\r\n\r\n onSave(): void {\r\n // Preserve existing size from configuration (managed via drag-resize)\r\n const existingConfig = this.facade\r\n .configurations()\r\n .find(\r\n (c) =>\r\n c.propertyKey === this.propertyKey() && c.areaKey === this.areaKey(),\r\n );\r\n const existingSize = existingConfig?.configuration?.['size'];\r\n\r\n const configuration: Record<string, unknown> = {};\r\n\r\n // Carry over size so drag-resize value is not lost\r\n if (existingSize != null) {\r\n configuration['size'] = existingSize;\r\n }\r\n\r\n // Keep both keys for backward compatibility while the shared entities\r\n // layer now prefers hideLabel.\r\n configuration['hideName'] = this.hideNameControl.value ?? false;\r\n configuration['hideLabel'] = this.hideNameControl.value ?? false;\r\n configuration['labelPosition'] = this.labelOnTopControl.value\r\n ? 'top'\r\n : 'bottom';\r\n configuration['alignEnd'] = this.alignEndControl.value ?? false;\r\n\r\n if (this.isBorderViewType()) {\r\n configuration['showBorder'] = this.showBorderControl.value ?? false;\r\n }\r\n if (this.isUserViewType()) {\r\n configuration['showDisplayName'] =\r\n this.showDisplayNameControl.value ?? false;\r\n configuration['showPhoneNumber'] =\r\n this.showPhoneNumberControl.value ?? false;\r\n configuration['showEmail'] = this.showEmailControl.value ?? false;\r\n }\r\n\r\n const newDisplayArea = {\r\n areaKey: this.areaKey(),\r\n order: this.currentOrder(),\r\n configuration,\r\n };\r\n\r\n // Build bulk items from existing configs, replacing the current property+area\r\n const configs = this.facade.configurations();\r\n const itemsMap = new Map<string, BulkReplaceItem['displayAreas']>();\r\n\r\n for (const c of configs) {\r\n // Skip the entry being replaced\r\n if (\r\n c.propertyKey === this.propertyKey() &&\r\n c.areaKey === this.areaKey()\r\n ) {\r\n continue;\r\n }\r\n if (!itemsMap.has(c.propertyKey)) {\r\n itemsMap.set(c.propertyKey, []);\r\n }\r\n itemsMap.get(c.propertyKey)!.push({\r\n areaKey: c.areaKey,\r\n order: c.order,\r\n configuration: c.configuration,\r\n });\r\n }\r\n\r\n // Add/replace the current property's area config\r\n if (!itemsMap.has(this.propertyKey())) {\r\n itemsMap.set(this.propertyKey(), []);\r\n }\r\n itemsMap.get(this.propertyKey())!.push(newDisplayArea);\r\n\r\n const items: BulkReplaceItem[] = Array.from(itemsMap.entries()).map(\r\n ([propertyKey, displayAreas]) => ({ propertyKey, displayAreas }),\r\n );\r\n\r\n this.submitting.set(true);\r\n this.facade.bulkReplaceConfigurations(items).subscribe({\r\n next: () => this.ref.close(true),\r\n error: () => this.submitting.set(false),\r\n });\r\n }\r\n\r\n onCancel(): void {\r\n this.ref.close(null);\r\n }\r\n}\r\n","<ng-container *transloco=\"let t; prefix: 'customization'\">\r\n <div [class]=\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\">\r\n <div class=\"mt-2 h-full overflow-y-auto pb-10 flex flex-col gap-5\">\r\n <!-- Hide Name Toggle (all entity types) -->\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('hide-name')\"\r\n icon=\"general.eye-off\"\r\n [formControl]=\"hideNameControl\"\r\n ></mt-toggle-field>\r\n\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('label-on-top')\"\r\n icon=\"layout.align-right-02\"\r\n [formControl]=\"labelOnTopControl\"\r\n ></mt-toggle-field>\r\n\r\n <!-- Align End Toggle (all entity types) -->\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('align-end')\"\r\n [icon]=\"alignEndIcon()\"\r\n [formControl]=\"alignEndControl\"\r\n ></mt-toggle-field>\r\n\r\n <!-- Show Border Toggle (Text, Currency, Date, DateTime) -->\r\n @if (isBorderViewType()) {\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('show-border')\"\r\n icon=\"layout.layout-grid-01\"\r\n [formControl]=\"showBorderControl\"\r\n ></mt-toggle-field>\r\n }\r\n\r\n <!-- User-specific Toggles -->\r\n @if (isUserViewType()) {\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('show-display-name')\"\r\n icon=\"user.user-circle\"\r\n [formControl]=\"showDisplayNameControl\"\r\n ></mt-toggle-field>\r\n\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('show-phone-number')\"\r\n icon=\"communication.phone\"\r\n [formControl]=\"showPhoneNumberControl\"\r\n ></mt-toggle-field>\r\n\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('show-email')\"\r\n icon=\"communication.mail-01\"\r\n [formControl]=\"showEmailControl\"\r\n ></mt-toggle-field>\r\n }\r\n </div>\r\n </div>\r\n\r\n <div [class]=\"modalService.footerClass\">\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n severity=\"secondary\"\r\n [disabled]=\"submitting()\"\r\n (onClick)=\"onCancel()\"\r\n ></mt-button>\r\n <mt-button\r\n [label]=\"t('save')\"\r\n severity=\"primary\"\r\n [loading]=\"submitting()\"\r\n (onClick)=\"onSave()\"\r\n ></mt-button>\r\n </div>\r\n</ng-container>\r\n","import { Component, computed, input, output } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { TranslocoDirective } from '@jsverse/transloco';\nimport { Icon } from '@masterteam/icons';\nimport { ToggleField } from '@masterteam/components/toggle-field';\nimport type { ManagePreviewPropertyItem } from '../../store/customization';\nimport type { LeafLevelConfig, LeafLevelSavedConfig } from '../../store/customization/api.model';\n\n@Component({\n selector: 'mt-leaf-details-selector',\n standalone: true,\n imports: [FormsModule, TranslocoDirective, Icon, ToggleField],\n templateUrl: './leaf-details-selector.html',\n})\nexport class LeafDetailsSelector {\n readonly property = input.required<ManagePreviewPropertyItem & { enabled: boolean }>();\n readonly leafLevels = input<Record<string, LeafLevelSavedConfig>>({});\n\n readonly configChange = output<Record<string, LeafLevelSavedConfig>>();\n\n readonly levels = computed<LeafLevelConfig[]>(\n () => (this.property().configuration as unknown as LeafLevelConfig[]) ?? [],\n );\n\n isLevelEnabled(levelId: number): boolean {\n return this.leafLevels()[String(levelId)] != null;\n }\n\n isStatusSelected(levelId: number, statusKey: string): boolean {\n return this.leafLevels()[String(levelId)]?.selectedStatuses.includes(statusKey) ?? false;\n }\n\n /** Section toggle — show or hide the entire level in the preview */\n toggleLevel(levelId: number, enabled: boolean): void {\n const current = { ...this.leafLevels() };\n if (enabled) {\n const level = this.levels().find((l) => l.levelId === levelId);\n current[String(levelId)] = {\n order: Object.keys(current).length + 1,\n selectedStatuses: level?.statuses.map((s) => s.key) ?? [],\n };\n } else {\n delete current[String(levelId)];\n }\n this.configChange.emit(current);\n }\n\n /** Status toggle — show or hide a single status badge in the level preview */\n toggleStatus(levelId: number, statusKey: string): void {\n const current = { ...this.leafLevels() };\n const saved = current[String(levelId)];\n if (!saved) return;\n const idx = saved.selectedStatuses.indexOf(statusKey);\n current[String(levelId)] = {\n ...saved,\n selectedStatuses:\n idx >= 0\n ? saved.selectedStatuses.filter((k) => k !== statusKey)\n : [...saved.selectedStatuses, statusKey],\n };\n this.configChange.emit(current);\n }\n}\n","<ng-container *transloco=\"let t; prefix: 'customization'\">\n <div class=\"space-y-2 pt-1\">\n\n <p class=\"text-sm font-semibold text-color px-1\">\n {{ t('leaf-details-target-statuses') }}\n </p>\n\n @for (level of levels(); track $index) {\n <div class=\"rounded-lg border border-surface-200 overflow-hidden\">\n\n <!-- Level header: icon + name | section toggle (show/hide this level) -->\n <div class=\"flex items-center gap-2 px-3 py-2.5\">\n <mt-icon [name]=\"level.levelIcon\" size=\"xs\" class=\"text-color-secondary shrink-0\" />\n <span class=\"flex-1 text-sm font-medium truncate\">{{ level.levelName }}</span>\n <mt-toggle-field\n [ngModel]=\"isLevelEnabled(level.levelId)\"\n (ngModelChange)=\"toggleLevel(level.levelId, $event)\"\n size=\"small\"\n class=\"shrink-0\"\n />\n </div>\n\n <!-- Status rows: each toggle shows/hides that status badge in the preview -->\n @if (isLevelEnabled(level.levelId)) {\n <div class=\"border-t border-surface-200 divide-y divide-surface-100\">\n @for (status of level.statuses; track $index) {\n <div class=\"flex items-center gap-2.5 px-3 py-2\">\n <span\n class=\"w-2.5 h-2.5 rounded-full shrink-0 border border-black/10\"\n [style.background-color]=\"status.color ?? '#9CA3AF'\"\n ></span>\n <span class=\"text-sm flex-1 truncate\">{{ status.display }}</span>\n <mt-toggle-field\n [ngModel]=\"isStatusSelected(level.levelId, status.key)\"\n (ngModelChange)=\"toggleStatus(level.levelId, status.key)\"\n size=\"small\"\n class=\"shrink-0\"\n />\n </div>\n }\n </div>\n }\n\n </div>\n }\n </div>\n</ng-container>\n","import {\n Component,\n computed,\n effect,\n inject,\n OnInit,\n signal,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { TranslocoDirective } from '@jsverse/transloco';\nimport { Card } from '@masterteam/components/card';\nimport { TextField } from '@masterteam/components/text-field';\nimport { ToggleField } from '@masterteam/components/toggle-field';\nimport { Button } from '@masterteam/components/button';\nimport { Tabs } from '@masterteam/components/tabs';\nimport { EntitiesManage } from '@masterteam/components/entities';\nimport { ModalService } from '@masterteam/components/modal';\nimport { Icon } from '@masterteam/icons';\nimport { Skeleton } from 'primeng/skeleton';\nimport type {\n EntityData,\n EntityLabelPosition,\n EntityViewType,\n EntityStatusValue,\n EntityLookupValue,\n EntityUserValue,\n EntityResizeEvent,\n EntitySize,\n PropertyEditConfig,\n} from './customization.model';\nimport { EDITABLE_VIEW_TYPES } from './customization.model';\nimport { CustomizationFacade } from '../store';\nimport type {\n ManagePreviewPropertyItem,\n DisplayConfiguration,\n BulkReplaceItem,\n} from '../store/customization';\nimport type {\n LeafLevelConfig,\n LeafLevelSavedConfig,\n LeafDetailsEntityValue,\n} from '../store/customization/api.model';\nimport { PropertyConfigDrawer } from './property-config-drawer/property-config-drawer';\nimport { LeafDetailsSelector } from './leaf-details-selector/leaf-details-selector';\n\n/** Separator used to build synthetic entity keys for LeafDetails sub-entities */\nconst LEAF_DETAILS_SEP = '::leaflevel::';\n\n@Component({\n selector: 'mt-customization',\n standalone: true,\n imports: [\n FormsModule,\n TranslocoDirective,\n Card,\n TextField,\n ToggleField,\n Button,\n Tabs,\n Skeleton,\n EntitiesManage,\n Icon,\n LeafDetailsSelector,\n ],\n templateUrl: './customization.html',\n styleUrl: './customization.scss',\n})\nexport class Customization implements OnInit {\n protected readonly facade = inject(CustomizationFacade);\n private readonly modalService = inject(ModalService);\n\n /** Set of viewTypes that have editable fields in the drawer (beyond size) */\n protected readonly editableViewTypes = new Set(EDITABLE_VIEW_TYPES);\n\n readonly searchQuery = signal('');\n readonly activeArea = signal<string | null>(null);\n\n // ── Derived signals ──\n readonly properties = this.facade.properties;\n readonly areas = this.facade.areas;\n readonly isLoading = this.facade.isLoadingProperties;\n readonly isLoadingAreas = this.facade.isLoadingAreas;\n readonly isLoadingPreview = computed(\n () =>\n this.facade.isLoadingConfigurations() ||\n this.facade.isLoadingProperties(),\n );\n\n readonly areasTabs = computed(() =>\n this.areas().map((area) => ({ label: area.name, value: area.key })),\n );\n\n /**\n * Configurations filtered to exclude properties that no longer exist in the catalog.\n * Prevents sending orphaned property references on save.\n */\n private readonly validConfigurations = computed(() => {\n const configs = this.facade.configurations();\n const props = this.properties();\n const propertyKeys = new Set(props.map((p) => p.key));\n return configs.filter((c) => propertyKeys.has(c.propertyKey));\n });\n\n /** Properties enriched with `enabled` based on current area configurations */\n readonly propertiesWithEnabled = computed(() => {\n const props = this.properties();\n const configs = this.validConfigurations();\n const area = this.activeArea();\n\n if (!area) return props.map((p) => ({ ...p, enabled: false }));\n\n return props.map((p) => ({\n ...p,\n enabled: configs.some(\n (c) => c.areaKey === area && c.propertyKey === p.key,\n ),\n }));\n });\n\n readonly filteredProperties = computed(() => {\n const query = this.searchQuery().toLowerCase().trim();\n const list = this.propertiesWithEnabled();\n\n // LeafDetails always first in the list regardless of active state\n const leaf = list.filter((p) => p.viewType === 'LeafDetails');\n const regular = list.filter((p) => p.viewType !== 'LeafDetails');\n const ordered = [...leaf, ...regular];\n\n if (!query) return ordered;\n\n return ordered.filter((prop) => {\n const name =\n typeof prop.name === 'string'\n ? prop.name\n : Object.values(prop.name).join(' ');\n return name.toLowerCase().includes(query);\n });\n });\n\n /**\n * LeafDetails saved configs indexed by propertyKey for the active area.\n * Used by the inline selector in the property list.\n */\n protected readonly leafConfigsByProp = computed<\n Record<string, Record<string, LeafLevelSavedConfig>>\n >(() => {\n const configs = this.validConfigurations();\n const area = this.activeArea();\n if (!area) return {};\n\n const result: Record<string, Record<string, LeafLevelSavedConfig>> = {};\n for (const config of configs) {\n if (config.areaKey !== area) continue;\n const leafLevels = config.configuration?.['leafLevels'];\n if (leafLevels && typeof leafLevels === 'object' && !Array.isArray(leafLevels)) {\n result[config.propertyKey] = leafLevels as Record<string, LeafLevelSavedConfig>;\n }\n }\n return result;\n });\n\n /** Preview entities built from configurations + properties for the active area */\n previewEntities = signal<EntityData[]>([]);\n\n constructor() {\n // Set default active area when areas load\n effect(() => {\n const areas = this.areas();\n if (areas.length > 0 && !this.activeArea()) {\n this.activeArea.set(areas[0].key);\n }\n });\n\n // Rebuild preview entities when configs, properties, or active area change\n effect(() => {\n const configs = this.validConfigurations();\n const props = this.properties();\n const area = this.activeArea();\n\n if (!area || !props.length) {\n this.previewEntities.set([]);\n return;\n }\n\n const areaConfigs = configs.filter((c) => c.areaKey === area);\n const all = areaConfigs.flatMap((config) => this.buildEntitiesFromConfig(config, props));\n\n // Regular entities come first, LeafDetails always last.\n // Orders are reassigned sequentially so EntitiesManage's internal sort stays consistent.\n const regular = all\n .filter((e) => !e.key?.includes(LEAF_DETAILS_SEP))\n .sort((a, b) => (a.order ?? 0) - (b.order ?? 0));\n const leafEntities = all\n .filter((e) => e.key?.includes(LEAF_DETAILS_SEP))\n .sort((a, b) => (a.order ?? 0) - (b.order ?? 0));\n\n const entities: EntityData[] = [\n ...regular.map((e, i) => ({ ...e, order: i + 1 })),\n ...leafEntities.map((e, i) => ({ ...e, order: regular.length + i + 1 })),\n ];\n\n this.previewEntities.set(entities);\n });\n }\n\n ngOnInit(): void {\n this.facade.loadAreas();\n this.facade.loadProperties();\n this.facade.loadConfigurations();\n }\n\n onPropertyToggle(\n prop: ManagePreviewPropertyItem & { enabled: boolean },\n enabled: boolean,\n ): void {\n // LeafDetails is managed entirely via the inline status selector — skip\n if (prop.viewType === 'LeafDetails') return;\n\n if (enabled) {\n this.activateProperty(\n prop,\n this.editableViewTypes.has(prop.viewType as EntityViewType),\n );\n return;\n }\n\n this.bulkSaveWithout(prop.key);\n }\n\n onEditProperty(prop: ManagePreviewPropertyItem): void {\n const area = this.activeArea();\n if (!area) return;\n\n const configs = this.validConfigurations();\n const existingConfig = configs.find(\n (c) => c.areaKey === area && c.propertyKey === prop.key,\n );\n\n this.openDrawer(prop, {\n currentOrder: existingConfig?.order,\n configuration: existingConfig?.configuration as Record<string, unknown> | undefined,\n });\n }\n\n onEntityClicked(entity: EntityData): void {\n // LeafDetails sub-entities are configured inline — not via drawer\n if (entity.key?.includes(LEAF_DETAILS_SEP)) return;\n\n const area = this.activeArea();\n if (!area || !entity.key) return;\n\n if (!this.editableViewTypes.has(entity.viewType as EntityViewType)) return;\n\n const prop = this.properties().find((p) => p.key === entity.key);\n if (!prop) return;\n\n const configs = this.validConfigurations();\n const existingConfig = configs.find(\n (c) => c.areaKey === area && c.propertyKey === entity.key,\n );\n\n this.openDrawer(prop, {\n currentOrder: existingConfig?.order,\n configuration: existingConfig?.configuration as Record<string, unknown> | undefined,\n });\n }\n\n onEntityResized(event: EntityResizeEvent): void {\n const area = this.activeArea();\n if (!area) return;\n\n const configs = this.validConfigurations();\n\n // ── LeafDetails sub-entity resize ──\n if (event.entity.key?.includes(LEAF_DETAILS_SEP)) {\n const [propKey, levelId] = event.entity.key.split(LEAF_DETAILS_SEP);\n const existingConfig = configs.find(\n (c) => c.areaKey === area && c.propertyKey === propKey,\n );\n const leafLevels = {\n ...((existingConfig?.configuration?.['leafLevels'] as Record<string, LeafLevelSavedConfig>) ?? {}),\n };\n if (leafLevels[levelId]) {\n leafLevels[levelId] = { ...leafLevels[levelId], size: event.newSize };\n }\n const updatedConfigs = configs.map((c) =>\n c.areaKey === area && c.propertyKey === propKey\n ? { ...c, configuration: { ...c.configuration, leafLevels } }\n : c,\n );\n this.facade.bulkReplaceConfigurations(this.groupConfigsByProperty(updatedConfigs)).subscribe();\n return;\n }\n\n // ── Regular entity resize ──\n const updatedConfigs = configs.map((c) =>\n c.areaKey === area && c.propertyKey === event.entity.key\n ? { ...c, configuration: { ...c.configuration, size: event.newSize } }\n : c,\n );\n this.facade.bulkReplaceConfigurations(this.groupConfigsByProperty(updatedConfigs)).subscribe();\n }\n\n onEntitiesReordered(entities: EntityData[]): void {\n const area = this.activeArea();\n if (!area) return;\n\n const configs = this.validConfigurations();\n\n // Separate regular entities from LeafDetails sub-entities\n const regularEntities = entities.filter((e) => !e.key?.includes(LEAF_DETAILS_SEP));\n const leafEntities = entities.filter((e) => e.key?.includes(LEAF_DETAILS_SEP));\n\n // Regular entities → BulkReplaceItems\n const regularItems: BulkReplaceItem[] = regularEntities.map((entity) => {\n const existingConfig = configs.find(\n (c) => c.areaKey === area && c.propertyKey === entity.key,\n );\n return {\n propertyKey: entity.key!,\n displayAreas: [\n {\n areaKey: area,\n order: entity.order!,\n configuration: existingConfig?.configuration as Record<string, unknown> ?? {},\n },\n ],\n };\n });\n\n // Leaf entities → group by parent propertyKey, update per-level order\n const leafByProp = new Map<string, Array<{ levelId: string; order: number }>>();\n for (const entity of leafEntities) {\n const [propKey, levelId] = entity.key!.split(LEAF_DETAILS_SEP);\n if (!leafByProp.has(propKey)) leafByProp.set(propKey, []);\n leafByProp.get(propKey)!.push({ levelId, order: entity.order! });\n }\n\n const leafItems: BulkReplaceItem[] = [];\n for (const [propKey, levelUpdates] of leafByProp) {\n const existingConfig = configs.find(\n (c) => c.areaKey === area && c.propertyKey === propKey,\n );\n const leafLevels = {\n ...((existingConfig?.configuration?.['leafLevels'] as Record<string, LeafLevelSavedConfig>) ?? {}),\n };\n for (const { levelId, order } of levelUpdates) {\n if (leafLevels[levelId]) {\n leafLevels[levelId] = { ...leafLevels[levelId], order };\n }\n }\n const minOrder = Math.min(...levelUpdates.map((l) => l.order));\n leafItems.push({\n propertyKey: propKey,\n displayAreas: [\n {\n areaKey: area,\n order: existingConfig?.order ?? minOrder,\n configuration: { ...existingConfig?.configuration, leafLevels },\n },\n ],\n });\n }\n\n // Configs from other areas (preserve as-is)\n const otherAreaItems = this.groupConfigsByProperty(\n configs.filter((c) => c.areaKey !== area),\n );\n\n this.facade\n .bulkReplaceConfigurations(this.mergeItems([...regularItems, ...leafItems], otherAreaItems))\n .subscribe();\n }\n\n /**\n * Called by the inline LeafDetailsSelector when the user changes status selections.\n * Immediately persists the updated leafLevels configuration.\n */\n onLeafConfigChange(\n prop: ManagePreviewPropertyItem,\n leafLevels: Record<string, LeafLevelSavedConfig>,\n ): void {\n const area = this.activeArea();\n if (!area) return;\n\n const configs = this.validConfigurations();\n const existingConfig = configs.find(\n (c) => c.areaKey === area && c.propertyKey === prop.key,\n );\n\n // Ensure every level has an order assigned\n let nextOrder =\n configs.filter((c) => c.areaKey === area && c.propertyKey !== prop.key).length + 1;\n const normalizedLevels: Record<string, LeafLevelSavedConfig> = {};\n for (const [levelId, levelCfg] of Object.entries(leafLevels)) {\n normalizedLevels[levelId] = levelCfg.order\n ? levelCfg\n : { ...levelCfg, order: nextOrder++ };\n }\n\n // Other configs excluding this leaf property in the current area\n const otherItems = this.groupConfigsByProperty(\n configs.filter((c) => !(c.areaKey === area && c.propertyKey === prop.key)),\n );\n\n if (Object.keys(normalizedLevels).length === 0) {\n // All levels deselected — remove property from display config\n this.facade.bulkReplaceConfigurations(otherItems).subscribe();\n return;\n }\n\n const minOrder = Math.min(...Object.values(normalizedLevels).map((l) => l.order));\n const newItem: BulkReplaceItem = {\n propertyKey: prop.key,\n displayAreas: [\n {\n areaKey: area,\n order: existingConfig?.order ?? minOrder,\n configuration: { leafLevels: normalizedLevels },\n },\n ],\n };\n\n this.facade.bulkReplaceConfigurations(this.mergeItems([newItem], otherItems)).subscribe();\n }\n\n // ── Private helpers ──\n\n /**\n * Builds zero or more EntityData entries from a single DisplayConfiguration.\n * Regular properties → one entity. LeafDetails → one entity per enabled level.\n */\n private buildEntitiesFromConfig(\n config: DisplayConfiguration,\n props: ManagePreviewPropertyItem[],\n ): EntityData[] {\n const prop = props.find((p) => p.key === config.propertyKey);\n if (!prop) return [];\n\n if (prop.viewType === 'LeafDetails') {\n return this.buildLeafDetailsEntities(config, prop);\n }\n\n const entity = this.buildEntityFromConfig(config, props);\n return entity ? [entity] : [];\n }\n\n /** Builds one EntityData per enabled level from a LeafDetails display config. */\n private buildLeafDetailsEntities(\n config: DisplayConfiguration,\n prop: ManagePreviewPropertyItem,\n ): EntityData[] {\n const levels = (prop.configuration as unknown as LeafLevelConfig[]) ?? [];\n const leafLevels = config.configuration?.['leafLevels'] as\n | Record<string, LeafLevelSavedConfig>\n | undefined;\n if (!leafLevels) return [];\n\n const result: EntityData[] = [];\n for (const level of levels) {\n const levelCfg = leafLevels[String(level.levelId)];\n if (!levelCfg) continue;\n\n const selectedKeys = new Set(levelCfg.selectedStatuses);\n const value: LeafDetailsEntityValue = {\n levelId: level.levelId,\n levelName: level.levelName,\n levelIcon: level.levelIcon,\n statuses: level.statuses\n .filter((s) => selectedKeys.has(s.key))\n .map((s) => ({ key: s.key, display: s.display, color: s.color, count: 0 })),\n };\n\n result.push({\n id: prop.id,\n propertyId: prop.id,\n key: `${prop.key}${LEAF_DETAILS_SEP}${level.levelId}`,\n name: level.levelName,\n // Cast needed until entities package is rebuilt with LeafDetailsEntityValue in the union\n value: value as unknown as EntityData['value'],\n viewType: 'LeafDetails' as EntityViewType,\n order: levelCfg.order,\n configuration: levelCfg.size ? ({ size: levelCfg.size as EntitySize } as EntityData['configuration']) : undefined,\n });\n }\n return result;\n }\n\n private activateProperty(\n prop: ManagePreviewPropertyItem,\n openConfigAfterSave = false,\n ): void {\n const area = this.activeArea();\n if (!area) return;\n\n const configs = this.validConfigurations();\n const existingConfig = configs.find(\n (c) => c.areaKey === area && c.propertyKey === prop.key,\n );\n\n if (existingConfig) {\n if (openConfigAfterSave) {\n this.openDrawer(prop, {\n currentOrder: existingConfig.order,\n configuration: existingConfig.configuration as Record<string, unknown>,\n });\n }\n return;\n }\n\n const areaConfigs = configs.filter((c) => c.areaKey === area);\n const nextOrder = areaConfigs.length + 1;\n const configuration: Record<string, unknown> = {};\n\n const itemsMap = new Map<string, BulkReplaceItem['displayAreas']>();\n for (const c of configs) {\n if (!itemsMap.has(c.propertyKey)) itemsMap.set(c.propertyKey, []);\n itemsMap.get(c.propertyKey)!.push({\n areaKey: c.areaKey,\n order: c.order,\n configuration: c.configuration as Record<string, unknown>,\n });\n }\n\n if (!itemsMap.has(prop.key)) itemsMap.set(prop.key, []);\n itemsMap.get(prop.key)!.push({ areaKey: area, order: nextOrder, configuration });\n\n const items: BulkReplaceItem[] = Array.from(itemsMap.entries()).map(\n ([propertyKey, displayAreas]) => ({ propertyKey, displayAreas }),\n );\n\n this.facade.bulkReplaceConfigurations(items).subscribe({\n next: () => {\n if (openConfigAfterSave) {\n this.openDrawer(prop, { currentOrder: nextOrder, configuration });\n }\n },\n });\n }\n\n private bulkSaveWithout(excludePropertyKey: string): void {\n const configs = this.validConfigurations();\n const items = this.groupConfigsByProperty(\n configs.filter((c) => c.propertyKey !== excludePropertyKey),\n );\n this.facade.bulkReplaceConfigurations(items).subscribe();\n }\n\n private groupConfigsByProperty(configs: DisplayConfiguration[]): BulkReplaceItem[] {\n const map = new Map<string, BulkReplaceItem['displayAreas']>();\n for (const c of configs) {\n if (!map.has(c.propertyKey)) map.set(c.propertyKey, []);\n map.get(c.propertyKey)!.push({\n areaKey: c.areaKey,\n order: c.order,\n configuration: c.configuration as Record<string, unknown>,\n });\n }\n return Array.from(map.entries()).map(([propertyKey, displayAreas]) => ({\n propertyKey,\n displayAreas,\n }));\n }\n\n private mergeItems(\n primary: BulkReplaceItem[],\n secondary: BulkReplaceItem[],\n ): BulkReplaceItem[] {\n const map = new Map<string, BulkReplaceItem['displayAreas']>();\n for (const item of primary) map.set(item.propertyKey, [...item.displayAreas]);\n for (const item of secondary) {\n const existing = map.get(item.propertyKey);\n if (existing) existing.push(...item.displayAreas);\n else map.set(item.propertyKey, [...item.displayAreas]);\n }\n return Array.from(map.entries()).map(([propertyKey, displayAreas]) => ({\n propertyKey,\n displayAreas,\n }));\n }\n\n private openDrawer(\n prop: ManagePreviewPropertyItem,\n existingConfig?: {\n currentOrder?: number;\n configuration?: Record<string, unknown>;\n },\n ): void {\n const area = this.activeArea();\n if (!area) return;\n\n const configs = this.validConfigurations();\n const areaConfigs = configs.filter((c) => c.areaKey === area);\n const nextOrder = existingConfig?.currentOrder ?? areaConfigs.length + 1;\n\n const displayName = this.getPropertyDisplayName(prop);\n const initConfig = this.toPropertyEditConfig(existingConfig?.configuration);\n\n this.modalService.openModal(PropertyConfigDrawer, 'drawer', {\n header: displayName,\n styleClass:\n '!absolute !shadow-none min-[1025px]:!w-[27%] max-[1024px]:!w-[min(92vw,28rem)]',\n position: 'end',\n appendTo: '#page-content',\n dismissible: true,\n inputValues: {\n propertyKey: prop.key,\n propertyName: displayName,\n viewType: prop.viewType,\n areaKey: area,\n currentOrder: nextOrder,\n initialConfig: initConfig,\n },\n });\n }\n\n private toPropertyEditConfig(\n configuration?: Record<string, unknown>,\n ): PropertyEditConfig {\n const labelPosition =\n (configuration?.['labelPosition'] as EntityLabelPosition | undefined) ??\n (configuration?.['labelPostion'] as EntityLabelPosition | undefined) ??\n 'bottom';\n\n return {\n hideName:\n (configuration?.['hideLabel'] as boolean | undefined) ??\n (configuration?.['hideName'] as boolean | undefined) ??\n false,\n labelPosition,\n showBorder: (configuration?.['showBorder'] as boolean) ?? false,\n alignEnd: (configuration?.['alignEnd'] as boolean) ?? false,\n showDisplayName: (configuration?.['showDisplayName'] as boolean) ?? true,\n showPhoneNumber: (configuration?.['showPhoneNumber'] as boolean) ?? false,\n showEmail: (configuration?.['showEmail'] as boolean) ?? false,\n };\n }\n\n private buildEntityFromConfig(\n config: DisplayConfiguration,\n props: ManagePreviewPropertyItem[],\n ): EntityData | null {\n const prop = props.find((p) => p.key === config.propertyKey);\n if (!prop) return null;\n\n const displayName = this.getPropertyDisplayName(prop);\n const viewType = prop.viewType as EntityViewType;\n\n return {\n id: prop.id,\n propertyId: prop.id,\n key: prop.key,\n name: displayName,\n value: this.getPlaceholderValue(viewType, displayName),\n rawValue: this.getPlaceholderRawValue(viewType, displayName),\n viewType,\n order: config.order,\n configuration: config.configuration as EntityData['configuration'],\n };\n }\n\n private getPropertyDisplayName(prop: ManagePreviewPropertyItem): string {\n if (typeof prop.name === 'string') return prop.name;\n if (prop.name && typeof prop.name === 'object') {\n return (\n (prop.name as Record<string, string>)['display'] ||\n Object.values(prop.name)[0] ||\n prop.key\n );\n }\n return prop.key;\n }\n\n private getPlaceholderValue(\n viewType: EntityViewType,\n name: string,\n ): string | EntityStatusValue | EntityLookupValue | EntityUserValue {\n switch (viewType) {\n case 'Text':\n return 'Sample Text';\n case 'LongText':\n return '<p>Sample long text content</p>';\n case 'Date':\n return '2026-01-15';\n case 'DateTime':\n return '2026-01-15 10:30';\n case 'Percentage':\n return '75%';\n case 'Status':\n return { key: 'sample', display: 'in Progress', color: '#3B82F6' };\n case 'Lookup':\n return {\n key: 'sample',\n display: name,\n color: '#8B5CF6',\n description: '',\n };\n case 'Currency':\n return '$1,250.00';\n case 'Checkbox':\n return 'true';\n case 'User':\n return {\n displayName: name,\n photoUrl: '',\n phoneNumber: '+1234567890',\n email: 'user@example.com',\n };\n default:\n return name;\n }\n }\n\n private getPlaceholderRawValue(viewType: EntityViewType, name: string): string {\n switch (viewType) {\n case 'Percentage':\n return '75';\n case 'Checkbox':\n return 'true';\n default:\n return name;\n }\n }\n}\n","<ng-container *transloco=\"let t; prefix: 'customization'\">\r\n <div\r\n class=\"flex gap-6 h-full w-full overflow-hidden max-[1025px]:min-h-0 max-[1025px]:min-w-0 max-[1025px]:flex-col max-[1025px]:gap-4 max-[1025px]:overflow-x-hidden max-[1025px]:overflow-y-auto\"\r\n >\r\n <!-- ─── Left Sidebar: Attributes Panel ─── -->\r\n <mt-card\r\n class=\"w-1/5 h-full flex flex-col overflow-hidden pb-3 max-[1025px]:h-auto max-[1025px]:max-h-[42vh] max-[1025px]:min-h-0 max-[1025px]:w-full\"\r\n >\r\n <ng-template #headless>\r\n <!-- Header -->\r\n <h3 class=\"text-xl font-semibold px-4 pt-5 pb-3\">\r\n {{ t(\"attributes\") }}\r\n </h3>\r\n\r\n <!-- Properties List -->\r\n <div class=\"flex-1 overflow-y-auto px-4 pb-4 space-y-3\">\r\n <!-- Search Field -->\r\n <div class=\"sticky top-0 bg-surface-0 mb-0 py-3 pb-2 mb-1 z-10\">\r\n <mt-text-field\r\n [placeholder]=\"t('search-properties')\"\r\n [(ngModel)]=\"searchQuery\"\r\n icon=\"general.search-lg\"\r\n />\r\n </div>\r\n @if (isLoading()) {\r\n @for (i of [1, 2, 3, 4, 5, 6]; track i) {\r\n <div class=\"flex items-center gap-1 p-1 rounded-lg\">\r\n <p-skeleton height=\"4rem\" />\r\n </div>\r\n }\r\n } @else {\r\n @for (prop of filteredProperties(); track prop.id) {\r\n @if (prop.viewType === 'LeafDetails') {\r\n <!-- ── LeafDetails: always first, title is \"Target Statuses\" inside the selector ── -->\r\n <div class=\"rounded-lg border border-gray-300 border-dashed px-4 py-3\">\r\n <mt-leaf-details-selector\r\n [property]=\"prop\"\r\n [leafLevels]=\"leafConfigsByProp()[prop.key] ?? {}\"\r\n (configChange)=\"onLeafConfigChange(prop, $event)\"\r\n />\r\n </div>\r\n } @else {\r\n <!-- ── Normal property toggle row ── -->\r\n <div\r\n class=\"flex items-center gap-3 px-4 rounded-lg border border-gray-300 border-dashed hover:bg-emphasis transition-colors\"\r\n >\r\n <!-- Property Name -->\r\n <div class=\"flex-1 min-w-0 py-4\">\r\n <span\r\n class=\"text-sm font-medium truncate block\"\r\n [class.text-primary]=\"prop.enabled\"\r\n >\r\n {{ prop.name?.display }}\r\n </span>\r\n </div>\r\n\r\n <!-- Edit Button (visible when enabled and viewType has configurable fields) -->\r\n @if (prop.enabled && editableViewTypes.has(prop.viewType)) {\r\n <mt-button\r\n icon=\"editor.pencil-01\"\r\n variant=\"text\"\r\n severity=\"primary\"\r\n (onClick)=\"onEditProperty(prop)\"\r\n />\r\n }\r\n\r\n <!-- Toggle -->\r\n <mt-toggle-field\r\n [ngModel]=\"prop.enabled\"\r\n (ngModelChange)=\"onPropertyToggle(prop, $event)\"\r\n class=\"shrink-0\"\r\n size=\"small\"\r\n ></mt-toggle-field>\r\n </div>\r\n }\r\n }\r\n\r\n @if (filteredProperties().length === 0) {\r\n <div class=\"py-8 text-center text-muted-color\">\r\n <p class=\"text-sm\">{{ t(\"no-properties\") }}</p>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </ng-template>\r\n </mt-card>\r\n\r\n <!-- ─── Main Area: Preview ─── -->\r\n <div\r\n class=\"w-3/5 flex flex-col gap-4 h-full overflow-hidden items-center max-[1025px]:h-auto max-[1025px]:min-h-0 max-[1025px]:min-w-0 max-[1025px]:w-full max-[1025px]:flex-1 max-[1025px]:items-stretch max-[1025px]:overflow-visible max-[1025px]:pb-4\"\r\n >\r\n <!-- Area Tabs -->\r\n @if (isLoadingAreas()) {\r\n <div class=\"flex gap-2 py-1\">\r\n @for (i of [1, 2, 3]; track i) {\r\n <p-skeleton width=\"6rem\" height=\"2.25rem\" borderRadius=\"8px\" />\r\n }\r\n </div>\r\n } @else if (areasTabs().length > 0) {\r\n <div class=\"max-[1025px]:w-full\">\r\n <div\r\n class=\"max-[1025px]:w-full max-[1025px]:min-w-0 max-[1025px]:overflow-x-auto max-[1025px]:pb-1\"\r\n >\r\n <mt-tabs\r\n class=\"max-[1025px]:min-w-max\"\r\n [options]=\"areasTabs()\"\r\n [(active)]=\"activeArea\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- Entities Preview -->\r\n <mt-card\r\n class=\"w-130 flex-1 overflow-hidden max-[1025px]:w-full max-[1025px]:min-h-[24rem]\"\r\n >\r\n <div>\r\n <ng-template #headless>\r\n <div class=\"overflow-auto h-full my-2 py-3 px-4\">\r\n @if (isLoadingPreview()) {\r\n <div\r\n class=\"grid grid-cols-24 gap-x-4 gap-y-5 p-4 max-[640px]:grid-cols-1 max-[640px]:gap-4\"\r\n >\r\n <div\r\n class=\"col-span-20 flex items-center gap-2.5 p-3 max-[640px]:col-span-1\"\r\n >\r\n <p-skeleton size=\"4rem\" shape=\"circle\" />\r\n <div class=\"flex flex-col gap-1 flex-1\">\r\n <p-skeleton height=\"2.5rem\" borderRadius=\"4px\" />\r\n </div>\r\n </div>\r\n @for (i of [1, 2, 3, 4]; track i) {\r\n <div\r\n class=\"col-span-8 flex flex-col gap-1.5 p-3 max-[640px]:col-span-1\"\r\n >\r\n <p-skeleton height=\"4rem\" borderRadius=\"6px\" />\r\n </div>\r\n }\r\n </div>\r\n } @else if (previewEntities().length > 0) {\r\n <mt-entities-manage\r\n [(entities)]=\"previewEntities\"\r\n (entitiesReordered)=\"onEntitiesReordered($event)\"\r\n (entityResized)=\"onEntityResized($event)\"\r\n (entityClicked)=\"onEntityClicked($event)\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-full text-muted-color gap-3 text-center px-4\"\r\n >\r\n <mt-icon\r\n name=\"general.eye-off\"\r\n size=\"xl\"\r\n class=\"opacity-40\"\r\n />\r\n <p class=\"text-sm font-medium\">{{ t(\"no-preview-items\") }}</p>\r\n <p class=\"text-xs\">{{ t(\"no-preview-items-hint\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n </div>\r\n </mt-card>\r\n </div>\r\n </div>\r\n</ng-container>\r\n","/**\n * Generated bundle index. Do not edit.\n */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IAAI,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,aAAA,EAAA,aAAA,EAAA,QAAA,EAAA,MAAA,EAAA,OAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,cAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACJ,QAAQ,gJACR,cAAc,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,EAAA,mBAAA,EAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACd,IAAI,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACJ,mBAAmB,EAAA,QAAA,EAAA,0BAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,YAAA,CAAA,EAAA,OAAA,EAAA,CAAA,cAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAKV,aAAa,EAAA,UAAA,EAAA,CAAA;kBAnBzB,SAAS;+BACE,kBAAkB,EAAA,UAAA,EAChB,IAAI,EAAA,OAAA,EACP;wBACP,WAAW;wBACX,kBAAkB;wBAClB,IAAI;wBACJ,SAAS;wBACT,WAAW;wBACX,MAAM;wBACN,IAAI;wBACJ,QAAQ;wBACR,cAAc;wBACd,IAAI;wBACJ,mBAAmB;AACpB,qBAAA,EAAA,QAAA,EAAA,wzOAAA,EAAA,MAAA,EAAA,CAAA,wEAAA,CAAA,EAAA;;;AE/DH;;AAEG;;;;"}
1
+ {"version":3,"file":"masterteam-customization.mjs","sources":["../../../../packages/masterteam/customization/src/lib/customization.model.ts","../../../../packages/masterteam/customization/src/store/customization/customization.actions.ts","../../../../packages/masterteam/customization/src/store/customization/customization.model.ts","../../../../packages/masterteam/customization/src/store/customization/customization.state.ts","../../../../packages/masterteam/customization/src/store/customization/customization.facade.ts","../../../../packages/masterteam/customization/src/lib/property-config-drawer/property-config-drawer.ts","../../../../packages/masterteam/customization/src/lib/property-config-drawer/property-config-drawer.html","../../../../packages/masterteam/customization/src/lib/leaf-details-selector/leaf-details-selector.ts","../../../../packages/masterteam/customization/src/lib/leaf-details-selector/leaf-details-selector.html","../../../../packages/masterteam/customization/src/lib/customization.ts","../../../../packages/masterteam/customization/src/lib/customization.html","../../../../packages/masterteam/customization/src/masterteam-customization.ts"],"sourcesContent":["// Re-export entity types from the canonical source\r\nexport type {\r\n EntityViewType,\r\n EntitySize,\r\n EntityData,\r\n EntityStatusValue,\r\n EntityLookupValue,\r\n EntityUserValue,\r\n EntityResizeEvent,\r\n EntityLabelPosition,\r\n} from '@masterteam/components/entities';\r\n\r\nimport type {\r\n EntityLabelPosition,\r\n EntityViewType,\r\n} from '@masterteam/components/entities';\r\n\r\n// ── Preview-specific models ──\r\n\r\n/**\r\n * Configuration for a property that can be edited via the drawer.\r\n * Note: `size` is managed via mouse-drag resize, not the edit drawer.\r\n */\r\nexport interface PropertyEditConfig {\r\n /** All viewTypes */\r\n hideName: boolean;\r\n labelPosition: EntityLabelPosition;\r\n showBorder: boolean;\r\n alignEnd: boolean;\r\n /** User viewType only */\r\n showDisplayName: boolean;\r\n showPhoneNumber: boolean;\r\n showEmail: boolean;\r\n}\r\n\r\n/** ViewTypes that support the 'showBorder' toggle */\r\nexport const BORDER_VIEW_TYPES: EntityViewType[] = [\r\n 'Text',\r\n 'LongText',\r\n 'Currency',\r\n 'Date',\r\n 'DateTime',\r\n 'LeafDetails',\r\n];\r\n\r\n/** ViewTypes that support user-specific toggles */\r\nexport const USER_VIEW_TYPES: EntityViewType[] = ['User'];\r\n\r\n/**\r\n * ViewTypes that have editable configuration fields in the drawer.\r\n * All types support hideName; additional toggles appear based on viewType.\r\n */\r\nexport const EDITABLE_VIEW_TYPES: EntityViewType[] = [\r\n 'Text',\r\n 'LongText',\r\n 'Currency',\r\n 'Date',\r\n 'DateTime',\r\n 'LeafDetails',\r\n 'Percentage',\r\n 'Status',\r\n 'Checkbox',\r\n 'Lookup',\r\n 'LookupMatrix',\r\n 'Attachment',\r\n 'User',\r\n];\r\n","import type { BulkReplaceItem } from './api.model';\r\n\r\nexport class GetCustomization {\r\n static readonly type = '[Customization] Get Properties';\r\n\r\n constructor(public readonly params?: Record<string, unknown>) {}\r\n}\r\n\r\nexport class GetManagePreviewAreas {\r\n static readonly type = '[Customization] Get Areas';\r\n}\r\n\r\nexport class GetManagePreviewConfigurations {\r\n static readonly type = '[Customization] Get Configurations';\r\n\r\n constructor(public readonly areaKeys?: string[]) {}\r\n}\r\n\r\nexport class SetManagePreviewModuleInfo {\r\n static readonly type = '[Customization] Set Module Info';\r\n\r\n constructor(\r\n public readonly moduleType: string,\r\n public readonly moduleId: string | number,\r\n public readonly parentModuleType?: string,\r\n public readonly parentModuleId?: string | number,\r\n public readonly parentPath?: string,\r\n ) {}\r\n}\r\n\r\nexport class BulkReplaceConfigurations {\r\n static readonly type = '[Customization] Bulk Replace Configurations';\r\n\r\n constructor(public readonly items: BulkReplaceItem[]) {}\r\n}\r\n","import type { LoadingStateShape } from '@masterteam/components';\r\nimport type { DisplayArea, DisplayConfiguration } from './api.model';\r\n\r\nexport interface ManagePreviewPropertyItem {\r\n id: number;\r\n key: string;\r\n viewType: string;\r\n viewTypeLabel: string;\r\n name: string | Record<string, string>;\r\n description?: Record<string, string>;\r\n defaultValue?: unknown;\r\n order?: number;\r\n enabled?: boolean;\r\n isSystem?: boolean;\r\n isBasic?: boolean;\r\n isCalculated?: boolean;\r\n isConfigurable?: boolean;\r\n isRequired?: boolean;\r\n isTranslatable?: boolean;\r\n shownInTable?: boolean;\r\n includeInSummary?: boolean;\r\n category?: string;\r\n /** Regular properties: object config. LeafDetails: LeafLevelConfig[] */\r\n configuration?: Record<string, unknown> | unknown[];\r\n [key: string]: unknown;\r\n}\r\n\r\nexport enum CustomizationActionKey {\r\n GetProperties = 'getProperties',\r\n GetAreas = 'getAreas',\r\n GetConfigurations = 'getConfigurations',\r\n BulkReplaceConfigurations = 'bulkReplaceConfigurations',\r\n}\r\n\r\nexport interface CustomizationStateModel extends LoadingStateShape<CustomizationActionKey> {\r\n properties: ManagePreviewPropertyItem[];\r\n areas: DisplayArea[];\r\n configurations: DisplayConfiguration[];\r\n moduleType: string | null;\r\n moduleId: string | number | null;\r\n parentModuleType: string | null;\r\n parentModuleId: string | number | null;\r\n parentPath: string;\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable, inject } from '@angular/core';\r\nimport { Action, Selector, State, StateContext } from '@ngxs/store';\r\nimport { CrudStateBase, handleApiRequest } from '@masterteam/components';\r\nimport {\r\n CustomizationActionKey,\r\n CustomizationStateModel,\r\n ManagePreviewPropertyItem,\r\n} from './customization.model';\r\nimport {\r\n GetCustomization,\r\n GetManagePreviewAreas,\r\n GetManagePreviewConfigurations,\r\n SetManagePreviewModuleInfo,\r\n BulkReplaceConfigurations,\r\n} from './customization.actions';\r\nimport {\r\n CatalogPropertyDto,\r\n DisplayArea,\r\n DisplayConfiguration,\r\n DisplayAreaConfig,\r\n PropertyCatalogResponseDto,\r\n Response,\r\n} from './api.model';\r\n\r\nconst DEFAULT_STATE: CustomizationStateModel = {\r\n properties: [],\r\n areas: [],\r\n configurations: [],\r\n loadingActive: [],\r\n errors: {},\r\n moduleType: null,\r\n moduleId: null,\r\n parentModuleType: null,\r\n parentModuleId: null,\r\n parentPath: '',\r\n};\r\n\r\n@State<CustomizationStateModel>({\r\n name: 'customization',\r\n defaults: DEFAULT_STATE,\r\n})\r\n@Injectable()\r\nexport class CustomizationState extends CrudStateBase<\r\n ManagePreviewPropertyItem,\r\n CustomizationStateModel,\r\n CustomizationActionKey\r\n> {\r\n private readonly http = inject(HttpClient);\r\n private readonly baseUrl = 'Properties';\r\n private readonly displayConfigUrl = 'display-configurations';\r\n\r\n // ============================================================================\r\n // Data Selectors - Individual for fine-grained reactivity\r\n // ============================================================================\r\n\r\n @Selector()\r\n static getProperties(\r\n state: CustomizationStateModel,\r\n ): ManagePreviewPropertyItem[] {\r\n return state.properties;\r\n }\r\n\r\n @Selector()\r\n static getAreas(state: CustomizationStateModel): DisplayArea[] {\r\n return state.areas;\r\n }\r\n\r\n @Selector()\r\n static getConfigurations(\r\n state: CustomizationStateModel,\r\n ): DisplayConfiguration[] {\r\n return state.configurations;\r\n }\r\n\r\n @Selector()\r\n static getModuleId(state: CustomizationStateModel): string | number | null {\r\n return state.moduleId;\r\n }\r\n\r\n @Selector()\r\n static getModuleType(state: CustomizationStateModel): string | null {\r\n return state.moduleType;\r\n }\r\n\r\n // ============================================================================\r\n // Loading/Error Slice Selectors - REQUIRED for optimal performance\r\n // ============================================================================\r\n\r\n @Selector()\r\n static getLoadingActive(state: CustomizationStateModel): string[] {\r\n return state.loadingActive;\r\n }\r\n\r\n @Selector()\r\n static getErrors(\r\n state: CustomizationStateModel,\r\n ): Record<string, string | null> {\r\n return state.errors;\r\n }\r\n\r\n // ============================================================================\r\n // Actions\r\n // ============================================================================\r\n\r\n @Action(GetManagePreviewAreas)\r\n getAreas(ctx: StateContext<CustomizationStateModel>) {\r\n const req$ = this.http.get<Response<DisplayArea[]>>(\r\n `${this.displayConfigUrl}/areas`,\r\n );\r\n\r\n return handleApiRequest({\r\n ctx,\r\n key: CustomizationActionKey.GetAreas,\r\n request$: req$,\r\n onSuccess: (response) => ({\r\n areas: response.data ?? [],\r\n }),\r\n });\r\n }\r\n\r\n @Action(GetCustomization)\r\n getProperties(\r\n ctx: StateContext<CustomizationStateModel>,\r\n action: GetCustomization,\r\n ) {\r\n const state = ctx.getState();\r\n const contextKey = this.buildContextKey(state);\r\n\r\n const params = {\r\n ...action.params,\r\n contextKey,\r\n };\r\n\r\n const req$ = this.http.get<Response<PropertyCatalogResponseDto>>(\r\n `${this.baseUrl}/catalog`,\r\n { params },\r\n );\r\n\r\n return handleApiRequest({\r\n ctx,\r\n key: CustomizationActionKey.GetProperties,\r\n request$: req$,\r\n onSuccess: (response) => ({\r\n properties: (response.data?.properties ?? []).map(\r\n mapCatalogPropertyToManagePreview,\r\n ),\r\n }),\r\n });\r\n }\r\n\r\n @Action(GetManagePreviewConfigurations)\r\n getConfigurations(\r\n ctx: StateContext<CustomizationStateModel>,\r\n action: GetManagePreviewConfigurations,\r\n ) {\r\n const state = ctx.getState();\r\n const contextKey = this.buildContextKey(state);\r\n\r\n const params: Record<string, string | string[]> = { contextKey };\r\n if (action.areaKeys?.length) {\r\n params['areaKeys'] = action.areaKeys;\r\n }\r\n\r\n const req$ = this.http.get<Response<DisplayConfiguration[]>>(\r\n this.displayConfigUrl,\r\n { params },\r\n );\r\n\r\n return handleApiRequest({\r\n ctx,\r\n key: CustomizationActionKey.GetConfigurations,\r\n request$: req$,\r\n onSuccess: (response) => ({\r\n configurations: response.data ?? [],\r\n }),\r\n });\r\n }\r\n\r\n @Action(SetManagePreviewModuleInfo)\r\n setModuleInfo(\r\n ctx: StateContext<CustomizationStateModel>,\r\n action: SetManagePreviewModuleInfo,\r\n ) {\r\n let parentPath = '';\r\n if (action.parentModuleType && action.parentModuleId) {\r\n parentPath = `/${action.parentModuleType}/${action.parentModuleId}`;\r\n } else if (action.parentPath) {\r\n parentPath = action.parentPath;\r\n }\r\n\r\n ctx.patchState({\r\n moduleType: action.moduleType,\r\n moduleId: action.moduleId,\r\n parentModuleType: action.parentModuleType ?? null,\r\n parentModuleId: action.parentModuleId ?? null,\r\n parentPath: parentPath ?? '',\r\n });\r\n }\r\n\r\n @Action(BulkReplaceConfigurations)\r\n bulkReplaceConfigurations(\r\n ctx: StateContext<CustomizationStateModel>,\r\n action: BulkReplaceConfigurations,\r\n ) {\r\n const state = ctx.getState();\r\n const contextKey = this.buildContextKey(state);\r\n const previousConfigurations = state.configurations;\r\n const nextConfigurations = this.toDisplayConfigurations(\r\n contextKey,\r\n action.items,\r\n );\r\n\r\n const req$ = this.http.put<Response<boolean>>(\r\n `${this.displayConfigUrl}/bulk-replace`,\r\n {\r\n contextKey,\r\n items: action.items,\r\n },\r\n );\r\n\r\n ctx.patchState({\r\n configurations: nextConfigurations,\r\n });\r\n\r\n return handleApiRequest({\r\n ctx,\r\n key: CustomizationActionKey.BulkReplaceConfigurations,\r\n request$: req$,\r\n onSuccess: () => undefined,\r\n onError: () => ({\r\n configurations: previousConfigurations,\r\n }),\r\n });\r\n }\r\n\r\n // ============================================================================\r\n // Private Helpers\r\n // ============================================================================\r\n\r\n private buildContextKey(state: CustomizationStateModel): string {\r\n const contextParts: string[] = [];\r\n if (state.parentModuleType && state.parentModuleId) {\r\n contextParts.push(`${state.parentModuleType}:${state.parentModuleId}`);\r\n }\r\n if (state.moduleType && state.moduleId) {\r\n contextParts.push(`${state.moduleType}:${state.moduleId}`);\r\n }\r\n return contextParts.join('/');\r\n }\r\n\r\n private toDisplayConfigurations(\r\n contextKey: string,\r\n items: Array<{ propertyKey: string; displayAreas: DisplayAreaConfig[] }>,\r\n ): DisplayConfiguration[] {\r\n const configurations: DisplayConfiguration[] = [];\r\n\r\n for (const item of items) {\r\n for (const displayArea of item.displayAreas) {\r\n configurations.push({\r\n contextKey,\r\n areaKey: displayArea.areaKey,\r\n propertyKey: item.propertyKey,\r\n order: displayArea.order,\r\n configuration: displayArea.configuration,\r\n });\r\n }\r\n }\r\n\r\n return configurations;\r\n }\r\n}\r\n\r\nfunction mapCatalogPropertyToManagePreview(\r\n property: CatalogPropertyDto,\r\n): ManagePreviewPropertyItem {\r\n return {\r\n id: property.id,\r\n key: property.key,\r\n viewType: property.viewType,\r\n viewTypeLabel: property.viewType,\r\n name: { display: property.label },\r\n order: property.order,\r\n isRequired: property.isRequired,\r\n isSystem: property.isSystem,\r\n isCalculated: property.source?.toLowerCase().includes('calculated'),\r\n configuration: property.configuration ?? undefined,\r\n };\r\n}\r\n","import { Injectable, computed, inject } from '@angular/core';\r\nimport { select, Store } from '@ngxs/store';\r\nimport type { Observable } from 'rxjs';\r\nimport { CustomizationActionKey } from './customization.model';\r\nimport {\r\n GetCustomization,\r\n GetManagePreviewAreas,\r\n GetManagePreviewConfigurations,\r\n SetManagePreviewModuleInfo,\r\n BulkReplaceConfigurations,\r\n} from './customization.actions';\r\nimport { CustomizationState } from './customization.state';\r\nimport type { BulkReplaceItem } from './api.model';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class CustomizationFacade {\r\n private readonly store = inject(Store);\r\n\r\n // ============================================================================\r\n // Data Selectors - Memoized by NGXS (fine-grained reactivity)\r\n // ============================================================================\r\n readonly properties = select(CustomizationState.getProperties);\r\n readonly areas = select(CustomizationState.getAreas);\r\n readonly configurations = select(CustomizationState.getConfigurations);\r\n readonly moduleId = select(CustomizationState.getModuleId);\r\n readonly moduleType = select(CustomizationState.getModuleType);\r\n\r\n // ============================================================================\r\n // Loading/Error Slices - Memoized by NGXS\r\n // ============================================================================\r\n private readonly loadingActive = select(CustomizationState.getLoadingActive);\r\n private readonly errors = select(CustomizationState.getErrors);\r\n\r\n // ============================================================================\r\n // Loading Signals - Computed from slice (minimal reactivity)\r\n // ============================================================================\r\n readonly isLoadingProperties = computed(() =>\r\n this.loadingActive().includes(CustomizationActionKey.GetProperties),\r\n );\r\n\r\n readonly isLoadingAreas = computed(() =>\r\n this.loadingActive().includes(CustomizationActionKey.GetAreas),\r\n );\r\n\r\n readonly isLoadingConfigurations = computed(() =>\r\n this.loadingActive().includes(CustomizationActionKey.GetConfigurations),\r\n );\r\n\r\n readonly isBulkReplacing = computed(() =>\r\n this.loadingActive().includes(\r\n CustomizationActionKey.BulkReplaceConfigurations,\r\n ),\r\n );\r\n\r\n // ============================================================================\r\n // Error Signals - Computed from slice (minimal reactivity)\r\n // ============================================================================\r\n readonly propertiesError = computed(\r\n () => this.errors()[CustomizationActionKey.GetProperties] ?? null,\r\n );\r\n\r\n readonly areasError = computed(\r\n () => this.errors()[CustomizationActionKey.GetAreas] ?? null,\r\n );\r\n\r\n readonly configurationsError = computed(\r\n () => this.errors()[CustomizationActionKey.GetConfigurations] ?? null,\r\n );\r\n\r\n readonly bulkReplaceError = computed(\r\n () =>\r\n this.errors()[CustomizationActionKey.BulkReplaceConfigurations] ?? null,\r\n );\r\n\r\n // ============================================================================\r\n // Action Dispatchers\r\n // ============================================================================\r\n\r\n loadAreas(): Observable<unknown> {\r\n return this.store.dispatch(new GetManagePreviewAreas());\r\n }\r\n\r\n loadProperties(params?: Record<string, unknown>): Observable<unknown> {\r\n return this.store.dispatch(new GetCustomization(params));\r\n }\r\n\r\n loadConfigurations(areaKeys?: string[]): Observable<unknown> {\r\n return this.store.dispatch(new GetManagePreviewConfigurations(areaKeys));\r\n }\r\n\r\n bulkReplaceConfigurations(items: BulkReplaceItem[]): Observable<unknown> {\r\n return this.store.dispatch(new BulkReplaceConfigurations(items));\r\n }\r\n\r\n setModuleInfo(\r\n moduleType: string,\r\n moduleId: string | number,\r\n parentModuleType?: string,\r\n parentModuleId?: string | number,\r\n parentPath?: string,\r\n ): Observable<unknown> {\r\n return this.store.dispatch(\r\n new SetManagePreviewModuleInfo(\r\n moduleType,\r\n moduleId,\r\n parentModuleType,\r\n parentModuleId,\r\n parentPath,\r\n ),\r\n );\r\n }\r\n}\r\n","import {\r\n Component,\r\n computed,\r\n effect,\r\n inject,\r\n input,\r\n signal,\r\n} from '@angular/core';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { TranslocoDirective } from '@jsverse/transloco';\r\nimport { Button } from '@masterteam/components/button';\r\nimport { ToggleField } from '@masterteam/components/toggle-field';\r\nimport { ModalService } from '@masterteam/components/modal';\r\nimport { ModalRef } from '@masterteam/components/dialog';\r\nimport type {\r\n EntityViewType,\r\n PropertyEditConfig,\r\n} from '../customization.model';\r\nimport { BORDER_VIEW_TYPES, USER_VIEW_TYPES } from '../customization.model';\r\nimport { CustomizationFacade } from '../../store';\r\nimport type { BulkReplaceItem } from '../../store/customization';\r\n\r\n@Component({\r\n selector: 'mt-property-config-drawer',\r\n standalone: true,\r\n imports: [TranslocoDirective, ReactiveFormsModule, Button, ToggleField],\r\n templateUrl: './property-config-drawer.html',\r\n})\r\nexport class PropertyConfigDrawer {\r\n protected readonly modalService = inject(ModalService);\r\n private readonly ref = inject(ModalRef);\r\n private readonly facade = inject(CustomizationFacade);\r\n private readonly doc = inject(DOCUMENT);\r\n\r\n // ─── Inputs (passed via drawer inputValues) ───\r\n readonly propertyKey = input<string>('');\r\n readonly propertyName = input<string>('');\r\n readonly viewType = input<EntityViewType>('Text');\r\n readonly areaKey = input<string>('card');\r\n readonly currentOrder = input<number>(1);\r\n readonly initialConfig = input<PropertyEditConfig>({\r\n hideName: false,\r\n labelPosition: 'bottom',\r\n showBorder: false,\r\n alignEnd: false,\r\n showDisplayName: true,\r\n showPhoneNumber: false,\r\n showEmail: false,\r\n });\r\n\r\n // ─── UI state ───\r\n readonly submitting = signal(false);\r\n readonly hideNameControl = new FormControl(false);\r\n readonly labelOnTopControl = new FormControl(false);\r\n readonly showBorderControl = new FormControl(false);\r\n readonly alignEndControl = new FormControl(false);\r\n readonly showDisplayNameControl = new FormControl(false);\r\n readonly showPhoneNumberControl = new FormControl(false);\r\n readonly showEmailControl = new FormControl(false);\r\n\r\n // ─── Computed visibility flags ───\r\n readonly isBorderViewType = computed(() =>\r\n BORDER_VIEW_TYPES.includes(this.viewType()),\r\n );\r\n readonly isUserViewType = computed(() =>\r\n USER_VIEW_TYPES.includes(this.viewType()),\r\n );\r\n readonly isLeafDetailsViewType = computed(\r\n () => this.viewType() === 'LeafDetails',\r\n );\r\n\r\n /** True when the document direction is RTL */\r\n private readonly isRtl = signal(\r\n this.doc.documentElement.getAttribute('dir') === 'rtl',\r\n );\r\n\r\n /** Align-end icon: right in LTR, left in RTL */\r\n readonly alignEndIcon = computed(() =>\r\n this.isRtl() ? 'layout.align-left-01' : 'layout.align-right-01',\r\n );\r\n\r\n constructor() {\r\n // Initialize form from input config\r\n effect(() => {\r\n const config = this.initialConfig();\r\n this.hideNameControl.patchValue(config.hideName ?? false);\r\n this.labelOnTopControl.patchValue(config.labelPosition === 'top');\r\n this.showBorderControl.patchValue(config.showBorder ?? false);\r\n this.alignEndControl.patchValue(config.alignEnd ?? false);\r\n this.showDisplayNameControl.patchValue(config.showDisplayName ?? true);\r\n this.showPhoneNumberControl.patchValue(config.showPhoneNumber ?? false);\r\n this.showEmailControl.patchValue(config.showEmail ?? false);\r\n });\r\n }\r\n\r\n onSave(): void {\r\n // Preserve existing size from configuration (managed via drag-resize)\r\n const existingConfig = this.facade\r\n .configurations()\r\n .find(\r\n (c) =>\r\n c.propertyKey === this.propertyKey() && c.areaKey === this.areaKey(),\r\n );\r\n const existingSize = existingConfig?.configuration?.['size'];\r\n const existingLeafLevels = existingConfig?.configuration?.['leafLevels'];\r\n\r\n const configuration: Record<string, unknown> = {};\r\n\r\n // Carry over size so drag-resize value is not lost\r\n if (existingSize != null) {\r\n configuration['size'] = existingSize;\r\n }\r\n if (existingLeafLevels != null) {\r\n configuration['leafLevels'] = existingLeafLevels;\r\n }\r\n\r\n if (!this.isLeafDetailsViewType()) {\r\n // Keep both keys for backward compatibility while the shared entities\r\n // layer now prefers hideLabel.\r\n configuration['hideName'] = this.hideNameControl.value ?? false;\r\n configuration['hideLabel'] = this.hideNameControl.value ?? false;\r\n }\r\n configuration['labelPosition'] = this.labelOnTopControl.value\r\n ? 'top'\r\n : 'bottom';\r\n if (!this.isLeafDetailsViewType()) {\r\n configuration['alignEnd'] = this.alignEndControl.value ?? false;\r\n }\r\n\r\n if (this.isBorderViewType()) {\r\n configuration['showBorder'] = this.showBorderControl.value ?? false;\r\n }\r\n if (this.isUserViewType()) {\r\n configuration['showDisplayName'] =\r\n this.showDisplayNameControl.value ?? false;\r\n configuration['showPhoneNumber'] =\r\n this.showPhoneNumberControl.value ?? false;\r\n configuration['showEmail'] = this.showEmailControl.value ?? false;\r\n }\r\n\r\n const newDisplayArea = {\r\n areaKey: this.areaKey(),\r\n order: this.currentOrder(),\r\n configuration,\r\n };\r\n\r\n // Build bulk items from existing configs, replacing the current property+area\r\n const configs = this.facade.configurations();\r\n const itemsMap = new Map<string, BulkReplaceItem['displayAreas']>();\r\n\r\n for (const c of configs) {\r\n // Skip the entry being replaced\r\n if (\r\n c.propertyKey === this.propertyKey() &&\r\n c.areaKey === this.areaKey()\r\n ) {\r\n continue;\r\n }\r\n if (!itemsMap.has(c.propertyKey)) {\r\n itemsMap.set(c.propertyKey, []);\r\n }\r\n itemsMap.get(c.propertyKey)!.push({\r\n areaKey: c.areaKey,\r\n order: c.order,\r\n configuration: c.configuration,\r\n });\r\n }\r\n\r\n // Add/replace the current property's area config\r\n if (!itemsMap.has(this.propertyKey())) {\r\n itemsMap.set(this.propertyKey(), []);\r\n }\r\n itemsMap.get(this.propertyKey())!.push(newDisplayArea);\r\n\r\n const items: BulkReplaceItem[] = Array.from(itemsMap.entries()).map(\r\n ([propertyKey, displayAreas]) => ({ propertyKey, displayAreas }),\r\n );\r\n\r\n this.submitting.set(true);\r\n this.facade.bulkReplaceConfigurations(items).subscribe({\r\n next: () => this.ref.close(true),\r\n error: () => this.submitting.set(false),\r\n });\r\n }\r\n\r\n onCancel(): void {\r\n this.ref.close(null);\r\n }\r\n}\r\n","<ng-container *transloco=\"let t; prefix: 'customization'\">\r\n <div [class]=\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\">\r\n <div class=\"mt-2 h-full overflow-y-auto pb-10 flex flex-col gap-5\">\r\n @if (!isLeafDetailsViewType()) {\r\n <!-- Hide Name Toggle -->\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('hide-name')\"\r\n icon=\"general.eye-off\"\r\n [formControl]=\"hideNameControl\"\r\n ></mt-toggle-field>\r\n }\r\n\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('label-on-top')\"\r\n icon=\"layout.align-right-02\"\r\n [formControl]=\"labelOnTopControl\"\r\n ></mt-toggle-field>\r\n\r\n @if (!isLeafDetailsViewType()) {\r\n <!-- Align End Toggle -->\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('align-end')\"\r\n [icon]=\"alignEndIcon()\"\r\n [formControl]=\"alignEndControl\"\r\n ></mt-toggle-field>\r\n }\r\n\r\n <!-- Show Border Toggle (Text, Currency, Date, DateTime) -->\r\n @if (isBorderViewType()) {\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('show-border')\"\r\n icon=\"layout.layout-grid-01\"\r\n [formControl]=\"showBorderControl\"\r\n ></mt-toggle-field>\r\n }\r\n\r\n <!-- User-specific Toggles -->\r\n @if (isUserViewType()) {\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('show-display-name')\"\r\n icon=\"user.user-circle\"\r\n [formControl]=\"showDisplayNameControl\"\r\n ></mt-toggle-field>\r\n\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('show-phone-number')\"\r\n icon=\"communication.phone\"\r\n [formControl]=\"showPhoneNumberControl\"\r\n ></mt-toggle-field>\r\n\r\n <mt-toggle-field\r\n toggleShape=\"card\"\r\n [label]=\"t('show-email')\"\r\n icon=\"communication.mail-01\"\r\n [formControl]=\"showEmailControl\"\r\n ></mt-toggle-field>\r\n }\r\n </div>\r\n </div>\r\n\r\n <div [class]=\"modalService.footerClass\">\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n severity=\"secondary\"\r\n [disabled]=\"submitting()\"\r\n (onClick)=\"onCancel()\"\r\n ></mt-button>\r\n <mt-button\r\n [label]=\"t('save')\"\r\n severity=\"primary\"\r\n [loading]=\"submitting()\"\r\n (onClick)=\"onSave()\"\r\n ></mt-button>\r\n </div>\r\n</ng-container>\r\n","import { Component, computed, input, output } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { TranslocoDirective } from '@jsverse/transloco';\r\nimport { Button } from '@masterteam/components/button';\r\nimport { Icon } from '@masterteam/icons';\r\nimport { ToggleField } from '@masterteam/components/toggle-field';\r\nimport type { ManagePreviewPropertyItem } from '../../store/customization';\r\nimport type {\r\n LeafLevelConfig,\r\n LeafLevelSavedConfig,\r\n} from '../../store/customization/api.model';\r\n\r\n@Component({\r\n selector: 'mt-leaf-details-selector',\r\n standalone: true,\r\n imports: [FormsModule, TranslocoDirective, Icon, ToggleField, Button],\r\n templateUrl: './leaf-details-selector.html',\r\n})\r\nexport class LeafDetailsSelector {\r\n readonly property = input.required<\r\n ManagePreviewPropertyItem & { enabled: boolean }\r\n >();\r\n readonly leafLevels = input<Record<string, LeafLevelSavedConfig>>({});\r\n readonly showEditAction = input(false);\r\n\r\n readonly configChange = output<Record<string, LeafLevelSavedConfig>>();\r\n readonly editRequested = output<void>();\r\n\r\n readonly levels = computed<LeafLevelConfig[]>(\r\n () => (this.property().configuration as unknown as LeafLevelConfig[]) ?? [],\r\n );\r\n\r\n isLevelEnabled(levelId: number): boolean {\r\n return this.leafLevels()[String(levelId)] != null;\r\n }\r\n\r\n isStatusSelected(levelId: number, statusKey: string): boolean {\r\n return (\r\n this.leafLevels()[String(levelId)]?.selectedStatuses.includes(\r\n statusKey,\r\n ) ?? false\r\n );\r\n }\r\n\r\n /** Section toggle — show or hide the entire level in the preview */\r\n toggleLevel(levelId: number, enabled: boolean): void {\r\n const current = { ...this.leafLevels() };\r\n if (enabled) {\r\n const level = this.levels().find((l) => l.levelId === levelId);\r\n current[String(levelId)] = {\r\n order: Object.keys(current).length + 1,\r\n selectedStatuses: level?.statuses.map((s) => s.key) ?? [],\r\n };\r\n } else {\r\n delete current[String(levelId)];\r\n }\r\n this.configChange.emit(current);\r\n }\r\n\r\n /** Status toggle — show or hide a single status badge in the level preview */\r\n toggleStatus(levelId: number, statusKey: string): void {\r\n const current = { ...this.leafLevels() };\r\n const saved = current[String(levelId)];\r\n if (!saved) return;\r\n const idx = saved.selectedStatuses.indexOf(statusKey);\r\n current[String(levelId)] = {\r\n ...saved,\r\n selectedStatuses:\r\n idx >= 0\r\n ? saved.selectedStatuses.filter((k) => k !== statusKey)\r\n : [...saved.selectedStatuses, statusKey],\r\n };\r\n this.configChange.emit(current);\r\n }\r\n\r\n onEditClick(): void {\r\n this.editRequested.emit();\r\n }\r\n}\r\n","<ng-container *transloco=\"let t; prefix: 'customization'\">\r\n <div class=\"space-y-2 pt-1\">\r\n <div class=\"flex items-center gap-1 px-1\">\r\n <p class=\"text-sm font-semibold text-color\">\r\n {{ t(\"leaf-details-target-statuses\") }}\r\n </p>\r\n @if (showEditAction()) {\r\n <mt-button\r\n icon=\"editor.pencil-01\"\r\n variant=\"text\"\r\n severity=\"primary\"\r\n (onClick)=\"onEditClick()\"\r\n />\r\n }\r\n </div>\r\n\r\n @for (level of levels(); track $index) {\r\n <div class=\"rounded-lg border border-surface-200 overflow-hidden\">\r\n <!-- Level header: icon + name | section toggle (show/hide this level) -->\r\n <div class=\"flex items-center gap-2 px-3 py-2.5\">\r\n <mt-icon\r\n [icon]=\"level.levelIcon\"\r\n size=\"xs\"\r\n class=\"text-color-secondary shrink-0\"\r\n />\r\n <span class=\"flex-1 text-sm font-medium truncate\">{{\r\n level.levelName\r\n }}</span>\r\n <mt-toggle-field\r\n [ngModel]=\"isLevelEnabled(level.levelId)\"\r\n (ngModelChange)=\"toggleLevel(level.levelId, $event)\"\r\n size=\"small\"\r\n class=\"shrink-0\"\r\n />\r\n </div>\r\n\r\n <!-- Status rows: each toggle shows/hides that status badge in the preview -->\r\n @if (isLevelEnabled(level.levelId)) {\r\n <div class=\"border-t border-surface-200 divide-y divide-surface-100\">\r\n @for (status of level.statuses; track $index) {\r\n <div class=\"flex items-center gap-2.5 px-3 py-2\">\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full shrink-0 border border-black/10\"\r\n [style.background-color]=\"status.color ?? '#9CA3AF'\"\r\n ></span>\r\n <span class=\"text-sm flex-1 truncate\">{{\r\n status.display\r\n }}</span>\r\n <mt-toggle-field\r\n [ngModel]=\"isStatusSelected(level.levelId, status.key)\"\r\n (ngModelChange)=\"toggleStatus(level.levelId, status.key)\"\r\n size=\"small\"\r\n class=\"shrink-0\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</ng-container>\r\n","import {\r\n Component,\r\n computed,\r\n effect,\r\n inject,\r\n OnInit,\r\n signal,\r\n} from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { TranslocoDirective } from '@jsverse/transloco';\r\nimport { Card } from '@masterteam/components/card';\r\nimport { TextField } from '@masterteam/components/text-field';\r\nimport { ToggleField } from '@masterteam/components/toggle-field';\r\nimport { Button } from '@masterteam/components/button';\r\nimport { Tabs } from '@masterteam/components/tabs';\r\nimport {\r\n EntitiesManage,\r\n EntityLeafDetailsConfig,\r\n buildDisplayEntities,\r\n isLeafDetailsSyntheticKey,\r\n LEAF_DETAILS_KEY_SEPARATOR,\r\n} from '@masterteam/components/entities';\r\nimport { ModalService } from '@masterteam/components/modal';\r\nimport { Icon } from '@masterteam/icons';\r\nimport { Skeleton } from 'primeng/skeleton';\r\nimport type {\r\n EntityData,\r\n EntityLabelPosition,\r\n EntityViewType,\r\n EntityStatusValue,\r\n EntityLookupValue,\r\n EntityUserValue,\r\n EntityResizeEvent,\r\n PropertyEditConfig,\r\n} from './customization.model';\r\nimport { EDITABLE_VIEW_TYPES } from './customization.model';\r\nimport { CustomizationFacade } from '../store';\r\nimport type {\r\n ManagePreviewPropertyItem,\r\n DisplayConfiguration,\r\n BulkReplaceItem,\r\n} from '../store/customization';\r\nimport type {\r\n LeafLevelConfig,\r\n LeafLevelSavedConfig,\r\n} from '../store/customization/api.model';\r\nimport { PropertyConfigDrawer } from './property-config-drawer/property-config-drawer';\r\nimport { LeafDetailsSelector } from './leaf-details-selector/leaf-details-selector';\r\n\r\n@Component({\r\n selector: 'mt-customization',\r\n standalone: true,\r\n imports: [\r\n FormsModule,\r\n TranslocoDirective,\r\n Card,\r\n TextField,\r\n ToggleField,\r\n Button,\r\n Tabs,\r\n Skeleton,\r\n EntitiesManage,\r\n Icon,\r\n LeafDetailsSelector,\r\n ],\r\n templateUrl: './customization.html',\r\n styleUrl: './customization.scss',\r\n})\r\nexport class Customization implements OnInit {\r\n protected readonly facade = inject(CustomizationFacade);\r\n private readonly modalService = inject(ModalService);\r\n\r\n /** Set of viewTypes that have editable fields in the drawer (beyond size) */\r\n protected readonly editableViewTypes = new Set(EDITABLE_VIEW_TYPES);\r\n\r\n readonly searchQuery = signal('');\r\n readonly activeArea = signal<string | null>(null);\r\n\r\n // ── Derived signals ──\r\n readonly properties = this.facade.properties;\r\n readonly areas = this.facade.areas;\r\n readonly isLoading = this.facade.isLoadingProperties;\r\n readonly isLoadingAreas = this.facade.isLoadingAreas;\r\n readonly isLoadingPreview = computed(\r\n () =>\r\n this.facade.isLoadingConfigurations() ||\r\n this.facade.isLoadingProperties(),\r\n );\r\n\r\n readonly areasTabs = computed(() =>\r\n this.areas().map((area) => ({ label: area.name, value: area.key })),\r\n );\r\n\r\n /**\r\n * Configurations filtered to exclude properties that no longer exist in the catalog.\r\n * Prevents sending orphaned property references on save.\r\n */\r\n private readonly validConfigurations = computed(() => {\r\n const configs = this.facade.configurations();\r\n const props = this.properties();\r\n const propertyKeys = new Set(props.map((p) => p.key));\r\n return configs.filter((c) => propertyKeys.has(c.propertyKey));\r\n });\r\n\r\n /** Properties enriched with `enabled` based on current area configurations */\r\n readonly propertiesWithEnabled = computed(() => {\r\n const props = this.properties();\r\n const configs = this.validConfigurations();\r\n const area = this.activeArea();\r\n\r\n if (!area) return props.map((p) => ({ ...p, enabled: false }));\r\n\r\n return props.map((p) => ({\r\n ...p,\r\n enabled: configs.some(\r\n (c) => c.areaKey === area && c.propertyKey === p.key,\r\n ),\r\n }));\r\n });\r\n\r\n readonly filteredProperties = computed(() => {\r\n const query = this.searchQuery().toLowerCase().trim();\r\n const list = this.propertiesWithEnabled();\r\n\r\n // LeafDetails always first in the list regardless of active state\r\n const leaf = list.filter((p) => p.viewType === 'LeafDetails');\r\n const regular = list.filter((p) => p.viewType !== 'LeafDetails');\r\n const ordered = [...leaf, ...regular];\r\n\r\n if (!query) return ordered;\r\n\r\n return ordered.filter((prop) => {\r\n const name =\r\n typeof prop.name === 'string'\r\n ? prop.name\r\n : Object.values(prop.name).join(' ');\r\n return name.toLowerCase().includes(query);\r\n });\r\n });\r\n\r\n /**\r\n * LeafDetails saved configs indexed by propertyKey for the active area.\r\n * Used by the inline selector in the property list.\r\n */\r\n protected readonly leafConfigsByProp = computed<\r\n Record<string, Record<string, LeafLevelSavedConfig>>\r\n >(() => {\r\n const configs = this.validConfigurations();\r\n const area = this.activeArea();\r\n if (!area) return {};\r\n\r\n const result: Record<string, Record<string, LeafLevelSavedConfig>> = {};\r\n for (const config of configs) {\r\n if (config.areaKey !== area) continue;\r\n const leafLevels = config.configuration?.['leafLevels'];\r\n if (\r\n leafLevels &&\r\n typeof leafLevels === 'object' &&\r\n !Array.isArray(leafLevels)\r\n ) {\r\n result[config.propertyKey] = leafLevels as Record<\r\n string,\r\n LeafLevelSavedConfig\r\n >;\r\n }\r\n }\r\n return result;\r\n });\r\n\r\n /** Preview entities built from configurations + properties for the active area */\r\n previewEntities = signal<EntityData[]>([]);\r\n\r\n constructor() {\r\n // Set default active area when areas load\r\n effect(() => {\r\n const areas = this.areas();\r\n if (areas.length > 0 && !this.activeArea()) {\r\n this.activeArea.set(areas[0].key);\r\n }\r\n });\r\n\r\n // Rebuild preview entities when configs, properties, or active area change\r\n effect(() => {\r\n const configs = this.validConfigurations();\r\n const props = this.properties();\r\n const area = this.activeArea();\r\n\r\n if (!area || !props.length) {\r\n this.previewEntities.set([]);\r\n return;\r\n }\r\n\r\n const areaConfigs = configs.filter((c) => c.areaKey === area);\r\n const entities = buildDisplayEntities(\r\n areaConfigs.flatMap((config) =>\r\n this.buildEntitiesFromConfig(config, props),\r\n ),\r\n );\r\n\r\n this.previewEntities.set(entities);\r\n });\r\n }\r\n\r\n ngOnInit(): void {\r\n this.facade.loadAreas();\r\n this.facade.loadProperties();\r\n this.facade.loadConfigurations();\r\n }\r\n\r\n onPropertyToggle(\r\n prop: ManagePreviewPropertyItem & { enabled: boolean },\r\n enabled: boolean,\r\n ): void {\r\n // LeafDetails is managed entirely via the inline status selector — skip\r\n if (prop.viewType === 'LeafDetails') return;\r\n\r\n if (enabled) {\r\n this.activateProperty(\r\n prop,\r\n this.editableViewTypes.has(prop.viewType as EntityViewType),\r\n );\r\n return;\r\n }\r\n\r\n this.bulkSaveWithout(prop.key);\r\n }\r\n\r\n onEditProperty(prop: ManagePreviewPropertyItem): void {\r\n const area = this.activeArea();\r\n if (!area) return;\r\n\r\n const configs = this.validConfigurations();\r\n const existingConfig = configs.find(\r\n (c) => c.areaKey === area && c.propertyKey === prop.key,\r\n );\r\n\r\n this.openDrawer(prop, {\r\n currentOrder: existingConfig?.order,\r\n configuration: existingConfig?.configuration as\r\n | Record<string, unknown>\r\n | undefined,\r\n });\r\n }\r\n\r\n onEntityClicked(entity: EntityData): void {\r\n // LeafDetails sub-entities are configured inline — not via drawer\r\n const area = this.activeArea();\r\n if (!area || !entity.key) return;\r\n\r\n const propertyKey = isLeafDetailsSyntheticKey(entity.key)\r\n ? entity.key.split(LEAF_DETAILS_KEY_SEPARATOR)[0]\r\n : entity.key;\r\n\r\n const prop = this.properties().find((p) => p.key === propertyKey);\r\n if (!prop) return;\r\n\r\n if (!this.editableViewTypes.has(prop.viewType as EntityViewType)) return;\r\n\r\n const configs = this.validConfigurations();\r\n const existingConfig = configs.find(\r\n (c) => c.areaKey === area && c.propertyKey === propertyKey,\r\n );\r\n\r\n this.openDrawer(prop, {\r\n currentOrder: existingConfig?.order,\r\n configuration: existingConfig?.configuration as\r\n | Record<string, unknown>\r\n | undefined,\r\n });\r\n }\r\n\r\n onEntityResized(event: EntityResizeEvent): void {\r\n const area = this.activeArea();\r\n if (!area) return;\r\n\r\n const configs = this.validConfigurations();\r\n\r\n // ── LeafDetails sub-entity resize ──\r\n if (isLeafDetailsSyntheticKey(event.entity.key)) {\r\n const [propKey, levelId] = event.entity.key!.split(\r\n LEAF_DETAILS_KEY_SEPARATOR,\r\n );\r\n const existingConfig = configs.find(\r\n (c) => c.areaKey === area && c.propertyKey === propKey,\r\n );\r\n const leafLevels = {\r\n ...((existingConfig?.configuration?.['leafLevels'] as Record<\r\n string,\r\n LeafLevelSavedConfig\r\n >) ?? {}),\r\n };\r\n if (leafLevels[levelId]) {\r\n leafLevels[levelId] = { ...leafLevels[levelId], size: event.newSize };\r\n }\r\n const updatedConfigs = configs.map((c) =>\r\n c.areaKey === area && c.propertyKey === propKey\r\n ? { ...c, configuration: { ...c.configuration, leafLevels } }\r\n : c,\r\n );\r\n this.facade\r\n .bulkReplaceConfigurations(this.groupConfigsByProperty(updatedConfigs))\r\n .subscribe();\r\n return;\r\n }\r\n\r\n // ── Regular entity resize ──\r\n const updatedConfigs = configs.map((c) =>\r\n c.areaKey === area && c.propertyKey === event.entity.key\r\n ? { ...c, configuration: { ...c.configuration, size: event.newSize } }\r\n : c,\r\n );\r\n this.facade\r\n .bulkReplaceConfigurations(this.groupConfigsByProperty(updatedConfigs))\r\n .subscribe();\r\n }\r\n\r\n onEntitiesReordered(entities: EntityData[]): void {\r\n const area = this.activeArea();\r\n if (!area) return;\r\n\r\n const configs = this.validConfigurations();\r\n\r\n // Separate regular entities from LeafDetails sub-entities\r\n const regularEntities = entities.filter(\r\n (e) => !isLeafDetailsSyntheticKey(e.key),\r\n );\r\n const leafEntities = entities.filter((e) => isLeafDetailsSyntheticKey(e.key));\r\n\r\n // Regular entities → BulkReplaceItems\r\n const regularItems: BulkReplaceItem[] = regularEntities.map((entity) => {\r\n const existingConfig = configs.find(\r\n (c) => c.areaKey === area && c.propertyKey === entity.key,\r\n );\r\n return {\r\n propertyKey: entity.key!,\r\n displayAreas: [\r\n {\r\n areaKey: area,\r\n order: entity.order!,\r\n configuration:\r\n (existingConfig?.configuration as Record<string, unknown>) ?? {},\r\n },\r\n ],\r\n };\r\n });\r\n\r\n // Leaf entities → group by parent propertyKey, update per-level order\r\n const leafByProp = new Map<\r\n string,\r\n Array<{ levelId: string; order: number }>\r\n >();\r\n for (const entity of leafEntities) {\r\n const [propKey, levelId] = entity.key!.split(LEAF_DETAILS_KEY_SEPARATOR);\r\n if (!leafByProp.has(propKey)) leafByProp.set(propKey, []);\r\n leafByProp.get(propKey)!.push({ levelId, order: entity.order! });\r\n }\r\n\r\n const leafItems: BulkReplaceItem[] = [];\r\n for (const [propKey, levelUpdates] of leafByProp) {\r\n const existingConfig = configs.find(\r\n (c) => c.areaKey === area && c.propertyKey === propKey,\r\n );\r\n const leafLevels = {\r\n ...((existingConfig?.configuration?.['leafLevels'] as Record<\r\n string,\r\n LeafLevelSavedConfig\r\n >) ?? {}),\r\n };\r\n for (const { levelId, order } of levelUpdates) {\r\n if (leafLevels[levelId]) {\r\n leafLevels[levelId] = { ...leafLevels[levelId], order };\r\n }\r\n }\r\n const minOrder = Math.min(...levelUpdates.map((l) => l.order));\r\n leafItems.push({\r\n propertyKey: propKey,\r\n displayAreas: [\r\n {\r\n areaKey: area,\r\n order: existingConfig?.order ?? minOrder,\r\n configuration: { ...existingConfig?.configuration, leafLevels },\r\n },\r\n ],\r\n });\r\n }\r\n\r\n // Configs from other areas (preserve as-is)\r\n const otherAreaItems = this.groupConfigsByProperty(\r\n configs.filter((c) => c.areaKey !== area),\r\n );\r\n\r\n this.facade\r\n .bulkReplaceConfigurations(\r\n this.mergeItems([...regularItems, ...leafItems], otherAreaItems),\r\n )\r\n .subscribe();\r\n }\r\n\r\n /**\r\n * Called by the inline LeafDetailsSelector when the user changes status selections.\r\n * Immediately persists the updated leafLevels configuration.\r\n */\r\n onLeafConfigChange(\r\n prop: ManagePreviewPropertyItem,\r\n leafLevels: Record<string, LeafLevelSavedConfig>,\r\n ): void {\r\n const area = this.activeArea();\r\n if (!area) return;\r\n\r\n const configs = this.validConfigurations();\r\n const existingConfig = configs.find(\r\n (c) => c.areaKey === area && c.propertyKey === prop.key,\r\n );\r\n\r\n // Ensure every level has an order assigned\r\n let nextOrder =\r\n configs.filter((c) => c.areaKey === area && c.propertyKey !== prop.key)\r\n .length + 1;\r\n const normalizedLevels: Record<string, LeafLevelSavedConfig> = {};\r\n for (const [levelId, levelCfg] of Object.entries(leafLevels)) {\r\n normalizedLevels[levelId] = levelCfg.order\r\n ? levelCfg\r\n : { ...levelCfg, order: nextOrder++ };\r\n }\r\n\r\n // Other configs excluding this leaf property in the current area\r\n const otherItems = this.groupConfigsByProperty(\r\n configs.filter(\r\n (c) => !(c.areaKey === area && c.propertyKey === prop.key),\r\n ),\r\n );\r\n\r\n if (Object.keys(normalizedLevels).length === 0) {\r\n // All levels deselected — remove property from display config\r\n this.facade.bulkReplaceConfigurations(otherItems).subscribe();\r\n return;\r\n }\r\n\r\n const minOrder = Math.min(\r\n ...Object.values(normalizedLevels).map((l) => l.order),\r\n );\r\n const newItem: BulkReplaceItem = {\r\n propertyKey: prop.key,\r\n displayAreas: [\r\n {\r\n areaKey: area,\r\n order: existingConfig?.order ?? minOrder,\r\n configuration: {\r\n ...(existingConfig?.configuration as Record<string, unknown>),\r\n leafLevels: normalizedLevels,\r\n },\r\n },\r\n ],\r\n };\r\n\r\n this.facade\r\n .bulkReplaceConfigurations(this.mergeItems([newItem], otherItems))\r\n .subscribe();\r\n }\r\n\r\n // ── Private helpers ──\r\n\r\n /**\r\n * Builds zero or more EntityData entries from a single DisplayConfiguration.\r\n * Regular properties → one entity. LeafDetails → one entity per enabled level.\r\n */\r\n private buildEntitiesFromConfig(\r\n config: DisplayConfiguration,\r\n props: ManagePreviewPropertyItem[],\r\n ): EntityData[] {\r\n const prop = props.find((p) => p.key === config.propertyKey);\r\n if (!prop) return [];\r\n\r\n if (prop.viewType === 'LeafDetails') {\r\n return this.buildLeafDetailsEntities(config, prop);\r\n }\r\n\r\n const entity = this.buildEntityFromConfig(config, props);\r\n return entity ? [entity] : [];\r\n }\r\n\r\n /** Builds the shared LeafDetails entity that preview/manage will expand. */\r\n private buildLeafDetailsEntities(\r\n config: DisplayConfiguration,\r\n prop: ManagePreviewPropertyItem,\r\n ): EntityData[] {\r\n const levels = (prop.configuration as unknown as LeafLevelConfig[]) ?? [];\r\n const leafLevels = config.configuration?.['leafLevels'] as\r\n | Record<string, LeafLevelSavedConfig>\r\n | undefined;\r\n if (!leafLevels) return [];\r\n\r\n return [\r\n {\r\n id: prop.id,\r\n propertyId: prop.id,\r\n key: prop.key,\r\n name: this.getPropertyDisplayName(prop),\r\n propertyConfiguration: prop.configuration as EntityData['propertyConfiguration'],\r\n value: levels.map((level) => ({\r\n levelId: level.levelId,\r\n levelName: level.levelName,\r\n levelIcon: level.levelIcon,\r\n statuses: level.statuses.map((status) => ({\r\n key: status.key,\r\n display: status.display,\r\n color: status.color,\r\n count: 0,\r\n })),\r\n })),\r\n viewType: 'LeafDetails' as EntityViewType,\r\n order: config.order,\r\n configuration: {\r\n ...(config.configuration as EntityLeafDetailsConfig | undefined),\r\n leafLevels,\r\n },\r\n },\r\n ];\r\n }\r\n\r\n private activateProperty(\r\n prop: ManagePreviewPropertyItem,\r\n openConfigAfterSave = false,\r\n ): void {\r\n const area = this.activeArea();\r\n if (!area) return;\r\n\r\n const configs = this.validConfigurations();\r\n const existingConfig = configs.find(\r\n (c) => c.areaKey === area && c.propertyKey === prop.key,\r\n );\r\n\r\n if (existingConfig) {\r\n if (openConfigAfterSave) {\r\n this.openDrawer(prop, {\r\n currentOrder: existingConfig.order,\r\n configuration: existingConfig.configuration as Record<\r\n string,\r\n unknown\r\n >,\r\n });\r\n }\r\n return;\r\n }\r\n\r\n const areaConfigs = configs.filter((c) => c.areaKey === area);\r\n const nextOrder = areaConfigs.length + 1;\r\n const configuration: Record<string, unknown> = {};\r\n\r\n const itemsMap = new Map<string, BulkReplaceItem['displayAreas']>();\r\n for (const c of configs) {\r\n if (!itemsMap.has(c.propertyKey)) itemsMap.set(c.propertyKey, []);\r\n itemsMap.get(c.propertyKey)!.push({\r\n areaKey: c.areaKey,\r\n order: c.order,\r\n configuration: c.configuration as Record<string, unknown>,\r\n });\r\n }\r\n\r\n if (!itemsMap.has(prop.key)) itemsMap.set(prop.key, []);\r\n itemsMap\r\n .get(prop.key)!\r\n .push({ areaKey: area, order: nextOrder, configuration });\r\n\r\n const items: BulkReplaceItem[] = Array.from(itemsMap.entries()).map(\r\n ([propertyKey, displayAreas]) => ({ propertyKey, displayAreas }),\r\n );\r\n\r\n this.facade.bulkReplaceConfigurations(items).subscribe({\r\n next: () => {\r\n if (openConfigAfterSave) {\r\n this.openDrawer(prop, { currentOrder: nextOrder, configuration });\r\n }\r\n },\r\n });\r\n }\r\n\r\n private bulkSaveWithout(excludePropertyKey: string): void {\r\n const configs = this.validConfigurations();\r\n const items = this.groupConfigsByProperty(\r\n configs.filter((c) => c.propertyKey !== excludePropertyKey),\r\n );\r\n this.facade.bulkReplaceConfigurations(items).subscribe();\r\n }\r\n\r\n private groupConfigsByProperty(\r\n configs: DisplayConfiguration[],\r\n ): BulkReplaceItem[] {\r\n const map = new Map<string, BulkReplaceItem['displayAreas']>();\r\n for (const c of configs) {\r\n if (!map.has(c.propertyKey)) map.set(c.propertyKey, []);\r\n map.get(c.propertyKey)!.push({\r\n areaKey: c.areaKey,\r\n order: c.order,\r\n configuration: c.configuration as Record<string, unknown>,\r\n });\r\n }\r\n return Array.from(map.entries()).map(([propertyKey, displayAreas]) => ({\r\n propertyKey,\r\n displayAreas,\r\n }));\r\n }\r\n\r\n private mergeItems(\r\n primary: BulkReplaceItem[],\r\n secondary: BulkReplaceItem[],\r\n ): BulkReplaceItem[] {\r\n const map = new Map<string, BulkReplaceItem['displayAreas']>();\r\n for (const item of primary)\r\n map.set(item.propertyKey, [...item.displayAreas]);\r\n for (const item of secondary) {\r\n const existing = map.get(item.propertyKey);\r\n if (existing) existing.push(...item.displayAreas);\r\n else map.set(item.propertyKey, [...item.displayAreas]);\r\n }\r\n return Array.from(map.entries()).map(([propertyKey, displayAreas]) => ({\r\n propertyKey,\r\n displayAreas,\r\n }));\r\n }\r\n\r\n private openDrawer(\r\n prop: ManagePreviewPropertyItem,\r\n existingConfig?: {\r\n currentOrder?: number;\r\n configuration?: Record<string, unknown>;\r\n },\r\n ): void {\r\n const area = this.activeArea();\r\n if (!area) return;\r\n\r\n const configs = this.validConfigurations();\r\n const areaConfigs = configs.filter((c) => c.areaKey === area);\r\n const nextOrder = existingConfig?.currentOrder ?? areaConfigs.length + 1;\r\n\r\n const displayName = this.getPropertyDisplayName(prop);\r\n const initConfig = this.toPropertyEditConfig(existingConfig?.configuration);\r\n\r\n this.modalService.openModal(PropertyConfigDrawer, 'drawer', {\r\n header: displayName,\r\n styleClass:\r\n '!absolute !shadow-none min-[1025px]:!w-[27%] max-[1024px]:!w-[min(92vw,28rem)]',\r\n position: 'end',\r\n appendTo: '#page-content',\r\n dismissible: true,\r\n inputValues: {\r\n propertyKey: prop.key,\r\n propertyName: displayName,\r\n viewType: prop.viewType,\r\n areaKey: area,\r\n currentOrder: nextOrder,\r\n initialConfig: initConfig,\r\n },\r\n });\r\n }\r\n\r\n private toPropertyEditConfig(\r\n configuration?: Record<string, unknown>,\r\n ): PropertyEditConfig {\r\n const labelPosition =\r\n (configuration?.['labelPosition'] as EntityLabelPosition | undefined) ??\r\n (configuration?.['labelPostion'] as EntityLabelPosition | undefined) ??\r\n 'bottom';\r\n\r\n return {\r\n hideName:\r\n (configuration?.['hideLabel'] as boolean | undefined) ??\r\n (configuration?.['hideName'] as boolean | undefined) ??\r\n false,\r\n labelPosition,\r\n showBorder: (configuration?.['showBorder'] as boolean) ?? false,\r\n alignEnd: (configuration?.['alignEnd'] as boolean) ?? false,\r\n showDisplayName: (configuration?.['showDisplayName'] as boolean) ?? true,\r\n showPhoneNumber: (configuration?.['showPhoneNumber'] as boolean) ?? false,\r\n showEmail: (configuration?.['showEmail'] as boolean) ?? false,\r\n };\r\n }\r\n\r\n private buildEntityFromConfig(\r\n config: DisplayConfiguration,\r\n props: ManagePreviewPropertyItem[],\r\n ): EntityData | null {\r\n const prop = props.find((p) => p.key === config.propertyKey);\r\n if (!prop) return null;\r\n\r\n const displayName = this.getPropertyDisplayName(prop);\r\n const viewType = prop.viewType as EntityViewType;\r\n\r\n return {\r\n id: prop.id,\r\n propertyId: prop.id,\r\n key: prop.key,\r\n name: displayName,\r\n value: this.getPlaceholderValue(viewType, displayName),\r\n rawValue: this.getPlaceholderRawValue(viewType, displayName),\r\n viewType,\r\n order: config.order,\r\n propertyConfiguration: prop.configuration as EntityData['propertyConfiguration'],\r\n configuration: config.configuration as EntityData['configuration'],\r\n };\r\n }\r\n\r\n private getPropertyDisplayName(prop: ManagePreviewPropertyItem): string {\r\n if (typeof prop.name === 'string') return prop.name;\r\n if (prop.name && typeof prop.name === 'object') {\r\n return (\r\n (prop.name as Record<string, string>)['display'] ||\r\n Object.values(prop.name)[0] ||\r\n prop.key\r\n );\r\n }\r\n return prop.key;\r\n }\r\n\r\n private getPlaceholderValue(\r\n viewType: EntityViewType,\r\n name: string,\r\n ): string | EntityStatusValue | EntityLookupValue | EntityUserValue {\r\n switch (viewType) {\r\n case 'Text':\r\n return 'Sample Text';\r\n case 'LongText':\r\n return '<p>Sample long text content</p>';\r\n case 'Date':\r\n return '2026-01-15';\r\n case 'DateTime':\r\n return '2026-01-15 10:30';\r\n case 'Percentage':\r\n return '75%';\r\n case 'Status':\r\n return { key: 'sample', display: 'in Progress', color: '#3B82F6' };\r\n case 'Lookup':\r\n return {\r\n key: 'sample',\r\n display: name,\r\n color: '#8B5CF6',\r\n description: '',\r\n };\r\n case 'Currency':\r\n return '$1,250.00';\r\n case 'Checkbox':\r\n return 'true';\r\n case 'User':\r\n return {\r\n displayName: name,\r\n photoUrl: '',\r\n phoneNumber: '+1234567890',\r\n email: 'user@example.com',\r\n };\r\n default:\r\n return name;\r\n }\r\n }\r\n\r\n private getPlaceholderRawValue(\r\n viewType: EntityViewType,\r\n name: string,\r\n ): string {\r\n switch (viewType) {\r\n case 'Percentage':\r\n return '75';\r\n case 'Checkbox':\r\n return 'true';\r\n default:\r\n return name;\r\n }\r\n }\r\n}\r\n","<ng-container *transloco=\"let t; prefix: 'customization'\">\r\n <div\r\n class=\"flex gap-6 h-full w-full overflow-hidden max-[1025px]:min-h-0 max-[1025px]:min-w-0 max-[1025px]:flex-col max-[1025px]:gap-4 max-[1025px]:overflow-x-hidden max-[1025px]:overflow-y-auto\"\r\n >\r\n <!-- ─── Left Sidebar: Attributes Panel ─── -->\r\n <mt-card\r\n class=\"w-1/5 h-full flex flex-col overflow-hidden pb-3 max-[1025px]:h-auto max-[1025px]:max-h-[42vh] max-[1025px]:min-h-0 max-[1025px]:w-full\"\r\n >\r\n <ng-template #headless>\r\n <!-- Header -->\r\n <h3 class=\"text-xl font-semibold px-4 pt-5 pb-3\">\r\n {{ t(\"attributes\") }}\r\n </h3>\r\n\r\n <!-- Properties List -->\r\n <div class=\"flex-1 overflow-y-auto px-4 pb-4 space-y-3\">\r\n <!-- Search Field -->\r\n <div class=\"sticky top-0 bg-surface-0 mb-0 py-3 pb-2 mb-1 z-10\">\r\n <mt-text-field\r\n [placeholder]=\"t('search-properties')\"\r\n [(ngModel)]=\"searchQuery\"\r\n icon=\"general.search-lg\"\r\n />\r\n </div>\r\n @if (isLoading()) {\r\n @for (i of [1, 2, 3, 4, 5, 6]; track i) {\r\n <div class=\"flex items-center gap-1 p-1 rounded-lg\">\r\n <p-skeleton height=\"4rem\" />\r\n </div>\r\n }\r\n } @else {\r\n @for (prop of filteredProperties(); track prop.id) {\r\n @if (prop.viewType === \"LeafDetails\") {\r\n <!-- ── LeafDetails: always first, title is \"Target Statuses\" inside the selector ── -->\r\n <div\r\n class=\"rounded-lg border border-gray-300 border-dashed px-4 py-3\"\r\n >\r\n <mt-leaf-details-selector\r\n [property]=\"prop\"\r\n [leafLevels]=\"leafConfigsByProp()[prop.key] ?? {}\"\r\n [showEditAction]=\"prop.enabled && editableViewTypes.has(prop.viewType)\"\r\n (configChange)=\"onLeafConfigChange(prop, $event)\"\r\n (editRequested)=\"onEditProperty(prop)\"\r\n />\r\n </div>\r\n } @else {\r\n <!-- ── Normal property toggle row ── -->\r\n <div\r\n class=\"flex items-center gap-3 px-4 rounded-lg border border-gray-300 border-dashed hover:bg-emphasis transition-colors\"\r\n >\r\n <!-- Property Name -->\r\n <div class=\"flex-1 min-w-0 py-4\">\r\n <span\r\n class=\"text-sm font-medium truncate block\"\r\n [class.text-primary]=\"prop.enabled\"\r\n >\r\n {{ prop.name?.display }}\r\n </span>\r\n </div>\r\n\r\n <!-- Edit Button (visible when enabled and viewType has configurable fields) -->\r\n @if (prop.enabled && editableViewTypes.has(prop.viewType)) {\r\n <mt-button\r\n icon=\"editor.pencil-01\"\r\n variant=\"text\"\r\n severity=\"primary\"\r\n (onClick)=\"onEditProperty(prop)\"\r\n />\r\n }\r\n\r\n <!-- Toggle -->\r\n <mt-toggle-field\r\n [ngModel]=\"prop.enabled\"\r\n (ngModelChange)=\"onPropertyToggle(prop, $event)\"\r\n class=\"shrink-0\"\r\n size=\"small\"\r\n ></mt-toggle-field>\r\n </div>\r\n }\r\n }\r\n\r\n @if (filteredProperties().length === 0) {\r\n <div class=\"py-8 text-center text-muted-color\">\r\n <p class=\"text-sm\">{{ t(\"no-properties\") }}</p>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </ng-template>\r\n </mt-card>\r\n\r\n <!-- ─── Main Area: Preview ─── -->\r\n <div\r\n class=\"w-3/5 flex flex-col gap-4 h-full overflow-hidden items-center max-[1025px]:h-auto max-[1025px]:min-h-0 max-[1025px]:min-w-0 max-[1025px]:w-full max-[1025px]:flex-1 max-[1025px]:items-stretch max-[1025px]:overflow-visible max-[1025px]:pb-4\"\r\n >\r\n <!-- Area Tabs -->\r\n @if (isLoadingAreas()) {\r\n <div class=\"flex gap-2 py-1\">\r\n @for (i of [1, 2, 3]; track i) {\r\n <p-skeleton width=\"6rem\" height=\"2.25rem\" borderRadius=\"8px\" />\r\n }\r\n </div>\r\n } @else if (areasTabs().length > 0) {\r\n <div class=\"max-[1025px]:w-full\">\r\n <div\r\n class=\"max-[1025px]:w-full max-[1025px]:min-w-0 max-[1025px]:overflow-x-auto max-[1025px]:pb-1\"\r\n >\r\n <mt-tabs\r\n class=\"max-[1025px]:min-w-max\"\r\n [options]=\"areasTabs()\"\r\n [(active)]=\"activeArea\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- Entities Preview -->\r\n <mt-card\r\n class=\"w-130 flex-1 overflow-hidden max-[1025px]:w-full max-[1025px]:min-h-[24rem]\"\r\n >\r\n <div>\r\n <ng-template #headless>\r\n <div class=\"overflow-auto h-full my-2 py-3 px-4\">\r\n @if (isLoadingPreview()) {\r\n <div\r\n class=\"grid grid-cols-24 gap-x-4 gap-y-5 p-4 max-[640px]:grid-cols-1 max-[640px]:gap-4\"\r\n >\r\n <div\r\n class=\"col-span-20 flex items-center gap-2.5 p-3 max-[640px]:col-span-1\"\r\n >\r\n <p-skeleton size=\"4rem\" shape=\"circle\" />\r\n <div class=\"flex flex-col gap-1 flex-1\">\r\n <p-skeleton height=\"2.5rem\" borderRadius=\"4px\" />\r\n </div>\r\n </div>\r\n @for (i of [1, 2, 3, 4]; track i) {\r\n <div\r\n class=\"col-span-8 flex flex-col gap-1.5 p-3 max-[640px]:col-span-1\"\r\n >\r\n <p-skeleton height=\"4rem\" borderRadius=\"6px\" />\r\n </div>\r\n }\r\n </div>\r\n } @else if (previewEntities().length > 0) {\r\n <mt-entities-manage\r\n [(entities)]=\"previewEntities\"\r\n (entitiesReordered)=\"onEntitiesReordered($event)\"\r\n (entityResized)=\"onEntityResized($event)\"\r\n (entityClicked)=\"onEntityClicked($event)\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-full text-muted-color gap-3 text-center px-4\"\r\n >\r\n <mt-icon\r\n name=\"general.eye-off\"\r\n size=\"xl\"\r\n class=\"opacity-40\"\r\n />\r\n <p class=\"text-sm font-medium\">{{ t(\"no-preview-items\") }}</p>\r\n <p class=\"text-xs\">{{ t(\"no-preview-items-hint\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n </div>\r\n </mt-card>\r\n </div>\r\n </div>\r\n</ng-container>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAmCA;AACO,MAAM,iBAAiB,GAAqB;IACjD,MAAM;IACN,UAAU;IACV,UAAU;IACV,MAAM;IACN,UAAU;IACV,aAAa;CACd;AAED;AACO,MAAM,eAAe,GAAqB,CAAC,MAAM,CAAC;AAEzD;;;AAGG;AACI,MAAM,mBAAmB,GAAqB;IACnD,MAAM;IACN,UAAU;IACV,UAAU;IACV,MAAM;IACN,UAAU;IACV,aAAa;IACb,YAAY;IACZ,QAAQ;IACR,UAAU;IACV,QAAQ;IACR,cAAc;IACd,YAAY;IACZ,MAAM;CACP;;MChEY,gBAAgB,CAAA;AAGC,IAAA,MAAA;AAF5B,IAAA,OAAgB,IAAI,GAAG,gCAAgC;AAEvD,IAAA,WAAA,CAA4B,MAAgC,EAAA;QAAhC,IAAA,CAAA,MAAM,GAAN,MAAM;IAA6B;;MAGpD,qBAAqB,CAAA;AAChC,IAAA,OAAgB,IAAI,GAAG,2BAA2B;;MAGvC,8BAA8B,CAAA;AAGb,IAAA,QAAA;AAF5B,IAAA,OAAgB,IAAI,GAAG,oCAAoC;AAE3D,IAAA,WAAA,CAA4B,QAAmB,EAAA;QAAnB,IAAA,CAAA,QAAQ,GAAR,QAAQ;IAAc;;MAGvC,0BAA0B,CAAA;AAInB,IAAA,UAAA;AACA,IAAA,QAAA;AACA,IAAA,gBAAA;AACA,IAAA,cAAA;AACA,IAAA,UAAA;AAPlB,IAAA,OAAgB,IAAI,GAAG,iCAAiC;IAExD,WAAA,CACkB,UAAkB,EAClB,QAAyB,EACzB,gBAAyB,EACzB,cAAgC,EAChC,UAAmB,EAAA;QAJn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CAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,EAAA,mBAAA,EAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACd,IAAI,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACJ,mBAAmB,EAAA,QAAA,EAAA,0BAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,YAAA,EAAA,gBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,cAAA,EAAA,eAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAKV,aAAa,EAAA,UAAA,EAAA,CAAA;kBAnBzB,SAAS;+BACE,kBAAkB,EAAA,UAAA,EAChB,IAAI,EAAA,OAAA,EACP;wBACP,WAAW;wBACX,kBAAkB;wBAClB,IAAI;wBACJ,SAAS;wBACT,WAAW;wBACX,MAAM;wBACN,IAAI;wBACJ,QAAQ;wBACR,cAAc;wBACd,IAAI;wBACJ,mBAAmB;AACpB,qBAAA,EAAA,QAAA,EAAA,ogPAAA,EAAA,MAAA,EAAA,CAAA,wEAAA,CAAA,EAAA;;;AEhEH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masterteam/customization",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/customization",
6
6
  "linkDirectory": false,
@@ -12,7 +12,7 @@
12
12
  "@angular/forms": "^21.2.8",
13
13
  "@angular/cdk": "^21.2.6",
14
14
  "@ngxs/store": "^20.1.0",
15
- "@masterteam/components": "^0.0.141",
15
+ "@masterteam/components": "^0.0.143",
16
16
  "@masterteam/icons": "^0.0.14"
17
17
  },
18
18
  "exports": {
@@ -1,7 +1,8 @@
1
1
  import * as _masterteam_customization from '@masterteam/customization';
2
2
  import * as _angular_core from '@angular/core';
3
3
  import { OnInit } from '@angular/core';
4
- import { EntityViewType, EntityData, EntityResizeEvent } from '@masterteam/components/entities';
4
+ import { EntityViewType, LeafLevelSavedConfig, EntityData, EntityResizeEvent } from '@masterteam/components/entities';
5
+ export { LeafDetailsEntityValue, LeafDetailsStatusSummary, LeafLevelSavedConfig } from '@masterteam/components/entities';
5
6
  import { LoadingStateShape, CrudStateBase } from '@masterteam/components';
6
7
  import * as rxjs from 'rxjs';
7
8
  import { Observable } from 'rxjs';
@@ -43,26 +44,6 @@ interface CatalogPropertyDto {
43
44
  isRequired?: boolean;
44
45
  isSystem?: boolean;
45
46
  }
46
- interface LeafDetailsStatusSummary {
47
- key: string;
48
- display: string;
49
- color: string | null;
50
- count: number;
51
- }
52
- interface LeafDetailsEntityValue {
53
- levelId: number;
54
- levelName: string;
55
- levelIcon: string;
56
- statuses: LeafDetailsStatusSummary[];
57
- }
58
- interface LeafLevelSavedConfig {
59
- /** Position order for this level entity in the preview grid */
60
- order: number;
61
- /** Column span (1-24), persisted from drag-resize */
62
- size?: number;
63
- /** Status keys the user has chosen to display */
64
- selectedStatuses: string[];
65
- }
66
47
  interface PropertyCatalogResponseDto {
67
48
  contextKey: string;
68
49
  properties: CatalogPropertyDto[];
@@ -180,6 +161,7 @@ declare class CustomizationState extends CrudStateBase<ManagePreviewPropertyItem
180
161
  setModuleInfo(ctx: StateContext<CustomizationStateModel>, action: SetManagePreviewModuleInfo): void;
181
162
  bulkReplaceConfigurations(ctx: StateContext<CustomizationStateModel>, action: BulkReplaceConfigurations): rxjs.Observable<Response<boolean>>;
182
163
  private buildContextKey;
164
+ private toDisplayConfigurations;
183
165
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CustomizationState, never>;
184
166
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<CustomizationState>;
185
167
  }
@@ -300,7 +282,7 @@ declare class Customization implements OnInit {
300
282
  * Regular properties → one entity. LeafDetails → one entity per enabled level.
301
283
  */
302
284
  private buildEntitiesFromConfig;
303
- /** Builds one EntityData per enabled level from a LeafDetails display config. */
285
+ /** Builds the shared LeafDetails entity that preview/manage will expand. */
304
286
  private buildLeafDetailsEntities;
305
287
  private activateProperty;
306
288
  private bulkSaveWithout;
@@ -317,4 +299,4 @@ declare class Customization implements OnInit {
317
299
  }
318
300
 
319
301
  export { BulkReplaceConfigurations, Customization, CustomizationActionKey, CustomizationFacade, CustomizationState, GetCustomization, GetManagePreviewAreas, GetManagePreviewConfigurations, SetManagePreviewModuleInfo };
320
- export type { BulkReplaceConfigRequest, BulkReplaceItem, CustomizationStateModel, DisplayArea, DisplayAreaConfig, DisplayConfiguration, LeafDetailsEntityValue, LeafDetailsStatusSummary, LeafLevelConfig, LeafLevelSavedConfig, LeafStatusConfig, ManagePreviewPropertyItem };
302
+ export type { BulkReplaceConfigRequest, BulkReplaceItem, CustomizationStateModel, DisplayArea, DisplayAreaConfig, DisplayConfiguration, LeafLevelConfig, LeafStatusConfig, ManagePreviewPropertyItem };