@luzmo/analytics-components-kit 1.0.1-alpha.90 → 1.0.1-alpha.94

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 (253) hide show
  1. package/README.md +195 -0
  2. package/angular/README.md +1 -0
  3. package/angular/components/widget-menu.component.ts +25 -0
  4. package/angular/esm/components/widget-menu.component.d.ts +13 -0
  5. package/angular/esm/components/widget-menu.component.js +49 -0
  6. package/angular/esm/index.d.ts +3 -1
  7. package/angular/esm/index.js +4 -1
  8. package/angular/esm/types.d.ts +4 -0
  9. package/angular/index.ts +4 -1
  10. package/angular/types.ts +6 -0
  11. package/components/ai-chat-message-assistant/index.cjs +1 -1
  12. package/components/ai-chat-message-assistant/index.js +1 -0
  13. package/components/ai-chat-messages-container/index.cjs +1 -1
  14. package/components/ai-chat-messages-container/index.js +2 -2
  15. package/components/ai-interaction-textarea/index.cjs +1 -1
  16. package/components/ai-interaction-textarea/index.js +2 -1
  17. package/components/area-chart-options.config-C7sMAHco.cjs +20 -0
  18. package/components/{area-chart-options.config-u8itidsi.js → area-chart-options.config-_J0sG4NF.js} +26 -14
  19. package/components/{bar-chart-options.config-DIirbAJ0.js → bar-chart-options.config-D1mb5TDl.js} +35 -21
  20. package/components/bar-chart-options.config-DcxEkOT5.cjs +20 -0
  21. package/components/box-plot-options.config-SrrbDEYW.cjs +20 -0
  22. package/components/{box-plot-options.config-BWROiguA.js → box-plot-options.config-xu_i6ms7.js} +88 -52
  23. package/components/{bubble-chart-options.config-4QD8VPhU.js → bubble-chart-options.config-BacgXkJ_.js} +18 -9
  24. package/components/bubble-chart-options.config-Ihn6eVQI.cjs +20 -0
  25. package/components/{bullet-chart-options.config-3bH7uekx.js → bullet-chart-options.config-CDPpX1yc.js} +1 -1
  26. package/components/{bullet-chart-options.config-tWb6Fio-.cjs → bullet-chart-options.config-DfS4Bwds.cjs} +1 -1
  27. package/components/calculate-data-item-icon-CEa82-5u.cjs +20 -0
  28. package/components/calculate-data-item-icon-DjlZwMdO.js +147 -0
  29. package/components/{choropleth-map-options.config-CMxx3ORp.js → choropleth-map-options.config-B_W9-rhe.js} +84 -63
  30. package/components/choropleth-map-options.config-ZW8yoZH2.cjs +20 -0
  31. package/components/{circular-gauge-options.config-DhIKn44k.js → circular-gauge-options.config-DAIjz4Rl.js} +36 -23
  32. package/components/circular-gauge-options.config-msZ4mfpN.cjs +20 -0
  33. package/components/color-B6LaL8qz.cjs +20 -0
  34. package/components/{color-B7m0j8lX.js → color-DuJ4-73S.js} +950 -941
  35. package/components/{color-range-utils-BSfqtB3A.js → color-range-utils-Bvo9sm5A.js} +32 -31
  36. package/components/color-range-utils-C5yXW7ZC.cjs +20 -0
  37. package/components/{column-chart-options.config-D5-yR7iq.js → column-chart-options.config-B5SjBVdy.js} +37 -27
  38. package/components/column-chart-options.config-BjDvA7i9.cjs +20 -0
  39. package/components/{conditional-number-options.config-DPYsdML5.js → conditional-number-options.config-BCEpSK9J.js} +40 -24
  40. package/components/conditional-number-options.config-DgzUo0xi.cjs +20 -0
  41. package/components/dataset-icon/index.cjs +1 -1
  42. package/components/dataset-icon/index.js +2 -1
  43. package/components/dataset-selector-list/index.cjs +1 -1
  44. package/components/dataset-selector-list/index.js +35 -32
  45. package/components/dataset-selector-row/index.cjs +9 -9
  46. package/components/dataset-selector-row/index.js +53 -51
  47. package/components/{date-comparison-filter-options.config-QaoWaFUn.cjs → date-comparison-filter-options.config-DAVncmi0.cjs} +1 -1
  48. package/components/{date-comparison-filter-options.config-CSwGyuBg.js → date-comparison-filter-options.config-JA_yYpJa.js} +6 -3
  49. package/components/{date-filter-options.config-n-zhWaYa.cjs → date-filter-options.config-CWPMtA18.cjs} +1 -1
  50. package/components/{date-filter-options.config-BTVyHRkp.js → date-filter-options.config-DBRxlTWy.js} +6 -3
  51. package/components/display-settings/index.cjs +1 -1
  52. package/components/display-settings/index.js +1 -1
  53. package/components/display-settings-binning/index.cjs +5 -5
  54. package/components/display-settings-binning/index.js +30 -29
  55. package/components/display-settings-datetime/index.cjs +29 -29
  56. package/components/display-settings-datetime/index.js +120 -112
  57. package/components/display-settings-grand-totals/index.cjs +4 -4
  58. package/components/display-settings-grand-totals/index.js +24 -23
  59. package/components/display-settings-numeric/index.cjs +48 -48
  60. package/components/display-settings-numeric/index.js +211 -194
  61. package/components/display-settings-period-over-period/index.cjs +16 -16
  62. package/components/display-settings-period-over-period/index.js +97 -91
  63. package/components/{donut-chart-options.config-3ZqX8Cbb.js → donut-chart-options.config-BulUEiaH.js} +37 -21
  64. package/components/donut-chart-options.config-tNpqBZfR.cjs +20 -0
  65. package/components/draggable-data-item/index.cjs +5 -5
  66. package/components/draggable-data-item/index.js +46 -45
  67. package/components/draggable-data-item-level/index.cjs +11 -11
  68. package/components/draggable-data-item-level/index.js +73 -70
  69. package/components/{dropdown-filter-options.config-CGJTtgAX.js → dropdown-filter-options.config-D9dvPypF.js} +10 -7
  70. package/components/{dropdown-filter-options.config-DJvfCTk7.cjs → dropdown-filter-options.config-DS-MORmq.cjs} +1 -1
  71. package/components/droppable-slot/index.cjs +16 -16
  72. package/components/droppable-slot/index.js +223 -208
  73. package/components/edit-item/index.cjs +9 -9
  74. package/components/edit-item/index.js +119 -116
  75. package/components/edit-option/index.cjs +1 -1
  76. package/components/edit-option/index.js +1 -1
  77. package/components/edit-option-action-button-group/index.cjs +8 -8
  78. package/components/edit-option-action-button-group/index.js +53 -52
  79. package/components/{edit-option-base-Bh29-Cak.js → edit-option-base-DIc7iC-b.js} +1 -1
  80. package/components/{edit-option-base-tFr8Qg2B.cjs → edit-option-base-VhTih9T1.cjs} +1 -1
  81. package/components/edit-option-color-palette-picker/index.cjs +1 -1
  82. package/components/edit-option-color-palette-picker/index.js +1 -1
  83. package/components/edit-option-color-picker/index.cjs +1 -1
  84. package/components/edit-option-color-picker/index.js +1 -1
  85. package/components/edit-option-color-range/index.cjs +19 -19
  86. package/components/edit-option-color-range/index.js +117 -106
  87. package/components/edit-option-multi-language-field/index.cjs +3 -3
  88. package/components/edit-option-multi-language-field/index.js +27 -26
  89. package/components/edit-option-number-field/index.cjs +1 -1
  90. package/components/edit-option-number-field/index.js +1 -1
  91. package/components/edit-option-picker/index.cjs +5 -5
  92. package/components/edit-option-picker/index.js +7 -7
  93. package/components/edit-option-position-picker/index.cjs +4 -4
  94. package/components/edit-option-position-picker/index.js +25 -21
  95. package/components/edit-option-positions-number-field/index.cjs +9 -9
  96. package/components/edit-option-positions-number-field/index.js +81 -76
  97. package/components/edit-option-radio-button-group/index.cjs +6 -6
  98. package/components/edit-option-radio-button-group/index.js +22 -21
  99. package/components/edit-option-slider/index.cjs +1 -1
  100. package/components/edit-option-slider/index.js +1 -1
  101. package/components/edit-option-switch/index.cjs +1 -1
  102. package/components/edit-option-switch/index.js +1 -1
  103. package/components/edit-option-text-field/index.cjs +2 -2
  104. package/components/edit-option-text-field/index.js +23 -22
  105. package/components/en-BKBhKBXY.cjs +20 -0
  106. package/components/en-BOTjhwEc.js +1488 -0
  107. package/components/{en-GB-ialeqj_z.js → en-GB-CEHEs8F2.js} +1 -1
  108. package/components/{en-GB-TqvgIw9B.cjs → en-GB-DG6uS3sM.cjs} +1 -1
  109. package/components/{evolution-number-options.config-Bc9eKYnn.cjs → evolution-number-options.config-BgIZY4gQ.cjs} +1 -1
  110. package/components/{evolution-number-options.config-BIPO_4n3.js → evolution-number-options.config-DzkfeoIN.js} +14 -11
  111. package/components/{extrapolate-color-C0n1UDs-.cjs → extrapolate-color-0j_AeYkz.cjs} +1 -1
  112. package/components/{extrapolate-color-v1PimdQr.js → extrapolate-color-CC9CURf6.js} +1 -1
  113. package/components/filter-data-item-picker/index.cjs +7 -7
  114. package/components/filter-data-item-picker/index.js +86 -85
  115. package/components/filter-expression-picker/index.cjs +1 -1
  116. package/components/filter-expression-picker/index.js +1 -1
  117. package/components/filter-item/index.cjs +6 -6
  118. package/components/filter-item/index.js +119 -109
  119. package/components/filter-value-picker/index.cjs +2 -2
  120. package/components/filter-value-picker/index.js +36 -34
  121. package/components/filter-value-picker-datetime/index.cjs +8 -8
  122. package/components/filter-value-picker-datetime/index.js +71 -56
  123. package/components/filter-value-picker-hierarchy/index.cjs +12 -12
  124. package/components/filter-value-picker-hierarchy/index.js +124 -113
  125. package/components/filter-value-picker-numeric/index.cjs +8 -8
  126. package/components/filter-value-picker-numeric/index.js +110 -101
  127. package/components/focusable-B3E_hQmm.cjs +20 -0
  128. package/components/{focusable-BS2pbY7w.js → focusable-DCIFkpiW.js} +26 -24
  129. package/components/{funnel-chart-options.config-CrJy2U7_.js → funnel-chart-options.config-C_VjTOvD.js} +20 -5
  130. package/components/funnel-chart-options.config-D7H7gFcx.cjs +20 -0
  131. package/components/get-css-variable-BEYG097C.js +1446 -0
  132. package/components/get-css-variable-BZxY4IOa.cjs +35 -0
  133. package/components/get-css-variable-DLiZYZEi.cjs +24 -0
  134. package/components/{get-css-variable-CdwF98oh.js → get-css-variable-YlLiVgo8.js} +35 -35
  135. package/components/grid/index.cjs +49 -43
  136. package/components/grid/index.js +1878 -2610
  137. package/components/{heat-map-options.config-CmL87j1j.js → heat-map-options.config-BnLWe8jS.js} +41 -35
  138. package/components/heat-map-options.config-DVH-Bb5-.cjs +20 -0
  139. package/components/heat-table-options.config-B12JEYnp.cjs +20 -0
  140. package/components/{heat-table-options.config-BrCYAgYD.js → heat-table-options.config-CUsDdgUr.js} +88 -60
  141. package/components/helpers-DXQwEH1P.cjs +20 -0
  142. package/components/helpers-v1bPALRP.js +91 -0
  143. package/components/hexbin-map-options.config-DZERRhM8.cjs +20 -0
  144. package/components/{hexbin-map-options.config-BguV1w8q.js → hexbin-map-options.config-F-7uCqxb.js} +38 -20
  145. package/components/{index-BNAmjOkm.cjs → index-BPNsFiyq.cjs} +4 -4
  146. package/components/index-CDi4fe3N.js +1716 -0
  147. package/components/index-CQ9ck-BO.cjs +249 -0
  148. package/components/index-CXn67vdn.cjs +121 -0
  149. package/components/{index-haa7WNrl.js → index-CdIUfo-L.js} +481 -453
  150. package/components/index-Cz9vSXy6.cjs +20 -0
  151. package/components/{index-DdyZ2g5L.js → index-D0GBF6tg.js} +104 -94
  152. package/components/index-Dn0j_pcR.cjs +20 -0
  153. package/components/{index-CqKpf0B8.js → index-Do7O9azB.js} +123 -112
  154. package/components/index-E239Dotg.js +1735 -0
  155. package/components/index.cjs +1 -1
  156. package/components/index.js +20 -18
  157. package/components/item-options-configs.cjs +1 -1
  158. package/components/item-options-configs.js +37 -37
  159. package/components/{line-chart-options.config-BhirTGqD.js → line-chart-options.config-DB3IsXXr.js} +28 -13
  160. package/components/line-chart-options.config-DSugoe0t.cjs +20 -0
  161. package/components/{localize-CcDpq940.js → localize-BX7q0S0M.js} +10 -10
  162. package/components/{localize-C4zNlrwK.cjs → localize-r7ALOUy_.cjs} +1 -1
  163. package/components/{marker-map-options.config-Bx17jmiq.js → marker-map-options.config-DPJ955tt.js} +1 -1
  164. package/components/{marker-map-options.config-CvhCylSC.cjs → marker-map-options.config-_FYZzRwA.cjs} +1 -1
  165. package/components/pivot-table-options.config-BiJXKSFR.cjs +20 -0
  166. package/components/{pivot-table-options.config-CFc7y0IT.js → pivot-table-options.config-DNK_AIG7.js} +24 -15
  167. package/components/pyramid-chart-options.config-C4zbFS26.cjs +20 -0
  168. package/components/{pyramid-chart-options.config-2Waxb11l.js → pyramid-chart-options.config-CcVMatYx.js} +43 -29
  169. package/components/{radar-chart-options.config-CPN5fOl8.js → radar-chart-options.config-CUZn_3Fd.js} +23 -11
  170. package/components/radar-chart-options.config-EqQu6PTh.cjs +20 -0
  171. package/components/{regular-table-options.config-CFKCJQK1.js → regular-table-options.config-BoLZsBry.js} +23 -17
  172. package/components/{regular-table-options.config-YRuoijIk.cjs → regular-table-options.config-DTx3RTnS.cjs} +1 -1
  173. package/components/{route-map-options.config-CyolTJfK.js → route-map-options.config-CN86T7c0.js} +109 -87
  174. package/components/route-map-options.config-D7NJePTu.cjs +20 -0
  175. package/components/{sankey-diagram-options.config-D7OSvSqm.cjs → sankey-diagram-options.config-RFB83YLZ.cjs} +1 -1
  176. package/components/{sankey-diagram-options.config-Ldjk84ro.js → sankey-diagram-options.config-tVLKy_Zn.js} +10 -7
  177. package/components/scatter-plot-options.config-CFfGJXsV.cjs +20 -0
  178. package/components/{scatter-plot-options.config-CfxEfkQ1.js → scatter-plot-options.config-Corlzno1.js} +86 -56
  179. package/components/{search-filter-options.config-Oqco9BKj.cjs → search-filter-options.config-BCaDlYqZ.cjs} +1 -1
  180. package/components/{search-filter-options.config-C0syQmP4.js → search-filter-options.config-BE3JhR-F.js} +6 -3
  181. package/components/{set-locale-hKTMz37h.js → set-locale-Dp3N_gXN.js} +8 -1
  182. package/components/{slicer-filter-options.config-DmOe3440.js → slicer-filter-options.config-3JZZcw5C.js} +18 -9
  183. package/components/slicer-filter-options.config-DNI-XevE.cjs +20 -0
  184. package/components/{slider-filter-options.config-B1M8RcDs.js → slider-filter-options.config-DH4SS8wH.js} +1 -1
  185. package/components/{slider-filter-options.config-k45I-t6G.cjs → slider-filter-options.config-_8Z2zKmU.cjs} +1 -1
  186. package/components/slot-contents-picker/index.cjs +33 -33
  187. package/components/slot-contents-picker/index.js +205 -194
  188. package/components/slot-menu/index.cjs +12 -12
  189. package/components/slot-menu/index.js +184 -171
  190. package/components/slot-menu-list/index.cjs +3 -3
  191. package/components/slot-menu-list/index.js +103 -97
  192. package/components/speedometer-chart-options.config-BX9LTQBH.cjs +20 -0
  193. package/components/{speedometer-chart-options.config-CzOmuEF8.js → speedometer-chart-options.config-SL581yOa.js} +53 -31
  194. package/components/{spike-map-options.config-Cbt1YUw6.js → spike-map-options.config-C5KewecZ.js} +122 -91
  195. package/components/spike-map-options.config-DoBFXPmN.cjs +20 -0
  196. package/components/{sunburst-chart-options.config-Yrxc2i57.cjs → sunburst-chart-options.config-AbNjWS6t.cjs} +1 -1
  197. package/components/{sunburst-chart-options.config-_dyLQxPJ.js → sunburst-chart-options.config-CNauGQJv.js} +20 -9
  198. package/components/{symbol-map-options.config-BORL1NSU.js → symbol-map-options.config-DdDA4aa7.js} +20 -11
  199. package/components/symbol-map-options.config-m-lwLTtu.cjs +20 -0
  200. package/components/treemap-chart-options.config-C0Q9aQ1Z.cjs +20 -0
  201. package/components/{treemap-chart-options.config-B9i9qIm_.js → treemap-chart-options.config-D5AJaF_u.js} +37 -20
  202. package/components/utils.cjs +1 -1
  203. package/components/utils.js +97 -94
  204. package/components/{video-options.config-B0asgYt8.cjs → video-options.config-CGsDTwHc.cjs} +1 -1
  205. package/components/{video-options.config-UX-9MDfS.js → video-options.config-Dk36zJ1B.js} +10 -7
  206. package/components/widget-menu/index.cjs +51 -0
  207. package/components/widget-menu/index.d.ts +8 -0
  208. package/components/widget-menu/index.js +211 -0
  209. package/components/widget-menu/widget-menu.d.ts +77 -0
  210. package/components/{wordcloud-chart-options.config-BKtJT8Va.cjs → wordcloud-chart-options.config-vGfCW8kE.cjs} +1 -1
  211. package/components/{wordcloud-chart-options.config-BoB_KuhA.js → wordcloud-chart-options.config-w2NUIWVA.js} +7 -4
  212. package/custom-elements.json +133 -20
  213. package/index.d.ts +1 -0
  214. package/package.json +6 -1
  215. package/types.d.ts +4 -0
  216. package/components/area-chart-options.config-Bl8bhhOo.cjs +0 -20
  217. package/components/bar-chart-options.config-CePAqM83.cjs +0 -20
  218. package/components/box-plot-options.config-BVNrV2eD.cjs +0 -20
  219. package/components/bubble-chart-options.config-BDgOe3GQ.cjs +0 -20
  220. package/components/calculate-data-item-icon-DMDhKq_m.js +0 -147
  221. package/components/calculate-data-item-icon-DtVGbet3.cjs +0 -20
  222. package/components/choropleth-map-options.config-CWJACFd0.cjs +0 -20
  223. package/components/circular-gauge-options.config-BMxgq3zH.cjs +0 -20
  224. package/components/color-Czp4Im5q.cjs +0 -20
  225. package/components/color-range-utils-DYYR-iwx.cjs +0 -20
  226. package/components/column-chart-options.config-BV9R3ssH.cjs +0 -20
  227. package/components/conditional-number-options.config-Co099Qfm.cjs +0 -20
  228. package/components/donut-chart-options.config-BQyPgnC9.cjs +0 -20
  229. package/components/en-D3ihEGXg.js +0 -1483
  230. package/components/en-DZcn_iz_.cjs +0 -20
  231. package/components/focusable-QLh-LlNt.cjs +0 -20
  232. package/components/funnel-chart-options.config-DrP4AFgk.cjs +0 -20
  233. package/components/get-css-variable-COd1d84B.cjs +0 -24
  234. package/components/heat-map-options.config-CIHnPdYE.cjs +0 -20
  235. package/components/heat-table-options.config-DTlZRc_i.cjs +0 -20
  236. package/components/helpers-9I0oLoUB.cjs +0 -20
  237. package/components/helpers-bR8Ibjqh.js +0 -79
  238. package/components/hexbin-map-options.config-CKnn3VAB.cjs +0 -20
  239. package/components/index-BekTY3Em.cjs +0 -121
  240. package/components/index-CFL6gmIu.cjs +0 -20
  241. package/components/index-DNPULp4A.js +0 -1755
  242. package/components/index-DvkzMbLt.cjs +0 -249
  243. package/components/line-chart-options.config-Cqwou5u6.cjs +0 -20
  244. package/components/pivot-table-options.config-uZDAertf.cjs +0 -20
  245. package/components/pyramid-chart-options.config-DoGfEvzU.cjs +0 -20
  246. package/components/radar-chart-options.config-CtNUMN1l.cjs +0 -20
  247. package/components/route-map-options.config-CVTk5RVL.cjs +0 -20
  248. package/components/scatter-plot-options.config-5gN7pMTm.cjs +0 -20
  249. package/components/slicer-filter-options.config-CrusP6a0.cjs +0 -20
  250. package/components/speedometer-chart-options.config-B4ceg_qI.cjs +0 -20
  251. package/components/spike-map-options.config-BkkDqb4g.cjs +0 -20
  252. package/components/symbol-map-options.config-NpBKm64d.cjs +0 -20
  253. package/components/treemap-chart-options.config-x4J54WSw.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 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-DNPULp4A.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";
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-E239Dotg.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-Dp3N_gXN.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 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;
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;
40
40
  };
