@luzmo/analytics-components-kit 1.0.5 → 1.0.7
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 +17 -4
- package/angular/components/data-fields-select.ts +7 -0
- package/angular/components/filter-item.ts +15 -0
- package/angular/components/filter-parameter-picker.ts +70 -18
- package/angular/components/filters.ts +46 -6
- package/angular/esm/components/data-fields-select.d.ts +3 -1
- package/angular/esm/components/data-fields-select.js +9 -1
- package/angular/esm/components/filter-item.d.ts +7 -1
- package/angular/esm/components/filter-item.js +18 -2
- package/angular/esm/components/filter-parameter-picker.d.ts +22 -7
- package/angular/esm/components/filter-parameter-picker.js +63 -22
- package/angular/esm/components/filters.d.ts +21 -7
- package/angular/esm/components/filters.js +41 -5
- package/angular/package.json +2 -2
- package/angular/utils/formula/store/formula-display-store.d.ts +6 -0
- package/components/ai-chat/index.cjs +1 -1
- package/components/ai-chat/index.js +3 -3
- package/components/{ai-chat-BtQaM37y.js → ai-chat-CDSRFmJK.js} +713 -677
- package/components/ai-chat-CVNU2mCV.cjs +319 -0
- package/components/ai-interaction-textarea/index.cjs +1 -1
- package/components/ai-interaction-textarea/index.js +2 -2
- package/components/{ai-interaction-textarea-CQBP9-DW.cjs → ai-interaction-textarea-BXDeplJF.cjs} +1 -1
- package/components/{ai-interaction-textarea-Bgd3y_cP.js → ai-interaction-textarea-BiMbUGCy.js} +3 -3
- package/components/{area-chart-positioning.config-QGEo5sr-.js → area-chart-positioning.config-SLtTkKJB.js} +1 -1
- package/components/{area-chart-positioning.config-1YVSxjRa.cjs → area-chart-positioning.config-dwRUFC--.cjs} +1 -1
- package/components/{bar-chart-positioning.config-Cs56EAWY.cjs → bar-chart-positioning.config-CcQ2iQdl.cjs} +1 -1
- package/components/{bar-chart-positioning.config-KLzBnoCu.js → bar-chart-positioning.config-Ch4sVyJS.js} +1 -1
- package/components/{base-DMQUzJ4L.js → base-2sulw8ws.js} +1 -1
- package/components/{base-DRFleWoz.cjs → base-DYRe99_q.cjs} +1 -1
- package/components/{box-plot-positioning.config-DKGY1Qqb.js → box-plot-positioning.config-Bb7r-Rfl.js} +1 -1
- package/components/{box-plot-positioning.config-BpDEb4Uo.cjs → box-plot-positioning.config-Dwtiqho4.cjs} +1 -1
- package/components/{bubble-chart-positioning.config-BZsvCSyT.cjs → bubble-chart-positioning.config-Bp_l4Cw1.cjs} +1 -1
- package/components/{bubble-chart-positioning.config-CL3mDsC-.js → bubble-chart-positioning.config-Q7mIfpcz.js} +1 -1
- package/components/{bullet-chart-positioning.config-DxXEGnbz.js → bullet-chart-positioning.config-B7aXCajU.js} +1 -1
- package/components/{bullet-chart-positioning.config-DA-1zmsD.cjs → bullet-chart-positioning.config-sj7E3xEM.cjs} +1 -1
- package/components/{choropleth-map-positioning.config-BicHLfN0.js → choropleth-map-positioning.config-CtoJov9H.js} +1 -1
- package/components/{choropleth-map-positioning.config-D_1MCD5i.cjs → choropleth-map-positioning.config-DM-iNbgs.cjs} +1 -1
- package/components/{circle-pack-chart-positioning.config-a_vo4VFg.js → circle-pack-chart-positioning.config-BgxnBOQT.js} +1 -1
- package/components/{circle-pack-chart-positioning.config-oTUkvFFJ.cjs → circle-pack-chart-positioning.config-Cs9xMDpi.cjs} +1 -1
- package/components/{circular-gauge-positioning.config-TG1wPyHz.cjs → circular-gauge-positioning.config-Bzulob5F.cjs} +1 -1
- package/components/{circular-gauge-positioning.config-BEM85XhO.js → circular-gauge-positioning.config-FEkbw6hK.js} +1 -1
- package/components/{column-chart-positioning.config-D1kXKreT.cjs → column-chart-positioning.config-9ho9oUo8.cjs} +1 -1
- package/components/{column-chart-positioning.config-x-wEIoTZ.js → column-chart-positioning.config-BeVOSQaJ.js} +1 -1
- package/components/{combination-chart-positioning.config-COksdK7F.cjs → combination-chart-positioning.config-CaShl4vv.cjs} +1 -1
- package/components/{combination-chart-positioning.config-DLyPa1Im.js → combination-chart-positioning.config-D4VUK54k.js} +1 -1
- package/components/{conditional-number-positioning.config-5SBhp4Kh.cjs → conditional-number-positioning.config-BEMjjhdi.cjs} +1 -1
- package/components/{conditional-number-positioning.config-6ZQHIgAA.js → conditional-number-positioning.config-C-LpjCJN.js} +1 -1
- package/components/data-field/index.cjs +1 -1
- package/components/data-field/index.js +2 -2
- package/components/{data-field-D1lrRnLX.js → data-field-Dz0XFrep.js} +3 -3
- package/components/{data-field-D050EJkx.cjs → data-field-lGJ557o4.cjs} +1 -1
- package/components/data-field-level/index.cjs +1 -1
- package/components/data-field-level/index.js +2 -2
- package/components/{data-field-level-CKlijSjc.cjs → data-field-level-B9r4ucP6.cjs} +1 -1
- package/components/{data-field-level-Da8Pwva2.js → data-field-level-DJoidlHN.js} +1 -1
- package/components/data-field-panel/index.cjs +1 -1
- package/components/data-field-panel/index.js +2 -2
- package/components/{data-field-panel-47PGrrIi.cjs → data-field-panel-BzyjbJO5.cjs} +1 -1
- package/components/{data-field-panel-CgqJ1bLg.js → data-field-panel-CdeJxZCr.js} +3 -3
- package/components/data-fields-select/data-fields-select.d.ts +6 -0
- package/components/data-fields-select/index.cjs +1 -1
- package/components/data-fields-select/index.js +2 -2
- package/components/data-fields-select-BBzzUG2u.cjs +41 -0
- package/components/{data-fields-select-B40TXGd7.js → data-fields-select-BRBBrS-x.js} +23 -5
- package/components/dataset-icon/index.js +1 -1
- package/components/dataset-selector-list/index.cjs +1 -1
- package/components/dataset-selector-list/index.js +2 -2
- package/components/{dataset-selector-list-C0dheupb.js → dataset-selector-list-DGCh1bvb.js} +1 -1
- package/components/{dataset-selector-list-CKQ7OgMN.cjs → dataset-selector-list-xF3yKGan.cjs} +1 -1
- package/components/dataset-selector-row/index.cjs +1 -1
- package/components/dataset-selector-row/index.js +2 -2
- package/components/{dataset-selector-row-DP6QUWYs.js → dataset-selector-row-BbnjxfIz.js} +1 -1
- package/components/{dataset-selector-row-_FZPTBE1.cjs → dataset-selector-row-fmrY3y86.cjs} +1 -1
- package/components/de-BzcAVqyW.cjs +20 -0
- package/components/{de-CPcJgwTx.js → de-CRrCVuH7.js} +15 -0
- package/components/display-settings/index.cjs +1 -1
- package/components/display-settings/index.js +2 -2
- package/components/{display-settings-B-eamVdN.js → display-settings-C9OQ4Eou.js} +3 -3
- package/components/display-settings-binning/index.cjs +1 -1
- package/components/display-settings-binning/index.js +2 -2
- package/components/{display-settings-binning-BGtp0Wvl.js → display-settings-binning-B8E2H5cY.js} +2 -2
- package/components/{display-settings-binning-Cs8MS7BY.cjs → display-settings-binning-BBNL97l9.cjs} +1 -1
- package/components/display-settings-datetime/index.cjs +1 -1
- package/components/display-settings-datetime/index.js +2 -2
- package/components/{display-settings-datetime-CbTnG486.js → display-settings-datetime-BBzvzwl5.js} +2 -2
- package/components/{display-settings-datetime-q20qbrOL.cjs → display-settings-datetime-czjk5Msv.cjs} +1 -1
- package/components/display-settings-eSQCidqh.cjs +140 -0
- package/components/display-settings-grand-totals/index.cjs +1 -1
- package/components/display-settings-grand-totals/index.js +2 -2
- package/components/{display-settings-grand-totals-BDeeC6-h.js → display-settings-grand-totals-CF01m8x-.js} +2 -2
- package/components/{display-settings-grand-totals-DdEXs_mA.cjs → display-settings-grand-totals-RwMnGwFZ.cjs} +1 -1
- package/components/display-settings-numeric/index.cjs +1 -1
- package/components/display-settings-numeric/index.js +2 -2
- package/components/{display-settings-numeric-C5FlahN_.js → display-settings-numeric-BcpwYX16.js} +2 -2
- package/components/{display-settings-numeric-PtcxP80Z.cjs → display-settings-numeric-C4X7oOEU.cjs} +1 -1
- package/components/display-settings-period-over-period/index.cjs +1 -1
- package/components/display-settings-period-over-period/index.js +2 -2
- package/components/{display-settings-period-over-period-CUlsSQZv.js → display-settings-period-over-period-B8UNYZ0I.js} +2 -2
- package/components/{display-settings-period-over-period-Csv7Kwri.cjs → display-settings-period-over-period-BG9YAcCw.cjs} +1 -1
- package/components/{donut-chart-positioning.config-EudGY45O.js → donut-chart-positioning.config-CaADC7Qr.js} +1 -1
- package/components/{donut-chart-positioning.config-m_uVKoNn.cjs → donut-chart-positioning.config-Dfws3ojS.cjs} +1 -1
- package/components/{es-fXPjX3vY.js → es-BIgv-ijQ.js} +15 -0
- package/components/es-mPmtD7j4.cjs +20 -0
- package/components/{evolution-number-positioning.config-BcLsEydB.js → evolution-number-positioning.config-C-OV1wpL.js} +1 -1
- package/components/{evolution-number-positioning.config-CJii0q3V.cjs → evolution-number-positioning.config-CI_2m2Sr.cjs} +1 -1
- package/components/filter-expression-picker/index.cjs +1 -1
- package/components/filter-expression-picker/index.js +2 -2
- package/components/{filter-expression-picker-nW1Hff7C.js → filter-expression-picker-CH2Fna8C.js} +1 -1
- package/components/{filter-expression-picker-D28THjzU.cjs → filter-expression-picker-_mfcXZ-n.cjs} +1 -1
- package/components/filter-item/filter-item.d.ts +15 -0
- package/components/filter-item/index.cjs +1 -1
- package/components/filter-item/index.js +2 -2
- package/components/filter-item-5HCSM9cu.cjs +71 -0
- package/components/{filter-item-BoYKU9tK.js → filter-item-CL3S9HOx.js} +100 -41
- package/components/filter-parameter-picker/filter-parameter-picker.d.ts +71 -9
- package/components/filter-parameter-picker/filter-parameter-picker.helpers.d.ts +8 -0
- package/components/filter-parameter-picker/index.cjs +1 -3
- package/components/filter-parameter-picker/index.d.ts +2 -0
- package/components/filter-parameter-picker/index.js +3 -33
- package/components/filter-parameter-picker/types.d.ts +4 -0
- package/components/filter-parameter-picker-CU48aEOS.js +363 -0
- package/components/filter-parameter-picker-CxbAY5hy.cjs +123 -0
- package/components/filter-value-picker/filter-value-picker.d.ts +1 -0
- package/components/filter-value-picker/index.cjs +1 -1
- package/components/filter-value-picker/index.js +2 -2
- package/components/{filter-value-picker-1kMJ9slB.js → filter-value-picker-CD8DjcHo.js} +5 -5
- package/components/{filter-value-picker-D08bAAKt.cjs → filter-value-picker-CRrUhngj.cjs} +1 -1
- package/components/filter-value-picker-datetime/filter-value-picker-datetime.d.ts +2 -0
- package/components/filter-value-picker-datetime/index.cjs +1 -1
- package/components/filter-value-picker-datetime/index.js +2 -2
- package/components/{filter-value-picker-datetime-Cnwlipah.js → filter-value-picker-datetime-DS7IK9aN.js} +2 -2
- package/components/{filter-value-picker-datetime-OIgFSdU2.cjs → filter-value-picker-datetime-dXaHpCRX.cjs} +1 -1
- package/components/filter-value-picker-hierarchy/filter-value-picker-hierarchy.d.ts +2 -0
- package/components/filter-value-picker-hierarchy/index.cjs +1 -1
- package/components/filter-value-picker-hierarchy/index.js +2 -2
- package/components/{filter-value-picker-hierarchy-DdMLbCO3.js → filter-value-picker-hierarchy-k0T56CvH.js} +3 -3
- package/components/{filter-value-picker-hierarchy-BGgHIji-.cjs → filter-value-picker-hierarchy-kwnEzxIk.cjs} +1 -1
- package/components/filter-value-picker-numeric/filter-value-picker-numeric.d.ts +1 -0
- package/components/filter-value-picker-numeric/index.cjs +1 -1
- package/components/filter-value-picker-numeric/index.js +2 -2
- package/components/{filter-value-picker-numeric-BL2gD2ED.cjs → filter-value-picker-numeric-BVei4Vlc.cjs} +1 -1
- package/components/{filter-value-picker-numeric-BqrsENh6.js → filter-value-picker-numeric-BaQe4r82.js} +2 -2
- package/components/filters/filters.d.ts +38 -4
- package/components/filters/index.cjs +1 -1
- package/components/filters/index.d.ts +4 -1
- package/components/filters/index.js +3 -3
- package/components/filters/transformations/clean-filters.d.ts +37 -0
- package/components/filters/transformations/filter-format.d.ts +54 -0
- package/components/filters/transformations/transform-filters.d.ts +27 -12
- package/components/filters/types.d.ts +48 -3
- package/components/filters-B70hF2NT.js +742 -0
- package/components/filters-ms2gFstA.cjs +153 -0
- package/components/formula/index.cjs +1 -1
- package/components/formula/index.js +2 -2
- package/components/{formula-CNzBOTRQ.js → formula-DdgD312W.js} +2 -2
- package/components/{formula-codemirror-pnijOvXU.js → formula-codemirror-D3Z1Qa0J.js} +4 -4
- package/components/{formula-codemirror-D1hgPIW_.cjs → formula-codemirror-GoFCSp6r.cjs} +1 -1
- package/components/{formula-display-store-BBMmHCRp.js → formula-display-store-bPGDv_xk.js} +10 -7
- package/components/formula-display-store-eE3zaCyB.cjs +20 -0
- package/components/formula-editor/index.cjs +1 -1
- package/components/formula-editor/index.js +4 -4
- package/components/{formula-editor-Uejdzkm6.cjs → formula-editor-8wWzGGJr.cjs} +1 -1
- package/components/{formula-editor-DvDB6JYI.js → formula-editor-BnWiiFr5.js} +5 -5
- package/components/formula-field/index.cjs +1 -1
- package/components/formula-field/index.js +2 -2
- package/components/{formula-field-o_zZQACN.js → formula-field-DlEgUu58.js} +1 -1
- package/components/{formula-field-CNyKz9wY.cjs → formula-field-IHf6I8mL.cjs} +1 -1
- package/components/{formula-DeRjtboJ.cjs → formula-glPlLx_5.cjs} +1 -1
- package/components/{formula-input-base-DlVNZBUA.js → formula-input-base-7I069pOJ.js} +1 -1
- package/components/{formula-input-base-fTF1KXpl.cjs → formula-input-base-D5yx7RYX.cjs} +1 -1
- package/components/fr-BHUhOl6R.cjs +20 -0
- package/components/{fr-B50vb6LP.js → fr-CI9fC-NM.js} +15 -0
- package/components/{funnel-chart-positioning.config-B_C8nr1y.js → funnel-chart-positioning.config-CNEeOwuT.js} +1 -1
- package/components/{funnel-chart-positioning.config-DhrMsuyt.cjs → funnel-chart-positioning.config-Cz8gQRh_.cjs} +1 -1
- package/components/{get-dataset-name-DrTVBElb.cjs → get-dataset-name-Bae0I2_J.cjs} +1 -1
- package/components/{get-dataset-name-DYLJB67F.js → get-dataset-name-OJK38mEs.js} +1 -1
- package/components/{groupings-BPlu4GFe.cjs → groupings-B0qMZHSd.cjs} +1 -1
- package/components/{groupings-DAj2iFeA.js → groupings-BZJTnpwR.js} +1 -1
- package/components/{heat-map-positioning.config-Bya2_TR8.cjs → heat-map-positioning.config-CEH6qyrN.cjs} +1 -1
- package/components/{heat-map-positioning.config-Cxembqle.js → heat-map-positioning.config-D-Ba4Ts_.js} +1 -1
- package/components/{heat-table-positioning.config-CNeTnuHy.js → heat-table-positioning.config-DCnowqOc.js} +1 -1
- package/components/{heat-table-positioning.config-CYZr5ksc.cjs → heat-table-positioning.config-DWNETZMx.cjs} +1 -1
- package/components/{hexbin-map-positioning.config-Dfdgub0y.js → hexbin-map-positioning.config-Br0pjvMN.js} +1 -1
- package/components/{hexbin-map-positioning.config-bXZEY4nP.cjs → hexbin-map-positioning.config-DoiUVZ8h.cjs} +1 -1
- package/components/index.cjs +1 -1
- package/components/index.js +64 -63
- package/components/interactive-viz-item/index.cjs +1 -1
- package/components/interactive-viz-item/index.js +2 -2
- package/components/{interactive-viz-item-D-hR2G5x.cjs → interactive-viz-item-DZoRqeJW.cjs} +1 -1
- package/components/{interactive-viz-item-C3fzZq7j.js → interactive-viz-item-Dogksvpq.js} +5 -5
- package/components/item-grid/index.cjs +1 -1
- package/components/item-grid/index.js +2 -2
- package/components/{item-grid-BruAZOla.cjs → item-grid-VPRvzGCa.cjs} +1 -1
- package/components/{item-grid-cyMiRw7P.js → item-grid-ZQpp1brq.js} +1 -1
- package/components/item-option/index.cjs +1 -1
- package/components/item-option/index.js +2 -2
- package/components/{item-option-CZb01VJb.js → item-option-B9tALelF.js} +1 -1
- package/components/{item-option-BclNWwdZ.cjs → item-option-BRgOBMM0.cjs} +1 -1
- package/components/item-option-action-button-group/index.cjs +1 -1
- package/components/item-option-action-button-group/index.js +2 -2
- package/components/{item-option-action-button-group-AkMaJHuv.cjs → item-option-action-button-group-BYE7i8Zd.cjs} +1 -1
- package/components/{item-option-action-button-group-HfUtaTi9.js → item-option-action-button-group-WrHKP761.js} +1 -1
- package/components/{item-option-base-CZegYACf.cjs → item-option-base-CTBIeARi.cjs} +1 -1
- package/components/{item-option-base-DlHZAfWZ.js → item-option-base-CuxvyS-a.js} +1 -1
- package/components/item-option-color-palette-picker/index.cjs +1 -1
- package/components/item-option-color-palette-picker/index.js +2 -2
- package/components/{item-option-color-palette-picker-B336qQRk.cjs → item-option-color-palette-picker-CyailqDd.cjs} +1 -1
- package/components/{item-option-color-palette-picker-Dt4z0c4W.js → item-option-color-palette-picker-eYAyoXM1.js} +1 -1
- package/components/item-option-color-picker/index.cjs +1 -1
- package/components/item-option-color-picker/index.js +2 -2
- package/components/{item-option-color-picker-BRO416_T.js → item-option-color-picker-D_x6FgZy.js} +1 -1
- package/components/{item-option-color-picker-Hfu2fhRF.cjs → item-option-color-picker-DsfZKPDo.cjs} +1 -1
- package/components/item-option-color-range/index.cjs +1 -1
- package/components/item-option-color-range/index.js +2 -2
- package/components/{item-option-color-range-DgalNZ9b.js → item-option-color-range-CHSbql1w.js} +1 -1
- package/components/{item-option-color-range-DWoaz57E.cjs → item-option-color-range-tAMMKg6y.cjs} +1 -1
- package/components/item-option-multi-language-field/index.cjs +1 -1
- package/components/item-option-multi-language-field/index.js +2 -2
- package/components/{item-option-multi-language-field-BvJXIFgu.js → item-option-multi-language-field-D51cJ4BM.js} +1 -1
- package/components/{item-option-multi-language-field-IQP6fbgB.cjs → item-option-multi-language-field-DjWm-jWC.cjs} +1 -1
- package/components/item-option-number-field/index.cjs +1 -1
- package/components/item-option-number-field/index.js +2 -2
- package/components/{item-option-number-field-B07NhNSm.cjs → item-option-number-field-Dep43Ym5.cjs} +1 -1
- package/components/{item-option-number-field-CvGknDpu.js → item-option-number-field-Df56sivV.js} +1 -1
- package/components/item-option-panel/index.cjs +1 -1
- package/components/item-option-panel/index.js +2 -2
- package/components/{item-option-panel-RYdx8Hfk.js → item-option-panel-BYCfnDeP.js} +3 -3
- package/components/{item-option-panel-BWP9E8cW.cjs → item-option-panel-ClDspg51.cjs} +1 -1
- package/components/item-option-picker/index.cjs +1 -1
- package/components/item-option-picker/index.js +2 -2
- package/components/{item-option-picker-DM1pU3w9.js → item-option-picker-BCsB7psT.js} +1 -1
- package/components/{item-option-picker-C7SZfnLP.cjs → item-option-picker-CBfFgSKs.cjs} +1 -1
- package/components/item-option-position-picker/index.cjs +1 -1
- package/components/item-option-position-picker/index.js +2 -2
- package/components/{item-option-position-picker-BuDvx3SX.js → item-option-position-picker-CXJGmmWF.js} +1 -1
- package/components/{item-option-position-picker-M9CBH9NE.cjs → item-option-position-picker-CYoOkH1m.cjs} +1 -1
- package/components/item-option-positions-number-field/index.cjs +1 -1
- package/components/item-option-positions-number-field/index.js +2 -2
- package/components/{item-option-positions-number-field-C4zW5-Hc.cjs → item-option-positions-number-field-CNUCVm78.cjs} +1 -1
- package/components/{item-option-positions-number-field-RN5AG-Ic.js → item-option-positions-number-field-CkfSHCFO.js} +1 -1
- package/components/item-option-radio-button-group/index.cjs +1 -1
- package/components/item-option-radio-button-group/index.js +2 -2
- package/components/{item-option-radio-button-group-Ce780UyR.js → item-option-radio-button-group-CSyh4eS2.js} +1 -1
- package/components/{item-option-radio-button-group-DRiwqorh.cjs → item-option-radio-button-group-ZIvbpJf9.cjs} +1 -1
- package/components/item-option-slider/index.cjs +1 -1
- package/components/item-option-slider/index.js +2 -2
- package/components/item-option-slider/item-option-slider.d.ts +5 -0
- package/components/{item-option-slider-BUdWMAzT.js → item-option-slider-CTt5aYbb.js} +31 -16
- package/components/{item-option-slider-CycHQFnr.cjs → item-option-slider-CaxIGDWN.cjs} +3 -3
- package/components/item-option-switch/index.cjs +1 -1
- package/components/item-option-switch/index.js +2 -2
- package/components/{item-option-switch-CvcZSytb.js → item-option-switch-B91r65eW.js} +1 -1
- package/components/{item-option-switch-CM5R8wO_.cjs → item-option-switch-wEx5JkSe.cjs} +1 -1
- package/components/item-option-text-field/index.cjs +1 -1
- package/components/item-option-text-field/index.js +2 -2
- package/components/{item-option-text-field-BZjOilSu.cjs → item-option-text-field-BLcYkH-j.cjs} +1 -1
- package/components/{item-option-text-field-CyuYUITv.js → item-option-text-field-BvSCGhuH.js} +1 -1
- package/components/item-slot-drop/index.cjs +1 -1
- package/components/item-slot-drop/index.js +2 -2
- package/components/{item-slot-drop-C6DO5mPk.js → item-slot-drop-Box1wnvM.js} +5 -5
- package/components/{item-slot-drop-CrzFRobc.cjs → item-slot-drop-n-lD8Zyh.cjs} +1 -1
- package/components/item-slot-drop-panel/index.cjs +1 -1
- package/components/item-slot-drop-panel/index.js +2 -2
- package/components/{item-slot-drop-panel-DvmPk1pJ.js → item-slot-drop-panel-KtZKw0Ly.js} +39 -39
- package/components/{item-slot-drop-panel-ChazcNSe.cjs → item-slot-drop-panel-sCkQ0dUU.cjs} +1 -1
- package/components/item-slot-picker/index.cjs +1 -1
- package/components/item-slot-picker/index.js +2 -2
- package/components/{item-slot-picker-CmG71mGy.js → item-slot-picker-Cm8o4A00.js} +6 -6
- package/components/{item-slot-picker-DQkG3Lt7.cjs → item-slot-picker-DKPE2NQn.cjs} +1 -1
- package/components/item-slot-picker-panel/index.cjs +1 -1
- package/components/item-slot-picker-panel/index.js +2 -2
- package/components/{item-slot-picker-panel-Bi2jXvQA.cjs → item-slot-picker-panel-DK5jRBYs.cjs} +1 -1
- package/components/{item-slot-picker-panel-DmGYI5YI.js → item-slot-picker-panel-DOHi_8UO.js} +3 -3
- package/components/{line-chart-positioning.config-Cqnfz4Lc.cjs → line-chart-positioning.config-C05IZ4Jj.cjs} +1 -1
- package/components/{line-chart-positioning.config-CFHFq0wp.js → line-chart-positioning.config-DQfyOkWV.js} +1 -1
- package/components/{localized-mixin-CUuRZu9t.cjs → localized-mixin-BForHr3t.cjs} +1 -1
- package/components/{localized-mixin-B4fDdsF0.js → localized-mixin-D-vXCJuU.js} +1 -1
- package/components/{marker-map-positioning.config-x3KUsgzD.js → marker-map-positioning.config-CD7n0uLB.js} +1 -1
- package/components/{marker-map-positioning.config-BM-ZrmE9.cjs → marker-map-positioning.config-DOhXf-CR.cjs} +1 -1
- package/components/{nl-Do6FfV7U.js → nl-HLnZHvTS.js} +15 -0
- package/components/nl-NxeHJ8X8.cjs +20 -0
- package/components/{ohlc-chart-positioning.config-C-vx6lt-.js → ohlc-chart-positioning.config-Bl-ckdlQ.js} +1 -1
- package/components/{ohlc-chart-positioning.config-SIhJhFel.cjs → ohlc-chart-positioning.config-CDf77OgH.cjs} +1 -1
- package/components/{parallel-coordinates-plot-positioning.config-Br1OGTEZ.cjs → parallel-coordinates-plot-positioning.config-DfsKsUdv.cjs} +1 -1
- package/components/{parallel-coordinates-plot-positioning.config-BaofZgit.js → parallel-coordinates-plot-positioning.config-Tbzzr5L6.js} +1 -1
- package/components/{pivot-table-positioning.config-BaBkuXV0.cjs → pivot-table-positioning.config-DwuKN2xz.cjs} +1 -1
- package/components/{pivot-table-positioning.config-DeeS1MaO.js → pivot-table-positioning.config-_YDPeFQz.js} +1 -1
- package/components/{pyramid-chart-positioning.config-g55mkotb.cjs → pyramid-chart-positioning.config-7AJy2_zR.cjs} +1 -1
- package/components/{pyramid-chart-positioning.config-D14NnyH1.js → pyramid-chart-positioning.config-Btm_8m46.js} +1 -1
- package/components/{radar-chart-positioning.config-CWGfQ7-j.cjs → radar-chart-positioning.config-7Kx_uKbW.cjs} +1 -1
- package/components/{radar-chart-positioning.config-C9fiYOnB.js → radar-chart-positioning.config-DWziVqMW.js} +1 -1
- package/components/{route-map-positioning.config-Cd4azpuW.js → route-map-positioning.config-C4-2zLGp.js} +1 -1
- package/components/{route-map-positioning.config-Dswq4pH_.cjs → route-map-positioning.config-DDgEAW4k.cjs} +1 -1
- package/components/{sankey-diagram-positioning.config-CAHzdKBq.cjs → sankey-diagram-positioning.config-BxVJaOKN.cjs} +1 -1
- package/components/{sankey-diagram-positioning.config-CzGCvTeX.js → sankey-diagram-positioning.config-DQcUg8Cg.js} +1 -1
- package/components/{scatter-plot-positioning.config-CrVJZ-X9.cjs → scatter-plot-positioning.config-D3xI_5P8.cjs} +1 -1
- package/components/{scatter-plot-positioning.config-C7nu7quv.js → scatter-plot-positioning.config-DOgeShUF.js} +1 -1
- package/components/{set-locale-DBVSKk_b.js → set-locale-D9gR8t-s.js} +4 -4
- package/components/{set-locale-1r0lDa7J.cjs → set-locale-MQpiifTB.cjs} +1 -1
- package/components/{slicer-filter-positioning.config-7sucz3_y.js → slicer-filter-positioning.config-CiHfPrM5.js} +1 -1
- package/components/{slicer-filter-positioning.config-D9Tehydc.cjs → slicer-filter-positioning.config-bN36DdLc.cjs} +1 -1
- package/components/slot-menu/index.cjs +1 -1
- package/components/slot-menu/index.js +2 -2
- package/components/{slot-menu-AavTGkLk.cjs → slot-menu-K5QiEu6o.cjs} +1 -1
- package/components/{slot-menu-Dz-O1ypQ.js → slot-menu-Qy35BZZ_.js} +3 -3
- package/components/slot-menu-list/index.cjs +1 -1
- package/components/slot-menu-list/index.js +2 -2
- package/components/{slot-menu-list-BegM0w8C.js → slot-menu-list-BKMbIFg1.js} +1 -1
- package/components/{slot-menu-list-Cahst0TY.cjs → slot-menu-list-DmQe7882.cjs} +1 -1
- package/components/{speedometer-chart-positioning.config-DiDSe44G.js → speedometer-chart-positioning.config-B7M91sKN.js} +1 -1
- package/components/{speedometer-chart-positioning.config-CZgXkEsG.cjs → speedometer-chart-positioning.config-Ce70l0Ei.cjs} +1 -1
- package/components/{spike-map-positioning.config-RExJASrJ.cjs → spike-map-positioning.config-D3wIf0RU.cjs} +1 -1
- package/components/{spike-map-positioning.config-W-xJbchu.js → spike-map-positioning.config-Qf4LOPvB.js} +1 -1
- package/components/{strip-plot-positioning.config-C70pTRqg.cjs → strip-plot-positioning.config-BIoncLjm.cjs} +1 -1
- package/components/{strip-plot-positioning.config-DsKb9ton.js → strip-plot-positioning.config-MbfBVHf8.js} +1 -1
- package/components/{sunburst-chart-positioning.config-BAhEnZtE.js → sunburst-chart-positioning.config-CqyXZPxE.js} +1 -1
- package/components/{sunburst-chart-positioning.config-BHvaDZCC.cjs → sunburst-chart-positioning.config-zqPLL8yF.cjs} +1 -1
- package/components/{symbol-map-positioning.config-B2RZQPND.cjs → symbol-map-positioning.config-CQ4Vxu96.cjs} +1 -1
- package/components/{symbol-map-positioning.config-DNPiG975.js → symbol-map-positioning.config-plXDTBA3.js} +1 -1
- package/components/{treemap-chart-positioning.config-C0LbkC6B.js → treemap-chart-positioning.config-BTGBN1f9.js} +1 -1
- package/components/{treemap-chart-positioning.config-CIYguC9V.cjs → treemap-chart-positioning.config-CSZXzuT5.cjs} +1 -1
- package/components/utils/base.cjs +1 -1
- package/components/utils/base.js +2 -2
- package/components/{utils-Cx4X0PBr.cjs → utils-BDvDwAn7.cjs} +1 -1
- package/components/{utils-C8ATDm66.js → utils-Z9xbTTWG.js} +1 -1
- package/components/utils.cjs +1 -1
- package/components/utils.js +2 -2
- package/components/{venn-diagram-positioning.config-CGmfYuoj.cjs → venn-diagram-positioning.config-C4vcZDtW.cjs} +1 -1
- package/components/{venn-diagram-positioning.config-CPUT2LXS.js → venn-diagram-positioning.config-fPvrjtfX.js} +1 -1
- package/components/viz-item-menu/index.cjs +1 -1
- package/components/viz-item-menu/index.js +2 -2
- package/components/{viz-item-menu-BKXdr3_Q.cjs → viz-item-menu-DxA295eM.cjs} +1 -1
- package/components/{viz-item-menu-XoCSn7z_.js → viz-item-menu-vckPQBdf.js} +1 -1
- package/components/{wordcloud-chart-positioning.config-roHRUT_m.cjs → wordcloud-chart-positioning.config-Cf1ErL-B.cjs} +1 -1
- package/components/{wordcloud-chart-positioning.config-CqCOWKL4.js → wordcloud-chart-positioning.config-ChUx_Ahc.js} +1 -1
- package/custom-elements.json +1325 -122
- package/index.d.ts +1 -0
- package/package.json +5 -5
- package/react/components/filter-parameter-picker.component.ts +15 -4
- package/react/components/filters.component.ts +9 -3
- package/react/esm/components/filter-parameter-picker.component.d.ts +11 -3
- package/react/esm/components/filter-parameter-picker.component.js +9 -1
- package/react/esm/components/filters.component.d.ts +10 -2
- package/react/esm/components/filters.component.js +6 -2
- package/react/luzmo-stub.d.ts +2 -1
- package/react/package.json +2 -2
- package/storybook/register-components.d.ts +18 -13
- package/utils/formula/store/formula-display-store.d.ts +6 -0
- package/components/ai-chat-CBLWbv9C.cjs +0 -319
- package/components/data-fields-select-CQVqxMCS.cjs +0 -41
- package/components/de-CFFG1QN7.cjs +0 -20
- package/components/display-settings-1AdcENcv.cjs +0 -140
- package/components/es-Bd7rtLnM.cjs +0 -20
- package/components/filter-item-BirgEXGE.cjs +0 -58
- package/components/filters-BLss6wBx.js +0 -407
- package/components/filters-rjc5xsF_.cjs +0 -150
- package/components/formula-display-store-Dn7r5kK8.cjs +0 -20
- package/components/fr-kmzf1vls.cjs +0 -20
- package/components/nl-FcPtgtcL.cjs +0 -20
|
@@ -1,407 +0,0 @@
|
|
|
1
|
-
/*! * A kit of modern Luzmo Web Components for analytics in your web application.
|
|
2
|
-
*
|
|
3
|
-
* Copyright © 2026 Luzmo
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Luzmo web components (“Luzmo Web Components”)
|
|
6
|
-
* must be used according to the Luzmo Terms of Service.
|
|
7
|
-
* This license allows users with a current active Luzmo account
|
|
8
|
-
* to use the Luzmo Web Components. This license terminates
|
|
9
|
-
* automatically if a user no longer has an active Luzmo account.
|
|
10
|
-
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
11
|
-
*
|
|
12
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
13
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
14
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
15
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
16
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
17
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
|
-
* SOFTWARE.
|
|
19
|
-
* */
|
|
20
|
-
import { t as e } from "./decorate-DyMgX_Uh.js";
|
|
21
|
-
import { t } from "./localized-mixin-B4fDdsF0.js";
|
|
22
|
-
import "./filter-item-BoYKU9tK.js";
|
|
23
|
-
import { luzmoPlus as n, luzmoTrashOutline as r } from "@luzmo/icons";
|
|
24
|
-
import "@luzmo/lucero/button";
|
|
25
|
-
import "@luzmo/lucero/icon";
|
|
26
|
-
import { html as i, unsafeCSS as a } from "lit";
|
|
27
|
-
import { property as o, state as s } from "lit/decorators.js";
|
|
28
|
-
import { localized as c, msg as l } from "@lit/localize";
|
|
29
|
-
import "@luzmo/lucero/action-button";
|
|
30
|
-
import { repeat as u } from "lit/directives/repeat.js";
|
|
31
|
-
import { ElementSizes as d, LuzmoElement as f, SizedMixin as p } from "@luzmo/lucero/utils";
|
|
32
|
-
//#region src/components/filters/transformations/transform-filters.ts
|
|
33
|
-
function m(e) {
|
|
34
|
-
return typeof e == "string" && e.toLowerCase() === "or" ? "or" : "and";
|
|
35
|
-
}
|
|
36
|
-
function h(e) {
|
|
37
|
-
return typeof e == "object" && !!e && "condition" in e && "filters" in e;
|
|
38
|
-
}
|
|
39
|
-
function g(e) {
|
|
40
|
-
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
41
|
-
}
|
|
42
|
-
function _(e) {
|
|
43
|
-
if (!Array.isArray(e) || e.length === 0) return [];
|
|
44
|
-
let t = g(e[0]) ? e[0] : void 0, n = e.length > 1 ? e[1] : void 0;
|
|
45
|
-
return e.length > 1 ? [t, n] : [t];
|
|
46
|
-
}
|
|
47
|
-
function v(e) {
|
|
48
|
-
return typeof e.expression != "string" || e.expression.length === 0 ? null : {
|
|
49
|
-
expression: e.expression,
|
|
50
|
-
parameters: _(e.parameters)
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
function y(e) {
|
|
54
|
-
if (!e || !e.filters) return {
|
|
55
|
-
condition: "and",
|
|
56
|
-
filters: [],
|
|
57
|
-
subGroups: []
|
|
58
|
-
};
|
|
59
|
-
let t = [], n = [];
|
|
60
|
-
for (let r of e.filters) if (h(r)) n.push(y(r));
|
|
61
|
-
else {
|
|
62
|
-
let e = v(r);
|
|
63
|
-
e && t.push(e);
|
|
64
|
-
}
|
|
65
|
-
return {
|
|
66
|
-
condition: m(e.condition),
|
|
67
|
-
filters: t,
|
|
68
|
-
subGroups: n
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
function b(e) {
|
|
72
|
-
return e ? [y(e)] : [];
|
|
73
|
-
}
|
|
74
|
-
function x(e) {
|
|
75
|
-
return {
|
|
76
|
-
expression: e.expression,
|
|
77
|
-
parameters: Array.isArray(e.parameters) ? [...e.parameters] : []
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
function S(e) {
|
|
81
|
-
let t = e.subGroups ?? [];
|
|
82
|
-
return {
|
|
83
|
-
condition: m(e.condition),
|
|
84
|
-
filters: [...e.filters.map(x), ...t.map((e) => S(e))]
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
function C(e) {
|
|
88
|
-
return !e || e.length === 0 ? [] : e.map((e) => S(e));
|
|
89
|
-
}
|
|
90
|
-
//#endregion
|
|
91
|
-
//#region src/components/filters/filters.module.scss?inline
|
|
92
|
-
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)}", T = {
|
|
93
|
-
and: () => l("AND", { desc: "Logical AND condition for combining filters" }),
|
|
94
|
-
or: () => l("OR", { desc: "Logical OR condition for combining filters" })
|
|
95
|
-
};
|
|
96
|
-
function E(e) {
|
|
97
|
-
return e === "and" ? "or" : "and";
|
|
98
|
-
}
|
|
99
|
-
var D = class extends t(p(f, { validSizes: Object.values(d) })) {
|
|
100
|
-
constructor(...e) {
|
|
101
|
-
super(...e), this.apiUrl = "https://api.luzmo.com", this.contentLanguage = "en", this.filters = [], this.debounce = 300, this._internalFilterGroup = null, this._debounceTimeout = null;
|
|
102
|
-
}
|
|
103
|
-
static get styles() {
|
|
104
|
-
return [a(w)];
|
|
105
|
-
}
|
|
106
|
-
get _oneSizeSmaller() {
|
|
107
|
-
return {
|
|
108
|
-
xxs: "xxs",
|
|
109
|
-
xs: "xs",
|
|
110
|
-
s: "xs",
|
|
111
|
-
m: "s",
|
|
112
|
-
l: "m",
|
|
113
|
-
xl: "l",
|
|
114
|
-
xxl: "xl"
|
|
115
|
-
}[this.size] || "s";
|
|
116
|
-
}
|
|
117
|
-
get _isDatasetIdsEmpty() {
|
|
118
|
-
return !this.datasetIds || this.datasetIds.length === 0;
|
|
119
|
-
}
|
|
120
|
-
disconnectedCallback() {
|
|
121
|
-
super.disconnectedCallback(), this._debounceTimeout &&= (clearTimeout(this._debounceTimeout), null);
|
|
122
|
-
}
|
|
123
|
-
willUpdate(e) {
|
|
124
|
-
if (super.willUpdate(e), e.has("filters")) {
|
|
125
|
-
let e = C(this.filters);
|
|
126
|
-
e.length === 0 ? this._internalFilterGroup = null : e.length === 1 ? this._internalFilterGroup = structuredClone(e[0]) : this._internalFilterGroup = {
|
|
127
|
-
condition: "and",
|
|
128
|
-
filters: structuredClone(e)
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
_generateEmptyGroup() {
|
|
133
|
-
return {
|
|
134
|
-
condition: "and",
|
|
135
|
-
filters: []
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
_generateEmptyFilter() {
|
|
139
|
-
return {
|
|
140
|
-
expression: void 0,
|
|
141
|
-
parameters: []
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
_getFiltersForExport() {
|
|
145
|
-
if (!this._internalFilterGroup) return [];
|
|
146
|
-
if (this._internalFilterGroup.filters.length > 0 && this._internalFilterGroup.filters.every((e) => this._isGroup(e))) return structuredClone(this._internalFilterGroup.filters).map((e) => b(e)[0]).filter((e) => !!e);
|
|
147
|
-
let [e] = b(structuredClone(this._internalFilterGroup));
|
|
148
|
-
return e ? [e] : [];
|
|
149
|
-
}
|
|
150
|
-
_sendChangeEvent() {
|
|
151
|
-
this._debounceTimeout && clearTimeout(this._debounceTimeout);
|
|
152
|
-
let e = () => {
|
|
153
|
-
this.dispatchEvent(new CustomEvent("luzmo-filters-changed", {
|
|
154
|
-
bubbles: !0,
|
|
155
|
-
composed: !0,
|
|
156
|
-
cancelable: !0,
|
|
157
|
-
detail: { filters: this._getFiltersForExport() }
|
|
158
|
-
}));
|
|
159
|
-
};
|
|
160
|
-
this.debounce > 0 ? this._debounceTimeout = setTimeout(e, this.debounce) : e();
|
|
161
|
-
}
|
|
162
|
-
_isGroup(e) {
|
|
163
|
-
return "condition" in e && "filters" in e;
|
|
164
|
-
}
|
|
165
|
-
_toggleCondition(e) {
|
|
166
|
-
e.condition = E(e.condition), this.requestUpdate(), this._sendChangeEvent();
|
|
167
|
-
}
|
|
168
|
-
_addFilter(e) {
|
|
169
|
-
if (this._isDatasetIdsEmpty) return;
|
|
170
|
-
let t = e;
|
|
171
|
-
t ||= (this._internalFilterGroup ||= this._generateEmptyGroup(), this._internalFilterGroup), t.filters.push(this._generateEmptyFilter()), this.requestUpdate(), this._sendChangeEvent();
|
|
172
|
-
}
|
|
173
|
-
_addSubGroup(e) {
|
|
174
|
-
if (this._isDatasetIdsEmpty) return;
|
|
175
|
-
let t = this._generateEmptyGroup();
|
|
176
|
-
t.condition = E(e.condition), t.filters.push(this._generateEmptyFilter()), e.filters.push(t), this.requestUpdate(), this._sendChangeEvent();
|
|
177
|
-
}
|
|
178
|
-
_removeFilter(e, t) {
|
|
179
|
-
if (this._internalFilterGroup) {
|
|
180
|
-
if (e.filters.splice(t, 1), e !== this._internalFilterGroup && e.filters.length === 0) {
|
|
181
|
-
let t = this._findParentGroup(this._internalFilterGroup, e);
|
|
182
|
-
if (t) {
|
|
183
|
-
let n = t.filters.indexOf(e);
|
|
184
|
-
n !== -1 && t.filters.splice(n, 1);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
this._collapseGroupsAfterDelete(), this.requestUpdate(), this._sendChangeEvent();
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
_updateFilter(e, t, n) {
|
|
191
|
-
n.stopPropagation(), this._isGroup(e.filters[t]) || (e.filters[t] = n.detail.filter, this._sendChangeEvent());
|
|
192
|
-
}
|
|
193
|
-
_addGroup() {
|
|
194
|
-
if (this._isDatasetIdsEmpty) return;
|
|
195
|
-
this._internalFilterGroup ||= this._generateEmptyGroup();
|
|
196
|
-
let e = this._generateEmptyGroup();
|
|
197
|
-
e.condition = E(this._internalFilterGroup.condition), e.filters.push(this._internalFilterGroup);
|
|
198
|
-
let t = this._generateEmptyGroup();
|
|
199
|
-
t.condition = E(e.condition), t.filters.push(this._generateEmptyFilter()), e.filters.push(t), this._internalFilterGroup = e, this.requestUpdate(), this._sendChangeEvent();
|
|
200
|
-
}
|
|
201
|
-
_renderFilterItem(e, t, n) {
|
|
202
|
-
return i`
|
|
203
|
-
<div class="filter-item-wrapper">
|
|
204
|
-
<div class="filter-item-content">
|
|
205
|
-
<luzmo-filter-item
|
|
206
|
-
.apiUrl=${this.apiUrl}
|
|
207
|
-
.authKey=${this.authKey}
|
|
208
|
-
.authToken=${this.authToken}
|
|
209
|
-
.cacheTime=${this.cacheTime}
|
|
210
|
-
.language=${this.language}
|
|
211
|
-
.contentLanguage=${this.contentLanguage}
|
|
212
|
-
.timeZone=${this.timeZone}
|
|
213
|
-
.datasetIds=${this.datasetIds}
|
|
214
|
-
.filter=${e}
|
|
215
|
-
.size=${this.size}
|
|
216
|
-
@luzmo-filter-changed=${this._updateFilter.bind(this, t, n)}
|
|
217
|
-
></luzmo-filter-item>
|
|
218
|
-
<luzmo-action-button
|
|
219
|
-
class="delete-filter-button"
|
|
220
|
-
.size=${this.size}
|
|
221
|
-
quiet
|
|
222
|
-
.label=${l("Remove filter", { desc: "Aria label for remove filter button" })}
|
|
223
|
-
@click=${this._removeFilter.bind(this, t, n)}
|
|
224
|
-
>
|
|
225
|
-
<luzmo-icon slot="icon" .icon=${r} .size=${this.size}></luzmo-icon>
|
|
226
|
-
</luzmo-action-button>
|
|
227
|
-
</div>
|
|
228
|
-
</div>
|
|
229
|
-
`;
|
|
230
|
-
}
|
|
231
|
-
_renderGroup(e, t = !1) {
|
|
232
|
-
let r = e.filters.length > 0, a = e.filters.length > 1, o = T[e.condition]?.() ?? e.condition;
|
|
233
|
-
return i`
|
|
234
|
-
<div class="filter-group ${t ? "nested" : ""}" role="group">
|
|
235
|
-
${t ? i`
|
|
236
|
-
<div class="condition-wrapper">
|
|
237
|
-
${a ? i`
|
|
238
|
-
<luzmo-action-button
|
|
239
|
-
class="condition-badge"
|
|
240
|
-
.size=${this._oneSizeSmaller}
|
|
241
|
-
quiet
|
|
242
|
-
aria-pressed=${e.condition === "and" ? "true" : "false"}
|
|
243
|
-
.label=${l("Toggle filter condition, currently ", { desc: "Aria label prefix for filter condition toggle" }) + o}
|
|
244
|
-
@click=${this._toggleCondition.bind(this, e)}
|
|
245
|
-
>
|
|
246
|
-
${o}
|
|
247
|
-
</luzmo-action-button>
|
|
248
|
-
` : ""}
|
|
249
|
-
</div>
|
|
250
|
-
` : a ? i`
|
|
251
|
-
<div class="condition-wrapper">
|
|
252
|
-
<luzmo-action-button
|
|
253
|
-
class="condition-badge"
|
|
254
|
-
.size=${this._oneSizeSmaller}
|
|
255
|
-
quiet
|
|
256
|
-
aria-pressed=${e.condition === "and" ? "true" : "false"}
|
|
257
|
-
.label=${l("Toggle filter condition, currently ", { desc: "Aria label prefix for filter condition toggle" }) + o}
|
|
258
|
-
@click=${this._toggleCondition.bind(this, e)}
|
|
259
|
-
>
|
|
260
|
-
${o}
|
|
261
|
-
</luzmo-action-button>
|
|
262
|
-
</div>
|
|
263
|
-
` : ""}
|
|
264
|
-
<div class="group-content">
|
|
265
|
-
${r ? i`
|
|
266
|
-
<div class="filters-list">
|
|
267
|
-
${u(e.filters, (e, t) => t, (t, n) => i`
|
|
268
|
-
${this._isGroup(t) ? this._renderGroup(t, !0) : this._renderFilterItem(t, e, n)}
|
|
269
|
-
`)}
|
|
270
|
-
</div>
|
|
271
|
-
` : ""}
|
|
272
|
-
|
|
273
|
-
<div class="group-actions">
|
|
274
|
-
<luzmo-action-button
|
|
275
|
-
class="add-filter-button"
|
|
276
|
-
.size=${this.size}
|
|
277
|
-
quiet
|
|
278
|
-
?disabled=${this._isDatasetIdsEmpty}
|
|
279
|
-
@click=${this._addFilter.bind(this, e)}
|
|
280
|
-
>
|
|
281
|
-
<luzmo-icon slot="icon" .icon=${n} .size=${this._oneSizeSmaller}></luzmo-icon>
|
|
282
|
-
${l("Filter", { desc: "Add filter button label" })}
|
|
283
|
-
</luzmo-action-button>
|
|
284
|
-
|
|
285
|
-
<luzmo-action-button
|
|
286
|
-
class="add-subgroup-button"
|
|
287
|
-
.size=${this.size}
|
|
288
|
-
quiet
|
|
289
|
-
?disabled=${this._isDatasetIdsEmpty}
|
|
290
|
-
@click=${this._addSubGroup.bind(this, e)}
|
|
291
|
-
>
|
|
292
|
-
<luzmo-icon slot="icon" .icon=${n} .size=${this._oneSizeSmaller}></luzmo-icon>
|
|
293
|
-
${l("Subgroup", { desc: "Add subgroup button label" })}
|
|
294
|
-
</luzmo-action-button>
|
|
295
|
-
</div>
|
|
296
|
-
</div>
|
|
297
|
-
</div>
|
|
298
|
-
`;
|
|
299
|
-
}
|
|
300
|
-
_findParentGroup(e, t) {
|
|
301
|
-
for (let n of e.filters) {
|
|
302
|
-
if (n === t) return e;
|
|
303
|
-
if (this._isGroup(n)) {
|
|
304
|
-
let e = this._findParentGroup(n, t);
|
|
305
|
-
if (e) return e;
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
return null;
|
|
309
|
-
}
|
|
310
|
-
_collapseIfNeeded(e) {
|
|
311
|
-
if (e.filters.length === 1 && this._isGroup(e.filters[0])) {
|
|
312
|
-
let t = e.filters[0];
|
|
313
|
-
e.condition = t.condition, e.filters = t.filters;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
_collapseGroupsAfterDelete() {
|
|
317
|
-
if (!this._internalFilterGroup) return;
|
|
318
|
-
let e = (t) => {
|
|
319
|
-
for (let n of t.filters) this._isGroup(n) && e(n);
|
|
320
|
-
this._collapseIfNeeded(t);
|
|
321
|
-
};
|
|
322
|
-
e(this._internalFilterGroup);
|
|
323
|
-
}
|
|
324
|
-
render() {
|
|
325
|
-
if (this._isDatasetIdsEmpty) return i`
|
|
326
|
-
<div class="filter-group-container">
|
|
327
|
-
<div class="dataset-ids-empty-message" role="status">
|
|
328
|
-
${l("Cannot retrieve dataset data fields", { desc: "Error message when datasetIds is empty" })}
|
|
329
|
-
</div>
|
|
330
|
-
</div>
|
|
331
|
-
`;
|
|
332
|
-
if (!this._internalFilterGroup || this._internalFilterGroup.filters.length === 0) return i`
|
|
333
|
-
<div class="filter-group-container">
|
|
334
|
-
<luzmo-button
|
|
335
|
-
class="add-filter-button"
|
|
336
|
-
.size=${this.size}
|
|
337
|
-
treatment="outline"
|
|
338
|
-
?disabled=${this._isDatasetIdsEmpty}
|
|
339
|
-
@click=${() => this._addFilter()}
|
|
340
|
-
>
|
|
341
|
-
<luzmo-icon slot="icon" .icon=${n} .size=${this._oneSizeSmaller}></luzmo-icon>
|
|
342
|
-
${l("Add filter", { desc: "Add filter button label" })}
|
|
343
|
-
</luzmo-button>
|
|
344
|
-
</div>
|
|
345
|
-
`;
|
|
346
|
-
let e = this._internalFilterGroup.filters.length > 1;
|
|
347
|
-
return i`
|
|
348
|
-
<div class="filter-group-container">
|
|
349
|
-
${this._renderGroup(this._internalFilterGroup)}
|
|
350
|
-
|
|
351
|
-
${e ? i`
|
|
352
|
-
<div class="add-root-group-container">
|
|
353
|
-
<luzmo-button
|
|
354
|
-
class="add-group-button"
|
|
355
|
-
.size=${this.size}
|
|
356
|
-
treatment="outline"
|
|
357
|
-
?disabled=${this._isDatasetIdsEmpty}
|
|
358
|
-
@click=${this._addGroup}
|
|
359
|
-
>
|
|
360
|
-
<luzmo-icon slot="icon" .icon=${n} .size=${this._oneSizeSmaller}></luzmo-icon>
|
|
361
|
-
${l("Group", { desc: "Add group button label" })}
|
|
362
|
-
</luzmo-button>
|
|
363
|
-
</div>
|
|
364
|
-
` : ""}
|
|
365
|
-
</div>
|
|
366
|
-
`;
|
|
367
|
-
}
|
|
368
|
-
};
|
|
369
|
-
//#endregion
|
|
370
|
-
//#region src/components/filters/index.ts
|
|
371
|
-
e([o({
|
|
372
|
-
type: String,
|
|
373
|
-
attribute: "api-url",
|
|
374
|
-
reflect: !0
|
|
375
|
-
})], D.prototype, "apiUrl", void 0), e([o({
|
|
376
|
-
type: String,
|
|
377
|
-
attribute: "auth-key",
|
|
378
|
-
reflect: !0
|
|
379
|
-
})], D.prototype, "authKey", void 0), e([o({
|
|
380
|
-
type: String,
|
|
381
|
-
attribute: "auth-token",
|
|
382
|
-
reflect: !0
|
|
383
|
-
})], D.prototype, "authToken", void 0), e([o({
|
|
384
|
-
type: Number,
|
|
385
|
-
attribute: "cache-time",
|
|
386
|
-
reflect: !0
|
|
387
|
-
})], D.prototype, "cacheTime", void 0), e([o({
|
|
388
|
-
type: String,
|
|
389
|
-
attribute: "content-language",
|
|
390
|
-
reflect: !0
|
|
391
|
-
})], D.prototype, "contentLanguage", void 0), e([o({
|
|
392
|
-
type: String,
|
|
393
|
-
attribute: "time-zone",
|
|
394
|
-
reflect: !0
|
|
395
|
-
})], D.prototype, "timeZone", void 0), e([o({
|
|
396
|
-
type: Array,
|
|
397
|
-
attribute: "dataset-ids",
|
|
398
|
-
reflect: !0
|
|
399
|
-
})], D.prototype, "datasetIds", void 0), e([o({
|
|
400
|
-
type: Array,
|
|
401
|
-
reflect: !1
|
|
402
|
-
})], D.prototype, "filters", void 0), e([o({
|
|
403
|
-
type: Number,
|
|
404
|
-
reflect: !0
|
|
405
|
-
})], D.prototype, "debounce", void 0), e([s()], D.prototype, "_internalFilterGroup", void 0), D = e([c()], D), customElements.get("luzmo-filters") || customElements.define("luzmo-filters", D);
|
|
406
|
-
//#endregion
|
|
407
|
-
export { D as t };
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
/*! * A kit of modern Luzmo Web Components for analytics in your web application.
|
|
2
|
-
*
|
|
3
|
-
* Copyright © 2026 Luzmo
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Luzmo web components (“Luzmo Web Components”)
|
|
6
|
-
* must be used according to the Luzmo Terms of Service.
|
|
7
|
-
* This license allows users with a current active Luzmo account
|
|
8
|
-
* to use the Luzmo Web Components. This license terminates
|
|
9
|
-
* automatically if a user no longer has an active Luzmo account.
|
|
10
|
-
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
11
|
-
*
|
|
12
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
13
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
14
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
15
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
16
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
17
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
|
-
* SOFTWARE.
|
|
19
|
-
* */
|
|
20
|
-
const e=require("./decorate-DCJt-2rt.cjs"),t=require("./localized-mixin-CUuRZu9t.cjs");require("./filter-item-BirgEXGE.cjs");let n=require("@luzmo/icons");require("@luzmo/lucero/button"),require("@luzmo/lucero/icon");let r=require("lit"),i=require("lit/decorators.js"),a=require("@lit/localize");require("@luzmo/lucero/action-button");let o=require("lit/directives/repeat.js"),s=require("@luzmo/lucero/utils");function c(e){return typeof e==`string`&&e.toLowerCase()===`or`?`or`:`and`}function l(e){return typeof e==`object`&&!!e&&`condition`in e&&`filters`in e}function u(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function d(e){if(!Array.isArray(e)||e.length===0)return[];let t=u(e[0])?e[0]:void 0,n=e.length>1?e[1]:void 0;return e.length>1?[t,n]:[t]}function f(e){return typeof e.expression!=`string`||e.expression.length===0?null:{expression:e.expression,parameters:d(e.parameters)}}function p(e){if(!e||!e.filters)return{condition:`and`,filters:[],subGroups:[]};let t=[],n=[];for(let r of e.filters)if(l(r))n.push(p(r));else{let e=f(r);e&&t.push(e)}return{condition:c(e.condition),filters:t,subGroups:n}}function m(e){return e?[p(e)]:[]}function h(e){return{expression:e.expression,parameters:Array.isArray(e.parameters)?[...e.parameters]:[]}}function g(e){let t=e.subGroups??[];return{condition:c(e.condition),filters:[...e.filters.map(h),...t.map(e=>g(e))]}}function _(e){return!e||e.length===0?[]:e.map(e=>g(e))}var v=`: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)}`,y={and:()=>(0,a.msg)(`AND`,{desc:`Logical AND condition for combining filters`}),or:()=>(0,a.msg)(`OR`,{desc:`Logical OR condition for combining filters`})};function b(e){return e===`and`?`or`:`and`}var x=class extends t.t((0,s.SizedMixin)(s.LuzmoElement,{validSizes:Object.values(s.ElementSizes)})){constructor(...e){super(...e),this.apiUrl=`https://api.luzmo.com`,this.contentLanguage=`en`,this.filters=[],this.debounce=300,this._internalFilterGroup=null,this._debounceTimeout=null}static get styles(){return[(0,r.unsafeCSS)(v)]}get _oneSizeSmaller(){return{xxs:`xxs`,xs:`xs`,s:`xs`,m:`s`,l:`m`,xl:`l`,xxl:`xl`}[this.size]||`s`}get _isDatasetIdsEmpty(){return!this.datasetIds||this.datasetIds.length===0}disconnectedCallback(){super.disconnectedCallback(),this._debounceTimeout&&=(clearTimeout(this._debounceTimeout),null)}willUpdate(e){if(super.willUpdate(e),e.has(`filters`)){let e=_(this.filters);e.length===0?this._internalFilterGroup=null:e.length===1?this._internalFilterGroup=structuredClone(e[0]):this._internalFilterGroup={condition:`and`,filters:structuredClone(e)}}}_generateEmptyGroup(){return{condition:`and`,filters:[]}}_generateEmptyFilter(){return{expression:void 0,parameters:[]}}_getFiltersForExport(){if(!this._internalFilterGroup)return[];if(this._internalFilterGroup.filters.length>0&&this._internalFilterGroup.filters.every(e=>this._isGroup(e)))return structuredClone(this._internalFilterGroup.filters).map(e=>m(e)[0]).filter(e=>!!e);let[e]=m(structuredClone(this._internalFilterGroup));return e?[e]:[]}_sendChangeEvent(){this._debounceTimeout&&clearTimeout(this._debounceTimeout);let e=()=>{this.dispatchEvent(new CustomEvent(`luzmo-filters-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{filters:this._getFiltersForExport()}}))};this.debounce>0?this._debounceTimeout=setTimeout(e,this.debounce):e()}_isGroup(e){return`condition`in e&&`filters`in e}_toggleCondition(e){e.condition=b(e.condition),this.requestUpdate(),this._sendChangeEvent()}_addFilter(e){if(this._isDatasetIdsEmpty)return;let t=e;t||=(this._internalFilterGroup||=this._generateEmptyGroup(),this._internalFilterGroup),t.filters.push(this._generateEmptyFilter()),this.requestUpdate(),this._sendChangeEvent()}_addSubGroup(e){if(this._isDatasetIdsEmpty)return;let t=this._generateEmptyGroup();t.condition=b(e.condition),t.filters.push(this._generateEmptyFilter()),e.filters.push(t),this.requestUpdate(),this._sendChangeEvent()}_removeFilter(e,t){if(this._internalFilterGroup){if(e.filters.splice(t,1),e!==this._internalFilterGroup&&e.filters.length===0){let t=this._findParentGroup(this._internalFilterGroup,e);if(t){let n=t.filters.indexOf(e);n!==-1&&t.filters.splice(n,1)}}this._collapseGroupsAfterDelete(),this.requestUpdate(),this._sendChangeEvent()}}_updateFilter(e,t,n){n.stopPropagation(),this._isGroup(e.filters[t])||(e.filters[t]=n.detail.filter,this._sendChangeEvent())}_addGroup(){if(this._isDatasetIdsEmpty)return;this._internalFilterGroup||=this._generateEmptyGroup();let e=this._generateEmptyGroup();e.condition=b(this._internalFilterGroup.condition),e.filters.push(this._internalFilterGroup);let t=this._generateEmptyGroup();t.condition=b(e.condition),t.filters.push(this._generateEmptyFilter()),e.filters.push(t),this._internalFilterGroup=e,this.requestUpdate(),this._sendChangeEvent()}_renderFilterItem(e,t,i){return r.html`
|
|
21
|
-
<div class="filter-item-wrapper">
|
|
22
|
-
<div class="filter-item-content">
|
|
23
|
-
<luzmo-filter-item
|
|
24
|
-
.apiUrl=${this.apiUrl}
|
|
25
|
-
.authKey=${this.authKey}
|
|
26
|
-
.authToken=${this.authToken}
|
|
27
|
-
.cacheTime=${this.cacheTime}
|
|
28
|
-
.language=${this.language}
|
|
29
|
-
.contentLanguage=${this.contentLanguage}
|
|
30
|
-
.timeZone=${this.timeZone}
|
|
31
|
-
.datasetIds=${this.datasetIds}
|
|
32
|
-
.filter=${e}
|
|
33
|
-
.size=${this.size}
|
|
34
|
-
@luzmo-filter-changed=${this._updateFilter.bind(this,t,i)}
|
|
35
|
-
></luzmo-filter-item>
|
|
36
|
-
<luzmo-action-button
|
|
37
|
-
class="delete-filter-button"
|
|
38
|
-
.size=${this.size}
|
|
39
|
-
quiet
|
|
40
|
-
.label=${(0,a.msg)(`Remove filter`,{desc:`Aria label for remove filter button`})}
|
|
41
|
-
@click=${this._removeFilter.bind(this,t,i)}
|
|
42
|
-
>
|
|
43
|
-
<luzmo-icon slot="icon" .icon=${n.luzmoTrashOutline} .size=${this.size}></luzmo-icon>
|
|
44
|
-
</luzmo-action-button>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
`}_renderGroup(e,t=!1){let i=e.filters.length>0,s=e.filters.length>1,c=y[e.condition]?.()??e.condition;return r.html`
|
|
48
|
-
<div class="filter-group ${t?`nested`:``}" role="group">
|
|
49
|
-
${t?r.html`
|
|
50
|
-
<div class="condition-wrapper">
|
|
51
|
-
${s?r.html`
|
|
52
|
-
<luzmo-action-button
|
|
53
|
-
class="condition-badge"
|
|
54
|
-
.size=${this._oneSizeSmaller}
|
|
55
|
-
quiet
|
|
56
|
-
aria-pressed=${e.condition===`and`?`true`:`false`}
|
|
57
|
-
.label=${(0,a.msg)(`Toggle filter condition, currently `,{desc:`Aria label prefix for filter condition toggle`})+c}
|
|
58
|
-
@click=${this._toggleCondition.bind(this,e)}
|
|
59
|
-
>
|
|
60
|
-
${c}
|
|
61
|
-
</luzmo-action-button>
|
|
62
|
-
`:``}
|
|
63
|
-
</div>
|
|
64
|
-
`:s?r.html`
|
|
65
|
-
<div class="condition-wrapper">
|
|
66
|
-
<luzmo-action-button
|
|
67
|
-
class="condition-badge"
|
|
68
|
-
.size=${this._oneSizeSmaller}
|
|
69
|
-
quiet
|
|
70
|
-
aria-pressed=${e.condition===`and`?`true`:`false`}
|
|
71
|
-
.label=${(0,a.msg)(`Toggle filter condition, currently `,{desc:`Aria label prefix for filter condition toggle`})+c}
|
|
72
|
-
@click=${this._toggleCondition.bind(this,e)}
|
|
73
|
-
>
|
|
74
|
-
${c}
|
|
75
|
-
</luzmo-action-button>
|
|
76
|
-
</div>
|
|
77
|
-
`:``}
|
|
78
|
-
<div class="group-content">
|
|
79
|
-
${i?r.html`
|
|
80
|
-
<div class="filters-list">
|
|
81
|
-
${(0,o.repeat)(e.filters,(e,t)=>t,(t,n)=>r.html`
|
|
82
|
-
${this._isGroup(t)?this._renderGroup(t,!0):this._renderFilterItem(t,e,n)}
|
|
83
|
-
`)}
|
|
84
|
-
</div>
|
|
85
|
-
`:``}
|
|
86
|
-
|
|
87
|
-
<div class="group-actions">
|
|
88
|
-
<luzmo-action-button
|
|
89
|
-
class="add-filter-button"
|
|
90
|
-
.size=${this.size}
|
|
91
|
-
quiet
|
|
92
|
-
?disabled=${this._isDatasetIdsEmpty}
|
|
93
|
-
@click=${this._addFilter.bind(this,e)}
|
|
94
|
-
>
|
|
95
|
-
<luzmo-icon slot="icon" .icon=${n.luzmoPlus} .size=${this._oneSizeSmaller}></luzmo-icon>
|
|
96
|
-
${(0,a.msg)(`Filter`,{desc:`Add filter button label`})}
|
|
97
|
-
</luzmo-action-button>
|
|
98
|
-
|
|
99
|
-
<luzmo-action-button
|
|
100
|
-
class="add-subgroup-button"
|
|
101
|
-
.size=${this.size}
|
|
102
|
-
quiet
|
|
103
|
-
?disabled=${this._isDatasetIdsEmpty}
|
|
104
|
-
@click=${this._addSubGroup.bind(this,e)}
|
|
105
|
-
>
|
|
106
|
-
<luzmo-icon slot="icon" .icon=${n.luzmoPlus} .size=${this._oneSizeSmaller}></luzmo-icon>
|
|
107
|
-
${(0,a.msg)(`Subgroup`,{desc:`Add subgroup button label`})}
|
|
108
|
-
</luzmo-action-button>
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
`}_findParentGroup(e,t){for(let n of e.filters){if(n===t)return e;if(this._isGroup(n)){let e=this._findParentGroup(n,t);if(e)return e}}return null}_collapseIfNeeded(e){if(e.filters.length===1&&this._isGroup(e.filters[0])){let t=e.filters[0];e.condition=t.condition,e.filters=t.filters}}_collapseGroupsAfterDelete(){if(!this._internalFilterGroup)return;let e=t=>{for(let n of t.filters)this._isGroup(n)&&e(n);this._collapseIfNeeded(t)};e(this._internalFilterGroup)}render(){if(this._isDatasetIdsEmpty)return r.html`
|
|
113
|
-
<div class="filter-group-container">
|
|
114
|
-
<div class="dataset-ids-empty-message" role="status">
|
|
115
|
-
${(0,a.msg)(`Cannot retrieve dataset data fields`,{desc:`Error message when datasetIds is empty`})}
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
`;if(!this._internalFilterGroup||this._internalFilterGroup.filters.length===0)return r.html`
|
|
119
|
-
<div class="filter-group-container">
|
|
120
|
-
<luzmo-button
|
|
121
|
-
class="add-filter-button"
|
|
122
|
-
.size=${this.size}
|
|
123
|
-
treatment="outline"
|
|
124
|
-
?disabled=${this._isDatasetIdsEmpty}
|
|
125
|
-
@click=${()=>this._addFilter()}
|
|
126
|
-
>
|
|
127
|
-
<luzmo-icon slot="icon" .icon=${n.luzmoPlus} .size=${this._oneSizeSmaller}></luzmo-icon>
|
|
128
|
-
${(0,a.msg)(`Add filter`,{desc:`Add filter button label`})}
|
|
129
|
-
</luzmo-button>
|
|
130
|
-
</div>
|
|
131
|
-
`;let e=this._internalFilterGroup.filters.length>1;return r.html`
|
|
132
|
-
<div class="filter-group-container">
|
|
133
|
-
${this._renderGroup(this._internalFilterGroup)}
|
|
134
|
-
|
|
135
|
-
${e?r.html`
|
|
136
|
-
<div class="add-root-group-container">
|
|
137
|
-
<luzmo-button
|
|
138
|
-
class="add-group-button"
|
|
139
|
-
.size=${this.size}
|
|
140
|
-
treatment="outline"
|
|
141
|
-
?disabled=${this._isDatasetIdsEmpty}
|
|
142
|
-
@click=${this._addGroup}
|
|
143
|
-
>
|
|
144
|
-
<luzmo-icon slot="icon" .icon=${n.luzmoPlus} .size=${this._oneSizeSmaller}></luzmo-icon>
|
|
145
|
-
${(0,a.msg)(`Group`,{desc:`Add group button label`})}
|
|
146
|
-
</luzmo-button>
|
|
147
|
-
</div>
|
|
148
|
-
`:``}
|
|
149
|
-
</div>
|
|
150
|
-
`}};e.t([(0,i.property)({type:String,attribute:`api-url`,reflect:!0})],x.prototype,`apiUrl`,void 0),e.t([(0,i.property)({type:String,attribute:`auth-key`,reflect:!0})],x.prototype,`authKey`,void 0),e.t([(0,i.property)({type:String,attribute:`auth-token`,reflect:!0})],x.prototype,`authToken`,void 0),e.t([(0,i.property)({type:Number,attribute:`cache-time`,reflect:!0})],x.prototype,`cacheTime`,void 0),e.t([(0,i.property)({type:String,attribute:`content-language`,reflect:!0})],x.prototype,`contentLanguage`,void 0),e.t([(0,i.property)({type:String,attribute:`time-zone`,reflect:!0})],x.prototype,`timeZone`,void 0),e.t([(0,i.property)({type:Array,attribute:`dataset-ids`,reflect:!0})],x.prototype,`datasetIds`,void 0),e.t([(0,i.property)({type:Array,reflect:!1})],x.prototype,`filters`,void 0),e.t([(0,i.property)({type:Number,reflect:!0})],x.prototype,`debounce`,void 0),e.t([(0,i.state)()],x.prototype,`_internalFilterGroup`,void 0),x=e.t([(0,a.localized)()],x),customElements.get(`luzmo-filters`)||customElements.define(`luzmo-filters`,x),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return x}});
|