@luzmo/analytics-components-kit 1.0.9-beta.1 → 1.0.9-beta.2

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 (327) hide show
  1. package/README.md +1 -1
  2. package/components/ai-chat/index.cjs +1 -1
  3. package/components/ai-chat/index.js +2 -9
  4. package/components/{ai-chat-PesGGOLP.js → ai-chat-CVxHPPvM.js} +3 -2
  5. package/components/{ai-chat-1OlRpimu.cjs → ai-chat-DEVIxsRP.cjs} +1 -1
  6. package/components/ai-interaction-textarea/index.cjs +1 -1
  7. package/components/ai-interaction-textarea/index.js +1 -8
  8. package/components/{ai-interaction-textarea-CmFGJzbb.cjs → ai-interaction-textarea-D_Lw29_i.cjs} +1 -1
  9. package/components/{ai-interaction-textarea-BXKG2elT.js → ai-interaction-textarea-i9SabsmQ.js} +3 -2
  10. package/components/{area-chart-positioning.config-C37nmNfP.cjs → area-chart-positioning.config-B8xSL1XU.cjs} +1 -1
  11. package/components/{area-chart-positioning.config-CF8Z7PuX.js → area-chart-positioning.config-C0_dxknc.js} +1 -1
  12. package/components/{bar-chart-positioning.config-vuRQZsYr.js → bar-chart-positioning.config-B4fazkYv.js} +1 -1
  13. package/components/{bar-chart-positioning.config-C4ii41mE.cjs → bar-chart-positioning.config-B6A5m0ZR.cjs} +1 -1
  14. package/components/{base-8L8Jt2vi.js → base-BRTs2KqJ.js} +29 -30
  15. package/components/base-BWU343D_.cjs +20 -0
  16. package/components/{box-plot-positioning.config-DMIsI9yU.js → box-plot-positioning.config-BI9F_JjL.js} +1 -1
  17. package/components/{box-plot-positioning.config-D2LpbgQ_.cjs → box-plot-positioning.config-DVXXjP8U.cjs} +1 -1
  18. package/components/{bubble-chart-positioning.config-Btak-zwN.cjs → bubble-chart-positioning.config-C0tGI4fC.cjs} +1 -1
  19. package/components/{bubble-chart-positioning.config-jYu0Q0Mc.js → bubble-chart-positioning.config-DXhama4z.js} +1 -1
  20. package/components/{bullet-chart-positioning.config-BWHfPPyA.js → bullet-chart-positioning.config-Czlw32Ii.js} +1 -1
  21. package/components/{bullet-chart-positioning.config-CwoRVgNS.cjs → bullet-chart-positioning.config-Dmb_yizO.cjs} +1 -1
  22. package/components/{choropleth-map-positioning.config-KtxcLW7E.js → choropleth-map-positioning.config-BWJmEGy6.js} +1 -1
  23. package/components/{choropleth-map-positioning.config-DttV0Dk_.cjs → choropleth-map-positioning.config-JIj9p6-n.cjs} +1 -1
  24. package/components/{circle-pack-chart-positioning.config-N-rZvQjR.cjs → circle-pack-chart-positioning.config-D3Ogj0P9.cjs} +1 -1
  25. package/components/{circle-pack-chart-positioning.config-QBO-pwDr.js → circle-pack-chart-positioning.config-PhYH_yh8.js} +1 -1
  26. package/components/{circular-gauge-positioning.config-DKGmEpFj.js → circular-gauge-positioning.config-COSdEO1U.js} +1 -1
  27. package/components/{circular-gauge-positioning.config-Cf1zuLXa.cjs → circular-gauge-positioning.config-DxfZmoEP.cjs} +1 -1
  28. package/components/{column-chart-positioning.config-DcErS56C.cjs → column-chart-positioning.config-6OVsL5vU.cjs} +1 -1
  29. package/components/{column-chart-positioning.config-LkQSNtSH.js → column-chart-positioning.config-BRYZk4cF.js} +1 -1
  30. package/components/{combination-chart-positioning.config-Dzi93oAp.cjs → combination-chart-positioning.config-4qgeM8BL.cjs} +1 -1
  31. package/components/{combination-chart-positioning.config-7iAEpO7h.js → combination-chart-positioning.config-CTj23r8f.js} +1 -1
  32. package/components/{conditional-number-positioning.config-Bse6AKPP.js → conditional-number-positioning.config-BUdWeVNm.js} +1 -1
  33. package/components/{conditional-number-positioning.config-CTy0zLXu.cjs → conditional-number-positioning.config-Dg67t4VA.cjs} +1 -1
  34. package/components/data-field/index.cjs +1 -1
  35. package/components/data-field/index.js +1 -8
  36. package/components/{data-field-CSm9APdz.js → data-field-CwC5VH16.js} +3 -2
  37. package/components/{data-field-D2y4cv9j.cjs → data-field-DHpgI_wv.cjs} +1 -1
  38. package/components/data-field-level/index.cjs +1 -1
  39. package/components/data-field-level/index.js +1 -8
  40. package/components/data-field-level-8-eOBdl6.cjs +55 -0
  41. package/components/{data-field-level-B0aj8c5M.js → data-field-level-Ben_W9pd.js} +2 -1
  42. package/components/data-field-panel/index.cjs +1 -1
  43. package/components/data-field-panel/index.js +1 -8
  44. package/components/data-field-panel-CiuTVMXF.cjs +87 -0
  45. package/components/{data-field-panel-DpBWJnes.js → data-field-panel-DppKRagT.js} +3 -2
  46. package/components/data-fields-select/index.cjs +1 -1
  47. package/components/data-fields-select/index.js +1 -8
  48. package/components/data-fields-select-DjDeBEj-.cjs +43 -0
  49. package/components/{data-fields-select-69TDpIG_.js → data-fields-select-HwMkrPAn.js} +1 -0
  50. package/components/dataset-icon/index.cjs +1 -1
  51. package/components/dataset-icon/index.js +1 -8
  52. package/components/{dataset-icon-CWT5Ju8w.js → dataset-icon-BEq1MNml.js} +1 -0
  53. package/components/dataset-icon-tec1Xulw.cjs +64 -0
  54. package/components/dataset-selector-list/index.cjs +1 -1
  55. package/components/dataset-selector-list/index.js +1 -8
  56. package/components/dataset-selector-list-BL2uKzCy.cjs +75 -0
  57. package/components/{dataset-selector-list-DTMXvqfO.js → dataset-selector-list-BWavenTF.js} +2 -1
  58. package/components/dataset-selector-row/index.cjs +1 -1
  59. package/components/dataset-selector-row/index.js +1 -8
  60. package/components/{dataset-selector-row-gHWsZlrC.cjs → dataset-selector-row-BP4Txybx.cjs} +1 -1
  61. package/components/{dataset-selector-row-kiHtzZcP.js → dataset-selector-row-C_O6h4Ir.js} +2 -1
  62. package/components/display-settings/index.cjs +1 -1
  63. package/components/display-settings/index.js +1 -8
  64. package/components/display-settings-Dmvi7XT-.cjs +142 -0
  65. package/components/{display-settings-DKuvd62j.js → display-settings-V5AltVPN.js} +3 -2
  66. package/components/display-settings-binning/index.cjs +1 -1
  67. package/components/display-settings-binning/index.js +1 -8
  68. package/components/{display-settings-binning-BkCNSkgf.js → display-settings-binning-BNofVnZE.js} +2 -1
  69. package/components/{display-settings-binning-DZKo_tBm.cjs → display-settings-binning-C1Fvc8tj.cjs} +1 -1
  70. package/components/display-settings-datetime/index.cjs +1 -1
  71. package/components/display-settings-datetime/index.js +1 -8
  72. package/components/{display-settings-datetime-BTgriFcv.js → display-settings-datetime-CUR1w0k5.js} +2 -1
  73. package/components/{display-settings-datetime-DD7Oh-2T.cjs → display-settings-datetime-OiFwicTh.cjs} +1 -1
  74. package/components/display-settings-grand-totals/index.cjs +1 -1
  75. package/components/display-settings-grand-totals/index.js +1 -8
  76. package/components/{display-settings-grand-totals-BsIZg67h.cjs → display-settings-grand-totals-Bi1OcC7p.cjs} +1 -1
  77. package/components/{display-settings-grand-totals-DH7AoyQY.js → display-settings-grand-totals-CgzHbK1K.js} +2 -1
  78. package/components/display-settings-numeric/index.cjs +1 -1
  79. package/components/display-settings-numeric/index.js +1 -8
  80. package/components/{display-settings-numeric-CsmrnEp2.cjs → display-settings-numeric-BQ_vQrnj.cjs} +1 -1
  81. package/components/{display-settings-numeric-CkFpOoWU.js → display-settings-numeric-CUWkiQtR.js} +2 -1
  82. package/components/display-settings-period-over-period/index.cjs +1 -1
  83. package/components/display-settings-period-over-period/index.js +1 -8
  84. package/components/{display-settings-period-over-period-Co37HcSm.cjs → display-settings-period-over-period-Br08rz7r.cjs} +1 -1
  85. package/components/{display-settings-period-over-period-CdI5wuL_.js → display-settings-period-over-period-C7cfSyIL.js} +2 -1
  86. package/components/{donut-chart-positioning.config-BThtaJEt.cjs → donut-chart-positioning.config-B4JdERSl.cjs} +1 -1
  87. package/components/{donut-chart-positioning.config-D2uG_Irk.js → donut-chart-positioning.config-CWGYZUec.js} +1 -1
  88. package/components/{evolution-number-positioning.config-DtYiv9oB.cjs → evolution-number-positioning.config-CqQeAPbN.cjs} +1 -1
  89. package/components/{evolution-number-positioning.config-BtjobZqK.js → evolution-number-positioning.config-DZ7SVvue.js} +1 -1
  90. package/components/filter-expression-picker/index.cjs +1 -1
  91. package/components/filter-expression-picker/index.js +1 -8
  92. package/components/{filter-expression-picker-C4kE_Thd.js → filter-expression-picker-3xcrAACt.js} +1 -0
  93. package/components/filter-expression-picker-BrtXMSBv.cjs +40 -0
  94. package/components/filter-item/index.cjs +1 -1
  95. package/components/filter-item/index.js +1 -8
  96. package/components/{filter-item-Be6Z7NMz.js → filter-item-CH5sjhJy.js} +5 -4
  97. package/components/filter-item-C_h4rbuL.cjs +111 -0
  98. package/components/filter-parameter-picker/index.cjs +1 -1
  99. package/components/filter-parameter-picker/index.js +1 -8
  100. package/components/{filter-parameter-picker-Ba8bvoPZ.js → filter-parameter-picker-CB3uIoZ2.js} +1 -0
  101. package/components/filter-parameter-picker-DJKHZxlT.cjs +124 -0
  102. package/components/filter-value-picker/index.cjs +1 -1
  103. package/components/filter-value-picker/index.js +1 -8
  104. package/components/{filter-value-picker-Dpua1vcJ.cjs → filter-value-picker-CW9vKpn1.cjs} +1 -1
  105. package/components/{filter-value-picker-DD206JZl.js → filter-value-picker-DeO855hf.js} +4 -3
  106. package/components/filter-value-picker-datetime/index.cjs +1 -1
  107. package/components/filter-value-picker-datetime/index.js +1 -8
  108. package/components/{filter-value-picker-datetime-Bj0YaPtB.js → filter-value-picker-datetime-B0lLveRY.js} +1 -0
  109. package/components/filter-value-picker-datetime-DapMI9Jr.cjs +51 -0
  110. package/components/filter-value-picker-hierarchy/index.cjs +1 -1
  111. package/components/filter-value-picker-hierarchy/index.js +1 -8
  112. package/components/{filter-value-picker-hierarchy-ZMThNJYm.js → filter-value-picker-hierarchy-B2xSmjFz.js} +1 -0
  113. package/components/filter-value-picker-hierarchy-C9mJ8PH7.cjs +54 -0
  114. package/components/filter-value-picker-numeric/index.cjs +1 -1
  115. package/components/filter-value-picker-numeric/index.js +1 -8
  116. package/components/{filter-value-picker-numeric-CVaDogFQ.js → filter-value-picker-numeric-CayroCHe.js} +1 -0
  117. package/components/{filter-value-picker-numeric-1Vxp_Vam.cjs → filter-value-picker-numeric-DE5h7dZN.cjs} +1 -1
  118. package/components/filters/index.cjs +1 -1
  119. package/components/filters/index.js +1 -8
  120. package/components/filters-CGqIDlPK.cjs +199 -0
  121. package/components/{filters-Cnm0Kwk3.js → filters-D5oua2IU.js} +2 -1
  122. package/components/formula/index.cjs +1 -1
  123. package/components/formula/index.js +1 -8
  124. package/components/formula-8YhND5Y7.cjs +45 -0
  125. package/components/{formula-BE9bipho.js → formula-B4lrmE5g.js} +3 -2
  126. package/components/{formula-codemirror-B14vsZXJ.cjs → formula-codemirror-CBvQJGHq.cjs} +1 -1
  127. package/components/{formula-codemirror-xfm0QtJN.js → formula-codemirror-CVlF_Qyh.js} +4 -3
  128. package/components/{formula-display-store-8hohve9v.cjs → formula-display-store-BJvPYYsO.cjs} +1 -1
  129. package/components/{formula-display-store-JAaWuYNB.js → formula-display-store-D9MWhreP.js} +2 -2
  130. package/components/formula-editor/index.cjs +1 -1
  131. package/components/formula-editor/index.js +3 -10
  132. package/components/{formula-editor-DN87mT8q.js → formula-editor-BGT-QcuH.js} +6 -5
  133. package/components/{formula-editor-CkW-JfyT.cjs → formula-editor-De9Zj-9c.cjs} +1 -1
  134. package/components/formula-field/index.cjs +1 -1
  135. package/components/formula-field/index.js +1 -8
  136. package/components/formula-field--gNwmTRk.cjs +20 -0
  137. package/components/{formula-field-B1EMJOfK.js → formula-field-CQcnyXOD.js} +2 -1
  138. package/components/{formula-input-base-HL0Fg74x.js → formula-input-base-BdKh5O_E.js} +1 -1
  139. package/components/{formula-input-base-BCQXmd1P.cjs → formula-input-base-CZih19kC.cjs} +1 -1
  140. package/components/{funnel-chart-positioning.config-TVzSiV6I.js → funnel-chart-positioning.config-B6I8z0_N.js} +1 -1
  141. package/components/{funnel-chart-positioning.config-DeLnAGGT.cjs → funnel-chart-positioning.config-BhK0EStG.cjs} +1 -1
  142. package/components/{groupings-CODDxpbZ.js → groupings-C1WNuUBe.js} +1 -1
  143. package/components/{groupings-DKMq8DgS.cjs → groupings-CvXvU4Fr.cjs} +1 -1
  144. package/components/{heat-map-positioning.config-ddrgZXa9.cjs → heat-map-positioning.config-B9Njs88T.cjs} +1 -1
  145. package/components/{heat-map-positioning.config--wm9l7bB.js → heat-map-positioning.config-DAAt2hIR.js} +1 -1
  146. package/components/{heat-table-positioning.config-qMDSRhZR.cjs → heat-table-positioning.config-Cn7Ouv5g.cjs} +1 -1
  147. package/components/{heat-table-positioning.config-CIhhBEMg.js → heat-table-positioning.config-D6ChanEH.js} +1 -1
  148. package/components/{hexbin-map-positioning.config-E_BpcIFy.cjs → hexbin-map-positioning.config-BqfRSZbU.cjs} +1 -1
  149. package/components/{hexbin-map-positioning.config-S7VYUwVD.js → hexbin-map-positioning.config-CNId41q1.js} +1 -1
  150. package/components/index.cjs +1 -1
  151. package/components/index.js +54 -60
  152. package/components/interactive-viz-item/index.cjs +1 -1
  153. package/components/interactive-viz-item/index.js +1 -8
  154. package/components/{interactive-viz-item-cdShBZQA.js → interactive-viz-item-CzIT8K3I.js} +2 -1
  155. package/components/{interactive-viz-item--kqitfEZ.cjs → interactive-viz-item-DUyE1QEJ.cjs} +1 -1
  156. package/components/item-grid/index.cjs +1 -1
  157. package/components/item-grid/index.js +1 -8
  158. package/components/{item-grid-xCM8AqRH.js → item-grid-BaW6EZ2a.js} +1 -0
  159. package/components/{item-grid-BfhqMuQA.cjs → item-grid-BcgBGxIq.cjs} +1 -1
  160. package/components/item-option/index.cjs +1 -1
  161. package/components/item-option/index.js +1 -8
  162. package/components/item-option-8PQMxg8v.cjs +269 -0
  163. package/components/item-option-action-button-group/index.cjs +1 -1
  164. package/components/item-option-action-button-group/index.js +1 -8
  165. package/components/{item-option-action-button-group-4w8ub3cT.js → item-option-action-button-group-BcZTtikv.js} +2 -1
  166. package/components/item-option-action-button-group-zZp49Gbz.cjs +53 -0
  167. package/components/{item-option-base-BxQUwXzg.js → item-option-base-DJ9FLqmu.js} +1 -1
  168. package/components/{item-option-base-4Bwn-3Fc.cjs → item-option-base-K2pn6CrX.cjs} +1 -1
  169. package/components/item-option-color-palette-picker/index.cjs +1 -1
  170. package/components/item-option-color-palette-picker/index.js +1 -8
  171. package/components/item-option-color-palette-picker-B9JlHGA8.cjs +40 -0
  172. package/components/{item-option-color-palette-picker-D5nO-Bqb.js → item-option-color-palette-picker-DJX3MxcT.js} +2 -1
  173. package/components/item-option-color-picker/index.cjs +1 -1
  174. package/components/item-option-color-picker/index.js +1 -8
  175. package/components/{item-option-color-picker-CKokPQcS.js → item-option-color-picker-Dgz-VK03.js} +2 -1
  176. package/components/{item-option-color-picker-Bhv_k1uW.cjs → item-option-color-picker-ayYko5QB.cjs} +1 -1
  177. package/components/item-option-color-range/index.cjs +1 -1
  178. package/components/item-option-color-range/index.js +1 -8
  179. package/components/item-option-color-range-Cc8thG33.cjs +98 -0
  180. package/components/{item-option-color-range-DYsMbFEb.js → item-option-color-range-DibSfro5.js} +2 -1
  181. package/components/{item-option-DaAlj_OB.js → item-option-em2Lp2zJ.js} +2 -1
  182. package/components/item-option-guidelines/index.cjs +1 -1
  183. package/components/item-option-guidelines/index.js +1 -8
  184. package/components/{item-option-guidelines-CXl4Yla4.js → item-option-guidelines-DXUcdAel.js} +3 -2
  185. package/components/item-option-guidelines-h5-NrAYD.cjs +135 -0
  186. package/components/item-option-multi-language-field/index.cjs +1 -1
  187. package/components/item-option-multi-language-field/index.js +1 -8
  188. package/components/{item-option-multi-language-field-C75Hd2fG.cjs → item-option-multi-language-field-BlnTZCFJ.cjs} +1 -1
  189. package/components/{item-option-multi-language-field-S6Mt3k23.js → item-option-multi-language-field-Bqo9OeK4.js} +2 -1
  190. package/components/item-option-number-field/index.cjs +1 -1
  191. package/components/item-option-number-field/index.js +1 -8
  192. package/components/{item-option-number-field-CALw8q_J.js → item-option-number-field-BZHhCuuj.js} +2 -1
  193. package/components/{item-option-number-field-Bg5r0IAX.cjs → item-option-number-field-D9vv1Q-O.cjs} +1 -1
  194. package/components/item-option-panel/index.cjs +1 -1
  195. package/components/item-option-panel/index.js +1 -8
  196. package/components/{item-option-panel-DBXgOsM4.cjs → item-option-panel-Bo3sC4u5.cjs} +1 -1
  197. package/components/{item-option-panel-v7yUS9hb.js → item-option-panel-DvgDiRPH.js} +3 -2
  198. package/components/item-option-picker/index.cjs +1 -1
  199. package/components/item-option-picker/index.js +1 -8
  200. package/components/{item-option-picker-RFstpFwI.cjs → item-option-picker-D5xhm36O.cjs} +1 -1
  201. package/components/{item-option-picker-CZyzd3Nq.js → item-option-picker-cy0KK-ev.js} +2 -1
  202. package/components/item-option-position-picker/index.cjs +1 -1
  203. package/components/item-option-position-picker/index.js +1 -8
  204. package/components/item-option-position-picker-BJ35DWBL.cjs +32 -0
  205. package/components/{item-option-position-picker-C8cnHEH4.js → item-option-position-picker-BbYP1Jnh.js} +2 -1
  206. package/components/item-option-positions-number-field/index.cjs +1 -1
  207. package/components/item-option-positions-number-field/index.js +1 -8
  208. package/components/{item-option-positions-number-field-BJTY1qZR.js → item-option-positions-number-field-DO4z_aKu.js} +2 -1
  209. package/components/item-option-positions-number-field-DzYQoSpk.cjs +49 -0
  210. package/components/item-option-radio-button-group/index.cjs +1 -1
  211. package/components/item-option-radio-button-group/index.js +1 -8
  212. package/components/{item-option-radio-button-group-CN8TLtsV.cjs → item-option-radio-button-group-CF1gttvP.cjs} +1 -1
  213. package/components/{item-option-radio-button-group-vhm4r4_k.js → item-option-radio-button-group-DX7wCv8J.js} +2 -1
  214. package/components/item-option-slider/index.cjs +1 -1
  215. package/components/item-option-slider/index.js +1 -8
  216. package/components/{item-option-slider-DbLPhpJd.cjs → item-option-slider-DeGmGyZE.cjs} +1 -1
  217. package/components/{item-option-slider-CQOKWBZQ.js → item-option-slider-z1CwX5mE.js} +2 -1
  218. package/components/item-option-switch/index.cjs +1 -1
  219. package/components/item-option-switch/index.js +1 -8
  220. package/components/{item-option-switch-CWpb0nf3.cjs → item-option-switch-D3jq7jIt.cjs} +1 -1
  221. package/components/{item-option-switch-azZX2vJr.js → item-option-switch-D41KguKr.js} +2 -1
  222. package/components/item-option-text-field/index.cjs +1 -1
  223. package/components/item-option-text-field/index.js +1 -8
  224. package/components/{item-option-text-field-CIM_38yi.js → item-option-text-field-CnFcApMz.js} +2 -1
  225. package/components/{item-option-text-field-CS3Lccda.cjs → item-option-text-field-cXy2sx5N.cjs} +1 -1
  226. package/components/item-slot-drop/index.cjs +1 -1
  227. package/components/item-slot-drop/index.js +1 -8
  228. package/components/item-slot-drop-CtEMLkmt.cjs +91 -0
  229. package/components/{item-slot-drop-DeZ2GvAu.js → item-slot-drop-YAKpKb2-.js} +5 -4
  230. package/components/item-slot-drop-panel/index.cjs +1 -1
  231. package/components/item-slot-drop-panel/index.js +1 -8
  232. package/components/{item-slot-drop-panel-LpfX7ap0.js → item-slot-drop-panel-JZtBKPJu.js} +39 -38
  233. package/components/item-slot-drop-panel-aom0ugTz.cjs +57 -0
  234. package/components/item-slot-picker/index.cjs +1 -1
  235. package/components/item-slot-picker/index.js +1 -8
  236. package/components/{item-slot-picker-BSO1ltXC.js → item-slot-picker-D-FvHowO.js} +6 -5
  237. package/components/{item-slot-picker-CvySq194.cjs → item-slot-picker-D8h7QXGD.cjs} +1 -1
  238. package/components/item-slot-picker-panel/index.cjs +1 -1
  239. package/components/item-slot-picker-panel/index.js +1 -8
  240. package/components/item-slot-picker-panel-C98lpd4g.cjs +81 -0
  241. package/components/{item-slot-picker-panel-CsntXcAp.js → item-slot-picker-panel-g4JDw1M_.js} +3 -2
  242. package/components/{line-chart-positioning.config-DMe1Ldwk.cjs → line-chart-positioning.config-BZUWqKWz.cjs} +1 -1
  243. package/components/{line-chart-positioning.config-CrreArf5.js → line-chart-positioning.config-C3VzNcws.js} +1 -1
  244. package/components/{marker-map-positioning.config-DW9tMO2M.js → marker-map-positioning.config-BlvgG6yX.js} +1 -1
  245. package/components/{marker-map-positioning.config-CpI8nCtC.cjs → marker-map-positioning.config-CGF74mJI.cjs} +1 -1
  246. package/components/{ohlc-chart-positioning.config-9DETh4xy.cjs → ohlc-chart-positioning.config-B__cD7Wo.cjs} +1 -1
  247. package/components/{ohlc-chart-positioning.config-CkX8gyS2.js → ohlc-chart-positioning.config-BdbEgiry.js} +1 -1
  248. package/components/{parallel-coordinates-plot-positioning.config-CLDZdGdh.cjs → parallel-coordinates-plot-positioning.config-BqdmUJLk.cjs} +1 -1
  249. package/components/{parallel-coordinates-plot-positioning.config-DTJZLEeT.js → parallel-coordinates-plot-positioning.config-DNu5qhNR.js} +1 -1
  250. package/components/{pivot-table-positioning.config-CtSYHD-n.js → pivot-table-positioning.config-CUfnXIHj.js} +1 -1
  251. package/components/{pivot-table-positioning.config-B-SALuVb.cjs → pivot-table-positioning.config-DDpgWCZ7.cjs} +1 -1
  252. package/components/{pyramid-chart-positioning.config-BllFtneP.cjs → pyramid-chart-positioning.config-B2TxqefZ.cjs} +1 -1
  253. package/components/{pyramid-chart-positioning.config-0Juiava5.js → pyramid-chart-positioning.config-CZBcrHEG.js} +1 -1
  254. package/components/{radar-chart-positioning.config-BY4RKNDi.cjs → radar-chart-positioning.config-ddvHAHJF.cjs} +1 -1
  255. package/components/{radar-chart-positioning.config-BPbb63S6.js → radar-chart-positioning.config-j1WOeFnM.js} +1 -1
  256. package/components/{route-map-positioning.config-D6nZFd8f.js → route-map-positioning.config-ChBYybF1.js} +1 -1
  257. package/components/{route-map-positioning.config-GQ9AJfej.cjs → route-map-positioning.config-xBhhxtYu.cjs} +1 -1
  258. package/components/{sankey-diagram-positioning.config-R1EjoR5F.js → sankey-diagram-positioning.config-CudMit_S.js} +1 -1
  259. package/components/{sankey-diagram-positioning.config-DAuj5A08.cjs → sankey-diagram-positioning.config-tZu-dDV-.cjs} +1 -1
  260. package/components/{scatter-plot-positioning.config-DGoMnNZy.js → scatter-plot-positioning.config-BoJEGmgK.js} +1 -1
  261. package/components/{scatter-plot-positioning.config-o4c-wuRo.cjs → scatter-plot-positioning.config-DQOtIhJi.cjs} +1 -1
  262. package/components/{slicer-filter-positioning.config-D_didkcw.js → slicer-filter-positioning.config-CY4jw7_A.js} +1 -1
  263. package/components/{slicer-filter-positioning.config-BqpIENEm.cjs → slicer-filter-positioning.config-CZY2fvwt.cjs} +1 -1
  264. package/components/slot-menu/index.cjs +1 -1
  265. package/components/slot-menu/index.js +1 -8
  266. package/components/slot-menu-Bl6PrLIN.cjs +71 -0
  267. package/components/{slot-menu-CUdbaW3K.js → slot-menu-hIK2_qR3.js} +4 -3
  268. package/components/slot-menu-list/index.cjs +1 -1
  269. package/components/slot-menu-list/index.js +1 -8
  270. package/components/{slot-menu-list-DVSxamVa.js → slot-menu-list-BgwZS32Q.js} +2 -1
  271. package/components/{slot-menu-list-DaHzz_ve.cjs → slot-menu-list-BhgD2zt4.cjs} +1 -1
  272. package/components/{speedometer-chart-positioning.config-eVUWDhkL.cjs → speedometer-chart-positioning.config-D3CWnYTb.cjs} +1 -1
  273. package/components/{speedometer-chart-positioning.config-CmxsV4-x.js → speedometer-chart-positioning.config-cBMverSU.js} +1 -1
  274. package/components/{spike-map-positioning.config-B38djRlf.cjs → spike-map-positioning.config-i7ntIkN5.cjs} +1 -1
  275. package/components/{spike-map-positioning.config-Bta7ar9e.js → spike-map-positioning.config-vuoKutnj.js} +1 -1
  276. package/components/{strip-plot-positioning.config-atH68L8u.cjs → strip-plot-positioning.config-C2H-io7l.cjs} +1 -1
  277. package/components/{strip-plot-positioning.config-0vlAfmDB.js → strip-plot-positioning.config-_-ElbWoV.js} +1 -1
  278. package/components/{sunburst-chart-positioning.config-NFzFNuXB.cjs → sunburst-chart-positioning.config-MB8z_ZfG.cjs} +1 -1
  279. package/components/{sunburst-chart-positioning.config-B2x6afBV.js → sunburst-chart-positioning.config-yzTnv1BQ.js} +1 -1
  280. package/components/{symbol-map-positioning.config-B6v9PFTk.js → symbol-map-positioning.config-BPkEp4Pj.js} +1 -1
  281. package/components/{symbol-map-positioning.config-DGpmp_N1.cjs → symbol-map-positioning.config-L11e_Z3x.cjs} +1 -1
  282. package/components/tokens-BWMfo_w4.cjs +20 -0
  283. package/components/tokens-Ov1pCR4Y.js +29 -0
  284. package/components/{treemap-chart-positioning.config-NMULB8UM.cjs → treemap-chart-positioning.config-40_GcY2u.cjs} +1 -1
  285. package/components/{treemap-chart-positioning.config-Bf2VNVRQ.js → treemap-chart-positioning.config-CitiBQB2.js} +1 -1
  286. package/components/utils/base.cjs +1 -1
  287. package/components/utils/base.js +1 -1
  288. package/components/{venn-diagram-positioning.config-DgOl0Vh-.js → venn-diagram-positioning.config-A28suR_R.js} +1 -1
  289. package/components/{venn-diagram-positioning.config-D4cODPGV.cjs → venn-diagram-positioning.config-C7bkb2Qv.cjs} +1 -1
  290. package/components/viz-item-menu/index.cjs +1 -1
  291. package/components/viz-item-menu/index.js +1 -8
  292. package/components/viz-item-menu/viz-item-menu.d.ts +7 -0
  293. package/components/{viz-item-menu-L_j0L08h.js → viz-item-menu-DsIJZRgm.js} +44 -11
  294. package/components/viz-item-menu-DtHlgOqt.cjs +63 -0
  295. package/components/{wordcloud-chart-positioning.config-DZEkWvb0.cjs → wordcloud-chart-positioning.config-BQFzFNko.cjs} +1 -1
  296. package/components/{wordcloud-chart-positioning.config-BP6iqy-N.js → wordcloud-chart-positioning.config-Dk13J1zq.js} +1 -1
  297. package/package.json +2 -2
  298. package/react/package.json +2 -2
  299. package/styles/tokens.d.ts +1 -0
  300. package/components/base-K-bf6_7X.cjs +0 -20
  301. package/components/data-field-level-Llx0Y9m-.cjs +0 -55
  302. package/components/data-field-panel-Dv60lRUC.cjs +0 -87
  303. package/components/data-fields-select-BHa8THub.cjs +0 -43
  304. package/components/dataset-icon-BAV0S4sZ.cjs +0 -64
  305. package/components/dataset-selector-list-D5lBv2sD.cjs +0 -75
  306. package/components/display-settings-DPqTRJ7E.cjs +0 -142
  307. package/components/filter-expression-picker-CU-OfSmI.cjs +0 -40
  308. package/components/filter-item-CxPrwF-R.cjs +0 -111
  309. package/components/filter-parameter-picker-BtJLCUbT.cjs +0 -124
  310. package/components/filter-value-picker-datetime-DWgI83nJ.cjs +0 -51
  311. package/components/filter-value-picker-hierarchy-BEoqkQq0.cjs +0 -54
  312. package/components/filters-Dtbt99BP.cjs +0 -199
  313. package/components/formula-DGMnKmnR.cjs +0 -45
  314. package/components/formula-field-CQYFSBHL.cjs +0 -20
  315. package/components/item-option-B5FraAiv.cjs +0 -269
  316. package/components/item-option-action-button-group-DHu8VjCy.cjs +0 -53
  317. package/components/item-option-color-palette-picker-DrhHKaAK.cjs +0 -40
  318. package/components/item-option-color-range-CwDkzRcx.cjs +0 -98
  319. package/components/item-option-guidelines-DMjA-h3h.cjs +0 -135
  320. package/components/item-option-position-picker-CKHbHHl1.cjs +0 -32
  321. package/components/item-option-positions-number-field-BGs3WWaz.cjs +0 -49
  322. package/components/item-slot-drop-C8WYPu_w.cjs +0 -91
  323. package/components/item-slot-drop-panel-BcBHDDTT.cjs +0 -57
  324. package/components/item-slot-picker-panel-DQ_OzMO_.cjs +0 -81
  325. package/components/slot-menu-DRx1Ffla.cjs +0 -71
  326. package/components/viz-item-menu-CNHv6qDa.cjs +0 -55
  327. package/storybook/inject-global-vars.d.ts +0 -1
