@masterteam/dashboard-builder 0.0.75 → 0.0.76

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.
@@ -141,6 +141,60 @@ function buildDashboardLevelSchemaOptions(services, context = {}) {
141
141
  }
142
142
  return [...unique.values()];
143
143
  }
144
+ /**
145
+ * Build the "Log" options offered under a status filter's selected level.
146
+ *
147
+ * Two sources, in order:
148
+ * 1. The level's own `logs` collection, when the host levels schema carries one
149
+ * (the legacy PPlus4 settings contract).
150
+ * 2. The status metadata itself — every definition scoped to this level that
151
+ * names a `moduleId`. This is the exact inverse of what the runtime reads
152
+ * (`getStatuses(logId, 'Log')` matches on `moduleId`), so every option
153
+ * offered here is guaranteed to resolve to real status values.
154
+ *
155
+ * `moduleNamesById` supplies labels from the shared metadata tree; the status
156
+ * property name is the fallback when the tree does not know the module.
157
+ */
158
+ function buildDashboardLevelLogOptions(levelsSchema, statuses, moduleNamesById, levelId) {
159
+ if (levelId === null || levelId === undefined || levelId === '')
160
+ return [];
161
+ const level = levelsSchema.find((item) => String(item?.id) === String(levelId));
162
+ if (Array.isArray(level?.logs) && level.logs.length)
163
+ return level.logs;
164
+ const targetLevelId = String(levelId);
165
+ const unique = new Map();
166
+ for (const status of statuses) {
167
+ if (!isStatusDefinition(status))
168
+ continue;
169
+ if (String(status.levelId ?? '') !== targetLevelId)
170
+ continue;
171
+ const moduleId = status.moduleId;
172
+ if (moduleId === null || moduleId === undefined || moduleId === '')
173
+ continue;
174
+ const key = String(moduleId);
175
+ if (unique.has(key))
176
+ continue;
177
+ unique.set(key, {
178
+ id: moduleId,
179
+ description: moduleNamesById.get(key) || resolveLocalizedText(status.propertyName),
180
+ });
181
+ }
182
+ return [...unique.values()];
183
+ }
184
+ /** Module display names from the shared metadata tree, keyed by module id. */
185
+ function buildDashboardModuleNames(services) {
186
+ const names = new Map();
187
+ for (const service of services) {
188
+ for (const module of service.modules ?? []) {
189
+ if (module.id.toLowerCase() !== 'module')
190
+ continue;
191
+ for (const value of module.values ?? []) {
192
+ names.set(String(value.id), value.name);
193
+ }
194
+ }
195
+ }
196
+ return names;
197
+ }
144
198
  function resolveLocalizedText(value) {
145
199
  if (typeof value === 'string')
146
200
  return value;
@@ -224,6 +278,7 @@ class DashboardBuilderService {
224
278
  /** Host-owned lookup/status metadata, matching the client-form contract. */
225
279
  filterLookups = signal(null, ...(ngDevMode ? [{ debugName: "filterLookups" }] : /* istanbul ignore next */ []));
226
280
  filterStatuses = signal(null, ...(ngDevMode ? [{ debugName: "filterStatuses" }] : /* istanbul ignore next */ []));
281
+ filterLevelsSchema = signal(null, ...(ngDevMode ? [{ debugName: "filterLevelsSchema" }] : /* istanbul ignore next */ []));
227
282
  /**
228
283
  * Fixed selections that cannot be removed or edited in SelectionConfiguration.
229
284
  * These selections are always shown and are read-only.
@@ -341,11 +396,13 @@ class DashboardBuilderService {
341
396
  setModulesTreeWorkspaceId(workspaceId) {
342
397
  this.modulesTreeWorkspaceId.set(workspaceId ?? null);
343
398
  }
344
- setFilterMetadata(lookups, statuses) {
399
+ setFilterMetadata(lookups, statuses, levelsSchema = null) {
345
400
  if (lookups !== null)
346
401
  this.filterLookups.set(lookups);
347
402
  if (statuses !== null)
348
403
  this.filterStatuses.set(statuses);
404
+ if (levelsSchema !== null)
405
+ this.filterLevelsSchema.set(levelsSchema);
349
406
  }
350
407
  /**
351
408
  * Add a single fixed selection
@@ -664,9 +721,18 @@ class DashboardBuilderService {
664
721
  asArray(value) {
665
722
  return Array.isArray(value) ? value : [];
666
723
  }
667
- /** Levels schema (used to resolve a level's phase gates). */
724
+ /** Levels schema (used to resolve a level's logs and phase gates). */
668
725
  getLevelsSchema() {
669
- return this.asArray(this.getClientSettings()?.data?.levels?.schema);
726
+ return (this.filterLevelsSchema() ??
727
+ this.asArray(this.getClientSettings()?.data?.levels?.schema));
728
+ }
729
+ /**
730
+ * Logs of a level, for the status filter's "Log" select. Prefers the level's
731
+ * own `logs` collection (legacy contract) and otherwise derives them from the
732
+ * level-scoped status metadata — see `buildDashboardLevelLogOptions`.
733
+ */
734
+ getLevelLogsByLevelId(levelId, moduleNamesById = new Map()) {
735
+ return buildDashboardLevelLogOptions(this.getLevelsSchema(), this.getStatusMetadata(), moduleNamesById, levelId);
670
736
  }
671
737
  /** Available lookups for the page-filter "Lookup" dropdown. */
672
738
  getLookups() {
@@ -687,9 +753,16 @@ class DashboardBuilderService {
687
753
  * `basicLevelsStatuses` by moduleId + module ('Level' or 'Log').
688
754
  */
689
755
  getStatuses(levelId, module = 'Level') {
690
- const statuses = this.filterStatuses() ??
691
- this.asArray(this.getClientSettings()?.data?.basicLevelsStatuses);
692
- return resolveDashboardFilterStatuses(statuses, levelId, module);
756
+ return resolveDashboardFilterStatuses(this.getStatusMetadata(), levelId, module);
757
+ }
758
+ /**
759
+ * Raw status metadata (host-owned, else the cached client settings). Exposed
760
+ * because the status filter derives its level-scoped "Log" options from the
761
+ * same records the runtime later resolves statuses from.
762
+ */
763
+ getStatusMetadata() {
764
+ return (this.filterStatuses() ??
765
+ this.asArray(this.getClientSettings()?.data?.basicLevelsStatuses));
693
766
  }
694
767
  /** Phase gates of a level, for the runtime `phaseGate` filter. */
695
768
  getPhaseGatesByLevelId(levelId) {
@@ -5061,6 +5134,7 @@ class DynamicFiltersConfig {
5061
5134
  dashboardService = inject(DashboardBuilderService);
5062
5135
  destroyRef = inject(DestroyRef);
5063
5136
  emptySelections = [];
5137
+ emptyLevelLogs = [];
5064
5138
  emptyModulesProperties = [];
5065
5139
  emptyProperties = [];
5066
5140
  propertiesFlatCache = new Map();
@@ -5086,6 +5160,27 @@ class DynamicFiltersConfig {
5086
5160
  });
5087
5161
  return treeOptions.length ? treeOptions : this.levelsSchema();
5088
5162
  }, ...(ngDevMode ? [{ debugName: "levelSchemaOptions" }] : /* istanbul ignore next */ []));
5163
+ /** Module display names from the shared metadata tree, keyed by module id. */
5164
+ moduleNames = computed(() => buildDashboardModuleNames(this.modulesTree()), ...(ngDevMode ? [{ debugName: "moduleNames" }] : /* istanbul ignore next */ []));
5165
+ /**
5166
+ * Logs per level id, memoized so repeated template reads keep returning the
5167
+ * same array reference. Keyed access also keeps every status row on its own
5168
+ * level's logs instead of the single shared `levelLogs` list.
5169
+ */
5170
+ levelLogsByLevelId = computed(() => {
5171
+ const moduleNames = this.moduleNames();
5172
+ const levelsSchema = this.dashboardService.getLevelsSchema();
5173
+ const statuses = this.dashboardService.getStatusMetadata();
5174
+ const resolved = new Map();
5175
+ return (levelId) => {
5176
+ const cached = resolved.get(levelId);
5177
+ if (cached)
5178
+ return cached;
5179
+ const logs = buildDashboardLevelLogOptions(levelsSchema, statuses, moduleNames, levelId);
5180
+ resolved.set(levelId, logs);
5181
+ return logs;
5182
+ };
5183
+ }, ...(ngDevMode ? [{ debugName: "levelLogsByLevelId" }] : /* istanbul ignore next */ []));
5089
5184
  /** Product type to filter available field types */
5090
5185
  productType = input('pplus', ...(ngDevMode ? [{ debugName: "productType" }] : /* istanbul ignore next */ []));
5091
5186
  /** Workspace metadata scope used by the shared datasource selection editor. */
@@ -5218,6 +5313,20 @@ class DynamicFiltersConfig {
5218
5313
  }
5219
5314
  this.notifyChange();
5220
5315
  }
5316
+ /**
5317
+ * "Log" options for one status row's selected schema level. Resolved from
5318
+ * the shared filter metadata, falling back to the `levelLogs` input for
5319
+ * hosts that answer `(loadLevelLogs)` from their own source.
5320
+ */
5321
+ levelLogOptions(schemaLevelId) {
5322
+ if (schemaLevelId === null ||
5323
+ schemaLevelId === undefined ||
5324
+ schemaLevelId === '') {
5325
+ return this.emptyLevelLogs;
5326
+ }
5327
+ const resolved = this.levelLogsByLevelId()(String(schemaLevelId));
5328
+ return resolved.length ? resolved : this.levelLogs();
5329
+ }
5221
5330
  /** Handle schema level change for status/phaseGate */
5222
5331
  onSchemaLevelChange(index, schemaLevelId) {
5223
5332
  this.updateFieldConfig(index, 'schemaLevelId', schemaLevelId);
@@ -5675,7 +5784,7 @@ class DynamicFiltersConfig {
5675
5784
  useExisting: forwardRef(() => DynamicFiltersConfig),
5676
5785
  multi: true,
5677
5786
  },
5678
- ], ngImport: i0, template: "<div class=\"flex flex-col gap-3\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-2 border-b border-surface-200 pb-3\"\r\n >\r\n <h3 class=\"text-base font-semibold text-surface-800\">\r\n {{ t(\"filterFieldsConfiguration\") }}\r\n </h3>\r\n <div class=\"flex items-center gap-1.5\">\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addField')\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n (onClick)=\"addFilterField()\"\r\n [disabled]=\"disabled()\"\r\n />\r\n <mt-button\r\n icon=\"general.copy-06\"\r\n [pTooltip]=\"t('copyConfiguration')\"\r\n tooltipPosition=\"top\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n (onClick)=\"copyConfiguration()\"\r\n />\r\n <mt-button\r\n icon=\"general.clipboard\"\r\n [pTooltip]=\"t('pasteConfiguration')\"\r\n tooltipPosition=\"top\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n (onClick)=\"togglePasteArea()\"\r\n />\r\n </div>\r\n </div>\r\n\r\n @if (showPasteArea()) {\r\n <div\r\n class=\"flex flex-col gap-2 rounded-md border border-surface-200 bg-surface-50 p-3\"\r\n >\r\n <mt-textarea-field\r\n [label]=\"t('pasteConfigurationHere')\"\r\n [rows]=\"6\"\r\n [ngModel]=\"pasteContent()\"\r\n (ngModelChange)=\"pasteContent.set($event)\"\r\n [placeholder]=\"t('pasteJsonConfiguration')\"\r\n />\r\n @if (pasteError()) {\r\n <div class=\"text-sm text-red-500\">{{ pasteError() }}</div>\r\n }\r\n <div class=\"flex justify-end gap-2\">\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"togglePasteArea()\"\r\n />\r\n <mt-button\r\n [label]=\"t('applyConfiguration')\"\r\n size=\"small\"\r\n (onClick)=\"applyPastedConfiguration()\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n\r\n <div class=\"flex flex-col gap-3\">\r\n @for (field of filterFields(); track trackByIndex($index); let i = $index) {\r\n <section\r\n class=\"overflow-hidden rounded-md border border-surface-200 bg-surface-0\"\r\n >\r\n <div\r\n class=\"flex items-center justify-between gap-3 border-b border-surface-200 bg-surface-100 px-3 py-2\"\r\n >\r\n <div class=\"min-w-0\">\r\n <div class=\"truncate text-sm font-semibold text-surface-800\">\r\n {{ getFieldTitle(field, i) }}\r\n </div>\r\n <div class=\"text-xs text-muted-color\">\r\n {{ getFieldTypeLabel(field.type) }}\r\n </div>\r\n </div>\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n [text]=\"true\"\r\n (onClick)=\"removeFilterField(i)\"\r\n [disabled]=\"disabled()\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-col gap-3 p-3\">\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('fieldType')\"\r\n [options]=\"availableFieldTypes()\"\r\n optionValue=\"value\"\r\n optionLabel=\"label\"\r\n [ngModel]=\"field.type\"\r\n (ngModelChange)=\"onFieldTypeChange(i, $event)\"\r\n />\r\n\r\n @if (requiresKey(field.type)) {\r\n <mt-text-field\r\n [label]=\"t('fieldKey')\"\r\n [placeholder]=\"t('enterFieldKey')\"\r\n [ngModel]=\"field.key\"\r\n (ngModelChange)=\"updateField(i, 'key', $event)\"\r\n />\r\n }\r\n\r\n @if (requiresName(field.type)) {\r\n <mt-text-field\r\n [label]=\"t('nameEnglish')\"\r\n [placeholder]=\"t('enterEnglishName')\"\r\n [ngModel]=\"field.name?.en\"\r\n (ngModelChange)=\"updateFieldName(i, 'en', $event)\"\r\n />\r\n <mt-text-field\r\n [label]=\"t('nameArabic')\"\r\n [placeholder]=\"t('enterArabicName')\"\r\n [ngModel]=\"field.name?.ar\"\r\n (ngModelChange)=\"updateFieldName(i, 'ar', $event)\"\r\n />\r\n }\r\n </div>\r\n\r\n @if (hasTypeConfiguration(field)) {\r\n <div\r\n class=\"flex w-full flex-col gap-3 rounded-md border border-surface-200 bg-surface-50 p-3\"\r\n >\r\n <div class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"settings\") }}\r\n </div>\r\n\r\n @switch (field.type) {\r\n @case (\"dropdownTVService\") {\r\n @if (isDropdownConfigOpen(i)) {\r\n <div class=\"flex justify-end\">\r\n <mt-button\r\n [label]=\"t('close')\"\r\n icon=\"general.x-close\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [text]=\"true\"\r\n (onClick)=\"closeDropdownConfig(i)\"\r\n />\r\n </div>\r\n\r\n <mt-selection-configuration\r\n class=\"block w-full\"\r\n [workspaceId]=\"getDropdownWorkspaceId(field)\"\r\n [chartWorkspace]=\"getDropdownChartWorkspace(field)\"\r\n [ngModel]=\"getDropdownSelections(field)\"\r\n (ngModelChange)=\"updateDropdownSelections(i, $event)\"\r\n (moduleChange)=\"onDropdownModuleChange(i, $event)\"\r\n [modulesProperties]=\"getModulesPropertiesForField(i)\"\r\n [propertiesFlat]=\"getPropertiesFlatForField(i)\"\r\n />\r\n\r\n <mt-multi-select-field\r\n class=\"block w-full\"\r\n [label]=\"t('selectedProperties')\"\r\n [options]=\"getPropertiesFlatForField(i)\"\r\n optionValue=\"key\"\r\n optionLabel=\"name\"\r\n [filter]=\"true\"\r\n [ngModel]=\"getSelectedProperties(field)\"\r\n (ngModelChange)=\"updateSelectedProperties(i, $event)\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-2 rounded-md border border-surface-200 bg-surface-0 px-3 py-2\"\r\n >\r\n <span class=\"text-sm text-muted-color\">\r\n {{ getDropdownSummary(field) }}\r\n </span>\r\n <mt-button\r\n [label]=\"t('selectionsConfiguration')\"\r\n icon=\"general.settings-01\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"openDropdownConfig(i, field)\"\r\n />\r\n </div>\r\n }\r\n }\r\n\r\n @case (\"lookup\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('lookupId')\"\r\n [options]=\"lookupOptions()\"\r\n optionValue=\"id\"\r\n optionLabel=\"displayName\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.lookupId\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'lookupId', $event)\"\r\n />\r\n </div>\r\n }\r\n\r\n @case (\"status\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('schemaLevelId')\"\r\n [options]=\"levelSchemaOptions()\"\r\n optionValue=\"id\"\r\n optionLabel=\"description\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.schemaLevelId\"\r\n (ngModelChange)=\"onSchemaLevelChange(i, $event)\"\r\n />\r\n\r\n @if (field.configuration?.schemaLevelId) {\r\n <mt-select-field\r\n [label]=\"t('logId')\"\r\n [options]=\"levelLogs()\"\r\n optionValue=\"id\"\r\n optionLabel=\"description\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.logId\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'logId', $event)\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n @case (\"phaseGate\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('schemaLevelId')\"\r\n [options]=\"levelSchemaOptions()\"\r\n optionValue=\"id\"\r\n optionLabel=\"description\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.schemaLevelId\"\r\n (ngModelChange)=\"onSchemaLevelChange(i, $event)\"\r\n />\r\n </div>\r\n }\r\n\r\n @case (\"checkbox\") {\r\n <mt-toggle-field\r\n [label]=\"t('defaultChecked')\"\r\n size=\"small\"\r\n [ngModel]=\"field.configuration?.checked ?? false\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'checked', $event)\"\r\n />\r\n }\r\n\r\n @case (\"year\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-number-field\r\n [label]=\"t('minYear')\"\r\n [placeholder]=\"t('minYear')\"\r\n [ngModel]=\"field.configuration?.minYear\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'minYear', $event)\"\r\n />\r\n <mt-number-field\r\n [label]=\"t('maxYear')\"\r\n [placeholder]=\"t('maxYear')\"\r\n [ngModel]=\"field.configuration?.maxYear\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'maxYear', $event)\"\r\n />\r\n </div>\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"flex flex-wrap items-center gap-4\">\r\n @if (supportsRequired(field)) {\r\n <mt-toggle-field\r\n [label]=\"t('isRequired')\"\r\n size=\"small\"\r\n [ngModel]=\"field.configuration?.isRequird ?? false\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'isRequird', $event)\"\r\n />\r\n }\r\n\r\n @if (supportsMultiple(field)) {\r\n <mt-toggle-field\r\n [label]=\"t('isMultiple')\"\r\n size=\"small\"\r\n [ngModel]=\"field.configuration?.isMultiple ?? false\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'isMultiple', $event)\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n </section>\r\n } @empty {\r\n <div\r\n class=\"flex flex-col items-center justify-center gap-2 rounded-md border border-dashed border-surface-300 py-10 text-center text-muted-color\"\r\n >\r\n <mt-icon icon=\"general.filter-lines\" class=\"text-3xl\" />\r\n <p class=\"text-sm font-medium\">{{ t(\"noFilterFieldsConfigured\") }}</p>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addField')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"addFilterField()\"\r\n [disabled]=\"disabled()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: 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: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: NumberField, selector: "mt-number-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "pInputs", "format", "useGrouping", "maxFractionDigits", "min", "max", "required"] }, { kind: "component", type: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { 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: TextareaField, selector: "mt-textarea-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "noErrorStyle", "pInputs", "rows", "required", "maxLength"] }, { kind: "component", type: SelectionConfiguration, selector: "mt-selection-configuration", inputs: ["structureLocked", "workspaceId", "chartWorkspace", "modulesProperties", "propertiesFlat"], outputs: ["moduleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
5787
+ ], ngImport: i0, template: "<div class=\"flex flex-col gap-3\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-2 border-b border-surface-200 pb-3\"\r\n >\r\n <h3 class=\"text-base font-semibold text-surface-800\">\r\n {{ t(\"filterFieldsConfiguration\") }}\r\n </h3>\r\n <div class=\"flex items-center gap-1.5\">\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addField')\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n (onClick)=\"addFilterField()\"\r\n [disabled]=\"disabled()\"\r\n />\r\n <mt-button\r\n icon=\"general.copy-06\"\r\n [pTooltip]=\"t('copyConfiguration')\"\r\n tooltipPosition=\"top\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n (onClick)=\"copyConfiguration()\"\r\n />\r\n <mt-button\r\n icon=\"general.clipboard\"\r\n [pTooltip]=\"t('pasteConfiguration')\"\r\n tooltipPosition=\"top\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n (onClick)=\"togglePasteArea()\"\r\n />\r\n </div>\r\n </div>\r\n\r\n @if (showPasteArea()) {\r\n <div\r\n class=\"flex flex-col gap-2 rounded-md border border-surface-200 bg-surface-50 p-3\"\r\n >\r\n <mt-textarea-field\r\n [label]=\"t('pasteConfigurationHere')\"\r\n [rows]=\"6\"\r\n [ngModel]=\"pasteContent()\"\r\n (ngModelChange)=\"pasteContent.set($event)\"\r\n [placeholder]=\"t('pasteJsonConfiguration')\"\r\n />\r\n @if (pasteError()) {\r\n <div class=\"text-sm text-red-500\">{{ pasteError() }}</div>\r\n }\r\n <div class=\"flex justify-end gap-2\">\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"togglePasteArea()\"\r\n />\r\n <mt-button\r\n [label]=\"t('applyConfiguration')\"\r\n size=\"small\"\r\n (onClick)=\"applyPastedConfiguration()\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n\r\n <div class=\"flex flex-col gap-3\">\r\n @for (field of filterFields(); track trackByIndex($index); let i = $index) {\r\n <section\r\n class=\"overflow-hidden rounded-md border border-surface-200 bg-surface-0\"\r\n >\r\n <div\r\n class=\"flex items-center justify-between gap-3 border-b border-surface-200 bg-surface-100 px-3 py-2\"\r\n >\r\n <div class=\"min-w-0\">\r\n <div class=\"truncate text-sm font-semibold text-surface-800\">\r\n {{ getFieldTitle(field, i) }}\r\n </div>\r\n <div class=\"text-xs text-muted-color\">\r\n {{ getFieldTypeLabel(field.type) }}\r\n </div>\r\n </div>\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n [text]=\"true\"\r\n (onClick)=\"removeFilterField(i)\"\r\n [disabled]=\"disabled()\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-col gap-3 p-3\">\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('fieldType')\"\r\n [options]=\"availableFieldTypes()\"\r\n optionValue=\"value\"\r\n optionLabel=\"label\"\r\n [ngModel]=\"field.type\"\r\n (ngModelChange)=\"onFieldTypeChange(i, $event)\"\r\n />\r\n\r\n @if (requiresKey(field.type)) {\r\n <mt-text-field\r\n [label]=\"t('fieldKey')\"\r\n [placeholder]=\"t('enterFieldKey')\"\r\n [ngModel]=\"field.key\"\r\n (ngModelChange)=\"updateField(i, 'key', $event)\"\r\n />\r\n }\r\n\r\n @if (requiresName(field.type)) {\r\n <mt-text-field\r\n [label]=\"t('nameEnglish')\"\r\n [placeholder]=\"t('enterEnglishName')\"\r\n [ngModel]=\"field.name?.en\"\r\n (ngModelChange)=\"updateFieldName(i, 'en', $event)\"\r\n />\r\n <mt-text-field\r\n [label]=\"t('nameArabic')\"\r\n [placeholder]=\"t('enterArabicName')\"\r\n [ngModel]=\"field.name?.ar\"\r\n (ngModelChange)=\"updateFieldName(i, 'ar', $event)\"\r\n />\r\n }\r\n </div>\r\n\r\n @if (hasTypeConfiguration(field)) {\r\n <div\r\n class=\"flex w-full flex-col gap-3 rounded-md border border-surface-200 bg-surface-50 p-3\"\r\n >\r\n <div class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"settings\") }}\r\n </div>\r\n\r\n @switch (field.type) {\r\n @case (\"dropdownTVService\") {\r\n @if (isDropdownConfigOpen(i)) {\r\n <div class=\"flex justify-end\">\r\n <mt-button\r\n [label]=\"t('close')\"\r\n icon=\"general.x-close\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [text]=\"true\"\r\n (onClick)=\"closeDropdownConfig(i)\"\r\n />\r\n </div>\r\n\r\n <mt-selection-configuration\r\n class=\"block w-full\"\r\n [workspaceId]=\"getDropdownWorkspaceId(field)\"\r\n [chartWorkspace]=\"getDropdownChartWorkspace(field)\"\r\n [ngModel]=\"getDropdownSelections(field)\"\r\n (ngModelChange)=\"updateDropdownSelections(i, $event)\"\r\n (moduleChange)=\"onDropdownModuleChange(i, $event)\"\r\n [modulesProperties]=\"getModulesPropertiesForField(i)\"\r\n [propertiesFlat]=\"getPropertiesFlatForField(i)\"\r\n />\r\n\r\n <mt-multi-select-field\r\n class=\"block w-full\"\r\n [label]=\"t('selectedProperties')\"\r\n [options]=\"getPropertiesFlatForField(i)\"\r\n optionValue=\"key\"\r\n optionLabel=\"name\"\r\n [filter]=\"true\"\r\n [ngModel]=\"getSelectedProperties(field)\"\r\n (ngModelChange)=\"updateSelectedProperties(i, $event)\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-2 rounded-md border border-surface-200 bg-surface-0 px-3 py-2\"\r\n >\r\n <span class=\"text-sm text-muted-color\">\r\n {{ getDropdownSummary(field) }}\r\n </span>\r\n <mt-button\r\n [label]=\"t('selectionsConfiguration')\"\r\n icon=\"general.settings-01\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"openDropdownConfig(i, field)\"\r\n />\r\n </div>\r\n }\r\n }\r\n\r\n @case (\"lookup\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('lookupId')\"\r\n [options]=\"lookupOptions()\"\r\n optionValue=\"id\"\r\n optionLabel=\"displayName\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.lookupId\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'lookupId', $event)\"\r\n />\r\n </div>\r\n }\r\n\r\n @case (\"status\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('schemaLevelId')\"\r\n [options]=\"levelSchemaOptions()\"\r\n optionValue=\"id\"\r\n optionLabel=\"description\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.schemaLevelId\"\r\n (ngModelChange)=\"onSchemaLevelChange(i, $event)\"\r\n />\r\n\r\n @if (field.configuration?.schemaLevelId) {\r\n <mt-select-field\r\n [label]=\"t('logId')\"\r\n [options]=\"\r\n levelLogOptions(field.configuration?.schemaLevelId)\r\n \"\r\n optionValue=\"id\"\r\n optionLabel=\"description\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.logId\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'logId', $event)\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n @case (\"phaseGate\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('schemaLevelId')\"\r\n [options]=\"levelSchemaOptions()\"\r\n optionValue=\"id\"\r\n optionLabel=\"description\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.schemaLevelId\"\r\n (ngModelChange)=\"onSchemaLevelChange(i, $event)\"\r\n />\r\n </div>\r\n }\r\n\r\n @case (\"checkbox\") {\r\n <mt-toggle-field\r\n [label]=\"t('defaultChecked')\"\r\n size=\"small\"\r\n [ngModel]=\"field.configuration?.checked ?? false\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'checked', $event)\"\r\n />\r\n }\r\n\r\n @case (\"year\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-number-field\r\n [label]=\"t('minYear')\"\r\n [placeholder]=\"t('minYear')\"\r\n [ngModel]=\"field.configuration?.minYear\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'minYear', $event)\"\r\n />\r\n <mt-number-field\r\n [label]=\"t('maxYear')\"\r\n [placeholder]=\"t('maxYear')\"\r\n [ngModel]=\"field.configuration?.maxYear\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'maxYear', $event)\"\r\n />\r\n </div>\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"flex flex-wrap items-center gap-4\">\r\n @if (supportsRequired(field)) {\r\n <mt-toggle-field\r\n [label]=\"t('isRequired')\"\r\n size=\"small\"\r\n [ngModel]=\"field.configuration?.isRequird ?? false\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'isRequird', $event)\"\r\n />\r\n }\r\n\r\n @if (supportsMultiple(field)) {\r\n <mt-toggle-field\r\n [label]=\"t('isMultiple')\"\r\n size=\"small\"\r\n [ngModel]=\"field.configuration?.isMultiple ?? false\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'isMultiple', $event)\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n </section>\r\n } @empty {\r\n <div\r\n class=\"flex flex-col items-center justify-center gap-2 rounded-md border border-dashed border-surface-300 py-10 text-center text-muted-color\"\r\n >\r\n <mt-icon icon=\"general.filter-lines\" class=\"text-3xl\" />\r\n <p class=\"text-sm font-medium\">{{ t(\"noFilterFieldsConfigured\") }}</p>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addField')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"addFilterField()\"\r\n [disabled]=\"disabled()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: 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: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: NumberField, selector: "mt-number-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "pInputs", "format", "useGrouping", "maxFractionDigits", "min", "max", "required"] }, { kind: "component", type: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { 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: TextareaField, selector: "mt-textarea-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "noErrorStyle", "pInputs", "rows", "required", "maxLength"] }, { kind: "component", type: SelectionConfiguration, selector: "mt-selection-configuration", inputs: ["structureLocked", "workspaceId", "chartWorkspace", "modulesProperties", "propertiesFlat"], outputs: ["moduleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
5679
5788
  }
5680
5789
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DynamicFiltersConfig, decorators: [{
5681
5790
  type: Component,
@@ -5698,7 +5807,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
5698
5807
  useExisting: forwardRef(() => DynamicFiltersConfig),
5699
5808
  multi: true,
5700
5809
  },
5701
- ], template: "<div class=\"flex flex-col gap-3\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-2 border-b border-surface-200 pb-3\"\r\n >\r\n <h3 class=\"text-base font-semibold text-surface-800\">\r\n {{ t(\"filterFieldsConfiguration\") }}\r\n </h3>\r\n <div class=\"flex items-center gap-1.5\">\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addField')\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n (onClick)=\"addFilterField()\"\r\n [disabled]=\"disabled()\"\r\n />\r\n <mt-button\r\n icon=\"general.copy-06\"\r\n [pTooltip]=\"t('copyConfiguration')\"\r\n tooltipPosition=\"top\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n (onClick)=\"copyConfiguration()\"\r\n />\r\n <mt-button\r\n icon=\"general.clipboard\"\r\n [pTooltip]=\"t('pasteConfiguration')\"\r\n tooltipPosition=\"top\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n (onClick)=\"togglePasteArea()\"\r\n />\r\n </div>\r\n </div>\r\n\r\n @if (showPasteArea()) {\r\n <div\r\n class=\"flex flex-col gap-2 rounded-md border border-surface-200 bg-surface-50 p-3\"\r\n >\r\n <mt-textarea-field\r\n [label]=\"t('pasteConfigurationHere')\"\r\n [rows]=\"6\"\r\n [ngModel]=\"pasteContent()\"\r\n (ngModelChange)=\"pasteContent.set($event)\"\r\n [placeholder]=\"t('pasteJsonConfiguration')\"\r\n />\r\n @if (pasteError()) {\r\n <div class=\"text-sm text-red-500\">{{ pasteError() }}</div>\r\n }\r\n <div class=\"flex justify-end gap-2\">\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"togglePasteArea()\"\r\n />\r\n <mt-button\r\n [label]=\"t('applyConfiguration')\"\r\n size=\"small\"\r\n (onClick)=\"applyPastedConfiguration()\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n\r\n <div class=\"flex flex-col gap-3\">\r\n @for (field of filterFields(); track trackByIndex($index); let i = $index) {\r\n <section\r\n class=\"overflow-hidden rounded-md border border-surface-200 bg-surface-0\"\r\n >\r\n <div\r\n class=\"flex items-center justify-between gap-3 border-b border-surface-200 bg-surface-100 px-3 py-2\"\r\n >\r\n <div class=\"min-w-0\">\r\n <div class=\"truncate text-sm font-semibold text-surface-800\">\r\n {{ getFieldTitle(field, i) }}\r\n </div>\r\n <div class=\"text-xs text-muted-color\">\r\n {{ getFieldTypeLabel(field.type) }}\r\n </div>\r\n </div>\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n [text]=\"true\"\r\n (onClick)=\"removeFilterField(i)\"\r\n [disabled]=\"disabled()\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-col gap-3 p-3\">\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('fieldType')\"\r\n [options]=\"availableFieldTypes()\"\r\n optionValue=\"value\"\r\n optionLabel=\"label\"\r\n [ngModel]=\"field.type\"\r\n (ngModelChange)=\"onFieldTypeChange(i, $event)\"\r\n />\r\n\r\n @if (requiresKey(field.type)) {\r\n <mt-text-field\r\n [label]=\"t('fieldKey')\"\r\n [placeholder]=\"t('enterFieldKey')\"\r\n [ngModel]=\"field.key\"\r\n (ngModelChange)=\"updateField(i, 'key', $event)\"\r\n />\r\n }\r\n\r\n @if (requiresName(field.type)) {\r\n <mt-text-field\r\n [label]=\"t('nameEnglish')\"\r\n [placeholder]=\"t('enterEnglishName')\"\r\n [ngModel]=\"field.name?.en\"\r\n (ngModelChange)=\"updateFieldName(i, 'en', $event)\"\r\n />\r\n <mt-text-field\r\n [label]=\"t('nameArabic')\"\r\n [placeholder]=\"t('enterArabicName')\"\r\n [ngModel]=\"field.name?.ar\"\r\n (ngModelChange)=\"updateFieldName(i, 'ar', $event)\"\r\n />\r\n }\r\n </div>\r\n\r\n @if (hasTypeConfiguration(field)) {\r\n <div\r\n class=\"flex w-full flex-col gap-3 rounded-md border border-surface-200 bg-surface-50 p-3\"\r\n >\r\n <div class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"settings\") }}\r\n </div>\r\n\r\n @switch (field.type) {\r\n @case (\"dropdownTVService\") {\r\n @if (isDropdownConfigOpen(i)) {\r\n <div class=\"flex justify-end\">\r\n <mt-button\r\n [label]=\"t('close')\"\r\n icon=\"general.x-close\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [text]=\"true\"\r\n (onClick)=\"closeDropdownConfig(i)\"\r\n />\r\n </div>\r\n\r\n <mt-selection-configuration\r\n class=\"block w-full\"\r\n [workspaceId]=\"getDropdownWorkspaceId(field)\"\r\n [chartWorkspace]=\"getDropdownChartWorkspace(field)\"\r\n [ngModel]=\"getDropdownSelections(field)\"\r\n (ngModelChange)=\"updateDropdownSelections(i, $event)\"\r\n (moduleChange)=\"onDropdownModuleChange(i, $event)\"\r\n [modulesProperties]=\"getModulesPropertiesForField(i)\"\r\n [propertiesFlat]=\"getPropertiesFlatForField(i)\"\r\n />\r\n\r\n <mt-multi-select-field\r\n class=\"block w-full\"\r\n [label]=\"t('selectedProperties')\"\r\n [options]=\"getPropertiesFlatForField(i)\"\r\n optionValue=\"key\"\r\n optionLabel=\"name\"\r\n [filter]=\"true\"\r\n [ngModel]=\"getSelectedProperties(field)\"\r\n (ngModelChange)=\"updateSelectedProperties(i, $event)\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-2 rounded-md border border-surface-200 bg-surface-0 px-3 py-2\"\r\n >\r\n <span class=\"text-sm text-muted-color\">\r\n {{ getDropdownSummary(field) }}\r\n </span>\r\n <mt-button\r\n [label]=\"t('selectionsConfiguration')\"\r\n icon=\"general.settings-01\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"openDropdownConfig(i, field)\"\r\n />\r\n </div>\r\n }\r\n }\r\n\r\n @case (\"lookup\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('lookupId')\"\r\n [options]=\"lookupOptions()\"\r\n optionValue=\"id\"\r\n optionLabel=\"displayName\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.lookupId\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'lookupId', $event)\"\r\n />\r\n </div>\r\n }\r\n\r\n @case (\"status\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('schemaLevelId')\"\r\n [options]=\"levelSchemaOptions()\"\r\n optionValue=\"id\"\r\n optionLabel=\"description\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.schemaLevelId\"\r\n (ngModelChange)=\"onSchemaLevelChange(i, $event)\"\r\n />\r\n\r\n @if (field.configuration?.schemaLevelId) {\r\n <mt-select-field\r\n [label]=\"t('logId')\"\r\n [options]=\"levelLogs()\"\r\n optionValue=\"id\"\r\n optionLabel=\"description\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.logId\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'logId', $event)\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n @case (\"phaseGate\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('schemaLevelId')\"\r\n [options]=\"levelSchemaOptions()\"\r\n optionValue=\"id\"\r\n optionLabel=\"description\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.schemaLevelId\"\r\n (ngModelChange)=\"onSchemaLevelChange(i, $event)\"\r\n />\r\n </div>\r\n }\r\n\r\n @case (\"checkbox\") {\r\n <mt-toggle-field\r\n [label]=\"t('defaultChecked')\"\r\n size=\"small\"\r\n [ngModel]=\"field.configuration?.checked ?? false\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'checked', $event)\"\r\n />\r\n }\r\n\r\n @case (\"year\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-number-field\r\n [label]=\"t('minYear')\"\r\n [placeholder]=\"t('minYear')\"\r\n [ngModel]=\"field.configuration?.minYear\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'minYear', $event)\"\r\n />\r\n <mt-number-field\r\n [label]=\"t('maxYear')\"\r\n [placeholder]=\"t('maxYear')\"\r\n [ngModel]=\"field.configuration?.maxYear\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'maxYear', $event)\"\r\n />\r\n </div>\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"flex flex-wrap items-center gap-4\">\r\n @if (supportsRequired(field)) {\r\n <mt-toggle-field\r\n [label]=\"t('isRequired')\"\r\n size=\"small\"\r\n [ngModel]=\"field.configuration?.isRequird ?? false\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'isRequird', $event)\"\r\n />\r\n }\r\n\r\n @if (supportsMultiple(field)) {\r\n <mt-toggle-field\r\n [label]=\"t('isMultiple')\"\r\n size=\"small\"\r\n [ngModel]=\"field.configuration?.isMultiple ?? false\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'isMultiple', $event)\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n </section>\r\n } @empty {\r\n <div\r\n class=\"flex flex-col items-center justify-center gap-2 rounded-md border border-dashed border-surface-300 py-10 text-center text-muted-color\"\r\n >\r\n <mt-icon icon=\"general.filter-lines\" class=\"text-3xl\" />\r\n <p class=\"text-sm font-medium\">{{ t(\"noFilterFieldsConfigured\") }}</p>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addField')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"addFilterField()\"\r\n [disabled]=\"disabled()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n" }]
5810
+ ], template: "<div class=\"flex flex-col gap-3\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-2 border-b border-surface-200 pb-3\"\r\n >\r\n <h3 class=\"text-base font-semibold text-surface-800\">\r\n {{ t(\"filterFieldsConfiguration\") }}\r\n </h3>\r\n <div class=\"flex items-center gap-1.5\">\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addField')\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n (onClick)=\"addFilterField()\"\r\n [disabled]=\"disabled()\"\r\n />\r\n <mt-button\r\n icon=\"general.copy-06\"\r\n [pTooltip]=\"t('copyConfiguration')\"\r\n tooltipPosition=\"top\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n (onClick)=\"copyConfiguration()\"\r\n />\r\n <mt-button\r\n icon=\"general.clipboard\"\r\n [pTooltip]=\"t('pasteConfiguration')\"\r\n tooltipPosition=\"top\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n (onClick)=\"togglePasteArea()\"\r\n />\r\n </div>\r\n </div>\r\n\r\n @if (showPasteArea()) {\r\n <div\r\n class=\"flex flex-col gap-2 rounded-md border border-surface-200 bg-surface-50 p-3\"\r\n >\r\n <mt-textarea-field\r\n [label]=\"t('pasteConfigurationHere')\"\r\n [rows]=\"6\"\r\n [ngModel]=\"pasteContent()\"\r\n (ngModelChange)=\"pasteContent.set($event)\"\r\n [placeholder]=\"t('pasteJsonConfiguration')\"\r\n />\r\n @if (pasteError()) {\r\n <div class=\"text-sm text-red-500\">{{ pasteError() }}</div>\r\n }\r\n <div class=\"flex justify-end gap-2\">\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"togglePasteArea()\"\r\n />\r\n <mt-button\r\n [label]=\"t('applyConfiguration')\"\r\n size=\"small\"\r\n (onClick)=\"applyPastedConfiguration()\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n\r\n <div class=\"flex flex-col gap-3\">\r\n @for (field of filterFields(); track trackByIndex($index); let i = $index) {\r\n <section\r\n class=\"overflow-hidden rounded-md border border-surface-200 bg-surface-0\"\r\n >\r\n <div\r\n class=\"flex items-center justify-between gap-3 border-b border-surface-200 bg-surface-100 px-3 py-2\"\r\n >\r\n <div class=\"min-w-0\">\r\n <div class=\"truncate text-sm font-semibold text-surface-800\">\r\n {{ getFieldTitle(field, i) }}\r\n </div>\r\n <div class=\"text-xs text-muted-color\">\r\n {{ getFieldTypeLabel(field.type) }}\r\n </div>\r\n </div>\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n [text]=\"true\"\r\n (onClick)=\"removeFilterField(i)\"\r\n [disabled]=\"disabled()\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-col gap-3 p-3\">\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('fieldType')\"\r\n [options]=\"availableFieldTypes()\"\r\n optionValue=\"value\"\r\n optionLabel=\"label\"\r\n [ngModel]=\"field.type\"\r\n (ngModelChange)=\"onFieldTypeChange(i, $event)\"\r\n />\r\n\r\n @if (requiresKey(field.type)) {\r\n <mt-text-field\r\n [label]=\"t('fieldKey')\"\r\n [placeholder]=\"t('enterFieldKey')\"\r\n [ngModel]=\"field.key\"\r\n (ngModelChange)=\"updateField(i, 'key', $event)\"\r\n />\r\n }\r\n\r\n @if (requiresName(field.type)) {\r\n <mt-text-field\r\n [label]=\"t('nameEnglish')\"\r\n [placeholder]=\"t('enterEnglishName')\"\r\n [ngModel]=\"field.name?.en\"\r\n (ngModelChange)=\"updateFieldName(i, 'en', $event)\"\r\n />\r\n <mt-text-field\r\n [label]=\"t('nameArabic')\"\r\n [placeholder]=\"t('enterArabicName')\"\r\n [ngModel]=\"field.name?.ar\"\r\n (ngModelChange)=\"updateFieldName(i, 'ar', $event)\"\r\n />\r\n }\r\n </div>\r\n\r\n @if (hasTypeConfiguration(field)) {\r\n <div\r\n class=\"flex w-full flex-col gap-3 rounded-md border border-surface-200 bg-surface-50 p-3\"\r\n >\r\n <div class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"settings\") }}\r\n </div>\r\n\r\n @switch (field.type) {\r\n @case (\"dropdownTVService\") {\r\n @if (isDropdownConfigOpen(i)) {\r\n <div class=\"flex justify-end\">\r\n <mt-button\r\n [label]=\"t('close')\"\r\n icon=\"general.x-close\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [text]=\"true\"\r\n (onClick)=\"closeDropdownConfig(i)\"\r\n />\r\n </div>\r\n\r\n <mt-selection-configuration\r\n class=\"block w-full\"\r\n [workspaceId]=\"getDropdownWorkspaceId(field)\"\r\n [chartWorkspace]=\"getDropdownChartWorkspace(field)\"\r\n [ngModel]=\"getDropdownSelections(field)\"\r\n (ngModelChange)=\"updateDropdownSelections(i, $event)\"\r\n (moduleChange)=\"onDropdownModuleChange(i, $event)\"\r\n [modulesProperties]=\"getModulesPropertiesForField(i)\"\r\n [propertiesFlat]=\"getPropertiesFlatForField(i)\"\r\n />\r\n\r\n <mt-multi-select-field\r\n class=\"block w-full\"\r\n [label]=\"t('selectedProperties')\"\r\n [options]=\"getPropertiesFlatForField(i)\"\r\n optionValue=\"key\"\r\n optionLabel=\"name\"\r\n [filter]=\"true\"\r\n [ngModel]=\"getSelectedProperties(field)\"\r\n (ngModelChange)=\"updateSelectedProperties(i, $event)\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-2 rounded-md border border-surface-200 bg-surface-0 px-3 py-2\"\r\n >\r\n <span class=\"text-sm text-muted-color\">\r\n {{ getDropdownSummary(field) }}\r\n </span>\r\n <mt-button\r\n [label]=\"t('selectionsConfiguration')\"\r\n icon=\"general.settings-01\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"openDropdownConfig(i, field)\"\r\n />\r\n </div>\r\n }\r\n }\r\n\r\n @case (\"lookup\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('lookupId')\"\r\n [options]=\"lookupOptions()\"\r\n optionValue=\"id\"\r\n optionLabel=\"displayName\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.lookupId\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'lookupId', $event)\"\r\n />\r\n </div>\r\n }\r\n\r\n @case (\"status\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('schemaLevelId')\"\r\n [options]=\"levelSchemaOptions()\"\r\n optionValue=\"id\"\r\n optionLabel=\"description\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.schemaLevelId\"\r\n (ngModelChange)=\"onSchemaLevelChange(i, $event)\"\r\n />\r\n\r\n @if (field.configuration?.schemaLevelId) {\r\n <mt-select-field\r\n [label]=\"t('logId')\"\r\n [options]=\"\r\n levelLogOptions(field.configuration?.schemaLevelId)\r\n \"\r\n optionValue=\"id\"\r\n optionLabel=\"description\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.logId\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'logId', $event)\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n @case (\"phaseGate\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('schemaLevelId')\"\r\n [options]=\"levelSchemaOptions()\"\r\n optionValue=\"id\"\r\n optionLabel=\"description\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.schemaLevelId\"\r\n (ngModelChange)=\"onSchemaLevelChange(i, $event)\"\r\n />\r\n </div>\r\n }\r\n\r\n @case (\"checkbox\") {\r\n <mt-toggle-field\r\n [label]=\"t('defaultChecked')\"\r\n size=\"small\"\r\n [ngModel]=\"field.configuration?.checked ?? false\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'checked', $event)\"\r\n />\r\n }\r\n\r\n @case (\"year\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-number-field\r\n [label]=\"t('minYear')\"\r\n [placeholder]=\"t('minYear')\"\r\n [ngModel]=\"field.configuration?.minYear\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'minYear', $event)\"\r\n />\r\n <mt-number-field\r\n [label]=\"t('maxYear')\"\r\n [placeholder]=\"t('maxYear')\"\r\n [ngModel]=\"field.configuration?.maxYear\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'maxYear', $event)\"\r\n />\r\n </div>\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"flex flex-wrap items-center gap-4\">\r\n @if (supportsRequired(field)) {\r\n <mt-toggle-field\r\n [label]=\"t('isRequired')\"\r\n size=\"small\"\r\n [ngModel]=\"field.configuration?.isRequird ?? false\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'isRequird', $event)\"\r\n />\r\n }\r\n\r\n @if (supportsMultiple(field)) {\r\n <mt-toggle-field\r\n [label]=\"t('isMultiple')\"\r\n size=\"small\"\r\n [ngModel]=\"field.configuration?.isMultiple ?? false\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'isMultiple', $event)\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n </section>\r\n } @empty {\r\n <div\r\n class=\"flex flex-col items-center justify-center gap-2 rounded-md border border-dashed border-surface-300 py-10 text-center text-muted-color\"\r\n >\r\n <mt-icon icon=\"general.filter-lines\" class=\"text-3xl\" />\r\n <p class=\"text-sm font-medium\">{{ t(\"noFilterFieldsConfigured\") }}</p>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addField')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"addFilterField()\"\r\n [disabled]=\"disabled()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n" }]
5702
5811
  }], ctorParameters: () => [], propDecorators: { lookups: [{ type: i0.Input, args: [{ isSignal: true, alias: "lookups", required: false }] }], levelsSchema: [{ type: i0.Input, args: [{ isSignal: true, alias: "levelsSchema", required: false }] }], levelLogs: [{ type: i0.Input, args: [{ isSignal: true, alias: "levelLogs", required: false }] }], productType: [{ type: i0.Input, args: [{ isSignal: true, alias: "productType", required: false }] }], workspaceId: [{ type: i0.Input, args: [{ isSignal: true, alias: "workspaceId", required: false }] }], chartWorkspace: [{ type: i0.Input, args: [{ isSignal: true, alias: "chartWorkspace", required: false }] }], loadLevelLogs: [{ type: i0.Output, args: ["loadLevelLogs"] }] } });
