@luzmo/ngx-analytics-components-kit 1.1.1 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  import { OnChanges, 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 } from '@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
4
  import type { LuzmoEmbedVizItem } from '@luzmo/embed';
5
5
  import * as i0 from "@angular/core";
6
- export type { AddToDashboardChartAddFailedEventDetail, AddToDashboardChartAddedEventDetail, ChartActionDescriptor, ChartActionType, ChartFeedback, ChartFeedbackRating, ChartMutationRequest, ChartOption, DashboardActions, FlexChartConfig, InteractiveVizItemChartChangedEventDetail, InteractiveVizItemChartOptionsChangedEventDetail, InteractiveVizItemFeedbackChangedEventDetail, NormalizedChartConfig, Ranking, Sort } from '@luzmo/analytics-components-kit/interactive-viz-item';
6
+ 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';
7
7
  export declare class LuzmoInteractiveVizItem implements OnChanges {
8
8
  private readonly elementRef;
9
9
  private readonly renderer;
@@ -42,12 +42,20 @@ export declare class LuzmoInteractiveVizItem implements OnChanges {
42
42
  hideConfigPanel?: boolean;
43
43
  /** When present, chart changes are only emitted and the host sets `chart`; otherwise they are applied here and still emitted. */
44
44
  controlled?: boolean;
45
+ /** 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. */
46
+ liveInteractions?: boolean;
45
47
  /** The size of the element */
46
48
  size?: 's' | 'm' | 'l' | 'xl';
47
49
  /** Fired when the inline actions (ranking, sort, display mode) change the chart options. Applied to `chart` first unless `controlled` is set. */
48
50
  readonly luzmoChartOptionsChanged: import("@angular/core").OutputEmitterRef<CustomEvent<InteractiveVizItemChartOptionsChangedEventDetail>>;
49
- /** Fired when the config panel changes slots, filters, or options (full chart). Applied to `chart` first unless `controlled` is set. */
51
+ /** 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`. */
50
52
  readonly luzmoChartChanged: import("@angular/core").OutputEmitterRef<CustomEvent<InteractiveVizItemChartChangedEventDetail>>;
53
+ /** 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. */
54
+ readonly luzmoOptionInteractionStart: import("@angular/core").OutputEmitterRef<CustomEvent<InteractiveVizItemInteractionEventDetail>>;
55
+ /** 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. */
56
+ readonly luzmoOptionInteractionEnd: import("@angular/core").OutputEmitterRef<CustomEvent<InteractiveVizItemInteractionEventDetail>>;
57
+ /** With `live-interactions`: the gesture was cancelled and the control reverted to its start value. */
58
+ readonly luzmoOptionInteractionCancel: import("@angular/core").OutputEmitterRef<CustomEvent<InteractiveVizItemInteractionEventDetail>>;
51
59
  /** Fired when the user changes the thumbs up/down rating. Never applied to `feedback`; the host owns it in both modes. */
52
60
  readonly luzmoFeedbackChanged: import("@angular/core").OutputEmitterRef<CustomEvent<InteractiveVizItemFeedbackChangedEventDetail>>;
53
61
  /** Fired by the inner `luzmo-add-to-dashboard` after the chart was saved. */
@@ -65,12 +73,13 @@ export declare class LuzmoInteractiveVizItem implements OnChanges {
65
73
  private setHostProperty;
66
74
  private bindEvents;
67
75
  static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoInteractiveVizItem, never>;
68
- static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoInteractiveVizItem, "luzmo-interactive-viz-item", ["luzmoInteractiveVizItem"], { "language": { "alias": "language"; "required": false; }; "addToDashboard": { "alias": "addToDashboard"; "required": false; }; "canFilter": { "alias": "canFilter"; "required": false; }; "chart": { "alias": "chart"; "required": false; }; "feedback": { "alias": "feedback"; "required": false; }; "messageId": { "alias": "messageId"; "required": false; }; "authKey": { "alias": "authKey"; "required": false; }; "authToken": { "alias": "authToken"; "required": false; }; "apiUrl": { "alias": "apiUrl"; "required": false; }; "appServer": { "alias": "appServer"; "required": false; }; "contentLanguage": { "alias": "contentLanguage"; "required": false; }; "hideActions": { "alias": "hideActions"; "required": false; }; "hideFeedback": { "alias": "hideFeedback"; "required": false; }; "hideConfigPanel": { "alias": "hideConfigPanel"; "required": false; }; "controlled": { "alias": "controlled"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, { "luzmoChartOptionsChanged": "luzmoChartOptionsChanged"; "luzmoChartChanged": "luzmoChartChanged"; "luzmoFeedbackChanged": "luzmoFeedbackChanged"; "luzmoChartAdded": "luzmoChartAdded"; "luzmoChartAddFailed": "luzmoChartAddFailed"; }, never, ["*"], true, never>;
76
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoInteractiveVizItem, "luzmo-interactive-viz-item", ["luzmoInteractiveVizItem"], { "language": { "alias": "language"; "required": false; }; "addToDashboard": { "alias": "addToDashboard"; "required": false; }; "canFilter": { "alias": "canFilter"; "required": false; }; "chart": { "alias": "chart"; "required": false; }; "feedback": { "alias": "feedback"; "required": false; }; "messageId": { "alias": "messageId"; "required": false; }; "authKey": { "alias": "authKey"; "required": false; }; "authToken": { "alias": "authToken"; "required": false; }; "apiUrl": { "alias": "apiUrl"; "required": false; }; "appServer": { "alias": "appServer"; "required": false; }; "contentLanguage": { "alias": "contentLanguage"; "required": false; }; "hideActions": { "alias": "hideActions"; "required": false; }; "hideFeedback": { "alias": "hideFeedback"; "required": false; }; "hideConfigPanel": { "alias": "hideConfigPanel"; "required": false; }; "controlled": { "alias": "controlled"; "required": false; }; "liveInteractions": { "alias": "liveInteractions"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, { "luzmoChartOptionsChanged": "luzmoChartOptionsChanged"; "luzmoChartChanged": "luzmoChartChanged"; "luzmoOptionInteractionStart": "luzmoOptionInteractionStart"; "luzmoOptionInteractionEnd": "luzmoOptionInteractionEnd"; "luzmoOptionInteractionCancel": "luzmoOptionInteractionCancel"; "luzmoFeedbackChanged": "luzmoFeedbackChanged"; "luzmoChartAdded": "luzmoChartAdded"; "luzmoChartAddFailed": "luzmoChartAddFailed"; }, never, ["*"], true, never>;
69
77
  static ngAcceptInputType_addToDashboard: unknown;
70
78
  static ngAcceptInputType_hideActions: unknown;
71
79
  static ngAcceptInputType_hideFeedback: unknown;
72
80
  static ngAcceptInputType_hideConfigPanel: unknown;
73
81
  static ngAcceptInputType_controlled: unknown;
82
+ static ngAcceptInputType_liveInteractions: unknown;
74
83
  }
75
84
  /** The underlying custom element type for LuzmoInteractiveVizItem */
76
85
  export type LuzmoInteractiveVizItemElement = LuzmoInteractiveVizItemHostElement;
@@ -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
- /** Emitted when the guidelines value changes. */
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
- /** Emitted when the guidelines value changes. */
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
- }], luzmoOptionChanged: [{ type: i0.Output, args: ["luzmoOptionChanged"] }] }); })();
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
- /** Announces that the `options` of the element have changed */
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
- /** Announces that the `options` of the element have changed */
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
- }], luzmoOptionsChanged: [{ type: i0.Output, args: ["luzmoOptionsChanged"] }] }); })();
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;
@@ -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-slider';
3
3
  import * as i0 from "@angular/core";