41
- const _ = 5e3;
42
- let l = class extends S(k, {
43
- validSizes: Object.values(L)
41
+ const S = 5e3;
42
+ let u = class extends T(E, {
43
+ validSizes: Object.values(I)
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 [x(T)];
49
+ return [$(D)];
50
50
  }
51
51
  connectedCallback() {
52
52
  super.connectedCallback();
@@ -54,12 +54,13 @@ let l = class extends S(k, {
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
- 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
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
61
62
  ) || !["? in ?", "? not in ?", "? = ?", "? != ?"].includes(
62
- t
63
+ k
63
64
  )) && (this._hierarchyValues = [], this._allValuesRetrieved = !1, this._retrieving = !0);
64
65
  }
65
66
  }
@@ -67,75 +68,76 @@ let l = class extends S(k, {
67
68
  * Fetches hierarchy values from the databroker
68
69
  */
69
70
  async _fetchHierarchyValues(e = 0) {
71
+ var g, p;
70
72
  if (this._allValuesRetrieved) {
71
73
  this._retrieving = !1;
72
74
  return;
73
75
  }
74
- if (!this.filter?.parameters?.[0]) {
76
+ if (!((p = (g = this.filter) == null ? void 0 : g.parameters) != null && p[0])) {
75
77
  this._retrieving = !1, this._error = "Missing column parameters";
76
78
  return;
77
79
  }
78
- const r = this.filter.parameters[0], t = r.columnId, i = r.formulaId, o = r.datasetId;
79
- if (!t && !i) {
80
+ const r = this.filter.parameters[0], o = r.columnId, s = r.formulaId, t = r.datasetId;
81
+ if (!o && !s) {
80
82
  this._retrieving = !1, this._error = "Missing column id or formula id";
81
83
  return;
82
- } else if (!o) {
84
+ } else if (!t) {
83
85
  this._retrieving = !1, this._error = "Missing dataset id";
84
86
  return;
85
87
  }
86
88
  this._retrieving = !0, this._error = null;
87
- const c = {
89
+ const n = {
88
90
  expression: "? like ?",
89
91
  parameters: [
90
92
  {
91
- column_id: t,
92
- formula_id: i,
93
- dataset_id: o
93
+ column_id: o,
94
+ formula_id: s,
95
+ dataset_id: t
94
96
  },
95
97
  this._search
96
98
  ]
97
- }, u = {
99
+ }, a = {
98
100
  dimensions: [
99
101
  {
100
- column_id: t,
101
- formula_id: i,
102
- dataset_id: o
102
+ column_id: o,
103
+ formula_id: s,
104
+ dataset_id: t
103
105
  }
104
106
  ],
105
107
  where: [],
106
108
  order: [
107
109
  {
108
- column_id: t,
109
- formula_id: i,
110
- dataset_id: o,
110
+ column_id: o,
111
+ formula_id: s,
112
+ dataset_id: t,
111
113
  order: "asc"
112
114
  }
113
115
  ],
114
116
  limit: {
115
- by: _,
117
+ by: S,
116
118
  offset: e
117
119
  }
118
120
  };
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" });
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" });
123
125
  });
124
- }), d = {
125
- promise: n,
126
- abortController: g
126
+ }), f = {
127
+ promise: c,
128
+ abortController: d
127
129
  };
128
- this._runningQueries.push(d);
130
+ this._runningQueries.push(f);
129
131
  try {
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")
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")
134
136
  return;
135
- this._error = a instanceof Error ? a.message : "Unknown error", this._hierarchyValues = [];
137
+ this._error = i instanceof Error ? i.message : "Unknown error", this._hierarchyValues = [];
136
138
  } finally {
137
139
  this._runningQueries = this._runningQueries.filter(
138
- (a) => a.promise !== n
140
+ (i) => i.promise !== c
139
141
  ), this._retrieving = !1;
140
142
  }
141
143
  }
@@ -152,26 +154,30 @@ let l = class extends S(k, {
152
154
  );
153
155
  }
154
156
  setHierarchy(e) {
157
+ var o, s, t, n, a, d, c, f;
155
158
  let r;
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 = {
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 = {
157
160
  ...this.filter,
158
- parameters: [{ ...this.filter?.parameters?.[0] }, this._value]
161
+ parameters: [{ ...(f = (c = this.filter) == null ? void 0 : c.parameters) == null ? void 0 : f[0] }, this._value]
159
162
  }, this._sendChangeEvent());
160
163
  }
161
164
  onScrolled(e) {
162
- !this._retrieving && !this._allValuesRetrieved && e?.detail?.last === this._hierarchyValues.length - 1 && this._fetchHierarchyValues(this._hierarchyValues.length);
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);
163
167
  }
164
168
  renderTextField() {
165
- return z`<luzmo-text-field
169
+ var e, r;
170
+ return y`<luzmo-text-field
166
171
  .size=${this.size}
167
172
  @change=${this.setHierarchy}
168
173
  @input=${this.setHierarchy}
169
- .value=${this.filter?.parameters?.[1] ?? ""}
174
+ .value=${((r = (e = this.filter) == null ? void 0 : e.parameters) == null ? void 0 : r[1]) ?? ""}
170
175
  ></luzmo-text-field>`;
171
176
  }
172
177
  setSearchString(e) {
173
- this._search = e?.detail?.string ?? "", this._allValuesRetrieved || (this._searchQueryTimeout && (this._runningQueries.forEach((r) => {
174
- r?.abortController && r.abortController.abort();
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();
175
181
  }), this._runningQueries = [], clearTimeout(this._searchQueryTimeout)), this._searchQueryTimeout = setTimeout(() => {
176
182
  this._fetchHierarchyValues();
177
183
  }, 500));
@@ -183,83 +189,88 @@ let l = class extends S(k, {
183
189
  this._fetchHierarchyValues();
184
190
  }
185
191
  renderHierarchyPicker() {
192
+ var c, f, g, p, i;
186
193
  if (this._error)
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
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
193
203
  };
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
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
196
206
  .size=${this.size}
197
- .label=${g}
207
+ .label=${d}
198
208
  .retrieving=${this._retrieving}
199
- .selects=${t ? "single" : "multiple"}
200
- .variant=${t ? "highlight" : "checkboxes"}
209
+ .selects=${o ? "single" : "multiple"}
210
+ .variant=${o ? "highlight" : "checkboxes"}
201
211
  emphasized
202
212
  no-wrap
203
213
  ?invalid=${!!this._error}
204
- .multipleLabelTemplate=${i}
205
- .searchLabel=${o}
206
- .noDataLabel=${c}
207
- .noResultsLabel=${u}
214
+ .multipleLabelTemplate=${s}
215
+ .searchLabel=${t}
216
+ .noDataLabel=${n}
217
+ .noResultsLabel=${a}
208
218
  @change=${this.setHierarchy}
209
219
  @luzmo-search=${this.setSearchString}
210
220
  @luzmo-opened=${this.onOpened}
211
221
  @luzmo-closed=${this.resetSearchString}
212
222
  @luzmo-scrolled=${this.onScrolled}
213
223
  .options=${e}
214
- .value=${t ? [this.filter?.parameters?.[1]] : this.filter?.parameters?.[1]}
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]}
215
225
  >
216
226
  </luzmo-select>`;
217
227
  }
218
228
  render() {
219
- const e = this.filter?.expression;
229
+ var r;
230
+ const e = (r = this.filter) == null ? void 0 : r.expression;
220
231
  return ["? in ?", "? not in ?", "? = ?", "? != ?"].includes(e) ? this.renderHierarchyPicker() : this.renderTextField();
221
232
  }
222
233
  };
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);
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);
259
270
  customElements.get("luzmo-filter-value-picker-hierarchy") || customElements.define(
260
271
  "luzmo-filter-value-picker-hierarchy",
261
- l
272
+ u
262
273
  );
263
274
  export {
264
- l as LuzmoFilterValuePickerHierarchy
275
+ u as LuzmoFilterValuePickerHierarchy
265
276
  };
@@ -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 d=require("lit"),h=require("@lit/localize"),f=require("@luzmo/lucero/utils"),b=require("../index-CFL6gmIu.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
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-Dn0j_pcR.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
21
21
  .size=${this.size}
22
22
  @change=${this.setValue}
23
23
  @input=${this.setValue}
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
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
26
26
  .size=${this.size}
27
- .label=${n}
27
+ .label=${a}
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=${i}
36
- .noDataLabel=${r}
35
+ .searchLabel=${r}
36
+ .noDataLabel=${i}
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=${this.filter?.parameters?.[1]}
44
+ .value=${(m=(u=this.filter)==null?void 0:u.parameters)==null?void 0:m[1]}
45
45
  >
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);
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);