@masterteam/dashboard-builder 0.0.87 → 0.0.88

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.
package/README.md CHANGED
@@ -7,8 +7,11 @@ links, and responsive ECharts output.
7
7
 
8
8
  ## Features
9
9
 
10
- - Multilingual dashboard item titles stored as `clientConfig.title.en/ar`.
11
- - Header, topbar, and chart item title editing in builder mode.
10
+ - Multilingual dashboard item titles stored as `clientConfig.title.en/ar`.
11
+ - Plain bar-chart entries can be edited together in Style > Bar colors: each
12
+ entry stores an English label, Arabic label, and color against its stable bar
13
+ key, so those choices persist when the data is sorted or its source label changes.
14
+ - Header, topbar, and chart item title editing in builder mode.
12
15
  - Host-interceptor-owned save messages, with automatic saves marked silent.
13
16
  - Registry-driven chart query schemas, including safe preview states for
14
17
  incomplete draft charts.
@@ -26,9 +26,11 @@
26
26
  "resetSection": "إعادة تعيين هذا القسم",
27
27
  "noMatchingSettings": "لا توجد إعدادات مطابقة",
28
28
  "tryDifferentSearch": "جرّب كلمة بحث مختلفة.",
29
- "showAdvancedSettings": "إظهار الإعدادات المتقدمة",
30
- "resetOrder": "إعادة ترتيب افتراضي",
31
- "legendColorFor": "لون {{name}}",
29
+ "showAdvancedSettings": "إظهار الإعدادات المتقدمة",
30
+ "resetOrder": "إعادة ترتيب افتراضي",
31
+ "englishLabel": "التسمية بالإنجليزية",
32
+ "arabicLabel": "التسمية بالعربية",
33
+ "legendColorFor": "لون {{name}}",
32
34
  "noLegendEntries": "لا توجد عناصر لوسيلة الإيضاح بعد - تحتاج المعاينة إلى بيانات لعرضها.",
33
35
  "nothingAdded": "لم تتم إضافة أي شيء بعد.",
34
36
  "itemNumber": "عنصر {{index}}",
@@ -359,7 +361,8 @@
359
361
  "appliedToEveryBarThatHasNoOverrideBelow": "يُطبَّق على كل عمود ليس له لون مخصص أدناه.",
360
362
  "colorByBar": "اللون حسب العمود",
361
363
  "giveAnIndividualBarItsOwnColor": "تعيين لون خاص لعمود معيّن.",
362
- "legendOrderAndColors": "ترتيب وألوان وسيلة الإيضاح"
364
+ "setEachBarsEnglishArabicLabelAndColor": "حدد التسمية الإنجليزية والعربية واللون لكل عمود.",
365
+ "legendOrderAndColors": "ترتيب وألوان وسيلة الإيضاح"
363
366
  }
364
367
  },
365
368
  "title": "منشئ لوحة المعلومات",
@@ -26,9 +26,11 @@
26
26
  "resetSection": "Reset this section",
27
27
  "noMatchingSettings": "No matching settings",
28
28
  "tryDifferentSearch": "Try a different search term.",
29
- "showAdvancedSettings": "Show advanced settings",
30
- "resetOrder": "Reset order",
31
- "legendColorFor": "Color for {{name}}",
29
+ "showAdvancedSettings": "Show advanced settings",
30
+ "resetOrder": "Reset order",
31
+ "englishLabel": "English label",
32
+ "arabicLabel": "Arabic label",
33
+ "legendColorFor": "Color for {{name}}",
32
34
  "noLegendEntries": "No legend entries yet - the preview needs data to list them.",
33
35
  "nothingAdded": "Nothing added yet.",
34
36
  "itemNumber": "Item {{index}}",
@@ -82,8 +84,9 @@
82
84
  "barColor": "Bar color",
83
85
  "appliedToEveryBarThatHasNoOverrideBelow": "Applied to every bar that has no override below.",
84
86
  "colorByBar": "Color by bar",
85
- "giveAnIndividualBarItsOwnColor": "Give an individual bar its own color.",
86
- "legendOrderAndColors": "Legend order & colors"
87
+ "giveAnIndividualBarItsOwnColor": "Give an individual bar its own color.",
88
+ "setEachBarsEnglishArabicLabelAndColor": "Set each bar's English/Arabic label and color.",
89
+ "legendOrderAndColors": "Legend order & colors"
87
90
  }
88
91
  },
89
92
  "title": "Dashboard Builder",
@@ -4,7 +4,7 @@ import { CommonModule } from '@angular/common';
4
4
  import { TranslocoService, TranslocoDirective } from '@jsverse/transloco';
5
5
  import { ModalService } from '@masterteam/components/modal';
6
6
  import { ModalRef } from '@masterteam/components/dialog';
7
- import { D as DashboardItemStoreService, F as FilterUtilsService, a as DashboardItem, r as resolveDashboardDialogHeader, b as DashboardDialogHeader } from './masterteam-dashboard-builder-masterteam-dashboard-builder-DJI6mi2b.mjs';
7
+ import { D as DashboardItemStoreService, F as FilterUtilsService, a as DashboardItem, r as resolveDashboardDialogHeader, b as DashboardDialogHeader } from './masterteam-dashboard-builder-masterteam-dashboard-builder-DaN0WjWE.mjs';
8
8
 
