@masterteam/dashboard-builder 0.0.83 → 0.0.84
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 +5 -3
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-BjQF7eiP.mjs → masterteam-dashboard-builder-dashboard-dialog.component-BUztpCFu.mjs} +2 -2
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-BjQF7eiP.mjs.map → masterteam-dashboard-builder-dashboard-dialog.component-BUztpCFu.mjs.map} +1 -1
- package/fesm2022/{masterteam-dashboard-builder-masterteam-dashboard-builder-CotqczE9.mjs → masterteam-dashboard-builder-masterteam-dashboard-builder-YD5LrCCJ.mjs} +30 -10
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-YD5LrCCJ.mjs.map +1 -0
- package/fesm2022/masterteam-dashboard-builder.mjs +1 -1
- package/package.json +3 -3
- package/types/masterteam-dashboard-builder.d.ts +2 -0
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-CotqczE9.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -391,9 +391,11 @@ both under `parentFilter` and as flat keys. This keeps current
|
|
|
391
391
|
- Removing a persisted chart group unlinks its saved group container before
|
|
392
392
|
clearing the local group metadata. Its child charts remain on the dashboard
|
|
393
393
|
and the deleted empty group cannot return after Save and reload.
|
|
394
|
-
- Style Studio
|
|
395
|
-
|
|
396
|
-
|
|
394
|
+
- Style Studio resolves Header and Topbar widgets without a `chartTypeId`
|
|
395
|
+
through their registered `clientConfig.componentName`. This selects their
|
|
396
|
+
layout-specific controls (without chart legend, label, palette, or number
|
|
397
|
+
formatting options) and previews draft styles before Apply. Cancel continues
|
|
398
|
+
to discard the working draft.
|
|
397
399
|
- Style Studio preview/runtime parity includes Header and Topbar icon placement,
|
|
398
400
|
bar and stacked-bar widths,
|
|
399
401
|
configured number precision and explicit currency visibility, pie legend
|
|
@@ -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-
|
|
7
|
+
import { D as DashboardItemStoreService, F as FilterUtilsService, a as DashboardItem, r as resolveDashboardDialogHeader, b as DashboardDialogHeader } from './masterteam-dashboard-builder-masterteam-dashboard-builder-YD5LrCCJ.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-
|
|
132
|
+
//# sourceMappingURL=masterteam-dashboard-builder-dashboard-dialog.component-BUztpCFu.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masterteam-dashboard-builder-dashboard-dialog.component-BjQF7eiP.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: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,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
|
+
{"version":3,"file":"masterteam-dashboard-builder-dashboard-dialog.component-BUztpCFu.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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
|
23561
23561
|
// "Dialog header"), not from the chart that opened it.
|
|
23562
23562
|
const header = resolveDashboardDialogHeader(dialogConfig);
|
|
23563
23563
|
// Dynamically import DashboardDialogComponent to avoid circular dependency
|
|
23564
|
-
import('./masterteam-dashboard-builder-dashboard-dialog.component-
|
|
23564
|
+
import('./masterteam-dashboard-builder-dashboard-dialog.component-BUztpCFu.mjs').then(({ DashboardDialogComponent }) => {
|
|
23565
23565
|
// Open dialog using ModalService
|
|
23566
23566
|
this.modalService.openModal(DashboardDialogComponent, 'dialog', {
|
|
23567
23567
|
header: header.title,
|
|
@@ -34266,10 +34266,19 @@ class StyleStudioDrawer {
|
|
|
34266
34266
|
const i = this.item();
|
|
34267
34267
|
if (!i?.config)
|
|
34268
34268
|
return null;
|
|
34269
|
+
const chartTypeId = String(i.chartTypeId ?? '').trim();
|
|
34270
|
+
const componentName = String(i.config.clientConfig?.componentName ?? '').trim();
|
|
34271
|
+
const layoutTypeId = componentName === 'header' || componentName === 'topbar'
|
|
34272
|
+
? componentName
|
|
34273
|
+
: null;
|
|
34269
34274
|
return resolveCapability({
|
|
34270
|
-
|
|
34275
|
+
// Layout widgets are added directly to the canvas and legacy/saved
|
|
34276
|
+
// records may not carry chartTypeId or the complete service/function
|
|
34277
|
+
// tuple. Their registered component name is still a stable identity and
|
|
34278
|
+
// must select the layout schema instead of the generic chart fallback.
|
|
34279
|
+
chartTypeId: chartTypeId || layoutTypeId,
|
|
34271
34280
|
serviceType: i.config.serviceConfig?.chartType ?? null,
|
|
34272
|
-
componentName:
|
|
34281
|
+
componentName: componentName || null,
|
|
34273
34282
|
functionName: i.config.clientConfig?.functionName ?? null,
|
|
34274
34283
|
});
|
|
34275
34284
|
}, ...(ngDevMode ? [{ debugName: "capability" }] : /* istanbul ignore next */ []));
|
|
@@ -35843,7 +35852,7 @@ class LegacyDashboardFormulaBuilder {
|
|
|
35843
35852
|
useExisting: forwardRef(() => LegacyDashboardFormulaBuilder),
|
|
35844
35853
|
multi: true,
|
|
35845
35854
|
},
|
|
35846
|
-
], viewQueries: [{ propertyName: "editor", first: true, predicate: ["formulaEditor"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"overflow-hidden rounded-lg border border-surface-200 bg-surface-0 dark:border-surface-700 dark:bg-surface-800\"\n [class.pointer-events-none]=\"disabled()\"\n [class.opacity-60]=\"disabled()\"\n>\n <mt-formula-toolbar\n [functionCategories]=\"functionCategories\"\n [operators]=\"operators\"\n [knownProperties]=\"properties()\"\n (onBlockInsert)=\"onBlockInsert($event)\"\n />\n\n <div class=\"border-t border-surface-200 dark:border-surface-700\">\n <mt-formula-editor\n #formulaEditor\n [initialTokens]=\"tokens()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [borderless]=\"true\"\n (formulaChange)=\"onFormulaChange($event)\"\n (tokensChange)=\"onTokensChange($event)\"\n (onBlur)=\"markTouched()\"\n />\n </div>\n</div>\n", dependencies: [{ kind: "component", type: FormulaToolbar, selector: "mt-formula-toolbar", inputs: ["knownProperties", "propertiesTemplate", "functionCategories", "operators", "initialTab", "visibleTabs", "searchPlaceholder", "labels"], outputs: ["onBlockInsert", "onTabChange"] }, { kind: "component", type: FormulaEditor, selector: "mt-formula-editor", inputs: ["placeholder", "initialTokens", "disabled", "borderless"], outputs: ["formulaChange", "tokensChange", "onBlur", "onFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
35855
|
+
], viewQueries: [{ propertyName: "editor", first: true, predicate: ["formulaEditor"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\r\n class=\"overflow-hidden rounded-lg border border-surface-200 bg-surface-0 dark:border-surface-700 dark:bg-surface-800\"\r\n [class.pointer-events-none]=\"disabled()\"\r\n [class.opacity-60]=\"disabled()\"\r\n>\r\n <mt-formula-toolbar\r\n [functionCategories]=\"functionCategories\"\r\n [operators]=\"operators\"\r\n [knownProperties]=\"properties()\"\r\n (onBlockInsert)=\"onBlockInsert($event)\"\r\n />\r\n\r\n <div class=\"border-t border-surface-200 dark:border-surface-700\">\r\n <mt-formula-editor\r\n #formulaEditor\r\n [initialTokens]=\"tokens()\"\r\n [placeholder]=\"placeholder()\"\r\n [disabled]=\"disabled()\"\r\n [borderless]=\"true\"\r\n (formulaChange)=\"onFormulaChange($event)\"\r\n (tokensChange)=\"onTokensChange($event)\"\r\n (onBlur)=\"markTouched()\"\r\n />\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "component", type: FormulaToolbar, selector: "mt-formula-toolbar", inputs: ["knownProperties", "propertiesTemplate", "functionCategories", "operators", "initialTab", "visibleTabs", "searchPlaceholder", "labels"], outputs: ["onBlockInsert", "onTabChange"] }, { kind: "component", type: FormulaEditor, selector: "mt-formula-editor", inputs: ["placeholder", "initialTokens", "disabled", "borderless"], outputs: ["formulaChange", "tokensChange", "onBlur", "onFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
35847
35856
|
}
|
|
35848
35857
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LegacyDashboardFormulaBuilder, decorators: [{
|
|
35849
35858
|
type: Component,
|
|
@@ -35853,7 +35862,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
35853
35862
|
useExisting: forwardRef(() => LegacyDashboardFormulaBuilder),
|
|
35854
35863
|
multi: true,
|
|
35855
35864
|
},
|
|
35856
|
-
], template: "<div\n class=\"overflow-hidden rounded-lg border border-surface-200 bg-surface-0 dark:border-surface-700 dark:bg-surface-800\"\n [class.pointer-events-none]=\"disabled()\"\n [class.opacity-60]=\"disabled()\"\n>\n <mt-formula-toolbar\n [functionCategories]=\"functionCategories\"\n [operators]=\"operators\"\n [knownProperties]=\"properties()\"\n (onBlockInsert)=\"onBlockInsert($event)\"\n />\n\n <div class=\"border-t border-surface-200 dark:border-surface-700\">\n <mt-formula-editor\n #formulaEditor\n [initialTokens]=\"tokens()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [borderless]=\"true\"\n (formulaChange)=\"onFormulaChange($event)\"\n (tokensChange)=\"onTokensChange($event)\"\n (onBlur)=\"markTouched()\"\n />\n </div>\n</div>\n" }]
|
|
35865
|
+
], template: "<div\r\n class=\"overflow-hidden rounded-lg border border-surface-200 bg-surface-0 dark:border-surface-700 dark:bg-surface-800\"\r\n [class.pointer-events-none]=\"disabled()\"\r\n [class.opacity-60]=\"disabled()\"\r\n>\r\n <mt-formula-toolbar\r\n [functionCategories]=\"functionCategories\"\r\n [operators]=\"operators\"\r\n [knownProperties]=\"properties()\"\r\n (onBlockInsert)=\"onBlockInsert($event)\"\r\n />\r\n\r\n <div class=\"border-t border-surface-200 dark:border-surface-700\">\r\n <mt-formula-editor\r\n #formulaEditor\r\n [initialTokens]=\"tokens()\"\r\n [placeholder]=\"placeholder()\"\r\n [disabled]=\"disabled()\"\r\n [borderless]=\"true\"\r\n (formulaChange)=\"onFormulaChange($event)\"\r\n (tokensChange)=\"onTokensChange($event)\"\r\n (onBlur)=\"markTouched()\"\r\n />\r\n </div>\r\n</div>\r\n" }]
|
|
35857
35866
|
}], ctorParameters: () => [], propDecorators: { editor: [{ type: i0.ViewChild, args: ['formulaEditor', { isSignal: true }] }], properties: [{ type: i0.Input, args: [{ isSignal: true, alias: "properties", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }] } });
|
|
35858
35867
|
|
|
35859
35868
|
/**
|
|
@@ -36274,7 +36283,7 @@ class GeneralQuery {
|
|
|
36274
36283
|
useExisting: forwardRef(() => GeneralQuery),
|
|
36275
36284
|
multi: true,
|
|
36276
36285
|
},
|
|
36277
|
-
], ngImport: i0, template: "<div\n class=\"flex flex-col gap-4\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n [formGroup]=\"queryForm\"\n>\n <!-- Category Property (shown for certain chart types) -->\n @if (shouldShowField(\"categoryProperty\")) {\n <div class=\"mb-2\">\n <mt-select-field\n [label]=\"t('categoryProperty')\"\n formControlName=\"categoryProperty\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectCategoryProperty')\"\n [filter]=\"true\"\n />\n </div>\n }\n\n <!-- Add Series Button -->\n @if (chartType() !== \"overview\" || seriesArray.length === 0) {\n <div class=\"flex justify-end\">\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addSeries')\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addSeries()\"\n />\n </div>\n }\n\n <!-- Series List -->\n <div formArrayName=\"series\" class=\"flex flex-col gap-4\">\n @for (\n series of seriesArray.controls;\n track trackByIndex(i);\n let i = $index\n ) {\n <div\n class=\"p-4 rounded-lg border transition-all\"\n [class.border-red-500]=\"series.invalid\"\n [class.border-surface-200]=\"!series.invalid\"\n [formGroupName]=\"i\"\n >\n <!-- Series Header -->\n <div class=\"flex items-center justify-between mb-4\">\n <div class=\"flex items-center gap-2\">\n <span\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-600 text-sm font-semibold\"\n >\n {{ i + 1 }}\n </span>\n <span class=\"text-sm font-medium text-muted-color\">{{\n t(\"series\")\n }}</span>\n </div>\n <div class=\"flex items-center gap-2\">\n @if (shouldShowField(\"formula\")) {\n <button\n type=\"button\"\n class=\"inline-flex min-h-8 items-center justify-center gap-1.5 rounded-md border border-surface-300 bg-surface-0 px-3 py-1.5 text-sm font-medium text-color transition-colors hover:border-primary-400 hover:bg-primary-50 hover:text-primary-700 disabled:cursor-not-allowed disabled:opacity-50\"\n [id]=\"advancedSettingsToggleId(i)\"\n [attr.aria-expanded]=\"\n series.value.showAdvancedSettings ? 'true' : 'false'\n \"\n [attr.aria-controls]=\"advancedSettingsPanelId(i)\"\n [disabled]=\"disabled\"\n (click)=\"toggleAdvanced(i)\"\n >\n <mt-icon\n icon=\"general.settings-02\"\n class=\"text-base\"\n aria-hidden=\"true\"\n />\n <span>\n {{\n t(\n advancedSettingsActionKey(\n series.value.showAdvancedSettings\n )\n )\n }}\n </span>\n </button>\n }\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n [rounded]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"deleteSeries(i)\"\n />\n </div>\n </div>\n\n <div class=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4\">\n <!-- Auto Stack Toggle -->\n @if (shouldShowField(\"autoStack\")) {\n <div class=\"md:col-span-2 lg:col-span-3\">\n <mt-toggle-field\n [label]=\"t('autoStack')\"\n formControlName=\"autoStack\"\n />\n </div>\n }\n\n <!-- Value Property -->\n @if (shouldShowField(\"valueProperty\") || series.value.autoStack) {\n <mt-select-field\n [label]=\"t('valueProperty')\"\n formControlName=\"valueProperty\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectValueProperty')\"\n [filter]=\"true\"\n />\n }\n\n <!-- Aggregate Function -->\n @if (shouldShowField(\"aggregateFunction\")) {\n <mt-select-field\n [label]=\"t('aggregateFunction')\"\n formControlName=\"aggregateFunction\"\n [options]=\"aggregateFunctions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n />\n }\n\n <!-- Color Picker -->\n @if (shouldShowField(\"color\")) {\n <mt-color-picker-field\n [label]=\"t('seriesColor')\"\n formControlName=\"color\"\n />\n }\n\n <!-- Bar Type (for stacked bar charts) -->\n @if (shouldShowField(\"barType\")) {\n <mt-select-field\n [label]=\"t('barType')\"\n formControlName=\"barType\"\n [options]=\"barTypes\"\n optionLabel=\"name\"\n optionValue=\"key\"\n />\n }\n\n <!-- Auto Stack By Property -->\n @if (\n shouldShowField(\"autoStackByProperty\") && series.value.autoStack\n ) {\n <mt-select-field\n [label]=\"t('autoStackByProperty')\"\n formControlName=\"autoStackByProperty\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n }\n\n <!-- Group By Properties -->\n @if (shouldShowField(\"groupByProperties\")) {\n <div class=\"col-span-full\">\n <mt-string-array-input\n [label]=\"t('groupByProperties')\"\n formControlName=\"groupByProperties\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n [placeholder]=\"t('selectProperties')\"\n />\n </div>\n }\n\n <!-- Stack Properties (for stacked charts) -->\n @if (shouldShowField(\"stackProperties\") && !series.value.autoStack) {\n <div class=\"col-span-full\">\n <mt-string-array-input\n [label]=\"t('stackProperties')\"\n formControlName=\"stackProperties\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n [placeholder]=\"t('selectProperties')\"\n />\n </div>\n }\n\n <!-- Extra Properties -->\n @if (shouldShowField(\"extraProperties\")) {\n <div class=\"col-span-full\">\n <mt-string-array-input\n [label]=\"t('extraProperties')\"\n formControlName=\"extraProperties\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n [placeholder]=\"t('selectProperties')\"\n />\n </div>\n }\n </div>\n\n <!-- Advanced Settings (Formula) -->\n @if (series.value.showAdvancedSettings && shouldShowField(\"formula\")) {\n <div\n [id]=\"advancedSettingsPanelId(i)\"\n role=\"region\"\n [attr.aria-labelledby]=\"advancedSettingsToggleId(i)\"\n class=\"mt-4 p-3 bg-surface-50 rounded-lg border border-surface-200\"\n >\n <div class=\"text-sm font-medium mb-2\">\n {{ t(\"advancedSettings\") }}\n </div>\n <label class=\"mb-2 block text-sm font-medium\">\n {{ t(\"formula\") }}\n </label>\n <mt-dashboard-formula-builder\n formControlName=\"formula\"\n [properties]=\"formulaProperties()\"\n [placeholder]=\"t('enterFormula')\"\n />\n </div>\n }\n\n <!-- Filters Section -->\n @if (shouldShowField(\"filters\")) {\n <div class=\"mt-4 border border-surface-200 rounded-lg p-4\">\n <div class=\"flex items-center justify-between mb-3\">\n <span class=\"text-sm font-medium\">{{ t(\"seriesFilters\") }}</span>\n <mt-button\n icon=\"general.plus\"\n severity=\"secondary\"\n [rounded]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addFilter(i)\"\n [pTooltip]=\"t('addFilter')\"\n />\n </div>\n\n <div class=\"flex flex-col gap-3\" formArrayName=\"filters\">\n @for (\n filter of getFilters(series).controls;\n track trackByIndex(j);\n let j = $index\n ) {\n <div\n class=\"grid grid-cols-12 gap-2 p-3 bg-surface-50 rounded-lg border border-surface-100\"\n [formGroupName]=\"j\"\n >\n <!-- Property Key -->\n <div class=\"col-span-4\">\n <mt-select-field\n [label]=\"j === 0 ? t('property') : ''\"\n formControlName=\"propertyKey\"\n [options]=\"\n useGroupedSelect()\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n </div>\n\n <!-- Operator -->\n <div class=\"col-span-2\">\n <mt-select-field\n [label]=\"j === 0 ? t('operator') : ''\"\n formControlName=\"operator\"\n [options]=\"operators\"\n optionLabel=\"label\"\n optionValue=\"value\"\n />\n </div>\n\n <!-- Value -->\n <div class=\"col-span-4\">\n <mt-text-field\n [label]=\"j === 0 ? t('value') : ''\"\n formControlName=\"value\"\n [placeholder]=\"t('enterValue')\"\n />\n </div>\n\n <!-- Remove Filter -->\n <div class=\"col-span-2 flex items-end justify-end pb-1\">\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n [rounded]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"removeFilter(i, j)\"\n />\n </div>\n </div>\n }\n\n @if (getFilters(series).length === 0) {\n <div class=\"text-center py-3 text-muted-color text-sm\">\n {{ t(\"noFiltersConfigured\") }}\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n\n @if (seriesArray.length === 0) {\n <div\n class=\"text-center py-8 text-muted-color border border-dashed border-surface-300 rounded-lg\"\n >\n <i class=\"mti mti-chart-bar text-3xl mb-2 block\"></i>\n <p class=\"mb-2\">{{ t(\"noSeriesConfigured\") }}</p>\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addSeries')\"\n severity=\"secondary\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addSeries()\"\n />\n </div>\n }\n </div>\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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], 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: LegacyDashboardFormulaBuilder, selector: "mt-dashboard-formula-builder", inputs: ["properties", "placeholder"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: StringArrayInput, selector: "mt-string-array-input", inputs: ["label", "placeholder", "options", "group", "optionLabel", "optionValue", "optionGroupLabel", "optionGroupChildren", "filter", "emptyHint"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
36286
|
+
], ngImport: i0, template: "<div\r\n class=\"flex flex-col gap-4\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n [formGroup]=\"queryForm\"\r\n>\r\n <!-- Category Property (shown for certain chart types) -->\r\n @if (shouldShowField(\"categoryProperty\")) {\r\n <div class=\"mb-2\">\r\n <mt-select-field\r\n [label]=\"t('categoryProperty')\"\r\n formControlName=\"categoryProperty\"\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 [placeholder]=\"t('selectCategoryProperty')\"\r\n [filter]=\"true\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Add Series Button -->\r\n @if (chartType() !== \"overview\" || seriesArray.length === 0) {\r\n <div class=\"flex justify-end\">\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addSeries')\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addSeries()\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Series List -->\r\n <div formArrayName=\"series\" class=\"flex flex-col gap-4\">\r\n @for (\r\n series of seriesArray.controls;\r\n track trackByIndex(i);\r\n let i = $index\r\n ) {\r\n <div\r\n class=\"p-4 rounded-lg border transition-all\"\r\n [class.border-red-500]=\"series.invalid\"\r\n [class.border-surface-200]=\"!series.invalid\"\r\n [formGroupName]=\"i\"\r\n >\r\n <!-- Series Header -->\r\n <div class=\"flex items-center justify-between mb-4\">\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-600 text-sm font-semibold\"\r\n >\r\n {{ i + 1 }}\r\n </span>\r\n <span class=\"text-sm font-medium text-muted-color\">{{\r\n t(\"series\")\r\n }}</span>\r\n </div>\r\n <div class=\"flex items-center gap-2\">\r\n @if (shouldShowField(\"formula\")) {\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex min-h-8 items-center justify-center gap-1.5 rounded-md border border-surface-300 bg-surface-0 px-3 py-1.5 text-sm font-medium text-color transition-colors hover:border-primary-400 hover:bg-primary-50 hover:text-primary-700 disabled:cursor-not-allowed disabled:opacity-50\"\r\n [id]=\"advancedSettingsToggleId(i)\"\r\n [attr.aria-expanded]=\"\r\n series.value.showAdvancedSettings ? 'true' : 'false'\r\n \"\r\n [attr.aria-controls]=\"advancedSettingsPanelId(i)\"\r\n [disabled]=\"disabled\"\r\n (click)=\"toggleAdvanced(i)\"\r\n >\r\n <mt-icon\r\n icon=\"general.settings-02\"\r\n class=\"text-base\"\r\n aria-hidden=\"true\"\r\n />\r\n <span>\r\n {{\r\n t(\r\n advancedSettingsActionKey(\r\n series.value.showAdvancedSettings\r\n )\r\n )\r\n }}\r\n </span>\r\n </button>\r\n }\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"deleteSeries(i)\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4\">\r\n <!-- Auto Stack Toggle -->\r\n @if (shouldShowField(\"autoStack\")) {\r\n <div class=\"md:col-span-2 lg:col-span-3\">\r\n <mt-toggle-field\r\n [label]=\"t('autoStack')\"\r\n formControlName=\"autoStack\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Value Property -->\r\n @if (shouldShowField(\"valueProperty\") || series.value.autoStack) {\r\n <mt-select-field\r\n [label]=\"t('valueProperty')\"\r\n formControlName=\"valueProperty\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectValueProperty')\"\r\n [filter]=\"true\"\r\n />\r\n }\r\n\r\n <!-- Aggregate Function -->\r\n @if (shouldShowField(\"aggregateFunction\")) {\r\n <mt-select-field\r\n [label]=\"t('aggregateFunction')\"\r\n formControlName=\"aggregateFunction\"\r\n [options]=\"aggregateFunctions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n }\r\n\r\n <!-- Color Picker -->\r\n @if (shouldShowField(\"color\")) {\r\n <mt-color-picker-field\r\n [label]=\"t('seriesColor')\"\r\n formControlName=\"color\"\r\n />\r\n }\r\n\r\n <!-- Bar Type (for stacked bar charts) -->\r\n @if (shouldShowField(\"barType\")) {\r\n <mt-select-field\r\n [label]=\"t('barType')\"\r\n formControlName=\"barType\"\r\n [options]=\"barTypes\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n />\r\n }\r\n\r\n <!-- Auto Stack By Property -->\r\n @if (\r\n shouldShowField(\"autoStackByProperty\") && series.value.autoStack\r\n ) {\r\n <mt-select-field\r\n [label]=\"t('autoStackByProperty')\"\r\n formControlName=\"autoStackByProperty\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n }\r\n\r\n <!-- Group By Properties -->\r\n @if (shouldShowField(\"groupByProperties\")) {\r\n <div class=\"col-span-full\">\r\n <mt-string-array-input\r\n [label]=\"t('groupByProperties')\"\r\n formControlName=\"groupByProperties\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n [placeholder]=\"t('selectProperties')\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Stack Properties (for stacked charts) -->\r\n @if (shouldShowField(\"stackProperties\") && !series.value.autoStack) {\r\n <div class=\"col-span-full\">\r\n <mt-string-array-input\r\n [label]=\"t('stackProperties')\"\r\n formControlName=\"stackProperties\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n [placeholder]=\"t('selectProperties')\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Extra Properties -->\r\n @if (shouldShowField(\"extraProperties\")) {\r\n <div class=\"col-span-full\">\r\n <mt-string-array-input\r\n [label]=\"t('extraProperties')\"\r\n formControlName=\"extraProperties\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n [placeholder]=\"t('selectProperties')\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Advanced Settings (Formula) -->\r\n @if (series.value.showAdvancedSettings && shouldShowField(\"formula\")) {\r\n <div\r\n [id]=\"advancedSettingsPanelId(i)\"\r\n role=\"region\"\r\n [attr.aria-labelledby]=\"advancedSettingsToggleId(i)\"\r\n class=\"mt-4 p-3 bg-surface-50 rounded-lg border border-surface-200\"\r\n >\r\n <div class=\"text-sm font-medium mb-2\">\r\n {{ t(\"advancedSettings\") }}\r\n </div>\r\n <label class=\"mb-2 block text-sm font-medium\">\r\n {{ t(\"formula\") }}\r\n </label>\r\n <mt-dashboard-formula-builder\r\n formControlName=\"formula\"\r\n [properties]=\"formulaProperties()\"\r\n [placeholder]=\"t('enterFormula')\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Filters Section -->\r\n @if (shouldShowField(\"filters\")) {\r\n <div class=\"mt-4 border border-surface-200 rounded-lg p-4\">\r\n <div class=\"flex items-center justify-between mb-3\">\r\n <span class=\"text-sm font-medium\">{{ t(\"seriesFilters\") }}</span>\r\n <mt-button\r\n icon=\"general.plus\"\r\n severity=\"secondary\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addFilter(i)\"\r\n [pTooltip]=\"t('addFilter')\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-col gap-3\" formArrayName=\"filters\">\r\n @for (\r\n filter of getFilters(series).controls;\r\n track trackByIndex(j);\r\n let j = $index\r\n ) {\r\n <div\r\n class=\"grid grid-cols-12 gap-2 p-3 bg-surface-50 rounded-lg border border-surface-100\"\r\n [formGroupName]=\"j\"\r\n >\r\n <!-- Property Key -->\r\n <div class=\"col-span-4\">\r\n <mt-select-field\r\n [label]=\"j === 0 ? t('property') : ''\"\r\n formControlName=\"propertyKey\"\r\n [options]=\"\r\n useGroupedSelect()\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n </div>\r\n\r\n <!-- Operator -->\r\n <div class=\"col-span-2\">\r\n <mt-select-field\r\n [label]=\"j === 0 ? t('operator') : ''\"\r\n formControlName=\"operator\"\r\n [options]=\"operators\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n </div>\r\n\r\n <!-- Value -->\r\n <div class=\"col-span-4\">\r\n <mt-text-field\r\n [label]=\"j === 0 ? t('value') : ''\"\r\n formControlName=\"value\"\r\n [placeholder]=\"t('enterValue')\"\r\n />\r\n </div>\r\n\r\n <!-- Remove Filter -->\r\n <div class=\"col-span-2 flex items-end justify-end pb-1\">\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"removeFilter(i, j)\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (getFilters(series).length === 0) {\r\n <div class=\"text-center py-3 text-muted-color text-sm\">\r\n {{ t(\"noFiltersConfigured\") }}\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n @if (seriesArray.length === 0) {\r\n <div\r\n class=\"text-center py-8 text-muted-color border border-dashed border-surface-300 rounded-lg\"\r\n >\r\n <i class=\"mti mti-chart-bar text-3xl mb-2 block\"></i>\r\n <p class=\"mb-2\">{{ t(\"noSeriesConfigured\") }}</p>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addSeries')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addSeries()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], 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: LegacyDashboardFormulaBuilder, selector: "mt-dashboard-formula-builder", inputs: ["properties", "placeholder"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: StringArrayInput, selector: "mt-string-array-input", inputs: ["label", "placeholder", "options", "group", "optionLabel", "optionValue", "optionGroupLabel", "optionGroupChildren", "filter", "emptyHint"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
36278
36287
|
}
|
|
36279
36288
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GeneralQuery, decorators: [{
|
|
36280
36289
|
type: Component,
|
|
@@ -36303,7 +36312,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
36303
36312
|
useExisting: forwardRef(() => GeneralQuery),
|
|
36304
36313
|
multi: true,
|
|
36305
36314
|
},
|
|
36306
|
-
], template: "<div\n class=\"flex flex-col gap-4\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n [formGroup]=\"queryForm\"\n>\n <!-- Category Property (shown for certain chart types) -->\n @if (shouldShowField(\"categoryProperty\")) {\n <div class=\"mb-2\">\n <mt-select-field\n [label]=\"t('categoryProperty')\"\n formControlName=\"categoryProperty\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectCategoryProperty')\"\n [filter]=\"true\"\n />\n </div>\n }\n\n <!-- Add Series Button -->\n @if (chartType() !== \"overview\" || seriesArray.length === 0) {\n <div class=\"flex justify-end\">\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addSeries')\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addSeries()\"\n />\n </div>\n }\n\n <!-- Series List -->\n <div formArrayName=\"series\" class=\"flex flex-col gap-4\">\n @for (\n series of seriesArray.controls;\n track trackByIndex(i);\n let i = $index\n ) {\n <div\n class=\"p-4 rounded-lg border transition-all\"\n [class.border-red-500]=\"series.invalid\"\n [class.border-surface-200]=\"!series.invalid\"\n [formGroupName]=\"i\"\n >\n <!-- Series Header -->\n <div class=\"flex items-center justify-between mb-4\">\n <div class=\"flex items-center gap-2\">\n <span\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-600 text-sm font-semibold\"\n >\n {{ i + 1 }}\n </span>\n <span class=\"text-sm font-medium text-muted-color\">{{\n t(\"series\")\n }}</span>\n </div>\n <div class=\"flex items-center gap-2\">\n @if (shouldShowField(\"formula\")) {\n <button\n type=\"button\"\n class=\"inline-flex min-h-8 items-center justify-center gap-1.5 rounded-md border border-surface-300 bg-surface-0 px-3 py-1.5 text-sm font-medium text-color transition-colors hover:border-primary-400 hover:bg-primary-50 hover:text-primary-700 disabled:cursor-not-allowed disabled:opacity-50\"\n [id]=\"advancedSettingsToggleId(i)\"\n [attr.aria-expanded]=\"\n series.value.showAdvancedSettings ? 'true' : 'false'\n \"\n [attr.aria-controls]=\"advancedSettingsPanelId(i)\"\n [disabled]=\"disabled\"\n (click)=\"toggleAdvanced(i)\"\n >\n <mt-icon\n icon=\"general.settings-02\"\n class=\"text-base\"\n aria-hidden=\"true\"\n />\n <span>\n {{\n t(\n advancedSettingsActionKey(\n series.value.showAdvancedSettings\n )\n )\n }}\n </span>\n </button>\n }\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n [rounded]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"deleteSeries(i)\"\n />\n </div>\n </div>\n\n <div class=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4\">\n <!-- Auto Stack Toggle -->\n @if (shouldShowField(\"autoStack\")) {\n <div class=\"md:col-span-2 lg:col-span-3\">\n <mt-toggle-field\n [label]=\"t('autoStack')\"\n formControlName=\"autoStack\"\n />\n </div>\n }\n\n <!-- Value Property -->\n @if (shouldShowField(\"valueProperty\") || series.value.autoStack) {\n <mt-select-field\n [label]=\"t('valueProperty')\"\n formControlName=\"valueProperty\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectValueProperty')\"\n [filter]=\"true\"\n />\n }\n\n <!-- Aggregate Function -->\n @if (shouldShowField(\"aggregateFunction\")) {\n <mt-select-field\n [label]=\"t('aggregateFunction')\"\n formControlName=\"aggregateFunction\"\n [options]=\"aggregateFunctions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n />\n }\n\n <!-- Color Picker -->\n @if (shouldShowField(\"color\")) {\n <mt-color-picker-field\n [label]=\"t('seriesColor')\"\n formControlName=\"color\"\n />\n }\n\n <!-- Bar Type (for stacked bar charts) -->\n @if (shouldShowField(\"barType\")) {\n <mt-select-field\n [label]=\"t('barType')\"\n formControlName=\"barType\"\n [options]=\"barTypes\"\n optionLabel=\"name\"\n optionValue=\"key\"\n />\n }\n\n <!-- Auto Stack By Property -->\n @if (\n shouldShowField(\"autoStackByProperty\") && series.value.autoStack\n ) {\n <mt-select-field\n [label]=\"t('autoStackByProperty')\"\n formControlName=\"autoStackByProperty\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n }\n\n <!-- Group By Properties -->\n @if (shouldShowField(\"groupByProperties\")) {\n <div class=\"col-span-full\">\n <mt-string-array-input\n [label]=\"t('groupByProperties')\"\n formControlName=\"groupByProperties\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n [placeholder]=\"t('selectProperties')\"\n />\n </div>\n }\n\n <!-- Stack Properties (for stacked charts) -->\n @if (shouldShowField(\"stackProperties\") && !series.value.autoStack) {\n <div class=\"col-span-full\">\n <mt-string-array-input\n [label]=\"t('stackProperties')\"\n formControlName=\"stackProperties\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n [placeholder]=\"t('selectProperties')\"\n />\n </div>\n }\n\n <!-- Extra Properties -->\n @if (shouldShowField(\"extraProperties\")) {\n <div class=\"col-span-full\">\n <mt-string-array-input\n [label]=\"t('extraProperties')\"\n formControlName=\"extraProperties\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n [placeholder]=\"t('selectProperties')\"\n />\n </div>\n }\n </div>\n\n <!-- Advanced Settings (Formula) -->\n @if (series.value.showAdvancedSettings && shouldShowField(\"formula\")) {\n <div\n [id]=\"advancedSettingsPanelId(i)\"\n role=\"region\"\n [attr.aria-labelledby]=\"advancedSettingsToggleId(i)\"\n class=\"mt-4 p-3 bg-surface-50 rounded-lg border border-surface-200\"\n >\n <div class=\"text-sm font-medium mb-2\">\n {{ t(\"advancedSettings\") }}\n </div>\n <label class=\"mb-2 block text-sm font-medium\">\n {{ t(\"formula\") }}\n </label>\n <mt-dashboard-formula-builder\n formControlName=\"formula\"\n [properties]=\"formulaProperties()\"\n [placeholder]=\"t('enterFormula')\"\n />\n </div>\n }\n\n <!-- Filters Section -->\n @if (shouldShowField(\"filters\")) {\n <div class=\"mt-4 border border-surface-200 rounded-lg p-4\">\n <div class=\"flex items-center justify-between mb-3\">\n <span class=\"text-sm font-medium\">{{ t(\"seriesFilters\") }}</span>\n <mt-button\n icon=\"general.plus\"\n severity=\"secondary\"\n [rounded]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addFilter(i)\"\n [pTooltip]=\"t('addFilter')\"\n />\n </div>\n\n <div class=\"flex flex-col gap-3\" formArrayName=\"filters\">\n @for (\n filter of getFilters(series).controls;\n track trackByIndex(j);\n let j = $index\n ) {\n <div\n class=\"grid grid-cols-12 gap-2 p-3 bg-surface-50 rounded-lg border border-surface-100\"\n [formGroupName]=\"j\"\n >\n <!-- Property Key -->\n <div class=\"col-span-4\">\n <mt-select-field\n [label]=\"j === 0 ? t('property') : ''\"\n formControlName=\"propertyKey\"\n [options]=\"\n useGroupedSelect()\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n </div>\n\n <!-- Operator -->\n <div class=\"col-span-2\">\n <mt-select-field\n [label]=\"j === 0 ? t('operator') : ''\"\n formControlName=\"operator\"\n [options]=\"operators\"\n optionLabel=\"label\"\n optionValue=\"value\"\n />\n </div>\n\n <!-- Value -->\n <div class=\"col-span-4\">\n <mt-text-field\n [label]=\"j === 0 ? t('value') : ''\"\n formControlName=\"value\"\n [placeholder]=\"t('enterValue')\"\n />\n </div>\n\n <!-- Remove Filter -->\n <div class=\"col-span-2 flex items-end justify-end pb-1\">\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n [rounded]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"removeFilter(i, j)\"\n />\n </div>\n </div>\n }\n\n @if (getFilters(series).length === 0) {\n <div class=\"text-center py-3 text-muted-color text-sm\">\n {{ t(\"noFiltersConfigured\") }}\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n\n @if (seriesArray.length === 0) {\n <div\n class=\"text-center py-8 text-muted-color border border-dashed border-surface-300 rounded-lg\"\n >\n <i class=\"mti mti-chart-bar text-3xl mb-2 block\"></i>\n <p class=\"mb-2\">{{ t(\"noSeriesConfigured\") }}</p>\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addSeries')\"\n severity=\"secondary\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addSeries()\"\n />\n </div>\n }\n </div>\n</div>\n" }]
|
|
36315
|
+
], template: "<div\r\n class=\"flex flex-col gap-4\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n [formGroup]=\"queryForm\"\r\n>\r\n <!-- Category Property (shown for certain chart types) -->\r\n @if (shouldShowField(\"categoryProperty\")) {\r\n <div class=\"mb-2\">\r\n <mt-select-field\r\n [label]=\"t('categoryProperty')\"\r\n formControlName=\"categoryProperty\"\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 [placeholder]=\"t('selectCategoryProperty')\"\r\n [filter]=\"true\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Add Series Button -->\r\n @if (chartType() !== \"overview\" || seriesArray.length === 0) {\r\n <div class=\"flex justify-end\">\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addSeries')\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addSeries()\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Series List -->\r\n <div formArrayName=\"series\" class=\"flex flex-col gap-4\">\r\n @for (\r\n series of seriesArray.controls;\r\n track trackByIndex(i);\r\n let i = $index\r\n ) {\r\n <div\r\n class=\"p-4 rounded-lg border transition-all\"\r\n [class.border-red-500]=\"series.invalid\"\r\n [class.border-surface-200]=\"!series.invalid\"\r\n [formGroupName]=\"i\"\r\n >\r\n <!-- Series Header -->\r\n <div class=\"flex items-center justify-between mb-4\">\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-600 text-sm font-semibold\"\r\n >\r\n {{ i + 1 }}\r\n </span>\r\n <span class=\"text-sm font-medium text-muted-color\">{{\r\n t(\"series\")\r\n }}</span>\r\n </div>\r\n <div class=\"flex items-center gap-2\">\r\n @if (shouldShowField(\"formula\")) {\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex min-h-8 items-center justify-center gap-1.5 rounded-md border border-surface-300 bg-surface-0 px-3 py-1.5 text-sm font-medium text-color transition-colors hover:border-primary-400 hover:bg-primary-50 hover:text-primary-700 disabled:cursor-not-allowed disabled:opacity-50\"\r\n [id]=\"advancedSettingsToggleId(i)\"\r\n [attr.aria-expanded]=\"\r\n series.value.showAdvancedSettings ? 'true' : 'false'\r\n \"\r\n [attr.aria-controls]=\"advancedSettingsPanelId(i)\"\r\n [disabled]=\"disabled\"\r\n (click)=\"toggleAdvanced(i)\"\r\n >\r\n <mt-icon\r\n icon=\"general.settings-02\"\r\n class=\"text-base\"\r\n aria-hidden=\"true\"\r\n />\r\n <span>\r\n {{\r\n t(\r\n advancedSettingsActionKey(\r\n series.value.showAdvancedSettings\r\n )\r\n )\r\n }}\r\n </span>\r\n </button>\r\n }\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"deleteSeries(i)\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4\">\r\n <!-- Auto Stack Toggle -->\r\n @if (shouldShowField(\"autoStack\")) {\r\n <div class=\"md:col-span-2 lg:col-span-3\">\r\n <mt-toggle-field\r\n [label]=\"t('autoStack')\"\r\n formControlName=\"autoStack\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Value Property -->\r\n @if (shouldShowField(\"valueProperty\") || series.value.autoStack) {\r\n <mt-select-field\r\n [label]=\"t('valueProperty')\"\r\n formControlName=\"valueProperty\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectValueProperty')\"\r\n [filter]=\"true\"\r\n />\r\n }\r\n\r\n <!-- Aggregate Function -->\r\n @if (shouldShowField(\"aggregateFunction\")) {\r\n <mt-select-field\r\n [label]=\"t('aggregateFunction')\"\r\n formControlName=\"aggregateFunction\"\r\n [options]=\"aggregateFunctions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n }\r\n\r\n <!-- Color Picker -->\r\n @if (shouldShowField(\"color\")) {\r\n <mt-color-picker-field\r\n [label]=\"t('seriesColor')\"\r\n formControlName=\"color\"\r\n />\r\n }\r\n\r\n <!-- Bar Type (for stacked bar charts) -->\r\n @if (shouldShowField(\"barType\")) {\r\n <mt-select-field\r\n [label]=\"t('barType')\"\r\n formControlName=\"barType\"\r\n [options]=\"barTypes\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n />\r\n }\r\n\r\n <!-- Auto Stack By Property -->\r\n @if (\r\n shouldShowField(\"autoStackByProperty\") && series.value.autoStack\r\n ) {\r\n <mt-select-field\r\n [label]=\"t('autoStackByProperty')\"\r\n formControlName=\"autoStackByProperty\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n }\r\n\r\n <!-- Group By Properties -->\r\n @if (shouldShowField(\"groupByProperties\")) {\r\n <div class=\"col-span-full\">\r\n <mt-string-array-input\r\n [label]=\"t('groupByProperties')\"\r\n formControlName=\"groupByProperties\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n [placeholder]=\"t('selectProperties')\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Stack Properties (for stacked charts) -->\r\n @if (shouldShowField(\"stackProperties\") && !series.value.autoStack) {\r\n <div class=\"col-span-full\">\r\n <mt-string-array-input\r\n [label]=\"t('stackProperties')\"\r\n formControlName=\"stackProperties\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n [placeholder]=\"t('selectProperties')\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Extra Properties -->\r\n @if (shouldShowField(\"extraProperties\")) {\r\n <div class=\"col-span-full\">\r\n <mt-string-array-input\r\n [label]=\"t('extraProperties')\"\r\n formControlName=\"extraProperties\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n [placeholder]=\"t('selectProperties')\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Advanced Settings (Formula) -->\r\n @if (series.value.showAdvancedSettings && shouldShowField(\"formula\")) {\r\n <div\r\n [id]=\"advancedSettingsPanelId(i)\"\r\n role=\"region\"\r\n [attr.aria-labelledby]=\"advancedSettingsToggleId(i)\"\r\n class=\"mt-4 p-3 bg-surface-50 rounded-lg border border-surface-200\"\r\n >\r\n <div class=\"text-sm font-medium mb-2\">\r\n {{ t(\"advancedSettings\") }}\r\n </div>\r\n <label class=\"mb-2 block text-sm font-medium\">\r\n {{ t(\"formula\") }}\r\n </label>\r\n <mt-dashboard-formula-builder\r\n formControlName=\"formula\"\r\n [properties]=\"formulaProperties()\"\r\n [placeholder]=\"t('enterFormula')\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Filters Section -->\r\n @if (shouldShowField(\"filters\")) {\r\n <div class=\"mt-4 border border-surface-200 rounded-lg p-4\">\r\n <div class=\"flex items-center justify-between mb-3\">\r\n <span class=\"text-sm font-medium\">{{ t(\"seriesFilters\") }}</span>\r\n <mt-button\r\n icon=\"general.plus\"\r\n severity=\"secondary\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addFilter(i)\"\r\n [pTooltip]=\"t('addFilter')\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-col gap-3\" formArrayName=\"filters\">\r\n @for (\r\n filter of getFilters(series).controls;\r\n track trackByIndex(j);\r\n let j = $index\r\n ) {\r\n <div\r\n class=\"grid grid-cols-12 gap-2 p-3 bg-surface-50 rounded-lg border border-surface-100\"\r\n [formGroupName]=\"j\"\r\n >\r\n <!-- Property Key -->\r\n <div class=\"col-span-4\">\r\n <mt-select-field\r\n [label]=\"j === 0 ? t('property') : ''\"\r\n formControlName=\"propertyKey\"\r\n [options]=\"\r\n useGroupedSelect()\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n </div>\r\n\r\n <!-- Operator -->\r\n <div class=\"col-span-2\">\r\n <mt-select-field\r\n [label]=\"j === 0 ? t('operator') : ''\"\r\n formControlName=\"operator\"\r\n [options]=\"operators\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n </div>\r\n\r\n <!-- Value -->\r\n <div class=\"col-span-4\">\r\n <mt-text-field\r\n [label]=\"j === 0 ? t('value') : ''\"\r\n formControlName=\"value\"\r\n [placeholder]=\"t('enterValue')\"\r\n />\r\n </div>\r\n\r\n <!-- Remove Filter -->\r\n <div class=\"col-span-2 flex items-end justify-end pb-1\">\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"removeFilter(i, j)\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (getFilters(series).length === 0) {\r\n <div class=\"text-center py-3 text-muted-color text-sm\">\r\n {{ t(\"noFiltersConfigured\") }}\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n @if (seriesArray.length === 0) {\r\n <div\r\n class=\"text-center py-8 text-muted-color border border-dashed border-surface-300 rounded-lg\"\r\n >\r\n <i class=\"mti mti-chart-bar text-3xl mb-2 block\"></i>\r\n <p class=\"mb-2\">{{ t(\"noSeriesConfigured\") }}</p>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addSeries')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addSeries()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n" }]
|
|
36307
36316
|
}], ctorParameters: () => [], propDecorators: { chartType: [{ type: i0.Input, args: [{ isSignal: true, alias: "chartType", required: false }] }], querySchema: [{ type: i0.Input, args: [{ isSignal: true, alias: "querySchema", required: false }] }], propertiesFlat: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesFlat", required: false }] }], propertiesGrouped: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesGrouped", required: false }] }] } });
|
|
36308
36317
|
|
|
36309
36318
|
/**
|
|
@@ -47255,6 +47264,17 @@ class DashboardList {
|
|
|
47255
47264
|
label: this.transloco.translate('dashboardBuilder.dashboard.version'),
|
|
47256
47265
|
},
|
|
47257
47266
|
], ...(ngDevMode ? [{ debugName: "tableColumns" }] : /* istanbul ignore next */ []));
|
|
47267
|
+
/** Table caption actions */
|
|
47268
|
+
tableActions = computed(() => this.showCreateButton()
|
|
47269
|
+
? [
|
|
47270
|
+
{
|
|
47271
|
+
icon: 'general.plus',
|
|
47272
|
+
label: this.transloco.translate('dashboardBuilder.dashboard.createDashboard'),
|
|
47273
|
+
color: 'primary',
|
|
47274
|
+
action: () => this.openCreateModal(),
|
|
47275
|
+
},
|
|
47276
|
+
]
|
|
47277
|
+
: [], ...(ngDevMode ? [{ debugName: "tableActions" }] : /* istanbul ignore next */ []));
|
|
47258
47278
|
/** Table row actions */
|
|
47259
47279
|
rowActions = computed(() => {
|
|
47260
47280
|
const actions = [];
|
|
@@ -47398,11 +47418,11 @@ class DashboardList {
|
|
|
47398
47418
|
this.dashboards.reload();
|
|
47399
47419
|
}
|
|
47400
47420
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
47401
|
-
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'\">\
|
|
47421
|
+
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'\">\n <!-- Page mode -->\n @if (isPage()) {\n <mt-page\n [title]=\"pageTitle() || t('dashboards')\"\n [avatarIcon]=\"'chart.bar-chart-square-03'\"\n [avatarStyle]=\"{\n '--p-avatar-background': 'var(--p-cyan-100)',\n '--p-avatar-color': 'var(--p-cyan-700)',\n }\"\n >\n <!-- Content -->\n <ng-container *ngTemplateOutlet=\"tableContent\" />\n </mt-page>\n } @else {\n <!-- Non-page mode -->\n <div class=\"dashboard-list space-y-3\">\n <!-- Header -->\n <h2 class=\"text-2xl font-semibold text-surface-900 dark:text-surface-0\">\n {{ t(\"dashboards\") }}\n </h2>\n\n <!-- Content -->\n <ng-container *ngTemplateOutlet=\"tableContent\" />\n </div>\n }\n\n <!-- Reusable table content template -->\n <ng-template #tableContent>\n <!-- Custom cell templates -->\n <ng-template #nameTpl let-row>\n <span class=\"font-semibold text-surface-900 dark:text-surface-0\">\n {{ getDashboardName(row) }}\n </span>\n </ng-template>\n\n <!-- Dashboard Table -->\n <mt-table\n [data]=\"dashboardList()\"\n [columns]=\"tableColumns()\"\n [actions]=\"tableActions()\"\n [rowActions]=\"rowActions()\"\n [loading]=\"isLoading()\"\n [showFilters]=\"true\"\n [generalSearch]=\"true\"\n dataKey=\"id\"\n storageKey=\"dashboard-list-table\"\n (cellChange)=\"onToggleChange($event)\"\n />\n </ng-template>\n</ng-container>\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", "paginatorPosition", "alwaysShowPaginator", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm", "groupBy", "sortField", "sortDirection"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "emptyAction", "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 });
|
|
47402
47422
|
}
|
|
47403
47423
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardList, decorators: [{
|
|
47404
47424
|
type: Component,
|
|
47405
|
-
args: [{ selector: 'mt-dashboard-list', standalone: true, imports: [CommonModule, TranslocoDirective,
|
|
47425
|
+
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'\">\n <!-- Page mode -->\n @if (isPage()) {\n <mt-page\n [title]=\"pageTitle() || t('dashboards')\"\n [avatarIcon]=\"'chart.bar-chart-square-03'\"\n [avatarStyle]=\"{\n '--p-avatar-background': 'var(--p-cyan-100)',\n '--p-avatar-color': 'var(--p-cyan-700)',\n }\"\n >\n <!-- Content -->\n <ng-container *ngTemplateOutlet=\"tableContent\" />\n </mt-page>\n } @else {\n <!-- Non-page mode -->\n <div class=\"dashboard-list space-y-3\">\n <!-- Header -->\n <h2 class=\"text-2xl font-semibold text-surface-900 dark:text-surface-0\">\n {{ t(\"dashboards\") }}\n </h2>\n\n <!-- Content -->\n <ng-container *ngTemplateOutlet=\"tableContent\" />\n </div>\n }\n\n <!-- Reusable table content template -->\n <ng-template #tableContent>\n <!-- Custom cell templates -->\n <ng-template #nameTpl let-row>\n <span class=\"font-semibold text-surface-900 dark:text-surface-0\">\n {{ getDashboardName(row) }}\n </span>\n </ng-template>\n\n <!-- Dashboard Table -->\n <mt-table\n [data]=\"dashboardList()\"\n [columns]=\"tableColumns()\"\n [actions]=\"tableActions()\"\n [rowActions]=\"rowActions()\"\n [loading]=\"isLoading()\"\n [showFilters]=\"true\"\n [generalSearch]=\"true\"\n dataKey=\"id\"\n storageKey=\"dashboard-list-table\"\n (cellChange)=\"onToggleChange($event)\"\n />\n </ng-template>\n</ng-container>\n" }]
|
|
47406
47426
|
}], 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"] }] } });
|
|
47407
47427
|
|
|
47408
47428
|
/**
|
|
@@ -50418,4 +50438,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
50418
50438
|
*/
|
|
50419
50439
|
|
|
50420
50440
|
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 };
|
|
50421
|
-
//# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-
|
|
50441
|
+
//# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-YD5LrCCJ.mjs.map
|