5703
5812
 
5704
5813
  /**
@@ -5738,14 +5847,13 @@ class ManageFilterOnPage {
5738
5847
  this.filtersConfig.set(filters);
5739
5848
  }
5740
5849
  /**
5741
- * Hook for hosts that want to feed level-log values into the filter
5742
- * dialog. The host listens to `(loadLevelLogs)` (when consumers wire it)
5743
- * and pushes into `levelLogs`. Left intentionally unbound here so the
5744
- * library does not depend on a specific level-logs endpoint shape.
5850
+ * Hook for hosts that feed level-log values from their own source. Left as
5851
+ * a no-op because `DynamicFiltersConfig` already resolves the "Log" options
5852
+ * from the host-owned levels schema (`DashboardBuilder[levelsSchema]`);
5853
+ * `levelLogs` stays only as the fallback for an external log source.
5745
5854
  */
5746
5855
  onLoadLevelLogs(_schemaLevelId) {
5747
- // No-op: hosts override via `levelLogs` input/output if they want to
5748
- // populate level-log values for filter dropdowns.
5856
+ // No-op: options come from the levels schema fed into the builder service.
5749
5857
  }
5750
5858
  /** Save and close the dialog */
5751
5859
  save() {
@@ -8230,6 +8338,14 @@ const HEADER_WIDGET_SECTION = {
8230
8338
  ],
8231
8339
  default: 'start',
8232
8340
  },
