@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.
Files changed (220) hide show
  1. package/README.md +10 -2
  2. package/angular/components/interactive-viz-item.ts +41 -4
  3. package/angular/components/item-option-color-picker.ts +30 -3
  4. package/angular/components/item-option-color-range.ts +30 -3
  5. package/angular/components/item-option-guidelines.ts +31 -4
  6. package/angular/components/item-option-panel.ts +41 -4
  7. package/angular/components/item-option-slider.ts +41 -4
  8. package/angular/components/item-option.ts +41 -4
  9. package/angular/esm/components/interactive-viz-item.d.ts +14 -5
  10. package/angular/esm/components/interactive-viz-item.js +30 -4
  11. package/angular/esm/components/item-option-color-picker.d.ts +11 -4
  12. package/angular/esm/components/item-option-color-picker.js +23 -3
  13. package/angular/esm/components/item-option-color-range.d.ts +11 -4
  14. package/angular/esm/components/item-option-color-range.js +23 -3
  15. package/angular/esm/components/item-option-guidelines.d.ts +11 -4
  16. package/angular/esm/components/item-option-guidelines.js +24 -4
  17. package/angular/esm/components/item-option-panel.d.ts +13 -4
  18. package/angular/esm/components/item-option-panel.js +30 -4
  19. package/angular/esm/components/item-option-slider.d.ts +13 -4
  20. package/angular/esm/components/item-option-slider.js +30 -4
  21. package/angular/esm/components/item-option.d.ts +13 -4
  22. package/angular/esm/components/item-option.js +30 -4
  23. package/angular/package.json +2 -2
  24. package/angular/utils/option-interaction/index.d.ts +2 -0
  25. package/angular/utils/option-interaction/is-same-option-value.d.ts +10 -0
  26. package/angular/utils/option-interaction/option-interaction-controller.d.ts +54 -0
  27. package/angular/utils/option-interaction/tests/option-interaction-controller.test.d.ts +1 -0
  28. package/angular/utils/store/base-store.d.ts +9 -0
  29. package/angular/utils/store/tests/store-base-history.test.d.ts +1 -0
  30. package/components/add-to-dashboard/index.cjs +1 -1
  31. package/components/add-to-dashboard/index.js +1 -1
  32. package/components/{add-to-dashboard-NwsCPIlg.cjs → add-to-dashboard-CzIuDtAq.cjs} +1 -1
  33. package/components/{add-to-dashboard-NcVHlqrc.js → add-to-dashboard-DGC0_hRB.js} +1 -1
  34. package/components/{base-store-SgJsjLap.cjs → base-store-D3whjduR.cjs} +1 -1
  35. package/components/{base-store-g0dt7ru7.js → base-store-DQYj8A1W.js} +3 -0
  36. package/components/{chart-helpers-Dng_LGfq.js → chart-helpers-Cbl3sRra.js} +3 -2
  37. package/components/chart-helpers-fMnqHRzC.cjs +20 -0
  38. package/components/{choropleth-map-options.config-D9-u-NwX.js → choropleth-map-options.config-Blu0Z2tR.js} +1 -1
  39. package/components/{choropleth-map-options.config-CXDGMiSJ.cjs → choropleth-map-options.config-DwFJ00CS.cjs} +1 -1
  40. package/components/{color-range-utils-CUCTsRXM.js → color-range-utils-CgwRGUkg.js} +18 -18
  41. package/components/{color-range-utils-BCFQAeY1.cjs → color-range-utils-D8uygiMe.cjs} +1 -1
  42. package/components/{heat-map-options.config-ChZeslEy.js → heat-map-options.config-BQkhkLPb.js} +16 -16
  43. package/components/{heat-map-options.config-DiNa8NnG.cjs → heat-map-options.config-DjQkB039.cjs} +1 -1
  44. package/components/{heat-table-options.config-BPCszrFn.js → heat-table-options.config-CMWWTeyo.js} +1 -1
  45. package/components/{heat-table-options.config-BvE6coaV.cjs → heat-table-options.config-D21xtaIk.cjs} +1 -1
  46. package/components/index.cjs +1 -1
  47. package/components/index.js +9 -9
  48. package/components/interactive-viz-item/index.cjs +1 -1
  49. package/components/interactive-viz-item/index.d.ts +2 -1
  50. package/components/interactive-viz-item/index.js +2 -2
  51. package/components/interactive-viz-item/interactive-viz-item.d.ts +34 -2
  52. package/components/interactive-viz-item/types.d.ts +17 -0
  53. package/components/{interactive-viz-item-CofUkpP6.js → interactive-viz-item-BKLOmawA.js} +166 -100
  54. package/components/interactive-viz-item-ojdH1uk0.cjs +268 -0
  55. package/components/is-same-option-value-B2oyvEqT.js +42 -0
  56. package/components/is-same-option-value-Cf6BQcs7.cjs +20 -0
  57. package/components/item-option/helpers/control-markup.d.ts +7 -0
  58. package/components/item-option/index.cjs +1 -1
  59. package/components/item-option/index.d.ts +1 -1
  60. package/components/item-option/index.js +1 -1
  61. package/components/item-option/item-option.d.ts +23 -2
  62. package/components/item-option/types.d.ts +19 -0
  63. package/components/{item-option-Cgx3c08E.js → item-option-DKLRnicU.js} +182 -136
  64. package/components/item-option-DpLdospV.cjs +285 -0
  65. package/components/item-option-color-picker/index.cjs +1 -1
  66. package/components/item-option-color-picker/index.d.ts +1 -1
  67. package/components/item-option-color-picker/index.js +1 -1
  68. package/components/item-option-color-picker/item-option-color-picker.d.ts +17 -1
  69. package/components/item-option-color-picker-CNW7GsCO.cjs +37 -0
  70. package/components/item-option-color-picker-DDvsY7hV.js +129 -0
  71. package/components/item-option-color-range/index.cjs +1 -1
  72. package/components/item-option-color-range/index.d.ts +1 -1
  73. package/components/item-option-color-range/index.js +1 -1
  74. package/components/item-option-color-range/item-option-color-range.d.ts +20 -1
  75. package/components/item-option-color-range-BqSbuSZh.cjs +101 -0
  76. package/components/item-option-color-range-FQduqtz3.js +265 -0
  77. package/components/item-option-guidelines/index.cjs +1 -1
  78. package/components/item-option-guidelines/index.d.ts +1 -1
  79. package/components/item-option-guidelines/index.js +1 -1
  80. package/components/item-option-guidelines/item-option-guidelines.d.ts +16 -1
  81. package/components/{item-option-guidelines-DNJevmVD.js → item-option-guidelines-k5DwMONo.js} +132 -104
  82. package/components/item-option-guidelines-z9BsGR-l.cjs +138 -0
  83. package/components/item-option-panel/index.cjs +1 -1
  84. package/components/item-option-panel/index.d.ts +1 -1
  85. package/components/item-option-panel/index.js +1 -1
  86. package/components/item-option-panel/item-option-panel.d.ts +12 -1
  87. package/components/{item-option-panel-DHdnisRb.js → item-option-panel-BLXWIbjX.js} +18 -6
  88. package/components/{item-option-panel-Dl3aYBNe.cjs → item-option-panel-CU51qvgV.cjs} +6 -4
  89. package/components/item-option-slider/index.cjs +1 -1
  90. package/components/item-option-slider/index.d.ts +1 -1
  91. package/components/item-option-slider/index.js +1 -1
  92. package/components/item-option-slider/item-option-slider.d.ts +15 -2
  93. package/components/item-option-slider-BKtJfL3D.js +119 -0
  94. package/components/item-option-slider-Kz2eFBql.cjs +36 -0
  95. package/components/item-options-configs.cjs +1 -1
  96. package/components/item-options-configs.js +5 -5
  97. package/components/option-interaction-controller-B8S1N_Oo.js +90 -0
  98. package/components/option-interaction-controller-D0U-CTpZ.cjs +20 -0
  99. package/components/{route-map-options.config-DdCaVtIF.cjs → route-map-options.config-DER6ENky.cjs} +1 -1
  100. package/components/{route-map-options.config-B7vT6KG_.js → route-map-options.config-DTcS47fW.js} +1 -1
  101. package/components/{spike-map-options.config-DkmRZ1JZ.js → spike-map-options.config-CPYfKWoF.js} +1 -1
  102. package/components/{spike-map-options.config-B3hDh2qU.cjs → spike-map-options.config-DeF1Whq5.cjs} +1 -1
  103. package/components/utils/store.cjs +1 -1
  104. package/components/utils/store.js +1 -1
  105. package/custom-elements.json +418 -104
  106. package/package.json +2 -2
  107. package/react/components/interactive-viz-item.component.ts +11 -2
  108. package/react/components/item-option-color-picker.component.ts +9 -3
  109. package/react/components/item-option-color-range.component.ts +9 -3
  110. package/react/components/item-option-guidelines.component.ts +9 -3
  111. package/react/components/item-option-panel.component.ts +12 -3
  112. package/react/components/item-option-slider.component.ts +12 -3
  113. package/react/components/item-option.component.ts +12 -3
  114. package/react/esm/components/interactive-viz-item.component.d.ts +8 -2
  115. package/react/esm/components/interactive-viz-item.component.js +7 -1
  116. package/react/esm/components/item-option-color-picker.component.d.ts +6 -2
  117. package/react/esm/components/item-option-color-picker.component.js +6 -2
  118. package/react/esm/components/item-option-color-range.component.d.ts +6 -2
  119. package/react/esm/components/item-option-color-range.component.js +6 -2
  120. package/react/esm/components/item-option-guidelines.component.d.ts +6 -2
  121. package/react/esm/components/item-option-guidelines.component.js +6 -2
  122. package/react/esm/components/item-option-panel.component.d.ts +8 -2
  123. package/react/esm/components/item-option-panel.component.js +8 -2
  124. package/react/esm/components/item-option-slider.component.d.ts +8 -2
  125. package/react/esm/components/item-option-slider.component.js +8 -2
  126. package/react/esm/components/item-option.component.d.ts +8 -2
  127. package/react/esm/components/item-option.component.js +8 -2
  128. package/react/luzmo-stub.d.ts +7 -0
  129. package/react/package.json +2 -2
  130. package/standalone/add-to-dashboard.js +40 -40
  131. package/standalone/chunks/{chart-helpers-DsIGsaDc.js → chart-helpers-CR-EUEPf.js} +2 -2
  132. package/standalone/chunks/{choropleth-map-options.config-Cs4Kvr9h.js → choropleth-map-options.config-CDMjKnJD.js} +1 -1
  133. package/standalone/chunks/{color-range-utils-CKDpd3gZ.js → color-range-utils-BVyHBRiq.js} +1 -1
  134. package/standalone/chunks/de-BkB0q1Eg.js +2 -0
  135. package/standalone/chunks/display-settings-binning-BeLLxd3i.js +38 -0
  136. package/standalone/chunks/display-settings-datetime-BkeiKIVV.js +199 -0
  137. package/standalone/chunks/display-settings-grand-totals-BuhpQKJ6.js +26 -0
  138. package/standalone/chunks/display-settings-numeric-m30IYI7I.js +172 -0
  139. package/standalone/chunks/display-settings-period-over-period-CqDlOSRn.js +209 -0
  140. package/standalone/chunks/embed-Bv1ps-EM.js +260 -0
  141. package/standalone/chunks/en-63f7j4v7.js +2 -0
  142. package/standalone/chunks/en-GB-QAmXQf8W.js +2 -0
  143. package/standalone/chunks/en-US-63f7j4v7.js +2 -0
  144. package/standalone/chunks/es-Bo0jStZn.js +2 -0
  145. package/standalone/chunks/{filters-DKgJcQGP.js → filters-CxgBXUF1.js} +61 -61
  146. package/standalone/chunks/{formula-codemirror-BbyvNEVD.js → formula-codemirror-Cq94j3-f.js} +17 -17
  147. package/standalone/chunks/fr-Co_qVhhV.js +2 -0
  148. package/standalone/chunks/{heat-map-options.config-DF5kjOOe.js → heat-map-options.config-DDQMD38W.js} +1 -1
  149. package/standalone/chunks/{heat-table-options.config-DaePzfHG.js → heat-table-options.config-B4K0Ygug.js} +1 -1
  150. package/standalone/chunks/is-same-option-value-7kXNF4st.js +2 -0
  151. package/standalone/chunks/item-option-action-button-group-BoyqF9vt.js +35 -0
  152. package/standalone/chunks/item-option-base-CBcDT8MX.js +38 -0
  153. package/standalone/chunks/item-option-color-palette-picker-C9PGAv4V.js +22 -0
  154. package/standalone/chunks/item-option-color-picker-D4fVJlqF.js +19 -0
  155. package/standalone/chunks/item-option-color-range-BlAdTguE.js +83 -0
  156. package/standalone/chunks/item-option-guidelines-DMsYsHDu.js +120 -0
  157. package/standalone/chunks/{item-option-multi-language-field-DPPpN2qg.js → item-option-multi-language-field-NUbm1drg.js} +1 -1
  158. package/standalone/chunks/{item-option-number-field-CkqJjInE.js → item-option-number-field-DRp7kbHL.js} +1 -1
  159. package/standalone/chunks/item-option-panel-cXrRclzM.js +316 -0
  160. package/standalone/chunks/{item-option-picker-BnwQPT9A.js → item-option-picker-Ba09L4Cs.js} +1 -1
  161. package/standalone/chunks/item-option-position-picker-GEGTnhjw.js +14 -0
  162. package/standalone/chunks/item-option-positions-number-field-n44s1k5v.js +31 -0
  163. package/standalone/chunks/{item-option-radio-button-group-BkymJq3E.js → item-option-radio-button-group-3s_b1NvR.js} +1 -1
  164. package/standalone/chunks/item-option-slider-DtY65Gxk.js +18 -0
  165. package/standalone/chunks/item-option-switch-4sJaI0mx.js +12 -0
  166. package/standalone/chunks/{item-option-text-field-D7bkuhsv.js → item-option-text-field-Bt6Lj6kh.js} +1 -1
  167. package/standalone/chunks/{item-slot-picker-panel-D4BMxGs9.js → item-slot-picker-panel-BOSVFBIy.js} +43 -43
  168. package/standalone/chunks/load-data-fields-for-datasets-CDlut-6S.js +25 -0
  169. package/standalone/chunks/localized-decorator-DosMCCQo.js +2 -0
  170. package/standalone/chunks/{version-BW4Ixl63.js → localized-mixin-BWJj88bd.js} +1 -1
  171. package/standalone/chunks/nl-CQz2jrVx.js +2 -0
  172. package/standalone/chunks/option-interaction-controller-BuwRr21c.js +2 -0
  173. package/standalone/chunks/{route-map-options.config-D7FfzIiU.js → route-map-options.config-CGBkHnhM.js} +1 -1
  174. package/standalone/chunks/{spike-map-options.config-CZiFzDm9.js → spike-map-options.config-CSenlJ_F.js} +1 -1
  175. package/standalone/interactive-viz-item.js +62 -55
  176. package/standalone/item-grid.js +10 -10
  177. package/standalone/manifest.json +44 -43
  178. package/utils/option-interaction/index.d.ts +2 -0
  179. package/utils/option-interaction/is-same-option-value.d.ts +10 -0
  180. package/utils/option-interaction/option-interaction-controller.d.ts +54 -0
  181. package/utils/option-interaction/tests/option-interaction-controller.test.d.ts +1 -0
  182. package/utils/store/base-store.d.ts +9 -0
  183. package/utils/store/tests/store-base-history.test.d.ts +1 -0
  184. package/components/chart-helpers-ufZ6VbXs.cjs +0 -20
  185. package/components/interactive-viz-item-D537mo3l.cjs +0 -261
  186. package/components/item-option-CqGDFdPj.cjs +0 -269
  187. package/components/item-option-color-picker-BpPoOO2b.cjs +0 -34
  188. package/components/item-option-color-picker-cojuCvu5.js +0 -84
  189. package/components/item-option-color-range-CMBEx1fi.cjs +0 -98
  190. package/components/item-option-color-range-Dt7Bv06p.js +0 -217
  191. package/components/item-option-guidelines-Beh0DlG0.cjs +0 -135
  192. package/components/item-option-slider-Bo5vs6nr.js +0 -89
  193. package/components/item-option-slider-CyWKWr5D.cjs +0 -33
  194. package/standalone/chunks/color-7IgCGZKz.js +0 -2
  195. package/standalone/chunks/de-mdZT2W1G.js +0 -2
  196. package/standalone/chunks/display-settings-binning-Byffw2Kl.js +0 -38
  197. package/standalone/chunks/display-settings-datetime-CD52d6Sv.js +0 -199
  198. package/standalone/chunks/display-settings-grand-totals-Cky99LX9.js +0 -26
  199. package/standalone/chunks/display-settings-numeric-C9ea7Tgc.js +0 -172
  200. package/standalone/chunks/display-settings-period-over-period-BLSGumkD.js +0 -209
  201. package/standalone/chunks/embed-BfHBKhIe.js +0 -231
  202. package/standalone/chunks/en-CSboh17P.js +0 -2
  203. package/standalone/chunks/en-GB-HoXKQBOY.js +0 -2
  204. package/standalone/chunks/en-US-CSboh17P.js +0 -2
  205. package/standalone/chunks/es-Di5D8JFd.js +0 -2
  206. package/standalone/chunks/fr-DZku7iB9.js +0 -2
  207. package/standalone/chunks/item-option-action-button-group-BEAwPHVw.js +0 -35
  208. package/standalone/chunks/item-option-base-CRUxNhJQ.js +0 -38
  209. package/standalone/chunks/item-option-color-palette-picker-CBz61iZb.js +0 -22
  210. package/standalone/chunks/item-option-color-picker-Cr7ujQNO.js +0 -16
  211. package/standalone/chunks/item-option-color-range-CyJd1LZ_.js +0 -80
  212. package/standalone/chunks/item-option-guidelines-6NjpzS6b.js +0 -117
  213. package/standalone/chunks/item-option-panel-VxvWU56c.js +0 -298
  214. package/standalone/chunks/item-option-position-picker-Bkc4JvJX.js +0 -14
  215. package/standalone/chunks/item-option-positions-number-field-Dr_315TE.js +0 -31
  216. package/standalone/chunks/item-option-slider-l9wt7_0c.js +0 -15
  217. package/standalone/chunks/item-option-switch-DeihDHhM.js +0 -12
  218. package/standalone/chunks/load-data-fields-for-datasets-ClctSj6y.js +0 -25
  219. package/standalone/chunks/localized-decorator-DJVBmJVH.js +0 -2
  220. package/standalone/chunks/nl-CViTevL3.js +0 -2
