@masterteam/dashboard-builder 0.0.94 → 0.0.96

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.
@@ -2287,7 +2287,7 @@ const CHART_CAPABILITIES = [
2287
2287
  products: ['pplus', 'splus', 'report'],
2288
2288
  hasManageItem: true,
2289
2289
  defaultSize: { cols: 9, rows: 4 },
2290
- // FE legacy storage uses LineV2Chart, but BE enum is LineChart.
2290
+ // FE legacy storage uses LineV2Chart; BE LineChart uses BarChartQuery.
2291
2291
  serviceType: 'LineV2Chart',
2292
2292
  componentName: 'chart',
2293
2293
  functionName: 'handleLineChart',
@@ -2299,18 +2299,15 @@ const CHART_CAPABILITIES = [
2299
2299
  supportsCustomApi: true,
2300
2300
  supportsGroupByMultiple: false,
2301
2301
  query: {
2302
- editor: 'general',
2302
+ editor: 'lineChart',
2303
2303
  schema: {
2304
2304
  fields: [
2305
- 'valueProperty',
2306
- 'aggregateFunction',
2307
- 'groupByProperties',
2308
- 'color',
2309
- 'formula',
2310
- 'filters',
2305
+ 'xAxisProperty',
2306
+ 'yAxisProperty',
2307
+ 'function',
2311
2308
  'extraProperties',
2312
2309
  ],
2313
- required: ['valueProperty'],
2310
+ required: ['xAxisProperty', 'yAxisProperty'],
2314
2311
  },
2315
2312
  },
2316
2313
  display: {
@@ -3458,6 +3455,32 @@ function normalizeAggregateFunctionsDeep(value) {
3458
3455
  });
3459
3456
  return next;
3460
3457
  }
3458
+ /** LineChart is a single-series BarChartQuery in the current backend. */
3459
+ function normalizeLineChartQuery(query) {
3460
+ const firstSeries = Array.isArray(query['series'])
3461
+ ? query['series'][0]
3462
+ : null;
3463
+ const rawFunction = query['function'] ?? firstSeries?.aggregateFunction ?? 'Sum';
3464
+ const aggregateFunction = rawFunction === 'Average' || rawFunction === 'Avarage'
3465
+ ? 'Avg'
3466
+ : rawFunction;
3467
+ return {
3468
+ xAxisProperty: query['xAxisProperty'] ||
3469
+ firstSeries?.groupByProperties?.[0] ||
3470
+ query['categoryProperty'] ||
3471
+ '',
3472
+ yAxisProperty: query['yAxisProperty'] || firstSeries?.valueProperty || '',
3473
+ function: aggregateFunction,
3474
+ extraProperties: Array.isArray(query['extraProperties'])
3475
+ ? query['extraProperties']
3476
+ : Array.isArray(firstSeries?.extraProperties)
3477
+ ? firstSeries.extraProperties
3478
+ : [],
3479
+ };
3480
+ }
3481
+ function isLineChartType(chartType) {
3482
+ return chartType === 'LineChart' || chartType === 'LineV2Chart';
3483
+ }
3461
3484
  function normalizeTimelineMultiLevelQuery(query) {
3462
3485
  if (!query || typeof query !== 'object') {
3463
3486
  return query;
@@ -3700,6 +3723,10 @@ function normalizeOnLoad(config) {
3700
3723
  }
3701
3724
  if (serviceConfig['query']) {
3702
3725
  serviceConfig['query'] = normalizeDashboardQueryFormulas(normalizeTimelineMultiLevelQuery(normalizeAggregateFunctionsDeep(serviceConfig['query'])));
3726
+ if (isLineChartType(serviceConfig['chartType']) ||
3727
+ config.chartTypeId === 'chart-line-chart') {
3728
+ serviceConfig['query'] = normalizeLineChartQuery(serviceConfig['query']);
3729
+ }
3703
3730
  }
3704
3731
  // 4b. Pass-2: also normalize Equal→Equals in additional filter buckets so
3705
3732
  // legacy `Equal` from clientConfig.filter.configs / serviceConfig.filters
@@ -3873,6 +3900,9 @@ function normalizeBeforeSave(config) {
3873
3900
  }
3874
3901
  if (serviceConfig['query']) {
3875
3902
  serviceConfig['query'] = normalizeDashboardQueryFormulas(normalizeTimelineMultiLevelQuery(normalizeAggregateFunctionsDeep(serviceConfig['query'])));
3903
+ if (isLineChartType(serviceConfig['chartType'])) {
3904
+ serviceConfig['query'] = normalizeLineChartQuery(serviceConfig['query']);
3905
+ }
3876
3906
  if (isPhaseGateTableQuery(serviceConfig['query'])) {
3877
3907
  serviceConfig['query'] = toCanonicalPhaseGateTableQuery(serviceConfig['query']);
3878
3908
  delete serviceConfig['groupByMultiple'];
@@ -3909,6 +3939,9 @@ function normalizeBeforeRequest(serviceConfig) {
3909
3939
  }
3910
3940
  if (next['query']) {
3911
3941
  next['query'] = normalizeDashboardQueryFormulas(normalizeTimelineMultiLevelQuery(normalizeAggregateFunctionsDeep(next['query'])));
3942
+ if (isLineChartType(next['chartType'])) {
3943
+ next['query'] = normalizeLineChartQuery(next['query']);
3944
+ }
3912
3945
  const isPhaseGateTable = next['componentName'] === 'phaseGateTable';
3913
3946
  if (isPhaseGateTable || isPhaseGateTableQuery(next['query'])) {
3914
3947
  next['query'] = toCanonicalPhaseGateTableQuery(next['query'], {
@@ -8555,11 +8588,12 @@ const PROPERTY_CONFIG_FIELD = {
8555
8588
  */
8556
8589
  const CARD_PROPERTY_CONFIG_FIELD = {
8557
8590
  ...PROPERTY_CONFIG_FIELD,
8558
- label: 'Property appearance',
8559
- description: 'Configure each selected property, as in Customization.',
8591
+ label: 'Selected properties',
8592
+ description: 'Edit the display of each selected property.',
8560
8593
  collapsibleRows: true,
8594
+ integratedLabelsPath: 'clientConfig.configAsType.overrideSelectedPropertiesLabels',
8561
8595
  valueFields: [
8562
- ...(PROPERTY_CONFIG_FIELD.valueFields ?? []),
8596
+ ...(PROPERTY_CONFIG_FIELD.valueFields ?? []).filter((field) => field.key !== 'hidden'),
8563
8597
  {
8564
8598
  key: 'hideLabel',
8565
8599
  label: 'Hide name',
@@ -8677,7 +8711,6 @@ const PROPERTY_SETTINGS_SECTION = {
8677
8711
  ],
8678
8712
  visibleWhen: (cfg) => !!cfg.clientConfig?.configAsType?.cardOrder?.propertyKey,
8679
8713
  },
8680
- PROPERTY_LABELS_FIELD,
8681
8714
  CARD_PROPERTY_CONFIG_FIELD,
8682
8715
  PROPERTY_COLORS_FIELD,
8683
8716
  ],
@@ -18765,6 +18798,9 @@ class LineChartHandler {
18765
18798
  * Returns ECharts config directly with noData, width, divClass properties
18766
18799
  */
18767
18800
  handleLineChart(dataResponse, config) {
18801
+ // The current LineChart endpoint reuses BarChartQuery/BarChartResponse:
18802
+ // { values: [{ key, value }], labels: [...] }, not V2 series[].
18803
+ const chartData = this.toLineChartData(dataResponse, config);
18768
18804
  const languageCode = this.storeService.languageCode();
18769
18805
  const clientConfig = config.clientConfig || {};
18770
18806
  const configAsType = clientConfig.configAsType || {};
@@ -18794,9 +18830,9 @@ class LineChartHandler {
18794
18830
  // unchanged.
18795
18831
  const labelPosition = configAsType?.['label']?.position || 'top';
18796
18832
  // Get categories (x-axis data)
18797
- const categories = dataResponse.categories || dataResponse.xAxisData || [];
18833
+ const categories = chartData.categories || chartData.xAxisData || [];
18798
18834
  // Get series data
18799
- const seriesRaw = dataResponse.series || dataResponse.values || [];
18835
+ const seriesRaw = chartData.series || chartData.values || [];
18800
18836
  // Build series
18801
18837
  const series = seriesRaw.map((item, index) => {
18802
18838
  const color = configAsType?.['defaultColors']?.[index] ||
@@ -18840,7 +18876,7 @@ class LineChartHandler {
18840
18876
  fontFamily: generalConfiguration?.fontConfig?.fontFamily,
18841
18877
  fontSize: generalConfiguration?.fontConfig?.fontSizeConfig?.label,
18842
18878
  formatter: (params) => {
18843
- return params.value
18879
+ return params.value !== null && params.value !== undefined
18844
18880
  ? formatValue(params.value, format, languageCode)
18845
18881
  : '';
18846
18882
  },
@@ -18880,6 +18916,40 @@ class LineChartHandler {
18880
18916
  divClass,
18881
18917
  };
18882
18918
  }
18919
+ toLineChartData(dataResponse, config) {
18920
+ if (!dataResponse || Array.isArray(dataResponse.series))
18921
+ return dataResponse || {};
18922
+ const values = dataResponse.values;
18923
+ if (!Array.isArray(values) ||
18924
+ (values.length &&
18925
+ !values.every((entry) => entry && 'key' in entry && 'value' in entry)))
18926
+ return dataResponse;
18927
+ const labels = Array.isArray(dataResponse.labels)
18928
+ ? dataResponse.labels
18929
+ : [];
18930
+ const points = values.map((entry) => {
18931
+ const label = labels.find((candidate) => String(candidate.key).toLowerCase() ===
18932
+ String(entry.key).toLowerCase());
18933
+ return {
18934
+ category: label?.label || String(entry.key ?? ''),
18935
+ value: entry.value,
18936
+ color: label?.color,
18937
+ };
18938
+ });
18939
+ return {
18940
+ categories: points.map((point) => point.category),
18941
+ series: [
18942
+ {
18943
+ name: config.clientConfig?.title?.['en'] ||
18944
+ config.serviceConfig?.query?.['yAxisProperty'] ||
18945
+ 'Value',
18946
+ data: points.map((point) => point.color
18947
+ ? { value: point.value, itemStyle: { color: point.color } }
18948
+ : point.value),
18949
+ },
18950
+ ],
18951
+ };
18952
+ }
18883
18953
  /**
18884
18954
  * Build ECharts configuration
18885
18955
  */
@@ -23936,7 +24006,7 @@ class ActionService {
23936
24006
  // "Dialog header"), not from the chart that opened it.
23937
24007
  const header = resolveDashboardDialogHeader(dialogConfig);
23938
24008
  // Dynamically import DashboardDialogComponent to avoid circular dependency
23939
- import('./masterteam-dashboard-builder-dashboard-dialog.component-BpIXu0xi.mjs').then(({ DashboardDialogComponent }) => {
24009
+ import('./masterteam-dashboard-builder-dashboard-dialog.component-CwWfkuF6.mjs').then(({ DashboardDialogComponent }) => {
23940
24010
  // Open dialog using ModalService
23941
24011
  this.modalService.openModal(DashboardDialogComponent, 'dialog', {
23942
24012
  header: header.title,
@@ -32503,7 +32573,11 @@ class LastHistoryLevelCardComponent {
32503
32573
  config?.clientConfig?.title?.['ar'] ||
32504
32574
  '');
32505
32575
  }, ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
32506
- status = computed(() => this.buildStatus(this.dataHandled()?.values?.[0]), ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
32576
+ status = computed(() => {
32577
+ const values = this.dataHandled()?.values;
32578
+ // Progress updates arrive in entry order; the newest entry is last.
32579
+ return this.buildStatus(Array.isArray(values) ? values.at(-1) : null);
32580
+ }, ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
32507
32581
  hasProgressUpdate = computed(() => {
32508
32582
  const status = this.status();
32509
32583
  return !!(status.previousActivities || status.nextActivities);
@@ -34358,7 +34432,11 @@ class KeyValueMapField {
34358
34432
  /** When true, store/read a positional array aligned to `keys` order. */
34359
34433
  asArray = input(false, ...(ngDevMode ? [{ debugName: "asArray" }] : /* istanbul ignore next */ []));
34360
34434
  collapsibleRows = input(false, ...(ngDevMode ? [{ debugName: "collapsibleRows" }] : /* istanbul ignore next */ []));
34435
+ /** Properties Card: edit localized labels in the same positional row. */
34436
+ integratedLabels = input(false, ...(ngDevMode ? [{ debugName: "integratedLabels" }] : /* istanbul ignore next */ []));
34437
+ labelOverrides = input({}, ...(ngDevMode ? [{ debugName: "labelOverrides" }] : /* istanbul ignore next */ []));
34361
34438
  valueChange = output();
34439
+ labelOverridesChange = output();
34362
34440
  rows = signal([], ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
34363
34441
  expandedRows = signal(new Set(), ...(ngDevMode ? [{ debugName: "expandedRows" }] : /* istanbul ignore next */ []));
34364
34442
  destroyRef = inject(DestroyRef);
@@ -34375,10 +34453,12 @@ class KeyValueMapField {
34375
34453
  const fields = this.valueFields();
34376
34454
  const raw = this.value();
34377
34455
  const asArray = this.asArray();
34456
+ const labels = this.labelOverrides();
34457
+ const integratedLabels = this.integratedLabels();
34378
34458
  // Skip rebuild when our own emit echoed back (prevents focus loss).
34379
34459
  if (this.syncing)
34380
34460
  return;
34381
- if (untracked(() => this.matchesCurrent(keys, raw, fields, asArray))) {
34461
+ if (untracked(() => this.matchesCurrent(keys, raw, fields, asArray, labels, integratedLabels))) {
34382
34462
  return;
34383
34463
  }
34384
34464
  this.rowSubs.unsubscribe();
@@ -34386,15 +34466,24 @@ class KeyValueMapField {
34386
34466
  this.rows.set(keys.map((opt, index) => {
34387
34467
  const key = String(opt.value);
34388
34468
  const existing = this.existingFor(raw, key, index, asArray);
34469
+ const existingLabels = this.labelsFor(labels, key);
34389
34470
  const group = new FormGroup({});
34390
34471
  for (const f of fields) {
34391
34472
  group.addControl(f.key, new FormControl(existing?.[f.key] ?? f.default ?? null));
34392
34473
  }
34393
34474
  this.rowSubs.add(group.valueChanges.subscribe(() => this.emit()));
34475
+ const labelGroup = new FormGroup({
34476
+ en: new FormControl(existingLabels['en'] ?? ''),
34477
+ ar: new FormControl(existingLabels['ar'] ?? ''),
34478
+ });
34479
+ this.rowSubs.add(labelGroup.valueChanges.subscribe(() => this.emitLabels()));
34394
34480
  return {
34395
34481
  key,
34396
34482
  label: opt.label,
34397
34483
  group,
34484
+ labelGroup,
34485
+ showLabels: signal(Boolean(existingLabels['en'] || existingLabels['ar'])),
34486
+ showInfo: signal(Boolean(existing['infoEn'] || existing['infoAr'])),
34398
34487
  custom: this.createCustomColorControls(fields, group),
34399
34488
  };
34400
34489
  }));
@@ -34409,6 +34498,22 @@ class KeyValueMapField {
34409
34498
  inputFields = computed(() => this.valueFields().filter((f) => f.type !== 'boolean' && !f.key.startsWith('show')), ...(ngDevMode ? [{ debugName: "inputFields" }] : /* istanbul ignore next */ []));
34410
34499
  toggleFields = computed(() => this.valueFields().filter((f) => f.type === 'boolean' && !f.key.startsWith('show')), ...(ngDevMode ? [{ debugName: "toggleFields" }] : /* istanbul ignore next */ []));
34411
34500
  userFields = computed(() => this.valueFields().filter((f) => f.type === 'boolean' && f.key.startsWith('show')), ...(ngDevMode ? [{ debugName: "userFields" }] : /* istanbul ignore next */ []));
34501
+ propertyLayoutFields = computed(() => this.inputFields().filter((field) => field.key !== 'infoEn' && field.key !== 'infoAr'), ...(ngDevMode ? [{ debugName: "propertyLayoutFields" }] : /* istanbul ignore next */ []));
34502
+ infoFields = computed(() => this.inputFields().filter((field) => field.key === 'infoEn' || field.key === 'infoAr'), ...(ngDevMode ? [{ debugName: "infoFields" }] : /* istanbul ignore next */ []));
34503
+ toggleLabels(row, enabled) {
34504
+ row.showLabels.set(enabled);
34505
+ if (!enabled) {
34506
+ row.labelGroup.setValue({ en: '', ar: '' }, { emitEvent: false });
34507
+ this.emitLabels();
34508
+ }
34509
+ }
34510
+ toggleInfo(row, enabled) {
34511
+ row.showInfo.set(enabled);
34512
+ if (!enabled) {
34513
+ row.group.patchValue({ infoEn: null, infoAr: null }, { emitEvent: false });
34514
+ this.emit();
34515
+ }
34516
+ }
34412
34517
  isExpanded(key) {
34413
34518
  return this.expandedRows().has(key);
34414
34519
  }
@@ -34525,6 +34630,19 @@ class KeyValueMapField {
34525
34630
  const map = raw ?? {};
34526
34631
  return map[key] ?? {};
34527
34632
  }
34633
+ labelsFor(labels, key) {
34634
+ const storedKey = this.labelKeyFor(labels, key);
34635
+ const raw = labels[storedKey];
34636
+ return raw && typeof raw === 'object' && !Array.isArray(raw)
34637
+ ? raw
34638
+ : {};
34639
+ }
34640
+ /** The card renderer resolves localized label keys case-insensitively. */
34641
+ labelKeyFor(labels, key) {
34642
+ if (Object.prototype.hasOwnProperty.call(labels, key))
34643
+ return key;
34644
+ return (Object.keys(labels).find((candidate) => candidate.toLowerCase() === key.toLowerCase()) ?? key);
34645
+ }
34528
34646
  clean(raw) {
34529
34647
  const obj = {};
34530
34648
  for (const [k, v] of Object.entries(raw)) {
@@ -34562,7 +34680,31 @@ class KeyValueMapField {
34562
34680
  }
34563
34681
  queueMicrotask(() => (this.syncing = false));
34564
34682
  }
34565
- matchesCurrent(keys, raw, fields, asArray) {
34683
+ emitLabels() {
34684
+ this.syncing = true;
34685
+ const out = { ...this.labelOverrides() };
34686
+ for (const row of this.rows()) {
34687
+ const storedKey = this.labelKeyFor(out, row.key);
34688
+ const labels = { ...this.labelsFor(out, row.key) };
34689
+ delete labels['en'];
34690
+ delete labels['ar'];
34691
+ if (row.showLabels()) {
34692
+ const en = String(row.labelGroup.controls.en.value ?? '');
34693
+ const ar = String(row.labelGroup.controls.ar.value ?? '');
34694
+ if (en)
34695
+ labels['en'] = en;
34696
+ if (ar)
34697
+ labels['ar'] = ar;
34698
+ }
34699
+ if (Object.keys(labels).length)
34700
+ out[storedKey] = labels;
34701
+ else
34702
+ delete out[storedKey];
34703
+ }
34704
+ this.labelOverridesChange.emit(out);
34705
+ queueMicrotask(() => (this.syncing = false));
34706
+ }
34707
+ matchesCurrent(keys, raw, fields, asArray, labels, integratedLabels) {
34566
34708
  const rows = this.rows();
34567
34709
  if (rows.length !== keys.length)
34568
34710
  return false;
@@ -34578,11 +34720,21 @@ class KeyValueMapField {
34578
34720
  if ((a ?? '') !== (b ?? ''))
34579
34721
  return false;
34580
34722
  }
34723
+ if (integratedLabels) {
34724
+ const savedLabels = this.labelsFor(labels, key);
34725
+ const currentLabels = rows[i].labelGroup.value;
34726
+ for (const language of ['en', 'ar']) {
34727
+ if (String(savedLabels[language] ?? '') !==
34728
+ String(currentLabels[language] ?? '')) {
34729
+ return false;
34730
+ }
34731
+ }
34732
+ }
34581
34733
  }
34582
34734
  return true;
34583
34735
  }
34584
34736
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: KeyValueMapField, deps: [], target: i0.ɵɵFactoryTarget.Component });
34585
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: KeyValueMapField, isStandalone: true, selector: "mt-key-value-map-field", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, keys: { classPropertyName: "keys", publicName: "keys", isSignal: true, isRequired: false, transformFunction: null }, valueFields: { classPropertyName: "valueFields", publicName: "valueFields", isSignal: true, isRequired: false, transformFunction: null }, asArray: { classPropertyName: "asArray", publicName: "asArray", isSignal: true, isRequired: false, transformFunction: null }, collapsibleRows: { classPropertyName: "collapsibleRows", publicName: "collapsibleRows", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div\r\n class=\"db-kv-map flex flex-col gap-2\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder.styleStudio.messages'\"\r\n>\r\n @if (rows().length) {\r\n @for (row of rows(); track row.key) {\r\n <div\r\n class=\"flex flex-col gap-2.5 rounded-lg border border-surface-200 bg-surface-0 px-3 py-2.5\"\r\n >\r\n @if (collapsibleRows()) {\r\n <button\r\n type=\"button\"\r\n class=\"flex w-full items-center justify-between gap-2 text-start text-sm font-semibold text-color\"\r\n [attr.aria-expanded]=\"isExpanded(row.key)\"\r\n (click)=\"toggleRow(row.key)\"\r\n >\r\n <span class=\"truncate\" mtTruncateTooltip>{{ row.label }}</span>\r\n <span aria-hidden=\"true\">{{\r\n isExpanded(row.key) ? \"\u2212\" : \"+\"\r\n }}</span>\r\n </button>\r\n } @else {\r\n <span\r\n class=\"truncate text-sm font-semibold text-color\"\r\n mtTruncateTooltip\r\n >\r\n {{ row.label }}\r\n </span>\r\n }\r\n\r\n @if (!collapsibleRows() || isExpanded(row.key)) {\r\n <!-- Inputs carry their own label instead of a placeholder: four\r\n controls never fit on one line in the settings pane, and the\r\n placeholder-as-label truncated to \"Color F\u2026\". auto-fit (not a\r\n viewport breakpoint) reflows on the PANE's width \u2014 the pane is\r\n narrow while the viewport is wide. -->\r\n @if (inputFields().length) {\r\n <div\r\n class=\"grid gap-x-3 gap-y-2.5 grid-cols-[repeat(auto-fit,minmax(9rem,1fr))]\"\r\n >\r\n @for (f of inputFields(); track f.key) {\r\n @switch (f.type) {\r\n @case (\"color\") {\r\n <mt-color-picker-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n @case (\"number\") {\r\n <mt-number-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n @case (\"multilineText\") {\r\n <mt-textarea-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n rows=\"3\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n @case (\"select\") {\r\n @if (f.allowCustomColor) {\r\n <!-- ngModel, not formControl: in custom mode the stored\r\n value is the colour itself while the select has to\r\n show the \"Custom color\" entry, so the displayed value\r\n is derived rather than the control's own. -->\r\n <mt-select-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [options]=\"options(row, f)\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"useFilter(row, f)\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [ngModel]=\"selectValue(row, f)\"\r\n (ngModelChange)=\"onSourceChange(row, f, $event)\"\r\n />\r\n @if (isCustomColor(row, f)) {\r\n <mt-color-picker-field\r\n class=\"min-w-0\"\r\n [label]=\"t('customColor')\"\r\n [formControl]=\"row.custom[f.key]\"\r\n />\r\n }\r\n } @else {\r\n <mt-select-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [options]=\"options(row, f)\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"useFilter(row, f)\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n }\r\n @default {\r\n <mt-text-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Toggles on their own line \u2014 they are label-beside-control, so they\r\n read wrong when mixed into the labelled input grid. -->\r\n @if (toggleFields().length) {\r\n <div class=\"flex flex-wrap items-center gap-x-5 gap-y-2\">\r\n @for (f of toggleFields(); track f.key) {\r\n <mt-toggle-field\r\n class=\"shrink-0\"\r\n [label]=\"f.label\"\r\n labelPosition=\"start\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n </div>\r\n }\r\n @if (userFields().length) {\r\n <details class=\"rounded-md border border-surface-200 px-3 py-2\">\r\n <summary class=\"cursor-pointer text-sm font-medium text-color\">\r\n {{ t(\"userDisplay\") }}\r\n </summary>\r\n <p class=\"mt-2 text-xs text-muted-color\">\r\n {{ t(\"userDisplayHint\") }}\r\n </p>\r\n <div class=\"mt-3 flex flex-wrap items-center gap-x-5 gap-y-2\">\r\n @for (f of userFields(); track f.key) {\r\n <mt-toggle-field\r\n class=\"shrink-0\"\r\n [label]=\"f.label\"\r\n labelPosition=\"start\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n </div>\r\n </details>\r\n }\r\n }\r\n </div>\r\n }\r\n } @else {\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"noProperties\") }}\r\n </p>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { 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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: TextareaField, selector: "mt-textarea-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "noErrorStyle", "pInputs", "rows", "required", "maxLength"] }, { 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: ColorPickerField, selector: "mt-color-picker-field", inputs: ["label", "appendTo", "placeholder", "class", "variant", "readonly", "pInputs", "required"], outputs: ["onChange"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "directive", type: TruncateTooltip, selector: "[mtTruncateTooltip]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
34737
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: KeyValueMapField, isStandalone: true, selector: "mt-key-value-map-field", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, keys: { classPropertyName: "keys", publicName: "keys", isSignal: true, isRequired: false, transformFunction: null }, valueFields: { classPropertyName: "valueFields", publicName: "valueFields", isSignal: true, isRequired: false, transformFunction: null }, asArray: { classPropertyName: "asArray", publicName: "asArray", isSignal: true, isRequired: false, transformFunction: null }, collapsibleRows: { classPropertyName: "collapsibleRows", publicName: "collapsibleRows", isSignal: true, isRequired: false, transformFunction: null }, integratedLabels: { classPropertyName: "integratedLabels", publicName: "integratedLabels", isSignal: true, isRequired: false, transformFunction: null }, labelOverrides: { classPropertyName: "labelOverrides", publicName: "labelOverrides", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", labelOverridesChange: "labelOverridesChange" }, ngImport: i0, template: "<div\r\n class=\"db-kv-map flex flex-col gap-2\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder.styleStudio.messages'\"\r\n>\r\n @if (rows().length) {\r\n @if (integratedLabels()) {\r\n @for (row of rows(); track row.key) {\r\n <div\r\n class=\"overflow-hidden rounded-xl border border-surface-200 bg-surface-0\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"flex w-full items-center justify-between gap-3 px-4 py-3 text-start text-sm font-semibold text-color hover:bg-surface-50 focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-primary-500\"\r\n [attr.aria-expanded]=\"isExpanded(row.key)\"\r\n (click)=\"toggleRow(row.key)\"\r\n >\r\n <span class=\"min-w-0 truncate\" mtTruncateTooltip>{{\r\n row.label\r\n }}</span>\r\n <span class=\"shrink-0 text-primary-600\" aria-hidden=\"true\">{{\r\n isExpanded(row.key) ? \"\u2212\" : \"+\"\r\n }}</span>\r\n </button>\r\n\r\n @if (isExpanded(row.key)) {\r\n <div\r\n class=\"flex flex-col gap-4 border-t border-surface-200 px-4 py-4\"\r\n >\r\n <div\r\n class=\"grid grid-cols-[repeat(auto-fit,minmax(11rem,1fr))] gap-3\"\r\n >\r\n @for (f of propertyLayoutFields(); track f.key) {\r\n @if (f.key === \"colorAsProperty\" && f.allowCustomColor) {\r\n <div class=\"min-w-0\">\r\n <mt-select-field\r\n [label]=\"f.label\"\r\n [options]=\"options(row, f)\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"useFilter(row, f)\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [ngModel]=\"selectValue(row, f)\"\r\n (ngModelChange)=\"onSourceChange(row, f, $event)\"\r\n />\r\n @if (isCustomColor(row, f)) {\r\n <mt-color-picker-field\r\n class=\"mt-2\"\r\n [label]=\"t('customColor')\"\r\n [formControl]=\"row.custom[f.key]\"\r\n />\r\n }\r\n </div>\r\n } @else if (f.type === \"select\") {\r\n <mt-select-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [options]=\"options(row, f)\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"useFilter(row, f)\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n } @else {\r\n <mt-text-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n }\r\n </div>\r\n\r\n @if (toggleFields().length) {\r\n <div\r\n class=\"grid grid-cols-[repeat(auto-fit,minmax(11rem,1fr))] gap-2\"\r\n >\r\n @for (f of toggleFields(); track f.key) {\r\n <mt-toggle-field\r\n [label]=\"f.label\"\r\n toggleShape=\"card\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"flex flex-col gap-2 border-t border-surface-200 pt-4\">\r\n <mt-toggle-field\r\n [label]=\"t('customLabel')\"\r\n [descriptionCard]=\"t('customLabelHint')\"\r\n toggleShape=\"card\"\r\n [ngModel]=\"row.showLabels()\"\r\n (ngModelChange)=\"toggleLabels(row, $event)\"\r\n />\r\n @if (row.showLabels()) {\r\n <div\r\n class=\"grid grid-cols-[repeat(auto-fit,minmax(11rem,1fr))] gap-3 ps-3\"\r\n >\r\n <mt-text-field\r\n [label]=\"t('englishLabel')\"\r\n [formControl]=\"row.labelGroup.controls.en\"\r\n />\r\n <mt-text-field\r\n [label]=\"t('arabicLabel')\"\r\n dir=\"rtl\"\r\n [formControl]=\"row.labelGroup.controls.ar\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n\r\n <div class=\"flex flex-col gap-2\">\r\n <mt-toggle-field\r\n [label]=\"t('addInfo')\"\r\n [descriptionCard]=\"t('addInfoHint')\"\r\n toggleShape=\"card\"\r\n [ngModel]=\"row.showInfo()\"\r\n (ngModelChange)=\"toggleInfo(row, $event)\"\r\n />\r\n @if (row.showInfo()) {\r\n <div\r\n class=\"grid grid-cols-[repeat(auto-fit,minmax(11rem,1fr))] gap-3 ps-3\"\r\n >\r\n @for (f of infoFields(); track f.key) {\r\n <mt-textarea-field\r\n [label]=\"f.label\"\r\n rows=\"3\"\r\n [formControl]=\"control(row, f.key)\"\r\n [attr.dir]=\"f.key === 'infoAr' ? 'rtl' : null\"\r\n />\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (userFields().length) {\r\n <details class=\"rounded-lg border border-surface-200 px-3 py-2\">\r\n <summary\r\n class=\"cursor-pointer text-sm font-medium text-color\"\r\n >\r\n {{ t(\"userDisplay\") }}\r\n </summary>\r\n <p class=\"mb-3 mt-2 text-xs text-muted-color\">\r\n {{ t(\"userDisplayHint\") }}\r\n </p>\r\n <div\r\n class=\"grid grid-cols-[repeat(auto-fit,minmax(11rem,1fr))] gap-2\"\r\n >\r\n @for (f of userFields(); track f.key) {\r\n <mt-toggle-field\r\n [label]=\"f.label\"\r\n toggleShape=\"card\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n </div>\r\n </details>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n } @else {\r\n @for (row of rows(); track row.key) {\r\n <div\r\n class=\"flex flex-col gap-2.5 rounded-lg border border-surface-200 bg-surface-0 px-3 py-2.5\"\r\n >\r\n @if (collapsibleRows()) {\r\n <button\r\n type=\"button\"\r\n class=\"flex w-full items-center justify-between gap-2 text-start text-sm font-semibold text-color\"\r\n [attr.aria-expanded]=\"isExpanded(row.key)\"\r\n (click)=\"toggleRow(row.key)\"\r\n >\r\n <span class=\"truncate\" mtTruncateTooltip>{{ row.label }}</span>\r\n <span aria-hidden=\"true\">{{\r\n isExpanded(row.key) ? \"\u2212\" : \"+\"\r\n }}</span>\r\n </button>\r\n } @else {\r\n <span\r\n class=\"truncate text-sm font-semibold text-color\"\r\n mtTruncateTooltip\r\n >\r\n {{ row.label }}\r\n </span>\r\n }\r\n\r\n @if (!collapsibleRows() || isExpanded(row.key)) {\r\n <!-- Inputs carry their own label instead of a placeholder: four\r\n controls never fit on one line in the settings pane, and the\r\n placeholder-as-label truncated to \"Color F\u2026\". auto-fit (not a\r\n viewport breakpoint) reflows on the PANE's width \u2014 the pane is\r\n narrow while the viewport is wide. -->\r\n @if (inputFields().length) {\r\n <div\r\n class=\"grid gap-x-3 gap-y-2.5 grid-cols-[repeat(auto-fit,minmax(9rem,1fr))]\"\r\n >\r\n @for (f of inputFields(); track f.key) {\r\n @switch (f.type) {\r\n @case (\"color\") {\r\n <mt-color-picker-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n @case (\"number\") {\r\n <mt-number-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n @case (\"multilineText\") {\r\n <mt-textarea-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n rows=\"3\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n @case (\"select\") {\r\n @if (f.allowCustomColor) {\r\n <!-- ngModel, not formControl: in custom mode the stored\r\n value is the colour itself while the select has to\r\n show the \"Custom color\" entry, so the displayed value\r\n is derived rather than the control's own. -->\r\n <mt-select-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [options]=\"options(row, f)\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"useFilter(row, f)\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [ngModel]=\"selectValue(row, f)\"\r\n (ngModelChange)=\"onSourceChange(row, f, $event)\"\r\n />\r\n @if (isCustomColor(row, f)) {\r\n <mt-color-picker-field\r\n class=\"min-w-0\"\r\n [label]=\"t('customColor')\"\r\n [formControl]=\"row.custom[f.key]\"\r\n />\r\n }\r\n } @else {\r\n <mt-select-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [options]=\"options(row, f)\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"useFilter(row, f)\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n }\r\n @default {\r\n <mt-text-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Toggles on their own line \u2014 they are label-beside-control, so they\r\n read wrong when mixed into the labelled input grid. -->\r\n @if (toggleFields().length) {\r\n <div class=\"flex flex-wrap items-center gap-x-5 gap-y-2\">\r\n @for (f of toggleFields(); track f.key) {\r\n <mt-toggle-field\r\n class=\"shrink-0\"\r\n [label]=\"f.label\"\r\n labelPosition=\"start\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n </div>\r\n }\r\n @if (userFields().length) {\r\n <details class=\"rounded-md border border-surface-200 px-3 py-2\">\r\n <summary class=\"cursor-pointer text-sm font-medium text-color\">\r\n {{ t(\"userDisplay\") }}\r\n </summary>\r\n <p class=\"mt-2 text-xs text-muted-color\">\r\n {{ t(\"userDisplayHint\") }}\r\n </p>\r\n <div class=\"mt-3 flex flex-wrap items-center gap-x-5 gap-y-2\">\r\n @for (f of userFields(); track f.key) {\r\n <mt-toggle-field\r\n class=\"shrink-0\"\r\n [label]=\"f.label\"\r\n labelPosition=\"start\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n </div>\r\n </details>\r\n }\r\n }\r\n </div>\r\n }\r\n }\r\n } @else {\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"noProperties\") }}\r\n </p>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { 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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: TextareaField, selector: "mt-textarea-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "noErrorStyle", "pInputs", "rows", "required", "maxLength"] }, { 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: ColorPickerField, selector: "mt-color-picker-field", inputs: ["label", "appendTo", "placeholder", "class", "variant", "readonly", "pInputs", "required"], outputs: ["onChange"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "directive", type: TruncateTooltip, selector: "[mtTruncateTooltip]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
34586
34738
  }
34587
34739
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: KeyValueMapField, decorators: [{
34588
34740
  type: Component,
@@ -34598,8 +34750,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
34598
34750
  SelectField,
34599
34751
  ToggleField,
34600
34752
  TruncateTooltip,
34601
- ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\r\n class=\"db-kv-map flex flex-col gap-2\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder.styleStudio.messages'\"\r\n>\r\n @if (rows().length) {\r\n @for (row of rows(); track row.key) {\r\n <div\r\n class=\"flex flex-col gap-2.5 rounded-lg border border-surface-200 bg-surface-0 px-3 py-2.5\"\r\n >\r\n @if (collapsibleRows()) {\r\n <button\r\n type=\"button\"\r\n class=\"flex w-full items-center justify-between gap-2 text-start text-sm font-semibold text-color\"\r\n [attr.aria-expanded]=\"isExpanded(row.key)\"\r\n (click)=\"toggleRow(row.key)\"\r\n >\r\n <span class=\"truncate\" mtTruncateTooltip>{{ row.label }}</span>\r\n <span aria-hidden=\"true\">{{\r\n isExpanded(row.key) ? \"\u2212\" : \"+\"\r\n }}</span>\r\n </button>\r\n } @else {\r\n <span\r\n class=\"truncate text-sm font-semibold text-color\"\r\n mtTruncateTooltip\r\n >\r\n {{ row.label }}\r\n </span>\r\n }\r\n\r\n @if (!collapsibleRows() || isExpanded(row.key)) {\r\n <!-- Inputs carry their own label instead of a placeholder: four\r\n controls never fit on one line in the settings pane, and the\r\n placeholder-as-label truncated to \"Color F\u2026\". auto-fit (not a\r\n viewport breakpoint) reflows on the PANE's width \u2014 the pane is\r\n narrow while the viewport is wide. -->\r\n @if (inputFields().length) {\r\n <div\r\n class=\"grid gap-x-3 gap-y-2.5 grid-cols-[repeat(auto-fit,minmax(9rem,1fr))]\"\r\n >\r\n @for (f of inputFields(); track f.key) {\r\n @switch (f.type) {\r\n @case (\"color\") {\r\n <mt-color-picker-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n @case (\"number\") {\r\n <mt-number-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n @case (\"multilineText\") {\r\n <mt-textarea-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n rows=\"3\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n @case (\"select\") {\r\n @if (f.allowCustomColor) {\r\n <!-- ngModel, not formControl: in custom mode the stored\r\n value is the colour itself while the select has to\r\n show the \"Custom color\" entry, so the displayed value\r\n is derived rather than the control's own. -->\r\n <mt-select-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [options]=\"options(row, f)\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"useFilter(row, f)\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [ngModel]=\"selectValue(row, f)\"\r\n (ngModelChange)=\"onSourceChange(row, f, $event)\"\r\n />\r\n @if (isCustomColor(row, f)) {\r\n <mt-color-picker-field\r\n class=\"min-w-0\"\r\n [label]=\"t('customColor')\"\r\n [formControl]=\"row.custom[f.key]\"\r\n />\r\n }\r\n } @else {\r\n <mt-select-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [options]=\"options(row, f)\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"useFilter(row, f)\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n }\r\n @default {\r\n <mt-text-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Toggles on their own line \u2014 they are label-beside-control, so they\r\n read wrong when mixed into the labelled input grid. -->\r\n @if (toggleFields().length) {\r\n <div class=\"flex flex-wrap items-center gap-x-5 gap-y-2\">\r\n @for (f of toggleFields(); track f.key) {\r\n <mt-toggle-field\r\n class=\"shrink-0\"\r\n [label]=\"f.label\"\r\n labelPosition=\"start\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n </div>\r\n }\r\n @if (userFields().length) {\r\n <details class=\"rounded-md border border-surface-200 px-3 py-2\">\r\n <summary class=\"cursor-pointer text-sm font-medium text-color\">\r\n {{ t(\"userDisplay\") }}\r\n </summary>\r\n <p class=\"mt-2 text-xs text-muted-color\">\r\n {{ t(\"userDisplayHint\") }}\r\n </p>\r\n <div class=\"mt-3 flex flex-wrap items-center gap-x-5 gap-y-2\">\r\n @for (f of userFields(); track f.key) {\r\n <mt-toggle-field\r\n class=\"shrink-0\"\r\n [label]=\"f.label\"\r\n labelPosition=\"start\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n </div>\r\n </details>\r\n }\r\n }\r\n </div>\r\n }\r\n } @else {\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"noProperties\") }}\r\n </p>\r\n }\r\n</div>\r\n" }]
34602
- }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], keys: [{ type: i0.Input, args: [{ isSignal: true, alias: "keys", required: false }] }], valueFields: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFields", required: false }] }], asArray: [{ type: i0.Input, args: [{ isSignal: true, alias: "asArray", required: false }] }], collapsibleRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsibleRows", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
34753
+ ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\r\n class=\"db-kv-map flex flex-col gap-2\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder.styleStudio.messages'\"\r\n>\r\n @if (rows().length) {\r\n @if (integratedLabels()) {\r\n @for (row of rows(); track row.key) {\r\n <div\r\n class=\"overflow-hidden rounded-xl border border-surface-200 bg-surface-0\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"flex w-full items-center justify-between gap-3 px-4 py-3 text-start text-sm font-semibold text-color hover:bg-surface-50 focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-primary-500\"\r\n [attr.aria-expanded]=\"isExpanded(row.key)\"\r\n (click)=\"toggleRow(row.key)\"\r\n >\r\n <span class=\"min-w-0 truncate\" mtTruncateTooltip>{{\r\n row.label\r\n }}</span>\r\n <span class=\"shrink-0 text-primary-600\" aria-hidden=\"true\">{{\r\n isExpanded(row.key) ? \"\u2212\" : \"+\"\r\n }}</span>\r\n </button>\r\n\r\n @if (isExpanded(row.key)) {\r\n <div\r\n class=\"flex flex-col gap-4 border-t border-surface-200 px-4 py-4\"\r\n >\r\n <div\r\n class=\"grid grid-cols-[repeat(auto-fit,minmax(11rem,1fr))] gap-3\"\r\n >\r\n @for (f of propertyLayoutFields(); track f.key) {\r\n @if (f.key === \"colorAsProperty\" && f.allowCustomColor) {\r\n <div class=\"min-w-0\">\r\n <mt-select-field\r\n [label]=\"f.label\"\r\n [options]=\"options(row, f)\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"useFilter(row, f)\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [ngModel]=\"selectValue(row, f)\"\r\n (ngModelChange)=\"onSourceChange(row, f, $event)\"\r\n />\r\n @if (isCustomColor(row, f)) {\r\n <mt-color-picker-field\r\n class=\"mt-2\"\r\n [label]=\"t('customColor')\"\r\n [formControl]=\"row.custom[f.key]\"\r\n />\r\n }\r\n </div>\r\n } @else if (f.type === \"select\") {\r\n <mt-select-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [options]=\"options(row, f)\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"useFilter(row, f)\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n } @else {\r\n <mt-text-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n }\r\n </div>\r\n\r\n @if (toggleFields().length) {\r\n <div\r\n class=\"grid grid-cols-[repeat(auto-fit,minmax(11rem,1fr))] gap-2\"\r\n >\r\n @for (f of toggleFields(); track f.key) {\r\n <mt-toggle-field\r\n [label]=\"f.label\"\r\n toggleShape=\"card\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"flex flex-col gap-2 border-t border-surface-200 pt-4\">\r\n <mt-toggle-field\r\n [label]=\"t('customLabel')\"\r\n [descriptionCard]=\"t('customLabelHint')\"\r\n toggleShape=\"card\"\r\n [ngModel]=\"row.showLabels()\"\r\n (ngModelChange)=\"toggleLabels(row, $event)\"\r\n />\r\n @if (row.showLabels()) {\r\n <div\r\n class=\"grid grid-cols-[repeat(auto-fit,minmax(11rem,1fr))] gap-3 ps-3\"\r\n >\r\n <mt-text-field\r\n [label]=\"t('englishLabel')\"\r\n [formControl]=\"row.labelGroup.controls.en\"\r\n />\r\n <mt-text-field\r\n [label]=\"t('arabicLabel')\"\r\n dir=\"rtl\"\r\n [formControl]=\"row.labelGroup.controls.ar\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n\r\n <div class=\"flex flex-col gap-2\">\r\n <mt-toggle-field\r\n [label]=\"t('addInfo')\"\r\n [descriptionCard]=\"t('addInfoHint')\"\r\n toggleShape=\"card\"\r\n [ngModel]=\"row.showInfo()\"\r\n (ngModelChange)=\"toggleInfo(row, $event)\"\r\n />\r\n @if (row.showInfo()) {\r\n <div\r\n class=\"grid grid-cols-[repeat(auto-fit,minmax(11rem,1fr))] gap-3 ps-3\"\r\n >\r\n @for (f of infoFields(); track f.key) {\r\n <mt-textarea-field\r\n [label]=\"f.label\"\r\n rows=\"3\"\r\n [formControl]=\"control(row, f.key)\"\r\n [attr.dir]=\"f.key === 'infoAr' ? 'rtl' : null\"\r\n />\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (userFields().length) {\r\n <details class=\"rounded-lg border border-surface-200 px-3 py-2\">\r\n <summary\r\n class=\"cursor-pointer text-sm font-medium text-color\"\r\n >\r\n {{ t(\"userDisplay\") }}\r\n </summary>\r\n <p class=\"mb-3 mt-2 text-xs text-muted-color\">\r\n {{ t(\"userDisplayHint\") }}\r\n </p>\r\n <div\r\n class=\"grid grid-cols-[repeat(auto-fit,minmax(11rem,1fr))] gap-2\"\r\n >\r\n @for (f of userFields(); track f.key) {\r\n <mt-toggle-field\r\n [label]=\"f.label\"\r\n toggleShape=\"card\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n </div>\r\n </details>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n } @else {\r\n @for (row of rows(); track row.key) {\r\n <div\r\n class=\"flex flex-col gap-2.5 rounded-lg border border-surface-200 bg-surface-0 px-3 py-2.5\"\r\n >\r\n @if (collapsibleRows()) {\r\n <button\r\n type=\"button\"\r\n class=\"flex w-full items-center justify-between gap-2 text-start text-sm font-semibold text-color\"\r\n [attr.aria-expanded]=\"isExpanded(row.key)\"\r\n (click)=\"toggleRow(row.key)\"\r\n >\r\n <span class=\"truncate\" mtTruncateTooltip>{{ row.label }}</span>\r\n <span aria-hidden=\"true\">{{\r\n isExpanded(row.key) ? \"\u2212\" : \"+\"\r\n }}</span>\r\n </button>\r\n } @else {\r\n <span\r\n class=\"truncate text-sm font-semibold text-color\"\r\n mtTruncateTooltip\r\n >\r\n {{ row.label }}\r\n </span>\r\n }\r\n\r\n @if (!collapsibleRows() || isExpanded(row.key)) {\r\n <!-- Inputs carry their own label instead of a placeholder: four\r\n controls never fit on one line in the settings pane, and the\r\n placeholder-as-label truncated to \"Color F\u2026\". auto-fit (not a\r\n viewport breakpoint) reflows on the PANE's width \u2014 the pane is\r\n narrow while the viewport is wide. -->\r\n @if (inputFields().length) {\r\n <div\r\n class=\"grid gap-x-3 gap-y-2.5 grid-cols-[repeat(auto-fit,minmax(9rem,1fr))]\"\r\n >\r\n @for (f of inputFields(); track f.key) {\r\n @switch (f.type) {\r\n @case (\"color\") {\r\n <mt-color-picker-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n @case (\"number\") {\r\n <mt-number-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n @case (\"multilineText\") {\r\n <mt-textarea-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n rows=\"3\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n @case (\"select\") {\r\n @if (f.allowCustomColor) {\r\n <!-- ngModel, not formControl: in custom mode the stored\r\n value is the colour itself while the select has to\r\n show the \"Custom color\" entry, so the displayed value\r\n is derived rather than the control's own. -->\r\n <mt-select-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [options]=\"options(row, f)\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"useFilter(row, f)\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [ngModel]=\"selectValue(row, f)\"\r\n (ngModelChange)=\"onSourceChange(row, f, $event)\"\r\n />\r\n @if (isCustomColor(row, f)) {\r\n <mt-color-picker-field\r\n class=\"min-w-0\"\r\n [label]=\"t('customColor')\"\r\n [formControl]=\"row.custom[f.key]\"\r\n />\r\n }\r\n } @else {\r\n <mt-select-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [options]=\"options(row, f)\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"useFilter(row, f)\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n }\r\n @default {\r\n <mt-text-field\r\n class=\"min-w-0\"\r\n [label]=\"f.label\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Toggles on their own line \u2014 they are label-beside-control, so they\r\n read wrong when mixed into the labelled input grid. -->\r\n @if (toggleFields().length) {\r\n <div class=\"flex flex-wrap items-center gap-x-5 gap-y-2\">\r\n @for (f of toggleFields(); track f.key) {\r\n <mt-toggle-field\r\n class=\"shrink-0\"\r\n [label]=\"f.label\"\r\n labelPosition=\"start\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n </div>\r\n }\r\n @if (userFields().length) {\r\n <details class=\"rounded-md border border-surface-200 px-3 py-2\">\r\n <summary class=\"cursor-pointer text-sm font-medium text-color\">\r\n {{ t(\"userDisplay\") }}\r\n </summary>\r\n <p class=\"mt-2 text-xs text-muted-color\">\r\n {{ t(\"userDisplayHint\") }}\r\n </p>\r\n <div class=\"mt-3 flex flex-wrap items-center gap-x-5 gap-y-2\">\r\n @for (f of userFields(); track f.key) {\r\n <mt-toggle-field\r\n class=\"shrink-0\"\r\n [label]=\"f.label\"\r\n labelPosition=\"start\"\r\n [formControl]=\"control(row, f.key)\"\r\n />\r\n }\r\n </div>\r\n </details>\r\n }\r\n }\r\n </div>\r\n }\r\n }\r\n } @else {\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"noProperties\") }}\r\n </p>\r\n }\r\n</div>\r\n" }]
34754
+ }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], keys: [{ type: i0.Input, args: [{ isSignal: true, alias: "keys", required: false }] }], valueFields: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFields", required: false }] }], asArray: [{ type: i0.Input, args: [{ isSignal: true, alias: "asArray", required: false }] }], collapsibleRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsibleRows", required: false }] }], integratedLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "integratedLabels", required: false }] }], labelOverrides: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelOverrides", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], labelOverridesChange: [{ type: i0.Output, args: ["labelOverridesChange"] }] } });
34603
34755
 
34604
34756
  /**
34605
34757
  * Drag-to-reorder the chart legend. The available entries (`items`) come from
@@ -34748,6 +34900,9 @@ const LEGEND_COLOR_OVERRIDES_PATH = 'clientConfig.configAsType.legend.colorOverr
34748
34900
  const OVERRIDE_LABELS_PATH = 'clientConfig.configAsType.overrideLabels';
34749
34901
  /** Shared empty result — a fresh [] each read re-sets the child input. */
34750
34902
  const NO_OVERRIDE_LABELS = [];
34903
+ const EMPTY_MAP = {};
34904
+ const EMPTY_ARRAY = [];
34905
+ const EMPTY_OPTIONS = [];
34751
34906
  // The "Show top border" toggle only writes `border-top-show`; the renderer
34752
34907
  // reads `border-top-color` and otherwise falls back to `var(--primary-color)`.
34753
34908
  // Enabling the toggle therefore has to seed the top-border color from the
@@ -34780,8 +34935,11 @@ function valuesEqual(a, b) {
34780
34935
  * `cardStyleConfig.shadows` array, so a reset must clear BOTH or the rendered
34781
34936
  * box-shadow lingers. Shared by resetSection() and resetAll().
34782
34937
  */
34783
- function expandResetPatches(path, mirrorPaths) {
34938
+ function expandResetPatches(path, mirrorPaths, integratedLabelsPath) {
34784
34939
  const patches = [{ path, value: undefined }];
34940
+ if (integratedLabelsPath) {
34941
+ patches.push({ path: integratedLabelsPath, value: undefined });
34942
+ }
34785
34943
  for (const mp of mirrorPaths ?? []) {
34786
34944
  patches.push({ path: mp, value: undefined });
34787
34945
  }
@@ -34908,12 +35066,14 @@ class StyleField {
34908
35066
  });
34909
35067
  }
34910
35068
  // --- option helpers -------------------------------------------------------
34911
- options() {
35069
+ resolvedOptions = computed(() => {
34912
35070
  const field = this.field();
34913
- if (field.optionsFrom) {
34914
- return field.optionsFrom(this.persisted(), this.capability() ?? null);
34915
- }
34916
- return field.options ?? [];
35071
+ return field.optionsFrom
35072
+ ? field.optionsFrom(this.persisted(), this.capability() ?? null)
35073
+ : (field.options ?? EMPTY_OPTIONS);
35074
+ }, ...(ngDevMode ? [{ debugName: "resolvedOptions" }] : /* istanbul ignore next */ []));
35075
+ options() {
35076
+ return this.resolvedOptions();
34917
35077
  }
34918
35078
  /** select uses a search box once the list is long enough to need one. */
34919
35079
  get useFilter() {
@@ -34951,16 +35111,19 @@ class StyleField {
34951
35111
  this.activeLang();
34952
35112
  return translateStyleLabel(this.transloco, this.field().addLabel ?? fallback);
34953
35113
  }
34954
- mapKeys() {
35114
+ resolvedMapKeys = computed(() => {
34955
35115
  const field = this.field();
34956
35116
  return field.keysFrom
34957
35117
  ? field.keysFrom(this.persisted(), this.capability() ?? null)
34958
- : [];
35118
+ : EMPTY_OPTIONS;
35119
+ }, ...(ngDevMode ? [{ debugName: "resolvedMapKeys" }] : /* istanbul ignore next */ []));
35120
+ mapKeys() {
35121
+ return this.resolvedMapKeys();
34959
35122
  }
34960
35123
  // --- composite read helpers ----------------------------------------------
34961
35124
  readArray() {
34962
35125
  const raw = this.currentValue();
34963
- return Array.isArray(raw) ? raw : [];
35126
+ return Array.isArray(raw) ? raw : EMPTY_ARRAY;
34964
35127
  }
34965
35128
  readColors() {
34966
35129
  const raw = this.currentValue();
@@ -34970,7 +35133,7 @@ class StyleField {
34970
35133
  const raw = this.currentValue();
34971
35134
  return raw && typeof raw === 'object' && !Array.isArray(raw)
34972
35135
  ? raw
34973
- : {};
35136
+ : EMPTY_MAP;
34974
35137
  }
34975
35138
  /** keyValueMap accepts either a map or a positional array (asArray mode). */
34976
35139
  readMapOrArray() {
@@ -34979,7 +35142,19 @@ class StyleField {
34979
35142
  return raw;
34980
35143
  return raw && typeof raw === 'object'
34981
35144
  ? raw
34982
- : {};
35145
+ : EMPTY_MAP;
35146
+ }
35147
+ readIntegratedLabels() {
35148
+ const path = this.field().integratedLabelsPath;
35149
+ const raw = path ? readByPath$1(this.persisted(), path) : null;
35150
+ return raw && typeof raw === 'object' && !Array.isArray(raw)
35151
+ ? raw
35152
+ : EMPTY_MAP;
35153
+ }
35154
+ onIntegratedLabelsChange(value) {
35155
+ const path = this.field().integratedLabelsPath;
35156
+ if (path)
35157
+ this.patch.emit({ path, value });
34983
35158
  }
34984
35159
  readLegendColorOverrides() {
34985
35160
  const raw = readByPath$1(this.persisted(), LEGEND_COLOR_OVERRIDES_PATH);
@@ -35099,7 +35274,7 @@ class StyleField {
35099
35274
  this.patch.emit({ path: SHADOW_PRESET_PATH$1, value: key });
35100
35275
  }
35101
35276
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: StyleField, deps: [], target: i0.ɵɵFactoryTarget.Component });
35102
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: StyleField, isStandalone: true, selector: "mt-style-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, persisted: { classPropertyName: "persisted", publicName: "persisted", isSignal: true, isRequired: true, transformFunction: null }, capability: { classPropertyName: "capability", publicName: "capability", isSignal: true, isRequired: false, transformFunction: null }, legendItems: { classPropertyName: "legendItems", publicName: "legendItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { patch: "patch" }, ngImport: i0, template: "@let f = field();\r\n@switch (f.type) {\r\n @case (\"text\") {\r\n <mt-text-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"cssDimension\") {\r\n <mt-text-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [placeholder]=\"f.placeholder ?? '16px'\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"multilineText\") {\r\n <mt-textarea-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"number\") {\r\n <mt-number-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [min]=\"numberMin\"\r\n [max]=\"numberMax\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"numberRange\") {\r\n <mt-slider-field\r\n [label]=\"f.label\"\r\n [min]=\"f.min ?? 0\"\r\n [max]=\"f.max ?? 100\"\r\n [step]=\"f.step ?? 1\"\r\n [unit]=\"f.unit ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"boolean\") {\r\n <mt-toggle-field\r\n [label]=\"f.label\"\r\n toggleShape=\"card\"\r\n [descriptionCard]=\"f.description ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"color\") {\r\n <mt-color-picker-field [label]=\"f.label\" [formControl]=\"control\" />\r\n }\r\n @case (\"select\") {\r\n <mt-select-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [options]=\"options()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"useFilter\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"multiselect\") {\r\n <mt-multi-select-field\r\n [label]=\"f.label\"\r\n [options]=\"options()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n display=\"chip\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"iconPicker\") {\r\n <mt-icon-field [label]=\"f.label\" [formControl]=\"control\" />\r\n }\r\n @default {\r\n <!-- Composite + JSON types render their own label header -->\r\n <div class=\"db-style-field__composite flex flex-col gap-1.5\">\r\n <span class=\"text-sm font-medium text-color\">{{ f.label }}</span>\r\n @if (f.description) {\r\n <span class=\"text-xs text-muted-color\">{{ f.description }}</span>\r\n }\r\n @switch (f.type) {\r\n @case (\"segmented\") {\r\n <mt-segmented-field\r\n [options]=\"options()\"\r\n [value]=\"currentValue()\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"palette\") {\r\n <mt-color-list-field\r\n [value]=\"readColors()\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"colorList\") {\r\n <mt-color-list-field\r\n [value]=\"readColors()\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"arrayBuilder\") {\r\n <mt-array-builder-field\r\n [value]=\"readArray()\"\r\n [itemFields]=\"arrayItemFields()\"\r\n [itemTitleKey]=\"f.itemTitleKey\"\r\n [addLabel]=\"addLabel('Add item')\"\r\n [maxItems]=\"f.maxItems\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"conditionBuilder\") {\r\n <mt-array-builder-field\r\n [value]=\"readArray()\"\r\n [itemFields]=\"conditionFields()\"\r\n [addLabel]=\"addLabel('Add rule')\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"keyValueMap\") {\r\n <mt-key-value-map-field\r\n [value]=\"readMapOrArray()\"\r\n [keys]=\"mapKeys()\"\r\n [valueFields]=\"mapValueFields()\"\r\n [asArray]=\"f.asArray ?? false\"\r\n [collapsibleRows]=\"f.collapsibleRows ?? false\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"legendOrder\") {\r\n <mt-legend-order-field\r\n [items]=\"legendItems()\"\r\n [colorOverrides]=\"readLegendColorOverrides()\"\r\n (valueChange)=\"emitValue($event)\"\r\n (colorChange)=\"onLegendColorChange($event)\"\r\n />\r\n }\r\n @case (\"entryColors\") {\r\n <!-- Colors only: no (valueChange), because there is no order to\r\n persist for this control's charts. -->\r\n <mt-legend-order-field\r\n [items]=\"legendItems()\"\r\n [colorOverrides]=\"readLegendColorOverrides()\"\r\n [localizedLabels]=\"readOverrideLabels()\"\r\n [reorderable]=\"false\"\r\n [showLocalizedLabels]=\"true\"\r\n [useItemKeyForColor]=\"true\"\r\n (colorChange)=\"onLegendColorChange($event)\"\r\n (localizedLabelChange)=\"onEntryLabelChange($event)\"\r\n />\r\n }\r\n @case (\"json\") {\r\n <mt-textarea-field\r\n rows=\"8\"\r\n placeholder=\"{ }\"\r\n [formControl]=\"jsonControl\"\r\n />\r\n @if (jsonError()) {\r\n <span class=\"text-xs text-red-600\">{{ jsonError() }}</span>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n}\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: TextareaField, selector: "mt-textarea-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "noErrorStyle", "pInputs", "rows", "required", "maxLength"] }, { 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: SliderField, selector: "mt-slider-field", inputs: ["field", "label", "class", "min", "max", "step", "hideNumber", "unit", "readonly", "required"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: 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: ColorPickerField, selector: "mt-color-picker-field", inputs: ["label", "appendTo", "placeholder", "class", "variant", "readonly", "pInputs", "required"], outputs: ["onChange"] }, { kind: "component", type: IconField, selector: "mt-icon-field", inputs: ["label", "required"] }, { kind: "component", type: SegmentedField, selector: "mt-segmented-field", inputs: ["options", "value", "disabled", "ariaLabel"], outputs: ["valueChange"] }, { kind: "component", type: ColorListField, selector: "mt-color-list-field", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: ArrayBuilderField, selector: "mt-array-builder-field", inputs: ["value", "itemFields", "itemTitleKey", "addLabel", "maxItems"], outputs: ["valueChange"] }, { kind: "component", type: KeyValueMapField, selector: "mt-key-value-map-field", inputs: ["value", "keys", "valueFields", "asArray", "collapsibleRows"], outputs: ["valueChange"] }, { kind: "component", type: LegendOrderField, selector: "mt-legend-order-field", inputs: ["items", "colorOverrides", "localizedLabels", "reorderable", "showLocalizedLabels", "useItemKeyForColor"], outputs: ["valueChange", "colorChange", "localizedLabelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
35277
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: StyleField, isStandalone: true, selector: "mt-style-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, persisted: { classPropertyName: "persisted", publicName: "persisted", isSignal: true, isRequired: true, transformFunction: null }, capability: { classPropertyName: "capability", publicName: "capability", isSignal: true, isRequired: false, transformFunction: null }, legendItems: { classPropertyName: "legendItems", publicName: "legendItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { patch: "patch" }, ngImport: i0, template: "@let f = field();\r\n@switch (f.type) {\r\n @case (\"text\") {\r\n <mt-text-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"cssDimension\") {\r\n <mt-text-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [placeholder]=\"f.placeholder ?? '16px'\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"multilineText\") {\r\n <mt-textarea-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"number\") {\r\n <mt-number-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [min]=\"numberMin\"\r\n [max]=\"numberMax\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"numberRange\") {\r\n <mt-slider-field\r\n [label]=\"f.label\"\r\n [min]=\"f.min ?? 0\"\r\n [max]=\"f.max ?? 100\"\r\n [step]=\"f.step ?? 1\"\r\n [unit]=\"f.unit ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"boolean\") {\r\n <mt-toggle-field\r\n [label]=\"f.label\"\r\n toggleShape=\"card\"\r\n [descriptionCard]=\"f.description ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"color\") {\r\n <mt-color-picker-field [label]=\"f.label\" [formControl]=\"control\" />\r\n }\r\n @case (\"select\") {\r\n <mt-select-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [options]=\"options()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"useFilter\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"multiselect\") {\r\n <mt-multi-select-field\r\n [label]=\"f.label\"\r\n [options]=\"options()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n display=\"chip\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"iconPicker\") {\r\n <mt-icon-field [label]=\"f.label\" [formControl]=\"control\" />\r\n }\r\n @default {\r\n <!-- Composite + JSON types render their own label header -->\r\n <div class=\"db-style-field__composite flex flex-col gap-1.5\">\r\n <span class=\"text-sm font-medium text-color\">{{ f.label }}</span>\r\n @if (f.description) {\r\n <span class=\"text-xs text-muted-color\">{{ f.description }}</span>\r\n }\r\n @switch (f.type) {\r\n @case (\"segmented\") {\r\n <mt-segmented-field\r\n [options]=\"options()\"\r\n [value]=\"currentValue()\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"palette\") {\r\n <mt-color-list-field\r\n [value]=\"readColors()\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"colorList\") {\r\n <mt-color-list-field\r\n [value]=\"readColors()\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"arrayBuilder\") {\r\n <mt-array-builder-field\r\n [value]=\"readArray()\"\r\n [itemFields]=\"arrayItemFields()\"\r\n [itemTitleKey]=\"f.itemTitleKey\"\r\n [addLabel]=\"addLabel('Add item')\"\r\n [maxItems]=\"f.maxItems\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"conditionBuilder\") {\r\n <mt-array-builder-field\r\n [value]=\"readArray()\"\r\n [itemFields]=\"conditionFields()\"\r\n [addLabel]=\"addLabel('Add rule')\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"keyValueMap\") {\r\n <mt-key-value-map-field\r\n [value]=\"readMapOrArray()\"\r\n [keys]=\"mapKeys()\"\r\n [valueFields]=\"mapValueFields()\"\r\n [asArray]=\"f.asArray ?? false\"\r\n [collapsibleRows]=\"f.collapsibleRows ?? false\"\r\n [integratedLabels]=\"!!f.integratedLabelsPath\"\r\n [labelOverrides]=\"readIntegratedLabels()\"\r\n (valueChange)=\"emitValue($event)\"\r\n (labelOverridesChange)=\"onIntegratedLabelsChange($event)\"\r\n />\r\n }\r\n @case (\"legendOrder\") {\r\n <mt-legend-order-field\r\n [items]=\"legendItems()\"\r\n [colorOverrides]=\"readLegendColorOverrides()\"\r\n (valueChange)=\"emitValue($event)\"\r\n (colorChange)=\"onLegendColorChange($event)\"\r\n />\r\n }\r\n @case (\"entryColors\") {\r\n <!-- Colors only: no (valueChange), because there is no order to\r\n persist for this control's charts. -->\r\n <mt-legend-order-field\r\n [items]=\"legendItems()\"\r\n [colorOverrides]=\"readLegendColorOverrides()\"\r\n [localizedLabels]=\"readOverrideLabels()\"\r\n [reorderable]=\"false\"\r\n [showLocalizedLabels]=\"true\"\r\n [useItemKeyForColor]=\"true\"\r\n (colorChange)=\"onLegendColorChange($event)\"\r\n (localizedLabelChange)=\"onEntryLabelChange($event)\"\r\n />\r\n }\r\n @case (\"json\") {\r\n <mt-textarea-field\r\n rows=\"8\"\r\n placeholder=\"{ }\"\r\n [formControl]=\"jsonControl\"\r\n />\r\n @if (jsonError()) {\r\n <span class=\"text-xs text-red-600\">{{ jsonError() }}</span>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n}\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: TextareaField, selector: "mt-textarea-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "noErrorStyle", "pInputs", "rows", "required", "maxLength"] }, { 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: SliderField, selector: "mt-slider-field", inputs: ["field", "label", "class", "min", "max", "step", "hideNumber", "unit", "readonly", "required"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: 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: ColorPickerField, selector: "mt-color-picker-field", inputs: ["label", "appendTo", "placeholder", "class", "variant", "readonly", "pInputs", "required"], outputs: ["onChange"] }, { kind: "component", type: IconField, selector: "mt-icon-field", inputs: ["label", "required"] }, { kind: "component", type: SegmentedField, selector: "mt-segmented-field", inputs: ["options", "value", "disabled", "ariaLabel"], outputs: ["valueChange"] }, { kind: "component", type: ColorListField, selector: "mt-color-list-field", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: ArrayBuilderField, selector: "mt-array-builder-field", inputs: ["value", "itemFields", "itemTitleKey", "addLabel", "maxItems"], outputs: ["valueChange"] }, { kind: "component", type: KeyValueMapField, selector: "mt-key-value-map-field", inputs: ["value", "keys", "valueFields", "asArray", "collapsibleRows", "integratedLabels", "labelOverrides"], outputs: ["valueChange", "labelOverridesChange"] }, { kind: "component", type: LegendOrderField, selector: "mt-legend-order-field", inputs: ["items", "colorOverrides", "localizedLabels", "reorderable", "showLocalizedLabels", "useItemKeyForColor"], outputs: ["valueChange", "colorChange", "localizedLabelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
35103
35278
  }
35104
35279
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: StyleField, decorators: [{
35105
35280
  type: Component,
@@ -35120,7 +35295,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
35120
35295
  ArrayBuilderField,
35121
35296
  KeyValueMapField,
35122
35297
  LegendOrderField,
35123
- ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "@let f = field();\r\n@switch (f.type) {\r\n @case (\"text\") {\r\n <mt-text-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"cssDimension\") {\r\n <mt-text-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [placeholder]=\"f.placeholder ?? '16px'\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"multilineText\") {\r\n <mt-textarea-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"number\") {\r\n <mt-number-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [min]=\"numberMin\"\r\n [max]=\"numberMax\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"numberRange\") {\r\n <mt-slider-field\r\n [label]=\"f.label\"\r\n [min]=\"f.min ?? 0\"\r\n [max]=\"f.max ?? 100\"\r\n [step]=\"f.step ?? 1\"\r\n [unit]=\"f.unit ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"boolean\") {\r\n <mt-toggle-field\r\n [label]=\"f.label\"\r\n toggleShape=\"card\"\r\n [descriptionCard]=\"f.description ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"color\") {\r\n <mt-color-picker-field [label]=\"f.label\" [formControl]=\"control\" />\r\n }\r\n @case (\"select\") {\r\n <mt-select-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [options]=\"options()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"useFilter\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"multiselect\") {\r\n <mt-multi-select-field\r\n [label]=\"f.label\"\r\n [options]=\"options()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n display=\"chip\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"iconPicker\") {\r\n <mt-icon-field [label]=\"f.label\" [formControl]=\"control\" />\r\n }\r\n @default {\r\n <!-- Composite + JSON types render their own label header -->\r\n <div class=\"db-style-field__composite flex flex-col gap-1.5\">\r\n <span class=\"text-sm font-medium text-color\">{{ f.label }}</span>\r\n @if (f.description) {\r\n <span class=\"text-xs text-muted-color\">{{ f.description }}</span>\r\n }\r\n @switch (f.type) {\r\n @case (\"segmented\") {\r\n <mt-segmented-field\r\n [options]=\"options()\"\r\n [value]=\"currentValue()\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"palette\") {\r\n <mt-color-list-field\r\n [value]=\"readColors()\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"colorList\") {\r\n <mt-color-list-field\r\n [value]=\"readColors()\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"arrayBuilder\") {\r\n <mt-array-builder-field\r\n [value]=\"readArray()\"\r\n [itemFields]=\"arrayItemFields()\"\r\n [itemTitleKey]=\"f.itemTitleKey\"\r\n [addLabel]=\"addLabel('Add item')\"\r\n [maxItems]=\"f.maxItems\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"conditionBuilder\") {\r\n <mt-array-builder-field\r\n [value]=\"readArray()\"\r\n [itemFields]=\"conditionFields()\"\r\n [addLabel]=\"addLabel('Add rule')\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"keyValueMap\") {\r\n <mt-key-value-map-field\r\n [value]=\"readMapOrArray()\"\r\n [keys]=\"mapKeys()\"\r\n [valueFields]=\"mapValueFields()\"\r\n [asArray]=\"f.asArray ?? false\"\r\n [collapsibleRows]=\"f.collapsibleRows ?? false\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"legendOrder\") {\r\n <mt-legend-order-field\r\n [items]=\"legendItems()\"\r\n [colorOverrides]=\"readLegendColorOverrides()\"\r\n (valueChange)=\"emitValue($event)\"\r\n (colorChange)=\"onLegendColorChange($event)\"\r\n />\r\n }\r\n @case (\"entryColors\") {\r\n <!-- Colors only: no (valueChange), because there is no order to\r\n persist for this control's charts. -->\r\n <mt-legend-order-field\r\n [items]=\"legendItems()\"\r\n [colorOverrides]=\"readLegendColorOverrides()\"\r\n [localizedLabels]=\"readOverrideLabels()\"\r\n [reorderable]=\"false\"\r\n [showLocalizedLabels]=\"true\"\r\n [useItemKeyForColor]=\"true\"\r\n (colorChange)=\"onLegendColorChange($event)\"\r\n (localizedLabelChange)=\"onEntryLabelChange($event)\"\r\n />\r\n }\r\n @case (\"json\") {\r\n <mt-textarea-field\r\n rows=\"8\"\r\n placeholder=\"{ }\"\r\n [formControl]=\"jsonControl\"\r\n />\r\n @if (jsonError()) {\r\n <span class=\"text-xs text-red-600\">{{ jsonError() }}</span>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n}\r\n" }]
35298
+ ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "@let f = field();\r\n@switch (f.type) {\r\n @case (\"text\") {\r\n <mt-text-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"cssDimension\") {\r\n <mt-text-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [placeholder]=\"f.placeholder ?? '16px'\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"multilineText\") {\r\n <mt-textarea-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"number\") {\r\n <mt-number-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [min]=\"numberMin\"\r\n [max]=\"numberMax\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"numberRange\") {\r\n <mt-slider-field\r\n [label]=\"f.label\"\r\n [min]=\"f.min ?? 0\"\r\n [max]=\"f.max ?? 100\"\r\n [step]=\"f.step ?? 1\"\r\n [unit]=\"f.unit ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"boolean\") {\r\n <mt-toggle-field\r\n [label]=\"f.label\"\r\n toggleShape=\"card\"\r\n [descriptionCard]=\"f.description ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"color\") {\r\n <mt-color-picker-field [label]=\"f.label\" [formControl]=\"control\" />\r\n }\r\n @case (\"select\") {\r\n <mt-select-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [options]=\"options()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"useFilter\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"multiselect\") {\r\n <mt-multi-select-field\r\n [label]=\"f.label\"\r\n [options]=\"options()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n display=\"chip\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"iconPicker\") {\r\n <mt-icon-field [label]=\"f.label\" [formControl]=\"control\" />\r\n }\r\n @default {\r\n <!-- Composite + JSON types render their own label header -->\r\n <div class=\"db-style-field__composite flex flex-col gap-1.5\">\r\n <span class=\"text-sm font-medium text-color\">{{ f.label }}</span>\r\n @if (f.description) {\r\n <span class=\"text-xs text-muted-color\">{{ f.description }}</span>\r\n }\r\n @switch (f.type) {\r\n @case (\"segmented\") {\r\n <mt-segmented-field\r\n [options]=\"options()\"\r\n [value]=\"currentValue()\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"palette\") {\r\n <mt-color-list-field\r\n [value]=\"readColors()\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"colorList\") {\r\n <mt-color-list-field\r\n [value]=\"readColors()\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"arrayBuilder\") {\r\n <mt-array-builder-field\r\n [value]=\"readArray()\"\r\n [itemFields]=\"arrayItemFields()\"\r\n [itemTitleKey]=\"f.itemTitleKey\"\r\n [addLabel]=\"addLabel('Add item')\"\r\n [maxItems]=\"f.maxItems\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"conditionBuilder\") {\r\n <mt-array-builder-field\r\n [value]=\"readArray()\"\r\n [itemFields]=\"conditionFields()\"\r\n [addLabel]=\"addLabel('Add rule')\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"keyValueMap\") {\r\n <mt-key-value-map-field\r\n [value]=\"readMapOrArray()\"\r\n [keys]=\"mapKeys()\"\r\n [valueFields]=\"mapValueFields()\"\r\n [asArray]=\"f.asArray ?? false\"\r\n [collapsibleRows]=\"f.collapsibleRows ?? false\"\r\n [integratedLabels]=\"!!f.integratedLabelsPath\"\r\n [labelOverrides]=\"readIntegratedLabels()\"\r\n (valueChange)=\"emitValue($event)\"\r\n (labelOverridesChange)=\"onIntegratedLabelsChange($event)\"\r\n />\r\n }\r\n @case (\"legendOrder\") {\r\n <mt-legend-order-field\r\n [items]=\"legendItems()\"\r\n [colorOverrides]=\"readLegendColorOverrides()\"\r\n (valueChange)=\"emitValue($event)\"\r\n (colorChange)=\"onLegendColorChange($event)\"\r\n />\r\n }\r\n @case (\"entryColors\") {\r\n <!-- Colors only: no (valueChange), because there is no order to\r\n persist for this control's charts. -->\r\n <mt-legend-order-field\r\n [items]=\"legendItems()\"\r\n [colorOverrides]=\"readLegendColorOverrides()\"\r\n [localizedLabels]=\"readOverrideLabels()\"\r\n [reorderable]=\"false\"\r\n [showLocalizedLabels]=\"true\"\r\n [useItemKeyForColor]=\"true\"\r\n (colorChange)=\"onLegendColorChange($event)\"\r\n (localizedLabelChange)=\"onEntryLabelChange($event)\"\r\n />\r\n }\r\n @case (\"json\") {\r\n <mt-textarea-field\r\n rows=\"8\"\r\n placeholder=\"{ }\"\r\n [formControl]=\"jsonControl\"\r\n />\r\n @if (jsonError()) {\r\n <span class=\"text-xs text-red-600\">{{ jsonError() }}</span>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n}\r\n" }]
35124
35299
  }], ctorParameters: () => [], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], persisted: [{ type: i0.Input, args: [{ isSignal: true, alias: "persisted", required: true }] }], capability: [{ type: i0.Input, args: [{ isSignal: true, alias: "capability", required: false }] }], legendItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendItems", required: false }] }], patch: [{ type: i0.Output, args: ["patch"] }] } });
35125
35300
 
35126
35301
  /**
@@ -35143,6 +35318,17 @@ class StyleSettingsRenderer {
35143
35318
  patch = output();
35144
35319
  /** Emitted when the empty-state "switch to Advanced" affordance is used. */
35145
35320
  requestScope = output();
35321
+ /** Do not construct/serialize the full clientConfig editor on a mode switch. */
35322
+ advancedJsonOpen = signal(false, ...(ngDevMode ? [{ debugName: "advancedJsonOpen" }] : /* istanbul ignore next */ []));
35323
+ constructor() {
35324
+ effect(() => {
35325
+ if (this.scope() !== 'advanced')
35326
+ this.advancedJsonOpen.set(false);
35327
+ });
35328
+ }
35329
+ toggleAdvancedJson() {
35330
+ this.advancedJsonOpen.update((open) => !open);
35331
+ }
35146
35332
  /** Use the exact same section objects as the rail, without relocalizing. */
35147
35333
  sections = computed(() => {
35148
35334
  return this.visibleSections().map((section) => ({
@@ -35181,18 +35367,18 @@ class StyleSettingsRenderer {
35181
35367
  /** Clear every visible field in a section back to its (unset) default. */
35182
35368
  resetSection(entry) {
35183
35369
  for (const field of entry.fields) {
35184
- for (const patch of expandResetPatches(field.path, field.mirrorPaths)) {
35370
+ for (const patch of expandResetPatches(field.path, field.mirrorPaths, field.integratedLabelsPath)) {
35185
35371
  this.patch.emit(patch);
35186
35372
  }
35187
35373
  }
35188
35374
  }
35189
35375
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: StyleSettingsRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
35190
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: StyleSettingsRenderer, isStandalone: true, selector: "mt-style-settings-renderer", inputs: { visibleSections: { classPropertyName: "visibleSections", publicName: "visibleSections", isSignal: true, isRequired: true, transformFunction: null }, persisted: { classPropertyName: "persisted", publicName: "persisted", isSignal: true, isRequired: true, transformFunction: null }, capability: { classPropertyName: "capability", publicName: "capability", isSignal: true, isRequired: false, transformFunction: null }, scope: { classPropertyName: "scope", publicName: "scope", isSignal: true, isRequired: false, transformFunction: null }, legendItems: { classPropertyName: "legendItems", publicName: "legendItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { patch: "patch", requestScope: "requestScope" }, ngImport: i0, template: "<div class=\"db-style-renderer flex flex-col gap-4\">\r\n @for (entry of sections(); track entry.section.key) {\r\n <section\r\n [id]=\"sectionId(entry.section)\"\r\n class=\"db-style-section scroll-mt-4 overflow-hidden rounded-xl border border-surface-200 bg-surface-0\"\r\n [attr.data-domain]=\"entry.section.domain\"\r\n >\r\n <header\r\n class=\"flex items-center gap-2 border-b border-surface-200 bg-surface-50 px-4 py-3\"\r\n >\r\n <span\r\n class=\"flex h-7 w-7 items-center justify-center rounded-lg bg-primary-100 text-primary-600\"\r\n >\r\n <mt-icon [icon]=\"entry.section.icon\" class=\"text-base\" />\r\n </span>\r\n <div class=\"min-w-0 flex-1\">\r\n <h4\r\n class=\"truncate text-sm font-semibold text-color\"\r\n mtTruncateTooltip\r\n >\r\n {{ entry.section.label }}\r\n </h4>\r\n @if (entry.section.description) {\r\n <p class=\"truncate text-xs text-muted-color\" mtTruncateTooltip>\r\n {{ entry.section.description }}\r\n </p>\r\n }\r\n </div>\r\n <mt-button\r\n icon=\"arrow.refresh-ccw-01\"\r\n severity=\"secondary\"\r\n variant=\"text\"\r\n size=\"small\"\r\n [tooltip]=\"message('resetSection', 'Reset this section')\"\r\n (onClick)=\"resetSection(entry)\"\r\n />\r\n </header>\r\n\r\n @if (entry.controls.length) {\r\n <div class=\"grid grid-cols-1 gap-x-4 gap-y-3 p-4 lg:grid-cols-2\">\r\n @for (field of entry.controls; track field.key) {\r\n <div\r\n class=\"db-style-field flex flex-col\"\r\n [class.lg:col-span-2]=\"isComposite(field)\"\r\n >\r\n <mt-style-field\r\n [field]=\"field\"\r\n [persisted]=\"persisted()\"\r\n [capability]=\"capability()\"\r\n [legendItems]=\"legendItems()\"\r\n (patch)=\"onPatch($event)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Toggles grouped together on their own row, as cards -->\r\n @if (entry.toggles.length) {\r\n <div\r\n class=\"grid grid-cols-1 gap-3 px-4 pb-4 sm:grid-cols-2\"\r\n [class.pt-4]=\"!entry.controls.length\"\r\n >\r\n @for (field of entry.toggles; track field.key) {\r\n <mt-style-field\r\n [field]=\"field\"\r\n [persisted]=\"persisted()\"\r\n [capability]=\"capability()\"\r\n [legendItems]=\"legendItems()\"\r\n (patch)=\"onPatch($event)\"\r\n />\r\n }\r\n </div>\r\n }\r\n </section>\r\n }\r\n\r\n @if (isEmpty()) {\r\n <div\r\n class=\"flex flex-col items-center justify-center rounded-xl border border-dashed border-surface-300 bg-surface-0 p-8 text-center\"\r\n >\r\n <mt-icon\r\n icon=\"general.search-md\"\r\n class=\"mb-2 text-2xl text-muted-color\"\r\n />\r\n <p class=\"text-sm font-medium text-color\">\r\n {{ message(\"noMatchingSettings\", \"No matching settings\") }}\r\n </p>\r\n <p class=\"mt-1 mb-3 text-xs text-muted-color\">\r\n {{ message(\"tryDifferentSearch\", \"Try a different search term.\") }}\r\n </p>\r\n @if (scope() === \"simple\") {\r\n <mt-button\r\n [label]=\"message('showAdvancedSettings', 'Show advanced settings')\"\r\n icon=\"general.settings-01\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"requestScope.emit('advanced')\"\r\n />\r\n }\r\n </div>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { 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: StyleField, selector: "mt-style-field", inputs: ["field", "persisted", "capability", "legendItems"], outputs: ["patch"] }, { kind: "directive", type: TruncateTooltip, selector: "[mtTruncateTooltip]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
35376
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: StyleSettingsRenderer, isStandalone: true, selector: "mt-style-settings-renderer", inputs: { visibleSections: { classPropertyName: "visibleSections", publicName: "visibleSections", isSignal: true, isRequired: true, transformFunction: null }, persisted: { classPropertyName: "persisted", publicName: "persisted", isSignal: true, isRequired: true, transformFunction: null }, capability: { classPropertyName: "capability", publicName: "capability", isSignal: true, isRequired: false, transformFunction: null }, scope: { classPropertyName: "scope", publicName: "scope", isSignal: true, isRequired: false, transformFunction: null }, legendItems: { classPropertyName: "legendItems", publicName: "legendItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { patch: "patch", requestScope: "requestScope" }, ngImport: i0, template: "<div class=\"db-style-renderer flex flex-col gap-4\">\r\n @for (entry of sections(); track entry.section.key) {\r\n <section\r\n [id]=\"sectionId(entry.section)\"\r\n class=\"db-style-section scroll-mt-4 overflow-hidden rounded-xl border border-surface-200 bg-surface-0\"\r\n [attr.data-domain]=\"entry.section.domain\"\r\n >\r\n <header\r\n class=\"flex items-center gap-2 border-b border-surface-200 bg-surface-50 px-4 py-3\"\r\n >\r\n <span\r\n class=\"flex h-7 w-7 items-center justify-center rounded-lg bg-primary-100 text-primary-600\"\r\n >\r\n <mt-icon [icon]=\"entry.section.icon\" class=\"text-base\" />\r\n </span>\r\n <div class=\"min-w-0 flex-1\">\r\n <h4\r\n class=\"truncate text-sm font-semibold text-color\"\r\n mtTruncateTooltip\r\n >\r\n {{ entry.section.label }}\r\n </h4>\r\n @if (entry.section.description) {\r\n <p class=\"truncate text-xs text-muted-color\" mtTruncateTooltip>\r\n {{ entry.section.description }}\r\n </p>\r\n }\r\n </div>\r\n <mt-button\r\n icon=\"arrow.refresh-ccw-01\"\r\n severity=\"secondary\"\r\n variant=\"text\"\r\n size=\"small\"\r\n [tooltip]=\"message('resetSection', 'Reset this section')\"\r\n (onClick)=\"resetSection(entry)\"\r\n />\r\n </header>\r\n\r\n @if (entry.controls.length) {\r\n @if (entry.section.key === \"advanced-clientConfig\") {\r\n <button\r\n type=\"button\"\r\n class=\"m-4 rounded-lg border border-surface-200 px-3 py-2 text-start text-sm font-medium text-primary-600 hover:bg-surface-50 focus-visible:outline-2 focus-visible:outline-primary-500\"\r\n [attr.aria-expanded]=\"advancedJsonOpen()\"\r\n (click)=\"toggleAdvancedJson()\"\r\n >\r\n {{\r\n advancedJsonOpen()\r\n ? message(\"hideJsonEditor\", \"Hide JSON editor\")\r\n : message(\"openJsonEditor\", \"Open JSON editor\")\r\n }}\r\n </button>\r\n }\r\n @if (\r\n entry.section.key !== \"advanced-clientConfig\" || advancedJsonOpen()\r\n ) {\r\n <div\r\n class=\"grid grid-cols-1 gap-x-4 gap-y-3 p-4 lg:grid-cols-2\"\r\n [class.pt-0]=\"entry.section.key === 'advanced-clientConfig'\"\r\n >\r\n @for (field of entry.controls; track field.key) {\r\n <div\r\n class=\"db-style-field flex flex-col\"\r\n [class.lg:col-span-2]=\"isComposite(field)\"\r\n >\r\n <mt-style-field\r\n [field]=\"field\"\r\n [persisted]=\"persisted()\"\r\n [capability]=\"capability()\"\r\n [legendItems]=\"legendItems()\"\r\n (patch)=\"onPatch($event)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Toggles grouped together on their own row, as cards -->\r\n @if (entry.toggles.length) {\r\n <div\r\n class=\"grid grid-cols-1 gap-3 px-4 pb-4 sm:grid-cols-2\"\r\n [class.pt-4]=\"!entry.controls.length\"\r\n >\r\n @for (field of entry.toggles; track field.key) {\r\n <mt-style-field\r\n [field]=\"field\"\r\n [persisted]=\"persisted()\"\r\n [capability]=\"capability()\"\r\n [legendItems]=\"legendItems()\"\r\n (patch)=\"onPatch($event)\"\r\n />\r\n }\r\n </div>\r\n }\r\n </section>\r\n }\r\n\r\n @if (isEmpty()) {\r\n <div\r\n class=\"flex flex-col items-center justify-center rounded-xl border border-dashed border-surface-300 bg-surface-0 p-8 text-center\"\r\n >\r\n <mt-icon\r\n icon=\"general.search-md\"\r\n class=\"mb-2 text-2xl text-muted-color\"\r\n />\r\n <p class=\"text-sm font-medium text-color\">\r\n {{ message(\"noMatchingSettings\", \"No matching settings\") }}\r\n </p>\r\n <p class=\"mt-1 mb-3 text-xs text-muted-color\">\r\n {{ message(\"tryDifferentSearch\", \"Try a different search term.\") }}\r\n </p>\r\n @if (scope() === \"simple\") {\r\n <mt-button\r\n [label]=\"message('showAdvancedSettings', 'Show advanced settings')\"\r\n icon=\"general.settings-01\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"requestScope.emit('advanced')\"\r\n />\r\n }\r\n </div>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { 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: StyleField, selector: "mt-style-field", inputs: ["field", "persisted", "capability", "legendItems"], outputs: ["patch"] }, { kind: "directive", type: TruncateTooltip, selector: "[mtTruncateTooltip]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
35191
35377
  }
35192
35378
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: StyleSettingsRenderer, decorators: [{
35193
35379
  type: Component,
35194
- args: [{ selector: 'mt-style-settings-renderer', standalone: true, imports: [CommonModule, Icon, Button, StyleField, TruncateTooltip], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"db-style-renderer flex flex-col gap-4\">\r\n @for (entry of sections(); track entry.section.key) {\r\n <section\r\n [id]=\"sectionId(entry.section)\"\r\n class=\"db-style-section scroll-mt-4 overflow-hidden rounded-xl border border-surface-200 bg-surface-0\"\r\n [attr.data-domain]=\"entry.section.domain\"\r\n >\r\n <header\r\n class=\"flex items-center gap-2 border-b border-surface-200 bg-surface-50 px-4 py-3\"\r\n >\r\n <span\r\n class=\"flex h-7 w-7 items-center justify-center rounded-lg bg-primary-100 text-primary-600\"\r\n >\r\n <mt-icon [icon]=\"entry.section.icon\" class=\"text-base\" />\r\n </span>\r\n <div class=\"min-w-0 flex-1\">\r\n <h4\r\n class=\"truncate text-sm font-semibold text-color\"\r\n mtTruncateTooltip\r\n >\r\n {{ entry.section.label }}\r\n </h4>\r\n @if (entry.section.description) {\r\n <p class=\"truncate text-xs text-muted-color\" mtTruncateTooltip>\r\n {{ entry.section.description }}\r\n </p>\r\n }\r\n </div>\r\n <mt-button\r\n icon=\"arrow.refresh-ccw-01\"\r\n severity=\"secondary\"\r\n variant=\"text\"\r\n size=\"small\"\r\n [tooltip]=\"message('resetSection', 'Reset this section')\"\r\n (onClick)=\"resetSection(entry)\"\r\n />\r\n </header>\r\n\r\n @if (entry.controls.length) {\r\n <div class=\"grid grid-cols-1 gap-x-4 gap-y-3 p-4 lg:grid-cols-2\">\r\n @for (field of entry.controls; track field.key) {\r\n <div\r\n class=\"db-style-field flex flex-col\"\r\n [class.lg:col-span-2]=\"isComposite(field)\"\r\n >\r\n <mt-style-field\r\n [field]=\"field\"\r\n [persisted]=\"persisted()\"\r\n [capability]=\"capability()\"\r\n [legendItems]=\"legendItems()\"\r\n (patch)=\"onPatch($event)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Toggles grouped together on their own row, as cards -->\r\n @if (entry.toggles.length) {\r\n <div\r\n class=\"grid grid-cols-1 gap-3 px-4 pb-4 sm:grid-cols-2\"\r\n [class.pt-4]=\"!entry.controls.length\"\r\n >\r\n @for (field of entry.toggles; track field.key) {\r\n <mt-style-field\r\n [field]=\"field\"\r\n [persisted]=\"persisted()\"\r\n [capability]=\"capability()\"\r\n [legendItems]=\"legendItems()\"\r\n (patch)=\"onPatch($event)\"\r\n />\r\n }\r\n </div>\r\n }\r\n </section>\r\n }\r\n\r\n @if (isEmpty()) {\r\n <div\r\n class=\"flex flex-col items-center justify-center rounded-xl border border-dashed border-surface-300 bg-surface-0 p-8 text-center\"\r\n >\r\n <mt-icon\r\n icon=\"general.search-md\"\r\n class=\"mb-2 text-2xl text-muted-color\"\r\n />\r\n <p class=\"text-sm font-medium text-color\">\r\n {{ message(\"noMatchingSettings\", \"No matching settings\") }}\r\n </p>\r\n <p class=\"mt-1 mb-3 text-xs text-muted-color\">\r\n {{ message(\"tryDifferentSearch\", \"Try a different search term.\") }}\r\n </p>\r\n @if (scope() === \"simple\") {\r\n <mt-button\r\n [label]=\"message('showAdvancedSettings', 'Show advanced settings')\"\r\n icon=\"general.settings-01\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"requestScope.emit('advanced')\"\r\n />\r\n }\r\n </div>\r\n }\r\n</div>\r\n" }]
35195
- }], propDecorators: { visibleSections: [{ type: i0.Input, args: [{ isSignal: true, alias: "visibleSections", required: true }] }], persisted: [{ type: i0.Input, args: [{ isSignal: true, alias: "persisted", required: true }] }], capability: [{ type: i0.Input, args: [{ isSignal: true, alias: "capability", required: false }] }], scope: [{ type: i0.Input, args: [{ isSignal: true, alias: "scope", required: false }] }], legendItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendItems", required: false }] }], patch: [{ type: i0.Output, args: ["patch"] }], requestScope: [{ type: i0.Output, args: ["requestScope"] }] } });
35380
+ args: [{ selector: 'mt-style-settings-renderer', standalone: true, imports: [CommonModule, Icon, Button, StyleField, TruncateTooltip], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"db-style-renderer flex flex-col gap-4\">\r\n @for (entry of sections(); track entry.section.key) {\r\n <section\r\n [id]=\"sectionId(entry.section)\"\r\n class=\"db-style-section scroll-mt-4 overflow-hidden rounded-xl border border-surface-200 bg-surface-0\"\r\n [attr.data-domain]=\"entry.section.domain\"\r\n >\r\n <header\r\n class=\"flex items-center gap-2 border-b border-surface-200 bg-surface-50 px-4 py-3\"\r\n >\r\n <span\r\n class=\"flex h-7 w-7 items-center justify-center rounded-lg bg-primary-100 text-primary-600\"\r\n >\r\n <mt-icon [icon]=\"entry.section.icon\" class=\"text-base\" />\r\n </span>\r\n <div class=\"min-w-0 flex-1\">\r\n <h4\r\n class=\"truncate text-sm font-semibold text-color\"\r\n mtTruncateTooltip\r\n >\r\n {{ entry.section.label }}\r\n </h4>\r\n @if (entry.section.description) {\r\n <p class=\"truncate text-xs text-muted-color\" mtTruncateTooltip>\r\n {{ entry.section.description }}\r\n </p>\r\n }\r\n </div>\r\n <mt-button\r\n icon=\"arrow.refresh-ccw-01\"\r\n severity=\"secondary\"\r\n variant=\"text\"\r\n size=\"small\"\r\n [tooltip]=\"message('resetSection', 'Reset this section')\"\r\n (onClick)=\"resetSection(entry)\"\r\n />\r\n </header>\r\n\r\n @if (entry.controls.length) {\r\n @if (entry.section.key === \"advanced-clientConfig\") {\r\n <button\r\n type=\"button\"\r\n class=\"m-4 rounded-lg border border-surface-200 px-3 py-2 text-start text-sm font-medium text-primary-600 hover:bg-surface-50 focus-visible:outline-2 focus-visible:outline-primary-500\"\r\n [attr.aria-expanded]=\"advancedJsonOpen()\"\r\n (click)=\"toggleAdvancedJson()\"\r\n >\r\n {{\r\n advancedJsonOpen()\r\n ? message(\"hideJsonEditor\", \"Hide JSON editor\")\r\n : message(\"openJsonEditor\", \"Open JSON editor\")\r\n }}\r\n </button>\r\n }\r\n @if (\r\n entry.section.key !== \"advanced-clientConfig\" || advancedJsonOpen()\r\n ) {\r\n <div\r\n class=\"grid grid-cols-1 gap-x-4 gap-y-3 p-4 lg:grid-cols-2\"\r\n [class.pt-0]=\"entry.section.key === 'advanced-clientConfig'\"\r\n >\r\n @for (field of entry.controls; track field.key) {\r\n <div\r\n class=\"db-style-field flex flex-col\"\r\n [class.lg:col-span-2]=\"isComposite(field)\"\r\n >\r\n <mt-style-field\r\n [field]=\"field\"\r\n [persisted]=\"persisted()\"\r\n [capability]=\"capability()\"\r\n [legendItems]=\"legendItems()\"\r\n (patch)=\"onPatch($event)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Toggles grouped together on their own row, as cards -->\r\n @if (entry.toggles.length) {\r\n <div\r\n class=\"grid grid-cols-1 gap-3 px-4 pb-4 sm:grid-cols-2\"\r\n [class.pt-4]=\"!entry.controls.length\"\r\n >\r\n @for (field of entry.toggles; track field.key) {\r\n <mt-style-field\r\n [field]=\"field\"\r\n [persisted]=\"persisted()\"\r\n [capability]=\"capability()\"\r\n [legendItems]=\"legendItems()\"\r\n (patch)=\"onPatch($event)\"\r\n />\r\n }\r\n </div>\r\n }\r\n </section>\r\n }\r\n\r\n @if (isEmpty()) {\r\n <div\r\n class=\"flex flex-col items-center justify-center rounded-xl border border-dashed border-surface-300 bg-surface-0 p-8 text-center\"\r\n >\r\n <mt-icon\r\n icon=\"general.search-md\"\r\n class=\"mb-2 text-2xl text-muted-color\"\r\n />\r\n <p class=\"text-sm font-medium text-color\">\r\n {{ message(\"noMatchingSettings\", \"No matching settings\") }}\r\n </p>\r\n <p class=\"mt-1 mb-3 text-xs text-muted-color\">\r\n {{ message(\"tryDifferentSearch\", \"Try a different search term.\") }}\r\n </p>\r\n @if (scope() === \"simple\") {\r\n <mt-button\r\n [label]=\"message('showAdvancedSettings', 'Show advanced settings')\"\r\n icon=\"general.settings-01\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"requestScope.emit('advanced')\"\r\n />\r\n }\r\n </div>\r\n }\r\n</div>\r\n" }]
35381
+ }], ctorParameters: () => [], propDecorators: { visibleSections: [{ type: i0.Input, args: [{ isSignal: true, alias: "visibleSections", required: true }] }], persisted: [{ type: i0.Input, args: [{ isSignal: true, alias: "persisted", required: true }] }], capability: [{ type: i0.Input, args: [{ isSignal: true, alias: "capability", required: false }] }], scope: [{ type: i0.Input, args: [{ isSignal: true, alias: "scope", required: false }] }], legendItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendItems", required: false }] }], patch: [{ type: i0.Output, args: ["patch"] }], requestScope: [{ type: i0.Output, args: ["requestScope"] }] } });
35196
35382
 
35197
35383
  /**
35198
35384
  * The Style Studio only needs enough timeline rows to demonstrate its visual
@@ -35336,6 +35522,7 @@ class StyleStudioDrawer {
35336
35522
  /** The live preview viewer; only its content shows refresh feedback. */
35337
35523
  previewViewer = viewChild(ChartViewer, ...(ngDevMode ? [{ debugName: "previewViewer" }] : /* istanbul ignore next */ []));
35338
35524
  previewSyncTimer = null;
35525
+ scrollSpyFrame = null;
35339
35526
  constructor() {
35340
35527
  const configItem = this.drawerConfig.data?.item;
35341
35528
  if (configItem) {
@@ -35346,6 +35533,8 @@ class StyleStudioDrawer {
35346
35533
  this.destroyRef.onDestroy(() => {
35347
35534
  if (this.previewSyncTimer)
35348
35535
  clearTimeout(this.previewSyncTimer);
35536
+ if (this.scrollSpyFrame !== null)
35537
+ cancelAnimationFrame(this.scrollSpyFrame);
35349
35538
  this.itemStoreService.clearItemStore(this.previewId);
35350
35539
  });
35351
35540
  // Seed the isolated preview store from the real chart's cached data so the
@@ -35384,7 +35573,8 @@ class StyleStudioDrawer {
35384
35573
  // Highlight the first section as soon as the rail is known.
35385
35574
  effect(() => {
35386
35575
  const sections = this.navSections();
35387
- if (sections.length && !this.activeSection()) {
35576
+ if (sections.length &&
35577
+ !sections.some((section) => section.key === this.activeSection())) {
35388
35578
  this.activeSection.set(sections[0].key);
35389
35579
  }
35390
35580
  });
@@ -35655,6 +35845,14 @@ class StyleStudioDrawer {
35655
35845
  }
35656
35846
  /** Scroll-spy: highlight the top-most section currently in view. */
35657
35847
  onScroll() {
35848
+ if (this.scrollSpyFrame !== null)
35849
+ return;
35850
+ this.scrollSpyFrame = requestAnimationFrame(() => {
35851
+ this.scrollSpyFrame = null;
35852
+ this.updateActiveSectionFromScroll();
35853
+ });
35854
+ }
35855
+ updateActiveSectionFromScroll() {
35658
35856
  const pane = this.scrollPane()?.nativeElement;
35659
35857
  if (!pane)
35660
35858
  return;
@@ -35694,7 +35892,7 @@ class StyleStudioDrawer {
35694
35892
  const patches = [];
35695
35893
  for (const section of this.schema().sections) {
35696
35894
  for (const field of section.fields) {
35697
- patches.push(...expandResetPatches(field.path, field.mirrorPaths));
35895
+ patches.push(...expandResetPatches(field.path, field.mirrorPaths, field.integratedLabelsPath));
35698
35896
  }
35699
35897
  }
35700
35898
  this.item.set({
@@ -37496,6 +37694,98 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
37496
37694
  ], template: "<div\r\n class=\"flex flex-col gap-4\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n [formGroup]=\"queryForm\"\r\n>\r\n <!-- Category Property (shown for certain chart types) -->\r\n @if (shouldShowField(\"categoryProperty\")) {\r\n <div class=\"mb-2\">\r\n <mt-select-field\r\n [label]=\"t('categoryProperty')\"\r\n formControlName=\"categoryProperty\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectCategoryProperty')\"\r\n [filter]=\"true\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Add Series Button -->\r\n @if (chartType() !== \"overview\" || seriesArray.length === 0) {\r\n <div class=\"flex justify-end\">\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addSeries')\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addSeries()\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Series List -->\r\n <div formArrayName=\"series\" class=\"flex flex-col gap-4\">\r\n @for (\r\n series of seriesArray.controls;\r\n track trackByIndex(i);\r\n let i = $index\r\n ) {\r\n <div\r\n class=\"p-4 rounded-lg border transition-all\"\r\n [class.border-red-500]=\"series.invalid\"\r\n [class.border-surface-200]=\"!series.invalid\"\r\n [formGroupName]=\"i\"\r\n >\r\n <!-- Series Header -->\r\n <div class=\"flex items-center justify-between mb-4\">\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-600 text-sm font-semibold\"\r\n >\r\n {{ i + 1 }}\r\n </span>\r\n <span class=\"text-sm font-medium text-muted-color\">{{\r\n t(\"series\")\r\n }}</span>\r\n </div>\r\n <div class=\"flex items-center gap-2\">\r\n @if (shouldShowField(\"formula\")) {\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex min-h-8 items-center justify-center gap-1.5 rounded-md border border-surface-300 bg-surface-0 px-3 py-1.5 text-sm font-medium text-color transition-colors hover:border-primary-400 hover:bg-primary-50 hover:text-primary-700 disabled:cursor-not-allowed disabled:opacity-50\"\r\n [id]=\"advancedSettingsToggleId(i)\"\r\n [attr.aria-expanded]=\"\r\n series.value.showAdvancedSettings ? 'true' : 'false'\r\n \"\r\n [attr.aria-controls]=\"advancedSettingsPanelId(i)\"\r\n [disabled]=\"disabled\"\r\n (click)=\"toggleAdvanced(i)\"\r\n >\r\n <mt-icon\r\n icon=\"general.settings-02\"\r\n class=\"text-base\"\r\n aria-hidden=\"true\"\r\n />\r\n <span>\r\n {{\r\n t(\r\n advancedSettingsActionKey(\r\n series.value.showAdvancedSettings\r\n )\r\n )\r\n }}\r\n </span>\r\n </button>\r\n }\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"deleteSeries(i)\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4\">\r\n <!-- Auto Stack Toggle -->\r\n @if (shouldShowField(\"autoStack\")) {\r\n <div class=\"md:col-span-2 lg:col-span-3\">\r\n <mt-toggle-field\r\n [label]=\"t('autoStack')\"\r\n formControlName=\"autoStack\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Value Property -->\r\n @if (shouldShowField(\"valueProperty\") || series.value.autoStack) {\r\n <mt-select-field\r\n [label]=\"t('valueProperty')\"\r\n formControlName=\"valueProperty\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectValueProperty')\"\r\n [filter]=\"true\"\r\n />\r\n }\r\n\r\n <!-- Aggregate Function -->\r\n @if (shouldShowField(\"aggregateFunction\")) {\r\n <mt-select-field\r\n [label]=\"t('aggregateFunction')\"\r\n formControlName=\"aggregateFunction\"\r\n [options]=\"aggregateFunctions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n }\r\n\r\n <!-- Color Picker -->\r\n @if (shouldShowField(\"color\")) {\r\n <mt-color-picker-field\r\n [label]=\"t('seriesColor')\"\r\n formControlName=\"color\"\r\n />\r\n }\r\n\r\n <!-- Bar Type (for stacked bar charts) -->\r\n @if (shouldShowField(\"barType\")) {\r\n <mt-select-field\r\n [label]=\"t('barType')\"\r\n formControlName=\"barType\"\r\n [options]=\"barTypes\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n />\r\n }\r\n\r\n <!-- Auto Stack By Property -->\r\n @if (\r\n shouldShowField(\"autoStackByProperty\") && series.value.autoStack\r\n ) {\r\n <mt-select-field\r\n [label]=\"t('autoStackByProperty')\"\r\n formControlName=\"autoStackByProperty\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n }\r\n\r\n <!-- Group By Properties -->\r\n @if (shouldShowField(\"groupByProperties\")) {\r\n <div class=\"col-span-full\">\r\n <mt-string-array-input\r\n [label]=\"t('groupByProperties')\"\r\n formControlName=\"groupByProperties\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n [placeholder]=\"t('selectProperties')\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Stack Properties (for stacked charts) -->\r\n @if (shouldShowField(\"stackProperties\") && !series.value.autoStack) {\r\n <div class=\"col-span-full\">\r\n <mt-string-array-input\r\n [label]=\"t('stackProperties')\"\r\n formControlName=\"stackProperties\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n [placeholder]=\"t('selectProperties')\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Extra Properties -->\r\n @if (shouldShowField(\"extraProperties\")) {\r\n <div class=\"col-span-full\">\r\n <mt-string-array-input\r\n [label]=\"t('extraProperties')\"\r\n formControlName=\"extraProperties\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n [placeholder]=\"t('selectProperties')\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Advanced Settings (Formula) -->\r\n @if (series.value.showAdvancedSettings && shouldShowField(\"formula\")) {\r\n <div\r\n [id]=\"advancedSettingsPanelId(i)\"\r\n role=\"region\"\r\n [attr.aria-labelledby]=\"advancedSettingsToggleId(i)\"\r\n class=\"mt-4 p-3 bg-surface-50 rounded-lg border border-surface-200\"\r\n >\r\n <div class=\"text-sm font-medium mb-2\">\r\n {{ t(\"advancedSettings\") }}\r\n </div>\r\n <label class=\"mb-2 block text-sm font-medium\">\r\n {{ t(\"formula\") }}\r\n </label>\r\n <mt-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-2\">\r\n <mt-select-field\r\n [label]=\"j === 0 ? t('operator') : ''\"\r\n formControlName=\"operator\"\r\n [options]=\"operators\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n </div>\r\n\r\n <!-- Value -->\r\n <div class=\"col-span-4\">\r\n <mt-text-field\r\n [label]=\"j === 0 ? t('value') : ''\"\r\n formControlName=\"value\"\r\n [placeholder]=\"t('enterValue')\"\r\n />\r\n </div>\r\n\r\n <!-- Remove Filter -->\r\n <div class=\"col-span-2 flex items-end justify-end pb-1\">\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"removeFilter(i, j)\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (getFilters(series).length === 0) {\r\n <div class=\"text-center py-3 text-muted-color text-sm\">\r\n {{ t(\"noFiltersConfigured\") }}\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n @if (seriesArray.length === 0) {\r\n <div\r\n class=\"text-center py-8 text-muted-color border border-dashed border-surface-300 rounded-lg\"\r\n >\r\n <i class=\"mti mti-chart-bar text-3xl mb-2 block\"></i>\r\n <p class=\"mb-2\">{{ t(\"noSeriesConfigured\") }}</p>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addSeries')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addSeries()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n" }]
37497
37695
  }], 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 }] }] } });
37498
37696
 
37697
+ /** The backend's LineChart route accepts one BarChartQuery, not series[]. */
37698
+ class LineChartQuery {
37699
+ fb = inject(FormBuilder);
37700
+ propertiesFlat = input([], ...(ngDevMode ? [{ debugName: "propertiesFlat" }] : /* istanbul ignore next */ []));
37701
+ propertiesGrouped = input([], ...(ngDevMode ? [{ debugName: "propertiesGrouped" }] : /* istanbul ignore next */ []));
37702
+ useGroupedSelect = computed(() => this.propertiesGrouped().length > 1, ...(ngDevMode ? [{ debugName: "useGroupedSelect" }] : /* istanbul ignore next */ []));
37703
+ aggregateFunctions = [
37704
+ { value: 'Sum', label: 'Sum' },
37705
+ { value: 'Avg', label: 'Average' },
37706
+ { value: 'Count', label: 'Count' },
37707
+ ];
37708
+ queryForm = this.fb.nonNullable.group({
37709
+ xAxisProperty: '',
37710
+ yAxisProperty: '',
37711
+ function: 'Sum',
37712
+ extraProperties: [[]],
37713
+ });
37714
+ onChange = () => { };
37715
+ onTouched = () => { };
37716
+ constructor() {
37717
+ this.queryForm.valueChanges.subscribe(() => {
37718
+ this.onChange(this.queryForm.getRawValue());
37719
+ this.onTouched();
37720
+ });
37721
+ }
37722
+ writeValue(value) {
37723
+ if (!value)
37724
+ return;
37725
+ const next = {
37726
+ xAxisProperty: value.xAxisProperty || '',
37727
+ yAxisProperty: value.yAxisProperty || '',
37728
+ function: value.function || 'Sum',
37729
+ extraProperties: value.extraProperties || [],
37730
+ };
37731
+ // ngModel feeds the emitted value back; never create a valueChanges loop.
37732
+ if (JSON.stringify(next) === JSON.stringify(this.queryForm.getRawValue()))
37733
+ return;
37734
+ this.queryForm.setValue(next, { emitEvent: false });
37735
+ }
37736
+ registerOnChange(fn) {
37737
+ this.onChange = fn;
37738
+ }
37739
+ registerOnTouched(fn) {
37740
+ this.onTouched = fn;
37741
+ }
37742
+ setDisabledState(disabled) {
37743
+ if (disabled)
37744
+ this.queryForm.disable({ emitEvent: false });
37745
+ else
37746
+ this.queryForm.enable({ emitEvent: false });
37747
+ }
37748
+ validate() {
37749
+ const query = this.queryForm.getRawValue();
37750
+ return query.xAxisProperty && query.yAxisProperty
37751
+ ? null
37752
+ : { lineChartQueryInvalid: true };
37753
+ }
37754
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LineChartQuery, deps: [], target: i0.ɵɵFactoryTarget.Component });
37755
+ 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: [
37756
+ {
37757
+ provide: NG_VALUE_ACCESSOR,
37758
+ useExisting: forwardRef(() => LineChartQuery),
37759
+ multi: true,
37760
+ },
37761
+ {
37762
+ provide: NG_VALIDATORS,
37763
+ useExisting: forwardRef(() => LineChartQuery),
37764
+ multi: true,
37765
+ },
37766
+ ], 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 <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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
37767
+ }
37768
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LineChartQuery, decorators: [{
37769
+ type: Component,
37770
+ args: [{ selector: 'mt-line-chart-query', standalone: true, imports: [
37771
+ ReactiveFormsModule,
37772
+ TranslocoDirective,
37773
+ SelectField,
37774
+ StringArrayInput,
37775
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
37776
+ {
37777
+ provide: NG_VALUE_ACCESSOR,
37778
+ useExisting: forwardRef(() => LineChartQuery),
37779
+ multi: true,
37780
+ },
37781
+ {
37782
+ provide: NG_VALIDATORS,
37783
+ useExisting: forwardRef(() => LineChartQuery),
37784
+ multi: true,
37785
+ },
37786
+ ], 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 <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" }]
37787
+ }], ctorParameters: () => [], propDecorators: { propertiesFlat: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesFlat", required: false }] }], propertiesGrouped: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesGrouped", required: false }] }] } });
37788
+
37499
37789
  /**
37500
37790
  * Table Query Component
37501
37791
  *
@@ -39211,6 +39501,10 @@ class DataSourceSettings {
39211
39501
  this.query.set(query);
39212
39502
  this.serviceConfigChange.emit({ query });
39213
39503
  }
39504
+ onLineChartQueryChange(query) {
39505
+ this.query.set(query);
39506
+ this.serviceConfigChange.emit({ query });
39507
+ }
39214
39508
  /**
39215
39509
  * Handle table query change
39216
39510
  */
@@ -39664,7 +39958,7 @@ class DataSourceSettings {
39664
39958
  };
39665
39959
  }
39666
39960
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DataSourceSettings, deps: [], target: i0.ɵɵFactoryTarget.Component });
39667
- 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 <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 (\"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 [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 (\"phaseGate\") {\r\n <div class=\"flex flex-col gap-2\">\r\n <mt-text-field\r\n [label]=\"t('levelId')\"\r\n [ngModel]=\"phaseGateLevelId()\"\r\n (ngModelChange)=\"onPhaseGateLevelIdChange($event)\"\r\n />\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"phaseGateLevelIdHint\") }}\r\n </p>\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: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { 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: 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"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
39961
+ 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 <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 [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 (\"phaseGate\") {\r\n <div class=\"flex flex-col gap-2\">\r\n <mt-text-field\r\n [label]=\"t('levelId')\"\r\n [ngModel]=\"phaseGateLevelId()\"\r\n (ngModelChange)=\"onPhaseGateLevelIdChange($event)\"\r\n />\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"phaseGateLevelIdHint\") }}\r\n </p>\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: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { 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"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
39668
39962
  }
39669
39963
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DataSourceSettings, decorators: [{
39670
39964
  type: Component,
@@ -39684,6 +39978,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
39684
39978
  SourceLinkConfiguration,
39685
39979
  CustomApiConfiguration,
39686
39980
  GeneralQuery,
39981
+ LineChartQuery,
39687
39982
  TableQuery,
39688
39983
  TimelineQuery,
39689
39984
  PropertiesQuery,
@@ -39692,7 +39987,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
39692
39987
  SplitterQuery,
39693
39988
  InformativeContextSelection,
39694
39989
  StringArrayInput,
39695
- ], 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 <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 (\"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 [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 (\"phaseGate\") {\r\n <div class=\"flex flex-col gap-2\">\r\n <mt-text-field\r\n [label]=\"t('levelId')\"\r\n [ngModel]=\"phaseGateLevelId()\"\r\n (ngModelChange)=\"onPhaseGateLevelIdChange($event)\"\r\n />\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"phaseGateLevelIdHint\") }}\r\n </p>\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" }]
39990
+ ], 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 <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 [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 (\"phaseGate\") {\r\n <div class=\"flex flex-col gap-2\">\r\n <mt-text-field\r\n [label]=\"t('levelId')\"\r\n [ngModel]=\"phaseGateLevelId()\"\r\n (ngModelChange)=\"onPhaseGateLevelIdChange($event)\"\r\n />\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"phaseGateLevelIdHint\") }}\r\n </p>\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" }]
39696
39991
  }], 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"] }] } });
39697
39992
 
39698
39993
  /**
@@ -51681,4 +51976,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
51681
51976
  */
51682
51977
 
51683
51978
  export { BarChartHandler as $, mergePropertyAppearance as A, EntityPreviewCardComponent as B, CardContentComponent as C, DashboardItemStoreService as D, EChartComponent as E, FilterUtilsService as F, ListStatisticCardComponent as G, HeaderCardComponent as H, MAP_FALLBACK_COLORS as I, isPlottable as J, plottableGroups as K, LastHistoryLevelCardComponent as L, MAP_MARKER_PATH as M, buildMapChartOption as N, MAP_REGIONS as O, PropertiesCardComponent as P, DEFAULT_MAP_REGION_KEY as Q, MAP_DATA_ATTRIBUTION as R, StaticFiltersComponent as S, resolveMapRegion as T, MapViewComponent as U, SkeletonCardComponent as V, resolveStatisticIconPlacement as W, StatisticCardComponent as X, TableCardComponent as Y, TopbarCardComponent as Z, ChartDataService as _, DashboardItem as a, LegendOrderField as a$, PieChartHandler as a0, StackBarChartHandler as a1, axisFormatters as a2, groupDatesByYearAndMonth as a3, GaugeChartHandler as a4, TableViewHandler as a5, OverviewCardHandler as a6, TimelineHandler as a7, LineChartHandler as a8, SnapshotHandler as a9, DashboardStoreService as aA, isManagePagesDeleteResult as aB, ManagePages as aC, ManageBreadcrumb as aD, ManageFilterOnPage as aE, DynamicFiltersConfig as aF, ChartSettingsDrawer as aG, DisplaySettings as aH, DefaultControlUi as aI, PieControlUi as aJ, BarControlUi as aK, StackBarControlUi as aL, ManageItem as aM, CHART_TYPES as aN, ManageItemService as aO, GeneralSettings as aP, DataSourceSettings as aQ, ActionsSettings as aR, ChartViewer as aS, StyleStudioDrawer as aT, StyleSettingsRenderer as aU, expandResetPatches as aV, StyleField as aW, SegmentedField as aX, ColorListField as aY, ArrayBuilderField as aZ, KeyValueMapField as a_, ComparisonChartHandler as aa, SplitterChartHandler as ab, LevelCardHandler as ac, MapChartHandler as ad, RingGaugeChartHandler as ae, SPlusChartHandler as af, PhaseGateStepperHandler as ag, formatCurrency as ah, getCurrencySuffix as ai, formatPercentage as aj, formatNumber as ak, formatDate as al, createAxisFormatter as am, createTooltipFormatter as an, formatAxisLabel as ao, formatWordsUnderBar as ap, formatXAxis as aq, handleFiltersForCustom as ar, handleFilterForCard as as, handleFilterForSnapshot as at, DashboardList as au, MODULE_CLASSIFICATION_LOG as av, MODULE_CLASSIFICATION_LOG_NAME as aw, isLogClassification as ax, HTTPMethod as ay, DashboardBuilderService as az, DashboardDialogHeader as b, listControlSchemas as b$, ItemCardMenuComponent as b0, ChartFilterDrawer as b1, ItemContextToolbarComponent as b2, ItemConfigPopoverComponent as b3, GuidedConfigDialogComponent as b4, FilterChipsBarComponent as b5, FilterBuilderComponent as b6, DatasourcePanelComponent as b7, SchemaControlRendererComponent as b8, FilterByGroupPipe as b9, styleToUi as bA, applyStyleToPersisted as bB, layoutToUi as bC, applyLayoutToPersisted as bD, labelLegendFormatToUi as bE, applyLabelLegendFormatToPersisted as bF, behaviorToUi as bG, applyBehaviorToPersisted as bH, applyFilterChipsToPersisted as bI, persistedToUi as bJ, buildAssembly as bK, STYLE_PRESETS as bL, presetsForCapability as bM, findPreset as bN, validate as bO, hasBlockingIssues as bP, groupIssuesByDomain as bQ, parseAdvancedJson as bR, deepMerge$1 as bS, formatForEditor as bT, CUSTOM_COLOR_OPTION as bU, readByPath$1 as bV, setByPath as bW, applyControlPatchToPersisted as bX, applyControlPatchesToPersisted as bY, getControlSchema as bZ, listControlSchemaIds as b_, GetChartActionsPipe as ba, CHART_CAPABILITIES as bb, getCapabilityById as bc, resolveCapability as bd, toBackendChartType as be, normalizeChartTypeForRequest as bf, normalizeFilterOperation as bg, normalizeAggregateFunction as bh, normalizeFilters as bi, selectorFromLegacy as bj, moduleIdFromSelector as bk, toBackendSourceLink as bl, toFormSourceLink as bm, normalizeOnLoad as bn, normalizeBeforeSave as bo, normalizeBeforeRequest as bp, CONFIG_DOMAINS as bq, domainsForCapability as br, findDomain as bs, POPOVER_TABS as bt, POPOVER_TAB_SPECS as bu, titleToUi as bv, applyTitleToPersisted as bw, datasourceToUi as bx, fieldsToUi as by, filtersToUi as bz, cloneDeep$1 as c, getFallbackControlSchema as c0, flattenSchema as c1, resolveDisplayFields as c2, buildDisplayFieldPredicate as c3, bindingKey as c4, getBinding as c5, listBindings as c6, listBindingsForChart as c7, readBoundValue as c8, ITEM_GUIDANCE_REGISTRY as c9, describeGuidance as ca, ItemGuidanceService as cb, 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, EntityInfoComponent as y, normalizeDashboardCardEntityValue as z };
51684
- //# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-D8g_x5LK.mjs.map
51979
+ //# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-oJge6v9b.mjs.map