@luzmo/analytics-components-kit 1.0.4-beta.3 → 1.0.4
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.
- package/README.md +11 -5
- package/components/{area-chart-options.config-BjdRY1sr.js → area-chart-options.config-CxJWxcD9.js} +1 -1
- package/components/{area-chart-positioning.config-PZ-MmeDb.cjs → area-chart-positioning.config-CE8lOCfT.cjs} +1 -1
- package/components/{area-chart-positioning.config-hLhrDJ3v.js → area-chart-positioning.config-CQW5h7Eg.js} +1 -1
- package/components/{area-chart-slots.config-BpvvqFy_.js → area-chart-slots.config-C22ZF9l0.js} +1 -1
- package/components/{bar-chart-options.config-DxNHV39Y.js → bar-chart-options.config-BAatAyhW.js} +1 -1
- package/components/{bar-chart-positioning.config-DI8tOMbI.cjs → bar-chart-positioning.config-DFI1wzOQ.cjs} +1 -1
- package/components/{bar-chart-positioning.config-C6wWTn1o.js → bar-chart-positioning.config-DaH_x_VU.js} +1 -1
- package/components/{bar-chart-slots.config-CfIirCOX.js → bar-chart-slots.config-BbgFihbK.js} +1 -1
- package/components/base-CYiGlWug.cjs +20 -0
- package/components/{base-DYkpEuMf.js → base-p2I4mVSW.js} +2 -3
- package/components/{box-plot-options.config-CXey4hvi.js → box-plot-options.config-BuX2wNhp.js} +1 -1
- package/components/{box-plot-positioning.config-D_qhNWth.cjs → box-plot-positioning.config-FOyav5Zq.cjs} +1 -1
- package/components/{box-plot-positioning.config-XG-WcIlA.js → box-plot-positioning.config-K2tQGMig.js} +1 -1
- package/components/{box-plot-slots.config-DclNulnH.js → box-plot-slots.config-OeublT6p.js} +1 -1
- package/components/{bubble-chart-options.config-CeaOv4eF.js → bubble-chart-options.config-C_XQOHgH.js} +1 -1
- package/components/{bubble-chart-positioning.config-CHYBh_Nb.cjs → bubble-chart-positioning.config-B6DXfqa4.cjs} +1 -1
- package/components/{bubble-chart-positioning.config-o_r-GWQG.js → bubble-chart-positioning.config-D2fwO2JM.js} +1 -1
- package/components/{bubble-chart-slots.config-D7vQta7G.js → bubble-chart-slots.config-Bdy20Xqs.js} +1 -1
- package/components/{bullet-chart-options.config-CLn7sV4W.js → bullet-chart-options.config-h5BFyszP.js} +1 -1
- package/components/{bullet-chart-positioning.config-DE5oy4M6.js → bullet-chart-positioning.config-DOAG2wFN.js} +1 -1
- package/components/{bullet-chart-positioning.config-BF8PflF6.cjs → bullet-chart-positioning.config-DZqzqZSQ.cjs} +1 -1
- package/components/{bullet-chart-slots.config-IX7zJWc7.js → bullet-chart-slots.config-Cqj3i1qo.js} +1 -1
- package/components/{choropleth-map-options.config-DzTlJSO3.js → choropleth-map-options.config-YCo77O3q.js} +1 -1
- package/components/{choropleth-map-positioning.config-DT1WWljP.cjs → choropleth-map-positioning.config-C3jO3j8R.cjs} +1 -1
- package/components/{choropleth-map-positioning.config-Cf8bEIns.js → choropleth-map-positioning.config-Jw6fAFM1.js} +1 -1
- package/components/{choropleth-map-slots.config-y0y9rf6i.js → choropleth-map-slots.config-D4vxtdtH.js} +1 -1
- package/components/{circle-pack-chart-options.config-DoLPbnPq.js → circle-pack-chart-options.config-C0cEtjgC.js} +1 -1
- package/components/{circle-pack-chart-positioning.config-Dy-DZ_de.js → circle-pack-chart-positioning.config-Ckb-1sUG.js} +1 -1
- package/components/{circle-pack-chart-positioning.config-DDpnake6.cjs → circle-pack-chart-positioning.config-DJT6ivEy.cjs} +1 -1
- package/components/{circle-pack-chart-slots.config-X9WVAykN.js → circle-pack-chart-slots.config-Dks8K3uQ.js} +1 -1
- package/components/{circular-gauge-options.config-BPUFjqx8.js → circular-gauge-options.config-Cdnk-Sp0.js} +1 -1
- package/components/{circular-gauge-positioning.config-D2t_3T1J.cjs → circular-gauge-positioning.config-B8gL5Br9.cjs} +1 -1
- package/components/{circular-gauge-positioning.config-DljBe7e-.js → circular-gauge-positioning.config-BGlDGhYZ.js} +1 -1
- package/components/{circular-gauge-slots.config-NIEmIAIG.js → circular-gauge-slots.config-Wf4sHmk6.js} +1 -1
- package/components/{column-chart-options.config-DQts3cE4.js → column-chart-options.config-DoZLlIRM.js} +1 -1
- package/components/{column-chart-positioning.config-Bob00Qnq.js → column-chart-positioning.config-BJGWvFLD.js} +1 -1
- package/components/{column-chart-positioning.config-Uvvr5PxW.cjs → column-chart-positioning.config-LzBETWIy.cjs} +1 -1
- package/components/{column-chart-slots.config-CoFarLvo.js → column-chart-slots.config-BhVqSbKw.js} +1 -1
- package/components/{combination-chart-options.config-CjSV6Ic4.js → combination-chart-options.config-D7ZXfn61.js} +1 -1
- package/components/{combination-chart-positioning.config-BzbcDQ2O.cjs → combination-chart-positioning.config-DjmWx90S.cjs} +1 -1
- package/components/{combination-chart-positioning.config-DG2CM16I.js → combination-chart-positioning.config-DtneKdwK.js} +1 -1
- package/components/{combination-chart-slots.config-BGRHSwfr.js → combination-chart-slots.config-CK8YBgUl.js} +1 -1
- package/components/{conditional-number-options.config-CZFqw31c.js → conditional-number-options.config-BwSMI5Ax.js} +1 -1
- package/components/{conditional-number-positioning.config-DpORiYgh.cjs → conditional-number-positioning.config-C8bRdffQ.cjs} +1 -1
- package/components/{conditional-number-positioning.config-CT8PqxDT.js → conditional-number-positioning.config-Ccb2yjJU.js} +1 -1
- package/components/{conditional-number-slots.config-r_C8T2HH.js → conditional-number-slots.config-xSNaYD4u.js} +1 -1
- package/components/data-field/index.cjs +1 -1
- package/components/data-field/index.d.ts +0 -1
- package/components/data-field/index.js +1 -1
- package/components/data-field-iGBGWoGH.cjs +89 -0
- package/components/{data-field-level-zbu4U2m5.js → data-field-ll2oFVG2.js} +141 -47
- package/components/data-field-panel/index.cjs +1 -1
- package/components/data-field-panel/index.d.ts +0 -1
- package/components/data-field-panel/index.js +1 -1
- package/components/data-field-panel-NktuTUUp.cjs +87 -0
- package/components/{data-field-panel-Ob-hNZwz.js → data-field-panel-ntgCpQ_2.js} +4 -5
- package/components/{data-fields-select-CYQy6Ow-.js → data-fields-select-DJFkrrPs.js} +3 -4
- package/components/data-fields-select-DL1nFRg3.cjs +41 -0
- package/components/{date-comparison-filter-options.config-s16IGX_4.js → date-comparison-filter-options.config-DCCm5Adt.js} +1 -1
- package/components/{date-comparison-filter-slots.config-DQBKeCRX.js → date-comparison-filter-slots.config-s7FcuKia.js} +1 -1
- package/components/{date-filter-options.config-ChFEIjN3.js → date-filter-options.config-DBwcMXzp.js} +1 -1
- package/components/{date-filter-slots.config-DREsncpE.js → date-filter-slots.config-pbd3rG9z.js} +1 -1
- package/components/{de-D-xQoqdB.js → de-DqwsqE-U.js} +14 -9
- package/components/de-tUSOg_BJ.cjs +20 -0
- package/components/{display-settings-binning-GKaol6nW.cjs → display-settings-binning-CQKXGp11.cjs} +4 -4
- package/components/{display-settings-binning-MHns2Ns6.js → display-settings-binning-DGxEB9Fa.js} +21 -19
- package/components/display-settings-datetime-25LwuZM_.cjs +217 -0
- package/components/{display-settings-datetime-D5eBAfWQ.js → display-settings-datetime-CLx9sxA7.js} +81 -79
- package/components/display-settings-grand-totals-1tBdxbFY.cjs +44 -0
- package/components/{display-settings-grand-totals-CpulhtNX.js → display-settings-grand-totals-B0Px90rH.js} +20 -18
- package/components/display-settings-numeric-Bbx4qmpA.cjs +190 -0
- package/components/{display-settings-numeric-DnyXOV_x.js → display-settings-numeric-CdEgzO7W.js} +88 -86
- package/components/display-settings-period-over-period-4bJbXWB7.cjs +229 -0
- package/components/{display-settings-period-over-period-Do4qG7yY.js → display-settings-period-over-period-lo3myRfT.js} +91 -90
- package/components/{donut-chart-options.config-WNOpb2n9.js → donut-chart-options.config-Buas8fzJ.js} +1 -1
- package/components/{donut-chart-positioning.config-BLnTmwTZ.cjs → donut-chart-positioning.config-2cYbI6p-.cjs} +1 -1
- package/components/{donut-chart-positioning.config-Bl96um6F.js → donut-chart-positioning.config-Dh3XI5f4.js} +1 -1
- package/components/{donut-chart-slots.config-DEQ3Cw6c.js → donut-chart-slots.config-CZWRHxZe.js} +1 -1
- package/components/{dropdown-filter-options.config-DBNawOPR.js → dropdown-filter-options.config-gv1y1OkC.js} +1 -1
- package/components/{dropdown-filter-slots.config-DcStZGjV.js → dropdown-filter-slots.config-aP5hvp2K.js} +1 -1
- package/components/{en-GB-DzkdeUQh.js → en-GB-D7N1nMuy.js} +1 -1
- package/components/{en-GB-B3xz84vF.cjs → en-GB-DCZl8CPc.cjs} +1 -1
- package/components/{en-CcLhGxIh.js → en-OJGeTneC.js} +1 -1
- package/components/{en-US-CcLhGxIh.js → en-US-OJGeTneC.js} +1 -1
- package/components/{en-US-B34alchz.cjs → en-US-hPjCnvK0.cjs} +1 -1
- package/components/{en-B34alchz.cjs → en-hPjCnvK0.cjs} +1 -1
- package/components/{es-CLnBAiLu.js → es-C-5Yqnck.js} +14 -9
- package/components/es-Czecz2xB.cjs +20 -0
- package/components/{evolution-number-options.config-CrIM2GTn.js → evolution-number-options.config-B1IomzV1.js} +1 -1
- package/components/{evolution-number-positioning.config-DXNPD29G.js → evolution-number-positioning.config-BQQrOKbD.js} +1 -1
- package/components/{evolution-number-positioning.config-DSoC35zp.cjs → evolution-number-positioning.config-BX1lWtDL.cjs} +1 -1
- package/components/{evolution-number-slots.config-Bq_JlxgK.js → evolution-number-slots.config-eOQDWZyb.js} +1 -1
- package/components/filters/index.cjs +1 -1
- package/components/filters/index.js +1 -1
- package/components/filters-Bzx4DYm-.cjs +323 -0
- package/components/filters-DSod7vIq.js +1637 -0
- package/components/formula/index.cjs +1 -1
- package/components/formula/index.js +1 -1
- package/components/formula-DcCDYDt4.cjs +45 -0
- package/components/{formula-CeDEKB7D.js → formula-TyfDRy5X.js} +15 -16
- package/components/{formula-codemirror-MygWCu2u.js → formula-codemirror-B6ktT1Dm.js} +21 -23
- package/components/{formula-codemirror-CFMYytMd.cjs → formula-codemirror-Bewi7Xgc.cjs} +53 -53
- package/components/formula-display-store-DxjO7Q-n.cjs +20 -0
- package/components/{formula-display-store-BYa910x_.js → formula-display-store-ycPV0gru.js} +279 -246
- package/components/formula-editor/index.cjs +1 -1
- package/components/formula-editor/index.d.ts +0 -1
- package/components/formula-editor/index.js +3 -4
- package/components/formula-editor-DQp_XiX5.cjs +247 -0
- package/components/{formula-editor-DeYzzLDr.js → formula-editor-HkD4KWnN.js} +349 -144
- package/components/{fr-DIwbOnwC.js → fr-BvgQLvx5.js} +14 -9
- package/components/fr-CQyhQN6j.cjs +20 -0
- package/components/{funnel-chart-options.config-k0X4rkj-.js → funnel-chart-options.config-DAv3185m.js} +1 -1
- package/components/{funnel-chart-positioning.config-CWSM8nTo.js → funnel-chart-positioning.config-9blBdgB7.js} +1 -1
- package/components/{funnel-chart-positioning.config-BcsV1xp7.cjs → funnel-chart-positioning.config-iHk--8l3.cjs} +1 -1
- package/components/{funnel-chart-slots.config-DKhaZf_r.js → funnel-chart-slots.config-BsNj6Mbb.js} +1 -1
- package/components/{get-css-variable-rHTFFWYM.cjs → get-css-variable-B1BZoBcs.cjs} +1 -1
- package/components/{get-css-variable-Bpma6ZOo.js → get-css-variable-COcan5CX.js} +1 -1
- package/components/{heat-map-options.config-_xxAm6iG.js → heat-map-options.config-Ckw8voNV.js} +1 -1
- package/components/{heat-map-positioning.config-C0dkG5_9.cjs → heat-map-positioning.config-CqkTB8nU.cjs} +1 -1
- package/components/{heat-map-positioning.config-DQJP4mTG.js → heat-map-positioning.config-DgrZWNiT.js} +1 -1
- package/components/{heat-map-slots.config-BDfEGgq5.js → heat-map-slots.config-BFK5TF9k.js} +1 -1
- package/components/{heat-table-options.config-DxRbWqJ8.js → heat-table-options.config-PpOf4o94.js} +1 -1
- package/components/{heat-table-positioning.config-WUHNZPT-.js → heat-table-positioning.config-BqsqkftW.js} +1 -1
- package/components/{heat-table-positioning.config-BzSpf7ed.cjs → heat-table-positioning.config-Ca-WBNR-.cjs} +1 -1
- package/components/{heat-table-slots.config-CVh1TEJJ.js → heat-table-slots.config-3q2hG4nF.js} +1 -1
- package/components/{hexbin-map-options.config-CmAmK-jM.js → hexbin-map-options.config-D88DHYrl.js} +1 -1
- package/components/{hexbin-map-positioning.config-CJPhgdt2.js → hexbin-map-positioning.config-gkLfwTS6.js} +1 -1
- package/components/{marker-map-positioning.config-B-HitobG.cjs → hexbin-map-positioning.config-sUIrPJP4.cjs} +1 -1
- package/components/{hexbin-map-slots.config-rxPZ4kwL.js → hexbin-map-slots.config-BfbHCCUe.js} +1 -1
- package/components/{image-options.config-DJ2DEf7g.js → image-options.config-ByIPpr29.js} +1 -1
- package/components/{image-slots.config-bDNDmiWy.js → image-slots.config-B4MFjNWt.js} +1 -1
- package/components/index.cjs +749 -1
- package/components/index.js +5577 -64
- package/components/item-grid/index.cjs +1 -1
- package/components/item-grid/index.js +1 -1
- package/components/{item-grid-CO_cqGqJ.js → item-grid-B59uyBDP.js} +5 -6
- package/components/{item-grid-CRAoMdCq.cjs → item-grid-C6nEE4Uj.cjs} +22 -22
- package/components/item-option/index.cjs +1 -1
- package/components/item-option/index.js +1 -1
- package/components/item-option-C4c-e1QF.cjs +252 -0
- package/components/item-option-action-button-group/index.cjs +1 -1
- package/components/item-option-action-button-group/index.js +1 -1
- package/components/{item-option-action-button-group-VpgTKSIV.js → item-option-action-button-group-BEXRueVH.js} +3 -3
- package/components/item-option-action-button-group-BU1wvtEd.cjs +53 -0
- package/components/item-option-base-DATaPQ-m.cjs +56 -0
- package/components/{item-option-base-VV7gyznL.js → item-option-base-DqDKIqRP.js} +2 -2
- package/components/item-option-color-palette-picker/index.cjs +1 -1
- package/components/item-option-color-palette-picker/index.js +1 -1
- package/components/item-option-color-palette-picker-Cc2nTuxC.cjs +40 -0
- package/components/{item-option-color-palette-picker-CQgG_NPQ.js → item-option-color-palette-picker-dk5Nm1XB.js} +2 -2
- package/components/item-option-color-picker/index.cjs +1 -1
- package/components/item-option-color-picker/index.js +1 -1
- package/components/{item-option-color-picker-DeDwpICb.cjs → item-option-color-picker-Czr_ojzh.cjs} +2 -2
- package/components/{item-option-color-picker-BmQBTQzb.js → item-option-color-picker-oG-wrEZh.js} +2 -2
- package/components/item-option-color-range/index.cjs +1 -1
- package/components/item-option-color-range/index.js +1 -1
- package/components/item-option-color-range-CTnHZ72E.cjs +98 -0
- package/components/{item-option-color-range-D2kHXssY.js → item-option-color-range-RbnPnI3s.js} +3 -3
- package/components/item-option-multi-language-field/index.cjs +1 -1
- package/components/item-option-multi-language-field/index.js +1 -1
- package/components/{item-option-multi-language-field-Cc9ph205.cjs → item-option-multi-language-field-BpyuIPcO.cjs} +2 -2
- package/components/{item-option-multi-language-field-DbqcqhhN.js → item-option-multi-language-field-BqhBRIFH.js} +2 -2
- package/components/item-option-number-field/index.cjs +1 -1
- package/components/item-option-number-field/index.js +1 -1
- package/components/{item-option-number-field-BbCVJeXZ.js → item-option-number-field-BDPEAzdF.js} +2 -2
- package/components/{item-option-number-field-B6GFKuLN.cjs → item-option-number-field-CV2xpQrk.cjs} +2 -2
- package/components/item-option-panel/index.cjs +1 -1
- package/components/item-option-panel/index.js +1 -1
- package/components/{item-option-panel-6UFGCcnF.cjs → item-option-panel-CMrjUb2s.cjs} +2 -2
- package/components/{item-option-panel-CrNZ0xIF.js → item-option-panel-XhTxaBZp.js} +3 -3
- package/components/item-option-picker/index.cjs +1 -1
- package/components/item-option-picker/index.js +1 -1
- package/components/{item-option-picker-DJKTAG9w.cjs → item-option-picker-CvEfEy99.cjs} +2 -2
- package/components/{item-option-picker-YquXTQNY.js → item-option-picker-D_Od3am8.js} +2 -2
- package/components/item-option-position-picker/index.cjs +1 -1
- package/components/item-option-position-picker/index.js +1 -1
- package/components/{item-option-position-picker-DKvsF-VQ.js → item-option-position-picker-BKw29tj-.js} +2 -2
- package/components/item-option-position-picker-DBs4JlFi.cjs +32 -0
- package/components/item-option-positions-number-field/index.cjs +1 -1
- package/components/item-option-positions-number-field/index.js +1 -1
- package/components/item-option-positions-number-field-DIIEFHd4.cjs +49 -0
- package/components/{item-option-positions-number-field-Bxcbu_IR.js → item-option-positions-number-field-lrJdfydy.js} +2 -2
- package/components/item-option-radio-button-group/index.cjs +1 -1
- package/components/item-option-radio-button-group/index.js +1 -1
- package/components/{item-option-radio-button-group-Cw-xUSUS.js → item-option-radio-button-group-DTyHPaz_.js} +2 -2
- package/components/{item-option-radio-button-group-Bzh4RtSn.cjs → item-option-radio-button-group-DrjpL6YU.cjs} +2 -2
- package/components/item-option-slider/index.cjs +1 -1
- package/components/item-option-slider/index.js +1 -1
- package/components/{item-option-slider-DUqo3Fw0.cjs → item-option-slider-BwKBgW0y.cjs} +2 -2
- package/components/{item-option-slider-BwQnaxvO.js → item-option-slider-CIDoZhZl.js} +2 -2
- package/components/item-option-switch/index.cjs +1 -1
- package/components/item-option-switch/index.js +1 -1
- package/components/{item-option-switch-DBsakQjy.cjs → item-option-switch-CQtvbTfI.cjs} +2 -2
- package/components/{item-option-switch-IixoilYJ.js → item-option-switch-DxC1yjeN.js} +2 -2
- package/components/item-option-text-field/index.cjs +1 -1
- package/components/item-option-text-field/index.js +1 -1
- package/components/{item-option-text-field-CdWylobQ.js → item-option-text-field-CZtJ1yIj.js} +2 -2
- package/components/{item-option-text-field-B4V_sKnM.cjs → item-option-text-field-pLQzcE25.cjs} +2 -2
- package/components/{item-option-Bc6qXONK.js → item-option-zz-Rqh6o.js} +47 -47
- package/components/item-options-configs.js +45 -45
- package/components/item-slot-drop/index.cjs +1 -1
- package/components/item-slot-drop/index.d.ts +0 -2
- package/components/item-slot-drop/index.js +1 -1
- package/components/item-slot-drop/item-slot-drop.d.ts +1 -0
- package/components/{item-slot-drop-BmvMi3dI.js → item-slot-drop-SqYpfTGj.js} +67 -65
- package/components/item-slot-drop-UygcXM5D.cjs +91 -0
- package/components/item-slot-drop-panel/index.cjs +1 -1
- package/components/item-slot-drop-panel/index.js +1 -1
- package/components/item-slot-drop-panel-9T8BWejl.cjs +57 -0
- package/components/{item-slot-drop-panel-D5vaJidp.js → item-slot-drop-panel-DoWCzjqb.js} +40 -41
- package/components/item-slot-picker/index.cjs +1 -1
- package/components/item-slot-picker/index.js +1 -1
- package/components/item-slot-picker/item-slot-picker.d.ts +3 -0
- package/components/{item-slot-picker-BZV33YoP.js → item-slot-picker-CadZEvOA.js} +138 -112
- package/components/item-slot-picker-Rnb_wwCV.cjs +174 -0
- package/components/item-slot-picker-panel/index.cjs +1 -1
- package/components/item-slot-picker-panel/index.js +1 -1
- package/components/item-slot-picker-panel-2VJY6C0b.cjs +81 -0
- package/components/{item-slot-picker-panel-DyhRlAKN.js → item-slot-picker-panel-Bhr6d6Ya.js} +4 -5
- package/components/item-slots-configs.js +45 -45
- package/components/{line-chart-options.config-CfHRdG6O.js → line-chart-options.config-DMjvCs-4.js} +1 -1
- package/components/{line-chart-positioning.config-pSGQm1C1.cjs → line-chart-positioning.config-BIkHxiyg.cjs} +1 -1
- package/components/{line-chart-positioning.config-Cfcgse1N.js → line-chart-positioning.config-CdnYQBah.js} +1 -1
- package/components/{line-chart-slots.config-DKy4D4Yt.js → line-chart-slots.config-CrQEwa4W.js} +1 -1
- package/components/load-data-fields-for-datasets-CU75T9Az.js +86 -0
- package/components/load-data-fields-for-datasets-DkK1JsFd.cjs +20 -0
- package/components/{decorate-CaYbmmmm.js → localized-mixin-CBMYHOPv.js} +26 -2
- package/components/{ai-chat/index.cjs → localized-mixin-DAOiXh71.cjs} +1 -1
- package/components/{marker-map-options.config-C_aGdRQQ.js → marker-map-options.config-C52a3boH.js} +1 -1
- package/components/{marker-map-positioning.config-DTCPGbnG.js → marker-map-positioning.config-BSz4P-W9.js} +1 -1
- package/components/{hexbin-map-positioning.config-Cno9WIc9.cjs → marker-map-positioning.config-t66fioVz.cjs} +1 -1
- package/components/{marker-map-slots.config-BKRRAGwB.js → marker-map-slots.config-eJAxjIaQ.js} +1 -1
- package/components/nl-BwK5iXtO.cjs +20 -0
- package/components/{nl-C_g1Le3t.js → nl-D-Wa6DnD.js} +14 -9
- package/components/{ohlc-chart-options.config-Bd-vLN0I.js → ohlc-chart-options.config-38qB2VKc.js} +1 -1
- package/components/{ohlc-chart-positioning.config-NhpIR1T3.cjs → ohlc-chart-positioning.config-BGueS7CJ.cjs} +1 -1
- package/components/{ohlc-chart-positioning.config-D0kJJkXw.js → ohlc-chart-positioning.config-tQPPutWX.js} +1 -1
- package/components/{ohlc-chart-slots.config-DC8NCD0o.js → ohlc-chart-slots.config-SOs4oD-Q.js} +1 -1
- package/components/{parallel-coordinates-plot-options.config-BUo6XxfP.js → parallel-coordinates-plot-options.config-DfZ80jLX.js} +1 -1
- package/components/{parallel-coordinates-plot-positioning.config-Dzd0eaka.js → parallel-coordinates-plot-positioning.config-MkX-qYHX.js} +1 -1
- package/components/{parallel-coordinates-plot-positioning.config-DLF0U4lZ.cjs → parallel-coordinates-plot-positioning.config-NrJ2LNM8.cjs} +1 -1
- package/components/{parallel-coordinates-plot-slots.config-Dy-9mztD.js → parallel-coordinates-plot-slots.config-DgsHiCqT.js} +1 -1
- package/components/{formatter-Cq5dFCyU.js → period-over-period-condition.const-DLA60ptm.js} +235 -44
- package/components/period-over-period-condition.const-DystGY6B.cjs +20 -0
- package/components/{pivot-table-options.config-DrzB4qVX.js → pivot-table-options.config-5udtucDD.js} +1 -1
- package/components/{pivot-table-positioning.config-BvUjUkG3.cjs → pivot-table-positioning.config-DgJ5PPB9.cjs} +1 -1
- package/components/{pivot-table-positioning.config-PKXfqjiN.js → pivot-table-positioning.config-Dr_0v4TM.js} +1 -1
- package/components/{pivot-table-slots.config-OQe8tS40.js → pivot-table-slots.config-CRL6EW5R.js} +1 -1
- package/components/{pragmatic-element-adapter-CKhTZWGj.cjs → pragmatic-element-adapter-U3ppsQDe.cjs} +3 -3
- package/components/{pragmatic-element-adapter-BFUFSRw6.js → pragmatic-element-adapter-e5LbH_lv.js} +50 -50
- package/components/{pyramid-chart-options.config-Dux8839h.js → pyramid-chart-options.config-iP2MzTeb.js} +1 -1
- package/components/{pyramid-chart-positioning.config-48iZhPdi.cjs → pyramid-chart-positioning.config-BGRtXKWh.cjs} +1 -1
- package/components/{pyramid-chart-positioning.config-C8yiD0R3.js → pyramid-chart-positioning.config-DB0BI8vW.js} +1 -1
- package/components/{pyramid-chart-slots.config-DwlZaBAF.js → pyramid-chart-slots.config-DM3lYlDg.js} +1 -1
- package/components/{radar-chart-options.config-ColtKo6Z.js → radar-chart-options.config-aR5sQal-.js} +1 -1
- package/components/{radar-chart-positioning.config-L5Eu5W1I.js → radar-chart-positioning.config-D6UfRMMA.js} +1 -1
- package/components/{radar-chart-positioning.config-CpqhJjoz.cjs → radar-chart-positioning.config-DQiJ-Z1s.cjs} +1 -1
- package/components/{radar-chart-slots.config-BuHg4Zeg.js → radar-chart-slots.config-msW05r4n.js} +1 -1
- package/components/{regular-table-options.config-DopdB4eB.js → regular-table-options.config-kbARlJ1E.js} +1 -1
- package/components/{regular-table-slots.config--SVEN5Cu.js → regular-table-slots.config-DAwLOM5T.js} +1 -1
- package/components/{route-map-options.config-BCuJw5k3.js → route-map-options.config-DCBAfq09.js} +1 -1
- package/components/{route-map-positioning.config-DTwMkeiu.cjs → route-map-positioning.config-Cbic0Cbz.cjs} +1 -1
- package/components/{route-map-positioning.config-DVb_Jiws.js → route-map-positioning.config-D_ZoyhwX.js} +1 -1
- package/components/{route-map-slots.config-CmVIxDkx.js → route-map-slots.config-DNiRtoRC.js} +1 -1
- package/components/{sankey-diagram-options.config-BH3kpjFs.js → sankey-diagram-options.config-CKjVnYnF.js} +1 -1
- package/components/{sankey-diagram-positioning.config-Dk0siSAo.js → sankey-diagram-positioning.config-CQNdImz0.js} +1 -1
- package/components/{sankey-diagram-positioning.config-_kyrBnJ4.cjs → sankey-diagram-positioning.config-CZDPh7CR.cjs} +1 -1
- package/components/{sankey-diagram-slots.config-lbkF8DWJ.js → sankey-diagram-slots.config-CVD2P6RJ.js} +1 -1
- package/components/{scatter-plot-options.config-Dn6ILlJw.js → scatter-plot-options.config--AfAxaGf.js} +1 -1
- package/components/{scatter-plot-positioning.config-DaYstFV8.cjs → scatter-plot-positioning.config-BPEymo3a.cjs} +1 -1
- package/components/{scatter-plot-positioning.config-440yA7x5.js → scatter-plot-positioning.config-BTOiZ8cF.js} +1 -1
- package/components/{scatter-plot-slots.config-DEFWWj0_.js → scatter-plot-slots.config-D57rd66g.js} +1 -1
- package/components/{search-filter-options.config-DWKVxBc5.js → search-filter-options.config-DQwMOiXm.js} +1 -1
- package/components/{search-filter-slots.config-vyPYIXE7.js → search-filter-slots.config-DQybwP4H.js} +1 -1
- package/components/{set-locale-DKCZkJVL.cjs → set-locale-BCnD4yp_.cjs} +1 -1
- package/components/{set-locale-DB1FMgtK.js → set-locale-CamOWu7o.js} +4 -4
- package/components/{slicer-filter-options.config-C6HPrjIw.js → slicer-filter-options.config-DVE33GEz.js} +1 -1
- package/components/{slicer-filter-positioning.config-B6wPo539.js → slicer-filter-positioning.config-CC7uoU2D.js} +1 -1
- package/components/{slicer-filter-positioning.config-DdfTuXdV.cjs → slicer-filter-positioning.config-CQE4ocpD.cjs} +1 -1
- package/components/{slicer-filter-slots.config-BZWCSkX4.js → slicer-filter-slots.config-Bcz9RsdR.js} +1 -1
- package/components/{slider-filter-options.config-CvqHWJIX.js → slider-filter-options.config-BwaAvOvt.js} +1 -1
- package/components/{slider-filter-slots.config-BY9X2rlz.js → slider-filter-slots.config-Bc8Qk7fb.js} +1 -1
- package/components/slot-menu-BL772rj7.js +1048 -0
- package/components/slot-menu-CCbZ-krJ.cjs +215 -0
- package/components/{speedometer-chart-options.config-wX3KzciD.js → speedometer-chart-options.config-D4-8n5pn.js} +1 -1
- package/components/{speedometer-chart-positioning.config-rI2Jxymu.js → speedometer-chart-positioning.config-ChH-uAdS.js} +1 -1
- package/components/{speedometer-chart-positioning.config-BVYrl1_s.cjs → speedometer-chart-positioning.config-DpBVarun.cjs} +1 -1
- package/components/{speedometer-chart-slots.config-0Tv8EtKT.js → speedometer-chart-slots.config-B4zqf0f_.js} +1 -1
- package/components/{spike-map-options.config-DpgsB_L-.js → spike-map-options.config-CM46vw7B.js} +1 -1
- package/components/{spike-map-positioning.config-CiY2ju4c.js → spike-map-positioning.config-BnEQJ-rD.js} +1 -1
- package/components/{spike-map-positioning.config-2XZLrk9D.cjs → spike-map-positioning.config-DrSoa8Ol.cjs} +1 -1
- package/components/{spike-map-slots.config-C6e0NXiD.js → spike-map-slots.config-BeXzuzh0.js} +1 -1
- package/components/{strip-plot-options.config-BzhxzU-s.js → strip-plot-options.config-BlneYJOy.js} +1 -1
- package/components/{strip-plot-positioning.config-CFQPdgei.js → strip-plot-positioning.config-Be5Desz2.js} +1 -1
- package/components/{strip-plot-positioning.config-CkC8JUwR.cjs → strip-plot-positioning.config-DlkZ1i6m.cjs} +1 -1
- package/components/{strip-plot-slots.config-BjwAuVoh.js → strip-plot-slots.config-BGQIQtMK.js} +1 -1
- package/components/{sunburst-chart-options.config-Ba_H54ip.js → sunburst-chart-options.config-8xopRyBB.js} +1 -1
- package/components/{sunburst-chart-positioning.config-DVt84HYB.cjs → sunburst-chart-positioning.config-D4zzci9s.cjs} +1 -1
- package/components/{sunburst-chart-positioning.config-BHJf7n-T.js → sunburst-chart-positioning.config-RUEkAgKJ.js} +1 -1
- package/components/{sunburst-chart-slots.config-h114Cuzh.js → sunburst-chart-slots.config-BhKeTqTo.js} +1 -1
- package/components/{symbol-map-options.config-DeJyZILi.js → symbol-map-options.config-nJAvVQIh.js} +1 -1
- package/components/{symbol-map-positioning.config-DQK1q4GP.cjs → symbol-map-positioning.config-Dmgmyhv7.cjs} +1 -1
- package/components/{symbol-map-positioning.config-tZp8vwwl.js → symbol-map-positioning.config-JzgtULMk.js} +1 -1
- package/components/{symbol-map-slots.config-BmvI5_VE.js → symbol-map-slots.config-D9E-oBE4.js} +1 -1
- package/components/{text-options.config-BXuZMKTG.js → text-options.config-DCF3IVzO.js} +1 -1
- package/components/{text-slots.config-18Chz73A.js → text-slots.config-C60nJ0OX.js} +1 -1
- package/components/{treemap-chart-options.config-Be-LBEGy.js → treemap-chart-options.config-RFQTphEG.js} +1 -1
- package/components/{treemap-chart-positioning.config-CEYAh7Uc.js → treemap-chart-positioning.config-CSt_vVgw.js} +1 -1
- package/components/{treemap-chart-positioning.config-DQfHJ-ZS.cjs → treemap-chart-positioning.config-CqHJxz2j.cjs} +1 -1
- package/components/{treemap-chart-slots.config-e7ORieH-.js → treemap-chart-slots.config-CZRP7PZH.js} +1 -1
- package/components/utils/base.cjs +1 -1
- package/components/utils/base.js +2 -2
- package/components/utils/store.js +1 -1
- package/components/utils-DLTDAer5.js +239 -0
- package/components/utils-Ez3j4EOS.cjs +20 -0
- package/components/utils.cjs +1 -1
- package/components/utils.js +6 -9
- package/components/{venn-diagram-options.config-D3bEFsYa.js → venn-diagram-options.config-uCJ5dei5.js} +1 -1
- package/components/{venn-diagram-positioning.config-DQa6-GAn.cjs → venn-diagram-positioning.config-CzhNTma3.cjs} +1 -1
- package/components/{venn-diagram-positioning.config-2rUFGTJh.js → venn-diagram-positioning.config-DsPI8qfG.js} +1 -1
- package/components/{venn-diagram-slots.config-Dm-IC6JS.js → venn-diagram-slots.config-DOljH_uI.js} +1 -1
- package/components/{video-options.config-B5aOwGa4.js → video-options.config-DkLrX1gP.js} +1 -1
- package/components/{video-slots.config-D2MtpAGI.js → video-slots.config-CqMIkttE.js} +1 -1
- package/components/{wordcloud-chart-options.config-DntH4Hvg.js → wordcloud-chart-options.config-C2ZILp7a.js} +1 -1
- package/components/{wordcloud-chart-positioning.config-C3Zulr2Q.js → wordcloud-chart-positioning.config-BUE8e4fN.js} +1 -1
- package/components/{wordcloud-chart-positioning.config-DhoAsQP-.cjs → wordcloud-chart-positioning.config-moNJfL1M.cjs} +1 -1
- package/components/{wordcloud-chart-slots.config-CsFBBXDz.js → wordcloud-chart-slots.config-B8s8B47F.js} +1 -1
- package/custom-elements.json +5896 -15935
- package/index.d.ts +0 -24
- package/package.json +3 -128
- package/react/README.md +6 -31
- package/react/esm/index.d.ts +2 -27
- package/react/esm/index.js +2 -102
- package/react/esm/types.d.ts +0 -15
- package/react/index.ts +2 -102
- package/react/luzmo-stub.d.ts +0 -163
- package/react/types.ts +0 -12
- package/react/utils/slot-content/ad-hoc-slot-content.d.ts +7 -0
- package/react/utils/slot-content/render-calculation-label.d.ts +7 -0
- package/react/utils/slot-state/slot-store.d.ts +2 -2
- package/types/slot.types.d.ts +10 -1
- package/types.d.ts +0 -8
- package/utils/slot-content/ad-hoc-slot-content.d.ts +7 -0
- package/utils/slot-content/render-calculation-label.d.ts +7 -0
- package/utils/slot-state/slot-store.d.ts +2 -2
- package/components/ai-chat/ai-chat-events.d.ts +0 -123
- package/components/ai-chat/ai-chat-request.d.ts +0 -11
- package/components/ai-chat/ai-chat.d.ts +0 -279
- package/components/ai-chat/ai-prompt-types.d.ts +0 -94
- package/components/ai-chat/empty-state/ai-chat-empty-state.d.ts +0 -46
- package/components/ai-chat/empty-state/index.d.ts +0 -8
- package/components/ai-chat/empty-state/types.d.ts +0 -14
- package/components/ai-chat/index.d.ts +0 -20
- package/components/ai-chat/index.js +0 -28
- package/components/ai-chat/session/ai-chat-session-controller.d.ts +0 -51
- package/components/ai-chat/session/ai-chat-session-types.d.ts +0 -88
- package/components/ai-chat/session/ai-chat-session.d.ts +0 -91
- package/components/ai-chat/session/index.d.ts +0 -2
- package/components/ai-chat/stream/chunk-extractors.d.ts +0 -27
- package/components/ai-chat/stream/index.d.ts +0 -52
- package/components/ai-chat/stream/progress.d.ts +0 -3
- package/components/ai-chat/stream/registry.d.ts +0 -6
- package/components/ai-chat/stream/stream-processor.d.ts +0 -2
- package/components/ai-chat/stream/transport.d.ts +0 -26
- package/components/ai-chat/stream/types.d.ts +0 -55
- package/components/ai-chat-CXt4wCe0.js +0 -3715
- package/components/ai-chat-Dnf-C838.cjs +0 -258
- package/components/ai-interaction-textarea/ai-interaction-textarea.d.ts +0 -135
- package/components/ai-interaction-textarea/index.cjs +0 -20
- package/components/ai-interaction-textarea/index.d.ts +0 -8
- package/components/ai-interaction-textarea/index.js +0 -28
- package/components/ai-interaction-textarea/types.d.ts +0 -5
- package/components/ai-interaction-textarea-B_-aZ9mc.cjs +0 -68
- package/components/ai-interaction-textarea-DSrZkuh9.js +0 -299
- package/components/base-BCmPH4SF.cjs +0 -20
- package/components/convert-data-field-to-slot-content-BQkSy_8B.cjs +0 -20
- package/components/convert-data-field-to-slot-content-C6IIqU7G.js +0 -53
- package/components/convert-datasets-to-data-fields-B13rl1an.cjs +0 -20
- package/components/convert-datasets-to-data-fields-PmQzeVLG.js +0 -68
- package/components/data-field-CxUItUcs.cjs +0 -54
- package/components/data-field-RzkD37hR.js +0 -121
- package/components/data-field-level/data-field-level.d.ts +0 -40
- package/components/data-field-level/helpers/generate-preview.d.ts +0 -9
- package/components/data-field-level/index.cjs +0 -20
- package/components/data-field-level/index.d.ts +0 -8
- package/components/data-field-level/index.js +0 -28
- package/components/data-field-level-55bJkqFt.cjs +0 -55
- package/components/data-field-panel-C3O77CIF.cjs +0 -87
- package/components/data-fields-select/data-fields-select.d.ts +0 -127
- package/components/data-fields-select/index.cjs +0 -20
- package/components/data-fields-select/index.d.ts +0 -9
- package/components/data-fields-select/index.js +0 -28
- package/components/data-fields-select/types.d.ts +0 -4
- package/components/data-fields-select-D-nSjOep.cjs +0 -41
- package/components/dataset-icon/dataset-icon.d.ts +0 -45
- package/components/dataset-icon/index.cjs +0 -20
- package/components/dataset-icon/index.d.ts +0 -8
- package/components/dataset-icon/index.js +0 -28
- package/components/dataset-icon/types.d.ts +0 -11
- package/components/dataset-icon-BAV0S4sZ.cjs +0 -64
- package/components/dataset-icon-BXEgg_8O.js +0 -125
- package/components/dataset-selector-list/dataset-selector-list.d.ts +0 -102
- package/components/dataset-selector-list/index.cjs +0 -20
- package/components/dataset-selector-list/index.d.ts +0 -8
- package/components/dataset-selector-list/index.js +0 -28
- package/components/dataset-selector-list-BW5v_7_L.cjs +0 -75
- package/components/dataset-selector-list-DwfeaUGu.js +0 -313
- package/components/dataset-selector-row/dataset-selector-row.d.ts +0 -89
- package/components/dataset-selector-row/index.cjs +0 -20
- package/components/dataset-selector-row/index.d.ts +0 -8
- package/components/dataset-selector-row/index.js +0 -28
- package/components/dataset-selector-row-BU7YhT7l.cjs +0 -79
- package/components/dataset-selector-row-CLbx0joD.js +0 -273
- package/components/de-BY1wWZE8.cjs +0 -20
- package/components/decompose-numeric-format-DGJua3rU.cjs +0 -20
- package/components/decompose-numeric-format-DS0j2wa1.js +0 -36
- package/components/decorate-DCJt-2rt.cjs +0 -20
- package/components/display-settings/display-settings.d.ts +0 -98
- package/components/display-settings/index.cjs +0 -20
- package/components/display-settings/index.d.ts +0 -8
- package/components/display-settings/index.js +0 -28
- package/components/display-settings/types.d.ts +0 -9
- package/components/display-settings-COYLimuI.cjs +0 -120
- package/components/display-settings-ajA8j6kr.js +0 -272
- package/components/display-settings-binning/display-settings-binning.d.ts +0 -32
- package/components/display-settings-binning/index.cjs +0 -20
- package/components/display-settings-binning/index.d.ts +0 -8
- package/components/display-settings-binning/index.js +0 -28
- package/components/display-settings-datetime/display-settings-datetime.d.ts +0 -86
- package/components/display-settings-datetime/index.cjs +0 -20
- package/components/display-settings-datetime/index.d.ts +0 -8
- package/components/display-settings-datetime/index.js +0 -28
- package/components/display-settings-datetime-CLRXVpld.cjs +0 -217
- package/components/display-settings-grand-totals/display-settings-grand-totals.d.ts +0 -29
- package/components/display-settings-grand-totals/index.cjs +0 -20
- package/components/display-settings-grand-totals/index.d.ts +0 -8
- package/components/display-settings-grand-totals/index.js +0 -28
- package/components/display-settings-grand-totals-DltI_Z-x.cjs +0 -44
- package/components/display-settings-numeric/display-settings-numeric.d.ts +0 -82
- package/components/display-settings-numeric/helpers/constants.d.ts +0 -19
- package/components/display-settings-numeric/index.cjs +0 -20
- package/components/display-settings-numeric/index.d.ts +0 -8
- package/components/display-settings-numeric/index.js +0 -28
- package/components/display-settings-numeric-CurqaTi5.cjs +0 -190
- package/components/display-settings-period-over-period/display-settings-period-over-period.d.ts +0 -68
- package/components/display-settings-period-over-period/helpers/constants.d.ts +0 -44
- package/components/display-settings-period-over-period/index.cjs +0 -20
- package/components/display-settings-period-over-period/index.d.ts +0 -8
- package/components/display-settings-period-over-period/index.js +0 -28
- package/components/display-settings-period-over-period-DP2grX4n.cjs +0 -229
- package/components/es-BIaD4kOL.cjs +0 -20
- package/components/filter-expression-picker/filter-expression-picker.d.ts +0 -73
- package/components/filter-expression-picker/index.cjs +0 -20
- package/components/filter-expression-picker/index.d.ts +0 -7
- package/components/filter-expression-picker/index.js +0 -28
- package/components/filter-expression-picker-0eNf_L9I.cjs +0 -38
- package/components/filter-expression-picker-D_buTmzJ.js +0 -425
- package/components/filter-item/filter-item.d.ts +0 -84
- package/components/filter-item/index.cjs +0 -20
- package/components/filter-item/index.d.ts +0 -7
- package/components/filter-item/index.js +0 -28
- package/components/filter-item-DGnRmeaB.cjs +0 -58
- package/components/filter-item-VzEHDr04.js +0 -242
- package/components/filter-parameter-picker/filter-parameter-picker.d.ts +0 -25
- package/components/filter-parameter-picker/index.cjs +0 -22
- package/components/filter-parameter-picker/index.d.ts +0 -7
- package/components/filter-parameter-picker/index.js +0 -58
- package/components/filter-value-picker/filter-value-picker.d.ts +0 -65
- package/components/filter-value-picker/index.cjs +0 -20
- package/components/filter-value-picker/index.d.ts +0 -7
- package/components/filter-value-picker/index.js +0 -28
- package/components/filter-value-picker-C1lDTmKM.cjs +0 -60
- package/components/filter-value-picker-CIblY-PW.js +0 -151
- package/components/filter-value-picker-datetime/filter-value-picker-datetime.d.ts +0 -42
- package/components/filter-value-picker-datetime/index.cjs +0 -20
- package/components/filter-value-picker-datetime/index.d.ts +0 -7
- package/components/filter-value-picker-datetime/index.js +0 -28
- package/components/filter-value-picker-datetime-DQpEf_tv.js +0 -139
- package/components/filter-value-picker-datetime-dCo1_pma.cjs +0 -42
- package/components/filter-value-picker-hierarchy/filter-value-picker-hierarchy.d.ts +0 -81
- package/components/filter-value-picker-hierarchy/index.cjs +0 -20
- package/components/filter-value-picker-hierarchy/index.d.ts +0 -7
- package/components/filter-value-picker-hierarchy/index.js +0 -28
- package/components/filter-value-picker-hierarchy-DaZlasgM.cjs +0 -47
- package/components/filter-value-picker-hierarchy-DzHUrpyk.js +0 -232
- package/components/filter-value-picker-numeric/filter-value-picker-numeric.d.ts +0 -82
- package/components/filter-value-picker-numeric/index.cjs +0 -20
- package/components/filter-value-picker-numeric/index.d.ts +0 -7
- package/components/filter-value-picker-numeric/index.js +0 -28
- package/components/filter-value-picker-numeric-BU975w8c.js +0 -219
- package/components/filter-value-picker-numeric-D-dUSGAP.cjs +0 -48
- package/components/filters-BgTnxSKg.js +0 -400
- package/components/filters-Cx1S1-vx.cjs +0 -150
- package/components/formatter-8m-wrIM-.cjs +0 -20
- package/components/formula-D7E8UieE.cjs +0 -45
- package/components/formula-codemirror/formula-codemirror.d.ts +0 -79
- package/components/formula-codemirror/index.d.ts +0 -7
- package/components/formula-codemirror/pills/formula-aggregation/formula-aggregation.d.ts +0 -125
- package/components/formula-codemirror/pills/formula-aggregation/index.d.ts +0 -7
- package/components/formula-codemirror/pills/formula-empty-argument-pill/formula-empty-argument-pill.d.ts +0 -28
- package/components/formula-codemirror/pills/formula-empty-argument-pill/index.d.ts +0 -7
- package/components/formula-codemirror/pills/formula-include-exclude-panel.d.ts +0 -38
- package/components/formula-display-store-DjjsQ5mW.cjs +0 -20
- package/components/formula-draggable-field/formula-draggable-field.d.ts +0 -53
- package/components/formula-draggable-field/index.d.ts +0 -8
- package/components/formula-draggable-field/types.d.ts +0 -24
- package/components/formula-editor-4PoZ3BlC.cjs +0 -218
- package/components/formula-field/formula-field.d.ts +0 -20
- package/components/formula-field/index.cjs +0 -20
- package/components/formula-field/index.d.ts +0 -7
- package/components/formula-field/index.js +0 -28
- package/components/formula-field-DXdxspyY.js +0 -40
- package/components/formula-field-DkKXMIMg.cjs +0 -20
- package/components/formula-input-base-Bz_XVZcs.cjs +0 -49
- package/components/formula-input-base-Dok5ujvH.js +0 -236
- package/components/fr-CHG2Tcby.cjs +0 -20
- package/components/get-dataset-name-Dwuh7DWE.cjs +0 -20
- package/components/get-dataset-name-SfDNjsuR.js +0 -27
- package/components/groupings-BNrLlXIB.cjs +0 -20
- package/components/groupings-okwLJKoG.js +0 -52
- package/components/interactive-viz-item/helpers/chart-helpers.d.ts +0 -7
- package/components/interactive-viz-item/index.cjs +0 -20
- package/components/interactive-viz-item/index.d.ts +0 -10
- package/components/interactive-viz-item/index.js +0 -28
- package/components/interactive-viz-item/interactive-viz-item.d.ts +0 -96
- package/components/interactive-viz-item/types.d.ts +0 -117
- package/components/interactive-viz-item-63pap_oz.cjs +0 -247
- package/components/interactive-viz-item-QVji6wbp.js +0 -693
- package/components/item-menu/item-list/item-list.d.ts +0 -37
- package/components/item-option-action-button-group-jPUDKP3M.cjs +0 -53
- package/components/item-option-base/item-option-base.d.ts +0 -23
- package/components/item-option-base-Bk9L8Ie7.cjs +0 -56
- package/components/item-option-color-palette-picker-kch0Ep_5.cjs +0 -40
- package/components/item-option-color-range-Cj6sZ72F.cjs +0 -98
- package/components/item-option-iQM2pOGK.cjs +0 -252
- package/components/item-option-position-picker-Csc4Y6dN.cjs +0 -32
- package/components/item-option-positions-number-field-DBV6Yekk.cjs +0 -49
- package/components/item-slot-drop-D8KI2kny.cjs +0 -91
- package/components/item-slot-drop-panel-Crw-ktDj.cjs +0 -57
- package/components/item-slot-picker-BgQAviso.cjs +0 -158
- package/components/item-slot-picker-panel-C26kZ4zE.cjs +0 -81
- package/components/load-data-fields-for-datasets-BVGaku2J.cjs +0 -20
- package/components/load-data-fields-for-datasets-DeXLqWt4.js +0 -42
- package/components/localized-mixin-BYWQe1fg.js +0 -45
- package/components/localized-mixin-DrK3QZNa.cjs +0 -20
- package/components/nl-PxN5EqzT.cjs +0 -20
- package/components/period-over-period-condition.const-BZ7j5Z5t.js +0 -29
- package/components/period-over-period-condition.const-C1NZ9Bkp.cjs +0 -20
- package/components/slot-menu/index.cjs +0 -20
- package/components/slot-menu/index.d.ts +0 -10
- package/components/slot-menu/index.js +0 -28
- package/components/slot-menu/slot-menu.d.ts +0 -143
- package/components/slot-menu/types.d.ts +0 -24
- package/components/slot-menu-BBnibMJU.cjs +0 -64
- package/components/slot-menu-list/index.cjs +0 -20
- package/components/slot-menu-list/index.d.ts +0 -8
- package/components/slot-menu-list/index.js +0 -28
- package/components/slot-menu-list/slot-menu-list.d.ts +0 -42
- package/components/slot-menu-list-D193fsQX.cjs +0 -38
- package/components/slot-menu-list-gKDiWsHB.js +0 -325
- package/components/slot-menu-w7sla2N0.js +0 -400
- package/components/slots-config-DIBoffEb.js +0 -77
- package/components/slots-config-YdyClHLc.cjs +0 -20
- package/components/utils-CJf8VNzX.cjs +0 -20
- package/components/utils-Ci1YA9yB.js +0 -352
- package/components/viz-item-menu/index.cjs +0 -20
- package/components/viz-item-menu/index.d.ts +0 -8
- package/components/viz-item-menu/index.js +0 -28
- package/components/viz-item-menu/types.d.ts +0 -9
- package/components/viz-item-menu/viz-item-menu.d.ts +0 -75
- package/components/viz-item-menu-B4BJBNEq.js +0 -170
- package/components/viz-item-menu-DD8ndROu.cjs +0 -55
- package/react/components/ai-chat/empty-state/index.ts +0 -1
- package/react/components/ai-chat/empty-state/types.ts +0 -16
- package/react/components/ai-chat/stream/index.ts +0 -1
- package/react/components/ai-chat/stream/types.ts +0 -60
- package/react/components/ai-chat.component.ts +0 -42
- package/react/components/ai-interaction-textarea/index.ts +0 -1
- package/react/components/ai-interaction-textarea/types.ts +0 -6
- package/react/components/ai-interaction-textarea.component.ts +0 -30
- package/react/components/data-field-level.component.ts +0 -30
- package/react/components/data-fields-select/index.ts +0 -1
- package/react/components/data-fields-select/types.ts +0 -5
- package/react/components/data-fields-select.component.ts +0 -27
- package/react/components/dataset-icon/index.ts +0 -1
- package/react/components/dataset-icon/types.ts +0 -8
- package/react/components/dataset-icon.component.ts +0 -22
- package/react/components/dataset-selector-list.component.ts +0 -27
- package/react/components/dataset-selector-row.component.ts +0 -30
- package/react/components/display-settings/index.ts +0 -1
- package/react/components/display-settings/types.ts +0 -12
- package/react/components/display-settings-binning.component.ts +0 -27
- package/react/components/display-settings-datetime.component.ts +0 -27
- package/react/components/display-settings-grand-totals.component.ts +0 -27
- package/react/components/display-settings-numeric.component.ts +0 -27
- package/react/components/display-settings-period-over-period.component.ts +0 -27
- package/react/components/display-settings.component.ts +0 -33
- package/react/components/filter-expression-picker.component.ts +0 -27
- package/react/components/filter-item.component.ts +0 -27
- package/react/components/filter-parameter-picker.component.ts +0 -22
- package/react/components/filter-value-picker-datetime.component.ts +0 -27
- package/react/components/filter-value-picker-hierarchy.component.ts +0 -27
- package/react/components/filter-value-picker-numeric.component.ts +0 -27
- package/react/components/filter-value-picker.component.ts +0 -27
- package/react/components/formula-draggable-field/index.ts +0 -1
- package/react/components/formula-draggable-field/types.ts +0 -26
- package/react/components/formula-field.component.ts +0 -30
- package/react/components/interactive-viz-item/index.ts +0 -1
- package/react/components/interactive-viz-item/types.ts +0 -122
- package/react/components/interactive-viz-item.component.ts +0 -33
- package/react/components/slot-menu/index.ts +0 -1
- package/react/components/slot-menu/types.ts +0 -29
- package/react/components/slot-menu-list.component.ts +0 -27
- package/react/components/slot-menu.component.ts +0 -42
- package/react/components/viz-item-menu/index.ts +0 -1
- package/react/components/viz-item-menu/types.ts +0 -11
- package/react/components/viz-item-menu.component.ts +0 -33
- package/react/esm/components/ai-chat/empty-state/index.d.ts +0 -1
- package/react/esm/components/ai-chat/empty-state/index.js +0 -1
- package/react/esm/components/ai-chat/empty-state/types.d.ts +0 -14
- package/react/esm/components/ai-chat/stream/index.d.ts +0 -1
- package/react/esm/components/ai-chat/stream/index.js +0 -1
- package/react/esm/components/ai-chat/stream/types.d.ts +0 -55
- package/react/esm/components/ai-chat.component.d.ts +0 -22
- package/react/esm/components/ai-chat.component.js +0 -27
- package/react/esm/components/ai-interaction-textarea/index.d.ts +0 -1
- package/react/esm/components/ai-interaction-textarea/index.js +0 -1
- package/react/esm/components/ai-interaction-textarea/types.d.ts +0 -5
- package/react/esm/components/ai-interaction-textarea.component.d.ts +0 -14
- package/react/esm/components/ai-interaction-textarea.component.js +0 -19
- package/react/esm/components/data-field-level.component.d.ts +0 -14
- package/react/esm/components/data-field-level.component.js +0 -19
- package/react/esm/components/data-fields-select/index.d.ts +0 -1
- package/react/esm/components/data-fields-select/index.js +0 -1
- package/react/esm/components/data-fields-select/types.d.ts +0 -4
- package/react/esm/components/data-fields-select.component.d.ts +0 -12
- package/react/esm/components/data-fields-select.component.js +0 -17
- package/react/esm/components/dataset-icon/index.d.ts +0 -1
- package/react/esm/components/dataset-icon/index.js +0 -1
- package/react/esm/components/dataset-icon/types.d.ts +0 -11
- package/react/esm/components/dataset-icon/types.js +0 -1
- package/react/esm/components/dataset-icon.component.d.ts +0 -8
- package/react/esm/components/dataset-icon.component.js +0 -13
- package/react/esm/components/dataset-selector-list.component.d.ts +0 -12
- package/react/esm/components/dataset-selector-list.component.js +0 -17
- package/react/esm/components/dataset-selector-row.component.d.ts +0 -14
- package/react/esm/components/dataset-selector-row.component.js +0 -19
- package/react/esm/components/display-settings/index.d.ts +0 -1
- package/react/esm/components/display-settings/index.js +0 -1
- package/react/esm/components/display-settings/types.d.ts +0 -9
- package/react/esm/components/display-settings/types.js +0 -1
- package/react/esm/components/display-settings-binning.component.d.ts +0 -12
- package/react/esm/components/display-settings-binning.component.js +0 -17
- package/react/esm/components/display-settings-datetime.component.d.ts +0 -12
- package/react/esm/components/display-settings-datetime.component.js +0 -17
- package/react/esm/components/display-settings-grand-totals.component.d.ts +0 -12
- package/react/esm/components/display-settings-grand-totals.component.js +0 -17
- package/react/esm/components/display-settings-numeric.component.d.ts +0 -12
- package/react/esm/components/display-settings-numeric.component.js +0 -17
- package/react/esm/components/display-settings-period-over-period.component.d.ts +0 -12
- package/react/esm/components/display-settings-period-over-period.component.js +0 -17
- package/react/esm/components/display-settings.component.d.ts +0 -16
- package/react/esm/components/display-settings.component.js +0 -21
- package/react/esm/components/filter-expression-picker.component.d.ts +0 -12
- package/react/esm/components/filter-expression-picker.component.js +0 -17
- package/react/esm/components/filter-item.component.d.ts +0 -12
- package/react/esm/components/filter-item.component.js +0 -17
- package/react/esm/components/filter-parameter-picker.component.d.ts +0 -8
- package/react/esm/components/filter-parameter-picker.component.js +0 -13
- package/react/esm/components/filter-value-picker-datetime.component.d.ts +0 -12
- package/react/esm/components/filter-value-picker-datetime.component.js +0 -17
- package/react/esm/components/filter-value-picker-hierarchy.component.d.ts +0 -12
- package/react/esm/components/filter-value-picker-hierarchy.component.js +0 -17
- package/react/esm/components/filter-value-picker-numeric.component.d.ts +0 -12
- package/react/esm/components/filter-value-picker-numeric.component.js +0 -17
- package/react/esm/components/filter-value-picker.component.d.ts +0 -12
- package/react/esm/components/filter-value-picker.component.js +0 -17
- package/react/esm/components/formula-draggable-field/index.d.ts +0 -1
- package/react/esm/components/formula-draggable-field/index.js +0 -1
- package/react/esm/components/formula-draggable-field/types.d.ts +0 -24
- package/react/esm/components/formula-draggable-field/types.js +0 -1
- package/react/esm/components/formula-field.component.d.ts +0 -14
- package/react/esm/components/formula-field.component.js +0 -19
- package/react/esm/components/interactive-viz-item/index.d.ts +0 -1
- package/react/esm/components/interactive-viz-item/index.js +0 -1
- package/react/esm/components/interactive-viz-item/types.d.ts +0 -117
- package/react/esm/components/interactive-viz-item/types.js +0 -16
- package/react/esm/components/interactive-viz-item.component.d.ts +0 -16
- package/react/esm/components/interactive-viz-item.component.js +0 -21
- package/react/esm/components/slot-menu/index.d.ts +0 -1
- package/react/esm/components/slot-menu/index.js +0 -1
- package/react/esm/components/slot-menu/types.d.ts +0 -24
- package/react/esm/components/slot-menu/types.js +0 -1
- package/react/esm/components/slot-menu-list.component.d.ts +0 -12
- package/react/esm/components/slot-menu-list.component.js +0 -17
- package/react/esm/components/slot-menu.component.d.ts +0 -22
- package/react/esm/components/slot-menu.component.js +0 -27
- package/react/esm/components/viz-item-menu/index.d.ts +0 -1
- package/react/esm/components/viz-item-menu/index.js +0 -1
- package/react/esm/components/viz-item-menu/types.d.ts +0 -9
- package/react/esm/components/viz-item-menu/types.js +0 -1
- package/react/esm/components/viz-item-menu.component.d.ts +0 -16
- package/react/esm/components/viz-item-menu.component.js +0 -21
- package/storybook/inject-global-vars.d.ts +0 -1
- package/storybook/register-components.d.ts +0 -51
- package/types/ai-chat.types.d.ts +0 -63
- package/types/data-field-events.types.d.ts +0 -7
- /package/react/{esm/components/ai-chat/empty-state/types.js → utils/formula/config/tests/build-datasets.test.d.ts} +0 -0
- /package/react/{esm/components/ai-chat/stream/types.js → utils/slot-content/tests/ad-hoc-slot-content.test.d.ts} +0 -0
- /package/{react/esm/components/ai-interaction-textarea/types.js → utils/formula/config/tests/build-datasets.test.d.ts} +0 -0
- /package/{react/esm/components/data-fields-select/types.js → utils/slot-content/tests/ad-hoc-slot-content.test.d.ts} +0 -0
|
@@ -0,0 +1,1637 @@
|
|
|
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
|
+
import { n as e, t } from "./localized-mixin-CBMYHOPv.js";
|
|
21
|
+
import { t as n } from "./data-broker-CVDImE1j.js";
|
|
22
|
+
import { c as r } from "./type-check-CGREdneG.js";
|
|
23
|
+
import { t as i } from "./localize-BT7REYBY.js";
|
|
24
|
+
import { n as a } from "./periods.const-NCTkxnvG.js";
|
|
25
|
+
import "./data-fields-select-DJFkrrPs.js";
|
|
26
|
+
import "./utils-DLTDAer5.js";
|
|
27
|
+
import { luzmoPlus as o, luzmoTrashOutline as s } from "@luzmo/icons";
|
|
28
|
+
import "@luzmo/lucero/button";
|
|
29
|
+
import "@luzmo/lucero/icon";
|
|
30
|
+
import { html as c, unsafeCSS as l } from "lit";
|
|
31
|
+
import { property as u, state as d } from "lit/decorators.js";
|
|
32
|
+
import { localized as f, msg as p } from "@lit/localize";
|
|
33
|
+
import "@luzmo/lucero/select";
|
|
34
|
+
import { repeat as m } from "lit/directives/repeat.js";
|
|
35
|
+
import "@luzmo/lucero/action-button";
|
|
36
|
+
import "@luzmo/lucero/field-label";
|
|
37
|
+
import "@luzmo/lucero/number-field";
|
|
38
|
+
import "@luzmo/lucero/picker";
|
|
39
|
+
import { ElementSizes as h, LuzmoElement as g, SizedMixin as _ } from "@luzmo/lucero/utils";
|
|
40
|
+
import { ifDefined as v } from "lit/directives/if-defined.js";
|
|
41
|
+
import "@luzmo/lucero/menu";
|
|
42
|
+
import "@luzmo/lucero/text-field";
|
|
43
|
+
import "@luzmo/lucero/date-time-picker";
|
|
44
|
+
//#region src/components/filters/transformations/transform-filters.ts
|
|
45
|
+
function y(e) {
|
|
46
|
+
return typeof e == "object" && !!e && "condition" in e && "filters" in e;
|
|
47
|
+
}
|
|
48
|
+
function b(e) {
|
|
49
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
50
|
+
}
|
|
51
|
+
function x(e) {
|
|
52
|
+
if (!Array.isArray(e) || e.length === 0) return [];
|
|
53
|
+
let t = b(e[0]) ? e[0] : void 0, n = e.length > 1 ? e[1] : void 0;
|
|
54
|
+
return e.length > 1 ? [t, n] : [t];
|
|
55
|
+
}
|
|
56
|
+
function S(e) {
|
|
57
|
+
return typeof e.expression != "string" || e.expression.length === 0 ? null : {
|
|
58
|
+
expression: e.expression,
|
|
59
|
+
parameters: x(e.parameters)
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function C(e) {
|
|
63
|
+
if (!e || !e.filters) return {
|
|
64
|
+
condition: "and",
|
|
65
|
+
filters: [],
|
|
66
|
+
subGroups: []
|
|
67
|
+
};
|
|
68
|
+
let t = [], n = [];
|
|
69
|
+
for (let r of e.filters) if (y(r)) n.push(C(r));
|
|
70
|
+
else {
|
|
71
|
+
let e = S(r);
|
|
72
|
+
e && t.push(e);
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
condition: e.condition?.toLowerCase() === "or" ? "or" : "and",
|
|
76
|
+
filters: t,
|
|
77
|
+
subGroups: n
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function w(e) {
|
|
81
|
+
return e ? [C(e)] : [];
|
|
82
|
+
}
|
|
83
|
+
function T(e) {
|
|
84
|
+
return {
|
|
85
|
+
expression: e.expression,
|
|
86
|
+
parameters: Array.isArray(e.parameters) ? [...e.parameters] : []
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function E(e) {
|
|
90
|
+
let t = e.subGroups ?? [];
|
|
91
|
+
return {
|
|
92
|
+
condition: e.condition === "or" ? "OR" : "AND",
|
|
93
|
+
filters: [...e.filters.map(T), ...t.map((e) => E(e))]
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
function D(e) {
|
|
97
|
+
return !e || e.length === 0 ? [] : e.map((e) => E(e));
|
|
98
|
+
}
|
|
99
|
+
//#endregion
|
|
100
|
+
//#region src/utils/filters/expressions.ts
|
|
101
|
+
var O = () => [
|
|
102
|
+
{
|
|
103
|
+
id: "? = ?",
|
|
104
|
+
key: "? = ?",
|
|
105
|
+
expression: "? = ?",
|
|
106
|
+
name: p("equals", { desc: "Filter expression for equals comparison" }),
|
|
107
|
+
description: p("equals", { desc: "Filter expression for equals comparison" }),
|
|
108
|
+
tiny: p("eq", { desc: "Short form of equals comparison" }),
|
|
109
|
+
type: ["numeric", "hierarchy"],
|
|
110
|
+
subtype: ["ip_address"]
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
id: "? != ?",
|
|
114
|
+
key: "? != ?",
|
|
115
|
+
expression: "? != ?",
|
|
116
|
+
name: p("not equals", { desc: "Filter expression for not equals comparison" }),
|
|
117
|
+
description: p("not equals", { desc: "Filter expression for not equals comparison" }),
|
|
118
|
+
tiny: p("not eq", { desc: "Short form of not equals comparison" }),
|
|
119
|
+
type: ["numeric", "hierarchy"],
|
|
120
|
+
subtype: ["ip_address"]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: "? in ?",
|
|
124
|
+
key: "? in ?",
|
|
125
|
+
expression: "? in ?",
|
|
126
|
+
name: p("is in", { desc: "Filter expression for in comparison" }),
|
|
127
|
+
description: p("is in", { desc: "Filter expression for in comparison" }),
|
|
128
|
+
tiny: p("is in", { desc: "Filter expression for in comparison" }),
|
|
129
|
+
type: ["numeric", "hierarchy"],
|
|
130
|
+
subtype: ["ip_address"]
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
id: "? not in ?",
|
|
134
|
+
key: "? not in ?",
|
|
135
|
+
expression: "? not in ?",
|
|
136
|
+
name: p("is not in", { desc: "Filter expression for not in comparison" }),
|
|
137
|
+
description: p("is not in", { desc: "Filter expression for not in comparison" }),
|
|
138
|
+
tiny: p("is not in", { desc: "Filter expression for not in comparison" }),
|
|
139
|
+
type: ["numeric", "hierarchy"],
|
|
140
|
+
subtype: ["ip_address"]
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
id: "? like ?",
|
|
144
|
+
key: "? like ?",
|
|
145
|
+
expression: "? like ?",
|
|
146
|
+
name: p("contains", { desc: "Filter expression for contains comparison" }),
|
|
147
|
+
description: p("contains", { desc: "Filter expression for contains comparison" }),
|
|
148
|
+
tiny: p("cont", { desc: "Short form of contains comparison in filter expression" }),
|
|
149
|
+
type: ["hierarchy"],
|
|
150
|
+
subtype: ["ip_address"]
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
id: "? not like ?",
|
|
154
|
+
key: "? not like ?",
|
|
155
|
+
expression: "? not like ?",
|
|
156
|
+
name: p("does not contain", { desc: "Filter expression for does not contain comparison" }),
|
|
157
|
+
description: p("does not contain", { desc: "Filter expression for does not contain comparison" }),
|
|
158
|
+
tiny: p("not cont", { desc: "Short form of does not contain comparison in filter expression" }),
|
|
159
|
+
type: ["hierarchy"],
|
|
160
|
+
subtype: ["ip_address"]
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
id: "? starts with ?",
|
|
164
|
+
key: "? starts with ?",
|
|
165
|
+
expression: "? starts with ?",
|
|
166
|
+
name: p("starts with", { desc: "Filter expression for starts with comparison" }),
|
|
167
|
+
description: p("starts with", { desc: "Filter expression for starts with comparison" }),
|
|
168
|
+
tiny: p("starts with", { desc: "Filter expression for starts with comparison" }),
|
|
169
|
+
type: ["hierarchy"],
|
|
170
|
+
subtype: ["ip_address"]
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
id: "? not starts with ?",
|
|
174
|
+
key: "? not starts with ?",
|
|
175
|
+
expression: "? not starts with ?",
|
|
176
|
+
name: p("does not start with", { desc: "Filter expression for does not start with comparison" }),
|
|
177
|
+
description: p("does not start with", { desc: "Filter expression for does not start with comparison" }),
|
|
178
|
+
tiny: p("not starts with", { desc: "Short form of does not start with comparison in filter expression" }),
|
|
179
|
+
type: ["hierarchy"],
|
|
180
|
+
subtype: ["ip_address"]
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
id: "? ends with ?",
|
|
184
|
+
key: "? ends with ?",
|
|
185
|
+
expression: "? ends with ?",
|
|
186
|
+
name: p("ends with", { desc: "Filter expression for ends with comparison" }),
|
|
187
|
+
description: p("ends with", { desc: "Filter expression for ends with comparison" }),
|
|
188
|
+
tiny: p("ends with", { desc: "Filter expression for ends with comparison" }),
|
|
189
|
+
type: ["hierarchy"],
|
|
190
|
+
subtype: ["ip_address"]
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
id: "? not ends with ?",
|
|
194
|
+
key: "? not ends with ?",
|
|
195
|
+
expression: "? not ends with ?",
|
|
196
|
+
name: p("does not end with", { desc: "Filter expression for does not end with comparison" }),
|
|
197
|
+
description: p("does not end with", { desc: "Filter expression for does not end with comparison" }),
|
|
198
|
+
tiny: p("not ends with", { desc: "Short form of does not end with comparison in filter expression" }),
|
|
199
|
+
type: ["hierarchy"],
|
|
200
|
+
subtype: ["ip_address"]
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
id: "? < ?",
|
|
204
|
+
key: "? < ?",
|
|
205
|
+
expression: "? < ?",
|
|
206
|
+
name: p("less than", { desc: "Filter expression for less than comparison" }),
|
|
207
|
+
description: p("less than", { desc: "Filter expression for less than comparison" }),
|
|
208
|
+
tiny: "<",
|
|
209
|
+
type: ["numeric", "datetime"],
|
|
210
|
+
subtype: ["ip_address"]
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
id: "? <= ?",
|
|
214
|
+
key: "? <= ?",
|
|
215
|
+
expression: "? <= ?",
|
|
216
|
+
name: p("less than or equal", { desc: "Filter expression for less than or equal comparison" }),
|
|
217
|
+
description: p("less than or equal", { desc: "Filter expression for less than or equal comparison" }),
|
|
218
|
+
tiny: "<=",
|
|
219
|
+
type: ["numeric", "datetime"],
|
|
220
|
+
subtype: ["ip_address"]
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
id: "? > ?",
|
|
224
|
+
key: "? > ?",
|
|
225
|
+
expression: "? > ?",
|
|
226
|
+
name: p("greater than", { desc: "Filter expression for greater than comparison" }),
|
|
227
|
+
description: p("greater than", { desc: "Filter expression for greater than comparison" }),
|
|
228
|
+
tiny: ">",
|
|
229
|
+
type: ["numeric", "datetime"],
|
|
230
|
+
subtype: ["ip_address"]
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
id: "? >= ?",
|
|
234
|
+
key: "? >= ?",
|
|
235
|
+
expression: "? >= ?",
|
|
236
|
+
name: p("greater than or equal", { desc: "Filter expression for greater than or equal comparison" }),
|
|
237
|
+
description: p("greater than or equal", { desc: "Filter expression for greater than or equal comparison" }),
|
|
238
|
+
tiny: ">=",
|
|
239
|
+
type: ["numeric", "datetime"],
|
|
240
|
+
subtype: ["ip_address"]
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
id: "? between ?",
|
|
244
|
+
key: "? between ?",
|
|
245
|
+
expression: "? between ?",
|
|
246
|
+
name: p("is between", { desc: "Filter expression for between comparison" }),
|
|
247
|
+
description: p("is between", { desc: "Filter expression for between comparison" }),
|
|
248
|
+
tiny: p("between", { desc: "Short form of between comparison in filter expression" }),
|
|
249
|
+
type: [],
|
|
250
|
+
subtype: ["ip_address"]
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
id: "last_now",
|
|
254
|
+
key: "last_now",
|
|
255
|
+
expression: "last_now",
|
|
256
|
+
name: p("last (x) periods", { desc: "Filter expression for last (x) periods" }),
|
|
257
|
+
description: p("last (x) periods", { desc: "Filter expression for last (x) periods" }),
|
|
258
|
+
tiny: p("last", { desc: "Short form of last (x) periods in filter expression" }),
|
|
259
|
+
type: ["datetime"]
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
id: "last_available",
|
|
263
|
+
key: "last_available",
|
|
264
|
+
expression: "last_available",
|
|
265
|
+
name: p("last (x) available periods", { desc: "Filter expression for last (x) available periods" }),
|
|
266
|
+
description: p("last (x) available periods", { desc: "Filter expression for last (x) available periods" }),
|
|
267
|
+
tiny: p("last available", { desc: "Short form of last (x) available periods in filter expression" }),
|
|
268
|
+
type: ["datetime"]
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
id: "last_completed",
|
|
272
|
+
key: "last_completed",
|
|
273
|
+
expression: "last_completed",
|
|
274
|
+
name: p("last completed period", { desc: "Filter expression for last completed period" }),
|
|
275
|
+
description: p("last completed (period)", { desc: "Filter expression for last completed period" }),
|
|
276
|
+
tiny: p("last completed", { desc: "Short form of last completed period in filter expression" }),
|
|
277
|
+
type: ["datetime"]
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
id: "next_now",
|
|
281
|
+
key: "next_now",
|
|
282
|
+
expression: "next_now",
|
|
283
|
+
name: p("next (x) periods", { desc: "Filter expression for next (x) periods" }),
|
|
284
|
+
description: p("next (x) periods", { desc: "Filter expression for next (x) periods" }),
|
|
285
|
+
tiny: p("next", { desc: "Short form of next (x) periods in filter expression" }),
|
|
286
|
+
type: ["datetime"]
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
id: "more_than_ago",
|
|
290
|
+
key: "more_than_ago",
|
|
291
|
+
expression: "more_than_ago",
|
|
292
|
+
name: p("more than (x) periods ago", { desc: "Filter expression for more than (x) periods ago" }),
|
|
293
|
+
description: p("more than (x) periods ago", { desc: "Filter expression for more than (x) periods ago" }),
|
|
294
|
+
tiny: p("more than ago", { desc: "Short form of more than (x) periods ago in filter expression" }),
|
|
295
|
+
type: ["datetime"]
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
id: "or_more_ago",
|
|
299
|
+
key: "or_more_ago",
|
|
300
|
+
expression: "or_more_ago",
|
|
301
|
+
name: p("(x) periods or more ago", { desc: "Filter expression for (x) periods or more ago" }),
|
|
302
|
+
description: p("(x) periods or more ago", { desc: "Filter expression for (x) periods or more ago" }),
|
|
303
|
+
tiny: p("or more ago", { desc: "Short form of (x) periods or more ago in filter expression" }),
|
|
304
|
+
type: ["datetime"]
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
id: "next_full",
|
|
308
|
+
key: "next_full",
|
|
309
|
+
expression: "next_full",
|
|
310
|
+
name: p("next full (period)", { desc: "Filter expression for next full period" }),
|
|
311
|
+
description: p("next full (period)", { desc: "Filter expression for next full period" }),
|
|
312
|
+
tiny: p("next full", { desc: "Short form of next full period in filter expression" }),
|
|
313
|
+
type: ["datetime"]
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
id: "WTD",
|
|
317
|
+
key: "to_date",
|
|
318
|
+
expression: "to_date",
|
|
319
|
+
unit: 4,
|
|
320
|
+
name: p("week to date", { desc: "Filter expression for week to date" }),
|
|
321
|
+
description: p("week to date", { desc: "Filter expression for week to date" }),
|
|
322
|
+
tiny: p("WTD", { desc: "Short form of week to date in filter expression" }),
|
|
323
|
+
type: ["datetime"]
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
id: "MTD",
|
|
327
|
+
key: "to_date",
|
|
328
|
+
expression: "to_date",
|
|
329
|
+
unit: 3,
|
|
330
|
+
name: p("month to date", { desc: "Filter expression for month to date" }),
|
|
331
|
+
description: p("month to date", { desc: "Filter expression for month to date" }),
|
|
332
|
+
tiny: p("MTD", { desc: "Short form of month to date in filter expression" }),
|
|
333
|
+
type: ["datetime"]
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
id: "QTD",
|
|
337
|
+
key: "to_date",
|
|
338
|
+
expression: "to_date",
|
|
339
|
+
unit: 2,
|
|
340
|
+
name: p("quarter to date", { desc: "Filter expression for quarter to date" }),
|
|
341
|
+
description: p("quarter to date", { desc: "Filter expression for quarter to date" }),
|
|
342
|
+
tiny: p("QTD", { desc: "Short form of quarter to date in filter expression" }),
|
|
343
|
+
type: ["datetime"]
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
id: "YTD",
|
|
347
|
+
key: "to_date",
|
|
348
|
+
expression: "to_date",
|
|
349
|
+
unit: 1,
|
|
350
|
+
name: p("year to date", { desc: "Filter expression for year to date" }),
|
|
351
|
+
description: p("year to date", { desc: "Filter expression for year to date" }),
|
|
352
|
+
tiny: p("YTD", { desc: "Short form of year to date in filter expression" }),
|
|
353
|
+
type: ["datetime"]
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
id: "? is null",
|
|
357
|
+
key: "? is null",
|
|
358
|
+
expression: "? is null",
|
|
359
|
+
name: p("is missing", { desc: "Filter expression for is missing" }),
|
|
360
|
+
description: p("is missing", { desc: "Filter expression for is missing" }),
|
|
361
|
+
tiny: p("missing", { desc: "Short form of is missing in filter expression" }),
|
|
362
|
+
type: [
|
|
363
|
+
"numeric",
|
|
364
|
+
"datetime",
|
|
365
|
+
"hierarchy",
|
|
366
|
+
"spatial"
|
|
367
|
+
],
|
|
368
|
+
subtype: ["ip_address"]
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
id: "? is not null",
|
|
372
|
+
key: "? is not null",
|
|
373
|
+
expression: "? is not null",
|
|
374
|
+
name: p("is not missing", { desc: "Filter expression for is not missing" }),
|
|
375
|
+
description: p("is not missing", { desc: "Filter expression for is not missing" }),
|
|
376
|
+
tiny: p("not missing", { desc: "Short form of is not missing in filter expression" }),
|
|
377
|
+
type: [
|
|
378
|
+
"numeric",
|
|
379
|
+
"datetime",
|
|
380
|
+
"hierarchy",
|
|
381
|
+
"spatial"
|
|
382
|
+
],
|
|
383
|
+
subtype: ["ip_address"]
|
|
384
|
+
}
|
|
385
|
+
], k = (e, t, n) => {
|
|
386
|
+
let r = new Set(["? in ?", "? not in ?"]);
|
|
387
|
+
return !e && !t ? O() : O().filter((i) => (e && i.type.includes(e) || t && i.subtype?.includes(t)) && !(n && r.has(i.key)));
|
|
388
|
+
}, A = ":host{font-family:var(--luzmo-font-family);--var:blue}", j = class extends t(_(g, { validSizes: Object.values(h) })) {
|
|
389
|
+
constructor(...e) {
|
|
390
|
+
super(...e), this.hasLabel = !1, this.allowEmpty = !1, this.placeholder = "", this.disabled = !1, this.invalid = !1, this.isFormula = !1, this._expressionConfigurations = O();
|
|
391
|
+
}
|
|
392
|
+
static get styles() {
|
|
393
|
+
return [l(A)];
|
|
394
|
+
}
|
|
395
|
+
_sendChangeEvent() {
|
|
396
|
+
if (this.disabled) return;
|
|
397
|
+
let e = { expression: this.filter?.expression };
|
|
398
|
+
this.filter?.parameters?.[1]?.unit && (e.unit = this.filter?.parameters?.[1]?.unit), this.dispatchEvent(new CustomEvent("luzmo-expression-selected", {
|
|
399
|
+
bubbles: !0,
|
|
400
|
+
composed: !0,
|
|
401
|
+
cancelable: !0,
|
|
402
|
+
detail: e
|
|
403
|
+
}));
|
|
404
|
+
}
|
|
405
|
+
setExpression(e) {
|
|
406
|
+
this._richExpression = e?.detail?.value?.[0];
|
|
407
|
+
let t = this._expressionConfigurations.find((e) => e.id === this._richExpression), n = structuredClone(this.filter);
|
|
408
|
+
n.expression = t?.expression, t?.unit && (this._unit = t.unit, n?.parameters[0] && (n.parameters[1] = { unit: this._unit })), this.filter = n, this._sendChangeEvent();
|
|
409
|
+
}
|
|
410
|
+
willUpdate(e) {
|
|
411
|
+
super.willUpdate(e);
|
|
412
|
+
let t = e.has("filter"), n = e.has("type"), r = e.has("subtype"), i = e.has("isFormula"), a = k(this.type, this.subtype, this.isFormula), o = [
|
|
413
|
+
"YTD",
|
|
414
|
+
"QTD",
|
|
415
|
+
"MTD",
|
|
416
|
+
"WTD"
|
|
417
|
+
];
|
|
418
|
+
if (this.filter?.expression === "to_date") {
|
|
419
|
+
let e = this.filter?.parameters[1]?.unit ?? 1;
|
|
420
|
+
this._unit = e, this._richExpression = o[e - 1] ?? "YTD";
|
|
421
|
+
} else this._richExpression = this.filter?.expression;
|
|
422
|
+
(n || r || i || t) && this.filter && !this.disabled && !a?.find((e) => e.expression === this.filter?.expression) ? (this.invalid = !0, console.warn(`Warning: ${this.filter?.expression} is not valid given the type: ${this.type} and subtype: ${this.subtype}`)) : this.invalid = !1, !this.filter?.expression && !this.allowEmpty && (this._richExpression = a?.[0]?.id, this.filter = {
|
|
423
|
+
...this.filter,
|
|
424
|
+
expression: this._richExpression
|
|
425
|
+
}, this._sendChangeEvent());
|
|
426
|
+
}
|
|
427
|
+
render() {
|
|
428
|
+
let e = k(this.type, this.subtype, this.isFormula)?.map((e) => ({
|
|
429
|
+
value: e.id,
|
|
430
|
+
label: e.description,
|
|
431
|
+
shortLabel: e.tiny
|
|
432
|
+
})), t = this.disabled || !this.filter?.expression && !this.allowEmpty, n = c`<luzmo-field-label
|
|
433
|
+
for="expression"
|
|
434
|
+
size=${this.size}
|
|
435
|
+
>${this.label ?? p("Select an expression", { desc: "Label for expression picker" })}</luzmo-field-label
|
|
436
|
+
>`, r = this.hasLabel ? this.placeholder ?? p("Select...") : this.placeholder || this.label || p("Filter expression", { desc: "Accessible label for expression picker" });
|
|
437
|
+
return c`${this.hasLabel ? n : ""}
|
|
438
|
+
<luzmo-select
|
|
439
|
+
label=${r}
|
|
440
|
+
id="expression"
|
|
441
|
+
size=${this.size}
|
|
442
|
+
variant="highlight"
|
|
443
|
+
selects="single"
|
|
444
|
+
.language=${this.language}
|
|
445
|
+
?disabled=${t}
|
|
446
|
+
?invalid=${this.invalid}
|
|
447
|
+
.options=${e}
|
|
448
|
+
.value=${[this._richExpression]}
|
|
449
|
+
@change=${this.setExpression}
|
|
450
|
+
>
|
|
451
|
+
</luzmo-select>`;
|
|
452
|
+
}
|
|
453
|
+
};
|
|
454
|
+
//#endregion
|
|
455
|
+
//#region src/components/filter-expression-picker/index.ts
|
|
456
|
+
e([u({
|
|
457
|
+
type: String,
|
|
458
|
+
reflect: !0
|
|
459
|
+
})], j.prototype, "filter", void 0), e([u({
|
|
460
|
+
type: Boolean,
|
|
461
|
+
attribute: "has-label",
|
|
462
|
+
reflect: !0
|
|
463
|
+
})], j.prototype, "hasLabel", void 0), e([u({
|
|
464
|
+
type: String,
|
|
465
|
+
reflect: !0
|
|
466
|
+
})], j.prototype, "label", void 0), e([u({
|
|
467
|
+
type: Boolean,
|
|
468
|
+
attribute: "allow-empty",
|
|
469
|
+
reflect: !0
|
|
470
|
+
})], j.prototype, "allowEmpty", void 0), e([u({
|
|
471
|
+
type: String,
|
|
472
|
+
attribute: "placeholder",
|
|
473
|
+
reflect: !0
|
|
474
|
+
})], j.prototype, "placeholder", void 0), e([u({
|
|
475
|
+
type: Boolean,
|
|
476
|
+
attribute: "disabled",
|
|
477
|
+
reflect: !0
|
|
478
|
+
})], j.prototype, "disabled", void 0), e([u({
|
|
479
|
+
type: String,
|
|
480
|
+
attribute: "type",
|
|
481
|
+
reflect: !0
|
|
482
|
+
})], j.prototype, "type", void 0), e([u({
|
|
483
|
+
type: String,
|
|
484
|
+
attribute: "subtype",
|
|
485
|
+
reflect: !0
|
|
486
|
+
})], j.prototype, "subtype", void 0), e([u({
|
|
487
|
+
type: Boolean,
|
|
488
|
+
attribute: "invalid",
|
|
489
|
+
reflect: !0
|
|
490
|
+
})], j.prototype, "invalid", void 0), e([u({
|
|
491
|
+
type: Boolean,
|
|
492
|
+
attribute: "is-formula",
|
|
493
|
+
reflect: !0
|
|
494
|
+
})], j.prototype, "isFormula", void 0), e([d()], j.prototype, "_richExpression", void 0), e([d()], j.prototype, "_unit", void 0), j = e([f()], j), customElements.get("luzmo-filter-expression-picker") || customElements.define("luzmo-filter-expression-picker", j);
|
|
495
|
+
//#endregion
|
|
496
|
+
//#region src/components/filter-value-picker/filter-value-picker.module.scss?inline
|
|
497
|
+
var M = ":host{--var:blue}", N = ":host{gap:var(--luzmo-filter-value-picker-datetime-gap,var(--filter-value-picker-datetime-gap));--filter-value-picker-datetime-gap:var(--luzmo-spacing-3);flex-direction:row;flex-shrink:1;min-width:0;display:flex}: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)}", P = class extends t(_(g, { validSizes: Object.values(h) })) {
|
|
498
|
+
constructor(...e) {
|
|
499
|
+
super(...e), this.contentLanguage = "en";
|
|
500
|
+
}
|
|
501
|
+
static get styles() {
|
|
502
|
+
return [l(N)];
|
|
503
|
+
}
|
|
504
|
+
willUpdate(e) {
|
|
505
|
+
super.willUpdate(e), e.get("filter") && ([
|
|
506
|
+
"last_now",
|
|
507
|
+
"last_available",
|
|
508
|
+
"next_now",
|
|
509
|
+
"more_than_ago",
|
|
510
|
+
"or_more_ago"
|
|
511
|
+
].includes(this.filter?.expression) ? this.filter.parameters[1] = {
|
|
512
|
+
quantity: this.filter?.parameters?.[1]?.quantity ?? 1,
|
|
513
|
+
unit: this.filter?.parameters?.[1]?.unit ?? 1
|
|
514
|
+
} : [
|
|
515
|
+
"last_completed",
|
|
516
|
+
"next_full",
|
|
517
|
+
"to_date"
|
|
518
|
+
].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] : (/* @__PURE__ */ new Date()).toISOString());
|
|
519
|
+
}
|
|
520
|
+
_sendChangeEvent() {
|
|
521
|
+
this.filter.parameters = [{ ...this.filter?.parameters?.[0] }, this._value], this.dispatchEvent(new CustomEvent("luzmo-filter-value-changed", {
|
|
522
|
+
bubbles: !0,
|
|
523
|
+
composed: !0,
|
|
524
|
+
cancelable: !0,
|
|
525
|
+
detail: { value: this._value }
|
|
526
|
+
}));
|
|
527
|
+
}
|
|
528
|
+
setDate(e) {
|
|
529
|
+
this._value = e.detail.value, this._value !== this.filter?.parameters?.[1] && this._sendChangeEvent();
|
|
530
|
+
}
|
|
531
|
+
setUnit(e) {
|
|
532
|
+
let t = a.find((t) => t.key === e?.target?.value)?.level;
|
|
533
|
+
this.filter?.parameters?.[1]?.unit !== t && (this._value = {
|
|
534
|
+
unit: t ?? 1,
|
|
535
|
+
quantity: this.filter?.parameters?.[1]?.quantity ?? 1
|
|
536
|
+
}, this._sendChangeEvent());
|
|
537
|
+
}
|
|
538
|
+
setQuantity(e) {
|
|
539
|
+
let t = e?.target?.value;
|
|
540
|
+
this.filter?.parameters?.[1]?.quantity !== t && (this._value = {
|
|
541
|
+
quantity: t,
|
|
542
|
+
unit: this.filter?.parameters?.[1]?.unit ?? 1
|
|
543
|
+
}, this._sendChangeEvent());
|
|
544
|
+
}
|
|
545
|
+
renderDatePicker() {
|
|
546
|
+
let e = "second";
|
|
547
|
+
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"), c`<luzmo-date-time-picker
|
|
548
|
+
aria-label=${p("Filter date", { desc: "Aria label for filter date picker" })}
|
|
549
|
+
.size=${this.size}
|
|
550
|
+
.precision=${e}
|
|
551
|
+
.timeZone=${this.timeZone}
|
|
552
|
+
@change=${this.setDate}
|
|
553
|
+
.value=${this.filter?.parameters?.[1]}
|
|
554
|
+
></luzmo-date-time-picker>`;
|
|
555
|
+
}
|
|
556
|
+
renderQuantityField() {
|
|
557
|
+
return c`<luzmo-number-field
|
|
558
|
+
label=${p("Quantity", { desc: "Label for quantity number field" })}
|
|
559
|
+
.size=${this.size}
|
|
560
|
+
.value=${this.filter?.parameters?.[1]?.quantity}
|
|
561
|
+
@input=${this.setQuantity}
|
|
562
|
+
@change=${this.setQuantity}
|
|
563
|
+
></luzmo-number-field>`;
|
|
564
|
+
}
|
|
565
|
+
renderUnitPicker() {
|
|
566
|
+
let e = a.map((e) => c`<luzmo-menu-item .value=${e.key}>
|
|
567
|
+
${e.i18n()}
|
|
568
|
+
</luzmo-menu-item>`), t = a.find((e) => e.level === this.filter?.parameters?.[1]?.unit)?.key ?? a?.[0]?.key;
|
|
569
|
+
return c`<luzmo-picker
|
|
570
|
+
.label=${p("Time unit", { desc: "Aria label for time unit picker" })}
|
|
571
|
+
.size=${this.size}
|
|
572
|
+
.value=${t}
|
|
573
|
+
@change=${this.setUnit}
|
|
574
|
+
variant="highlight"
|
|
575
|
+
>${e}</luzmo-picker
|
|
576
|
+
>`;
|
|
577
|
+
}
|
|
578
|
+
render() {
|
|
579
|
+
let e = this.filter?.expression;
|
|
580
|
+
return [
|
|
581
|
+
"last_now",
|
|
582
|
+
"last_available",
|
|
583
|
+
"next_now",
|
|
584
|
+
"more_than_ago",
|
|
585
|
+
"or_more_ago"
|
|
586
|
+
].includes(e) ? c`${this.renderQuantityField()}${this.renderUnitPicker()}` : ["last_completed", "next_full"].includes(e) ? this.renderUnitPicker() : this.renderDatePicker();
|
|
587
|
+
}
|
|
588
|
+
};
|
|
589
|
+
//#endregion
|
|
590
|
+
//#region src/components/filter-value-picker-datetime/index.ts
|
|
591
|
+
e([u({
|
|
592
|
+
type: String,
|
|
593
|
+
attribute: "content-language",
|
|
594
|
+
reflect: !0
|
|
595
|
+
})], P.prototype, "contentLanguage", void 0), e([u({
|
|
596
|
+
type: String,
|
|
597
|
+
attribute: "time-zone",
|
|
598
|
+
reflect: !0
|
|
599
|
+
})], P.prototype, "timeZone", void 0), e([u({
|
|
600
|
+
type: Object,
|
|
601
|
+
reflect: !1
|
|
602
|
+
})], P.prototype, "filter", void 0), P = e([f()], P), customElements.get("luzmo-filter-value-picker-datetime") || customElements.define("luzmo-filter-value-picker-datetime", P);
|
|
603
|
+
//#endregion
|
|
604
|
+
//#region src/components/filter-value-picker-hierarchy/filter-value-picker-hierarchy.module.scss?inline
|
|
605
|
+
var F = ".missing-value{color:var(--luzmo-filter-value-picker-hierarchy-missing-value-color,#767676)}:host{--var:blue}", I = 5e3, L = class extends t(_(g, { validSizes: Object.values(h) })) {
|
|
606
|
+
constructor(...e) {
|
|
607
|
+
super(...e), this.contentLanguage = "en", this._hierarchyValues = [], this._retrieving = !0, this._search = "", this._error = null, this._allValuesRetrieved = !1, this._runningQueries = [];
|
|
608
|
+
}
|
|
609
|
+
static get styles() {
|
|
610
|
+
return [l(F)];
|
|
611
|
+
}
|
|
612
|
+
connectedCallback() {
|
|
613
|
+
super.connectedCallback();
|
|
614
|
+
let e = {};
|
|
615
|
+
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.configure(e);
|
|
616
|
+
}
|
|
617
|
+
willUpdate(e) {
|
|
618
|
+
if (super.willUpdate(e), e.has("filter") && this.filter) {
|
|
619
|
+
let t = e.get("filter")?.expression;
|
|
620
|
+
(e.get("filter")?.parameters?.[0]?.columnId || e.get("filter")?.parameters?.[0]?.formulaId) !== (this.filter?.parameters?.[0]?.columnId || this.filter?.parameters?.[0]?.formulaId) && ([
|
|
621
|
+
"? in ?",
|
|
622
|
+
"? not in ?",
|
|
623
|
+
"? = ?",
|
|
624
|
+
"? != ?"
|
|
625
|
+
].includes(this.filter?.expression) || ![
|
|
626
|
+
"? in ?",
|
|
627
|
+
"? not in ?",
|
|
628
|
+
"? = ?",
|
|
629
|
+
"? != ?"
|
|
630
|
+
].includes(t)) && (this._hierarchyValues = [], this._allValuesRetrieved = !1, this._retrieving = !0);
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
async _fetchHierarchyValues(e = 0) {
|
|
634
|
+
if (this._allValuesRetrieved) {
|
|
635
|
+
this._retrieving = !1;
|
|
636
|
+
return;
|
|
637
|
+
}
|
|
638
|
+
if (!this.filter?.parameters?.[0]) {
|
|
639
|
+
this._retrieving = !1, this._error = "Missing column parameters";
|
|
640
|
+
return;
|
|
641
|
+
}
|
|
642
|
+
let t = this.filter.parameters[0], r = t.columnId, i = t.formulaId, a = t.datasetId;
|
|
643
|
+
if (!r && !i) {
|
|
644
|
+
this._retrieving = !1, this._error = "Missing column id or formula id";
|
|
645
|
+
return;
|
|
646
|
+
} else if (!a) {
|
|
647
|
+
this._retrieving = !1, this._error = "Missing dataset id";
|
|
648
|
+
return;
|
|
649
|
+
}
|
|
650
|
+
this._retrieving = !0, this._error = null;
|
|
651
|
+
let o = {
|
|
652
|
+
expression: "? like ?",
|
|
653
|
+
parameters: [{
|
|
654
|
+
column_id: r,
|
|
655
|
+
formula_id: i,
|
|
656
|
+
dataset_id: a
|
|
657
|
+
}, this._search]
|
|
658
|
+
}, s = {
|
|
659
|
+
dimensions: [{
|
|
660
|
+
column_id: r,
|
|
661
|
+
formula_id: i,
|
|
662
|
+
dataset_id: a
|
|
663
|
+
}],
|
|
664
|
+
where: [],
|
|
665
|
+
order: [{
|
|
666
|
+
column_id: r,
|
|
667
|
+
formula_id: i,
|
|
668
|
+
dataset_id: a,
|
|
669
|
+
order: "asc"
|
|
670
|
+
}],
|
|
671
|
+
limit: {
|
|
672
|
+
by: I,
|
|
673
|
+
offset: e
|
|
674
|
+
}
|
|
675
|
+
};
|
|
676
|
+
this._search && this._allValuesRetrieved && s.where.push(o);
|
|
677
|
+
let c = new AbortController(), l = new Promise((e, t) => {
|
|
678
|
+
n.fetchData(s).then(e).catch(t), c.signal.addEventListener("abort", () => {
|
|
679
|
+
console.warn("Request aborted"), t({ status: "aborted" });
|
|
680
|
+
});
|
|
681
|
+
}), u = {
|
|
682
|
+
promise: l,
|
|
683
|
+
abortController: c
|
|
684
|
+
};
|
|
685
|
+
this._runningQueries.push(u);
|
|
686
|
+
try {
|
|
687
|
+
let t = await l, n = t && Array.isArray(t.data) ? t.data.map((e) => e[0]) : [];
|
|
688
|
+
this._search || (this._allValuesRetrieved = n.length < I), this._hierarchyValues = e > 0 ? [...this._hierarchyValues, ...n] : n;
|
|
689
|
+
} catch (e) {
|
|
690
|
+
if (e?.status === "aborted") return;
|
|
691
|
+
this._error = e instanceof Error ? e.message : "Unknown error", this._hierarchyValues = [];
|
|
692
|
+
} finally {
|
|
693
|
+
this._runningQueries = this._runningQueries.filter((e) => e.promise !== l), this._retrieving = !1;
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
_sendChangeEvent() {
|
|
697
|
+
this.dispatchEvent(new CustomEvent("luzmo-filter-value-changed", {
|
|
698
|
+
bubbles: !0,
|
|
699
|
+
composed: !0,
|
|
700
|
+
cancelable: !0,
|
|
701
|
+
detail: { value: this._value }
|
|
702
|
+
}));
|
|
703
|
+
}
|
|
704
|
+
setHierarchy(e) {
|
|
705
|
+
let t;
|
|
706
|
+
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 = {
|
|
707
|
+
...this.filter,
|
|
708
|
+
parameters: [{ ...this.filter?.parameters?.[0] }, this._value]
|
|
709
|
+
}, this._sendChangeEvent());
|
|
710
|
+
}
|
|
711
|
+
onScrolled(e) {
|
|
712
|
+
!this._retrieving && !this._allValuesRetrieved && e?.detail?.last === this._hierarchyValues.length - 1 && this._fetchHierarchyValues(this._hierarchyValues.length);
|
|
713
|
+
}
|
|
714
|
+
renderTextField() {
|
|
715
|
+
return c`<luzmo-text-field
|
|
716
|
+
label=${p("Filter value", { desc: "Label for filter value text field" })}
|
|
717
|
+
.size=${this.size}
|
|
718
|
+
@change=${this.setHierarchy}
|
|
719
|
+
@input=${this.setHierarchy}
|
|
720
|
+
.value=${this.filter?.parameters?.[1] ?? ""}
|
|
721
|
+
></luzmo-text-field>`;
|
|
722
|
+
}
|
|
723
|
+
setSearchString(e) {
|
|
724
|
+
this._search = e?.detail?.string ?? "", this._allValuesRetrieved || (this._searchQueryTimeout && (this._runningQueries.forEach((e) => {
|
|
725
|
+
e?.abortController && e.abortController.abort();
|
|
726
|
+
}), this._runningQueries = [], clearTimeout(this._searchQueryTimeout)), this._searchQueryTimeout = setTimeout(() => {
|
|
727
|
+
this._fetchHierarchyValues();
|
|
728
|
+
}, 500));
|
|
729
|
+
}
|
|
730
|
+
resetSearchString() {
|
|
731
|
+
this._search = "";
|
|
732
|
+
}
|
|
733
|
+
onOpened() {
|
|
734
|
+
this._fetchHierarchyValues();
|
|
735
|
+
}
|
|
736
|
+
renderHierarchyPicker() {
|
|
737
|
+
if (this._error) return c`<div class="error" role="alert">Error: ${this._error}</div>`;
|
|
738
|
+
let e = (this._search ? this._hierarchyValues.filter((e) => i(e.name, this.contentLanguage, { allowEmpty: !0 })?.toLowerCase().includes(this._search.toLowerCase()) || e.toString().toLowerCase().includes(this._search.toLowerCase())) : this._hierarchyValues).map((e) => {
|
|
739
|
+
let t = i(e?.name, this.contentLanguage) ?? "N/A";
|
|
740
|
+
return typeof t != "string" && (t = "N/A"), {
|
|
741
|
+
value: e?.id,
|
|
742
|
+
label: t
|
|
743
|
+
};
|
|
744
|
+
}), t = this.filter?.expression, n = ["? = ?", "? != ?"].includes(t), r = p("Selected {count} items"), a = p("Search"), o = p("No data"), s = p("No results"), l = p("Select...");
|
|
745
|
+
return c`<luzmo-select
|
|
746
|
+
.size=${this.size}
|
|
747
|
+
.label=${l}
|
|
748
|
+
.retrieving=${this._retrieving}
|
|
749
|
+
.selects=${n ? "single" : "multiple"}
|
|
750
|
+
.variant=${n ? "highlight" : "checkboxes"}
|
|
751
|
+
emphasized
|
|
752
|
+
no-wrap
|
|
753
|
+
?invalid=${!!this._error}
|
|
754
|
+
.multipleLabelTemplate=${r}
|
|
755
|
+
.searchLabel=${a}
|
|
756
|
+
.noDataLabel=${o}
|
|
757
|
+
.noResultsLabel=${s}
|
|
758
|
+
@change=${this.setHierarchy}
|
|
759
|
+
@luzmo-search=${this.setSearchString}
|
|
760
|
+
@luzmo-opened=${this.onOpened}
|
|
761
|
+
@luzmo-closed=${this.resetSearchString}
|
|
762
|
+
@luzmo-scrolled=${this.onScrolled}
|
|
763
|
+
.options=${e}
|
|
764
|
+
.value=${n ? [this.filter?.parameters?.[1]] : this.filter?.parameters?.[1]}
|
|
765
|
+
>
|
|
766
|
+
</luzmo-select>`;
|
|
767
|
+
}
|
|
768
|
+
render() {
|
|
769
|
+
let e = this.filter?.expression;
|
|
770
|
+
return [
|
|
771
|
+
"? in ?",
|
|
772
|
+
"? not in ?",
|
|
773
|
+
"? = ?",
|
|
774
|
+
"? != ?"
|
|
775
|
+
].includes(e) ? this.renderHierarchyPicker() : this.renderTextField();
|
|
776
|
+
}
|
|
777
|
+
};
|
|
778
|
+
//#endregion
|
|
779
|
+
//#region src/components/filter-value-picker-hierarchy/index.ts
|
|
780
|
+
e([u({
|
|
781
|
+
type: String,
|
|
782
|
+
attribute: "api-url",
|
|
783
|
+
reflect: !0
|
|
784
|
+
})], L.prototype, "apiUrl", void 0), e([u({
|
|
785
|
+
type: String,
|
|
786
|
+
attribute: "auth-key",
|
|
787
|
+
reflect: !0
|
|
788
|
+
})], L.prototype, "authKey", void 0), e([u({
|
|
789
|
+
type: String,
|
|
790
|
+
attribute: "auth-token",
|
|
791
|
+
reflect: !0
|
|
792
|
+
})], L.prototype, "authToken", void 0), e([u({
|
|
793
|
+
type: Number,
|
|
794
|
+
attribute: "cache-time",
|
|
795
|
+
reflect: !0
|
|
796
|
+
})], L.prototype, "cacheTime", void 0), e([u({
|
|
797
|
+
type: String,
|
|
798
|
+
attribute: "content-language",
|
|
799
|
+
reflect: !0
|
|
800
|
+
})], L.prototype, "contentLanguage", void 0), e([u({
|
|
801
|
+
type: Object,
|
|
802
|
+
reflect: !1
|
|
803
|
+
})], L.prototype, "filter", void 0), e([d()], L.prototype, "_hierarchyValues", void 0), e([d()], L.prototype, "_retrieving", void 0), e([d()], L.prototype, "_search", void 0), e([d()], L.prototype, "_error", void 0), L = e([f()], L), customElements.get("luzmo-filter-value-picker-hierarchy") || customElements.define("luzmo-filter-value-picker-hierarchy", L);
|
|
804
|
+
//#endregion
|
|
805
|
+
//#region src/components/filter-value-picker-numeric/filter-value-picker-numeric.module.scss?inline
|
|
806
|
+
var R = ".missing-value{opacity:.4}:host{--var:blue}", z = 5e3, B = class extends t(_(g, { validSizes: Object.values(h) })) {
|
|
807
|
+
constructor(...e) {
|
|
808
|
+
super(...e), this.contentLanguage = "en", this._numericValues = [], this._retrieving = !0, this._search = "", this._error = null, this._allValuesRetrieved = !1, this._runningQueries = [];
|
|
809
|
+
}
|
|
810
|
+
static get styles() {
|
|
811
|
+
return [l(R)];
|
|
812
|
+
}
|
|
813
|
+
connectedCallback() {
|
|
814
|
+
super.connectedCallback();
|
|
815
|
+
let e = {};
|
|
816
|
+
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.configure(e);
|
|
817
|
+
}
|
|
818
|
+
willUpdate(e) {
|
|
819
|
+
if (super.willUpdate(e), e.has("filter") && this.filter) {
|
|
820
|
+
let t = e.get("filter")?.expression, n = this.filter?.expression;
|
|
821
|
+
((e.get("filter")?.parameters?.[0]?.columnId || e.get("filter")?.parameters?.[0]?.formulaId) !== (this.filter?.parameters?.[0]?.columnId || this.filter?.parameters?.[0]?.formulaId) || !["? in ?", "? not in ?"].includes(t)) && ["? in ?", "? not in ?"].includes(n) && (this._numericValues = [], this._allValuesRetrieved = !1, this._retrieving = !0);
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
async _fetchNumericValues(e = 0) {
|
|
825
|
+
if (this._allValuesRetrieved) {
|
|
826
|
+
this._retrieving = !1;
|
|
827
|
+
return;
|
|
828
|
+
}
|
|
829
|
+
if (!this.filter?.parameters?.[0]) {
|
|
830
|
+
this._retrieving = !1, this._error = "Missing column parameters";
|
|
831
|
+
return;
|
|
832
|
+
}
|
|
833
|
+
let t = this.filter.parameters[0], r = t.columnId, i = t.formulaId, a = t.datasetId;
|
|
834
|
+
if (!r && !i) {
|
|
835
|
+
this._retrieving = !1, this._error = "Missing column id or formula id";
|
|
836
|
+
return;
|
|
837
|
+
} else if (!a) {
|
|
838
|
+
this._retrieving = !1, this._error = "Missing dataset id";
|
|
839
|
+
return;
|
|
840
|
+
}
|
|
841
|
+
this._retrieving = !0, this._error = null;
|
|
842
|
+
let o = {
|
|
843
|
+
expression: "? like ?",
|
|
844
|
+
parameters: [{
|
|
845
|
+
dataset_id: a,
|
|
846
|
+
expression: `CAST({${a}:${r ?? i}},hierarchy)`
|
|
847
|
+
}, this._search]
|
|
848
|
+
}, s = {
|
|
849
|
+
dimensions: [{
|
|
850
|
+
column_id: r,
|
|
851
|
+
formula_id: i,
|
|
852
|
+
dataset_id: a
|
|
853
|
+
}],
|
|
854
|
+
where: [],
|
|
855
|
+
order: [{
|
|
856
|
+
column_id: r,
|
|
857
|
+
formula_id: i,
|
|
858
|
+
dataset_id: a,
|
|
859
|
+
order: "asc"
|
|
860
|
+
}],
|
|
861
|
+
limit: {
|
|
862
|
+
by: z,
|
|
863
|
+
offset: e
|
|
864
|
+
}
|
|
865
|
+
};
|
|
866
|
+
this._search && !this._allValuesRetrieved && s.where.push(o);
|
|
867
|
+
let c = new AbortController(), l = new Promise((e, t) => {
|
|
868
|
+
n.fetchData(s).then(e).catch(t), c.signal.addEventListener("abort", () => {
|
|
869
|
+
console.warn("Request aborted"), t({ status: "aborted" });
|
|
870
|
+
});
|
|
871
|
+
}), u = {
|
|
872
|
+
promise: l,
|
|
873
|
+
abortController: c
|
|
874
|
+
};
|
|
875
|
+
this._runningQueries.push(u);
|
|
876
|
+
try {
|
|
877
|
+
let t = await l, n = t && Array.isArray(t.data) ? t.data.map((e) => e[0]) : [];
|
|
878
|
+
this._search || (this._allValuesRetrieved = n.length < z), this._numericValues = e > 0 ? [...this._numericValues, ...n] : n;
|
|
879
|
+
} catch (e) {
|
|
880
|
+
if (e?.status === "aborted") return;
|
|
881
|
+
this._error = e instanceof Error ? e.message : "Unknown error", this._numericValues = [];
|
|
882
|
+
} finally {
|
|
883
|
+
this._runningQueries = this._runningQueries.filter((e) => e.promise !== l), this._retrieving = !1;
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
_sendChangeEvent() {
|
|
887
|
+
this.dispatchEvent(new CustomEvent("luzmo-filter-value-changed", {
|
|
888
|
+
bubbles: !0,
|
|
889
|
+
composed: !0,
|
|
890
|
+
cancelable: !0,
|
|
891
|
+
detail: { value: this._value }
|
|
892
|
+
}));
|
|
893
|
+
}
|
|
894
|
+
setValue(e) {
|
|
895
|
+
let t = ["? in ?", "? not in ?"].includes(this.filter?.expression) ? e?.detail?.value : e?.target?.value;
|
|
896
|
+
this._value !== t && (this._value = t, this.filter = {
|
|
897
|
+
...this.filter,
|
|
898
|
+
parameters: [{ ...this.filter?.parameters?.[0] }, t]
|
|
899
|
+
}, this._sendChangeEvent());
|
|
900
|
+
}
|
|
901
|
+
selectValue(e) {
|
|
902
|
+
let t = (e.detail?.value ?? "").map((e) => Number.parseFloat(e));
|
|
903
|
+
this.filter = {
|
|
904
|
+
...this.filter,
|
|
905
|
+
parameters: [{ ...this.filter?.parameters?.[0] }, t]
|
|
906
|
+
}, this._value = t, this._sendChangeEvent();
|
|
907
|
+
}
|
|
908
|
+
onScrolled(e) {
|
|
909
|
+
!this._retrieving && !this._allValuesRetrieved && e?.detail?.last === this._numericValues.length - 1 && this._fetchNumericValues(this._numericValues.length);
|
|
910
|
+
}
|
|
911
|
+
renderNumberField() {
|
|
912
|
+
return c`<luzmo-number-field
|
|
913
|
+
label="Numeric filter value"
|
|
914
|
+
grows
|
|
915
|
+
.size=${this.size}
|
|
916
|
+
@change=${this.setValue}
|
|
917
|
+
@input=${this.setValue}
|
|
918
|
+
.value=${this.filter?.parameters?.[1]}
|
|
919
|
+
></luzmo-number-field>`;
|
|
920
|
+
}
|
|
921
|
+
setSearchString(e) {
|
|
922
|
+
this._search = e?.detail?.string ?? "", this._allValuesRetrieved || (this._searchQueryTimeout && (this._runningQueries.forEach((e) => {
|
|
923
|
+
e?.abortController && e.abortController.abort();
|
|
924
|
+
}), this._runningQueries = [], clearTimeout(this._searchQueryTimeout)), this._searchQueryTimeout = setTimeout(() => {
|
|
925
|
+
this._fetchNumericValues();
|
|
926
|
+
}, 500));
|
|
927
|
+
}
|
|
928
|
+
resetSearchString() {
|
|
929
|
+
this._search = "";
|
|
930
|
+
}
|
|
931
|
+
onOpened() {
|
|
932
|
+
this._fetchNumericValues();
|
|
933
|
+
}
|
|
934
|
+
renderValuePicker() {
|
|
935
|
+
if (this._error) return c`<div class="error" role="alert">${this._error}</div>`;
|
|
936
|
+
let e = this._numericValues.filter((e) => e.toString().toLowerCase().includes(this._search.toLowerCase())).map((e) => ({
|
|
937
|
+
value: e,
|
|
938
|
+
label: e
|
|
939
|
+
})), t = p("Selected {count} items"), n = p("Search"), r = p("No data"), i = p("No results"), a = p("Select...");
|
|
940
|
+
return c`<luzmo-select
|
|
941
|
+
.size=${this.size}
|
|
942
|
+
.label=${a}
|
|
943
|
+
.retrieving=${this._retrieving}
|
|
944
|
+
selects="multiple"
|
|
945
|
+
variant="checkboxes"
|
|
946
|
+
emphasized
|
|
947
|
+
no-wrap
|
|
948
|
+
?invalid=${!!this._error}
|
|
949
|
+
.multipleLabelTemplate=${t}
|
|
950
|
+
.searchLabel=${n}
|
|
951
|
+
.noDataLabel=${r}
|
|
952
|
+
.noResultsLabel=${i}
|
|
953
|
+
@change=${this.selectValue}
|
|
954
|
+
@luzmo-search=${this.setSearchString}
|
|
955
|
+
@luzmo-opened=${this.onOpened}
|
|
956
|
+
@luzmo-closed=${this.resetSearchString}
|
|
957
|
+
@luzmo-scrolled=${this.onScrolled}
|
|
958
|
+
.options=${e}
|
|
959
|
+
.value=${this.filter?.parameters?.[1]}
|
|
960
|
+
>
|
|
961
|
+
</luzmo-select>`;
|
|
962
|
+
}
|
|
963
|
+
render() {
|
|
964
|
+
let e = this.filter?.expression;
|
|
965
|
+
return ["? in ?", "? not in ?"].includes(e) ? this.renderValuePicker() : this.renderNumberField();
|
|
966
|
+
}
|
|
967
|
+
};
|
|
968
|
+
//#endregion
|
|
969
|
+
//#region src/components/filter-value-picker-numeric/index.ts
|
|
970
|
+
e([u({
|
|
971
|
+
type: String,
|
|
972
|
+
attribute: "api-url",
|
|
973
|
+
reflect: !0
|
|
974
|
+
})], B.prototype, "apiUrl", void 0), e([u({
|
|
975
|
+
type: String,
|
|
976
|
+
attribute: "auth-key",
|
|
977
|
+
reflect: !0
|
|
978
|
+
})], B.prototype, "authKey", void 0), e([u({
|
|
979
|
+
type: String,
|
|
980
|
+
attribute: "auth-token",
|
|
981
|
+
reflect: !0
|
|
982
|
+
})], B.prototype, "authToken", void 0), e([u({
|
|
983
|
+
type: Number,
|
|
984
|
+
attribute: "cache-time",
|
|
985
|
+
reflect: !0
|
|
986
|
+
})], B.prototype, "cacheTime", void 0), e([u({
|
|
987
|
+
type: String,
|
|
988
|
+
attribute: "content-language",
|
|
989
|
+
reflect: !0
|
|
990
|
+
})], B.prototype, "contentLanguage", void 0), e([u({
|
|
991
|
+
type: Object,
|
|
992
|
+
reflect: !1
|
|
993
|
+
})], B.prototype, "filter", void 0), e([d()], B.prototype, "_numericValues", void 0), e([d()], B.prototype, "_retrieving", void 0), e([d()], B.prototype, "_search", void 0), e([d()], B.prototype, "_error", void 0), B = e([f()], B), customElements.get("luzmo-filter-value-picker-numeric") || customElements.define("luzmo-filter-value-picker-numeric", B);
|
|
994
|
+
//#endregion
|
|
995
|
+
//#region src/components/filter-value-picker/filter-value-picker.ts
|
|
996
|
+
var V = class extends t(_(g, { validSizes: Object.values(h) })) {
|
|
997
|
+
constructor(...e) {
|
|
998
|
+
super(...e), this.contentLanguage = "en", this._expressionsWithoutValuePicker = new Set([
|
|
999
|
+
"? is null",
|
|
1000
|
+
"? is not null",
|
|
1001
|
+
"to_date"
|
|
1002
|
+
]);
|
|
1003
|
+
}
|
|
1004
|
+
static get styles() {
|
|
1005
|
+
return [l(M)];
|
|
1006
|
+
}
|
|
1007
|
+
_sendChangeEvent(e) {
|
|
1008
|
+
this.dispatchEvent(new CustomEvent("luzmo-filter-value-changed", {
|
|
1009
|
+
bubbles: !0,
|
|
1010
|
+
composed: !0,
|
|
1011
|
+
cancelable: !0,
|
|
1012
|
+
detail: { value: e }
|
|
1013
|
+
}));
|
|
1014
|
+
}
|
|
1015
|
+
setFilterValue(e) {
|
|
1016
|
+
e.stopPropagation(), this._sendChangeEvent(e?.detail?.value);
|
|
1017
|
+
}
|
|
1018
|
+
renderNumericValuePicker() {
|
|
1019
|
+
return c`<luzmo-filter-value-picker-numeric
|
|
1020
|
+
.apiUrl=${this.apiUrl}
|
|
1021
|
+
.authKey=${this.authKey}
|
|
1022
|
+
.authToken=${this.authToken}
|
|
1023
|
+
.cacheTime=${this.cacheTime}
|
|
1024
|
+
.filter=${this.filter}
|
|
1025
|
+
.size=${this.size}
|
|
1026
|
+
.language=${this.language}
|
|
1027
|
+
.contentLanguage=${this.contentLanguage}
|
|
1028
|
+
@luzmo-filter-value-changed=${this.setFilterValue}
|
|
1029
|
+
></luzmo-filter-value-picker-numeric>`;
|
|
1030
|
+
}
|
|
1031
|
+
renderHierarchyValuePicker() {
|
|
1032
|
+
return c`<luzmo-filter-value-picker-hierarchy
|
|
1033
|
+
.apiUrl=${this.apiUrl}
|
|
1034
|
+
.authKey=${this.authKey}
|
|
1035
|
+
.authToken=${this.authToken}
|
|
1036
|
+
.cacheTime=${this.cacheTime}
|
|
1037
|
+
.filter=${this.filter}
|
|
1038
|
+
.size=${this.size}
|
|
1039
|
+
.language=${this.language}
|
|
1040
|
+
.contentLanguage=${this.contentLanguage}
|
|
1041
|
+
@luzmo-filter-value-changed=${this.setFilterValue}
|
|
1042
|
+
></luzmo-filter-value-picker-hierarchy>`;
|
|
1043
|
+
}
|
|
1044
|
+
renderDateTimeValuePicker() {
|
|
1045
|
+
return c`<luzmo-filter-value-picker-datetime
|
|
1046
|
+
.apiUrl=${this.apiUrl}
|
|
1047
|
+
.authKey=${this.authKey}
|
|
1048
|
+
.authToken=${this.authToken}
|
|
1049
|
+
.cacheTime=${this.cacheTime}
|
|
1050
|
+
.filter=${this.filter}
|
|
1051
|
+
.timeZone=${this.timeZone}
|
|
1052
|
+
.language=${this.language}
|
|
1053
|
+
.contentLanguage=${this.contentLanguage}
|
|
1054
|
+
.size=${this.size}
|
|
1055
|
+
@luzmo-filter-value-changed=${this.setFilterValue}
|
|
1056
|
+
></luzmo-filter-value-picker-datetime>`;
|
|
1057
|
+
}
|
|
1058
|
+
renderDisabledTextField() {
|
|
1059
|
+
let e = this.filter?.parameters?.[1] ?? "";
|
|
1060
|
+
return c`<luzmo-text-field
|
|
1061
|
+
label=${p("Filter value", { desc: "Label for filter value text field" })}
|
|
1062
|
+
.size=${this.size}
|
|
1063
|
+
.value=${e}
|
|
1064
|
+
.disabled=${!0}
|
|
1065
|
+
></luzmo-text-field>`;
|
|
1066
|
+
}
|
|
1067
|
+
render() {
|
|
1068
|
+
let e = this.valueType ?? "", t = this.filter?.expression;
|
|
1069
|
+
return !t || this._expressionsWithoutValuePicker.has(t) ? c`
|
|
1070
|
+
|
|
1071
|
+
` : [
|
|
1072
|
+
"numeric",
|
|
1073
|
+
"hierarchy",
|
|
1074
|
+
"datetime"
|
|
1075
|
+
].includes(e) ? e === "numeric" ? this.renderNumericValuePicker() : e === "datetime" ? this.renderDateTimeValuePicker() : this.renderHierarchyValuePicker() : typeof this.filter?.parameters?.[1] == "string" ? this.renderDisabledTextField() : c`
|
|
1076
|
+
|
|
1077
|
+
`;
|
|
1078
|
+
}
|
|
1079
|
+
};
|
|
1080
|
+
//#endregion
|
|
1081
|
+
//#region src/components/filter-value-picker/index.ts
|
|
1082
|
+
e([u({
|
|
1083
|
+
type: String,
|
|
1084
|
+
attribute: "api-url",
|
|
1085
|
+
reflect: !0
|
|
1086
|
+
})], V.prototype, "apiUrl", void 0), e([u({
|
|
1087
|
+
type: String,
|
|
1088
|
+
attribute: "auth-key",
|
|
1089
|
+
reflect: !0
|
|
1090
|
+
})], V.prototype, "authKey", void 0), e([u({
|
|
1091
|
+
type: String,
|
|
1092
|
+
attribute: "auth-token",
|
|
1093
|
+
reflect: !0
|
|
1094
|
+
})], V.prototype, "authToken", void 0), e([u({
|
|
1095
|
+
type: Number,
|
|
1096
|
+
attribute: "cache-time",
|
|
1097
|
+
reflect: !0
|
|
1098
|
+
})], V.prototype, "cacheTime", void 0), e([u({
|
|
1099
|
+
type: String,
|
|
1100
|
+
attribute: "content-language",
|
|
1101
|
+
reflect: !0
|
|
1102
|
+
})], V.prototype, "contentLanguage", void 0), e([u({
|
|
1103
|
+
type: String,
|
|
1104
|
+
attribute: "time-zone",
|
|
1105
|
+
reflect: !0
|
|
1106
|
+
})], V.prototype, "timeZone", void 0), e([u({
|
|
1107
|
+
type: String,
|
|
1108
|
+
attribute: "value-type",
|
|
1109
|
+
reflect: !0
|
|
1110
|
+
})], V.prototype, "valueType", void 0), e([u({
|
|
1111
|
+
type: Object,
|
|
1112
|
+
reflect: !1
|
|
1113
|
+
})], V.prototype, "filter", void 0), customElements.get("luzmo-filter-value-picker") || customElements.define("luzmo-filter-value-picker", V);
|
|
1114
|
+
//#endregion
|
|
1115
|
+
//#region src/components/filter-item/filter-item.module.scss?inline
|
|
1116
|
+
var H = ":host{flex-direction:row;min-width:0;max-width:100%;display:flex}[role=group]{gap:var(--luzmo-filter-item-gap,var(--filter-item-gap));flex-direction:row;min-width:0;max-width:100%;display:flex}luzmo-data-fields-select{flex-shrink:1;min-width:0}luzmo-filter-value-picker{flex-shrink:2;min-width:0}:host{--filter-item-gap:var(--luzmo-spacing-3)}:host([size=s]){--filter-item-gap:var(--luzmo-spacing-2)}:host([size=m]){--filter-item-gap:var(--luzmo-spacing-3)}:host([size=l]){--filter-item-gap:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1))}:host([size=xl]){--filter-item-gap:var(--luzmo-spacing-4)}", U = class extends t(_(g, { validSizes: Object.values(h) })) {
|
|
1117
|
+
constructor(...e) {
|
|
1118
|
+
super(...e), this.apiUrl = "https://api.luzmo.com", this.contentLanguage = "en", this.filter = {}, this._loading = !1, this._datasetsDataFields = [];
|
|
1119
|
+
}
|
|
1120
|
+
static get styles() {
|
|
1121
|
+
return [l(H)];
|
|
1122
|
+
}
|
|
1123
|
+
connectedCallback() {
|
|
1124
|
+
super.connectedCallback();
|
|
1125
|
+
let e = {};
|
|
1126
|
+
this.apiUrl && (e.apiUrl = this.apiUrl), this.cacheTime && (e.staleTime = this.cacheTime, e.gcTime = this.cacheTime * 2), e.authKey = this.authKey || "", e.authToken = this.authToken || "", n.configure(e);
|
|
1127
|
+
}
|
|
1128
|
+
_clearTypeState() {
|
|
1129
|
+
this._type = void 0, this._subType = void 0, this._isFormula = void 0;
|
|
1130
|
+
}
|
|
1131
|
+
async _fetchDatasetDataFields() {
|
|
1132
|
+
if (!this.datasetIds || this.datasetIds.length === 0) {
|
|
1133
|
+
this._error = "Missing dataset ids to fetch columns & formulas", this._datasetsDataFields = [], this._loading = !1;
|
|
1134
|
+
return;
|
|
1135
|
+
}
|
|
1136
|
+
let { valid: e, invalid: t } = r(this.datasetIds);
|
|
1137
|
+
if (t.length > 0 && console.warn(`[LuzmoFilterItem] Invalid dataset IDs provided (not valid UUIDs): ${t.join(", ")}. These will be skipped.`), e.length === 0) {
|
|
1138
|
+
this._error = "Invalid dataset IDs provided. Dataset IDs must be valid UUIDs.", this._datasetsDataFields = [], this._loading = !1;
|
|
1139
|
+
return;
|
|
1140
|
+
}
|
|
1141
|
+
this._loading = !0, this._error = null;
|
|
1142
|
+
try {
|
|
1143
|
+
let t = await n.fetchDatasetsWithColumnsAndFormulas(e);
|
|
1144
|
+
for (let e of t) for (let t of [...e.columns, ...e.formulas]) t.datasetId = e.id;
|
|
1145
|
+
this._datasetsDataFields = t;
|
|
1146
|
+
} catch (e) {
|
|
1147
|
+
console.error("Error fetching dataset columns & formulas:", e), this._error = e instanceof Error ? e.message : "Unknown error", this._datasetsDataFields = [];
|
|
1148
|
+
} finally {
|
|
1149
|
+
this._loading = !1;
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
willUpdate(e) {
|
|
1153
|
+
super.willUpdate(e);
|
|
1154
|
+
let t = e.has("filter"), r = e.has("datasetIds"), i = e.has("authKey"), a = e.has("authToken"), o = e.has("_datasetsDataFields");
|
|
1155
|
+
if (t || r || o && this.filter?.parameters?.[0]?.columnId && (this.filter?.parameters?.[0]?.datasetId || this.filter?.parameters?.[0]?.formulaId)) if (!this.datasetIds || this.datasetIds.length === 0 || this._datasetsDataFields.length === 0) this._clearTypeState();
|
|
1156
|
+
else {
|
|
1157
|
+
let e = this._datasetsDataFields.find((e) => e.id === this.filter.parameters?.[0]?.datasetId);
|
|
1158
|
+
if (e) {
|
|
1159
|
+
let t = !1;
|
|
1160
|
+
for (let n of [...e.columns || [], ...e?.formulas || []]) if (n.id === this.filter.parameters?.[0]?.columnId || n.id === this.filter.parameters?.[0]?.formulaId) {
|
|
1161
|
+
this._type = n.type, this._subType = n.subtype, this._isFormula = n.id === this.filter.parameters?.[0]?.formulaId, t = !0;
|
|
1162
|
+
break;
|
|
1163
|
+
}
|
|
1164
|
+
t || this._clearTypeState();
|
|
1165
|
+
} else this._clearTypeState();
|
|
1166
|
+
}
|
|
1167
|
+
if (i || a) {
|
|
1168
|
+
let e = {
|
|
1169
|
+
authKey: this.authKey || "",
|
|
1170
|
+
authToken: this.authToken || ""
|
|
1171
|
+
};
|
|
1172
|
+
n.configure(e);
|
|
1173
|
+
}
|
|
1174
|
+
(r || i || a) && this._fetchDatasetDataFields();
|
|
1175
|
+
}
|
|
1176
|
+
_sendChangeEvent() {
|
|
1177
|
+
this.dispatchEvent(new CustomEvent("luzmo-filter-changed", {
|
|
1178
|
+
bubbles: !0,
|
|
1179
|
+
composed: !0,
|
|
1180
|
+
cancelable: !0,
|
|
1181
|
+
detail: { filter: this.filter }
|
|
1182
|
+
}));
|
|
1183
|
+
}
|
|
1184
|
+
setFilterDataField(e) {
|
|
1185
|
+
if (this._cannotReferenceColumn()) return;
|
|
1186
|
+
let t = e.detail?.dataFields?.[0], n = this._type, r = this.filter?.parameters?.[0]?.columnId || this.filter?.parameters?.[0]?.formulaId, i = t?.columnId || t?.formulaId;
|
|
1187
|
+
this._type = t?.type, this._subType = t?.subtype, this._isFormula = !!t?.formulaId;
|
|
1188
|
+
let a = k(this._type, this._subType, this._isFormula);
|
|
1189
|
+
this.filter = structuredClone(this.filter ?? {}), a?.includes(this.filter?.expression) || (this.filter.expression = a?.[0]?.expression), this.filter.parameters = this.filter?.parameters ?? [], this.filter.parameters[0] = { datasetId: t?.datasetId }, this._isFormula ? this.filter.parameters[0].formulaId = t?.formulaId : this.filter.parameters[0].columnId = t?.columnId, t?.lowestLevel, n === this._type ? r !== i && this._type === "hierarchy" && (this.filter.parameters[1] = ["? in ?", "? not in ?"].includes(this.filter.expression) ? [] : "") : this._type === "hierarchy" ? (this.filter.expression = "? like ?", this.filter.parameters[1] = "") : this._type === "numeric" ? (this.filter.expression = "? > ?", this.filter.parameters[1] = 0) : this._type === "datetime" ? (this.filter.expression = "? < ?", this.filter.parameters[1] = (/* @__PURE__ */ new Date()).toISOString()) : (this.filter.expression = "? is not null", this.filter.parameters = [this.filter.parameters[0]]), this._sendChangeEvent();
|
|
1190
|
+
}
|
|
1191
|
+
setFilterExpression(e) {
|
|
1192
|
+
if (this._cannotReferenceColumn()) return;
|
|
1193
|
+
let t = structuredClone(this.filter ?? {}), n = t.expression;
|
|
1194
|
+
if (t.expression = e.detail?.expression, n !== t.expression) {
|
|
1195
|
+
if (["? is null", "? is not null"].includes(t.expression)) t.parameters = [t.parameters[0]];
|
|
1196
|
+
else if (this._type === "datetime") if ([
|
|
1197
|
+
"YTD",
|
|
1198
|
+
"QTD",
|
|
1199
|
+
"MTD",
|
|
1200
|
+
"WTD"
|
|
1201
|
+
].includes(t.expression)) {
|
|
1202
|
+
let n = e?.detail?.unit;
|
|
1203
|
+
n && (t.parameters[1] = { unit: typeof n == "number" ? n : 1 });
|
|
1204
|
+
} else if ([
|
|
1205
|
+
"last_completed",
|
|
1206
|
+
"next_full",
|
|
1207
|
+
"to_date"
|
|
1208
|
+
].includes(t.expression)) {
|
|
1209
|
+
let e = t?.parameters?.[1]?.unit;
|
|
1210
|
+
t.parameters[1] = { unit: typeof e == "number" ? e : 1 };
|
|
1211
|
+
} else if ([
|
|
1212
|
+
"last_now",
|
|
1213
|
+
"last_available",
|
|
1214
|
+
"next_now",
|
|
1215
|
+
"more_than_ago",
|
|
1216
|
+
"or_more_ago"
|
|
1217
|
+
].includes(t.expression)) {
|
|
1218
|
+
let e = t?.parameters?.[1]?.unit, n = t?.parameters?.[1]?.quantity;
|
|
1219
|
+
t.parameters[1] = {
|
|
1220
|
+
unit: typeof e == "number" ? e : 1,
|
|
1221
|
+
quantity: typeof n == "number" ? n : 1
|
|
1222
|
+
};
|
|
1223
|
+
} else t.parameters[1] = (/* @__PURE__ */ new Date()).toISOString();
|
|
1224
|
+
else this._type === "hierarchy" ? ["? in ?", "? not in ?"].includes(t.expression) ? ["? = ?", "? != ?"].includes(n) ? t.parameters[1] = t.parameters[1] ? [t.parameters[1]] : [] : t.parameters[1] = [] : ["? = ?", "? != ?"].includes(t.expression) ? ["? in ?", "? not in ?"].includes(n) ? t.parameters[1] = Array.isArray(t.parameters[1]) && t.parameters[1][0] ? t.parameters[1][0] : "" : t.parameters[1] = "" : t.parameters[1] = ["? in ?", "? not in ?"].includes(n) ? "" : t.parameters[1] ?? "" : this._type === "numeric" && (["? in ?", "? not in ?"].includes(t.expression) && ["? in ?", "? not in ?"].includes(n) ? t.parameters[1] = t.parameters[1] ?? [] : ["? in ?", "? not in ?"].includes(t.expression) ? t.parameters[1] = [] : t.parameters[1] = ["? in ?", "? not in ?"].includes(n) ? 0 : t.parameters[1] ?? 0);
|
|
1225
|
+
this.filter = t, this._sendChangeEvent();
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
setFilterValue(e) {
|
|
1229
|
+
this._cannotReferenceColumn() || (this.filter.parameters[1] = e?.detail?.value, this._sendChangeEvent());
|
|
1230
|
+
}
|
|
1231
|
+
_cannotReferenceColumn() {
|
|
1232
|
+
if (!(this.filter?.parameters?.[0]?.columnId || this.filter?.parameters?.[0]?.formulaId)) return !1;
|
|
1233
|
+
if (!this.datasetIds || this.datasetIds.length === 0 || this._datasetsDataFields.length === 0) return !0;
|
|
1234
|
+
let e = this.filter?.parameters?.[0]?.datasetId, t = this._datasetsDataFields.find((t) => t.id === e);
|
|
1235
|
+
return t ? ![...t.columns || [], ...t.formulas || []].find((e) => e.id === this.filter?.parameters?.[0]?.columnId || e.id === this.filter?.parameters?.[0]?.formulaId) : !0;
|
|
1236
|
+
}
|
|
1237
|
+
renderDataFieldPicker() {
|
|
1238
|
+
let e = this._cannotReferenceColumn(), t = e ? p("Unknown") : void 0, n = e || this._loading ? "" : this.filter?.parameters?.[0]?.columnId || this.filter?.parameters?.[0]?.formulaId;
|
|
1239
|
+
return c`<luzmo-data-fields-select
|
|
1240
|
+
.language=${this.language}
|
|
1241
|
+
.contentLanguage=${this.contentLanguage}
|
|
1242
|
+
.size=${this.size}
|
|
1243
|
+
.value=${n ? [n] : []}
|
|
1244
|
+
selects="single"
|
|
1245
|
+
.datasetsDataFields=${this._datasetsDataFields}
|
|
1246
|
+
placeholder=${v(t)}
|
|
1247
|
+
.invalid=${!!this._error || e}
|
|
1248
|
+
?disabled=${e}
|
|
1249
|
+
.retrieving=${this._loading}
|
|
1250
|
+
.pending=${this._loading}
|
|
1251
|
+
@luzmo-data-fields-selected=${this.setFilterDataField}
|
|
1252
|
+
></luzmo-data-fields-select>`;
|
|
1253
|
+
}
|
|
1254
|
+
renderExpressionPicker() {
|
|
1255
|
+
let e = this._cannotReferenceColumn(), t = !this.filter?.parameters?.[0]?.datasetId || !this.filter?.parameters?.[0]?.columnId || e;
|
|
1256
|
+
return c`<luzmo-filter-expression-picker
|
|
1257
|
+
.language=${this.language}
|
|
1258
|
+
.size=${this.size}
|
|
1259
|
+
.type=${this._type}
|
|
1260
|
+
.subtype=${this._subType}
|
|
1261
|
+
.filter=${this.filter}
|
|
1262
|
+
?isFormula=${this._isFormula}
|
|
1263
|
+
?disabled=${t}
|
|
1264
|
+
@luzmo-expression-selected=${this.setFilterExpression}
|
|
1265
|
+
></luzmo-filter-expression-picker>`;
|
|
1266
|
+
}
|
|
1267
|
+
renderValuePicker() {
|
|
1268
|
+
let e = this._cannotReferenceColumn(), t = !this.filter?.parameters?.[0]?.datasetId || !this.filter?.parameters?.[0]?.columnId || e;
|
|
1269
|
+
return c`<luzmo-filter-value-picker
|
|
1270
|
+
.apiUrl=${this.apiUrl}
|
|
1271
|
+
.authKey=${this.authKey}
|
|
1272
|
+
.authToken=${this.authToken}
|
|
1273
|
+
.cacheTime=${this.cacheTime}
|
|
1274
|
+
.language=${this.language}
|
|
1275
|
+
.contentLanguage=${this.contentLanguage}
|
|
1276
|
+
.timeZone=${this.timeZone}
|
|
1277
|
+
.size=${this.size}
|
|
1278
|
+
.filter=${this.filter}
|
|
1279
|
+
.valueType=${this._type}
|
|
1280
|
+
?disabled=${t}
|
|
1281
|
+
@luzmo-filter-value-changed=${this.setFilterValue}
|
|
1282
|
+
></luzmo-filter-value-picker>`;
|
|
1283
|
+
}
|
|
1284
|
+
render() {
|
|
1285
|
+
return c`<div role="group" aria-label=${p("Filter condition", { desc: "Accessible label for filter item group" })}>
|
|
1286
|
+
${this.renderDataFieldPicker()} ${this.renderExpressionPicker()}
|
|
1287
|
+
${this.renderValuePicker()}
|
|
1288
|
+
</div>`;
|
|
1289
|
+
}
|
|
1290
|
+
};
|
|
1291
|
+
//#endregion
|
|
1292
|
+
//#region src/components/filter-item/index.ts
|
|
1293
|
+
e([u({
|
|
1294
|
+
type: String,
|
|
1295
|
+
attribute: "api-url",
|
|
1296
|
+
reflect: !0
|
|
1297
|
+
})], U.prototype, "apiUrl", void 0), e([u({
|
|
1298
|
+
type: String,
|
|
1299
|
+
attribute: "auth-key",
|
|
1300
|
+
reflect: !0
|
|
1301
|
+
})], U.prototype, "authKey", void 0), e([u({
|
|
1302
|
+
type: String,
|
|
1303
|
+
attribute: "auth-token",
|
|
1304
|
+
reflect: !0
|
|
1305
|
+
})], U.prototype, "authToken", void 0), e([u({
|
|
1306
|
+
type: Number,
|
|
1307
|
+
attribute: "cache-time",
|
|
1308
|
+
reflect: !0
|
|
1309
|
+
})], U.prototype, "cacheTime", void 0), e([u({
|
|
1310
|
+
type: String,
|
|
1311
|
+
reflect: !0
|
|
1312
|
+
})], U.prototype, "contentLanguage", void 0), e([u({
|
|
1313
|
+
type: String,
|
|
1314
|
+
attribute: "time-zone",
|
|
1315
|
+
reflect: !0
|
|
1316
|
+
})], U.prototype, "timeZone", void 0), e([u({
|
|
1317
|
+
type: Array,
|
|
1318
|
+
attribute: "dataset-ids",
|
|
1319
|
+
reflect: !0
|
|
1320
|
+
})], U.prototype, "datasetIds", void 0), e([u({
|
|
1321
|
+
type: Object,
|
|
1322
|
+
reflect: !1
|
|
1323
|
+
})], U.prototype, "filter", void 0), e([d()], U.prototype, "_type", void 0), e([d()], U.prototype, "_subType", void 0), e([d()], U.prototype, "_isFormula", void 0), e([d()], U.prototype, "_error", void 0), e([d()], U.prototype, "_loading", void 0), e([d()], U.prototype, "_datasetsDataFields", void 0), U = e([f()], U), customElements.get("luzmo-filter-item") || customElements.define("luzmo-filter-item", U);
|
|
1324
|
+
//#endregion
|
|
1325
|
+
//#region src/components/filters/filters.module.scss?inline
|
|
1326
|
+
var W = ":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}.filter-group-container{max-width:100%;padding:calc(var(--luzmo-indicator-gap) + 2 * var(--luzmo-indicator-width));overflow: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:center;gap:var(--luzmo-filters-filter-line-gap,var(--filters-filter-line-gap));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:center}.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));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));font-weight:700}.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))}: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)}: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)}: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)}: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)}", G = {
|
|
1327
|
+
AND: () => p("AND", { desc: "Logical AND condition for combining filters" }),
|
|
1328
|
+
OR: () => p("OR", { desc: "Logical OR condition for combining filters" })
|
|
1329
|
+
}, K = class extends t(_(g, { validSizes: Object.values(h) })) {
|
|
1330
|
+
constructor(...e) {
|
|
1331
|
+
super(...e), this.apiUrl = "https://api.luzmo.com", this.contentLanguage = "en", this.filters = [], this.debounce = 300, this._internalFilterGroup = null, this._debounceTimeout = null;
|
|
1332
|
+
}
|
|
1333
|
+
static get styles() {
|
|
1334
|
+
return [l(W)];
|
|
1335
|
+
}
|
|
1336
|
+
get _oneSizeSmaller() {
|
|
1337
|
+
return {
|
|
1338
|
+
xxs: "xxs",
|
|
1339
|
+
xs: "xs",
|
|
1340
|
+
s: "xs",
|
|
1341
|
+
m: "s",
|
|
1342
|
+
l: "m",
|
|
1343
|
+
xl: "l",
|
|
1344
|
+
xxl: "xl"
|
|
1345
|
+
}[this.size] || "s";
|
|
1346
|
+
}
|
|
1347
|
+
get _isDatasetIdsEmpty() {
|
|
1348
|
+
return !this.datasetIds || this.datasetIds.length === 0;
|
|
1349
|
+
}
|
|
1350
|
+
disconnectedCallback() {
|
|
1351
|
+
super.disconnectedCallback(), this._debounceTimeout &&= (clearTimeout(this._debounceTimeout), null);
|
|
1352
|
+
}
|
|
1353
|
+
willUpdate(e) {
|
|
1354
|
+
if (super.willUpdate(e), e.has("filters")) {
|
|
1355
|
+
let e = D(this.filters);
|
|
1356
|
+
e.length === 0 ? this._internalFilterGroup = null : e.length === 1 ? this._internalFilterGroup = structuredClone(e[0]) : this._internalFilterGroup = {
|
|
1357
|
+
condition: "AND",
|
|
1358
|
+
filters: structuredClone(e)
|
|
1359
|
+
};
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1362
|
+
_generateEmptyGroup() {
|
|
1363
|
+
return {
|
|
1364
|
+
condition: "AND",
|
|
1365
|
+
filters: []
|
|
1366
|
+
};
|
|
1367
|
+
}
|
|
1368
|
+
_generateEmptyFilter() {
|
|
1369
|
+
return {
|
|
1370
|
+
expression: void 0,
|
|
1371
|
+
parameters: []
|
|
1372
|
+
};
|
|
1373
|
+
}
|
|
1374
|
+
_getFiltersForExport() {
|
|
1375
|
+
if (!this._internalFilterGroup) return [];
|
|
1376
|
+
if (this._internalFilterGroup.filters.length > 0 && this._internalFilterGroup.filters.every((e) => this._isGroup(e))) return structuredClone(this._internalFilterGroup.filters).map((e) => w(e)[0]).filter((e) => !!e);
|
|
1377
|
+
let [e] = w(structuredClone(this._internalFilterGroup));
|
|
1378
|
+
return e ? [e] : [];
|
|
1379
|
+
}
|
|
1380
|
+
_sendChangeEvent() {
|
|
1381
|
+
this._debounceTimeout && clearTimeout(this._debounceTimeout);
|
|
1382
|
+
let e = () => {
|
|
1383
|
+
this.dispatchEvent(new CustomEvent("luzmo-filters-changed", {
|
|
1384
|
+
bubbles: !0,
|
|
1385
|
+
composed: !0,
|
|
1386
|
+
cancelable: !0,
|
|
1387
|
+
detail: { filters: this._getFiltersForExport() }
|
|
1388
|
+
}));
|
|
1389
|
+
};
|
|
1390
|
+
this.debounce > 0 ? this._debounceTimeout = setTimeout(e, this.debounce) : e();
|
|
1391
|
+
}
|
|
1392
|
+
_isGroup(e) {
|
|
1393
|
+
return "condition" in e && "filters" in e;
|
|
1394
|
+
}
|
|
1395
|
+
_toggleCondition(e) {
|
|
1396
|
+
e.condition = e.condition === "AND" ? "OR" : "AND", this.requestUpdate(), this._sendChangeEvent();
|
|
1397
|
+
}
|
|
1398
|
+
_addFilter(e) {
|
|
1399
|
+
if (this._isDatasetIdsEmpty) return;
|
|
1400
|
+
let t = e;
|
|
1401
|
+
t ||= (this._internalFilterGroup ||= this._generateEmptyGroup(), this._internalFilterGroup), t.filters.push(this._generateEmptyFilter()), this.requestUpdate(), this._sendChangeEvent();
|
|
1402
|
+
}
|
|
1403
|
+
_addSubGroup(e) {
|
|
1404
|
+
if (this._isDatasetIdsEmpty) return;
|
|
1405
|
+
let t = this._generateEmptyGroup();
|
|
1406
|
+
t.condition = e.condition === "AND" ? "OR" : "AND", t.filters.push(this._generateEmptyFilter()), e.filters.push(t), this.requestUpdate(), this._sendChangeEvent();
|
|
1407
|
+
}
|
|
1408
|
+
_removeFilter(e, t) {
|
|
1409
|
+
if (this._internalFilterGroup) {
|
|
1410
|
+
if (e.filters.splice(t, 1), e !== this._internalFilterGroup && e.filters.length === 0) {
|
|
1411
|
+
let t = this._findParentGroup(this._internalFilterGroup, e);
|
|
1412
|
+
if (t) {
|
|
1413
|
+
let n = t.filters.indexOf(e);
|
|
1414
|
+
n !== -1 && t.filters.splice(n, 1);
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
this._collapseGroupsAfterDelete(), this.requestUpdate(), this._sendChangeEvent();
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
_updateFilter(e, t, n) {
|
|
1421
|
+
n.stopPropagation(), this._isGroup(e.filters[t]) || (e.filters[t] = n.detail.filter, this._sendChangeEvent());
|
|
1422
|
+
}
|
|
1423
|
+
_addGroup() {
|
|
1424
|
+
if (this._isDatasetIdsEmpty) return;
|
|
1425
|
+
this._internalFilterGroup ||= this._generateEmptyGroup();
|
|
1426
|
+
let e = this._generateEmptyGroup();
|
|
1427
|
+
e.condition = this._internalFilterGroup.condition === "AND" ? "OR" : "AND", e.filters.push(this._internalFilterGroup);
|
|
1428
|
+
let t = this._generateEmptyGroup();
|
|
1429
|
+
t.condition = e.condition === "AND" ? "OR" : "AND", t.filters.push(this._generateEmptyFilter()), e.filters.push(t), this._internalFilterGroup = e, this.requestUpdate(), this._sendChangeEvent();
|
|
1430
|
+
}
|
|
1431
|
+
_renderFilterItem(e, t, n) {
|
|
1432
|
+
return c`
|
|
1433
|
+
<div class="filter-item-wrapper">
|
|
1434
|
+
<div class="filter-item-content">
|
|
1435
|
+
<luzmo-filter-item
|
|
1436
|
+
.apiUrl=${this.apiUrl}
|
|
1437
|
+
.authKey=${this.authKey}
|
|
1438
|
+
.authToken=${this.authToken}
|
|
1439
|
+
.cacheTime=${this.cacheTime}
|
|
1440
|
+
.language=${this.language}
|
|
1441
|
+
.contentLanguage=${this.contentLanguage}
|
|
1442
|
+
.timeZone=${this.timeZone}
|
|
1443
|
+
.datasetIds=${this.datasetIds}
|
|
1444
|
+
.filter=${e}
|
|
1445
|
+
.size=${this.size}
|
|
1446
|
+
@luzmo-filter-changed=${this._updateFilter.bind(this, t, n)}
|
|
1447
|
+
></luzmo-filter-item>
|
|
1448
|
+
<luzmo-action-button
|
|
1449
|
+
class="delete-filter-button"
|
|
1450
|
+
.size=${this.size}
|
|
1451
|
+
quiet
|
|
1452
|
+
.label=${p("Remove filter", { desc: "Aria label for remove filter button" })}
|
|
1453
|
+
@click=${this._removeFilter.bind(this, t, n)}
|
|
1454
|
+
>
|
|
1455
|
+
<luzmo-icon slot="icon" .icon=${s} .size=${this.size}></luzmo-icon>
|
|
1456
|
+
</luzmo-action-button>
|
|
1457
|
+
</div>
|
|
1458
|
+
</div>
|
|
1459
|
+
`;
|
|
1460
|
+
}
|
|
1461
|
+
_renderGroup(e, t = !1) {
|
|
1462
|
+
let n = e.filters.length > 0, r = e.filters.length > 1, i = G[e.condition]?.() ?? e.condition;
|
|
1463
|
+
return c`
|
|
1464
|
+
<div class="filter-group ${t ? "nested" : ""}" role="group">
|
|
1465
|
+
${t ? c`
|
|
1466
|
+
<div class="condition-wrapper">
|
|
1467
|
+
${r ? c`
|
|
1468
|
+
<luzmo-action-button
|
|
1469
|
+
class="condition-badge"
|
|
1470
|
+
.size=${this._oneSizeSmaller}
|
|
1471
|
+
quiet
|
|
1472
|
+
aria-pressed=${e.condition === "AND" ? "true" : "false"}
|
|
1473
|
+
.label=${p("Toggle filter condition, currently ", { desc: "Aria label prefix for filter condition toggle" }) + i}
|
|
1474
|
+
@click=${this._toggleCondition.bind(this, e)}
|
|
1475
|
+
>
|
|
1476
|
+
${i}
|
|
1477
|
+
</luzmo-action-button>
|
|
1478
|
+
` : ""}
|
|
1479
|
+
</div>
|
|
1480
|
+
` : r ? c`
|
|
1481
|
+
<div class="condition-wrapper">
|
|
1482
|
+
<luzmo-action-button
|
|
1483
|
+
class="condition-badge"
|
|
1484
|
+
.size=${this._oneSizeSmaller}
|
|
1485
|
+
quiet
|
|
1486
|
+
aria-pressed=${e.condition === "AND" ? "true" : "false"}
|
|
1487
|
+
.label=${p("Toggle filter condition, currently ", { desc: "Aria label prefix for filter condition toggle" }) + i}
|
|
1488
|
+
@click=${this._toggleCondition.bind(this, e)}
|
|
1489
|
+
>
|
|
1490
|
+
${i}
|
|
1491
|
+
</luzmo-action-button>
|
|
1492
|
+
</div>
|
|
1493
|
+
` : ""}
|
|
1494
|
+
<div class="group-content">
|
|
1495
|
+
${n ? c`
|
|
1496
|
+
<div class="filters-list">
|
|
1497
|
+
${m(e.filters, (e, t) => t, (t, n) => c`
|
|
1498
|
+
${this._isGroup(t) ? this._renderGroup(t, !0) : this._renderFilterItem(t, e, n)}
|
|
1499
|
+
`)}
|
|
1500
|
+
</div>
|
|
1501
|
+
` : ""}
|
|
1502
|
+
|
|
1503
|
+
<div class="group-actions">
|
|
1504
|
+
<luzmo-action-button
|
|
1505
|
+
class="add-filter-button"
|
|
1506
|
+
.size=${this.size}
|
|
1507
|
+
quiet
|
|
1508
|
+
?disabled=${this._isDatasetIdsEmpty}
|
|
1509
|
+
@click=${this._addFilter.bind(this, e)}
|
|
1510
|
+
>
|
|
1511
|
+
<luzmo-icon slot="icon" .icon=${o} .size=${this._oneSizeSmaller}></luzmo-icon>
|
|
1512
|
+
${p("Filter", { desc: "Add filter button label" })}
|
|
1513
|
+
</luzmo-action-button>
|
|
1514
|
+
|
|
1515
|
+
<luzmo-action-button
|
|
1516
|
+
class="add-subgroup-button"
|
|
1517
|
+
.size=${this.size}
|
|
1518
|
+
quiet
|
|
1519
|
+
?disabled=${this._isDatasetIdsEmpty}
|
|
1520
|
+
@click=${this._addSubGroup.bind(this, e)}
|
|
1521
|
+
>
|
|
1522
|
+
<luzmo-icon slot="icon" .icon=${o} .size=${this._oneSizeSmaller}></luzmo-icon>
|
|
1523
|
+
${p("Subgroup", { desc: "Add subgroup button label" })}
|
|
1524
|
+
</luzmo-action-button>
|
|
1525
|
+
</div>
|
|
1526
|
+
</div>
|
|
1527
|
+
</div>
|
|
1528
|
+
`;
|
|
1529
|
+
}
|
|
1530
|
+
_findParentGroup(e, t) {
|
|
1531
|
+
for (let n of e.filters) {
|
|
1532
|
+
if (n === t) return e;
|
|
1533
|
+
if (this._isGroup(n)) {
|
|
1534
|
+
let e = this._findParentGroup(n, t);
|
|
1535
|
+
if (e) return e;
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1538
|
+
return null;
|
|
1539
|
+
}
|
|
1540
|
+
_collapseIfNeeded(e) {
|
|
1541
|
+
if (e.filters.length === 1 && this._isGroup(e.filters[0])) {
|
|
1542
|
+
let t = e.filters[0];
|
|
1543
|
+
e.condition = t.condition, e.filters = t.filters;
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
_collapseGroupsAfterDelete() {
|
|
1547
|
+
if (!this._internalFilterGroup) return;
|
|
1548
|
+
let e = (t) => {
|
|
1549
|
+
for (let n of t.filters) this._isGroup(n) && e(n);
|
|
1550
|
+
this._collapseIfNeeded(t);
|
|
1551
|
+
};
|
|
1552
|
+
e(this._internalFilterGroup);
|
|
1553
|
+
}
|
|
1554
|
+
render() {
|
|
1555
|
+
if (this._isDatasetIdsEmpty) return c`
|
|
1556
|
+
<div class="filter-group-container">
|
|
1557
|
+
<div class="dataset-ids-empty-message" role="status">
|
|
1558
|
+
${p("Cannot retrieve dataset data fields", { desc: "Error message when datasetIds is empty" })}
|
|
1559
|
+
</div>
|
|
1560
|
+
</div>
|
|
1561
|
+
`;
|
|
1562
|
+
if (!this._internalFilterGroup || this._internalFilterGroup.filters.length === 0) return c`
|
|
1563
|
+
<div class="filter-group-container">
|
|
1564
|
+
<luzmo-button
|
|
1565
|
+
class="add-filter-button"
|
|
1566
|
+
.size=${this.size}
|
|
1567
|
+
treatment="outline"
|
|
1568
|
+
?disabled=${this._isDatasetIdsEmpty}
|
|
1569
|
+
@click=${() => this._addFilter()}
|
|
1570
|
+
>
|
|
1571
|
+
<luzmo-icon slot="icon" .icon=${o} .size=${this._oneSizeSmaller}></luzmo-icon>
|
|
1572
|
+
${p("Add filter", { desc: "Add filter button label" })}
|
|
1573
|
+
</luzmo-button>
|
|
1574
|
+
</div>
|
|
1575
|
+
`;
|
|
1576
|
+
let e = this._internalFilterGroup.filters.length > 1;
|
|
1577
|
+
return c`
|
|
1578
|
+
<div class="filter-group-container">
|
|
1579
|
+
${this._renderGroup(this._internalFilterGroup)}
|
|
1580
|
+
|
|
1581
|
+
${e ? c`
|
|
1582
|
+
<div class="add-root-group-container">
|
|
1583
|
+
<luzmo-button
|
|
1584
|
+
class="add-group-button"
|
|
1585
|
+
.size=${this.size}
|
|
1586
|
+
treatment="outline"
|
|
1587
|
+
?disabled=${this._isDatasetIdsEmpty}
|
|
1588
|
+
@click=${this._addGroup}
|
|
1589
|
+
>
|
|
1590
|
+
<luzmo-icon slot="icon" .icon=${o} .size=${this._oneSizeSmaller}></luzmo-icon>
|
|
1591
|
+
${p("Group", { desc: "Add group button label" })}
|
|
1592
|
+
</luzmo-button>
|
|
1593
|
+
</div>
|
|
1594
|
+
` : ""}
|
|
1595
|
+
</div>
|
|
1596
|
+
`;
|
|
1597
|
+
}
|
|
1598
|
+
};
|
|
1599
|
+
//#endregion
|
|
1600
|
+
//#region src/components/filters/index.ts
|
|
1601
|
+
e([u({
|
|
1602
|
+
type: String,
|
|
1603
|
+
attribute: "api-url",
|
|
1604
|
+
reflect: !0
|
|
1605
|
+
})], K.prototype, "apiUrl", void 0), e([u({
|
|
1606
|
+
type: String,
|
|
1607
|
+
attribute: "auth-key",
|
|
1608
|
+
reflect: !0
|
|
1609
|
+
})], K.prototype, "authKey", void 0), e([u({
|
|
1610
|
+
type: String,
|
|
1611
|
+
attribute: "auth-token",
|
|
1612
|
+
reflect: !0
|
|
1613
|
+
})], K.prototype, "authToken", void 0), e([u({
|
|
1614
|
+
type: Number,
|
|
1615
|
+
attribute: "cache-time",
|
|
1616
|
+
reflect: !0
|
|
1617
|
+
})], K.prototype, "cacheTime", void 0), e([u({
|
|
1618
|
+
type: String,
|
|
1619
|
+
attribute: "content-language",
|
|
1620
|
+
reflect: !0
|
|
1621
|
+
})], K.prototype, "contentLanguage", void 0), e([u({
|
|
1622
|
+
type: String,
|
|
1623
|
+
attribute: "time-zone",
|
|
1624
|
+
reflect: !0
|
|
1625
|
+
})], K.prototype, "timeZone", void 0), e([u({
|
|
1626
|
+
type: Array,
|
|
1627
|
+
attribute: "dataset-ids",
|
|
1628
|
+
reflect: !0
|
|
1629
|
+
})], K.prototype, "datasetIds", void 0), e([u({
|
|
1630
|
+
type: Array,
|
|
1631
|
+
reflect: !1
|
|
1632
|
+
})], K.prototype, "filters", void 0), e([u({
|
|
1633
|
+
type: Number,
|
|
1634
|
+
reflect: !0
|
|
1635
|
+
})], K.prototype, "debounce", void 0), e([d()], K.prototype, "_internalFilterGroup", void 0), K = e([f()], K), customElements.get("luzmo-filters") || customElements.define("luzmo-filters", K);
|
|
1636
|
+
//#endregion
|
|
1637
|
+
export { L as a, B as i, U as n, P as o, V as r, j as s, K as t };
|