@luzmo/analytics-components-kit 1.0.1-alpha.86 → 1.0.1-alpha.87

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 (229) hide show
  1. package/components/ai-chat-messages-container/index.cjs +1 -1
  2. package/components/ai-chat-messages-container/index.js +2 -2
  3. package/components/ai-interaction-textarea/index.cjs +1 -1
  4. package/components/ai-interaction-textarea/index.js +1 -2
  5. package/components/area-chart-options.config-Bl8bhhOo.cjs +20 -0
  6. package/components/{area-chart-options.config-_J0sG4NF.js → area-chart-options.config-u8itidsi.js} +14 -26
  7. package/components/bar-chart-options.config-CePAqM83.cjs +20 -0
  8. package/components/{bar-chart-options.config-D1mb5TDl.js → bar-chart-options.config-DIirbAJ0.js} +21 -35
  9. package/components/box-plot-options.config-BVNrV2eD.cjs +20 -0
  10. package/components/{box-plot-options.config-xu_i6ms7.js → box-plot-options.config-BWROiguA.js} +52 -88
  11. package/components/{bubble-chart-options.config-BacgXkJ_.js → bubble-chart-options.config-4QD8VPhU.js} +9 -18
  12. package/components/bubble-chart-options.config-BDgOe3GQ.cjs +20 -0
  13. package/components/{bullet-chart-options.config-CDPpX1yc.js → bullet-chart-options.config-3bH7uekx.js} +1 -1
  14. package/components/{bullet-chart-options.config-DfS4Bwds.cjs → bullet-chart-options.config-tWb6Fio-.cjs} +1 -1
  15. package/components/calculate-data-item-icon-C8CbsMQf.js +139 -0
  16. package/components/{calculate-data-item-icon-DjW1_RI1.cjs → calculate-data-item-icon-CX4VW9Km.cjs} +1 -1
  17. package/components/{choropleth-map-options.config-B_W9-rhe.js → choropleth-map-options.config-CMxx3ORp.js} +63 -84
  18. package/components/choropleth-map-options.config-CWJACFd0.cjs +20 -0
  19. package/components/circular-gauge-options.config-BMxgq3zH.cjs +20 -0
  20. package/components/{circular-gauge-options.config-DAIjz4Rl.js → circular-gauge-options.config-DhIKn44k.js} +23 -36
  21. package/components/{color-DuJ4-73S.js → color-B7m0j8lX.js} +941 -950
  22. package/components/color-Czp4Im5q.cjs +20 -0
  23. package/components/{color-range-utils-Bvo9sm5A.js → color-range-utils-BSfqtB3A.js} +31 -32
  24. package/components/color-range-utils-DYYR-iwx.cjs +20 -0
  25. package/components/column-chart-options.config-BV9R3ssH.cjs +20 -0
  26. package/components/{column-chart-options.config-B5SjBVdy.js → column-chart-options.config-D5-yR7iq.js} +27 -37
  27. package/components/conditional-number-options.config-Co099Qfm.cjs +20 -0
  28. package/components/{conditional-number-options.config-BCEpSK9J.js → conditional-number-options.config-DPYsdML5.js} +24 -40
  29. package/components/dataset-icon/index.cjs +1 -1
  30. package/components/dataset-icon/index.js +1 -2
  31. package/components/dataset-selector-list/index.cjs +1 -1
  32. package/components/dataset-selector-list/index.js +32 -35
  33. package/components/dataset-selector-row/index.cjs +9 -9
  34. package/components/dataset-selector-row/index.js +51 -53
  35. package/components/{date-comparison-filter-options.config-JA_yYpJa.js → date-comparison-filter-options.config-CSwGyuBg.js} +3 -6
  36. package/components/{date-comparison-filter-options.config-DAVncmi0.cjs → date-comparison-filter-options.config-QaoWaFUn.cjs} +1 -1
  37. package/components/{date-filter-options.config-DBRxlTWy.js → date-filter-options.config-BTVyHRkp.js} +3 -6
  38. package/components/{date-filter-options.config-CWPMtA18.cjs → date-filter-options.config-n-zhWaYa.cjs} +1 -1
  39. package/components/display-settings/index.cjs +1 -1
  40. package/components/display-settings/index.js +1 -1
  41. package/components/display-settings-binning/index.cjs +5 -5
  42. package/components/display-settings-binning/index.js +29 -30
  43. package/components/display-settings-datetime/index.cjs +29 -29
  44. package/components/display-settings-datetime/index.js +112 -120
  45. package/components/display-settings-grand-totals/index.cjs +4 -4
  46. package/components/display-settings-grand-totals/index.js +23 -24
  47. package/components/display-settings-numeric/index.cjs +48 -48
  48. package/components/display-settings-numeric/index.js +194 -211
  49. package/components/display-settings-period-over-period/index.cjs +16 -16
  50. package/components/display-settings-period-over-period/index.js +91 -97
  51. package/components/{donut-chart-options.config-BulUEiaH.js → donut-chart-options.config-3ZqX8Cbb.js} +21 -37
  52. package/components/donut-chart-options.config-BQyPgnC9.cjs +20 -0
  53. package/components/draggable-data-item/index.cjs +8 -8
  54. package/components/draggable-data-item/index.js +44 -45
  55. package/components/draggable-data-item-level/index.cjs +11 -11
  56. package/components/draggable-data-item-level/index.js +89 -92
  57. package/components/{dropdown-filter-options.config-D9dvPypF.js → dropdown-filter-options.config-CGJTtgAX.js} +7 -10
  58. package/components/{dropdown-filter-options.config-DS-MORmq.cjs → dropdown-filter-options.config-DJvfCTk7.cjs} +1 -1
  59. package/components/droppable-slot/index.cjs +20 -20
  60. package/components/droppable-slot/index.js +167 -181
  61. package/components/edit-item/index.cjs +9 -9
  62. package/components/edit-item/index.js +116 -119
  63. package/components/edit-option/index.cjs +1 -1
  64. package/components/edit-option/index.js +1 -1
  65. package/components/edit-option-action-button-group/index.cjs +8 -8
  66. package/components/edit-option-action-button-group/index.js +52 -53
  67. package/components/{edit-option-base-DIc7iC-b.js → edit-option-base-Bh29-Cak.js} +1 -1
  68. package/components/{edit-option-base-VhTih9T1.cjs → edit-option-base-tFr8Qg2B.cjs} +1 -1
  69. package/components/edit-option-color-palette-picker/index.cjs +1 -1
  70. package/components/edit-option-color-palette-picker/index.js +1 -1
  71. package/components/edit-option-color-picker/index.cjs +1 -1
  72. package/components/edit-option-color-picker/index.js +1 -1
  73. package/components/edit-option-color-range/index.cjs +19 -19
  74. package/components/edit-option-color-range/index.js +106 -117
  75. package/components/edit-option-multi-language-field/index.cjs +3 -3
  76. package/components/edit-option-multi-language-field/index.js +26 -27
  77. package/components/edit-option-number-field/index.cjs +1 -1
  78. package/components/edit-option-number-field/index.js +1 -1
  79. package/components/edit-option-picker/index.cjs +5 -5
  80. package/components/edit-option-picker/index.js +7 -7
  81. package/components/edit-option-position-picker/index.cjs +4 -4
  82. package/components/edit-option-position-picker/index.js +21 -25
  83. package/components/edit-option-positions-number-field/index.cjs +9 -9
  84. package/components/edit-option-positions-number-field/index.js +76 -81
  85. package/components/edit-option-radio-button-group/index.cjs +6 -6
  86. package/components/edit-option-radio-button-group/index.js +21 -22
  87. package/components/edit-option-slider/index.cjs +1 -1
  88. package/components/edit-option-slider/index.js +1 -1
  89. package/components/edit-option-switch/index.cjs +1 -1
  90. package/components/edit-option-switch/index.js +1 -1
  91. package/components/edit-option-text-field/index.cjs +2 -2
  92. package/components/edit-option-text-field/index.js +22 -23
  93. package/components/en--a5SfjnM.cjs +20 -0
  94. package/components/en-CtCctD2c.js +1483 -0
  95. package/components/{en-GB-DG6uS3sM.cjs → en-GB-CXVKFWyH.cjs} +1 -1
  96. package/components/{en-GB-CEHEs8F2.js → en-GB-CbNfyZMo.js} +1 -1
  97. package/components/{evolution-number-options.config-DzkfeoIN.js → evolution-number-options.config-BIPO_4n3.js} +11 -14
  98. package/components/{evolution-number-options.config-BgIZY4gQ.cjs → evolution-number-options.config-Bc9eKYnn.cjs} +1 -1
  99. package/components/{extrapolate-color-0j_AeYkz.cjs → extrapolate-color-C0n1UDs-.cjs} +1 -1
  100. package/components/{extrapolate-color-CC9CURf6.js → extrapolate-color-v1PimdQr.js} +1 -1
  101. package/components/filter-data-item-picker/index.cjs +7 -7
  102. package/components/filter-data-item-picker/index.js +85 -86
  103. package/components/filter-expression-picker/index.cjs +1 -1
  104. package/components/filter-expression-picker/index.js +1 -1
  105. package/components/filter-item/index.cjs +6 -6
  106. package/components/filter-item/index.js +109 -119
  107. package/components/filter-value-picker/index.cjs +2 -2
  108. package/components/filter-value-picker/index.js +34 -36
  109. package/components/filter-value-picker-datetime/index.cjs +8 -8
  110. package/components/filter-value-picker-datetime/index.js +56 -71
  111. package/components/filter-value-picker-hierarchy/index.cjs +12 -12
  112. package/components/filter-value-picker-hierarchy/index.js +113 -124
  113. package/components/filter-value-picker-numeric/index.cjs +8 -8
  114. package/components/filter-value-picker-numeric/index.js +101 -110
  115. package/components/{focusable-DCIFkpiW.js → focusable-BS2pbY7w.js} +24 -26
  116. package/components/focusable-QLh-LlNt.cjs +20 -0
  117. package/components/{funnel-chart-options.config-C_VjTOvD.js → funnel-chart-options.config-CrJy2U7_.js} +5 -20
  118. package/components/funnel-chart-options.config-DrP4AFgk.cjs +20 -0
  119. package/components/{get-css-variable-DLiZYZEi.cjs → get-css-variable-CuDaWSjr.cjs} +2 -2
  120. package/components/{get-css-variable-YlLiVgo8.js → get-css-variable-DEf4GhTH.js} +4 -4
  121. package/components/grid/index.cjs +46 -46
  122. package/components/grid/index.js +2612 -1873
  123. package/components/heat-map-options.config-CIHnPdYE.cjs +20 -0
  124. package/components/{heat-map-options.config-BnLWe8jS.js → heat-map-options.config-CmL87j1j.js} +35 -41
  125. package/components/{heat-table-options.config-CUsDdgUr.js → heat-table-options.config-BrCYAgYD.js} +60 -88
  126. package/components/heat-table-options.config-DTlZRc_i.cjs +20 -0
  127. package/components/helpers-9I0oLoUB.cjs +20 -0
  128. package/components/helpers-bR8Ibjqh.js +79 -0
  129. package/components/{hexbin-map-options.config-F-7uCqxb.js → hexbin-map-options.config-BguV1w8q.js} +20 -38
  130. package/components/hexbin-map-options.config-CKnn3VAB.cjs +20 -0
  131. package/components/{index-Do7O9azB.js → index-3WsfvkZF.js} +112 -123
  132. package/components/index-BGb_wRRW.js +1766 -0
  133. package/components/{index-BPNsFiyq.cjs → index-BNAmjOkm.cjs} +4 -4
  134. package/components/index-BUal0r_D.cjs +121 -0
  135. package/components/index-D1Y5TRsH.cjs +20 -0
  136. package/components/{index-PMDgRSzR.js → index-DdyZ2g5L.js} +94 -104
  137. package/components/index-DvkzMbLt.cjs +249 -0
  138. package/components/{index-CdIUfo-L.js → index-haa7WNrl.js} +453 -481
  139. package/components/index.cjs +1 -1
  140. package/components/index.js +5 -5
  141. package/components/item-options-configs.cjs +1 -1
  142. package/components/item-options-configs.js +37 -37
  143. package/components/{line-chart-options.config-DB3IsXXr.js → line-chart-options.config-BhirTGqD.js} +13 -28
  144. package/components/line-chart-options.config-Cqwou5u6.cjs +20 -0
  145. package/components/{localize-r7ALOUy_.cjs → localize-C4zNlrwK.cjs} +1 -1
  146. package/components/{localize-BX7q0S0M.js → localize-CcDpq940.js} +10 -10
  147. package/components/{marker-map-options.config-DPJ955tt.js → marker-map-options.config-Bx17jmiq.js} +1 -1
  148. package/components/{marker-map-options.config-_FYZzRwA.cjs → marker-map-options.config-CvhCylSC.cjs} +1 -1
  149. package/components/{pivot-table-options.config-DNK_AIG7.js → pivot-table-options.config-CFc7y0IT.js} +15 -24
  150. package/components/pivot-table-options.config-uZDAertf.cjs +20 -0
  151. package/components/{pyramid-chart-options.config-CcVMatYx.js → pyramid-chart-options.config-2Waxb11l.js} +29 -43
  152. package/components/pyramid-chart-options.config-DoGfEvzU.cjs +20 -0
  153. package/components/{radar-chart-options.config-CUZn_3Fd.js → radar-chart-options.config-CPN5fOl8.js} +11 -23
  154. package/components/radar-chart-options.config-CtNUMN1l.cjs +20 -0
  155. package/components/{regular-table-options.config-BoLZsBry.js → regular-table-options.config-CFKCJQK1.js} +17 -23
  156. package/components/{regular-table-options.config-DTx3RTnS.cjs → regular-table-options.config-YRuoijIk.cjs} +1 -1
  157. package/components/route-map-options.config-CVTk5RVL.cjs +20 -0
  158. package/components/{route-map-options.config-CN86T7c0.js → route-map-options.config-CyolTJfK.js} +87 -109
  159. package/components/{sankey-diagram-options.config-RFB83YLZ.cjs → sankey-diagram-options.config-D7OSvSqm.cjs} +1 -1
  160. package/components/{sankey-diagram-options.config-tVLKy_Zn.js → sankey-diagram-options.config-Ldjk84ro.js} +7 -10
  161. package/components/scatter-plot-options.config-5gN7pMTm.cjs +20 -0
  162. package/components/{scatter-plot-options.config-Corlzno1.js → scatter-plot-options.config-CfxEfkQ1.js} +56 -86
  163. package/components/{search-filter-options.config-BE3JhR-F.js → search-filter-options.config-C0syQmP4.js} +3 -6
  164. package/components/{search-filter-options.config-BCaDlYqZ.cjs → search-filter-options.config-Oqco9BKj.cjs} +1 -1
  165. package/components/{set-locale-B-Tz2sdI.js → set-locale-hKTMz37h.js} +7 -9
  166. package/components/slicer-filter-options.config-CrusP6a0.cjs +20 -0
  167. package/components/{slicer-filter-options.config-3JZZcw5C.js → slicer-filter-options.config-DmOe3440.js} +9 -18
  168. package/components/{slider-filter-options.config-DH4SS8wH.js → slider-filter-options.config-B1M8RcDs.js} +1 -1
  169. package/components/{slider-filter-options.config-_8Z2zKmU.cjs → slider-filter-options.config-k45I-t6G.cjs} +1 -1
  170. package/components/slot-contents-picker/index.cjs +33 -33
  171. package/components/slot-contents-picker/index.js +194 -205
  172. package/components/slot-menu/index.cjs +12 -12
  173. package/components/slot-menu/index.js +171 -184
  174. package/components/slot-menu-list/index.cjs +3 -3
  175. package/components/slot-menu-list/index.js +97 -103
  176. package/components/speedometer-chart-options.config-B4ceg_qI.cjs +20 -0
  177. package/components/{speedometer-chart-options.config-SL581yOa.js → speedometer-chart-options.config-CzOmuEF8.js} +31 -53
  178. package/components/spike-map-options.config-BkkDqb4g.cjs +20 -0
  179. package/components/{spike-map-options.config-C5KewecZ.js → spike-map-options.config-Cbt1YUw6.js} +91 -122
  180. package/components/{sunburst-chart-options.config-AbNjWS6t.cjs → sunburst-chart-options.config-Yrxc2i57.cjs} +1 -1
  181. package/components/{sunburst-chart-options.config-CNauGQJv.js → sunburst-chart-options.config-_dyLQxPJ.js} +9 -20
  182. package/components/{symbol-map-options.config-DdDA4aa7.js → symbol-map-options.config-BORL1NSU.js} +11 -20
  183. package/components/symbol-map-options.config-NpBKm64d.cjs +20 -0
  184. package/components/{treemap-chart-options.config-D5AJaF_u.js → treemap-chart-options.config-B9i9qIm_.js} +20 -37
  185. package/components/treemap-chart-options.config-x4J54WSw.cjs +20 -0
  186. package/components/utils.cjs +1 -1
  187. package/components/utils.js +64 -65
  188. package/components/{video-options.config-CGsDTwHc.cjs → video-options.config-B0asgYt8.cjs} +1 -1
  189. package/components/{video-options.config-Dk36zJ1B.js → video-options.config-UX-9MDfS.js} +7 -10
  190. package/components/{wordcloud-chart-options.config-vGfCW8kE.cjs → wordcloud-chart-options.config-BKtJT8Va.cjs} +1 -1
  191. package/components/{wordcloud-chart-options.config-w2NUIWVA.js → wordcloud-chart-options.config-BoB_KuhA.js} +4 -7
  192. package/custom-elements.json +20 -0
  193. package/package.json +3 -3
  194. package/components/area-chart-options.config-C7sMAHco.cjs +0 -20
  195. package/components/bar-chart-options.config-DcxEkOT5.cjs +0 -20
  196. package/components/box-plot-options.config-SrrbDEYW.cjs +0 -20
  197. package/components/bubble-chart-options.config-Ihn6eVQI.cjs +0 -20
  198. package/components/calculate-data-item-icon-DZDqb3xu.js +0 -139
  199. package/components/choropleth-map-options.config-ZW8yoZH2.cjs +0 -20
  200. package/components/circular-gauge-options.config-msZ4mfpN.cjs +0 -20
  201. package/components/color-B6LaL8qz.cjs +0 -20
  202. package/components/color-range-utils-C5yXW7ZC.cjs +0 -20
  203. package/components/column-chart-options.config-BjDvA7i9.cjs +0 -20
  204. package/components/conditional-number-options.config-DgzUo0xi.cjs +0 -20
  205. package/components/donut-chart-options.config-tNpqBZfR.cjs +0 -20
  206. package/components/en-BKBhKBXY.cjs +0 -20
  207. package/components/en-BOTjhwEc.js +0 -1488
  208. package/components/focusable-B3E_hQmm.cjs +0 -20
  209. package/components/funnel-chart-options.config-D7H7gFcx.cjs +0 -20
  210. package/components/heat-map-options.config-DVH-Bb5-.cjs +0 -20
  211. package/components/heat-table-options.config-B12JEYnp.cjs +0 -20
  212. package/components/helpers-DXQwEH1P.cjs +0 -20
  213. package/components/helpers-v1bPALRP.js +0 -91
  214. package/components/hexbin-map-options.config-DZERRhM8.cjs +0 -20
  215. package/components/index-BPN3bG9X.js +0 -1733
  216. package/components/index-CQ9ck-BO.cjs +0 -249
  217. package/components/index-CXn67vdn.cjs +0 -121
  218. package/components/index-cfj52IbK.cjs +0 -20
  219. package/components/line-chart-options.config-DSugoe0t.cjs +0 -20
  220. package/components/pivot-table-options.config-BiJXKSFR.cjs +0 -20
  221. package/components/pyramid-chart-options.config-C4zbFS26.cjs +0 -20
  222. package/components/radar-chart-options.config-EqQu6PTh.cjs +0 -20
  223. package/components/route-map-options.config-D7NJePTu.cjs +0 -20
  224. package/components/scatter-plot-options.config-CFfGJXsV.cjs +0 -20
  225. package/components/slicer-filter-options.config-DNI-XevE.cjs +0 -20
  226. package/components/speedometer-chart-options.config-BX9LTQBH.cjs +0 -20
  227. package/components/spike-map-options.config-DoBFXPmN.cjs +0 -20
  228. package/components/symbol-map-options.config-m-lwLTtu.cjs +0 -20
  229. package/components/treemap-chart-options.config-C0Q9aQ1Z.cjs +0 -20