package/README.md CHANGED
@@ -15,7 +15,7 @@ ACK produces and edits chart configuration (type, slots, options, filters). It d
15
15
  ## Installation
16
16
 
17
17
  ```bash
18
- npm install @luzmo/analytics-components-kit lit@^3.3.2 @luzmo/lucero@^2.5.1 @luzmo/icons@^1.0.1-alpha.47
18
+ npm install @luzmo/analytics-components-kit lit@^3.3.2 @luzmo/lucero@^2.6.1 @luzmo/icons@^1.0.1-alpha.49
19
19
  ```
20
20
 
21
21
  ACK uses Lucero 2 for its design-system primitives. Package managers that do not install peer dependencies automatically must install the compatible peer versions explicitly.
@@ -26,6 +26,8 @@ To render the configured charts, also install Luzmo Embed (optional):
26
26
  npm install @luzmo/embed
27
27
  ```
28
28
 
29
+ `@luzmo/embed` works from 7.5.0 within 7.x and on any 8.x (peer range `^7.5.0 || ^8.0.0`); 9 is not supported. A chart's `inlineData` (in `luzmo-interactive-viz-item`) needs 8.1.0 or a later 8.x and is a no-op on 7.x. The config panel loads its columns from the chart's datasets, so it hides itself for a chart with `inlineData` and no dataset columns. Embed applies no filters or ranking to `inlineData`, so a chart with it has no filters editor in the panel and no top-N ranking action. Saving a chart to a dashboard keeps `inlineData`, and the server rejects the save when the dashboard's inline data passes 2 MB in total. Embed treats `inlineData` as already-authorized output and does not apply viewer token filters to it, also after a dashboard save, so remove records the viewer must not see before you pass them.
30
+
29
31
  Optional framework wrappers for embedding: `@luzmo/react-embed`, `@luzmo/ngx-embed`, `@luzmo/vue-embed`.
30
32
 
31
33
  > **Important**: This package is linked to `@luzmo/dashboard-contents-types@1.0.47`. Ensure you are using this version when working with `slotsContents`, `slotConfiguration`, `options`, and grid configurations.
@@ -122,6 +124,10 @@ Let users adjust how a chart looks and behaves (colors, labels, chart mode, lege
122
124
  | Item Option | `@luzmo/analytics-components-kit/item-option` | Single option control (expose only what you need) | [Docs](https://developer.luzmo.com/guide/ack--components--item-options--luzmo-item-option) |
123
125
  | Item Option Panel | `@luzmo/analytics-components-kit/item-option-panel` | Full grouped options editor for a chart type | [Docs](https://developer.luzmo.com/guide/ack--components--item-options--luzmo-item-option-panel) |
124
126
 
127
+ For an editor with undo, set `live-interactions` on `luzmo-item-option`, `luzmo-item-option-panel`, or `luzmo-interactive-viz-item`. You can also enable it directly on `luzmo-item-option-slider`, `luzmo-item-option-color-picker`, `luzmo-item-option-color-range`, and `luzmo-item-option-guidelines` (line colors). Drags and held keys then update live, without debounce. Gesture updates carry `interaction: { id }` on `luzmo-option-changed` for bare controls, `luzmo-options-changed` for item option/panel, and `luzmo-chart-changed` for interactive viz item.
128
+
129
+ All these entry points emit or forward `luzmo-option-interaction-start` (detail `{ id }`) and `-end` / `-cancel` (detail `{ id, changed }`) so you can record one history entry per gesture. A press that changes nothing emits no lifecycle events. Events through item option/panel include `optionKey`; bare controls omit it. Interactive viz item forwards the lifecycle with `optionKey`, plus the original `chart` and `generation` context. Call `endInteraction()` on the control or enclosing item option, panel, or interactive viz item before removing or rebinding it: it synchronously ends open gestures while keeping their current values. Live interactions are off by default; the default keeps the debounced behavior. The gesture boundaries come from Lucero; ACK requires `@luzmo/lucero` `^2.6.1` (at least 2.6.1 and below 3.0.0).
130
+
125
131
  Individual option control editors are also exported for fully custom option UIs: `item-option-action-button-group`, `item-option-color-palette-picker`, `item-option-color-picker`, `item-option-color-range`, `item-option-guidelines`, `item-option-multi-language-field`, `item-option-number-field`, `item-option-picker`, `item-option-position-picker`, `item-option-positions-number-field`, `item-option-radio-button-group`, `item-option-slider`, `item-option-switch`, and `item-option-text-field`.
126
132
 
127
133
  ### Filters
@@ -339,7 +345,9 @@ import type {
339
345
  FiltersFormat,
340
346
  CleanFilterClauseGroup,
341
347
  ItemFilterOutput,
342
- DashboardFilterOutput
348
+ DashboardFilterOutput,
349
+ ItemOptionsChangedEventDetail,
350
+ ItemOptionInteractionEventDetail
343
351
  } from '@luzmo/analytics-components-kit/types';
344
352
  ```
