@masterteam/dashboard-builder 0.0.75 → 0.0.77
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 +25 -5
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-CUvjw-JX.mjs → masterteam-dashboard-builder-dashboard-dialog.component-DHcBk7ey.mjs} +2 -2
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-CUvjw-JX.mjs.map → masterteam-dashboard-builder-dashboard-dialog.component-DHcBk7ey.mjs.map} +1 -1
- package/fesm2022/{masterteam-dashboard-builder-masterteam-dashboard-builder-CrIWnOxs.mjs → masterteam-dashboard-builder-masterteam-dashboard-builder-XQD_Js7m.mjs} +293 -50
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-XQD_Js7m.mjs.map +1 -0
- package/fesm2022/masterteam-dashboard-builder.mjs +1 -1
- package/package.json +3 -3
- package/types/masterteam-dashboard-builder.d.ts +116 -10
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-CrIWnOxs.mjs.map +0 -1
|
@@ -70,6 +70,23 @@ import { Table } from '@masterteam/components/table';
|
|
|
70
70
|
import * as i2$5 from 'primeng/inputnumber';
|
|
71
71
|
import { InputNumberModule } from 'primeng/inputnumber';
|
|
72
72
|
|
|
73
|
+
/**
|
|
74
|
+
* `ModuleClassificationEnum.Log`. The backend serializes enums as numbers, so
|
|
75
|
+
* a level's logs are its modules with `classification === 0`; `1` is `Process`.
|
|
76
|
+
*/
|
|
77
|
+
const MODULE_CLASSIFICATION_LOG = 0;
|
|
78
|
+
/**
|
|
79
|
+
* HTTP methods for custom API
|
|
80
|
+
*/
|
|
81
|
+
var HTTPMethod;
|
|
82
|
+
(function (HTTPMethod) {
|
|
83
|
+
HTTPMethod["GET"] = "GET";
|
|
84
|
+
HTTPMethod["POST"] = "POST";
|
|
85
|
+
HTTPMethod["PUT"] = "PUT";
|
|
86
|
+
HTTPMethod["DELETE"] = "DELETE";
|
|
87
|
+
HTTPMethod["PATCH"] = "PATCH";
|
|
88
|
+
})(HTTPMethod || (HTTPMethod = {}));
|
|
89
|
+
|
|
73
90
|
/** Add the displayName expected by the filter configuration select. */
|
|
74
91
|
function normalizeDashboardFilterLookups(lookups) {
|
|
75
92
|
return lookups.map((lookup) => ({
|
|
@@ -141,6 +158,60 @@ function buildDashboardLevelSchemaOptions(services, context = {}) {
|
|
|
141
158
|
}
|
|
142
159
|
return [...unique.values()];
|
|
143
160
|
}
|
|
161
|
+
/**
|
|
162
|
+
* Build the "Log" options offered under a status filter's selected level.
|
|
163
|
+
*
|
|
164
|
+
* Two sources, in order:
|
|
165
|
+
* 1. The level's own `logs` collection, when the host levels schema carries one
|
|
166
|
+
* (the legacy PPlus4 settings contract).
|
|
167
|
+
* 2. The status metadata itself — every definition scoped to this level that
|
|
168
|
+
* names a `moduleId`. This is the exact inverse of what the runtime reads
|
|
169
|
+
* (`getStatuses(logId, 'Log')` matches on `moduleId`), so every option
|
|
170
|
+
* offered here is guaranteed to resolve to real status values.
|
|
171
|
+
*
|
|
172
|
+
* `moduleNamesById` supplies labels from the shared metadata tree; the status
|
|
173
|
+
* property name is the fallback when the tree does not know the module.
|
|
174
|
+
*/
|
|
175
|
+
function buildDashboardLevelLogOptions(levelsSchema, statuses, moduleNamesById, levelId) {
|
|
176
|
+
if (levelId === null || levelId === undefined || levelId === '')
|
|
177
|
+
return [];
|
|
178
|
+
const level = levelsSchema.find((item) => String(item?.id) === String(levelId));
|
|
179
|
+
if (Array.isArray(level?.logs) && level.logs.length)
|
|
180
|
+
return level.logs;
|
|
181
|
+
const targetLevelId = String(levelId);
|
|
182
|
+
const unique = new Map();
|
|
183
|
+
for (const status of statuses) {
|
|
184
|
+
if (!isStatusDefinition(status))
|
|
185
|
+
continue;
|
|
186
|
+
if (String(status.levelId ?? '') !== targetLevelId)
|
|
187
|
+
continue;
|
|
188
|
+
const moduleId = status.moduleId;
|
|
189
|
+
if (moduleId === null || moduleId === undefined || moduleId === '')
|
|
190
|
+
continue;
|
|
191
|
+
const key = String(moduleId);
|
|
192
|
+
if (unique.has(key))
|
|
193
|
+
continue;
|
|
194
|
+
unique.set(key, {
|
|
195
|
+
id: moduleId,
|
|
196
|
+
description: moduleNamesById.get(key) || resolveLocalizedText(status.propertyName),
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
return [...unique.values()];
|
|
200
|
+
}
|
|
201
|
+
/** Module display names from the shared metadata tree, keyed by module id. */
|
|
202
|
+
function buildDashboardModuleNames(services) {
|
|
203
|
+
const names = new Map();
|
|
204
|
+
for (const service of services) {
|
|
205
|
+
for (const module of service.modules ?? []) {
|
|
206
|
+
if (module.id.toLowerCase() !== 'module')
|
|
207
|
+
continue;
|
|
208
|
+
for (const value of module.values ?? []) {
|
|
209
|
+
names.set(String(value.id), value.name);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
return names;
|
|
214
|
+
}
|
|
144
215
|
function resolveLocalizedText(value) {
|
|
145
216
|
if (typeof value === 'string')
|
|
146
217
|
return value;
|
|
@@ -224,6 +295,7 @@ class DashboardBuilderService {
|
|
|
224
295
|
/** Host-owned lookup/status metadata, matching the client-form contract. */
|
|
225
296
|
filterLookups = signal(null, ...(ngDevMode ? [{ debugName: "filterLookups" }] : /* istanbul ignore next */ []));
|
|
226
297
|
filterStatuses = signal(null, ...(ngDevMode ? [{ debugName: "filterStatuses" }] : /* istanbul ignore next */ []));
|
|
298
|
+
filterLevelsSchema = signal(null, ...(ngDevMode ? [{ debugName: "filterLevelsSchema" }] : /* istanbul ignore next */ []));
|
|
227
299
|
/**
|
|
228
300
|
* Fixed selections that cannot be removed or edited in SelectionConfiguration.
|
|
229
301
|
* These selections are always shown and are read-only.
|
|
@@ -235,6 +307,8 @@ class DashboardBuilderService {
|
|
|
235
307
|
/** Module tree requests are shared per services/workspace key. */
|
|
236
308
|
modulesTreeCache = new Map();
|
|
237
309
|
modulesTreeDataCache = new Map();
|
|
310
|
+
/** `Modules?LevelId=` responses, shared per level for the session. */
|
|
311
|
+
levelLogsCache = new Map();
|
|
238
312
|
/** HTTP context for gateway requests */
|
|
239
313
|
gatewayContext = new HttpContext().set(REQUEST_CONTEXT, {
|
|
240
314
|
useBaseUrl: true,
|
|
@@ -341,11 +415,13 @@ class DashboardBuilderService {
|
|
|
341
415
|
setModulesTreeWorkspaceId(workspaceId) {
|
|
342
416
|
this.modulesTreeWorkspaceId.set(workspaceId ?? null);
|
|
343
417
|
}
|
|
344
|
-
setFilterMetadata(lookups, statuses) {
|
|
418
|
+
setFilterMetadata(lookups, statuses, levelsSchema = null) {
|
|
345
419
|
if (lookups !== null)
|
|
346
420
|
this.filterLookups.set(lookups);
|
|
347
421
|
if (statuses !== null)
|
|
348
422
|
this.filterStatuses.set(statuses);
|
|
423
|
+
if (levelsSchema !== null)
|
|
424
|
+
this.filterLevelsSchema.set(levelsSchema);
|
|
349
425
|
}
|
|
350
426
|
/**
|
|
351
427
|
* Add a single fixed selection
|
|
@@ -664,9 +740,41 @@ class DashboardBuilderService {
|
|
|
664
740
|
asArray(value) {
|
|
665
741
|
return Array.isArray(value) ? value : [];
|
|
666
742
|
}
|
|
667
|
-
/** Levels schema (used to resolve a level's phase gates). */
|
|
743
|
+
/** Levels schema (used to resolve a level's logs and phase gates). */
|
|
668
744
|
getLevelsSchema() {
|
|
669
|
-
return
|
|
745
|
+
return (this.filterLevelsSchema() ??
|
|
746
|
+
this.asArray(this.getClientSettings()?.data?.levels?.schema));
|
|
747
|
+
}
|
|
748
|
+
/**
|
|
749
|
+
* Logs of a level, resolved from cached metadata only. Prefers the level's
|
|
750
|
+
* own `logs` collection (legacy contract) and otherwise derives them from the
|
|
751
|
+
* level-scoped status metadata — see `buildDashboardLevelLogOptions`.
|
|
752
|
+
* `fetchLevelLogs` is the authoritative source; this is the offline fallback.
|
|
753
|
+
*/
|
|
754
|
+
getLevelLogsByLevelId(levelId, moduleNamesById = new Map()) {
|
|
755
|
+
return buildDashboardLevelLogOptions(this.getLevelsSchema(), this.getStatusMetadata(), moduleNamesById, levelId);
|
|
756
|
+
}
|
|
757
|
+
/**
|
|
758
|
+
* Authoritative logs of a level: `GET Modules?LevelId={levelId}` filtered to
|
|
759
|
+
* the `Log` classification (`ModuleClassificationEnum.Log = 0`; Process
|
|
760
|
+
* modules are not logs). Cached per level for the session — the filter
|
|
761
|
+
* configuration only asks once per level the author touches.
|
|
762
|
+
*/
|
|
763
|
+
fetchLevelLogs(levelId) {
|
|
764
|
+
const cacheKey = String(levelId);
|
|
765
|
+
const cached = this.levelLogsCache.get(cacheKey);
|
|
766
|
+
if (cached)
|
|
767
|
+
return cached;
|
|
768
|
+
const request$ = this.http
|
|
769
|
+
.get(`Modules?LevelId=${encodeURIComponent(cacheKey)}`)
|
|
770
|
+
.pipe(map((response) => (response.data ?? [])
|
|
771
|
+
.filter((module) => module.classification === MODULE_CLASSIFICATION_LOG)
|
|
772
|
+
.map((module) => ({
|
|
773
|
+
id: module.id,
|
|
774
|
+
description: module.name?.display || module.name?.en || module.key || '',
|
|
775
|
+
}))), catchError(() => of([])), shareReplay({ bufferSize: 1, refCount: false }));
|
|
776
|
+
this.levelLogsCache.set(cacheKey, request$);
|
|
777
|
+
return request$;
|
|
670
778
|
}
|
|
671
779
|
/** Available lookups for the page-filter "Lookup" dropdown. */
|
|
672
780
|
getLookups() {
|
|
@@ -687,9 +795,16 @@ class DashboardBuilderService {
|
|
|
687
795
|
* `basicLevelsStatuses` by moduleId + module ('Level' or 'Log').
|
|
688
796
|
*/
|
|
689
797
|
getStatuses(levelId, module = 'Level') {
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
798
|
+
return resolveDashboardFilterStatuses(this.getStatusMetadata(), levelId, module);
|
|
799
|
+
}
|
|
800
|
+
/**
|
|
801
|
+
* Raw status metadata (host-owned, else the cached client settings). Exposed
|
|
802
|
+
* because the status filter derives its level-scoped "Log" options from the
|
|
803
|
+
* same records the runtime later resolves statuses from.
|
|
804
|
+
*/
|
|
805
|
+
getStatusMetadata() {
|
|
806
|
+
return (this.filterStatuses() ??
|
|
807
|
+
this.asArray(this.getClientSettings()?.data?.basicLevelsStatuses));
|
|
693
808
|
}
|
|
694
809
|
/** Phase gates of a level, for the runtime `phaseGate` filter. */
|
|
695
810
|
getPhaseGatesByLevelId(levelId) {
|
|
@@ -5061,6 +5176,7 @@ class DynamicFiltersConfig {
|
|
|
5061
5176
|
dashboardService = inject(DashboardBuilderService);
|
|
5062
5177
|
destroyRef = inject(DestroyRef);
|
|
5063
5178
|
emptySelections = [];
|
|
5179
|
+
emptyLevelLogs = [];
|
|
5064
5180
|
emptyModulesProperties = [];
|
|
5065
5181
|
emptyProperties = [];
|
|
5066
5182
|
propertiesFlatCache = new Map();
|
|
@@ -5086,6 +5202,30 @@ class DynamicFiltersConfig {
|
|
|
5086
5202
|
});
|
|
5087
5203
|
return treeOptions.length ? treeOptions : this.levelsSchema();
|
|
5088
5204
|
}, ...(ngDevMode ? [{ debugName: "levelSchemaOptions" }] : /* istanbul ignore next */ []));
|
|
5205
|
+
/** Module display names from the shared metadata tree, keyed by module id. */
|
|
5206
|
+
moduleNames = computed(() => buildDashboardModuleNames(this.modulesTree()), ...(ngDevMode ? [{ debugName: "moduleNames" }] : /* istanbul ignore next */ []));
|
|
5207
|
+
/** Logs fetched from `Modules?LevelId=`, keyed by level id. */
|
|
5208
|
+
fetchedLevelLogs = signal({}, ...(ngDevMode ? [{ debugName: "fetchedLevelLogs" }] : /* istanbul ignore next */ []));
|
|
5209
|
+
requestedLevelLogs = new Set();
|
|
5210
|
+
/**
|
|
5211
|
+
* Logs per level id, memoized so repeated template reads keep returning the
|
|
5212
|
+
* same array reference. Keyed access also keeps every status row on its own
|
|
5213
|
+
* level's logs instead of the single shared `levelLogs` list.
|
|
5214
|
+
*/
|
|
5215
|
+
levelLogsByLevelId = computed(() => {
|
|
5216
|
+
const moduleNames = this.moduleNames();
|
|
5217
|
+
const levelsSchema = this.dashboardService.getLevelsSchema();
|
|
5218
|
+
const statuses = this.dashboardService.getStatusMetadata();
|
|
5219
|
+
const resolved = new Map();
|
|
5220
|
+
return (levelId) => {
|
|
5221
|
+
const cached = resolved.get(levelId);
|
|
5222
|
+
if (cached)
|
|
5223
|
+
return cached;
|
|
5224
|
+
const logs = buildDashboardLevelLogOptions(levelsSchema, statuses, moduleNames, levelId);
|
|
5225
|
+
resolved.set(levelId, logs);
|
|
5226
|
+
return logs;
|
|
5227
|
+
};
|
|
5228
|
+
}, ...(ngDevMode ? [{ debugName: "levelLogsByLevelId" }] : /* istanbul ignore next */ []));
|
|
5089
5229
|
/** Product type to filter available field types */
|
|
5090
5230
|
productType = input('pplus', ...(ngDevMode ? [{ debugName: "productType" }] : /* istanbul ignore next */ []));
|
|
5091
5231
|
/** Workspace metadata scope used by the shared datasource selection editor. */
|
|
@@ -5125,6 +5265,7 @@ class DynamicFiltersConfig {
|
|
|
5125
5265
|
this.filterFields.set(fields);
|
|
5126
5266
|
fields.forEach((field) => {
|
|
5127
5267
|
if (field.type === 'status' && field.configuration?.schemaLevelId) {
|
|
5268
|
+
this.ensureLevelLogsLoaded(field.configuration.schemaLevelId);
|
|
5128
5269
|
this.loadLevelLogs.emit(field.configuration.schemaLevelId);
|
|
5129
5270
|
}
|
|
5130
5271
|
});
|
|
@@ -5218,12 +5359,58 @@ class DynamicFiltersConfig {
|
|
|
5218
5359
|
}
|
|
5219
5360
|
this.notifyChange();
|
|
5220
5361
|
}
|
|
5362
|
+
/**
|
|
5363
|
+
* "Log" options for one status row's selected schema level. Resolved from
|
|
5364
|
+
* the shared filter metadata, falling back to the `levelLogs` input for
|
|
5365
|
+
* hosts that answer `(loadLevelLogs)` from their own source.
|
|
5366
|
+
*/
|
|
5367
|
+
levelLogOptions(schemaLevelId) {
|
|
5368
|
+
if (schemaLevelId === null ||
|
|
5369
|
+
schemaLevelId === undefined ||
|
|
5370
|
+
schemaLevelId === '') {
|
|
5371
|
+
return this.emptyLevelLogs;
|
|
5372
|
+
}
|
|
5373
|
+
const key = String(schemaLevelId);
|
|
5374
|
+
const fetched = this.fetchedLevelLogs()[key];
|
|
5375
|
+
if (fetched?.length)
|
|
5376
|
+
return fetched;
|
|
5377
|
+
const resolved = this.levelLogsByLevelId()(key);
|
|
5378
|
+
return resolved.length ? resolved : this.levelLogs();
|
|
5379
|
+
}
|
|
5380
|
+
/**
|
|
5381
|
+
* Load a level's logs from `Modules?LevelId=` once. Called when a status row
|
|
5382
|
+
* gains a level (edit or hydrate) — never from the template, so it stays out
|
|
5383
|
+
* of change detection.
|
|
5384
|
+
*/
|
|
5385
|
+
ensureLevelLogsLoaded(schemaLevelId) {
|
|
5386
|
+
if (schemaLevelId === null ||
|
|
5387
|
+
schemaLevelId === undefined ||
|
|
5388
|
+
schemaLevelId === '') {
|
|
5389
|
+
return;
|
|
5390
|
+
}
|
|
5391
|
+
const key = String(schemaLevelId);
|
|
5392
|
+
if (this.requestedLevelLogs.has(key))
|
|
5393
|
+
return;
|
|
5394
|
+
this.requestedLevelLogs.add(key);
|
|
5395
|
+
this.dashboardService
|
|
5396
|
+
.fetchLevelLogs(key)
|
|
5397
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
5398
|
+
.subscribe((logs) => {
|
|
5399
|
+
if (!logs.length)
|
|
5400
|
+
return;
|
|
5401
|
+
this.fetchedLevelLogs.update((current) => ({
|
|
5402
|
+
...current,
|
|
5403
|
+
[key]: logs,
|
|
5404
|
+
}));
|
|
5405
|
+
});
|
|
5406
|
+
}
|
|
5221
5407
|
/** Handle schema level change for status/phaseGate */
|
|
5222
5408
|
onSchemaLevelChange(index, schemaLevelId) {
|
|
5223
5409
|
this.updateFieldConfig(index, 'schemaLevelId', schemaLevelId);
|
|
5224
|
-
// Clear log ID and
|
|
5410
|
+
// Clear log ID and load the newly selected level's logs
|
|
5225
5411
|
this.updateFieldConfig(index, 'logId', null);
|
|
5226
5412
|
if (schemaLevelId) {
|
|
5413
|
+
this.ensureLevelLogsLoaded(schemaLevelId);
|
|
5227
5414
|
this.loadLevelLogs.emit(schemaLevelId);
|
|
5228
5415
|
}
|
|
5229
5416
|
}
|
|
@@ -5675,7 +5862,7 @@ class DynamicFiltersConfig {
|
|
|
5675
5862
|
useExisting: forwardRef(() => DynamicFiltersConfig),
|
|
5676
5863
|
multi: true,
|
|
5677
5864
|
},
|
|
5678
|
-
], 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]=\"lookupOptions()\"\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]=\"levelSchemaOptions()\"\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]=\"levelSchemaOptions()\"\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 });
|
|
5865
|
+
], 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]=\"lookupOptions()\"\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]=\"levelSchemaOptions()\"\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]=\"\r\n levelLogOptions(field.configuration?.schemaLevelId)\r\n \"\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]=\"levelSchemaOptions()\"\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 });
|
|
5679
5866
|
}
|
|
5680
5867
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DynamicFiltersConfig, decorators: [{
|
|
5681
5868
|
type: Component,
|
|
@@ -5698,7 +5885,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
5698
5885
|
useExisting: forwardRef(() => DynamicFiltersConfig),
|
|
5699
5886
|
multi: true,
|
|
5700
5887
|
},
|
|
5701
|
-
], 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]=\"lookupOptions()\"\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]=\"levelSchemaOptions()\"\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]=\"levelSchemaOptions()\"\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" }]
|
|
5888
|
+
], 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]=\"lookupOptions()\"\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]=\"levelSchemaOptions()\"\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]=\"\r\n levelLogOptions(field.configuration?.schemaLevelId)\r\n \"\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]=\"levelSchemaOptions()\"\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" }]
|
|
5702
5889
|
}], 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"] }] } });
|
|
5703
5890
|
|
|
5704
5891
|
/**
|
|
@@ -5738,14 +5925,13 @@ class ManageFilterOnPage {
|
|
|
5738
5925
|
this.filtersConfig.set(filters);
|
|
5739
5926
|
}
|
|
5740
5927
|
/**
|
|
5741
|
-
* Hook for hosts that
|
|
5742
|
-
*
|
|
5743
|
-
*
|
|
5744
|
-
*
|
|
5928
|
+
* Hook for hosts that feed level-log values from their own source. Left as
|
|
5929
|
+
* a no-op because `DynamicFiltersConfig` already resolves the "Log" options
|
|
5930
|
+
* from the host-owned levels schema (`DashboardBuilder[levelsSchema]`);
|
|
5931
|
+
* `levelLogs` stays only as the fallback for an external log source.
|
|
5745
5932
|
*/
|
|
5746
5933
|
onLoadLevelLogs(_schemaLevelId) {
|
|
5747
|
-
// No-op:
|
|
5748
|
-
// populate level-log values for filter dropdowns.
|
|
5934
|
+
// No-op: options come from the levels schema fed into the builder service.
|
|
5749
5935
|
}
|
|
5750
5936
|
/** Save and close the dialog */
|
|
5751
5937
|
save() {
|
|
@@ -8230,6 +8416,14 @@ const HEADER_WIDGET_SECTION = {
|
|
|
8230
8416
|
],
|
|
8231
8417
|
default: 'start',
|
|
8232
8418
|
},
|
|
8419
|
+
{
|
|
8420
|
+
// header-card reads configAsType.headerCardConfig.isHeaderCentered and
|
|
8421
|
+
// forces it as an override on top of `textAlign` above.
|
|
8422
|
+
key: 'centerHeader',
|
|
8423
|
+
label: 'Center header',
|
|
8424
|
+
type: 'boolean',
|
|
8425
|
+
path: 'clientConfig.configAsType.headerCardConfig.isHeaderCentered',
|
|
8426
|
+
},
|
|
8233
8427
|
],
|
|
8234
8428
|
};
|
|
8235
8429
|
const TOPBAR_WIDGET_SECTION = {
|
|
@@ -8247,6 +8441,13 @@ const TOPBAR_WIDGET_SECTION = {
|
|
|
8247
8441
|
placeholder: 'Topbar label',
|
|
8248
8442
|
},
|
|
8249
8443
|
...LAYOUT_WIDGET_ICON_FIELDS,
|
|
8444
|
+
{
|
|
8445
|
+
// topbar-card reads configAsType.headerCardConfig.isHeaderCentered.
|
|
8446
|
+
key: 'centerHeader',
|
|
8447
|
+
label: 'Center header',
|
|
8448
|
+
type: 'boolean',
|
|
8449
|
+
path: 'clientConfig.configAsType.headerCardConfig.isHeaderCentered',
|
|
8450
|
+
},
|
|
8250
8451
|
{
|
|
8251
8452
|
key: 'topbarBg',
|
|
8252
8453
|
label: 'Topbar background',
|
|
@@ -10333,6 +10534,19 @@ const HEADER_WIDGET_BINDINGS = [
|
|
|
10333
10534
|
],
|
|
10334
10535
|
simpleOrAdvanced: 'simple',
|
|
10335
10536
|
},
|
|
10537
|
+
{
|
|
10538
|
+
chartId: 'header',
|
|
10539
|
+
controlId: 'centerHeader',
|
|
10540
|
+
domain: 'header',
|
|
10541
|
+
label: 'Center header',
|
|
10542
|
+
uiPath: 'header.centerHeader',
|
|
10543
|
+
persistedPath: 'clientConfig.configAsType.headerCardConfig.isHeaderCentered',
|
|
10544
|
+
runtimePath: 'clientConfig.configAsType.headerCardConfig.isHeaderCentered',
|
|
10545
|
+
rendererReadPaths: [
|
|
10546
|
+
'clientConfig.configAsType.headerCardConfig.isHeaderCentered',
|
|
10547
|
+
],
|
|
10548
|
+
simpleOrAdvanced: 'simple',
|
|
10549
|
+
},
|
|
10336
10550
|
];
|
|
10337
10551
|
const TOPBAR_WIDGET_BINDINGS = [
|
|
10338
10552
|
{
|
|
@@ -10346,6 +10560,19 @@ const TOPBAR_WIDGET_BINDINGS = [
|
|
|
10346
10560
|
rendererReadPaths: ['clientConfig.title.en', 'clientConfig.title.ar'],
|
|
10347
10561
|
simpleOrAdvanced: 'simple',
|
|
10348
10562
|
},
|
|
10563
|
+
{
|
|
10564
|
+
chartId: 'topbar',
|
|
10565
|
+
controlId: 'centerHeader',
|
|
10566
|
+
domain: 'header',
|
|
10567
|
+
label: 'Center header',
|
|
10568
|
+
uiPath: 'topbar.centerHeader',
|
|
10569
|
+
persistedPath: 'clientConfig.configAsType.headerCardConfig.isHeaderCentered',
|
|
10570
|
+
runtimePath: 'clientConfig.configAsType.headerCardConfig.isHeaderCentered',
|
|
10571
|
+
rendererReadPaths: [
|
|
10572
|
+
'clientConfig.configAsType.headerCardConfig.isHeaderCentered',
|
|
10573
|
+
],
|
|
10574
|
+
simpleOrAdvanced: 'simple',
|
|
10575
|
+
},
|
|
10349
10576
|
{
|
|
10350
10577
|
chartId: 'topbar',
|
|
10351
10578
|
controlId: 'showBackButton',
|
|
@@ -22831,7 +23058,7 @@ class ActionService {
|
|
|
22831
23058
|
dialogConfig?.clientConfig?.title?.['ar'] ||
|
|
22832
23059
|
'';
|
|
22833
23060
|
// Dynamically import DashboardDialogComponent to avoid circular dependency
|
|
22834
|
-
import('./masterteam-dashboard-builder-dashboard-dialog.component-
|
|
23061
|
+
import('./masterteam-dashboard-builder-dashboard-dialog.component-DHcBk7ey.mjs').then(({ DashboardDialogComponent }) => {
|
|
22835
23062
|
// Open dialog using ModalService
|
|
22836
23063
|
this.modalService.openModal(DashboardDialogComponent, 'dialog', {
|
|
22837
23064
|
header: title,
|
|
@@ -29571,14 +29798,6 @@ class HeaderCardComponent {
|
|
|
29571
29798
|
if (this.borderColor() && !this.hasExplicitSideBorders()) {
|
|
29572
29799
|
styles['border'] = `1px solid ${this.borderColor()}`;
|
|
29573
29800
|
}
|
|
29574
|
-
// Header text alignment (StyleConfig['justify-content']: start|center|end).
|
|
29575
|
-
// The .header-card element is `display:flex`, so justify-content controls
|
|
29576
|
-
// horizontal distribution of the header block. Gated: when unset, leave
|
|
29577
|
-
// alignment to the existing CSS (no change for existing dashboards).
|
|
29578
|
-
const justify = this.headerJustify();
|
|
29579
|
-
if (justify) {
|
|
29580
|
-
styles['justify-content'] = justify;
|
|
29581
|
-
}
|
|
29582
29801
|
// Hide the whole header band when isHeaderHidden is set.
|
|
29583
29802
|
if (this.isHeaderHidden()) {
|
|
29584
29803
|
styles['display'] = 'none';
|
|
@@ -29599,6 +29818,25 @@ class HeaderCardComponent {
|
|
|
29599
29818
|
const justify = this.configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']?.['justify-content'];
|
|
29600
29819
|
return justify ? String(justify) : '';
|
|
29601
29820
|
}, ...(ngDevMode ? [{ debugName: "headerJustify" }] : /* istanbul ignore next */ []));
|
|
29821
|
+
/**
|
|
29822
|
+
* Inline styles for `.header-content` (title + status list). Applied here
|
|
29823
|
+
* rather than on the outer `.header-card` row: `.header-content` has
|
|
29824
|
+
* `flex: 1` and always fills the row's free space, so setting
|
|
29825
|
+
* `justify-content` on the outer row was a no-op — there was nothing left
|
|
29826
|
+
* to redistribute. `align-items: center` additionally centers the block
|
|
29827
|
+
* when the header collapses to a column (icon-placement-top / narrow
|
|
29828
|
+
* cards), where `justify-content` controls the vertical axis instead.
|
|
29829
|
+
*/
|
|
29830
|
+
headerContentStyles = computed(() => {
|
|
29831
|
+
const justify = this.headerJustify();
|
|
29832
|
+
if (!justify)
|
|
29833
|
+
return {};
|
|
29834
|
+
const styles = { 'justify-content': justify };
|
|
29835
|
+
if (justify === 'center') {
|
|
29836
|
+
styles['align-items'] = 'center';
|
|
29837
|
+
}
|
|
29838
|
+
return styles;
|
|
29839
|
+
}, ...(ngDevMode ? [{ debugName: "headerContentStyles" }] : /* istanbul ignore next */ []));
|
|
29602
29840
|
/**
|
|
29603
29841
|
* Center the header block
|
|
29604
29842
|
* (configAsType.headerCardConfig.isHeaderCentered === true).
|
|
@@ -29713,11 +29951,11 @@ class HeaderCardComponent {
|
|
|
29713
29951
|
this.onAction.emit({ type: 'click', data: {} });
|
|
29714
29952
|
}
|
|
29715
29953
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HeaderCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
29716
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: HeaderCardComponent, isStandalone: true, selector: "mt-header-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null }, titleEditable: { classPropertyName: "titleEditable", publicName: "titleEditable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction", titleChange: "titleChange" }, ngImport: i0, template: "<div\r\n class=\"header-container\"\r\n [ngStyle]=\"containerStyles()\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <div\r\n class=\"header-card\"\r\n [class.clickable]=\"isClickable()\"\r\n [class.icon-placement-end]=\"iconPlacement() === 'end'\"\r\n [class.icon-placement-top]=\"iconPlacement() === 'top'\"\r\n [ngStyle]=\"cardStyles()\"\r\n [style.box-sizing]=\"'border-box'\"\r\n >\r\n <!-- Logo or Icon Display -->\r\n @if (logoUrl() || icon()) {\r\n <div class=\"header-icon-wrapper\">\r\n @if (logoUrl()) {\r\n <img [src]=\"logoUrl()\" alt=\"Logo\" class=\"header-logo\" />\r\n } @else if (icon()) {\r\n <mt-avatar\r\n class=\"header-icon\"\r\n [icon]=\"icon()\"\r\n size=\"large\"\r\n shape=\"square\"\r\n [style.--p-avatar-background]=\"iconBgColor()\"\r\n [style.--p-avatar-color]=\"iconColor()\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n <div
|
|
29954
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: HeaderCardComponent, isStandalone: true, selector: "mt-header-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null }, titleEditable: { classPropertyName: "titleEditable", publicName: "titleEditable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction", titleChange: "titleChange" }, ngImport: i0, template: "<div\r\n class=\"header-container\"\r\n [ngStyle]=\"containerStyles()\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <div\r\n class=\"header-card\"\r\n [class.clickable]=\"isClickable()\"\r\n [class.icon-placement-end]=\"iconPlacement() === 'end'\"\r\n [class.icon-placement-top]=\"iconPlacement() === 'top'\"\r\n [ngStyle]=\"cardStyles()\"\r\n [style.box-sizing]=\"'border-box'\"\r\n >\r\n <!-- Logo or Icon Display -->\r\n @if (logoUrl() || icon()) {\r\n <div class=\"header-icon-wrapper\">\r\n @if (logoUrl()) {\r\n <img [src]=\"logoUrl()\" alt=\"Logo\" class=\"header-logo\" />\r\n } @else if (icon()) {\r\n <mt-avatar\r\n class=\"header-icon\"\r\n [icon]=\"icon()\"\r\n size=\"large\"\r\n shape=\"square\"\r\n [style.--p-avatar-background]=\"iconBgColor()\"\r\n [style.--p-avatar-color]=\"iconColor()\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n <div\r\n class=\"header-content\"\r\n [class.label-title]=\"!isFullWidth()\"\r\n [ngStyle]=\"headerContentStyles()\"\r\n >\r\n @if (titleEditable() && editingTitle()) {\r\n <input\r\n class=\"header-title\"\r\n type=\"text\"\r\n [value]=\"titleDraft()\"\r\n [ngStyle]=\"{ 'font-size': fontSizeTitle() }\"\r\n (input)=\"onTitleInput($any($event.target).value)\"\r\n (keydown.enter)=\"onCommitTitle()\"\r\n (keydown.escape)=\"onCancelTitle()\"\r\n (blur)=\"onCommitTitle()\"\r\n data-dashboard-action=\"edit-title\"\r\n [attr.aria-label]=\"t('guided.editTitle')\"\r\n />\r\n } @else {\r\n <span\r\n class=\"header-title\"\r\n [class.editable]=\"titleEditable()\"\r\n [ngStyle]=\"{ 'font-size': fontSizeTitle() }\"\r\n (click)=\"onTitleClick()\"\r\n [attr.data-dashboard-action]=\"titleEditable() ? 'edit-title' : null\"\r\n >\r\n {{ title() }}\r\n </span>\r\n }\r\n\r\n <!-- Status Indicators -->\r\n @if (statuses().length > 0) {\r\n <div class=\"status-list\">\r\n @for (status of statuses(); track status.label) {\r\n <div class=\"status-item\">\r\n @if (status.iconClass) {\r\n <span\r\n [class]=\"status.iconClass\"\r\n class=\"status-icon\"\r\n [style.color]=\"status.color\"\r\n [style.font-size.px]=\"status.iconSize || 14\"\r\n ></span>\r\n } @else {\r\n <span\r\n class=\"status-dot\"\r\n [class.circle]=\"status.shape === 'circle' || !status.shape\"\r\n [class.square]=\"\r\n status.shape === 'square' || status.shape === 'rect'\r\n \"\r\n [class.rectangul]=\"status.shape === 'rectangul'\"\r\n [class.rhombic]=\"status.shape === 'rhombic'\"\r\n [ngStyle]=\"{\r\n 'background-color': status.color,\r\n 'border-color': status.borderColor,\r\n 'border-bottom-color': status.borderBottomColor,\r\n }\"\r\n ></span>\r\n }\r\n <span class=\"status-label\">{{ status.label }}</span>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (showArrow()) {\r\n <div class=\"header-arrow\" (click)=\"onArrowClick()\">\r\n <i class=\"pi pi-angle-right\"></i>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".header-container{height:100%}.header-card{display:flex;align-items:center;gap:.5rem;height:100%}.header-card.clickable{cursor:pointer}.header-card.icon-placement-end .header-icon-wrapper{order:2}.header-card.icon-placement-top{align-items:stretch;flex-direction:column}.header-card.icon-placement-top .header-icon-wrapper{align-self:flex-start}.header-card.icon-placement-top .header-content{flex:0 1 auto;width:100%}.header-icon-wrapper{display:flex;align-items:center}.header-logo{width:50px;height:50px;object-fit:contain;margin:0 .5rem}.header-icon{margin:0 .5rem}.header-content{display:flex;justify-content:space-between;align-items:center;flex:1}.header-content.label-title{flex-direction:column;align-items:flex-start}.header-title{margin:0;font-weight:600;line-height:1.2}.header-title.editable{cursor:text}input.header-title{min-width:10rem;border:1px solid var(--p-primary-500, #2563eb);border-radius:4px;padding:.15rem .35rem;background:#fff;outline:none}.status-list{display:flex;gap:1rem;flex-wrap:wrap}.status-item{display:flex;align-items:center;gap:.25rem}.status-dot{width:.5rem;height:.5rem;border-radius:50%}.status-dot.circle{border-radius:50%}.status-dot.square,.status-dot.rect{border-radius:2px}.status-dot.rectangul{border-radius:2px;width:.75rem;height:.375rem}.status-dot.rhombic{transform:rotate(45deg);border-radius:2px}.status-icon{display:inline-flex;align-items:center;justify-content:center}.status-label{font-size:.75rem;color:#666}.header-arrow{font-size:1.5rem;color:#999;cursor:pointer}\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: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
29717
29955
|
}
|
|
29718
29956
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HeaderCardComponent, decorators: [{
|
|
29719
29957
|
type: Component,
|
|
29720
|
-
args: [{ selector: 'mt-header-card', standalone: true, imports: [CommonModule, TranslocoDirective, Avatar], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"header-container\"\r\n [ngStyle]=\"containerStyles()\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <div\r\n class=\"header-card\"\r\n [class.clickable]=\"isClickable()\"\r\n [class.icon-placement-end]=\"iconPlacement() === 'end'\"\r\n [class.icon-placement-top]=\"iconPlacement() === 'top'\"\r\n [ngStyle]=\"cardStyles()\"\r\n [style.box-sizing]=\"'border-box'\"\r\n >\r\n <!-- Logo or Icon Display -->\r\n @if (logoUrl() || icon()) {\r\n <div class=\"header-icon-wrapper\">\r\n @if (logoUrl()) {\r\n <img [src]=\"logoUrl()\" alt=\"Logo\" class=\"header-logo\" />\r\n } @else if (icon()) {\r\n <mt-avatar\r\n class=\"header-icon\"\r\n [icon]=\"icon()\"\r\n size=\"large\"\r\n shape=\"square\"\r\n [style.--p-avatar-background]=\"iconBgColor()\"\r\n [style.--p-avatar-color]=\"iconColor()\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n <div
|
|
29958
|
+
args: [{ selector: 'mt-header-card', standalone: true, imports: [CommonModule, TranslocoDirective, Avatar], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"header-container\"\r\n [ngStyle]=\"containerStyles()\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <div\r\n class=\"header-card\"\r\n [class.clickable]=\"isClickable()\"\r\n [class.icon-placement-end]=\"iconPlacement() === 'end'\"\r\n [class.icon-placement-top]=\"iconPlacement() === 'top'\"\r\n [ngStyle]=\"cardStyles()\"\r\n [style.box-sizing]=\"'border-box'\"\r\n >\r\n <!-- Logo or Icon Display -->\r\n @if (logoUrl() || icon()) {\r\n <div class=\"header-icon-wrapper\">\r\n @if (logoUrl()) {\r\n <img [src]=\"logoUrl()\" alt=\"Logo\" class=\"header-logo\" />\r\n } @else if (icon()) {\r\n <mt-avatar\r\n class=\"header-icon\"\r\n [icon]=\"icon()\"\r\n size=\"large\"\r\n shape=\"square\"\r\n [style.--p-avatar-background]=\"iconBgColor()\"\r\n [style.--p-avatar-color]=\"iconColor()\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n <div\r\n class=\"header-content\"\r\n [class.label-title]=\"!isFullWidth()\"\r\n [ngStyle]=\"headerContentStyles()\"\r\n >\r\n @if (titleEditable() && editingTitle()) {\r\n <input\r\n class=\"header-title\"\r\n type=\"text\"\r\n [value]=\"titleDraft()\"\r\n [ngStyle]=\"{ 'font-size': fontSizeTitle() }\"\r\n (input)=\"onTitleInput($any($event.target).value)\"\r\n (keydown.enter)=\"onCommitTitle()\"\r\n (keydown.escape)=\"onCancelTitle()\"\r\n (blur)=\"onCommitTitle()\"\r\n data-dashboard-action=\"edit-title\"\r\n [attr.aria-label]=\"t('guided.editTitle')\"\r\n />\r\n } @else {\r\n <span\r\n class=\"header-title\"\r\n [class.editable]=\"titleEditable()\"\r\n [ngStyle]=\"{ 'font-size': fontSizeTitle() }\"\r\n (click)=\"onTitleClick()\"\r\n [attr.data-dashboard-action]=\"titleEditable() ? 'edit-title' : null\"\r\n >\r\n {{ title() }}\r\n </span>\r\n }\r\n\r\n <!-- Status Indicators -->\r\n @if (statuses().length > 0) {\r\n <div class=\"status-list\">\r\n @for (status of statuses(); track status.label) {\r\n <div class=\"status-item\">\r\n @if (status.iconClass) {\r\n <span\r\n [class]=\"status.iconClass\"\r\n class=\"status-icon\"\r\n [style.color]=\"status.color\"\r\n [style.font-size.px]=\"status.iconSize || 14\"\r\n ></span>\r\n } @else {\r\n <span\r\n class=\"status-dot\"\r\n [class.circle]=\"status.shape === 'circle' || !status.shape\"\r\n [class.square]=\"\r\n status.shape === 'square' || status.shape === 'rect'\r\n \"\r\n [class.rectangul]=\"status.shape === 'rectangul'\"\r\n [class.rhombic]=\"status.shape === 'rhombic'\"\r\n [ngStyle]=\"{\r\n 'background-color': status.color,\r\n 'border-color': status.borderColor,\r\n 'border-bottom-color': status.borderBottomColor,\r\n }\"\r\n ></span>\r\n }\r\n <span class=\"status-label\">{{ status.label }}</span>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (showArrow()) {\r\n <div class=\"header-arrow\" (click)=\"onArrowClick()\">\r\n <i class=\"pi pi-angle-right\"></i>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".header-container{height:100%}.header-card{display:flex;align-items:center;gap:.5rem;height:100%}.header-card.clickable{cursor:pointer}.header-card.icon-placement-end .header-icon-wrapper{order:2}.header-card.icon-placement-top{align-items:stretch;flex-direction:column}.header-card.icon-placement-top .header-icon-wrapper{align-self:flex-start}.header-card.icon-placement-top .header-content{flex:0 1 auto;width:100%}.header-icon-wrapper{display:flex;align-items:center}.header-logo{width:50px;height:50px;object-fit:contain;margin:0 .5rem}.header-icon{margin:0 .5rem}.header-content{display:flex;justify-content:space-between;align-items:center;flex:1}.header-content.label-title{flex-direction:column;align-items:flex-start}.header-title{margin:0;font-weight:600;line-height:1.2}.header-title.editable{cursor:text}input.header-title{min-width:10rem;border:1px solid var(--p-primary-500, #2563eb);border-radius:4px;padding:.15rem .35rem;background:#fff;outline:none}.status-list{display:flex;gap:1rem;flex-wrap:wrap}.status-item{display:flex;align-items:center;gap:.25rem}.status-dot{width:.5rem;height:.5rem;border-radius:50%}.status-dot.circle{border-radius:50%}.status-dot.square,.status-dot.rect{border-radius:2px}.status-dot.rectangul{border-radius:2px;width:.75rem;height:.375rem}.status-dot.rhombic{transform:rotate(45deg);border-radius:2px}.status-icon{display:inline-flex;align-items:center;justify-content:center}.status-label{font-size:.75rem;color:#666}.header-arrow{font-size:1.5rem;color:#999;cursor:pointer}\n"] }]
|
|
29721
29959
|
}], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }], onAction: [{ type: i0.Output, args: ["onAction"] }], titleEditable: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleEditable", required: false }] }], titleChange: [{ type: i0.Output, args: ["titleChange"] }] } });
|
|
29722
29960
|
|
|
29723
29961
|
/**
|
|
@@ -30766,6 +31004,14 @@ class TopbarCardComponent {
|
|
|
30766
31004
|
const placement = this.configAsType()['headerCardConfig']?.['iconPlacement'];
|
|
30767
31005
|
return placement === 'end' || placement === 'top' ? placement : 'start';
|
|
30768
31006
|
}, ...(ngDevMode ? [{ debugName: "iconPlacement" }] : /* istanbul ignore next */ []));
|
|
31007
|
+
/**
|
|
31008
|
+
* Center the icon/title block within the topbar row
|
|
31009
|
+
* (configAsType.headerCardConfig.isHeaderCentered === true) — same source
|
|
31010
|
+
* field the header widget reads.
|
|
31011
|
+
*/
|
|
31012
|
+
isHeaderCentered = computed(() => {
|
|
31013
|
+
return (this.configAsType()['headerCardConfig']?.['isHeaderCentered'] === true);
|
|
31014
|
+
}, ...(ngDevMode ? [{ debugName: "isHeaderCentered" }] : /* istanbul ignore next */ []));
|
|
30769
31015
|
iconColor = computed(() => {
|
|
30770
31016
|
return this.styleConfig()['iconColor'] || '#4caf50';
|
|
30771
31017
|
}, ...(ngDevMode ? [{ debugName: "iconColor" }] : /* istanbul ignore next */ []));
|
|
@@ -30853,11 +31099,11 @@ class TopbarCardComponent {
|
|
|
30853
31099
|
this.titleDraft.set('');
|
|
30854
31100
|
}
|
|
30855
31101
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TopbarCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
30856
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: TopbarCardComponent, isStandalone: true, selector: "mt-topbar-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null }, defaultBreadcrumbLabel: { classPropertyName: "defaultBreadcrumbLabel", publicName: "defaultBreadcrumbLabel", isSignal: true, isRequired: false, transformFunction: null }, titleEditable: { classPropertyName: "titleEditable", publicName: "titleEditable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { titleChange: "titleChange" }, ngImport: i0, template: "<div\r\n class=\"flex h-full flex-col gap-3 md:flex-row md:items-center md:justify-between\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n [style.background-color]=\"\r\n cardStyleConfig()['backgroundColor'] || styleConfig()['background-color']\r\n \"\r\n [style.border-radius.px]=\"cardStyleConfig()['borderRadius']\"\r\n [style.border-color]=\"borderColor()\"\r\n [style.border-style]=\"borderWidth() ? 'solid' : null\"\r\n [style.border-width.px]=\"borderWidth()\"\r\n [style.color]=\"styleConfig()['color'] || 'inherit'\"\r\n [style.padding.px]=\"padding()\"\r\n>\r\n <ng-template #topbarIcon>\r\n <mt-avatar\r\n [icon]=\"icon()\"\r\n size=\"normal\"\r\n shape=\"square\"\r\n [style.--p-avatar-background]=\"iconBackgroundColor()\"\r\n [style.--p-avatar-color]=\"iconColor()\"\r\n />\r\n </ng-template>\r\n\r\n <div\r\n class=\"flex min-w-0 flex-1 gap-3\"\r\n [class.flex-col]=\"iconPlacement() === 'top'\"\r\n [class.items-center]=\"iconPlacement() !== 'top'\"\r\n [class.items-start]=\"iconPlacement() === 'top'\"\r\n >\r\n @if (icon() && iconPlacement() !== \"end\") {\r\n <ng-container *ngTemplateOutlet=\"topbarIcon\" />\r\n }\r\n\r\n <div class=\"min-w-0\" [class.w-full]=\"iconPlacement() === 'top'\">\r\n @if (titleEditable() && editingTitle()) {\r\n <input\r\n class=\"m-0 w-full min-w-40 rounded border border-primary bg-surface-0 px-2 py-1 font-semibold leading-tight outline-none\"\r\n type=\"text\"\r\n [value]=\"titleDraft()\"\r\n [style.font-size.px]=\"titleFontSize()\"\r\n (input)=\"onTitleInput($any($event.target).value)\"\r\n (keydown.enter)=\"onCommitTitle()\"\r\n (keydown.escape)=\"onCancelTitle()\"\r\n (blur)=\"onCommitTitle()\"\r\n data-dashboard-action=\"edit-title\"\r\n [attr.aria-label]=\"t('guided.editTitle')\"\r\n />\r\n } @else if (title()) {\r\n <h3\r\n class=\"m-0 truncate font-semibold leading-tight\"\r\n [class.cursor-text]=\"titleEditable()\"\r\n [style.font-size.px]=\"titleFontSize()\"\r\n [attr.data-dashboard-action]=\"titleEditable() ? 'edit-title' : null\"\r\n (click)=\"onStartEditTitle($event)\"\r\n >\r\n {{ title() }}\r\n </h3>\r\n }\r\n\r\n @if (showSubtitle()) {\r\n <p\r\n class=\"m-0 truncate leading-tight\"\r\n [style.font-size.px]=\"subtitleFontSize()\"\r\n [style.color]=\"subtitleColor()\"\r\n >\r\n {{ subtitleText() }}\r\n </p>\r\n }\r\n </div>\r\n\r\n @if (icon() && iconPlacement() === \"end\") {\r\n <ng-container *ngTemplateOutlet=\"topbarIcon\" />\r\n }\r\n </div>\r\n\r\n @if (breadcrumbs().length > 0) {\r\n <nav class=\"min-w-0 md:max-w-[60%]\">\r\n <ol class=\"flex flex-wrap items-center gap-2 text-sm\">\r\n @for (\r\n breadcrumb of breadcrumbs();\r\n track breadcrumb.label + $index;\r\n let last = $last\r\n ) {\r\n <li class=\"flex min-w-0 items-center gap-2\">\r\n @if (breadcrumb.link) {\r\n <a\r\n class=\"max-w-[12rem] truncate text-muted-color transition-colors hover:text-primary\"\r\n [href]=\"breadcrumb.link\"\r\n [target]=\"isExternalLink(breadcrumb.link) ? '_blank' : null\"\r\n [rel]=\"isExternalLink(breadcrumb.link) ? 'noreferrer' : null\"\r\n >\r\n {{ breadcrumb.label }}\r\n </a>\r\n } @else {\r\n <span class=\"max-w-[12rem] truncate text-muted-color\">\r\n {{ breadcrumb.label }}\r\n </span>\r\n }\r\n\r\n @if (!last) {\r\n <i class=\"mti mti-chevron-right text-xs text-muted-color\"></i>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n </nav>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
31102
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: TopbarCardComponent, isStandalone: true, selector: "mt-topbar-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null }, defaultBreadcrumbLabel: { classPropertyName: "defaultBreadcrumbLabel", publicName: "defaultBreadcrumbLabel", isSignal: true, isRequired: false, transformFunction: null }, titleEditable: { classPropertyName: "titleEditable", publicName: "titleEditable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { titleChange: "titleChange" }, ngImport: i0, template: "<div\r\n class=\"flex h-full flex-col gap-3 md:flex-row md:items-center md:justify-between\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n [style.background-color]=\"\r\n cardStyleConfig()['backgroundColor'] || styleConfig()['background-color']\r\n \"\r\n [style.border-radius.px]=\"cardStyleConfig()['borderRadius']\"\r\n [style.border-color]=\"borderColor()\"\r\n [style.border-style]=\"borderWidth() ? 'solid' : null\"\r\n [style.border-width.px]=\"borderWidth()\"\r\n [style.color]=\"styleConfig()['color'] || 'inherit'\"\r\n [style.padding.px]=\"padding()\"\r\n>\r\n <ng-template #topbarIcon>\r\n <mt-avatar\r\n [icon]=\"icon()\"\r\n size=\"normal\"\r\n shape=\"square\"\r\n [style.--p-avatar-background]=\"iconBackgroundColor()\"\r\n [style.--p-avatar-color]=\"iconColor()\"\r\n />\r\n </ng-template>\r\n\r\n <div\r\n class=\"flex min-w-0 flex-1 gap-3\"\r\n [class.flex-col]=\"iconPlacement() === 'top'\"\r\n [class.items-center]=\"iconPlacement() !== 'top'\"\r\n [class.items-start]=\"iconPlacement() === 'top'\"\r\n [class.justify-center]=\"isHeaderCentered()\"\r\n >\r\n @if (icon() && iconPlacement() !== \"end\") {\r\n <ng-container *ngTemplateOutlet=\"topbarIcon\" />\r\n }\r\n\r\n <div class=\"min-w-0\" [class.w-full]=\"iconPlacement() === 'top'\">\r\n @if (titleEditable() && editingTitle()) {\r\n <input\r\n class=\"m-0 w-full min-w-40 rounded border border-primary bg-surface-0 px-2 py-1 font-semibold leading-tight outline-none\"\r\n type=\"text\"\r\n [value]=\"titleDraft()\"\r\n [style.font-size.px]=\"titleFontSize()\"\r\n (input)=\"onTitleInput($any($event.target).value)\"\r\n (keydown.enter)=\"onCommitTitle()\"\r\n (keydown.escape)=\"onCancelTitle()\"\r\n (blur)=\"onCommitTitle()\"\r\n data-dashboard-action=\"edit-title\"\r\n [attr.aria-label]=\"t('guided.editTitle')\"\r\n />\r\n } @else if (title()) {\r\n <h3\r\n class=\"m-0 truncate font-semibold leading-tight\"\r\n [class.cursor-text]=\"titleEditable()\"\r\n [style.font-size.px]=\"titleFontSize()\"\r\n [attr.data-dashboard-action]=\"titleEditable() ? 'edit-title' : null\"\r\n (click)=\"onStartEditTitle($event)\"\r\n >\r\n {{ title() }}\r\n </h3>\r\n }\r\n\r\n @if (showSubtitle()) {\r\n <p\r\n class=\"m-0 truncate leading-tight\"\r\n [style.font-size.px]=\"subtitleFontSize()\"\r\n [style.color]=\"subtitleColor()\"\r\n >\r\n {{ subtitleText() }}\r\n </p>\r\n }\r\n </div>\r\n\r\n @if (icon() && iconPlacement() === \"end\") {\r\n <ng-container *ngTemplateOutlet=\"topbarIcon\" />\r\n }\r\n </div>\r\n\r\n @if (breadcrumbs().length > 0) {\r\n <nav class=\"min-w-0 md:max-w-[60%]\">\r\n <ol class=\"flex flex-wrap items-center gap-2 text-sm\">\r\n @for (\r\n breadcrumb of breadcrumbs();\r\n track breadcrumb.label + $index;\r\n let last = $last\r\n ) {\r\n <li class=\"flex min-w-0 items-center gap-2\">\r\n @if (breadcrumb.link) {\r\n <a\r\n class=\"max-w-[12rem] truncate text-muted-color transition-colors hover:text-primary\"\r\n [href]=\"breadcrumb.link\"\r\n [target]=\"isExternalLink(breadcrumb.link) ? '_blank' : null\"\r\n [rel]=\"isExternalLink(breadcrumb.link) ? 'noreferrer' : null\"\r\n >\r\n {{ breadcrumb.label }}\r\n </a>\r\n } @else {\r\n <span class=\"max-w-[12rem] truncate text-muted-color\">\r\n {{ breadcrumb.label }}\r\n </span>\r\n }\r\n\r\n @if (!last) {\r\n <i class=\"mti mti-chevron-right text-xs text-muted-color\"></i>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n </nav>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
30857
31103
|
}
|
|
30858
31104
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TopbarCardComponent, decorators: [{
|
|
30859
31105
|
type: Component,
|
|
30860
|
-
args: [{ selector: 'mt-topbar-card', standalone: true, imports: [CommonModule, TranslocoDirective, Avatar], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"flex h-full flex-col gap-3 md:flex-row md:items-center md:justify-between\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n [style.background-color]=\"\r\n cardStyleConfig()['backgroundColor'] || styleConfig()['background-color']\r\n \"\r\n [style.border-radius.px]=\"cardStyleConfig()['borderRadius']\"\r\n [style.border-color]=\"borderColor()\"\r\n [style.border-style]=\"borderWidth() ? 'solid' : null\"\r\n [style.border-width.px]=\"borderWidth()\"\r\n [style.color]=\"styleConfig()['color'] || 'inherit'\"\r\n [style.padding.px]=\"padding()\"\r\n>\r\n <ng-template #topbarIcon>\r\n <mt-avatar\r\n [icon]=\"icon()\"\r\n size=\"normal\"\r\n shape=\"square\"\r\n [style.--p-avatar-background]=\"iconBackgroundColor()\"\r\n [style.--p-avatar-color]=\"iconColor()\"\r\n />\r\n </ng-template>\r\n\r\n <div\r\n class=\"flex min-w-0 flex-1 gap-3\"\r\n [class.flex-col]=\"iconPlacement() === 'top'\"\r\n [class.items-center]=\"iconPlacement() !== 'top'\"\r\n [class.items-start]=\"iconPlacement() === 'top'\"\r\n >\r\n @if (icon() && iconPlacement() !== \"end\") {\r\n <ng-container *ngTemplateOutlet=\"topbarIcon\" />\r\n }\r\n\r\n <div class=\"min-w-0\" [class.w-full]=\"iconPlacement() === 'top'\">\r\n @if (titleEditable() && editingTitle()) {\r\n <input\r\n class=\"m-0 w-full min-w-40 rounded border border-primary bg-surface-0 px-2 py-1 font-semibold leading-tight outline-none\"\r\n type=\"text\"\r\n [value]=\"titleDraft()\"\r\n [style.font-size.px]=\"titleFontSize()\"\r\n (input)=\"onTitleInput($any($event.target).value)\"\r\n (keydown.enter)=\"onCommitTitle()\"\r\n (keydown.escape)=\"onCancelTitle()\"\r\n (blur)=\"onCommitTitle()\"\r\n data-dashboard-action=\"edit-title\"\r\n [attr.aria-label]=\"t('guided.editTitle')\"\r\n />\r\n } @else if (title()) {\r\n <h3\r\n class=\"m-0 truncate font-semibold leading-tight\"\r\n [class.cursor-text]=\"titleEditable()\"\r\n [style.font-size.px]=\"titleFontSize()\"\r\n [attr.data-dashboard-action]=\"titleEditable() ? 'edit-title' : null\"\r\n (click)=\"onStartEditTitle($event)\"\r\n >\r\n {{ title() }}\r\n </h3>\r\n }\r\n\r\n @if (showSubtitle()) {\r\n <p\r\n class=\"m-0 truncate leading-tight\"\r\n [style.font-size.px]=\"subtitleFontSize()\"\r\n [style.color]=\"subtitleColor()\"\r\n >\r\n {{ subtitleText() }}\r\n </p>\r\n }\r\n </div>\r\n\r\n @if (icon() && iconPlacement() === \"end\") {\r\n <ng-container *ngTemplateOutlet=\"topbarIcon\" />\r\n }\r\n </div>\r\n\r\n @if (breadcrumbs().length > 0) {\r\n <nav class=\"min-w-0 md:max-w-[60%]\">\r\n <ol class=\"flex flex-wrap items-center gap-2 text-sm\">\r\n @for (\r\n breadcrumb of breadcrumbs();\r\n track breadcrumb.label + $index;\r\n let last = $last\r\n ) {\r\n <li class=\"flex min-w-0 items-center gap-2\">\r\n @if (breadcrumb.link) {\r\n <a\r\n class=\"max-w-[12rem] truncate text-muted-color transition-colors hover:text-primary\"\r\n [href]=\"breadcrumb.link\"\r\n [target]=\"isExternalLink(breadcrumb.link) ? '_blank' : null\"\r\n [rel]=\"isExternalLink(breadcrumb.link) ? 'noreferrer' : null\"\r\n >\r\n {{ breadcrumb.label }}\r\n </a>\r\n } @else {\r\n <span class=\"max-w-[12rem] truncate text-muted-color\">\r\n {{ breadcrumb.label }}\r\n </span>\r\n }\r\n\r\n @if (!last) {\r\n <i class=\"mti mti-chevron-right text-xs text-muted-color\"></i>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n </nav>\r\n }\r\n</div>\r\n" }]
|
|
31106
|
+
args: [{ selector: 'mt-topbar-card', standalone: true, imports: [CommonModule, TranslocoDirective, Avatar], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"flex h-full flex-col gap-3 md:flex-row md:items-center md:justify-between\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n [style.background-color]=\"\r\n cardStyleConfig()['backgroundColor'] || styleConfig()['background-color']\r\n \"\r\n [style.border-radius.px]=\"cardStyleConfig()['borderRadius']\"\r\n [style.border-color]=\"borderColor()\"\r\n [style.border-style]=\"borderWidth() ? 'solid' : null\"\r\n [style.border-width.px]=\"borderWidth()\"\r\n [style.color]=\"styleConfig()['color'] || 'inherit'\"\r\n [style.padding.px]=\"padding()\"\r\n>\r\n <ng-template #topbarIcon>\r\n <mt-avatar\r\n [icon]=\"icon()\"\r\n size=\"normal\"\r\n shape=\"square\"\r\n [style.--p-avatar-background]=\"iconBackgroundColor()\"\r\n [style.--p-avatar-color]=\"iconColor()\"\r\n />\r\n </ng-template>\r\n\r\n <div\r\n class=\"flex min-w-0 flex-1 gap-3\"\r\n [class.flex-col]=\"iconPlacement() === 'top'\"\r\n [class.items-center]=\"iconPlacement() !== 'top'\"\r\n [class.items-start]=\"iconPlacement() === 'top'\"\r\n [class.justify-center]=\"isHeaderCentered()\"\r\n >\r\n @if (icon() && iconPlacement() !== \"end\") {\r\n <ng-container *ngTemplateOutlet=\"topbarIcon\" />\r\n }\r\n\r\n <div class=\"min-w-0\" [class.w-full]=\"iconPlacement() === 'top'\">\r\n @if (titleEditable() && editingTitle()) {\r\n <input\r\n class=\"m-0 w-full min-w-40 rounded border border-primary bg-surface-0 px-2 py-1 font-semibold leading-tight outline-none\"\r\n type=\"text\"\r\n [value]=\"titleDraft()\"\r\n [style.font-size.px]=\"titleFontSize()\"\r\n (input)=\"onTitleInput($any($event.target).value)\"\r\n (keydown.enter)=\"onCommitTitle()\"\r\n (keydown.escape)=\"onCancelTitle()\"\r\n (blur)=\"onCommitTitle()\"\r\n data-dashboard-action=\"edit-title\"\r\n [attr.aria-label]=\"t('guided.editTitle')\"\r\n />\r\n } @else if (title()) {\r\n <h3\r\n class=\"m-0 truncate font-semibold leading-tight\"\r\n [class.cursor-text]=\"titleEditable()\"\r\n [style.font-size.px]=\"titleFontSize()\"\r\n [attr.data-dashboard-action]=\"titleEditable() ? 'edit-title' : null\"\r\n (click)=\"onStartEditTitle($event)\"\r\n >\r\n {{ title() }}\r\n </h3>\r\n }\r\n\r\n @if (showSubtitle()) {\r\n <p\r\n class=\"m-0 truncate leading-tight\"\r\n [style.font-size.px]=\"subtitleFontSize()\"\r\n [style.color]=\"subtitleColor()\"\r\n >\r\n {{ subtitleText() }}\r\n </p>\r\n }\r\n </div>\r\n\r\n @if (icon() && iconPlacement() === \"end\") {\r\n <ng-container *ngTemplateOutlet=\"topbarIcon\" />\r\n }\r\n </div>\r\n\r\n @if (breadcrumbs().length > 0) {\r\n <nav class=\"min-w-0 md:max-w-[60%]\">\r\n <ol class=\"flex flex-wrap items-center gap-2 text-sm\">\r\n @for (\r\n breadcrumb of breadcrumbs();\r\n track breadcrumb.label + $index;\r\n let last = $last\r\n ) {\r\n <li class=\"flex min-w-0 items-center gap-2\">\r\n @if (breadcrumb.link) {\r\n <a\r\n class=\"max-w-[12rem] truncate text-muted-color transition-colors hover:text-primary\"\r\n [href]=\"breadcrumb.link\"\r\n [target]=\"isExternalLink(breadcrumb.link) ? '_blank' : null\"\r\n [rel]=\"isExternalLink(breadcrumb.link) ? 'noreferrer' : null\"\r\n >\r\n {{ breadcrumb.label }}\r\n </a>\r\n } @else {\r\n <span class=\"max-w-[12rem] truncate text-muted-color\">\r\n {{ breadcrumb.label }}\r\n </span>\r\n }\r\n\r\n @if (!last) {\r\n <i class=\"mti mti-chevron-right text-xs text-muted-color\"></i>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n </nav>\r\n }\r\n</div>\r\n" }]
|
|
30861
31107
|
}], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }], defaultBreadcrumbLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultBreadcrumbLabel", required: false }] }], titleEditable: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleEditable", required: false }] }], titleChange: [{ type: i0.Output, args: ["titleChange"] }] } });
|
|
30862
31108
|
|
|
30863
31109
|
class LastHistoryLevelCardComponent {
|
|
@@ -34518,18 +34764,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
34518
34764
|
], 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" }]
|
|
34519
34765
|
}], ctorParameters: () => [], propDecorators: { selectionModules: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionModules", required: false }] }] } });
|
|
34520
34766
|
|
|
34521
|
-
/**
|
|
34522
|
-
* HTTP methods for custom API
|
|
34523
|
-
*/
|
|
34524
|
-
var HTTPMethod;
|
|
34525
|
-
(function (HTTPMethod) {
|
|
34526
|
-
HTTPMethod["GET"] = "GET";
|
|
34527
|
-
HTTPMethod["POST"] = "POST";
|
|
34528
|
-
HTTPMethod["PUT"] = "PUT";
|
|
34529
|
-
HTTPMethod["DELETE"] = "DELETE";
|
|
34530
|
-
HTTPMethod["PATCH"] = "PATCH";
|
|
34531
|
-
})(HTTPMethod || (HTTPMethod = {}));
|
|
34532
|
-
|
|
34533
34767
|
/**
|
|
34534
34768
|
* Custom API Configuration Component
|
|
34535
34769
|
*
|
|
@@ -39634,8 +39868,7 @@ class ChartFilterDrawer {
|
|
|
39634
39868
|
this.dirty = true;
|
|
39635
39869
|
}
|
|
39636
39870
|
onLoadLevelLogs(schemaLevelId) {
|
|
39637
|
-
|
|
39638
|
-
this.chartLevelLogs.set(Array.isArray(level?.logs) ? level.logs : []);
|
|
39871
|
+
this.chartLevelLogs.set(this.dashboardService.getLevelLogsByLevelId(schemaLevelId));
|
|
39639
39872
|
}
|
|
39640
39873
|
apply() {
|
|
39641
39874
|
if (!this.dirty) {
|
|
@@ -42757,8 +42990,13 @@ class DashboardBuilder {
|
|
|
42757
42990
|
lookups = input(null, ...(ngDevMode ? [{ debugName: "lookups" }] : /* istanbul ignore next */ []));
|
|
42758
42991
|
/** Host-owned canonical or legacy status metadata for runtime filters. */
|
|
42759
42992
|
statuses = input(null, ...(ngDevMode ? [{ debugName: "statuses" }] : /* istanbul ignore next */ []));
|
|
42993
|
+
/**
|
|
42994
|
+
* Host-owned levels schema (product settings `levels.schema`). Backs the
|
|
42995
|
+
* status filter's "Log" select and the phase-gate / schema-settings lists.
|
|
42996
|
+
*/
|
|
42997
|
+
levelsSchema = input(null, ...(ngDevMode ? [{ debugName: "levelsSchema" }] : /* istanbul ignore next */ []));
|
|
42760
42998
|
filterMetadataEffect = effect(() => {
|
|
42761
|
-
this.dashboardService.setFilterMetadata(this.lookups(), this.statuses());
|
|
42999
|
+
this.dashboardService.setFilterMetadata(this.lookups(), this.statuses(), this.levelsSchema());
|
|
42762
43000
|
}, ...(ngDevMode ? [{ debugName: "filterMetadataEffect" }] : /* istanbul ignore next */ []));
|
|
42763
43001
|
// ============================================
|
|
42764
43002
|
// Outputs
|
|
@@ -45246,7 +45484,7 @@ class DashboardBuilder {
|
|
|
45246
45484
|
return current;
|
|
45247
45485
|
}
|
|
45248
45486
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardBuilder, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
45249
|
-
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 });
|
|
45487
|
+
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 }, levelsSchema: { classPropertyName: "levelsSchema", publicName: "levelsSchema", 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 });
|
|
45250
45488
|
}
|
|
45251
45489
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardBuilder, decorators: [{
|
|
45252
45490
|
type: Component,
|
|
@@ -45263,7 +45501,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
45263
45501
|
CardContentComponent,
|
|
45264
45502
|
ItemCardMenuComponent,
|
|
45265
45503
|
], 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"] }]
|
|
45266
|
-
}], 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: [{
|
|
45504
|
+
}], 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 }] }], levelsSchema: [{ type: i0.Input, args: [{ isSignal: true, alias: "levelsSchema", 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: [{
|
|
45267
45505
|
type: HostListener,
|
|
45268
45506
|
args: ['window:keydown', ['$event']]
|
|
45269
45507
|
}] } });
|
|
@@ -45615,6 +45853,11 @@ class DashboardViewer {
|
|
|
45615
45853
|
lookups = input(null, ...(ngDevMode ? [{ debugName: "lookups" }] : /* istanbul ignore next */ []));
|
|
45616
45854
|
/** Host-owned canonical or legacy status metadata for runtime filters. */
|
|
45617
45855
|
statuses = input(null, ...(ngDevMode ? [{ debugName: "statuses" }] : /* istanbul ignore next */ []));
|
|
45856
|
+
/**
|
|
45857
|
+
* Host-owned levels schema (product settings `levels.schema`). Backs the
|
|
45858
|
+
* runtime phase-gate and schema-settings filter option lists.
|
|
45859
|
+
*/
|
|
45860
|
+
levelsSchema = input(null, ...(ngDevMode ? [{ debugName: "levelsSchema" }] : /* istanbul ignore next */ []));
|
|
45618
45861
|
/** Enable page-wide runtime filters. */
|
|
45619
45862
|
showFilters = input(true, ...(ngDevMode ? [{ debugName: "showFilters" }] : /* istanbul ignore next */ []));
|
|
45620
45863
|
/** Render the built-in, in-flow button that opens page runtime filters. */
|
|
@@ -45622,7 +45865,7 @@ class DashboardViewer {
|
|
|
45622
45865
|
/** Host-wide opt-out from URL/query filters for every chart. */
|
|
45623
45866
|
ignoreQueryFilter = input(false, ...(ngDevMode ? [{ debugName: "ignoreQueryFilter" }] : /* istanbul ignore next */ []));
|
|
45624
45867
|
filterMetadataEffect = effect(() => {
|
|
45625
|
-
this.dashboardService.setFilterMetadata(this.lookups(), this.statuses());
|
|
45868
|
+
this.dashboardService.setFilterMetadata(this.lookups(), this.statuses(), this.levelsSchema());
|
|
45626
45869
|
}, ...(ngDevMode ? [{ debugName: "filterMetadataEffect" }] : /* istanbul ignore next */ []));
|
|
45627
45870
|
// ============================================
|
|
45628
45871
|
// Outputs
|
|
@@ -46292,7 +46535,7 @@ class DashboardViewer {
|
|
|
46292
46535
|
});
|
|
46293
46536
|
}
|
|
46294
46537
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardViewer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
46295
|
-
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'\">\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 [queryParams]=\"pageQueryParams()\"\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 [queryParams]=\"pageQueryParams()\"\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 [queryParams]=\"pageQueryParams()\"\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 [queryParams]=\"pageQueryParams()\"\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 });
|
|
46538
|
+
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 }, levelsSchema: { classPropertyName: "levelsSchema", publicName: "levelsSchema", 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 [queryParams]=\"pageQueryParams()\"\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 [queryParams]=\"pageQueryParams()\"\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 [queryParams]=\"pageQueryParams()\"\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 [queryParams]=\"pageQueryParams()\"\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 });
|
|
46296
46539
|
}
|
|
46297
46540
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardViewer, decorators: [{
|
|
46298
46541
|
type: Component,
|
|
@@ -46304,7 +46547,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
46304
46547
|
DashboardItem,
|
|
46305
46548
|
Page,
|
|
46306
46549
|
], 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 [queryParams]=\"pageQueryParams()\"\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 [queryParams]=\"pageQueryParams()\"\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 [queryParams]=\"pageQueryParams()\"\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 [queryParams]=\"pageQueryParams()\"\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"] }]
|
|
46307
|
-
}], 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"] }] } });
|
|
46550
|
+
}], 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 }] }], levelsSchema: [{ type: i0.Input, args: [{ isSignal: true, alias: "levelsSchema", 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"] }] } });
|
|
46308
46551
|
|
|
46309
46552
|
/**
|
|
46310
46553
|
* Dashboard List Component
|
|
@@ -49554,5 +49797,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
49554
49797
|
* Generated bundle index. Do not edit.
|
|
49555
49798
|
*/
|
|
49556
49799
|
|
|
49557
|
-
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,
|
|
49558
|
-
//# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-
|
|
49800
|
+
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, toBackendChartType 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, GeneralSettings as aA, DataSourceSettings as aB, ActionsSettings as aC, ChartViewer as aD, StyleStudioDrawer as aE, StyleSettingsRenderer as aF, expandResetPatches as aG, StyleField as aH, SegmentedField as aI, ColorListField as aJ, ArrayBuilderField as aK, KeyValueMapField as aL, LegendOrderField as aM, ItemCardMenuComponent as aN, ChartFilterDrawer as aO, ItemContextToolbarComponent as aP, ItemConfigPopoverComponent as aQ, GuidedConfigDialogComponent as aR, FilterChipsBarComponent as aS, FilterBuilderComponent as aT, DatasourcePanelComponent as aU, SchemaControlRendererComponent as aV, FilterByGroupPipe as aW, GetChartActionsPipe as aX, CHART_CAPABILITIES as aY, getCapabilityById as aZ, resolveCapability 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, MODULE_CLASSIFICATION_LOG as ai, HTTPMethod as aj, DashboardBuilderService as ak, DashboardStoreService as al, isManagePagesDeleteResult as am, ManagePages as an, ManageBreadcrumb as ao, ManageFilterOnPage as ap, DynamicFiltersConfig as aq, ChartSettingsDrawer as ar, DisplaySettings as as, DefaultControlUi as at, PieControlUi as au, BarControlUi as av, StackBarControlUi as aw, ManageItem as ax, CHART_TYPES as ay, ManageItemService as az, DashboardBuilder as b, normalizeChartTypeForRequest as b0, normalizeFilterOperation as b1, normalizeAggregateFunction as b2, normalizeFilters as b3, selectorFromLegacy as b4, moduleIdFromSelector as b5, toBackendSourceLink as b6, toFormSourceLink as b7, normalizeOnLoad as b8, normalizeBeforeSave as b9, hasBlockingIssues as bA, groupIssuesByDomain as bB, parseAdvancedJson as bC, deepMerge$1 as bD, formatForEditor as bE, readByPath$1 as bF, setByPath as bG, applyControlPatchToPersisted as bH, applyControlPatchesToPersisted as bI, getControlSchema as bJ, listControlSchemaIds as bK, listControlSchemas as bL, getFallbackControlSchema as bM, flattenSchema as bN, resolveDisplayFields as bO, buildDisplayFieldPredicate as bP, bindingKey as bQ, getBinding as bR, listBindings as bS, listBindingsForChart as bT, readBoundValue as bU, ITEM_GUIDANCE_REGISTRY as bV, describeGuidance as bW, ItemGuidanceService as bX, normalizeBeforeRequest as ba, CONFIG_DOMAINS as bb, domainsForCapability as bc, findDomain as bd, POPOVER_TABS as be, POPOVER_TAB_SPECS as bf, titleToUi as bg, applyTitleToPersisted as bh, datasourceToUi as bi, fieldsToUi as bj, filtersToUi as bk, styleToUi as bl, applyStyleToPersisted as bm, layoutToUi as bn, applyLayoutToPersisted as bo, labelLegendFormatToUi as bp, applyLabelLegendFormatToPersisted as bq, behaviorToUi as br, applyBehaviorToPersisted as bs, applyFilterChipsToPersisted as bt, persistedToUi as bu, buildAssembly as bv, STYLE_PRESETS as bw, presetsForCapability as bx, findPreset as by, validate 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 };
|
|
49801
|
+
//# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-XQD_Js7m.mjs.map
|