9
9
  /**
10
10
  * Dashboard Dialog Component
@@ -129,4 +129,4 @@ function openDashboardDialog(modalService, config, params, options) {
129
129
  }
130
130
 
131
131
  export { DashboardDialogComponent, openDashboardDialog };
132
- //# sourceMappingURL=masterteam-dashboard-builder-dashboard-dialog.component-BAqiC_bq.mjs.map
132
+ //# sourceMappingURL=masterteam-dashboard-builder-dashboard-dialog.component-BFkefeOr.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"masterteam-dashboard-builder-dashboard-dialog.component-BAqiC_bq.mjs","sources":["../../../../packages/masterteam/dashboard-builder/src/lib/dashboard-item/components/dashboard-dialog/dashboard-dialog.component.ts","../../../../packages/masterteam/dashboard-builder/src/lib/dashboard-item/components/dashboard-dialog/dashboard-dialog.component.html"],"sourcesContent":["/**\r\n * Dashboard Dialog Component\r\n *\r\n * A flexible dialog wrapper that renders a DashboardItem inside.\r\n * Uses the same ItemConfig structure - maximum code reuse.\r\n *\r\n * The dialog simply wraps DashboardItem, so any chart/table/card\r\n * that works inline will work in a dialog too.\r\n */\r\n\r\nimport {\r\n Component,\r\n inject,\r\n input,\r\n signal,\r\n computed,\r\n OnInit,\r\n} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { TranslocoDirective, TranslocoService } from '@jsverse/transloco';\r\nimport { ModalService } from '@masterteam/components/modal';\r\nimport { ModalRef } from '@masterteam/components/dialog';\r\nimport { ItemConfig } from '../../../models/dashboard.model';\r\nimport { DashboardItemStoreService } from '../../services/item-store.service';\r\nimport { FilterUtilsService } from '../../services/filter-utils.service';\r\nimport { DashboardItem } from '../../dashboard-item';\r\nimport {\r\n DashboardDialogHeader,\r\n resolveDashboardDialogHeader,\r\n} from './dashboard-dialog-header';\r\n\r\n/**\r\n * Dashboard Dialog Component\r\n *\r\n * Opened via ModalService, renders a DashboardItem inside.\r\n * Usage:\r\n * this.modalService.open(DashboardDialogComponent, {\r\n * data: { config: itemConfig, params: queryParams }\r\n * });\r\n */\r\n@Component({\r\n selector: 'mt-dashboard-dialog',\r\n standalone: true,\r\n imports: [CommonModule, TranslocoDirective, DashboardItem],\r\n templateUrl: './dashboard-dialog.component.html',\r\n})\r\nexport class DashboardDialogComponent implements OnInit {\r\n private readonly itemStore = inject(DashboardItemStoreService);\r\n private readonly filterUtils = inject(FilterUtilsService);\r\n private readonly transloco = inject(TranslocoService);\r\n readonly modal = inject(ModalService);\r\n private readonly ref = inject(ModalRef);\r\n\r\n // Inputs from modal data\r\n readonly config = input<ItemConfig | null>(null);\r\n readonly params = input<Record<string, any>>({});\r\n readonly title = input<string | null>(null);\r\n readonly reportId = input<string | number | null>(null);\r\n\r\n // State\r\n readonly dialogConfig = signal<ItemConfig | null>(null);\r\n readonly actionParams = signal<Record<string, any>>({});\r\n\r\n // Computed\r\n readonly mergedParams = computed(() => ({\r\n ...this.params(),\r\n ...this.actionParams(),\r\n }));\r\n\r\n readonly processedConfig = computed(() => {\r\n const config = this.dialogConfig();\r\n if (!config) return null;\r\n\r\n // Deep clone and process filters\r\n const cloned = JSON.parse(JSON.stringify(config)) as ItemConfig;\r\n\r\n // Apply filter processing if service config exists\r\n if (cloned.serviceConfig) {\r\n const processed = this.filterUtils.handleFiltersForCustom(\r\n cloned.serviceConfig,\r\n this.mergedParams(),\r\n );\r\n cloned.serviceConfig = processed;\r\n }\r\n return cloned;\r\n });\r\n\r\n ngOnInit(): void {\r\n // Set config from input\r\n const config = this.config();\r\n if (config) {\r\n this.dialogConfig.set(config);\r\n }\r\n\r\n // Set params from input\r\n const params = this.params();\r\n if (params) {\r\n this.actionParams.set(params);\r\n }\r\n }\r\n\r\n /**\r\n * Close dialog\r\n */\r\n close(result?: any): void {\r\n this.ref.close(result);\r\n }\r\n\r\n /**\r\n * Handle actions from the inner DashboardItem\r\n */\r\n onItemAction(event: any): void {\r\n // If it's a close action, close the dialog\r\n if (event?.type === 'closeDialog') {\r\n this.close(event?.data);\r\n return;\r\n }\r\n\r\n // For navigation actions, close dialog and let parent handle\r\n if (event?.type === 'navigate' || event?.type === 'navigateTo') {\r\n this.close(event);\r\n return;\r\n }\r\n\r\n // For other action types, the inner mt-dashboard-item already\r\n // dispatches via ActionService — nothing more to do at the dialog host.\r\n }\r\n}\r\n\r\n/**\r\n * Helper service for opening dashboard dialogs\r\n */\r\nexport function openDashboardDialog(\r\n modalService: ModalService,\r\n config: ItemConfig,\r\n params?: Record<string, any>,\r\n options?: {\r\n title?: string;\r\n size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';\r\n reportId?: string | number | null;\r\n },\r\n): ModalRef {\r\n const sizeClass = {\r\n sm: 'max-w-md',\r\n md: 'max-w-2xl',\r\n lg: 'max-w-4xl',\r\n xl: 'max-w-6xl',\r\n full: 'max-w-[95vw]',\r\n }[options?.size || 'lg'];\r\n\r\n // Same header contract as ActionService.showDialog: title + icon come from\r\n // the dialog's own config unless the caller overrides the title.\r\n const resolved = resolveDashboardDialogHeader(config);\r\n const header = { ...resolved, title: options?.title || resolved.title };\r\n\r\n const inputValues = {\r\n config,\r\n params: params || {},\r\n title: header.title,\r\n reportId: options?.reportId ?? null,\r\n };\r\n return modalService.openModal(DashboardDialogComponent, 'dialog', {\r\n header: header.title,\r\n styleClass: sizeClass,\r\n ...(header.icon ? { templates: { header: DashboardDialogHeader } } : {}),\r\n data: { ...inputValues, dialogHeader: header },\r\n inputValues,\r\n });\r\n}\r\n","<!--\r\n Inline height is intentional: the global `.mt-dialog .p-dialog-content\r\n .mt-modal-content { height:100% }` rule (common.css, unlayered) overrides any\r\n `h-[80vh]` class, and `.p-dialog` itself has no definite height, so a\r\n class-based height collapses to content. An inline style beats the unlayered\r\n rule, and `80vh` is viewport-relative (definite regardless of ancestors),\r\n giving the inner item -> table the bounded height it needs to scroll.\r\n padding-bottom is zeroed (the global 5rem reserves space for a footer this\r\n dialog does not render).\r\n-->\r\n<div\r\n [class]=\"modal.contentClass + ' flex min-h-[300px] flex-col p-0'\"\r\n style=\"height: 80vh; padding-bottom: 0\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <!-- Dashboard Item renders whatever the config specifies. A definite height\r\n lets the inner table own its scroll (its virtual window depends on the\r\n scroll container, not the outer dialog). -->\r\n @if (processedConfig()) {\r\n <mt-dashboard-item\r\n class=\"block min-h-0 flex-1\"\r\n [config]=\"processedConfig()!\"\r\n [queryParams]=\"mergedParams()\"\r\n [reportId]=\"reportId()\"\r\n [isDialog]=\"true\"\r\n (actionTriggered)=\"onItemAction($event)\"\r\n />\r\n } @else if (config()) {\r\n <!-- Config provided but still being processed -->\r\n <div class=\"flex flex-1 items-center justify-center\">\r\n <i class=\"pi pi-spin pi-spinner text-4xl text-primary\"></i>\r\n </div>\r\n } @else {\r\n <!-- No dialog config could be resolved (linked dialog deleted or failed to\r\n load). Show an explicit unavailable state instead of silently\r\n rendering the wrong widget. -->\r\n <div\r\n class=\"flex flex-1 flex-col items-center justify-center gap-3 px-6 text-center\"\r\n >\r\n <i class=\"pi pi-exclamation-triangle text-4xl text-surface-400\"></i>\r\n <p class=\"text-surface-600 dark:text-surface-300\">\r\n {{ t(\"dialogUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n</div>\r\n<!--\r\n<div [class]=\"modal.footerClass\" *transloco=\"let t; prefix: 'dashboard'\">\r\n <mt-button [label]=\"t('close')\" severity=\"secondary\" (onClick)=\"close()\" />\r\n</div> -->\r\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;;;AAQG;AAuBH;;;;;;;;AAQG;MAOU,wBAAwB,CAAA;AAClB,IAAA,SAAS,GAAG,MAAM,CAAC,yBAAyB,CAAC;AAC7C,IAAA,WAAW,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACxC,IAAA,SAAS,GAAG,MAAM,CAAC,gBA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,WAAW;AACZ,KAAA,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"masterteam-dashboard-builder-dashboard-dialog.component-BFkefeOr.mjs","sources":["../../../../packages/masterteam/dashboard-builder/src/lib/dashboard-item/components/dashboard-dialog/dashboard-dialog.component.ts","../../../../packages/masterteam/dashboard-builder/src/lib/dashboard-item/components/dashboard-dialog/dashboard-dialog.component.html"],"sourcesContent":["/**\r\n * Dashboard Dialog Component\r\n *\r\n * A flexible dialog wrapper that renders a DashboardItem inside.\r\n * Uses the same ItemConfig structure - maximum code reuse.\r\n *\r\n * The dialog simply wraps DashboardItem, so any chart/table/card\r\n * that works inline will work in a dialog too.\r\n */\r\n\r\nimport {\r\n Component,\r\n inject,\r\n input,\r\n signal,\r\n computed,\r\n OnInit,\r\n} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { TranslocoDirective, TranslocoService } from '@jsverse/transloco';\r\nimport { ModalService } from '@masterteam/components/modal';\r\nimport { ModalRef } from '@masterteam/components/dialog';\r\nimport { ItemConfig } from '../../../models/dashboard.model';\r\nimport { DashboardItemStoreService } from '../../services/item-store.service';\r\nimport { FilterUtilsService } from '../../services/filter-utils.service';\r\nimport { DashboardItem } from '../../dashboard-item';\r\nimport {\r\n DashboardDialogHeader,\r\n resolveDashboardDialogHeader,\r\n} from './dashboard-dialog-header';\r\n\r\n/**\r\n * Dashboard Dialog Component\r\n *\r\n * Opened via ModalService, renders a DashboardItem inside.\r\n * Usage:\r\n * this.modalService.open(DashboardDialogComponent, {\r\n * data: { config: itemConfig, params: queryParams }\r\n * });\r\n */\r\n@Component({\r\n selector: 'mt-dashboard-dialog',\r\n standalone: true,\r\n imports: [CommonModule, TranslocoDirective, DashboardItem],\r\n templateUrl: './dashboard-dialog.component.html',\r\n})\r\nexport class DashboardDialogComponent implements OnInit {\r\n private readonly itemStore = inject(DashboardItemStoreService);\r\n private readonly filterUtils = inject(FilterUtilsService);\r\n private readonly transloco = inject(TranslocoService);\r\n readonly modal = inject(ModalService);\r\n private readonly ref = inject(ModalRef);\r\n\r\n // Inputs from modal data\r\n readonly config = input<ItemConfig | null>(null);\r\n readonly params = input<Record<string, any>>({});\r\n readonly title = input<string | null>(null);\r\n readonly reportId = input<string | number | null>(null);\r\n\r\n // State\r\n readonly dialogConfig = signal<ItemConfig | null>(null);\r\n readonly actionParams = signal<Record<string, any>>({});\r\n\r\n // Computed\r\n readonly mergedParams = computed(() => ({\r\n ...this.params(),\r\n ...this.actionParams(),\r\n }));\r\n\r\n readonly processedConfig = computed(() => {\r\n const config = this.dialogConfig();\r\n if (!config) return null;\r\n\r\n // Deep clone and process filters\r\n const cloned = JSON.parse(JSON.stringify(config)) as ItemConfig;\r\n\r\n // Apply filter processing if service config exists\r\n if (cloned.serviceConfig) {\r\n const processed = this.filterUtils.handleFiltersForCustom(\r\n cloned.serviceConfig,\r\n this.mergedParams(),\r\n );\r\n cloned.serviceConfig = processed;\r\n }\r\n return cloned;\r\n });\r\n\r\n ngOnInit(): void {\r\n // Set config from input\r\n const config = this.config();\r\n if (config) {\r\n this.dialogConfig.set(config);\r\n }\r\n\r\n // Set params from input\r\n const params = this.params();\r\n if (params) {\r\n this.actionParams.set(params);\r\n }\r\n }\r\n\r\n /**\r\n * Close dialog\r\n */\r\n close(result?: any): void {\r\n this.ref.close(result);\r\n }\r\n\r\n /**\r\n * Handle actions from the inner DashboardItem\r\n */\r\n onItemAction(event: any): void {\r\n // If it's a close action, close the dialog\r\n if (event?.type === 'closeDialog') {\r\n this.close(event?.data);\r\n return;\r\n }\r\n\r\n // For navigation actions, close dialog and let parent handle\r\n if (event?.type === 'navigate' || event?.type === 'navigateTo') {\r\n this.close(event);\r\n return;\r\n }\r\n\r\n // For other action types, the inner mt-dashboard-item already\r\n // dispatches via ActionService — nothing more to do at the dialog host.\r\n }\r\n}\r\n\r\n/**\r\n * Helper service for opening dashboard dialogs\r\n */\r\nexport function openDashboardDialog(\r\n modalService: ModalService,\r\n config: ItemConfig,\r\n params?: Record<string, any>,\r\n options?: {\r\n title?: string;\r\n size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';\r\n reportId?: string | number | null;\r\n },\r\n): ModalRef {\r\n const sizeClass = {\r\n sm: 'max-w-md',\r\n md: 'max-w-2xl',\r\n lg: 'max-w-4xl',\r\n xl: 'max-w-6xl',\r\n full: 'max-w-[95vw]',\r\n }[options?.size || 'lg'];\r\n\r\n // Same header contract as ActionService.showDialog: title + icon come from\r\n // the dialog's own config unless the caller overrides the title.\r\n const resolved = resolveDashboardDialogHeader(config);\r\n const header = { ...resolved, title: options?.title || resolved.title };\r\n\r\n const inputValues = {\r\n config,\r\n params: params || {},\r\n title: header.title,\r\n reportId: options?.reportId ?? null,\r\n };\r\n return modalService.openModal(DashboardDialogComponent, 'dialog', {\r\n header: header.title,\r\n styleClass: sizeClass,\r\n ...(header.icon ? { templates: { header: DashboardDialogHeader } } : {}),\r\n data: { ...inputValues, dialogHeader: header },\r\n inputValues,\r\n });\r\n}\r\n","<!--\r\n Inline height is intentional: the global `.mt-dialog .p-dialog-content\r\n .mt-modal-content { height:100% }` rule (common.css, unlayered) overrides any\r\n `h-[80vh]` class, and `.p-dialog` itself has no definite height, so a\r\n class-based height collapses to content. An inline style beats the unlayered\r\n rule, and `80vh` is viewport-relative (definite regardless of ancestors),\r\n giving the inner item -> table the bounded height it needs to scroll.\r\n padding-bottom is zeroed (the global 5rem reserves space for a footer this\r\n dialog does not render).\r\n-->\r\n<div\r\n [class]=\"modal.contentClass + ' flex min-h-[300px] flex-col p-0'\"\r\n style=\"height: 80vh; padding-bottom: 0\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <!-- Dashboard Item renders whatever the config specifies. A definite height\r\n lets the inner table own its scroll (its virtual window depends on the\r\n scroll container, not the outer dialog). -->\r\n @if (processedConfig()) {\r\n <mt-dashboard-item\r\n class=\"block min-h-0 flex-1\"\r\n [config]=\"processedConfig()!\"\r\n [queryParams]=\"mergedParams()\"\r\n [reportId]=\"reportId()\"\r\n [isDialog]=\"true\"\r\n (actionTriggered)=\"onItemAction($event)\"\r\n />\r\n } @else if (config()) {\r\n <!-- Config provided but still being processed -->\r\n <div class=\"flex flex-1 items-center justify-center\">\r\n <i class=\"pi pi-spin pi-spinner text-4xl text-primary\"></i>\r\n </div>\r\n } @else {\r\n <!-- No dialog config could be resolved (linked dialog deleted or failed to\r\n load). Show an explicit unavailable state instead of silently\r\n rendering the wrong widget. -->\r\n <div\r\n class=\"flex flex-1 flex-col items-center justify-center gap-3 px-6 text-center\"\r\n >\r\n <i class=\"pi pi-exclamation-triangle text-4xl text-surface-400\"></i>\r\n <p class=\"text-surface-600 dark:text-surface-300\">\r\n {{ t(\"dialogUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n</div>\r\n<!--\r\n<div [class]=\"modal.footerClass\" *transloco=\"let t; prefix: 'dashboard'\">\r\n <mt-button [label]=\"t('close')\" severity=\"secondary\" (onClick)=\"close()\" />\r\n</div> -->\r\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;;;AAQG;AAuBH;;;;;;;;AAQG;MAOU,wBAAwB,CAAA;AAClB,IAAA,SAAS,GAAG,MAAM,CAAC,yBAAyB,CAAC;AAC7C,IAAA,WAAW,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACxC,IAAA,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC5C,IAAA,KAAK,GAAG,MAAM,CAAC,YAAY,CAAC;AACpB,IAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;;AAG9B,IAAA,MAAM,GAAG,KAAK,CAAoB,IAAI,6EAAC;AACvC,IAAA,MAAM,GAAG,KAAK,CAAsB,EAAE,6EAAC;AACvC,IAAA,KAAK,GAAG,KAAK,CAAgB,IAAI,4EAAC;AAClC,IAAA,QAAQ,GAAG,KAAK,CAAyB,IAAI,+EAAC;;AAG9C,IAAA,YAAY,GAAG,MAAM,CAAoB,IAAI,mFAAC;AAC9C,IAAA,YAAY,GAAG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d,QAAA,EAAE,EAAE,WAAW;AACf,QAAA,EAAE,EAAE,WAAW;AACf,QAAA,EAAE,EAAE,WAAW;AACf,QAAA,IAAI,EAAE,cAAc;AACrB,KAAA,CAAC,OAAO,EAAE,IAAI,IAAI,IAAI,CAAC;;;AAIxB,IAAA,MAAM,QAAQ,GAAG,4BAA4B,CAAC,MAAM,CAAC;AACrD,IAAA,MAAM,MAAM,GAAG,EAAE,GAAG,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,IAAI,QAAQ,CAAC,KAAK,EAAE;AAEvE,IAAA,MAAM,WAAW,GAAG;QAClB,MAAM;QACN,MAAM,EAAE,MAAM,IAAI,EAAE;QACpB,KAAK,EAAE,MAAM,CAAC,KAAK;AACnB,QAAA,QAAQ,EAAE,OAAO,EAAE,QAAQ,IAAI,IAAI;KACpC;AACD,IAAA,OAAO,YAAY,CAAC,SAAS,CAAC,wBAAwB,EAAE,QAAQ,EAAE;QAChE,MAAM,EAAE,MAAM,CAAC,KAAK;AACpB,QAAA,UAAU,EAAE,SAAS;QACrB,IAAI,MAAM,CAAC,IAAI,GAAG,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,qBAAqB,EAAE,EAAE,GAAG,EAAE,CAAC;QACxE,IAAI,EAAE,EAAE,GAAG,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE;QAC9C,WAAW;AACZ,KAAA,CAAC;AACJ;;;;"}
@@ -6868,7 +6868,8 @@ const BAR_COLORS_SECTION = {
6868
6868
  // Reset-section clears the whole override map, which is the right scope
6869
6869
  // for this control (StyleField writes it through onLegendColorChange).
6870
6870
  path: 'clientConfig.configAsType.legend.colorOverrides',
6871
- description: 'Give an individual bar its own color.',
6871
+ mirrorPaths: ['clientConfig.configAsType.overrideLabels'],
6872
+ description: "Set each bar's English/Arabic label and color.",
6872
6873
  },
6873
6874
  ],
