@luzmo/analytics-components-kit 1.2.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -3
- package/angular/components/add-to-dashboard.ts +20 -6
- package/angular/components/data-fields-select.ts +5 -0
- package/angular/components/interactive-viz-item.ts +89 -24
- package/angular/components/item-grid-item-actions-menu.ts +5 -0
- package/angular/components/item-grid.ts +7 -0
- package/angular/components/item-option-color-picker.ts +28 -28
- package/angular/components/item-option-guidelines.ts +22 -1
- package/angular/components/item-option-multi-language-field.ts +7 -7
- package/angular/components/item-option-number-field.ts +14 -14
- package/angular/components/item-option-positions-number-field.ts +14 -14
- package/angular/components/item-option-radio-button-group.ts +7 -7
- package/angular/components/item-option-text-field.ts +7 -7
- package/angular/components/item-slot-picker-panel.ts +1 -1
- package/angular/components/item-slot-picker.ts +7 -7
- package/angular/esm/components/add-to-dashboard.d.ts +8 -4
- package/angular/esm/components/add-to-dashboard.js +23 -7
- package/angular/esm/components/data-fields-select.d.ts +2 -0
- package/angular/esm/components/data-fields-select.js +4 -0
- package/angular/esm/components/interactive-viz-item.d.ts +32 -11
- package/angular/esm/components/interactive-viz-item.js +99 -28
- package/angular/esm/components/item-grid-item-actions-menu.d.ts +2 -0
- package/angular/esm/components/item-grid-item-actions-menu.js +4 -0
- package/angular/esm/components/item-grid.d.ts +3 -1
- package/angular/esm/components/item-grid.js +9 -1
- package/angular/esm/components/item-option-color-picker.d.ts +10 -10
- package/angular/esm/components/item-option-color-picker.js +34 -34
- package/angular/esm/components/item-option-guidelines.d.ts +8 -2
- package/angular/esm/components/item-option-guidelines.js +26 -2
- package/angular/esm/components/item-option-multi-language-field.d.ts +3 -3
- package/angular/esm/components/item-option-multi-language-field.js +10 -10
- package/angular/esm/components/item-option-number-field.d.ts +5 -5
- package/angular/esm/components/item-option-number-field.js +18 -18
- package/angular/esm/components/item-option-positions-number-field.d.ts +5 -5
- package/angular/esm/components/item-option-positions-number-field.js +18 -18
- package/angular/esm/components/item-option-radio-button-group.d.ts +3 -3
- package/angular/esm/components/item-option-radio-button-group.js +10 -10
- package/angular/esm/components/item-option-text-field.d.ts +3 -3
- package/angular/esm/components/item-option-text-field.js +10 -10
- package/angular/esm/components/item-slot-picker-panel.d.ts +1 -1
- package/angular/esm/components/item-slot-picker-panel.js +1 -1
- package/angular/esm/components/item-slot-picker.d.ts +3 -3
- package/angular/esm/components/item-slot-picker.js +9 -9
- package/angular/package.json +2 -2
- package/components/add-to-dashboard/dashboard-actions.d.ts +2 -1
- package/components/add-to-dashboard/index.cjs +1 -1
- package/components/add-to-dashboard/index.js +1 -1
- package/components/{add-to-dashboard-NwsCPIlg.cjs → add-to-dashboard-BtzTZdjN.cjs} +1 -1
- package/components/{add-to-dashboard-NcVHlqrc.js → add-to-dashboard-Bu6S3qVz.js} +125 -120
- package/components/chart-helpers-BHxQbLBw.cjs +20 -0
- package/components/{chart-helpers-Dng_LGfq.js → chart-helpers-BKeMLhov.js} +53 -39
- package/components/filters/index.cjs +1 -1
- package/components/filters/index.js +1 -1
- package/components/{filters-CxIzuI5q.js → filters-DEpmh9Nj.js} +113 -102
- package/components/filters-LDXhe1Bp.cjs +187 -0
- package/components/index.cjs +1 -1
- package/components/index.js +6 -6
- package/components/interactive-viz-item/helpers/chart-helpers.d.ts +2 -1
- package/components/interactive-viz-item/index.cjs +1 -1
- package/components/interactive-viz-item/index.d.ts +1 -1
- package/components/interactive-viz-item/index.js +3 -3
- package/components/interactive-viz-item/interactive-viz-item.d.ts +47 -1
- package/components/interactive-viz-item/types.d.ts +4 -0
- package/components/interactive-viz-item-Cc3Ix95e.js +630 -0
- package/components/interactive-viz-item-SF12d97t.cjs +269 -0
- package/components/item-grid/item-grid.d.ts +1 -0
- package/components/item-slot-picker-panel/index.cjs +1 -1
- package/components/item-slot-picker-panel/index.js +1 -1
- package/components/item-slot-picker-panel/item-slot-picker-panel.d.ts +19 -1
- package/components/item-slot-picker-panel-Cw3UCK03.cjs +84 -0
- package/components/{item-slot-picker-panel-fJqEmxeD.js → item-slot-picker-panel-DprM9Rli.js} +64 -33
- package/custom-elements.json +3051 -2531
- package/grid-core/item-grid-base.d.ts +5 -4
- package/package.json +2 -2
- package/react/package.json +2 -2
- package/standalone/add-to-dashboard.js +40 -40
- package/standalone/chunks/{chart-helpers-DsIGsaDc.js → chart-helpers-DZsidiCl.js} +2 -2
- package/standalone/chunks/{choropleth-map-options.config-rUJsEJcm.js → choropleth-map-options.config-CDMjKnJD.js} +1 -1
- package/standalone/chunks/{color-range-utils-DxOtqAKB.js → color-range-utils-BVyHBRiq.js} +1 -1
- package/standalone/chunks/data-broker-DpSrH3IP.js +2 -0
- package/standalone/chunks/de-BkB0q1Eg.js +2 -0
- package/standalone/chunks/display-settings-binning-DhHlclWH.js +38 -0
- package/standalone/chunks/display-settings-datetime-C8xvOvi4.js +199 -0
- package/standalone/chunks/display-settings-grand-totals-CUpigDcs.js +26 -0
- package/standalone/chunks/display-settings-numeric-BLWF54Jx.js +172 -0
- package/standalone/chunks/display-settings-period-over-period-COd4tvUw.js +209 -0
- package/standalone/chunks/embed-Bv1ps-EM.js +260 -0
- package/standalone/chunks/en-DNsyAwgq.js +2 -0
- package/standalone/chunks/en-GB-Di3OzVdL.js +2 -0
- package/standalone/chunks/en-US-DNsyAwgq.js +2 -0
- package/standalone/chunks/es-Bo0jStZn.js +2 -0
- package/standalone/chunks/{filters-DKgJcQGP.js → filters-lhg_WVDK.js} +108 -108
- package/standalone/chunks/{formula-codemirror-BbyvNEVD.js → formula-codemirror-DZMzLE2I.js} +17 -17
- package/standalone/chunks/fr-Co_qVhhV.js +2 -0
- package/standalone/chunks/{heat-map-options.config-D93AeYFi.js → heat-map-options.config-DDQMD38W.js} +1 -1
- package/standalone/chunks/{heat-table-options.config-ZVML76FK.js → heat-table-options.config-B4K0Ygug.js} +1 -1
- package/standalone/chunks/{is-same-option-value-Di-A7Wmg.js → is-same-option-value-7kXNF4st.js} +1 -1
- package/standalone/chunks/item-option-action-button-group-Bl1HR1JK.js +35 -0
- package/standalone/chunks/item-option-base-DF24wTyv.js +38 -0
- package/standalone/chunks/item-option-color-palette-picker-MkIIn56p.js +22 -0
- package/standalone/chunks/item-option-color-picker-CxosMo_p.js +19 -0
- package/standalone/chunks/item-option-color-range-C7C70r4J.js +83 -0
- package/standalone/chunks/item-option-guidelines-iu8yWRzr.js +120 -0
- package/standalone/chunks/{item-option-multi-language-field-DPPpN2qg.js → item-option-multi-language-field-foanqCdr.js} +1 -1
- package/standalone/chunks/{item-option-number-field-CkqJjInE.js → item-option-number-field-ByVD4oq0.js} +1 -1
- package/standalone/chunks/item-option-panel-Bya-K7HH.js +316 -0
- package/standalone/chunks/{item-option-picker-BnwQPT9A.js → item-option-picker-CqNNVIML.js} +1 -1
- package/standalone/chunks/item-option-position-picker-BjCFVtDH.js +14 -0
- package/standalone/chunks/item-option-positions-number-field-BJJtXZL-.js +31 -0
- package/standalone/chunks/{item-option-radio-button-group-BkymJq3E.js → item-option-radio-button-group-C5bxsD85.js} +1 -1
- package/standalone/chunks/item-option-slider-DUXWz70B.js +18 -0
- package/standalone/chunks/item-option-switch-BHyJuOkP.js +12 -0
- package/standalone/chunks/{item-option-text-field-D7bkuhsv.js → item-option-text-field-rBZY9OX4.js} +1 -1
- package/standalone/chunks/{item-slot-picker-panel-D4BMxGs9.js → item-slot-picker-panel-BM82vSXi.js} +101 -99
- package/standalone/chunks/load-data-fields-for-datasets-DS9O1oyy.js +25 -0
- package/standalone/chunks/localize-DLl7tgQp.js +2 -0
- package/standalone/chunks/localized-decorator-DosMCCQo.js +2 -0
- package/standalone/chunks/{version-BW4Ixl63.js → localized-mixin-BWJj88bd.js} +1 -1
- package/standalone/chunks/nl-CQz2jrVx.js +2 -0
- package/standalone/chunks/{option-interaction-controller-BslAXAHF.js → option-interaction-controller-BuwRr21c.js} +1 -1
- package/standalone/chunks/{route-map-options.config-Dwy0JSVq.js → route-map-options.config-CGBkHnhM.js} +1 -1
- package/standalone/chunks/{spike-map-options.config-DFmuNxym.js → spike-map-options.config-CSenlJ_F.js} +1 -1
- package/standalone/interactive-viz-item.js +88 -84
- package/standalone/item-grid.js +10 -10
- package/standalone/manifest.json +46 -46
- package/types.d.ts +1 -1
- package/components/chart-helpers-ufZ6VbXs.cjs +0 -20
- package/components/filters-BPbPFOu5.cjs +0 -187
- package/components/interactive-viz-item-CwRRaCZB.js +0 -583
- package/components/interactive-viz-item-CxdrGRKc.cjs +0 -265
- package/components/item-slot-picker-panel-BhhN54IM.cjs +0 -82
- package/standalone/chunks/data-broker-DXDyIrj_.js +0 -2
- package/standalone/chunks/de-mdZT2W1G.js +0 -2
- package/standalone/chunks/display-settings-binning-Byffw2Kl.js +0 -38
- package/standalone/chunks/display-settings-datetime-CD52d6Sv.js +0 -199
- package/standalone/chunks/display-settings-grand-totals-Cky99LX9.js +0 -26
- package/standalone/chunks/display-settings-numeric-C9ea7Tgc.js +0 -172
- package/standalone/chunks/display-settings-period-over-period-BLSGumkD.js +0 -209
- package/standalone/chunks/embed-CBu7iQRx.js +0 -231
- package/standalone/chunks/en-CSboh17P.js +0 -2
- package/standalone/chunks/en-GB-HoXKQBOY.js +0 -2
- package/standalone/chunks/en-US-CSboh17P.js +0 -2
- package/standalone/chunks/es-Di5D8JFd.js +0 -2
- package/standalone/chunks/fr-DZku7iB9.js +0 -2
- package/standalone/chunks/item-option-action-button-group-BEAwPHVw.js +0 -35
- package/standalone/chunks/item-option-base-CRUxNhJQ.js +0 -38
- package/standalone/chunks/item-option-color-palette-picker-CBz61iZb.js +0 -22
- package/standalone/chunks/item-option-color-picker-lLvBPnKA.js +0 -19
- package/standalone/chunks/item-option-color-range-BqeatOei.js +0 -83
- package/standalone/chunks/item-option-guidelines-Cop8rM8y.js +0 -120
- package/standalone/chunks/item-option-panel-CzSKFCVl.js +0 -316
- package/standalone/chunks/item-option-position-picker-Bkc4JvJX.js +0 -14
- package/standalone/chunks/item-option-positions-number-field-Dr_315TE.js +0 -31
- package/standalone/chunks/item-option-slider-K_bsNci8.js +0 -18
- package/standalone/chunks/item-option-switch-DeihDHhM.js +0 -12
- package/standalone/chunks/load-data-fields-for-datasets-ClctSj6y.js +0 -25
- package/standalone/chunks/localize-DXRmGRe-.js +0 -2
- package/standalone/chunks/localized-decorator-DJVBmJVH.js +0 -2
- package/standalone/chunks/nl-CViTevL3.js +0 -2
package/README.md
CHANGED
|
@@ -26,6 +26,8 @@ To render the configured charts, also install Luzmo Embed (optional):
|
|
|
26
26
|
npm install @luzmo/embed
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
`@luzmo/embed` works from 7.5.0 within 7.x and on any 8.x (peer range `^7.5.0 || ^8.0.0`); 9 is not supported. A chart's `inlineData` (in `luzmo-interactive-viz-item`) needs 8.1.0 or a later 8.x and is a no-op on 7.x. The config panel loads its columns from the chart's datasets, so it hides itself for a chart with `inlineData` and no dataset columns. Embed applies no filters or ranking to `inlineData`, so a chart with it has no filters editor in the panel and no top-N ranking action. Saving a chart to a dashboard keeps `inlineData`, and the server rejects the save when the dashboard's inline data passes 2 MB in total. Embed treats `inlineData` as already-authorized output and does not apply viewer token filters to it, also after a dashboard save, so remove records the viewer must not see before you pass them.
|
|
30
|
+
|
|
29
31
|
Optional framework wrappers for embedding: `@luzmo/react-embed`, `@luzmo/ngx-embed`, `@luzmo/vue-embed`.
|
|
30
32
|
|
|
31
33
|
> **Important**: This package is linked to `@luzmo/dashboard-contents-types@1.0.47`. Ensure you are using this version when working with `slotsContents`, `slotConfiguration`, `options`, and grid configurations.
|
|
@@ -138,7 +140,7 @@ Individual option control editors are also exported for fully custom option UIs:
|
|
|
138
140
|
|
|
139
141
|
`<luzmo-filters>` defaults to the standard Luzmo filter format (`ItemFilterGroup[]` from `@luzmo/dashboard-contents-types`). Narrow `luzmo-filters-changed` on `event.detail.format` before forwarding: canonical groups are compatible with `luzmo-embed-viz-item`'s `filters` property and `luzmo-item-grid` items' `filters`; clean groups are for aligned hosts that accept `ItemFilterOutput` / `DashboardFilterOutput`. Group `condition` values are lowercase `and` / `or`. The published `FilterGroup` editor type uses the same casing, so typed consumers must migrate uppercase literals to `and` / `or`. At runtime uppercase `AND` / `OR` input is still accepted and normalized to lowercase on output.
|
|
140
142
|
|
|
141
|
-
`filters` accepts both halves of the public `ItemFilterOutput` / `DashboardFilterOutput` unions, so the result of an aligned `getFilters()` can be passed straight back in: canonical `ItemFilterGroup[]`, or clean clause groups that own a top-level `clause`, nest inline, and flatten each leaf onto its reference (including dashboard retrieval envelopes). Output stays canonical unless you set `format="clean"`, and `event.detail.format` names the half you received. A tree that cannot be represented cleanly — mixed `where`/`having` under `or`, a missing reference or value, an `in` / `not in` expression whose value is not an array, or a `between` expression whose range does not contain exactly two values — falls back to canonical output. A leaf that mixes encodings, or that matches neither a complete clean nor a complete canonical encoding, is rejected and the previous `filters` value is kept. Typed consumers of `FiltersChangedEventDetail` must narrow on `format` to keep `filters` as `ItemFilterGroup[]`. `transformFilters`, `reverseTransformFilters`, and `detectFiltersFormat` are exported from `@luzmo/analytics-components-kit/filters` for hosts that convert outside the editor. New groups and leaves receive a UUID (`id` on the group, `properties.id` on the leaf) that is kept on later edits. A newly chosen formula field defaults to `properties.type: 'having'`; an explicit `where` on a formula leaf is kept.
|
|
143
|
+
`filters` accepts both halves of the public `ItemFilterOutput` / `DashboardFilterOutput` unions, so the result of an aligned `getFilters()` can be passed straight back in: canonical `ItemFilterGroup[]`, or clean clause groups that own a top-level `clause`, nest inline, and flatten each leaf onto its reference (including dashboard retrieval envelopes). Output stays canonical unless you set `format="clean"`, and `event.detail.format` names the half you received. A tree that cannot be represented cleanly — mixed `where`/`having` under `or`, a missing reference or value, an `in` / `not in` expression whose value is not an array, or a `between` expression whose range does not contain exactly two values — falls back to canonical output. A leaf that mixes encodings, or that matches neither a complete clean nor a complete canonical encoding, is rejected and the previous `filters` value is kept. Typed consumers of `FiltersChangedEventDetail` must narrow on `format` to keep `filters` as `ItemFilterGroup[]`. `transformFilters`, `reverseTransformFilters`, and `detectFiltersFormat` are exported from `@luzmo/analytics-components-kit/filters` for hosts that convert outside the editor. New groups and leaves receive a UUID (`id` on the group, `properties.id` on the leaf) that is kept on later edits. A newly chosen formula field defaults to `properties.type: 'having'`; an explicit `where` on a formula leaf is kept. A canonical leaf whose reference operands use the deprecated `dataset_id`, `column_id` or `formula_id` keys is read as `datasetId`, `columnId` or `formulaId` on every operand (both sides of a field-to-field comparison too), and an edit emits the camelCase keys.
|
|
142
144
|
|
|
143
145
|
Named parameter-backed values are opt-in with `allow-parameters`. Supply the initial definitions through the `parameters` property. A parameter created in the editor is appended to `parameters` and announced with `luzmo-parameter-created`, so handle that event to persist it; creating does not apply it to a filter, since the user attaches it by picking it from the list. Listen for `luzmo-parameter-removed` when a definition is detached from one filter. Detaching does not delete the definition. The exported `FilterParameter`, `FilterParameterType`, and `FilterParameterEventDetail` types describe this API.
|
|
144
146
|
|
|
@@ -163,7 +165,9 @@ luzmo-filters {
|
|
|
163
165
|
| --------- | ------------------------------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------- |
|
|
164
166
|
| Item Grid | `@luzmo/analytics-components-kit/item-grid` | Interactive grid to arrange, resize, and manage multiple charts (renders internally) | [Docs](https://developer.luzmo.com/guide/ack--components--chart-rendering--luzmo-item-grid) |
|
|
165
167
|
|
|
166
|
-
|
|
168
|
+
`luzmo-interactive-viz-item` (`@luzmo/analytics-components-kit/interactive-viz-item`) renders one chart with inline actions, a feedback bar and a config panel, for example as an AI chat answer. `chartRenderOptions` (property only) is merged into the embedded chart's options for display settings and is never emitted nor saved. In the config panel, `hide-config-options` hides the options tab, and `slot-selects` (`multiple` by default, or `single`) and `slot-grows` are passed to the slot picker panel as `selects` and `grows`. `slotsConfiguration`, `customOptionsConfiguration` and `customTranslations` (property only) pass the configs of a chart type ACK has no definition for, such as a custom chart, to the config panel. `export(type)` takes a `VizItemExportType` and forwards to the embedded chart's export, waiting for the embedded renderer when it has not loaded yet. It resolves without a value when there is no chart, when the embed fails, or when the chart is cleared or the element removed first. CSS parts: `container`, `actions-bar`, `actions`, `chart-container`, `footer`, `config-panel`.
|
|
169
|
+
|
|
170
|
+
To render a bare chart without these, use `luzmo-embed-viz-item` from `@luzmo/embed` (not part of this kit); see [Rendering](#rendering).
|
|
167
171
|
|
|
168
172
|
## Usage: Drag & Drop Data Flow
|
|
169
173
|
|
|
@@ -345,7 +349,8 @@ import type {
|
|
|
345
349
|
ItemFilterOutput,
|
|
346
350
|
DashboardFilterOutput,
|
|
347
351
|
ItemOptionsChangedEventDetail,
|
|
348
|
-
ItemOptionInteractionEventDetail
|
|
352
|
+
ItemOptionInteractionEventDetail,
|
|
353
|
+
VizItemExportType
|
|
349
354
|
} from '@luzmo/analytics-components-kit/types';
|
|
350
355
|
```
|
|
351
356
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { booleanAttribute, ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, OnChanges, output, Renderer2, SimpleChanges } from '@angular/core';
|
|
2
2
|
import '@luzmo/analytics-components-kit/add-to-dashboard';
|
|
3
|
-
import type { LuzmoAddToDashboard as LuzmoAddToDashboardHostElement, AddToDashboardChartAddFailedEventDetail, AddToDashboardChartAddedEventDetail } from '@luzmo/analytics-components-kit/add-to-dashboard';
|
|
3
|
+
import type { LuzmoAddToDashboard as LuzmoAddToDashboardHostElement, AddToDashboardChartAddFailedEventDetail, AddToDashboardChartAddedEventDetail, DashboardActions, FlexChartConfig } from '@luzmo/analytics-components-kit/add-to-dashboard';
|
|
4
4
|
export type { AddToDashboardChartAddFailedEventDetail, AddToDashboardChartAddedEventDetail, AddToDashboardSettings, BuiltInDashboardActionsConfig, DashboardActionCallOptions, DashboardActions, DashboardListPage, DashboardListRequest, DashboardOption, FlexChartConfig } from '@luzmo/analytics-components-kit/add-to-dashboard';
|
|
5
5
|
import type { Placement } from '@luzmo/lucero';
|
|
6
6
|
|
|
@@ -26,9 +26,13 @@ export class LuzmoAddToDashboard implements OnChanges {
|
|
|
26
26
|
return this.host;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
/**
|
|
30
|
-
@Input({ alias: '
|
|
31
|
-
|
|
29
|
+
/** Chart to save; `options.theme` is removed before it reaches the adapter. */
|
|
30
|
+
@Input({ alias: 'chart' })
|
|
31
|
+
chart?: FlexChartConfig | null;
|
|
32
|
+
|
|
33
|
+
/** Host data operations. When unset, the built-in adapter on the auth properties is used. */
|
|
34
|
+
@Input({ alias: 'dashboardActions' })
|
|
35
|
+
dashboardActions?: DashboardActions | null;
|
|
32
36
|
|
|
33
37
|
/** Auth key for the built-in adapter. */
|
|
34
38
|
@Input({ alias: 'authKey' })
|
|
@@ -50,6 +54,10 @@ export class LuzmoAddToDashboard implements OnChanges {
|
|
|
50
54
|
@Input({ alias: 'disabled', transform: booleanAttribute })
|
|
51
55
|
disabled?: boolean;
|
|
52
56
|
|
|
57
|
+
/** The language for UI labels. Supported values: 'en', 'nl', 'fr', 'de', 'es' */
|
|
58
|
+
@Input({ alias: 'language' })
|
|
59
|
+
language?: string;
|
|
60
|
+
|
|
53
61
|
/** The size of the element */
|
|
54
62
|
@Input({ alias: 'size' })
|
|
55
63
|
size?: 's' | 'm' | 'l' | 'xl';
|
|
@@ -72,8 +80,11 @@ export class LuzmoAddToDashboard implements OnChanges {
|
|
|
72
80
|
ngOnChanges(changes: SimpleChanges): void {
|
|
73
81
|
for (const key of Object.keys(changes)) {
|
|
74
82
|
switch (key) {
|
|
75
|
-
case '
|
|
76
|
-
this.setHostProperty('
|
|
83
|
+
case 'chart':
|
|
84
|
+
this.setHostProperty('chart', changes['chart'].currentValue);
|
|
85
|
+
break;
|
|
86
|
+
case 'dashboardActions':
|
|
87
|
+
this.setHostProperty('dashboardActions', changes['dashboardActions'].currentValue);
|
|
77
88
|
break;
|
|
78
89
|
case 'authKey':
|
|
79
90
|
this.setHostProperty('authKey', changes['authKey'].currentValue);
|
|
@@ -90,6 +101,9 @@ export class LuzmoAddToDashboard implements OnChanges {
|
|
|
90
101
|
case 'disabled':
|
|
91
102
|
this.setHostProperty('disabled', changes['disabled'].currentValue);
|
|
92
103
|
break;
|
|
104
|
+
case 'language':
|
|
105
|
+
this.setHostProperty('language', changes['language'].currentValue);
|
|
106
|
+
break;
|
|
93
107
|
case 'size':
|
|
94
108
|
this.setHostProperty('size', changes['size'].currentValue);
|
|
95
109
|
break;
|
|
@@ -220,6 +220,11 @@ export class LuzmoDataFieldsSelect implements OnChanges {
|
|
|
220
220
|
})
|
|
221
221
|
);
|
|
222
222
|
}
|
|
223
|
+
|
|
224
|
+
/** Focuses the select trigger. */
|
|
225
|
+
focus(options?: FocusOptions): void {
|
|
226
|
+
return (this.host as LuzmoDataFieldsSelectHostElement).focus(options);
|
|
227
|
+
}
|
|
223
228
|
}
|
|
224
229
|
|
|
225
230
|
/** The underlying custom element type for LuzmoDataFieldsSelect */
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { booleanAttribute, ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, OnChanges, output, Renderer2, SimpleChanges } from '@angular/core';
|
|
2
2
|
import '@luzmo/analytics-components-kit/interactive-viz-item';
|
|
3
|
-
import type { LuzmoInteractiveVizItem as LuzmoInteractiveVizItemHostElement, AddToDashboardChartAddFailedEventDetail, AddToDashboardChartAddedEventDetail, ChartFeedback, FlexChartConfig, InteractiveVizItemChartChangedEventDetail, InteractiveVizItemChartOptionsChangedEventDetail, InteractiveVizItemFeedbackChangedEventDetail, InteractiveVizItemInteractionEventDetail } from '@luzmo/analytics-components-kit/interactive-viz-item';
|
|
4
|
-
export type { AddToDashboardChartAddFailedEventDetail, AddToDashboardChartAddedEventDetail, ChartActionDescriptor, ChartActionType, ChartFeedback, ChartFeedbackRating, ChartMutationRequest, ChartOption, DashboardActions, FlexChartConfig, InteractiveVizItemChartChangedEventDetail, InteractiveVizItemChartOptionsChangedEventDetail, InteractiveVizItemFeedbackChangedEventDetail, InteractiveVizItemInteractionEventDetail, ItemOptionInteraction, ItemOptionInteractionEventDetail, NormalizedChartConfig, Ranking, Sort } from '@luzmo/analytics-components-kit/interactive-viz-item';
|
|
3
|
+
import type { LuzmoInteractiveVizItem as LuzmoInteractiveVizItemHostElement, AddToDashboardChartAddFailedEventDetail, AddToDashboardChartAddedEventDetail, ChartFeedback, DashboardActions, FlexChartConfig, InteractiveVizItemChartChangedEventDetail, InteractiveVizItemChartOptionsChangedEventDetail, InteractiveVizItemFeedbackChangedEventDetail, InteractiveVizItemInteractionEventDetail } from '@luzmo/analytics-components-kit/interactive-viz-item';
|
|
4
|
+
export type { AddToDashboardChartAddFailedEventDetail, AddToDashboardChartAddedEventDetail, ChartActionDescriptor, ChartActionType, ChartFeedback, ChartFeedbackRating, ChartMutationRequest, ChartOption, DashboardActions, FlexChartConfig, InlineData, InteractiveVizItemChartChangedEventDetail, InteractiveVizItemChartOptionsChangedEventDetail, InteractiveVizItemFeedbackChangedEventDetail, InteractiveVizItemInteractionEventDetail, ItemOptionInteraction, ItemOptionInteractionEventDetail, NormalizedChartConfig, Ranking, Sort } from '@luzmo/analytics-components-kit/interactive-viz-item';
|
|
5
|
+
import type { OptionsConfig, SlotConfig, TranslationOverrides, TranslationsFile, VizItemExportType } from '@luzmo/dashboard-contents-types';
|
|
5
6
|
import type { LuzmoEmbedVizItem } from '@luzmo/embed';
|
|
6
7
|
|
|
7
8
|
@Component({
|
|
@@ -16,7 +17,10 @@ import type { LuzmoEmbedVizItem } from '@luzmo/embed';
|
|
|
16
17
|
*
|
|
17
18
|
* @slot chart-actions-extra - Host-injected actions rendered at the end of the inline actions bar (e.g. copy-to-dashboard).
|
|
18
19
|
* @csspart container - The viz item container.
|
|
20
|
+
* @csspart actions-bar - The bar above the chart holding the inline actions, the `chart-actions-extra` slot and add to dashboard.
|
|
21
|
+
* @csspart actions - The inline chart actions (ranking, display mode) inside the actions bar.
|
|
19
22
|
* @csspart chart-container - The embedded chart wrapper.
|
|
23
|
+
* @csspart footer - The row below the chart holding the feedback buttons and the config-panel toggle.
|
|
20
24
|
* @csspart config-panel - The expandable configuration panel.
|
|
21
25
|
*/
|
|
22
26
|
export class LuzmoInteractiveVizItem implements OnChanges {
|
|
@@ -31,19 +35,7 @@ export class LuzmoInteractiveVizItem implements OnChanges {
|
|
|
31
35
|
return this.host;
|
|
32
36
|
}
|
|
33
37
|
|
|
34
|
-
/**
|
|
35
|
-
@Input({ alias: 'language' })
|
|
36
|
-
language?: string;
|
|
37
|
-
|
|
38
|
-
/** When present, renders `luzmo-add-to-dashboard` in the actions bar. */
|
|
39
|
-
@Input({ alias: 'addToDashboard', transform: booleanAttribute })
|
|
40
|
-
addToDashboard?: boolean;
|
|
41
|
-
|
|
42
|
-
/** Click-to-filter on the embedded chart, forwarded as its `canFilter`. The `can-filter` attribute means `'all'`; unset keeps it off. */
|
|
43
|
-
@Input({ alias: 'canFilter' })
|
|
44
|
-
canFilter?: LuzmoEmbedVizItem['canFilter'];
|
|
45
|
-
|
|
46
|
-
/** Loose chart config (type, options, slots, filters); slots may use the keyed-object form. */
|
|
38
|
+
/** Loose chart config (type, options, slots, filters, inlineData); slots may use the keyed-object form. */
|
|
47
39
|
@Input({ alias: 'chart' })
|
|
48
40
|
chart?: FlexChartConfig | null;
|
|
49
41
|
|
|
@@ -87,14 +79,58 @@ export class LuzmoInteractiveVizItem implements OnChanges {
|
|
|
87
79
|
@Input({ alias: 'hideConfigPanel', transform: booleanAttribute })
|
|
88
80
|
hideConfigPanel?: boolean;
|
|
89
81
|
|
|
82
|
+
/** When present, hides the options tab of the config panel and keeps the data tab. */
|
|
83
|
+
@Input({ alias: 'hideConfigOptions', transform: booleanAttribute })
|
|
84
|
+
hideConfigOptions?: boolean;
|
|
85
|
+
|
|
86
|
+
/** Whether each slot in the config panel takes one field or several, forwarded to `luzmo-item-slot-picker-panel` as `selects`. */
|
|
87
|
+
@Input({ alias: 'slotSelects' })
|
|
88
|
+
slotSelects?: 'single' | 'multiple';
|
|
89
|
+
|
|
90
|
+
/** When present, the slot pickers in the config panel grow to full width, forwarded as `grows`. */
|
|
91
|
+
@Input({ alias: 'slotGrows', transform: booleanAttribute })
|
|
92
|
+
slotGrows?: boolean;
|
|
93
|
+
|
|
94
|
+
/** Slots configuration for the config panel, for a chart type ACK has no definition for (e.g. a custom chart). */
|
|
95
|
+
@Input({ alias: 'slotsConfiguration' })
|
|
96
|
+
slotsConfiguration?: SlotConfig[] | null;
|
|
97
|
+
|
|
98
|
+
/** Options configuration for the config panel, for a chart type ACK has no definition for (e.g. a custom chart). */
|
|
99
|
+
@Input({ alias: 'customOptionsConfiguration' })
|
|
100
|
+
customOptionsConfiguration?: OptionsConfig | null;
|
|
101
|
+
|
|
102
|
+
/** Option label translations that go with `customOptionsConfiguration`. */
|
|
103
|
+
@Input({ alias: 'customTranslations' })
|
|
104
|
+
customTranslations?: TranslationOverrides | TranslationsFile | null;
|
|
105
|
+
|
|
106
|
+
/** Options applied to the embedded chart only, merged one level deep over `chart.options` (e.g. `{ display: { title: false } }`). They are never emitted in chart events nor saved by add to dashboard. */
|
|
107
|
+
@Input({ alias: 'chartRenderOptions' })
|
|
108
|
+
chartRenderOptions?: FlexChartConfig['options'] | null;
|
|
109
|
+
|
|
110
|
+
/** When present, renders `luzmo-add-to-dashboard` in the actions bar. */
|
|
111
|
+
@Input({ alias: 'addToDashboard', transform: booleanAttribute })
|
|
112
|
+
addToDashboard?: boolean;
|
|
113
|
+
|
|
114
|
+
/** Host data operations for add to dashboard. When unset, the built-in adapter on the auth properties is used. */
|
|
115
|
+
@Input({ alias: 'dashboardActions' })
|
|
116
|
+
dashboardActions?: DashboardActions | null;
|
|
117
|
+
|
|
90
118
|
/** When present, chart changes are only emitted and the host sets `chart`; otherwise they are applied here and still emitted. */
|
|
91
119
|
@Input({ alias: 'controlled', transform: booleanAttribute })
|
|
92
120
|
controlled?: boolean;
|
|
93
121
|
|
|
122
|
+
/** Click-to-filter on the embedded chart, forwarded as its `canFilter`. The `can-filter` attribute means `'all'`; unset keeps it off. */
|
|
123
|
+
@Input({ alias: 'canFilter' })
|
|
124
|
+
canFilter?: LuzmoEmbedVizItem['canFilter'];
|
|
125
|
+
|
|
94
126
|
/** Applies and emits option changes live while a control is dragged or a key is held, without debounce, and forwards `luzmo-option-interaction-*` events. Off by default. */
|
|
95
127
|
@Input({ alias: 'liveInteractions', transform: booleanAttribute })
|
|
96
128
|
liveInteractions?: boolean;
|
|
97
129
|
|
|
130
|
+
/** The language for UI labels. Supported values: 'en', 'nl', 'fr', 'de', 'es' */
|
|
131
|
+
@Input({ alias: 'language' })
|
|
132
|
+
language?: string;
|
|
133
|
+
|
|
98
134
|
/** The size of the element */
|
|
99
135
|
@Input({ alias: 'size' })
|
|
100
136
|
size?: 's' | 'm' | 'l' | 'xl';
|
|
@@ -135,15 +171,6 @@ export class LuzmoInteractiveVizItem implements OnChanges {
|
|
|
135
171
|
ngOnChanges(changes: SimpleChanges): void {
|
|
136
172
|
for (const key of Object.keys(changes)) {
|
|
137
173
|
switch (key) {
|
|
138
|
-
case 'language':
|
|
139
|
-
this.setHostProperty('language', changes['language'].currentValue);
|
|
140
|
-
break;
|
|
141
|
-
case 'addToDashboard':
|
|
142
|
-
this.setHostProperty('addToDashboard', changes['addToDashboard'].currentValue);
|
|
143
|
-
break;
|
|
144
|
-
case 'canFilter':
|
|
145
|
-
this.setHostProperty('canFilter', changes['canFilter'].currentValue);
|
|
146
|
-
break;
|
|
147
174
|
case 'chart':
|
|
148
175
|
this.setHostProperty('chart', changes['chart'].currentValue);
|
|
149
176
|
break;
|
|
@@ -177,12 +204,45 @@ export class LuzmoInteractiveVizItem implements OnChanges {
|
|
|
177
204
|
case 'hideConfigPanel':
|
|
178
205
|
this.setHostProperty('hideConfigPanel', changes['hideConfigPanel'].currentValue);
|
|
179
206
|
break;
|
|
207
|
+
case 'hideConfigOptions':
|
|
208
|
+
this.setHostProperty('hideConfigOptions', changes['hideConfigOptions'].currentValue);
|
|
209
|
+
break;
|
|
210
|
+
case 'slotSelects':
|
|
211
|
+
this.setHostProperty('slotSelects', changes['slotSelects'].currentValue);
|
|
212
|
+
break;
|
|
213
|
+
case 'slotGrows':
|
|
214
|
+
this.setHostProperty('slotGrows', changes['slotGrows'].currentValue);
|
|
215
|
+
break;
|
|
216
|
+
case 'slotsConfiguration':
|
|
217
|
+
this.setHostProperty('slotsConfiguration', changes['slotsConfiguration'].currentValue);
|
|
218
|
+
break;
|
|
219
|
+
case 'customOptionsConfiguration':
|
|
220
|
+
this.setHostProperty('customOptionsConfiguration', changes['customOptionsConfiguration'].currentValue);
|
|
221
|
+
break;
|
|
222
|
+
case 'customTranslations':
|
|
223
|
+
this.setHostProperty('customTranslations', changes['customTranslations'].currentValue);
|
|
224
|
+
break;
|
|
225
|
+
case 'chartRenderOptions':
|
|
226
|
+
this.setHostProperty('chartRenderOptions', changes['chartRenderOptions'].currentValue);
|
|
227
|
+
break;
|
|
228
|
+
case 'addToDashboard':
|
|
229
|
+
this.setHostProperty('addToDashboard', changes['addToDashboard'].currentValue);
|
|
230
|
+
break;
|
|
231
|
+
case 'dashboardActions':
|
|
232
|
+
this.setHostProperty('dashboardActions', changes['dashboardActions'].currentValue);
|
|
233
|
+
break;
|
|
180
234
|
case 'controlled':
|
|
181
235
|
this.setHostProperty('controlled', changes['controlled'].currentValue);
|
|
182
236
|
break;
|
|
237
|
+
case 'canFilter':
|
|
238
|
+
this.setHostProperty('canFilter', changes['canFilter'].currentValue);
|
|
239
|
+
break;
|
|
183
240
|
case 'liveInteractions':
|
|
184
241
|
this.setHostProperty('liveInteractions', changes['liveInteractions'].currentValue);
|
|
185
242
|
break;
|
|
243
|
+
case 'language':
|
|
244
|
+
this.setHostProperty('language', changes['language'].currentValue);
|
|
245
|
+
break;
|
|
186
246
|
case 'size':
|
|
187
247
|
this.setHostProperty('size', changes['size'].currentValue);
|
|
188
248
|
break;
|
|
@@ -259,6 +319,11 @@ export class LuzmoInteractiveVizItem implements OnChanges {
|
|
|
259
319
|
})
|
|
260
320
|
);
|
|
261
321
|
}
|
|
322
|
+
|
|
323
|
+
/** Exports the embedded chart, forwarded to its `export(type)`. Waits for the embedded renderer when it has not loaded yet. Resolves without a value when there is no chart, when the embed fails, or when the chart is cleared or the element removed before the renderer loaded. */
|
|
324
|
+
export(type?: VizItemExportType): Promise<string | void> {
|
|
325
|
+
return (this.host as LuzmoInteractiveVizItemHostElement).export(type);
|
|
326
|
+
}
|
|
262
327
|
}
|
|
263
328
|
|
|
264
329
|
/** The underlying custom element type for LuzmoInteractiveVizItem */
|
|
@@ -117,6 +117,11 @@ export class LuzmoItemGridItemActionsMenu implements OnChanges {
|
|
|
117
117
|
})
|
|
118
118
|
);
|
|
119
119
|
}
|
|
120
|
+
|
|
121
|
+
/** Focuses the first toggle action, or the first available action. */
|
|
122
|
+
focus(): void {
|
|
123
|
+
return (this.host as LuzmoItemGridItemActionsMenuHostElement).focus();
|
|
124
|
+
}
|
|
120
125
|
}
|
|
121
126
|
|
|
122
127
|
/** The underlying custom element type for LuzmoItemGridItemActionsMenu */
|
|
@@ -107,6 +107,10 @@ export class LuzmoItemGrid implements OnChanges {
|
|
|
107
107
|
@Input({ alias: 'initialItemStates' })
|
|
108
108
|
initialItemStates?: ItemStates;
|
|
109
109
|
|
|
110
|
+
/** Renders an item whose type has no renderer registered with `registerRenderer`. */
|
|
111
|
+
@Input({ alias: 'defaultRenderer' })
|
|
112
|
+
defaultRenderer?: GridItemRenderer;
|
|
113
|
+
|
|
110
114
|
/** Fired when an item action is performed */
|
|
111
115
|
readonly luzmoItemGridItemAction = output<CustomEvent<GridItemActionEventDetail>>({ alias: 'luzmoItemGridItemAction' });
|
|
112
116
|
|
|
@@ -194,6 +198,9 @@ export class LuzmoItemGrid implements OnChanges {
|
|
|
194
198
|
case 'initialItemStates':
|
|
195
199
|
this.setHostProperty('initialItemStates', changes['initialItemStates'].currentValue);
|
|
196
200
|
break;
|
|
201
|
+
case 'defaultRenderer':
|
|
202
|
+
this.setHostProperty('defaultRenderer', changes['defaultRenderer'].currentValue);
|
|
203
|
+
break;
|
|
197
204
|
default:
|
|
198
205
|
break;
|
|
199
206
|
}
|
|
@@ -26,6 +26,18 @@ export class LuzmoItemOptionColorPicker implements OnChanges {
|
|
|
26
26
|
return this.host;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
/** The current color value. */
|
|
30
|
+
@Input({ alias: 'value' })
|
|
31
|
+
value?: string;
|
|
32
|
+
|
|
33
|
+
/** Whether the control is disabled (non-interactive). */
|
|
34
|
+
@Input({ alias: 'disabled', transform: booleanAttribute })
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
|
|
37
|
+
/** Disables the alpha (opacity) channel in the color picker. */
|
|
38
|
+
@Input({ alias: 'noAlphaChannel', transform: booleanAttribute })
|
|
39
|
+
noAlphaChannel?: boolean;
|
|
40
|
+
|
|
29
41
|
/** Preset colors offered as quick-pick swatches. */
|
|
30
42
|
@Input({ alias: 'swatches' })
|
|
31
43
|
swatches?: string[];
|
|
@@ -38,6 +50,10 @@ export class LuzmoItemOptionColorPicker implements OnChanges {
|
|
|
38
50
|
@Input({ alias: 'shape' })
|
|
39
51
|
shape?: 'circle' | 'rectangle';
|
|
40
52
|
|
|
53
|
+
/** Placement of the color picker dropdown relative to its trigger. */
|
|
54
|
+
@Input({ alias: 'placement' })
|
|
55
|
+
placement?: Placement;
|
|
56
|
+
|
|
41
57
|
/** Delay in milliseconds before the change event is emitted after the user stops interacting. */
|
|
42
58
|
@Input({ alias: 'debounce' })
|
|
43
59
|
debounce?: number;
|
|
@@ -50,22 +66,6 @@ export class LuzmoItemOptionColorPicker implements OnChanges {
|
|
|
50
66
|
@Input({ alias: 'debounceTimeout' })
|
|
51
67
|
debounceTimeout?: any;
|
|
52
68
|
|
|
53
|
-
/** The current color value. */
|
|
54
|
-
@Input({ alias: 'value' })
|
|
55
|
-
value?: string;
|
|
56
|
-
|
|
57
|
-
/** Whether the control is disabled (non-interactive). */
|
|
58
|
-
@Input({ alias: 'disabled', transform: booleanAttribute })
|
|
59
|
-
disabled?: boolean;
|
|
60
|
-
|
|
61
|
-
/** Disables the alpha (opacity) channel in the color picker. */
|
|
62
|
-
@Input({ alias: 'noAlphaChannel', transform: booleanAttribute })
|
|
63
|
-
noAlphaChannel?: boolean;
|
|
64
|
-
|
|
65
|
-
/** Placement of the color picker dropdown relative to its trigger. */
|
|
66
|
-
@Input({ alias: 'placement' })
|
|
67
|
-
placement?: Placement;
|
|
68
|
-
|
|
69
69
|
/** Emitted when the option value changes. With `live-interactions`, emitted on every color change and carries `interaction` inside a gesture. */
|
|
70
70
|
readonly luzmoOptionChanged = output<CustomEvent<ItemOptionChangedEventDetail>>({ alias: 'luzmoOptionChanged' });
|
|
71
71
|
|
|
@@ -87,6 +87,15 @@ export class LuzmoItemOptionColorPicker implements OnChanges {
|
|
|
87
87
|
ngOnChanges(changes: SimpleChanges): void {
|
|
88
88
|
for (const key of Object.keys(changes)) {
|
|
89
89
|
switch (key) {
|
|
90
|
+
case 'value':
|
|
91
|
+
this.setHostProperty('value', changes['value'].currentValue);
|
|
92
|
+
break;
|
|
93
|
+
case 'disabled':
|
|
94
|
+
this.setHostProperty('disabled', changes['disabled'].currentValue);
|
|
95
|
+
break;
|
|
96
|
+
case 'noAlphaChannel':
|
|
97
|
+
this.setHostProperty('noAlphaChannel', changes['noAlphaChannel'].currentValue);
|
|
98
|
+
break;
|
|
90
99
|
case 'swatches':
|
|
91
100
|
this.setHostProperty('swatches', changes['swatches'].currentValue);
|
|
92
101
|
break;
|
|
@@ -96,6 +105,9 @@ export class LuzmoItemOptionColorPicker implements OnChanges {
|
|
|
96
105
|
case 'shape':
|
|
97
106
|
this.setHostProperty('shape', changes['shape'].currentValue);
|
|
98
107
|
break;
|
|
108
|
+
case 'placement':
|
|
109
|
+
this.setHostProperty('placement', changes['placement'].currentValue);
|
|
110
|
+
break;
|
|
99
111
|
case 'debounce':
|
|
100
112
|
this.setHostProperty('debounce', changes['debounce'].currentValue);
|
|
101
113
|
break;
|
|
@@ -105,18 +117,6 @@ export class LuzmoItemOptionColorPicker implements OnChanges {
|
|
|
105
117
|
case 'debounceTimeout':
|
|
106
118
|
this.setHostProperty('debounceTimeout', changes['debounceTimeout'].currentValue);
|
|
107
119
|
break;
|
|
108
|
-
case 'value':
|
|
109
|
-
this.setHostProperty('value', changes['value'].currentValue);
|
|
110
|
-
break;
|
|
111
|
-
case 'disabled':
|
|
112
|
-
this.setHostProperty('disabled', changes['disabled'].currentValue);
|
|
113
|
-
break;
|
|
114
|
-
case 'noAlphaChannel':
|
|
115
|
-
this.setHostProperty('noAlphaChannel', changes['noAlphaChannel'].currentValue);
|
|
116
|
-
break;
|
|
117
|
-
case 'placement':
|
|
118
|
-
this.setHostProperty('placement', changes['placement'].currentValue);
|
|
119
|
-
break;
|
|
120
120
|
default:
|
|
121
121
|
break;
|
|
122
122
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { booleanAttribute, ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, OnChanges, output, Renderer2, SimpleChanges } from '@angular/core';
|
|
2
2
|
import '@luzmo/analytics-components-kit/item-option-guidelines';
|
|
3
|
-
import type { LuzmoItemOptionGuidelines as LuzmoItemOptionGuidelinesHostElement, ItemOptionChangedEventDetail, ItemOptionInteractionEventDetail } from '@luzmo/analytics-components-kit/item-option-guidelines';
|
|
3
|
+
import type { LuzmoItemOptionGuidelines as LuzmoItemOptionGuidelinesHostElement, Guidelines, ItemOptionChangedEventDetail, ItemOptionInteractionEventDetail } from '@luzmo/analytics-components-kit/item-option-guidelines';
|
|
4
4
|
export type { GuidelineLine, GuidelineLineType, GuidelineStyle, GuidelineStyleType, GuidelineWidth, Guidelines, ItemOptionChangedEventDetail, ItemOptionInteraction, ItemOptionInteractionEventDetail } from '@luzmo/analytics-components-kit/item-option-guidelines';
|
|
5
5
|
|
|
6
6
|
@Component({
|
|
@@ -25,6 +25,18 @@ export class LuzmoItemOptionGuidelines implements OnChanges {
|
|
|
25
25
|
return this.host;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
/** The current guidelines value (`lines` plus shared `style`). */
|
|
29
|
+
@Input({ alias: 'value' })
|
|
30
|
+
value?: Guidelines;
|
|
31
|
+
|
|
32
|
+
/** Allowed guideline calculation types for this chart (from the option config enum). */
|
|
33
|
+
@Input({ alias: 'lineTypes' })
|
|
34
|
+
lineTypes?: string[];
|
|
35
|
+
|
|
36
|
+
/** Display labels for guideline types (key → label). Missing keys fall back to built-in copy. */
|
|
37
|
+
@Input({ alias: 'lineTypeLabels' })
|
|
38
|
+
lineTypeLabels?: Record<string, string>;
|
|
39
|
+
|
|
28
40
|
/** Default color used when adding a guideline. */
|
|
29
41
|
@Input({ alias: 'defaultColor' })
|
|
30
42
|
defaultColor?: string;
|
|
@@ -58,6 +70,15 @@ export class LuzmoItemOptionGuidelines implements OnChanges {
|
|
|
58
70
|
ngOnChanges(changes: SimpleChanges): void {
|
|
59
71
|
for (const key of Object.keys(changes)) {
|
|
60
72
|
switch (key) {
|
|
73
|
+
case 'value':
|
|
74
|
+
this.setHostProperty('value', changes['value'].currentValue);
|
|
75
|
+
break;
|
|
76
|
+
case 'lineTypes':
|
|
77
|
+
this.setHostProperty('lineTypes', changes['lineTypes'].currentValue);
|
|
78
|
+
break;
|
|
79
|
+
case 'lineTypeLabels':
|
|
80
|
+
this.setHostProperty('lineTypeLabels', changes['lineTypeLabels'].currentValue);
|
|
81
|
+
break;
|
|
61
82
|
case 'defaultColor':
|
|
62
83
|
this.setHostProperty('defaultColor', changes['defaultColor'].currentValue);
|
|
63
84
|
break;
|
|
@@ -25,10 +25,6 @@ export class LuzmoItemOptionMultiLanguageField implements OnChanges {
|
|
|
25
25
|
return this.host;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
/** Internal timer handle used to debounce change events. */
|
|
29
|
-
@Input({ alias: 'debounceTimeout' })
|
|
30
|
-
debounceTimeout?: any;
|
|
31
|
-
|
|
32
28
|
/** The current value per language (language code → text). */
|
|
33
29
|
@Input({ alias: 'value' })
|
|
34
30
|
value?: Record<string, string>;
|
|
@@ -61,6 +57,10 @@ export class LuzmoItemOptionMultiLanguageField implements OnChanges {
|
|
|
61
57
|
@Input({ alias: 'debounce' })
|
|
62
58
|
debounce?: number;
|
|
63
59
|
|
|
60
|
+
/** Internal timer handle used to debounce change events. */
|
|
61
|
+
@Input({ alias: 'debounceTimeout' })
|
|
62
|
+
debounceTimeout?: any;
|
|
63
|
+
|
|
64
64
|
/** Emitted when the option value changes. */
|
|
65
65
|
readonly luzmoOptionChanged = output<CustomEvent<ItemOptionChangedEventDetail>>({ alias: 'luzmoOptionChanged' });
|
|
66
66
|
|
|
@@ -76,9 +76,6 @@ export class LuzmoItemOptionMultiLanguageField implements OnChanges {
|
|
|
76
76
|
ngOnChanges(changes: SimpleChanges): void {
|
|
77
77
|
for (const key of Object.keys(changes)) {
|
|
78
78
|
switch (key) {
|
|
79
|
-
case 'debounceTimeout':
|
|
80
|
-
this.setHostProperty('debounceTimeout', changes['debounceTimeout'].currentValue);
|
|
81
|
-
break;
|
|
82
79
|
case 'value':
|
|
83
80
|
this.setHostProperty('value', changes['value'].currentValue);
|
|
84
81
|
break;
|
|
@@ -103,6 +100,9 @@ export class LuzmoItemOptionMultiLanguageField implements OnChanges {
|
|
|
103
100
|
case 'debounce':
|
|
104
101
|
this.setHostProperty('debounce', changes['debounce'].currentValue);
|
|
105
102
|
break;
|
|
103
|
+
case 'debounceTimeout':
|
|
104
|
+
this.setHostProperty('debounceTimeout', changes['debounceTimeout'].currentValue);
|
|
105
|
+
break;
|
|
106
106
|
default:
|
|
107
107
|
break;
|
|
108
108
|
}
|
|
@@ -25,14 +25,6 @@ export class LuzmoItemOptionNumberField implements OnChanges {
|
|
|
25
25
|
return this.host;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
/** Delay in milliseconds before the change event is emitted after the user stops interacting. */
|
|
29
|
-
@Input({ alias: 'debounce' })
|
|
30
|
-
debounce?: number;
|
|
31
|
-
|
|
32
|
-
/** Internal timer handle used to debounce change events. */
|
|
33
|
-
@Input({ alias: 'debounceTimeout' })
|
|
34
|
-
debounceTimeout?: any;
|
|
35
|
-
|
|
36
28
|
/** Whether the control is disabled (non-interactive). */
|
|
37
29
|
@Input({ alias: 'disabled', transform: booleanAttribute })
|
|
38
30
|
disabled?: boolean;
|
|
@@ -69,6 +61,10 @@ export class LuzmoItemOptionNumberField implements OnChanges {
|
|
|
69
61
|
@Input({ alias: 'unit', transform: booleanAttribute })
|
|
70
62
|
unit?: boolean;
|
|
71
63
|
|
|
64
|
+
/** Delay in milliseconds before the change event is emitted after the user stops interacting. */
|
|
65
|
+
@Input({ alias: 'debounce' })
|
|
66
|
+
debounce?: number;
|
|
67
|
+
|
|
72
68
|
/** Optional transform applied to the stored value before it is displayed in the control. */
|
|
73
69
|
@Input({ alias: 'parseValue' })
|
|
74
70
|
parseValue?: unknown;
|
|
@@ -77,6 +73,10 @@ export class LuzmoItemOptionNumberField implements OnChanges {
|
|
|
77
73
|
@Input({ alias: 'toValue' })
|
|
78
74
|
toValue?: unknown;
|
|
79
75
|
|
|
76
|
+
/** Internal timer handle used to debounce change events. */
|
|
77
|
+
@Input({ alias: 'debounceTimeout' })
|
|
78
|
+
debounceTimeout?: any;
|
|
79
|
+
|
|
80
80
|
/** Emitted when the option value changes. */
|
|
81
81
|
readonly luzmoOptionChanged = output<CustomEvent<ItemOptionChangedEventDetail>>({ alias: 'luzmoOptionChanged' });
|
|
82
82
|
|
|
@@ -92,12 +92,6 @@ export class LuzmoItemOptionNumberField implements OnChanges {
|
|
|
92
92
|
ngOnChanges(changes: SimpleChanges): void {
|
|
93
93
|
for (const key of Object.keys(changes)) {
|
|
94
94
|
switch (key) {
|
|
95
|
-
case 'debounce':
|
|
96
|
-
this.setHostProperty('debounce', changes['debounce'].currentValue);
|
|
97
|
-
break;
|
|
98
|
-
case 'debounceTimeout':
|
|
99
|
-
this.setHostProperty('debounceTimeout', changes['debounceTimeout'].currentValue);
|
|
100
|
-
break;
|
|
101
95
|
case 'disabled':
|
|
102
96
|
this.setHostProperty('disabled', changes['disabled'].currentValue);
|
|
103
97
|
break;
|
|
@@ -125,12 +119,18 @@ export class LuzmoItemOptionNumberField implements OnChanges {
|
|
|
125
119
|
case 'unit':
|
|
126
120
|
this.setHostProperty('unit', changes['unit'].currentValue);
|
|
127
121
|
break;
|
|
122
|
+
case 'debounce':
|
|
123
|
+
this.setHostProperty('debounce', changes['debounce'].currentValue);
|
|
124
|
+
break;
|
|
128
125
|
case 'parseValue':
|
|
129
126
|
this.setHostProperty('parseValue', changes['parseValue'].currentValue);
|
|
130
127
|
break;
|
|
131
128
|
case 'toValue':
|
|
132
129
|
this.setHostProperty('toValue', changes['toValue'].currentValue);
|
|
133
130
|
break;
|
|
131
|
+
case 'debounceTimeout':
|
|
132
|
+
this.setHostProperty('debounceTimeout', changes['debounceTimeout'].currentValue);
|
|
133
|
+
break;
|
|
134
134
|
default:
|
|
135
135
|
break;
|
|
136
136
|
}
|
|
@@ -25,14 +25,6 @@ export class LuzmoItemOptionPositionsNumberField implements OnChanges {
|
|
|
25
25
|
return this.host;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
/** The value applied to all positions when sync is enabled. */
|
|
29
|
-
@Input({ alias: 'syncedValue' })
|
|
30
|
-
syncedValue?: number;
|
|
31
|
-
|
|
32
|
-
/** Internal timer handle used to debounce change events. */
|
|
33
|
-
@Input({ alias: 'debounceTimeout' })
|
|
34
|
-
debounceTimeout?: any;
|
|
35
|
-
|
|
36
28
|
/** Which positions to render input fields for (e.g. top/right/bottom/left, or corners and center). */
|
|
37
29
|
@Input({ alias: 'positions' })
|
|
38
30
|
positions?: ('top' | 'right' | 'bottom' | 'left' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'center')[];
|
|
@@ -65,6 +57,14 @@ export class LuzmoItemOptionPositionsNumberField implements OnChanges {
|
|
|
65
57
|
@Input({ alias: 'sync', transform: booleanAttribute })
|
|
66
58
|
sync?: boolean;
|
|
67
59
|
|
|
60
|
+
/** The value applied to all positions when sync is enabled. */
|
|
61
|
+
@Input({ alias: 'syncedValue' })
|
|
62
|
+
syncedValue?: number;
|
|
63
|
+
|
|
64
|
+
/** Internal timer handle used to debounce change events. */
|
|
65
|
+
@Input({ alias: 'debounceTimeout' })
|
|
66
|
+
debounceTimeout?: any;
|
|
67
|
+
|
|
68
68
|
/** Emitted when the option value changes. */
|
|
69
69
|
readonly luzmoOptionChanged = output<CustomEvent<ItemOptionChangedEventDetail>>({ alias: 'luzmoOptionChanged' });
|
|
70
70
|
|
|
@@ -80,12 +80,6 @@ export class LuzmoItemOptionPositionsNumberField implements OnChanges {
|
|
|
80
80
|
ngOnChanges(changes: SimpleChanges): void {
|
|
81
81
|
for (const key of Object.keys(changes)) {
|
|
82
82
|
switch (key) {
|
|
83
|
-
case 'syncedValue':
|
|
84
|
-
this.setHostProperty('syncedValue', changes['syncedValue'].currentValue);
|
|
85
|
-
break;
|
|
86
|
-
case 'debounceTimeout':
|
|
87
|
-
this.setHostProperty('debounceTimeout', changes['debounceTimeout'].currentValue);
|
|
88
|
-
break;
|
|
89
83
|
case 'positions':
|
|
90
84
|
this.setHostProperty('positions', changes['positions'].currentValue);
|
|
91
85
|
break;
|
|
@@ -110,6 +104,12 @@ export class LuzmoItemOptionPositionsNumberField implements OnChanges {
|
|
|
110
104
|
case 'sync':
|
|
111
105
|
this.setHostProperty('sync', changes['sync'].currentValue);
|
|
112
106
|
break;
|
|
107
|
+
case 'syncedValue':
|
|
108
|
+
this.setHostProperty('syncedValue', changes['syncedValue'].currentValue);
|
|
109
|
+
break;
|
|
110
|
+
case 'debounceTimeout':
|
|
111
|
+
this.setHostProperty('debounceTimeout', changes['debounceTimeout'].currentValue);
|
|
112
|
+
break;
|
|
113
113
|
default:
|
|
114
114
|
break;
|
|
115
115
|
}
|