@@ -19,34 +19,34 @@
19
19
  * */
20
20
  import "@luzmo/lucero/select";
21
21
  import "@luzmo/lucero/text-field";
22
- import { unsafeCSS as $, html as y } from "lit";
23
- import { msg as b, localized as C } from "@lit/localize";
24
- import { SizedMixin as T, LuzmoElement as E, ElementSizes as I } from "@luzmo/lucero/utils";
25
- import { d as v } from "../index-BPN3bG9X.js";
26
- import { l as w } from "../localize-BX7q0S0M.js";
27
- import { property as z, state as _ } from "lit/decorators.js";
28
- import { g as H, t as R, s as O } from "../set-locale-B-Tz2sdI.js";
22
+ import { unsafeCSS as x, html as z } from "lit";
23
+ import { msg as f, localized as w } from "@lit/localize";
24
+ import { SizedMixin as S, LuzmoElement as k, ElementSizes as L } from "@luzmo/lucero/utils";
25
+ import { d as v } from "../index-BGb_wRRW.js";
26
+ import { l as y } from "../localize-CcDpq940.js";
27
+ import { property as h, state as p } from "lit/decorators.js";
28
+ import { g as V, t as $, s as C } from "../set-locale-hKTMz37h.js";
29
29
  (function() {
30
30
  if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
31
31
  const r = document.createElement("style");
32
32
  r.setAttribute("data-luzmo-vars", ""), r.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-background-color-alt-1: rgb(250, 250, 250);--luzmo-background-color-alt-2: rgb(239, 239, 239);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-color-disabled);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-secondary-outline: rgba(255, 0, 255, 0.2);--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-color-informative: #1a77e9;--luzmo-color-informative-rgb: 26, 119, 233;--luzmo-color-disabled: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(r);
33
33
  }
