@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
|
@@ -0,0 +1,742 @@
|
|
|
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-D-vXCJuU.js";
|
|
22
|
+
import "./filter-item-CL3S9HOx.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 ee, msg as c } from "@lit/localize";
|
|
29
|
+
import "@luzmo/lucero/action-button";
|
|
30
|
+
import { repeat as l } from "lit/directives/repeat.js";
|
|
31
|
+
import { ElementSizes as u, LuzmoElement as te, SizedMixin as ne } from "@luzmo/lucero/utils";
|
|
32
|
+
//#region src/components/filters/transformations/filter-format.ts
|
|
33
|
+
var re = 20, d = class extends Error {
|
|
34
|
+
constructor(e) {
|
|
35
|
+
super(e), this.name = "FilterUnrepresentableError";
|
|
36
|
+
}
|
|
37
|
+
}, f = /* @__PURE__ */ new Set(["and", "or"]), p = [
|
|
38
|
+
"datasetId",
|
|
39
|
+
"dataset_id",
|
|
40
|
+
"columnId",
|
|
41
|
+
"column_id",
|
|
42
|
+
"formulaId",
|
|
43
|
+
"formula_id",
|
|
44
|
+
"formula",
|
|
45
|
+
"columnExpression",
|
|
46
|
+
"value",
|
|
47
|
+
"ignoredItemIds"
|
|
48
|
+
];
|
|
49
|
+
function m(e) {
|
|
50
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
51
|
+
}
|
|
52
|
+
function h(e) {
|
|
53
|
+
return !m(e) || e.condition !== void 0 && (typeof e.condition != "string" || !f.has(e.condition.toLowerCase())) ? !1 : "filters" in e || "subGroups" in e;
|
|
54
|
+
}
|
|
55
|
+
function g(e) {
|
|
56
|
+
return m(e) && "expression" in e && !("condition" in e);
|
|
57
|
+
}
|
|
58
|
+
function _(e) {
|
|
59
|
+
return p.some((t) => t in e);
|
|
60
|
+
}
|
|
61
|
+
function ie(e, t = !1) {
|
|
62
|
+
let n = [
|
|
63
|
+
e.columnId !== void 0 || e.column_id !== void 0,
|
|
64
|
+
e.formulaId !== void 0 || e.formula_id !== void 0,
|
|
65
|
+
e.formula !== void 0
|
|
66
|
+
].filter(Boolean).length;
|
|
67
|
+
return n === 1 ? !0 : n > 1 ? !1 : e.columnExpression !== void 0 || t && e.expression !== void 0;
|
|
68
|
+
}
|
|
69
|
+
function v(e) {
|
|
70
|
+
return !g(e) || typeof e.expression != "string" || e.expression.length === 0 || "parameters" in e || typeof e.datasetId != "string" && typeof e.dataset_id != "string" ? !1 : ie(e);
|
|
71
|
+
}
|
|
72
|
+
function y(e) {
|
|
73
|
+
return !g(e) || !Array.isArray(e.parameters) ? !1 : !_(e);
|
|
74
|
+
}
|
|
75
|
+
function ae(e) {
|
|
76
|
+
if (!("parameters" in e)) return;
|
|
77
|
+
let t = p.find((t) => t in e);
|
|
78
|
+
if (t !== void 0) throw new d(`Filter leaf mixes "parameters" with the clean inline key "${t}".`);
|
|
79
|
+
}
|
|
80
|
+
function oe(e) {
|
|
81
|
+
throw typeof e.expression != "string" || e.expression.length === 0 ? new d("Clean filter leaf is missing a non-empty \"expression\".") : typeof e.datasetId != "string" && typeof e.dataset_id != "string" ? new d(`Clean filter leaf "${e.expression}" is missing a "datasetId".`) : new d(`Clean filter leaf "${e.expression}" must name exactly one of "columnId", "formulaId", "formula", or "columnExpression".`);
|
|
82
|
+
}
|
|
83
|
+
function b(e) {
|
|
84
|
+
return e === "where" || e === "having";
|
|
85
|
+
}
|
|
86
|
+
function x(e) {
|
|
87
|
+
if (e > 20) throw new d("Filter nesting exceeds the maximum depth of 20.");
|
|
88
|
+
}
|
|
89
|
+
function S(e) {
|
|
90
|
+
if (e == null) return "empty";
|
|
91
|
+
if (!Array.isArray(e)) return "unknown";
|
|
92
|
+
if (e.length === 0) return "empty";
|
|
93
|
+
let t = !1, n = !1, r = !1, i = (e, a) => {
|
|
94
|
+
if (a > 20) {
|
|
95
|
+
r = !0;
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if (h(e)) {
|
|
99
|
+
b(e.clause) && (n = !0);
|
|
100
|
+
let t = [...Array.isArray(e.filters) ? e.filters : [], ...Array.isArray(e.subGroups) ? e.subGroups : []];
|
|
101
|
+
for (let e of t) i(e, a + 1);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
if (g(e)) {
|
|
105
|
+
"parameters" in e && _(e) ? r = !0 : v(e) ? n = !0 : y(e) ? t = !0 : r = !0;
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
r = !0;
|
|
109
|
+
};
|
|
110
|
+
for (let t of e) i(t, 1);
|
|
111
|
+
return r ? "unknown" : n && t ? "mixed" : n ? "clean" : t ? "canonical" : "empty";
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region src/components/filters/transformations/clean-filters.ts
|
|
115
|
+
var C = /* @__PURE__ */ new Set(["? is null", "? is not null"]), w = /* @__PURE__ */ new Set([
|
|
116
|
+
"? = ?",
|
|
117
|
+
"? != ?",
|
|
118
|
+
"? < ?",
|
|
119
|
+
"? <= ?",
|
|
120
|
+
"? > ?",
|
|
121
|
+
"? >= ?"
|
|
122
|
+
]), se = /* @__PURE__ */ new Set([
|
|
123
|
+
"? in ?",
|
|
124
|
+
"? not in ?",
|
|
125
|
+
"? between ?"
|
|
126
|
+
]), ce = {
|
|
127
|
+
"array[numeric]": "numeric[]",
|
|
128
|
+
"array[hierarchy]": "hierarchy[]",
|
|
129
|
+
"array[datetime]": "datetime[]"
|
|
130
|
+
}, le = /* @__PURE__ */ new Set([
|
|
131
|
+
"level",
|
|
132
|
+
"lowestLevel",
|
|
133
|
+
"unnest",
|
|
134
|
+
"discretization",
|
|
135
|
+
"aggregation",
|
|
136
|
+
"index",
|
|
137
|
+
"include_nonoccurring",
|
|
138
|
+
"simplification"
|
|
139
|
+
]);
|
|
140
|
+
function T(e, t) {
|
|
141
|
+
return e !== "lowestLevel" && !(t === null && le.has(e));
|
|
142
|
+
}
|
|
143
|
+
function E(e) {
|
|
144
|
+
return structuredClone(e);
|
|
145
|
+
}
|
|
146
|
+
function D(e) {
|
|
147
|
+
let t = e.datasetId ?? e.dataset_id;
|
|
148
|
+
if (typeof t != "string" || t.length === 0) throw new d("Filter reference is missing a \"datasetId\".");
|
|
149
|
+
return t;
|
|
150
|
+
}
|
|
151
|
+
function O(e) {
|
|
152
|
+
return m(e) ? typeof e.columnId == "string" || typeof e.column_id == "string" || typeof e.formulaId == "string" || typeof e.formula_id == "string" || typeof e.formula == "string" || (typeof e.datasetId == "string" || typeof e.dataset_id == "string") && (e.columnExpression !== void 0 || e.expression !== void 0) : !1;
|
|
153
|
+
}
|
|
154
|
+
function k(e) {
|
|
155
|
+
let t = { type: e.type };
|
|
156
|
+
return e.bins !== void 0 && (t.bins = e.bins), Array.isArray(e.over) && (t.over = e.over.map((e) => N(e))), t;
|
|
157
|
+
}
|
|
158
|
+
function ue(e) {
|
|
159
|
+
let t = { type: e.type }, n = e.datasetId ?? e.dataset_id, r = e.columnId ?? e.column_id;
|
|
160
|
+
return n !== void 0 && (t.datasetId = n), r !== void 0 && (t.columnId = r), e.level !== void 0 && T("level", e.level) && (t.level = e.level), m(e.discretization) && (t.discretization = k(e.discretization)), e.unnest !== void 0 && T("unnest", e.unnest) && (t.unnest = e.unnest), t;
|
|
161
|
+
}
|
|
162
|
+
function A(e) {
|
|
163
|
+
let t = { type: e.type };
|
|
164
|
+
return e.bins !== void 0 && (t.bins = e.bins), Array.isArray(e.over) && (t.over = e.over.map((e) => m(e) ? M(e) : e)), t;
|
|
165
|
+
}
|
|
166
|
+
function de(e) {
|
|
167
|
+
let t = { type: e.type }, n = e.datasetId ?? e.dataset_id, r = e.columnId ?? e.column_id;
|
|
168
|
+
return n !== void 0 && (t.datasetId = n), r !== void 0 && (t.columnId = r), e.level !== void 0 && (t.level = e.level), m(e.discretization) && (t.discretization = A(e.discretization)), e.unnest !== void 0 && (t.unnest = e.unnest), t;
|
|
169
|
+
}
|
|
170
|
+
function fe(e, t) {
|
|
171
|
+
e.level !== void 0 && (t.level = E(e.level)), m(e.discretization) && (t.discretization = A(e.discretization)), m(e.aggregation) && (t.aggregation = de(e.aggregation)), e.unnest !== void 0 && (t.unnest = E(e.unnest));
|
|
172
|
+
}
|
|
173
|
+
function j(e, t) {
|
|
174
|
+
let n = e.columnId ?? e.column_id;
|
|
175
|
+
if (n !== void 0) return {
|
|
176
|
+
kind: "columnId",
|
|
177
|
+
value: n
|
|
178
|
+
};
|
|
179
|
+
let r = e.formulaId ?? e.formula_id;
|
|
180
|
+
if (r !== void 0) return {
|
|
181
|
+
kind: "formulaId",
|
|
182
|
+
value: r
|
|
183
|
+
};
|
|
184
|
+
if (e.formula !== void 0) return {
|
|
185
|
+
kind: "formula",
|
|
186
|
+
value: e.formula
|
|
187
|
+
};
|
|
188
|
+
let i = e.columnExpression ?? (t ? e.expression : void 0);
|
|
189
|
+
if (i !== void 0) return {
|
|
190
|
+
kind: "expression",
|
|
191
|
+
value: i
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
function M(e, t = !0) {
|
|
195
|
+
let n = { datasetId: D(e) }, r = j(e, t);
|
|
196
|
+
return r !== void 0 && (r.kind === "expression" ? n.expression = r.value : n[r.kind] = r.value), fe(e, n), n;
|
|
197
|
+
}
|
|
198
|
+
function N(e) {
|
|
199
|
+
if (!m(e)) throw new d("Cannot emit a clean filter reference.");
|
|
200
|
+
let t = { datasetId: D(e) };
|
|
201
|
+
e.level !== void 0 && T("level", e.level) && (t.level = e.level), m(e.discretization) && (t.discretization = k(e.discretization)), m(e.aggregation) && (t.aggregation = ue(e.aggregation)), e.unnest !== void 0 && T("unnest", e.unnest) && (t.unnest = e.unnest);
|
|
202
|
+
let n = j(e, !0);
|
|
203
|
+
if (n === void 0) throw new d("Cannot emit a clean filter reference: no column, formula, or expression.");
|
|
204
|
+
return n.kind === "expression" ? t.columnExpression = n.value : t[n.kind] = n.value, t;
|
|
205
|
+
}
|
|
206
|
+
function P(e) {
|
|
207
|
+
if (!m(e) || typeof e.parameter != "string" || typeof e.type != "string") return e;
|
|
208
|
+
let t = ce[e.type];
|
|
209
|
+
return t === void 0 ? e : {
|
|
210
|
+
...e,
|
|
211
|
+
type: t
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
function F(e, t) {
|
|
215
|
+
return m(t) && typeof t.parameter == "string" ? !0 : Array.isArray(t) ? e !== "? between ?" || t.length === 2 : !1;
|
|
216
|
+
}
|
|
217
|
+
function I(e, t) {
|
|
218
|
+
let n = e.expression, r = [M(e, !1)];
|
|
219
|
+
if (!C.has(n) && e.value !== void 0) {
|
|
220
|
+
let t = w.has(n) && O(e.value);
|
|
221
|
+
r.push(t ? M(e.value) : E(e.value));
|
|
222
|
+
}
|
|
223
|
+
let i = {};
|
|
224
|
+
typeof e.id == "string" && (i.id = e.id), "ignoredItemIds" in e && (i.ignore = E(e.ignoredItemIds)), t !== void 0 && (i.type = t);
|
|
225
|
+
let a = {
|
|
226
|
+
expression: n,
|
|
227
|
+
parameters: r
|
|
228
|
+
};
|
|
229
|
+
return Object.keys(i).length > 0 && (a.properties = i), a;
|
|
230
|
+
}
|
|
231
|
+
function L(e) {
|
|
232
|
+
let { expression: t } = e;
|
|
233
|
+
if (typeof t != "string" || t.length === 0) return null;
|
|
234
|
+
let n = Array.isArray(e.parameters) ? e.parameters : [];
|
|
235
|
+
if (!m(n[0])) throw new d(`Cannot emit a clean filter reference for "${t}".`);
|
|
236
|
+
let r = {
|
|
237
|
+
...N(n[0]),
|
|
238
|
+
expression: t
|
|
239
|
+
};
|
|
240
|
+
if (!C.has(t)) {
|
|
241
|
+
let e = n[1];
|
|
242
|
+
if (e === void 0) throw new d(`Filter "${t}" is missing its value operand.`);
|
|
243
|
+
if (r.value = O(e) && w.has(t) ? N(e) : P(E(e)), se.has(t) && !F(t, r.value)) throw new d(`Cannot emit an invalid clean filter value for "${t}".`);
|
|
244
|
+
}
|
|
245
|
+
let { properties: i } = e;
|
|
246
|
+
return i?.id !== void 0 && (r.id = i.id), i !== void 0 && "ignore" in i && (r.ignoredItemIds = E(i.ignore)), r;
|
|
247
|
+
}
|
|
248
|
+
function R(e) {
|
|
249
|
+
return h(e);
|
|
250
|
+
}
|
|
251
|
+
function z(e) {
|
|
252
|
+
return Array.isArray(e.filters) ? e.filters : [];
|
|
253
|
+
}
|
|
254
|
+
function B(e, t) {
|
|
255
|
+
return e.properties?.type === "having" || e.properties?.type === "where" ? e.properties.type : t ?? "where";
|
|
256
|
+
}
|
|
257
|
+
function V(e, t, n = 1, r = /* @__PURE__ */ new Set()) {
|
|
258
|
+
x(n);
|
|
259
|
+
let i = e.clause ?? t;
|
|
260
|
+
for (let t of z(e)) R(t) ? V(t, i, n + 1, r) : typeof t.expression == "string" && t.expression.length > 0 && r.add(B(t, i));
|
|
261
|
+
return r;
|
|
262
|
+
}
|
|
263
|
+
function H(e, t, n = 1) {
|
|
264
|
+
x(n);
|
|
265
|
+
let r = e.clause ?? t;
|
|
266
|
+
if (e.condition === "or" && V(e, r, n).size > 1) throw new d("An \"or\" group mixes \"where\" and \"having\" filters, which clean output cannot represent.");
|
|
267
|
+
for (let t of z(e)) R(t) && H(t, r, n + 1);
|
|
268
|
+
}
|
|
269
|
+
function U(e, t, n, r = 1) {
|
|
270
|
+
x(r);
|
|
271
|
+
let i = e.clause ?? n, a = [];
|
|
272
|
+
for (let n of z(e)) {
|
|
273
|
+
if (R(n)) {
|
|
274
|
+
let e = U(n, t, i, r + 1);
|
|
275
|
+
e.filters.length > 0 && a.push(e);
|
|
276
|
+
continue;
|
|
277
|
+
}
|
|
278
|
+
if (B(n, i) !== t) continue;
|
|
279
|
+
let e = L(n);
|
|
280
|
+
e && a.push(e);
|
|
281
|
+
}
|
|
282
|
+
let o = {
|
|
283
|
+
condition: e.condition === "or" ? "or" : "and",
|
|
284
|
+
filters: a
|
|
285
|
+
};
|
|
286
|
+
return e.id !== void 0 && V(e, i, r).size <= 1 && (o.id = e.id), o;
|
|
287
|
+
}
|
|
288
|
+
function pe(e) {
|
|
289
|
+
let t = e.clause;
|
|
290
|
+
H(e, t);
|
|
291
|
+
let n = V(e, t);
|
|
292
|
+
return n.size === 0 && n.add(t ?? "where"), ["where", "having"].filter((e) => n.has(e)).map((n) => ({
|
|
293
|
+
...U(e, n, t),
|
|
294
|
+
clause: n
|
|
295
|
+
})).filter((e) => e.filters.length > 0);
|
|
296
|
+
}
|
|
297
|
+
//#endregion
|
|
298
|
+
//#region src/components/filters/transformations/transform-filters.ts
|
|
299
|
+
var me = [
|
|
300
|
+
"origin",
|
|
301
|
+
"datasetId",
|
|
302
|
+
"vizId",
|
|
303
|
+
"itemId",
|
|
304
|
+
"isDrilldown",
|
|
305
|
+
"type"
|
|
306
|
+
];
|
|
307
|
+
function W(e) {
|
|
308
|
+
return typeof e == "string" && e.toLowerCase() === "or" ? "or" : "and";
|
|
309
|
+
}
|
|
310
|
+
function he(e) {
|
|
311
|
+
return h(e);
|
|
312
|
+
}
|
|
313
|
+
function ge(e) {
|
|
314
|
+
if (!Array.isArray(e) || e.length === 0) return [];
|
|
315
|
+
let t = m(e[0]) ? e[0] : void 0, n = e.length > 1 ? e[1] : void 0;
|
|
316
|
+
return e.length > 1 ? [t, n] : [t];
|
|
317
|
+
}
|
|
318
|
+
function _e(e) {
|
|
319
|
+
if (typeof e.expression != "string" || e.expression.length === 0) return null;
|
|
320
|
+
let t = {
|
|
321
|
+
expression: e.expression,
|
|
322
|
+
parameters: ge(e.parameters)
|
|
323
|
+
};
|
|
324
|
+
return e.properties !== void 0 && Object.keys(e.properties).length > 0 && (t.properties = structuredClone(e.properties)), t;
|
|
325
|
+
}
|
|
326
|
+
function G(e, t) {
|
|
327
|
+
let n = e, r = t;
|
|
328
|
+
for (let e of me) n[e] !== void 0 && (r[e] = n[e]);
|
|
329
|
+
}
|
|
330
|
+
function K(e) {
|
|
331
|
+
if (!e || !e.filters) return {
|
|
332
|
+
condition: "and",
|
|
333
|
+
filters: [],
|
|
334
|
+
subGroups: []
|
|
335
|
+
};
|
|
336
|
+
let t = [], n = [];
|
|
337
|
+
for (let r of e.filters) if (he(r)) n.push(K(r));
|
|
338
|
+
else {
|
|
339
|
+
let e = _e(r);
|
|
340
|
+
e && t.push(e);
|
|
341
|
+
}
|
|
342
|
+
let r = {
|
|
343
|
+
condition: W(e.condition),
|
|
344
|
+
filters: t,
|
|
345
|
+
subGroups: n
|
|
346
|
+
};
|
|
347
|
+
return e.id !== void 0 && (r.id = e.id), G(e, r), r;
|
|
348
|
+
}
|
|
349
|
+
function q(e, t) {
|
|
350
|
+
return e ? t?.format === "clean" ? pe(e) : [K(e)] : [];
|
|
351
|
+
}
|
|
352
|
+
function ve(e, t) {
|
|
353
|
+
let n = {
|
|
354
|
+
expression: typeof e.expression == "string" ? e.expression : void 0,
|
|
355
|
+
parameters: Array.isArray(e.parameters) ? [...e.parameters] : []
|
|
356
|
+
}, r = m(e.properties) ? structuredClone(e.properties) : {};
|
|
357
|
+
return t !== void 0 && r.type === void 0 && (r.type = t), Object.keys(r).length > 0 && (n.properties = r), n;
|
|
358
|
+
}
|
|
359
|
+
function ye(e, t, n) {
|
|
360
|
+
if (h(e)) return J(e, t, n);
|
|
361
|
+
if (!m(e)) return;
|
|
362
|
+
let r = e.expression;
|
|
363
|
+
if (ae(e), v(e)) return I(e, t);
|
|
364
|
+
if (_(e) && oe(e), y(e)) return ve(e, t);
|
|
365
|
+
throw new d(`Filter leaf "${String(r)}" matches neither a complete clean nor a complete canonical encoding.`);
|
|
366
|
+
}
|
|
367
|
+
function J(e, t, n) {
|
|
368
|
+
x(n);
|
|
369
|
+
let r = b(e.clause) ? e.clause : void 0, i = r ?? t, a = [];
|
|
370
|
+
for (let t of Array.isArray(e.filters) ? e.filters : []) {
|
|
371
|
+
let e = ye(t, i, n + 1);
|
|
372
|
+
e !== void 0 && a.push(e);
|
|
373
|
+
}
|
|
374
|
+
for (let t of Array.isArray(e.subGroups) ? e.subGroups : []) h(t) && a.push(J(t, i, n + 1));
|
|
375
|
+
let o = {
|
|
376
|
+
condition: W(e.condition),
|
|
377
|
+
filters: a
|
|
378
|
+
};
|
|
379
|
+
return typeof e.id == "string" && (o.id = e.id), r !== void 0 && (o.clause = r), G(e, o), o;
|
|
380
|
+
}
|
|
381
|
+
function Y(e) {
|
|
382
|
+
return !e || e.length === 0 ? [] : e.filter((e) => h(e)).map((e) => J(e, void 0, 1));
|
|
383
|
+
}
|
|
384
|
+
//#endregion
|
|
385
|
+
//#region src/components/filters/filters.module.scss?inline
|
|
386
|
+
var X = ":host{font-family:var(--luzmo-filters-font-family,var(--luzmo-font-family));color:var(--luzmo-filters-font-color,var(--luzmo-font-color));max-width:100%;display:block;container-type:inline-size}.filter-group-container{max-width:100%;padding:calc(var(--luzmo-indicator-gap) + 2 * var(--luzmo-indicator-width));overflow-x:hidden}.filter-group{flex-direction:row;min-width:0;max-width:100%;display:flex}.filter-group.nested{margin-top:var(--luzmo-filters-nested-group-margin-top,var(--filters-nested-group-margin-top));margin-bottom:var(--luzmo-filters-nested-group-margin-bottom,var(--filters-nested-group-margin-bottom))}.group-content{flex-direction:column;flex:1;min-width:0;display:flex}.filters-list{gap:var(--luzmo-filters-filters-list-gap,var(--filters-filters-list-gap));flex-direction:column;min-width:0;max-width:100%;display:flex}.filter-item-wrapper{align-items:flex-start;min-width:0;max-width:100%;display:flex;position:relative}.filter-item-content{align-items:flex-start;gap:var(--luzmo-filters-filter-line-gap,var(--filters-filter-line-gap));flex-wrap:nowrap;flex:1;min-width:0;display:flex}.filter-item-content luzmo-filter-item{flex:1;min-width:0}.filter-item-content .delete-filter-button{flex-shrink:0;align-self:flex-end;margin-inline-start:auto}.condition-wrapper{flex:0 0 var(--luzmo-filters-condition-warpper-width,var(--filters-condition-warpper-width));justify-content:center;align-items:center;display:flex;position:relative}.condition-wrapper:before{content:\"\";left:50%;top:var(--luzmo-filters-vertical-line-top,var(--filters-vertical-line-top));bottom:var(--luzmo-filters-vertical-line-bottom,var(--filters-vertical-line-bottom));width:var(--luzmo-filters-vertical-line-width,var(--filters-vertical-line-width));background:var(--luzmo-filters-vertical-line-color,var(--luzmo-border-color));position:absolute}.condition-badge{min-width:auto;padding-inline:var(--luzmo-filters-condition-padding-horizontal,var(--filters-condition-padding-horizontal));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))}@container (width<=480px){.condition-badge{--luzmo-action-button-font-size:.6875rem;--luzmo-action-button-height:1.2rem;--luzmo-button-line-height:1.2rem;font-size:.6875rem;line-height:1.2rem;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)rotate(-90deg)}:host([dir=rtl]) .condition-badge{transform:translate(-50%,-50%)rotate(90deg)}}: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)}@container (width<=480px){.filter-group-container{--filters-condition-warpper-width:32px;--filters-condition-padding-horizontal:var(--luzmo-spacing-2);--filters-condition-badge-halo:var(--luzmo-spacing-2);--filters-filters-list-gap:var(--luzmo-spacing-5)}}";
|
|
387
|
+
//#endregion
|
|
388
|
+
//#region src/components/filters/filters.ts
|
|
389
|
+
function Z(e) {
|
|
390
|
+
if (e instanceof d) return e;
|
|
391
|
+
throw e;
|
|
392
|
+
}
|
|
393
|
+
var be = {
|
|
394
|
+
and: () => c("AND", { desc: "Logical AND condition for combining filters" }),
|
|
395
|
+
or: () => c("OR", { desc: "Logical OR condition for combining filters" })
|
|
396
|
+
};
|
|
397
|
+
function Q(e) {
|
|
398
|
+
return e === "and" ? "or" : "and";
|
|
399
|
+
}
|
|
400
|
+
var $ = class extends t(ne(te, { validSizes: Object.values(u) })) {
|
|
401
|
+
constructor(...e) {
|
|
402
|
+
super(...e), this.apiUrl = "https://api.luzmo.com", this.contentLanguage = "en", this.filters = [], this.format = "canonical", this.allowParameters = !1, this.parameters = [], this.debounce = 300, this._internalFilterGroup = null, this._hasSyntheticRoot = !1, this._debounceTimeout = null;
|
|
403
|
+
}
|
|
404
|
+
static get styles() {
|
|
405
|
+
return [a(X)];
|
|
406
|
+
}
|
|
407
|
+
get _oneSizeSmaller() {
|
|
408
|
+
return {
|
|
409
|
+
xxs: "xxs",
|
|
410
|
+
xs: "xs",
|
|
411
|
+
s: "xs",
|
|
412
|
+
m: "s",
|
|
413
|
+
l: "m",
|
|
414
|
+
xl: "l",
|
|
415
|
+
xxl: "xl"
|
|
416
|
+
}[this.size] || "s";
|
|
417
|
+
}
|
|
418
|
+
get _isDatasetIdsEmpty() {
|
|
419
|
+
return !this.datasetIds || this.datasetIds.length === 0;
|
|
420
|
+
}
|
|
421
|
+
disconnectedCallback() {
|
|
422
|
+
super.disconnectedCallback(), this._debounceTimeout &&= (clearTimeout(this._debounceTimeout), null);
|
|
423
|
+
}
|
|
424
|
+
willUpdate(e) {
|
|
425
|
+
if (super.willUpdate(e), e.has("filters")) try {
|
|
426
|
+
let e = Y(this.filters);
|
|
427
|
+
e.length === 0 ? (this._internalFilterGroup = null, this._hasSyntheticRoot = !1) : e.length === 1 ? (this._internalFilterGroup = structuredClone(e[0]), this._hasSyntheticRoot = !1) : (this._internalFilterGroup = {
|
|
428
|
+
condition: "and",
|
|
429
|
+
filters: structuredClone(e)
|
|
430
|
+
}, this._hasSyntheticRoot = !0);
|
|
431
|
+
} catch (t) {
|
|
432
|
+
console.warn(`[${this.localName}] Keeping the current filters, the new value cannot be normalized:`, Z(t)), this.filters = e.get("filters") ?? [];
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
_generateEmptyGroup() {
|
|
436
|
+
return {
|
|
437
|
+
condition: "and",
|
|
438
|
+
filters: []
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
_generateEmptyFilter() {
|
|
442
|
+
return {
|
|
443
|
+
expression: void 0,
|
|
444
|
+
parameters: []
|
|
445
|
+
};
|
|
446
|
+
}
|
|
447
|
+
_rootGroupsForExport() {
|
|
448
|
+
if (!this._internalFilterGroup) return [];
|
|
449
|
+
let e = this._internalFilterGroup.filters.length > 0 && this._internalFilterGroup.filters.every((e) => this._isGroup(e));
|
|
450
|
+
return this._hasSyntheticRoot && e ? structuredClone(this._internalFilterGroup.filters) : [structuredClone(this._internalFilterGroup)];
|
|
451
|
+
}
|
|
452
|
+
_getFiltersForExport() {
|
|
453
|
+
let e = this._rootGroupsForExport(), t = this.format === "clean" ? "clean" : "canonical";
|
|
454
|
+
if (e.length === 0) return {
|
|
455
|
+
filters: [],
|
|
456
|
+
format: t
|
|
457
|
+
};
|
|
458
|
+
if (t === "clean") try {
|
|
459
|
+
return {
|
|
460
|
+
filters: e.flatMap((e) => q(e, { format: "clean" })),
|
|
461
|
+
format: "clean"
|
|
462
|
+
};
|
|
463
|
+
} catch (e) {
|
|
464
|
+
console.warn(`[${this.localName}] Cannot emit clean filters, falling back to canonical output:`, Z(e));
|
|
465
|
+
}
|
|
466
|
+
return {
|
|
467
|
+
filters: e.flatMap((e) => q(e)),
|
|
468
|
+
format: "canonical"
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
_sendChangeEvent() {
|
|
472
|
+
this._debounceTimeout && clearTimeout(this._debounceTimeout);
|
|
473
|
+
let e = () => {
|
|
474
|
+
this.dispatchEvent(new CustomEvent("luzmo-filters-changed", {
|
|
475
|
+
bubbles: !0,
|
|
476
|
+
composed: !0,
|
|
477
|
+
cancelable: !0,
|
|
478
|
+
detail: this._getFiltersForExport()
|
|
479
|
+
}));
|
|
480
|
+
};
|
|
481
|
+
this.debounce > 0 ? this._debounceTimeout = setTimeout(e, this.debounce) : e();
|
|
482
|
+
}
|
|
483
|
+
_isGroup(e) {
|
|
484
|
+
return "condition" in e && "filters" in e;
|
|
485
|
+
}
|
|
486
|
+
_handleParameterCreated(e) {
|
|
487
|
+
let t = e.detail?.parameter;
|
|
488
|
+
!t || this.parameters.some(({ parameter: e }) => e === t.parameter) || (this.parameters = [...this.parameters, t]);
|
|
489
|
+
}
|
|
490
|
+
_toggleCondition(e) {
|
|
491
|
+
e.condition = Q(e.condition), e === this._internalFilterGroup && (this._hasSyntheticRoot = !1), this.requestUpdate(), this._sendChangeEvent();
|
|
492
|
+
}
|
|
493
|
+
_addFilter(e) {
|
|
494
|
+
if (this._isDatasetIdsEmpty) return;
|
|
495
|
+
let t = e;
|
|
496
|
+
t ||= (this._internalFilterGroup ||= this._generateEmptyGroup(), this._internalFilterGroup), t.filters.push(this._generateEmptyFilter()), this.requestUpdate(), this._sendChangeEvent();
|
|
497
|
+
}
|
|
498
|
+
_addSubGroup(e) {
|
|
499
|
+
if (this._isDatasetIdsEmpty) return;
|
|
500
|
+
let t = this._generateEmptyGroup();
|
|
501
|
+
t.condition = Q(e.condition), t.filters.push(this._generateEmptyFilter()), e.filters.push(t), this.requestUpdate(), this._sendChangeEvent();
|
|
502
|
+
}
|
|
503
|
+
_removeFilter(e, t) {
|
|
504
|
+
if (this._internalFilterGroup) {
|
|
505
|
+
if (e.filters.splice(t, 1), e !== this._internalFilterGroup && e.filters.length === 0) {
|
|
506
|
+
let t = this._findParentGroup(this._internalFilterGroup, e);
|
|
507
|
+
if (t) {
|
|
508
|
+
let n = t.filters.indexOf(e);
|
|
509
|
+
n !== -1 && t.filters.splice(n, 1);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
this._collapseGroupsAfterDelete(), this.requestUpdate(), this._sendChangeEvent();
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
_updateFilter(e, t, n) {
|
|
516
|
+
n.stopPropagation(), this._isGroup(e.filters[t]) || (e.filters[t] = n.detail.filter, this._sendChangeEvent());
|
|
517
|
+
}
|
|
518
|
+
_addGroup() {
|
|
519
|
+
if (this._isDatasetIdsEmpty) return;
|
|
520
|
+
this._internalFilterGroup ||= this._generateEmptyGroup();
|
|
521
|
+
let e = this._generateEmptyGroup();
|
|
522
|
+
e.condition = Q(this._internalFilterGroup.condition), e.filters.push(this._internalFilterGroup);
|
|
523
|
+
let t = this._generateEmptyGroup();
|
|
524
|
+
t.condition = Q(e.condition), t.filters.push(this._generateEmptyFilter()), e.filters.push(t), this._internalFilterGroup = e, this._hasSyntheticRoot = !1, this.requestUpdate(), this._sendChangeEvent();
|
|
525
|
+
}
|
|
526
|
+
_renderFilterItem(e, t, n) {
|
|
527
|
+
return i`
|
|
528
|
+
<div class="filter-item-wrapper">
|
|
529
|
+
<div class="filter-item-content">
|
|
530
|
+
<luzmo-filter-item
|
|
531
|
+
.apiUrl=${this.apiUrl}
|
|
532
|
+
.authKey=${this.authKey}
|
|
533
|
+
.authToken=${this.authToken}
|
|
534
|
+
.cacheTime=${this.cacheTime}
|
|
535
|
+
.language=${this.language}
|
|
536
|
+
.contentLanguage=${this.contentLanguage}
|
|
537
|
+
.timeZone=${this.timeZone}
|
|
538
|
+
.datasetIds=${this.datasetIds}
|
|
539
|
+
.filter=${e}
|
|
540
|
+
.allowParameters=${this.allowParameters}
|
|
541
|
+
.parameters=${this.parameters}
|
|
542
|
+
.size=${this.size}
|
|
543
|
+
@luzmo-filter-changed=${this._updateFilter.bind(this, t, n)}
|
|
544
|
+
@luzmo-parameter-created=${this._handleParameterCreated}
|
|
545
|
+
></luzmo-filter-item>
|
|
546
|
+
<luzmo-action-button
|
|
547
|
+
class="delete-filter-button"
|
|
548
|
+
.size=${this.size}
|
|
549
|
+
quiet
|
|
550
|
+
.label=${c("Remove filter", { desc: "Aria label for remove filter button" })}
|
|
551
|
+
@click=${this._removeFilter.bind(this, t, n)}
|
|
552
|
+
>
|
|
553
|
+
<luzmo-icon slot="icon" .icon=${r} .size=${this.size}></luzmo-icon>
|
|
554
|
+
</luzmo-action-button>
|
|
555
|
+
</div>
|
|
556
|
+
</div>
|
|
557
|
+
`;
|
|
558
|
+
}
|
|
559
|
+
_renderGroup(e, t = !1) {
|
|
560
|
+
let r = e.filters.length > 0, a = e.filters.length > 1, o = be[e.condition]?.() ?? e.condition;
|
|
561
|
+
return i`
|
|
562
|
+
<div class="filter-group ${t ? "nested" : ""}" role="group">
|
|
563
|
+
${t ? i`
|
|
564
|
+
<div class="condition-wrapper">
|
|
565
|
+
${a ? i`
|
|
566
|
+
<luzmo-action-button
|
|
567
|
+
class="condition-badge"
|
|
568
|
+
.size=${this._oneSizeSmaller}
|
|
569
|
+
quiet
|
|
570
|
+
aria-pressed=${e.condition === "and" ? "true" : "false"}
|
|
571
|
+
.label=${c("Toggle filter condition, currently ", { desc: "Aria label prefix for filter condition toggle" }) + o}
|
|
572
|
+
@click=${this._toggleCondition.bind(this, e)}
|
|
573
|
+
>
|
|
574
|
+
${o}
|
|
575
|
+
</luzmo-action-button>
|
|
576
|
+
` : ""}
|
|
577
|
+
</div>
|
|
578
|
+
` : a ? i`
|
|
579
|
+
<div class="condition-wrapper">
|
|
580
|
+
<luzmo-action-button
|
|
581
|
+
class="condition-badge"
|
|
582
|
+
.size=${this._oneSizeSmaller}
|
|
583
|
+
quiet
|
|
584
|
+
aria-pressed=${e.condition === "and" ? "true" : "false"}
|
|
585
|
+
.label=${c("Toggle filter condition, currently ", { desc: "Aria label prefix for filter condition toggle" }) + o}
|
|
586
|
+
@click=${this._toggleCondition.bind(this, e)}
|
|
587
|
+
>
|
|
588
|
+
${o}
|
|
589
|
+
</luzmo-action-button>
|
|
590
|
+
</div>
|
|
591
|
+
` : ""}
|
|
592
|
+
<div class="group-content">
|
|
593
|
+
${r ? i`
|
|
594
|
+
<div class="filters-list">
|
|
595
|
+
${l(e.filters, (e, t) => t, (t, n) => i`
|
|
596
|
+
${this._isGroup(t) ? this._renderGroup(t, !0) : this._renderFilterItem(t, e, n)}
|
|
597
|
+
`)}
|
|
598
|
+
</div>
|
|
599
|
+
` : ""}
|
|
600
|
+
|
|
601
|
+
<div class="group-actions">
|
|
602
|
+
<luzmo-action-button
|
|
603
|
+
class="add-filter-button"
|
|
604
|
+
.size=${this.size}
|
|
605
|
+
quiet
|
|
606
|
+
?disabled=${this._isDatasetIdsEmpty}
|
|
607
|
+
@click=${this._addFilter.bind(this, e)}
|
|
608
|
+
>
|
|
609
|
+
<luzmo-icon slot="icon" .icon=${n} .size=${this._oneSizeSmaller}></luzmo-icon>
|
|
610
|
+
${c("Filter", { desc: "Add filter button label" })}
|
|
611
|
+
</luzmo-action-button>
|
|
612
|
+
|
|
613
|
+
<luzmo-action-button
|
|
614
|
+
class="add-subgroup-button"
|
|
615
|
+
.size=${this.size}
|
|
616
|
+
quiet
|
|
617
|
+
?disabled=${this._isDatasetIdsEmpty}
|
|
618
|
+
@click=${this._addSubGroup.bind(this, e)}
|
|
619
|
+
>
|
|
620
|
+
<luzmo-icon slot="icon" .icon=${n} .size=${this._oneSizeSmaller}></luzmo-icon>
|
|
621
|
+
${c("Subgroup", { desc: "Add subgroup button label" })}
|
|
622
|
+
</luzmo-action-button>
|
|
623
|
+
</div>
|
|
624
|
+
</div>
|
|
625
|
+
</div>
|
|
626
|
+
`;
|
|
627
|
+
}
|
|
628
|
+
_findParentGroup(e, t) {
|
|
629
|
+
for (let n of e.filters) {
|
|
630
|
+
if (n === t) return e;
|
|
631
|
+
if (this._isGroup(n)) {
|
|
632
|
+
let e = this._findParentGroup(n, t);
|
|
633
|
+
if (e) return e;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
return null;
|
|
637
|
+
}
|
|
638
|
+
_collapseIfNeeded(e) {
|
|
639
|
+
if (e.filters.length === 1 && this._isGroup(e.filters[0])) {
|
|
640
|
+
let t = e.filters[0];
|
|
641
|
+
e.condition = t.condition, e.filters = t.filters, e.id = t.id, e.clause = t.clause, e.origin = t.origin, e.datasetId = t.datasetId, e.vizId = t.vizId, e.itemId = t.itemId, e.isDrilldown = t.isDrilldown, e.type = t.type, e === this._internalFilterGroup && (this._hasSyntheticRoot = !1);
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
_collapseGroupsAfterDelete() {
|
|
645
|
+
if (!this._internalFilterGroup) return;
|
|
646
|
+
let e = (t) => {
|
|
647
|
+
for (let n of t.filters) this._isGroup(n) && e(n);
|
|
648
|
+
this._collapseIfNeeded(t);
|
|
649
|
+
};
|
|
650
|
+
e(this._internalFilterGroup);
|
|
651
|
+
}
|
|
652
|
+
render() {
|
|
653
|
+
if (this._isDatasetIdsEmpty) return i`
|
|
654
|
+
<div class="filter-group-container">
|
|
655
|
+
<div class="dataset-ids-empty-message" role="status">
|
|
656
|
+
${c("Cannot retrieve dataset data fields", { desc: "Error message when datasetIds is empty" })}
|
|
657
|
+
</div>
|
|
658
|
+
</div>
|
|
659
|
+
`;
|
|
660
|
+
if (!this._internalFilterGroup || this._internalFilterGroup.filters.length === 0) return i`
|
|
661
|
+
<div class="filter-group-container">
|
|
662
|
+
<luzmo-button
|
|
663
|
+
class="add-filter-button"
|
|
664
|
+
.size=${this.size}
|
|
665
|
+
treatment="outline"
|
|
666
|
+
?disabled=${this._isDatasetIdsEmpty}
|
|
667
|
+
@click=${() => this._addFilter()}
|
|
668
|
+
>
|
|
669
|
+
<luzmo-icon slot="icon" .icon=${n} .size=${this._oneSizeSmaller}></luzmo-icon>
|
|
670
|
+
${c("Add filter", { desc: "Add filter button label" })}
|
|
671
|
+
</luzmo-button>
|
|
672
|
+
</div>
|
|
673
|
+
`;
|
|
674
|
+
let e = this._internalFilterGroup.filters.length > 1;
|
|
675
|
+
return i`
|
|
676
|
+
<div class="filter-group-container">
|
|
677
|
+
${this._renderGroup(this._internalFilterGroup)}
|
|
678
|
+
|
|
679
|
+
${e ? i`
|
|
680
|
+
<div class="add-root-group-container">
|
|
681
|
+
<luzmo-button
|
|
682
|
+
class="add-group-button"
|
|
683
|
+
.size=${this.size}
|
|
684
|
+
treatment="outline"
|
|
685
|
+
?disabled=${this._isDatasetIdsEmpty}
|
|
686
|
+
@click=${this._addGroup}
|
|
687
|
+
>
|
|
688
|
+
<luzmo-icon slot="icon" .icon=${n} .size=${this._oneSizeSmaller}></luzmo-icon>
|
|
689
|
+
${c("Group", { desc: "Add group button label" })}
|
|
690
|
+
</luzmo-button>
|
|
691
|
+
</div>
|
|
692
|
+
` : ""}
|
|
693
|
+
</div>
|
|
694
|
+
`;
|
|
695
|
+
}
|
|
696
|
+
};
|
|
697
|
+
//#endregion
|
|
698
|
+
//#region src/components/filters/index.ts
|
|
699
|
+
e([o({
|
|
700
|
+
type: String,
|
|
701
|
+
attribute: "api-url",
|
|
702
|
+
reflect: !0
|
|
703
|
+
})], $.prototype, "apiUrl", void 0), e([o({
|
|
704
|
+
type: String,
|
|
705
|
+
attribute: "auth-key",
|
|
706
|
+
reflect: !0
|
|
707
|
+
})], $.prototype, "authKey", void 0), e([o({
|
|
708
|
+
type: String,
|
|
709
|
+
attribute: "auth-token",
|
|
710
|
+
reflect: !0
|
|
711
|
+
})], $.prototype, "authToken", void 0), e([o({
|
|
712
|
+
type: Number,
|
|
713
|
+
attribute: "cache-time",
|
|
714
|
+
reflect: !0
|
|
715
|
+
})], $.prototype, "cacheTime", void 0), e([o({
|
|
716
|
+
type: String,
|
|
717
|
+
attribute: "content-language",
|
|
718
|
+
reflect: !0
|
|
719
|
+
})], $.prototype, "contentLanguage", void 0), e([o({
|
|
720
|
+
type: String,
|
|
721
|
+
attribute: "time-zone",
|
|
722
|
+
reflect: !0
|
|
723
|
+
})], $.prototype, "timeZone", void 0), e([o({
|
|
724
|
+
type: Array,
|
|
725
|
+
attribute: "dataset-ids",
|
|
726
|
+
reflect: !0
|
|
727
|
+
})], $.prototype, "datasetIds", void 0), e([o({
|
|
728
|
+
type: Array,
|
|
729
|
+
reflect: !1
|
|
730
|
+
})], $.prototype, "filters", void 0), e([o({
|
|
731
|
+
type: String,
|
|
732
|
+
reflect: !0
|
|
733
|
+
})], $.prototype, "format", void 0), e([o({
|
|
734
|
+
type: Boolean,
|
|
735
|
+
attribute: "allow-parameters",
|
|
736
|
+
reflect: !0
|
|
737
|
+
})], $.prototype, "allowParameters", void 0), e([o({ attribute: !1 })], $.prototype, "parameters", void 0), e([o({
|
|
738
|
+
type: Number,
|
|
739
|
+
reflect: !0
|
|
740
|
+
})], $.prototype, "debounce", void 0), e([s()], $.prototype, "_internalFilterGroup", void 0), $ = e([ee()], $), customElements.get("luzmo-filters") || customElements.define("luzmo-filters", $);
|
|
741
|
+
//#endregion
|
|
742
|
+
export { d as a, q as i, Y as n, re as o, W as r, S as s, $ as t };
|