@masterteam/dashboard-builder 0.0.102 → 0.0.104

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
@@ -386,9 +386,17 @@ Boundary data is © OpenStreetMap contributors under the ODbL. The widget render
386
386
  that attribution in its corner and it must not be removed.
387
387
 
388
388
  **Query.** `serviceConfig.query.locationProperty` must point at a `Location`
389
- property and `groupingProperty` at the property that colours the markers. A
390
- record is plotted only when both resolve and the location value parses to finite
391
- coordinates within the world; everything else is skipped silently.
389
+ property — the Query editor offers only `Location` properties for it, since any
390
+ other choice saves fine and then plots nothing. A record is plotted only when
391
+ its location value parses to finite coordinates within the world; everything
392
+ else is skipped silently.
393
+
394
+ `groupingProperty` is optional and colours the markers. With none set, every
395
+ record lands in one unnamed group and the map draws no legend. A record with no
396
+ grouping value is grouped as "Unknown" instead of being dropped (the backend
397
+ omits null properties from the row). The group name is the value's display text:
398
+ a Status's localized label, a User's `displayName`, a Lookup's localized
399
+ `display`, the names of a MultiUser joined with commas, or a plain value as-is.
392
400
 
393
401
  **Regions** (`MAP_SECTION` writes the choice to `clientConfig.map`):
394
402
 
@@ -987,6 +987,7 @@
987
987
  "endPointTimeProperty": "خاصية وقت نقطة النهاية",
988
988
  "locationProperty": "خاصية الموقع",
989
989
  "groupingProperty": "خاصية التجميع",
990
+ "noGrouping": "بدون تجميع",
990
991
  "positiveValues": "القيم الإيجابية",
991
992
  "negativeValues": "القيم السلبية",
992
993
  "enterPositiveValues": "أدخل القيم الإيجابية (مفصولة بفواصل)",
@@ -721,6 +721,7 @@
721
721
  "endPointTimeProperty": "End Point Time Property",
722
722
  "locationProperty": "Location Property",
723
723
  "groupingProperty": "Grouping Property",
724
+ "noGrouping": "No grouping",
724
725
  "positiveValues": "Positive Values",
725
726
  "negativeValues": "Negative Values",
726
727
  "enterPositiveValues": "Enter positive values (comma-separated)",
