@acorex-platform/module-dashboard-management-client 0.0.38 → 0.0.48

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.
Files changed (41) hide show
  1. package/fesm2022/{acorex-platform-module-dashboard-management-client-acorex-platform-module-dashboard-management-client-BUmHWNqL.mjs → acorex-platform-module-dashboard-management-client-acorex-platform-module-dashboard-management-client-61Q_QY8l.mjs} +976 -2957
  2. package/fesm2022/acorex-platform-module-dashboard-management-client-acorex-platform-module-dashboard-management-client-61Q_QY8l.mjs.map +1 -0
  3. package/fesm2022/acorex-platform-module-dashboard-management-client-bar-chart-widget.component-kw130ESN.mjs +151 -0
  4. package/fesm2022/acorex-platform-module-dashboard-management-client-bar-chart-widget.component-kw130ESN.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-module-dashboard-management-client-chart-card-widget.component-B2ztaswG.mjs +126 -0
  6. package/fesm2022/acorex-platform-module-dashboard-management-client-chart-card-widget.component-B2ztaswG.mjs.map +1 -0
  7. package/fesm2022/acorex-platform-module-dashboard-management-client-chart-configurator-widget-column.component-DxNKy3bB.mjs +76 -0
  8. package/fesm2022/acorex-platform-module-dashboard-management-client-chart-configurator-widget-column.component-DxNKy3bB.mjs.map +1 -0
  9. package/fesm2022/acorex-platform-module-dashboard-management-client-chart-configurator-widget-edit.component-BgR51eZ1.mjs +559 -0
  10. package/fesm2022/acorex-platform-module-dashboard-management-client-chart-configurator-widget-edit.component-BgR51eZ1.mjs.map +1 -0
  11. package/fesm2022/acorex-platform-module-dashboard-management-client-chart-legend.util-C1zqTQEf.mjs +31 -0
  12. package/fesm2022/acorex-platform-module-dashboard-management-client-chart-legend.util-C1zqTQEf.mjs.map +1 -0
  13. package/fesm2022/acorex-platform-module-dashboard-management-client-chart-widget-data.util-BLtv9sOm.mjs +589 -0
  14. package/fesm2022/acorex-platform-module-dashboard-management-client-chart-widget-data.util-BLtv9sOm.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-module-dashboard-management-client-contracts-entities-dashboard.mjs +30 -1
  16. package/fesm2022/acorex-platform-module-dashboard-management-client-contracts-entities-dashboard.mjs.map +1 -1
  17. package/fesm2022/{acorex-platform-module-dashboard-management-client-contracts-entity-catalog-acorex-platform-module-dashboard-management-client-contracts-entity-catalog-CPDwiLWC.mjs → acorex-platform-module-dashboard-management-client-contracts-entity-catalog-acorex-platform-module-dashboard-management-client-contracts-entity-catalog-C3ZKIYgQ.mjs} +2 -2
  18. package/fesm2022/{acorex-platform-module-dashboard-management-client-contracts-entity-catalog-acorex-platform-module-dashboard-management-client-contracts-entity-catalog-CPDwiLWC.mjs.map → acorex-platform-module-dashboard-management-client-contracts-entity-catalog-acorex-platform-module-dashboard-management-client-contracts-entity-catalog-C3ZKIYgQ.mjs.map} +1 -1
  19. package/fesm2022/{acorex-platform-module-dashboard-management-client-contracts-entity-catalog-dashboard.entity-C1ju-BQM.mjs → acorex-platform-module-dashboard-management-client-contracts-entity-catalog-dashboard.entity-D2uqZMd4.mjs} +32 -3
  20. package/fesm2022/acorex-platform-module-dashboard-management-client-contracts-entity-catalog-dashboard.entity-D2uqZMd4.mjs.map +1 -0
  21. package/fesm2022/acorex-platform-module-dashboard-management-client-contracts-entity-catalog.mjs +1 -1
  22. package/fesm2022/acorex-platform-module-dashboard-management-client-contracts.mjs +21 -1
  23. package/fesm2022/acorex-platform-module-dashboard-management-client-contracts.mjs.map +1 -1
  24. package/fesm2022/acorex-platform-module-dashboard-management-client-donut-chart-widget.component-DB_7rLmK.mjs +145 -0
  25. package/fesm2022/acorex-platform-module-dashboard-management-client-donut-chart-widget.component-DB_7rLmK.mjs.map +1 -0
  26. package/fesm2022/acorex-platform-module-dashboard-management-client-funnel-chart-widget.component-CltmXb8c.mjs +135 -0
  27. package/fesm2022/acorex-platform-module-dashboard-management-client-funnel-chart-widget.component-CltmXb8c.mjs.map +1 -0
  28. package/fesm2022/acorex-platform-module-dashboard-management-client-gauge-chart-widget.component-Ci1cRFmt.mjs +138 -0
  29. package/fesm2022/acorex-platform-module-dashboard-management-client-gauge-chart-widget.component-Ci1cRFmt.mjs.map +1 -0
  30. package/fesm2022/acorex-platform-module-dashboard-management-client-heatmap-chart-widget.component-CzJTc6rm.mjs +154 -0
  31. package/fesm2022/acorex-platform-module-dashboard-management-client-heatmap-chart-widget.component-CzJTc6rm.mjs.map +1 -0
  32. package/fesm2022/{acorex-platform-module-dashboard-management-client-index-C1Te5cDf.mjs → acorex-platform-module-dashboard-management-client-index-z10pHL3b.mjs} +3 -3
  33. package/fesm2022/{acorex-platform-module-dashboard-management-client-index-C1Te5cDf.mjs.map → acorex-platform-module-dashboard-management-client-index-z10pHL3b.mjs.map} +1 -1
  34. package/fesm2022/acorex-platform-module-dashboard-management-client-line-chart-widget.component-Fu_lheQe.mjs +158 -0
  35. package/fesm2022/acorex-platform-module-dashboard-management-client-line-chart-widget.component-Fu_lheQe.mjs.map +1 -0
  36. package/fesm2022/acorex-platform-module-dashboard-management-client.mjs +1 -1
  37. package/package.json +1 -1
  38. package/types/acorex-platform-module-dashboard-management-client-contracts.d.ts +19 -5
  39. package/types/acorex-platform-module-dashboard-management-client.d.ts +49 -267
  40. package/fesm2022/acorex-platform-module-dashboard-management-client-acorex-platform-module-dashboard-management-client-BUmHWNqL.mjs.map +0 -1
  41. package/fesm2022/acorex-platform-module-dashboard-management-client-contracts-entity-catalog-dashboard.entity-C1ju-BQM.mjs.map +0 -1