8341
+ {
8342
+ // header-card reads configAsType.headerCardConfig.isHeaderCentered and
8343
+ // forces it as an override on top of `textAlign` above.
8344
+ key: 'centerHeader',
8345
+ label: 'Center header',
8346
+ type: 'boolean',
8347
+ path: 'clientConfig.configAsType.headerCardConfig.isHeaderCentered',
8348
+ },
8233
8349
  ],
8234
8350
  };
8235
8351
  const TOPBAR_WIDGET_SECTION = {
@@ -8247,6 +8363,13 @@ const TOPBAR_WIDGET_SECTION = {
8247
8363
  placeholder: 'Topbar label',
8248
8364
  },
8249
8365
  ...LAYOUT_WIDGET_ICON_FIELDS,
8366
+ {
8367
+ // topbar-card reads configAsType.headerCardConfig.isHeaderCentered.
8368
+ key: 'centerHeader',
8369
+ label: 'Center header',
8370
+ type: 'boolean',
8371
+ path: 'clientConfig.configAsType.headerCardConfig.isHeaderCentered',
8372
+ },
8250
8373
  {
8251
8374
  key: 'topbarBg',
8252
8375
  label: 'Topbar background',
@@ -10333,6 +10456,19 @@ const HEADER_WIDGET_BINDINGS = [
10333
10456
  ],
10334
10457
  simpleOrAdvanced: 'simple',
10335
10458
  },
10459
+ {
10460
+ chartId: 'header',
10461
+ controlId: 'centerHeader',
10462
+ domain: 'header',
10463
+ label: 'Center header',
10464
+ uiPath: 'header.centerHeader',
10465
+ persistedPath: 'clientConfig.configAsType.headerCardConfig.isHeaderCentered',
10466
+ runtimePath: 'clientConfig.configAsType.headerCardConfig.isHeaderCentered',
10467
+ rendererReadPaths: [
10468
+ 'clientConfig.configAsType.headerCardConfig.isHeaderCentered',
10469
+ ],
10470
+ simpleOrAdvanced: 'simple',
10471
+ },
10336
10472
  ];
