@luzmo/analytics-components-kit 1.1.1 → 1.3.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 +10 -2
- package/angular/components/interactive-viz-item.ts +41 -4
- package/angular/components/item-option-color-picker.ts +30 -3
- package/angular/components/item-option-color-range.ts +30 -3
- package/angular/components/item-option-guidelines.ts +31 -4
- package/angular/components/item-option-panel.ts +41 -4
- package/angular/components/item-option-slider.ts +41 -4
- package/angular/components/item-option.ts +41 -4
- package/angular/esm/components/interactive-viz-item.d.ts +14 -5
- package/angular/esm/components/interactive-viz-item.js +30 -4
- package/angular/esm/components/item-option-color-picker.d.ts +11 -4
- package/angular/esm/components/item-option-color-picker.js +23 -3
- package/angular/esm/components/item-option-color-range.d.ts +11 -4
- package/angular/esm/components/item-option-color-range.js +23 -3
- package/angular/esm/components/item-option-guidelines.d.ts +11 -4
- package/angular/esm/components/item-option-guidelines.js +24 -4
- package/angular/esm/components/item-option-panel.d.ts +13 -4
- package/angular/esm/components/item-option-panel.js +30 -4
- package/angular/esm/components/item-option-slider.d.ts +13 -4
- package/angular/esm/components/item-option-slider.js +30 -4
- package/angular/esm/components/item-option.d.ts +13 -4
- package/angular/esm/components/item-option.js +30 -4
- package/angular/package.json +2 -2
- package/angular/utils/option-interaction/index.d.ts +2 -0
- package/angular/utils/option-interaction/is-same-option-value.d.ts +10 -0
- package/angular/utils/option-interaction/option-interaction-controller.d.ts +54 -0
- package/angular/utils/option-interaction/tests/option-interaction-controller.test.d.ts +1 -0
- package/angular/utils/store/base-store.d.ts +9 -0
- package/angular/utils/store/tests/store-base-history.test.d.ts +1 -0
- 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-CzIuDtAq.cjs} +1 -1
- package/components/{add-to-dashboard-NcVHlqrc.js → add-to-dashboard-DGC0_hRB.js} +1 -1
- package/components/{base-store-SgJsjLap.cjs → base-store-D3whjduR.cjs} +1 -1
- package/components/{base-store-g0dt7ru7.js → base-store-DQYj8A1W.js} +3 -0
- package/components/{chart-helpers-Dng_LGfq.js → chart-helpers-Cbl3sRra.js} +3 -2
- package/components/chart-helpers-fMnqHRzC.cjs +20 -0
- package/components/{choropleth-map-options.config-D9-u-NwX.js → choropleth-map-options.config-Blu0Z2tR.js} +1 -1
- package/components/{choropleth-map-options.config-CXDGMiSJ.cjs → choropleth-map-options.config-DwFJ00CS.cjs} +1 -1
- package/components/{color-range-utils-CUCTsRXM.js → color-range-utils-CgwRGUkg.js} +18 -18
- package/components/{color-range-utils-BCFQAeY1.cjs → color-range-utils-D8uygiMe.cjs} +1 -1
- package/components/{heat-map-options.config-ChZeslEy.js → heat-map-options.config-BQkhkLPb.js} +16 -16
- package/components/{heat-map-options.config-DiNa8NnG.cjs → heat-map-options.config-DjQkB039.cjs} +1 -1
- package/components/{heat-table-options.config-BPCszrFn.js → heat-table-options.config-CMWWTeyo.js} +1 -1
- package/components/{heat-table-options.config-BvE6coaV.cjs → heat-table-options.config-D21xtaIk.cjs} +1 -1
- package/components/index.cjs +1 -1
- package/components/index.js +9 -9
- package/components/interactive-viz-item/index.cjs +1 -1
- package/components/interactive-viz-item/index.d.ts +2 -1
- package/components/interactive-viz-item/index.js +2 -2
- package/components/interactive-viz-item/interactive-viz-item.d.ts +34 -2
- package/components/interactive-viz-item/types.d.ts +17 -0
- package/components/{interactive-viz-item-CofUkpP6.js → interactive-viz-item-BKLOmawA.js} +166 -100
- package/components/interactive-viz-item-ojdH1uk0.cjs +268 -0
- package/components/is-same-option-value-B2oyvEqT.js +42 -0
- package/components/is-same-option-value-Cf6BQcs7.cjs +20 -0
- package/components/item-option/helpers/control-markup.d.ts +7 -0
- package/components/item-option/index.cjs +1 -1
- package/components/item-option/index.d.ts +1 -1
- package/components/item-option/index.js +1 -1
- package/components/item-option/item-option.d.ts +23 -2
- package/components/item-option/types.d.ts +19 -0
- package/components/{item-option-Cgx3c08E.js → item-option-DKLRnicU.js} +182 -136
- package/components/item-option-DpLdospV.cjs +285 -0
- package/components/item-option-color-picker/index.cjs +1 -1
- package/components/item-option-color-picker/index.d.ts +1 -1
- package/components/item-option-color-picker/index.js +1 -1
- package/components/item-option-color-picker/item-option-color-picker.d.ts +17 -1
- package/components/item-option-color-picker-CNW7GsCO.cjs +37 -0
- package/components/item-option-color-picker-DDvsY7hV.js +129 -0
- package/components/item-option-color-range/index.cjs +1 -1
- package/components/item-option-color-range/index.d.ts +1 -1
- package/components/item-option-color-range/index.js +1 -1
- package/components/item-option-color-range/item-option-color-range.d.ts +20 -1
- package/components/item-option-color-range-BqSbuSZh.cjs +101 -0
- package/components/item-option-color-range-FQduqtz3.js +265 -0
- package/components/item-option-guidelines/index.cjs +1 -1
- package/components/item-option-guidelines/index.d.ts +1 -1
- package/components/item-option-guidelines/index.js +1 -1
- package/components/item-option-guidelines/item-option-guidelines.d.ts +16 -1
- package/components/{item-option-guidelines-DNJevmVD.js → item-option-guidelines-k5DwMONo.js} +132 -104
- package/components/item-option-guidelines-z9BsGR-l.cjs +138 -0
- package/components/item-option-panel/index.cjs +1 -1
- package/components/item-option-panel/index.d.ts +1 -1
- package/components/item-option-panel/index.js +1 -1
- package/components/item-option-panel/item-option-panel.d.ts +12 -1
- package/components/{item-option-panel-DHdnisRb.js → item-option-panel-BLXWIbjX.js} +18 -6
- package/components/{item-option-panel-Dl3aYBNe.cjs → item-option-panel-CU51qvgV.cjs} +6 -4
- package/components/item-option-slider/index.cjs +1 -1
- package/components/item-option-slider/index.d.ts +1 -1
- package/components/item-option-slider/index.js +1 -1
- package/components/item-option-slider/item-option-slider.d.ts +15 -2
- package/components/item-option-slider-BKtJfL3D.js +119 -0
- package/components/item-option-slider-Kz2eFBql.cjs +36 -0
- package/components/item-options-configs.cjs +1 -1
- package/components/item-options-configs.js +5 -5
- package/components/option-interaction-controller-B8S1N_Oo.js +90 -0
- package/components/option-interaction-controller-D0U-CTpZ.cjs +20 -0
- package/components/{route-map-options.config-DdCaVtIF.cjs → route-map-options.config-DER6ENky.cjs} +1 -1
- package/components/{route-map-options.config-B7vT6KG_.js → route-map-options.config-DTcS47fW.js} +1 -1
- package/components/{spike-map-options.config-DkmRZ1JZ.js → spike-map-options.config-CPYfKWoF.js} +1 -1
- package/components/{spike-map-options.config-B3hDh2qU.cjs → spike-map-options.config-DeF1Whq5.cjs} +1 -1
- package/components/utils/store.cjs +1 -1
- package/components/utils/store.js +1 -1
- package/custom-elements.json +418 -104
- package/package.json +2 -2
- package/react/components/interactive-viz-item.component.ts +11 -2
- package/react/components/item-option-color-picker.component.ts +9 -3
- package/react/components/item-option-color-range.component.ts +9 -3
- package/react/components/item-option-guidelines.component.ts +9 -3
- package/react/components/item-option-panel.component.ts +12 -3
- package/react/components/item-option-slider.component.ts +12 -3
- package/react/components/item-option.component.ts +12 -3
- package/react/esm/components/interactive-viz-item.component.d.ts +8 -2
- package/react/esm/components/interactive-viz-item.component.js +7 -1
- package/react/esm/components/item-option-color-picker.component.d.ts +6 -2
- package/react/esm/components/item-option-color-picker.component.js +6 -2
- package/react/esm/components/item-option-color-range.component.d.ts +6 -2
- package/react/esm/components/item-option-color-range.component.js +6 -2
- package/react/esm/components/item-option-guidelines.component.d.ts +6 -2
- package/react/esm/components/item-option-guidelines.component.js +6 -2
- package/react/esm/components/item-option-panel.component.d.ts +8 -2
- package/react/esm/components/item-option-panel.component.js +8 -2
- package/react/esm/components/item-option-slider.component.d.ts +8 -2
- package/react/esm/components/item-option-slider.component.js +8 -2
- package/react/esm/components/item-option.component.d.ts +8 -2
- package/react/esm/components/item-option.component.js +8 -2
- package/react/luzmo-stub.d.ts +7 -0
- package/react/package.json +2 -2
- package/standalone/add-to-dashboard.js +40 -40
- package/standalone/chunks/{chart-helpers-DsIGsaDc.js → chart-helpers-CR-EUEPf.js} +2 -2
- package/standalone/chunks/{choropleth-map-options.config-Cs4Kvr9h.js → choropleth-map-options.config-CDMjKnJD.js} +1 -1
- package/standalone/chunks/{color-range-utils-CKDpd3gZ.js → color-range-utils-BVyHBRiq.js} +1 -1
- package/standalone/chunks/de-BkB0q1Eg.js +2 -0
- package/standalone/chunks/display-settings-binning-BeLLxd3i.js +38 -0
- package/standalone/chunks/display-settings-datetime-BkeiKIVV.js +199 -0
- package/standalone/chunks/display-settings-grand-totals-BuhpQKJ6.js +26 -0
- package/standalone/chunks/display-settings-numeric-m30IYI7I.js +172 -0
- package/standalone/chunks/display-settings-period-over-period-CqDlOSRn.js +209 -0
- package/standalone/chunks/embed-Bv1ps-EM.js +260 -0
- package/standalone/chunks/en-63f7j4v7.js +2 -0
- package/standalone/chunks/en-GB-QAmXQf8W.js +2 -0
- package/standalone/chunks/en-US-63f7j4v7.js +2 -0
- package/standalone/chunks/es-Bo0jStZn.js +2 -0
- package/standalone/chunks/{filters-DKgJcQGP.js → filters-CxgBXUF1.js} +61 -61
- package/standalone/chunks/{formula-codemirror-BbyvNEVD.js → formula-codemirror-Cq94j3-f.js} +17 -17
- package/standalone/chunks/fr-Co_qVhhV.js +2 -0
- package/standalone/chunks/{heat-map-options.config-DF5kjOOe.js → heat-map-options.config-DDQMD38W.js} +1 -1
- package/standalone/chunks/{heat-table-options.config-DaePzfHG.js → heat-table-options.config-B4K0Ygug.js} +1 -1
- package/standalone/chunks/is-same-option-value-7kXNF4st.js +2 -0
- package/standalone/chunks/item-option-action-button-group-BoyqF9vt.js +35 -0
- package/standalone/chunks/item-option-base-CBcDT8MX.js +38 -0
- package/standalone/chunks/item-option-color-palette-picker-C9PGAv4V.js +22 -0
- package/standalone/chunks/item-option-color-picker-D4fVJlqF.js +19 -0
- package/standalone/chunks/item-option-color-range-BlAdTguE.js +83 -0
- package/standalone/chunks/item-option-guidelines-DMsYsHDu.js +120 -0
- package/standalone/chunks/{item-option-multi-language-field-DPPpN2qg.js → item-option-multi-language-field-NUbm1drg.js} +1 -1
- package/standalone/chunks/{item-option-number-field-CkqJjInE.js → item-option-number-field-DRp7kbHL.js} +1 -1
- package/standalone/chunks/item-option-panel-cXrRclzM.js +316 -0
- package/standalone/chunks/{item-option-picker-BnwQPT9A.js → item-option-picker-Ba09L4Cs.js} +1 -1
- package/standalone/chunks/item-option-position-picker-GEGTnhjw.js +14 -0
- package/standalone/chunks/item-option-positions-number-field-n44s1k5v.js +31 -0
- package/standalone/chunks/{item-option-radio-button-group-BkymJq3E.js → item-option-radio-button-group-3s_b1NvR.js} +1 -1
- package/standalone/chunks/item-option-slider-DtY65Gxk.js +18 -0
- package/standalone/chunks/item-option-switch-4sJaI0mx.js +12 -0
- package/standalone/chunks/{item-option-text-field-D7bkuhsv.js → item-option-text-field-Bt6Lj6kh.js} +1 -1
- package/standalone/chunks/{item-slot-picker-panel-D4BMxGs9.js → item-slot-picker-panel-BOSVFBIy.js} +43 -43
- package/standalone/chunks/load-data-fields-for-datasets-CDlut-6S.js +25 -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-BuwRr21c.js +2 -0
- package/standalone/chunks/{route-map-options.config-D7FfzIiU.js → route-map-options.config-CGBkHnhM.js} +1 -1
- package/standalone/chunks/{spike-map-options.config-CZiFzDm9.js → spike-map-options.config-CSenlJ_F.js} +1 -1
- package/standalone/interactive-viz-item.js +62 -55
- package/standalone/item-grid.js +10 -10
- package/standalone/manifest.json +44 -43
- package/utils/option-interaction/index.d.ts +2 -0
- package/utils/option-interaction/is-same-option-value.d.ts +10 -0
- package/utils/option-interaction/option-interaction-controller.d.ts +54 -0
- package/utils/option-interaction/tests/option-interaction-controller.test.d.ts +1 -0
- package/utils/store/base-store.d.ts +9 -0
- package/utils/store/tests/store-base-history.test.d.ts +1 -0
- package/components/chart-helpers-ufZ6VbXs.cjs +0 -20
- package/components/interactive-viz-item-D537mo3l.cjs +0 -261
- package/components/item-option-CqGDFdPj.cjs +0 -269
- package/components/item-option-color-picker-BpPoOO2b.cjs +0 -34
- package/components/item-option-color-picker-cojuCvu5.js +0 -84
- package/components/item-option-color-range-CMBEx1fi.cjs +0 -98
- package/components/item-option-color-range-Dt7Bv06p.js +0 -217
- package/components/item-option-guidelines-Beh0DlG0.cjs +0 -135
- package/components/item-option-slider-Bo5vs6nr.js +0 -89
- package/components/item-option-slider-CyWKWr5D.cjs +0 -33
- package/standalone/chunks/color-7IgCGZKz.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-BfHBKhIe.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-Cr7ujQNO.js +0 -16
- package/standalone/chunks/item-option-color-range-CyJd1LZ_.js +0 -80
- package/standalone/chunks/item-option-guidelines-6NjpzS6b.js +0 -117
- package/standalone/chunks/item-option-panel-VxvWU56c.js +0 -298
- 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-l9wt7_0c.js +0 -15
- 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/localized-decorator-DJVBmJVH.js +0 -2
- package/standalone/chunks/nl-CViTevL3.js +0 -2
|
@@ -26,7 +26,7 @@ export class LuzmoInteractiveVizItem {
|
|
|
26
26
|
addToDashboard;
|
|
27
27
|
/** Click-to-filter on the embedded chart, forwarded as its `canFilter`. The `can-filter` attribute means `'all'`; unset keeps it off. */
|
|
28
28
|
canFilter;
|
|
29
|
-
/** Loose chart config (type, options, slots, filters); slots may use the keyed-object form. */
|
|
29
|
+
/** Loose chart config (type, options, slots, filters, inlineData); slots may use the keyed-object form. */
|
|
30
30
|
chart;
|
|
31
31
|
/** Current feedback (drives the thumbs up/down selection). */
|
|
32
32
|
feedback;
|
|
@@ -50,12 +50,20 @@ export class LuzmoInteractiveVizItem {
|
|
|
50
50
|
hideConfigPanel;
|
|
51
51
|
/** When present, chart changes are only emitted and the host sets `chart`; otherwise they are applied here and still emitted. */
|
|
52
52
|
controlled;
|
|
53
|
+
/** 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. */
|
|
54
|
+
liveInteractions;
|
|
53
55
|
/** The size of the element */
|
|
54
56
|
size;
|
|
55
57
|
/** Fired when the inline actions (ranking, sort, display mode) change the chart options. Applied to `chart` first unless `controlled` is set. */
|
|
56
58
|
luzmoChartOptionsChanged = output({ alias: 'luzmoChartOptionsChanged' });
|
|
57
|
-
/** Fired when the config panel changes slots, filters, or options (full chart). Applied to `chart` first unless `controlled` is set. */
|
|
59
|
+
/** Fired when the config panel changes slots, filters, or options (full chart). Applied to `chart` first unless `controlled` is set. With `live-interactions`, option updates inside a gesture carry `interaction`. */
|
|
58
60
|
luzmoChartChanged = output({ alias: 'luzmoChartChanged' });
|
|
61
|
+
/** With `live-interactions`: an option drag or held key in the config panel first changed its value, right before that `luzmo-chart-changed`; `detail.optionKey` names the option and `detail.chart` is the chart it started on. */
|
|
62
|
+
luzmoOptionInteractionStart = output({ alias: 'luzmoOptionInteractionStart' });
|
|
63
|
+
/** With `live-interactions`: the gesture ended, after its last `luzmo-chart-changed`. `detail.changed` is false when the value is back at its start; `detail.chart` is still the chart it started on. */
|
|
64
|
+
luzmoOptionInteractionEnd = output({ alias: 'luzmoOptionInteractionEnd' });
|
|
65
|
+
/** With `live-interactions`: the gesture was cancelled and the control reverted to its start value. */
|
|
66
|
+
luzmoOptionInteractionCancel = output({ alias: 'luzmoOptionInteractionCancel' });
|
|
59
67
|
/** Fired when the user changes the thumbs up/down rating. Never applied to `feedback`; the host owns it in both modes. */
|
|
60
68
|
luzmoFeedbackChanged = output({ alias: 'luzmoFeedbackChanged' });
|
|
61
69
|
/** Fired by the inner `luzmo-add-to-dashboard` after the chart was saved. */
|
|
@@ -118,6 +126,9 @@ export class LuzmoInteractiveVizItem {
|
|
|
118
126
|
case 'controlled':
|
|
119
127
|
this.setHostProperty('controlled', changes['controlled'].currentValue);
|
|
120
128
|
break;
|
|
129
|
+
case 'liveInteractions':
|
|
130
|
+
this.setHostProperty('liveInteractions', changes['liveInteractions'].currentValue);
|
|
131
|
+
break;
|
|
121
132
|
case 'size':
|
|
122
133
|
this.setHostProperty('size', changes['size'].currentValue);
|
|
123
134
|
break;
|
|
@@ -144,6 +155,18 @@ export class LuzmoInteractiveVizItem {
|
|
|
144
155
|
const typed = event;
|
|
145
156
|
this.luzmoChartChanged.emit(typed);
|
|
146
157
|
}));
|
|
158
|
+
this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-option-interaction-start', (event) => {
|
|
159
|
+
const typed = event;
|
|
160
|
+
this.luzmoOptionInteractionStart.emit(typed);
|
|
161
|
+
}));
|
|
162
|
+
this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-option-interaction-end', (event) => {
|
|
163
|
+
const typed = event;
|
|
164
|
+
this.luzmoOptionInteractionEnd.emit(typed);
|
|
165
|
+
}));
|
|
166
|
+
this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-option-interaction-cancel', (event) => {
|
|
167
|
+
const typed = event;
|
|
168
|
+
this.luzmoOptionInteractionCancel.emit(typed);
|
|
169
|
+
}));
|
|
147
170
|
this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-feedback-changed', (event) => {
|
|
148
171
|
const typed = event;
|
|
149
172
|
this.luzmoFeedbackChanged.emit(typed);
|
|
@@ -158,7 +181,7 @@ export class LuzmoInteractiveVizItem {
|
|
|
158
181
|
}));
|
|
159
182
|
}
|
|
160
183
|
static ɵfac = function LuzmoInteractiveVizItem_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoInteractiveVizItem)(); };
|
|
161
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoInteractiveVizItem, selectors: [["luzmo-interactive-viz-item"]], inputs: { language: "language", addToDashboard: [2, "addToDashboard", "addToDashboard", booleanAttribute], canFilter: "canFilter", chart: "chart", feedback: "feedback", messageId: "messageId", authKey: "authKey", authToken: "authToken", apiUrl: "apiUrl", appServer: "appServer", contentLanguage: "contentLanguage", hideActions: [2, "hideActions", "hideActions", booleanAttribute], hideFeedback: [2, "hideFeedback", "hideFeedback", booleanAttribute], hideConfigPanel: [2, "hideConfigPanel", "hideConfigPanel", booleanAttribute], controlled: [2, "controlled", "controlled", booleanAttribute], size: "size" }, outputs: { luzmoChartOptionsChanged: "luzmoChartOptionsChanged", luzmoChartChanged: "luzmoChartChanged", luzmoFeedbackChanged: "luzmoFeedbackChanged", luzmoChartAdded: "luzmoChartAdded", luzmoChartAddFailed: "luzmoChartAddFailed" }, exportAs: ["luzmoInteractiveVizItem"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoInteractiveVizItem_Template(rf, ctx) { if (rf & 1) {
|
|
184
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoInteractiveVizItem, selectors: [["luzmo-interactive-viz-item"]], inputs: { language: "language", addToDashboard: [2, "addToDashboard", "addToDashboard", booleanAttribute], canFilter: "canFilter", chart: "chart", feedback: "feedback", messageId: "messageId", authKey: "authKey", authToken: "authToken", apiUrl: "apiUrl", appServer: "appServer", contentLanguage: "contentLanguage", hideActions: [2, "hideActions", "hideActions", booleanAttribute], hideFeedback: [2, "hideFeedback", "hideFeedback", booleanAttribute], hideConfigPanel: [2, "hideConfigPanel", "hideConfigPanel", booleanAttribute], controlled: [2, "controlled", "controlled", booleanAttribute], liveInteractions: [2, "liveInteractions", "liveInteractions", booleanAttribute], size: "size" }, outputs: { luzmoChartOptionsChanged: "luzmoChartOptionsChanged", luzmoChartChanged: "luzmoChartChanged", luzmoOptionInteractionStart: "luzmoOptionInteractionStart", luzmoOptionInteractionEnd: "luzmoOptionInteractionEnd", luzmoOptionInteractionCancel: "luzmoOptionInteractionCancel", luzmoFeedbackChanged: "luzmoFeedbackChanged", luzmoChartAdded: "luzmoChartAdded", luzmoChartAddFailed: "luzmoChartAddFailed" }, exportAs: ["luzmoInteractiveVizItem"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoInteractiveVizItem_Template(rf, ctx) { if (rf & 1) {
|
|
162
185
|
i0.ɵɵprojectionDef();
|
|
163
186
|
i0.ɵɵprojection(0);
|
|
164
187
|
} }, encapsulation: 2 });
|
|
@@ -217,8 +240,11 @@ export class LuzmoInteractiveVizItem {
|
|
|
217
240
|
}], controlled: [{
|
|
218
241
|
type: Input,
|
|
219
242
|
args: [{ alias: 'controlled', transform: booleanAttribute }]
|
|
243
|
+
}], liveInteractions: [{
|
|
244
|
+
type: Input,
|
|
245
|
+
args: [{ alias: 'liveInteractions', transform: booleanAttribute }]
|
|
220
246
|
}], size: [{
|
|
221
247
|
type: Input,
|
|
222
248
|
args: [{ alias: 'size' }]
|
|
223
|
-
}], luzmoChartOptionsChanged: [{ type: i0.Output, args: ["luzmoChartOptionsChanged"] }], luzmoChartChanged: [{ type: i0.Output, args: ["luzmoChartChanged"] }], luzmoFeedbackChanged: [{ type: i0.Output, args: ["luzmoFeedbackChanged"] }], luzmoChartAdded: [{ type: i0.Output, args: ["luzmoChartAdded"] }], luzmoChartAddFailed: [{ type: i0.Output, args: ["luzmoChartAddFailed"] }] }); })();
|
|
249
|
+
}], luzmoChartOptionsChanged: [{ type: i0.Output, args: ["luzmoChartOptionsChanged"] }], luzmoChartChanged: [{ type: i0.Output, args: ["luzmoChartChanged"] }], luzmoOptionInteractionStart: [{ type: i0.Output, args: ["luzmoOptionInteractionStart"] }], luzmoOptionInteractionEnd: [{ type: i0.Output, args: ["luzmoOptionInteractionEnd"] }], luzmoOptionInteractionCancel: [{ type: i0.Output, args: ["luzmoOptionInteractionCancel"] }], luzmoFeedbackChanged: [{ type: i0.Output, args: ["luzmoFeedbackChanged"] }], luzmoChartAdded: [{ type: i0.Output, args: ["luzmoChartAdded"] }], luzmoChartAddFailed: [{ type: i0.Output, args: ["luzmoChartAddFailed"] }] }); })();
|
|
224
250
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoInteractiveVizItem, { className: "LuzmoInteractiveVizItem", filePath: "components/interactive-viz-item.ts", lineNumber: 22 }); })();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import '@luzmo/analytics-components-kit/item-option-color-picker';
|
|
3
|
-
import type { LuzmoItemOptionColorPicker as LuzmoItemOptionColorPickerHostElement, ItemOptionChangedEventDetail } from '@luzmo/analytics-components-kit/item-option-color-picker';
|
|
3
|
+
import type { LuzmoItemOptionColorPicker as LuzmoItemOptionColorPickerHostElement, ItemOptionChangedEventDetail, ItemOptionInteractionEventDetail } from '@luzmo/analytics-components-kit/item-option-color-picker';
|
|
4
4
|
import type { Placement } from '@luzmo/lucero';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export type { ItemOptionChangedEventDetail } from '@luzmo/analytics-components-kit/item-option-color-picker';
|
|
6
|
+
export type { ItemOptionChangedEventDetail, ItemOptionInteraction, ItemOptionInteractionEventDetail } from '@luzmo/analytics-components-kit/item-option-color-picker';
|
|
7
7
|
export declare class LuzmoItemOptionColorPicker implements OnChanges {
|
|
8
8
|
private readonly elementRef;
|
|
9
9
|
private readonly renderer;
|
|
@@ -20,6 +20,8 @@ export declare class LuzmoItemOptionColorPicker implements OnChanges {
|
|
|
20
20
|
shape?: 'circle' | 'rectangle';
|
|
21
21
|
/** Delay in milliseconds before the change event is emitted after the user stops interacting. */
|
|
22
22
|
debounce?: number;
|
|
23
|
+
/** Emits value updates live, without `debounce`, plus interaction lifecycle events for drags and held keys. */
|
|
24
|
+
liveInteractions?: boolean;
|
|
23
25
|
/** Internal timer handle used to debounce change events. */
|
|
24
26
|
debounceTimeout?: any;
|
|
25
27
|
/** The current color value. */
|
|
@@ -30,8 +32,12 @@ export declare class LuzmoItemOptionColorPicker implements OnChanges {
|
|
|
30
32
|
noAlphaChannel?: boolean;
|
|
31
33
|
/** Placement of the color picker dropdown relative to its trigger. */
|
|
32
34
|
placement?: Placement;
|
|
33
|
-
/** Emitted when the option value changes. */
|
|
35
|
+
/** Emitted when the option value changes. With `live-interactions`, emitted on every color change and carries `interaction` inside a gesture. */
|
|
34
36
|
readonly luzmoOptionChanged: import("@angular/core").OutputEmitterRef<CustomEvent<ItemOptionChangedEventDetail>>;
|
|
37
|
+
/** With `live-interactions`: a color area, hue or opacity drag or held key first changed the color, right before that value update. A press that never changes the color emits no lifecycle. */
|
|
38
|
+
readonly luzmoOptionInteractionStart: import("@angular/core").OutputEmitterRef<CustomEvent<ItemOptionInteractionEventDetail>>;
|
|
39
|
+
/** With `live-interactions`: the gesture ended (including when the popover closes), after its last value update. */
|
|
40
|
+
readonly luzmoOptionInteractionEnd: import("@angular/core").OutputEmitterRef<CustomEvent<ItemOptionInteractionEventDetail>>;
|
|
35
41
|
constructor();
|
|
36
42
|
ngOnChanges(changes: SimpleChanges): void;
|
|
37
43
|
/**
|
|
@@ -43,7 +49,8 @@ export declare class LuzmoItemOptionColorPicker implements OnChanges {
|
|
|
43
49
|
private setHostProperty;
|
|
44
50
|
private bindEvents;
|
|
45
51
|
static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoItemOptionColorPicker, never>;
|
|
46
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoItemOptionColorPicker, "luzmo-item-option-color-picker", ["luzmoItemOptionColorPicker"], { "swatches": { "alias": "swatches"; "required": false; }; "rounding": { "alias": "rounding"; "required": false; }; "shape": { "alias": "shape"; "required": false; }; "debounce": { "alias": "debounce"; "required": false; }; "debounceTimeout": { "alias": "debounceTimeout"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "noAlphaChannel": { "alias": "noAlphaChannel"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; }, { "luzmoOptionChanged": "luzmoOptionChanged"; }, never, ["*"], true, never>;
|
|
52
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoItemOptionColorPicker, "luzmo-item-option-color-picker", ["luzmoItemOptionColorPicker"], { "swatches": { "alias": "swatches"; "required": false; }; "rounding": { "alias": "rounding"; "required": false; }; "shape": { "alias": "shape"; "required": false; }; "debounce": { "alias": "debounce"; "required": false; }; "liveInteractions": { "alias": "liveInteractions"; "required": false; }; "debounceTimeout": { "alias": "debounceTimeout"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "noAlphaChannel": { "alias": "noAlphaChannel"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; }, { "luzmoOptionChanged": "luzmoOptionChanged"; "luzmoOptionInteractionStart": "luzmoOptionInteractionStart"; "luzmoOptionInteractionEnd": "luzmoOptionInteractionEnd"; }, never, ["*"], true, never>;
|
|
53
|
+
static ngAcceptInputType_liveInteractions: unknown;
|
|
47
54
|
static ngAcceptInputType_disabled: unknown;
|
|
48
55
|
static ngAcceptInputType_noAlphaChannel: unknown;
|
|
49
56
|
}
|
|
@@ -23,6 +23,8 @@ export class LuzmoItemOptionColorPicker {
|
|
|
23
23
|
shape;
|
|
24
24
|
/** Delay in milliseconds before the change event is emitted after the user stops interacting. */
|
|
25
25
|
debounce;
|
|
26
|
+
/** Emits value updates live, without `debounce`, plus interaction lifecycle events for drags and held keys. */
|
|
27
|
+
liveInteractions;
|
|
26
28
|
/** Internal timer handle used to debounce change events. */
|
|
27
29
|
debounceTimeout;
|
|
28
30
|
/** The current color value. */
|
|
@@ -33,8 +35,12 @@ export class LuzmoItemOptionColorPicker {
|
|
|
33
35
|
noAlphaChannel;
|
|
34
36
|
/** Placement of the color picker dropdown relative to its trigger. */
|
|
35
37
|
placement;
|
|
36
|
-
/** Emitted when the option value changes. */
|
|
38
|
+
/** Emitted when the option value changes. With `live-interactions`, emitted on every color change and carries `interaction` inside a gesture. */
|
|
37
39
|
luzmoOptionChanged = output({ alias: 'luzmoOptionChanged' });
|
|
40
|
+
/** With `live-interactions`: a color area, hue or opacity drag or held key first changed the color, right before that value update. A press that never changes the color emits no lifecycle. */
|
|
41
|
+
luzmoOptionInteractionStart = output({ alias: 'luzmoOptionInteractionStart' });
|
|
42
|
+
/** With `live-interactions`: the gesture ended (including when the popover closes), after its last value update. */
|
|
43
|
+
luzmoOptionInteractionEnd = output({ alias: 'luzmoOptionInteractionEnd' });
|
|
38
44
|
constructor() {
|
|
39
45
|
this.bindEvents();
|
|
40
46
|
this.destroyRef.onDestroy(() => {
|
|
@@ -58,6 +64,9 @@ export class LuzmoItemOptionColorPicker {
|
|
|
58
64
|
case 'debounce':
|
|
59
65
|
this.setHostProperty('debounce', changes['debounce'].currentValue);
|
|
60
66
|
break;
|
|
67
|
+
case 'liveInteractions':
|
|
68
|
+
this.setHostProperty('liveInteractions', changes['liveInteractions'].currentValue);
|
|
69
|
+
break;
|
|
61
70
|
case 'debounceTimeout':
|
|
62
71
|
this.setHostProperty('debounceTimeout', changes['debounceTimeout'].currentValue);
|
|
63
72
|
break;
|
|
@@ -92,9 +101,17 @@ export class LuzmoItemOptionColorPicker {
|
|
|
92
101
|
const typed = event;
|
|
93
102
|
this.luzmoOptionChanged.emit(typed);
|
|
94
103
|
}));
|
|
104
|
+
this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-option-interaction-start', (event) => {
|
|
105
|
+
const typed = event;
|
|
106
|
+
this.luzmoOptionInteractionStart.emit(typed);
|
|
107
|
+
}));
|
|
108
|
+
this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-option-interaction-end', (event) => {
|
|
109
|
+
const typed = event;
|
|
110
|
+
this.luzmoOptionInteractionEnd.emit(typed);
|
|
111
|
+
}));
|
|
95
112
|
}
|
|
96
113
|
static ɵfac = function LuzmoItemOptionColorPicker_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoItemOptionColorPicker)(); };
|
|
97
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoItemOptionColorPicker, selectors: [["luzmo-item-option-color-picker"]], inputs: { swatches: "swatches", rounding: "rounding", shape: "shape", debounce: "debounce", debounceTimeout: "debounceTimeout", value: "value", disabled: [2, "disabled", "disabled", booleanAttribute], noAlphaChannel: [2, "noAlphaChannel", "noAlphaChannel", booleanAttribute], placement: "placement" }, outputs: { luzmoOptionChanged: "luzmoOptionChanged" }, exportAs: ["luzmoItemOptionColorPicker"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoItemOptionColorPicker_Template(rf, ctx) { if (rf & 1) {
|
|
114
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoItemOptionColorPicker, selectors: [["luzmo-item-option-color-picker"]], inputs: { swatches: "swatches", rounding: "rounding", shape: "shape", debounce: "debounce", liveInteractions: [2, "liveInteractions", "liveInteractions", booleanAttribute], debounceTimeout: "debounceTimeout", value: "value", disabled: [2, "disabled", "disabled", booleanAttribute], noAlphaChannel: [2, "noAlphaChannel", "noAlphaChannel", booleanAttribute], placement: "placement" }, outputs: { luzmoOptionChanged: "luzmoOptionChanged", luzmoOptionInteractionStart: "luzmoOptionInteractionStart", luzmoOptionInteractionEnd: "luzmoOptionInteractionEnd" }, exportAs: ["luzmoItemOptionColorPicker"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoItemOptionColorPicker_Template(rf, ctx) { if (rf & 1) {
|
|
98
115
|
i0.ɵɵprojectionDef();
|
|
99
116
|
i0.ɵɵprojection(0);
|
|
100
117
|
} }, encapsulation: 2 });
|
|
@@ -120,6 +137,9 @@ export class LuzmoItemOptionColorPicker {
|
|
|
120
137
|
}], debounce: [{
|
|
121
138
|
type: Input,
|
|
122
139
|
args: [{ alias: 'debounce' }]
|
|
140
|
+
}], liveInteractions: [{
|
|
141
|
+
type: Input,
|
|
142
|
+
args: [{ alias: 'liveInteractions', transform: booleanAttribute }]
|
|
123
143
|
}], debounceTimeout: [{
|
|
124
144
|
type: Input,
|
|
125
145
|
args: [{ alias: 'debounceTimeout' }]
|
|
@@ -135,5 +155,5 @@ export class LuzmoItemOptionColorPicker {
|
|
|
135
155
|
}], placement: [{
|
|
136
156
|
type: Input,
|
|
137
157
|
args: [{ alias: 'placement' }]
|
|
138
|
-
}], luzmoOptionChanged: [{ type: i0.Output, args: ["luzmoOptionChanged"] }] }); })();
|
|
158
|
+
}], luzmoOptionChanged: [{ type: i0.Output, args: ["luzmoOptionChanged"] }], luzmoOptionInteractionStart: [{ type: i0.Output, args: ["luzmoOptionInteractionStart"] }], luzmoOptionInteractionEnd: [{ type: i0.Output, args: ["luzmoOptionInteractionEnd"] }] }); })();
|
|
139
159
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoItemOptionColorPicker, { className: "LuzmoItemOptionColorPicker", filePath: "components/item-option-color-picker.ts", lineNumber: 17 }); })();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import '@luzmo/analytics-components-kit/item-option-color-range';
|
|
3
|
-
import type { LuzmoItemOptionColorRange as LuzmoItemOptionColorRangeHostElement, ItemOptionChangedEventDetail } from '@luzmo/analytics-components-kit/item-option-color-range';
|
|
3
|
+
import type { LuzmoItemOptionColorRange as LuzmoItemOptionColorRangeHostElement, ItemOptionChangedEventDetail, ItemOptionInteractionEventDetail } from '@luzmo/analytics-components-kit/item-option-color-range';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export type { ItemOptionChangedEventDetail } from '@luzmo/analytics-components-kit/item-option-color-range';
|
|
5
|
+
export type { ItemOptionChangedEventDetail, ItemOptionInteraction, ItemOptionInteractionEventDetail } from '@luzmo/analytics-components-kit/item-option-color-range';
|
|
6
6
|
export declare class LuzmoItemOptionColorRange implements OnChanges {
|
|
7
7
|
private readonly elementRef;
|
|
8
8
|
private readonly renderer;
|
|
@@ -35,12 +35,18 @@ export declare class LuzmoItemOptionColorRange implements OnChanges {
|
|
|
35
35
|
reverse?: boolean;
|
|
36
36
|
/** The debounce time in milliseconds */
|
|
37
37
|
debounce?: number;
|
|
38
|
+
/** Emits value updates live, without `debounce`, plus interaction lifecycle events for color drags and held keys */
|
|
39
|
+
liveInteractions?: boolean;
|
|
38
40
|
/** The function to parse the value */
|
|
39
41
|
parseValue?: unknown;
|
|
40
42
|
/** The function to convert the value */
|
|
41
43
|
toValue?: unknown;
|
|
42
|
-
/** Emitted when the option value changes. */
|
|
44
|
+
/** Emitted when the option value changes. With `live-interactions`, emitted immediately and carries `interaction` while a stop's color is dragged. */
|
|
43
45
|
readonly luzmoOptionChanged: import("@angular/core").OutputEmitterRef<CustomEvent<ItemOptionChangedEventDetail>>;
|
|
46
|
+
/** With `live-interactions`: a color drag or held key on one stop first changed its color, right before that value update. Each stop has its own gestures; one that never changes its color emits no lifecycle. */
|
|
47
|
+
readonly luzmoOptionInteractionStart: import("@angular/core").OutputEmitterRef<CustomEvent<ItemOptionInteractionEventDetail>>;
|
|
48
|
+
/** With `live-interactions`: that stop's gesture ended, after its last value update. */
|
|
49
|
+
readonly luzmoOptionInteractionEnd: import("@angular/core").OutputEmitterRef<CustomEvent<ItemOptionInteractionEventDetail>>;
|
|
44
50
|
constructor();
|
|
45
51
|
ngOnChanges(changes: SimpleChanges): void;
|
|
46
52
|
/**
|
|
@@ -52,7 +58,7 @@ export declare class LuzmoItemOptionColorRange implements OnChanges {
|
|
|
52
58
|
private setHostProperty;
|
|
53
59
|
private bindEvents;
|
|
54
60
|
static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoItemOptionColorRange, never>;
|
|
55
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoItemOptionColorRange, "luzmo-item-option-color-range", ["luzmoItemOptionColorRange"], { "value": { "alias": "value"; "required": false; }; "default": { "alias": "default"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "percentage": { "alias": "percentage"; "required": false; }; "noAlphaChannel": { "alias": "noAlphaChannel"; "required": false; }; "editRangeSize": { "alias": "editRangeSize"; "required": false; }; "noValues": { "alias": "noValues"; "required": false; }; "minimumRangeSize": { "alias": "minimumRangeSize"; "required": false; }; "negativeInfinityValue": { "alias": "negativeInfinityValue"; "required": false; }; "readOnlyColorPicker": { "alias": "readOnlyColorPicker"; "required": false; }; "reverse": { "alias": "reverse"; "required": false; }; "debounce": { "alias": "debounce"; "required": false; }; "parseValue": { "alias": "parseValue"; "required": false; }; "toValue": { "alias": "toValue"; "required": false; }; }, { "luzmoOptionChanged": "luzmoOptionChanged"; }, never, ["*"], true, never>;
|
|
61
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoItemOptionColorRange, "luzmo-item-option-color-range", ["luzmoItemOptionColorRange"], { "value": { "alias": "value"; "required": false; }; "default": { "alias": "default"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "percentage": { "alias": "percentage"; "required": false; }; "noAlphaChannel": { "alias": "noAlphaChannel"; "required": false; }; "editRangeSize": { "alias": "editRangeSize"; "required": false; }; "noValues": { "alias": "noValues"; "required": false; }; "minimumRangeSize": { "alias": "minimumRangeSize"; "required": false; }; "negativeInfinityValue": { "alias": "negativeInfinityValue"; "required": false; }; "readOnlyColorPicker": { "alias": "readOnlyColorPicker"; "required": false; }; "reverse": { "alias": "reverse"; "required": false; }; "debounce": { "alias": "debounce"; "required": false; }; "liveInteractions": { "alias": "liveInteractions"; "required": false; }; "parseValue": { "alias": "parseValue"; "required": false; }; "toValue": { "alias": "toValue"; "required": false; }; }, { "luzmoOptionChanged": "luzmoOptionChanged"; "luzmoOptionInteractionStart": "luzmoOptionInteractionStart"; "luzmoOptionInteractionEnd": "luzmoOptionInteractionEnd"; }, never, ["*"], true, never>;
|
|
56
62
|
static ngAcceptInputType_disabled: unknown;
|
|
57
63
|
static ngAcceptInputType_percentage: unknown;
|
|
58
64
|
static ngAcceptInputType_noAlphaChannel: unknown;
|
|
@@ -61,6 +67,7 @@ export declare class LuzmoItemOptionColorRange implements OnChanges {
|
|
|
61
67
|
static ngAcceptInputType_negativeInfinityValue: unknown;
|
|
62
68
|
static ngAcceptInputType_readOnlyColorPicker: unknown;
|
|
63
69
|
static ngAcceptInputType_reverse: unknown;
|
|
70
|
+
static ngAcceptInputType_liveInteractions: unknown;
|
|
64
71
|
}
|
|
65
72
|
/** The underlying custom element type for LuzmoItemOptionColorRange */
|
|
66
73
|
export type LuzmoItemOptionColorRangeElement = LuzmoItemOptionColorRangeHostElement;
|
|
@@ -39,12 +39,18 @@ export class LuzmoItemOptionColorRange {
|
|
|
39
39
|
reverse;
|
|
40
40
|
/** The debounce time in milliseconds */
|
|
41
41
|
debounce;
|
|
42
|
+
/** Emits value updates live, without `debounce`, plus interaction lifecycle events for color drags and held keys */
|
|
43
|
+
liveInteractions;
|
|
42
44
|
/** The function to parse the value */
|
|
43
45
|
parseValue;
|
|
44
46
|
/** The function to convert the value */
|
|
45
47
|
toValue;
|
|
46
|
-
/** Emitted when the option value changes. */
|
|
48
|
+
/** Emitted when the option value changes. With `live-interactions`, emitted immediately and carries `interaction` while a stop's color is dragged. */
|
|
47
49
|
luzmoOptionChanged = output({ alias: 'luzmoOptionChanged' });
|
|
50
|
+
/** With `live-interactions`: a color drag or held key on one stop first changed its color, right before that value update. Each stop has its own gestures; one that never changes its color emits no lifecycle. */
|
|
51
|
+
luzmoOptionInteractionStart = output({ alias: 'luzmoOptionInteractionStart' });
|
|
52
|
+
/** With `live-interactions`: that stop's gesture ended, after its last value update. */
|
|
53
|
+
luzmoOptionInteractionEnd = output({ alias: 'luzmoOptionInteractionEnd' });
|
|
48
54
|
constructor() {
|
|
49
55
|
this.bindEvents();
|
|
50
56
|
this.destroyRef.onDestroy(() => {
|
|
@@ -92,6 +98,9 @@ export class LuzmoItemOptionColorRange {
|
|
|
92
98
|
case 'debounce':
|
|
93
99
|
this.setHostProperty('debounce', changes['debounce'].currentValue);
|
|
94
100
|
break;
|
|
101
|
+
case 'liveInteractions':
|
|
102
|
+
this.setHostProperty('liveInteractions', changes['liveInteractions'].currentValue);
|
|
103
|
+
break;
|
|
95
104
|
case 'parseValue':
|
|
96
105
|
this.setHostProperty('parseValue', changes['parseValue'].currentValue);
|
|
97
106
|
break;
|
|
@@ -117,9 +126,17 @@ export class LuzmoItemOptionColorRange {
|
|
|
117
126
|
const typed = event;
|
|
118
127
|
this.luzmoOptionChanged.emit(typed);
|
|
119
128
|
}));
|
|
129
|
+
this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-option-interaction-start', (event) => {
|
|
130
|
+
const typed = event;
|
|
131
|
+
this.luzmoOptionInteractionStart.emit(typed);
|
|
132
|
+
}));
|
|
133
|
+
this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-option-interaction-end', (event) => {
|
|
134
|
+
const typed = event;
|
|
135
|
+
this.luzmoOptionInteractionEnd.emit(typed);
|
|
136
|
+
}));
|
|
120
137
|
}
|
|
121
138
|
static ɵfac = function LuzmoItemOptionColorRange_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoItemOptionColorRange)(); };
|
|
122
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoItemOptionColorRange, selectors: [["luzmo-item-option-color-range"]], inputs: { value: "value", default: "default", disabled: [2, "disabled", "disabled", booleanAttribute], percentage: [2, "percentage", "percentage", booleanAttribute], noAlphaChannel: [2, "noAlphaChannel", "noAlphaChannel", booleanAttribute], editRangeSize: [2, "editRangeSize", "editRangeSize", booleanAttribute], noValues: [2, "noValues", "noValues", booleanAttribute], minimumRangeSize: "minimumRangeSize", negativeInfinityValue: [2, "negativeInfinityValue", "negativeInfinityValue", booleanAttribute], readOnlyColorPicker: [2, "readOnlyColorPicker", "readOnlyColorPicker", booleanAttribute], reverse: [2, "reverse", "reverse", booleanAttribute], debounce: "debounce", parseValue: "parseValue", toValue: "toValue" }, outputs: { luzmoOptionChanged: "luzmoOptionChanged" }, exportAs: ["luzmoItemOptionColorRange"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoItemOptionColorRange_Template(rf, ctx) { if (rf & 1) {
|
|
139
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoItemOptionColorRange, selectors: [["luzmo-item-option-color-range"]], inputs: { value: "value", default: "default", disabled: [2, "disabled", "disabled", booleanAttribute], percentage: [2, "percentage", "percentage", booleanAttribute], noAlphaChannel: [2, "noAlphaChannel", "noAlphaChannel", booleanAttribute], editRangeSize: [2, "editRangeSize", "editRangeSize", booleanAttribute], noValues: [2, "noValues", "noValues", booleanAttribute], minimumRangeSize: "minimumRangeSize", negativeInfinityValue: [2, "negativeInfinityValue", "negativeInfinityValue", booleanAttribute], readOnlyColorPicker: [2, "readOnlyColorPicker", "readOnlyColorPicker", booleanAttribute], reverse: [2, "reverse", "reverse", booleanAttribute], debounce: "debounce", liveInteractions: [2, "liveInteractions", "liveInteractions", booleanAttribute], parseValue: "parseValue", toValue: "toValue" }, outputs: { luzmoOptionChanged: "luzmoOptionChanged", luzmoOptionInteractionStart: "luzmoOptionInteractionStart", luzmoOptionInteractionEnd: "luzmoOptionInteractionEnd" }, exportAs: ["luzmoItemOptionColorRange"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoItemOptionColorRange_Template(rf, ctx) { if (rf & 1) {
|
|
123
140
|
i0.ɵɵprojectionDef();
|
|
124
141
|
i0.ɵɵprojection(0);
|
|
125
142
|
} }, encapsulation: 2 });
|
|
@@ -169,11 +186,14 @@ export class LuzmoItemOptionColorRange {
|
|
|
169
186
|
}], debounce: [{
|
|
170
187
|
type: Input,
|
|
171
188
|
args: [{ alias: 'debounce' }]
|
|
189
|
+
}], liveInteractions: [{
|
|
190
|
+
type: Input,
|
|
191
|
+
args: [{ alias: 'liveInteractions', transform: booleanAttribute }]
|
|
172
192
|
}], parseValue: [{
|
|
173
193
|
type: Input,
|
|
174
194
|
args: [{ alias: 'parseValue' }]
|
|
175
195
|
}], toValue: [{
|
|
176
196
|
type: Input,
|
|
177
197
|
args: [{ alias: 'toValue' }]
|
|
178
|
-
}], luzmoOptionChanged: [{ type: i0.Output, args: ["luzmoOptionChanged"] }] }); })();
|
|
198
|
+
}], luzmoOptionChanged: [{ type: i0.Output, args: ["luzmoOptionChanged"] }], luzmoOptionInteractionStart: [{ type: i0.Output, args: ["luzmoOptionInteractionStart"] }], luzmoOptionInteractionEnd: [{ type: i0.Output, args: ["luzmoOptionInteractionEnd"] }] }); })();
|
|
179
199
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoItemOptionColorRange, { className: "LuzmoItemOptionColorRange", filePath: "components/item-option-color-range.ts", lineNumber: 16 }); })();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import '@luzmo/analytics-components-kit/item-option-guidelines';
|
|
3
|
-
import type { LuzmoItemOptionGuidelines as LuzmoItemOptionGuidelinesHostElement, ItemOptionChangedEventDetail } from '@luzmo/analytics-components-kit/item-option-guidelines';
|
|
3
|
+
import type { LuzmoItemOptionGuidelines as LuzmoItemOptionGuidelinesHostElement, ItemOptionChangedEventDetail, ItemOptionInteractionEventDetail } from '@luzmo/analytics-components-kit/item-option-guidelines';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export type { GuidelineLine, GuidelineLineType, GuidelineStyle, GuidelineStyleType, GuidelineWidth, Guidelines, ItemOptionChangedEventDetail } from '@luzmo/analytics-components-kit/item-option-guidelines';
|
|
5
|
+
export type { GuidelineLine, GuidelineLineType, GuidelineStyle, GuidelineStyleType, GuidelineWidth, Guidelines, ItemOptionChangedEventDetail, ItemOptionInteraction, ItemOptionInteractionEventDetail } from '@luzmo/analytics-components-kit/item-option-guidelines';
|
|
6
6
|
export declare class LuzmoItemOptionGuidelines implements OnChanges {
|
|
7
7
|
private readonly elementRef;
|
|
8
8
|
private readonly renderer;
|
|
@@ -15,8 +15,14 @@ export declare class LuzmoItemOptionGuidelines implements OnChanges {
|
|
|
15
15
|
defaultColor?: string;
|
|
16
16
|
/** Delay in milliseconds before color and number changes are emitted. */
|
|
17
17
|
debounce?: number;
|
|
18
|
-
/**
|
|
18
|
+
/** Emits value updates live, without `debounce`, plus interaction lifecycle events for color drags and held keys. */
|
|
19
|
+
liveInteractions?: boolean;
|
|
20
|
+
/** Emitted when the guidelines value changes. With `live-interactions`, emitted immediately and carries `interaction` while a line's color is dragged. */
|
|
19
21
|
readonly luzmoOptionChanged: import("@angular/core").OutputEmitterRef<CustomEvent<ItemOptionChangedEventDetail>>;
|
|
22
|
+
/** With `live-interactions`: a color drag or held key on one line first changed its color, right before that value update. Each line has its own gestures; one that never changes its color emits no lifecycle. */
|
|
23
|
+
readonly luzmoOptionInteractionStart: import("@angular/core").OutputEmitterRef<CustomEvent<ItemOptionInteractionEventDetail>>;
|
|
24
|
+
/** With `live-interactions`: that line's gesture ended, after its last value update. */
|
|
25
|
+
readonly luzmoOptionInteractionEnd: import("@angular/core").OutputEmitterRef<CustomEvent<ItemOptionInteractionEventDetail>>;
|
|
20
26
|
constructor();
|
|
21
27
|
ngOnChanges(changes: SimpleChanges): void;
|
|
22
28
|
/**
|
|
@@ -28,7 +34,8 @@ export declare class LuzmoItemOptionGuidelines implements OnChanges {
|
|
|
28
34
|
private setHostProperty;
|
|
29
35
|
private bindEvents;
|
|
30
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoItemOptionGuidelines, never>;
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoItemOptionGuidelines, "luzmo-item-option-guidelines", ["luzmoItemOptionGuidelines"], { "defaultColor": { "alias": "defaultColor"; "required": false; }; "debounce": { "alias": "debounce"; "required": false; }; }, { "luzmoOptionChanged": "luzmoOptionChanged"; }, never, ["*"], true, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoItemOptionGuidelines, "luzmo-item-option-guidelines", ["luzmoItemOptionGuidelines"], { "defaultColor": { "alias": "defaultColor"; "required": false; }; "debounce": { "alias": "debounce"; "required": false; }; "liveInteractions": { "alias": "liveInteractions"; "required": false; }; }, { "luzmoOptionChanged": "luzmoOptionChanged"; "luzmoOptionInteractionStart": "luzmoOptionInteractionStart"; "luzmoOptionInteractionEnd": "luzmoOptionInteractionEnd"; }, never, ["*"], true, never>;
|
|
38
|
+
static ngAcceptInputType_liveInteractions: unknown;
|
|
32
39
|
}
|
|
33
40
|
/** The underlying custom element type for LuzmoItemOptionGuidelines */
|
|
34
41
|
export type LuzmoItemOptionGuidelinesElement = LuzmoItemOptionGuidelinesHostElement;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, output, Renderer2 } from '@angular/core';
|
|
1
|
+
import { booleanAttribute, ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, output, Renderer2 } from '@angular/core';
|
|
2
2
|
import '@luzmo/analytics-components-kit/item-option-guidelines';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
const _c0 = ["*"];
|
|
@@ -19,8 +19,14 @@ export class LuzmoItemOptionGuidelines {
|
|
|
19
19
|
defaultColor;
|
|
20
20
|
/** Delay in milliseconds before color and number changes are emitted. */
|
|
21
21
|
debounce;
|
|
22
|
-
/**
|
|
22
|
+
/** Emits value updates live, without `debounce`, plus interaction lifecycle events for color drags and held keys. */
|
|
23
|
+
liveInteractions;
|
|
24
|
+
/** Emitted when the guidelines value changes. With `live-interactions`, emitted immediately and carries `interaction` while a line's color is dragged. */
|
|
23
25
|
luzmoOptionChanged = output({ alias: 'luzmoOptionChanged' });
|
|
26
|
+
/** With `live-interactions`: a color drag or held key on one line first changed its color, right before that value update. Each line has its own gestures; one that never changes its color emits no lifecycle. */
|
|
27
|
+
luzmoOptionInteractionStart = output({ alias: 'luzmoOptionInteractionStart' });
|
|
28
|
+
/** With `live-interactions`: that line's gesture ended, after its last value update. */
|
|
29
|
+
luzmoOptionInteractionEnd = output({ alias: 'luzmoOptionInteractionEnd' });
|
|
24
30
|
constructor() {
|
|
25
31
|
this.bindEvents();
|
|
26
32
|
this.destroyRef.onDestroy(() => {
|
|
@@ -38,6 +44,9 @@ export class LuzmoItemOptionGuidelines {
|
|
|
38
44
|
case 'debounce':
|
|
39
45
|
this.setHostProperty('debounce', changes['debounce'].currentValue);
|
|
40
46
|
break;
|
|
47
|
+
case 'liveInteractions':
|
|
48
|
+
this.setHostProperty('liveInteractions', changes['liveInteractions'].currentValue);
|
|
49
|
+
break;
|
|
41
50
|
default:
|
|
42
51
|
break;
|
|
43
52
|
}
|
|
@@ -57,9 +66,17 @@ export class LuzmoItemOptionGuidelines {
|
|
|
57
66
|
const typed = event;
|
|
58
67
|
this.luzmoOptionChanged.emit(typed);
|
|
59
68
|
}));
|
|
69
|
+
this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-option-interaction-start', (event) => {
|
|
70
|
+
const typed = event;
|
|
71
|
+
this.luzmoOptionInteractionStart.emit(typed);
|
|
72
|
+
}));
|
|
73
|
+
this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-option-interaction-end', (event) => {
|
|
74
|
+
const typed = event;
|
|
75
|
+
this.luzmoOptionInteractionEnd.emit(typed);
|
|
76
|
+
}));
|
|
60
77
|
}
|
|
61
78
|
static ɵfac = function LuzmoItemOptionGuidelines_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoItemOptionGuidelines)(); };
|
|
62
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoItemOptionGuidelines, selectors: [["luzmo-item-option-guidelines"]], inputs: { defaultColor: "defaultColor", debounce: "debounce" }, outputs: { luzmoOptionChanged: "luzmoOptionChanged" }, exportAs: ["luzmoItemOptionGuidelines"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoItemOptionGuidelines_Template(rf, ctx) { if (rf & 1) {
|
|
79
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoItemOptionGuidelines, selectors: [["luzmo-item-option-guidelines"]], inputs: { defaultColor: "defaultColor", debounce: "debounce", liveInteractions: [2, "liveInteractions", "liveInteractions", booleanAttribute] }, outputs: { luzmoOptionChanged: "luzmoOptionChanged", luzmoOptionInteractionStart: "luzmoOptionInteractionStart", luzmoOptionInteractionEnd: "luzmoOptionInteractionEnd" }, exportAs: ["luzmoItemOptionGuidelines"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoItemOptionGuidelines_Template(rf, ctx) { if (rf & 1) {
|
|
63
80
|
i0.ɵɵprojectionDef();
|
|
64
81
|
i0.ɵɵprojection(0);
|
|
65
82
|
} }, encapsulation: 2 });
|
|
@@ -79,5 +96,8 @@ export class LuzmoItemOptionGuidelines {
|
|
|
79
96
|
}], debounce: [{
|
|
80
97
|
type: Input,
|
|
81
98
|
args: [{ alias: 'debounce' }]
|
|
82
|
-
}],
|
|
99
|
+
}], liveInteractions: [{
|
|
100
|
+
type: Input,
|
|
101
|
+
args: [{ alias: 'liveInteractions', transform: booleanAttribute }]
|
|
102
|
+
}], luzmoOptionChanged: [{ type: i0.Output, args: ["luzmoOptionChanged"] }], luzmoOptionInteractionStart: [{ type: i0.Output, args: ["luzmoOptionInteractionStart"] }], luzmoOptionInteractionEnd: [{ type: i0.Output, args: ["luzmoOptionInteractionEnd"] }] }); })();
|
|
83
103
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoItemOptionGuidelines, { className: "LuzmoItemOptionGuidelines", filePath: "components/item-option-guidelines.ts", lineNumber: 16 }); })();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import '@luzmo/analytics-components-kit/item-option-panel';
|
|
3
|
-
import type { LuzmoItemOptionPanel as LuzmoItemOptionPanelHostElement, ItemOptionsChangedEventDetail } from '@luzmo/analytics-components-kit/item-option-panel';
|
|
3
|
+
import type { LuzmoItemOptionPanel as LuzmoItemOptionPanelHostElement, ItemOptionInteractionEventDetail, ItemOptionsChangedEventDetail } from '@luzmo/analytics-components-kit/item-option-panel';
|
|
4
4
|
import type { ElementSize } from '@luzmo/analytics-components-kit/types';
|
|
5
5
|
import type { OptionsConfig, Slot, ThemeConfig, TranslationOverrides, TranslationsFile, VizItemType } from '@luzmo/dashboard-contents-types';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
export type { ItemOptionsChangedEventDetail } from '@luzmo/analytics-components-kit/item-option-panel';
|
|
7
|
+
export type { ItemOptionInteraction, ItemOptionInteractionEventDetail, ItemOptionsChangedEventDetail } from '@luzmo/analytics-components-kit/item-option-panel';
|
|
8
8
|
export declare class LuzmoItemOptionPanel implements OnChanges {
|
|
9
9
|
private readonly elementRef;
|
|
10
10
|
private readonly renderer;
|
|
@@ -35,8 +35,16 @@ export declare class LuzmoItemOptionPanel implements OnChanges {
|
|
|
35
35
|
authKey?: string;
|
|
36
36
|
/** The auth token of the databroker */
|
|
37
37
|
authToken?: string;
|
|
38
|
-
/**
|
|
38
|
+
/** Emits options updates live, without the controls' debounce, plus `luzmo-option-interaction-*` events around drags and held keys. Off by default. */
|
|
39
|
+
liveInteractions?: boolean;
|
|
40
|
+
/** Announces that the `options` of the element have changed. With `live-interactions`, updates inside a gesture carry `interaction`. */
|
|
39
41
|
readonly luzmoOptionsChanged: import("@angular/core").OutputEmitterRef<CustomEvent<ItemOptionsChangedEventDetail>>;
|
|
42
|
+
/** With `live-interactions`: bubbles from the option whose drag or held key first changed its value, right before that options update; `detail.optionKey` names it. */
|
|
43
|
+
readonly luzmoOptionInteractionStart: import("@angular/core").OutputEmitterRef<CustomEvent<ItemOptionInteractionEventDetail>>;
|
|
44
|
+
/** With `live-interactions`: bubbles from the option whose gesture ended, after its last options update. */
|
|
45
|
+
readonly luzmoOptionInteractionEnd: import("@angular/core").OutputEmitterRef<CustomEvent<ItemOptionInteractionEventDetail>>;
|
|
46
|
+
/** With `live-interactions`: bubbles from the option whose gesture was cancelled and reverted. */
|
|
47
|
+
readonly luzmoOptionInteractionCancel: import("@angular/core").OutputEmitterRef<CustomEvent<ItemOptionInteractionEventDetail>>;
|
|
40
48
|
constructor();
|
|
41
49
|
ngOnChanges(changes: SimpleChanges): void;
|
|
42
50
|
/**
|
|
@@ -48,7 +56,8 @@ export declare class LuzmoItemOptionPanel implements OnChanges {
|
|
|
48
56
|
private setHostProperty;
|
|
49
57
|
private bindEvents;
|
|
50
58
|
static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoItemOptionPanel, never>;
|
|
51
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoItemOptionPanel, "luzmo-item-option-panel", ["luzmoItemOptionPanel"], { "language": { "alias": "language"; "required": false; }; "itemType": { "alias": "itemType"; "required": false; }; "options": { "alias": "options"; "required": false; }; "slots": { "alias": "slots"; "required": false; }; "customOptionsConfiguration": { "alias": "customOptionsConfiguration"; "required": false; }; "customTranslations": { "alias": "customTranslations"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "size": { "alias": "size"; "required": false; }; "apiUrl": { "alias": "apiUrl"; "required": false; }; "authKey": { "alias": "authKey"; "required": false; }; "authToken": { "alias": "authToken"; "required": false; }; }, { "luzmoOptionsChanged": "luzmoOptionsChanged"; }, never, ["*"], true, never>;
|
|
59
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoItemOptionPanel, "luzmo-item-option-panel", ["luzmoItemOptionPanel"], { "language": { "alias": "language"; "required": false; }; "itemType": { "alias": "itemType"; "required": false; }; "options": { "alias": "options"; "required": false; }; "slots": { "alias": "slots"; "required": false; }; "customOptionsConfiguration": { "alias": "customOptionsConfiguration"; "required": false; }; "customTranslations": { "alias": "customTranslations"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "size": { "alias": "size"; "required": false; }; "apiUrl": { "alias": "apiUrl"; "required": false; }; "authKey": { "alias": "authKey"; "required": false; }; "authToken": { "alias": "authToken"; "required": false; }; "liveInteractions": { "alias": "liveInteractions"; "required": false; }; }, { "luzmoOptionsChanged": "luzmoOptionsChanged"; "luzmoOptionInteractionStart": "luzmoOptionInteractionStart"; "luzmoOptionInteractionEnd": "luzmoOptionInteractionEnd"; "luzmoOptionInteractionCancel": "luzmoOptionInteractionCancel"; }, never, ["*"], true, never>;
|
|
60
|
+
static ngAcceptInputType_liveInteractions: unknown;
|
|
52
61
|
}
|
|
53
62
|
/** The underlying custom element type for LuzmoItemOptionPanel */
|
|
54
63
|
export type LuzmoItemOptionPanelElement = LuzmoItemOptionPanelHostElement;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, output, Renderer2 } from '@angular/core';
|
|
1
|
+
import { booleanAttribute, ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, output, Renderer2 } from '@angular/core';
|
|
2
2
|
import '@luzmo/analytics-components-kit/item-option-panel';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
const _c0 = ["*"];
|
|
@@ -37,8 +37,16 @@ export class LuzmoItemOptionPanel {
|
|
|
37
37
|
authKey;
|
|
38
38
|
/** The auth token of the databroker */
|
|
39
39
|
authToken;
|
|
40
|
-
/**
|
|
40
|
+
/** Emits options updates live, without the controls' debounce, plus `luzmo-option-interaction-*` events around drags and held keys. Off by default. */
|
|
41
|
+
liveInteractions;
|
|
42
|
+
/** Announces that the `options` of the element have changed. With `live-interactions`, updates inside a gesture carry `interaction`. */
|
|
41
43
|
luzmoOptionsChanged = output({ alias: 'luzmoOptionsChanged' });
|
|
44
|
+
/** With `live-interactions`: bubbles from the option whose drag or held key first changed its value, right before that options update; `detail.optionKey` names it. */
|
|
45
|
+
luzmoOptionInteractionStart = output({ alias: 'luzmoOptionInteractionStart' });
|
|
46
|
+
/** With `live-interactions`: bubbles from the option whose gesture ended, after its last options update. */
|
|
47
|
+
luzmoOptionInteractionEnd = output({ alias: 'luzmoOptionInteractionEnd' });
|
|
48
|
+
/** With `live-interactions`: bubbles from the option whose gesture was cancelled and reverted. */
|
|
49
|
+
luzmoOptionInteractionCancel = output({ alias: 'luzmoOptionInteractionCancel' });
|
|
42
50
|
constructor() {
|
|
43
51
|
this.bindEvents();
|
|
44
52
|
this.destroyRef.onDestroy(() => {
|
|
@@ -83,6 +91,9 @@ export class LuzmoItemOptionPanel {
|
|
|
83
91
|
case 'authToken':
|
|
84
92
|
this.setHostProperty('authToken', changes['authToken'].currentValue);
|
|
85
93
|
break;
|
|
94
|
+
case 'liveInteractions':
|
|
95
|
+
this.setHostProperty('liveInteractions', changes['liveInteractions'].currentValue);
|
|
96
|
+
break;
|
|
86
97
|
default:
|
|
87
98
|
break;
|
|
88
99
|
}
|
|
@@ -102,9 +113,21 @@ export class LuzmoItemOptionPanel {
|
|
|
102
113
|
const typed = event;
|
|
103
114
|
this.luzmoOptionsChanged.emit(typed);
|
|
104
115
|
}));
|
|
116
|
+
this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-option-interaction-start', (event) => {
|
|
117
|
+
const typed = event;
|
|
118
|
+
this.luzmoOptionInteractionStart.emit(typed);
|
|
119
|
+
}));
|
|
120
|
+
this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-option-interaction-end', (event) => {
|
|
121
|
+
const typed = event;
|
|
122
|
+
this.luzmoOptionInteractionEnd.emit(typed);
|
|
123
|
+
}));
|
|
124
|
+
this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-option-interaction-cancel', (event) => {
|
|
125
|
+
const typed = event;
|
|
126
|
+
this.luzmoOptionInteractionCancel.emit(typed);
|
|
127
|
+
}));
|
|
105
128
|
}
|
|
106
129
|
static ɵfac = function LuzmoItemOptionPanel_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoItemOptionPanel)(); };
|
|
107
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoItemOptionPanel, selectors: [["luzmo-item-option-panel"]], inputs: { language: "language", itemType: "itemType", options: "options", slots: "slots", customOptionsConfiguration: "customOptionsConfiguration", customTranslations: "customTranslations", theme: "theme", size: "size", apiUrl: "apiUrl", authKey: "authKey", authToken: "authToken" }, outputs: { luzmoOptionsChanged: "luzmoOptionsChanged" }, exportAs: ["luzmoItemOptionPanel"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoItemOptionPanel_Template(rf, ctx) { if (rf & 1) {
|
|
130
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoItemOptionPanel, selectors: [["luzmo-item-option-panel"]], inputs: { language: "language", itemType: "itemType", options: "options", slots: "slots", customOptionsConfiguration: "customOptionsConfiguration", customTranslations: "customTranslations", theme: "theme", size: "size", apiUrl: "apiUrl", authKey: "authKey", authToken: "authToken", liveInteractions: [2, "liveInteractions", "liveInteractions", booleanAttribute] }, outputs: { luzmoOptionsChanged: "luzmoOptionsChanged", luzmoOptionInteractionStart: "luzmoOptionInteractionStart", luzmoOptionInteractionEnd: "luzmoOptionInteractionEnd", luzmoOptionInteractionCancel: "luzmoOptionInteractionCancel" }, exportAs: ["luzmoItemOptionPanel"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoItemOptionPanel_Template(rf, ctx) { if (rf & 1) {
|
|
108
131
|
i0.ɵɵprojectionDef();
|
|
109
132
|
i0.ɵɵprojection(0);
|
|
110
133
|
} }, encapsulation: 2 });
|
|
@@ -151,5 +174,8 @@ export class LuzmoItemOptionPanel {
|
|
|
151
174
|
}], authToken: [{
|
|
152
175
|
type: Input,
|
|
153
176
|
args: [{ alias: 'authToken' }]
|
|
154
|
-
}],
|
|
177
|
+
}], liveInteractions: [{
|
|
178
|
+
type: Input,
|
|
179
|
+
args: [{ alias: 'liveInteractions', transform: booleanAttribute }]
|
|
180
|
+
}], luzmoOptionsChanged: [{ type: i0.Output, args: ["luzmoOptionsChanged"] }], luzmoOptionInteractionStart: [{ type: i0.Output, args: ["luzmoOptionInteractionStart"] }], luzmoOptionInteractionEnd: [{ type: i0.Output, args: ["luzmoOptionInteractionEnd"] }], luzmoOptionInteractionCancel: [{ type: i0.Output, args: ["luzmoOptionInteractionCancel"] }] }); })();
|
|
155
181
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoItemOptionPanel, { className: "LuzmoItemOptionPanel", filePath: "components/item-option-panel.ts", lineNumber: 18 }); })();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import '@luzmo/analytics-components-kit/item-option-slider';
|
|
3
|
-
import type { LuzmoItemOptionSlider as LuzmoItemOptionSliderHostElement, ItemOptionChangedEventDetail } from '@luzmo/analytics-components-kit/item-option-slider';
|
|
3
|
+
import type { LuzmoItemOptionSlider as LuzmoItemOptionSliderHostElement, ItemOptionChangedEventDetail, ItemOptionInteractionEventDetail } from '@luzmo/analytics-components-kit/item-option-slider';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export type { ItemOptionChangedEventDetail } from '@luzmo/analytics-components-kit/item-option-slider';
|
|
5
|
+
export type { ItemOptionChangedEventDetail, ItemOptionInteraction, ItemOptionInteractionEventDetail } from '@luzmo/analytics-components-kit/item-option-slider';
|
|
6
6
|
export declare class LuzmoItemOptionSlider implements OnChanges {
|
|
7
7
|
private readonly elementRef;
|
|
8
8
|
private readonly renderer;
|
|
@@ -23,12 +23,20 @@ export declare class LuzmoItemOptionSlider implements OnChanges {
|
|
|
23
23
|
step?: number;
|
|
24
24
|
/** Delay in milliseconds before the change event is emitted after the user stops interacting. */
|
|
25
25
|
debounce?: number;
|
|
26
|
+
/** Emits value updates live, without `debounce`, plus interaction lifecycle events for drags and held keys. */
|
|
27
|
+
liveInteractions?: boolean;
|
|
26
28
|
/** Optional transform applied to the stored value before it is displayed in the control. */
|
|
27
29
|
parseValue?: unknown;
|
|
28
30
|
/** Optional transform applied to the control's value before it is emitted in the change event. */
|
|
29
31
|
toValue?: unknown;
|
|
30
|
-
/** Emitted when the option value changes. */
|
|
32
|
+
/** Emitted when the option value changes. With `live-interactions`, emitted on every drag or key step and carries `interaction` inside a gesture. */
|
|
31
33
|
readonly luzmoOptionChanged: import("@angular/core").OutputEmitterRef<CustomEvent<ItemOptionChangedEventDetail>>;
|
|
34
|
+
/** With `live-interactions`: a drag or held key first changed the value, right before that value update. A press that never changes the value emits no lifecycle. */
|
|
35
|
+
readonly luzmoOptionInteractionStart: import("@angular/core").OutputEmitterRef<CustomEvent<ItemOptionInteractionEventDetail>>;
|
|
36
|
+
/** With `live-interactions`: the gesture ended, after its last value update. `changed` is false when the value is back at its start. */
|
|
37
|
+
readonly luzmoOptionInteractionEnd: import("@angular/core").OutputEmitterRef<CustomEvent<ItemOptionInteractionEventDetail>>;
|
|
38
|
+
/** With `live-interactions`: the pointer was cancelled and the slider reverted to its start value. */
|
|
39
|
+
readonly luzmoOptionInteractionCancel: import("@angular/core").OutputEmitterRef<CustomEvent<ItemOptionInteractionEventDetail>>;
|
|
32
40
|
constructor();
|
|
33
41
|
ngOnChanges(changes: SimpleChanges): void;
|
|
34
42
|
/**
|
|
@@ -40,7 +48,8 @@ export declare class LuzmoItemOptionSlider implements OnChanges {
|
|
|
40
48
|
private setHostProperty;
|
|
41
49
|
private bindEvents;
|
|
42
50
|
static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoItemOptionSlider, never>;
|
|
43
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoItemOptionSlider, "luzmo-item-option-slider", ["luzmoItemOptionSlider"], { "value": { "alias": "value"; "required": false; }; "default": { "alias": "default"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "step": { "alias": "step"; "required": false; }; "debounce": { "alias": "debounce"; "required": false; }; "parseValue": { "alias": "parseValue"; "required": false; }; "toValue": { "alias": "toValue"; "required": false; }; }, { "luzmoOptionChanged": "luzmoOptionChanged"; }, never, ["*"], true, never>;
|
|
51
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoItemOptionSlider, "luzmo-item-option-slider", ["luzmoItemOptionSlider"], { "value": { "alias": "value"; "required": false; }; "default": { "alias": "default"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "step": { "alias": "step"; "required": false; }; "debounce": { "alias": "debounce"; "required": false; }; "liveInteractions": { "alias": "liveInteractions"; "required": false; }; "parseValue": { "alias": "parseValue"; "required": false; }; "toValue": { "alias": "toValue"; "required": false; }; }, { "luzmoOptionChanged": "luzmoOptionChanged"; "luzmoOptionInteractionStart": "luzmoOptionInteractionStart"; "luzmoOptionInteractionEnd": "luzmoOptionInteractionEnd"; "luzmoOptionInteractionCancel": "luzmoOptionInteractionCancel"; }, never, ["*"], true, never>;
|
|
52
|
+
static ngAcceptInputType_liveInteractions: unknown;
|
|
44
53
|
}
|
|
45
54
|
/** The underlying custom element type for LuzmoItemOptionSlider */
|
|
46
55
|
export type LuzmoItemOptionSliderElement = LuzmoItemOptionSliderHostElement;
|