@@ -0,0 +1,559 @@
1
+ import { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';
2
+ import * as i0 from '@angular/core';
3
+ import { model, input, computed, effect, untracked, ChangeDetectionStrategy, Component, signal } from '@angular/core';
4
+ import { isEqual } from 'lodash-es';
5
+ import { AXPItemConfiguratorComponent } from '@acorex-platform/framework-client/layout/components';
6
+ import { c as chartTypeUsesColorRules, a as chartTypeUsesAxisLabels, r as readStashedChartAppearance, A as AXP_CHART_CONFIGURATOR_DEFAULT_TYPE, o as optionsAfterChartTypeSwitch } from './acorex-platform-module-dashboard-management-client-acorex-platform-module-dashboard-management-client-61Q_QY8l.mjs';
7
+ import { AXPWidgetsCatalog, AXPWidgetsList, coerceUnknownToMultiLanguageString, hasMultiLanguageContent } from '@acorex-platform/framework-shared/core';
8
+ import { AXP_CHART_QUERY_RESULT_TYPE, RootConfig } from '@acorex-platform/module-dashboard-management-client/contracts';
9
+ import { AXP_APPEARANCE_PROPERTY_GROUP, AXP_DATA_PROPERTY_GROUP } from '@acorex-platform/framework-client/layout/widgets';
10
+
11
+ //#region ----- Imports -----
12
+ //#endregion
13
+ //#region ----- Constants -----
14
+ const FIELD_I18N = {
15
+ id: '@dashboard:widgets.chart-configurator.color-rule-field-id',
16
+ label: '@dashboard:widgets.chart-configurator.color-rule-field-label',
17
+ name: '@dashboard:widgets.chart-configurator.color-rule-field-name',
18
+ value: '@dashboard:widgets.chart-configurator.color-rule-field-value',
19
+ };
20
+ //#endregion
21
+ //#region ----- Filter definitions -----
22
+ function stringFilterField(field, title) {
23
+ return {
24
+ field,
25
+ title,
26
+ widget: { type: AXPWidgetsCatalog.stringFilter },
27
+ filterType: { advance: true, inline: false },
28
+ };
29
+ }
30
+ function numberFilterField(field, title) {
31
+ return {
32
+ field,
33
+ title,
34
+ widget: { type: AXPWidgetsCatalog.numberFilter },
35
+ filterType: { advance: true, inline: false },
36
+ };
37
+ }
38
+ /**
39
+ * Condition-builder fields for colour rules, derived from the chart/KPI result DTO.
40
+ */
41
+ function buildChartColorRuleFilterDefinitions(resultType) {
42
+ switch (resultType) {
43
+ case AXP_CHART_QUERY_RESULT_TYPE.barSeries:
44
+ case AXP_CHART_QUERY_RESULT_TYPE.donutSeries:
45
+ return [
46
+ stringFilterField('id', FIELD_I18N.id),
47
+ stringFilterField('label', FIELD_I18N.label),
48
+ numberFilterField('value', FIELD_I18N.value),
49
+ ];
50
+ case AXP_CHART_QUERY_RESULT_TYPE.funnelSeries:
51
+ return [
52
+ stringFilterField('id', FIELD_I18N.id),
53
+ stringFilterField('name', FIELD_I18N.name),
54
+ numberFilterField('value', FIELD_I18N.value),
55
+ ];
56
+ case AXP_CHART_QUERY_RESULT_TYPE.lineSeries:
57
+ return [stringFilterField('id', FIELD_I18N.id), stringFilterField('label', FIELD_I18N.label)];
58
+ case AXP_CHART_QUERY_RESULT_TYPE.kpiSegmented:
59
+ return [stringFilterField('label', FIELD_I18N.label), numberFilterField('value', FIELD_I18N.value)];
60
+ case AXP_CHART_QUERY_RESULT_TYPE.kpiDetails:
61
+ return [stringFilterField('label', FIELD_I18N.label), stringFilterField('value', FIELD_I18N.value)];
62
+ default:
63
+ return [];
64
+ }
65
+ }
66
+ const CHART_COLOR_RULE_CONDITION_WIDGET = AXPWidgetsList.ExpressionBuilders.ConditionBuilder;
67
+ //#endregion
68
+
69
+ //#region ----- Imports -----
70
+ //#endregion
71
+ //#region ----- Constants -----
72
+ const QUERY_DEFINITION_ENTITY = 'PlatformManagement.QueryDefinition';
73
+ const TAB_I18N = {
74
+ title: '@dashboard:widgets.chart-configurator.tab-label',
75
+ titlePlaceholder: '@dashboard:widgets.chart-configurator.tab-label-placeholder',
76
+ query: '@dashboard:widgets.chart-configurator.query',
77
+ queryPlaceholder: '@general:widgets.query-options.query-placeholder',
78
+ queryRequired: '@dashboard:widgets.chart-configurator.query-required',
79
+ colorRules: '@dashboard:widgets.chart-configurator.color-rules',
80
+ xAxisLabel: '@dashboard:widgets.bar-chart.x-axis-label',
81
+ yAxisLabel: '@dashboard:widgets.bar-chart.y-axis-label',
82
+ };
83
+ //#endregion
84
+ //#region ----- Property builders -----
85
+ function buildTabTitleProperty() {
86
+ return {
87
+ name: 'title',
88
+ title: TAB_I18N.title,
89
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
90
+ order: 0,
91
+ schema: {
92
+ dataType: 'string',
93
+ interface: {
94
+ name: 'title',
95
+ path: 'options.title',
96
+ type: AXPWidgetsCatalog.text,
97
+ options: {
98
+ placeholder: TAB_I18N.titlePlaceholder,
99
+ hasClearButton: true,
100
+ multiLanguage: true,
101
+ },
102
+ },
103
+ },
104
+ visible: true,
105
+ };
106
+ }
107
+ function buildQueryLookupProperty(resultType) {
108
+ return {
109
+ name: 'query',
110
+ title: TAB_I18N.query,
111
+ group: AXP_DATA_PROPERTY_GROUP,
112
+ order: 1,
113
+ schema: {
114
+ dataType: 'string',
115
+ interface: {
116
+ name: 'query',
117
+ path: 'options.query',
118
+ type: AXPWidgetsCatalog.lookup,
119
+ options: {
120
+ entity: QUERY_DEFINITION_ENTITY,
121
+ valueField: 'name',
122
+ textField: 'catalogTitle',
123
+ look: 'select',
124
+ allowClear: true,
125
+ allowSearch: true,
126
+ placeholder: TAB_I18N.queryPlaceholder,
127
+ filter: {
128
+ logic: 'and',
129
+ filters: [
130
+ {
131
+ field: 'resultType',
132
+ operator: { type: 'equal' },
133
+ value: resultType,
134
+ },
135
+ ],
136
+ },
137
+ },
138
+ },
139
+ },
140
+ validations: [{ rule: 'required', message: TAB_I18N.queryRequired }],
141
+ visible: true,
142
+ };
143
+ }
144
+ function buildColorRulesProperty(resultType) {
145
+ return {
146
+ name: 'colorRules',
147
+ title: TAB_I18N.colorRules,
148
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
149
+ order: 2,
150
+ showLabel: true,
151
+ schema: {
152
+ dataType: 'array',
153
+ defaultValue: [],
154
+ interface: {
155
+ name: 'colorRules',
156
+ path: 'options.colorRules',
157
+ type: AXPWidgetsCatalog.repeaterLayout,
158
+ options: {
159
+ hasControls: true,
160
+ allowReorder: true,
161
+ },
162
+ children: [
163
+ {
164
+ type: AXPWidgetsCatalog.flexLayout,
165
+ name: 'colorRule',
166
+ options: {
167
+ flexDirection: 'column',
168
+ gap: '0.5rem',
169
+ alignItems: 'stretch',
170
+ },
171
+ children: [
172
+ {
173
+ type: CHART_COLOR_RULE_CONDITION_WIDGET,
174
+ name: 'when',
175
+ path: 'when',
176
+ options: {
177
+ filterDefinitions: buildChartColorRuleFilterDefinitions(resultType),
178
+ },
179
+ },
180
+ {
181
+ type: AXPWidgetsList.Editors.ColorChooser,
182
+ name: 'color',
183
+ path: 'color',
184
+ options: {
185
+ palette: 'theme',
186
+ hasClearButton: true,
187
+ },
188
+ },
189
+ ],
190
+ },
191
+ ],
192
+ },
193
+ },
194
+ visible: true,
195
+ };
196
+ }
197
+ function buildAxisLabelProperties() {
198
+ return [
199
+ {
200
+ name: 'xAxisLabel',
201
+ title: TAB_I18N.xAxisLabel,
202
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
203
+ order: 3,
204
+ schema: {
205
+ dataType: 'string',
206
+ interface: {
207
+ name: 'xAxisLabel',
208
+ path: 'options.xAxisLabel',
209
+ type: AXPWidgetsCatalog.text,
210
+ options: { hasClearButton: true, multiLanguage: true },
211
+ },
212
+ },
213
+ visible: true,
214
+ },
215
+ {
216
+ name: 'yAxisLabel',
217
+ title: TAB_I18N.yAxisLabel,
218
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
219
+ order: 4,
220
+ schema: {
221
+ dataType: 'string',
222
+ interface: {
223
+ name: 'yAxisLabel',
224
+ path: 'options.yAxisLabel',
225
+ type: AXPWidgetsCatalog.text,
226
+ options: { hasClearButton: true, multiLanguage: true },
227
+ },
228
+ },
229
+ visible: true,
230
+ },
231
+ ];
232
+ }
233
+ /**
234
+ * Tab-scoped properties for one chart type. Omits `queryTabs` — the chart card owns the tab list.
235
+ */
236
+ function buildChartTabPropertyDefinitions(resultType) {
237
+ const properties = [buildTabTitleProperty(), buildQueryLookupProperty(resultType)];
238
+ if (chartTypeUsesColorRules(resultType)) {
239
+ properties.push(buildColorRulesProperty(resultType));
240
+ }
241
+ if (chartTypeUsesAxisLabels(resultType)) {
242
+ properties.push(...buildAxisLabelProperties());
243
+ }
244
+ return properties;
245
+ }
246
+ //#endregion
247
+
248
+ //#region ----- Imports -----
249
+ //#endregion
250
+ //#region ----- Constants -----
251
+ const CATALOG_ENTRIES = [
252
+ {
253
+ id: RootConfig.widgets.barChart,
254
+ title: '@dashboard:widgets.bar-chart.widget-title',
255
+ icon: 'fa-light fa-chart-bar',
256
+ description: '@dashboard:widgets.bar-chart.widget-description',
257
+ resultType: AXP_CHART_QUERY_RESULT_TYPE.barSeries,
258
+ },
259
+ {
260
+ id: RootConfig.widgets.donutChart,
261
+ title: '@dashboard:widgets.donut-chart.widget-title',
262
+ icon: 'fa-light fa-donut',
263
+ description: '@dashboard:widgets.donut-chart.widget-description',
264
+ resultType: AXP_CHART_QUERY_RESULT_TYPE.donutSeries,
265
+ },
266
+ {
267
+ id: RootConfig.widgets.lineChart,
268
+ title: '@dashboard:widgets.line-chart.widget-title',
269
+ icon: 'fa-light fa-chart-line',
270
+ description: '@dashboard:widgets.line-chart.widget-description',
271
+ resultType: AXP_CHART_QUERY_RESULT_TYPE.lineSeries,
272
+ },
273
+ {
274
+ id: RootConfig.widgets.gaugeChart,
275
+ title: '@dashboard:widgets.gauge-chart.widget-title',
276
+ icon: 'fa-light fa-gauge',
277
+ description: '@dashboard:widgets.gauge-chart.widget-description',
278
+ resultType: AXP_CHART_QUERY_RESULT_TYPE.gaugeValue,
279
+ },
280
+ {
281
+ id: RootConfig.widgets.funnelChart,
282
+ title: '@dashboard:widgets.funnel-chart.widget-title',
283
+ icon: 'fa-light fa-filter',
284
+ description: '@dashboard:widgets.funnel-chart.widget-description',
285
+ resultType: AXP_CHART_QUERY_RESULT_TYPE.funnelSeries,
286
+ },
287
+ {
288
+ id: RootConfig.widgets.heatmapChart,
289
+ title: '@dashboard:widgets.heatmap-chart.widget-title',
290
+ icon: 'fa-light fa-grid-2',
291
+ description: '@dashboard:widgets.heatmap-chart.widget-description',
292
+ resultType: AXP_CHART_QUERY_RESULT_TYPE.heatmapSeries,
293
+ },
294
+ {
295
+ id: RootConfig.widgets.kpiStatCard,
296
+ title: '@dashboard:widgets.kpi-stat-card.widget-title',
297
+ icon: 'fa-light fa-gauge-high',
298
+ description: '@dashboard:widgets.kpi-stat-card.widget-description',
299
+ resultType: AXP_CHART_QUERY_RESULT_TYPE.kpiStatCard,
300
+ },
301
+ {
302
+ id: RootConfig.widgets.kpiProgress,
303
+ title: '@dashboard:widgets.kpi-progress.widget-title',
304
+ icon: 'fa-light fa-chart-bullet',
305
+ description: '@dashboard:widgets.kpi-progress.widget-description',
306
+ resultType: AXP_CHART_QUERY_RESULT_TYPE.kpiProgress,
307
+ },
308
+ {
309
+ id: RootConfig.widgets.kpiSegmented,
310
+ title: '@dashboard:widgets.kpi-segmented.widget-title',
311
+ icon: 'fa-light fa-chart-simple',
312
+ description: '@dashboard:widgets.kpi-segmented.widget-description',
313
+ resultType: AXP_CHART_QUERY_RESULT_TYPE.kpiSegmented,
314
+ },
315
+ {
316
+ id: RootConfig.widgets.kpiDetails,
317
+ title: '@dashboard:widgets.kpi-details.widget-title',
318
+ icon: 'fa-light fa-square-list',
319
+ description: '@dashboard:widgets.kpi-details.widget-description',
320
+ resultType: AXP_CHART_QUERY_RESULT_TYPE.kpiDetails,
321
+ },
322
+ ];
323
+ //#endregion
324
+ //#region ----- Catalog -----
325
+ function readTabLabel(options) {
326
+ return coerceUnknownToMultiLanguageString(options['title'] ?? options['label']);
327
+ }
328
+ /**
329
+ * Chart / KPI types offered in the chart configurator.
330
+ * When a tab label is set, the selected row shows that label and the type name as the subtitle.
331
+ */
332
+ function buildChartConfiguratorCatalog(options, selectedType) {
333
+ const tabLabel = options ? readTabLabel(options) : '';
334
+ const typeId = selectedType?.trim() ?? '';
335
+ return CATALOG_ENTRIES.map((entry) => {
336
+ const propertyDefinitions = buildChartTabPropertyDefinitions(entry.resultType);
337
+ const item = {
338
+ id: entry.id,
339
+ title: entry.title,
340
+ icon: entry.icon,
341
+ description: entry.description,
342
+ propertyDefinitions,
343
+ };
344
+ if (!hasMultiLanguageContent(tabLabel) || entry.id !== typeId) {
345
+ return item;
346
+ }
347
+ return {
348
+ ...item,
349
+ title: tabLabel,
350
+ description: entry.title,
351
+ };
352
+ });
353
+ }
354
+ //#endregion
355
+
356
+ //#region ----- Imports -----
357
+ //#endregion
358
+ //#region ----- Component -----
359
+ /**
360
+ * Pick a chart type and configure tab-scoped options via {@link AXPItemConfiguratorComponent}.
361
+ * Bound value is an {@link AXPWidgetNode} (`type` + `options`).
362
+ */
363
+ class AXMChartConfiguratorComponent {
364
+ //#endregion
365
+ //#region ----- Lifecycle -----
366
+ constructor() {
367
+ //#region ----- Inputs -----
368
+ this.widget = model({ type: '', options: {} }, /* @ts-ignore */
369
+ ...(ngDevMode ? [{ debugName: "widget" }] : /* istanbul ignore next */ []));
370
+ this.label = input('@dashboard:widgets.chart-configurator.label', /* @ts-ignore */
371
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
372
+ this.readonly = input(false, /* @ts-ignore */
373
+ ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
374
+ //#endregion
375
+ //#region ----- State -----
376
+ this.selectedTypeModel = model('', /* @ts-ignore */
377
+ ...(ngDevMode ? [{ debugName: "selectedTypeModel" }] : /* istanbul ignore next */ []));
378
+ this.optionsModel = model({}, /* @ts-ignore */
379
+ ...(ngDevMode ? [{ debugName: "optionsModel" }] : /* istanbul ignore next */ []));
380
+ this.catalogItems = computed(() => buildChartConfiguratorCatalog(this.optionsModel(), this.selectedTypeModel()), /* @ts-ignore */
381
+ ...(ngDevMode ? [{ debugName: "catalogItems" }] : /* istanbul ignore next */ []));
382
+ this.lastSelectedType = '';
383
+ this.stashedAppearance = {};
384
+ effect(() => {
385
+ const opts = this.optionsModel();
386
+ untracked(() => {
387
+ this.stashedAppearance = {
388
+ ...this.stashedAppearance,
389
+ ...readStashedChartAppearance(opts),
390
+ };
391
+ });
392
+ });
393
+ effect(() => {
394
+ const node = this.widget();
395
+ const type = node?.type?.trim() ?? '';
396
+ const opts = (node?.options ?? {});
397
+ const nextType = type || AXP_CHART_CONFIGURATOR_DEFAULT_TYPE;
398
+ const curType = untracked(() => this.selectedTypeModel());
399
+ const curOpts = untracked(() => this.optionsModel());
400
+ if (nextType !== curType || !isEqual(opts, curOpts)) {
401
+ untracked(() => {
402
+ this.selectedTypeModel.set(nextType);
403
+ this.optionsModel.set({ ...opts });
404
+ this.lastSelectedType = nextType;
405
+ });
406
+ }
407
+ });
408
+ effect(() => {
409
+ const type = this.selectedTypeModel();
410
+ untracked(() => {
411
+ const previousType = this.lastSelectedType;
412
+ if (!type || !previousType || type === previousType) {
413
+ if (type) {
414
+ this.lastSelectedType = type;
415
+ }
416
+ return;
417
+ }
418
+ const next = optionsAfterChartTypeSwitch(this.optionsModel(), previousType, type, this.stashedAppearance);
419
+ this.lastSelectedType = type;
420
+ if (!isEqual(next, this.optionsModel())) {
421
+ this.optionsModel.set(next);
422
+ }
423
+ });
424
+ });
425
+ effect(() => {
426
+ const type = this.selectedTypeModel();
427
+ const opts = this.optionsModel();
428
+ const current = untracked(() => this.widget());
429
+ const empty = { type: '', options: {} };
430
+ const resolvedType = type || AXP_CHART_CONFIGURATOR_DEFAULT_TYPE;
431
+ if (!resolvedType) {
432
+ if (!isEqual(current ?? empty, empty)) {
433
+ untracked(() => this.widget.set(empty));
434
+ }
435
+ return;
436
+ }
437
+ const next = {
438
+ ...(current && typeof current === 'object' ? current : {}),
439
+ type: resolvedType,
440
+ options: { ...opts },
441
+ };
442
+ if (!isEqual(next, current)) {
443
+ untracked(() => this.widget.set(next));
444
+ }
445
+ });
446
+ }
447
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMChartConfiguratorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
448
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: AXMChartConfiguratorComponent, isStandalone: true, selector: "axm-chart-configurator", inputs: { widget: { classPropertyName: "widget", publicName: "widget", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, selectedTypeModel: { classPropertyName: "selectedTypeModel", publicName: "selectedTypeModel", isSignal: true, isRequired: false, transformFunction: null }, optionsModel: { classPropertyName: "optionsModel", publicName: "optionsModel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { widget: "widgetChange", selectedTypeModel: "selectedTypeModelChange", optionsModel: "optionsModelChange" }, host: { properties: { "attr.readonly": "readonly() ? \"\" : null" }, classAttribute: "flex flex-col" }, ngImport: i0, template: `
449
+ <axp-item-configurator
450
+ [(selectedItemId)]="selectedTypeModel"
451
+ [(values)]="optionsModel"
452
+ [label]="label()"
453
+ [readonly]="readonly()"
454
+ [items]="catalogItems()"
455
+ />
456
+ `, isInline: true, styles: [":host([readonly]){pointer-events:none;opacity:.7}\n"], dependencies: [{ kind: "component", type: AXPItemConfiguratorComponent, selector: "axp-item-configurator", inputs: ["selectedItemId", "values", "label", "readonly", "items", "headerActions"], outputs: ["selectedItemIdChange", "valuesChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
457
+ }
458
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMChartConfiguratorComponent, decorators: [{
459
+ type: Component,
460
+ args: [{ selector: 'axm-chart-configurator', template: `
461
+ <axp-item-configurator
462
+ [(selectedItemId)]="selectedTypeModel"
463
+ [(values)]="optionsModel"
464
+ [label]="label()"
465
+ [readonly]="readonly()"
466
+ [items]="catalogItems()"
467
+ />
468
+ `, changeDetection: ChangeDetectionStrategy.OnPush, host: {
469
+ class: 'flex flex-col',
470
+ '[attr.readonly]': 'readonly() ? "" : null',
471
+ }, imports: [AXPItemConfiguratorComponent], styles: [":host([readonly]){pointer-events:none;opacity:.7}\n"] }]
472
+ }], ctorParameters: () => [], propDecorators: { widget: [{ type: i0.Input, args: [{ isSignal: true, alias: "widget", required: false }] }, { type: i0.Output, args: ["widgetChange"] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], selectedTypeModel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedTypeModel", required: false }] }, { type: i0.Output, args: ["selectedTypeModelChange"] }], optionsModel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionsModel", required: false }] }, { type: i0.Output, args: ["optionsModelChange"] }] } });
473
+
474
+ //#region ----- Imports -----
475
+ //#endregion
476
+ //#region ----- Component -----
477
+ class AXMChartConfiguratorWidgetEditComponent extends AXPValueWidgetComponent {
478
+ constructor() {
479
+ super(...arguments);
480
+ //#region ----- Computed Properties -----
481
+ this.readonly = computed(() => this.options()['readonly'] === true, /* @ts-ignore */
482
+ ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
483
+ this.label = computed(() => this.options()['label'] || '@dashboard:widgets.chart-configurator.label', /* @ts-ignore */
484
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
485
+ //#endregion
486
+ //#region ----- State -----
487
+ this.isInitialized = signal(false, /* @ts-ignore */
488
+ ...(ngDevMode ? [{ debugName: "isInitialized" }] : /* istanbul ignore next */ []));
489
+ this.widgetModel = model({ type: '', options: {} }, /* @ts-ignore */
490
+ ...(ngDevMode ? [{ debugName: "widgetModel" }] : /* istanbul ignore next */ []));
491
+ //#endregion
492
+ //#region ----- Effects -----
493
+ this.syncValueToConfigurator = effect(() => {
494
+ const value = this.getValue();
495
+ if (value && value.type) {
496
+ const currentModel = untracked(() => this.widgetModel());
497
+ if (!isEqual(value, currentModel)) {
498
+ untracked(() => {
499
+ this.widgetModel.set(value);
500
+ this.isInitialized.set(true);
501
+ });
502
+ }
503
+ return;
504
+ }
505
+ untracked(() => {
506
+ if (!this.isInitialized()) {
507
+ this.isInitialized.set(true);
508
+ }
509
+ });
510
+ }, /* @ts-ignore */
511
+ ...(ngDevMode ? [{ debugName: "syncValueToConfigurator" }] : /* istanbul ignore next */ []));
512
+ this.syncConfiguratorToValue = effect(() => {
513
+ const modelValue = this.widgetModel();
514
+ if (!untracked(() => this.isInitialized())) {
515
+ return;
516
+ }
517
+ if (!modelValue?.type) {
518
+ return;
519
+ }
520
+ const currentValue = untracked(() => this.getValue());
521
+ if (!isEqual(modelValue, currentValue)) {
522
+ untracked(() => {
523
+ this.setValue(modelValue);
524
+ });
525
+ }
526
+ }, /* @ts-ignore */
527
+ ...(ngDevMode ? [{ debugName: "syncConfiguratorToValue" }] : /* istanbul ignore next */ []));
528
+ }
529
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMChartConfiguratorWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
530
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMChartConfiguratorWidgetEditComponent, isStandalone: true, selector: "axm-chart-configurator-widget-edit", inputs: { widgetModel: { classPropertyName: "widgetModel", publicName: "widgetModel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { widgetModel: "widgetModelChange" }, usesInheritance: true, ngImport: i0, template: `
531
+ @if (isInitialized()) {
532
+ <axm-chart-configurator
533
+ [(widget)]="widgetModel"
534
+ [label]="label()"
535
+ [readonly]="readonly()"
536
+ ></axm-chart-configurator>
537
+ }
538
+ `, isInline: true, dependencies: [{ kind: "component", type: AXMChartConfiguratorComponent, selector: "axm-chart-configurator", inputs: ["widget", "label", "readonly", "selectedTypeModel", "optionsModel"], outputs: ["widgetChange", "selectedTypeModelChange", "optionsModelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
539
+ }
540
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMChartConfiguratorWidgetEditComponent, decorators: [{
541
+ type: Component,
542
+ args: [{
543
+ selector: 'axm-chart-configurator-widget-edit',
544
+ template: `
545
+ @if (isInitialized()) {
546
+ <axm-chart-configurator
547
+ [(widget)]="widgetModel"
548
+ [label]="label()"
549
+ [readonly]="readonly()"
550
+ ></axm-chart-configurator>
551
+ }
552
+ `,
553
+ changeDetection: ChangeDetectionStrategy.OnPush,
554
+ imports: [AXMChartConfiguratorComponent],
555
+ }]
556
+ }], propDecorators: { widgetModel: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetModel", required: false }] }, { type: i0.Output, args: ["widgetModelChange"] }] } });
557
+
558
+ export { AXMChartConfiguratorWidgetEditComponent };
559
+ //# sourceMappingURL=acorex-platform-module-dashboard-management-client-chart-configurator-widget-edit.component-BgR51eZ1.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-dashboard-management-client-chart-configurator-widget-edit.component-BgR51eZ1.mjs","sources":["../../../../libs/modules/dashboard-management/client/src/lib/features/shared/widgets/chart/chart-color-rule-fields.util.ts","../../../../libs/modules/dashboard-management/client/src/lib/features/shared/widgets/chart/chart-configurator/chart-tab-properties.util.ts","../../../../libs/modules/dashboard-management/client/src/lib/features/shared/widgets/chart/chart-configurator/chart-configurator.catalog.ts","../../../../libs/modules/dashboard-management/client/src/lib/features/shared/widgets/chart/chart-configurator/chart-configurator.component.ts","../../../../libs/modules/dashboard-management/client/src/lib/features/shared/widgets/chart/chart-configurator/chart-configurator-widget-edit.component.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport {\n AXPWidgetsCatalog,\n AXPWidgetsList,\n type AXPFilterDefinition,\n} from '@acorex-platform/framework-shared/core';\nimport { AXP_CHART_QUERY_RESULT_TYPE } from '@acorex-platform/module-dashboard-management-client/contracts';\n\n//#endregion\n\n//#region ----- Constants -----\n\nconst FIELD_I18N = {\n id: '@dashboard:widgets.chart-configurator.color-rule-field-id',\n label: '@dashboard:widgets.chart-configurator.color-rule-field-label',\n name: '@dashboard:widgets.chart-configurator.color-rule-field-name',\n value: '@dashboard:widgets.chart-configurator.color-rule-field-value',\n} as const;\n\n//#endregion\n\n//#region ----- Filter definitions -----\n\nfunction stringFilterField(field: string, title: string): AXPFilterDefinition {\n return {\n field,\n title,\n widget: { type: AXPWidgetsCatalog.stringFilter },\n filterType: { advance: true, inline: false },\n };\n}\n\nfunction numberFilterField(field: string, title: string): AXPFilterDefinition {\n return {\n field,\n title,\n widget: { type: AXPWidgetsCatalog.numberFilter },\n filterType: { advance: true, inline: false },\n };\n}\n\n/**\n * Condition-builder fields for colour rules, derived from the chart/KPI result DTO.\n */\nexport function buildChartColorRuleFilterDefinitions(resultType: string): AXPFilterDefinition[] {\n switch (resultType) {\n case AXP_CHART_QUERY_RESULT_TYPE.barSeries:\n case AXP_CHART_QUERY_RESULT_TYPE.donutSeries:\n return [\n stringFilterField('id', FIELD_I18N.id),\n stringFilterField('label', FIELD_I18N.label),\n numberFilterField('value', FIELD_I18N.value),\n ];\n case AXP_CHART_QUERY_RESULT_TYPE.funnelSeries:\n return [\n stringFilterField('id', FIELD_I18N.id),\n stringFilterField('name', FIELD_I18N.name),\n numberFilterField('value', FIELD_I18N.value),\n ];\n case AXP_CHART_QUERY_RESULT_TYPE.lineSeries:\n return [stringFilterField('id', FIELD_I18N.id), stringFilterField('label', FIELD_I18N.label)];\n case AXP_CHART_QUERY_RESULT_TYPE.kpiSegmented:\n return [stringFilterField('label', FIELD_I18N.label), numberFilterField('value', FIELD_I18N.value)];\n case AXP_CHART_QUERY_RESULT_TYPE.kpiDetails:\n return [stringFilterField('label', FIELD_I18N.label), stringFilterField('value', FIELD_I18N.value)];\n default:\n return [];\n }\n}\n\nexport const CHART_COLOR_RULE_CONDITION_WIDGET = AXPWidgetsList.ExpressionBuilders.ConditionBuilder;\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { AXPWidgetsCatalog, AXPWidgetsList } from '@acorex-platform/framework-shared/core';\nimport type { AXPWidgetProperty } from '@acorex-platform/framework-shared/widget-core';\nimport {\n AXP_APPEARANCE_PROPERTY_GROUP,\n AXP_DATA_PROPERTY_GROUP,\n} from '@acorex-platform/framework-client/layout/widgets';\n\nimport {\n buildChartColorRuleFilterDefinitions,\n CHART_COLOR_RULE_CONDITION_WIDGET,\n} from '../chart-color-rule-fields.util';\nimport { chartTypeUsesAxisLabels, chartTypeUsesColorRules } from '../chart-tab.util';\n\n//#endregion\n\n//#region ----- Constants -----\n\nconst QUERY_DEFINITION_ENTITY = 'PlatformManagement.QueryDefinition';\n\nconst TAB_I18N = {\n title: '@dashboard:widgets.chart-configurator.tab-label',\n titlePlaceholder: '@dashboard:widgets.chart-configurator.tab-label-placeholder',\n query: '@dashboard:widgets.chart-configurator.query',\n queryPlaceholder: '@general:widgets.query-options.query-placeholder',\n queryRequired: '@dashboard:widgets.chart-configurator.query-required',\n colorRules: '@dashboard:widgets.chart-configurator.color-rules',\n xAxisLabel: '@dashboard:widgets.bar-chart.x-axis-label',\n yAxisLabel: '@dashboard:widgets.bar-chart.y-axis-label',\n} as const;\n\n//#endregion\n\n//#region ----- Property builders -----\n\nfunction buildTabTitleProperty(): AXPWidgetProperty {\n return {\n name: 'title',\n title: TAB_I18N.title,\n group: AXP_APPEARANCE_PROPERTY_GROUP,\n order: 0,\n schema: {\n dataType: 'string',\n interface: {\n name: 'title',\n path: 'options.title',\n type: AXPWidgetsCatalog.text,\n options: {\n placeholder: TAB_I18N.titlePlaceholder,\n hasClearButton: true,\n multiLanguage: true,\n },\n },\n },\n visible: true,\n };\n}\n\nfunction buildQueryLookupProperty(resultType: string): AXPWidgetProperty {\n return {\n name: 'query',\n title: TAB_I18N.query,\n group: AXP_DATA_PROPERTY_GROUP,\n order: 1,\n schema: {\n dataType: 'string',\n interface: {\n name: 'query',\n path: 'options.query',\n type: AXPWidgetsCatalog.lookup,\n options: {\n entity: QUERY_DEFINITION_ENTITY,\n valueField: 'name',\n textField: 'catalogTitle',\n look: 'select',\n allowClear: true,\n allowSearch: true,\n placeholder: TAB_I18N.queryPlaceholder,\n filter: {\n logic: 'and',\n filters: [\n {\n field: 'resultType',\n operator: { type: 'equal' },\n value: resultType,\n },\n ],\n },\n },\n },\n },\n validations: [{ rule: 'required', message: TAB_I18N.queryRequired }],\n visible: true,\n };\n}\n\nfunction buildColorRulesProperty(resultType: string): AXPWidgetProperty {\n return {\n name: 'colorRules',\n title: TAB_I18N.colorRules,\n group: AXP_APPEARANCE_PROPERTY_GROUP,\n order: 2,\n showLabel: true,\n schema: {\n dataType: 'array',\n defaultValue: [],\n interface: {\n name: 'colorRules',\n path: 'options.colorRules',\n type: AXPWidgetsCatalog.repeaterLayout,\n options: {\n hasControls: true,\n allowReorder: true,\n },\n children: [\n {\n type: AXPWidgetsCatalog.flexLayout,\n name: 'colorRule',\n options: {\n flexDirection: 'column',\n gap: '0.5rem',\n alignItems: 'stretch',\n },\n children: [\n {\n type: CHART_COLOR_RULE_CONDITION_WIDGET,\n name: 'when',\n path: 'when',\n options: {\n filterDefinitions: buildChartColorRuleFilterDefinitions(resultType),\n },\n },\n {\n type: AXPWidgetsList.Editors.ColorChooser,\n name: 'color',\n path: 'color',\n options: {\n palette: 'theme',\n hasClearButton: true,\n },\n },\n ],\n },\n ],\n },\n },\n visible: true,\n };\n}\n\nfunction buildAxisLabelProperties(): AXPWidgetProperty[] {\n return [\n {\n name: 'xAxisLabel',\n title: TAB_I18N.xAxisLabel,\n group: AXP_APPEARANCE_PROPERTY_GROUP,\n order: 3,\n schema: {\n dataType: 'string',\n interface: {\n name: 'xAxisLabel',\n path: 'options.xAxisLabel',\n type: AXPWidgetsCatalog.text,\n options: { hasClearButton: true, multiLanguage: true },\n },\n },\n visible: true,\n },\n {\n name: 'yAxisLabel',\n title: TAB_I18N.yAxisLabel,\n group: AXP_APPEARANCE_PROPERTY_GROUP,\n order: 4,\n schema: {\n dataType: 'string',\n interface: {\n name: 'yAxisLabel',\n path: 'options.yAxisLabel',\n type: AXPWidgetsCatalog.text,\n options: { hasClearButton: true, multiLanguage: true },\n },\n },\n visible: true,\n },\n ];\n}\n\n/**\n * Tab-scoped properties for one chart type. Omits `queryTabs` — the chart card owns the tab list.\n */\nexport function buildChartTabPropertyDefinitions(resultType: string): AXPWidgetProperty[] {\n const properties: AXPWidgetProperty[] = [buildTabTitleProperty(), buildQueryLookupProperty(resultType)];\n\n if (chartTypeUsesColorRules(resultType)) {\n properties.push(buildColorRulesProperty(resultType));\n }\n\n if (chartTypeUsesAxisLabels(resultType)) {\n properties.push(...buildAxisLabelProperties());\n }\n\n return properties;\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport type { ItemConfiguratorListItem } from '@acorex-platform/framework-client/layout/components';\nimport { coerceUnknownToMultiLanguageString, hasMultiLanguageContent, type AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport {\n AXP_CHART_QUERY_RESULT_TYPE,\n RootConfig,\n} from '@acorex-platform/module-dashboard-management-client/contracts';\n\nimport { buildChartTabPropertyDefinitions } from './chart-tab-properties.util';\n\n//#endregion\n\n//#region ----- Types -----\n\ninterface ChartConfiguratorCatalogEntry {\n id: string;\n title: string;\n icon: string;\n description: string;\n resultType: string;\n}\n\n//#endregion\n\n//#region ----- Constants -----\n\nconst CATALOG_ENTRIES: ChartConfiguratorCatalogEntry[] = [\n {\n id: RootConfig.widgets.barChart,\n title: '@dashboard:widgets.bar-chart.widget-title',\n icon: 'fa-light fa-chart-bar',\n description: '@dashboard:widgets.bar-chart.widget-description',\n resultType: AXP_CHART_QUERY_RESULT_TYPE.barSeries,\n },\n {\n id: RootConfig.widgets.donutChart,\n title: '@dashboard:widgets.donut-chart.widget-title',\n icon: 'fa-light fa-donut',\n description: '@dashboard:widgets.donut-chart.widget-description',\n resultType: AXP_CHART_QUERY_RESULT_TYPE.donutSeries,\n },\n {\n id: RootConfig.widgets.lineChart,\n title: '@dashboard:widgets.line-chart.widget-title',\n icon: 'fa-light fa-chart-line',\n description: '@dashboard:widgets.line-chart.widget-description',\n resultType: AXP_CHART_QUERY_RESULT_TYPE.lineSeries,\n },\n {\n id: RootConfig.widgets.gaugeChart,\n title: '@dashboard:widgets.gauge-chart.widget-title',\n icon: 'fa-light fa-gauge',\n description: '@dashboard:widgets.gauge-chart.widget-description',\n resultType: AXP_CHART_QUERY_RESULT_TYPE.gaugeValue,\n },\n {\n id: RootConfig.widgets.funnelChart,\n title: '@dashboard:widgets.funnel-chart.widget-title',\n icon: 'fa-light fa-filter',\n description: '@dashboard:widgets.funnel-chart.widget-description',\n resultType: AXP_CHART_QUERY_RESULT_TYPE.funnelSeries,\n },\n {\n id: RootConfig.widgets.heatmapChart,\n title: '@dashboard:widgets.heatmap-chart.widget-title',\n icon: 'fa-light fa-grid-2',\n description: '@dashboard:widgets.heatmap-chart.widget-description',\n resultType: AXP_CHART_QUERY_RESULT_TYPE.heatmapSeries,\n },\n {\n id: RootConfig.widgets.kpiStatCard,\n title: '@dashboard:widgets.kpi-stat-card.widget-title',\n icon: 'fa-light fa-gauge-high',\n description: '@dashboard:widgets.kpi-stat-card.widget-description',\n resultType: AXP_CHART_QUERY_RESULT_TYPE.kpiStatCard,\n },\n {\n id: RootConfig.widgets.kpiProgress,\n title: '@dashboard:widgets.kpi-progress.widget-title',\n icon: 'fa-light fa-chart-bullet',\n description: '@dashboard:widgets.kpi-progress.widget-description',\n resultType: AXP_CHART_QUERY_RESULT_TYPE.kpiProgress,\n },\n {\n id: RootConfig.widgets.kpiSegmented,\n title: '@dashboard:widgets.kpi-segmented.widget-title',\n icon: 'fa-light fa-chart-simple',\n description: '@dashboard:widgets.kpi-segmented.widget-description',\n resultType: AXP_CHART_QUERY_RESULT_TYPE.kpiSegmented,\n },\n {\n id: RootConfig.widgets.kpiDetails,\n title: '@dashboard:widgets.kpi-details.widget-title',\n icon: 'fa-light fa-square-list',\n description: '@dashboard:widgets.kpi-details.widget-description',\n resultType: AXP_CHART_QUERY_RESULT_TYPE.kpiDetails,\n },\n];\n\n//#endregion\n\n//#region ----- Catalog -----\n\nfunction readTabLabel(options: Record<string, unknown>): AXPMultiLanguageString {\n return coerceUnknownToMultiLanguageString(options['title'] ?? options['label']);\n}\n\n/**\n * Chart / KPI types offered in the chart configurator.\n * When a tab label is set, the selected row shows that label and the type name as the subtitle.\n */\nexport function buildChartConfiguratorCatalog(\n options?: Record<string, unknown>,\n selectedType?: string,\n): ItemConfiguratorListItem[] {\n const tabLabel = options ? readTabLabel(options) : '';\n const typeId = selectedType?.trim() ?? '';\n\n return CATALOG_ENTRIES.map((entry) => {\n const propertyDefinitions = buildChartTabPropertyDefinitions(entry.resultType);\n const item: ItemConfiguratorListItem = {\n id: entry.id,\n title: entry.title,\n icon: entry.icon,\n description: entry.description,\n propertyDefinitions,\n };\n\n if (!hasMultiLanguageContent(tabLabel) || entry.id !== typeId) {\n return item;\n }\n\n return {\n ...item,\n title: tabLabel,\n description: entry.title as AXPMultiLanguageString,\n };\n });\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { AXPItemConfiguratorComponent, type ItemConfiguratorListItem } from '@acorex-platform/framework-client/layout/components';\nimport type { AXPOptionsData, AXPWidgetNode } from '@acorex-platform/framework-shared/core';\nimport { ChangeDetectionStrategy, Component, computed, effect, input, model, untracked } from '@angular/core';\nimport { isEqual } from 'lodash-es';\n\nimport {\n AXP_CHART_CONFIGURATOR_DEFAULT_TYPE,\n optionsAfterChartTypeSwitch,\n readStashedChartAppearance,\n} from '../chart-tab.util';\nimport { buildChartConfiguratorCatalog } from './chart-configurator.catalog';\n\n//#endregion\n\n//#region ----- Component -----\n\n/**\n * Pick a chart type and configure tab-scoped options via {@link AXPItemConfiguratorComponent}.\n * Bound value is an {@link AXPWidgetNode} (`type` + `options`).\n */\n@Component({\n selector: 'axm-chart-configurator',\n template: `\n <axp-item-configurator\n [(selectedItemId)]=\"selectedTypeModel\"\n [(values)]=\"optionsModel\"\n [label]=\"label()\"\n [readonly]=\"readonly()\"\n [items]=\"catalogItems()\"\n />\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'flex flex-col',\n '[attr.readonly]': 'readonly() ? \"\" : null',\n },\n styles: [\n `\n :host([readonly]) {\n pointer-events: none;\n opacity: 0.7;\n }\n `,\n ],\n imports: [AXPItemConfiguratorComponent],\n})\nexport class AXMChartConfiguratorComponent {\n //#region ----- Inputs -----\n\n readonly widget = model<AXPWidgetNode>({ type: '', options: {} });\n\n readonly label = input<string>('@dashboard:widgets.chart-configurator.label');\n\n readonly readonly = input<boolean>(false);\n\n //#endregion\n\n //#region ----- State -----\n\n protected readonly selectedTypeModel = model<string>('');\n\n protected readonly optionsModel = model<Record<string, unknown>>({});\n\n protected readonly catalogItems = computed<ItemConfiguratorListItem[]>(() =>\n buildChartConfiguratorCatalog(this.optionsModel(), this.selectedTypeModel()),\n );\n\n private lastSelectedType = '';\n\n private stashedAppearance: Record<string, unknown> = {};\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n effect(() => {\n const opts = this.optionsModel();\n untracked(() => {\n this.stashedAppearance = {\n ...this.stashedAppearance,\n ...readStashedChartAppearance(opts),\n };\n });\n });\n\n effect(() => {\n const node = this.widget();\n const type = node?.type?.trim() ?? '';\n const opts = (node?.options ?? {}) as Record<string, unknown>;\n const nextType = type || AXP_CHART_CONFIGURATOR_DEFAULT_TYPE;\n const curType = untracked(() => this.selectedTypeModel());\n const curOpts = untracked(() => this.optionsModel());\n\n if (nextType !== curType || !isEqual(opts, curOpts)) {\n untracked(() => {\n this.selectedTypeModel.set(nextType);\n this.optionsModel.set({ ...opts });\n this.lastSelectedType = nextType;\n });\n }\n });\n\n effect(() => {\n const type = this.selectedTypeModel();\n untracked(() => {\n const previousType = this.lastSelectedType;\n if (!type || !previousType || type === previousType) {\n if (type) {\n this.lastSelectedType = type;\n }\n return;\n }\n const next = optionsAfterChartTypeSwitch(\n this.optionsModel(),\n previousType,\n type,\n this.stashedAppearance,\n );\n this.lastSelectedType = type;\n if (!isEqual(next, this.optionsModel())) {\n this.optionsModel.set(next);\n }\n });\n });\n\n effect(() => {\n const type = this.selectedTypeModel();\n const opts = this.optionsModel();\n const current = untracked(() => this.widget());\n const empty: AXPWidgetNode = { type: '', options: {} };\n const resolvedType = type || AXP_CHART_CONFIGURATOR_DEFAULT_TYPE;\n\n if (!resolvedType) {\n if (!isEqual(current ?? empty, empty)) {\n untracked(() => this.widget.set(empty));\n }\n return;\n }\n\n const next: AXPWidgetNode = {\n ...(current && typeof current === 'object' ? current : {}),\n type: resolvedType,\n options: { ...opts } as AXPOptionsData,\n };\n\n if (!isEqual(next, current)) {\n untracked(() => this.widget.set(next));\n }\n });\n }\n\n //#endregion\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport type { AXPWidgetNode } from '@acorex-platform/framework-shared/core';\nimport { ChangeDetectionStrategy, Component, computed, effect, model, signal, untracked } from '@angular/core';\nimport { isEqual } from 'lodash-es';\n\nimport { AXMChartConfiguratorComponent } from './chart-configurator.component';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-chart-configurator-widget-edit',\n template: `\n @if (isInitialized()) {\n <axm-chart-configurator\n [(widget)]=\"widgetModel\"\n [label]=\"label()\"\n [readonly]=\"readonly()\"\n ></axm-chart-configurator>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AXMChartConfiguratorComponent],\n})\nexport class AXMChartConfiguratorWidgetEditComponent extends AXPValueWidgetComponent<AXPWidgetNode> {\n //#region ----- Computed Properties -----\n\n protected readonly readonly = computed<boolean>(() => this.options()['readonly'] === true);\n\n protected readonly label = computed<string>(\n () => (this.options()['label'] as string) || '@dashboard:widgets.chart-configurator.label',\n );\n\n //#endregion\n\n //#region ----- State -----\n\n protected readonly isInitialized = signal(false);\n\n protected readonly widgetModel = model<AXPWidgetNode>({ type: '', options: {} });\n\n //#endregion\n\n //#region ----- Effects -----\n\n private readonly syncValueToConfigurator = effect(() => {\n const value = this.getValue();\n\n if (value && value.type) {\n const currentModel = untracked(() => this.widgetModel());\n if (!isEqual(value, currentModel)) {\n untracked(() => {\n this.widgetModel.set(value);\n this.isInitialized.set(true);\n });\n }\n return;\n }\n\n untracked(() => {\n if (!this.isInitialized()) {\n this.isInitialized.set(true);\n }\n });\n });\n\n private readonly syncConfiguratorToValue = effect(() => {\n const modelValue = this.widgetModel();\n\n if (!untracked(() => this.isInitialized())) {\n return;\n }\n\n if (!modelValue?.type) {\n return;\n }\n\n const currentValue = untracked(() => this.getValue());\n if (!isEqual(modelValue, currentValue)) {\n untracked(() => {\n this.setValue(modelValue);\n });\n }\n });\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;;AAAA;AASA;AAEA;AAEA,MAAM,UAAU,GAAG;AACjB,IAAA,EAAE,EAAE,2DAA2D;AAC/D,IAAA,KAAK,EAAE,8DAA8D;AACrE,IAAA,IAAI,EAAE,6DAA6D;AACnE,IAAA,KAAK,EAAE,8DAA8D;CAC7D;AAEV;AAEA;AAEA,SAAS,iBAAiB,CAAC,KAAa,EAAE,KAAa,EAAA;IACrD,OAAO;QACL,KAAK;QACL,KAAK;AACL,QAAA,MAAM,EAAE,EAAE,IAAI,EAAE,iBAAiB,CAAC,YAAY,EAAE;QAChD,UAAU,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE;KAC7C;AACH;AAEA,SAAS,iBAAiB,CAAC,KAAa,EAAE,KAAa,EAAA;IACrD,OAAO;QACL,KAAK;QACL,KAAK;AACL,QAAA,MAAM,EAAE,EAAE,IAAI,EAAE,iBAAiB,CAAC,YAAY,EAAE;QAChD,UAAU,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE;KAC7C;AACH;AAEA;;AAEG;AACG,SAAU,oCAAoC,CAAC,UAAkB,EAAA;IACrE,QAAQ,UAAU;QAChB,KAAK,2BAA2B,CAAC,SAAS;QAC1C,KAAK,2BAA2B,CAAC,WAAW;YAC1C,OAAO;AACL,gBAAA,iBAAiB,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,CAAC;AACtC,gBAAA,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC,KAAK,CAA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