6874
6875
  };
@@ -14676,7 +14677,7 @@ class BarChartHandler {
14676
14677
  // Use bar labels as xAxis data. `overrideLabels` is the user's own column
14677
14678
  // name and outranks anything the response supplies — same precedence the
14678
14679
  // series `name` below already uses.
14679
- let xAxisData = allBars.map((bar, index) => overrideLabels?.[index]?.[languageCode] ||
14680
+ let xAxisData = allBars.map((bar, index) => this.resolveOverrideLabel(overrideLabels, barKey(bar), index, languageCode) ||
14680
14681
  bar?.label ||
14681
14682
  bar?.name ||
14682
14683
  bar?.display ||
@@ -14726,14 +14727,16 @@ class BarChartHandler {
14726
14727
  statusItem?.value?.[languageCode] ||
14727
14728
  statusItem?.value?.en ||
14728
14729
  statusItem?.value?.ar ||
14729
- overrideLabels?.[index]?.[languageCode] ||
14730
+ this.resolveOverrideLabel(overrideLabels, barKey(bar), index, languageCode) ||
14730
14731
  bar?.label ||
14731
14732
  bar?.name ||
14732
14733
  bar?.display ||
14733
14734
  labelMap?.get(barKey(bar).toLowerCase()) ||
14734
14735
  barKey(bar) ||
14735
14736
  '',
14736
- key: barKey(bar) || overrideLabels?.[index]?.[languageCode] || '',
14737
+ key: barKey(bar) ||
14738
+ this.resolveOverrideLabel(overrideLabels, barKey(bar), index, languageCode) ||
14739
+ '',
14737
14740
  extraValues: bar.extraValues,
14738
14741
  groupValues: bar.groupValues,
14739
14742
  };
@@ -14745,7 +14748,9 @@ class BarChartHandler {
14745
14748
  itemStyle: { color: '#e5e5e5' },
14746
14749
  extraValues: item.extraValues,
14747
14750
  groupValues: item.groupValues,
14748
- key: item.key || overrideLabels?.[index]?.[languageCode] || '',
14751
+ key: item.key ||
14752
+ this.resolveOverrideLabel(overrideLabels, item.key, index, languageCode) ||
14753
+ '',
14749
14754
  }));
14750
14755
  }
14751
14756
  // Pass-5: sortDataBars accepts either the legacy
@@ -15256,7 +15261,7 @@ class BarChartHandler {
15256
15261
  // Use barType from the response (this is the series key)
15257
15262
  const key = this.resolveBarKey(bar) || `property_${index}`;
15258
15263
  // Determine label - priority: overrideLabels (by index) > labelMap > barType
15259
- const label = overrideLabels?.[index]?.[languageCode] ||
15264
+ const label = this.resolveOverrideLabel(overrideLabels, key, index, languageCode) ||
15260
15265
  labelMap.get(key.toLowerCase()) ||
15261
15266
  key;
15262
15267
  // Format the value using the configured format
@@ -15280,6 +15285,25 @@ class BarChartHandler {
15280
15285
  });
15281
15286
  return { values };
15282
15287
  }
15288
+ /**
15289
+ * New Style Studio rows carry the stable bar key, so labels survive data
15290
+ * sorting and a backend-provided label changing. Existing index-only rows
15291
+ * came from the legacy editor and keep their original positional behavior.
15292
+ */
15293
+ resolveOverrideLabel(overrides, key, index, languageCode) {
15294
+ if (!Array.isArray(overrides))
15295
+ return undefined;
15296
+ const normalizedKey = String(key ?? '')
15297
+ .trim()
15298
+ .toLowerCase();
15299
+ const keyed = normalizedKey
15300
+ ? overrides.find((row) => String(row?.key ?? '')
15301
+ .trim()
15302
+ .toLowerCase() === normalizedKey)
15303
+ : undefined;
15304
+ const value = (keyed ?? overrides[index])?.[languageCode];
15305
+ return typeof value === 'string' && value.trim() ? value : undefined;
15306
+ }
15283
15307
  /**
15284
15308
  * #1549 — a bar in the chart response is identified by `barType`, not `key`.
15285
15309
  * `ChartTypesServiceV2.BuildSingleCategoryChart` emits
@@ -15561,7 +15585,7 @@ function applyLegendDataColorOverride(overrides, dataItem, seriesName) {
15561
15585
  * Update exactly one legend entry. Duplicate keys that differ only by casing
15562
15586
  * are collapsed so runtime matching stays deterministic.
15563
15587
  */