345
353
 
@@ -1,7 +1,7 @@
1
1
  import { booleanAttribute, ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, OnChanges, output, Renderer2, SimpleChanges } from '@angular/core';
2
2
  import '@luzmo/analytics-components-kit/interactive-viz-item';
3
- import type { LuzmoInteractiveVizItem as LuzmoInteractiveVizItemHostElement, AddToDashboardChartAddFailedEventDetail, AddToDashboardChartAddedEventDetail, ChartFeedback, FlexChartConfig, InteractiveVizItemChartChangedEventDetail, InteractiveVizItemChartOptionsChangedEventDetail, InteractiveVizItemFeedbackChangedEventDetail } from '@luzmo/analytics-components-kit/interactive-viz-item';
4
- 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';
3
+ import type { LuzmoInteractiveVizItem as LuzmoInteractiveVizItemHostElement, AddToDashboardChartAddFailedEventDetail, AddToDashboardChartAddedEventDetail, ChartFeedback, FlexChartConfig, InteractiveVizItemChartChangedEventDetail, InteractiveVizItemChartOptionsChangedEventDetail, InteractiveVizItemFeedbackChangedEventDetail, InteractiveVizItemInteractionEventDetail } from '@luzmo/analytics-components-kit/interactive-viz-item';
4
+ export type { AddToDashboardChartAddFailedEventDetail, AddToDashboardChartAddedEventDetail, ChartActionDescriptor, ChartActionType, ChartFeedback, ChartFeedbackRating, ChartMutationRequest, ChartOption, DashboardActions, FlexChartConfig, InlineData, InteractiveVizItemChartChangedEventDetail, InteractiveVizItemChartOptionsChangedEventDetail, InteractiveVizItemFeedbackChangedEventDetail, InteractiveVizItemInteractionEventDetail, ItemOptionInteraction, ItemOptionInteractionEventDetail, NormalizedChartConfig, Ranking, Sort } from '@luzmo/analytics-components-kit/interactive-viz-item';
5
5
  import type { LuzmoEmbedVizItem } from '@luzmo/embed';