4
4
  const _c0 = ["*"];
@@ -27,12 +27,20 @@ export class LuzmoItemOptionSlider {
27
27
  step;
28
28
  /** Delay in milliseconds before the change event is emitted after the user stops interacting. */
29
29
  debounce;
30
+ /** Emits value updates live, without `debounce`, plus interaction lifecycle events for drags and held keys. */
31
+ liveInteractions;
30
32
  /** Optional transform applied to the stored value before it is displayed in the control. */
31
33
  parseValue;
32
34
  /** Optional transform applied to the control's value before it is emitted in the change event. */
33
35
  toValue;
34
- /** Emitted when the option value changes. */
36
+ /** Emitted when the option value changes. With `live-interactions`, emitted on every drag or key step and carries `interaction` inside a gesture. */
35
37
  luzmoOptionChanged = output({ alias: 'luzmoOptionChanged' });
38
+ /** 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. */
39
+ luzmoOptionInteractionStart = output({ alias: 'luzmoOptionInteractionStart' });
40
+ /** With `live-interactions`: the gesture ended, after its last value update. `changed` is false when the value is back at its start. */
41
+ luzmoOptionInteractionEnd = output({ alias: 'luzmoOptionInteractionEnd' });
42
+ /** With `live-interactions`: the pointer was cancelled and the slider reverted to its start value. */
43
+ luzmoOptionInteractionCancel = output({ alias: 'luzmoOptionInteractionCancel' });
36
44
  constructor() {
37
45
  this.bindEvents();
38
46
  this.destroyRef.onDestroy(() => {
@@ -62,6 +70,9 @@ export class LuzmoItemOptionSlider {
62
70
  case 'debounce':
63
71
  this.setHostProperty('debounce', changes['debounce'].currentValue);
64
72
  break;
73
+ case 'liveInteractions':
74
+ this.setHostProperty('liveInteractions', changes['liveInteractions'].currentValue);
75
+ break;
65
76
  case 'parseValue':
66
77
  this.setHostProperty('parseValue', changes['parseValue'].currentValue);
67
78
  break;
@@ -87,9 +98,21 @@ export class LuzmoItemOptionSlider {
87
98
  const typed = event;
88
99
  this.luzmoOptionChanged.emit(typed);
89
100
  }));
101
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-option-interaction-start', (event) => {
102
+ const typed = event;
103
+ this.luzmoOptionInteractionStart.emit(typed);
104
+ }));
105
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-option-interaction-end', (event) => {
106
+ const typed = event;
107
+ this.luzmoOptionInteractionEnd.emit(typed);
108
+ }));
109
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-option-interaction-cancel', (event) => {
110
+ const typed = event;
111
+ this.luzmoOptionInteractionCancel.emit(typed);
112
+ }));
90
113
  }