34
34
  })();
35
- const D = ".missing-value{opacity:.4}:host{--var: blue}";
36
- var P = Object.defineProperty, Q = Object.getOwnPropertyDescriptor, m = (e, r, o, s) => {
37
- for (var t = s > 1 ? void 0 : s ? Q(r, o) : r, n = e.length - 1, a; n >= 0; n--)
38
- (a = e[n]) && (t = (s ? a(r, o, t) : a(t)) || t);
39
- return s && t && P(r, o, t), t;
35
+ const T = ".missing-value{opacity:.4}:host{--var: blue}";
36
+ var E = Object.defineProperty, I = Object.getOwnPropertyDescriptor, s = (e, r, t, i) => {
37
+ for (var o = i > 1 ? void 0 : i ? I(r, t) : r, c = e.length - 1, u; c >= 0; c--)
38
+ (u = e[c]) && (o = (i ? u(r, t, o) : u(o)) || o);
39
+ return i && o && E(r, t, o), o;
40
40
  };
41
- const S = 5e3;
42
- let u = class extends T(E, {
43
- validSizes: Object.values(I)
41
+ const _ = 5e3;
42
+ let l = class extends S(k, {
43
+ validSizes: Object.values(L)
44
44
  }) {
45
45
  constructor() {
46
46
  super(...arguments), this.language = "en", this.contentLanguage = "en", this._hierarchyValues = [], this._retrieving = !0, this._search = "", this._error = null, this._allValuesRetrieved = !1, this._runningQueries = [];
47
47
  }
48
48
  static get styles() {
49
- return [$(D)];
49
+ return [x(T)];
50
50
  }
51
51
  connectedCallback() {
52
52
  super.connectedCallback();
@@ -54,13 +54,12 @@ let u = class extends T(E, {
54
54
  this.apiUrl && (e.apiUrl = this.apiUrl), this.cacheTime && (e.staleTime = this.cacheTime, e.gcTime = this.cacheTime * 2), this.authKey && this.authToken && (e.authKey = this.authKey, e.authToken = this.authToken), v.configure(e);
55
55
  }
56
56
  willUpdate(e) {
57
- var o, s, t, n, a, d, c, f, g, p, i, l, h, x;
58
- if (e.has("language") && this.language !== H() && ([...R].includes(this.language ?? "en") || this.language === "en") && O(this.language), e.has("filter") && this.filter) {
59
- const k = (o = e.get("filter")) == null ? void 0 : o.expression, L = ((n = (t = (s = e.get("filter")) == null ? void 0 : s.parameters) == null ? void 0 : t[0]) == null ? void 0 : n.columnId) || ((c = (d = (a = e.get("filter")) == null ? void 0 : a.parameters) == null ? void 0 : d[0]) == null ? void 0 : c.formulaId), V = ((p = (g = (f = this.filter) == null ? void 0 : f.parameters) == null ? void 0 : g[0]) == null ? void 0 : p.columnId) || ((h = (l = (i = this.filter) == null ? void 0 : i.parameters) == null ? void 0 : l[0]) == null ? void 0 : h.formulaId);
60
- L !== V && (["? in ?", "? not in ?", "? = ?", "? != ?"].includes(
61
- (x = this.filter) == null ? void 0 : x.expression
57
+ if (e.has("language") && this.language !== V() && ([...$].includes(this.language ?? "en") || this.language === "en") && C(this.language), e.has("filter") && this.filter) {
58
+ const t = e.get("filter")?.expression, i = e.get("filter")?.parameters?.[0]?.columnId || e.get("filter")?.parameters?.[0]?.formulaId, o = this.filter?.parameters?.[0]?.columnId || this.filter?.parameters?.[0]?.formulaId;
59
+ i !== o && (["? in ?", "? not in ?", "? = ?", "? != ?"].includes(
60
+ this.filter?.expression
62
61
  ) || !["? in ?", "? not in ?", "? = ?", "? != ?"].includes(
63
- k
62
+ t
64
63
  )) && (this._hierarchyValues = [], this._allValuesRetrieved = !1, this._retrieving = !0);
65
64
  }
66
65
  }
@@ -68,76 +67,75 @@ let u = class extends T(E, {
68
67
  * Fetches hierarchy values from the databroker
69
68
  */
70
69
  async _fetchHierarchyValues(e = 0) {
71
- var g, p;
72
70
  if (this._allValuesRetrieved) {
73
71
  this._retrieving = !1;
74
72
  return;
75
73
  }
76
- if (!((p = (g = this.filter) == null ? void 0 : g.parameters) != null && p[0])) {
74
+ if (!this.filter?.parameters?.[0]) {
77
75
  this._retrieving = !1, this._error = "Missing column parameters";
78
76
  return;
79
77
  }
80
- const r = this.filter.parameters[0], o = r.columnId, s = r.formulaId, t = r.datasetId;
81
- if (!o && !s) {
78
+ const r = this.filter.parameters[0], t = r.columnId, i = r.formulaId, o = r.datasetId;
79
+ if (!t && !i) {
82
80
  this._retrieving = !1, this._error = "Missing column id or formula id";
83
81
  return;
84
- } else if (!t) {
82
+ } else if (!o) {
85
83
  this._retrieving = !1, this._error = "Missing dataset id";
86
84
  return;
87
85
  }
88
86
  this._retrieving = !0, this._error = null;
89
- const n = {
87
+ const c = {
90
88
  expression: "? like ?",
91
89
  parameters: [
92
90
  {
93
- column_id: o,
94
- formula_id: s,
95
- dataset_id: t
91
+ column_id: t,
92
+ formula_id: i,
93
+ dataset_id: o
96
94
  },
97
95
  this._search
98
96
  ]
99
- }, a = {
97
+ }, u = {
100
98
  dimensions: [
101
99
  {
102
- column_id: o,
103
- formula_id: s,
104
- dataset_id: t
100
+ column_id: t,
101
+ formula_id: i,
102
+ dataset_id: o
105
103
  }
106
104
  ],
107
105
  where: [],
108
106
  order: [
109
107
  {
110
- column_id: o,
111
- formula_id: s,
112
- dataset_id: t,
108
+ column_id: t,
109
+ formula_id: i,
110
+ dataset_id: o,
113
111
  order: "asc"
114
112
  }
115
113
  ],
116
114
  limit: {
117
- by: S,
115
+ by: _,
118
116
  offset: e
119
117
  }
120
118
  };
121
- this._search && this._allValuesRetrieved && a.where.push(n);
122
- const d = new AbortController(), c = new Promise((i, l) => {
123
- v.fetchData(a).then(i).catch(l), d.signal.addEventListener("abort", () => {
124
- console.warn("Request aborted"), l({ status: "aborted" });
119
+ this._search && this._allValuesRetrieved && u.where.push(c);
120
+ const g = new AbortController(), n = new Promise((a, m) => {
121
+ v.fetchData(u).then(a).catch(m), g.signal.addEventListener("abort", () => {
122
+ console.warn("Request aborted"), m({ status: "aborted" });
125
123
  });
126
- }), f = {
127
- promise: c,
128
- abortController: d
124
+ }), d = {
125
+ promise: n,
126
+ abortController: g
129
127
  };
130
- this._runningQueries.push(f);
128
+ this._runningQueries.push(d);
131
129
  try {
132
- const i = await c, l = i && Array.isArray(i.data) ? i.data.map((h) => h[0]) : [];
133
- this._search || (this._allValuesRetrieved = l.length < S), this._hierarchyValues = e > 0 ? [...this._hierarchyValues, ...l] : l;
134
- } catch (i) {
135
- if ((i == null ? void 0 : i.status) === "aborted")
130
+ const a = await n, m = a && Array.isArray(a.data) ? a.data.map((b) => b[0]) : [];
131
+ this._search || (this._allValuesRetrieved = m.length < _), this._hierarchyValues = e > 0 ? [...this._hierarchyValues, ...m] : m;
132
+ } catch (a) {
133
+ if (a?.status === "aborted")
136
134
  return;
137
- this._error = i instanceof Error ? i.message : "Unknown error", this._hierarchyValues = [];
135
+ this._error = a instanceof Error ? a.message : "Unknown error", this._hierarchyValues = [];
138
136
  } finally {
139
137
  this._runningQueries = this._runningQueries.filter(
140
- (i) => i.promise !== c
138
+ (a) => a.promise !== n
141
139
  ), this._retrieving = !1;
142
140
  }
143
141
  }
@@ -154,30 +152,26 @@ let u = class extends T(E, {
154
152
  );
155
153
  }
156
154
  setHierarchy(e) {
157
- var o, s, t, n, a, d, c, f;
158
155
  let r;
159
- ["? in ?", "? not in ?"].includes((o = this.filter) == null ? void 0 : o.expression) ? r = (s = e == null ? void 0 : e.detail) == null ? void 0 : s.value : ["? = ?", "? != ?"].includes((t = this.filter) == null ? void 0 : t.expression) ? r = (a = (n = e == null ? void 0 : e.detail) == null ? void 0 : n.value) == null ? void 0 : a[0] : r = (d = e == null ? void 0 : e.target) == null ? void 0 : d.value, this._value !== r && (this._value = r, this.filter = {
156
+ ["? in ?", "? not in ?"].includes(this.filter?.expression) ? r = e?.detail?.value : ["? = ?", "? != ?"].includes(this.filter?.expression) ? r = e?.detail?.value?.[0] : r = e?.target?.value, this._value !== r && (this._value = r, this.filter = {
160
157
  ...this.filter,
161
- parameters: [{ ...(f = (c = this.filter) == null ? void 0 : c.parameters) == null ? void 0 : f[0] }, this._value]
158
+ parameters: [{ ...this.filter?.parameters?.[0] }, this._value]
162
159
  }, this._sendChangeEvent());
163
160
  }
164
161
  onScrolled(e) {
165
- var r;
166
- !this._retrieving && !this._allValuesRetrieved && ((r = e == null ? void 0 : e.detail) == null ? void 0 : r.last) === this._hierarchyValues.length - 1 && this._fetchHierarchyValues(this._hierarchyValues.length);
162
+ !this._retrieving && !this._allValuesRetrieved && e?.detail?.last === this._hierarchyValues.length - 1 && this._fetchHierarchyValues(this._hierarchyValues.length);
167
163
  }
168
164
  renderTextField() {
169
- var e, r;
170
- return y`<luzmo-text-field
165
+ return z`<luzmo-text-field
171
166
  .size=${this.size}
172
167
  @change=${this.setHierarchy}
173
168
  @input=${this.setHierarchy}
174
- .value=${((r = (e = this.filter) == null ? void 0 : e.parameters) == null ? void 0 : r[1]) ?? ""}
169
+ .value=${this.filter?.parameters?.[1] ?? ""}
175
170
  ></luzmo-text-field>`;
176
171
  }
177
172
  setSearchString(e) {
178
- var r;
179
- this._search = ((r = e == null ? void 0 : e.detail) == null ? void 0 : r.string) ?? "", this._allValuesRetrieved || (this._searchQueryTimeout && (this._runningQueries.forEach((o) => {
180
- o != null && o.abortController && o.abortController.abort();
173
+ this._search = e?.detail?.string ?? "", this._allValuesRetrieved || (this._searchQueryTimeout && (this._runningQueries.forEach((r) => {
174
+ r?.abortController && r.abortController.abort();
181
175
  }), this._runningQueries = [], clearTimeout(this._searchQueryTimeout)), this._searchQueryTimeout = setTimeout(() => {
182
176
  this._fetchHierarchyValues();
183
177
  }, 500));
@@ -189,88 +183,83 @@ let u = class extends T(E, {
189
183
  this._fetchHierarchyValues();
190
184
  }
191
185
  renderHierarchyPicker() {
192
- var c, f, g, p, i;
193
186
  if (this._error)
194
- return y`<div class="error">Error: ${this._error}</div>`;
195
- const e = (this._search ? this._hierarchyValues.filter((l) => {
196
- var h;
197
- return ((h = w(l.name, this.contentLanguage, { allowEmpty: !0 })) == null ? void 0 : h.toLowerCase().includes(this._search.toLowerCase())) || l.toString().toLowerCase().includes(this._search.toLowerCase());
198
- }) : this._hierarchyValues).map((l) => {
199
- let h = w(l == null ? void 0 : l.name, this.contentLanguage) ?? "N/A";
200
- return typeof h != "string" && (h = "N/A"), {
201
- value: l == null ? void 0 : l.id,
202
- label: h
187
+ return z`<div class="error">Error: ${this._error}</div>`;
188
+ const e = (this._search ? this._hierarchyValues.filter((n) => y(n.name, this.contentLanguage, { allowEmpty: !0 })?.toLowerCase().includes(this._search.toLowerCase()) || n.toString().toLowerCase().includes(this._search.toLowerCase())) : this._hierarchyValues).map((n) => {
189
+ let d = y(n?.name, this.contentLanguage) ?? "N/A";
190
+ return typeof d != "string" && (d = "N/A"), {
191
+ value: n?.id,
192
+ label: d
203
193
  };
204
- }), r = (c = this.filter) == null ? void 0 : c.expression, o = ["? = ?", "? != ?"].includes(r), s = b("Selected {count} items"), t = b("Search"), n = b("No data"), a = b("No results"), d = b("Select...");
205
- return y`<luzmo-select
194
+ }), r = this.filter?.expression, t = ["? = ?", "? != ?"].includes(r), i = f("Selected {count} items"), o = f("Search"), c = f("No data"), u = f("No results"), g = f("Select...");
195
+ return z`<luzmo-select
206
196
  .size=${this.size}
207
- .label=${d}
197
+ .label=${g}
208
198
  .retrieving=${this._retrieving}
209
- .selects=${o ? "single" : "multiple"}
210
- .variant=${o ? "highlight" : "checkboxes"}
199
+ .selects=${t ? "single" : "multiple"}
200
+ .variant=${t ? "highlight" : "checkboxes"}
211
201
  emphasized
212
202
  no-wrap
213
203
  ?invalid=${!!this._error}
214
- .multipleLabelTemplate=${s}
215
- .searchLabel=${t}
216
- .noDataLabel=${n}
217
- .noResultsLabel=${a}
204
+ .multipleLabelTemplate=${i}
205
+ .searchLabel=${o}
206
+ .noDataLabel=${c}
207
+ .noResultsLabel=${u}
218
208
  @change=${this.setHierarchy}
219
209
  @luzmo-search=${this.setSearchString}
220
210
  @luzmo-opened=${this.onOpened}
221
211
  @luzmo-closed=${this.resetSearchString}
222
212
  @luzmo-scrolled=${this.onScrolled}
223
213
  .options=${e}
224
- .value=${o ? [(g = (f = this.filter) == null ? void 0 : f.parameters) == null ? void 0 : g[1]] : (i = (p = this.filter) == null ? void 0 : p.parameters) == null ? void 0 : i[1]}
214
+ .value=${t ? [this.filter?.parameters?.[1]] : this.filter?.parameters?.[1]}
225
215
  >
226
216
  </luzmo-select>`;
227
217
  }
228
218
  render() {
229
- var r;
230
- const e = (r = this.filter) == null ? void 0 : r.expression;
219
+ const e = this.filter?.expression;
231
220
  return ["? in ?", "? not in ?", "? = ?", "? != ?"].includes(e) ? this.renderHierarchyPicker() : this.renderTextField();
232
221
  }
233
222
  };
234
- m([
235
- z({ type: String, attribute: "api-url", reflect: !0 })
236
- ], u.prototype, "apiUrl", 2);
237
- m([
238
- z({ type: String, attribute: "auth-key", reflect: !0 })
239
- ], u.prototype, "authKey", 2);
240
- m([
241
- z({ type: String, attribute: "auth-token", reflect: !0 })
242
- ], u.prototype, "authToken", 2);
243
- m([
244
- z({ type: Number, attribute: "cache-time", reflect: !0 })
245
- ], u.prototype, "cacheTime", 2);
246
- m([
247
- z({ type: String, reflect: !0 })
248
- ], u.prototype, "language", 2);
249
- m([
250
- z({ type: String, attribute: "content-language", reflect: !0 })
251
- ], u.prototype, "contentLanguage", 2);
252
- m([
253
- z({ type: Object, reflect: !1 })
254
- ], u.prototype, "filter", 2);
255
- m([
256
- _()
257
- ], u.prototype, "_hierarchyValues", 2);
258
- m([
259
- _()
260
- ], u.prototype, "_retrieving", 2);
261
- m([
262
- _()
263
- ], u.prototype, "_search", 2);
264
- m([
265
- _()
266
- ], u.prototype, "_error", 2);
267
- u = m([
268
- C()
269
- ], u);
223
+ s([
224
+ h({ type: String, attribute: "api-url", reflect: !0 })
225
+ ], l.prototype, "apiUrl", 2);
226
+ s([
227
+ h({ type: String, attribute: "auth-key", reflect: !0 })
228
+ ], l.prototype, "authKey", 2);
229
+ s([
230
+ h({ type: String, attribute: "auth-token", reflect: !0 })
231
+ ], l.prototype, "authToken", 2);
232
+ s([
233
+ h({ type: Number, attribute: "cache-time", reflect: !0 })
234
+ ], l.prototype, "cacheTime", 2);
235
+ s([
236
+ h({ type: String, reflect: !0 })
237
+ ], l.prototype, "language", 2);
238
+ s([
239
+ h({ type: String, attribute: "content-language", reflect: !0 })
240
+ ], l.prototype, "contentLanguage", 2);
241
+ s([
242
+ h({ type: Object, reflect: !1 })
243
+ ], l.prototype, "filter", 2);
244
+ s([
245
+ p()
246
+ ], l.prototype, "_hierarchyValues", 2);
247
+ s([
248
+ p()
249
+ ], l.prototype, "_retrieving", 2);
250
+ s([
251
+ p()
252
+ ], l.prototype, "_search", 2);
253
+ s([
254
+ p()
255
+ ], l.prototype, "_error", 2);
256
+ l = s([
257
+ w()
258
+ ], l);
270
259
  customElements.get("luzmo-filter-value-picker-hierarchy") || customElements.define(
271
260
  "luzmo-filter-value-picker-hierarchy",
272
- u
261
+ l
273
262
  );
274
263
  export {
275
- u as LuzmoFilterValuePickerHierarchy
264
+ l as LuzmoFilterValuePickerHierarchy
276
265
  };
@@ -17,14 +17,14 @@
17
17
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
18
  * SOFTWARE.
19
19
  * */
20
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@luzmo/lucero/number-field");require("@luzmo/lucero/select");const V=require("lit"),p=require("@lit/localize"),y=require("@luzmo/lucero/utils"),k=require("../index-cfj52IbK.cjs"),v=require("../set-locale-BRRalqne.cjs"),c=require("lit/decorators.js"),T=".missing-value{opacity:.4}:host{--var: blue}";var C=Object.defineProperty,E=Object.getOwnPropertyDescriptor,n=(b,e,t,r)=>{for(var i=r>1?void 0:r?E(e,t):e,s=b.length-1,a;s>=0;s--)(a=b[s])&&(i=(r?a(e,t,i):a(i))||i);return r&&i&&C(e,t,i),i};const S=5e3;exports.LuzmoFilterValuePickerNumeric=class extends y.SizedMixin(y.LuzmoElement,{validSizes:Object.values(y.ElementSizes)}){constructor(){super(...arguments),this.language="en",this.contentLanguage="en",this._numericValues=[],this._retrieving=!0,this._search="",this._error=null,this._allValuesRetrieved=!1,this._runningQueries=[]}static get styles(){return[V.unsafeCSS(T)]}connectedCallback(){super.connectedCallback();const e={};this.apiUrl&&(e.apiUrl=this.apiUrl),this.cacheTime&&(e.staleTime=this.cacheTime,e.gcTime=this.cacheTime*2),this.authKey&&this.authToken&&(e.authKey=this.authKey,e.authToken=this.authToken),k.dataBroker.configure(e)}willUpdate(e){var i,s,a,u,m,o,_,d,f,l,h,g,L,z;const t=e.has("filter");if(e.has("language")&&this.language!==v.getLocale()&&([...v.targetLocales].includes(this.language??"en")||this.language==="en")&&v.setLocale(this.language),t&&this.filter){const N=(i=e.get("filter"))==null?void 0:i.expression,P=(s=this.filter)==null?void 0:s.expression,F=((m=(u=(a=e.get("filter"))==null?void 0:a.parameters)==null?void 0:u[0])==null?void 0:m.columnId)||((d=(_=(o=e.get("filter"))==null?void 0:o.parameters)==null?void 0:_[0])==null?void 0:d.formulaId),$=((h=(l=(f=this.filter)==null?void 0:f.parameters)==null?void 0:l[0])==null?void 0:h.columnId)||((z=(L=(g=this.filter)==null?void 0:g.parameters)==null?void 0:L[0])==null?void 0:z.formulaId);(F!==$||!["? in ?","? not in ?"].includes(N))&&["? in ?","? not in ?"].includes(P)&&(this._numericValues=[],this._allValuesRetrieved=!1,this._retrieving=!0)}}async _fetchNumericValues(e=0){var d,f;if(this._allValuesRetrieved){this._retrieving=!1;return}if(!((f=(d=this.filter)==null?void 0:d.parameters)!=null&&f[0])){this._retrieving=!1,this._error="Missing column parameters";return}const t=this.filter.parameters[0],r=t.columnId,i=t.formulaId,s=t.datasetId;if(!r&&!i){this._retrieving=!1,this._error="Missing column id or formula id";return}else if(!s){this._retrieving=!1,this._error="Missing dataset id";return}this._retrieving=!0,this._error=null;const a={expression:"? like ?",parameters:[{dataset_id:s,expression:`CAST({${s}:${r??i}},hierarchy)`},this._search]},u={dimensions:[{column_id:r,formula_id:i,dataset_id:s}],where:[],order:[{column_id:r,formula_id:i,dataset_id:s,order:"asc"}],limit:{by:S,offset:e}};this._search&&!this._allValuesRetrieved&&u.where.push(a);const m=new AbortController,o=new Promise((l,h)=>{k.dataBroker.fetchData(u).then(l).catch(h),m.signal.addEventListener("abort",()=>{console.warn("Request aborted"),h({status:"aborted"})})}),_={promise:o,abortController:m};this._runningQueries.push(_);try{const l=await o,h=l&&Array.isArray(l.data)?l.data.map(g=>g[0]):[];this._search||(this._allValuesRetrieved=h.length<S),this._numericValues=e>0?[...this._numericValues,...h]:h}catch(l){if((l==null?void 0:l.status)==="aborted")return;this._error=l instanceof Error?l.message:"Unknown error",this._numericValues=[]}finally{this._runningQueries=this._runningQueries.filter(l=>l.promise!==o),this._retrieving=!1}}_sendChangeEvent(){this.dispatchEvent(new CustomEvent("filter-value-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{value:this._value}}))}setValue(e){var r,i,s,a,u;const t=["? in ?","? not in ?"].includes((r=this.filter)==null?void 0:r.expression)?(i=e==null?void 0:e.detail)==null?void 0:i.value:(s=e==null?void 0:e.target)==null?void 0:s.value;this._value!==t&&(this._value=t,this.filter={...this.filter,parameters:[{...(u=(a=this.filter)==null?void 0:a.parameters)==null?void 0:u[0]},t]},this._sendChangeEvent())}selectValue(e){var i,s,a;const r=(((i=e.detail)==null?void 0:i.value)??"").map(u=>Number.parseFloat(u));this.filter={...this.filter,parameters:[{...(a=(s=this.filter)==null?void 0:s.parameters)==null?void 0:a[0]},r]},this._value=r,this._sendChangeEvent()}onScrolled(e){var t;!this._retrieving&&!this._allValuesRetrieved&&((t=e==null?void 0:e.detail)==null?void 0:t.last)===this._numericValues.length-1&&this._fetchNumericValues(this._numericValues.length)}renderNumberField(){var e,t;return V.html`<luzmo-number-field
20
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@luzmo/lucero/number-field");require("@luzmo/lucero/select");const d=require("lit"),h=require("@lit/localize"),f=require("@luzmo/lucero/utils"),b=require("../index-D1Y5TRsH.cjs"),g=require("../set-locale-BRRalqne.cjs"),u=require("lit/decorators.js"),L=".missing-value{opacity:.4}:host{--var: blue}";var z=Object.defineProperty,k=Object.getOwnPropertyDescriptor,a=(m,e,t,i)=>{for(var r=i>1?void 0:i?k(e,t):e,s=m.length-1,n;s>=0;s--)(n=m[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&z(e,t,r),r};const y=5e3;exports.LuzmoFilterValuePickerNumeric=class extends f.SizedMixin(f.LuzmoElement,{validSizes:Object.values(f.ElementSizes)}){constructor(){super(...arguments),this.language="en",this.contentLanguage="en",this._numericValues=[],this._retrieving=!0,this._search="",this._error=null,this._allValuesRetrieved=!1,this._runningQueries=[]}static get styles(){return[d.unsafeCSS(L)]}connectedCallback(){super.connectedCallback();const e={};this.apiUrl&&(e.apiUrl=this.apiUrl),this.cacheTime&&(e.staleTime=this.cacheTime,e.gcTime=this.cacheTime*2),this.authKey&&this.authToken&&(e.authKey=this.authKey,e.authToken=this.authToken),b.dataBroker.configure(e)}willUpdate(e){const t=e.has("filter");if(e.has("language")&&this.language!==g.getLocale()&&([...g.targetLocales].includes(this.language??"en")||this.language==="en")&&g.setLocale(this.language),t&&this.filter){const r=e.get("filter")?.expression,s=this.filter?.expression,n=e.get("filter")?.parameters?.[0]?.columnId||e.get("filter")?.parameters?.[0]?.formulaId,o=this.filter?.parameters?.[0]?.columnId||this.filter?.parameters?.[0]?.formulaId;(n!==o||!["? in ?","? not in ?"].includes(r))&&["? in ?","? not in ?"].includes(s)&&(this._numericValues=[],this._allValuesRetrieved=!1,this._retrieving=!0)}}async _fetchNumericValues(e=0){if(this._allValuesRetrieved){this._retrieving=!1;return}if(!this.filter?.parameters?.[0]){this._retrieving=!1,this._error="Missing column parameters";return}const t=this.filter.parameters[0],i=t.columnId,r=t.formulaId,s=t.datasetId;if(!i&&!r){this._retrieving=!1,this._error="Missing column id or formula id";return}else if(!s){this._retrieving=!1,this._error="Missing dataset id";return}this._retrieving=!0,this._error=null;const n={expression:"? like ?",parameters:[{dataset_id:s,expression:`CAST({${s}:${i??r}},hierarchy)`},this._search]},o={dimensions:[{column_id:i,formula_id:r,dataset_id:s}],where:[],order:[{column_id:i,formula_id:r,dataset_id:s,order:"asc"}],limit:{by:y,offset:e}};this._search&&!this._allValuesRetrieved&&o.where.push(n);const _=new AbortController,p=new Promise((l,c)=>{b.dataBroker.fetchData(o).then(l).catch(c),_.signal.addEventListener("abort",()=>{console.warn("Request aborted"),c({status:"aborted"})})}),V={promise:p,abortController:_};this._runningQueries.push(V);try{const l=await p,c=l&&Array.isArray(l.data)?l.data.map(v=>v[0]):[];this._search||(this._allValuesRetrieved=c.length<y),this._numericValues=e>0?[...this._numericValues,...c]:c}catch(l){if(l?.status==="aborted")return;this._error=l instanceof Error?l.message:"Unknown error",this._numericValues=[]}finally{this._runningQueries=this._runningQueries.filter(l=>l.promise!==p),this._retrieving=!1}}_sendChangeEvent(){this.dispatchEvent(new CustomEvent("filter-value-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{value:this._value}}))}setValue(e){const t=["? in ?","? not in ?"].includes(this.filter?.expression)?e?.detail?.value:e?.target?.value;this._value!==t&&(this._value=t,this.filter={...this.filter,parameters:[{...this.filter?.parameters?.[0]},t]},this._sendChangeEvent())}selectValue(e){const i=(e.detail?.value??"").map(r=>Number.parseFloat(r));this.filter={...this.filter,parameters:[{...this.filter?.parameters?.[0]},i]},this._value=i,this._sendChangeEvent()}onScrolled(e){!this._retrieving&&!this._allValuesRetrieved&&e?.detail?.last===this._numericValues.length-1&&this._fetchNumericValues(this._numericValues.length)}renderNumberField(){return d.html`<luzmo-number-field
21
21
  .size=${this.size}
22
22
  @change=${this.setValue}
23
23
  @input=${this.setValue}
24
- .value=${(t=(e=this.filter)==null?void 0:e.parameters)==null?void 0:t[1]}
25
- ></luzmo-number-field>`}setSearchString(e){var t;this._search=((t=e==null?void 0:e.detail)==null?void 0:t.string)??"",this._allValuesRetrieved||(this._searchQueryTimeout&&(this._runningQueries.forEach(r=>{r!=null&&r.abortController&&r.abortController.abort()}),this._runningQueries=[],clearTimeout(this._searchQueryTimeout)),this._searchQueryTimeout=setTimeout(()=>{this._fetchNumericValues()},500))}resetSearchString(){this._search=""}onOpened(){this._fetchNumericValues()}renderValuePicker(){var u,m;this._error&&console.error(`Numeric value retrieve error: ${this._error}`);const e=this._numericValues.filter(o=>o.toString().toLowerCase().includes(this._search.toLowerCase())).map(o=>({value:o,label:o})),t=p.msg("Selected {count} items"),r=p.msg("Search"),i=p.msg("No data"),s=p.msg("No results"),a=p.msg("Select...");return V.html`<luzmo-select
24
+ .value=${this.filter?.parameters?.[1]}
25
+ ></luzmo-number-field>`}setSearchString(e){this._search=e?.detail?.string??"",this._allValuesRetrieved||(this._searchQueryTimeout&&(this._runningQueries.forEach(t=>{t?.abortController&&t.abortController.abort()}),this._runningQueries=[],clearTimeout(this._searchQueryTimeout)),this._searchQueryTimeout=setTimeout(()=>{this._fetchNumericValues()},500))}resetSearchString(){this._search=""}onOpened(){this._fetchNumericValues()}renderValuePicker(){this._error&&console.error(`Numeric value retrieve error: ${this._error}`);const e=this._numericValues.filter(o=>o.toString().toLowerCase().includes(this._search.toLowerCase())).map(o=>({value:o,label:o})),t=h.msg("Selected {count} items"),i=h.msg("Search"),r=h.msg("No data"),s=h.msg("No results"),n=h.msg("Select...");return d.html`<luzmo-select
26
26
  .size=${this.size}
27
- .label=${a}
27
+ .label=${n}
28
28
  .retrieving=${this._retrieving}
29
29
  selects="multiple"
30
30
  variant="checkboxes"
@@ -32,8 +32,8 @@
32
32
  no-wrap
33
33
  ?invalid=${!!this._error}
34
34
  .multipleLabelTemplate=${t}
35
- .searchLabel=${r}
36
- .noDataLabel=${i}
35
+ .searchLabel=${i}
36
+ .noDataLabel=${r}
37
37
  .noResultsLabel=${s}
38
38
  @change=${this.selectValue}
39
39
  @luzmo-search=${this.setSearchString}
@@ -41,6 +41,6 @@
41
41
  @luzmo-closed=${this.resetSearchString}
42
42
  @luzmo-scrolled=${this.onScrolled}
43
43
  .options=${e}
44
- .value=${(m=(u=this.filter)==null?void 0:u.parameters)==null?void 0:m[1]}
44
+ .value=${this.filter?.parameters?.[1]}
45
45
  >
46
- </luzmo-select>`}render(){var t;const e=(t=this.filter)==null?void 0:t.expression;return["? in ?","? not in ?"].includes(e)?this.renderValuePicker():this.renderNumberField()}};n([c.property({type:String,attribute:"api-url",reflect:!0})],exports.LuzmoFilterValuePickerNumeric.prototype,"apiUrl",2);n([c.property({type:String,attribute:"auth-key",reflect:!0})],exports.LuzmoFilterValuePickerNumeric.prototype,"authKey",2);n([c.property({type:String,attribute:"auth-token",reflect:!0})],exports.LuzmoFilterValuePickerNumeric.prototype,"authToken",2);n([c.property({type:Number,attribute:"cache-time",reflect:!0})],exports.LuzmoFilterValuePickerNumeric.prototype,"cacheTime",2);n([c.property({type:String,reflect:!0})],exports.LuzmoFilterValuePickerNumeric.prototype,"language",2);n([c.property({type:String,attribute:"content-language",reflect:!0})],exports.LuzmoFilterValuePickerNumeric.prototype,"contentLanguage",2);n([c.property({type:Object,reflect:!1})],exports.LuzmoFilterValuePickerNumeric.prototype,"filter",2);n([c.state()],exports.LuzmoFilterValuePickerNumeric.prototype,"_numericValues",2);n([c.state()],exports.LuzmoFilterValuePickerNumeric.prototype,"_retrieving",2);n([c.state()],exports.LuzmoFilterValuePickerNumeric.prototype,"_search",2);n([c.state()],exports.LuzmoFilterValuePickerNumeric.prototype,"_error",2);exports.LuzmoFilterValuePickerNumeric=n([p.localized()],exports.LuzmoFilterValuePickerNumeric);customElements.get("luzmo-filter-value-picker-numeric")||customElements.define("luzmo-filter-value-picker-numeric",exports.LuzmoFilterValuePickerNumeric);
46
+ </luzmo-select>`}render(){const e=this.filter?.expression;return["? in ?","? not in ?"].includes(e)?this.renderValuePicker():this.renderNumberField()}};a([u.property({type:String,attribute:"api-url",reflect:!0})],exports.LuzmoFilterValuePickerNumeric.prototype,"apiUrl",2);a([u.property({type:String,attribute:"auth-key",reflect:!0})],exports.LuzmoFilterValuePickerNumeric.prototype,"authKey",2);a([u.property({type:String,attribute:"auth-token",reflect:!0})],exports.LuzmoFilterValuePickerNumeric.prototype,"authToken",2);a([u.property({type:Number,attribute:"cache-time",reflect:!0})],exports.LuzmoFilterValuePickerNumeric.prototype,"cacheTime",2);a([u.property({type:String,reflect:!0})],exports.LuzmoFilterValuePickerNumeric.prototype,"language",2);a([u.property({type:String,attribute:"content-language",reflect:!0})],exports.LuzmoFilterValuePickerNumeric.prototype,"contentLanguage",2);a([u.property({type:Object,reflect:!1})],exports.LuzmoFilterValuePickerNumeric.prototype,"filter",2);a([u.state()],exports.LuzmoFilterValuePickerNumeric.prototype,"_numericValues",2);a([u.state()],exports.LuzmoFilterValuePickerNumeric.prototype,"_retrieving",2);a([u.state()],exports.LuzmoFilterValuePickerNumeric.prototype,"_search",2);a([u.state()],exports.LuzmoFilterValuePickerNumeric.prototype,"_error",2);exports.LuzmoFilterValuePickerNumeric=a([h.localized()],exports.LuzmoFilterValuePickerNumeric);customElements.get("luzmo-filter-value-picker-numeric")||customElements.define("luzmo-filter-value-picker-numeric",exports.LuzmoFilterValuePickerNumeric);