@masterteam/dashboard-builder 0.0.114 → 0.0.116

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, signal, Injectable, computed, Pipe, input, ViewEncapsulation, ChangeDetectionStrategy, Component, effect, untracked, forwardRef, ViewChild, DestroyRef, output, InjectionToken, ElementRef, NgZone, PLATFORM_ID, viewChild, ChangeDetectorRef, model, HostListener, contentChild } from '@angular/core';
2
+ import { inject, signal, Injectable, computed, Pipe, input, ViewEncapsulation, ChangeDetectionStrategy, Component, effect, untracked, forwardRef, ViewChild, DestroyRef, output, InjectionToken, ElementRef, NgZone, PLATFORM_ID, viewChildren, viewChild, ChangeDetectorRef, model, HostListener, contentChild } from '@angular/core';
3
3
  import * as i1$1 from '@angular/common';
4
4
  import { CommonModule, DatePipe, isPlatformBrowser, DecimalPipe } from '@angular/common';
5
5
  import * as i1 from '@angular/forms';
@@ -12,6 +12,7 @@ import { Button } from '@masterteam/components/button';
12
12
  import { ModalService } from '@masterteam/components/modal';
13
13
  import { Page } from '@masterteam/components/page';
14
14
  import { ConfirmationService } from '@masterteam/components/confirmation';
15
+ import { ToastService } from '@masterteam/components/toast';
15
16
  import * as i3$1 from 'primeng/contextmenu';
16
17
  import { ContextMenuModule } from 'primeng/contextmenu';
17
18
  import { Subject, map, of, forkJoin, throwError, Observable, ReplaySubject, EMPTY, timer, debounceTime, takeUntil as takeUntil$1, Subscription, filter as filter$1, take, finalize as finalize$1, catchError as catchError$1 } from 'rxjs';
@@ -48,9 +49,9 @@ import { SelectModule } from 'primeng/select';
48
49
  import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';
49
50
  import { DynamicDrawerConfig, DrawerController } from '@masterteam/components/dynamic-drawer';
50
51
  import { Tooltip as Tooltip$1, TruncateTooltip } from '@masterteam/components/tooltip';
51
- import { ToastService } from '@masterteam/components/toast';
52
52
  import { DateField } from '@masterteam/components/date-field';
53
53
  import { UserSearchField } from '@masterteam/components/user-search-field';
54
+ import { mtEntityColumn, MtTemplateCell, MtStandardGridComponent } from '@masterteam/data-table';
54
55
  import { TableValueResolver, Table } from '@masterteam/components/table';
55
56
  import { SecureImagePipe } from '@masterteam/components/upload-field';
56
57
  import * as mtIcons from '@masterteam/icons/assets/select-icons.json';
@@ -312,6 +313,13 @@ class DashboardBuilderService {
312
313
  setActivatedRoute(route) {
313
314
  this.activatedRoute.set(route);
314
315
  }
316
+ /**
317
+ * Published by the open builder: whether it holds edits the top Save has
318
+ * not written yet, so an action that navigates in-app asks first (#1906).
319
+ */
320
+ unsavedBuilderChanges = signal(false, ...(ngDevMode ? [{ debugName: "unsavedBuilderChanges" }] : /* istanbul ignore next */ []));
321
+ /** The report the open builder is editing (a dashboard is not its own target). */
322
+ currentPageId = signal(null, ...(ngDevMode ? [{ debugName: "currentPageId" }] : /* istanbul ignore next */ []));
315
323
  /** Chart for selected dialog */
316
324
  chartForSelectedDialog = signal(undefined, ...(ngDevMode ? [{ debugName: "chartForSelectedDialog" }] : /* istanbul ignore next */ []));
317
325
  /** Dialog configs available to runtime action handling, keyed by dashboardId. */
@@ -586,14 +594,15 @@ class DashboardBuilderService {
586
594
  * If a host backend ever exposes a real bulk route, swap the inner call
587
595
  * for a single POST and keep the same outer signature.
588
596
  */
589
- linkChartsBulk(requests, options = {}) {
597
+ linkChartsBulk(requests) {
590
598
  if (!requests?.length) {
591
599
  return of({ data: [] });
592
600
  }
593
- const calls = requests.map((req, index) => {
594
- const suppressMessage = options.silent || index < requests.length - 1;
601
+ // Every link is silent: the builder reports the save itself, since the
602
+ // backend answers each upsert with "Created successfully." (#1906).
603
+ const calls = requests.map((req) => {
595
604
  return this.http
596
- .post(`${this.urlPrefix}reports/charts/link`, req, this.messageRequestOptions({ silent: suppressMessage }))
605
+ .post(`${this.urlPrefix}reports/charts/link`, req, this.messageRequestOptions({ silent: true }))
597
606
  .pipe(
598
607
  // Per-chart safety: never let a single failure abort the rest.
599
608
  catchError(() => of({ data: null })));
@@ -3888,6 +3897,33 @@ function normalizeLineChartQuery(query) {
3888
3897
  function isLineChartType(chartType) {
3889
3898
  return chartType === 'LineChart' || chartType === 'LineV2Chart';
3890
3899
  }
3900
+ /**
3901
+ * A series chart's points carry each series' own `extraProperties`; the
3902
+ * root list, where the Actions drawer kept the properties an action filter
3903
+ * reads, never reached them, so the filter was dropped (#1904). Send the root
3904
+ * keys with every series.
3905
+ */
3906
+ function withRootExtraPropertiesOnSeries(query) {
3907
+ const q = query;
3908
+ const root = Array.isArray(q?.['extraProperties'])
3909
+ ? q['extraProperties']
3910
+ : [];
3911
+ const keys = root.filter((key) => typeof key === 'string');
3912
+ if (!keys.length || !Array.isArray(q?.['series']))
3913
+ return query;
3914
+ let changed = false;
3915
+ const series = q['series'].map((s) => {
3916
+ const own = Array.isArray(s?.extraProperties)
3917
+ ? s.extraProperties
3918
+ : [];
3919
+ const missing = keys.filter((key) => !own.includes(key));
3920
+ if (!missing.length)
3921
+ return s;
3922
+ changed = true;
3923
+ return { ...s, extraProperties: [...own, ...missing] };
3924
+ });
3925
+ return changed ? { ...q, series } : query;
3926
+ }
3891
3927
  function normalizeTimelineMultiLevelQuery(query) {
3892
3928
  if (!query || typeof query !== 'object') {
3893
3929
  return query;
@@ -4381,7 +4417,7 @@ function normalizeBeforeRequest(serviceConfig) {
4381
4417
  // whole chart request; it only applies once it is filled in. The same
4382
4418
  // goes for a series that has no value yet, and a table aggregation row
4383
4419
  // with no property.
4384
- next['query'] = withoutIncompleteAggregations(withoutIncompleteSeries(withoutIncompleteSeriesFilters(normalizeDashboardQueryFormulas(normalizeTimelineMultiLevelQuery(normalizeAggregateFunctionsDeep(next['query']))))));
4420
+ next['query'] = withoutIncompleteAggregations(withRootExtraPropertiesOnSeries(withoutIncompleteSeries(withoutIncompleteSeriesFilters(normalizeDashboardQueryFormulas(normalizeTimelineMultiLevelQuery(normalizeAggregateFunctionsDeep(next['query'])))))));
4385
4421
  if (isLineChartType(next['chartType'])) {
4386
4422
  next['query'] = normalizeLineChartQuery(next['query']);
4387
4423
  }
@@ -4882,7 +4918,12 @@ class FilterValueField {
4882
4918
  return this.selectedOptions().has(option.value);
4883
4919
  }
4884
4920
  toggleOption(option) {
4885
- const selected = new Set(this.selectedOptions());
4921
+ // A property or pivot token is the clicked item's one value: picking one
4922
+ // replaces the value instead of joining it into `{{key,extraValues…}}`
4923
+ // (#1904). Date tokens still combine.
4924
+ const selected = option.isDate
4925
+ ? new Set(this.selectedOptions())
4926
+ : new Set();
4886
4927
  if (this.isOptionSelected(option)) {
4887
4928
  selected.delete(option.value);
4888
4929
  }
@@ -15366,6 +15407,51 @@ function applyBuiltInConditions(serviceConfig, clientConfig) {
15366
15407
  };
15367
15408
  }
15368
15409
 
15410
+ /** The `extraValues.<key>` properties a widget's action filters read. */
15411
+ function actionTokenPropertyKeys(clientConfig) {
15412
+ const actions = Array.isArray(clientConfig?.['actions'])
15413
+ ? clientConfig['actions']
15414
+ : [];
15415
+ const keys = new Set();
15416
+ for (const action of actions) {
15417
+ const values = [
15418
+ ...(action?.config?.filters ?? []).map((f) => f?.propertyValue),
15419
+ ...(action?.config?.dynamicKeys ?? []).map((k) => k?.propertyValue),
15420
+ ];
15421
+ for (const value of values) {
15422
+ for (const [, key] of String(value ?? '').matchAll(/extraValues\.([\w-]+)/gi)) {
15423
+ keys.add(key);
15424
+ }
15425
+ }
15426
+ }
15427
+ return [...keys];
15428
+ }
15429
+ /**
15430
+ * Ask a series chart for the properties its actions read from the clicked
15431
+ * point. A bar's `extraValues` hold only what its series request, so a filter
15432
+ * such as `{{extraValues.basic_project_name.rawValue}}` on a dashboard saved
15433
+ * without that property was dropped (#1904). The keys go to the root list,
15434
+ * which `normalizeBeforeRequest` copies onto every series.
15435
+ */
15436
+ function withActionTokenProperties(serviceConfig, clientConfig) {
15437
+ const config = serviceConfig;
15438
+ const query = config?.['query'];
15439
+ if (!Array.isArray(query?.['series']) || !query['series'].length) {
15440
+ return serviceConfig;
15441
+ }
15442
+ const keys = actionTokenPropertyKeys(clientConfig);
15443
+ const root = Array.isArray(query['extraProperties'])
15444
+ ? query['extraProperties']
15445
+ : [];
15446
+ const missing = keys.filter((key) => !root.includes(key));
15447
+ if (!missing.length)
15448
+ return serviceConfig;
15449
+ return {
15450
+ ...config,
15451
+ query: { ...query, extraProperties: [...root, ...missing] },
15452
+ };
15453
+ }
15454
+
15369
15455
  function getLegendOverrideOrder(config) {
15370
15456
  const legend = config?.clientConfig?.configAsType?.['legend'];
15371
15457
  const order = legend?.['overrideLegendOrder'];
@@ -24133,7 +24219,7 @@ class ChartDataService {
24133
24219
  const substituted = isAlreadySubstituted
24134
24220
  ? stripRuntimeFlags(svcConfig)
24135
24221
  : handleFiltersForCustom(svcConfig, filters, getDynamicFilterRequestConfig(clientConfig));
24136
- const body = normalizeBeforeRequest(applyBuiltInConditions(substituted, clientConfig?.['clientConfigs']?.[index]));
24222
+ const body = normalizeBeforeRequest(applyBuiltInConditions(withActionTokenProperties(substituted, clientConfig?.['clientConfigs']?.[index]), clientConfig?.['clientConfigs']?.[index]));
24137
24223
  return this.http
24138
24224
  .post(url, body, this.withCacheScope(config, { headers }))
24139
24225
  .pipe(map$1((value) => value?.data));
@@ -24152,7 +24238,7 @@ class ChartDataService {
24152
24238
  : handleFiltersForCustom(serviceConfig, filters, getDynamicFilterRequestConfig(clientConfig));
24153
24239
  // Final BE-safety normalization: chart type aliases (LineV2Chart→LineChart,
24154
24240
  // splitChart→SplitChart), source-link DTO keys, selector backfill.
24155
- const payload = normalizeBeforeRequest(applyBuiltInConditions(substituted, clientConfig));
24241
+ const payload = normalizeBeforeRequest(applyBuiltInConditions(withActionTokenProperties(substituted, clientConfig), clientConfig));
24156
24242
  return this.http
24157
24243
  .post(url, payload, this.withCacheScope(config, { headers }))
24158
24244
  .pipe(map$1((res) => res?.data || res));
@@ -24437,6 +24523,9 @@ class ActionService {
24437
24523
  modalService = inject(ModalService);
24438
24524
  dashboardService = inject(DashboardBuilderService);
24439
24525
  toast = inject(ToastService);
24526
+ confirmation = inject(ConfirmationService);
24527
+ transloco = inject(TranslocoService);
24528
+ storeService = inject(DashboardStoreService);
24440
24529
  /**
24441
24530
  * Handle actions for a component based on event type
24442
24531
  */
@@ -24539,7 +24628,7 @@ class ActionService {
24539
24628
  if (queryParams['extraValues']) {
24540
24629
  Object.keys(queryParams['extraValues']).forEach((key) => {
24541
24630
  const val = queryParams['extraValues'][key];
24542
- queryParams[key] = val?.value?.key ?? val?.value ?? val;
24631
+ queryParams[key] = this.localizeValue(val?.value?.key ?? val?.value ?? val);
24543
24632
  });
24544
24633
  delete queryParams['extraValues'];
24545
24634
  }
@@ -24766,13 +24855,17 @@ class ActionService {
24766
24855
  }
24767
24856
  return null;
24768
24857
  }
24858
+ /**
24859
+ * The clicked record's id. A chart's `key` is the clicked category (a
24860
+ * project name), so an Id carried in the extra values or the row comes
24861
+ * first, and `key` only counts when it is itself a number (#1903).
24862
+ */
24769
24863
  findEntityId(data) {
24770
24864
  if (!data)
24771
24865
  return null;
24772
24866
  const direct = this.unwrapActionValue(data?.Id) ??
24773
24867
  this.unwrapActionValue(data?.id) ??
24774
- this.unwrapActionValue(data?.ID) ??
24775
- this.unwrapActionValue(data?.key);
24868
+ this.unwrapActionValue(data?.ID);
24776
24869
  if (this.hasResolvedValue(direct))
24777
24870
  return direct;
24778
24871
  const extraValues = data?.extraValues ?? data?.extraValue ?? data?._original?.extraValues;
@@ -24782,14 +24875,29 @@ class ActionService {
24782
24875
  const originalId = this.findIdInCollection(data?._original);
24783
24876
  if (this.hasResolvedValue(originalId))
24784
24877
  return originalId;
24878
+ const key = this.unwrapActionValue(data?.key);
24879
+ if (this.isNumericId(key))
24880
+ return key;
24785
24881
  return this.findIdInCollection(data);
24786
24882
  }
24883
+ isNumericId(value) {
24884
+ return ((typeof value === 'number' && Number.isFinite(value)) ||
24885
+ (typeof value === 'string' && /^\d+$/.test(value.trim())));
24886
+ }
24787
24887
  findIdInCollection(collection) {
24788
24888
  if (!collection || typeof collection !== 'object')
24789
24889
  return null;
24790
24890
  const entries = Array.isArray(collection)
24791
24891
  ? collection.map((value, index) => [String(index), value])
24792
24892
  : Object.entries(collection);
24893
+ // The record's own Id wins over any other *_id field it carries.
24894
+ for (const [key, value] of entries) {
24895
+ if (this.isOwnIdField(key, value)) {
24896
+ const unwrapped = this.unwrapActionValue(value);
24897
+ if (this.hasResolvedValue(unwrapped))
24898
+ return unwrapped;
24899
+ }
24900
+ }
24793
24901
  for (const [key, value] of entries) {
24794
24902
  if (this.isIdField(key, value)) {
24795
24903
  const unwrapped = this.unwrapActionValue(value);
@@ -24823,6 +24931,11 @@ class ActionService {
24823
24931
  identity.includes('moduledataid') ||
24824
24932
  identity.includes('entityid'));
24825
24933
  }
24934
+ isOwnIdField(key, value) {
24935
+ return [key, value?.normalizedKey]
24936
+ .map((item) => this.normalizeIdentity(item))
24937
+ .some((identity) => identity === 'id');
24938
+ }
24826
24939
  normalizeIdentity(item) {
24827
24940
  return String(item ?? '')
24828
24941
  .trim()
@@ -24957,6 +25070,10 @@ class ActionService {
24957
25070
  ? parentFilter
24958
25071
  : {}),
24959
25072
  ...actionData.valueKeys,
25073
+ // A map pin or table row carries its cells on `_original`; the dialog's
25074
+ // own conditions read them as `{{extraValues.<key>…}}` (#1846).
25075
+ extraValues: actionData.valueKeys['extraValues'] ??
25076
+ this.withRecordValues(data, config)?.extraValues,
24960
25077
  };
24961
25078
  // Resolve the linked dialog's own config. Do NOT fall back to `config`
24962
25079
  // (the clicking chart) when it can't be resolved — that silently rendered
@@ -24971,7 +25088,7 @@ class ActionService {
24971
25088
  // "Dialog header"), not from the chart that opened it.
24972
25089
  const header = resolveDashboardDialogHeader(dialogConfig);
24973
25090
  // Dynamically import DashboardDialogComponent to avoid circular dependency
24974
- import('./masterteam-dashboard-builder-dashboard-dialog.component-DFpW1J-m.mjs').then(({ DashboardDialogComponent }) => {
25091
+ import('./masterteam-dashboard-builder-dashboard-dialog.component-BDNd7eud.mjs').then(({ DashboardDialogComponent }) => {
24975
25092
  // Open dialog using ModalService
24976
25093
  this.modalService.openModal(DashboardDialogComponent, 'dialog', {
24977
25094
  header: header.title,
@@ -25022,7 +25139,7 @@ class ActionService {
25022
25139
  // Tokens resolve against `tokenData`, which lets a table row answer
25023
25140
  // `{{extraValues.<key>…}}` from its own cells. The payload's `extraValues`
25024
25141
  // above stays as sent, so row cells never flatten into URL query params.
25025
- const tokenData = this.withTableRowValues(data, config);
25142
+ const tokenData = this.withRecordValues(data, config);
25026
25143
  // Process dynamic keys from config
25027
25144
  actionConfig?.dynamicKeys?.forEach((key) => {
25028
25145
  const value = this.getNestedData(key.propertyValue, tokenData);
@@ -25051,16 +25168,17 @@ class ActionService {
25051
25168
  };
25052
25169
  }
25053
25170
  /**
25054
- * A table row (`mt-table-card`) has no `extraValues` — the backend returns
25055
- * only the table's own properties, as cells on `row._original`. Expose those
25056
- * cells as `extraValues` so one `{{extraValues.<key>.rawValue}}` token works
25057
- * for tables and charts alike.
25171
+ * A table row (`mt-table-card`) or a map pin has no `extraValues`: its cells
25172
+ * are the record on `_original`. Expose those cells as `extraValues` so one
25173
+ * `{{extraValues.<key>.rawValue}}` token works for tables, maps and charts.
25058
25174
  */
25059
- withTableRowValues(data, config) {
25060
- if (!isTableRowComponent(config.clientConfig?.componentName))
25061
- return data;
25175
+ withRecordValues(data, config) {
25062
25176
  if (this.getNestedData('extraValues', data))
25063
25177
  return data;
25178
+ if (!isTableRowComponent(config.clientConfig?.componentName) &&
25179
+ !data?.['_mapPin']) {
25180
+ return data;
25181
+ }
25064
25182
  const row = data?._original;
25065
25183
  if (!row || typeof row !== 'object')
25066
25184
  return data;
@@ -25087,7 +25205,9 @@ class ActionService {
25087
25205
  const value = this.getNestedData(path, data);
25088
25206
  return value?.value ?? value;
25089
25207
  });
25090
- const usable = resolved.filter((value) => value !== undefined && value !== null);
25208
+ const usable = resolved
25209
+ .filter((value) => value !== undefined && value !== null)
25210
+ .map((value) => this.localizeValue(value));
25091
25211
  if (usable.length === 0)
25092
25212
  return undefined;
25093
25213
  return usable.length === 1 ? usable[0] : usable.join(',');
@@ -25097,6 +25217,30 @@ class ActionService {
25097
25217
  ? this.dynamicTextReplace(rawValue, data)
25098
25218
  : rawValue;
25099
25219
  }
25220
+ /**
25221
+ * A translatable value arrives as `{ en, ar }`, or as that object's JSON
25222
+ * text in `rawValue`; a URL parameter or a filter wants the text in the
25223
+ * current language (#1904).
25224
+ */
25225
+ localizeValue(value) {
25226
+ let candidate = value;
25227
+ if (typeof value === 'string' && value.trim().startsWith('{')) {
25228
+ try {
25229
+ candidate = JSON.parse(value);
25230
+ }
25231
+ catch {
25232
+ return value;
25233
+ }
25234
+ }
25235
+ if (candidate &&
25236
+ typeof candidate === 'object' &&
25237
+ !Array.isArray(candidate) &&
25238
+ ('en' in candidate || 'ar' in candidate)) {
25239
+ const lang = this.storeService.languageCode();
25240
+ return candidate[lang] || candidate['en'] || candidate['ar'] || '';
25241
+ }
25242
+ return value;
25243
+ }
25100
25244
  /**
25101
25245
  * Get nested data from object by path
25102
25246
  */
@@ -25176,9 +25320,22 @@ class ActionService {
25176
25320
  return;
25177
25321
  }
25178
25322
  if (requiresApplicationNavigation) {
25323
+ // Leaving the application: the builder's beforeunload prompt asks.
25179
25324
  window.open(this.router.serializeUrl(urlTree), '_self');
25180
25325
  return;
25181
25326
  }
25327
+ // In-app navigation reloads the builder with another dashboard, so
25328
+ // unsaved edits would go without a word (#1906).
25329
+ if (this.dashboardService.unsavedBuilderChanges()) {
25330
+ this.confirmation.confirm({
25331
+ type: 'dialog',
25332
+ header: this.transloco.translate('dashboardBuilder.unsavedChangesTitle'),
25333
+ message: this.transloco.translate('dashboardBuilder.unsavedChangesLeave'),
25334
+ acceptLabel: this.transloco.translate('dashboardBuilder.leaveWithoutSaving'),
25335
+ accept: () => this.router.navigateByUrl(urlTree),
25336
+ });
25337
+ return;
25338
+ }
25182
25339
  this.router.navigateByUrl(urlTree);
25183
25340
  }
25184
25341
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ActionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
@@ -25556,128 +25713,128 @@ class CardFilterComponent {
25556
25713
  }
25557
25714
  }
25558
25715
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
25559
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CardFilterComponent, isStandalone: true, selector: "mt-card-filter", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterChange: "filterChange" }, ngImport: i0, template: `
25560
- <div class="card-filter" *transloco="let t; prefix: 'dashboard'">
25561
- @switch (filterType()) {
25562
- @case ('select') {
25563
- <select
25564
- class="filter-select"
25565
- [(ngModel)]="selectedValue"
25566
- (ngModelChange)="onFilterChange($event)"
25567
- >
25568
- @if (placeholder()) {
25569
- <option [value]="null" disabled>{{ placeholder() }}</option>
25570
- }
25571
- @for (option of options(); track option.key) {
25572
- <option [value]="option.value">
25573
- {{
25574
- option.label[langCode()] || option.label['en'] || option.key
25575
- }}
25576
- </option>
25577
- }
25578
- </select>
25579
- }
25580
- @case ('multiSelect') {
25581
- <div class="multi-select-container">
25582
- <!-- Simplified multi-select -->
25583
- <select
25584
- class="filter-select"
25585
- multiple
25586
- [(ngModel)]="selectedValues"
25587
- (ngModelChange)="onMultiFilterChange($event)"
25588
- >
25589
- @for (option of options(); track option.key) {
25590
- <option [value]="option.value">
25591
- {{
25592
- option.label[langCode()] || option.label['en'] || option.key
25593
- }}
25594
- </option>
25595
- }
25596
- </select>
25597
- </div>
25598
- }
25599
- @case ('dateRange') {
25600
- <div class="date-range-container">
25601
- <input
25602
- type="date"
25603
- class="filter-date"
25604
- [(ngModel)]="startDate"
25605
- (ngModelChange)="onDateChange()"
25606
- />
25607
- <span class="date-separator">-</span>
25608
- <input
25609
- type="date"
25610
- class="filter-date"
25611
- [(ngModel)]="endDate"
25612
- (ngModelChange)="onDateChange()"
25613
- />
25614
- </div>
25615
- }
25616
- }
25617
- </div>
25716
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CardFilterComponent, isStandalone: true, selector: "mt-card-filter", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterChange: "filterChange" }, ngImport: i0, template: `
25717
+ <div class="card-filter" *transloco="let t; prefix: 'dashboard'">
25718
+ @switch (filterType()) {
25719
+ @case ('select') {
25720
+ <select
25721
+ class="filter-select"
25722
+ [(ngModel)]="selectedValue"
25723
+ (ngModelChange)="onFilterChange($event)"
25724
+ >
25725
+ @if (placeholder()) {
25726
+ <option [value]="null" disabled>{{ placeholder() }}</option>
25727
+ }
25728
+ @for (option of options(); track option.key) {
25729
+ <option [value]="option.value">
25730
+ {{
25731
+ option.label[langCode()] || option.label['en'] || option.key
25732
+ }}
25733
+ </option>
25734
+ }
25735
+ </select>
25736
+ }
25737
+ @case ('multiSelect') {
25738
+ <div class="multi-select-container">
25739
+ <!-- Simplified multi-select -->
25740
+ <select
25741
+ class="filter-select"
25742
+ multiple
25743
+ [(ngModel)]="selectedValues"
25744
+ (ngModelChange)="onMultiFilterChange($event)"
25745
+ >
25746
+ @for (option of options(); track option.key) {
25747
+ <option [value]="option.value">
25748
+ {{
25749
+ option.label[langCode()] || option.label['en'] || option.key
25750
+ }}
25751
+ </option>
25752
+ }
25753
+ </select>
25754
+ </div>
25755
+ }
25756
+ @case ('dateRange') {
25757
+ <div class="date-range-container">
25758
+ <input
25759
+ type="date"
25760
+ class="filter-date"
25761
+ [(ngModel)]="startDate"
25762
+ (ngModelChange)="onDateChange()"
25763
+ />
25764
+ <span class="date-separator">-</span>
25765
+ <input
25766
+ type="date"
25767
+ class="filter-date"
25768
+ [(ngModel)]="endDate"
25769
+ (ngModelChange)="onDateChange()"
25770
+ />
25771
+ </div>
25772
+ }
25773
+ }
25774
+ </div>
25618
25775
  `, isInline: true, styles: [".card-filter{display:flex;align-items:center;gap:.5rem}.filter-select{padding:.375rem .75rem;border:1px solid #e0e0e0;border-radius:.375rem;font-size:.875rem;background:#fff;color:#333;min-width:120px;cursor:pointer;transition:border-color .15s ease}.filter-select:focus{outline:none;border-color:#4caf50}.filter-select:hover{border-color:#bbb}.multi-select-container{position:relative}.date-range-container{display:flex;align-items:center;gap:.25rem}.filter-date{padding:.375rem .5rem;border:1px solid #e0e0e0;border-radius:.375rem;font-size:.875rem;background:#fff;color:#333}.filter-date:focus{outline:none;border-color:#4caf50}.date-separator{color:#999;font-size:.875rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
25619
25776
  }
25620
25777
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardFilterComponent, decorators: [{
25621
25778
  type: Component,
25622
- args: [{ selector: 'mt-card-filter', standalone: true, imports: [CommonModule, FormsModule, TranslocoDirective], template: `
25623
- <div class="card-filter" *transloco="let t; prefix: 'dashboard'">
25624
- @switch (filterType()) {
25625
- @case ('select') {
25626
- <select
25627
- class="filter-select"
25628
- [(ngModel)]="selectedValue"
25629
- (ngModelChange)="onFilterChange($event)"
25630
- >
25631
- @if (placeholder()) {
25632
- <option [value]="null" disabled>{{ placeholder() }}</option>
25633
- }
25634
- @for (option of options(); track option.key) {
25635
- <option [value]="option.value">
25636
- {{
25637
- option.label[langCode()] || option.label['en'] || option.key
25638
- }}
25639
- </option>
25640
- }
25641
- </select>
25642
- }
25643
- @case ('multiSelect') {
25644
- <div class="multi-select-container">
25645
- <!-- Simplified multi-select -->
25646
- <select
25647
- class="filter-select"
25648
- multiple
25649
- [(ngModel)]="selectedValues"
25650
- (ngModelChange)="onMultiFilterChange($event)"
25651
- >
25652
- @for (option of options(); track option.key) {
25653
- <option [value]="option.value">
25654
- {{
25655
- option.label[langCode()] || option.label['en'] || option.key
25656
- }}
25657
- </option>
25658
- }
25659
- </select>
25660
- </div>
25661
- }
25662
- @case ('dateRange') {
25663
- <div class="date-range-container">
25664
- <input
25665
- type="date"
25666
- class="filter-date"
25667
- [(ngModel)]="startDate"
25668
- (ngModelChange)="onDateChange()"
25669
- />
25670
- <span class="date-separator">-</span>
25671
- <input
25672
- type="date"
25673
- class="filter-date"
25674
- [(ngModel)]="endDate"
25675
- (ngModelChange)="onDateChange()"
25676
- />
25677
- </div>
25678
- }
25679
- }
25680
- </div>
25779
+ args: [{ selector: 'mt-card-filter', standalone: true, imports: [CommonModule, FormsModule, TranslocoDirective], template: `
25780
+ <div class="card-filter" *transloco="let t; prefix: 'dashboard'">
25781
+ @switch (filterType()) {
25782
+ @case ('select') {
25783
+ <select
25784
+ class="filter-select"
25785
+ [(ngModel)]="selectedValue"
25786
+ (ngModelChange)="onFilterChange($event)"
25787
+ >
25788
+ @if (placeholder()) {
25789
+ <option [value]="null" disabled>{{ placeholder() }}</option>
25790
+ }
25791
+ @for (option of options(); track option.key) {
25792
+ <option [value]="option.value">
25793
+ {{
25794
+ option.label[langCode()] || option.label['en'] || option.key
25795
+ }}
25796
+ </option>
25797
+ }
25798
+ </select>
25799
+ }
25800
+ @case ('multiSelect') {
25801
+ <div class="multi-select-container">
25802
+ <!-- Simplified multi-select -->
25803
+ <select
25804
+ class="filter-select"
25805
+ multiple
25806
+ [(ngModel)]="selectedValues"
25807
+ (ngModelChange)="onMultiFilterChange($event)"
25808
+ >
25809
+ @for (option of options(); track option.key) {
25810
+ <option [value]="option.value">
25811
+ {{
25812
+ option.label[langCode()] || option.label['en'] || option.key
25813
+ }}
25814
+ </option>
25815
+ }
25816
+ </select>
25817
+ </div>
25818
+ }
25819
+ @case ('dateRange') {
25820
+ <div class="date-range-container">
25821
+ <input
25822
+ type="date"
25823
+ class="filter-date"
25824
+ [(ngModel)]="startDate"
25825
+ (ngModelChange)="onDateChange()"
25826
+ />
25827
+ <span class="date-separator">-</span>
25828
+ <input
25829
+ type="date"
25830
+ class="filter-date"
25831
+ [(ngModel)]="endDate"
25832
+ (ngModelChange)="onDateChange()"
25833
+ />
25834
+ </div>
25835
+ }
25836
+ }
25837
+ </div>
25681
25838
  `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".card-filter{display:flex;align-items:center;gap:.5rem}.filter-select{padding:.375rem .75rem;border:1px solid #e0e0e0;border-radius:.375rem;font-size:.875rem;background:#fff;color:#333;min-width:120px;cursor:pointer;transition:border-color .15s ease}.filter-select:focus{outline:none;border-color:#4caf50}.filter-select:hover{border-color:#bbb}.multi-select-container{position:relative}.date-range-container{display:flex;align-items:center;gap:.25rem}.filter-date{padding:.375rem .5rem;border:1px solid #e0e0e0;border-radius:.375rem;font-size:.875rem;background:#fff;color:#333}.filter-date:focus{outline:none;border-color:#4caf50}.date-separator{color:#999;font-size:.875rem}\n"] }]
25682
25839
  }], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: false }] }], filterChange: [{ type: i0.Output, args: ["filterChange"] }] } });
25683
25840
 
@@ -27588,30 +27745,30 @@ class CardInfoComponent {
27588
27745
  return typeof info.value === 'string' ? info.value : '';
27589
27746
  }, ...(ngDevMode ? [{ debugName: "tooltipContent" }] : /* istanbul ignore next */ []));
27590
27747
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
27591
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CardInfoComponent, isStandalone: true, selector: "mt-card-info", inputs: { cardInfo: { classPropertyName: "cardInfo", publicName: "cardInfo", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
27592
- @if (showInfo()) {
27593
- <span
27594
- class="card-info-icon"
27595
- [mtTooltip]="tooltipContent()"
27596
- tooltipPosition="bottom"
27597
- >
27598
- <i class="pi pi-info-circle"></i>
27599
- </span>
27600
- }
27748
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CardInfoComponent, isStandalone: true, selector: "mt-card-info", inputs: { cardInfo: { classPropertyName: "cardInfo", publicName: "cardInfo", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
27749
+ @if (showInfo()) {
27750
+ <span
27751
+ class="card-info-icon"
27752
+ [mtTooltip]="tooltipContent()"
27753
+ tooltipPosition="bottom"
27754
+ >
27755
+ <i class="pi pi-info-circle"></i>
27756
+ </span>
27757
+ }
27601
27758
  `, isInline: true, styles: [".card-info-icon{display:inline-flex;align-items:center;justify-content:center;cursor:help;color:#666;font-size:1rem;transition:color .15s ease}.card-info-icon:hover{color:#333}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: Tooltip$1, selector: "[mtTooltip]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
27602
27759
  }
27603
27760
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardInfoComponent, decorators: [{
27604
27761
  type: Component,
27605
- args: [{ selector: 'mt-card-info', standalone: true, imports: [CommonModule, Tooltip$1], template: `
27606
- @if (showInfo()) {
27607
- <span
27608
- class="card-info-icon"
27609
- [mtTooltip]="tooltipContent()"
27610
- tooltipPosition="bottom"
27611
- >
27612
- <i class="pi pi-info-circle"></i>
27613
- </span>
27614
- }
27762
+ args: [{ selector: 'mt-card-info', standalone: true, imports: [CommonModule, Tooltip$1], template: `
27763
+ @if (showInfo()) {
27764
+ <span
27765
+ class="card-info-icon"
27766
+ [mtTooltip]="tooltipContent()"
27767
+ tooltipPosition="bottom"
27768
+ >
27769
+ <i class="pi pi-info-circle"></i>
27770
+ </span>
27771
+ }
27615
27772
  `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".card-info-icon{display:inline-flex;align-items:center;justify-content:center;cursor:help;color:#666;font-size:1rem;transition:color .15s ease}.card-info-icon:hover{color:#333}\n"] }]
27616
27773
  }], propDecorators: { cardInfo: [{ type: i0.Input, args: [{ isSignal: true, alias: "cardInfo", required: false }] }] } });
27617
27774
 
@@ -27682,6 +27839,8 @@ class EChartComponent {
27682
27839
  headerHidden = input(false, ...(ngDevMode ? [{ debugName: "headerHidden" }] : /* istanbul ignore next */ []));
27683
27840
  /** Chart click event */
27684
27841
  chartClick = output();
27842
+ /** Chart double-click event (the Actions drawer's Double Click trigger). */
27843
+ chartDblClick = output();
27685
27844
  /** Chart ready flag */
27686
27845
  isReady = signal(false, ...(ngDevMode ? [{ debugName: "isReady" }] : /* istanbul ignore next */ []));
27687
27846
  /** Legend items for custom legend */
@@ -28033,6 +28192,14 @@ class EChartComponent {
28033
28192
  });
28034
28193
  });
28035
28194
  });
28195
+ this.chart.on('dblclick', (params) => {
28196
+ this.ngZone.run(() => {
28197
+ this.chartDblClick.emit({
28198
+ data: params.data,
28199
+ event: params,
28200
+ });
28201
+ });
28202
+ });
28036
28203
  this.chart.on('legendselectchanged', this.handleLegendSelectionChanged);
28037
28204
  // Initial render
28038
28205
  const options = this.chartOptions();
@@ -29092,7 +29259,7 @@ class EChartComponent {
29092
29259
  return Array.isArray(firstSeries?.data) ? firstSeries.data.length : 0;
29093
29260
  }
29094
29261
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
29095
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EChartComponent, isStandalone: true, selector: "mt-echart", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: false, transformFunction: null }, chartConfig: { classPropertyName: "chartConfig", publicName: "chartConfig", isSignal: true, isRequired: false, transformFunction: null }, configurationItem: { classPropertyName: "configurationItem", publicName: "configurationItem", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null }, headerHidden: { classPropertyName: "headerHidden", publicName: "headerHidden", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { chartClick: "chartClick" }, usesOnChanges: true, ngImport: i0, template: `
29262
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EChartComponent, isStandalone: true, selector: "mt-echart", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: false, transformFunction: null }, chartConfig: { classPropertyName: "chartConfig", publicName: "chartConfig", isSignal: true, isRequired: false, transformFunction: null }, configurationItem: { classPropertyName: "configurationItem", publicName: "configurationItem", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null }, headerHidden: { classPropertyName: "headerHidden", publicName: "headerHidden", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { chartClick: "chartClick", chartDblClick: "chartDblClick" }, usesOnChanges: true, ngImport: i0, template: `
29096
29263
  <div
29097
29264
  [class]="containerClass()"
29098
29265
  [class.in-group-with-header]="inGroup() && !headerHidden()"
@@ -29191,7 +29358,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
29191
29358
  </div>
29192
29359
  }
29193
29360
  `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;width:100%;height:100%;min-height:0;position:relative}.chart-wrapper{width:100%;height:96%;display:flex;justify-content:center;align-items:center;position:relative;min-height:0}.chart-wrapper.in-group-with-header{height:86%}.scroll-wrapper{width:100%;height:96%;overflow-x:auto;overflow-y:hidden;position:relative;min-height:0}.scroll-wrapper.in-group-with-header{height:86%}.chart{width:100%;height:100%;min-height:0}.chart-scroll{width:100%;height:100%;min-height:0;overflow-y:hidden}.custom-legend{position:absolute;bottom:10px;left:0;right:0;z-index:1000;background:transparent;padding:4px 8px;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:4px;width:100%;max-width:100%}.custom-legend.has-scroll{bottom:25px}.custom-legend.custom-legend--top{top:10px;bottom:auto}.custom-legend.custom-legend--left{top:0;bottom:0;right:auto;width:auto;max-width:45%;flex-direction:column;justify-content:center;align-items:flex-start}.custom-legend.custom-legend--right{top:0;bottom:0;left:auto;width:auto;max-width:45%;flex-direction:column;justify-content:center;align-items:flex-start}.legend-item{display:flex;align-items:center;gap:3px;padding:2px 4px;border-radius:3px;cursor:pointer;transition:all .2s ease;-webkit-user-select:none;user-select:none;font-size:11px;white-space:nowrap;background:transparent;line-height:1.2;flex-direction:row}.legend-item:hover{background-color:#0000000d}.legend-item.disabled{opacity:.5}.legend-item.disabled .legend-text{text-decoration:line-through}.legend-icon{width:10px;height:10px;border-radius:50%;flex-shrink:0}.legend-text{font-family:inherit}\n"] }]
29194
- }], ctorParameters: () => [], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: false }] }], chartConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "chartConfig", required: false }] }], configurationItem: [{ type: i0.Input, args: [{ isSignal: true, alias: "configurationItem", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], inGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "inGroup", required: false }] }], headerHidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerHidden", required: false }] }], chartClick: [{ type: i0.Output, args: ["chartClick"] }] } });
29361
+ }], ctorParameters: () => [], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: false }] }], chartConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "chartConfig", required: false }] }], configurationItem: [{ type: i0.Input, args: [{ isSignal: true, alias: "configurationItem", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], inGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "inGroup", required: false }] }], headerHidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerHidden", required: false }] }], chartClick: [{ type: i0.Output, args: ["chartClick"] }], chartDblClick: [{ type: i0.Output, args: ["chartDblClick"] }] } });
29195
29362
 
29196
29363
  /**
29197
29364
  * Builds the ECharts `geo` + scatter option for the Map Chart widget.
@@ -29342,12 +29509,11 @@ function buildMapChartOption(groups, region, legend, font = {}) {
29342
29509
  return {
29343
29510
  tooltip: {
29344
29511
  trigger: 'item',
29345
- // A pin's Tooltip Properties follow its name (#1842). A pin is one
29346
- // record, so "+N more" practically never shows here.
29347
- formatter: (params) => (params?.seriesName
29512
+ // A pin's Tooltip Properties are added by mt-echart, as for every
29513
+ // chart; adding them here as well listed each field twice (#1842).
29514
+ formatter: (params) => params?.seriesName
29348
29515
  ? `${params.name}<br/>${params.seriesName}`
29349
- : (params?.name ?? '')) +
29350
- pointTooltipHtml(params?.data?.pointTooltip, (n) => `+${n} more`),
29516
+ : (params?.name ?? ''),
29351
29517
  },
29352
29518
  geo: {
29353
29519
  map: region.echartsName,
@@ -29473,6 +29639,8 @@ class MapViewComponent {
29473
29639
  inGroup = input(false, ...(ngDevMode ? [{ debugName: "inGroup" }] : /* istanbul ignore next */ []));
29474
29640
  /** Emitted when a marker is clicked, for the widget's row actions. */
29475
29641
  pointClick = output();
29642
+ /** Emitted when a marker is double-clicked. */
29643
+ pointDblClick = output();
29476
29644
  /** The ECharts map name currently in the global registry, once loaded. */
29477
29645
  registeredName = signal(null, ...(ngDevMode ? [{ debugName: "registeredName" }] : /* istanbul ignore next */ []));
29478
29646
  attribution = MAP_DATA_ATTRIBUTION;
@@ -29531,25 +29699,72 @@ class MapViewComponent {
29531
29699
  * the marker rides along on `extraValues`.
29532
29700
  */
29533
29701
  onChartClick(event) {
29534
- const data = event?.data;
29702
+ const point = this.toPoint(event?.data);
29703
+ if (point)
29704
+ this.pointClick.emit(point);
29705
+ }
29706
+ onChartDblClick(event) {
29707
+ const point = this.toPoint(event?.data);
29708
+ if (point)
29709
+ this.pointDblClick.emit(point);
29710
+ }
29711
+ toPoint(data) {
29535
29712
  if (!data)
29536
- return;
29713
+ return null;
29537
29714
  const value = Array.isArray(data.value) ? data.value : [];
29538
- this.pointClick.emit({
29715
+ return {
29539
29716
  displayName: data.name ?? '',
29540
29717
  lon: Number(value[0]),
29541
29718
  lat: Number(value[1]),
29542
29719
  color: '',
29543
29720
  extraValues: data.extraValues,
29544
- });
29721
+ };
29545
29722
  }
29546
29723
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MapViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
29547
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: MapViewComponent, isStandalone: true, selector: "mt-map-view", inputs: { groups: { classPropertyName: "groups", publicName: "groups", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, showLegend: { classPropertyName: "showLegend", publicName: "showLegend", isSignal: true, isRequired: false, transformFunction: null }, legendPosition: { classPropertyName: "legendPosition", publicName: "legendPosition", isSignal: true, isRequired: false, transformFunction: null }, legendIcon: { classPropertyName: "legendIcon", publicName: "legendIcon", isSignal: true, isRequired: false, transformFunction: null }, dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: false, transformFunction: null }, configurationItem: { classPropertyName: "configurationItem", publicName: "configurationItem", isSignal: true, isRequired: false, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pointClick: "pointClick" }, host: { classAttribute: "mt-map-view" }, ngImport: i0, template: "<div\r\n class=\"mt-map-view__surface\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n @if (option(); as chartOption) {\r\n <mt-echart\r\n [dashboardId]=\"dashboardId()\"\r\n [chartConfig]=\"chartOption\"\r\n [configurationItem]=\"configurationItem()\"\r\n [inGroup]=\"inGroup()\"\r\n (chartClick)=\"onChartClick($event)\"\r\n />\r\n <!--\r\n ODbL requires the boundary data to be credited wherever it is shown.\r\n Everything is drawn from the bundled GeoJSON, so nothing is requested at\r\n runtime and no record data leaves the browser.\r\n -->\r\n <div class=\"mt-map-view__attribution\">{{ attribution }}</div>\r\n } @else if (!hasPoints()) {\r\n <div class=\"mt-map-view__empty\">\r\n <span>{{ t(\"map.noLocations\") }}</span>\r\n </div>\r\n } @else {\r\n <div class=\"mt-map-view__loading\" role=\"status\">\r\n <div class=\"mt-map-view__spinner\" aria-hidden=\"true\"></div>\r\n <span class=\"mt-map-view__sr\">{{ t(\"map.loadingBoundaries\") }}</span>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{display:block;width:100%;height:100%;min-height:0}.mt-map-view__surface{position:relative;width:100%;height:100%;min-height:0}.mt-map-view__attribution{position:absolute;inset-block-end:0;inset-inline-end:0;padding:0 .25rem;color:var(--p-text-muted-color, #64748b);font-size:.625rem;line-height:1rem;pointer-events:none}.mt-map-view__empty,.mt-map-view__loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}.mt-map-view__empty span{padding:.25rem .625rem;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.375rem;background:var(--p-surface-0, #ffffff);color:var(--p-text-muted-color, #64748b);font-size:.75rem}.mt-map-view__spinner{width:1.5rem;height:1.5rem;border:2px solid var(--p-surface-200, #e5e7eb);border-top-color:var(--p-primary-500, #2563eb);border-radius:999px;animation:mt-map-view-spin .8s linear infinite}@keyframes mt-map-view-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.mt-map-view__spinner{animation:none}}.mt-map-view__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}\n"], dependencies: [{ kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: EChartComponent, selector: "mt-echart", inputs: ["dashboardId", "chartConfig", "configurationItem", "height", "inGroup", "headerHidden"], outputs: ["chartClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
29724
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: MapViewComponent, isStandalone: true, selector: "mt-map-view", inputs: { groups: { classPropertyName: "groups", publicName: "groups", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, showLegend: { classPropertyName: "showLegend", publicName: "showLegend", isSignal: true, isRequired: false, transformFunction: null }, legendPosition: { classPropertyName: "legendPosition", publicName: "legendPosition", isSignal: true, isRequired: false, transformFunction: null }, legendIcon: { classPropertyName: "legendIcon", publicName: "legendIcon", isSignal: true, isRequired: false, transformFunction: null }, dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: false, transformFunction: null }, configurationItem: { classPropertyName: "configurationItem", publicName: "configurationItem", isSignal: true, isRequired: false, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pointClick: "pointClick", pointDblClick: "pointDblClick" }, host: { classAttribute: "mt-map-view" }, ngImport: i0, template: "<div\r\n class=\"mt-map-view__surface\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n @if (option(); as chartOption) {\r\n <mt-echart\r\n [dashboardId]=\"dashboardId()\"\r\n [chartConfig]=\"chartOption\"\r\n [configurationItem]=\"configurationItem()\"\r\n [inGroup]=\"inGroup()\"\r\n (chartClick)=\"onChartClick($event)\"\r\n (chartDblClick)=\"onChartDblClick($event)\"\r\n />\r\n <!--\r\n ODbL requires the boundary data to be credited wherever it is shown.\r\n Everything is drawn from the bundled GeoJSON, so nothing is requested at\r\n runtime and no record data leaves the browser.\r\n -->\r\n <div class=\"mt-map-view__attribution\">{{ attribution }}</div>\r\n } @else if (!hasPoints()) {\r\n <div class=\"mt-map-view__empty\">\r\n <span>{{ t(\"map.noLocations\") }}</span>\r\n </div>\r\n } @else {\r\n <div class=\"mt-map-view__loading\" role=\"status\">\r\n <div class=\"mt-map-view__spinner\" aria-hidden=\"true\"></div>\r\n <span class=\"mt-map-view__sr\">{{ t(\"map.loadingBoundaries\") }}</span>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{display:block;width:100%;height:100%;min-height:0}.mt-map-view__surface{position:relative;width:100%;height:100%;min-height:0}.mt-map-view__attribution{position:absolute;inset-block-end:0;inset-inline-end:0;padding:0 .25rem;color:var(--p-text-muted-color, #64748b);font-size:.625rem;line-height:1rem;pointer-events:none}.mt-map-view__empty,.mt-map-view__loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}.mt-map-view__empty span{padding:.25rem .625rem;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.375rem;background:var(--p-surface-0, #ffffff);color:var(--p-text-muted-color, #64748b);font-size:.75rem}.mt-map-view__spinner{width:1.5rem;height:1.5rem;border:2px solid var(--p-surface-200, #e5e7eb);border-top-color:var(--p-primary-500, #2563eb);border-radius:999px;animation:mt-map-view-spin .8s linear infinite}@keyframes mt-map-view-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.mt-map-view__spinner{animation:none}}.mt-map-view__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}\n"], dependencies: [{ kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: EChartComponent, selector: "mt-echart", inputs: ["dashboardId", "chartConfig", "configurationItem", "height", "inGroup", "headerHidden"], outputs: ["chartClick", "chartDblClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
29548
29725
  }
29549
29726
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MapViewComponent, decorators: [{
29550
29727
  type: Component,
29551
- args: [{ selector: 'mt-map-view', standalone: true, imports: [TranslocoDirective, EChartComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'mt-map-view' }, template: "<div\r\n class=\"mt-map-view__surface\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n @if (option(); as chartOption) {\r\n <mt-echart\r\n [dashboardId]=\"dashboardId()\"\r\n [chartConfig]=\"chartOption\"\r\n [configurationItem]=\"configurationItem()\"\r\n [inGroup]=\"inGroup()\"\r\n (chartClick)=\"onChartClick($event)\"\r\n />\r\n <!--\r\n ODbL requires the boundary data to be credited wherever it is shown.\r\n Everything is drawn from the bundled GeoJSON, so nothing is requested at\r\n runtime and no record data leaves the browser.\r\n -->\r\n <div class=\"mt-map-view__attribution\">{{ attribution }}</div>\r\n } @else if (!hasPoints()) {\r\n <div class=\"mt-map-view__empty\">\r\n <span>{{ t(\"map.noLocations\") }}</span>\r\n </div>\r\n } @else {\r\n <div class=\"mt-map-view__loading\" role=\"status\">\r\n <div class=\"mt-map-view__spinner\" aria-hidden=\"true\"></div>\r\n <span class=\"mt-map-view__sr\">{{ t(\"map.loadingBoundaries\") }}</span>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{display:block;width:100%;height:100%;min-height:0}.mt-map-view__surface{position:relative;width:100%;height:100%;min-height:0}.mt-map-view__attribution{position:absolute;inset-block-end:0;inset-inline-end:0;padding:0 .25rem;color:var(--p-text-muted-color, #64748b);font-size:.625rem;line-height:1rem;pointer-events:none}.mt-map-view__empty,.mt-map-view__loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}.mt-map-view__empty span{padding:.25rem .625rem;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.375rem;background:var(--p-surface-0, #ffffff);color:var(--p-text-muted-color, #64748b);font-size:.75rem}.mt-map-view__spinner{width:1.5rem;height:1.5rem;border:2px solid var(--p-surface-200, #e5e7eb);border-top-color:var(--p-primary-500, #2563eb);border-radius:999px;animation:mt-map-view-spin .8s linear infinite}@keyframes mt-map-view-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.mt-map-view__spinner{animation:none}}.mt-map-view__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}\n"] }]
29552
- }], ctorParameters: () => [], propDecorators: { groups: [{ type: i0.Input, args: [{ isSignal: true, alias: "groups", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], showLegend: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLegend", required: false }] }], legendPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendPosition", required: false }] }], legendIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendIcon", required: false }] }], dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: false }] }], configurationItem: [{ type: i0.Input, args: [{ isSignal: true, alias: "configurationItem", required: false }] }], inGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "inGroup", required: false }] }], pointClick: [{ type: i0.Output, args: ["pointClick"] }] } });
29728
+ args: [{ selector: 'mt-map-view', standalone: true, imports: [TranslocoDirective, EChartComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'mt-map-view' }, template: "<div\r\n class=\"mt-map-view__surface\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n @if (option(); as chartOption) {\r\n <mt-echart\r\n [dashboardId]=\"dashboardId()\"\r\n [chartConfig]=\"chartOption\"\r\n [configurationItem]=\"configurationItem()\"\r\n [inGroup]=\"inGroup()\"\r\n (chartClick)=\"onChartClick($event)\"\r\n (chartDblClick)=\"onChartDblClick($event)\"\r\n />\r\n <!--\r\n ODbL requires the boundary data to be credited wherever it is shown.\r\n Everything is drawn from the bundled GeoJSON, so nothing is requested at\r\n runtime and no record data leaves the browser.\r\n -->\r\n <div class=\"mt-map-view__attribution\">{{ attribution }}</div>\r\n } @else if (!hasPoints()) {\r\n <div class=\"mt-map-view__empty\">\r\n <span>{{ t(\"map.noLocations\") }}</span>\r\n </div>\r\n } @else {\r\n <div class=\"mt-map-view__loading\" role=\"status\">\r\n <div class=\"mt-map-view__spinner\" aria-hidden=\"true\"></div>\r\n <span class=\"mt-map-view__sr\">{{ t(\"map.loadingBoundaries\") }}</span>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{display:block;width:100%;height:100%;min-height:0}.mt-map-view__surface{position:relative;width:100%;height:100%;min-height:0}.mt-map-view__attribution{position:absolute;inset-block-end:0;inset-inline-end:0;padding:0 .25rem;color:var(--p-text-muted-color, #64748b);font-size:.625rem;line-height:1rem;pointer-events:none}.mt-map-view__empty,.mt-map-view__loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}.mt-map-view__empty span{padding:.25rem .625rem;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.375rem;background:var(--p-surface-0, #ffffff);color:var(--p-text-muted-color, #64748b);font-size:.75rem}.mt-map-view__spinner{width:1.5rem;height:1.5rem;border:2px solid var(--p-surface-200, #e5e7eb);border-top-color:var(--p-primary-500, #2563eb);border-radius:999px;animation:mt-map-view-spin .8s linear infinite}@keyframes mt-map-view-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.mt-map-view__spinner{animation:none}}.mt-map-view__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}\n"] }]
29729
+ }], ctorParameters: () => [], propDecorators: { groups: [{ type: i0.Input, args: [{ isSignal: true, alias: "groups", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], showLegend: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLegend", required: false }] }], legendPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendPosition", required: false }] }], legendIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendIcon", required: false }] }], dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: false }] }], configurationItem: [{ type: i0.Input, args: [{ isSignal: true, alias: "configurationItem", required: false }] }], inGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "inGroup", required: false }] }], pointClick: [{ type: i0.Output, args: ["pointClick"] }], pointDblClick: [{ type: i0.Output, args: ["pointDblClick"] }] } });
29730
+
29731
+ /** How long a click waits for a second one when Double Click is configured. */
29732
+ const DOUBLE_CLICK_WINDOW_MS = 250;
29733
+ /** Whether the widget has a Double Click action. */
29734
+ function hasDoubleClickAction(config) {
29735
+ return !!config?.clientConfig?.actions?.some((action) => action.type === 'dblclick');
29736
+ }
29737
+ /**
29738
+ * Runs Click and Double Click actions so a double click runs only Double
29739
+ * Click (#1905). The browser fires click, click, dblclick for one double
29740
+ * click: when the widget also has a Double Click action, a click waits
29741
+ * {@link DOUBLE_CLICK_WINDOW_MS} and a following click or dblclick cancels it.
29742
+ * Without a Double Click action a click runs at once, as before.
29743
+ */
29744
+ class ClickDispatcher {
29745
+ pending = null;
29746
+ click(waitForDoubleClick, run) {
29747
+ this.cancel();
29748
+ if (!waitForDoubleClick) {
29749
+ run();
29750
+ return;
29751
+ }
29752
+ this.pending = setTimeout(() => {
29753
+ this.pending = null;
29754
+ run();
29755
+ }, DOUBLE_CLICK_WINDOW_MS);
29756
+ }
29757
+ doubleClick(run) {
29758
+ this.cancel();
29759
+ run();
29760
+ }
29761
+ cancel() {
29762
+ if (this.pending !== null) {
29763
+ clearTimeout(this.pending);
29764
+ this.pending = null;
29765
+ }
29766
+ }
29767
+ }
29553
29768
 
29554
29769
  /**
29555
29770
  * Chart Card Component
@@ -29735,7 +29950,29 @@ class ChartCardComponent {
29735
29950
  onMapPointClick(point) {
29736
29951
  if (!this.hasActions())
29737
29952
  return;
29738
- this.onAction.emit({ type: 'click', data: point.extraValues ?? point });
29953
+ this.clicks.click(hasDoubleClickAction(this.configurationItem()), () => this.onAction.emit({ type: 'click', data: this.mapPinData(point) }));
29954
+ }
29955
+ onMapPointDblClick(point) {
29956
+ if (!this.hasActions())
29957
+ return;
29958
+ this.clicks.doubleClick(() => this.onAction.emit({ type: 'dblclick', data: this.mapPinData(point) }));
29959
+ }
29960
+ /**
29961
+ * A pin's record, plus the shape actions read from every other chart: the
29962
+ * pin's name as `key`, and the record's cells on `_original` so
29963
+ * `{{extraValues.<key>…}}` and the entity Id resolve from them (#1846).
29964
+ */
29965
+ mapPinData(point) {
29966
+ const record = point.extraValues;
29967
+ if (!record || typeof record !== 'object')
29968
+ return { ...point };
29969
+ return {
29970
+ ...record,
29971
+ key: point.displayName,
29972
+ title: point.displayName,
29973
+ _original: record,
29974
+ _mapPin: true,
29975
+ };
29739
29976
  }
29740
29977
  performanceGauge = computed(() => {
29741
29978
  const data = (this.dataHandled() ?? {});
@@ -30039,12 +30276,21 @@ class ChartCardComponent {
30039
30276
  }
30040
30277
  ngOnDestroy() {
30041
30278
  this.subscription.unsubscribe();
30279
+ this.clicks.cancel();
30042
30280
  }
30281
+ /** Delays a click only while a Double Click action is configured (#1905). */
30282
+ clicks = new ClickDispatcher();
30043
30283
  onChartClick(event) {
30044
30284
  const config = this.configurationItem();
30045
30285
  if (!config?.clientConfig?.actions)
30046
30286
  return;
30047
- this.onAction.emit({ type: 'click', data: event?.data });
30287
+ this.clicks.click(hasDoubleClickAction(config), () => this.onAction.emit({ type: 'click', data: event?.data }));
30288
+ }
30289
+ onChartDblClick(event) {
30290
+ const config = this.configurationItem();
30291
+ if (!config?.clientConfig?.actions)
30292
+ return;
30293
+ this.clicks.doubleClick(() => this.onAction.emit({ type: 'dblclick', data: event?.data }));
30048
30294
  }
30049
30295
  hasActions() {
30050
30296
  return !!this.configurationItem()?.clientConfig?.actions?.length;
@@ -30589,7 +30835,7 @@ class ChartCardComponent {
30589
30835
  '');
30590
30836
  }
30591
30837
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
30592
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ChartCardComponent, isStandalone: true, selector: "mt-chart-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null }, reportId: { classPropertyName: "reportId", publicName: "reportId", isSignal: true, isRequired: false, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null }, isConfigMode: { classPropertyName: "isConfigMode", publicName: "isConfigMode", isSignal: true, isRequired: false, transformFunction: null }, titleEditable: { classPropertyName: "titleEditable", publicName: "titleEditable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction", onConfigure: "onConfigure", onTitleChange: "onTitleChange" }, ngImport: i0, template: "<ng-template #timelineLegendList>\r\n <div\r\n class=\"dashboard-timeline-legend\"\r\n [attr.data-position]=\"timelineLegendPosition()\"\r\n >\r\n @for (label of timelineLabels(); track $index) {\r\n <span\r\n class=\"dashboard-timeline-legend-item\"\r\n [title]=\"label.label || label.name || label.key\"\r\n >\r\n <span\r\n class=\"dashboard-timeline-legend-marker\"\r\n [class.shape-rect]=\"label.shape === 'rect'\"\r\n [class.shape-roundRect]=\"label.shape === 'roundRect'\"\r\n [class.shape-diamond]=\"label.shape === 'diamond'\"\r\n [class.shape-triangle]=\"label.shape === 'triangle'\"\r\n [style.background]=\"\r\n label.shape === 'triangle' ? null : label.color || '#64748b'\r\n \"\r\n [style.border-bottom-color]=\"\r\n label.shape === 'triangle' ? label.color || '#64748b' : null\r\n \"\r\n ></span>\r\n <span class=\"dashboard-timeline-legend-label\">\r\n {{ label.label || label.name || label.key }}\r\n </span>\r\n </span>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<mt-card-content\r\n [inGroup]=\"inGroup()\"\r\n [headerConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\r\n \"\r\n [styleConfig]=\"\r\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\r\n \"\r\n [cardStyleConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\r\n \"\r\n [density]=\"configurationItem()?.clientConfig?.configAsType?.['density']\"\r\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\r\n [title]=\"title()\"\r\n [titleEditable]=\"titleEditable()\"\r\n (titleChange)=\"onTitleChange.emit($event)\"\r\n [isNoTopEnd]=\"!showTopEnd()\"\r\n [isChart]=\"true\"\r\n (headerClick)=\"onHeaderClick()\"\r\n>\r\n <ng-container topEnd>\r\n @if (showStaticFilters()) {\r\n <mt-static-filters\r\n [config]=\"staticFilterConfig()\"\r\n [dashboardId]=\"dashboardId()\"\r\n >\r\n </mt-static-filters>\r\n }\r\n @if (showDynamicFilters()) {\r\n <mt-dynamic-filters\r\n [fields]=\"dynamicFilterFields()\"\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [showLabels]=\"false\"\r\n >\r\n </mt-dynamic-filters>\r\n }\r\n @if (showFilter()) {\r\n <mt-card-filter [config]=\"filterConfig()\" [dashboardId]=\"dashboardId()\">\r\n </mt-card-filter>\r\n }\r\n @if (cardInfoConfig()?.show && cardInfoConfig()?.value) {\r\n <mt-card-info [cardInfo]=\"cardInfoConfig()\"></mt-card-info>\r\n }\r\n </ng-container>\r\n\r\n <ng-container body>\r\n <div\r\n class=\"chart-container\"\r\n [class.config-mode]=\"isConfigMode()\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n >\r\n @if (componentViewMode() === \"splitter\" && hasSplitterData()) {\r\n <div\r\n class=\"splitter-view\"\r\n [class.splitter-vertical]=\"splitterOrientation() === 'vertical'\"\r\n [style.gap.px]=\"splitterGap()\"\r\n >\r\n <div class=\"splitter-side splitter-positive\">\r\n <div class=\"splitter-count\">\r\n {{ dataHandled()?.positive?.groupedValue ?? 0 }}\r\n </div>\r\n <ul class=\"splitter-labels\">\r\n @for (\r\n label of dataHandled()?.positive?.labels || [];\r\n track $index\r\n ) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n </div>\r\n <div class=\"splitter-divider\"></div>\r\n <div class=\"splitter-side splitter-negative\">\r\n <div class=\"splitter-count\">\r\n {{ dataHandled()?.negative?.groupedValue ?? 0 }}\r\n </div>\r\n <ul class=\"splitter-labels\">\r\n @for (\r\n label of dataHandled()?.negative?.labels || [];\r\n track $index\r\n ) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n </div>\r\n </div>\r\n } @else if (componentViewMode() === \"timeline\" && hasTimelineData()) {\r\n <div\r\n class=\"dashboard-timeline-view\"\r\n [attr.data-legend-position]=\"timelineLegendPosition()\"\r\n [style.--timeline-header-bg]=\"timelineHeaderBgColor()\"\r\n [style.--timeline-header-color]=\"timelineHeaderTextColor()\"\r\n >\r\n @if (\r\n timelineLegendShow() &&\r\n timelineLabels().length &&\r\n (timelineLegendPosition() === \"top\" ||\r\n timelineLegendPosition() === \"left\")\r\n ) {\r\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\r\n }\r\n\r\n @defer (on viewport) {\r\n <mt-timeline\r\n class=\"dashboard-timeline-renderer\"\r\n [showHeader]=\"false\"\r\n [showZoomToFitControl]=\"false\"\r\n [scrollToToday]=\"true\"\r\n [timelineMode]=\"timelineMode()\"\r\n (timelineModeChange)=\"timelineMode.set($event)\"\r\n [ganttData]=\"timelineResources()\"\r\n [ganttMapping]=\"timelineGanttMapping\"\r\n [columns]=\"timelineColumns()\"\r\n [defaultVisibleColumns]=\"2\"\r\n [columnsPaneMinWidthPx]=\"220\"\r\n [columnsPaneMaxWidthPx]=\"520\"\r\n [enableVirtualScroll]=\"true\"\r\n [virtualScrollThreshold]=\"0\"\r\n [virtualScrollBodyHeightPx]=\"520\"\r\n [showGanttDetailsPopup]=\"true\"\r\n [emptyMessage]=\"t('noChartData')\"\r\n >\r\n <ng-template\r\n mtTimelineColumn=\"title\"\r\n let-item=\"item\"\r\n let-resolved=\"resolved\"\r\n let-canToggle=\"canToggle\"\r\n let-isCollapsed=\"isCollapsed\"\r\n let-toggle=\"toggle\"\r\n >\r\n <div\r\n class=\"dashboard-timeline-title-cell\"\r\n [style.padding-inline-start.px]=\"\r\n $any(resolved).levelDepth * 16\r\n \"\r\n >\r\n @if (canToggle) {\r\n <mt-icon\r\n class=\"dashboard-timeline-title-toggle\"\r\n [icon]=\"timelineCollapseIcon(isCollapsed)\"\r\n (click)=\"$event.stopPropagation(); toggle()\"\r\n ></mt-icon>\r\n } @else {\r\n <span class=\"dashboard-timeline-title-spacer\"></span>\r\n }\r\n\r\n <button\r\n type=\"button\"\r\n class=\"dashboard-timeline-title-action\"\r\n [title]=\"$any(resolved).title\"\r\n (click)=\"onTimelineTitleClick(item, $event)\"\r\n >\r\n {{ $any(resolved).title }}\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n @for (column of timelineEntityColumns(); track column.key) {\r\n <ng-template [mtTimelineColumn]=\"column.key\" let-value=\"value\">\r\n <mt-entity-preview\r\n class=\"dashboard-timeline-column-entity\"\r\n [data]=\"timelineColumnEntityData(value)\"\r\n attachmentShape=\"compact\"\r\n ></mt-entity-preview>\r\n </ng-template>\r\n }\r\n\r\n <ng-template mtTimelinePopover let-item=\"item\">\r\n @if (timelinePopoverEntities(item); as entities) {\r\n @if (entities.length) {\r\n <div\r\n class=\"w-[27rem] max-w-[90vw] max-h-[24rem] overflow-auto p-2\"\r\n >\r\n <mt-entities-preview\r\n [entities]=\"entities\"\r\n [stackOnNarrow]=\"false\"\r\n />\r\n </div>\r\n }\r\n }\r\n </ng-template>\r\n </mt-timeline>\r\n } @placeholder {\r\n <div class=\"dashboard-timeline-placeholder\" aria-hidden=\"true\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n }\r\n\r\n @if (\r\n timelineLegendShow() &&\r\n timelineLabels().length &&\r\n (timelineLegendPosition() === \"bottom\" ||\r\n timelineLegendPosition() === \"right\")\r\n ) {\r\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\r\n }\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"phaseGateStepper\" && phaseGateRecordCount() > 1\r\n ) {\r\n <div class=\"no-data-container\">\r\n <i class=\"pi pi-info-circle\"></i>\r\n <span>{{\r\n t(\"phaseGateStepperMultipleRecords\", {\r\n count: phaseGateRecordCount(),\r\n })\r\n }}</span>\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"phaseGateStepper\" && hasPhaseGateData()\r\n ) {\r\n <div\r\n class=\"phase-gate-view\"\r\n [class.phase-gate-compact]=\"phaseGateCompact()\"\r\n >\r\n <ol class=\"phase-steps\">\r\n @for (step of phaseGateSteps(); track $index) {\r\n <li\r\n class=\"phase-step\"\r\n [class.is-current]=\"step.isCurrent\"\r\n [class.is-done]=\"step.isCompleted\"\r\n >\r\n <span class=\"phase-step-number\">{{ $index + 1 }}</span>\r\n @if (phaseGateShowLabels()) {\r\n <span class=\"phase-step-name\">{{\r\n step.name || t(\"phase\")\r\n }}</span>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"performanceGauge\" &&\r\n dataHandled() &&\r\n !dataHandled()?.noData\r\n ) {\r\n @let gauge = performanceGauge();\r\n <div\r\n class=\"dashboard-performance-gauge\"\r\n [class.is-clickable]=\"hasActions()\"\r\n [style.--dashboard-performance-status-color]=\"gauge.status.color\"\r\n (click)=\"onPerformanceGaugeClick($event)\"\r\n >\r\n <div\r\n class=\"dashboard-performance-gauge__figure\"\r\n [style.width.%]=\"gauge.scalePercent\"\r\n >\r\n <svg\r\n class=\"dashboard-performance-gauge__svg\"\r\n viewBox=\"0 0 100 72\"\r\n role=\"img\"\r\n [attr.aria-label]=\"gauge.label + ' ' + gauge.display\"\r\n >\r\n <path\r\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\r\n fill=\"none\"\r\n stroke=\"#e5e7eb\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n pathLength=\"100\"\r\n ></path>\r\n\r\n @for (segment of performanceGaugeSegments(); track segment.key) {\r\n <path\r\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\r\n fill=\"none\"\r\n [attr.stroke]=\"segment.color\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n pathLength=\"100\"\r\n [attr.stroke-dasharray]=\"segment.dashArray\"\r\n [attr.stroke-dashoffset]=\"segment.dashOffset\"\r\n [style.opacity]=\"segment.opacity\"\r\n ></path>\r\n <text\r\n [attr.x]=\"segment.labelX\"\r\n [attr.y]=\"segment.labelY\"\r\n text-anchor=\"middle\"\r\n dominant-baseline=\"central\"\r\n font-size=\"5.5\"\r\n font-weight=\"700\"\r\n fill=\"#334155\"\r\n >\r\n {{ segment.label }}\r\n </text>\r\n }\r\n\r\n <circle\r\n [attr.cx]=\"gauge.marker.x\"\r\n [attr.cy]=\"gauge.marker.y\"\r\n r=\"4.5\"\r\n fill=\"#fff\"\r\n [attr.stroke]=\"gauge.status.color\"\r\n stroke-width=\"3\"\r\n ></circle>\r\n </svg>\r\n\r\n <div class=\"dashboard-performance-gauge__center\">\r\n <div class=\"dashboard-performance-gauge__value\">\r\n {{ gauge.display }}\r\n </div>\r\n <div class=\"dashboard-performance-gauge__label\">\r\n {{ gauge.label }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"dashboard-performance-gauge__status\"\r\n [title]=\"performanceGaugeStatusName()\"\r\n >\r\n <span class=\"dashboard-performance-gauge__status-dot\"></span>\r\n <span class=\"dashboard-performance-gauge__status-text\">\r\n {{ performanceGaugeStatusName() }}\r\n </span>\r\n </div>\r\n </div>\r\n } @else if (componentViewMode() === \"map\" && dataHandled()) {\r\n <mt-map-view\r\n [dashboardId]=\"dashboardId()\"\r\n [configurationItem]=\"configurationItem()\"\r\n [inGroup]=\"inGroup()\"\r\n [groups]=\"mapGroups()\"\r\n [config]=\"mapViewConfig()\"\r\n [showLegend]=\"mapLegendShow()\"\r\n [legendPosition]=\"mapLegendPosition()\"\r\n [legendIcon]=\"mapLegendIcon()\"\r\n (pointClick)=\"onMapPointClick($event)\"\r\n />\r\n } @else if (dataHandled() && !dataHandled()?.noData) {\r\n <mt-echart\r\n [dashboardId]=\"dashboardId()\"\r\n [chartConfig]=\"dataHandled()\"\r\n [configurationItem]=\"configurationItem()\"\r\n [inGroup]=\"inGroup()\"\r\n (chartClick)=\"onChartClick($event)\"\r\n >\r\n </mt-echart>\r\n } @else if (dataHandled()?.noData) {\r\n <div class=\"no-data-container\">\r\n <i class=\"pi pi-info-circle\"></i>\r\n <span>{{ t(\"noChartData\") }}</span>\r\n </div>\r\n } @else {\r\n <div class=\"loading-container\">\r\n <div class=\"loading-spinner\"></div>\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n</mt-card-content>\r\n", styles: [":host{display:block;height:100%}.chart-container{height:100%;min-height:0}.chart-container.config-mode{min-height:400px}.no-data-container,.needs-config-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:0;color:#999;gap:.5rem;padding:1rem;text-align:center}.no-data-container i,.needs-config-container i{font-size:2rem}.needs-config-container .title{font-weight:600;color:#555;font-size:.95rem}.needs-config-container .hint{font-size:.8rem;max-width:28rem;line-height:1.4}.needs-config-container .configure-btn{margin-top:.5rem;display:inline-flex;align-items:center;gap:.4rem;padding:.4rem .9rem;font-size:.85rem;font-weight:600;color:#fff;background:var(--p-primary-500, #2563eb);border:0;border-radius:.375rem;cursor:pointer;box-shadow:0 1px 2px #0000000d}.needs-config-container .configure-btn:hover{background:var(--p-primary-600, #1d4ed8)}.loading-container{display:flex;align-items:center;justify-content:center;height:100%;min-height:0}.loading-spinner{width:2rem;height:2rem;border:3px solid #f0f0f0;border-top-color:#4caf50;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.splitter-view{display:flex;align-items:stretch;height:100%;gap:.5rem}.splitter-view.splitter-vertical{flex-direction:column}.splitter-view.splitter-vertical .splitter-divider{width:auto;height:1px}.splitter-side{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:1rem;border-radius:.5rem}.splitter-positive{background:#22c55e14}.splitter-negative{background:#ef444414}.splitter-count{font-size:2rem;font-weight:700;margin-bottom:.5rem}.splitter-positive .splitter-count{color:#16a34a}.splitter-negative .splitter-count{color:#dc2626}.splitter-labels{list-style:none;padding:0;margin:0;text-align:center;font-size:.8rem;color:#555}.splitter-labels li{padding:.15rem 0}.splitter-divider{width:1px;background:#00000014}.dashboard-timeline-view{display:flex;flex-direction:column;gap:.625rem;height:100%;min-height:0;overflow:auto}.dashboard-timeline-view[data-legend-position=left],.dashboard-timeline-view[data-legend-position=right]{flex-direction:row;overflow:hidden}.dashboard-timeline-legend{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.35rem .75rem;flex-shrink:0;min-width:0;max-width:100%}.dashboard-timeline-legend[data-position=left],.dashboard-timeline-legend[data-position=right]{max-width:12rem;max-height:100%;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;overflow:auto}.dashboard-timeline-legend-item{display:inline-flex;align-items:center;gap:.25rem;max-width:12rem;padding:0;border:0;border-radius:0;font-size:.75rem;color:#475569;font-weight:500;line-height:1.2;background:transparent}.dashboard-timeline-legend-marker{display:inline-block;width:.625rem;height:.625rem;flex:0 0 auto;border-radius:999px}.dashboard-timeline-legend-marker.shape-rect{border-radius:0}.dashboard-timeline-legend-marker.shape-roundRect{border-radius:.2rem}.dashboard-timeline-legend-marker.shape-diamond{border-radius:.0625rem;transform:rotate(45deg)}.dashboard-timeline-legend-marker.shape-triangle{width:0;height:0;background:transparent!important;border-radius:0;border-left:.34rem solid transparent;border-right:.34rem solid transparent;border-bottom-width:.6rem;border-bottom-style:solid}.dashboard-timeline-legend-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-renderer{display:block;min-height:0;flex:1}.dashboard-timeline-placeholder{display:flex;min-height:260px;flex:1;flex-direction:column;gap:.75rem;padding:1rem}.dashboard-timeline-placeholder div{height:3rem;border-radius:.5rem;background:var(--p-surface-100);animation:dashboard-builder-pulse 1.2s ease-in-out infinite}@keyframes dashboard-builder-pulse{0%,to{opacity:.55}50%{opacity:1}}:host ::ng-deep .dashboard-timeline-renderer>div{margin-top:0}:host ::ng-deep .dashboard-timeline-view mt-timeline-gantt-header .bg-surface-50{background-color:var(--timeline-header-bg, var(--p-surface-50));color:var(--timeline-header-color, inherit)}.dashboard-timeline-column-entity{display:block;min-width:0}.dashboard-timeline-title-cell{display:flex;min-width:0;align-items:center;gap:.5rem;width:100%}.dashboard-timeline-title-toggle{flex:0 0 auto;cursor:pointer;color:#64748b}.dashboard-timeline-title-spacer{display:inline-block;width:1.25rem;flex:0 0 1.25rem}.dashboard-timeline-title-action{min-width:0;flex:1 1 auto;overflow:hidden;border:0;background:transparent;padding:0;color:#334155;cursor:pointer;font-size:.875rem;font-weight:600;text-align:start;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-title-action:hover{color:var(--p-primary-600, #2563eb);text-decoration:underline}.phase-gate-view{height:100%;display:flex;align-items:center;justify-content:safe center;padding:1rem;overflow-x:auto}.phase-steps{display:flex;align-items:center;gap:.75rem;list-style:none;margin:0;padding:0}.phase-step{display:flex;align-items:center;gap:.5rem;padding:.4rem .75rem;border-radius:.375rem;background:#0000000a;font-size:.8rem;color:#555;white-space:nowrap}.phase-step-number{width:1.5rem;height:1.5rem;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;font-weight:700;background:#0000000f;color:#666}.phase-step.is-done{background:#22c55e1a;color:#16a34a}.phase-step.is-done .phase-step-number{background:#16a34a;color:#fff}.phase-step.is-current{background:#2563eb1a;color:#2563eb;font-weight:600}.phase-step.is-current .phase-step-number{background:#2563eb;color:#fff}.phase-gate-view.phase-gate-compact .phase-step{padding:.2rem .45rem;font-size:.7rem;gap:.25rem}.phase-gate-view.phase-gate-compact .phase-step-number{width:1.1rem;height:1.1rem;font-size:.7rem}.dashboard-performance-gauge{display:flex;height:100%;min-height:0;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:.875rem;overflow:hidden;padding:.75rem 1rem 1rem;cursor:default}.dashboard-performance-gauge.is-clickable{cursor:pointer}.dashboard-performance-gauge__figure{position:relative;width:min(100%,28rem);min-width:12rem;max-width:100%;transform-origin:center bottom}.dashboard-performance-gauge__svg{display:block;width:100%;height:auto;overflow:visible}.dashboard-performance-gauge__center{position:absolute;left:50%;top:72%;display:flex;max-width:90%;transform:translate(-50%,-50%);flex-direction:column;align-items:center;gap:.125rem;text-align:center;pointer-events:none}.dashboard-performance-gauge__value{font-size:2.75rem;font-weight:800;line-height:1;color:var(--dashboard-performance-status-color, #334155)}.dashboard-performance-gauge__label{max-width:18rem;overflow:hidden;color:#475569;font-size:.95rem;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.dashboard-performance-gauge__status{display:inline-flex;max-width:min(80%,18rem);align-items:center;justify-content:center;gap:.375rem;border-radius:999px;padding:.25rem .625rem;background:color-mix(in srgb,var(--dashboard-performance-status-color, #64748b) 10%,transparent);color:var(--dashboard-performance-status-color, #475569);font-size:.8125rem;font-weight:700;line-height:1.2}.dashboard-performance-gauge__status-dot{width:.5rem;height:.5rem;flex:0 0 auto;border-radius:999px;background:currentColor}.dashboard-performance-gauge__status-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: CardContentComponent, selector: "mt-card-content", inputs: ["title", "inGroup", "groupHeader", "headerConfig", "styleConfig", "cardStyleConfig", "density", "padding", "showHeader", "headerClickable", "isNoTopEnd", "isChart", "titleEditable"], outputs: ["headerClick", "titleChange"] }, { kind: "component", type: CardFilterComponent, selector: "mt-card-filter", inputs: ["config", "dashboardId"], outputs: ["filterChange"] }, { kind: "component", type: StaticFiltersComponent, selector: "mt-static-filters", inputs: ["config", "dashboardId"], outputs: ["filterChange"] }, { kind: "component", type: DynamicFiltersComponent, selector: "mt-dynamic-filters", inputs: ["fields", "dashboardId", "reportId", "showLabels"], outputs: ["filterChange", "filtersChange"] }, { kind: "component", type: CardInfoComponent, selector: "mt-card-info", inputs: ["cardInfo"] }, { kind: "component", type: EChartComponent, selector: "mt-echart", inputs: ["dashboardId", "chartConfig", "configurationItem", "height", "inGroup", "headerHidden"], outputs: ["chartClick"] }, { kind: "component", type: MapViewComponent, selector: "mt-map-view", inputs: ["groups", "config", "showLegend", "legendPosition", "legendIcon", "dashboardId", "configurationItem", "inGroup"], outputs: ["pointClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [import('@masterteam/timeline').then(m => m.Timeline), import('@masterteam/timeline').then(m => m.TimelineColumnTemplateDirective), import('@masterteam/timeline').then(m => m.TimelinePopoverTemplateDirective), import('@masterteam/components/entities').then(m => m.EntitiesPreview), import('@masterteam/components/entities').then(m => m.EntityPreview), import('@masterteam/icons').then(m => m.Icon)]] });
30838
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ChartCardComponent, isStandalone: true, selector: "mt-chart-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null }, reportId: { classPropertyName: "reportId", publicName: "reportId", isSignal: true, isRequired: false, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null }, isConfigMode: { classPropertyName: "isConfigMode", publicName: "isConfigMode", isSignal: true, isRequired: false, transformFunction: null }, titleEditable: { classPropertyName: "titleEditable", publicName: "titleEditable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction", onConfigure: "onConfigure", onTitleChange: "onTitleChange" }, ngImport: i0, template: "<ng-template #timelineLegendList>\r\n <div\r\n class=\"dashboard-timeline-legend\"\r\n [attr.data-position]=\"timelineLegendPosition()\"\r\n >\r\n @for (label of timelineLabels(); track $index) {\r\n <span\r\n class=\"dashboard-timeline-legend-item\"\r\n [title]=\"label.label || label.name || label.key\"\r\n >\r\n <span\r\n class=\"dashboard-timeline-legend-marker\"\r\n [class.shape-rect]=\"label.shape === 'rect'\"\r\n [class.shape-roundRect]=\"label.shape === 'roundRect'\"\r\n [class.shape-diamond]=\"label.shape === 'diamond'\"\r\n [class.shape-triangle]=\"label.shape === 'triangle'\"\r\n [style.background]=\"\r\n label.shape === 'triangle' ? null : label.color || '#64748b'\r\n \"\r\n [style.border-bottom-color]=\"\r\n label.shape === 'triangle' ? label.color || '#64748b' : null\r\n \"\r\n ></span>\r\n <span class=\"dashboard-timeline-legend-label\">\r\n {{ label.label || label.name || label.key }}\r\n </span>\r\n </span>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<mt-card-content\r\n [inGroup]=\"inGroup()\"\r\n [headerConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\r\n \"\r\n [styleConfig]=\"\r\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\r\n \"\r\n [cardStyleConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\r\n \"\r\n [density]=\"configurationItem()?.clientConfig?.configAsType?.['density']\"\r\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\r\n [title]=\"title()\"\r\n [titleEditable]=\"titleEditable()\"\r\n (titleChange)=\"onTitleChange.emit($event)\"\r\n [isNoTopEnd]=\"!showTopEnd()\"\r\n [isChart]=\"true\"\r\n (headerClick)=\"onHeaderClick()\"\r\n>\r\n <ng-container topEnd>\r\n @if (showStaticFilters()) {\r\n <mt-static-filters\r\n [config]=\"staticFilterConfig()\"\r\n [dashboardId]=\"dashboardId()\"\r\n >\r\n </mt-static-filters>\r\n }\r\n @if (showDynamicFilters()) {\r\n <mt-dynamic-filters\r\n [fields]=\"dynamicFilterFields()\"\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [showLabels]=\"false\"\r\n >\r\n </mt-dynamic-filters>\r\n }\r\n @if (showFilter()) {\r\n <mt-card-filter [config]=\"filterConfig()\" [dashboardId]=\"dashboardId()\">\r\n </mt-card-filter>\r\n }\r\n @if (cardInfoConfig()?.show && cardInfoConfig()?.value) {\r\n <mt-card-info [cardInfo]=\"cardInfoConfig()\"></mt-card-info>\r\n }\r\n </ng-container>\r\n\r\n <ng-container body>\r\n <div\r\n class=\"chart-container\"\r\n [class.config-mode]=\"isConfigMode()\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n >\r\n @if (componentViewMode() === \"splitter\" && hasSplitterData()) {\r\n <div\r\n class=\"splitter-view\"\r\n [class.splitter-vertical]=\"splitterOrientation() === 'vertical'\"\r\n [style.gap.px]=\"splitterGap()\"\r\n >\r\n <div class=\"splitter-side splitter-positive\">\r\n <div class=\"splitter-count\">\r\n {{ dataHandled()?.positive?.groupedValue ?? 0 }}\r\n </div>\r\n <ul class=\"splitter-labels\">\r\n @for (\r\n label of dataHandled()?.positive?.labels || [];\r\n track $index\r\n ) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n </div>\r\n <div class=\"splitter-divider\"></div>\r\n <div class=\"splitter-side splitter-negative\">\r\n <div class=\"splitter-count\">\r\n {{ dataHandled()?.negative?.groupedValue ?? 0 }}\r\n </div>\r\n <ul class=\"splitter-labels\">\r\n @for (\r\n label of dataHandled()?.negative?.labels || [];\r\n track $index\r\n ) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n </div>\r\n </div>\r\n } @else if (componentViewMode() === \"timeline\" && hasTimelineData()) {\r\n <div\r\n class=\"dashboard-timeline-view\"\r\n [attr.data-legend-position]=\"timelineLegendPosition()\"\r\n [style.--timeline-header-bg]=\"timelineHeaderBgColor()\"\r\n [style.--timeline-header-color]=\"timelineHeaderTextColor()\"\r\n >\r\n @if (\r\n timelineLegendShow() &&\r\n timelineLabels().length &&\r\n (timelineLegendPosition() === \"top\" ||\r\n timelineLegendPosition() === \"left\")\r\n ) {\r\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\r\n }\r\n\r\n @defer (on viewport) {\r\n <mt-timeline\r\n class=\"dashboard-timeline-renderer\"\r\n [showHeader]=\"false\"\r\n [showZoomToFitControl]=\"false\"\r\n [scrollToToday]=\"true\"\r\n [timelineMode]=\"timelineMode()\"\r\n (timelineModeChange)=\"timelineMode.set($event)\"\r\n [ganttData]=\"timelineResources()\"\r\n [ganttMapping]=\"timelineGanttMapping\"\r\n [columns]=\"timelineColumns()\"\r\n [defaultVisibleColumns]=\"2\"\r\n [columnsPaneMinWidthPx]=\"220\"\r\n [columnsPaneMaxWidthPx]=\"520\"\r\n [enableVirtualScroll]=\"true\"\r\n [virtualScrollThreshold]=\"0\"\r\n [virtualScrollBodyHeightPx]=\"520\"\r\n [showGanttDetailsPopup]=\"true\"\r\n [emptyMessage]=\"t('noChartData')\"\r\n >\r\n <ng-template\r\n mtTimelineColumn=\"title\"\r\n let-item=\"item\"\r\n let-resolved=\"resolved\"\r\n let-canToggle=\"canToggle\"\r\n let-isCollapsed=\"isCollapsed\"\r\n let-toggle=\"toggle\"\r\n >\r\n <div\r\n class=\"dashboard-timeline-title-cell\"\r\n [style.padding-inline-start.px]=\"\r\n $any(resolved).levelDepth * 16\r\n \"\r\n >\r\n @if (canToggle) {\r\n <mt-icon\r\n class=\"dashboard-timeline-title-toggle\"\r\n [icon]=\"timelineCollapseIcon(isCollapsed)\"\r\n (click)=\"$event.stopPropagation(); toggle()\"\r\n ></mt-icon>\r\n } @else {\r\n <span class=\"dashboard-timeline-title-spacer\"></span>\r\n }\r\n\r\n <button\r\n type=\"button\"\r\n class=\"dashboard-timeline-title-action\"\r\n [title]=\"$any(resolved).title\"\r\n (click)=\"onTimelineTitleClick(item, $event)\"\r\n >\r\n {{ $any(resolved).title }}\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n @for (column of timelineEntityColumns(); track column.key) {\r\n <ng-template [mtTimelineColumn]=\"column.key\" let-value=\"value\">\r\n <mt-entity-preview\r\n class=\"dashboard-timeline-column-entity\"\r\n [data]=\"timelineColumnEntityData(value)\"\r\n attachmentShape=\"compact\"\r\n ></mt-entity-preview>\r\n </ng-template>\r\n }\r\n\r\n <ng-template mtTimelinePopover let-item=\"item\">\r\n @if (timelinePopoverEntities(item); as entities) {\r\n @if (entities.length) {\r\n <div\r\n class=\"w-[27rem] max-w-[90vw] max-h-[24rem] overflow-auto p-2\"\r\n >\r\n <mt-entities-preview\r\n [entities]=\"entities\"\r\n [stackOnNarrow]=\"false\"\r\n />\r\n </div>\r\n }\r\n }\r\n </ng-template>\r\n </mt-timeline>\r\n } @placeholder {\r\n <div class=\"dashboard-timeline-placeholder\" aria-hidden=\"true\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n }\r\n\r\n @if (\r\n timelineLegendShow() &&\r\n timelineLabels().length &&\r\n (timelineLegendPosition() === \"bottom\" ||\r\n timelineLegendPosition() === \"right\")\r\n ) {\r\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\r\n }\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"phaseGateStepper\" && phaseGateRecordCount() > 1\r\n ) {\r\n <div class=\"no-data-container\">\r\n <i class=\"pi pi-info-circle\"></i>\r\n <span>{{\r\n t(\"phaseGateStepperMultipleRecords\", {\r\n count: phaseGateRecordCount(),\r\n })\r\n }}</span>\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"phaseGateStepper\" && hasPhaseGateData()\r\n ) {\r\n <div\r\n class=\"phase-gate-view\"\r\n [class.phase-gate-compact]=\"phaseGateCompact()\"\r\n >\r\n <ol class=\"phase-steps\">\r\n @for (step of phaseGateSteps(); track $index) {\r\n <li\r\n class=\"phase-step\"\r\n [class.is-current]=\"step.isCurrent\"\r\n [class.is-done]=\"step.isCompleted\"\r\n >\r\n <span class=\"phase-step-number\">{{ $index + 1 }}</span>\r\n @if (phaseGateShowLabels()) {\r\n <span class=\"phase-step-name\">{{\r\n step.name || t(\"phase\")\r\n }}</span>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"performanceGauge\" &&\r\n dataHandled() &&\r\n !dataHandled()?.noData\r\n ) {\r\n @let gauge = performanceGauge();\r\n <div\r\n class=\"dashboard-performance-gauge\"\r\n [class.is-clickable]=\"hasActions()\"\r\n [style.--dashboard-performance-status-color]=\"gauge.status.color\"\r\n (click)=\"onPerformanceGaugeClick($event)\"\r\n >\r\n <div\r\n class=\"dashboard-performance-gauge__figure\"\r\n [style.width.%]=\"gauge.scalePercent\"\r\n >\r\n <svg\r\n class=\"dashboard-performance-gauge__svg\"\r\n viewBox=\"0 0 100 72\"\r\n role=\"img\"\r\n [attr.aria-label]=\"gauge.label + ' ' + gauge.display\"\r\n >\r\n <path\r\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\r\n fill=\"none\"\r\n stroke=\"#e5e7eb\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n pathLength=\"100\"\r\n ></path>\r\n\r\n @for (segment of performanceGaugeSegments(); track segment.key) {\r\n <path\r\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\r\n fill=\"none\"\r\n [attr.stroke]=\"segment.color\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n pathLength=\"100\"\r\n [attr.stroke-dasharray]=\"segment.dashArray\"\r\n [attr.stroke-dashoffset]=\"segment.dashOffset\"\r\n [style.opacity]=\"segment.opacity\"\r\n ></path>\r\n <text\r\n [attr.x]=\"segment.labelX\"\r\n [attr.y]=\"segment.labelY\"\r\n text-anchor=\"middle\"\r\n dominant-baseline=\"central\"\r\n font-size=\"5.5\"\r\n font-weight=\"700\"\r\n fill=\"#334155\"\r\n >\r\n {{ segment.label }}\r\n </text>\r\n }\r\n\r\n <circle\r\n [attr.cx]=\"gauge.marker.x\"\r\n [attr.cy]=\"gauge.marker.y\"\r\n r=\"4.5\"\r\n fill=\"#fff\"\r\n [attr.stroke]=\"gauge.status.color\"\r\n stroke-width=\"3\"\r\n ></circle>\r\n </svg>\r\n\r\n <div class=\"dashboard-performance-gauge__center\">\r\n <div class=\"dashboard-performance-gauge__value\">\r\n {{ gauge.display }}\r\n </div>\r\n <div class=\"dashboard-performance-gauge__label\">\r\n {{ gauge.label }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"dashboard-performance-gauge__status\"\r\n [title]=\"performanceGaugeStatusName()\"\r\n >\r\n <span class=\"dashboard-performance-gauge__status-dot\"></span>\r\n <span class=\"dashboard-performance-gauge__status-text\">\r\n {{ performanceGaugeStatusName() }}\r\n </span>\r\n </div>\r\n </div>\r\n } @else if (componentViewMode() === \"map\" && dataHandled()) {\r\n <mt-map-view\r\n [dashboardId]=\"dashboardId()\"\r\n [configurationItem]=\"configurationItem()\"\r\n [inGroup]=\"inGroup()\"\r\n [groups]=\"mapGroups()\"\r\n [config]=\"mapViewConfig()\"\r\n [showLegend]=\"mapLegendShow()\"\r\n [legendPosition]=\"mapLegendPosition()\"\r\n [legendIcon]=\"mapLegendIcon()\"\r\n (pointClick)=\"onMapPointClick($event)\"\r\n (pointDblClick)=\"onMapPointDblClick($event)\"\r\n />\r\n } @else if (dataHandled() && !dataHandled()?.noData) {\r\n <mt-echart\r\n [dashboardId]=\"dashboardId()\"\r\n [chartConfig]=\"dataHandled()\"\r\n [configurationItem]=\"configurationItem()\"\r\n [inGroup]=\"inGroup()\"\r\n (chartClick)=\"onChartClick($event)\"\r\n (chartDblClick)=\"onChartDblClick($event)\"\r\n >\r\n </mt-echart>\r\n } @else if (dataHandled()?.noData) {\r\n <div class=\"no-data-container\">\r\n <i class=\"pi pi-info-circle\"></i>\r\n <span>{{ t(\"noChartData\") }}</span>\r\n </div>\r\n } @else {\r\n <div class=\"loading-container\">\r\n <div class=\"loading-spinner\"></div>\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n</mt-card-content>\r\n", styles: [":host{display:block;height:100%}.chart-container{height:100%;min-height:0}.chart-container.config-mode{min-height:400px}.no-data-container,.needs-config-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:0;color:#999;gap:.5rem;padding:1rem;text-align:center}.no-data-container i,.needs-config-container i{font-size:2rem}.needs-config-container .title{font-weight:600;color:#555;font-size:.95rem}.needs-config-container .hint{font-size:.8rem;max-width:28rem;line-height:1.4}.needs-config-container .configure-btn{margin-top:.5rem;display:inline-flex;align-items:center;gap:.4rem;padding:.4rem .9rem;font-size:.85rem;font-weight:600;color:#fff;background:var(--p-primary-500, #2563eb);border:0;border-radius:.375rem;cursor:pointer;box-shadow:0 1px 2px #0000000d}.needs-config-container .configure-btn:hover{background:var(--p-primary-600, #1d4ed8)}.loading-container{display:flex;align-items:center;justify-content:center;height:100%;min-height:0}.loading-spinner{width:2rem;height:2rem;border:3px solid #f0f0f0;border-top-color:#4caf50;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.splitter-view{display:flex;align-items:stretch;height:100%;gap:.5rem}.splitter-view.splitter-vertical{flex-direction:column}.splitter-view.splitter-vertical .splitter-divider{width:auto;height:1px}.splitter-side{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:1rem;border-radius:.5rem}.splitter-positive{background:#22c55e14}.splitter-negative{background:#ef444414}.splitter-count{font-size:2rem;font-weight:700;margin-bottom:.5rem}.splitter-positive .splitter-count{color:#16a34a}.splitter-negative .splitter-count{color:#dc2626}.splitter-labels{list-style:none;padding:0;margin:0;text-align:center;font-size:.8rem;color:#555}.splitter-labels li{padding:.15rem 0}.splitter-divider{width:1px;background:#00000014}.dashboard-timeline-view{display:flex;flex-direction:column;gap:.625rem;height:100%;min-height:0;overflow:auto}.dashboard-timeline-view[data-legend-position=left],.dashboard-timeline-view[data-legend-position=right]{flex-direction:row;overflow:hidden}.dashboard-timeline-legend{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.35rem .75rem;flex-shrink:0;min-width:0;max-width:100%}.dashboard-timeline-legend[data-position=left],.dashboard-timeline-legend[data-position=right]{max-width:12rem;max-height:100%;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;overflow:auto}.dashboard-timeline-legend-item{display:inline-flex;align-items:center;gap:.25rem;max-width:12rem;padding:0;border:0;border-radius:0;font-size:.75rem;color:#475569;font-weight:500;line-height:1.2;background:transparent}.dashboard-timeline-legend-marker{display:inline-block;width:.625rem;height:.625rem;flex:0 0 auto;border-radius:999px}.dashboard-timeline-legend-marker.shape-rect{border-radius:0}.dashboard-timeline-legend-marker.shape-roundRect{border-radius:.2rem}.dashboard-timeline-legend-marker.shape-diamond{border-radius:.0625rem;transform:rotate(45deg)}.dashboard-timeline-legend-marker.shape-triangle{width:0;height:0;background:transparent!important;border-radius:0;border-left:.34rem solid transparent;border-right:.34rem solid transparent;border-bottom-width:.6rem;border-bottom-style:solid}.dashboard-timeline-legend-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-renderer{display:block;min-height:0;flex:1}.dashboard-timeline-placeholder{display:flex;min-height:260px;flex:1;flex-direction:column;gap:.75rem;padding:1rem}.dashboard-timeline-placeholder div{height:3rem;border-radius:.5rem;background:var(--p-surface-100);animation:dashboard-builder-pulse 1.2s ease-in-out infinite}@keyframes dashboard-builder-pulse{0%,to{opacity:.55}50%{opacity:1}}:host ::ng-deep .dashboard-timeline-renderer>div{margin-top:0}:host ::ng-deep .dashboard-timeline-view mt-timeline-gantt-header .bg-surface-50{background-color:var(--timeline-header-bg, var(--p-surface-50));color:var(--timeline-header-color, inherit)}.dashboard-timeline-column-entity{display:block;min-width:0}.dashboard-timeline-title-cell{display:flex;min-width:0;align-items:center;gap:.5rem;width:100%}.dashboard-timeline-title-toggle{flex:0 0 auto;cursor:pointer;color:#64748b}.dashboard-timeline-title-spacer{display:inline-block;width:1.25rem;flex:0 0 1.25rem}.dashboard-timeline-title-action{min-width:0;flex:1 1 auto;overflow:hidden;border:0;background:transparent;padding:0;color:#334155;cursor:pointer;font-size:.875rem;font-weight:600;text-align:start;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-title-action:hover{color:var(--p-primary-600, #2563eb);text-decoration:underline}.phase-gate-view{height:100%;display:flex;align-items:center;justify-content:safe center;padding:1rem;overflow-x:auto}.phase-steps{display:flex;align-items:center;gap:.75rem;list-style:none;margin:0;padding:0}.phase-step{display:flex;align-items:center;gap:.5rem;padding:.4rem .75rem;border-radius:.375rem;background:#0000000a;font-size:.8rem;color:#555;white-space:nowrap}.phase-step-number{width:1.5rem;height:1.5rem;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;font-weight:700;background:#0000000f;color:#666}.phase-step.is-done{background:#22c55e1a;color:#16a34a}.phase-step.is-done .phase-step-number{background:#16a34a;color:#fff}.phase-step.is-current{background:#2563eb1a;color:#2563eb;font-weight:600}.phase-step.is-current .phase-step-number{background:#2563eb;color:#fff}.phase-gate-view.phase-gate-compact .phase-step{padding:.2rem .45rem;font-size:.7rem;gap:.25rem}.phase-gate-view.phase-gate-compact .phase-step-number{width:1.1rem;height:1.1rem;font-size:.7rem}.dashboard-performance-gauge{display:flex;height:100%;min-height:0;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:.875rem;overflow:hidden;padding:.75rem 1rem 1rem;cursor:default}.dashboard-performance-gauge.is-clickable{cursor:pointer}.dashboard-performance-gauge__figure{position:relative;width:min(100%,28rem);min-width:12rem;max-width:100%;transform-origin:center bottom}.dashboard-performance-gauge__svg{display:block;width:100%;height:auto;overflow:visible}.dashboard-performance-gauge__center{position:absolute;left:50%;top:72%;display:flex;max-width:90%;transform:translate(-50%,-50%);flex-direction:column;align-items:center;gap:.125rem;text-align:center;pointer-events:none}.dashboard-performance-gauge__value{font-size:2.75rem;font-weight:800;line-height:1;color:var(--dashboard-performance-status-color, #334155)}.dashboard-performance-gauge__label{max-width:18rem;overflow:hidden;color:#475569;font-size:.95rem;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.dashboard-performance-gauge__status{display:inline-flex;max-width:min(80%,18rem);align-items:center;justify-content:center;gap:.375rem;border-radius:999px;padding:.25rem .625rem;background:color-mix(in srgb,var(--dashboard-performance-status-color, #64748b) 10%,transparent);color:var(--dashboard-performance-status-color, #475569);font-size:.8125rem;font-weight:700;line-height:1.2}.dashboard-performance-gauge__status-dot{width:.5rem;height:.5rem;flex:0 0 auto;border-radius:999px;background:currentColor}.dashboard-performance-gauge__status-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: CardContentComponent, selector: "mt-card-content", inputs: ["title", "inGroup", "groupHeader", "headerConfig", "styleConfig", "cardStyleConfig", "density", "padding", "showHeader", "headerClickable", "isNoTopEnd", "isChart", "titleEditable"], outputs: ["headerClick", "titleChange"] }, { kind: "component", type: CardFilterComponent, selector: "mt-card-filter", inputs: ["config", "dashboardId"], outputs: ["filterChange"] }, { kind: "component", type: StaticFiltersComponent, selector: "mt-static-filters", inputs: ["config", "dashboardId"], outputs: ["filterChange"] }, { kind: "component", type: DynamicFiltersComponent, selector: "mt-dynamic-filters", inputs: ["fields", "dashboardId", "reportId", "showLabels"], outputs: ["filterChange", "filtersChange"] }, { kind: "component", type: CardInfoComponent, selector: "mt-card-info", inputs: ["cardInfo"] }, { kind: "component", type: EChartComponent, selector: "mt-echart", inputs: ["dashboardId", "chartConfig", "configurationItem", "height", "inGroup", "headerHidden"], outputs: ["chartClick", "chartDblClick"] }, { kind: "component", type: MapViewComponent, selector: "mt-map-view", inputs: ["groups", "config", "showLegend", "legendPosition", "legendIcon", "dashboardId", "configurationItem", "inGroup"], outputs: ["pointClick", "pointDblClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [import('@masterteam/timeline').then(m => m.Timeline), import('@masterteam/timeline').then(m => m.TimelineColumnTemplateDirective), import('@masterteam/timeline').then(m => m.TimelinePopoverTemplateDirective), import('@masterteam/components/entities').then(m => m.EntitiesPreview), import('@masterteam/components/entities').then(m => m.EntityPreview), import('@masterteam/icons').then(m => m.Icon)]] });
30593
30839
  }
30594
30840
  i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.8", ngImport: i0, type: ChartCardComponent, resolveDeferredDeps: () => [import('@masterteam/timeline').then(m => m.Timeline), import('@masterteam/timeline').then(m => m.TimelineColumnTemplateDirective), import('@masterteam/timeline').then(m => m.TimelinePopoverTemplateDirective), import('@masterteam/components/entities').then(m => m.EntitiesPreview), import('@masterteam/components/entities').then(m => m.EntityPreview), import('@masterteam/icons').then(m => m.Icon)], resolveMetadata: (Timeline, TimelineColumnTemplateDirective, TimelinePopoverTemplateDirective, EntitiesPreview, EntityPreview, Icon) => ({ decorators: [{
30595
30841
  type: Component,
@@ -30609,7 +30855,7 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.8", ng
30609
30855
  EntitiesPreview,
30610
30856
  EntityPreview,
30611
30857
  Icon,
30612
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #timelineLegendList>\r\n <div\r\n class=\"dashboard-timeline-legend\"\r\n [attr.data-position]=\"timelineLegendPosition()\"\r\n >\r\n @for (label of timelineLabels(); track $index) {\r\n <span\r\n class=\"dashboard-timeline-legend-item\"\r\n [title]=\"label.label || label.name || label.key\"\r\n >\r\n <span\r\n class=\"dashboard-timeline-legend-marker\"\r\n [class.shape-rect]=\"label.shape === 'rect'\"\r\n [class.shape-roundRect]=\"label.shape === 'roundRect'\"\r\n [class.shape-diamond]=\"label.shape === 'diamond'\"\r\n [class.shape-triangle]=\"label.shape === 'triangle'\"\r\n [style.background]=\"\r\n label.shape === 'triangle' ? null : label.color || '#64748b'\r\n \"\r\n [style.border-bottom-color]=\"\r\n label.shape === 'triangle' ? label.color || '#64748b' : null\r\n \"\r\n ></span>\r\n <span class=\"dashboard-timeline-legend-label\">\r\n {{ label.label || label.name || label.key }}\r\n </span>\r\n </span>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<mt-card-content\r\n [inGroup]=\"inGroup()\"\r\n [headerConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\r\n \"\r\n [styleConfig]=\"\r\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\r\n \"\r\n [cardStyleConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\r\n \"\r\n [density]=\"configurationItem()?.clientConfig?.configAsType?.['density']\"\r\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\r\n [title]=\"title()\"\r\n [titleEditable]=\"titleEditable()\"\r\n (titleChange)=\"onTitleChange.emit($event)\"\r\n [isNoTopEnd]=\"!showTopEnd()\"\r\n [isChart]=\"true\"\r\n (headerClick)=\"onHeaderClick()\"\r\n>\r\n <ng-container topEnd>\r\n @if (showStaticFilters()) {\r\n <mt-static-filters\r\n [config]=\"staticFilterConfig()\"\r\n [dashboardId]=\"dashboardId()\"\r\n >\r\n </mt-static-filters>\r\n }\r\n @if (showDynamicFilters()) {\r\n <mt-dynamic-filters\r\n [fields]=\"dynamicFilterFields()\"\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [showLabels]=\"false\"\r\n >\r\n </mt-dynamic-filters>\r\n }\r\n @if (showFilter()) {\r\n <mt-card-filter [config]=\"filterConfig()\" [dashboardId]=\"dashboardId()\">\r\n </mt-card-filter>\r\n }\r\n @if (cardInfoConfig()?.show && cardInfoConfig()?.value) {\r\n <mt-card-info [cardInfo]=\"cardInfoConfig()\"></mt-card-info>\r\n }\r\n </ng-container>\r\n\r\n <ng-container body>\r\n <div\r\n class=\"chart-container\"\r\n [class.config-mode]=\"isConfigMode()\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n >\r\n @if (componentViewMode() === \"splitter\" && hasSplitterData()) {\r\n <div\r\n class=\"splitter-view\"\r\n [class.splitter-vertical]=\"splitterOrientation() === 'vertical'\"\r\n [style.gap.px]=\"splitterGap()\"\r\n >\r\n <div class=\"splitter-side splitter-positive\">\r\n <div class=\"splitter-count\">\r\n {{ dataHandled()?.positive?.groupedValue ?? 0 }}\r\n </div>\r\n <ul class=\"splitter-labels\">\r\n @for (\r\n label of dataHandled()?.positive?.labels || [];\r\n track $index\r\n ) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n </div>\r\n <div class=\"splitter-divider\"></div>\r\n <div class=\"splitter-side splitter-negative\">\r\n <div class=\"splitter-count\">\r\n {{ dataHandled()?.negative?.groupedValue ?? 0 }}\r\n </div>\r\n <ul class=\"splitter-labels\">\r\n @for (\r\n label of dataHandled()?.negative?.labels || [];\r\n track $index\r\n ) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n </div>\r\n </div>\r\n } @else if (componentViewMode() === \"timeline\" && hasTimelineData()) {\r\n <div\r\n class=\"dashboard-timeline-view\"\r\n [attr.data-legend-position]=\"timelineLegendPosition()\"\r\n [style.--timeline-header-bg]=\"timelineHeaderBgColor()\"\r\n [style.--timeline-header-color]=\"timelineHeaderTextColor()\"\r\n >\r\n @if (\r\n timelineLegendShow() &&\r\n timelineLabels().length &&\r\n (timelineLegendPosition() === \"top\" ||\r\n timelineLegendPosition() === \"left\")\r\n ) {\r\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\r\n }\r\n\r\n @defer (on viewport) {\r\n <mt-timeline\r\n class=\"dashboard-timeline-renderer\"\r\n [showHeader]=\"false\"\r\n [showZoomToFitControl]=\"false\"\r\n [scrollToToday]=\"true\"\r\n [timelineMode]=\"timelineMode()\"\r\n (timelineModeChange)=\"timelineMode.set($event)\"\r\n [ganttData]=\"timelineResources()\"\r\n [ganttMapping]=\"timelineGanttMapping\"\r\n [columns]=\"timelineColumns()\"\r\n [defaultVisibleColumns]=\"2\"\r\n [columnsPaneMinWidthPx]=\"220\"\r\n [columnsPaneMaxWidthPx]=\"520\"\r\n [enableVirtualScroll]=\"true\"\r\n [virtualScrollThreshold]=\"0\"\r\n [virtualScrollBodyHeightPx]=\"520\"\r\n [showGanttDetailsPopup]=\"true\"\r\n [emptyMessage]=\"t('noChartData')\"\r\n >\r\n <ng-template\r\n mtTimelineColumn=\"title\"\r\n let-item=\"item\"\r\n let-resolved=\"resolved\"\r\n let-canToggle=\"canToggle\"\r\n let-isCollapsed=\"isCollapsed\"\r\n let-toggle=\"toggle\"\r\n >\r\n <div\r\n class=\"dashboard-timeline-title-cell\"\r\n [style.padding-inline-start.px]=\"\r\n $any(resolved).levelDepth * 16\r\n \"\r\n >\r\n @if (canToggle) {\r\n <mt-icon\r\n class=\"dashboard-timeline-title-toggle\"\r\n [icon]=\"timelineCollapseIcon(isCollapsed)\"\r\n (click)=\"$event.stopPropagation(); toggle()\"\r\n ></mt-icon>\r\n } @else {\r\n <span class=\"dashboard-timeline-title-spacer\"></span>\r\n }\r\n\r\n <button\r\n type=\"button\"\r\n class=\"dashboard-timeline-title-action\"\r\n [title]=\"$any(resolved).title\"\r\n (click)=\"onTimelineTitleClick(item, $event)\"\r\n >\r\n {{ $any(resolved).title }}\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n @for (column of timelineEntityColumns(); track column.key) {\r\n <ng-template [mtTimelineColumn]=\"column.key\" let-value=\"value\">\r\n <mt-entity-preview\r\n class=\"dashboard-timeline-column-entity\"\r\n [data]=\"timelineColumnEntityData(value)\"\r\n attachmentShape=\"compact\"\r\n ></mt-entity-preview>\r\n </ng-template>\r\n }\r\n\r\n <ng-template mtTimelinePopover let-item=\"item\">\r\n @if (timelinePopoverEntities(item); as entities) {\r\n @if (entities.length) {\r\n <div\r\n class=\"w-[27rem] max-w-[90vw] max-h-[24rem] overflow-auto p-2\"\r\n >\r\n <mt-entities-preview\r\n [entities]=\"entities\"\r\n [stackOnNarrow]=\"false\"\r\n />\r\n </div>\r\n }\r\n }\r\n </ng-template>\r\n </mt-timeline>\r\n } @placeholder {\r\n <div class=\"dashboard-timeline-placeholder\" aria-hidden=\"true\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n }\r\n\r\n @if (\r\n timelineLegendShow() &&\r\n timelineLabels().length &&\r\n (timelineLegendPosition() === \"bottom\" ||\r\n timelineLegendPosition() === \"right\")\r\n ) {\r\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\r\n }\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"phaseGateStepper\" && phaseGateRecordCount() > 1\r\n ) {\r\n <div class=\"no-data-container\">\r\n <i class=\"pi pi-info-circle\"></i>\r\n <span>{{\r\n t(\"phaseGateStepperMultipleRecords\", {\r\n count: phaseGateRecordCount(),\r\n })\r\n }}</span>\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"phaseGateStepper\" && hasPhaseGateData()\r\n ) {\r\n <div\r\n class=\"phase-gate-view\"\r\n [class.phase-gate-compact]=\"phaseGateCompact()\"\r\n >\r\n <ol class=\"phase-steps\">\r\n @for (step of phaseGateSteps(); track $index) {\r\n <li\r\n class=\"phase-step\"\r\n [class.is-current]=\"step.isCurrent\"\r\n [class.is-done]=\"step.isCompleted\"\r\n >\r\n <span class=\"phase-step-number\">{{ $index + 1 }}</span>\r\n @if (phaseGateShowLabels()) {\r\n <span class=\"phase-step-name\">{{\r\n step.name || t(\"phase\")\r\n }}</span>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"performanceGauge\" &&\r\n dataHandled() &&\r\n !dataHandled()?.noData\r\n ) {\r\n @let gauge = performanceGauge();\r\n <div\r\n class=\"dashboard-performance-gauge\"\r\n [class.is-clickable]=\"hasActions()\"\r\n [style.--dashboard-performance-status-color]=\"gauge.status.color\"\r\n (click)=\"onPerformanceGaugeClick($event)\"\r\n >\r\n <div\r\n class=\"dashboard-performance-gauge__figure\"\r\n [style.width.%]=\"gauge.scalePercent\"\r\n >\r\n <svg\r\n class=\"dashboard-performance-gauge__svg\"\r\n viewBox=\"0 0 100 72\"\r\n role=\"img\"\r\n [attr.aria-label]=\"gauge.label + ' ' + gauge.display\"\r\n >\r\n <path\r\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\r\n fill=\"none\"\r\n stroke=\"#e5e7eb\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n pathLength=\"100\"\r\n ></path>\r\n\r\n @for (segment of performanceGaugeSegments(); track segment.key) {\r\n <path\r\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\r\n fill=\"none\"\r\n [attr.stroke]=\"segment.color\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n pathLength=\"100\"\r\n [attr.stroke-dasharray]=\"segment.dashArray\"\r\n [attr.stroke-dashoffset]=\"segment.dashOffset\"\r\n [style.opacity]=\"segment.opacity\"\r\n ></path>\r\n <text\r\n [attr.x]=\"segment.labelX\"\r\n [attr.y]=\"segment.labelY\"\r\n text-anchor=\"middle\"\r\n dominant-baseline=\"central\"\r\n font-size=\"5.5\"\r\n font-weight=\"700\"\r\n fill=\"#334155\"\r\n >\r\n {{ segment.label }}\r\n </text>\r\n }\r\n\r\n <circle\r\n [attr.cx]=\"gauge.marker.x\"\r\n [attr.cy]=\"gauge.marker.y\"\r\n r=\"4.5\"\r\n fill=\"#fff\"\r\n [attr.stroke]=\"gauge.status.color\"\r\n stroke-width=\"3\"\r\n ></circle>\r\n </svg>\r\n\r\n <div class=\"dashboard-performance-gauge__center\">\r\n <div class=\"dashboard-performance-gauge__value\">\r\n {{ gauge.display }}\r\n </div>\r\n <div class=\"dashboard-performance-gauge__label\">\r\n {{ gauge.label }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"dashboard-performance-gauge__status\"\r\n [title]=\"performanceGaugeStatusName()\"\r\n >\r\n <span class=\"dashboard-performance-gauge__status-dot\"></span>\r\n <span class=\"dashboard-performance-gauge__status-text\">\r\n {{ performanceGaugeStatusName() }}\r\n </span>\r\n </div>\r\n </div>\r\n } @else if (componentViewMode() === \"map\" && dataHandled()) {\r\n <mt-map-view\r\n [dashboardId]=\"dashboardId()\"\r\n [configurationItem]=\"configurationItem()\"\r\n [inGroup]=\"inGroup()\"\r\n [groups]=\"mapGroups()\"\r\n [config]=\"mapViewConfig()\"\r\n [showLegend]=\"mapLegendShow()\"\r\n [legendPosition]=\"mapLegendPosition()\"\r\n [legendIcon]=\"mapLegendIcon()\"\r\n (pointClick)=\"onMapPointClick($event)\"\r\n />\r\n } @else if (dataHandled() && !dataHandled()?.noData) {\r\n <mt-echart\r\n [dashboardId]=\"dashboardId()\"\r\n [chartConfig]=\"dataHandled()\"\r\n [configurationItem]=\"configurationItem()\"\r\n [inGroup]=\"inGroup()\"\r\n (chartClick)=\"onChartClick($event)\"\r\n >\r\n </mt-echart>\r\n } @else if (dataHandled()?.noData) {\r\n <div class=\"no-data-container\">\r\n <i class=\"pi pi-info-circle\"></i>\r\n <span>{{ t(\"noChartData\") }}</span>\r\n </div>\r\n } @else {\r\n <div class=\"loading-container\">\r\n <div class=\"loading-spinner\"></div>\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n</mt-card-content>\r\n", styles: [":host{display:block;height:100%}.chart-container{height:100%;min-height:0}.chart-container.config-mode{min-height:400px}.no-data-container,.needs-config-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:0;color:#999;gap:.5rem;padding:1rem;text-align:center}.no-data-container i,.needs-config-container i{font-size:2rem}.needs-config-container .title{font-weight:600;color:#555;font-size:.95rem}.needs-config-container .hint{font-size:.8rem;max-width:28rem;line-height:1.4}.needs-config-container .configure-btn{margin-top:.5rem;display:inline-flex;align-items:center;gap:.4rem;padding:.4rem .9rem;font-size:.85rem;font-weight:600;color:#fff;background:var(--p-primary-500, #2563eb);border:0;border-radius:.375rem;cursor:pointer;box-shadow:0 1px 2px #0000000d}.needs-config-container .configure-btn:hover{background:var(--p-primary-600, #1d4ed8)}.loading-container{display:flex;align-items:center;justify-content:center;height:100%;min-height:0}.loading-spinner{width:2rem;height:2rem;border:3px solid #f0f0f0;border-top-color:#4caf50;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.splitter-view{display:flex;align-items:stretch;height:100%;gap:.5rem}.splitter-view.splitter-vertical{flex-direction:column}.splitter-view.splitter-vertical .splitter-divider{width:auto;height:1px}.splitter-side{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:1rem;border-radius:.5rem}.splitter-positive{background:#22c55e14}.splitter-negative{background:#ef444414}.splitter-count{font-size:2rem;font-weight:700;margin-bottom:.5rem}.splitter-positive .splitter-count{color:#16a34a}.splitter-negative .splitter-count{color:#dc2626}.splitter-labels{list-style:none;padding:0;margin:0;text-align:center;font-size:.8rem;color:#555}.splitter-labels li{padding:.15rem 0}.splitter-divider{width:1px;background:#00000014}.dashboard-timeline-view{display:flex;flex-direction:column;gap:.625rem;height:100%;min-height:0;overflow:auto}.dashboard-timeline-view[data-legend-position=left],.dashboard-timeline-view[data-legend-position=right]{flex-direction:row;overflow:hidden}.dashboard-timeline-legend{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.35rem .75rem;flex-shrink:0;min-width:0;max-width:100%}.dashboard-timeline-legend[data-position=left],.dashboard-timeline-legend[data-position=right]{max-width:12rem;max-height:100%;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;overflow:auto}.dashboard-timeline-legend-item{display:inline-flex;align-items:center;gap:.25rem;max-width:12rem;padding:0;border:0;border-radius:0;font-size:.75rem;color:#475569;font-weight:500;line-height:1.2;background:transparent}.dashboard-timeline-legend-marker{display:inline-block;width:.625rem;height:.625rem;flex:0 0 auto;border-radius:999px}.dashboard-timeline-legend-marker.shape-rect{border-radius:0}.dashboard-timeline-legend-marker.shape-roundRect{border-radius:.2rem}.dashboard-timeline-legend-marker.shape-diamond{border-radius:.0625rem;transform:rotate(45deg)}.dashboard-timeline-legend-marker.shape-triangle{width:0;height:0;background:transparent!important;border-radius:0;border-left:.34rem solid transparent;border-right:.34rem solid transparent;border-bottom-width:.6rem;border-bottom-style:solid}.dashboard-timeline-legend-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-renderer{display:block;min-height:0;flex:1}.dashboard-timeline-placeholder{display:flex;min-height:260px;flex:1;flex-direction:column;gap:.75rem;padding:1rem}.dashboard-timeline-placeholder div{height:3rem;border-radius:.5rem;background:var(--p-surface-100);animation:dashboard-builder-pulse 1.2s ease-in-out infinite}@keyframes dashboard-builder-pulse{0%,to{opacity:.55}50%{opacity:1}}:host ::ng-deep .dashboard-timeline-renderer>div{margin-top:0}:host ::ng-deep .dashboard-timeline-view mt-timeline-gantt-header .bg-surface-50{background-color:var(--timeline-header-bg, var(--p-surface-50));color:var(--timeline-header-color, inherit)}.dashboard-timeline-column-entity{display:block;min-width:0}.dashboard-timeline-title-cell{display:flex;min-width:0;align-items:center;gap:.5rem;width:100%}.dashboard-timeline-title-toggle{flex:0 0 auto;cursor:pointer;color:#64748b}.dashboard-timeline-title-spacer{display:inline-block;width:1.25rem;flex:0 0 1.25rem}.dashboard-timeline-title-action{min-width:0;flex:1 1 auto;overflow:hidden;border:0;background:transparent;padding:0;color:#334155;cursor:pointer;font-size:.875rem;font-weight:600;text-align:start;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-title-action:hover{color:var(--p-primary-600, #2563eb);text-decoration:underline}.phase-gate-view{height:100%;display:flex;align-items:center;justify-content:safe center;padding:1rem;overflow-x:auto}.phase-steps{display:flex;align-items:center;gap:.75rem;list-style:none;margin:0;padding:0}.phase-step{display:flex;align-items:center;gap:.5rem;padding:.4rem .75rem;border-radius:.375rem;background:#0000000a;font-size:.8rem;color:#555;white-space:nowrap}.phase-step-number{width:1.5rem;height:1.5rem;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;font-weight:700;background:#0000000f;color:#666}.phase-step.is-done{background:#22c55e1a;color:#16a34a}.phase-step.is-done .phase-step-number{background:#16a34a;color:#fff}.phase-step.is-current{background:#2563eb1a;color:#2563eb;font-weight:600}.phase-step.is-current .phase-step-number{background:#2563eb;color:#fff}.phase-gate-view.phase-gate-compact .phase-step{padding:.2rem .45rem;font-size:.7rem;gap:.25rem}.phase-gate-view.phase-gate-compact .phase-step-number{width:1.1rem;height:1.1rem;font-size:.7rem}.dashboard-performance-gauge{display:flex;height:100%;min-height:0;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:.875rem;overflow:hidden;padding:.75rem 1rem 1rem;cursor:default}.dashboard-performance-gauge.is-clickable{cursor:pointer}.dashboard-performance-gauge__figure{position:relative;width:min(100%,28rem);min-width:12rem;max-width:100%;transform-origin:center bottom}.dashboard-performance-gauge__svg{display:block;width:100%;height:auto;overflow:visible}.dashboard-performance-gauge__center{position:absolute;left:50%;top:72%;display:flex;max-width:90%;transform:translate(-50%,-50%);flex-direction:column;align-items:center;gap:.125rem;text-align:center;pointer-events:none}.dashboard-performance-gauge__value{font-size:2.75rem;font-weight:800;line-height:1;color:var(--dashboard-performance-status-color, #334155)}.dashboard-performance-gauge__label{max-width:18rem;overflow:hidden;color:#475569;font-size:.95rem;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.dashboard-performance-gauge__status{display:inline-flex;max-width:min(80%,18rem);align-items:center;justify-content:center;gap:.375rem;border-radius:999px;padding:.25rem .625rem;background:color-mix(in srgb,var(--dashboard-performance-status-color, #64748b) 10%,transparent);color:var(--dashboard-performance-status-color, #475569);font-size:.8125rem;font-weight:700;line-height:1.2}.dashboard-performance-gauge__status-dot{width:.5rem;height:.5rem;flex:0 0 auto;border-radius:999px;background:currentColor}.dashboard-performance-gauge__status-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"] }]
30858
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #timelineLegendList>\r\n <div\r\n class=\"dashboard-timeline-legend\"\r\n [attr.data-position]=\"timelineLegendPosition()\"\r\n >\r\n @for (label of timelineLabels(); track $index) {\r\n <span\r\n class=\"dashboard-timeline-legend-item\"\r\n [title]=\"label.label || label.name || label.key\"\r\n >\r\n <span\r\n class=\"dashboard-timeline-legend-marker\"\r\n [class.shape-rect]=\"label.shape === 'rect'\"\r\n [class.shape-roundRect]=\"label.shape === 'roundRect'\"\r\n [class.shape-diamond]=\"label.shape === 'diamond'\"\r\n [class.shape-triangle]=\"label.shape === 'triangle'\"\r\n [style.background]=\"\r\n label.shape === 'triangle' ? null : label.color || '#64748b'\r\n \"\r\n [style.border-bottom-color]=\"\r\n label.shape === 'triangle' ? label.color || '#64748b' : null\r\n \"\r\n ></span>\r\n <span class=\"dashboard-timeline-legend-label\">\r\n {{ label.label || label.name || label.key }}\r\n </span>\r\n </span>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<mt-card-content\r\n [inGroup]=\"inGroup()\"\r\n [headerConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\r\n \"\r\n [styleConfig]=\"\r\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\r\n \"\r\n [cardStyleConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\r\n \"\r\n [density]=\"configurationItem()?.clientConfig?.configAsType?.['density']\"\r\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\r\n [title]=\"title()\"\r\n [titleEditable]=\"titleEditable()\"\r\n (titleChange)=\"onTitleChange.emit($event)\"\r\n [isNoTopEnd]=\"!showTopEnd()\"\r\n [isChart]=\"true\"\r\n (headerClick)=\"onHeaderClick()\"\r\n>\r\n <ng-container topEnd>\r\n @if (showStaticFilters()) {\r\n <mt-static-filters\r\n [config]=\"staticFilterConfig()\"\r\n [dashboardId]=\"dashboardId()\"\r\n >\r\n </mt-static-filters>\r\n }\r\n @if (showDynamicFilters()) {\r\n <mt-dynamic-filters\r\n [fields]=\"dynamicFilterFields()\"\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [showLabels]=\"false\"\r\n >\r\n </mt-dynamic-filters>\r\n }\r\n @if (showFilter()) {\r\n <mt-card-filter [config]=\"filterConfig()\" [dashboardId]=\"dashboardId()\">\r\n </mt-card-filter>\r\n }\r\n @if (cardInfoConfig()?.show && cardInfoConfig()?.value) {\r\n <mt-card-info [cardInfo]=\"cardInfoConfig()\"></mt-card-info>\r\n }\r\n </ng-container>\r\n\r\n <ng-container body>\r\n <div\r\n class=\"chart-container\"\r\n [class.config-mode]=\"isConfigMode()\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n >\r\n @if (componentViewMode() === \"splitter\" && hasSplitterData()) {\r\n <div\r\n class=\"splitter-view\"\r\n [class.splitter-vertical]=\"splitterOrientation() === 'vertical'\"\r\n [style.gap.px]=\"splitterGap()\"\r\n >\r\n <div class=\"splitter-side splitter-positive\">\r\n <div class=\"splitter-count\">\r\n {{ dataHandled()?.positive?.groupedValue ?? 0 }}\r\n </div>\r\n <ul class=\"splitter-labels\">\r\n @for (\r\n label of dataHandled()?.positive?.labels || [];\r\n track $index\r\n ) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n </div>\r\n <div class=\"splitter-divider\"></div>\r\n <div class=\"splitter-side splitter-negative\">\r\n <div class=\"splitter-count\">\r\n {{ dataHandled()?.negative?.groupedValue ?? 0 }}\r\n </div>\r\n <ul class=\"splitter-labels\">\r\n @for (\r\n label of dataHandled()?.negative?.labels || [];\r\n track $index\r\n ) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n </div>\r\n </div>\r\n } @else if (componentViewMode() === \"timeline\" && hasTimelineData()) {\r\n <div\r\n class=\"dashboard-timeline-view\"\r\n [attr.data-legend-position]=\"timelineLegendPosition()\"\r\n [style.--timeline-header-bg]=\"timelineHeaderBgColor()\"\r\n [style.--timeline-header-color]=\"timelineHeaderTextColor()\"\r\n >\r\n @if (\r\n timelineLegendShow() &&\r\n timelineLabels().length &&\r\n (timelineLegendPosition() === \"top\" ||\r\n timelineLegendPosition() === \"left\")\r\n ) {\r\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\r\n }\r\n\r\n @defer (on viewport) {\r\n <mt-timeline\r\n class=\"dashboard-timeline-renderer\"\r\n [showHeader]=\"false\"\r\n [showZoomToFitControl]=\"false\"\r\n [scrollToToday]=\"true\"\r\n [timelineMode]=\"timelineMode()\"\r\n (timelineModeChange)=\"timelineMode.set($event)\"\r\n [ganttData]=\"timelineResources()\"\r\n [ganttMapping]=\"timelineGanttMapping\"\r\n [columns]=\"timelineColumns()\"\r\n [defaultVisibleColumns]=\"2\"\r\n [columnsPaneMinWidthPx]=\"220\"\r\n [columnsPaneMaxWidthPx]=\"520\"\r\n [enableVirtualScroll]=\"true\"\r\n [virtualScrollThreshold]=\"0\"\r\n [virtualScrollBodyHeightPx]=\"520\"\r\n [showGanttDetailsPopup]=\"true\"\r\n [emptyMessage]=\"t('noChartData')\"\r\n >\r\n <ng-template\r\n mtTimelineColumn=\"title\"\r\n let-item=\"item\"\r\n let-resolved=\"resolved\"\r\n let-canToggle=\"canToggle\"\r\n let-isCollapsed=\"isCollapsed\"\r\n let-toggle=\"toggle\"\r\n >\r\n <div\r\n class=\"dashboard-timeline-title-cell\"\r\n [style.padding-inline-start.px]=\"\r\n $any(resolved).levelDepth * 16\r\n \"\r\n >\r\n @if (canToggle) {\r\n <mt-icon\r\n class=\"dashboard-timeline-title-toggle\"\r\n [icon]=\"timelineCollapseIcon(isCollapsed)\"\r\n (click)=\"$event.stopPropagation(); toggle()\"\r\n ></mt-icon>\r\n } @else {\r\n <span class=\"dashboard-timeline-title-spacer\"></span>\r\n }\r\n\r\n <button\r\n type=\"button\"\r\n class=\"dashboard-timeline-title-action\"\r\n [title]=\"$any(resolved).title\"\r\n (click)=\"onTimelineTitleClick(item, $event)\"\r\n >\r\n {{ $any(resolved).title }}\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n @for (column of timelineEntityColumns(); track column.key) {\r\n <ng-template [mtTimelineColumn]=\"column.key\" let-value=\"value\">\r\n <mt-entity-preview\r\n class=\"dashboard-timeline-column-entity\"\r\n [data]=\"timelineColumnEntityData(value)\"\r\n attachmentShape=\"compact\"\r\n ></mt-entity-preview>\r\n </ng-template>\r\n }\r\n\r\n <ng-template mtTimelinePopover let-item=\"item\">\r\n @if (timelinePopoverEntities(item); as entities) {\r\n @if (entities.length) {\r\n <div\r\n class=\"w-[27rem] max-w-[90vw] max-h-[24rem] overflow-auto p-2\"\r\n >\r\n <mt-entities-preview\r\n [entities]=\"entities\"\r\n [stackOnNarrow]=\"false\"\r\n />\r\n </div>\r\n }\r\n }\r\n </ng-template>\r\n </mt-timeline>\r\n } @placeholder {\r\n <div class=\"dashboard-timeline-placeholder\" aria-hidden=\"true\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n }\r\n\r\n @if (\r\n timelineLegendShow() &&\r\n timelineLabels().length &&\r\n (timelineLegendPosition() === \"bottom\" ||\r\n timelineLegendPosition() === \"right\")\r\n ) {\r\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\r\n }\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"phaseGateStepper\" && phaseGateRecordCount() > 1\r\n ) {\r\n <div class=\"no-data-container\">\r\n <i class=\"pi pi-info-circle\"></i>\r\n <span>{{\r\n t(\"phaseGateStepperMultipleRecords\", {\r\n count: phaseGateRecordCount(),\r\n })\r\n }}</span>\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"phaseGateStepper\" && hasPhaseGateData()\r\n ) {\r\n <div\r\n class=\"phase-gate-view\"\r\n [class.phase-gate-compact]=\"phaseGateCompact()\"\r\n >\r\n <ol class=\"phase-steps\">\r\n @for (step of phaseGateSteps(); track $index) {\r\n <li\r\n class=\"phase-step\"\r\n [class.is-current]=\"step.isCurrent\"\r\n [class.is-done]=\"step.isCompleted\"\r\n >\r\n <span class=\"phase-step-number\">{{ $index + 1 }}</span>\r\n @if (phaseGateShowLabels()) {\r\n <span class=\"phase-step-name\">{{\r\n step.name || t(\"phase\")\r\n }}</span>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"performanceGauge\" &&\r\n dataHandled() &&\r\n !dataHandled()?.noData\r\n ) {\r\n @let gauge = performanceGauge();\r\n <div\r\n class=\"dashboard-performance-gauge\"\r\n [class.is-clickable]=\"hasActions()\"\r\n [style.--dashboard-performance-status-color]=\"gauge.status.color\"\r\n (click)=\"onPerformanceGaugeClick($event)\"\r\n >\r\n <div\r\n class=\"dashboard-performance-gauge__figure\"\r\n [style.width.%]=\"gauge.scalePercent\"\r\n >\r\n <svg\r\n class=\"dashboard-performance-gauge__svg\"\r\n viewBox=\"0 0 100 72\"\r\n role=\"img\"\r\n [attr.aria-label]=\"gauge.label + ' ' + gauge.display\"\r\n >\r\n <path\r\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\r\n fill=\"none\"\r\n stroke=\"#e5e7eb\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n pathLength=\"100\"\r\n ></path>\r\n\r\n @for (segment of performanceGaugeSegments(); track segment.key) {\r\n <path\r\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\r\n fill=\"none\"\r\n [attr.stroke]=\"segment.color\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n pathLength=\"100\"\r\n [attr.stroke-dasharray]=\"segment.dashArray\"\r\n [attr.stroke-dashoffset]=\"segment.dashOffset\"\r\n [style.opacity]=\"segment.opacity\"\r\n ></path>\r\n <text\r\n [attr.x]=\"segment.labelX\"\r\n [attr.y]=\"segment.labelY\"\r\n text-anchor=\"middle\"\r\n dominant-baseline=\"central\"\r\n font-size=\"5.5\"\r\n font-weight=\"700\"\r\n fill=\"#334155\"\r\n >\r\n {{ segment.label }}\r\n </text>\r\n }\r\n\r\n <circle\r\n [attr.cx]=\"gauge.marker.x\"\r\n [attr.cy]=\"gauge.marker.y\"\r\n r=\"4.5\"\r\n fill=\"#fff\"\r\n [attr.stroke]=\"gauge.status.color\"\r\n stroke-width=\"3\"\r\n ></circle>\r\n </svg>\r\n\r\n <div class=\"dashboard-performance-gauge__center\">\r\n <div class=\"dashboard-performance-gauge__value\">\r\n {{ gauge.display }}\r\n </div>\r\n <div class=\"dashboard-performance-gauge__label\">\r\n {{ gauge.label }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"dashboard-performance-gauge__status\"\r\n [title]=\"performanceGaugeStatusName()\"\r\n >\r\n <span class=\"dashboard-performance-gauge__status-dot\"></span>\r\n <span class=\"dashboard-performance-gauge__status-text\">\r\n {{ performanceGaugeStatusName() }}\r\n </span>\r\n </div>\r\n </div>\r\n } @else if (componentViewMode() === \"map\" && dataHandled()) {\r\n <mt-map-view\r\n [dashboardId]=\"dashboardId()\"\r\n [configurationItem]=\"configurationItem()\"\r\n [inGroup]=\"inGroup()\"\r\n [groups]=\"mapGroups()\"\r\n [config]=\"mapViewConfig()\"\r\n [showLegend]=\"mapLegendShow()\"\r\n [legendPosition]=\"mapLegendPosition()\"\r\n [legendIcon]=\"mapLegendIcon()\"\r\n (pointClick)=\"onMapPointClick($event)\"\r\n (pointDblClick)=\"onMapPointDblClick($event)\"\r\n />\r\n } @else if (dataHandled() && !dataHandled()?.noData) {\r\n <mt-echart\r\n [dashboardId]=\"dashboardId()\"\r\n [chartConfig]=\"dataHandled()\"\r\n [configurationItem]=\"configurationItem()\"\r\n [inGroup]=\"inGroup()\"\r\n (chartClick)=\"onChartClick($event)\"\r\n (chartDblClick)=\"onChartDblClick($event)\"\r\n >\r\n </mt-echart>\r\n } @else if (dataHandled()?.noData) {\r\n <div class=\"no-data-container\">\r\n <i class=\"pi pi-info-circle\"></i>\r\n <span>{{ t(\"noChartData\") }}</span>\r\n </div>\r\n } @else {\r\n <div class=\"loading-container\">\r\n <div class=\"loading-spinner\"></div>\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n</mt-card-content>\r\n", styles: [":host{display:block;height:100%}.chart-container{height:100%;min-height:0}.chart-container.config-mode{min-height:400px}.no-data-container,.needs-config-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:0;color:#999;gap:.5rem;padding:1rem;text-align:center}.no-data-container i,.needs-config-container i{font-size:2rem}.needs-config-container .title{font-weight:600;color:#555;font-size:.95rem}.needs-config-container .hint{font-size:.8rem;max-width:28rem;line-height:1.4}.needs-config-container .configure-btn{margin-top:.5rem;display:inline-flex;align-items:center;gap:.4rem;padding:.4rem .9rem;font-size:.85rem;font-weight:600;color:#fff;background:var(--p-primary-500, #2563eb);border:0;border-radius:.375rem;cursor:pointer;box-shadow:0 1px 2px #0000000d}.needs-config-container .configure-btn:hover{background:var(--p-primary-600, #1d4ed8)}.loading-container{display:flex;align-items:center;justify-content:center;height:100%;min-height:0}.loading-spinner{width:2rem;height:2rem;border:3px solid #f0f0f0;border-top-color:#4caf50;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.splitter-view{display:flex;align-items:stretch;height:100%;gap:.5rem}.splitter-view.splitter-vertical{flex-direction:column}.splitter-view.splitter-vertical .splitter-divider{width:auto;height:1px}.splitter-side{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:1rem;border-radius:.5rem}.splitter-positive{background:#22c55e14}.splitter-negative{background:#ef444414}.splitter-count{font-size:2rem;font-weight:700;margin-bottom:.5rem}.splitter-positive .splitter-count{color:#16a34a}.splitter-negative .splitter-count{color:#dc2626}.splitter-labels{list-style:none;padding:0;margin:0;text-align:center;font-size:.8rem;color:#555}.splitter-labels li{padding:.15rem 0}.splitter-divider{width:1px;background:#00000014}.dashboard-timeline-view{display:flex;flex-direction:column;gap:.625rem;height:100%;min-height:0;overflow:auto}.dashboard-timeline-view[data-legend-position=left],.dashboard-timeline-view[data-legend-position=right]{flex-direction:row;overflow:hidden}.dashboard-timeline-legend{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.35rem .75rem;flex-shrink:0;min-width:0;max-width:100%}.dashboard-timeline-legend[data-position=left],.dashboard-timeline-legend[data-position=right]{max-width:12rem;max-height:100%;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;overflow:auto}.dashboard-timeline-legend-item{display:inline-flex;align-items:center;gap:.25rem;max-width:12rem;padding:0;border:0;border-radius:0;font-size:.75rem;color:#475569;font-weight:500;line-height:1.2;background:transparent}.dashboard-timeline-legend-marker{display:inline-block;width:.625rem;height:.625rem;flex:0 0 auto;border-radius:999px}.dashboard-timeline-legend-marker.shape-rect{border-radius:0}.dashboard-timeline-legend-marker.shape-roundRect{border-radius:.2rem}.dashboard-timeline-legend-marker.shape-diamond{border-radius:.0625rem;transform:rotate(45deg)}.dashboard-timeline-legend-marker.shape-triangle{width:0;height:0;background:transparent!important;border-radius:0;border-left:.34rem solid transparent;border-right:.34rem solid transparent;border-bottom-width:.6rem;border-bottom-style:solid}.dashboard-timeline-legend-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-renderer{display:block;min-height:0;flex:1}.dashboard-timeline-placeholder{display:flex;min-height:260px;flex:1;flex-direction:column;gap:.75rem;padding:1rem}.dashboard-timeline-placeholder div{height:3rem;border-radius:.5rem;background:var(--p-surface-100);animation:dashboard-builder-pulse 1.2s ease-in-out infinite}@keyframes dashboard-builder-pulse{0%,to{opacity:.55}50%{opacity:1}}:host ::ng-deep .dashboard-timeline-renderer>div{margin-top:0}:host ::ng-deep .dashboard-timeline-view mt-timeline-gantt-header .bg-surface-50{background-color:var(--timeline-header-bg, var(--p-surface-50));color:var(--timeline-header-color, inherit)}.dashboard-timeline-column-entity{display:block;min-width:0}.dashboard-timeline-title-cell{display:flex;min-width:0;align-items:center;gap:.5rem;width:100%}.dashboard-timeline-title-toggle{flex:0 0 auto;cursor:pointer;color:#64748b}.dashboard-timeline-title-spacer{display:inline-block;width:1.25rem;flex:0 0 1.25rem}.dashboard-timeline-title-action{min-width:0;flex:1 1 auto;overflow:hidden;border:0;background:transparent;padding:0;color:#334155;cursor:pointer;font-size:.875rem;font-weight:600;text-align:start;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-title-action:hover{color:var(--p-primary-600, #2563eb);text-decoration:underline}.phase-gate-view{height:100%;display:flex;align-items:center;justify-content:safe center;padding:1rem;overflow-x:auto}.phase-steps{display:flex;align-items:center;gap:.75rem;list-style:none;margin:0;padding:0}.phase-step{display:flex;align-items:center;gap:.5rem;padding:.4rem .75rem;border-radius:.375rem;background:#0000000a;font-size:.8rem;color:#555;white-space:nowrap}.phase-step-number{width:1.5rem;height:1.5rem;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;font-weight:700;background:#0000000f;color:#666}.phase-step.is-done{background:#22c55e1a;color:#16a34a}.phase-step.is-done .phase-step-number{background:#16a34a;color:#fff}.phase-step.is-current{background:#2563eb1a;color:#2563eb;font-weight:600}.phase-step.is-current .phase-step-number{background:#2563eb;color:#fff}.phase-gate-view.phase-gate-compact .phase-step{padding:.2rem .45rem;font-size:.7rem;gap:.25rem}.phase-gate-view.phase-gate-compact .phase-step-number{width:1.1rem;height:1.1rem;font-size:.7rem}.dashboard-performance-gauge{display:flex;height:100%;min-height:0;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:.875rem;overflow:hidden;padding:.75rem 1rem 1rem;cursor:default}.dashboard-performance-gauge.is-clickable{cursor:pointer}.dashboard-performance-gauge__figure{position:relative;width:min(100%,28rem);min-width:12rem;max-width:100%;transform-origin:center bottom}.dashboard-performance-gauge__svg{display:block;width:100%;height:auto;overflow:visible}.dashboard-performance-gauge__center{position:absolute;left:50%;top:72%;display:flex;max-width:90%;transform:translate(-50%,-50%);flex-direction:column;align-items:center;gap:.125rem;text-align:center;pointer-events:none}.dashboard-performance-gauge__value{font-size:2.75rem;font-weight:800;line-height:1;color:var(--dashboard-performance-status-color, #334155)}.dashboard-performance-gauge__label{max-width:18rem;overflow:hidden;color:#475569;font-size:.95rem;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.dashboard-performance-gauge__status{display:inline-flex;max-width:min(80%,18rem);align-items:center;justify-content:center;gap:.375rem;border-radius:999px;padding:.25rem .625rem;background:color-mix(in srgb,var(--dashboard-performance-status-color, #64748b) 10%,transparent);color:var(--dashboard-performance-status-color, #475569);font-size:.8125rem;font-weight:700;line-height:1.2}.dashboard-performance-gauge__status-dot{width:.5rem;height:.5rem;flex:0 0 auto;border-radius:999px;background:currentColor}.dashboard-performance-gauge__status-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"] }]
30613
30859
  }], ctorParameters: null, propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }], reportId: [{ type: i0.Input, args: [{ isSignal: true, alias: "reportId", required: false }] }], inGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "inGroup", required: false }] }], isConfigMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "isConfigMode", required: false }] }], titleEditable: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleEditable", required: false }] }], onAction: [{ type: i0.Output, args: ["onAction"] }], onConfigure: [{ type: i0.Output, args: ["onConfigure"] }], onTitleChange: [{ type: i0.Output, args: ["onTitleChange"] }] } }) });
30614
30860
 
30615
30861
  /**
@@ -30937,6 +31183,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
30937
31183
  args: [{ selector: 'mt-entity-info', standalone: true, imports: [CommonModule, TranslocoDirective, DecimalPipe, SecureImagePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"entity-info-wrapper w-full\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n @switch (viewTypeLower()) {\r\n <!-- Text Types -->\r\n @case (\"text\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"float\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"longtext\") {\r\n <ng-container *ngTemplateOutlet=\"longTextTemplate\"></ng-container>\r\n }\r\n @case (\"title\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"phasegate\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Number -->\r\n @case (\"number\") {\r\n <ng-container *ngTemplateOutlet=\"numberTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Date Types -->\r\n @case (\"date\") {\r\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\r\n }\r\n @case (\"datetime\") {\r\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Currency -->\r\n @case (\"currency\") {\r\n <ng-container *ngTemplateOutlet=\"currencyTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Time -->\r\n @case (\"time\") {\r\n <ng-container *ngTemplateOutlet=\"timeTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Lookup -->\r\n @case (\"lookup\") {\r\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Lookup Matrix (same value shape as lookup: key/display/color) -->\r\n @case (\"lookupmatrix\") {\r\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Checkbox -->\r\n @case (\"checkbox\") {\r\n <ng-container *ngTemplateOutlet=\"checkboxTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Status -->\r\n @case (\"status\") {\r\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\r\n }\r\n @case (\"request_status\") {\r\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Percentage -->\r\n @case (\"percentage\") {\r\n <ng-container *ngTemplateOutlet=\"percentageTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Slider -->\r\n @case (\"slider\") {\r\n <ng-container *ngTemplateOutlet=\"sliderTemplate\"></ng-container>\r\n }\r\n\r\n <!-- User -->\r\n @case (\"user\") {\r\n <ng-container *ngTemplateOutlet=\"userTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Multi-select lookup -->\r\n @case (\"lookupmultiselect\") {\r\n <ng-container\r\n *ngTemplateOutlet=\"lookupMultiselectTemplate\"\r\n ></ng-container>\r\n }\r\n\r\n <!-- Multi user -->\r\n @case (\"multiuser\") {\r\n <ng-container *ngTemplateOutlet=\"multiUserTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Dynamic List -->\r\n @case (\"dynamiclist\") {\r\n <ng-container *ngTemplateOutlet=\"dynamicListTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Location -->\r\n @case (\"location\") {\r\n <ng-container *ngTemplateOutlet=\"locationTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Default: treat as text -->\r\n @default {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n }\r\n</div>\r\n\r\n<!-- Text Template -->\r\n<ng-template #textTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div\r\n class=\"font-semibold\"\r\n [class.text-ellipsis]=\"limitWords()\"\r\n [class.overflow-hidden]=\"limitWords()\"\r\n [class.whitespace-nowrap]=\"limitWords()\"\r\n [style.max-width]=\"limitWords() ? '200px' : 'auto'\"\r\n [title]=\"textValue()\"\r\n >\r\n {{ textValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Long Text Template: the value is rich-text HTML, so render it as markup\r\n (Angular sanitizes [innerHTML]) instead of printing the tags. -->\r\n<ng-template #longTextTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (longTextTooltip()) {\r\n <div\r\n class=\"entity-long-text font-semibold break-words\"\r\n [class.entity-long-text-clamped]=\"displayType() === 'inTable'\"\r\n [title]=\"longTextTooltip()\"\r\n [innerHTML]=\"longTextHtml()\"\r\n ></div>\r\n } @else {\r\n <div class=\"font-semibold\">__</div>\r\n }\r\n</ng-template>\r\n\r\n<!-- Number Template -->\r\n<ng-template #numberTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ numericValue() !== null ? (numericValue() | number) : \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Date Template -->\r\n<ng-template #dateTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ dateDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Currency Template -->\r\n<ng-template #currencyTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ currencyDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Time Template -->\r\n<ng-template #timeTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ timeDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Lookup Template -->\r\n<ng-template #lookupTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (lookupName()) {\r\n <span class=\"flex items-center gap-1\" [style.color]=\"lookupColor()\">\r\n @if (displayType() === \"entity\" && lookupColor()) {\r\n <span\r\n class=\"w-2 h-2 rounded-full inline-block\"\r\n [style.backgroundColor]=\"lookupColor()\"\r\n ></span>\r\n }\r\n {{ lookupName() }}\r\n </span>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Checkbox Template -->\r\n<ng-template #checkboxTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center\">\r\n <i\r\n [class]=\"\r\n checkboxValue()\r\n ? 'pi pi-check-square text-primary'\r\n : 'pi pi-stop text-muted-color'\r\n \"\r\n ></i>\r\n <span class=\"ml-2\">{{ checkboxLabel() }}</span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Status Template -->\r\n<ng-template #statusTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (statusColor()) {\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\r\n [style.backgroundColor]=\"statusColor()\"\r\n ></span>\r\n }\r\n <span [style.color]=\"statusColor()\">\r\n {{ statusName() || \"__\" }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Percentage Template -->\r\n<ng-template #percentageTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (\r\n displayType() !== \"inTable\" ||\r\n extraInfoData()?.showPercentageAsProgressBar\r\n ) {\r\n <div\r\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-24\"\r\n >\r\n <div\r\n class=\"h-full rounded-full transition-all\"\r\n [style.width.%]=\"percentageValue() || 0\"\r\n [style.backgroundColor]=\"percentageColor() || 'var(--primary-color)'\"\r\n ></div>\r\n </div>\r\n }\r\n @if (\r\n extraInfoData()?.showPercentageStatus &&\r\n !extraInfoData()?.showPercentageAsProgressBar\r\n ) {\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full\"\r\n [style.backgroundColor]=\"percentageColor() || '#000'\"\r\n ></span>\r\n }\r\n <span [style.color]=\"percentageColor()\">\r\n {{\r\n percentageValue() !== null\r\n ? (percentageValue() | number: \"1.0-0\") + \"%\"\r\n : \"__\"\r\n }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Slider Template -->\r\n<ng-template #sliderTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n <div\r\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-32\"\r\n >\r\n <div\r\n class=\"h-full bg-primary rounded-full transition-all\"\r\n [style.width.%]=\"sliderValue() || 0\"\r\n ></div>\r\n </div>\r\n <span class=\"text-sm\">{{ sliderValue() || 0 }}%</span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- User Template -->\r\n<ng-template #userTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (userData()) {\r\n <div class=\"flex items-center gap-2\">\r\n @if (userPhoto()) {\r\n <img\r\n [src]=\"userPhoto() | secureImage: true : httpContext : 'avatar/'\"\r\n alt=\"User avatar\"\r\n class=\"w-8 h-8 rounded-full object-cover\"\r\n />\r\n } @else {\r\n <div\r\n class=\"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center text-primary font-semibold text-sm\"\r\n >\r\n {{ userInitials() }}\r\n </div>\r\n }\r\n <span class=\"font-medium\">{{ userName() }}</span>\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Lookup Multiselect Template -->\r\n<ng-template #lookupMultiselectTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (multiselectValues()?.length) {\r\n <div class=\"flex flex-wrap gap-1\">\r\n @for (item of multiselectValues(); track item.key || $index) {\r\n <!-- A lookup value is { key, display, color } \u2014 `details.color` alone\r\n left every chip on the grey fallback. Same order as lookupColor(). -->\r\n <span\r\n class=\"px-2 py-0.5 rounded-full text-xs font-medium\"\r\n [style.backgroundColor]=\"\r\n (item.details?.color || item.color || '#6b7280') + '20'\r\n \"\r\n [style.color]=\"item.details?.color || item.color || '#6b7280'\"\r\n >\r\n {{ item.name || item.display || item.key || item }}\r\n </span>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Multi User Template -->\r\n<ng-template #multiUserTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (multiUserValues()?.length) {\r\n <div class=\"flex items-center -space-x-2\">\r\n @for (user of multiUserValues().slice(0, 5); track user.id || $index) {\r\n @if (getUserPhoto(user); as userPhoto) {\r\n <img\r\n [src]=\"userPhoto | secureImage: true : httpContext : 'avatar/'\"\r\n [alt]=\"user.name || user.displayName\"\r\n class=\"w-7 h-7 rounded-full border-2 border-white object-cover\"\r\n />\r\n } @else {\r\n <div\r\n class=\"w-7 h-7 rounded-full border-2 border-white bg-primary/20 flex items-center justify-center text-primary font-semibold text-xs\"\r\n >\r\n {{ getInitials(user.name || user.displayName) }}\r\n </div>\r\n }\r\n }\r\n @if (multiUserValues().length > 5) {\r\n <div\r\n class=\"w-7 h-7 rounded-full border-2 border-white bg-surface-300 flex items-center justify-center text-xs font-medium\"\r\n >\r\n +{{ multiUserValues().length - 5 }}\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Dynamic List Template -->\r\n<ng-template #dynamicListTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (dynamicListValues()?.length) {\r\n <div class=\"flex flex-col gap-1\">\r\n @for (item of dynamicListValues(); track $index) {\r\n <div class=\"text-sm\">\r\n {{ item?.label || item?.name || item }}\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Location Template -->\r\n<ng-template #locationTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ locationDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n", styles: [":host{display:block}.text-ellipsis{text-overflow:ellipsis}.entity-long-text ::ng-deep :is(p,ul,ol,h1,h2,h3,h4,h5,h6){margin:0}.entity-long-text-clamped{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.entity-long-text-clamped ::ng-deep :is(p,div,li,h1,h2,h3,h4,h5,h6){display:inline}.entity-long-text-clamped ::ng-deep :is(p,div,li,h1,h2,h3,h4,h5,h6):after{content:\" \"}\n"] }]
30938
31184
  }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], displayType: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayType", required: false }] }], extraInfoData: [{ type: i0.Input, args: [{ isSignal: true, alias: "extraInfoData", required: false }] }], limitWords: [{ type: i0.Input, args: [{ isSignal: true, alias: "limitWords", required: false }] }], customClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "customClass", required: false }] }] } });
30939
31185
 
31186
+ /** A group row of a dashboard table: the group's entity value and the server's aggregates. */
31187
+ class TableCardGroupValue {
31188
+ params = input.required(...(ngDevMode ? [{ debugName: "params" }] : /* istanbul ignore next */ []));
31189
+ first = computed(() => this.params().node.allLeafChildren?.[0]?.data, ...(ngDevMode ? [{ debugName: "first" }] : /* istanbul ignore next */ []));
31190
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TableCardGroupValue, deps: [], target: i0.ɵɵFactoryTarget.Component });
31191
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: TableCardGroupValue, isStandalone: true, selector: "mt-table-card-group-value", inputs: { params: { classPropertyName: "params", publicName: "params", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@if (first(); as row) {\n <span class=\"inline-flex flex-wrap items-center gap-x-4 gap-y-1\">\n <mt-entity-info\n [data]=\"{\n viewType: row.__mtgroup?.viewType,\n value: row.__mtgroup?.value,\n }\"\n displayType=\"inTable\"\n />\n @if (row.__mtaggregates) {\n <span class=\"text-xs font-medium whitespace-pre-wrap\">{{\n row.__mtaggregates\n }}</span>\n }\n </span>\n}\n", dependencies: [{ kind: "component", type: EntityInfoComponent, selector: "mt-entity-info", inputs: ["data", "displayType", "extraInfoData", "limitWords", "customClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
31192
+ }
31193
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TableCardGroupValue, decorators: [{
31194
+ type: Component,
31195
+ args: [{ selector: 'mt-table-card-group-value', imports: [EntityInfoComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (first(); as row) {\n <span class=\"inline-flex flex-wrap items-center gap-x-4 gap-y-1\">\n <mt-entity-info\n [data]=\"{\n viewType: row.__mtgroup?.viewType,\n value: row.__mtgroup?.value,\n }\"\n displayType=\"inTable\"\n />\n @if (row.__mtaggregates) {\n <span class=\"text-xs font-medium whitespace-pre-wrap\">{{\n row.__mtaggregates\n }}</span>\n }\n </span>\n}\n" }]
31196
+ }], propDecorators: { params: [{ type: i0.Input, args: [{ isSignal: true, alias: "params", required: true }] }] } });
31197
+
30940
31198
  /**
30941
31199
  * Table Card Component
30942
31200
  *
@@ -31103,8 +31361,6 @@ function getEntityColor(value) {
31103
31361
  '');
31104
31362
  }
31105
31363
  class TableCardComponent {
31106
- virtualRowHeightPx = 48;
31107
- virtualOverscanRows = 8;
31108
31364
  storeService = inject(DashboardItemStoreService);
31109
31365
  transloco = inject(TranslocoService);
31110
31366
  subscription = new Subscription();
@@ -31192,10 +31448,6 @@ class TableCardComponent {
31192
31448
  })
31193
31449
  .join(' ');
31194
31450
  }
31195
- /** Virtual scroll offset for the native dashboard table renderer. */
31196
- tableScrollTop = signal(0, ...(ngDevMode ? [{ debugName: "tableScrollTop" }] : /* istanbul ignore next */ []));
31197
- /** Current table viewport height. Defaults to the timeline/card body size. */
31198
- tableViewportHeight = signal(520, ...(ngDevMode ? [{ debugName: "tableViewportHeight" }] : /* istanbul ignore next */ []));
31199
31451
  /** Title */
31200
31452
  title = computed(() => {
31201
31453
  const config = this.configurationItem();
@@ -31241,12 +31493,6 @@ class TableCardComponent {
31241
31493
  }
31242
31494
  });
31243
31495
  }, ...(ngDevMode ? [{ debugName: "_sortConfigSync" }] : /* istanbul ignore next */ []));
31244
- /**
31245
- * Hide the table's column-header (subheader) row.
31246
- * Reads `clientConfig.tableFormat.hideTableSubheader`. Gated: defaults to
31247
- * showing the header (current behavior) unless the flag is explicitly true.
31248
- */
31249
- hideSubheader = computed(() => this.tableStyleConfig()?.hideTableSubheader === true, ...(ngDevMode ? [{ debugName: "hideSubheader" }] : /* istanbul ignore next */ []));
31250
31496
  /**
31251
31497
  * Whether to skip currency formatting on cells.
31252
31498
  * Reads `clientConfig.tableFormat.disableCurrencyFormat`. Gated: only true
@@ -31307,71 +31553,105 @@ class TableCardComponent {
31307
31553
  !hiddenCols.includes(col.key?.toLowerCase()) &&
31308
31554
  !hiddenCols.includes(col.keyPure?.toLowerCase() || ''));
31309
31555
  }, ...(ngDevMode ? [{ debugName: "visibleColumns" }] : /* istanbul ignore next */ []));
31310
- /** Total columns (for colspan) */
31311
- totalColumns = computed(() => {
31312
- const base = this.visibleColumns().length;
31313
- const hasIndex = !this.tableStyleConfig()?.hideIndex && this.showIndex();
31314
- return hasIndex ? base + 1 : base;
31315
- }, ...(ngDevMode ? [{ debugName: "totalColumns" }] : /* istanbul ignore next */ []));
31316
- flatVirtualWindow = computed(() => this.resolveVirtualWindow(this.tableRows().length), ...(ngDevMode ? [{ debugName: "flatVirtualWindow" }] : /* istanbul ignore next */ []));
31317
- visibleTableRows = computed(() => {
31318
- const rows = this.tableRows();
31319
- const { startIndex, endIndex } = this.flatVirtualWindow();
31320
- return rows.slice(startIndex, endIndex).map((row, index) => {
31321
- const rowIndex = startIndex + index;
31322
- return {
31323
- trackId: this.resolveRowTrackId(row, rowIndex),
31324
- row,
31325
- rowIndex,
31326
- };
31327
- });
31328
- }, ...(ngDevMode ? [{ debugName: "visibleTableRows" }] : /* istanbul ignore next */ []));
31329
- flatVirtualTopSpacerHeightPx = computed(() => this.flatVirtualWindow().startIndex * this.virtualRowHeightPx, ...(ngDevMode ? [{ debugName: "flatVirtualTopSpacerHeightPx" }] : /* istanbul ignore next */ []));
31330
- flatVirtualBottomSpacerHeightPx = computed(() => {
31331
- const { endIndex } = this.flatVirtualWindow();
31332
- return Math.max(0, (this.tableRows().length - endIndex) * this.virtualRowHeightPx);
31333
- }, ...(ngDevMode ? [{ debugName: "flatVirtualBottomSpacerHeightPx" }] : /* istanbul ignore next */ []));
31334
- flattenedGroupedRows = computed(() => {
31335
- const items = [];
31336
- this.groupedData().forEach((group, groupIndex) => {
31337
- const rows = Array.isArray(group?.data) ? group.data : [];
31338
- if (!rows.length)
31339
- return;
31340
- items.push({
31341
- kind: 'group',
31342
- trackId: `group-${groupIndex}-${this.resolveGroupTrackId(group)}`,
31343
- group,
31344
- groupIndex,
31345
- });
31346
- rows.forEach((row, rowIndex) => {
31347
- items.push({
31348
- kind: 'row',
31349
- trackId: `row-${groupIndex}-${this.resolveRowTrackId(row, rowIndex)}`,
31350
- group,
31351
- groupIndex,
31352
- row,
31353
- rowIndex,
31354
- });
31355
- });
31356
- });
31357
- return items;
31358
- }, ...(ngDevMode ? [{ debugName: "flattenedGroupedRows" }] : /* istanbul ignore next */ []));
31359
- groupedVirtualWindow = computed(() => this.resolveVirtualWindow(this.flattenedGroupedRows().length), ...(ngDevMode ? [{ debugName: "groupedVirtualWindow" }] : /* istanbul ignore next */ []));
31360
- visibleGroupedRows = computed(() => {
31361
- const rows = this.flattenedGroupedRows();
31362
- const { startIndex, endIndex } = this.groupedVirtualWindow();
31363
- return rows.slice(startIndex, endIndex);
31364
- }, ...(ngDevMode ? [{ debugName: "visibleGroupedRows" }] : /* istanbul ignore next */ []));
31365
- groupedVirtualTopSpacerHeightPx = computed(() => this.groupedVirtualWindow().startIndex * this.virtualRowHeightPx, ...(ngDevMode ? [{ debugName: "groupedVirtualTopSpacerHeightPx" }] : /* istanbul ignore next */ []));
31366
- groupedVirtualBottomSpacerHeightPx = computed(() => {
31367
- const { endIndex } = this.groupedVirtualWindow();
31368
- return Math.max(0, (this.flattenedGroupedRows().length - endIndex) * this.virtualRowHeightPx);
31369
- }, ...(ngDevMode ? [{ debugName: "groupedVirtualBottomSpacerHeightPx" }] : /* istanbul ignore next */ []));
31370
31556
  /** Row clickable */
31371
31557
  isRowClickable = computed(() => {
31372
31558
  const config = this.configurationItem();
31373
31559
  return config?.clientConfig?.actions?.some((a) => a.type === 'click' || a.type === 'dblclick' || a.type === 'rowClick');
31374
31560
  }, ...(ngDevMode ? [{ debugName: "isRowClickable" }] : /* istanbul ignore next */ []));
31561
+ // ── The standard grid ────────────────────────────────────────────────
31562
+ /** Rows for the standard grid: the source row, its index, its group and the group's aggregates. */
31563
+ gridRows = computed(() => {
31564
+ if (this.isGrouped())
31565
+ return this.groupedData().flatMap((group, groupIndex) => (group.data ?? []).map((row, index) => ({
31566
+ __row: row,
31567
+ __index: index + 1,
31568
+ __id: `${groupIndex}:${this.resolveRowTrackId(row, index)}`,
31569
+ __mtgroup: group.prop ?? null,
31570
+ __mtaggregates: this.aggregateSummary(group.aggregates),
31571
+ })));
31572
+ return this.tableRows().map((row, index) => ({
31573
+ __row: row,
31574
+ __index: index + 1,
31575
+ __id: this.resolveRowTrackId(row, index),
31576
+ }));
31577
+ }, ...(ngDevMode ? [{ debugName: "gridRows" }] : /* istanbul ignore next */ []));
31578
+ gridRowId = (row) => row.__id;
31579
+ gridCells = viewChildren('gridCell', ...(ngDevMode ? [{ debugName: "gridCells" }] : /* istanbul ignore next */ []));
31580
+ gridColumns = computed(() => {
31581
+ const cells = this.gridCells();
31582
+ const group = this.isGrouped()
31583
+ ? [
31584
+ mtEntityColumn({
31585
+ key: '__mtgroup',
31586
+ label: '',
31587
+ viewType: (this.groupedData()[0]?.prop?.viewType ??
31588
+ 'Text'),
31589
+ entity: (row) => row.__mtgroup ?? null,
31590
+ hidden: true,
31591
+ enableRowGroup: true,
31592
+ groupValueRenderer: TableCardGroupValue,
31593
+ }),
31594
+ ]
31595
+ : [];
31596
+ const index = !this.tableStyleConfig()?.hideIndex && this.showIndex()
31597
+ ? [
31598
+ {
31599
+ colId: '__index',
31600
+ field: '__index',
31601
+ headerName: '#',
31602
+ initialWidth: 72,
31603
+ type: 'rightAligned',
31604
+ filter: 'number',
31605
+ },
31606
+ ]
31607
+ : [];
31608
+ return [
31609
+ ...group,
31610
+ ...index,
31611
+ ...this.visibleColumns().map((column, position) => ({
31612
+ colId: column.key,
31613
+ headerName: column.label,
31614
+ minWidth: 120,
31615
+ // A phase-gate matrix cell has no order to sort by.
31616
+ ...(this.isPhaseGateColumn(column) ? { sortable: false } : {}),
31617
+ filter: 'text',
31618
+ enableRowGroup: true,
31619
+ valueGetter: ({ data }) => this.getSortValue(data.__row, column),
31620
+ cellRenderer: MtTemplateCell,
31621
+ cellRendererParams: { template: cells[position] },
31622
+ })),
31623
+ ];
31624
+ }, ...(ngDevMode ? [{ debugName: "gridColumns" }] : /* istanbul ignore next */ []));
31625
+ gridApi = signal(null, ...(ngDevMode ? [{ debugName: "gridApi" }] : /* istanbul ignore next */ []));
31626
+ gridHost = viewChild('gridHost', ...(ngDevMode ? [{ debugName: "gridHost" }] : /* istanbul ignore next */ []));
31627
+ /** The grid fills the card body; measured, because the dashboard layout sizes the card. */
31628
+ gridHeight = signal(400, ...(ngDevMode ? [{ debugName: "gridHeight" }] : /* istanbul ignore next */ []));
31629
+ gridEffects = [
31630
+ effect(() => {
31631
+ const api = this.gridApi(), grouped = this.isGrouped();
31632
+ if (!api)
31633
+ return;
31634
+ untracked(() => api.setRowGroupColumns(grouped ? ['__mtgroup'] : []));
31635
+ }),
31636
+ effect((onCleanup) => {
31637
+ const host = this.gridHost()?.nativeElement;
31638
+ if (!host || typeof ResizeObserver === 'undefined')
31639
+ return;
31640
+ const observer = new ResizeObserver(([entry]) => this.gridHeight.set(Math.max(240, Math.floor(entry?.contentRect.height ?? 400))));
31641
+ observer.observe(host);
31642
+ onCleanup(() => observer.disconnect());
31643
+ }),
31644
+ ];
31645
+ /** Double-click on a data row runs the item's double-click action. */
31646
+ onGridDoubleClick(event) {
31647
+ const target = event.target;
31648
+ if (target?.closest('button,a,input,textarea,select,[role="button"]'))
31649
+ return;
31650
+ const id = target?.closest('[data-row-id]')?.getAttribute('data-row-id');
31651
+ const row = this.gridRows().find((candidate) => candidate.__id === id);
31652
+ if (row)
31653
+ this.onRowDblClick(row.__row);
31654
+ }
31375
31655
  ngOnInit() {
31376
31656
  const id = this.dashboardId();
31377
31657
  // Subscribe to configuration
@@ -31391,25 +31671,9 @@ class TableCardComponent {
31391
31671
  }));
31392
31672
  }
31393
31673
  ngOnDestroy() {
31674
+ this.clicks.cancel();
31394
31675
  this.subscription.unsubscribe();
31395
31676
  }
31396
- onTableScroll(event) {
31397
- const target = event.target;
31398
- if (!target)
31399
- return;
31400
- this.tableScrollTop.set(target.scrollTop);
31401
- this.tableViewportHeight.set(target.clientHeight || 520);
31402
- }
31403
- resolveVirtualWindow(totalRows) {
31404
- if (totalRows <= 0) {
31405
- return { startIndex: 0, endIndex: 0 };
31406
- }
31407
- const viewportRows = Math.max(1, Math.ceil(this.tableViewportHeight() / this.virtualRowHeightPx));
31408
- const firstVisibleRow = Math.max(0, Math.floor(this.tableScrollTop() / this.virtualRowHeightPx));
31409
- const startIndex = Math.max(0, firstVisibleRow - this.virtualOverscanRows);
31410
- const endIndex = Math.min(totalRows, firstVisibleRow + viewportRows + this.virtualOverscanRows);
31411
- return { startIndex, endIndex };
31412
- }
31413
31677
  resolveRowTrackId(row, index) {
31414
31678
  const rawId = row?.Id?.value ??
31415
31679
  row?.Id ??
@@ -31419,21 +31683,11 @@ class TableCardComponent {
31419
31683
  index;
31420
31684
  return String(rawId);
31421
31685
  }
31422
- resolveGroupTrackId(group) {
31423
- const prop = group?.prop;
31424
- return String(prop?.key ??
31425
- prop?.value?.key ??
31426
- prop?.value ??
31427
- prop?.label ??
31428
- prop?.name ??
31429
- '');
31430
- }
31431
31686
  /**
31432
31687
  * Build table columns and rows from raw data
31433
31688
  * Matches old buildTable logic in table-card.component.ts
31434
31689
  */
31435
31690
  buildTable(data) {
31436
- this.tableScrollTop.set(0);
31437
31691
  if (!data) {
31438
31692
  this.columns.set([]);
31439
31693
  this.tableRows.set([]);
@@ -32260,43 +32514,6 @@ class TableCardComponent {
32260
32514
  }
32261
32515
  return parts.join(' - ');
32262
32516
  }
32263
- /**
32264
- * Sort column
32265
- */
32266
- onSort(column) {
32267
- if (this.isPhaseGateColumn(column))
32268
- return;
32269
- const cols = this.columns();
32270
- const updatedCols = cols.map((col) => {
32271
- if (col.key === column.key) {
32272
- return {
32273
- ...col,
32274
- isSort: true,
32275
- isAsc: col.isSort ? !col.isAsc : true,
32276
- };
32277
- }
32278
- return { ...col, isSort: false };
32279
- });
32280
- this.columns.set(updatedCols);
32281
- // Sort rows
32282
- const sortedColumn = updatedCols.find((c) => c.isSort);
32283
- if (sortedColumn) {
32284
- const rows = [...this.tableRows()];
32285
- rows.sort((a, b) => {
32286
- const aVal = this.getSortValue(a, sortedColumn);
32287
- const bVal = this.getSortValue(b, sortedColumn);
32288
- if (aVal === bVal)
32289
- return 0;
32290
- if (aVal === null || aVal === undefined)
32291
- return 1;
32292
- if (bVal === null || bVal === undefined)
32293
- return -1;
32294
- const comparison = aVal < bVal ? -1 : 1;
32295
- return sortedColumn.isAsc ? comparison : -comparison;
32296
- });
32297
- this.tableRows.set(rows);
32298
- }
32299
- }
32300
32517
  /**
32301
32518
  * Get sortable value from row
32302
32519
  */
@@ -32314,15 +32531,17 @@ class TableCardComponent {
32314
32531
  }
32315
32532
  return cellData;
32316
32533
  }
32534
+ /** Delays a click only while a Double Click action is configured (#1905). */
32535
+ clicks = new ClickDispatcher();
32317
32536
  /**
32318
32537
  * Handle row click
32319
32538
  */
32320
32539
  onRowClick(row) {
32321
- this.emitRowAction('click', row);
32540
+ this.clicks.click(hasDoubleClickAction(this.configurationItem()), () => this.emitRowAction('click', row));
32322
32541
  }
32323
32542
  /** Handle row double click — the Actions drawer offers it for tables too. */
32324
32543
  onRowDblClick(row) {
32325
- this.emitRowAction('dblclick', row);
32544
+ this.clicks.doubleClick(() => this.emitRowAction('dblclick', row));
32326
32545
  }
32327
32546
  emitRowAction(type, row) {
32328
32547
  if (!this.isRowClickable())
@@ -32348,7 +32567,7 @@ class TableCardComponent {
32348
32567
  this.onAction.emit({ type: 'clickOnHeader', data: {} });
32349
32568
  }
32350
32569
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TableCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
32351
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: TableCardComponent, isStandalone: true, selector: "mt-table-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null }, hideHeader: { classPropertyName: "hideHeader", publicName: "hideHeader", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction" }, ngImport: i0, template: "<!-- One legend definition; the body grid places it on any configured edge. -->\r\n<ng-template #legendList>\r\n <div\r\n class=\"flex flex-wrap items-center gap-2\"\r\n [class.flex-col]=\"isSideLegend()\"\r\n [class.items-start]=\"isSideLegend()\"\r\n >\r\n @for (label of labels(); track label.key || $index) {\r\n <div class=\"flex items-center gap-1 text-xs\">\r\n <span\r\n class=\"table-legend-marker\"\r\n [class.shape-rect]=\"legendIconType() === 'rect'\"\r\n [class.shape-roundRect]=\"legendIconType() === 'roundRect'\"\r\n [class.shape-diamond]=\"legendIconType() === 'diamond'\"\r\n [class.shape-triangle]=\"legendIconType() === 'triangle'\"\r\n [style.backgroundColor]=\"\r\n legendIconType() === 'triangle' ? null : getLegendColor(label)\r\n \"\r\n [style.border-bottom-color]=\"\r\n legendIconType() === 'triangle' ? getLegendColor(label) : null\r\n \"\r\n ></span>\r\n <span>{{ getLegendText(label) }}</span>\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<mt-card-content\r\n [inGroup]=\"inGroup()\"\r\n [showHeader]=\"!hideHeader()\"\r\n [title]=\"title()\"\r\n [styleConfig]=\"\r\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\r\n \"\r\n [cardStyleConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\r\n \"\r\n [headerConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\r\n \"\r\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\r\n (headerClick)=\"onHeaderClick()\"\r\n>\r\n <ng-container body>\r\n <div\r\n class=\"table-wrapper h-full\"\r\n [attr.data-legend-position]=\"legendPosition()\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n >\r\n @if (hasLegend()) {\r\n <div class=\"table-legend-host\">\r\n <ng-container [ngTemplateOutlet]=\"legendList\" />\r\n </div>\r\n }\r\n\r\n <div class=\"table-content\">\r\n @if (loading()) {\r\n <div class=\"flex items-center justify-center h-32\">\r\n <i class=\"pi pi-spin pi-spinner text-2xl\"></i>\r\n </div>\r\n } @else if (hasData()) {\r\n <div\r\n class=\"table-scroll-container overflow-auto h-full\"\r\n (scroll)=\"onTableScroll($event)\"\r\n >\r\n <table class=\"w-full border-collapse text-sm\">\r\n <thead class=\"sticky top-0 z-10\" [hidden]=\"hideSubheader()\">\r\n <tr>\r\n <!-- Index column -->\r\n @if (!tableStyleConfig()?.hideIndex && showIndex()) {\r\n <th\r\n class=\"px-3 py-2 text-left font-semibold bg-surface-100 border-b-2 border-surface-200\"\r\n [style.color]=\"tableStyleConfig()?.thTextColor\"\r\n [style.backgroundColor]=\"\r\n tableStyleConfig()?.thBackgroundColor\r\n \"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.thFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.thFontSize\"\r\n >\r\n #\r\n </th>\r\n }\r\n\r\n <!-- Data columns -->\r\n @for (column of visibleColumns(); track column.key) {\r\n <th\r\n class=\"px-3 py-2 text-left font-semibold bg-surface-100 border-b-2 border-surface-200 whitespace-nowrap\"\r\n [style.minWidth]=\"column.width || 'auto'\"\r\n [style.color]=\"tableStyleConfig()?.thTextColor\"\r\n [style.backgroundColor]=\"\r\n tableStyleConfig()?.thBackgroundColor\r\n \"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.thFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.thFontSize\"\r\n [class.cursor-pointer]=\"!isPhaseGateColumn(column)\"\r\n (click)=\"onSort(column)\"\r\n >\r\n <div class=\"flex items-center gap-2\">\r\n <span>{{ column.label }}</span>\r\n @if (column.isSort) {\r\n <i\r\n class=\"text-xs\"\r\n [class]=\"\r\n column.isAsc\r\n ? 'pi pi-sort-amount-up'\r\n : 'pi pi-sort-amount-down'\r\n \"\r\n ></i>\r\n }\r\n </div>\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <!-- Grouped Mode -->\r\n @if (isGrouped()) {\r\n @if (groupedVirtualTopSpacerHeightPx() > 0) {\r\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n [style.height.px]=\"groupedVirtualTopSpacerHeightPx()\"\r\n ></td>\r\n </tr>\r\n }\r\n\r\n @for (item of visibleGroupedRows(); track item.trackId) {\r\n @if (item.kind === \"group\") {\r\n <tr class=\"dashboard-table-row\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n class=\"px-3 py-2 font-semibold\"\r\n [style.backgroundColor]=\"\r\n tableStyleConfig()?.groupBackgroundColor ||\r\n '#e4d1ac'\r\n \"\r\n [style.color]=\"tableStyleConfig()?.groupTextColor\"\r\n >\r\n <div\r\n class=\"flex flex-wrap items-center gap-x-4 gap-y-1\"\r\n >\r\n <mt-entity-info\r\n [data]=\"{\r\n viewType: item.group.prop?.viewType,\r\n value: item.group.prop?.value,\r\n }\"\r\n [displayType]=\"'inTable'\"\r\n ></mt-entity-info>\r\n @if (\r\n aggregateSummary(item.group.aggregates);\r\n as totals\r\n ) {\r\n <span\r\n class=\"text-xs font-medium whitespace-pre-wrap\"\r\n >{{ totals }}</span\r\n >\r\n }\r\n </div>\r\n </td>\r\n </tr>\r\n } @else {\r\n <tr\r\n class=\"dashboard-table-row hover:bg-surface-50 transition-colors\"\r\n [class.cursor-pointer]=\"isRowClickable()\"\r\n [class.bg-surface-100]=\"\r\n tableStyleConfig()?.striped &&\r\n (item.rowIndex ?? 0) % 2 === 1\r\n \"\r\n (click)=\"onRowClick(item.row)\"\r\n (dblclick)=\"onRowDblClick(item.row)\"\r\n >\r\n @if (!tableStyleConfig()?.hideIndex && showIndex()) {\r\n <td\r\n class=\"px-3 py-2 text-center border-b border-surface-100\"\r\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.tdFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\r\n >\r\n {{ (item.rowIndex ?? 0) + 1 }}\r\n </td>\r\n }\r\n\r\n @for (column of visibleColumns(); track column.key) {\r\n <td\r\n class=\"px-3 py-2 border-b border-surface-100\"\r\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.tdFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\r\n >\r\n @if (isPhaseGateColumn(column)) {\r\n @let phaseCell =\r\n getPhaseGateCell(item.row, column);\r\n <div\r\n class=\"min-w-36\"\r\n [title]=\"getPhaseGateCellTooltip(phaseCell)\"\r\n >\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\r\n [style.backgroundColor]=\"\r\n getPhaseGateCellColor(phaseCell)\r\n \"\r\n ></span>\r\n <span class=\"font-medium truncate\">\r\n {{ getPhaseGateCellText(phaseCell) }}\r\n </span>\r\n </div>\r\n @if (\r\n getPhaseGatePercentage(phaseCell) !== null\r\n ) {\r\n <div\r\n class=\"mt-1 h-1.5 overflow-hidden rounded-full bg-surface-200\"\r\n >\r\n <div\r\n class=\"h-full rounded-full\"\r\n [style.width.%]=\"\r\n getPhaseGatePercentage(phaseCell)\r\n \"\r\n [style.backgroundColor]=\"\r\n getPhaseGateCellColor(phaseCell)\r\n \"\r\n ></div>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <mt-entity-info\r\n [data]=\"getCellData(item.row, column)\"\r\n [displayType]=\"'inTable'\"\r\n [extraInfoData]=\"tableStyleConfig()\"\r\n ></mt-entity-info>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n }\r\n\r\n @if (groupedVirtualBottomSpacerHeightPx() > 0) {\r\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n [style.height.px]=\"groupedVirtualBottomSpacerHeightPx()\"\r\n ></td>\r\n </tr>\r\n }\r\n } @else {\r\n <!-- Non-Grouped Mode -->\r\n @if (flatVirtualTopSpacerHeightPx() > 0) {\r\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n [style.height.px]=\"flatVirtualTopSpacerHeightPx()\"\r\n ></td>\r\n </tr>\r\n }\r\n\r\n @for (rowView of visibleTableRows(); track rowView.trackId) {\r\n <tr\r\n class=\"dashboard-table-row hover:bg-surface-50 transition-colors\"\r\n [class.cursor-pointer]=\"isRowClickable()\"\r\n [class.bg-surface-100]=\"\r\n tableStyleConfig()?.striped &&\r\n rowView.rowIndex % 2 === 1\r\n \"\r\n (click)=\"onRowClick(rowView.row)\"\r\n (dblclick)=\"onRowDblClick(rowView.row)\"\r\n >\r\n @if (!tableStyleConfig()?.hideIndex && showIndex()) {\r\n <td\r\n class=\"px-3 py-2 text-center border-b border-surface-100\"\r\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.tdFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\r\n >\r\n {{ rowView.rowIndex + 1 }}\r\n </td>\r\n }\r\n\r\n @for (column of visibleColumns(); track column.key) {\r\n <td\r\n class=\"px-3 py-2 border-b border-surface-100\"\r\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.tdFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\r\n >\r\n @if (isPhaseGateColumn(column)) {\r\n @let phaseCell =\r\n getPhaseGateCell(rowView.row, column);\r\n <div\r\n class=\"min-w-36\"\r\n [title]=\"getPhaseGateCellTooltip(phaseCell)\"\r\n >\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\r\n [style.backgroundColor]=\"\r\n getPhaseGateCellColor(phaseCell)\r\n \"\r\n ></span>\r\n <span class=\"font-medium truncate\">\r\n {{ getPhaseGateCellText(phaseCell) }}\r\n </span>\r\n </div>\r\n @if (getPhaseGatePercentage(phaseCell) !== null) {\r\n <div\r\n class=\"mt-1 h-1.5 overflow-hidden rounded-full bg-surface-200\"\r\n >\r\n <div\r\n class=\"h-full rounded-full\"\r\n [style.width.%]=\"\r\n getPhaseGatePercentage(phaseCell)\r\n \"\r\n [style.backgroundColor]=\"\r\n getPhaseGateCellColor(phaseCell)\r\n \"\r\n ></div>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <mt-entity-info\r\n [data]=\"getCellData(rowView.row, column)\"\r\n [displayType]=\"'inTable'\"\r\n [extraInfoData]=\"tableStyleConfig()\"\r\n ></mt-entity-info>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n\r\n @if (flatVirtualBottomSpacerHeightPx() > 0) {\r\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n [style.height.px]=\"flatVirtualBottomSpacerHeightPx()\"\r\n ></td>\r\n </tr>\r\n }\r\n }\r\n </tbody>\r\n @if (aggregateSummary(tableAggregates()); as totals) {\r\n <tfoot class=\"sticky bottom-0 z-10\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n class=\"px-3 py-2 text-sm font-semibold bg-surface-100 border-t-2 border-surface-200 whitespace-pre-wrap\"\r\n >\r\n {{ totals }}\r\n </td>\r\n </tr>\r\n </tfoot>\r\n }\r\n </table>\r\n </div>\r\n } @else {\r\n <!-- No Data -->\r\n <div\r\n class=\"flex flex-col items-center justify-center h-32 text-muted-color gap-2\"\r\n >\r\n <i class=\"pi pi-info-circle text-2xl\"></i>\r\n <span>{{ t(\"noData\") }}</span>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </ng-container>\r\n</mt-card-content>\r\n", styles: [":host{display:block;height:100%}.table-wrapper{display:grid;grid-template-areas:\"legend\" \"content\";grid-template-rows:auto minmax(0,1fr);min-height:0}.table-wrapper[data-legend-position=bottom]{grid-template-areas:\"content\" \"legend\";grid-template-rows:minmax(0,1fr) auto}.table-wrapper[data-legend-position=left]{grid-template-areas:\"legend content\";grid-template-columns:auto minmax(0,1fr);grid-template-rows:minmax(0,1fr)}.table-wrapper[data-legend-position=right]{grid-template-areas:\"content legend\";grid-template-columns:minmax(0,1fr) auto;grid-template-rows:minmax(0,1fr)}.table-content{grid-area:content;min-height:0;min-width:0;display:flex;flex-direction:column}.table-legend-host{grid-area:legend;min-width:0;padding:.25rem .5rem}.table-wrapper[data-legend-position=left] .table-legend-host,.table-wrapper[data-legend-position=right] .table-legend-host{max-width:12rem;overflow:auto}.table-legend-marker{display:inline-block;width:.625rem;height:.625rem;flex:0 0 auto;border-radius:999px}.table-legend-marker.shape-rect{border-radius:0}.table-legend-marker.shape-roundRect{border-radius:.2rem}.table-legend-marker.shape-diamond{border-radius:.0625rem;transform:rotate(45deg)}.table-legend-marker.shape-triangle{width:0;height:0;background:transparent!important;border-radius:0;border-left:.34rem solid transparent;border-right:.34rem solid transparent;border-bottom-width:.6rem;border-bottom-style:solid}.table-scroll-container{flex:1;min-height:0}table{border-collapse:collapse}.dashboard-table-row{height:48px}.dashboard-table-spacer td{border:0;padding:0}th,td{text-align:start}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: CardContentComponent, selector: "mt-card-content", inputs: ["title", "inGroup", "groupHeader", "headerConfig", "styleConfig", "cardStyleConfig", "density", "padding", "showHeader", "headerClickable", "isNoTopEnd", "isChart", "titleEditable"], outputs: ["headerClick", "titleChange"] }, { kind: "component", type: EntityInfoComponent, selector: "mt-entity-info", inputs: ["data", "displayType", "extraInfoData", "limitWords", "customClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
32570
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: TableCardComponent, isStandalone: true, selector: "mt-table-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null }, hideHeader: { classPropertyName: "hideHeader", publicName: "hideHeader", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction" }, viewQueries: [{ propertyName: "gridCells", predicate: ["gridCell"], descendants: true, isSignal: true }, { propertyName: "gridHost", first: true, predicate: ["gridHost"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- One legend definition; the body grid places it on any configured edge. -->\n<ng-template #legendList>\n <div\n class=\"flex flex-wrap items-center gap-2\"\n [class.flex-col]=\"isSideLegend()\"\n [class.items-start]=\"isSideLegend()\"\n >\n @for (label of labels(); track label.key || $index) {\n <div class=\"flex items-center gap-1 text-xs\">\n <span\n class=\"table-legend-marker\"\n [class.shape-rect]=\"legendIconType() === 'rect'\"\n [class.shape-roundRect]=\"legendIconType() === 'roundRect'\"\n [class.shape-diamond]=\"legendIconType() === 'diamond'\"\n [class.shape-triangle]=\"legendIconType() === 'triangle'\"\n [style.backgroundColor]=\"\n legendIconType() === 'triangle' ? null : getLegendColor(label)\n \"\n [style.border-bottom-color]=\"\n legendIconType() === 'triangle' ? getLegendColor(label) : null\n \"\n ></span>\n <span>{{ getLegendText(label) }}</span>\n </div>\n }\n </div>\n</ng-template>\n\n<mt-card-content\n [inGroup]=\"inGroup()\"\n [showHeader]=\"!hideHeader()\"\n [title]=\"title()\"\n [styleConfig]=\"\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\n \"\n [cardStyleConfig]=\"\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\n \"\n [headerConfig]=\"\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\n \"\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\n (headerClick)=\"onHeaderClick()\"\n>\n <ng-container body>\n <div\n class=\"table-wrapper h-full\"\n [attr.data-legend-position]=\"legendPosition()\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n >\n @if (hasLegend()) {\n <div class=\"table-legend-host\">\n <ng-container [ngTemplateOutlet]=\"legendList\" />\n </div>\n }\n\n <div class=\"table-content\">\n @if (loading()) {\n <div class=\"flex items-center justify-center h-32\">\n <i class=\"pi pi-spin pi-spinner text-2xl\"></i>\n </div>\n } @else if (hasData()) {\n <!-- One cell template per visible column: phase-gate cells and entity values. -->\n @for (column of visibleColumns(); track column.key) {\n <ng-template #gridCell let-row>\n @if (isPhaseGateColumn(column)) {\n @let phaseCell = getPhaseGateCell(row.__row, column);\n <div\n class=\"min-w-36\"\n [title]=\"getPhaseGateCellTooltip(phaseCell)\"\n >\n <div class=\"flex items-center gap-2\">\n <span\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\n [style.backgroundColor]=\"getPhaseGateCellColor(phaseCell)\"\n ></span>\n <span class=\"font-medium truncate\">{{\n getPhaseGateCellText(phaseCell)\n }}</span>\n </div>\n @if (getPhaseGatePercentage(phaseCell) !== null) {\n <div\n class=\"mt-1 h-1.5 overflow-hidden rounded-full bg-surface-200\"\n >\n <div\n class=\"h-full rounded-full\"\n [style.width.%]=\"getPhaseGatePercentage(phaseCell)\"\n [style.backgroundColor]=\"\n getPhaseGateCellColor(phaseCell)\n \"\n ></div>\n </div>\n }\n </div>\n } @else {\n <mt-entity-info\n [data]=\"getCellData(row.__row, column)\"\n [displayType]=\"'inTable'\"\n [extraInfoData]=\"tableStyleConfig()\"\n ></mt-entity-info>\n }\n </ng-template>\n }\n <div class=\"flex h-full min-h-0 flex-col gap-2\">\n <div\n #gridHost\n class=\"min-h-0 flex-1\"\n (dblclick)=\"onGridDoubleClick($event)\"\n >\n <mt-standard-grid\n [rows]=\"gridRows()\"\n [columns]=\"gridColumns()\"\n [rowId]=\"gridRowId\"\n [label]=\"title()\"\n [height]=\"gridHeight()\"\n [exportName]=\"title()\"\n (gridReady)=\"gridApi.set($event.api)\"\n (rowClicked)=\"onRowClick($event.__row)\"\n />\n </div>\n @if (aggregateSummary(tableAggregates()); as totals) {\n <div\n class=\"rounded-md border border-surface-200 bg-surface-50 px-3 py-2 text-sm font-semibold whitespace-pre-wrap\"\n >\n {{ totals }}\n </div>\n }\n </div>\n } @else {\n <!-- No Data -->\n <div\n class=\"flex flex-col items-center justify-center h-32 text-muted-color gap-2\"\n >\n <i class=\"pi pi-info-circle text-2xl\"></i>\n <span>{{ t(\"noData\") }}</span>\n </div>\n }\n </div>\n </div>\n </ng-container>\n</mt-card-content>\n", styles: [":host{display:block;height:100%}.table-wrapper{display:grid;grid-template-areas:\"legend\" \"content\";grid-template-rows:auto minmax(0,1fr);min-height:0}.table-wrapper[data-legend-position=bottom]{grid-template-areas:\"content\" \"legend\";grid-template-rows:minmax(0,1fr) auto}.table-wrapper[data-legend-position=left]{grid-template-areas:\"legend content\";grid-template-columns:auto minmax(0,1fr);grid-template-rows:minmax(0,1fr)}.table-wrapper[data-legend-position=right]{grid-template-areas:\"content legend\";grid-template-columns:minmax(0,1fr) auto;grid-template-rows:minmax(0,1fr)}.table-content{grid-area:content;min-height:0;min-width:0;display:flex;flex-direction:column}.table-legend-host{grid-area:legend;min-width:0;padding:.25rem .5rem}.table-wrapper[data-legend-position=left] .table-legend-host,.table-wrapper[data-legend-position=right] .table-legend-host{max-width:12rem;overflow:auto}.table-legend-marker{display:inline-block;width:.625rem;height:.625rem;flex:0 0 auto;border-radius:999px}.table-legend-marker.shape-rect{border-radius:0}.table-legend-marker.shape-roundRect{border-radius:.2rem}.table-legend-marker.shape-diamond{border-radius:.0625rem;transform:rotate(45deg)}.table-legend-marker.shape-triangle{width:0;height:0;background:transparent!important;border-radius:0;border-left:.34rem solid transparent;border-right:.34rem solid transparent;border-bottom-width:.6rem;border-bottom-style:solid}.table-scroll-container{flex:1;min-height:0}table{border-collapse:collapse}.dashboard-table-row{height:48px}.dashboard-table-spacer td{border:0;padding:0}th,td{text-align:start}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: CardContentComponent, selector: "mt-card-content", inputs: ["title", "inGroup", "groupHeader", "headerConfig", "styleConfig", "cardStyleConfig", "density", "padding", "showHeader", "headerClickable", "isNoTopEnd", "isChart", "titleEditable"], outputs: ["headerClick", "titleChange"] }, { kind: "component", type: EntityInfoComponent, selector: "mt-entity-info", inputs: ["data", "displayType", "extraInfoData", "limitWords", "customClass"] }, { kind: "component", type: MtStandardGridComponent, selector: "mt-standard-grid", inputs: ["rows", "columns", "rowId", "label", "loading", "height", "selection", "exportable", "exportName", "exportFormats", "exporter", "rowMenuItems", "server", "paged", "detail", "chartContext", "search", "emptyTitle", "emptyDescription", "view"], outputs: ["gridReady", "rowClicked", "selectionChanged", "sortChanged", "filterChanged", "paginationChanged", "rowGroupOpened", "viewChanged", "chartsChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
32352
32571
  }
32353
32572
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TableCardComponent, decorators: [{
32354
32573
  type: Component,
@@ -32357,8 +32576,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
32357
32576
  TranslocoDirective,
32358
32577
  CardContentComponent,
32359
32578
  EntityInfoComponent,
32360
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- One legend definition; the body grid places it on any configured edge. -->\r\n<ng-template #legendList>\r\n <div\r\n class=\"flex flex-wrap items-center gap-2\"\r\n [class.flex-col]=\"isSideLegend()\"\r\n [class.items-start]=\"isSideLegend()\"\r\n >\r\n @for (label of labels(); track label.key || $index) {\r\n <div class=\"flex items-center gap-1 text-xs\">\r\n <span\r\n class=\"table-legend-marker\"\r\n [class.shape-rect]=\"legendIconType() === 'rect'\"\r\n [class.shape-roundRect]=\"legendIconType() === 'roundRect'\"\r\n [class.shape-diamond]=\"legendIconType() === 'diamond'\"\r\n [class.shape-triangle]=\"legendIconType() === 'triangle'\"\r\n [style.backgroundColor]=\"\r\n legendIconType() === 'triangle' ? null : getLegendColor(label)\r\n \"\r\n [style.border-bottom-color]=\"\r\n legendIconType() === 'triangle' ? getLegendColor(label) : null\r\n \"\r\n ></span>\r\n <span>{{ getLegendText(label) }}</span>\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<mt-card-content\r\n [inGroup]=\"inGroup()\"\r\n [showHeader]=\"!hideHeader()\"\r\n [title]=\"title()\"\r\n [styleConfig]=\"\r\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\r\n \"\r\n [cardStyleConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\r\n \"\r\n [headerConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\r\n \"\r\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\r\n (headerClick)=\"onHeaderClick()\"\r\n>\r\n <ng-container body>\r\n <div\r\n class=\"table-wrapper h-full\"\r\n [attr.data-legend-position]=\"legendPosition()\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n >\r\n @if (hasLegend()) {\r\n <div class=\"table-legend-host\">\r\n <ng-container [ngTemplateOutlet]=\"legendList\" />\r\n </div>\r\n }\r\n\r\n <div class=\"table-content\">\r\n @if (loading()) {\r\n <div class=\"flex items-center justify-center h-32\">\r\n <i class=\"pi pi-spin pi-spinner text-2xl\"></i>\r\n </div>\r\n } @else if (hasData()) {\r\n <div\r\n class=\"table-scroll-container overflow-auto h-full\"\r\n (scroll)=\"onTableScroll($event)\"\r\n >\r\n <table class=\"w-full border-collapse text-sm\">\r\n <thead class=\"sticky top-0 z-10\" [hidden]=\"hideSubheader()\">\r\n <tr>\r\n <!-- Index column -->\r\n @if (!tableStyleConfig()?.hideIndex && showIndex()) {\r\n <th\r\n class=\"px-3 py-2 text-left font-semibold bg-surface-100 border-b-2 border-surface-200\"\r\n [style.color]=\"tableStyleConfig()?.thTextColor\"\r\n [style.backgroundColor]=\"\r\n tableStyleConfig()?.thBackgroundColor\r\n \"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.thFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.thFontSize\"\r\n >\r\n #\r\n </th>\r\n }\r\n\r\n <!-- Data columns -->\r\n @for (column of visibleColumns(); track column.key) {\r\n <th\r\n class=\"px-3 py-2 text-left font-semibold bg-surface-100 border-b-2 border-surface-200 whitespace-nowrap\"\r\n [style.minWidth]=\"column.width || 'auto'\"\r\n [style.color]=\"tableStyleConfig()?.thTextColor\"\r\n [style.backgroundColor]=\"\r\n tableStyleConfig()?.thBackgroundColor\r\n \"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.thFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.thFontSize\"\r\n [class.cursor-pointer]=\"!isPhaseGateColumn(column)\"\r\n (click)=\"onSort(column)\"\r\n >\r\n <div class=\"flex items-center gap-2\">\r\n <span>{{ column.label }}</span>\r\n @if (column.isSort) {\r\n <i\r\n class=\"text-xs\"\r\n [class]=\"\r\n column.isAsc\r\n ? 'pi pi-sort-amount-up'\r\n : 'pi pi-sort-amount-down'\r\n \"\r\n ></i>\r\n }\r\n </div>\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <!-- Grouped Mode -->\r\n @if (isGrouped()) {\r\n @if (groupedVirtualTopSpacerHeightPx() > 0) {\r\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n [style.height.px]=\"groupedVirtualTopSpacerHeightPx()\"\r\n ></td>\r\n </tr>\r\n }\r\n\r\n @for (item of visibleGroupedRows(); track item.trackId) {\r\n @if (item.kind === \"group\") {\r\n <tr class=\"dashboard-table-row\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n class=\"px-3 py-2 font-semibold\"\r\n [style.backgroundColor]=\"\r\n tableStyleConfig()?.groupBackgroundColor ||\r\n '#e4d1ac'\r\n \"\r\n [style.color]=\"tableStyleConfig()?.groupTextColor\"\r\n >\r\n <div\r\n class=\"flex flex-wrap items-center gap-x-4 gap-y-1\"\r\n >\r\n <mt-entity-info\r\n [data]=\"{\r\n viewType: item.group.prop?.viewType,\r\n value: item.group.prop?.value,\r\n }\"\r\n [displayType]=\"'inTable'\"\r\n ></mt-entity-info>\r\n @if (\r\n aggregateSummary(item.group.aggregates);\r\n as totals\r\n ) {\r\n <span\r\n class=\"text-xs font-medium whitespace-pre-wrap\"\r\n >{{ totals }}</span\r\n >\r\n }\r\n </div>\r\n </td>\r\n </tr>\r\n } @else {\r\n <tr\r\n class=\"dashboard-table-row hover:bg-surface-50 transition-colors\"\r\n [class.cursor-pointer]=\"isRowClickable()\"\r\n [class.bg-surface-100]=\"\r\n tableStyleConfig()?.striped &&\r\n (item.rowIndex ?? 0) % 2 === 1\r\n \"\r\n (click)=\"onRowClick(item.row)\"\r\n (dblclick)=\"onRowDblClick(item.row)\"\r\n >\r\n @if (!tableStyleConfig()?.hideIndex && showIndex()) {\r\n <td\r\n class=\"px-3 py-2 text-center border-b border-surface-100\"\r\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.tdFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\r\n >\r\n {{ (item.rowIndex ?? 0) + 1 }}\r\n </td>\r\n }\r\n\r\n @for (column of visibleColumns(); track column.key) {\r\n <td\r\n class=\"px-3 py-2 border-b border-surface-100\"\r\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.tdFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\r\n >\r\n @if (isPhaseGateColumn(column)) {\r\n @let phaseCell =\r\n getPhaseGateCell(item.row, column);\r\n <div\r\n class=\"min-w-36\"\r\n [title]=\"getPhaseGateCellTooltip(phaseCell)\"\r\n >\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\r\n [style.backgroundColor]=\"\r\n getPhaseGateCellColor(phaseCell)\r\n \"\r\n ></span>\r\n <span class=\"font-medium truncate\">\r\n {{ getPhaseGateCellText(phaseCell) }}\r\n </span>\r\n </div>\r\n @if (\r\n getPhaseGatePercentage(phaseCell) !== null\r\n ) {\r\n <div\r\n class=\"mt-1 h-1.5 overflow-hidden rounded-full bg-surface-200\"\r\n >\r\n <div\r\n class=\"h-full rounded-full\"\r\n [style.width.%]=\"\r\n getPhaseGatePercentage(phaseCell)\r\n \"\r\n [style.backgroundColor]=\"\r\n getPhaseGateCellColor(phaseCell)\r\n \"\r\n ></div>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <mt-entity-info\r\n [data]=\"getCellData(item.row, column)\"\r\n [displayType]=\"'inTable'\"\r\n [extraInfoData]=\"tableStyleConfig()\"\r\n ></mt-entity-info>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n }\r\n\r\n @if (groupedVirtualBottomSpacerHeightPx() > 0) {\r\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n [style.height.px]=\"groupedVirtualBottomSpacerHeightPx()\"\r\n ></td>\r\n </tr>\r\n }\r\n } @else {\r\n <!-- Non-Grouped Mode -->\r\n @if (flatVirtualTopSpacerHeightPx() > 0) {\r\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n [style.height.px]=\"flatVirtualTopSpacerHeightPx()\"\r\n ></td>\r\n </tr>\r\n }\r\n\r\n @for (rowView of visibleTableRows(); track rowView.trackId) {\r\n <tr\r\n class=\"dashboard-table-row hover:bg-surface-50 transition-colors\"\r\n [class.cursor-pointer]=\"isRowClickable()\"\r\n [class.bg-surface-100]=\"\r\n tableStyleConfig()?.striped &&\r\n rowView.rowIndex % 2 === 1\r\n \"\r\n (click)=\"onRowClick(rowView.row)\"\r\n (dblclick)=\"onRowDblClick(rowView.row)\"\r\n >\r\n @if (!tableStyleConfig()?.hideIndex && showIndex()) {\r\n <td\r\n class=\"px-3 py-2 text-center border-b border-surface-100\"\r\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.tdFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\r\n >\r\n {{ rowView.rowIndex + 1 }}\r\n </td>\r\n }\r\n\r\n @for (column of visibleColumns(); track column.key) {\r\n <td\r\n class=\"px-3 py-2 border-b border-surface-100\"\r\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.tdFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\r\n >\r\n @if (isPhaseGateColumn(column)) {\r\n @let phaseCell =\r\n getPhaseGateCell(rowView.row, column);\r\n <div\r\n class=\"min-w-36\"\r\n [title]=\"getPhaseGateCellTooltip(phaseCell)\"\r\n >\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\r\n [style.backgroundColor]=\"\r\n getPhaseGateCellColor(phaseCell)\r\n \"\r\n ></span>\r\n <span class=\"font-medium truncate\">\r\n {{ getPhaseGateCellText(phaseCell) }}\r\n </span>\r\n </div>\r\n @if (getPhaseGatePercentage(phaseCell) !== null) {\r\n <div\r\n class=\"mt-1 h-1.5 overflow-hidden rounded-full bg-surface-200\"\r\n >\r\n <div\r\n class=\"h-full rounded-full\"\r\n [style.width.%]=\"\r\n getPhaseGatePercentage(phaseCell)\r\n \"\r\n [style.backgroundColor]=\"\r\n getPhaseGateCellColor(phaseCell)\r\n \"\r\n ></div>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <mt-entity-info\r\n [data]=\"getCellData(rowView.row, column)\"\r\n [displayType]=\"'inTable'\"\r\n [extraInfoData]=\"tableStyleConfig()\"\r\n ></mt-entity-info>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n\r\n @if (flatVirtualBottomSpacerHeightPx() > 0) {\r\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n [style.height.px]=\"flatVirtualBottomSpacerHeightPx()\"\r\n ></td>\r\n </tr>\r\n }\r\n }\r\n </tbody>\r\n @if (aggregateSummary(tableAggregates()); as totals) {\r\n <tfoot class=\"sticky bottom-0 z-10\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n class=\"px-3 py-2 text-sm font-semibold bg-surface-100 border-t-2 border-surface-200 whitespace-pre-wrap\"\r\n >\r\n {{ totals }}\r\n </td>\r\n </tr>\r\n </tfoot>\r\n }\r\n </table>\r\n </div>\r\n } @else {\r\n <!-- No Data -->\r\n <div\r\n class=\"flex flex-col items-center justify-center h-32 text-muted-color gap-2\"\r\n >\r\n <i class=\"pi pi-info-circle text-2xl\"></i>\r\n <span>{{ t(\"noData\") }}</span>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </ng-container>\r\n</mt-card-content>\r\n", styles: [":host{display:block;height:100%}.table-wrapper{display:grid;grid-template-areas:\"legend\" \"content\";grid-template-rows:auto minmax(0,1fr);min-height:0}.table-wrapper[data-legend-position=bottom]{grid-template-areas:\"content\" \"legend\";grid-template-rows:minmax(0,1fr) auto}.table-wrapper[data-legend-position=left]{grid-template-areas:\"legend content\";grid-template-columns:auto minmax(0,1fr);grid-template-rows:minmax(0,1fr)}.table-wrapper[data-legend-position=right]{grid-template-areas:\"content legend\";grid-template-columns:minmax(0,1fr) auto;grid-template-rows:minmax(0,1fr)}.table-content{grid-area:content;min-height:0;min-width:0;display:flex;flex-direction:column}.table-legend-host{grid-area:legend;min-width:0;padding:.25rem .5rem}.table-wrapper[data-legend-position=left] .table-legend-host,.table-wrapper[data-legend-position=right] .table-legend-host{max-width:12rem;overflow:auto}.table-legend-marker{display:inline-block;width:.625rem;height:.625rem;flex:0 0 auto;border-radius:999px}.table-legend-marker.shape-rect{border-radius:0}.table-legend-marker.shape-roundRect{border-radius:.2rem}.table-legend-marker.shape-diamond{border-radius:.0625rem;transform:rotate(45deg)}.table-legend-marker.shape-triangle{width:0;height:0;background:transparent!important;border-radius:0;border-left:.34rem solid transparent;border-right:.34rem solid transparent;border-bottom-width:.6rem;border-bottom-style:solid}.table-scroll-container{flex:1;min-height:0}table{border-collapse:collapse}.dashboard-table-row{height:48px}.dashboard-table-spacer td{border:0;padding:0}th,td{text-align:start}\n"] }]
32361
- }], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }], inGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "inGroup", required: false }] }], hideHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideHeader", required: false }] }], onAction: [{ type: i0.Output, args: ["onAction"] }] } });
32579
+ MtStandardGridComponent,
32580
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- One legend definition; the body grid places it on any configured edge. -->\n<ng-template #legendList>\n <div\n class=\"flex flex-wrap items-center gap-2\"\n [class.flex-col]=\"isSideLegend()\"\n [class.items-start]=\"isSideLegend()\"\n >\n @for (label of labels(); track label.key || $index) {\n <div class=\"flex items-center gap-1 text-xs\">\n <span\n class=\"table-legend-marker\"\n [class.shape-rect]=\"legendIconType() === 'rect'\"\n [class.shape-roundRect]=\"legendIconType() === 'roundRect'\"\n [class.shape-diamond]=\"legendIconType() === 'diamond'\"\n [class.shape-triangle]=\"legendIconType() === 'triangle'\"\n [style.backgroundColor]=\"\n legendIconType() === 'triangle' ? null : getLegendColor(label)\n \"\n [style.border-bottom-color]=\"\n legendIconType() === 'triangle' ? getLegendColor(label) : null\n \"\n ></span>\n <span>{{ getLegendText(label) }}</span>\n </div>\n }\n </div>\n</ng-template>\n\n<mt-card-content\n [inGroup]=\"inGroup()\"\n [showHeader]=\"!hideHeader()\"\n [title]=\"title()\"\n [styleConfig]=\"\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\n \"\n [cardStyleConfig]=\"\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\n \"\n [headerConfig]=\"\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\n \"\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\n (headerClick)=\"onHeaderClick()\"\n>\n <ng-container body>\n <div\n class=\"table-wrapper h-full\"\n [attr.data-legend-position]=\"legendPosition()\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n >\n @if (hasLegend()) {\n <div class=\"table-legend-host\">\n <ng-container [ngTemplateOutlet]=\"legendList\" />\n </div>\n }\n\n <div class=\"table-content\">\n @if (loading()) {\n <div class=\"flex items-center justify-center h-32\">\n <i class=\"pi pi-spin pi-spinner text-2xl\"></i>\n </div>\n } @else if (hasData()) {\n <!-- One cell template per visible column: phase-gate cells and entity values. -->\n @for (column of visibleColumns(); track column.key) {\n <ng-template #gridCell let-row>\n @if (isPhaseGateColumn(column)) {\n @let phaseCell = getPhaseGateCell(row.__row, column);\n <div\n class=\"min-w-36\"\n [title]=\"getPhaseGateCellTooltip(phaseCell)\"\n >\n <div class=\"flex items-center gap-2\">\n <span\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\n [style.backgroundColor]=\"getPhaseGateCellColor(phaseCell)\"\n ></span>\n <span class=\"font-medium truncate\">{{\n getPhaseGateCellText(phaseCell)\n }}</span>\n </div>\n @if (getPhaseGatePercentage(phaseCell) !== null) {\n <div\n class=\"mt-1 h-1.5 overflow-hidden rounded-full bg-surface-200\"\n >\n <div\n class=\"h-full rounded-full\"\n [style.width.%]=\"getPhaseGatePercentage(phaseCell)\"\n [style.backgroundColor]=\"\n getPhaseGateCellColor(phaseCell)\n \"\n ></div>\n </div>\n }\n </div>\n } @else {\n <mt-entity-info\n [data]=\"getCellData(row.__row, column)\"\n [displayType]=\"'inTable'\"\n [extraInfoData]=\"tableStyleConfig()\"\n ></mt-entity-info>\n }\n </ng-template>\n }\n <div class=\"flex h-full min-h-0 flex-col gap-2\">\n <div\n #gridHost\n class=\"min-h-0 flex-1\"\n (dblclick)=\"onGridDoubleClick($event)\"\n >\n <mt-standard-grid\n [rows]=\"gridRows()\"\n [columns]=\"gridColumns()\"\n [rowId]=\"gridRowId\"\n [label]=\"title()\"\n [height]=\"gridHeight()\"\n [exportName]=\"title()\"\n (gridReady)=\"gridApi.set($event.api)\"\n (rowClicked)=\"onRowClick($event.__row)\"\n />\n </div>\n @if (aggregateSummary(tableAggregates()); as totals) {\n <div\n class=\"rounded-md border border-surface-200 bg-surface-50 px-3 py-2 text-sm font-semibold whitespace-pre-wrap\"\n >\n {{ totals }}\n </div>\n }\n </div>\n } @else {\n <!-- No Data -->\n <div\n class=\"flex flex-col items-center justify-center h-32 text-muted-color gap-2\"\n >\n <i class=\"pi pi-info-circle text-2xl\"></i>\n <span>{{ t(\"noData\") }}</span>\n </div>\n }\n </div>\n </div>\n </ng-container>\n</mt-card-content>\n", styles: [":host{display:block;height:100%}.table-wrapper{display:grid;grid-template-areas:\"legend\" \"content\";grid-template-rows:auto minmax(0,1fr);min-height:0}.table-wrapper[data-legend-position=bottom]{grid-template-areas:\"content\" \"legend\";grid-template-rows:minmax(0,1fr) auto}.table-wrapper[data-legend-position=left]{grid-template-areas:\"legend content\";grid-template-columns:auto minmax(0,1fr);grid-template-rows:minmax(0,1fr)}.table-wrapper[data-legend-position=right]{grid-template-areas:\"content legend\";grid-template-columns:minmax(0,1fr) auto;grid-template-rows:minmax(0,1fr)}.table-content{grid-area:content;min-height:0;min-width:0;display:flex;flex-direction:column}.table-legend-host{grid-area:legend;min-width:0;padding:.25rem .5rem}.table-wrapper[data-legend-position=left] .table-legend-host,.table-wrapper[data-legend-position=right] .table-legend-host{max-width:12rem;overflow:auto}.table-legend-marker{display:inline-block;width:.625rem;height:.625rem;flex:0 0 auto;border-radius:999px}.table-legend-marker.shape-rect{border-radius:0}.table-legend-marker.shape-roundRect{border-radius:.2rem}.table-legend-marker.shape-diamond{border-radius:.0625rem;transform:rotate(45deg)}.table-legend-marker.shape-triangle{width:0;height:0;background:transparent!important;border-radius:0;border-left:.34rem solid transparent;border-right:.34rem solid transparent;border-bottom-width:.6rem;border-bottom-style:solid}.table-scroll-container{flex:1;min-height:0}table{border-collapse:collapse}.dashboard-table-row{height:48px}.dashboard-table-spacer td{border:0;padding:0}th,td{text-align:start}\n"] }]
32581
+ }], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }], inGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "inGroup", required: false }] }], hideHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideHeader", required: false }] }], onAction: [{ type: i0.Output, args: ["onAction"] }], gridCells: [{ type: i0.ViewChildren, args: ['gridCell', { isSignal: true }] }], gridHost: [{ type: i0.ViewChild, args: ['gridHost', { isSignal: true }] }] } });
32362
32582
 
32363
32583
  /**
32364
32584
  * Statistic Card Component
@@ -32640,11 +32860,11 @@ class ListStatisticCardComponent {
32640
32860
  this.onAction.emit({ type, data: body });
32641
32861
  }
32642
32862
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ListStatisticCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
32643
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: ListStatisticCardComponent, isStandalone: true, selector: "mt-list-statistic-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onAction: "onAction" }, ngImport: i0, template: "<div class=\"flex h-full w-full justify-between\">\r\n <mt-statistic-card\r\n [config]=\"dataHandled()\"\r\n [style.width]=\"dataHandled()?.width\"\r\n [styleConfig]=\"styleConfig()\"\r\n [configurationItem]=\"configurationItem()\"\r\n (cardClick)=\"doActions($event, 'click')\"\r\n />\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: StatisticCardComponent, selector: "mt-statistic-card", inputs: ["config", "styleConfig", "configurationItem"], outputs: ["cardClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
32863
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: ListStatisticCardComponent, isStandalone: true, selector: "mt-list-statistic-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onAction: "onAction" }, ngImport: i0, template: "<div class=\"flex h-full w-full justify-between\">\n <mt-statistic-card\n [config]=\"dataHandled()\"\n [style.width]=\"dataHandled()?.width\"\n [styleConfig]=\"styleConfig()\"\n [configurationItem]=\"configurationItem()\"\n (cardClick)=\"doActions($event, 'click')\"\n />\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: StatisticCardComponent, selector: "mt-statistic-card", inputs: ["config", "styleConfig", "configurationItem"], outputs: ["cardClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
32644
32864
  }
32645
32865
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ListStatisticCardComponent, decorators: [{
32646
32866
  type: Component,
32647
- args: [{ selector: 'mt-list-statistic-card', standalone: true, imports: [CommonModule, StatisticCardComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex h-full w-full justify-between\">\r\n <mt-statistic-card\r\n [config]=\"dataHandled()\"\r\n [style.width]=\"dataHandled()?.width\"\r\n [styleConfig]=\"styleConfig()\"\r\n [configurationItem]=\"configurationItem()\"\r\n (cardClick)=\"doActions($event, 'click')\"\r\n />\r\n</div>\r\n" }]
32867
+ args: [{ selector: 'mt-list-statistic-card', standalone: true, imports: [CommonModule, StatisticCardComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex h-full w-full justify-between\">\n <mt-statistic-card\n [config]=\"dataHandled()\"\n [style.width]=\"dataHandled()?.width\"\n [styleConfig]=\"styleConfig()\"\n [configurationItem]=\"configurationItem()\"\n (cardClick)=\"doActions($event, 'click')\"\n />\n</div>\n" }]
32648
32868
  }], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }], onAction: [{ type: i0.Output, args: ["onAction"] }] } });
32649
32869
 
32650
32870
  /**
@@ -33036,34 +33256,34 @@ class SkeletonCardComponent {
33036
33256
  }
33037
33257
  }
33038
33258
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SkeletonCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
33039
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SkeletonCardComponent, isStandalone: true, selector: "mt-skeleton-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
33040
- <div class="skeleton-container">
33041
- @for (skeleton of skeletons(); track $index) {
33042
- <div
33043
- class="skeleton-item"
33044
- [style.width]="skeleton.width"
33045
- [style.height]="skeleton.height"
33046
- >
33047
- <div class="skeleton-animation"></div>
33048
- </div>
33049
- }
33050
- </div>
33259
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SkeletonCardComponent, isStandalone: true, selector: "mt-skeleton-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
33260
+ <div class="skeleton-container">
33261
+ @for (skeleton of skeletons(); track $index) {
33262
+ <div
33263
+ class="skeleton-item"
33264
+ [style.width]="skeleton.width"
33265
+ [style.height]="skeleton.height"
33266
+ >
33267
+ <div class="skeleton-animation"></div>
33268
+ </div>
33269
+ }
33270
+ </div>
33051
33271
  `, isInline: true, styles: [".skeleton-container{display:flex;flex-wrap:wrap;gap:1rem;width:100%;padding:1rem}.skeleton-item{background:#f5f5f5;border-radius:.5rem;overflow:hidden;position:relative}.skeleton-animation{position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.4),transparent);animation:shimmer 1.5s infinite}@keyframes shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
33052
33272
  }
33053
33273
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SkeletonCardComponent, decorators: [{
33054
33274
  type: Component,
33055
- args: [{ selector: 'mt-skeleton-card', standalone: true, imports: [CommonModule], template: `
33056
- <div class="skeleton-container">
33057
- @for (skeleton of skeletons(); track $index) {
33058
- <div
33059
- class="skeleton-item"
33060
- [style.width]="skeleton.width"
33061
- [style.height]="skeleton.height"
33062
- >
33063
- <div class="skeleton-animation"></div>
33064
- </div>
33065
- }
33066
- </div>
33275
+ args: [{ selector: 'mt-skeleton-card', standalone: true, imports: [CommonModule], template: `
33276
+ <div class="skeleton-container">
33277
+ @for (skeleton of skeletons(); track $index) {
33278
+ <div
33279
+ class="skeleton-item"
33280
+ [style.width]="skeleton.width"
33281
+ [style.height]="skeleton.height"
33282
+ >
33283
+ <div class="skeleton-animation"></div>
33284
+ </div>
33285
+ }
33286
+ </div>
33067
33287
  `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".skeleton-container{display:flex;flex-wrap:wrap;gap:1rem;width:100%;padding:1rem}.skeleton-item{background:#f5f5f5;border-radius:.5rem;overflow:hidden;position:relative}.skeleton-animation{position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.4),transparent);animation:shimmer 1.5s infinite}@keyframes shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}\n"] }]
33068
33288
  }], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }] } });
33069
33289
 
@@ -33737,7 +33957,7 @@ class PropertiesCardComponent {
33737
33957
  return '';
33738
33958
  }
33739
33959
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PropertiesCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
33740
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: PropertiesCardComponent, isStandalone: true, selector: "mt-properties-card, mt-entities-preview-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction" }, ngImport: i0, template: "<mt-card-content\r\n [inGroup]=\"inGroup()\"\r\n [headerConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\r\n \"\r\n [styleConfig]=\"\r\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\r\n \"\r\n [cardStyleConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\r\n \"\r\n [density]=\"configurationItem()?.clientConfig?.configAsType?.['density']\"\r\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\r\n [title]=\"title()\"\r\n>\r\n <ng-container body>\r\n <ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n @if (showTabs()) {\r\n <div class=\"mb-3\">\r\n <mt-tabs\r\n [(active)]=\"tabSelected\"\r\n [options]=\"tabOptions()\"\r\n size=\"small\"\r\n />\r\n </div>\r\n }\r\n\r\n <div\r\n class=\"overflow-y-auto overflow-x-hidden\"\r\n [style.max-height]=\"inGroup() ? '500px' : null\"\r\n >\r\n @if (currentTabCards().length === 0) {\r\n <div class=\"py-6 text-center text-sm text-gray-400\">\r\n {{ t(\"noData\") }}\r\n </div>\r\n } @else {\r\n <div\r\n class=\"db-cards-grid\"\r\n [class.db-cards-grid--gallery]=\"galleryMode()\"\r\n >\r\n @for (cardView of currentTabCards(); track cardView.trackId) {\r\n <div\r\n class=\"mb-2 cursor-pointer p-2\"\r\n (click)=\"onCardClick(cardView.card)\"\r\n >\r\n <div class=\"rounded-lg bg-white p-3 shadow-sm\">\r\n @defer (on viewport) {\r\n <ng-container>\r\n @if (cardView.entities.length > 0) {\r\n <mt-entities-preview\r\n [entities]=\"cardView.entities\"\r\n [stackOnNarrow]=\"false\"\r\n />\r\n } @else {\r\n <div class=\"py-6 text-center text-sm text-gray-400\">\r\n {{ t(\"noData\") }}\r\n </div>\r\n }\r\n </ng-container>\r\n } @placeholder {\r\n <div class=\"min-h-24 p-2\">\r\n <div class=\"flex animate-pulse flex-col gap-3\">\r\n <div class=\"h-4 w-2/3 rounded bg-surface-200\"></div>\r\n <div class=\"h-4 w-full rounded bg-surface-100\"></div>\r\n <div class=\"h-4 w-5/6 rounded bg-surface-100\"></div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n</mt-card-content>\r\n", styles: [":host{display:block;height:100%}.db-cards-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:.25rem}.db-cards-grid--gallery{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [EntitiesPreview]] });
33960
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: PropertiesCardComponent, isStandalone: true, selector: "mt-properties-card, mt-entities-preview-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction" }, ngImport: i0, template: "<mt-card-content\n [inGroup]=\"inGroup()\"\n [headerConfig]=\"\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\n \"\n [styleConfig]=\"\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\n \"\n [cardStyleConfig]=\"\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\n \"\n [density]=\"configurationItem()?.clientConfig?.configAsType?.['density']\"\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\n [title]=\"title()\"\n>\n <ng-container body>\n <ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\n @if (showTabs()) {\n <div class=\"mb-3\">\n <mt-tabs\n [(active)]=\"tabSelected\"\n [options]=\"tabOptions()\"\n size=\"small\"\n />\n </div>\n }\n\n <div\n class=\"overflow-y-auto overflow-x-hidden\"\n [style.max-height]=\"inGroup() ? '500px' : null\"\n >\n @if (currentTabCards().length === 0) {\n <div class=\"py-6 text-center text-sm text-gray-400\">\n {{ t(\"noData\") }}\n </div>\n } @else {\n <div\n class=\"db-cards-grid\"\n [class.db-cards-grid--gallery]=\"galleryMode()\"\n >\n @for (cardView of currentTabCards(); track cardView.trackId) {\n <div\n class=\"mb-2 cursor-pointer p-2\"\n (click)=\"onCardClick(cardView.card)\"\n >\n <div class=\"rounded-lg bg-white p-3 shadow-sm\">\n @defer (on viewport) {\n <ng-container>\n @if (cardView.entities.length > 0) {\n <mt-entities-preview\n [entities]=\"cardView.entities\"\n [stackOnNarrow]=\"false\"\n />\n } @else {\n <div class=\"py-6 text-center text-sm text-gray-400\">\n {{ t(\"noData\") }}\n </div>\n }\n </ng-container>\n } @placeholder {\n <div class=\"min-h-24 p-2\">\n <div class=\"flex animate-pulse flex-col gap-3\">\n <div class=\"h-4 w-2/3 rounded bg-surface-200\"></div>\n <div class=\"h-4 w-full rounded bg-surface-100\"></div>\n <div class=\"h-4 w-5/6 rounded bg-surface-100\"></div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n </ng-container>\n </ng-container>\n</mt-card-content>\n", styles: [":host{display:block;height:100%}.db-cards-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:.25rem}.db-cards-grid--gallery{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [EntitiesPreview]] });
33741
33961
  }
33742
33962
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PropertiesCardComponent, decorators: [{
33743
33963
  type: Component,
@@ -33747,7 +33967,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
33747
33967
  Tabs,
33748
33968
  EntitiesPreview,
33749
33969
  CardContentComponent,
33750
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mt-card-content\r\n [inGroup]=\"inGroup()\"\r\n [headerConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\r\n \"\r\n [styleConfig]=\"\r\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\r\n \"\r\n [cardStyleConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\r\n \"\r\n [density]=\"configurationItem()?.clientConfig?.configAsType?.['density']\"\r\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\r\n [title]=\"title()\"\r\n>\r\n <ng-container body>\r\n <ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n @if (showTabs()) {\r\n <div class=\"mb-3\">\r\n <mt-tabs\r\n [(active)]=\"tabSelected\"\r\n [options]=\"tabOptions()\"\r\n size=\"small\"\r\n />\r\n </div>\r\n }\r\n\r\n <div\r\n class=\"overflow-y-auto overflow-x-hidden\"\r\n [style.max-height]=\"inGroup() ? '500px' : null\"\r\n >\r\n @if (currentTabCards().length === 0) {\r\n <div class=\"py-6 text-center text-sm text-gray-400\">\r\n {{ t(\"noData\") }}\r\n </div>\r\n } @else {\r\n <div\r\n class=\"db-cards-grid\"\r\n [class.db-cards-grid--gallery]=\"galleryMode()\"\r\n >\r\n @for (cardView of currentTabCards(); track cardView.trackId) {\r\n <div\r\n class=\"mb-2 cursor-pointer p-2\"\r\n (click)=\"onCardClick(cardView.card)\"\r\n >\r\n <div class=\"rounded-lg bg-white p-3 shadow-sm\">\r\n @defer (on viewport) {\r\n <ng-container>\r\n @if (cardView.entities.length > 0) {\r\n <mt-entities-preview\r\n [entities]=\"cardView.entities\"\r\n [stackOnNarrow]=\"false\"\r\n />\r\n } @else {\r\n <div class=\"py-6 text-center text-sm text-gray-400\">\r\n {{ t(\"noData\") }}\r\n </div>\r\n }\r\n </ng-container>\r\n } @placeholder {\r\n <div class=\"min-h-24 p-2\">\r\n <div class=\"flex animate-pulse flex-col gap-3\">\r\n <div class=\"h-4 w-2/3 rounded bg-surface-200\"></div>\r\n <div class=\"h-4 w-full rounded bg-surface-100\"></div>\r\n <div class=\"h-4 w-5/6 rounded bg-surface-100\"></div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n</mt-card-content>\r\n", styles: [":host{display:block;height:100%}.db-cards-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:.25rem}.db-cards-grid--gallery{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}\n"] }]
33970
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mt-card-content\n [inGroup]=\"inGroup()\"\n [headerConfig]=\"\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\n \"\n [styleConfig]=\"\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\n \"\n [cardStyleConfig]=\"\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\n \"\n [density]=\"configurationItem()?.clientConfig?.configAsType?.['density']\"\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\n [title]=\"title()\"\n>\n <ng-container body>\n <ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\n @if (showTabs()) {\n <div class=\"mb-3\">\n <mt-tabs\n [(active)]=\"tabSelected\"\n [options]=\"tabOptions()\"\n size=\"small\"\n />\n </div>\n }\n\n <div\n class=\"overflow-y-auto overflow-x-hidden\"\n [style.max-height]=\"inGroup() ? '500px' : null\"\n >\n @if (currentTabCards().length === 0) {\n <div class=\"py-6 text-center text-sm text-gray-400\">\n {{ t(\"noData\") }}\n </div>\n } @else {\n <div\n class=\"db-cards-grid\"\n [class.db-cards-grid--gallery]=\"galleryMode()\"\n >\n @for (cardView of currentTabCards(); track cardView.trackId) {\n <div\n class=\"mb-2 cursor-pointer p-2\"\n (click)=\"onCardClick(cardView.card)\"\n >\n <div class=\"rounded-lg bg-white p-3 shadow-sm\">\n @defer (on viewport) {\n <ng-container>\n @if (cardView.entities.length > 0) {\n <mt-entities-preview\n [entities]=\"cardView.entities\"\n [stackOnNarrow]=\"false\"\n />\n } @else {\n <div class=\"py-6 text-center text-sm text-gray-400\">\n {{ t(\"noData\") }}\n </div>\n }\n </ng-container>\n } @placeholder {\n <div class=\"min-h-24 p-2\">\n <div class=\"flex animate-pulse flex-col gap-3\">\n <div class=\"h-4 w-2/3 rounded bg-surface-200\"></div>\n <div class=\"h-4 w-full rounded bg-surface-100\"></div>\n <div class=\"h-4 w-5/6 rounded bg-surface-100\"></div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n </ng-container>\n </ng-container>\n</mt-card-content>\n", styles: [":host{display:block;height:100%}.db-cards-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:.25rem}.db-cards-grid--gallery{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}\n"] }]
33751
33971
  }], ctorParameters: () => [], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }], inGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "inGroup", required: false }] }], onAction: [{ type: i0.Output, args: ["onAction"] }] } });
33752
33972
 
33753
33973
  /**
@@ -37649,7 +37869,7 @@ class StyleStudioDrawer {
37649
37869
  return out === full ? fallback : out;
37650
37870
  }
37651
37871
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: StyleStudioDrawer, deps: [], target: i0.ɵɵFactoryTarget.Component });
37652
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: StyleStudioDrawer, isStandalone: true, selector: "mt-style-studio-drawer", viewQueries: [{ propertyName: "scrollPane", first: true, predicate: ["scrollPane"], descendants: true, isSignal: true }, { propertyName: "previewViewer", first: true, predicate: ChartViewer, descendants: true, isSignal: true }], ngImport: i0, template: "<div\r\n [class]=\"modal.contentClass + ' db-style-studio flex h-full min-h-0 flex-col'\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <!-- Header -->\r\n <div\r\n class=\"flex flex-wrap items-center gap-3 border-b border-surface-200 bg-surface-0 px-4 py-3\"\r\n >\r\n <span\r\n class=\"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary-100 text-primary-600\"\r\n >\r\n <mt-icon [icon]=\"chartIcon()\" class=\"text-lg\" />\r\n </span>\r\n <div class=\"mr-auto min-w-0\">\r\n <h3 class=\"truncate text-sm font-semibold text-color\">\r\n {{ t(\"styleStudio.title\") }}\r\n </h3>\r\n <p class=\"truncate text-xs text-muted-color\" mtTruncateTooltip>\r\n {{ chartName() }}\r\n </p>\r\n </div>\r\n\r\n <mt-segmented-field\r\n [options]=\"scopeOptions()\"\r\n [value]=\"scope()\"\r\n [ariaLabel]=\"t('styleStudio.detailLevel')\"\r\n (valueChange)=\"onScopeChange($event)\"\r\n />\r\n\r\n <mt-text-field\r\n class=\"w-56 self-center\"\r\n icon=\"general.search-md\"\r\n iconPosition=\"start\"\r\n [placeholder]=\"t('styleStudio.findSetting')\"\r\n [field]=\"false\"\r\n [formControl]=\"searchControl\"\r\n />\r\n </div>\r\n\r\n <!-- Body -->\r\n <div class=\"flex min-h-0 flex-1\">\r\n <!-- Left rail (sections grouped under category headers) -->\r\n <nav\r\n class=\"db-style-studio__rail hidden w-52 shrink-0 flex-col gap-1 overflow-y-auto border-r border-surface-200 bg-surface-50 p-2 md:flex\"\r\n >\r\n @for (group of navGroups(); track group.label) {\r\n <div class=\"mt-2 first:mt-0\">\r\n <p\r\n class=\"px-3 pb-1 pt-1 text-[0.65rem] font-semibold uppercase tracking-wider text-muted-color\"\r\n >\r\n {{ group.label }}\r\n </p>\r\n @for (section of group.sections; track section.key) {\r\n <button\r\n type=\"button\"\r\n class=\"flex w-full items-center gap-2 rounded-lg px-3 py-1.5 text-left text-sm font-medium transition-colors duration-200\"\r\n [class.bg-surface-0]=\"activeSection() === section.key\"\r\n [class.text-primary-600]=\"activeSection() === section.key\"\r\n [class.shadow-sm]=\"activeSection() === section.key\"\r\n [class.text-muted-color]=\"activeSection() !== section.key\"\r\n [class.hover:bg-surface-100]=\"activeSection() !== section.key\"\r\n (click)=\"scrollTo(section)\"\r\n >\r\n <mt-icon [icon]=\"section.icon\" class=\"text-base\" />\r\n <span class=\"truncate\" mtTruncateTooltip>{{\r\n section.label\r\n }}</span>\r\n </button>\r\n }\r\n </div>\r\n }\r\n </nav>\r\n\r\n <!-- Settings pane -->\r\n <div\r\n #scrollPane\r\n class=\"min-w-0 flex-1 overflow-y-auto p-4\"\r\n (scroll)=\"onScroll()\"\r\n >\r\n <mt-style-settings-renderer\r\n [visibleSections]=\"navSections()\"\r\n [persisted]=\"itemConfig()\"\r\n [capability]=\"capability()\"\r\n [scope]=\"scope()\"\r\n [legendItems]=\"legendItems()\"\r\n (patch)=\"onPatch($event)\"\r\n (requestScope)=\"scope.set($event)\"\r\n />\r\n </div>\r\n\r\n <!-- Resizable splitter (config \u2194 preview) -->\r\n <div\r\n class=\"db-style-studio__splitter hidden w-1.5 shrink-0 cursor-col-resize touch-none bg-surface-200 transition-colors hover:bg-primary-400 lg:block\"\r\n role=\"separator\"\r\n aria-orientation=\"vertical\"\r\n [attr.aria-label]=\"t('styleStudio.messages.resizePreview')\"\r\n (pointerdown)=\"startResize($event)\"\r\n (pointermove)=\"onResizeMove($event)\"\r\n (pointerup)=\"endResize()\"\r\n (pointercancel)=\"endResize()\"\r\n ></div>\r\n\r\n <!-- Live preview (renders ALL widget types via the dashboard item) -->\r\n <div\r\n class=\"db-style-studio__preview hidden shrink-0 flex-col bg-surface-50 p-4 lg:flex\"\r\n [style.width.px]=\"previewWidth()\"\r\n >\r\n <div\r\n class=\"mb-2 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wide text-muted-color\"\r\n >\r\n <mt-icon icon=\"general.eye\" class=\"text-sm\" />\r\n <span>{{ t(\"styleStudio.livePreview\") }}</span>\r\n </div>\r\n <div class=\"min-h-0 flex-1 overflow-auto\">\r\n <!-- Dialog chrome. A linked dialog opens in a modal, so its header \u2014\r\n not a card header \u2014 is what the \"Dialog header\" section edits.\r\n Both wrappers collapse to `contents` for every other widget, so\r\n the ordinary preview layout is untouched. -->\r\n <div [class]=\"previewFrameClass()\">\r\n @if (isDialogPreview()) {\r\n <div\r\n class=\"flex shrink-0 items-center gap-2 border-b border-surface-200 bg-surface-100 px-5 py-4\"\r\n >\r\n @if (dialogHeaderPreview().icon) {\r\n <mt-icon\r\n [icon]=\"$any(dialogHeaderPreview().icon)\"\r\n class=\"shrink-0 text-lg\"\r\n [style.color]=\"dialogHeaderPreview().iconColor || 'inherit'\"\r\n />\r\n }\r\n <span\r\n class=\"min-w-0 flex-1 truncate font-semibold text-color\"\r\n mtTruncateTooltip\r\n >{{\r\n dialogHeaderPreview().title ||\r\n t(\"styleStudio.messages.untitledDialog\")\r\n }}</span\r\n >\r\n <span\r\n class=\"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-surface-0 text-muted-color\"\r\n aria-hidden=\"true\"\r\n >\r\n <mt-icon icon=\"general.x-close\" class=\"text-sm\" />\r\n </span>\r\n </div>\r\n }\r\n <div [class]=\"previewBodyClass()\">\r\n <mt-chart-viewer\r\n [config]=\"previewConfig()\"\r\n [chartTypeId]=\"previewChartTypeId()\"\r\n [hideHeader]=\"isDialogPreview()\"\r\n [useCachedDataOnly]=\"true\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- Footer \u2014 sibling of content so the drawer pins it to the bottom -->\r\n<div\r\n [class]=\"\r\n modal.footerClass + ' border-t border-surface-200 bg-surface-0 px-4 py-3'\r\n \"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <mt-button\r\n [label]=\"t('styleStudio.resetAll')\"\r\n icon=\"arrow.refresh-ccw-01\"\r\n severity=\"secondary\"\r\n variant=\"text\"\r\n class=\"mr-auto\"\r\n (onClick)=\"resetAll()\"\r\n />\r\n <mt-button [label]=\"t('cancel')\" variant=\"outlined\" (onClick)=\"close()\" />\r\n <mt-button [label]=\"t('apply')\" icon=\"general.check\" (onClick)=\"apply()\" />\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.db-style-studio mt-style-field,.db-style-studio mt-text-field,.db-style-studio mt-number-field,.db-style-studio mt-select-field,.db-style-studio mt-multi-select-field,.db-style-studio mt-textarea-field,.db-style-studio mt-slider-field,.db-style-studio mt-color-picker-field{display:block;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "directive", type: TruncateTooltip, selector: "[mtTruncateTooltip]" }, { kind: "component", type: StyleSettingsRenderer, selector: "mt-style-settings-renderer", inputs: ["visibleSections", "persisted", "capability", "scope", "legendItems"], outputs: ["patch", "requestScope"] }, { kind: "component", type: SegmentedField, selector: "mt-segmented-field", inputs: ["options", "value", "disabled", "ariaLabel"], outputs: ["valueChange"] }, { kind: "component", type: ChartViewer, selector: "mt-chart-viewer", inputs: ["config", "chartTypeId", "hideHeader", "useCachedDataOnly"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
37872
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: StyleStudioDrawer, isStandalone: true, selector: "mt-style-studio-drawer", viewQueries: [{ propertyName: "scrollPane", first: true, predicate: ["scrollPane"], descendants: true, isSignal: true }, { propertyName: "previewViewer", first: true, predicate: ChartViewer, descendants: true, isSignal: true }], ngImport: i0, template: "<div\n [class]=\"modal.contentClass + ' db-style-studio flex h-full min-h-0 flex-col'\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n>\n <!-- Header -->\n <div\n class=\"flex flex-wrap items-center gap-3 border-b border-surface-200 bg-surface-0 px-4 py-3\"\n >\n <span\n class=\"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary-100 text-primary-600\"\n >\n <mt-icon [icon]=\"chartIcon()\" class=\"text-lg\" />\n </span>\n <div class=\"mr-auto min-w-0\">\n <h3 class=\"truncate text-sm font-semibold text-color\">\n {{ t(\"styleStudio.title\") }}\n </h3>\n <p class=\"truncate text-xs text-muted-color\" mtTruncateTooltip>\n {{ chartName() }}\n </p>\n </div>\n\n <mt-segmented-field\n [options]=\"scopeOptions()\"\n [value]=\"scope()\"\n [ariaLabel]=\"t('styleStudio.detailLevel')\"\n (valueChange)=\"onScopeChange($event)\"\n />\n\n <mt-text-field\n class=\"w-56 self-center\"\n icon=\"general.search-md\"\n iconPosition=\"start\"\n [placeholder]=\"t('styleStudio.findSetting')\"\n [field]=\"false\"\n [formControl]=\"searchControl\"\n />\n </div>\n\n <!-- Body -->\n <div class=\"flex min-h-0 flex-1\">\n <!-- Left rail (sections grouped under category headers) -->\n <nav\n class=\"db-style-studio__rail hidden w-52 shrink-0 flex-col gap-1 overflow-y-auto border-r border-surface-200 bg-surface-50 p-2 md:flex\"\n >\n @for (group of navGroups(); track group.label) {\n <div class=\"mt-2 first:mt-0\">\n <p\n class=\"px-3 pb-1 pt-1 text-[0.65rem] font-semibold uppercase tracking-wider text-muted-color\"\n >\n {{ group.label }}\n </p>\n @for (section of group.sections; track section.key) {\n <button\n type=\"button\"\n class=\"flex w-full items-center gap-2 rounded-lg px-3 py-1.5 text-left text-sm font-medium transition-colors duration-200\"\n [class.bg-surface-0]=\"activeSection() === section.key\"\n [class.text-primary-600]=\"activeSection() === section.key\"\n [class.shadow-sm]=\"activeSection() === section.key\"\n [class.text-muted-color]=\"activeSection() !== section.key\"\n [class.hover:bg-surface-100]=\"activeSection() !== section.key\"\n (click)=\"scrollTo(section)\"\n >\n <mt-icon [icon]=\"section.icon\" class=\"text-base\" />\n <span class=\"truncate\" mtTruncateTooltip>{{\n section.label\n }}</span>\n </button>\n }\n </div>\n }\n </nav>\n\n <!-- Settings pane -->\n <div\n #scrollPane\n class=\"min-w-0 flex-1 overflow-y-auto p-4\"\n (scroll)=\"onScroll()\"\n >\n <mt-style-settings-renderer\n [visibleSections]=\"navSections()\"\n [persisted]=\"itemConfig()\"\n [capability]=\"capability()\"\n [scope]=\"scope()\"\n [legendItems]=\"legendItems()\"\n (patch)=\"onPatch($event)\"\n (requestScope)=\"scope.set($event)\"\n />\n </div>\n\n <!-- Resizable splitter (config \u2194 preview) -->\n <div\n class=\"db-style-studio__splitter hidden w-1.5 shrink-0 cursor-col-resize touch-none bg-surface-200 transition-colors hover:bg-primary-400 lg:block\"\n role=\"separator\"\n aria-orientation=\"vertical\"\n [attr.aria-label]=\"t('styleStudio.messages.resizePreview')\"\n (pointerdown)=\"startResize($event)\"\n (pointermove)=\"onResizeMove($event)\"\n (pointerup)=\"endResize()\"\n (pointercancel)=\"endResize()\"\n ></div>\n\n <!-- Live preview (renders ALL widget types via the dashboard item) -->\n <div\n class=\"db-style-studio__preview hidden shrink-0 flex-col bg-surface-50 p-4 lg:flex\"\n [style.width.px]=\"previewWidth()\"\n >\n <div\n class=\"mb-2 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wide text-muted-color\"\n >\n <mt-icon icon=\"general.eye\" class=\"text-sm\" />\n <span>{{ t(\"styleStudio.livePreview\") }}</span>\n </div>\n <div class=\"min-h-0 flex-1 overflow-auto\">\n <!-- Dialog chrome. A linked dialog opens in a modal, so its header \u2014\n not a card header \u2014 is what the \"Dialog header\" section edits.\n Both wrappers collapse to `contents` for every other widget, so\n the ordinary preview layout is untouched. -->\n <div [class]=\"previewFrameClass()\">\n @if (isDialogPreview()) {\n <div\n class=\"flex shrink-0 items-center gap-2 border-b border-surface-200 bg-surface-100 px-5 py-4\"\n >\n @if (dialogHeaderPreview().icon) {\n <mt-icon\n [icon]=\"$any(dialogHeaderPreview().icon)\"\n class=\"shrink-0 text-lg\"\n [style.color]=\"dialogHeaderPreview().iconColor || 'inherit'\"\n />\n }\n <span\n class=\"min-w-0 flex-1 truncate font-semibold text-color\"\n mtTruncateTooltip\n >{{\n dialogHeaderPreview().title ||\n t(\"styleStudio.messages.untitledDialog\")\n }}</span\n >\n <span\n class=\"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-surface-0 text-muted-color\"\n aria-hidden=\"true\"\n >\n <mt-icon icon=\"general.x-close\" class=\"text-sm\" />\n </span>\n </div>\n }\n <div [class]=\"previewBodyClass()\">\n <mt-chart-viewer\n [config]=\"previewConfig()\"\n [chartTypeId]=\"previewChartTypeId()\"\n [hideHeader]=\"isDialogPreview()\"\n [useCachedDataOnly]=\"true\"\n />\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<!-- Footer \u2014 sibling of content so the drawer pins it to the bottom -->\n<div\n [class]=\"\n modal.footerClass + ' border-t border-surface-200 bg-surface-0 px-4 py-3'\n \"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n>\n <mt-button\n [label]=\"t('styleStudio.resetAll')\"\n icon=\"arrow.refresh-ccw-01\"\n severity=\"secondary\"\n variant=\"text\"\n class=\"mr-auto\"\n (onClick)=\"resetAll()\"\n />\n <mt-button [label]=\"t('cancel')\" variant=\"outlined\" (onClick)=\"close()\" />\n <mt-button [label]=\"t('apply')\" icon=\"general.check\" (onClick)=\"apply()\" />\n</div>\n", styles: ["@charset \"UTF-8\";.db-style-studio mt-style-field,.db-style-studio mt-text-field,.db-style-studio mt-number-field,.db-style-studio mt-select-field,.db-style-studio mt-multi-select-field,.db-style-studio mt-textarea-field,.db-style-studio mt-slider-field,.db-style-studio mt-color-picker-field{display:block;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "directive", type: TruncateTooltip, selector: "[mtTruncateTooltip]" }, { kind: "component", type: StyleSettingsRenderer, selector: "mt-style-settings-renderer", inputs: ["visibleSections", "persisted", "capability", "scope", "legendItems"], outputs: ["patch", "requestScope"] }, { kind: "component", type: SegmentedField, selector: "mt-segmented-field", inputs: ["options", "value", "disabled", "ariaLabel"], outputs: ["valueChange"] }, { kind: "component", type: ChartViewer, selector: "mt-chart-viewer", inputs: ["config", "chartTypeId", "hideHeader", "useCachedDataOnly"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
37653
37873
  }
37654
37874
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: StyleStudioDrawer, decorators: [{
37655
37875
  type: Component,
@@ -37664,7 +37884,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
37664
37884
  StyleSettingsRenderer,
37665
37885
  SegmentedField,
37666
37886
  ChartViewer,
37667
- ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\r\n [class]=\"modal.contentClass + ' db-style-studio flex h-full min-h-0 flex-col'\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <!-- Header -->\r\n <div\r\n class=\"flex flex-wrap items-center gap-3 border-b border-surface-200 bg-surface-0 px-4 py-3\"\r\n >\r\n <span\r\n class=\"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary-100 text-primary-600\"\r\n >\r\n <mt-icon [icon]=\"chartIcon()\" class=\"text-lg\" />\r\n </span>\r\n <div class=\"mr-auto min-w-0\">\r\n <h3 class=\"truncate text-sm font-semibold text-color\">\r\n {{ t(\"styleStudio.title\") }}\r\n </h3>\r\n <p class=\"truncate text-xs text-muted-color\" mtTruncateTooltip>\r\n {{ chartName() }}\r\n </p>\r\n </div>\r\n\r\n <mt-segmented-field\r\n [options]=\"scopeOptions()\"\r\n [value]=\"scope()\"\r\n [ariaLabel]=\"t('styleStudio.detailLevel')\"\r\n (valueChange)=\"onScopeChange($event)\"\r\n />\r\n\r\n <mt-text-field\r\n class=\"w-56 self-center\"\r\n icon=\"general.search-md\"\r\n iconPosition=\"start\"\r\n [placeholder]=\"t('styleStudio.findSetting')\"\r\n [field]=\"false\"\r\n [formControl]=\"searchControl\"\r\n />\r\n </div>\r\n\r\n <!-- Body -->\r\n <div class=\"flex min-h-0 flex-1\">\r\n <!-- Left rail (sections grouped under category headers) -->\r\n <nav\r\n class=\"db-style-studio__rail hidden w-52 shrink-0 flex-col gap-1 overflow-y-auto border-r border-surface-200 bg-surface-50 p-2 md:flex\"\r\n >\r\n @for (group of navGroups(); track group.label) {\r\n <div class=\"mt-2 first:mt-0\">\r\n <p\r\n class=\"px-3 pb-1 pt-1 text-[0.65rem] font-semibold uppercase tracking-wider text-muted-color\"\r\n >\r\n {{ group.label }}\r\n </p>\r\n @for (section of group.sections; track section.key) {\r\n <button\r\n type=\"button\"\r\n class=\"flex w-full items-center gap-2 rounded-lg px-3 py-1.5 text-left text-sm font-medium transition-colors duration-200\"\r\n [class.bg-surface-0]=\"activeSection() === section.key\"\r\n [class.text-primary-600]=\"activeSection() === section.key\"\r\n [class.shadow-sm]=\"activeSection() === section.key\"\r\n [class.text-muted-color]=\"activeSection() !== section.key\"\r\n [class.hover:bg-surface-100]=\"activeSection() !== section.key\"\r\n (click)=\"scrollTo(section)\"\r\n >\r\n <mt-icon [icon]=\"section.icon\" class=\"text-base\" />\r\n <span class=\"truncate\" mtTruncateTooltip>{{\r\n section.label\r\n }}</span>\r\n </button>\r\n }\r\n </div>\r\n }\r\n </nav>\r\n\r\n <!-- Settings pane -->\r\n <div\r\n #scrollPane\r\n class=\"min-w-0 flex-1 overflow-y-auto p-4\"\r\n (scroll)=\"onScroll()\"\r\n >\r\n <mt-style-settings-renderer\r\n [visibleSections]=\"navSections()\"\r\n [persisted]=\"itemConfig()\"\r\n [capability]=\"capability()\"\r\n [scope]=\"scope()\"\r\n [legendItems]=\"legendItems()\"\r\n (patch)=\"onPatch($event)\"\r\n (requestScope)=\"scope.set($event)\"\r\n />\r\n </div>\r\n\r\n <!-- Resizable splitter (config \u2194 preview) -->\r\n <div\r\n class=\"db-style-studio__splitter hidden w-1.5 shrink-0 cursor-col-resize touch-none bg-surface-200 transition-colors hover:bg-primary-400 lg:block\"\r\n role=\"separator\"\r\n aria-orientation=\"vertical\"\r\n [attr.aria-label]=\"t('styleStudio.messages.resizePreview')\"\r\n (pointerdown)=\"startResize($event)\"\r\n (pointermove)=\"onResizeMove($event)\"\r\n (pointerup)=\"endResize()\"\r\n (pointercancel)=\"endResize()\"\r\n ></div>\r\n\r\n <!-- Live preview (renders ALL widget types via the dashboard item) -->\r\n <div\r\n class=\"db-style-studio__preview hidden shrink-0 flex-col bg-surface-50 p-4 lg:flex\"\r\n [style.width.px]=\"previewWidth()\"\r\n >\r\n <div\r\n class=\"mb-2 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wide text-muted-color\"\r\n >\r\n <mt-icon icon=\"general.eye\" class=\"text-sm\" />\r\n <span>{{ t(\"styleStudio.livePreview\") }}</span>\r\n </div>\r\n <div class=\"min-h-0 flex-1 overflow-auto\">\r\n <!-- Dialog chrome. A linked dialog opens in a modal, so its header \u2014\r\n not a card header \u2014 is what the \"Dialog header\" section edits.\r\n Both wrappers collapse to `contents` for every other widget, so\r\n the ordinary preview layout is untouched. -->\r\n <div [class]=\"previewFrameClass()\">\r\n @if (isDialogPreview()) {\r\n <div\r\n class=\"flex shrink-0 items-center gap-2 border-b border-surface-200 bg-surface-100 px-5 py-4\"\r\n >\r\n @if (dialogHeaderPreview().icon) {\r\n <mt-icon\r\n [icon]=\"$any(dialogHeaderPreview().icon)\"\r\n class=\"shrink-0 text-lg\"\r\n [style.color]=\"dialogHeaderPreview().iconColor || 'inherit'\"\r\n />\r\n }\r\n <span\r\n class=\"min-w-0 flex-1 truncate font-semibold text-color\"\r\n mtTruncateTooltip\r\n >{{\r\n dialogHeaderPreview().title ||\r\n t(\"styleStudio.messages.untitledDialog\")\r\n }}</span\r\n >\r\n <span\r\n class=\"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-surface-0 text-muted-color\"\r\n aria-hidden=\"true\"\r\n >\r\n <mt-icon icon=\"general.x-close\" class=\"text-sm\" />\r\n </span>\r\n </div>\r\n }\r\n <div [class]=\"previewBodyClass()\">\r\n <mt-chart-viewer\r\n [config]=\"previewConfig()\"\r\n [chartTypeId]=\"previewChartTypeId()\"\r\n [hideHeader]=\"isDialogPreview()\"\r\n [useCachedDataOnly]=\"true\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- Footer \u2014 sibling of content so the drawer pins it to the bottom -->\r\n<div\r\n [class]=\"\r\n modal.footerClass + ' border-t border-surface-200 bg-surface-0 px-4 py-3'\r\n \"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <mt-button\r\n [label]=\"t('styleStudio.resetAll')\"\r\n icon=\"arrow.refresh-ccw-01\"\r\n severity=\"secondary\"\r\n variant=\"text\"\r\n class=\"mr-auto\"\r\n (onClick)=\"resetAll()\"\r\n />\r\n <mt-button [label]=\"t('cancel')\" variant=\"outlined\" (onClick)=\"close()\" />\r\n <mt-button [label]=\"t('apply')\" icon=\"general.check\" (onClick)=\"apply()\" />\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.db-style-studio mt-style-field,.db-style-studio mt-text-field,.db-style-studio mt-number-field,.db-style-studio mt-select-field,.db-style-studio mt-multi-select-field,.db-style-studio mt-textarea-field,.db-style-studio mt-slider-field,.db-style-studio mt-color-picker-field{display:block;width:100%}\n"] }]
37887
+ ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\n [class]=\"modal.contentClass + ' db-style-studio flex h-full min-h-0 flex-col'\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n>\n <!-- Header -->\n <div\n class=\"flex flex-wrap items-center gap-3 border-b border-surface-200 bg-surface-0 px-4 py-3\"\n >\n <span\n class=\"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary-100 text-primary-600\"\n >\n <mt-icon [icon]=\"chartIcon()\" class=\"text-lg\" />\n </span>\n <div class=\"mr-auto min-w-0\">\n <h3 class=\"truncate text-sm font-semibold text-color\">\n {{ t(\"styleStudio.title\") }}\n </h3>\n <p class=\"truncate text-xs text-muted-color\" mtTruncateTooltip>\n {{ chartName() }}\n </p>\n </div>\n\n <mt-segmented-field\n [options]=\"scopeOptions()\"\n [value]=\"scope()\"\n [ariaLabel]=\"t('styleStudio.detailLevel')\"\n (valueChange)=\"onScopeChange($event)\"\n />\n\n <mt-text-field\n class=\"w-56 self-center\"\n icon=\"general.search-md\"\n iconPosition=\"start\"\n [placeholder]=\"t('styleStudio.findSetting')\"\n [field]=\"false\"\n [formControl]=\"searchControl\"\n />\n </div>\n\n <!-- Body -->\n <div class=\"flex min-h-0 flex-1\">\n <!-- Left rail (sections grouped under category headers) -->\n <nav\n class=\"db-style-studio__rail hidden w-52 shrink-0 flex-col gap-1 overflow-y-auto border-r border-surface-200 bg-surface-50 p-2 md:flex\"\n >\n @for (group of navGroups(); track group.label) {\n <div class=\"mt-2 first:mt-0\">\n <p\n class=\"px-3 pb-1 pt-1 text-[0.65rem] font-semibold uppercase tracking-wider text-muted-color\"\n >\n {{ group.label }}\n </p>\n @for (section of group.sections; track section.key) {\n <button\n type=\"button\"\n class=\"flex w-full items-center gap-2 rounded-lg px-3 py-1.5 text-left text-sm font-medium transition-colors duration-200\"\n [class.bg-surface-0]=\"activeSection() === section.key\"\n [class.text-primary-600]=\"activeSection() === section.key\"\n [class.shadow-sm]=\"activeSection() === section.key\"\n [class.text-muted-color]=\"activeSection() !== section.key\"\n [class.hover:bg-surface-100]=\"activeSection() !== section.key\"\n (click)=\"scrollTo(section)\"\n >\n <mt-icon [icon]=\"section.icon\" class=\"text-base\" />\n <span class=\"truncate\" mtTruncateTooltip>{{\n section.label\n }}</span>\n </button>\n }\n </div>\n }\n </nav>\n\n <!-- Settings pane -->\n <div\n #scrollPane\n class=\"min-w-0 flex-1 overflow-y-auto p-4\"\n (scroll)=\"onScroll()\"\n >\n <mt-style-settings-renderer\n [visibleSections]=\"navSections()\"\n [persisted]=\"itemConfig()\"\n [capability]=\"capability()\"\n [scope]=\"scope()\"\n [legendItems]=\"legendItems()\"\n (patch)=\"onPatch($event)\"\n (requestScope)=\"scope.set($event)\"\n />\n </div>\n\n <!-- Resizable splitter (config \u2194 preview) -->\n <div\n class=\"db-style-studio__splitter hidden w-1.5 shrink-0 cursor-col-resize touch-none bg-surface-200 transition-colors hover:bg-primary-400 lg:block\"\n role=\"separator\"\n aria-orientation=\"vertical\"\n [attr.aria-label]=\"t('styleStudio.messages.resizePreview')\"\n (pointerdown)=\"startResize($event)\"\n (pointermove)=\"onResizeMove($event)\"\n (pointerup)=\"endResize()\"\n (pointercancel)=\"endResize()\"\n ></div>\n\n <!-- Live preview (renders ALL widget types via the dashboard item) -->\n <div\n class=\"db-style-studio__preview hidden shrink-0 flex-col bg-surface-50 p-4 lg:flex\"\n [style.width.px]=\"previewWidth()\"\n >\n <div\n class=\"mb-2 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wide text-muted-color\"\n >\n <mt-icon icon=\"general.eye\" class=\"text-sm\" />\n <span>{{ t(\"styleStudio.livePreview\") }}</span>\n </div>\n <div class=\"min-h-0 flex-1 overflow-auto\">\n <!-- Dialog chrome. A linked dialog opens in a modal, so its header \u2014\n not a card header \u2014 is what the \"Dialog header\" section edits.\n Both wrappers collapse to `contents` for every other widget, so\n the ordinary preview layout is untouched. -->\n <div [class]=\"previewFrameClass()\">\n @if (isDialogPreview()) {\n <div\n class=\"flex shrink-0 items-center gap-2 border-b border-surface-200 bg-surface-100 px-5 py-4\"\n >\n @if (dialogHeaderPreview().icon) {\n <mt-icon\n [icon]=\"$any(dialogHeaderPreview().icon)\"\n class=\"shrink-0 text-lg\"\n [style.color]=\"dialogHeaderPreview().iconColor || 'inherit'\"\n />\n }\n <span\n class=\"min-w-0 flex-1 truncate font-semibold text-color\"\n mtTruncateTooltip\n >{{\n dialogHeaderPreview().title ||\n t(\"styleStudio.messages.untitledDialog\")\n }}</span\n >\n <span\n class=\"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-surface-0 text-muted-color\"\n aria-hidden=\"true\"\n >\n <mt-icon icon=\"general.x-close\" class=\"text-sm\" />\n </span>\n </div>\n }\n <div [class]=\"previewBodyClass()\">\n <mt-chart-viewer\n [config]=\"previewConfig()\"\n [chartTypeId]=\"previewChartTypeId()\"\n [hideHeader]=\"isDialogPreview()\"\n [useCachedDataOnly]=\"true\"\n />\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<!-- Footer \u2014 sibling of content so the drawer pins it to the bottom -->\n<div\n [class]=\"\n modal.footerClass + ' border-t border-surface-200 bg-surface-0 px-4 py-3'\n \"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n>\n <mt-button\n [label]=\"t('styleStudio.resetAll')\"\n icon=\"arrow.refresh-ccw-01\"\n severity=\"secondary\"\n variant=\"text\"\n class=\"mr-auto\"\n (onClick)=\"resetAll()\"\n />\n <mt-button [label]=\"t('cancel')\" variant=\"outlined\" (onClick)=\"close()\" />\n <mt-button [label]=\"t('apply')\" icon=\"general.check\" (onClick)=\"apply()\" />\n</div>\n", styles: ["@charset \"UTF-8\";.db-style-studio mt-style-field,.db-style-studio mt-text-field,.db-style-studio mt-number-field,.db-style-studio mt-select-field,.db-style-studio mt-multi-select-field,.db-style-studio mt-textarea-field,.db-style-studio mt-slider-field,.db-style-studio mt-color-picker-field{display:block;width:100%}\n"] }]
37668
37888
  }], ctorParameters: () => [], propDecorators: { scrollPane: [{ type: i0.ViewChild, args: ['scrollPane', { isSignal: true }] }], previewViewer: [{ type: i0.ViewChild, args: [i0.forwardRef(() => ChartViewer), { isSignal: true }] }] } });
37669
37889
 
37670
37890
  /**
@@ -38588,7 +38808,7 @@ class CustomApiConfiguration {
38588
38808
  useExisting: forwardRef(() => CustomApiConfiguration),
38589
38809
  multi: true,
38590
38810
  },
38591
- ], ngImport: i0, template: "<mt-card\r\n [title]=\"t('customApi')\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <div class=\"flex flex-col gap-4\">\r\n <p class=\"text-sm text-muted-color\">\r\n {{ t(\"customApiDescription\") }}\r\n </p>\r\n\r\n <div class=\"grid grid-cols-12 gap-4\">\r\n <!-- HTTP Method -->\r\n <div class=\"col-span-3\">\r\n <mt-select-field\r\n [label]=\"t('httpMethod')\"\r\n [options]=\"methodOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [ngModel]=\"method()\"\r\n (ngModelChange)=\"onMethodChange($event)\"\r\n [disabled]=\"disabled()\"\r\n />\r\n </div>\r\n\r\n <!-- Custom API URL -->\r\n <div class=\"col-span-9\">\r\n <mt-text-field\r\n [label]=\"t('customApiUrl')\"\r\n [placeholder]=\"t('customApiUrlPlaceholder')\"\r\n [ngModel]=\"customApiUrl()\"\r\n (ngModelChange)=\"onUrlChange($event)\"\r\n [disabled]=\"disabled()\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n</mt-card>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
38811
+ ], ngImport: i0, template: "<mt-card\n [title]=\"t('customApi')\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n>\n <div class=\"flex flex-col gap-4\">\n <p class=\"text-sm text-muted-color\">\n {{ t(\"customApiDescription\") }}\n </p>\n\n <div class=\"grid grid-cols-12 gap-4\">\n <!-- HTTP Method -->\n <div class=\"col-span-3\">\n <mt-select-field\n [label]=\"t('httpMethod')\"\n [options]=\"methodOptions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [ngModel]=\"method()\"\n (ngModelChange)=\"onMethodChange($event)\"\n [disabled]=\"disabled()\"\n />\n </div>\n\n <!-- Custom API URL -->\n <div class=\"col-span-9\">\n <mt-text-field\n [label]=\"t('customApiUrl')\"\n [placeholder]=\"t('customApiUrlPlaceholder')\"\n [ngModel]=\"customApiUrl()\"\n (ngModelChange)=\"onUrlChange($event)\"\n [disabled]=\"disabled()\"\n />\n </div>\n </div>\n </div>\n</mt-card>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
38592
38812
  }
38593
38813
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CustomApiConfiguration, decorators: [{
38594
38814
  type: Component,
@@ -38605,7 +38825,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
38605
38825
  useExisting: forwardRef(() => CustomApiConfiguration),
38606
38826
  multi: true,
38607
38827
  },
38608
- ], template: "<mt-card\r\n [title]=\"t('customApi')\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <div class=\"flex flex-col gap-4\">\r\n <p class=\"text-sm text-muted-color\">\r\n {{ t(\"customApiDescription\") }}\r\n </p>\r\n\r\n <div class=\"grid grid-cols-12 gap-4\">\r\n <!-- HTTP Method -->\r\n <div class=\"col-span-3\">\r\n <mt-select-field\r\n [label]=\"t('httpMethod')\"\r\n [options]=\"methodOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [ngModel]=\"method()\"\r\n (ngModelChange)=\"onMethodChange($event)\"\r\n [disabled]=\"disabled()\"\r\n />\r\n </div>\r\n\r\n <!-- Custom API URL -->\r\n <div class=\"col-span-9\">\r\n <mt-text-field\r\n [label]=\"t('customApiUrl')\"\r\n [placeholder]=\"t('customApiUrlPlaceholder')\"\r\n [ngModel]=\"customApiUrl()\"\r\n (ngModelChange)=\"onUrlChange($event)\"\r\n [disabled]=\"disabled()\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n</mt-card>\r\n" }]
38828
+ ], template: "<mt-card\n [title]=\"t('customApi')\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n>\n <div class=\"flex flex-col gap-4\">\n <p class=\"text-sm text-muted-color\">\n {{ t(\"customApiDescription\") }}\n </p>\n\n <div class=\"grid grid-cols-12 gap-4\">\n <!-- HTTP Method -->\n <div class=\"col-span-3\">\n <mt-select-field\n [label]=\"t('httpMethod')\"\n [options]=\"methodOptions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [ngModel]=\"method()\"\n (ngModelChange)=\"onMethodChange($event)\"\n [disabled]=\"disabled()\"\n />\n </div>\n\n <!-- Custom API URL -->\n <div class=\"col-span-9\">\n <mt-text-field\n [label]=\"t('customApiUrl')\"\n [placeholder]=\"t('customApiUrlPlaceholder')\"\n [ngModel]=\"customApiUrl()\"\n (ngModelChange)=\"onUrlChange($event)\"\n [disabled]=\"disabled()\"\n />\n </div>\n </div>\n </div>\n</mt-card>\n" }]
38609
38829
  }] });
38610
38830
 
38611
38831
  const NUMERIC_VIEW_TYPES = new Set(['number', 'percentage', 'currency']);
@@ -40156,7 +40376,7 @@ class TimelineQuery {
40156
40376
  useExisting: forwardRef(() => TimelineQuery),
40157
40377
  multi: true,
40158
40378
  },
40159
- ], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\r\n <!-- Pivot Property -->\r\n <mt-select-field\r\n [label]=\"t('pivotProperty')\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [ngModel]=\"query().pivotProperty\"\r\n (ngModelChange)=\"updateField('pivotProperty', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n\r\n <!-- Lookup Property -->\r\n <mt-select-field\r\n [label]=\"t('lookupProperty')\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [ngModel]=\"query().lookupProperty\"\r\n (ngModelChange)=\"updateField('lookupProperty', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n\r\n <!-- Time Frame -->\r\n <mt-select-field\r\n [label]=\"t('timeFrame')\"\r\n [options]=\"timeFrameOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [placeholder]=\"t('selectTimeFrame')\"\r\n [ngModel]=\"query().timeFrame\"\r\n (ngModelChange)=\"updateField('timeFrame', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n\r\n <!-- Start Point Time Property -->\r\n <mt-select-field\r\n [label]=\"t('startPointTimeProperty')\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [ngModel]=\"query().startPoint_timeProperty\"\r\n (ngModelChange)=\"updateField('startPoint_timeProperty', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n\r\n <!-- End Point Time Property -->\r\n <mt-select-field\r\n [label]=\"t('endPointTimeProperty')\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [ngModel]=\"query().endPoint_timeProperty\"\r\n (ngModelChange)=\"updateField('endPoint_timeProperty', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n </div>\r\n\r\n <!-- Extra Properties -->\r\n <div class=\"w-full\">\r\n <mt-multi-select-field\r\n [label]=\"t('extraProperties')\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectProperties')\"\r\n [ngModel]=\"query().extraProperties\"\r\n (ngModelChange)=\"updateField('extraProperties', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
40379
+ ], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- Pivot Property -->\n <mt-select-field\n [label]=\"t('pivotProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().pivotProperty\"\n (ngModelChange)=\"updateField('pivotProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Lookup Property -->\n <mt-select-field\n [label]=\"t('lookupProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().lookupProperty\"\n (ngModelChange)=\"updateField('lookupProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Time Frame -->\n <mt-select-field\n [label]=\"t('timeFrame')\"\n [options]=\"timeFrameOptions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [placeholder]=\"t('selectTimeFrame')\"\n [ngModel]=\"query().timeFrame\"\n (ngModelChange)=\"updateField('timeFrame', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Start Point Time Property -->\n <mt-select-field\n [label]=\"t('startPointTimeProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().startPoint_timeProperty\"\n (ngModelChange)=\"updateField('startPoint_timeProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- End Point Time Property -->\n <mt-select-field\n [label]=\"t('endPointTimeProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().endPoint_timeProperty\"\n (ngModelChange)=\"updateField('endPoint_timeProperty', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n\n <!-- Extra Properties -->\n <div class=\"w-full\">\n <mt-multi-select-field\n [label]=\"t('extraProperties')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperties')\"\n [ngModel]=\"query().extraProperties\"\n (ngModelChange)=\"updateField('extraProperties', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
40160
40380
  }
40161
40381
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TimelineQuery, decorators: [{
40162
40382
  type: Component,
@@ -40172,7 +40392,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
40172
40392
  useExisting: forwardRef(() => TimelineQuery),
40173
40393
  multi: true,
40174
40394
  },
40175
- ], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\r\n <!-- Pivot Property -->\r\n <mt-select-field\r\n [label]=\"t('pivotProperty')\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [ngModel]=\"query().pivotProperty\"\r\n (ngModelChange)=\"updateField('pivotProperty', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n\r\n <!-- Lookup Property -->\r\n <mt-select-field\r\n [label]=\"t('lookupProperty')\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [ngModel]=\"query().lookupProperty\"\r\n (ngModelChange)=\"updateField('lookupProperty', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n\r\n <!-- Time Frame -->\r\n <mt-select-field\r\n [label]=\"t('timeFrame')\"\r\n [options]=\"timeFrameOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [placeholder]=\"t('selectTimeFrame')\"\r\n [ngModel]=\"query().timeFrame\"\r\n (ngModelChange)=\"updateField('timeFrame', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n\r\n <!-- Start Point Time Property -->\r\n <mt-select-field\r\n [label]=\"t('startPointTimeProperty')\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [ngModel]=\"query().startPoint_timeProperty\"\r\n (ngModelChange)=\"updateField('startPoint_timeProperty', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n\r\n <!-- End Point Time Property -->\r\n <mt-select-field\r\n [label]=\"t('endPointTimeProperty')\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [ngModel]=\"query().endPoint_timeProperty\"\r\n (ngModelChange)=\"updateField('endPoint_timeProperty', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n </div>\r\n\r\n <!-- Extra Properties -->\r\n <div class=\"w-full\">\r\n <mt-multi-select-field\r\n [label]=\"t('extraProperties')\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectProperties')\"\r\n [ngModel]=\"query().extraProperties\"\r\n (ngModelChange)=\"updateField('extraProperties', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n </div>\r\n</div>\r\n" }]
40395
+ ], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- Pivot Property -->\n <mt-select-field\n [label]=\"t('pivotProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().pivotProperty\"\n (ngModelChange)=\"updateField('pivotProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Lookup Property -->\n <mt-select-field\n [label]=\"t('lookupProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().lookupProperty\"\n (ngModelChange)=\"updateField('lookupProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Time Frame -->\n <mt-select-field\n [label]=\"t('timeFrame')\"\n [options]=\"timeFrameOptions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [placeholder]=\"t('selectTimeFrame')\"\n [ngModel]=\"query().timeFrame\"\n (ngModelChange)=\"updateField('timeFrame', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Start Point Time Property -->\n <mt-select-field\n [label]=\"t('startPointTimeProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().startPoint_timeProperty\"\n (ngModelChange)=\"updateField('startPoint_timeProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- End Point Time Property -->\n <mt-select-field\n [label]=\"t('endPointTimeProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().endPoint_timeProperty\"\n (ngModelChange)=\"updateField('endPoint_timeProperty', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n\n <!-- Extra Properties -->\n <div class=\"w-full\">\n <mt-multi-select-field\n [label]=\"t('extraProperties')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperties')\"\n [ngModel]=\"query().extraProperties\"\n (ngModelChange)=\"updateField('extraProperties', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n</div>\n" }]
40176
40396
  }], propDecorators: { propertiesFlat: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesFlat", required: false }] }], propertiesGrouped: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesGrouped", required: false }] }] } });
40177
40397
 
40178
40398
  /**
@@ -42631,7 +42851,7 @@ class GeneralSettings {
42631
42851
  return labels[category] || category;
42632
42852
  }
42633
42853
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GeneralSettings, deps: [], target: i0.ɵɵFactoryTarget.Component });
42634
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: GeneralSettings, isStandalone: true, selector: "mt-general-settings", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, isDialog: { classPropertyName: "isDialog", publicName: "isDialog", isSignal: true, isRequired: false, transformFunction: null }, hasPreselectedType: { classPropertyName: "hasPreselectedType", publicName: "hasPreselectedType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { configChange: "configChange", chartTypeChange: "chartTypeChange" }, ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Basic Info Card -->\r\n <mt-card [title]=\"t('basicInfo')\">\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\r\n <!-- English Title -->\r\n <mt-text-field\r\n [label]=\"t('titleEn')\"\r\n [ngModel]=\"config()?.clientConfig?.title?.en || ''\"\r\n (ngModelChange)=\"updateTitle('en', $event)\"\r\n [placeholder]=\"t('enterTitleEn')\"\r\n />\r\n\r\n <!-- Arabic Title -->\r\n <mt-text-field\r\n [label]=\"t('titleAr')\"\r\n [ngModel]=\"config()?.clientConfig?.title?.ar || ''\"\r\n (ngModelChange)=\"updateTitle('ar', $event)\"\r\n [placeholder]=\"t('enterTitleAr')\"\r\n dir=\"rtl\"\r\n />\r\n\r\n <!-- Component Name (readonly info) -->\r\n @if (selectedChartType(); as chartType) {\r\n <div class=\"md:col-span-2\">\r\n <div class=\"text-sm text-muted-color mb-1\">\r\n {{ t(\"selectedType\") }}\r\n </div>\r\n <div\r\n class=\"flex items-center gap-2 p-3 bg-surface-50 rounded-lg border border-surface-200\"\r\n >\r\n <mt-icon\r\n [icon]=\"chartType.icon\"\r\n class=\"text-lg text-primary-500\"\r\n ></mt-icon>\r\n <span class=\"font-medium\">{{ chartType.name }}</span>\r\n <span class=\"text-sm text-muted-color\"\r\n >({{ chartType.serviceType }})</span\r\n >\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </mt-card>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
42854
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: GeneralSettings, isStandalone: true, selector: "mt-general-settings", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, isDialog: { classPropertyName: "isDialog", publicName: "isDialog", isSignal: true, isRequired: false, transformFunction: null }, hasPreselectedType: { classPropertyName: "hasPreselectedType", publicName: "hasPreselectedType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { configChange: "configChange", chartTypeChange: "chartTypeChange" }, ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <!-- Basic Info Card -->\n <mt-card [title]=\"t('basicInfo')\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- English Title -->\n <mt-text-field\n [label]=\"t('titleEn')\"\n [ngModel]=\"config()?.clientConfig?.title?.en || ''\"\n (ngModelChange)=\"updateTitle('en', $event)\"\n [placeholder]=\"t('enterTitleEn')\"\n />\n\n <!-- Arabic Title -->\n <mt-text-field\n [label]=\"t('titleAr')\"\n [ngModel]=\"config()?.clientConfig?.title?.ar || ''\"\n (ngModelChange)=\"updateTitle('ar', $event)\"\n [placeholder]=\"t('enterTitleAr')\"\n dir=\"rtl\"\n />\n\n <!-- Component Name (readonly info) -->\n @if (selectedChartType(); as chartType) {\n <div class=\"md:col-span-2\">\n <div class=\"text-sm text-muted-color mb-1\">\n {{ t(\"selectedType\") }}\n </div>\n <div\n class=\"flex items-center gap-2 p-3 bg-surface-50 rounded-lg border border-surface-200\"\n >\n <mt-icon\n [icon]=\"chartType.icon\"\n class=\"text-lg text-primary-500\"\n ></mt-icon>\n <span class=\"font-medium\">{{ chartType.name }}</span>\n <span class=\"text-sm text-muted-color\"\n >({{ chartType.serviceType }})</span\n >\n </div>\n </div>\n }\n </div>\n </mt-card>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
42635
42855
  }
42636
42856
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GeneralSettings, decorators: [{
42637
42857
  type: Component,
@@ -42643,7 +42863,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
42643
42863
  Card,
42644
42864
  TooltipModule,
42645
42865
  Icon,
42646
- ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Basic Info Card -->\r\n <mt-card [title]=\"t('basicInfo')\">\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\r\n <!-- English Title -->\r\n <mt-text-field\r\n [label]=\"t('titleEn')\"\r\n [ngModel]=\"config()?.clientConfig?.title?.en || ''\"\r\n (ngModelChange)=\"updateTitle('en', $event)\"\r\n [placeholder]=\"t('enterTitleEn')\"\r\n />\r\n\r\n <!-- Arabic Title -->\r\n <mt-text-field\r\n [label]=\"t('titleAr')\"\r\n [ngModel]=\"config()?.clientConfig?.title?.ar || ''\"\r\n (ngModelChange)=\"updateTitle('ar', $event)\"\r\n [placeholder]=\"t('enterTitleAr')\"\r\n dir=\"rtl\"\r\n />\r\n\r\n <!-- Component Name (readonly info) -->\r\n @if (selectedChartType(); as chartType) {\r\n <div class=\"md:col-span-2\">\r\n <div class=\"text-sm text-muted-color mb-1\">\r\n {{ t(\"selectedType\") }}\r\n </div>\r\n <div\r\n class=\"flex items-center gap-2 p-3 bg-surface-50 rounded-lg border border-surface-200\"\r\n >\r\n <mt-icon\r\n [icon]=\"chartType.icon\"\r\n class=\"text-lg text-primary-500\"\r\n ></mt-icon>\r\n <span class=\"font-medium\">{{ chartType.name }}</span>\r\n <span class=\"text-sm text-muted-color\"\r\n >({{ chartType.serviceType }})</span\r\n >\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </mt-card>\r\n</div>\r\n" }]
42866
+ ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <!-- Basic Info Card -->\n <mt-card [title]=\"t('basicInfo')\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- English Title -->\n <mt-text-field\n [label]=\"t('titleEn')\"\n [ngModel]=\"config()?.clientConfig?.title?.en || ''\"\n (ngModelChange)=\"updateTitle('en', $event)\"\n [placeholder]=\"t('enterTitleEn')\"\n />\n\n <!-- Arabic Title -->\n <mt-text-field\n [label]=\"t('titleAr')\"\n [ngModel]=\"config()?.clientConfig?.title?.ar || ''\"\n (ngModelChange)=\"updateTitle('ar', $event)\"\n [placeholder]=\"t('enterTitleAr')\"\n dir=\"rtl\"\n />\n\n <!-- Component Name (readonly info) -->\n @if (selectedChartType(); as chartType) {\n <div class=\"md:col-span-2\">\n <div class=\"text-sm text-muted-color mb-1\">\n {{ t(\"selectedType\") }}\n </div>\n <div\n class=\"flex items-center gap-2 p-3 bg-surface-50 rounded-lg border border-surface-200\"\n >\n <mt-icon\n [icon]=\"chartType.icon\"\n class=\"text-lg text-primary-500\"\n ></mt-icon>\n <span class=\"font-medium\">{{ chartType.name }}</span>\n <span class=\"text-sm text-muted-color\"\n >({{ chartType.serviceType }})</span\n >\n </div>\n </div>\n }\n </div>\n </mt-card>\n</div>\n" }]
42647
42867
  }], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], isDialog: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDialog", required: false }] }], hasPreselectedType: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasPreselectedType", required: false }] }], configChange: [{ type: i0.Output, args: ["configChange"] }], chartTypeChange: [{ type: i0.Output, args: ["chartTypeChange"] }] } });
42648
42868
 
42649
42869
  /**
@@ -42680,6 +42900,26 @@ class ActionsSettings {
42680
42900
  // ============ Async data (pages / properties) ============
42681
42901
  /** Dashboard pages for the navigate-to-page target select. */
42682
42902
  pageOptions = signal([], ...(ngDevMode ? [{ debugName: "pageOptions" }] : /* istanbul ignore next */ []));
42903
+ /**
42904
+ * Target pages: never the dashboard being edited, and a name two dashboards
42905
+ * share carries its id so they can be told apart (#1906).
42906
+ */
42907
+ targetPageOptions = computed(() => {
42908
+ const current = this.dashboardService.currentPageId();
42909
+ const pages = this.pageOptions().filter((page) => current == null || String(page.value) !== String(current));
42910
+ const counts = new Map();
42911
+ pages.forEach((page) => counts.set(page.label, (counts.get(page.label) ?? 0) + 1));
42912
+ return pages.map((page) => (counts.get(page.label) ?? 0) > 1
42913
+ ? { ...page, label: `${page.label} (#${page.value})` }
42914
+ : page);
42915
+ }, ...(ngDevMode ? [{ debugName: "targetPageOptions" }] : /* istanbul ignore next */ []));
42916
+ /**
42917
+ * The token syntax in the filters hint (#1906). It is rendered between two
42918
+ * translations, never passed into one: Transloco swallows a literal
42919
+ * `{{token}}`, and a parameter whose value contains one makes its
42920
+ * interpolation loop match it again forever, which hangs the page.
42921
+ */
42922
+ tokenExample = '{{token}}';
42683
42923
  /** Properties of THIS chart's selections — the filter property picker. */
42684
42924
  propertyOptions = signal([], ...(ngDevMode ? [{ debugName: "propertyOptions" }] : /* istanbul ignore next */ []));
42685
42925
  loadingProperties = signal(false, ...(ngDevMode ? [{ debugName: "loadingProperties" }] : /* istanbul ignore next */ []));
@@ -42753,7 +42993,19 @@ class ActionsSettings {
42753
42993
  * The chart's current extra-property keys (string form), surfaced to the
42754
42994
  * value field's "Properties" tab and kept in sync as filters add keys.
42755
42995
  */
42756
- chartExtraProperties = computed(() => this.normalizeExtraProperties(this.config()?.serviceConfig?.['query']?.['extraProperties']), ...(ngDevMode ? [{ debugName: "chartExtraProperties" }] : /* istanbul ignore next */ []));
42996
+ chartExtraProperties = computed(() => {
42997
+ const query = this.config()?.serviceConfig?.['query'];
42998
+ // Series charts return each series' own extra properties (#1904).
42999
+ const series = Array.isArray(query?.['series'])
43000
+ ? query['series']
43001
+ : [];
43002
+ return [
43003
+ ...new Set([
43004
+ ...this.normalizeExtraProperties(query?.['extraProperties']),
43005
+ ...series.flatMap((s) => this.normalizeExtraProperties(s?.extraProperties)),
43006
+ ]),
43007
+ ];
43008
+ }, ...(ngDevMode ? [{ debugName: "chartExtraProperties" }] : /* istanbul ignore next */ []));
42757
43009
  /**
42758
43010
  * A table row carries no `extraValues` — only the table's own properties —
42759
43011
  * so for tables the value picker offers those properties, and the runtime
@@ -43031,7 +43283,7 @@ class ActionsSettings {
43031
43283
  return index;
43032
43284
  }
43033
43285
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ActionsSettings, deps: [], target: i0.ɵɵFactoryTarget.Component });
43034
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ActionsSettings, isStandalone: true, selector: "mt-actions-settings", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clientConfigChange: "clientConfigChange", extraPropertiesChange: "extraPropertiesChange" }, ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <mt-card [title]=\"t('actionsLabel')\">\r\n <ng-template #cardEnd>\r\n <mt-button\r\n icon=\"general.plus\"\r\n size=\"small\"\r\n (onClick)=\"addAction()\"\r\n [pTooltip]=\"t('addAction')\"\r\n />\r\n </ng-template>\r\n\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Actions List -->\r\n @for (\r\n action of actions();\r\n track $index;\r\n let i = $index;\r\n let first = $first;\r\n let last = $last\r\n ) {\r\n <div\r\n class=\"p-4 bg-surface-50 rounded-lg border border-surface-200 hover:border-surface-300 transition-all\"\r\n >\r\n <!-- Action Header -->\r\n <div class=\"flex items-center justify-between mb-4\">\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"w-6 h-6 flex items-center justify-center bg-primary-100 text-primary-600 rounded-full text-sm font-medium\"\r\n >\r\n {{ i + 1 }}\r\n </span>\r\n <span class=\"font-medium text-sm\">\r\n {{ getActionTypeLabel(action.actionType) }}\r\n </span>\r\n <span class=\"text-xs text-muted-color\">\r\n ({{ getTriggerLabel(action.type) }})\r\n </span>\r\n </div>\r\n @if (!isDialogAction(action)) {\r\n <div class=\"flex items-center gap-1\">\r\n <!-- Move Up -->\r\n <mt-button\r\n icon=\"arrow.chevron-up\"\r\n severity=\"secondary\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"first\"\r\n (onClick)=\"moveActionUp(i)\"\r\n [pTooltip]=\"t('moveUp')\"\r\n />\r\n <!-- Move Down -->\r\n <mt-button\r\n icon=\"arrow.chevron-down\"\r\n severity=\"secondary\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"last\"\r\n (onClick)=\"moveActionDown(i)\"\r\n [pTooltip]=\"t('moveDown')\"\r\n />\r\n <!-- Duplicate -->\r\n <mt-button\r\n icon=\"general.copy-01\"\r\n severity=\"secondary\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n (onClick)=\"duplicateAction(i)\"\r\n [pTooltip]=\"t('duplicate')\"\r\n />\r\n <!-- Remove -->\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n (onClick)=\"removeAction(i)\"\r\n [pTooltip]=\"t('remove')\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (isDialogAction(action)) {\r\n <!-- Dialog action type/trigger are managed from the card's \"Add\r\n dialog\" flow; its filters (handed to the dialog) are editable. -->\r\n <div\r\n class=\"flex items-center gap-2 rounded-md bg-surface-100 px-3 py-2 text-xs text-muted-color\"\r\n >\r\n <mt-icon icon=\"general.info-circle\" class=\"text-sm\" />\r\n {{ t(\"dialogActionManaged\") }}\r\n </div>\r\n } @else {\r\n <!-- Action Configuration -->\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Trigger + Action Type: half / half -->\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <!-- Trigger Type -->\r\n <mt-select-field\r\n [label]=\"t('trigger')\"\r\n [ngModel]=\"action.type\"\r\n (ngModelChange)=\"updateAction(i, 'type', $event)\"\r\n [options]=\"triggerOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n\r\n <!-- Action Type -->\r\n <mt-select-field\r\n [label]=\"t('actionType')\"\r\n [ngModel]=\"action.actionType\"\r\n (ngModelChange)=\"updateAction(i, 'actionType', $event)\"\r\n [options]=\"actionTypeOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n </div>\r\n\r\n <!-- Navigation destination + browser target -->\r\n @if (supportsNavigationTarget(action)) {\r\n <div class=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\r\n @if (action.actionType === \"navigateToPage\") {\r\n <mt-select-field\r\n [label]=\"t('targetPage')\"\r\n [ngModel]=\"action.config?.targetPageId ?? null\"\r\n (ngModelChange)=\"\r\n updateActionConfig(i, 'targetPageId', $event)\r\n \"\r\n [options]=\"pageOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [placeholder]=\"t('selectTargetPage')\"\r\n [filter]=\"true\"\r\n />\r\n }\r\n\r\n <mt-select-field\r\n [label]=\"t('navigationTarget')\"\r\n [ngModel]=\"action.config?.navigationTarget ?? 'currentTab'\"\r\n (ngModelChange)=\"\r\n updateActionConfig(i, 'navigationTarget', $event)\r\n \"\r\n [options]=\"navigationTargetOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Unified Filters: one section for every action. propertyKey + a\r\n select-or-write value field (literal = static, {{token}} =\r\n dynamic). For dialog actions the value field also exposes the\r\n key/pivot tokens. -->\r\n <div class=\"mt-4 pt-4 border-t border-surface-200\">\r\n <div class=\"flex items-center justify-between mb-1\">\r\n <span class=\"text-sm font-medium\">{{ t(\"filters\") }}</span>\r\n <mt-button\r\n [label]=\"t('addFilter')\"\r\n icon=\"general.plus\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"addFilter(i)\"\r\n />\r\n </div>\r\n <p class=\"text-xs text-muted-color mb-3\">\r\n {{ t(\"actionFiltersHint\") }}\r\n @if (isTableRowSource()) {\r\n {{ t(\"actionTableRowHint\") }}\r\n }\r\n </p>\r\n @let actionFilters = getActionFilters(action);\r\n @for (\r\n filter of actionFilters;\r\n track $index;\r\n let keyIndex = $index\r\n ) {\r\n @let missingProperty = missingRowProperty(filter);\r\n <div class=\"flex items-end gap-2 mb-2\">\r\n <mt-select-field\r\n [label]=\"t('property')\"\r\n [ngModel]=\"filter.propertyKey\"\r\n (ngModelChange)=\"updateFilterProperty(i, keyIndex, $event)\"\r\n [options]=\"propertyOptions()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n [loading]=\"loadingProperties()\"\r\n class=\"flex-1\"\r\n />\r\n <mt-filter-value-field\r\n class=\"flex-1\"\r\n [label]=\"t('value')\"\r\n [ngModel]=\"filter.propertyValue\"\r\n (ngModelChange)=\"updateFilterValue(i, keyIndex, $event)\"\r\n [propertyKey]=\"filter.propertyKey\"\r\n [extraProperties]=\"valueTokenPropertyOptions()\"\r\n [showPivotTokens]=\"isDialogAction(action)\"\r\n [placeholder]=\"t('enterValue')\"\r\n />\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n (onClick)=\"removeFilter(i, keyIndex)\"\r\n />\r\n </div>\r\n @if (missingProperty) {\r\n <small class=\"block -mt-1 mb-2 text-xs text-amber-600\">\r\n {{\r\n t(\"actionRowPropertyMissing\", { property: missingProperty })\r\n }}\r\n </small>\r\n }\r\n }\r\n @if (actionFilters.length === 0) {\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"noFiltersConfigured\") }}\r\n </p>\r\n }\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- Empty State -->\r\n @if (actions().length === 0) {\r\n <div class=\"text-center py-12 text-muted-color\">\r\n <mt-icon icon=\"editor.cursor-click-01\" class=\"text-4xl mb-3\" />\r\n <p class=\"mb-4\">{{ t(\"noActionsConfigured\") }}</p>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addAction')\"\r\n severity=\"secondary\"\r\n (onClick)=\"addAction()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </mt-card>\r\n\r\n <!-- Actions Help Card -->\r\n <mt-card [title]=\"t('actionsHelp')\">\r\n <div class=\"text-sm text-muted-color space-y-2\">\r\n <p>\r\n <strong>{{ t(\"openDialog\") }}:</strong> {{ t(\"openDialogDesc\") }}\r\n </p>\r\n <p>\r\n <strong>{{ t(\"navigate\") }}:</strong> {{ t(\"navigateDesc\") }}\r\n </p>\r\n </div>\r\n </mt-card>\r\n</div>\r\n", dependencies: [{ 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: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: FilterValueField, selector: "mt-filter-value-field", inputs: ["label", "placeholder", "extraProperties", "propertyOptions", "propertyKey", "showPivotTokens", "readonly"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
43286
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ActionsSettings, isStandalone: true, selector: "mt-actions-settings", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clientConfigChange: "clientConfigChange", extraPropertiesChange: "extraPropertiesChange" }, ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <mt-card [title]=\"t('actionsLabel')\">\r\n <ng-template #cardEnd>\r\n <mt-button\r\n icon=\"general.plus\"\r\n size=\"small\"\r\n (onClick)=\"addAction()\"\r\n [pTooltip]=\"t('addAction')\"\r\n />\r\n </ng-template>\r\n\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Actions List -->\r\n @for (\r\n action of actions();\r\n track $index;\r\n let i = $index;\r\n let first = $first;\r\n let last = $last\r\n ) {\r\n <div\r\n class=\"p-4 bg-surface-50 rounded-lg border border-surface-200 hover:border-surface-300 transition-all\"\r\n >\r\n <!-- Action Header -->\r\n <div class=\"flex items-center justify-between mb-4\">\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"w-6 h-6 flex items-center justify-center bg-primary-100 text-primary-600 rounded-full text-sm font-medium\"\r\n >\r\n {{ i + 1 }}\r\n </span>\r\n <span class=\"font-medium text-sm\">\r\n {{ getActionTypeLabel(action.actionType) }}\r\n </span>\r\n <span class=\"text-xs text-muted-color\">\r\n ({{ getTriggerLabel(action.type) }})\r\n </span>\r\n </div>\r\n @if (!isDialogAction(action)) {\r\n <div class=\"flex items-center gap-1\">\r\n <!-- Move Up -->\r\n <mt-button\r\n icon=\"arrow.chevron-up\"\r\n severity=\"secondary\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"first\"\r\n (onClick)=\"moveActionUp(i)\"\r\n [pTooltip]=\"t('moveUp')\"\r\n />\r\n <!-- Move Down -->\r\n <mt-button\r\n icon=\"arrow.chevron-down\"\r\n severity=\"secondary\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"last\"\r\n (onClick)=\"moveActionDown(i)\"\r\n [pTooltip]=\"t('moveDown')\"\r\n />\r\n <!-- Duplicate -->\r\n <mt-button\r\n icon=\"general.copy-01\"\r\n severity=\"secondary\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n (onClick)=\"duplicateAction(i)\"\r\n [pTooltip]=\"t('duplicate')\"\r\n />\r\n <!-- Remove -->\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n (onClick)=\"removeAction(i)\"\r\n [pTooltip]=\"t('remove')\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (isDialogAction(action)) {\r\n <!-- Dialog action type/trigger are managed from the card's \"Add\r\n dialog\" flow; its filters (handed to the dialog) are editable. -->\r\n <div\r\n class=\"flex items-center gap-2 rounded-md bg-surface-100 px-3 py-2 text-xs text-muted-color\"\r\n >\r\n <mt-icon icon=\"general.info-circle\" class=\"text-sm\" />\r\n {{ t(\"dialogActionManaged\") }}\r\n </div>\r\n } @else {\r\n <!-- Action Configuration -->\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Trigger + Action Type: half / half -->\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <!-- Trigger Type -->\r\n <mt-select-field\r\n [label]=\"t('trigger')\"\r\n [ngModel]=\"action.type\"\r\n (ngModelChange)=\"updateAction(i, 'type', $event)\"\r\n [options]=\"triggerOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n\r\n <!-- Action Type -->\r\n <mt-select-field\r\n [label]=\"t('actionType')\"\r\n [ngModel]=\"action.actionType\"\r\n (ngModelChange)=\"updateAction(i, 'actionType', $event)\"\r\n [options]=\"actionTypeOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n </div>\r\n\r\n <!-- Navigation destination + browser target -->\r\n @if (supportsNavigationTarget(action)) {\r\n <div class=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\r\n @if (action.actionType === \"navigateToPage\") {\r\n <mt-select-field\r\n [label]=\"t('targetPage')\"\r\n [ngModel]=\"action.config?.targetPageId ?? null\"\r\n (ngModelChange)=\"\r\n updateActionConfig(i, 'targetPageId', $event)\r\n \"\r\n [options]=\"targetPageOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [placeholder]=\"t('selectTargetPage')\"\r\n [filter]=\"true\"\r\n />\r\n }\r\n\r\n <mt-select-field\r\n [label]=\"t('navigationTarget')\"\r\n [ngModel]=\"action.config?.navigationTarget ?? 'currentTab'\"\r\n (ngModelChange)=\"\r\n updateActionConfig(i, 'navigationTarget', $event)\r\n \"\r\n [options]=\"navigationTargetOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Unified Filters: one section for every action. propertyKey + a\r\n select-or-write value field (literal = static, {{token}} =\r\n dynamic). For dialog actions the value field also exposes the\r\n key/pivot tokens. Navigate To Entity opens a record and takes\r\n no filters (#1906). -->\r\n @if (action.actionType !== \"navigateTo\") {\r\n <div class=\"mt-4 pt-4 border-t border-surface-200\">\r\n <div class=\"flex items-center justify-between mb-1\">\r\n <span class=\"text-sm font-medium\">{{ t(\"filters\") }}</span>\r\n <mt-button\r\n [label]=\"t('addFilter')\"\r\n icon=\"general.plus\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"addFilter(i)\"\r\n />\r\n </div>\r\n <p class=\"text-xs text-muted-color mb-3\">\r\n {{ t(\"actionFiltersHintStart\") }}\r\n <code>{{ tokenExample }}</code>\r\n {{ t(\"actionFiltersHintEnd\") }}\r\n @if (isTableRowSource()) {\r\n {{ t(\"actionTableRowHint\") }}\r\n }\r\n </p>\r\n @let actionFilters = getActionFilters(action);\r\n @for (\r\n filter of actionFilters;\r\n track $index;\r\n let keyIndex = $index\r\n ) {\r\n @let missingProperty = missingRowProperty(filter);\r\n <div class=\"flex items-end gap-2 mb-2\">\r\n <mt-select-field\r\n [label]=\"t('property')\"\r\n [ngModel]=\"filter.propertyKey\"\r\n (ngModelChange)=\"updateFilterProperty(i, keyIndex, $event)\"\r\n [options]=\"propertyOptions()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n [loading]=\"loadingProperties()\"\r\n class=\"flex-1\"\r\n />\r\n <mt-filter-value-field\r\n class=\"flex-1\"\r\n [label]=\"t('value')\"\r\n [ngModel]=\"filter.propertyValue\"\r\n (ngModelChange)=\"updateFilterValue(i, keyIndex, $event)\"\r\n [propertyKey]=\"filter.propertyKey\"\r\n [extraProperties]=\"valueTokenPropertyOptions()\"\r\n [showPivotTokens]=\"isDialogAction(action)\"\r\n [placeholder]=\"t('enterValue')\"\r\n />\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n (onClick)=\"removeFilter(i, keyIndex)\"\r\n />\r\n </div>\r\n @if (missingProperty) {\r\n <small class=\"block -mt-1 mb-2 text-xs text-amber-600\">\r\n {{\r\n t(\"actionRowPropertyMissing\", {\r\n property: missingProperty,\r\n })\r\n }}\r\n </small>\r\n }\r\n }\r\n @if (actionFilters.length === 0) {\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"noFiltersConfigured\") }}\r\n </p>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Empty State -->\r\n @if (actions().length === 0) {\r\n <div class=\"text-center py-12 text-muted-color\">\r\n <mt-icon icon=\"editor.cursor-click-01\" class=\"text-4xl mb-3\" />\r\n <p class=\"mb-4\">{{ t(\"noActionsConfigured\") }}</p>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addAction')\"\r\n severity=\"secondary\"\r\n (onClick)=\"addAction()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </mt-card>\r\n\r\n <!-- Actions Help Card -->\r\n <mt-card [title]=\"t('actionsHelp')\">\r\n <div class=\"text-sm text-muted-color space-y-2\">\r\n <p>\r\n <strong>{{ t(\"openDialog\") }}:</strong> {{ t(\"openDialogDesc\") }}\r\n </p>\r\n <p>\r\n <strong>{{ t(\"navigate\") }}:</strong> {{ t(\"navigateDesc\") }}\r\n </p>\r\n </div>\r\n </mt-card>\r\n</div>\r\n", dependencies: [{ 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: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: FilterValueField, selector: "mt-filter-value-field", inputs: ["label", "placeholder", "extraProperties", "propertyOptions", "propertyKey", "showPivotTokens", "readonly"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
43035
43287
  }
43036
43288
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ActionsSettings, decorators: [{
43037
43289
  type: Component,
@@ -43044,7 +43296,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
43044
43296
  Card,
43045
43297
  Icon,
43046
43298
  FilterValueField,
43047
- ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <mt-card [title]=\"t('actionsLabel')\">\r\n <ng-template #cardEnd>\r\n <mt-button\r\n icon=\"general.plus\"\r\n size=\"small\"\r\n (onClick)=\"addAction()\"\r\n [pTooltip]=\"t('addAction')\"\r\n />\r\n </ng-template>\r\n\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Actions List -->\r\n @for (\r\n action of actions();\r\n track $index;\r\n let i = $index;\r\n let first = $first;\r\n let last = $last\r\n ) {\r\n <div\r\n class=\"p-4 bg-surface-50 rounded-lg border border-surface-200 hover:border-surface-300 transition-all\"\r\n >\r\n <!-- Action Header -->\r\n <div class=\"flex items-center justify-between mb-4\">\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"w-6 h-6 flex items-center justify-center bg-primary-100 text-primary-600 rounded-full text-sm font-medium\"\r\n >\r\n {{ i + 1 }}\r\n </span>\r\n <span class=\"font-medium text-sm\">\r\n {{ getActionTypeLabel(action.actionType) }}\r\n </span>\r\n <span class=\"text-xs text-muted-color\">\r\n ({{ getTriggerLabel(action.type) }})\r\n </span>\r\n </div>\r\n @if (!isDialogAction(action)) {\r\n <div class=\"flex items-center gap-1\">\r\n <!-- Move Up -->\r\n <mt-button\r\n icon=\"arrow.chevron-up\"\r\n severity=\"secondary\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"first\"\r\n (onClick)=\"moveActionUp(i)\"\r\n [pTooltip]=\"t('moveUp')\"\r\n />\r\n <!-- Move Down -->\r\n <mt-button\r\n icon=\"arrow.chevron-down\"\r\n severity=\"secondary\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"last\"\r\n (onClick)=\"moveActionDown(i)\"\r\n [pTooltip]=\"t('moveDown')\"\r\n />\r\n <!-- Duplicate -->\r\n <mt-button\r\n icon=\"general.copy-01\"\r\n severity=\"secondary\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n (onClick)=\"duplicateAction(i)\"\r\n [pTooltip]=\"t('duplicate')\"\r\n />\r\n <!-- Remove -->\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n (onClick)=\"removeAction(i)\"\r\n [pTooltip]=\"t('remove')\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (isDialogAction(action)) {\r\n <!-- Dialog action type/trigger are managed from the card's \"Add\r\n dialog\" flow; its filters (handed to the dialog) are editable. -->\r\n <div\r\n class=\"flex items-center gap-2 rounded-md bg-surface-100 px-3 py-2 text-xs text-muted-color\"\r\n >\r\n <mt-icon icon=\"general.info-circle\" class=\"text-sm\" />\r\n {{ t(\"dialogActionManaged\") }}\r\n </div>\r\n } @else {\r\n <!-- Action Configuration -->\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Trigger + Action Type: half / half -->\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <!-- Trigger Type -->\r\n <mt-select-field\r\n [label]=\"t('trigger')\"\r\n [ngModel]=\"action.type\"\r\n (ngModelChange)=\"updateAction(i, 'type', $event)\"\r\n [options]=\"triggerOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n\r\n <!-- Action Type -->\r\n <mt-select-field\r\n [label]=\"t('actionType')\"\r\n [ngModel]=\"action.actionType\"\r\n (ngModelChange)=\"updateAction(i, 'actionType', $event)\"\r\n [options]=\"actionTypeOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n </div>\r\n\r\n <!-- Navigation destination + browser target -->\r\n @if (supportsNavigationTarget(action)) {\r\n <div class=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\r\n @if (action.actionType === \"navigateToPage\") {\r\n <mt-select-field\r\n [label]=\"t('targetPage')\"\r\n [ngModel]=\"action.config?.targetPageId ?? null\"\r\n (ngModelChange)=\"\r\n updateActionConfig(i, 'targetPageId', $event)\r\n \"\r\n [options]=\"pageOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [placeholder]=\"t('selectTargetPage')\"\r\n [filter]=\"true\"\r\n />\r\n }\r\n\r\n <mt-select-field\r\n [label]=\"t('navigationTarget')\"\r\n [ngModel]=\"action.config?.navigationTarget ?? 'currentTab'\"\r\n (ngModelChange)=\"\r\n updateActionConfig(i, 'navigationTarget', $event)\r\n \"\r\n [options]=\"navigationTargetOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Unified Filters: one section for every action. propertyKey + a\r\n select-or-write value field (literal = static, {{token}} =\r\n dynamic). For dialog actions the value field also exposes the\r\n key/pivot tokens. -->\r\n <div class=\"mt-4 pt-4 border-t border-surface-200\">\r\n <div class=\"flex items-center justify-between mb-1\">\r\n <span class=\"text-sm font-medium\">{{ t(\"filters\") }}</span>\r\n <mt-button\r\n [label]=\"t('addFilter')\"\r\n icon=\"general.plus\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"addFilter(i)\"\r\n />\r\n </div>\r\n <p class=\"text-xs text-muted-color mb-3\">\r\n {{ t(\"actionFiltersHint\") }}\r\n @if (isTableRowSource()) {\r\n {{ t(\"actionTableRowHint\") }}\r\n }\r\n </p>\r\n @let actionFilters = getActionFilters(action);\r\n @for (\r\n filter of actionFilters;\r\n track $index;\r\n let keyIndex = $index\r\n ) {\r\n @let missingProperty = missingRowProperty(filter);\r\n <div class=\"flex items-end gap-2 mb-2\">\r\n <mt-select-field\r\n [label]=\"t('property')\"\r\n [ngModel]=\"filter.propertyKey\"\r\n (ngModelChange)=\"updateFilterProperty(i, keyIndex, $event)\"\r\n [options]=\"propertyOptions()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n [loading]=\"loadingProperties()\"\r\n class=\"flex-1\"\r\n />\r\n <mt-filter-value-field\r\n class=\"flex-1\"\r\n [label]=\"t('value')\"\r\n [ngModel]=\"filter.propertyValue\"\r\n (ngModelChange)=\"updateFilterValue(i, keyIndex, $event)\"\r\n [propertyKey]=\"filter.propertyKey\"\r\n [extraProperties]=\"valueTokenPropertyOptions()\"\r\n [showPivotTokens]=\"isDialogAction(action)\"\r\n [placeholder]=\"t('enterValue')\"\r\n />\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n (onClick)=\"removeFilter(i, keyIndex)\"\r\n />\r\n </div>\r\n @if (missingProperty) {\r\n <small class=\"block -mt-1 mb-2 text-xs text-amber-600\">\r\n {{\r\n t(\"actionRowPropertyMissing\", { property: missingProperty })\r\n }}\r\n </small>\r\n }\r\n }\r\n @if (actionFilters.length === 0) {\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"noFiltersConfigured\") }}\r\n </p>\r\n }\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- Empty State -->\r\n @if (actions().length === 0) {\r\n <div class=\"text-center py-12 text-muted-color\">\r\n <mt-icon icon=\"editor.cursor-click-01\" class=\"text-4xl mb-3\" />\r\n <p class=\"mb-4\">{{ t(\"noActionsConfigured\") }}</p>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addAction')\"\r\n severity=\"secondary\"\r\n (onClick)=\"addAction()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </mt-card>\r\n\r\n <!-- Actions Help Card -->\r\n <mt-card [title]=\"t('actionsHelp')\">\r\n <div class=\"text-sm text-muted-color space-y-2\">\r\n <p>\r\n <strong>{{ t(\"openDialog\") }}:</strong> {{ t(\"openDialogDesc\") }}\r\n </p>\r\n <p>\r\n <strong>{{ t(\"navigate\") }}:</strong> {{ t(\"navigateDesc\") }}\r\n </p>\r\n </div>\r\n </mt-card>\r\n</div>\r\n" }]
43299
+ ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <mt-card [title]=\"t('actionsLabel')\">\r\n <ng-template #cardEnd>\r\n <mt-button\r\n icon=\"general.plus\"\r\n size=\"small\"\r\n (onClick)=\"addAction()\"\r\n [pTooltip]=\"t('addAction')\"\r\n />\r\n </ng-template>\r\n\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Actions List -->\r\n @for (\r\n action of actions();\r\n track $index;\r\n let i = $index;\r\n let first = $first;\r\n let last = $last\r\n ) {\r\n <div\r\n class=\"p-4 bg-surface-50 rounded-lg border border-surface-200 hover:border-surface-300 transition-all\"\r\n >\r\n <!-- Action Header -->\r\n <div class=\"flex items-center justify-between mb-4\">\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"w-6 h-6 flex items-center justify-center bg-primary-100 text-primary-600 rounded-full text-sm font-medium\"\r\n >\r\n {{ i + 1 }}\r\n </span>\r\n <span class=\"font-medium text-sm\">\r\n {{ getActionTypeLabel(action.actionType) }}\r\n </span>\r\n <span class=\"text-xs text-muted-color\">\r\n ({{ getTriggerLabel(action.type) }})\r\n </span>\r\n </div>\r\n @if (!isDialogAction(action)) {\r\n <div class=\"flex items-center gap-1\">\r\n <!-- Move Up -->\r\n <mt-button\r\n icon=\"arrow.chevron-up\"\r\n severity=\"secondary\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"first\"\r\n (onClick)=\"moveActionUp(i)\"\r\n [pTooltip]=\"t('moveUp')\"\r\n />\r\n <!-- Move Down -->\r\n <mt-button\r\n icon=\"arrow.chevron-down\"\r\n severity=\"secondary\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"last\"\r\n (onClick)=\"moveActionDown(i)\"\r\n [pTooltip]=\"t('moveDown')\"\r\n />\r\n <!-- Duplicate -->\r\n <mt-button\r\n icon=\"general.copy-01\"\r\n severity=\"secondary\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n (onClick)=\"duplicateAction(i)\"\r\n [pTooltip]=\"t('duplicate')\"\r\n />\r\n <!-- Remove -->\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n (onClick)=\"removeAction(i)\"\r\n [pTooltip]=\"t('remove')\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (isDialogAction(action)) {\r\n <!-- Dialog action type/trigger are managed from the card's \"Add\r\n dialog\" flow; its filters (handed to the dialog) are editable. -->\r\n <div\r\n class=\"flex items-center gap-2 rounded-md bg-surface-100 px-3 py-2 text-xs text-muted-color\"\r\n >\r\n <mt-icon icon=\"general.info-circle\" class=\"text-sm\" />\r\n {{ t(\"dialogActionManaged\") }}\r\n </div>\r\n } @else {\r\n <!-- Action Configuration -->\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Trigger + Action Type: half / half -->\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <!-- Trigger Type -->\r\n <mt-select-field\r\n [label]=\"t('trigger')\"\r\n [ngModel]=\"action.type\"\r\n (ngModelChange)=\"updateAction(i, 'type', $event)\"\r\n [options]=\"triggerOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n\r\n <!-- Action Type -->\r\n <mt-select-field\r\n [label]=\"t('actionType')\"\r\n [ngModel]=\"action.actionType\"\r\n (ngModelChange)=\"updateAction(i, 'actionType', $event)\"\r\n [options]=\"actionTypeOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n </div>\r\n\r\n <!-- Navigation destination + browser target -->\r\n @if (supportsNavigationTarget(action)) {\r\n <div class=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\r\n @if (action.actionType === \"navigateToPage\") {\r\n <mt-select-field\r\n [label]=\"t('targetPage')\"\r\n [ngModel]=\"action.config?.targetPageId ?? null\"\r\n (ngModelChange)=\"\r\n updateActionConfig(i, 'targetPageId', $event)\r\n \"\r\n [options]=\"targetPageOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [placeholder]=\"t('selectTargetPage')\"\r\n [filter]=\"true\"\r\n />\r\n }\r\n\r\n <mt-select-field\r\n [label]=\"t('navigationTarget')\"\r\n [ngModel]=\"action.config?.navigationTarget ?? 'currentTab'\"\r\n (ngModelChange)=\"\r\n updateActionConfig(i, 'navigationTarget', $event)\r\n \"\r\n [options]=\"navigationTargetOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Unified Filters: one section for every action. propertyKey + a\r\n select-or-write value field (literal = static, {{token}} =\r\n dynamic). For dialog actions the value field also exposes the\r\n key/pivot tokens. Navigate To Entity opens a record and takes\r\n no filters (#1906). -->\r\n @if (action.actionType !== \"navigateTo\") {\r\n <div class=\"mt-4 pt-4 border-t border-surface-200\">\r\n <div class=\"flex items-center justify-between mb-1\">\r\n <span class=\"text-sm font-medium\">{{ t(\"filters\") }}</span>\r\n <mt-button\r\n [label]=\"t('addFilter')\"\r\n icon=\"general.plus\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"addFilter(i)\"\r\n />\r\n </div>\r\n <p class=\"text-xs text-muted-color mb-3\">\r\n {{ t(\"actionFiltersHintStart\") }}\r\n <code>{{ tokenExample }}</code>\r\n {{ t(\"actionFiltersHintEnd\") }}\r\n @if (isTableRowSource()) {\r\n {{ t(\"actionTableRowHint\") }}\r\n }\r\n </p>\r\n @let actionFilters = getActionFilters(action);\r\n @for (\r\n filter of actionFilters;\r\n track $index;\r\n let keyIndex = $index\r\n ) {\r\n @let missingProperty = missingRowProperty(filter);\r\n <div class=\"flex items-end gap-2 mb-2\">\r\n <mt-select-field\r\n [label]=\"t('property')\"\r\n [ngModel]=\"filter.propertyKey\"\r\n (ngModelChange)=\"updateFilterProperty(i, keyIndex, $event)\"\r\n [options]=\"propertyOptions()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n [loading]=\"loadingProperties()\"\r\n class=\"flex-1\"\r\n />\r\n <mt-filter-value-field\r\n class=\"flex-1\"\r\n [label]=\"t('value')\"\r\n [ngModel]=\"filter.propertyValue\"\r\n (ngModelChange)=\"updateFilterValue(i, keyIndex, $event)\"\r\n [propertyKey]=\"filter.propertyKey\"\r\n [extraProperties]=\"valueTokenPropertyOptions()\"\r\n [showPivotTokens]=\"isDialogAction(action)\"\r\n [placeholder]=\"t('enterValue')\"\r\n />\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n (onClick)=\"removeFilter(i, keyIndex)\"\r\n />\r\n </div>\r\n @if (missingProperty) {\r\n <small class=\"block -mt-1 mb-2 text-xs text-amber-600\">\r\n {{\r\n t(\"actionRowPropertyMissing\", {\r\n property: missingProperty,\r\n })\r\n }}\r\n </small>\r\n }\r\n }\r\n @if (actionFilters.length === 0) {\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"noFiltersConfigured\") }}\r\n </p>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Empty State -->\r\n @if (actions().length === 0) {\r\n <div class=\"text-center py-12 text-muted-color\">\r\n <mt-icon icon=\"editor.cursor-click-01\" class=\"text-4xl mb-3\" />\r\n <p class=\"mb-4\">{{ t(\"noActionsConfigured\") }}</p>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addAction')\"\r\n severity=\"secondary\"\r\n (onClick)=\"addAction()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </mt-card>\r\n\r\n <!-- Actions Help Card -->\r\n <mt-card [title]=\"t('actionsHelp')\">\r\n <div class=\"text-sm text-muted-color space-y-2\">\r\n <p>\r\n <strong>{{ t(\"openDialog\") }}:</strong> {{ t(\"openDialogDesc\") }}\r\n </p>\r\n <p>\r\n <strong>{{ t(\"navigate\") }}:</strong> {{ t(\"navigateDesc\") }}\r\n </p>\r\n </div>\r\n </mt-card>\r\n</div>\r\n" }]
43048
43300
  }], ctorParameters: () => [], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], clientConfigChange: [{ type: i0.Output, args: ["clientConfigChange"] }], extraPropertiesChange: [{ type: i0.Output, args: ["extraPropertiesChange"] }] } });
43049
43301
 
43050
43302
  class TitleEditor {
@@ -43130,6 +43382,8 @@ class ActionsDrawer {
43130
43382
  /** Track changes so cancel-without-apply discards them. */
43131
43383
  dirty = false;
43132
43384
  config = computed(() => this.workingItem()?.config ?? null, ...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
43385
+ /** A table's actions run on a row, not on a chart point (#1906). */
43386
+ isTable = computed(() => isTableRowComponent(this.config()?.clientConfig?.componentName), ...(ngDevMode ? [{ debugName: "isTable" }] : /* istanbul ignore next */ []));
43133
43387
  constructor() {
43134
43388
  const item = (this.drawerConfig.data?.item ??
43135
43389
  null);
@@ -43164,13 +43418,28 @@ class ActionsDrawer {
43164
43418
  this.dirty = true;
43165
43419
  const serviceConfig = item.config.serviceConfig;
43166
43420
  const query = serviceConfig.query ?? {};
43421
+ const keys = [...new Set(extraProperties)];
43422
+ // A series chart's points carry each series' own extra properties; the
43423
+ // root list alone never reached a bar (#1904).
43424
+ const series = Array.isArray(query['series'])
43425
+ ? query['series'].map((s) => ({
43426
+ ...s,
43427
+ extraProperties: [
43428
+ ...new Set([...(s?.extraProperties ?? []), ...keys]),
43429
+ ],
43430
+ }))
43431
+ : undefined;
43167
43432
  this.workingItem.set({
43168
43433
  ...item,
43169
43434
  config: {
43170
43435
  ...item.config,
43171
43436
  serviceConfig: {
43172
43437
  ...serviceConfig,
43173
- query: { ...query, extraProperties: [...new Set(extraProperties)] },
43438
+ query: {
43439
+ ...query,
43440
+ extraProperties: keys,
43441
+ ...(series ? { series } : {}),
43442
+ },
43174
43443
  },
43175
43444
  },
43176
43445
  });
@@ -43201,10 +43470,10 @@ class ActionsDrawer {
43201
43470
  </span>
43202
43471
  <div class="flex-1 min-w-0">
43203
43472
  <h3 class="text-sm font-semibold text-surface-700">
43204
- {{ t('title') }}
43473
+ {{ t(isTable() ? 'titleTable' : 'title') }}
43205
43474
  </h3>
43206
43475
  <p class="text-xs text-muted-color leading-snug">
43207
- {{ t('description') }}
43476
+ {{ t(isTable() ? 'descriptionTable' : 'description') }}
43208
43477
  </p>
43209
43478
  </div>
43210
43479
  </header>
@@ -43259,10 +43528,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
43259
43528
  </span>
43260
43529
  <div class="flex-1 min-w-0">
43261
43530
  <h3 class="text-sm font-semibold text-surface-700">
43262
- {{ t('title') }}
43531
+ {{ t(isTable() ? 'titleTable' : 'title') }}
43263
43532
  </h3>
43264
43533
  <p class="text-xs text-muted-color leading-snug">
43265
- {{ t('description') }}
43534
+ {{ t(isTable() ? 'descriptionTable' : 'description') }}
43266
43535
  </p>
43267
43536
  </div>
43268
43537
  </header>
@@ -44460,7 +44729,14 @@ class ChartFilterDrawer {
44460
44729
  onLoadLevelLogs(schemaLevelId) {
44461
44730
  this.chartLevelLogs.set(this.dashboardService.getLevelLogsByLevelId(schemaLevelId));
44462
44731
  }
44732
+ /**
44733
+ * An interactive filter field still missing its key, name or source: Apply
44734
+ * waits for it, as the page's Manage Filters does (#1845).
44735
+ */
44736
+ incompleteField = computed(() => firstFilterFieldGap(this.interactiveFilters()), ...(ngDevMode ? [{ debugName: "incompleteField" }] : /* istanbul ignore next */ []));
44463
44737
  apply() {
44738
+ if (this.incompleteField())
44739
+ return;
44464
44740
  if (!this.dirty) {
44465
44741
  this.dialogRef.close(null);
44466
44742
  return;
@@ -44471,7 +44747,7 @@ class ChartFilterDrawer {
44471
44747
  this.dialogRef.close(null);
44472
44748
  }
44473
44749
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartFilterDrawer, deps: [], target: i0.ɵɵFactoryTarget.Component });
44474
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: ChartFilterDrawer, isStandalone: true, selector: "mt-chart-filter-drawer", ngImport: i0, template: `
44750
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ChartFilterDrawer, isStandalone: true, selector: "mt-chart-filter-drawer", ngImport: i0, template: `
44475
44751
  <div
44476
44752
  class="mt-chart-filter-drawer flex h-full min-h-0 flex-col"
44477
44753
  *transloco="let t; prefix: 'dashboardBuilder.filtersDrawer'"
@@ -44538,6 +44814,19 @@ class ChartFilterDrawer {
44538
44814
  <footer
44539
44815
  class="flex items-center justify-end gap-2 border-t border-surface-200 bg-surface-0 px-4 py-3"
44540
44816
  >
44817
+ @if (incompleteField(); as incomplete) {
44818
+ <span
44819
+ class="me-auto text-sm text-amber-700"
44820
+ role="alert"
44821
+ *transloco="let root; prefix: 'dashboardBuilder'"
44822
+ >
44823
+ {{
44824
+ root('filterFieldIncomplete_' + incomplete.gap, {
44825
+ n: incomplete.position,
44826
+ })
44827
+ }}
44828
+ </span>
44829
+ }
44541
44830
  <mt-button
44542
44831
  [label]="t('cancel')"
44543
44832
  variant="outlined"
@@ -44548,6 +44837,7 @@ class ChartFilterDrawer {
44548
44837
  [label]="t('apply')"
44549
44838
  icon="general.check"
44550
44839
  severity="primary"
44840
+ [disabled]="!!incompleteField()"
44551
44841
  (onClick)="apply()"
44552
44842
  />
44553
44843
  </footer>
@@ -44637,6 +44927,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
44637
44927
  <footer
44638
44928
  class="flex items-center justify-end gap-2 border-t border-surface-200 bg-surface-0 px-4 py-3"
44639
44929
  >
44930
+ @if (incompleteField(); as incomplete) {
44931
+ <span
44932
+ class="me-auto text-sm text-amber-700"
44933
+ role="alert"
44934
+ *transloco="let root; prefix: 'dashboardBuilder'"
44935
+ >
44936
+ {{
44937
+ root('filterFieldIncomplete_' + incomplete.gap, {
44938
+ n: incomplete.position,
44939
+ })
44940
+ }}
44941
+ </span>
44942
+ }
44640
44943
  <mt-button
44641
44944
  [label]="t('cancel')"
44642
44945
  variant="outlined"
@@ -44647,6 +44950,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
44647
44950
  [label]="t('apply')"
44648
44951
  icon="general.check"
44649
44952
  severity="primary"
44953
+ [disabled]="!!incompleteField()"
44650
44954
  (onClick)="apply()"
44651
44955
  />
44652
44956
  </footer>
@@ -47556,6 +47860,7 @@ class DashboardBuilder {
47556
47860
  transloco = inject(TranslocoService);
47557
47861
  modalService = inject(ModalService);
47558
47862
  confirmationService = inject(ConfirmationService);
47863
+ toast = inject(ToastService);
47559
47864
  route = inject(ActivatedRoute, { optional: true });
47560
47865
  // ============================================
47561
47866
  // Inputs
@@ -47829,6 +48134,8 @@ class DashboardBuilder {
47829
48134
  this.removeEventListeners();
47830
48135
  this.stopAutoScroll();
47831
48136
  this.storeService.updateStopActions(false);
48137
+ this.dashboardService.unsavedBuilderChanges.set(false);
48138
+ this.dashboardService.currentPageId.set(null);
47832
48139
  if (this.historyDebounce !== null) {
47833
48140
  clearTimeout(this.historyDebounce);
47834
48141
  }
@@ -48031,12 +48338,13 @@ class DashboardBuilder {
48031
48338
  if (!options.silent) {
48032
48339
  this.commitSavedState();
48033
48340
  this.onSave.emit();
48341
+ this.reportSaved(0);
48034
48342
  }
48035
48343
  return;
48036
48344
  }
48037
48345
  // Use bulk endpoint
48038
48346
  this.dashboardService
48039
- .linkChartsBulk(linkRequests, { silent: options.silent })
48347
+ .linkChartsBulk(linkRequests)
48040
48348
  .pipe(finalize$1(() => this.saving.set(false)))
48041
48349
  .subscribe({
48042
48350
  next: (response) => {
@@ -48078,10 +48386,25 @@ class DashboardBuilder {
48078
48386
  if (!options.silent) {
48079
48387
  this.commitSavedState();
48080
48388
  this.onSave.emit();
48389
+ this.reportSaved(linkRequests.length - responseData.length);
48081
48390
  }
48082
48391
  },
48083
48392
  });
48084
48393
  }
48394
+ /**
48395
+ * The builder's own save message. The link requests are silent: their
48396
+ * backend message is "Created successfully." even when an existing
48397
+ * dashboard is saved (#1906).
48398
+ */
48399
+ reportSaved(failedCount) {
48400
+ if (failedCount > 0) {
48401
+ this.toast.error(this.transloco.translate('dashboardBuilder.dashboardSavePartial', {
48402
+ count: failedCount,
48403
+ }));
48404
+ return;
48405
+ }
48406
+ this.toast.success(this.transloco.translate('dashboardBuilder.dashboardSaved'));
48407
+ }
48085
48408
  /**
48086
48409
  * Mark the current document as the saved baseline: drop the undo history so
48087
48410
  * Undo is disabled until the next edit (issue #1192 — undo is a *pre-save*
@@ -48464,7 +48787,10 @@ class DashboardBuilder {
48464
48787
  */
48465
48788
  openActionsDrawer(chart) {
48466
48789
  const ref = this.modalService.openModal(ActionsDrawer, 'drawer', {
48467
- header: this.transloco.translate('dashboardBuilder.actionsDrawer.title'),
48790
+ // A table's actions run on a row (#1906).
48791
+ header: this.transloco.translate(isTableRowComponent(chart.config?.clientConfig?.componentName)
48792
+ ? 'dashboardBuilder.actionsDrawer.titleTable'
48793
+ : 'dashboardBuilder.actionsDrawer.title'),
48468
48794
  styleClass: '!w-full sm:!w-11/12 md:!w-4/5 lg:!w-3/5 2xl:!w-2/5 !absolute',
48469
48795
  appendTo: '#page-content',
48470
48796
  position: 'end',
@@ -49735,7 +50061,9 @@ class DashboardBuilder {
49735
50061
  componentName: item.config?.clientConfig?.componentName ?? null,
49736
50062
  functionName: item.config?.clientConfig?.functionName ?? null,
49737
50063
  });
49738
- const nameKey = capability ? `dashboardBuilder.widget.${capability.id}` : '';
50064
+ const nameKey = capability
50065
+ ? `dashboardBuilder.widget.${capability.id}`
50066
+ : '';
49739
50067
  const widgetName = nameKey ? this.transloco.translate(nameKey) : '';
49740
50068
  const header = widgetName && widgetName !== nameKey
49741
50069
  ? this.transloco.translate('dashboardBuilder.widgetSettings', {
@@ -50038,6 +50366,11 @@ class DashboardBuilder {
50038
50366
  effect(() => {
50039
50367
  this.loadCurrentPageIfNeeded();
50040
50368
  });
50369
+ // Tell the action service and the actions drawer what is open here.
50370
+ effect(() => {
50371
+ this.dashboardService.unsavedBuilderChanges.set(this.canUndo() && !this.readonly());
50372
+ this.dashboardService.currentPageId.set(this.pageId());
50373
+ });
50041
50374
  // Apply standalone data when provided
50042
50375
  effect(() => {
50043
50376
  if (!this.standalone() || this.emittingDashboardData)
@@ -51515,11 +51848,11 @@ class DashboardList {
51515
51848
  this.dashboards.reload();
51516
51849
  }
51517
51850
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardList, deps: [], target: i0.ɵɵFactoryTarget.Component });
51518
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DashboardList, isStandalone: true, selector: "mt-dashboard-list", inputs: { isPage: { classPropertyName: "isPage", publicName: "isPage", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, baseRoute: { classPropertyName: "baseRoute", publicName: "baseRoute", isSignal: true, isRequired: false, transformFunction: null }, showCreateButton: { classPropertyName: "showCreateButton", publicName: "showCreateButton", isSignal: true, isRequired: false, transformFunction: null }, showViewButton: { classPropertyName: "showViewButton", publicName: "showViewButton", isSignal: true, isRequired: false, transformFunction: null }, showEditButton: { classPropertyName: "showEditButton", publicName: "showEditButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dashboardAction: "dashboardAction", dashboardCreated: "dashboardCreated" }, queries: [{ propertyName: "headerEnd", first: true, predicate: ["headerEnd"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "nameTpl", first: true, predicate: ["nameTpl"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder.dashboard'\">\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"pageTitle() || t('dashboards')\"\r\n [avatarIcon]=\"'chart.bar-chart-square-03'\"\r\n [avatarStyle]=\"{\r\n '--p-avatar-background': 'var(--p-cyan-100)',\r\n '--p-avatar-color': 'var(--p-cyan-700)',\r\n }\"\r\n >\r\n @if (headerEnd(); as hostActions) {\r\n <ng-template #headerEnd>\r\n <ng-container *ngTemplateOutlet=\"hostActions\" />\r\n </ng-template>\r\n }\r\n <!-- Content -->\r\n <ng-container *ngTemplateOutlet=\"tableContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <div class=\"dashboard-list space-y-3\">\r\n <!-- Header -->\r\n <h2 class=\"text-2xl font-semibold text-surface-900 dark:text-surface-0\">\r\n {{ t(\"dashboards\") }}\r\n </h2>\r\n\r\n <!-- Content -->\r\n <ng-container *ngTemplateOutlet=\"tableContent\" />\r\n </div>\r\n }\r\n\r\n <!-- Reusable table content template -->\r\n <ng-template #tableContent>\r\n <!-- Custom cell templates -->\r\n <ng-template #nameTpl let-row>\r\n <span class=\"font-semibold text-surface-900 dark:text-surface-0\">\r\n {{ getDashboardName(row) }}\r\n </span>\r\n </ng-template>\r\n\r\n <!-- Dashboard Table -->\r\n <mt-table\r\n [data]=\"dashboardList()\"\r\n [columns]=\"tableColumns()\"\r\n [actions]=\"tableActions()\"\r\n [rowActions]=\"rowActions()\"\r\n [loading]=\"isLoading()\"\r\n [showFilters]=\"true\"\r\n [generalSearch]=\"true\"\r\n dataKey=\"id\"\r\n storageKey=\"dashboard-list-table\"\r\n (cellChange)=\"onToggleChange($event)\"\r\n />\r\n </ng-template>\r\n</ng-container>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "showFilters", "filterMode", "filterCloseOnOutsideClick", "loading", "updating", "lazy", "lazyLocalSort", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "storageKey", "storageMode", "persistStateExclude", "exportable", "printable", "groupable", "groupCountMap", "cellClickFilter", "freezeActions", "virtualScroll", "virtualScrollItemSize", "scrollHeight", "printTitle", "exportFilename", "actionShape", "rowActionsLoadingFn", "tableLayout", "noCard", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "captionStartTemplate", "captionEndTemplate", "emptyTitle", "emptyDescription", "emptyActionLabel", "emptyActionIcon", "externalFiltersActive", "paginatorPosition", "alwaysShowPaginator", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm", "groupBy", "sortField", "sortDirection"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "emptyAction", "filtersCleared", "rowActionsRequested", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange", "groupByChange", "sortFieldChange", "sortDirectionChange"] }, { kind: "component", type: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
51851
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DashboardList, isStandalone: true, selector: "mt-dashboard-list", inputs: { isPage: { classPropertyName: "isPage", publicName: "isPage", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, baseRoute: { classPropertyName: "baseRoute", publicName: "baseRoute", isSignal: true, isRequired: false, transformFunction: null }, showCreateButton: { classPropertyName: "showCreateButton", publicName: "showCreateButton", isSignal: true, isRequired: false, transformFunction: null }, showViewButton: { classPropertyName: "showViewButton", publicName: "showViewButton", isSignal: true, isRequired: false, transformFunction: null }, showEditButton: { classPropertyName: "showEditButton", publicName: "showEditButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dashboardAction: "dashboardAction", dashboardCreated: "dashboardCreated" }, queries: [{ propertyName: "headerEnd", first: true, predicate: ["headerEnd"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "nameTpl", first: true, predicate: ["nameTpl"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder.dashboard'\">\n <!-- Page mode -->\n @if (isPage()) {\n <mt-page\n [title]=\"pageTitle() || t('dashboards')\"\n [avatarIcon]=\"'chart.bar-chart-square-03'\"\n [avatarStyle]=\"{\n '--p-avatar-background': 'var(--p-cyan-100)',\n '--p-avatar-color': 'var(--p-cyan-700)',\n }\"\n >\n @if (headerEnd(); as hostActions) {\n <ng-template #headerEnd>\n <ng-container *ngTemplateOutlet=\"hostActions\" />\n </ng-template>\n }\n <!-- Content -->\n <ng-container *ngTemplateOutlet=\"tableContent\" />\n </mt-page>\n } @else {\n <!-- Non-page mode -->\n <div class=\"dashboard-list space-y-3\">\n <!-- Header -->\n <h2 class=\"text-2xl font-semibold text-surface-900 dark:text-surface-0\">\n {{ t(\"dashboards\") }}\n </h2>\n\n <!-- Content -->\n <ng-container *ngTemplateOutlet=\"tableContent\" />\n </div>\n }\n\n <!-- Reusable table content template -->\n <ng-template #tableContent>\n <!-- Custom cell templates -->\n <ng-template #nameTpl let-row>\n <span class=\"font-semibold text-surface-900 dark:text-surface-0\">\n {{ getDashboardName(row) }}\n </span>\n </ng-template>\n\n <!-- Dashboard Table -->\n <mt-table\n [data]=\"dashboardList()\"\n [columns]=\"tableColumns()\"\n [actions]=\"tableActions()\"\n [rowActions]=\"rowActions()\"\n [loading]=\"isLoading()\"\n [showFilters]=\"true\"\n [generalSearch]=\"true\"\n dataKey=\"id\"\n storageKey=\"dashboard-list-table\"\n (cellChange)=\"onToggleChange($event)\"\n />\n </ng-template>\n</ng-container>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "showFilters", "filterMode", "filterCloseOnOutsideClick", "loading", "updating", "lazy", "lazyLocalSort", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "storageKey", "storageMode", "persistStateExclude", "exportable", "printable", "groupable", "groupCountMap", "cellClickFilter", "freezeActions", "virtualScroll", "virtualScrollItemSize", "scrollHeight", "printTitle", "exportFilename", "actionShape", "rowActionsLoadingFn", "tableLayout", "noCard", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "captionStartTemplate", "captionEndTemplate", "emptyTitle", "emptyDescription", "emptyActionLabel", "emptyActionIcon", "externalFiltersActive", "paginatorPosition", "alwaysShowPaginator", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm", "groupBy", "sortField", "sortDirection"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "emptyAction", "filtersCleared", "rowActionsRequested", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange", "groupByChange", "sortFieldChange", "sortDirectionChange"] }, { kind: "component", type: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
51519
51852
  }
51520
51853
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardList, decorators: [{
51521
51854
  type: Component,
51522
- args: [{ selector: 'mt-dashboard-list', standalone: true, imports: [CommonModule, TranslocoDirective, Table, Page], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder.dashboard'\">\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"pageTitle() || t('dashboards')\"\r\n [avatarIcon]=\"'chart.bar-chart-square-03'\"\r\n [avatarStyle]=\"{\r\n '--p-avatar-background': 'var(--p-cyan-100)',\r\n '--p-avatar-color': 'var(--p-cyan-700)',\r\n }\"\r\n >\r\n @if (headerEnd(); as hostActions) {\r\n <ng-template #headerEnd>\r\n <ng-container *ngTemplateOutlet=\"hostActions\" />\r\n </ng-template>\r\n }\r\n <!-- Content -->\r\n <ng-container *ngTemplateOutlet=\"tableContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <div class=\"dashboard-list space-y-3\">\r\n <!-- Header -->\r\n <h2 class=\"text-2xl font-semibold text-surface-900 dark:text-surface-0\">\r\n {{ t(\"dashboards\") }}\r\n </h2>\r\n\r\n <!-- Content -->\r\n <ng-container *ngTemplateOutlet=\"tableContent\" />\r\n </div>\r\n }\r\n\r\n <!-- Reusable table content template -->\r\n <ng-template #tableContent>\r\n <!-- Custom cell templates -->\r\n <ng-template #nameTpl let-row>\r\n <span class=\"font-semibold text-surface-900 dark:text-surface-0\">\r\n {{ getDashboardName(row) }}\r\n </span>\r\n </ng-template>\r\n\r\n <!-- Dashboard Table -->\r\n <mt-table\r\n [data]=\"dashboardList()\"\r\n [columns]=\"tableColumns()\"\r\n [actions]=\"tableActions()\"\r\n [rowActions]=\"rowActions()\"\r\n [loading]=\"isLoading()\"\r\n [showFilters]=\"true\"\r\n [generalSearch]=\"true\"\r\n dataKey=\"id\"\r\n storageKey=\"dashboard-list-table\"\r\n (cellChange)=\"onToggleChange($event)\"\r\n />\r\n </ng-template>\r\n</ng-container>\r\n" }]
51855
+ args: [{ selector: 'mt-dashboard-list', standalone: true, imports: [CommonModule, TranslocoDirective, Table, Page], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder.dashboard'\">\n <!-- Page mode -->\n @if (isPage()) {\n <mt-page\n [title]=\"pageTitle() || t('dashboards')\"\n [avatarIcon]=\"'chart.bar-chart-square-03'\"\n [avatarStyle]=\"{\n '--p-avatar-background': 'var(--p-cyan-100)',\n '--p-avatar-color': 'var(--p-cyan-700)',\n }\"\n >\n @if (headerEnd(); as hostActions) {\n <ng-template #headerEnd>\n <ng-container *ngTemplateOutlet=\"hostActions\" />\n </ng-template>\n }\n <!-- Content -->\n <ng-container *ngTemplateOutlet=\"tableContent\" />\n </mt-page>\n } @else {\n <!-- Non-page mode -->\n <div class=\"dashboard-list space-y-3\">\n <!-- Header -->\n <h2 class=\"text-2xl font-semibold text-surface-900 dark:text-surface-0\">\n {{ t(\"dashboards\") }}\n </h2>\n\n <!-- Content -->\n <ng-container *ngTemplateOutlet=\"tableContent\" />\n </div>\n }\n\n <!-- Reusable table content template -->\n <ng-template #tableContent>\n <!-- Custom cell templates -->\n <ng-template #nameTpl let-row>\n <span class=\"font-semibold text-surface-900 dark:text-surface-0\">\n {{ getDashboardName(row) }}\n </span>\n </ng-template>\n\n <!-- Dashboard Table -->\n <mt-table\n [data]=\"dashboardList()\"\n [columns]=\"tableColumns()\"\n [actions]=\"tableActions()\"\n [rowActions]=\"rowActions()\"\n [loading]=\"isLoading()\"\n [showFilters]=\"true\"\n [generalSearch]=\"true\"\n dataKey=\"id\"\n storageKey=\"dashboard-list-table\"\n (cellChange)=\"onToggleChange($event)\"\n />\n </ng-template>\n</ng-container>\n" }]
51523
51856
  }], propDecorators: { nameTpl: [{ type: i0.ViewChild, args: ['nameTpl', { isSignal: true }] }], headerEnd: [{ type: i0.ContentChild, args: ['headerEnd', { isSignal: true }] }], isPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPage", required: false }] }], pageTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageTitle", required: false }] }], baseRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseRoute", required: false }] }], showCreateButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCreateButton", required: false }] }], showViewButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showViewButton", required: false }] }], showEditButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showEditButton", required: false }] }], dashboardAction: [{ type: i0.Output, args: ["dashboardAction"] }], dashboardCreated: [{ type: i0.Output, args: ["dashboardCreated"] }] } });
51524
51857
 
51525
51858
  /**
@@ -54387,7 +54720,7 @@ class ChartSettingsDrawer {
54387
54720
  return dedupeLegendOrderItems(items);
54388
54721
  }
54389
54722
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartSettingsDrawer, deps: [], target: i0.ɵɵFactoryTarget.Component });
54390
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ChartSettingsDrawer, isStandalone: true, selector: "mt-chart-settings-drawer", ngImport: i0, template: "<div\r\n [class]=\"\r\n modal.contentClass + ' db-sectioned-drawer flex h-full min-h-0 flex-col p-0'\r\n \"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <!-- Tabs + preview toggle -->\r\n <div\r\n class=\"sticky top-0 z-10 flex items-center justify-between gap-3 border-b border-surface-200 bg-surface-0 px-4 pb-3 pt-4\"\r\n >\r\n <mt-tabs\r\n [options]=\"tabOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [(active)]=\"activeTab\"\r\n />\r\n\r\n @if (showDisplayTab()) {\r\n <mt-button\r\n [label]=\"previewCollapsed() ? t('showPreview') : t('hidePreview')\"\r\n [icon]=\"previewCollapsed() ? 'general.eye' : 'general.eye-off'\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"togglePreview()\"\r\n />\r\n }\r\n </div>\r\n\r\n <!-- Body: config pane + collapsible preview pane -->\r\n <div class=\"flex min-h-0 flex-1\">\r\n <!-- Config pane -->\r\n <div class=\"min-w-0 flex-1 overflow-y-auto px-4 pb-4 pt-3\">\r\n @if (showDisplayTab()) {\r\n <!-- Display Tab -->\r\n <div [hidden]=\"activeTab() !== 'display'\" class=\"flex flex-col gap-3\">\r\n <mt-display-settings\r\n [config]=\"itemConfig()\"\r\n [chartType]=\"resolvedChartType()\"\r\n [availableProperties]=\"stylePropertiesFlat()\"\r\n [selectedProperties]=\"selectedStyleProperties()\"\r\n (clientConfigChange)=\"onClientConfigUpdate($event)\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Legend Tab -->\r\n <div [hidden]=\"activeTab() !== 'legend'\" class=\"flex flex-col gap-3\">\r\n <div class=\"db-control-section\">\r\n <h4 class=\"db-control-section__header\">\r\n {{ t(\"legendSettings\") }}\r\n </h4>\r\n\r\n <div class=\"db-control-section__body flex flex-col gap-4\">\r\n <mt-toggle-field\r\n [label]=\"t('showLegend')\"\r\n [ngModel]=\"legendConfig().show\"\r\n (ngModelChange)=\"updateLegend('show', $event)\"\r\n labelPosition=\"start\"\r\n />\r\n\r\n @if (legendConfig().show) {\r\n <mt-select-field\r\n [label]=\"t('legendPosition')\"\r\n [ngModel]=\"legendConfig().position\"\r\n (ngModelChange)=\"updateLegend('position', $event)\"\r\n [options]=\"legendPositionOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('legendIconType')\"\r\n [ngModel]=\"legendConfig().iconType\"\r\n (ngModelChange)=\"updateLegend('iconType', $event)\"\r\n [options]=\"legendIconOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n\r\n @if (legendConfig().show) {\r\n <div class=\"db-control-section\">\r\n <h4 class=\"db-control-section__header\">\r\n {{ t(\"legendOrder\") }}\r\n </h4>\r\n\r\n <div class=\"db-control-section__body\">\r\n @if (legendItems().length) {\r\n <div\r\n cdkDropList\r\n [cdkDropListData]=\"legendItems()\"\r\n (cdkDropListDropped)=\"dropLegendItem($event)\"\r\n class=\"flex flex-col gap-2\"\r\n >\r\n @for (legend of legendItems(); track legend.name) {\r\n <div\r\n cdkDrag\r\n class=\"flex items-center gap-3 rounded-lg border border-surface-200 bg-surface-50 px-3 py-2\"\r\n >\r\n <span\r\n cdkDragHandle\r\n class=\"cursor-grab text-muted-color\"\r\n aria-hidden=\"true\"\r\n >::</span\r\n >\r\n <span class=\"min-w-0 flex-1 truncate text-sm\">\r\n {{ legend.name }}\r\n </span>\r\n <div\r\n class=\"w-44 max-w-[55%] shrink-0\"\r\n role=\"group\"\r\n [attr.aria-label]=\"\r\n t('legendColorFor', { name: legend.name })\r\n \"\r\n >\r\n <mt-color-picker-field\r\n [ngModel]=\"legendColor(legend)\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n (ngModelChange)=\"updateLegendColor(legend, $event)\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div class=\"mt-3 flex justify-end\">\r\n <mt-button\r\n [label]=\"t('resetLegendOrder')\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"resetLegendOrder()\"\r\n />\r\n </div>\r\n } @else {\r\n <div class=\"py-4 text-sm text-muted-color\">\r\n {{ t(\"noLegendItems\") }}\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Chart Controls Tab -->\r\n <div\r\n [hidden]=\"activeTab() !== 'chartControls'\"\r\n class=\"flex flex-col gap-3\"\r\n >\r\n @switch (manageType()) {\r\n @case (\"default\") {\r\n <mt-default-control-ui\r\n [ngModel]=\"defaultControlConfig()\"\r\n [showIconSettings]=\"isLayoutItem()\"\r\n [layoutComponent]=\"layoutComponentName()\"\r\n (ngModelChange)=\"onDefaultConfigChange($event)\"\r\n />\r\n }\r\n\r\n @case (\"pie\") {\r\n <mt-pie-control-ui\r\n [ngModel]=\"pieConfig()\"\r\n (ngModelChange)=\"onPieConfigChange($event)\"\r\n />\r\n }\r\n\r\n @case (\"bar\") {\r\n <mt-bar-control-ui\r\n [ngModel]=\"barConfig()\"\r\n (ngModelChange)=\"onBarConfigChange($event)\"\r\n />\r\n }\r\n\r\n @case (\"stackBar\") {\r\n <mt-stack-bar-control-ui\r\n [ngModel]=\"stackBarConfig()\"\r\n (ngModelChange)=\"onStackBarConfigChange($event)\"\r\n />\r\n }\r\n\r\n @case (\"snapshotBar\") {\r\n <mt-bar-control-ui\r\n [ngModel]=\"snapshotBarConfig()\"\r\n (ngModelChange)=\"onSnapshotBarConfigChange($event)\"\r\n />\r\n }\r\n\r\n @default {\r\n <!-- Pass-4: schema-driven controls fill the gap for chart/item types\r\n that don't have a bespoke quick-control component. -->\r\n <mt-schema-control-renderer\r\n [schema]=\"schemaForItem()\"\r\n [persisted]=\"itemConfig()\"\r\n [capability]=\"capability()\"\r\n scope=\"advanced\"\r\n (patch)=\"onSchemaPatch($event)\"\r\n />\r\n }\r\n }\r\n </div>\r\n\r\n <!-- Advanced Override (JSON) -->\r\n <div [hidden]=\"activeTab() !== 'advanced'\" class=\"flex flex-col gap-3\">\r\n @if (activeTab() === \"advanced\") {\r\n <ng-container>\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"pass4.advanced.hint\") }}\r\n </p>\r\n <textarea\r\n class=\"font-mono text-xs w-full p-2 rounded border border-surface-300 bg-surface-50\"\r\n rows=\"14\"\r\n spellcheck=\"false\"\r\n (focus)=\"initAdvancedJsonIfNeeded()\"\r\n [value]=\"advancedJsonDraft()\"\r\n (input)=\"onAdvancedJsonChange($any($event.target).value)\"\r\n ></textarea>\r\n @if (advancedJsonError()) {\r\n <p class=\"text-xs text-red-600\">{{ advancedJsonError() }}</p>\r\n }\r\n <div class=\"flex justify-end\">\r\n <mt-button\r\n [label]=\"t('pass4.advanced.apply')\"\r\n icon=\"general.check\"\r\n size=\"small\"\r\n (onClick)=\"applyAdvancedJson()\"\r\n />\r\n </div>\r\n </ng-container>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Collapsible preview pane -->\r\n @if (showDisplayTab() && !previewCollapsed()) {\r\n <div\r\n class=\"flex w-2/5 min-w-[22rem] flex-col border-l border-surface-200 bg-surface-50 p-3\"\r\n >\r\n @if (canRenderChartPreview()) {\r\n <mt-card-content\r\n class=\"block h-full w-full\"\r\n [headerConfig]=\"previewHeaderConfig()\"\r\n [styleConfig]=\"previewStyleConfig()\"\r\n [cardStyleConfig]=\"previewCardStyleConfig()\"\r\n [density]=\"previewDensity()\"\r\n [title]=\"previewTitle()\"\r\n [isNoTopEnd]=\"true\"\r\n [isChart]=\"true\"\r\n >\r\n <ng-container body>\r\n <mt-echart\r\n class=\"block h-full w-full\"\r\n [dashboardId]=\"previewDashboardId\"\r\n [chartConfig]=\"previewChartData()\"\r\n [configurationItem]=\"itemConfig()\"\r\n height=\"100%\"\r\n />\r\n </ng-container>\r\n </mt-card-content>\r\n } @else {\r\n <div\r\n class=\"flex flex-1 items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-0 p-4 text-center\"\r\n >\r\n <div class=\"max-w-sm\">\r\n <p class=\"text-sm font-medium text-color\">\r\n {{ t(\"noPreviewAvailable\") }}\r\n </p>\r\n <p class=\"mt-1 text-xs text-muted-color\">\r\n {{ t(\"configureChartToPreview\") }}\r\n </p>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n\r\n<div\r\n [class]=\"\r\n modal.footerClass + ' border-t border-surface-200 bg-surface-0 px-4 py-3'\r\n \"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <mt-button [label]=\"t('cancel')\" variant=\"outlined\" (onClick)=\"close()\" />\r\n <mt-button [label]=\"t('apply')\" icon=\"general.check\" (onClick)=\"apply()\" />\r\n</div>\r\n", styles: [".db-sectioned-drawer mt-card{overflow:hidden;border-color:var(--p-surface-200, #e5e7eb);background:var(--p-surface-0, #fff);border-radius:.375rem}.db-sectioned-drawer mt-card>div>div:first-child:not(.flex-1){padding:.75rem 1rem;border-bottom:1px solid var(--p-surface-200, #e5e7eb);background:var(--p-surface-50, #f9fafb)}.db-sectioned-drawer mt-card>div>div:first-child:not(.flex-1) h3{margin:0;font-size:1.125rem;line-height:1.75rem;font-weight:600;color:var(--p-text-color, #111827)}.db-control-section{display:flex;flex-direction:column;gap:0;overflow:hidden;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.375rem;background:var(--p-surface-0, #fff)}.db-control-section__header{margin:0;padding:.75rem 1rem;border-bottom:1px solid var(--p-surface-200, #e5e7eb);background:var(--p-surface-50, #f9fafb);font-size:1.125rem;line-height:1.75rem;font-weight:600;color:var(--p-text-color, #111827)}.db-control-section__body{padding:1rem}\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", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "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: 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: ColorPickerField, selector: "mt-color-picker-field", inputs: ["label", "appendTo", "placeholder", "class", "variant", "readonly", "pInputs", "required"], outputs: ["onChange"] }, { kind: "component", type: DisplaySettings, selector: "mt-display-settings", inputs: ["config", "chartType", "availableProperties", "selectedProperties", "lookups"], outputs: ["clientConfigChange"] }, { kind: "component", type: DefaultControlUi, selector: "mt-default-control-ui", inputs: ["showIconSettings", "layoutComponent"] }, { kind: "component", type: PieControlUi, selector: "mt-pie-control-ui" }, { kind: "component", type: BarControlUi, selector: "mt-bar-control-ui" }, { kind: "component", type: StackBarControlUi, selector: "mt-stack-bar-control-ui" }, { kind: "component", type: SchemaControlRendererComponent, selector: "mt-schema-control-renderer", inputs: ["schema", "persisted", "capability", "scope"], outputs: ["patch"] }, { kind: "component", type: EChartComponent, selector: "mt-echart", inputs: ["dashboardId", "chartConfig", "configurationItem", "height", "inGroup", "headerHidden"], outputs: ["chartClick"] }, { 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: "ngmodule", type: DragDropModule }, { kind: "directive", type: i2$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2$2.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
54723
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ChartSettingsDrawer, isStandalone: true, selector: "mt-chart-settings-drawer", ngImport: i0, template: "<div\r\n [class]=\"\r\n modal.contentClass + ' db-sectioned-drawer flex h-full min-h-0 flex-col p-0'\r\n \"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <!-- Tabs + preview toggle -->\r\n <div\r\n class=\"sticky top-0 z-10 flex items-center justify-between gap-3 border-b border-surface-200 bg-surface-0 px-4 pb-3 pt-4\"\r\n >\r\n <mt-tabs\r\n [options]=\"tabOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [(active)]=\"activeTab\"\r\n />\r\n\r\n @if (showDisplayTab()) {\r\n <mt-button\r\n [label]=\"previewCollapsed() ? t('showPreview') : t('hidePreview')\"\r\n [icon]=\"previewCollapsed() ? 'general.eye' : 'general.eye-off'\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"togglePreview()\"\r\n />\r\n }\r\n </div>\r\n\r\n <!-- Body: config pane + collapsible preview pane -->\r\n <div class=\"flex min-h-0 flex-1\">\r\n <!-- Config pane -->\r\n <div class=\"min-w-0 flex-1 overflow-y-auto px-4 pb-4 pt-3\">\r\n @if (showDisplayTab()) {\r\n <!-- Display Tab -->\r\n <div [hidden]=\"activeTab() !== 'display'\" class=\"flex flex-col gap-3\">\r\n <mt-display-settings\r\n [config]=\"itemConfig()\"\r\n [chartType]=\"resolvedChartType()\"\r\n [availableProperties]=\"stylePropertiesFlat()\"\r\n [selectedProperties]=\"selectedStyleProperties()\"\r\n (clientConfigChange)=\"onClientConfigUpdate($event)\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Legend Tab -->\r\n <div [hidden]=\"activeTab() !== 'legend'\" class=\"flex flex-col gap-3\">\r\n <div class=\"db-control-section\">\r\n <h4 class=\"db-control-section__header\">\r\n {{ t(\"legendSettings\") }}\r\n </h4>\r\n\r\n <div class=\"db-control-section__body flex flex-col gap-4\">\r\n <mt-toggle-field\r\n [label]=\"t('showLegend')\"\r\n [ngModel]=\"legendConfig().show\"\r\n (ngModelChange)=\"updateLegend('show', $event)\"\r\n labelPosition=\"start\"\r\n />\r\n\r\n @if (legendConfig().show) {\r\n <mt-select-field\r\n [label]=\"t('legendPosition')\"\r\n [ngModel]=\"legendConfig().position\"\r\n (ngModelChange)=\"updateLegend('position', $event)\"\r\n [options]=\"legendPositionOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('legendIconType')\"\r\n [ngModel]=\"legendConfig().iconType\"\r\n (ngModelChange)=\"updateLegend('iconType', $event)\"\r\n [options]=\"legendIconOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n\r\n @if (legendConfig().show) {\r\n <div class=\"db-control-section\">\r\n <h4 class=\"db-control-section__header\">\r\n {{ t(\"legendOrder\") }}\r\n </h4>\r\n\r\n <div class=\"db-control-section__body\">\r\n @if (legendItems().length) {\r\n <div\r\n cdkDropList\r\n [cdkDropListData]=\"legendItems()\"\r\n (cdkDropListDropped)=\"dropLegendItem($event)\"\r\n class=\"flex flex-col gap-2\"\r\n >\r\n @for (legend of legendItems(); track legend.name) {\r\n <div\r\n cdkDrag\r\n class=\"flex items-center gap-3 rounded-lg border border-surface-200 bg-surface-50 px-3 py-2\"\r\n >\r\n <span\r\n cdkDragHandle\r\n class=\"cursor-grab text-muted-color\"\r\n aria-hidden=\"true\"\r\n >::</span\r\n >\r\n <span class=\"min-w-0 flex-1 truncate text-sm\">\r\n {{ legend.name }}\r\n </span>\r\n <div\r\n class=\"w-44 max-w-[55%] shrink-0\"\r\n role=\"group\"\r\n [attr.aria-label]=\"\r\n t('legendColorFor', { name: legend.name })\r\n \"\r\n >\r\n <mt-color-picker-field\r\n [ngModel]=\"legendColor(legend)\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n (ngModelChange)=\"updateLegendColor(legend, $event)\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div class=\"mt-3 flex justify-end\">\r\n <mt-button\r\n [label]=\"t('resetLegendOrder')\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"resetLegendOrder()\"\r\n />\r\n </div>\r\n } @else {\r\n <div class=\"py-4 text-sm text-muted-color\">\r\n {{ t(\"noLegendItems\") }}\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Chart Controls Tab -->\r\n <div\r\n [hidden]=\"activeTab() !== 'chartControls'\"\r\n class=\"flex flex-col gap-3\"\r\n >\r\n @switch (manageType()) {\r\n @case (\"default\") {\r\n <mt-default-control-ui\r\n [ngModel]=\"defaultControlConfig()\"\r\n [showIconSettings]=\"isLayoutItem()\"\r\n [layoutComponent]=\"layoutComponentName()\"\r\n (ngModelChange)=\"onDefaultConfigChange($event)\"\r\n />\r\n }\r\n\r\n @case (\"pie\") {\r\n <mt-pie-control-ui\r\n [ngModel]=\"pieConfig()\"\r\n (ngModelChange)=\"onPieConfigChange($event)\"\r\n />\r\n }\r\n\r\n @case (\"bar\") {\r\n <mt-bar-control-ui\r\n [ngModel]=\"barConfig()\"\r\n (ngModelChange)=\"onBarConfigChange($event)\"\r\n />\r\n }\r\n\r\n @case (\"stackBar\") {\r\n <mt-stack-bar-control-ui\r\n [ngModel]=\"stackBarConfig()\"\r\n (ngModelChange)=\"onStackBarConfigChange($event)\"\r\n />\r\n }\r\n\r\n @case (\"snapshotBar\") {\r\n <mt-bar-control-ui\r\n [ngModel]=\"snapshotBarConfig()\"\r\n (ngModelChange)=\"onSnapshotBarConfigChange($event)\"\r\n />\r\n }\r\n\r\n @default {\r\n <!-- Pass-4: schema-driven controls fill the gap for chart/item types\r\n that don't have a bespoke quick-control component. -->\r\n <mt-schema-control-renderer\r\n [schema]=\"schemaForItem()\"\r\n [persisted]=\"itemConfig()\"\r\n [capability]=\"capability()\"\r\n scope=\"advanced\"\r\n (patch)=\"onSchemaPatch($event)\"\r\n />\r\n }\r\n }\r\n </div>\r\n\r\n <!-- Advanced Override (JSON) -->\r\n <div [hidden]=\"activeTab() !== 'advanced'\" class=\"flex flex-col gap-3\">\r\n @if (activeTab() === \"advanced\") {\r\n <ng-container>\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"pass4.advanced.hint\") }}\r\n </p>\r\n <textarea\r\n class=\"font-mono text-xs w-full p-2 rounded border border-surface-300 bg-surface-50\"\r\n rows=\"14\"\r\n spellcheck=\"false\"\r\n (focus)=\"initAdvancedJsonIfNeeded()\"\r\n [value]=\"advancedJsonDraft()\"\r\n (input)=\"onAdvancedJsonChange($any($event.target).value)\"\r\n ></textarea>\r\n @if (advancedJsonError()) {\r\n <p class=\"text-xs text-red-600\">{{ advancedJsonError() }}</p>\r\n }\r\n <div class=\"flex justify-end\">\r\n <mt-button\r\n [label]=\"t('pass4.advanced.apply')\"\r\n icon=\"general.check\"\r\n size=\"small\"\r\n (onClick)=\"applyAdvancedJson()\"\r\n />\r\n </div>\r\n </ng-container>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Collapsible preview pane -->\r\n @if (showDisplayTab() && !previewCollapsed()) {\r\n <div\r\n class=\"flex w-2/5 min-w-[22rem] flex-col border-l border-surface-200 bg-surface-50 p-3\"\r\n >\r\n @if (canRenderChartPreview()) {\r\n <mt-card-content\r\n class=\"block h-full w-full\"\r\n [headerConfig]=\"previewHeaderConfig()\"\r\n [styleConfig]=\"previewStyleConfig()\"\r\n [cardStyleConfig]=\"previewCardStyleConfig()\"\r\n [density]=\"previewDensity()\"\r\n [title]=\"previewTitle()\"\r\n [isNoTopEnd]=\"true\"\r\n [isChart]=\"true\"\r\n >\r\n <ng-container body>\r\n <mt-echart\r\n class=\"block h-full w-full\"\r\n [dashboardId]=\"previewDashboardId\"\r\n [chartConfig]=\"previewChartData()\"\r\n [configurationItem]=\"itemConfig()\"\r\n height=\"100%\"\r\n />\r\n </ng-container>\r\n </mt-card-content>\r\n } @else {\r\n <div\r\n class=\"flex flex-1 items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-0 p-4 text-center\"\r\n >\r\n <div class=\"max-w-sm\">\r\n <p class=\"text-sm font-medium text-color\">\r\n {{ t(\"noPreviewAvailable\") }}\r\n </p>\r\n <p class=\"mt-1 text-xs text-muted-color\">\r\n {{ t(\"configureChartToPreview\") }}\r\n </p>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n\r\n<div\r\n [class]=\"\r\n modal.footerClass + ' border-t border-surface-200 bg-surface-0 px-4 py-3'\r\n \"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <mt-button [label]=\"t('cancel')\" variant=\"outlined\" (onClick)=\"close()\" />\r\n <mt-button [label]=\"t('apply')\" icon=\"general.check\" (onClick)=\"apply()\" />\r\n</div>\r\n", styles: [".db-sectioned-drawer mt-card{overflow:hidden;border-color:var(--p-surface-200, #e5e7eb);background:var(--p-surface-0, #fff);border-radius:.375rem}.db-sectioned-drawer mt-card>div>div:first-child:not(.flex-1){padding:.75rem 1rem;border-bottom:1px solid var(--p-surface-200, #e5e7eb);background:var(--p-surface-50, #f9fafb)}.db-sectioned-drawer mt-card>div>div:first-child:not(.flex-1) h3{margin:0;font-size:1.125rem;line-height:1.75rem;font-weight:600;color:var(--p-text-color, #111827)}.db-control-section{display:flex;flex-direction:column;gap:0;overflow:hidden;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.375rem;background:var(--p-surface-0, #fff)}.db-control-section__header{margin:0;padding:.75rem 1rem;border-bottom:1px solid var(--p-surface-200, #e5e7eb);background:var(--p-surface-50, #f9fafb);font-size:1.125rem;line-height:1.75rem;font-weight:600;color:var(--p-text-color, #111827)}.db-control-section__body{padding:1rem}\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", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "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: 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: ColorPickerField, selector: "mt-color-picker-field", inputs: ["label", "appendTo", "placeholder", "class", "variant", "readonly", "pInputs", "required"], outputs: ["onChange"] }, { kind: "component", type: DisplaySettings, selector: "mt-display-settings", inputs: ["config", "chartType", "availableProperties", "selectedProperties", "lookups"], outputs: ["clientConfigChange"] }, { kind: "component", type: DefaultControlUi, selector: "mt-default-control-ui", inputs: ["showIconSettings", "layoutComponent"] }, { kind: "component", type: PieControlUi, selector: "mt-pie-control-ui" }, { kind: "component", type: BarControlUi, selector: "mt-bar-control-ui" }, { kind: "component", type: StackBarControlUi, selector: "mt-stack-bar-control-ui" }, { kind: "component", type: SchemaControlRendererComponent, selector: "mt-schema-control-renderer", inputs: ["schema", "persisted", "capability", "scope"], outputs: ["patch"] }, { kind: "component", type: EChartComponent, selector: "mt-echart", inputs: ["dashboardId", "chartConfig", "configurationItem", "height", "inGroup", "headerHidden"], outputs: ["chartClick", "chartDblClick"] }, { 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: "ngmodule", type: DragDropModule }, { kind: "directive", type: i2$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2$2.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
54391
54724
  }
54392
54725
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartSettingsDrawer, decorators: [{
54393
54726
  type: Component,
@@ -54535,4 +54868,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
54535
54868
  */
54536
54869
 
54537
54870
  export { TopbarCardComponent as $, dateDisplayRawValue as A, normalizeDashboardCardEntityValue as B, CardContentComponent as C, DashboardItemStoreService as D, EChartComponent as E, FilterUtilsService as F, mergePropertyAppearance as G, EntityPreviewCardComponent as H, HeaderCardComponent as I, ListStatisticCardComponent as J, MAP_FALLBACK_COLORS as K, LastHistoryLevelCardComponent as L, MAP_MARKER_PATH as M, isPlottable as N, plottableGroups as O, PropertiesCardComponent as P, buildMapChartOption as Q, MAP_REGIONS as R, StaticFiltersComponent as S, DEFAULT_MAP_REGION_KEY as T, MAP_DATA_ATTRIBUTION as U, resolveMapRegion as V, MapViewComponent as W, SkeletonCardComponent as X, resolveStatisticIconPlacement as Y, StatisticCardComponent as Z, TableCardComponent as _, DashboardItem as a, expandResetPatches as a$, ChartDataService as a0, observeNearViewport as a1, loadImmediately as a2, DASHBOARD_ITEM_VISIBILITY as a3, BarChartHandler as a4, PieChartHandler as a5, StackBarChartHandler as a6, axisFormatters as a7, groupDatesByYearAndMonth as a8, GaugeChartHandler as a9, DashboardList as aA, MODULE_CLASSIFICATION_LOG as aB, MODULE_CLASSIFICATION_LOG_NAME as aC, isLogClassification as aD, HTTPMethod as aE, DashboardBuilderService as aF, DashboardStoreService as aG, isManagePagesDeleteResult as aH, ManagePages as aI, ManageBreadcrumb as aJ, ManageFilterOnPage as aK, DynamicFiltersConfig as aL, ChartSettingsDrawer as aM, DisplaySettings as aN, DefaultControlUi as aO, PieControlUi as aP, BarControlUi as aQ, StackBarControlUi as aR, ManageItem as aS, CHART_TYPES as aT, ManageItemService as aU, GeneralSettings as aV, DataSourceSettings as aW, ActionsSettings as aX, ChartViewer as aY, StyleStudioDrawer as aZ, StyleSettingsRenderer as a_, TableViewHandler as aa, OverviewCardHandler as ab, TimelineHandler as ac, LineChartHandler as ad, SnapshotHandler as ae, ComparisonChartHandler as af, SplitterChartHandler as ag, LevelCardHandler as ah, MapChartHandler as ai, RingGaugeChartHandler as aj, SPlusChartHandler as ak, PhaseGateStepperHandler as al, formatCurrency as am, getCurrencySuffix as an, formatPercentage as ao, formatNumber as ap, formatDate as aq, createAxisFormatter as ar, createTooltipFormatter as as, formatAxisLabel as at, formatWordsUnderBar as au, formatXAxis as av, handleFiltersForCustom as aw, handleFilterForCard as ax, handleFilterForSnapshot as ay, applyBuiltInConditions as az, DashboardDialogHeader as b, readByPath$1 as b$, StyleField as b0, SegmentedField as b1, ColorListField as b2, ArrayBuilderField as b3, KeyValueMapField as b4, LegendOrderField as b5, ItemCardMenuComponent as b6, ChartFilterDrawer as b7, ItemContextToolbarComponent as b8, ItemConfigPopoverComponent as b9, POPOVER_TAB_SPECS as bA, titleToUi as bB, applyTitleToPersisted as bC, datasourceToUi as bD, fieldsToUi as bE, filtersToUi as bF, styleToUi as bG, applyStyleToPersisted as bH, layoutToUi as bI, applyLayoutToPersisted as bJ, labelLegendFormatToUi as bK, applyLabelLegendFormatToPersisted as bL, behaviorToUi as bM, applyBehaviorToPersisted as bN, applyFilterChipsToPersisted as bO, persistedToUi as bP, buildAssembly as bQ, STYLE_PRESETS as bR, presetsForCapability as bS, findPreset as bT, validate as bU, hasBlockingIssues as bV, groupIssuesByDomain as bW, parseAdvancedJson as bX, deepMerge$1 as bY, formatForEditor as bZ, CUSTOM_COLOR_OPTION as b_, GuidedConfigDialogComponent as ba, FilterChipsBarComponent as bb, FilterBuilderComponent as bc, DatasourcePanelComponent as bd, SchemaControlRendererComponent as be, FilterByGroupPipe as bf, GetChartActionsPipe as bg, CHART_CAPABILITIES as bh, getCapabilityById as bi, resolveCapability as bj, toBackendChartType as bk, normalizeChartTypeForRequest as bl, normalizeFilterOperation as bm, normalizeAggregateFunction as bn, normalizeFilters as bo, selectorFromLegacy as bp, moduleIdFromSelector as bq, toBackendSourceLink as br, toFormSourceLink as bs, normalizeOnLoad as bt, normalizeBeforeSave as bu, normalizeBeforeRequest as bv, CONFIG_DOMAINS as bw, domainsForCapability as bx, findDomain as by, POPOVER_TABS as bz, cloneDeep$1 as c, setByPath as c0, applyControlPatchToPersisted as c1, applyControlPatchesToPersisted as c2, getControlSchema as c3, listControlSchemaIds as c4, listControlSchemas as c5, getFallbackControlSchema as c6, flattenSchema as c7, resolveDisplayFields as c8, buildDisplayFieldPredicate as c9, bindingKey as ca, getBinding as cb, listBindings as cc, listBindingsForChart as cd, readBoundValue as ce, ITEM_GUIDANCE_REGISTRY as cf, describeGuidance as cg, ItemGuidanceService as ch, DashboardBuilder as d, DashboardViewer as e, switchAllKeysSmall$1 as f, getNestedData as g, dynamicTextReplace as h, dynamicReorder as i, generalConfiguration as j, formatValue as k, getLocalizedTitle as l, sortChartData as m, addCommasToNumber as n, sortDataTableView as o, isMobilePlatform$1 as p, getColorFromConditions as q, resolveDashboardDialogHeader as r, switchAllKeysToLower as s, CardFilterComponent as t, DynamicFiltersComponent as u, CardInfoComponent as v, ChartCardComponent as w, resolveEntityUserPhoto as x, resolveEntityCheckbox as y, EntityInfoComponent as z };
54538
- //# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-CQPXn8PH.mjs.map
54871
+ //# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-BjNTcvqc.mjs.map