@masterteam/dashboard-builder 0.0.71 → 0.0.72
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 +398 -349
- package/assets/dashboard-builder.css +1 -1
- package/assets/i18n/ar.json +1598 -1596
- package/assets/i18n/en.json +1323 -1321
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-BKYVka5Y.mjs → masterteam-dashboard-builder-dashboard-dialog.component-B3wTdiZC.mjs} +2 -2
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-BKYVka5Y.mjs.map → masterteam-dashboard-builder-dashboard-dialog.component-B3wTdiZC.mjs.map} +1 -1
- package/fesm2022/{masterteam-dashboard-builder-masterteam-dashboard-builder-DTbSru5t.mjs → masterteam-dashboard-builder-masterteam-dashboard-builder-CZibyu48.mjs} +1019 -333
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-CZibyu48.mjs.map +1 -0
- package/fesm2022/masterteam-dashboard-builder.mjs +1 -1
- package/package.json +21 -21
- package/types/masterteam-dashboard-builder.d.ts +128 -14
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-DTbSru5t.mjs.map +0 -1
|
@@ -50,6 +50,7 @@ import { Tooltip as Tooltip$1, TruncateTooltip } from '@masterteam/components/to
|
|
|
50
50
|
import { ToastService } from '@masterteam/components/toast';
|
|
51
51
|
import { DateField } from '@masterteam/components/date-field';
|
|
52
52
|
import { UserSearchField } from '@masterteam/components/user-search-field';
|
|
53
|
+
import { SecureImagePipe } from '@masterteam/components/upload-field';
|
|
53
54
|
import * as mtIcons from '@masterteam/icons/assets/select-icons.json';
|
|
54
55
|
import { Avatar } from '@masterteam/components/avatar';
|
|
55
56
|
import { EntitiesPreview } from '@masterteam/components/entities';
|
|
@@ -69,6 +70,109 @@ import { Table } from '@masterteam/components/table';
|
|
|
69
70
|
import * as i2$5 from 'primeng/inputnumber';
|
|
70
71
|
import { InputNumberModule } from 'primeng/inputnumber';
|
|
71
72
|
|
|
73
|
+
/** Add the displayName expected by the filter configuration select. */
|
|
74
|
+
function normalizeDashboardFilterLookups(lookups) {
|
|
75
|
+
return lookups.map((lookup) => ({
|
|
76
|
+
...lookup,
|
|
77
|
+
displayName: lookup.displayName ||
|
|
78
|
+
resolveLocalizedText(lookup.name) ||
|
|
79
|
+
lookup.key ||
|
|
80
|
+
'',
|
|
81
|
+
}));
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Resolve one level/log's runtime statuses from either supported host contract:
|
|
85
|
+
* canonical client-form definitions or legacy flat basicLevelsStatuses.
|
|
86
|
+
*/
|
|
87
|
+
function resolveDashboardFilterStatuses(statuses, targetId, module = 'Level') {
|
|
88
|
+
if (targetId === null || targetId === undefined || targetId === '')
|
|
89
|
+
return [];
|
|
90
|
+
const targetIds = String(targetId)
|
|
91
|
+
.split(',')
|
|
92
|
+
.map((id) => id.trim())
|
|
93
|
+
.filter(Boolean);
|
|
94
|
+
const resolved = [];
|
|
95
|
+
for (const status of statuses) {
|
|
96
|
+
if (isStatusDefinition(status)) {
|
|
97
|
+
const candidateIds = module === 'Level'
|
|
98
|
+
? [status.levelId, status.levelModuleId, status.moduleId]
|
|
99
|
+
: [status.moduleId];
|
|
100
|
+
if (!candidateIds.some((id) => matchesId(id, targetIds)))
|
|
101
|
+
continue;
|
|
102
|
+
resolved.push(...status.items);
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
if (status.module?.toLowerCase() === module.toLowerCase() &&
|
|
106
|
+
matchesId(status.moduleId, targetIds)) {
|
|
107
|
+
resolved.push(status);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return dedupeStatusItems(resolved);
|
|
111
|
+
}
|
|
112
|
+
/** Build Status/PhaseGate schema options from the shared metadata Level tree. */
|
|
113
|
+
function buildDashboardLevelSchemaOptions(services, context = {}) {
|
|
114
|
+
const options = [];
|
|
115
|
+
for (const service of services) {
|
|
116
|
+
for (const module of service.modules ?? []) {
|
|
117
|
+
if (module.id.toLowerCase() !== 'level')
|
|
118
|
+
continue;
|
|
119
|
+
if (!matchesWorkspace(module.workspaceId, context.workspaceId))
|
|
120
|
+
continue;
|
|
121
|
+
const roots = module.values ?? [];
|
|
122
|
+
const hierarchical = roots.some((value) => value.children?.length);
|
|
123
|
+
const values = hierarchical
|
|
124
|
+
? roots
|
|
125
|
+
.filter((value) => !context.parentSelector ||
|
|
126
|
+
value.selector === context.parentSelector)
|
|
127
|
+
.flatMap((value) => value.children ?? [])
|
|
128
|
+
: roots;
|
|
129
|
+
for (const value of values) {
|
|
130
|
+
if (!matchesWorkspace(value.workspaceId, context.workspaceId))
|
|
131
|
+
continue;
|
|
132
|
+
options.push({ ...value, description: value.name });
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
const unique = new Map();
|
|
137
|
+
for (const option of options) {
|
|
138
|
+
const key = String(option.id);
|
|
139
|
+
if (!unique.has(key))
|
|
140
|
+
unique.set(key, option);
|
|
141
|
+
}
|
|
142
|
+
return [...unique.values()];
|
|
143
|
+
}
|
|
144
|
+
function resolveLocalizedText(value) {
|
|
145
|
+
if (typeof value === 'string')
|
|
146
|
+
return value;
|
|
147
|
+
return value?.display || value?.en || value?.ar || '';
|
|
148
|
+
}
|
|
149
|
+
function isStatusDefinition(status) {
|
|
150
|
+
return Array.isArray(status.items);
|
|
151
|
+
}
|
|
152
|
+
function matchesId(candidate, targetIds) {
|
|
153
|
+
return candidate !== null && candidate !== undefined
|
|
154
|
+
? targetIds.includes(String(candidate))
|
|
155
|
+
: false;
|
|
156
|
+
}
|
|
157
|
+
function matchesWorkspace(candidate, workspaceId) {
|
|
158
|
+
if (workspaceId === null || workspaceId === undefined || workspaceId === '') {
|
|
159
|
+
return true;
|
|
160
|
+
}
|
|
161
|
+
return (candidate === null ||
|
|
162
|
+
candidate === undefined ||
|
|
163
|
+
candidate === '' ||
|
|
164
|
+
String(candidate) === String(workspaceId));
|
|
165
|
+
}
|
|
166
|
+
function dedupeStatusItems(statuses) {
|
|
167
|
+
const unique = new Map();
|
|
168
|
+
statuses.forEach((status, index) => {
|
|
169
|
+
const key = `${status.key || ''}:${status.id ?? index}`;
|
|
170
|
+
if (!unique.has(key))
|
|
171
|
+
unique.set(key, status);
|
|
172
|
+
});
|
|
173
|
+
return [...unique.values()];
|
|
174
|
+
}
|
|
175
|
+
|
|
72
176
|
/**
|
|
73
177
|
* Dashboard Builder Service
|
|
74
178
|
*
|
|
@@ -117,6 +221,9 @@ class DashboardBuilderService {
|
|
|
117
221
|
* options from metadata.
|
|
118
222
|
*/
|
|
119
223
|
modulesTreeWorkspaceId = signal(null, ...(ngDevMode ? [{ debugName: "modulesTreeWorkspaceId" }] : /* istanbul ignore next */ []));
|
|
224
|
+
/** Host-owned lookup/status metadata, matching the client-form contract. */
|
|
225
|
+
filterLookups = signal(null, ...(ngDevMode ? [{ debugName: "filterLookups" }] : /* istanbul ignore next */ []));
|
|
226
|
+
filterStatuses = signal(null, ...(ngDevMode ? [{ debugName: "filterStatuses" }] : /* istanbul ignore next */ []));
|
|
120
227
|
/**
|
|
121
228
|
* Fixed selections that cannot be removed or edited in SelectionConfiguration.
|
|
122
229
|
* These selections are always shown and are read-only.
|
|
@@ -234,6 +341,12 @@ class DashboardBuilderService {
|
|
|
234
341
|
setModulesTreeWorkspaceId(workspaceId) {
|
|
235
342
|
this.modulesTreeWorkspaceId.set(workspaceId ?? null);
|
|
236
343
|
}
|
|
344
|
+
setFilterMetadata(lookups, statuses) {
|
|
345
|
+
if (lookups !== null)
|
|
346
|
+
this.filterLookups.set(lookups);
|
|
347
|
+
if (statuses !== null)
|
|
348
|
+
this.filterStatuses.set(statuses);
|
|
349
|
+
}
|
|
237
350
|
/**
|
|
238
351
|
* Add a single fixed selection
|
|
239
352
|
* @param selection Selection to add as fixed
|
|
@@ -557,7 +670,9 @@ class DashboardBuilderService {
|
|
|
557
670
|
}
|
|
558
671
|
/** Available lookups for the page-filter "Lookup" dropdown. */
|
|
559
672
|
getLookups() {
|
|
560
|
-
|
|
673
|
+
const lookups = this.filterLookups() ??
|
|
674
|
+
this.asArray(this.getClientSettings()?.data?.lookups);
|
|
675
|
+
return normalizeDashboardFilterLookups(lookups);
|
|
561
676
|
}
|
|
562
677
|
/** Items of a single lookup (the runtime options for a `lookup` filter). */
|
|
563
678
|
getLookupItems(lookupId) {
|
|
@@ -572,14 +687,9 @@ class DashboardBuilderService {
|
|
|
572
687
|
* `basicLevelsStatuses` by moduleId + module ('Level' or 'Log').
|
|
573
688
|
*/
|
|
574
689
|
getStatuses(levelId, module = 'Level') {
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
const ids = String(levelId)
|
|
579
|
-
.split(',')
|
|
580
|
-
.map((id) => id.trim())
|
|
581
|
-
.filter(Boolean);
|
|
582
|
-
return statuses.filter((status) => status?.module === module && ids.includes(String(status?.moduleId)));
|
|
690
|
+
const statuses = this.filterStatuses() ??
|
|
691
|
+
this.asArray(this.getClientSettings()?.data?.basicLevelsStatuses);
|
|
692
|
+
return resolveDashboardFilterStatuses(statuses, levelId, module);
|
|
583
693
|
}
|
|
584
694
|
/** Phase gates of a level, for the runtime `phaseGate` filter. */
|
|
585
695
|
getPhaseGatesByLevelId(levelId) {
|
|
@@ -1075,7 +1185,6 @@ class LimitedHttpService {
|
|
|
1075
1185
|
// Also set on window for external consumers
|
|
1076
1186
|
if (typeof window !== 'undefined') {
|
|
1077
1187
|
window.__REPORT_READY__ = true;
|
|
1078
|
-
console.log('[LimitedHttpService] All requests finished - Report ready!');
|
|
1079
1188
|
}
|
|
1080
1189
|
}, 2000);
|
|
1081
1190
|
}
|
|
@@ -3529,6 +3638,15 @@ function normalizeBeforeRequest(serviceConfig) {
|
|
|
3529
3638
|
return next;
|
|
3530
3639
|
}
|
|
3531
3640
|
|
|
3641
|
+
/**
|
|
3642
|
+
* Record identifiers are entered as literal filter values. They do not expose
|
|
3643
|
+
* a finite option list, so requesting `property-items` for them is invalid.
|
|
3644
|
+
*/
|
|
3645
|
+
function isIdProperty(property) {
|
|
3646
|
+
return (typeof property?.normalizedKey === 'string' &&
|
|
3647
|
+
property.normalizedKey.trim().toLowerCase() === 'id');
|
|
3648
|
+
}
|
|
3649
|
+
|
|
3532
3650
|
/**
|
|
3533
3651
|
* A boolean's two values are not modelled by the property-items API, so they
|
|
3534
3652
|
* are synthesized locally instead of requesting them (issue #1237).
|
|
@@ -3779,7 +3897,10 @@ class FilterValueField {
|
|
|
3779
3897
|
* type we do not recognise): fetch from the API, exactly as before.
|
|
3780
3898
|
*/
|
|
3781
3899
|
resolvePropertyValueSource(propertyKey) {
|
|
3782
|
-
const
|
|
3900
|
+
const property = this.findPropertyReference(propertyKey);
|
|
3901
|
+
if (isIdProperty(property))
|
|
3902
|
+
return 'none';
|
|
3903
|
+
const viewType = normalizeViewType(property?.viewType);
|
|
3783
3904
|
if (!viewType)
|
|
3784
3905
|
return 'remote';
|
|
3785
3906
|
if (CHECKBOX_VIEW_TYPES.has(viewType))
|
|
@@ -4853,6 +4974,8 @@ class SelectionConfiguration {
|
|
|
4853
4974
|
return this.getPropertiesForSelection(selectionIndex).find((prop) => prop.key === propertyKey);
|
|
4854
4975
|
}
|
|
4855
4976
|
isPropertyItemsSupported(property) {
|
|
4977
|
+
if (isIdProperty(property))
|
|
4978
|
+
return false;
|
|
4856
4979
|
const viewType = property?.viewType?.toLowerCase();
|
|
4857
4980
|
return viewType === 'lookup' || viewType === 'status';
|
|
4858
4981
|
}
|
|
@@ -4946,6 +5069,21 @@ class DynamicFiltersConfig {
|
|
|
4946
5069
|
levelsSchema = input([], ...(ngDevMode ? [{ debugName: "levelsSchema" }] : /* istanbul ignore next */ []));
|
|
4947
5070
|
/** Available level logs from parent context */
|
|
4948
5071
|
levelLogs = input([], ...(ngDevMode ? [{ debugName: "levelLogs" }] : /* istanbul ignore next */ []));
|
|
5072
|
+
/** Shared metadata tree used to derive Level-only status configuration. */
|
|
5073
|
+
modulesTree = signal([], ...(ngDevMode ? [{ debugName: "modulesTree" }] : /* istanbul ignore next */ []));
|
|
5074
|
+
lookupOptions = computed(() => {
|
|
5075
|
+
const supplied = this.lookups();
|
|
5076
|
+
return supplied.length
|
|
5077
|
+
? normalizeDashboardFilterLookups(supplied)
|
|
5078
|
+
: this.dashboardService.getLookups();
|
|
5079
|
+
}, ...(ngDevMode ? [{ debugName: "lookupOptions" }] : /* istanbul ignore next */ []));
|
|
5080
|
+
levelSchemaOptions = computed(() => {
|
|
5081
|
+
const treeOptions = buildDashboardLevelSchemaOptions(this.modulesTree(), {
|
|
5082
|
+
workspaceId: this.workspaceId(),
|
|
5083
|
+
parentSelector: this.chartWorkspace(),
|
|
5084
|
+
});
|
|
5085
|
+
return treeOptions.length ? treeOptions : this.levelsSchema();
|
|
5086
|
+
}, ...(ngDevMode ? [{ debugName: "levelSchemaOptions" }] : /* istanbul ignore next */ []));
|
|
4949
5087
|
/** Product type to filter available field types */
|
|
4950
5088
|
productType = input('pplus', ...(ngDevMode ? [{ debugName: "productType" }] : /* istanbul ignore next */ []));
|
|
4951
5089
|
/** Workspace metadata scope used by the shared datasource selection editor. */
|
|
@@ -4974,6 +5112,9 @@ class DynamicFiltersConfig {
|
|
|
4974
5112
|
// ControlValueAccessor callbacks
|
|
4975
5113
|
onChange = () => { };
|
|
4976
5114
|
onTouched = () => { };
|
|
5115
|
+
constructor() {
|
|
5116
|
+
this.loadLevelSchemaTree();
|
|
5117
|
+
}
|
|
4977
5118
|
// ============================================
|
|
4978
5119
|
// ControlValueAccessor Implementation
|
|
4979
5120
|
// ============================================
|
|
@@ -5286,6 +5427,20 @@ class DynamicFiltersConfig {
|
|
|
5286
5427
|
this.onChange(this.filterFields());
|
|
5287
5428
|
this.onTouched();
|
|
5288
5429
|
}
|
|
5430
|
+
loadLevelSchemaTree() {
|
|
5431
|
+
const cached = this.dashboardService.getCachedModulesTree();
|
|
5432
|
+
if (cached?.length) {
|
|
5433
|
+
this.modulesTree.set(cached);
|
|
5434
|
+
return;
|
|
5435
|
+
}
|
|
5436
|
+
this.dashboardService
|
|
5437
|
+
.getModulesTree()
|
|
5438
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
5439
|
+
.subscribe({
|
|
5440
|
+
next: (response) => this.modulesTree.set(response.data?.services ?? []),
|
|
5441
|
+
error: () => this.modulesTree.set([]),
|
|
5442
|
+
});
|
|
5443
|
+
}
|
|
5289
5444
|
normalizeField(field) {
|
|
5290
5445
|
const type = field.type ?? 'dropdownTVService';
|
|
5291
5446
|
return {
|
|
@@ -5518,7 +5673,7 @@ class DynamicFiltersConfig {
|
|
|
5518
5673
|
useExisting: forwardRef(() => DynamicFiltersConfig),
|
|
5519
5674
|
multi: true,
|
|
5520
5675
|
},
|
|
5521
|
-
], ngImport: i0, template: "<div class=\"flex flex-col gap-3\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-2 border-b border-surface-200 pb-3\"\r\n >\r\n <h3 class=\"text-base font-semibold text-surface-800\">\r\n {{ t(\"filterFieldsConfiguration\") }}\r\n </h3>\r\n <div class=\"flex items-center gap-1.5\">\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addField')\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n (onClick)=\"addFilterField()\"\r\n [disabled]=\"disabled()\"\r\n />\r\n <mt-button\r\n icon=\"general.copy-06\"\r\n [pTooltip]=\"t('copyConfiguration')\"\r\n tooltipPosition=\"top\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n (onClick)=\"copyConfiguration()\"\r\n />\r\n <mt-button\r\n icon=\"general.clipboard\"\r\n [pTooltip]=\"t('pasteConfiguration')\"\r\n tooltipPosition=\"top\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n (onClick)=\"togglePasteArea()\"\r\n />\r\n </div>\r\n </div>\r\n\r\n @if (showPasteArea()) {\r\n <div\r\n class=\"flex flex-col gap-2 rounded-md border border-surface-200 bg-surface-50 p-3\"\r\n >\r\n <mt-textarea-field\r\n [label]=\"t('pasteConfigurationHere')\"\r\n [rows]=\"6\"\r\n [ngModel]=\"pasteContent()\"\r\n (ngModelChange)=\"pasteContent.set($event)\"\r\n [placeholder]=\"t('pasteJsonConfiguration')\"\r\n />\r\n @if (pasteError()) {\r\n <div class=\"text-sm text-red-500\">{{ pasteError() }}</div>\r\n }\r\n <div class=\"flex justify-end gap-2\">\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"togglePasteArea()\"\r\n />\r\n <mt-button\r\n [label]=\"t('applyConfiguration')\"\r\n size=\"small\"\r\n (onClick)=\"applyPastedConfiguration()\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n\r\n <div class=\"flex flex-col gap-3\">\r\n @for (field of filterFields(); track trackByIndex($index); let i = $index) {\r\n <section\r\n class=\"overflow-hidden rounded-md border border-surface-200 bg-surface-0\"\r\n >\r\n <div\r\n class=\"flex items-center justify-between gap-3 border-b border-surface-200 bg-surface-100 px-3 py-2\"\r\n >\r\n <div class=\"min-w-0\">\r\n <div class=\"truncate text-sm font-semibold text-surface-800\">\r\n {{ getFieldTitle(field, i) }}\r\n </div>\r\n <div class=\"text-xs text-muted-color\">\r\n {{ getFieldTypeLabel(field.type) }}\r\n </div>\r\n </div>\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n [text]=\"true\"\r\n (onClick)=\"removeFilterField(i)\"\r\n [disabled]=\"disabled()\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-col gap-3 p-3\">\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('fieldType')\"\r\n [options]=\"availableFieldTypes()\"\r\n optionValue=\"value\"\r\n optionLabel=\"label\"\r\n [ngModel]=\"field.type\"\r\n (ngModelChange)=\"onFieldTypeChange(i, $event)\"\r\n />\r\n\r\n @if (requiresKey(field.type)) {\r\n <mt-text-field\r\n [label]=\"t('fieldKey')\"\r\n [placeholder]=\"t('enterFieldKey')\"\r\n [ngModel]=\"field.key\"\r\n (ngModelChange)=\"updateField(i, 'key', $event)\"\r\n />\r\n }\r\n\r\n @if (requiresName(field.type)) {\r\n <mt-text-field\r\n [label]=\"t('nameEnglish')\"\r\n [placeholder]=\"t('enterEnglishName')\"\r\n [ngModel]=\"field.name?.en\"\r\n (ngModelChange)=\"updateFieldName(i, 'en', $event)\"\r\n />\r\n <mt-text-field\r\n [label]=\"t('nameArabic')\"\r\n [placeholder]=\"t('enterArabicName')\"\r\n [ngModel]=\"field.name?.ar\"\r\n (ngModelChange)=\"updateFieldName(i, 'ar', $event)\"\r\n />\r\n }\r\n </div>\r\n\r\n @if (hasTypeConfiguration(field)) {\r\n <div\r\n class=\"flex w-full flex-col gap-3 rounded-md border border-surface-200 bg-surface-50 p-3\"\r\n >\r\n <div class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"settings\") }}\r\n </div>\r\n\r\n @switch (field.type) {\r\n @case (\"dropdownTVService\") {\r\n @if (isDropdownConfigOpen(i)) {\r\n <div class=\"flex justify-end\">\r\n <mt-button\r\n [label]=\"t('close')\"\r\n icon=\"general.x-close\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [text]=\"true\"\r\n (onClick)=\"closeDropdownConfig(i)\"\r\n />\r\n </div>\r\n\r\n <mt-selection-configuration\r\n class=\"block w-full\"\r\n [workspaceId]=\"getDropdownWorkspaceId(field)\"\r\n [chartWorkspace]=\"getDropdownChartWorkspace(field)\"\r\n [ngModel]=\"getDropdownSelections(field)\"\r\n (ngModelChange)=\"updateDropdownSelections(i, $event)\"\r\n (moduleChange)=\"onDropdownModuleChange(i, $event)\"\r\n [modulesProperties]=\"getModulesPropertiesForField(i)\"\r\n [propertiesFlat]=\"getPropertiesFlatForField(i)\"\r\n />\r\n\r\n <mt-multi-select-field\r\n class=\"block w-full\"\r\n [label]=\"t('selectedProperties')\"\r\n [options]=\"getPropertiesFlatForField(i)\"\r\n optionValue=\"key\"\r\n optionLabel=\"name\"\r\n [filter]=\"true\"\r\n [ngModel]=\"getSelectedProperties(field)\"\r\n (ngModelChange)=\"updateSelectedProperties(i, $event)\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-2 rounded-md border border-surface-200 bg-surface-0 px-3 py-2\"\r\n >\r\n <span class=\"text-sm text-muted-color\">\r\n {{ getDropdownSummary(field) }}\r\n </span>\r\n <mt-button\r\n [label]=\"t('selectionsConfiguration')\"\r\n icon=\"general.settings-01\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"openDropdownConfig(i, field)\"\r\n />\r\n </div>\r\n }\r\n }\r\n\r\n @case (\"lookup\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('lookupId')\"\r\n [options]=\"lookups()\"\r\n optionValue=\"id\"\r\n optionLabel=\"displayName\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.lookupId\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'lookupId', $event)\"\r\n />\r\n </div>\r\n }\r\n\r\n @case (\"status\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('schemaLevelId')\"\r\n [options]=\"levelsSchema()\"\r\n optionValue=\"id\"\r\n optionLabel=\"description\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.schemaLevelId\"\r\n (ngModelChange)=\"onSchemaLevelChange(i, $event)\"\r\n />\r\n\r\n @if (field.configuration?.schemaLevelId) {\r\n <mt-select-field\r\n [label]=\"t('logId')\"\r\n [options]=\"levelLogs()\"\r\n optionValue=\"id\"\r\n optionLabel=\"description\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.logId\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'logId', $event)\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n @case (\"phaseGate\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('schemaLevelId')\"\r\n [options]=\"levelsSchema()\"\r\n optionValue=\"id\"\r\n optionLabel=\"description\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.schemaLevelId\"\r\n (ngModelChange)=\"onSchemaLevelChange(i, $event)\"\r\n />\r\n </div>\r\n }\r\n\r\n @case (\"checkbox\") {\r\n <mt-toggle-field\r\n [label]=\"t('defaultChecked')\"\r\n size=\"small\"\r\n [ngModel]=\"field.configuration?.checked ?? false\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'checked', $event)\"\r\n />\r\n }\r\n\r\n @case (\"year\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-number-field\r\n [label]=\"t('minYear')\"\r\n [placeholder]=\"t('minYear')\"\r\n [ngModel]=\"field.configuration?.minYear\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'minYear', $event)\"\r\n />\r\n <mt-number-field\r\n [label]=\"t('maxYear')\"\r\n [placeholder]=\"t('maxYear')\"\r\n [ngModel]=\"field.configuration?.maxYear\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'maxYear', $event)\"\r\n />\r\n </div>\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"flex flex-wrap items-center gap-4\">\r\n @if (supportsRequired(field)) {\r\n <mt-toggle-field\r\n [label]=\"t('isRequired')\"\r\n size=\"small\"\r\n [ngModel]=\"field.configuration?.isRequird ?? false\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'isRequird', $event)\"\r\n />\r\n }\r\n\r\n @if (supportsMultiple(field)) {\r\n <mt-toggle-field\r\n [label]=\"t('isMultiple')\"\r\n size=\"small\"\r\n [ngModel]=\"field.configuration?.isMultiple ?? false\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'isMultiple', $event)\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n </section>\r\n } @empty {\r\n <div\r\n class=\"flex flex-col items-center justify-center gap-2 rounded-md border border-dashed border-surface-300 py-10 text-center text-muted-color\"\r\n >\r\n <mt-icon icon=\"general.filter-lines\" class=\"text-3xl\" />\r\n <p class=\"text-sm font-medium\">{{ t(\"noFilterFieldsConfigured\") }}</p>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addField')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"addFilterField()\"\r\n [disabled]=\"disabled()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: NumberField, selector: "mt-number-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "pInputs", "format", "useGrouping", "maxFractionDigits", "min", "max", "required"] }, { kind: "component", type: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "component", type: TextareaField, selector: "mt-textarea-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "noErrorStyle", "pInputs", "rows", "required", "maxLength"] }, { kind: "component", type: SelectionConfiguration, selector: "mt-selection-configuration", inputs: ["structureLocked", "workspaceId", "chartWorkspace", "modulesProperties", "propertiesFlat"], outputs: ["moduleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
5676
|
+
], ngImport: i0, template: "<div class=\"flex flex-col gap-3\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <div\n class=\"flex flex-wrap items-center justify-between gap-2 border-b border-surface-200 pb-3\"\n >\n <h3 class=\"text-base font-semibold text-surface-800\">\n {{ t(\"filterFieldsConfiguration\") }}\n </h3>\n <div class=\"flex items-center gap-1.5\">\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addField')\"\n severity=\"primary\"\n size=\"small\"\n (onClick)=\"addFilterField()\"\n [disabled]=\"disabled()\"\n />\n <mt-button\n icon=\"general.copy-06\"\n [pTooltip]=\"t('copyConfiguration')\"\n tooltipPosition=\"top\"\n severity=\"secondary\"\n size=\"small\"\n [rounded]=\"true\"\n (onClick)=\"copyConfiguration()\"\n />\n <mt-button\n icon=\"general.clipboard\"\n [pTooltip]=\"t('pasteConfiguration')\"\n tooltipPosition=\"top\"\n severity=\"secondary\"\n size=\"small\"\n [rounded]=\"true\"\n (onClick)=\"togglePasteArea()\"\n />\n </div>\n </div>\n\n @if (showPasteArea()) {\n <div\n class=\"flex flex-col gap-2 rounded-md border border-surface-200 bg-surface-50 p-3\"\n >\n <mt-textarea-field\n [label]=\"t('pasteConfigurationHere')\"\n [rows]=\"6\"\n [ngModel]=\"pasteContent()\"\n (ngModelChange)=\"pasteContent.set($event)\"\n [placeholder]=\"t('pasteJsonConfiguration')\"\n />\n @if (pasteError()) {\n <div class=\"text-sm text-red-500\">{{ pasteError() }}</div>\n }\n <div class=\"flex justify-end gap-2\">\n <mt-button\n [label]=\"t('cancel')\"\n severity=\"secondary\"\n size=\"small\"\n (onClick)=\"togglePasteArea()\"\n />\n <mt-button\n [label]=\"t('applyConfiguration')\"\n size=\"small\"\n (onClick)=\"applyPastedConfiguration()\"\n />\n </div>\n </div>\n }\n\n <div class=\"flex flex-col gap-3\">\n @for (field of filterFields(); track trackByIndex($index); let i = $index) {\n <section\n class=\"overflow-hidden rounded-md border border-surface-200 bg-surface-0\"\n >\n <div\n class=\"flex items-center justify-between gap-3 border-b border-surface-200 bg-surface-100 px-3 py-2\"\n >\n <div class=\"min-w-0\">\n <div class=\"truncate text-sm font-semibold text-surface-800\">\n {{ getFieldTitle(field, i) }}\n </div>\n <div class=\"text-xs text-muted-color\">\n {{ getFieldTypeLabel(field.type) }}\n </div>\n </div>\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n size=\"small\"\n [rounded]=\"true\"\n [text]=\"true\"\n (onClick)=\"removeFilterField(i)\"\n [disabled]=\"disabled()\"\n />\n </div>\n\n <div class=\"flex flex-col gap-3 p-3\">\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\n <mt-select-field\n [label]=\"t('fieldType')\"\n [options]=\"availableFieldTypes()\"\n optionValue=\"value\"\n optionLabel=\"label\"\n [ngModel]=\"field.type\"\n (ngModelChange)=\"onFieldTypeChange(i, $event)\"\n />\n\n @if (requiresKey(field.type)) {\n <mt-text-field\n [label]=\"t('fieldKey')\"\n [placeholder]=\"t('enterFieldKey')\"\n [ngModel]=\"field.key\"\n (ngModelChange)=\"updateField(i, 'key', $event)\"\n />\n }\n\n @if (requiresName(field.type)) {\n <mt-text-field\n [label]=\"t('nameEnglish')\"\n [placeholder]=\"t('enterEnglishName')\"\n [ngModel]=\"field.name?.en\"\n (ngModelChange)=\"updateFieldName(i, 'en', $event)\"\n />\n <mt-text-field\n [label]=\"t('nameArabic')\"\n [placeholder]=\"t('enterArabicName')\"\n [ngModel]=\"field.name?.ar\"\n (ngModelChange)=\"updateFieldName(i, 'ar', $event)\"\n />\n }\n </div>\n\n @if (hasTypeConfiguration(field)) {\n <div\n class=\"flex w-full flex-col gap-3 rounded-md border border-surface-200 bg-surface-50 p-3\"\n >\n <div class=\"text-sm font-semibold text-surface-700\">\n {{ t(\"settings\") }}\n </div>\n\n @switch (field.type) {\n @case (\"dropdownTVService\") {\n @if (isDropdownConfigOpen(i)) {\n <div class=\"flex justify-end\">\n <mt-button\n [label]=\"t('close')\"\n icon=\"general.x-close\"\n severity=\"secondary\"\n size=\"small\"\n [text]=\"true\"\n (onClick)=\"closeDropdownConfig(i)\"\n />\n </div>\n\n <mt-selection-configuration\n class=\"block w-full\"\n [workspaceId]=\"getDropdownWorkspaceId(field)\"\n [chartWorkspace]=\"getDropdownChartWorkspace(field)\"\n [ngModel]=\"getDropdownSelections(field)\"\n (ngModelChange)=\"updateDropdownSelections(i, $event)\"\n (moduleChange)=\"onDropdownModuleChange(i, $event)\"\n [modulesProperties]=\"getModulesPropertiesForField(i)\"\n [propertiesFlat]=\"getPropertiesFlatForField(i)\"\n />\n\n <mt-multi-select-field\n class=\"block w-full\"\n [label]=\"t('selectedProperties')\"\n [options]=\"getPropertiesFlatForField(i)\"\n optionValue=\"key\"\n optionLabel=\"name\"\n [filter]=\"true\"\n [ngModel]=\"getSelectedProperties(field)\"\n (ngModelChange)=\"updateSelectedProperties(i, $event)\"\n />\n } @else {\n <div\n class=\"flex flex-wrap items-center justify-between gap-2 rounded-md border border-surface-200 bg-surface-0 px-3 py-2\"\n >\n <span class=\"text-sm text-muted-color\">\n {{ getDropdownSummary(field) }}\n </span>\n <mt-button\n [label]=\"t('selectionsConfiguration')\"\n icon=\"general.settings-01\"\n severity=\"secondary\"\n size=\"small\"\n (onClick)=\"openDropdownConfig(i, field)\"\n />\n </div>\n }\n }\n\n @case (\"lookup\") {\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\n <mt-select-field\n [label]=\"t('lookupId')\"\n [options]=\"lookupOptions()\"\n optionValue=\"id\"\n optionLabel=\"displayName\"\n [filter]=\"true\"\n [ngModel]=\"field.configuration?.lookupId\"\n (ngModelChange)=\"updateFieldConfig(i, 'lookupId', $event)\"\n />\n </div>\n }\n\n @case (\"status\") {\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\n <mt-select-field\n [label]=\"t('schemaLevelId')\"\n [options]=\"levelSchemaOptions()\"\n optionValue=\"id\"\n optionLabel=\"description\"\n [filter]=\"true\"\n [ngModel]=\"field.configuration?.schemaLevelId\"\n (ngModelChange)=\"onSchemaLevelChange(i, $event)\"\n />\n\n @if (field.configuration?.schemaLevelId) {\n <mt-select-field\n [label]=\"t('logId')\"\n [options]=\"levelLogs()\"\n optionValue=\"id\"\n optionLabel=\"description\"\n [filter]=\"true\"\n [ngModel]=\"field.configuration?.logId\"\n (ngModelChange)=\"updateFieldConfig(i, 'logId', $event)\"\n />\n }\n </div>\n }\n\n @case (\"phaseGate\") {\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\n <mt-select-field\n [label]=\"t('schemaLevelId')\"\n [options]=\"levelSchemaOptions()\"\n optionValue=\"id\"\n optionLabel=\"description\"\n [filter]=\"true\"\n [ngModel]=\"field.configuration?.schemaLevelId\"\n (ngModelChange)=\"onSchemaLevelChange(i, $event)\"\n />\n </div>\n }\n\n @case (\"checkbox\") {\n <mt-toggle-field\n [label]=\"t('defaultChecked')\"\n size=\"small\"\n [ngModel]=\"field.configuration?.checked ?? false\"\n (ngModelChange)=\"updateFieldConfig(i, 'checked', $event)\"\n />\n }\n\n @case (\"year\") {\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\n <mt-number-field\n [label]=\"t('minYear')\"\n [placeholder]=\"t('minYear')\"\n [ngModel]=\"field.configuration?.minYear\"\n (ngModelChange)=\"updateFieldConfig(i, 'minYear', $event)\"\n />\n <mt-number-field\n [label]=\"t('maxYear')\"\n [placeholder]=\"t('maxYear')\"\n [ngModel]=\"field.configuration?.maxYear\"\n (ngModelChange)=\"updateFieldConfig(i, 'maxYear', $event)\"\n />\n </div>\n }\n }\n </div>\n }\n\n <div class=\"flex flex-wrap items-center gap-4\">\n @if (supportsRequired(field)) {\n <mt-toggle-field\n [label]=\"t('isRequired')\"\n size=\"small\"\n [ngModel]=\"field.configuration?.isRequird ?? false\"\n (ngModelChange)=\"updateFieldConfig(i, 'isRequird', $event)\"\n />\n }\n\n @if (supportsMultiple(field)) {\n <mt-toggle-field\n [label]=\"t('isMultiple')\"\n size=\"small\"\n [ngModel]=\"field.configuration?.isMultiple ?? false\"\n (ngModelChange)=\"updateFieldConfig(i, 'isMultiple', $event)\"\n />\n }\n </div>\n </div>\n </section>\n } @empty {\n <div\n class=\"flex flex-col items-center justify-center gap-2 rounded-md border border-dashed border-surface-300 py-10 text-center text-muted-color\"\n >\n <mt-icon icon=\"general.filter-lines\" class=\"text-3xl\" />\n <p class=\"text-sm font-medium\">{{ t(\"noFilterFieldsConfigured\") }}</p>\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addField')\"\n severity=\"secondary\"\n size=\"small\"\n (onClick)=\"addFilterField()\"\n [disabled]=\"disabled()\"\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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: NumberField, selector: "mt-number-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "pInputs", "format", "useGrouping", "maxFractionDigits", "min", "max", "required"] }, { kind: "component", type: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "component", type: TextareaField, selector: "mt-textarea-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "noErrorStyle", "pInputs", "rows", "required", "maxLength"] }, { kind: "component", type: SelectionConfiguration, selector: "mt-selection-configuration", inputs: ["structureLocked", "workspaceId", "chartWorkspace", "modulesProperties", "propertiesFlat"], outputs: ["moduleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
5522
5677
|
}
|
|
5523
5678
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DynamicFiltersConfig, decorators: [{
|
|
5524
5679
|
type: Component,
|
|
@@ -5541,8 +5696,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
5541
5696
|
useExisting: forwardRef(() => DynamicFiltersConfig),
|
|
5542
5697
|
multi: true,
|
|
5543
5698
|
},
|
|
5544
|
-
], template: "<div class=\"flex flex-col gap-3\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-2 border-b border-surface-200 pb-3\"\r\n >\r\n <h3 class=\"text-base font-semibold text-surface-800\">\r\n {{ t(\"filterFieldsConfiguration\") }}\r\n </h3>\r\n <div class=\"flex items-center gap-1.5\">\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addField')\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n (onClick)=\"addFilterField()\"\r\n [disabled]=\"disabled()\"\r\n />\r\n <mt-button\r\n icon=\"general.copy-06\"\r\n [pTooltip]=\"t('copyConfiguration')\"\r\n tooltipPosition=\"top\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n (onClick)=\"copyConfiguration()\"\r\n />\r\n <mt-button\r\n icon=\"general.clipboard\"\r\n [pTooltip]=\"t('pasteConfiguration')\"\r\n tooltipPosition=\"top\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n (onClick)=\"togglePasteArea()\"\r\n />\r\n </div>\r\n </div>\r\n\r\n @if (showPasteArea()) {\r\n <div\r\n class=\"flex flex-col gap-2 rounded-md border border-surface-200 bg-surface-50 p-3\"\r\n >\r\n <mt-textarea-field\r\n [label]=\"t('pasteConfigurationHere')\"\r\n [rows]=\"6\"\r\n [ngModel]=\"pasteContent()\"\r\n (ngModelChange)=\"pasteContent.set($event)\"\r\n [placeholder]=\"t('pasteJsonConfiguration')\"\r\n />\r\n @if (pasteError()) {\r\n <div class=\"text-sm text-red-500\">{{ pasteError() }}</div>\r\n }\r\n <div class=\"flex justify-end gap-2\">\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"togglePasteArea()\"\r\n />\r\n <mt-button\r\n [label]=\"t('applyConfiguration')\"\r\n size=\"small\"\r\n (onClick)=\"applyPastedConfiguration()\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n\r\n <div class=\"flex flex-col gap-3\">\r\n @for (field of filterFields(); track trackByIndex($index); let i = $index) {\r\n <section\r\n class=\"overflow-hidden rounded-md border border-surface-200 bg-surface-0\"\r\n >\r\n <div\r\n class=\"flex items-center justify-between gap-3 border-b border-surface-200 bg-surface-100 px-3 py-2\"\r\n >\r\n <div class=\"min-w-0\">\r\n <div class=\"truncate text-sm font-semibold text-surface-800\">\r\n {{ getFieldTitle(field, i) }}\r\n </div>\r\n <div class=\"text-xs text-muted-color\">\r\n {{ getFieldTypeLabel(field.type) }}\r\n </div>\r\n </div>\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n [text]=\"true\"\r\n (onClick)=\"removeFilterField(i)\"\r\n [disabled]=\"disabled()\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-col gap-3 p-3\">\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('fieldType')\"\r\n [options]=\"availableFieldTypes()\"\r\n optionValue=\"value\"\r\n optionLabel=\"label\"\r\n [ngModel]=\"field.type\"\r\n (ngModelChange)=\"onFieldTypeChange(i, $event)\"\r\n />\r\n\r\n @if (requiresKey(field.type)) {\r\n <mt-text-field\r\n [label]=\"t('fieldKey')\"\r\n [placeholder]=\"t('enterFieldKey')\"\r\n [ngModel]=\"field.key\"\r\n (ngModelChange)=\"updateField(i, 'key', $event)\"\r\n />\r\n }\r\n\r\n @if (requiresName(field.type)) {\r\n <mt-text-field\r\n [label]=\"t('nameEnglish')\"\r\n [placeholder]=\"t('enterEnglishName')\"\r\n [ngModel]=\"field.name?.en\"\r\n (ngModelChange)=\"updateFieldName(i, 'en', $event)\"\r\n />\r\n <mt-text-field\r\n [label]=\"t('nameArabic')\"\r\n [placeholder]=\"t('enterArabicName')\"\r\n [ngModel]=\"field.name?.ar\"\r\n (ngModelChange)=\"updateFieldName(i, 'ar', $event)\"\r\n />\r\n }\r\n </div>\r\n\r\n @if (hasTypeConfiguration(field)) {\r\n <div\r\n class=\"flex w-full flex-col gap-3 rounded-md border border-surface-200 bg-surface-50 p-3\"\r\n >\r\n <div class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"settings\") }}\r\n </div>\r\n\r\n @switch (field.type) {\r\n @case (\"dropdownTVService\") {\r\n @if (isDropdownConfigOpen(i)) {\r\n <div class=\"flex justify-end\">\r\n <mt-button\r\n [label]=\"t('close')\"\r\n icon=\"general.x-close\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [text]=\"true\"\r\n (onClick)=\"closeDropdownConfig(i)\"\r\n />\r\n </div>\r\n\r\n <mt-selection-configuration\r\n class=\"block w-full\"\r\n [workspaceId]=\"getDropdownWorkspaceId(field)\"\r\n [chartWorkspace]=\"getDropdownChartWorkspace(field)\"\r\n [ngModel]=\"getDropdownSelections(field)\"\r\n (ngModelChange)=\"updateDropdownSelections(i, $event)\"\r\n (moduleChange)=\"onDropdownModuleChange(i, $event)\"\r\n [modulesProperties]=\"getModulesPropertiesForField(i)\"\r\n [propertiesFlat]=\"getPropertiesFlatForField(i)\"\r\n />\r\n\r\n <mt-multi-select-field\r\n class=\"block w-full\"\r\n [label]=\"t('selectedProperties')\"\r\n [options]=\"getPropertiesFlatForField(i)\"\r\n optionValue=\"key\"\r\n optionLabel=\"name\"\r\n [filter]=\"true\"\r\n [ngModel]=\"getSelectedProperties(field)\"\r\n (ngModelChange)=\"updateSelectedProperties(i, $event)\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-2 rounded-md border border-surface-200 bg-surface-0 px-3 py-2\"\r\n >\r\n <span class=\"text-sm text-muted-color\">\r\n {{ getDropdownSummary(field) }}\r\n </span>\r\n <mt-button\r\n [label]=\"t('selectionsConfiguration')\"\r\n icon=\"general.settings-01\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"openDropdownConfig(i, field)\"\r\n />\r\n </div>\r\n }\r\n }\r\n\r\n @case (\"lookup\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('lookupId')\"\r\n [options]=\"lookups()\"\r\n optionValue=\"id\"\r\n optionLabel=\"displayName\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.lookupId\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'lookupId', $event)\"\r\n />\r\n </div>\r\n }\r\n\r\n @case (\"status\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('schemaLevelId')\"\r\n [options]=\"levelsSchema()\"\r\n optionValue=\"id\"\r\n optionLabel=\"description\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.schemaLevelId\"\r\n (ngModelChange)=\"onSchemaLevelChange(i, $event)\"\r\n />\r\n\r\n @if (field.configuration?.schemaLevelId) {\r\n <mt-select-field\r\n [label]=\"t('logId')\"\r\n [options]=\"levelLogs()\"\r\n optionValue=\"id\"\r\n optionLabel=\"description\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.logId\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'logId', $event)\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n @case (\"phaseGate\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('schemaLevelId')\"\r\n [options]=\"levelsSchema()\"\r\n optionValue=\"id\"\r\n optionLabel=\"description\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.schemaLevelId\"\r\n (ngModelChange)=\"onSchemaLevelChange(i, $event)\"\r\n />\r\n </div>\r\n }\r\n\r\n @case (\"checkbox\") {\r\n <mt-toggle-field\r\n [label]=\"t('defaultChecked')\"\r\n size=\"small\"\r\n [ngModel]=\"field.configuration?.checked ?? false\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'checked', $event)\"\r\n />\r\n }\r\n\r\n @case (\"year\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-number-field\r\n [label]=\"t('minYear')\"\r\n [placeholder]=\"t('minYear')\"\r\n [ngModel]=\"field.configuration?.minYear\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'minYear', $event)\"\r\n />\r\n <mt-number-field\r\n [label]=\"t('maxYear')\"\r\n [placeholder]=\"t('maxYear')\"\r\n [ngModel]=\"field.configuration?.maxYear\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'maxYear', $event)\"\r\n />\r\n </div>\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"flex flex-wrap items-center gap-4\">\r\n @if (supportsRequired(field)) {\r\n <mt-toggle-field\r\n [label]=\"t('isRequired')\"\r\n size=\"small\"\r\n [ngModel]=\"field.configuration?.isRequird ?? false\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'isRequird', $event)\"\r\n />\r\n }\r\n\r\n @if (supportsMultiple(field)) {\r\n <mt-toggle-field\r\n [label]=\"t('isMultiple')\"\r\n size=\"small\"\r\n [ngModel]=\"field.configuration?.isMultiple ?? false\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'isMultiple', $event)\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n </section>\r\n } @empty {\r\n <div\r\n class=\"flex flex-col items-center justify-center gap-2 rounded-md border border-dashed border-surface-300 py-10 text-center text-muted-color\"\r\n >\r\n <mt-icon icon=\"general.filter-lines\" class=\"text-3xl\" />\r\n <p class=\"text-sm font-medium\">{{ t(\"noFilterFieldsConfigured\") }}</p>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addField')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"addFilterField()\"\r\n [disabled]=\"disabled()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n" }]
|
|
5545
|
-
}], propDecorators: { lookups: [{ type: i0.Input, args: [{ isSignal: true, alias: "lookups", required: false }] }], levelsSchema: [{ type: i0.Input, args: [{ isSignal: true, alias: "levelsSchema", required: false }] }], levelLogs: [{ type: i0.Input, args: [{ isSignal: true, alias: "levelLogs", required: false }] }], productType: [{ type: i0.Input, args: [{ isSignal: true, alias: "productType", required: false }] }], workspaceId: [{ type: i0.Input, args: [{ isSignal: true, alias: "workspaceId", required: false }] }], chartWorkspace: [{ type: i0.Input, args: [{ isSignal: true, alias: "chartWorkspace", required: false }] }], loadLevelLogs: [{ type: i0.Output, args: ["loadLevelLogs"] }] } });
|
|
5699
|
+
], template: "<div class=\"flex flex-col gap-3\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <div\n class=\"flex flex-wrap items-center justify-between gap-2 border-b border-surface-200 pb-3\"\n >\n <h3 class=\"text-base font-semibold text-surface-800\">\n {{ t(\"filterFieldsConfiguration\") }}\n </h3>\n <div class=\"flex items-center gap-1.5\">\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addField')\"\n severity=\"primary\"\n size=\"small\"\n (onClick)=\"addFilterField()\"\n [disabled]=\"disabled()\"\n />\n <mt-button\n icon=\"general.copy-06\"\n [pTooltip]=\"t('copyConfiguration')\"\n tooltipPosition=\"top\"\n severity=\"secondary\"\n size=\"small\"\n [rounded]=\"true\"\n (onClick)=\"copyConfiguration()\"\n />\n <mt-button\n icon=\"general.clipboard\"\n [pTooltip]=\"t('pasteConfiguration')\"\n tooltipPosition=\"top\"\n severity=\"secondary\"\n size=\"small\"\n [rounded]=\"true\"\n (onClick)=\"togglePasteArea()\"\n />\n </div>\n </div>\n\n @if (showPasteArea()) {\n <div\n class=\"flex flex-col gap-2 rounded-md border border-surface-200 bg-surface-50 p-3\"\n >\n <mt-textarea-field\n [label]=\"t('pasteConfigurationHere')\"\n [rows]=\"6\"\n [ngModel]=\"pasteContent()\"\n (ngModelChange)=\"pasteContent.set($event)\"\n [placeholder]=\"t('pasteJsonConfiguration')\"\n />\n @if (pasteError()) {\n <div class=\"text-sm text-red-500\">{{ pasteError() }}</div>\n }\n <div class=\"flex justify-end gap-2\">\n <mt-button\n [label]=\"t('cancel')\"\n severity=\"secondary\"\n size=\"small\"\n (onClick)=\"togglePasteArea()\"\n />\n <mt-button\n [label]=\"t('applyConfiguration')\"\n size=\"small\"\n (onClick)=\"applyPastedConfiguration()\"\n />\n </div>\n </div>\n }\n\n <div class=\"flex flex-col gap-3\">\n @for (field of filterFields(); track trackByIndex($index); let i = $index) {\n <section\n class=\"overflow-hidden rounded-md border border-surface-200 bg-surface-0\"\n >\n <div\n class=\"flex items-center justify-between gap-3 border-b border-surface-200 bg-surface-100 px-3 py-2\"\n >\n <div class=\"min-w-0\">\n <div class=\"truncate text-sm font-semibold text-surface-800\">\n {{ getFieldTitle(field, i) }}\n </div>\n <div class=\"text-xs text-muted-color\">\n {{ getFieldTypeLabel(field.type) }}\n </div>\n </div>\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n size=\"small\"\n [rounded]=\"true\"\n [text]=\"true\"\n (onClick)=\"removeFilterField(i)\"\n [disabled]=\"disabled()\"\n />\n </div>\n\n <div class=\"flex flex-col gap-3 p-3\">\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\n <mt-select-field\n [label]=\"t('fieldType')\"\n [options]=\"availableFieldTypes()\"\n optionValue=\"value\"\n optionLabel=\"label\"\n [ngModel]=\"field.type\"\n (ngModelChange)=\"onFieldTypeChange(i, $event)\"\n />\n\n @if (requiresKey(field.type)) {\n <mt-text-field\n [label]=\"t('fieldKey')\"\n [placeholder]=\"t('enterFieldKey')\"\n [ngModel]=\"field.key\"\n (ngModelChange)=\"updateField(i, 'key', $event)\"\n />\n }\n\n @if (requiresName(field.type)) {\n <mt-text-field\n [label]=\"t('nameEnglish')\"\n [placeholder]=\"t('enterEnglishName')\"\n [ngModel]=\"field.name?.en\"\n (ngModelChange)=\"updateFieldName(i, 'en', $event)\"\n />\n <mt-text-field\n [label]=\"t('nameArabic')\"\n [placeholder]=\"t('enterArabicName')\"\n [ngModel]=\"field.name?.ar\"\n (ngModelChange)=\"updateFieldName(i, 'ar', $event)\"\n />\n }\n </div>\n\n @if (hasTypeConfiguration(field)) {\n <div\n class=\"flex w-full flex-col gap-3 rounded-md border border-surface-200 bg-surface-50 p-3\"\n >\n <div class=\"text-sm font-semibold text-surface-700\">\n {{ t(\"settings\") }}\n </div>\n\n @switch (field.type) {\n @case (\"dropdownTVService\") {\n @if (isDropdownConfigOpen(i)) {\n <div class=\"flex justify-end\">\n <mt-button\n [label]=\"t('close')\"\n icon=\"general.x-close\"\n severity=\"secondary\"\n size=\"small\"\n [text]=\"true\"\n (onClick)=\"closeDropdownConfig(i)\"\n />\n </div>\n\n <mt-selection-configuration\n class=\"block w-full\"\n [workspaceId]=\"getDropdownWorkspaceId(field)\"\n [chartWorkspace]=\"getDropdownChartWorkspace(field)\"\n [ngModel]=\"getDropdownSelections(field)\"\n (ngModelChange)=\"updateDropdownSelections(i, $event)\"\n (moduleChange)=\"onDropdownModuleChange(i, $event)\"\n [modulesProperties]=\"getModulesPropertiesForField(i)\"\n [propertiesFlat]=\"getPropertiesFlatForField(i)\"\n />\n\n <mt-multi-select-field\n class=\"block w-full\"\n [label]=\"t('selectedProperties')\"\n [options]=\"getPropertiesFlatForField(i)\"\n optionValue=\"key\"\n optionLabel=\"name\"\n [filter]=\"true\"\n [ngModel]=\"getSelectedProperties(field)\"\n (ngModelChange)=\"updateSelectedProperties(i, $event)\"\n />\n } @else {\n <div\n class=\"flex flex-wrap items-center justify-between gap-2 rounded-md border border-surface-200 bg-surface-0 px-3 py-2\"\n >\n <span class=\"text-sm text-muted-color\">\n {{ getDropdownSummary(field) }}\n </span>\n <mt-button\n [label]=\"t('selectionsConfiguration')\"\n icon=\"general.settings-01\"\n severity=\"secondary\"\n size=\"small\"\n (onClick)=\"openDropdownConfig(i, field)\"\n />\n </div>\n }\n }\n\n @case (\"lookup\") {\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\n <mt-select-field\n [label]=\"t('lookupId')\"\n [options]=\"lookupOptions()\"\n optionValue=\"id\"\n optionLabel=\"displayName\"\n [filter]=\"true\"\n [ngModel]=\"field.configuration?.lookupId\"\n (ngModelChange)=\"updateFieldConfig(i, 'lookupId', $event)\"\n />\n </div>\n }\n\n @case (\"status\") {\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\n <mt-select-field\n [label]=\"t('schemaLevelId')\"\n [options]=\"levelSchemaOptions()\"\n optionValue=\"id\"\n optionLabel=\"description\"\n [filter]=\"true\"\n [ngModel]=\"field.configuration?.schemaLevelId\"\n (ngModelChange)=\"onSchemaLevelChange(i, $event)\"\n />\n\n @if (field.configuration?.schemaLevelId) {\n <mt-select-field\n [label]=\"t('logId')\"\n [options]=\"levelLogs()\"\n optionValue=\"id\"\n optionLabel=\"description\"\n [filter]=\"true\"\n [ngModel]=\"field.configuration?.logId\"\n (ngModelChange)=\"updateFieldConfig(i, 'logId', $event)\"\n />\n }\n </div>\n }\n\n @case (\"phaseGate\") {\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\n <mt-select-field\n [label]=\"t('schemaLevelId')\"\n [options]=\"levelSchemaOptions()\"\n optionValue=\"id\"\n optionLabel=\"description\"\n [filter]=\"true\"\n [ngModel]=\"field.configuration?.schemaLevelId\"\n (ngModelChange)=\"onSchemaLevelChange(i, $event)\"\n />\n </div>\n }\n\n @case (\"checkbox\") {\n <mt-toggle-field\n [label]=\"t('defaultChecked')\"\n size=\"small\"\n [ngModel]=\"field.configuration?.checked ?? false\"\n (ngModelChange)=\"updateFieldConfig(i, 'checked', $event)\"\n />\n }\n\n @case (\"year\") {\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\n <mt-number-field\n [label]=\"t('minYear')\"\n [placeholder]=\"t('minYear')\"\n [ngModel]=\"field.configuration?.minYear\"\n (ngModelChange)=\"updateFieldConfig(i, 'minYear', $event)\"\n />\n <mt-number-field\n [label]=\"t('maxYear')\"\n [placeholder]=\"t('maxYear')\"\n [ngModel]=\"field.configuration?.maxYear\"\n (ngModelChange)=\"updateFieldConfig(i, 'maxYear', $event)\"\n />\n </div>\n }\n }\n </div>\n }\n\n <div class=\"flex flex-wrap items-center gap-4\">\n @if (supportsRequired(field)) {\n <mt-toggle-field\n [label]=\"t('isRequired')\"\n size=\"small\"\n [ngModel]=\"field.configuration?.isRequird ?? false\"\n (ngModelChange)=\"updateFieldConfig(i, 'isRequird', $event)\"\n />\n }\n\n @if (supportsMultiple(field)) {\n <mt-toggle-field\n [label]=\"t('isMultiple')\"\n size=\"small\"\n [ngModel]=\"field.configuration?.isMultiple ?? false\"\n (ngModelChange)=\"updateFieldConfig(i, 'isMultiple', $event)\"\n />\n }\n </div>\n </div>\n </section>\n } @empty {\n <div\n class=\"flex flex-col items-center justify-center gap-2 rounded-md border border-dashed border-surface-300 py-10 text-center text-muted-color\"\n >\n <mt-icon icon=\"general.filter-lines\" class=\"text-3xl\" />\n <p class=\"text-sm font-medium\">{{ t(\"noFilterFieldsConfigured\") }}</p>\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addField')\"\n severity=\"secondary\"\n size=\"small\"\n (onClick)=\"addFilterField()\"\n [disabled]=\"disabled()\"\n />\n </div>\n }\n </div>\n</div>\n" }]
|
|
5700
|
+
}], ctorParameters: () => [], propDecorators: { lookups: [{ type: i0.Input, args: [{ isSignal: true, alias: "lookups", required: false }] }], levelsSchema: [{ type: i0.Input, args: [{ isSignal: true, alias: "levelsSchema", required: false }] }], levelLogs: [{ type: i0.Input, args: [{ isSignal: true, alias: "levelLogs", required: false }] }], productType: [{ type: i0.Input, args: [{ isSignal: true, alias: "productType", required: false }] }], workspaceId: [{ type: i0.Input, args: [{ isSignal: true, alias: "workspaceId", required: false }] }], chartWorkspace: [{ type: i0.Input, args: [{ isSignal: true, alias: "chartWorkspace", required: false }] }], loadLevelLogs: [{ type: i0.Output, args: ["loadLevelLogs"] }] } });
|
|
5546
5701
|
|
|
5547
5702
|
/**
|
|
5548
5703
|
* Manage Filter On Page Component
|
|
@@ -6334,6 +6489,24 @@ const TABLE_LEGEND_SECTION = {
|
|
|
6334
6489
|
path: 'clientConfig.configAsType.legend.show',
|
|
6335
6490
|
default: true,
|
|
6336
6491
|
},
|
|
6492
|
+
{
|
|
6493
|
+
key: 'legend.position',
|
|
6494
|
+
label: 'Legend position',
|
|
6495
|
+
type: 'select',
|
|
6496
|
+
path: 'clientConfig.configAsType.legend.position',
|
|
6497
|
+
default: 'top',
|
|
6498
|
+
options: LEGEND_POSITION_OPTIONS,
|
|
6499
|
+
visibleWhen: (cfg) => cfg.clientConfig?.configAsType?.legend?.show !== false,
|
|
6500
|
+
},
|
|
6501
|
+
{
|
|
6502
|
+
key: 'legend.iconType',
|
|
6503
|
+
label: 'Legend icon',
|
|
6504
|
+
type: 'select',
|
|
6505
|
+
path: 'clientConfig.configAsType.legend.iconType',
|
|
6506
|
+
default: 'circle',
|
|
6507
|
+
options: LEGEND_ICON_OPTIONS,
|
|
6508
|
+
visibleWhen: (cfg) => cfg.clientConfig?.configAsType?.legend?.show !== false,
|
|
6509
|
+
},
|
|
6337
6510
|
{
|
|
6338
6511
|
key: 'legend.order',
|
|
6339
6512
|
label: 'Legend order',
|
|
@@ -7036,14 +7209,17 @@ const PIE_CHART_SECTION = {
|
|
|
7036
7209
|
scope: 'advanced',
|
|
7037
7210
|
},
|
|
7038
7211
|
{
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
// from older configs are still honored for read.
|
|
7042
|
-
key: 'centerLabel',
|
|
7043
|
-
label: 'Center label',
|
|
7212
|
+
key: 'centerLabelEn',
|
|
7213
|
+
label: 'Center label (English)',
|
|
7044
7214
|
type: 'text',
|
|
7045
7215
|
path: 'clientConfig.configAsType.labelCenter.text.en',
|
|
7046
7216
|
},
|
|
7217
|
+
{
|
|
7218
|
+
key: 'centerLabelAr',
|
|
7219
|
+
label: 'Center label (Arabic)',
|
|
7220
|
+
type: 'text',
|
|
7221
|
+
path: 'clientConfig.configAsType.labelCenter.text.ar',
|
|
7222
|
+
},
|
|
7047
7223
|
{
|
|
7048
7224
|
key: 'roseType',
|
|
7049
7225
|
label: 'Rose type',
|
|
@@ -8255,8 +8431,7 @@ const SCHEMA_DEFS = [
|
|
|
8255
8431
|
sections: [
|
|
8256
8432
|
...COMMON_CHART_BASE,
|
|
8257
8433
|
TIMELINE_SECTION,
|
|
8258
|
-
// Timeline
|
|
8259
|
-
// legend position/icon don't apply to the timeline renderer.
|
|
8434
|
+
// Timeline consumes the same show/position/icon/order contract as tables.
|
|
8260
8435
|
TABLE_LEGEND_SECTION,
|
|
8261
8436
|
FORMAT_SECTION,
|
|
8262
8437
|
...COMMON_CHART_TAIL,
|
|
@@ -9473,9 +9648,13 @@ const STACK_BAR_BINDINGS = [
|
|
|
9473
9648
|
domain: 'chart',
|
|
9474
9649
|
label: 'Show total',
|
|
9475
9650
|
uiPath: 'chart.showTotal',
|
|
9476
|
-
persistedPath: 'clientConfig.configAsType.
|
|
9477
|
-
runtimePath: 'clientConfig.configAsType.
|
|
9478
|
-
rendererReadPaths: [
|
|
9651
|
+
persistedPath: 'clientConfig.configAsType.label.showTotalInTop',
|
|
9652
|
+
runtimePath: 'clientConfig.configAsType.label.showTotalInTop',
|
|
9653
|
+
rendererReadPaths: [
|
|
9654
|
+
'clientConfig.configAsType.label.showTotalInTop',
|
|
9655
|
+
'clientConfig.configAsType.showTotal',
|
|
9656
|
+
],
|
|
9657
|
+
legacyPersistPaths: ['clientConfig.configAsType.showTotal'],
|
|
9479
9658
|
simpleOrAdvanced: 'simple',
|
|
9480
9659
|
},
|
|
9481
9660
|
{
|
|
@@ -9536,16 +9715,24 @@ const PIE_DONUT_BINDINGS = [
|
|
|
9536
9715
|
},
|
|
9537
9716
|
{
|
|
9538
9717
|
chartId: 'chart-donut-chart',
|
|
9539
|
-
controlId: '
|
|
9718
|
+
controlId: 'centerLabelEn',
|
|
9540
9719
|
domain: 'chart',
|
|
9541
|
-
label: 'Center label',
|
|
9542
|
-
uiPath: 'chart.
|
|
9720
|
+
label: 'Center label (English)',
|
|
9721
|
+
uiPath: 'chart.centerLabelEn',
|
|
9543
9722
|
persistedPath: 'clientConfig.configAsType.labelCenter.text.en',
|
|
9544
9723
|
runtimePath: 'clientConfig.configAsType.labelCenter.text.en',
|
|
9545
|
-
rendererReadPaths: [
|
|
9546
|
-
|
|
9547
|
-
|
|
9548
|
-
|
|
9724
|
+
rendererReadPaths: ['clientConfig.configAsType.labelCenter.text.en'],
|
|
9725
|
+
simpleOrAdvanced: 'simple',
|
|
9726
|
+
},
|
|
9727
|
+
{
|
|
9728
|
+
chartId: 'chart-donut-chart',
|
|
9729
|
+
controlId: 'centerLabelAr',
|
|
9730
|
+
domain: 'chart',
|
|
9731
|
+
label: 'Center label (Arabic)',
|
|
9732
|
+
uiPath: 'chart.centerLabelAr',
|
|
9733
|
+
persistedPath: 'clientConfig.configAsType.labelCenter.text.ar',
|
|
9734
|
+
runtimePath: 'clientConfig.configAsType.labelCenter.text.ar',
|
|
9735
|
+
rendererReadPaths: ['clientConfig.configAsType.labelCenter.text.ar'],
|
|
9549
9736
|
simpleOrAdvanced: 'simple',
|
|
9550
9737
|
},
|
|
9551
9738
|
{
|
|
@@ -11960,7 +12147,7 @@ function formatCurrency(value, config, langCode = 'en') {
|
|
|
11960
12147
|
return String(value);
|
|
11961
12148
|
}
|
|
11962
12149
|
const hostCurrency = getHostCurrencySettings();
|
|
11963
|
-
const decimals = config?.decimals
|
|
12150
|
+
const decimals = normalizeFractionDigits(config?.decimals, 1);
|
|
11964
12151
|
const arabicSuffixes = {
|
|
11965
12152
|
thousand: ' ألف',
|
|
11966
12153
|
million: ' مليون',
|
|
@@ -11969,10 +12156,10 @@ function formatCurrency(value, config, langCode = 'en') {
|
|
|
11969
12156
|
};
|
|
11970
12157
|
const isNegative = numValue < 0;
|
|
11971
12158
|
const absValue = Math.abs(numValue);
|
|
11972
|
-
//
|
|
11973
|
-
//
|
|
12159
|
+
// The host pattern owns grouping/compaction, while an explicitly configured
|
|
12160
|
+
// chart precision owns the number of fraction digits shown in this chart.
|
|
11974
12161
|
let newValue = hostCurrency.source === 'systemSettings'
|
|
11975
|
-
? formatBySystemCurrencyPattern(absValue, hostCurrency.format)
|
|
12162
|
+
? formatBySystemCurrencyPattern(absValue, hostCurrency.format, config?.decimals)
|
|
11976
12163
|
: '';
|
|
11977
12164
|
let suffix = '';
|
|
11978
12165
|
if (!newValue && absValue >= 1_000_000_000_000) {
|
|
@@ -12006,9 +12193,10 @@ function formatCurrency(value, config, langCode = 'en') {
|
|
|
12006
12193
|
newValue = '-' + newValue;
|
|
12007
12194
|
}
|
|
12008
12195
|
newValue += suffix;
|
|
12009
|
-
//
|
|
12010
|
-
//
|
|
12011
|
-
|
|
12196
|
+
// Currency format shows the unit by default, but an explicit false from the
|
|
12197
|
+
// Bar Style control must be authoritative in the live preview and runtime.
|
|
12198
|
+
const shouldShowCurrency = config?.showCurrency ?? config?.type === 'currency';
|
|
12199
|
+
if (shouldShowCurrency) {
|
|
12012
12200
|
newValue += getCurrencySuffix(langCode);
|
|
12013
12201
|
}
|
|
12014
12202
|
return newValue;
|
|
@@ -12102,14 +12290,14 @@ function normalizeCurrencyValue(value, source) {
|
|
|
12102
12290
|
source,
|
|
12103
12291
|
};
|
|
12104
12292
|
}
|
|
12105
|
-
function formatBySystemCurrencyPattern(value, format) {
|
|
12293
|
+
function formatBySystemCurrencyPattern(value, format, fractionDigitsOverride) {
|
|
12106
12294
|
const pattern = extractCurrencyPattern(format);
|
|
12107
12295
|
if (!pattern) {
|
|
12108
12296
|
return '';
|
|
12109
12297
|
}
|
|
12110
12298
|
const compactThousands = /,\s*K/i.test(pattern);
|
|
12111
12299
|
const normalizedValue = compactThousands ? value / 1000 : value;
|
|
12112
|
-
const decimals = resolveCurrencyPatternFractionDigits(pattern);
|
|
12300
|
+
const decimals = normalizeFractionDigits(fractionDigitsOverride, resolveCurrencyPatternFractionDigits(pattern));
|
|
12113
12301
|
const useGrouping = pattern.includes('#,') || /^N\d+$/i.test(pattern);
|
|
12114
12302
|
const formatted = new Intl.NumberFormat('en-US', {
|
|
12115
12303
|
useGrouping,
|
|
@@ -12118,6 +12306,12 @@ function formatBySystemCurrencyPattern(value, format) {
|
|
|
12118
12306
|
}).format(normalizedValue);
|
|
12119
12307
|
return compactThousands ? `${formatted} K` : formatted;
|
|
12120
12308
|
}
|
|
12309
|
+
function normalizeFractionDigits(value, fallback) {
|
|
12310
|
+
const parsed = typeof value === 'number' ? value : Number(value);
|
|
12311
|
+
if (!Number.isFinite(parsed))
|
|
12312
|
+
return fallback;
|
|
12313
|
+
return Math.min(20, Math.max(0, Math.trunc(parsed)));
|
|
12314
|
+
}
|
|
12121
12315
|
function extractCurrencyPattern(format) {
|
|
12122
12316
|
if (!format) {
|
|
12123
12317
|
return '';
|
|
@@ -12442,7 +12636,8 @@ function formatValue(value, configFormat, langCode = 'en') {
|
|
|
12442
12636
|
}
|
|
12443
12637
|
else if (type === 'percentage') {
|
|
12444
12638
|
const num = Number(value);
|
|
12445
|
-
|
|
12639
|
+
const decimals = normalizeConfiguredDecimals(configFormat?.decimals, 2);
|
|
12640
|
+
return (isNaN(num) ? value : num.toFixed(decimals)) + '%';
|
|
12446
12641
|
}
|
|
12447
12642
|
else if (type === 'custom') {
|
|
12448
12643
|
return `${value}${configFormat?.customText ?? ''}`;
|
|
@@ -12479,7 +12674,23 @@ function formatValue(value, configFormat, langCode = 'en') {
|
|
|
12479
12674
|
!isNaN(Number(value))
|
|
12480
12675
|
? Number(value)
|
|
12481
12676
|
: null;
|
|
12482
|
-
|
|
12677
|
+
if (num === null)
|
|
12678
|
+
return value;
|
|
12679
|
+
const configuredDecimals = configFormat?.decimals;
|
|
12680
|
+
if (configuredDecimals === undefined || configuredDecimals === null) {
|
|
12681
|
+
return formatNumber(num);
|
|
12682
|
+
}
|
|
12683
|
+
const decimals = normalizeConfiguredDecimals(configuredDecimals, 0);
|
|
12684
|
+
return formatNumber(num, {
|
|
12685
|
+
minimumFractionDigits: decimals,
|
|
12686
|
+
maximumFractionDigits: decimals,
|
|
12687
|
+
});
|
|
12688
|
+
}
|
|
12689
|
+
function normalizeConfiguredDecimals(value, fallback) {
|
|
12690
|
+
const parsed = typeof value === 'number' ? value : Number(value);
|
|
12691
|
+
if (!Number.isFinite(parsed))
|
|
12692
|
+
return fallback;
|
|
12693
|
+
return Math.min(20, Math.max(0, Math.trunc(parsed)));
|
|
12483
12694
|
}
|
|
12484
12695
|
/**
|
|
12485
12696
|
* Add commas to number for display (same as old)
|
|
@@ -13555,6 +13766,7 @@ class BarChartHandler {
|
|
|
13555
13766
|
const clientConfig = config.clientConfig || {};
|
|
13556
13767
|
const configAsType = clientConfig.configAsType || {};
|
|
13557
13768
|
const barOverride = clientConfig.barConfigOverride;
|
|
13769
|
+
const valueFormat = this.resolveBarValueFormat(clientConfig, barOverride);
|
|
13558
13770
|
// Pass-5: bar orientation honors both the schema-bound
|
|
13559
13771
|
// `barConfigOverride.orientation` ('horizontal'/'vertical') string and the
|
|
13560
13772
|
// legacy `configAsType.isHorizontal` boolean. Schema string wins when
|
|
@@ -13760,9 +13972,7 @@ class BarChartHandler {
|
|
|
13760
13972
|
fontSize: generalConfiguration?.fontConfig?.fontSizeConfig?.label,
|
|
13761
13973
|
formatter: (params) => {
|
|
13762
13974
|
const total = params.value;
|
|
13763
|
-
return total
|
|
13764
|
-
? formatValue(total, clientConfig?.['format'], languageCode)
|
|
13765
|
-
: '';
|
|
13975
|
+
return total ? formatValue(total, valueFormat, languageCode) : '';
|
|
13766
13976
|
},
|
|
13767
13977
|
},
|
|
13768
13978
|
showBackground: configAsType?.['Background']?.show,
|
|
@@ -13778,7 +13988,7 @@ class BarChartHandler {
|
|
|
13778
13988
|
const legendIcon = configAsType?.['legend']?.['iconType'];
|
|
13779
13989
|
return params
|
|
13780
13990
|
.map((param) => {
|
|
13781
|
-
const value = formatValue(param.value,
|
|
13991
|
+
const value = formatValue(param.value, valueFormat, languageCode);
|
|
13782
13992
|
const showValueOnlyInTooltip = barOverride?.showValueOnlyInTooltip;
|
|
13783
13993
|
if (showValueOnlyInTooltip) {
|
|
13784
13994
|
return value;
|
|
@@ -13801,7 +14011,7 @@ class BarChartHandler {
|
|
|
13801
14011
|
};
|
|
13802
14012
|
// Apply bar override configurations if they exist
|
|
13803
14013
|
if (barOverride) {
|
|
13804
|
-
this.applyBarOverrides(baseConfig, barOverride, isHorizontal);
|
|
14014
|
+
this.applyBarOverrides(baseConfig, barOverride, isHorizontal, valueFormat);
|
|
13805
14015
|
}
|
|
13806
14016
|
// Add percentage bars if needed
|
|
13807
14017
|
if (isPercentage) {
|
|
@@ -13905,10 +14115,31 @@ class BarChartHandler {
|
|
|
13905
14115
|
}
|
|
13906
14116
|
return 0;
|
|
13907
14117
|
}
|
|
14118
|
+
/** Convert the numeric Style Studio width into the ECharts CSS dimension. */
|
|
14119
|
+
resolveBarWidth(barWidth) {
|
|
14120
|
+
if (barWidth === undefined || barWidth === null || barWidth === '') {
|
|
14121
|
+
return undefined;
|
|
14122
|
+
}
|
|
14123
|
+
const parsed = typeof barWidth === 'number' ? barWidth : Number(barWidth);
|
|
14124
|
+
if (!Number.isFinite(parsed))
|
|
14125
|
+
return undefined;
|
|
14126
|
+
return `${Math.min(100, Math.max(0, parsed))}px`;
|
|
14127
|
+
}
|
|
14128
|
+
/**
|
|
14129
|
+
* The bar-specific currency switch applies to every displayed bar value,
|
|
14130
|
+
* not only the value axis. Preserve the generic format when the switch has
|
|
14131
|
+
* never been configured.
|
|
14132
|
+
*/
|
|
14133
|
+
resolveBarValueFormat(clientConfig, barOverride) {
|
|
14134
|
+
const format = clientConfig?.format;
|
|
14135
|
+
if (barOverride?.showCurrency === undefined)
|
|
14136
|
+
return format;
|
|
14137
|
+
return { ...(format || {}), showCurrency: barOverride.showCurrency };
|
|
14138
|
+
}
|
|
13908
14139
|
/**
|
|
13909
14140
|
* Apply bar override configurations
|
|
13910
14141
|
*/
|
|
13911
|
-
applyBarOverrides(baseConfig, barOverride, isHorizontal) {
|
|
14142
|
+
applyBarOverrides(baseConfig, barOverride, isHorizontal, valueFormat) {
|
|
13912
14143
|
// Grid settings
|
|
13913
14144
|
if (barOverride.gridTop)
|
|
13914
14145
|
baseConfig.grid.top = barOverride.gridTop;
|
|
@@ -13920,8 +14151,12 @@ class BarChartHandler {
|
|
|
13920
14151
|
baseConfig.grid.right = barOverride.gridRight;
|
|
13921
14152
|
// Bar settings
|
|
13922
14153
|
const series = baseConfig.series[0];
|
|
13923
|
-
|
|
13924
|
-
|
|
14154
|
+
const barWidth = this.resolveBarWidth(barOverride.barWidth);
|
|
14155
|
+
if (barWidth !== undefined) {
|
|
14156
|
+
baseConfig.series
|
|
14157
|
+
.filter((item) => item?.type === 'bar')
|
|
14158
|
+
.forEach((item) => (item.barWidth = barWidth));
|
|
14159
|
+
}
|
|
13925
14160
|
if (barOverride.barGap)
|
|
13926
14161
|
series.barGap = barOverride.barGap;
|
|
13927
14162
|
if (barOverride.barCategoryGap)
|
|
@@ -13957,13 +14192,14 @@ class BarChartHandler {
|
|
|
13957
14192
|
case 'currency':
|
|
13958
14193
|
return formatCurrency(value, {
|
|
13959
14194
|
type: 'currency',
|
|
13960
|
-
showCurrency: barOverride.showCurrency
|
|
14195
|
+
showCurrency: barOverride.showCurrency ?? false,
|
|
13961
14196
|
handleLang: true,
|
|
14197
|
+
decimals: valueFormat?.decimals,
|
|
13962
14198
|
}, this.storeService.languageCode());
|
|
13963
14199
|
case 'percentage':
|
|
13964
|
-
return (
|
|
14200
|
+
return formatValue(value, { type: 'percentage', decimals: valueFormat?.decimals }, this.storeService.languageCode());
|
|
13965
14201
|
case 'number':
|
|
13966
|
-
return
|
|
14202
|
+
return formatValue(value, { type: 'number', decimals: valueFormat?.decimals }, this.storeService.languageCode());
|
|
13967
14203
|
default:
|
|
13968
14204
|
return value;
|
|
13969
14205
|
}
|
|
@@ -14013,6 +14249,7 @@ class BarChartHandler {
|
|
|
14013
14249
|
const categories = dataResponse.categories || [];
|
|
14014
14250
|
const clientConfig = config.clientConfig || {};
|
|
14015
14251
|
const configAsType = clientConfig.configAsType || {};
|
|
14252
|
+
const valueFormat = this.resolveBarValueFormat(clientConfig, barOverride);
|
|
14016
14253
|
const defaultColor = configAsType?.['defaultColors']?.[0] || '#4caf50';
|
|
14017
14254
|
const groupedBorderRadius = this.resolveBarBorderRadius(barOverride?.borderRadius);
|
|
14018
14255
|
const groupedBorderRadiusStyle = groupedBorderRadius > 0
|
|
@@ -14049,7 +14286,7 @@ class BarChartHandler {
|
|
|
14049
14286
|
color: colorMap.get(type.key?.toLowerCase()) || defaultColor,
|
|
14050
14287
|
borderRadius: groupedBorderRadiusStyle,
|
|
14051
14288
|
},
|
|
14052
|
-
barWidth: barOverride?.barWidth
|
|
14289
|
+
barWidth: this.resolveBarWidth(barOverride?.barWidth) ?? '45px',
|
|
14053
14290
|
label: {
|
|
14054
14291
|
show: configAsType?.['label']?.show ?? true,
|
|
14055
14292
|
position: 'inside',
|
|
@@ -14115,7 +14352,7 @@ class BarChartHandler {
|
|
|
14115
14352
|
// grouped bars. Each individual read inside applyBarOverrides is guarded on
|
|
14116
14353
|
// its override value being defined, so absent config keeps current behavior.
|
|
14117
14354
|
if (barOverride) {
|
|
14118
|
-
this.applyBarOverrides(baseConfig, barOverride, isHorizontal);
|
|
14355
|
+
this.applyBarOverrides(baseConfig, barOverride, isHorizontal, valueFormat);
|
|
14119
14356
|
}
|
|
14120
14357
|
return {
|
|
14121
14358
|
...baseConfig,
|
|
@@ -14663,7 +14900,10 @@ class PieChartHandler {
|
|
|
14663
14900
|
pieOverride?.outerRadiusPercent ??
|
|
14664
14901
|
undefined;
|
|
14665
14902
|
const labelPosition = this.normalizePieLabelPosition(pieOverride?.labelPosition);
|
|
14666
|
-
|
|
14903
|
+
// `useEnhancedLegend` exposes additional layout controls; it does not
|
|
14904
|
+
// replace the ECharts legend with another renderer. Hiding the canvas
|
|
14905
|
+
// legend here made type/font controls appear broken in Style Studio.
|
|
14906
|
+
const hasCanvasLegend = showLegend;
|
|
14667
14907
|
const suppressCanvasSliceLabels = hasCanvasLegend;
|
|
14668
14908
|
// Chart settings
|
|
14669
14909
|
const chartSettings = {
|
|
@@ -14681,7 +14921,7 @@ class PieChartHandler {
|
|
|
14681
14921
|
// Build legends
|
|
14682
14922
|
const allLegend = [
|
|
14683
14923
|
{
|
|
14684
|
-
show: hasCanvasLegend,
|
|
14924
|
+
show: hasCanvasLegend,
|
|
14685
14925
|
align: languageCode === 'en' ? 'left' : 'right',
|
|
14686
14926
|
left: 'center',
|
|
14687
14927
|
bottom: '3%',
|
|
@@ -14911,7 +15151,7 @@ class PieChartHandler {
|
|
|
14911
15151
|
legend.type = pieOverride.legendType;
|
|
14912
15152
|
});
|
|
14913
15153
|
}
|
|
14914
|
-
if (pieOverride.legendFontSize) {
|
|
15154
|
+
if (pieOverride.legendFontSize !== undefined) {
|
|
14915
15155
|
applyLegendOverride((legend) => {
|
|
14916
15156
|
ensureLegendTextStyle(legend);
|
|
14917
15157
|
legend.textStyle.fontSize = pieOverride.legendFontSize;
|
|
@@ -15360,6 +15600,12 @@ class StackBarChartHandler {
|
|
|
15360
15600
|
const legendPosition = this.normalizeLegendPosition(configAsType?.['legend']?.['position']);
|
|
15361
15601
|
const legendLayout = this.getLegendLayout(legendPosition);
|
|
15362
15602
|
const overrideLabels = configAsType?.['overrideLabels'];
|
|
15603
|
+
// The Style Studio writes the canonical nested label flag. Keep reading
|
|
15604
|
+
// the earlier top-level path so saved dashboards created during the schema
|
|
15605
|
+
// migration still render their configured total.
|
|
15606
|
+
const showStackTotal = configAsType?.['label']?.['showTotalInTop'] ??
|
|
15607
|
+
configAsType?.['showTotal'] ??
|
|
15608
|
+
false;
|
|
15363
15609
|
// Pass-5: stack bar honors the schema-bound
|
|
15364
15610
|
// stackBarConfigOverride.orientation string in addition to the legacy
|
|
15365
15611
|
// configAsType.isHorizontal boolean.
|
|
@@ -15686,7 +15932,7 @@ class StackBarChartHandler {
|
|
|
15686
15932
|
// Only create totalSeries if we have bar charts
|
|
15687
15933
|
const hasBars = allSeriesData.some((series) => series.type === 'bar');
|
|
15688
15934
|
let totalSeries = null;
|
|
15689
|
-
if (hasBars) {
|
|
15935
|
+
if (hasBars && showStackTotal === true) {
|
|
15690
15936
|
const totals = new Map();
|
|
15691
15937
|
const extraValuesMap = new Map();
|
|
15692
15938
|
allSeriesData.forEach((series) => {
|
|
@@ -15717,7 +15963,7 @@ class StackBarChartHandler {
|
|
|
15717
15963
|
stack: 'total',
|
|
15718
15964
|
barWidth: '45px',
|
|
15719
15965
|
label: {
|
|
15720
|
-
show:
|
|
15966
|
+
show: true,
|
|
15721
15967
|
position: isHorizontal ? 'right' : 'top',
|
|
15722
15968
|
formatter: (params) => {
|
|
15723
15969
|
return formatValue(params.data.originalTotal, clientConfig?.['format'], languageCode);
|
|
@@ -15943,7 +16189,7 @@ class StackBarChartHandler {
|
|
|
15943
16189
|
if (!series.label) {
|
|
15944
16190
|
series.label = {};
|
|
15945
16191
|
}
|
|
15946
|
-
if (stackBarOverride.showLabel !== undefined) {
|
|
16192
|
+
if (stackBarOverride.showLabel !== undefined && !series.isTotal) {
|
|
15947
16193
|
series.label.show = stackBarOverride.showLabel;
|
|
15948
16194
|
}
|
|
15949
16195
|
if (stackBarOverride.labelFontSize !== undefined) {
|
|
@@ -19639,16 +19885,17 @@ class RingGaugeChartHandler {
|
|
|
19639
19885
|
* handleRingGaugeChart - matches functionName from CHART_TYPES
|
|
19640
19886
|
* Returns ECharts option directly (same as old RingGaugeChartService)
|
|
19641
19887
|
*/
|
|
19642
|
-
handleRingGaugeChart(dataResponse, config) {
|
|
19888
|
+
handleRingGaugeChart(dataResponse, config, presentation = {}) {
|
|
19643
19889
|
const languageCode = this.storeService.languageCode();
|
|
19644
19890
|
const clientConfig = config.clientConfig || {};
|
|
19645
19891
|
const configAsType = clientConfig['configAsType'] || {};
|
|
19646
|
-
const showLegend = configAsType['legend']?.show;
|
|
19892
|
+
const showLegend = !presentation.hideLegend && configAsType['legend']?.show;
|
|
19647
19893
|
// Pass: value-label visibility honors `configAsType.label.show` from the
|
|
19648
19894
|
// schema control. Gated: only an explicit `false` hides labels; when the
|
|
19649
19895
|
// key is absent (undefined) the legacy "labels visible" behavior is kept.
|
|
19650
19896
|
const labelConfig = configAsType['label'];
|
|
19651
19897
|
const labelsHidden = labelConfig?.show === false;
|
|
19898
|
+
const seriesLabelsHidden = labelsHidden || presentation.hideSeriesLabels === true;
|
|
19652
19899
|
const gaugeConfig = configAsType['ringGaugeConfig'];
|
|
19653
19900
|
const centerProperty = gaugeConfig?.centerProperty;
|
|
19654
19901
|
const statusProperty = gaugeConfig?.statusProperty;
|
|
@@ -19758,7 +20005,7 @@ class RingGaugeChartHandler {
|
|
|
19758
20005
|
value: item.value,
|
|
19759
20006
|
name: displayLabel,
|
|
19760
20007
|
title: {
|
|
19761
|
-
show: !isHidden && !
|
|
20008
|
+
show: !isHidden && !seriesLabelsHidden,
|
|
19762
20009
|
offsetCenter: ['0%', `${titleOffset}%`],
|
|
19763
20010
|
color: itemColor,
|
|
19764
20011
|
fontSize: 14,
|
|
@@ -19923,10 +20170,13 @@ class RingGaugeChartHandler {
|
|
|
19923
20170
|
handleRingGaugeChartWithFormula(dataResponse, config) {
|
|
19924
20171
|
const barsResponse = this.adaptBarsFormulaResponseToRingGauge(dataResponse, config);
|
|
19925
20172
|
if (barsResponse) {
|
|
19926
|
-
return this.handleRingGaugeChart(barsResponse.dataResponse, barsResponse.config);
|
|
20173
|
+
return this.handleRingGaugeChart(barsResponse.dataResponse, barsResponse.config, { hideSeriesLabels: true, hideLegend: true });
|
|
19927
20174
|
}
|
|
19928
20175
|
const wrapped = this.adaptFormulaResponseToRingGauge(dataResponse);
|
|
19929
|
-
return this.handleRingGaugeChart(wrapped, config
|
|
20176
|
+
return this.handleRingGaugeChart(wrapped, config, {
|
|
20177
|
+
hideSeriesLabels: true,
|
|
20178
|
+
hideLegend: true,
|
|
20179
|
+
});
|
|
19930
20180
|
}
|
|
19931
20181
|
adaptBarsFormulaResponseToRingGauge(dataResponse, config) {
|
|
19932
20182
|
if (!Array.isArray(dataResponse?.values) || !dataResponse.values.length) {
|
|
@@ -20446,7 +20696,9 @@ class SPlusChartHandler {
|
|
|
20446
20696
|
*
|
|
20447
20697
|
* Old SplusChartsService method. Extracts the current numeric value from
|
|
20448
20698
|
* the chart response, resolves the configured component statuses, sorts
|
|
20449
|
-
* them, and chooses the active status
|
|
20699
|
+
* them, and chooses the active status from the response's Status wrapper.
|
|
20700
|
+
* Configured ranges remain the scale definition and backward-compatible
|
|
20701
|
+
* fallback when the response does not include a status. The
|
|
20450
20702
|
* shape returned is what the `performanceGaugeCard` renderer consumes:
|
|
20451
20703
|
* { performance: number, status: any, statuses: any[] }
|
|
20452
20704
|
*
|
|
@@ -20492,17 +20744,21 @@ class SPlusChartHandler {
|
|
|
20492
20744
|
.sort((a, b) => a.from - b.from);
|
|
20493
20745
|
const maxValue = Math.max(100, ...sortedStatuses.map((s) => Number(s.to) || 0));
|
|
20494
20746
|
const currentValue = this.extractPerformanceGaugeValue(data);
|
|
20495
|
-
const
|
|
20747
|
+
const rangeStatus = sortedStatuses.find((s) => {
|
|
20496
20748
|
const from = s.from ?? 0;
|
|
20497
20749
|
const to = s.to ?? maxValue;
|
|
20498
20750
|
return currentValue >= from && currentValue <= to;
|
|
20499
|
-
})
|
|
20500
|
-
|
|
20501
|
-
|
|
20502
|
-
|
|
20503
|
-
|
|
20504
|
-
|
|
20505
|
-
|
|
20751
|
+
});
|
|
20752
|
+
const responseStatus = this.extractPerformanceGaugeStatus(data, languageCode);
|
|
20753
|
+
const matchedStatus = responseStatus
|
|
20754
|
+
? this.mergePerformanceGaugeStatus(responseStatus, sortedStatuses)
|
|
20755
|
+
: (rangeStatus ?? {
|
|
20756
|
+
key: 'NA',
|
|
20757
|
+
name: 'NA',
|
|
20758
|
+
color: '#000000',
|
|
20759
|
+
from: 0,
|
|
20760
|
+
to: maxValue,
|
|
20761
|
+
});
|
|
20506
20762
|
// Pass-5: honor configured number format on the displayed value only.
|
|
20507
20763
|
// `value` stays numeric for downstream math; `display` is formatted when a
|
|
20508
20764
|
// format is configured, otherwise it equals the raw value (legacy behavior).
|
|
@@ -20570,6 +20826,92 @@ class SPlusChartHandler {
|
|
|
20570
20826
|
}
|
|
20571
20827
|
return Number.NaN;
|
|
20572
20828
|
}
|
|
20829
|
+
/**
|
|
20830
|
+
* CardViewV2 returns requested extra properties beside the numeric value.
|
|
20831
|
+
* For a performance gauge, that Status wrapper is the business status and
|
|
20832
|
+
* therefore owns the active key, label, and color. Inferring it again from
|
|
20833
|
+
* the progress range can display a different status from the saved entity.
|
|
20834
|
+
*/
|
|
20835
|
+
extractPerformanceGaugeStatus(data, languageCode) {
|
|
20836
|
+
if (!data || typeof data !== 'object')
|
|
20837
|
+
return null;
|
|
20838
|
+
const records = [data];
|
|
20839
|
+
const values = data.values;
|
|
20840
|
+
if (Array.isArray(values)) {
|
|
20841
|
+
records.push(...values);
|
|
20842
|
+
}
|
|
20843
|
+
else if (values && typeof values === 'object') {
|
|
20844
|
+
if (values.extraValues) {
|
|
20845
|
+
records.push(values);
|
|
20846
|
+
}
|
|
20847
|
+
else {
|
|
20848
|
+
records.push(...Object.values(values));
|
|
20849
|
+
}
|
|
20850
|
+
}
|
|
20851
|
+
for (const record of records) {
|
|
20852
|
+
const extraValues = record?.extraValues;
|
|
20853
|
+
if (!extraValues || typeof extraValues !== 'object')
|
|
20854
|
+
continue;
|
|
20855
|
+
const wrapper = Object.values(extraValues).find((item) => item?.viewType?.toLowerCase() === 'status');
|
|
20856
|
+
if (!wrapper)
|
|
20857
|
+
continue;
|
|
20858
|
+
const value = wrapper.value && typeof wrapper.value === 'object' ? wrapper.value : {};
|
|
20859
|
+
const key = value.key ?? value.id ?? wrapper.rawValue ?? wrapper.key;
|
|
20860
|
+
const name = this.resolvePerformanceGaugeResponseStatusName(wrapper, languageCode);
|
|
20861
|
+
const color = value.details?.color ??
|
|
20862
|
+
value.display?.color ??
|
|
20863
|
+
value.color ??
|
|
20864
|
+
wrapper.color;
|
|
20865
|
+
return {
|
|
20866
|
+
...value,
|
|
20867
|
+
...(key !== undefined ? { key } : {}),
|
|
20868
|
+
...(name ? { name } : {}),
|
|
20869
|
+
...(color ? { color } : {}),
|
|
20870
|
+
};
|
|
20871
|
+
}
|
|
20872
|
+
return null;
|
|
20873
|
+
}
|
|
20874
|
+
mergePerformanceGaugeStatus(responseStatus, configuredStatuses) {
|
|
20875
|
+
const responseKey = this.normalizePerformanceGaugeStatusKey(responseStatus);
|
|
20876
|
+
const configuredStatus = configuredStatuses.find((status) => this.normalizePerformanceGaugeStatusKey(status) === responseKey);
|
|
20877
|
+
return {
|
|
20878
|
+
...(configuredStatus ?? {}),
|
|
20879
|
+
...responseStatus,
|
|
20880
|
+
color: responseStatus.color ?? configuredStatus?.color ?? '#000000',
|
|
20881
|
+
};
|
|
20882
|
+
}
|
|
20883
|
+
normalizePerformanceGaugeStatusKey(status) {
|
|
20884
|
+
const key = status?.key ?? status?.id ?? status?.value?.key;
|
|
20885
|
+
return key === undefined || key === null
|
|
20886
|
+
? ''
|
|
20887
|
+
: String(key).trim().toLowerCase();
|
|
20888
|
+
}
|
|
20889
|
+
resolvePerformanceGaugeResponseStatusName(wrapper, languageCode) {
|
|
20890
|
+
const value = wrapper?.value;
|
|
20891
|
+
const candidates = [
|
|
20892
|
+
value?.[languageCode],
|
|
20893
|
+
value?.display?.[languageCode],
|
|
20894
|
+
value?.display?.en,
|
|
20895
|
+
value?.display?.ar,
|
|
20896
|
+
value?.display,
|
|
20897
|
+
value?.displayName,
|
|
20898
|
+
value?.name,
|
|
20899
|
+
value?.label,
|
|
20900
|
+
wrapper?.displayValue,
|
|
20901
|
+
wrapper?.label,
|
|
20902
|
+
value?.key,
|
|
20903
|
+
wrapper?.rawValue,
|
|
20904
|
+
];
|
|
20905
|
+
for (const candidate of candidates) {
|
|
20906
|
+
if (candidate !== undefined &&
|
|
20907
|
+
candidate !== null &&
|
|
20908
|
+
candidate !== '' &&
|
|
20909
|
+
typeof candidate !== 'object') {
|
|
20910
|
+
return String(candidate);
|
|
20911
|
+
}
|
|
20912
|
+
}
|
|
20913
|
+
return '';
|
|
20914
|
+
}
|
|
20573
20915
|
resolvePerformanceGaugeStatusName(status, languageCode) {
|
|
20574
20916
|
const name = status?.name ?? status?.display ?? status?.label;
|
|
20575
20917
|
if (typeof name === 'string')
|
|
@@ -21660,13 +22002,6 @@ class ChartDataService {
|
|
|
21660
22002
|
? stripRuntimeFlags(svcConfig)
|
|
21661
22003
|
: handleFiltersForCustom(svcConfig, filters, getDynamicFilterRequestConfig(clientConfig));
|
|
21662
22004
|
const body = normalizeBeforeRequest(substituted);
|
|
21663
|
-
console.log(`[ChartDataService] Final custom chart request:\n${JSON.stringify({
|
|
21664
|
-
dashboardId: serviceConfig?.dashboardId,
|
|
21665
|
-
serviceConfigIndex: index,
|
|
21666
|
-
url,
|
|
21667
|
-
runtimeFilters: filters ?? {},
|
|
21668
|
-
selection: body?.['selection'] ?? [],
|
|
21669
|
-
}, null, 2)}`);
|
|
21670
22005
|
return this.http
|
|
21671
22006
|
.post(url, body, this.withCacheScope(config, { headers }))
|
|
21672
22007
|
.pipe(map$1((value) => value?.data));
|
|
@@ -21686,12 +22021,6 @@ class ChartDataService {
|
|
|
21686
22021
|
// Final BE-safety normalization: chart type aliases (LineV2Chart→LineChart,
|
|
21687
22022
|
// splitChart→SplitChart), source-link DTO keys, selector backfill.
|
|
21688
22023
|
const payload = normalizeBeforeRequest(substituted);
|
|
21689
|
-
console.log(`[ChartDataService] Final custom chart request:\n${JSON.stringify({
|
|
21690
|
-
dashboardId: serviceConfig?.dashboardId,
|
|
21691
|
-
url,
|
|
21692
|
-
runtimeFilters: filters ?? {},
|
|
21693
|
-
selection: payload?.['selection'] ?? [],
|
|
21694
|
-
}, null, 2)}`);
|
|
21695
22024
|
return this.http
|
|
21696
22025
|
.post(url, payload, this.withCacheScope(config, { headers }))
|
|
21697
22026
|
.pipe(map$1((res) => res?.data || res));
|
|
@@ -22454,7 +22783,7 @@ class ActionService {
|
|
|
22454
22783
|
dialogConfig?.clientConfig?.title?.['ar'] ||
|
|
22455
22784
|
'';
|
|
22456
22785
|
// Dynamically import DashboardDialogComponent to avoid circular dependency
|
|
22457
|
-
import('./masterteam-dashboard-builder-dashboard-dialog.component-
|
|
22786
|
+
import('./masterteam-dashboard-builder-dashboard-dialog.component-B3wTdiZC.mjs').then(({ DashboardDialogComponent }) => {
|
|
22458
22787
|
// Open dialog using ModalService
|
|
22459
22788
|
this.modalService.openModal(DashboardDialogComponent, 'dialog', {
|
|
22460
22789
|
header: title,
|
|
@@ -22932,128 +23261,128 @@ class CardFilterComponent {
|
|
|
22932
23261
|
}
|
|
22933
23262
|
}
|
|
22934
23263
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
22935
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CardFilterComponent, isStandalone: true, selector: "mt-card-filter", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterChange: "filterChange" }, ngImport: i0, template: `
|
|
22936
|
-
<div class="card-filter" *transloco="let t; prefix: 'dashboard'">
|
|
22937
|
-
@switch (filterType()) {
|
|
22938
|
-
@case ('select') {
|
|
22939
|
-
<select
|
|
22940
|
-
class="filter-select"
|
|
22941
|
-
[(ngModel)]="selectedValue"
|
|
22942
|
-
(ngModelChange)="onFilterChange($event)"
|
|
22943
|
-
>
|
|
22944
|
-
@if (placeholder()) {
|
|
22945
|
-
<option [value]="null" disabled>{{ placeholder() }}</option>
|
|
22946
|
-
}
|
|
22947
|
-
@for (option of options(); track option.key) {
|
|
22948
|
-
<option [value]="option.value">
|
|
22949
|
-
{{
|
|
22950
|
-
option.label[langCode()] || option.label['en'] || option.key
|
|
22951
|
-
}}
|
|
22952
|
-
</option>
|
|
22953
|
-
}
|
|
22954
|
-
</select>
|
|
22955
|
-
}
|
|
22956
|
-
@case ('multiSelect') {
|
|
22957
|
-
<div class="multi-select-container">
|
|
22958
|
-
<!-- Simplified multi-select -->
|
|
22959
|
-
<select
|
|
22960
|
-
class="filter-select"
|
|
22961
|
-
multiple
|
|
22962
|
-
[(ngModel)]="selectedValues"
|
|
22963
|
-
(ngModelChange)="onMultiFilterChange($event)"
|
|
22964
|
-
>
|
|
22965
|
-
@for (option of options(); track option.key) {
|
|
22966
|
-
<option [value]="option.value">
|
|
22967
|
-
{{
|
|
22968
|
-
option.label[langCode()] || option.label['en'] || option.key
|
|
22969
|
-
}}
|
|
22970
|
-
</option>
|
|
22971
|
-
}
|
|
22972
|
-
</select>
|
|
22973
|
-
</div>
|
|
22974
|
-
}
|
|
22975
|
-
@case ('dateRange') {
|
|
22976
|
-
<div class="date-range-container">
|
|
22977
|
-
<input
|
|
22978
|
-
type="date"
|
|
22979
|
-
class="filter-date"
|
|
22980
|
-
[(ngModel)]="startDate"
|
|
22981
|
-
(ngModelChange)="onDateChange()"
|
|
22982
|
-
/>
|
|
22983
|
-
<span class="date-separator">-</span>
|
|
22984
|
-
<input
|
|
22985
|
-
type="date"
|
|
22986
|
-
class="filter-date"
|
|
22987
|
-
[(ngModel)]="endDate"
|
|
22988
|
-
(ngModelChange)="onDateChange()"
|
|
22989
|
-
/>
|
|
22990
|
-
</div>
|
|
22991
|
-
}
|
|
22992
|
-
}
|
|
22993
|
-
</div>
|
|
23264
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CardFilterComponent, isStandalone: true, selector: "mt-card-filter", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterChange: "filterChange" }, ngImport: i0, template: `
|
|
23265
|
+
<div class="card-filter" *transloco="let t; prefix: 'dashboard'">
|
|
23266
|
+
@switch (filterType()) {
|
|
23267
|
+
@case ('select') {
|
|
23268
|
+
<select
|
|
23269
|
+
class="filter-select"
|
|
23270
|
+
[(ngModel)]="selectedValue"
|
|
23271
|
+
(ngModelChange)="onFilterChange($event)"
|
|
23272
|
+
>
|
|
23273
|
+
@if (placeholder()) {
|
|
23274
|
+
<option [value]="null" disabled>{{ placeholder() }}</option>
|
|
23275
|
+
}
|
|
23276
|
+
@for (option of options(); track option.key) {
|
|
23277
|
+
<option [value]="option.value">
|
|
23278
|
+
{{
|
|
23279
|
+
option.label[langCode()] || option.label['en'] || option.key
|
|
23280
|
+
}}
|
|
23281
|
+
</option>
|
|
23282
|
+
}
|
|
23283
|
+
</select>
|
|
23284
|
+
}
|
|
23285
|
+
@case ('multiSelect') {
|
|
23286
|
+
<div class="multi-select-container">
|
|
23287
|
+
<!-- Simplified multi-select -->
|
|
23288
|
+
<select
|
|
23289
|
+
class="filter-select"
|
|
23290
|
+
multiple
|
|
23291
|
+
[(ngModel)]="selectedValues"
|
|
23292
|
+
(ngModelChange)="onMultiFilterChange($event)"
|
|
23293
|
+
>
|
|
23294
|
+
@for (option of options(); track option.key) {
|
|
23295
|
+
<option [value]="option.value">
|
|
23296
|
+
{{
|
|
23297
|
+
option.label[langCode()] || option.label['en'] || option.key
|
|
23298
|
+
}}
|
|
23299
|
+
</option>
|
|
23300
|
+
}
|
|
23301
|
+
</select>
|
|
23302
|
+
</div>
|
|
23303
|
+
}
|
|
23304
|
+
@case ('dateRange') {
|
|
23305
|
+
<div class="date-range-container">
|
|
23306
|
+
<input
|
|
23307
|
+
type="date"
|
|
23308
|
+
class="filter-date"
|
|
23309
|
+
[(ngModel)]="startDate"
|
|
23310
|
+
(ngModelChange)="onDateChange()"
|
|
23311
|
+
/>
|
|
23312
|
+
<span class="date-separator">-</span>
|
|
23313
|
+
<input
|
|
23314
|
+
type="date"
|
|
23315
|
+
class="filter-date"
|
|
23316
|
+
[(ngModel)]="endDate"
|
|
23317
|
+
(ngModelChange)="onDateChange()"
|
|
23318
|
+
/>
|
|
23319
|
+
</div>
|
|
23320
|
+
}
|
|
23321
|
+
}
|
|
23322
|
+
</div>
|
|
22994
23323
|
`, isInline: true, styles: [".card-filter{display:flex;align-items:center;gap:.5rem}.filter-select{padding:.375rem .75rem;border:1px solid #e0e0e0;border-radius:.375rem;font-size:.875rem;background:#fff;color:#333;min-width:120px;cursor:pointer;transition:border-color .15s ease}.filter-select:focus{outline:none;border-color:#4caf50}.filter-select:hover{border-color:#bbb}.multi-select-container{position:relative}.date-range-container{display:flex;align-items:center;gap:.25rem}.filter-date{padding:.375rem .5rem;border:1px solid #e0e0e0;border-radius:.375rem;font-size:.875rem;background:#fff;color:#333}.filter-date:focus{outline:none;border-color:#4caf50}.date-separator{color:#999;font-size:.875rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
22995
23324
|
}
|
|
22996
23325
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardFilterComponent, decorators: [{
|
|
22997
23326
|
type: Component,
|
|
22998
|
-
args: [{ selector: 'mt-card-filter', standalone: true, imports: [CommonModule, FormsModule, TranslocoDirective], template: `
|
|
22999
|
-
<div class="card-filter" *transloco="let t; prefix: 'dashboard'">
|
|
23000
|
-
@switch (filterType()) {
|
|
23001
|
-
@case ('select') {
|
|
23002
|
-
<select
|
|
23003
|
-
class="filter-select"
|
|
23004
|
-
[(ngModel)]="selectedValue"
|
|
23005
|
-
(ngModelChange)="onFilterChange($event)"
|
|
23006
|
-
>
|
|
23007
|
-
@if (placeholder()) {
|
|
23008
|
-
<option [value]="null" disabled>{{ placeholder() }}</option>
|
|
23009
|
-
}
|
|
23010
|
-
@for (option of options(); track option.key) {
|
|
23011
|
-
<option [value]="option.value">
|
|
23012
|
-
{{
|
|
23013
|
-
option.label[langCode()] || option.label['en'] || option.key
|
|
23014
|
-
}}
|
|
23015
|
-
</option>
|
|
23016
|
-
}
|
|
23017
|
-
</select>
|
|
23018
|
-
}
|
|
23019
|
-
@case ('multiSelect') {
|
|
23020
|
-
<div class="multi-select-container">
|
|
23021
|
-
<!-- Simplified multi-select -->
|
|
23022
|
-
<select
|
|
23023
|
-
class="filter-select"
|
|
23024
|
-
multiple
|
|
23025
|
-
[(ngModel)]="selectedValues"
|
|
23026
|
-
(ngModelChange)="onMultiFilterChange($event)"
|
|
23027
|
-
>
|
|
23028
|
-
@for (option of options(); track option.key) {
|
|
23029
|
-
<option [value]="option.value">
|
|
23030
|
-
{{
|
|
23031
|
-
option.label[langCode()] || option.label['en'] || option.key
|
|
23032
|
-
}}
|
|
23033
|
-
</option>
|
|
23034
|
-
}
|
|
23035
|
-
</select>
|
|
23036
|
-
</div>
|
|
23037
|
-
}
|
|
23038
|
-
@case ('dateRange') {
|
|
23039
|
-
<div class="date-range-container">
|
|
23040
|
-
<input
|
|
23041
|
-
type="date"
|
|
23042
|
-
class="filter-date"
|
|
23043
|
-
[(ngModel)]="startDate"
|
|
23044
|
-
(ngModelChange)="onDateChange()"
|
|
23045
|
-
/>
|
|
23046
|
-
<span class="date-separator">-</span>
|
|
23047
|
-
<input
|
|
23048
|
-
type="date"
|
|
23049
|
-
class="filter-date"
|
|
23050
|
-
[(ngModel)]="endDate"
|
|
23051
|
-
(ngModelChange)="onDateChange()"
|
|
23052
|
-
/>
|
|
23053
|
-
</div>
|
|
23054
|
-
}
|
|
23055
|
-
}
|
|
23056
|
-
</div>
|
|
23327
|
+
args: [{ selector: 'mt-card-filter', standalone: true, imports: [CommonModule, FormsModule, TranslocoDirective], template: `
|
|
23328
|
+
<div class="card-filter" *transloco="let t; prefix: 'dashboard'">
|
|
23329
|
+
@switch (filterType()) {
|
|
23330
|
+
@case ('select') {
|
|
23331
|
+
<select
|
|
23332
|
+
class="filter-select"
|
|
23333
|
+
[(ngModel)]="selectedValue"
|
|
23334
|
+
(ngModelChange)="onFilterChange($event)"
|
|
23335
|
+
>
|
|
23336
|
+
@if (placeholder()) {
|
|
23337
|
+
<option [value]="null" disabled>{{ placeholder() }}</option>
|
|
23338
|
+
}
|
|
23339
|
+
@for (option of options(); track option.key) {
|
|
23340
|
+
<option [value]="option.value">
|
|
23341
|
+
{{
|
|
23342
|
+
option.label[langCode()] || option.label['en'] || option.key
|
|
23343
|
+
}}
|
|
23344
|
+
</option>
|
|
23345
|
+
}
|
|
23346
|
+
</select>
|
|
23347
|
+
}
|
|
23348
|
+
@case ('multiSelect') {
|
|
23349
|
+
<div class="multi-select-container">
|
|
23350
|
+
<!-- Simplified multi-select -->
|
|
23351
|
+
<select
|
|
23352
|
+
class="filter-select"
|
|
23353
|
+
multiple
|
|
23354
|
+
[(ngModel)]="selectedValues"
|
|
23355
|
+
(ngModelChange)="onMultiFilterChange($event)"
|
|
23356
|
+
>
|
|
23357
|
+
@for (option of options(); track option.key) {
|
|
23358
|
+
<option [value]="option.value">
|
|
23359
|
+
{{
|
|
23360
|
+
option.label[langCode()] || option.label['en'] || option.key
|
|
23361
|
+
}}
|
|
23362
|
+
</option>
|
|
23363
|
+
}
|
|
23364
|
+
</select>
|
|
23365
|
+
</div>
|
|
23366
|
+
}
|
|
23367
|
+
@case ('dateRange') {
|
|
23368
|
+
<div class="date-range-container">
|
|
23369
|
+
<input
|
|
23370
|
+
type="date"
|
|
23371
|
+
class="filter-date"
|
|
23372
|
+
[(ngModel)]="startDate"
|
|
23373
|
+
(ngModelChange)="onDateChange()"
|
|
23374
|
+
/>
|
|
23375
|
+
<span class="date-separator">-</span>
|
|
23376
|
+
<input
|
|
23377
|
+
type="date"
|
|
23378
|
+
class="filter-date"
|
|
23379
|
+
[(ngModel)]="endDate"
|
|
23380
|
+
(ngModelChange)="onDateChange()"
|
|
23381
|
+
/>
|
|
23382
|
+
</div>
|
|
23383
|
+
}
|
|
23384
|
+
}
|
|
23385
|
+
</div>
|
|
23057
23386
|
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".card-filter{display:flex;align-items:center;gap:.5rem}.filter-select{padding:.375rem .75rem;border:1px solid #e0e0e0;border-radius:.375rem;font-size:.875rem;background:#fff;color:#333;min-width:120px;cursor:pointer;transition:border-color .15s ease}.filter-select:focus{outline:none;border-color:#4caf50}.filter-select:hover{border-color:#bbb}.multi-select-container{position:relative}.date-range-container{display:flex;align-items:center;gap:.25rem}.filter-date{padding:.375rem .5rem;border:1px solid #e0e0e0;border-radius:.375rem;font-size:.875rem;background:#fff;color:#333}.filter-date:focus{outline:none;border-color:#4caf50}.date-separator{color:#999;font-size:.875rem}\n"] }]
|
|
23058
23387
|
}], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: false }] }], filterChange: [{ type: i0.Output, args: ["filterChange"] }] } });
|
|
23059
23388
|
|
|
@@ -24773,30 +25102,30 @@ class CardInfoComponent {
|
|
|
24773
25102
|
return typeof info.value === 'string' ? info.value : '';
|
|
24774
25103
|
}, ...(ngDevMode ? [{ debugName: "tooltipContent" }] : /* istanbul ignore next */ []));
|
|
24775
25104
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
24776
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CardInfoComponent, isStandalone: true, selector: "mt-card-info", inputs: { cardInfo: { classPropertyName: "cardInfo", publicName: "cardInfo", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
24777
|
-
@if (showInfo()) {
|
|
24778
|
-
<span
|
|
24779
|
-
class="card-info-icon"
|
|
24780
|
-
[mtTooltip]="tooltipContent()"
|
|
24781
|
-
tooltipPosition="bottom"
|
|
24782
|
-
>
|
|
24783
|
-
<i class="pi pi-info-circle"></i>
|
|
24784
|
-
</span>
|
|
24785
|
-
}
|
|
25105
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CardInfoComponent, isStandalone: true, selector: "mt-card-info", inputs: { cardInfo: { classPropertyName: "cardInfo", publicName: "cardInfo", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
25106
|
+
@if (showInfo()) {
|
|
25107
|
+
<span
|
|
25108
|
+
class="card-info-icon"
|
|
25109
|
+
[mtTooltip]="tooltipContent()"
|
|
25110
|
+
tooltipPosition="bottom"
|
|
25111
|
+
>
|
|
25112
|
+
<i class="pi pi-info-circle"></i>
|
|
25113
|
+
</span>
|
|
25114
|
+
}
|
|
24786
25115
|
`, isInline: true, styles: [".card-info-icon{display:inline-flex;align-items:center;justify-content:center;cursor:help;color:#666;font-size:1rem;transition:color .15s ease}.card-info-icon:hover{color:#333}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: Tooltip$1, selector: "[mtTooltip]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
24787
25116
|
}
|
|
24788
25117
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardInfoComponent, decorators: [{
|
|
24789
25118
|
type: Component,
|
|
24790
|
-
args: [{ selector: 'mt-card-info', standalone: true, imports: [CommonModule, Tooltip$1], template: `
|
|
24791
|
-
@if (showInfo()) {
|
|
24792
|
-
<span
|
|
24793
|
-
class="card-info-icon"
|
|
24794
|
-
[mtTooltip]="tooltipContent()"
|
|
24795
|
-
tooltipPosition="bottom"
|
|
24796
|
-
>
|
|
24797
|
-
<i class="pi pi-info-circle"></i>
|
|
24798
|
-
</span>
|
|
24799
|
-
}
|
|
25119
|
+
args: [{ selector: 'mt-card-info', standalone: true, imports: [CommonModule, Tooltip$1], template: `
|
|
25120
|
+
@if (showInfo()) {
|
|
25121
|
+
<span
|
|
25122
|
+
class="card-info-icon"
|
|
25123
|
+
[mtTooltip]="tooltipContent()"
|
|
25124
|
+
tooltipPosition="bottom"
|
|
25125
|
+
>
|
|
25126
|
+
<i class="pi pi-info-circle"></i>
|
|
25127
|
+
</span>
|
|
25128
|
+
}
|
|
24800
25129
|
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".card-info-icon{display:inline-flex;align-items:center;justify-content:center;cursor:help;color:#666;font-size:1rem;transition:color .15s ease}.card-info-icon:hover{color:#333}\n"] }]
|
|
24801
25130
|
}], propDecorators: { cardInfo: [{ type: i0.Input, args: [{ isSignal: true, alias: "cardInfo", required: false }] }] } });
|
|
24802
25131
|
|
|
@@ -26146,9 +26475,7 @@ class ChartCardComponent {
|
|
|
26146
26475
|
(config?.['extraFilters']?.length ?? 0) > 0 ||
|
|
26147
26476
|
(config?.['cardInfo']?.['show'] && config?.['cardInfo']?.['value']) ||
|
|
26148
26477
|
this.showStaticFilters() ||
|
|
26149
|
-
this.showDynamicFilters()
|
|
26150
|
-
(this.componentViewMode() === 'timeline' &&
|
|
26151
|
-
this.timelineLabels().length > 0));
|
|
26478
|
+
this.showDynamicFilters());
|
|
26152
26479
|
}, ...(ngDevMode ? [{ debugName: "showTopEnd" }] : /* istanbul ignore next */ []));
|
|
26153
26480
|
/** Card info configuration */
|
|
26154
26481
|
cardInfoConfig = computed(() => {
|
|
@@ -26357,6 +26684,12 @@ class ChartCardComponent {
|
|
|
26357
26684
|
?.configAsType;
|
|
26358
26685
|
return (configAsType?.legend?.iconType ?? configAsType?.legendIconType ?? 'circle');
|
|
26359
26686
|
}, ...(ngDevMode ? [{ debugName: "timelineLegendIconType" }] : /* istanbul ignore next */ []));
|
|
26687
|
+
timelineLegendPosition = computed(() => {
|
|
26688
|
+
const position = this.configurationItem()?.clientConfig?.configAsType?.legend?.position;
|
|
26689
|
+
return position === 'right' || position === 'bottom' || position === 'left'
|
|
26690
|
+
? position
|
|
26691
|
+
: 'top';
|
|
26692
|
+
}, ...(ngDevMode ? [{ debugName: "timelineLegendPosition" }] : /* istanbul ignore next */ []));
|
|
26360
26693
|
/** Timeline legend visibility — honors the Style Studio "Show legend" toggle. */
|
|
26361
26694
|
timelineLegendShow = computed(() => {
|
|
26362
26695
|
const configAsType = this.configurationItem()?.clientConfig
|
|
@@ -27063,7 +27396,7 @@ class ChartCardComponent {
|
|
|
27063
27396
|
'');
|
|
27064
27397
|
}
|
|
27065
27398
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
27066
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ChartCardComponent, isStandalone: true, selector: "mt-chart-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null }, reportId: { classPropertyName: "reportId", publicName: "reportId", isSignal: true, isRequired: false, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null }, isConfigMode: { classPropertyName: "isConfigMode", publicName: "isConfigMode", isSignal: true, isRequired: false, transformFunction: null }, titleEditable: { classPropertyName: "titleEditable", publicName: "titleEditable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction", onConfigure: "onConfigure", onTitleChange: "onTitleChange" }, ngImport: i0, template: "<mt-card-content\r\n [inGroup]=\"inGroup()\"\r\n [headerConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\r\n \"\r\n [styleConfig]=\"\r\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\r\n \"\r\n [cardStyleConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\r\n \"\r\n [density]=\"configurationItem()?.clientConfig?.configAsType?.['density']\"\r\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\r\n [title]=\"title()\"\r\n [titleEditable]=\"titleEditable()\"\r\n (titleChange)=\"onTitleChange.emit($event)\"\r\n [isNoTopEnd]=\"!showTopEnd()\"\r\n [isChart]=\"true\"\r\n (headerClick)=\"onHeaderClick()\"\r\n>\r\n <ng-container topEnd>\r\n @if (showStaticFilters()) {\r\n <mt-static-filters\r\n [config]=\"staticFilterConfig()\"\r\n [dashboardId]=\"dashboardId()\"\r\n >\r\n </mt-static-filters>\r\n }\r\n @if (showDynamicFilters()) {\r\n <mt-dynamic-filters\r\n [fields]=\"dynamicFilterFields()\"\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [showLabels]=\"false\"\r\n >\r\n </mt-dynamic-filters>\r\n }\r\n @if (showFilter()) {\r\n <mt-card-filter [config]=\"filterConfig()\" [dashboardId]=\"dashboardId()\">\r\n </mt-card-filter>\r\n }\r\n @if (cardInfoConfig()?.show && cardInfoConfig()?.value) {\r\n <mt-card-info [cardInfo]=\"cardInfoConfig()\"></mt-card-info>\r\n }\r\n @if (\r\n componentViewMode() === \"timeline\" &&\r\n timelineLabels().length &&\r\n timelineLegendShow()\r\n ) {\r\n <div class=\"dashboard-timeline-legend\">\r\n @for (label of timelineLabels(); track $index) {\r\n <span\r\n class=\"dashboard-timeline-legend-item\"\r\n [title]=\"label.label || label.name || label.key\"\r\n >\r\n <span\r\n class=\"dashboard-timeline-legend-marker\"\r\n [class.shape-rect]=\"label.shape === 'rect'\"\r\n [class.shape-roundRect]=\"label.shape === 'roundRect'\"\r\n [class.shape-diamond]=\"label.shape === 'diamond'\"\r\n [class.shape-triangle]=\"label.shape === 'triangle'\"\r\n [style.background]=\"\r\n label.shape === 'triangle' ? null : label.color || '#64748b'\r\n \"\r\n [style.border-bottom-color]=\"\r\n label.shape === 'triangle' ? label.color || '#64748b' : null\r\n \"\r\n ></span>\r\n <span class=\"dashboard-timeline-legend-label\">\r\n {{ label.label || label.name || label.key }}\r\n </span>\r\n </span>\r\n }\r\n </div>\r\n }\r\n </ng-container>\r\n\r\n <ng-container body>\r\n <div\r\n class=\"chart-container\"\r\n [class.config-mode]=\"isConfigMode()\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n >\r\n @if (componentViewMode() === \"splitter\" && hasSplitterData()) {\r\n <div\r\n class=\"splitter-view\"\r\n [class.splitter-vertical]=\"splitterOrientation() === 'vertical'\"\r\n [style.gap.px]=\"splitterGap()\"\r\n >\r\n <div class=\"splitter-side splitter-positive\">\r\n <div class=\"splitter-count\">\r\n {{ dataHandled()?.positive?.groupedValue ?? 0 }}\r\n </div>\r\n <ul class=\"splitter-labels\">\r\n @for (\r\n label of dataHandled()?.positive?.labels || [];\r\n track $index\r\n ) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n </div>\r\n <div class=\"splitter-divider\"></div>\r\n <div class=\"splitter-side splitter-negative\">\r\n <div class=\"splitter-count\">\r\n {{ dataHandled()?.negative?.groupedValue ?? 0 }}\r\n </div>\r\n <ul class=\"splitter-labels\">\r\n @for (\r\n label of dataHandled()?.negative?.labels || [];\r\n track $index\r\n ) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n </div>\r\n </div>\r\n } @else if (componentViewMode() === \"timeline\" && hasTimelineData()) {\r\n <div\r\n class=\"dashboard-timeline-view\"\r\n [style.--timeline-header-bg]=\"timelineHeaderBgColor()\"\r\n [style.--timeline-header-color]=\"timelineHeaderTextColor()\"\r\n >\r\n @defer (on viewport) {\r\n <mt-timeline\r\n class=\"dashboard-timeline-renderer\"\r\n [showHeader]=\"false\"\r\n [showZoomToFitControl]=\"false\"\r\n [timelineMode]=\"timelineMode()\"\r\n (timelineModeChange)=\"timelineMode.set($event)\"\r\n [ganttData]=\"timelineResources()\"\r\n [ganttMapping]=\"timelineGanttMapping\"\r\n [columns]=\"timelineColumns()\"\r\n [defaultVisibleColumns]=\"2\"\r\n [columnsPaneMinWidthPx]=\"220\"\r\n [columnsPaneMaxWidthPx]=\"520\"\r\n [enableVirtualScroll]=\"true\"\r\n [virtualScrollThreshold]=\"0\"\r\n [virtualScrollBodyHeightPx]=\"520\"\r\n [showGanttDetailsPopup]=\"true\"\r\n [emptyMessage]=\"t('noChartData')\"\r\n >\r\n <ng-template\r\n mtTimelineColumn=\"title\"\r\n let-item=\"item\"\r\n let-resolved=\"resolved\"\r\n let-canToggle=\"canToggle\"\r\n let-isCollapsed=\"isCollapsed\"\r\n let-toggle=\"toggle\"\r\n >\r\n <div\r\n class=\"dashboard-timeline-title-cell\"\r\n [style.padding-inline-start.px]=\"\r\n $any(resolved).levelDepth * 16\r\n \"\r\n >\r\n @if (canToggle) {\r\n <mt-icon\r\n class=\"dashboard-timeline-title-toggle\"\r\n [icon]=\"timelineCollapseIcon(isCollapsed)\"\r\n (click)=\"$event.stopPropagation(); toggle()\"\r\n ></mt-icon>\r\n } @else {\r\n <span class=\"dashboard-timeline-title-spacer\"></span>\r\n }\r\n\r\n <button\r\n type=\"button\"\r\n class=\"dashboard-timeline-title-action\"\r\n [title]=\"$any(resolved).title\"\r\n (click)=\"onTimelineTitleClick(item, $event)\"\r\n >\r\n {{ $any(resolved).title }}\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n @for (column of timelineEntityColumns(); track column.key) {\r\n <ng-template [mtTimelineColumn]=\"column.key\" let-value=\"value\">\r\n <mt-entity-preview\r\n class=\"dashboard-timeline-column-entity\"\r\n [data]=\"timelineColumnEntityData(value)\"\r\n attachmentShape=\"compact\"\r\n ></mt-entity-preview>\r\n </ng-template>\r\n }\r\n\r\n <ng-template mtTimelinePopover let-item=\"item\">\r\n @if (timelinePopoverEntities(item); as entities) {\r\n @if (entities.length) {\r\n <div\r\n class=\"w-[27rem] max-w-[90vw] max-h-[24rem] overflow-auto p-2\"\r\n >\r\n <mt-entities-preview\r\n [entities]=\"entities\"\r\n [stackOnNarrow]=\"false\"\r\n />\r\n </div>\r\n }\r\n }\r\n </ng-template>\r\n </mt-timeline>\r\n } @placeholder {\r\n <div class=\"dashboard-timeline-placeholder\" aria-hidden=\"true\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n }\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"phaseGateStepper\" && hasPhaseGateData()\r\n ) {\r\n <div\r\n class=\"phase-gate-view\"\r\n [class.phase-gate-compact]=\"phaseGateCompact()\"\r\n >\r\n <ol class=\"phase-steps\">\r\n @for (step of phaseGateSteps(); track $index) {\r\n <li\r\n class=\"phase-step\"\r\n [class.is-current]=\"$index === phaseGateCurrentIndex()\"\r\n [class.is-done]=\"$index < phaseGateCurrentIndex()\"\r\n >\r\n <span class=\"phase-step-number\">{{ $index + 1 }}</span>\r\n @if (phaseGateShowLabels()) {\r\n <span class=\"phase-step-name\">{{\r\n step?.name || step?.title || step?.label || t(\"phase\")\r\n }}</span>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"performanceGauge\" &&\r\n dataHandled() &&\r\n !dataHandled()?.noData\r\n ) {\r\n @let gauge = performanceGauge();\r\n <div\r\n class=\"dashboard-performance-gauge\"\r\n [class.is-clickable]=\"hasActions()\"\r\n [style.--dashboard-performance-status-color]=\"gauge.status.color\"\r\n (click)=\"onPerformanceGaugeClick($event)\"\r\n >\r\n <div\r\n class=\"dashboard-performance-gauge__figure\"\r\n [style.width.%]=\"gauge.scalePercent\"\r\n >\r\n <svg\r\n class=\"dashboard-performance-gauge__svg\"\r\n viewBox=\"0 0 100 72\"\r\n role=\"img\"\r\n [attr.aria-label]=\"gauge.label + ' ' + gauge.display\"\r\n >\r\n <path\r\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\r\n fill=\"none\"\r\n stroke=\"#e5e7eb\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n pathLength=\"100\"\r\n ></path>\r\n\r\n @for (segment of performanceGaugeSegments(); track segment.key) {\r\n <path\r\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\r\n fill=\"none\"\r\n [attr.stroke]=\"segment.color\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n pathLength=\"100\"\r\n [attr.stroke-dasharray]=\"segment.dashArray\"\r\n [attr.stroke-dashoffset]=\"segment.dashOffset\"\r\n [style.opacity]=\"segment.opacity\"\r\n ></path>\r\n <text\r\n [attr.x]=\"segment.labelX\"\r\n [attr.y]=\"segment.labelY\"\r\n text-anchor=\"middle\"\r\n dominant-baseline=\"central\"\r\n font-size=\"5.5\"\r\n font-weight=\"700\"\r\n fill=\"#334155\"\r\n >\r\n {{ segment.label }}\r\n </text>\r\n }\r\n\r\n <circle\r\n [attr.cx]=\"gauge.marker.x\"\r\n [attr.cy]=\"gauge.marker.y\"\r\n r=\"4.5\"\r\n fill=\"#fff\"\r\n [attr.stroke]=\"gauge.status.color\"\r\n stroke-width=\"3\"\r\n ></circle>\r\n </svg>\r\n\r\n <div class=\"dashboard-performance-gauge__center\">\r\n <div class=\"dashboard-performance-gauge__value\">\r\n {{ gauge.display }}\r\n </div>\r\n <div class=\"dashboard-performance-gauge__label\">\r\n {{ gauge.label }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"dashboard-performance-gauge__status\"\r\n [title]=\"performanceGaugeStatusName()\"\r\n >\r\n <span class=\"dashboard-performance-gauge__status-dot\"></span>\r\n <span class=\"dashboard-performance-gauge__status-text\">\r\n {{ performanceGaugeStatusName() }}\r\n </span>\r\n </div>\r\n </div>\r\n } @else if (dataHandled() && !dataHandled()?.noData) {\r\n <mt-echart\r\n [dashboardId]=\"dashboardId()\"\r\n [chartConfig]=\"dataHandled()\"\r\n [configurationItem]=\"configurationItem()\"\r\n [inGroup]=\"inGroup()\"\r\n (chartClick)=\"onChartClick($event)\"\r\n >\r\n </mt-echart>\r\n } @else if (dataHandled()?.noData) {\r\n <div class=\"no-data-container\">\r\n <i class=\"pi pi-info-circle\"></i>\r\n <span>{{ t(\"noChartData\") }}</span>\r\n </div>\r\n } @else {\r\n <div class=\"loading-container\">\r\n <div class=\"loading-spinner\"></div>\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n</mt-card-content>\r\n", styles: [":host{display:block;height:100%}.chart-container{height:100%;min-height:0}.chart-container.config-mode{min-height:400px}.no-data-container,.needs-config-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:0;color:#999;gap:.5rem;padding:1rem;text-align:center}.no-data-container i,.needs-config-container i{font-size:2rem}.needs-config-container .title{font-weight:600;color:#555;font-size:.95rem}.needs-config-container .hint{font-size:.8rem;max-width:28rem;line-height:1.4}.needs-config-container .configure-btn{margin-top:.5rem;display:inline-flex;align-items:center;gap:.4rem;padding:.4rem .9rem;font-size:.85rem;font-weight:600;color:#fff;background:var(--p-primary-500, #2563eb);border:0;border-radius:.375rem;cursor:pointer;box-shadow:0 1px 2px #0000000d}.needs-config-container .configure-btn:hover{background:var(--p-primary-600, #1d4ed8)}.loading-container{display:flex;align-items:center;justify-content:center;height:100%;min-height:0}.loading-spinner{width:2rem;height:2rem;border:3px solid #f0f0f0;border-top-color:#4caf50;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.splitter-view{display:flex;align-items:stretch;height:100%;gap:.5rem}.splitter-view.splitter-vertical{flex-direction:column}.splitter-view.splitter-vertical .splitter-divider{width:auto;height:1px}.splitter-side{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:1rem;border-radius:.5rem}.splitter-positive{background:#22c55e14}.splitter-negative{background:#ef444414}.splitter-count{font-size:2rem;font-weight:700;margin-bottom:.5rem}.splitter-positive .splitter-count{color:#16a34a}.splitter-negative .splitter-count{color:#dc2626}.splitter-labels{list-style:none;padding:0;margin:0;text-align:center;font-size:.8rem;color:#555}.splitter-labels li{padding:.15rem 0}.splitter-divider{width:1px;background:#00000014}.dashboard-timeline-view{display:flex;flex-direction:column;gap:.625rem;height:100%;min-height:0;overflow:auto}.dashboard-timeline-legend{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.35rem .75rem;flex-shrink:0;min-width:0;max-width:100%}.dashboard-timeline-legend-item{display:inline-flex;align-items:center;gap:.25rem;max-width:12rem;padding:0;border:0;border-radius:0;font-size:.75rem;color:#475569;font-weight:500;line-height:1.2;background:transparent}.dashboard-timeline-legend-marker{display:inline-block;width:.625rem;height:.625rem;flex:0 0 auto;border-radius:999px}.dashboard-timeline-legend-marker.shape-rect{border-radius:0}.dashboard-timeline-legend-marker.shape-roundRect{border-radius:.2rem}.dashboard-timeline-legend-marker.shape-diamond{border-radius:.0625rem;transform:rotate(45deg)}.dashboard-timeline-legend-marker.shape-triangle{width:0;height:0;background:transparent!important;border-radius:0;border-left:.34rem solid transparent;border-right:.34rem solid transparent;border-bottom-width:.6rem;border-bottom-style:solid}.dashboard-timeline-legend-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-renderer{display:block;min-height:0;flex:1}.dashboard-timeline-placeholder{display:flex;min-height:260px;flex:1;flex-direction:column;gap:.75rem;padding:1rem}.dashboard-timeline-placeholder div{height:3rem;border-radius:.5rem;background:var(--p-surface-100);animation:dashboard-builder-pulse 1.2s ease-in-out infinite}@keyframes dashboard-builder-pulse{0%,to{opacity:.55}50%{opacity:1}}:host ::ng-deep .dashboard-timeline-renderer>div{margin-top:0}:host ::ng-deep .dashboard-timeline-view mt-timeline-gantt-header .bg-surface-50{background-color:var(--timeline-header-bg, var(--p-surface-50));color:var(--timeline-header-color, inherit)}.dashboard-timeline-column-entity{display:block;min-width:0}.dashboard-timeline-title-cell{display:flex;min-width:0;align-items:center;gap:.5rem;width:100%}.dashboard-timeline-title-toggle{flex:0 0 auto;cursor:pointer;color:#64748b}.dashboard-timeline-title-spacer{display:inline-block;width:1.25rem;flex:0 0 1.25rem}.dashboard-timeline-title-action{min-width:0;flex:1 1 auto;overflow:hidden;border:0;background:transparent;padding:0;color:#334155;cursor:pointer;font-size:.875rem;font-weight:600;text-align:start;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-title-action:hover{color:var(--p-primary-600, #2563eb);text-decoration:underline}.phase-gate-view{height:100%;display:flex;align-items:center;justify-content:center;padding:1rem;overflow-x:auto}.phase-steps{display:flex;align-items:center;gap:.75rem;list-style:none;margin:0;padding:0}.phase-step{display:flex;align-items:center;gap:.5rem;padding:.4rem .75rem;border-radius:999px;background:#0000000a;font-size:.8rem;color:#555;white-space:nowrap}.phase-step-number{width:1.5rem;height:1.5rem;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;font-weight:700;background:#0000000f;color:#666}.phase-step.is-done{background:#22c55e1a;color:#16a34a}.phase-step.is-done .phase-step-number{background:#16a34a;color:#fff}.phase-step.is-current{background:#2563eb1a;color:#2563eb;font-weight:600}.phase-step.is-current .phase-step-number{background:#2563eb;color:#fff}.phase-gate-view.phase-gate-compact .phase-step{padding:.2rem .45rem;font-size:.7rem;gap:.25rem}.phase-gate-view.phase-gate-compact .phase-step-number{width:1.1rem;height:1.1rem;font-size:.7rem}.dashboard-performance-gauge{display:flex;height:100%;min-height:0;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:.875rem;overflow:hidden;padding:.75rem 1rem 1rem;cursor:default}.dashboard-performance-gauge.is-clickable{cursor:pointer}.dashboard-performance-gauge__figure{position:relative;width:min(100%,28rem);min-width:12rem;max-width:100%;transform-origin:center bottom}.dashboard-performance-gauge__svg{display:block;width:100%;height:auto;overflow:visible}.dashboard-performance-gauge__center{position:absolute;left:50%;top:72%;display:flex;max-width:90%;transform:translate(-50%,-50%);flex-direction:column;align-items:center;gap:.125rem;text-align:center;pointer-events:none}.dashboard-performance-gauge__value{font-size:2.75rem;font-weight:800;line-height:1;color:var(--dashboard-performance-status-color, #334155)}.dashboard-performance-gauge__label{max-width:18rem;overflow:hidden;color:#475569;font-size:.95rem;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.dashboard-performance-gauge__status{display:inline-flex;max-width:min(80%,18rem);align-items:center;justify-content:center;gap:.375rem;border-radius:999px;padding:.25rem .625rem;background:color-mix(in srgb,var(--dashboard-performance-status-color, #64748b) 10%,transparent);color:var(--dashboard-performance-status-color, #475569);font-size:.8125rem;font-weight:700;line-height:1.2}.dashboard-performance-gauge__status-dot{width:.5rem;height:.5rem;flex:0 0 auto;border-radius:999px;background:currentColor}.dashboard-performance-gauge__status-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: CardContentComponent, selector: "mt-card-content", inputs: ["title", "inGroup", "groupHeader", "headerConfig", "styleConfig", "cardStyleConfig", "density", "padding", "showHeader", "headerClickable", "isNoTopEnd", "isChart", "titleEditable"], outputs: ["headerClick", "titleChange"] }, { kind: "component", type: CardFilterComponent, selector: "mt-card-filter", inputs: ["config", "dashboardId"], outputs: ["filterChange"] }, { kind: "component", type: StaticFiltersComponent, selector: "mt-static-filters", inputs: ["config", "dashboardId"], outputs: ["filterChange"] }, { kind: "component", type: DynamicFiltersComponent, selector: "mt-dynamic-filters", inputs: ["fields", "dashboardId", "reportId", "showLabels"], outputs: ["filterChange", "filtersChange"] }, { kind: "component", type: CardInfoComponent, selector: "mt-card-info", inputs: ["cardInfo"] }, { kind: "component", type: EChartComponent, selector: "mt-echart", inputs: ["dashboardId", "chartConfig", "configurationItem", "height", "inGroup", "headerHidden"], outputs: ["chartClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [import('@masterteam/timeline').then(m => m.Timeline), import('@masterteam/timeline').then(m => m.TimelineColumnTemplateDirective), import('@masterteam/timeline').then(m => m.TimelinePopoverTemplateDirective), import('@masterteam/components/entities').then(m => m.EntitiesPreview), import('@masterteam/components/entities').then(m => m.EntityPreview), import('@masterteam/icons').then(m => m.Icon)]] });
|
|
27399
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ChartCardComponent, isStandalone: true, selector: "mt-chart-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null }, reportId: { classPropertyName: "reportId", publicName: "reportId", isSignal: true, isRequired: false, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null }, isConfigMode: { classPropertyName: "isConfigMode", publicName: "isConfigMode", isSignal: true, isRequired: false, transformFunction: null }, titleEditable: { classPropertyName: "titleEditable", publicName: "titleEditable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction", onConfigure: "onConfigure", onTitleChange: "onTitleChange" }, ngImport: i0, template: "<ng-template #timelineLegendList>\n <div\n class=\"dashboard-timeline-legend\"\n [attr.data-position]=\"timelineLegendPosition()\"\n >\n @for (label of timelineLabels(); track $index) {\n <span\n class=\"dashboard-timeline-legend-item\"\n [title]=\"label.label || label.name || label.key\"\n >\n <span\n class=\"dashboard-timeline-legend-marker\"\n [class.shape-rect]=\"label.shape === 'rect'\"\n [class.shape-roundRect]=\"label.shape === 'roundRect'\"\n [class.shape-diamond]=\"label.shape === 'diamond'\"\n [class.shape-triangle]=\"label.shape === 'triangle'\"\n [style.background]=\"\n label.shape === 'triangle' ? null : label.color || '#64748b'\n \"\n [style.border-bottom-color]=\"\n label.shape === 'triangle' ? label.color || '#64748b' : null\n \"\n ></span>\n <span class=\"dashboard-timeline-legend-label\">\n {{ label.label || label.name || label.key }}\n </span>\n </span>\n }\n </div>\n</ng-template>\n\n<mt-card-content\n [inGroup]=\"inGroup()\"\n [headerConfig]=\"\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\n \"\n [styleConfig]=\"\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\n \"\n [cardStyleConfig]=\"\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\n \"\n [density]=\"configurationItem()?.clientConfig?.configAsType?.['density']\"\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\n [title]=\"title()\"\n [titleEditable]=\"titleEditable()\"\n (titleChange)=\"onTitleChange.emit($event)\"\n [isNoTopEnd]=\"!showTopEnd()\"\n [isChart]=\"true\"\n (headerClick)=\"onHeaderClick()\"\n>\n <ng-container topEnd>\n @if (showStaticFilters()) {\n <mt-static-filters\n [config]=\"staticFilterConfig()\"\n [dashboardId]=\"dashboardId()\"\n >\n </mt-static-filters>\n }\n @if (showDynamicFilters()) {\n <mt-dynamic-filters\n [fields]=\"dynamicFilterFields()\"\n [dashboardId]=\"dashboardId()\"\n [reportId]=\"reportId()\"\n [showLabels]=\"false\"\n >\n </mt-dynamic-filters>\n }\n @if (showFilter()) {\n <mt-card-filter [config]=\"filterConfig()\" [dashboardId]=\"dashboardId()\">\n </mt-card-filter>\n }\n @if (cardInfoConfig()?.show && cardInfoConfig()?.value) {\n <mt-card-info [cardInfo]=\"cardInfoConfig()\"></mt-card-info>\n }\n </ng-container>\n\n <ng-container body>\n <div\n class=\"chart-container\"\n [class.config-mode]=\"isConfigMode()\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n >\n @if (componentViewMode() === \"splitter\" && hasSplitterData()) {\n <div\n class=\"splitter-view\"\n [class.splitter-vertical]=\"splitterOrientation() === 'vertical'\"\n [style.gap.px]=\"splitterGap()\"\n >\n <div class=\"splitter-side splitter-positive\">\n <div class=\"splitter-count\">\n {{ dataHandled()?.positive?.groupedValue ?? 0 }}\n </div>\n <ul class=\"splitter-labels\">\n @for (\n label of dataHandled()?.positive?.labels || [];\n track $index\n ) {\n <li>{{ label }}</li>\n }\n </ul>\n </div>\n <div class=\"splitter-divider\"></div>\n <div class=\"splitter-side splitter-negative\">\n <div class=\"splitter-count\">\n {{ dataHandled()?.negative?.groupedValue ?? 0 }}\n </div>\n <ul class=\"splitter-labels\">\n @for (\n label of dataHandled()?.negative?.labels || [];\n track $index\n ) {\n <li>{{ label }}</li>\n }\n </ul>\n </div>\n </div>\n } @else if (componentViewMode() === \"timeline\" && hasTimelineData()) {\n <div\n class=\"dashboard-timeline-view\"\n [attr.data-legend-position]=\"timelineLegendPosition()\"\n [style.--timeline-header-bg]=\"timelineHeaderBgColor()\"\n [style.--timeline-header-color]=\"timelineHeaderTextColor()\"\n >\n @if (\n timelineLegendShow() &&\n timelineLabels().length &&\n (timelineLegendPosition() === \"top\" ||\n timelineLegendPosition() === \"left\")\n ) {\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\n }\n\n @defer (on viewport) {\n <mt-timeline\n class=\"dashboard-timeline-renderer\"\n [showHeader]=\"false\"\n [showZoomToFitControl]=\"false\"\n [timelineMode]=\"timelineMode()\"\n (timelineModeChange)=\"timelineMode.set($event)\"\n [ganttData]=\"timelineResources()\"\n [ganttMapping]=\"timelineGanttMapping\"\n [columns]=\"timelineColumns()\"\n [defaultVisibleColumns]=\"2\"\n [columnsPaneMinWidthPx]=\"220\"\n [columnsPaneMaxWidthPx]=\"520\"\n [enableVirtualScroll]=\"true\"\n [virtualScrollThreshold]=\"0\"\n [virtualScrollBodyHeightPx]=\"520\"\n [showGanttDetailsPopup]=\"true\"\n [emptyMessage]=\"t('noChartData')\"\n >\n <ng-template\n mtTimelineColumn=\"title\"\n let-item=\"item\"\n let-resolved=\"resolved\"\n let-canToggle=\"canToggle\"\n let-isCollapsed=\"isCollapsed\"\n let-toggle=\"toggle\"\n >\n <div\n class=\"dashboard-timeline-title-cell\"\n [style.padding-inline-start.px]=\"\n $any(resolved).levelDepth * 16\n \"\n >\n @if (canToggle) {\n <mt-icon\n class=\"dashboard-timeline-title-toggle\"\n [icon]=\"timelineCollapseIcon(isCollapsed)\"\n (click)=\"$event.stopPropagation(); toggle()\"\n ></mt-icon>\n } @else {\n <span class=\"dashboard-timeline-title-spacer\"></span>\n }\n\n <button\n type=\"button\"\n class=\"dashboard-timeline-title-action\"\n [title]=\"$any(resolved).title\"\n (click)=\"onTimelineTitleClick(item, $event)\"\n >\n {{ $any(resolved).title }}\n </button>\n </div>\n </ng-template>\n\n @for (column of timelineEntityColumns(); track column.key) {\n <ng-template [mtTimelineColumn]=\"column.key\" let-value=\"value\">\n <mt-entity-preview\n class=\"dashboard-timeline-column-entity\"\n [data]=\"timelineColumnEntityData(value)\"\n attachmentShape=\"compact\"\n ></mt-entity-preview>\n </ng-template>\n }\n\n <ng-template mtTimelinePopover let-item=\"item\">\n @if (timelinePopoverEntities(item); as entities) {\n @if (entities.length) {\n <div\n class=\"w-[27rem] max-w-[90vw] max-h-[24rem] overflow-auto p-2\"\n >\n <mt-entities-preview\n [entities]=\"entities\"\n [stackOnNarrow]=\"false\"\n />\n </div>\n }\n }\n </ng-template>\n </mt-timeline>\n } @placeholder {\n <div class=\"dashboard-timeline-placeholder\" aria-hidden=\"true\">\n <div></div>\n <div></div>\n <div></div>\n </div>\n }\n\n @if (\n timelineLegendShow() &&\n timelineLabels().length &&\n (timelineLegendPosition() === \"bottom\" ||\n timelineLegendPosition() === \"right\")\n ) {\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\n }\n </div>\n } @else if (\n componentViewMode() === \"phaseGateStepper\" && hasPhaseGateData()\n ) {\n <div\n class=\"phase-gate-view\"\n [class.phase-gate-compact]=\"phaseGateCompact()\"\n >\n <ol class=\"phase-steps\">\n @for (step of phaseGateSteps(); track $index) {\n <li\n class=\"phase-step\"\n [class.is-current]=\"$index === phaseGateCurrentIndex()\"\n [class.is-done]=\"$index < phaseGateCurrentIndex()\"\n >\n <span class=\"phase-step-number\">{{ $index + 1 }}</span>\n @if (phaseGateShowLabels()) {\n <span class=\"phase-step-name\">{{\n step?.name || step?.title || step?.label || t(\"phase\")\n }}</span>\n }\n </li>\n }\n </ol>\n </div>\n } @else if (\n componentViewMode() === \"performanceGauge\" &&\n dataHandled() &&\n !dataHandled()?.noData\n ) {\n @let gauge = performanceGauge();\n <div\n class=\"dashboard-performance-gauge\"\n [class.is-clickable]=\"hasActions()\"\n [style.--dashboard-performance-status-color]=\"gauge.status.color\"\n (click)=\"onPerformanceGaugeClick($event)\"\n >\n <div\n class=\"dashboard-performance-gauge__figure\"\n [style.width.%]=\"gauge.scalePercent\"\n >\n <svg\n class=\"dashboard-performance-gauge__svg\"\n viewBox=\"0 0 100 72\"\n role=\"img\"\n [attr.aria-label]=\"gauge.label + ' ' + gauge.display\"\n >\n <path\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\n fill=\"none\"\n stroke=\"#e5e7eb\"\n stroke-width=\"6\"\n stroke-linecap=\"round\"\n pathLength=\"100\"\n ></path>\n\n @for (segment of performanceGaugeSegments(); track segment.key) {\n <path\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\n fill=\"none\"\n [attr.stroke]=\"segment.color\"\n stroke-width=\"6\"\n stroke-linecap=\"round\"\n pathLength=\"100\"\n [attr.stroke-dasharray]=\"segment.dashArray\"\n [attr.stroke-dashoffset]=\"segment.dashOffset\"\n [style.opacity]=\"segment.opacity\"\n ></path>\n <text\n [attr.x]=\"segment.labelX\"\n [attr.y]=\"segment.labelY\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n font-size=\"5.5\"\n font-weight=\"700\"\n fill=\"#334155\"\n >\n {{ segment.label }}\n </text>\n }\n\n <circle\n [attr.cx]=\"gauge.marker.x\"\n [attr.cy]=\"gauge.marker.y\"\n r=\"4.5\"\n fill=\"#fff\"\n [attr.stroke]=\"gauge.status.color\"\n stroke-width=\"3\"\n ></circle>\n </svg>\n\n <div class=\"dashboard-performance-gauge__center\">\n <div class=\"dashboard-performance-gauge__value\">\n {{ gauge.display }}\n </div>\n <div class=\"dashboard-performance-gauge__label\">\n {{ gauge.label }}\n </div>\n </div>\n </div>\n\n <div\n class=\"dashboard-performance-gauge__status\"\n [title]=\"performanceGaugeStatusName()\"\n >\n <span class=\"dashboard-performance-gauge__status-dot\"></span>\n <span class=\"dashboard-performance-gauge__status-text\">\n {{ performanceGaugeStatusName() }}\n </span>\n </div>\n </div>\n } @else if (dataHandled() && !dataHandled()?.noData) {\n <mt-echart\n [dashboardId]=\"dashboardId()\"\n [chartConfig]=\"dataHandled()\"\n [configurationItem]=\"configurationItem()\"\n [inGroup]=\"inGroup()\"\n (chartClick)=\"onChartClick($event)\"\n >\n </mt-echart>\n } @else if (dataHandled()?.noData) {\n <div class=\"no-data-container\">\n <i class=\"pi pi-info-circle\"></i>\n <span>{{ t(\"noChartData\") }}</span>\n </div>\n } @else {\n <div class=\"loading-container\">\n <div class=\"loading-spinner\"></div>\n </div>\n }\n </div>\n </ng-container>\n</mt-card-content>\n", styles: [":host{display:block;height:100%}.chart-container{height:100%;min-height:0}.chart-container.config-mode{min-height:400px}.no-data-container,.needs-config-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:0;color:#999;gap:.5rem;padding:1rem;text-align:center}.no-data-container i,.needs-config-container i{font-size:2rem}.needs-config-container .title{font-weight:600;color:#555;font-size:.95rem}.needs-config-container .hint{font-size:.8rem;max-width:28rem;line-height:1.4}.needs-config-container .configure-btn{margin-top:.5rem;display:inline-flex;align-items:center;gap:.4rem;padding:.4rem .9rem;font-size:.85rem;font-weight:600;color:#fff;background:var(--p-primary-500, #2563eb);border:0;border-radius:.375rem;cursor:pointer;box-shadow:0 1px 2px #0000000d}.needs-config-container .configure-btn:hover{background:var(--p-primary-600, #1d4ed8)}.loading-container{display:flex;align-items:center;justify-content:center;height:100%;min-height:0}.loading-spinner{width:2rem;height:2rem;border:3px solid #f0f0f0;border-top-color:#4caf50;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.splitter-view{display:flex;align-items:stretch;height:100%;gap:.5rem}.splitter-view.splitter-vertical{flex-direction:column}.splitter-view.splitter-vertical .splitter-divider{width:auto;height:1px}.splitter-side{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:1rem;border-radius:.5rem}.splitter-positive{background:#22c55e14}.splitter-negative{background:#ef444414}.splitter-count{font-size:2rem;font-weight:700;margin-bottom:.5rem}.splitter-positive .splitter-count{color:#16a34a}.splitter-negative .splitter-count{color:#dc2626}.splitter-labels{list-style:none;padding:0;margin:0;text-align:center;font-size:.8rem;color:#555}.splitter-labels li{padding:.15rem 0}.splitter-divider{width:1px;background:#00000014}.dashboard-timeline-view{display:flex;flex-direction:column;gap:.625rem;height:100%;min-height:0;overflow:auto}.dashboard-timeline-view[data-legend-position=left],.dashboard-timeline-view[data-legend-position=right]{flex-direction:row;overflow:hidden}.dashboard-timeline-legend{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.35rem .75rem;flex-shrink:0;min-width:0;max-width:100%}.dashboard-timeline-legend[data-position=left],.dashboard-timeline-legend[data-position=right]{max-width:12rem;max-height:100%;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;overflow:auto}.dashboard-timeline-legend-item{display:inline-flex;align-items:center;gap:.25rem;max-width:12rem;padding:0;border:0;border-radius:0;font-size:.75rem;color:#475569;font-weight:500;line-height:1.2;background:transparent}.dashboard-timeline-legend-marker{display:inline-block;width:.625rem;height:.625rem;flex:0 0 auto;border-radius:999px}.dashboard-timeline-legend-marker.shape-rect{border-radius:0}.dashboard-timeline-legend-marker.shape-roundRect{border-radius:.2rem}.dashboard-timeline-legend-marker.shape-diamond{border-radius:.0625rem;transform:rotate(45deg)}.dashboard-timeline-legend-marker.shape-triangle{width:0;height:0;background:transparent!important;border-radius:0;border-left:.34rem solid transparent;border-right:.34rem solid transparent;border-bottom-width:.6rem;border-bottom-style:solid}.dashboard-timeline-legend-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-renderer{display:block;min-height:0;flex:1}.dashboard-timeline-placeholder{display:flex;min-height:260px;flex:1;flex-direction:column;gap:.75rem;padding:1rem}.dashboard-timeline-placeholder div{height:3rem;border-radius:.5rem;background:var(--p-surface-100);animation:dashboard-builder-pulse 1.2s ease-in-out infinite}@keyframes dashboard-builder-pulse{0%,to{opacity:.55}50%{opacity:1}}:host ::ng-deep .dashboard-timeline-renderer>div{margin-top:0}:host ::ng-deep .dashboard-timeline-view mt-timeline-gantt-header .bg-surface-50{background-color:var(--timeline-header-bg, var(--p-surface-50));color:var(--timeline-header-color, inherit)}.dashboard-timeline-column-entity{display:block;min-width:0}.dashboard-timeline-title-cell{display:flex;min-width:0;align-items:center;gap:.5rem;width:100%}.dashboard-timeline-title-toggle{flex:0 0 auto;cursor:pointer;color:#64748b}.dashboard-timeline-title-spacer{display:inline-block;width:1.25rem;flex:0 0 1.25rem}.dashboard-timeline-title-action{min-width:0;flex:1 1 auto;overflow:hidden;border:0;background:transparent;padding:0;color:#334155;cursor:pointer;font-size:.875rem;font-weight:600;text-align:start;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-title-action:hover{color:var(--p-primary-600, #2563eb);text-decoration:underline}.phase-gate-view{height:100%;display:flex;align-items:center;justify-content:center;padding:1rem;overflow-x:auto}.phase-steps{display:flex;align-items:center;gap:.75rem;list-style:none;margin:0;padding:0}.phase-step{display:flex;align-items:center;gap:.5rem;padding:.4rem .75rem;border-radius:999px;background:#0000000a;font-size:.8rem;color:#555;white-space:nowrap}.phase-step-number{width:1.5rem;height:1.5rem;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;font-weight:700;background:#0000000f;color:#666}.phase-step.is-done{background:#22c55e1a;color:#16a34a}.phase-step.is-done .phase-step-number{background:#16a34a;color:#fff}.phase-step.is-current{background:#2563eb1a;color:#2563eb;font-weight:600}.phase-step.is-current .phase-step-number{background:#2563eb;color:#fff}.phase-gate-view.phase-gate-compact .phase-step{padding:.2rem .45rem;font-size:.7rem;gap:.25rem}.phase-gate-view.phase-gate-compact .phase-step-number{width:1.1rem;height:1.1rem;font-size:.7rem}.dashboard-performance-gauge{display:flex;height:100%;min-height:0;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:.875rem;overflow:hidden;padding:.75rem 1rem 1rem;cursor:default}.dashboard-performance-gauge.is-clickable{cursor:pointer}.dashboard-performance-gauge__figure{position:relative;width:min(100%,28rem);min-width:12rem;max-width:100%;transform-origin:center bottom}.dashboard-performance-gauge__svg{display:block;width:100%;height:auto;overflow:visible}.dashboard-performance-gauge__center{position:absolute;left:50%;top:72%;display:flex;max-width:90%;transform:translate(-50%,-50%);flex-direction:column;align-items:center;gap:.125rem;text-align:center;pointer-events:none}.dashboard-performance-gauge__value{font-size:2.75rem;font-weight:800;line-height:1;color:var(--dashboard-performance-status-color, #334155)}.dashboard-performance-gauge__label{max-width:18rem;overflow:hidden;color:#475569;font-size:.95rem;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.dashboard-performance-gauge__status{display:inline-flex;max-width:min(80%,18rem);align-items:center;justify-content:center;gap:.375rem;border-radius:999px;padding:.25rem .625rem;background:color-mix(in srgb,var(--dashboard-performance-status-color, #64748b) 10%,transparent);color:var(--dashboard-performance-status-color, #475569);font-size:.8125rem;font-weight:700;line-height:1.2}.dashboard-performance-gauge__status-dot{width:.5rem;height:.5rem;flex:0 0 auto;border-radius:999px;background:currentColor}.dashboard-performance-gauge__status-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\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: CardContentComponent, selector: "mt-card-content", inputs: ["title", "inGroup", "groupHeader", "headerConfig", "styleConfig", "cardStyleConfig", "density", "padding", "showHeader", "headerClickable", "isNoTopEnd", "isChart", "titleEditable"], outputs: ["headerClick", "titleChange"] }, { kind: "component", type: CardFilterComponent, selector: "mt-card-filter", inputs: ["config", "dashboardId"], outputs: ["filterChange"] }, { kind: "component", type: StaticFiltersComponent, selector: "mt-static-filters", inputs: ["config", "dashboardId"], outputs: ["filterChange"] }, { kind: "component", type: DynamicFiltersComponent, selector: "mt-dynamic-filters", inputs: ["fields", "dashboardId", "reportId", "showLabels"], outputs: ["filterChange", "filtersChange"] }, { kind: "component", type: CardInfoComponent, selector: "mt-card-info", inputs: ["cardInfo"] }, { kind: "component", type: EChartComponent, selector: "mt-echart", inputs: ["dashboardId", "chartConfig", "configurationItem", "height", "inGroup", "headerHidden"], outputs: ["chartClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [import('@masterteam/timeline').then(m => m.Timeline), import('@masterteam/timeline').then(m => m.TimelineColumnTemplateDirective), import('@masterteam/timeline').then(m => m.TimelinePopoverTemplateDirective), import('@masterteam/components/entities').then(m => m.EntitiesPreview), import('@masterteam/components/entities').then(m => m.EntityPreview), import('@masterteam/icons').then(m => m.Icon)]] });
|
|
27067
27400
|
}
|
|
27068
27401
|
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.8", ngImport: i0, type: ChartCardComponent, resolveDeferredDeps: () => [import('@masterteam/timeline').then(m => m.Timeline), import('@masterteam/timeline').then(m => m.TimelineColumnTemplateDirective), import('@masterteam/timeline').then(m => m.TimelinePopoverTemplateDirective), import('@masterteam/components/entities').then(m => m.EntitiesPreview), import('@masterteam/components/entities').then(m => m.EntityPreview), import('@masterteam/icons').then(m => m.Icon)], resolveMetadata: (Timeline, TimelineColumnTemplateDirective, TimelinePopoverTemplateDirective, EntitiesPreview, EntityPreview, Icon) => ({ decorators: [{
|
|
27069
27402
|
type: Component,
|
|
@@ -27082,7 +27415,7 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.8", ng
|
|
|
27082
27415
|
EntitiesPreview,
|
|
27083
27416
|
EntityPreview,
|
|
27084
27417
|
Icon,
|
|
27085
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mt-card-content\r\n [inGroup]=\"inGroup()\"\r\n [headerConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\r\n \"\r\n [styleConfig]=\"\r\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\r\n \"\r\n [cardStyleConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\r\n \"\r\n [density]=\"configurationItem()?.clientConfig?.configAsType?.['density']\"\r\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\r\n [title]=\"title()\"\r\n [titleEditable]=\"titleEditable()\"\r\n (titleChange)=\"onTitleChange.emit($event)\"\r\n [isNoTopEnd]=\"!showTopEnd()\"\r\n [isChart]=\"true\"\r\n (headerClick)=\"onHeaderClick()\"\r\n>\r\n <ng-container topEnd>\r\n @if (showStaticFilters()) {\r\n <mt-static-filters\r\n [config]=\"staticFilterConfig()\"\r\n [dashboardId]=\"dashboardId()\"\r\n >\r\n </mt-static-filters>\r\n }\r\n @if (showDynamicFilters()) {\r\n <mt-dynamic-filters\r\n [fields]=\"dynamicFilterFields()\"\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [showLabels]=\"false\"\r\n >\r\n </mt-dynamic-filters>\r\n }\r\n @if (showFilter()) {\r\n <mt-card-filter [config]=\"filterConfig()\" [dashboardId]=\"dashboardId()\">\r\n </mt-card-filter>\r\n }\r\n @if (cardInfoConfig()?.show && cardInfoConfig()?.value) {\r\n <mt-card-info [cardInfo]=\"cardInfoConfig()\"></mt-card-info>\r\n }\r\n @if (\r\n componentViewMode() === \"timeline\" &&\r\n timelineLabels().length &&\r\n timelineLegendShow()\r\n ) {\r\n <div class=\"dashboard-timeline-legend\">\r\n @for (label of timelineLabels(); track $index) {\r\n <span\r\n class=\"dashboard-timeline-legend-item\"\r\n [title]=\"label.label || label.name || label.key\"\r\n >\r\n <span\r\n class=\"dashboard-timeline-legend-marker\"\r\n [class.shape-rect]=\"label.shape === 'rect'\"\r\n [class.shape-roundRect]=\"label.shape === 'roundRect'\"\r\n [class.shape-diamond]=\"label.shape === 'diamond'\"\r\n [class.shape-triangle]=\"label.shape === 'triangle'\"\r\n [style.background]=\"\r\n label.shape === 'triangle' ? null : label.color || '#64748b'\r\n \"\r\n [style.border-bottom-color]=\"\r\n label.shape === 'triangle' ? label.color || '#64748b' : null\r\n \"\r\n ></span>\r\n <span class=\"dashboard-timeline-legend-label\">\r\n {{ label.label || label.name || label.key }}\r\n </span>\r\n </span>\r\n }\r\n </div>\r\n }\r\n </ng-container>\r\n\r\n <ng-container body>\r\n <div\r\n class=\"chart-container\"\r\n [class.config-mode]=\"isConfigMode()\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n >\r\n @if (componentViewMode() === \"splitter\" && hasSplitterData()) {\r\n <div\r\n class=\"splitter-view\"\r\n [class.splitter-vertical]=\"splitterOrientation() === 'vertical'\"\r\n [style.gap.px]=\"splitterGap()\"\r\n >\r\n <div class=\"splitter-side splitter-positive\">\r\n <div class=\"splitter-count\">\r\n {{ dataHandled()?.positive?.groupedValue ?? 0 }}\r\n </div>\r\n <ul class=\"splitter-labels\">\r\n @for (\r\n label of dataHandled()?.positive?.labels || [];\r\n track $index\r\n ) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n </div>\r\n <div class=\"splitter-divider\"></div>\r\n <div class=\"splitter-side splitter-negative\">\r\n <div class=\"splitter-count\">\r\n {{ dataHandled()?.negative?.groupedValue ?? 0 }}\r\n </div>\r\n <ul class=\"splitter-labels\">\r\n @for (\r\n label of dataHandled()?.negative?.labels || [];\r\n track $index\r\n ) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n </div>\r\n </div>\r\n } @else if (componentViewMode() === \"timeline\" && hasTimelineData()) {\r\n <div\r\n class=\"dashboard-timeline-view\"\r\n [style.--timeline-header-bg]=\"timelineHeaderBgColor()\"\r\n [style.--timeline-header-color]=\"timelineHeaderTextColor()\"\r\n >\r\n @defer (on viewport) {\r\n <mt-timeline\r\n class=\"dashboard-timeline-renderer\"\r\n [showHeader]=\"false\"\r\n [showZoomToFitControl]=\"false\"\r\n [timelineMode]=\"timelineMode()\"\r\n (timelineModeChange)=\"timelineMode.set($event)\"\r\n [ganttData]=\"timelineResources()\"\r\n [ganttMapping]=\"timelineGanttMapping\"\r\n [columns]=\"timelineColumns()\"\r\n [defaultVisibleColumns]=\"2\"\r\n [columnsPaneMinWidthPx]=\"220\"\r\n [columnsPaneMaxWidthPx]=\"520\"\r\n [enableVirtualScroll]=\"true\"\r\n [virtualScrollThreshold]=\"0\"\r\n [virtualScrollBodyHeightPx]=\"520\"\r\n [showGanttDetailsPopup]=\"true\"\r\n [emptyMessage]=\"t('noChartData')\"\r\n >\r\n <ng-template\r\n mtTimelineColumn=\"title\"\r\n let-item=\"item\"\r\n let-resolved=\"resolved\"\r\n let-canToggle=\"canToggle\"\r\n let-isCollapsed=\"isCollapsed\"\r\n let-toggle=\"toggle\"\r\n >\r\n <div\r\n class=\"dashboard-timeline-title-cell\"\r\n [style.padding-inline-start.px]=\"\r\n $any(resolved).levelDepth * 16\r\n \"\r\n >\r\n @if (canToggle) {\r\n <mt-icon\r\n class=\"dashboard-timeline-title-toggle\"\r\n [icon]=\"timelineCollapseIcon(isCollapsed)\"\r\n (click)=\"$event.stopPropagation(); toggle()\"\r\n ></mt-icon>\r\n } @else {\r\n <span class=\"dashboard-timeline-title-spacer\"></span>\r\n }\r\n\r\n <button\r\n type=\"button\"\r\n class=\"dashboard-timeline-title-action\"\r\n [title]=\"$any(resolved).title\"\r\n (click)=\"onTimelineTitleClick(item, $event)\"\r\n >\r\n {{ $any(resolved).title }}\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n @for (column of timelineEntityColumns(); track column.key) {\r\n <ng-template [mtTimelineColumn]=\"column.key\" let-value=\"value\">\r\n <mt-entity-preview\r\n class=\"dashboard-timeline-column-entity\"\r\n [data]=\"timelineColumnEntityData(value)\"\r\n attachmentShape=\"compact\"\r\n ></mt-entity-preview>\r\n </ng-template>\r\n }\r\n\r\n <ng-template mtTimelinePopover let-item=\"item\">\r\n @if (timelinePopoverEntities(item); as entities) {\r\n @if (entities.length) {\r\n <div\r\n class=\"w-[27rem] max-w-[90vw] max-h-[24rem] overflow-auto p-2\"\r\n >\r\n <mt-entities-preview\r\n [entities]=\"entities\"\r\n [stackOnNarrow]=\"false\"\r\n />\r\n </div>\r\n }\r\n }\r\n </ng-template>\r\n </mt-timeline>\r\n } @placeholder {\r\n <div class=\"dashboard-timeline-placeholder\" aria-hidden=\"true\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n }\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"phaseGateStepper\" && hasPhaseGateData()\r\n ) {\r\n <div\r\n class=\"phase-gate-view\"\r\n [class.phase-gate-compact]=\"phaseGateCompact()\"\r\n >\r\n <ol class=\"phase-steps\">\r\n @for (step of phaseGateSteps(); track $index) {\r\n <li\r\n class=\"phase-step\"\r\n [class.is-current]=\"$index === phaseGateCurrentIndex()\"\r\n [class.is-done]=\"$index < phaseGateCurrentIndex()\"\r\n >\r\n <span class=\"phase-step-number\">{{ $index + 1 }}</span>\r\n @if (phaseGateShowLabels()) {\r\n <span class=\"phase-step-name\">{{\r\n step?.name || step?.title || step?.label || t(\"phase\")\r\n }}</span>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"performanceGauge\" &&\r\n dataHandled() &&\r\n !dataHandled()?.noData\r\n ) {\r\n @let gauge = performanceGauge();\r\n <div\r\n class=\"dashboard-performance-gauge\"\r\n [class.is-clickable]=\"hasActions()\"\r\n [style.--dashboard-performance-status-color]=\"gauge.status.color\"\r\n (click)=\"onPerformanceGaugeClick($event)\"\r\n >\r\n <div\r\n class=\"dashboard-performance-gauge__figure\"\r\n [style.width.%]=\"gauge.scalePercent\"\r\n >\r\n <svg\r\n class=\"dashboard-performance-gauge__svg\"\r\n viewBox=\"0 0 100 72\"\r\n role=\"img\"\r\n [attr.aria-label]=\"gauge.label + ' ' + gauge.display\"\r\n >\r\n <path\r\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\r\n fill=\"none\"\r\n stroke=\"#e5e7eb\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n pathLength=\"100\"\r\n ></path>\r\n\r\n @for (segment of performanceGaugeSegments(); track segment.key) {\r\n <path\r\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\r\n fill=\"none\"\r\n [attr.stroke]=\"segment.color\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n pathLength=\"100\"\r\n [attr.stroke-dasharray]=\"segment.dashArray\"\r\n [attr.stroke-dashoffset]=\"segment.dashOffset\"\r\n [style.opacity]=\"segment.opacity\"\r\n ></path>\r\n <text\r\n [attr.x]=\"segment.labelX\"\r\n [attr.y]=\"segment.labelY\"\r\n text-anchor=\"middle\"\r\n dominant-baseline=\"central\"\r\n font-size=\"5.5\"\r\n font-weight=\"700\"\r\n fill=\"#334155\"\r\n >\r\n {{ segment.label }}\r\n </text>\r\n }\r\n\r\n <circle\r\n [attr.cx]=\"gauge.marker.x\"\r\n [attr.cy]=\"gauge.marker.y\"\r\n r=\"4.5\"\r\n fill=\"#fff\"\r\n [attr.stroke]=\"gauge.status.color\"\r\n stroke-width=\"3\"\r\n ></circle>\r\n </svg>\r\n\r\n <div class=\"dashboard-performance-gauge__center\">\r\n <div class=\"dashboard-performance-gauge__value\">\r\n {{ gauge.display }}\r\n </div>\r\n <div class=\"dashboard-performance-gauge__label\">\r\n {{ gauge.label }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"dashboard-performance-gauge__status\"\r\n [title]=\"performanceGaugeStatusName()\"\r\n >\r\n <span class=\"dashboard-performance-gauge__status-dot\"></span>\r\n <span class=\"dashboard-performance-gauge__status-text\">\r\n {{ performanceGaugeStatusName() }}\r\n </span>\r\n </div>\r\n </div>\r\n } @else if (dataHandled() && !dataHandled()?.noData) {\r\n <mt-echart\r\n [dashboardId]=\"dashboardId()\"\r\n [chartConfig]=\"dataHandled()\"\r\n [configurationItem]=\"configurationItem()\"\r\n [inGroup]=\"inGroup()\"\r\n (chartClick)=\"onChartClick($event)\"\r\n >\r\n </mt-echart>\r\n } @else if (dataHandled()?.noData) {\r\n <div class=\"no-data-container\">\r\n <i class=\"pi pi-info-circle\"></i>\r\n <span>{{ t(\"noChartData\") }}</span>\r\n </div>\r\n } @else {\r\n <div class=\"loading-container\">\r\n <div class=\"loading-spinner\"></div>\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n</mt-card-content>\r\n", styles: [":host{display:block;height:100%}.chart-container{height:100%;min-height:0}.chart-container.config-mode{min-height:400px}.no-data-container,.needs-config-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:0;color:#999;gap:.5rem;padding:1rem;text-align:center}.no-data-container i,.needs-config-container i{font-size:2rem}.needs-config-container .title{font-weight:600;color:#555;font-size:.95rem}.needs-config-container .hint{font-size:.8rem;max-width:28rem;line-height:1.4}.needs-config-container .configure-btn{margin-top:.5rem;display:inline-flex;align-items:center;gap:.4rem;padding:.4rem .9rem;font-size:.85rem;font-weight:600;color:#fff;background:var(--p-primary-500, #2563eb);border:0;border-radius:.375rem;cursor:pointer;box-shadow:0 1px 2px #0000000d}.needs-config-container .configure-btn:hover{background:var(--p-primary-600, #1d4ed8)}.loading-container{display:flex;align-items:center;justify-content:center;height:100%;min-height:0}.loading-spinner{width:2rem;height:2rem;border:3px solid #f0f0f0;border-top-color:#4caf50;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.splitter-view{display:flex;align-items:stretch;height:100%;gap:.5rem}.splitter-view.splitter-vertical{flex-direction:column}.splitter-view.splitter-vertical .splitter-divider{width:auto;height:1px}.splitter-side{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:1rem;border-radius:.5rem}.splitter-positive{background:#22c55e14}.splitter-negative{background:#ef444414}.splitter-count{font-size:2rem;font-weight:700;margin-bottom:.5rem}.splitter-positive .splitter-count{color:#16a34a}.splitter-negative .splitter-count{color:#dc2626}.splitter-labels{list-style:none;padding:0;margin:0;text-align:center;font-size:.8rem;color:#555}.splitter-labels li{padding:.15rem 0}.splitter-divider{width:1px;background:#00000014}.dashboard-timeline-view{display:flex;flex-direction:column;gap:.625rem;height:100%;min-height:0;overflow:auto}.dashboard-timeline-legend{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.35rem .75rem;flex-shrink:0;min-width:0;max-width:100%}.dashboard-timeline-legend-item{display:inline-flex;align-items:center;gap:.25rem;max-width:12rem;padding:0;border:0;border-radius:0;font-size:.75rem;color:#475569;font-weight:500;line-height:1.2;background:transparent}.dashboard-timeline-legend-marker{display:inline-block;width:.625rem;height:.625rem;flex:0 0 auto;border-radius:999px}.dashboard-timeline-legend-marker.shape-rect{border-radius:0}.dashboard-timeline-legend-marker.shape-roundRect{border-radius:.2rem}.dashboard-timeline-legend-marker.shape-diamond{border-radius:.0625rem;transform:rotate(45deg)}.dashboard-timeline-legend-marker.shape-triangle{width:0;height:0;background:transparent!important;border-radius:0;border-left:.34rem solid transparent;border-right:.34rem solid transparent;border-bottom-width:.6rem;border-bottom-style:solid}.dashboard-timeline-legend-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-renderer{display:block;min-height:0;flex:1}.dashboard-timeline-placeholder{display:flex;min-height:260px;flex:1;flex-direction:column;gap:.75rem;padding:1rem}.dashboard-timeline-placeholder div{height:3rem;border-radius:.5rem;background:var(--p-surface-100);animation:dashboard-builder-pulse 1.2s ease-in-out infinite}@keyframes dashboard-builder-pulse{0%,to{opacity:.55}50%{opacity:1}}:host ::ng-deep .dashboard-timeline-renderer>div{margin-top:0}:host ::ng-deep .dashboard-timeline-view mt-timeline-gantt-header .bg-surface-50{background-color:var(--timeline-header-bg, var(--p-surface-50));color:var(--timeline-header-color, inherit)}.dashboard-timeline-column-entity{display:block;min-width:0}.dashboard-timeline-title-cell{display:flex;min-width:0;align-items:center;gap:.5rem;width:100%}.dashboard-timeline-title-toggle{flex:0 0 auto;cursor:pointer;color:#64748b}.dashboard-timeline-title-spacer{display:inline-block;width:1.25rem;flex:0 0 1.25rem}.dashboard-timeline-title-action{min-width:0;flex:1 1 auto;overflow:hidden;border:0;background:transparent;padding:0;color:#334155;cursor:pointer;font-size:.875rem;font-weight:600;text-align:start;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-title-action:hover{color:var(--p-primary-600, #2563eb);text-decoration:underline}.phase-gate-view{height:100%;display:flex;align-items:center;justify-content:center;padding:1rem;overflow-x:auto}.phase-steps{display:flex;align-items:center;gap:.75rem;list-style:none;margin:0;padding:0}.phase-step{display:flex;align-items:center;gap:.5rem;padding:.4rem .75rem;border-radius:999px;background:#0000000a;font-size:.8rem;color:#555;white-space:nowrap}.phase-step-number{width:1.5rem;height:1.5rem;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;font-weight:700;background:#0000000f;color:#666}.phase-step.is-done{background:#22c55e1a;color:#16a34a}.phase-step.is-done .phase-step-number{background:#16a34a;color:#fff}.phase-step.is-current{background:#2563eb1a;color:#2563eb;font-weight:600}.phase-step.is-current .phase-step-number{background:#2563eb;color:#fff}.phase-gate-view.phase-gate-compact .phase-step{padding:.2rem .45rem;font-size:.7rem;gap:.25rem}.phase-gate-view.phase-gate-compact .phase-step-number{width:1.1rem;height:1.1rem;font-size:.7rem}.dashboard-performance-gauge{display:flex;height:100%;min-height:0;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:.875rem;overflow:hidden;padding:.75rem 1rem 1rem;cursor:default}.dashboard-performance-gauge.is-clickable{cursor:pointer}.dashboard-performance-gauge__figure{position:relative;width:min(100%,28rem);min-width:12rem;max-width:100%;transform-origin:center bottom}.dashboard-performance-gauge__svg{display:block;width:100%;height:auto;overflow:visible}.dashboard-performance-gauge__center{position:absolute;left:50%;top:72%;display:flex;max-width:90%;transform:translate(-50%,-50%);flex-direction:column;align-items:center;gap:.125rem;text-align:center;pointer-events:none}.dashboard-performance-gauge__value{font-size:2.75rem;font-weight:800;line-height:1;color:var(--dashboard-performance-status-color, #334155)}.dashboard-performance-gauge__label{max-width:18rem;overflow:hidden;color:#475569;font-size:.95rem;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.dashboard-performance-gauge__status{display:inline-flex;max-width:min(80%,18rem);align-items:center;justify-content:center;gap:.375rem;border-radius:999px;padding:.25rem .625rem;background:color-mix(in srgb,var(--dashboard-performance-status-color, #64748b) 10%,transparent);color:var(--dashboard-performance-status-color, #475569);font-size:.8125rem;font-weight:700;line-height:1.2}.dashboard-performance-gauge__status-dot{width:.5rem;height:.5rem;flex:0 0 auto;border-radius:999px;background:currentColor}.dashboard-performance-gauge__status-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"] }]
|
|
27418
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #timelineLegendList>\n <div\n class=\"dashboard-timeline-legend\"\n [attr.data-position]=\"timelineLegendPosition()\"\n >\n @for (label of timelineLabels(); track $index) {\n <span\n class=\"dashboard-timeline-legend-item\"\n [title]=\"label.label || label.name || label.key\"\n >\n <span\n class=\"dashboard-timeline-legend-marker\"\n [class.shape-rect]=\"label.shape === 'rect'\"\n [class.shape-roundRect]=\"label.shape === 'roundRect'\"\n [class.shape-diamond]=\"label.shape === 'diamond'\"\n [class.shape-triangle]=\"label.shape === 'triangle'\"\n [style.background]=\"\n label.shape === 'triangle' ? null : label.color || '#64748b'\n \"\n [style.border-bottom-color]=\"\n label.shape === 'triangle' ? label.color || '#64748b' : null\n \"\n ></span>\n <span class=\"dashboard-timeline-legend-label\">\n {{ label.label || label.name || label.key }}\n </span>\n </span>\n }\n </div>\n</ng-template>\n\n<mt-card-content\n [inGroup]=\"inGroup()\"\n [headerConfig]=\"\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\n \"\n [styleConfig]=\"\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\n \"\n [cardStyleConfig]=\"\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\n \"\n [density]=\"configurationItem()?.clientConfig?.configAsType?.['density']\"\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\n [title]=\"title()\"\n [titleEditable]=\"titleEditable()\"\n (titleChange)=\"onTitleChange.emit($event)\"\n [isNoTopEnd]=\"!showTopEnd()\"\n [isChart]=\"true\"\n (headerClick)=\"onHeaderClick()\"\n>\n <ng-container topEnd>\n @if (showStaticFilters()) {\n <mt-static-filters\n [config]=\"staticFilterConfig()\"\n [dashboardId]=\"dashboardId()\"\n >\n </mt-static-filters>\n }\n @if (showDynamicFilters()) {\n <mt-dynamic-filters\n [fields]=\"dynamicFilterFields()\"\n [dashboardId]=\"dashboardId()\"\n [reportId]=\"reportId()\"\n [showLabels]=\"false\"\n >\n </mt-dynamic-filters>\n }\n @if (showFilter()) {\n <mt-card-filter [config]=\"filterConfig()\" [dashboardId]=\"dashboardId()\">\n </mt-card-filter>\n }\n @if (cardInfoConfig()?.show && cardInfoConfig()?.value) {\n <mt-card-info [cardInfo]=\"cardInfoConfig()\"></mt-card-info>\n }\n </ng-container>\n\n <ng-container body>\n <div\n class=\"chart-container\"\n [class.config-mode]=\"isConfigMode()\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n >\n @if (componentViewMode() === \"splitter\" && hasSplitterData()) {\n <div\n class=\"splitter-view\"\n [class.splitter-vertical]=\"splitterOrientation() === 'vertical'\"\n [style.gap.px]=\"splitterGap()\"\n >\n <div class=\"splitter-side splitter-positive\">\n <div class=\"splitter-count\">\n {{ dataHandled()?.positive?.groupedValue ?? 0 }}\n </div>\n <ul class=\"splitter-labels\">\n @for (\n label of dataHandled()?.positive?.labels || [];\n track $index\n ) {\n <li>{{ label }}</li>\n }\n </ul>\n </div>\n <div class=\"splitter-divider\"></div>\n <div class=\"splitter-side splitter-negative\">\n <div class=\"splitter-count\">\n {{ dataHandled()?.negative?.groupedValue ?? 0 }}\n </div>\n <ul class=\"splitter-labels\">\n @for (\n label of dataHandled()?.negative?.labels || [];\n track $index\n ) {\n <li>{{ label }}</li>\n }\n </ul>\n </div>\n </div>\n } @else if (componentViewMode() === \"timeline\" && hasTimelineData()) {\n <div\n class=\"dashboard-timeline-view\"\n [attr.data-legend-position]=\"timelineLegendPosition()\"\n [style.--timeline-header-bg]=\"timelineHeaderBgColor()\"\n [style.--timeline-header-color]=\"timelineHeaderTextColor()\"\n >\n @if (\n timelineLegendShow() &&\n timelineLabels().length &&\n (timelineLegendPosition() === \"top\" ||\n timelineLegendPosition() === \"left\")\n ) {\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\n }\n\n @defer (on viewport) {\n <mt-timeline\n class=\"dashboard-timeline-renderer\"\n [showHeader]=\"false\"\n [showZoomToFitControl]=\"false\"\n [timelineMode]=\"timelineMode()\"\n (timelineModeChange)=\"timelineMode.set($event)\"\n [ganttData]=\"timelineResources()\"\n [ganttMapping]=\"timelineGanttMapping\"\n [columns]=\"timelineColumns()\"\n [defaultVisibleColumns]=\"2\"\n [columnsPaneMinWidthPx]=\"220\"\n [columnsPaneMaxWidthPx]=\"520\"\n [enableVirtualScroll]=\"true\"\n [virtualScrollThreshold]=\"0\"\n [virtualScrollBodyHeightPx]=\"520\"\n [showGanttDetailsPopup]=\"true\"\n [emptyMessage]=\"t('noChartData')\"\n >\n <ng-template\n mtTimelineColumn=\"title\"\n let-item=\"item\"\n let-resolved=\"resolved\"\n let-canToggle=\"canToggle\"\n let-isCollapsed=\"isCollapsed\"\n let-toggle=\"toggle\"\n >\n <div\n class=\"dashboard-timeline-title-cell\"\n [style.padding-inline-start.px]=\"\n $any(resolved).levelDepth * 16\n \"\n >\n @if (canToggle) {\n <mt-icon\n class=\"dashboard-timeline-title-toggle\"\n [icon]=\"timelineCollapseIcon(isCollapsed)\"\n (click)=\"$event.stopPropagation(); toggle()\"\n ></mt-icon>\n } @else {\n <span class=\"dashboard-timeline-title-spacer\"></span>\n }\n\n <button\n type=\"button\"\n class=\"dashboard-timeline-title-action\"\n [title]=\"$any(resolved).title\"\n (click)=\"onTimelineTitleClick(item, $event)\"\n >\n {{ $any(resolved).title }}\n </button>\n </div>\n </ng-template>\n\n @for (column of timelineEntityColumns(); track column.key) {\n <ng-template [mtTimelineColumn]=\"column.key\" let-value=\"value\">\n <mt-entity-preview\n class=\"dashboard-timeline-column-entity\"\n [data]=\"timelineColumnEntityData(value)\"\n attachmentShape=\"compact\"\n ></mt-entity-preview>\n </ng-template>\n }\n\n <ng-template mtTimelinePopover let-item=\"item\">\n @if (timelinePopoverEntities(item); as entities) {\n @if (entities.length) {\n <div\n class=\"w-[27rem] max-w-[90vw] max-h-[24rem] overflow-auto p-2\"\n >\n <mt-entities-preview\n [entities]=\"entities\"\n [stackOnNarrow]=\"false\"\n />\n </div>\n }\n }\n </ng-template>\n </mt-timeline>\n } @placeholder {\n <div class=\"dashboard-timeline-placeholder\" aria-hidden=\"true\">\n <div></div>\n <div></div>\n <div></div>\n </div>\n }\n\n @if (\n timelineLegendShow() &&\n timelineLabels().length &&\n (timelineLegendPosition() === \"bottom\" ||\n timelineLegendPosition() === \"right\")\n ) {\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\n }\n </div>\n } @else if (\n componentViewMode() === \"phaseGateStepper\" && hasPhaseGateData()\n ) {\n <div\n class=\"phase-gate-view\"\n [class.phase-gate-compact]=\"phaseGateCompact()\"\n >\n <ol class=\"phase-steps\">\n @for (step of phaseGateSteps(); track $index) {\n <li\n class=\"phase-step\"\n [class.is-current]=\"$index === phaseGateCurrentIndex()\"\n [class.is-done]=\"$index < phaseGateCurrentIndex()\"\n >\n <span class=\"phase-step-number\">{{ $index + 1 }}</span>\n @if (phaseGateShowLabels()) {\n <span class=\"phase-step-name\">{{\n step?.name || step?.title || step?.label || t(\"phase\")\n }}</span>\n }\n </li>\n }\n </ol>\n </div>\n } @else if (\n componentViewMode() === \"performanceGauge\" &&\n dataHandled() &&\n !dataHandled()?.noData\n ) {\n @let gauge = performanceGauge();\n <div\n class=\"dashboard-performance-gauge\"\n [class.is-clickable]=\"hasActions()\"\n [style.--dashboard-performance-status-color]=\"gauge.status.color\"\n (click)=\"onPerformanceGaugeClick($event)\"\n >\n <div\n class=\"dashboard-performance-gauge__figure\"\n [style.width.%]=\"gauge.scalePercent\"\n >\n <svg\n class=\"dashboard-performance-gauge__svg\"\n viewBox=\"0 0 100 72\"\n role=\"img\"\n [attr.aria-label]=\"gauge.label + ' ' + gauge.display\"\n >\n <path\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\n fill=\"none\"\n stroke=\"#e5e7eb\"\n stroke-width=\"6\"\n stroke-linecap=\"round\"\n pathLength=\"100\"\n ></path>\n\n @for (segment of performanceGaugeSegments(); track segment.key) {\n <path\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\n fill=\"none\"\n [attr.stroke]=\"segment.color\"\n stroke-width=\"6\"\n stroke-linecap=\"round\"\n pathLength=\"100\"\n [attr.stroke-dasharray]=\"segment.dashArray\"\n [attr.stroke-dashoffset]=\"segment.dashOffset\"\n [style.opacity]=\"segment.opacity\"\n ></path>\n <text\n [attr.x]=\"segment.labelX\"\n [attr.y]=\"segment.labelY\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n font-size=\"5.5\"\n font-weight=\"700\"\n fill=\"#334155\"\n >\n {{ segment.label }}\n </text>\n }\n\n <circle\n [attr.cx]=\"gauge.marker.x\"\n [attr.cy]=\"gauge.marker.y\"\n r=\"4.5\"\n fill=\"#fff\"\n [attr.stroke]=\"gauge.status.color\"\n stroke-width=\"3\"\n ></circle>\n </svg>\n\n <div class=\"dashboard-performance-gauge__center\">\n <div class=\"dashboard-performance-gauge__value\">\n {{ gauge.display }}\n </div>\n <div class=\"dashboard-performance-gauge__label\">\n {{ gauge.label }}\n </div>\n </div>\n </div>\n\n <div\n class=\"dashboard-performance-gauge__status\"\n [title]=\"performanceGaugeStatusName()\"\n >\n <span class=\"dashboard-performance-gauge__status-dot\"></span>\n <span class=\"dashboard-performance-gauge__status-text\">\n {{ performanceGaugeStatusName() }}\n </span>\n </div>\n </div>\n } @else if (dataHandled() && !dataHandled()?.noData) {\n <mt-echart\n [dashboardId]=\"dashboardId()\"\n [chartConfig]=\"dataHandled()\"\n [configurationItem]=\"configurationItem()\"\n [inGroup]=\"inGroup()\"\n (chartClick)=\"onChartClick($event)\"\n >\n </mt-echart>\n } @else if (dataHandled()?.noData) {\n <div class=\"no-data-container\">\n <i class=\"pi pi-info-circle\"></i>\n <span>{{ t(\"noChartData\") }}</span>\n </div>\n } @else {\n <div class=\"loading-container\">\n <div class=\"loading-spinner\"></div>\n </div>\n }\n </div>\n </ng-container>\n</mt-card-content>\n", styles: [":host{display:block;height:100%}.chart-container{height:100%;min-height:0}.chart-container.config-mode{min-height:400px}.no-data-container,.needs-config-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:0;color:#999;gap:.5rem;padding:1rem;text-align:center}.no-data-container i,.needs-config-container i{font-size:2rem}.needs-config-container .title{font-weight:600;color:#555;font-size:.95rem}.needs-config-container .hint{font-size:.8rem;max-width:28rem;line-height:1.4}.needs-config-container .configure-btn{margin-top:.5rem;display:inline-flex;align-items:center;gap:.4rem;padding:.4rem .9rem;font-size:.85rem;font-weight:600;color:#fff;background:var(--p-primary-500, #2563eb);border:0;border-radius:.375rem;cursor:pointer;box-shadow:0 1px 2px #0000000d}.needs-config-container .configure-btn:hover{background:var(--p-primary-600, #1d4ed8)}.loading-container{display:flex;align-items:center;justify-content:center;height:100%;min-height:0}.loading-spinner{width:2rem;height:2rem;border:3px solid #f0f0f0;border-top-color:#4caf50;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.splitter-view{display:flex;align-items:stretch;height:100%;gap:.5rem}.splitter-view.splitter-vertical{flex-direction:column}.splitter-view.splitter-vertical .splitter-divider{width:auto;height:1px}.splitter-side{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:1rem;border-radius:.5rem}.splitter-positive{background:#22c55e14}.splitter-negative{background:#ef444414}.splitter-count{font-size:2rem;font-weight:700;margin-bottom:.5rem}.splitter-positive .splitter-count{color:#16a34a}.splitter-negative .splitter-count{color:#dc2626}.splitter-labels{list-style:none;padding:0;margin:0;text-align:center;font-size:.8rem;color:#555}.splitter-labels li{padding:.15rem 0}.splitter-divider{width:1px;background:#00000014}.dashboard-timeline-view{display:flex;flex-direction:column;gap:.625rem;height:100%;min-height:0;overflow:auto}.dashboard-timeline-view[data-legend-position=left],.dashboard-timeline-view[data-legend-position=right]{flex-direction:row;overflow:hidden}.dashboard-timeline-legend{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.35rem .75rem;flex-shrink:0;min-width:0;max-width:100%}.dashboard-timeline-legend[data-position=left],.dashboard-timeline-legend[data-position=right]{max-width:12rem;max-height:100%;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;overflow:auto}.dashboard-timeline-legend-item{display:inline-flex;align-items:center;gap:.25rem;max-width:12rem;padding:0;border:0;border-radius:0;font-size:.75rem;color:#475569;font-weight:500;line-height:1.2;background:transparent}.dashboard-timeline-legend-marker{display:inline-block;width:.625rem;height:.625rem;flex:0 0 auto;border-radius:999px}.dashboard-timeline-legend-marker.shape-rect{border-radius:0}.dashboard-timeline-legend-marker.shape-roundRect{border-radius:.2rem}.dashboard-timeline-legend-marker.shape-diamond{border-radius:.0625rem;transform:rotate(45deg)}.dashboard-timeline-legend-marker.shape-triangle{width:0;height:0;background:transparent!important;border-radius:0;border-left:.34rem solid transparent;border-right:.34rem solid transparent;border-bottom-width:.6rem;border-bottom-style:solid}.dashboard-timeline-legend-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-renderer{display:block;min-height:0;flex:1}.dashboard-timeline-placeholder{display:flex;min-height:260px;flex:1;flex-direction:column;gap:.75rem;padding:1rem}.dashboard-timeline-placeholder div{height:3rem;border-radius:.5rem;background:var(--p-surface-100);animation:dashboard-builder-pulse 1.2s ease-in-out infinite}@keyframes dashboard-builder-pulse{0%,to{opacity:.55}50%{opacity:1}}:host ::ng-deep .dashboard-timeline-renderer>div{margin-top:0}:host ::ng-deep .dashboard-timeline-view mt-timeline-gantt-header .bg-surface-50{background-color:var(--timeline-header-bg, var(--p-surface-50));color:var(--timeline-header-color, inherit)}.dashboard-timeline-column-entity{display:block;min-width:0}.dashboard-timeline-title-cell{display:flex;min-width:0;align-items:center;gap:.5rem;width:100%}.dashboard-timeline-title-toggle{flex:0 0 auto;cursor:pointer;color:#64748b}.dashboard-timeline-title-spacer{display:inline-block;width:1.25rem;flex:0 0 1.25rem}.dashboard-timeline-title-action{min-width:0;flex:1 1 auto;overflow:hidden;border:0;background:transparent;padding:0;color:#334155;cursor:pointer;font-size:.875rem;font-weight:600;text-align:start;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-title-action:hover{color:var(--p-primary-600, #2563eb);text-decoration:underline}.phase-gate-view{height:100%;display:flex;align-items:center;justify-content:center;padding:1rem;overflow-x:auto}.phase-steps{display:flex;align-items:center;gap:.75rem;list-style:none;margin:0;padding:0}.phase-step{display:flex;align-items:center;gap:.5rem;padding:.4rem .75rem;border-radius:999px;background:#0000000a;font-size:.8rem;color:#555;white-space:nowrap}.phase-step-number{width:1.5rem;height:1.5rem;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;font-weight:700;background:#0000000f;color:#666}.phase-step.is-done{background:#22c55e1a;color:#16a34a}.phase-step.is-done .phase-step-number{background:#16a34a;color:#fff}.phase-step.is-current{background:#2563eb1a;color:#2563eb;font-weight:600}.phase-step.is-current .phase-step-number{background:#2563eb;color:#fff}.phase-gate-view.phase-gate-compact .phase-step{padding:.2rem .45rem;font-size:.7rem;gap:.25rem}.phase-gate-view.phase-gate-compact .phase-step-number{width:1.1rem;height:1.1rem;font-size:.7rem}.dashboard-performance-gauge{display:flex;height:100%;min-height:0;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:.875rem;overflow:hidden;padding:.75rem 1rem 1rem;cursor:default}.dashboard-performance-gauge.is-clickable{cursor:pointer}.dashboard-performance-gauge__figure{position:relative;width:min(100%,28rem);min-width:12rem;max-width:100%;transform-origin:center bottom}.dashboard-performance-gauge__svg{display:block;width:100%;height:auto;overflow:visible}.dashboard-performance-gauge__center{position:absolute;left:50%;top:72%;display:flex;max-width:90%;transform:translate(-50%,-50%);flex-direction:column;align-items:center;gap:.125rem;text-align:center;pointer-events:none}.dashboard-performance-gauge__value{font-size:2.75rem;font-weight:800;line-height:1;color:var(--dashboard-performance-status-color, #334155)}.dashboard-performance-gauge__label{max-width:18rem;overflow:hidden;color:#475569;font-size:.95rem;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.dashboard-performance-gauge__status{display:inline-flex;max-width:min(80%,18rem);align-items:center;justify-content:center;gap:.375rem;border-radius:999px;padding:.25rem .625rem;background:color-mix(in srgb,var(--dashboard-performance-status-color, #64748b) 10%,transparent);color:var(--dashboard-performance-status-color, #475569);font-size:.8125rem;font-weight:700;line-height:1.2}.dashboard-performance-gauge__status-dot{width:.5rem;height:.5rem;flex:0 0 auto;border-radius:999px;background:currentColor}.dashboard-performance-gauge__status-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"] }]
|
|
27086
27419
|
}], ctorParameters: null, propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }], reportId: [{ type: i0.Input, args: [{ isSignal: true, alias: "reportId", required: false }] }], inGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "inGroup", required: false }] }], isConfigMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "isConfigMode", required: false }] }], titleEditable: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleEditable", required: false }] }], onAction: [{ type: i0.Output, args: ["onAction"] }], onConfigure: [{ type: i0.Output, args: ["onConfigure"] }], onTitleChange: [{ type: i0.Output, args: ["onTitleChange"] }] } }) });
|
|
27087
27420
|
|
|
27088
27421
|
/**
|
|
@@ -27109,8 +27442,23 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.8", ng
|
|
|
27109
27442
|
* - api → API fetched value
|
|
27110
27443
|
* - integrated → integrated value display
|
|
27111
27444
|
*/
|
|
27445
|
+
function resolveEntityUserPhoto(value) {
|
|
27446
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
27447
|
+
return '';
|
|
27448
|
+
const user = value;
|
|
27449
|
+
for (const key of ['photoUrl', 'image', 'avatar']) {
|
|
27450
|
+
const candidate = user[key];
|
|
27451
|
+
if (typeof candidate === 'string' && candidate.trim()) {
|
|
27452
|
+
return candidate.trim();
|
|
27453
|
+
}
|
|
27454
|
+
}
|
|
27455
|
+
return '';
|
|
27456
|
+
}
|
|
27112
27457
|
class EntityInfoComponent {
|
|
27113
27458
|
transloco = inject(TranslocoService);
|
|
27459
|
+
httpContext = new HttpContext().set(REQUEST_CONTEXT, {
|
|
27460
|
+
useBaseUrl: true,
|
|
27461
|
+
});
|
|
27114
27462
|
/** Entity data to display */
|
|
27115
27463
|
data = input(null, ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
27116
27464
|
/** Display type: 'entity' shows label, 'inTable' shows value only */
|
|
@@ -27295,6 +27643,7 @@ class EntityInfoComponent {
|
|
|
27295
27643
|
return '';
|
|
27296
27644
|
return user.displayName || user.name || user.fullName || '';
|
|
27297
27645
|
}, ...(ngDevMode ? [{ debugName: "userName" }] : /* istanbul ignore next */ []));
|
|
27646
|
+
userPhoto = computed(() => resolveEntityUserPhoto(this.userData()), ...(ngDevMode ? [{ debugName: "userPhoto" }] : /* istanbul ignore next */ []));
|
|
27298
27647
|
userInitials = computed(() => {
|
|
27299
27648
|
const name = this.userName();
|
|
27300
27649
|
return this.getInitials(name);
|
|
@@ -27313,6 +27662,9 @@ class EntityInfoComponent {
|
|
|
27313
27662
|
return [];
|
|
27314
27663
|
return Array.isArray(value) ? value : [];
|
|
27315
27664
|
}, ...(ngDevMode ? [{ debugName: "multiUserValues" }] : /* istanbul ignore next */ []));
|
|
27665
|
+
getUserPhoto(user) {
|
|
27666
|
+
return resolveEntityUserPhoto(user);
|
|
27667
|
+
}
|
|
27316
27668
|
// === Dynamic list values ===
|
|
27317
27669
|
dynamicListValues = computed(() => {
|
|
27318
27670
|
const value = this.data()?.value;
|
|
@@ -27353,11 +27705,11 @@ class EntityInfoComponent {
|
|
|
27353
27705
|
});
|
|
27354
27706
|
}
|
|
27355
27707
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
27356
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityInfoComponent, isStandalone: true, selector: "mt-entity-info", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, displayType: { classPropertyName: "displayType", publicName: "displayType", isSignal: true, isRequired: false, transformFunction: null }, extraInfoData: { classPropertyName: "extraInfoData", publicName: "extraInfoData", isSignal: true, isRequired: false, transformFunction: null }, limitWords: { classPropertyName: "limitWords", publicName: "limitWords", isSignal: true, isRequired: false, transformFunction: null }, customClass: { classPropertyName: "customClass", publicName: "customClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\r\n class=\"entity-info-wrapper w-full\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n @switch (viewTypeLower()) {\r\n <!-- Text Types -->\r\n @case (\"text\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"float\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"longtext\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"title\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"phasegate\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Number -->\r\n @case (\"number\") {\r\n <ng-container *ngTemplateOutlet=\"numberTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Date Types -->\r\n @case (\"date\") {\r\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\r\n }\r\n @case (\"datetime\") {\r\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Currency -->\r\n @case (\"currency\") {\r\n <ng-container *ngTemplateOutlet=\"currencyTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Time -->\r\n @case (\"time\") {\r\n <ng-container *ngTemplateOutlet=\"timeTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Lookup -->\r\n @case (\"lookup\") {\r\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Lookup Matrix (same value shape as lookup: key/display/color) -->\r\n @case (\"lookupmatrix\") {\r\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Checkbox -->\r\n @case (\"checkbox\") {\r\n <ng-container *ngTemplateOutlet=\"checkboxTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Status -->\r\n @case (\"status\") {\r\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\r\n }\r\n @case (\"request_status\") {\r\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Percentage -->\r\n @case (\"percentage\") {\r\n <ng-container *ngTemplateOutlet=\"percentageTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Slider -->\r\n @case (\"slider\") {\r\n <ng-container *ngTemplateOutlet=\"sliderTemplate\"></ng-container>\r\n }\r\n\r\n <!-- User -->\r\n @case (\"user\") {\r\n <ng-container *ngTemplateOutlet=\"userTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Multi-select lookup -->\r\n @case (\"lookupmultiselect\") {\r\n <ng-container\r\n *ngTemplateOutlet=\"lookupMultiselectTemplate\"\r\n ></ng-container>\r\n }\r\n\r\n <!-- Multi user -->\r\n @case (\"multiuser\") {\r\n <ng-container *ngTemplateOutlet=\"multiUserTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Dynamic List -->\r\n @case (\"dynamiclist\") {\r\n <ng-container *ngTemplateOutlet=\"dynamicListTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Location -->\r\n @case (\"location\") {\r\n <ng-container *ngTemplateOutlet=\"locationTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Default: treat as text -->\r\n @default {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n }\r\n</div>\r\n\r\n<!-- Text Template -->\r\n<ng-template #textTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div\r\n class=\"font-semibold\"\r\n [class.text-ellipsis]=\"limitWords()\"\r\n [class.overflow-hidden]=\"limitWords()\"\r\n [class.whitespace-nowrap]=\"limitWords()\"\r\n [style.max-width]=\"limitWords() ? '200px' : 'auto'\"\r\n [title]=\"textValue()\"\r\n >\r\n {{ textValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Number Template -->\r\n<ng-template #numberTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ numericValue() !== null ? (numericValue() | number) : \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Date Template -->\r\n<ng-template #dateTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ dateDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Currency Template -->\r\n<ng-template #currencyTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ currencyDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Time Template -->\r\n<ng-template #timeTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ timeDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Lookup Template -->\r\n<ng-template #lookupTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (lookupName()) {\r\n <span class=\"flex items-center gap-1\" [style.color]=\"lookupColor()\">\r\n @if (displayType() === \"entity\" && lookupColor()) {\r\n <span\r\n class=\"w-2 h-2 rounded-full inline-block\"\r\n [style.backgroundColor]=\"lookupColor()\"\r\n ></span>\r\n }\r\n {{ lookupName() }}\r\n </span>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Checkbox Template -->\r\n<ng-template #checkboxTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center\">\r\n <i\r\n [class]=\"\r\n checkboxValue()\r\n ? 'pi pi-check-square text-primary'\r\n : 'pi pi-stop text-muted-color'\r\n \"\r\n ></i>\r\n <span class=\"ml-2\">{{ checkboxLabel() }}</span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Status Template -->\r\n<ng-template #statusTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (statusColor()) {\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\r\n [style.backgroundColor]=\"statusColor()\"\r\n ></span>\r\n }\r\n <span [style.color]=\"statusColor()\">\r\n {{ statusName() || \"__\" }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Percentage Template -->\r\n<ng-template #percentageTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (\r\n displayType() !== \"inTable\" ||\r\n extraInfoData()?.showPercentageAsProgressBar\r\n ) {\r\n <div\r\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-24\"\r\n >\r\n <div\r\n class=\"h-full rounded-full transition-all\"\r\n [style.width.%]=\"percentageValue() || 0\"\r\n [style.backgroundColor]=\"percentageColor() || 'var(--primary-color)'\"\r\n ></div>\r\n </div>\r\n }\r\n @if (\r\n extraInfoData()?.showPercentageStatus &&\r\n !extraInfoData()?.showPercentageAsProgressBar\r\n ) {\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full\"\r\n [style.backgroundColor]=\"percentageColor() || '#000'\"\r\n ></span>\r\n }\r\n <span [style.color]=\"percentageColor()\">\r\n {{\r\n percentageValue() !== null\r\n ? (percentageValue() | number: \"1.0-0\") + \"%\"\r\n : \"__\"\r\n }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Slider Template -->\r\n<ng-template #sliderTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n <div\r\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-32\"\r\n >\r\n <div\r\n class=\"h-full bg-primary rounded-full transition-all\"\r\n [style.width.%]=\"sliderValue() || 0\"\r\n ></div>\r\n </div>\r\n <span class=\"text-sm\">{{ sliderValue() || 0 }}%</span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- User Template -->\r\n<ng-template #userTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (userData()) {\r\n <div class=\"flex items-center gap-2\">\r\n @if (userData()?.avatar || userData()?.image) {\r\n <img\r\n [src]=\"userData()?.avatar || userData()?.image\"\r\n alt=\"User avatar\"\r\n class=\"w-8 h-8 rounded-full object-cover\"\r\n />\r\n } @else {\r\n <div\r\n class=\"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center text-primary font-semibold text-sm\"\r\n >\r\n {{ userInitials() }}\r\n </div>\r\n }\r\n <span class=\"font-medium\">{{ userName() }}</span>\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Lookup Multiselect Template -->\r\n<ng-template #lookupMultiselectTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (multiselectValues()?.length) {\r\n <div class=\"flex flex-wrap gap-1\">\r\n @for (item of multiselectValues(); track item.key || $index) {\r\n <span\r\n class=\"px-2 py-0.5 rounded-full text-xs font-medium\"\r\n [style.backgroundColor]=\"(item.details?.color || '#6b7280') + '20'\"\r\n [style.color]=\"item.details?.color || '#6b7280'\"\r\n >\r\n {{ item.name || item.display || item }}\r\n </span>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Multi User Template -->\r\n<ng-template #multiUserTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (multiUserValues()?.length) {\r\n <div class=\"flex items-center -space-x-2\">\r\n @for (user of multiUserValues().slice(0, 5); track user.id || $index) {\r\n @if (user.avatar || user.image) {\r\n <img\r\n [src]=\"user.avatar || user.image\"\r\n [alt]=\"user.name || user.displayName\"\r\n class=\"w-7 h-7 rounded-full border-2 border-white object-cover\"\r\n />\r\n } @else {\r\n <div\r\n class=\"w-7 h-7 rounded-full border-2 border-white bg-primary/20 flex items-center justify-center text-primary font-semibold text-xs\"\r\n >\r\n {{ getInitials(user.name || user.displayName) }}\r\n </div>\r\n }\r\n }\r\n @if (multiUserValues().length > 5) {\r\n <div\r\n class=\"w-7 h-7 rounded-full border-2 border-white bg-surface-300 flex items-center justify-center text-xs font-medium\"\r\n >\r\n +{{ multiUserValues().length - 5 }}\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Dynamic List Template -->\r\n<ng-template #dynamicListTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (dynamicListValues()?.length) {\r\n <div class=\"flex flex-col gap-1\">\r\n @for (item of dynamicListValues(); track $index) {\r\n <div class=\"text-sm\">\r\n {{ item?.label || item?.name || item }}\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Location Template -->\r\n<ng-template #locationTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ locationDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n", styles: [":host{display:block}.text-ellipsis{text-overflow:ellipsis}\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: "pipe", type: i1$1.DecimalPipe, name: "number" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
27708
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityInfoComponent, isStandalone: true, selector: "mt-entity-info", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, displayType: { classPropertyName: "displayType", publicName: "displayType", isSignal: true, isRequired: false, transformFunction: null }, extraInfoData: { classPropertyName: "extraInfoData", publicName: "extraInfoData", isSignal: true, isRequired: false, transformFunction: null }, limitWords: { classPropertyName: "limitWords", publicName: "limitWords", isSignal: true, isRequired: false, transformFunction: null }, customClass: { classPropertyName: "customClass", publicName: "customClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"entity-info-wrapper w-full\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n>\n @switch (viewTypeLower()) {\n <!-- Text Types -->\n @case (\"text\") {\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\n }\n @case (\"float\") {\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\n }\n @case (\"longtext\") {\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\n }\n @case (\"title\") {\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\n }\n @case (\"phasegate\") {\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\n }\n\n <!-- Number -->\n @case (\"number\") {\n <ng-container *ngTemplateOutlet=\"numberTemplate\"></ng-container>\n }\n\n <!-- Date Types -->\n @case (\"date\") {\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\n }\n @case (\"datetime\") {\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\n }\n\n <!-- Currency -->\n @case (\"currency\") {\n <ng-container *ngTemplateOutlet=\"currencyTemplate\"></ng-container>\n }\n\n <!-- Time -->\n @case (\"time\") {\n <ng-container *ngTemplateOutlet=\"timeTemplate\"></ng-container>\n }\n\n <!-- Lookup -->\n @case (\"lookup\") {\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\n }\n\n <!-- Lookup Matrix (same value shape as lookup: key/display/color) -->\n @case (\"lookupmatrix\") {\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\n }\n\n <!-- Checkbox -->\n @case (\"checkbox\") {\n <ng-container *ngTemplateOutlet=\"checkboxTemplate\"></ng-container>\n }\n\n <!-- Status -->\n @case (\"status\") {\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\n }\n @case (\"request_status\") {\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\n }\n\n <!-- Percentage -->\n @case (\"percentage\") {\n <ng-container *ngTemplateOutlet=\"percentageTemplate\"></ng-container>\n }\n\n <!-- Slider -->\n @case (\"slider\") {\n <ng-container *ngTemplateOutlet=\"sliderTemplate\"></ng-container>\n }\n\n <!-- User -->\n @case (\"user\") {\n <ng-container *ngTemplateOutlet=\"userTemplate\"></ng-container>\n }\n\n <!-- Multi-select lookup -->\n @case (\"lookupmultiselect\") {\n <ng-container\n *ngTemplateOutlet=\"lookupMultiselectTemplate\"\n ></ng-container>\n }\n\n <!-- Multi user -->\n @case (\"multiuser\") {\n <ng-container *ngTemplateOutlet=\"multiUserTemplate\"></ng-container>\n }\n\n <!-- Dynamic List -->\n @case (\"dynamiclist\") {\n <ng-container *ngTemplateOutlet=\"dynamicListTemplate\"></ng-container>\n }\n\n <!-- Location -->\n @case (\"location\") {\n <ng-container *ngTemplateOutlet=\"locationTemplate\"></ng-container>\n }\n\n <!-- Default: treat as text -->\n @default {\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\n }\n }\n</div>\n\n<!-- Text Template -->\n<ng-template #textTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n <div\n class=\"font-semibold\"\n [class.text-ellipsis]=\"limitWords()\"\n [class.overflow-hidden]=\"limitWords()\"\n [class.whitespace-nowrap]=\"limitWords()\"\n [style.max-width]=\"limitWords() ? '200px' : 'auto'\"\n [title]=\"textValue()\"\n >\n {{ textValue() || \"__\" }}\n </div>\n</ng-template>\n\n<!-- Number Template -->\n<ng-template #numberTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n <div class=\"font-semibold\">\n {{ numericValue() !== null ? (numericValue() | number) : \"__\" }}\n </div>\n</ng-template>\n\n<!-- Date Template -->\n<ng-template #dateTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n <div class=\"font-semibold\">\n {{ dateDisplayValue() || \"__\" }}\n </div>\n</ng-template>\n\n<!-- Currency Template -->\n<ng-template #currencyTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n <div class=\"font-semibold\">\n {{ currencyDisplayValue() || \"__\" }}\n </div>\n</ng-template>\n\n<!-- Time Template -->\n<ng-template #timeTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n <div class=\"font-semibold\">\n {{ timeDisplayValue() || \"__\" }}\n </div>\n</ng-template>\n\n<!-- Lookup Template -->\n<ng-template #lookupTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n @if (lookupName()) {\n <span class=\"flex items-center gap-1\" [style.color]=\"lookupColor()\">\n @if (displayType() === \"entity\" && lookupColor()) {\n <span\n class=\"w-2 h-2 rounded-full inline-block\"\n [style.backgroundColor]=\"lookupColor()\"\n ></span>\n }\n {{ lookupName() }}\n </span>\n } @else {\n <span class=\"font-semibold\">__</span>\n }\n</ng-template>\n\n<!-- Checkbox Template -->\n<ng-template #checkboxTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n <div class=\"flex items-center\">\n <i\n [class]=\"\n checkboxValue()\n ? 'pi pi-check-square text-primary'\n : 'pi pi-stop text-muted-color'\n \"\n ></i>\n <span class=\"ml-2\">{{ checkboxLabel() }}</span>\n </div>\n</ng-template>\n\n<!-- Status Template -->\n<ng-template #statusTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n <div class=\"flex items-center gap-2\">\n @if (statusColor()) {\n <span\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\n [style.backgroundColor]=\"statusColor()\"\n ></span>\n }\n <span [style.color]=\"statusColor()\">\n {{ statusName() || \"__\" }}\n </span>\n </div>\n</ng-template>\n\n<!-- Percentage Template -->\n<ng-template #percentageTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n <div class=\"flex items-center gap-2\">\n @if (\n displayType() !== \"inTable\" ||\n extraInfoData()?.showPercentageAsProgressBar\n ) {\n <div\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-24\"\n >\n <div\n class=\"h-full rounded-full transition-all\"\n [style.width.%]=\"percentageValue() || 0\"\n [style.backgroundColor]=\"percentageColor() || 'var(--primary-color)'\"\n ></div>\n </div>\n }\n @if (\n extraInfoData()?.showPercentageStatus &&\n !extraInfoData()?.showPercentageAsProgressBar\n ) {\n <span\n class=\"w-2.5 h-2.5 rounded-full\"\n [style.backgroundColor]=\"percentageColor() || '#000'\"\n ></span>\n }\n <span [style.color]=\"percentageColor()\">\n {{\n percentageValue() !== null\n ? (percentageValue() | number: \"1.0-0\") + \"%\"\n : \"__\"\n }}\n </span>\n </div>\n</ng-template>\n\n<!-- Slider Template -->\n<ng-template #sliderTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n <div class=\"flex items-center gap-2\">\n <div\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-32\"\n >\n <div\n class=\"h-full bg-primary rounded-full transition-all\"\n [style.width.%]=\"sliderValue() || 0\"\n ></div>\n </div>\n <span class=\"text-sm\">{{ sliderValue() || 0 }}%</span>\n </div>\n</ng-template>\n\n<!-- User Template -->\n<ng-template #userTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n @if (userData()) {\n <div class=\"flex items-center gap-2\">\n @if (userPhoto()) {\n <img\n [src]=\"userPhoto() | secureImage: true : httpContext : 'avatar/'\"\n alt=\"User avatar\"\n class=\"w-8 h-8 rounded-full object-cover\"\n />\n } @else {\n <div\n class=\"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center text-primary font-semibold text-sm\"\n >\n {{ userInitials() }}\n </div>\n }\n <span class=\"font-medium\">{{ userName() }}</span>\n </div>\n } @else {\n <span class=\"font-semibold\">__</span>\n }\n</ng-template>\n\n<!-- Lookup Multiselect Template -->\n<ng-template #lookupMultiselectTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n @if (multiselectValues()?.length) {\n <div class=\"flex flex-wrap gap-1\">\n @for (item of multiselectValues(); track item.key || $index) {\n <span\n class=\"px-2 py-0.5 rounded-full text-xs font-medium\"\n [style.backgroundColor]=\"(item.details?.color || '#6b7280') + '20'\"\n [style.color]=\"item.details?.color || '#6b7280'\"\n >\n {{ item.name || item.display || item }}\n </span>\n }\n </div>\n } @else {\n <span class=\"font-semibold\">__</span>\n }\n</ng-template>\n\n<!-- Multi User Template -->\n<ng-template #multiUserTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n @if (multiUserValues()?.length) {\n <div class=\"flex items-center -space-x-2\">\n @for (user of multiUserValues().slice(0, 5); track user.id || $index) {\n @if (getUserPhoto(user); as userPhoto) {\n <img\n [src]=\"userPhoto | secureImage: true : httpContext : 'avatar/'\"\n [alt]=\"user.name || user.displayName\"\n class=\"w-7 h-7 rounded-full border-2 border-white object-cover\"\n />\n } @else {\n <div\n class=\"w-7 h-7 rounded-full border-2 border-white bg-primary/20 flex items-center justify-center text-primary font-semibold text-xs\"\n >\n {{ getInitials(user.name || user.displayName) }}\n </div>\n }\n }\n @if (multiUserValues().length > 5) {\n <div\n class=\"w-7 h-7 rounded-full border-2 border-white bg-surface-300 flex items-center justify-center text-xs font-medium\"\n >\n +{{ multiUserValues().length - 5 }}\n </div>\n }\n </div>\n } @else {\n <span class=\"font-semibold\">__</span>\n }\n</ng-template>\n\n<!-- Dynamic List Template -->\n<ng-template #dynamicListTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n @if (dynamicListValues()?.length) {\n <div class=\"flex flex-col gap-1\">\n @for (item of dynamicListValues(); track $index) {\n <div class=\"text-sm\">\n {{ item?.label || item?.name || item }}\n </div>\n }\n </div>\n } @else {\n <span class=\"font-semibold\">__</span>\n }\n</ng-template>\n\n<!-- Location Template -->\n<ng-template #locationTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n <div class=\"font-semibold\">\n {{ locationDisplayValue() || \"__\" }}\n </div>\n</ng-template>\n", styles: [":host{display:block}.text-ellipsis{text-overflow:ellipsis}\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: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "pipe", type: SecureImagePipe, name: "secureImage" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
27357
27709
|
}
|
|
27358
27710
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityInfoComponent, decorators: [{
|
|
27359
27711
|
type: Component,
|
|
27360
|
-
args: [{ selector: 'mt-entity-info', standalone: true, imports: [CommonModule, TranslocoDirective, DecimalPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"entity-info-wrapper w-full\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n @switch (viewTypeLower()) {\r\n <!-- Text Types -->\r\n @case (\"text\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"float\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"longtext\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"title\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"phasegate\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Number -->\r\n @case (\"number\") {\r\n <ng-container *ngTemplateOutlet=\"numberTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Date Types -->\r\n @case (\"date\") {\r\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\r\n }\r\n @case (\"datetime\") {\r\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Currency -->\r\n @case (\"currency\") {\r\n <ng-container *ngTemplateOutlet=\"currencyTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Time -->\r\n @case (\"time\") {\r\n <ng-container *ngTemplateOutlet=\"timeTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Lookup -->\r\n @case (\"lookup\") {\r\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Lookup Matrix (same value shape as lookup: key/display/color) -->\r\n @case (\"lookupmatrix\") {\r\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Checkbox -->\r\n @case (\"checkbox\") {\r\n <ng-container *ngTemplateOutlet=\"checkboxTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Status -->\r\n @case (\"status\") {\r\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\r\n }\r\n @case (\"request_status\") {\r\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Percentage -->\r\n @case (\"percentage\") {\r\n <ng-container *ngTemplateOutlet=\"percentageTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Slider -->\r\n @case (\"slider\") {\r\n <ng-container *ngTemplateOutlet=\"sliderTemplate\"></ng-container>\r\n }\r\n\r\n <!-- User -->\r\n @case (\"user\") {\r\n <ng-container *ngTemplateOutlet=\"userTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Multi-select lookup -->\r\n @case (\"lookupmultiselect\") {\r\n <ng-container\r\n *ngTemplateOutlet=\"lookupMultiselectTemplate\"\r\n ></ng-container>\r\n }\r\n\r\n <!-- Multi user -->\r\n @case (\"multiuser\") {\r\n <ng-container *ngTemplateOutlet=\"multiUserTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Dynamic List -->\r\n @case (\"dynamiclist\") {\r\n <ng-container *ngTemplateOutlet=\"dynamicListTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Location -->\r\n @case (\"location\") {\r\n <ng-container *ngTemplateOutlet=\"locationTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Default: treat as text -->\r\n @default {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n }\r\n</div>\r\n\r\n<!-- Text Template -->\r\n<ng-template #textTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div\r\n class=\"font-semibold\"\r\n [class.text-ellipsis]=\"limitWords()\"\r\n [class.overflow-hidden]=\"limitWords()\"\r\n [class.whitespace-nowrap]=\"limitWords()\"\r\n [style.max-width]=\"limitWords() ? '200px' : 'auto'\"\r\n [title]=\"textValue()\"\r\n >\r\n {{ textValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Number Template -->\r\n<ng-template #numberTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ numericValue() !== null ? (numericValue() | number) : \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Date Template -->\r\n<ng-template #dateTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ dateDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Currency Template -->\r\n<ng-template #currencyTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ currencyDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Time Template -->\r\n<ng-template #timeTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ timeDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Lookup Template -->\r\n<ng-template #lookupTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (lookupName()) {\r\n <span class=\"flex items-center gap-1\" [style.color]=\"lookupColor()\">\r\n @if (displayType() === \"entity\" && lookupColor()) {\r\n <span\r\n class=\"w-2 h-2 rounded-full inline-block\"\r\n [style.backgroundColor]=\"lookupColor()\"\r\n ></span>\r\n }\r\n {{ lookupName() }}\r\n </span>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Checkbox Template -->\r\n<ng-template #checkboxTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center\">\r\n <i\r\n [class]=\"\r\n checkboxValue()\r\n ? 'pi pi-check-square text-primary'\r\n : 'pi pi-stop text-muted-color'\r\n \"\r\n ></i>\r\n <span class=\"ml-2\">{{ checkboxLabel() }}</span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Status Template -->\r\n<ng-template #statusTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (statusColor()) {\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\r\n [style.backgroundColor]=\"statusColor()\"\r\n ></span>\r\n }\r\n <span [style.color]=\"statusColor()\">\r\n {{ statusName() || \"__\" }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Percentage Template -->\r\n<ng-template #percentageTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (\r\n displayType() !== \"inTable\" ||\r\n extraInfoData()?.showPercentageAsProgressBar\r\n ) {\r\n <div\r\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-24\"\r\n >\r\n <div\r\n class=\"h-full rounded-full transition-all\"\r\n [style.width.%]=\"percentageValue() || 0\"\r\n [style.backgroundColor]=\"percentageColor() || 'var(--primary-color)'\"\r\n ></div>\r\n </div>\r\n }\r\n @if (\r\n extraInfoData()?.showPercentageStatus &&\r\n !extraInfoData()?.showPercentageAsProgressBar\r\n ) {\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full\"\r\n [style.backgroundColor]=\"percentageColor() || '#000'\"\r\n ></span>\r\n }\r\n <span [style.color]=\"percentageColor()\">\r\n {{\r\n percentageValue() !== null\r\n ? (percentageValue() | number: \"1.0-0\") + \"%\"\r\n : \"__\"\r\n }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Slider Template -->\r\n<ng-template #sliderTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n <div\r\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-32\"\r\n >\r\n <div\r\n class=\"h-full bg-primary rounded-full transition-all\"\r\n [style.width.%]=\"sliderValue() || 0\"\r\n ></div>\r\n </div>\r\n <span class=\"text-sm\">{{ sliderValue() || 0 }}%</span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- User Template -->\r\n<ng-template #userTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (userData()) {\r\n <div class=\"flex items-center gap-2\">\r\n @if (userData()?.avatar || userData()?.image) {\r\n <img\r\n [src]=\"userData()?.avatar || userData()?.image\"\r\n alt=\"User avatar\"\r\n class=\"w-8 h-8 rounded-full object-cover\"\r\n />\r\n } @else {\r\n <div\r\n class=\"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center text-primary font-semibold text-sm\"\r\n >\r\n {{ userInitials() }}\r\n </div>\r\n }\r\n <span class=\"font-medium\">{{ userName() }}</span>\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Lookup Multiselect Template -->\r\n<ng-template #lookupMultiselectTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (multiselectValues()?.length) {\r\n <div class=\"flex flex-wrap gap-1\">\r\n @for (item of multiselectValues(); track item.key || $index) {\r\n <span\r\n class=\"px-2 py-0.5 rounded-full text-xs font-medium\"\r\n [style.backgroundColor]=\"(item.details?.color || '#6b7280') + '20'\"\r\n [style.color]=\"item.details?.color || '#6b7280'\"\r\n >\r\n {{ item.name || item.display || item }}\r\n </span>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Multi User Template -->\r\n<ng-template #multiUserTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (multiUserValues()?.length) {\r\n <div class=\"flex items-center -space-x-2\">\r\n @for (user of multiUserValues().slice(0, 5); track user.id || $index) {\r\n @if (user.avatar || user.image) {\r\n <img\r\n [src]=\"user.avatar || user.image\"\r\n [alt]=\"user.name || user.displayName\"\r\n class=\"w-7 h-7 rounded-full border-2 border-white object-cover\"\r\n />\r\n } @else {\r\n <div\r\n class=\"w-7 h-7 rounded-full border-2 border-white bg-primary/20 flex items-center justify-center text-primary font-semibold text-xs\"\r\n >\r\n {{ getInitials(user.name || user.displayName) }}\r\n </div>\r\n }\r\n }\r\n @if (multiUserValues().length > 5) {\r\n <div\r\n class=\"w-7 h-7 rounded-full border-2 border-white bg-surface-300 flex items-center justify-center text-xs font-medium\"\r\n >\r\n +{{ multiUserValues().length - 5 }}\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Dynamic List Template -->\r\n<ng-template #dynamicListTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (dynamicListValues()?.length) {\r\n <div class=\"flex flex-col gap-1\">\r\n @for (item of dynamicListValues(); track $index) {\r\n <div class=\"text-sm\">\r\n {{ item?.label || item?.name || item }}\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Location Template -->\r\n<ng-template #locationTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ locationDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n", styles: [":host{display:block}.text-ellipsis{text-overflow:ellipsis}\n"] }]
|
|
27712
|
+
args: [{ selector: 'mt-entity-info', standalone: true, imports: [CommonModule, TranslocoDirective, DecimalPipe, SecureImagePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"entity-info-wrapper w-full\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n>\n @switch (viewTypeLower()) {\n <!-- Text Types -->\n @case (\"text\") {\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\n }\n @case (\"float\") {\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\n }\n @case (\"longtext\") {\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\n }\n @case (\"title\") {\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\n }\n @case (\"phasegate\") {\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\n }\n\n <!-- Number -->\n @case (\"number\") {\n <ng-container *ngTemplateOutlet=\"numberTemplate\"></ng-container>\n }\n\n <!-- Date Types -->\n @case (\"date\") {\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\n }\n @case (\"datetime\") {\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\n }\n\n <!-- Currency -->\n @case (\"currency\") {\n <ng-container *ngTemplateOutlet=\"currencyTemplate\"></ng-container>\n }\n\n <!-- Time -->\n @case (\"time\") {\n <ng-container *ngTemplateOutlet=\"timeTemplate\"></ng-container>\n }\n\n <!-- Lookup -->\n @case (\"lookup\") {\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\n }\n\n <!-- Lookup Matrix (same value shape as lookup: key/display/color) -->\n @case (\"lookupmatrix\") {\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\n }\n\n <!-- Checkbox -->\n @case (\"checkbox\") {\n <ng-container *ngTemplateOutlet=\"checkboxTemplate\"></ng-container>\n }\n\n <!-- Status -->\n @case (\"status\") {\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\n }\n @case (\"request_status\") {\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\n }\n\n <!-- Percentage -->\n @case (\"percentage\") {\n <ng-container *ngTemplateOutlet=\"percentageTemplate\"></ng-container>\n }\n\n <!-- Slider -->\n @case (\"slider\") {\n <ng-container *ngTemplateOutlet=\"sliderTemplate\"></ng-container>\n }\n\n <!-- User -->\n @case (\"user\") {\n <ng-container *ngTemplateOutlet=\"userTemplate\"></ng-container>\n }\n\n <!-- Multi-select lookup -->\n @case (\"lookupmultiselect\") {\n <ng-container\n *ngTemplateOutlet=\"lookupMultiselectTemplate\"\n ></ng-container>\n }\n\n <!-- Multi user -->\n @case (\"multiuser\") {\n <ng-container *ngTemplateOutlet=\"multiUserTemplate\"></ng-container>\n }\n\n <!-- Dynamic List -->\n @case (\"dynamiclist\") {\n <ng-container *ngTemplateOutlet=\"dynamicListTemplate\"></ng-container>\n }\n\n <!-- Location -->\n @case (\"location\") {\n <ng-container *ngTemplateOutlet=\"locationTemplate\"></ng-container>\n }\n\n <!-- Default: treat as text -->\n @default {\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\n }\n }\n</div>\n\n<!-- Text Template -->\n<ng-template #textTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n <div\n class=\"font-semibold\"\n [class.text-ellipsis]=\"limitWords()\"\n [class.overflow-hidden]=\"limitWords()\"\n [class.whitespace-nowrap]=\"limitWords()\"\n [style.max-width]=\"limitWords() ? '200px' : 'auto'\"\n [title]=\"textValue()\"\n >\n {{ textValue() || \"__\" }}\n </div>\n</ng-template>\n\n<!-- Number Template -->\n<ng-template #numberTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n <div class=\"font-semibold\">\n {{ numericValue() !== null ? (numericValue() | number) : \"__\" }}\n </div>\n</ng-template>\n\n<!-- Date Template -->\n<ng-template #dateTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n <div class=\"font-semibold\">\n {{ dateDisplayValue() || \"__\" }}\n </div>\n</ng-template>\n\n<!-- Currency Template -->\n<ng-template #currencyTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n <div class=\"font-semibold\">\n {{ currencyDisplayValue() || \"__\" }}\n </div>\n</ng-template>\n\n<!-- Time Template -->\n<ng-template #timeTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n <div class=\"font-semibold\">\n {{ timeDisplayValue() || \"__\" }}\n </div>\n</ng-template>\n\n<!-- Lookup Template -->\n<ng-template #lookupTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n @if (lookupName()) {\n <span class=\"flex items-center gap-1\" [style.color]=\"lookupColor()\">\n @if (displayType() === \"entity\" && lookupColor()) {\n <span\n class=\"w-2 h-2 rounded-full inline-block\"\n [style.backgroundColor]=\"lookupColor()\"\n ></span>\n }\n {{ lookupName() }}\n </span>\n } @else {\n <span class=\"font-semibold\">__</span>\n }\n</ng-template>\n\n<!-- Checkbox Template -->\n<ng-template #checkboxTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n <div class=\"flex items-center\">\n <i\n [class]=\"\n checkboxValue()\n ? 'pi pi-check-square text-primary'\n : 'pi pi-stop text-muted-color'\n \"\n ></i>\n <span class=\"ml-2\">{{ checkboxLabel() }}</span>\n </div>\n</ng-template>\n\n<!-- Status Template -->\n<ng-template #statusTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n <div class=\"flex items-center gap-2\">\n @if (statusColor()) {\n <span\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\n [style.backgroundColor]=\"statusColor()\"\n ></span>\n }\n <span [style.color]=\"statusColor()\">\n {{ statusName() || \"__\" }}\n </span>\n </div>\n</ng-template>\n\n<!-- Percentage Template -->\n<ng-template #percentageTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n <div class=\"flex items-center gap-2\">\n @if (\n displayType() !== \"inTable\" ||\n extraInfoData()?.showPercentageAsProgressBar\n ) {\n <div\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-24\"\n >\n <div\n class=\"h-full rounded-full transition-all\"\n [style.width.%]=\"percentageValue() || 0\"\n [style.backgroundColor]=\"percentageColor() || 'var(--primary-color)'\"\n ></div>\n </div>\n }\n @if (\n extraInfoData()?.showPercentageStatus &&\n !extraInfoData()?.showPercentageAsProgressBar\n ) {\n <span\n class=\"w-2.5 h-2.5 rounded-full\"\n [style.backgroundColor]=\"percentageColor() || '#000'\"\n ></span>\n }\n <span [style.color]=\"percentageColor()\">\n {{\n percentageValue() !== null\n ? (percentageValue() | number: \"1.0-0\") + \"%\"\n : \"__\"\n }}\n </span>\n </div>\n</ng-template>\n\n<!-- Slider Template -->\n<ng-template #sliderTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n <div class=\"flex items-center gap-2\">\n <div\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-32\"\n >\n <div\n class=\"h-full bg-primary rounded-full transition-all\"\n [style.width.%]=\"sliderValue() || 0\"\n ></div>\n </div>\n <span class=\"text-sm\">{{ sliderValue() || 0 }}%</span>\n </div>\n</ng-template>\n\n<!-- User Template -->\n<ng-template #userTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n @if (userData()) {\n <div class=\"flex items-center gap-2\">\n @if (userPhoto()) {\n <img\n [src]=\"userPhoto() | secureImage: true : httpContext : 'avatar/'\"\n alt=\"User avatar\"\n class=\"w-8 h-8 rounded-full object-cover\"\n />\n } @else {\n <div\n class=\"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center text-primary font-semibold text-sm\"\n >\n {{ userInitials() }}\n </div>\n }\n <span class=\"font-medium\">{{ userName() }}</span>\n </div>\n } @else {\n <span class=\"font-semibold\">__</span>\n }\n</ng-template>\n\n<!-- Lookup Multiselect Template -->\n<ng-template #lookupMultiselectTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n @if (multiselectValues()?.length) {\n <div class=\"flex flex-wrap gap-1\">\n @for (item of multiselectValues(); track item.key || $index) {\n <span\n class=\"px-2 py-0.5 rounded-full text-xs font-medium\"\n [style.backgroundColor]=\"(item.details?.color || '#6b7280') + '20'\"\n [style.color]=\"item.details?.color || '#6b7280'\"\n >\n {{ item.name || item.display || item }}\n </span>\n }\n </div>\n } @else {\n <span class=\"font-semibold\">__</span>\n }\n</ng-template>\n\n<!-- Multi User Template -->\n<ng-template #multiUserTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n @if (multiUserValues()?.length) {\n <div class=\"flex items-center -space-x-2\">\n @for (user of multiUserValues().slice(0, 5); track user.id || $index) {\n @if (getUserPhoto(user); as userPhoto) {\n <img\n [src]=\"userPhoto | secureImage: true : httpContext : 'avatar/'\"\n [alt]=\"user.name || user.displayName\"\n class=\"w-7 h-7 rounded-full border-2 border-white object-cover\"\n />\n } @else {\n <div\n class=\"w-7 h-7 rounded-full border-2 border-white bg-primary/20 flex items-center justify-center text-primary font-semibold text-xs\"\n >\n {{ getInitials(user.name || user.displayName) }}\n </div>\n }\n }\n @if (multiUserValues().length > 5) {\n <div\n class=\"w-7 h-7 rounded-full border-2 border-white bg-surface-300 flex items-center justify-center text-xs font-medium\"\n >\n +{{ multiUserValues().length - 5 }}\n </div>\n }\n </div>\n } @else {\n <span class=\"font-semibold\">__</span>\n }\n</ng-template>\n\n<!-- Dynamic List Template -->\n<ng-template #dynamicListTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n @if (dynamicListValues()?.length) {\n <div class=\"flex flex-col gap-1\">\n @for (item of dynamicListValues(); track $index) {\n <div class=\"text-sm\">\n {{ item?.label || item?.name || item }}\n </div>\n }\n </div>\n } @else {\n <span class=\"font-semibold\">__</span>\n }\n</ng-template>\n\n<!-- Location Template -->\n<ng-template #locationTemplate>\n @if (displayType() === \"entity\") {\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\n {{ data()?.label }}\n </div>\n }\n <div class=\"font-semibold\">\n {{ locationDisplayValue() || \"__\" }}\n </div>\n</ng-template>\n", styles: [":host{display:block}.text-ellipsis{text-overflow:ellipsis}\n"] }]
|
|
27361
27713
|
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], displayType: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayType", required: false }] }], extraInfoData: [{ type: i0.Input, args: [{ isSignal: true, alias: "extraInfoData", required: false }] }], limitWords: [{ type: i0.Input, args: [{ isSignal: true, alias: "limitWords", required: false }] }], customClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "customClass", required: false }] }] } });
|
|
27362
27714
|
|
|
27363
27715
|
/**
|
|
@@ -27540,6 +27892,19 @@ class TableCardComponent {
|
|
|
27540
27892
|
* two never disagree about visibility.
|
|
27541
27893
|
*/
|
|
27542
27894
|
hasLegend = computed(() => this.showLegend() && this.labels().length > 0, ...(ngDevMode ? [{ debugName: "hasLegend" }] : /* istanbul ignore next */ []));
|
|
27895
|
+
legendPosition = computed(() => {
|
|
27896
|
+
const position = this.configurationItem()?.clientConfig?.configAsType?.['legend']?.['position'];
|
|
27897
|
+
return position === 'right' ||
|
|
27898
|
+
position === 'bottom' ||
|
|
27899
|
+
position === 'left'
|
|
27900
|
+
? position
|
|
27901
|
+
: 'top';
|
|
27902
|
+
}, ...(ngDevMode ? [{ debugName: "legendPosition" }] : /* istanbul ignore next */ []));
|
|
27903
|
+
legendIconType = computed(() => {
|
|
27904
|
+
const iconType = this.configurationItem()?.clientConfig?.configAsType?.['legend']?.['iconType'];
|
|
27905
|
+
return typeof iconType === 'string' && iconType ? iconType : 'circle';
|
|
27906
|
+
}, ...(ngDevMode ? [{ debugName: "legendIconType" }] : /* istanbul ignore next */ []));
|
|
27907
|
+
isSideLegend = computed(() => this.legendPosition() === 'left' || this.legendPosition() === 'right', ...(ngDevMode ? [{ debugName: "isSideLegend" }] : /* istanbul ignore next */ []));
|
|
27543
27908
|
/** Processed table rows */
|
|
27544
27909
|
tableRows = signal([], ...(ngDevMode ? [{ debugName: "tableRows" }] : /* istanbul ignore next */ []));
|
|
27545
27910
|
/** Grouped data */
|
|
@@ -28689,7 +29054,7 @@ class TableCardComponent {
|
|
|
28689
29054
|
this.onAction.emit({ type: 'clickOnHeader', data: {} });
|
|
28690
29055
|
}
|
|
28691
29056
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TableCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
28692
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: TableCardComponent, isStandalone: true, selector: "mt-table-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null }, hideHeader: { classPropertyName: "hideHeader", publicName: "hideHeader", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction" }, ngImport: i0, template: "<!--\r\n One legend definition, two possible hosts. `mt-card-content` only projects\r\n [topEnd] inside its header block, so when the header is hidden (dialog view)\r\n the legend has to be rendered in the body instead or it is dropped entirely.\r\n-->\r\n<ng-template #legendList>\r\n <div class=\"flex flex-wrap items-center gap-2\">\r\n @for (label of labels(); track label.key || $index) {\r\n <div class=\"flex items-center gap-1 text-xs\">\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full\"\r\n [style.backgroundColor]=\"getLegendColor(label)\"\r\n ></span>\r\n <span>{{ getLegendText(label) }}</span>\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<mt-card-content\r\n [inGroup]=\"inGroup()\"\r\n [showHeader]=\"!hideHeader()\"\r\n [title]=\"title()\"\r\n [styleConfig]=\"\r\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\r\n \"\r\n [cardStyleConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\r\n \"\r\n [headerConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\r\n \"\r\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\r\n (headerClick)=\"onHeaderClick()\"\r\n>\r\n <!-- Status Labels -->\r\n <ng-container topEnd>\r\n @if (hasLegend() && !hideHeader()) {\r\n <ng-container [ngTemplateOutlet]=\"legendList\" />\r\n }\r\n </ng-container>\r\n\r\n <ng-container body>\r\n <div\r\n class=\"table-wrapper h-full\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n >\r\n <!-- Headerless (dialog) view: the header's top-end slot does not exist,\r\n so the legend is rendered above the table instead. -->\r\n @if (hasLegend() && hideHeader()) {\r\n <div class=\"mb-2 flex shrink-0 justify-end\">\r\n <ng-container [ngTemplateOutlet]=\"legendList\" />\r\n </div>\r\n }\r\n\r\n @if (loading()) {\r\n <div class=\"flex items-center justify-center h-32\">\r\n <i class=\"pi pi-spin pi-spinner text-2xl\"></i>\r\n </div>\r\n } @else if (hasData()) {\r\n <div\r\n class=\"table-scroll-container overflow-auto h-full\"\r\n (scroll)=\"onTableScroll($event)\"\r\n >\r\n <table class=\"w-full border-collapse text-sm\">\r\n <thead class=\"sticky top-0 z-10\" [hidden]=\"hideSubheader()\">\r\n <tr>\r\n <!-- Index column -->\r\n @if (!tableStyleConfig()?.hideIndex && showIndex()) {\r\n <th\r\n class=\"px-3 py-2 text-left font-semibold bg-surface-100 border-b-2 border-surface-200\"\r\n [style.color]=\"tableStyleConfig()?.thTextColor\"\r\n [style.backgroundColor]=\"\r\n tableStyleConfig()?.thBackgroundColor\r\n \"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.thFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.thFontSize\"\r\n >\r\n #\r\n </th>\r\n }\r\n\r\n <!-- Data columns -->\r\n @for (column of visibleColumns(); track column.key) {\r\n <th\r\n class=\"px-3 py-2 text-left font-semibold bg-surface-100 border-b-2 border-surface-200 whitespace-nowrap\"\r\n [style.minWidth]=\"column.width || 'auto'\"\r\n [style.color]=\"tableStyleConfig()?.thTextColor\"\r\n [style.backgroundColor]=\"\r\n tableStyleConfig()?.thBackgroundColor\r\n \"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.thFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.thFontSize\"\r\n [class.cursor-pointer]=\"!isPhaseGateColumn(column)\"\r\n (click)=\"onSort(column)\"\r\n >\r\n <div class=\"flex items-center gap-2\">\r\n <span>{{ column.label }}</span>\r\n @if (column.isSort) {\r\n <i\r\n class=\"text-xs\"\r\n [class]=\"\r\n column.isAsc\r\n ? 'pi pi-sort-amount-up'\r\n : 'pi pi-sort-amount-down'\r\n \"\r\n ></i>\r\n }\r\n </div>\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <!-- Grouped Mode -->\r\n @if (isGrouped()) {\r\n @if (groupedVirtualTopSpacerHeightPx() > 0) {\r\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n [style.height.px]=\"groupedVirtualTopSpacerHeightPx()\"\r\n ></td>\r\n </tr>\r\n }\r\n\r\n @for (item of visibleGroupedRows(); track item.trackId) {\r\n @if (item.kind === \"group\") {\r\n <tr class=\"dashboard-table-row\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n class=\"px-3 py-2 font-semibold\"\r\n [style.backgroundColor]=\"\r\n tableStyleConfig()?.groupBackgroundColor || '#e4d1ac'\r\n \"\r\n [style.color]=\"tableStyleConfig()?.groupTextColor\"\r\n >\r\n <mt-entity-info\r\n [data]=\"{\r\n viewType: item.group.prop?.viewType,\r\n value: item.group.prop?.value,\r\n }\"\r\n [displayType]=\"'inTable'\"\r\n ></mt-entity-info>\r\n </td>\r\n </tr>\r\n } @else {\r\n <tr\r\n class=\"dashboard-table-row hover:bg-surface-50 transition-colors\"\r\n [class.cursor-pointer]=\"isRowClickable()\"\r\n [class.bg-surface-100]=\"\r\n tableStyleConfig()?.striped &&\r\n (item.rowIndex ?? 0) % 2 === 1\r\n \"\r\n (click)=\"onRowClick(item.row)\"\r\n >\r\n @if (!tableStyleConfig()?.hideIndex && showIndex()) {\r\n <td\r\n class=\"px-3 py-2 text-center border-b border-surface-100\"\r\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.tdFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\r\n >\r\n {{ (item.rowIndex ?? 0) + 1 }}\r\n </td>\r\n }\r\n\r\n @for (column of visibleColumns(); track column.key) {\r\n <td\r\n class=\"px-3 py-2 border-b border-surface-100\"\r\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.tdFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\r\n >\r\n @if (isPhaseGateColumn(column)) {\r\n @let phaseCell = getPhaseGateCell(item.row, column);\r\n <div\r\n class=\"min-w-36\"\r\n [title]=\"getPhaseGateCellTooltip(phaseCell)\"\r\n >\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\r\n [style.backgroundColor]=\"\r\n getPhaseGateCellColor(phaseCell)\r\n \"\r\n ></span>\r\n <span class=\"font-medium truncate\">\r\n {{ getPhaseGateCellText(phaseCell) }}\r\n </span>\r\n </div>\r\n @if (getPhaseGatePercentage(phaseCell) !== null) {\r\n <div\r\n class=\"mt-1 h-1.5 overflow-hidden rounded-full bg-surface-200\"\r\n >\r\n <div\r\n class=\"h-full rounded-full\"\r\n [style.width.%]=\"\r\n getPhaseGatePercentage(phaseCell)\r\n \"\r\n [style.backgroundColor]=\"\r\n getPhaseGateCellColor(phaseCell)\r\n \"\r\n ></div>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <mt-entity-info\r\n [data]=\"getCellData(item.row, column)\"\r\n [displayType]=\"'inTable'\"\r\n [extraInfoData]=\"tableStyleConfig()\"\r\n ></mt-entity-info>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n }\r\n\r\n @if (groupedVirtualBottomSpacerHeightPx() > 0) {\r\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n [style.height.px]=\"groupedVirtualBottomSpacerHeightPx()\"\r\n ></td>\r\n </tr>\r\n }\r\n } @else {\r\n <!-- Non-Grouped Mode -->\r\n @if (flatVirtualTopSpacerHeightPx() > 0) {\r\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n [style.height.px]=\"flatVirtualTopSpacerHeightPx()\"\r\n ></td>\r\n </tr>\r\n }\r\n\r\n @for (rowView of visibleTableRows(); track rowView.trackId) {\r\n <tr\r\n class=\"dashboard-table-row hover:bg-surface-50 transition-colors\"\r\n [class.cursor-pointer]=\"isRowClickable()\"\r\n [class.bg-surface-100]=\"\r\n tableStyleConfig()?.striped && rowView.rowIndex % 2 === 1\r\n \"\r\n (click)=\"onRowClick(rowView.row)\"\r\n >\r\n @if (!tableStyleConfig()?.hideIndex && showIndex()) {\r\n <td\r\n class=\"px-3 py-2 text-center border-b border-surface-100\"\r\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.tdFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\r\n >\r\n {{ rowView.rowIndex + 1 }}\r\n </td>\r\n }\r\n\r\n @for (column of visibleColumns(); track column.key) {\r\n <td\r\n class=\"px-3 py-2 border-b border-surface-100\"\r\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.tdFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\r\n >\r\n @if (isPhaseGateColumn(column)) {\r\n @let phaseCell =\r\n getPhaseGateCell(rowView.row, column);\r\n <div\r\n class=\"min-w-36\"\r\n [title]=\"getPhaseGateCellTooltip(phaseCell)\"\r\n >\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\r\n [style.backgroundColor]=\"\r\n getPhaseGateCellColor(phaseCell)\r\n \"\r\n ></span>\r\n <span class=\"font-medium truncate\">\r\n {{ getPhaseGateCellText(phaseCell) }}\r\n </span>\r\n </div>\r\n @if (getPhaseGatePercentage(phaseCell) !== null) {\r\n <div\r\n class=\"mt-1 h-1.5 overflow-hidden rounded-full bg-surface-200\"\r\n >\r\n <div\r\n class=\"h-full rounded-full\"\r\n [style.width.%]=\"\r\n getPhaseGatePercentage(phaseCell)\r\n \"\r\n [style.backgroundColor]=\"\r\n getPhaseGateCellColor(phaseCell)\r\n \"\r\n ></div>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <mt-entity-info\r\n [data]=\"getCellData(rowView.row, column)\"\r\n [displayType]=\"'inTable'\"\r\n [extraInfoData]=\"tableStyleConfig()\"\r\n ></mt-entity-info>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n\r\n @if (flatVirtualBottomSpacerHeightPx() > 0) {\r\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n [style.height.px]=\"flatVirtualBottomSpacerHeightPx()\"\r\n ></td>\r\n </tr>\r\n }\r\n }\r\n </tbody>\r\n </table>\r\n </div>\r\n } @else {\r\n <!-- No Data -->\r\n <div\r\n class=\"flex flex-col items-center justify-center h-32 text-muted-color gap-2\"\r\n >\r\n <i class=\"pi pi-info-circle text-2xl\"></i>\r\n <span>{{ t(\"noData\") }}</span>\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n</mt-card-content>\r\n", styles: [":host{display:block;height:100%}.table-wrapper{display:flex;flex-direction:column}.table-scroll-container{flex:1;min-height:0}table{border-collapse:collapse}.dashboard-table-row{height:48px}.dashboard-table-spacer td{border:0;padding:0}th,td{text-align:start}\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: CardContentComponent, selector: "mt-card-content", inputs: ["title", "inGroup", "groupHeader", "headerConfig", "styleConfig", "cardStyleConfig", "density", "padding", "showHeader", "headerClickable", "isNoTopEnd", "isChart", "titleEditable"], outputs: ["headerClick", "titleChange"] }, { kind: "component", type: EntityInfoComponent, selector: "mt-entity-info", inputs: ["data", "displayType", "extraInfoData", "limitWords", "customClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
29057
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: TableCardComponent, isStandalone: true, selector: "mt-table-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null }, hideHeader: { classPropertyName: "hideHeader", publicName: "hideHeader", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction" }, ngImport: i0, template: "<!-- One legend definition; the body grid places it on any configured edge. -->\n<ng-template #legendList>\n <div\n class=\"flex flex-wrap items-center gap-2\"\n [class.flex-col]=\"isSideLegend()\"\n [class.items-start]=\"isSideLegend()\"\n >\n @for (label of labels(); track label.key || $index) {\n <div class=\"flex items-center gap-1 text-xs\">\n <span\n class=\"table-legend-marker\"\n [class.shape-rect]=\"legendIconType() === 'rect'\"\n [class.shape-roundRect]=\"legendIconType() === 'roundRect'\"\n [class.shape-diamond]=\"legendIconType() === 'diamond'\"\n [class.shape-triangle]=\"legendIconType() === 'triangle'\"\n [style.backgroundColor]=\"\n legendIconType() === 'triangle' ? null : getLegendColor(label)\n \"\n [style.border-bottom-color]=\"\n legendIconType() === 'triangle' ? getLegendColor(label) : null\n \"\n ></span>\n <span>{{ getLegendText(label) }}</span>\n </div>\n }\n </div>\n</ng-template>\n\n<mt-card-content\n [inGroup]=\"inGroup()\"\n [showHeader]=\"!hideHeader()\"\n [title]=\"title()\"\n [styleConfig]=\"\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\n \"\n [cardStyleConfig]=\"\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\n \"\n [headerConfig]=\"\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\n \"\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\n (headerClick)=\"onHeaderClick()\"\n>\n <ng-container body>\n <div\n class=\"table-wrapper h-full\"\n [attr.data-legend-position]=\"legendPosition()\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n >\n @if (hasLegend()) {\n <div class=\"table-legend-host\">\n <ng-container [ngTemplateOutlet]=\"legendList\" />\n </div>\n }\n\n <div class=\"table-content\">\n @if (loading()) {\n <div class=\"flex items-center justify-center h-32\">\n <i class=\"pi pi-spin pi-spinner text-2xl\"></i>\n </div>\n } @else if (hasData()) {\n <div\n class=\"table-scroll-container overflow-auto h-full\"\n (scroll)=\"onTableScroll($event)\"\n >\n <table class=\"w-full border-collapse text-sm\">\n <thead class=\"sticky top-0 z-10\" [hidden]=\"hideSubheader()\">\n <tr>\n <!-- Index column -->\n @if (!tableStyleConfig()?.hideIndex && showIndex()) {\n <th\n class=\"px-3 py-2 text-left font-semibold bg-surface-100 border-b-2 border-surface-200\"\n [style.color]=\"tableStyleConfig()?.thTextColor\"\n [style.backgroundColor]=\"\n tableStyleConfig()?.thBackgroundColor\n \"\n [style.fontWeight]=\"\n tableStyleConfig()?.thFontBold ? 'bold' : null\n \"\n [style.fontSize.px]=\"tableStyleConfig()?.thFontSize\"\n >\n #\n </th>\n }\n\n <!-- Data columns -->\n @for (column of visibleColumns(); track column.key) {\n <th\n class=\"px-3 py-2 text-left font-semibold bg-surface-100 border-b-2 border-surface-200 whitespace-nowrap\"\n [style.minWidth]=\"column.width || 'auto'\"\n [style.color]=\"tableStyleConfig()?.thTextColor\"\n [style.backgroundColor]=\"\n tableStyleConfig()?.thBackgroundColor\n \"\n [style.fontWeight]=\"\n tableStyleConfig()?.thFontBold ? 'bold' : null\n \"\n [style.fontSize.px]=\"tableStyleConfig()?.thFontSize\"\n [class.cursor-pointer]=\"!isPhaseGateColumn(column)\"\n (click)=\"onSort(column)\"\n >\n <div class=\"flex items-center gap-2\">\n <span>{{ column.label }}</span>\n @if (column.isSort) {\n <i\n class=\"text-xs\"\n [class]=\"\n column.isAsc\n ? 'pi pi-sort-amount-up'\n : 'pi pi-sort-amount-down'\n \"\n ></i>\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n <!-- Grouped Mode -->\n @if (isGrouped()) {\n @if (groupedVirtualTopSpacerHeightPx() > 0) {\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\n <td\n [attr.colspan]=\"totalColumns()\"\n [style.height.px]=\"groupedVirtualTopSpacerHeightPx()\"\n ></td>\n </tr>\n }\n\n @for (item of visibleGroupedRows(); track item.trackId) {\n @if (item.kind === \"group\") {\n <tr class=\"dashboard-table-row\">\n <td\n [attr.colspan]=\"totalColumns()\"\n class=\"px-3 py-2 font-semibold\"\n [style.backgroundColor]=\"\n tableStyleConfig()?.groupBackgroundColor ||\n '#e4d1ac'\n \"\n [style.color]=\"tableStyleConfig()?.groupTextColor\"\n >\n <mt-entity-info\n [data]=\"{\n viewType: item.group.prop?.viewType,\n value: item.group.prop?.value,\n }\"\n [displayType]=\"'inTable'\"\n ></mt-entity-info>\n </td>\n </tr>\n } @else {\n <tr\n class=\"dashboard-table-row hover:bg-surface-50 transition-colors\"\n [class.cursor-pointer]=\"isRowClickable()\"\n [class.bg-surface-100]=\"\n tableStyleConfig()?.striped &&\n (item.rowIndex ?? 0) % 2 === 1\n \"\n (click)=\"onRowClick(item.row)\"\n >\n @if (!tableStyleConfig()?.hideIndex && showIndex()) {\n <td\n class=\"px-3 py-2 text-center border-b border-surface-100\"\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\n [style.fontWeight]=\"\n tableStyleConfig()?.tdFontBold ? 'bold' : null\n \"\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\n >\n {{ (item.rowIndex ?? 0) + 1 }}\n </td>\n }\n\n @for (column of visibleColumns(); track column.key) {\n <td\n class=\"px-3 py-2 border-b border-surface-100\"\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\n [style.fontWeight]=\"\n tableStyleConfig()?.tdFontBold ? 'bold' : null\n \"\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\n >\n @if (isPhaseGateColumn(column)) {\n @let phaseCell =\n getPhaseGateCell(item.row, column);\n <div\n class=\"min-w-36\"\n [title]=\"getPhaseGateCellTooltip(phaseCell)\"\n >\n <div class=\"flex items-center gap-2\">\n <span\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\n [style.backgroundColor]=\"\n getPhaseGateCellColor(phaseCell)\n \"\n ></span>\n <span class=\"font-medium truncate\">\n {{ getPhaseGateCellText(phaseCell) }}\n </span>\n </div>\n @if (\n getPhaseGatePercentage(phaseCell) !== null\n ) {\n <div\n class=\"mt-1 h-1.5 overflow-hidden rounded-full bg-surface-200\"\n >\n <div\n class=\"h-full rounded-full\"\n [style.width.%]=\"\n getPhaseGatePercentage(phaseCell)\n \"\n [style.backgroundColor]=\"\n getPhaseGateCellColor(phaseCell)\n \"\n ></div>\n </div>\n }\n </div>\n } @else {\n <mt-entity-info\n [data]=\"getCellData(item.row, column)\"\n [displayType]=\"'inTable'\"\n [extraInfoData]=\"tableStyleConfig()\"\n ></mt-entity-info>\n }\n </td>\n }\n </tr>\n }\n }\n\n @if (groupedVirtualBottomSpacerHeightPx() > 0) {\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\n <td\n [attr.colspan]=\"totalColumns()\"\n [style.height.px]=\"groupedVirtualBottomSpacerHeightPx()\"\n ></td>\n </tr>\n }\n } @else {\n <!-- Non-Grouped Mode -->\n @if (flatVirtualTopSpacerHeightPx() > 0) {\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\n <td\n [attr.colspan]=\"totalColumns()\"\n [style.height.px]=\"flatVirtualTopSpacerHeightPx()\"\n ></td>\n </tr>\n }\n\n @for (rowView of visibleTableRows(); track rowView.trackId) {\n <tr\n class=\"dashboard-table-row hover:bg-surface-50 transition-colors\"\n [class.cursor-pointer]=\"isRowClickable()\"\n [class.bg-surface-100]=\"\n tableStyleConfig()?.striped &&\n rowView.rowIndex % 2 === 1\n \"\n (click)=\"onRowClick(rowView.row)\"\n >\n @if (!tableStyleConfig()?.hideIndex && showIndex()) {\n <td\n class=\"px-3 py-2 text-center border-b border-surface-100\"\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\n [style.fontWeight]=\"\n tableStyleConfig()?.tdFontBold ? 'bold' : null\n \"\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\n >\n {{ rowView.rowIndex + 1 }}\n </td>\n }\n\n @for (column of visibleColumns(); track column.key) {\n <td\n class=\"px-3 py-2 border-b border-surface-100\"\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\n [style.fontWeight]=\"\n tableStyleConfig()?.tdFontBold ? 'bold' : null\n \"\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\n >\n @if (isPhaseGateColumn(column)) {\n @let phaseCell =\n getPhaseGateCell(rowView.row, column);\n <div\n class=\"min-w-36\"\n [title]=\"getPhaseGateCellTooltip(phaseCell)\"\n >\n <div class=\"flex items-center gap-2\">\n <span\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\n [style.backgroundColor]=\"\n getPhaseGateCellColor(phaseCell)\n \"\n ></span>\n <span class=\"font-medium truncate\">\n {{ getPhaseGateCellText(phaseCell) }}\n </span>\n </div>\n @if (getPhaseGatePercentage(phaseCell) !== null) {\n <div\n class=\"mt-1 h-1.5 overflow-hidden rounded-full bg-surface-200\"\n >\n <div\n class=\"h-full rounded-full\"\n [style.width.%]=\"\n getPhaseGatePercentage(phaseCell)\n \"\n [style.backgroundColor]=\"\n getPhaseGateCellColor(phaseCell)\n \"\n ></div>\n </div>\n }\n </div>\n } @else {\n <mt-entity-info\n [data]=\"getCellData(rowView.row, column)\"\n [displayType]=\"'inTable'\"\n [extraInfoData]=\"tableStyleConfig()\"\n ></mt-entity-info>\n }\n </td>\n }\n </tr>\n }\n\n @if (flatVirtualBottomSpacerHeightPx() > 0) {\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\n <td\n [attr.colspan]=\"totalColumns()\"\n [style.height.px]=\"flatVirtualBottomSpacerHeightPx()\"\n ></td>\n </tr>\n }\n }\n </tbody>\n </table>\n </div>\n } @else {\n <!-- No Data -->\n <div\n class=\"flex flex-col items-center justify-center h-32 text-muted-color gap-2\"\n >\n <i class=\"pi pi-info-circle text-2xl\"></i>\n <span>{{ t(\"noData\") }}</span>\n </div>\n }\n </div>\n </div>\n </ng-container>\n</mt-card-content>\n", styles: [":host{display:block;height:100%}.table-wrapper{display:grid;grid-template-areas:\"legend\" \"content\";grid-template-rows:auto minmax(0,1fr);min-height:0}.table-wrapper[data-legend-position=bottom]{grid-template-areas:\"content\" \"legend\";grid-template-rows:minmax(0,1fr) auto}.table-wrapper[data-legend-position=left]{grid-template-areas:\"legend content\";grid-template-columns:auto minmax(0,1fr);grid-template-rows:minmax(0,1fr)}.table-wrapper[data-legend-position=right]{grid-template-areas:\"content legend\";grid-template-columns:minmax(0,1fr) auto;grid-template-rows:minmax(0,1fr)}.table-content{grid-area:content;min-height:0;min-width:0;display:flex;flex-direction:column}.table-legend-host{grid-area:legend;min-width:0;padding:.25rem .5rem}.table-wrapper[data-legend-position=left] .table-legend-host,.table-wrapper[data-legend-position=right] .table-legend-host{max-width:12rem;overflow:auto}.table-legend-marker{display:inline-block;width:.625rem;height:.625rem;flex:0 0 auto;border-radius:999px}.table-legend-marker.shape-rect{border-radius:0}.table-legend-marker.shape-roundRect{border-radius:.2rem}.table-legend-marker.shape-diamond{border-radius:.0625rem;transform:rotate(45deg)}.table-legend-marker.shape-triangle{width:0;height:0;background:transparent!important;border-radius:0;border-left:.34rem solid transparent;border-right:.34rem solid transparent;border-bottom-width:.6rem;border-bottom-style:solid}.table-scroll-container{flex:1;min-height:0}table{border-collapse:collapse}.dashboard-table-row{height:48px}.dashboard-table-spacer td{border:0;padding:0}th,td{text-align:start}\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: CardContentComponent, selector: "mt-card-content", inputs: ["title", "inGroup", "groupHeader", "headerConfig", "styleConfig", "cardStyleConfig", "density", "padding", "showHeader", "headerClickable", "isNoTopEnd", "isChart", "titleEditable"], outputs: ["headerClick", "titleChange"] }, { kind: "component", type: EntityInfoComponent, selector: "mt-entity-info", inputs: ["data", "displayType", "extraInfoData", "limitWords", "customClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
28693
29058
|
}
|
|
28694
29059
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TableCardComponent, decorators: [{
|
|
28695
29060
|
type: Component,
|
|
@@ -28698,7 +29063,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
28698
29063
|
TranslocoDirective,
|
|
28699
29064
|
CardContentComponent,
|
|
28700
29065
|
EntityInfoComponent,
|
|
28701
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\r\n One legend definition, two possible hosts. `mt-card-content` only projects\r\n [topEnd] inside its header block, so when the header is hidden (dialog view)\r\n the legend has to be rendered in the body instead or it is dropped entirely.\r\n-->\r\n<ng-template #legendList>\r\n <div class=\"flex flex-wrap items-center gap-2\">\r\n @for (label of labels(); track label.key || $index) {\r\n <div class=\"flex items-center gap-1 text-xs\">\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full\"\r\n [style.backgroundColor]=\"getLegendColor(label)\"\r\n ></span>\r\n <span>{{ getLegendText(label) }}</span>\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<mt-card-content\r\n [inGroup]=\"inGroup()\"\r\n [showHeader]=\"!hideHeader()\"\r\n [title]=\"title()\"\r\n [styleConfig]=\"\r\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\r\n \"\r\n [cardStyleConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\r\n \"\r\n [headerConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\r\n \"\r\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\r\n (headerClick)=\"onHeaderClick()\"\r\n>\r\n <!-- Status Labels -->\r\n <ng-container topEnd>\r\n @if (hasLegend() && !hideHeader()) {\r\n <ng-container [ngTemplateOutlet]=\"legendList\" />\r\n }\r\n </ng-container>\r\n\r\n <ng-container body>\r\n <div\r\n class=\"table-wrapper h-full\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n >\r\n <!-- Headerless (dialog) view: the header's top-end slot does not exist,\r\n so the legend is rendered above the table instead. -->\r\n @if (hasLegend() && hideHeader()) {\r\n <div class=\"mb-2 flex shrink-0 justify-end\">\r\n <ng-container [ngTemplateOutlet]=\"legendList\" />\r\n </div>\r\n }\r\n\r\n @if (loading()) {\r\n <div class=\"flex items-center justify-center h-32\">\r\n <i class=\"pi pi-spin pi-spinner text-2xl\"></i>\r\n </div>\r\n } @else if (hasData()) {\r\n <div\r\n class=\"table-scroll-container overflow-auto h-full\"\r\n (scroll)=\"onTableScroll($event)\"\r\n >\r\n <table class=\"w-full border-collapse text-sm\">\r\n <thead class=\"sticky top-0 z-10\" [hidden]=\"hideSubheader()\">\r\n <tr>\r\n <!-- Index column -->\r\n @if (!tableStyleConfig()?.hideIndex && showIndex()) {\r\n <th\r\n class=\"px-3 py-2 text-left font-semibold bg-surface-100 border-b-2 border-surface-200\"\r\n [style.color]=\"tableStyleConfig()?.thTextColor\"\r\n [style.backgroundColor]=\"\r\n tableStyleConfig()?.thBackgroundColor\r\n \"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.thFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.thFontSize\"\r\n >\r\n #\r\n </th>\r\n }\r\n\r\n <!-- Data columns -->\r\n @for (column of visibleColumns(); track column.key) {\r\n <th\r\n class=\"px-3 py-2 text-left font-semibold bg-surface-100 border-b-2 border-surface-200 whitespace-nowrap\"\r\n [style.minWidth]=\"column.width || 'auto'\"\r\n [style.color]=\"tableStyleConfig()?.thTextColor\"\r\n [style.backgroundColor]=\"\r\n tableStyleConfig()?.thBackgroundColor\r\n \"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.thFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.thFontSize\"\r\n [class.cursor-pointer]=\"!isPhaseGateColumn(column)\"\r\n (click)=\"onSort(column)\"\r\n >\r\n <div class=\"flex items-center gap-2\">\r\n <span>{{ column.label }}</span>\r\n @if (column.isSort) {\r\n <i\r\n class=\"text-xs\"\r\n [class]=\"\r\n column.isAsc\r\n ? 'pi pi-sort-amount-up'\r\n : 'pi pi-sort-amount-down'\r\n \"\r\n ></i>\r\n }\r\n </div>\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <!-- Grouped Mode -->\r\n @if (isGrouped()) {\r\n @if (groupedVirtualTopSpacerHeightPx() > 0) {\r\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n [style.height.px]=\"groupedVirtualTopSpacerHeightPx()\"\r\n ></td>\r\n </tr>\r\n }\r\n\r\n @for (item of visibleGroupedRows(); track item.trackId) {\r\n @if (item.kind === \"group\") {\r\n <tr class=\"dashboard-table-row\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n class=\"px-3 py-2 font-semibold\"\r\n [style.backgroundColor]=\"\r\n tableStyleConfig()?.groupBackgroundColor || '#e4d1ac'\r\n \"\r\n [style.color]=\"tableStyleConfig()?.groupTextColor\"\r\n >\r\n <mt-entity-info\r\n [data]=\"{\r\n viewType: item.group.prop?.viewType,\r\n value: item.group.prop?.value,\r\n }\"\r\n [displayType]=\"'inTable'\"\r\n ></mt-entity-info>\r\n </td>\r\n </tr>\r\n } @else {\r\n <tr\r\n class=\"dashboard-table-row hover:bg-surface-50 transition-colors\"\r\n [class.cursor-pointer]=\"isRowClickable()\"\r\n [class.bg-surface-100]=\"\r\n tableStyleConfig()?.striped &&\r\n (item.rowIndex ?? 0) % 2 === 1\r\n \"\r\n (click)=\"onRowClick(item.row)\"\r\n >\r\n @if (!tableStyleConfig()?.hideIndex && showIndex()) {\r\n <td\r\n class=\"px-3 py-2 text-center border-b border-surface-100\"\r\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.tdFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\r\n >\r\n {{ (item.rowIndex ?? 0) + 1 }}\r\n </td>\r\n }\r\n\r\n @for (column of visibleColumns(); track column.key) {\r\n <td\r\n class=\"px-3 py-2 border-b border-surface-100\"\r\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.tdFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\r\n >\r\n @if (isPhaseGateColumn(column)) {\r\n @let phaseCell = getPhaseGateCell(item.row, column);\r\n <div\r\n class=\"min-w-36\"\r\n [title]=\"getPhaseGateCellTooltip(phaseCell)\"\r\n >\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\r\n [style.backgroundColor]=\"\r\n getPhaseGateCellColor(phaseCell)\r\n \"\r\n ></span>\r\n <span class=\"font-medium truncate\">\r\n {{ getPhaseGateCellText(phaseCell) }}\r\n </span>\r\n </div>\r\n @if (getPhaseGatePercentage(phaseCell) !== null) {\r\n <div\r\n class=\"mt-1 h-1.5 overflow-hidden rounded-full bg-surface-200\"\r\n >\r\n <div\r\n class=\"h-full rounded-full\"\r\n [style.width.%]=\"\r\n getPhaseGatePercentage(phaseCell)\r\n \"\r\n [style.backgroundColor]=\"\r\n getPhaseGateCellColor(phaseCell)\r\n \"\r\n ></div>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <mt-entity-info\r\n [data]=\"getCellData(item.row, column)\"\r\n [displayType]=\"'inTable'\"\r\n [extraInfoData]=\"tableStyleConfig()\"\r\n ></mt-entity-info>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n }\r\n\r\n @if (groupedVirtualBottomSpacerHeightPx() > 0) {\r\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n [style.height.px]=\"groupedVirtualBottomSpacerHeightPx()\"\r\n ></td>\r\n </tr>\r\n }\r\n } @else {\r\n <!-- Non-Grouped Mode -->\r\n @if (flatVirtualTopSpacerHeightPx() > 0) {\r\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n [style.height.px]=\"flatVirtualTopSpacerHeightPx()\"\r\n ></td>\r\n </tr>\r\n }\r\n\r\n @for (rowView of visibleTableRows(); track rowView.trackId) {\r\n <tr\r\n class=\"dashboard-table-row hover:bg-surface-50 transition-colors\"\r\n [class.cursor-pointer]=\"isRowClickable()\"\r\n [class.bg-surface-100]=\"\r\n tableStyleConfig()?.striped && rowView.rowIndex % 2 === 1\r\n \"\r\n (click)=\"onRowClick(rowView.row)\"\r\n >\r\n @if (!tableStyleConfig()?.hideIndex && showIndex()) {\r\n <td\r\n class=\"px-3 py-2 text-center border-b border-surface-100\"\r\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.tdFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\r\n >\r\n {{ rowView.rowIndex + 1 }}\r\n </td>\r\n }\r\n\r\n @for (column of visibleColumns(); track column.key) {\r\n <td\r\n class=\"px-3 py-2 border-b border-surface-100\"\r\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.tdFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\r\n >\r\n @if (isPhaseGateColumn(column)) {\r\n @let phaseCell =\r\n getPhaseGateCell(rowView.row, column);\r\n <div\r\n class=\"min-w-36\"\r\n [title]=\"getPhaseGateCellTooltip(phaseCell)\"\r\n >\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\r\n [style.backgroundColor]=\"\r\n getPhaseGateCellColor(phaseCell)\r\n \"\r\n ></span>\r\n <span class=\"font-medium truncate\">\r\n {{ getPhaseGateCellText(phaseCell) }}\r\n </span>\r\n </div>\r\n @if (getPhaseGatePercentage(phaseCell) !== null) {\r\n <div\r\n class=\"mt-1 h-1.5 overflow-hidden rounded-full bg-surface-200\"\r\n >\r\n <div\r\n class=\"h-full rounded-full\"\r\n [style.width.%]=\"\r\n getPhaseGatePercentage(phaseCell)\r\n \"\r\n [style.backgroundColor]=\"\r\n getPhaseGateCellColor(phaseCell)\r\n \"\r\n ></div>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <mt-entity-info\r\n [data]=\"getCellData(rowView.row, column)\"\r\n [displayType]=\"'inTable'\"\r\n [extraInfoData]=\"tableStyleConfig()\"\r\n ></mt-entity-info>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n\r\n @if (flatVirtualBottomSpacerHeightPx() > 0) {\r\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n [style.height.px]=\"flatVirtualBottomSpacerHeightPx()\"\r\n ></td>\r\n </tr>\r\n }\r\n }\r\n </tbody>\r\n </table>\r\n </div>\r\n } @else {\r\n <!-- No Data -->\r\n <div\r\n class=\"flex flex-col items-center justify-center h-32 text-muted-color gap-2\"\r\n >\r\n <i class=\"pi pi-info-circle text-2xl\"></i>\r\n <span>{{ t(\"noData\") }}</span>\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n</mt-card-content>\r\n", styles: [":host{display:block;height:100%}.table-wrapper{display:flex;flex-direction:column}.table-scroll-container{flex:1;min-height:0}table{border-collapse:collapse}.dashboard-table-row{height:48px}.dashboard-table-spacer td{border:0;padding:0}th,td{text-align:start}\n"] }]
|
|
29066
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- One legend definition; the body grid places it on any configured edge. -->\n<ng-template #legendList>\n <div\n class=\"flex flex-wrap items-center gap-2\"\n [class.flex-col]=\"isSideLegend()\"\n [class.items-start]=\"isSideLegend()\"\n >\n @for (label of labels(); track label.key || $index) {\n <div class=\"flex items-center gap-1 text-xs\">\n <span\n class=\"table-legend-marker\"\n [class.shape-rect]=\"legendIconType() === 'rect'\"\n [class.shape-roundRect]=\"legendIconType() === 'roundRect'\"\n [class.shape-diamond]=\"legendIconType() === 'diamond'\"\n [class.shape-triangle]=\"legendIconType() === 'triangle'\"\n [style.backgroundColor]=\"\n legendIconType() === 'triangle' ? null : getLegendColor(label)\n \"\n [style.border-bottom-color]=\"\n legendIconType() === 'triangle' ? getLegendColor(label) : null\n \"\n ></span>\n <span>{{ getLegendText(label) }}</span>\n </div>\n }\n </div>\n</ng-template>\n\n<mt-card-content\n [inGroup]=\"inGroup()\"\n [showHeader]=\"!hideHeader()\"\n [title]=\"title()\"\n [styleConfig]=\"\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\n \"\n [cardStyleConfig]=\"\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\n \"\n [headerConfig]=\"\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\n \"\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\n (headerClick)=\"onHeaderClick()\"\n>\n <ng-container body>\n <div\n class=\"table-wrapper h-full\"\n [attr.data-legend-position]=\"legendPosition()\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n >\n @if (hasLegend()) {\n <div class=\"table-legend-host\">\n <ng-container [ngTemplateOutlet]=\"legendList\" />\n </div>\n }\n\n <div class=\"table-content\">\n @if (loading()) {\n <div class=\"flex items-center justify-center h-32\">\n <i class=\"pi pi-spin pi-spinner text-2xl\"></i>\n </div>\n } @else if (hasData()) {\n <div\n class=\"table-scroll-container overflow-auto h-full\"\n (scroll)=\"onTableScroll($event)\"\n >\n <table class=\"w-full border-collapse text-sm\">\n <thead class=\"sticky top-0 z-10\" [hidden]=\"hideSubheader()\">\n <tr>\n <!-- Index column -->\n @if (!tableStyleConfig()?.hideIndex && showIndex()) {\n <th\n class=\"px-3 py-2 text-left font-semibold bg-surface-100 border-b-2 border-surface-200\"\n [style.color]=\"tableStyleConfig()?.thTextColor\"\n [style.backgroundColor]=\"\n tableStyleConfig()?.thBackgroundColor\n \"\n [style.fontWeight]=\"\n tableStyleConfig()?.thFontBold ? 'bold' : null\n \"\n [style.fontSize.px]=\"tableStyleConfig()?.thFontSize\"\n >\n #\n </th>\n }\n\n <!-- Data columns -->\n @for (column of visibleColumns(); track column.key) {\n <th\n class=\"px-3 py-2 text-left font-semibold bg-surface-100 border-b-2 border-surface-200 whitespace-nowrap\"\n [style.minWidth]=\"column.width || 'auto'\"\n [style.color]=\"tableStyleConfig()?.thTextColor\"\n [style.backgroundColor]=\"\n tableStyleConfig()?.thBackgroundColor\n \"\n [style.fontWeight]=\"\n tableStyleConfig()?.thFontBold ? 'bold' : null\n \"\n [style.fontSize.px]=\"tableStyleConfig()?.thFontSize\"\n [class.cursor-pointer]=\"!isPhaseGateColumn(column)\"\n (click)=\"onSort(column)\"\n >\n <div class=\"flex items-center gap-2\">\n <span>{{ column.label }}</span>\n @if (column.isSort) {\n <i\n class=\"text-xs\"\n [class]=\"\n column.isAsc\n ? 'pi pi-sort-amount-up'\n : 'pi pi-sort-amount-down'\n \"\n ></i>\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n <!-- Grouped Mode -->\n @if (isGrouped()) {\n @if (groupedVirtualTopSpacerHeightPx() > 0) {\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\n <td\n [attr.colspan]=\"totalColumns()\"\n [style.height.px]=\"groupedVirtualTopSpacerHeightPx()\"\n ></td>\n </tr>\n }\n\n @for (item of visibleGroupedRows(); track item.trackId) {\n @if (item.kind === \"group\") {\n <tr class=\"dashboard-table-row\">\n <td\n [attr.colspan]=\"totalColumns()\"\n class=\"px-3 py-2 font-semibold\"\n [style.backgroundColor]=\"\n tableStyleConfig()?.groupBackgroundColor ||\n '#e4d1ac'\n \"\n [style.color]=\"tableStyleConfig()?.groupTextColor\"\n >\n <mt-entity-info\n [data]=\"{\n viewType: item.group.prop?.viewType,\n value: item.group.prop?.value,\n }\"\n [displayType]=\"'inTable'\"\n ></mt-entity-info>\n </td>\n </tr>\n } @else {\n <tr\n class=\"dashboard-table-row hover:bg-surface-50 transition-colors\"\n [class.cursor-pointer]=\"isRowClickable()\"\n [class.bg-surface-100]=\"\n tableStyleConfig()?.striped &&\n (item.rowIndex ?? 0) % 2 === 1\n \"\n (click)=\"onRowClick(item.row)\"\n >\n @if (!tableStyleConfig()?.hideIndex && showIndex()) {\n <td\n class=\"px-3 py-2 text-center border-b border-surface-100\"\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\n [style.fontWeight]=\"\n tableStyleConfig()?.tdFontBold ? 'bold' : null\n \"\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\n >\n {{ (item.rowIndex ?? 0) + 1 }}\n </td>\n }\n\n @for (column of visibleColumns(); track column.key) {\n <td\n class=\"px-3 py-2 border-b border-surface-100\"\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\n [style.fontWeight]=\"\n tableStyleConfig()?.tdFontBold ? 'bold' : null\n \"\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\n >\n @if (isPhaseGateColumn(column)) {\n @let phaseCell =\n getPhaseGateCell(item.row, column);\n <div\n class=\"min-w-36\"\n [title]=\"getPhaseGateCellTooltip(phaseCell)\"\n >\n <div class=\"flex items-center gap-2\">\n <span\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\n [style.backgroundColor]=\"\n getPhaseGateCellColor(phaseCell)\n \"\n ></span>\n <span class=\"font-medium truncate\">\n {{ getPhaseGateCellText(phaseCell) }}\n </span>\n </div>\n @if (\n getPhaseGatePercentage(phaseCell) !== null\n ) {\n <div\n class=\"mt-1 h-1.5 overflow-hidden rounded-full bg-surface-200\"\n >\n <div\n class=\"h-full rounded-full\"\n [style.width.%]=\"\n getPhaseGatePercentage(phaseCell)\n \"\n [style.backgroundColor]=\"\n getPhaseGateCellColor(phaseCell)\n \"\n ></div>\n </div>\n }\n </div>\n } @else {\n <mt-entity-info\n [data]=\"getCellData(item.row, column)\"\n [displayType]=\"'inTable'\"\n [extraInfoData]=\"tableStyleConfig()\"\n ></mt-entity-info>\n }\n </td>\n }\n </tr>\n }\n }\n\n @if (groupedVirtualBottomSpacerHeightPx() > 0) {\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\n <td\n [attr.colspan]=\"totalColumns()\"\n [style.height.px]=\"groupedVirtualBottomSpacerHeightPx()\"\n ></td>\n </tr>\n }\n } @else {\n <!-- Non-Grouped Mode -->\n @if (flatVirtualTopSpacerHeightPx() > 0) {\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\n <td\n [attr.colspan]=\"totalColumns()\"\n [style.height.px]=\"flatVirtualTopSpacerHeightPx()\"\n ></td>\n </tr>\n }\n\n @for (rowView of visibleTableRows(); track rowView.trackId) {\n <tr\n class=\"dashboard-table-row hover:bg-surface-50 transition-colors\"\n [class.cursor-pointer]=\"isRowClickable()\"\n [class.bg-surface-100]=\"\n tableStyleConfig()?.striped &&\n rowView.rowIndex % 2 === 1\n \"\n (click)=\"onRowClick(rowView.row)\"\n >\n @if (!tableStyleConfig()?.hideIndex && showIndex()) {\n <td\n class=\"px-3 py-2 text-center border-b border-surface-100\"\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\n [style.fontWeight]=\"\n tableStyleConfig()?.tdFontBold ? 'bold' : null\n \"\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\n >\n {{ rowView.rowIndex + 1 }}\n </td>\n }\n\n @for (column of visibleColumns(); track column.key) {\n <td\n class=\"px-3 py-2 border-b border-surface-100\"\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\n [style.fontWeight]=\"\n tableStyleConfig()?.tdFontBold ? 'bold' : null\n \"\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\n >\n @if (isPhaseGateColumn(column)) {\n @let phaseCell =\n getPhaseGateCell(rowView.row, column);\n <div\n class=\"min-w-36\"\n [title]=\"getPhaseGateCellTooltip(phaseCell)\"\n >\n <div class=\"flex items-center gap-2\">\n <span\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\n [style.backgroundColor]=\"\n getPhaseGateCellColor(phaseCell)\n \"\n ></span>\n <span class=\"font-medium truncate\">\n {{ getPhaseGateCellText(phaseCell) }}\n </span>\n </div>\n @if (getPhaseGatePercentage(phaseCell) !== null) {\n <div\n class=\"mt-1 h-1.5 overflow-hidden rounded-full bg-surface-200\"\n >\n <div\n class=\"h-full rounded-full\"\n [style.width.%]=\"\n getPhaseGatePercentage(phaseCell)\n \"\n [style.backgroundColor]=\"\n getPhaseGateCellColor(phaseCell)\n \"\n ></div>\n </div>\n }\n </div>\n } @else {\n <mt-entity-info\n [data]=\"getCellData(rowView.row, column)\"\n [displayType]=\"'inTable'\"\n [extraInfoData]=\"tableStyleConfig()\"\n ></mt-entity-info>\n }\n </td>\n }\n </tr>\n }\n\n @if (flatVirtualBottomSpacerHeightPx() > 0) {\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\n <td\n [attr.colspan]=\"totalColumns()\"\n [style.height.px]=\"flatVirtualBottomSpacerHeightPx()\"\n ></td>\n </tr>\n }\n }\n </tbody>\n </table>\n </div>\n } @else {\n <!-- No Data -->\n <div\n class=\"flex flex-col items-center justify-center h-32 text-muted-color gap-2\"\n >\n <i class=\"pi pi-info-circle text-2xl\"></i>\n <span>{{ t(\"noData\") }}</span>\n </div>\n }\n </div>\n </div>\n </ng-container>\n</mt-card-content>\n", styles: [":host{display:block;height:100%}.table-wrapper{display:grid;grid-template-areas:\"legend\" \"content\";grid-template-rows:auto minmax(0,1fr);min-height:0}.table-wrapper[data-legend-position=bottom]{grid-template-areas:\"content\" \"legend\";grid-template-rows:minmax(0,1fr) auto}.table-wrapper[data-legend-position=left]{grid-template-areas:\"legend content\";grid-template-columns:auto minmax(0,1fr);grid-template-rows:minmax(0,1fr)}.table-wrapper[data-legend-position=right]{grid-template-areas:\"content legend\";grid-template-columns:minmax(0,1fr) auto;grid-template-rows:minmax(0,1fr)}.table-content{grid-area:content;min-height:0;min-width:0;display:flex;flex-direction:column}.table-legend-host{grid-area:legend;min-width:0;padding:.25rem .5rem}.table-wrapper[data-legend-position=left] .table-legend-host,.table-wrapper[data-legend-position=right] .table-legend-host{max-width:12rem;overflow:auto}.table-legend-marker{display:inline-block;width:.625rem;height:.625rem;flex:0 0 auto;border-radius:999px}.table-legend-marker.shape-rect{border-radius:0}.table-legend-marker.shape-roundRect{border-radius:.2rem}.table-legend-marker.shape-diamond{border-radius:.0625rem;transform:rotate(45deg)}.table-legend-marker.shape-triangle{width:0;height:0;background:transparent!important;border-radius:0;border-left:.34rem solid transparent;border-right:.34rem solid transparent;border-bottom-width:.6rem;border-bottom-style:solid}.table-scroll-container{flex:1;min-height:0}table{border-collapse:collapse}.dashboard-table-row{height:48px}.dashboard-table-spacer td{border:0;padding:0}th,td{text-align:start}\n"] }]
|
|
28702
29067
|
}], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }], inGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "inGroup", required: false }] }], hideHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideHeader", required: false }] }], onAction: [{ type: i0.Output, args: ["onAction"] }] } });
|
|
28703
29068
|
|
|
28704
29069
|
/**
|
|
@@ -28707,6 +29072,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
28707
29072
|
* Displays a single statistic value with title and optional icon.
|
|
28708
29073
|
* Matches old app-statistic-card behavior with Tailwind 4 styling.
|
|
28709
29074
|
*/
|
|
29075
|
+
function resolveStatisticIconPlacement(configurationItem) {
|
|
29076
|
+
const placement = configurationItem?.clientConfig?.configAsType?.['headerCardConfig']
|
|
29077
|
+
?.iconPlacement;
|
|
29078
|
+
return placement === 'end' || placement === 'top' ? placement : 'start';
|
|
29079
|
+
}
|
|
28710
29080
|
class StatisticCardComponent {
|
|
28711
29081
|
/** Card config (same as old component) */
|
|
28712
29082
|
config = input(null, ...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
|
|
@@ -28728,6 +29098,8 @@ class StatisticCardComponent {
|
|
|
28728
29098
|
/** Language code */
|
|
28729
29099
|
languageCode = computed(() => localStorage.getItem('langCode') || 'en', ...(ngDevMode ? [{ debugName: "languageCode" }] : /* istanbul ignore next */ []));
|
|
28730
29100
|
isArabic = computed(() => this.languageCode() === 'ar', ...(ngDevMode ? [{ debugName: "isArabic" }] : /* istanbul ignore next */ []));
|
|
29101
|
+
/** Position of the statistic icon inside the card body. */
|
|
29102
|
+
iconPlacement = computed(() => resolveStatisticIconPlacement(this.configurationItem()), ...(ngDevMode ? [{ debugName: "iconPlacement" }] : /* istanbul ignore next */ []));
|
|
28731
29103
|
/** Show card info icon */
|
|
28732
29104
|
showCardInfo = computed(() => {
|
|
28733
29105
|
const cardInfo = this.configurationItem()?.clientConfig?.['cardInfo'];
|
|
@@ -28908,11 +29280,11 @@ class StatisticCardComponent {
|
|
|
28908
29280
|
return this.iconByShortName.get(normalized) || this.fallbackIcon;
|
|
28909
29281
|
}
|
|
28910
29282
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: StatisticCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
28911
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: StatisticCardComponent, isStandalone: true, selector: "mt-statistic-card", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, styleConfig: { classPropertyName: "styleConfig", publicName: "styleConfig", isSignal: true, isRequired: false, transformFunction: null }, configurationItem: { classPropertyName: "configurationItem", publicName: "configurationItem", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cardClick: "cardClick" }, ngImport: i0, template: "<div\
|
|
29283
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: StatisticCardComponent, isStandalone: true, selector: "mt-statistic-card", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, styleConfig: { classPropertyName: "styleConfig", publicName: "styleConfig", isSignal: true, isRequired: false, transformFunction: null }, configurationItem: { classPropertyName: "configurationItem", publicName: "configurationItem", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cardClick: "cardClick" }, ngImport: i0, template: "<div\n class=\"relative flex h-full w-full flex-col rounded-lg bg-white shadow-sm transition-all duration-150\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n [class.cursor-pointer]=\"config()?.isClickable\"\n [class.hover:shadow-md]=\"config()?.isClickable\"\n [class.hover:-translate-y-0.5]=\"config()?.isClickable\"\n [ngStyle]=\"cardStyles()\"\n (click)=\"onClick()\"\n>\n <!-- Card Info Icon (top right corner) -->\n @if (showCardInfo()) {\n <div\n class=\"absolute right-2 top-2 cursor-pointer text-gray-400 hover:text-gray-600\"\n [pTooltip]=\"cardInfoTooltip()\"\n tooltipPosition=\"top\"\n >\n <mt-icon icon=\"general.info-circle\" class=\"text-xl\" />\n </div>\n }\n\n <!-- Card body -->\n <div\n class=\"flex flex-1 items-center gap-3 px-4 py-5\"\n [class.flex-col]=\"iconPlacement() === 'top'\"\n [class.items-start]=\"iconPlacement() === 'top'\"\n [attr.data-icon-placement]=\"iconPlacement()\"\n [ngStyle]=\"borderTopStyle()\"\n >\n <!-- Icon -->\n @if (config()?.icon) {\n <div\n class=\"flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-lg\"\n [class.order-2]=\"iconPlacement() === 'end'\"\n [ngStyle]=\"iconStyles()\"\n >\n <mt-icon [icon]=\"resolveIcon(config()?.icon)\" class=\"text-xl\" />\n </div>\n }\n\n <!-- Content -->\n <div\n class=\"order-1 min-w-0 flex-1\"\n [class.w-full]=\"iconPlacement() === 'top'\"\n [class.px-2]=\"!config()?.icon\"\n >\n <div class=\"flex items-start justify-between\">\n <p class=\"mb-0 flex-grow\">\n <strong\n class=\"text-2xl font-bold leading-tight\"\n [ngStyle]=\"valueStyles()\"\n [pTooltip]=\"tooltipValue()\"\n tooltipPosition=\"top\"\n [innerHTML]=\"config()?.value ?? '-'\"\n ></strong>\n </p>\n </div>\n @if (!isHeaderHidden()) {\n <p\n class=\"mb-0 mt-1 text-sm text-gray-600\"\n [class.text-center]=\"isHeaderCentered()\"\n [ngStyle]=\"titleStyles()\"\n >\n {{ config()?.title }}\n </p>\n }\n @if (config()?.subTitle) {\n <p\n class=\"mb-0 mt-0.5 text-xs text-gray-400\"\n [ngStyle]=\"subtitleStyles()\"\n >\n {{ config()?.subTitle }}\n </p>\n }\n </div>\n\n <!-- Extra data (phone/email) if present -->\n @if (config()?.data) {\n <div class=\"order-3 text-sm\">\n <div class=\"flex items-center gap-2\">\n <mt-icon icon=\"communication.phone\" class=\"text-base text-gray-500\" />\n <strong>{{ t(\"phone\") }} : </strong>\n <span>{{ config()?.data?.phone ?? \"-\" }}</span>\n </div>\n <div class=\"mt-2 flex items-center gap-2\">\n <mt-icon\n icon=\"communication.mail-01\"\n class=\"text-base text-gray-500\"\n />\n <strong>{{ t(\"email\") }} : </strong>\n <span>{{ config()?.data?.email ?? \"-\" }}</span>\n </div>\n </div>\n }\n </div>\n\n <!-- Hover cards (popHover) -->\n @if (config()?.popHover?.length) {\n <div\n class=\"flex cursor-pointer items-center justify-between gap-4 border-t px-4 py-4\"\n >\n @for (card of config()?.popHover; track $index) {\n <div class=\"text-center\">\n <div class=\"flex justify-center\">\n <img\n [src]=\"pathImages + card?.icon + '.svg'\"\n class=\"mx-2 h-10 w-10\"\n [alt]=\"card?.title\"\n />\n </div>\n <p class=\"mb-0 text-xs text-gray-500\">{{ card?.title }}</p>\n <p class=\"mb-0 font-semibold\">{{ card?.value }}</p>\n </div>\n }\n </div>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2$1.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"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
28912
29284
|
}
|
|
28913
29285
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: StatisticCardComponent, decorators: [{
|
|
28914
29286
|
type: Component,
|
|
28915
|
-
args: [{ selector: 'mt-statistic-card', standalone: true, imports: [CommonModule, TranslocoDirective, TooltipModule, Icon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\
|
|
29287
|
+
args: [{ selector: 'mt-statistic-card', standalone: true, imports: [CommonModule, TranslocoDirective, TooltipModule, Icon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"relative flex h-full w-full flex-col rounded-lg bg-white shadow-sm transition-all duration-150\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n [class.cursor-pointer]=\"config()?.isClickable\"\n [class.hover:shadow-md]=\"config()?.isClickable\"\n [class.hover:-translate-y-0.5]=\"config()?.isClickable\"\n [ngStyle]=\"cardStyles()\"\n (click)=\"onClick()\"\n>\n <!-- Card Info Icon (top right corner) -->\n @if (showCardInfo()) {\n <div\n class=\"absolute right-2 top-2 cursor-pointer text-gray-400 hover:text-gray-600\"\n [pTooltip]=\"cardInfoTooltip()\"\n tooltipPosition=\"top\"\n >\n <mt-icon icon=\"general.info-circle\" class=\"text-xl\" />\n </div>\n }\n\n <!-- Card body -->\n <div\n class=\"flex flex-1 items-center gap-3 px-4 py-5\"\n [class.flex-col]=\"iconPlacement() === 'top'\"\n [class.items-start]=\"iconPlacement() === 'top'\"\n [attr.data-icon-placement]=\"iconPlacement()\"\n [ngStyle]=\"borderTopStyle()\"\n >\n <!-- Icon -->\n @if (config()?.icon) {\n <div\n class=\"flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-lg\"\n [class.order-2]=\"iconPlacement() === 'end'\"\n [ngStyle]=\"iconStyles()\"\n >\n <mt-icon [icon]=\"resolveIcon(config()?.icon)\" class=\"text-xl\" />\n </div>\n }\n\n <!-- Content -->\n <div\n class=\"order-1 min-w-0 flex-1\"\n [class.w-full]=\"iconPlacement() === 'top'\"\n [class.px-2]=\"!config()?.icon\"\n >\n <div class=\"flex items-start justify-between\">\n <p class=\"mb-0 flex-grow\">\n <strong\n class=\"text-2xl font-bold leading-tight\"\n [ngStyle]=\"valueStyles()\"\n [pTooltip]=\"tooltipValue()\"\n tooltipPosition=\"top\"\n [innerHTML]=\"config()?.value ?? '-'\"\n ></strong>\n </p>\n </div>\n @if (!isHeaderHidden()) {\n <p\n class=\"mb-0 mt-1 text-sm text-gray-600\"\n [class.text-center]=\"isHeaderCentered()\"\n [ngStyle]=\"titleStyles()\"\n >\n {{ config()?.title }}\n </p>\n }\n @if (config()?.subTitle) {\n <p\n class=\"mb-0 mt-0.5 text-xs text-gray-400\"\n [ngStyle]=\"subtitleStyles()\"\n >\n {{ config()?.subTitle }}\n </p>\n }\n </div>\n\n <!-- Extra data (phone/email) if present -->\n @if (config()?.data) {\n <div class=\"order-3 text-sm\">\n <div class=\"flex items-center gap-2\">\n <mt-icon icon=\"communication.phone\" class=\"text-base text-gray-500\" />\n <strong>{{ t(\"phone\") }} : </strong>\n <span>{{ config()?.data?.phone ?? \"-\" }}</span>\n </div>\n <div class=\"mt-2 flex items-center gap-2\">\n <mt-icon\n icon=\"communication.mail-01\"\n class=\"text-base text-gray-500\"\n />\n <strong>{{ t(\"email\") }} : </strong>\n <span>{{ config()?.data?.email ?? \"-\" }}</span>\n </div>\n </div>\n }\n </div>\n\n <!-- Hover cards (popHover) -->\n @if (config()?.popHover?.length) {\n <div\n class=\"flex cursor-pointer items-center justify-between gap-4 border-t px-4 py-4\"\n >\n @for (card of config()?.popHover; track $index) {\n <div class=\"text-center\">\n <div class=\"flex justify-center\">\n <img\n [src]=\"pathImages + card?.icon + '.svg'\"\n class=\"mx-2 h-10 w-10\"\n [alt]=\"card?.title\"\n />\n </div>\n <p class=\"mb-0 text-xs text-gray-500\">{{ card?.title }}</p>\n <p class=\"mb-0 font-semibold\">{{ card?.value }}</p>\n </div>\n }\n </div>\n }\n</div>\n" }]
|
|
28916
29288
|
}], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], styleConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleConfig", required: false }] }], configurationItem: [{ type: i0.Input, args: [{ isSignal: true, alias: "configurationItem", required: false }] }], cardClick: [{ type: i0.Output, args: ["cardClick"] }] } });
|
|
28917
29289
|
|
|
28918
29290
|
/**
|
|
@@ -28974,11 +29346,11 @@ class ListStatisticCardComponent {
|
|
|
28974
29346
|
this.onAction.emit({ type, data: body });
|
|
28975
29347
|
}
|
|
28976
29348
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ListStatisticCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
28977
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: ListStatisticCardComponent, isStandalone: true, selector: "mt-list-statistic-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onAction: "onAction" }, ngImport: i0, template: "<div class=\"flex h-full w-full justify-between\">\
|
|
29349
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: ListStatisticCardComponent, isStandalone: true, selector: "mt-list-statistic-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onAction: "onAction" }, ngImport: i0, template: "<div class=\"flex h-full w-full justify-between\">\n <mt-statistic-card\n [config]=\"dataHandled()\"\n [style.width]=\"dataHandled()?.width\"\n [styleConfig]=\"styleConfig()\"\n [configurationItem]=\"configurationItem()\"\n (cardClick)=\"doActions($event, 'click')\"\n />\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: StatisticCardComponent, selector: "mt-statistic-card", inputs: ["config", "styleConfig", "configurationItem"], outputs: ["cardClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
28978
29350
|
}
|
|
28979
29351
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ListStatisticCardComponent, decorators: [{
|
|
28980
29352
|
type: Component,
|
|
28981
|
-
args: [{ selector: 'mt-list-statistic-card', standalone: true, imports: [CommonModule, StatisticCardComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex h-full w-full justify-between\">\
|
|
29353
|
+
args: [{ selector: 'mt-list-statistic-card', standalone: true, imports: [CommonModule, StatisticCardComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex h-full w-full justify-between\">\n <mt-statistic-card\n [config]=\"dataHandled()\"\n [style.width]=\"dataHandled()?.width\"\n [styleConfig]=\"styleConfig()\"\n [configurationItem]=\"configurationItem()\"\n (cardClick)=\"doActions($event, 'click')\"\n />\n</div>\n" }]
|
|
28982
29354
|
}], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }], onAction: [{ type: i0.Output, args: ["onAction"] }] } });
|
|
28983
29355
|
|
|
28984
29356
|
/**
|
|
@@ -29354,34 +29726,34 @@ class SkeletonCardComponent {
|
|
|
29354
29726
|
}
|
|
29355
29727
|
}
|
|
29356
29728
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SkeletonCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
29357
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SkeletonCardComponent, isStandalone: true, selector: "mt-skeleton-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
29358
|
-
<div class="skeleton-container">
|
|
29359
|
-
@for (skeleton of skeletons(); track $index) {
|
|
29360
|
-
<div
|
|
29361
|
-
class="skeleton-item"
|
|
29362
|
-
[style.width]="skeleton.width"
|
|
29363
|
-
[style.height]="skeleton.height"
|
|
29364
|
-
>
|
|
29365
|
-
<div class="skeleton-animation"></div>
|
|
29366
|
-
</div>
|
|
29367
|
-
}
|
|
29368
|
-
</div>
|
|
29729
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SkeletonCardComponent, isStandalone: true, selector: "mt-skeleton-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
29730
|
+
<div class="skeleton-container">
|
|
29731
|
+
@for (skeleton of skeletons(); track $index) {
|
|
29732
|
+
<div
|
|
29733
|
+
class="skeleton-item"
|
|
29734
|
+
[style.width]="skeleton.width"
|
|
29735
|
+
[style.height]="skeleton.height"
|
|
29736
|
+
>
|
|
29737
|
+
<div class="skeleton-animation"></div>
|
|
29738
|
+
</div>
|
|
29739
|
+
}
|
|
29740
|
+
</div>
|
|
29369
29741
|
`, isInline: true, styles: [".skeleton-container{display:flex;flex-wrap:wrap;gap:1rem;width:100%;padding:1rem}.skeleton-item{background:#f5f5f5;border-radius:.5rem;overflow:hidden;position:relative}.skeleton-animation{position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.4),transparent);animation:shimmer 1.5s infinite}@keyframes shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
29370
29742
|
}
|
|
29371
29743
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SkeletonCardComponent, decorators: [{
|
|
29372
29744
|
type: Component,
|
|
29373
|
-
args: [{ selector: 'mt-skeleton-card', standalone: true, imports: [CommonModule], template: `
|
|
29374
|
-
<div class="skeleton-container">
|
|
29375
|
-
@for (skeleton of skeletons(); track $index) {
|
|
29376
|
-
<div
|
|
29377
|
-
class="skeleton-item"
|
|
29378
|
-
[style.width]="skeleton.width"
|
|
29379
|
-
[style.height]="skeleton.height"
|
|
29380
|
-
>
|
|
29381
|
-
<div class="skeleton-animation"></div>
|
|
29382
|
-
</div>
|
|
29383
|
-
}
|
|
29384
|
-
</div>
|
|
29745
|
+
args: [{ selector: 'mt-skeleton-card', standalone: true, imports: [CommonModule], template: `
|
|
29746
|
+
<div class="skeleton-container">
|
|
29747
|
+
@for (skeleton of skeletons(); track $index) {
|
|
29748
|
+
<div
|
|
29749
|
+
class="skeleton-item"
|
|
29750
|
+
[style.width]="skeleton.width"
|
|
29751
|
+
[style.height]="skeleton.height"
|
|
29752
|
+
>
|
|
29753
|
+
<div class="skeleton-animation"></div>
|
|
29754
|
+
</div>
|
|
29755
|
+
}
|
|
29756
|
+
</div>
|
|
29385
29757
|
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".skeleton-container{display:flex;flex-wrap:wrap;gap:1rem;width:100%;padding:1rem}.skeleton-item{background:#f5f5f5;border-radius:.5rem;overflow:hidden;position:relative}.skeleton-animation{position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.4),transparent);animation:shimmer 1.5s infinite}@keyframes shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}\n"] }]
|
|
29386
29758
|
}], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }] } });
|
|
29387
29759
|
|
|
@@ -31202,12 +31574,6 @@ class DashboardItem {
|
|
|
31202
31574
|
return;
|
|
31203
31575
|
}
|
|
31204
31576
|
const filters = this.buildRequestFilters(dashboardId);
|
|
31205
|
-
console.log(`[DashboardItem] Request filters ready:\n${JSON.stringify({
|
|
31206
|
-
dashboardId,
|
|
31207
|
-
reportId: this.reportId(),
|
|
31208
|
-
receivedExtraFilters: this.extraFilters() ?? {},
|
|
31209
|
-
mergedFilters: filters,
|
|
31210
|
-
}, null, 2)}`);
|
|
31211
31577
|
this.dataRequestSubscription = this.chartDataService
|
|
31212
31578
|
.fetchChartData(config, filters, this.reportId())
|
|
31213
31579
|
.pipe(catchError((error) => {
|
|
@@ -33152,7 +33518,12 @@ class StyleStudioDrawer {
|
|
|
33152
33518
|
};
|
|
33153
33519
|
}, ...(ngDevMode ? [{ debugName: "previewConfig" }] : /* istanbul ignore next */ []));
|
|
33154
33520
|
/** Chart-type id handed to the live ChartViewer (renders ALL widget types). */
|
|
33155
|
-
previewChartTypeId = computed(() =>
|
|
33521
|
+
previewChartTypeId = computed(() => {
|
|
33522
|
+
const item = this.item();
|
|
33523
|
+
const chartTypeId = String(item?.chartTypeId ?? '').trim();
|
|
33524
|
+
return (chartTypeId ||
|
|
33525
|
+
String(item?.config.clientConfig.componentName ?? '').trim());
|
|
33526
|
+
}, ...(ngDevMode ? [{ debugName: "previewChartTypeId" }] : /* istanbul ignore next */ []));
|
|
33156
33527
|
previewTitle = computed(() => {
|
|
33157
33528
|
const title = this.itemConfig()?.clientConfig?.title;
|
|
33158
33529
|
const langCode = this.dashboardStore.languageCode() || this.transloco.getActiveLang();
|
|
@@ -34033,7 +34404,7 @@ class SourceLinkConfiguration {
|
|
|
34033
34404
|
useExisting: forwardRef(() => SourceLinkConfiguration),
|
|
34034
34405
|
multi: true,
|
|
34035
34406
|
},
|
|
34036
|
-
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <mt-card [title]=\"t('sourceLinks')\">\r\n <ng-template #cardEnd>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n (onClick)=\"addSourceLink()\"\r\n [disabled]=\"disabled\"\r\n [pTooltip]=\"t('addSourceLink')\"\r\n />\r\n </ng-template>\r\n\r\n <div class=\"flex flex-col gap-4\" [formGroup]=\"sourceLinksForm\">\r\n <div formArrayName=\"sourceLinks\">\r\n @for (\r\n link of sourceLinksArray.controls;\r\n track trackByIndex(i);\r\n let i = $index;\r\n let first = $first\r\n ) {\r\n <div\r\n class=\"p-4 rounded-lg border transition-all mb-4 last:mb-0\"\r\n [class.border-red-500]=\"link.invalid\"\r\n [class.border-surface-200]=\"!link.invalid\"\r\n [formGroupName]=\"i\"\r\n >\r\n <!-- Link Header with Type Tabs -->\r\n <div class=\"flex items-center justify-between mb-4\">\r\n <div class=\"flex items-center gap-3\">\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\r\n <!-- Link Type Tabs (only show for non-first links) -->\r\n @if (!first) {\r\n <mt-tabs\r\n [active]=\"getLinkType(i)\"\r\n (activeChange)=\"onLinkTypeChange(i, $event)\"\r\n [options]=\"getLinkTypeOptions(i)\"\r\n size=\"small\"\r\n />\r\n } @else {\r\n <span class=\"text-sm font-medium text-muted-color\">\r\n {{ t(\"selectionToSelection\") }}\r\n </span>\r\n }\r\n </div>\r\n\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [text]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"removeSourceLink(i)\"\r\n />\r\n </div>\r\n\r\n <!-- Source Selections based on link type -->\r\n @if (getLinkType(i) === \"selection\") {\r\n <!-- Selection to Selection Mode -->\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\r\n <!-- Source 1 Selection -->\r\n <mt-select-field\r\n [label]=\"t('source1')\"\r\n formControlName=\"source1SelectionId\"\r\n [options]=\"selectionOptions()\"\r\n optionLabel=\"displayName\"\r\n optionValue=\"selectionId\"\r\n [placeholder]=\"t('selectSource')\"\r\n (ngModelChange)=\"onSourceChange(i)\"\r\n />\r\n\r\n <!-- Source 2 Selection -->\r\n <mt-select-field\r\n [label]=\"t('source2')\"\r\n formControlName=\"source2SelectionId\"\r\n [options]=\"selectionOptions()\"\r\n optionLabel=\"displayName\"\r\n optionValue=\"selectionId\"\r\n [placeholder]=\"t('selectSource')\"\r\n (ngModelChange)=\"onSourceChange(i)\"\r\n />\r\n </div>\r\n } @else {\r\n <!-- Chained Mode: Previous Link to Selection -->\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\r\n <!-- Source Link (previous link) -->\r\n <mt-select-field\r\n [label]=\"t('previousLink')\"\r\n formControlName=\"sourceLinkId\"\r\n [options]=\"getAvailableSourceLinks(i)\"\r\n optionLabel=\"displayName\"\r\n optionValue=\"index\"\r\n [placeholder]=\"t('selectPreviousLink')\"\r\n (ngModelChange)=\"onSourceChange(i)\"\r\n />\r\n\r\n <!-- Source 2 Selection -->\r\n <mt-select-field\r\n [label]=\"t('source2')\"\r\n formControlName=\"source2SelectionId\"\r\n [options]=\"selectionOptions()\"\r\n optionLabel=\"displayName\"\r\n optionValue=\"selectionId\"\r\n [placeholder]=\"t('selectSource')\"\r\n (ngModelChange)=\"onSourceChange(i)\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Link Properties -->\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\r\n <!-- Source 1 Property -->\r\n <mt-select-field\r\n [label]=\"t('source1LinkProperty')\"\r\n formControlName=\"source1PropertyKey\"\r\n [options]=\"getSource1PropertiesGrouped(i)\"\r\n [group]=\"true\"\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 <!-- Source 2 Property -->\r\n <mt-select-field\r\n [label]=\"t('source2LinkProperty')\"\r\n formControlName=\"source2PropertyKey\"\r\n [options]=\"getSource2PropertiesGrouped(i)\"\r\n [group]=\"true\"\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 <!-- Join Options -->\r\n <div class=\"flex items-center gap-6\">\r\n <mt-toggle-field\r\n [label]=\"t('isLeftJoin')\"\r\n formControlName=\"isLeftJoin\"\r\n />\r\n <mt-toggle-field\r\n [label]=\"t('isFilterLinkage')\"\r\n formControlName=\"isFilterLinkage\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (sourceLinksArray.length === 0) {\r\n <div class=\"text-center py-8 text-muted-color\">\r\n <i class=\"mti mti-link-01 text-3xl mb-2 block\"></i>\r\n <p class=\"mb-2\">{{ t(\"noSourceLinksConfigured\") }}</p>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addSourceLink')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addSourceLink()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </mt-card>\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"], 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: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { 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 });
|
|
34407
|
+
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <mt-card [title]=\"t('sourceLinks')\">\n <ng-template #cardEnd>\n <mt-button\n icon=\"general.plus\"\n [outlined]=\"true\"\n size=\"small\"\n (onClick)=\"addSourceLink()\"\n [disabled]=\"disabled\"\n [pTooltip]=\"t('addSourceLink')\"\n />\n </ng-template>\n\n <div class=\"flex flex-col gap-4\" [formGroup]=\"sourceLinksForm\">\n <div formArrayName=\"sourceLinks\">\n @for (\n link of sourceLinksArray.controls;\n track trackByIndex(i);\n let i = $index;\n let first = $first\n ) {\n <div\n class=\"p-4 rounded-lg border transition-all mb-4 last:mb-0\"\n [class.border-red-500]=\"link.invalid\"\n [class.border-surface-200]=\"!link.invalid\"\n [formGroupName]=\"i\"\n >\n <!-- Link Header with Type Tabs -->\n <div class=\"flex items-center justify-between mb-4\">\n <div class=\"flex items-center gap-3\">\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\n <!-- Link Type Tabs (only show for non-first links) -->\n @if (!first) {\n <mt-tabs\n [active]=\"getLinkType(i)\"\n (activeChange)=\"onLinkTypeChange(i, $event)\"\n [options]=\"getLinkTypeOptions(i)\"\n size=\"small\"\n />\n } @else {\n <span class=\"text-sm font-medium text-muted-color\">\n {{ t(\"selectionToSelection\") }}\n </span>\n }\n </div>\n\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n [text]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"removeSourceLink(i)\"\n />\n </div>\n\n <!-- Source Selections based on link type -->\n @if (getLinkType(i) === \"selection\") {\n <!-- Selection to Selection Mode -->\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <!-- Source 1 Selection -->\n <mt-select-field\n [label]=\"t('source1')\"\n formControlName=\"source1SelectionId\"\n [options]=\"selectionOptions()\"\n optionLabel=\"displayName\"\n optionValue=\"selectionId\"\n [placeholder]=\"t('selectSource')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n\n <!-- Source 2 Selection -->\n <mt-select-field\n [label]=\"t('source2')\"\n formControlName=\"source2SelectionId\"\n [options]=\"selectionOptions()\"\n optionLabel=\"displayName\"\n optionValue=\"selectionId\"\n [placeholder]=\"t('selectSource')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n </div>\n } @else {\n <!-- Chained Mode: Previous Link to Selection -->\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <!-- Source Link (previous link) -->\n <mt-select-field\n [label]=\"t('previousLink')\"\n formControlName=\"sourceLinkId\"\n [options]=\"getAvailableSourceLinks(i)\"\n optionLabel=\"displayName\"\n optionValue=\"index\"\n [placeholder]=\"t('selectPreviousLink')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n\n <!-- Source 2 Selection -->\n <mt-select-field\n [label]=\"t('source2')\"\n formControlName=\"source2SelectionId\"\n [options]=\"selectionOptions()\"\n optionLabel=\"displayName\"\n optionValue=\"selectionId\"\n [placeholder]=\"t('selectSource')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n </div>\n }\n\n <!-- Link Properties -->\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <!-- Source 1 Property -->\n <mt-select-field\n [label]=\"t('source1LinkProperty')\"\n formControlName=\"source1PropertyKey\"\n [options]=\"getSource1PropertiesGrouped(i)\"\n [group]=\"true\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n\n <!-- Source 2 Property -->\n <mt-select-field\n [label]=\"t('source2LinkProperty')\"\n formControlName=\"source2PropertyKey\"\n [options]=\"getSource2PropertiesGrouped(i)\"\n [group]=\"true\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n </div>\n\n <!-- Join Options -->\n <div class=\"flex items-center gap-6\">\n <mt-toggle-field\n [label]=\"t('isLeftJoin')\"\n formControlName=\"isLeftJoin\"\n />\n <mt-toggle-field\n [label]=\"t('isFilterLinkage')\"\n formControlName=\"isFilterLinkage\"\n />\n </div>\n </div>\n }\n </div>\n\n @if (sourceLinksArray.length === 0) {\n <div class=\"text-center py-8 text-muted-color\">\n <i class=\"mti mti-link-01 text-3xl mb-2 block\"></i>\n <p class=\"mb-2\">{{ t(\"noSourceLinksConfigured\") }}</p>\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addSourceLink')\"\n severity=\"secondary\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addSourceLink()\"\n />\n </div>\n }\n </div>\n </mt-card>\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"], 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: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { 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 });
|
|
34037
34408
|
}
|
|
34038
34409
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SourceLinkConfiguration, decorators: [{
|
|
34039
34410
|
type: Component,
|
|
@@ -34059,7 +34430,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
34059
34430
|
useExisting: forwardRef(() => SourceLinkConfiguration),
|
|
34060
34431
|
multi: true,
|
|
34061
34432
|
},
|
|
34062
|
-
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
34433
|
+
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <mt-card [title]=\"t('sourceLinks')\">\n <ng-template #cardEnd>\n <mt-button\n icon=\"general.plus\"\n [outlined]=\"true\"\n size=\"small\"\n (onClick)=\"addSourceLink()\"\n [disabled]=\"disabled\"\n [pTooltip]=\"t('addSourceLink')\"\n />\n </ng-template>\n\n <div class=\"flex flex-col gap-4\" [formGroup]=\"sourceLinksForm\">\n <div formArrayName=\"sourceLinks\">\n @for (\n link of sourceLinksArray.controls;\n track trackByIndex(i);\n let i = $index;\n let first = $first\n ) {\n <div\n class=\"p-4 rounded-lg border transition-all mb-4 last:mb-0\"\n [class.border-red-500]=\"link.invalid\"\n [class.border-surface-200]=\"!link.invalid\"\n [formGroupName]=\"i\"\n >\n <!-- Link Header with Type Tabs -->\n <div class=\"flex items-center justify-between mb-4\">\n <div class=\"flex items-center gap-3\">\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\n <!-- Link Type Tabs (only show for non-first links) -->\n @if (!first) {\n <mt-tabs\n [active]=\"getLinkType(i)\"\n (activeChange)=\"onLinkTypeChange(i, $event)\"\n [options]=\"getLinkTypeOptions(i)\"\n size=\"small\"\n />\n } @else {\n <span class=\"text-sm font-medium text-muted-color\">\n {{ t(\"selectionToSelection\") }}\n </span>\n }\n </div>\n\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n [text]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"removeSourceLink(i)\"\n />\n </div>\n\n <!-- Source Selections based on link type -->\n @if (getLinkType(i) === \"selection\") {\n <!-- Selection to Selection Mode -->\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <!-- Source 1 Selection -->\n <mt-select-field\n [label]=\"t('source1')\"\n formControlName=\"source1SelectionId\"\n [options]=\"selectionOptions()\"\n optionLabel=\"displayName\"\n optionValue=\"selectionId\"\n [placeholder]=\"t('selectSource')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n\n <!-- Source 2 Selection -->\n <mt-select-field\n [label]=\"t('source2')\"\n formControlName=\"source2SelectionId\"\n [options]=\"selectionOptions()\"\n optionLabel=\"displayName\"\n optionValue=\"selectionId\"\n [placeholder]=\"t('selectSource')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n </div>\n } @else {\n <!-- Chained Mode: Previous Link to Selection -->\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <!-- Source Link (previous link) -->\n <mt-select-field\n [label]=\"t('previousLink')\"\n formControlName=\"sourceLinkId\"\n [options]=\"getAvailableSourceLinks(i)\"\n optionLabel=\"displayName\"\n optionValue=\"index\"\n [placeholder]=\"t('selectPreviousLink')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n\n <!-- Source 2 Selection -->\n <mt-select-field\n [label]=\"t('source2')\"\n formControlName=\"source2SelectionId\"\n [options]=\"selectionOptions()\"\n optionLabel=\"displayName\"\n optionValue=\"selectionId\"\n [placeholder]=\"t('selectSource')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n </div>\n }\n\n <!-- Link Properties -->\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <!-- Source 1 Property -->\n <mt-select-field\n [label]=\"t('source1LinkProperty')\"\n formControlName=\"source1PropertyKey\"\n [options]=\"getSource1PropertiesGrouped(i)\"\n [group]=\"true\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n\n <!-- Source 2 Property -->\n <mt-select-field\n [label]=\"t('source2LinkProperty')\"\n formControlName=\"source2PropertyKey\"\n [options]=\"getSource2PropertiesGrouped(i)\"\n [group]=\"true\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n </div>\n\n <!-- Join Options -->\n <div class=\"flex items-center gap-6\">\n <mt-toggle-field\n [label]=\"t('isLeftJoin')\"\n formControlName=\"isLeftJoin\"\n />\n <mt-toggle-field\n [label]=\"t('isFilterLinkage')\"\n formControlName=\"isFilterLinkage\"\n />\n </div>\n </div>\n }\n </div>\n\n @if (sourceLinksArray.length === 0) {\n <div class=\"text-center py-8 text-muted-color\">\n <i class=\"mti mti-link-01 text-3xl mb-2 block\"></i>\n <p class=\"mb-2\">{{ t(\"noSourceLinksConfigured\") }}</p>\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addSourceLink')\"\n severity=\"secondary\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addSourceLink()\"\n />\n </div>\n }\n </div>\n </mt-card>\n</div>\n" }]
|
|
34063
34434
|
}], ctorParameters: () => [], propDecorators: { selectionModules: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionModules", required: false }] }] } });
|
|
34064
34435
|
|
|
34065
34436
|
/**
|
|
@@ -34137,7 +34508,7 @@ class CustomApiConfiguration {
|
|
|
34137
34508
|
useExisting: forwardRef(() => CustomApiConfiguration),
|
|
34138
34509
|
multi: true,
|
|
34139
34510
|
},
|
|
34140
|
-
], ngImport: i0, template: "<mt-card\
|
|
34511
|
+
], ngImport: i0, template: "<mt-card\n [title]=\"t('customApi')\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n>\n <div class=\"flex flex-col gap-4\">\n <p class=\"text-sm text-muted-color\">\n {{ t(\"customApiDescription\") }}\n </p>\n\n <div class=\"grid grid-cols-12 gap-4\">\n <!-- HTTP Method -->\n <div class=\"col-span-3\">\n <mt-select-field\n [label]=\"t('httpMethod')\"\n [options]=\"methodOptions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [ngModel]=\"method()\"\n (ngModelChange)=\"onMethodChange($event)\"\n [disabled]=\"disabled()\"\n />\n </div>\n\n <!-- Custom API URL -->\n <div class=\"col-span-9\">\n <mt-text-field\n [label]=\"t('customApiUrl')\"\n [placeholder]=\"t('customApiUrlPlaceholder')\"\n [ngModel]=\"customApiUrl()\"\n (ngModelChange)=\"onUrlChange($event)\"\n [disabled]=\"disabled()\"\n />\n </div>\n </div>\n </div>\n</mt-card>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
34141
34512
|
}
|
|
34142
34513
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CustomApiConfiguration, decorators: [{
|
|
34143
34514
|
type: Component,
|
|
@@ -34154,7 +34525,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
34154
34525
|
useExisting: forwardRef(() => CustomApiConfiguration),
|
|
34155
34526
|
multi: true,
|
|
34156
34527
|
},
|
|
34157
|
-
], template: "<mt-card\
|
|
34528
|
+
], template: "<mt-card\n [title]=\"t('customApi')\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n>\n <div class=\"flex flex-col gap-4\">\n <p class=\"text-sm text-muted-color\">\n {{ t(\"customApiDescription\") }}\n </p>\n\n <div class=\"grid grid-cols-12 gap-4\">\n <!-- HTTP Method -->\n <div class=\"col-span-3\">\n <mt-select-field\n [label]=\"t('httpMethod')\"\n [options]=\"methodOptions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [ngModel]=\"method()\"\n (ngModelChange)=\"onMethodChange($event)\"\n [disabled]=\"disabled()\"\n />\n </div>\n\n <!-- Custom API URL -->\n <div class=\"col-span-9\">\n <mt-text-field\n [label]=\"t('customApiUrl')\"\n [placeholder]=\"t('customApiUrlPlaceholder')\"\n [ngModel]=\"customApiUrl()\"\n (ngModelChange)=\"onUrlChange($event)\"\n [disabled]=\"disabled()\"\n />\n </div>\n </div>\n </div>\n</mt-card>\n" }]
|
|
34158
34529
|
}] });
|
|
34159
34530
|
|
|
34160
34531
|
/**
|
|
@@ -34400,6 +34771,187 @@ function validateGeneralQuerySeriesRequirements(series, schema) {
|
|
|
34400
34771
|
return evaluation.satisfied ? null : { queryRequirements: evaluation };
|
|
34401
34772
|
}
|
|
34402
34773
|
|
|
34774
|
+
/**
|
|
34775
|
+
* P+4 Dashboard Builder formula contract.
|
|
34776
|
+
*
|
|
34777
|
+
* Function keys are inserted verbatim because formulas are persisted and
|
|
34778
|
+
* executed with these exact, case-sensitive names by the dashboard backend.
|
|
34779
|
+
*/
|
|
34780
|
+
const LEGACY_DASHBOARD_FUNCTIONS = [
|
|
34781
|
+
{ name: 'Count', key: 'count', hint: '' },
|
|
34782
|
+
{ name: 'Sum', key: 'sum', hint: '' },
|
|
34783
|
+
{ name: 'Average', key: 'average', hint: '' },
|
|
34784
|
+
{
|
|
34785
|
+
name: 'Count Value',
|
|
34786
|
+
key: 'countvalue',
|
|
34787
|
+
hint: 'CountValue: Counts occurrences of specific values, Usage: CountValue(status,delayed) or CountValue(status,delayed;overdelayed) ',
|
|
34788
|
+
},
|
|
34789
|
+
{
|
|
34790
|
+
name: 'Average Count',
|
|
34791
|
+
key: 'averagecount',
|
|
34792
|
+
hint: 'Calculate the percentage of specific values, Usage: AverageCount(status,delayed) or AverageCount(status,delayed;overdelayed)',
|
|
34793
|
+
},
|
|
34794
|
+
{ name: 'Mode', key: 'mode', hint: 'Most frequent value' },
|
|
34795
|
+
{ name: 'Median', key: 'median', hint: 'Middle value for numeric fields' },
|
|
34796
|
+
{ name: 'Standard Deviation', key: 'stddev', hint: '' },
|
|
34797
|
+
{ name: 'Min Max', key: 'range', hint: ' Returns the range (max - min)' },
|
|
34798
|
+
{ name: 'Max', key: 'max' },
|
|
34799
|
+
{ name: 'Min', key: 'min' },
|
|
34800
|
+
{ name: 'Abs', key: 'Abs' },
|
|
34801
|
+
{ name: 'Contains', key: 'Contains' },
|
|
34802
|
+
{ name: 'Get Days', key: 'CommonHelper.GetDays' },
|
|
34803
|
+
{ name: 'Today', key: 'CommonHelper.GetDateNow' },
|
|
34804
|
+
{ name: 'Get Month', key: 'CommonHelper.GetMonth' },
|
|
34805
|
+
{ name: 'Get Current Month', key: 'CommonHelper.GetCurrentMonth' },
|
|
34806
|
+
{ name: 'Get Year', key: 'CommonHelper.GetYear' },
|
|
34807
|
+
{ name: 'Get Current Year', key: 'CommonHelper.GetCurrentYear' },
|
|
34808
|
+
{
|
|
34809
|
+
name: 'Get Months In Duration',
|
|
34810
|
+
key: 'CommonHelper.GetMonthsInDuration',
|
|
34811
|
+
},
|
|
34812
|
+
{ name: 'Get Days For Valid Dates', key: 'GetDaysForValidDates' },
|
|
34813
|
+
{ name: 'Add Days', key: 'AddDays' },
|
|
34814
|
+
{ name: 'Remove Decimal Part', key: 'RemoveDecimalPart' },
|
|
34815
|
+
{
|
|
34816
|
+
name: 'Truncate To Two Decimal Places',
|
|
34817
|
+
key: 'TruncateToTwoDecimalPlaces',
|
|
34818
|
+
},
|
|
34819
|
+
{
|
|
34820
|
+
name: 'Add Days After End Of Month',
|
|
34821
|
+
key: 'AddDaysAfterEndOfMonth',
|
|
34822
|
+
},
|
|
34823
|
+
{ name: 'Get Last Date In Month', key: 'GetLastDateInMonth' },
|
|
34824
|
+
];
|
|
34825
|
+
const functions = LEGACY_DASHBOARD_FUNCTIONS.map(({ name, key, hint = '' }) => ({
|
|
34826
|
+
name,
|
|
34827
|
+
category: 'Dashboard',
|
|
34828
|
+
description: hint,
|
|
34829
|
+
signature: key,
|
|
34830
|
+
template: key,
|
|
34831
|
+
}));
|
|
34832
|
+
const DASHBOARD_FORMULA_FUNCTION_CATEGORIES = [
|
|
34833
|
+
{
|
|
34834
|
+
name: 'Dashboard',
|
|
34835
|
+
displayName: 'Functions',
|
|
34836
|
+
functions,
|
|
34837
|
+
},
|
|
34838
|
+
];
|
|
34839
|
+
/** P+4 operator list, including punctuation used to compose raw function keys. */
|
|
34840
|
+
const DASHBOARD_FORMULA_OPERATORS = [
|
|
34841
|
+
{
|
|
34842
|
+
symbol: '+',
|
|
34843
|
+
name: 'Add',
|
|
34844
|
+
type: 'arithmetic',
|
|
34845
|
+
description: 'Addition',
|
|
34846
|
+
precedence: 4,
|
|
34847
|
+
},
|
|
34848
|
+
{
|
|
34849
|
+
symbol: '-',
|
|
34850
|
+
name: 'Subtract',
|
|
34851
|
+
type: 'arithmetic',
|
|
34852
|
+
description: 'Subtraction',
|
|
34853
|
+
precedence: 4,
|
|
34854
|
+
},
|
|
34855
|
+
{
|
|
34856
|
+
symbol: '/',
|
|
34857
|
+
name: 'Divide',
|
|
34858
|
+
type: 'arithmetic',
|
|
34859
|
+
description: 'Division',
|
|
34860
|
+
precedence: 5,
|
|
34861
|
+
},
|
|
34862
|
+
{
|
|
34863
|
+
symbol: '*',
|
|
34864
|
+
name: 'Multiply',
|
|
34865
|
+
type: 'arithmetic',
|
|
34866
|
+
description: 'Multiplication',
|
|
34867
|
+
precedence: 5,
|
|
34868
|
+
},
|
|
34869
|
+
{
|
|
34870
|
+
symbol: '(',
|
|
34871
|
+
name: 'Open parenthesis',
|
|
34872
|
+
type: 'logical',
|
|
34873
|
+
description: 'Open parenthesis',
|
|
34874
|
+
precedence: 0,
|
|
34875
|
+
},
|
|
34876
|
+
{
|
|
34877
|
+
symbol: ')',
|
|
34878
|
+
name: 'Close parenthesis',
|
|
34879
|
+
type: 'logical',
|
|
34880
|
+
description: 'Close parenthesis',
|
|
34881
|
+
precedence: 0,
|
|
34882
|
+
},
|
|
34883
|
+
{
|
|
34884
|
+
symbol: ',',
|
|
34885
|
+
name: 'Argument separator',
|
|
34886
|
+
type: 'logical',
|
|
34887
|
+
description: 'Argument separator',
|
|
34888
|
+
precedence: 0,
|
|
34889
|
+
},
|
|
34890
|
+
{
|
|
34891
|
+
symbol: ';',
|
|
34892
|
+
name: 'Value separator',
|
|
34893
|
+
type: 'logical',
|
|
34894
|
+
description: 'Value separator',
|
|
34895
|
+
precedence: 0,
|
|
34896
|
+
},
|
|
34897
|
+
{
|
|
34898
|
+
symbol: '?',
|
|
34899
|
+
name: 'Conditional',
|
|
34900
|
+
type: 'logical',
|
|
34901
|
+
description: 'Conditional value',
|
|
34902
|
+
precedence: 1,
|
|
34903
|
+
},
|
|
34904
|
+
{
|
|
34905
|
+
symbol: ':',
|
|
34906
|
+
name: 'Conditional separator',
|
|
34907
|
+
type: 'logical',
|
|
34908
|
+
description: 'Conditional separator',
|
|
34909
|
+
precedence: 1,
|
|
34910
|
+
},
|
|
34911
|
+
{
|
|
34912
|
+
symbol: '==',
|
|
34913
|
+
name: 'Equal',
|
|
34914
|
+
type: 'comparison',
|
|
34915
|
+
description: 'Equal to',
|
|
34916
|
+
precedence: 3,
|
|
34917
|
+
},
|
|
34918
|
+
{
|
|
34919
|
+
symbol: '!=',
|
|
34920
|
+
name: 'Not Equal',
|
|
34921
|
+
type: 'comparison',
|
|
34922
|
+
description: 'Not equal to',
|
|
34923
|
+
precedence: 3,
|
|
34924
|
+
},
|
|
34925
|
+
{
|
|
34926
|
+
symbol: '>=',
|
|
34927
|
+
name: 'Greater or Equal',
|
|
34928
|
+
type: 'comparison',
|
|
34929
|
+
description: 'Greater than or equal',
|
|
34930
|
+
precedence: 3,
|
|
34931
|
+
},
|
|
34932
|
+
{
|
|
34933
|
+
symbol: '<=',
|
|
34934
|
+
name: 'Less or Equal',
|
|
34935
|
+
type: 'comparison',
|
|
34936
|
+
description: 'Less than or equal',
|
|
34937
|
+
precedence: 3,
|
|
34938
|
+
},
|
|
34939
|
+
{
|
|
34940
|
+
symbol: '>',
|
|
34941
|
+
name: 'Greater',
|
|
34942
|
+
type: 'comparison',
|
|
34943
|
+
description: 'Greater than',
|
|
34944
|
+
precedence: 3,
|
|
34945
|
+
},
|
|
34946
|
+
{
|
|
34947
|
+
symbol: '<',
|
|
34948
|
+
name: 'Less',
|
|
34949
|
+
type: 'comparison',
|
|
34950
|
+
description: 'Less than',
|
|
34951
|
+
precedence: 3,
|
|
34952
|
+
},
|
|
34953
|
+
];
|
|
34954
|
+
|
|
34403
34955
|
/**
|
|
34404
34956
|
* General Query Component
|
|
34405
34957
|
*
|
|
@@ -34432,6 +34984,9 @@ class GeneralQuery {
|
|
|
34432
34984
|
viewType: property.viewType,
|
|
34433
34985
|
})),
|
|
34434
34986
|
}), ...(ngDevMode ? [{ debugName: "formulaPropertiesByPath" }] : /* istanbul ignore next */ []));
|
|
34987
|
+
/** Exact P+4 chart-formula functions and composition operators. */
|
|
34988
|
+
dashboardFormulaFunctionCategories = DASHBOARD_FORMULA_FUNCTION_CATEGORIES;
|
|
34989
|
+
dashboardFormulaOperators = DASHBOARD_FORMULA_OPERATORS;
|
|
34435
34990
|
/** Aggregate function options */
|
|
34436
34991
|
aggregateFunctions = [
|
|
34437
34992
|
{ value: 'Sum', label: 'Sum' },
|
|
@@ -34816,7 +35371,7 @@ class GeneralQuery {
|
|
|
34816
35371
|
useExisting: forwardRef(() => GeneralQuery),
|
|
34817
35372
|
multi: true,
|
|
34818
35373
|
},
|
|
34819
|
-
], 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-formula-builder\r\n formControlName=\"formula\"\r\n valueMode=\"expression\"\r\n [builderOnly]=\"true\"\r\n [propertiesByPath]=\"formulaPropertiesByPath()\"\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"], 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: FormulaBuilder, selector: "mt-formula-builder", inputs: ["propertiesByPath", "levelSchemaId", "moduleId", "contextKey", "contextEntityTypeKey", "templateId", "placeholder", "hideToolbar", "hideStatusBar", "toolbarTabs", "codeOnly", "builderOnly", "valueMode", "isProcessBuilder"], outputs: ["validationChange", "tokensChange"] }, { 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 });
|
|
35374
|
+
], 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-formula-builder\n formControlName=\"formula\"\n valueMode=\"expression\"\n [builderOnly]=\"true\"\n [functionCategories]=\"dashboardFormulaFunctionCategories\"\n [operators]=\"dashboardFormulaOperators\"\n [propertiesByPath]=\"formulaPropertiesByPath()\"\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"], 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: FormulaBuilder, selector: "mt-formula-builder", inputs: ["propertiesByPath", "levelSchemaId", "moduleId", "contextKey", "contextEntityTypeKey", "templateId", "placeholder", "hideToolbar", "hideStatusBar", "toolbarTabs", "functionCategories", "operators", "codeOnly", "builderOnly", "valueMode", "isProcessBuilder"], outputs: ["validationChange", "tokensChange"] }, { 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 });
|
|
34820
35375
|
}
|
|
34821
35376
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GeneralQuery, decorators: [{
|
|
34822
35377
|
type: Component,
|
|
@@ -34845,7 +35400,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
34845
35400
|
useExisting: forwardRef(() => GeneralQuery),
|
|
34846
35401
|
multi: true,
|
|
34847
35402
|
},
|
|
34848
|
-
], 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-formula-builder\r\n formControlName=\"formula\"\r\n valueMode=\"expression\"\r\n [builderOnly]=\"true\"\r\n [propertiesByPath]=\"formulaPropertiesByPath()\"\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" }]
|
|
35403
|
+
], 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-formula-builder\n formControlName=\"formula\"\n valueMode=\"expression\"\n [builderOnly]=\"true\"\n [functionCategories]=\"dashboardFormulaFunctionCategories\"\n [operators]=\"dashboardFormulaOperators\"\n [propertiesByPath]=\"formulaPropertiesByPath()\"\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" }]
|
|
34849
35404
|
}], 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 }] }] } });
|
|
34850
35405
|
|
|
34851
35406
|
/**
|
|
@@ -34894,29 +35449,32 @@ class TableQuery {
|
|
|
34894
35449
|
constructor() {
|
|
34895
35450
|
// Emit changes when form updates
|
|
34896
35451
|
this.queryForm.valueChanges.subscribe(() => {
|
|
34897
|
-
|
|
34898
|
-
this.onChange({
|
|
34899
|
-
selectedProperties: value.selectedProperties || [],
|
|
34900
|
-
AggregationProperties: value.AggregationProperties || [],
|
|
34901
|
-
lookupProperty: value.lookupProperty || '',
|
|
34902
|
-
PivotProperties: value.PivotProperties || [],
|
|
34903
|
-
});
|
|
35452
|
+
this.onChange(this.getQueryValue());
|
|
34904
35453
|
});
|
|
34905
35454
|
}
|
|
34906
35455
|
// ==================== ControlValueAccessor ====================
|
|
34907
35456
|
writeValue(value) {
|
|
34908
|
-
if (value)
|
|
34909
|
-
|
|
34910
|
-
|
|
34911
|
-
|
|
34912
|
-
|
|
34913
|
-
|
|
34914
|
-
|
|
34915
|
-
|
|
34916
|
-
|
|
34917
|
-
|
|
35457
|
+
if (!value)
|
|
35458
|
+
return;
|
|
35459
|
+
const normalized = this.normalizeQueryValue(value);
|
|
35460
|
+
// DataSourceSettings feeds every ngModelChange value straight back through
|
|
35461
|
+
// writeValue. Rebuilding the form for that echo re-emits valueChanges and
|
|
35462
|
+
// locks the browser as soon as a table property is selected.
|
|
35463
|
+
if (this.areQueryValuesEqual(normalized, this.getQueryValue())) {
|
|
35464
|
+
return;
|
|
35465
|
+
}
|
|
35466
|
+
// CVA writes are model-to-view synchronization and must stay silent.
|
|
35467
|
+
this.queryForm.patchValue({
|
|
35468
|
+
selectedProperties: normalized.selectedProperties,
|
|
35469
|
+
lookupProperty: normalized.lookupProperty,
|
|
35470
|
+
PivotProperties: normalized.PivotProperties,
|
|
35471
|
+
}, { emitEvent: false });
|
|
35472
|
+
this.aggregationArray.clear({ emitEvent: false });
|
|
35473
|
+
normalized.AggregationProperties.forEach((aggregation) => {
|
|
35474
|
+
this.aggregationArray.push(this.createAggregationFormGroup(aggregation), {
|
|
35475
|
+
emitEvent: false,
|
|
34918
35476
|
});
|
|
34919
|
-
}
|
|
35477
|
+
});
|
|
34920
35478
|
}
|
|
34921
35479
|
registerOnChange(fn) {
|
|
34922
35480
|
this.onChange = fn;
|
|
@@ -34966,6 +35524,48 @@ class TableQuery {
|
|
|
34966
35524
|
trackByIndex(index) {
|
|
34967
35525
|
return index;
|
|
34968
35526
|
}
|
|
35527
|
+
getQueryValue() {
|
|
35528
|
+
const value = this.queryForm.getRawValue();
|
|
35529
|
+
return this.normalizeQueryValue({
|
|
35530
|
+
selectedProperties: value.selectedProperties || [],
|
|
35531
|
+
AggregationProperties: (value.AggregationProperties || []).map((aggregation) => ({
|
|
35532
|
+
propertyKey: aggregation['propertyKey'] ?? null,
|
|
35533
|
+
aggregateFunction: aggregation['aggregateFunction'] || '',
|
|
35534
|
+
alias: aggregation['alias'] || '',
|
|
35535
|
+
})),
|
|
35536
|
+
lookupProperty: value.lookupProperty || '',
|
|
35537
|
+
PivotProperties: value.PivotProperties || [],
|
|
35538
|
+
});
|
|
35539
|
+
}
|
|
35540
|
+
normalizeQueryValue(value) {
|
|
35541
|
+
return {
|
|
35542
|
+
selectedProperties: value.selectedProperties || [],
|
|
35543
|
+
AggregationProperties: (value.AggregationProperties || []).map((aggregation) => ({
|
|
35544
|
+
propertyKey: aggregation.propertyKey ?? null,
|
|
35545
|
+
aggregateFunction: this.normalizeAggregateFunction(aggregation.aggregateFunction),
|
|
35546
|
+
alias: aggregation.alias || '',
|
|
35547
|
+
})),
|
|
35548
|
+
lookupProperty: value.lookupProperty || '',
|
|
35549
|
+
PivotProperties: value.PivotProperties || [],
|
|
35550
|
+
};
|
|
35551
|
+
}
|
|
35552
|
+
areQueryValuesEqual(left, right) {
|
|
35553
|
+
return (this.areStringArraysEqual(left.selectedProperties, right.selectedProperties) &&
|
|
35554
|
+
left.lookupProperty === right.lookupProperty &&
|
|
35555
|
+
this.areStringArraysEqual(left.PivotProperties, right.PivotProperties) &&
|
|
35556
|
+
left.AggregationProperties.length ===
|
|
35557
|
+
right.AggregationProperties.length &&
|
|
35558
|
+
left.AggregationProperties.every((aggregation, index) => {
|
|
35559
|
+
const other = right.AggregationProperties[index];
|
|
35560
|
+
return (aggregation.propertyKey === other?.propertyKey &&
|
|
35561
|
+
aggregation.aggregateFunction === other?.aggregateFunction &&
|
|
35562
|
+
(aggregation.alias || '') === (other?.alias || ''));
|
|
35563
|
+
}));
|
|
35564
|
+
}
|
|
35565
|
+
areStringArraysEqual(left, right) {
|
|
35566
|
+
return (left.length === right.length &&
|
|
35567
|
+
left.every((value, index) => value === right[index]));
|
|
35568
|
+
}
|
|
34969
35569
|
normalizeAggregateFunction(value) {
|
|
34970
35570
|
return value === 'DisticntCount' ? 'DistinctCount' : value || '';
|
|
34971
35571
|
}
|
|
@@ -35072,7 +35672,7 @@ class TimelineQuery {
|
|
|
35072
35672
|
useExisting: forwardRef(() => TimelineQuery),
|
|
35073
35673
|
multi: true,
|
|
35074
35674
|
},
|
|
35075
|
-
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
35675
|
+
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- Pivot Property -->\n <mt-select-field\n [label]=\"t('pivotProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().pivotProperty\"\n (ngModelChange)=\"updateField('pivotProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Lookup Property -->\n <mt-select-field\n [label]=\"t('lookupProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().lookupProperty\"\n (ngModelChange)=\"updateField('lookupProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Time Frame -->\n <mt-select-field\n [label]=\"t('timeFrame')\"\n [options]=\"timeFrameOptions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [placeholder]=\"t('selectTimeFrame')\"\n [ngModel]=\"query().timeFrame\"\n (ngModelChange)=\"updateField('timeFrame', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Start Point Time Property -->\n <mt-select-field\n [label]=\"t('startPointTimeProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().startPoint_timeProperty\"\n (ngModelChange)=\"updateField('startPoint_timeProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- End Point Time Property -->\n <mt-select-field\n [label]=\"t('endPointTimeProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().endPoint_timeProperty\"\n (ngModelChange)=\"updateField('endPoint_timeProperty', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n\n <!-- Extra Properties -->\n <div class=\"w-full\">\n <mt-multi-select-field\n [label]=\"t('extraProperties')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperties')\"\n [ngModel]=\"query().extraProperties\"\n (ngModelChange)=\"updateField('extraProperties', $event)\"\n [disabled]=\"disabled\"\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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
35076
35676
|
}
|
|
35077
35677
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TimelineQuery, decorators: [{
|
|
35078
35678
|
type: Component,
|
|
@@ -35088,7 +35688,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
35088
35688
|
useExisting: forwardRef(() => TimelineQuery),
|
|
35089
35689
|
multi: true,
|
|
35090
35690
|
},
|
|
35091
|
-
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
35691
|
+
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- Pivot Property -->\n <mt-select-field\n [label]=\"t('pivotProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().pivotProperty\"\n (ngModelChange)=\"updateField('pivotProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Lookup Property -->\n <mt-select-field\n [label]=\"t('lookupProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().lookupProperty\"\n (ngModelChange)=\"updateField('lookupProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Time Frame -->\n <mt-select-field\n [label]=\"t('timeFrame')\"\n [options]=\"timeFrameOptions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [placeholder]=\"t('selectTimeFrame')\"\n [ngModel]=\"query().timeFrame\"\n (ngModelChange)=\"updateField('timeFrame', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Start Point Time Property -->\n <mt-select-field\n [label]=\"t('startPointTimeProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().startPoint_timeProperty\"\n (ngModelChange)=\"updateField('startPoint_timeProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- End Point Time Property -->\n <mt-select-field\n [label]=\"t('endPointTimeProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().endPoint_timeProperty\"\n (ngModelChange)=\"updateField('endPoint_timeProperty', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n\n <!-- Extra Properties -->\n <div class=\"w-full\">\n <mt-multi-select-field\n [label]=\"t('extraProperties')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperties')\"\n [ngModel]=\"query().extraProperties\"\n (ngModelChange)=\"updateField('extraProperties', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n</div>\n" }]
|
|
35092
35692
|
}], propDecorators: { propertiesFlat: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesFlat", required: false }] }], propertiesGrouped: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesGrouped", required: false }] }] } });
|
|
35093
35693
|
|
|
35094
35694
|
/**
|
|
@@ -35532,7 +36132,7 @@ class MapQuery {
|
|
|
35532
36132
|
useExisting: forwardRef(() => MapQuery),
|
|
35533
36133
|
multi: true,
|
|
35534
36134
|
},
|
|
35535
|
-
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
36135
|
+
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- Location Property -->\n <mt-select-field\n [label]=\"t('locationProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().locationProperty\"\n (ngModelChange)=\"updateField('locationProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Grouping Property -->\n <mt-select-field\n [label]=\"t('groupingProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().groupingProperty\"\n (ngModelChange)=\"updateField('groupingProperty', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n\n <!-- Extra Properties -->\n <div class=\"w-full\">\n <mt-multi-select-field\n [label]=\"t('extraProperties')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperties')\"\n [ngModel]=\"query().extraProperties\"\n (ngModelChange)=\"updateField('extraProperties', $event)\"\n [disabled]=\"disabled\"\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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
35536
36136
|
}
|
|
35537
36137
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MapQuery, decorators: [{
|
|
35538
36138
|
type: Component,
|
|
@@ -35548,7 +36148,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
35548
36148
|
useExisting: forwardRef(() => MapQuery),
|
|
35549
36149
|
multi: true,
|
|
35550
36150
|
},
|
|
35551
|
-
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
36151
|
+
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- Location Property -->\n <mt-select-field\n [label]=\"t('locationProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().locationProperty\"\n (ngModelChange)=\"updateField('locationProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Grouping Property -->\n <mt-select-field\n [label]=\"t('groupingProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().groupingProperty\"\n (ngModelChange)=\"updateField('groupingProperty', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n\n <!-- Extra Properties -->\n <div class=\"w-full\">\n <mt-multi-select-field\n [label]=\"t('extraProperties')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperties')\"\n [ngModel]=\"query().extraProperties\"\n (ngModelChange)=\"updateField('extraProperties', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n</div>\n" }]
|
|
35552
36152
|
}], propDecorators: { propertiesFlat: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesFlat", required: false }] }], propertiesGrouped: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesGrouped", required: false }] }] } });
|
|
35553
36153
|
|
|
35554
36154
|
/**
|
|
@@ -35622,7 +36222,7 @@ class SplitterQuery {
|
|
|
35622
36222
|
useExisting: forwardRef(() => SplitterQuery),
|
|
35623
36223
|
multi: true,
|
|
35624
36224
|
},
|
|
35625
|
-
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
36225
|
+
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <!-- Pivot Property -->\n <mt-select-field\n [label]=\"t('pivotProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().pivotProperty\"\n (ngModelChange)=\"updateField('pivotProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- Positive Values -->\n <mt-text-field\n [label]=\"t('positiveValues')\"\n [placeholder]=\"t('enterValuesCommaSeparated')\"\n [ngModel]=\"getArrayAsString('PositiveValues')\"\n (ngModelChange)=\"updateArrayFromString('PositiveValues', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Negative Values -->\n <mt-text-field\n [label]=\"t('negativeValues')\"\n [placeholder]=\"t('enterValuesCommaSeparated')\"\n [ngModel]=\"getArrayAsString('NegativeValues')\"\n (ngModelChange)=\"updateArrayFromString('NegativeValues', $event)\"\n [disabled]=\"disabled\"\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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
35626
36226
|
}
|
|
35627
36227
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SplitterQuery, decorators: [{
|
|
35628
36228
|
type: Component,
|
|
@@ -35638,7 +36238,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
35638
36238
|
useExisting: forwardRef(() => SplitterQuery),
|
|
35639
36239
|
multi: true,
|
|
35640
36240
|
},
|
|
35641
|
-
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
36241
|
+
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <!-- Pivot Property -->\n <mt-select-field\n [label]=\"t('pivotProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().pivotProperty\"\n (ngModelChange)=\"updateField('pivotProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- Positive Values -->\n <mt-text-field\n [label]=\"t('positiveValues')\"\n [placeholder]=\"t('enterValuesCommaSeparated')\"\n [ngModel]=\"getArrayAsString('PositiveValues')\"\n (ngModelChange)=\"updateArrayFromString('PositiveValues', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Negative Values -->\n <mt-text-field\n [label]=\"t('negativeValues')\"\n [placeholder]=\"t('enterValuesCommaSeparated')\"\n [ngModel]=\"getArrayAsString('NegativeValues')\"\n (ngModelChange)=\"updateArrayFromString('NegativeValues', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n</div>\n" }]
|
|
35642
36242
|
}], propDecorators: { propertiesFlat: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesFlat", required: false }] }], propertiesGrouped: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesGrouped", required: false }] }] } });
|
|
35643
36243
|
|
|
35644
36244
|
class InformativeContextSelection {
|
|
@@ -37285,7 +37885,7 @@ class GeneralSettings {
|
|
|
37285
37885
|
return labels[category] || category;
|
|
37286
37886
|
}
|
|
37287
37887
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GeneralSettings, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
37288
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: GeneralSettings, isStandalone: true, selector: "mt-general-settings", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, isDialog: { classPropertyName: "isDialog", publicName: "isDialog", isSignal: true, isRequired: false, transformFunction: null }, hasPreselectedType: { classPropertyName: "hasPreselectedType", publicName: "hasPreselectedType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { configChange: "configChange", chartTypeChange: "chartTypeChange" }, ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
37888
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: GeneralSettings, isStandalone: true, selector: "mt-general-settings", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, isDialog: { classPropertyName: "isDialog", publicName: "isDialog", isSignal: true, isRequired: false, transformFunction: null }, hasPreselectedType: { classPropertyName: "hasPreselectedType", publicName: "hasPreselectedType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { configChange: "configChange", chartTypeChange: "chartTypeChange" }, ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <!-- Basic Info Card -->\n <mt-card [title]=\"t('basicInfo')\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- English Title -->\n <mt-text-field\n [label]=\"t('titleEn')\"\n [ngModel]=\"config()?.clientConfig?.title?.en || ''\"\n (ngModelChange)=\"updateTitle('en', $event)\"\n [placeholder]=\"t('enterTitleEn')\"\n />\n\n <!-- Arabic Title -->\n <mt-text-field\n [label]=\"t('titleAr')\"\n [ngModel]=\"config()?.clientConfig?.title?.ar || ''\"\n (ngModelChange)=\"updateTitle('ar', $event)\"\n [placeholder]=\"t('enterTitleAr')\"\n dir=\"rtl\"\n />\n\n <!-- Component Name (readonly info) -->\n @if (selectedChartType(); as chartType) {\n <div class=\"md:col-span-2\">\n <div class=\"text-sm text-muted-color mb-1\">\n {{ t(\"selectedType\") }}\n </div>\n <div\n class=\"flex items-center gap-2 p-3 bg-surface-50 rounded-lg border border-surface-200\"\n >\n <mt-icon\n [icon]=\"chartType.icon\"\n class=\"text-lg text-primary-500\"\n ></mt-icon>\n <span class=\"font-medium\">{{ chartType.name }}</span>\n <span class=\"text-sm text-muted-color\"\n >({{ chartType.serviceType }})</span\n >\n </div>\n </div>\n }\n </div>\n </mt-card>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
37289
37889
|
}
|
|
37290
37890
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GeneralSettings, decorators: [{
|
|
37291
37891
|
type: Component,
|
|
@@ -37297,7 +37897,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
37297
37897
|
Card,
|
|
37298
37898
|
TooltipModule,
|
|
37299
37899
|
Icon,
|
|
37300
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
37900
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <!-- Basic Info Card -->\n <mt-card [title]=\"t('basicInfo')\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- English Title -->\n <mt-text-field\n [label]=\"t('titleEn')\"\n [ngModel]=\"config()?.clientConfig?.title?.en || ''\"\n (ngModelChange)=\"updateTitle('en', $event)\"\n [placeholder]=\"t('enterTitleEn')\"\n />\n\n <!-- Arabic Title -->\n <mt-text-field\n [label]=\"t('titleAr')\"\n [ngModel]=\"config()?.clientConfig?.title?.ar || ''\"\n (ngModelChange)=\"updateTitle('ar', $event)\"\n [placeholder]=\"t('enterTitleAr')\"\n dir=\"rtl\"\n />\n\n <!-- Component Name (readonly info) -->\n @if (selectedChartType(); as chartType) {\n <div class=\"md:col-span-2\">\n <div class=\"text-sm text-muted-color mb-1\">\n {{ t(\"selectedType\") }}\n </div>\n <div\n class=\"flex items-center gap-2 p-3 bg-surface-50 rounded-lg border border-surface-200\"\n >\n <mt-icon\n [icon]=\"chartType.icon\"\n class=\"text-lg text-primary-500\"\n ></mt-icon>\n <span class=\"font-medium\">{{ chartType.name }}</span>\n <span class=\"text-sm text-muted-color\"\n >({{ chartType.serviceType }})</span\n >\n </div>\n </div>\n }\n </div>\n </mt-card>\n</div>\n" }]
|
|
37301
37901
|
}], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], isDialog: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDialog", required: false }] }], hasPreselectedType: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasPreselectedType", required: false }] }], configChange: [{ type: i0.Output, args: ["configChange"] }], chartTypeChange: [{ type: i0.Output, args: ["chartTypeChange"] }] } });
|
|
37302
37902
|
|
|
37303
37903
|
/**
|
|
@@ -42068,6 +42668,13 @@ class DashboardBuilder {
|
|
|
42068
42668
|
informativeContext = input(null, ...(ngDevMode ? [{ debugName: "informativeContext" }] : /* istanbul ignore next */ []));
|
|
42069
42669
|
/** Dashboard-wide extra filters applied to every item request */
|
|
42070
42670
|
extraFilters = input({}, ...(ngDevMode ? [{ debugName: "extraFilters" }] : /* istanbul ignore next */ []));
|
|
42671
|
+
/** Host-owned lookup metadata shared with runtime client forms. */
|
|
42672
|
+
lookups = input(null, ...(ngDevMode ? [{ debugName: "lookups" }] : /* istanbul ignore next */ []));
|
|
42673
|
+
/** Host-owned canonical or legacy status metadata for runtime filters. */
|
|
42674
|
+
statuses = input(null, ...(ngDevMode ? [{ debugName: "statuses" }] : /* istanbul ignore next */ []));
|
|
42675
|
+
filterMetadataEffect = effect(() => {
|
|
42676
|
+
this.dashboardService.setFilterMetadata(this.lookups(), this.statuses());
|
|
42677
|
+
}, ...(ngDevMode ? [{ debugName: "filterMetadataEffect" }] : /* istanbul ignore next */ []));
|
|
42071
42678
|
// ============================================
|
|
42072
42679
|
// Outputs
|
|
42073
42680
|
// ============================================
|
|
@@ -43279,21 +43886,42 @@ class DashboardBuilder {
|
|
|
43279
43886
|
removeGroup(groupItem) {
|
|
43280
43887
|
this.confirmDelete(groupItem, 'group', () => {
|
|
43281
43888
|
const groupId = groupItem.config.serviceConfig.dashboardId;
|
|
43282
|
-
|
|
43283
|
-
|
|
43284
|
-
|
|
43285
|
-
|
|
43286
|
-
|
|
43287
|
-
|
|
43288
|
-
|
|
43289
|
-
|
|
43290
|
-
|
|
43291
|
-
|
|
43889
|
+
const removeLocally = () => this.removeGroupLocally(groupId);
|
|
43890
|
+
if (this.standalone()) {
|
|
43891
|
+
removeLocally();
|
|
43892
|
+
return;
|
|
43893
|
+
}
|
|
43894
|
+
const reportId = this.pageId();
|
|
43895
|
+
if (groupItem.chartComponentId && reportId) {
|
|
43896
|
+
this.dashboardService
|
|
43897
|
+
.unlinkChart({
|
|
43898
|
+
reportId: Number(reportId),
|
|
43899
|
+
chartComponentId: groupItem.chartComponentId,
|
|
43900
|
+
}, { silent: true })
|
|
43901
|
+
.subscribe({
|
|
43902
|
+
next: removeLocally,
|
|
43903
|
+
error: () => { },
|
|
43292
43904
|
});
|
|
43293
|
-
|
|
43294
|
-
|
|
43905
|
+
return;
|
|
43906
|
+
}
|
|
43907
|
+
removeLocally();
|
|
43295
43908
|
});
|
|
43296
43909
|
}
|
|
43910
|
+
removeGroupLocally(groupId) {
|
|
43911
|
+
if (!groupId)
|
|
43912
|
+
return;
|
|
43913
|
+
this.charts.update((current) => current
|
|
43914
|
+
.filter((chart) => chart.config.serviceConfig.dashboardId !== groupId)
|
|
43915
|
+
.map((chart) => {
|
|
43916
|
+
if (chart.group !== groupId)
|
|
43917
|
+
return chart;
|
|
43918
|
+
// Children remain on the dashboard as normal standalone charts.
|
|
43919
|
+
const { group: _group, orderInGroup: _orderInGroup, ...rest } = chart;
|
|
43920
|
+
return rest;
|
|
43921
|
+
}));
|
|
43922
|
+
this.gridsterContainer()?.updateGrid?.();
|
|
43923
|
+
this.cdr.detectChanges();
|
|
43924
|
+
}
|
|
43297
43925
|
// ============================================
|
|
43298
43926
|
// Header & Topbar
|
|
43299
43927
|
// ============================================
|
|
@@ -44533,7 +45161,7 @@ class DashboardBuilder {
|
|
|
44533
45161
|
return current;
|
|
44534
45162
|
}
|
|
44535
45163
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardBuilder, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
44536
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DashboardBuilder, isStandalone: true, selector: "mt-dashboard-builder", inputs: { isPage: { classPropertyName: "isPage", publicName: "isPage", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, backButton: { classPropertyName: "backButton", publicName: "backButton", isSignal: true, isRequired: false, transformFunction: null }, pageId: { classPropertyName: "pageId", publicName: "pageId", isSignal: true, isRequired: false, transformFunction: null }, standalone: { classPropertyName: "standalone", publicName: "standalone", isSignal: true, isRequired: false, transformFunction: null }, services: { classPropertyName: "services", publicName: "services", isSignal: true, isRequired: false, transformFunction: null }, dashboardData: { classPropertyName: "dashboardData", publicName: "dashboardData", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, informativeContext: { classPropertyName: "informativeContext", publicName: "informativeContext", isSignal: true, isRequired: false, transformFunction: null }, extraFilters: { classPropertyName: "extraFilters", publicName: "extraFilters", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dashboardData: "dashboardDataChange", pageChange: "pageChange", chartsChange: "chartsChange", onSave: "onSave", onBack: "onBack", onAddChart: "onAddChart", onEditChart: "onEditChart" }, host: { listeners: { "window:keydown": "onKeyDown($event)" } }, viewQueries: [{ propertyName: "contextMenu", first: true, predicate: ["contextMenu"], descendants: true, isSignal: true }, { propertyName: "gridsterContainer", first: true, predicate: ["gridsterContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Shared Actions Template -->\r\n <ng-template #actionsTemplate let-inPage=\"inPage\">\r\n <mt-button\r\n [label]=\"t('addWidget')\"\r\n icon=\"general.plus\"\r\n (onClick)=\"toggleWidgetPalette()\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n [label]=\"t('save')\"\r\n icon=\"general.save-02\"\r\n [loading]=\"saving()\"\r\n [disabled]=\"saving()\"\r\n (onClick)=\"saveDash()\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <span [class]=\"'w-px h-5 bg-surface-300'\"></span>\r\n\r\n <mt-button\r\n icon=\"arrow.reverse-left\"\r\n [tooltip]=\"t('undo')\"\r\n (onClick)=\"undo()\"\r\n [disabled]=\"!canUndo() || readonly()\"\r\n [severity]=\"'secondary'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n [icon]=\"stopActionsOnCards() ? 'media.play' : 'media.stop'\"\r\n [tooltip]=\"stopActionsOnCards() ? t('activateActions') : t('stopActions')\"\r\n (onClick)=\"stopAndActiveActions()\"\r\n [severity]=\"'warn'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n icon=\"general.edit-05\"\r\n [tooltip]=\"t('pageSettings')\"\r\n (onClick)=\"addOrEditPage(pageConfig()!)\"\r\n [severity]=\"'help'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n icon=\"general.filter-lines\"\r\n [tooltip]=\"t('manageFilter')\"\r\n (click)=\"$event.stopPropagation(); openManageFilter()\"\r\n [severity]=\"'info'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n </ng-template>\r\n\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"\r\n pageTitle() ||\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n t('builder')\r\n \"\r\n [backButton]=\"backButton()\"\r\n (backButtonClick)=\"onBack.emit()\"\r\n >\r\n <!-- Header actions -->\r\n <ng-template #headerEnd>\r\n <div class=\"flex items-center gap-2\">\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate; context: { inPage: true }\"\r\n />\r\n </div>\r\n </ng-template>\r\n\r\n <!-- Content -->\r\n <ng-container *ngTemplateOutlet=\"builderContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <ng-container *ngTemplateOutlet=\"builderContent\" />\r\n }\r\n\r\n <!-- Reusable builder content template -->\r\n <ng-template #builderContent>\r\n <div\r\n class=\"db-manage-dashboard-container relative h-full min-h-[600px]\"\r\n [attr.dir]=\"direction()\"\r\n >\r\n <!-- Loading State -->\r\n @if (loading()) {\r\n <div class=\"flex items-center justify-center h-64\">\r\n <i class=\"mti mti-spinner-third mti-spin text-4xl text-primary\"></i>\r\n </div>\r\n }\r\n\r\n <!-- Main Content -->\r\n @if (!loading() && pageConfig()) {\r\n <!-- Fixed Actions Bar (only when NOT page mode) -->\r\n @if (!isPage()) {\r\n <div\r\n class=\"fixed bottom-4 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 bg-surface-0 rounded-full shadow-lg px-4 py-2 border border-surface-200\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate; context: { inPage: false }\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Gridster Container -->\r\n <gridster\r\n #gridsterContainer\r\n [attr.dir]=\"direction()\"\r\n [options]=\"options\"\r\n class=\"db-gridster-container h-full min-h-[500px] bg-surface-50!\"\r\n [class.is-page]=\"isPage()\"\r\n [class.pointer-events-none]=\"readonly()\"\r\n (dragover)=\"onGridDragOver($event)\"\r\n (drop)=\"onGridDrop($event)\"\r\n >\r\n @for (chart of charts() | filterByGroup: undefined; track $index) {\r\n <gridster-item\r\n [item]=\"chart\"\r\n class=\"db-gridster-item bg-surface-0 rounded-lg shadow-sm border border-surface-200 overflow-hidden hover:shadow-md hover:border-surface-300\"\r\n [class.db-gridster-item--properties-list]=\"\r\n isPropertiesListChart(chart)\r\n \"\r\n [class.db-gridster-item--topbar]=\"isTopbarChart(chart)\"\r\n [class.ring-2]=\"isSelected(chart)\"\r\n [class.ring-primary]=\"isSelected(chart)\"\r\n [class.ring-offset-2]=\"isSelected(chart)\"\r\n [attr.data-chart-id]=\"chart.config?.serviceConfig?.dashboardId\"\r\n (click)=\"onSelect(chart, $event)\"\r\n >\r\n <!-- Chart Content -->\r\n <div\r\n class=\"db-gridster-item-content h-full w-full relative group\"\r\n [attr.dir]=\"direction()\"\r\n >\r\n <!-- Drag Handle -->\r\n @if (!readonly()) {\r\n <div\r\n class=\"drag-handler absolute top-0 left-0 right-0 h-6 cursor-move bg-gradient-to-b from-black/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center z-10\"\r\n >\r\n <i\r\n class=\"mti mti-grip-horizontal text-white/70 text-sm\"\r\n ></i>\r\n </div>\r\n }\r\n\r\n <!--\r\n Pass 7 \u2014 Single top-end Manage menu per chart card.\r\n Layout widgets (header/topbar/group) keep their dedicated\r\n affordances; chart cards have **only** the kebab.\r\n -->\r\n @if (\r\n !readonly() &&\r\n chart.config?.clientConfig?.componentName !== \"Group\"\r\n ) {\r\n <div\r\n class=\"db-card-actions absolute top-1 end-1 flex items-center gap-1 opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity z-20\"\r\n >\r\n <!-- Single kebab for chart cards (Pass 7 sole owner). -->\r\n @if (showContextToolbar(chart)) {\r\n <mt-item-card-menu\r\n [allowDuplicate]=\"true\"\r\n [hasLinkedDialog]=\"hasLinkedDialog(chart)\"\r\n [canLinkDialog]=\"canLinkDialog(chart)\"\r\n (action)=\"onItemCardMenuAction(chart, $event)\"\r\n />\r\n }\r\n\r\n <!-- Topbar: breadcrumb editor (layout-specific). -->\r\n @if (\r\n chart.config?.clientConfig?.componentName === \"topbar\"\r\n ) {\r\n <mt-button\r\n icon=\"general.slash-divider\"\r\n [tooltip]=\"t('manageBreadcrumb')\"\r\n (onClick)=\"openBreadcrumb(chart)\"\r\n severity=\"info\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n }\r\n\r\n <!--\r\n Header / topbar \u2014 quick style + delete.\r\n These widgets don't have a datasource so they don't\r\n use the chart kebab; the affordances stay minimal.\r\n -->\r\n @if (\r\n chart.config?.clientConfig?.componentName === \"header\" ||\r\n chart.config?.clientConfig?.componentName === \"topbar\"\r\n ) {\r\n <mt-button\r\n icon=\"general.edit-05\"\r\n [tooltip]=\"t('actions.editTitle')\"\r\n (onClick)=\"requestLayoutTitleEdit(chart, $event)\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n <mt-button\r\n icon=\"editor.palette\"\r\n [tooltip]=\"t('actions.style')\"\r\n (onClick)=\"openQuickManage($event, chart)\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n [tooltip]=\"t('actions.delete')\"\r\n (onClick)=\"deleteItem(chart)\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Chart Rendering -->\r\n @if (chart.config?.clientConfig?.componentName !== \"Group\") {\r\n @if (!chart.loading) {\r\n <mt-dashboard-item\r\n [config]=\"chart.config\"\r\n [chartTypeId]=\"chart.chartTypeId\"\r\n [readonly]=\"readonly()\"\r\n [builderMode]=\"!readonly()\"\r\n [extraFilters]=\"extraFilters()\"\r\n [reportId]=\"pageId()\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n (configureRequested)=\"configureChart(chart)\"\r\n (titleEdited)=\"onChartTitleEdited(chart, $event)\"\r\n />\r\n } @else {\r\n <div class=\"flex items-center justify-center h-full\">\r\n <i\r\n class=\"mti mti-spinner-third mti-spin text-2xl text-primary\"\r\n ></i>\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Group Children -->\r\n @if (chart.config?.clientConfig?.componentName === \"Group\") {\r\n <mt-card-content\r\n [title]=\"getGroupTitle(chart)\"\r\n [headerConfig]=\"getGroupHeaderConfig(chart)\"\r\n [styleConfig]=\"getGroupStyleConfig(chart)\"\r\n [cardStyleConfig]=\"getGroupCardStyleConfig(chart)\"\r\n [groupHeader]=\"true\"\r\n [isNoTopEnd]=\"false\"\r\n >\r\n <ng-container topEnd>\r\n <div\r\n class=\"db-group-card-top-end flex min-w-0 items-center justify-end gap-2\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <div\r\n class=\"db-group-card-tabs flex min-w-0 items-center gap-1 overflow-x-auto\"\r\n >\r\n @for (\r\n childChart of getGroupChildren(chart);\r\n track childChart.config?.serviceConfig?.dashboardId;\r\n let idx = $index\r\n ) {\r\n <button\r\n type=\"button\"\r\n class=\"db-group-card-tab h-8 max-w-48 shrink-0 truncate rounded-md px-3 text-sm font-medium transition-colors\"\r\n [class.bg-primary]=\"\r\n idx === (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [class.text-white]=\"\r\n idx === (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [class.text-muted-color]=\"\r\n idx !== (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [class.hover:bg-surface-100]=\"\r\n idx !== (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [title]=\"getItemTitle(childChart, idx)\"\r\n (click)=\"selectGroupChild(chart, idx, $event)\"\r\n >\r\n {{ getItemTitle(childChart, idx) }}\r\n </button>\r\n }\r\n </div>\r\n\r\n @if (!readonly()) {\r\n <div class=\"flex shrink-0 items-center gap-1\">\r\n @if (\r\n getSelectedGroupChild(chart);\r\n as selectedChild\r\n ) {\r\n <mt-item-card-menu\r\n [allowDuplicate]=\"true\"\r\n [hasLinkedDialog]=\"\r\n hasLinkedDialog(selectedChild)\r\n \"\r\n [canLinkDialog]=\"canLinkDialog(selectedChild)\"\r\n (action)=\"\r\n onItemCardMenuAction(\r\n selectedChild,\r\n $event,\r\n chart\r\n )\r\n \"\r\n />\r\n }\r\n <mt-button\r\n icon=\"general.edit-05\"\r\n [tooltip]=\"t('actions.editTitle')\"\r\n (onClick)=\"requestLayoutTitleEdit(chart, $event)\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n [tooltip]=\"t('removeGroup')\"\r\n (onClick)=\"removeGroup(chart)\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container body>\r\n @for (\r\n childChart of getGroupChildren(chart);\r\n track childChart.config?.serviceConfig?.dashboardId;\r\n let idx = $index\r\n ) {\r\n @if (idx === (chart.selectedGroupIndex ?? 0)) {\r\n <div class=\"h-full min-h-0\">\r\n <mt-dashboard-item\r\n [config]=\"childChart.config\"\r\n [chartTypeId]=\"childChart.chartTypeId\"\r\n [readonly]=\"readonly()\"\r\n [builderMode]=\"!readonly()\"\r\n [extraFilters]=\"extraFilters()\"\r\n [reportId]=\"pageId()\"\r\n [inGroup]=\"true\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n (configureRequested)=\"\r\n editItem(childChart, chart, 'dataSource')\r\n \"\r\n (titleEdited)=\"\r\n onChartTitleEdited(childChart, $event)\r\n \"\r\n />\r\n </div>\r\n }\r\n }\r\n </ng-container>\r\n </mt-card-content>\r\n }\r\n </div>\r\n </gridster-item>\r\n }\r\n </gridster>\r\n\r\n <!-- Context Menu -->\r\n <p-contextMenu #contextMenu [model]=\"menuItems()\" appendTo=\"body\" />\r\n }\r\n\r\n <!-- Empty State -->\r\n @if (!loading() && !pageConfig()) {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-64 text-muted-color\"\r\n >\r\n <i class=\"mti mti-layout text-6xl mb-4\"></i>\r\n <p class=\"text-lg\">{{ t(\"noPageSelected\") }}</p>\r\n <p class=\"text-sm\">{{ t(\"selectPageToStart\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n", styles: [":host{display:block;height:100%}gridster.db-gridster-container{min-height:calc(100vh - 120px);height:100%}gridster.db-gridster-container .gridster-column{border-left:1px solid var(--p-primary-100)!important;border-right:1px solid var(--p-primary-100)!important}gridster.db-gridster-container .gridster-row{border-top:1px solid var(--p-primary-100)!important;border-bottom:1px solid var(--p-primary-100)!important}gridster.db-gridster-container.is-page{min-height:calc(100vh - 200px)}gridster-item.db-gridster-item{transition:none!important}gridster-item.db-gridster-item.db-gridster-item--properties-list{background:transparent!important;border-color:transparent!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important}gridster-item.db-gridster-item.db-gridster-item--properties-list:hover{border-color:transparent!important;box-shadow:none!important}gridster-item.db-gridster-item.db-gridster-item--topbar{background:transparent!important;border-color:transparent!important;border-width:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important}gridster-item.db-gridster-item.db-gridster-item--topbar:hover{border-color:transparent!important;box-shadow:none!important}.mti-spin{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.gridster-drop-indicator{position:absolute;background:var(--p-primary-100);border:2px dashed var(--p-primary-400);border-radius:8px;pointer-events:none;z-index:100}.db-card-actions{pointer-events:auto;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.25rem;max-width:calc(100% - 2.5rem)}@media(max-width:640px){.db-card-actions{top:.25rem;right:.25rem}}.mt-item-config-popover-host .p-dialog-content{padding:0!important;height:clamp(420px,70vh,720px);max-height:80vh}.mt-item-config-popover-host .p-dialog-header{display:none}@media(max-width:768px){.mt-item-config-popover-host{width:100%!important;max-width:100%!important;margin:0!important;inset:auto 0 0!important;border-radius:1rem 1rem 0 0!important;transform:none!important}.mt-item-config-popover-host .p-dialog-content{height:80vh;border-radius:1rem 1rem 0 0}}.db-context-popover{--p-popover-content-padding: .4rem;min-width:200px}.db-group-card-top-end{width:100%}.db-group-card-tabs{flex:1 1 auto;scrollbar-width:none}.db-group-card-tabs::-webkit-scrollbar{display:none}.db-group-card-tab{min-width:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: GridsterModule }, { kind: "component", type: i2$3.GridsterComponent, selector: "gridster", inputs: ["options"] }, { kind: "component", type: i2$3.GridsterItemComponent, selector: "gridster-item", inputs: ["item"], outputs: ["itemInit", "itemChange", "itemResize"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }, { kind: "ngmodule", type: ContextMenuModule }, { kind: "component", type: i3$1.ContextMenu, selector: "p-contextMenu, p-contextmenu, p-context-menu", inputs: ["model", "triggerEvent", "target", "global", "style", "styleClass", "autoZIndex", "baseZIndex", "id", "breakpoint", "ariaLabel", "ariaLabelledBy", "pressDelay", "appendTo", "motionOptions"], outputs: ["onShow", "onHide"] }, { kind: "component", type: DashboardItem, selector: "mt-dashboard-item", inputs: ["config", "chartTypeId", "readonly", "pageName", "inGroup", "isDialog", "queryParams", "extraFilters", "reportId", "ignoreQueryFilter", "builderMode"], outputs: ["actionTriggered", "configureRequested", "titleEdited"] }, { kind: "component", type: CardContentComponent, selector: "mt-card-content", inputs: ["title", "inGroup", "groupHeader", "headerConfig", "styleConfig", "cardStyleConfig", "density", "padding", "showHeader", "headerClickable", "isNoTopEnd", "isChart", "titleEditable"], outputs: ["headerClick", "titleChange"] }, { kind: "component", type: ItemCardMenuComponent, selector: "mt-item-card-menu", inputs: ["allowDuplicate", "hasLinkedDialog", "canLinkDialog"], outputs: ["action"] }, { kind: "pipe", type: FilterByGroupPipe, name: "filterByGroup" }], encapsulation: i0.ViewEncapsulation.None });
|
|
45164
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DashboardBuilder, isStandalone: true, selector: "mt-dashboard-builder", inputs: { isPage: { classPropertyName: "isPage", publicName: "isPage", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, backButton: { classPropertyName: "backButton", publicName: "backButton", isSignal: true, isRequired: false, transformFunction: null }, pageId: { classPropertyName: "pageId", publicName: "pageId", isSignal: true, isRequired: false, transformFunction: null }, standalone: { classPropertyName: "standalone", publicName: "standalone", isSignal: true, isRequired: false, transformFunction: null }, services: { classPropertyName: "services", publicName: "services", isSignal: true, isRequired: false, transformFunction: null }, dashboardData: { classPropertyName: "dashboardData", publicName: "dashboardData", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, informativeContext: { classPropertyName: "informativeContext", publicName: "informativeContext", isSignal: true, isRequired: false, transformFunction: null }, extraFilters: { classPropertyName: "extraFilters", publicName: "extraFilters", isSignal: true, isRequired: false, transformFunction: null }, lookups: { classPropertyName: "lookups", publicName: "lookups", isSignal: true, isRequired: false, transformFunction: null }, statuses: { classPropertyName: "statuses", publicName: "statuses", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dashboardData: "dashboardDataChange", pageChange: "pageChange", chartsChange: "chartsChange", onSave: "onSave", onBack: "onBack", onAddChart: "onAddChart", onEditChart: "onEditChart" }, host: { listeners: { "window:keydown": "onKeyDown($event)" } }, viewQueries: [{ propertyName: "contextMenu", first: true, predicate: ["contextMenu"], descendants: true, isSignal: true }, { propertyName: "gridsterContainer", first: true, predicate: ["gridsterContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Shared Actions Template -->\r\n <ng-template #actionsTemplate let-inPage=\"inPage\">\r\n <mt-button\r\n [label]=\"t('addWidget')\"\r\n icon=\"general.plus\"\r\n (onClick)=\"toggleWidgetPalette()\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n [label]=\"t('save')\"\r\n icon=\"general.save-02\"\r\n [loading]=\"saving()\"\r\n [disabled]=\"saving()\"\r\n (onClick)=\"saveDash()\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <span [class]=\"'w-px h-5 bg-surface-300'\"></span>\r\n\r\n <mt-button\r\n icon=\"arrow.reverse-left\"\r\n [tooltip]=\"t('undo')\"\r\n (onClick)=\"undo()\"\r\n [disabled]=\"!canUndo() || readonly()\"\r\n [severity]=\"'secondary'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n [icon]=\"stopActionsOnCards() ? 'media.play' : 'media.stop'\"\r\n [tooltip]=\"stopActionsOnCards() ? t('activateActions') : t('stopActions')\"\r\n (onClick)=\"stopAndActiveActions()\"\r\n [severity]=\"'warn'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n icon=\"general.edit-05\"\r\n [tooltip]=\"t('pageSettings')\"\r\n (onClick)=\"addOrEditPage(pageConfig()!)\"\r\n [severity]=\"'help'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n icon=\"general.filter-lines\"\r\n [tooltip]=\"t('manageFilter')\"\r\n (click)=\"$event.stopPropagation(); openManageFilter()\"\r\n [severity]=\"'info'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n </ng-template>\r\n\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"\r\n pageTitle() ||\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n t('builder')\r\n \"\r\n [backButton]=\"backButton()\"\r\n (backButtonClick)=\"onBack.emit()\"\r\n >\r\n <!-- Header actions -->\r\n <ng-template #headerEnd>\r\n <div class=\"flex items-center gap-2\">\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate; context: { inPage: true }\"\r\n />\r\n </div>\r\n </ng-template>\r\n\r\n <!-- Content -->\r\n <ng-container *ngTemplateOutlet=\"builderContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <ng-container *ngTemplateOutlet=\"builderContent\" />\r\n }\r\n\r\n <!-- Reusable builder content template -->\r\n <ng-template #builderContent>\r\n <div\r\n class=\"db-manage-dashboard-container relative h-full min-h-[600px]\"\r\n [attr.dir]=\"direction()\"\r\n >\r\n <!-- Loading State -->\r\n @if (loading()) {\r\n <div class=\"flex items-center justify-center h-64\">\r\n <i class=\"mti mti-spinner-third mti-spin text-4xl text-primary\"></i>\r\n </div>\r\n }\r\n\r\n <!-- Main Content -->\r\n @if (!loading() && pageConfig()) {\r\n <!-- Fixed Actions Bar (only when NOT page mode) -->\r\n @if (!isPage()) {\r\n <div\r\n class=\"fixed bottom-4 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 bg-surface-0 rounded-full shadow-lg px-4 py-2 border border-surface-200\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate; context: { inPage: false }\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Gridster Container -->\r\n <gridster\r\n #gridsterContainer\r\n [attr.dir]=\"direction()\"\r\n [options]=\"options\"\r\n class=\"db-gridster-container h-full min-h-[500px] bg-surface-50!\"\r\n [class.is-page]=\"isPage()\"\r\n [class.pointer-events-none]=\"readonly()\"\r\n (dragover)=\"onGridDragOver($event)\"\r\n (drop)=\"onGridDrop($event)\"\r\n >\r\n @for (chart of charts() | filterByGroup: undefined; track $index) {\r\n <gridster-item\r\n [item]=\"chart\"\r\n class=\"db-gridster-item bg-surface-0 rounded-lg shadow-sm border border-surface-200 overflow-hidden hover:shadow-md hover:border-surface-300\"\r\n [class.db-gridster-item--properties-list]=\"\r\n isPropertiesListChart(chart)\r\n \"\r\n [class.db-gridster-item--topbar]=\"isTopbarChart(chart)\"\r\n [class.ring-2]=\"isSelected(chart)\"\r\n [class.ring-primary]=\"isSelected(chart)\"\r\n [class.ring-offset-2]=\"isSelected(chart)\"\r\n [attr.data-chart-id]=\"chart.config?.serviceConfig?.dashboardId\"\r\n (click)=\"onSelect(chart, $event)\"\r\n >\r\n <!-- Chart Content -->\r\n <div\r\n class=\"db-gridster-item-content h-full w-full relative group\"\r\n [attr.dir]=\"direction()\"\r\n >\r\n <!-- Drag Handle -->\r\n @if (!readonly()) {\r\n <div\r\n class=\"drag-handler absolute top-0 left-0 right-0 h-6 cursor-move bg-gradient-to-b from-black/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center z-10\"\r\n >\r\n <i\r\n class=\"mti mti-grip-horizontal text-white/70 text-sm\"\r\n ></i>\r\n </div>\r\n }\r\n\r\n <!--\r\n Pass 7 \u2014 Single top-end Manage menu per chart card.\r\n Layout widgets (header/topbar/group) keep their dedicated\r\n affordances; chart cards have **only** the kebab.\r\n -->\r\n @if (\r\n !readonly() &&\r\n chart.config?.clientConfig?.componentName !== \"Group\"\r\n ) {\r\n <div\r\n class=\"db-card-actions absolute top-1 end-1 flex items-center gap-1 opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity z-20\"\r\n >\r\n <!-- Single kebab for chart cards (Pass 7 sole owner). -->\r\n @if (showContextToolbar(chart)) {\r\n <mt-item-card-menu\r\n [allowDuplicate]=\"true\"\r\n [hasLinkedDialog]=\"hasLinkedDialog(chart)\"\r\n [canLinkDialog]=\"canLinkDialog(chart)\"\r\n (action)=\"onItemCardMenuAction(chart, $event)\"\r\n />\r\n }\r\n\r\n <!-- Topbar: breadcrumb editor (layout-specific). -->\r\n @if (\r\n chart.config?.clientConfig?.componentName === \"topbar\"\r\n ) {\r\n <mt-button\r\n icon=\"general.slash-divider\"\r\n [tooltip]=\"t('manageBreadcrumb')\"\r\n (onClick)=\"openBreadcrumb(chart)\"\r\n severity=\"info\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n }\r\n\r\n <!--\r\n Header / topbar \u2014 quick style + delete.\r\n These widgets don't have a datasource so they don't\r\n use the chart kebab; the affordances stay minimal.\r\n -->\r\n @if (\r\n chart.config?.clientConfig?.componentName === \"header\" ||\r\n chart.config?.clientConfig?.componentName === \"topbar\"\r\n ) {\r\n <mt-button\r\n icon=\"general.edit-05\"\r\n [tooltip]=\"t('actions.editTitle')\"\r\n (onClick)=\"requestLayoutTitleEdit(chart, $event)\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n <mt-button\r\n icon=\"editor.palette\"\r\n [tooltip]=\"t('actions.style')\"\r\n (onClick)=\"openQuickManage($event, chart)\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n [tooltip]=\"t('actions.delete')\"\r\n (onClick)=\"deleteItem(chart)\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Chart Rendering -->\r\n @if (chart.config?.clientConfig?.componentName !== \"Group\") {\r\n @if (!chart.loading) {\r\n <mt-dashboard-item\r\n [config]=\"chart.config\"\r\n [chartTypeId]=\"chart.chartTypeId\"\r\n [readonly]=\"readonly()\"\r\n [builderMode]=\"!readonly()\"\r\n [extraFilters]=\"extraFilters()\"\r\n [reportId]=\"pageId()\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n (configureRequested)=\"configureChart(chart)\"\r\n (titleEdited)=\"onChartTitleEdited(chart, $event)\"\r\n />\r\n } @else {\r\n <div class=\"flex items-center justify-center h-full\">\r\n <i\r\n class=\"mti mti-spinner-third mti-spin text-2xl text-primary\"\r\n ></i>\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Group Children -->\r\n @if (chart.config?.clientConfig?.componentName === \"Group\") {\r\n <mt-card-content\r\n [title]=\"getGroupTitle(chart)\"\r\n [headerConfig]=\"getGroupHeaderConfig(chart)\"\r\n [styleConfig]=\"getGroupStyleConfig(chart)\"\r\n [cardStyleConfig]=\"getGroupCardStyleConfig(chart)\"\r\n [groupHeader]=\"true\"\r\n [isNoTopEnd]=\"false\"\r\n >\r\n <ng-container topEnd>\r\n <div\r\n class=\"db-group-card-top-end flex min-w-0 items-center justify-end gap-2\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <div\r\n class=\"db-group-card-tabs flex min-w-0 items-center gap-1 overflow-x-auto\"\r\n >\r\n @for (\r\n childChart of getGroupChildren(chart);\r\n track childChart.config?.serviceConfig?.dashboardId;\r\n let idx = $index\r\n ) {\r\n <button\r\n type=\"button\"\r\n class=\"db-group-card-tab h-8 max-w-48 shrink-0 truncate rounded-md px-3 text-sm font-medium transition-colors\"\r\n [class.bg-primary]=\"\r\n idx === (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [class.text-white]=\"\r\n idx === (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [class.text-muted-color]=\"\r\n idx !== (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [class.hover:bg-surface-100]=\"\r\n idx !== (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [title]=\"getItemTitle(childChart, idx)\"\r\n (click)=\"selectGroupChild(chart, idx, $event)\"\r\n >\r\n {{ getItemTitle(childChart, idx) }}\r\n </button>\r\n }\r\n </div>\r\n\r\n @if (!readonly()) {\r\n <div class=\"flex shrink-0 items-center gap-1\">\r\n @if (\r\n getSelectedGroupChild(chart);\r\n as selectedChild\r\n ) {\r\n <mt-item-card-menu\r\n [allowDuplicate]=\"true\"\r\n [hasLinkedDialog]=\"\r\n hasLinkedDialog(selectedChild)\r\n \"\r\n [canLinkDialog]=\"canLinkDialog(selectedChild)\"\r\n (action)=\"\r\n onItemCardMenuAction(\r\n selectedChild,\r\n $event,\r\n chart\r\n )\r\n \"\r\n />\r\n }\r\n <mt-button\r\n icon=\"general.edit-05\"\r\n [tooltip]=\"t('actions.editTitle')\"\r\n (onClick)=\"requestLayoutTitleEdit(chart, $event)\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n [tooltip]=\"t('removeGroup')\"\r\n (onClick)=\"removeGroup(chart)\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container body>\r\n @for (\r\n childChart of getGroupChildren(chart);\r\n track childChart.config?.serviceConfig?.dashboardId;\r\n let idx = $index\r\n ) {\r\n @if (idx === (chart.selectedGroupIndex ?? 0)) {\r\n <div class=\"h-full min-h-0\">\r\n <mt-dashboard-item\r\n [config]=\"childChart.config\"\r\n [chartTypeId]=\"childChart.chartTypeId\"\r\n [readonly]=\"readonly()\"\r\n [builderMode]=\"!readonly()\"\r\n [extraFilters]=\"extraFilters()\"\r\n [reportId]=\"pageId()\"\r\n [inGroup]=\"true\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n (configureRequested)=\"\r\n editItem(childChart, chart, 'dataSource')\r\n \"\r\n (titleEdited)=\"\r\n onChartTitleEdited(childChart, $event)\r\n \"\r\n />\r\n </div>\r\n }\r\n }\r\n </ng-container>\r\n </mt-card-content>\r\n }\r\n </div>\r\n </gridster-item>\r\n }\r\n </gridster>\r\n\r\n <!-- Context Menu -->\r\n <p-contextMenu #contextMenu [model]=\"menuItems()\" appendTo=\"body\" />\r\n }\r\n\r\n <!-- Empty State -->\r\n @if (!loading() && !pageConfig()) {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-64 text-muted-color\"\r\n >\r\n <i class=\"mti mti-layout text-6xl mb-4\"></i>\r\n <p class=\"text-lg\">{{ t(\"noPageSelected\") }}</p>\r\n <p class=\"text-sm\">{{ t(\"selectPageToStart\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n", styles: [":host{display:block;height:100%}gridster.db-gridster-container{min-height:calc(100vh - 120px);height:100%}gridster.db-gridster-container .gridster-column{border-left:1px solid var(--p-primary-100)!important;border-right:1px solid var(--p-primary-100)!important}gridster.db-gridster-container .gridster-row{border-top:1px solid var(--p-primary-100)!important;border-bottom:1px solid var(--p-primary-100)!important}gridster.db-gridster-container.is-page{min-height:calc(100vh - 200px)}gridster-item.db-gridster-item{transition:none!important}gridster-item.db-gridster-item.db-gridster-item--properties-list{background:transparent!important;border-color:transparent!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important}gridster-item.db-gridster-item.db-gridster-item--properties-list:hover{border-color:transparent!important;box-shadow:none!important}gridster-item.db-gridster-item.db-gridster-item--topbar{background:transparent!important;border-color:transparent!important;border-width:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important}gridster-item.db-gridster-item.db-gridster-item--topbar:hover{border-color:transparent!important;box-shadow:none!important}.mti-spin{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.gridster-drop-indicator{position:absolute;background:var(--p-primary-100);border:2px dashed var(--p-primary-400);border-radius:8px;pointer-events:none;z-index:100}.db-card-actions{pointer-events:auto;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.25rem;max-width:calc(100% - 2.5rem)}@media(max-width:640px){.db-card-actions{top:.25rem;right:.25rem}}.mt-item-config-popover-host .p-dialog-content{padding:0!important;height:clamp(420px,70vh,720px);max-height:80vh}.mt-item-config-popover-host .p-dialog-header{display:none}@media(max-width:768px){.mt-item-config-popover-host{width:100%!important;max-width:100%!important;margin:0!important;inset:auto 0 0!important;border-radius:1rem 1rem 0 0!important;transform:none!important}.mt-item-config-popover-host .p-dialog-content{height:80vh;border-radius:1rem 1rem 0 0}}.db-context-popover{--p-popover-content-padding: .4rem;min-width:200px}.db-group-card-top-end{width:100%}.db-group-card-tabs{flex:1 1 auto;scrollbar-width:none}.db-group-card-tabs::-webkit-scrollbar{display:none}.db-group-card-tab{min-width:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: GridsterModule }, { kind: "component", type: i2$3.GridsterComponent, selector: "gridster", inputs: ["options"] }, { kind: "component", type: i2$3.GridsterItemComponent, selector: "gridster-item", inputs: ["item"], outputs: ["itemInit", "itemChange", "itemResize"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }, { kind: "ngmodule", type: ContextMenuModule }, { kind: "component", type: i3$1.ContextMenu, selector: "p-contextMenu, p-contextmenu, p-context-menu", inputs: ["model", "triggerEvent", "target", "global", "style", "styleClass", "autoZIndex", "baseZIndex", "id", "breakpoint", "ariaLabel", "ariaLabelledBy", "pressDelay", "appendTo", "motionOptions"], outputs: ["onShow", "onHide"] }, { kind: "component", type: DashboardItem, selector: "mt-dashboard-item", inputs: ["config", "chartTypeId", "readonly", "pageName", "inGroup", "isDialog", "queryParams", "extraFilters", "reportId", "ignoreQueryFilter", "builderMode"], outputs: ["actionTriggered", "configureRequested", "titleEdited"] }, { kind: "component", type: CardContentComponent, selector: "mt-card-content", inputs: ["title", "inGroup", "groupHeader", "headerConfig", "styleConfig", "cardStyleConfig", "density", "padding", "showHeader", "headerClickable", "isNoTopEnd", "isChart", "titleEditable"], outputs: ["headerClick", "titleChange"] }, { kind: "component", type: ItemCardMenuComponent, selector: "mt-item-card-menu", inputs: ["allowDuplicate", "hasLinkedDialog", "canLinkDialog"], outputs: ["action"] }, { kind: "pipe", type: FilterByGroupPipe, name: "filterByGroup" }], encapsulation: i0.ViewEncapsulation.None });
|
|
44537
45165
|
}
|
|
44538
45166
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardBuilder, decorators: [{
|
|
44539
45167
|
type: Component,
|
|
@@ -44550,7 +45178,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
44550
45178
|
CardContentComponent,
|
|
44551
45179
|
ItemCardMenuComponent,
|
|
44552
45180
|
], encapsulation: ViewEncapsulation.None, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Shared Actions Template -->\r\n <ng-template #actionsTemplate let-inPage=\"inPage\">\r\n <mt-button\r\n [label]=\"t('addWidget')\"\r\n icon=\"general.plus\"\r\n (onClick)=\"toggleWidgetPalette()\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n [label]=\"t('save')\"\r\n icon=\"general.save-02\"\r\n [loading]=\"saving()\"\r\n [disabled]=\"saving()\"\r\n (onClick)=\"saveDash()\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <span [class]=\"'w-px h-5 bg-surface-300'\"></span>\r\n\r\n <mt-button\r\n icon=\"arrow.reverse-left\"\r\n [tooltip]=\"t('undo')\"\r\n (onClick)=\"undo()\"\r\n [disabled]=\"!canUndo() || readonly()\"\r\n [severity]=\"'secondary'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n [icon]=\"stopActionsOnCards() ? 'media.play' : 'media.stop'\"\r\n [tooltip]=\"stopActionsOnCards() ? t('activateActions') : t('stopActions')\"\r\n (onClick)=\"stopAndActiveActions()\"\r\n [severity]=\"'warn'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n icon=\"general.edit-05\"\r\n [tooltip]=\"t('pageSettings')\"\r\n (onClick)=\"addOrEditPage(pageConfig()!)\"\r\n [severity]=\"'help'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n icon=\"general.filter-lines\"\r\n [tooltip]=\"t('manageFilter')\"\r\n (click)=\"$event.stopPropagation(); openManageFilter()\"\r\n [severity]=\"'info'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n </ng-template>\r\n\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"\r\n pageTitle() ||\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n t('builder')\r\n \"\r\n [backButton]=\"backButton()\"\r\n (backButtonClick)=\"onBack.emit()\"\r\n >\r\n <!-- Header actions -->\r\n <ng-template #headerEnd>\r\n <div class=\"flex items-center gap-2\">\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate; context: { inPage: true }\"\r\n />\r\n </div>\r\n </ng-template>\r\n\r\n <!-- Content -->\r\n <ng-container *ngTemplateOutlet=\"builderContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <ng-container *ngTemplateOutlet=\"builderContent\" />\r\n }\r\n\r\n <!-- Reusable builder content template -->\r\n <ng-template #builderContent>\r\n <div\r\n class=\"db-manage-dashboard-container relative h-full min-h-[600px]\"\r\n [attr.dir]=\"direction()\"\r\n >\r\n <!-- Loading State -->\r\n @if (loading()) {\r\n <div class=\"flex items-center justify-center h-64\">\r\n <i class=\"mti mti-spinner-third mti-spin text-4xl text-primary\"></i>\r\n </div>\r\n }\r\n\r\n <!-- Main Content -->\r\n @if (!loading() && pageConfig()) {\r\n <!-- Fixed Actions Bar (only when NOT page mode) -->\r\n @if (!isPage()) {\r\n <div\r\n class=\"fixed bottom-4 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 bg-surface-0 rounded-full shadow-lg px-4 py-2 border border-surface-200\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate; context: { inPage: false }\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Gridster Container -->\r\n <gridster\r\n #gridsterContainer\r\n [attr.dir]=\"direction()\"\r\n [options]=\"options\"\r\n class=\"db-gridster-container h-full min-h-[500px] bg-surface-50!\"\r\n [class.is-page]=\"isPage()\"\r\n [class.pointer-events-none]=\"readonly()\"\r\n (dragover)=\"onGridDragOver($event)\"\r\n (drop)=\"onGridDrop($event)\"\r\n >\r\n @for (chart of charts() | filterByGroup: undefined; track $index) {\r\n <gridster-item\r\n [item]=\"chart\"\r\n class=\"db-gridster-item bg-surface-0 rounded-lg shadow-sm border border-surface-200 overflow-hidden hover:shadow-md hover:border-surface-300\"\r\n [class.db-gridster-item--properties-list]=\"\r\n isPropertiesListChart(chart)\r\n \"\r\n [class.db-gridster-item--topbar]=\"isTopbarChart(chart)\"\r\n [class.ring-2]=\"isSelected(chart)\"\r\n [class.ring-primary]=\"isSelected(chart)\"\r\n [class.ring-offset-2]=\"isSelected(chart)\"\r\n [attr.data-chart-id]=\"chart.config?.serviceConfig?.dashboardId\"\r\n (click)=\"onSelect(chart, $event)\"\r\n >\r\n <!-- Chart Content -->\r\n <div\r\n class=\"db-gridster-item-content h-full w-full relative group\"\r\n [attr.dir]=\"direction()\"\r\n >\r\n <!-- Drag Handle -->\r\n @if (!readonly()) {\r\n <div\r\n class=\"drag-handler absolute top-0 left-0 right-0 h-6 cursor-move bg-gradient-to-b from-black/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center z-10\"\r\n >\r\n <i\r\n class=\"mti mti-grip-horizontal text-white/70 text-sm\"\r\n ></i>\r\n </div>\r\n }\r\n\r\n <!--\r\n Pass 7 \u2014 Single top-end Manage menu per chart card.\r\n Layout widgets (header/topbar/group) keep their dedicated\r\n affordances; chart cards have **only** the kebab.\r\n -->\r\n @if (\r\n !readonly() &&\r\n chart.config?.clientConfig?.componentName !== \"Group\"\r\n ) {\r\n <div\r\n class=\"db-card-actions absolute top-1 end-1 flex items-center gap-1 opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity z-20\"\r\n >\r\n <!-- Single kebab for chart cards (Pass 7 sole owner). -->\r\n @if (showContextToolbar(chart)) {\r\n <mt-item-card-menu\r\n [allowDuplicate]=\"true\"\r\n [hasLinkedDialog]=\"hasLinkedDialog(chart)\"\r\n [canLinkDialog]=\"canLinkDialog(chart)\"\r\n (action)=\"onItemCardMenuAction(chart, $event)\"\r\n />\r\n }\r\n\r\n <!-- Topbar: breadcrumb editor (layout-specific). -->\r\n @if (\r\n chart.config?.clientConfig?.componentName === \"topbar\"\r\n ) {\r\n <mt-button\r\n icon=\"general.slash-divider\"\r\n [tooltip]=\"t('manageBreadcrumb')\"\r\n (onClick)=\"openBreadcrumb(chart)\"\r\n severity=\"info\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n }\r\n\r\n <!--\r\n Header / topbar \u2014 quick style + delete.\r\n These widgets don't have a datasource so they don't\r\n use the chart kebab; the affordances stay minimal.\r\n -->\r\n @if (\r\n chart.config?.clientConfig?.componentName === \"header\" ||\r\n chart.config?.clientConfig?.componentName === \"topbar\"\r\n ) {\r\n <mt-button\r\n icon=\"general.edit-05\"\r\n [tooltip]=\"t('actions.editTitle')\"\r\n (onClick)=\"requestLayoutTitleEdit(chart, $event)\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n <mt-button\r\n icon=\"editor.palette\"\r\n [tooltip]=\"t('actions.style')\"\r\n (onClick)=\"openQuickManage($event, chart)\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n [tooltip]=\"t('actions.delete')\"\r\n (onClick)=\"deleteItem(chart)\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Chart Rendering -->\r\n @if (chart.config?.clientConfig?.componentName !== \"Group\") {\r\n @if (!chart.loading) {\r\n <mt-dashboard-item\r\n [config]=\"chart.config\"\r\n [chartTypeId]=\"chart.chartTypeId\"\r\n [readonly]=\"readonly()\"\r\n [builderMode]=\"!readonly()\"\r\n [extraFilters]=\"extraFilters()\"\r\n [reportId]=\"pageId()\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n (configureRequested)=\"configureChart(chart)\"\r\n (titleEdited)=\"onChartTitleEdited(chart, $event)\"\r\n />\r\n } @else {\r\n <div class=\"flex items-center justify-center h-full\">\r\n <i\r\n class=\"mti mti-spinner-third mti-spin text-2xl text-primary\"\r\n ></i>\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Group Children -->\r\n @if (chart.config?.clientConfig?.componentName === \"Group\") {\r\n <mt-card-content\r\n [title]=\"getGroupTitle(chart)\"\r\n [headerConfig]=\"getGroupHeaderConfig(chart)\"\r\n [styleConfig]=\"getGroupStyleConfig(chart)\"\r\n [cardStyleConfig]=\"getGroupCardStyleConfig(chart)\"\r\n [groupHeader]=\"true\"\r\n [isNoTopEnd]=\"false\"\r\n >\r\n <ng-container topEnd>\r\n <div\r\n class=\"db-group-card-top-end flex min-w-0 items-center justify-end gap-2\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <div\r\n class=\"db-group-card-tabs flex min-w-0 items-center gap-1 overflow-x-auto\"\r\n >\r\n @for (\r\n childChart of getGroupChildren(chart);\r\n track childChart.config?.serviceConfig?.dashboardId;\r\n let idx = $index\r\n ) {\r\n <button\r\n type=\"button\"\r\n class=\"db-group-card-tab h-8 max-w-48 shrink-0 truncate rounded-md px-3 text-sm font-medium transition-colors\"\r\n [class.bg-primary]=\"\r\n idx === (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [class.text-white]=\"\r\n idx === (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [class.text-muted-color]=\"\r\n idx !== (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [class.hover:bg-surface-100]=\"\r\n idx !== (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [title]=\"getItemTitle(childChart, idx)\"\r\n (click)=\"selectGroupChild(chart, idx, $event)\"\r\n >\r\n {{ getItemTitle(childChart, idx) }}\r\n </button>\r\n }\r\n </div>\r\n\r\n @if (!readonly()) {\r\n <div class=\"flex shrink-0 items-center gap-1\">\r\n @if (\r\n getSelectedGroupChild(chart);\r\n as selectedChild\r\n ) {\r\n <mt-item-card-menu\r\n [allowDuplicate]=\"true\"\r\n [hasLinkedDialog]=\"\r\n hasLinkedDialog(selectedChild)\r\n \"\r\n [canLinkDialog]=\"canLinkDialog(selectedChild)\"\r\n (action)=\"\r\n onItemCardMenuAction(\r\n selectedChild,\r\n $event,\r\n chart\r\n )\r\n \"\r\n />\r\n }\r\n <mt-button\r\n icon=\"general.edit-05\"\r\n [tooltip]=\"t('actions.editTitle')\"\r\n (onClick)=\"requestLayoutTitleEdit(chart, $event)\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n [tooltip]=\"t('removeGroup')\"\r\n (onClick)=\"removeGroup(chart)\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container body>\r\n @for (\r\n childChart of getGroupChildren(chart);\r\n track childChart.config?.serviceConfig?.dashboardId;\r\n let idx = $index\r\n ) {\r\n @if (idx === (chart.selectedGroupIndex ?? 0)) {\r\n <div class=\"h-full min-h-0\">\r\n <mt-dashboard-item\r\n [config]=\"childChart.config\"\r\n [chartTypeId]=\"childChart.chartTypeId\"\r\n [readonly]=\"readonly()\"\r\n [builderMode]=\"!readonly()\"\r\n [extraFilters]=\"extraFilters()\"\r\n [reportId]=\"pageId()\"\r\n [inGroup]=\"true\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n (configureRequested)=\"\r\n editItem(childChart, chart, 'dataSource')\r\n \"\r\n (titleEdited)=\"\r\n onChartTitleEdited(childChart, $event)\r\n \"\r\n />\r\n </div>\r\n }\r\n }\r\n </ng-container>\r\n </mt-card-content>\r\n }\r\n </div>\r\n </gridster-item>\r\n }\r\n </gridster>\r\n\r\n <!-- Context Menu -->\r\n <p-contextMenu #contextMenu [model]=\"menuItems()\" appendTo=\"body\" />\r\n }\r\n\r\n <!-- Empty State -->\r\n @if (!loading() && !pageConfig()) {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-64 text-muted-color\"\r\n >\r\n <i class=\"mti mti-layout text-6xl mb-4\"></i>\r\n <p class=\"text-lg\">{{ t(\"noPageSelected\") }}</p>\r\n <p class=\"text-sm\">{{ t(\"selectPageToStart\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n", styles: [":host{display:block;height:100%}gridster.db-gridster-container{min-height:calc(100vh - 120px);height:100%}gridster.db-gridster-container .gridster-column{border-left:1px solid var(--p-primary-100)!important;border-right:1px solid var(--p-primary-100)!important}gridster.db-gridster-container .gridster-row{border-top:1px solid var(--p-primary-100)!important;border-bottom:1px solid var(--p-primary-100)!important}gridster.db-gridster-container.is-page{min-height:calc(100vh - 200px)}gridster-item.db-gridster-item{transition:none!important}gridster-item.db-gridster-item.db-gridster-item--properties-list{background:transparent!important;border-color:transparent!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important}gridster-item.db-gridster-item.db-gridster-item--properties-list:hover{border-color:transparent!important;box-shadow:none!important}gridster-item.db-gridster-item.db-gridster-item--topbar{background:transparent!important;border-color:transparent!important;border-width:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important}gridster-item.db-gridster-item.db-gridster-item--topbar:hover{border-color:transparent!important;box-shadow:none!important}.mti-spin{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.gridster-drop-indicator{position:absolute;background:var(--p-primary-100);border:2px dashed var(--p-primary-400);border-radius:8px;pointer-events:none;z-index:100}.db-card-actions{pointer-events:auto;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.25rem;max-width:calc(100% - 2.5rem)}@media(max-width:640px){.db-card-actions{top:.25rem;right:.25rem}}.mt-item-config-popover-host .p-dialog-content{padding:0!important;height:clamp(420px,70vh,720px);max-height:80vh}.mt-item-config-popover-host .p-dialog-header{display:none}@media(max-width:768px){.mt-item-config-popover-host{width:100%!important;max-width:100%!important;margin:0!important;inset:auto 0 0!important;border-radius:1rem 1rem 0 0!important;transform:none!important}.mt-item-config-popover-host .p-dialog-content{height:80vh;border-radius:1rem 1rem 0 0}}.db-context-popover{--p-popover-content-padding: .4rem;min-width:200px}.db-group-card-top-end{width:100%}.db-group-card-tabs{flex:1 1 auto;scrollbar-width:none}.db-group-card-tabs::-webkit-scrollbar{display:none}.db-group-card-tab{min-width:0}\n"] }]
|
|
44553
|
-
}], ctorParameters: () => [], propDecorators: { isPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPage", required: false }] }], pageTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageTitle", required: false }] }], backButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "backButton", required: false }] }], pageId: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageId", required: false }] }], standalone: [{ type: i0.Input, args: [{ isSignal: true, alias: "standalone", required: false }] }], services: [{ type: i0.Input, args: [{ isSignal: true, alias: "services", required: false }] }], dashboardData: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardData", required: false }] }, { type: i0.Output, args: ["dashboardDataChange"] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], informativeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "informativeContext", required: false }] }], extraFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "extraFilters", required: false }] }], pageChange: [{ type: i0.Output, args: ["pageChange"] }], chartsChange: [{ type: i0.Output, args: ["chartsChange"] }], onSave: [{ type: i0.Output, args: ["onSave"] }], onBack: [{ type: i0.Output, args: ["onBack"] }], onAddChart: [{ type: i0.Output, args: ["onAddChart"] }], onEditChart: [{ type: i0.Output, args: ["onEditChart"] }], contextMenu: [{ type: i0.ViewChild, args: ['contextMenu', { isSignal: true }] }], gridsterContainer: [{ type: i0.ViewChild, args: ['gridsterContainer', { isSignal: true }] }], onKeyDown: [{
|
|
45181
|
+
}], ctorParameters: () => [], propDecorators: { isPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPage", required: false }] }], pageTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageTitle", required: false }] }], backButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "backButton", required: false }] }], pageId: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageId", required: false }] }], standalone: [{ type: i0.Input, args: [{ isSignal: true, alias: "standalone", required: false }] }], services: [{ type: i0.Input, args: [{ isSignal: true, alias: "services", required: false }] }], dashboardData: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardData", required: false }] }, { type: i0.Output, args: ["dashboardDataChange"] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], informativeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "informativeContext", required: false }] }], extraFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "extraFilters", required: false }] }], lookups: [{ type: i0.Input, args: [{ isSignal: true, alias: "lookups", required: false }] }], statuses: [{ type: i0.Input, args: [{ isSignal: true, alias: "statuses", required: false }] }], pageChange: [{ type: i0.Output, args: ["pageChange"] }], chartsChange: [{ type: i0.Output, args: ["chartsChange"] }], onSave: [{ type: i0.Output, args: ["onSave"] }], onBack: [{ type: i0.Output, args: ["onBack"] }], onAddChart: [{ type: i0.Output, args: ["onAddChart"] }], onEditChart: [{ type: i0.Output, args: ["onEditChart"] }], contextMenu: [{ type: i0.ViewChild, args: ['contextMenu', { isSignal: true }] }], gridsterContainer: [{ type: i0.ViewChild, args: ['gridsterContainer', { isSignal: true }] }], onKeyDown: [{
|
|
44554
45182
|
type: HostListener,
|
|
44555
45183
|
args: ['window:keydown', ['$event']]
|
|
44556
45184
|
}] } });
|
|
@@ -44840,6 +45468,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
44840
45468
|
}]
|
|
44841
45469
|
}] });
|
|
44842
45470
|
|
|
45471
|
+
function getChangedQueryParamKeys(previous, next) {
|
|
45472
|
+
return Array.from(new Set([...Object.keys(previous ?? {}), ...Object.keys(next ?? {})])).filter((key) => {
|
|
45473
|
+
try {
|
|
45474
|
+
return JSON.stringify(previous?.[key]) !== JSON.stringify(next?.[key]);
|
|
45475
|
+
}
|
|
45476
|
+
catch {
|
|
45477
|
+
return previous?.[key] !== next?.[key];
|
|
45478
|
+
}
|
|
45479
|
+
});
|
|
45480
|
+
}
|
|
45481
|
+
function stringReferencesQueryParam(value, queryParamKeys) {
|
|
45482
|
+
return Array.from(value.matchAll(/\{\{([^{}]+)\}\}\??/g)).some((match) => {
|
|
45483
|
+
const expression = match[1].replace(/\?/g, '');
|
|
45484
|
+
return Array.from(queryParamKeys).some((key) => {
|
|
45485
|
+
const escapedKey = key.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
45486
|
+
return new RegExp(`(^|[^A-Za-z0-9_.-])${escapedKey}($|[^A-Za-z0-9_.-])`).test(expression);
|
|
45487
|
+
});
|
|
45488
|
+
});
|
|
45489
|
+
}
|
|
45490
|
+
function configReferencesQueryParams(value, queryParamKeys, visited = new Set()) {
|
|
45491
|
+
if (typeof value === 'string') {
|
|
45492
|
+
return stringReferencesQueryParam(value, queryParamKeys);
|
|
45493
|
+
}
|
|
45494
|
+
if (!value || typeof value !== 'object' || visited.has(value))
|
|
45495
|
+
return false;
|
|
45496
|
+
visited.add(value);
|
|
45497
|
+
if (!Array.isArray(value) &&
|
|
45498
|
+
value['type'] ===
|
|
45499
|
+
'realationBetweenPageFilters' &&
|
|
45500
|
+
queryParamKeys.has(String(value['key'] ?? ''))) {
|
|
45501
|
+
return true;
|
|
45502
|
+
}
|
|
45503
|
+
return Object.values(value).some((nested) => configReferencesQueryParams(nested, queryParamKeys, visited));
|
|
45504
|
+
}
|
|
44843
45505
|
/**
|
|
44844
45506
|
* Dashboard Viewer Component
|
|
44845
45507
|
*
|
|
@@ -44898,12 +45560,19 @@ class DashboardViewer {
|
|
|
44898
45560
|
filtersData = input([], ...(ngDevMode ? [{ debugName: "filtersData" }] : /* istanbul ignore next */ []));
|
|
44899
45561
|
/** Dashboard-wide extra filters applied to every item request */
|
|
44900
45562
|
extraFilters = input({}, ...(ngDevMode ? [{ debugName: "extraFilters" }] : /* istanbul ignore next */ []));
|
|
45563
|
+
/** Host-owned lookup metadata shared with runtime client forms. */
|
|
45564
|
+
lookups = input(null, ...(ngDevMode ? [{ debugName: "lookups" }] : /* istanbul ignore next */ []));
|
|
45565
|
+
/** Host-owned canonical or legacy status metadata for runtime filters. */
|
|
45566
|
+
statuses = input(null, ...(ngDevMode ? [{ debugName: "statuses" }] : /* istanbul ignore next */ []));
|
|
44901
45567
|
/** Enable page-wide runtime filters. */
|
|
44902
45568
|
showFilters = input(true, ...(ngDevMode ? [{ debugName: "showFilters" }] : /* istanbul ignore next */ []));
|
|
44903
45569
|
/** Render the built-in, in-flow button that opens page runtime filters. */
|
|
44904
45570
|
showFilterTrigger = input(true, ...(ngDevMode ? [{ debugName: "showFilterTrigger" }] : /* istanbul ignore next */ []));
|
|
44905
45571
|
/** Host-wide opt-out from URL/query filters for every chart. */
|
|
44906
45572
|
ignoreQueryFilter = input(false, ...(ngDevMode ? [{ debugName: "ignoreQueryFilter" }] : /* istanbul ignore next */ []));
|
|
45573
|
+
filterMetadataEffect = effect(() => {
|
|
45574
|
+
this.dashboardService.setFilterMetadata(this.lookups(), this.statuses());
|
|
45575
|
+
}, ...(ngDevMode ? [{ debugName: "filterMetadataEffect" }] : /* istanbul ignore next */ []));
|
|
44907
45576
|
// ============================================
|
|
44908
45577
|
// Outputs
|
|
44909
45578
|
// ============================================
|
|
@@ -44927,6 +45596,8 @@ class DashboardViewer {
|
|
|
44927
45596
|
// ============================================
|
|
44928
45597
|
languageCode = computed(() => this.storeService.languageCode(), ...(ngDevMode ? [{ debugName: "languageCode" }] : /* istanbul ignore next */ []));
|
|
44929
45598
|
direction = computed(() => this.storeService.direction(), ...(ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []));
|
|
45599
|
+
/** URL-backed page-filter values forwarded explicitly to each dashboard item. */
|
|
45600
|
+
pageQueryParams = computed(() => this.storeService.queryParams(), ...(ngDevMode ? [{ debugName: "pageQueryParams" }] : /* istanbul ignore next */ []));
|
|
44930
45601
|
hasRenderableContent = computed(() => {
|
|
44931
45602
|
return (!!this.pageConfig() ||
|
|
44932
45603
|
this.charts().length > 0 ||
|
|
@@ -45011,10 +45682,6 @@ class DashboardViewer {
|
|
|
45011
45682
|
extraFiltersEffect = effect(() => {
|
|
45012
45683
|
const extraFilters = this.extraFilters() ?? {};
|
|
45013
45684
|
const signature = JSON.stringify(extraFilters);
|
|
45014
|
-
console.log(`[DashboardViewer] Extra filters received:\n${JSON.stringify({
|
|
45015
|
-
pageId: this.pageId(),
|
|
45016
|
-
extraFilters,
|
|
45017
|
-
}, null, 2)}`);
|
|
45018
45685
|
if (this.lastExtraFiltersSignature === null) {
|
|
45019
45686
|
this.lastExtraFiltersSignature = signature;
|
|
45020
45687
|
return;
|
|
@@ -45076,8 +45743,10 @@ class DashboardViewer {
|
|
|
45076
45743
|
this.dashboardService.setActivatedRoute(this.route);
|
|
45077
45744
|
if (this.route) {
|
|
45078
45745
|
this.subscription.add(this.route.queryParams.subscribe((params) => {
|
|
45079
|
-
this.storeService.
|
|
45080
|
-
|
|
45746
|
+
const previous = this.storeService.getQueryParams() ?? {};
|
|
45747
|
+
const next = params ?? {};
|
|
45748
|
+
this.storeService.updateQueryParams(next);
|
|
45749
|
+
this.refreshItemsForQueryParamChanges(previous, next);
|
|
45081
45750
|
}));
|
|
45082
45751
|
}
|
|
45083
45752
|
// Subscribe to reload events from store
|
|
@@ -45087,9 +45756,10 @@ class DashboardViewer {
|
|
|
45087
45756
|
}
|
|
45088
45757
|
/**
|
|
45089
45758
|
* Apply page-filter selections. Preferred path: write them onto the URL so
|
|
45090
|
-
* the `route.queryParams` subscription funnels them into the store
|
|
45091
|
-
*
|
|
45092
|
-
*
|
|
45759
|
+
* the `route.queryParams` subscription funnels them into the store. Only
|
|
45760
|
+
* charts whose request config references a changed key are re-requested.
|
|
45761
|
+
* With no route (preview), update the same store and targeting pipeline
|
|
45762
|
+
* directly.
|
|
45093
45763
|
*/
|
|
45094
45764
|
onPageFilterChange(values) {
|
|
45095
45765
|
if (this.route) {
|
|
@@ -45100,9 +45770,10 @@ class DashboardViewer {
|
|
|
45100
45770
|
});
|
|
45101
45771
|
return;
|
|
45102
45772
|
}
|
|
45103
|
-
const
|
|
45773
|
+
const current = this.storeService.getQueryParams() ?? {};
|
|
45774
|
+
const merged = this.mergeActiveQueryParams(current, values);
|
|
45104
45775
|
this.storeService.updateQueryParams(merged);
|
|
45105
|
-
this.
|
|
45776
|
+
this.refreshItemsForQueryParamChanges(current, merged);
|
|
45106
45777
|
}
|
|
45107
45778
|
toggleFiltersPanel() {
|
|
45108
45779
|
if (this.filtersPanelOpen()) {
|
|
@@ -45572,8 +46243,23 @@ class DashboardViewer {
|
|
|
45572
46243
|
}
|
|
45573
46244
|
});
|
|
45574
46245
|
}
|
|
46246
|
+
refreshItemsForQueryParamChanges(previous, next) {
|
|
46247
|
+
const changedKeys = getChangedQueryParamKeys(previous, next);
|
|
46248
|
+
if (!changedKeys.length)
|
|
46249
|
+
return;
|
|
46250
|
+
const keySet = new Set(changedKeys);
|
|
46251
|
+
this.charts().forEach((chart) => {
|
|
46252
|
+
if (this.shouldIgnoreQueryFilter(chart) ||
|
|
46253
|
+
!configReferencesQueryParams(chart.config?.serviceConfig, keySet)) {
|
|
46254
|
+
return;
|
|
46255
|
+
}
|
|
46256
|
+
const dashboardId = chart.config?.serviceConfig?.dashboardId;
|
|
46257
|
+
if (dashboardId)
|
|
46258
|
+
this.itemStoreService.triggerDataFetch(dashboardId);
|
|
46259
|
+
});
|
|
46260
|
+
}
|
|
45575
46261
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardViewer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
45576
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DashboardViewer, isStandalone: true, selector: "mt-dashboard-viewer", inputs: { isPage: { classPropertyName: "isPage", publicName: "isPage", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, backButton: { classPropertyName: "backButton", publicName: "backButton", isSignal: true, isRequired: false, transformFunction: null }, pageId: { classPropertyName: "pageId", publicName: "pageId", isSignal: true, isRequired: false, transformFunction: null }, dashboardData: { classPropertyName: "dashboardData", publicName: "dashboardData", isSignal: true, isRequired: false, transformFunction: null }, chartsData: { classPropertyName: "chartsData", publicName: "chartsData", isSignal: true, isRequired: false, transformFunction: null }, dialogsData: { classPropertyName: "dialogsData", publicName: "dialogsData", isSignal: true, isRequired: false, transformFunction: null }, filtersData: { classPropertyName: "filtersData", publicName: "filtersData", isSignal: true, isRequired: false, transformFunction: null }, extraFilters: { classPropertyName: "extraFilters", publicName: "extraFilters", isSignal: true, isRequired: false, transformFunction: null }, showFilters: { classPropertyName: "showFilters", publicName: "showFilters", isSignal: true, isRequired: false, transformFunction: null }, showFilterTrigger: { classPropertyName: "showFilterTrigger", publicName: "showFilterTrigger", isSignal: true, isRequired: false, transformFunction: null }, ignoreQueryFilter: { classPropertyName: "ignoreQueryFilter", publicName: "ignoreQueryFilter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageLoaded: "pageLoaded", onBack: "onBack", chartClick: "chartClick" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"\r\n pageTitle() ||\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n t('dashboard')\r\n \"\r\n [backButton]=\"backButton()\"\r\n (backButtonClick)=\"onBack.emit()\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\r\n }\r\n\r\n <!-- Reusable viewer content template -->\r\n <ng-template #viewerContent>\r\n <div class=\"relative h-full min-h-[600px] mt-dashboard-viewer\">\r\n @if (!loading() && hasRenderableContent()) {\r\n @if (showFilters() && showFilterTrigger() && hasPageFilters()) {\r\n <div\r\n class=\"dashboard-viewer-filter-toolbar mb-3 flex items-center justify-end\"\r\n >\r\n <mt-button\r\n [label]=\"t('manageFilter')\"\r\n icon=\"general.filter-funnel-01\"\r\n variant=\"outlined\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [tooltip]=\"t('manageFilter')\"\r\n (click)=\"$event.stopPropagation(); openFiltersPanel()\"\r\n />\r\n </div>\r\n }\r\n\r\n <div class=\"dashboard-viewer-layout-wrapper\">\r\n <div\r\n class=\"dashboard-viewer-layout\"\r\n [style.min-height]=\"layoutHeight()\"\r\n >\r\n @for (\r\n item of visibleItems();\r\n track trackByDashboardId($index, item)\r\n ) {\r\n <div\r\n class=\"dashboard-viewer-item\"\r\n [class.dashboard-viewer-item--group]=\"isGroup(item)\"\r\n [class.dashboard-viewer-item--header]=\"isHeader(item)\"\r\n [class.dashboard-viewer-item--topbar]=\"isTopbar(item)\"\r\n [style.grid-column]=\"getGridColumn(item)\"\r\n [style.grid-row]=\"getGridRow(item)\"\r\n >\r\n <!-- Group Container -->\r\n @if (isGroup(item)) {\r\n @if (!item.loading) {\r\n <div\r\n class=\"group-container h-full flex flex-col rounded-lg border border-surface-200 overflow-hidden\"\r\n [style.background-color]=\"\r\n getStyleConfig(item)['background-color'] ||\r\n 'var(--surface-card)'\r\n \"\r\n >\r\n <!-- Group Header with Tabs -->\r\n <div\r\n class=\"group-header flex items-center justify-between px-4 py-2 bg-surface-50 border-b border-surface-200\"\r\n >\r\n <span class=\"font-medium text-sm\">{{\r\n getGroupTitle(item)\r\n }}</span>\r\n <div class=\"group-tabs flex items-center gap-1\">\r\n @for (\r\n child of getGroupChildren(item);\r\n track child.config?.serviceConfig?.dashboardId;\r\n let gIndex = $index\r\n ) {\r\n @if (getItemIcon(child); as icon) {\r\n <button\r\n type=\"button\"\r\n class=\"w-8 h-8 flex items-center justify-center rounded transition-colors\"\r\n [class.bg-primary-100]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.text-primary-600]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.text-muted-color]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n [class.hover:bg-surface-100]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n (click)=\"selectGroupChild(item, gIndex)\"\r\n >\r\n <i class=\"mti mti-{{ icon }}\"></i>\r\n </button>\r\n } @else {\r\n <button\r\n pButton\r\n type=\"button\"\r\n class=\"p-button-text p-button-sm\"\r\n [class.p-button-primary]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.p-button-secondary]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n [label]=\"getItemTitle(child)\"\r\n (click)=\"selectGroupChild(item, gIndex)\"\r\n ></button>\r\n }\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Group Body - Selected Child Content -->\r\n <div class=\"group-body flex-1 min-h-0\">\r\n @if (\r\n item.selectedGroupIndex !== null &&\r\n item.selectedGroupIndex !== undefined\r\n ) {\r\n @for (\r\n child of getGroupChildren(item);\r\n track child.config?.serviceConfig?.dashboardId;\r\n let cIndex = $index\r\n ) {\r\n @if (\r\n cIndex === item.selectedGroupIndex &&\r\n !child.loading\r\n ) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"child.config\"\r\n [chartTypeId]=\"child.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"\r\n shouldIgnoreQueryFilter(child)\r\n \"\r\n [inGroup]=\"true\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n }\r\n }\r\n <!-- Header Item -->\r\n @else if (isHeader(item)) {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n <!-- Topbar Item -->\r\n @else if (isTopbar(item)) {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n <!-- Regular Chart Item -->\r\n @else {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Hidden Dialogs (for modal rendering) -->\r\n @if (dialogs().length > 0) {\r\n <div class=\"hidden\">\r\n @for (\r\n dialog of dialogs();\r\n track dialog.config?.serviceConfig?.dashboardId\r\n ) {\r\n <!-- Dialog placeholder - will be rendered in modal when triggered -->\r\n <div\r\n [attr.data-dialog-id]=\"\r\n dialog.config?.serviceConfig?.dashboardId\r\n \"\r\n ></div>\r\n }\r\n </div>\r\n }\r\n } @else if (loading()) {\r\n <!-- Loading State -->\r\n <div class=\"flex items-center justify-center h-64\">\r\n <div class=\"text-center\">\r\n <i\r\n class=\"mti mti-loader-2 text-4xl text-primary animate-spin mb-2\"\r\n ></i>\r\n <p class=\"text-muted-color\">{{ t(\"loading\") }}</p>\r\n </div>\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-64 text-muted-color\"\r\n >\r\n <i class=\"mti mti-layout text-6xl mb-4\"></i>\r\n <p class=\"text-lg\">{{ t(\"noPageSelected\") }}</p>\r\n <p class=\"text-sm\">{{ t(\"selectPageToStart\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n", styles: [".mt-dashboard-viewer{width:100%;height:100%}.dashboard-viewer-layout-wrapper{width:100%}.dashboard-viewer-layout{display:grid;grid-template-columns:repeat(36,minmax(0,1fr));grid-auto-rows:60px;gap:10px;width:100%;align-items:stretch}.dashboard-viewer-item{display:flex;min-width:0;min-height:0}.dashboard-viewer-item>*{width:100%;height:100%}.dashboard-viewer-content-item{display:block;flex:1 1 auto;min-width:0;min-height:0;width:100%;height:100%}.dashboard-viewer-item--header{z-index:1;overflow:hidden;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.5rem;background:var(--p-surface-0, #fff);box-shadow:0 1px 2px #0f172a14}.dashboard-viewer-item--topbar{z-index:2;overflow:visible;border:0;border-radius:0;background:transparent;box-shadow:none}.group-container{background-color:var(--surface-card)}.group-header{flex-shrink:0}.group-tabs{flex-wrap:wrap}.group-body{background-color:var(--surface-0)}.header-item{background-color:transparent}.topbar-item{background-color:var(--surface-50)}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.table-responsive{max-height:75vh;overflow-y:auto;overflow-x:auto}.modal-content{border:0!important}.custom-donut-chart{display:flex;justify-content:center;height:auto!important}.custom-donut-chart canvas{margin-top:-1.5rem!important}@media(max-width:768px){.dashboard-viewer-layout{display:flex;flex-direction:column;min-height:0!important}.dashboard-viewer-item{min-height:220px}.dashboard-viewer-item--header,.dashboard-viewer-item--topbar{min-height:72px}.dashboard-viewer-item--group{min-height:280px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$4.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: DashboardItem, selector: "mt-dashboard-item", inputs: ["config", "chartTypeId", "readonly", "pageName", "inGroup", "isDialog", "queryParams", "extraFilters", "reportId", "ignoreQueryFilter", "builderMode"], outputs: ["actionTriggered", "configureRequested", "titleEdited"] }, { kind: "component", type: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
46262
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DashboardViewer, isStandalone: true, selector: "mt-dashboard-viewer", inputs: { isPage: { classPropertyName: "isPage", publicName: "isPage", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, backButton: { classPropertyName: "backButton", publicName: "backButton", isSignal: true, isRequired: false, transformFunction: null }, pageId: { classPropertyName: "pageId", publicName: "pageId", isSignal: true, isRequired: false, transformFunction: null }, dashboardData: { classPropertyName: "dashboardData", publicName: "dashboardData", isSignal: true, isRequired: false, transformFunction: null }, chartsData: { classPropertyName: "chartsData", publicName: "chartsData", isSignal: true, isRequired: false, transformFunction: null }, dialogsData: { classPropertyName: "dialogsData", publicName: "dialogsData", isSignal: true, isRequired: false, transformFunction: null }, filtersData: { classPropertyName: "filtersData", publicName: "filtersData", isSignal: true, isRequired: false, transformFunction: null }, extraFilters: { classPropertyName: "extraFilters", publicName: "extraFilters", isSignal: true, isRequired: false, transformFunction: null }, lookups: { classPropertyName: "lookups", publicName: "lookups", isSignal: true, isRequired: false, transformFunction: null }, statuses: { classPropertyName: "statuses", publicName: "statuses", isSignal: true, isRequired: false, transformFunction: null }, showFilters: { classPropertyName: "showFilters", publicName: "showFilters", isSignal: true, isRequired: false, transformFunction: null }, showFilterTrigger: { classPropertyName: "showFilterTrigger", publicName: "showFilterTrigger", isSignal: true, isRequired: false, transformFunction: null }, ignoreQueryFilter: { classPropertyName: "ignoreQueryFilter", publicName: "ignoreQueryFilter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageLoaded: "pageLoaded", onBack: "onBack", chartClick: "chartClick" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <!-- Page mode -->\n @if (isPage()) {\n <mt-page\n [title]=\"\n pageTitle() ||\n pageConfig()?.name?.[languageCode()] ||\n pageConfig()?.name?.['en'] ||\n t('dashboard')\n \"\n [backButton]=\"backButton()\"\n (backButtonClick)=\"onBack.emit()\"\n >\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\n </mt-page>\n } @else {\n <!-- Non-page mode -->\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\n }\n\n <!-- Reusable viewer content template -->\n <ng-template #viewerContent>\n <div class=\"relative h-full min-h-[600px] mt-dashboard-viewer\">\n @if (!loading() && hasRenderableContent()) {\n @if (showFilters() && showFilterTrigger() && hasPageFilters()) {\n <div\n class=\"dashboard-viewer-filter-toolbar mb-3 flex items-center justify-end\"\n >\n <mt-button\n [label]=\"t('manageFilter')\"\n icon=\"general.filter-funnel-01\"\n variant=\"outlined\"\n severity=\"secondary\"\n size=\"small\"\n [tooltip]=\"t('manageFilter')\"\n (click)=\"$event.stopPropagation(); openFiltersPanel()\"\n />\n </div>\n }\n\n <div class=\"dashboard-viewer-layout-wrapper\">\n <div\n class=\"dashboard-viewer-layout\"\n [style.min-height]=\"layoutHeight()\"\n >\n @for (\n item of visibleItems();\n track trackByDashboardId($index, item)\n ) {\n <div\n class=\"dashboard-viewer-item\"\n [class.dashboard-viewer-item--group]=\"isGroup(item)\"\n [class.dashboard-viewer-item--header]=\"isHeader(item)\"\n [class.dashboard-viewer-item--topbar]=\"isTopbar(item)\"\n [style.grid-column]=\"getGridColumn(item)\"\n [style.grid-row]=\"getGridRow(item)\"\n >\n <!-- Group Container -->\n @if (isGroup(item)) {\n @if (!item.loading) {\n <div\n class=\"group-container h-full flex flex-col rounded-lg border border-surface-200 overflow-hidden\"\n [style.background-color]=\"\n getStyleConfig(item)['background-color'] ||\n 'var(--surface-card)'\n \"\n >\n <!-- Group Header with Tabs -->\n <div\n class=\"group-header flex items-center justify-between px-4 py-2 bg-surface-50 border-b border-surface-200\"\n >\n <span class=\"font-medium text-sm\">{{\n getGroupTitle(item)\n }}</span>\n <div class=\"group-tabs flex items-center gap-1\">\n @for (\n child of getGroupChildren(item);\n track child.config?.serviceConfig?.dashboardId;\n let gIndex = $index\n ) {\n @if (getItemIcon(child); as icon) {\n <button\n type=\"button\"\n class=\"w-8 h-8 flex items-center justify-center rounded transition-colors\"\n [class.bg-primary-100]=\"\n item.selectedGroupIndex === gIndex\n \"\n [class.text-primary-600]=\"\n item.selectedGroupIndex === gIndex\n \"\n [class.text-muted-color]=\"\n item.selectedGroupIndex !== gIndex\n \"\n [class.hover:bg-surface-100]=\"\n item.selectedGroupIndex !== gIndex\n \"\n (click)=\"selectGroupChild(item, gIndex)\"\n >\n <i class=\"mti mti-{{ icon }}\"></i>\n </button>\n } @else {\n <button\n pButton\n type=\"button\"\n class=\"p-button-text p-button-sm\"\n [class.p-button-primary]=\"\n item.selectedGroupIndex === gIndex\n \"\n [class.p-button-secondary]=\"\n item.selectedGroupIndex !== gIndex\n \"\n [label]=\"getItemTitle(child)\"\n (click)=\"selectGroupChild(item, gIndex)\"\n ></button>\n }\n }\n </div>\n </div>\n\n <!-- Group Body - Selected Child Content -->\n <div class=\"group-body flex-1 min-h-0\">\n @if (\n item.selectedGroupIndex !== null &&\n item.selectedGroupIndex !== undefined\n ) {\n @for (\n child of getGroupChildren(item);\n track child.config?.serviceConfig?.dashboardId;\n let cIndex = $index\n ) {\n @if (\n cIndex === item.selectedGroupIndex &&\n !child.loading\n ) {\n <mt-dashboard-item\n class=\"dashboard-viewer-content-item\"\n [config]=\"child.config\"\n [chartTypeId]=\"child.chartTypeId\"\n [pageName]=\"\n pageConfig()?.name?.[languageCode()] ||\n pageConfig()?.name?.['en'] ||\n pageConfig()?.name?.['ar'] ||\n ''\n \"\n [extraFilters]=\"extraFilters()\"\n [queryParams]=\"pageQueryParams()\"\n [reportId]=\"pageId()\"\n [ignoreQueryFilter]=\"\n shouldIgnoreQueryFilter(child)\n \"\n [inGroup]=\"true\"\n >\n </mt-dashboard-item>\n }\n }\n }\n </div>\n </div>\n }\n }\n <!-- Header Item -->\n @else if (isHeader(item)) {\n @if (!item.loading) {\n <mt-dashboard-item\n class=\"dashboard-viewer-content-item\"\n [config]=\"item.config\"\n [chartTypeId]=\"item.chartTypeId\"\n [pageName]=\"\n pageConfig()?.name?.[languageCode()] ||\n pageConfig()?.name?.['en'] ||\n pageConfig()?.name?.['ar'] ||\n ''\n \"\n [extraFilters]=\"extraFilters()\"\n [queryParams]=\"pageQueryParams()\"\n [reportId]=\"pageId()\"\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\n [inGroup]=\"false\"\n >\n </mt-dashboard-item>\n }\n }\n <!-- Topbar Item -->\n @else if (isTopbar(item)) {\n @if (!item.loading) {\n <mt-dashboard-item\n class=\"dashboard-viewer-content-item\"\n [config]=\"item.config\"\n [chartTypeId]=\"item.chartTypeId\"\n [pageName]=\"\n pageConfig()?.name?.[languageCode()] ||\n pageConfig()?.name?.['en'] ||\n pageConfig()?.name?.['ar'] ||\n ''\n \"\n [extraFilters]=\"extraFilters()\"\n [queryParams]=\"pageQueryParams()\"\n [reportId]=\"pageId()\"\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\n [inGroup]=\"false\"\n >\n </mt-dashboard-item>\n }\n }\n <!-- Regular Chart Item -->\n @else {\n @if (!item.loading) {\n <mt-dashboard-item\n class=\"dashboard-viewer-content-item\"\n [config]=\"item.config\"\n [chartTypeId]=\"item.chartTypeId\"\n [pageName]=\"\n pageConfig()?.name?.[languageCode()] ||\n pageConfig()?.name?.['en'] ||\n pageConfig()?.name?.['ar'] ||\n ''\n \"\n [extraFilters]=\"extraFilters()\"\n [queryParams]=\"pageQueryParams()\"\n [reportId]=\"pageId()\"\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\n [inGroup]=\"false\"\n >\n </mt-dashboard-item>\n }\n }\n </div>\n }\n </div>\n </div>\n\n <!-- Hidden Dialogs (for modal rendering) -->\n @if (dialogs().length > 0) {\n <div class=\"hidden\">\n @for (\n dialog of dialogs();\n track dialog.config?.serviceConfig?.dashboardId\n ) {\n <!-- Dialog placeholder - will be rendered in modal when triggered -->\n <div\n [attr.data-dialog-id]=\"\n dialog.config?.serviceConfig?.dashboardId\n \"\n ></div>\n }\n </div>\n }\n } @else if (loading()) {\n <!-- Loading State -->\n <div class=\"flex items-center justify-center h-64\">\n <div class=\"text-center\">\n <i\n class=\"mti mti-loader-2 text-4xl text-primary animate-spin mb-2\"\n ></i>\n <p class=\"text-muted-color\">{{ t(\"loading\") }}</p>\n </div>\n </div>\n } @else {\n <div\n class=\"flex flex-col items-center justify-center h-64 text-muted-color\"\n >\n <i class=\"mti mti-layout text-6xl mb-4\"></i>\n <p class=\"text-lg\">{{ t(\"noPageSelected\") }}</p>\n <p class=\"text-sm\">{{ t(\"selectPageToStart\") }}</p>\n </div>\n }\n </div>\n </ng-template>\n</ng-container>\n", styles: [".mt-dashboard-viewer{width:100%;height:100%}.dashboard-viewer-layout-wrapper{width:100%}.dashboard-viewer-layout{display:grid;grid-template-columns:repeat(36,minmax(0,1fr));grid-auto-rows:60px;gap:10px;width:100%;align-items:stretch}.dashboard-viewer-item{display:flex;min-width:0;min-height:0}.dashboard-viewer-item>*{width:100%;height:100%}.dashboard-viewer-content-item{display:block;flex:1 1 auto;min-width:0;min-height:0;width:100%;height:100%}.dashboard-viewer-item--header{z-index:1;overflow:hidden;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.5rem;background:var(--p-surface-0, #fff);box-shadow:0 1px 2px #0f172a14}.dashboard-viewer-item--topbar{z-index:2;overflow:visible;border:0;border-radius:0;background:transparent;box-shadow:none}.group-container{background-color:var(--surface-card)}.group-header{flex-shrink:0}.group-tabs{flex-wrap:wrap}.group-body{background-color:var(--surface-0)}.header-item{background-color:transparent}.topbar-item{background-color:var(--surface-50)}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.table-responsive{max-height:75vh;overflow-y:auto;overflow-x:auto}.modal-content{border:0!important}.custom-donut-chart{display:flex;justify-content:center;height:auto!important}.custom-donut-chart canvas{margin-top:-1.5rem!important}@media(max-width:768px){.dashboard-viewer-layout{display:flex;flex-direction:column;min-height:0!important}.dashboard-viewer-item{min-height:220px}.dashboard-viewer-item--header,.dashboard-viewer-item--topbar{min-height:72px}.dashboard-viewer-item--group{min-height:280px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$4.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: DashboardItem, selector: "mt-dashboard-item", inputs: ["config", "chartTypeId", "readonly", "pageName", "inGroup", "isDialog", "queryParams", "extraFilters", "reportId", "ignoreQueryFilter", "builderMode"], outputs: ["actionTriggered", "configureRequested", "titleEdited"] }, { kind: "component", type: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
45577
46263
|
}
|
|
45578
46264
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardViewer, decorators: [{
|
|
45579
46265
|
type: Component,
|
|
@@ -45584,8 +46270,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
45584
46270
|
Button,
|
|
45585
46271
|
DashboardItem,
|
|
45586
46272
|
Page,
|
|
45587
|
-
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"\r\n pageTitle() ||\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n t('dashboard')\r\n \"\r\n [backButton]=\"backButton()\"\r\n (backButtonClick)=\"onBack.emit()\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\r\n }\r\n\r\n <!-- Reusable viewer content template -->\r\n <ng-template #viewerContent>\r\n <div class=\"relative h-full min-h-[600px] mt-dashboard-viewer\">\r\n @if (!loading() && hasRenderableContent()) {\r\n @if (showFilters() && showFilterTrigger() && hasPageFilters()) {\r\n <div\r\n class=\"dashboard-viewer-filter-toolbar mb-3 flex items-center justify-end\"\r\n >\r\n <mt-button\r\n [label]=\"t('manageFilter')\"\r\n icon=\"general.filter-funnel-01\"\r\n variant=\"outlined\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [tooltip]=\"t('manageFilter')\"\r\n (click)=\"$event.stopPropagation(); openFiltersPanel()\"\r\n />\r\n </div>\r\n }\r\n\r\n <div class=\"dashboard-viewer-layout-wrapper\">\r\n <div\r\n class=\"dashboard-viewer-layout\"\r\n [style.min-height]=\"layoutHeight()\"\r\n >\r\n @for (\r\n item of visibleItems();\r\n track trackByDashboardId($index, item)\r\n ) {\r\n <div\r\n class=\"dashboard-viewer-item\"\r\n [class.dashboard-viewer-item--group]=\"isGroup(item)\"\r\n [class.dashboard-viewer-item--header]=\"isHeader(item)\"\r\n [class.dashboard-viewer-item--topbar]=\"isTopbar(item)\"\r\n [style.grid-column]=\"getGridColumn(item)\"\r\n [style.grid-row]=\"getGridRow(item)\"\r\n >\r\n <!-- Group Container -->\r\n @if (isGroup(item)) {\r\n @if (!item.loading) {\r\n <div\r\n class=\"group-container h-full flex flex-col rounded-lg border border-surface-200 overflow-hidden\"\r\n [style.background-color]=\"\r\n getStyleConfig(item)['background-color'] ||\r\n 'var(--surface-card)'\r\n \"\r\n >\r\n <!-- Group Header with Tabs -->\r\n <div\r\n class=\"group-header flex items-center justify-between px-4 py-2 bg-surface-50 border-b border-surface-200\"\r\n >\r\n <span class=\"font-medium text-sm\">{{\r\n getGroupTitle(item)\r\n }}</span>\r\n <div class=\"group-tabs flex items-center gap-1\">\r\n @for (\r\n child of getGroupChildren(item);\r\n track child.config?.serviceConfig?.dashboardId;\r\n let gIndex = $index\r\n ) {\r\n @if (getItemIcon(child); as icon) {\r\n <button\r\n type=\"button\"\r\n class=\"w-8 h-8 flex items-center justify-center rounded transition-colors\"\r\n [class.bg-primary-100]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.text-primary-600]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.text-muted-color]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n [class.hover:bg-surface-100]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n (click)=\"selectGroupChild(item, gIndex)\"\r\n >\r\n <i class=\"mti mti-{{ icon }}\"></i>\r\n </button>\r\n } @else {\r\n <button\r\n pButton\r\n type=\"button\"\r\n class=\"p-button-text p-button-sm\"\r\n [class.p-button-primary]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.p-button-secondary]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n [label]=\"getItemTitle(child)\"\r\n (click)=\"selectGroupChild(item, gIndex)\"\r\n ></button>\r\n }\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Group Body - Selected Child Content -->\r\n <div class=\"group-body flex-1 min-h-0\">\r\n @if (\r\n item.selectedGroupIndex !== null &&\r\n item.selectedGroupIndex !== undefined\r\n ) {\r\n @for (\r\n child of getGroupChildren(item);\r\n track child.config?.serviceConfig?.dashboardId;\r\n let cIndex = $index\r\n ) {\r\n @if (\r\n cIndex === item.selectedGroupIndex &&\r\n !child.loading\r\n ) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"child.config\"\r\n [chartTypeId]=\"child.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"\r\n shouldIgnoreQueryFilter(child)\r\n \"\r\n [inGroup]=\"true\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n }\r\n }\r\n <!-- Header Item -->\r\n @else if (isHeader(item)) {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n <!-- Topbar Item -->\r\n @else if (isTopbar(item)) {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n <!-- Regular Chart Item -->\r\n @else {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Hidden Dialogs (for modal rendering) -->\r\n @if (dialogs().length > 0) {\r\n <div class=\"hidden\">\r\n @for (\r\n dialog of dialogs();\r\n track dialog.config?.serviceConfig?.dashboardId\r\n ) {\r\n <!-- Dialog placeholder - will be rendered in modal when triggered -->\r\n <div\r\n [attr.data-dialog-id]=\"\r\n dialog.config?.serviceConfig?.dashboardId\r\n \"\r\n ></div>\r\n }\r\n </div>\r\n }\r\n } @else if (loading()) {\r\n <!-- Loading State -->\r\n <div class=\"flex items-center justify-center h-64\">\r\n <div class=\"text-center\">\r\n <i\r\n class=\"mti mti-loader-2 text-4xl text-primary animate-spin mb-2\"\r\n ></i>\r\n <p class=\"text-muted-color\">{{ t(\"loading\") }}</p>\r\n </div>\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-64 text-muted-color\"\r\n >\r\n <i class=\"mti mti-layout text-6xl mb-4\"></i>\r\n <p class=\"text-lg\">{{ t(\"noPageSelected\") }}</p>\r\n <p class=\"text-sm\">{{ t(\"selectPageToStart\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n", styles: [".mt-dashboard-viewer{width:100%;height:100%}.dashboard-viewer-layout-wrapper{width:100%}.dashboard-viewer-layout{display:grid;grid-template-columns:repeat(36,minmax(0,1fr));grid-auto-rows:60px;gap:10px;width:100%;align-items:stretch}.dashboard-viewer-item{display:flex;min-width:0;min-height:0}.dashboard-viewer-item>*{width:100%;height:100%}.dashboard-viewer-content-item{display:block;flex:1 1 auto;min-width:0;min-height:0;width:100%;height:100%}.dashboard-viewer-item--header{z-index:1;overflow:hidden;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.5rem;background:var(--p-surface-0, #fff);box-shadow:0 1px 2px #0f172a14}.dashboard-viewer-item--topbar{z-index:2;overflow:visible;border:0;border-radius:0;background:transparent;box-shadow:none}.group-container{background-color:var(--surface-card)}.group-header{flex-shrink:0}.group-tabs{flex-wrap:wrap}.group-body{background-color:var(--surface-0)}.header-item{background-color:transparent}.topbar-item{background-color:var(--surface-50)}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.table-responsive{max-height:75vh;overflow-y:auto;overflow-x:auto}.modal-content{border:0!important}.custom-donut-chart{display:flex;justify-content:center;height:auto!important}.custom-donut-chart canvas{margin-top:-1.5rem!important}@media(max-width:768px){.dashboard-viewer-layout{display:flex;flex-direction:column;min-height:0!important}.dashboard-viewer-item{min-height:220px}.dashboard-viewer-item--header,.dashboard-viewer-item--topbar{min-height:72px}.dashboard-viewer-item--group{min-height:280px}}\n"] }]
|
|
45588
|
-
}], propDecorators: { isPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPage", required: false }] }], pageTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageTitle", required: false }] }], backButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "backButton", required: false }] }], pageId: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageId", required: false }] }], dashboardData: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardData", required: false }] }], chartsData: [{ type: i0.Input, args: [{ isSignal: true, alias: "chartsData", required: false }] }], dialogsData: [{ type: i0.Input, args: [{ isSignal: true, alias: "dialogsData", required: false }] }], filtersData: [{ type: i0.Input, args: [{ isSignal: true, alias: "filtersData", required: false }] }], extraFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "extraFilters", required: false }] }], showFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFilters", required: false }] }], showFilterTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFilterTrigger", required: false }] }], ignoreQueryFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "ignoreQueryFilter", required: false }] }], pageLoaded: [{ type: i0.Output, args: ["pageLoaded"] }], onBack: [{ type: i0.Output, args: ["onBack"] }], chartClick: [{ type: i0.Output, args: ["chartClick"] }] } });
|
|
46273
|
+
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <!-- Page mode -->\n @if (isPage()) {\n <mt-page\n [title]=\"\n pageTitle() ||\n pageConfig()?.name?.[languageCode()] ||\n pageConfig()?.name?.['en'] ||\n t('dashboard')\n \"\n [backButton]=\"backButton()\"\n (backButtonClick)=\"onBack.emit()\"\n >\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\n </mt-page>\n } @else {\n <!-- Non-page mode -->\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\n }\n\n <!-- Reusable viewer content template -->\n <ng-template #viewerContent>\n <div class=\"relative h-full min-h-[600px] mt-dashboard-viewer\">\n @if (!loading() && hasRenderableContent()) {\n @if (showFilters() && showFilterTrigger() && hasPageFilters()) {\n <div\n class=\"dashboard-viewer-filter-toolbar mb-3 flex items-center justify-end\"\n >\n <mt-button\n [label]=\"t('manageFilter')\"\n icon=\"general.filter-funnel-01\"\n variant=\"outlined\"\n severity=\"secondary\"\n size=\"small\"\n [tooltip]=\"t('manageFilter')\"\n (click)=\"$event.stopPropagation(); openFiltersPanel()\"\n />\n </div>\n }\n\n <div class=\"dashboard-viewer-layout-wrapper\">\n <div\n class=\"dashboard-viewer-layout\"\n [style.min-height]=\"layoutHeight()\"\n >\n @for (\n item of visibleItems();\n track trackByDashboardId($index, item)\n ) {\n <div\n class=\"dashboard-viewer-item\"\n [class.dashboard-viewer-item--group]=\"isGroup(item)\"\n [class.dashboard-viewer-item--header]=\"isHeader(item)\"\n [class.dashboard-viewer-item--topbar]=\"isTopbar(item)\"\n [style.grid-column]=\"getGridColumn(item)\"\n [style.grid-row]=\"getGridRow(item)\"\n >\n <!-- Group Container -->\n @if (isGroup(item)) {\n @if (!item.loading) {\n <div\n class=\"group-container h-full flex flex-col rounded-lg border border-surface-200 overflow-hidden\"\n [style.background-color]=\"\n getStyleConfig(item)['background-color'] ||\n 'var(--surface-card)'\n \"\n >\n <!-- Group Header with Tabs -->\n <div\n class=\"group-header flex items-center justify-between px-4 py-2 bg-surface-50 border-b border-surface-200\"\n >\n <span class=\"font-medium text-sm\">{{\n getGroupTitle(item)\n }}</span>\n <div class=\"group-tabs flex items-center gap-1\">\n @for (\n child of getGroupChildren(item);\n track child.config?.serviceConfig?.dashboardId;\n let gIndex = $index\n ) {\n @if (getItemIcon(child); as icon) {\n <button\n type=\"button\"\n class=\"w-8 h-8 flex items-center justify-center rounded transition-colors\"\n [class.bg-primary-100]=\"\n item.selectedGroupIndex === gIndex\n \"\n [class.text-primary-600]=\"\n item.selectedGroupIndex === gIndex\n \"\n [class.text-muted-color]=\"\n item.selectedGroupIndex !== gIndex\n \"\n [class.hover:bg-surface-100]=\"\n item.selectedGroupIndex !== gIndex\n \"\n (click)=\"selectGroupChild(item, gIndex)\"\n >\n <i class=\"mti mti-{{ icon }}\"></i>\n </button>\n } @else {\n <button\n pButton\n type=\"button\"\n class=\"p-button-text p-button-sm\"\n [class.p-button-primary]=\"\n item.selectedGroupIndex === gIndex\n \"\n [class.p-button-secondary]=\"\n item.selectedGroupIndex !== gIndex\n \"\n [label]=\"getItemTitle(child)\"\n (click)=\"selectGroupChild(item, gIndex)\"\n ></button>\n }\n }\n </div>\n </div>\n\n <!-- Group Body - Selected Child Content -->\n <div class=\"group-body flex-1 min-h-0\">\n @if (\n item.selectedGroupIndex !== null &&\n item.selectedGroupIndex !== undefined\n ) {\n @for (\n child of getGroupChildren(item);\n track child.config?.serviceConfig?.dashboardId;\n let cIndex = $index\n ) {\n @if (\n cIndex === item.selectedGroupIndex &&\n !child.loading\n ) {\n <mt-dashboard-item\n class=\"dashboard-viewer-content-item\"\n [config]=\"child.config\"\n [chartTypeId]=\"child.chartTypeId\"\n [pageName]=\"\n pageConfig()?.name?.[languageCode()] ||\n pageConfig()?.name?.['en'] ||\n pageConfig()?.name?.['ar'] ||\n ''\n \"\n [extraFilters]=\"extraFilters()\"\n [queryParams]=\"pageQueryParams()\"\n [reportId]=\"pageId()\"\n [ignoreQueryFilter]=\"\n shouldIgnoreQueryFilter(child)\n \"\n [inGroup]=\"true\"\n >\n </mt-dashboard-item>\n }\n }\n }\n </div>\n </div>\n }\n }\n <!-- Header Item -->\n @else if (isHeader(item)) {\n @if (!item.loading) {\n <mt-dashboard-item\n class=\"dashboard-viewer-content-item\"\n [config]=\"item.config\"\n [chartTypeId]=\"item.chartTypeId\"\n [pageName]=\"\n pageConfig()?.name?.[languageCode()] ||\n pageConfig()?.name?.['en'] ||\n pageConfig()?.name?.['ar'] ||\n ''\n \"\n [extraFilters]=\"extraFilters()\"\n [queryParams]=\"pageQueryParams()\"\n [reportId]=\"pageId()\"\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\n [inGroup]=\"false\"\n >\n </mt-dashboard-item>\n }\n }\n <!-- Topbar Item -->\n @else if (isTopbar(item)) {\n @if (!item.loading) {\n <mt-dashboard-item\n class=\"dashboard-viewer-content-item\"\n [config]=\"item.config\"\n [chartTypeId]=\"item.chartTypeId\"\n [pageName]=\"\n pageConfig()?.name?.[languageCode()] ||\n pageConfig()?.name?.['en'] ||\n pageConfig()?.name?.['ar'] ||\n ''\n \"\n [extraFilters]=\"extraFilters()\"\n [queryParams]=\"pageQueryParams()\"\n [reportId]=\"pageId()\"\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\n [inGroup]=\"false\"\n >\n </mt-dashboard-item>\n }\n }\n <!-- Regular Chart Item -->\n @else {\n @if (!item.loading) {\n <mt-dashboard-item\n class=\"dashboard-viewer-content-item\"\n [config]=\"item.config\"\n [chartTypeId]=\"item.chartTypeId\"\n [pageName]=\"\n pageConfig()?.name?.[languageCode()] ||\n pageConfig()?.name?.['en'] ||\n pageConfig()?.name?.['ar'] ||\n ''\n \"\n [extraFilters]=\"extraFilters()\"\n [queryParams]=\"pageQueryParams()\"\n [reportId]=\"pageId()\"\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\n [inGroup]=\"false\"\n >\n </mt-dashboard-item>\n }\n }\n </div>\n }\n </div>\n </div>\n\n <!-- Hidden Dialogs (for modal rendering) -->\n @if (dialogs().length > 0) {\n <div class=\"hidden\">\n @for (\n dialog of dialogs();\n track dialog.config?.serviceConfig?.dashboardId\n ) {\n <!-- Dialog placeholder - will be rendered in modal when triggered -->\n <div\n [attr.data-dialog-id]=\"\n dialog.config?.serviceConfig?.dashboardId\n \"\n ></div>\n }\n </div>\n }\n } @else if (loading()) {\n <!-- Loading State -->\n <div class=\"flex items-center justify-center h-64\">\n <div class=\"text-center\">\n <i\n class=\"mti mti-loader-2 text-4xl text-primary animate-spin mb-2\"\n ></i>\n <p class=\"text-muted-color\">{{ t(\"loading\") }}</p>\n </div>\n </div>\n } @else {\n <div\n class=\"flex flex-col items-center justify-center h-64 text-muted-color\"\n >\n <i class=\"mti mti-layout text-6xl mb-4\"></i>\n <p class=\"text-lg\">{{ t(\"noPageSelected\") }}</p>\n <p class=\"text-sm\">{{ t(\"selectPageToStart\") }}</p>\n </div>\n }\n </div>\n </ng-template>\n</ng-container>\n", styles: [".mt-dashboard-viewer{width:100%;height:100%}.dashboard-viewer-layout-wrapper{width:100%}.dashboard-viewer-layout{display:grid;grid-template-columns:repeat(36,minmax(0,1fr));grid-auto-rows:60px;gap:10px;width:100%;align-items:stretch}.dashboard-viewer-item{display:flex;min-width:0;min-height:0}.dashboard-viewer-item>*{width:100%;height:100%}.dashboard-viewer-content-item{display:block;flex:1 1 auto;min-width:0;min-height:0;width:100%;height:100%}.dashboard-viewer-item--header{z-index:1;overflow:hidden;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.5rem;background:var(--p-surface-0, #fff);box-shadow:0 1px 2px #0f172a14}.dashboard-viewer-item--topbar{z-index:2;overflow:visible;border:0;border-radius:0;background:transparent;box-shadow:none}.group-container{background-color:var(--surface-card)}.group-header{flex-shrink:0}.group-tabs{flex-wrap:wrap}.group-body{background-color:var(--surface-0)}.header-item{background-color:transparent}.topbar-item{background-color:var(--surface-50)}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.table-responsive{max-height:75vh;overflow-y:auto;overflow-x:auto}.modal-content{border:0!important}.custom-donut-chart{display:flex;justify-content:center;height:auto!important}.custom-donut-chart canvas{margin-top:-1.5rem!important}@media(max-width:768px){.dashboard-viewer-layout{display:flex;flex-direction:column;min-height:0!important}.dashboard-viewer-item{min-height:220px}.dashboard-viewer-item--header,.dashboard-viewer-item--topbar{min-height:72px}.dashboard-viewer-item--group{min-height:280px}}\n"] }]
|
|
46274
|
+
}], propDecorators: { isPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPage", required: false }] }], pageTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageTitle", required: false }] }], backButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "backButton", required: false }] }], pageId: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageId", required: false }] }], dashboardData: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardData", required: false }] }], chartsData: [{ type: i0.Input, args: [{ isSignal: true, alias: "chartsData", required: false }] }], dialogsData: [{ type: i0.Input, args: [{ isSignal: true, alias: "dialogsData", required: false }] }], filtersData: [{ type: i0.Input, args: [{ isSignal: true, alias: "filtersData", required: false }] }], extraFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "extraFilters", required: false }] }], lookups: [{ type: i0.Input, args: [{ isSignal: true, alias: "lookups", required: false }] }], statuses: [{ type: i0.Input, args: [{ isSignal: true, alias: "statuses", required: false }] }], showFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFilters", required: false }] }], showFilterTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFilterTrigger", required: false }] }], ignoreQueryFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "ignoreQueryFilter", required: false }] }], pageLoaded: [{ type: i0.Output, args: ["pageLoaded"] }], onBack: [{ type: i0.Output, args: ["onBack"] }], chartClick: [{ type: i0.Output, args: ["chartClick"] }] } });
|
|
45589
46275
|
|
|
45590
46276
|
/**
|
|
45591
46277
|
* Dashboard List Component
|
|
@@ -48835,5 +49521,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
48835
49521
|
* Generated bundle index. Do not edit.
|
|
48836
49522
|
*/
|
|
48837
49523
|
|
|
48838
|
-
export {
|
|
48839
|
-
//# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-
|
|
49524
|
+
export { LevelCardHandler as $, SkeletonCardComponent as A, resolveStatisticIconPlacement as B, CardContentComponent as C, DashboardItemStoreService as D, EChartComponent as E, FilterUtilsService as F, StatisticCardComponent as G, HeaderCardComponent as H, TopbarCardComponent as I, ChartDataService as J, BarChartHandler as K, LastHistoryLevelCardComponent as L, PieChartHandler as M, StackBarChartHandler as N, axisFormatters as O, PropertiesCardComponent as P, groupDatesByYearAndMonth as Q, GaugeChartHandler as R, StaticFiltersComponent as S, TableCardComponent as T, TableViewHandler as U, OverviewCardHandler as V, TimelineHandler as W, LineChartHandler as X, SnapshotHandler as Y, ComparisonChartHandler as Z, SplitterChartHandler as _, DashboardItem as a, normalizeChartTypeForRequest as a$, MapChartHandler as a0, RingGaugeChartHandler as a1, SPlusChartHandler as a2, PhaseGateStepperHandler as a3, formatCurrency as a4, getCurrencySuffix as a5, formatPercentage as a6, formatNumber as a7, formatDate as a8, createAxisFormatter as a9, DataSourceSettings as aA, ActionsSettings as aB, ChartViewer as aC, StyleStudioDrawer as aD, StyleSettingsRenderer as aE, expandResetPatches as aF, StyleField as aG, SegmentedField as aH, ColorListField as aI, ArrayBuilderField as aJ, KeyValueMapField as aK, LegendOrderField as aL, ItemCardMenuComponent as aM, ChartFilterDrawer as aN, ItemContextToolbarComponent as aO, ItemConfigPopoverComponent as aP, GuidedConfigDialogComponent as aQ, FilterChipsBarComponent as aR, FilterBuilderComponent as aS, DatasourcePanelComponent as aT, SchemaControlRendererComponent as aU, FilterByGroupPipe as aV, GetChartActionsPipe as aW, CHART_CAPABILITIES as aX, getCapabilityById as aY, resolveCapability as aZ, toBackendChartType as a_, createTooltipFormatter as aa, formatAxisLabel as ab, formatWordsUnderBar as ac, formatXAxis as ad, handleFiltersForCustom as ae, handleFilterForCard as af, handleFilterForSnapshot as ag, DashboardList as ah, HTTPMethod as ai, DashboardBuilderService as aj, DashboardStoreService as ak, isManagePagesDeleteResult as al, ManagePages as am, ManageBreadcrumb as an, ManageFilterOnPage as ao, DynamicFiltersConfig as ap, ChartSettingsDrawer as aq, DisplaySettings as ar, DefaultControlUi as as, PieControlUi as at, BarControlUi as au, StackBarControlUi as av, ManageItem as aw, CHART_TYPES as ax, ManageItemService as ay, GeneralSettings as az, DashboardBuilder as b, normalizeFilterOperation as b0, normalizeAggregateFunction as b1, normalizeFilters as b2, selectorFromLegacy as b3, moduleIdFromSelector as b4, toBackendSourceLink as b5, toFormSourceLink as b6, normalizeOnLoad as b7, normalizeBeforeSave as b8, normalizeBeforeRequest as b9, groupIssuesByDomain as bA, parseAdvancedJson as bB, deepMerge$1 as bC, formatForEditor as bD, readByPath$1 as bE, setByPath as bF, applyControlPatchToPersisted as bG, applyControlPatchesToPersisted as bH, getControlSchema as bI, listControlSchemaIds as bJ, listControlSchemas as bK, getFallbackControlSchema as bL, flattenSchema as bM, resolveDisplayFields as bN, buildDisplayFieldPredicate as bO, bindingKey as bP, getBinding as bQ, listBindings as bR, listBindingsForChart as bS, readBoundValue as bT, ITEM_GUIDANCE_REGISTRY as bU, describeGuidance as bV, ItemGuidanceService as bW, CONFIG_DOMAINS as ba, domainsForCapability as bb, findDomain as bc, POPOVER_TABS as bd, POPOVER_TAB_SPECS as be, titleToUi as bf, applyTitleToPersisted as bg, datasourceToUi as bh, fieldsToUi as bi, filtersToUi as bj, styleToUi as bk, applyStyleToPersisted as bl, layoutToUi as bm, applyLayoutToPersisted as bn, labelLegendFormatToUi as bo, applyLabelLegendFormatToPersisted as bp, behaviorToUi as bq, applyBehaviorToPersisted as br, applyFilterChipsToPersisted as bs, persistedToUi as bt, buildAssembly as bu, STYLE_PRESETS as bv, presetsForCapability as bw, findPreset as bx, validate as by, hasBlockingIssues as bz, cloneDeep$1 as c, DashboardViewer as d, switchAllKeysSmall$1 as e, dynamicTextReplace as f, getNestedData as g, dynamicReorder as h, generalConfiguration as i, formatValue as j, getLocalizedTitle as k, sortChartData as l, addCommasToNumber as m, sortDataTableView as n, isMobilePlatform$1 as o, getColorFromConditions as p, CardFilterComponent as q, DynamicFiltersComponent as r, switchAllKeysToLower as s, CardInfoComponent as t, ChartCardComponent as u, resolveEntityUserPhoto as v, EntityInfoComponent as w, normalizeDashboardCardEntityValue as x, EntityPreviewCardComponent as y, ListStatisticCardComponent as z };
|
|
49525
|
+
//# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-CZibyu48.mjs.map
|