10337
10473
  const TOPBAR_WIDGET_BINDINGS = [
10338
10474
  {
@@ -10346,6 +10482,19 @@ const TOPBAR_WIDGET_BINDINGS = [
10346
10482
  rendererReadPaths: ['clientConfig.title.en', 'clientConfig.title.ar'],
10347
10483
  simpleOrAdvanced: 'simple',
10348
10484
  },
10485
+ {
10486
+ chartId: 'topbar',
10487
+ controlId: 'centerHeader',
10488
+ domain: 'header',
10489
+ label: 'Center header',
10490
+ uiPath: 'topbar.centerHeader',
10491
+ persistedPath: 'clientConfig.configAsType.headerCardConfig.isHeaderCentered',
10492
+ runtimePath: 'clientConfig.configAsType.headerCardConfig.isHeaderCentered',
10493
+ rendererReadPaths: [
10494
+ 'clientConfig.configAsType.headerCardConfig.isHeaderCentered',
10495
+ ],
10496
+ simpleOrAdvanced: 'simple',
10497
+ },
10349
10498
  {
10350
10499
  chartId: 'topbar',
10351
10500
  controlId: 'showBackButton',
@@ -22831,7 +22980,7 @@ class ActionService {
22831
22980
  dialogConfig?.clientConfig?.title?.['ar'] ||
22832
22981
  '';
22833
22982
  // Dynamically import DashboardDialogComponent to avoid circular dependency
22834
- import('./masterteam-dashboard-builder-dashboard-dialog.component-CUvjw-JX.mjs').then(({ DashboardDialogComponent }) => {
22983
+ import('./masterteam-dashboard-builder-dashboard-dialog.component-DTm4d6HX.mjs').then(({ DashboardDialogComponent }) => {
22835
22984
  // Open dialog using ModalService
22836
22985
  this.modalService.openModal(DashboardDialogComponent, 'dialog', {
22837
22986
  header: title,
@@ -29571,14 +29720,6 @@ class HeaderCardComponent {
29571
29720
  if (this.borderColor() && !this.hasExplicitSideBorders()) {
29572
29721
  styles['border'] = `1px solid ${this.borderColor()}`;
29573
29722
  }
29574
- // Header text alignment (StyleConfig['justify-content']: start|center|end).
29575
- // The .header-card element is `display:flex`, so justify-content controls
29576
- // horizontal distribution of the header block. Gated: when unset, leave
29577
- // alignment to the existing CSS (no change for existing dashboards).
29578
- const justify = this.headerJustify();
29579
- if (justify) {
29580
- styles['justify-content'] = justify;
29581
- }
29582
29723
  // Hide the whole header band when isHeaderHidden is set.
29583
29724
  if (this.isHeaderHidden()) {
29584
29725
  styles['display'] = 'none';
@@ -29599,6 +29740,25 @@ class HeaderCardComponent {
29599
29740
  const justify = this.configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']?.['justify-content'];
29600
29741
  return justify ? String(justify) : '';
29601
29742
  }, ...(ngDevMode ? [{ debugName: "headerJustify" }] : /* istanbul ignore next */ []));
29743
+ /**
29744
+ * Inline styles for `.header-content` (title + status list). Applied here
29745
+ * rather than on the outer `.header-card` row: `.header-content` has
29746
+ * `flex: 1` and always fills the row's free space, so setting
29747
+ * `justify-content` on the outer row was a no-op — there was nothing left
29748
+ * to redistribute. `align-items: center` additionally centers the block
29749
+ * when the header collapses to a column (icon-placement-top / narrow
29750
+ * cards), where `justify-content` controls the vertical axis instead.
29751
+ */
29752
+ headerContentStyles = computed(() => {
29753
+ const justify = this.headerJustify();
29754
+ if (!justify)
29755
+ return {};
29756
+ const styles = { 'justify-content': justify };
29757
+ if (justify === 'center') {
29758
+ styles['align-items'] = 'center';
29759
+ }
29760
+ return styles;
29761
+ }, ...(ngDevMode ? [{ debugName: "headerContentStyles" }] : /* istanbul ignore next */ []));
29602
29762
  /**
29603
29763
  * Center the header block
29604
29764
  * (configAsType.headerCardConfig.isHeaderCentered === true).
@@ -29713,11 +29873,11 @@ class HeaderCardComponent {
29713
29873
  this.onAction.emit({ type: 'click', data: {} });
29714
29874
  }
29715
29875
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HeaderCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
29716
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: HeaderCardComponent, isStandalone: true, selector: "mt-header-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null }, titleEditable: { classPropertyName: "titleEditable", publicName: "titleEditable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction", titleChange: "titleChange" }, ngImport: i0, template: "<div\r\n class=\"header-container\"\r\n [ngStyle]=\"containerStyles()\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <div\r\n class=\"header-card\"\r\n [class.clickable]=\"isClickable()\"\r\n [class.icon-placement-end]=\"iconPlacement() === 'end'\"\r\n [class.icon-placement-top]=\"iconPlacement() === 'top'\"\r\n [ngStyle]=\"cardStyles()\"\r\n [style.box-sizing]=\"'border-box'\"\r\n >\r\n <!-- Logo or Icon Display -->\r\n @if (logoUrl() || icon()) {\r\n <div class=\"header-icon-wrapper\">\r\n @if (logoUrl()) {\r\n <img [src]=\"logoUrl()\" alt=\"Logo\" class=\"header-logo\" />\r\n } @else if (icon()) {\r\n <mt-avatar\r\n class=\"header-icon\"\r\n [icon]=\"icon()\"\r\n size=\"large\"\r\n shape=\"square\"\r\n [style.--p-avatar-background]=\"iconBgColor()\"\r\n [style.--p-avatar-color]=\"iconColor()\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"header-content\" [class.label-title]=\"!isFullWidth()\">\r\n @if (titleEditable() && editingTitle()) {\r\n <input\r\n class=\"header-title\"\r\n type=\"text\"\r\n [value]=\"titleDraft()\"\r\n [ngStyle]=\"{ 'font-size': fontSizeTitle() }\"\r\n (input)=\"onTitleInput($any($event.target).value)\"\r\n (keydown.enter)=\"onCommitTitle()\"\r\n (keydown.escape)=\"onCancelTitle()\"\r\n (blur)=\"onCommitTitle()\"\r\n data-dashboard-action=\"edit-title\"\r\n [attr.aria-label]=\"t('guided.editTitle')\"\r\n />\r\n } @else {\r\n <span\r\n class=\"header-title\"\r\n [class.editable]=\"titleEditable()\"\r\n [ngStyle]=\"{ 'font-size': fontSizeTitle() }\"\r\n (click)=\"onTitleClick()\"\r\n [attr.data-dashboard-action]=\"titleEditable() ? 'edit-title' : null\"\r\n >\r\n {{ title() }}\r\n </span>\r\n }\r\n\r\n <!-- Status Indicators -->\r\n @if (statuses().length > 0) {\r\n <div class=\"status-list\">\r\n @for (status of statuses(); track status.label) {\r\n <div class=\"status-item\">\r\n @if (status.iconClass) {\r\n <span\r\n [class]=\"status.iconClass\"\r\n class=\"status-icon\"\r\n [style.color]=\"status.color\"\r\n [style.font-size.px]=\"status.iconSize || 14\"\r\n ></span>\r\n } @else {\r\n <span\r\n class=\"status-dot\"\r\n [class.circle]=\"status.shape === 'circle' || !status.shape\"\r\n [class.square]=\"\r\n status.shape === 'square' || status.shape === 'rect'\r\n \"\r\n [class.rectangul]=\"status.shape === 'rectangul'\"\r\n [class.rhombic]=\"status.shape === 'rhombic'\"\r\n [ngStyle]=\"{\r\n 'background-color': status.color,\r\n 'border-color': status.borderColor,\r\n 'border-bottom-color': status.borderBottomColor,\r\n }\"\r\n ></span>\r\n }\r\n <span class=\"status-label\">{{ status.label }}</span>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (showArrow()) {\r\n <div class=\"header-arrow\" (click)=\"onArrowClick()\">\r\n <i class=\"pi pi-angle-right\"></i>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".header-container{height:100%}.header-card{display:flex;align-items:center;gap:.5rem;height:100%}.header-card.clickable{cursor:pointer}.header-card.icon-placement-end .header-icon-wrapper{order:2}.header-card.icon-placement-top{align-items:stretch;flex-direction:column}.header-card.icon-placement-top .header-icon-wrapper{align-self:flex-start}.header-card.icon-placement-top .header-content{flex:0 1 auto;width:100%}.header-icon-wrapper{display:flex;align-items:center}.header-logo{width:50px;height:50px;object-fit:contain;margin:0 .5rem}.header-icon{margin:0 .5rem}.header-content{display:flex;justify-content:space-between;align-items:center;flex:1}.header-content.label-title{flex-direction:column;align-items:flex-start}.header-title{margin:0;font-weight:600;line-height:1.2}.header-title.editable{cursor:text}input.header-title{min-width:10rem;border:1px solid var(--p-primary-500, #2563eb);border-radius:4px;padding:.15rem .35rem;background:#fff;outline:none}.status-list{display:flex;gap:1rem;flex-wrap:wrap}.status-item{display:flex;align-items:center;gap:.25rem}.status-dot{width:.5rem;height:.5rem;border-radius:50%}.status-dot.circle{border-radius:50%}.status-dot.square,.status-dot.rect{border-radius:2px}.status-dot.rectangul{border-radius:2px;width:.75rem;height:.375rem}.status-dot.rhombic{transform:rotate(45deg);border-radius:2px}.status-icon{display:inline-flex;align-items:center;justify-content:center}.status-label{font-size:.75rem;color:#666}.header-arrow{font-size:1.5rem;color:#999;cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
29876
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: HeaderCardComponent, isStandalone: true, selector: "mt-header-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null }, titleEditable: { classPropertyName: "titleEditable", publicName: "titleEditable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction", titleChange: "titleChange" }, ngImport: i0, template: "<div\r\n class=\"header-container\"\r\n [ngStyle]=\"containerStyles()\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <div\r\n class=\"header-card\"\r\n [class.clickable]=\"isClickable()\"\r\n [class.icon-placement-end]=\"iconPlacement() === 'end'\"\r\n [class.icon-placement-top]=\"iconPlacement() === 'top'\"\r\n [ngStyle]=\"cardStyles()\"\r\n [style.box-sizing]=\"'border-box'\"\r\n >\r\n <!-- Logo or Icon Display -->\r\n @if (logoUrl() || icon()) {\r\n <div class=\"header-icon-wrapper\">\r\n @if (logoUrl()) {\r\n <img [src]=\"logoUrl()\" alt=\"Logo\" class=\"header-logo\" />\r\n } @else if (icon()) {\r\n <mt-avatar\r\n class=\"header-icon\"\r\n [icon]=\"icon()\"\r\n size=\"large\"\r\n shape=\"square\"\r\n [style.--p-avatar-background]=\"iconBgColor()\"\r\n [style.--p-avatar-color]=\"iconColor()\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n <div\r\n class=\"header-content\"\r\n [class.label-title]=\"!isFullWidth()\"\r\n [ngStyle]=\"headerContentStyles()\"\r\n >\r\n @if (titleEditable() && editingTitle()) {\r\n <input\r\n class=\"header-title\"\r\n type=\"text\"\r\n [value]=\"titleDraft()\"\r\n [ngStyle]=\"{ 'font-size': fontSizeTitle() }\"\r\n (input)=\"onTitleInput($any($event.target).value)\"\r\n (keydown.enter)=\"onCommitTitle()\"\r\n (keydown.escape)=\"onCancelTitle()\"\r\n (blur)=\"onCommitTitle()\"\r\n data-dashboard-action=\"edit-title\"\r\n [attr.aria-label]=\"t('guided.editTitle')\"\r\n />\r\n } @else {\r\n <span\r\n class=\"header-title\"\r\n [class.editable]=\"titleEditable()\"\r\n [ngStyle]=\"{ 'font-size': fontSizeTitle() }\"\r\n (click)=\"onTitleClick()\"\r\n [attr.data-dashboard-action]=\"titleEditable() ? 'edit-title' : null\"\r\n >\r\n {{ title() }}\r\n </span>\r\n }\r\n\r\n <!-- Status Indicators -->\r\n @if (statuses().length > 0) {\r\n <div class=\"status-list\">\r\n @for (status of statuses(); track status.label) {\r\n <div class=\"status-item\">\r\n @if (status.iconClass) {\r\n <span\r\n [class]=\"status.iconClass\"\r\n class=\"status-icon\"\r\n [style.color]=\"status.color\"\r\n [style.font-size.px]=\"status.iconSize || 14\"\r\n ></span>\r\n } @else {\r\n <span\r\n class=\"status-dot\"\r\n [class.circle]=\"status.shape === 'circle' || !status.shape\"\r\n [class.square]=\"\r\n status.shape === 'square' || status.shape === 'rect'\r\n \"\r\n [class.rectangul]=\"status.shape === 'rectangul'\"\r\n [class.rhombic]=\"status.shape === 'rhombic'\"\r\n [ngStyle]=\"{\r\n 'background-color': status.color,\r\n 'border-color': status.borderColor,\r\n 'border-bottom-color': status.borderBottomColor,\r\n }\"\r\n ></span>\r\n }\r\n <span class=\"status-label\">{{ status.label }}</span>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (showArrow()) {\r\n <div class=\"header-arrow\" (click)=\"onArrowClick()\">\r\n <i class=\"pi pi-angle-right\"></i>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".header-container{height:100%}.header-card{display:flex;align-items:center;gap:.5rem;height:100%}.header-card.clickable{cursor:pointer}.header-card.icon-placement-end .header-icon-wrapper{order:2}.header-card.icon-placement-top{align-items:stretch;flex-direction:column}.header-card.icon-placement-top .header-icon-wrapper{align-self:flex-start}.header-card.icon-placement-top .header-content{flex:0 1 auto;width:100%}.header-icon-wrapper{display:flex;align-items:center}.header-logo{width:50px;height:50px;object-fit:contain;margin:0 .5rem}.header-icon{margin:0 .5rem}.header-content{display:flex;justify-content:space-between;align-items:center;flex:1}.header-content.label-title{flex-direction:column;align-items:flex-start}.header-title{margin:0;font-weight:600;line-height:1.2}.header-title.editable{cursor:text}input.header-title{min-width:10rem;border:1px solid var(--p-primary-500, #2563eb);border-radius:4px;padding:.15rem .35rem;background:#fff;outline:none}.status-list{display:flex;gap:1rem;flex-wrap:wrap}.status-item{display:flex;align-items:center;gap:.25rem}.status-dot{width:.5rem;height:.5rem;border-radius:50%}.status-dot.circle{border-radius:50%}.status-dot.square,.status-dot.rect{border-radius:2px}.status-dot.rectangul{border-radius:2px;width:.75rem;height:.375rem}.status-dot.rhombic{transform:rotate(45deg);border-radius:2px}.status-icon{display:inline-flex;align-items:center;justify-content:center}.status-label{font-size:.75rem;color:#666}.header-arrow{font-size:1.5rem;color:#999;cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
29717
29877
  }
29718
29878
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HeaderCardComponent, decorators: [{
29719
29879
  type: Component,
29720
- args: [{ selector: 'mt-header-card', standalone: true, imports: [CommonModule, TranslocoDirective, Avatar], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"header-container\"\r\n [ngStyle]=\"containerStyles()\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <div\r\n class=\"header-card\"\r\n [class.clickable]=\"isClickable()\"\r\n [class.icon-placement-end]=\"iconPlacement() === 'end'\"\r\n [class.icon-placement-top]=\"iconPlacement() === 'top'\"\r\n [ngStyle]=\"cardStyles()\"\r\n [style.box-sizing]=\"'border-box'\"\r\n >\r\n <!-- Logo or Icon Display -->\r\n @if (logoUrl() || icon()) {\r\n <div class=\"header-icon-wrapper\">\r\n @if (logoUrl()) {\r\n <img [src]=\"logoUrl()\" alt=\"Logo\" class=\"header-logo\" />\r\n } @else if (icon()) {\r\n <mt-avatar\r\n class=\"header-icon\"\r\n [icon]=\"icon()\"\r\n size=\"large\"\r\n shape=\"square\"\r\n [style.--p-avatar-background]=\"iconBgColor()\"\r\n [style.--p-avatar-color]=\"iconColor()\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"header-content\" [class.label-title]=\"!isFullWidth()\">\r\n @if (titleEditable() && editingTitle()) {\r\n <input\r\n class=\"header-title\"\r\n type=\"text\"\r\n [value]=\"titleDraft()\"\r\n [ngStyle]=\"{ 'font-size': fontSizeTitle() }\"\r\n (input)=\"onTitleInput($any($event.target).value)\"\r\n (keydown.enter)=\"onCommitTitle()\"\r\n (keydown.escape)=\"onCancelTitle()\"\r\n (blur)=\"onCommitTitle()\"\r\n data-dashboard-action=\"edit-title\"\r\n [attr.aria-label]=\"t('guided.editTitle')\"\r\n />\r\n } @else {\r\n <span\r\n class=\"header-title\"\r\n [class.editable]=\"titleEditable()\"\r\n [ngStyle]=\"{ 'font-size': fontSizeTitle() }\"\r\n (click)=\"onTitleClick()\"\r\n [attr.data-dashboard-action]=\"titleEditable() ? 'edit-title' : null\"\r\n >\r\n {{ title() }}\r\n </span>\r\n }\r\n\r\n <!-- Status Indicators -->\r\n @if (statuses().length > 0) {\r\n <div class=\"status-list\">\r\n @for (status of statuses(); track status.label) {\r\n <div class=\"status-item\">\r\n @if (status.iconClass) {\r\n <span\r\n [class]=\"status.iconClass\"\r\n class=\"status-icon\"\r\n [style.color]=\"status.color\"\r\n [style.font-size.px]=\"status.iconSize || 14\"\r\n ></span>\r\n } @else {\r\n <span\r\n class=\"status-dot\"\r\n [class.circle]=\"status.shape === 'circle' || !status.shape\"\r\n [class.square]=\"\r\n status.shape === 'square' || status.shape === 'rect'\r\n \"\r\n [class.rectangul]=\"status.shape === 'rectangul'\"\r\n [class.rhombic]=\"status.shape === 'rhombic'\"\r\n [ngStyle]=\"{\r\n 'background-color': status.color,\r\n 'border-color': status.borderColor,\r\n 'border-bottom-color': status.borderBottomColor,\r\n }\"\r\n ></span>\r\n }\r\n <span class=\"status-label\">{{ status.label }}</span>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (showArrow()) {\r\n <div class=\"header-arrow\" (click)=\"onArrowClick()\">\r\n <i class=\"pi pi-angle-right\"></i>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".header-container{height:100%}.header-card{display:flex;align-items:center;gap:.5rem;height:100%}.header-card.clickable{cursor:pointer}.header-card.icon-placement-end .header-icon-wrapper{order:2}.header-card.icon-placement-top{align-items:stretch;flex-direction:column}.header-card.icon-placement-top .header-icon-wrapper{align-self:flex-start}.header-card.icon-placement-top .header-content{flex:0 1 auto;width:100%}.header-icon-wrapper{display:flex;align-items:center}.header-logo{width:50px;height:50px;object-fit:contain;margin:0 .5rem}.header-icon{margin:0 .5rem}.header-content{display:flex;justify-content:space-between;align-items:center;flex:1}.header-content.label-title{flex-direction:column;align-items:flex-start}.header-title{margin:0;font-weight:600;line-height:1.2}.header-title.editable{cursor:text}input.header-title{min-width:10rem;border:1px solid var(--p-primary-500, #2563eb);border-radius:4px;padding:.15rem .35rem;background:#fff;outline:none}.status-list{display:flex;gap:1rem;flex-wrap:wrap}.status-item{display:flex;align-items:center;gap:.25rem}.status-dot{width:.5rem;height:.5rem;border-radius:50%}.status-dot.circle{border-radius:50%}.status-dot.square,.status-dot.rect{border-radius:2px}.status-dot.rectangul{border-radius:2px;width:.75rem;height:.375rem}.status-dot.rhombic{transform:rotate(45deg);border-radius:2px}.status-icon{display:inline-flex;align-items:center;justify-content:center}.status-label{font-size:.75rem;color:#666}.header-arrow{font-size:1.5rem;color:#999;cursor:pointer}\n"] }]
29880
+ args: [{ selector: 'mt-header-card', standalone: true, imports: [CommonModule, TranslocoDirective, Avatar], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"header-container\"\r\n [ngStyle]=\"containerStyles()\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <div\r\n class=\"header-card\"\r\n [class.clickable]=\"isClickable()\"\r\n [class.icon-placement-end]=\"iconPlacement() === 'end'\"\r\n [class.icon-placement-top]=\"iconPlacement() === 'top'\"\r\n [ngStyle]=\"cardStyles()\"\r\n [style.box-sizing]=\"'border-box'\"\r\n >\r\n <!-- Logo or Icon Display -->\r\n @if (logoUrl() || icon()) {\r\n <div class=\"header-icon-wrapper\">\r\n @if (logoUrl()) {\r\n <img [src]=\"logoUrl()\" alt=\"Logo\" class=\"header-logo\" />\r\n } @else if (icon()) {\r\n <mt-avatar\r\n class=\"header-icon\"\r\n [icon]=\"icon()\"\r\n size=\"large\"\r\n shape=\"square\"\r\n [style.--p-avatar-background]=\"iconBgColor()\"\r\n [style.--p-avatar-color]=\"iconColor()\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n <div\r\n class=\"header-content\"\r\n [class.label-title]=\"!isFullWidth()\"\r\n [ngStyle]=\"headerContentStyles()\"\r\n >\r\n @if (titleEditable() && editingTitle()) {\r\n <input\r\n class=\"header-title\"\r\n type=\"text\"\r\n [value]=\"titleDraft()\"\r\n [ngStyle]=\"{ 'font-size': fontSizeTitle() }\"\r\n (input)=\"onTitleInput($any($event.target).value)\"\r\n (keydown.enter)=\"onCommitTitle()\"\r\n (keydown.escape)=\"onCancelTitle()\"\r\n (blur)=\"onCommitTitle()\"\r\n data-dashboard-action=\"edit-title\"\r\n [attr.aria-label]=\"t('guided.editTitle')\"\r\n />\r\n } @else {\r\n <span\r\n class=\"header-title\"\r\n [class.editable]=\"titleEditable()\"\r\n [ngStyle]=\"{ 'font-size': fontSizeTitle() }\"\r\n (click)=\"onTitleClick()\"\r\n [attr.data-dashboard-action]=\"titleEditable() ? 'edit-title' : null\"\r\n >\r\n {{ title() }}\r\n </span>\r\n }\r\n\r\n <!-- Status Indicators -->\r\n @if (statuses().length > 0) {\r\n <div class=\"status-list\">\r\n @for (status of statuses(); track status.label) {\r\n <div class=\"status-item\">\r\n @if (status.iconClass) {\r\n <span\r\n [class]=\"status.iconClass\"\r\n class=\"status-icon\"\r\n [style.color]=\"status.color\"\r\n [style.font-size.px]=\"status.iconSize || 14\"\r\n ></span>\r\n } @else {\r\n <span\r\n class=\"status-dot\"\r\n [class.circle]=\"status.shape === 'circle' || !status.shape\"\r\n [class.square]=\"\r\n status.shape === 'square' || status.shape === 'rect'\r\n \"\r\n [class.rectangul]=\"status.shape === 'rectangul'\"\r\n [class.rhombic]=\"status.shape === 'rhombic'\"\r\n [ngStyle]=\"{\r\n 'background-color': status.color,\r\n 'border-color': status.borderColor,\r\n 'border-bottom-color': status.borderBottomColor,\r\n }\"\r\n ></span>\r\n }\r\n <span class=\"status-label\">{{ status.label }}</span>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (showArrow()) {\r\n <div class=\"header-arrow\" (click)=\"onArrowClick()\">\r\n <i class=\"pi pi-angle-right\"></i>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".header-container{height:100%}.header-card{display:flex;align-items:center;gap:.5rem;height:100%}.header-card.clickable{cursor:pointer}.header-card.icon-placement-end .header-icon-wrapper{order:2}.header-card.icon-placement-top{align-items:stretch;flex-direction:column}.header-card.icon-placement-top .header-icon-wrapper{align-self:flex-start}.header-card.icon-placement-top .header-content{flex:0 1 auto;width:100%}.header-icon-wrapper{display:flex;align-items:center}.header-logo{width:50px;height:50px;object-fit:contain;margin:0 .5rem}.header-icon{margin:0 .5rem}.header-content{display:flex;justify-content:space-between;align-items:center;flex:1}.header-content.label-title{flex-direction:column;align-items:flex-start}.header-title{margin:0;font-weight:600;line-height:1.2}.header-title.editable{cursor:text}input.header-title{min-width:10rem;border:1px solid var(--p-primary-500, #2563eb);border-radius:4px;padding:.15rem .35rem;background:#fff;outline:none}.status-list{display:flex;gap:1rem;flex-wrap:wrap}.status-item{display:flex;align-items:center;gap:.25rem}.status-dot{width:.5rem;height:.5rem;border-radius:50%}.status-dot.circle{border-radius:50%}.status-dot.square,.status-dot.rect{border-radius:2px}.status-dot.rectangul{border-radius:2px;width:.75rem;height:.375rem}.status-dot.rhombic{transform:rotate(45deg);border-radius:2px}.status-icon{display:inline-flex;align-items:center;justify-content:center}.status-label{font-size:.75rem;color:#666}.header-arrow{font-size:1.5rem;color:#999;cursor:pointer}\n"] }]
29721
29881
  }], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }], onAction: [{ type: i0.Output, args: ["onAction"] }], titleEditable: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleEditable", required: false }] }], titleChange: [{ type: i0.Output, args: ["titleChange"] }] } });
29722
29882
 
29723
29883
  /**
@@ -30766,6 +30926,14 @@ class TopbarCardComponent {
30766
30926
  const placement = this.configAsType()['headerCardConfig']?.['iconPlacement'];
30767
30927
  return placement === 'end' || placement === 'top' ? placement : 'start';
30768
30928
  }, ...(ngDevMode ? [{ debugName: "iconPlacement" }] : /* istanbul ignore next */ []));
30929
+ /**
30930
+ * Center the icon/title block within the topbar row
30931
+ * (configAsType.headerCardConfig.isHeaderCentered === true) — same source
30932
+ * field the header widget reads.
30933
+ */
30934
+ isHeaderCentered = computed(() => {
30935
+ return (this.configAsType()['headerCardConfig']?.['isHeaderCentered'] === true);
30936
+ }, ...(ngDevMode ? [{ debugName: "isHeaderCentered" }] : /* istanbul ignore next */ []));
30769
30937
  iconColor = computed(() => {
30770
30938
  return this.styleConfig()['iconColor'] || '#4caf50';
30771
30939
  }, ...(ngDevMode ? [{ debugName: "iconColor" }] : /* istanbul ignore next */ []));
@@ -30853,11 +31021,11 @@ class TopbarCardComponent {
30853
31021
  this.titleDraft.set('');
30854
31022
  }
30855
31023
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TopbarCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
30856
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: TopbarCardComponent, isStandalone: true, selector: "mt-topbar-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null }, defaultBreadcrumbLabel: { classPropertyName: "defaultBreadcrumbLabel", publicName: "defaultBreadcrumbLabel", isSignal: true, isRequired: false, transformFunction: null }, titleEditable: { classPropertyName: "titleEditable", publicName: "titleEditable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { titleChange: "titleChange" }, ngImport: i0, template: "<div\r\n class=\"flex h-full flex-col gap-3 md:flex-row md:items-center md:justify-between\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n [style.background-color]=\"\r\n cardStyleConfig()['backgroundColor'] || styleConfig()['background-color']\r\n \"\r\n [style.border-radius.px]=\"cardStyleConfig()['borderRadius']\"\r\n [style.border-color]=\"borderColor()\"\r\n [style.border-style]=\"borderWidth() ? 'solid' : null\"\r\n [style.border-width.px]=\"borderWidth()\"\r\n [style.color]=\"styleConfig()['color'] || 'inherit'\"\r\n [style.padding.px]=\"padding()\"\r\n>\r\n <ng-template #topbarIcon>\r\n <mt-avatar\r\n [icon]=\"icon()\"\r\n size=\"normal\"\r\n shape=\"square\"\r\n [style.--p-avatar-background]=\"iconBackgroundColor()\"\r\n [style.--p-avatar-color]=\"iconColor()\"\r\n />\r\n </ng-template>\r\n\r\n <div\r\n class=\"flex min-w-0 flex-1 gap-3\"\r\n [class.flex-col]=\"iconPlacement() === 'top'\"\r\n [class.items-center]=\"iconPlacement() !== 'top'\"\r\n [class.items-start]=\"iconPlacement() === 'top'\"\r\n >\r\n @if (icon() && iconPlacement() !== \"end\") {\r\n <ng-container *ngTemplateOutlet=\"topbarIcon\" />\r\n }\r\n\r\n <div class=\"min-w-0\" [class.w-full]=\"iconPlacement() === 'top'\">\r\n @if (titleEditable() && editingTitle()) {\r\n <input\r\n class=\"m-0 w-full min-w-40 rounded border border-primary bg-surface-0 px-2 py-1 font-semibold leading-tight outline-none\"\r\n type=\"text\"\r\n [value]=\"titleDraft()\"\r\n [style.font-size.px]=\"titleFontSize()\"\r\n (input)=\"onTitleInput($any($event.target).value)\"\r\n (keydown.enter)=\"onCommitTitle()\"\r\n (keydown.escape)=\"onCancelTitle()\"\r\n (blur)=\"onCommitTitle()\"\r\n data-dashboard-action=\"edit-title\"\r\n [attr.aria-label]=\"t('guided.editTitle')\"\r\n />\r\n } @else if (title()) {\r\n <h3\r\n class=\"m-0 truncate font-semibold leading-tight\"\r\n [class.cursor-text]=\"titleEditable()\"\r\n [style.font-size.px]=\"titleFontSize()\"\r\n [attr.data-dashboard-action]=\"titleEditable() ? 'edit-title' : null\"\r\n (click)=\"onStartEditTitle($event)\"\r\n >\r\n {{ title() }}\r\n </h3>\r\n }\r\n\r\n @if (showSubtitle()) {\r\n <p\r\n class=\"m-0 truncate leading-tight\"\r\n [style.font-size.px]=\"subtitleFontSize()\"\r\n [style.color]=\"subtitleColor()\"\r\n >\r\n {{ subtitleText() }}\r\n </p>\r\n }\r\n </div>\r\n\r\n @if (icon() && iconPlacement() === \"end\") {\r\n <ng-container *ngTemplateOutlet=\"topbarIcon\" />\r\n }\r\n </div>\r\n\r\n @if (breadcrumbs().length > 0) {\r\n <nav class=\"min-w-0 md:max-w-[60%]\">\r\n <ol class=\"flex flex-wrap items-center gap-2 text-sm\">\r\n @for (\r\n breadcrumb of breadcrumbs();\r\n track breadcrumb.label + $index;\r\n let last = $last\r\n ) {\r\n <li class=\"flex min-w-0 items-center gap-2\">\r\n @if (breadcrumb.link) {\r\n <a\r\n class=\"max-w-[12rem] truncate text-muted-color transition-colors hover:text-primary\"\r\n [href]=\"breadcrumb.link\"\r\n [target]=\"isExternalLink(breadcrumb.link) ? '_blank' : null\"\r\n [rel]=\"isExternalLink(breadcrumb.link) ? 'noreferrer' : null\"\r\n >\r\n {{ breadcrumb.label }}\r\n </a>\r\n } @else {\r\n <span class=\"max-w-[12rem] truncate text-muted-color\">\r\n {{ breadcrumb.label }}\r\n </span>\r\n }\r\n\r\n @if (!last) {\r\n <i class=\"mti mti-chevron-right text-xs text-muted-color\"></i>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n </nav>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
31024
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: TopbarCardComponent, isStandalone: true, selector: "mt-topbar-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null }, defaultBreadcrumbLabel: { classPropertyName: "defaultBreadcrumbLabel", publicName: "defaultBreadcrumbLabel", isSignal: true, isRequired: false, transformFunction: null }, titleEditable: { classPropertyName: "titleEditable", publicName: "titleEditable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { titleChange: "titleChange" }, ngImport: i0, template: "<div\r\n class=\"flex h-full flex-col gap-3 md:flex-row md:items-center md:justify-between\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n [style.background-color]=\"\r\n cardStyleConfig()['backgroundColor'] || styleConfig()['background-color']\r\n \"\r\n [style.border-radius.px]=\"cardStyleConfig()['borderRadius']\"\r\n [style.border-color]=\"borderColor()\"\r\n [style.border-style]=\"borderWidth() ? 'solid' : null\"\r\n [style.border-width.px]=\"borderWidth()\"\r\n [style.color]=\"styleConfig()['color'] || 'inherit'\"\r\n [style.padding.px]=\"padding()\"\r\n>\r\n <ng-template #topbarIcon>\r\n <mt-avatar\r\n [icon]=\"icon()\"\r\n size=\"normal\"\r\n shape=\"square\"\r\n [style.--p-avatar-background]=\"iconBackgroundColor()\"\r\n [style.--p-avatar-color]=\"iconColor()\"\r\n />\r\n </ng-template>\r\n\r\n <div\r\n class=\"flex min-w-0 flex-1 gap-3\"\r\n [class.flex-col]=\"iconPlacement() === 'top'\"\r\n [class.items-center]=\"iconPlacement() !== 'top'\"\r\n [class.items-start]=\"iconPlacement() === 'top'\"\r\n [class.justify-center]=\"isHeaderCentered()\"\r\n >\r\n @if (icon() && iconPlacement() !== \"end\") {\r\n <ng-container *ngTemplateOutlet=\"topbarIcon\" />\r\n }\r\n\r\n <div class=\"min-w-0\" [class.w-full]=\"iconPlacement() === 'top'\">\r\n @if (titleEditable() && editingTitle()) {\r\n <input\r\n class=\"m-0 w-full min-w-40 rounded border border-primary bg-surface-0 px-2 py-1 font-semibold leading-tight outline-none\"\r\n type=\"text\"\r\n [value]=\"titleDraft()\"\r\n [style.font-size.px]=\"titleFontSize()\"\r\n (input)=\"onTitleInput($any($event.target).value)\"\r\n (keydown.enter)=\"onCommitTitle()\"\r\n (keydown.escape)=\"onCancelTitle()\"\r\n (blur)=\"onCommitTitle()\"\r\n data-dashboard-action=\"edit-title\"\r\n [attr.aria-label]=\"t('guided.editTitle')\"\r\n />\r\n } @else if (title()) {\r\n <h3\r\n class=\"m-0 truncate font-semibold leading-tight\"\r\n [class.cursor-text]=\"titleEditable()\"\r\n [style.font-size.px]=\"titleFontSize()\"\r\n [attr.data-dashboard-action]=\"titleEditable() ? 'edit-title' : null\"\r\n (click)=\"onStartEditTitle($event)\"\r\n >\r\n {{ title() }}\r\n </h3>\r\n }\r\n\r\n @if (showSubtitle()) {\r\n <p\r\n class=\"m-0 truncate leading-tight\"\r\n [style.font-size.px]=\"subtitleFontSize()\"\r\n [style.color]=\"subtitleColor()\"\r\n >\r\n {{ subtitleText() }}\r\n </p>\r\n }\r\n </div>\r\n\r\n @if (icon() && iconPlacement() === \"end\") {\r\n <ng-container *ngTemplateOutlet=\"topbarIcon\" />\r\n }\r\n </div>\r\n\r\n @if (breadcrumbs().length > 0) {\r\n <nav class=\"min-w-0 md:max-w-[60%]\">\r\n <ol class=\"flex flex-wrap items-center gap-2 text-sm\">\r\n @for (\r\n breadcrumb of breadcrumbs();\r\n track breadcrumb.label + $index;\r\n let last = $last\r\n ) {\r\n <li class=\"flex min-w-0 items-center gap-2\">\r\n @if (breadcrumb.link) {\r\n <a\r\n class=\"max-w-[12rem] truncate text-muted-color transition-colors hover:text-primary\"\r\n [href]=\"breadcrumb.link\"\r\n [target]=\"isExternalLink(breadcrumb.link) ? '_blank' : null\"\r\n [rel]=\"isExternalLink(breadcrumb.link) ? 'noreferrer' : null\"\r\n >\r\n {{ breadcrumb.label }}\r\n </a>\r\n } @else {\r\n <span class=\"max-w-[12rem] truncate text-muted-color\">\r\n {{ breadcrumb.label }}\r\n </span>\r\n }\r\n\r\n @if (!last) {\r\n <i class=\"mti mti-chevron-right text-xs text-muted-color\"></i>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n </nav>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
30857
31025
  }
30858
31026
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TopbarCardComponent, decorators: [{
30859
31027
  type: Component,
30860
- args: [{ selector: 'mt-topbar-card', standalone: true, imports: [CommonModule, TranslocoDirective, Avatar], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"flex h-full flex-col gap-3 md:flex-row md:items-center md:justify-between\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n [style.background-color]=\"\r\n cardStyleConfig()['backgroundColor'] || styleConfig()['background-color']\r\n \"\r\n [style.border-radius.px]=\"cardStyleConfig()['borderRadius']\"\r\n [style.border-color]=\"borderColor()\"\r\n [style.border-style]=\"borderWidth() ? 'solid' : null\"\r\n [style.border-width.px]=\"borderWidth()\"\r\n [style.color]=\"styleConfig()['color'] || 'inherit'\"\r\n [style.padding.px]=\"padding()\"\r\n>\r\n <ng-template #topbarIcon>\r\n <mt-avatar\r\n [icon]=\"icon()\"\r\n size=\"normal\"\r\n shape=\"square\"\r\n [style.--p-avatar-background]=\"iconBackgroundColor()\"\r\n [style.--p-avatar-color]=\"iconColor()\"\r\n />\r\n </ng-template>\r\n\r\n <div\r\n class=\"flex min-w-0 flex-1 gap-3\"\r\n [class.flex-col]=\"iconPlacement() === 'top'\"\r\n [class.items-center]=\"iconPlacement() !== 'top'\"\r\n [class.items-start]=\"iconPlacement() === 'top'\"\r\n >\r\n @if (icon() && iconPlacement() !== \"end\") {\r\n <ng-container *ngTemplateOutlet=\"topbarIcon\" />\r\n }\r\n\r\n <div class=\"min-w-0\" [class.w-full]=\"iconPlacement() === 'top'\">\r\n @if (titleEditable() && editingTitle()) {\r\n <input\r\n class=\"m-0 w-full min-w-40 rounded border border-primary bg-surface-0 px-2 py-1 font-semibold leading-tight outline-none\"\r\n type=\"text\"\r\n [value]=\"titleDraft()\"\r\n [style.font-size.px]=\"titleFontSize()\"\r\n (input)=\"onTitleInput($any($event.target).value)\"\r\n (keydown.enter)=\"onCommitTitle()\"\r\n (keydown.escape)=\"onCancelTitle()\"\r\n (blur)=\"onCommitTitle()\"\r\n data-dashboard-action=\"edit-title\"\r\n [attr.aria-label]=\"t('guided.editTitle')\"\r\n />\r\n } @else if (title()) {\r\n <h3\r\n class=\"m-0 truncate font-semibold leading-tight\"\r\n [class.cursor-text]=\"titleEditable()\"\r\n [style.font-size.px]=\"titleFontSize()\"\r\n [attr.data-dashboard-action]=\"titleEditable() ? 'edit-title' : null\"\r\n (click)=\"onStartEditTitle($event)\"\r\n >\r\n {{ title() }}\r\n </h3>\r\n }\r\n\r\n @if (showSubtitle()) {\r\n <p\r\n class=\"m-0 truncate leading-tight\"\r\n [style.font-size.px]=\"subtitleFontSize()\"\r\n [style.color]=\"subtitleColor()\"\r\n >\r\n {{ subtitleText() }}\r\n </p>\r\n }\r\n </div>\r\n\r\n @if (icon() && iconPlacement() === \"end\") {\r\n <ng-container *ngTemplateOutlet=\"topbarIcon\" />\r\n }\r\n </div>\r\n\r\n @if (breadcrumbs().length > 0) {\r\n <nav class=\"min-w-0 md:max-w-[60%]\">\r\n <ol class=\"flex flex-wrap items-center gap-2 text-sm\">\r\n @for (\r\n breadcrumb of breadcrumbs();\r\n track breadcrumb.label + $index;\r\n let last = $last\r\n ) {\r\n <li class=\"flex min-w-0 items-center gap-2\">\r\n @if (breadcrumb.link) {\r\n <a\r\n class=\"max-w-[12rem] truncate text-muted-color transition-colors hover:text-primary\"\r\n [href]=\"breadcrumb.link\"\r\n [target]=\"isExternalLink(breadcrumb.link) ? '_blank' : null\"\r\n [rel]=\"isExternalLink(breadcrumb.link) ? 'noreferrer' : null\"\r\n >\r\n {{ breadcrumb.label }}\r\n </a>\r\n } @else {\r\n <span class=\"max-w-[12rem] truncate text-muted-color\">\r\n {{ breadcrumb.label }}\r\n </span>\r\n }\r\n\r\n @if (!last) {\r\n <i class=\"mti mti-chevron-right text-xs text-muted-color\"></i>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n </nav>\r\n }\r\n</div>\r\n" }]
31028
+ args: [{ selector: 'mt-topbar-card', standalone: true, imports: [CommonModule, TranslocoDirective, Avatar], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"flex h-full flex-col gap-3 md:flex-row md:items-center md:justify-between\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n [style.background-color]=\"\r\n cardStyleConfig()['backgroundColor'] || styleConfig()['background-color']\r\n \"\r\n [style.border-radius.px]=\"cardStyleConfig()['borderRadius']\"\r\n [style.border-color]=\"borderColor()\"\r\n [style.border-style]=\"borderWidth() ? 'solid' : null\"\r\n [style.border-width.px]=\"borderWidth()\"\r\n [style.color]=\"styleConfig()['color'] || 'inherit'\"\r\n [style.padding.px]=\"padding()\"\r\n>\r\n <ng-template #topbarIcon>\r\n <mt-avatar\r\n [icon]=\"icon()\"\r\n size=\"normal\"\r\n shape=\"square\"\r\n [style.--p-avatar-background]=\"iconBackgroundColor()\"\r\n [style.--p-avatar-color]=\"iconColor()\"\r\n />\r\n </ng-template>\r\n\r\n <div\r\n class=\"flex min-w-0 flex-1 gap-3\"\r\n [class.flex-col]=\"iconPlacement() === 'top'\"\r\n [class.items-center]=\"iconPlacement() !== 'top'\"\r\n [class.items-start]=\"iconPlacement() === 'top'\"\r\n [class.justify-center]=\"isHeaderCentered()\"\r\n >\r\n @if (icon() && iconPlacement() !== \"end\") {\r\n <ng-container *ngTemplateOutlet=\"topbarIcon\" />\r\n }\r\n\r\n <div class=\"min-w-0\" [class.w-full]=\"iconPlacement() === 'top'\">\r\n @if (titleEditable() && editingTitle()) {\r\n <input\r\n class=\"m-0 w-full min-w-40 rounded border border-primary bg-surface-0 px-2 py-1 font-semibold leading-tight outline-none\"\r\n type=\"text\"\r\n [value]=\"titleDraft()\"\r\n [style.font-size.px]=\"titleFontSize()\"\r\n (input)=\"onTitleInput($any($event.target).value)\"\r\n (keydown.enter)=\"onCommitTitle()\"\r\n (keydown.escape)=\"onCancelTitle()\"\r\n (blur)=\"onCommitTitle()\"\r\n data-dashboard-action=\"edit-title\"\r\n [attr.aria-label]=\"t('guided.editTitle')\"\r\n />\r\n } @else if (title()) {\r\n <h3\r\n class=\"m-0 truncate font-semibold leading-tight\"\r\n [class.cursor-text]=\"titleEditable()\"\r\n [style.font-size.px]=\"titleFontSize()\"\r\n [attr.data-dashboard-action]=\"titleEditable() ? 'edit-title' : null\"\r\n (click)=\"onStartEditTitle($event)\"\r\n >\r\n {{ title() }}\r\n </h3>\r\n }\r\n\r\n @if (showSubtitle()) {\r\n <p\r\n class=\"m-0 truncate leading-tight\"\r\n [style.font-size.px]=\"subtitleFontSize()\"\r\n [style.color]=\"subtitleColor()\"\r\n >\r\n {{ subtitleText() }}\r\n </p>\r\n }\r\n </div>\r\n\r\n @if (icon() && iconPlacement() === \"end\") {\r\n <ng-container *ngTemplateOutlet=\"topbarIcon\" />\r\n }\r\n </div>\r\n\r\n @if (breadcrumbs().length > 0) {\r\n <nav class=\"min-w-0 md:max-w-[60%]\">\r\n <ol class=\"flex flex-wrap items-center gap-2 text-sm\">\r\n @for (\r\n breadcrumb of breadcrumbs();\r\n track breadcrumb.label + $index;\r\n let last = $last\r\n ) {\r\n <li class=\"flex min-w-0 items-center gap-2\">\r\n @if (breadcrumb.link) {\r\n <a\r\n class=\"max-w-[12rem] truncate text-muted-color transition-colors hover:text-primary\"\r\n [href]=\"breadcrumb.link\"\r\n [target]=\"isExternalLink(breadcrumb.link) ? '_blank' : null\"\r\n [rel]=\"isExternalLink(breadcrumb.link) ? 'noreferrer' : null\"\r\n >\r\n {{ breadcrumb.label }}\r\n </a>\r\n } @else {\r\n <span class=\"max-w-[12rem] truncate text-muted-color\">\r\n {{ breadcrumb.label }}\r\n </span>\r\n }\r\n\r\n @if (!last) {\r\n <i class=\"mti mti-chevron-right text-xs text-muted-color\"></i>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n </nav>\r\n }\r\n</div>\r\n" }]
30861
31029
  }], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }], defaultBreadcrumbLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultBreadcrumbLabel", required: false }] }], titleEditable: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleEditable", required: false }] }], titleChange: [{ type: i0.Output, args: ["titleChange"] }] } });