15564
- function updateLegendColorOverride(overrides, name, color) {
15588
+ function updateLegendColorOverride(overrides, name, color, aliases = []) {
15565
15589
  const next = overrides && typeof overrides === 'object' && !Array.isArray(overrides)
15566
15590
  ? { ...overrides }
15567
15591
  : {};
@@ -15569,6 +15593,15 @@ function updateLegendColorOverride(overrides, name, color) {
15569
15593
  const identity = normalizeLegendIdentity(label);
15570
15594
  if (!identity)
15571
15595
  return next;
15596
+ // Drop rows this entry used to live under, so a stale one cannot shadow it.
15597
+ for (const alias of aliases) {
15598
+ const aliasIdentity = normalizeLegendIdentity(legendDataName(alias).trim());
15599
+ if (!aliasIdentity || aliasIdentity === identity)
15600
+ continue;
15601
+ Object.keys(next)
15602
+ .filter((key) => normalizeLegendIdentity(key) === aliasIdentity)
15603
+ .forEach((key) => delete next[key]);
15604
+ }
15572
15605
  const matchingKeys = Object.keys(next).filter((key) => normalizeLegendIdentity(key) === identity);
15573
15606
  const targetKey = matchingKeys[0] ?? label;
15574
15607
  matchingKeys.slice(1).forEach((key) => delete next[key]);
@@ -23752,7 +23785,7 @@ class ActionService {
23752
23785
  // "Dialog header"), not from the chart that opened it.
23753
23786
  const header = resolveDashboardDialogHeader(dialogConfig);
23754
23787
  // Dynamically import DashboardDialogComponent to avoid circular dependency
23755
- import('./masterteam-dashboard-builder-dashboard-dialog.component-BAqiC_bq.mjs').then(({ DashboardDialogComponent }) => {
23788
+ import('./masterteam-dashboard-builder-dashboard-dialog.component-BFkefeOr.mjs').then(({ DashboardDialogComponent }) => {
23756
23789
  // Open dialog using ModalService
23757
23790
  this.modalService.openModal(DashboardDialogComponent, 'dialog', {
23758
23791
  header: header.title,
@@ -33794,10 +33827,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
33794
33827
  class LegendOrderField {
33795
33828
  items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
33796
33829
  colorOverrides = input({}, ...(ngDevMode ? [{ debugName: "colorOverrides" }] : /* istanbul ignore next */ []));
33830
+ /** Existing chart label overrides, aligned by key (or legacy row position). */
33831
+ localizedLabels = input([], ...(ngDevMode ? [{ debugName: "localizedLabels" }] : /* istanbul ignore next */ []));
33797
33832
  /** When false, render colors only — no drag handle, no order reset. */
33798
33833
  reorderable = input(true, ...(ngDevMode ? [{ debugName: "reorderable" }] : /* istanbul ignore next */ []));
33834
+ /** Enables English/Arabic label editors beside each color picker. */
33835
+ showLocalizedLabels = input(false, ...(ngDevMode ? [{ debugName: "showLocalizedLabels" }] : /* istanbul ignore next */ []));
33836
+ /** Persist color against the stable entry key, rather than its visible label. */
33837
+ useItemKeyForColor = input(false, ...(ngDevMode ? [{ debugName: "useItemKeyForColor" }] : /* istanbul ignore next */ []));
33799
33838
  valueChange = output();
33800
33839
  colorChange = output();
33840
+ localizedLabelChange = output();
33801
33841
  /** Working list is just the input — reorder mutates a copy and emits. */
33802
33842
  rows = computed(() => this.items(), ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
33803
33843
  drop(event) {
@@ -33809,18 +33849,59 @@ class LegendOrderField {
33809
33849
  this.valueChange.emit([]);
33810
33850
  }
33811
33851
  colorFor(item) {
33812
- return (resolveLegendColorOverride(this.colorOverrides(), item.name || item.key) ??
33813
- item.color ??
33814
- null);
33852
+ const overrides = this.colorOverrides();
33853
+ for (const identity of [
33854
+ this.colorIdentity(item),
33855
+ ...this.legacyColorIdentities(item),
33856
+ ]) {
33857
+ const color = resolveLegendColorOverride(overrides, identity);
33858
+ if (color)
33859
+ return color;
33860
+ }
33861
+ return item.color ?? null;
33815
33862
  }
33816
33863
  setColor(item, color) {
33817
33864
  this.colorChange.emit({
33818
- name: item.name || item.key,
33865
+ name: this.colorIdentity(item),
33819
33866
  color: typeof color === 'string' && color.trim() ? color.trim() : null,
33867
+ aliases: this.legacyColorIdentities(item),
33868
+ });
33869
+ }
33870
+ /** The identity this control stores an entry's color under. */
33871
+ colorIdentity(item) {
33872
+ return ((this.useItemKeyForColor() ? item.key : item.name) ||
33873
+ item.name ||
33874
+ item.key);
33875
+ }
33876
+ /**
33877
+ * Identities the same entry was stored under before this control switched to
33878
+ * the stable key. Only charts that made that switch need the migration, so
33879
+ * name-keyed controls return nothing and never delete a key-keyed row.
33880
+ */
33881
+ legacyColorIdentities(item) {
33882
+ if (!this.useItemKeyForColor())
33883
+ return [];
33884
+ const current = this.colorIdentity(item);
33885
+ return item.name && item.name !== current ? [item.name] : [];
33886
+ }
33887
+ localizedLabel(item, index, language) {
33888
+ const key = item.key.trim().toLowerCase();
33889
+ const keyed = this.localizedLabels().find((label) => String(label.key ?? '')
33890
+ .trim()
33891
+ .toLowerCase() === key);
33892
+ const value = (keyed ?? this.localizedLabels()[index])?.[language];
33893
+ return typeof value === 'string' ? value : '';
33894
+ }
33895
+ setLocalizedLabel(item, index, language, value) {
33896
+ this.localizedLabelChange.emit({
33897
+ index,
33898
+ key: item.key || item.name,
33899
+ language,
33900
+ value: typeof value === 'string' ? value : '',
33820
33901
  });
33821
33902
  }
33822
33903
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LegendOrderField, deps: [], target: i0.ɵɵFactoryTarget.Component });
33823
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: LegendOrderField, isStandalone: true, selector: "mt-legend-order-field", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, colorOverrides: { classPropertyName: "colorOverrides", publicName: "colorOverrides", isSignal: true, isRequired: false, transformFunction: null }, reorderable: { classPropertyName: "reorderable", publicName: "reorderable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", colorChange: "colorChange" }, ngImport: i0, template: "<div\r\n class=\"db-legend-order flex flex-col gap-2\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder.styleStudio.messages'\"\r\n>\r\n @if (rows().length) {\r\n <div\r\n cdkDropList\r\n class=\"flex flex-col gap-2\"\r\n [cdkDropListDisabled]=\"!reorderable()\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n >\r\n @for (item of rows(); track item.key) {\r\n <div\r\n cdkDrag\r\n class=\"flex items-center gap-3 rounded-lg border border-surface-200 bg-surface-0 px-3 py-2\"\r\n [cdkDragDisabled]=\"!reorderable()\"\r\n >\r\n @if (reorderable()) {\r\n <span\r\n cdkDragHandle\r\n class=\"cursor-grab text-muted-color\"\r\n aria-hidden=\"true\"\r\n >\r\n <mt-icon icon=\"general.dots-grid\" class=\"text-base\" />\r\n </span>\r\n }\r\n <span\r\n class=\"min-w-0 flex-1 truncate text-sm text-color\"\r\n mtTruncateTooltip\r\n >\r\n {{ item.name }}\r\n </span>\r\n <div\r\n class=\"w-44 max-w-[55%] shrink-0\"\r\n role=\"group\"\r\n [attr.aria-label]=\"t('legendColorFor', { name: item.name })\"\r\n >\r\n <mt-color-picker-field\r\n [ngModel]=\"colorFor(item)\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n (ngModelChange)=\"setColor(item, $event)\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n @if (reorderable()) {\r\n <div class=\"flex justify-end\">\r\n <mt-button\r\n [label]=\"t('resetOrder')\"\r\n icon=\"arrow.refresh-ccw-01\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"reset()\"\r\n />\r\n </div>\r\n }\r\n } @else {\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"noLegendEntries\") }}\r\n </p>\r\n }\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: "ngmodule", type: DragDropModule }, { kind: "directive", type: i2$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2$2.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { 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", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: ColorPickerField, selector: "mt-color-picker-field", inputs: ["label", "appendTo", "placeholder", "class", "variant", "readonly", "pInputs", "required"], outputs: ["onChange"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "directive", type: TruncateTooltip, selector: "[mtTruncateTooltip]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
33904
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: LegendOrderField, isStandalone: true, selector: "mt-legend-order-field", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, colorOverrides: { classPropertyName: "colorOverrides", publicName: "colorOverrides", isSignal: true, isRequired: false, transformFunction: null }, localizedLabels: { classPropertyName: "localizedLabels", publicName: "localizedLabels", isSignal: true, isRequired: false, transformFunction: null }, reorderable: { classPropertyName: "reorderable", publicName: "reorderable", isSignal: true, isRequired: false, transformFunction: null }, showLocalizedLabels: { classPropertyName: "showLocalizedLabels", publicName: "showLocalizedLabels", isSignal: true, isRequired: false, transformFunction: null }, useItemKeyForColor: { classPropertyName: "useItemKeyForColor", publicName: "useItemKeyForColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", colorChange: "colorChange", localizedLabelChange: "localizedLabelChange" }, ngImport: i0, template: "<div\n class=\"db-legend-order flex flex-col gap-2\"\n *transloco=\"let t; prefix: 'dashboardBuilder.styleStudio.messages'\"\n>\n @if (rows().length) {\n <div\n cdkDropList\n class=\"flex flex-col gap-2\"\n [cdkDropListDisabled]=\"!reorderable()\"\n (cdkDropListDropped)=\"drop($event)\"\n >\n @for (item of rows(); track item.key; let i = $index) {\n <div\n cdkDrag\n class=\"flex flex-col gap-2 rounded-lg border border-surface-200 bg-surface-0 px-3 py-2\"\n [cdkDragDisabled]=\"!reorderable()\"\n >\n <div class=\"flex items-center gap-3\">\n <div\n class=\"w-44 max-w-[55%] shrink-0\"\n role=\"group\"\n [attr.aria-label]=\"t('legendColorFor', { name: item.name })\"\n >\n <mt-color-picker-field\n [ngModel]=\"colorFor(item)\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setColor(item, $event)\"\n />\n </div>\n\n @if (reorderable()) {\n <span\n cdkDragHandle\n class=\"cursor-grab text-muted-color\"\n aria-hidden=\"true\"\n >\n <mt-icon icon=\"general.dots-grid\" class=\"text-base\" />\n </span>\n }\n <div class=\"min-w-0 flex-1\">\n <span class=\"block truncate text-sm text-color\" mtTruncateTooltip>\n {{ item.name }}\n </span>\n </div>\n </div>\n\n @if (showLocalizedLabels()) {\n <div class=\"grid grid-cols-1 gap-2 sm:grid-cols-2\">\n <mt-text-field\n [label]=\"t('englishLabel')\"\n [ngModel]=\"localizedLabel(item, i, 'en')\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setLocalizedLabel(item, i, 'en', $event)\"\n />\n <mt-text-field\n [label]=\"t('arabicLabel')\"\n [ngModel]=\"localizedLabel(item, i, 'ar')\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setLocalizedLabel(item, i, 'ar', $event)\"\n />\n </div>\n }\n </div>\n }\n </div>\n @if (reorderable()) {\n <div class=\"flex justify-end\">\n <mt-button\n [label]=\"t('resetOrder')\"\n icon=\"arrow.refresh-ccw-01\"\n severity=\"secondary\"\n variant=\"outlined\"\n size=\"small\"\n (onClick)=\"reset()\"\n />\n </div>\n }\n } @else {\n <p class=\"text-xs text-muted-color\">\n {{ t(\"noLegendEntries\") }}\n </p>\n }\n</div>\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: "ngmodule", type: DragDropModule }, { kind: "directive", type: i2$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2$2.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { 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", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: ColorPickerField, selector: "mt-color-picker-field", inputs: ["label", "appendTo", "placeholder", "class", "variant", "readonly", "pInputs", "required"], 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: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "directive", type: TruncateTooltip, selector: "[mtTruncateTooltip]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
33824
33905
  }
33825
33906
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LegendOrderField, decorators: [{
33826
33907
  type: Component,
@@ -33831,10 +33912,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
33831
33912
  DragDropModule,
33832
33913
  Button,
33833
33914
  ColorPickerField,
33915
+ TextField,
33834
33916
  Icon,
33835
33917
  TruncateTooltip,
33836
- ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\r\n class=\"db-legend-order flex flex-col gap-2\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder.styleStudio.messages'\"\r\n>\r\n @if (rows().length) {\r\n <div\r\n cdkDropList\r\n class=\"flex flex-col gap-2\"\r\n [cdkDropListDisabled]=\"!reorderable()\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n >\r\n @for (item of rows(); track item.key) {\r\n <div\r\n cdkDrag\r\n class=\"flex items-center gap-3 rounded-lg border border-surface-200 bg-surface-0 px-3 py-2\"\r\n [cdkDragDisabled]=\"!reorderable()\"\r\n >\r\n @if (reorderable()) {\r\n <span\r\n cdkDragHandle\r\n class=\"cursor-grab text-muted-color\"\r\n aria-hidden=\"true\"\r\n >\r\n <mt-icon icon=\"general.dots-grid\" class=\"text-base\" />\r\n </span>\r\n }\r\n <span\r\n class=\"min-w-0 flex-1 truncate text-sm text-color\"\r\n mtTruncateTooltip\r\n >\r\n {{ item.name }}\r\n </span>\r\n <div\r\n class=\"w-44 max-w-[55%] shrink-0\"\r\n role=\"group\"\r\n [attr.aria-label]=\"t('legendColorFor', { name: item.name })\"\r\n >\r\n <mt-color-picker-field\r\n [ngModel]=\"colorFor(item)\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n (ngModelChange)=\"setColor(item, $event)\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n @if (reorderable()) {\r\n <div class=\"flex justify-end\">\r\n <mt-button\r\n [label]=\"t('resetOrder')\"\r\n icon=\"arrow.refresh-ccw-01\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"reset()\"\r\n />\r\n </div>\r\n }\r\n } @else {\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"noLegendEntries\") }}\r\n </p>\r\n }\r\n</div>\r\n" }]
33837
- }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], colorOverrides: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorOverrides", required: false }] }], reorderable: [{ type: i0.Input, args: [{ isSignal: true, alias: "reorderable", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], colorChange: [{ type: i0.Output, args: ["colorChange"] }] } });
33918
+ ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\n class=\"db-legend-order flex flex-col gap-2\"\n *transloco=\"let t; prefix: 'dashboardBuilder.styleStudio.messages'\"\n>\n @if (rows().length) {\n <div\n cdkDropList\n class=\"flex flex-col gap-2\"\n [cdkDropListDisabled]=\"!reorderable()\"\n (cdkDropListDropped)=\"drop($event)\"\n >\n @for (item of rows(); track item.key; let i = $index) {\n <div\n cdkDrag\n class=\"flex flex-col gap-2 rounded-lg border border-surface-200 bg-surface-0 px-3 py-2\"\n [cdkDragDisabled]=\"!reorderable()\"\n >\n <div class=\"flex items-center gap-3\">\n <div\n class=\"w-44 max-w-[55%] shrink-0\"\n role=\"group\"\n [attr.aria-label]=\"t('legendColorFor', { name: item.name })\"\n >\n <mt-color-picker-field\n [ngModel]=\"colorFor(item)\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setColor(item, $event)\"\n />\n </div>\n\n @if (reorderable()) {\n <span\n cdkDragHandle\n class=\"cursor-grab text-muted-color\"\n aria-hidden=\"true\"\n >\n <mt-icon icon=\"general.dots-grid\" class=\"text-base\" />\n </span>\n }\n <div class=\"min-w-0 flex-1\">\n <span class=\"block truncate text-sm text-color\" mtTruncateTooltip>\n {{ item.name }}\n </span>\n </div>\n </div>\n\n @if (showLocalizedLabels()) {\n <div class=\"grid grid-cols-1 gap-2 sm:grid-cols-2\">\n <mt-text-field\n [label]=\"t('englishLabel')\"\n [ngModel]=\"localizedLabel(item, i, 'en')\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setLocalizedLabel(item, i, 'en', $event)\"\n />\n <mt-text-field\n [label]=\"t('arabicLabel')\"\n [ngModel]=\"localizedLabel(item, i, 'ar')\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setLocalizedLabel(item, i, 'ar', $event)\"\n />\n </div>\n }\n </div>\n }\n </div>\n @if (reorderable()) {\n <div class=\"flex justify-end\">\n <mt-button\n [label]=\"t('resetOrder')\"\n icon=\"arrow.refresh-ccw-01\"\n severity=\"secondary\"\n variant=\"outlined\"\n size=\"small\"\n (onClick)=\"reset()\"\n />\n </div>\n }\n } @else {\n <p class=\"text-xs text-muted-color\">\n {{ t(\"noLegendEntries\") }}\n </p>\n }\n</div>\n" }]
33919
+ }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], colorOverrides: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorOverrides", required: false }] }], localizedLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "localizedLabels", required: false }] }], reorderable: [{ type: i0.Input, args: [{ isSignal: true, alias: "reorderable", required: false }] }], showLocalizedLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLocalizedLabels", required: false }] }], useItemKeyForColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "useItemKeyForColor", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], colorChange: [{ type: i0.Output, args: ["colorChange"] }], localizedLabelChange: [{ type: i0.Output, args: ["localizedLabelChange"] }] } });
33838
33920
 
