@masterteam/dashboard-builder 0.0.50 → 0.0.52
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 +11 -11
- package/assets/i18n/ar.json +2 -0
- package/assets/i18n/en.json +2 -0
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-mRmFpaBb.mjs → masterteam-dashboard-builder-dashboard-dialog.component-B_g_lLDx.mjs} +4 -4
- package/fesm2022/masterteam-dashboard-builder-dashboard-dialog.component-B_g_lLDx.mjs.map +1 -0
- package/fesm2022/{masterteam-dashboard-builder-masterteam-dashboard-builder-YVu_-WlK.mjs → masterteam-dashboard-builder-masterteam-dashboard-builder-BlBnHwDv.mjs} +2926 -2597
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-BlBnHwDv.mjs.map +1 -0
- package/fesm2022/masterteam-dashboard-builder.mjs +1 -1
- package/package.json +4 -4
- package/types/masterteam-dashboard-builder.d.ts +22 -4
- package/fesm2022/masterteam-dashboard-builder-dashboard-dialog.component-mRmFpaBb.mjs.map +0 -1
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-YVu_-WlK.mjs.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { aw as ActionsSettings, aE as ArrayBuilderField, G as BarChartHandler, ap as BarControlUi, aS as CHART_CAPABILITIES, as as CHART_TYPES, b5 as CONFIG_DOMAINS, C as CardContentComponent, q as CardFilterComponent, t as CardInfoComponent, u as ChartCardComponent, B as ChartDataService, aI as ChartFilterDrawer, al as ChartSettingsDrawer, ax as ChartViewer, aD as ColorListField, W as ComparisonChartHandler, b as DashboardBuilder, af as DashboardBuilderService, a as DashboardItem, D as DashboardItemStoreService, ad as DashboardList, ag as DashboardStoreService, d as DashboardViewer, av as DataSourceSettings, aO as DatasourcePanelComponent, an as DefaultControlUi, am as DisplaySettings, r as DynamicFiltersComponent, ak as DynamicFiltersConfig, E as EChartComponent, P as EntitiesPreviewCardComponent, v as EntityInfoComponent, w as EntityPreviewCardComponent, aN as FilterBuilderComponent, aQ as FilterByGroupPipe, aM as FilterChipsBarComponent, N as GaugeChartHandler, au as GeneralSettings, aR as GetChartActionsPipe, aL as GuidedConfigDialogComponent, ae as HTTPMethod, H as HeaderCardComponent, bP as ITEM_GUIDANCE_REGISTRY, aH as ItemCardMenuComponent, aK as ItemConfigPopoverComponent, aJ as ItemContextToolbarComponent, bR as ItemGuidanceService, aF as KeyValueMapField, L as LastHistoryLevelCardComponent, aG as LegendOrderField, Y as LevelCardHandler, U as LineChartHandler, x as ListStatisticCardComponent, ai as ManageBreadcrumb, aj as ManageFilterOnPage, ar as ManageItem, at as ManageItemService, ah as ManagePages, Z as MapChartHandler, Q as OverviewCardHandler, b8 as POPOVER_TABS, b9 as POPOVER_TAB_SPECS, a0 as PhaseGateStepperHandler, I as PieChartHandler, ao as PieControlUi, P as PropertiesCardComponent, _ as RingGaugeChartHandler, $ as SPlusChartHandler, bq as STYLE_PRESETS, aP as SchemaControlRendererComponent, aC as SegmentedField, y as SkeletonCardComponent, V as SnapshotHandler, X as SplitterChartHandler, J as StackBarChartHandler, aq as StackBarControlUi, S as StaticFiltersComponent, z as StatisticCardComponent, aB as StyleField, az as StyleSettingsRenderer, ay as StyleStudioDrawer, T as TableCardComponent, O as TableViewHandler, R as TimelineHandler, A as TopbarCardComponent, m as addCommasToNumber, bm as applyBehaviorToPersisted, bB as applyControlPatchToPersisted, bC as applyControlPatchesToPersisted, bn as applyFilterChipsToPersisted, bk as applyLabelLegendFormatToPersisted, bi as applyLayoutToPersisted, bg as applyStyleToPersisted, bb as applyTitleToPersisted, K as axisFormatters, bl as behaviorToUi, bK as bindingKey, bp as buildAssembly, bJ as buildDisplayFieldPredicate, c as cloneDeep, a6 as createAxisFormatter, a7 as createTooltipFormatter, bc as datasourceToUi, bx as deepMerge, bQ as describeGuidance, b6 as domainsForCapability, h as dynamicReorder, f as dynamicTextReplace, aA as expandResetPatches, bd as fieldsToUi, be as filtersToUi, b7 as findDomain, bs as findPreset, bH as flattenSchema, a1 as formatCurrency, a5 as formatDate, by as formatForEditor, a4 as formatNumber, a3 as formatPercentage, j as formatValue, a8 as formatWordsUnderBar, a9 as formatXAxis, i as generalConfiguration, bL as getBinding, aT as getCapabilityById, p as getColorFromConditions, bD as getControlSchema, a2 as getCurrencySuffix, bG as getFallbackControlSchema, k as getLocalizedTitle, g as getNestedData, M as groupDatesByYearAndMonth, bv as groupIssuesByDomain, ab as handleFilterForCard, ac as handleFilterForSnapshot, aa as handleFiltersForCustom, bu as hasBlockingIssues, o as isMobilePlatform, bj as labelLegendFormatToUi, bh as layoutToUi, bM as listBindings, bN as listBindingsForChart, bE as listControlSchemaIds, bF as listControlSchemas, a$ as moduleIdFromSelector, aY as normalizeAggregateFunction, b4 as normalizeBeforeRequest, b3 as normalizeBeforeSave, aW as normalizeChartTypeForRequest, aX as normalizeFilterOperation, aZ as normalizeFilters, b2 as normalizeOnLoad, bw as parseAdvancedJson, bo as persistedToUi, br as presetsForCapability, bO as readBoundValue, bz as readByPath, aU as resolveCapability, bI as resolveDisplayFields, a_ as selectorFromLegacy, bA as setByPath, l as sortChartData, n as sortDataTableView, bf as styleToUi, e as switchAllKeysSmall, s as switchAllKeysToLower, ba as titleToUi, aV as toBackendChartType, b0 as toBackendSourceLink, b1 as toFormSourceLink, bt as validate } from './masterteam-dashboard-builder-masterteam-dashboard-builder-
|
|
1
|
+
export { aw as ActionsSettings, aE as ArrayBuilderField, G as BarChartHandler, ap as BarControlUi, aS as CHART_CAPABILITIES, as as CHART_TYPES, b5 as CONFIG_DOMAINS, C as CardContentComponent, q as CardFilterComponent, t as CardInfoComponent, u as ChartCardComponent, B as ChartDataService, aI as ChartFilterDrawer, al as ChartSettingsDrawer, ax as ChartViewer, aD as ColorListField, W as ComparisonChartHandler, b as DashboardBuilder, af as DashboardBuilderService, a as DashboardItem, D as DashboardItemStoreService, ad as DashboardList, ag as DashboardStoreService, d as DashboardViewer, av as DataSourceSettings, aO as DatasourcePanelComponent, an as DefaultControlUi, am as DisplaySettings, r as DynamicFiltersComponent, ak as DynamicFiltersConfig, E as EChartComponent, P as EntitiesPreviewCardComponent, v as EntityInfoComponent, w as EntityPreviewCardComponent, aN as FilterBuilderComponent, aQ as FilterByGroupPipe, aM as FilterChipsBarComponent, N as GaugeChartHandler, au as GeneralSettings, aR as GetChartActionsPipe, aL as GuidedConfigDialogComponent, ae as HTTPMethod, H as HeaderCardComponent, bP as ITEM_GUIDANCE_REGISTRY, aH as ItemCardMenuComponent, aK as ItemConfigPopoverComponent, aJ as ItemContextToolbarComponent, bR as ItemGuidanceService, aF as KeyValueMapField, L as LastHistoryLevelCardComponent, aG as LegendOrderField, Y as LevelCardHandler, U as LineChartHandler, x as ListStatisticCardComponent, ai as ManageBreadcrumb, aj as ManageFilterOnPage, ar as ManageItem, at as ManageItemService, ah as ManagePages, Z as MapChartHandler, Q as OverviewCardHandler, b8 as POPOVER_TABS, b9 as POPOVER_TAB_SPECS, a0 as PhaseGateStepperHandler, I as PieChartHandler, ao as PieControlUi, P as PropertiesCardComponent, _ as RingGaugeChartHandler, $ as SPlusChartHandler, bq as STYLE_PRESETS, aP as SchemaControlRendererComponent, aC as SegmentedField, y as SkeletonCardComponent, V as SnapshotHandler, X as SplitterChartHandler, J as StackBarChartHandler, aq as StackBarControlUi, S as StaticFiltersComponent, z as StatisticCardComponent, aB as StyleField, az as StyleSettingsRenderer, ay as StyleStudioDrawer, T as TableCardComponent, O as TableViewHandler, R as TimelineHandler, A as TopbarCardComponent, m as addCommasToNumber, bm as applyBehaviorToPersisted, bB as applyControlPatchToPersisted, bC as applyControlPatchesToPersisted, bn as applyFilterChipsToPersisted, bk as applyLabelLegendFormatToPersisted, bi as applyLayoutToPersisted, bg as applyStyleToPersisted, bb as applyTitleToPersisted, K as axisFormatters, bl as behaviorToUi, bK as bindingKey, bp as buildAssembly, bJ as buildDisplayFieldPredicate, c as cloneDeep, a6 as createAxisFormatter, a7 as createTooltipFormatter, bc as datasourceToUi, bx as deepMerge, bQ as describeGuidance, b6 as domainsForCapability, h as dynamicReorder, f as dynamicTextReplace, aA as expandResetPatches, bd as fieldsToUi, be as filtersToUi, b7 as findDomain, bs as findPreset, bH as flattenSchema, a1 as formatCurrency, a5 as formatDate, by as formatForEditor, a4 as formatNumber, a3 as formatPercentage, j as formatValue, a8 as formatWordsUnderBar, a9 as formatXAxis, i as generalConfiguration, bL as getBinding, aT as getCapabilityById, p as getColorFromConditions, bD as getControlSchema, a2 as getCurrencySuffix, bG as getFallbackControlSchema, k as getLocalizedTitle, g as getNestedData, M as groupDatesByYearAndMonth, bv as groupIssuesByDomain, ab as handleFilterForCard, ac as handleFilterForSnapshot, aa as handleFiltersForCustom, bu as hasBlockingIssues, o as isMobilePlatform, bj as labelLegendFormatToUi, bh as layoutToUi, bM as listBindings, bN as listBindingsForChart, bE as listControlSchemaIds, bF as listControlSchemas, a$ as moduleIdFromSelector, aY as normalizeAggregateFunction, b4 as normalizeBeforeRequest, b3 as normalizeBeforeSave, aW as normalizeChartTypeForRequest, aX as normalizeFilterOperation, aZ as normalizeFilters, b2 as normalizeOnLoad, bw as parseAdvancedJson, bo as persistedToUi, br as presetsForCapability, bO as readBoundValue, bz as readByPath, aU as resolveCapability, bI as resolveDisplayFields, a_ as selectorFromLegacy, bA as setByPath, l as sortChartData, n as sortDataTableView, bf as styleToUi, e as switchAllKeysSmall, s as switchAllKeysToLower, ba as titleToUi, aV as toBackendChartType, b0 as toBackendSourceLink, b1 as toFormSourceLink, bt as validate } from './masterteam-dashboard-builder-masterteam-dashboard-builder-BlBnHwDv.mjs';
|
|
2
2
|
//# sourceMappingURL=masterteam-dashboard-builder.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masterteam/dashboard-builder",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.52",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"directory": "../../../dist/masterteam/dashboard-builder",
|
|
6
6
|
"linkDirectory": true,
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"primeng": "21.1.5",
|
|
22
22
|
"rxjs": "^7.8.2",
|
|
23
23
|
"tailwindcss": "^4.2.2",
|
|
24
|
-
"@masterteam/
|
|
25
|
-
"@masterteam/
|
|
26
|
-
"@masterteam/
|
|
24
|
+
"@masterteam/components": "^0.0.218",
|
|
25
|
+
"@masterteam/timeline": "^0.0.17",
|
|
26
|
+
"@masterteam/icons": "^0.0.17"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"tslib": "^2.8.1",
|
|
@@ -482,6 +482,8 @@ interface ChartActionsContext {
|
|
|
482
482
|
editItem: (item: DashboardChartItem, parentItem?: DashboardChartItem) => void;
|
|
483
483
|
addDialogForChart: (item: DashboardChartItem) => void;
|
|
484
484
|
editOnDialogForChart: (item: DashboardChartItem) => void;
|
|
485
|
+
editDialogActionsForChart: (item: DashboardChartItem) => void;
|
|
486
|
+
editDialogStyleForChart: (item: DashboardChartItem) => void;
|
|
485
487
|
deleteDialogFromChart: (item: DashboardChartItem) => void;
|
|
486
488
|
}
|
|
487
489
|
/**
|
|
@@ -552,6 +554,10 @@ type ItemCardMenuAction = {
|
|
|
552
554
|
type: 'dialog-open';
|
|
553
555
|
} | {
|
|
554
556
|
type: 'dialog-edit';
|
|
557
|
+
} | {
|
|
558
|
+
type: 'dialog-actions';
|
|
559
|
+
} | {
|
|
560
|
+
type: 'dialog-style';
|
|
555
561
|
} | {
|
|
556
562
|
type: 'dialog-remove';
|
|
557
563
|
};
|
|
@@ -2357,6 +2363,7 @@ declare class DashboardBuilder implements OnInit, OnDestroy {
|
|
|
2357
2363
|
* click/interaction actions (split out of the old ManageItem "Actions" tab).
|
|
2358
2364
|
*/
|
|
2359
2365
|
openActionsDrawer(chart: DashboardChartItem): void;
|
|
2366
|
+
private applyEditableItemUpdate;
|
|
2360
2367
|
/**
|
|
2361
2368
|
* Apply a partial chart-config update produced by one of the dedicated
|
|
2362
2369
|
* drawers (filters, style, manage-item). Updates the chart in place,
|
|
@@ -2384,6 +2391,9 @@ declare class DashboardBuilder implements OnInit, OnDestroy {
|
|
|
2384
2391
|
private openTitleEditor;
|
|
2385
2392
|
/** Whether the chart has a linked dialog (Manage menu shows dialog entries). */
|
|
2386
2393
|
hasLinkedDialog(chart: DashboardChartItem): boolean;
|
|
2394
|
+
private isDialogItem;
|
|
2395
|
+
private getLinkedDialog;
|
|
2396
|
+
private toDialogChartItem;
|
|
2387
2397
|
/** Whether the chart can have a linked dialog added (chart cards that aren't dialogs themselves). */
|
|
2388
2398
|
canLinkDialog(chart: DashboardChartItem): boolean;
|
|
2389
2399
|
/** Duplicate a chart on the canvas. */
|
|
@@ -2469,6 +2479,8 @@ declare class DashboardBuilder implements OnInit, OnDestroy {
|
|
|
2469
2479
|
private toPropertyArray;
|
|
2470
2480
|
private uniqueProperties;
|
|
2471
2481
|
editOnDialogForChart(chart: DashboardChartItem): void;
|
|
2482
|
+
editDialogActionsForChart(chart: DashboardChartItem): void;
|
|
2483
|
+
editDialogStyleForChart(chart: DashboardChartItem): void;
|
|
2472
2484
|
deleteDialogFromChart(chart: DashboardChartItem): void;
|
|
2473
2485
|
/** Open chart settings drawer for item configuration */
|
|
2474
2486
|
openQuickManage(event: Event, item: DashboardChartItem): void;
|
|
@@ -3884,6 +3896,7 @@ interface EntityData {
|
|
|
3884
3896
|
statusColor?: string;
|
|
3885
3897
|
}
|
|
3886
3898
|
declare class EntityInfoComponent {
|
|
3899
|
+
private readonly transloco;
|
|
3887
3900
|
/** Entity data to display */
|
|
3888
3901
|
readonly data: _angular_core.InputSignal<EntityData | null>;
|
|
3889
3902
|
/** Display type: 'entity' shows label, 'inTable' shows value only */
|
|
@@ -3904,6 +3917,7 @@ declare class EntityInfoComponent {
|
|
|
3904
3917
|
readonly lookupName: _angular_core.Signal<any>;
|
|
3905
3918
|
readonly lookupColor: _angular_core.Signal<any>;
|
|
3906
3919
|
readonly checkboxValue: _angular_core.Signal<boolean>;
|
|
3920
|
+
readonly checkboxLabel: _angular_core.Signal<string>;
|
|
3907
3921
|
readonly statusName: _angular_core.Signal<any>;
|
|
3908
3922
|
readonly statusColor: _angular_core.Signal<any>;
|
|
3909
3923
|
readonly percentageValue: _angular_core.Signal<number | null>;
|
|
@@ -4507,6 +4521,8 @@ declare class TableCardComponent implements OnInit, OnDestroy {
|
|
|
4507
4521
|
private isPhaseGateTable;
|
|
4508
4522
|
private buildPhaseGateTable;
|
|
4509
4523
|
private extractPhaseGateValues;
|
|
4524
|
+
private resolveConfiguredTableKeys;
|
|
4525
|
+
private toStringArray;
|
|
4510
4526
|
private findLargestRow;
|
|
4511
4527
|
private resolvePhaseGateFields;
|
|
4512
4528
|
private findFirstFieldValue;
|
|
@@ -5160,6 +5176,7 @@ declare class LevelCardHandler {
|
|
|
5160
5176
|
* [[{ data: levelProps }]]
|
|
5161
5177
|
*/
|
|
5162
5178
|
handlelevelCardsWithFilter(result: any, _config: ItemConfig): any;
|
|
5179
|
+
private normalizeLevelCardProperty;
|
|
5163
5180
|
/**
|
|
5164
5181
|
* Handle grouped level cards (multiple selections)
|
|
5165
5182
|
* Returns data directly
|
|
@@ -5181,6 +5198,7 @@ declare class LevelCardHandler {
|
|
|
5181
5198
|
* Get display value from property
|
|
5182
5199
|
*/
|
|
5183
5200
|
private getDisplayValue;
|
|
5201
|
+
private shouldRenderLevelCardDisplayValue;
|
|
5184
5202
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LevelCardHandler, never>;
|
|
5185
5203
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<LevelCardHandler>;
|
|
5186
5204
|
}
|
|
@@ -5433,10 +5451,9 @@ declare function formatCurrency(value: number | string | null | undefined, confi
|
|
|
5433
5451
|
decimals?: number;
|
|
5434
5452
|
}, langCode?: string): string;
|
|
5435
5453
|
/**
|
|
5436
|
-
* Resolve the currency suffix from the host
|
|
5437
|
-
*
|
|
5438
|
-
*
|
|
5439
|
-
* to the raw unit), English uses the unit code; falls back to SAR when unset.
|
|
5454
|
+
* Resolve the currency suffix from the host setting before falling back to SAR.
|
|
5455
|
+
* New hosts store it under `systemSettings.settings`; legacy dashboard hosts
|
|
5456
|
+
* used `currency`.
|
|
5440
5457
|
*/
|
|
5441
5458
|
declare function getCurrencySuffix(langCode?: string): string;
|
|
5442
5459
|
/**
|
|
@@ -7908,6 +7925,7 @@ declare class ActionsSettings {
|
|
|
7908
7925
|
* value field's "Properties" tab and kept in sync as filters add keys.
|
|
7909
7926
|
*/
|
|
7910
7927
|
readonly chartExtraProperties: _angular_core.Signal<string[]>;
|
|
7928
|
+
readonly chartExtraPropertyOptions: _angular_core.Signal<(string | IProperty)[]>;
|
|
7911
7929
|
private normalizeExtraProperties;
|
|
7912
7930
|
/** Get current actions array safely */
|
|
7913
7931
|
private getCurrentActions;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"masterteam-dashboard-builder-dashboard-dialog.component-mRmFpaBb.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\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\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 },\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 return modalService.openModal(DashboardDialogComponent, 'dialog', {\r\n header: options?.title || '',\r\n styleClass: sizeClass,\r\n data: {\r\n config,\r\n params: params || {},\r\n title: options?.title,\r\n },\r\n });\r\n}\r\n","<!--\n Inline height is intentional: the global `.mt-dialog .p-dialog-content\n .mt-modal-content { height:100% }` rule (common.css, unlayered) overrides any\n `h-[80vh]` class, and `.p-dialog` itself has no definite height, so a\n class-based height collapses to content. An inline style beats the unlayered\n rule, and `80vh` is viewport-relative (definite regardless of ancestors),\n giving the inner item -> table the bounded height it needs to scroll.\n padding-bottom is zeroed (the global 5rem reserves space for a footer this\n dialog does not render).\n-->\n<div\n [class]=\"modal.contentClass + ' flex min-h-[300px] flex-col p-0'\"\n style=\"height: 80vh; padding-bottom: 0\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n>\n <!-- Dashboard Item renders whatever the config specifies. A definite height\n lets the inner table own its scroll (its virtual window depends on the\n scroll container, not the outer dialog). -->\n @if (processedConfig()) {\n <mt-dashboard-item\n class=\"block min-h-0 flex-1\"\n [config]=\"processedConfig()!\"\n [queryParams]=\"mergedParams()\"\n [isDialog]=\"true\"\n (actionTriggered)=\"onItemAction($event)\"\n />\n } @else if (config()) {\n <!-- Config provided but still being processed -->\n <div class=\"flex flex-1 items-center justify-center\">\n <i class=\"pi pi-spin pi-spinner text-4xl text-primary\"></i>\n </div>\n } @else {\n <!-- No dialog config could be resolved (linked dialog deleted or failed to\n load). Show an explicit unavailable state instead of silently\n rendering the wrong widget. -->\n <div\n class=\"flex flex-1 flex-col items-center justify-center gap-3 px-6 text-center\"\n >\n <i class=\"pi pi-exclamation-triangle text-4xl text-surface-400\"></i>\n <p class=\"text-surface-600 dark:text-surface-300\">\n {{ t(\"dialogUnavailable\") }}\n </p>\n </div>\n }\n</div>\n<!--\n<div [class]=\"modal.footerClass\" *transloco=\"let t; prefix: 'dashboard'\">\n <mt-button [label]=\"t('close')\" severity=\"secondary\" (onClick)=\"close()\" />\n</div> -->\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;;;AAQG;AAmBH;;;;;;;;AAQG;MAOU,wBAAwB,CAAA;AAClB,IAAA,SAAS,GAAG,MAAM,CAAC,yBAAyB,CAAC;AAC7C,IAAA,WAAW,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACxC,IAAA,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC5C,IAAA,KAAK,GAAG,MAAM,CAAC,YAAY,CAAC;AACpB,IAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;;AAG9B,IAAA,MAAM,GAAG,KAAK,CAAoB,IAAI,6EAAC;AACvC,IAAA,MAAM,GAAG,KAAK,CAAsB,EAAE,6EAAC;AACvC,IAAA,KAAK,GAAG,KAAK,CAAgB,IAAI,4EAAC;;AAGlC,IAAA,YAAY,GAAG,MAAM,CAAoB,IAAI,mFAAC;AAC9C,IAA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