91
114
  static ɵfac = function LuzmoItemOptionSlider_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoItemOptionSlider)(); };
92
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoItemOptionSlider, selectors: [["luzmo-item-option-slider"]], inputs: { value: "value", default: "default", min: "min", max: "max", step: "step", debounce: "debounce", parseValue: "parseValue", toValue: "toValue" }, outputs: { luzmoOptionChanged: "luzmoOptionChanged" }, exportAs: ["luzmoItemOptionSlider"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoItemOptionSlider_Template(rf, ctx) { if (rf & 1) {
115
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoItemOptionSlider, selectors: [["luzmo-item-option-slider"]], inputs: { value: "value", default: "default", min: "min", max: "max", step: "step", debounce: "debounce", liveInteractions: [2, "liveInteractions", "liveInteractions", booleanAttribute], parseValue: "parseValue", toValue: "toValue" }, outputs: { luzmoOptionChanged: "luzmoOptionChanged", luzmoOptionInteractionStart: "luzmoOptionInteractionStart", luzmoOptionInteractionEnd: "luzmoOptionInteractionEnd", luzmoOptionInteractionCancel: "luzmoOptionInteractionCancel" }, exportAs: ["luzmoItemOptionSlider"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoItemOptionSlider_Template(rf, ctx) { if (rf & 1) {
93
116
  i0.ɵɵprojectionDef();
94
117
  i0.ɵɵprojection(0);
95
118
  } }, encapsulation: 2 });
@@ -121,11 +144,14 @@ export class LuzmoItemOptionSlider {
121
144
  }], debounce: [{
122
145
  type: Input,
123
146
  args: [{ alias: 'debounce' }]
147
+ }], liveInteractions: [{
148
+ type: Input,
149
+ args: [{ alias: 'liveInteractions', transform: booleanAttribute }]
124
150
  }], parseValue: [{
125
151
  type: Input,
126
152
  args: [{ alias: 'parseValue' }]
127
153
  }], toValue: [{
128
154
  type: Input,
129
155
  args: [{ alias: 'toValue' }]
130
- }], luzmoOptionChanged: [{ type: i0.Output, args: ["luzmoOptionChanged"] }] }); })();
156
+ }], luzmoOptionChanged: [{ type: i0.Output, args: ["luzmoOptionChanged"] }], luzmoOptionInteractionStart: [{ type: i0.Output, args: ["luzmoOptionInteractionStart"] }], luzmoOptionInteractionEnd: [{ type: i0.Output, args: ["luzmoOptionInteractionEnd"] }], luzmoOptionInteractionCancel: [{ type: i0.Output, args: ["luzmoOptionInteractionCancel"] }] }); })();
131
157
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoItemOptionSlider, { className: "LuzmoItemOptionSlider", filePath: "components/item-option-slider.ts", lineNumber: 16 }); })();
@@ -1,10 +1,10 @@
1
1
  import { OnChanges, SimpleChanges } from '@angular/core';