@@ -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-DfAo6fUq.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-CodhML2K.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-Cb6kF8k7.mjs.map
132
+ //# sourceMappingURL=masterteam-dashboard-builder-dashboard-dialog.component-C3X9UhZk.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"masterteam-dashboard-builder-dashboard-dialog.component-Cb6kF8k7.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":";;;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AAC,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;;;;"}
1
+ {"version":3,"file":"masterteam-dashboard-builder-dashboard-dialog.component-C3X9UhZk.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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ACP,CAAC,YAAY,EAAE,kBAAkB,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,kvEAAA,EAAA;;AAsF5D;;AAEG;AACG,SAAU,mBAAmB,CACjC,YAA0B,EAC1B,MAAkB,EAClB,MAA4B,EAC5B,OAIC,EAAA;AAED,IAAA,MAAM,SAAS,GAAG;AAChB,QAAA,EAAE,EAAE,UAAU;AACd,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;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, signal, Injectable, computed, Pipe, input, ViewEncapsulation, ChangeDetectionStrategy, Component, effect, untracked, forwardRef, ViewChild, DestroyRef, output, InjectionToken, ElementRef, NgZone, PLATFORM_ID, viewChild, ChangeDetectorRef, model, HostListener } from '@angular/core';
2
+ import { inject, signal, Injectable, computed, Pipe, input, ViewEncapsulation, ChangeDetectionStrategy, Component, effect, untracked, forwardRef, ViewChild, DestroyRef, output, InjectionToken, ElementRef, NgZone, PLATFORM_ID, viewChild, ChangeDetectorRef, model, HostListener, contentChild } from '@angular/core';
3
3
  import * as i1$1 from '@angular/common';
4
4
  import { CommonModule, DatePipe, isPlatformBrowser, DecimalPipe } from '@angular/common';
5
5
  import * as i1 from '@angular/forms';
@@ -20741,6 +20741,7 @@ const FALLBACK_COLORS = [
20741
20741
  // Custom marker path from SVG
20742
20742
  const CUSTOM_MARKER_PATH = 'path://M6.99998 0.666687C5.24336 0.666599 3.55769 1.35982 2.30935 2.59568C1.06101 3.83154 0.350879 5.51016 0.333313 7.26669C0.333313 11.8334 6.20831 16.9167 6.45831 17.1334C6.60926 17.2625 6.80135 17.3334 6.99998 17.3334C7.19861 17.3334 7.3907 17.2625 7.54165 17.1334C7.83331 16.9167 13.6666 11.8334 13.6666 7.26669C13.6491 5.51016 12.939 3.83154 11.6906 2.59568C10.4423 1.35982 8.7566 0.666599 6.99998 0.666687ZM6.99998 9.83335C6.42312 9.83335 5.85921 9.66229 5.37957 9.34181C4.89992 9.02132 4.52609 8.5658 4.30533 8.03285C4.08458 7.4999 4.02682 6.91345 4.13936 6.34767C4.2519 5.7819 4.52968 5.2622 4.93758 4.85429C5.34549 4.44639 5.86519 4.1686 6.43097 4.05606C6.99674 3.94352 7.58319 4.00128 8.11614 4.22204C8.64909 4.44279 9.10461 4.81663 9.4251 5.29627C9.74559 5.77592 9.91665 6.33983 9.91665 6.91669C9.91665 7.29971 9.8412 7.67898 9.69463 8.03285C9.54805 8.38671 9.33321 8.70825 9.06237 8.97908C8.79154 9.24992 8.47001 9.46476 8.11614 9.61134C7.76227 9.75791 7.383 9.83335 6.99998 9.83335Z';
20743
20743
  class MapChartHandler {
20744
+ storeService = inject(DashboardStoreService);
20744
20745
  mapCity = 'Saudi';
20745
20746
  /**
20746
20747
  * handleMapChart - for ECharts geo map
@@ -20765,9 +20766,6 @@ class MapChartHandler {
20765
20766
  const locationKeyInRecord = recordKeys.find((k) => k.toLowerCase() === locationKeyConfig);
20766
20767
  if (!locationKeyInRecord)
20767
20768
  return;
20768
- const groupingKeyInRecord = recordKeys.find((k) => k.toLowerCase() === groupingKeyConfig);
20769
- if (!groupingKeyInRecord)
20770
- return;
20771
20769
  const locationProp = record[locationKeyInRecord];
20772
20770
  if (!locationProp || !locationProp.value)
20773
20771
  return;
@@ -20776,9 +20774,7 @@ class MapChartHandler {
20776
20774
  const lon = parseFloat(locationProp.value.lon);
20777
20775
  if (isNaN(lat) || isNaN(lon))
20778
20776
  return;
20779
- // get grouping info
20780
- const groupProp = record[groupingKeyInRecord];
20781
- const groupName = groupProp?.value?.displayName || groupProp?.value || 'Unknown';
20777
+ const groupName = this.resolveGroupName(record, groupingKeyConfig);
20782
20778
  // location display
20783
20779
  const locationDisplay = locationProp.value.display_name || 'Untitled';
20784
20780
  // one scatter point
@@ -20838,7 +20834,9 @@ class MapChartHandler {
20838
20834
  },
20839
20835
  zlevel: 2,
20840
20836
  });
20841
- legendNames.push(groupName);
20837
+ // The single group of an ungrouped map has no name to list.
20838
+ if (groupName)
20839
+ legendNames.push(groupName);
20842
20840
  });
20843
20841
  // 4) Construct final ECharts option
20844
20842
  const option = {
@@ -20900,6 +20898,57 @@ class MapChartHandler {
20900
20898
  return { bottom: '3%', left: 'center', orient: 'horizontal' };
20901
20899
  }
20902
20900
  }
20901
+ /**
20902
+ * The group a record is plotted under.
20903
+ *
20904
+ * The grouping property is optional: with none configured every record
20905
+ * lands in one unnamed group, which the map draws without a legend entry.
20906
+ * A record with no grouping value is grouped as "Unknown" rather than
20907
+ * dropped — the backend omits null properties from the row, so a missing
20908
+ * key means "no value", not "not requested".
20909
+ */
20910
+ resolveGroupName(record, groupingKey) {
20911
+ if (!groupingKey)
20912
+ return '';
20913
+ const key = Object.keys(record).find((k) => k.toLowerCase() === groupingKey);
20914
+ const name = key ? this.displayText(record[key]?.value) : '';
20915
+ if (name)
20916
+ return name;
20917
+ return this.storeService.languageCode() === 'ar' ? 'غير محدد' : 'Unknown';
20918
+ }
20919
+ /**
20920
+ * Status values arrive as `{ display, en, ar, color }`, users as
20921
+ * `{ displayName }`, lookups as `{ display: { en, ar } }` and multi-user
20922
+ * properties as an array of users; anything else is a plain value.
20923
+ */
20924
+ displayText(value) {
20925
+ if (value === null || value === undefined)
20926
+ return '';
20927
+ if (Array.isArray(value)) {
20928
+ return value
20929
+ .map((item) => this.displayText(item))
20930
+ .filter(Boolean)
20931
+ .join(', ');
20932
+ }
20933
+ if (typeof value !== 'object')
20934
+ return String(value);
20935
+ const languageCode = this.storeService.languageCode() || 'en';
20936
+ const v = value;
20937
+ const text = [
20938
+ v['display']?.[languageCode],
20939
+ v[languageCode],
20940
+ v['display'],
20941
+ v['displayName'],
20942
+ v['name'],
20943
+ v['display']?.['en'],
20944
+ v['en'],
20945
+ v['ar'],
20946
+ v['label'],
20947
+ v['key'],
20948
+ ].find((candidate) => (typeof candidate === 'string' && candidate.trim() !== '') ||
20949
+ typeof candidate === 'number');
20950
+ return text === undefined ? '' : String(text);
20951
+ }
20903
20952
  /**
20904
20953
  * handleLeafletMap - matches functionName from CHART_TYPES
20905
20954
  * Returns data directly as array of grouped records
@@ -20917,9 +20966,6 @@ class MapChartHandler {
20917
20966
  const locationKeyInRecord = recordKeys.find((k) => k.toLowerCase() === locationKeyConfig);
20918
20967
  if (!locationKeyInRecord)
20919
20968
  return;
20920
- const groupingKeyInRecord = recordKeys.find((k) => k.toLowerCase() === groupingKeyConfig);
20921
- if (!groupingKeyInRecord)
20922
- return;
20923
20969
  const locationProp = record[locationKeyInRecord];
20924
20970
  if (!locationProp || !locationProp.value)
20925
20971
  return;
@@ -20928,9 +20974,7 @@ class MapChartHandler {
20928
20974
  const lon = parseFloat(locationProp.value.lon);
20929
20975
  if (isNaN(lat) || isNaN(lon))
20930
20976
  return;
20931
- // get grouping info
20932
- const groupProp = record[groupingKeyInRecord];
20933
- const groupName = groupProp?.value?.displayName || groupProp?.value || 'Unknown';
20977
+ const groupName = this.resolveGroupName(record, groupingKeyConfig);
20934
20978
  // location display
20935
20979
  const locationDisplay = locationProp.value.display_name || 'Untitled';
20936
20980
  // Insert into grouped map
@@ -23792,7 +23836,7 @@ class ActionService {
23792
23836
  // "Dialog header"), not from the chart that opened it.
23793
23837
  const header = resolveDashboardDialogHeader(dialogConfig);
23794
23838
  // Dynamically import DashboardDialogComponent to avoid circular dependency
23795
- import('./masterteam-dashboard-builder-dashboard-dialog.component-Cb6kF8k7.mjs').then(({ DashboardDialogComponent }) => {
23839
+ import('./masterteam-dashboard-builder-dashboard-dialog.component-C3X9UhZk.mjs').then(({ DashboardDialogComponent }) => {
23796
23840
  // Open dialog using ModalService
23797
23841
  this.modalService.openModal(DashboardDialogComponent, 'dialog', {
23798
23842
  header: header.title,
@@ -27598,7 +27642,9 @@ function buildMapChartOption(groups, region, legend, font = {}) {
27598
27642
  const legendNames = [];
27599
27643
  const series = usable.map((group, index) => {
27600
27644
  const color = group.color || MAP_FALLBACK_COLORS[index % MAP_FALLBACK_COLORS.length];
27601
- legendNames.push(group.groupName);
27645
+ // An ungrouped map is one unnamed group, with nothing to list.
27646
+ if (group.groupName)
27647
+ legendNames.push(group.groupName);
27602
27648
  return {
27603
27649
  name: group.groupName,
27604
27650
  type: 'scatter',
@@ -27634,6 +27680,7 @@ function buildMapChartOption(groups, region, legend, font = {}) {
27634
27680
  zlevel: 2,
27635
27681
  };
27636
27682
  });
27683
+ const legendShown = legend.show && legendNames.length > 0;
27637
27684
  return {
27638
27685
  tooltip: {
27639
27686
  trigger: 'item',
@@ -27646,7 +27693,7 @@ function buildMapChartOption(groups, region, legend, font = {}) {
27646
27693
  roam: true,
27647
27694
  center: region.center,
27648
27695
  zoom: region.zoom,
27649
- ...geoLayout(legend),
27696
+ ...geoLayout({ ...legend, show: legendShown }),
27650
27697
  itemStyle: {
27651
27698
  areaColor: '#f5f5f5',
27652
27699
  borderColor: '#ccc',
@@ -27660,7 +27707,7 @@ function buildMapChartOption(groups, region, legend, font = {}) {
27660
27707
  ...legendLayout(legend.position),
27661
27708
  data: legendNames,
27662
27709
  icon: legend.icon || 'circle',
27663
- show: legend.show,
27710
+ show: legendShown,
27664
27711
  textStyle: {
27665
27712
  fontFamily: font.fontFamily,
27666
27713
  fontSize: font.legendSize ?? 12,
@@ -38319,6 +38366,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
38319
38366
  ], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\r\n <!-- Workspace (Template root), only for hierarchical Level services -->\r\n @if (hasWorkspaceStep()) {\r\n <mt-select-field\r\n [label]=\"t('workspace')\"\r\n [options]=\"workspaceOptions()\"\r\n optionLabel=\"name\"\r\n optionValue=\"selector\"\r\n [placeholder]=\"t('selectWorkspace')\"\r\n [filter]=\"true\"\r\n [showClear]=\"true\"\r\n [ngModel]=\"query().workspaceSelector\"\r\n (ngModelChange)=\"onWorkspaceChange($event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n }\r\n\r\n <!-- Level (type = Level), narrowed by the chosen workspace -->\r\n <mt-select-field\r\n [label]=\"t('level')\"\r\n [options]=\"levelOptions()\"\r\n optionLabel=\"name\"\r\n optionValue=\"id\"\r\n [placeholder]=\"t('selectLevel')\"\r\n [filter]=\"true\"\r\n [showClear]=\"true\"\r\n [ngModel]=\"query().levelId\"\r\n (ngModelChange)=\"onLevelChange($event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n\r\n <!-- Snapshot API target: one concrete record from the selected Level -->\r\n <mt-select-field\r\n [label]=\"t('levelData')\"\r\n [options]=\"levelDataOptions()\"\r\n optionLabel=\"name\"\r\n optionValue=\"id\"\r\n [placeholder]=\"t('selectLevelData')\"\r\n [filter]=\"true\"\r\n [showClear]=\"true\"\r\n [loading]=\"loadingLevelData()\"\r\n [ngModel]=\"query().levelDataId\"\r\n (ngModelChange)=\"onLevelDataChange($event)\"\r\n [disabled]=\"disabled || !query().levelId\"\r\n />\r\n\r\n <!-- Time Frame -->\r\n <mt-select-field\r\n [label]=\"t('timeFrame')\"\r\n [options]=\"timeFrameOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [placeholder]=\"t('selectTimeFrame')\"\r\n [ngModel]=\"query().timeFrame\"\r\n (ngModelChange)=\"updateField('timeFrame', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n\r\n <!-- Year -->\r\n <mt-select-field\r\n [label]=\"t('year')\"\r\n [options]=\"yearOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [placeholder]=\"t('selectYear')\"\r\n [ngModel]=\"query().year\"\r\n (ngModelChange)=\"updateField('year', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n\r\n <!-- Get Average Per Period -->\r\n <div class=\"flex items-end pb-2\">\r\n <mt-toggle-field\r\n [label]=\"t('getAveragePerPeriod')\"\r\n [ngModel]=\"query().getAveragePerPeriod\"\r\n (ngModelChange)=\"updateField('getAveragePerPeriod', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <!-- Workspace-first hint when a workspace is required but not chosen yet -->\r\n @if (hasWorkspaceStep() && !query().workspaceSelector) {\r\n <small class=\"text-muted-color -mt-2 block\">{{\r\n t(\"selectWorkspaceHint\")\r\n }}</small>\r\n }\r\n\r\n @if (\r\n query().levelId && !loadingLevelData() && levelDataOptions().length === 0\r\n ) {\r\n <small class=\"text-muted-color -mt-2 block\">{{\r\n t(\"noLevelDataForLevel\")\r\n }}</small>\r\n }\r\n\r\n <!-- Metrics supported by the snapshot endpoint -->\r\n <div class=\"w-full\">\r\n <mt-multi-select-field\r\n [label]=\"t('selectedProperties')\"\r\n [options]=\"snapshotMetricOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"key\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectProperties')\"\r\n [ngModel]=\"query().selectedProperties\"\r\n (ngModelChange)=\"updateField('selectedProperties', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n </div>\r\n</div>\r\n" }]
38320
38367
  }], ctorParameters: () => [], propDecorators: { propertiesFlat: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesFlat", required: false }] }], propertiesGrouped: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesGrouped", required: false }] }] } });
38321
38368
 
38369
+ const isLocationProperty = (property) => property.viewType?.toLowerCase() === 'location';
38322
38370
  /**
38323
38371
  * Map Query Component
38324
38372
  *
@@ -38331,6 +38379,18 @@ class MapQuery {
38331
38379
  propertiesGrouped = input([], ...(ngDevMode ? [{ debugName: "propertiesGrouped" }] : /* istanbul ignore next */ []));
38332
38380
  /** Whether to use grouped select (when multiple modules) */
38333
38381
  useGroupedSelect = computed(() => this.propertiesGrouped().length > 1, ...(ngDevMode ? [{ debugName: "useGroupedSelect" }] : /* istanbul ignore next */ []));
38382
+ /**
38383
+ * Only a Location property carries the `{ lat, lon }` the map plots; any
38384
+ * other choice saves fine and then draws an empty map.
38385
+ */
38386
+ locationOptions = computed(() => this.useGroupedSelect()
38387
+ ? this.propertiesGrouped()
38388
+ .map((group) => ({
38389
+ ...group,
38390
+ items: group.items.filter(isLocationProperty),
38391
+ }))
38392
+ .filter((group) => group.items.length > 0)
38393
+ : this.propertiesFlat().filter(isLocationProperty), ...(ngDevMode ? [{ debugName: "locationOptions" }] : /* istanbul ignore next */ []));
38334
38394
  /** Query configuration */
38335
38395
  query = signal({
38336
38396
  locationProperty: undefined,
@@ -38383,7 +38443,7 @@ class MapQuery {
38383
38443
  useExisting: forwardRef(() => MapQuery),
38384
38444
  multi: true,
38385
38445
  },
38386
- ], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\r\n <!-- Location Property -->\r\n <mt-select-field\r\n [label]=\"t('locationProperty')\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [ngModel]=\"query().locationProperty\"\r\n (ngModelChange)=\"updateField('locationProperty', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n\r\n <!-- Grouping Property -->\r\n <mt-select-field\r\n [label]=\"t('groupingProperty')\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [ngModel]=\"query().groupingProperty\"\r\n (ngModelChange)=\"updateField('groupingProperty', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n </div>\r\n\r\n <!-- Extra Properties -->\r\n <div class=\"w-full\">\r\n <mt-multi-select-field\r\n [label]=\"t('extraProperties')\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectProperties')\"\r\n [ngModel]=\"query().extraProperties\"\r\n (ngModelChange)=\"updateField('extraProperties', $event)\"\r\n [disabled]=\"disabled\"\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: 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
38446
+ ], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\r\n <!-- Location Property -->\r\n <mt-select-field\r\n [label]=\"t('locationProperty')\"\r\n [options]=\"locationOptions()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [ngModel]=\"query().locationProperty\"\r\n (ngModelChange)=\"updateField('locationProperty', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n\r\n <!-- Grouping Property -->\r\n <mt-select-field\r\n [label]=\"t('groupingProperty')\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('noGrouping')\"\r\n [ngModel]=\"query().groupingProperty\"\r\n (ngModelChange)=\"updateField('groupingProperty', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n </div>\r\n\r\n <!-- Extra Properties -->\r\n <div class=\"w-full\">\r\n <mt-multi-select-field\r\n [label]=\"t('extraProperties')\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectProperties')\"\r\n [ngModel]=\"query().extraProperties\"\r\n (ngModelChange)=\"updateField('extraProperties', $event)\"\r\n [disabled]=\"disabled\"\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: 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
38387
38447
  }
