@masterteam/dashboard-builder 0.0.111 → 0.0.113

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 { InjectionToken, inject, signal, Injectable, computed, Pipe, input, ViewEncapsulation, ChangeDetectionStrategy, Component, effect, untracked, forwardRef, ViewChild, DestroyRef, output, ElementRef, NgZone, PLATFORM_ID, 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';
@@ -70,6 +70,15 @@ import { ButtonModule } from 'primeng/button';
70
70
  import * as i2$5 from 'primeng/inputnumber';
71
71
  import { InputNumberModule } from 'primeng/inputnumber';
72
72
 
73
+ const DASHBOARD_REPORT_ACCESS = new InjectionToken('DASHBOARD_REPORT_ACCESS', {
74
+ providedIn: 'root',
75
+ factory: () => 'runtime',
76
+ });
77
+ /** Read dashboards through the builder routes (control-panel hosts). */
78
+ function provideDashboardBuilderAccess() {
79
+ return { provide: DASHBOARD_REPORT_ACCESS, useValue: 'builder' };
80
+ }
81
+
73
82
  /**
74
83
  * `ModuleClassificationEnum.Log` — `1` is `Process`.
75
84
  *
@@ -292,6 +301,10 @@ function dedupeStatusItems(statuses) {
292
301
  */
293
302
  class DashboardBuilderService {
294
303
  http = inject(HttpClient);
304
+ /** Control-panel hosts read drafts through the builder routes (#1838). */
305
+ reportsRead = inject(DASHBOARD_REPORT_ACCESS) === 'builder'
306
+ ? 'reports/builder'
307
+ : 'reports';
295
308
  /** Subject for processing items */
296
309
  processOnItem = new Subject();
297
310
  processOnItem$ = this.processOnItem.asObservable();
@@ -528,13 +541,13 @@ class DashboardBuilderService {
528
541
  */
529
542
  getReports(type) {
530
543
  const params = type ? `?type=${type}` : '';
531
- return this.http.get(`${this.urlPrefix}reports${params}`);
544
+ return this.http.get(`${this.urlPrefix}${this.reportsRead}${params}`);
532
545
  }
533
546
  /**
534
547
  * Get report by ID
535
548
  */
536
549
  getReportById(id) {
537
- return this.http.get(`${this.urlPrefix}reports/${id}`);
550
+ return this.http.get(`${this.urlPrefix}${this.reportsRead}/${id}`);
538
551
  }
539
552
  /**
540
553
  * Create a new report
@@ -1983,6 +1996,7 @@ const CHART_CAPABILITIES = [
1983
1996
  editor: 'general',
1984
1997
  schema: {
1985
1998
  fields: [
1999
+ 'tooltipProperties',
1986
2000
  'seriesName',
1987
2001
  'valueProperty',
1988
2002
  'aggregateFunction',
@@ -2037,6 +2051,7 @@ const CHART_CAPABILITIES = [
2037
2051
  editor: 'general',
2038
2052
  schema: {
2039
2053
  fields: [
2054
+ 'tooltipProperties',
2040
2055
  'autoStack',
2041
2056
  'stackProperties',
2042
2057
  'aggregateFunction',
@@ -2095,6 +2110,7 @@ const CHART_CAPABILITIES = [
2095
2110
  editor: 'general',
2096
2111
  schema: {
2097
2112
  fields: [
2113
+ 'tooltipProperties',
2098
2114
  'autoStack',
2099
2115
  'stackProperties',
2100
2116
  'aggregateFunction',
@@ -2145,6 +2161,7 @@ const CHART_CAPABILITIES = [
2145
2161
  editor: 'general',
2146
2162
  schema: {
2147
2163
  fields: [
2164
+ 'tooltipProperties',
2148
2165
  'seriesName',
2149
2166
  'valueProperty',
2150
2167
  'aggregateFunction',
@@ -2200,6 +2217,7 @@ const CHART_CAPABILITIES = [
2200
2217
  editor: 'general',
2201
2218
  schema: {
2202
2219
  fields: [
2220
+ 'tooltipProperties',
2203
2221
  'seriesName',
2204
2222
  'valueProperty',
2205
2223
  'aggregateFunction',
@@ -3644,6 +3662,9 @@ function datasourceIssues(serviceConfig, capability) {
3644
3662
  if (unlinkedSelectionIds(serviceConfig).length) {
3645
3663
  issues.push('unlinkedSelection');
3646
3664
  }
3665
+ if (duplicateSelectionIds(serviceConfig).length) {
3666
+ issues.push('duplicateSelection');
3667
+ }
3647
3668
  const aggregations = query.aggregationProperties ?? query.AggregationProperties ?? [];
3648
3669
  if (Array.isArray(aggregations) &&
3649
3670
  aggregations.some((a) => !filled(a?.propertyKey))) {
@@ -3678,6 +3699,34 @@ function unlinkedSelectionIds(serviceConfig) {
3678
3699
  .map((s) => s?.id)
3679
3700
  .filter((id) => filled(id) && !linked.has(String(id)));
3680
3701
  }
3702
+ /**
3703
+ * Linked selections that repeat an earlier selection's module. Their fields
3704
+ * share the same keys, so a query field cannot be tied to one of them
3705
+ * (#1860). Without links the backend lists each selection's rows, and the
3706
+ * same module twice (with different conditions) is a valid way to do that.
3707
+ */
3708
+ function duplicateSelectionIds(serviceConfig) {
3709
+ const selection = Array.isArray(serviceConfig?.['selection'])
3710
+ ? serviceConfig['selection']
3711
+ : [];
3712
+ const links = Array.isArray(serviceConfig?.['sourceLinks'])
3713
+ ? serviceConfig['sourceLinks']
3714
+ : [];
3715
+ if (selection.length < 2 || !links.length)
3716
+ return [];
3717
+ const seen = new Set();
3718
+ return selection
3719
+ .filter((s) => {
3720
+ const selector = s?.selector;
3721
+ if (!filled(selector))
3722
+ return false;
3723
+ if (seen.has(selector))
3724
+ return true;
3725
+ seen.add(selector);
3726
+ return false;
3727
+ })
3728
+ .map((s) => s.id);
3729
+ }
3681
3730
  /**
3682
3731
  * Shape the series of a chart request:
3683
3732
  *
@@ -3833,6 +3882,15 @@ function normalizeLineChartQuery(query) {
3833
3882
  : Array.isArray(firstSeries?.extraProperties)
3834
3883
  ? firstSeries.extraProperties
3835
3884
  : [],
3885
+ ...(Array.isArray(query['tooltipProperties']) &&
3886
+ query['tooltipProperties'].length
3887
+ ? { tooltipProperties: query['tooltipProperties'] }
3888
+ : {}),
3889
+ // Backend period buckets for a date X axis (day is the default, #1877).
3890
+ ...(typeof query['dateGrouping'] === 'string' &&
3891
+ query['dateGrouping'] !== 'day'
3892
+ ? { dateGrouping: query['dateGrouping'] }
3893
+ : {}),
3836
3894
  };
3837
3895
  }
3838
3896
  function isLineChartType(chartType) {
@@ -4388,7 +4446,6 @@ function isIdProperty(property) {
4388
4446
  return (typeof property?.normalizedKey === 'string' &&
4389
4447
  property.normalizedKey.trim().toLowerCase() === 'id');
4390
4448
  }
4391
-
4392
4449
  /**
4393
4450
  * A boolean's two values are not modelled by the property-items API, so they
4394
4451
  * are synthesized locally instead of requesting them (issue #1237).
@@ -4429,6 +4486,23 @@ function normalizeViewType(value) {
4429
4486
  .trim()
4430
4487
  .toLowerCase();
4431
4488
  }
4489
+ /**
4490
+ * Where a property's selectable values come from (issue #1237):
4491
+ * `checkbox` (two synthesized values), `none` (no fixed list, never ask
4492
+ * property-items) or `remote` (lookup / status / phase-gate and any view
4493
+ * type not recognised: fetch the list).
4494
+ */
4495
+ function propertyValueSource(property) {
4496
+ if (isIdProperty(property))
4497
+ return 'none';
4498
+ const viewType = normalizeViewType(property?.viewType);
4499
+ if (!viewType)
4500
+ return 'remote';
4501
+ if (CHECKBOX_VIEW_TYPES.has(viewType))
4502
+ return 'checkbox';
4503
+ return NO_VALUE_LIST_VIEW_TYPES.has(viewType) ? 'none' : 'remote';
4504
+ }
4505
+
4432
4506
  /**
4433
4507
  * Filter Value Field Component
4434
4508
  *
@@ -4550,11 +4624,20 @@ class FilterValueField {
4550
4624
  this.propertyOptions();
4551
4625
  untracked(() => {
4552
4626
  const extraProps = [];
4553
- chartConfig?.config?.serviceConfig?.query?.series?.forEach((series) => series.extraProperties?.forEach((extraProp) => {
4627
+ const query = chartConfig?.config?.serviceConfig?.query;
4628
+ const add = (extraProp) => {
4554
4629
  const option = this.toExtraPropertyOption(extraProp);
4555
- if (option)
4630
+ if (option && !extraProps.some((o) => o.value === option.value)) {
4556
4631
  extraProps.push(option);
4557
- }));
4632
+ }
4633
+ };
4634
+ query?.series?.forEach((series) => series.extraProperties?.forEach(add));
4635
+ // A Map keeps its fields at the query root, and a clicked pin carries
4636
+ // its whole record: offer the location and Extra Properties so the
4637
+ // dialog can filter on the clicked point (#1846).
4638
+ [query?.locationProperty, ...(query?.extraProperties ?? [])]
4639
+ .filter((key) => typeof key === 'string' && key)
4640
+ .forEach(add);
4558
4641
  if (extraProps.length > 0) {
4559
4642
  this.quickOptions.update((opts) => ({
4560
4643
  ...opts,
@@ -4651,15 +4734,7 @@ class FilterValueField {
4651
4734
  * type we do not recognise): fetch from the API, exactly as before.
4652
4735
  */
4653
4736
  resolvePropertyValueSource(propertyKey) {
4654
- const property = this.findPropertyReference(propertyKey);
4655
- if (isIdProperty(property))
4656
- return 'none';
4657
- const viewType = normalizeViewType(property?.viewType);
4658
- if (!viewType)
4659
- return 'remote';
4660
- if (CHECKBOX_VIEW_TYPES.has(viewType))
4661
- return 'checkbox';
4662
- return NO_VALUE_LIST_VIEW_TYPES.has(viewType) ? 'none' : 'remote';
4737
+ return propertyValueSource(this.findPropertyReference(propertyKey));
4663
4738
  }
4664
4739
  /** Lazily resolve a property's value list into the "Values" tab. */
4665
4740
  loadPropertyValues(propertyKey) {
@@ -4981,6 +5056,8 @@ class SelectionConfiguration {
4981
5056
  fb = inject(FormBuilder);
4982
5057
  dashboardService = inject(DashboardBuilderService);
4983
5058
  destroyRef = inject(DestroyRef);
5059
+ confirmation = inject(ConfirmationService);
5060
+ transloco = inject(TranslocoService);
4984
5061
  /**
4985
5062
  * Per-selection `moduleType` valueChanges subscriptions. Tied to the rebuild
4986
5063
  * lifecycle (torn down before each writeValue rebuild) so they don't
@@ -5039,7 +5116,14 @@ class SelectionConfiguration {
5039
5116
  { value: 'Contains', name: 'Contains' },
5040
5117
  { value: 'GreaterThan', name: 'Greater Than' },
5041
5118
  { value: 'LessThan', name: 'Less Than' },
5119
+ // Backend Empty / NotEmpty take no value (#1846).
5120
+ { value: 'Empty', name: 'Is Empty' },
5121
+ { value: 'NotEmpty', name: 'Is Not Empty' },
5042
5122
  ];
5123
+ /** Is empty / Is not empty test the property itself; there is no value. */
5124
+ takesNoValue(operation) {
5125
+ return operation === 'Empty' || operation === 'NotEmpty';
5126
+ }
5043
5127
  /** Logical operators */
5044
5128
  logicals = [
5045
5129
  { value: 'And', name: 'AND' },
@@ -5483,13 +5567,19 @@ class SelectionConfiguration {
5483
5567
  }
5484
5568
  createFilterFormGroup(filter) {
5485
5569
  const f = filter || {};
5486
- return this.fb.group({
5570
+ const group = this.fb.group({
5487
5571
  propertyKey: [f.propertyKey || null, Validators.required],
5488
5572
  propertyValue: [f.propertyValue ?? ''],
5489
5573
  operation: [f.operation || 'Equals', Validators.required],
5490
5574
  logical: [f.logical || 'And'],
5491
5575
  operationLevel: [f.operationLevel ?? 1],
5492
5576
  });
5577
+ group.get('operation').valueChanges.subscribe((operation) => {
5578
+ if (this.takesNoValue(operation)) {
5579
+ group.get('propertyValue').setValue('', { emitEvent: false });
5580
+ }
5581
+ });
5582
+ return group;
5493
5583
  }
5494
5584
  // ==================== Selection Actions ====================
5495
5585
  addSelection() {
@@ -5509,7 +5599,22 @@ class SelectionConfiguration {
5509
5599
  if (selectionId && this.isFixedSelection(selectionId)) {
5510
5600
  return;
5511
5601
  }
5512
- this.selectionsArray.removeAt(index);
5602
+ // A selection with a source also takes its links and fields with it, so
5603
+ // ask first; an empty one has nothing to lose (#1859).
5604
+ if (!selection?.get('selector')?.value) {
5605
+ this.selectionsArray.removeAt(index);
5606
+ return;
5607
+ }
5608
+ this.confirmation.confirmDelete({
5609
+ type: 'dialog',
5610
+ header: this.transloco.translate('dashboardBuilder.deleteSelection'),
5611
+ message: this.transloco.translate('dashboardBuilder.confirmDeleteSelection', { id: selectionId }),
5612
+ accept: () => {
5613
+ const at = this.selectionsArray.controls.indexOf(selection);
5614
+ if (at >= 0)
5615
+ this.selectionsArray.removeAt(at);
5616
+ },
5617
+ });
5513
5618
  }
5514
5619
  /**
5515
5620
  * Handle service change for a selection
@@ -5844,7 +5949,7 @@ class SelectionConfiguration {
5844
5949
  useExisting: forwardRef(() => SelectionConfiguration),
5845
5950
  multi: true,
5846
5951
  },
5847
- ], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <mt-card [title]=\"t('selections')\">\r\n <ng-template #cardEnd>\r\n @if (!structureLocked()) {\r\n <mt-button\r\n icon=\"general.plus\"\r\n size=\"small\"\r\n (onClick)=\"addSelection()\"\r\n [disabled]=\"disabled || loadingTree()\"\r\n [pTooltip]=\"t('addSelection')\"\r\n />\r\n }\r\n </ng-template>\r\n\r\n <!-- Loading Skeleton State - Show for entire component while tree is loading -->\r\n @if (loadingTree()) {\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Skeleton Selection Card -->\r\n <div class=\"p-4 rounded-lg border border-surface-200\">\r\n <!-- Skeleton Header -->\r\n <div class=\"flex items-center justify-between mb-4\">\r\n <div class=\"flex items-center gap-2\">\r\n <p-skeleton shape=\"circle\" width=\"24px\" height=\"24px\" />\r\n <p-skeleton width=\"80px\" height=\"16px\" />\r\n </div>\r\n </div>\r\n <!-- Skeleton Module Selection -->\r\n <div class=\"grid grid-cols-1 gap-4 mb-4\">\r\n <div class=\"flex flex-col gap-2\">\r\n <p-skeleton width=\"60px\" height=\"14px\" />\r\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\r\n </div>\r\n </div>\r\n <!-- Skeleton Filters Section -->\r\n <div class=\"border border-surface-200 rounded-lg p-4\">\r\n <div class=\"flex items-center justify-between mb-3\">\r\n <p-skeleton width=\"50px\" height=\"14px\" />\r\n <div class=\"flex gap-1\">\r\n <p-skeleton shape=\"circle\" width=\"28px\" height=\"28px\" />\r\n <p-skeleton shape=\"circle\" width=\"28px\" height=\"28px\" />\r\n <p-skeleton shape=\"circle\" width=\"28px\" height=\"28px\" />\r\n </div>\r\n </div>\r\n <div class=\"text-center py-4\">\r\n <p-skeleton width=\"150px\" height=\"14px\" styleClass=\"mx-auto\" />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n } @else {\r\n <div class=\"flex flex-col gap-4\" [formGroup]=\"selectionsForm\">\r\n <div formArrayName=\"selections\">\r\n @for (\r\n selection of selectionsArray.controls;\r\n track trackBySelectionId($index, selection);\r\n let i = $index\r\n ) {\r\n <div\r\n class=\"p-4 rounded-lg border transition-all mb-4 last:mb-0\"\r\n [class.border-red-500]=\"selection.invalid\"\r\n [class.border-surface-200]=\"!selection.invalid\"\r\n [formGroupName]=\"i\"\r\n >\r\n <!-- Selection Header -->\r\n <div class=\"flex items-center justify-between mb-4\">\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full text-sm font-semibold\"\r\n [class.bg-primary-100]=\"\r\n !isFixedSelection(selection.value.id)\r\n \"\r\n [class.text-primary-600]=\"\r\n !isFixedSelection(selection.value.id)\r\n \"\r\n [class.bg-amber-100]=\"isFixedSelection(selection.value.id)\"\r\n [class.text-amber-600]=\"\r\n isFixedSelection(selection.value.id)\r\n \"\r\n >\r\n @if (isFixedSelection(selection.value.id)) {\r\n <i class=\"mti mti-lock-01 text-xs\"></i>\r\n } @else {\r\n {{ selection.value.id }}\r\n }\r\n </span>\r\n <span class=\"text-sm font-medium text-muted-color\">\r\n @if (isFixedSelection(selection.value.id)) {\r\n {{ t(\"fixedSelection\") }}\r\n } @else {\r\n {{ t(\"selection\") }}\r\n }\r\n </span>\r\n </div>\r\n @if (\r\n selectionsArray.length > 1 &&\r\n !isSelectionStructureLocked(selection.value.id)\r\n ) {\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"removeSelection(i)\"\r\n />\r\n }\r\n </div>\r\n\r\n <!-- Service (own row, only when multiple services) -->\r\n @if (!hasSingleService()) {\r\n <div class=\"mb-4\">\r\n <mt-select-field\r\n [label]=\"t('service')\"\r\n formControlName=\"service\"\r\n [options]=\"services()\"\r\n optionLabel=\"name\"\r\n optionValue=\"name\"\r\n [placeholder]=\"t('selectService')\"\r\n [loading]=\"loadingTree()\"\r\n [readonly]=\"isSelectionStructureLocked(selection.value.id)\"\r\n (ngModelChange)=\"onServiceChange(i, $event)\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Type (radio cards) \u2014 scopes Workspace + Module to one type -->\r\n @if (getTypeOptionsForSelection(i).length) {\r\n <div class=\"mb-4\">\r\n <mt-radio-cards-field\r\n [label]=\"t('type')\"\r\n formControlName=\"moduleType\"\r\n [options]=\"getTypeOptionsForSelection(i)\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n size=\"small\"\r\n [readonly]=\"isSelectionStructureLocked(selection.value.id)\"\r\n />\r\n </div>\r\n }\r\n\r\n @if (shouldShowParentWorkspace(i)) {\r\n <div class=\"mb-4\">\r\n <mt-select-field\r\n [label]=\"t('workspace')\"\r\n formControlName=\"parentSelector\"\r\n [options]=\"getParentOptionsForSelection(i)\"\r\n optionLabel=\"name\"\r\n optionValue=\"selector\"\r\n [placeholder]=\"t('selectWorkspace')\"\r\n [filter]=\"true\"\r\n [readonly]=\"isSelectionStructureLocked(selection.value.id)\"\r\n (ngModelChange)=\"onParentSelectorChange(i)\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Module values (scoped to the selected type + chart workspace).\r\n When a parent workspace is not supplied by the caller, the\r\n local parentSelector fallback scopes hierarchical modules.\r\n Only Level combines several ids (\"Level:1,2\"); every other\r\n type is a single module. -->\r\n <div class=\"mb-4\">\r\n @if (allowsMultipleModules(i)) {\r\n <mt-multi-select-field\r\n [label]=\"t('module')\"\r\n [ngModel]=\"getSelectorValues(i)\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n [options]=\"getModuleOptionsForSelection(i)\"\r\n optionLabel=\"name\"\r\n optionValue=\"selector\"\r\n [placeholder]=\"t('selectModule')\"\r\n [filter]=\"true\"\r\n [virtualScroll]=\"true\"\r\n [virtualScrollItemSize]=\"38\"\r\n [showClear]=\"\r\n !isSelectionStructureLocked(selection.value.id)\r\n \"\r\n [readonly]=\"isSelectionStructureLocked(selection.value.id)\"\r\n (ngModelChange)=\"onModuleSelectionChange(i, $event)\"\r\n />\r\n } @else {\r\n <mt-select-field\r\n [label]=\"t('module')\"\r\n formControlName=\"selector\"\r\n [options]=\"getModuleOptionsForSelection(i)\"\r\n optionLabel=\"name\"\r\n optionValue=\"selector\"\r\n [placeholder]=\"t('selectModule')\"\r\n [filter]=\"true\"\r\n [showClear]=\"\r\n !isSelectionStructureLocked(selection.value.id)\r\n \"\r\n [readonly]=\"isSelectionStructureLocked(selection.value.id)\"\r\n (onChange)=\"onModuleChange(i, $event)\"\r\n />\r\n }\r\n </div>\r\n <!-- Hint: pick a type first -->\r\n @if (!getModuleTypeValue(i)) {\r\n <small class=\"text-muted-color mt-1 block mb-2\">{{\r\n t(\"selectTypeHint\")\r\n }}</small>\r\n }\r\n @if (\r\n selection.get(\"selector\")?.invalid &&\r\n selection.get(\"selector\")?.touched\r\n ) {\r\n <small class=\"text-red-500 mt-1 block mb-2\">{{\r\n t(\"moduleRequired\")\r\n }}</small>\r\n }\r\n\r\n <!-- Filters Section -->\r\n <div\r\n class=\"border border-surface-200 rounded-lg p-4\"\r\n [class.border-red-500]=\"getFilters(selection).invalid\"\r\n [class.border-amber-200]=\"isFixedSelection(selection.value.id)\"\r\n [class.bg-amber-50]=\"isFixedSelection(selection.value.id)\"\r\n >\r\n <div class=\"flex items-center justify-between mb-3\">\r\n <span class=\"text-sm font-medium\">{{\r\n t(\"sourceConditions\")\r\n }}</span>\r\n @if (!isFixedSelection(selection.value.id)) {\r\n <div class=\"flex items-center gap-1\">\r\n <mt-button\r\n icon=\"general.copy-01\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n [disabled]=\"\r\n disabled || getFilters(selection).length === 0\r\n \"\r\n (onClick)=\"copyFilters(i)\"\r\n [pTooltip]=\"t('copyFilters')\"\r\n />\r\n <mt-button\r\n icon=\"file.clipboard\"\r\n severity=\"help\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"togglePaste(i)\"\r\n [pTooltip]=\"t('pasteFilters')\"\r\n />\r\n <mt-button\r\n icon=\"general.plus\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addFilter(i)\"\r\n [pTooltip]=\"t('addFilter')\"\r\n />\r\n </div>\r\n } @else {\r\n <span class=\"text-xs text-amber-600 font-medium\">\r\n <i class=\"mti mti-lock-01 mr-1\"></i>\r\n {{ t(\"readOnly\") }}\r\n </span>\r\n }\r\n </div>\r\n\r\n <!-- Paste JSON Area -->\r\n @if (selection.value.showPaste) {\r\n <div\r\n class=\"mb-4 p-3 bg-surface-50 rounded-lg border border-surface-200\"\r\n >\r\n <mt-textarea-field\r\n [label]=\"t('pasteFiltersJson')\"\r\n formControlName=\"filterJson\"\r\n [placeholder]=\"t('pasteFiltersJsonPlaceholder')\"\r\n [rows]=\"4\"\r\n />\r\n @if (selection.value.pasteError) {\r\n <small class=\"text-red-500 mt-1 block\">{{\r\n selection.value.pasteError\r\n }}</small>\r\n }\r\n <div class=\"flex justify-end gap-2 mt-2\">\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"togglePaste(i)\"\r\n />\r\n <mt-button\r\n [label]=\"t('apply')\"\r\n size=\"small\"\r\n (onClick)=\"applyPastedFilters(i)\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- Filters List -->\r\n <div class=\"flex flex-col gap-3\" formArrayName=\"filters\">\r\n @for (\r\n filter of getFilters(selection).controls;\r\n track trackByFilterIndex(j);\r\n let j = $index\r\n ) {\r\n <div\r\n class=\"flex flex-col gap-3 p-3 rounded-lg border\"\r\n [class.bg-surface-50]=\"\r\n !isFixedSelection(selection.value.id)\r\n \"\r\n [class.border-surface-100]=\"\r\n !isFixedSelection(selection.value.id)\r\n \"\r\n [class.bg-amber-25]=\"isFixedSelection(selection.value.id)\"\r\n [class.border-amber-100]=\"\r\n isFixedSelection(selection.value.id)\r\n \"\r\n [formGroupName]=\"j\"\r\n >\r\n <!-- Row 1: Property, Operation, Logical -->\r\n <div class=\"grid grid-cols-12 gap-3\">\r\n <!-- Property Key -->\r\n <div class=\"col-span-5\">\r\n <mt-select-field\r\n [label]=\"t('property')\"\r\n formControlName=\"propertyKey\"\r\n [options]=\"getPropertiesForSelection(i)\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n [readonly]=\"isFixedSelection(selection.value.id)\"\r\n (onChange)=\"onFilterPropertyChange(i, j, $event)\"\r\n />\r\n </div>\r\n\r\n <!-- Operation -->\r\n <div class=\"col-span-3\">\r\n <mt-select-field\r\n [label]=\"t('operation')\"\r\n formControlName=\"operation\"\r\n [options]=\"operations\"\r\n optionLabel=\"name\"\r\n optionValue=\"value\"\r\n [readonly]=\"isFixedSelection(selection.value.id)\"\r\n />\r\n </div>\r\n\r\n <!-- Logical Operator -->\r\n <div class=\"col-span-2\">\r\n <mt-select-field\r\n [label]=\"t('logical')\"\r\n formControlName=\"logical\"\r\n [options]=\"logicals\"\r\n optionLabel=\"name\"\r\n optionValue=\"value\"\r\n [readonly]=\"isFixedSelection(selection.value.id)\"\r\n />\r\n </div>\r\n\r\n <!-- Remove Filter (hidden for fixed selections) -->\r\n @if (!isFixedSelection(selection.value.id)) {\r\n <div class=\"col-span-2 flex items-end justify-end\">\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"removeFilter(i, j)\"\r\n />\r\n </div>\r\n } @else {\r\n <div class=\"col-span-2\"></div>\r\n }\r\n </div>\r\n\r\n <!-- Row 2: Value, Level -->\r\n <div class=\"grid grid-cols-12 gap-3\">\r\n <!-- Value: unified select-or-write field. When the\r\n property exposes a fixed value list (lookup/status)\r\n the field surfaces it as a \"Values\" tab; otherwise\r\n a literal/token can be typed or picked. -->\r\n <div class=\"col-span-10\">\r\n <mt-filter-value-field\r\n [label]=\"t('value')\"\r\n formControlName=\"propertyValue\"\r\n [propertyKey]=\"filter.get('propertyKey')?.value\"\r\n [propertyOptions]=\"getPropertiesForSelection(i)\"\r\n [placeholder]=\"t('enterValue')\"\r\n [readonly]=\"isFixedSelection(selection.value.id)\"\r\n />\r\n </div>\r\n\r\n <!-- Operation Level -->\r\n <div class=\"col-span-2\">\r\n <mt-number-field\r\n [label]=\"t('level')\"\r\n formControlName=\"operationLevel\"\r\n [min]=\"1\"\r\n [max]=\"10\"\r\n [readonly]=\"isFixedSelection(selection.value.id)\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (getFilters(selection).length === 0) {\r\n <div class=\"text-center py-4 text-muted-color text-sm\">\r\n {{ t(\"noFiltersConfigured\") }}\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (selectionsArray.length === 0 && !loadingTree()) {\r\n <div class=\"text-center py-8 text-muted-color\">\r\n <i class=\"mti mti-database text-3xl mb-2 block\"></i>\r\n <p class=\"mb-2\">{{ t(\"noSelectionsConfigured\") }}</p>\r\n @if (!structureLocked()) {\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addSelection')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addSelection()\"\r\n />\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </mt-card>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { kind: "component", type: RadioCardsField, selector: "mt-radio-cards-field", inputs: ["circle", "label", "hint", "readonly", "required", "color", "size", "optionLabel", "optionValue", "options"] }, { kind: "component", type: NumberField, selector: "mt-number-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "pInputs", "format", "useGrouping", "maxFractionDigits", "min", "max", "required"] }, { kind: "component", type: TextareaField, selector: "mt-textarea-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "noErrorStyle", "pInputs", "rows", "required", "maxLength"] }, { kind: "component", type: FilterValueField, selector: "mt-filter-value-field", inputs: ["label", "placeholder", "extraProperties", "propertyOptions", "propertyKey", "showPivotTokens", "readonly"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { 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: Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
5952
+ ], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <mt-card [title]=\"t('selections')\">\n <ng-template #cardEnd>\n @if (!structureLocked()) {\n <mt-button\n icon=\"general.plus\"\n size=\"small\"\n (onClick)=\"addSelection()\"\n [disabled]=\"disabled || loadingTree()\"\n [pTooltip]=\"t('addSelection')\"\n />\n }\n </ng-template>\n\n <!-- Loading Skeleton State - Show for entire component while tree is loading -->\n @if (loadingTree()) {\n <div class=\"flex flex-col gap-4\">\n <!-- Skeleton Selection Card -->\n <div class=\"p-4 rounded-lg border border-surface-200\">\n <!-- Skeleton Header -->\n <div class=\"flex items-center justify-between mb-4\">\n <div class=\"flex items-center gap-2\">\n <p-skeleton shape=\"circle\" width=\"24px\" height=\"24px\" />\n <p-skeleton width=\"80px\" height=\"16px\" />\n </div>\n </div>\n <!-- Skeleton Module Selection -->\n <div class=\"grid grid-cols-1 gap-4 mb-4\">\n <div class=\"flex flex-col gap-2\">\n <p-skeleton width=\"60px\" height=\"14px\" />\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\n </div>\n </div>\n <!-- Skeleton Filters Section -->\n <div class=\"border border-surface-200 rounded-lg p-4\">\n <div class=\"flex items-center justify-between mb-3\">\n <p-skeleton width=\"50px\" height=\"14px\" />\n <div class=\"flex gap-1\">\n <p-skeleton shape=\"circle\" width=\"28px\" height=\"28px\" />\n <p-skeleton shape=\"circle\" width=\"28px\" height=\"28px\" />\n <p-skeleton shape=\"circle\" width=\"28px\" height=\"28px\" />\n </div>\n </div>\n <div class=\"text-center py-4\">\n <p-skeleton width=\"150px\" height=\"14px\" styleClass=\"mx-auto\" />\n </div>\n </div>\n </div>\n </div>\n } @else {\n <div class=\"flex flex-col gap-4\" [formGroup]=\"selectionsForm\">\n <div formArrayName=\"selections\">\n @for (\n selection of selectionsArray.controls;\n track trackBySelectionId($index, selection);\n let i = $index\n ) {\n <div\n class=\"p-4 rounded-lg border transition-all mb-4 last:mb-0\"\n [class.border-red-500]=\"selection.invalid\"\n [class.border-surface-200]=\"!selection.invalid\"\n [formGroupName]=\"i\"\n >\n <!-- Selection Header -->\n <div class=\"flex items-center justify-between mb-4\">\n <div class=\"flex items-center gap-2\">\n <span\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full text-sm font-semibold\"\n [class.bg-primary-100]=\"\n !isFixedSelection(selection.value.id)\n \"\n [class.text-primary-600]=\"\n !isFixedSelection(selection.value.id)\n \"\n [class.bg-amber-100]=\"isFixedSelection(selection.value.id)\"\n [class.text-amber-600]=\"\n isFixedSelection(selection.value.id)\n \"\n >\n @if (isFixedSelection(selection.value.id)) {\n <i class=\"mti mti-lock-01 text-xs\"></i>\n } @else {\n {{ selection.value.id }}\n }\n </span>\n <span class=\"text-sm font-medium text-muted-color\">\n @if (isFixedSelection(selection.value.id)) {\n {{ t(\"fixedSelection\") }}\n } @else {\n {{ t(\"selection\") }}\n }\n </span>\n </div>\n @if (\n selectionsArray.length > 1 &&\n !isSelectionStructureLocked(selection.value.id)\n ) {\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"removeSelection(i)\"\n />\n }\n </div>\n\n <!-- Service (own row, only when multiple services) -->\n @if (!hasSingleService()) {\n <div class=\"mb-4\">\n <mt-select-field\n [label]=\"t('service')\"\n formControlName=\"service\"\n [options]=\"services()\"\n optionLabel=\"name\"\n optionValue=\"name\"\n [placeholder]=\"t('selectService')\"\n [loading]=\"loadingTree()\"\n [readonly]=\"isSelectionStructureLocked(selection.value.id)\"\n (ngModelChange)=\"onServiceChange(i, $event)\"\n />\n </div>\n }\n\n <!-- Type (radio cards) \u2014 scopes Workspace + Module to one type -->\n @if (getTypeOptionsForSelection(i).length) {\n <div class=\"mb-4\">\n <mt-radio-cards-field\n [label]=\"t('type')\"\n formControlName=\"moduleType\"\n [options]=\"getTypeOptionsForSelection(i)\"\n optionLabel=\"label\"\n optionValue=\"value\"\n size=\"small\"\n [readonly]=\"isSelectionStructureLocked(selection.value.id)\"\n />\n </div>\n }\n\n @if (shouldShowParentWorkspace(i)) {\n <div class=\"mb-4\">\n <mt-select-field\n [label]=\"t('workspace')\"\n formControlName=\"parentSelector\"\n [options]=\"getParentOptionsForSelection(i)\"\n optionLabel=\"name\"\n optionValue=\"selector\"\n [placeholder]=\"t('selectWorkspace')\"\n [filter]=\"true\"\n [readonly]=\"isSelectionStructureLocked(selection.value.id)\"\n (ngModelChange)=\"onParentSelectorChange(i)\"\n />\n </div>\n }\n\n <!-- Module values (scoped to the selected type + chart workspace).\n When a parent workspace is not supplied by the caller, the\n local parentSelector fallback scopes hierarchical modules.\n Only Level combines several ids (\"Level:1,2\"); every other\n type is a single module. -->\n <div class=\"mb-4\">\n @if (allowsMultipleModules(i)) {\n <mt-multi-select-field\n [label]=\"t('module')\"\n [ngModel]=\"getSelectorValues(i)\"\n [ngModelOptions]=\"{ standalone: true }\"\n [options]=\"getModuleOptionsForSelection(i)\"\n optionLabel=\"name\"\n optionValue=\"selector\"\n [placeholder]=\"t('selectModule')\"\n [filter]=\"true\"\n [virtualScroll]=\"true\"\n [virtualScrollItemSize]=\"38\"\n [showClear]=\"\n !isSelectionStructureLocked(selection.value.id)\n \"\n [readonly]=\"isSelectionStructureLocked(selection.value.id)\"\n (ngModelChange)=\"onModuleSelectionChange(i, $event)\"\n />\n } @else {\n <mt-select-field\n [label]=\"t('module')\"\n formControlName=\"selector\"\n [options]=\"getModuleOptionsForSelection(i)\"\n optionLabel=\"name\"\n optionValue=\"selector\"\n [placeholder]=\"t('selectModule')\"\n [filter]=\"true\"\n [showClear]=\"\n !isSelectionStructureLocked(selection.value.id)\n \"\n [readonly]=\"isSelectionStructureLocked(selection.value.id)\"\n (onChange)=\"onModuleChange(i, $event)\"\n />\n }\n </div>\n <!-- Hint: pick a type first -->\n @if (!getModuleTypeValue(i)) {\n <small class=\"text-muted-color mt-1 block mb-2\">{{\n t(\"selectTypeHint\")\n }}</small>\n }\n @if (\n selection.get(\"selector\")?.invalid &&\n selection.get(\"selector\")?.touched\n ) {\n <small class=\"text-red-500 mt-1 block mb-2\">{{\n t(\"moduleRequired\")\n }}</small>\n }\n\n <!-- Filters Section -->\n <div\n class=\"border border-surface-200 rounded-lg p-4\"\n [class.border-red-500]=\"getFilters(selection).invalid\"\n [class.border-amber-200]=\"isFixedSelection(selection.value.id)\"\n [class.bg-amber-50]=\"isFixedSelection(selection.value.id)\"\n >\n <div class=\"flex items-center justify-between mb-3\">\n <span class=\"text-sm font-medium\">{{\n t(\"sourceConditions\")\n }}</span>\n @if (!isFixedSelection(selection.value.id)) {\n <div class=\"flex items-center gap-1\">\n <mt-button\n icon=\"general.copy-01\"\n severity=\"secondary\"\n size=\"small\"\n [rounded]=\"true\"\n [disabled]=\"\n disabled || getFilters(selection).length === 0\n \"\n (onClick)=\"copyFilters(i)\"\n [pTooltip]=\"t('copyFilters')\"\n />\n <mt-button\n icon=\"file.clipboard\"\n severity=\"help\"\n size=\"small\"\n [rounded]=\"true\"\n [disabled]=\"disabled\"\n (onClick)=\"togglePaste(i)\"\n [pTooltip]=\"t('pasteFilters')\"\n />\n <mt-button\n icon=\"general.plus\"\n [rounded]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addFilter(i)\"\n [pTooltip]=\"t('addFilter')\"\n />\n </div>\n } @else {\n <span class=\"text-xs text-amber-600 font-medium\">\n <i class=\"mti mti-lock-01 mr-1\"></i>\n {{ t(\"readOnly\") }}\n </span>\n }\n </div>\n\n <!-- Paste JSON Area -->\n @if (selection.value.showPaste) {\n <div\n class=\"mb-4 p-3 bg-surface-50 rounded-lg border border-surface-200\"\n >\n <mt-textarea-field\n [label]=\"t('pasteFiltersJson')\"\n formControlName=\"filterJson\"\n [placeholder]=\"t('pasteFiltersJsonPlaceholder')\"\n [rows]=\"4\"\n />\n @if (selection.value.pasteError) {\n <small class=\"text-red-500 mt-1 block\">{{\n selection.value.pasteError\n }}</small>\n }\n <div class=\"flex justify-end gap-2 mt-2\">\n <mt-button\n [label]=\"t('cancel')\"\n severity=\"secondary\"\n size=\"small\"\n (onClick)=\"togglePaste(i)\"\n />\n <mt-button\n [label]=\"t('apply')\"\n size=\"small\"\n (onClick)=\"applyPastedFilters(i)\"\n />\n </div>\n </div>\n }\n\n <!-- Filters List -->\n <div class=\"flex flex-col gap-3\" formArrayName=\"filters\">\n @for (\n filter of getFilters(selection).controls;\n track trackByFilterIndex(j);\n let j = $index\n ) {\n <div\n class=\"flex flex-col gap-3 p-3 rounded-lg border\"\n [class.bg-surface-50]=\"\n !isFixedSelection(selection.value.id)\n \"\n [class.border-surface-100]=\"\n !isFixedSelection(selection.value.id)\n \"\n [class.bg-amber-25]=\"isFixedSelection(selection.value.id)\"\n [class.border-amber-100]=\"\n isFixedSelection(selection.value.id)\n \"\n [formGroupName]=\"j\"\n >\n <!-- Row 1: Property, Operation, Logical -->\n <div class=\"grid grid-cols-12 gap-3\">\n <!-- Property Key -->\n <div class=\"col-span-5\">\n <mt-select-field\n [label]=\"t('property')\"\n formControlName=\"propertyKey\"\n [options]=\"getPropertiesForSelection(i)\"\n optionLabel=\"name\"\n optionValue=\"key\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n [readonly]=\"isFixedSelection(selection.value.id)\"\n (onChange)=\"onFilterPropertyChange(i, j, $event)\"\n />\n </div>\n\n <!-- Operation -->\n <div class=\"col-span-3\">\n <mt-select-field\n [label]=\"t('operation')\"\n formControlName=\"operation\"\n [options]=\"operations\"\n optionLabel=\"name\"\n optionValue=\"value\"\n [readonly]=\"isFixedSelection(selection.value.id)\"\n />\n </div>\n\n <!-- Logical Operator -->\n <div class=\"col-span-2\">\n <mt-select-field\n [label]=\"t('logical')\"\n formControlName=\"logical\"\n [options]=\"logicals\"\n optionLabel=\"name\"\n optionValue=\"value\"\n [readonly]=\"isFixedSelection(selection.value.id)\"\n />\n </div>\n\n <!-- Remove Filter (hidden for fixed selections) -->\n @if (!isFixedSelection(selection.value.id)) {\n <div class=\"col-span-2 flex items-end justify-end\">\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n [rounded]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"removeFilter(i, j)\"\n />\n </div>\n } @else {\n <div class=\"col-span-2\"></div>\n }\n </div>\n\n <!-- Row 2: Value, Level -->\n <div class=\"grid grid-cols-12 gap-3\">\n <!-- Value: unified select-or-write field. When the\n property exposes a fixed value list (lookup/status)\n the field surfaces it as a \"Values\" tab; otherwise\n a literal/token can be typed or picked. -->\n <div class=\"col-span-10\">\n @if (!takesNoValue(filter.get(\"operation\")?.value)) {\n <mt-filter-value-field\n [label]=\"t('value')\"\n formControlName=\"propertyValue\"\n [propertyKey]=\"filter.get('propertyKey')?.value\"\n [propertyOptions]=\"getPropertiesForSelection(i)\"\n [placeholder]=\"t('enterValue')\"\n [readonly]=\"isFixedSelection(selection.value.id)\"\n />\n }\n </div>\n\n <!-- Operation Level -->\n <div class=\"col-span-2\">\n <mt-number-field\n [label]=\"t('level')\"\n formControlName=\"operationLevel\"\n [min]=\"1\"\n [max]=\"10\"\n [readonly]=\"isFixedSelection(selection.value.id)\"\n />\n </div>\n </div>\n </div>\n }\n\n @if (getFilters(selection).length === 0) {\n <div class=\"text-center py-4 text-muted-color text-sm\">\n {{ t(\"noFiltersConfigured\") }}\n </div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n\n @if (selectionsArray.length === 0 && !loadingTree()) {\n <div class=\"text-center py-8 text-muted-color\">\n <i class=\"mti mti-database text-3xl mb-2 block\"></i>\n <p class=\"mb-2\">{{ t(\"noSelectionsConfigured\") }}</p>\n @if (!structureLocked()) {\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addSelection')\"\n severity=\"secondary\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addSelection()\"\n />\n }\n </div>\n }\n </div>\n }\n </mt-card>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { kind: "component", type: RadioCardsField, selector: "mt-radio-cards-field", inputs: ["circle", "label", "hint", "readonly", "required", "color", "size", "optionLabel", "optionValue", "options"] }, { kind: "component", type: NumberField, selector: "mt-number-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "pInputs", "format", "useGrouping", "maxFractionDigits", "min", "max", "required"] }, { kind: "component", type: TextareaField, selector: "mt-textarea-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "noErrorStyle", "pInputs", "rows", "required", "maxLength"] }, { kind: "component", type: FilterValueField, selector: "mt-filter-value-field", inputs: ["label", "placeholder", "extraProperties", "propertyOptions", "propertyKey", "showPivotTokens", "readonly"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { 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: Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
5848
5953
  }
5849
5954
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SelectionConfiguration, decorators: [{
5850
5955
  type: Component,
@@ -5874,7 +5979,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
5874
5979
  useExisting: forwardRef(() => SelectionConfiguration),
5875
5980
  multi: true,
5876
5981
  },
5877
- ], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <mt-card [title]=\"t('selections')\">\r\n <ng-template #cardEnd>\r\n @if (!structureLocked()) {\r\n <mt-button\r\n icon=\"general.plus\"\r\n size=\"small\"\r\n (onClick)=\"addSelection()\"\r\n [disabled]=\"disabled || loadingTree()\"\r\n [pTooltip]=\"t('addSelection')\"\r\n />\r\n }\r\n </ng-template>\r\n\r\n <!-- Loading Skeleton State - Show for entire component while tree is loading -->\r\n @if (loadingTree()) {\r\n <div class=\"flex flex-col gap-4\">\r\n <!-- Skeleton Selection Card -->\r\n <div class=\"p-4 rounded-lg border border-surface-200\">\r\n <!-- Skeleton Header -->\r\n <div class=\"flex items-center justify-between mb-4\">\r\n <div class=\"flex items-center gap-2\">\r\n <p-skeleton shape=\"circle\" width=\"24px\" height=\"24px\" />\r\n <p-skeleton width=\"80px\" height=\"16px\" />\r\n </div>\r\n </div>\r\n <!-- Skeleton Module Selection -->\r\n <div class=\"grid grid-cols-1 gap-4 mb-4\">\r\n <div class=\"flex flex-col gap-2\">\r\n <p-skeleton width=\"60px\" height=\"14px\" />\r\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\r\n </div>\r\n </div>\r\n <!-- Skeleton Filters Section -->\r\n <div class=\"border border-surface-200 rounded-lg p-4\">\r\n <div class=\"flex items-center justify-between mb-3\">\r\n <p-skeleton width=\"50px\" height=\"14px\" />\r\n <div class=\"flex gap-1\">\r\n <p-skeleton shape=\"circle\" width=\"28px\" height=\"28px\" />\r\n <p-skeleton shape=\"circle\" width=\"28px\" height=\"28px\" />\r\n <p-skeleton shape=\"circle\" width=\"28px\" height=\"28px\" />\r\n </div>\r\n </div>\r\n <div class=\"text-center py-4\">\r\n <p-skeleton width=\"150px\" height=\"14px\" styleClass=\"mx-auto\" />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n } @else {\r\n <div class=\"flex flex-col gap-4\" [formGroup]=\"selectionsForm\">\r\n <div formArrayName=\"selections\">\r\n @for (\r\n selection of selectionsArray.controls;\r\n track trackBySelectionId($index, selection);\r\n let i = $index\r\n ) {\r\n <div\r\n class=\"p-4 rounded-lg border transition-all mb-4 last:mb-0\"\r\n [class.border-red-500]=\"selection.invalid\"\r\n [class.border-surface-200]=\"!selection.invalid\"\r\n [formGroupName]=\"i\"\r\n >\r\n <!-- Selection Header -->\r\n <div class=\"flex items-center justify-between mb-4\">\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full text-sm font-semibold\"\r\n [class.bg-primary-100]=\"\r\n !isFixedSelection(selection.value.id)\r\n \"\r\n [class.text-primary-600]=\"\r\n !isFixedSelection(selection.value.id)\r\n \"\r\n [class.bg-amber-100]=\"isFixedSelection(selection.value.id)\"\r\n [class.text-amber-600]=\"\r\n isFixedSelection(selection.value.id)\r\n \"\r\n >\r\n @if (isFixedSelection(selection.value.id)) {\r\n <i class=\"mti mti-lock-01 text-xs\"></i>\r\n } @else {\r\n {{ selection.value.id }}\r\n }\r\n </span>\r\n <span class=\"text-sm font-medium text-muted-color\">\r\n @if (isFixedSelection(selection.value.id)) {\r\n {{ t(\"fixedSelection\") }}\r\n } @else {\r\n {{ t(\"selection\") }}\r\n }\r\n </span>\r\n </div>\r\n @if (\r\n selectionsArray.length > 1 &&\r\n !isSelectionStructureLocked(selection.value.id)\r\n ) {\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"removeSelection(i)\"\r\n />\r\n }\r\n </div>\r\n\r\n <!-- Service (own row, only when multiple services) -->\r\n @if (!hasSingleService()) {\r\n <div class=\"mb-4\">\r\n <mt-select-field\r\n [label]=\"t('service')\"\r\n formControlName=\"service\"\r\n [options]=\"services()\"\r\n optionLabel=\"name\"\r\n optionValue=\"name\"\r\n [placeholder]=\"t('selectService')\"\r\n [loading]=\"loadingTree()\"\r\n [readonly]=\"isSelectionStructureLocked(selection.value.id)\"\r\n (ngModelChange)=\"onServiceChange(i, $event)\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Type (radio cards) \u2014 scopes Workspace + Module to one type -->\r\n @if (getTypeOptionsForSelection(i).length) {\r\n <div class=\"mb-4\">\r\n <mt-radio-cards-field\r\n [label]=\"t('type')\"\r\n formControlName=\"moduleType\"\r\n [options]=\"getTypeOptionsForSelection(i)\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n size=\"small\"\r\n [readonly]=\"isSelectionStructureLocked(selection.value.id)\"\r\n />\r\n </div>\r\n }\r\n\r\n @if (shouldShowParentWorkspace(i)) {\r\n <div class=\"mb-4\">\r\n <mt-select-field\r\n [label]=\"t('workspace')\"\r\n formControlName=\"parentSelector\"\r\n [options]=\"getParentOptionsForSelection(i)\"\r\n optionLabel=\"name\"\r\n optionValue=\"selector\"\r\n [placeholder]=\"t('selectWorkspace')\"\r\n [filter]=\"true\"\r\n [readonly]=\"isSelectionStructureLocked(selection.value.id)\"\r\n (ngModelChange)=\"onParentSelectorChange(i)\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Module values (scoped to the selected type + chart workspace).\r\n When a parent workspace is not supplied by the caller, the\r\n local parentSelector fallback scopes hierarchical modules.\r\n Only Level combines several ids (\"Level:1,2\"); every other\r\n type is a single module. -->\r\n <div class=\"mb-4\">\r\n @if (allowsMultipleModules(i)) {\r\n <mt-multi-select-field\r\n [label]=\"t('module')\"\r\n [ngModel]=\"getSelectorValues(i)\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n [options]=\"getModuleOptionsForSelection(i)\"\r\n optionLabel=\"name\"\r\n optionValue=\"selector\"\r\n [placeholder]=\"t('selectModule')\"\r\n [filter]=\"true\"\r\n [virtualScroll]=\"true\"\r\n [virtualScrollItemSize]=\"38\"\r\n [showClear]=\"\r\n !isSelectionStructureLocked(selection.value.id)\r\n \"\r\n [readonly]=\"isSelectionStructureLocked(selection.value.id)\"\r\n (ngModelChange)=\"onModuleSelectionChange(i, $event)\"\r\n />\r\n } @else {\r\n <mt-select-field\r\n [label]=\"t('module')\"\r\n formControlName=\"selector\"\r\n [options]=\"getModuleOptionsForSelection(i)\"\r\n optionLabel=\"name\"\r\n optionValue=\"selector\"\r\n [placeholder]=\"t('selectModule')\"\r\n [filter]=\"true\"\r\n [showClear]=\"\r\n !isSelectionStructureLocked(selection.value.id)\r\n \"\r\n [readonly]=\"isSelectionStructureLocked(selection.value.id)\"\r\n (onChange)=\"onModuleChange(i, $event)\"\r\n />\r\n }\r\n </div>\r\n <!-- Hint: pick a type first -->\r\n @if (!getModuleTypeValue(i)) {\r\n <small class=\"text-muted-color mt-1 block mb-2\">{{\r\n t(\"selectTypeHint\")\r\n }}</small>\r\n }\r\n @if (\r\n selection.get(\"selector\")?.invalid &&\r\n selection.get(\"selector\")?.touched\r\n ) {\r\n <small class=\"text-red-500 mt-1 block mb-2\">{{\r\n t(\"moduleRequired\")\r\n }}</small>\r\n }\r\n\r\n <!-- Filters Section -->\r\n <div\r\n class=\"border border-surface-200 rounded-lg p-4\"\r\n [class.border-red-500]=\"getFilters(selection).invalid\"\r\n [class.border-amber-200]=\"isFixedSelection(selection.value.id)\"\r\n [class.bg-amber-50]=\"isFixedSelection(selection.value.id)\"\r\n >\r\n <div class=\"flex items-center justify-between mb-3\">\r\n <span class=\"text-sm font-medium\">{{\r\n t(\"sourceConditions\")\r\n }}</span>\r\n @if (!isFixedSelection(selection.value.id)) {\r\n <div class=\"flex items-center gap-1\">\r\n <mt-button\r\n icon=\"general.copy-01\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n [disabled]=\"\r\n disabled || getFilters(selection).length === 0\r\n \"\r\n (onClick)=\"copyFilters(i)\"\r\n [pTooltip]=\"t('copyFilters')\"\r\n />\r\n <mt-button\r\n icon=\"file.clipboard\"\r\n severity=\"help\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"togglePaste(i)\"\r\n [pTooltip]=\"t('pasteFilters')\"\r\n />\r\n <mt-button\r\n icon=\"general.plus\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addFilter(i)\"\r\n [pTooltip]=\"t('addFilter')\"\r\n />\r\n </div>\r\n } @else {\r\n <span class=\"text-xs text-amber-600 font-medium\">\r\n <i class=\"mti mti-lock-01 mr-1\"></i>\r\n {{ t(\"readOnly\") }}\r\n </span>\r\n }\r\n </div>\r\n\r\n <!-- Paste JSON Area -->\r\n @if (selection.value.showPaste) {\r\n <div\r\n class=\"mb-4 p-3 bg-surface-50 rounded-lg border border-surface-200\"\r\n >\r\n <mt-textarea-field\r\n [label]=\"t('pasteFiltersJson')\"\r\n formControlName=\"filterJson\"\r\n [placeholder]=\"t('pasteFiltersJsonPlaceholder')\"\r\n [rows]=\"4\"\r\n />\r\n @if (selection.value.pasteError) {\r\n <small class=\"text-red-500 mt-1 block\">{{\r\n selection.value.pasteError\r\n }}</small>\r\n }\r\n <div class=\"flex justify-end gap-2 mt-2\">\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"togglePaste(i)\"\r\n />\r\n <mt-button\r\n [label]=\"t('apply')\"\r\n size=\"small\"\r\n (onClick)=\"applyPastedFilters(i)\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- Filters List -->\r\n <div class=\"flex flex-col gap-3\" formArrayName=\"filters\">\r\n @for (\r\n filter of getFilters(selection).controls;\r\n track trackByFilterIndex(j);\r\n let j = $index\r\n ) {\r\n <div\r\n class=\"flex flex-col gap-3 p-3 rounded-lg border\"\r\n [class.bg-surface-50]=\"\r\n !isFixedSelection(selection.value.id)\r\n \"\r\n [class.border-surface-100]=\"\r\n !isFixedSelection(selection.value.id)\r\n \"\r\n [class.bg-amber-25]=\"isFixedSelection(selection.value.id)\"\r\n [class.border-amber-100]=\"\r\n isFixedSelection(selection.value.id)\r\n \"\r\n [formGroupName]=\"j\"\r\n >\r\n <!-- Row 1: Property, Operation, Logical -->\r\n <div class=\"grid grid-cols-12 gap-3\">\r\n <!-- Property Key -->\r\n <div class=\"col-span-5\">\r\n <mt-select-field\r\n [label]=\"t('property')\"\r\n formControlName=\"propertyKey\"\r\n [options]=\"getPropertiesForSelection(i)\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n [readonly]=\"isFixedSelection(selection.value.id)\"\r\n (onChange)=\"onFilterPropertyChange(i, j, $event)\"\r\n />\r\n </div>\r\n\r\n <!-- Operation -->\r\n <div class=\"col-span-3\">\r\n <mt-select-field\r\n [label]=\"t('operation')\"\r\n formControlName=\"operation\"\r\n [options]=\"operations\"\r\n optionLabel=\"name\"\r\n optionValue=\"value\"\r\n [readonly]=\"isFixedSelection(selection.value.id)\"\r\n />\r\n </div>\r\n\r\n <!-- Logical Operator -->\r\n <div class=\"col-span-2\">\r\n <mt-select-field\r\n [label]=\"t('logical')\"\r\n formControlName=\"logical\"\r\n [options]=\"logicals\"\r\n optionLabel=\"name\"\r\n optionValue=\"value\"\r\n [readonly]=\"isFixedSelection(selection.value.id)\"\r\n />\r\n </div>\r\n\r\n <!-- Remove Filter (hidden for fixed selections) -->\r\n @if (!isFixedSelection(selection.value.id)) {\r\n <div class=\"col-span-2 flex items-end justify-end\">\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"removeFilter(i, j)\"\r\n />\r\n </div>\r\n } @else {\r\n <div class=\"col-span-2\"></div>\r\n }\r\n </div>\r\n\r\n <!-- Row 2: Value, Level -->\r\n <div class=\"grid grid-cols-12 gap-3\">\r\n <!-- Value: unified select-or-write field. When the\r\n property exposes a fixed value list (lookup/status)\r\n the field surfaces it as a \"Values\" tab; otherwise\r\n a literal/token can be typed or picked. -->\r\n <div class=\"col-span-10\">\r\n <mt-filter-value-field\r\n [label]=\"t('value')\"\r\n formControlName=\"propertyValue\"\r\n [propertyKey]=\"filter.get('propertyKey')?.value\"\r\n [propertyOptions]=\"getPropertiesForSelection(i)\"\r\n [placeholder]=\"t('enterValue')\"\r\n [readonly]=\"isFixedSelection(selection.value.id)\"\r\n />\r\n </div>\r\n\r\n <!-- Operation Level -->\r\n <div class=\"col-span-2\">\r\n <mt-number-field\r\n [label]=\"t('level')\"\r\n formControlName=\"operationLevel\"\r\n [min]=\"1\"\r\n [max]=\"10\"\r\n [readonly]=\"isFixedSelection(selection.value.id)\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (getFilters(selection).length === 0) {\r\n <div class=\"text-center py-4 text-muted-color text-sm\">\r\n {{ t(\"noFiltersConfigured\") }}\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (selectionsArray.length === 0 && !loadingTree()) {\r\n <div class=\"text-center py-8 text-muted-color\">\r\n <i class=\"mti mti-database text-3xl mb-2 block\"></i>\r\n <p class=\"mb-2\">{{ t(\"noSelectionsConfigured\") }}</p>\r\n @if (!structureLocked()) {\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addSelection')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addSelection()\"\r\n />\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </mt-card>\r\n</div>\r\n" }]
5982
+ ], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <mt-card [title]=\"t('selections')\">\n <ng-template #cardEnd>\n @if (!structureLocked()) {\n <mt-button\n icon=\"general.plus\"\n size=\"small\"\n (onClick)=\"addSelection()\"\n [disabled]=\"disabled || loadingTree()\"\n [pTooltip]=\"t('addSelection')\"\n />\n }\n </ng-template>\n\n <!-- Loading Skeleton State - Show for entire component while tree is loading -->\n @if (loadingTree()) {\n <div class=\"flex flex-col gap-4\">\n <!-- Skeleton Selection Card -->\n <div class=\"p-4 rounded-lg border border-surface-200\">\n <!-- Skeleton Header -->\n <div class=\"flex items-center justify-between mb-4\">\n <div class=\"flex items-center gap-2\">\n <p-skeleton shape=\"circle\" width=\"24px\" height=\"24px\" />\n <p-skeleton width=\"80px\" height=\"16px\" />\n </div>\n </div>\n <!-- Skeleton Module Selection -->\n <div class=\"grid grid-cols-1 gap-4 mb-4\">\n <div class=\"flex flex-col gap-2\">\n <p-skeleton width=\"60px\" height=\"14px\" />\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\n </div>\n </div>\n <!-- Skeleton Filters Section -->\n <div class=\"border border-surface-200 rounded-lg p-4\">\n <div class=\"flex items-center justify-between mb-3\">\n <p-skeleton width=\"50px\" height=\"14px\" />\n <div class=\"flex gap-1\">\n <p-skeleton shape=\"circle\" width=\"28px\" height=\"28px\" />\n <p-skeleton shape=\"circle\" width=\"28px\" height=\"28px\" />\n <p-skeleton shape=\"circle\" width=\"28px\" height=\"28px\" />\n </div>\n </div>\n <div class=\"text-center py-4\">\n <p-skeleton width=\"150px\" height=\"14px\" styleClass=\"mx-auto\" />\n </div>\n </div>\n </div>\n </div>\n } @else {\n <div class=\"flex flex-col gap-4\" [formGroup]=\"selectionsForm\">\n <div formArrayName=\"selections\">\n @for (\n selection of selectionsArray.controls;\n track trackBySelectionId($index, selection);\n let i = $index\n ) {\n <div\n class=\"p-4 rounded-lg border transition-all mb-4 last:mb-0\"\n [class.border-red-500]=\"selection.invalid\"\n [class.border-surface-200]=\"!selection.invalid\"\n [formGroupName]=\"i\"\n >\n <!-- Selection Header -->\n <div class=\"flex items-center justify-between mb-4\">\n <div class=\"flex items-center gap-2\">\n <span\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full text-sm font-semibold\"\n [class.bg-primary-100]=\"\n !isFixedSelection(selection.value.id)\n \"\n [class.text-primary-600]=\"\n !isFixedSelection(selection.value.id)\n \"\n [class.bg-amber-100]=\"isFixedSelection(selection.value.id)\"\n [class.text-amber-600]=\"\n isFixedSelection(selection.value.id)\n \"\n >\n @if (isFixedSelection(selection.value.id)) {\n <i class=\"mti mti-lock-01 text-xs\"></i>\n } @else {\n {{ selection.value.id }}\n }\n </span>\n <span class=\"text-sm font-medium text-muted-color\">\n @if (isFixedSelection(selection.value.id)) {\n {{ t(\"fixedSelection\") }}\n } @else {\n {{ t(\"selection\") }}\n }\n </span>\n </div>\n @if (\n selectionsArray.length > 1 &&\n !isSelectionStructureLocked(selection.value.id)\n ) {\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"removeSelection(i)\"\n />\n }\n </div>\n\n <!-- Service (own row, only when multiple services) -->\n @if (!hasSingleService()) {\n <div class=\"mb-4\">\n <mt-select-field\n [label]=\"t('service')\"\n formControlName=\"service\"\n [options]=\"services()\"\n optionLabel=\"name\"\n optionValue=\"name\"\n [placeholder]=\"t('selectService')\"\n [loading]=\"loadingTree()\"\n [readonly]=\"isSelectionStructureLocked(selection.value.id)\"\n (ngModelChange)=\"onServiceChange(i, $event)\"\n />\n </div>\n }\n\n <!-- Type (radio cards) \u2014 scopes Workspace + Module to one type -->\n @if (getTypeOptionsForSelection(i).length) {\n <div class=\"mb-4\">\n <mt-radio-cards-field\n [label]=\"t('type')\"\n formControlName=\"moduleType\"\n [options]=\"getTypeOptionsForSelection(i)\"\n optionLabel=\"label\"\n optionValue=\"value\"\n size=\"small\"\n [readonly]=\"isSelectionStructureLocked(selection.value.id)\"\n />\n </div>\n }\n\n @if (shouldShowParentWorkspace(i)) {\n <div class=\"mb-4\">\n <mt-select-field\n [label]=\"t('workspace')\"\n formControlName=\"parentSelector\"\n [options]=\"getParentOptionsForSelection(i)\"\n optionLabel=\"name\"\n optionValue=\"selector\"\n [placeholder]=\"t('selectWorkspace')\"\n [filter]=\"true\"\n [readonly]=\"isSelectionStructureLocked(selection.value.id)\"\n (ngModelChange)=\"onParentSelectorChange(i)\"\n />\n </div>\n }\n\n <!-- Module values (scoped to the selected type + chart workspace).\n When a parent workspace is not supplied by the caller, the\n local parentSelector fallback scopes hierarchical modules.\n Only Level combines several ids (\"Level:1,2\"); every other\n type is a single module. -->\n <div class=\"mb-4\">\n @if (allowsMultipleModules(i)) {\n <mt-multi-select-field\n [label]=\"t('module')\"\n [ngModel]=\"getSelectorValues(i)\"\n [ngModelOptions]=\"{ standalone: true }\"\n [options]=\"getModuleOptionsForSelection(i)\"\n optionLabel=\"name\"\n optionValue=\"selector\"\n [placeholder]=\"t('selectModule')\"\n [filter]=\"true\"\n [virtualScroll]=\"true\"\n [virtualScrollItemSize]=\"38\"\n [showClear]=\"\n !isSelectionStructureLocked(selection.value.id)\n \"\n [readonly]=\"isSelectionStructureLocked(selection.value.id)\"\n (ngModelChange)=\"onModuleSelectionChange(i, $event)\"\n />\n } @else {\n <mt-select-field\n [label]=\"t('module')\"\n formControlName=\"selector\"\n [options]=\"getModuleOptionsForSelection(i)\"\n optionLabel=\"name\"\n optionValue=\"selector\"\n [placeholder]=\"t('selectModule')\"\n [filter]=\"true\"\n [showClear]=\"\n !isSelectionStructureLocked(selection.value.id)\n \"\n [readonly]=\"isSelectionStructureLocked(selection.value.id)\"\n (onChange)=\"onModuleChange(i, $event)\"\n />\n }\n </div>\n <!-- Hint: pick a type first -->\n @if (!getModuleTypeValue(i)) {\n <small class=\"text-muted-color mt-1 block mb-2\">{{\n t(\"selectTypeHint\")\n }}</small>\n }\n @if (\n selection.get(\"selector\")?.invalid &&\n selection.get(\"selector\")?.touched\n ) {\n <small class=\"text-red-500 mt-1 block mb-2\">{{\n t(\"moduleRequired\")\n }}</small>\n }\n\n <!-- Filters Section -->\n <div\n class=\"border border-surface-200 rounded-lg p-4\"\n [class.border-red-500]=\"getFilters(selection).invalid\"\n [class.border-amber-200]=\"isFixedSelection(selection.value.id)\"\n [class.bg-amber-50]=\"isFixedSelection(selection.value.id)\"\n >\n <div class=\"flex items-center justify-between mb-3\">\n <span class=\"text-sm font-medium\">{{\n t(\"sourceConditions\")\n }}</span>\n @if (!isFixedSelection(selection.value.id)) {\n <div class=\"flex items-center gap-1\">\n <mt-button\n icon=\"general.copy-01\"\n severity=\"secondary\"\n size=\"small\"\n [rounded]=\"true\"\n [disabled]=\"\n disabled || getFilters(selection).length === 0\n \"\n (onClick)=\"copyFilters(i)\"\n [pTooltip]=\"t('copyFilters')\"\n />\n <mt-button\n icon=\"file.clipboard\"\n severity=\"help\"\n size=\"small\"\n [rounded]=\"true\"\n [disabled]=\"disabled\"\n (onClick)=\"togglePaste(i)\"\n [pTooltip]=\"t('pasteFilters')\"\n />\n <mt-button\n icon=\"general.plus\"\n [rounded]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addFilter(i)\"\n [pTooltip]=\"t('addFilter')\"\n />\n </div>\n } @else {\n <span class=\"text-xs text-amber-600 font-medium\">\n <i class=\"mti mti-lock-01 mr-1\"></i>\n {{ t(\"readOnly\") }}\n </span>\n }\n </div>\n\n <!-- Paste JSON Area -->\n @if (selection.value.showPaste) {\n <div\n class=\"mb-4 p-3 bg-surface-50 rounded-lg border border-surface-200\"\n >\n <mt-textarea-field\n [label]=\"t('pasteFiltersJson')\"\n formControlName=\"filterJson\"\n [placeholder]=\"t('pasteFiltersJsonPlaceholder')\"\n [rows]=\"4\"\n />\n @if (selection.value.pasteError) {\n <small class=\"text-red-500 mt-1 block\">{{\n selection.value.pasteError\n }}</small>\n }\n <div class=\"flex justify-end gap-2 mt-2\">\n <mt-button\n [label]=\"t('cancel')\"\n severity=\"secondary\"\n size=\"small\"\n (onClick)=\"togglePaste(i)\"\n />\n <mt-button\n [label]=\"t('apply')\"\n size=\"small\"\n (onClick)=\"applyPastedFilters(i)\"\n />\n </div>\n </div>\n }\n\n <!-- Filters List -->\n <div class=\"flex flex-col gap-3\" formArrayName=\"filters\">\n @for (\n filter of getFilters(selection).controls;\n track trackByFilterIndex(j);\n let j = $index\n ) {\n <div\n class=\"flex flex-col gap-3 p-3 rounded-lg border\"\n [class.bg-surface-50]=\"\n !isFixedSelection(selection.value.id)\n \"\n [class.border-surface-100]=\"\n !isFixedSelection(selection.value.id)\n \"\n [class.bg-amber-25]=\"isFixedSelection(selection.value.id)\"\n [class.border-amber-100]=\"\n isFixedSelection(selection.value.id)\n \"\n [formGroupName]=\"j\"\n >\n <!-- Row 1: Property, Operation, Logical -->\n <div class=\"grid grid-cols-12 gap-3\">\n <!-- Property Key -->\n <div class=\"col-span-5\">\n <mt-select-field\n [label]=\"t('property')\"\n formControlName=\"propertyKey\"\n [options]=\"getPropertiesForSelection(i)\"\n optionLabel=\"name\"\n optionValue=\"key\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n [readonly]=\"isFixedSelection(selection.value.id)\"\n (onChange)=\"onFilterPropertyChange(i, j, $event)\"\n />\n </div>\n\n <!-- Operation -->\n <div class=\"col-span-3\">\n <mt-select-field\n [label]=\"t('operation')\"\n formControlName=\"operation\"\n [options]=\"operations\"\n optionLabel=\"name\"\n optionValue=\"value\"\n [readonly]=\"isFixedSelection(selection.value.id)\"\n />\n </div>\n\n <!-- Logical Operator -->\n <div class=\"col-span-2\">\n <mt-select-field\n [label]=\"t('logical')\"\n formControlName=\"logical\"\n [options]=\"logicals\"\n optionLabel=\"name\"\n optionValue=\"value\"\n [readonly]=\"isFixedSelection(selection.value.id)\"\n />\n </div>\n\n <!-- Remove Filter (hidden for fixed selections) -->\n @if (!isFixedSelection(selection.value.id)) {\n <div class=\"col-span-2 flex items-end justify-end\">\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n [rounded]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"removeFilter(i, j)\"\n />\n </div>\n } @else {\n <div class=\"col-span-2\"></div>\n }\n </div>\n\n <!-- Row 2: Value, Level -->\n <div class=\"grid grid-cols-12 gap-3\">\n <!-- Value: unified select-or-write field. When the\n property exposes a fixed value list (lookup/status)\n the field surfaces it as a \"Values\" tab; otherwise\n a literal/token can be typed or picked. -->\n <div class=\"col-span-10\">\n @if (!takesNoValue(filter.get(\"operation\")?.value)) {\n <mt-filter-value-field\n [label]=\"t('value')\"\n formControlName=\"propertyValue\"\n [propertyKey]=\"filter.get('propertyKey')?.value\"\n [propertyOptions]=\"getPropertiesForSelection(i)\"\n [placeholder]=\"t('enterValue')\"\n [readonly]=\"isFixedSelection(selection.value.id)\"\n />\n }\n </div>\n\n <!-- Operation Level -->\n <div class=\"col-span-2\">\n <mt-number-field\n [label]=\"t('level')\"\n formControlName=\"operationLevel\"\n [min]=\"1\"\n [max]=\"10\"\n [readonly]=\"isFixedSelection(selection.value.id)\"\n />\n </div>\n </div>\n </div>\n }\n\n @if (getFilters(selection).length === 0) {\n <div class=\"text-center py-4 text-muted-color text-sm\">\n {{ t(\"noFiltersConfigured\") }}\n </div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n\n @if (selectionsArray.length === 0 && !loadingTree()) {\n <div class=\"text-center py-8 text-muted-color\">\n <i class=\"mti mti-database text-3xl mb-2 block\"></i>\n <p class=\"mb-2\">{{ t(\"noSelectionsConfigured\") }}</p>\n @if (!structureLocked()) {\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addSelection')\"\n severity=\"secondary\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addSelection()\"\n />\n }\n </div>\n }\n </div>\n }\n </mt-card>\n</div>\n" }]
5878
5983
  }], ctorParameters: () => [], propDecorators: { structureLocked: [{ type: i0.Input, args: [{ isSignal: true, alias: "structureLocked", required: false }] }], workspaceId: [{ type: i0.Input, args: [{ isSignal: true, alias: "workspaceId", required: false }] }], chartWorkspace: [{ type: i0.Input, args: [{ isSignal: true, alias: "chartWorkspace", required: false }] }], modulesProperties: [{ type: i0.Input, args: [{ isSignal: true, alias: "modulesProperties", required: false }] }], propertiesFlat: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesFlat", required: false }] }], moduleChange: [{ type: i0.Output, args: ["moduleChange"] }] } });
5879
5984
 
5880
5985
  /**
@@ -6603,6 +6708,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
6603
6708
  ], template: "<div class=\"flex flex-col gap-3\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-2 border-b border-surface-200 pb-3\"\r\n >\r\n <h3 class=\"text-base font-semibold text-surface-800\">\r\n {{ t(\"filterFieldsConfiguration\") }}\r\n </h3>\r\n <div class=\"flex items-center gap-1.5\">\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addField')\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n (onClick)=\"addFilterField()\"\r\n [disabled]=\"disabled()\"\r\n />\r\n <mt-button\r\n icon=\"general.copy-06\"\r\n [pTooltip]=\"t('copyConfiguration')\"\r\n tooltipPosition=\"top\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n (onClick)=\"copyConfiguration()\"\r\n />\r\n <mt-button\r\n icon=\"general.clipboard\"\r\n [pTooltip]=\"t('pasteConfiguration')\"\r\n tooltipPosition=\"top\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n (onClick)=\"togglePasteArea()\"\r\n />\r\n </div>\r\n </div>\r\n\r\n @if (showPasteArea()) {\r\n <div\r\n class=\"flex flex-col gap-2 rounded-md border border-surface-200 bg-surface-50 p-3\"\r\n >\r\n <mt-textarea-field\r\n [label]=\"t('pasteConfigurationHere')\"\r\n [rows]=\"6\"\r\n [ngModel]=\"pasteContent()\"\r\n (ngModelChange)=\"pasteContent.set($event)\"\r\n [placeholder]=\"t('pasteJsonConfiguration')\"\r\n />\r\n @if (pasteError()) {\r\n <div class=\"text-sm text-red-500\">{{ pasteError() }}</div>\r\n }\r\n <div class=\"flex justify-end gap-2\">\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"togglePasteArea()\"\r\n />\r\n <mt-button\r\n [label]=\"t('applyConfiguration')\"\r\n size=\"small\"\r\n (onClick)=\"applyPastedConfiguration()\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n\r\n <div class=\"flex flex-col gap-3\">\r\n @for (field of filterFields(); track trackByIndex($index); let i = $index) {\r\n <section\r\n class=\"overflow-hidden rounded-md border border-surface-200 bg-surface-0\"\r\n >\r\n <div\r\n class=\"flex items-center justify-between gap-3 border-b border-surface-200 bg-surface-100 px-3 py-2\"\r\n >\r\n <div class=\"min-w-0\">\r\n <div class=\"truncate text-sm font-semibold text-surface-800\">\r\n {{ getFieldTitle(field, i) }}\r\n </div>\r\n <div class=\"text-xs text-muted-color\">\r\n {{ getFieldTypeLabel(field.type) }}\r\n </div>\r\n </div>\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n [text]=\"true\"\r\n (onClick)=\"removeFilterField(i)\"\r\n [disabled]=\"disabled()\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-col gap-3 p-3\">\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('fieldType')\"\r\n [options]=\"availableFieldTypes()\"\r\n optionValue=\"value\"\r\n optionLabel=\"label\"\r\n [ngModel]=\"field.type\"\r\n (ngModelChange)=\"onFieldTypeChange(i, $event)\"\r\n />\r\n\r\n @if (requiresKey(field.type)) {\r\n <mt-text-field\r\n [label]=\"t('fieldKey')\"\r\n [placeholder]=\"t('enterFieldKey')\"\r\n [ngModel]=\"field.key\"\r\n (ngModelChange)=\"updateField(i, 'key', $event)\"\r\n />\r\n }\r\n\r\n @if (requiresName(field.type)) {\r\n <mt-text-field\r\n [label]=\"t('nameEnglish')\"\r\n [placeholder]=\"t('enterEnglishName')\"\r\n [ngModel]=\"field.name?.en\"\r\n (ngModelChange)=\"updateFieldName(i, 'en', $event)\"\r\n />\r\n <mt-text-field\r\n [label]=\"t('nameArabic')\"\r\n [placeholder]=\"t('enterArabicName')\"\r\n [ngModel]=\"field.name?.ar\"\r\n (ngModelChange)=\"updateFieldName(i, 'ar', $event)\"\r\n />\r\n }\r\n </div>\r\n\r\n @if (hasTypeConfiguration(field)) {\r\n <div\r\n class=\"flex w-full flex-col gap-3 rounded-md border border-surface-200 bg-surface-50 p-3\"\r\n >\r\n <div class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"settings\") }}\r\n </div>\r\n\r\n @switch (field.type) {\r\n @case (\"dropdownTVService\") {\r\n @if (isDropdownConfigOpen(i)) {\r\n <div class=\"flex justify-end\">\r\n <mt-button\r\n [label]=\"t('close')\"\r\n icon=\"general.x-close\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [text]=\"true\"\r\n (onClick)=\"closeDropdownConfig(i)\"\r\n />\r\n </div>\r\n\r\n <mt-selection-configuration\r\n class=\"block w-full\"\r\n [workspaceId]=\"getDropdownWorkspaceId(field)\"\r\n [chartWorkspace]=\"getDropdownChartWorkspace(field)\"\r\n [ngModel]=\"getDropdownSelections(field)\"\r\n (ngModelChange)=\"updateDropdownSelections(i, $event)\"\r\n (moduleChange)=\"onDropdownModuleChange(i, $event)\"\r\n [modulesProperties]=\"getModulesPropertiesForField(i)\"\r\n [propertiesFlat]=\"getPropertiesFlatForField(i)\"\r\n />\r\n\r\n <mt-multi-select-field\r\n class=\"block w-full\"\r\n [label]=\"t('selectedProperties')\"\r\n [options]=\"getPropertiesFlatForField(i)\"\r\n optionValue=\"key\"\r\n optionLabel=\"name\"\r\n [filter]=\"true\"\r\n [ngModel]=\"getSelectedProperties(field)\"\r\n (ngModelChange)=\"updateSelectedProperties(i, $event)\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-2 rounded-md border border-surface-200 bg-surface-0 px-3 py-2\"\r\n >\r\n <span class=\"text-sm text-muted-color\">\r\n {{ getDropdownSummary(field) }}\r\n </span>\r\n <mt-button\r\n [label]=\"t('selectionsConfiguration')\"\r\n icon=\"general.settings-01\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"openDropdownConfig(i, field)\"\r\n />\r\n </div>\r\n }\r\n }\r\n\r\n @case (\"lookup\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('lookupId')\"\r\n [options]=\"lookupOptions()\"\r\n optionValue=\"id\"\r\n optionLabel=\"displayName\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.lookupId\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'lookupId', $event)\"\r\n />\r\n </div>\r\n }\r\n\r\n @case (\"status\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('schemaLevelId')\"\r\n [options]=\"levelSchemaOptions()\"\r\n optionValue=\"id\"\r\n optionLabel=\"description\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.schemaLevelId\"\r\n (ngModelChange)=\"onSchemaLevelChange(i, $event)\"\r\n />\r\n\r\n @if (field.configuration?.schemaLevelId) {\r\n <mt-select-field\r\n [label]=\"t('logId')\"\r\n [options]=\"\r\n levelLogOptions(field.configuration?.schemaLevelId)\r\n \"\r\n optionValue=\"id\"\r\n optionLabel=\"description\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.logId\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'logId', $event)\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n @case (\"phaseGate\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('schemaLevelId')\"\r\n [options]=\"levelSchemaOptions()\"\r\n optionValue=\"id\"\r\n optionLabel=\"description\"\r\n [filter]=\"true\"\r\n [ngModel]=\"field.configuration?.schemaLevelId\"\r\n (ngModelChange)=\"onSchemaLevelChange(i, $event)\"\r\n />\r\n </div>\r\n }\r\n\r\n @case (\"checkbox\") {\r\n <mt-toggle-field\r\n [label]=\"t('defaultChecked')\"\r\n size=\"small\"\r\n [ngModel]=\"field.configuration?.checked ?? false\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'checked', $event)\"\r\n />\r\n }\r\n\r\n @case (\"year\") {\r\n <div class=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\r\n <mt-number-field\r\n [label]=\"t('minYear')\"\r\n [placeholder]=\"t('minYear')\"\r\n [ngModel]=\"field.configuration?.minYear\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'minYear', $event)\"\r\n />\r\n <mt-number-field\r\n [label]=\"t('maxYear')\"\r\n [placeholder]=\"t('maxYear')\"\r\n [ngModel]=\"field.configuration?.maxYear\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'maxYear', $event)\"\r\n />\r\n </div>\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"flex flex-wrap items-center gap-4\">\r\n @if (supportsRequired(field)) {\r\n <mt-toggle-field\r\n [label]=\"t('isRequired')\"\r\n size=\"small\"\r\n [ngModel]=\"field.configuration?.isRequird ?? false\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'isRequird', $event)\"\r\n />\r\n }\r\n\r\n @if (supportsMultiple(field)) {\r\n <mt-toggle-field\r\n [label]=\"t('isMultiple')\"\r\n size=\"small\"\r\n [ngModel]=\"field.configuration?.isMultiple ?? false\"\r\n (ngModelChange)=\"updateFieldConfig(i, 'isMultiple', $event)\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n </section>\r\n } @empty {\r\n <div\r\n class=\"flex flex-col items-center justify-center gap-2 rounded-md border border-dashed border-surface-300 py-10 text-center text-muted-color\"\r\n >\r\n <mt-icon icon=\"general.filter-lines\" class=\"text-3xl\" />\r\n <p class=\"text-sm font-medium\">{{ t(\"noFilterFieldsConfigured\") }}</p>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addField')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"addFilterField()\"\r\n [disabled]=\"disabled()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n" }]
6604
6709
  }], ctorParameters: () => [], propDecorators: { lookups: [{ type: i0.Input, args: [{ isSignal: true, alias: "lookups", required: false }] }], levelsSchema: [{ type: i0.Input, args: [{ isSignal: true, alias: "levelsSchema", required: false }] }], levelLogs: [{ type: i0.Input, args: [{ isSignal: true, alias: "levelLogs", required: false }] }], productType: [{ type: i0.Input, args: [{ isSignal: true, alias: "productType", required: false }] }], workspaceId: [{ type: i0.Input, args: [{ isSignal: true, alias: "workspaceId", required: false }] }], chartWorkspace: [{ type: i0.Input, args: [{ isSignal: true, alias: "chartWorkspace", required: false }] }], loadLevelLogs: [{ type: i0.Output, args: ["loadLevelLogs"] }] } });
6605
6710
 
6711
+ /**
6712
+ * The first thing a field is missing, or null when it is complete. A field
6713
+ * saved without its key, name or source showed no control on the page and gave
6714
+ * no message (#1845). A disabled field does not run, so it is not checked.
6715
+ */
6716
+ function filterFieldGap(field) {
6717
+ if (field.active === false)
6718
+ return null;
6719
+ const { type, configuration } = field;
6720
+ if (type !== 'section' && type !== 'separator' && !field.key?.trim()) {
6721
+ return 'key';
6722
+ }
6723
+ if (type !== 'separator' &&
6724
+ !field.name?.en?.trim() &&
6725
+ !field.name?.ar?.trim()) {
6726
+ return 'name';
6727
+ }
6728
+ if ((type === 'dropdownTVService' &&
6729
+ !configuration?.payload?.selection?.some((s) => !!s?.selector)) ||
6730
+ (type === 'lookup' && configuration?.lookupId == null) ||
6731
+ (type === 'status' && configuration?.schemaLevelId == null)) {
6732
+ return 'source';
6733
+ }
6734
+ return null;
6735
+ }
6736
+ /** The first incomplete field, with its 1-based position. */
6737
+ function firstFilterFieldGap(fields) {
6738
+ for (let index = 0; index < fields.length; index++) {
6739
+ const gap = filterFieldGap(fields[index]);
6740
+ if (gap)
6741
+ return { position: index + 1, gap };
6742
+ }
6743
+ return null;
6744
+ }
6745
+
6606
6746
  /**
6607
6747
  * Manage Filter On Page Component
6608
6748
  *
@@ -6632,6 +6772,8 @@ class ManageFilterOnPage {
6632
6772
  filtersConfig = signal([], ...(ngDevMode ? [{ debugName: "filtersConfig" }] : /* istanbul ignore next */ []));
6633
6773
  /** Level logs for status filter */
6634
6774
  levelLogs = signal([], ...(ngDevMode ? [{ debugName: "levelLogs" }] : /* istanbul ignore next */ []));
6775
+ /** The first field that is not complete yet; Save waits for it (#1845). */
6776
+ incompleteField = computed(() => firstFilterFieldGap(this.filtersConfig()), ...(ngDevMode ? [{ debugName: "incompleteField" }] : /* istanbul ignore next */ []));
6635
6777
  ngOnInit() {
6636
6778
  this.filtersConfig.set([...(this.data() || [])]);
6637
6779
  }
@@ -6650,6 +6792,8 @@ class ManageFilterOnPage {
6650
6792
  }
6651
6793
  /** Save and close the dialog */
6652
6794
  save() {
6795
+ if (this.incompleteField())
6796
+ return;
6653
6797
  this.ref.close({
6654
6798
  filters: this.filtersConfig(),
6655
6799
  });
@@ -6659,7 +6803,7 @@ class ManageFilterOnPage {
6659
6803
  this.ref.close(null);
6660
6804
  }
6661
6805
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ManageFilterOnPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
6662
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: ManageFilterOnPage, isStandalone: true, selector: "mt-manage-filter-on-page", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, workspaceId: { classPropertyName: "workspaceId", publicName: "workspaceId", isSignal: true, isRequired: false, transformFunction: null }, chartWorkspace: { classPropertyName: "chartWorkspace", publicName: "chartWorkspace", isSignal: true, isRequired: false, transformFunction: null }, lookups: { classPropertyName: "lookups", publicName: "lookups", isSignal: true, isRequired: false, transformFunction: null }, levelsSchema: { classPropertyName: "levelsSchema", publicName: "levelsSchema", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\r\n class=\"flex h-full min-h-0 flex-col\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <div\r\n class=\"flex-1 min-h-0 overflow-y-auto px-4 py-3\"\r\n [class]=\"modal.contentClass\"\r\n >\r\n <mt-dynamic-filters-config\r\n class=\"block\"\r\n [ngModel]=\"filtersConfig()\"\r\n (ngModelChange)=\"onFiltersChange($event)\"\r\n [workspaceId]=\"workspaceId()\"\r\n [chartWorkspace]=\"chartWorkspace()\"\r\n [lookups]=\"lookups()\"\r\n [levelsSchema]=\"levelsSchema()\"\r\n [levelLogs]=\"levelLogs()\"\r\n (loadLevelLogs)=\"onLoadLevelLogs($event)\"\r\n />\r\n </div>\r\n\r\n <div\r\n [class]=\"\r\n modal.footerClass +\r\n ' !h-auto !min-h-0 !justify-end !gap-2 !border-t !border-surface-200 !px-4 !py-3'\r\n \"\r\n >\r\n <mt-button [label]=\"t('cancel')\" variant=\"outlined\" (onClick)=\"close()\" />\r\n <mt-button [label]=\"t('save')\" icon=\"general.save-02\" (onClick)=\"save()\" />\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: DynamicFiltersConfig, selector: "mt-dynamic-filters-config", inputs: ["lookups", "levelsSchema", "levelLogs", "productType", "workspaceId", "chartWorkspace"], outputs: ["loadLevelLogs"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
6806
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ManageFilterOnPage, isStandalone: true, selector: "mt-manage-filter-on-page", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, workspaceId: { classPropertyName: "workspaceId", publicName: "workspaceId", isSignal: true, isRequired: false, transformFunction: null }, chartWorkspace: { classPropertyName: "chartWorkspace", publicName: "chartWorkspace", isSignal: true, isRequired: false, transformFunction: null }, lookups: { classPropertyName: "lookups", publicName: "lookups", isSignal: true, isRequired: false, transformFunction: null }, levelsSchema: { classPropertyName: "levelsSchema", publicName: "levelsSchema", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"flex h-full min-h-0 flex-col\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n>\n <div\n class=\"flex-1 min-h-0 overflow-y-auto px-4 py-3\"\n [class]=\"modal.contentClass\"\n >\n <mt-dynamic-filters-config\n class=\"block\"\n [ngModel]=\"filtersConfig()\"\n (ngModelChange)=\"onFiltersChange($event)\"\n [workspaceId]=\"workspaceId()\"\n [chartWorkspace]=\"chartWorkspace()\"\n [lookups]=\"lookups()\"\n [levelsSchema]=\"levelsSchema()\"\n [levelLogs]=\"levelLogs()\"\n (loadLevelLogs)=\"onLoadLevelLogs($event)\"\n />\n </div>\n\n <div\n [class]=\"\n modal.footerClass +\n ' !h-auto !min-h-0 !justify-end !gap-2 !border-t !border-surface-200 !px-4 !py-3'\n \"\n >\n @if (incompleteField(); as incomplete) {\n <span class=\"me-auto text-sm text-amber-700\" role=\"alert\">{{\n t(\"filterFieldIncomplete_\" + incomplete.gap, {\n n: incomplete.position,\n })\n }}</span>\n }\n <mt-button [label]=\"t('cancel')\" variant=\"outlined\" (onClick)=\"close()\" />\n <mt-button\n [label]=\"t('save')\"\n icon=\"general.save-02\"\n [disabled]=\"!!incompleteField()\"\n (onClick)=\"save()\"\n />\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: DynamicFiltersConfig, selector: "mt-dynamic-filters-config", inputs: ["lookups", "levelsSchema", "levelLogs", "productType", "workspaceId", "chartWorkspace"], outputs: ["loadLevelLogs"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
6663
6807
  }
6664
6808
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ManageFilterOnPage, decorators: [{
6665
6809
  type: Component,
@@ -6669,7 +6813,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
6669
6813
  TranslocoDirective,
6670
6814
  Button,
6671
6815
  DynamicFiltersConfig,
6672
- ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\r\n class=\"flex h-full min-h-0 flex-col\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <div\r\n class=\"flex-1 min-h-0 overflow-y-auto px-4 py-3\"\r\n [class]=\"modal.contentClass\"\r\n >\r\n <mt-dynamic-filters-config\r\n class=\"block\"\r\n [ngModel]=\"filtersConfig()\"\r\n (ngModelChange)=\"onFiltersChange($event)\"\r\n [workspaceId]=\"workspaceId()\"\r\n [chartWorkspace]=\"chartWorkspace()\"\r\n [lookups]=\"lookups()\"\r\n [levelsSchema]=\"levelsSchema()\"\r\n [levelLogs]=\"levelLogs()\"\r\n (loadLevelLogs)=\"onLoadLevelLogs($event)\"\r\n />\r\n </div>\r\n\r\n <div\r\n [class]=\"\r\n modal.footerClass +\r\n ' !h-auto !min-h-0 !justify-end !gap-2 !border-t !border-surface-200 !px-4 !py-3'\r\n \"\r\n >\r\n <mt-button [label]=\"t('cancel')\" variant=\"outlined\" (onClick)=\"close()\" />\r\n <mt-button [label]=\"t('save')\" icon=\"general.save-02\" (onClick)=\"save()\" />\r\n </div>\r\n</div>\r\n" }]
6816
+ ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\n class=\"flex h-full min-h-0 flex-col\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n>\n <div\n class=\"flex-1 min-h-0 overflow-y-auto px-4 py-3\"\n [class]=\"modal.contentClass\"\n >\n <mt-dynamic-filters-config\n class=\"block\"\n [ngModel]=\"filtersConfig()\"\n (ngModelChange)=\"onFiltersChange($event)\"\n [workspaceId]=\"workspaceId()\"\n [chartWorkspace]=\"chartWorkspace()\"\n [lookups]=\"lookups()\"\n [levelsSchema]=\"levelsSchema()\"\n [levelLogs]=\"levelLogs()\"\n (loadLevelLogs)=\"onLoadLevelLogs($event)\"\n />\n </div>\n\n <div\n [class]=\"\n modal.footerClass +\n ' !h-auto !min-h-0 !justify-end !gap-2 !border-t !border-surface-200 !px-4 !py-3'\n \"\n >\n @if (incompleteField(); as incomplete) {\n <span class=\"me-auto text-sm text-amber-700\" role=\"alert\">{{\n t(\"filterFieldIncomplete_\" + incomplete.gap, {\n n: incomplete.position,\n })\n }}</span>\n }\n <mt-button [label]=\"t('cancel')\" variant=\"outlined\" (onClick)=\"close()\" />\n <mt-button\n [label]=\"t('save')\"\n icon=\"general.save-02\"\n [disabled]=\"!!incompleteField()\"\n (onClick)=\"save()\"\n />\n </div>\n</div>\n" }]
6673
6817
  }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], workspaceId: [{ type: i0.Input, args: [{ isSignal: true, alias: "workspaceId", required: false }] }], chartWorkspace: [{ type: i0.Input, args: [{ isSignal: true, alias: "chartWorkspace", required: false }] }], lookups: [{ type: i0.Input, args: [{ isSignal: true, alias: "lookups", required: false }] }], levelsSchema: [{ type: i0.Input, args: [{ isSignal: true, alias: "levelsSchema", required: false }] }] } });
6674
6818
 
6675
6819
  /**
@@ -15160,8 +15304,7 @@ function handleFilterForCard(filters, params) {
15160
15304
  function handleFilterForSnapshot(levelId, params) {
15161
15305
  return dynamicTextReplace(levelId, params);
15162
15306
  }
15163
- // Drawer operator -> BE FilterOperationEnum. The BE has no "is not empty",
15164
- // so IsNotNull conditions are not sent.
15307
+ // Drawer operator -> BE FilterOperationEnum (NotEmpty since BE v1.0.458).
15165
15308
  const BUILT_IN_CONDITION_OPERATIONS = {
15166
15309
  Equal: 'Equals',
15167
15310
  Equals: 'Equals',
@@ -15172,6 +15315,7 @@ const BUILT_IN_CONDITION_OPERATIONS = {
15172
15315
  OneOf: 'OneOf',
15173
15316
  Between: 'Between',
15174
15317
  IsNull: 'Empty',
15318
+ IsNotNull: 'NotEmpty',
15175
15319
  };
15176
15320
  function toBuiltInSelectionFilter(condition) {
15177
15321
  const propertyKey = condition?.propertyKey;
@@ -15184,7 +15328,7 @@ function toBuiltInSelectionFilter(condition) {
15184
15328
  const operation = BUILT_IN_CONDITION_OPERATIONS[condition.operation];
15185
15329
  if (!operation)
15186
15330
  return null;
15187
- if (operation === 'Empty') {
15331
+ if (operation === 'Empty' || operation === 'NotEmpty') {
15188
15332
  return { propertyKey, propertyValue: '', operation, logical: 'And' };
15189
15333
  }
15190
15334
  // FilterModel.PropertyValue is a string; One of / Between travel
@@ -15692,6 +15836,7 @@ class BarChartHandler {
15692
15836
  '',
15693
15837
  extraValues: bar.extraValues,
15694
15838
  groupValues: bar.groupValues,
15839
+ pointTooltip: bar.tooltip,
15695
15840
  };
15696
15841
  });
15697
15842
  let grayBarData = [];
@@ -15760,7 +15905,9 @@ class BarChartHandler {
15760
15905
  axisLine: {
15761
15906
  show: true,
15762
15907
  },
15763
- inverse: !isHorizontal && languageCode === 'ar',
15908
+ // A vertical category axis starts at the bottom: invert it so the
15909
+ // first category is on top, as Horizontal Stacked Bar does (#1829).
15910
+ inverse: isHorizontal || languageCode === 'ar',
15764
15911
  },
15765
15912
  [isHorizontal ? 'xAxis' : 'yAxis']: {
15766
15913
  type: 'value',
@@ -16107,6 +16254,7 @@ class BarChartHandler {
16107
16254
  title: category.label,
16108
16255
  extraValues: bar.extraValues,
16109
16256
  groupValues: bar.groupValues,
16257
+ pointTooltip: bar.tooltip,
16110
16258
  };
16111
16259
  });
16112
16260
  });
@@ -16162,6 +16310,8 @@ class BarChartHandler {
16162
16310
  fontSize: generalConfiguration?.fontConfig?.fontSizeConfig?.category,
16163
16311
  formatter: (value) => formatAxisLabel(this.formatXAxisValue(value, clientConfig?.['formatXAxis']), barOverride),
16164
16312
  },
16313
+ // First category on top, as in the single-series chart (#1829).
16314
+ inverse: isHorizontal,
16165
16315
  },
16166
16316
  [isHorizontal ? 'xAxis' : 'yAxis']: {
16167
16317
  type: 'value',
@@ -16265,6 +16415,7 @@ class BarChartHandler {
16265
16415
  rawValue: bar.value,
16266
16416
  extraValues: bar.extraValues,
16267
16417
  groupValues: bar.groupValues,
16418
+ pointTooltip: bar.tooltip,
16268
16419
  };
16269
16420
  });
16270
16421
  return { values };
@@ -16560,6 +16711,7 @@ class PieChartHandler {
16560
16711
  key: item.key,
16561
16712
  itemStyle,
16562
16713
  extraValues: item.extraValues,
16714
+ pointTooltip: item.tooltip,
16563
16715
  nomalizationKeys: extraDataMap.get(itemKey),
16564
16716
  };
16565
16717
  });
@@ -17512,6 +17664,8 @@ class StackBarChartHandler {
17512
17664
  sortedXAxisKeys.forEach((xAxisKey) => {
17513
17665
  let value = 0;
17514
17666
  let extraValues = {};
17667
+ // V2 stacks carry their Tooltip Properties per stack (#1842).
17668
+ let tooltip;
17515
17669
  if (formatType === 'dateToMonth' && groupedDataMap.has(xAxisKey)) {
17516
17670
  const originalKeys = groupedDataMap.get(xAxisKey);
17517
17671
  originalKeys.forEach((origKey) => {
@@ -17535,6 +17689,7 @@ class StackBarChartHandler {
17535
17689
  if (stackItem) {
17536
17690
  value = stackItem.value || 0;
17537
17691
  extraValues = stack.extraValues || {};
17692
+ tooltip = stackItem.tooltip;
17538
17693
  }
17539
17694
  }
17540
17695
  }
@@ -17604,6 +17759,7 @@ class StackBarChartHandler {
17604
17759
  borderRadius: [0, 0, 0, 0],
17605
17760
  },
17606
17761
  extraValues: extraValues,
17762
+ pointTooltip: tooltip,
17607
17763
  };
17608
17764
  seriesData.dataPoints.push(dataPoint);
17609
17765
  });
@@ -18482,6 +18638,7 @@ class GaugeChartHandler {
18482
18638
  },
18483
18639
  itemStyle: itemStyle,
18484
18640
  extraValues: item.extraValues,
18641
+ pointTooltip: item.tooltip,
18485
18642
  nomalizationKeys: extraDataMap.get(itemKey),
18486
18643
  };
18487
18644
  });
@@ -19694,6 +19851,18 @@ function toCalendarDay(value) {
19694
19851
  const pad = (n) => String(n).padStart(2, '0');
19695
19852
  return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;
19696
19853
  }
19854
+ /** `2026-07-01` → "Jul 2026" / "Q3 2026" / "2026" (Latin digits). */
19855
+ function periodLabel(day, grouping, lang) {
19856
+ const [year, month] = day.split('-').map(Number);
19857
+ if (!year || !month)
19858
+ return day;
19859
+ if (grouping === 'year')
19860
+ return String(year);
19861
+ if (grouping === 'quarter')
19862
+ return `Q${Math.ceil(month / 3)} ${year}`;
19863
+ const name = new Date(Date.UTC(year, month - 1, 1)).toLocaleString(lang === 'ar' ? 'ar-SA-u-nu-latn-ca-gregory' : 'en-US', { month: 'short', timeZone: 'UTC' });
19864
+ return `${name} ${year}`;
19865
+ }
19697
19866
  class LineChartHandler {
19698
19867
  storeService = inject(DashboardStoreService);
19699
19868
  /**
@@ -19837,6 +20006,7 @@ class LineChartHandler {
19837
20006
  category: label?.label || String(entry.key ?? ''),
19838
20007
  value: entry.value,
19839
20008
  color: label?.color,
20009
+ tooltip: entry.tooltip,
19840
20010
  };
19841
20011
  });
19842
20012
  // A date X-axis comes back in record order, some keys as plain dates and
@@ -19861,6 +20031,18 @@ class LineChartHandler {
19861
20031
  ordered.push(next);
19862
20032
  });
19863
20033
  points = ordered.sort((a, b) => a.category.localeCompare(b.category));
20034
+ // Month / quarter / year buckets arrive as their period's first day;
20035
+ // name the period instead ("Jul 2026", "Q3 2026", "2026").
20036
+ const grouping = config.serviceConfig?.query?.['dateGrouping'];
20037
+ if (grouping === 'month' ||
20038
+ grouping === 'quarter' ||
20039
+ grouping === 'year') {
20040
+ const lang = this.storeService.languageCode();
20041
+ points = points.map((point) => ({
20042
+ ...point,
20043
+ category: periodLabel(point.category, grouping, lang),
20044
+ }));
20045
+ }
19864
20046
  }
19865
20047
  return {
19866
20048
  categories: points.map((point) => point.category),
@@ -19869,8 +20051,12 @@ class LineChartHandler {
19869
20051
  name: config.clientConfig?.title?.['en'] ||
19870
20052
  config.serviceConfig?.query?.['yAxisProperty'] ||
19871
20053
  'Value',
19872
- data: points.map((point) => point.color
19873
- ? { value: point.value, itemStyle: { color: point.color } }
20054
+ data: points.map((point) => point.color || point.tooltip
20055
+ ? {
20056
+ value: point.value,
20057
+ ...(point.color ? { itemStyle: { color: point.color } } : {}),
20058
+ ...(point.tooltip ? { pointTooltip: point.tooltip } : {}),
20059
+ }
19874
20060
  : point.value),
19875
20061
  },
19876
20062
  ],
@@ -21646,7 +21832,11 @@ class MapChartHandler {
21646
21832
  const groupedRecords = new Map();
21647
21833
  // 2) Iterate over data.values
21648
21834
  const values = dataResponse?.values || [];
21649
- values.forEach((record) => {
21835
+ // Table/Map tooltips sit beside the rows: tooltips[i] is values[i]'s (#1842).
21836
+ const tooltips = Array.isArray(dataResponse?.tooltips)
21837
+ ? dataResponse.tooltips
21838
+ : [];
21839
+ values.forEach((record, recordIndex) => {
21650
21840
  const recordKeys = Object.keys(record);
21651
21841
  const locationKeyInRecord = recordKeys.find((k) => k.toLowerCase() === locationKeyConfig);
21652
21842
  if (!locationKeyInRecord)
@@ -21667,6 +21857,7 @@ class MapChartHandler {
21667
21857
  name: locationDisplay,
21668
21858
  value: [lon, lat, locationDisplay],
21669
21859
  extraValues: record,
21860
+ tooltip: tooltips[recordIndex],
21670
21861
  };
21671
21862
  // Insert into grouped map
21672
21863
  if (!groupedRecords.has(groupName)) {
@@ -21846,7 +22037,11 @@ class MapChartHandler {
21846
22037
  const groupedRecords = new Map();
21847
22038
  // 2) Iterate over data.values
21848
22039
  const values = dataResponse?.values || [];
21849
- values.forEach((record) => {
22040
+ // Table/Map tooltips sit beside the rows: tooltips[i] is values[i]'s (#1842).
22041
+ const tooltips = Array.isArray(dataResponse?.tooltips)
22042
+ ? dataResponse.tooltips
22043
+ : [];
22044
+ values.forEach((record, recordIndex) => {
21850
22045
  const recordKeys = Object.keys(record);
21851
22046
  const locationKeyInRecord = recordKeys.find((k) => k.toLowerCase() === locationKeyConfig);
21852
22047
  if (!locationKeyInRecord)
@@ -21873,6 +22068,7 @@ class MapChartHandler {
21873
22068
  lon: lon,
21874
22069
  color: '', // Will be assigned below
21875
22070
  extraValues: record,
22071
+ tooltip: tooltips[recordIndex],
21876
22072
  });
21877
22073
  });
21878
22074
  // 3) Build dynamic color assignment for each group
@@ -23668,6 +23864,11 @@ function compareOrder(left, right) {
23668
23864
  */
23669
23865
  class ChartDataService {
23670
23866
  http = inject(LimitedHttpService);
23867
+ /** The builder route also serves unpublished dashboards (#1838). */
23868
+ builderAccess = inject(DASHBOARD_REPORT_ACCESS) === 'builder';
23869
+ get chartRoute() {
23870
+ return this.builderAccess ? 'builder/chart' : `${this.apiVersion}chart`;
23871
+ }
23671
23872
  itemStore = inject(DashboardItemStoreService);
23672
23873
  // URL Configuration from localStorage
23673
23874
  urlPrefix = '';
@@ -23935,7 +24136,7 @@ class ChartDataService {
23935
24136
  return of({ data: [] });
23936
24137
  }
23937
24138
  const chartName = clientConfig?.['clientConfigs']?.[index]?.title?.['en']?.replace(/\s+/g, '') || 'chart';
23938
- const url = `${this.urlPrefix}dashboards/${this.apiVersion}chart?name=${chartName}`;
24139
+ const url = `${this.urlPrefix}dashboards/${this.chartRoute}?name=${chartName}`;
23939
24140
  const isAlreadySubstituted = svcConfig?.__substituted === true;
23940
24141
  const substituted = isAlreadySubstituted
23941
24142
  ? stripRuntimeFlags(svcConfig)
@@ -23949,7 +24150,7 @@ class ChartDataService {
23949
24150
  }
23950
24151
  // Single chart case
23951
24152
  const chartName = clientConfig?.title?.['en']?.replace(/\s+/g, '') || 'chart';
23952
- const url = `${this.urlPrefix}dashboards/${this.apiVersion}chart?name=${chartName}`;
24153
+ const url = `${this.urlPrefix}dashboards/${this.chartRoute}?name=${chartName}`;
23953
24154
  // Repeater runtime expansion has already substituted placeholders for
23954
24155
  // cloned charts; skip the second substitution pass so duplicates are
23955
24156
  // not introduced and the runtime flag is stripped before sending.
@@ -24778,7 +24979,7 @@ class ActionService {
24778
24979
  // "Dialog header"), not from the chart that opened it.
24779
24980
  const header = resolveDashboardDialogHeader(dialogConfig);
24780
24981
  // Dynamically import DashboardDialogComponent to avoid circular dependency
24781
- import('./masterteam-dashboard-builder-dashboard-dialog.component-Ca_IZwLQ.mjs').then(({ DashboardDialogComponent }) => {
24982
+ import('./masterteam-dashboard-builder-dashboard-dialog.component-Dl52iuec.mjs').then(({ DashboardDialogComponent }) => {
24782
24983
  // Open dialog using ModalService
24783
24984
  this.modalService.openModal(DashboardDialogComponent, 'dialog', {
24784
24985
  header: header.title,
@@ -27422,6 +27623,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
27422
27623
  `, 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"] }]
27423
27624
  }], propDecorators: { cardInfo: [{ type: i0.Input, args: [{ isSignal: true, alias: "cardInfo", required: false }] }] } });
27424
27625
 
27626
+ const escapeHtml = (value) => String(value ?? '')
27627
+ .replace(/&/g, '&amp;')
27628
+ .replace(/</g, '&lt;')
27629
+ .replace(/>/g, '&gt;')
27630
+ .replace(/"/g, '&quot;');
27631
+ function hasPointTooltip(tooltip) {
27632
+ return (!!tooltip &&
27633
+ typeof tooltip === 'object' &&
27634
+ Array.isArray(tooltip.records) &&
27635
+ tooltip.records.length > 0);
27636
+ }
27637
+ /**
27638
+ * One line per record: "Label: value · Label: value". A single record (a map
27639
+ * pin) gets one line per field instead.
27640
+ */
27641
+ function pointTooltipHtml(tooltip, moreLabel) {
27642
+ if (!hasPointTooltip(tooltip))
27643
+ return '';
27644
+ const records = tooltip.records ?? [];
27645
+ const field = (f) => `${escapeHtml(f.label || f.key)}: ${escapeHtml(f.displayValue ?? f.value ?? '–')}`;
27646
+ const lines = records.length === 1
27647
+ ? (records[0].fields ?? []).map(field)
27648
+ : records.map((record) => (record.fields ?? []).map(field).join(' · '));
27649
+ const remaining = Number(tooltip.remainingCount) || 0;
27650
+ if (remaining > 0)
27651
+ lines.push(escapeHtml(moreLabel(remaining)));
27652
+ return `<div style="margin-top:6px;padding-top:6px;border-top:1px solid rgba(128,128,128,.25);font-size:12px;line-height:1.5">${lines.join('<br/>')}</div>`;
27653
+ }
27654
+
27425
27655
  /**
27426
27656
  * EChart Component
27427
27657
  *
@@ -27902,7 +28132,7 @@ class EChartComponent {
27902
28132
  return this.chart;
27903
28133
  }
27904
28134
  applyResponsiveOptions(option, bounds) {
27905
- const next = this.applyLegendColorOverrides(this.applyLegendOverrideOrder({ ...option }));
28135
+ const next = this.withTooltipProperties(this.applyLegendColorOverrides(this.applyLegendOverrideOrder({ ...option })));
27906
28136
  // If the user enabled "Show Legend" but the handler emitted no legend
27907
28137
  // object, seed one so the configured position + icon are honored. Charts
27908
28138
  // that render the custom HTML legend are positioned separately.
@@ -28071,7 +28301,8 @@ class EChartComponent {
28071
28301
  // each to its cell, which only the real width and height can tell.
28072
28302
  const dials = mapped.filter((series) => series?.type === 'gauge' && Array.isArray(series.center));
28073
28303
  if (dials.length > 1) {
28074
- const columns = new Set(dials.map((s) => String(s.center[0]))).size;
28304
+ const columns = new Set(dials.map((s) => String(s.center[0])))
28305
+ .size;
28075
28306
  const rows = new Set(dials.map((s) => String(s.center[1]))).size;
28076
28307
  const radius = Math.floor((Math.min(width / columns, height / rows) / 2) * 0.82);
28077
28308
  dials.forEach((series) => (series.radius = Math.max(24, radius)));
@@ -28172,7 +28403,9 @@ class EChartComponent {
28172
28403
  : legend.position === 'right'
28173
28404
  ? { right: 8 }
28174
28405
  : { left: 'center' }),
28175
- ...(top ? { top: offset - rowHeight / 2 } : { bottom: offset - rowHeight / 2 }),
28406
+ ...(top
28407
+ ? { top: offset - rowHeight / 2 }
28408
+ : { bottom: offset - rowHeight / 2 }),
28176
28409
  };
28177
28410
  });
28178
28411
  const kept = (Array.isArray(option.graphic) ? option.graphic : []).filter((item) => !String(item?.id ?? '').startsWith('ring-legend-'));
@@ -28746,6 +28979,46 @@ class EChartComponent {
28746
28979
  normalizeLegendName(name) {
28747
28980
  return name.trim().toLowerCase().replace(/\s+/g, ' ');
28748
28981
  }
28982
+ /**
28983
+ * Tooltip Properties (#1842): when a point carries the backend's `tooltip`
28984
+ * (its first records and "+N more"), add those lines under whatever the
28985
+ * chart's own tooltip shows. Charts without them keep their tooltip as is.
28986
+ */
28987
+ withTooltipProperties(option) {
28988
+ const seriesList = Array.isArray(option?.series)
28989
+ ? option.series
28990
+ : option?.series
28991
+ ? [option.series]
28992
+ : [];
28993
+ const carries = seriesList.some((series) => Array.isArray(series?.data) &&
28994
+ series.data.some((point) => hasPointTooltip(point?.pointTooltip)));
28995
+ if (!carries)
28996
+ return option;
28997
+ const base = option.tooltip ?? { trigger: 'item' };
28998
+ const original = base.formatter;
28999
+ const lang = this.languageCode();
29000
+ const more = (n) => (lang === 'ar' ? `+${n} أخرى` : `+${n} more`);
29001
+ const extra = (params) => (Array.isArray(params) ? params : [params])
29002
+ .map((p) => pointTooltipHtml(p?.data?.pointTooltip, more))
29003
+ .join('');
29004
+ return {
29005
+ ...option,
29006
+ tooltip: {
29007
+ ...base,
29008
+ show: true,
29009
+ formatter: (params, ...rest) => {
29010
+ const head = typeof original === 'function'
29011
+ ? original(params, ...rest)
29012
+ : Array.isArray(params)
29013
+ ? params
29014
+ .map((p) => `${p.marker ?? ''}${p.name}: ${p.value}`)
29015
+ .join('<br/>')
29016
+ : `${params?.marker ?? ''}${params?.name ?? ''}: ${params?.value ?? ''}`;
29017
+ return `${head ?? ''}${extra(params)}`;
29018
+ },
29019
+ },
29020
+ };
29021
+ }
28749
29022
  applyLegendOverrideOrder(option) {
28750
29023
  const overrideOrder = getLegendOverrideOrder(this.configurationItem());
28751
29024
  if (!overrideOrder.length)
@@ -28827,104 +29100,104 @@ class EChartComponent {
28827
29100
  return Array.isArray(firstSeries?.data) ? firstSeries.data.length : 0;
28828
29101
  }
28829
29102
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
28830
- 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: `
28831
- <div
28832
- [class]="containerClass()"
28833
- [class.in-group-with-header]="inGroup() && !headerHidden()"
28834
- [class.with-custom-legend]="
28835
- showCustomLegend() && legendItems().length > 0
28836
- "
28837
- [attr.dir]="languageCode() === 'ar' ? 'rtl' : 'ltr'"
28838
- >
28839
- <div
28840
- #chartContainer
28841
- [id]="'chart-' + dashboardId()"
28842
- [class]="chartClass()"
28843
- [style.minWidth]="chartWidth()"
28844
- [style.height]="height()"
28845
- ></div>
28846
- </div>
28847
-
28848
- <!-- Custom Legend (like old component) -->
28849
- @if (showCustomLegend() && legendItems().length > 0) {
28850
- <div
28851
- class="custom-legend"
28852
- [class.custom-legend--top]="customLegendPosition() === 'top'"
28853
- [class.custom-legend--left]="customLegendPosition() === 'left'"
28854
- [class.custom-legend--right]="customLegendPosition() === 'right'"
28855
- [class.has-scroll]="hasScrollClass()"
28856
- [attr.dir]="'ltr'"
28857
- >
28858
- @for (item of legendItems(); track item.name) {
28859
- <div
28860
- class="legend-item"
28861
- [class.disabled]="item.disabled"
28862
- (click)="toggleLegendItem(item)"
28863
- [title]="item.name"
28864
- >
28865
- <span
28866
- class="legend-icon"
28867
- [style.background-color]="item.color"
28868
- [style.width]="customLegendIconIsRect() ? '26px' : null"
28869
- [style.height]="customLegendIconIsRect() ? '14px' : null"
28870
- [style.border-radius]="customLegendIconIsRect() ? '2px' : '50%'"
28871
- ></span>
28872
- <span class="legend-text">{{ item.name }}</span>
28873
- </div>
28874
- }
28875
- </div>
28876
- }
29103
+ 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: `
29104
+ <div
29105
+ [class]="containerClass()"
29106
+ [class.in-group-with-header]="inGroup() && !headerHidden()"
29107
+ [class.with-custom-legend]="
29108
+ showCustomLegend() && legendItems().length > 0
29109
+ "
29110
+ [attr.dir]="languageCode() === 'ar' ? 'rtl' : 'ltr'"
29111
+ >
29112
+ <div
29113
+ #chartContainer
29114
+ [id]="'chart-' + dashboardId()"
29115
+ [class]="chartClass()"
29116
+ [style.minWidth]="chartWidth()"
29117
+ [style.height]="height()"
29118
+ ></div>
29119
+ </div>
29120
+
29121
+ <!-- Custom Legend (like old component) -->
29122
+ @if (showCustomLegend() && legendItems().length > 0) {
29123
+ <div
29124
+ class="custom-legend"
29125
+ [class.custom-legend--top]="customLegendPosition() === 'top'"
29126
+ [class.custom-legend--left]="customLegendPosition() === 'left'"
29127
+ [class.custom-legend--right]="customLegendPosition() === 'right'"
29128
+ [class.has-scroll]="hasScrollClass()"
29129
+ [attr.dir]="'ltr'"
29130
+ >
29131
+ @for (item of legendItems(); track item.name) {
29132
+ <div
29133
+ class="legend-item"
29134
+ [class.disabled]="item.disabled"
29135
+ (click)="toggleLegendItem(item)"
29136
+ [title]="item.name"
29137
+ >
29138
+ <span
29139
+ class="legend-icon"
29140
+ [style.background-color]="item.color"
29141
+ [style.width]="customLegendIconIsRect() ? '26px' : null"
29142
+ [style.height]="customLegendIconIsRect() ? '14px' : null"
29143
+ [style.border-radius]="customLegendIconIsRect() ? '2px' : '50%'"
29144
+ ></span>
29145
+ <span class="legend-text">{{ item.name }}</span>
29146
+ </div>
29147
+ }
29148
+ </div>
29149
+ }
28877
29150
  `, isInline: true, 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"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
28878
29151
  }
28879
29152
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EChartComponent, decorators: [{
28880
29153
  type: Component,
28881
- args: [{ selector: 'mt-echart', standalone: true, imports: [CommonModule], template: `
28882
- <div
28883
- [class]="containerClass()"
28884
- [class.in-group-with-header]="inGroup() && !headerHidden()"
28885
- [class.with-custom-legend]="
28886
- showCustomLegend() && legendItems().length > 0
28887
- "
28888
- [attr.dir]="languageCode() === 'ar' ? 'rtl' : 'ltr'"
28889
- >
28890
- <div
28891
- #chartContainer
28892
- [id]="'chart-' + dashboardId()"
28893
- [class]="chartClass()"
28894
- [style.minWidth]="chartWidth()"
28895
- [style.height]="height()"
28896
- ></div>
28897
- </div>
28898
-
28899
- <!-- Custom Legend (like old component) -->
28900
- @if (showCustomLegend() && legendItems().length > 0) {
28901
- <div
28902
- class="custom-legend"
28903
- [class.custom-legend--top]="customLegendPosition() === 'top'"
28904
- [class.custom-legend--left]="customLegendPosition() === 'left'"
28905
- [class.custom-legend--right]="customLegendPosition() === 'right'"
28906
- [class.has-scroll]="hasScrollClass()"
28907
- [attr.dir]="'ltr'"
28908
- >
28909
- @for (item of legendItems(); track item.name) {
28910
- <div
28911
- class="legend-item"
28912
- [class.disabled]="item.disabled"
28913
- (click)="toggleLegendItem(item)"
28914
- [title]="item.name"
28915
- >
28916
- <span
28917
- class="legend-icon"
28918
- [style.background-color]="item.color"
28919
- [style.width]="customLegendIconIsRect() ? '26px' : null"
28920
- [style.height]="customLegendIconIsRect() ? '14px' : null"
28921
- [style.border-radius]="customLegendIconIsRect() ? '2px' : '50%'"
28922
- ></span>
28923
- <span class="legend-text">{{ item.name }}</span>
28924
- </div>
28925
- }
28926
- </div>
28927
- }
29154
+ args: [{ selector: 'mt-echart', standalone: true, imports: [CommonModule], template: `
29155
+ <div
29156
+ [class]="containerClass()"
29157
+ [class.in-group-with-header]="inGroup() && !headerHidden()"
29158
+ [class.with-custom-legend]="
29159
+ showCustomLegend() && legendItems().length > 0
29160
+ "
29161
+ [attr.dir]="languageCode() === 'ar' ? 'rtl' : 'ltr'"
29162
+ >
29163
+ <div
29164
+ #chartContainer
29165
+ [id]="'chart-' + dashboardId()"
29166
+ [class]="chartClass()"
29167
+ [style.minWidth]="chartWidth()"
29168
+ [style.height]="height()"
29169
+ ></div>
29170
+ </div>
29171
+
29172
+ <!-- Custom Legend (like old component) -->
29173
+ @if (showCustomLegend() && legendItems().length > 0) {
29174
+ <div
29175
+ class="custom-legend"
29176
+ [class.custom-legend--top]="customLegendPosition() === 'top'"
29177
+ [class.custom-legend--left]="customLegendPosition() === 'left'"
29178
+ [class.custom-legend--right]="customLegendPosition() === 'right'"
29179
+ [class.has-scroll]="hasScrollClass()"
29180
+ [attr.dir]="'ltr'"
29181
+ >
29182
+ @for (item of legendItems(); track item.name) {
29183
+ <div
29184
+ class="legend-item"
29185
+ [class.disabled]="item.disabled"
29186
+ (click)="toggleLegendItem(item)"
29187
+ [title]="item.name"
29188
+ >
29189
+ <span
29190
+ class="legend-icon"
29191
+ [style.background-color]="item.color"
29192
+ [style.width]="customLegendIconIsRect() ? '26px' : null"
29193
+ [style.height]="customLegendIconIsRect() ? '14px' : null"
29194
+ [style.border-radius]="customLegendIconIsRect() ? '2px' : '50%'"
29195
+ ></span>
29196
+ <span class="legend-text">{{ item.name }}</span>
29197
+ </div>
29198
+ }
29199
+ </div>
29200
+ }
28928
29201
  `, 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"] }]
28929
29202
  }], 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"] }] } });
28930
29203
 
@@ -29049,6 +29322,7 @@ function buildMapChartOption(groups, region, legend, font = {}) {
29049
29322
  // ECharts geo wants [lon, lat]; the third slot rides along for tooltips.
29050
29323
  value: [Number(point.lon), Number(point.lat), point.displayName || ''],
29051
29324
  extraValues: point.extraValues,
29325
+ pointTooltip: point.tooltip,
29052
29326
  })),
29053
29327
  label: {
29054
29328
  show: true,
@@ -29076,9 +29350,12 @@ function buildMapChartOption(groups, region, legend, font = {}) {
29076
29350
  return {
29077
29351
  tooltip: {
29078
29352
  trigger: 'item',
29079
- formatter: (params) => params?.seriesName
29353
+ // A pin's Tooltip Properties follow its name (#1842). A pin is one
29354
+ // record, so "+N more" practically never shows here.
29355
+ formatter: (params) => (params?.seriesName
29080
29356
  ? `${params.name}<br/>${params.seriesName}`
29081
- : (params?.name ?? ''),
29357
+ : (params?.name ?? '')) +
29358
+ pointTooltipHtml(params?.data?.pointTooltip, (n) => `+${n} more`),
29082
29359
  },
29083
29360
  geo: {
29084
29361
  map: region.echartsName,
@@ -29090,8 +29367,11 @@ function buildMapChartOption(groups, region, legend, font = {}) {
29090
29367
  // The boundaries are backdrop only. Interactive regions took the hover
29091
29368
  // and click away from the pins drawn over them (no pin tooltip, no click
29092
29369
  // dialog) and printed their own region name on top of the pin labels.
29370
+ // No `tooltip: { show: false }` here: a pin builds its tooltip from
29371
+ // item, series, then its coordinate system (this geo), so that hid
29372
+ // every pin's tooltip as well (#1847). `silent` already keeps the
29373
+ // regions quiet.
29093
29374
  silent: true,
29094
- tooltip: { show: false },
29095
29375
  itemStyle: {
29096
29376
  areaColor: '#f5f5f5',
29097
29377
  borderColor: '#ccc',
@@ -30317,7 +30597,7 @@ class ChartCardComponent {
30317
30597
  '');
30318
30598
  }
30319
30599
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
30320
- 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 [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)]] });
30600
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ChartCardComponent, isStandalone: true, selector: "mt-chart-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null }, reportId: { classPropertyName: "reportId", publicName: "reportId", isSignal: true, isRequired: false, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null }, isConfigMode: { classPropertyName: "isConfigMode", publicName: "isConfigMode", isSignal: true, isRequired: false, transformFunction: null }, titleEditable: { classPropertyName: "titleEditable", publicName: "titleEditable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction", onConfigure: "onConfigure", onTitleChange: "onTitleChange" }, ngImport: i0, template: "<ng-template #timelineLegendList>\n <div\n class=\"dashboard-timeline-legend\"\n [attr.data-position]=\"timelineLegendPosition()\"\n >\n @for (label of timelineLabels(); track $index) {\n <span\n class=\"dashboard-timeline-legend-item\"\n [title]=\"label.label || label.name || label.key\"\n >\n <span\n class=\"dashboard-timeline-legend-marker\"\n [class.shape-rect]=\"label.shape === 'rect'\"\n [class.shape-roundRect]=\"label.shape === 'roundRect'\"\n [class.shape-diamond]=\"label.shape === 'diamond'\"\n [class.shape-triangle]=\"label.shape === 'triangle'\"\n [style.background]=\"\n label.shape === 'triangle' ? null : label.color || '#64748b'\n \"\n [style.border-bottom-color]=\"\n label.shape === 'triangle' ? label.color || '#64748b' : null\n \"\n ></span>\n <span class=\"dashboard-timeline-legend-label\">\n {{ label.label || label.name || label.key }}\n </span>\n </span>\n }\n </div>\n</ng-template>\n\n<mt-card-content\n [inGroup]=\"inGroup()\"\n [headerConfig]=\"\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\n \"\n [styleConfig]=\"\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\n \"\n [cardStyleConfig]=\"\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\n \"\n [density]=\"configurationItem()?.clientConfig?.configAsType?.['density']\"\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\n [title]=\"title()\"\n [titleEditable]=\"titleEditable()\"\n (titleChange)=\"onTitleChange.emit($event)\"\n [isNoTopEnd]=\"!showTopEnd()\"\n [isChart]=\"true\"\n (headerClick)=\"onHeaderClick()\"\n>\n <ng-container topEnd>\n @if (showStaticFilters()) {\n <mt-static-filters\n [config]=\"staticFilterConfig()\"\n [dashboardId]=\"dashboardId()\"\n >\n </mt-static-filters>\n }\n @if (showDynamicFilters()) {\n <mt-dynamic-filters\n [fields]=\"dynamicFilterFields()\"\n [dashboardId]=\"dashboardId()\"\n [reportId]=\"reportId()\"\n [showLabels]=\"false\"\n >\n </mt-dynamic-filters>\n }\n @if (showFilter()) {\n <mt-card-filter [config]=\"filterConfig()\" [dashboardId]=\"dashboardId()\">\n </mt-card-filter>\n }\n @if (cardInfoConfig()?.show && cardInfoConfig()?.value) {\n <mt-card-info [cardInfo]=\"cardInfoConfig()\"></mt-card-info>\n }\n </ng-container>\n\n <ng-container body>\n <div\n class=\"chart-container\"\n [class.config-mode]=\"isConfigMode()\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n >\n @if (componentViewMode() === \"splitter\" && hasSplitterData()) {\n <div\n class=\"splitter-view\"\n [class.splitter-vertical]=\"splitterOrientation() === 'vertical'\"\n [style.gap.px]=\"splitterGap()\"\n >\n <div class=\"splitter-side splitter-positive\">\n <div class=\"splitter-count\">\n {{ dataHandled()?.positive?.groupedValue ?? 0 }}\n </div>\n <ul class=\"splitter-labels\">\n @for (\n label of dataHandled()?.positive?.labels || [];\n track $index\n ) {\n <li>{{ label }}</li>\n }\n </ul>\n </div>\n <div class=\"splitter-divider\"></div>\n <div class=\"splitter-side splitter-negative\">\n <div class=\"splitter-count\">\n {{ dataHandled()?.negative?.groupedValue ?? 0 }}\n </div>\n <ul class=\"splitter-labels\">\n @for (\n label of dataHandled()?.negative?.labels || [];\n track $index\n ) {\n <li>{{ label }}</li>\n }\n </ul>\n </div>\n </div>\n } @else if (componentViewMode() === \"timeline\" && hasTimelineData()) {\n <div\n class=\"dashboard-timeline-view\"\n [attr.data-legend-position]=\"timelineLegendPosition()\"\n [style.--timeline-header-bg]=\"timelineHeaderBgColor()\"\n [style.--timeline-header-color]=\"timelineHeaderTextColor()\"\n >\n @if (\n timelineLegendShow() &&\n timelineLabels().length &&\n (timelineLegendPosition() === \"top\" ||\n timelineLegendPosition() === \"left\")\n ) {\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\n }\n\n @defer (on viewport) {\n <mt-timeline\n class=\"dashboard-timeline-renderer\"\n [showHeader]=\"false\"\n [showZoomToFitControl]=\"false\"\n [scrollToToday]=\"true\"\n [timelineMode]=\"timelineMode()\"\n (timelineModeChange)=\"timelineMode.set($event)\"\n [ganttData]=\"timelineResources()\"\n [ganttMapping]=\"timelineGanttMapping\"\n [columns]=\"timelineColumns()\"\n [defaultVisibleColumns]=\"2\"\n [columnsPaneMinWidthPx]=\"220\"\n [columnsPaneMaxWidthPx]=\"520\"\n [enableVirtualScroll]=\"true\"\n [virtualScrollThreshold]=\"0\"\n [virtualScrollBodyHeightPx]=\"520\"\n [showGanttDetailsPopup]=\"true\"\n [emptyMessage]=\"t('noChartData')\"\n >\n <ng-template\n mtTimelineColumn=\"title\"\n let-item=\"item\"\n let-resolved=\"resolved\"\n let-canToggle=\"canToggle\"\n let-isCollapsed=\"isCollapsed\"\n let-toggle=\"toggle\"\n >\n <div\n class=\"dashboard-timeline-title-cell\"\n [style.padding-inline-start.px]=\"\n $any(resolved).levelDepth * 16\n \"\n >\n @if (canToggle) {\n <mt-icon\n class=\"dashboard-timeline-title-toggle\"\n [icon]=\"timelineCollapseIcon(isCollapsed)\"\n (click)=\"$event.stopPropagation(); toggle()\"\n ></mt-icon>\n } @else {\n <span class=\"dashboard-timeline-title-spacer\"></span>\n }\n\n <button\n type=\"button\"\n class=\"dashboard-timeline-title-action\"\n [title]=\"$any(resolved).title\"\n (click)=\"onTimelineTitleClick(item, $event)\"\n >\n {{ $any(resolved).title }}\n </button>\n </div>\n </ng-template>\n\n @for (column of timelineEntityColumns(); track column.key) {\n <ng-template [mtTimelineColumn]=\"column.key\" let-value=\"value\">\n <mt-entity-preview\n class=\"dashboard-timeline-column-entity\"\n [data]=\"timelineColumnEntityData(value)\"\n attachmentShape=\"compact\"\n ></mt-entity-preview>\n </ng-template>\n }\n\n <ng-template mtTimelinePopover let-item=\"item\">\n @if (timelinePopoverEntities(item); as entities) {\n @if (entities.length) {\n <div\n class=\"w-[27rem] max-w-[90vw] max-h-[24rem] overflow-auto p-2\"\n >\n <mt-entities-preview\n [entities]=\"entities\"\n [stackOnNarrow]=\"false\"\n />\n </div>\n }\n }\n </ng-template>\n </mt-timeline>\n } @placeholder {\n <div class=\"dashboard-timeline-placeholder\" aria-hidden=\"true\">\n <div></div>\n <div></div>\n <div></div>\n </div>\n }\n\n @if (\n timelineLegendShow() &&\n timelineLabels().length &&\n (timelineLegendPosition() === \"bottom\" ||\n timelineLegendPosition() === \"right\")\n ) {\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\n }\n </div>\n } @else if (\n componentViewMode() === \"phaseGateStepper\" && phaseGateRecordCount() > 1\n ) {\n <div class=\"no-data-container\">\n <i class=\"pi pi-info-circle\"></i>\n <span>{{\n t(\"phaseGateStepperMultipleRecords\", {\n count: phaseGateRecordCount(),\n })\n }}</span>\n </div>\n } @else if (\n componentViewMode() === \"phaseGateStepper\" && hasPhaseGateData()\n ) {\n <div\n class=\"phase-gate-view\"\n [class.phase-gate-compact]=\"phaseGateCompact()\"\n >\n <ol class=\"phase-steps\">\n @for (step of phaseGateSteps(); track $index) {\n <li\n class=\"phase-step\"\n [class.is-current]=\"step.isCurrent\"\n [class.is-done]=\"step.isCompleted\"\n >\n <span class=\"phase-step-number\">{{ $index + 1 }}</span>\n @if (phaseGateShowLabels()) {\n <span class=\"phase-step-name\">{{\n step.name || t(\"phase\")\n }}</span>\n }\n </li>\n }\n </ol>\n </div>\n } @else if (\n componentViewMode() === \"performanceGauge\" &&\n dataHandled() &&\n !dataHandled()?.noData\n ) {\n @let gauge = performanceGauge();\n <div\n class=\"dashboard-performance-gauge\"\n [class.is-clickable]=\"hasActions()\"\n [style.--dashboard-performance-status-color]=\"gauge.status.color\"\n (click)=\"onPerformanceGaugeClick($event)\"\n >\n <div\n class=\"dashboard-performance-gauge__figure\"\n [style.width.%]=\"gauge.scalePercent\"\n >\n <svg\n class=\"dashboard-performance-gauge__svg\"\n viewBox=\"0 0 100 72\"\n role=\"img\"\n [attr.aria-label]=\"gauge.label + ' ' + gauge.display\"\n >\n <path\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\n fill=\"none\"\n stroke=\"#e5e7eb\"\n stroke-width=\"6\"\n stroke-linecap=\"round\"\n pathLength=\"100\"\n ></path>\n\n @for (segment of performanceGaugeSegments(); track segment.key) {\n <path\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\n fill=\"none\"\n [attr.stroke]=\"segment.color\"\n stroke-width=\"6\"\n stroke-linecap=\"round\"\n pathLength=\"100\"\n [attr.stroke-dasharray]=\"segment.dashArray\"\n [attr.stroke-dashoffset]=\"segment.dashOffset\"\n [style.opacity]=\"segment.opacity\"\n ></path>\n <text\n [attr.x]=\"segment.labelX\"\n [attr.y]=\"segment.labelY\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n font-size=\"5.5\"\n font-weight=\"700\"\n fill=\"#334155\"\n >\n {{ segment.label }}\n </text>\n }\n\n <circle\n [attr.cx]=\"gauge.marker.x\"\n [attr.cy]=\"gauge.marker.y\"\n r=\"4.5\"\n fill=\"#fff\"\n [attr.stroke]=\"gauge.status.color\"\n stroke-width=\"3\"\n ></circle>\n </svg>\n\n <div class=\"dashboard-performance-gauge__center\">\n <div class=\"dashboard-performance-gauge__value\">\n {{ gauge.display }}\n </div>\n <div class=\"dashboard-performance-gauge__label\">\n {{ gauge.label }}\n </div>\n </div>\n </div>\n\n <div\n class=\"dashboard-performance-gauge__status\"\n [title]=\"performanceGaugeStatusName()\"\n >\n <span class=\"dashboard-performance-gauge__status-dot\"></span>\n <span class=\"dashboard-performance-gauge__status-text\">\n {{ performanceGaugeStatusName() }}\n </span>\n </div>\n </div>\n } @else if (componentViewMode() === \"map\" && dataHandled()) {\n <mt-map-view\n [dashboardId]=\"dashboardId()\"\n [configurationItem]=\"configurationItem()\"\n [inGroup]=\"inGroup()\"\n [groups]=\"mapGroups()\"\n [config]=\"mapViewConfig()\"\n [showLegend]=\"mapLegendShow()\"\n [legendPosition]=\"mapLegendPosition()\"\n [legendIcon]=\"mapLegendIcon()\"\n (pointClick)=\"onMapPointClick($event)\"\n />\n } @else if (dataHandled() && !dataHandled()?.noData) {\n <mt-echart\n [dashboardId]=\"dashboardId()\"\n [chartConfig]=\"dataHandled()\"\n [configurationItem]=\"configurationItem()\"\n [inGroup]=\"inGroup()\"\n (chartClick)=\"onChartClick($event)\"\n >\n </mt-echart>\n } @else if (dataHandled()?.noData) {\n <div class=\"no-data-container\">\n <i class=\"pi pi-info-circle\"></i>\n <span>{{ t(\"noChartData\") }}</span>\n </div>\n } @else {\n <div class=\"loading-container\">\n <div class=\"loading-spinner\"></div>\n </div>\n }\n </div>\n </ng-container>\n</mt-card-content>\n", styles: [":host{display:block;height:100%}.chart-container{height:100%;min-height:0}.chart-container.config-mode{min-height:400px}.no-data-container,.needs-config-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:0;color:#999;gap:.5rem;padding:1rem;text-align:center}.no-data-container i,.needs-config-container i{font-size:2rem}.needs-config-container .title{font-weight:600;color:#555;font-size:.95rem}.needs-config-container .hint{font-size:.8rem;max-width:28rem;line-height:1.4}.needs-config-container .configure-btn{margin-top:.5rem;display:inline-flex;align-items:center;gap:.4rem;padding:.4rem .9rem;font-size:.85rem;font-weight:600;color:#fff;background:var(--p-primary-500, #2563eb);border:0;border-radius:.375rem;cursor:pointer;box-shadow:0 1px 2px #0000000d}.needs-config-container .configure-btn:hover{background:var(--p-primary-600, #1d4ed8)}.loading-container{display:flex;align-items:center;justify-content:center;height:100%;min-height:0}.loading-spinner{width:2rem;height:2rem;border:3px solid #f0f0f0;border-top-color:#4caf50;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.splitter-view{display:flex;align-items:stretch;height:100%;gap:.5rem}.splitter-view.splitter-vertical{flex-direction:column}.splitter-view.splitter-vertical .splitter-divider{width:auto;height:1px}.splitter-side{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:1rem;border-radius:.5rem}.splitter-positive{background:#22c55e14}.splitter-negative{background:#ef444414}.splitter-count{font-size:2rem;font-weight:700;margin-bottom:.5rem}.splitter-positive .splitter-count{color:#16a34a}.splitter-negative .splitter-count{color:#dc2626}.splitter-labels{list-style:none;padding:0;margin:0;text-align:center;font-size:.8rem;color:#555}.splitter-labels li{padding:.15rem 0}.splitter-divider{width:1px;background:#00000014}.dashboard-timeline-view{display:flex;flex-direction:column;gap:.625rem;height:100%;min-height:0;overflow:auto}.dashboard-timeline-view[data-legend-position=left],.dashboard-timeline-view[data-legend-position=right]{flex-direction:row;overflow:hidden}.dashboard-timeline-legend{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.35rem .75rem;flex-shrink:0;min-width:0;max-width:100%}.dashboard-timeline-legend[data-position=left],.dashboard-timeline-legend[data-position=right]{max-width:12rem;max-height:100%;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;overflow:auto}.dashboard-timeline-legend-item{display:inline-flex;align-items:center;gap:.25rem;max-width:12rem;padding:0;border:0;border-radius:0;font-size:.75rem;color:#475569;font-weight:500;line-height:1.2;background:transparent}.dashboard-timeline-legend-marker{display:inline-block;width:.625rem;height:.625rem;flex:0 0 auto;border-radius:999px}.dashboard-timeline-legend-marker.shape-rect{border-radius:0}.dashboard-timeline-legend-marker.shape-roundRect{border-radius:.2rem}.dashboard-timeline-legend-marker.shape-diamond{border-radius:.0625rem;transform:rotate(45deg)}.dashboard-timeline-legend-marker.shape-triangle{width:0;height:0;background:transparent!important;border-radius:0;border-left:.34rem solid transparent;border-right:.34rem solid transparent;border-bottom-width:.6rem;border-bottom-style:solid}.dashboard-timeline-legend-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-renderer{display:block;min-height:0;flex:1}.dashboard-timeline-placeholder{display:flex;min-height:260px;flex:1;flex-direction:column;gap:.75rem;padding:1rem}.dashboard-timeline-placeholder div{height:3rem;border-radius:.5rem;background:var(--p-surface-100);animation:dashboard-builder-pulse 1.2s ease-in-out infinite}@keyframes dashboard-builder-pulse{0%,to{opacity:.55}50%{opacity:1}}:host ::ng-deep .dashboard-timeline-renderer>div{margin-top:0}:host ::ng-deep .dashboard-timeline-view mt-timeline-gantt-header .bg-surface-50{background-color:var(--timeline-header-bg, var(--p-surface-50));color:var(--timeline-header-color, inherit)}.dashboard-timeline-column-entity{display:block;min-width:0}.dashboard-timeline-title-cell{display:flex;min-width:0;align-items:center;gap:.5rem;width:100%}.dashboard-timeline-title-toggle{flex:0 0 auto;cursor:pointer;color:#64748b}.dashboard-timeline-title-spacer{display:inline-block;width:1.25rem;flex:0 0 1.25rem}.dashboard-timeline-title-action{min-width:0;flex:1 1 auto;overflow:hidden;border:0;background:transparent;padding:0;color:#334155;cursor:pointer;font-size:.875rem;font-weight:600;text-align:start;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-title-action:hover{color:var(--p-primary-600, #2563eb);text-decoration:underline}.phase-gate-view{height:100%;display:flex;align-items:center;justify-content: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)]] });
30321
30601
  }
30322
30602
  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: [{
30323
30603
  type: Component,
@@ -30337,7 +30617,7 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.8", ng
30337
30617
  EntitiesPreview,
30338
30618
  EntityPreview,
30339
30619
  Icon,
30340
- ], 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 [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"] }]
30620
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #timelineLegendList>\n <div\n class=\"dashboard-timeline-legend\"\n [attr.data-position]=\"timelineLegendPosition()\"\n >\n @for (label of timelineLabels(); track $index) {\n <span\n class=\"dashboard-timeline-legend-item\"\n [title]=\"label.label || label.name || label.key\"\n >\n <span\n class=\"dashboard-timeline-legend-marker\"\n [class.shape-rect]=\"label.shape === 'rect'\"\n [class.shape-roundRect]=\"label.shape === 'roundRect'\"\n [class.shape-diamond]=\"label.shape === 'diamond'\"\n [class.shape-triangle]=\"label.shape === 'triangle'\"\n [style.background]=\"\n label.shape === 'triangle' ? null : label.color || '#64748b'\n \"\n [style.border-bottom-color]=\"\n label.shape === 'triangle' ? label.color || '#64748b' : null\n \"\n ></span>\n <span class=\"dashboard-timeline-legend-label\">\n {{ label.label || label.name || label.key }}\n </span>\n </span>\n }\n </div>\n</ng-template>\n\n<mt-card-content\n [inGroup]=\"inGroup()\"\n [headerConfig]=\"\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\n \"\n [styleConfig]=\"\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\n \"\n [cardStyleConfig]=\"\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\n \"\n [density]=\"configurationItem()?.clientConfig?.configAsType?.['density']\"\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\n [title]=\"title()\"\n [titleEditable]=\"titleEditable()\"\n (titleChange)=\"onTitleChange.emit($event)\"\n [isNoTopEnd]=\"!showTopEnd()\"\n [isChart]=\"true\"\n (headerClick)=\"onHeaderClick()\"\n>\n <ng-container topEnd>\n @if (showStaticFilters()) {\n <mt-static-filters\n [config]=\"staticFilterConfig()\"\n [dashboardId]=\"dashboardId()\"\n >\n </mt-static-filters>\n }\n @if (showDynamicFilters()) {\n <mt-dynamic-filters\n [fields]=\"dynamicFilterFields()\"\n [dashboardId]=\"dashboardId()\"\n [reportId]=\"reportId()\"\n [showLabels]=\"false\"\n >\n </mt-dynamic-filters>\n }\n @if (showFilter()) {\n <mt-card-filter [config]=\"filterConfig()\" [dashboardId]=\"dashboardId()\">\n </mt-card-filter>\n }\n @if (cardInfoConfig()?.show && cardInfoConfig()?.value) {\n <mt-card-info [cardInfo]=\"cardInfoConfig()\"></mt-card-info>\n }\n </ng-container>\n\n <ng-container body>\n <div\n class=\"chart-container\"\n [class.config-mode]=\"isConfigMode()\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n >\n @if (componentViewMode() === \"splitter\" && hasSplitterData()) {\n <div\n class=\"splitter-view\"\n [class.splitter-vertical]=\"splitterOrientation() === 'vertical'\"\n [style.gap.px]=\"splitterGap()\"\n >\n <div class=\"splitter-side splitter-positive\">\n <div class=\"splitter-count\">\n {{ dataHandled()?.positive?.groupedValue ?? 0 }}\n </div>\n <ul class=\"splitter-labels\">\n @for (\n label of dataHandled()?.positive?.labels || [];\n track $index\n ) {\n <li>{{ label }}</li>\n }\n </ul>\n </div>\n <div class=\"splitter-divider\"></div>\n <div class=\"splitter-side splitter-negative\">\n <div class=\"splitter-count\">\n {{ dataHandled()?.negative?.groupedValue ?? 0 }}\n </div>\n <ul class=\"splitter-labels\">\n @for (\n label of dataHandled()?.negative?.labels || [];\n track $index\n ) {\n <li>{{ label }}</li>\n }\n </ul>\n </div>\n </div>\n } @else if (componentViewMode() === \"timeline\" && hasTimelineData()) {\n <div\n class=\"dashboard-timeline-view\"\n [attr.data-legend-position]=\"timelineLegendPosition()\"\n [style.--timeline-header-bg]=\"timelineHeaderBgColor()\"\n [style.--timeline-header-color]=\"timelineHeaderTextColor()\"\n >\n @if (\n timelineLegendShow() &&\n timelineLabels().length &&\n (timelineLegendPosition() === \"top\" ||\n timelineLegendPosition() === \"left\")\n ) {\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\n }\n\n @defer (on viewport) {\n <mt-timeline\n class=\"dashboard-timeline-renderer\"\n [showHeader]=\"false\"\n [showZoomToFitControl]=\"false\"\n [scrollToToday]=\"true\"\n [timelineMode]=\"timelineMode()\"\n (timelineModeChange)=\"timelineMode.set($event)\"\n [ganttData]=\"timelineResources()\"\n [ganttMapping]=\"timelineGanttMapping\"\n [columns]=\"timelineColumns()\"\n [defaultVisibleColumns]=\"2\"\n [columnsPaneMinWidthPx]=\"220\"\n [columnsPaneMaxWidthPx]=\"520\"\n [enableVirtualScroll]=\"true\"\n [virtualScrollThreshold]=\"0\"\n [virtualScrollBodyHeightPx]=\"520\"\n [showGanttDetailsPopup]=\"true\"\n [emptyMessage]=\"t('noChartData')\"\n >\n <ng-template\n mtTimelineColumn=\"title\"\n let-item=\"item\"\n let-resolved=\"resolved\"\n let-canToggle=\"canToggle\"\n let-isCollapsed=\"isCollapsed\"\n let-toggle=\"toggle\"\n >\n <div\n class=\"dashboard-timeline-title-cell\"\n [style.padding-inline-start.px]=\"\n $any(resolved).levelDepth * 16\n \"\n >\n @if (canToggle) {\n <mt-icon\n class=\"dashboard-timeline-title-toggle\"\n [icon]=\"timelineCollapseIcon(isCollapsed)\"\n (click)=\"$event.stopPropagation(); toggle()\"\n ></mt-icon>\n } @else {\n <span class=\"dashboard-timeline-title-spacer\"></span>\n }\n\n <button\n type=\"button\"\n class=\"dashboard-timeline-title-action\"\n [title]=\"$any(resolved).title\"\n (click)=\"onTimelineTitleClick(item, $event)\"\n >\n {{ $any(resolved).title }}\n </button>\n </div>\n </ng-template>\n\n @for (column of timelineEntityColumns(); track column.key) {\n <ng-template [mtTimelineColumn]=\"column.key\" let-value=\"value\">\n <mt-entity-preview\n class=\"dashboard-timeline-column-entity\"\n [data]=\"timelineColumnEntityData(value)\"\n attachmentShape=\"compact\"\n ></mt-entity-preview>\n </ng-template>\n }\n\n <ng-template mtTimelinePopover let-item=\"item\">\n @if (timelinePopoverEntities(item); as entities) {\n @if (entities.length) {\n <div\n class=\"w-[27rem] max-w-[90vw] max-h-[24rem] overflow-auto p-2\"\n >\n <mt-entities-preview\n [entities]=\"entities\"\n [stackOnNarrow]=\"false\"\n />\n </div>\n }\n }\n </ng-template>\n </mt-timeline>\n } @placeholder {\n <div class=\"dashboard-timeline-placeholder\" aria-hidden=\"true\">\n <div></div>\n <div></div>\n <div></div>\n </div>\n }\n\n @if (\n timelineLegendShow() &&\n timelineLabels().length &&\n (timelineLegendPosition() === \"bottom\" ||\n timelineLegendPosition() === \"right\")\n ) {\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\n }\n </div>\n } @else if (\n componentViewMode() === \"phaseGateStepper\" && phaseGateRecordCount() > 1\n ) {\n <div class=\"no-data-container\">\n <i class=\"pi pi-info-circle\"></i>\n <span>{{\n t(\"phaseGateStepperMultipleRecords\", {\n count: phaseGateRecordCount(),\n })\n }}</span>\n </div>\n } @else if (\n componentViewMode() === \"phaseGateStepper\" && hasPhaseGateData()\n ) {\n <div\n class=\"phase-gate-view\"\n [class.phase-gate-compact]=\"phaseGateCompact()\"\n >\n <ol class=\"phase-steps\">\n @for (step of phaseGateSteps(); track $index) {\n <li\n class=\"phase-step\"\n [class.is-current]=\"step.isCurrent\"\n [class.is-done]=\"step.isCompleted\"\n >\n <span class=\"phase-step-number\">{{ $index + 1 }}</span>\n @if (phaseGateShowLabels()) {\n <span class=\"phase-step-name\">{{\n step.name || t(\"phase\")\n }}</span>\n }\n </li>\n }\n </ol>\n </div>\n } @else if (\n componentViewMode() === \"performanceGauge\" &&\n dataHandled() &&\n !dataHandled()?.noData\n ) {\n @let gauge = performanceGauge();\n <div\n class=\"dashboard-performance-gauge\"\n [class.is-clickable]=\"hasActions()\"\n [style.--dashboard-performance-status-color]=\"gauge.status.color\"\n (click)=\"onPerformanceGaugeClick($event)\"\n >\n <div\n class=\"dashboard-performance-gauge__figure\"\n [style.width.%]=\"gauge.scalePercent\"\n >\n <svg\n class=\"dashboard-performance-gauge__svg\"\n viewBox=\"0 0 100 72\"\n role=\"img\"\n [attr.aria-label]=\"gauge.label + ' ' + gauge.display\"\n >\n <path\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\n fill=\"none\"\n stroke=\"#e5e7eb\"\n stroke-width=\"6\"\n stroke-linecap=\"round\"\n pathLength=\"100\"\n ></path>\n\n @for (segment of performanceGaugeSegments(); track segment.key) {\n <path\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\n fill=\"none\"\n [attr.stroke]=\"segment.color\"\n stroke-width=\"6\"\n stroke-linecap=\"round\"\n pathLength=\"100\"\n [attr.stroke-dasharray]=\"segment.dashArray\"\n [attr.stroke-dashoffset]=\"segment.dashOffset\"\n [style.opacity]=\"segment.opacity\"\n ></path>\n <text\n [attr.x]=\"segment.labelX\"\n [attr.y]=\"segment.labelY\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n font-size=\"5.5\"\n font-weight=\"700\"\n fill=\"#334155\"\n >\n {{ segment.label }}\n </text>\n }\n\n <circle\n [attr.cx]=\"gauge.marker.x\"\n [attr.cy]=\"gauge.marker.y\"\n r=\"4.5\"\n fill=\"#fff\"\n [attr.stroke]=\"gauge.status.color\"\n stroke-width=\"3\"\n ></circle>\n </svg>\n\n <div class=\"dashboard-performance-gauge__center\">\n <div class=\"dashboard-performance-gauge__value\">\n {{ gauge.display }}\n </div>\n <div class=\"dashboard-performance-gauge__label\">\n {{ gauge.label }}\n </div>\n </div>\n </div>\n\n <div\n class=\"dashboard-performance-gauge__status\"\n [title]=\"performanceGaugeStatusName()\"\n >\n <span class=\"dashboard-performance-gauge__status-dot\"></span>\n <span class=\"dashboard-performance-gauge__status-text\">\n {{ performanceGaugeStatusName() }}\n </span>\n </div>\n </div>\n } @else if (componentViewMode() === \"map\" && dataHandled()) {\n <mt-map-view\n [dashboardId]=\"dashboardId()\"\n [configurationItem]=\"configurationItem()\"\n [inGroup]=\"inGroup()\"\n [groups]=\"mapGroups()\"\n [config]=\"mapViewConfig()\"\n [showLegend]=\"mapLegendShow()\"\n [legendPosition]=\"mapLegendPosition()\"\n [legendIcon]=\"mapLegendIcon()\"\n (pointClick)=\"onMapPointClick($event)\"\n />\n } @else if (dataHandled() && !dataHandled()?.noData) {\n <mt-echart\n [dashboardId]=\"dashboardId()\"\n [chartConfig]=\"dataHandled()\"\n [configurationItem]=\"configurationItem()\"\n [inGroup]=\"inGroup()\"\n (chartClick)=\"onChartClick($event)\"\n >\n </mt-echart>\n } @else if (dataHandled()?.noData) {\n <div class=\"no-data-container\">\n <i class=\"pi pi-info-circle\"></i>\n <span>{{ t(\"noChartData\") }}</span>\n </div>\n } @else {\n <div class=\"loading-container\">\n <div class=\"loading-spinner\"></div>\n </div>\n }\n </div>\n </ng-container>\n</mt-card-content>\n", styles: [":host{display:block;height:100%}.chart-container{height:100%;min-height:0}.chart-container.config-mode{min-height:400px}.no-data-container,.needs-config-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:0;color:#999;gap:.5rem;padding:1rem;text-align:center}.no-data-container i,.needs-config-container i{font-size:2rem}.needs-config-container .title{font-weight:600;color:#555;font-size:.95rem}.needs-config-container .hint{font-size:.8rem;max-width:28rem;line-height:1.4}.needs-config-container .configure-btn{margin-top:.5rem;display:inline-flex;align-items:center;gap:.4rem;padding:.4rem .9rem;font-size:.85rem;font-weight:600;color:#fff;background:var(--p-primary-500, #2563eb);border:0;border-radius:.375rem;cursor:pointer;box-shadow:0 1px 2px #0000000d}.needs-config-container .configure-btn:hover{background:var(--p-primary-600, #1d4ed8)}.loading-container{display:flex;align-items:center;justify-content:center;height:100%;min-height:0}.loading-spinner{width:2rem;height:2rem;border:3px solid #f0f0f0;border-top-color:#4caf50;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.splitter-view{display:flex;align-items:stretch;height:100%;gap:.5rem}.splitter-view.splitter-vertical{flex-direction:column}.splitter-view.splitter-vertical .splitter-divider{width:auto;height:1px}.splitter-side{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:1rem;border-radius:.5rem}.splitter-positive{background:#22c55e14}.splitter-negative{background:#ef444414}.splitter-count{font-size:2rem;font-weight:700;margin-bottom:.5rem}.splitter-positive .splitter-count{color:#16a34a}.splitter-negative .splitter-count{color:#dc2626}.splitter-labels{list-style:none;padding:0;margin:0;text-align:center;font-size:.8rem;color:#555}.splitter-labels li{padding:.15rem 0}.splitter-divider{width:1px;background:#00000014}.dashboard-timeline-view{display:flex;flex-direction:column;gap:.625rem;height:100%;min-height:0;overflow:auto}.dashboard-timeline-view[data-legend-position=left],.dashboard-timeline-view[data-legend-position=right]{flex-direction:row;overflow:hidden}.dashboard-timeline-legend{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.35rem .75rem;flex-shrink:0;min-width:0;max-width:100%}.dashboard-timeline-legend[data-position=left],.dashboard-timeline-legend[data-position=right]{max-width:12rem;max-height:100%;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;overflow:auto}.dashboard-timeline-legend-item{display:inline-flex;align-items:center;gap:.25rem;max-width:12rem;padding:0;border:0;border-radius:0;font-size:.75rem;color:#475569;font-weight:500;line-height:1.2;background:transparent}.dashboard-timeline-legend-marker{display:inline-block;width:.625rem;height:.625rem;flex:0 0 auto;border-radius:999px}.dashboard-timeline-legend-marker.shape-rect{border-radius:0}.dashboard-timeline-legend-marker.shape-roundRect{border-radius:.2rem}.dashboard-timeline-legend-marker.shape-diamond{border-radius:.0625rem;transform:rotate(45deg)}.dashboard-timeline-legend-marker.shape-triangle{width:0;height:0;background:transparent!important;border-radius:0;border-left:.34rem solid transparent;border-right:.34rem solid transparent;border-bottom-width:.6rem;border-bottom-style:solid}.dashboard-timeline-legend-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-renderer{display:block;min-height:0;flex:1}.dashboard-timeline-placeholder{display:flex;min-height:260px;flex:1;flex-direction:column;gap:.75rem;padding:1rem}.dashboard-timeline-placeholder div{height:3rem;border-radius:.5rem;background:var(--p-surface-100);animation:dashboard-builder-pulse 1.2s ease-in-out infinite}@keyframes dashboard-builder-pulse{0%,to{opacity:.55}50%{opacity:1}}:host ::ng-deep .dashboard-timeline-renderer>div{margin-top:0}:host ::ng-deep .dashboard-timeline-view mt-timeline-gantt-header .bg-surface-50{background-color:var(--timeline-header-bg, var(--p-surface-50));color:var(--timeline-header-color, inherit)}.dashboard-timeline-column-entity{display:block;min-width:0}.dashboard-timeline-title-cell{display:flex;min-width:0;align-items:center;gap:.5rem;width:100%}.dashboard-timeline-title-toggle{flex:0 0 auto;cursor:pointer;color:#64748b}.dashboard-timeline-title-spacer{display:inline-block;width:1.25rem;flex:0 0 1.25rem}.dashboard-timeline-title-action{min-width:0;flex:1 1 auto;overflow:hidden;border:0;background:transparent;padding:0;color:#334155;cursor:pointer;font-size:.875rem;font-weight:600;text-align:start;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-title-action:hover{color:var(--p-primary-600, #2563eb);text-decoration:underline}.phase-gate-view{height:100%;display:flex;align-items:center;justify-content: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"] }]
30341
30621
  }], 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"] }] } }) });
30342
30622
 
30343
30623
  /**
@@ -38134,7 +38414,7 @@ class SourceLinkConfiguration {
38134
38414
  useExisting: forwardRef(() => SourceLinkConfiguration),
38135
38415
  multi: true,
38136
38416
  },
38137
- ], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <mt-card [title]=\"t('sourceLinks')\">\r\n <ng-template #cardEnd>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n (onClick)=\"addSourceLink()\"\r\n [disabled]=\"disabled\"\r\n [pTooltip]=\"t('addSourceLink')\"\r\n />\r\n </ng-template>\r\n\r\n <div class=\"flex flex-col gap-4\" [formGroup]=\"sourceLinksForm\">\r\n <div formArrayName=\"sourceLinks\">\r\n @for (\r\n link of sourceLinksArray.controls;\r\n track trackByIndex(i);\r\n let i = $index;\r\n let first = $first\r\n ) {\r\n <div\r\n class=\"p-4 rounded-lg border transition-all mb-4 last:mb-0\"\r\n [class.border-red-500]=\"link.invalid\"\r\n [class.border-surface-200]=\"!link.invalid\"\r\n [formGroupName]=\"i\"\r\n >\r\n <!-- Link Header with Type Tabs -->\r\n <div class=\"flex items-center justify-between mb-4\">\r\n <div class=\"flex items-center gap-3\">\r\n <span\r\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-600 text-sm font-semibold\"\r\n >\r\n {{ i + 1 }}\r\n </span>\r\n\r\n <!-- Link Type Tabs (only show for non-first links) -->\r\n @if (!first) {\r\n <mt-tabs\r\n [active]=\"getLinkType(i)\"\r\n (activeChange)=\"onLinkTypeChange(i, $event)\"\r\n [options]=\"getLinkTypeOptions(i)\"\r\n size=\"small\"\r\n />\r\n } @else {\r\n <span class=\"text-sm font-medium text-muted-color\">\r\n {{ t(\"selectionToSelection\") }}\r\n </span>\r\n }\r\n </div>\r\n\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [text]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"removeSourceLink(i)\"\r\n />\r\n </div>\r\n\r\n <!-- Source Selections based on link type -->\r\n @if (getLinkType(i) === \"selection\") {\r\n <!-- Selection to Selection Mode -->\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\r\n <!-- Source 1 Selection -->\r\n <mt-select-field\r\n [label]=\"t('source1')\"\r\n formControlName=\"source1SelectionId\"\r\n [options]=\"selectionOptions()\"\r\n optionLabel=\"displayName\"\r\n optionValue=\"selectionId\"\r\n [placeholder]=\"t('selectSource')\"\r\n (ngModelChange)=\"onSourceChange(i)\"\r\n />\r\n\r\n <!-- Source 2 Selection -->\r\n <mt-select-field\r\n [label]=\"t('source2')\"\r\n formControlName=\"source2SelectionId\"\r\n [options]=\"selectionOptions()\"\r\n optionLabel=\"displayName\"\r\n optionValue=\"selectionId\"\r\n [placeholder]=\"t('selectSource')\"\r\n (ngModelChange)=\"onSourceChange(i)\"\r\n />\r\n </div>\r\n } @else {\r\n <!-- Chained Mode: Previous Link to Selection -->\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\r\n <!-- Source Link (previous link) -->\r\n <mt-select-field\r\n [label]=\"t('previousLink')\"\r\n formControlName=\"sourceLinkId\"\r\n [options]=\"getAvailableSourceLinks(i)\"\r\n optionLabel=\"displayName\"\r\n optionValue=\"index\"\r\n [placeholder]=\"t('selectPreviousLink')\"\r\n (ngModelChange)=\"onSourceChange(i)\"\r\n />\r\n\r\n <!-- Source 2 Selection -->\r\n <mt-select-field\r\n [label]=\"t('source2')\"\r\n formControlName=\"source2SelectionId\"\r\n [options]=\"selectionOptions()\"\r\n optionLabel=\"displayName\"\r\n optionValue=\"selectionId\"\r\n [placeholder]=\"t('selectSource')\"\r\n (ngModelChange)=\"onSourceChange(i)\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Link Properties -->\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\r\n <!-- Source 1 Property -->\r\n <mt-select-field\r\n [label]=\"t('source1LinkProperty')\"\r\n formControlName=\"source1PropertyKey\"\r\n [options]=\"getSource1PropertiesGrouped(i)\"\r\n [group]=\"true\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n\r\n <!-- Source 2 Property -->\r\n <mt-select-field\r\n [label]=\"t('source2LinkProperty')\"\r\n formControlName=\"source2PropertyKey\"\r\n [options]=\"getSource2PropertiesGrouped(i)\"\r\n [group]=\"true\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n </div>\r\n\r\n <!-- Join Options -->\r\n <div class=\"flex items-center gap-6\">\r\n <mt-toggle-field\r\n [label]=\"t('isLeftJoin')\"\r\n formControlName=\"isLeftJoin\"\r\n />\r\n <mt-toggle-field\r\n [label]=\"t('isFilterLinkage')\"\r\n formControlName=\"isFilterLinkage\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (sourceLinksArray.length === 0) {\r\n <div class=\"text-center py-8 text-muted-color\">\r\n <i class=\"mti mti-link-01 text-3xl mb-2 block\"></i>\r\n <p class=\"mb-2\">{{ t(\"noSourceLinksConfigured\") }}</p>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addSourceLink')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addSourceLink()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </mt-card>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "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: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
38417
+ ], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <mt-card [title]=\"t('sourceLinks')\">\n <ng-template #cardEnd>\n <mt-button\n icon=\"general.plus\"\n [outlined]=\"true\"\n size=\"small\"\n (onClick)=\"addSourceLink()\"\n [disabled]=\"disabled\"\n [pTooltip]=\"t('addSourceLink')\"\n />\n </ng-template>\n\n <div class=\"flex flex-col gap-4\" [formGroup]=\"sourceLinksForm\">\n <div formArrayName=\"sourceLinks\">\n @for (\n link of sourceLinksArray.controls;\n track trackByIndex(i);\n let i = $index;\n let first = $first\n ) {\n <div\n class=\"p-4 rounded-lg border transition-all mb-4 last:mb-0\"\n [class.border-red-500]=\"link.invalid\"\n [class.border-surface-200]=\"!link.invalid\"\n [formGroupName]=\"i\"\n >\n <!-- Link Header with Type Tabs -->\n <div class=\"flex items-center justify-between mb-4\">\n <div class=\"flex items-center gap-3\">\n <span\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-600 text-sm font-semibold\"\n >\n {{ i + 1 }}\n </span>\n\n <!-- Link Type Tabs (only show for non-first links) -->\n @if (!first) {\n <mt-tabs\n [active]=\"getLinkType(i)\"\n (activeChange)=\"onLinkTypeChange(i, $event)\"\n [options]=\"getLinkTypeOptions(i)\"\n size=\"small\"\n />\n } @else {\n <span class=\"text-sm font-medium text-muted-color\">\n {{ t(\"selectionToSelection\") }}\n </span>\n }\n <!-- The two link modes return different rows (#1860) -->\n <span\n class=\"inline-flex cursor-help text-muted-color\"\n tabindex=\"0\"\n [pTooltip]=\"t('linkModesHint')\"\n tooltipPosition=\"top\"\n [attr.aria-label]=\"t('linkModesHint')\"\n >\n <mt-icon icon=\"general.info-circle\" class=\"text-sm\" />\n </span>\n </div>\n\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n [text]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"removeSourceLink(i)\"\n />\n </div>\n\n <!-- Source Selections based on link type -->\n @if (getLinkType(i) === \"selection\") {\n <!-- Selection to Selection Mode -->\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <!-- Source 1 Selection -->\n <mt-select-field\n [label]=\"t('source1')\"\n formControlName=\"source1SelectionId\"\n [options]=\"selectionOptions()\"\n optionLabel=\"displayName\"\n optionValue=\"selectionId\"\n [placeholder]=\"t('selectSource')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n\n <!-- Source 2 Selection -->\n <mt-select-field\n [label]=\"t('source2')\"\n formControlName=\"source2SelectionId\"\n [options]=\"selectionOptions()\"\n optionLabel=\"displayName\"\n optionValue=\"selectionId\"\n [placeholder]=\"t('selectSource')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n </div>\n } @else {\n <!-- Chained Mode: Previous Link to Selection -->\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <!-- Source Link (previous link) -->\n <mt-select-field\n [label]=\"t('previousLink')\"\n formControlName=\"sourceLinkId\"\n [options]=\"getAvailableSourceLinks(i)\"\n optionLabel=\"displayName\"\n optionValue=\"index\"\n [placeholder]=\"t('selectPreviousLink')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n\n <!-- Source 2 Selection -->\n <mt-select-field\n [label]=\"t('source2')\"\n formControlName=\"source2SelectionId\"\n [options]=\"selectionOptions()\"\n optionLabel=\"displayName\"\n optionValue=\"selectionId\"\n [placeholder]=\"t('selectSource')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n </div>\n }\n\n <!-- Link Properties -->\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <!-- Source 1 Property -->\n <mt-select-field\n [label]=\"t('source1LinkProperty')\"\n formControlName=\"source1PropertyKey\"\n [options]=\"getSource1PropertiesGrouped(i)\"\n [group]=\"true\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n\n <!-- Source 2 Property -->\n <mt-select-field\n [label]=\"t('source2LinkProperty')\"\n formControlName=\"source2PropertyKey\"\n [options]=\"getSource2PropertiesGrouped(i)\"\n [group]=\"true\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n </div>\n\n <!-- Join Options -->\n <div class=\"flex flex-wrap items-center gap-6\">\n <div class=\"flex items-center gap-1\">\n <mt-toggle-field\n [label]=\"t('isLeftJoin')\"\n formControlName=\"isLeftJoin\"\n />\n <span\n class=\"inline-flex cursor-help text-muted-color\"\n tabindex=\"0\"\n [pTooltip]=\"t('isLeftJoinHint')\"\n tooltipPosition=\"top\"\n [attr.aria-label]=\"t('isLeftJoinHint')\"\n >\n <mt-icon icon=\"general.info-circle\" class=\"text-sm\" />\n </span>\n </div>\n <div class=\"flex items-center gap-1\">\n <mt-toggle-field\n [label]=\"t('isFilterLinkage')\"\n formControlName=\"isFilterLinkage\"\n />\n <span\n class=\"inline-flex cursor-help text-muted-color\"\n tabindex=\"0\"\n [pTooltip]=\"t('isFilterLinkageHint')\"\n tooltipPosition=\"top\"\n [attr.aria-label]=\"t('isFilterLinkageHint')\"\n >\n <mt-icon icon=\"general.info-circle\" class=\"text-sm\" />\n </span>\n </div>\n </div>\n </div>\n }\n </div>\n\n @if (sourceLinksArray.length === 0) {\n <div class=\"text-center py-8 text-muted-color\">\n <i class=\"mti mti-link-01 text-3xl mb-2 block\"></i>\n <p class=\"mb-2\">{{ t(\"noSourceLinksConfigured\") }}</p>\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addSourceLink')\"\n severity=\"secondary\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addSourceLink()\"\n />\n </div>\n }\n </div>\n </mt-card>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "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: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
38138
38418
  }
38139
38419
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SourceLinkConfiguration, decorators: [{
38140
38420
  type: Component,
@@ -38149,6 +38429,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
38149
38429
  Card,
38150
38430
  Tabs,
38151
38431
  Tooltip,
38432
+ Icon,
38152
38433
  ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
38153
38434
  {
38154
38435
  provide: NG_VALUE_ACCESSOR,
@@ -38160,7 +38441,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
38160
38441
  useExisting: forwardRef(() => SourceLinkConfiguration),
38161
38442
  multi: true,
38162
38443
  },
38163
- ], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <mt-card [title]=\"t('sourceLinks')\">\r\n <ng-template #cardEnd>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n (onClick)=\"addSourceLink()\"\r\n [disabled]=\"disabled\"\r\n [pTooltip]=\"t('addSourceLink')\"\r\n />\r\n </ng-template>\r\n\r\n <div class=\"flex flex-col gap-4\" [formGroup]=\"sourceLinksForm\">\r\n <div formArrayName=\"sourceLinks\">\r\n @for (\r\n link of sourceLinksArray.controls;\r\n track trackByIndex(i);\r\n let i = $index;\r\n let first = $first\r\n ) {\r\n <div\r\n class=\"p-4 rounded-lg border transition-all mb-4 last:mb-0\"\r\n [class.border-red-500]=\"link.invalid\"\r\n [class.border-surface-200]=\"!link.invalid\"\r\n [formGroupName]=\"i\"\r\n >\r\n <!-- Link Header with Type Tabs -->\r\n <div class=\"flex items-center justify-between mb-4\">\r\n <div class=\"flex items-center gap-3\">\r\n <span\r\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-600 text-sm font-semibold\"\r\n >\r\n {{ i + 1 }}\r\n </span>\r\n\r\n <!-- Link Type Tabs (only show for non-first links) -->\r\n @if (!first) {\r\n <mt-tabs\r\n [active]=\"getLinkType(i)\"\r\n (activeChange)=\"onLinkTypeChange(i, $event)\"\r\n [options]=\"getLinkTypeOptions(i)\"\r\n size=\"small\"\r\n />\r\n } @else {\r\n <span class=\"text-sm font-medium text-muted-color\">\r\n {{ t(\"selectionToSelection\") }}\r\n </span>\r\n }\r\n </div>\r\n\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [text]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"removeSourceLink(i)\"\r\n />\r\n </div>\r\n\r\n <!-- Source Selections based on link type -->\r\n @if (getLinkType(i) === \"selection\") {\r\n <!-- Selection to Selection Mode -->\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\r\n <!-- Source 1 Selection -->\r\n <mt-select-field\r\n [label]=\"t('source1')\"\r\n formControlName=\"source1SelectionId\"\r\n [options]=\"selectionOptions()\"\r\n optionLabel=\"displayName\"\r\n optionValue=\"selectionId\"\r\n [placeholder]=\"t('selectSource')\"\r\n (ngModelChange)=\"onSourceChange(i)\"\r\n />\r\n\r\n <!-- Source 2 Selection -->\r\n <mt-select-field\r\n [label]=\"t('source2')\"\r\n formControlName=\"source2SelectionId\"\r\n [options]=\"selectionOptions()\"\r\n optionLabel=\"displayName\"\r\n optionValue=\"selectionId\"\r\n [placeholder]=\"t('selectSource')\"\r\n (ngModelChange)=\"onSourceChange(i)\"\r\n />\r\n </div>\r\n } @else {\r\n <!-- Chained Mode: Previous Link to Selection -->\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\r\n <!-- Source Link (previous link) -->\r\n <mt-select-field\r\n [label]=\"t('previousLink')\"\r\n formControlName=\"sourceLinkId\"\r\n [options]=\"getAvailableSourceLinks(i)\"\r\n optionLabel=\"displayName\"\r\n optionValue=\"index\"\r\n [placeholder]=\"t('selectPreviousLink')\"\r\n (ngModelChange)=\"onSourceChange(i)\"\r\n />\r\n\r\n <!-- Source 2 Selection -->\r\n <mt-select-field\r\n [label]=\"t('source2')\"\r\n formControlName=\"source2SelectionId\"\r\n [options]=\"selectionOptions()\"\r\n optionLabel=\"displayName\"\r\n optionValue=\"selectionId\"\r\n [placeholder]=\"t('selectSource')\"\r\n (ngModelChange)=\"onSourceChange(i)\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Link Properties -->\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\r\n <!-- Source 1 Property -->\r\n <mt-select-field\r\n [label]=\"t('source1LinkProperty')\"\r\n formControlName=\"source1PropertyKey\"\r\n [options]=\"getSource1PropertiesGrouped(i)\"\r\n [group]=\"true\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n\r\n <!-- Source 2 Property -->\r\n <mt-select-field\r\n [label]=\"t('source2LinkProperty')\"\r\n formControlName=\"source2PropertyKey\"\r\n [options]=\"getSource2PropertiesGrouped(i)\"\r\n [group]=\"true\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n </div>\r\n\r\n <!-- Join Options -->\r\n <div class=\"flex items-center gap-6\">\r\n <mt-toggle-field\r\n [label]=\"t('isLeftJoin')\"\r\n formControlName=\"isLeftJoin\"\r\n />\r\n <mt-toggle-field\r\n [label]=\"t('isFilterLinkage')\"\r\n formControlName=\"isFilterLinkage\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (sourceLinksArray.length === 0) {\r\n <div class=\"text-center py-8 text-muted-color\">\r\n <i class=\"mti mti-link-01 text-3xl mb-2 block\"></i>\r\n <p class=\"mb-2\">{{ t(\"noSourceLinksConfigured\") }}</p>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addSourceLink')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addSourceLink()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </mt-card>\r\n</div>\r\n" }]
38444
+ ], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <mt-card [title]=\"t('sourceLinks')\">\n <ng-template #cardEnd>\n <mt-button\n icon=\"general.plus\"\n [outlined]=\"true\"\n size=\"small\"\n (onClick)=\"addSourceLink()\"\n [disabled]=\"disabled\"\n [pTooltip]=\"t('addSourceLink')\"\n />\n </ng-template>\n\n <div class=\"flex flex-col gap-4\" [formGroup]=\"sourceLinksForm\">\n <div formArrayName=\"sourceLinks\">\n @for (\n link of sourceLinksArray.controls;\n track trackByIndex(i);\n let i = $index;\n let first = $first\n ) {\n <div\n class=\"p-4 rounded-lg border transition-all mb-4 last:mb-0\"\n [class.border-red-500]=\"link.invalid\"\n [class.border-surface-200]=\"!link.invalid\"\n [formGroupName]=\"i\"\n >\n <!-- Link Header with Type Tabs -->\n <div class=\"flex items-center justify-between mb-4\">\n <div class=\"flex items-center gap-3\">\n <span\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-600 text-sm font-semibold\"\n >\n {{ i + 1 }}\n </span>\n\n <!-- Link Type Tabs (only show for non-first links) -->\n @if (!first) {\n <mt-tabs\n [active]=\"getLinkType(i)\"\n (activeChange)=\"onLinkTypeChange(i, $event)\"\n [options]=\"getLinkTypeOptions(i)\"\n size=\"small\"\n />\n } @else {\n <span class=\"text-sm font-medium text-muted-color\">\n {{ t(\"selectionToSelection\") }}\n </span>\n }\n <!-- The two link modes return different rows (#1860) -->\n <span\n class=\"inline-flex cursor-help text-muted-color\"\n tabindex=\"0\"\n [pTooltip]=\"t('linkModesHint')\"\n tooltipPosition=\"top\"\n [attr.aria-label]=\"t('linkModesHint')\"\n >\n <mt-icon icon=\"general.info-circle\" class=\"text-sm\" />\n </span>\n </div>\n\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n [text]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"removeSourceLink(i)\"\n />\n </div>\n\n <!-- Source Selections based on link type -->\n @if (getLinkType(i) === \"selection\") {\n <!-- Selection to Selection Mode -->\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <!-- Source 1 Selection -->\n <mt-select-field\n [label]=\"t('source1')\"\n formControlName=\"source1SelectionId\"\n [options]=\"selectionOptions()\"\n optionLabel=\"displayName\"\n optionValue=\"selectionId\"\n [placeholder]=\"t('selectSource')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n\n <!-- Source 2 Selection -->\n <mt-select-field\n [label]=\"t('source2')\"\n formControlName=\"source2SelectionId\"\n [options]=\"selectionOptions()\"\n optionLabel=\"displayName\"\n optionValue=\"selectionId\"\n [placeholder]=\"t('selectSource')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n </div>\n } @else {\n <!-- Chained Mode: Previous Link to Selection -->\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <!-- Source Link (previous link) -->\n <mt-select-field\n [label]=\"t('previousLink')\"\n formControlName=\"sourceLinkId\"\n [options]=\"getAvailableSourceLinks(i)\"\n optionLabel=\"displayName\"\n optionValue=\"index\"\n [placeholder]=\"t('selectPreviousLink')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n\n <!-- Source 2 Selection -->\n <mt-select-field\n [label]=\"t('source2')\"\n formControlName=\"source2SelectionId\"\n [options]=\"selectionOptions()\"\n optionLabel=\"displayName\"\n optionValue=\"selectionId\"\n [placeholder]=\"t('selectSource')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n </div>\n }\n\n <!-- Link Properties -->\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <!-- Source 1 Property -->\n <mt-select-field\n [label]=\"t('source1LinkProperty')\"\n formControlName=\"source1PropertyKey\"\n [options]=\"getSource1PropertiesGrouped(i)\"\n [group]=\"true\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n\n <!-- Source 2 Property -->\n <mt-select-field\n [label]=\"t('source2LinkProperty')\"\n formControlName=\"source2PropertyKey\"\n [options]=\"getSource2PropertiesGrouped(i)\"\n [group]=\"true\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n </div>\n\n <!-- Join Options -->\n <div class=\"flex flex-wrap items-center gap-6\">\n <div class=\"flex items-center gap-1\">\n <mt-toggle-field\n [label]=\"t('isLeftJoin')\"\n formControlName=\"isLeftJoin\"\n />\n <span\n class=\"inline-flex cursor-help text-muted-color\"\n tabindex=\"0\"\n [pTooltip]=\"t('isLeftJoinHint')\"\n tooltipPosition=\"top\"\n [attr.aria-label]=\"t('isLeftJoinHint')\"\n >\n <mt-icon icon=\"general.info-circle\" class=\"text-sm\" />\n </span>\n </div>\n <div class=\"flex items-center gap-1\">\n <mt-toggle-field\n [label]=\"t('isFilterLinkage')\"\n formControlName=\"isFilterLinkage\"\n />\n <span\n class=\"inline-flex cursor-help text-muted-color\"\n tabindex=\"0\"\n [pTooltip]=\"t('isFilterLinkageHint')\"\n tooltipPosition=\"top\"\n [attr.aria-label]=\"t('isFilterLinkageHint')\"\n >\n <mt-icon icon=\"general.info-circle\" class=\"text-sm\" />\n </span>\n </div>\n </div>\n </div>\n }\n </div>\n\n @if (sourceLinksArray.length === 0) {\n <div class=\"text-center py-8 text-muted-color\">\n <i class=\"mti mti-link-01 text-3xl mb-2 block\"></i>\n <p class=\"mb-2\">{{ t(\"noSourceLinksConfigured\") }}</p>\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addSourceLink')\"\n severity=\"secondary\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addSourceLink()\"\n />\n </div>\n }\n </div>\n </mt-card>\n</div>\n" }]
38164
38445
  }], ctorParameters: () => [], propDecorators: { selectionModules: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionModules", required: false }] }] } });
38165
38446
 
38166
38447
  /** Each selection's source (`Level:1`, `Module:4`) keyed by selection id. */
@@ -38190,6 +38471,68 @@ function reconcileSourceLinks(links, previous, next) {
38190
38471
  });
38191
38472
  }
38192
38473
 
38474
+ /** Query fields that list property keys. */
38475
+ const KEY_LIST_FIELDS = [
38476
+ 'selectedProperties',
38477
+ 'properties',
38478
+ 'extraProperties',
38479
+ 'tooltipProperties',
38480
+ 'PivotProperties',
38481
+ ];
38482
+ /**
38483
+ * Keys that only deleted selections provided; a key a remaining selection
38484
+ * also has is kept. A module change is left alone: the new module's
38485
+ * properties are not loaded yet, so shared keys could not be told apart.
38486
+ */
38487
+ function orphanPropertyKeys(previous, next, keysBySelector) {
38488
+ const remaining = new Set(next.values());
38489
+ const departed = [
38490
+ ...new Set([...previous]
38491
+ .filter(([id]) => !next.has(id))
38492
+ .map(([, selector]) => selector)),
38493
+ ].filter((selector) => selector && !remaining.has(selector));
38494
+ if (!departed.length)
38495
+ return new Set();
38496
+ const kept = new Set([...remaining]
38497
+ .filter(Boolean)
38498
+ .flatMap((selector) => keysBySelector(selector)));
38499
+ return new Set(departed
38500
+ .flatMap((selector) => keysBySelector(selector))
38501
+ .filter((key) => !kept.has(key)));
38502
+ }
38503
+ /**
38504
+ * Drop the given keys from the query's property lists and aggregations, so a
38505
+ * deleted source's fields are no longer requested (#1859). Returns the same
38506
+ * object when nothing referenced them.
38507
+ */
38508
+ function withoutPropertyKeys(query, keys) {
38509
+ if (!query || !keys.size)
38510
+ return query;
38511
+ let changed = false;
38512
+ const next = { ...query };
38513
+ for (const field of KEY_LIST_FIELDS) {
38514
+ const list = query[field];
38515
+ if (!Array.isArray(list))
38516
+ continue;
38517
+ const kept = list.filter((key) => typeof key !== 'string' || !keys.has(key));
38518
+ if (kept.length !== list.length) {
38519
+ next[field] = kept;
38520
+ changed = true;
38521
+ }
38522
+ }
38523
+ for (const field of ['AggregationProperties', 'aggregationProperties']) {
38524
+ const list = query[field];
38525
+ if (!Array.isArray(list))
38526
+ continue;
38527
+ const kept = list.filter((aggregation) => !keys.has(aggregation?.propertyKey));
38528
+ if (kept.length !== list.length) {
38529
+ next[field] = kept;
38530
+ changed = true;
38531
+ }
38532
+ }
38533
+ return changed ? next : query;
38534
+ }
38535
+
38193
38536
  /**
38194
38537
  * Custom API Configuration Component
38195
38538
  *
@@ -38274,7 +38617,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
38274
38617
  }] });
38275
38618
 
38276
38619
  const NUMERIC_VIEW_TYPES = new Set(['number', 'percentage', 'currency']);
38277
- const DATE_VIEW_TYPES = new Set(['date', 'datetime']);
38620
+ const DATE_VIEW_TYPES$1 = new Set(['date', 'datetime']);
38278
38621
  const BOOLEAN_VIEW_TYPES = new Set(['checkbox', 'boolean', 'bool']);
38279
38622
  const VALUE_LIST_VIEW_TYPES = new Set(['lookup', 'status']);
38280
38623
  const viewTypeOf = (property) => String(property?.viewType ?? '')
@@ -38290,7 +38633,7 @@ function isNumericProperty(property) {
38290
38633
  /** Numbers and dates can be compared with `>` / `<`. */
38291
38634
  function isOrderedProperty(property) {
38292
38635
  const viewType = viewTypeOf(property);
38293
- return NUMERIC_VIEW_TYPES.has(viewType) || DATE_VIEW_TYPES.has(viewType);
38636
+ return NUMERIC_VIEW_TYPES.has(viewType) || DATE_VIEW_TYPES$1.has(viewType);
38294
38637
  }
38295
38638
  /** Where a filter value is picked from a fixed list instead of typed. */
38296
38639
  function propertyValueList(property) {
@@ -38995,6 +39338,8 @@ class GeneralQuery {
38995
39338
  /** Main form */
38996
39339
  queryForm = this.fb.group({
38997
39340
  categoryProperty: [''],
39341
+ // Shown under each point's tooltip; separate from Extra Properties (#1842).
39342
+ tooltipProperties: [[]],
38998
39343
  series: this.fb.array([]),
38999
39344
  });
39000
39345
  /** Disabled state */
@@ -39027,7 +39372,10 @@ class GeneralQuery {
39027
39372
  return;
39028
39373
  }
39029
39374
  // Rebuild silently — internal restructuring must never feed valueChanges.
39030
- this.queryForm.patchValue({ categoryProperty: value.categoryProperty || '' }, { emitEvent: false });
39375
+ this.queryForm.patchValue({
39376
+ categoryProperty: value.categoryProperty || '',
39377
+ tooltipProperties: value.tooltipProperties || [],
39378
+ }, { emitEvent: false });
39031
39379
  this.seriesArray.clear({ emitEvent: false });
39032
39380
  (value.series || []).forEach((s) => {
39033
39381
  this.seriesArray.push(this.createSeriesFormGroup(s), {
@@ -39258,9 +39606,11 @@ class GeneralQuery {
39258
39606
  return this.fieldsToShow().includes(fieldName);
39259
39607
  }
39260
39608
  getQueryValue() {
39261
- const raw = this.queryForm.getRawValue();
39609
+ const { tooltipProperties, ...raw } = this.queryForm.getRawValue();
39262
39610
  return {
39263
39611
  ...raw,
39612
+ // Left out when empty: no tooltip selection keeps the chart unchanged.
39613
+ ...(tooltipProperties?.length ? { tooltipProperties } : {}),
39264
39614
  series: (raw.series || []).map((series) => this.normalizeSeriesForGaugeGroupExtras(this.normalizeSeriesForStackMode(this.toPersistedSeries(series)))),
39265
39615
  };
39266
39616
  }
@@ -39383,7 +39733,7 @@ class GeneralQuery {
39383
39733
  useExisting: forwardRef(() => GeneralQuery),
39384
39734
  multi: true,
39385
39735
  },
39386
- ], ngImport: i0, template: "<div\r\n class=\"flex flex-col gap-4\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n [formGroup]=\"queryForm\"\r\n>\r\n <!-- Category Property (shown for certain chart types) -->\r\n @if (shouldShowField(\"categoryProperty\")) {\r\n <div class=\"mb-2\">\r\n <mt-select-field\r\n [label]=\"t('categoryProperty')\"\r\n formControlName=\"categoryProperty\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectCategoryProperty')\"\r\n [filter]=\"true\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Add Series Button -->\r\n @if (!singleSeries() || seriesArray.length === 0) {\r\n <div class=\"flex justify-end\">\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addSeries')\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addSeries()\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Series List -->\r\n <div formArrayName=\"series\" class=\"flex flex-col gap-4\">\r\n @for (\r\n series of seriesArray.controls;\r\n track trackByIndex(i);\r\n let i = $index\r\n ) {\r\n <div\r\n class=\"p-4 rounded-lg border transition-all\"\r\n [class.border-red-500]=\"series.invalid\"\r\n [class.border-surface-200]=\"!series.invalid\"\r\n [formGroupName]=\"i\"\r\n >\r\n <!-- Series Header -->\r\n <div class=\"flex items-center justify-between mb-4\">\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-600 text-sm font-semibold\"\r\n >\r\n {{ i + 1 }}\r\n </span>\r\n <span class=\"text-sm font-medium text-muted-color\">{{\r\n t(\"series\")\r\n }}</span>\r\n </div>\r\n <div class=\"flex items-center gap-2\">\r\n @if (shouldShowField(\"formula\")) {\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex min-h-8 items-center justify-center gap-1.5 rounded-md border border-surface-300 bg-surface-0 px-3 py-1.5 text-sm font-medium text-color transition-colors hover:border-primary-400 hover:bg-primary-50 hover:text-primary-700 disabled:cursor-not-allowed disabled:opacity-50\"\r\n [id]=\"advancedSettingsToggleId(i)\"\r\n [attr.aria-expanded]=\"\r\n series.value.showAdvancedSettings ? 'true' : 'false'\r\n \"\r\n [attr.aria-controls]=\"advancedSettingsPanelId(i)\"\r\n [disabled]=\"disabled\"\r\n (click)=\"toggleAdvanced(i)\"\r\n >\r\n <mt-icon\r\n icon=\"general.settings-02\"\r\n class=\"text-base\"\r\n aria-hidden=\"true\"\r\n />\r\n <span>\r\n {{\r\n t(\r\n advancedSettingsActionKey(\r\n series.value.showAdvancedSettings\r\n )\r\n )\r\n }}\r\n </span>\r\n </button>\r\n }\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"deleteSeries(i)\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4\">\r\n <!-- Auto Stack Toggle -->\r\n @if (shouldShowField(\"autoStack\")) {\r\n <div class=\"md:col-span-2 lg:col-span-3\">\r\n <mt-toggle-field\r\n [label]=\"t('autoStack')\"\r\n formControlName=\"autoStack\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Series Name (legend / label text) -->\r\n @if (shouldShowField(\"seriesName\")) {\r\n <mt-text-field\r\n [label]=\"t('seriesName')\"\r\n formControlName=\"seriesName\"\r\n [placeholder]=\"t('seriesNamePlaceholder')\"\r\n />\r\n }\r\n\r\n <!-- Value Property -->\r\n @if (shouldShowField(\"valueProperty\") || series.value.autoStack) {\r\n <mt-select-field\r\n [label]=\"t('valueProperty')\"\r\n formControlName=\"valueProperty\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectValueProperty')\"\r\n [filter]=\"true\"\r\n />\r\n }\r\n\r\n <!-- Aggregate Function -->\r\n @if (shouldShowField(\"aggregateFunction\")) {\r\n <mt-select-field\r\n [label]=\"t('aggregateFunction')\"\r\n formControlName=\"aggregateFunction\"\r\n [options]=\"aggregateFunctions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n }\r\n\r\n <!-- Color Picker -->\r\n @if (shouldShowField(\"color\")) {\r\n <mt-color-picker-field\r\n [label]=\"t('seriesColor')\"\r\n formControlName=\"color\"\r\n />\r\n }\r\n\r\n <!-- Bar Type (for stacked bar charts) -->\r\n @if (shouldShowField(\"barType\")) {\r\n <mt-select-field\r\n [label]=\"t('barType')\"\r\n formControlName=\"barType\"\r\n [options]=\"barTypes\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n />\r\n }\r\n\r\n <!-- Auto Stack By Property -->\r\n @if (\r\n shouldShowField(\"autoStackByProperty\") && series.value.autoStack\r\n ) {\r\n <mt-select-field\r\n [label]=\"t('autoStackByProperty')\"\r\n formControlName=\"autoStackByProperty\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n }\r\n\r\n <!-- Group By Properties -->\r\n @if (shouldShowField(\"groupByProperties\")) {\r\n <div class=\"col-span-full\">\r\n <mt-string-array-input\r\n [label]=\"t('groupByProperties')\"\r\n formControlName=\"groupByProperties\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n [placeholder]=\"t('selectProperties')\"\r\n [maxItems]=\"singleGroupBy() ? 1 : null\"\r\n [limitHint]=\"singleGroupBy() ? t('groupBySingleHint') : ''\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Stack Properties (for stacked charts) -->\r\n @if (shouldShowField(\"stackProperties\") && !series.value.autoStack) {\r\n <div class=\"col-span-full\">\r\n <mt-string-array-input\r\n [label]=\"t('stackProperties')\"\r\n formControlName=\"stackProperties\"\r\n [options]=\"\r\n useGroupedSelect()\r\n ? numericPropertiesGrouped()\r\n : numericPropertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n [placeholder]=\"t('selectProperties')\"\r\n />\r\n <p class=\"mt-1 text-xs text-muted-color\">\r\n {{ t(\"stackPropertiesHint\") }}\r\n </p>\r\n </div>\r\n }\r\n\r\n <!-- Extra Properties -->\r\n @if (shouldShowField(\"extraProperties\")) {\r\n <div class=\"col-span-full\">\r\n <mt-string-array-input\r\n [label]=\"t('extraProperties')\"\r\n formControlName=\"extraProperties\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n [placeholder]=\"t('selectProperties')\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Both set: the backend calculates the formula and ignores the\r\n Value Property, which nothing said (#1883). -->\r\n @if (\r\n shouldShowField(\"formula\") &&\r\n series.value.formula &&\r\n series.value.valueProperty\r\n ) {\r\n <p\r\n class=\"mt-3 rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-700\"\r\n >\r\n {{ t(\"formulaOverridesValueProperty\") }}\r\n </p>\r\n }\r\n\r\n <!-- Advanced Settings (Formula) -->\r\n @if (series.value.showAdvancedSettings && shouldShowField(\"formula\")) {\r\n <div\r\n [id]=\"advancedSettingsPanelId(i)\"\r\n role=\"region\"\r\n [attr.aria-labelledby]=\"advancedSettingsToggleId(i)\"\r\n class=\"mt-4 p-3 bg-surface-50 rounded-lg border border-surface-200\"\r\n >\r\n <div class=\"text-sm font-medium mb-2\">\r\n {{ t(\"advancedSettings\") }}\r\n </div>\r\n <label class=\"mb-2 block text-sm font-medium\">\r\n {{ t(\"formula\") }}\r\n </label>\r\n <mt-dashboard-formula-builder\r\n formControlName=\"formula\"\r\n [properties]=\"formulaProperties()\"\r\n [placeholder]=\"t('enterFormula')\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Filters Section -->\r\n @if (shouldShowField(\"filters\")) {\r\n <div class=\"mt-4 border border-surface-200 rounded-lg p-4\">\r\n <div class=\"flex items-center justify-between mb-3\">\r\n <span class=\"text-sm font-medium\">{{ t(\"seriesFilters\") }}</span>\r\n <mt-button\r\n icon=\"general.plus\"\r\n severity=\"secondary\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addFilter(i)\"\r\n [pTooltip]=\"t('addFilter')\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-col gap-3\" formArrayName=\"filters\">\r\n @for (\r\n filter of getFilters(series).controls;\r\n track trackByIndex(j);\r\n let j = $index\r\n ) {\r\n <div\r\n class=\"grid grid-cols-12 gap-2 p-3 bg-surface-50 rounded-lg border border-surface-100\"\r\n [formGroupName]=\"j\"\r\n >\r\n <!-- Property Key -->\r\n <div class=\"col-span-4\">\r\n <mt-select-field\r\n [label]=\"j === 0 ? t('property') : ''\"\r\n formControlName=\"propertyKey\"\r\n [options]=\"\r\n useGroupedSelect()\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n </div>\r\n\r\n <!-- Operator -->\r\n <div class=\"col-span-3\">\r\n <mt-select-field\r\n [label]=\"j === 0 ? t('operator') : ''\"\r\n formControlName=\"operator\"\r\n [options]=\"operatorsFor(filter.value.propertyKey)\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n </div>\r\n\r\n <!-- Value: picked from the property's values when it has a\r\n list (lookup, status, yes/no), typed otherwise. -->\r\n <div class=\"col-span-4\">\r\n @let valueList = valueOptions()[filter.value.propertyKey];\r\n @if (valueList && filter.value.operator === \"in\") {\r\n <mt-multi-select-field\r\n [label]=\"j === 0 ? t('value') : ''\"\r\n formControlName=\"value\"\r\n [options]=\"valueList\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectValues')\"\r\n />\r\n } @else if (valueList) {\r\n <mt-select-field\r\n [label]=\"j === 0 ? t('value') : ''\"\r\n formControlName=\"value\"\r\n [options]=\"valueList\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectValue')\"\r\n />\r\n } @else {\r\n <mt-text-field\r\n [label]=\"j === 0 ? t('value') : ''\"\r\n formControlName=\"value\"\r\n [placeholder]=\"\r\n filter.value.operator === 'in'\r\n ? t('enterValuesCommaSeparated')\r\n : t('enterValue')\r\n \"\r\n />\r\n }\r\n </div>\r\n\r\n <!-- Remove Filter -->\r\n <div class=\"col-span-1 flex items-end justify-end pb-1\">\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"removeFilter(i, j)\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (getFilters(series).length === 0) {\r\n <div class=\"text-center py-3 text-muted-color text-sm\">\r\n {{ t(\"noFiltersConfigured\") }}\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n @if (seriesArray.length === 0) {\r\n <div\r\n class=\"text-center py-8 text-muted-color border border-dashed border-surface-300 rounded-lg\"\r\n >\r\n <i class=\"mti mti-chart-bar text-3xl mb-2 block\"></i>\r\n <p class=\"mb-2\">{{ t(\"noSeriesConfigured\") }}</p>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addSeries')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addSeries()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "component", type: ColorPickerField, selector: "mt-color-picker-field", inputs: ["label", "appendTo", "placeholder", "class", "variant", "readonly", "pInputs", "required"], outputs: ["onChange"] }, { kind: "component", type: LegacyDashboardFormulaBuilder, selector: "mt-dashboard-formula-builder", inputs: ["properties", "placeholder"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: StringArrayInput, selector: "mt-string-array-input", inputs: ["label", "placeholder", "options", "group", "optionLabel", "optionValue", "optionGroupLabel", "optionGroupChildren", "filter", "emptyHint", "maxItems", "limitHint"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
39736
+ ], ngImport: i0, template: "<div\n class=\"flex flex-col gap-4\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n [formGroup]=\"queryForm\"\n>\n <!-- Category Property (shown for certain chart types) -->\n @if (shouldShowField(\"categoryProperty\")) {\n <div class=\"mb-2\">\n <mt-select-field\n [label]=\"t('categoryProperty')\"\n formControlName=\"categoryProperty\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectCategoryProperty')\"\n [filter]=\"true\"\n />\n </div>\n }\n\n @if (shouldShowField(\"tooltipProperties\")) {\n <div>\n <mt-string-array-input\n [label]=\"t('tooltipProperties')\"\n formControlName=\"tooltipProperties\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n [placeholder]=\"t('selectProperties')\"\n [maxItems]=\"20\"\n />\n <p class=\"mt-1 text-xs text-muted-color\">\n {{ t(\"tooltipPropertiesHint\") }}\n </p>\n </div>\n }\n\n <!-- Add Series Button -->\n @if (!singleSeries() || seriesArray.length === 0) {\n <div class=\"flex justify-end\">\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addSeries')\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addSeries()\"\n />\n </div>\n }\n\n <!-- Series List -->\n <div formArrayName=\"series\" class=\"flex flex-col gap-4\">\n @for (\n series of seriesArray.controls;\n track trackByIndex(i);\n let i = $index\n ) {\n <div\n class=\"p-4 rounded-lg border transition-all\"\n [class.border-red-500]=\"series.invalid\"\n [class.border-surface-200]=\"!series.invalid\"\n [formGroupName]=\"i\"\n >\n <!-- Series Header -->\n <div class=\"flex items-center justify-between mb-4\">\n <div class=\"flex items-center gap-2\">\n <span\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-600 text-sm font-semibold\"\n >\n {{ i + 1 }}\n </span>\n <span class=\"text-sm font-medium text-muted-color\">{{\n t(\"series\")\n }}</span>\n </div>\n <div class=\"flex items-center gap-2\">\n @if (shouldShowField(\"formula\")) {\n <button\n type=\"button\"\n class=\"inline-flex min-h-8 items-center justify-center gap-1.5 rounded-md border border-surface-300 bg-surface-0 px-3 py-1.5 text-sm font-medium text-color transition-colors hover:border-primary-400 hover:bg-primary-50 hover:text-primary-700 disabled:cursor-not-allowed disabled:opacity-50\"\n [id]=\"advancedSettingsToggleId(i)\"\n [attr.aria-expanded]=\"\n series.value.showAdvancedSettings ? 'true' : 'false'\n \"\n [attr.aria-controls]=\"advancedSettingsPanelId(i)\"\n [disabled]=\"disabled\"\n (click)=\"toggleAdvanced(i)\"\n >\n <mt-icon\n icon=\"general.settings-02\"\n class=\"text-base\"\n aria-hidden=\"true\"\n />\n <span>\n {{\n t(\n advancedSettingsActionKey(\n series.value.showAdvancedSettings\n )\n )\n }}\n </span>\n </button>\n }\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n [rounded]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"deleteSeries(i)\"\n />\n </div>\n </div>\n\n <div class=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4\">\n <!-- Auto Stack Toggle -->\n @if (shouldShowField(\"autoStack\")) {\n <div class=\"md:col-span-2 lg:col-span-3\">\n <mt-toggle-field\n [label]=\"t('autoStack')\"\n formControlName=\"autoStack\"\n />\n </div>\n }\n\n <!-- Series Name (legend / label text) -->\n @if (shouldShowField(\"seriesName\")) {\n <mt-text-field\n [label]=\"t('seriesName')\"\n formControlName=\"seriesName\"\n [placeholder]=\"t('seriesNamePlaceholder')\"\n />\n }\n\n <!-- Value Property -->\n @if (shouldShowField(\"valueProperty\") || series.value.autoStack) {\n <mt-select-field\n [label]=\"t('valueProperty')\"\n formControlName=\"valueProperty\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectValueProperty')\"\n [filter]=\"true\"\n />\n }\n\n <!-- Aggregate Function -->\n @if (shouldShowField(\"aggregateFunction\")) {\n <mt-select-field\n [label]=\"t('aggregateFunction')\"\n formControlName=\"aggregateFunction\"\n [options]=\"aggregateFunctions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n />\n }\n\n <!-- Color Picker -->\n @if (shouldShowField(\"color\")) {\n <mt-color-picker-field\n [label]=\"t('seriesColor')\"\n formControlName=\"color\"\n />\n }\n\n <!-- Bar Type (for stacked bar charts) -->\n @if (shouldShowField(\"barType\")) {\n <mt-select-field\n [label]=\"t('barType')\"\n formControlName=\"barType\"\n [options]=\"barTypes\"\n optionLabel=\"name\"\n optionValue=\"key\"\n />\n }\n\n <!-- Auto Stack By Property -->\n @if (\n shouldShowField(\"autoStackByProperty\") && series.value.autoStack\n ) {\n <mt-select-field\n [label]=\"t('autoStackByProperty')\"\n formControlName=\"autoStackByProperty\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n }\n\n <!-- Group By Properties -->\n @if (shouldShowField(\"groupByProperties\")) {\n <div class=\"col-span-full\">\n <mt-string-array-input\n [label]=\"t('groupByProperties')\"\n formControlName=\"groupByProperties\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n [placeholder]=\"t('selectProperties')\"\n [maxItems]=\"singleGroupBy() ? 1 : null\"\n [limitHint]=\"singleGroupBy() ? t('groupBySingleHint') : ''\"\n />\n </div>\n }\n\n <!-- Stack Properties (for stacked charts) -->\n @if (shouldShowField(\"stackProperties\") && !series.value.autoStack) {\n <div class=\"col-span-full\">\n <mt-string-array-input\n [label]=\"t('stackProperties')\"\n formControlName=\"stackProperties\"\n [options]=\"\n useGroupedSelect()\n ? numericPropertiesGrouped()\n : numericPropertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n [placeholder]=\"t('selectProperties')\"\n />\n <p class=\"mt-1 text-xs text-muted-color\">\n {{ t(\"stackPropertiesHint\") }}\n </p>\n </div>\n }\n\n <!-- Extra Properties -->\n @if (shouldShowField(\"extraProperties\")) {\n <div class=\"col-span-full\">\n <mt-string-array-input\n [label]=\"t('extraProperties')\"\n formControlName=\"extraProperties\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n [placeholder]=\"t('selectProperties')\"\n />\n </div>\n }\n </div>\n\n <!-- Both set: the backend calculates the formula and ignores the\n Value Property, which nothing said (#1883). -->\n @if (\n shouldShowField(\"formula\") &&\n series.value.formula &&\n series.value.valueProperty\n ) {\n <p\n class=\"mt-3 rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-700\"\n >\n {{ t(\"formulaOverridesValueProperty\") }}\n </p>\n }\n\n <!-- Advanced Settings (Formula) -->\n @if (series.value.showAdvancedSettings && shouldShowField(\"formula\")) {\n <div\n [id]=\"advancedSettingsPanelId(i)\"\n role=\"region\"\n [attr.aria-labelledby]=\"advancedSettingsToggleId(i)\"\n class=\"mt-4 p-3 bg-surface-50 rounded-lg border border-surface-200\"\n >\n <div class=\"text-sm font-medium mb-2\">\n {{ t(\"advancedSettings\") }}\n </div>\n <label class=\"mb-2 block text-sm font-medium\">\n {{ t(\"formula\") }}\n </label>\n <mt-dashboard-formula-builder\n formControlName=\"formula\"\n [properties]=\"formulaProperties()\"\n [placeholder]=\"t('enterFormula')\"\n />\n </div>\n }\n\n <!-- Filters Section -->\n @if (shouldShowField(\"filters\")) {\n <div class=\"mt-4 border border-surface-200 rounded-lg p-4\">\n <div class=\"flex items-center justify-between mb-3\">\n <span class=\"text-sm font-medium\">{{ t(\"seriesFilters\") }}</span>\n <mt-button\n icon=\"general.plus\"\n severity=\"secondary\"\n [rounded]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addFilter(i)\"\n [pTooltip]=\"t('addFilter')\"\n />\n </div>\n\n <div class=\"flex flex-col gap-3\" formArrayName=\"filters\">\n @for (\n filter of getFilters(series).controls;\n track trackByIndex(j);\n let j = $index\n ) {\n <div\n class=\"grid grid-cols-12 gap-2 p-3 bg-surface-50 rounded-lg border border-surface-100\"\n [formGroupName]=\"j\"\n >\n <!-- Property Key -->\n <div class=\"col-span-4\">\n <mt-select-field\n [label]=\"j === 0 ? t('property') : ''\"\n formControlName=\"propertyKey\"\n [options]=\"\n useGroupedSelect()\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n </div>\n\n <!-- Operator -->\n <div class=\"col-span-3\">\n <mt-select-field\n [label]=\"j === 0 ? t('operator') : ''\"\n formControlName=\"operator\"\n [options]=\"operatorsFor(filter.value.propertyKey)\"\n optionLabel=\"label\"\n optionValue=\"value\"\n />\n </div>\n\n <!-- Value: picked from the property's values when it has a\n list (lookup, status, yes/no), typed otherwise. -->\n <div class=\"col-span-4\">\n @let valueList = valueOptions()[filter.value.propertyKey];\n @if (valueList && filter.value.operator === \"in\") {\n <mt-multi-select-field\n [label]=\"j === 0 ? t('value') : ''\"\n formControlName=\"value\"\n [options]=\"valueList\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [filter]=\"true\"\n [placeholder]=\"t('selectValues')\"\n />\n } @else if (valueList) {\n <mt-select-field\n [label]=\"j === 0 ? t('value') : ''\"\n formControlName=\"value\"\n [options]=\"valueList\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [filter]=\"true\"\n [placeholder]=\"t('selectValue')\"\n />\n } @else {\n <mt-text-field\n [label]=\"j === 0 ? t('value') : ''\"\n formControlName=\"value\"\n [placeholder]=\"\n filter.value.operator === 'in'\n ? t('enterValuesCommaSeparated')\n : t('enterValue')\n \"\n />\n }\n </div>\n\n <!-- Remove Filter -->\n <div class=\"col-span-1 flex items-end justify-end pb-1\">\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n [rounded]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"removeFilter(i, j)\"\n />\n </div>\n </div>\n }\n\n @if (getFilters(series).length === 0) {\n <div class=\"text-center py-3 text-muted-color text-sm\">\n {{ t(\"noFiltersConfigured\") }}\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n\n @if (seriesArray.length === 0) {\n <div\n class=\"text-center py-8 text-muted-color border border-dashed border-surface-300 rounded-lg\"\n >\n <i class=\"mti mti-chart-bar text-3xl mb-2 block\"></i>\n <p class=\"mb-2\">{{ t(\"noSeriesConfigured\") }}</p>\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addSeries')\"\n severity=\"secondary\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addSeries()\"\n />\n </div>\n }\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "component", type: ColorPickerField, selector: "mt-color-picker-field", inputs: ["label", "appendTo", "placeholder", "class", "variant", "readonly", "pInputs", "required"], outputs: ["onChange"] }, { kind: "component", type: LegacyDashboardFormulaBuilder, selector: "mt-dashboard-formula-builder", inputs: ["properties", "placeholder"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: StringArrayInput, selector: "mt-string-array-input", inputs: ["label", "placeholder", "options", "group", "optionLabel", "optionValue", "optionGroupLabel", "optionGroupChildren", "filter", "emptyHint", "maxItems", "limitHint"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
39387
39737
  }
39388
39738
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GeneralQuery, decorators: [{
39389
39739
  type: Component,
@@ -39413,34 +39763,61 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
39413
39763
  useExisting: forwardRef(() => GeneralQuery),
39414
39764
  multi: true,
39415
39765
  },
39416
- ], template: "<div\r\n class=\"flex flex-col gap-4\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n [formGroup]=\"queryForm\"\r\n>\r\n <!-- Category Property (shown for certain chart types) -->\r\n @if (shouldShowField(\"categoryProperty\")) {\r\n <div class=\"mb-2\">\r\n <mt-select-field\r\n [label]=\"t('categoryProperty')\"\r\n formControlName=\"categoryProperty\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectCategoryProperty')\"\r\n [filter]=\"true\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Add Series Button -->\r\n @if (!singleSeries() || seriesArray.length === 0) {\r\n <div class=\"flex justify-end\">\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addSeries')\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addSeries()\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Series List -->\r\n <div formArrayName=\"series\" class=\"flex flex-col gap-4\">\r\n @for (\r\n series of seriesArray.controls;\r\n track trackByIndex(i);\r\n let i = $index\r\n ) {\r\n <div\r\n class=\"p-4 rounded-lg border transition-all\"\r\n [class.border-red-500]=\"series.invalid\"\r\n [class.border-surface-200]=\"!series.invalid\"\r\n [formGroupName]=\"i\"\r\n >\r\n <!-- Series Header -->\r\n <div class=\"flex items-center justify-between mb-4\">\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-600 text-sm font-semibold\"\r\n >\r\n {{ i + 1 }}\r\n </span>\r\n <span class=\"text-sm font-medium text-muted-color\">{{\r\n t(\"series\")\r\n }}</span>\r\n </div>\r\n <div class=\"flex items-center gap-2\">\r\n @if (shouldShowField(\"formula\")) {\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex min-h-8 items-center justify-center gap-1.5 rounded-md border border-surface-300 bg-surface-0 px-3 py-1.5 text-sm font-medium text-color transition-colors hover:border-primary-400 hover:bg-primary-50 hover:text-primary-700 disabled:cursor-not-allowed disabled:opacity-50\"\r\n [id]=\"advancedSettingsToggleId(i)\"\r\n [attr.aria-expanded]=\"\r\n series.value.showAdvancedSettings ? 'true' : 'false'\r\n \"\r\n [attr.aria-controls]=\"advancedSettingsPanelId(i)\"\r\n [disabled]=\"disabled\"\r\n (click)=\"toggleAdvanced(i)\"\r\n >\r\n <mt-icon\r\n icon=\"general.settings-02\"\r\n class=\"text-base\"\r\n aria-hidden=\"true\"\r\n />\r\n <span>\r\n {{\r\n t(\r\n advancedSettingsActionKey(\r\n series.value.showAdvancedSettings\r\n )\r\n )\r\n }}\r\n </span>\r\n </button>\r\n }\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"deleteSeries(i)\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4\">\r\n <!-- Auto Stack Toggle -->\r\n @if (shouldShowField(\"autoStack\")) {\r\n <div class=\"md:col-span-2 lg:col-span-3\">\r\n <mt-toggle-field\r\n [label]=\"t('autoStack')\"\r\n formControlName=\"autoStack\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Series Name (legend / label text) -->\r\n @if (shouldShowField(\"seriesName\")) {\r\n <mt-text-field\r\n [label]=\"t('seriesName')\"\r\n formControlName=\"seriesName\"\r\n [placeholder]=\"t('seriesNamePlaceholder')\"\r\n />\r\n }\r\n\r\n <!-- Value Property -->\r\n @if (shouldShowField(\"valueProperty\") || series.value.autoStack) {\r\n <mt-select-field\r\n [label]=\"t('valueProperty')\"\r\n formControlName=\"valueProperty\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectValueProperty')\"\r\n [filter]=\"true\"\r\n />\r\n }\r\n\r\n <!-- Aggregate Function -->\r\n @if (shouldShowField(\"aggregateFunction\")) {\r\n <mt-select-field\r\n [label]=\"t('aggregateFunction')\"\r\n formControlName=\"aggregateFunction\"\r\n [options]=\"aggregateFunctions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n }\r\n\r\n <!-- Color Picker -->\r\n @if (shouldShowField(\"color\")) {\r\n <mt-color-picker-field\r\n [label]=\"t('seriesColor')\"\r\n formControlName=\"color\"\r\n />\r\n }\r\n\r\n <!-- Bar Type (for stacked bar charts) -->\r\n @if (shouldShowField(\"barType\")) {\r\n <mt-select-field\r\n [label]=\"t('barType')\"\r\n formControlName=\"barType\"\r\n [options]=\"barTypes\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n />\r\n }\r\n\r\n <!-- Auto Stack By Property -->\r\n @if (\r\n shouldShowField(\"autoStackByProperty\") && series.value.autoStack\r\n ) {\r\n <mt-select-field\r\n [label]=\"t('autoStackByProperty')\"\r\n formControlName=\"autoStackByProperty\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n }\r\n\r\n <!-- Group By Properties -->\r\n @if (shouldShowField(\"groupByProperties\")) {\r\n <div class=\"col-span-full\">\r\n <mt-string-array-input\r\n [label]=\"t('groupByProperties')\"\r\n formControlName=\"groupByProperties\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n [placeholder]=\"t('selectProperties')\"\r\n [maxItems]=\"singleGroupBy() ? 1 : null\"\r\n [limitHint]=\"singleGroupBy() ? t('groupBySingleHint') : ''\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Stack Properties (for stacked charts) -->\r\n @if (shouldShowField(\"stackProperties\") && !series.value.autoStack) {\r\n <div class=\"col-span-full\">\r\n <mt-string-array-input\r\n [label]=\"t('stackProperties')\"\r\n formControlName=\"stackProperties\"\r\n [options]=\"\r\n useGroupedSelect()\r\n ? numericPropertiesGrouped()\r\n : numericPropertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n [placeholder]=\"t('selectProperties')\"\r\n />\r\n <p class=\"mt-1 text-xs text-muted-color\">\r\n {{ t(\"stackPropertiesHint\") }}\r\n </p>\r\n </div>\r\n }\r\n\r\n <!-- Extra Properties -->\r\n @if (shouldShowField(\"extraProperties\")) {\r\n <div class=\"col-span-full\">\r\n <mt-string-array-input\r\n [label]=\"t('extraProperties')\"\r\n formControlName=\"extraProperties\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n [placeholder]=\"t('selectProperties')\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Both set: the backend calculates the formula and ignores the\r\n Value Property, which nothing said (#1883). -->\r\n @if (\r\n shouldShowField(\"formula\") &&\r\n series.value.formula &&\r\n series.value.valueProperty\r\n ) {\r\n <p\r\n class=\"mt-3 rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-700\"\r\n >\r\n {{ t(\"formulaOverridesValueProperty\") }}\r\n </p>\r\n }\r\n\r\n <!-- Advanced Settings (Formula) -->\r\n @if (series.value.showAdvancedSettings && shouldShowField(\"formula\")) {\r\n <div\r\n [id]=\"advancedSettingsPanelId(i)\"\r\n role=\"region\"\r\n [attr.aria-labelledby]=\"advancedSettingsToggleId(i)\"\r\n class=\"mt-4 p-3 bg-surface-50 rounded-lg border border-surface-200\"\r\n >\r\n <div class=\"text-sm font-medium mb-2\">\r\n {{ t(\"advancedSettings\") }}\r\n </div>\r\n <label class=\"mb-2 block text-sm font-medium\">\r\n {{ t(\"formula\") }}\r\n </label>\r\n <mt-dashboard-formula-builder\r\n formControlName=\"formula\"\r\n [properties]=\"formulaProperties()\"\r\n [placeholder]=\"t('enterFormula')\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Filters Section -->\r\n @if (shouldShowField(\"filters\")) {\r\n <div class=\"mt-4 border border-surface-200 rounded-lg p-4\">\r\n <div class=\"flex items-center justify-between mb-3\">\r\n <span class=\"text-sm font-medium\">{{ t(\"seriesFilters\") }}</span>\r\n <mt-button\r\n icon=\"general.plus\"\r\n severity=\"secondary\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addFilter(i)\"\r\n [pTooltip]=\"t('addFilter')\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-col gap-3\" formArrayName=\"filters\">\r\n @for (\r\n filter of getFilters(series).controls;\r\n track trackByIndex(j);\r\n let j = $index\r\n ) {\r\n <div\r\n class=\"grid grid-cols-12 gap-2 p-3 bg-surface-50 rounded-lg border border-surface-100\"\r\n [formGroupName]=\"j\"\r\n >\r\n <!-- Property Key -->\r\n <div class=\"col-span-4\">\r\n <mt-select-field\r\n [label]=\"j === 0 ? t('property') : ''\"\r\n formControlName=\"propertyKey\"\r\n [options]=\"\r\n useGroupedSelect()\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n </div>\r\n\r\n <!-- Operator -->\r\n <div class=\"col-span-3\">\r\n <mt-select-field\r\n [label]=\"j === 0 ? t('operator') : ''\"\r\n formControlName=\"operator\"\r\n [options]=\"operatorsFor(filter.value.propertyKey)\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n </div>\r\n\r\n <!-- Value: picked from the property's values when it has a\r\n list (lookup, status, yes/no), typed otherwise. -->\r\n <div class=\"col-span-4\">\r\n @let valueList = valueOptions()[filter.value.propertyKey];\r\n @if (valueList && filter.value.operator === \"in\") {\r\n <mt-multi-select-field\r\n [label]=\"j === 0 ? t('value') : ''\"\r\n formControlName=\"value\"\r\n [options]=\"valueList\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectValues')\"\r\n />\r\n } @else if (valueList) {\r\n <mt-select-field\r\n [label]=\"j === 0 ? t('value') : ''\"\r\n formControlName=\"value\"\r\n [options]=\"valueList\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectValue')\"\r\n />\r\n } @else {\r\n <mt-text-field\r\n [label]=\"j === 0 ? t('value') : ''\"\r\n formControlName=\"value\"\r\n [placeholder]=\"\r\n filter.value.operator === 'in'\r\n ? t('enterValuesCommaSeparated')\r\n : t('enterValue')\r\n \"\r\n />\r\n }\r\n </div>\r\n\r\n <!-- Remove Filter -->\r\n <div class=\"col-span-1 flex items-end justify-end pb-1\">\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"removeFilter(i, j)\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (getFilters(series).length === 0) {\r\n <div class=\"text-center py-3 text-muted-color text-sm\">\r\n {{ t(\"noFiltersConfigured\") }}\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n @if (seriesArray.length === 0) {\r\n <div\r\n class=\"text-center py-8 text-muted-color border border-dashed border-surface-300 rounded-lg\"\r\n >\r\n <i class=\"mti mti-chart-bar text-3xl mb-2 block\"></i>\r\n <p class=\"mb-2\">{{ t(\"noSeriesConfigured\") }}</p>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addSeries')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addSeries()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n" }]
39766
+ ], template: "<div\n class=\"flex flex-col gap-4\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n [formGroup]=\"queryForm\"\n>\n <!-- Category Property (shown for certain chart types) -->\n @if (shouldShowField(\"categoryProperty\")) {\n <div class=\"mb-2\">\n <mt-select-field\n [label]=\"t('categoryProperty')\"\n formControlName=\"categoryProperty\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectCategoryProperty')\"\n [filter]=\"true\"\n />\n </div>\n }\n\n @if (shouldShowField(\"tooltipProperties\")) {\n <div>\n <mt-string-array-input\n [label]=\"t('tooltipProperties')\"\n formControlName=\"tooltipProperties\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n [placeholder]=\"t('selectProperties')\"\n [maxItems]=\"20\"\n />\n <p class=\"mt-1 text-xs text-muted-color\">\n {{ t(\"tooltipPropertiesHint\") }}\n </p>\n </div>\n }\n\n <!-- Add Series Button -->\n @if (!singleSeries() || seriesArray.length === 0) {\n <div class=\"flex justify-end\">\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addSeries')\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addSeries()\"\n />\n </div>\n }\n\n <!-- Series List -->\n <div formArrayName=\"series\" class=\"flex flex-col gap-4\">\n @for (\n series of seriesArray.controls;\n track trackByIndex(i);\n let i = $index\n ) {\n <div\n class=\"p-4 rounded-lg border transition-all\"\n [class.border-red-500]=\"series.invalid\"\n [class.border-surface-200]=\"!series.invalid\"\n [formGroupName]=\"i\"\n >\n <!-- Series Header -->\n <div class=\"flex items-center justify-between mb-4\">\n <div class=\"flex items-center gap-2\">\n <span\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-600 text-sm font-semibold\"\n >\n {{ i + 1 }}\n </span>\n <span class=\"text-sm font-medium text-muted-color\">{{\n t(\"series\")\n }}</span>\n </div>\n <div class=\"flex items-center gap-2\">\n @if (shouldShowField(\"formula\")) {\n <button\n type=\"button\"\n class=\"inline-flex min-h-8 items-center justify-center gap-1.5 rounded-md border border-surface-300 bg-surface-0 px-3 py-1.5 text-sm font-medium text-color transition-colors hover:border-primary-400 hover:bg-primary-50 hover:text-primary-700 disabled:cursor-not-allowed disabled:opacity-50\"\n [id]=\"advancedSettingsToggleId(i)\"\n [attr.aria-expanded]=\"\n series.value.showAdvancedSettings ? 'true' : 'false'\n \"\n [attr.aria-controls]=\"advancedSettingsPanelId(i)\"\n [disabled]=\"disabled\"\n (click)=\"toggleAdvanced(i)\"\n >\n <mt-icon\n icon=\"general.settings-02\"\n class=\"text-base\"\n aria-hidden=\"true\"\n />\n <span>\n {{\n t(\n advancedSettingsActionKey(\n series.value.showAdvancedSettings\n )\n )\n }}\n </span>\n </button>\n }\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n [rounded]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"deleteSeries(i)\"\n />\n </div>\n </div>\n\n <div class=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4\">\n <!-- Auto Stack Toggle -->\n @if (shouldShowField(\"autoStack\")) {\n <div class=\"md:col-span-2 lg:col-span-3\">\n <mt-toggle-field\n [label]=\"t('autoStack')\"\n formControlName=\"autoStack\"\n />\n </div>\n }\n\n <!-- Series Name (legend / label text) -->\n @if (shouldShowField(\"seriesName\")) {\n <mt-text-field\n [label]=\"t('seriesName')\"\n formControlName=\"seriesName\"\n [placeholder]=\"t('seriesNamePlaceholder')\"\n />\n }\n\n <!-- Value Property -->\n @if (shouldShowField(\"valueProperty\") || series.value.autoStack) {\n <mt-select-field\n [label]=\"t('valueProperty')\"\n formControlName=\"valueProperty\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectValueProperty')\"\n [filter]=\"true\"\n />\n }\n\n <!-- Aggregate Function -->\n @if (shouldShowField(\"aggregateFunction\")) {\n <mt-select-field\n [label]=\"t('aggregateFunction')\"\n formControlName=\"aggregateFunction\"\n [options]=\"aggregateFunctions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n />\n }\n\n <!-- Color Picker -->\n @if (shouldShowField(\"color\")) {\n <mt-color-picker-field\n [label]=\"t('seriesColor')\"\n formControlName=\"color\"\n />\n }\n\n <!-- Bar Type (for stacked bar charts) -->\n @if (shouldShowField(\"barType\")) {\n <mt-select-field\n [label]=\"t('barType')\"\n formControlName=\"barType\"\n [options]=\"barTypes\"\n optionLabel=\"name\"\n optionValue=\"key\"\n />\n }\n\n <!-- Auto Stack By Property -->\n @if (\n shouldShowField(\"autoStackByProperty\") && series.value.autoStack\n ) {\n <mt-select-field\n [label]=\"t('autoStackByProperty')\"\n formControlName=\"autoStackByProperty\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n }\n\n <!-- Group By Properties -->\n @if (shouldShowField(\"groupByProperties\")) {\n <div class=\"col-span-full\">\n <mt-string-array-input\n [label]=\"t('groupByProperties')\"\n formControlName=\"groupByProperties\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n [placeholder]=\"t('selectProperties')\"\n [maxItems]=\"singleGroupBy() ? 1 : null\"\n [limitHint]=\"singleGroupBy() ? t('groupBySingleHint') : ''\"\n />\n </div>\n }\n\n <!-- Stack Properties (for stacked charts) -->\n @if (shouldShowField(\"stackProperties\") && !series.value.autoStack) {\n <div class=\"col-span-full\">\n <mt-string-array-input\n [label]=\"t('stackProperties')\"\n formControlName=\"stackProperties\"\n [options]=\"\n useGroupedSelect()\n ? numericPropertiesGrouped()\n : numericPropertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n [placeholder]=\"t('selectProperties')\"\n />\n <p class=\"mt-1 text-xs text-muted-color\">\n {{ t(\"stackPropertiesHint\") }}\n </p>\n </div>\n }\n\n <!-- Extra Properties -->\n @if (shouldShowField(\"extraProperties\")) {\n <div class=\"col-span-full\">\n <mt-string-array-input\n [label]=\"t('extraProperties')\"\n formControlName=\"extraProperties\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n [placeholder]=\"t('selectProperties')\"\n />\n </div>\n }\n </div>\n\n <!-- Both set: the backend calculates the formula and ignores the\n Value Property, which nothing said (#1883). -->\n @if (\n shouldShowField(\"formula\") &&\n series.value.formula &&\n series.value.valueProperty\n ) {\n <p\n class=\"mt-3 rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-700\"\n >\n {{ t(\"formulaOverridesValueProperty\") }}\n </p>\n }\n\n <!-- Advanced Settings (Formula) -->\n @if (series.value.showAdvancedSettings && shouldShowField(\"formula\")) {\n <div\n [id]=\"advancedSettingsPanelId(i)\"\n role=\"region\"\n [attr.aria-labelledby]=\"advancedSettingsToggleId(i)\"\n class=\"mt-4 p-3 bg-surface-50 rounded-lg border border-surface-200\"\n >\n <div class=\"text-sm font-medium mb-2\">\n {{ t(\"advancedSettings\") }}\n </div>\n <label class=\"mb-2 block text-sm font-medium\">\n {{ t(\"formula\") }}\n </label>\n <mt-dashboard-formula-builder\n formControlName=\"formula\"\n [properties]=\"formulaProperties()\"\n [placeholder]=\"t('enterFormula')\"\n />\n </div>\n }\n\n <!-- Filters Section -->\n @if (shouldShowField(\"filters\")) {\n <div class=\"mt-4 border border-surface-200 rounded-lg p-4\">\n <div class=\"flex items-center justify-between mb-3\">\n <span class=\"text-sm font-medium\">{{ t(\"seriesFilters\") }}</span>\n <mt-button\n icon=\"general.plus\"\n severity=\"secondary\"\n [rounded]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addFilter(i)\"\n [pTooltip]=\"t('addFilter')\"\n />\n </div>\n\n <div class=\"flex flex-col gap-3\" formArrayName=\"filters\">\n @for (\n filter of getFilters(series).controls;\n track trackByIndex(j);\n let j = $index\n ) {\n <div\n class=\"grid grid-cols-12 gap-2 p-3 bg-surface-50 rounded-lg border border-surface-100\"\n [formGroupName]=\"j\"\n >\n <!-- Property Key -->\n <div class=\"col-span-4\">\n <mt-select-field\n [label]=\"j === 0 ? t('property') : ''\"\n formControlName=\"propertyKey\"\n [options]=\"\n useGroupedSelect()\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n </div>\n\n <!-- Operator -->\n <div class=\"col-span-3\">\n <mt-select-field\n [label]=\"j === 0 ? t('operator') : ''\"\n formControlName=\"operator\"\n [options]=\"operatorsFor(filter.value.propertyKey)\"\n optionLabel=\"label\"\n optionValue=\"value\"\n />\n </div>\n\n <!-- Value: picked from the property's values when it has a\n list (lookup, status, yes/no), typed otherwise. -->\n <div class=\"col-span-4\">\n @let valueList = valueOptions()[filter.value.propertyKey];\n @if (valueList && filter.value.operator === \"in\") {\n <mt-multi-select-field\n [label]=\"j === 0 ? t('value') : ''\"\n formControlName=\"value\"\n [options]=\"valueList\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [filter]=\"true\"\n [placeholder]=\"t('selectValues')\"\n />\n } @else if (valueList) {\n <mt-select-field\n [label]=\"j === 0 ? t('value') : ''\"\n formControlName=\"value\"\n [options]=\"valueList\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [filter]=\"true\"\n [placeholder]=\"t('selectValue')\"\n />\n } @else {\n <mt-text-field\n [label]=\"j === 0 ? t('value') : ''\"\n formControlName=\"value\"\n [placeholder]=\"\n filter.value.operator === 'in'\n ? t('enterValuesCommaSeparated')\n : t('enterValue')\n \"\n />\n }\n </div>\n\n <!-- Remove Filter -->\n <div class=\"col-span-1 flex items-end justify-end pb-1\">\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n [rounded]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"removeFilter(i, j)\"\n />\n </div>\n </div>\n }\n\n @if (getFilters(series).length === 0) {\n <div class=\"text-center py-3 text-muted-color text-sm\">\n {{ t(\"noFiltersConfigured\") }}\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n\n @if (seriesArray.length === 0) {\n <div\n class=\"text-center py-8 text-muted-color border border-dashed border-surface-300 rounded-lg\"\n >\n <i class=\"mti mti-chart-bar text-3xl mb-2 block\"></i>\n <p class=\"mb-2\">{{ t(\"noSeriesConfigured\") }}</p>\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addSeries')\"\n severity=\"secondary\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addSeries()\"\n />\n </div>\n }\n </div>\n</div>\n" }]
39417
39767
  }], ctorParameters: () => [], propDecorators: { chartType: [{ type: i0.Input, args: [{ isSignal: true, alias: "chartType", required: false }] }], querySchema: [{ type: i0.Input, args: [{ isSignal: true, alias: "querySchema", required: false }] }], propertiesFlat: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesFlat", required: false }] }], propertiesGrouped: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesGrouped", required: false }] }] } });
39418
39768
 
39769
+ const DATE_VIEW_TYPES = new Set(['date', 'datetime']);
39419
39770
  /** The backend's LineChart route accepts one BarChartQuery, not series[]. */
39420
39771
  class LineChartQuery {
39421
39772
  fb = inject(FormBuilder);
39773
+ transloco = inject(TranslocoService);
39422
39774
  propertiesFlat = input([], ...(ngDevMode ? [{ debugName: "propertiesFlat" }] : /* istanbul ignore next */ []));
39423
39775
  propertiesGrouped = input([], ...(ngDevMode ? [{ debugName: "propertiesGrouped" }] : /* istanbul ignore next */ []));
39424
39776
  useGroupedSelect = computed(() => this.propertiesGrouped().length > 1, ...(ngDevMode ? [{ debugName: "useGroupedSelect" }] : /* istanbul ignore next */ []));
39777
+ // The backend LineChart takes Sum, Avg, Count, Min, Max and Last (#1877).
39425
39778
  aggregateFunctions = [
39426
39779
  { value: 'Sum', label: 'Sum' },
39427
39780
  { value: 'Avg', label: 'Average' },
39428
39781
  { value: 'Count', label: 'Count' },
39782
+ { value: 'Min', label: 'Min' },
39783
+ { value: 'Max', label: 'Max' },
39784
+ { value: 'Last', label: 'Last' },
39429
39785
  ];
39786
+ dateGroupings = computed(() => ['day', 'month', 'quarter', 'year'].map((value) => ({
39787
+ value,
39788
+ label: this.transloco.translate(`dashboardBuilder.dateGrouping_${value}`),
39789
+ })), ...(ngDevMode ? [{ debugName: "dateGroupings" }] : /* istanbul ignore next */ []));
39430
39790
  queryForm = this.fb.nonNullable.group({
39431
39791
  xAxisProperty: '',
39432
39792
  yAxisProperty: '',
39433
39793
  function: 'Sum',
39434
39794
  extraProperties: [[]],
39795
+ dateGrouping: 'day',
39796
+ tooltipProperties: [[]],
39435
39797
  });
39798
+ /** Period grouping applies only to a Date / DateTime X axis. */
39799
+ isDateAxis() {
39800
+ const key = this.queryForm.controls.xAxisProperty.value;
39801
+ const property = this.propertiesFlat().find((p) => p.key === key);
39802
+ return DATE_VIEW_TYPES.has(String(property?.viewType ?? '').toLowerCase());
39803
+ }
39436
39804
  onChange = () => { };
39437
39805
  onTouched = () => { };
39438
39806
  constructor() {
39439
39807
  this.queryForm.valueChanges.subscribe(() => {
39440
- this.onChange(this.queryForm.getRawValue());
39808
+ this.onChange(this.toValue());
39441
39809
  this.onTouched();
39442
39810
  });
39443
39811
  }
39812
+ /** `day` is the backend default, so it is left out of saved configs. */
39813
+ toValue() {
39814
+ const { dateGrouping, tooltipProperties, ...rest } = this.queryForm.getRawValue();
39815
+ return {
39816
+ ...rest,
39817
+ ...(dateGrouping && dateGrouping !== 'day' ? { dateGrouping } : {}),
39818
+ ...(tooltipProperties.length ? { tooltipProperties } : {}),
39819
+ };
39820
+ }
39444
39821
  writeValue(value) {
39445
39822
  if (!value)
39446
39823
  return;
@@ -39449,6 +39826,8 @@ class LineChartQuery {
39449
39826
  yAxisProperty: value.yAxisProperty || '',
39450
39827
  function: value.function || 'Sum',
39451
39828
  extraProperties: value.extraProperties || [],
39829
+ dateGrouping: value.dateGrouping || 'day',
39830
+ tooltipProperties: value.tooltipProperties || [],
39452
39831
  };
39453
39832
  // ngModel feeds the emitted value back; never create a valueChanges loop.
39454
39833
  if (JSON.stringify(next) === JSON.stringify(this.queryForm.getRawValue()))
@@ -39474,7 +39853,7 @@ class LineChartQuery {
39474
39853
  : { lineChartQueryInvalid: true };
39475
39854
  }
39476
39855
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LineChartQuery, deps: [], target: i0.ɵɵFactoryTarget.Component });
39477
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: LineChartQuery, isStandalone: true, selector: "mt-line-chart-query", inputs: { propertiesFlat: { classPropertyName: "propertiesFlat", publicName: "propertiesFlat", isSignal: true, isRequired: false, transformFunction: null }, propertiesGrouped: { classPropertyName: "propertiesGrouped", publicName: "propertiesGrouped", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
39856
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: LineChartQuery, isStandalone: true, selector: "mt-line-chart-query", inputs: { propertiesFlat: { classPropertyName: "propertiesFlat", publicName: "propertiesFlat", isSignal: true, isRequired: false, transformFunction: null }, propertiesGrouped: { classPropertyName: "propertiesGrouped", publicName: "propertiesGrouped", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
39478
39857
  {
39479
39858
  provide: NG_VALUE_ACCESSOR,
39480
39859
  useExisting: forwardRef(() => LineChartQuery),
@@ -39485,7 +39864,7 @@ class LineChartQuery {
39485
39864
  useExisting: forwardRef(() => LineChartQuery),
39486
39865
  multi: true,
39487
39866
  },
39488
- ], ngImport: i0, template: "<div\r\n class=\"grid grid-cols-1 gap-4 md:grid-cols-2\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n [formGroup]=\"queryForm\"\r\n>\r\n <mt-select-field\r\n [label]=\"t('xAxisProperty')\"\r\n formControlName=\"xAxisProperty\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n <mt-select-field\r\n [label]=\"t('yAxisProperty')\"\r\n formControlName=\"yAxisProperty\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n <mt-select-field\r\n [label]=\"t('aggregateFunction')\"\r\n formControlName=\"function\"\r\n [options]=\"aggregateFunctions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n <mt-string-array-input\r\n [label]=\"t('extraProperties')\"\r\n formControlName=\"extraProperties\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n [placeholder]=\"t('selectProperties')\"\r\n />\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: 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: StringArrayInput, selector: "mt-string-array-input", inputs: ["label", "placeholder", "options", "group", "optionLabel", "optionValue", "optionGroupLabel", "optionGroupChildren", "filter", "emptyHint", "maxItems", "limitHint"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
39867
+ ], ngImport: i0, template: "<div\n class=\"grid grid-cols-1 gap-4 md:grid-cols-2\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n [formGroup]=\"queryForm\"\n>\n <mt-select-field\n [label]=\"t('xAxisProperty')\"\n formControlName=\"xAxisProperty\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n <mt-select-field\n [label]=\"t('yAxisProperty')\"\n formControlName=\"yAxisProperty\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n <mt-select-field\n [label]=\"t('aggregateFunction')\"\n formControlName=\"function\"\n [options]=\"aggregateFunctions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n />\n @if (isDateAxis()) {\n <mt-select-field\n [label]=\"t('dateGrouping')\"\n formControlName=\"dateGrouping\"\n [options]=\"dateGroupings()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n />\n }\n <mt-string-array-input\n [label]=\"t('tooltipProperties')\"\n formControlName=\"tooltipProperties\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n [placeholder]=\"t('selectProperties')\"\n [maxItems]=\"20\"\n />\n <mt-string-array-input\n [label]=\"t('extraProperties')\"\n formControlName=\"extraProperties\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n [placeholder]=\"t('selectProperties')\"\n />\n</div>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: 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: StringArrayInput, selector: "mt-string-array-input", inputs: ["label", "placeholder", "options", "group", "optionLabel", "optionValue", "optionGroupLabel", "optionGroupChildren", "filter", "emptyHint", "maxItems", "limitHint"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
39489
39868
  }
39490
39869
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LineChartQuery, decorators: [{
39491
39870
  type: Component,
@@ -39505,7 +39884,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
39505
39884
  useExisting: forwardRef(() => LineChartQuery),
39506
39885
  multi: true,
39507
39886
  },
39508
- ], template: "<div\r\n class=\"grid grid-cols-1 gap-4 md:grid-cols-2\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n [formGroup]=\"queryForm\"\r\n>\r\n <mt-select-field\r\n [label]=\"t('xAxisProperty')\"\r\n formControlName=\"xAxisProperty\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n <mt-select-field\r\n [label]=\"t('yAxisProperty')\"\r\n formControlName=\"yAxisProperty\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n <mt-select-field\r\n [label]=\"t('aggregateFunction')\"\r\n formControlName=\"function\"\r\n [options]=\"aggregateFunctions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n <mt-string-array-input\r\n [label]=\"t('extraProperties')\"\r\n formControlName=\"extraProperties\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n [placeholder]=\"t('selectProperties')\"\r\n />\r\n</div>\r\n" }]
39887
+ ], template: "<div\n class=\"grid grid-cols-1 gap-4 md:grid-cols-2\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n [formGroup]=\"queryForm\"\n>\n <mt-select-field\n [label]=\"t('xAxisProperty')\"\n formControlName=\"xAxisProperty\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n <mt-select-field\n [label]=\"t('yAxisProperty')\"\n formControlName=\"yAxisProperty\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n <mt-select-field\n [label]=\"t('aggregateFunction')\"\n formControlName=\"function\"\n [options]=\"aggregateFunctions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n />\n @if (isDateAxis()) {\n <mt-select-field\n [label]=\"t('dateGrouping')\"\n formControlName=\"dateGrouping\"\n [options]=\"dateGroupings()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n />\n }\n <mt-string-array-input\n [label]=\"t('tooltipProperties')\"\n formControlName=\"tooltipProperties\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n [placeholder]=\"t('selectProperties')\"\n [maxItems]=\"20\"\n />\n <mt-string-array-input\n [label]=\"t('extraProperties')\"\n formControlName=\"extraProperties\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n [placeholder]=\"t('selectProperties')\"\n />\n</div>\n" }]
39509
39888
  }], ctorParameters: () => [], propDecorators: { propertiesFlat: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesFlat", required: false }] }], propertiesGrouped: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesGrouped", required: false }] }] } });
39510
39889
 
39511
39890
  /**
@@ -40233,6 +40612,8 @@ class MapQuery {
40233
40612
  }, ...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
40234
40613
  /** Disabled state */
40235
40614
  disabled = false;
40615
+ /** One stable empty list; a fresh `[]` per check can loop a signal field. */
40616
+ noProperties = [];
40236
40617
  /** ControlValueAccessor callbacks */
40237
40618
  onChange = () => { };
40238
40619
  onTouched = () => { };
@@ -40276,7 +40657,7 @@ class MapQuery {
40276
40657
  useExisting: forwardRef(() => MapQuery),
40277
40658
  multi: true,
40278
40659
  },
40279
- ], 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 <!-- Location Property -->\r\n <mt-select-field\r\n [label]=\"t('locationProperty')\"\r\n [options]=\"locationOptions()\"\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().locationProperty\"\r\n (ngModelChange)=\"updateField('locationProperty', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n\r\n <!-- Grouping Property -->\r\n <mt-select-field\r\n [label]=\"t('groupingProperty')\"\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('noGrouping')\"\r\n [ngModel]=\"query().groupingProperty\"\r\n (ngModelChange)=\"updateField('groupingProperty', $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 });
40660
+ ], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- Location Property -->\n <mt-select-field\n [label]=\"t('locationProperty')\"\n [options]=\"locationOptions()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().locationProperty\"\n (ngModelChange)=\"updateField('locationProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Grouping Property -->\n <mt-select-field\n [label]=\"t('groupingProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('noGrouping')\"\n [ngModel]=\"query().groupingProperty\"\n (ngModelChange)=\"updateField('groupingProperty', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n\n <!-- Extra Properties -->\n <div class=\"w-full\">\n <mt-multi-select-field\n [label]=\"t('extraProperties')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperties')\"\n [ngModel]=\"query().extraProperties\"\n (ngModelChange)=\"updateField('extraProperties', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n\n <!-- Tooltip Properties: shown on hover, not used for dialog filtering -->\n <div class=\"w-full\">\n <mt-multi-select-field\n [label]=\"t('tooltipProperties')\"\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().tooltipProperties ?? noProperties\"\n (ngModelChange)=\"updateField('tooltipProperties', $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 });
40280
40661
  }
40281
40662
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MapQuery, decorators: [{
40282
40663
  type: Component,
@@ -40292,7 +40673,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
40292
40673
  useExisting: forwardRef(() => MapQuery),
40293
40674
  multi: true,
40294
40675
  },
40295
- ], 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 <!-- Location Property -->\r\n <mt-select-field\r\n [label]=\"t('locationProperty')\"\r\n [options]=\"locationOptions()\"\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().locationProperty\"\r\n (ngModelChange)=\"updateField('locationProperty', $event)\"\r\n [disabled]=\"disabled\"\r\n />\r\n\r\n <!-- Grouping Property -->\r\n <mt-select-field\r\n [label]=\"t('groupingProperty')\"\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('noGrouping')\"\r\n [ngModel]=\"query().groupingProperty\"\r\n (ngModelChange)=\"updateField('groupingProperty', $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" }]
40676
+ ], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- Location Property -->\n <mt-select-field\n [label]=\"t('locationProperty')\"\n [options]=\"locationOptions()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().locationProperty\"\n (ngModelChange)=\"updateField('locationProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Grouping Property -->\n <mt-select-field\n [label]=\"t('groupingProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('noGrouping')\"\n [ngModel]=\"query().groupingProperty\"\n (ngModelChange)=\"updateField('groupingProperty', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n\n <!-- Extra Properties -->\n <div class=\"w-full\">\n <mt-multi-select-field\n [label]=\"t('extraProperties')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperties')\"\n [ngModel]=\"query().extraProperties\"\n (ngModelChange)=\"updateField('extraProperties', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n\n <!-- Tooltip Properties: shown on hover, not used for dialog filtering -->\n <div class=\"w-full\">\n <mt-multi-select-field\n [label]=\"t('tooltipProperties')\"\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().tooltipProperties ?? noProperties\"\n (ngModelChange)=\"updateField('tooltipProperties', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n</div>\n" }]
40296
40677
  }], propDecorators: { propertiesFlat: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesFlat", required: false }] }], propertiesGrouped: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesGrouped", required: false }] }] } });
40297
40678
 
40298
40679
  /**
@@ -40909,6 +41290,20 @@ class DataSourceSettings {
40909
41290
  .filter((module) => ids.includes(String(module.selectionId)))
40910
41291
  .map((module) => module.moduleName);
40911
41292
  }, ...(ngDevMode ? [{ debugName: "unlinkedSelectionNames" }] : /* istanbul ignore next */ []));
41293
+ /** Linked selections that repeat an earlier selection's module (#1860). */
41294
+ duplicateSelectionNames = computed(() => {
41295
+ const ids = duplicateSelectionIds({
41296
+ selection: this.selections(),
41297
+ sourceLinks: this.sourceLinks(),
41298
+ }).map(String);
41299
+ return this.selectionModules()
41300
+ .map((module, index) => ({
41301
+ module,
41302
+ label: `${index + 1} - ${module.moduleName}`,
41303
+ }))
41304
+ .filter(({ module }) => ids.includes(String(module.selectionId)))
41305
+ .map(({ label }) => label);
41306
+ }, ...(ngDevMode ? [{ debugName: "duplicateSelectionNames" }] : /* istanbul ignore next */ []));
40912
41307
  /** Hide selection config for layout and snapshot types (they don't need data source selection) */
40913
41308
  hideSelectionConfig = computed(() => {
40914
41309
  const queryType = this.queryComponentType();
@@ -41126,6 +41521,16 @@ class DataSourceSettings {
41126
41521
  const links = selections.length < 2
41127
41522
  ? []
41128
41523
  : reconcileSourceLinks(this.sourceLinks(), this.linkedSelectors, nextSelectors);
41524
+ // A departed source's fields can no longer be read: stop requesting them
41525
+ // (#1859).
41526
+ const orphanKeys = orphanPropertyKeys(this.linkedSelectors, nextSelectors, (selector) => this.modulesProperties()
41527
+ .find((module) => module.selector === selector)
41528
+ ?.properties.map((property) => property.key) ?? []);
41529
+ const query = this.query();
41530
+ const nextQuery = withoutPropertyKeys(query, orphanKeys);
41531
+ if (nextQuery !== query) {
41532
+ this.query.set(nextQuery ?? null);
41533
+ }
41129
41534
  this.linkedSelectors = nextSelectors;
41130
41535
  const linksChanged = JSON.stringify(links) !== JSON.stringify(this.sourceLinks());
41131
41536
  if (linksChanged) {
@@ -41139,6 +41544,7 @@ class DataSourceSettings {
41139
41544
  sourceLinks: links.map((l, i) => toBackendSourceLink(l, i + 1)),
41140
41545
  }
41141
41546
  : {}),
41547
+ ...(nextQuery !== query ? { query: nextQuery } : {}),
41142
41548
  workspaceId: this.selectedWorkspaceId(),
41143
41549
  ...this.getContextTargetState(),
41144
41550
  });
@@ -41262,8 +41668,13 @@ class DataSourceSettings {
41262
41668
  this.groupByMultiple.set([]);
41263
41669
  this.chartWorkspace.set(null);
41264
41670
  this.confirmingWorkspaceChange.set(false);
41671
+ // The old workspace id would be auto-detected straight back (#1845).
41672
+ this.selectedWorkspaceId.set(null);
41673
+ this.workspaceAutoDetected.set(false);
41674
+ this.userClearedWorkspace.set(true);
41265
41675
  this.serviceConfigChange.emit({
41266
41676
  workspace: null,
41677
+ workspaceId: null,
41267
41678
  selection: [],
41268
41679
  sourceLinks: [],
41269
41680
  query: null,
@@ -41837,7 +42248,7 @@ class DataSourceSettings {
41837
42248
  };
41838
42249
  }
41839
42250
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DataSourceSettings, deps: [], target: i0.ɵɵFactoryTarget.Component });
41840
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DataSourceSettings, isStandalone: true, selector: "mt-data-source-settings", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, chartType: { classPropertyName: "chartType", publicName: "chartType", isSignal: true, isRequired: false, transformFunction: null }, informativeContext: { classPropertyName: "informativeContext", publicName: "informativeContext", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { serviceConfigChange: "serviceConfigChange" }, ngImport: i0, template: "<div class=\"flex flex-col gap-5\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Data source mode: Selection cycle OR Custom API (separated area on top) -->\r\n @if (supportsCustomApi()) {\r\n <div class=\"grid grid-cols-2 gap-3\">\r\n <button\r\n type=\"button\"\r\n class=\"flex items-start gap-2 rounded-lg border p-3 text-left transition-colors\"\r\n [class.border-primary-500]=\"dataSourceMode() === 'selection'\"\r\n [class.bg-primary-50]=\"dataSourceMode() === 'selection'\"\r\n [class.border-surface-200]=\"dataSourceMode() !== 'selection'\"\r\n [class.hover:bg-surface-50]=\"dataSourceMode() !== 'selection'\"\r\n (click)=\"onModeChange('selection')\"\r\n >\r\n <mt-icon\r\n icon=\"dev.database-01\"\r\n class=\"mt-0.5 text-lg\"\r\n [class.text-primary-600]=\"dataSourceMode() === 'selection'\"\r\n [class.text-muted-color]=\"dataSourceMode() !== 'selection'\"\r\n />\r\n <span class=\"flex flex-col\">\r\n <span class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"dataSourceModes.selection\") }}\r\n </span>\r\n <span class=\"text-xs text-muted-color\">\r\n {{ t(\"dataSourceModes.selectionHint\") }}\r\n </span>\r\n </span>\r\n </button>\r\n\r\n <button\r\n type=\"button\"\r\n class=\"flex items-start gap-2 rounded-lg border p-3 text-left transition-colors\"\r\n [class.border-primary-500]=\"dataSourceMode() === 'customApi'\"\r\n [class.bg-primary-50]=\"dataSourceMode() === 'customApi'\"\r\n [class.border-surface-200]=\"dataSourceMode() !== 'customApi'\"\r\n [class.hover:bg-surface-50]=\"dataSourceMode() !== 'customApi'\"\r\n (click)=\"onModeChange('customApi')\"\r\n >\r\n <mt-icon\r\n icon=\"dev.code-02\"\r\n class=\"mt-0.5 text-lg\"\r\n [class.text-primary-600]=\"dataSourceMode() === 'customApi'\"\r\n [class.text-muted-color]=\"dataSourceMode() !== 'customApi'\"\r\n />\r\n <span class=\"flex flex-col\">\r\n <span class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"dataSourceModes.customApi\") }}\r\n </span>\r\n <span class=\"text-xs text-muted-color\">\r\n {{ t(\"dataSourceModes.customApiHint\") }}\r\n </span>\r\n </span>\r\n </button>\r\n </div>\r\n }\r\n\r\n <!-- ===================== CUSTOM API MODE ===================== -->\r\n @if (supportsCustomApi() && dataSourceMode() === \"customApi\") {\r\n <mt-custom-api-configuration\r\n [ngModel]=\"customApi()\"\r\n (ngModelChange)=\"onCustomApiChange($event)\"\r\n />\r\n } @else {\r\n <!-- ===================== SELECTION CYCLE ===================== -->\r\n\r\n <!-- Workspace gate: pick ONE workspace before the tabs/config appear.\r\n The picker shows whenever no workspace is chosen yet \u2014 for a brand-new\r\n chart it also blocks the tabs (needsWorkspacePick), but an existing\r\n chart that never had a workspace still gets the picker so it can be\r\n assigned (and saved into serviceConfig.workspaceId for navigate-to). -->\r\n @if (showWorkspaceGate()) {\r\n @if (!chartWorkspace()) {\r\n <div\r\n class=\"flex flex-col items-center gap-3 rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6 text-center\"\r\n >\r\n <mt-icon icon=\"dev.database-01\" class=\"text-3xl text-primary-500\" />\r\n <div class=\"flex flex-col gap-1\">\r\n <h3 class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"workspaceGateTitle\") }}\r\n </h3>\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"workspaceGateHint\") }}\r\n </p>\r\n </div>\r\n <div class=\"w-full max-w-sm\">\r\n <mt-select-field\r\n [options]=\"workspaceOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [placeholder]=\"t('selectWorkspace')\"\r\n [filter]=\"true\"\r\n [ngModel]=\"chartWorkspace()\"\r\n (ngModelChange)=\"onWorkspacePick($event)\"\r\n />\r\n </div>\r\n </div>\r\n } @else if (workspaceAutoDetected()) {\r\n <!-- Old data: workspace inferred from the chart's existing config.\r\n Surface it with a Save-to-keep / Clear notice instead of a silent\r\n chip, so the user knows it must be saved (or can pick another). -->\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-3 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2\"\r\n >\r\n <span class=\"flex items-start gap-2 text-sm\">\r\n <mt-icon\r\n icon=\"general.alert-circle\"\r\n class=\"mt-0.5 text-base text-amber-600\"\r\n />\r\n <span class=\"flex flex-col\">\r\n <span class=\"font-medium text-surface-700\">\r\n {{ t(\"workspace\") }}: {{ chartWorkspaceLabel() }}\r\n </span>\r\n <span class=\"text-xs text-amber-700\">{{\r\n t(\"workspaceAutoHint\")\r\n }}</span>\r\n </span>\r\n </span>\r\n <mt-button\r\n [label]=\"t('clear')\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"clearAutoDetectedWorkspace()\"\r\n />\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-2 rounded-lg border border-surface-200 bg-surface-50 px-3 py-2\"\r\n >\r\n <span class=\"flex items-center gap-2 text-sm\">\r\n <mt-icon\r\n icon=\"dev.database-01\"\r\n class=\"text-base text-primary-500\"\r\n />\r\n <span class=\"text-muted-color\">{{ t(\"workspace\") }}:</span>\r\n <span class=\"font-medium text-surface-700\">{{\r\n chartWorkspaceLabel()\r\n }}</span>\r\n </span>\r\n @if (!confirmingWorkspaceChange()) {\r\n <mt-button\r\n [label]=\"t('change')\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"requestChangeWorkspace()\"\r\n />\r\n } @else {\r\n <span class=\"flex flex-wrap items-center gap-2\">\r\n <span class=\"text-xs text-amber-600\">{{\r\n t(\"changeWorkspaceConfirm\")\r\n }}</span>\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"cancelChangeWorkspace()\"\r\n />\r\n <mt-button\r\n [label]=\"t('changeAndClear')\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n (onClick)=\"confirmChangeWorkspace()\"\r\n />\r\n </span>\r\n }\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Sub-navigation: Selection \u00B7 Source Links (when >1 selection) \u00B7 Query -->\r\n @if (sectionOptions().length > 1 && !needsWorkspacePick()) {\r\n <mt-tabs\r\n [options]=\"sectionOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"id\"\r\n [active]=\"visibleSection()\"\r\n (onChange)=\"onSectionChange($event)\"\r\n />\r\n }\r\n\r\n <!-- ===================== SELECTION ===================== -->\r\n @if (!hideSelectionConfig() && !needsWorkspacePick()) {\r\n <div\r\n [hidden]=\"visibleSection() !== 'selection'\"\r\n class=\"flex flex-col gap-5\"\r\n >\r\n @if (showInformativeSelectionMode()) {\r\n <div class=\"flex items-center justify-end\">\r\n <mt-toggle-field\r\n [label]=\"t('advancedSelection')\"\r\n [ngModel]=\"selectionMode() === 'advanced'\"\r\n (ngModelChange)=\"onAdvancedSelectionToggle($event)\"\r\n />\r\n </div>\r\n }\r\n\r\n @if (\r\n !showInformativeSelectionMode() || selectionMode() === \"advanced\"\r\n ) {\r\n <mt-selection-configuration\r\n [workspaceId]=\"selectedWorkspaceId()\"\r\n [chartWorkspace]=\"chartWorkspace()\"\r\n [modulesProperties]=\"modulesProperties()\"\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [ngModel]=\"selections()\"\r\n (ngModelChange)=\"onSelectionsChange($event)\"\r\n (moduleChange)=\"onModuleChange($event)\"\r\n />\r\n } @else {\r\n <div class=\"flex flex-col gap-5\">\r\n <mt-informative-context-selection\r\n class=\"block\"\r\n [informativeContext]=\"informativeContext()\"\r\n [currentSelection]=\"selections()\"\r\n [preferredTargetSelector]=\"contextTargetSelector()\"\r\n [applyToken]=\"contextTargetApplyToken()\"\r\n (templateApply)=\"onContextTemplateApply($event)\"\r\n />\r\n\r\n @if (selections().length) {\r\n <mt-selection-configuration\r\n [workspaceId]=\"selectedWorkspaceId()\"\r\n [chartWorkspace]=\"chartWorkspace()\"\r\n [modulesProperties]=\"modulesProperties()\"\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [structureLocked]=\"true\"\r\n [ngModel]=\"selections()\"\r\n (ngModelChange)=\"onSelectionsChange($event)\"\r\n />\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- ===================== SOURCE LINKS (only with >1 selection) ===================== -->\r\n @if (showSourceLinks() && !needsWorkspacePick()) {\r\n <div\r\n [hidden]=\"visibleSection() !== 'sourceLinks'\"\r\n class=\"flex flex-col gap-5\"\r\n >\r\n <p class=\"text-sm text-muted-color\">{{ t(\"sourceLinksHint\") }}</p>\r\n @if (unlinkedSelectionNames().length) {\r\n <div\r\n class=\"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-700\"\r\n role=\"alert\"\r\n >\r\n {{\r\n t(\"unlinkedSelectionsWarning\", {\r\n names: unlinkedSelectionNames().join(\", \"),\r\n })\r\n }}\r\n </div>\r\n }\r\n <mt-source-link-configuration\r\n [selectionModules]=\"selectionModules()\"\r\n [ngModel]=\"sourceLinks()\"\r\n (ngModelChange)=\"onSourceLinksChange($event)\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- ===================== QUERY ===================== -->\r\n @if (queryComponentType() !== \"none\" && !needsWorkspacePick()) {\r\n <div [hidden]=\"visibleSection() !== 'query'\" class=\"flex flex-col gap-5\">\r\n @if (loadingProperties()) {\r\n <div class=\"flex flex-col gap-4\">\r\n <div class=\"flex flex-col gap-2\">\r\n <p-skeleton width=\"120px\" height=\"16px\" />\r\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\r\n </div>\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <div class=\"flex flex-col gap-2\">\r\n <p-skeleton width=\"80px\" height=\"16px\" />\r\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\r\n </div>\r\n <div class=\"flex flex-col gap-2\">\r\n <p-skeleton width=\"90px\" height=\"16px\" />\r\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\r\n </div>\r\n </div>\r\n </div>\r\n } @else {\r\n <!-- Group By Multiple (table views) -->\r\n @if (showGroupByMultiple()) {\r\n <mt-string-array-input\r\n [label]=\"t('groupByMultiple')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n [placeholder]=\"t('selectGroupByProperties')\"\r\n [ngModel]=\"groupByMultiple()\"\r\n (ngModelChange)=\"onGroupByMultipleChange($event)\"\r\n />\r\n }\r\n\r\n <!-- Query Configuration based on chart type -->\r\n @switch (queryComponentType()) {\r\n @case (\"lineChart\") {\r\n <mt-line-chart-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onLineChartQueryChange($event)\"\r\n />\r\n }\r\n @case (\"general\") {\r\n <mt-general-query\r\n [chartType]=\"getChartTypeId()\"\r\n [querySchema]=\"querySchema()\"\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onQueryChange($event)\"\r\n />\r\n\r\n <mt-toggle-field\r\n [label]=\"t('isNormalized')\"\r\n [ngModel]=\"isNormalized()\"\r\n (ngModelChange)=\"onIsNormalizedChange($event)\"\r\n />\r\n }\r\n @case (\"table\") {\r\n <mt-table-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onTableQueryChange($event)\"\r\n />\r\n }\r\n @case (\"phaseGateTable\") {\r\n @let phaseGateQuery = phaseGateTableQuery();\r\n @let groupedPhaseGateProperties = propertiesGrouped().length > 1;\r\n\r\n <div class=\"flex flex-col gap-5\">\r\n <p class=\"text-sm text-muted-color\">\r\n {{ t(\"phaseGateTableQueryDescription\") }}\r\n </p>\r\n\r\n <div class=\"grid grid-cols-1 gap-4 lg:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('phaseGateRowIdentityProperty')\"\r\n [hint]=\"t('phaseGateRowIdentityPropertyHint')\"\r\n [required]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.rowIdentityProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('rowIdentityProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateNameProperty')\"\r\n [hint]=\"t('phaseGateNamePropertyHint')\"\r\n [required]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseNameProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('phaseNameProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateStatusProperty')\"\r\n [hint]=\"t('phaseGateStatusPropertyHint')\"\r\n [required]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseStatusProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('phaseStatusProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateIdProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseIdProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('phaseIdProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateOrderProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseOrderProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('phaseOrderProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateProgressProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseProgressProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(\r\n 'phaseProgressProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateCurrentProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseIsCurrentProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(\r\n 'phaseIsCurrentProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateCompletedProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseIsCompletedProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(\r\n 'phaseIsCompletedProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateAllItemsCompletedProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseAllItemsCompletedProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(\r\n 'phaseAllItemsCompletedProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n </div>\r\n\r\n <mt-string-array-input\r\n [label]=\"t('phaseGateVisibleProperties')\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n [placeholder]=\"t('phaseGateVisiblePropertiesPlaceholder')\"\r\n [ngModel]=\"phaseGateQuery.baseProperties\"\r\n (ngModelChange)=\"onPhaseGateTableBasePropertiesChange($event)\"\r\n />\r\n\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"phaseGateProjectionHint\") }}\r\n </p>\r\n </div>\r\n }\r\n @case (\"timeline\") {\r\n <mt-timeline-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onTimelineQueryChange($event)\"\r\n />\r\n }\r\n @case (\"timelineMultiLevel\") {\r\n <div class=\"flex flex-col gap-5\">\r\n <div class=\"flex items-center justify-between\">\r\n <p class=\"text-sm text-muted-color\">\r\n {{ t(\"timelineMultiLevelDescription\") }}\r\n </p>\r\n <mt-button\r\n size=\"small\"\r\n severity=\"secondary\"\r\n icon=\"general.plus\"\r\n [label]=\"t('addLevel')\"\r\n (onClick)=\"addTimelineLevel()\"\r\n />\r\n </div>\r\n\r\n <mt-select-field\r\n [label]=\"t('timeFrame')\"\r\n [options]=\"timeFrameOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [ngModel]=\"timelineTimeFrame()\"\r\n (ngModelChange)=\"onTimelineTimeFrameChange($event)\"\r\n />\r\n\r\n @for (level of timelineLevels(); track $index) {\r\n <div\r\n class=\"border border-surface-300 rounded-md p-4 flex flex-col gap-3\"\r\n >\r\n <div class=\"flex items-center justify-between\">\r\n <span class=\"font-medium\">\r\n {{ t(\"level\") }} {{ level.levelNumber || $index + 1 }}\r\n </span>\r\n <mt-button\r\n size=\"small\"\r\n severity=\"danger\"\r\n [text]=\"true\"\r\n icon=\"general.trash-02\"\r\n (onClick)=\"removeTimelineLevel($index)\"\r\n />\r\n </div>\r\n\r\n <div class=\"grid grid-cols-2 gap-3\">\r\n <mt-select-field\r\n [label]=\"t('pivotProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.pivotProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'pivotProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('lookupProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.lookupProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'lookupProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('idProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.idProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField($index, 'idProperty', $event)\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('startTimeProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.startPoint_timeProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'startPoint_timeProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('endTimeProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.endPoint_timeProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'endPoint_timeProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('progressProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.progressProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'progressProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n @if (shouldShowTimelineParentProperty($index)) {\r\n <mt-select-field\r\n [label]=\"t('parentProperty')\"\r\n [options]=\"timelineParentPropertyOptions($index)\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n [ngModel]=\"level.parentProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'parentProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n }\r\n </div>\r\n\r\n <mt-string-array-input\r\n [label]=\"t('extraProperties')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n [placeholder]=\"t('selectProperties')\"\r\n [ngModel]=\"level.extraProperties || level.extras || []\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'extraProperties',\r\n $event\r\n )\r\n \"\r\n />\r\n </div>\r\n }\r\n\r\n @if (timelineLevels().length === 0) {\r\n <div class=\"text-center py-4 text-muted-color text-sm\">\r\n {{ t(\"noTimelineLevelsHint\") }}\r\n </div>\r\n }\r\n </div>\r\n }\r\n @case (\"map\") {\r\n <mt-map-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onMapQueryChange($event)\"\r\n />\r\n }\r\n @case (\"splitter\") {\r\n <mt-splitter-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onSplitterQueryChange($event)\"\r\n />\r\n }\r\n @case (\"properties\") {\r\n <mt-properties-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [numericOnly]=\"getChartTypeId() === 'ring-gauge-chart'\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onPropertiesQueryChange($event)\"\r\n />\r\n }\r\n @case (\"snapshot\") {\r\n <mt-snapshot-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onSnapshotQueryChange($event)\"\r\n />\r\n }\r\n @case (\"phaseGateStepper\") {\r\n @let stepperQuery = phaseGateTableQuery();\r\n @let groupedStepperProperties = propertiesGrouped().length > 1;\r\n\r\n <div class=\"flex flex-col gap-5\">\r\n <p class=\"text-sm text-muted-color\">\r\n {{ t(\"phaseGateStepperQueryDescription\") }}\r\n </p>\r\n\r\n <div class=\"grid grid-cols-1 gap-4 lg:grid-cols-2\">\r\n @for (role of phaseGateStepperRoles; track role.field) {\r\n @let required =\r\n !!querySchema()?.required?.includes(role.field);\r\n <mt-select-field\r\n [label]=\"t(role.label)\"\r\n [hint]=\"t(role.hint)\"\r\n [required]=\"required\"\r\n [showClear]=\"!required\"\r\n [options]=\"\r\n groupedStepperProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedStepperProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"stepperQuery[role.field]\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(role.field, $event)\r\n \"\r\n />\r\n }\r\n </div>\r\n </div>\r\n }\r\n @case (\"repeater\") {\r\n <div class=\"flex flex-col gap-5\">\r\n <mt-select-field\r\n [label]=\"t('repeaterDashboard')\"\r\n [options]=\"availableDashboards()\"\r\n optionLabel=\"name\"\r\n optionValue=\"id\"\r\n [ngModel]=\"repeaterDashboardId()\"\r\n (ngModelChange)=\"onRepeaterDashboardChange($event)\"\r\n />\r\n\r\n <mt-string-array-input\r\n [label]=\"t('repeaterSelectedProperties')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n [placeholder]=\"t('repeaterSelectedPropertiesPlaceholder')\"\r\n [ngModel]=\"repeaterSelectedProperties()\"\r\n (ngModelChange)=\"onRepeaterSelectedPropertiesChange($event)\"\r\n />\r\n </div>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n }\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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { 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: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: SelectionConfiguration, selector: "mt-selection-configuration", inputs: ["structureLocked", "workspaceId", "chartWorkspace", "modulesProperties", "propertiesFlat"], outputs: ["moduleChange"] }, { kind: "component", type: SourceLinkConfiguration, selector: "mt-source-link-configuration", inputs: ["selectionModules"] }, { kind: "component", type: CustomApiConfiguration, selector: "mt-custom-api-configuration" }, { kind: "component", type: GeneralQuery, selector: "mt-general-query", inputs: ["chartType", "querySchema", "propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: LineChartQuery, selector: "mt-line-chart-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: TableQuery, selector: "mt-table-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: TimelineQuery, selector: "mt-timeline-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: PropertiesQuery, selector: "mt-properties-query", inputs: ["propertiesFlat", "propertiesGrouped", "numericOnly"] }, { kind: "component", type: SnapshotQuery, selector: "mt-snapshot-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: MapQuery, selector: "mt-map-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: SplitterQuery, selector: "mt-splitter-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: InformativeContextSelection, selector: "mt-informative-context-selection", inputs: ["informativeContext", "currentSelection", "preferredTargetSelector", "applyToken"], outputs: ["templateApply"] }, { kind: "component", type: StringArrayInput, selector: "mt-string-array-input", inputs: ["label", "placeholder", "options", "group", "optionLabel", "optionValue", "optionGroupLabel", "optionGroupChildren", "filter", "emptyHint", "maxItems", "limitHint"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
42251
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DataSourceSettings, isStandalone: true, selector: "mt-data-source-settings", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, chartType: { classPropertyName: "chartType", publicName: "chartType", isSignal: true, isRequired: false, transformFunction: null }, informativeContext: { classPropertyName: "informativeContext", publicName: "informativeContext", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { serviceConfigChange: "serviceConfigChange" }, ngImport: i0, template: "<div class=\"flex flex-col gap-5\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <!-- Data source mode: Selection cycle OR Custom API (separated area on top) -->\n @if (supportsCustomApi()) {\n <div class=\"grid grid-cols-2 gap-3\">\n <button\n type=\"button\"\n class=\"flex items-start gap-2 rounded-lg border p-3 text-left transition-colors\"\n [class.border-primary-500]=\"dataSourceMode() === 'selection'\"\n [class.bg-primary-50]=\"dataSourceMode() === 'selection'\"\n [class.border-surface-200]=\"dataSourceMode() !== 'selection'\"\n [class.hover:bg-surface-50]=\"dataSourceMode() !== 'selection'\"\n (click)=\"onModeChange('selection')\"\n >\n <mt-icon\n icon=\"dev.database-01\"\n class=\"mt-0.5 text-lg\"\n [class.text-primary-600]=\"dataSourceMode() === 'selection'\"\n [class.text-muted-color]=\"dataSourceMode() !== 'selection'\"\n />\n <span class=\"flex flex-col\">\n <span class=\"text-sm font-semibold text-surface-700\">\n {{ t(\"dataSourceModes.selection\") }}\n </span>\n <span class=\"text-xs text-muted-color\">\n {{ t(\"dataSourceModes.selectionHint\") }}\n </span>\n </span>\n </button>\n\n <button\n type=\"button\"\n class=\"flex items-start gap-2 rounded-lg border p-3 text-left transition-colors\"\n [class.border-primary-500]=\"dataSourceMode() === 'customApi'\"\n [class.bg-primary-50]=\"dataSourceMode() === 'customApi'\"\n [class.border-surface-200]=\"dataSourceMode() !== 'customApi'\"\n [class.hover:bg-surface-50]=\"dataSourceMode() !== 'customApi'\"\n (click)=\"onModeChange('customApi')\"\n >\n <mt-icon\n icon=\"dev.code-02\"\n class=\"mt-0.5 text-lg\"\n [class.text-primary-600]=\"dataSourceMode() === 'customApi'\"\n [class.text-muted-color]=\"dataSourceMode() !== 'customApi'\"\n />\n <span class=\"flex flex-col\">\n <span class=\"text-sm font-semibold text-surface-700\">\n {{ t(\"dataSourceModes.customApi\") }}\n </span>\n <span class=\"text-xs text-muted-color\">\n {{ t(\"dataSourceModes.customApiHint\") }}\n </span>\n </span>\n </button>\n </div>\n }\n\n <!-- ===================== CUSTOM API MODE ===================== -->\n @if (supportsCustomApi() && dataSourceMode() === \"customApi\") {\n <mt-custom-api-configuration\n [ngModel]=\"customApi()\"\n (ngModelChange)=\"onCustomApiChange($event)\"\n />\n } @else {\n <!-- ===================== SELECTION CYCLE ===================== -->\n\n <!-- Workspace gate: pick ONE workspace before the tabs/config appear.\n The picker shows whenever no workspace is chosen yet \u2014 for a brand-new\n chart it also blocks the tabs (needsWorkspacePick), but an existing\n chart that never had a workspace still gets the picker so it can be\n assigned (and saved into serviceConfig.workspaceId for navigate-to). -->\n @if (showWorkspaceGate()) {\n @if (!chartWorkspace()) {\n <div\n class=\"flex flex-col items-center gap-3 rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6 text-center\"\n >\n <mt-icon icon=\"dev.database-01\" class=\"text-3xl text-primary-500\" />\n <div class=\"flex flex-col gap-1\">\n <h3 class=\"text-sm font-semibold text-surface-700\">\n {{ t(\"workspaceGateTitle\") }}\n </h3>\n <p class=\"text-xs text-muted-color\">\n {{ t(\"workspaceGateHint\") }}\n </p>\n </div>\n <div class=\"w-full max-w-sm\">\n <mt-select-field\n [options]=\"workspaceOptions()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [placeholder]=\"t('selectWorkspace')\"\n [filter]=\"true\"\n [ngModel]=\"chartWorkspace()\"\n (ngModelChange)=\"onWorkspacePick($event)\"\n />\n </div>\n </div>\n } @else if (workspaceAutoDetected()) {\n <!-- Old data: workspace inferred from the chart's existing config.\n Surface it with a Save-to-keep / Clear notice instead of a silent\n chip, so the user knows it must be saved (or can pick another). -->\n <div\n class=\"flex flex-wrap items-center justify-between gap-3 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2\"\n >\n <span class=\"flex items-start gap-2 text-sm\">\n <mt-icon\n icon=\"general.alert-circle\"\n class=\"mt-0.5 text-base text-amber-600\"\n />\n <span class=\"flex flex-col\">\n <span class=\"font-medium text-surface-700\">\n {{ t(\"workspace\") }}: {{ chartWorkspaceLabel() }}\n </span>\n <span class=\"text-xs text-amber-700\">{{\n t(\"workspaceAutoHint\")\n }}</span>\n </span>\n </span>\n <mt-button\n [label]=\"t('clear')\"\n severity=\"secondary\"\n variant=\"outlined\"\n size=\"small\"\n (onClick)=\"clearAutoDetectedWorkspace()\"\n />\n </div>\n } @else {\n <div\n class=\"flex flex-wrap items-center justify-between gap-2 rounded-lg border border-surface-200 bg-surface-50 px-3 py-2\"\n >\n <span class=\"flex items-center gap-2 text-sm\">\n <mt-icon\n icon=\"dev.database-01\"\n class=\"text-base text-primary-500\"\n />\n <span class=\"text-muted-color\">{{ t(\"workspace\") }}:</span>\n <span class=\"font-medium text-surface-700\">{{\n chartWorkspaceLabel()\n }}</span>\n </span>\n @if (!confirmingWorkspaceChange()) {\n <mt-button\n [label]=\"t('change')\"\n severity=\"secondary\"\n variant=\"outlined\"\n size=\"small\"\n (onClick)=\"requestChangeWorkspace()\"\n />\n } @else {\n <span class=\"flex flex-wrap items-center gap-2\">\n <span class=\"text-xs text-amber-600\">{{\n t(\"changeWorkspaceConfirm\")\n }}</span>\n <mt-button\n [label]=\"t('cancel')\"\n severity=\"secondary\"\n variant=\"outlined\"\n size=\"small\"\n (onClick)=\"cancelChangeWorkspace()\"\n />\n <mt-button\n [label]=\"t('changeAndClear')\"\n severity=\"danger\"\n size=\"small\"\n (onClick)=\"confirmChangeWorkspace()\"\n />\n </span>\n }\n </div>\n }\n }\n\n <!-- Sub-navigation: Selection \u00B7 Source Links (when >1 selection) \u00B7 Query -->\n @if (sectionOptions().length > 1 && !needsWorkspacePick()) {\n <mt-tabs\n [options]=\"sectionOptions()\"\n optionLabel=\"label\"\n optionValue=\"id\"\n [active]=\"visibleSection()\"\n (onChange)=\"onSectionChange($event)\"\n />\n }\n\n <!-- ===================== SELECTION ===================== -->\n @if (!hideSelectionConfig() && !needsWorkspacePick()) {\n <div\n [hidden]=\"visibleSection() !== 'selection'\"\n class=\"flex flex-col gap-5\"\n >\n @if (duplicateSelectionNames().length) {\n <div\n class=\"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-700\"\n role=\"alert\"\n >\n {{\n t(\"duplicateSelectionsWarning\", {\n names: duplicateSelectionNames().join(\", \"),\n })\n }}\n </div>\n }\n @if (showInformativeSelectionMode()) {\n <div class=\"flex items-center justify-end\">\n <mt-toggle-field\n [label]=\"t('advancedSelection')\"\n [ngModel]=\"selectionMode() === 'advanced'\"\n (ngModelChange)=\"onAdvancedSelectionToggle($event)\"\n />\n </div>\n }\n\n @if (\n !showInformativeSelectionMode() || selectionMode() === \"advanced\"\n ) {\n <mt-selection-configuration\n [workspaceId]=\"selectedWorkspaceId()\"\n [chartWorkspace]=\"chartWorkspace()\"\n [modulesProperties]=\"modulesProperties()\"\n [propertiesFlat]=\"propertiesFlat()\"\n [ngModel]=\"selections()\"\n (ngModelChange)=\"onSelectionsChange($event)\"\n (moduleChange)=\"onModuleChange($event)\"\n />\n } @else {\n <div class=\"flex flex-col gap-5\">\n <mt-informative-context-selection\n class=\"block\"\n [informativeContext]=\"informativeContext()\"\n [currentSelection]=\"selections()\"\n [preferredTargetSelector]=\"contextTargetSelector()\"\n [applyToken]=\"contextTargetApplyToken()\"\n (templateApply)=\"onContextTemplateApply($event)\"\n />\n\n @if (selections().length) {\n <mt-selection-configuration\n [workspaceId]=\"selectedWorkspaceId()\"\n [chartWorkspace]=\"chartWorkspace()\"\n [modulesProperties]=\"modulesProperties()\"\n [propertiesFlat]=\"propertiesFlat()\"\n [structureLocked]=\"true\"\n [ngModel]=\"selections()\"\n (ngModelChange)=\"onSelectionsChange($event)\"\n />\n }\n </div>\n }\n </div>\n }\n\n <!-- ===================== SOURCE LINKS (only with >1 selection) ===================== -->\n @if (showSourceLinks() && !needsWorkspacePick()) {\n <div\n [hidden]=\"visibleSection() !== 'sourceLinks'\"\n class=\"flex flex-col gap-5\"\n >\n <p class=\"text-sm text-muted-color\">{{ t(\"sourceLinksHint\") }}</p>\n @if (duplicateSelectionNames().length) {\n <div\n class=\"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-700\"\n role=\"alert\"\n >\n {{\n t(\"duplicateSelectionsWarning\", {\n names: duplicateSelectionNames().join(\", \"),\n })\n }}\n </div>\n }\n @if (unlinkedSelectionNames().length) {\n <div\n class=\"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-700\"\n role=\"alert\"\n >\n {{\n t(\"unlinkedSelectionsWarning\", {\n names: unlinkedSelectionNames().join(\", \"),\n })\n }}\n </div>\n }\n <mt-source-link-configuration\n [selectionModules]=\"selectionModules()\"\n [ngModel]=\"sourceLinks()\"\n (ngModelChange)=\"onSourceLinksChange($event)\"\n />\n </div>\n }\n\n <!-- ===================== QUERY ===================== -->\n @if (queryComponentType() !== \"none\" && !needsWorkspacePick()) {\n <div [hidden]=\"visibleSection() !== 'query'\" class=\"flex flex-col gap-5\">\n @if (loadingProperties()) {\n <div class=\"flex flex-col gap-4\">\n <div class=\"flex flex-col gap-2\">\n <p-skeleton width=\"120px\" height=\"16px\" />\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\n </div>\n <div class=\"grid grid-cols-2 gap-4\">\n <div class=\"flex flex-col gap-2\">\n <p-skeleton width=\"80px\" height=\"16px\" />\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\n </div>\n <div class=\"flex flex-col gap-2\">\n <p-skeleton width=\"90px\" height=\"16px\" />\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\n </div>\n </div>\n </div>\n } @else {\n <!-- Group By Multiple (table views) -->\n @if (showGroupByMultiple()) {\n <mt-string-array-input\n [label]=\"t('groupByMultiple')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n [placeholder]=\"t('selectGroupByProperties')\"\n [ngModel]=\"groupByMultiple()\"\n (ngModelChange)=\"onGroupByMultipleChange($event)\"\n />\n }\n\n <!-- Query Configuration based on chart type -->\n @switch (queryComponentType()) {\n @case (\"lineChart\") {\n <mt-line-chart-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onLineChartQueryChange($event)\"\n />\n }\n @case (\"general\") {\n <mt-general-query\n [chartType]=\"getChartTypeId()\"\n [querySchema]=\"querySchema()\"\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onQueryChange($event)\"\n />\n\n <mt-toggle-field\n [label]=\"t('isNormalized')\"\n [ngModel]=\"isNormalized()\"\n (ngModelChange)=\"onIsNormalizedChange($event)\"\n />\n }\n @case (\"table\") {\n <mt-table-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onTableQueryChange($event)\"\n />\n }\n @case (\"phaseGateTable\") {\n @let phaseGateQuery = phaseGateTableQuery();\n @let groupedPhaseGateProperties = propertiesGrouped().length > 1;\n\n <div class=\"flex flex-col gap-5\">\n <p class=\"text-sm text-muted-color\">\n {{ t(\"phaseGateTableQueryDescription\") }}\n </p>\n\n <div class=\"grid grid-cols-1 gap-4 lg:grid-cols-2\">\n <mt-select-field\n [label]=\"t('phaseGateRowIdentityProperty')\"\n [hint]=\"t('phaseGateRowIdentityPropertyHint')\"\n [required]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.rowIdentityProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange('rowIdentityProperty', $event)\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateNameProperty')\"\n [hint]=\"t('phaseGateNamePropertyHint')\"\n [required]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseNameProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange('phaseNameProperty', $event)\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateStatusProperty')\"\n [hint]=\"t('phaseGateStatusPropertyHint')\"\n [required]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseStatusProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange('phaseStatusProperty', $event)\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateIdProperty')\"\n [hint]=\"t('phaseGateIdPropertyHint')\"\n [showClear]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseIdProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange('phaseIdProperty', $event)\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateOrderProperty')\"\n [showClear]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseOrderProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange('phaseOrderProperty', $event)\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateProgressProperty')\"\n [showClear]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseProgressProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange(\n 'phaseProgressProperty',\n $event\n )\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateCurrentProperty')\"\n [showClear]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseIsCurrentProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange(\n 'phaseIsCurrentProperty',\n $event\n )\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateCompletedProperty')\"\n [showClear]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseIsCompletedProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange(\n 'phaseIsCompletedProperty',\n $event\n )\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateAllItemsCompletedProperty')\"\n [showClear]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseAllItemsCompletedProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange(\n 'phaseAllItemsCompletedProperty',\n $event\n )\n \"\n />\n </div>\n\n <mt-string-array-input\n [label]=\"t('phaseGateVisibleProperties')\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n [placeholder]=\"t('phaseGateVisiblePropertiesPlaceholder')\"\n [ngModel]=\"phaseGateQuery.baseProperties\"\n (ngModelChange)=\"onPhaseGateTableBasePropertiesChange($event)\"\n />\n\n <p class=\"text-xs text-muted-color\">\n {{ t(\"phaseGateProjectionHint\") }}\n </p>\n </div>\n }\n @case (\"timeline\") {\n <mt-timeline-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onTimelineQueryChange($event)\"\n />\n }\n @case (\"timelineMultiLevel\") {\n <div class=\"flex flex-col gap-5\">\n <div class=\"flex items-center justify-between\">\n <p class=\"text-sm text-muted-color\">\n {{ t(\"timelineMultiLevelDescription\") }}\n </p>\n <mt-button\n size=\"small\"\n severity=\"secondary\"\n icon=\"general.plus\"\n [label]=\"t('addLevel')\"\n (onClick)=\"addTimelineLevel()\"\n />\n </div>\n\n <mt-select-field\n [label]=\"t('timeFrame')\"\n [options]=\"timeFrameOptions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [ngModel]=\"timelineTimeFrame()\"\n (ngModelChange)=\"onTimelineTimeFrameChange($event)\"\n />\n\n @for (level of timelineLevels(); track $index) {\n <div\n class=\"border border-surface-300 rounded-md p-4 flex flex-col gap-3\"\n >\n <div class=\"flex items-center justify-between\">\n <span class=\"font-medium\">\n {{ t(\"level\") }} {{ level.levelNumber || $index + 1 }}\n </span>\n <mt-button\n size=\"small\"\n severity=\"danger\"\n [text]=\"true\"\n icon=\"general.trash-02\"\n (onClick)=\"removeTimelineLevel($index)\"\n />\n </div>\n\n <div class=\"grid grid-cols-2 gap-3\">\n <mt-select-field\n [label]=\"t('pivotProperty')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [ngModel]=\"level.pivotProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'pivotProperty',\n $event\n )\n \"\n />\n <mt-select-field\n [label]=\"t('lookupProperty')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [ngModel]=\"level.lookupProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'lookupProperty',\n $event\n )\n \"\n />\n <mt-select-field\n [label]=\"t('idProperty')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [ngModel]=\"level.idProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField($index, 'idProperty', $event)\n \"\n />\n <mt-select-field\n [label]=\"t('startTimeProperty')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [ngModel]=\"level.startPoint_timeProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'startPoint_timeProperty',\n $event\n )\n \"\n />\n <mt-select-field\n [label]=\"t('endTimeProperty')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [ngModel]=\"level.endPoint_timeProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'endPoint_timeProperty',\n $event\n )\n \"\n />\n <mt-select-field\n [label]=\"t('progressProperty')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [ngModel]=\"level.progressProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'progressProperty',\n $event\n )\n \"\n />\n @if (shouldShowTimelineParentProperty($index)) {\n <mt-select-field\n [label]=\"t('parentProperty')\"\n [options]=\"timelineParentPropertyOptions($index)\"\n optionLabel=\"name\"\n optionValue=\"key\"\n [ngModel]=\"level.parentProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'parentProperty',\n $event\n )\n \"\n />\n }\n </div>\n\n <mt-string-array-input\n [label]=\"t('extraProperties')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n [placeholder]=\"t('selectProperties')\"\n [ngModel]=\"level.extraProperties || level.extras || []\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'extraProperties',\n $event\n )\n \"\n />\n </div>\n }\n\n @if (timelineLevels().length === 0) {\n <div class=\"text-center py-4 text-muted-color text-sm\">\n {{ t(\"noTimelineLevelsHint\") }}\n </div>\n }\n </div>\n }\n @case (\"map\") {\n <mt-map-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onMapQueryChange($event)\"\n />\n }\n @case (\"splitter\") {\n <mt-splitter-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onSplitterQueryChange($event)\"\n />\n }\n @case (\"properties\") {\n <mt-properties-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [numericOnly]=\"getChartTypeId() === 'ring-gauge-chart'\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onPropertiesQueryChange($event)\"\n />\n }\n @case (\"snapshot\") {\n <mt-snapshot-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onSnapshotQueryChange($event)\"\n />\n }\n @case (\"phaseGateStepper\") {\n @let stepperQuery = phaseGateTableQuery();\n @let groupedStepperProperties = propertiesGrouped().length > 1;\n\n <div class=\"flex flex-col gap-5\">\n <p class=\"text-sm text-muted-color\">\n {{ t(\"phaseGateStepperQueryDescription\") }}\n </p>\n\n <div class=\"grid grid-cols-1 gap-4 lg:grid-cols-2\">\n @for (role of phaseGateStepperRoles; track role.field) {\n @let required =\n !!querySchema()?.required?.includes(role.field);\n <mt-select-field\n [label]=\"t(role.label)\"\n [hint]=\"t(role.hint)\"\n [required]=\"required\"\n [showClear]=\"!required\"\n [options]=\"\n groupedStepperProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedStepperProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"stepperQuery[role.field]\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange(role.field, $event)\n \"\n />\n }\n </div>\n </div>\n }\n @case (\"repeater\") {\n <div class=\"flex flex-col gap-5\">\n <mt-select-field\n [label]=\"t('repeaterDashboard')\"\n [options]=\"availableDashboards()\"\n optionLabel=\"name\"\n optionValue=\"id\"\n [ngModel]=\"repeaterDashboardId()\"\n (ngModelChange)=\"onRepeaterDashboardChange($event)\"\n />\n\n <mt-string-array-input\n [label]=\"t('repeaterSelectedProperties')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n [placeholder]=\"t('repeaterSelectedPropertiesPlaceholder')\"\n [ngModel]=\"repeaterSelectedProperties()\"\n (ngModelChange)=\"onRepeaterSelectedPropertiesChange($event)\"\n />\n </div>\n }\n }\n }\n </div>\n }\n }\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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { 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: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: SelectionConfiguration, selector: "mt-selection-configuration", inputs: ["structureLocked", "workspaceId", "chartWorkspace", "modulesProperties", "propertiesFlat"], outputs: ["moduleChange"] }, { kind: "component", type: SourceLinkConfiguration, selector: "mt-source-link-configuration", inputs: ["selectionModules"] }, { kind: "component", type: CustomApiConfiguration, selector: "mt-custom-api-configuration" }, { kind: "component", type: GeneralQuery, selector: "mt-general-query", inputs: ["chartType", "querySchema", "propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: LineChartQuery, selector: "mt-line-chart-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: TableQuery, selector: "mt-table-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: TimelineQuery, selector: "mt-timeline-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: PropertiesQuery, selector: "mt-properties-query", inputs: ["propertiesFlat", "propertiesGrouped", "numericOnly"] }, { kind: "component", type: SnapshotQuery, selector: "mt-snapshot-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: MapQuery, selector: "mt-map-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: SplitterQuery, selector: "mt-splitter-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: InformativeContextSelection, selector: "mt-informative-context-selection", inputs: ["informativeContext", "currentSelection", "preferredTargetSelector", "applyToken"], outputs: ["templateApply"] }, { kind: "component", type: StringArrayInput, selector: "mt-string-array-input", inputs: ["label", "placeholder", "options", "group", "optionLabel", "optionValue", "optionGroupLabel", "optionGroupChildren", "filter", "emptyHint", "maxItems", "limitHint"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
41841
42252
  }
41842
42253
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DataSourceSettings, decorators: [{
41843
42254
  type: Component,
@@ -41865,7 +42276,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
41865
42276
  SplitterQuery,
41866
42277
  InformativeContextSelection,
41867
42278
  StringArrayInput,
41868
- ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"flex flex-col gap-5\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Data source mode: Selection cycle OR Custom API (separated area on top) -->\r\n @if (supportsCustomApi()) {\r\n <div class=\"grid grid-cols-2 gap-3\">\r\n <button\r\n type=\"button\"\r\n class=\"flex items-start gap-2 rounded-lg border p-3 text-left transition-colors\"\r\n [class.border-primary-500]=\"dataSourceMode() === 'selection'\"\r\n [class.bg-primary-50]=\"dataSourceMode() === 'selection'\"\r\n [class.border-surface-200]=\"dataSourceMode() !== 'selection'\"\r\n [class.hover:bg-surface-50]=\"dataSourceMode() !== 'selection'\"\r\n (click)=\"onModeChange('selection')\"\r\n >\r\n <mt-icon\r\n icon=\"dev.database-01\"\r\n class=\"mt-0.5 text-lg\"\r\n [class.text-primary-600]=\"dataSourceMode() === 'selection'\"\r\n [class.text-muted-color]=\"dataSourceMode() !== 'selection'\"\r\n />\r\n <span class=\"flex flex-col\">\r\n <span class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"dataSourceModes.selection\") }}\r\n </span>\r\n <span class=\"text-xs text-muted-color\">\r\n {{ t(\"dataSourceModes.selectionHint\") }}\r\n </span>\r\n </span>\r\n </button>\r\n\r\n <button\r\n type=\"button\"\r\n class=\"flex items-start gap-2 rounded-lg border p-3 text-left transition-colors\"\r\n [class.border-primary-500]=\"dataSourceMode() === 'customApi'\"\r\n [class.bg-primary-50]=\"dataSourceMode() === 'customApi'\"\r\n [class.border-surface-200]=\"dataSourceMode() !== 'customApi'\"\r\n [class.hover:bg-surface-50]=\"dataSourceMode() !== 'customApi'\"\r\n (click)=\"onModeChange('customApi')\"\r\n >\r\n <mt-icon\r\n icon=\"dev.code-02\"\r\n class=\"mt-0.5 text-lg\"\r\n [class.text-primary-600]=\"dataSourceMode() === 'customApi'\"\r\n [class.text-muted-color]=\"dataSourceMode() !== 'customApi'\"\r\n />\r\n <span class=\"flex flex-col\">\r\n <span class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"dataSourceModes.customApi\") }}\r\n </span>\r\n <span class=\"text-xs text-muted-color\">\r\n {{ t(\"dataSourceModes.customApiHint\") }}\r\n </span>\r\n </span>\r\n </button>\r\n </div>\r\n }\r\n\r\n <!-- ===================== CUSTOM API MODE ===================== -->\r\n @if (supportsCustomApi() && dataSourceMode() === \"customApi\") {\r\n <mt-custom-api-configuration\r\n [ngModel]=\"customApi()\"\r\n (ngModelChange)=\"onCustomApiChange($event)\"\r\n />\r\n } @else {\r\n <!-- ===================== SELECTION CYCLE ===================== -->\r\n\r\n <!-- Workspace gate: pick ONE workspace before the tabs/config appear.\r\n The picker shows whenever no workspace is chosen yet \u2014 for a brand-new\r\n chart it also blocks the tabs (needsWorkspacePick), but an existing\r\n chart that never had a workspace still gets the picker so it can be\r\n assigned (and saved into serviceConfig.workspaceId for navigate-to). -->\r\n @if (showWorkspaceGate()) {\r\n @if (!chartWorkspace()) {\r\n <div\r\n class=\"flex flex-col items-center gap-3 rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6 text-center\"\r\n >\r\n <mt-icon icon=\"dev.database-01\" class=\"text-3xl text-primary-500\" />\r\n <div class=\"flex flex-col gap-1\">\r\n <h3 class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"workspaceGateTitle\") }}\r\n </h3>\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"workspaceGateHint\") }}\r\n </p>\r\n </div>\r\n <div class=\"w-full max-w-sm\">\r\n <mt-select-field\r\n [options]=\"workspaceOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [placeholder]=\"t('selectWorkspace')\"\r\n [filter]=\"true\"\r\n [ngModel]=\"chartWorkspace()\"\r\n (ngModelChange)=\"onWorkspacePick($event)\"\r\n />\r\n </div>\r\n </div>\r\n } @else if (workspaceAutoDetected()) {\r\n <!-- Old data: workspace inferred from the chart's existing config.\r\n Surface it with a Save-to-keep / Clear notice instead of a silent\r\n chip, so the user knows it must be saved (or can pick another). -->\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-3 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2\"\r\n >\r\n <span class=\"flex items-start gap-2 text-sm\">\r\n <mt-icon\r\n icon=\"general.alert-circle\"\r\n class=\"mt-0.5 text-base text-amber-600\"\r\n />\r\n <span class=\"flex flex-col\">\r\n <span class=\"font-medium text-surface-700\">\r\n {{ t(\"workspace\") }}: {{ chartWorkspaceLabel() }}\r\n </span>\r\n <span class=\"text-xs text-amber-700\">{{\r\n t(\"workspaceAutoHint\")\r\n }}</span>\r\n </span>\r\n </span>\r\n <mt-button\r\n [label]=\"t('clear')\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"clearAutoDetectedWorkspace()\"\r\n />\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-2 rounded-lg border border-surface-200 bg-surface-50 px-3 py-2\"\r\n >\r\n <span class=\"flex items-center gap-2 text-sm\">\r\n <mt-icon\r\n icon=\"dev.database-01\"\r\n class=\"text-base text-primary-500\"\r\n />\r\n <span class=\"text-muted-color\">{{ t(\"workspace\") }}:</span>\r\n <span class=\"font-medium text-surface-700\">{{\r\n chartWorkspaceLabel()\r\n }}</span>\r\n </span>\r\n @if (!confirmingWorkspaceChange()) {\r\n <mt-button\r\n [label]=\"t('change')\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"requestChangeWorkspace()\"\r\n />\r\n } @else {\r\n <span class=\"flex flex-wrap items-center gap-2\">\r\n <span class=\"text-xs text-amber-600\">{{\r\n t(\"changeWorkspaceConfirm\")\r\n }}</span>\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"cancelChangeWorkspace()\"\r\n />\r\n <mt-button\r\n [label]=\"t('changeAndClear')\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n (onClick)=\"confirmChangeWorkspace()\"\r\n />\r\n </span>\r\n }\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Sub-navigation: Selection \u00B7 Source Links (when >1 selection) \u00B7 Query -->\r\n @if (sectionOptions().length > 1 && !needsWorkspacePick()) {\r\n <mt-tabs\r\n [options]=\"sectionOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"id\"\r\n [active]=\"visibleSection()\"\r\n (onChange)=\"onSectionChange($event)\"\r\n />\r\n }\r\n\r\n <!-- ===================== SELECTION ===================== -->\r\n @if (!hideSelectionConfig() && !needsWorkspacePick()) {\r\n <div\r\n [hidden]=\"visibleSection() !== 'selection'\"\r\n class=\"flex flex-col gap-5\"\r\n >\r\n @if (showInformativeSelectionMode()) {\r\n <div class=\"flex items-center justify-end\">\r\n <mt-toggle-field\r\n [label]=\"t('advancedSelection')\"\r\n [ngModel]=\"selectionMode() === 'advanced'\"\r\n (ngModelChange)=\"onAdvancedSelectionToggle($event)\"\r\n />\r\n </div>\r\n }\r\n\r\n @if (\r\n !showInformativeSelectionMode() || selectionMode() === \"advanced\"\r\n ) {\r\n <mt-selection-configuration\r\n [workspaceId]=\"selectedWorkspaceId()\"\r\n [chartWorkspace]=\"chartWorkspace()\"\r\n [modulesProperties]=\"modulesProperties()\"\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [ngModel]=\"selections()\"\r\n (ngModelChange)=\"onSelectionsChange($event)\"\r\n (moduleChange)=\"onModuleChange($event)\"\r\n />\r\n } @else {\r\n <div class=\"flex flex-col gap-5\">\r\n <mt-informative-context-selection\r\n class=\"block\"\r\n [informativeContext]=\"informativeContext()\"\r\n [currentSelection]=\"selections()\"\r\n [preferredTargetSelector]=\"contextTargetSelector()\"\r\n [applyToken]=\"contextTargetApplyToken()\"\r\n (templateApply)=\"onContextTemplateApply($event)\"\r\n />\r\n\r\n @if (selections().length) {\r\n <mt-selection-configuration\r\n [workspaceId]=\"selectedWorkspaceId()\"\r\n [chartWorkspace]=\"chartWorkspace()\"\r\n [modulesProperties]=\"modulesProperties()\"\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [structureLocked]=\"true\"\r\n [ngModel]=\"selections()\"\r\n (ngModelChange)=\"onSelectionsChange($event)\"\r\n />\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- ===================== SOURCE LINKS (only with >1 selection) ===================== -->\r\n @if (showSourceLinks() && !needsWorkspacePick()) {\r\n <div\r\n [hidden]=\"visibleSection() !== 'sourceLinks'\"\r\n class=\"flex flex-col gap-5\"\r\n >\r\n <p class=\"text-sm text-muted-color\">{{ t(\"sourceLinksHint\") }}</p>\r\n @if (unlinkedSelectionNames().length) {\r\n <div\r\n class=\"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-700\"\r\n role=\"alert\"\r\n >\r\n {{\r\n t(\"unlinkedSelectionsWarning\", {\r\n names: unlinkedSelectionNames().join(\", \"),\r\n })\r\n }}\r\n </div>\r\n }\r\n <mt-source-link-configuration\r\n [selectionModules]=\"selectionModules()\"\r\n [ngModel]=\"sourceLinks()\"\r\n (ngModelChange)=\"onSourceLinksChange($event)\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- ===================== QUERY ===================== -->\r\n @if (queryComponentType() !== \"none\" && !needsWorkspacePick()) {\r\n <div [hidden]=\"visibleSection() !== 'query'\" class=\"flex flex-col gap-5\">\r\n @if (loadingProperties()) {\r\n <div class=\"flex flex-col gap-4\">\r\n <div class=\"flex flex-col gap-2\">\r\n <p-skeleton width=\"120px\" height=\"16px\" />\r\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\r\n </div>\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <div class=\"flex flex-col gap-2\">\r\n <p-skeleton width=\"80px\" height=\"16px\" />\r\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\r\n </div>\r\n <div class=\"flex flex-col gap-2\">\r\n <p-skeleton width=\"90px\" height=\"16px\" />\r\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\r\n </div>\r\n </div>\r\n </div>\r\n } @else {\r\n <!-- Group By Multiple (table views) -->\r\n @if (showGroupByMultiple()) {\r\n <mt-string-array-input\r\n [label]=\"t('groupByMultiple')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n [placeholder]=\"t('selectGroupByProperties')\"\r\n [ngModel]=\"groupByMultiple()\"\r\n (ngModelChange)=\"onGroupByMultipleChange($event)\"\r\n />\r\n }\r\n\r\n <!-- Query Configuration based on chart type -->\r\n @switch (queryComponentType()) {\r\n @case (\"lineChart\") {\r\n <mt-line-chart-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onLineChartQueryChange($event)\"\r\n />\r\n }\r\n @case (\"general\") {\r\n <mt-general-query\r\n [chartType]=\"getChartTypeId()\"\r\n [querySchema]=\"querySchema()\"\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onQueryChange($event)\"\r\n />\r\n\r\n <mt-toggle-field\r\n [label]=\"t('isNormalized')\"\r\n [ngModel]=\"isNormalized()\"\r\n (ngModelChange)=\"onIsNormalizedChange($event)\"\r\n />\r\n }\r\n @case (\"table\") {\r\n <mt-table-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onTableQueryChange($event)\"\r\n />\r\n }\r\n @case (\"phaseGateTable\") {\r\n @let phaseGateQuery = phaseGateTableQuery();\r\n @let groupedPhaseGateProperties = propertiesGrouped().length > 1;\r\n\r\n <div class=\"flex flex-col gap-5\">\r\n <p class=\"text-sm text-muted-color\">\r\n {{ t(\"phaseGateTableQueryDescription\") }}\r\n </p>\r\n\r\n <div class=\"grid grid-cols-1 gap-4 lg:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('phaseGateRowIdentityProperty')\"\r\n [hint]=\"t('phaseGateRowIdentityPropertyHint')\"\r\n [required]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.rowIdentityProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('rowIdentityProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateNameProperty')\"\r\n [hint]=\"t('phaseGateNamePropertyHint')\"\r\n [required]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseNameProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('phaseNameProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateStatusProperty')\"\r\n [hint]=\"t('phaseGateStatusPropertyHint')\"\r\n [required]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseStatusProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('phaseStatusProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateIdProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseIdProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('phaseIdProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateOrderProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseOrderProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('phaseOrderProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateProgressProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseProgressProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(\r\n 'phaseProgressProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateCurrentProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseIsCurrentProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(\r\n 'phaseIsCurrentProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateCompletedProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseIsCompletedProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(\r\n 'phaseIsCompletedProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateAllItemsCompletedProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseAllItemsCompletedProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(\r\n 'phaseAllItemsCompletedProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n </div>\r\n\r\n <mt-string-array-input\r\n [label]=\"t('phaseGateVisibleProperties')\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n [placeholder]=\"t('phaseGateVisiblePropertiesPlaceholder')\"\r\n [ngModel]=\"phaseGateQuery.baseProperties\"\r\n (ngModelChange)=\"onPhaseGateTableBasePropertiesChange($event)\"\r\n />\r\n\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"phaseGateProjectionHint\") }}\r\n </p>\r\n </div>\r\n }\r\n @case (\"timeline\") {\r\n <mt-timeline-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onTimelineQueryChange($event)\"\r\n />\r\n }\r\n @case (\"timelineMultiLevel\") {\r\n <div class=\"flex flex-col gap-5\">\r\n <div class=\"flex items-center justify-between\">\r\n <p class=\"text-sm text-muted-color\">\r\n {{ t(\"timelineMultiLevelDescription\") }}\r\n </p>\r\n <mt-button\r\n size=\"small\"\r\n severity=\"secondary\"\r\n icon=\"general.plus\"\r\n [label]=\"t('addLevel')\"\r\n (onClick)=\"addTimelineLevel()\"\r\n />\r\n </div>\r\n\r\n <mt-select-field\r\n [label]=\"t('timeFrame')\"\r\n [options]=\"timeFrameOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [ngModel]=\"timelineTimeFrame()\"\r\n (ngModelChange)=\"onTimelineTimeFrameChange($event)\"\r\n />\r\n\r\n @for (level of timelineLevels(); track $index) {\r\n <div\r\n class=\"border border-surface-300 rounded-md p-4 flex flex-col gap-3\"\r\n >\r\n <div class=\"flex items-center justify-between\">\r\n <span class=\"font-medium\">\r\n {{ t(\"level\") }} {{ level.levelNumber || $index + 1 }}\r\n </span>\r\n <mt-button\r\n size=\"small\"\r\n severity=\"danger\"\r\n [text]=\"true\"\r\n icon=\"general.trash-02\"\r\n (onClick)=\"removeTimelineLevel($index)\"\r\n />\r\n </div>\r\n\r\n <div class=\"grid grid-cols-2 gap-3\">\r\n <mt-select-field\r\n [label]=\"t('pivotProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.pivotProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'pivotProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('lookupProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.lookupProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'lookupProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('idProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.idProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField($index, 'idProperty', $event)\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('startTimeProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.startPoint_timeProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'startPoint_timeProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('endTimeProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.endPoint_timeProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'endPoint_timeProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('progressProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.progressProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'progressProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n @if (shouldShowTimelineParentProperty($index)) {\r\n <mt-select-field\r\n [label]=\"t('parentProperty')\"\r\n [options]=\"timelineParentPropertyOptions($index)\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n [ngModel]=\"level.parentProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'parentProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n }\r\n </div>\r\n\r\n <mt-string-array-input\r\n [label]=\"t('extraProperties')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n [placeholder]=\"t('selectProperties')\"\r\n [ngModel]=\"level.extraProperties || level.extras || []\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'extraProperties',\r\n $event\r\n )\r\n \"\r\n />\r\n </div>\r\n }\r\n\r\n @if (timelineLevels().length === 0) {\r\n <div class=\"text-center py-4 text-muted-color text-sm\">\r\n {{ t(\"noTimelineLevelsHint\") }}\r\n </div>\r\n }\r\n </div>\r\n }\r\n @case (\"map\") {\r\n <mt-map-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onMapQueryChange($event)\"\r\n />\r\n }\r\n @case (\"splitter\") {\r\n <mt-splitter-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onSplitterQueryChange($event)\"\r\n />\r\n }\r\n @case (\"properties\") {\r\n <mt-properties-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [numericOnly]=\"getChartTypeId() === 'ring-gauge-chart'\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onPropertiesQueryChange($event)\"\r\n />\r\n }\r\n @case (\"snapshot\") {\r\n <mt-snapshot-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onSnapshotQueryChange($event)\"\r\n />\r\n }\r\n @case (\"phaseGateStepper\") {\r\n @let stepperQuery = phaseGateTableQuery();\r\n @let groupedStepperProperties = propertiesGrouped().length > 1;\r\n\r\n <div class=\"flex flex-col gap-5\">\r\n <p class=\"text-sm text-muted-color\">\r\n {{ t(\"phaseGateStepperQueryDescription\") }}\r\n </p>\r\n\r\n <div class=\"grid grid-cols-1 gap-4 lg:grid-cols-2\">\r\n @for (role of phaseGateStepperRoles; track role.field) {\r\n @let required =\r\n !!querySchema()?.required?.includes(role.field);\r\n <mt-select-field\r\n [label]=\"t(role.label)\"\r\n [hint]=\"t(role.hint)\"\r\n [required]=\"required\"\r\n [showClear]=\"!required\"\r\n [options]=\"\r\n groupedStepperProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedStepperProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"stepperQuery[role.field]\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(role.field, $event)\r\n \"\r\n />\r\n }\r\n </div>\r\n </div>\r\n }\r\n @case (\"repeater\") {\r\n <div class=\"flex flex-col gap-5\">\r\n <mt-select-field\r\n [label]=\"t('repeaterDashboard')\"\r\n [options]=\"availableDashboards()\"\r\n optionLabel=\"name\"\r\n optionValue=\"id\"\r\n [ngModel]=\"repeaterDashboardId()\"\r\n (ngModelChange)=\"onRepeaterDashboardChange($event)\"\r\n />\r\n\r\n <mt-string-array-input\r\n [label]=\"t('repeaterSelectedProperties')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n [placeholder]=\"t('repeaterSelectedPropertiesPlaceholder')\"\r\n [ngModel]=\"repeaterSelectedProperties()\"\r\n (ngModelChange)=\"onRepeaterSelectedPropertiesChange($event)\"\r\n />\r\n </div>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n }\r\n</div>\r\n" }]
42279
+ ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"flex flex-col gap-5\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <!-- Data source mode: Selection cycle OR Custom API (separated area on top) -->\n @if (supportsCustomApi()) {\n <div class=\"grid grid-cols-2 gap-3\">\n <button\n type=\"button\"\n class=\"flex items-start gap-2 rounded-lg border p-3 text-left transition-colors\"\n [class.border-primary-500]=\"dataSourceMode() === 'selection'\"\n [class.bg-primary-50]=\"dataSourceMode() === 'selection'\"\n [class.border-surface-200]=\"dataSourceMode() !== 'selection'\"\n [class.hover:bg-surface-50]=\"dataSourceMode() !== 'selection'\"\n (click)=\"onModeChange('selection')\"\n >\n <mt-icon\n icon=\"dev.database-01\"\n class=\"mt-0.5 text-lg\"\n [class.text-primary-600]=\"dataSourceMode() === 'selection'\"\n [class.text-muted-color]=\"dataSourceMode() !== 'selection'\"\n />\n <span class=\"flex flex-col\">\n <span class=\"text-sm font-semibold text-surface-700\">\n {{ t(\"dataSourceModes.selection\") }}\n </span>\n <span class=\"text-xs text-muted-color\">\n {{ t(\"dataSourceModes.selectionHint\") }}\n </span>\n </span>\n </button>\n\n <button\n type=\"button\"\n class=\"flex items-start gap-2 rounded-lg border p-3 text-left transition-colors\"\n [class.border-primary-500]=\"dataSourceMode() === 'customApi'\"\n [class.bg-primary-50]=\"dataSourceMode() === 'customApi'\"\n [class.border-surface-200]=\"dataSourceMode() !== 'customApi'\"\n [class.hover:bg-surface-50]=\"dataSourceMode() !== 'customApi'\"\n (click)=\"onModeChange('customApi')\"\n >\n <mt-icon\n icon=\"dev.code-02\"\n class=\"mt-0.5 text-lg\"\n [class.text-primary-600]=\"dataSourceMode() === 'customApi'\"\n [class.text-muted-color]=\"dataSourceMode() !== 'customApi'\"\n />\n <span class=\"flex flex-col\">\n <span class=\"text-sm font-semibold text-surface-700\">\n {{ t(\"dataSourceModes.customApi\") }}\n </span>\n <span class=\"text-xs text-muted-color\">\n {{ t(\"dataSourceModes.customApiHint\") }}\n </span>\n </span>\n </button>\n </div>\n }\n\n <!-- ===================== CUSTOM API MODE ===================== -->\n @if (supportsCustomApi() && dataSourceMode() === \"customApi\") {\n <mt-custom-api-configuration\n [ngModel]=\"customApi()\"\n (ngModelChange)=\"onCustomApiChange($event)\"\n />\n } @else {\n <!-- ===================== SELECTION CYCLE ===================== -->\n\n <!-- Workspace gate: pick ONE workspace before the tabs/config appear.\n The picker shows whenever no workspace is chosen yet \u2014 for a brand-new\n chart it also blocks the tabs (needsWorkspacePick), but an existing\n chart that never had a workspace still gets the picker so it can be\n assigned (and saved into serviceConfig.workspaceId for navigate-to). -->\n @if (showWorkspaceGate()) {\n @if (!chartWorkspace()) {\n <div\n class=\"flex flex-col items-center gap-3 rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6 text-center\"\n >\n <mt-icon icon=\"dev.database-01\" class=\"text-3xl text-primary-500\" />\n <div class=\"flex flex-col gap-1\">\n <h3 class=\"text-sm font-semibold text-surface-700\">\n {{ t(\"workspaceGateTitle\") }}\n </h3>\n <p class=\"text-xs text-muted-color\">\n {{ t(\"workspaceGateHint\") }}\n </p>\n </div>\n <div class=\"w-full max-w-sm\">\n <mt-select-field\n [options]=\"workspaceOptions()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [placeholder]=\"t('selectWorkspace')\"\n [filter]=\"true\"\n [ngModel]=\"chartWorkspace()\"\n (ngModelChange)=\"onWorkspacePick($event)\"\n />\n </div>\n </div>\n } @else if (workspaceAutoDetected()) {\n <!-- Old data: workspace inferred from the chart's existing config.\n Surface it with a Save-to-keep / Clear notice instead of a silent\n chip, so the user knows it must be saved (or can pick another). -->\n <div\n class=\"flex flex-wrap items-center justify-between gap-3 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2\"\n >\n <span class=\"flex items-start gap-2 text-sm\">\n <mt-icon\n icon=\"general.alert-circle\"\n class=\"mt-0.5 text-base text-amber-600\"\n />\n <span class=\"flex flex-col\">\n <span class=\"font-medium text-surface-700\">\n {{ t(\"workspace\") }}: {{ chartWorkspaceLabel() }}\n </span>\n <span class=\"text-xs text-amber-700\">{{\n t(\"workspaceAutoHint\")\n }}</span>\n </span>\n </span>\n <mt-button\n [label]=\"t('clear')\"\n severity=\"secondary\"\n variant=\"outlined\"\n size=\"small\"\n (onClick)=\"clearAutoDetectedWorkspace()\"\n />\n </div>\n } @else {\n <div\n class=\"flex flex-wrap items-center justify-between gap-2 rounded-lg border border-surface-200 bg-surface-50 px-3 py-2\"\n >\n <span class=\"flex items-center gap-2 text-sm\">\n <mt-icon\n icon=\"dev.database-01\"\n class=\"text-base text-primary-500\"\n />\n <span class=\"text-muted-color\">{{ t(\"workspace\") }}:</span>\n <span class=\"font-medium text-surface-700\">{{\n chartWorkspaceLabel()\n }}</span>\n </span>\n @if (!confirmingWorkspaceChange()) {\n <mt-button\n [label]=\"t('change')\"\n severity=\"secondary\"\n variant=\"outlined\"\n size=\"small\"\n (onClick)=\"requestChangeWorkspace()\"\n />\n } @else {\n <span class=\"flex flex-wrap items-center gap-2\">\n <span class=\"text-xs text-amber-600\">{{\n t(\"changeWorkspaceConfirm\")\n }}</span>\n <mt-button\n [label]=\"t('cancel')\"\n severity=\"secondary\"\n variant=\"outlined\"\n size=\"small\"\n (onClick)=\"cancelChangeWorkspace()\"\n />\n <mt-button\n [label]=\"t('changeAndClear')\"\n severity=\"danger\"\n size=\"small\"\n (onClick)=\"confirmChangeWorkspace()\"\n />\n </span>\n }\n </div>\n }\n }\n\n <!-- Sub-navigation: Selection \u00B7 Source Links (when >1 selection) \u00B7 Query -->\n @if (sectionOptions().length > 1 && !needsWorkspacePick()) {\n <mt-tabs\n [options]=\"sectionOptions()\"\n optionLabel=\"label\"\n optionValue=\"id\"\n [active]=\"visibleSection()\"\n (onChange)=\"onSectionChange($event)\"\n />\n }\n\n <!-- ===================== SELECTION ===================== -->\n @if (!hideSelectionConfig() && !needsWorkspacePick()) {\n <div\n [hidden]=\"visibleSection() !== 'selection'\"\n class=\"flex flex-col gap-5\"\n >\n @if (duplicateSelectionNames().length) {\n <div\n class=\"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-700\"\n role=\"alert\"\n >\n {{\n t(\"duplicateSelectionsWarning\", {\n names: duplicateSelectionNames().join(\", \"),\n })\n }}\n </div>\n }\n @if (showInformativeSelectionMode()) {\n <div class=\"flex items-center justify-end\">\n <mt-toggle-field\n [label]=\"t('advancedSelection')\"\n [ngModel]=\"selectionMode() === 'advanced'\"\n (ngModelChange)=\"onAdvancedSelectionToggle($event)\"\n />\n </div>\n }\n\n @if (\n !showInformativeSelectionMode() || selectionMode() === \"advanced\"\n ) {\n <mt-selection-configuration\n [workspaceId]=\"selectedWorkspaceId()\"\n [chartWorkspace]=\"chartWorkspace()\"\n [modulesProperties]=\"modulesProperties()\"\n [propertiesFlat]=\"propertiesFlat()\"\n [ngModel]=\"selections()\"\n (ngModelChange)=\"onSelectionsChange($event)\"\n (moduleChange)=\"onModuleChange($event)\"\n />\n } @else {\n <div class=\"flex flex-col gap-5\">\n <mt-informative-context-selection\n class=\"block\"\n [informativeContext]=\"informativeContext()\"\n [currentSelection]=\"selections()\"\n [preferredTargetSelector]=\"contextTargetSelector()\"\n [applyToken]=\"contextTargetApplyToken()\"\n (templateApply)=\"onContextTemplateApply($event)\"\n />\n\n @if (selections().length) {\n <mt-selection-configuration\n [workspaceId]=\"selectedWorkspaceId()\"\n [chartWorkspace]=\"chartWorkspace()\"\n [modulesProperties]=\"modulesProperties()\"\n [propertiesFlat]=\"propertiesFlat()\"\n [structureLocked]=\"true\"\n [ngModel]=\"selections()\"\n (ngModelChange)=\"onSelectionsChange($event)\"\n />\n }\n </div>\n }\n </div>\n }\n\n <!-- ===================== SOURCE LINKS (only with >1 selection) ===================== -->\n @if (showSourceLinks() && !needsWorkspacePick()) {\n <div\n [hidden]=\"visibleSection() !== 'sourceLinks'\"\n class=\"flex flex-col gap-5\"\n >\n <p class=\"text-sm text-muted-color\">{{ t(\"sourceLinksHint\") }}</p>\n @if (duplicateSelectionNames().length) {\n <div\n class=\"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-700\"\n role=\"alert\"\n >\n {{\n t(\"duplicateSelectionsWarning\", {\n names: duplicateSelectionNames().join(\", \"),\n })\n }}\n </div>\n }\n @if (unlinkedSelectionNames().length) {\n <div\n class=\"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-700\"\n role=\"alert\"\n >\n {{\n t(\"unlinkedSelectionsWarning\", {\n names: unlinkedSelectionNames().join(\", \"),\n })\n }}\n </div>\n }\n <mt-source-link-configuration\n [selectionModules]=\"selectionModules()\"\n [ngModel]=\"sourceLinks()\"\n (ngModelChange)=\"onSourceLinksChange($event)\"\n />\n </div>\n }\n\n <!-- ===================== QUERY ===================== -->\n @if (queryComponentType() !== \"none\" && !needsWorkspacePick()) {\n <div [hidden]=\"visibleSection() !== 'query'\" class=\"flex flex-col gap-5\">\n @if (loadingProperties()) {\n <div class=\"flex flex-col gap-4\">\n <div class=\"flex flex-col gap-2\">\n <p-skeleton width=\"120px\" height=\"16px\" />\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\n </div>\n <div class=\"grid grid-cols-2 gap-4\">\n <div class=\"flex flex-col gap-2\">\n <p-skeleton width=\"80px\" height=\"16px\" />\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\n </div>\n <div class=\"flex flex-col gap-2\">\n <p-skeleton width=\"90px\" height=\"16px\" />\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\n </div>\n </div>\n </div>\n } @else {\n <!-- Group By Multiple (table views) -->\n @if (showGroupByMultiple()) {\n <mt-string-array-input\n [label]=\"t('groupByMultiple')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n [placeholder]=\"t('selectGroupByProperties')\"\n [ngModel]=\"groupByMultiple()\"\n (ngModelChange)=\"onGroupByMultipleChange($event)\"\n />\n }\n\n <!-- Query Configuration based on chart type -->\n @switch (queryComponentType()) {\n @case (\"lineChart\") {\n <mt-line-chart-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onLineChartQueryChange($event)\"\n />\n }\n @case (\"general\") {\n <mt-general-query\n [chartType]=\"getChartTypeId()\"\n [querySchema]=\"querySchema()\"\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onQueryChange($event)\"\n />\n\n <mt-toggle-field\n [label]=\"t('isNormalized')\"\n [ngModel]=\"isNormalized()\"\n (ngModelChange)=\"onIsNormalizedChange($event)\"\n />\n }\n @case (\"table\") {\n <mt-table-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onTableQueryChange($event)\"\n />\n }\n @case (\"phaseGateTable\") {\n @let phaseGateQuery = phaseGateTableQuery();\n @let groupedPhaseGateProperties = propertiesGrouped().length > 1;\n\n <div class=\"flex flex-col gap-5\">\n <p class=\"text-sm text-muted-color\">\n {{ t(\"phaseGateTableQueryDescription\") }}\n </p>\n\n <div class=\"grid grid-cols-1 gap-4 lg:grid-cols-2\">\n <mt-select-field\n [label]=\"t('phaseGateRowIdentityProperty')\"\n [hint]=\"t('phaseGateRowIdentityPropertyHint')\"\n [required]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.rowIdentityProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange('rowIdentityProperty', $event)\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateNameProperty')\"\n [hint]=\"t('phaseGateNamePropertyHint')\"\n [required]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseNameProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange('phaseNameProperty', $event)\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateStatusProperty')\"\n [hint]=\"t('phaseGateStatusPropertyHint')\"\n [required]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseStatusProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange('phaseStatusProperty', $event)\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateIdProperty')\"\n [hint]=\"t('phaseGateIdPropertyHint')\"\n [showClear]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseIdProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange('phaseIdProperty', $event)\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateOrderProperty')\"\n [showClear]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseOrderProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange('phaseOrderProperty', $event)\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateProgressProperty')\"\n [showClear]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseProgressProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange(\n 'phaseProgressProperty',\n $event\n )\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateCurrentProperty')\"\n [showClear]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseIsCurrentProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange(\n 'phaseIsCurrentProperty',\n $event\n )\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateCompletedProperty')\"\n [showClear]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseIsCompletedProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange(\n 'phaseIsCompletedProperty',\n $event\n )\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateAllItemsCompletedProperty')\"\n [showClear]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseAllItemsCompletedProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange(\n 'phaseAllItemsCompletedProperty',\n $event\n )\n \"\n />\n </div>\n\n <mt-string-array-input\n [label]=\"t('phaseGateVisibleProperties')\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n [placeholder]=\"t('phaseGateVisiblePropertiesPlaceholder')\"\n [ngModel]=\"phaseGateQuery.baseProperties\"\n (ngModelChange)=\"onPhaseGateTableBasePropertiesChange($event)\"\n />\n\n <p class=\"text-xs text-muted-color\">\n {{ t(\"phaseGateProjectionHint\") }}\n </p>\n </div>\n }\n @case (\"timeline\") {\n <mt-timeline-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onTimelineQueryChange($event)\"\n />\n }\n @case (\"timelineMultiLevel\") {\n <div class=\"flex flex-col gap-5\">\n <div class=\"flex items-center justify-between\">\n <p class=\"text-sm text-muted-color\">\n {{ t(\"timelineMultiLevelDescription\") }}\n </p>\n <mt-button\n size=\"small\"\n severity=\"secondary\"\n icon=\"general.plus\"\n [label]=\"t('addLevel')\"\n (onClick)=\"addTimelineLevel()\"\n />\n </div>\n\n <mt-select-field\n [label]=\"t('timeFrame')\"\n [options]=\"timeFrameOptions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [ngModel]=\"timelineTimeFrame()\"\n (ngModelChange)=\"onTimelineTimeFrameChange($event)\"\n />\n\n @for (level of timelineLevels(); track $index) {\n <div\n class=\"border border-surface-300 rounded-md p-4 flex flex-col gap-3\"\n >\n <div class=\"flex items-center justify-between\">\n <span class=\"font-medium\">\n {{ t(\"level\") }} {{ level.levelNumber || $index + 1 }}\n </span>\n <mt-button\n size=\"small\"\n severity=\"danger\"\n [text]=\"true\"\n icon=\"general.trash-02\"\n (onClick)=\"removeTimelineLevel($index)\"\n />\n </div>\n\n <div class=\"grid grid-cols-2 gap-3\">\n <mt-select-field\n [label]=\"t('pivotProperty')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [ngModel]=\"level.pivotProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'pivotProperty',\n $event\n )\n \"\n />\n <mt-select-field\n [label]=\"t('lookupProperty')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [ngModel]=\"level.lookupProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'lookupProperty',\n $event\n )\n \"\n />\n <mt-select-field\n [label]=\"t('idProperty')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [ngModel]=\"level.idProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField($index, 'idProperty', $event)\n \"\n />\n <mt-select-field\n [label]=\"t('startTimeProperty')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [ngModel]=\"level.startPoint_timeProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'startPoint_timeProperty',\n $event\n )\n \"\n />\n <mt-select-field\n [label]=\"t('endTimeProperty')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [ngModel]=\"level.endPoint_timeProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'endPoint_timeProperty',\n $event\n )\n \"\n />\n <mt-select-field\n [label]=\"t('progressProperty')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [ngModel]=\"level.progressProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'progressProperty',\n $event\n )\n \"\n />\n @if (shouldShowTimelineParentProperty($index)) {\n <mt-select-field\n [label]=\"t('parentProperty')\"\n [options]=\"timelineParentPropertyOptions($index)\"\n optionLabel=\"name\"\n optionValue=\"key\"\n [ngModel]=\"level.parentProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'parentProperty',\n $event\n )\n \"\n />\n }\n </div>\n\n <mt-string-array-input\n [label]=\"t('extraProperties')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n [placeholder]=\"t('selectProperties')\"\n [ngModel]=\"level.extraProperties || level.extras || []\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'extraProperties',\n $event\n )\n \"\n />\n </div>\n }\n\n @if (timelineLevels().length === 0) {\n <div class=\"text-center py-4 text-muted-color text-sm\">\n {{ t(\"noTimelineLevelsHint\") }}\n </div>\n }\n </div>\n }\n @case (\"map\") {\n <mt-map-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onMapQueryChange($event)\"\n />\n }\n @case (\"splitter\") {\n <mt-splitter-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onSplitterQueryChange($event)\"\n />\n }\n @case (\"properties\") {\n <mt-properties-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [numericOnly]=\"getChartTypeId() === 'ring-gauge-chart'\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onPropertiesQueryChange($event)\"\n />\n }\n @case (\"snapshot\") {\n <mt-snapshot-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onSnapshotQueryChange($event)\"\n />\n }\n @case (\"phaseGateStepper\") {\n @let stepperQuery = phaseGateTableQuery();\n @let groupedStepperProperties = propertiesGrouped().length > 1;\n\n <div class=\"flex flex-col gap-5\">\n <p class=\"text-sm text-muted-color\">\n {{ t(\"phaseGateStepperQueryDescription\") }}\n </p>\n\n <div class=\"grid grid-cols-1 gap-4 lg:grid-cols-2\">\n @for (role of phaseGateStepperRoles; track role.field) {\n @let required =\n !!querySchema()?.required?.includes(role.field);\n <mt-select-field\n [label]=\"t(role.label)\"\n [hint]=\"t(role.hint)\"\n [required]=\"required\"\n [showClear]=\"!required\"\n [options]=\"\n groupedStepperProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedStepperProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"stepperQuery[role.field]\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange(role.field, $event)\n \"\n />\n }\n </div>\n </div>\n }\n @case (\"repeater\") {\n <div class=\"flex flex-col gap-5\">\n <mt-select-field\n [label]=\"t('repeaterDashboard')\"\n [options]=\"availableDashboards()\"\n optionLabel=\"name\"\n optionValue=\"id\"\n [ngModel]=\"repeaterDashboardId()\"\n (ngModelChange)=\"onRepeaterDashboardChange($event)\"\n />\n\n <mt-string-array-input\n [label]=\"t('repeaterSelectedProperties')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n [placeholder]=\"t('repeaterSelectedPropertiesPlaceholder')\"\n [ngModel]=\"repeaterSelectedProperties()\"\n (ngModelChange)=\"onRepeaterSelectedPropertiesChange($event)\"\n />\n </div>\n }\n }\n }\n </div>\n }\n }\n</div>\n" }]
41869
42280
  }], ctorParameters: () => [], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], chartType: [{ type: i0.Input, args: [{ isSignal: true, alias: "chartType", required: false }] }], informativeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "informativeContext", required: false }] }], serviceConfigChange: [{ type: i0.Output, args: ["serviceConfigChange"] }] } });
41870
42281
 
41871
42282
  /**
@@ -43118,6 +43529,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
43118
43529
  * - Equal -> Equals normalization on persist.
43119
43530
  * - Read-only display for selection/repeater chips with explanatory copy.
43120
43531
  *
43532
+ * Fields are labelled with their property names, and a lookup / status
43533
+ * property picks its value from a dropdown of its values (#1829, #1845).
43534
+ *
43121
43535
  * The builder edits the in-popover working FilterChip[] and emits the full
43122
43536
  * list back to the host. The host applies it to the persisted config via
43123
43537
  * `applyFilterChipsToPersisted`.
@@ -43131,12 +43545,76 @@ const OPERATOR_OPTIONS = [
43131
43545
  { value: 'LessThan', labelKey: 'operators.LessThan', group: 'number' },
43132
43546
  { value: 'Between', labelKey: 'operators.Between', group: 'number' },
43133
43547
  { value: 'IsNull', labelKey: 'operators.IsNull', group: 'null' },
43134
- // No IsNotNull: the BE filter model has no "is not empty" operation.
43548
+ { value: 'IsNotNull', labelKey: 'operators.IsNotNull', group: 'null' },
43135
43549
  ];
43136
43550
  class FilterBuilderComponent {
43551
+ dashboardService = inject(DashboardBuilderService);
43137
43552
  chips = input.required(...(ngDevMode ? [{ debugName: "chips" }] : /* istanbul ignore next */ []));
43138
43553
  persisted = input(null, ...(ngDevMode ? [{ debugName: "persisted" }] : /* istanbul ignore next */ []));
43139
43554
  chipsChange = output();
43555
+ /** Metadata of the item's selection properties, by key. */
43556
+ properties = signal(new Map(), ...(ngDevMode ? [{ debugName: "properties" }] : /* istanbul ignore next */ []));
43557
+ /** Values of the lookup / status properties a chip filters on. */
43558
+ valueOptionsByKey = signal(new Map(), ...(ngDevMode ? [{ debugName: "valueOptionsByKey" }] : /* istanbul ignore next */ []));
43559
+ propertiesRequest = '';
43560
+ requestedValueKeys = new Set();
43561
+ constructor() {
43562
+ effect(() => {
43563
+ const sc = this.persisted()?.serviceConfig ?? {};
43564
+ const items = (Array.isArray(sc.selection) ? sc.selection : [])
43565
+ .filter((selection) => selection?.selector)
43566
+ .map((selection) => ({
43567
+ serviceName: selection.service || 'pplus',
43568
+ selector: selection.selector,
43569
+ }));
43570
+ const workspaceId = sc.workspaceId ?? null;
43571
+ const request = JSON.stringify([items, workspaceId]);
43572
+ if (!items.length || request === this.propertiesRequest)
43573
+ return;
43574
+ this.propertiesRequest = request;
43575
+ untracked(() => this.dashboardService
43576
+ .getBulkProperties(items, workspaceId)
43577
+ .subscribe((response) => {
43578
+ const byKey = new Map();
43579
+ for (const module of response.data ?? []) {
43580
+ for (const property of module.properties ?? []) {
43581
+ if (!byKey.has(property.key))
43582
+ byKey.set(property.key, property);
43583
+ }
43584
+ }
43585
+ this.properties.set(byKey);
43586
+ }));
43587
+ });
43588
+ effect(() => {
43589
+ const properties = this.properties();
43590
+ for (const chip of this.editableChips()) {
43591
+ const key = chip.propertyKey;
43592
+ if (!key || this.requestedValueKeys.has(key))
43593
+ continue;
43594
+ const property = properties.get(key);
43595
+ // Only a known lookup-like property: an unknown or free-text one
43596
+ // keeps the text box.
43597
+ if (!property?.viewType || propertyValueSource(property) !== 'remote')
43598
+ continue;
43599
+ this.requestedValueKeys.add(key);
43600
+ untracked(() => this.dashboardService.getPropertyItems(key).subscribe((response) => {
43601
+ const options = (response.data?.items ?? []).map((item) => ({
43602
+ label: item.name,
43603
+ value: item.key,
43604
+ }));
43605
+ this.valueOptionsByKey.update((byKey) => new Map(byKey).set(key, options));
43606
+ }));
43607
+ }
43608
+ });
43609
+ }
43610
+ /** The values to pick from for a chip's property, or null to type one. */
43611
+ valueOptions(chip) {
43612
+ const options = this.valueOptionsByKey().get(chip.propertyKey);
43613
+ return options?.length ? options : null;
43614
+ }
43615
+ fieldLabel(key) {
43616
+ return this.properties().get(key)?.name || prettyLabel(key);
43617
+ }
43140
43618
  showReadOnly = signal(false, ...(ngDevMode ? [{ debugName: "showReadOnly" }] : /* istanbul ignore next */ []));
43141
43619
  OPERATOR_OPTIONS = OPERATOR_OPTIONS;
43142
43620
  editableChips = computed(() => this.chips().filter((c) => c.source === 'static'), ...(ngDevMode ? [{ debugName: "editableChips" }] : /* istanbul ignore next */ []));
@@ -43154,7 +43632,7 @@ class FilterBuilderComponent {
43154
43632
  if (!k || seen.has(k))
43155
43633
  return;
43156
43634
  seen.add(k);
43157
- out.push({ key: k, label: prettyLabel(k), source });
43635
+ out.push({ key: k, label: this.fieldLabel(k), source });
43158
43636
  };
43159
43637
  const collectQueryFields = (entry) => {
43160
43638
  if (typeof entry?.['valueProperty'] === 'string') {
@@ -43226,7 +43704,7 @@ class FilterBuilderComponent {
43226
43704
  ...options,
43227
43705
  {
43228
43706
  key,
43229
- label: `${prettyLabel(key)} (${t('filterBuilder.customSuffix')})`,
43707
+ label: `${this.fieldLabel(key)} (${t('filterBuilder.customSuffix')})`,
43230
43708
  source: 'manual',
43231
43709
  },
43232
43710
  ];
@@ -43304,7 +43782,7 @@ class FilterBuilderComponent {
43304
43782
  ? {
43305
43783
  ...c,
43306
43784
  propertyKey,
43307
- propertyLabel: known?.label ?? prettyLabel(propertyKey),
43785
+ propertyLabel: known?.label ?? this.fieldLabel(propertyKey),
43308
43786
  }
43309
43787
  : c));
43310
43788
  }
@@ -43366,7 +43844,7 @@ class FilterBuilderComponent {
43366
43844
  // also blocks empty/`newField` keys, so a save while incomplete is
43367
43845
  // a no-op for that row instead of writing junk.
43368
43846
  propertyKey: firstFieldKey,
43369
- propertyLabel: firstFieldKey ? prettyLabel(firstFieldKey) : '',
43847
+ propertyLabel: firstFieldKey ? this.fieldLabel(firstFieldKey) : '',
43370
43848
  operator: 'Equals',
43371
43849
  value: '',
43372
43850
  active: true,
@@ -43380,228 +43858,257 @@ class FilterBuilderComponent {
43380
43858
  this.chipsChange.emit(chips);
43381
43859
  }
43382
43860
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FilterBuilderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
43383
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: FilterBuilderComponent, isStandalone: true, selector: "mt-filter-builder", inputs: { chips: { classPropertyName: "chips", publicName: "chips", isSignal: true, isRequired: true, transformFunction: null }, persisted: { classPropertyName: "persisted", publicName: "persisted", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { chipsChange: "chipsChange" }, ngImport: i0, template: `
43384
- <ng-container *transloco="let t; prefix: 'dashboardBuilder.pass4'">
43385
- <div class="db-filter-builder">
43386
- <header class="db-filter-builder__header">
43387
- <h3 class="db-filter-builder__title">
43388
- {{ t('filterBuilder.title') }}
43389
- </h3>
43390
- <p class="db-filter-builder__hint">
43391
- {{ t('filterBuilder.hint') }}
43392
- </p>
43393
- </header>
43394
-
43395
- @if (editableChips().length === 0) {
43396
- <div class="db-filter-builder__empty">
43397
- <i class="mti mti-general.filter-lines"></i>
43398
- <span>{{ t('filterBuilder.empty') }}</span>
43399
- </div>
43400
- } @else {
43401
- <ul class="db-filter-builder__list">
43402
- @for (chip of editableChips(); track chip.id) {
43403
- <li
43404
- class="db-filter-row"
43405
- [class.is-inactive]="!chip.active"
43406
- [attr.data-scope]="chip.scope"
43407
- >
43408
- <div class="db-filter-row__head">
43409
- <mt-toggle-field
43410
- class="db-filter-row__active"
43411
- [label]="t('filterBuilder.active')"
43412
- labelPosition="end"
43413
- size="small"
43414
- [ngModel]="chip.active"
43415
- (ngModelChange)="setActive(chip, $event)"
43416
- />
43417
- <span class="db-filter-row__scope">{{
43418
- t(scopeLabelKey(chip.scope))
43419
- }}</span>
43420
- <mt-select-field
43421
- class="db-filter-row__field"
43422
- [options]="fieldOptionsFor(chip, t)"
43423
- optionLabel="label"
43424
- optionValue="key"
43425
- [filter]="true"
43426
- size="small"
43427
- [placeholder]="t('filterBuilder.pickField')"
43428
- [ngModel]="chip.propertyKey"
43429
- (ngModelChange)="setField(chip, $event)"
43430
- />
43431
- <mt-select-field
43432
- class="db-filter-row__operator"
43433
- [options]="operatorOptions(t)"
43434
- optionLabel="label"
43435
- optionValue="value"
43436
- size="small"
43437
- [ngModel]="chip.operator"
43438
- (ngModelChange)="setOperator(chip, $event)"
43439
- />
43440
- <mt-button
43441
- class="db-filter-row__remove"
43442
- icon="general.trash-01"
43443
- [tooltip]="t('filterBuilder.remove')"
43444
- severity="danger"
43445
- size="small"
43446
- [rounded]="true"
43447
- [text]="true"
43448
- (onClick)="remove(chip)"
43449
- />
43450
- </div>
43451
- <div class="db-filter-row__body">
43452
- @if (
43453
- chip.operator !== 'IsNull' && chip.operator !== 'IsNotNull'
43454
- ) {
43455
- @switch (valueKind(chip)) {
43456
- @case ('list') {
43457
- <mt-text-field
43458
- class="db-filter-row__value"
43459
- [placeholder]="t('filterBuilder.listHint')"
43460
- [ngModel]="formatList(chip.value)"
43461
- (ngModelChange)="setListValue(chip, $event)"
43462
- />
43463
- }
43464
- @case ('between') {
43465
- <div class="db-filter-row__between">
43466
- <mt-text-field
43467
- class="db-filter-row__value"
43468
- [placeholder]="t('filterBuilder.from')"
43469
- [ngModel]="getBetween(chip, 0)"
43470
- (ngModelChange)="setBetween(chip, 0, $event)"
43471
- />
43472
- <span class="db-filter-row__between-sep">
43473
- {{ t('filterBuilder.to') }}
43474
- </span>
43475
- <mt-text-field
43476
- class="db-filter-row__value"
43477
- [placeholder]="t('filterBuilder.to')"
43478
- [ngModel]="getBetween(chip, 1)"
43479
- (ngModelChange)="setBetween(chip, 1, $event)"
43480
- />
43481
- </div>
43482
- }
43483
- @case ('boolean') {
43484
- <mt-toggle-field
43485
- class="db-filter-row__bool"
43486
- [label]="
43487
- chip.value
43488
- ? t('filterBuilder.trueValue')
43489
- : t('filterBuilder.falseValue')
43490
- "
43491
- size="small"
43492
- [ngModel]="!!chip.value"
43493
- (ngModelChange)="setValue(chip, $event)"
43494
- />
43495
- }
43496
- @case ('number') {
43497
- <mt-number-field
43498
- class="db-filter-row__value"
43499
- [placeholder]="t('filterBuilder.value')"
43500
- [ngModel]="chip.value ?? null"
43501
- (ngModelChange)="setNumber(chip, $event)"
43502
- />
43503
- }
43504
- @default {
43505
- <mt-text-field
43506
- class="db-filter-row__value"
43507
- [placeholder]="t('filterBuilder.value')"
43508
- [ngModel]="chip.value ?? ''"
43509
- (ngModelChange)="setValue(chip, $event)"
43510
- />
43511
- }
43512
- }
43513
- }
43514
- </div>
43515
- </li>
43516
- }
43517
- </ul>
43518
- }
43519
-
43520
- <footer class="db-filter-builder__footer">
43521
- <mt-button
43522
- [label]="t('filterBuilder.add')"
43523
- icon="general.plus"
43524
- severity="primary"
43525
- size="small"
43526
- [outlined]="true"
43527
- (onClick)="addStaticFilter()"
43528
- />
43529
- @if (readOnlyCount() > 0) {
43530
- <mt-button
43531
- class="db-filter-builder__readonly-toggle"
43532
- [label]="
43533
- showReadOnly()
43534
- ? t('filterBuilder.hideReadonly')
43535
- : t('filterBuilder.showReadonly') +
43536
- ' (' +
43537
- readOnlyCount() +
43538
- ')'
43539
- "
43540
- severity="secondary"
43541
- size="small"
43542
- variant="text"
43543
- (onClick)="toggleShowReadOnly()"
43544
- />
43545
- }
43546
- </footer>
43547
-
43548
- @if (showReadOnly() && readOnlyChips().length) {
43549
- <ul class="db-filter-builder__list db-filter-builder__list--readonly">
43550
- @for (chip of readOnlyChips(); track chip.id) {
43551
- <li
43552
- class="db-filter-row is-readonly"
43553
- [attr.data-scope]="chip.scope"
43554
- >
43555
- <div class="db-filter-row__head">
43556
- <span class="db-filter-row__scope">
43557
- {{ t(scopeLabelKey(chip.scope)) }}
43558
- </span>
43559
- <span class="db-filter-row__readonly-property">
43560
- {{ chip.propertyLabel || chip.propertyKey }}
43561
- </span>
43562
- <span class="db-filter-row__operator-readonly">
43563
- {{ t(operatorLabelKey(chip.operator)) }}
43564
- </span>
43565
- <span class="db-filter-row__value-readonly">
43566
- {{ formatReadonlyValue(chip, t) }}
43567
- </span>
43568
- @if (chip.source === 'dynamic') {
43569
- <mt-toggle-field
43570
- class="db-filter-row__active"
43571
- [label]="t('filterBuilder.active')"
43572
- labelPosition="start"
43573
- size="small"
43574
- [ngModel]="chip.active"
43575
- (ngModelChange)="setActive(chip, $event)"
43576
- />
43577
- }
43578
- </div>
43579
- @if (chip.source === 'selection') {
43580
- <p class="db-filter-row__readonly-hint">
43581
- {{ t('filterBuilder.selectionReadonlyHint') }}
43582
- </p>
43583
- }
43584
- @if (chip.source === 'repeater') {
43585
- <p class="db-filter-row__readonly-hint">
43586
- {{ t('filterBuilder.repeaterReadonlyHint') }}
43587
- </p>
43588
- }
43589
- @if (chip.source === 'dynamic') {
43590
- <p class="db-filter-row__readonly-hint">
43591
- {{
43592
- t('filterBuilder.dynamicReadonlyHint', {
43593
- key: chip.dynamicKey,
43594
- })
43595
- }}
43596
- </p>
43597
- }
43598
- </li>
43599
- }
43600
- </ul>
43601
- }
43602
- </div>
43603
- </ng-container>
43604
- `, isInline: true, styles: [".db-filter-builder{display:flex;flex-direction:column;gap:.6rem}.db-filter-builder__header{display:flex;flex-direction:column;gap:.2rem}.db-filter-builder__title{margin:0;font-size:.85rem;font-weight:600}.db-filter-builder__hint{margin:0;font-size:.75rem;color:var(--p-text-muted-color, #6b7280)}.db-filter-builder__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.4rem}.db-filter-builder__list--readonly{margin-top:.4rem}.db-filter-builder__empty{display:flex;align-items:center;gap:.5rem;padding:.75rem;background:var(--p-surface-50, #f9fafb);border:1px dashed var(--p-surface-300, #d1d5db);border-radius:.5rem;font-size:.8rem;color:var(--p-text-muted-color, #6b7280)}.db-filter-row{display:flex;flex-direction:column;gap:.4rem;padding:.6rem;background:var(--p-surface-0, #fff);border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.5rem}.db-filter-row.is-inactive{opacity:.55}.db-filter-row.is-readonly{background:var(--p-surface-50, #f9fafb)}.db-filter-row[data-scope=page]{border-color:var(--p-blue-200, #bfdbfe)}.db-filter-row[data-scope=source]{border-color:var(--p-amber-200, #fde68a)}.db-filter-row[data-scope=repeater]{border-color:var(--p-purple-200, #ddd6fe)}.db-filter-row__head{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap}.db-filter-row__scope{font-size:.65rem;font-weight:700;padding:.1rem .4rem;border-radius:999px;background:var(--p-surface-100, #f3f4f6);color:var(--p-text-muted-color, #6b7280);text-transform:uppercase;letter-spacing:.04em}.db-filter-row__active{flex:0 0 auto}.db-filter-row__field{flex:1 1 12rem;min-width:10rem}.db-filter-row__operator{flex:0 1 10rem;min-width:9rem}.db-filter-row__remove{margin-left:auto}.db-filter-row__body{display:flex}.db-filter-row__value{flex:1 1 auto;min-width:0}.db-filter-row__between{display:flex;align-items:center;gap:.4rem;flex:1 1 auto}.db-filter-row__between-sep{color:var(--p-text-muted-color, #6b7280)}.db-filter-row__bool{flex:1 1 auto}.db-filter-row__readonly-property{font-weight:600}.db-filter-row__operator-readonly,.db-filter-row__value-readonly{font-size:.78rem;color:var(--p-text-muted-color, #6b7280)}.db-filter-row__readonly-hint{margin:0;font-size:.7rem;color:var(--p-text-muted-color, #6b7280)}.db-filter-builder__footer{display:flex;align-items:center;justify-content:space-between;gap:.5rem}\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: NumberField, selector: "mt-number-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "pInputs", "format", "useGrouping", "maxFractionDigits", "min", "max", "required"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
43861
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: FilterBuilderComponent, isStandalone: true, selector: "mt-filter-builder", inputs: { chips: { classPropertyName: "chips", publicName: "chips", isSignal: true, isRequired: true, transformFunction: null }, persisted: { classPropertyName: "persisted", publicName: "persisted", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { chipsChange: "chipsChange" }, ngImport: i0, template: `
43862
+ <ng-container *transloco="let t; prefix: 'dashboardBuilder.pass4'">
43863
+ <div class="db-filter-builder">
43864
+ <header class="db-filter-builder__header">
43865
+ <h3 class="db-filter-builder__title">
43866
+ {{ t('filterBuilder.title') }}
43867
+ </h3>
43868
+ <p class="db-filter-builder__hint">
43869
+ {{ t('filterBuilder.hint') }}
43870
+ </p>
43871
+ </header>
43872
+
43873
+ @if (editableChips().length === 0) {
43874
+ <div class="db-filter-builder__empty">
43875
+ <i class="mti mti-general.filter-lines"></i>
43876
+ <span>{{ t('filterBuilder.empty') }}</span>
43877
+ </div>
43878
+ } @else {
43879
+ <ul class="db-filter-builder__list">
43880
+ @for (chip of editableChips(); track chip.id) {
43881
+ <li
43882
+ class="db-filter-row"
43883
+ [class.is-inactive]="!chip.active"
43884
+ [attr.data-scope]="chip.scope"
43885
+ >
43886
+ <div class="db-filter-row__head">
43887
+ <mt-toggle-field
43888
+ class="db-filter-row__active"
43889
+ [label]="t('filterBuilder.active')"
43890
+ labelPosition="end"
43891
+ size="small"
43892
+ [ngModel]="chip.active"
43893
+ (ngModelChange)="setActive(chip, $event)"
43894
+ />
43895
+ <span class="db-filter-row__scope">{{
43896
+ t(scopeLabelKey(chip.scope))
43897
+ }}</span>
43898
+ <mt-select-field
43899
+ class="db-filter-row__field"
43900
+ [options]="fieldOptionsFor(chip, t)"
43901
+ optionLabel="label"
43902
+ optionValue="key"
43903
+ [filter]="true"
43904
+ size="small"
43905
+ [placeholder]="t('filterBuilder.pickField')"
43906
+ [ngModel]="chip.propertyKey"
43907
+ (ngModelChange)="setField(chip, $event)"
43908
+ />
43909
+ <mt-select-field
43910
+ class="db-filter-row__operator"
43911
+ [options]="operatorOptions(t)"
43912
+ optionLabel="label"
43913
+ optionValue="value"
43914
+ size="small"
43915
+ [ngModel]="chip.operator"
43916
+ (ngModelChange)="setOperator(chip, $event)"
43917
+ />
43918
+ <mt-button
43919
+ class="db-filter-row__remove"
43920
+ icon="general.trash-01"
43921
+ [tooltip]="t('filterBuilder.remove')"
43922
+ severity="danger"
43923
+ size="small"
43924
+ [rounded]="true"
43925
+ [text]="true"
43926
+ (onClick)="remove(chip)"
43927
+ />
43928
+ </div>
43929
+ <div class="db-filter-row__body">
43930
+ @if (
43931
+ chip.operator !== 'IsNull' && chip.operator !== 'IsNotNull'
43932
+ ) {
43933
+ @switch (valueKind(chip)) {
43934
+ @case ('list') {
43935
+ @if (valueOptions(chip); as options) {
43936
+ <mt-multi-select-field
43937
+ class="db-filter-row__value"
43938
+ [options]="options"
43939
+ optionLabel="label"
43940
+ optionValue="value"
43941
+ [filter]="true"
43942
+ size="small"
43943
+ [placeholder]="t('filterBuilder.value')"
43944
+ [ngModel]="chip.value"
43945
+ (ngModelChange)="setValue(chip, $event)"
43946
+ />
43947
+ } @else {
43948
+ <mt-text-field
43949
+ class="db-filter-row__value"
43950
+ [placeholder]="t('filterBuilder.listHint')"
43951
+ [ngModel]="formatList(chip.value)"
43952
+ (ngModelChange)="setListValue(chip, $event)"
43953
+ />
43954
+ }
43955
+ }
43956
+ @case ('between') {
43957
+ <div class="db-filter-row__between">
43958
+ <mt-text-field
43959
+ class="db-filter-row__value"
43960
+ [placeholder]="t('filterBuilder.from')"
43961
+ [ngModel]="getBetween(chip, 0)"
43962
+ (ngModelChange)="setBetween(chip, 0, $event)"
43963
+ />
43964
+ <span class="db-filter-row__between-sep">
43965
+ {{ t('filterBuilder.to') }}
43966
+ </span>
43967
+ <mt-text-field
43968
+ class="db-filter-row__value"
43969
+ [placeholder]="t('filterBuilder.to')"
43970
+ [ngModel]="getBetween(chip, 1)"
43971
+ (ngModelChange)="setBetween(chip, 1, $event)"
43972
+ />
43973
+ </div>
43974
+ }
43975
+ @case ('boolean') {
43976
+ <mt-toggle-field
43977
+ class="db-filter-row__bool"
43978
+ [label]="
43979
+ chip.value
43980
+ ? t('filterBuilder.trueValue')
43981
+ : t('filterBuilder.falseValue')
43982
+ "
43983
+ size="small"
43984
+ [ngModel]="!!chip.value"
43985
+ (ngModelChange)="setValue(chip, $event)"
43986
+ />
43987
+ }
43988
+ @case ('number') {
43989
+ <mt-number-field
43990
+ class="db-filter-row__value"
43991
+ [placeholder]="t('filterBuilder.value')"
43992
+ [ngModel]="chip.value ?? null"
43993
+ (ngModelChange)="setNumber(chip, $event)"
43994
+ />
43995
+ }
43996
+ @default {
43997
+ @if (valueOptions(chip); as options) {
43998
+ <mt-select-field
43999
+ class="db-filter-row__value"
44000
+ [options]="options"
44001
+ optionLabel="label"
44002
+ optionValue="value"
44003
+ [filter]="true"
44004
+ [showClear]="true"
44005
+ size="small"
44006
+ [placeholder]="t('filterBuilder.value')"
44007
+ [ngModel]="chip.value ?? null"
44008
+ (ngModelChange)="setValue(chip, $event ?? '')"
44009
+ />
44010
+ } @else {
44011
+ <mt-text-field
44012
+ class="db-filter-row__value"
44013
+ [placeholder]="t('filterBuilder.value')"
44014
+ [ngModel]="chip.value ?? ''"
44015
+ (ngModelChange)="setValue(chip, $event)"
44016
+ />
44017
+ }
44018
+ }
44019
+ }
44020
+ }
44021
+ </div>
44022
+ </li>
44023
+ }
44024
+ </ul>
44025
+ }
44026
+
44027
+ <footer class="db-filter-builder__footer">
44028
+ <mt-button
44029
+ [label]="t('filterBuilder.add')"
44030
+ icon="general.plus"
44031
+ severity="primary"
44032
+ size="small"
44033
+ [outlined]="true"
44034
+ (onClick)="addStaticFilter()"
44035
+ />
44036
+ @if (readOnlyCount() > 0) {
44037
+ <mt-button
44038
+ class="db-filter-builder__readonly-toggle"
44039
+ [label]="
44040
+ showReadOnly()
44041
+ ? t('filterBuilder.hideReadonly')
44042
+ : t('filterBuilder.showReadonly') +
44043
+ ' (' +
44044
+ readOnlyCount() +
44045
+ ')'
44046
+ "
44047
+ severity="secondary"
44048
+ size="small"
44049
+ variant="text"
44050
+ (onClick)="toggleShowReadOnly()"
44051
+ />
44052
+ }
44053
+ </footer>
44054
+
44055
+ @if (showReadOnly() && readOnlyChips().length) {
44056
+ <ul class="db-filter-builder__list db-filter-builder__list--readonly">
44057
+ @for (chip of readOnlyChips(); track chip.id) {
44058
+ <li
44059
+ class="db-filter-row is-readonly"
44060
+ [attr.data-scope]="chip.scope"
44061
+ >
44062
+ <div class="db-filter-row__head">
44063
+ <span class="db-filter-row__scope">
44064
+ {{ t(scopeLabelKey(chip.scope)) }}
44065
+ </span>
44066
+ <span class="db-filter-row__readonly-property">
44067
+ {{ chip.propertyLabel || chip.propertyKey }}
44068
+ </span>
44069
+ <span class="db-filter-row__operator-readonly">
44070
+ {{ t(operatorLabelKey(chip.operator)) }}
44071
+ </span>
44072
+ <span class="db-filter-row__value-readonly">
44073
+ {{ formatReadonlyValue(chip, t) }}
44074
+ </span>
44075
+ @if (chip.source === 'dynamic') {
44076
+ <mt-toggle-field
44077
+ class="db-filter-row__active"
44078
+ [label]="t('filterBuilder.active')"
44079
+ labelPosition="start"
44080
+ size="small"
44081
+ [ngModel]="chip.active"
44082
+ (ngModelChange)="setActive(chip, $event)"
44083
+ />
44084
+ }
44085
+ </div>
44086
+ @if (chip.source === 'selection') {
44087
+ <p class="db-filter-row__readonly-hint">
44088
+ {{ t('filterBuilder.selectionReadonlyHint') }}
44089
+ </p>
44090
+ }
44091
+ @if (chip.source === 'repeater') {
44092
+ <p class="db-filter-row__readonly-hint">
44093
+ {{ t('filterBuilder.repeaterReadonlyHint') }}
44094
+ </p>
44095
+ }
44096
+ @if (chip.source === 'dynamic') {
44097
+ <p class="db-filter-row__readonly-hint">
44098
+ {{
44099
+ t('filterBuilder.dynamicReadonlyHint', {
44100
+ key: chip.dynamicKey,
44101
+ })
44102
+ }}
44103
+ </p>
44104
+ }
44105
+ </li>
44106
+ }
44107
+ </ul>
44108
+ }
44109
+ </div>
44110
+ </ng-container>
44111
+ `, isInline: true, styles: [".db-filter-builder{display:flex;flex-direction:column;gap:.6rem}.db-filter-builder__header{display:flex;flex-direction:column;gap:.2rem}.db-filter-builder__title{margin:0;font-size:.85rem;font-weight:600}.db-filter-builder__hint{margin:0;font-size:.75rem;color:var(--p-text-muted-color, #6b7280)}.db-filter-builder__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.4rem}.db-filter-builder__list--readonly{margin-top:.4rem}.db-filter-builder__empty{display:flex;align-items:center;gap:.5rem;padding:.75rem;background:var(--p-surface-50, #f9fafb);border:1px dashed var(--p-surface-300, #d1d5db);border-radius:.5rem;font-size:.8rem;color:var(--p-text-muted-color, #6b7280)}.db-filter-row{display:flex;flex-direction:column;gap:.4rem;padding:.6rem;background:var(--p-surface-0, #fff);border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.5rem}.db-filter-row.is-inactive{opacity:.55}.db-filter-row.is-readonly{background:var(--p-surface-50, #f9fafb)}.db-filter-row[data-scope=page]{border-color:var(--p-blue-200, #bfdbfe)}.db-filter-row[data-scope=source]{border-color:var(--p-amber-200, #fde68a)}.db-filter-row[data-scope=repeater]{border-color:var(--p-purple-200, #ddd6fe)}.db-filter-row__head{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap}.db-filter-row__scope{font-size:.65rem;font-weight:700;padding:.1rem .4rem;border-radius:999px;background:var(--p-surface-100, #f3f4f6);color:var(--p-text-muted-color, #6b7280);text-transform:uppercase;letter-spacing:.04em}.db-filter-row__active{flex:0 0 auto}.db-filter-row__field{flex:1 1 12rem;min-width:10rem}.db-filter-row__operator{flex:0 1 10rem;min-width:9rem}.db-filter-row__remove{margin-left:auto}.db-filter-row__body{display:flex}.db-filter-row__value{flex:1 1 auto;min-width:0}.db-filter-row__between{display:flex;align-items:center;gap:.4rem;flex:1 1 auto}.db-filter-row__between-sep{color:var(--p-text-muted-color, #6b7280)}.db-filter-row__bool{flex:1 1 auto}.db-filter-row__readonly-property{font-weight:600}.db-filter-row__operator-readonly,.db-filter-row__value-readonly{font-size:.78rem;color:var(--p-text-muted-color, #6b7280)}.db-filter-row__readonly-hint{margin:0;font-size:.7rem;color:var(--p-text-muted-color, #6b7280)}.db-filter-builder__footer{display:flex;align-items:center;justify-content:space-between;gap:.5rem}\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: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { kind: "component", type: NumberField, selector: "mt-number-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "pInputs", "format", "useGrouping", "maxFractionDigits", "min", "max", "required"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
43605
44112
  }
43606
44113
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FilterBuilderComponent, decorators: [{
43607
44114
  type: Component,
@@ -43610,233 +44117,263 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
43610
44117
  FormsModule,
43611
44118
  TranslocoDirective,
43612
44119
  Button,
44120
+ MultiSelectField,
43613
44121
  NumberField,
43614
44122
  SelectField,
43615
44123
  TextField,
43616
44124
  ToggleField,
43617
- ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: `
43618
- <ng-container *transloco="let t; prefix: 'dashboardBuilder.pass4'">
43619
- <div class="db-filter-builder">
43620
- <header class="db-filter-builder__header">
43621
- <h3 class="db-filter-builder__title">
43622
- {{ t('filterBuilder.title') }}
43623
- </h3>
43624
- <p class="db-filter-builder__hint">
43625
- {{ t('filterBuilder.hint') }}
43626
- </p>
43627
- </header>
43628
-
43629
- @if (editableChips().length === 0) {
43630
- <div class="db-filter-builder__empty">
43631
- <i class="mti mti-general.filter-lines"></i>
43632
- <span>{{ t('filterBuilder.empty') }}</span>
43633
- </div>
43634
- } @else {
43635
- <ul class="db-filter-builder__list">
43636
- @for (chip of editableChips(); track chip.id) {
43637
- <li
43638
- class="db-filter-row"
43639
- [class.is-inactive]="!chip.active"
43640
- [attr.data-scope]="chip.scope"
43641
- >
43642
- <div class="db-filter-row__head">
43643
- <mt-toggle-field
43644
- class="db-filter-row__active"
43645
- [label]="t('filterBuilder.active')"
43646
- labelPosition="end"
43647
- size="small"
43648
- [ngModel]="chip.active"
43649
- (ngModelChange)="setActive(chip, $event)"
43650
- />
43651
- <span class="db-filter-row__scope">{{
43652
- t(scopeLabelKey(chip.scope))
43653
- }}</span>
43654
- <mt-select-field
43655
- class="db-filter-row__field"
43656
- [options]="fieldOptionsFor(chip, t)"
43657
- optionLabel="label"
43658
- optionValue="key"
43659
- [filter]="true"
43660
- size="small"
43661
- [placeholder]="t('filterBuilder.pickField')"
43662
- [ngModel]="chip.propertyKey"
43663
- (ngModelChange)="setField(chip, $event)"
43664
- />
43665
- <mt-select-field
43666
- class="db-filter-row__operator"
43667
- [options]="operatorOptions(t)"
43668
- optionLabel="label"
43669
- optionValue="value"
43670
- size="small"
43671
- [ngModel]="chip.operator"
43672
- (ngModelChange)="setOperator(chip, $event)"
43673
- />
43674
- <mt-button
43675
- class="db-filter-row__remove"
43676
- icon="general.trash-01"
43677
- [tooltip]="t('filterBuilder.remove')"
43678
- severity="danger"
43679
- size="small"
43680
- [rounded]="true"
43681
- [text]="true"
43682
- (onClick)="remove(chip)"
43683
- />
43684
- </div>
43685
- <div class="db-filter-row__body">
43686
- @if (
43687
- chip.operator !== 'IsNull' && chip.operator !== 'IsNotNull'
43688
- ) {
43689
- @switch (valueKind(chip)) {
43690
- @case ('list') {
43691
- <mt-text-field
43692
- class="db-filter-row__value"
43693
- [placeholder]="t('filterBuilder.listHint')"
43694
- [ngModel]="formatList(chip.value)"
43695
- (ngModelChange)="setListValue(chip, $event)"
43696
- />
43697
- }
43698
- @case ('between') {
43699
- <div class="db-filter-row__between">
43700
- <mt-text-field
43701
- class="db-filter-row__value"
43702
- [placeholder]="t('filterBuilder.from')"
43703
- [ngModel]="getBetween(chip, 0)"
43704
- (ngModelChange)="setBetween(chip, 0, $event)"
43705
- />
43706
- <span class="db-filter-row__between-sep">
43707
- {{ t('filterBuilder.to') }}
43708
- </span>
43709
- <mt-text-field
43710
- class="db-filter-row__value"
43711
- [placeholder]="t('filterBuilder.to')"
43712
- [ngModel]="getBetween(chip, 1)"
43713
- (ngModelChange)="setBetween(chip, 1, $event)"
43714
- />
43715
- </div>
43716
- }
43717
- @case ('boolean') {
43718
- <mt-toggle-field
43719
- class="db-filter-row__bool"
43720
- [label]="
43721
- chip.value
43722
- ? t('filterBuilder.trueValue')
43723
- : t('filterBuilder.falseValue')
43724
- "
43725
- size="small"
43726
- [ngModel]="!!chip.value"
43727
- (ngModelChange)="setValue(chip, $event)"
43728
- />
43729
- }
43730
- @case ('number') {
43731
- <mt-number-field
43732
- class="db-filter-row__value"
43733
- [placeholder]="t('filterBuilder.value')"
43734
- [ngModel]="chip.value ?? null"
43735
- (ngModelChange)="setNumber(chip, $event)"
43736
- />
43737
- }
43738
- @default {
43739
- <mt-text-field
43740
- class="db-filter-row__value"
43741
- [placeholder]="t('filterBuilder.value')"
43742
- [ngModel]="chip.value ?? ''"
43743
- (ngModelChange)="setValue(chip, $event)"
43744
- />
43745
- }
43746
- }
43747
- }
43748
- </div>
43749
- </li>
43750
- }
43751
- </ul>
43752
- }
43753
-
43754
- <footer class="db-filter-builder__footer">
43755
- <mt-button
43756
- [label]="t('filterBuilder.add')"
43757
- icon="general.plus"
43758
- severity="primary"
43759
- size="small"
43760
- [outlined]="true"
43761
- (onClick)="addStaticFilter()"
43762
- />
43763
- @if (readOnlyCount() > 0) {
43764
- <mt-button
43765
- class="db-filter-builder__readonly-toggle"
43766
- [label]="
43767
- showReadOnly()
43768
- ? t('filterBuilder.hideReadonly')
43769
- : t('filterBuilder.showReadonly') +
43770
- ' (' +
43771
- readOnlyCount() +
43772
- ')'
43773
- "
43774
- severity="secondary"
43775
- size="small"
43776
- variant="text"
43777
- (onClick)="toggleShowReadOnly()"
43778
- />
43779
- }
43780
- </footer>
43781
-
43782
- @if (showReadOnly() && readOnlyChips().length) {
43783
- <ul class="db-filter-builder__list db-filter-builder__list--readonly">
43784
- @for (chip of readOnlyChips(); track chip.id) {
43785
- <li
43786
- class="db-filter-row is-readonly"
43787
- [attr.data-scope]="chip.scope"
43788
- >
43789
- <div class="db-filter-row__head">
43790
- <span class="db-filter-row__scope">
43791
- {{ t(scopeLabelKey(chip.scope)) }}
43792
- </span>
43793
- <span class="db-filter-row__readonly-property">
43794
- {{ chip.propertyLabel || chip.propertyKey }}
43795
- </span>
43796
- <span class="db-filter-row__operator-readonly">
43797
- {{ t(operatorLabelKey(chip.operator)) }}
43798
- </span>
43799
- <span class="db-filter-row__value-readonly">
43800
- {{ formatReadonlyValue(chip, t) }}
43801
- </span>
43802
- @if (chip.source === 'dynamic') {
43803
- <mt-toggle-field
43804
- class="db-filter-row__active"
43805
- [label]="t('filterBuilder.active')"
43806
- labelPosition="start"
43807
- size="small"
43808
- [ngModel]="chip.active"
43809
- (ngModelChange)="setActive(chip, $event)"
43810
- />
43811
- }
43812
- </div>
43813
- @if (chip.source === 'selection') {
43814
- <p class="db-filter-row__readonly-hint">
43815
- {{ t('filterBuilder.selectionReadonlyHint') }}
43816
- </p>
43817
- }
43818
- @if (chip.source === 'repeater') {
43819
- <p class="db-filter-row__readonly-hint">
43820
- {{ t('filterBuilder.repeaterReadonlyHint') }}
43821
- </p>
43822
- }
43823
- @if (chip.source === 'dynamic') {
43824
- <p class="db-filter-row__readonly-hint">
43825
- {{
43826
- t('filterBuilder.dynamicReadonlyHint', {
43827
- key: chip.dynamicKey,
43828
- })
43829
- }}
43830
- </p>
43831
- }
43832
- </li>
43833
- }
43834
- </ul>
43835
- }
43836
- </div>
43837
- </ng-container>
44125
+ ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: `
44126
+ <ng-container *transloco="let t; prefix: 'dashboardBuilder.pass4'">
44127
+ <div class="db-filter-builder">
44128
+ <header class="db-filter-builder__header">
44129
+ <h3 class="db-filter-builder__title">
44130
+ {{ t('filterBuilder.title') }}
44131
+ </h3>
44132
+ <p class="db-filter-builder__hint">
44133
+ {{ t('filterBuilder.hint') }}
44134
+ </p>
44135
+ </header>
44136
+
44137
+ @if (editableChips().length === 0) {
44138
+ <div class="db-filter-builder__empty">
44139
+ <i class="mti mti-general.filter-lines"></i>
44140
+ <span>{{ t('filterBuilder.empty') }}</span>
44141
+ </div>
44142
+ } @else {
44143
+ <ul class="db-filter-builder__list">
44144
+ @for (chip of editableChips(); track chip.id) {
44145
+ <li
44146
+ class="db-filter-row"
44147
+ [class.is-inactive]="!chip.active"
44148
+ [attr.data-scope]="chip.scope"
44149
+ >
44150
+ <div class="db-filter-row__head">
44151
+ <mt-toggle-field
44152
+ class="db-filter-row__active"
44153
+ [label]="t('filterBuilder.active')"
44154
+ labelPosition="end"
44155
+ size="small"
44156
+ [ngModel]="chip.active"
44157
+ (ngModelChange)="setActive(chip, $event)"
44158
+ />
44159
+ <span class="db-filter-row__scope">{{
44160
+ t(scopeLabelKey(chip.scope))
44161
+ }}</span>
44162
+ <mt-select-field
44163
+ class="db-filter-row__field"
44164
+ [options]="fieldOptionsFor(chip, t)"
44165
+ optionLabel="label"
44166
+ optionValue="key"
44167
+ [filter]="true"
44168
+ size="small"
44169
+ [placeholder]="t('filterBuilder.pickField')"
44170
+ [ngModel]="chip.propertyKey"
44171
+ (ngModelChange)="setField(chip, $event)"
44172
+ />
44173
+ <mt-select-field
44174
+ class="db-filter-row__operator"
44175
+ [options]="operatorOptions(t)"
44176
+ optionLabel="label"
44177
+ optionValue="value"
44178
+ size="small"
44179
+ [ngModel]="chip.operator"
44180
+ (ngModelChange)="setOperator(chip, $event)"
44181
+ />
44182
+ <mt-button
44183
+ class="db-filter-row__remove"
44184
+ icon="general.trash-01"
44185
+ [tooltip]="t('filterBuilder.remove')"
44186
+ severity="danger"
44187
+ size="small"
44188
+ [rounded]="true"
44189
+ [text]="true"
44190
+ (onClick)="remove(chip)"
44191
+ />
44192
+ </div>
44193
+ <div class="db-filter-row__body">
44194
+ @if (
44195
+ chip.operator !== 'IsNull' && chip.operator !== 'IsNotNull'
44196
+ ) {
44197
+ @switch (valueKind(chip)) {
44198
+ @case ('list') {
44199
+ @if (valueOptions(chip); as options) {
44200
+ <mt-multi-select-field
44201
+ class="db-filter-row__value"
44202
+ [options]="options"
44203
+ optionLabel="label"
44204
+ optionValue="value"
44205
+ [filter]="true"
44206
+ size="small"
44207
+ [placeholder]="t('filterBuilder.value')"
44208
+ [ngModel]="chip.value"
44209
+ (ngModelChange)="setValue(chip, $event)"
44210
+ />
44211
+ } @else {
44212
+ <mt-text-field
44213
+ class="db-filter-row__value"
44214
+ [placeholder]="t('filterBuilder.listHint')"
44215
+ [ngModel]="formatList(chip.value)"
44216
+ (ngModelChange)="setListValue(chip, $event)"
44217
+ />
44218
+ }
44219
+ }
44220
+ @case ('between') {
44221
+ <div class="db-filter-row__between">
44222
+ <mt-text-field
44223
+ class="db-filter-row__value"
44224
+ [placeholder]="t('filterBuilder.from')"
44225
+ [ngModel]="getBetween(chip, 0)"
44226
+ (ngModelChange)="setBetween(chip, 0, $event)"
44227
+ />
44228
+ <span class="db-filter-row__between-sep">
44229
+ {{ t('filterBuilder.to') }}
44230
+ </span>
44231
+ <mt-text-field
44232
+ class="db-filter-row__value"
44233
+ [placeholder]="t('filterBuilder.to')"
44234
+ [ngModel]="getBetween(chip, 1)"
44235
+ (ngModelChange)="setBetween(chip, 1, $event)"
44236
+ />
44237
+ </div>
44238
+ }
44239
+ @case ('boolean') {
44240
+ <mt-toggle-field
44241
+ class="db-filter-row__bool"
44242
+ [label]="
44243
+ chip.value
44244
+ ? t('filterBuilder.trueValue')
44245
+ : t('filterBuilder.falseValue')
44246
+ "
44247
+ size="small"
44248
+ [ngModel]="!!chip.value"
44249
+ (ngModelChange)="setValue(chip, $event)"
44250
+ />
44251
+ }
44252
+ @case ('number') {
44253
+ <mt-number-field
44254
+ class="db-filter-row__value"
44255
+ [placeholder]="t('filterBuilder.value')"
44256
+ [ngModel]="chip.value ?? null"
44257
+ (ngModelChange)="setNumber(chip, $event)"
44258
+ />
44259
+ }
44260
+ @default {
44261
+ @if (valueOptions(chip); as options) {
44262
+ <mt-select-field
44263
+ class="db-filter-row__value"
44264
+ [options]="options"
44265
+ optionLabel="label"
44266
+ optionValue="value"
44267
+ [filter]="true"
44268
+ [showClear]="true"
44269
+ size="small"
44270
+ [placeholder]="t('filterBuilder.value')"
44271
+ [ngModel]="chip.value ?? null"
44272
+ (ngModelChange)="setValue(chip, $event ?? '')"
44273
+ />
44274
+ } @else {
44275
+ <mt-text-field
44276
+ class="db-filter-row__value"
44277
+ [placeholder]="t('filterBuilder.value')"
44278
+ [ngModel]="chip.value ?? ''"
44279
+ (ngModelChange)="setValue(chip, $event)"
44280
+ />
44281
+ }
44282
+ }
44283
+ }
44284
+ }
44285
+ </div>
44286
+ </li>
44287
+ }
44288
+ </ul>
44289
+ }
44290
+
44291
+ <footer class="db-filter-builder__footer">
44292
+ <mt-button
44293
+ [label]="t('filterBuilder.add')"
44294
+ icon="general.plus"
44295
+ severity="primary"
44296
+ size="small"
44297
+ [outlined]="true"
44298
+ (onClick)="addStaticFilter()"
44299
+ />
44300
+ @if (readOnlyCount() > 0) {
44301
+ <mt-button
44302
+ class="db-filter-builder__readonly-toggle"
44303
+ [label]="
44304
+ showReadOnly()
44305
+ ? t('filterBuilder.hideReadonly')
44306
+ : t('filterBuilder.showReadonly') +
44307
+ ' (' +
44308
+ readOnlyCount() +
44309
+ ')'
44310
+ "
44311
+ severity="secondary"
44312
+ size="small"
44313
+ variant="text"
44314
+ (onClick)="toggleShowReadOnly()"
44315
+ />
44316
+ }
44317
+ </footer>
44318
+
44319
+ @if (showReadOnly() && readOnlyChips().length) {
44320
+ <ul class="db-filter-builder__list db-filter-builder__list--readonly">
44321
+ @for (chip of readOnlyChips(); track chip.id) {
44322
+ <li
44323
+ class="db-filter-row is-readonly"
44324
+ [attr.data-scope]="chip.scope"
44325
+ >
44326
+ <div class="db-filter-row__head">
44327
+ <span class="db-filter-row__scope">
44328
+ {{ t(scopeLabelKey(chip.scope)) }}
44329
+ </span>
44330
+ <span class="db-filter-row__readonly-property">
44331
+ {{ chip.propertyLabel || chip.propertyKey }}
44332
+ </span>
44333
+ <span class="db-filter-row__operator-readonly">
44334
+ {{ t(operatorLabelKey(chip.operator)) }}
44335
+ </span>
44336
+ <span class="db-filter-row__value-readonly">
44337
+ {{ formatReadonlyValue(chip, t) }}
44338
+ </span>
44339
+ @if (chip.source === 'dynamic') {
44340
+ <mt-toggle-field
44341
+ class="db-filter-row__active"
44342
+ [label]="t('filterBuilder.active')"
44343
+ labelPosition="start"
44344
+ size="small"
44345
+ [ngModel]="chip.active"
44346
+ (ngModelChange)="setActive(chip, $event)"
44347
+ />
44348
+ }
44349
+ </div>
44350
+ @if (chip.source === 'selection') {
44351
+ <p class="db-filter-row__readonly-hint">
44352
+ {{ t('filterBuilder.selectionReadonlyHint') }}
44353
+ </p>
44354
+ }
44355
+ @if (chip.source === 'repeater') {
44356
+ <p class="db-filter-row__readonly-hint">
44357
+ {{ t('filterBuilder.repeaterReadonlyHint') }}
44358
+ </p>
44359
+ }
44360
+ @if (chip.source === 'dynamic') {
44361
+ <p class="db-filter-row__readonly-hint">
44362
+ {{
44363
+ t('filterBuilder.dynamicReadonlyHint', {
44364
+ key: chip.dynamicKey,
44365
+ })
44366
+ }}
44367
+ </p>
44368
+ }
44369
+ </li>
44370
+ }
44371
+ </ul>
44372
+ }
44373
+ </div>
44374
+ </ng-container>
43838
44375
  `, styles: [".db-filter-builder{display:flex;flex-direction:column;gap:.6rem}.db-filter-builder__header{display:flex;flex-direction:column;gap:.2rem}.db-filter-builder__title{margin:0;font-size:.85rem;font-weight:600}.db-filter-builder__hint{margin:0;font-size:.75rem;color:var(--p-text-muted-color, #6b7280)}.db-filter-builder__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.4rem}.db-filter-builder__list--readonly{margin-top:.4rem}.db-filter-builder__empty{display:flex;align-items:center;gap:.5rem;padding:.75rem;background:var(--p-surface-50, #f9fafb);border:1px dashed var(--p-surface-300, #d1d5db);border-radius:.5rem;font-size:.8rem;color:var(--p-text-muted-color, #6b7280)}.db-filter-row{display:flex;flex-direction:column;gap:.4rem;padding:.6rem;background:var(--p-surface-0, #fff);border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.5rem}.db-filter-row.is-inactive{opacity:.55}.db-filter-row.is-readonly{background:var(--p-surface-50, #f9fafb)}.db-filter-row[data-scope=page]{border-color:var(--p-blue-200, #bfdbfe)}.db-filter-row[data-scope=source]{border-color:var(--p-amber-200, #fde68a)}.db-filter-row[data-scope=repeater]{border-color:var(--p-purple-200, #ddd6fe)}.db-filter-row__head{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap}.db-filter-row__scope{font-size:.65rem;font-weight:700;padding:.1rem .4rem;border-radius:999px;background:var(--p-surface-100, #f3f4f6);color:var(--p-text-muted-color, #6b7280);text-transform:uppercase;letter-spacing:.04em}.db-filter-row__active{flex:0 0 auto}.db-filter-row__field{flex:1 1 12rem;min-width:10rem}.db-filter-row__operator{flex:0 1 10rem;min-width:9rem}.db-filter-row__remove{margin-left:auto}.db-filter-row__body{display:flex}.db-filter-row__value{flex:1 1 auto;min-width:0}.db-filter-row__between{display:flex;align-items:center;gap:.4rem;flex:1 1 auto}.db-filter-row__between-sep{color:var(--p-text-muted-color, #6b7280)}.db-filter-row__bool{flex:1 1 auto}.db-filter-row__readonly-property{font-weight:600}.db-filter-row__operator-readonly,.db-filter-row__value-readonly{font-size:.78rem;color:var(--p-text-muted-color, #6b7280)}.db-filter-row__readonly-hint{margin:0;font-size:.7rem;color:var(--p-text-muted-color, #6b7280)}.db-filter-builder__footer{display:flex;align-items:center;justify-content:space-between;gap:.5rem}\n"] }]
43839
- }], propDecorators: { chips: [{ type: i0.Input, args: [{ isSignal: true, alias: "chips", required: true }] }], persisted: [{ type: i0.Input, args: [{ isSignal: true, alias: "persisted", required: false }] }], chipsChange: [{ type: i0.Output, args: ["chipsChange"] }] } });
44376
+ }], ctorParameters: () => [], propDecorators: { chips: [{ type: i0.Input, args: [{ isSignal: true, alias: "chips", required: true }] }], persisted: [{ type: i0.Input, args: [{ isSignal: true, alias: "persisted", required: false }] }], chipsChange: [{ type: i0.Output, args: ["chipsChange"] }] } });
43840
44377
  function prettyLabel(key) {
43841
44378
  if (!key)
43842
44379
  return '';
@@ -54005,5 +54542,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
54005
54542
  * Generated bundle index. Do not edit.
54006
54543
  */
54007
54544
 
54008
- 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 };
54009
- //# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder--tuv2545.mjs.map
54545
+ 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, StyleStudioDrawer 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, DASHBOARD_REPORT_ACCESS as aH, provideDashboardBuilderAccess as aI, isManagePagesDeleteResult as aJ, ManagePages as aK, ManageBreadcrumb as aL, ManageFilterOnPage as aM, DynamicFiltersConfig as aN, ChartSettingsDrawer as aO, DisplaySettings as aP, DefaultControlUi as aQ, PieControlUi as aR, BarControlUi as aS, StackBarControlUi as aT, ManageItem as aU, CHART_TYPES as aV, ManageItemService as aW, GeneralSettings as aX, DataSourceSettings as aY, ActionsSettings as aZ, ChartViewer 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, formatForEditor as b$, StyleSettingsRenderer as b0, expandResetPatches as b1, StyleField as b2, SegmentedField as b3, ColorListField as b4, ArrayBuilderField as b5, KeyValueMapField as b6, LegendOrderField as b7, ItemCardMenuComponent as b8, ChartFilterDrawer as b9, findDomain as bA, POPOVER_TABS as bB, POPOVER_TAB_SPECS as bC, titleToUi as bD, applyTitleToPersisted as bE, datasourceToUi as bF, fieldsToUi as bG, filtersToUi as bH, styleToUi as bI, applyStyleToPersisted as bJ, layoutToUi as bK, applyLayoutToPersisted as bL, labelLegendFormatToUi as bM, applyLabelLegendFormatToPersisted as bN, behaviorToUi as bO, applyBehaviorToPersisted as bP, applyFilterChipsToPersisted as bQ, persistedToUi as bR, buildAssembly as bS, STYLE_PRESETS as bT, presetsForCapability as bU, findPreset as bV, validate as bW, hasBlockingIssues as bX, groupIssuesByDomain as bY, parseAdvancedJson as bZ, deepMerge$1 as b_, ItemContextToolbarComponent as ba, ItemConfigPopoverComponent as bb, GuidedConfigDialogComponent as bc, FilterChipsBarComponent as bd, FilterBuilderComponent as be, DatasourcePanelComponent as bf, SchemaControlRendererComponent as bg, FilterByGroupPipe as bh, GetChartActionsPipe as bi, CHART_CAPABILITIES as bj, getCapabilityById as bk, resolveCapability as bl, toBackendChartType as bm, normalizeChartTypeForRequest as bn, normalizeFilterOperation as bo, normalizeAggregateFunction as bp, normalizeFilters as bq, selectorFromLegacy as br, moduleIdFromSelector as bs, toBackendSourceLink as bt, toFormSourceLink as bu, normalizeOnLoad as bv, normalizeBeforeSave as bw, normalizeBeforeRequest as bx, CONFIG_DOMAINS as by, domainsForCapability as bz, cloneDeep$1 as c, CUSTOM_COLOR_OPTION as c0, readByPath$1 as c1, setByPath as c2, applyControlPatchToPersisted as c3, applyControlPatchesToPersisted as c4, getControlSchema as c5, listControlSchemaIds as c6, listControlSchemas as c7, getFallbackControlSchema as c8, flattenSchema as c9, resolveDisplayFields as ca, buildDisplayFieldPredicate as cb, bindingKey as cc, getBinding as cd, listBindings as ce, listBindingsForChart as cf, readBoundValue as cg, ITEM_GUIDANCE_REGISTRY as ch, describeGuidance as ci, ItemGuidanceService as cj, 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 };
54546
+ //# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-D2Vq_acT.mjs.map