30862
31030
 
30863
31031
  class LastHistoryLevelCardComponent {
@@ -39634,8 +39802,7 @@ class ChartFilterDrawer {
39634
39802
  this.dirty = true;
39635
39803
  }
39636
39804
  onLoadLevelLogs(schemaLevelId) {
39637
- const level = this.chartLevelsSchema().find((item) => String(item?.id) === String(schemaLevelId));
39638
- this.chartLevelLogs.set(Array.isArray(level?.logs) ? level.logs : []);
39805
+ this.chartLevelLogs.set(this.dashboardService.getLevelLogsByLevelId(schemaLevelId));
39639
39806
  }
39640
39807
  apply() {
39641
39808
  if (!this.dirty) {
@@ -42757,8 +42924,13 @@ class DashboardBuilder {
42757
42924
  lookups = input(null, ...(ngDevMode ? [{ debugName: "lookups" }] : /* istanbul ignore next */ []));
42758
42925
  /** Host-owned canonical or legacy status metadata for runtime filters. */
42759
42926
  statuses = input(null, ...(ngDevMode ? [{ debugName: "statuses" }] : /* istanbul ignore next */ []));
42927
+ /**
42928
+ * Host-owned levels schema (product settings `levels.schema`). Backs the
42929
+ * status filter's "Log" select and the phase-gate / schema-settings lists.
42930
+ */
42931
+ levelsSchema = input(null, ...(ngDevMode ? [{ debugName: "levelsSchema" }] : /* istanbul ignore next */ []));
42760
42932
  filterMetadataEffect = effect(() => {
42761
- this.dashboardService.setFilterMetadata(this.lookups(), this.statuses());
42933
+ this.dashboardService.setFilterMetadata(this.lookups(), this.statuses(), this.levelsSchema());
42762
42934
  }, ...(ngDevMode ? [{ debugName: "filterMetadataEffect" }] : /* istanbul ignore next */ []));
42763
42935
  // ============================================
42764
42936
  // Outputs
@@ -45246,7 +45418,7 @@ class DashboardBuilder {
45246
45418
  return current;
45247
45419
  }
45248
45420
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardBuilder, deps: [], target: i0.ɵɵFactoryTarget.Component });
45249
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DashboardBuilder, isStandalone: true, selector: "mt-dashboard-builder", inputs: { isPage: { classPropertyName: "isPage", publicName: "isPage", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, backButton: { classPropertyName: "backButton", publicName: "backButton", isSignal: true, isRequired: false, transformFunction: null }, pageId: { classPropertyName: "pageId", publicName: "pageId", isSignal: true, isRequired: false, transformFunction: null }, standalone: { classPropertyName: "standalone", publicName: "standalone", isSignal: true, isRequired: false, transformFunction: null }, services: { classPropertyName: "services", publicName: "services", isSignal: true, isRequired: false, transformFunction: null }, dashboardData: { classPropertyName: "dashboardData", publicName: "dashboardData", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, informativeContext: { classPropertyName: "informativeContext", publicName: "informativeContext", isSignal: true, isRequired: false, transformFunction: null }, extraFilters: { classPropertyName: "extraFilters", publicName: "extraFilters", isSignal: true, isRequired: false, transformFunction: null }, lookups: { classPropertyName: "lookups", publicName: "lookups", isSignal: true, isRequired: false, transformFunction: null }, statuses: { classPropertyName: "statuses", publicName: "statuses", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dashboardData: "dashboardDataChange", pageChange: "pageChange", chartsChange: "chartsChange", onSave: "onSave", onBack: "onBack", onAddChart: "onAddChart", onEditChart: "onEditChart" }, host: { listeners: { "window:keydown": "onKeyDown($event)" } }, viewQueries: [{ propertyName: "contextMenu", first: true, predicate: ["contextMenu"], descendants: true, isSignal: true }, { propertyName: "gridsterContainer", first: true, predicate: ["gridsterContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Shared Actions Template -->\r\n <ng-template #actionsTemplate let-inPage=\"inPage\">\r\n <mt-button\r\n [label]=\"t('addWidget')\"\r\n icon=\"general.plus\"\r\n (onClick)=\"toggleWidgetPalette()\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n [label]=\"t('save')\"\r\n icon=\"general.save-02\"\r\n [loading]=\"saving()\"\r\n [disabled]=\"saving()\"\r\n (onClick)=\"saveDash()\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <span [class]=\"'w-px h-5 bg-surface-300'\"></span>\r\n\r\n <mt-button\r\n icon=\"arrow.reverse-left\"\r\n [tooltip]=\"t('undo')\"\r\n (onClick)=\"undo()\"\r\n [disabled]=\"!canUndo() || readonly()\"\r\n [severity]=\"'secondary'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n [icon]=\"stopActionsOnCards() ? 'media.play' : 'media.stop'\"\r\n [tooltip]=\"stopActionsOnCards() ? t('activateActions') : t('stopActions')\"\r\n (onClick)=\"stopAndActiveActions()\"\r\n [severity]=\"'warn'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n icon=\"general.edit-05\"\r\n [tooltip]=\"t('pageSettings')\"\r\n (onClick)=\"addOrEditPage(pageConfig()!)\"\r\n [severity]=\"'help'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n icon=\"general.filter-lines\"\r\n [tooltip]=\"t('manageFilter')\"\r\n (click)=\"$event.stopPropagation(); openManageFilter()\"\r\n [severity]=\"'info'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n </ng-template>\r\n\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"\r\n pageTitle() ||\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n t('builder')\r\n \"\r\n [backButton]=\"backButton()\"\r\n (backButtonClick)=\"onBack.emit()\"\r\n >\r\n <!-- Header actions -->\r\n <ng-template #headerEnd>\r\n <div class=\"flex items-center gap-2\">\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate; context: { inPage: true }\"\r\n />\r\n </div>\r\n </ng-template>\r\n\r\n <!-- Content -->\r\n <ng-container *ngTemplateOutlet=\"builderContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <ng-container *ngTemplateOutlet=\"builderContent\" />\r\n }\r\n\r\n <!-- Reusable builder content template -->\r\n <ng-template #builderContent>\r\n <div\r\n class=\"db-manage-dashboard-container relative h-full min-h-[600px]\"\r\n [attr.dir]=\"direction()\"\r\n >\r\n <!-- Loading State -->\r\n @if (loading()) {\r\n <div class=\"flex items-center justify-center h-64\">\r\n <i class=\"mti mti-spinner-third mti-spin text-4xl text-primary\"></i>\r\n </div>\r\n }\r\n\r\n <!-- Main Content -->\r\n @if (!loading() && pageConfig()) {\r\n <!-- Fixed Actions Bar (only when NOT page mode) -->\r\n @if (!isPage()) {\r\n <div\r\n class=\"fixed bottom-4 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 bg-surface-0 rounded-full shadow-lg px-4 py-2 border border-surface-200\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate; context: { inPage: false }\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Gridster Container -->\r\n <gridster\r\n #gridsterContainer\r\n [attr.dir]=\"direction()\"\r\n [options]=\"options\"\r\n class=\"db-gridster-container h-full min-h-[500px] bg-surface-50!\"\r\n [class.is-page]=\"isPage()\"\r\n [class.pointer-events-none]=\"readonly()\"\r\n (dragover)=\"onGridDragOver($event)\"\r\n (drop)=\"onGridDrop($event)\"\r\n >\r\n @for (chart of charts() | filterByGroup: undefined; track $index) {\r\n <gridster-item\r\n [item]=\"chart\"\r\n class=\"db-gridster-item bg-surface-0 rounded-lg shadow-sm border border-surface-200 overflow-hidden hover:shadow-md hover:border-surface-300\"\r\n [class.db-gridster-item--properties-list]=\"\r\n isPropertiesListChart(chart)\r\n \"\r\n [class.db-gridster-item--topbar]=\"isTopbarChart(chart)\"\r\n [class.ring-2]=\"isSelected(chart)\"\r\n [class.ring-primary]=\"isSelected(chart)\"\r\n [class.ring-offset-2]=\"isSelected(chart)\"\r\n [attr.data-chart-id]=\"chart.config?.serviceConfig?.dashboardId\"\r\n (click)=\"onSelect(chart, $event)\"\r\n >\r\n <!-- Chart Content -->\r\n <div\r\n class=\"db-gridster-item-content h-full w-full relative group\"\r\n [attr.dir]=\"direction()\"\r\n >\r\n <!-- Drag Handle -->\r\n @if (!readonly()) {\r\n <div\r\n class=\"drag-handler absolute top-0 left-0 right-0 h-6 cursor-move bg-gradient-to-b from-black/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center z-10\"\r\n >\r\n <i\r\n class=\"mti mti-grip-horizontal text-white/70 text-sm\"\r\n ></i>\r\n </div>\r\n }\r\n\r\n <!--\r\n Pass 7 \u2014 Single top-end Manage menu per chart card.\r\n Layout widgets (header/topbar/group) keep their dedicated\r\n affordances; chart cards have **only** the kebab.\r\n -->\r\n @if (\r\n !readonly() &&\r\n chart.config?.clientConfig?.componentName !== \"Group\"\r\n ) {\r\n <div\r\n class=\"db-card-actions absolute top-1 end-1 flex items-center gap-1 opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity z-20\"\r\n >\r\n <!-- Single kebab for chart cards (Pass 7 sole owner). -->\r\n @if (showContextToolbar(chart)) {\r\n <mt-item-card-menu\r\n [allowDuplicate]=\"true\"\r\n [hasLinkedDialog]=\"hasLinkedDialog(chart)\"\r\n [canLinkDialog]=\"canLinkDialog(chart)\"\r\n (action)=\"onItemCardMenuAction(chart, $event)\"\r\n />\r\n }\r\n\r\n <!-- Topbar: breadcrumb editor (layout-specific). -->\r\n @if (\r\n chart.config?.clientConfig?.componentName === \"topbar\"\r\n ) {\r\n <mt-button\r\n icon=\"general.slash-divider\"\r\n [tooltip]=\"t('manageBreadcrumb')\"\r\n (onClick)=\"openBreadcrumb(chart)\"\r\n severity=\"info\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n }\r\n\r\n <!--\r\n Header / topbar \u2014 quick style + delete.\r\n These widgets don't have a datasource so they don't\r\n use the chart kebab; the affordances stay minimal.\r\n -->\r\n @if (\r\n chart.config?.clientConfig?.componentName === \"header\" ||\r\n chart.config?.clientConfig?.componentName === \"topbar\"\r\n ) {\r\n <mt-button\r\n icon=\"general.edit-05\"\r\n [tooltip]=\"t('actions.editTitle')\"\r\n (onClick)=\"requestLayoutTitleEdit(chart, $event)\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n <mt-button\r\n icon=\"editor.palette\"\r\n [tooltip]=\"t('actions.style')\"\r\n (onClick)=\"openQuickManage($event, chart)\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n [tooltip]=\"t('actions.delete')\"\r\n (onClick)=\"deleteItem(chart)\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Chart Rendering -->\r\n @if (chart.config?.clientConfig?.componentName !== \"Group\") {\r\n @if (!chart.loading) {\r\n <mt-dashboard-item\r\n [config]=\"chart.config\"\r\n [chartTypeId]=\"chart.chartTypeId\"\r\n [readonly]=\"readonly()\"\r\n [builderMode]=\"!readonly()\"\r\n [extraFilters]=\"extraFilters()\"\r\n [reportId]=\"pageId()\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n (configureRequested)=\"configureChart(chart)\"\r\n (titleEdited)=\"onChartTitleEdited(chart, $event)\"\r\n />\r\n } @else {\r\n <div class=\"flex items-center justify-center h-full\">\r\n <i\r\n class=\"mti mti-spinner-third mti-spin text-2xl text-primary\"\r\n ></i>\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Group Children -->\r\n @if (chart.config?.clientConfig?.componentName === \"Group\") {\r\n <mt-card-content\r\n [title]=\"getGroupTitle(chart)\"\r\n [headerConfig]=\"getGroupHeaderConfig(chart)\"\r\n [styleConfig]=\"getGroupStyleConfig(chart)\"\r\n [cardStyleConfig]=\"getGroupCardStyleConfig(chart)\"\r\n [groupHeader]=\"true\"\r\n [isNoTopEnd]=\"false\"\r\n >\r\n <ng-container topEnd>\r\n <div\r\n class=\"db-group-card-top-end flex min-w-0 items-center justify-end gap-2\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <div\r\n class=\"db-group-card-tabs flex min-w-0 items-center gap-1 overflow-x-auto\"\r\n >\r\n @for (\r\n childChart of getGroupChildren(chart);\r\n track childChart.config?.serviceConfig?.dashboardId;\r\n let idx = $index\r\n ) {\r\n <button\r\n type=\"button\"\r\n class=\"db-group-card-tab h-8 max-w-48 shrink-0 truncate rounded-md px-3 text-sm font-medium transition-colors\"\r\n [class.bg-primary]=\"\r\n idx === (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [class.text-white]=\"\r\n idx === (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [class.text-muted-color]=\"\r\n idx !== (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [class.hover:bg-surface-100]=\"\r\n idx !== (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [title]=\"getItemTitle(childChart, idx)\"\r\n (click)=\"selectGroupChild(chart, idx, $event)\"\r\n >\r\n {{ getItemTitle(childChart, idx) }}\r\n </button>\r\n }\r\n </div>\r\n\r\n @if (!readonly()) {\r\n <div class=\"flex shrink-0 items-center gap-1\">\r\n @if (\r\n getSelectedGroupChild(chart);\r\n as selectedChild\r\n ) {\r\n <mt-item-card-menu\r\n [allowDuplicate]=\"true\"\r\n [hasLinkedDialog]=\"\r\n hasLinkedDialog(selectedChild)\r\n \"\r\n [canLinkDialog]=\"canLinkDialog(selectedChild)\"\r\n (action)=\"\r\n onItemCardMenuAction(\r\n selectedChild,\r\n $event,\r\n chart\r\n )\r\n \"\r\n />\r\n }\r\n <mt-button\r\n icon=\"general.edit-05\"\r\n [tooltip]=\"t('actions.editTitle')\"\r\n (onClick)=\"requestLayoutTitleEdit(chart, $event)\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n [tooltip]=\"t('removeGroup')\"\r\n (onClick)=\"removeGroup(chart)\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container body>\r\n @for (\r\n childChart of getGroupChildren(chart);\r\n track childChart.config?.serviceConfig?.dashboardId;\r\n let idx = $index\r\n ) {\r\n @if (idx === (chart.selectedGroupIndex ?? 0)) {\r\n <div class=\"h-full min-h-0\">\r\n <mt-dashboard-item\r\n [config]=\"childChart.config\"\r\n [chartTypeId]=\"childChart.chartTypeId\"\r\n [readonly]=\"readonly()\"\r\n [builderMode]=\"!readonly()\"\r\n [extraFilters]=\"extraFilters()\"\r\n [reportId]=\"pageId()\"\r\n [inGroup]=\"true\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n (configureRequested)=\"\r\n editItem(childChart, chart, 'dataSource')\r\n \"\r\n (titleEdited)=\"\r\n onChartTitleEdited(childChart, $event)\r\n \"\r\n />\r\n </div>\r\n }\r\n }\r\n </ng-container>\r\n </mt-card-content>\r\n }\r\n </div>\r\n </gridster-item>\r\n }\r\n </gridster>\r\n\r\n <!-- Context Menu -->\r\n <p-contextMenu #contextMenu [model]=\"menuItems()\" appendTo=\"body\" />\r\n }\r\n\r\n <!-- Empty State -->\r\n @if (!loading() && !pageConfig()) {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-64 text-muted-color\"\r\n >\r\n <i class=\"mti mti-layout text-6xl mb-4\"></i>\r\n <p class=\"text-lg\">{{ t(\"noPageSelected\") }}</p>\r\n <p class=\"text-sm\">{{ t(\"selectPageToStart\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n", styles: [":host{display:block;height:100%}gridster.db-gridster-container{min-height:calc(100vh - 120px);height:100%}gridster.db-gridster-container .gridster-column{border-left:1px solid var(--p-primary-100)!important;border-right:1px solid var(--p-primary-100)!important}gridster.db-gridster-container .gridster-row{border-top:1px solid var(--p-primary-100)!important;border-bottom:1px solid var(--p-primary-100)!important}gridster.db-gridster-container.is-page{min-height:calc(100vh - 200px)}gridster-item.db-gridster-item{transition:none!important}gridster-item.db-gridster-item.db-gridster-item--properties-list{background:transparent!important;border-color:transparent!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important}gridster-item.db-gridster-item.db-gridster-item--properties-list:hover{border-color:transparent!important;box-shadow:none!important}gridster-item.db-gridster-item.db-gridster-item--topbar{background:transparent!important;border-color:transparent!important;border-width:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important}gridster-item.db-gridster-item.db-gridster-item--topbar:hover{border-color:transparent!important;box-shadow:none!important}.mti-spin{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.gridster-drop-indicator{position:absolute;background:var(--p-primary-100);border:2px dashed var(--p-primary-400);border-radius:8px;pointer-events:none;z-index:100}.db-card-actions{pointer-events:auto;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.25rem;max-width:calc(100% - 2.5rem)}@media(max-width:640px){.db-card-actions{top:.25rem;right:.25rem}}.mt-item-config-popover-host .p-dialog-content{padding:0!important;height:clamp(420px,70vh,720px);max-height:80vh}.mt-item-config-popover-host .p-dialog-header{display:none}@media(max-width:768px){.mt-item-config-popover-host{width:100%!important;max-width:100%!important;margin:0!important;inset:auto 0 0!important;border-radius:1rem 1rem 0 0!important;transform:none!important}.mt-item-config-popover-host .p-dialog-content{height:80vh;border-radius:1rem 1rem 0 0}}.db-context-popover{--p-popover-content-padding: .4rem;min-width:200px}.db-group-card-top-end{width:100%}.db-group-card-tabs{flex:1 1 auto;scrollbar-width:none}.db-group-card-tabs::-webkit-scrollbar{display:none}.db-group-card-tab{min-width:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: GridsterModule }, { kind: "component", type: i2$3.GridsterComponent, selector: "gridster", inputs: ["options"] }, { kind: "component", type: i2$3.GridsterItemComponent, selector: "gridster-item", inputs: ["item"], outputs: ["itemInit", "itemChange", "itemResize"] }, { 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: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }, { kind: "ngmodule", type: ContextMenuModule }, { kind: "component", type: i3$1.ContextMenu, selector: "p-contextMenu, p-contextmenu, p-context-menu", inputs: ["model", "triggerEvent", "target", "global", "style", "styleClass", "autoZIndex", "baseZIndex", "id", "breakpoint", "ariaLabel", "ariaLabelledBy", "pressDelay", "appendTo", "motionOptions"], outputs: ["onShow", "onHide"] }, { kind: "component", type: DashboardItem, selector: "mt-dashboard-item", inputs: ["config", "chartTypeId", "readonly", "pageName", "inGroup", "isDialog", "queryParams", "extraFilters", "reportId", "ignoreQueryFilter", "builderMode"], outputs: ["actionTriggered", "configureRequested", "titleEdited"] }, { kind: "component", type: CardContentComponent, selector: "mt-card-content", inputs: ["title", "inGroup", "groupHeader", "headerConfig", "styleConfig", "cardStyleConfig", "density", "padding", "showHeader", "headerClickable", "isNoTopEnd", "isChart", "titleEditable"], outputs: ["headerClick", "titleChange"] }, { kind: "component", type: ItemCardMenuComponent, selector: "mt-item-card-menu", inputs: ["allowDuplicate", "hasLinkedDialog", "canLinkDialog"], outputs: ["action"] }, { kind: "pipe", type: FilterByGroupPipe, name: "filterByGroup" }], encapsulation: i0.ViewEncapsulation.None });
45421
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DashboardBuilder, isStandalone: true, selector: "mt-dashboard-builder", inputs: { isPage: { classPropertyName: "isPage", publicName: "isPage", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, backButton: { classPropertyName: "backButton", publicName: "backButton", isSignal: true, isRequired: false, transformFunction: null }, pageId: { classPropertyName: "pageId", publicName: "pageId", isSignal: true, isRequired: false, transformFunction: null }, standalone: { classPropertyName: "standalone", publicName: "standalone", isSignal: true, isRequired: false, transformFunction: null }, services: { classPropertyName: "services", publicName: "services", isSignal: true, isRequired: false, transformFunction: null }, dashboardData: { classPropertyName: "dashboardData", publicName: "dashboardData", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, informativeContext: { classPropertyName: "informativeContext", publicName: "informativeContext", isSignal: true, isRequired: false, transformFunction: null }, extraFilters: { classPropertyName: "extraFilters", publicName: "extraFilters", isSignal: true, isRequired: false, transformFunction: null }, lookups: { classPropertyName: "lookups", publicName: "lookups", isSignal: true, isRequired: false, transformFunction: null }, statuses: { classPropertyName: "statuses", publicName: "statuses", isSignal: true, isRequired: false, transformFunction: null }, levelsSchema: { classPropertyName: "levelsSchema", publicName: "levelsSchema", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dashboardData: "dashboardDataChange", pageChange: "pageChange", chartsChange: "chartsChange", onSave: "onSave", onBack: "onBack", onAddChart: "onAddChart", onEditChart: "onEditChart" }, host: { listeners: { "window:keydown": "onKeyDown($event)" } }, viewQueries: [{ propertyName: "contextMenu", first: true, predicate: ["contextMenu"], descendants: true, isSignal: true }, { propertyName: "gridsterContainer", first: true, predicate: ["gridsterContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Shared Actions Template -->\r\n <ng-template #actionsTemplate let-inPage=\"inPage\">\r\n <mt-button\r\n [label]=\"t('addWidget')\"\r\n icon=\"general.plus\"\r\n (onClick)=\"toggleWidgetPalette()\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n [label]=\"t('save')\"\r\n icon=\"general.save-02\"\r\n [loading]=\"saving()\"\r\n [disabled]=\"saving()\"\r\n (onClick)=\"saveDash()\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <span [class]=\"'w-px h-5 bg-surface-300'\"></span>\r\n\r\n <mt-button\r\n icon=\"arrow.reverse-left\"\r\n [tooltip]=\"t('undo')\"\r\n (onClick)=\"undo()\"\r\n [disabled]=\"!canUndo() || readonly()\"\r\n [severity]=\"'secondary'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n [icon]=\"stopActionsOnCards() ? 'media.play' : 'media.stop'\"\r\n [tooltip]=\"stopActionsOnCards() ? t('activateActions') : t('stopActions')\"\r\n (onClick)=\"stopAndActiveActions()\"\r\n [severity]=\"'warn'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n icon=\"general.edit-05\"\r\n [tooltip]=\"t('pageSettings')\"\r\n (onClick)=\"addOrEditPage(pageConfig()!)\"\r\n [severity]=\"'help'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n icon=\"general.filter-lines\"\r\n [tooltip]=\"t('manageFilter')\"\r\n (click)=\"$event.stopPropagation(); openManageFilter()\"\r\n [severity]=\"'info'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n </ng-template>\r\n\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"\r\n pageTitle() ||\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n t('builder')\r\n \"\r\n [backButton]=\"backButton()\"\r\n (backButtonClick)=\"onBack.emit()\"\r\n >\r\n <!-- Header actions -->\r\n <ng-template #headerEnd>\r\n <div class=\"flex items-center gap-2\">\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate; context: { inPage: true }\"\r\n />\r\n </div>\r\n </ng-template>\r\n\r\n <!-- Content -->\r\n <ng-container *ngTemplateOutlet=\"builderContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <ng-container *ngTemplateOutlet=\"builderContent\" />\r\n }\r\n\r\n <!-- Reusable builder content template -->\r\n <ng-template #builderContent>\r\n <div\r\n class=\"db-manage-dashboard-container relative h-full min-h-[600px]\"\r\n [attr.dir]=\"direction()\"\r\n >\r\n <!-- Loading State -->\r\n @if (loading()) {\r\n <div class=\"flex items-center justify-center h-64\">\r\n <i class=\"mti mti-spinner-third mti-spin text-4xl text-primary\"></i>\r\n </div>\r\n }\r\n\r\n <!-- Main Content -->\r\n @if (!loading() && pageConfig()) {\r\n <!-- Fixed Actions Bar (only when NOT page mode) -->\r\n @if (!isPage()) {\r\n <div\r\n class=\"fixed bottom-4 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 bg-surface-0 rounded-full shadow-lg px-4 py-2 border border-surface-200\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate; context: { inPage: false }\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Gridster Container -->\r\n <gridster\r\n #gridsterContainer\r\n [attr.dir]=\"direction()\"\r\n [options]=\"options\"\r\n class=\"db-gridster-container h-full min-h-[500px] bg-surface-50!\"\r\n [class.is-page]=\"isPage()\"\r\n [class.pointer-events-none]=\"readonly()\"\r\n (dragover)=\"onGridDragOver($event)\"\r\n (drop)=\"onGridDrop($event)\"\r\n >\r\n @for (chart of charts() | filterByGroup: undefined; track $index) {\r\n <gridster-item\r\n [item]=\"chart\"\r\n class=\"db-gridster-item bg-surface-0 rounded-lg shadow-sm border border-surface-200 overflow-hidden hover:shadow-md hover:border-surface-300\"\r\n [class.db-gridster-item--properties-list]=\"\r\n isPropertiesListChart(chart)\r\n \"\r\n [class.db-gridster-item--topbar]=\"isTopbarChart(chart)\"\r\n [class.ring-2]=\"isSelected(chart)\"\r\n [class.ring-primary]=\"isSelected(chart)\"\r\n [class.ring-offset-2]=\"isSelected(chart)\"\r\n [attr.data-chart-id]=\"chart.config?.serviceConfig?.dashboardId\"\r\n (click)=\"onSelect(chart, $event)\"\r\n >\r\n <!-- Chart Content -->\r\n <div\r\n class=\"db-gridster-item-content h-full w-full relative group\"\r\n [attr.dir]=\"direction()\"\r\n >\r\n <!-- Drag Handle -->\r\n @if (!readonly()) {\r\n <div\r\n class=\"drag-handler absolute top-0 left-0 right-0 h-6 cursor-move bg-gradient-to-b from-black/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center z-10\"\r\n >\r\n <i\r\n class=\"mti mti-grip-horizontal text-white/70 text-sm\"\r\n ></i>\r\n </div>\r\n }\r\n\r\n <!--\r\n Pass 7 \u2014 Single top-end Manage menu per chart card.\r\n Layout widgets (header/topbar/group) keep their dedicated\r\n affordances; chart cards have **only** the kebab.\r\n -->\r\n @if (\r\n !readonly() &&\r\n chart.config?.clientConfig?.componentName !== \"Group\"\r\n ) {\r\n <div\r\n class=\"db-card-actions absolute top-1 end-1 flex items-center gap-1 opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity z-20\"\r\n >\r\n <!-- Single kebab for chart cards (Pass 7 sole owner). -->\r\n @if (showContextToolbar(chart)) {\r\n <mt-item-card-menu\r\n [allowDuplicate]=\"true\"\r\n [hasLinkedDialog]=\"hasLinkedDialog(chart)\"\r\n [canLinkDialog]=\"canLinkDialog(chart)\"\r\n (action)=\"onItemCardMenuAction(chart, $event)\"\r\n />\r\n }\r\n\r\n <!-- Topbar: breadcrumb editor (layout-specific). -->\r\n @if (\r\n chart.config?.clientConfig?.componentName === \"topbar\"\r\n ) {\r\n <mt-button\r\n icon=\"general.slash-divider\"\r\n [tooltip]=\"t('manageBreadcrumb')\"\r\n (onClick)=\"openBreadcrumb(chart)\"\r\n severity=\"info\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n }\r\n\r\n <!--\r\n Header / topbar \u2014 quick style + delete.\r\n These widgets don't have a datasource so they don't\r\n use the chart kebab; the affordances stay minimal.\r\n -->\r\n @if (\r\n chart.config?.clientConfig?.componentName === \"header\" ||\r\n chart.config?.clientConfig?.componentName === \"topbar\"\r\n ) {\r\n <mt-button\r\n icon=\"general.edit-05\"\r\n [tooltip]=\"t('actions.editTitle')\"\r\n (onClick)=\"requestLayoutTitleEdit(chart, $event)\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n <mt-button\r\n icon=\"editor.palette\"\r\n [tooltip]=\"t('actions.style')\"\r\n (onClick)=\"openQuickManage($event, chart)\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n [tooltip]=\"t('actions.delete')\"\r\n (onClick)=\"deleteItem(chart)\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Chart Rendering -->\r\n @if (chart.config?.clientConfig?.componentName !== \"Group\") {\r\n @if (!chart.loading) {\r\n <mt-dashboard-item\r\n [config]=\"chart.config\"\r\n [chartTypeId]=\"chart.chartTypeId\"\r\n [readonly]=\"readonly()\"\r\n [builderMode]=\"!readonly()\"\r\n [extraFilters]=\"extraFilters()\"\r\n [reportId]=\"pageId()\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n (configureRequested)=\"configureChart(chart)\"\r\n (titleEdited)=\"onChartTitleEdited(chart, $event)\"\r\n />\r\n } @else {\r\n <div class=\"flex items-center justify-center h-full\">\r\n <i\r\n class=\"mti mti-spinner-third mti-spin text-2xl text-primary\"\r\n ></i>\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Group Children -->\r\n @if (chart.config?.clientConfig?.componentName === \"Group\") {\r\n <mt-card-content\r\n [title]=\"getGroupTitle(chart)\"\r\n [headerConfig]=\"getGroupHeaderConfig(chart)\"\r\n [styleConfig]=\"getGroupStyleConfig(chart)\"\r\n [cardStyleConfig]=\"getGroupCardStyleConfig(chart)\"\r\n [groupHeader]=\"true\"\r\n [isNoTopEnd]=\"false\"\r\n >\r\n <ng-container topEnd>\r\n <div\r\n class=\"db-group-card-top-end flex min-w-0 items-center justify-end gap-2\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <div\r\n class=\"db-group-card-tabs flex min-w-0 items-center gap-1 overflow-x-auto\"\r\n >\r\n @for (\r\n childChart of getGroupChildren(chart);\r\n track childChart.config?.serviceConfig?.dashboardId;\r\n let idx = $index\r\n ) {\r\n <button\r\n type=\"button\"\r\n class=\"db-group-card-tab h-8 max-w-48 shrink-0 truncate rounded-md px-3 text-sm font-medium transition-colors\"\r\n [class.bg-primary]=\"\r\n idx === (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [class.text-white]=\"\r\n idx === (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [class.text-muted-color]=\"\r\n idx !== (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [class.hover:bg-surface-100]=\"\r\n idx !== (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [title]=\"getItemTitle(childChart, idx)\"\r\n (click)=\"selectGroupChild(chart, idx, $event)\"\r\n >\r\n {{ getItemTitle(childChart, idx) }}\r\n </button>\r\n }\r\n </div>\r\n\r\n @if (!readonly()) {\r\n <div class=\"flex shrink-0 items-center gap-1\">\r\n @if (\r\n getSelectedGroupChild(chart);\r\n as selectedChild\r\n ) {\r\n <mt-item-card-menu\r\n [allowDuplicate]=\"true\"\r\n [hasLinkedDialog]=\"\r\n hasLinkedDialog(selectedChild)\r\n \"\r\n [canLinkDialog]=\"canLinkDialog(selectedChild)\"\r\n (action)=\"\r\n onItemCardMenuAction(\r\n selectedChild,\r\n $event,\r\n chart\r\n )\r\n \"\r\n />\r\n }\r\n <mt-button\r\n icon=\"general.edit-05\"\r\n [tooltip]=\"t('actions.editTitle')\"\r\n (onClick)=\"requestLayoutTitleEdit(chart, $event)\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n [tooltip]=\"t('removeGroup')\"\r\n (onClick)=\"removeGroup(chart)\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container body>\r\n @for (\r\n childChart of getGroupChildren(chart);\r\n track childChart.config?.serviceConfig?.dashboardId;\r\n let idx = $index\r\n ) {\r\n @if (idx === (chart.selectedGroupIndex ?? 0)) {\r\n <div class=\"h-full min-h-0\">\r\n <mt-dashboard-item\r\n [config]=\"childChart.config\"\r\n [chartTypeId]=\"childChart.chartTypeId\"\r\n [readonly]=\"readonly()\"\r\n [builderMode]=\"!readonly()\"\r\n [extraFilters]=\"extraFilters()\"\r\n [reportId]=\"pageId()\"\r\n [inGroup]=\"true\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n (configureRequested)=\"\r\n editItem(childChart, chart, 'dataSource')\r\n \"\r\n (titleEdited)=\"\r\n onChartTitleEdited(childChart, $event)\r\n \"\r\n />\r\n </div>\r\n }\r\n }\r\n </ng-container>\r\n </mt-card-content>\r\n }\r\n </div>\r\n </gridster-item>\r\n }\r\n </gridster>\r\n\r\n <!-- Context Menu -->\r\n <p-contextMenu #contextMenu [model]=\"menuItems()\" appendTo=\"body\" />\r\n }\r\n\r\n <!-- Empty State -->\r\n @if (!loading() && !pageConfig()) {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-64 text-muted-color\"\r\n >\r\n <i class=\"mti mti-layout text-6xl mb-4\"></i>\r\n <p class=\"text-lg\">{{ t(\"noPageSelected\") }}</p>\r\n <p class=\"text-sm\">{{ t(\"selectPageToStart\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n", styles: [":host{display:block;height:100%}gridster.db-gridster-container{min-height:calc(100vh - 120px);height:100%}gridster.db-gridster-container .gridster-column{border-left:1px solid var(--p-primary-100)!important;border-right:1px solid var(--p-primary-100)!important}gridster.db-gridster-container .gridster-row{border-top:1px solid var(--p-primary-100)!important;border-bottom:1px solid var(--p-primary-100)!important}gridster.db-gridster-container.is-page{min-height:calc(100vh - 200px)}gridster-item.db-gridster-item{transition:none!important}gridster-item.db-gridster-item.db-gridster-item--properties-list{background:transparent!important;border-color:transparent!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important}gridster-item.db-gridster-item.db-gridster-item--properties-list:hover{border-color:transparent!important;box-shadow:none!important}gridster-item.db-gridster-item.db-gridster-item--topbar{background:transparent!important;border-color:transparent!important;border-width:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important}gridster-item.db-gridster-item.db-gridster-item--topbar:hover{border-color:transparent!important;box-shadow:none!important}.mti-spin{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.gridster-drop-indicator{position:absolute;background:var(--p-primary-100);border:2px dashed var(--p-primary-400);border-radius:8px;pointer-events:none;z-index:100}.db-card-actions{pointer-events:auto;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.25rem;max-width:calc(100% - 2.5rem)}@media(max-width:640px){.db-card-actions{top:.25rem;right:.25rem}}.mt-item-config-popover-host .p-dialog-content{padding:0!important;height:clamp(420px,70vh,720px);max-height:80vh}.mt-item-config-popover-host .p-dialog-header{display:none}@media(max-width:768px){.mt-item-config-popover-host{width:100%!important;max-width:100%!important;margin:0!important;inset:auto 0 0!important;border-radius:1rem 1rem 0 0!important;transform:none!important}.mt-item-config-popover-host .p-dialog-content{height:80vh;border-radius:1rem 1rem 0 0}}.db-context-popover{--p-popover-content-padding: .4rem;min-width:200px}.db-group-card-top-end{width:100%}.db-group-card-tabs{flex:1 1 auto;scrollbar-width:none}.db-group-card-tabs::-webkit-scrollbar{display:none}.db-group-card-tab{min-width:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: GridsterModule }, { kind: "component", type: i2$3.GridsterComponent, selector: "gridster", inputs: ["options"] }, { kind: "component", type: i2$3.GridsterItemComponent, selector: "gridster-item", inputs: ["item"], outputs: ["itemInit", "itemChange", "itemResize"] }, { 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: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }, { kind: "ngmodule", type: ContextMenuModule }, { kind: "component", type: i3$1.ContextMenu, selector: "p-contextMenu, p-contextmenu, p-context-menu", inputs: ["model", "triggerEvent", "target", "global", "style", "styleClass", "autoZIndex", "baseZIndex", "id", "breakpoint", "ariaLabel", "ariaLabelledBy", "pressDelay", "appendTo", "motionOptions"], outputs: ["onShow", "onHide"] }, { kind: "component", type: DashboardItem, selector: "mt-dashboard-item", inputs: ["config", "chartTypeId", "readonly", "pageName", "inGroup", "isDialog", "queryParams", "extraFilters", "reportId", "ignoreQueryFilter", "builderMode"], outputs: ["actionTriggered", "configureRequested", "titleEdited"] }, { kind: "component", type: CardContentComponent, selector: "mt-card-content", inputs: ["title", "inGroup", "groupHeader", "headerConfig", "styleConfig", "cardStyleConfig", "density", "padding", "showHeader", "headerClickable", "isNoTopEnd", "isChart", "titleEditable"], outputs: ["headerClick", "titleChange"] }, { kind: "component", type: ItemCardMenuComponent, selector: "mt-item-card-menu", inputs: ["allowDuplicate", "hasLinkedDialog", "canLinkDialog"], outputs: ["action"] }, { kind: "pipe", type: FilterByGroupPipe, name: "filterByGroup" }], encapsulation: i0.ViewEncapsulation.None });
45250
45422
  }
45251
45423
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardBuilder, decorators: [{
45252
45424
  type: Component,
@@ -45263,7 +45435,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
45263
45435
  CardContentComponent,
45264
45436
  ItemCardMenuComponent,
45265
45437
  ], encapsulation: ViewEncapsulation.None, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Shared Actions Template -->\r\n <ng-template #actionsTemplate let-inPage=\"inPage\">\r\n <mt-button\r\n [label]=\"t('addWidget')\"\r\n icon=\"general.plus\"\r\n (onClick)=\"toggleWidgetPalette()\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n [label]=\"t('save')\"\r\n icon=\"general.save-02\"\r\n [loading]=\"saving()\"\r\n [disabled]=\"saving()\"\r\n (onClick)=\"saveDash()\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <span [class]=\"'w-px h-5 bg-surface-300'\"></span>\r\n\r\n <mt-button\r\n icon=\"arrow.reverse-left\"\r\n [tooltip]=\"t('undo')\"\r\n (onClick)=\"undo()\"\r\n [disabled]=\"!canUndo() || readonly()\"\r\n [severity]=\"'secondary'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n [icon]=\"stopActionsOnCards() ? 'media.play' : 'media.stop'\"\r\n [tooltip]=\"stopActionsOnCards() ? t('activateActions') : t('stopActions')\"\r\n (onClick)=\"stopAndActiveActions()\"\r\n [severity]=\"'warn'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n icon=\"general.edit-05\"\r\n [tooltip]=\"t('pageSettings')\"\r\n (onClick)=\"addOrEditPage(pageConfig()!)\"\r\n [severity]=\"'help'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n icon=\"general.filter-lines\"\r\n [tooltip]=\"t('manageFilter')\"\r\n (click)=\"$event.stopPropagation(); openManageFilter()\"\r\n [severity]=\"'info'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n </ng-template>\r\n\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"\r\n pageTitle() ||\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n t('builder')\r\n \"\r\n [backButton]=\"backButton()\"\r\n (backButtonClick)=\"onBack.emit()\"\r\n >\r\n <!-- Header actions -->\r\n <ng-template #headerEnd>\r\n <div class=\"flex items-center gap-2\">\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate; context: { inPage: true }\"\r\n />\r\n </div>\r\n </ng-template>\r\n\r\n <!-- Content -->\r\n <ng-container *ngTemplateOutlet=\"builderContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <ng-container *ngTemplateOutlet=\"builderContent\" />\r\n }\r\n\r\n <!-- Reusable builder content template -->\r\n <ng-template #builderContent>\r\n <div\r\n class=\"db-manage-dashboard-container relative h-full min-h-[600px]\"\r\n [attr.dir]=\"direction()\"\r\n >\r\n <!-- Loading State -->\r\n @if (loading()) {\r\n <div class=\"flex items-center justify-center h-64\">\r\n <i class=\"mti mti-spinner-third mti-spin text-4xl text-primary\"></i>\r\n </div>\r\n }\r\n\r\n <!-- Main Content -->\r\n @if (!loading() && pageConfig()) {\r\n <!-- Fixed Actions Bar (only when NOT page mode) -->\r\n @if (!isPage()) {\r\n <div\r\n class=\"fixed bottom-4 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 bg-surface-0 rounded-full shadow-lg px-4 py-2 border border-surface-200\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate; context: { inPage: false }\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Gridster Container -->\r\n <gridster\r\n #gridsterContainer\r\n [attr.dir]=\"direction()\"\r\n [options]=\"options\"\r\n class=\"db-gridster-container h-full min-h-[500px] bg-surface-50!\"\r\n [class.is-page]=\"isPage()\"\r\n [class.pointer-events-none]=\"readonly()\"\r\n (dragover)=\"onGridDragOver($event)\"\r\n (drop)=\"onGridDrop($event)\"\r\n >\r\n @for (chart of charts() | filterByGroup: undefined; track $index) {\r\n <gridster-item\r\n [item]=\"chart\"\r\n class=\"db-gridster-item bg-surface-0 rounded-lg shadow-sm border border-surface-200 overflow-hidden hover:shadow-md hover:border-surface-300\"\r\n [class.db-gridster-item--properties-list]=\"\r\n isPropertiesListChart(chart)\r\n \"\r\n [class.db-gridster-item--topbar]=\"isTopbarChart(chart)\"\r\n [class.ring-2]=\"isSelected(chart)\"\r\n [class.ring-primary]=\"isSelected(chart)\"\r\n [class.ring-offset-2]=\"isSelected(chart)\"\r\n [attr.data-chart-id]=\"chart.config?.serviceConfig?.dashboardId\"\r\n (click)=\"onSelect(chart, $event)\"\r\n >\r\n <!-- Chart Content -->\r\n <div\r\n class=\"db-gridster-item-content h-full w-full relative group\"\r\n [attr.dir]=\"direction()\"\r\n >\r\n <!-- Drag Handle -->\r\n @if (!readonly()) {\r\n <div\r\n class=\"drag-handler absolute top-0 left-0 right-0 h-6 cursor-move bg-gradient-to-b from-black/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center z-10\"\r\n >\r\n <i\r\n class=\"mti mti-grip-horizontal text-white/70 text-sm\"\r\n ></i>\r\n </div>\r\n }\r\n\r\n <!--\r\n Pass 7 \u2014 Single top-end Manage menu per chart card.\r\n Layout widgets (header/topbar/group) keep their dedicated\r\n affordances; chart cards have **only** the kebab.\r\n -->\r\n @if (\r\n !readonly() &&\r\n chart.config?.clientConfig?.componentName !== \"Group\"\r\n ) {\r\n <div\r\n class=\"db-card-actions absolute top-1 end-1 flex items-center gap-1 opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity z-20\"\r\n >\r\n <!-- Single kebab for chart cards (Pass 7 sole owner). -->\r\n @if (showContextToolbar(chart)) {\r\n <mt-item-card-menu\r\n [allowDuplicate]=\"true\"\r\n [hasLinkedDialog]=\"hasLinkedDialog(chart)\"\r\n [canLinkDialog]=\"canLinkDialog(chart)\"\r\n (action)=\"onItemCardMenuAction(chart, $event)\"\r\n />\r\n }\r\n\r\n <!-- Topbar: breadcrumb editor (layout-specific). -->\r\n @if (\r\n chart.config?.clientConfig?.componentName === \"topbar\"\r\n ) {\r\n <mt-button\r\n icon=\"general.slash-divider\"\r\n [tooltip]=\"t('manageBreadcrumb')\"\r\n (onClick)=\"openBreadcrumb(chart)\"\r\n severity=\"info\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n }\r\n\r\n <!--\r\n Header / topbar \u2014 quick style + delete.\r\n These widgets don't have a datasource so they don't\r\n use the chart kebab; the affordances stay minimal.\r\n -->\r\n @if (\r\n chart.config?.clientConfig?.componentName === \"header\" ||\r\n chart.config?.clientConfig?.componentName === \"topbar\"\r\n ) {\r\n <mt-button\r\n icon=\"general.edit-05\"\r\n [tooltip]=\"t('actions.editTitle')\"\r\n (onClick)=\"requestLayoutTitleEdit(chart, $event)\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n <mt-button\r\n icon=\"editor.palette\"\r\n [tooltip]=\"t('actions.style')\"\r\n (onClick)=\"openQuickManage($event, chart)\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n [tooltip]=\"t('actions.delete')\"\r\n (onClick)=\"deleteItem(chart)\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Chart Rendering -->\r\n @if (chart.config?.clientConfig?.componentName !== \"Group\") {\r\n @if (!chart.loading) {\r\n <mt-dashboard-item\r\n [config]=\"chart.config\"\r\n [chartTypeId]=\"chart.chartTypeId\"\r\n [readonly]=\"readonly()\"\r\n [builderMode]=\"!readonly()\"\r\n [extraFilters]=\"extraFilters()\"\r\n [reportId]=\"pageId()\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n (configureRequested)=\"configureChart(chart)\"\r\n (titleEdited)=\"onChartTitleEdited(chart, $event)\"\r\n />\r\n } @else {\r\n <div class=\"flex items-center justify-center h-full\">\r\n <i\r\n class=\"mti mti-spinner-third mti-spin text-2xl text-primary\"\r\n ></i>\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Group Children -->\r\n @if (chart.config?.clientConfig?.componentName === \"Group\") {\r\n <mt-card-content\r\n [title]=\"getGroupTitle(chart)\"\r\n [headerConfig]=\"getGroupHeaderConfig(chart)\"\r\n [styleConfig]=\"getGroupStyleConfig(chart)\"\r\n [cardStyleConfig]=\"getGroupCardStyleConfig(chart)\"\r\n [groupHeader]=\"true\"\r\n [isNoTopEnd]=\"false\"\r\n >\r\n <ng-container topEnd>\r\n <div\r\n class=\"db-group-card-top-end flex min-w-0 items-center justify-end gap-2\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <div\r\n class=\"db-group-card-tabs flex min-w-0 items-center gap-1 overflow-x-auto\"\r\n >\r\n @for (\r\n childChart of getGroupChildren(chart);\r\n track childChart.config?.serviceConfig?.dashboardId;\r\n let idx = $index\r\n ) {\r\n <button\r\n type=\"button\"\r\n class=\"db-group-card-tab h-8 max-w-48 shrink-0 truncate rounded-md px-3 text-sm font-medium transition-colors\"\r\n [class.bg-primary]=\"\r\n idx === (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [class.text-white]=\"\r\n idx === (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [class.text-muted-color]=\"\r\n idx !== (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [class.hover:bg-surface-100]=\"\r\n idx !== (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [title]=\"getItemTitle(childChart, idx)\"\r\n (click)=\"selectGroupChild(chart, idx, $event)\"\r\n >\r\n {{ getItemTitle(childChart, idx) }}\r\n </button>\r\n }\r\n </div>\r\n\r\n @if (!readonly()) {\r\n <div class=\"flex shrink-0 items-center gap-1\">\r\n @if (\r\n getSelectedGroupChild(chart);\r\n as selectedChild\r\n ) {\r\n <mt-item-card-menu\r\n [allowDuplicate]=\"true\"\r\n [hasLinkedDialog]=\"\r\n hasLinkedDialog(selectedChild)\r\n \"\r\n [canLinkDialog]=\"canLinkDialog(selectedChild)\"\r\n (action)=\"\r\n onItemCardMenuAction(\r\n selectedChild,\r\n $event,\r\n chart\r\n )\r\n \"\r\n />\r\n }\r\n <mt-button\r\n icon=\"general.edit-05\"\r\n [tooltip]=\"t('actions.editTitle')\"\r\n (onClick)=\"requestLayoutTitleEdit(chart, $event)\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n [tooltip]=\"t('removeGroup')\"\r\n (onClick)=\"removeGroup(chart)\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container body>\r\n @for (\r\n childChart of getGroupChildren(chart);\r\n track childChart.config?.serviceConfig?.dashboardId;\r\n let idx = $index\r\n ) {\r\n @if (idx === (chart.selectedGroupIndex ?? 0)) {\r\n <div class=\"h-full min-h-0\">\r\n <mt-dashboard-item\r\n [config]=\"childChart.config\"\r\n [chartTypeId]=\"childChart.chartTypeId\"\r\n [readonly]=\"readonly()\"\r\n [builderMode]=\"!readonly()\"\r\n [extraFilters]=\"extraFilters()\"\r\n [reportId]=\"pageId()\"\r\n [inGroup]=\"true\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n (configureRequested)=\"\r\n editItem(childChart, chart, 'dataSource')\r\n \"\r\n (titleEdited)=\"\r\n onChartTitleEdited(childChart, $event)\r\n \"\r\n />\r\n </div>\r\n }\r\n }\r\n </ng-container>\r\n </mt-card-content>\r\n }\r\n </div>\r\n </gridster-item>\r\n }\r\n </gridster>\r\n\r\n <!-- Context Menu -->\r\n <p-contextMenu #contextMenu [model]=\"menuItems()\" appendTo=\"body\" />\r\n }\r\n\r\n <!-- Empty State -->\r\n @if (!loading() && !pageConfig()) {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-64 text-muted-color\"\r\n >\r\n <i class=\"mti mti-layout text-6xl mb-4\"></i>\r\n <p class=\"text-lg\">{{ t(\"noPageSelected\") }}</p>\r\n <p class=\"text-sm\">{{ t(\"selectPageToStart\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n", styles: [":host{display:block;height:100%}gridster.db-gridster-container{min-height:calc(100vh - 120px);height:100%}gridster.db-gridster-container .gridster-column{border-left:1px solid var(--p-primary-100)!important;border-right:1px solid var(--p-primary-100)!important}gridster.db-gridster-container .gridster-row{border-top:1px solid var(--p-primary-100)!important;border-bottom:1px solid var(--p-primary-100)!important}gridster.db-gridster-container.is-page{min-height:calc(100vh - 200px)}gridster-item.db-gridster-item{transition:none!important}gridster-item.db-gridster-item.db-gridster-item--properties-list{background:transparent!important;border-color:transparent!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important}gridster-item.db-gridster-item.db-gridster-item--properties-list:hover{border-color:transparent!important;box-shadow:none!important}gridster-item.db-gridster-item.db-gridster-item--topbar{background:transparent!important;border-color:transparent!important;border-width:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important}gridster-item.db-gridster-item.db-gridster-item--topbar:hover{border-color:transparent!important;box-shadow:none!important}.mti-spin{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.gridster-drop-indicator{position:absolute;background:var(--p-primary-100);border:2px dashed var(--p-primary-400);border-radius:8px;pointer-events:none;z-index:100}.db-card-actions{pointer-events:auto;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.25rem;max-width:calc(100% - 2.5rem)}@media(max-width:640px){.db-card-actions{top:.25rem;right:.25rem}}.mt-item-config-popover-host .p-dialog-content{padding:0!important;height:clamp(420px,70vh,720px);max-height:80vh}.mt-item-config-popover-host .p-dialog-header{display:none}@media(max-width:768px){.mt-item-config-popover-host{width:100%!important;max-width:100%!important;margin:0!important;inset:auto 0 0!important;border-radius:1rem 1rem 0 0!important;transform:none!important}.mt-item-config-popover-host .p-dialog-content{height:80vh;border-radius:1rem 1rem 0 0}}.db-context-popover{--p-popover-content-padding: .4rem;min-width:200px}.db-group-card-top-end{width:100%}.db-group-card-tabs{flex:1 1 auto;scrollbar-width:none}.db-group-card-tabs::-webkit-scrollbar{display:none}.db-group-card-tab{min-width:0}\n"] }]
45266
- }], ctorParameters: () => [], propDecorators: { isPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPage", required: false }] }], pageTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageTitle", required: false }] }], backButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "backButton", required: false }] }], pageId: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageId", required: false }] }], standalone: [{ type: i0.Input, args: [{ isSignal: true, alias: "standalone", required: false }] }], services: [{ type: i0.Input, args: [{ isSignal: true, alias: "services", required: false }] }], dashboardData: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardData", required: false }] }, { type: i0.Output, args: ["dashboardDataChange"] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], informativeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "informativeContext", required: false }] }], extraFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "extraFilters", required: false }] }], lookups: [{ type: i0.Input, args: [{ isSignal: true, alias: "lookups", required: false }] }], statuses: [{ type: i0.Input, args: [{ isSignal: true, alias: "statuses", required: false }] }], pageChange: [{ type: i0.Output, args: ["pageChange"] }], chartsChange: [{ type: i0.Output, args: ["chartsChange"] }], onSave: [{ type: i0.Output, args: ["onSave"] }], onBack: [{ type: i0.Output, args: ["onBack"] }], onAddChart: [{ type: i0.Output, args: ["onAddChart"] }], onEditChart: [{ type: i0.Output, args: ["onEditChart"] }], contextMenu: [{ type: i0.ViewChild, args: ['contextMenu', { isSignal: true }] }], gridsterContainer: [{ type: i0.ViewChild, args: ['gridsterContainer', { isSignal: true }] }], onKeyDown: [{
45438
+ }], ctorParameters: () => [], propDecorators: { isPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPage", required: false }] }], pageTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageTitle", required: false }] }], backButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "backButton", required: false }] }], pageId: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageId", required: false }] }], standalone: [{ type: i0.Input, args: [{ isSignal: true, alias: "standalone", required: false }] }], services: [{ type: i0.Input, args: [{ isSignal: true, alias: "services", required: false }] }], dashboardData: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardData", required: false }] }, { type: i0.Output, args: ["dashboardDataChange"] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], informativeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "informativeContext", required: false }] }], extraFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "extraFilters", required: false }] }], lookups: [{ type: i0.Input, args: [{ isSignal: true, alias: "lookups", required: false }] }], statuses: [{ type: i0.Input, args: [{ isSignal: true, alias: "statuses", required: false }] }], levelsSchema: [{ type: i0.Input, args: [{ isSignal: true, alias: "levelsSchema", required: false }] }], pageChange: [{ type: i0.Output, args: ["pageChange"] }], chartsChange: [{ type: i0.Output, args: ["chartsChange"] }], onSave: [{ type: i0.Output, args: ["onSave"] }], onBack: [{ type: i0.Output, args: ["onBack"] }], onAddChart: [{ type: i0.Output, args: ["onAddChart"] }], onEditChart: [{ type: i0.Output, args: ["onEditChart"] }], contextMenu: [{ type: i0.ViewChild, args: ['contextMenu', { isSignal: true }] }], gridsterContainer: [{ type: i0.ViewChild, args: ['gridsterContainer', { isSignal: true }] }], onKeyDown: [{
45267
45439
  type: HostListener,
45268
45440
  args: ['window:keydown', ['$event']]
45269
45441
  }] } });