38388
38448
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MapQuery, decorators: [{
38389
38449
  type: Component,
@@ -38399,7 +38459,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
38399
38459
  useExisting: forwardRef(() => MapQuery),
38400
38460
  multi: true,
38401
38461
  },
38402
- ], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\r\n <!-- Location Property -->\r\n <mt-select-field\r\n [label]=\"t('locationProperty')\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [ngModel]=\"query().locationProperty\"\r\n (ngModelChange)=\"updateField('locationProperty', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n\r\n <!-- Grouping Property -->\r\n <mt-select-field\r\n [label]=\"t('groupingProperty')\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [ngModel]=\"query().groupingProperty\"\r\n (ngModelChange)=\"updateField('groupingProperty', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n </div>\r\n\r\n <!-- Extra Properties -->\r\n <div class=\"w-full\">\r\n <mt-multi-select-field\r\n [label]=\"t('extraProperties')\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectProperties')\"\r\n [ngModel]=\"query().extraProperties\"\r\n (ngModelChange)=\"updateField('extraProperties', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n </div>\r\n</div>\r\n" }]
38462
+ ], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\r\n <!-- Location Property -->\r\n <mt-select-field\r\n [label]=\"t('locationProperty')\"\r\n [options]=\"locationOptions()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [ngModel]=\"query().locationProperty\"\r\n (ngModelChange)=\"updateField('locationProperty', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n\r\n <!-- Grouping Property -->\r\n <mt-select-field\r\n [label]=\"t('groupingProperty')\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('noGrouping')\"\r\n [ngModel]=\"query().groupingProperty\"\r\n (ngModelChange)=\"updateField('groupingProperty', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n </div>\r\n\r\n <!-- Extra Properties -->\r\n <div class=\"w-full\">\r\n <mt-multi-select-field\r\n [label]=\"t('extraProperties')\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectProperties')\"\r\n [ngModel]=\"query().extraProperties\"\r\n (ngModelChange)=\"updateField('extraProperties', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n </div>\r\n</div>\r\n" }]
38403
38463
  }], propDecorators: { propertiesFlat: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesFlat", required: false }] }], propertiesGrouped: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesGrouped", required: false }] }] } });