@@ -1,124 +0,0 @@
1
- /*! * A kit of modern Luzmo Web Components for analytics in your web application.
2
- *
3
- * Copyright © 2026 Luzmo
4
- * All rights reserved.
5
- * Luzmo web components (“Luzmo Web Components”)
6
- * must be used according to the Luzmo Terms of Service.
7
- * This license allows users with a current active Luzmo account
8
- * to use the Luzmo Web Components. This license terminates
9
- * automatically if a user no longer has an active Luzmo account.
10
- * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
11
- *
12
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
- * SOFTWARE.
19
- * */
20
- const e=require("./decorate-DCJt-2rt.cjs"),t=require("./localized-mixin-DiUJOd06.cjs"),n=require("./calculate-data-field-icon-DenGmW74.cjs");let r=require("@luzmo/icons");require("@luzmo/lucero/button"),require("@luzmo/lucero/icon"),require("@luzmo/lucero/overlay"),require("@luzmo/lucero/popover");let i=require("lit"),a=require("lit/decorators.js"),o=require("@lit/localize");require("@luzmo/lucero/action-button"),require("@luzmo/lucero/tags"),require("@luzmo/lucero/tooltip"),require("@luzmo/lucero/divider"),require("@luzmo/lucero/text-field");let s=require("@luzmo/lucero/utils");require("@luzmo/lucero/options");var c=new Set([`? is null`,`? is not null`,`? between ?`,`YTD`,`QTD`,`MTD`,`WTD`,`to_date`,`last_available`,`last_completed`,`last_now`,`more_than_ago`,`or_more_ago`,`next_now`,`next_full`]),l=new Set([`? length = ?`,`? length >= ?`,`? length <= ?`]),u=new Set([`? in ?`,`? not in ?`,`? includes all ?`,`? includes any ?`,`? includes only ?`]);function d(e,t){return!e||e===`spatial`||!t||c.has(t)?[]:l.has(t)?[`numeric`]:e===`numeric`||e===`array[numeric]`?u.has(t)?[`array[numeric]`]:[`numeric`]:e===`datetime`||e===`array[datetime]`?u.has(t)?[`array[datetime]`,`datetime`]:[`datetime`,`array[datetime]`]:e===`hierarchy`||e===`array[hierarchy]`?u.has(t)?[`array[hierarchy]`]:[`hierarchy`]:[]}var f={numeric:()=>(0,o.msg)(`Numeric`,{id:`filter-parameter-type-numeric`,desc:`Numeric filter parameter type`}),datetime:()=>(0,o.msg)(`Datetime`,{id:`filter-parameter-type-datetime`,desc:`Datetime filter parameter type`}),hierarchy:()=>(0,o.msg)(`Hierarchy`,{id:`filter-parameter-type-hierarchy`,desc:`Hierarchy filter parameter type`}),"array[numeric]":()=>(0,o.msg)(`Numeric[]`,{id:`filter-parameter-type-numeric-list`,desc:`List of numeric values filter parameter type`}),"array[datetime]":()=>(0,o.msg)(`Datetime[]`,{id:`filter-parameter-type-datetime-list`,desc:`List of datetime values filter parameter type`}),"array[hierarchy]":()=>(0,o.msg)(`Hierarchy[]`,{id:`filter-parameter-type-hierarchy-list`,desc:`List of hierarchy values filter parameter type`})};function p(e){return f[e]?.()??e}function m(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;return typeof t.parameter==`string`&&typeof t.type==`string`&&`value`in t}function h(e){return`metadata.${e.trim().replace(/^metadata\./i,``)}`}function g(e,t,n){let r;if(t.startsWith(`array[`))r=Array.isArray(n)?structuredClone(n):[];else if(t===`numeric`)r=typeof n==`number`&&Number.isFinite(n)?n:0;else if(t===`datetime`){let e=n instanceof Date?n:new Date(typeof n==`string`?n:Date.now());r=Number.isNaN(e.getTime())?new Date().toISOString():e.toISOString()}else r=typeof n==`string`?n:``;return{parameter:h(e),type:t,value:r}}function _(e,t){if(!t||t===`? is null`||t===`? is not null`)return;let[n]=d(e,t);if(n?.startsWith(`array[`))return[];if(n===`numeric`)return 0;if(n===`datetime`)return new Date().toISOString();if(n===`hierarchy`)return``}var v=`:host{min-width:0;max-width:100%;color:var(--luzmo-font-color);font-family:var(--luzmo-font-family);font-size:var(--luzmo-font-size);align-items:center;display:inline-flex;position:relative}.parameter-control{align-items:center;gap:var(--filter-parameter-picker-gap);min-width:0;max-width:100%;display:flex}.create-row{align-items:center;gap:var(--filter-parameter-picker-panel-gap);display:flex}.parameter-trigger,.create-parameter{flex:none}.parameter-trigger{font-weight:var(--luzmo-font-weight-bold)}.selected-parameter-tags{--luzmo-tag-group-item-margin-block:0;min-width:0;max-width:100%}.selected-parameter{--luzmo-tag-max-inline-size:min(180px, 100%);min-width:0;max-width:100%}.parameter-panel{min-inline-size:var(--filter-parameter-picker-panel-min-width);padding:var(--filter-parameter-picker-panel-padding);display:block}.parameter-name-input{--luzmo-text-field-width:100%;flex:1;min-inline-size:0}.panel-content{gap:var(--filter-parameter-picker-panel-gap);flex-direction:column;display:flex}.validation-message{color:var(--filter-parameter-picker-error-color);font-size:var(--luzmo-font-size-s)}.parameter-options{max-block-size:var(--filter-parameter-picker-options-max-height);overflow-y:auto}.parameter-type-footer{gap:var(--filter-parameter-picker-panel-gap);flex-direction:column;display:flex}.parameter-type{justify-content:flex-end;align-items:center;gap:var(--luzmo-spacing-1);font-size:var(--filter-parameter-picker-type-font-size);font-weight:var(--luzmo-font-weight);display:flex}.parameter-type-icon{justify-content:center;align-items:center;min-block-size:24px;min-inline-size:24px;display:inline-flex}:host{--filter-parameter-picker-gap:var(--luzmo-spacing-2);--filter-parameter-picker-control-size:var(--luzmo-component-height);--filter-parameter-picker-panel-min-width:220px;--filter-parameter-picker-options-max-height:240px;--filter-parameter-picker-panel-padding:var(--luzmo-spacing-3);--filter-parameter-picker-panel-gap:var(--luzmo-spacing-3);--filter-parameter-picker-type-font-size:var(--luzmo-font-size-s);--filter-parameter-picker-panel-background:var(--luzmo-background-color);--filter-parameter-picker-panel-border:var(--luzmo-border-color);--filter-parameter-picker-error-color:var(--luzmo-negative-color)}:host([size=xxs]),:host([size=xs]){--filter-parameter-picker-panel-padding:var(--luzmo-spacing-2);--filter-parameter-picker-panel-gap:var(--luzmo-spacing-2);--filter-parameter-picker-type-font-size:var(--luzmo-font-size-xs)}:host([size=s]){--filter-parameter-picker-panel-padding:var(--luzmo-spacing-3);--filter-parameter-picker-panel-gap:var(--luzmo-spacing-3);--filter-parameter-picker-type-font-size:var(--luzmo-font-size-xs)}:host([size=l]){--filter-parameter-picker-panel-padding:var(--luzmo-spacing-4);--filter-parameter-picker-panel-gap:var(--luzmo-spacing-4);--filter-parameter-picker-type-font-size:var(--luzmo-font-size-m)}:host([size=xl]){--filter-parameter-picker-panel-padding:var(--luzmo-spacing-4);--filter-parameter-picker-panel-gap:var(--luzmo-spacing-4);--filter-parameter-picker-type-font-size:var(--luzmo-font-size-l)}:host([size=xxl]){--filter-parameter-picker-panel-padding:var(--luzmo-spacing-5);--filter-parameter-picker-panel-gap:var(--luzmo-spacing-5);--filter-parameter-picker-type-font-size:var(--luzmo-font-size-xl)}`,y=class extends t.t((0,s.SizedMixin)(s.LuzmoElement,{validSizes:Object.values(s.ElementSizes)})){constructor(...e){super(...e),this.parameters=[],this.allowedTypes=[],this.disabled=!1,this.readonly=!1,this.quiet=!1,this._open=!1,this._newParameterName=``,this._handleDocumentClick=e=>{this._open&&!e.composedPath().includes(this)&&this._close()}}static get styles(){return[...super.styles??[],(0,i.unsafeCSS)(v)]}connectedCallback(){super.connectedCallback(),document.addEventListener(`click`,this._handleDocumentClick)}disconnectedCallback(){document.removeEventListener(`click`,this._handleDocumentClick),super.disconnectedCallback()}get _selectableParameters(){return this.parameters.filter(e=>this.allowedTypes.includes(e.type))}get _parameterOptions(){return this._selectableParameters.map(e=>({label:e.parameter.replace(/^metadata\./i,``),value:e.parameter}))}get _parameterType(){return this.selectedParameter?.type??this.allowedTypes[0]}get _duplicateName(){if(!this._hasParameterName)return!1;let e=h(this._newParameterName).toLowerCase();return this.parameters.some(t=>h(t.parameter).toLowerCase()===e)}get _triggerIconSize(){return{xxs:`xs`,xs:`xs`,s:`xs`,m:`xs`,l:`s`,xl:`m`,xxl:`l`}[this.size]??`xs`}get _hasParameterName(){return h(this._newParameterName).replace(/^metadata\./i,``).trim().length>0}_dispatchSelected(e){this.dispatchEvent(new CustomEvent(`luzmo-parameter-selected`,{bubbles:!0,composed:!0,detail:{parameter:e}}))}_dispatchCreated(e){this.dispatchEvent(new CustomEvent(`luzmo-parameter-created`,{bubbles:!0,composed:!0,detail:{parameter:e}}))}_dispatchRemoved(e){this.dispatchEvent(new CustomEvent(`luzmo-parameter-removed`,{bubbles:!0,composed:!0,detail:{parameter:e}}))}async _handleTriggerClick(){this.disabled||this.readonly||this.allowedTypes.length===0||!this._overlay||(this._open=!0,this._newParameterName=``,this._overlay.open=!0,await this.updateComplete,this.shadowRoot?.querySelector(`.parameter-name-input`)?.focusElement.focus())}_handleTriggerKeydown(e){e.key!==`Enter`&&e.key!==` `&&e.key!==`Space`||(e.preventDefault(),this._handleTriggerClick())}_handleOpened(){this.shadowRoot?.querySelector(`.parameter-name-input`)?.focusElement.focus()}_handleClosed(){this._open=!1,this._newParameterName=``}_close(){this._overlay&&(this._overlay.open=!1),this._handleClosed(),this._triggerElement?.focusElement.focus()}_handlePanelKeydown(e){e.key===`Escape`&&(e.preventDefault(),this._close())}_handleNameInput(e){this._newParameterName=e.currentTarget.value}_selectParameter(e){this.disabled||this.readonly||(this.selectedParameter=e,this._dispatchSelected(e),this._close())}_handleOptionsChange(e){e.stopPropagation();let[t]=e.detail.value,n=this._selectableParameters.find(e=>e.parameter===t);n&&this._selectParameter(n)}async _handleCreateParameter(){if(this.disabled||this.readonly)return;let e=this.allowedTypes[0];if(!e||!this._hasParameterName||this._duplicateName)return;let t=g(this._newParameterName,e,this.currentValue);this.parameters=[...this.parameters,t],this._newParameterName=``,this._dispatchCreated(t),await this.updateComplete,this.shadowRoot?.querySelector(`.parameter-name-input`)?.focusElement.focus()}_handleNameKeydown(e){if(e.key===`Enter`){e.preventDefault(),this._handleCreateParameter();return}e.key===`ArrowDown`&&this._optionsElement&&(e.preventDefault(),this._optionsElement.focus())}_handleRemoveParameter(){this.disabled||this.readonly||!this.selectedParameter||this._dispatchRemoved(this.selectedParameter)}_renderParameterType(){let e=this._parameterType;if(!e)return i.nothing;let t=p(e);return i.html`
21
- <div class="parameter-type-footer">
22
- <luzmo-divider class="parameter-type-divider" size="s"></luzmo-divider>
23
- <div class="parameter-type">
24
- <span>${(0,o.msg)(`Parameter type:`,{desc:`Label preceding the type of the filter parameter`})}</span>
25
- <span class="parameter-type-icon" tabindex="0" role="img" aria-label=${t}>
26
- <luzmo-icon
27
- aria-hidden="true"
28
- .icon=${n.t({type:e},`s`)}
29
- size="s"
30
- ></luzmo-icon>
31
- <luzmo-tooltip self-managed placement="top" .size=${this.size}>${t}</luzmo-tooltip>
32
- </span>
33
- </div>
34
- </div>
35
- `}render(){let e=this.selectedParameter?.parameter.replace(/^metadata\./i,``),t=!this._hasParameterName||this._duplicateName;return i.html`
36
- <div class="parameter-control">
37
- ${this.selectedParameter?i.html`
38
- <luzmo-tags class="selected-parameter-tags">
39
- <luzmo-tag
40
- class="selected-parameter"
41
- size=${this.size}
42
- variant="accent"
43
- treatment="fill"
44
- ?deletable=${!this.disabled&&!this.readonly}
45
- ?disabled=${this.disabled}
46
- aria-label=${(0,o.msg)(`Remove parameter`,{desc:`Detach a parameter from a filter`})}
47
- @delete=${this._handleRemoveParameter}
48
- >
49
- ${e}
50
- </luzmo-tag>
51
- </luzmo-tags>
52
- `:i.nothing}
53
- <luzmo-action-button
54
- id="parameter-trigger"
55
- class="parameter-trigger"
56
- size=${this.size}
57
- ?quiet=${this.quiet||!this.selectedParameter}
58
- .variant=${this.selectedParameter?`primary`:`neutral`}
59
- aria-label=${(0,o.msg)(`Use parameter`,{desc:`Open the filter parameter picker`})}
60
- .label=${(0,o.msg)(`Use parameter`,{desc:`Open the filter parameter picker`})}
61
- aria-haspopup="dialog"
62
- aria-disabled=${this.readonly?`true`:`false`}
63
- aria-expanded=${this._open?`true`:`false`}
64
- .disabled=${this.disabled||this.allowedTypes.length===0}
65
- @click=${this._handleTriggerClick}
66
- @keydown=${this._handleTriggerKeydown}
67
- >
68
- <luzmo-icon slot="icon" .icon=${r.luzmoFormula} .size=${this._triggerIconSize}></luzmo-icon>
69
- </luzmo-action-button>
70
- <luzmo-overlay
71
- type="manual"
72
- placement="bottom-end"
73
- trigger="parameter-trigger"
74
- receives-focus="false"
75
- @luzmo-opened=${this._handleOpened}
76
- @luzmo-closed=${this._handleClosed}
77
- >
78
- <luzmo-popover
79
- class="parameter-panel"
80
- size=${this.size}
81
- role="dialog"
82
- aria-label=${(0,o.msg)(`Filter parameters`,{desc:`Filter parameter picker dialog label`})}
83
- @keydown=${this._handlePanelKeydown}
84
- >
85
- <div class="panel-content">
86
- <div class="create-row">
87
- <luzmo-text-field
88
- id="parameter-name"
89
- class="parameter-name-input"
90
- size=${this.size}
91
- .label=${(0,o.msg)(`Parameter name`,{desc:`Name for a new filter parameter`})}
92
- .placeholder=${(0,o.msg)(`New parameter…`,{desc:`Placeholder of the new filter parameter name field`})}
93
- .invalid=${this._duplicateName}
94
- .value=${this._newParameterName}
95
- @input=${this._handleNameInput}
96
- @keydown=${this._handleNameKeydown}
97
- ></luzmo-text-field>
98
- <luzmo-button
99
- class="create-parameter"
100
- size=${this.size}
101
- variant="primary"
102
- ?disabled=${t}
103
- @click=${this._handleCreateParameter}
104
- >
105
- ${(0,o.msg)(`Add`,{desc:`Create a new filter parameter`})}
106
- </luzmo-button>
107
- </div>
108
- ${this._duplicateName?i.html`<div class="validation-message" role="alert">
109
- ${(0,o.msg)(`A parameter with this name already exists.`,{desc:`Duplicate filter parameter name error`})}
110
- </div>`:i.nothing}
111
- ${this._parameterOptions.length>0?i.html`<luzmo-options
112
- class="parameter-options"
113
- size=${this.size}
114
- .label=${(0,o.msg)(`Available parameters`,{desc:`Accessible label of the filter parameter list`})}
115
- .options=${this._parameterOptions}
116
- .value=${this.selectedParameter?[this.selectedParameter.parameter]:[]}
117
- @change=${this._handleOptionsChange}
118
- ></luzmo-options>`:i.nothing}
119
- ${this._renderParameterType()}
120
- </div>
121
- </luzmo-popover>
122
- </luzmo-overlay>
123
- </div>
124
- `}};e.t([(0,a.property)({attribute:!1})],y.prototype,`parameters`,void 0),e.t([(0,a.property)({attribute:!1})],y.prototype,`allowedTypes`,void 0),e.t([(0,a.property)({attribute:!1})],y.prototype,`selectedParameter`,void 0),e.t([(0,a.property)({attribute:!1})],y.prototype,`currentValue`,void 0),e.t([(0,a.property)({type:Boolean,reflect:!0})],y.prototype,`disabled`,void 0),e.t([(0,a.property)({type:Boolean,reflect:!0})],y.prototype,`readonly`,void 0),e.t([(0,a.property)({type:Boolean,reflect:!0})],y.prototype,`quiet`,void 0),e.t([(0,a.state)()],y.prototype,`_open`,void 0),e.t([(0,a.state)()],y.prototype,`_newParameterName`,void 0),e.t([(0,a.query)(`luzmo-overlay`)],y.prototype,`_overlay`,void 0),e.t([(0,a.query)(`.parameter-trigger`)],y.prototype,`_triggerElement`,void 0),e.t([(0,a.query)(`.parameter-options`)],y.prototype,`_optionsElement`,void 0),y=e.t([(0,o.localized)()],y),typeof customElements<`u`&&!customElements.get(`luzmo-filter-parameter-picker`)&&customElements.define(`luzmo-filter-parameter-picker`,y),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return y}});
@@ -1,51 +0,0 @@
1
- /*! * A kit of modern Luzmo Web Components for analytics in your web application.
2
- *
3
- * Copyright © 2026 Luzmo
4
- * All rights reserved.
5
- * Luzmo web components (“Luzmo Web Components”)
6
- * must be used according to the Luzmo Terms of Service.
7
- * This license allows users with a current active Luzmo account
8
- * to use the Luzmo Web Components. This license terminates
9
- * automatically if a user no longer has an active Luzmo account.
10
- * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
11
- *
12
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
- * SOFTWARE.
19
- * */
20
- const e=require("./decorate-DCJt-2rt.cjs"),t=require("./localized-mixin-DiUJOd06.cjs"),n=require("./periods.const-Db0nXrwr.cjs");let r=require("lit"),i=require("lit/decorators.js"),a=require("@lit/localize");require("@luzmo/lucero/number-field"),require("@luzmo/lucero/picker"),require("@luzmo/lucero/text-field");let o=require("@luzmo/lucero/utils");require("@luzmo/lucero/date-time-picker");var s=`:host{gap:var(--luzmo-filter-value-picker-datetime-gap,var(--filter-value-picker-datetime-gap));flex-flow:row;width:100%;min-width:0;max-width:100%;display:flex}luzmo-date-time-picker{--luzmo-date-time-picker-min-width:var(--luzmo-filter-value-picker-datetime-control-min-width,var(--filter-value-picker-datetime-control-min-width));flex:auto;min-width:0;max-width:100%}luzmo-number-field{flex:0 1 var(--luzmo-filter-value-picker-datetime-quantity-width,var(--filter-value-picker-datetime-quantity-width));min-width:0;max-width:100%}luzmo-picker{flex:1 1 var(--luzmo-filter-value-picker-datetime-control-min-width,var(--filter-value-picker-datetime-control-min-width));min-width:0;max-width:100%}:host{--filter-value-picker-datetime-gap:var(--luzmo-spacing-3);--filter-value-picker-datetime-control-min-width:5rem;--filter-value-picker-datetime-quantity-width:4.5rem}:host([size=s]){--filter-value-picker-datetime-gap:var(--luzmo-spacing-2)}:host([size=m]){--filter-value-picker-datetime-gap:var(--luzmo-spacing-3)}:host([size=l]){--filter-value-picker-datetime-gap:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1))}:host([size=xl]){--filter-value-picker-datetime-gap:var(--luzmo-spacing-4)}`,c=class extends t.t((0,o.SizedMixin)(o.LuzmoElement,{validSizes:Object.values(o.ElementSizes)})){constructor(...e){super(...e),this.contentLanguage=`en`,this.quiet=!1,this.readonly=!1,this.disabled=!1}static get styles(){return[(0,r.unsafeCSS)(s)]}willUpdate(e){super.willUpdate(e),e.get(`filter`)&&([`last_now`,`last_available`,`next_now`,`more_than_ago`,`or_more_ago`].includes(this.filter?.expression)?this.filter.parameters[1]={quantity:this.filter?.parameters?.[1]?.quantity??1,unit:this.filter?.parameters?.[1]?.unit??1}:[`last_completed`,`next_full`,`to_date`].includes(this.filter?.expression)?this.filter.parameters[1]={unit:this.filter?.parameters?.[1]?.unit??1}:this.filter.parameters[1]=typeof this.filter.parameters[1]==`string`?this.filter.parameters[1]:new Date().toISOString())}_sendChangeEvent(){this.filter.parameters=[{...this.filter?.parameters?.[0]},this._value],this.dispatchEvent(new CustomEvent(`luzmo-filter-value-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{value:this._value}}))}setDate(e){this.readonly||this.disabled||(this._value=e.detail.value,this._value!==this.filter?.parameters?.[1]&&this._sendChangeEvent())}setUnit(e){if(this.readonly||this.disabled)return;let t=n.n.find(t=>t.key===e?.target?.value)?.level;this.filter?.parameters?.[1]?.unit!==t&&(this._value={unit:t??1,quantity:this.filter?.parameters?.[1]?.quantity??1},this._sendChangeEvent())}setQuantity(e){if(this.readonly||this.disabled)return;let t=e?.target?.value;this.filter?.parameters?.[1]?.quantity!==t&&(this._value={quantity:t,unit:this.filter?.parameters?.[1]?.unit??1},this._sendChangeEvent())}renderDatePicker(){let e=`second`;return this.filter?.parameters?.[0]?.lowestLevel>4&&(e=this.filter?.parameters?.[0]?.lowestLevel===5?`day`:this.filter?.parameters?.[0]?.lowestLevel===6?`hour`:this.filter?.parameters?.[0]?.lowestLevel===7?`minute`:`second`),r.html`<luzmo-date-time-picker
21
- aria-label=${(0,a.msg)(`Filter date`,{desc:`Aria label for filter date picker`})}
22
- .size=${this.size}
23
- .quiet=${this.quiet}
24
- .readonly=${this.readonly}
25
- .disabled=${this.disabled}
26
- .precision=${e}
27
- .timeZone=${this.timeZone}
28
- @change=${this.setDate}
29
- .value=${this.filter?.parameters?.[1]}
30
- ></luzmo-date-time-picker>`}renderQuantityField(){return r.html`<luzmo-number-field
31
- label=${(0,a.msg)(`Quantity`,{desc:`Label for quantity number field`})}
32
- .size=${this.size}
33
- .quiet=${this.quiet}
34
- .readonly=${this.readonly}
35
- .disabled=${this.disabled}
36
- .value=${this.filter?.parameters?.[1]?.quantity}
37
- @input=${this.setQuantity}
38
- @change=${this.setQuantity}
39
- ></luzmo-number-field>`}renderUnitPicker(){let e=n.n.map(e=>r.html`<luzmo-menu-item .value=${e.key}>
40
- ${e.i18n()}
41
- </luzmo-menu-item>`),t=n.n.find(e=>e.level===this.filter?.parameters?.[1]?.unit)?.key??n.n?.[0]?.key;return r.html`<luzmo-picker
42
- .label=${(0,a.msg)(`Time unit`,{desc:`Aria label for time unit picker`})}
43
- .size=${this.size}
44
- .quiet=${this.quiet}
45
- .readonly=${this.readonly}
46
- .disabled=${this.disabled}
47
- .value=${t}
48
- @change=${this.setUnit}
49
- variant="highlight"
50
- >${e}</luzmo-picker
51
- >`}render(){let e=this.filter?.expression;return[`last_now`,`last_available`,`next_now`,`more_than_ago`,`or_more_ago`].includes(e)?r.html`${this.renderQuantityField()}${this.renderUnitPicker()}`:[`last_completed`,`next_full`].includes(e)?this.renderUnitPicker():this.renderDatePicker()}};e.t([(0,i.property)({type:String,attribute:`content-language`,reflect:!0})],c.prototype,`contentLanguage`,void 0),e.t([(0,i.property)({type:String,attribute:`time-zone`,reflect:!0})],c.prototype,`timeZone`,void 0),e.t([(0,i.property)({type:Object,reflect:!1})],c.prototype,`filter`,void 0),e.t([(0,i.property)({type:Boolean,reflect:!0})],c.prototype,`quiet`,void 0),e.t([(0,i.property)({type:Boolean,reflect:!0})],c.prototype,`readonly`,void 0),e.t([(0,i.property)({type:Boolean,reflect:!0})],c.prototype,`disabled`,void 0),c=e.t([(0,a.localized)()],c),customElements.get(`luzmo-filter-value-picker-datetime`)||customElements.define(`luzmo-filter-value-picker-datetime`,c),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
@@ -1,54 +0,0 @@
1
- /*! * A kit of modern Luzmo Web Components for analytics in your web application.
2
- *
3
- * Copyright © 2026 Luzmo
4
- * All rights reserved.
5
- * Luzmo web components (“Luzmo Web Components”)
6
- * must be used according to the Luzmo Terms of Service.
7
- * This license allows users with a current active Luzmo account
8
- * to use the Luzmo Web Components. This license terminates
9
- * automatically if a user no longer has an active Luzmo account.
10
- * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
11
- *
12
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
- * SOFTWARE.
19
- * */
20
- const e=require("./decorate-DCJt-2rt.cjs"),t=require("./localized-mixin-DiUJOd06.cjs"),n=require("./data-broker-CyMYR6w1.cjs"),r=require("./localize-D3i4Epy_.cjs");require("./utils-SzKvwZ9-.cjs");let i=require("lit"),a=require("lit/decorators.js"),o=require("@lit/localize");require("@luzmo/lucero/select"),require("@luzmo/lucero/text-field");let s=require("@luzmo/lucero/utils");var c=`:host{flex-direction:row;flex-shrink:1;min-width:0;display:flex}luzmo-select,luzmo-text-field{min-width:var(--luzmo-filter-value-picker-hierarchy-control-min-width,var(--filter-value-picker-hierarchy-control-min-width));flex:auto;max-width:100%}.missing-value{color:var(--luzmo-filter-value-picker-hierarchy-missing-value-color,#767676)}:host{--filter-value-picker-hierarchy-control-min-width:0}`,l=5e3,u=class extends t.t((0,s.SizedMixin)(s.LuzmoElement,{validSizes:Object.values(s.ElementSizes)})){constructor(...e){super(...e),this.contentLanguage=`en`,this.quiet=!1,this.readonly=!1,this.disabled=!1,this._hierarchyValues=[],this._retrieving=!1,this._search=``,this._error=null,this._pending=!1,this._allValuesRetrieved=!1,this._hierarchyRequestGeneration=0,this._runningQueries=[]}static get styles(){return[(0,i.unsafeCSS)(c)]}connectedCallback(){super.connectedCallback();let 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),n.t.configure(e)}willUpdate(e){if(super.willUpdate(e),e.has(`filter`)&&this.filter){let t=e.get(`filter`),n=t?.expression,r=t?.parameters?.[0],i=this.filter?.parameters?.[0],a=(r?.columnId||r?.formulaId)!==(this.filter?.parameters?.[0]?.columnId||this.filter?.parameters?.[0]?.formulaId)||r?.datasetId!==i?.datasetId;this.filter?.parameters?.[1]!==this._lastResolvedOutput&&(this._lastResolutionKey=void 0),a&&(this._hierarchyRequestGeneration++,this._pending=!1,this._retrieving=!1),a&&([`? in ?`,`? not in ?`,`? = ?`,`? != ?`].includes(this.filter?.expression)||![`? in ?`,`? not in ?`,`? = ?`,`? != ?`].includes(n))&&(this._hierarchyValues=[],this._allValuesRetrieved=!1),[`? in ?`,`? not in ?`,`? = ?`,`? != ?`].includes(this.filter.expression)&&this._hierarchyValues.length===0&&this._restoreCachedFirstPage()}}updated(e){if(super.updated(e),!e.has(`filter`)||!this.filter)return;let t=e.get(`filter`)?.expression,n=[`? = ?`,`? != ?`].includes(this.filter.expression)&&t!==void 0&&![`? in ?`,`? not in ?`,`? = ?`,`? != ?`].includes(t);n&&this._hierarchyValues.length>0?this._resolveSingleSelectValue():n&&!this._retrieving&&queueMicrotask(()=>{[`? = ?`,`? != ?`].includes(this.filter?.expression)&&this._hierarchyValues.length===0&&!this._retrieving&&this._fetchHierarchyValues(0,!0)})}_buildHierarchyQuery(e=0,t=this._search){let n=this.filter?.parameters?.[0];if(!n?.datasetId||!n.columnId&&!n.formulaId)return null;let r={column_id:n.columnId,formula_id:n.formulaId,dataset_id:n.datasetId},i={dimensions:[r],where:[],order:[{...r,order:`asc`}],limit:{by:l,offset:e}};return t&&i.where.push({expression:`? like ?`,parameters:[r,t]}),i}_getValues(e){return e&&Array.isArray(e.data)?e.data.map(e=>e[0]):[]}_applyHierarchyResult(e,t,n){let r=this._getValues(e);n||(this._allValuesRetrieved=r.length<l),this._hierarchyValues=t>0?[...this._hierarchyValues,...r]:r}_restoreCachedFirstPage(){let e=this._buildHierarchyQuery(0,``);if(!e)return!1;let t=n.t.getCachedData(e);return t?(this._applyHierarchyResult(t,0,``),this._retrieving=!1,this._error=null,!0):!1}_getMemberLabel(e){let t=r.t(e?.name,this.contentLanguage,{allowEmpty:!0});return typeof t==`string`?t:``}_findExactMember(e){return this._hierarchyValues.find(t=>String(t?.id)===e||this._getMemberLabel(t)===e)}_resolveSingleSelectValue(){if(![`? = ?`,`? != ?`].includes(this.filter?.expression)||this._hierarchyValues.length===0)return;let e=this.filter?.parameters?.[1];if(typeof e!=`string`&&typeof e!=`number`)return;let t=String(e),n=this._findExactMember(t),r=t.toLocaleLowerCase(this.contentLanguage),i=n??this._hierarchyValues.find(e=>String(e?.id).toLocaleLowerCase(this.contentLanguage).includes(r)||this._getMemberLabel(e).toLocaleLowerCase(this.contentLanguage).includes(r)),a=(n??i??this._hierarchyValues[0])?.id;if(typeof a!=`string`&&typeof a!=`number`)return;let o=this.filter.parameters[0],s=[o.datasetId,o.columnId??o.formulaId,this.filter.expression,String(e),String(a)].join(`|`);s!==this._lastResolutionKey&&(this._lastResolutionKey=s,this._lastResolvedOutput=a,this._value=a,this.filter={...this.filter,parameters:[{...this.filter.parameters[0]},a]},this._sendChangeEvent())}async _fetchHierarchyValues(e=0,t=!1){let r=this._search;if(!r&&this._allValuesRetrieved){this._retrieving=!1;return}if(e===0&&!r&&(this._restoreCachedFirstPage()||this._hierarchyValues.length>0)){this._retrieving=!1;return}if(!this.filter?.parameters?.[0]){this._retrieving=!1,this._error=`Missing column parameters`;return}let i=this.filter.parameters[0],a=i.columnId,o=i.formulaId,s=i.datasetId;if(!a&&!o){this._retrieving=!1,this._error=`Missing column id or formula id`;return}else if(!s){this._retrieving=!1,this._error=`Missing dataset id`;return}let c=this._buildHierarchyQuery(e,r);if(!c)return;let l=this._hierarchyRequestGeneration;this._pending=t,this._retrieving=!0,this._error=null;let u=new AbortController,d=new Promise((e,t)=>{n.t.fetchData(c).then(e).catch(t),u.signal.addEventListener(`abort`,()=>{console.warn(`Request aborted`),t({status:`aborted`})})}),f={promise:d,abortController:u};this._runningQueries.push(f);try{let n=await d;if(l!==this._hierarchyRequestGeneration)return;this._applyHierarchyResult(n,e,r),t&&!r&&this._resolveSingleSelectValue()}catch(e){if(l!==this._hierarchyRequestGeneration||e?.status===`aborted`)return;this._error=e instanceof Error?e.message:`Unknown error`,this._hierarchyValues=[]}finally{this._runningQueries=this._runningQueries.filter(e=>e.promise!==d),l===this._hierarchyRequestGeneration&&(this._pending=!1,this._retrieving=!1)}}_sendChangeEvent(){this.dispatchEvent(new CustomEvent(`luzmo-filter-value-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{value:this._value}}))}setHierarchy(e){if(this.readonly||this.disabled)return;let t;t=[`? in ?`,`? not in ?`].includes(this.filter?.expression)?e?.detail?.value:[`? = ?`,`? != ?`].includes(this.filter?.expression)?e?.detail?.value?.[0]:e?.target?.value,this._value!==t&&(this._value=t,this.filter={...this.filter,parameters:[{...this.filter?.parameters?.[0]},this._value]},this._sendChangeEvent())}onScrolled(e){!this._retrieving&&!this._allValuesRetrieved&&e?.detail?.last===this._hierarchyValues.length-1&&this._fetchHierarchyValues(this._hierarchyValues.length)}renderTextField(){return i.html`<luzmo-text-field
21
- label=${(0,o.msg)(`Filter value`,{desc:`Label for filter value text field`})}
22
- .size=${this.size}
23
- .quiet=${this.quiet}
24
- .readonly=${this.readonly}
25
- .disabled=${this.disabled}
26
- @change=${this.setHierarchy}
27
- @input=${this.setHierarchy}
28
- .value=${this.filter?.parameters?.[1]??``}
29
- ></luzmo-text-field>`}setSearchString(e){this._search=e?.detail?.string??``,this._allValuesRetrieved||(this._searchQueryTimeout&&(this._runningQueries.forEach(e=>{e?.abortController&&e.abortController.abort()}),this._runningQueries=[],clearTimeout(this._searchQueryTimeout)),this._searchQueryTimeout=setTimeout(()=>{this._fetchHierarchyValues()},500))}resetSearchString(){this._search=``,this._hierarchyRequestGeneration++,this._pending=!1,this._retrieving=!1,this._restoreCachedFirstPage()}onOpened(){this._fetchHierarchyValues()}_getSelectedOptionValue(){let e=this.filter?.parameters?.[1];return typeof e!=`string`&&typeof e!=`number`?e:this._findExactMember(String(e))?.id??e}renderHierarchyPicker(){if(this._error)return i.html`<div class="error" role="alert">Error: ${this._error}</div>`;let e=(this._search?this._hierarchyValues.filter(e=>r.t(e.name,this.contentLanguage,{allowEmpty:!0})?.toLowerCase().includes(this._search.toLowerCase())||e.toString().toLowerCase().includes(this._search.toLowerCase())):this._hierarchyValues).map(e=>{let t=r.t(e?.name,this.contentLanguage)??`N/A`;return typeof t!=`string`&&(t=`N/A`),{value:e?.id,label:t}}),t=this.filter?.expression,n=[`? = ?`,`? != ?`].includes(t),a=(0,o.msg)(`Selected {count} items`),s=(0,o.msg)(`Search`),c=(0,o.msg)(`No data`),l=(0,o.msg)(`No results`),u=(0,o.msg)(`Select...`);return i.html`<luzmo-select
30
- .size=${this.size}
31
- .label=${u}
32
- .retrieving=${this._retrieving}
33
- .pending=${this._pending}
34
- .selects=${n?`single`:`multiple`}
35
- .variant=${n?`highlight`:`checkboxes`}
36
- ?emphasized=${!this.quiet}
37
- .quiet=${this.quiet}
38
- .readonly=${this.readonly}
39
- .disabled=${this.disabled}
40
- no-wrap
41
- ?invalid=${!!this._error}
42
- .multipleLabelTemplate=${a}
43
- .searchLabel=${s}
44
- .noDataLabel=${c}
45
- .noResultsLabel=${l}
46
- @change=${this.setHierarchy}
47
- @luzmo-search=${this.setSearchString}
48
- @luzmo-opened=${this.onOpened}
49
- @luzmo-closed=${this.resetSearchString}
50
- @luzmo-scrolled=${this.onScrolled}
51
- .options=${e}
52
- .value=${n?[this._getSelectedOptionValue()]:this.filter?.parameters?.[1]}
53
- >
54
- </luzmo-select>`}render(){let e=this.filter?.expression;return[`? in ?`,`? not in ?`,`? = ?`,`? != ?`].includes(e)?this.renderHierarchyPicker():this.renderTextField()}};e.t([(0,a.property)({type:String,attribute:`api-url`,reflect:!0})],u.prototype,`apiUrl`,void 0),e.t([(0,a.property)({type:String,attribute:`auth-key`,reflect:!0})],u.prototype,`authKey`,void 0),e.t([(0,a.property)({type:String,attribute:`auth-token`,reflect:!0})],u.prototype,`authToken`,void 0),e.t([(0,a.property)({type:Number,attribute:`cache-time`,reflect:!0})],u.prototype,`cacheTime`,void 0),e.t([(0,a.property)({type:String,attribute:`content-language`,reflect:!0})],u.prototype,`contentLanguage`,void 0),e.t([(0,a.property)({type:Object,reflect:!1})],u.prototype,`filter`,void 0),e.t([(0,a.property)({type:Boolean,reflect:!0})],u.prototype,`quiet`,void 0),e.t([(0,a.property)({type:Boolean,reflect:!0})],u.prototype,`readonly`,void 0),e.t([(0,a.property)({type:Boolean,reflect:!0})],u.prototype,`disabled`,void 0),e.t([(0,a.state)()],u.prototype,`_hierarchyValues`,void 0),e.t([(0,a.state)()],u.prototype,`_retrieving`,void 0),e.t([(0,a.state)()],u.prototype,`_search`,void 0),e.t([(0,a.state)()],u.prototype,`_error`,void 0),e.t([(0,a.state)()],u.prototype,`_pending`,void 0),u=e.t([(0,o.localized)()],u),customElements.get(`luzmo-filter-value-picker-hierarchy`)||customElements.define(`luzmo-filter-value-picker-hierarchy`,u),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return u}});
@@ -1,199 +0,0 @@
1
- /*! * A kit of modern Luzmo Web Components for analytics in your web application.
2
- *
3
- * Copyright © 2026 Luzmo
4
- * All rights reserved.
5
- * Luzmo web components (“Luzmo Web Components”)
6
- * must be used according to the Luzmo Terms of Service.
7
- * This license allows users with a current active Luzmo account
8
- * to use the Luzmo Web Components. This license terminates
9
- * automatically if a user no longer has an active Luzmo account.
10
- * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
11
- *
12
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
- * SOFTWARE.
19
- * */
20
- const e=require("./decorate-DCJt-2rt.cjs"),t=require("./localized-mixin-DiUJOd06.cjs"),n=require("./data-broker-CyMYR6w1.cjs"),r=require("./type-check-BehV9ZL1.cjs"),i=require("./v4-Dyp-SQ1c.cjs"),a=require("./filter-item-CxPrwF-R.cjs");let o=require("@luzmo/icons");require("@luzmo/lucero/button"),require("@luzmo/lucero/icon");let s=require("lit"),c=require("lit/decorators.js"),l=require("@lit/localize");require("@luzmo/lucero/action-button"),require("@luzmo/lucero/tooltip");let u=require("lit/directives/repeat.js");require("@luzmo/lucero/progress-circle");let d=require("@luzmo/lucero/utils");var ee=20,f=class extends Error{constructor(e){super(e),this.name=`FilterUnrepresentableError`}},te=new Set([`and`,`or`]),p=[`datasetId`,`dataset_id`,`columnId`,`column_id`,`formulaId`,`formula_id`,`formula`,`columnExpression`,`value`,`ignoredItemIds`];function m(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function h(e){return!m(e)||e.condition!==void 0&&(typeof e.condition!=`string`||!te.has(e.condition.toLowerCase()))?!1:`filters`in e||`subGroups`in e}function g(e){return m(e)&&`expression`in e&&!(`condition`in e)}function _(e){return p.some(t=>t in e)}function ne(e,t=!1){let n=[e.columnId!==void 0||e.column_id!==void 0,e.formulaId!==void 0||e.formula_id!==void 0,e.formula!==void 0].filter(Boolean).length;return n===1?!0:n>1?!1:e.columnExpression!==void 0||t&&e.expression!==void 0}function v(e){return!g(e)||typeof e.expression!=`string`||e.expression.length===0||`parameters`in e||typeof e.datasetId!=`string`&&typeof e.dataset_id!=`string`?!1:ne(e)}function y(e){return!g(e)||!Array.isArray(e.parameters)?!1:!_(e)}function re(e){if(!(`parameters`in e))return;let t=p.find(t=>t in e);if(t!==void 0)throw new f(`Filter leaf mixes "parameters" with the clean inline key "${t}".`)}function b(e){throw typeof e.expression!=`string`||e.expression.length===0?new f(`Clean filter leaf is missing a non-empty "expression".`):typeof e.datasetId!=`string`&&typeof e.dataset_id!=`string`?new f(`Clean filter leaf "${e.expression}" is missing a "datasetId".`):new f(`Clean filter leaf "${e.expression}" must name exactly one of "columnId", "formulaId", "formula", or "columnExpression".`)}function x(e){return e===`where`||e===`having`}function S(e){if(e>20)throw new f(`Filter nesting exceeds the maximum depth of 20.`)}function ie(e){if(e==null)return`empty`;if(!Array.isArray(e))return`unknown`;if(e.length===0)return`empty`;let t=!1,n=!1,r=!1,i=(e,a)=>{if(a>20){r=!0;return}if(h(e)){x(e.clause)&&(n=!0);let t=[...Array.isArray(e.filters)?e.filters:[],...Array.isArray(e.subGroups)?e.subGroups:[]];for(let e of t)i(e,a+1);return}if(g(e)){`parameters`in e&&_(e)?r=!0:v(e)?n=!0:y(e)?t=!0:r=!0;return}r=!0};for(let t of e)i(t,1);return r?`unknown`:n&&t?`mixed`:n?`clean`:t?`canonical`:`empty`}var C=new Set([`? is null`,`? is not null`]),w=new Set([`? = ?`,`? != ?`,`? < ?`,`? <= ?`,`? > ?`,`? >= ?`]),ae=new Set([`? in ?`,`? not in ?`,`? between ?`]),oe={"array[numeric]":`numeric[]`,"array[hierarchy]":`hierarchy[]`,"array[datetime]":`datetime[]`},T=new Set([`level`,`lowestLevel`,`unnest`,`discretization`,`aggregation`,`index`,`include_nonoccurring`,`simplification`]);function E(e,t){return e!==`lowestLevel`&&!(t===null&&T.has(e))}function D(e){return structuredClone(e)}function O(e){let t=e.datasetId??e.dataset_id;if(typeof t!=`string`||t.length===0)throw new f(`Filter reference is missing a "datasetId".`);return t}function k(e){return m(e)?typeof e.columnId==`string`||typeof e.column_id==`string`||typeof e.formulaId==`string`||typeof e.formula_id==`string`||typeof e.formula==`string`||(typeof e.datasetId==`string`||typeof e.dataset_id==`string`)&&(e.columnExpression!==void 0||e.expression!==void 0):!1}function A(e){let t={type:e.type};return e.bins!==void 0&&(t.bins=e.bins),Array.isArray(e.over)&&(t.over=e.over.map(e=>L(e))),t}function j(e){let t={type:e.type},n=e.datasetId??e.dataset_id,r=e.columnId??e.column_id;return n!==void 0&&(t.datasetId=n),r!==void 0&&(t.columnId=r),e.level!==void 0&&E(`level`,e.level)&&(t.level=e.level),m(e.discretization)&&(t.discretization=A(e.discretization)),e.unnest!==void 0&&E(`unnest`,e.unnest)&&(t.unnest=e.unnest),t}function M(e){let t={type:e.type};return e.bins!==void 0&&(t.bins=e.bins),Array.isArray(e.over)&&(t.over=e.over.map(e=>m(e)?I(e):e)),t}function N(e){let t={type:e.type},n=e.datasetId??e.dataset_id,r=e.columnId??e.column_id;return n!==void 0&&(t.datasetId=n),r!==void 0&&(t.columnId=r),e.level!==void 0&&(t.level=e.level),m(e.discretization)&&(t.discretization=M(e.discretization)),e.unnest!==void 0&&(t.unnest=e.unnest),t}function P(e,t){e.level!==void 0&&(t.level=D(e.level)),m(e.discretization)&&(t.discretization=M(e.discretization)),m(e.aggregation)&&(t.aggregation=N(e.aggregation)),e.unnest!==void 0&&(t.unnest=D(e.unnest))}function F(e,t){let n=e.columnId??e.column_id;if(n!==void 0)return{kind:`columnId`,value:n};let r=e.formulaId??e.formula_id;if(r!==void 0)return{kind:`formulaId`,value:r};if(e.formula!==void 0)return{kind:`formula`,value:e.formula};let i=e.columnExpression??(t?e.expression:void 0);if(i!==void 0)return{kind:`expression`,value:i}}function I(e,t=!0){let n={datasetId:O(e)},r=F(e,t);return r!==void 0&&(r.kind===`expression`?n.expression=r.value:n[r.kind]=r.value),P(e,n),n}function L(e){if(!m(e))throw new f(`Cannot emit a clean filter reference.`);let t={datasetId:O(e)};e.level!==void 0&&E(`level`,e.level)&&(t.level=e.level),m(e.discretization)&&(t.discretization=A(e.discretization)),m(e.aggregation)&&(t.aggregation=j(e.aggregation)),e.unnest!==void 0&&E(`unnest`,e.unnest)&&(t.unnest=e.unnest);let n=F(e,!0);if(n===void 0)throw new f(`Cannot emit a clean filter reference: no column, formula, or expression.`);return n.kind===`expression`?t.columnExpression=n.value:t[n.kind]=n.value,t}function se(e){if(!m(e)||typeof e.parameter!=`string`||typeof e.type!=`string`)return e;let t=oe[e.type];return t===void 0?e:{...e,type:t}}function ce(e,t){return m(t)&&typeof t.parameter==`string`?!0:Array.isArray(t)?e!==`? between ?`||t.length===2:!1}function le(e,t){let n=e.expression,r=[I(e,!1)];if(!C.has(n)&&e.value!==void 0){let t=w.has(n)&&k(e.value);r.push(t?I(e.value):D(e.value))}let i={};typeof e.id==`string`&&(i.id=e.id),`ignoredItemIds`in e&&(i.ignore=D(e.ignoredItemIds)),t!==void 0&&(i.type=t);let a={expression:n,parameters:r};return Object.keys(i).length>0&&(a.properties=i),a}function ue(e){let{expression:t}=e;if(typeof t!=`string`||t.length===0)return null;let n=Array.isArray(e.parameters)?e.parameters:[];if(!m(n[0]))throw new f(`Cannot emit a clean filter reference for "${t}".`);let r={...L(n[0]),expression:t};if(!C.has(t)){let e=n[1];if(e===void 0)throw new f(`Filter "${t}" is missing its value operand.`);if(r.value=k(e)&&w.has(t)?L(e):se(D(e)),ae.has(t)&&!ce(t,r.value))throw new f(`Cannot emit an invalid clean filter value for "${t}".`)}let{properties:i}=e;return i?.id!==void 0&&(r.id=i.id),i!==void 0&&`ignore`in i&&(r.ignoredItemIds=D(i.ignore)),r}function R(e){return h(e)}function z(e){return Array.isArray(e.filters)?e.filters:[]}function B(e,t){return e.properties?.type===`having`||e.properties?.type===`where`?e.properties.type:t??`where`}function V(e,t,n=1,r=new Set){S(n);let i=e.clause??t;for(let t of z(e))R(t)?V(t,i,n+1,r):typeof t.expression==`string`&&t.expression.length>0&&r.add(B(t,i));return r}function H(e,t,n=1){S(n);let r=e.clause??t;if(e.condition===`or`&&V(e,r,n).size>1)throw new f(`An "or" group mixes "where" and "having" filters, which clean output cannot represent.`);for(let t of z(e))R(t)&&H(t,r,n+1)}function U(e,t,n,r=1){S(r);let i=e.clause??n,a=[];for(let n of z(e)){if(R(n)){let e=U(n,t,i,r+1);e.filters.length>0&&a.push(e);continue}if(B(n,i)!==t)continue;let e=ue(n);e&&a.push(e)}let o={condition:e.condition===`or`?`or`:`and`,filters:a};return e.id!==void 0&&V(e,i,r).size<=1&&(o.id=e.id),o}function de(e){let t=e.clause;H(e,t);let n=V(e,t);return n.size===0&&n.add(t??`where`),[`where`,`having`].filter(e=>n.has(e)).map(n=>({...U(e,n,t),clause:n})).filter(e=>e.filters.length>0)}var fe=[`origin`,`datasetId`,`vizId`,`itemId`,`isDrilldown`,`type`];function W(e){return typeof e==`string`&&e.toLowerCase()===`or`?`or`:`and`}function pe(e){return h(e)}function me(e){if(!Array.isArray(e)||e.length===0)return[];let t=m(e[0])?e[0]:void 0,n=e.length>1?e[1]:void 0;return e.length>1?[t,n]:[t]}function he(e){if(typeof e.expression!=`string`||e.expression.length===0)return null;let t={expression:e.expression,parameters:me(e.parameters)};return e.properties!==void 0&&Object.keys(e.properties).length>0&&(t.properties=structuredClone(e.properties)),t}function G(e,t){let n=e,r=t;for(let e of fe)n[e]!==void 0&&(r[e]=n[e])}function K(e){if(!e||!e.filters)return{condition:`and`,filters:[],subGroups:[]};let t=[],n=[];for(let r of e.filters)if(pe(r))n.push(K(r));else{let e=he(r);e&&t.push(e)}let r={condition:W(e.condition),filters:t,subGroups:n};return e.id!==void 0&&(r.id=e.id),G(e,r),r}function q(e,t){return e?t?.format===`clean`?de(e):[K(e)]:[]}function ge(e,t){let n={expression:typeof e.expression==`string`?e.expression:void 0,parameters:Array.isArray(e.parameters)?[...e.parameters]:[]},r=m(e.properties)?structuredClone(e.properties):{};return t!==void 0&&r.type===void 0&&(r.type=t),Object.keys(r).length>0&&(n.properties=r),n}function _e(e,t,n){if(h(e))return J(e,t,n);if(!m(e))return;let r=e.expression;if(re(e),v(e))return le(e,t);if(_(e)&&b(e),y(e))return ge(e,t);throw new f(`Filter leaf "${String(r)}" matches neither a complete clean nor a complete canonical encoding.`)}function J(e,t,n){S(n);let r=x(e.clause)?e.clause:void 0,i=r??t,a=[];for(let t of Array.isArray(e.filters)?e.filters:[]){let e=_e(t,i,n+1);e!==void 0&&a.push(e)}for(let t of Array.isArray(e.subGroups)?e.subGroups:[])h(t)&&a.push(J(t,i,n+1));let o={condition:W(e.condition),filters:a};return typeof e.id==`string`&&(o.id=e.id),r!==void 0&&(o.clause=r),G(e,o),o}function Y(e){return!e||e.length===0?[]:e.filter(e=>h(e)).map(e=>J(e,void 0,1))}var ve=`:host{font-family:var(--luzmo-filters-font-family,var(--luzmo-font-family));color:var(--luzmo-filters-font-color,var(--luzmo-font-color));max-width:100%;display:block;container-type:inline-size}.filter-group-container{max-width:100%;padding:calc(var(--luzmo-indicator-gap) + 2 * var(--luzmo-indicator-width));overflow-x:hidden}.filter-group{flex-direction:row;min-width:0;max-width:100%;display:flex}.filter-group.nested{margin-top:var(--luzmo-filters-nested-group-margin-top,var(--filters-nested-group-margin-top));margin-bottom:var(--luzmo-filters-nested-group-margin-bottom,var(--filters-nested-group-margin-bottom))}.group-content{flex-direction:column;flex:1;min-width:0;display:flex}.filters-list{gap:var(--luzmo-filters-filters-list-gap,var(--filters-filters-list-gap));flex-direction:column;min-width:0;max-width:100%;display:flex}.filter-item-wrapper{align-items:flex-start;min-width:0;max-width:100%;display:flex;position:relative}.filter-item-content{align-items:flex-start;gap:var(--luzmo-filters-filter-line-gap,var(--filters-filter-line-gap));flex-wrap:nowrap;flex:1;min-width:0;display:flex}.filter-item-content luzmo-filter-item{flex:1;min-width:0}.filter-item-content .delete-filter-button{flex-shrink:0;align-self:flex-end;margin-inline-start:auto}.condition-wrapper{flex:0 0 var(--luzmo-filters-condition-warpper-width,var(--filters-condition-warpper-width));justify-content:center;align-items:center;display:flex;position:relative}.condition-wrapper:before{content:"";left:50%;top:var(--luzmo-filters-vertical-line-top,var(--filters-vertical-line-top));bottom:var(--luzmo-filters-vertical-line-bottom,var(--filters-vertical-line-bottom));width:var(--luzmo-filters-vertical-line-width,var(--filters-vertical-line-width));background:var(--luzmo-filters-vertical-line-color,var(--luzmo-border-color));position:absolute}.condition-badge{min-width:auto;padding-inline:var(--luzmo-filters-condition-padding-horizontal,var(--filters-condition-padding-horizontal));font-weight:var(--luzmo-filters-condition-font-weight,var(--filters-condition-font-weight-emphasized));text-transform:uppercase;background:var(--luzmo-filters-condition-badge-background,var(--luzmo-primary));color:var(--luzmo-filters-condition-badge-color,var(--luzmo-primary-inverse-color));border-radius:var(--luzmo-filters-condition-badge-border-radius,var(--luzmo-border-radius));box-shadow:0 0 0 var(--luzmo-filters-condition-badge-halo,var(--filters-condition-badge-halo)) var(--luzmo-filters-condition-badge-background,var(--luzmo-background-color))}.condition-badge:hover{background:var(--luzmo-filters-condition-badge-background-hover,var(--luzmo-primary-hover))}.group-actions{margin-top:var(--luzmo-filters-group-actions-margin-top,var(--filters-group-actions-margin-top));gap:var(--luzmo-filters-group-actions-gap,var(--filters-group-actions-gap));flex-wrap:wrap;display:flex}.delete-group-button{margin-left:auto}.add-root-group-container{margin-top:var(--luzmo-filters-add-root-group-container-margin-top,var(--filters-add-root-group-container-margin-top));padding-left:0}.add-subgroup-button,.add-filter-button{--luzmo-action-button-text-to-visual:var(--luzmo-filters-group-actions-text-to-visual,var(--filters-group-actions-text-to-visual));--luzmo-action-button-content-color-default:var(--luzmo-filters-group-actions-color,var(--luzmo-primary-hover));--luzmo-action-button-content-color-hover:var(--luzmo-filters-group-actions-color-hover,var(--luzmo-primary-hover));--luzmo-action-button-content-color-down:var(--luzmo-filters-group-actions-color-down,var(--luzmo-primary-down));--luzmo-action-button-content-color-focus:var(--luzmo-filters-group-actions-color-focus,var(--luzmo-primary-focus))}.add-group-button{--luzmo-button-padding-label-to-icon:var(--luzmo-filters-add-group-button-text-to-visual,var(--filters-add-group-button-text-to-visual))}.dataset-ids-empty-message{color:var(--luzmo-filters-error-message-color,var(--luzmo-disabled-color));font-size:var(--luzmo-filters-error-message-font-size,var(--filters-font-size))}@container (width<=480px){.condition-badge{--luzmo-action-button-font-size:.6875rem;--luzmo-action-button-height:1.2rem;--luzmo-button-line-height:1.2rem;font-size:.6875rem;line-height:1.2rem;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)rotate(-90deg)}:host([dir=rtl]) .condition-badge{transform:translate(-50%,-50%)rotate(90deg)}}.filters-loading{min-height:var(--filters-progress-circle-size);align-items:center;display:inline-flex}.filters-loading luzmo-progress-circle{--luzmo-progress-circle-size:var(--filters-progress-circle-size)}.filters-text,.filters-outline{font-size:var(--luzmo-filters-text-font-size,var(--filters-text-font-size));line-height:1.5}.filters-outline{--filters-outline-sentence-padding-block:calc((var(--filters-outline-row-min-height) - 1lh) / 2)}luzmo-filter-item[display=text]{--luzmo-filter-item-column-badge-color:var(--luzmo-filters-column-badge-color);--luzmo-filter-item-column-badge-font-color:var(--luzmo-filters-column-badge-font-color);--luzmo-filter-item-text-font-size:var(--luzmo-filters-text-font-size,var(--filters-text-font-size));--luzmo-filter-item-text-expression-color:var(--luzmo-filters-expression-color,var(--filters-expression-color));--luzmo-filter-item-text-expression-font-weight:var(--luzmo-filters-expression-font-weight,var(--filters-expression-font-weight))}.filters-text luzmo-filter-item[display=text],.filters-text-group luzmo-filter-item[display=text]{--luzmo-filter-item-text-icon-gap:var(--luzmo-filters-text-icon-gap,var(--filters-text-icon-gap))}.outline-sentence>luzmo-filter-item[display=text]{--luzmo-filter-item-text-icon-gap:var(--luzmo-filters-text-part-gap,var(--filters-text-part-gap))}.filters-text{white-space:pre-wrap;word-break:break-word}.filters-text .filters-text-condition{margin-inline:0}.filters-text-condition,.filters-text-paren{vertical-align:middle}.filters-text-condition{color:var(--luzmo-filters-condition-color,var(--filters-condition-color));font-weight:var(--luzmo-filters-condition-font-weight,var(--filters-condition-font-weight))}.outline-group{gap:var(--luzmo-spacing-1);flex-direction:column;min-width:0;display:flex}.outline-children>.outline-group:not(:first-child){margin-top:calc(var(--luzmo-spacing-1) + var(--filters-outline-sentence-padding-block) + var(--filters-outline-join-spacing) - var(--luzmo-spacing-2))}.outline-condition{color:var(--luzmo-filters-condition-color,var(--filters-condition-color));font-size:var(--luzmo-filters-outline-condition-font-size,var(--filters-outline-condition-font-size));font-weight:var(--luzmo-filters-condition-font-weight,var(--filters-condition-font-weight-emphasized));letter-spacing:.04em}.outline-children{gap:var(--luzmo-spacing-2);min-width:0;flex-direction:column;margin-inline-start:var(--luzmo-filters-outline-children-margin-inline-start,var(--filters-outline-children-margin-inline-start));padding-inline-start:var(--luzmo-filters-outline-children-padding-inline-start,var(--filters-outline-children-padding-inline-start));display:flex;position:relative}.outline-children:not(.outline-children--single):before{content:"";inset-inline-start:0;inset-block:var(--luzmo-filters-outline-bracket-inset,var(--filters-outline-bracket-inset));width:var(--luzmo-spacing-2);border-inline-start:1px solid var(--luzmo-border-color);border-block-start:1px solid var(--luzmo-border-color);border-block-end:1px solid var(--luzmo-border-color);border-start-start-radius:var(--luzmo-border-radius);border-end-start-radius:var(--luzmo-border-radius);position:absolute}.outline-children--single{margin-inline-start:0;padding-inline-start:0}.outline-row{align-items:flex-start;column-gap:var(--luzmo-spacing-2);min-width:0;min-height:var(--filters-outline-row-min-height);flex-wrap:nowrap;display:flex}.outline-sentence{align-items:center;gap:var(--luzmo-filters-text-part-gap,var(--filters-text-part-gap));min-width:0;padding-block:var(--filters-outline-sentence-padding-block);flex-wrap:wrap;flex:auto;display:flex}.outline-delete{flex:none;align-self:flex-end;margin-inline-start:auto}:host{--filters-condition-warpper-width:56px;--filters-condition-padding-horizontal:var(--luzmo-spacing-2);--filters-condition-badge-halo:var(--luzmo-spacing-3);--filters-filters-list-gap:var(--luzmo-spacing-3);--filters-nested-group-margin-top:var(--luzmo-spacing-3);--filters-nested-group-margin-bottom:var(--luzmo-spacing-3);--filters-vertical-line-top:var(--luzmo-spacing-2);--filters-vertical-line-bottom:var(--luzmo-spacing-2);--filters-vertical-line-width:1px;--filters-group-actions-text-to-visual:var(--luzmo-spacing-2);--filters-add-group-button-text-to-visual:var(--luzmo-spacing-3);--filters-group-actions-gap:var(--luzmo-spacing-3);--filters-add-root-group-container-margin-top:var(--luzmo-spacing-4);--filters-filter-line-gap:var(--luzmo-spacing-3);--filters-group-actions-margin-top:var(--luzmo-spacing-3);--filters-error-message-font-size:var(--luzmo-font-size);--filters-text-font-size:var(--luzmo-font-size-m);--filters-outline-row-min-height:var(--luzmo-component-height);--filters-progress-circle-size:var(--luzmo-component-height);--filters-text-part-gap:var(--luzmo-spacing-2);--filters-text-icon-gap:var(--luzmo-spacing-1);--filters-outline-children-margin-inline-start:var(--luzmo-spacing-2);--filters-outline-children-padding-inline-start:var(--luzmo-spacing-3);--filters-outline-bracket-inset:var(--luzmo-spacing-2);--filters-outline-join-spacing:var(--luzmo-spacing-2);--filters-expression-color:var(--luzmo-filters-font-color,var(--luzmo-font-color));--filters-expression-font-weight:var(--luzmo-font-weight);--filters-condition-color:var(--luzmo-filters-font-color,var(--luzmo-font-color));--filters-condition-font-weight:var(--luzmo-font-weight);--filters-condition-font-weight-emphasized:var(--luzmo-font-weight-bold);--filters-outline-condition-font-size:var(--luzmo-font-size-s)}:host([size=s]){--filters-condition-warpper-width:48px;--filters-condition-padding-horizontal:var(--luzmo-spacing-2);--filters-condition-badge-halo:var(--luzmo-spacing-2);--filters-filters-list-gap:calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1));--filters-nested-group-margin-top:calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1));--filters-nested-group-margin-bottom:calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1));--filters-vertical-line-top:var(--luzmo-spacing-2);--filters-vertical-line-bottom:var(--luzmo-spacing-2);--filters-group-actions-text-to-visual:var(--luzmo-spacing-1);--filters-add-group-button-text-to-visual:var(--luzmo-spacing-2);--filters-group-actions-gap:var(--luzmo-spacing-2);--filters-add-root-group-container-margin-top:var(--luzmo-spacing-3);--filters-filter-line-gap:var(--luzmo-spacing-2);--filters-group-actions-margin-top:var(--luzmo-spacing-2);--filters-error-message-font-size:var(--luzmo-font-size-s);--filters-text-font-size:var(--luzmo-font-size-s);--filters-outline-row-min-height:var(--luzmo-component-height-s);--filters-progress-circle-size:var(--luzmo-component-height-s);--filters-text-part-gap:var(--luzmo-spacing-1);--filters-text-icon-gap:var(--luzmo-spacing-1);--filters-outline-children-margin-inline-start:var(--luzmo-spacing-1);--filters-outline-children-padding-inline-start:var(--luzmo-spacing-3);--filters-outline-bracket-inset:var(--luzmo-spacing-1);--filters-outline-join-spacing:var(--luzmo-spacing-1);--filters-outline-condition-font-size:var(--luzmo-font-size-xs)}:host([size=l]){--filters-condition-warpper-width:64px;--filters-condition-padding-horizontal:var(--luzmo-spacing-3);--filters-condition-badge-halo:var(--luzmo-spacing-4);--filters-filters-list-gap:var(--luzmo-spacing-4);--filters-nested-group-margin-top:var(--luzmo-spacing-4);--filters-nested-group-margin-bottom:var(--luzmo-spacing-4);--filters-vertical-line-top:var(--luzmo-spacing-3);--filters-vertical-line-bottom:var(--luzmo-spacing-3);--filters-group-actions-text-to-visual:var(--luzmo-spacing-2);--filters-add-group-button-text-to-visual:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--filters-group-actions-gap:var(--luzmo-spacing-3);--filters-add-root-group-container-margin-top:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--filters-filter-line-gap:var(--luzmo-spacing-3);--filters-group-actions-margin-top:var(--luzmo-spacing-3);--filters-error-message-font-size:var(--luzmo-font-size-l);--filters-text-font-size:var(--luzmo-font-size-l);--filters-outline-row-min-height:var(--luzmo-component-height-l);--filters-progress-circle-size:var(--luzmo-component-height-l);--filters-text-part-gap:var(--luzmo-spacing-3);--filters-text-icon-gap:var(--luzmo-spacing-2);--filters-outline-children-margin-inline-start:var(--luzmo-spacing-3);--filters-outline-children-padding-inline-start:var(--luzmo-spacing-4);--filters-outline-bracket-inset:var(--luzmo-spacing-2);--filters-outline-join-spacing:var(--luzmo-spacing-3);--filters-outline-condition-font-size:var(--luzmo-font-size-m)}:host([size=xl]){--filters-condition-warpper-width:72px;--filters-condition-padding-horizontal:var(--luzmo-spacing-3);--filters-condition-badge-halo:var(--luzmo-spacing-4);--filters-filters-list-gap:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--filters-nested-group-margin-top:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--filters-nested-group-margin-bottom:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--filters-vertical-line-top:var(--luzmo-spacing-3);--filters-vertical-line-bottom:var(--luzmo-spacing-3);--filters-group-actions-text-to-visual:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--filters-add-group-button-text-to-visual:var(--luzmo-spacing-4);--filters-group-actions-gap:var(--luzmo-spacing-4);--filters-add-root-group-container-margin-top:var(--luzmo-spacing-5);--filters-filter-line-gap:var(--luzmo-spacing-4);--filters-group-actions-margin-top:var(--luzmo-spacing-4);--filters-error-message-font-size:var(--luzmo-font-size-xl);--filters-text-font-size:var(--luzmo-font-size-xl);--filters-outline-row-min-height:var(--luzmo-component-height-xl);--filters-progress-circle-size:var(--luzmo-component-height-xl);--filters-text-part-gap:var(--luzmo-spacing-4);--filters-text-icon-gap:var(--luzmo-spacing-2);--filters-outline-children-margin-inline-start:var(--luzmo-spacing-4);--filters-outline-children-padding-inline-start:var(--luzmo-spacing-5);--filters-outline-bracket-inset:var(--luzmo-spacing-3);--filters-outline-join-spacing:var(--luzmo-spacing-3);--filters-outline-condition-font-size:var(--luzmo-font-size-l)}@container (width<=480px){.filter-group-container{--filters-condition-warpper-width:32px;--filters-condition-padding-horizontal:var(--luzmo-spacing-2);--filters-condition-badge-halo:var(--luzmo-spacing-2);--filters-filters-list-gap:var(--luzmo-spacing-5)}}`;function X(e){if(e instanceof f)return e;throw e}var Z={and:()=>(0,l.msg)(`AND`,{desc:`Logical AND condition for combining filters`}),or:()=>(0,l.msg)(`OR`,{desc:`Logical OR condition for combining filters`})};function Q(e){return e===`and`?`or`:`and`}var $=class extends t.t((0,d.SizedMixin)(d.LuzmoElement,{validSizes:Object.values(d.ElementSizes)})){constructor(...e){super(...e),this.apiUrl=`https://api.luzmo.com`,this.contentLanguage=`en`,this.filters=[],this.format=`canonical`,this.display=`rich`,this.columnDisplay=`text`,this.quiet=!1,this.readonly=!1,this.allowParameters=!1,this.parameters=[],this.debounce=300,this._internalFilterGroup=null,this._datasets=[],this._datasetsLoading=!1,this._hierarchyLabels=new Map,this._hierarchyLabelsLoading=!1,this._hasSyntheticRoot=!1,this._datasetRequest=0,this._hierarchyRequest=0,this._debounceTimeout=null}static get styles(){return[(0,s.unsafeCSS)(ve)]}get _oneSizeSmaller(){return{xxs:`xxs`,xs:`xs`,s:`xs`,m:`s`,l:`m`,xl:`l`,xxl:`xl`}[this.size]||`s`}get _isDatasetIdsEmpty(){return!this.datasetIds||this.datasetIds.length===0}connectedCallback(){super.connectedCallback(),this.hasUpdated&&this.display!==`rich`&&this._loadDatasetsForDisplay()}disconnectedCallback(){super.disconnectedCallback(),this._datasetRequest+=1,this._hierarchyRequest+=1,this._debounceTimeout&&=(clearTimeout(this._debounceTimeout),null)}willUpdate(e){if(super.willUpdate(e),e.has(`filters`))try{let e=Y(this.filters);e.length===0?(this._internalFilterGroup=null,this._hasSyntheticRoot=!1):e.length===1?(this._internalFilterGroup=structuredClone(e[0]),this._hasSyntheticRoot=!1):(this._internalFilterGroup={condition:`and`,filters:structuredClone(e)},this._hasSyntheticRoot=!0)}catch(t){console.warn(`[${this.localName}] Keeping the current filters, the new value cannot be normalized:`,X(t)),this.filters=e.get(`filters`)??[]}this.display!==`rich`&&(e.has(`display`)||e.has(`datasetIds`)||e.has(`authKey`)||e.has(`authToken`)||e.has(`apiUrl`)||e.has(`cacheTime`))&&this._loadDatasetsForDisplay(),this.display!==`rich`&&(e.has(`filters`)||e.has(`display`)||e.has(`contentLanguage`))&&this._loadHierarchyLabelsForDisplay()}async _loadDatasetsForDisplay(){let e=++this._datasetRequest;if(!this.datasetIds||this.datasetIds.length===0){this._datasets=[],this._datasetsLoading=!1,this._loadHierarchyLabelsForDisplay();return}let{valid:t,invalid:i}=r.c(this.datasetIds);if(i.length>0&&console.warn(`[${this.localName}] Invalid dataset IDs provided (not valid UUIDs): ${i.join(`, `)}. These will be skipped.`),t.length===0){this._datasets=[],this._datasetsLoading=!1,this._loadHierarchyLabelsForDisplay();return}this._datasetsLoading=!0,this._configureDataBroker();try{let r=await n.t.fetchDatasetsWithColumnsAndFormulas(t);if(!this.isConnected||e!==this._datasetRequest)return;this._datasets=r}catch(t){if(!this.isConnected||e!==this._datasetRequest)return;console.error(`[${this.localName}] Error fetching dataset columns & formulas:`,t),this._datasets=[]}finally{this.isConnected&&e===this._datasetRequest&&(this._datasetsLoading=!1,this._loadHierarchyLabelsForDisplay())}}_configureDataBroker(){let e={authKey:this.authKey||``,authToken:this.authToken||``};this.apiUrl&&(e.apiUrl=this.apiUrl),this.cacheTime&&(e.staleTime=this.cacheTime,e.gcTime=this.cacheTime*2),n.t.configure(e)}async _loadHierarchyLabelsForDisplay(){let e=++this._hierarchyRequest;if(this.display===`rich`||!this._internalFilterGroup){if(!this.isConnected||e!==this._hierarchyRequest)return;this._hierarchyLabels=new Map,this._hierarchyLabelsLoading=!1;return}let t=a.n(this._internalFilterGroup,this._filterTextContext());if(t.length===0){if(!this.isConnected||e!==this._hierarchyRequest)return;this._hierarchyLabels=new Map,this._hierarchyLabelsLoading=!1;return}this._hierarchyLabelsLoading=!0,this._configureDataBroker();try{let n=await a.i(t,this.contentLanguage);if(!this.isConnected||e!==this._hierarchyRequest)return;this._hierarchyLabels=n}catch(t){if(!this.isConnected||e!==this._hierarchyRequest)return;console.error(`[${this.localName}] Error fetching hierarchy member names:`,t)}finally{this.isConnected&&e===this._hierarchyRequest&&(this._hierarchyLabelsLoading=!1)}}_filterTextContext(){return{datasets:this._datasets,contentLanguage:this.contentLanguage,timeZone:this.timeZone,hierarchyLabels:this._hierarchyLabels,hierarchyLabelsLoading:this._hierarchyLabelsLoading}}_generateEmptyGroup(){return{id:i.t(),condition:`and`,filters:[]}}_generateEmptyFilter(){return{expression:void 0,parameters:[],properties:{id:i.t()}}}_rootGroupsForExport(){if(!this._internalFilterGroup)return[];let e=this._internalFilterGroup.filters.length>0&&this._internalFilterGroup.filters.every(e=>this._isGroup(e));return this._hasSyntheticRoot&&e?structuredClone(this._internalFilterGroup.filters):[structuredClone(this._internalFilterGroup)]}_getFiltersForExport(){let e=this._rootGroupsForExport(),t=this.format===`clean`?`clean`:`canonical`;if(e.length===0)return{filters:[],format:t};if(t===`clean`)try{return{filters:e.flatMap(e=>q(e,{format:`clean`})),format:`clean`}}catch(e){console.warn(`[${this.localName}] Cannot emit clean filters, falling back to canonical output:`,X(e))}return{filters:e.flatMap(e=>q(e)),format:`canonical`}}_sendChangeEvent(){this._debounceTimeout&&clearTimeout(this._debounceTimeout);let e=()=>{this.dispatchEvent(new CustomEvent(`luzmo-filters-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:this._getFiltersForExport()}))};this.debounce>0?this._debounceTimeout=setTimeout(e,this.debounce):e()}_isGroup(e){return`condition`in e&&`filters`in e}_handleParameterCreated(e){let t=e.detail?.parameter;this.readonly||!t||this.parameters.some(({parameter:e})=>e===t.parameter)||(this.parameters=[...this.parameters,t])}_toggleCondition(e){this.readonly||(e.condition=Q(e.condition),e===this._internalFilterGroup&&(this._hasSyntheticRoot=!1),this.requestUpdate(),this._sendChangeEvent())}_addFilter(e){if(this.readonly||this._isDatasetIdsEmpty)return;let t=e;t||=(this._internalFilterGroup||=this._generateEmptyGroup(),this._internalFilterGroup),t.filters.push(this._generateEmptyFilter()),this.requestUpdate(),this._sendChangeEvent()}_addSubGroup(e){if(this.readonly||this._isDatasetIdsEmpty)return;let t=this._generateEmptyGroup();t.condition=Q(e.condition),t.filters.push(this._generateEmptyFilter()),e.filters.push(t),this.requestUpdate(),this._sendChangeEvent()}_removeFilter(e,t){if(!(this.readonly||!this._internalFilterGroup)){if(e.filters.splice(t,1),e!==this._internalFilterGroup&&e.filters.length===0){let t=this._findParentGroup(this._internalFilterGroup,e);if(t){let n=t.filters.indexOf(e);n!==-1&&t.filters.splice(n,1)}}this._collapseGroupsAfterDelete(),this.requestUpdate(),this._sendChangeEvent()}}_updateFilter(e,t,n){n.stopPropagation(),!this.readonly&&(this._isGroup(e.filters[t])||(e.filters[t]=n.detail.filter,this._sendChangeEvent()))}_addGroup(){if(this.readonly||this._isDatasetIdsEmpty)return;this._internalFilterGroup||=this._generateEmptyGroup();let e=this._generateEmptyGroup();e.condition=Q(this._internalFilterGroup.condition),e.filters.push(this._internalFilterGroup);let t=this._generateEmptyGroup();t.condition=Q(e.condition),t.filters.push(this._generateEmptyFilter()),e.filters.push(t),this._internalFilterGroup=e,this._hasSyntheticRoot=!1,this.requestUpdate(),this._sendChangeEvent()}_renderFilterItem(e,t,n){return s.html`
21
- <div class="filter-item-wrapper">
22
- <div class="filter-item-content">
23
- <luzmo-filter-item
24
- .apiUrl=${this.apiUrl}
25
- .authKey=${this.authKey}
26
- .authToken=${this.authToken}
27
- .cacheTime=${this.cacheTime}
28
- .language=${this.language}
29
- .contentLanguage=${this.contentLanguage}
30
- .timeZone=${this.timeZone}
31
- .datasetIds=${this.datasetIds}
32
- .filter=${e}
33
- .allowParameters=${this.allowParameters}
34
- .parameters=${this.parameters}
35
- .size=${this.size}
36
- .quiet=${this.quiet}
37
- .readonly=${this.readonly}
38
- @luzmo-filter-changed=${this._updateFilter.bind(this,t,n)}
39
- @luzmo-parameter-created=${this._handleParameterCreated}
40
- ></luzmo-filter-item>
41
- <luzmo-action-button
42
- class="delete-filter-button"
43
- .size=${this.size}
44
- quiet
45
- aria-disabled=${this.readonly?`true`:s.nothing}
46
- .label=${(0,l.msg)(`Remove filter`,{desc:`Aria label for remove filter button`})}
47
- @click=${this._removeFilter.bind(this,t,n)}
48
- >
49
- <luzmo-icon slot="icon" .icon=${o.luzmoTrashOutline} .size=${this.size}></luzmo-icon>
50
- </luzmo-action-button>
51
- </div>
52
- </div>
53
- `}_renderGroup(e,t=!1){let n=e.filters.length>0,r=e.filters.length>1,i=Z[e.condition]?.()??e.condition;return s.html`
54
- <div class="filter-group ${t?`nested`:``}" role="group">
55
- ${t?s.html`
56
- <div class="condition-wrapper">
57
- ${r?s.html`
58
- <luzmo-action-button
59
- class="condition-badge"
60
- .size=${this._oneSizeSmaller}
61
- quiet
62
- aria-disabled=${this.readonly?`true`:s.nothing}
63
- aria-pressed=${e.condition===`and`?`true`:`false`}
64
- .label=${(0,l.msg)(`Toggle filter condition, currently `,{desc:`Aria label prefix for filter condition toggle`})+i}
65
- @click=${this._toggleCondition.bind(this,e)}
66
- >
67
- ${i}
68
- </luzmo-action-button>
69
- `:``}
70
- </div>
71
- `:r?s.html`
72
- <div class="condition-wrapper">
73
- <luzmo-action-button
74
- class="condition-badge"
75
- .size=${this._oneSizeSmaller}
76
- quiet
77
- aria-disabled=${this.readonly?`true`:s.nothing}
78
- aria-pressed=${e.condition===`and`?`true`:`false`}
79
- .label=${(0,l.msg)(`Toggle filter condition, currently `,{desc:`Aria label prefix for filter condition toggle`})+i}
80
- @click=${this._toggleCondition.bind(this,e)}
81
- >
82
- ${i}
83
- </luzmo-action-button>
84
- </div>
85
- `:``}
86
- <div class="group-content">
87
- ${n?s.html`
88
- <div class="filters-list">
89
- ${(0,u.repeat)(e.filters,(e,t)=>t,(t,n)=>s.html`
90
- ${this._isGroup(t)?this._renderGroup(t,!0):this._renderFilterItem(t,e,n)}
91
- `)}
92
- </div>
93
- `:``}
94
-
95
- <div class="group-actions">
96
- <luzmo-action-button
97
- class="add-filter-button"
98
- .size=${this.size}
99
- quiet
100
- aria-disabled=${this.readonly?`true`:s.nothing}
101
- ?disabled=${this._isDatasetIdsEmpty}
102
- @click=${this._addFilter.bind(this,e)}
103
- >
104
- <luzmo-icon slot="icon" .icon=${o.luzmoPlus} .size=${this._oneSizeSmaller}></luzmo-icon>
105
- ${(0,l.msg)(`Filter`,{desc:`Add filter button label`})}
106
- </luzmo-action-button>
107
-
108
- <luzmo-action-button
109
- class="add-subgroup-button"
110
- .size=${this.size}
111
- quiet
112
- aria-disabled=${this.readonly?`true`:s.nothing}
113
- ?disabled=${this._isDatasetIdsEmpty}
114
- @click=${this._addSubGroup.bind(this,e)}
115
- >
116
- <luzmo-icon slot="icon" .icon=${o.luzmoPlus} .size=${this._oneSizeSmaller}></luzmo-icon>
117
- ${(0,l.msg)(`Subgroup`,{desc:`Add subgroup button label`})}
118
- </luzmo-action-button>
119
- </div>
120
- </div>
121
- </div>
122
- `}_findParentGroup(e,t){for(let n of e.filters){if(n===t)return e;if(this._isGroup(n)){let e=this._findParentGroup(n,t);if(e)return e}}return null}_collapseIfNeeded(e){if(e.filters.length===1&&this._isGroup(e.filters[0])){let t=e.filters[0];e.condition=t.condition,e.filters=t.filters,e.id=t.id,e.clause=t.clause,e.origin=t.origin,e.datasetId=t.datasetId,e.vizId=t.vizId,e.itemId=t.itemId,e.isDrilldown=t.isDrilldown,e.type=t.type,e===this._internalFilterGroup&&(this._hasSyntheticRoot=!1)}}_collapseGroupsAfterDelete(){if(!this._internalFilterGroup)return;let e=t=>{for(let n of t.filters)this._isGroup(n)&&e(n);this._collapseIfNeeded(t)};e(this._internalFilterGroup)}_renderTextLeaf(e){return a.r(e,this._filterTextContext())?s.html`<luzmo-filter-item
123
- class="filters-text-leaf"
124
- display="text"
125
- .columnDisplay=${this.columnDisplay}
126
- .filter=${e}
127
- .textContext=${this._filterTextContext()}
128
- .language=${this.language}
129
- .contentLanguage=${this.contentLanguage}
130
- .timeZone=${this.timeZone}
131
- .size=${this.size}
132
- readonly
133
- ></luzmo-filter-item>`:s.nothing}_renderTextGroup(e,t){let n=[];for(let t of e.filters){let e=this._isGroup(t)?this._renderTextGroup(t,!1):this._renderTextLeaf(t);e!==s.nothing&&n.push(e)}if(n.length===0)return s.nothing;if(n.length===1)return n[0];let r=s.html`<span class="filters-text-condition">${Z[e.condition]()}</span>`,i=e.condition===`or`?(0,l.msg)(l.str`${a.a[0]}\u2063 ${a.a[1]}\u2063 ${a.a[2]}`,{id:`filters-sentence-or`,desc:`Left filter sentence, logical OR condition, and right filter sentence`}):(0,l.msg)(l.str`${a.a[0]}\u2063 ${a.a[1]}\u2063 ${a.a[2]}`,{id:`filters-sentence-and`,desc:`Left filter sentence, logical AND condition, and right filter sentence`}),o=n.slice(1).reduce((e,t)=>a.o(i,[s.html`${e}`,r,t]),[n[0]]);return t?s.html`${o}`:s.html`<span class="filters-text-group"
134
- >${a.o((0,l.msg)(l.str`(${a.a[0]})`,{id:`filters-sentence-parentheses`,desc:`Nested filter sentence wrapped in parentheses`}),[s.html`${o}`]).map(e=>typeof e==`string`?s.html`<span class="filters-text-paren">${e}</span>`:e)}</span
135
- >`}_renderDatasetLoading(){return s.html`<div class="filters-loading" role="status">
136
- <luzmo-progress-circle indeterminate .label=${(0,l.msg)(`Loading filters`,{desc:`Accessible label while filter column names are loading`})} .size=${this.size}></luzmo-progress-circle>
137
- </div>`}_renderTextDisplay(){return s.html`<span class="filters-text" part="filters-text"
138
- >${this._internalFilterGroup?this._renderTextGroup(this._internalFilterGroup,!0):s.nothing}</span
139
- >`}_deleteOutlineFilter(e,t){this.readonly||this.display!==`outline`||this._removeFilter(e,t)}_renderOutlineRow(e,t,n){let r=this._renderTextLeaf(e);if(r===s.nothing)return s.nothing;let i=(0,l.msg)(`Remove filter`,{desc:`Aria label for remove filter button`});return s.html`<div class="outline-row" part="filters-outline-row">
140
- <span class="outline-sentence">${r}</span>
141
- ${this.readonly?s.nothing:s.html`<luzmo-action-button
142
- class="delete-filter-button outline-delete"
143
- .size=${this.size}
144
- quiet
145
- .label=${i}
146
- @click=${()=>this._deleteOutlineFilter(t,n)}
147
- >
148
- <luzmo-icon slot="icon" .icon=${o.luzmoTrashOutline} .size=${this.size}></luzmo-icon>
149
- </luzmo-action-button>`}
150
- </div>`}_renderOutlineGroup(e,t=!0){let n=e.filters.some(e=>this._isGroup(e)),r=e.filters.length>1&&!(t&&!n&&e.condition===`and`),i=Z[e.condition]?.()??e.condition;return s.html`<div class="outline-group" role=${r?`group`:s.nothing} aria-label=${r?i:s.nothing}>
151
- ${r?s.html`<div class="outline-condition">${i}</div>`:s.nothing}
152
- <div class=${r?`outline-children`:`outline-children outline-children--single`}>
153
- ${e.filters.map((t,n)=>this._isGroup(t)?this._renderOutlineGroup(t,!1):this._renderOutlineRow(t,e,n))}
154
- </div>
155
- </div>`}_renderOutlineDisplay(){return s.html`<div class="filters-outline" part="filters-outline">
156
- ${this._internalFilterGroup?this._renderOutlineGroup(this._internalFilterGroup):s.nothing}
157
- </div>`}render(){if(this.display===`text`||this.display===`outline`)return this._datasetsLoading&&this._datasets.length===0?this._renderDatasetLoading():this.display===`text`?this._renderTextDisplay():this._renderOutlineDisplay();if(this._isDatasetIdsEmpty)return s.html`
158
- <div class="filter-group-container">
159
- <div class="dataset-ids-empty-message" role="status">
160
- ${(0,l.msg)(`Cannot retrieve dataset data fields`,{desc:`Error message when datasetIds is empty`})}
161
- </div>
162
- </div>
163
- `;if(!this._internalFilterGroup||this._internalFilterGroup.filters.length===0)return s.html`
164
- <div class="filter-group-container">
165
- <luzmo-button
166
- class="add-filter-button"
167
- .size=${this.size}
168
- treatment="outline"
169
- ?quiet=${this.quiet}
170
- aria-disabled=${this.readonly?`true`:s.nothing}
171
- ?disabled=${this._isDatasetIdsEmpty}
172
- @click=${()=>this._addFilter()}
173
- >
174
- <luzmo-icon slot="icon" .icon=${o.luzmoPlus} .size=${this._oneSizeSmaller}></luzmo-icon>
175
- ${(0,l.msg)(`Add filter`,{desc:`Add filter button label`})}
176
- </luzmo-button>
177
- </div>
178
- `;let e=this._internalFilterGroup.filters.length>1;return s.html`
179
- <div class="filter-group-container">
180
- ${this._renderGroup(this._internalFilterGroup)}
181
-
182
- ${e?s.html`
183
- <div class="add-root-group-container">
184
- <luzmo-button
185
- class="add-group-button"
186
- .size=${this.size}
187
- treatment="outline"
188
- ?quiet=${this.quiet}
189
- aria-disabled=${this.readonly?`true`:s.nothing}
190
- ?disabled=${this._isDatasetIdsEmpty}
191
- @click=${this._addGroup}
192
- >
193
- <luzmo-icon slot="icon" .icon=${o.luzmoPlus} .size=${this._oneSizeSmaller}></luzmo-icon>
194
- ${(0,l.msg)(`Group`,{desc:`Add group button label`})}
195
- </luzmo-button>
196
- </div>
197
- `:``}
198
- </div>
199
- `}};e.t([(0,c.property)({type:String,attribute:`api-url`,reflect:!0})],$.prototype,`apiUrl`,void 0),e.t([(0,c.property)({type:String,attribute:`auth-key`,reflect:!0})],$.prototype,`authKey`,void 0),e.t([(0,c.property)({type:String,attribute:`auth-token`,reflect:!0})],$.prototype,`authToken`,void 0),e.t([(0,c.property)({type:Number,attribute:`cache-time`,reflect:!0})],$.prototype,`cacheTime`,void 0),e.t([(0,c.property)({type:String,attribute:`content-language`,reflect:!0})],$.prototype,`contentLanguage`,void 0),e.t([(0,c.property)({type:String,attribute:`time-zone`,reflect:!0})],$.prototype,`timeZone`,void 0),e.t([(0,c.property)({type:Array,attribute:`dataset-ids`,reflect:!0})],$.prototype,`datasetIds`,void 0),e.t([(0,c.property)({type:Array,reflect:!1})],$.prototype,`filters`,void 0),e.t([(0,c.property)({type:String,reflect:!0})],$.prototype,`format`,void 0),e.t([(0,c.property)({type:String,reflect:!0})],$.prototype,`display`,void 0),e.t([(0,c.property)({type:String,attribute:`column-display`,reflect:!0})],$.prototype,`columnDisplay`,void 0),e.t([(0,c.property)({type:Boolean,reflect:!0})],$.prototype,`quiet`,void 0),e.t([(0,c.property)({type:Boolean,reflect:!0})],$.prototype,`readonly`,void 0),e.t([(0,c.property)({type:Boolean,attribute:`allow-parameters`,reflect:!0})],$.prototype,`allowParameters`,void 0),e.t([(0,c.property)({attribute:!1})],$.prototype,`parameters`,void 0),e.t([(0,c.property)({type:Number,reflect:!0})],$.prototype,`debounce`,void 0),e.t([(0,c.state)()],$.prototype,`_internalFilterGroup`,void 0),e.t([(0,c.state)()],$.prototype,`_datasets`,void 0),e.t([(0,c.state)()],$.prototype,`_datasetsLoading`,void 0),e.t([(0,c.state)()],$.prototype,`_hierarchyLabels`,void 0),e.t([(0,c.state)()],$.prototype,`_hierarchyLabelsLoading`,void 0),$=e.t([(0,l.localized)()],$),customElements.get(`luzmo-filters`)||customElements.define(`luzmo-filters`,$),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return $}});
@@ -1,45 +0,0 @@
1
- /*! * A kit of modern Luzmo Web Components for analytics in your web application.
2
- *
3
- * Copyright © 2026 Luzmo
4
- * All rights reserved.
5
- * Luzmo web components (“Luzmo Web Components”)
6
- * must be used according to the Luzmo Terms of Service.
7
- * This license allows users with a current active Luzmo account
8
- * to use the Luzmo Web Components. This license terminates
9
- * automatically if a user no longer has an active Luzmo account.
10
- * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
11
- *
12
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
- * SOFTWARE.
19
- * */
20
- const e=require("./decorate-DCJt-2rt.cjs"),t=require("./calculate-data-field-icon-DenGmW74.cjs"),n=require("./localize-D3i4Epy_.cjs"),r=require("./formula-display-store-8hohve9v.cjs"),i=require("./groupings-DKMq8DgS.cjs"),a=require("./resolve-column-presentation-DUETRVCH.cjs");let o=require("@luzmo/icons");require("@luzmo/lucero/icon");let s=require("lit"),c=require("lit/decorators.js"),l=require("@lit/localize");require("@luzmo/lucero/progress-circle");var u=`:host{box-sizing:border-box;font-family:var(--luzmo-font-family);color:var(--luzmo-font-color);display:inline-block}.formula-text{font-size:var(--luzmo-formula-font-size,var(--luzmo-font-size));white-space:pre-wrap;word-break:break-word;line-height:1.5}.formula-text-column{white-space:nowrap}.formula-text-column-icon{margin-inline-end:var(--luzmo-spacing-1)}.formula-pills{align-items:center;gap:var(--luzmo-spacing-1) 0;font-size:var(--luzmo-formula-font-size,var(--luzmo-font-size));flex-wrap:wrap;line-height:1.5;display:inline-flex}.formula-operator{white-space:pre-wrap}.column-pill-wrapper{vertical-align:middle;padding-inline-end:var(--luzmo-formula-column-pill-trailing-space,var(--luzmo-spacing-1));display:inline-flex}.column-pill{justify-content:center;align-items:center;gap:var(--luzmo-spacing-2);box-sizing:border-box;max-width:16rem;min-height:var(--luzmo-formula-control-height,1.375rem);padding:0 var(--luzmo-formula-column-pill-padding-inline,calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1)));border-radius:var(--luzmo-border-radius-s);background-color:var(--luzmo-formula-column-pill-background,var(--luzmo-background-color-highlight));color:var(--luzmo-font-color);white-space:nowrap;font-size:.85em;line-height:1.2;display:inline-flex}.column-pill-icon{flex:none;display:inline-flex}.column-pill-label{text-overflow:ellipsis;overflow:hidden}.column-pill-loading{--luzmo-progress-circle-size:1em;align-items:center;display:inline-flex}.agg-pill{padding-block:var(--luzmo-spacing-1);border-radius:var(--luzmo-border-radius);background-color:var(--agg-accent,var(--luzmo-primary));color:var(--luzmo-primary-inverse-color);font-size:var(--luzmo-formula-font-size,var(--luzmo-font-size));vertical-align:middle;padding-inline:0;display:inline-flex}.agg-pill-row{align-items:center;gap:var(--luzmo-spacing-1);min-height:var(--luzmo-formula-control-height,1.375rem);display:inline-flex}.agg-fn{text-transform:uppercase;padding-inline-start:var(--luzmo-spacing-3);padding-inline-end:var(--luzmo-spacing-3);font-size:.85em}.agg-value{min-height:var(--luzmo-formula-control-height,1.375rem);padding:0 var(--luzmo-spacing-2);border-radius:var(--luzmo-border-radius-s);background-color:var(--luzmo-background-color);color:var(--luzmo-font-color);--luzmo-formula-column-pill-background:transparent;--luzmo-formula-column-pill-padding-inline:0px;align-items:center;line-height:1;display:inline-flex}.agg-grouping{align-items:center;gap:var(--luzmo-spacing-1);padding-inline:var(--luzmo-spacing-2) var(--luzmo-spacing-3);font-size:var(--luzmo-formula-grouping-icon-size,var(--luzmo-icon-size-m));display:inline-flex}.agg-grouping--no-value{padding-inline-start:0}.agg-grouping-count{border-radius:var(--luzmo-border-radius-full,999rem);background:var(--luzmo-primary-inverse-color);min-width:1.25em;color:var(--agg-accent,var(--luzmo-primary));font-size:.6875rem;font-weight:var(--luzmo-font-weight-bold);justify-content:center;align-items:center;padding:0 .25em;line-height:1.4;display:inline-flex}:host{--luzmo-formula-font-size:var(--luzmo-font-size);--luzmo-formula-grouping-icon-size:var(--luzmo-icon-size-m);--luzmo-formula-control-height:calc(var(--luzmo-component-height) - 2 * var(--luzmo-spacing-1))}:host([size=s]){--luzmo-formula-font-size:var(--luzmo-font-size-s);--luzmo-formula-grouping-icon-size:var(--luzmo-icon-size-s);--luzmo-formula-control-height:calc(var(--luzmo-component-height-s) - 2 * var(--luzmo-spacing-1))}:host([size=l]){--luzmo-formula-font-size:var(--luzmo-font-size-l);--luzmo-formula-grouping-icon-size:var(--luzmo-icon-size-l);--luzmo-formula-control-height:calc(var(--luzmo-component-height-l) - 2 * var(--luzmo-spacing-1))}:host([size=xl]){--luzmo-formula-font-size:var(--luzmo-font-size-xl);--luzmo-formula-grouping-icon-size:var(--luzmo-icon-size-xl);--luzmo-formula-control-height:calc(var(--luzmo-component-height-xl) - 2 * var(--luzmo-spacing-1))}`,d=class extends r.o{constructor(...e){super(...e),this.display=`rich`,this._groupingDataMap=i.n()}static{this.styles=(0,s.unsafeCSS)(u)}_createStore(){return new r.t}_shouldLoadInput(){return!1}_canEmitExpression(){return!1}_applyExternalExpression(){if(this.display===`text`){this._rootContent=``;return}this._store.clearWidgets(),this._rootContent=this._store.transformToAggregationWidgetSyntax(this.expression??``)}willUpdate(e){super.willUpdate(e),e.has(`display`)&&!e.has(`expression`)&&this._applyExternalExpression()}render(){return this.display===`text`?this._renderTextFormula():this._renderPillFormula()}_renderPillFormula(){return s.html`<span class="formula-pills" part="formula">${this._renderPillNodes(this._rootContent)}</span>`}_renderPillNodes(e){let t=[],n=new RegExp(r.h.source,`gm`),i=0,a;for(;(a=n.exec(e))!==null;){a.index>i&&t.push(this._renderOperatorText(e.slice(i,a.index)));let r=a[2],o=a[3];r?t.push(this._renderColumnPill(r)):o&&t.push(this._renderAggregationPill(o)),i=n.lastIndex}return i<e.length&&t.push(this._renderOperatorText(e.slice(i))),t}_renderOperatorText(e){return s.html`<span class="formula-operator">${e}</span>`}_renderColumnPill(e){let[t,n]=e.split(`:`),r=this._datasets.find(e=>e.id===t)?.columns.find(e=>e.columnId===n);if(this._store.loading&&!r){let e=(0,l.msg)(`Loading column`,{desc:`Accessible label for a column pill whose label is still loading`});return s.html`<span class="column-pill-wrapper"
21
- ><span class="column-pill" title=${e}
22
- ><span class="column-pill-loading">
23
- <luzmo-progress-circle indeterminate size="s" .label=${e}></luzmo-progress-circle></span
24
- ></span
25
- ></span>`}let{icon:i,label:c}=a.t(r,this.contentLanguage,n);return s.html`<span class="column-pill-wrapper"
26
- ><span class="column-pill" title=${c}
27
- ><span class="column-pill-icon">${(0,o.luzmoIcon)(i)}</span
28
- ><span class="column-pill-label">${c}</span></span
29
- ></span>`}_renderAggregationPill(e){let t=this._store.getWidget(e);if(!t)return s.html`${s.nothing}`;let n=this._groupingDataMap[t.grouping],i=n?.color??``,a=this._store.aggregationFunctionDataMap[t.aggregationFunction]?.arity??0,c=n?.label()??``,l=t.grouping===r.g.GROUPINEX?(t.includedColumns?.length??0)+(t.excludedColumns?.length??0):0;return s.html`<span class="agg-pill" style=${i?`--agg-accent: ${i}`:``}>
30
- <span class="agg-pill-row">
31
- <span class="agg-fn">${t.aggregationFunction}</span>
32
- ${a>0?s.html`<span class="agg-value">${this._renderPillNodes(t.content)}</span>`:s.nothing}
33
- <span
34
- class="agg-grouping${a>0?``:` agg-grouping--no-value`}"
35
- title=${c}
36
- aria-label=${c}
37
- >
38
- ${n?.icon?(0,o.luzmoIcon)(n.icon):s.nothing}
39
- ${l>0?s.html`<span class="agg-grouping-count">${l}</span>`:s.nothing}
40
- </span>
41
- </span>
42
- </span>`}_renderTextFormula(){let e=this.expression??``,t=[],n=new RegExp(r.f.source,`g`),i=0,a;for(;(a=n.exec(e))!==null;){a.index>i&&t.push(e.slice(i,a.index));let[r,o]=a[1].split(`:`);t.push(this._renderColumnReference(r,o)),i=n.lastIndex}return i<e.length&&t.push(e.slice(i)),s.html`<span class="formula-text" part="formula-text">${t}</span>`}_renderColumnReference(e,r){let i=this._datasets.find(t=>t.id===e),a=i?.columns.find(e=>e.columnId===r),c=a?n.t(a.name,this.contentLanguage):r,l=i?n.t(i.name,this.contentLanguage):``;return s.html`<span class="formula-text-column" part="formula-text-column" title=${l?`${l} · ${c}`:c}>
43
- <span class="formula-text-column-icon">${(0,o.luzmoIcon)(t.t({type:a?.type??`hierarchy`},`s`))}</span>
44
- <span class="formula-text-column-name">${c}</span>
45
- </span>`}};e.t([(0,c.property)({type:String,reflect:!0})],d.prototype,`display`,void 0),d=e.t([(0,l.localized)()],d),customElements.get(`luzmo-formula`)||customElements.define(`luzmo-formula`,d),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return d}});