@@ -45615,6 +45787,11 @@ class DashboardViewer {
45615
45787
  lookups = input(null, ...(ngDevMode ? [{ debugName: "lookups" }] : /* istanbul ignore next */ []));
45616
45788
  /** Host-owned canonical or legacy status metadata for runtime filters. */
45617
45789
  statuses = input(null, ...(ngDevMode ? [{ debugName: "statuses" }] : /* istanbul ignore next */ []));
45790
+ /**
45791
+ * Host-owned levels schema (product settings `levels.schema`). Backs the
45792
+ * runtime phase-gate and schema-settings filter option lists.
45793
+ */
45794
+ levelsSchema = input(null, ...(ngDevMode ? [{ debugName: "levelsSchema" }] : /* istanbul ignore next */ []));
45618
45795
  /** Enable page-wide runtime filters. */
45619
45796
  showFilters = input(true, ...(ngDevMode ? [{ debugName: "showFilters" }] : /* istanbul ignore next */ []));
45620
45797
  /** Render the built-in, in-flow button that opens page runtime filters. */
@@ -45622,7 +45799,7 @@ class DashboardViewer {
45622
45799
  /** Host-wide opt-out from URL/query filters for every chart. */
45623
45800
  ignoreQueryFilter = input(false, ...(ngDevMode ? [{ debugName: "ignoreQueryFilter" }] : /* istanbul ignore next */ []));
45624
45801
  filterMetadataEffect = effect(() => {
45625
- this.dashboardService.setFilterMetadata(this.lookups(), this.statuses());
45802
+ this.dashboardService.setFilterMetadata(this.lookups(), this.statuses(), this.levelsSchema());
45626
45803
  }, ...(ngDevMode ? [{ debugName: "filterMetadataEffect" }] : /* istanbul ignore next */ []));
45627
45804
  // ============================================
45628
45805
  // Outputs
@@ -46292,7 +46469,7 @@ class DashboardViewer {
46292
46469
  });
46293
46470
  }