2
2
  import '@luzmo/analytics-components-kit/item-option';
3
- import type { LuzmoItemOption as LuzmoItemOptionHostElement, ItemOptionsChangedEventDetail } from '@luzmo/analytics-components-kit/item-option';
3
+ import type { LuzmoItemOption as LuzmoItemOptionHostElement, ItemOptionInteractionEventDetail, ItemOptionsChangedEventDetail } from '@luzmo/analytics-components-kit/item-option';
4
4
  import type { ElementSize } from '@luzmo/analytics-components-kit/types';
5
5
  import type { OptionConfig, OptionTranslation, ThemeConfig, TranslationOverrides, VizItemType } from '@luzmo/dashboard-contents-types';
6
6
  import * as i0 from "@angular/core";
7
- export type { ItemOptionChangedEventDetail, ItemOptionsChangedEventDetail } from '@luzmo/analytics-components-kit/item-option';
7
+ export type { ItemOptionChangedEventDetail, ItemOptionInteraction, ItemOptionInteractionEventDetail, ItemOptionInteractionEventName, ItemOptionsChangedEventDetail } from '@luzmo/analytics-components-kit/item-option';
8
8
  export declare class LuzmoItemOption implements OnChanges {
9
9
  private readonly elementRef;
10
10
  private readonly renderer;
@@ -37,10 +37,18 @@ export declare class LuzmoItemOption implements OnChanges {
37
37
  authToken?: string;
38
38
  /** The size variant of the option control (`s`, `m`, `l`, `xl`). */
39
39
  size?: ElementSize;
40
+ /** Emits options updates live, without the control's debounce, plus `luzmo-option-interaction-*` events around drags and held keys. Off by default. */
41
+ liveInteractions?: boolean;
40
42
  /** Callback that updates `options` and emits `luzmo-options-changed`; used internally by the rendered control. */
41
43
  changedOptions?: unknown;
42
- /** Announces that the `options` of the element have changed */
44
+ /** Announces that the `options` of the element have changed. With `live-interactions`, updates inside a gesture carry `interaction`. */
43
45
  readonly luzmoOptionsChanged: import("@angular/core").OutputEmitterRef<CustomEvent<ItemOptionsChangedEventDetail>>;
46
+ /** With `live-interactions`: a drag or held key first changed the control's value, right before that options update. A press that never changes the value emits no lifecycle. `detail.optionKey` is set. */
47
+ readonly luzmoOptionInteractionStart: import("@angular/core").OutputEmitterRef<CustomEvent<ItemOptionInteractionEventDetail>>;
48
+ /** With `live-interactions`: the gesture ended, after its last options update. `detail.changed` is false when the value is back at its start. */
49
+ readonly luzmoOptionInteractionEnd: import("@angular/core").OutputEmitterRef<CustomEvent<ItemOptionInteractionEventDetail>>;
50
+ /** With `live-interactions`: the gesture was cancelled and the control reverted to its start value. */
51
+ readonly luzmoOptionInteractionCancel: import("@angular/core").OutputEmitterRef<CustomEvent<ItemOptionInteractionEventDetail>>;
44
52
  constructor();
45
53
  ngOnChanges(changes: SimpleChanges): void;
46
54
  /**
@@ -52,7 +60,8 @@ export declare class LuzmoItemOption implements OnChanges {
52
60
  private setHostProperty;
53
61
  private bindEvents;
54
62
  static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoItemOption, never>;
55
- static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoItemOption, "luzmo-item-option", ["luzmoItemOption"], { "language": { "alias": "language"; "required": false; }; "itemType": { "alias": "itemType"; "required": false; }; "optionKey": { "alias": "optionKey"; "required": false; }; "customOptionConfiguration": { "alias": "customOptionConfiguration"; "required": false; }; "customTranslations": { "alias": "customTranslations"; "required": false; }; "options": { "alias": "options"; "required": false; }; "slots": { "alias": "slots"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "apiUrl": { "alias": "apiUrl"; "required": false; }; "authKey": { "alias": "authKey"; "required": false; }; "authToken": { "alias": "authToken"; "required": false; }; "size": { "alias": "size"; "required": false; }; "changedOptions": { "alias": "changedOptions"; "required": false; }; }, { "luzmoOptionsChanged": "luzmoOptionsChanged"; }, never, ["*"], true, never>;
63
+ static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoItemOption, "luzmo-item-option", ["luzmoItemOption"], { "language": { "alias": "language"; "required": false; }; "itemType": { "alias": "itemType"; "required": false; }; "optionKey": { "alias": "optionKey"; "required": false; }; "customOptionConfiguration": { "alias": "customOptionConfiguration"; "required": false; }; "customTranslations": { "alias": "customTranslations"; "required": false; }; "options": { "alias": "options"; "required": false; }; "slots": { "alias": "slots"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "apiUrl": { "alias": "apiUrl"; "required": false; }; "authKey": { "alias": "authKey"; "required": false; }; "authToken": { "alias": "authToken"; "required": false; }; "size": { "alias": "size"; "required": false; }; "liveInteractions": { "alias": "liveInteractions"; "required": false; }; "changedOptions": { "alias": "changedOptions"; "required": false; }; }, { "luzmoOptionsChanged": "luzmoOptionsChanged"; "luzmoOptionInteractionStart": "luzmoOptionInteractionStart"; "luzmoOptionInteractionEnd": "luzmoOptionInteractionEnd"; "luzmoOptionInteractionCancel": "luzmoOptionInteractionCancel"; }, never, ["*"], true, never>;
64
+ static ngAcceptInputType_liveInteractions: unknown;
56
65
  }
57
66
  /** The underlying custom element type for LuzmoItemOption */
58
67
  export type LuzmoItemOptionElement = LuzmoItemOptionHostElement;
@@ -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';
3
3
  import * as i0 from "@angular/core";
4
4
  const _c0 = ["*"];
@@ -39,10 +39,18 @@ export class LuzmoItemOption {
39
39
  authToken;
40
40
  /** The size variant of the option control (`s`, `m`, `l`, `xl`). */
41
41
  size;
42
+ /** Emits options updates live, without the control's debounce, plus `luzmo-option-interaction-*` events around drags and held keys. Off by default. */
43
+ liveInteractions;
42
44
  /** Callback that updates `options` and emits `luzmo-options-changed`; used internally by the rendered control. */
43
45
  changedOptions;
44
- /** Announces that the `options` of the element have changed */
46
+ /** Announces that the `options` of the element have changed. With `live-interactions`, updates inside a gesture carry `interaction`. */
45
47
  luzmoOptionsChanged = output({ alias: 'luzmoOptionsChanged' });
48
+ /** With `live-interactions`: a drag or held key first changed the control's value, right before that options update. A press that never changes the value emits no lifecycle. `detail.optionKey` is set. */
49
+ luzmoOptionInteractionStart = output({ alias: 'luzmoOptionInteractionStart' });
50
+ /** With `live-interactions`: the gesture ended, after its last options update. `detail.changed` is false when the value is back at its start. */
51
+ luzmoOptionInteractionEnd = output({ alias: 'luzmoOptionInteractionEnd' });
52
+ /** With `live-interactions`: the gesture was cancelled and the control reverted to its start value. */
53
+ luzmoOptionInteractionCancel = output({ alias: 'luzmoOptionInteractionCancel' });
46
54
  constructor() {
47
55
  this.bindEvents();
48
56
  this.destroyRef.onDestroy(() => {
@@ -90,6 +98,9 @@ export class LuzmoItemOption {
90
98
  case 'size':
91
99
  this.setHostProperty('size', changes['size'].currentValue);
92
100
  break;
101
+ case 'liveInteractions':
102
+ this.setHostProperty('liveInteractions', changes['liveInteractions'].currentValue);
103
+ break;
93
104
  case 'changedOptions':
94
105
  this.setHostProperty('changedOptions', changes['changedOptions'].currentValue);
95
106
  break;
@@ -112,9 +123,21 @@ export class LuzmoItemOption {
112
123
  const typed = event;
113
124
  this.luzmoOptionsChanged.emit(typed);
114
125
  }));
126
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-option-interaction-start', (event) => {
127
+ const typed = event;
128
+ this.luzmoOptionInteractionStart.emit(typed);
129
+ }));
130
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-option-interaction-end', (event) => {
131
+ const typed = event;
132
+ this.luzmoOptionInteractionEnd.emit(typed);
133
+ }));
134
+ this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-option-interaction-cancel', (event) => {
135
+ const typed = event;
136
+ this.luzmoOptionInteractionCancel.emit(typed);
137
+ }));
115
138
  }