33839
33921
  const SHADOW_PRESET_PATH$1 = 'clientConfig.configAsType.cardStyleConfig.__shadowPreset';
33840
33922
  const SHADOW_SHAPES$1 = {
@@ -33872,6 +33954,9 @@ const SHADOW_SHAPES$1 = {
33872
33954
  };
33873
33955
  const SHADOW_ARRAY_PATH = 'clientConfig.configAsType.cardStyleConfig.shadows';
33874
33956
  const LEGEND_COLOR_OVERRIDES_PATH = 'clientConfig.configAsType.legend.colorOverrides';
33957
+ const OVERRIDE_LABELS_PATH = 'clientConfig.configAsType.overrideLabels';
33958
+ /** Shared empty result — a fresh [] each read re-sets the child input. */
33959
+ const NO_OVERRIDE_LABELS = [];
33875
33960
  // The "Show top border" toggle only writes `border-top-show`; the renderer
33876
33961
  // reads `border-top-color` and otherwise falls back to `var(--primary-color)`.
33877
33962
  // Enabling the toggle therefore has to seed the top-border color from the
@@ -34094,6 +34179,10 @@ class StyleField {
34094
34179
  ? raw
34095
34180
  : {};
34096
34181
  }
34182
+ readOverrideLabels() {
34183
+ const raw = readByPath$1(this.persisted(), OVERRIDE_LABELS_PATH);
34184
+ return Array.isArray(raw) ? raw : NO_OVERRIDE_LABELS;
34185
+ }
34097
34186
  readJson() {
34098
34187
  const raw = this.currentValue();
34099
34188
  if (raw === undefined || raw === null)
@@ -34141,9 +34230,28 @@ class StyleField {
34141
34230
  onLegendColorChange(change) {
34142
34231
  this.patch.emit({
34143
34232
  path: LEGEND_COLOR_OVERRIDES_PATH,
34144
- value: updateLegendColorOverride(this.readLegendColorOverrides(), change.name, change.color),
34233
+ value: updateLegendColorOverride(this.readLegendColorOverrides(), change.name, change.color, change.aliases),
34145
34234
  });
34146
34235
  }
34236
+ onEntryLabelChange(change) {
34237
+ const labels = this.readOverrideLabels().map((label) => ({ ...label }));
34238
+ const key = change.key.trim();
34239
+ const normalizedKey = key.toLowerCase();
34240
+ const keyedIndex = normalizedKey
34241
+ ? labels.findIndex((label) => String(label.key ?? '')
34242
+ .trim()
34243
+ .toLowerCase() === normalizedKey)
34244
+ : -1;
34245
+ const targetIndex = keyedIndex >= 0 ? keyedIndex : change.index;
34246
+ while (labels.length <= targetIndex)
34247
+ labels.push({});
34248
+ labels[targetIndex] = {
34249
+ ...labels[targetIndex],
34250
+ ...(key ? { key } : {}),
34251
+ [change.language]: change.value,
34252
+ };
34253
+ this.patch.emit({ path: OVERRIDE_LABELS_PATH, value: labels });
34254
+ }
34147
34255
  onJsonInput(raw) {
34148
34256
  if (!raw || !raw.trim()) {
34149
34257
  this.jsonError.set(null);
@@ -34183,7 +34291,7 @@ class StyleField {
34183
34291
  this.patch.emit({ path: SHADOW_PRESET_PATH$1, value: key });
34184
34292
  }
34185
34293
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: StyleField, deps: [], target: i0.ɵɵFactoryTarget.Component });
34186
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: StyleField, isStandalone: true, selector: "mt-style-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, persisted: { classPropertyName: "persisted", publicName: "persisted", isSignal: true, isRequired: true, transformFunction: null }, capability: { classPropertyName: "capability", publicName: "capability", isSignal: true, isRequired: false, transformFunction: null }, legendItems: { classPropertyName: "legendItems", publicName: "legendItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { patch: "patch" }, ngImport: i0, template: "@let f = field();\r\n@switch (f.type) {\r\n @case (\"text\") {\r\n <mt-text-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"cssDimension\") {\r\n <mt-text-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [placeholder]=\"f.placeholder ?? '16px'\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"multilineText\") {\r\n <mt-textarea-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"number\") {\r\n <mt-number-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [min]=\"numberMin\"\r\n [max]=\"numberMax\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"numberRange\") {\r\n <mt-slider-field\r\n [label]=\"f.label\"\r\n [min]=\"f.min ?? 0\"\r\n [max]=\"f.max ?? 100\"\r\n [step]=\"f.step ?? 1\"\r\n [unit]=\"f.unit ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"boolean\") {\r\n <mt-toggle-field\r\n [label]=\"f.label\"\r\n toggleShape=\"card\"\r\n [descriptionCard]=\"f.description ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"color\") {\r\n <mt-color-picker-field [label]=\"f.label\" [formControl]=\"control\" />\r\n }\r\n @case (\"select\") {\r\n <mt-select-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [options]=\"options()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"useFilter\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"multiselect\") {\r\n <mt-multi-select-field\r\n [label]=\"f.label\"\r\n [options]=\"options()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n display=\"chip\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"iconPicker\") {\r\n <mt-icon-field [label]=\"f.label\" [formControl]=\"control\" />\r\n }\r\n @default {\r\n <!-- Composite + JSON types render their own label header -->\r\n <div class=\"db-style-field__composite flex flex-col gap-1.5\">\r\n <span class=\"text-sm font-medium text-color\">{{ f.label }}</span>\r\n @if (f.description) {\r\n <span class=\"text-xs text-muted-color\">{{ f.description }}</span>\r\n }\r\n @switch (f.type) {\r\n @case (\"segmented\") {\r\n <mt-segmented-field\r\n [options]=\"options()\"\r\n [value]=\"currentValue()\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"palette\") {\r\n <mt-color-list-field\r\n [value]=\"readColors()\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"colorList\") {\r\n <mt-color-list-field\r\n [value]=\"readColors()\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"arrayBuilder\") {\r\n <mt-array-builder-field\r\n [value]=\"readArray()\"\r\n [itemFields]=\"f.itemFields ?? []\"\r\n [itemTitleKey]=\"f.itemTitleKey\"\r\n [addLabel]=\"addLabel('Add item')\"\r\n [maxItems]=\"f.maxItems\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"conditionBuilder\") {\r\n <mt-array-builder-field\r\n [value]=\"readArray()\"\r\n [itemFields]=\"conditionFields()\"\r\n [addLabel]=\"addLabel('Add rule')\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"keyValueMap\") {\r\n <mt-key-value-map-field\r\n [value]=\"readMapOrArray()\"\r\n [keys]=\"mapKeys()\"\r\n [valueFields]=\"f.valueFields ?? []\"\r\n [asArray]=\"f.asArray ?? false\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"legendOrder\") {\r\n <mt-legend-order-field\r\n [items]=\"legendItems()\"\r\n [colorOverrides]=\"readLegendColorOverrides()\"\r\n (valueChange)=\"emitValue($event)\"\r\n (colorChange)=\"onLegendColorChange($event)\"\r\n />\r\n }\r\n @case (\"entryColors\") {\r\n <!-- Colors only: no (valueChange), because there is no order to\r\n persist for this control's charts. -->\r\n <mt-legend-order-field\r\n [items]=\"legendItems()\"\r\n [colorOverrides]=\"readLegendColorOverrides()\"\r\n [reorderable]=\"false\"\r\n (colorChange)=\"onLegendColorChange($event)\"\r\n />\r\n }\r\n @case (\"json\") {\r\n <mt-textarea-field\r\n rows=\"8\"\r\n placeholder=\"{ }\"\r\n [formControl]=\"jsonControl\"\r\n />\r\n @if (jsonError()) {\r\n <span class=\"text-xs text-red-600\">{{ jsonError() }}</span>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n}\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: TextareaField, selector: "mt-textarea-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "noErrorStyle", "pInputs", "rows", "required", "maxLength"] }, { 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: SliderField, selector: "mt-slider-field", inputs: ["field", "label", "class", "min", "max", "step", "hideNumber", "unit", "readonly", "required"] }, { 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: 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: 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: ColorPickerField, selector: "mt-color-picker-field", inputs: ["label", "appendTo", "placeholder", "class", "variant", "readonly", "pInputs", "required"], outputs: ["onChange"] }, { kind: "component", type: IconField, selector: "mt-icon-field", inputs: ["label", "required"] }, { kind: "component", type: SegmentedField, selector: "mt-segmented-field", inputs: ["options", "value", "disabled", "ariaLabel"], outputs: ["valueChange"] }, { kind: "component", type: ColorListField, selector: "mt-color-list-field", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: ArrayBuilderField, selector: "mt-array-builder-field", inputs: ["value", "itemFields", "itemTitleKey", "addLabel", "maxItems"], outputs: ["valueChange"] }, { kind: "component", type: KeyValueMapField, selector: "mt-key-value-map-field", inputs: ["value", "keys", "valueFields", "asArray"], outputs: ["valueChange"] }, { kind: "component", type: LegendOrderField, selector: "mt-legend-order-field", inputs: ["items", "colorOverrides", "reorderable"], outputs: ["valueChange", "colorChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
34294
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: StyleField, isStandalone: true, selector: "mt-style-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, persisted: { classPropertyName: "persisted", publicName: "persisted", isSignal: true, isRequired: true, transformFunction: null }, capability: { classPropertyName: "capability", publicName: "capability", isSignal: true, isRequired: false, transformFunction: null }, legendItems: { classPropertyName: "legendItems", publicName: "legendItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { patch: "patch" }, ngImport: i0, template: "@let f = field();\n@switch (f.type) {\n @case (\"text\") {\n <mt-text-field\n [label]=\"f.label\"\n [hint]=\"f.description\"\n [placeholder]=\"f.placeholder ?? ''\"\n [formControl]=\"control\"\n />\n }\n @case (\"cssDimension\") {\n <mt-text-field\n [label]=\"f.label\"\n [hint]=\"f.description\"\n [placeholder]=\"f.placeholder ?? '16px'\"\n [formControl]=\"control\"\n />\n }\n @case (\"multilineText\") {\n <mt-textarea-field\n [label]=\"f.label\"\n [hint]=\"f.description\"\n [placeholder]=\"f.placeholder ?? ''\"\n [formControl]=\"control\"\n />\n }\n @case (\"number\") {\n <mt-number-field\n [label]=\"f.label\"\n [hint]=\"f.description\"\n [min]=\"numberMin\"\n [max]=\"numberMax\"\n [formControl]=\"control\"\n />\n }\n @case (\"numberRange\") {\n <mt-slider-field\n [label]=\"f.label\"\n [min]=\"f.min ?? 0\"\n [max]=\"f.max ?? 100\"\n [step]=\"f.step ?? 1\"\n [unit]=\"f.unit ?? ''\"\n [formControl]=\"control\"\n />\n }\n @case (\"boolean\") {\n <mt-toggle-field\n [label]=\"f.label\"\n toggleShape=\"card\"\n [descriptionCard]=\"f.description ?? ''\"\n [formControl]=\"control\"\n />\n }\n @case (\"color\") {\n <mt-color-picker-field [label]=\"f.label\" [formControl]=\"control\" />\n }\n @case (\"select\") {\n <mt-select-field\n [label]=\"f.label\"\n [hint]=\"f.description\"\n [options]=\"options()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [filter]=\"useFilter\"\n [placeholder]=\"f.placeholder ?? ''\"\n [formControl]=\"control\"\n />\n }\n @case (\"multiselect\") {\n <mt-multi-select-field\n [label]=\"f.label\"\n [options]=\"options()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n display=\"chip\"\n [formControl]=\"control\"\n />\n }\n @case (\"iconPicker\") {\n <mt-icon-field [label]=\"f.label\" [formControl]=\"control\" />\n }\n @default {\n <!-- Composite + JSON types render their own label header -->\n <div class=\"db-style-field__composite flex flex-col gap-1.5\">\n <span class=\"text-sm font-medium text-color\">{{ f.label }}</span>\n @if (f.description) {\n <span class=\"text-xs text-muted-color\">{{ f.description }}</span>\n }\n @switch (f.type) {\n @case (\"segmented\") {\n <mt-segmented-field\n [options]=\"options()\"\n [value]=\"currentValue()\"\n (valueChange)=\"emitValue($event)\"\n />\n }\n @case (\"palette\") {\n <mt-color-list-field\n [value]=\"readColors()\"\n (valueChange)=\"emitValue($event)\"\n />\n }\n @case (\"colorList\") {\n <mt-color-list-field\n [value]=\"readColors()\"\n (valueChange)=\"emitValue($event)\"\n />\n }\n @case (\"arrayBuilder\") {\n <mt-array-builder-field\n [value]=\"readArray()\"\n [itemFields]=\"f.itemFields ?? []\"\n [itemTitleKey]=\"f.itemTitleKey\"\n [addLabel]=\"addLabel('Add item')\"\n [maxItems]=\"f.maxItems\"\n (valueChange)=\"emitValue($event)\"\n />\n }\n @case (\"conditionBuilder\") {\n <mt-array-builder-field\n [value]=\"readArray()\"\n [itemFields]=\"conditionFields()\"\n [addLabel]=\"addLabel('Add rule')\"\n (valueChange)=\"emitValue($event)\"\n />\n }\n @case (\"keyValueMap\") {\n <mt-key-value-map-field\n [value]=\"readMapOrArray()\"\n [keys]=\"mapKeys()\"\n [valueFields]=\"f.valueFields ?? []\"\n [asArray]=\"f.asArray ?? false\"\n (valueChange)=\"emitValue($event)\"\n />\n }\n @case (\"legendOrder\") {\n <mt-legend-order-field\n [items]=\"legendItems()\"\n [colorOverrides]=\"readLegendColorOverrides()\"\n (valueChange)=\"emitValue($event)\"\n (colorChange)=\"onLegendColorChange($event)\"\n />\n }\n @case (\"entryColors\") {\n <!-- Colors only: no (valueChange), because there is no order to\n persist for this control's charts. -->\n <mt-legend-order-field\n [items]=\"legendItems()\"\n [colorOverrides]=\"readLegendColorOverrides()\"\n [localizedLabels]=\"readOverrideLabels()\"\n [reorderable]=\"false\"\n [showLocalizedLabels]=\"true\"\n [useItemKeyForColor]=\"true\"\n (colorChange)=\"onLegendColorChange($event)\"\n (localizedLabelChange)=\"onEntryLabelChange($event)\"\n />\n }\n @case (\"json\") {\n <mt-textarea-field\n rows=\"8\"\n placeholder=\"{ }\"\n [formControl]=\"jsonControl\"\n />\n @if (jsonError()) {\n <span class=\"text-xs text-red-600\">{{ jsonError() }}</span>\n }\n }\n }\n </div>\n }\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: TextareaField, selector: "mt-textarea-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "noErrorStyle", "pInputs", "rows", "required", "maxLength"] }, { 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: SliderField, selector: "mt-slider-field", inputs: ["field", "label", "class", "min", "max", "step", "hideNumber", "unit", "readonly", "required"] }, { 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: 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: 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: ColorPickerField, selector: "mt-color-picker-field", inputs: ["label", "appendTo", "placeholder", "class", "variant", "readonly", "pInputs", "required"], outputs: ["onChange"] }, { kind: "component", type: IconField, selector: "mt-icon-field", inputs: ["label", "required"] }, { kind: "component", type: SegmentedField, selector: "mt-segmented-field", inputs: ["options", "value", "disabled", "ariaLabel"], outputs: ["valueChange"] }, { kind: "component", type: ColorListField, selector: "mt-color-list-field", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: ArrayBuilderField, selector: "mt-array-builder-field", inputs: ["value", "itemFields", "itemTitleKey", "addLabel", "maxItems"], outputs: ["valueChange"] }, { kind: "component", type: KeyValueMapField, selector: "mt-key-value-map-field", inputs: ["value", "keys", "valueFields", "asArray"], outputs: ["valueChange"] }, { kind: "component", type: LegendOrderField, selector: "mt-legend-order-field", inputs: ["items", "colorOverrides", "localizedLabels", "reorderable", "showLocalizedLabels", "useItemKeyForColor"], outputs: ["valueChange", "colorChange", "localizedLabelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
34187
34295
  }
34188
34296
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: StyleField, decorators: [{
34189
34297
  type: Component,
@@ -34204,7 +34312,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
34204
34312
  ArrayBuilderField,
34205
34313
  KeyValueMapField,
34206
34314
  LegendOrderField,
34207
- ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "@let f = field();\r\n@switch (f.type) {\r\n @case (\"text\") {\r\n <mt-text-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"cssDimension\") {\r\n <mt-text-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [placeholder]=\"f.placeholder ?? '16px'\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"multilineText\") {\r\n <mt-textarea-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"number\") {\r\n <mt-number-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [min]=\"numberMin\"\r\n [max]=\"numberMax\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"numberRange\") {\r\n <mt-slider-field\r\n [label]=\"f.label\"\r\n [min]=\"f.min ?? 0\"\r\n [max]=\"f.max ?? 100\"\r\n [step]=\"f.step ?? 1\"\r\n [unit]=\"f.unit ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"boolean\") {\r\n <mt-toggle-field\r\n [label]=\"f.label\"\r\n toggleShape=\"card\"\r\n [descriptionCard]=\"f.description ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"color\") {\r\n <mt-color-picker-field [label]=\"f.label\" [formControl]=\"control\" />\r\n }\r\n @case (\"select\") {\r\n <mt-select-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [options]=\"options()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"useFilter\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"multiselect\") {\r\n <mt-multi-select-field\r\n [label]=\"f.label\"\r\n [options]=\"options()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n display=\"chip\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"iconPicker\") {\r\n <mt-icon-field [label]=\"f.label\" [formControl]=\"control\" />\r\n }\r\n @default {\r\n <!-- Composite + JSON types render their own label header -->\r\n <div class=\"db-style-field__composite flex flex-col gap-1.5\">\r\n <span class=\"text-sm font-medium text-color\">{{ f.label }}</span>\r\n @if (f.description) {\r\n <span class=\"text-xs text-muted-color\">{{ f.description }}</span>\r\n }\r\n @switch (f.type) {\r\n @case (\"segmented\") {\r\n <mt-segmented-field\r\n [options]=\"options()\"\r\n [value]=\"currentValue()\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"palette\") {\r\n <mt-color-list-field\r\n [value]=\"readColors()\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"colorList\") {\r\n <mt-color-list-field\r\n [value]=\"readColors()\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"arrayBuilder\") {\r\n <mt-array-builder-field\r\n [value]=\"readArray()\"\r\n [itemFields]=\"f.itemFields ?? []\"\r\n [itemTitleKey]=\"f.itemTitleKey\"\r\n [addLabel]=\"addLabel('Add item')\"\r\n [maxItems]=\"f.maxItems\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"conditionBuilder\") {\r\n <mt-array-builder-field\r\n [value]=\"readArray()\"\r\n [itemFields]=\"conditionFields()\"\r\n [addLabel]=\"addLabel('Add rule')\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"keyValueMap\") {\r\n <mt-key-value-map-field\r\n [value]=\"readMapOrArray()\"\r\n [keys]=\"mapKeys()\"\r\n [valueFields]=\"f.valueFields ?? []\"\r\n [asArray]=\"f.asArray ?? false\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"legendOrder\") {\r\n <mt-legend-order-field\r\n [items]=\"legendItems()\"\r\n [colorOverrides]=\"readLegendColorOverrides()\"\r\n (valueChange)=\"emitValue($event)\"\r\n (colorChange)=\"onLegendColorChange($event)\"\r\n />\r\n }\r\n @case (\"entryColors\") {\r\n <!-- Colors only: no (valueChange), because there is no order to\r\n persist for this control's charts. -->\r\n <mt-legend-order-field\r\n [items]=\"legendItems()\"\r\n [colorOverrides]=\"readLegendColorOverrides()\"\r\n [reorderable]=\"false\"\r\n (colorChange)=\"onLegendColorChange($event)\"\r\n />\r\n }\r\n @case (\"json\") {\r\n <mt-textarea-field\r\n rows=\"8\"\r\n placeholder=\"{ }\"\r\n [formControl]=\"jsonControl\"\r\n />\r\n @if (jsonError()) {\r\n <span class=\"text-xs text-red-600\">{{ jsonError() }}</span>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n}\r\n" }]
34315
+ ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "@let f = field();\n@switch (f.type) {\n @case (\"text\") {\n <mt-text-field\n [label]=\"f.label\"\n [hint]=\"f.description\"\n [placeholder]=\"f.placeholder ?? ''\"\n [formControl]=\"control\"\n />\n }\n @case (\"cssDimension\") {\n <mt-text-field\n [label]=\"f.label\"\n [hint]=\"f.description\"\n [placeholder]=\"f.placeholder ?? '16px'\"\n [formControl]=\"control\"\n />\n }\n @case (\"multilineText\") {\n <mt-textarea-field\n [label]=\"f.label\"\n [hint]=\"f.description\"\n [placeholder]=\"f.placeholder ?? ''\"\n [formControl]=\"control\"\n />\n }\n @case (\"number\") {\n <mt-number-field\n [label]=\"f.label\"\n [hint]=\"f.description\"\n [min]=\"numberMin\"\n [max]=\"numberMax\"\n [formControl]=\"control\"\n />\n }\n @case (\"numberRange\") {\n <mt-slider-field\n [label]=\"f.label\"\n [min]=\"f.min ?? 0\"\n [max]=\"f.max ?? 100\"\n [step]=\"f.step ?? 1\"\n [unit]=\"f.unit ?? ''\"\n [formControl]=\"control\"\n />\n }\n @case (\"boolean\") {\n <mt-toggle-field\n [label]=\"f.label\"\n toggleShape=\"card\"\n [descriptionCard]=\"f.description ?? ''\"\n [formControl]=\"control\"\n />\n }\n @case (\"color\") {\n <mt-color-picker-field [label]=\"f.label\" [formControl]=\"control\" />\n }\n @case (\"select\") {\n <mt-select-field\n [label]=\"f.label\"\n [hint]=\"f.description\"\n [options]=\"options()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [filter]=\"useFilter\"\n [placeholder]=\"f.placeholder ?? ''\"\n [formControl]=\"control\"\n />\n }\n @case (\"multiselect\") {\n <mt-multi-select-field\n [label]=\"f.label\"\n [options]=\"options()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n display=\"chip\"\n [formControl]=\"control\"\n />\n }\n @case (\"iconPicker\") {\n <mt-icon-field [label]=\"f.label\" [formControl]=\"control\" />\n }\n @default {\n <!-- Composite + JSON types render their own label header -->\n <div class=\"db-style-field__composite flex flex-col gap-1.5\">\n <span class=\"text-sm font-medium text-color\">{{ f.label }}</span>\n @if (f.description) {\n <span class=\"text-xs text-muted-color\">{{ f.description }}</span>\n }\n @switch (f.type) {\n @case (\"segmented\") {\n <mt-segmented-field\n [options]=\"options()\"\n [value]=\"currentValue()\"\n (valueChange)=\"emitValue($event)\"\n />\n }\n @case (\"palette\") {\n <mt-color-list-field\n [value]=\"readColors()\"\n (valueChange)=\"emitValue($event)\"\n />\n }\n @case (\"colorList\") {\n <mt-color-list-field\n [value]=\"readColors()\"\n (valueChange)=\"emitValue($event)\"\n />\n }\n @case (\"arrayBuilder\") {\n <mt-array-builder-field\n [value]=\"readArray()\"\n [itemFields]=\"f.itemFields ?? []\"\n [itemTitleKey]=\"f.itemTitleKey\"\n [addLabel]=\"addLabel('Add item')\"\n [maxItems]=\"f.maxItems\"\n (valueChange)=\"emitValue($event)\"\n />\n }\n @case (\"conditionBuilder\") {\n <mt-array-builder-field\n [value]=\"readArray()\"\n [itemFields]=\"conditionFields()\"\n [addLabel]=\"addLabel('Add rule')\"\n (valueChange)=\"emitValue($event)\"\n />\n }\n @case (\"keyValueMap\") {\n <mt-key-value-map-field\n [value]=\"readMapOrArray()\"\n [keys]=\"mapKeys()\"\n [valueFields]=\"f.valueFields ?? []\"\n [asArray]=\"f.asArray ?? false\"\n (valueChange)=\"emitValue($event)\"\n />\n }\n @case (\"legendOrder\") {\n <mt-legend-order-field\n [items]=\"legendItems()\"\n [colorOverrides]=\"readLegendColorOverrides()\"\n (valueChange)=\"emitValue($event)\"\n (colorChange)=\"onLegendColorChange($event)\"\n />\n }\n @case (\"entryColors\") {\n <!-- Colors only: no (valueChange), because there is no order to\n persist for this control's charts. -->\n <mt-legend-order-field\n [items]=\"legendItems()\"\n [colorOverrides]=\"readLegendColorOverrides()\"\n [localizedLabels]=\"readOverrideLabels()\"\n [reorderable]=\"false\"\n [showLocalizedLabels]=\"true\"\n [useItemKeyForColor]=\"true\"\n (colorChange)=\"onLegendColorChange($event)\"\n (localizedLabelChange)=\"onEntryLabelChange($event)\"\n />\n }\n @case (\"json\") {\n <mt-textarea-field\n rows=\"8\"\n placeholder=\"{ }\"\n [formControl]=\"jsonControl\"\n />\n @if (jsonError()) {\n <span class=\"text-xs text-red-600\">{{ jsonError() }}</span>\n }\n }\n }\n </div>\n }\n}\n" }]
34208
34316
  }], ctorParameters: () => [], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], persisted: [{ type: i0.Input, args: [{ isSignal: true, alias: "persisted", required: true }] }], capability: [{ type: i0.Input, args: [{ isSignal: true, alias: "capability", required: false }] }], legendItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendItems", required: false }] }], patch: [{ type: i0.Output, args: ["patch"] }] } });