46294
46471
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardViewer, deps: [], target: i0.ɵɵFactoryTarget.Component });
46295
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DashboardViewer, isStandalone: true, selector: "mt-dashboard-viewer", inputs: { isPage: { classPropertyName: "isPage", publicName: "isPage", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, backButton: { classPropertyName: "backButton", publicName: "backButton", isSignal: true, isRequired: false, transformFunction: null }, pageId: { classPropertyName: "pageId", publicName: "pageId", isSignal: true, isRequired: false, transformFunction: null }, dashboardData: { classPropertyName: "dashboardData", publicName: "dashboardData", isSignal: true, isRequired: false, transformFunction: null }, chartsData: { classPropertyName: "chartsData", publicName: "chartsData", isSignal: true, isRequired: false, transformFunction: null }, dialogsData: { classPropertyName: "dialogsData", publicName: "dialogsData", isSignal: true, isRequired: false, transformFunction: null }, filtersData: { classPropertyName: "filtersData", publicName: "filtersData", isSignal: true, isRequired: false, transformFunction: null }, extraFilters: { classPropertyName: "extraFilters", publicName: "extraFilters", isSignal: true, isRequired: false, transformFunction: null }, lookups: { classPropertyName: "lookups", publicName: "lookups", isSignal: true, isRequired: false, transformFunction: null }, statuses: { classPropertyName: "statuses", publicName: "statuses", isSignal: true, isRequired: false, transformFunction: null }, showFilters: { classPropertyName: "showFilters", publicName: "showFilters", isSignal: true, isRequired: false, transformFunction: null }, showFilterTrigger: { classPropertyName: "showFilterTrigger", publicName: "showFilterTrigger", isSignal: true, isRequired: false, transformFunction: null }, ignoreQueryFilter: { classPropertyName: "ignoreQueryFilter", publicName: "ignoreQueryFilter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageLoaded: "pageLoaded", onBack: "onBack", chartClick: "chartClick" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"\r\n pageTitle() ||\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n t('dashboard')\r\n \"\r\n [backButton]=\"backButton()\"\r\n (backButtonClick)=\"onBack.emit()\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\r\n }\r\n\r\n <!-- Reusable viewer content template -->\r\n <ng-template #viewerContent>\r\n <div class=\"relative h-full min-h-[600px] mt-dashboard-viewer\">\r\n @if (!loading() && hasRenderableContent()) {\r\n @if (showFilters() && showFilterTrigger() && hasPageFilters()) {\r\n <div\r\n class=\"dashboard-viewer-filter-toolbar mb-3 flex items-center justify-end\"\r\n >\r\n <mt-button\r\n [label]=\"t('manageFilter')\"\r\n icon=\"general.filter-funnel-01\"\r\n variant=\"outlined\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [tooltip]=\"t('manageFilter')\"\r\n (click)=\"$event.stopPropagation(); openFiltersPanel()\"\r\n />\r\n </div>\r\n }\r\n\r\n <div class=\"dashboard-viewer-layout-wrapper\">\r\n <div\r\n class=\"dashboard-viewer-layout\"\r\n [style.min-height]=\"layoutHeight()\"\r\n >\r\n @for (\r\n item of visibleItems();\r\n track trackByDashboardId($index, item)\r\n ) {\r\n <div\r\n class=\"dashboard-viewer-item\"\r\n [class.dashboard-viewer-item--group]=\"isGroup(item)\"\r\n [class.dashboard-viewer-item--header]=\"isHeader(item)\"\r\n [class.dashboard-viewer-item--topbar]=\"isTopbar(item)\"\r\n [style.grid-column]=\"getGridColumn(item)\"\r\n [style.grid-row]=\"getGridRow(item)\"\r\n >\r\n <!-- Group Container -->\r\n @if (isGroup(item)) {\r\n @if (!item.loading) {\r\n <div\r\n class=\"group-container h-full flex flex-col rounded-lg border border-surface-200 overflow-hidden\"\r\n [style.background-color]=\"\r\n getStyleConfig(item)['background-color'] ||\r\n 'var(--surface-card)'\r\n \"\r\n >\r\n <!-- Group Header with Tabs -->\r\n <div\r\n class=\"group-header flex items-center justify-between px-4 py-2 bg-surface-50 border-b border-surface-200\"\r\n >\r\n <span class=\"font-medium text-sm\">{{\r\n getGroupTitle(item)\r\n }}</span>\r\n <div class=\"group-tabs flex items-center gap-1\">\r\n @for (\r\n child of getGroupChildren(item);\r\n track child.config?.serviceConfig?.dashboardId;\r\n let gIndex = $index\r\n ) {\r\n @if (getItemIcon(child); as icon) {\r\n <button\r\n type=\"button\"\r\n class=\"w-8 h-8 flex items-center justify-center rounded transition-colors\"\r\n [class.bg-primary-100]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.text-primary-600]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.text-muted-color]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n [class.hover:bg-surface-100]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n (click)=\"selectGroupChild(item, gIndex)\"\r\n >\r\n <i class=\"mti mti-{{ icon }}\"></i>\r\n </button>\r\n } @else {\r\n <button\r\n pButton\r\n type=\"button\"\r\n class=\"p-button-text p-button-sm\"\r\n [class.p-button-primary]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.p-button-secondary]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n [label]=\"getItemTitle(child)\"\r\n (click)=\"selectGroupChild(item, gIndex)\"\r\n ></button>\r\n }\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Group Body - Selected Child Content -->\r\n <div class=\"group-body flex-1 min-h-0\">\r\n @if (\r\n item.selectedGroupIndex !== null &&\r\n item.selectedGroupIndex !== undefined\r\n ) {\r\n @for (\r\n child of getGroupChildren(item);\r\n track child.config?.serviceConfig?.dashboardId;\r\n let cIndex = $index\r\n ) {\r\n @if (\r\n cIndex === item.selectedGroupIndex &&\r\n !child.loading\r\n ) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"child.config\"\r\n [chartTypeId]=\"child.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [queryParams]=\"pageQueryParams()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"\r\n shouldIgnoreQueryFilter(child)\r\n \"\r\n [inGroup]=\"true\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n }\r\n }\r\n <!-- Header Item -->\r\n @else if (isHeader(item)) {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [queryParams]=\"pageQueryParams()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n <!-- Topbar Item -->\r\n @else if (isTopbar(item)) {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [queryParams]=\"pageQueryParams()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n <!-- Regular Chart Item -->\r\n @else {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [queryParams]=\"pageQueryParams()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Hidden Dialogs (for modal rendering) -->\r\n @if (dialogs().length > 0) {\r\n <div class=\"hidden\">\r\n @for (\r\n dialog of dialogs();\r\n track dialog.config?.serviceConfig?.dashboardId\r\n ) {\r\n <!-- Dialog placeholder - will be rendered in modal when triggered -->\r\n <div\r\n [attr.data-dialog-id]=\"\r\n dialog.config?.serviceConfig?.dashboardId\r\n \"\r\n ></div>\r\n }\r\n </div>\r\n }\r\n } @else if (loading()) {\r\n <!-- Loading State -->\r\n <div class=\"flex items-center justify-center h-64\">\r\n <div class=\"text-center\">\r\n <i\r\n class=\"mti mti-loader-2 text-4xl text-primary animate-spin mb-2\"\r\n ></i>\r\n <p class=\"text-muted-color\">{{ t(\"loading\") }}</p>\r\n </div>\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-64 text-muted-color\"\r\n >\r\n <i class=\"mti mti-layout text-6xl mb-4\"></i>\r\n <p class=\"text-lg\">{{ t(\"noPageSelected\") }}</p>\r\n <p class=\"text-sm\">{{ t(\"selectPageToStart\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n", styles: [".mt-dashboard-viewer{width:100%;height:100%}.dashboard-viewer-layout-wrapper{width:100%}.dashboard-viewer-layout{display:grid;grid-template-columns:repeat(36,minmax(0,1fr));grid-auto-rows:60px;gap:10px;width:100%;align-items:stretch}.dashboard-viewer-item{display:flex;min-width:0;min-height:0}.dashboard-viewer-item>*{width:100%;height:100%}.dashboard-viewer-content-item{display:block;flex:1 1 auto;min-width:0;min-height:0;width:100%;height:100%}.dashboard-viewer-item--header{z-index:1;overflow:hidden;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.5rem;background:var(--p-surface-0, #fff);box-shadow:0 1px 2px #0f172a14}.dashboard-viewer-item--topbar{z-index:2;overflow:visible;border:0;border-radius:0;background:transparent;box-shadow:none}.group-container{background-color:var(--surface-card)}.group-header{flex-shrink:0}.group-tabs{flex-wrap:wrap}.group-body{background-color:var(--surface-0)}.header-item{background-color:transparent}.topbar-item{background-color:var(--surface-50)}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.table-responsive{max-height:75vh;overflow-y:auto;overflow-x:auto}.modal-content{border:0!important}.custom-donut-chart{display:flex;justify-content:center;height:auto!important}.custom-donut-chart canvas{margin-top:-1.5rem!important}@media(max-width:768px){.dashboard-viewer-layout{display:flex;flex-direction:column;min-height:0!important}.dashboard-viewer-item{min-height:220px}.dashboard-viewer-item--header,.dashboard-viewer-item--topbar{min-height:72px}.dashboard-viewer-item--group{min-height:280px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$4.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { 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: DashboardItem, selector: "mt-dashboard-item", inputs: ["config", "chartTypeId", "readonly", "pageName", "inGroup", "isDialog", "queryParams", "extraFilters", "reportId", "ignoreQueryFilter", "builderMode"], outputs: ["actionTriggered", "configureRequested", "titleEdited"] }, { kind: "component", type: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
46472
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DashboardViewer, isStandalone: true, selector: "mt-dashboard-viewer", inputs: { isPage: { classPropertyName: "isPage", publicName: "isPage", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, backButton: { classPropertyName: "backButton", publicName: "backButton", isSignal: true, isRequired: false, transformFunction: null }, pageId: { classPropertyName: "pageId", publicName: "pageId", isSignal: true, isRequired: false, transformFunction: null }, dashboardData: { classPropertyName: "dashboardData", publicName: "dashboardData", isSignal: true, isRequired: false, transformFunction: null }, chartsData: { classPropertyName: "chartsData", publicName: "chartsData", isSignal: true, isRequired: false, transformFunction: null }, dialogsData: { classPropertyName: "dialogsData", publicName: "dialogsData", isSignal: true, isRequired: false, transformFunction: null }, filtersData: { classPropertyName: "filtersData", publicName: "filtersData", isSignal: true, isRequired: false, transformFunction: null }, extraFilters: { classPropertyName: "extraFilters", publicName: "extraFilters", isSignal: true, isRequired: false, transformFunction: null }, lookups: { classPropertyName: "lookups", publicName: "lookups", isSignal: true, isRequired: false, transformFunction: null }, statuses: { classPropertyName: "statuses", publicName: "statuses", isSignal: true, isRequired: false, transformFunction: null }, levelsSchema: { classPropertyName: "levelsSchema", publicName: "levelsSchema", isSignal: true, isRequired: false, transformFunction: null }, showFilters: { classPropertyName: "showFilters", publicName: "showFilters", isSignal: true, isRequired: false, transformFunction: null }, showFilterTrigger: { classPropertyName: "showFilterTrigger", publicName: "showFilterTrigger", isSignal: true, isRequired: false, transformFunction: null }, ignoreQueryFilter: { classPropertyName: "ignoreQueryFilter", publicName: "ignoreQueryFilter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageLoaded: "pageLoaded", onBack: "onBack", chartClick: "chartClick" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"\r\n pageTitle() ||\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n t('dashboard')\r\n \"\r\n [backButton]=\"backButton()\"\r\n (backButtonClick)=\"onBack.emit()\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\r\n }\r\n\r\n <!-- Reusable viewer content template -->\r\n <ng-template #viewerContent>\r\n <div class=\"relative h-full min-h-[600px] mt-dashboard-viewer\">\r\n @if (!loading() && hasRenderableContent()) {\r\n @if (showFilters() && showFilterTrigger() && hasPageFilters()) {\r\n <div\r\n class=\"dashboard-viewer-filter-toolbar mb-3 flex items-center justify-end\"\r\n >\r\n <mt-button\r\n [label]=\"t('manageFilter')\"\r\n icon=\"general.filter-funnel-01\"\r\n variant=\"outlined\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [tooltip]=\"t('manageFilter')\"\r\n (click)=\"$event.stopPropagation(); openFiltersPanel()\"\r\n />\r\n </div>\r\n }\r\n\r\n <div class=\"dashboard-viewer-layout-wrapper\">\r\n <div\r\n class=\"dashboard-viewer-layout\"\r\n [style.min-height]=\"layoutHeight()\"\r\n >\r\n @for (\r\n item of visibleItems();\r\n track trackByDashboardId($index, item)\r\n ) {\r\n <div\r\n class=\"dashboard-viewer-item\"\r\n [class.dashboard-viewer-item--group]=\"isGroup(item)\"\r\n [class.dashboard-viewer-item--header]=\"isHeader(item)\"\r\n [class.dashboard-viewer-item--topbar]=\"isTopbar(item)\"\r\n [style.grid-column]=\"getGridColumn(item)\"\r\n [style.grid-row]=\"getGridRow(item)\"\r\n >\r\n <!-- Group Container -->\r\n @if (isGroup(item)) {\r\n @if (!item.loading) {\r\n <div\r\n class=\"group-container h-full flex flex-col rounded-lg border border-surface-200 overflow-hidden\"\r\n [style.background-color]=\"\r\n getStyleConfig(item)['background-color'] ||\r\n 'var(--surface-card)'\r\n \"\r\n >\r\n <!-- Group Header with Tabs -->\r\n <div\r\n class=\"group-header flex items-center justify-between px-4 py-2 bg-surface-50 border-b border-surface-200\"\r\n >\r\n <span class=\"font-medium text-sm\">{{\r\n getGroupTitle(item)\r\n }}</span>\r\n <div class=\"group-tabs flex items-center gap-1\">\r\n @for (\r\n child of getGroupChildren(item);\r\n track child.config?.serviceConfig?.dashboardId;\r\n let gIndex = $index\r\n ) {\r\n @if (getItemIcon(child); as icon) {\r\n <button\r\n type=\"button\"\r\n class=\"w-8 h-8 flex items-center justify-center rounded transition-colors\"\r\n [class.bg-primary-100]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.text-primary-600]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.text-muted-color]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n [class.hover:bg-surface-100]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n (click)=\"selectGroupChild(item, gIndex)\"\r\n >\r\n <i class=\"mti mti-{{ icon }}\"></i>\r\n </button>\r\n } @else {\r\n <button\r\n pButton\r\n type=\"button\"\r\n class=\"p-button-text p-button-sm\"\r\n [class.p-button-primary]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.p-button-secondary]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n [label]=\"getItemTitle(child)\"\r\n (click)=\"selectGroupChild(item, gIndex)\"\r\n ></button>\r\n }\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Group Body - Selected Child Content -->\r\n <div class=\"group-body flex-1 min-h-0\">\r\n @if (\r\n item.selectedGroupIndex !== null &&\r\n item.selectedGroupIndex !== undefined\r\n ) {\r\n @for (\r\n child of getGroupChildren(item);\r\n track child.config?.serviceConfig?.dashboardId;\r\n let cIndex = $index\r\n ) {\r\n @if (\r\n cIndex === item.selectedGroupIndex &&\r\n !child.loading\r\n ) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"child.config\"\r\n [chartTypeId]=\"child.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [queryParams]=\"pageQueryParams()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"\r\n shouldIgnoreQueryFilter(child)\r\n \"\r\n [inGroup]=\"true\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n }\r\n }\r\n <!-- Header Item -->\r\n @else if (isHeader(item)) {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [queryParams]=\"pageQueryParams()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n <!-- Topbar Item -->\r\n @else if (isTopbar(item)) {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [queryParams]=\"pageQueryParams()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n <!-- Regular Chart Item -->\r\n @else {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [queryParams]=\"pageQueryParams()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Hidden Dialogs (for modal rendering) -->\r\n @if (dialogs().length > 0) {\r\n <div class=\"hidden\">\r\n @for (\r\n dialog of dialogs();\r\n track dialog.config?.serviceConfig?.dashboardId\r\n ) {\r\n <!-- Dialog placeholder - will be rendered in modal when triggered -->\r\n <div\r\n [attr.data-dialog-id]=\"\r\n dialog.config?.serviceConfig?.dashboardId\r\n \"\r\n ></div>\r\n }\r\n </div>\r\n }\r\n } @else if (loading()) {\r\n <!-- Loading State -->\r\n <div class=\"flex items-center justify-center h-64\">\r\n <div class=\"text-center\">\r\n <i\r\n class=\"mti mti-loader-2 text-4xl text-primary animate-spin mb-2\"\r\n ></i>\r\n <p class=\"text-muted-color\">{{ t(\"loading\") }}</p>\r\n </div>\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-64 text-muted-color\"\r\n >\r\n <i class=\"mti mti-layout text-6xl mb-4\"></i>\r\n <p class=\"text-lg\">{{ t(\"noPageSelected\") }}</p>\r\n <p class=\"text-sm\">{{ t(\"selectPageToStart\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n", styles: [".mt-dashboard-viewer{width:100%;height:100%}.dashboard-viewer-layout-wrapper{width:100%}.dashboard-viewer-layout{display:grid;grid-template-columns:repeat(36,minmax(0,1fr));grid-auto-rows:60px;gap:10px;width:100%;align-items:stretch}.dashboard-viewer-item{display:flex;min-width:0;min-height:0}.dashboard-viewer-item>*{width:100%;height:100%}.dashboard-viewer-content-item{display:block;flex:1 1 auto;min-width:0;min-height:0;width:100%;height:100%}.dashboard-viewer-item--header{z-index:1;overflow:hidden;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.5rem;background:var(--p-surface-0, #fff);box-shadow:0 1px 2px #0f172a14}.dashboard-viewer-item--topbar{z-index:2;overflow:visible;border:0;border-radius:0;background:transparent;box-shadow:none}.group-container{background-color:var(--surface-card)}.group-header{flex-shrink:0}.group-tabs{flex-wrap:wrap}.group-body{background-color:var(--surface-0)}.header-item{background-color:transparent}.topbar-item{background-color:var(--surface-50)}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.table-responsive{max-height:75vh;overflow-y:auto;overflow-x:auto}.modal-content{border:0!important}.custom-donut-chart{display:flex;justify-content:center;height:auto!important}.custom-donut-chart canvas{margin-top:-1.5rem!important}@media(max-width:768px){.dashboard-viewer-layout{display:flex;flex-direction:column;min-height:0!important}.dashboard-viewer-item{min-height:220px}.dashboard-viewer-item--header,.dashboard-viewer-item--topbar{min-height:72px}.dashboard-viewer-item--group{min-height:280px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$4.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { 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: DashboardItem, selector: "mt-dashboard-item", inputs: ["config", "chartTypeId", "readonly", "pageName", "inGroup", "isDialog", "queryParams", "extraFilters", "reportId", "ignoreQueryFilter", "builderMode"], outputs: ["actionTriggered", "configureRequested", "titleEdited"] }, { kind: "component", type: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
46296
46473
  }
46297
46474
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardViewer, decorators: [{
46298
46475
  type: Component,
@@ -46304,7 +46481,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
46304
46481
  DashboardItem,
46305
46482
  Page,
46306
46483
  ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"\r\n pageTitle() ||\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n t('dashboard')\r\n \"\r\n [backButton]=\"backButton()\"\r\n (backButtonClick)=\"onBack.emit()\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\r\n }\r\n\r\n <!-- Reusable viewer content template -->\r\n <ng-template #viewerContent>\r\n <div class=\"relative h-full min-h-[600px] mt-dashboard-viewer\">\r\n @if (!loading() && hasRenderableContent()) {\r\n @if (showFilters() && showFilterTrigger() && hasPageFilters()) {\r\n <div\r\n class=\"dashboard-viewer-filter-toolbar mb-3 flex items-center justify-end\"\r\n >\r\n <mt-button\r\n [label]=\"t('manageFilter')\"\r\n icon=\"general.filter-funnel-01\"\r\n variant=\"outlined\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [tooltip]=\"t('manageFilter')\"\r\n (click)=\"$event.stopPropagation(); openFiltersPanel()\"\r\n />\r\n </div>\r\n }\r\n\r\n <div class=\"dashboard-viewer-layout-wrapper\">\r\n <div\r\n class=\"dashboard-viewer-layout\"\r\n [style.min-height]=\"layoutHeight()\"\r\n >\r\n @for (\r\n item of visibleItems();\r\n track trackByDashboardId($index, item)\r\n ) {\r\n <div\r\n class=\"dashboard-viewer-item\"\r\n [class.dashboard-viewer-item--group]=\"isGroup(item)\"\r\n [class.dashboard-viewer-item--header]=\"isHeader(item)\"\r\n [class.dashboard-viewer-item--topbar]=\"isTopbar(item)\"\r\n [style.grid-column]=\"getGridColumn(item)\"\r\n [style.grid-row]=\"getGridRow(item)\"\r\n >\r\n <!-- Group Container -->\r\n @if (isGroup(item)) {\r\n @if (!item.loading) {\r\n <div\r\n class=\"group-container h-full flex flex-col rounded-lg border border-surface-200 overflow-hidden\"\r\n [style.background-color]=\"\r\n getStyleConfig(item)['background-color'] ||\r\n 'var(--surface-card)'\r\n \"\r\n >\r\n <!-- Group Header with Tabs -->\r\n <div\r\n class=\"group-header flex items-center justify-between px-4 py-2 bg-surface-50 border-b border-surface-200\"\r\n >\r\n <span class=\"font-medium text-sm\">{{\r\n getGroupTitle(item)\r\n }}</span>\r\n <div class=\"group-tabs flex items-center gap-1\">\r\n @for (\r\n child of getGroupChildren(item);\r\n track child.config?.serviceConfig?.dashboardId;\r\n let gIndex = $index\r\n ) {\r\n @if (getItemIcon(child); as icon) {\r\n <button\r\n type=\"button\"\r\n class=\"w-8 h-8 flex items-center justify-center rounded transition-colors\"\r\n [class.bg-primary-100]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.text-primary-600]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.text-muted-color]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n [class.hover:bg-surface-100]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n (click)=\"selectGroupChild(item, gIndex)\"\r\n >\r\n <i class=\"mti mti-{{ icon }}\"></i>\r\n </button>\r\n } @else {\r\n <button\r\n pButton\r\n type=\"button\"\r\n class=\"p-button-text p-button-sm\"\r\n [class.p-button-primary]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.p-button-secondary]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n [label]=\"getItemTitle(child)\"\r\n (click)=\"selectGroupChild(item, gIndex)\"\r\n ></button>\r\n }\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Group Body - Selected Child Content -->\r\n <div class=\"group-body flex-1 min-h-0\">\r\n @if (\r\n item.selectedGroupIndex !== null &&\r\n item.selectedGroupIndex !== undefined\r\n ) {\r\n @for (\r\n child of getGroupChildren(item);\r\n track child.config?.serviceConfig?.dashboardId;\r\n let cIndex = $index\r\n ) {\r\n @if (\r\n cIndex === item.selectedGroupIndex &&\r\n !child.loading\r\n ) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"child.config\"\r\n [chartTypeId]=\"child.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [queryParams]=\"pageQueryParams()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"\r\n shouldIgnoreQueryFilter(child)\r\n \"\r\n [inGroup]=\"true\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n }\r\n }\r\n <!-- Header Item -->\r\n @else if (isHeader(item)) {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [queryParams]=\"pageQueryParams()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n <!-- Topbar Item -->\r\n @else if (isTopbar(item)) {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [queryParams]=\"pageQueryParams()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n <!-- Regular Chart Item -->\r\n @else {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [queryParams]=\"pageQueryParams()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Hidden Dialogs (for modal rendering) -->\r\n @if (dialogs().length > 0) {\r\n <div class=\"hidden\">\r\n @for (\r\n dialog of dialogs();\r\n track dialog.config?.serviceConfig?.dashboardId\r\n ) {\r\n <!-- Dialog placeholder - will be rendered in modal when triggered -->\r\n <div\r\n [attr.data-dialog-id]=\"\r\n dialog.config?.serviceConfig?.dashboardId\r\n \"\r\n ></div>\r\n }\r\n </div>\r\n }\r\n } @else if (loading()) {\r\n <!-- Loading State -->\r\n <div class=\"flex items-center justify-center h-64\">\r\n <div class=\"text-center\">\r\n <i\r\n class=\"mti mti-loader-2 text-4xl text-primary animate-spin mb-2\"\r\n ></i>\r\n <p class=\"text-muted-color\">{{ t(\"loading\") }}</p>\r\n </div>\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-64 text-muted-color\"\r\n >\r\n <i class=\"mti mti-layout text-6xl mb-4\"></i>\r\n <p class=\"text-lg\">{{ t(\"noPageSelected\") }}</p>\r\n <p class=\"text-sm\">{{ t(\"selectPageToStart\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n", styles: [".mt-dashboard-viewer{width:100%;height:100%}.dashboard-viewer-layout-wrapper{width:100%}.dashboard-viewer-layout{display:grid;grid-template-columns:repeat(36,minmax(0,1fr));grid-auto-rows:60px;gap:10px;width:100%;align-items:stretch}.dashboard-viewer-item{display:flex;min-width:0;min-height:0}.dashboard-viewer-item>*{width:100%;height:100%}.dashboard-viewer-content-item{display:block;flex:1 1 auto;min-width:0;min-height:0;width:100%;height:100%}.dashboard-viewer-item--header{z-index:1;overflow:hidden;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.5rem;background:var(--p-surface-0, #fff);box-shadow:0 1px 2px #0f172a14}.dashboard-viewer-item--topbar{z-index:2;overflow:visible;border:0;border-radius:0;background:transparent;box-shadow:none}.group-container{background-color:var(--surface-card)}.group-header{flex-shrink:0}.group-tabs{flex-wrap:wrap}.group-body{background-color:var(--surface-0)}.header-item{background-color:transparent}.topbar-item{background-color:var(--surface-50)}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.table-responsive{max-height:75vh;overflow-y:auto;overflow-x:auto}.modal-content{border:0!important}.custom-donut-chart{display:flex;justify-content:center;height:auto!important}.custom-donut-chart canvas{margin-top:-1.5rem!important}@media(max-width:768px){.dashboard-viewer-layout{display:flex;flex-direction:column;min-height:0!important}.dashboard-viewer-item{min-height:220px}.dashboard-viewer-item--header,.dashboard-viewer-item--topbar{min-height:72px}.dashboard-viewer-item--group{min-height:280px}}\n"] }]
46307
- }], propDecorators: { isPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPage", required: false }] }], pageTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageTitle", required: false }] }], backButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "backButton", required: false }] }], pageId: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageId", required: false }] }], dashboardData: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardData", required: false }] }], chartsData: [{ type: i0.Input, args: [{ isSignal: true, alias: "chartsData", required: false }] }], dialogsData: [{ type: i0.Input, args: [{ isSignal: true, alias: "dialogsData", required: false }] }], filtersData: [{ type: i0.Input, args: [{ isSignal: true, alias: "filtersData", required: false }] }], extraFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "extraFilters", required: false }] }], lookups: [{ type: i0.Input, args: [{ isSignal: true, alias: "lookups", required: false }] }], statuses: [{ type: i0.Input, args: [{ isSignal: true, alias: "statuses", required: false }] }], showFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFilters", required: false }] }], showFilterTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFilterTrigger", required: false }] }], ignoreQueryFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "ignoreQueryFilter", required: false }] }], pageLoaded: [{ type: i0.Output, args: ["pageLoaded"] }], onBack: [{ type: i0.Output, args: ["onBack"] }], chartClick: [{ type: i0.Output, args: ["chartClick"] }] } });
46484
+ }], propDecorators: { isPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPage", required: false }] }], pageTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageTitle", required: false }] }], backButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "backButton", required: false }] }], pageId: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageId", required: false }] }], dashboardData: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardData", required: false }] }], chartsData: [{ type: i0.Input, args: [{ isSignal: true, alias: "chartsData", required: false }] }], dialogsData: [{ type: i0.Input, args: [{ isSignal: true, alias: "dialogsData", required: false }] }], filtersData: [{ type: i0.Input, args: [{ isSignal: true, alias: "filtersData", required: false }] }], extraFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "extraFilters", required: false }] }], lookups: [{ type: i0.Input, args: [{ isSignal: true, alias: "lookups", required: false }] }], statuses: [{ type: i0.Input, args: [{ isSignal: true, alias: "statuses", required: false }] }], levelsSchema: [{ type: i0.Input, args: [{ isSignal: true, alias: "levelsSchema", required: false }] }], showFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFilters", required: false }] }], showFilterTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFilterTrigger", required: false }] }], ignoreQueryFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "ignoreQueryFilter", required: false }] }], pageLoaded: [{ type: i0.Output, args: ["pageLoaded"] }], onBack: [{ type: i0.Output, args: ["onBack"] }], chartClick: [{ type: i0.Output, args: ["chartClick"] }] } });
46308
46485
 