116
139
  static ɵfac = function LuzmoItemOption_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoItemOption)(); };
117
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoItemOption, selectors: [["luzmo-item-option"]], inputs: { language: "language", itemType: "itemType", optionKey: "optionKey", customOptionConfiguration: "customOptionConfiguration", customTranslations: "customTranslations", options: "options", slots: "slots", theme: "theme", apiUrl: "apiUrl", authKey: "authKey", authToken: "authToken", size: "size", changedOptions: "changedOptions" }, outputs: { luzmoOptionsChanged: "luzmoOptionsChanged" }, exportAs: ["luzmoItemOption"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoItemOption_Template(rf, ctx) { if (rf & 1) {
140
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoItemOption, selectors: [["luzmo-item-option"]], inputs: { language: "language", itemType: "itemType", optionKey: "optionKey", customOptionConfiguration: "customOptionConfiguration", customTranslations: "customTranslations", options: "options", slots: "slots", theme: "theme", apiUrl: "apiUrl", authKey: "authKey", authToken: "authToken", size: "size", liveInteractions: [2, "liveInteractions", "liveInteractions", booleanAttribute], changedOptions: "changedOptions" }, outputs: { luzmoOptionsChanged: "luzmoOptionsChanged", luzmoOptionInteractionStart: "luzmoOptionInteractionStart", luzmoOptionInteractionEnd: "luzmoOptionInteractionEnd", luzmoOptionInteractionCancel: "luzmoOptionInteractionCancel" }, exportAs: ["luzmoItemOption"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoItemOption_Template(rf, ctx) { if (rf & 1) {
118
141
  i0.ɵɵprojectionDef();
119
142
  i0.ɵɵprojection(0);
120
143
  } }, encapsulation: 2 });
@@ -164,8 +187,11 @@ export class LuzmoItemOption {
164
187
  }], size: [{
165
188
  type: Input,
166
189
  args: [{ alias: 'size' }]
190
+ }], liveInteractions: [{
191
+ type: Input,
192
+ args: [{ alias: 'liveInteractions', transform: booleanAttribute }]
167
193
  }], changedOptions: [{
168
194
  type: Input,
169
195
  args: [{ alias: 'changedOptions' }]
170
- }], luzmoOptionsChanged: [{ type: i0.Output, args: ["luzmoOptionsChanged"] }] }); })();
196
+ }], luzmoOptionsChanged: [{ type: i0.Output, args: ["luzmoOptionsChanged"] }], luzmoOptionInteractionStart: [{ type: i0.Output, args: ["luzmoOptionInteractionStart"] }], luzmoOptionInteractionEnd: [{ type: i0.Output, args: ["luzmoOptionInteractionEnd"] }], luzmoOptionInteractionCancel: [{ type: i0.Output, args: ["luzmoOptionInteractionCancel"] }] }); })();
171
197
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoItemOption, { className: "LuzmoItemOption", filePath: "components/item-option.ts", lineNumber: 18 }); })();
package/package.json CHANGED
@@ -29,9 +29,9 @@
29
29
  "peerDependencies": {
30
30
  "@angular/core": "^17.3.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0",
31
31
  "@angular/forms": "^17.3.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0",
32
- "@luzmo/analytics-components-kit": "1.1.1"
32
+ "@luzmo/analytics-components-kit": "1.2.1"
33
33
  },
34
- "version": "1.1.1",
34
+ "version": "1.2.1",
35
35
  "repository": {
36
36
  "type": "git",
37
37
  "url": "git+https://github.com/cumulio-internal/analytics-components-kit.git"