38404
38464
 
38405
38465
  /**
@@ -48621,6 +48681,8 @@ class DashboardList {
48621
48681
  modalRef;
48622
48682
  // Template refs for custom cells
48623
48683
  nameTpl = viewChild('nameTpl', ...(ngDevMode ? [{ debugName: "nameTpl" }] : /* istanbul ignore next */ []));
48684
+ /** Host actions for the page header (e.g. "Design a dashboard with Faris"), next to the title. */
48685
+ headerEnd = contentChild('headerEnd', ...(ngDevMode ? [{ debugName: "headerEnd" }] : /* istanbul ignore next */ []));
48624
48686
  // ============================================
48625
48687
  // Inputs
48626
48688
  // ============================================
@@ -48848,12 +48910,12 @@ class DashboardList {
48848
48910
  this.dashboards.reload();
48849
48911
  }
48850
48912
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardList, deps: [], target: i0.ɵɵFactoryTarget.Component });
48851
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DashboardList, isStandalone: true, selector: "mt-dashboard-list", inputs: { isPage: { classPropertyName: "isPage", publicName: "isPage", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, baseRoute: { classPropertyName: "baseRoute", publicName: "baseRoute", isSignal: true, isRequired: false, transformFunction: null }, showCreateButton: { classPropertyName: "showCreateButton", publicName: "showCreateButton", isSignal: true, isRequired: false, transformFunction: null }, showViewButton: { classPropertyName: "showViewButton", publicName: "showViewButton", isSignal: true, isRequired: false, transformFunction: null }, showEditButton: { classPropertyName: "showEditButton", publicName: "showEditButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dashboardAction: "dashboardAction", dashboardCreated: "dashboardCreated" }, viewQueries: [{ propertyName: "nameTpl", first: true, predicate: ["nameTpl"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder.dashboard'\">\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"pageTitle() || t('dashboards')\"\r\n [avatarIcon]=\"'chart.bar-chart-square-03'\"\r\n [avatarStyle]=\"{\r\n '--p-avatar-background': 'var(--p-cyan-100)',\r\n '--p-avatar-color': 'var(--p-cyan-700)',\r\n }\"\r\n >\r\n <!-- Content -->\r\n <ng-container *ngTemplateOutlet=\"tableContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <div class=\"dashboard-list space-y-3\">\r\n <!-- Header -->\r\n <h2 class=\"text-2xl font-semibold text-surface-900 dark:text-surface-0\">\r\n {{ t(\"dashboards\") }}\r\n </h2>\r\n\r\n <!-- Content -->\r\n <ng-container *ngTemplateOutlet=\"tableContent\" />\r\n </div>\r\n }\r\n\r\n <!-- Reusable table content template -->\r\n <ng-template #tableContent>\r\n <!-- Custom cell templates -->\r\n <ng-template #nameTpl let-row>\r\n <span class=\"font-semibold text-surface-900 dark:text-surface-0\">\r\n {{ getDashboardName(row) }}\r\n </span>\r\n </ng-template>\r\n\r\n <!-- Dashboard Table -->\r\n <mt-table\r\n [data]=\"dashboardList()\"\r\n [columns]=\"tableColumns()\"\r\n [actions]=\"tableActions()\"\r\n [rowActions]=\"rowActions()\"\r\n [loading]=\"isLoading()\"\r\n [showFilters]=\"true\"\r\n [generalSearch]=\"true\"\r\n dataKey=\"id\"\r\n storageKey=\"dashboard-list-table\"\r\n (cellChange)=\"onToggleChange($event)\"\r\n />\r\n </ng-template>\r\n</ng-container>\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: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "showFilters", "filterMode", "loading", "updating", "lazy", "lazyLocalSort", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "storageKey", "storageMode", "persistStateExclude", "exportable", "printable", "groupable", "groupCountMap", "cellClickFilter", "freezeActions", "virtualScroll", "virtualScrollItemSize", "scrollHeight", "printTitle", "exportFilename", "actionShape", "rowActionsLoadingFn", "tableLayout", "noCard", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "captionStartTemplate", "captionEndTemplate", "emptyTitle", "emptyDescription", "emptyActionLabel", "emptyActionIcon", "externalFiltersActive", "paginatorPosition", "alwaysShowPaginator", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm", "groupBy", "sortField", "sortDirection"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "emptyAction", "filtersCleared", "rowActionsRequested", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange", "groupByChange", "sortFieldChange", "sortDirectionChange"] }, { 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 });
48913
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DashboardList, isStandalone: true, selector: "mt-dashboard-list", inputs: { isPage: { classPropertyName: "isPage", publicName: "isPage", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, baseRoute: { classPropertyName: "baseRoute", publicName: "baseRoute", isSignal: true, isRequired: false, transformFunction: null }, showCreateButton: { classPropertyName: "showCreateButton", publicName: "showCreateButton", isSignal: true, isRequired: false, transformFunction: null }, showViewButton: { classPropertyName: "showViewButton", publicName: "showViewButton", isSignal: true, isRequired: false, transformFunction: null }, showEditButton: { classPropertyName: "showEditButton", publicName: "showEditButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dashboardAction: "dashboardAction", dashboardCreated: "dashboardCreated" }, queries: [{ propertyName: "headerEnd", first: true, predicate: ["headerEnd"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "nameTpl", first: true, predicate: ["nameTpl"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder.dashboard'\">\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"pageTitle() || t('dashboards')\"\r\n [avatarIcon]=\"'chart.bar-chart-square-03'\"\r\n [avatarStyle]=\"{\r\n '--p-avatar-background': 'var(--p-cyan-100)',\r\n '--p-avatar-color': 'var(--p-cyan-700)',\r\n }\"\r\n >\r\n @if (headerEnd(); as hostActions) {\r\n <ng-template #headerEnd>\r\n <ng-container *ngTemplateOutlet=\"hostActions\" />\r\n </ng-template>\r\n }\r\n <!-- Content -->\r\n <ng-container *ngTemplateOutlet=\"tableContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <div class=\"dashboard-list space-y-3\">\r\n <!-- Header -->\r\n <h2 class=\"text-2xl font-semibold text-surface-900 dark:text-surface-0\">\r\n {{ t(\"dashboards\") }}\r\n </h2>\r\n\r\n <!-- Content -->\r\n <ng-container *ngTemplateOutlet=\"tableContent\" />\r\n </div>\r\n }\r\n\r\n <!-- Reusable table content template -->\r\n <ng-template #tableContent>\r\n <!-- Custom cell templates -->\r\n <ng-template #nameTpl let-row>\r\n <span class=\"font-semibold text-surface-900 dark:text-surface-0\">\r\n {{ getDashboardName(row) }}\r\n </span>\r\n </ng-template>\r\n\r\n <!-- Dashboard Table -->\r\n <mt-table\r\n [data]=\"dashboardList()\"\r\n [columns]=\"tableColumns()\"\r\n [actions]=\"tableActions()\"\r\n [rowActions]=\"rowActions()\"\r\n [loading]=\"isLoading()\"\r\n [showFilters]=\"true\"\r\n [generalSearch]=\"true\"\r\n dataKey=\"id\"\r\n storageKey=\"dashboard-list-table\"\r\n (cellChange)=\"onToggleChange($event)\"\r\n />\r\n </ng-template>\r\n</ng-container>\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: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "showFilters", "filterMode", "loading", "updating", "lazy", "lazyLocalSort", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "storageKey", "storageMode", "persistStateExclude", "exportable", "printable", "groupable", "groupCountMap", "cellClickFilter", "freezeActions", "virtualScroll", "virtualScrollItemSize", "scrollHeight", "printTitle", "exportFilename", "actionShape", "rowActionsLoadingFn", "tableLayout", "noCard", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "captionStartTemplate", "captionEndTemplate", "emptyTitle", "emptyDescription", "emptyActionLabel", "emptyActionIcon", "externalFiltersActive", "paginatorPosition", "alwaysShowPaginator", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm", "groupBy", "sortField", "sortDirection"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "emptyAction", "filtersCleared", "rowActionsRequested", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange", "groupByChange", "sortFieldChange", "sortDirectionChange"] }, { 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 });
48852
48914
  }
48853
48915
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardList, decorators: [{
48854
48916
  type: Component,
48855
- args: [{ selector: 'mt-dashboard-list', standalone: true, imports: [CommonModule, TranslocoDirective, Table, Page], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder.dashboard'\">\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"pageTitle() || t('dashboards')\"\r\n [avatarIcon]=\"'chart.bar-chart-square-03'\"\r\n [avatarStyle]=\"{\r\n '--p-avatar-background': 'var(--p-cyan-100)',\r\n '--p-avatar-color': 'var(--p-cyan-700)',\r\n }\"\r\n >\r\n <!-- Content -->\r\n <ng-container *ngTemplateOutlet=\"tableContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <div class=\"dashboard-list space-y-3\">\r\n <!-- Header -->\r\n <h2 class=\"text-2xl font-semibold text-surface-900 dark:text-surface-0\">\r\n {{ t(\"dashboards\") }}\r\n </h2>\r\n\r\n <!-- Content -->\r\n <ng-container *ngTemplateOutlet=\"tableContent\" />\r\n </div>\r\n }\r\n\r\n <!-- Reusable table content template -->\r\n <ng-template #tableContent>\r\n <!-- Custom cell templates -->\r\n <ng-template #nameTpl let-row>\r\n <span class=\"font-semibold text-surface-900 dark:text-surface-0\">\r\n {{ getDashboardName(row) }}\r\n </span>\r\n </ng-template>\r\n\r\n <!-- Dashboard Table -->\r\n <mt-table\r\n [data]=\"dashboardList()\"\r\n [columns]=\"tableColumns()\"\r\n [actions]=\"tableActions()\"\r\n [rowActions]=\"rowActions()\"\r\n [loading]=\"isLoading()\"\r\n [showFilters]=\"true\"\r\n [generalSearch]=\"true\"\r\n dataKey=\"id\"\r\n storageKey=\"dashboard-list-table\"\r\n (cellChange)=\"onToggleChange($event)\"\r\n />\r\n </ng-template>\r\n</ng-container>\r\n" }]
48856
- }], propDecorators: { nameTpl: [{ type: i0.ViewChild, args: ['nameTpl', { isSignal: true }] }], isPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPage", required: false }] }], pageTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageTitle", required: false }] }], baseRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseRoute", required: false }] }], showCreateButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCreateButton", required: false }] }], showViewButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showViewButton", required: false }] }], showEditButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showEditButton", required: false }] }], dashboardAction: [{ type: i0.Output, args: ["dashboardAction"] }], dashboardCreated: [{ type: i0.Output, args: ["dashboardCreated"] }] } });
48917
+ args: [{ selector: 'mt-dashboard-list', standalone: true, imports: [CommonModule, TranslocoDirective, Table, Page], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder.dashboard'\">\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"pageTitle() || t('dashboards')\"\r\n [avatarIcon]=\"'chart.bar-chart-square-03'\"\r\n [avatarStyle]=\"{\r\n '--p-avatar-background': 'var(--p-cyan-100)',\r\n '--p-avatar-color': 'var(--p-cyan-700)',\r\n }\"\r\n >\r\n @if (headerEnd(); as hostActions) {\r\n <ng-template #headerEnd>\r\n <ng-container *ngTemplateOutlet=\"hostActions\" />\r\n </ng-template>\r\n }\r\n <!-- Content -->\r\n <ng-container *ngTemplateOutlet=\"tableContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <div class=\"dashboard-list space-y-3\">\r\n <!-- Header -->\r\n <h2 class=\"text-2xl font-semibold text-surface-900 dark:text-surface-0\">\r\n {{ t(\"dashboards\") }}\r\n </h2>\r\n\r\n <!-- Content -->\r\n <ng-container *ngTemplateOutlet=\"tableContent\" />\r\n </div>\r\n }\r\n\r\n <!-- Reusable table content template -->\r\n <ng-template #tableContent>\r\n <!-- Custom cell templates -->\r\n <ng-template #nameTpl let-row>\r\n <span class=\"font-semibold text-surface-900 dark:text-surface-0\">\r\n {{ getDashboardName(row) }}\r\n </span>\r\n </ng-template>\r\n\r\n <!-- Dashboard Table -->\r\n <mt-table\r\n [data]=\"dashboardList()\"\r\n [columns]=\"tableColumns()\"\r\n [actions]=\"tableActions()\"\r\n [rowActions]=\"rowActions()\"\r\n [loading]=\"isLoading()\"\r\n [showFilters]=\"true\"\r\n [generalSearch]=\"true\"\r\n dataKey=\"id\"\r\n storageKey=\"dashboard-list-table\"\r\n (cellChange)=\"onToggleChange($event)\"\r\n />\r\n </ng-template>\r\n</ng-container>\r\n" }]
48918
+ }], propDecorators: { nameTpl: [{ type: i0.ViewChild, args: ['nameTpl', { isSignal: true }] }], headerEnd: [{ type: i0.ContentChild, args: ['headerEnd', { isSignal: true }] }], isPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPage", required: false }] }], pageTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageTitle", required: false }] }], baseRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseRoute", required: false }] }], showCreateButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCreateButton", required: false }] }], showViewButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showViewButton", required: false }] }], showEditButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showEditButton", required: false }] }], dashboardAction: [{ type: i0.Output, args: ["dashboardAction"] }], dashboardCreated: [{ type: i0.Output, args: ["dashboardCreated"] }] } });
48857
48919
 