34209
34317
 
34210
34318
  /**
@@ -34304,7 +34412,7 @@ class StyleSettingsRenderer {
34304
34412
  /** Clear every visible field in a section back to its (unset) default. */
34305
34413
  resetSection(entry) {
34306
34414
  for (const field of entry.fields) {
34307
- for (const patch of expandResetPatches(field.path)) {
34415
+ for (const patch of expandResetPatches(field.path, field.mirrorPaths)) {
34308
34416
  this.patch.emit(patch);
34309
34417
  }
34310
34418
  }
@@ -34719,7 +34827,7 @@ class StyleStudioDrawer {
34719
34827
  const patches = [];
34720
34828
  for (const section of this.schema().sections) {
34721
34829
  for (const field of section.fields) {
34722
- patches.push(...expandResetPatches(field.path));
34830
+ patches.push(...expandResetPatches(field.path, field.mirrorPaths));
34723
34831
  }
34724
34832
  }
34725
34833
  this.item.set({
@@ -50644,4 +50752,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
50644
50752
  */
50645
50753
 
50646
50754
  export { ComparisonChartHandler as $, EntityPreviewCardComponent as A, ListStatisticCardComponent as B, CardContentComponent as C, DashboardItemStoreService as D, EChartComponent as E, FilterUtilsService as F, SkeletonCardComponent as G, HeaderCardComponent as H, resolveStatisticIconPlacement as I, StatisticCardComponent as J, TopbarCardComponent as K, LastHistoryLevelCardComponent as L, ChartDataService as M, BarChartHandler as N, PieChartHandler as O, PropertiesCardComponent as P, StackBarChartHandler as Q, axisFormatters as R, StaticFiltersComponent as S, TableCardComponent as T, groupDatesByYearAndMonth as U, GaugeChartHandler as V, TableViewHandler as W, OverviewCardHandler as X, TimelineHandler as Y, LineChartHandler as Z, SnapshotHandler as _, DashboardItem as a, GetChartActionsPipe as a$, SplitterChartHandler as a0, LevelCardHandler as a1, MapChartHandler as a2, RingGaugeChartHandler as a3, SPlusChartHandler as a4, PhaseGateStepperHandler as a5, formatCurrency as a6, getCurrencySuffix as a7, formatPercentage as a8, formatNumber as a9, StackBarControlUi as aA, ManageItem as aB, CHART_TYPES as aC, ManageItemService as aD, GeneralSettings as aE, DataSourceSettings as aF, ActionsSettings as aG, ChartViewer as aH, StyleStudioDrawer as aI, StyleSettingsRenderer as aJ, expandResetPatches as aK, StyleField as aL, SegmentedField as aM, ColorListField as aN, ArrayBuilderField as aO, KeyValueMapField as aP, LegendOrderField as aQ, ItemCardMenuComponent as aR, ChartFilterDrawer as aS, ItemContextToolbarComponent as aT, ItemConfigPopoverComponent as aU, GuidedConfigDialogComponent as aV, FilterChipsBarComponent as aW, FilterBuilderComponent as aX, DatasourcePanelComponent as aY, SchemaControlRendererComponent as aZ, FilterByGroupPipe as a_, formatDate as aa, createAxisFormatter as ab, createTooltipFormatter as ac, formatAxisLabel as ad, formatWordsUnderBar as ae, formatXAxis as af, handleFiltersForCustom as ag, handleFilterForCard as ah, handleFilterForSnapshot as ai, DashboardList as aj, MODULE_CLASSIFICATION_LOG as ak, MODULE_CLASSIFICATION_LOG_NAME as al, isLogClassification as am, HTTPMethod as an, DashboardBuilderService as ao, DashboardStoreService as ap, isManagePagesDeleteResult as aq, ManagePages as ar, ManageBreadcrumb as as, ManageFilterOnPage as at, DynamicFiltersConfig as au, ChartSettingsDrawer as av, DisplaySettings as aw, DefaultControlUi as ax, PieControlUi as ay, BarControlUi as az, DashboardDialogHeader as b, ItemGuidanceService as b$, CHART_CAPABILITIES as b0, getCapabilityById as b1, resolveCapability as b2, toBackendChartType as b3, normalizeChartTypeForRequest as b4, normalizeFilterOperation as b5, normalizeAggregateFunction as b6, normalizeFilters as b7, selectorFromLegacy as b8, moduleIdFromSelector as b9, STYLE_PRESETS as bA, presetsForCapability as bB, findPreset as bC, validate as bD, hasBlockingIssues as bE, groupIssuesByDomain as bF, parseAdvancedJson as bG, deepMerge$1 as bH, formatForEditor as bI, readByPath$1 as bJ, setByPath as bK, applyControlPatchToPersisted as bL, applyControlPatchesToPersisted as bM, getControlSchema as bN, listControlSchemaIds as bO, listControlSchemas as bP, getFallbackControlSchema as bQ, flattenSchema as bR, resolveDisplayFields as bS, buildDisplayFieldPredicate as bT, bindingKey as bU, getBinding as bV, listBindings as bW, listBindingsForChart as bX, readBoundValue as bY, ITEM_GUIDANCE_REGISTRY as bZ, describeGuidance as b_, toBackendSourceLink as ba, toFormSourceLink as bb, normalizeOnLoad as bc, normalizeBeforeSave as bd, normalizeBeforeRequest as be, CONFIG_DOMAINS as bf, domainsForCapability as bg, findDomain as bh, POPOVER_TABS as bi, POPOVER_TAB_SPECS as bj, titleToUi as bk, applyTitleToPersisted as bl, datasourceToUi as bm, fieldsToUi as bn, filtersToUi as bo, styleToUi as bp, applyStyleToPersisted as bq, layoutToUi as br, applyLayoutToPersisted as bs, labelLegendFormatToUi as bt, applyLabelLegendFormatToPersisted as bu, behaviorToUi as bv, applyBehaviorToPersisted as bw, applyFilterChipsToPersisted as bx, persistedToUi as by, buildAssembly as bz, cloneDeep$1 as c, DashboardBuilder as d, DashboardViewer as e, switchAllKeysSmall$1 as f, getNestedData as g, dynamicTextReplace as h, dynamicReorder as i, generalConfiguration as j, formatValue as k, getLocalizedTitle as l, sortChartData as m, addCommasToNumber as n, sortDataTableView as o, isMobilePlatform$1 as p, getColorFromConditions as q, resolveDashboardDialogHeader as r, switchAllKeysToLower as s, CardFilterComponent as t, DynamicFiltersComponent as u, CardInfoComponent as v, ChartCardComponent as w, resolveEntityUserPhoto as x, EntityInfoComponent as y, normalizeDashboardCardEntityValue as z };
50647
- //# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-DJI6mi2b.mjs.map
50755
+ //# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-DaN0WjWE.mjs.map