46309
46486
  /**
46310
46487
  * Dashboard List Component
@@ -49555,4 +49732,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
49555
49732
  */
49556
49733
 
49557
49734
  export { LevelCardHandler as $, SkeletonCardComponent as A, resolveStatisticIconPlacement as B, CardContentComponent as C, DashboardItemStoreService as D, EChartComponent as E, FilterUtilsService as F, StatisticCardComponent as G, HeaderCardComponent as H, TopbarCardComponent as I, ChartDataService as J, BarChartHandler as K, LastHistoryLevelCardComponent as L, PieChartHandler as M, StackBarChartHandler as N, axisFormatters as O, PropertiesCardComponent as P, groupDatesByYearAndMonth as Q, GaugeChartHandler as R, StaticFiltersComponent as S, TableCardComponent as T, TableViewHandler as U, OverviewCardHandler as V, TimelineHandler as W, LineChartHandler as X, SnapshotHandler as Y, ComparisonChartHandler as Z, SplitterChartHandler as _, DashboardItem as a, normalizeChartTypeForRequest as a$, MapChartHandler as a0, RingGaugeChartHandler as a1, SPlusChartHandler as a2, PhaseGateStepperHandler as a3, formatCurrency as a4, getCurrencySuffix as a5, formatPercentage as a6, formatNumber as a7, formatDate as a8, createAxisFormatter as a9, DataSourceSettings as aA, ActionsSettings as aB, ChartViewer as aC, StyleStudioDrawer as aD, StyleSettingsRenderer as aE, expandResetPatches as aF, StyleField as aG, SegmentedField as aH, ColorListField as aI, ArrayBuilderField as aJ, KeyValueMapField as aK, LegendOrderField as aL, ItemCardMenuComponent as aM, ChartFilterDrawer as aN, ItemContextToolbarComponent as aO, ItemConfigPopoverComponent as aP, GuidedConfigDialogComponent as aQ, FilterChipsBarComponent as aR, FilterBuilderComponent as aS, DatasourcePanelComponent as aT, SchemaControlRendererComponent as aU, FilterByGroupPipe as aV, GetChartActionsPipe as aW, CHART_CAPABILITIES as aX, getCapabilityById as aY, resolveCapability as aZ, toBackendChartType as a_, createTooltipFormatter as aa, formatAxisLabel as ab, formatWordsUnderBar as ac, formatXAxis as ad, handleFiltersForCustom as ae, handleFilterForCard as af, handleFilterForSnapshot as ag, DashboardList as ah, HTTPMethod as ai, DashboardBuilderService as aj, DashboardStoreService as ak, isManagePagesDeleteResult as al, ManagePages as am, ManageBreadcrumb as an, ManageFilterOnPage as ao, DynamicFiltersConfig as ap, ChartSettingsDrawer as aq, DisplaySettings as ar, DefaultControlUi as as, PieControlUi as at, BarControlUi as au, StackBarControlUi as av, ManageItem as aw, CHART_TYPES as ax, ManageItemService as ay, GeneralSettings as az, DashboardBuilder as b, normalizeFilterOperation as b0, normalizeAggregateFunction as b1, normalizeFilters as b2, selectorFromLegacy as b3, moduleIdFromSelector as b4, toBackendSourceLink as b5, toFormSourceLink as b6, normalizeOnLoad as b7, normalizeBeforeSave as b8, normalizeBeforeRequest as b9, groupIssuesByDomain as bA, parseAdvancedJson as bB, deepMerge$1 as bC, formatForEditor as bD, readByPath$1 as bE, setByPath as bF, applyControlPatchToPersisted as bG, applyControlPatchesToPersisted as bH, getControlSchema as bI, listControlSchemaIds as bJ, listControlSchemas as bK, getFallbackControlSchema as bL, flattenSchema as bM, resolveDisplayFields as bN, buildDisplayFieldPredicate as bO, bindingKey as bP, getBinding as bQ, listBindings as bR, listBindingsForChart as bS, readBoundValue as bT, ITEM_GUIDANCE_REGISTRY as bU, describeGuidance as bV, ItemGuidanceService as bW, CONFIG_DOMAINS as ba, domainsForCapability as bb, findDomain as bc, POPOVER_TABS as bd, POPOVER_TAB_SPECS as be, titleToUi as bf, applyTitleToPersisted as bg, datasourceToUi as bh, fieldsToUi as bi, filtersToUi as bj, styleToUi as bk, applyStyleToPersisted as bl, layoutToUi as bm, applyLayoutToPersisted as bn, labelLegendFormatToUi as bo, applyLabelLegendFormatToPersisted as bp, behaviorToUi as bq, applyBehaviorToPersisted as br, applyFilterChipsToPersisted as bs, persistedToUi as bt, buildAssembly as bu, STYLE_PRESETS as bv, presetsForCapability as bw, findPreset as bx, validate as by, hasBlockingIssues as bz, cloneDeep$1 as c, DashboardViewer as d, switchAllKeysSmall$1 as e, dynamicTextReplace as f, getNestedData as g, dynamicReorder as h, generalConfiguration as i, formatValue as j, getLocalizedTitle as k, sortChartData as l, addCommasToNumber as m, sortDataTableView as n, isMobilePlatform$1 as o, getColorFromConditions as p, CardFilterComponent as q, DynamicFiltersComponent as r, switchAllKeysToLower as s, CardInfoComponent as t, ChartCardComponent as u, resolveEntityUserPhoto as v, EntityInfoComponent as w, normalizeDashboardCardEntityValue as x, EntityPreviewCardComponent as y, ListStatisticCardComponent as z };
49558
- //# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-CrIWnOxs.mjs.map
49735
+ //# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-iLvC1OvH.mjs.map