48858
48920
  /**
48859
48921
  * Dashboard List Module Index
@@ -51868,4 +51930,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
51868
51930
  */
51869
51931
 
51870
51932
  export { observeNearViewport as $, mergePropertyAppearance as A, EntityPreviewCardComponent as B, CardContentComponent as C, DashboardItemStoreService as D, EChartComponent as E, FilterUtilsService as F, ListStatisticCardComponent as G, HeaderCardComponent as H, MAP_FALLBACK_COLORS as I, isPlottable as J, plottableGroups as K, LastHistoryLevelCardComponent as L, MAP_MARKER_PATH as M, buildMapChartOption as N, MAP_REGIONS as O, PropertiesCardComponent as P, DEFAULT_MAP_REGION_KEY as Q, MAP_DATA_ATTRIBUTION as R, StaticFiltersComponent as S, resolveMapRegion as T, MapViewComponent as U, SkeletonCardComponent as V, resolveStatisticIconPlacement as W, StatisticCardComponent as X, TableCardComponent as Y, TopbarCardComponent as Z, ChartDataService as _, DashboardItem as a, ColorListField as a$, loadImmediately as a0, DASHBOARD_ITEM_VISIBILITY as a1, BarChartHandler as a2, PieChartHandler as a3, StackBarChartHandler as a4, axisFormatters as a5, groupDatesByYearAndMonth as a6, GaugeChartHandler as a7, TableViewHandler as a8, OverviewCardHandler as a9, isLogClassification as aA, HTTPMethod as aB, DashboardBuilderService as aC, DashboardStoreService as aD, isManagePagesDeleteResult as aE, ManagePages as aF, ManageBreadcrumb as aG, ManageFilterOnPage as aH, DynamicFiltersConfig as aI, ChartSettingsDrawer as aJ, DisplaySettings as aK, DefaultControlUi as aL, PieControlUi as aM, BarControlUi as aN, StackBarControlUi as aO, ManageItem as aP, CHART_TYPES as aQ, ManageItemService as aR, GeneralSettings as aS, DataSourceSettings as aT, ActionsSettings as aU, ChartViewer as aV, StyleStudioDrawer as aW, StyleSettingsRenderer as aX, expandResetPatches as aY, StyleField as aZ, SegmentedField as a_, TimelineHandler as aa, LineChartHandler as ab, SnapshotHandler as ac, ComparisonChartHandler as ad, SplitterChartHandler as ae, LevelCardHandler as af, MapChartHandler as ag, RingGaugeChartHandler as ah, SPlusChartHandler as ai, PhaseGateStepperHandler as aj, formatCurrency as ak, getCurrencySuffix as al, formatPercentage as am, formatNumber as an, formatDate as ao, createAxisFormatter as ap, createTooltipFormatter as aq, formatAxisLabel as ar, formatWordsUnderBar as as, formatXAxis as at, handleFiltersForCustom as au, handleFilterForCard as av, handleFilterForSnapshot as aw, DashboardList as ax, MODULE_CLASSIFICATION_LOG as ay, MODULE_CLASSIFICATION_LOG_NAME as az, DashboardDialogHeader as b, applyControlPatchesToPersisted as b$, ArrayBuilderField as b0, KeyValueMapField as b1, LegendOrderField as b2, ItemCardMenuComponent as b3, ChartFilterDrawer as b4, ItemContextToolbarComponent as b5, ItemConfigPopoverComponent as b6, GuidedConfigDialogComponent as b7, FilterChipsBarComponent as b8, FilterBuilderComponent as b9, datasourceToUi as bA, fieldsToUi as bB, filtersToUi as bC, styleToUi as bD, applyStyleToPersisted as bE, layoutToUi as bF, applyLayoutToPersisted as bG, labelLegendFormatToUi as bH, applyLabelLegendFormatToPersisted as bI, behaviorToUi as bJ, applyBehaviorToPersisted as bK, applyFilterChipsToPersisted as bL, persistedToUi as bM, buildAssembly as bN, STYLE_PRESETS as bO, presetsForCapability as bP, findPreset as bQ, validate as bR, hasBlockingIssues as bS, groupIssuesByDomain as bT, parseAdvancedJson as bU, deepMerge$1 as bV, formatForEditor as bW, CUSTOM_COLOR_OPTION as bX, readByPath$1 as bY, setByPath as bZ, applyControlPatchToPersisted as b_, DatasourcePanelComponent as ba, SchemaControlRendererComponent as bb, FilterByGroupPipe as bc, GetChartActionsPipe as bd, CHART_CAPABILITIES as be, getCapabilityById as bf, resolveCapability as bg, toBackendChartType as bh, normalizeChartTypeForRequest as bi, normalizeFilterOperation as bj, normalizeAggregateFunction as bk, normalizeFilters as bl, selectorFromLegacy as bm, moduleIdFromSelector as bn, toBackendSourceLink as bo, toFormSourceLink as bp, normalizeOnLoad as bq, normalizeBeforeSave as br, normalizeBeforeRequest as bs, CONFIG_DOMAINS as bt, domainsForCapability as bu, findDomain as bv, POPOVER_TABS as bw, POPOVER_TAB_SPECS as bx, titleToUi as by, applyTitleToPersisted as bz, cloneDeep$1 as c, getControlSchema as c0, listControlSchemaIds as c1, listControlSchemas as c2, getFallbackControlSchema as c3, flattenSchema as c4, resolveDisplayFields as c5, buildDisplayFieldPredicate as c6, bindingKey as c7, getBinding as c8, listBindings as c9, listBindingsForChart as ca, readBoundValue as cb, ITEM_GUIDANCE_REGISTRY as cc, describeGuidance as cd, ItemGuidanceService as ce, 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 };
51871
- //# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-DfAo6fUq.mjs.map
51933
+ //# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-CodhML2K.mjs.map