6
6
 
7
7
  @Component({
@@ -43,7 +43,7 @@ export class LuzmoInteractiveVizItem implements OnChanges {
43
43
  @Input({ alias: 'canFilter' })
44
44
  canFilter?: LuzmoEmbedVizItem['canFilter'];
45
45
 
46
- /** Loose chart config (type, options, slots, filters); slots may use the keyed-object form. */
46
+ /** Loose chart config (type, options, slots, filters, inlineData); slots may use the keyed-object form. */
47
47
  @Input({ alias: 'chart' })
48
48
  chart?: FlexChartConfig | null;
49
49
 
@@ -91,6 +91,10 @@ export class LuzmoInteractiveVizItem implements OnChanges {
91
91
  @Input({ alias: 'controlled', transform: booleanAttribute })
92
92
  controlled?: boolean;
93
93
 
94
+ /** Applies and emits option changes live while a control is dragged or a key is held, without debounce, and forwards `luzmo-option-interaction-*` events. Off by default. */
95
+ @Input({ alias: 'liveInteractions', transform: booleanAttribute })
96
+ liveInteractions?: boolean;
97
+
94
98
  /** The size of the element */
95
99
  @Input({ alias: 'size' })
96
100
  size?: 's' | 'm' | 'l' | 'xl';
@@ -98,9 +102,18 @@ export class LuzmoInteractiveVizItem implements OnChanges {
98
102
  /** Fired when the inline actions (ranking, sort, display mode) change the chart options. Applied to `chart` first unless `controlled` is set. */
99
103
  readonly luzmoChartOptionsChanged = output<CustomEvent<InteractiveVizItemChartOptionsChangedEventDetail>>({ alias: 'luzmoChartOptionsChanged' });
100
104
 
101
- /** Fired when the config panel changes slots, filters, or options (full chart). Applied to `chart` first unless `controlled` is set. */
105
+ /** 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`. */
102
106
  readonly luzmoChartChanged = output<CustomEvent<InteractiveVizItemChartChangedEventDetail>>({ alias: 'luzmoChartChanged' });
103
107
 
108
+ /** 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. */
109
+ readonly luzmoOptionInteractionStart = output<CustomEvent<InteractiveVizItemInteractionEventDetail>>({ alias: 'luzmoOptionInteractionStart' });
110
+
111
+ /** 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. */
112
+ readonly luzmoOptionInteractionEnd = output<CustomEvent<InteractiveVizItemInteractionEventDetail>>({ alias: 'luzmoOptionInteractionEnd' });
113
+
114
+ /** With `live-interactions`: the gesture was cancelled and the control reverted to its start value. */
115
+ readonly luzmoOptionInteractionCancel = output<CustomEvent<InteractiveVizItemInteractionEventDetail>>({ alias: 'luzmoOptionInteractionCancel' });
116
+
104
117
  /** Fired when the user changes the thumbs up/down rating. Never applied to `feedback`; the host owns it in both modes. */
105
118
  readonly luzmoFeedbackChanged = output<CustomEvent<InteractiveVizItemFeedbackChangedEventDetail>>({ alias: 'luzmoFeedbackChanged' });
106
119
 
@@ -167,6 +180,9 @@ export class LuzmoInteractiveVizItem implements OnChanges {
167
180
  case 'controlled':
168
181
  this.setHostProperty('controlled', changes['controlled'].currentValue);
169
182
  break;
183
+ case 'liveInteractions':
184
+ this.setHostProperty('liveInteractions', changes['liveInteractions'].currentValue);
185
+ break;
170
186
  case 'size':
171
187
  this.setHostProperty('size', changes['size'].currentValue);
172
188
  break;
@@ -201,6 +217,27 @@ export class LuzmoInteractiveVizItem implements OnChanges {
201
217
  })
202
218
  );
203
219
 
220
+ this.listenerCleanup.push(
221
+ this.renderer.listen(this.host, 'luzmo-option-interaction-start', (event: Event) => {
222
+ const typed = event as CustomEvent<InteractiveVizItemInteractionEventDetail>;
223
+ this.luzmoOptionInteractionStart.emit(typed);
224
+ })
225
+ );
226
+
227
+ this.listenerCleanup.push(
228
+ this.renderer.listen(this.host, 'luzmo-option-interaction-end', (event: Event) => {
229
+ const typed = event as CustomEvent<InteractiveVizItemInteractionEventDetail>;
230
+ this.luzmoOptionInteractionEnd.emit(typed);
231
+ })
232
+ );
233
+
234
+ this.listenerCleanup.push(
235
+ this.renderer.listen(this.host, 'luzmo-option-interaction-cancel', (event: Event) => {
236
+ const typed = event as CustomEvent<InteractiveVizItemInteractionEventDetail>;
237
+ this.luzmoOptionInteractionCancel.emit(typed);
238
+ })
239
+ );
240
+
204
241
  this.listenerCleanup.push(
205
242
  this.renderer.listen(this.host, 'luzmo-feedback-changed', (event: Event) => {
206
243
  const typed = event as CustomEvent<InteractiveVizItemFeedbackChangedEventDetail>;
@@ -1,7 +1,7 @@
1
1
  import { booleanAttribute, ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, OnChanges, output, Renderer2, SimpleChanges } from '@angular/core';
2
2
  import '@luzmo/analytics-components-kit/item-option-color-picker';
3
- import type { LuzmoItemOptionColorPicker as LuzmoItemOptionColorPickerHostElement, ItemOptionChangedEventDetail } from '@luzmo/analytics-components-kit/item-option-color-picker';
4
- export type { 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
+ export type { ItemOptionChangedEventDetail, ItemOptionInteraction, ItemOptionInteractionEventDetail } from '@luzmo/analytics-components-kit/item-option-color-picker';
5
5
  import type { Placement } from '@luzmo/lucero';
6
6
 
7
7
  @Component({
@@ -42,6 +42,10 @@ export class LuzmoItemOptionColorPicker implements OnChanges {
42
42
  @Input({ alias: 'debounce' })
43
43
  debounce?: number;
44
44
 
45
+ /** Emits value updates live, without `debounce`, plus interaction lifecycle events for drags and held keys. */
46
+ @Input({ alias: 'liveInteractions', transform: booleanAttribute })
47
+ liveInteractions?: boolean;
48
+
45
49
  /** Internal timer handle used to debounce change events. */
46
50
  @Input({ alias: 'debounceTimeout' })
47
51
  debounceTimeout?: any;
@@ -62,9 +66,15 @@ export class LuzmoItemOptionColorPicker implements OnChanges {
62
66
  @Input({ alias: 'placement' })
63
67
  placement?: Placement;
64
68
 
65
- /** Emitted when the option value changes. */
69
+ /** Emitted when the option value changes. With `live-interactions`, emitted on every color change and carries `interaction` inside a gesture. */
66
70
  readonly luzmoOptionChanged = output<CustomEvent<ItemOptionChangedEventDetail>>({ alias: 'luzmoOptionChanged' });
67
71
 
72
+ /** 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. */
73
+ readonly luzmoOptionInteractionStart = output<CustomEvent<ItemOptionInteractionEventDetail>>({ alias: 'luzmoOptionInteractionStart' });
74
+
75
+ /** With `live-interactions`: the gesture ended (including when the popover closes), after its last value update. */
76
+ readonly luzmoOptionInteractionEnd = output<CustomEvent<ItemOptionInteractionEventDetail>>({ alias: 'luzmoOptionInteractionEnd' });
77
+
68
78
  constructor() {
69
79
  this.bindEvents();
70
80
  this.destroyRef.onDestroy(() => {
@@ -89,6 +99,9 @@ export class LuzmoItemOptionColorPicker implements OnChanges {
89
99
  case 'debounce':
90
100
  this.setHostProperty('debounce', changes['debounce'].currentValue);
91
101
  break;
102
+ case 'liveInteractions':
103
+ this.setHostProperty('liveInteractions', changes['liveInteractions'].currentValue);
104
+ break;
92
105
  case 'debounceTimeout':
93
106
  this.setHostProperty('debounceTimeout', changes['debounceTimeout'].currentValue);
94
107
  break;
@@ -127,6 +140,20 @@ export class LuzmoItemOptionColorPicker implements OnChanges {
127
140
  this.luzmoOptionChanged.emit(typed);
128
141
  })
129
142
  );
143
+
144
+ this.listenerCleanup.push(
145
+ this.renderer.listen(this.host, 'luzmo-option-interaction-start', (event: Event) => {
146
+ const typed = event as CustomEvent<ItemOptionInteractionEventDetail>;
147
+ this.luzmoOptionInteractionStart.emit(typed);
148
+ })
149
+ );
150
+
151
+ this.listenerCleanup.push(
152
+ this.renderer.listen(this.host, 'luzmo-option-interaction-end', (event: Event) => {
153
+ const typed = event as CustomEvent<ItemOptionInteractionEventDetail>;
154
+ this.luzmoOptionInteractionEnd.emit(typed);
155
+ })
156
+ );
130
157
  }
131
158
  }
132
159
 
@@ -1,7 +1,7 @@
1
1
  import { booleanAttribute, ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, OnChanges, output, Renderer2, SimpleChanges } from '@angular/core';
2
2
  import '@luzmo/analytics-components-kit/item-option-color-range';
3
- import type { LuzmoItemOptionColorRange as LuzmoItemOptionColorRangeHostElement, ItemOptionChangedEventDetail } from '@luzmo/analytics-components-kit/item-option-color-range';
4
- export type { 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
+ export type { ItemOptionChangedEventDetail, ItemOptionInteraction, ItemOptionInteractionEventDetail } from '@luzmo/analytics-components-kit/item-option-color-range';
5
5
 
6
6
  @Component({
7
7
  selector: 'luzmo-item-option-color-range',
@@ -73,6 +73,10 @@ export class LuzmoItemOptionColorRange implements OnChanges {
73
73
  @Input({ alias: 'debounce' })
74
74
  debounce?: number;
75
75
 
76
+ /** Emits value updates live, without `debounce`, plus interaction lifecycle events for color drags and held keys */
77
+ @Input({ alias: 'liveInteractions', transform: booleanAttribute })
78
+ liveInteractions?: boolean;
79
+
76
80
  /** The function to parse the value */
77
81
  @Input({ alias: 'parseValue' })
78
82
  parseValue?: unknown;
@@ -81,9 +85,15 @@ export class LuzmoItemOptionColorRange implements OnChanges {
81
85
  @Input({ alias: 'toValue' })
82
86
  toValue?: unknown;
83
87
 
84
- /** Emitted when the option value changes. */
88
+ /** Emitted when the option value changes. With `live-interactions`, emitted immediately and carries `interaction` while a stop's color is dragged. */
85
89
  readonly luzmoOptionChanged = output<CustomEvent<ItemOptionChangedEventDetail>>({ alias: 'luzmoOptionChanged' });
86
90
 
91
+ /** 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. */
92
+ readonly luzmoOptionInteractionStart = output<CustomEvent<ItemOptionInteractionEventDetail>>({ alias: 'luzmoOptionInteractionStart' });
93
+
94
+ /** With `live-interactions`: that stop's gesture ended, after its last value update. */
95
+ readonly luzmoOptionInteractionEnd = output<CustomEvent<ItemOptionInteractionEventDetail>>({ alias: 'luzmoOptionInteractionEnd' });
96
+
87
97
  constructor() {
88
98
  this.bindEvents();
89
99
  this.destroyRef.onDestroy(() => {
@@ -132,6 +142,9 @@ export class LuzmoItemOptionColorRange implements OnChanges {
132
142
  case 'debounce':
133
143
  this.setHostProperty('debounce', changes['debounce'].currentValue);
134
144
  break;
145
+ case 'liveInteractions':
146
+ this.setHostProperty('liveInteractions', changes['liveInteractions'].currentValue);
147
+ break;
135
148
  case 'parseValue':
136
149
  this.setHostProperty('parseValue', changes['parseValue'].currentValue);
137
150
  break;
@@ -161,6 +174,20 @@ export class LuzmoItemOptionColorRange implements OnChanges {
161
174
  this.luzmoOptionChanged.emit(typed);
162
175
  })
163
176
  );
177
+
178
+ this.listenerCleanup.push(
179
+ this.renderer.listen(this.host, 'luzmo-option-interaction-start', (event: Event) => {
180
+ const typed = event as CustomEvent<ItemOptionInteractionEventDetail>;
181
+ this.luzmoOptionInteractionStart.emit(typed);
182
+ })
183
+ );
184
+
185
+ this.listenerCleanup.push(
186
+ this.renderer.listen(this.host, 'luzmo-option-interaction-end', (event: Event) => {
187
+ const typed = event as CustomEvent<ItemOptionInteractionEventDetail>;
188
+ this.luzmoOptionInteractionEnd.emit(typed);
189
+ })
190
+ );
164
191
  }
165
192
  }
166
193
 
@@ -1,7 +1,7 @@
1
- import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, OnChanges, output, Renderer2, SimpleChanges } from '@angular/core';
1
+ import { booleanAttribute, ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, OnChanges, output, Renderer2, SimpleChanges } from '@angular/core';
2
2
  import '@luzmo/analytics-components-kit/item-option-guidelines';
3
- import type { LuzmoItemOptionGuidelines as LuzmoItemOptionGuidelinesHostElement, ItemOptionChangedEventDetail } from '@luzmo/analytics-components-kit/item-option-guidelines';
4
- export type { GuidelineLine, GuidelineLineType, GuidelineStyle, GuidelineStyleType, GuidelineWidth, Guidelines, 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
+ export type { GuidelineLine, GuidelineLineType, GuidelineStyle, GuidelineStyleType, GuidelineWidth, Guidelines, ItemOptionChangedEventDetail, ItemOptionInteraction, ItemOptionInteractionEventDetail } from '@luzmo/analytics-components-kit/item-option-guidelines';
5
5
 
6
6
  @Component({
7
7
  selector: 'luzmo-item-option-guidelines',
@@ -33,9 +33,19 @@ export class LuzmoItemOptionGuidelines implements OnChanges {
33
33
  @Input({ alias: 'debounce' })
34
34
  debounce?: number;
35
35
 
36
- /** Emitted when the guidelines value changes. */
36
+ /** Emits value updates live, without `debounce`, plus interaction lifecycle events for color drags and held keys. */
37
+ @Input({ alias: 'liveInteractions', transform: booleanAttribute })
38
+ liveInteractions?: boolean;
39
+
40
+ /** Emitted when the guidelines value changes. With `live-interactions`, emitted immediately and carries `interaction` while a line's color is dragged. */
37
41
  readonly luzmoOptionChanged = output<CustomEvent<ItemOptionChangedEventDetail>>({ alias: 'luzmoOptionChanged' });
38
42
 
43
+ /** 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. */
44
+ readonly luzmoOptionInteractionStart = output<CustomEvent<ItemOptionInteractionEventDetail>>({ alias: 'luzmoOptionInteractionStart' });
45
+
46
+ /** With `live-interactions`: that line's gesture ended, after its last value update. */
47
+ readonly luzmoOptionInteractionEnd = output<CustomEvent<ItemOptionInteractionEventDetail>>({ alias: 'luzmoOptionInteractionEnd' });
48
+
39
49
  constructor() {
40
50
  this.bindEvents();
41
51
  this.destroyRef.onDestroy(() => {
@@ -54,6 +64,9 @@ export class LuzmoItemOptionGuidelines implements OnChanges {
54
64
  case 'debounce':
55
65
  this.setHostProperty('debounce', changes['debounce'].currentValue);
56
66
  break;
67
+ case 'liveInteractions':
68
+ this.setHostProperty('liveInteractions', changes['liveInteractions'].currentValue);
69
+ break;
57
70
  default:
58
71
  break;
59
72
  }
@@ -77,6 +90,20 @@ export class LuzmoItemOptionGuidelines implements OnChanges {
77
90
  this.luzmoOptionChanged.emit(typed);
78
91
  })
79
92
  );
93
+
94
+ this.listenerCleanup.push(
95
+ this.renderer.listen(this.host, 'luzmo-option-interaction-start', (event: Event) => {
96
+ const typed = event as CustomEvent<ItemOptionInteractionEventDetail>;
97
+ this.luzmoOptionInteractionStart.emit(typed);
98
+ })
99
+ );
100
+
101
+ this.listenerCleanup.push(
102
+ this.renderer.listen(this.host, 'luzmo-option-interaction-end', (event: Event) => {
103
+ const typed = event as CustomEvent<ItemOptionInteractionEventDetail>;
104
+ this.luzmoOptionInteractionEnd.emit(typed);
105
+ })
106
+ );
80
107
  }
81
108
  }
82
109
 
@@ -1,7 +1,7 @@
1
- import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, OnChanges, output, Renderer2, SimpleChanges } from '@angular/core';
1
+ import { booleanAttribute, ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, OnChanges, output, Renderer2, SimpleChanges } from '@angular/core';
2
2
  import '@luzmo/analytics-components-kit/item-option-panel';
3
- import type { LuzmoItemOptionPanel as LuzmoItemOptionPanelHostElement, ItemOptionsChangedEventDetail } from '@luzmo/analytics-components-kit/item-option-panel';
4
- export type { 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
+ export type { ItemOptionInteraction, ItemOptionInteractionEventDetail, ItemOptionsChangedEventDetail } from '@luzmo/analytics-components-kit/item-option-panel';
5
5
  import type { ElementSize } from '@luzmo/analytics-components-kit/types';
6
6
  import type { OptionsConfig, Slot, ThemeConfig, TranslationOverrides, TranslationsFile, VizItemType } from '@luzmo/dashboard-contents-types';
7
7
 
@@ -71,9 +71,22 @@ export class LuzmoItemOptionPanel implements OnChanges {
71
71
  @Input({ alias: 'authToken' })
72
72
  authToken?: string;
73
73
 
74
- /** Announces that the `options` of the element have changed */
74
+ /** Emits options updates live, without the controls' debounce, plus `luzmo-option-interaction-*` events around drags and held keys. Off by default. */
75
+ @Input({ alias: 'liveInteractions', transform: booleanAttribute })
76
+ liveInteractions?: boolean;
77
+
78
+ /** Announces that the `options` of the element have changed. With `live-interactions`, updates inside a gesture carry `interaction`. */
75
79
  readonly luzmoOptionsChanged = output<CustomEvent<ItemOptionsChangedEventDetail>>({ alias: 'luzmoOptionsChanged' });
76
80
 
81
+ /** 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. */
82
+ readonly luzmoOptionInteractionStart = output<CustomEvent<ItemOptionInteractionEventDetail>>({ alias: 'luzmoOptionInteractionStart' });
83
+
84
+ /** With `live-interactions`: bubbles from the option whose gesture ended, after its last options update. */
85
+ readonly luzmoOptionInteractionEnd = output<CustomEvent<ItemOptionInteractionEventDetail>>({ alias: 'luzmoOptionInteractionEnd' });
86
+
87
+ /** With `live-interactions`: bubbles from the option whose gesture was cancelled and reverted. */
88
+ readonly luzmoOptionInteractionCancel = output<CustomEvent<ItemOptionInteractionEventDetail>>({ alias: 'luzmoOptionInteractionCancel' });
89
+
77
90
  constructor() {
78
91
  this.bindEvents();
79
92
  this.destroyRef.onDestroy(() => {
@@ -119,6 +132,9 @@ export class LuzmoItemOptionPanel implements OnChanges {
119
132
  case 'authToken':
120
133
  this.setHostProperty('authToken', changes['authToken'].currentValue);
121
134
  break;
135
+ case 'liveInteractions':
136
+ this.setHostProperty('liveInteractions', changes['liveInteractions'].currentValue);
137
+ break;
122
138
  default:
123
139
  break;
124
140
  }
@@ -142,6 +158,27 @@ export class LuzmoItemOptionPanel implements OnChanges {
142
158
  this.luzmoOptionsChanged.emit(typed);
143
159
  })
144
160
  );
161
+
162
+ this.listenerCleanup.push(
163
+ this.renderer.listen(this.host, 'luzmo-option-interaction-start', (event: Event) => {
164
+ const typed = event as CustomEvent<ItemOptionInteractionEventDetail>;
165
+ this.luzmoOptionInteractionStart.emit(typed);
166
+ })
167
+ );
168
+
169
+ this.listenerCleanup.push(
170
+ this.renderer.listen(this.host, 'luzmo-option-interaction-end', (event: Event) => {
171
+ const typed = event as CustomEvent<ItemOptionInteractionEventDetail>;
172
+ this.luzmoOptionInteractionEnd.emit(typed);
173
+ })
174
+ );
175
+
176
+ this.listenerCleanup.push(
177
+ this.renderer.listen(this.host, 'luzmo-option-interaction-cancel', (event: Event) => {
178
+ const typed = event as CustomEvent<ItemOptionInteractionEventDetail>;
179
+ this.luzmoOptionInteractionCancel.emit(typed);
180
+ })
181
+ );
145
182
  }
146
183
  }
147
184
 
@@ -1,7 +1,7 @@
1
- import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, OnChanges, output, Renderer2, SimpleChanges } from '@angular/core';
1
+ import { booleanAttribute, ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, OnChanges, output, Renderer2, SimpleChanges } from '@angular/core';
2
2
  import '@luzmo/analytics-components-kit/item-option-slider';
3
- import type { LuzmoItemOptionSlider as LuzmoItemOptionSliderHostElement, ItemOptionChangedEventDetail } from '@luzmo/analytics-components-kit/item-option-slider';
4
- export type { 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
+ export type { ItemOptionChangedEventDetail, ItemOptionInteraction, ItemOptionInteractionEventDetail } from '@luzmo/analytics-components-kit/item-option-slider';
5
5
 
6
6
  @Component({
7
7
  selector: 'luzmo-item-option-slider',
@@ -49,6 +49,10 @@ export class LuzmoItemOptionSlider implements OnChanges {
49
49
  @Input({ alias: 'debounce' })
50
50
  debounce?: number;
51
51
 
52
+ /** Emits value updates live, without `debounce`, plus interaction lifecycle events for drags and held keys. */
53
+ @Input({ alias: 'liveInteractions', transform: booleanAttribute })
54
+ liveInteractions?: boolean;
55
+
52
56
  /** Optional transform applied to the stored value before it is displayed in the control. */
53
57
  @Input({ alias: 'parseValue' })
54
58
  parseValue?: unknown;
@@ -57,9 +61,18 @@ export class LuzmoItemOptionSlider implements OnChanges {
57
61
  @Input({ alias: 'toValue' })
58
62
  toValue?: unknown;
59
63
 
60
- /** Emitted when the option value changes. */
64
+ /** Emitted when the option value changes. With `live-interactions`, emitted on every drag or key step and carries `interaction` inside a gesture. */
61
65
  readonly luzmoOptionChanged = output<CustomEvent<ItemOptionChangedEventDetail>>({ alias: 'luzmoOptionChanged' });
62
66
 
67
+ /** 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. */
68
+ readonly luzmoOptionInteractionStart = output<CustomEvent<ItemOptionInteractionEventDetail>>({ alias: 'luzmoOptionInteractionStart' });
69
+
70
+ /** With `live-interactions`: the gesture ended, after its last value update. `changed` is false when the value is back at its start. */
71
+ readonly luzmoOptionInteractionEnd = output<CustomEvent<ItemOptionInteractionEventDetail>>({ alias: 'luzmoOptionInteractionEnd' });
72
+
73
+ /** With `live-interactions`: the pointer was cancelled and the slider reverted to its start value. */
74
+ readonly luzmoOptionInteractionCancel = output<CustomEvent<ItemOptionInteractionEventDetail>>({ alias: 'luzmoOptionInteractionCancel' });
75
+
63
76
  constructor() {
64
77
  this.bindEvents();
65
78
  this.destroyRef.onDestroy(() => {
@@ -90,6 +103,9 @@ export class LuzmoItemOptionSlider implements OnChanges {
90
103
  case 'debounce':
91
104
  this.setHostProperty('debounce', changes['debounce'].currentValue);
92
105
  break;
106
+ case 'liveInteractions':
107
+ this.setHostProperty('liveInteractions', changes['liveInteractions'].currentValue);
108
+ break;
93
109
  case 'parseValue':
94
110
  this.setHostProperty('parseValue', changes['parseValue'].currentValue);
95
111
  break;
@@ -119,6 +135,27 @@ export class LuzmoItemOptionSlider implements OnChanges {
119
135
  this.luzmoOptionChanged.emit(typed);
120
136
  })
121
137
  );
138
+
139
+ this.listenerCleanup.push(
140
+ this.renderer.listen(this.host, 'luzmo-option-interaction-start', (event: Event) => {
141
+ const typed = event as CustomEvent<ItemOptionInteractionEventDetail>;
142
+ this.luzmoOptionInteractionStart.emit(typed);
143
+ })
144
+ );
145
+
146
+ this.listenerCleanup.push(
147
+ this.renderer.listen(this.host, 'luzmo-option-interaction-end', (event: Event) => {
148
+ const typed = event as CustomEvent<ItemOptionInteractionEventDetail>;
149
+ this.luzmoOptionInteractionEnd.emit(typed);
150
+ })
151
+ );
152
+
153
+ this.listenerCleanup.push(
154
+ this.renderer.listen(this.host, 'luzmo-option-interaction-cancel', (event: Event) => {
155
+ const typed = event as CustomEvent<ItemOptionInteractionEventDetail>;
156
+ this.luzmoOptionInteractionCancel.emit(typed);
157
+ })
158
+ );
122
159
  }
123
160
  }
124
161
 
@@ -1,7 +1,7 @@
1
- import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, OnChanges, output, Renderer2, SimpleChanges } from '@angular/core';
1
+ import { booleanAttribute, ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, OnChanges, output, Renderer2, SimpleChanges } from '@angular/core';
2
2
  import '@luzmo/analytics-components-kit/item-option';
3
- import type { LuzmoItemOption as LuzmoItemOptionHostElement, ItemOptionsChangedEventDetail } from '@luzmo/analytics-components-kit/item-option';
4
- export type { ItemOptionChangedEventDetail, ItemOptionsChangedEventDetail } from '@luzmo/analytics-components-kit/item-option';
3
+ import type { LuzmoItemOption as LuzmoItemOptionHostElement, ItemOptionInteractionEventDetail, ItemOptionsChangedEventDetail } from '@luzmo/analytics-components-kit/item-option';
4
+ export type { ItemOptionChangedEventDetail, ItemOptionInteraction, ItemOptionInteractionEventDetail, ItemOptionInteractionEventName, ItemOptionsChangedEventDetail } from '@luzmo/analytics-components-kit/item-option';
5
5
  import type { ElementSize } from '@luzmo/analytics-components-kit/types';
6
6
  import type { OptionConfig, OptionTranslation, ThemeConfig, TranslationOverrides, VizItemType } from '@luzmo/dashboard-contents-types';
7
7
 
@@ -75,13 +75,26 @@ export class LuzmoItemOption implements OnChanges {
75
75
  @Input({ alias: 'size' })
76
76
  size?: ElementSize;
77
77
 
78
+ /** Emits options updates live, without the control's debounce, plus `luzmo-option-interaction-*` events around drags and held keys. Off by default. */
79
+ @Input({ alias: 'liveInteractions', transform: booleanAttribute })
80
+ liveInteractions?: boolean;
81
+
78
82
  /** Callback that updates `options` and emits `luzmo-options-changed`; used internally by the rendered control. */
79
83
  @Input({ alias: 'changedOptions' })
80
84
  changedOptions?: unknown;
81
85
 
82
- /** Announces that the `options` of the element have changed */
86
+ /** Announces that the `options` of the element have changed. With `live-interactions`, updates inside a gesture carry `interaction`. */
83
87
  readonly luzmoOptionsChanged = output<CustomEvent<ItemOptionsChangedEventDetail>>({ alias: 'luzmoOptionsChanged' });
84
88
 
89
+ /** 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. */
90
+ readonly luzmoOptionInteractionStart = output<CustomEvent<ItemOptionInteractionEventDetail>>({ alias: 'luzmoOptionInteractionStart' });
91
+
92
+ /** With `live-interactions`: the gesture ended, after its last options update. `detail.changed` is false when the value is back at its start. */
93
+ readonly luzmoOptionInteractionEnd = output<CustomEvent<ItemOptionInteractionEventDetail>>({ alias: 'luzmoOptionInteractionEnd' });
94
+
95
+ /** With `live-interactions`: the gesture was cancelled and the control reverted to its start value. */
96
+ readonly luzmoOptionInteractionCancel = output<CustomEvent<ItemOptionInteractionEventDetail>>({ alias: 'luzmoOptionInteractionCancel' });
97
+
85
98
  constructor() {
86
99
  this.bindEvents();
87
100
  this.destroyRef.onDestroy(() => {
@@ -130,6 +143,9 @@ export class LuzmoItemOption implements OnChanges {
130
143
  case 'size':
131
144
  this.setHostProperty('size', changes['size'].currentValue);
132
145
  break;
146
+ case 'liveInteractions':
147
+ this.setHostProperty('liveInteractions', changes['liveInteractions'].currentValue);
148
+ break;
133
149
  case 'changedOptions':
134
150
  this.setHostProperty('changedOptions', changes['changedOptions'].currentValue);
135
151
  break;
@@ -156,6 +172,27 @@ export class LuzmoItemOption implements OnChanges {
156
172
  this.luzmoOptionsChanged.emit(typed);
157
173
  })
158
174
  );
175
+
176
+ this.listenerCleanup.push(
177
+ this.renderer.listen(this.host, 'luzmo-option-interaction-start', (event: Event) => {
178
+ const typed = event as CustomEvent<ItemOptionInteractionEventDetail>;
179
+ this.luzmoOptionInteractionStart.emit(typed);
180
+ })
181
+ );
182
+
183
+ this.listenerCleanup.push(
184
+ this.renderer.listen(this.host, 'luzmo-option-interaction-end', (event: Event) => {
185
+ const typed = event as CustomEvent<ItemOptionInteractionEventDetail>;
186
+ this.luzmoOptionInteractionEnd.emit(typed);
187
+ })
188
+ );
189
+
190
+ this.listenerCleanup.push(
191
+ this.renderer.listen(this.host, 'luzmo-option-interaction-cancel', (event: Event) => {
192
+ const typed = event as CustomEvent<ItemOptionInteractionEventDetail>;
193
+ this.luzmoOptionInteractionCancel.emit(typed);
194
+ })
195
+ );
159
196
  }
160
197
  }
161
198
 
@@ -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, InlineData, 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;
@@ -18,7 +18,7 @@ export declare class LuzmoInteractiveVizItem implements OnChanges {
18
18
  addToDashboard?: boolean;
19
19
  /** Click-to-filter on the embedded chart, forwarded as its `canFilter`. The `can-filter` attribute means `'all'`; unset keeps it off. */
20
20
  canFilter?: LuzmoEmbedVizItem['canFilter'];
21
- /** Loose chart config (type, options, slots, filters); slots may use the keyed-object form. */
21
+ /** Loose chart config (type, options, slots, filters, inlineData); slots may use the keyed-object form. */
22
22
  chart?: FlexChartConfig | null;
23
23
  /** Current feedback (drives the thumbs up/down selection). */
24
24
  feedback?: ChartFeedback | null;
@@ -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;