@luzmo/analytics-components-kit 1.0.1-alpha.142 → 1.0.1-alpha.144
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/angular/esm/types/ai-chat.types.d.ts +1 -0
- package/angular/types/ai-chat.types.ts +1 -0
- package/components/ai-chat/ai-chat.d.ts +8 -1
- package/components/ai-chat/index.cjs +1 -1
- package/components/ai-chat/index.js +7 -7
- package/components/{ai-chat-DlUYd_Cf.js → ai-chat-CEX2VQeq.js} +115 -82
- package/components/ai-chat-PZrWiUxE.cjs +90 -0
- package/components/ai-interaction-textarea/index.cjs +1 -1
- package/components/ai-interaction-textarea/index.js +5 -5
- package/components/{ai-interaction-textarea-BGnQbDpJ.cjs → ai-interaction-textarea-CcgFeoIg.cjs} +4 -4
- package/components/data-fields-select/index.cjs +1 -1
- package/components/data-fields-select/index.js +3 -3
- package/components/{data-fields-select-DOFNOn2D.cjs → data-fields-select-Byfdph5v.cjs} +3 -3
- package/components/{data-fields-select-0-QPdj3X.js → data-fields-select-dbn1KG3y.js} +2 -2
- package/components/dataset-icon/index.cjs +1 -1
- package/components/dataset-icon/index.js +1 -1
- package/components/{dataset-icon-BbNgugDA.cjs → dataset-icon-C0cID-ra.cjs} +11 -11
- package/components/{dataset-icon-x6Q8nhYc.js → dataset-icon-DhF21dXC.js} +6 -6
- package/components/dataset-selector-list/index.cjs +1 -1
- package/components/dataset-selector-list/index.js +3 -3
- package/components/{dataset-selector-list-DO_ExOrO.js → dataset-selector-list-BDSXGUDh.js} +1 -1
- package/components/{dataset-selector-list-BdeJlo0u.cjs → dataset-selector-list-CH3lwAjJ.cjs} +1 -1
- package/components/dataset-selector-row/index.cjs +1 -1
- package/components/dataset-selector-row/index.js +4 -4
- package/components/{dataset-selector-row-VsvdrVDf.js → dataset-selector-row-DPyGMP__.js} +2 -2
- package/components/{dataset-selector-row-CAlRVIk_.cjs → dataset-selector-row-DdTnaQ6w.cjs} +9 -9
- package/components/{de-DEzbbWVL.js → de-DOhCpte6.js} +5 -2
- package/components/de-DR0saUbU.cjs +20 -0
- package/components/display-settings/index.cjs +1 -1
- package/components/display-settings/index.js +3 -3
- package/components/{display-settings-BwRkE6i-.js → display-settings-C_ubOOoF.js} +14 -14
- package/components/{display-settings-rCBWD_I_.cjs → display-settings-Sh4LWJgN.cjs} +16 -16
- package/components/display-settings-binning/index.cjs +1 -1
- package/components/display-settings-binning/index.js +3 -3
- package/components/{display-settings-binning-C4V_P8mI.cjs → display-settings-binning-C9VF0K9q.cjs} +7 -7
- package/components/{display-settings-binning-BXlXiFNV.js → display-settings-binning-DP9oFC6h.js} +2 -2
- package/components/display-settings-datetime/index.cjs +1 -1
- package/components/display-settings-datetime/index.js +3 -3
- package/components/{display-settings-datetime-Db-0j9VZ.cjs → display-settings-datetime-C3LDVEcH.cjs} +38 -38
- package/components/{display-settings-datetime-LqM04khP.js → display-settings-datetime-DxBUXAuH.js} +2 -2
- package/components/display-settings-grand-totals/index.cjs +1 -1
- package/components/display-settings-grand-totals/index.js +3 -3
- package/components/{display-settings-grand-totals-BDDMVFrg.js → display-settings-grand-totals-BiGxXuw2.js} +2 -2
- package/components/{display-settings-grand-totals-0ihnPMfZ.cjs → display-settings-grand-totals-C3QlInwU.cjs} +5 -5
- package/components/display-settings-numeric/index.cjs +1 -1
- package/components/display-settings-numeric/index.js +3 -3
- package/components/{display-settings-numeric-Cpp9mQCA.js → display-settings-numeric-BvLDL-qP.js} +3 -3
- package/components/{display-settings-numeric-CfBT04A7.cjs → display-settings-numeric-CyoTJKZv.cjs} +28 -28
- package/components/display-settings-period-over-period/index.cjs +1 -1
- package/components/display-settings-period-over-period/index.js +3 -3
- package/components/{display-settings-period-over-period-CWOpgJmd.cjs → display-settings-period-over-period-Cdmaf_Rw.cjs} +1 -1
- package/components/{display-settings-period-over-period-pxCijPAW.js → display-settings-period-over-period-CvvgRCVH.js} +1 -1
- package/components/draggable-data-field/index.cjs +1 -1
- package/components/draggable-data-field/index.js +4 -4
- package/components/{draggable-data-field-C6ojUWMf.js → draggable-data-field-C_zHA_mn.js} +1 -1
- package/components/{draggable-data-field-BsvgQjQY.cjs → draggable-data-field-CbF7N-o7.cjs} +1 -1
- package/components/draggable-data-field-level/index.cjs +1 -1
- package/components/draggable-data-field-level/index.js +3 -3
- package/components/{draggable-data-field-level-CJ-vup34.cjs → draggable-data-field-level-CI1No5x8.cjs} +10 -10
- package/components/draggable-data-fields-panel/index.cjs +1 -1
- package/components/draggable-data-fields-panel/index.js +5 -5
- package/components/{draggable-data-fields-panel-DJPz42xa.js → draggable-data-fields-panel-D7oa6gGZ.js} +1 -1
- package/components/{draggable-data-fields-panel-oNEzkow0.cjs → draggable-data-fields-panel-DOdI9NaC.cjs} +1 -1
- package/components/droppable-slot/index.cjs +1 -1
- package/components/droppable-slot/index.js +6 -6
- package/components/{droppable-slot-C8rhDVI-.cjs → droppable-slot-DtFdADiO.cjs} +10 -10
- package/components/{droppable-slot-DEpOqyps.js → droppable-slot-oB61SQKO.js} +4 -4
- package/components/edit-filters/index.cjs +1 -1
- package/components/edit-filters/index.js +10 -10
- package/components/{edit-filters-D2oZa0E_.js → edit-filters-B29YfSBe.js} +12 -21
- package/components/{edit-filters-pq1q7Eff.cjs → edit-filters-geWHEBCw.cjs} +23 -33
- package/components/edit-item/index.cjs +1 -1
- package/components/edit-item/index.js +2 -2
- package/components/edit-option/index.cjs +1 -1
- package/components/edit-option/index.js +2 -2
- package/components/edit-option-action-button-group/index.cjs +1 -1
- package/components/edit-option-action-button-group/index.js +3 -3
- package/components/{edit-option-action-button-group-DlJwTW3A.cjs → edit-option-action-button-group-W34osCsN.cjs} +5 -5
- package/components/edit-option-color-palette-picker/index.cjs +1 -1
- package/components/edit-option-color-palette-picker/index.js +2 -2
- package/components/edit-option-color-picker/index.cjs +1 -1
- package/components/edit-option-color-picker/index.js +2 -2
- package/components/edit-option-color-range/index.cjs +1 -1
- package/components/edit-option-color-range/index.js +3 -3
- package/components/{edit-option-color-range-BtahxHzd.js → edit-option-color-range-CmpvQTSG.js} +3 -3
- package/components/{edit-option-color-range-DhBp5wlk.cjs → edit-option-color-range-DVYMhG2R.cjs} +15 -15
- package/components/edit-option-multi-language-field/index.cjs +1 -1
- package/components/edit-option-multi-language-field/index.js +2 -2
- package/components/edit-option-number-field/index.cjs +1 -1
- package/components/edit-option-number-field/index.js +2 -2
- package/components/edit-option-picker/index.cjs +1 -1
- package/components/edit-option-picker/index.js +2 -2
- package/components/edit-option-position-picker/index.cjs +1 -1
- package/components/edit-option-position-picker/index.js +2 -2
- package/components/edit-option-positions-number-field/index.cjs +1 -1
- package/components/edit-option-positions-number-field/index.js +3 -3
- package/components/{edit-option-positions-number-field-DhnxicFl.cjs → edit-option-positions-number-field-CmK8_2ZQ.cjs} +8 -8
- package/components/edit-option-radio-button-group/index.cjs +1 -1
- package/components/edit-option-radio-button-group/index.js +2 -2
- package/components/edit-option-slider/index.cjs +1 -1
- package/components/edit-option-slider/index.js +2 -2
- package/components/edit-option-switch/index.cjs +1 -1
- package/components/edit-option-switch/index.js +2 -2
- package/components/edit-option-text-field/index.cjs +1 -1
- package/components/edit-option-text-field/index.js +2 -2
- package/components/es-CNpZK6tJ.cjs +20 -0
- package/components/{es-DIIjhY-_.js → es-cTUhzLmn.js} +5 -2
- package/components/filter-expression-picker/index.cjs +1 -1
- package/components/filter-expression-picker/index.js +3 -3
- package/components/{filter-expression-picker-BKJXpOiw.js → filter-expression-picker-D83ya_dt.js} +1 -1
- package/components/{filter-expression-picker-Jcv2KTB6.cjs → filter-expression-picker-wOcgU2No.cjs} +1 -1
- package/components/filter-item/index.cjs +1 -1
- package/components/filter-item/index.js +9 -9
- package/components/{filter-item-RaC0VdlI.js → filter-item-BdnrbMUW.js} +2 -2
- package/components/{filter-item-Bqhpikdf.cjs → filter-item-ByKzQ-fl.cjs} +1 -1
- package/components/filter-value-picker/index.cjs +1 -1
- package/components/filter-value-picker/index.js +6 -6
- package/components/{filter-value-picker-C92yj41B.js → filter-value-picker-B2BjJuIa.js} +1 -1
- package/components/{filter-value-picker-49_ZrLE2.cjs → filter-value-picker-Co9Vka2J.cjs} +1 -1
- package/components/filter-value-picker-datetime/index.cjs +1 -1
- package/components/filter-value-picker-datetime/index.js +3 -3
- package/components/{filter-value-picker-datetime-CwrpeAdQ.js → filter-value-picker-datetime-BOheBbvB.js} +1 -1
- package/components/{filter-value-picker-datetime-f3T5FuxN.cjs → filter-value-picker-datetime-BzMfKPkZ.cjs} +1 -1
- package/components/filter-value-picker-hierarchy/index.cjs +1 -1
- package/components/filter-value-picker-hierarchy/index.js +3 -3
- package/components/{filter-value-picker-hierarchy-BjWbzo8J.js → filter-value-picker-hierarchy-Cwq8GLp4.js} +1 -1
- package/components/{filter-value-picker-hierarchy-D6FbH0gw.cjs → filter-value-picker-hierarchy-Dgdj-xqx.cjs} +1 -1
- package/components/filter-value-picker-numeric/index.cjs +1 -1
- package/components/filter-value-picker-numeric/index.js +3 -3
- package/components/{filter-value-picker-numeric-F1XJRVFa.js → filter-value-picker-numeric-CHFRRe1f.js} +1 -1
- package/components/{filter-value-picker-numeric-BCfpod5c.cjs → filter-value-picker-numeric-CZrRBHuR.cjs} +1 -1
- package/components/fr-DKJHfJgy.cjs +20 -0
- package/components/{fr-D9ILwOuz.js → fr-x3aFvlKk.js} +5 -2
- package/components/grid/index.cjs +1 -1
- package/components/grid/index.js +3 -3
- package/components/{grid-BNbbl-9p.cjs → grid-BxeX-SG-.cjs} +31 -31
- package/components/{grid-Ca-fxUK1.js → grid-CfCH13sk.js} +20 -20
- package/components/index.cjs +1 -1
- package/components/index.js +35 -35
- package/components/item-data-drop-panel/index.cjs +1 -1
- package/components/item-data-drop-panel/index.js +7 -7
- package/components/{item-data-drop-panel-BMubV7pj.js → item-data-drop-panel-BNf_N7GH.js} +1 -1
- package/components/{item-data-drop-panel-Bt8rKT6s.cjs → item-data-drop-panel-Dcj5Gz29.cjs} +1 -1
- package/components/item-data-picker-panel/index.cjs +1 -1
- package/components/item-data-picker-panel/index.js +8 -8
- package/components/{item-data-picker-panel-DZOIUxuS.cjs → item-data-picker-panel-GD6CRais.cjs} +1 -1
- package/components/{item-data-picker-panel-DBK2fVsG.js → item-data-picker-panel-OK_nMbm4.js} +1 -1
- package/components/{localized-mixin-DTvVLuXW.cjs → localized-mixin-BmZhC9XV.cjs} +1 -1
- package/components/{localized-mixin-cLT0UbaF.js → localized-mixin-CgQFYGOU.js} +1 -1
- package/components/{nl-DhD5Rlf7.js → nl-Cv7QXh6s.js} +5 -2
- package/components/nl-DtxDWOXH.cjs +20 -0
- package/components/{set-locale-Uv6F4uSq.js → set-locale-CRNDDu2d.js} +4 -4
- package/components/{set-locale-CKjJZRH6.cjs → set-locale-DjOkyNGu.cjs} +1 -1
- package/components/slot-contents-picker/index.cjs +1 -1
- package/components/slot-contents-picker/index.js +7 -7
- package/components/{slot-contents-picker-Bw_G1BwZ.js → slot-contents-picker-BNWBIypw.js} +4 -4
- package/components/{slot-contents-picker-BO5lSTDz.cjs → slot-contents-picker-BjqOUNKU.cjs} +21 -21
- package/components/slot-menu/index.cjs +1 -1
- package/components/slot-menu/index.js +5 -5
- package/components/{slot-menu-DxYruISb.js → slot-menu-B3L8YEnv.js} +2 -2
- package/components/{slot-menu-DyC8HQ5E.cjs → slot-menu-DIQ6h6Dz.cjs} +9 -9
- package/components/slot-menu-list/index.cjs +1 -1
- package/components/slot-menu-list/index.js +3 -3
- package/components/{slot-menu-list-Dmb6s6UK.cjs → slot-menu-list-CFCvrPVt.cjs} +3 -3
- package/components/utils/base.cjs +1 -1
- package/components/utils/base.js +2 -2
- package/components/utils.cjs +1 -1
- package/components/utils.js +1 -1
- package/components/viz-item-menu/index.cjs +1 -1
- package/components/viz-item-menu/index.js +3 -3
- package/components/{viz-item-menu-D18d77aP.cjs → viz-item-menu-BNgd025g.cjs} +6 -6
- package/components/{viz-item-menu-CjA1X_Vg.js → viz-item-menu-_DLQJFWj.js} +2 -2
- package/custom-elements.json +19 -0
- package/package.json +1 -1
- package/types/ai-chat.types.d.ts +1 -0
- package/components/ai-chat-rok8ar11.cjs +0 -62
- package/components/de-nxCdeqFz.cjs +0 -20
- package/components/es-BEBp9Wdb.cjs +0 -20
- package/components/fr-BSmOmsww.cjs +0 -20
- package/components/nl-BiQ2EuE6.cjs +0 -20
- package/components/{ai-interaction-textarea-EdWcPK0w.js → ai-interaction-textarea-B5UE7CIq.js} +1 -1
- package/components/{draggable-data-field-level-BTUXWyDq.js → draggable-data-field-level-BQBMnApS.js} +1 -1
- package/components/{edit-option-action-button-group-CnsDFlK_.js → edit-option-action-button-group-DNrXatQR.js} +1 -1
- package/components/{edit-option-positions-number-field-BX1zqHcV.js → edit-option-positions-number-field-DZtxuvEY.js} +1 -1
- package/components/{slot-menu-list-DbZnXcMZ.js → slot-menu-list-BLJxoLeI.js} +1 -1
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
const e=require(`./chunk-350yNsax.cjs`),t=require(`./base-C_azywlB.cjs`),n=require(`./decorate-Dq4-zbi1.cjs`),r=require(`./localized-mixin-DTvVLuXW.cjs`),i=require(`./localize-BBuZJf_h.cjs`),a=require(`./data-broker-BUIUM5hr.cjs`),o=require(`./load-data-fields-for-datasets-B6cGgPld.cjs`);let s=require(`lit`),c=require(`lit/decorators.js`),l=require(`@lit/localize`),u=require(`lit/directives/repeat.js`),d=require(`@lit/task`);require(`@luzmo/lucero/progress-circle`),require(`@luzmo/lucero/search`),require(`@luzmo/lucero/select`);var f=`:host{--draggable-data-fields-panel-items-gap:var(--luzmo-spacing-2);--draggable-data-fields-panel-search-edge-to-visual:var(--luzmo-spacing-5);--draggable-data-fields-panel-search-text-to-icon:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--draggable-data-fields-panel-search-quiet-block-size:calc(var(--luzmo-component-height) + var(--luzmo-spacing-3));--draggable-data-fields-panel-dataset-picker-margin-bottom:var(--luzmo-spacing-3)}:host([size=s]){--draggable-data-fields-panel-items-gap:var(--luzmo-spacing-1);--draggable-data-fields-panel-search-edge-to-visual:var(--luzmo-spacing-4);--draggable-data-fields-panel-search-text-to-icon:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--draggable-data-fields-panel-search-quiet-block-size:calc(var(--luzmo-component-height-s) + var(--luzmo-spacing-3));--draggable-data-fields-panel-dataset-picker-margin-bottom:var(--luzmo-spacing-2)}:host([size=l]){--draggable-data-fields-panel-items-gap:var(--luzmo-spacing-2);--draggable-data-fields-panel-search-text-to-icon:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--draggable-data-fields-panel-search-quiet-block-size:calc(var(--luzmo-component-height-l) + var(--luzmo-spacing-3));--draggable-data-fields-panel-dataset-picker-margin-bottom:var(--luzmo-spacing-3)}:host([size=xl]){--draggable-data-fields-panel-items-gap:var(--luzmo-spacing-3);--draggable-data-fields-panel-search-text-to-icon:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-2));--draggable-data-fields-panel-search-quiet-block-size:calc(var(--luzmo-component-height-xl) + var(--luzmo-spacing-3));--draggable-data-fields-panel-dataset-picker-margin-bottom:var(--luzmo-spacing-4)}:host([dataset-picker][search-quiet]):has(.search-container){--draggable-data-fields-panel-dataset-picker-margin-bottom:0}:host{box-sizing:border-box;height:100%;font-family:var(--luzmo-font-family,sans-serif);color:var(--luzmo-font-color,inherit);flex-direction:column;display:flex}.container{flex-direction:column;height:100%;display:flex}.dataset-picker{border-bottom-style:solid;border-bottom-width:var(--draggable-data-fields-panel-dataset-picker-divider-height,1px);border-bottom-color:var(--luzmo-draggable-data-fields-panel-dataset-picker-divider-color,var(--draggable-data-fields-panel-dataset-picker-divider-color,var(--luzmo-border-color)));flex-shrink:0;margin-block-end:var(--luzmo-draggable-data-fields-panel-dataset-picker-margin-block-end,var(--draggable-data-fields-panel-dataset-picker-margin-bottom));padding-block-end:var(--luzmo-draggable-data-fields-panel-dataset-picker-padding-block-end,var(--luzmo-spacing-3))}.dataset-picker luzmo-select{width:100%}.search-container{width:100%;flex-shrink:0;margin-block-end:var(--luzmo-draggable-data-fields-panel-search-margin-block-end,var(--luzmo-spacing-3,.75rem))}.search-container luzmo-search{--luzmo-search-edge-to-visual:var(--luzmo-draggable-data-fields-panel-search-edge-to-visual,var(--draggable-data-fields-panel-search-edge-to-visual));--luzmo-search-text-to-icon:var(--luzmo-draggable-data-fields-panel-search-text-to-icon,var(--draggable-data-fields-panel-search-text-to-icon));width:100%}.data-fields-list{gap:var(--luzmo-draggable-data-fields-panel-data-fields-gap,var(--draggable-data-fields-panel-items-gap));flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden auto}.data-fields-list::-webkit-scrollbar{width:var(--luzmo-draggable-data-fields-panel-scrollbar-width,var(--luzmo-scrollbar-size))}.data-fields-list::-webkit-scrollbar-track{background:var(--luzmo-draggable-data-fields-panel-scrollbar-track-background,var(--luzmo-scrollbar-track-background));border-radius:var(--luzmo-scrollbar-track-border-radius)}.data-fields-list::-webkit-scrollbar-thumb{background:var(--luzmo-draggable-data-fields-panel-scrollbar-thumb-background,var(--luzmo-scrollbar-thumb-background));border-radius:var(--luzmo-scrollbar-thumb-border-radius)}.data-fields-list::-webkit-scrollbar-thumb:hover{background:var(--luzmo-draggable-data-fields-panel-scrollbar-thumb-hover-background),var(--luzmo-scrollbar-thumb-hover-background)}.data-fields-list{scrollbar-width:var(--luzmo-scrollbar-width);scrollbar-color:var(--luzmo-draggable-data-fields-panel-scrollbar-thumb-background,var(--luzmo-scrollbar-thumb-background))var(--luzmo-draggable-data-fields-panel-scrollbar-track-background,var(--luzmo-scrollbar-track-background))}.empty-state{color:var(--luzmo-font-color-tertiary,#999);font-size:var(--luzmo-font-size);text-align:center;padding:var(--luzmo-spacing-4);flex:1;justify-content:center;align-items:center;display:flex}.pending-state{padding:var(--luzmo-spacing-4);flex:1;justify-content:center;align-items:center;display:flex}:host([search-quiet]){--luzmo-search-block-size:var(--luzmo-draggable-data-fields-panel-search-quiet-block-size,var(--draggable-data-fields-panel-search-quiet-block-size))}:host([dataset-picker][search-quiet]):has(.search-container){--draggable-data-fields-panel-dataset-picker-divider-color:transparent;--draggable-data-fields-panel-dataset-picker-divider-height:1px}`,p=50,m=class extends r.t(t.n(t.i,{validSizes:[`s`,`m`,`l`,`xl`],noDefaultSize:!0})){constructor(...e){super(...e),this._handleDataFieldDropped=e=>{e.target!==this&&(e.stopPropagation(),this.dispatchEvent(new CustomEvent(`luzmo-data-field-dropped`,{bubbles:!0,composed:!0,detail:e.detail})))},this._handleDataFieldDragStarted=e=>{e.target!==this&&(e.stopPropagation(),this.dispatchEvent(new CustomEvent(`luzmo-data-field-drag-started`,{bubbles:!0,composed:!0,detail:e.detail})))},this.datasetIds=[],this.datasetsDataFields=[],this.datasetPicker=!1,this.disabled=!1,this.pending=!1,this.draggableDataFieldVariant=`highlight`,this.searchQuiet=!1,this.hideTypeIcon=!1,this.hideSublevels=!1,this.apiUrl=`https://api.luzmo.com`,this.search=`auto`,this.searchThreshold=20,this._searchQuery=``,this._failedDatasetIds=new Set,this._loadDataFieldsTask=new d.Task(this,{args:()=>[this._currentDatasetId,this.apiUrl,this.authKey,this.authToken,this.datasetsDataFields.length],task:async([e,t,n,r,i])=>{if(i>0||!e||this._failedDatasetIds.has(e))return null;let a=await o.t([e],{dataBrokerConfig:{apiUrl:t,authKey:n,authToken:r}});return a.length===0?(this._failedDatasetIds.add(e),null):a[0]}}),this._datasetListItems=[],this._datasetListRetrieving=!1,this._datasetListPending=!1,this._datasetNamesFetchAttempted=!1,this._hasMoreDatasets=!0}static{this.styles=(0,s.unsafeCSS)(f)}connectedCallback(){super.connectedCallback(),this.addEventListener(`luzmo-data-field-dropped`,this._handleDataFieldDropped),this.addEventListener(`luzmo-data-field-drag-started`,this._handleDataFieldDragStarted)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`luzmo-data-field-dropped`,this._handleDataFieldDropped),this.removeEventListener(`luzmo-data-field-drag-started`,this._handleDataFieldDragStarted)}get _isDataFieldsPending(){return this.pending||this._loadDataFieldsTask.status===d.TaskStatus.PENDING}get _error(){if(this._loadDataFieldsTask.status===d.TaskStatus.ERROR){let e=this._loadDataFieldsTask.error,t=e instanceof Error?e.message:`Unknown error`;return`${(0,l.msg)(`Could not retrieve data`)}: ${t}`}}get _availableDatasets(){return this.datasetsDataFields.length>0?this.datasetsDataFields:this.datasetIds.length>0?this.datasetIds.map(e=>{let t=this._datasetListItems.find(t=>t.id===e);return t?{id:t.id,name:t.name,description:t.description,dataFields:[]}:{id:e,name:{en:e},dataFields:[]}}):this._datasetListItems.length>0?this._datasetListItems.map(e=>({id:e.id,name:e.name,description:e.description,dataFields:[]})):[]}get _selectedDataset(){return this._availableDatasets.find(e=>e.id===this._currentDatasetId)}get _dataFields(){let e=this._loadDataFieldsTask.value;if(e&&e.dataFields?.length>0)return e.dataFields;let t=this._selectedDataset;if(!t)return[];if(`dataFields`in t&&Array.isArray(t.dataFields)&&t.dataFields.length>0)return t.dataFields;let n=[];if(`columns`in t&&Array.isArray(t.columns))for(let e of t.columns)n.push({...e,datasetId:t.id});if(`formulas`in t&&Array.isArray(t.formulas))for(let e of t.formulas)n.push({...e,datasetId:t.id});return n}get _shouldFetchDatasetList(){return this.datasetPicker&&this.datasetsDataFields.length===0}get _showSearch(){return this.search===`off`?!1:this.search===`on`?!0:this._dataFields.length>this.searchThreshold}get _filteredDataFields(){let e=this._dataFields;if(!this._searchQuery.trim())return e;let t=this._searchQuery.toLowerCase().trim();return e.filter(e=>(i.t(e.name,this.language)||``).toLowerCase().includes(t))}willUpdate(e){super.willUpdate(e);let t=e.has(`selectedDatasetId`),n=e.has(`datasetsDataFields`),r=e.has(`datasetIds`),i=e.has(`datasetPicker`),o=e.has(`authKey`),s=e.has(`authToken`),c=e.has(`apiUrl`);(r||o||s||c)&&(this._datasetListItems=[],this._hasMoreDatasets=!0,this._failedDatasetIds.clear(),this._datasetNamesFetchAttempted=!1,a.t.configure({apiUrl:this.apiUrl,authKey:this.authKey??``,authToken:this.authToken??``})),n&&this.datasetsDataFields.length>0&&(this._datasetListItems=[],this._hasMoreDatasets=!0,this._failedDatasetIds.clear()),(t||n||r)&&this._updateCurrentDatasetId(),(r||o||s||c||i)&&this.datasetIds.length>0&&this.datasetPicker&&this.datasetsDataFields.length===0&&this._datasetListItems.length===0&&this._fetchDatasetNamesForPicker()}async _fetchDatasetNamesForPicker(){if(this.datasetIds.length!==0){this._datasetListPending=!0;try{this._datasetListItems=await a.t.fetchDatasetNames(this.datasetIds)}catch(e){console.warn(`Failed to fetch dataset names:`,e)}finally{this._datasetListPending=!1,this._datasetNamesFetchAttempted=!0}}}async _loadMoreDatasets(e){if(!(this._datasetListRetrieving||!this._hasMoreDatasets)){this._datasetListRetrieving=!0,e&&(e.retrieving=!0);try{let e=this._datasetListItems.length,t=await a.t.fetchAllDatasets({offset:e,limit:p});this._datasetListItems=[...this._datasetListItems,...t.data],this._hasMoreDatasets=e+p<(t.pagination?.total??0),!this._currentDatasetId&&this._datasetListItems.length>0&&this._updateCurrentDatasetId()}catch(e){console.warn(`Failed to load dataset list:`,e),this._hasMoreDatasets=!1}finally{this._datasetListRetrieving=!1,e&&(e.retrieving=!1)}}}_handlePickerScrolled(e){if(this.datasetIds.length>0)return;let t=e.target,{last:n}=e.detail;n>=this._datasetListItems.length-10&&this._hasMoreDatasets&&this._loadMoreDatasets(t)}async _handlePickerOpened(e){let t=e.target;if(this._datasetListItems.length===0&&this._shouldFetchDatasetList&&this.datasetIds.length===0&&this._hasMoreDatasets){t.pending=!0;try{await this._loadMoreDatasets(t)}finally{t.pending=!1}}}_updateCurrentDatasetId(){let e=this._availableDatasets;if(this.selectedDatasetId&&e.some(e=>e.id===this.selectedDatasetId)){this._currentDatasetId=this.selectedDatasetId;return}if(this.selectedDatasetId&&this.datasetIds.includes(this.selectedDatasetId)){this._currentDatasetId=this.selectedDatasetId;return}this._currentDatasetId=e.length>0?e[0].id:void 0}_handleDatasetChange(e){let t=e.detail?.value?.[0];t&&t!==this._currentDatasetId&&(this._currentDatasetId=t,this._searchQuery=``,this.dispatchEvent(new CustomEvent(`luzmo-dataset-changed`,{bubbles:!0,composed:!0,detail:{datasetId:t}})))}_getDataFieldKey(e){return`columnId`in e&&e.columnId?`col-${e.columnId}`:`formulaId`in e&&e.formulaId?`formula-${e.formulaId}`:`formula`in e&&e.formula?`adhoc-${e.formula}`:`field-${e.datasetId}-${Math.random().toString(36).slice(2,11)}`}_handleSearchInput(e){this._searchQuery=e.target.value}_renderDatasetPicker(){if(!this.datasetPicker)return s.nothing;let e=this._availableDatasets,t=e.length>1,n=this.datasetIds.length>0,r=this._shouldFetchDatasetList;if(!t&&!n&&!r)return s.nothing;let a=this._datasetListPending||this.datasetIds.length>0&&this._datasetListItems.length===0&&this.datasetsDataFields.length===0&&!this._datasetNamesFetchAttempted,o=a?[]:e.map(e=>({value:e.id,label:i.t(e.name,this.language)||e.id})),c=a?[]:this._currentDatasetId?[this._currentDatasetId]:[],u=a?(0,l.msg)(`Loading datasets...`):this.datasetPickerPlaceholder??(0,l.msg)(`Select dataset...`);return s.html`
|
|
20
|
+
const e=require(`./chunk-350yNsax.cjs`),t=require(`./base-C_azywlB.cjs`),n=require(`./decorate-Dq4-zbi1.cjs`),r=require(`./localized-mixin-BmZhC9XV.cjs`),i=require(`./localize-BBuZJf_h.cjs`),a=require(`./data-broker-BUIUM5hr.cjs`),o=require(`./load-data-fields-for-datasets-B6cGgPld.cjs`);let s=require(`lit`),c=require(`lit/decorators.js`),l=require(`@lit/localize`),u=require(`lit/directives/repeat.js`),d=require(`@lit/task`);require(`@luzmo/lucero/progress-circle`),require(`@luzmo/lucero/search`),require(`@luzmo/lucero/select`);var f=`:host{--draggable-data-fields-panel-items-gap:var(--luzmo-spacing-2);--draggable-data-fields-panel-search-edge-to-visual:var(--luzmo-spacing-5);--draggable-data-fields-panel-search-text-to-icon:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--draggable-data-fields-panel-search-quiet-block-size:calc(var(--luzmo-component-height) + var(--luzmo-spacing-3));--draggable-data-fields-panel-dataset-picker-margin-bottom:var(--luzmo-spacing-3)}:host([size=s]){--draggable-data-fields-panel-items-gap:var(--luzmo-spacing-1);--draggable-data-fields-panel-search-edge-to-visual:var(--luzmo-spacing-4);--draggable-data-fields-panel-search-text-to-icon:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--draggable-data-fields-panel-search-quiet-block-size:calc(var(--luzmo-component-height-s) + var(--luzmo-spacing-3));--draggable-data-fields-panel-dataset-picker-margin-bottom:var(--luzmo-spacing-2)}:host([size=l]){--draggable-data-fields-panel-items-gap:var(--luzmo-spacing-2);--draggable-data-fields-panel-search-text-to-icon:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-1));--draggable-data-fields-panel-search-quiet-block-size:calc(var(--luzmo-component-height-l) + var(--luzmo-spacing-3));--draggable-data-fields-panel-dataset-picker-margin-bottom:var(--luzmo-spacing-3)}:host([size=xl]){--draggable-data-fields-panel-items-gap:var(--luzmo-spacing-3);--draggable-data-fields-panel-search-text-to-icon:calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-2));--draggable-data-fields-panel-search-quiet-block-size:calc(var(--luzmo-component-height-xl) + var(--luzmo-spacing-3));--draggable-data-fields-panel-dataset-picker-margin-bottom:var(--luzmo-spacing-4)}:host([dataset-picker][search-quiet]):has(.search-container){--draggable-data-fields-panel-dataset-picker-margin-bottom:0}:host{box-sizing:border-box;height:100%;font-family:var(--luzmo-font-family,sans-serif);color:var(--luzmo-font-color,inherit);flex-direction:column;display:flex}.container{flex-direction:column;height:100%;display:flex}.dataset-picker{border-bottom-style:solid;border-bottom-width:var(--draggable-data-fields-panel-dataset-picker-divider-height,1px);border-bottom-color:var(--luzmo-draggable-data-fields-panel-dataset-picker-divider-color,var(--draggable-data-fields-panel-dataset-picker-divider-color,var(--luzmo-border-color)));flex-shrink:0;margin-block-end:var(--luzmo-draggable-data-fields-panel-dataset-picker-margin-block-end,var(--draggable-data-fields-panel-dataset-picker-margin-bottom));padding-block-end:var(--luzmo-draggable-data-fields-panel-dataset-picker-padding-block-end,var(--luzmo-spacing-3))}.dataset-picker luzmo-select{width:100%}.search-container{width:100%;flex-shrink:0;margin-block-end:var(--luzmo-draggable-data-fields-panel-search-margin-block-end,var(--luzmo-spacing-3,.75rem))}.search-container luzmo-search{--luzmo-search-edge-to-visual:var(--luzmo-draggable-data-fields-panel-search-edge-to-visual,var(--draggable-data-fields-panel-search-edge-to-visual));--luzmo-search-text-to-icon:var(--luzmo-draggable-data-fields-panel-search-text-to-icon,var(--draggable-data-fields-panel-search-text-to-icon));width:100%}.data-fields-list{gap:var(--luzmo-draggable-data-fields-panel-data-fields-gap,var(--draggable-data-fields-panel-items-gap));flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden auto}.data-fields-list::-webkit-scrollbar{width:var(--luzmo-draggable-data-fields-panel-scrollbar-width,var(--luzmo-scrollbar-size))}.data-fields-list::-webkit-scrollbar-track{background:var(--luzmo-draggable-data-fields-panel-scrollbar-track-background,var(--luzmo-scrollbar-track-background));border-radius:var(--luzmo-scrollbar-track-border-radius)}.data-fields-list::-webkit-scrollbar-thumb{background:var(--luzmo-draggable-data-fields-panel-scrollbar-thumb-background,var(--luzmo-scrollbar-thumb-background));border-radius:var(--luzmo-scrollbar-thumb-border-radius)}.data-fields-list::-webkit-scrollbar-thumb:hover{background:var(--luzmo-draggable-data-fields-panel-scrollbar-thumb-hover-background),var(--luzmo-scrollbar-thumb-hover-background)}.data-fields-list{scrollbar-width:var(--luzmo-scrollbar-width);scrollbar-color:var(--luzmo-draggable-data-fields-panel-scrollbar-thumb-background,var(--luzmo-scrollbar-thumb-background))var(--luzmo-draggable-data-fields-panel-scrollbar-track-background,var(--luzmo-scrollbar-track-background))}.empty-state{color:var(--luzmo-font-color-tertiary,#999);font-size:var(--luzmo-font-size);text-align:center;padding:var(--luzmo-spacing-4);flex:1;justify-content:center;align-items:center;display:flex}.pending-state{padding:var(--luzmo-spacing-4);flex:1;justify-content:center;align-items:center;display:flex}:host([search-quiet]){--luzmo-search-block-size:var(--luzmo-draggable-data-fields-panel-search-quiet-block-size,var(--draggable-data-fields-panel-search-quiet-block-size))}:host([dataset-picker][search-quiet]):has(.search-container){--draggable-data-fields-panel-dataset-picker-divider-color:transparent;--draggable-data-fields-panel-dataset-picker-divider-height:1px}`,p=50,m=class extends r.t(t.n(t.i,{validSizes:[`s`,`m`,`l`,`xl`],noDefaultSize:!0})){constructor(...e){super(...e),this._handleDataFieldDropped=e=>{e.target!==this&&(e.stopPropagation(),this.dispatchEvent(new CustomEvent(`luzmo-data-field-dropped`,{bubbles:!0,composed:!0,detail:e.detail})))},this._handleDataFieldDragStarted=e=>{e.target!==this&&(e.stopPropagation(),this.dispatchEvent(new CustomEvent(`luzmo-data-field-drag-started`,{bubbles:!0,composed:!0,detail:e.detail})))},this.datasetIds=[],this.datasetsDataFields=[],this.datasetPicker=!1,this.disabled=!1,this.pending=!1,this.draggableDataFieldVariant=`highlight`,this.searchQuiet=!1,this.hideTypeIcon=!1,this.hideSublevels=!1,this.apiUrl=`https://api.luzmo.com`,this.search=`auto`,this.searchThreshold=20,this._searchQuery=``,this._failedDatasetIds=new Set,this._loadDataFieldsTask=new d.Task(this,{args:()=>[this._currentDatasetId,this.apiUrl,this.authKey,this.authToken,this.datasetsDataFields.length],task:async([e,t,n,r,i])=>{if(i>0||!e||this._failedDatasetIds.has(e))return null;let a=await o.t([e],{dataBrokerConfig:{apiUrl:t,authKey:n,authToken:r}});return a.length===0?(this._failedDatasetIds.add(e),null):a[0]}}),this._datasetListItems=[],this._datasetListRetrieving=!1,this._datasetListPending=!1,this._datasetNamesFetchAttempted=!1,this._hasMoreDatasets=!0}static{this.styles=(0,s.unsafeCSS)(f)}connectedCallback(){super.connectedCallback(),this.addEventListener(`luzmo-data-field-dropped`,this._handleDataFieldDropped),this.addEventListener(`luzmo-data-field-drag-started`,this._handleDataFieldDragStarted)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`luzmo-data-field-dropped`,this._handleDataFieldDropped),this.removeEventListener(`luzmo-data-field-drag-started`,this._handleDataFieldDragStarted)}get _isDataFieldsPending(){return this.pending||this._loadDataFieldsTask.status===d.TaskStatus.PENDING}get _error(){if(this._loadDataFieldsTask.status===d.TaskStatus.ERROR){let e=this._loadDataFieldsTask.error,t=e instanceof Error?e.message:`Unknown error`;return`${(0,l.msg)(`Could not retrieve data`)}: ${t}`}}get _availableDatasets(){return this.datasetsDataFields.length>0?this.datasetsDataFields:this.datasetIds.length>0?this.datasetIds.map(e=>{let t=this._datasetListItems.find(t=>t.id===e);return t?{id:t.id,name:t.name,description:t.description,dataFields:[]}:{id:e,name:{en:e},dataFields:[]}}):this._datasetListItems.length>0?this._datasetListItems.map(e=>({id:e.id,name:e.name,description:e.description,dataFields:[]})):[]}get _selectedDataset(){return this._availableDatasets.find(e=>e.id===this._currentDatasetId)}get _dataFields(){let e=this._loadDataFieldsTask.value;if(e&&e.dataFields?.length>0)return e.dataFields;let t=this._selectedDataset;if(!t)return[];if(`dataFields`in t&&Array.isArray(t.dataFields)&&t.dataFields.length>0)return t.dataFields;let n=[];if(`columns`in t&&Array.isArray(t.columns))for(let e of t.columns)n.push({...e,datasetId:t.id});if(`formulas`in t&&Array.isArray(t.formulas))for(let e of t.formulas)n.push({...e,datasetId:t.id});return n}get _shouldFetchDatasetList(){return this.datasetPicker&&this.datasetsDataFields.length===0}get _showSearch(){return this.search===`off`?!1:this.search===`on`?!0:this._dataFields.length>this.searchThreshold}get _filteredDataFields(){let e=this._dataFields;if(!this._searchQuery.trim())return e;let t=this._searchQuery.toLowerCase().trim();return e.filter(e=>(i.t(e.name,this.language)||``).toLowerCase().includes(t))}willUpdate(e){super.willUpdate(e);let t=e.has(`selectedDatasetId`),n=e.has(`datasetsDataFields`),r=e.has(`datasetIds`),i=e.has(`datasetPicker`),o=e.has(`authKey`),s=e.has(`authToken`),c=e.has(`apiUrl`);(r||o||s||c)&&(this._datasetListItems=[],this._hasMoreDatasets=!0,this._failedDatasetIds.clear(),this._datasetNamesFetchAttempted=!1,a.t.configure({apiUrl:this.apiUrl,authKey:this.authKey??``,authToken:this.authToken??``})),n&&this.datasetsDataFields.length>0&&(this._datasetListItems=[],this._hasMoreDatasets=!0,this._failedDatasetIds.clear()),(t||n||r)&&this._updateCurrentDatasetId(),(r||o||s||c||i)&&this.datasetIds.length>0&&this.datasetPicker&&this.datasetsDataFields.length===0&&this._datasetListItems.length===0&&this._fetchDatasetNamesForPicker()}async _fetchDatasetNamesForPicker(){if(this.datasetIds.length!==0){this._datasetListPending=!0;try{this._datasetListItems=await a.t.fetchDatasetNames(this.datasetIds)}catch(e){console.warn(`Failed to fetch dataset names:`,e)}finally{this._datasetListPending=!1,this._datasetNamesFetchAttempted=!0}}}async _loadMoreDatasets(e){if(!(this._datasetListRetrieving||!this._hasMoreDatasets)){this._datasetListRetrieving=!0,e&&(e.retrieving=!0);try{let e=this._datasetListItems.length,t=await a.t.fetchAllDatasets({offset:e,limit:p});this._datasetListItems=[...this._datasetListItems,...t.data],this._hasMoreDatasets=e+p<(t.pagination?.total??0),!this._currentDatasetId&&this._datasetListItems.length>0&&this._updateCurrentDatasetId()}catch(e){console.warn(`Failed to load dataset list:`,e),this._hasMoreDatasets=!1}finally{this._datasetListRetrieving=!1,e&&(e.retrieving=!1)}}}_handlePickerScrolled(e){if(this.datasetIds.length>0)return;let t=e.target,{last:n}=e.detail;n>=this._datasetListItems.length-10&&this._hasMoreDatasets&&this._loadMoreDatasets(t)}async _handlePickerOpened(e){let t=e.target;if(this._datasetListItems.length===0&&this._shouldFetchDatasetList&&this.datasetIds.length===0&&this._hasMoreDatasets){t.pending=!0;try{await this._loadMoreDatasets(t)}finally{t.pending=!1}}}_updateCurrentDatasetId(){let e=this._availableDatasets;if(this.selectedDatasetId&&e.some(e=>e.id===this.selectedDatasetId)){this._currentDatasetId=this.selectedDatasetId;return}if(this.selectedDatasetId&&this.datasetIds.includes(this.selectedDatasetId)){this._currentDatasetId=this.selectedDatasetId;return}this._currentDatasetId=e.length>0?e[0].id:void 0}_handleDatasetChange(e){let t=e.detail?.value?.[0];t&&t!==this._currentDatasetId&&(this._currentDatasetId=t,this._searchQuery=``,this.dispatchEvent(new CustomEvent(`luzmo-dataset-changed`,{bubbles:!0,composed:!0,detail:{datasetId:t}})))}_getDataFieldKey(e){return`columnId`in e&&e.columnId?`col-${e.columnId}`:`formulaId`in e&&e.formulaId?`formula-${e.formulaId}`:`formula`in e&&e.formula?`adhoc-${e.formula}`:`field-${e.datasetId}-${Math.random().toString(36).slice(2,11)}`}_handleSearchInput(e){this._searchQuery=e.target.value}_renderDatasetPicker(){if(!this.datasetPicker)return s.nothing;let e=this._availableDatasets,t=e.length>1,n=this.datasetIds.length>0,r=this._shouldFetchDatasetList;if(!t&&!n&&!r)return s.nothing;let a=this._datasetListPending||this.datasetIds.length>0&&this._datasetListItems.length===0&&this.datasetsDataFields.length===0&&!this._datasetNamesFetchAttempted,o=a?[]:e.map(e=>({value:e.id,label:i.t(e.name,this.language)||e.id})),c=a?[]:this._currentDatasetId?[this._currentDatasetId]:[],u=a?(0,l.msg)(`Loading datasets...`):this.datasetPickerPlaceholder??(0,l.msg)(`Select dataset...`);return s.html`
|
|
21
21
|
<div class="dataset-picker" part="dataset-picker">
|
|
22
22
|
<luzmo-select
|
|
23
23
|
selects="single"
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../base-C_azywlB.cjs`),require(`../focus-visible-3ACCHno4.cjs`),require(`../set-locale-
|
|
20
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../base-C_azywlB.cjs`),require(`../focus-visible-3ACCHno4.cjs`),require(`../set-locale-DjOkyNGu.cjs`),require(`../localized-mixin-BmZhC9XV.cjs`),require(`../data-broker-BUIUM5hr.cjs`),require(`../formatter-CWhf4xbq.cjs`),require(`../display-settings-Sh4LWJgN.cjs`),require(`../get-css-variable-D9AU2CIU.cjs`),require(`../slot-menu-DIQ6h6Dz.cjs`),require(`../slot-menu-list-CFCvrPVt.cjs`);const e=require(`../droppable-slot-DtFdADiO.cjs`);require(`../slot-labels.config-BdrqhsYJ.cjs`),Object.defineProperty(exports,`LuzmoDroppableSlot`,{enumerable:!0,get:function(){return e.t}});
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
import "../get-css-variable-DpEed5QG.js";
|
|
27
27
|
import "../base-rg2x95aL.js";
|
|
28
28
|
import "../focus-visible-D1pJhWEh.js";
|
|
29
|
-
import "../set-locale-
|
|
30
|
-
import "../localized-mixin-
|
|
29
|
+
import "../set-locale-CRNDDu2d.js";
|
|
30
|
+
import "../localized-mixin-CgQFYGOU.js";
|
|
31
31
|
import "../data-broker-cLR-t5LM.js";
|
|
32
32
|
import "../formatter-B21Tb3sf.js";
|
|
33
|
-
import "../display-settings-
|
|
34
|
-
import "../slot-menu-
|
|
35
|
-
import "../slot-menu-list-
|
|
36
|
-
import { t as LuzmoDroppableSlot } from "../droppable-slot-
|
|
33
|
+
import "../display-settings-C_ubOOoF.js";
|
|
34
|
+
import "../slot-menu-B3L8YEnv.js";
|
|
35
|
+
import "../slot-menu-list-BLJxoLeI.js";
|
|
36
|
+
import { t as LuzmoDroppableSlot } from "../droppable-slot-oB61SQKO.js";
|
|
37
37
|
import "../slot-labels.config-BNi-I1ba.js";
|
|
38
38
|
export { LuzmoDroppableSlot };
|
|
@@ -17,16 +17,16 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
const e=require(`./chunk-350yNsax.cjs`),t=require(`./base-C_azywlB.cjs`),n=require(`./decorate-Dq4-zbi1.cjs`),r=require(`./localized-mixin-DTvVLuXW.cjs`),i=require(`./localize-BBuZJf_h.cjs`),a=require(`./data-broker-BUIUM5hr.cjs`),o=require(`./display-settings-rCBWD_I_.cjs`),s=require(`./get-css-variable-D9AU2CIU.cjs`),c=require(`./slots-config-mOBA4FHK.cjs`),l=require(`./default-acceptable-data-field-types-DY4JJ1aG.cjs`),u=require(`./slot-menu-DyC8HQ5E.cjs`),d=require(`./slot-labels.config-BdrqhsYJ.cjs`);let f=require(`lit`),p=require(`lit/decorators.js`),m=require(`@lit/localize`),h=require(`@luzmo/icons`);require(`@luzmo/lucero/tooltip`);let g=require(`@lit/context`),_=require(`@lit/task`),v=require(`lit/directives/if-defined.js`);var y=`:host{font-family:var(--luzmo-droppable-slot-font-family,var(--luzmo-font-family));--slot-height:var(--luzmo-droppable-slot-height,var(--droppable-slot-height))}.droppable-slot-wrapper{width:var(--slot-height);min-width:var(--slot-height);height:auto;position:relative;overflow:visible}.droppable-slot[filled]{border:var(--luzmo-droppable-slot-filled-border-width,var(--droppable-slot-filled-border-width))var(--luzmo-droppable-slot-filled-border-style,var(--droppable-slot-filled-border-style))var(--luzmo-droppable-slot-filled-border-color,var(--droppable-slot-filled-border-color));background-color:var(--luzmo-droppable-slot-filled-background-color,var(--droppable-slot-filled-background-color));color:var(--luzmo-droppable-slot-filled-color,var(--droppable-slot-filled-color));gap:var(--luzmo-droppable-slot-filled-gap,var(--droppable-slot-filled-gap));padding-right:0}.droppable-slot[filled]>:not(luzmo-overlay){cursor:pointer}.droppable-slot{background-color:var(--luzmo-droppable-slot-background-color,var(--droppable-slot-background-color));color:var(--luzmo-droppable-slot-font-color,var(--droppable-slot-font-color));border:var(--luzmo-droppable-slot-border-width,var(--droppable-slot-border-width))var(--luzmo-droppable-slot-border-style,var(--droppable-slot-border-style))var(--luzmo-droppable-slot-border-color,var(--droppable-slot-border-color));padding-left:var(--luzmo-droppable-slot-edge-to-label,var(--droppable-slot-edge-to-label));padding-right:var(--luzmo-droppable-slot-label-to-controls,var(--droppable-slot-label-to-controls));border-radius:var(--luzmo-droppable-slot-border-radius,var(--droppable-slot-border-radius));height:var(--luzmo-droppable-slot-height,var(--droppable-slot-height));justify-content:space-between;align-items:center;display:flex}:host(.pulse) .droppable-slot{animation:1s ease-in-out infinite dropelementpulse}:host([accept-drag]) .droppable-slot{background-color:var(--luzmo-droppable-slot-accept-drag-background-color,var(--droppable-slot-accept-drag-background-color));color:var(--luzmo-droppable-slot-accept-drag-font-color,var(--droppable-slot-accept-drag-font-color));border-color:var(--luzmo-droppable-slot-accept-drag-border-color,var(--droppable-slot-accept-drag-border-color));animation:1s ease-in-out infinite dropelementpulse}:host([accept-drag]) .controls{background-color:var(--luzmo-droppable-slot-accept-drag-controls-background-color,var(--droppable-slot-accept-drag-controls-background-color));color:var(--luzmo-droppable-slot-accept-drag-controls-color,var(--droppable-slot-accept-drag-controls-color))}:host([would-accept-drag]) .droppable-slot:not([filled]){animation:var(--luzmo-slot-would-accept-drop-animation,none)}@keyframes dropelementpulse{0%{box-shadow:0 0 0 0 var(--luzmo-droppable-slot-pulse-color,var(--droppable-slot-pulse-color)),0 0 0 0 var(--luzmo-droppable-slot-pulse-color,var(--droppable-slot-pulse-color))}to{box-shadow:0 0 0 1rem #0000,0 0 0 1rem #0000}}:host([disabled]) .droppable-slot{background-color:var(--luzmo-droppable-slot-background-color-disabled,var(--droppable-slot-background-color-disabled));color:var(--luzmo-droppable-slot-color-disabled,var(--droppable-slot-color-disabled));cursor:not-allowed}:host([disabled]) .drag-handle-icon{opacity:.25;font-size:12px}.drag-handle-icon{opacity:.5;font-size:12px}.droppable-slot-label{font-size:var(--luzmo-droppable-slot-label-font-size,var(--droppable-slot-label-font-size));padding-top:var(--luzmo-droppable-slot-label-padding-top,var(--droppable-slot-label-padding-top));padding-bottom:var(--luzmo-droppable-slot-label-padding-bottom,var(--droppable-slot-label-padding-bottom));max-width:var(--luzmo-droppable-slot-label-max-width);margin-right:var(--luzmo-droppable-slot-text-to-controls,var(--droppable-slot-text-to-controls));text-overflow:ellipsis;white-space:nowrap;flex-grow:1;overflow:hidden}.controls{align-items:center;gap:var(--luzmo-droppable-slot-controls-gap,var(--droppable-slot-controls-gap));background-color:var(--luzmo-droppable-slot-controls-background-color,var(--droppable-slot-controls-background-color));height:100%;color:var(--luzmo-droppable-slot-controls-color,var(--droppable-slot-controls-color));margin-right:var(--luzmo-droppable-slot-controls-to-edge,var(--droppable-slot-controls-to-edge));padding:0 var(--luzmo-droppable-slot-controls-horizontal-padding,var(--droppable-slot-controls-horizontal-padding));font-size:var(--luzmo-droppable-slot-controls-font-size);border-top-right-radius:var(--luzmo-droppable-slot-border-radius,var(--droppable-slot-border-radius));border-bottom-right-radius:var(--luzmo-droppable-slot-border-radius,var(--droppable-slot-border-radius));display:flex}.controls div{cursor:pointer;height:100%;padding:0 var(--luzmo-droppable-slot-controls-control-horizontal-padding,var(--droppable-slot-controls-control-horizontal-padding));align-items:center;display:flex}.droppable-slot.rotate{transform-origin:50%;max-width:15rem;position:absolute;top:0;left:50%;transform:translate(-50%)rotate(-90deg)}luzmo-slot-menu[placement=bottom],luzmo-slot-menu[placement=top],luzmo-slot-menu[placement=bottom-start],luzmo-slot-menu[placement=top-start],luzmo-slot-menu[placement=bottom-end],luzmo-slot-menu[placement=top-end]{margin:var(--luzmo-droppable-slot-overlay-vertical-gap,var(--droppable-slot-overlay-vertical-gap))0}luzmo-slot-menu[placement=left],luzmo-slot-menu[placement=right],luzmo-slot-menu[placement=left-start],luzmo-slot-menu[placement=right-start],luzmo-slot-menu[placement=left-end],luzmo-slot-menu[placement=right-end]{margin:0 var(--luzmo-droppable-slot-overlay-horizontal-gap,var(--droppable-slot-overlay-horizontal-gap))}:host{--droppable-slot-border-width:var(--luzmo-border-width);--droppable-slot-border-style:dashed;--droppable-slot-border-color:var(--luzmo-border-color);--droppable-slot-background-color:transparent;--droppable-slot-accept-drag-background-color:var(--luzmo-positive-color);--droppable-slot-accept-drag-color:white;--droppable-slot-accept-drag-border-color:var(--luzmo-positive-color-down);--droppable-slot-accept-drag-controls-background-color:var(--luzmo-positive-color-down);--droppable-slot-accept-drag-controls-color:white;--droppable-slot-accept-drag-font-color:white;--droppable-slot-font-color:var(--luzmo-font-color);--droppable-slot-controls-background-color:var(--luzmo-primary-down);--droppable-slot-controls-color:var(--luzmo-primary-inverse-color);--droppable-slot-text-to-controls:var(--luzmo-spacing-3);--droppable-slot-controls-to-edge:0;--droppable-slot-controls-gap:var(--luzmo-spacing-2);--droppable-slot-controls-horizontal-padding:var(--luzmo-spacing-2);--droppable-slot-controls-control-horizontal-padding:var(--luzmo-spacing-3);--droppable-slot-filled-background-color:var(--luzmo-primary);--droppable-slot-filled-color:var(--luzmo-primary-inverse-color);--droppable-slot-filled-border-width:var(--luzmo-border-width);--droppable-slot-filled-border-style:solid;--droppable-slot-filled-border-color:var(--luzmo-primary-down);--droppable-slot-height:var(--luzmo-droppable-slot-height,var(--luzmo-component-height));--droppable-slot-label-font-size:var(--luzmo-font-size);--droppable-slot-icon-type-font-size:var(--luzmo-font-size);--droppable-slot-edge-to-label:var(--luzmo-spacing-5);--droppable-slot-label-to-controls:var(--luzmo-spacing-5);--droppable-slot-color-disabled:var(--luzmo-color-disabled);--droppable-slot-background-color-disabled:var(--luzmo-background-color-disabled);--droppable-slot-pulse-color:rgba(var(--luzmo-positive-color-rgb),.2);--droppable-slot-border-radius:var(--luzmo-border-radius);--droppable-slot-filled-gap:var(--luzmo-spacing-5);--droppable-slot-horizontal-padding:var(--luzmo-spacing-4);--droppable-slot-overlay-horizontal-gap:var(--luzmo-spacing-4);--droppable-slot-overlay-vertical-gap:var(--luzmo-spacing-4)}:host([size=s]){--droppable-slot-height:var(--luzmo-droppable-slot-height,var(--luzmo-component-height-s));--droppable-slot-label-font-size:var(--luzmo-font-size-s);--droppable-slot-icon-type-font-size:var(--luzmo-font-size-s);--droppable-slot-horizontal-padding:var(--luzmo-spacing-4);--droppable-slot-overlay-horizontal-gap:var(--luzmo-spacing-4);--droppable-slot-overlay-vertical-gap:var(--luzmo-spacing-4)}:host([size=l]){--droppable-slot-height:var(--luzmo-droppable-slot-height,var(--luzmo-component-height-l));--droppable-slot-label-font-size:var(--luzmo-font-size-l);--droppable-slot-icon-type-font-size:var(--luzmo-font-size-l);--droppable-slot-horizontal-padding:var(--luzmo-spacing-5);--droppable-slot-overlay-horizontal-gap:var(--luzmo-spacing-5);--droppable-slot-overlay-vertical-gap:var(--luzmo-spacing-5)}:host([size=xl]){--droppable-slot-height:var(--luzmo-droppable-slot-height,var(--luzmo-component-height-xl));--droppable-slot-label-font-size:var(--luzmo-font-size-xl);--droppable-slot-icon-type-font-size:var(--luzmo-font-size-xl);--droppable-slot-horizontal-padding:var(--luzmo-spacing-5);--droppable-slot-overlay-horizontal-gap:var(--luzmo-spacing-5);--droppable-slot-overlay-vertical-gap:var(--luzmo-spacing-5)}:host{box-sizing:border-box}`,b=class extends r.t(t.n(t.i,{validSizes:[`s`,`m`,`l`,`xl`],noDefaultSize:!0})){static{this.styles=(0,f.unsafeCSS)(y)}constructor(){super(),this._loadSlotsConfig=new _.Task(this,{task:async([e])=>{if(e&&e!==this._itemTypeLoaded)return this._itemTypeLoaded=e,this._slotsConfig=await c.t(e)??[],this._slotsConfig},args:()=>[this.itemType,this.language]}),this._slotsConfig=[],this.slotConfiguration={},this.slotsContents=[],this.rotate=!1,this.apiUrl=`https://api.luzmo.com`,this.authKey=``,this.authToken=``,this.menu=`default`,this.placement=`bottom-end`,this._slotContents=[],this._overlayReady=!1,this._store=new u.n,this._currentSlotContents=[],this._lastFetchedDatasetId=null,this._linkedDatasetsIds=[],this._attachDroppable=()=>{this._cleanupDroppable||=s.i({element:this,onDrop:async e=>{let t={...e.source?.data},n=e?.source?.element?.hasAttribute(`sublevel`)??!1,r=this._slotContents?.length===0,i=t.datasetId,o=l.n(t,n),s=this.slotConfiguration?.canAcceptMultipleDataFields?[...this._slotContents??[],o]:[o];this.removeAttribute(`accept-drag`),i&&i!==this._lastFetchedDatasetId&&(this._lastFetchedDatasetId=i,await a.t.fetchDatasetsRecursive([i]),this._linkedDatasetsIds=a.t.getLinkedDatasetsIds(i)),this.changedSlotContents(s,this._linkedDatasetsIds).defaultPrevented||(this._slotContents=s,this._currentSlotContents=[...this._slotContents],r?(this._overlayReady=!1,setTimeout(()=>{this._overlayReady=!0},200)):this._overlayReady=!0),this.classList.remove(`pulse`)},canDrop:({source:e})=>this._canDropField({source:e}),getDropEffect:()=>`move`,onDragEnter:()=>{this.setAttribute(`accept-drag`,``),this.classList.add(`pulse`)},onDragLeave:()=>{this.removeAttribute(`accept-drag`),this.classList.remove(`pulse`)}})},this._canDropField=({source:e})=>{if(![`LUZMO-DRAGGABLE-DATA-FIELD-LEVEL`,`LUZMO-DRAGGABLE-DATA-FIELD`].includes(e.element?.tagName)||!this.slotConfiguration?.canAcceptFormula&&(e?.data?.formulaId||e?.data?.formula||e?.data?.entity===`formula`))return!1;let{acceptableDataFieldTypes:t,acceptableColumnSubtypes:n}=this.slotConfiguration??{},r=Array.isArray(t)&&t.length>0?t:l.t;return e?.data?.type&&!r.includes(e?.data?.type)?!1:!(e?.data?.subtype&&Array.isArray(n)&&n.length>0&&!n.includes(e?.data?.subtype))},this.changedSlotContents=(e,t=[])=>{let n=new CustomEvent(`luzmo-slot-contents-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContents:e,linkedDatasetsIds:t}});return this.dispatchEvent(n),n.defaultPrevented||this._store?.setContents(e,this.slotName),n},this._handleDragStart=e=>{let t=e,n=t.detail?.data;if(this._overlayElement&&(this._overlayElement.open=!1),!n)return;let r={data:n,element:{tagName:t.target instanceof HTMLElement&&t.target.tagName===`LUZMO-DRAGGABLE-DATA-FIELD-LEVEL`?`LUZMO-DRAGGABLE-DATA-FIELD-LEVEL`:`LUZMO-DRAGGABLE-DATA-FIELD`}};this._canDropField({source:r})&&this.setAttribute(`would-accept-drag`,``)},this._handleDragEnd=()=>{this.removeAttribute(`would-accept-drag`)},this._handleOverlayClick=e=>{e.detail>0&&e.target===this._overlayElement?this._overlayElement.open=!1:e.stopPropagation()},new g.ContextProvider(this,{context:o.n,initialValue:this._store})}connectedCallback(){super.connectedCallback(),this._attachDroppable(),document.addEventListener(`luzmo-data-field-drag-started`,this._handleDragStart),document.addEventListener(`luzmo-data-field-dropped`,this._handleDragEnd)}disconnectedCallback(){super.disconnectedCallback(),this._cleanupDroppable&&=(this._cleanupDroppable(),void 0),this._loadSlotsConfig.abort?.(),document.removeEventListener(`luzmo-data-field-drag-started`,this._handleDragStart),document.removeEventListener(`luzmo-data-field-dropped`,this._handleDragEnd)}emptySlotContents(e){e.preventDefault(),e.stopPropagation(),this._slotContents=[],this.changedSlotContents([])}willUpdate(e){super.willUpdate(e),e.has(`slotConfiguration`)&&(this._cleanupDroppable&&=(this._cleanupDroppable(),void 0),this._attachDroppable()),e.has(`slotsContents`)&&this._processSlotsContents()}_processSlotsContents(){this._store?.setFullContents(this.slotsContents),this._slotContents=this.slotsContents?.find(e=>e.name===this.slotName)?.content??[],this._currentSlotContents=[...this._slotContents],this._slotContents?.length>0&&(this._overlayReady=!0),this._store?.setContents(this._slotContents)}firstUpdated(e){super.firstUpdated(e),this._attachDroppable()}_onOverlayClosed(e){let t=e.overlay;this._slotMenuElement&&t===this._overlayElement&&(setTimeout(()=>{this._slotMenuElement.resetPosition()},500),this._slotMenuElement.resetInfoVisibility(),this.dispatchEvent(new CustomEvent(`luzmo-slot-menu-inactive`,{bubbles:!0,composed:!0})))}_onOverlayOpened(e){let t=e.overlay;if(this._slotMenuElement&&t===this._overlayElement){let e=this._store?.activeIndex.get?.()??0,t=this._slotContents?.[e]??this._slotContents?.[0];if(!t)return;let n=t?.column??t?.columnId,r=t?.set??t?.datasetId,i=t?.formula;(n||i)&&r&&(this.dispatchEvent(new CustomEvent(`luzmo-slot-menu-active`,{bubbles:!0,composed:!0,detail:{datasetId:r}})),setTimeout(()=>{this.dispatchEvent(new CustomEvent(`luzmo-slot-menu-highlight`,{bubbles:!0,composed:!0,detail:{datasetId:r,level:t?.level??0,...n&&{columnId:n},...i&&{formulaId:i}}}))}))}}_onSlotMenuChanges(e){e.preventDefault(),e.stopPropagation();let t=e.detail.linkedDatasetsIds;this._slotContents=e.detail.slotContents,this._currentSlotContents=[...this._slotContents],this.changedSlotContents(this._slotContents,t)}_onInfoVisibilityChanged(e){this.dispatchEvent(new CustomEvent(`luzmo-info-visibility-changed`,{detail:e.detail}))}get _fullLabel(){let e=``,t=d.t[this.slotConfiguration?.label]?d.t[this.slotConfiguration?.label]():this.slotConfiguration?.label;this._currentSlotContents?.length===1?e=i.t(this._currentSlotContents?.[0]?.label,this.language)??`Untitled`:this._currentSlotContents?.length>1&&(e=`${this._currentSlotContents.length} items`);let n=this.label||t||`Untitled`;return this._currentSlotContents?.length>0&&(n+=this._currentSlotContents?.length>1?`: ${this._currentSlotContents.length} items`:`: ${e}`),n}droppableSlotMarkup(){let e=f.html`
|
|
20
|
+
const e=require(`./chunk-350yNsax.cjs`),t=require(`./base-C_azywlB.cjs`),n=require(`./decorate-Dq4-zbi1.cjs`),r=require(`./localized-mixin-BmZhC9XV.cjs`),i=require(`./localize-BBuZJf_h.cjs`),a=require(`./data-broker-BUIUM5hr.cjs`),o=require(`./display-settings-Sh4LWJgN.cjs`),s=require(`./get-css-variable-D9AU2CIU.cjs`),c=require(`./slots-config-mOBA4FHK.cjs`),l=require(`./default-acceptable-data-field-types-DY4JJ1aG.cjs`),u=require(`./slot-menu-DIQ6h6Dz.cjs`),d=require(`./slot-labels.config-BdrqhsYJ.cjs`);let f=require(`@luzmo/icons`),p=require(`lit`),m=require(`lit/decorators.js`),h=require(`@lit/localize`);require(`@luzmo/lucero/tooltip`);let g=require(`@lit/context`),_=require(`@lit/task`),v=require(`lit/directives/if-defined.js`);var y=`:host{font-family:var(--luzmo-droppable-slot-font-family,var(--luzmo-font-family));--slot-height:var(--luzmo-droppable-slot-height,var(--droppable-slot-height))}.droppable-slot-wrapper{width:var(--slot-height);min-width:var(--slot-height);height:auto;position:relative;overflow:visible}.droppable-slot[filled]{border:var(--luzmo-droppable-slot-filled-border-width,var(--droppable-slot-filled-border-width))var(--luzmo-droppable-slot-filled-border-style,var(--droppable-slot-filled-border-style))var(--luzmo-droppable-slot-filled-border-color,var(--droppable-slot-filled-border-color));background-color:var(--luzmo-droppable-slot-filled-background-color,var(--droppable-slot-filled-background-color));color:var(--luzmo-droppable-slot-filled-color,var(--droppable-slot-filled-color));gap:var(--luzmo-droppable-slot-filled-gap,var(--droppable-slot-filled-gap));padding-right:0}.droppable-slot[filled]>:not(luzmo-overlay){cursor:pointer}.droppable-slot{background-color:var(--luzmo-droppable-slot-background-color,var(--droppable-slot-background-color));color:var(--luzmo-droppable-slot-font-color,var(--droppable-slot-font-color));border:var(--luzmo-droppable-slot-border-width,var(--droppable-slot-border-width))var(--luzmo-droppable-slot-border-style,var(--droppable-slot-border-style))var(--luzmo-droppable-slot-border-color,var(--droppable-slot-border-color));padding-left:var(--luzmo-droppable-slot-edge-to-label,var(--droppable-slot-edge-to-label));padding-right:var(--luzmo-droppable-slot-label-to-controls,var(--droppable-slot-label-to-controls));border-radius:var(--luzmo-droppable-slot-border-radius,var(--droppable-slot-border-radius));height:var(--luzmo-droppable-slot-height,var(--droppable-slot-height));justify-content:space-between;align-items:center;display:flex}:host(.pulse) .droppable-slot{animation:1s ease-in-out infinite dropelementpulse}:host([accept-drag]) .droppable-slot{background-color:var(--luzmo-droppable-slot-accept-drag-background-color,var(--droppable-slot-accept-drag-background-color));color:var(--luzmo-droppable-slot-accept-drag-font-color,var(--droppable-slot-accept-drag-font-color));border-color:var(--luzmo-droppable-slot-accept-drag-border-color,var(--droppable-slot-accept-drag-border-color));animation:1s ease-in-out infinite dropelementpulse}:host([accept-drag]) .controls{background-color:var(--luzmo-droppable-slot-accept-drag-controls-background-color,var(--droppable-slot-accept-drag-controls-background-color));color:var(--luzmo-droppable-slot-accept-drag-controls-color,var(--droppable-slot-accept-drag-controls-color))}:host([would-accept-drag]) .droppable-slot:not([filled]){animation:var(--luzmo-slot-would-accept-drop-animation,none)}@keyframes dropelementpulse{0%{box-shadow:0 0 0 0 var(--luzmo-droppable-slot-pulse-color,var(--droppable-slot-pulse-color)),0 0 0 0 var(--luzmo-droppable-slot-pulse-color,var(--droppable-slot-pulse-color))}to{box-shadow:0 0 0 1rem #0000,0 0 0 1rem #0000}}:host([disabled]) .droppable-slot{background-color:var(--luzmo-droppable-slot-background-color-disabled,var(--droppable-slot-background-color-disabled));color:var(--luzmo-droppable-slot-color-disabled,var(--droppable-slot-color-disabled));cursor:not-allowed}:host([disabled]) .drag-handle-icon{opacity:.25;font-size:12px}.drag-handle-icon{opacity:.5;font-size:12px}.droppable-slot-label{font-size:var(--luzmo-droppable-slot-label-font-size,var(--droppable-slot-label-font-size));padding-top:var(--luzmo-droppable-slot-label-padding-top,var(--droppable-slot-label-padding-top));padding-bottom:var(--luzmo-droppable-slot-label-padding-bottom,var(--droppable-slot-label-padding-bottom));max-width:var(--luzmo-droppable-slot-label-max-width);margin-right:var(--luzmo-droppable-slot-text-to-controls,var(--droppable-slot-text-to-controls));text-overflow:ellipsis;white-space:nowrap;flex-grow:1;overflow:hidden}.controls{align-items:center;gap:var(--luzmo-droppable-slot-controls-gap,var(--droppable-slot-controls-gap));background-color:var(--luzmo-droppable-slot-controls-background-color,var(--droppable-slot-controls-background-color));height:100%;color:var(--luzmo-droppable-slot-controls-color,var(--droppable-slot-controls-color));margin-right:var(--luzmo-droppable-slot-controls-to-edge,var(--droppable-slot-controls-to-edge));padding:0 var(--luzmo-droppable-slot-controls-horizontal-padding,var(--droppable-slot-controls-horizontal-padding));font-size:var(--luzmo-droppable-slot-controls-font-size);border-top-right-radius:var(--luzmo-droppable-slot-border-radius,var(--droppable-slot-border-radius));border-bottom-right-radius:var(--luzmo-droppable-slot-border-radius,var(--droppable-slot-border-radius));display:flex}.controls div{cursor:pointer;height:100%;padding:0 var(--luzmo-droppable-slot-controls-control-horizontal-padding,var(--droppable-slot-controls-control-horizontal-padding));align-items:center;display:flex}.droppable-slot.rotate{transform-origin:50%;max-width:15rem;position:absolute;top:0;left:50%;transform:translate(-50%)rotate(-90deg)}luzmo-slot-menu[placement=bottom],luzmo-slot-menu[placement=top],luzmo-slot-menu[placement=bottom-start],luzmo-slot-menu[placement=top-start],luzmo-slot-menu[placement=bottom-end],luzmo-slot-menu[placement=top-end]{margin:var(--luzmo-droppable-slot-overlay-vertical-gap,var(--droppable-slot-overlay-vertical-gap))0}luzmo-slot-menu[placement=left],luzmo-slot-menu[placement=right],luzmo-slot-menu[placement=left-start],luzmo-slot-menu[placement=right-start],luzmo-slot-menu[placement=left-end],luzmo-slot-menu[placement=right-end]{margin:0 var(--luzmo-droppable-slot-overlay-horizontal-gap,var(--droppable-slot-overlay-horizontal-gap))}:host{--droppable-slot-border-width:var(--luzmo-border-width);--droppable-slot-border-style:dashed;--droppable-slot-border-color:var(--luzmo-border-color);--droppable-slot-background-color:transparent;--droppable-slot-accept-drag-background-color:var(--luzmo-positive-color);--droppable-slot-accept-drag-color:white;--droppable-slot-accept-drag-border-color:var(--luzmo-positive-color-down);--droppable-slot-accept-drag-controls-background-color:var(--luzmo-positive-color-down);--droppable-slot-accept-drag-controls-color:white;--droppable-slot-accept-drag-font-color:white;--droppable-slot-font-color:var(--luzmo-font-color);--droppable-slot-controls-background-color:var(--luzmo-primary-down);--droppable-slot-controls-color:var(--luzmo-primary-inverse-color);--droppable-slot-text-to-controls:var(--luzmo-spacing-3);--droppable-slot-controls-to-edge:0;--droppable-slot-controls-gap:var(--luzmo-spacing-2);--droppable-slot-controls-horizontal-padding:var(--luzmo-spacing-2);--droppable-slot-controls-control-horizontal-padding:var(--luzmo-spacing-3);--droppable-slot-filled-background-color:var(--luzmo-primary);--droppable-slot-filled-color:var(--luzmo-primary-inverse-color);--droppable-slot-filled-border-width:var(--luzmo-border-width);--droppable-slot-filled-border-style:solid;--droppable-slot-filled-border-color:var(--luzmo-primary-down);--droppable-slot-height:var(--luzmo-droppable-slot-height,var(--luzmo-component-height));--droppable-slot-label-font-size:var(--luzmo-font-size);--droppable-slot-icon-type-font-size:var(--luzmo-font-size);--droppable-slot-edge-to-label:var(--luzmo-spacing-5);--droppable-slot-label-to-controls:var(--luzmo-spacing-5);--droppable-slot-color-disabled:var(--luzmo-color-disabled);--droppable-slot-background-color-disabled:var(--luzmo-background-color-disabled);--droppable-slot-pulse-color:rgba(var(--luzmo-positive-color-rgb),.2);--droppable-slot-border-radius:var(--luzmo-border-radius);--droppable-slot-filled-gap:var(--luzmo-spacing-5);--droppable-slot-horizontal-padding:var(--luzmo-spacing-4);--droppable-slot-overlay-horizontal-gap:var(--luzmo-spacing-4);--droppable-slot-overlay-vertical-gap:var(--luzmo-spacing-4)}:host([size=s]){--droppable-slot-height:var(--luzmo-droppable-slot-height,var(--luzmo-component-height-s));--droppable-slot-label-font-size:var(--luzmo-font-size-s);--droppable-slot-icon-type-font-size:var(--luzmo-font-size-s);--droppable-slot-horizontal-padding:var(--luzmo-spacing-4);--droppable-slot-overlay-horizontal-gap:var(--luzmo-spacing-4);--droppable-slot-overlay-vertical-gap:var(--luzmo-spacing-4)}:host([size=l]){--droppable-slot-height:var(--luzmo-droppable-slot-height,var(--luzmo-component-height-l));--droppable-slot-label-font-size:var(--luzmo-font-size-l);--droppable-slot-icon-type-font-size:var(--luzmo-font-size-l);--droppable-slot-horizontal-padding:var(--luzmo-spacing-5);--droppable-slot-overlay-horizontal-gap:var(--luzmo-spacing-5);--droppable-slot-overlay-vertical-gap:var(--luzmo-spacing-5)}:host([size=xl]){--droppable-slot-height:var(--luzmo-droppable-slot-height,var(--luzmo-component-height-xl));--droppable-slot-label-font-size:var(--luzmo-font-size-xl);--droppable-slot-icon-type-font-size:var(--luzmo-font-size-xl);--droppable-slot-horizontal-padding:var(--luzmo-spacing-5);--droppable-slot-overlay-horizontal-gap:var(--luzmo-spacing-5);--droppable-slot-overlay-vertical-gap:var(--luzmo-spacing-5)}:host{box-sizing:border-box}`,b=class extends r.t(t.n(t.i,{validSizes:[`s`,`m`,`l`,`xl`],noDefaultSize:!0})){static{this.styles=(0,p.unsafeCSS)(y)}constructor(){super(),this._loadSlotsConfig=new _.Task(this,{task:async([e])=>{if(e&&e!==this._itemTypeLoaded)return this._itemTypeLoaded=e,this._slotsConfig=await c.t(e)??[],this._slotsConfig},args:()=>[this.itemType,this.language]}),this._slotsConfig=[],this.slotConfiguration={},this.slotsContents=[],this.rotate=!1,this.apiUrl=`https://api.luzmo.com`,this.authKey=``,this.authToken=``,this.menu=`default`,this.placement=`bottom-end`,this._slotContents=[],this._overlayReady=!1,this._store=new u.n,this._currentSlotContents=[],this._lastFetchedDatasetId=null,this._linkedDatasetsIds=[],this._attachDroppable=()=>{this._cleanupDroppable||=s.i({element:this,onDrop:async e=>{let t={...e.source?.data},n=e?.source?.element?.hasAttribute(`sublevel`)??!1,r=this._slotContents?.length===0,i=t.datasetId,o=l.n(t,n),s=this.slotConfiguration?.canAcceptMultipleDataFields?[...this._slotContents??[],o]:[o];this.removeAttribute(`accept-drag`),i&&i!==this._lastFetchedDatasetId&&(this._lastFetchedDatasetId=i,await a.t.fetchDatasetsRecursive([i]),this._linkedDatasetsIds=a.t.getLinkedDatasetsIds(i)),this.changedSlotContents(s,this._linkedDatasetsIds).defaultPrevented||(this._slotContents=s,this._currentSlotContents=[...this._slotContents],r?(this._overlayReady=!1,setTimeout(()=>{this._overlayReady=!0},200)):this._overlayReady=!0),this.classList.remove(`pulse`)},canDrop:({source:e})=>this._canDropField({source:e}),getDropEffect:()=>`move`,onDragEnter:()=>{this.setAttribute(`accept-drag`,``),this.classList.add(`pulse`)},onDragLeave:()=>{this.removeAttribute(`accept-drag`),this.classList.remove(`pulse`)}})},this._canDropField=({source:e})=>{if(![`LUZMO-DRAGGABLE-DATA-FIELD-LEVEL`,`LUZMO-DRAGGABLE-DATA-FIELD`].includes(e.element?.tagName)||!this.slotConfiguration?.canAcceptFormula&&(e?.data?.formulaId||e?.data?.formula||e?.data?.entity===`formula`))return!1;let{acceptableDataFieldTypes:t,acceptableColumnSubtypes:n}=this.slotConfiguration??{},r=Array.isArray(t)&&t.length>0?t:l.t;return e?.data?.type&&!r.includes(e?.data?.type)?!1:!(e?.data?.subtype&&Array.isArray(n)&&n.length>0&&!n.includes(e?.data?.subtype))},this.changedSlotContents=(e,t=[])=>{let n=new CustomEvent(`luzmo-slot-contents-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContents:e,linkedDatasetsIds:t}});return this.dispatchEvent(n),n.defaultPrevented||this._store?.setContents(e,this.slotName),n},this._handleDragStart=e=>{let t=e,n=t.detail?.data;if(this._overlayElement&&(this._overlayElement.open=!1),!n)return;let r={data:n,element:{tagName:t.target instanceof HTMLElement&&t.target.tagName===`LUZMO-DRAGGABLE-DATA-FIELD-LEVEL`?`LUZMO-DRAGGABLE-DATA-FIELD-LEVEL`:`LUZMO-DRAGGABLE-DATA-FIELD`}};this._canDropField({source:r})&&this.setAttribute(`would-accept-drag`,``)},this._handleDragEnd=()=>{this.removeAttribute(`would-accept-drag`)},this._handleOverlayClick=e=>{e.detail>0&&e.target===this._overlayElement?this._overlayElement.open=!1:e.stopPropagation()},new g.ContextProvider(this,{context:o.n,initialValue:this._store})}connectedCallback(){super.connectedCallback(),this._attachDroppable(),document.addEventListener(`luzmo-data-field-drag-started`,this._handleDragStart),document.addEventListener(`luzmo-data-field-dropped`,this._handleDragEnd)}disconnectedCallback(){super.disconnectedCallback(),this._cleanupDroppable&&=(this._cleanupDroppable(),void 0),this._loadSlotsConfig.abort?.(),document.removeEventListener(`luzmo-data-field-drag-started`,this._handleDragStart),document.removeEventListener(`luzmo-data-field-dropped`,this._handleDragEnd)}emptySlotContents(e){e.preventDefault(),e.stopPropagation(),this._slotContents=[],this.changedSlotContents([])}willUpdate(e){super.willUpdate(e),e.has(`slotConfiguration`)&&(this._cleanupDroppable&&=(this._cleanupDroppable(),void 0),this._attachDroppable()),e.has(`slotsContents`)&&this._processSlotsContents()}_processSlotsContents(){this._store?.setFullContents(this.slotsContents),this._slotContents=this.slotsContents?.find(e=>e.name===this.slotName)?.content??[],this._currentSlotContents=[...this._slotContents],this._slotContents?.length>0&&(this._overlayReady=!0),this._store?.setContents(this._slotContents)}firstUpdated(e){super.firstUpdated(e),this._attachDroppable()}_onOverlayClosed(e){let t=e.overlay;this._slotMenuElement&&t===this._overlayElement&&(setTimeout(()=>{this._slotMenuElement.resetPosition()},500),this._slotMenuElement.resetInfoVisibility(),this.dispatchEvent(new CustomEvent(`luzmo-slot-menu-inactive`,{bubbles:!0,composed:!0})))}_onOverlayOpened(e){let t=e.overlay;if(this._slotMenuElement&&t===this._overlayElement){let e=this._store?.activeIndex.get?.()??0,t=this._slotContents?.[e]??this._slotContents?.[0];if(!t)return;let n=t?.column??t?.columnId,r=t?.set??t?.datasetId,i=t?.formula;(n||i)&&r&&(this.dispatchEvent(new CustomEvent(`luzmo-slot-menu-active`,{bubbles:!0,composed:!0,detail:{datasetId:r}})),setTimeout(()=>{this.dispatchEvent(new CustomEvent(`luzmo-slot-menu-highlight`,{bubbles:!0,composed:!0,detail:{datasetId:r,level:t?.level??0,...n&&{columnId:n},...i&&{formulaId:i}}}))}))}}_onSlotMenuChanges(e){e.preventDefault(),e.stopPropagation();let t=e.detail.linkedDatasetsIds;this._slotContents=e.detail.slotContents,this._currentSlotContents=[...this._slotContents],this.changedSlotContents(this._slotContents,t)}_onInfoVisibilityChanged(e){this.dispatchEvent(new CustomEvent(`luzmo-info-visibility-changed`,{detail:e.detail}))}get _fullLabel(){let e=``,t=d.t[this.slotConfiguration?.label]?d.t[this.slotConfiguration?.label]():this.slotConfiguration?.label;this._currentSlotContents?.length===1?e=i.t(this._currentSlotContents?.[0]?.label,this.language)??`Untitled`:this._currentSlotContents?.length>1&&(e=`${this._currentSlotContents.length} items`);let n=this.label||t||`Untitled`;return this._currentSlotContents?.length>0&&(n+=this._currentSlotContents?.length>1?`: ${this._currentSlotContents.length} items`:`: ${e}`),n}droppableSlotMarkup(){let e=p.html`
|
|
21
21
|
<div
|
|
22
22
|
id="trigger"
|
|
23
23
|
class="droppable-slot ${this.rotate?`rotate`:``}"
|
|
24
24
|
?filled=${this._slotContents?.length>0}
|
|
25
25
|
>
|
|
26
26
|
<div class="droppable-slot-label">${this._fullLabel}</div>
|
|
27
|
-
${this._slotContents?.length>0&&!(this.hideConfiguration&&this.hideDelete)?
|
|
28
|
-
${this.hideConfiguration?``:
|
|
29
|
-
${(0,
|
|
27
|
+
${this._slotContents?.length>0&&!(this.hideConfiguration&&this.hideDelete)?p.html`<div class="controls">
|
|
28
|
+
${this.hideConfiguration?``:p.html`<div>
|
|
29
|
+
${(0,f.luzmoIcon)(f.luzmoCog)}
|
|
30
30
|
<luzmo-tooltip
|
|
31
31
|
self-managed
|
|
32
32
|
placement=${this.rotate?`right`:`top`}
|
|
@@ -35,8 +35,8 @@ const e=require(`./chunk-350yNsax.cjs`),t=require(`./base-C_azywlB.cjs`),n=requi
|
|
|
35
35
|
edit
|
|
36
36
|
</luzmo-tooltip>
|
|
37
37
|
</div> `}
|
|
38
|
-
${this.hideDelete?``:
|
|
39
|
-
${(0,
|
|
38
|
+
${this.hideDelete?``:p.html`<div @click=${this.emptySlotContents}>
|
|
39
|
+
${(0,f.luzmoIcon)(f.luzmoTrashOutline)}
|
|
40
40
|
<luzmo-tooltip
|
|
41
41
|
self-managed
|
|
42
42
|
placement=${this.rotate?`right`:`top`}
|
|
@@ -46,7 +46,7 @@ const e=require(`./chunk-350yNsax.cjs`),t=require(`./base-C_azywlB.cjs`),n=requi
|
|
|
46
46
|
</luzmo-tooltip>
|
|
47
47
|
</div>`}
|
|
48
48
|
</div>`:``}
|
|
49
|
-
${this._slotContents?.length>0&&this._overlayReady?
|
|
49
|
+
${this._slotContents?.length>0&&this._overlayReady?p.html`<luzmo-overlay
|
|
50
50
|
trigger="trigger@click"
|
|
51
51
|
.placement=${this.placement}
|
|
52
52
|
offset=${this.rotate?`-100`:`0`}
|
|
@@ -77,11 +77,11 @@ const e=require(`./chunk-350yNsax.cjs`),t=require(`./base-C_azywlB.cjs`),n=requi
|
|
|
77
77
|
></luzmo-slot-menu>
|
|
78
78
|
</luzmo-overlay>`:``}
|
|
79
79
|
</div>
|
|
80
|
-
`;return this.rotate?
|
|
80
|
+
`;return this.rotate?p.html`<div class="droppable-slot-wrapper">${e}</div>`:e}render(){return this.slotConfiguration&&Object.keys(this.slotConfiguration).length>0?this.droppableSlotMarkup():this._loadSlotsConfig.render({pending:()=>p.html`
|
|
81
81
|
<p>Loading...</p>
|
|
82
|
-
`,complete:e=>{if(this.slotName&&this.itemType&&e){let t=e.find(e=>e.name===this.slotName);t&&(this.slotConfiguration=t)}return this.droppableSlotMarkup()},error:e=>
|
|
82
|
+
`,complete:e=>{if(this.slotName&&this.itemType&&e){let t=e.find(e=>e.name===this.slotName);t&&(this.slotConfiguration=t)}return this.droppableSlotMarkup()},error:e=>p.html`
|
|
83
83
|
<div>
|
|
84
84
|
Could not load droppable slot: '${this.slotName}' of chart
|
|
85
85
|
'${this.itemType}': ${e}.
|
|
86
86
|
</div>
|
|
87
|
-
`})}};n.t([(0,
|
|
87
|
+
`})}};n.t([(0,m.property)({type:String,reflect:!0,attribute:`item-type`})],b.prototype,`itemType`,void 0),n.t([(0,m.property)({type:String,reflect:!0,attribute:`slot-name`})],b.prototype,`slotName`,void 0),n.t([(0,m.property)({type:Object})],b.prototype,`slotConfiguration`,void 0),n.t([(0,m.property)({type:Object})],b.prototype,`slotsContents`,void 0),n.t([(0,m.property)({type:String,reflect:!0})],b.prototype,`label`,void 0),n.t([(0,m.property)({type:String,reflect:!0,attribute:`drag-boundary`})],b.prototype,`dragBoundary`,void 0),n.t([(0,m.property)({type:Boolean,reflect:!0})],b.prototype,`rotate`,void 0),n.t([(0,m.property)({type:String,attribute:`api-url`,reflect:!0})],b.prototype,`apiUrl`,void 0),n.t([(0,m.property)({type:String,attribute:`auth-key`,reflect:!0})],b.prototype,`authKey`,void 0),n.t([(0,m.property)({type:String,attribute:`auth-token`,reflect:!0})],b.prototype,`authToken`,void 0),n.t([(0,m.property)({type:String,reflect:!0})],b.prototype,`menu`,void 0),n.t([(0,m.property)({type:String,reflect:!0})],b.prototype,`placement`,void 0),n.t([(0,m.property)({type:Boolean,reflect:!0,attribute:`hide-delete`})],b.prototype,`hideDelete`,void 0),n.t([(0,m.property)({type:Boolean,reflect:!0,attribute:`hide-configuration`})],b.prototype,`hideConfiguration`,void 0),n.t([(0,m.query)(`luzmo-slot-menu`)],b.prototype,`_slotMenuElement`,void 0),n.t([(0,m.query)(`luzmo-overlay`)],b.prototype,`_overlayElement`,void 0),n.t([(0,m.state)()],b.prototype,`_slotContents`,void 0),n.t([(0,m.state)()],b.prototype,`_overlayReady`,void 0),b=n.t([(0,h.localized)()],b),customElements.get(`luzmo-droppable-slot`)||customElements.define(`luzmo-droppable-slot`,b),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return b}});
|
|
@@ -20,18 +20,18 @@
|
|
|
20
20
|
import { i as dropTargetForElements } from "./get-css-variable-DpEed5QG.js";
|
|
21
21
|
import { i as LuzmoElement, n as SizedMixin } from "./base-rg2x95aL.js";
|
|
22
22
|
import { t as __decorate } from "./decorate-Da6S_xrw.js";
|
|
23
|
-
import { t as LocalizedMixin } from "./localized-mixin-
|
|
23
|
+
import { t as LocalizedMixin } from "./localized-mixin-CgQFYGOU.js";
|
|
24
24
|
import { t as localize } from "./localize-Dlt3EN5i.js";
|
|
25
25
|
import { t as dataBroker } from "./data-broker-cLR-t5LM.js";
|
|
26
|
-
import { n as slotContext } from "./display-settings-
|
|
26
|
+
import { n as slotContext } from "./display-settings-C_ubOOoF.js";
|
|
27
27
|
import { t } from "./slots-config-DhNgWKR2.js";
|
|
28
28
|
import { n as convertDataFieldToSlotContent, t as DEFAULT_ACCEPTABLE_DATA_FIELD_TYPES } from "./default-acceptable-data-field-types-B2M41jLy.js";
|
|
29
|
-
import { n as SlotStore } from "./slot-menu-
|
|
29
|
+
import { n as SlotStore } from "./slot-menu-B3L8YEnv.js";
|
|
30
30
|
import { t as SLOT_LABELS } from "./slot-labels.config-BNi-I1ba.js";
|
|
31
|
+
import { luzmoCog, luzmoIcon, luzmoTrashOutline } from "@luzmo/icons";
|
|
31
32
|
import { html, unsafeCSS } from "lit";
|
|
32
33
|
import { property, query, state } from "lit/decorators.js";
|
|
33
34
|
import { localized } from "@lit/localize";
|
|
34
|
-
import { luzmoCog, luzmoIcon, luzmoTrashOutline } from "@luzmo/icons";
|
|
35
35
|
import "@luzmo/lucero/tooltip";
|
|
36
36
|
import { ContextProvider } from "@lit/context";
|
|
37
37
|
import { Task } from "@lit/task";
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../set-locale-
|
|
20
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../set-locale-DjOkyNGu.cjs`),require(`../localized-mixin-BmZhC9XV.cjs`),require(`../data-broker-BUIUM5hr.cjs`),require(`../formatter-CWhf4xbq.cjs`),require(`../periods.const-CX2ZWWrf.cjs`),require(`../calculate-data-field-icon-BhiGlh0u.cjs`),require(`../load-data-fields-for-datasets-B6cGgPld.cjs`);const e=require(`../edit-filters-geWHEBCw.cjs`);require(`../filter-expression-picker-wOcgU2No.cjs`),require(`../data-fields-select-Byfdph5v.cjs`),require(`../filter-value-picker-Co9Vka2J.cjs`),require(`../filter-value-picker-datetime-BzMfKPkZ.cjs`),require(`../utils-Dzbml7oI.cjs`),require(`../filter-value-picker-hierarchy-Dgdj-xqx.cjs`),require(`../filter-value-picker-numeric-CZrRBHuR.cjs`),require(`../filter-item-ByKzQ-fl.cjs`),Object.defineProperty(exports,`LuzmoEditFilters`,{enumerable:!0,get:function(){return e.t}});
|
|
@@ -23,20 +23,20 @@
|
|
|
23
23
|
e.setAttribute("data-luzmo-vars", ""), e.textContent = "html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-background-color-alt-1: rgb(250, 250, 250);--luzmo-background-color-alt-2: rgb(239, 239, 239);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-color-disabled);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-scrollbar-size: 6px;--luzmo-scrollbar-width: thin;--luzmo-scrollbar-track-background: transparent;--luzmo-scrollbar-track-border-radius: var(--luzmo-border-radius-s);--luzmo-scrollbar-thumb-background: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-scrollbar-thumb-border-radius: var(--luzmo-border-radius-s);--luzmo-scrollbar-thumb-hover-background: rgba(var(--luzmo-border-color-rgb), 0.4);--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-secondary-outline: rgba(255, 0, 255, 0.2);--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-color-informative: #1a77e9;--luzmo-color-informative-rgb: 26, 119, 233;--luzmo-color-disabled: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}", document.head.appendChild(e);
|
|
24
24
|
}
|
|
25
25
|
})();
|
|
26
|
-
import "../set-locale-
|
|
27
|
-
import "../localized-mixin-
|
|
26
|
+
import "../set-locale-CRNDDu2d.js";
|
|
27
|
+
import "../localized-mixin-CgQFYGOU.js";
|
|
28
28
|
import "../data-broker-cLR-t5LM.js";
|
|
29
29
|
import "../formatter-B21Tb3sf.js";
|
|
30
30
|
import "../periods.const-Ch6SfeaG.js";
|
|
31
31
|
import "../calculate-data-field-icon-CY7Y6fn1.js";
|
|
32
32
|
import "../load-data-fields-for-datasets-CW4n0Pvf.js";
|
|
33
|
-
import { t as LuzmoEditFilters } from "../edit-filters-
|
|
34
|
-
import "../filter-expression-picker-
|
|
35
|
-
import "../data-fields-select-
|
|
36
|
-
import "../filter-value-picker-
|
|
37
|
-
import "../filter-value-picker-datetime-
|
|
33
|
+
import { t as LuzmoEditFilters } from "../edit-filters-B29YfSBe.js";
|
|
34
|
+
import "../filter-expression-picker-D83ya_dt.js";
|
|
35
|
+
import "../data-fields-select-dbn1KG3y.js";
|
|
36
|
+
import "../filter-value-picker-B2BjJuIa.js";
|
|
37
|
+
import "../filter-value-picker-datetime-BOheBbvB.js";
|
|
38
38
|
import "../utils-MKWG2xEp.js";
|
|
39
|
-
import "../filter-value-picker-hierarchy-
|
|
40
|
-
import "../filter-value-picker-numeric-
|
|
41
|
-
import "../filter-item-
|
|
39
|
+
import "../filter-value-picker-hierarchy-Cwq8GLp4.js";
|
|
40
|
+
import "../filter-value-picker-numeric-CHFRRe1f.js";
|
|
41
|
+
import "../filter-item-BdnrbMUW.js";
|
|
42
42
|
export { LuzmoEditFilters };
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
20
|
import { t as __decorate } from "./decorate-Da6S_xrw.js";
|
|
21
|
-
import { t as LocalizedMixin } from "./localized-mixin-
|
|
21
|
+
import { t as LocalizedMixin } from "./localized-mixin-CgQFYGOU.js";
|
|
22
|
+
import { luzmoPlus, luzmoTrashOutline } from "@luzmo/icons";
|
|
22
23
|
import { html, unsafeCSS } from "lit";
|
|
23
24
|
import { property, state } from "lit/decorators.js";
|
|
24
25
|
import { localized, msg } from "@lit/localize";
|
|
25
|
-
import { luzmoPlus, luzmoTrashOutline } from "@luzmo/icons";
|
|
26
26
|
import { repeat } from "lit/directives/repeat.js";
|
|
27
27
|
import "@luzmo/lucero/icon";
|
|
28
28
|
import "@luzmo/lucero/action-button";
|
|
@@ -155,7 +155,9 @@ var edit_filters_module_default = ":host{font-family:var(--luzmo-edit-filters-fo
|
|
|
155
155
|
e.condition = e.condition === "AND" ? "OR" : "AND", this.requestUpdate(), this._sendChangeEvent();
|
|
156
156
|
}
|
|
157
157
|
_addFilter(e) {
|
|
158
|
-
|
|
158
|
+
if (this._isDatasetIdsEmpty) return;
|
|
159
|
+
let x = e;
|
|
160
|
+
x ||= (this._internalFilterGroup ||= this._generateEmptyGroup(), this._internalFilterGroup), x.filters.push(this._generateEmptyFilter()), this.requestUpdate(), this._sendChangeEvent();
|
|
159
161
|
}
|
|
160
162
|
_addSubGroup(e) {
|
|
161
163
|
if (this._isDatasetIdsEmpty) return;
|
|
@@ -185,7 +187,7 @@ var edit_filters_module_default = ":host{font-family:var(--luzmo-edit-filters-fo
|
|
|
185
187
|
let x = this._generateEmptyGroup();
|
|
186
188
|
x.condition = e.condition === "AND" ? "OR" : "AND", x.filters.push(this._generateEmptyFilter()), e.filters.push(x), this._internalFilterGroup = e, this.requestUpdate(), this._sendChangeEvent();
|
|
187
189
|
}
|
|
188
|
-
_renderFilterItem(e, x,
|
|
190
|
+
_renderFilterItem(e, x, S) {
|
|
189
191
|
return html`
|
|
190
192
|
<div class="filter-item-wrapper">
|
|
191
193
|
<div class="filter-item-content">
|
|
@@ -200,13 +202,13 @@ var edit_filters_module_default = ":host{font-family:var(--luzmo-edit-filters-fo
|
|
|
200
202
|
.datasetIds=${this.datasetIds}
|
|
201
203
|
.filter=${e}
|
|
202
204
|
.size=${this.size}
|
|
203
|
-
@luzmo-filter-changed=${this._updateFilter.bind(this, x,
|
|
205
|
+
@luzmo-filter-changed=${this._updateFilter.bind(this, x, S)}
|
|
204
206
|
></luzmo-filter-item>
|
|
205
207
|
<luzmo-action-button
|
|
206
208
|
class="delete-filter-button"
|
|
207
209
|
.size=${this.size}
|
|
208
210
|
quiet
|
|
209
|
-
@click=${this._removeFilter.bind(this, x,
|
|
211
|
+
@click=${this._removeFilter.bind(this, x, S)}
|
|
210
212
|
>
|
|
211
213
|
<luzmo-icon slot="icon" .icon=${luzmoTrashOutline} .size=${this.size}></luzmo-icon>
|
|
212
214
|
</luzmo-action-button>
|
|
@@ -246,8 +248,8 @@ var edit_filters_module_default = ":host{font-family:var(--luzmo-edit-filters-fo
|
|
|
246
248
|
<div class="group-content">
|
|
247
249
|
${C ? html`
|
|
248
250
|
<div class="filters-list">
|
|
249
|
-
${repeat(e.filters, (e, x) => x, (x,
|
|
250
|
-
${this._isGroup(x) ? this._renderGroup(x, !0) : this._renderFilterItem(x, e,
|
|
251
|
+
${repeat(e.filters, (e, x) => x, (x, S) => html`
|
|
252
|
+
${this._isGroup(x) ? this._renderGroup(x, !0) : this._renderFilterItem(x, e, S)}
|
|
251
253
|
`)}
|
|
252
254
|
</div>
|
|
253
255
|
` : ""}
|
|
@@ -311,25 +313,14 @@ var edit_filters_module_default = ":host{font-family:var(--luzmo-edit-filters-fo
|
|
|
311
313
|
</div>
|
|
312
314
|
</div>
|
|
313
315
|
`;
|
|
314
|
-
if (!this._internalFilterGroup) return html`
|
|
315
|
-
<div class="filter-group-container">
|
|
316
|
-
<luzmo-action-button
|
|
317
|
-
class="add-filter-group-button"
|
|
318
|
-
?disabled=${this._isDatasetIdsEmpty}
|
|
319
|
-
@click=${this._addGroup}
|
|
320
|
-
>
|
|
321
|
-
${msg("Add filter group", { desc: "Add filter group button label" })}
|
|
322
|
-
</luzmo-action-button>
|
|
323
|
-
</div>
|
|
324
|
-
`;
|
|
325
|
-
if (!(this._internalFilterGroup.filters.length > 0)) return html`
|
|
316
|
+
if (!this._internalFilterGroup || this._internalFilterGroup.filters.length === 0) return html`
|
|
326
317
|
<div class="filter-group-container">
|
|
327
318
|
<luzmo-button
|
|
328
319
|
class="add-filter-button"
|
|
329
320
|
.size=${this.size}
|
|
330
321
|
treatment="outline"
|
|
331
322
|
?disabled=${this._isDatasetIdsEmpty}
|
|
332
|
-
@click=${this._addFilter
|
|
323
|
+
@click=${() => this._addFilter()}
|
|
333
324
|
>
|
|
334
325
|
<luzmo-icon slot="icon" .icon=${luzmoPlus} .size=${this._oneSizeSmaller}></luzmo-icon>
|
|
335
326
|
${msg("Add filter", { desc: "Add filter button label" })}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
const e=require(`./chunk-350yNsax.cjs`),t=require(`./decorate-Dq4-zbi1.cjs`),n=require(`./localized-mixin-DTvVLuXW.cjs`);let r=require(`lit`),i=require(`lit/decorators.js`),a=require(`@lit/localize`),o=require(`@luzmo/icons`),s=require(`lit/directives/repeat.js`);require(`@luzmo/lucero/icon`),require(`@luzmo/lucero/action-button`),require(`@luzmo/lucero/button`);let c=require(`@luzmo/lucero/utils`);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:e.condition?.toLowerCase()===`or`?`or`:`and`,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:e.condition===`or`?`OR`:`AND`,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-edit-filters-font-family,var(--luzmo-font-family));color:var(--luzmo-edit-filters-font-color,var(--luzmo-font-color));max-width:100%;display:block}.filter-group-container{max-width:100%;overflow:hidden}.filter-group{flex-direction:row;min-width:0;max-width:100%;display:flex}.filter-group.nested{margin-top:var(--luzmo-edit-filters-nested-group-margin-top,var(--edit-filters-nested-group-margin-top));margin-bottom:var(--luzmo-edit-filters-nested-group-margin-bottom,var(--edit-filters-nested-group-margin-bottom))}.group-content{flex-direction:column;flex:1;min-width:0;display:flex}.filters-list{gap:var(--luzmo-edit-filters-filters-list-gap,var(--edit-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-edit-filters-filter-line-gap,var(--edit-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-edit-filters-condition-warpper-width,var(--edit-filters-condition-warpper-width));justify-content:center;align-items:center;display:flex;position:relative}.condition-wrapper:before{content:"";left:50%;top:var(--luzmo-edit-filters-vertical-line-top,var(--edit-filters-vertical-line-top));bottom:var(--luzmo-edit-filters-vertical-line-bottom,var(--edit-filters-vertical-line-bottom));width:var(--luzmo-edit-filters-vertical-line-width,var(--edit-filters-vertical-line-width));background:var(--luzmo-edit-filters-vertical-line-color,var(--luzmo-border-color));position:absolute}.condition-badge{min-width:auto;padding-inline:var(--luzmo-edit-filters-condition-padding-horizontal,var(--edit-filters-condition-padding-horizontal));text-transform:uppercase;background:var(--luzmo-edit-filters-condition-badge-background,var(--luzmo-primary));color:var(--luzmo-edit-filters-condition-badge-color,var(--luzmo-primary-inverse-color));border-radius:var(--luzmo-edit-filters-condition-badge-border-radius,var(--luzmo-border-radius));box-shadow:0 0 0 var(--luzmo-edit-filters-condition-badge-halo,var(--edit-filters-condition-badge-halo))var(--luzmo-edit-filters-condition-badge-background,var(--luzmo-background-color));font-weight:700}.condition-badge:hover{background:var(--luzmo-edit-filters-condition-badge-background-hover,var(--luzmo-primary-hover))}.group-actions{margin-top:var(--luzmo-edit-filters-group-actions-margin-top,var(--edit-filters-group-actions-margin-top));gap:var(--luzmo-edit-filters-group-actions-gap,var(--edit-filters-group-actions-gap));flex-wrap:wrap;display:flex}.delete-group-button{margin-left:auto}.add-root-group-container{margin-top:var(--luzmo-edit-filters-add-root-group-container-margin-top,var(--edit-filters-add-root-group-container-margin-top));padding-left:0}.add-subgroup-button,.add-filter-button{--luzmo-action-button-text-to-visual:var(--luzmo-edit-filters-group-actions-text-to-visual,var(--edit-filters-group-actions-text-to-visual));--luzmo-action-button-content-color-default:var(--luzmo-edit-filters-group-actions-color,var(--luzmo-primary-hover));--luzmo-action-button-content-color-hover:var(--luzmo-edit-filters-group-actions-color-hover,var(--luzmo-primary-hover));--luzmo-action-button-content-color-down:var(--luzmo-edit-filters-group-actions-color-down,var(--luzmo-primary-down));--luzmo-action-button-content-color-focus:var(--luzmo-edit-filters-group-actions-color-focus,var(--luzmo-primary-focus))}.add-group-button{--luzmo-button-padding-label-to-icon:var(--luzmo-edit-filters-add-group-button-text-to-visual,var(--edit-filters-add-group-button-text-to-visual))}.dataset-ids-empty-message{color:var(--luzmo-edit-filters-error-message-color,var(--luzmo-disabled-color));font-size:var(--luzmo-edit-filters-error-message-font-size,var(--edit-filters-font-size))}:host{--edit-filters-condition-warpper-width:56px;--edit-filters-condition-padding-horizontal:var(--luzmo-spacing-2);--edit-filters-condition-badge-halo:var(--luzmo-spacing-3);--edit-filters-filters-list-gap:var(--luzmo-spacing-3);--edit-filters-nested-group-margin-top:var(--luzmo-spacing-3);--edit-filters-nested-group-margin-bottom:var(--luzmo-spacing-3);--edit-filters-vertical-line-top:var(--luzmo-spacing-2);--edit-filters-vertical-line-bottom:var(--luzmo-spacing-2);--edit-filters-vertical-line-width:1px;--edit-filters-group-actions-text-to-visual:var(--luzmo-spacing-2);--edit-filters-add-group-button-text-to-visual:var(--luzmo-spacing-3);--edit-filters-group-actions-gap:var(--luzmo-spacing-3);--edit-filters-add-root-group-container-margin-top:var(--luzmo-spacing-4);--edit-filters-filter-line-gap:var(--luzmo-spacing-3);--edit-filters-group-actions-margin-top:var(--luzmo-spacing-3);--edit-filters-error-message-font-size:var(--luzmo-font-size)}:host([size=s]){--edit-filters-condition-warpper-width:48px;--edit-filters-condition-padding-horizontal:var(--luzmo-spacing-2);--edit-filters-condition-badge-halo:var(--luzmo-spacing-2);--edit-filters-filters-list-gap:calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1));--edit-filters-nested-group-margin-top:calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1));--edit-filters-nested-group-margin-bottom:calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1));--edit-filters-vertical-line-top:var(--luzmo-spacing-2);--edit-filters-vertical-line-bottom:var(--luzmo-spacing-2);--edit-filters-group-actions-text-to-visual:var(--luzmo-spacing-1);--edit-filters-add-group-button-text-to-visual:var(--luzmo-spacing-2);--edit-filters-group-actions-gap:var(--luzmo-spacing-2);--edit-filters-add-root-group-container-margin-top:var(--luzmo-spacing-3);--edit-filters-filter-line-gap:var(--luzmo-spacing-2);--edit-filters-group-actions-margin-top:var(--luzmo-spacing-2);--edit-filters-error-message-font-size:var(--luzmo-font-size-s)}:host([size=l]){--edit-filters-condition-warpper-width:64px;--edit-filters-condition-padding-horizontal:var(--luzmo-spacing-3);--edit-filters-condition-badge-halo:var(--luzmo-spacing-4);--edit-filters-filters-list-gap:var(--luzmo-spacing-4);--edit-filters-nested-group-margin-top:var(--luzmo-spacing-4);--edit-filters-nested-group-margin-bottom:var(--luzmo-spacing-4);--edit-filters-vertical-line-top:var(--luzmo-spacing-3);--edit-filters-vertical-line-bottom:var(--luzmo-spacing-3);--edit-filters-group-actions-text-to-visual:var(--luzmo-spacing-2);--edit-filters-add-group-button-text-to-visual:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--edit-filters-group-actions-gap:var(--luzmo-spacing-3);--edit-filters-add-root-group-container-margin-top:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--edit-filters-filter-line-gap:var(--luzmo-spacing-3);--edit-filters-group-actions-margin-top:var(--luzmo-spacing-3);--edit-filters-error-message-font-size:var(--luzmo-font-size-l)}:host([size=xl]){--edit-filters-condition-warpper-width:72px;--edit-filters-condition-padding-horizontal:var(--luzmo-spacing-3);--edit-filters-condition-badge-halo:var(--luzmo-spacing-4);--edit-filters-filters-list-gap:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--edit-filters-nested-group-margin-top:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--edit-filters-nested-group-margin-bottom:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--edit-filters-vertical-line-top:var(--luzmo-spacing-3);--edit-filters-vertical-line-bottom:var(--luzmo-spacing-3);--edit-filters-group-actions-text-to-visual:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--edit-filters-add-group-button-text-to-visual:var(--luzmo-spacing-4);--edit-filters-group-actions-gap:var(--luzmo-spacing-4);--edit-filters-add-root-group-container-margin-top:var(--luzmo-spacing-5);--edit-filters-filter-line-gap:var(--luzmo-spacing-4);--edit-filters-group-actions-margin-top:var(--luzmo-spacing-4);--edit-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`})},b=class extends n.t((0,c.SizedMixin)(c.LuzmoElement,{validSizes:Object.values(c.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=e.condition===`AND`?`OR`:`AND`,this.requestUpdate(),this._sendChangeEvent()}_addFilter(e){this._isDatasetIdsEmpty||(e.filters.push(this._generateEmptyFilter()),this.requestUpdate(),this._sendChangeEvent())}_addSubGroup(e){if(this._isDatasetIdsEmpty)return;let t=this._generateEmptyGroup();t.condition=e.condition===`AND`?`OR`:`AND`,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=this._internalFilterGroup.condition===`AND`?`OR`:`AND`,e.filters.push(this._internalFilterGroup);let t=this._generateEmptyGroup();t.condition=e.condition===`AND`?`OR`:`AND`,t.filters.push(this._generateEmptyFilter()),e.filters.push(t),this._internalFilterGroup=e,this.requestUpdate(),this._sendChangeEvent()}_renderFilterItem(e,t,n){return r.html`
|
|
20
|
+
const e=require(`./chunk-350yNsax.cjs`),t=require(`./decorate-Dq4-zbi1.cjs`),n=require(`./localized-mixin-BmZhC9XV.cjs`);let r=require(`@luzmo/icons`),i=require(`lit`),a=require(`lit/decorators.js`),o=require(`@lit/localize`),s=require(`lit/directives/repeat.js`);require(`@luzmo/lucero/icon`),require(`@luzmo/lucero/action-button`),require(`@luzmo/lucero/button`);let c=require(`@luzmo/lucero/utils`);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:e.condition?.toLowerCase()===`or`?`or`:`and`,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:e.condition===`or`?`OR`:`AND`,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-edit-filters-font-family,var(--luzmo-font-family));color:var(--luzmo-edit-filters-font-color,var(--luzmo-font-color));max-width:100%;display:block}.filter-group-container{max-width:100%;overflow:hidden}.filter-group{flex-direction:row;min-width:0;max-width:100%;display:flex}.filter-group.nested{margin-top:var(--luzmo-edit-filters-nested-group-margin-top,var(--edit-filters-nested-group-margin-top));margin-bottom:var(--luzmo-edit-filters-nested-group-margin-bottom,var(--edit-filters-nested-group-margin-bottom))}.group-content{flex-direction:column;flex:1;min-width:0;display:flex}.filters-list{gap:var(--luzmo-edit-filters-filters-list-gap,var(--edit-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-edit-filters-filter-line-gap,var(--edit-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-edit-filters-condition-warpper-width,var(--edit-filters-condition-warpper-width));justify-content:center;align-items:center;display:flex;position:relative}.condition-wrapper:before{content:"";left:50%;top:var(--luzmo-edit-filters-vertical-line-top,var(--edit-filters-vertical-line-top));bottom:var(--luzmo-edit-filters-vertical-line-bottom,var(--edit-filters-vertical-line-bottom));width:var(--luzmo-edit-filters-vertical-line-width,var(--edit-filters-vertical-line-width));background:var(--luzmo-edit-filters-vertical-line-color,var(--luzmo-border-color));position:absolute}.condition-badge{min-width:auto;padding-inline:var(--luzmo-edit-filters-condition-padding-horizontal,var(--edit-filters-condition-padding-horizontal));text-transform:uppercase;background:var(--luzmo-edit-filters-condition-badge-background,var(--luzmo-primary));color:var(--luzmo-edit-filters-condition-badge-color,var(--luzmo-primary-inverse-color));border-radius:var(--luzmo-edit-filters-condition-badge-border-radius,var(--luzmo-border-radius));box-shadow:0 0 0 var(--luzmo-edit-filters-condition-badge-halo,var(--edit-filters-condition-badge-halo))var(--luzmo-edit-filters-condition-badge-background,var(--luzmo-background-color));font-weight:700}.condition-badge:hover{background:var(--luzmo-edit-filters-condition-badge-background-hover,var(--luzmo-primary-hover))}.group-actions{margin-top:var(--luzmo-edit-filters-group-actions-margin-top,var(--edit-filters-group-actions-margin-top));gap:var(--luzmo-edit-filters-group-actions-gap,var(--edit-filters-group-actions-gap));flex-wrap:wrap;display:flex}.delete-group-button{margin-left:auto}.add-root-group-container{margin-top:var(--luzmo-edit-filters-add-root-group-container-margin-top,var(--edit-filters-add-root-group-container-margin-top));padding-left:0}.add-subgroup-button,.add-filter-button{--luzmo-action-button-text-to-visual:var(--luzmo-edit-filters-group-actions-text-to-visual,var(--edit-filters-group-actions-text-to-visual));--luzmo-action-button-content-color-default:var(--luzmo-edit-filters-group-actions-color,var(--luzmo-primary-hover));--luzmo-action-button-content-color-hover:var(--luzmo-edit-filters-group-actions-color-hover,var(--luzmo-primary-hover));--luzmo-action-button-content-color-down:var(--luzmo-edit-filters-group-actions-color-down,var(--luzmo-primary-down));--luzmo-action-button-content-color-focus:var(--luzmo-edit-filters-group-actions-color-focus,var(--luzmo-primary-focus))}.add-group-button{--luzmo-button-padding-label-to-icon:var(--luzmo-edit-filters-add-group-button-text-to-visual,var(--edit-filters-add-group-button-text-to-visual))}.dataset-ids-empty-message{color:var(--luzmo-edit-filters-error-message-color,var(--luzmo-disabled-color));font-size:var(--luzmo-edit-filters-error-message-font-size,var(--edit-filters-font-size))}:host{--edit-filters-condition-warpper-width:56px;--edit-filters-condition-padding-horizontal:var(--luzmo-spacing-2);--edit-filters-condition-badge-halo:var(--luzmo-spacing-3);--edit-filters-filters-list-gap:var(--luzmo-spacing-3);--edit-filters-nested-group-margin-top:var(--luzmo-spacing-3);--edit-filters-nested-group-margin-bottom:var(--luzmo-spacing-3);--edit-filters-vertical-line-top:var(--luzmo-spacing-2);--edit-filters-vertical-line-bottom:var(--luzmo-spacing-2);--edit-filters-vertical-line-width:1px;--edit-filters-group-actions-text-to-visual:var(--luzmo-spacing-2);--edit-filters-add-group-button-text-to-visual:var(--luzmo-spacing-3);--edit-filters-group-actions-gap:var(--luzmo-spacing-3);--edit-filters-add-root-group-container-margin-top:var(--luzmo-spacing-4);--edit-filters-filter-line-gap:var(--luzmo-spacing-3);--edit-filters-group-actions-margin-top:var(--luzmo-spacing-3);--edit-filters-error-message-font-size:var(--luzmo-font-size)}:host([size=s]){--edit-filters-condition-warpper-width:48px;--edit-filters-condition-padding-horizontal:var(--luzmo-spacing-2);--edit-filters-condition-badge-halo:var(--luzmo-spacing-2);--edit-filters-filters-list-gap:calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1));--edit-filters-nested-group-margin-top:calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1));--edit-filters-nested-group-margin-bottom:calc(var(--luzmo-spacing-2) + var(--luzmo-spacing-1));--edit-filters-vertical-line-top:var(--luzmo-spacing-2);--edit-filters-vertical-line-bottom:var(--luzmo-spacing-2);--edit-filters-group-actions-text-to-visual:var(--luzmo-spacing-1);--edit-filters-add-group-button-text-to-visual:var(--luzmo-spacing-2);--edit-filters-group-actions-gap:var(--luzmo-spacing-2);--edit-filters-add-root-group-container-margin-top:var(--luzmo-spacing-3);--edit-filters-filter-line-gap:var(--luzmo-spacing-2);--edit-filters-group-actions-margin-top:var(--luzmo-spacing-2);--edit-filters-error-message-font-size:var(--luzmo-font-size-s)}:host([size=l]){--edit-filters-condition-warpper-width:64px;--edit-filters-condition-padding-horizontal:var(--luzmo-spacing-3);--edit-filters-condition-badge-halo:var(--luzmo-spacing-4);--edit-filters-filters-list-gap:var(--luzmo-spacing-4);--edit-filters-nested-group-margin-top:var(--luzmo-spacing-4);--edit-filters-nested-group-margin-bottom:var(--luzmo-spacing-4);--edit-filters-vertical-line-top:var(--luzmo-spacing-3);--edit-filters-vertical-line-bottom:var(--luzmo-spacing-3);--edit-filters-group-actions-text-to-visual:var(--luzmo-spacing-2);--edit-filters-add-group-button-text-to-visual:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--edit-filters-group-actions-gap:var(--luzmo-spacing-3);--edit-filters-add-root-group-container-margin-top:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--edit-filters-filter-line-gap:var(--luzmo-spacing-3);--edit-filters-group-actions-margin-top:var(--luzmo-spacing-3);--edit-filters-error-message-font-size:var(--luzmo-font-size-l)}:host([size=xl]){--edit-filters-condition-warpper-width:72px;--edit-filters-condition-padding-horizontal:var(--luzmo-spacing-3);--edit-filters-condition-badge-halo:var(--luzmo-spacing-4);--edit-filters-filters-list-gap:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--edit-filters-nested-group-margin-top:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--edit-filters-nested-group-margin-bottom:calc(var(--luzmo-spacing-4) + var(--luzmo-spacing-1));--edit-filters-vertical-line-top:var(--luzmo-spacing-3);--edit-filters-vertical-line-bottom:var(--luzmo-spacing-3);--edit-filters-group-actions-text-to-visual:calc(var(--luzmo-spacing-3) + var(--luzmo-spacing-1));--edit-filters-add-group-button-text-to-visual:var(--luzmo-spacing-4);--edit-filters-group-actions-gap:var(--luzmo-spacing-4);--edit-filters-add-root-group-container-margin-top:var(--luzmo-spacing-5);--edit-filters-filter-line-gap:var(--luzmo-spacing-4);--edit-filters-group-actions-margin-top:var(--luzmo-spacing-4);--edit-filters-error-message-font-size:var(--luzmo-font-size-xl)}`,y={AND:()=>(0,o.msg)(`AND`,{desc:`Logical AND condition for combining filters`}),OR:()=>(0,o.msg)(`OR`,{desc:`Logical OR condition for combining filters`})},b=class extends n.t((0,c.SizedMixin)(c.LuzmoElement,{validSizes:Object.values(c.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,i.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=e.condition===`AND`?`OR`:`AND`,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=e.condition===`AND`?`OR`:`AND`,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=this._internalFilterGroup.condition===`AND`?`OR`:`AND`,e.filters.push(this._internalFilterGroup);let t=this._generateEmptyGroup();t.condition=e.condition===`AND`?`OR`:`AND`,t.filters.push(this._generateEmptyFilter()),e.filters.push(t),this._internalFilterGroup=e,this.requestUpdate(),this._sendChangeEvent()}_renderFilterItem(e,t,n){return i.html`
|
|
21
21
|
<div class="filter-item-wrapper">
|
|
22
22
|
<div class="filter-item-content">
|
|
23
23
|
<luzmo-filter-item
|
|
@@ -39,15 +39,15 @@ const e=require(`./chunk-350yNsax.cjs`),t=require(`./decorate-Dq4-zbi1.cjs`),n=r
|
|
|
39
39
|
quiet
|
|
40
40
|
@click=${this._removeFilter.bind(this,t,n)}
|
|
41
41
|
>
|
|
42
|
-
<luzmo-icon slot="icon" .icon=${
|
|
42
|
+
<luzmo-icon slot="icon" .icon=${r.luzmoTrashOutline} .size=${this.size}></luzmo-icon>
|
|
43
43
|
</luzmo-action-button>
|
|
44
44
|
</div>
|
|
45
45
|
</div>
|
|
46
|
-
`}_renderGroup(e,t=!1){let n=e.filters.length>0,
|
|
46
|
+
`}_renderGroup(e,t=!1){let n=e.filters.length>0,a=e.filters.length>1,c=y[e.condition]?.()??e.condition;return i.html`
|
|
47
47
|
<div class="filter-group ${t?`nested`:``}">
|
|
48
|
-
${t?
|
|
48
|
+
${t?i.html`
|
|
49
49
|
<div class="condition-wrapper">
|
|
50
|
-
${i
|
|
50
|
+
${a?i.html`
|
|
51
51
|
<luzmo-action-button
|
|
52
52
|
class="condition-badge"
|
|
53
53
|
.size=${this._oneSizeSmaller}
|
|
@@ -58,7 +58,7 @@ const e=require(`./chunk-350yNsax.cjs`),t=require(`./decorate-Dq4-zbi1.cjs`),n=r
|
|
|
58
58
|
</luzmo-action-button>
|
|
59
59
|
`:``}
|
|
60
60
|
</div>
|
|
61
|
-
`:i
|
|
61
|
+
`:a?i.html`
|
|
62
62
|
<div class="condition-wrapper">
|
|
63
63
|
<luzmo-action-button
|
|
64
64
|
class="condition-badge"
|
|
@@ -71,9 +71,9 @@ const e=require(`./chunk-350yNsax.cjs`),t=require(`./decorate-Dq4-zbi1.cjs`),n=r
|
|
|
71
71
|
</div>
|
|
72
72
|
`:``}
|
|
73
73
|
<div class="group-content">
|
|
74
|
-
${n?
|
|
74
|
+
${n?i.html`
|
|
75
75
|
<div class="filters-list">
|
|
76
|
-
${(0,s.repeat)(e.filters,(e,t)=>t,(t,n)=>
|
|
76
|
+
${(0,s.repeat)(e.filters,(e,t)=>t,(t,n)=>i.html`
|
|
77
77
|
${this._isGroup(t)?this._renderGroup(t,!0):this._renderFilterItem(t,e,n)}
|
|
78
78
|
`)}
|
|
79
79
|
</div>
|
|
@@ -87,8 +87,8 @@ const e=require(`./chunk-350yNsax.cjs`),t=require(`./decorate-Dq4-zbi1.cjs`),n=r
|
|
|
87
87
|
?disabled=${this._isDatasetIdsEmpty}
|
|
88
88
|
@click=${this._addFilter.bind(this,e)}
|
|
89
89
|
>
|
|
90
|
-
<luzmo-icon slot="icon" .icon=${
|
|
91
|
-
${(0,
|
|
90
|
+
<luzmo-icon slot="icon" .icon=${r.luzmoPlus} .size=${this._oneSizeSmaller}></luzmo-icon>
|
|
91
|
+
${(0,o.msg)(`Filter`,{desc:`Add filter button label`})}
|
|
92
92
|
</luzmo-action-button>
|
|
93
93
|
|
|
94
94
|
<luzmo-action-button
|
|
@@ -98,46 +98,36 @@ const e=require(`./chunk-350yNsax.cjs`),t=require(`./decorate-Dq4-zbi1.cjs`),n=r
|
|
|
98
98
|
?disabled=${this._isDatasetIdsEmpty}
|
|
99
99
|
@click=${this._addSubGroup.bind(this,e)}
|
|
100
100
|
>
|
|
101
|
-
<luzmo-icon slot="icon" .icon=${
|
|
102
|
-
${(0,
|
|
101
|
+
<luzmo-icon slot="icon" .icon=${r.luzmoPlus} .size=${this._oneSizeSmaller}></luzmo-icon>
|
|
102
|
+
${(0,o.msg)(`Subgroup`,{desc:`Add subgroup button label`})}
|
|
103
103
|
</luzmo-action-button>
|
|
104
104
|
</div>
|
|
105
105
|
</div>
|
|
106
106
|
</div>
|
|
107
|
-
`}_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
|
|
107
|
+
`}_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 i.html`
|
|
108
108
|
<div class="filter-group-container">
|
|
109
109
|
<div class="dataset-ids-empty-message">
|
|
110
|
-
${(0,
|
|
110
|
+
${(0,o.msg)(`Cannot retrieve dataset data fields`,{desc:`Error message when datasetIds is empty`})}
|
|
111
111
|
</div>
|
|
112
112
|
</div>
|
|
113
|
-
`;if(!this._internalFilterGroup)return
|
|
114
|
-
<div class="filter-group-container">
|
|
115
|
-
<luzmo-action-button
|
|
116
|
-
class="add-filter-group-button"
|
|
117
|
-
?disabled=${this._isDatasetIdsEmpty}
|
|
118
|
-
@click=${this._addGroup}
|
|
119
|
-
>
|
|
120
|
-
${(0,a.msg)(`Add filter group`,{desc:`Add filter group button label`})}
|
|
121
|
-
</luzmo-action-button>
|
|
122
|
-
</div>
|
|
123
|
-
`;if(!(this._internalFilterGroup.filters.length>0))return r.html`
|
|
113
|
+
`;if(!this._internalFilterGroup||this._internalFilterGroup.filters.length===0)return i.html`
|
|
124
114
|
<div class="filter-group-container">
|
|
125
115
|
<luzmo-button
|
|
126
116
|
class="add-filter-button"
|
|
127
117
|
.size=${this.size}
|
|
128
118
|
treatment="outline"
|
|
129
119
|
?disabled=${this._isDatasetIdsEmpty}
|
|
130
|
-
@click=${this._addFilter
|
|
120
|
+
@click=${()=>this._addFilter()}
|
|
131
121
|
>
|
|
132
|
-
<luzmo-icon slot="icon" .icon=${
|
|
133
|
-
${(0,
|
|
122
|
+
<luzmo-icon slot="icon" .icon=${r.luzmoPlus} .size=${this._oneSizeSmaller}></luzmo-icon>
|
|
123
|
+
${(0,o.msg)(`Add filter`,{desc:`Add filter button label`})}
|
|
134
124
|
</luzmo-button>
|
|
135
125
|
</div>
|
|
136
|
-
`;let e=this._internalFilterGroup.filters.length>1;return
|
|
126
|
+
`;let e=this._internalFilterGroup.filters.length>1;return i.html`
|
|
137
127
|
<div class="filter-group-container">
|
|
138
128
|
${this._renderGroup(this._internalFilterGroup)}
|
|
139
129
|
|
|
140
|
-
${e?
|
|
130
|
+
${e?i.html`
|
|
141
131
|
<div class="add-root-group-container">
|
|
142
132
|
<luzmo-button
|
|
143
133
|
class="add-group-button"
|
|
@@ -146,10 +136,10 @@ const e=require(`./chunk-350yNsax.cjs`),t=require(`./decorate-Dq4-zbi1.cjs`),n=r
|
|
|
146
136
|
?disabled=${this._isDatasetIdsEmpty}
|
|
147
137
|
@click=${this._addGroup}
|
|
148
138
|
>
|
|
149
|
-
<luzmo-icon slot="icon" .icon=${
|
|
150
|
-
${(0,
|
|
139
|
+
<luzmo-icon slot="icon" .icon=${r.luzmoPlus} .size=${this._oneSizeSmaller}></luzmo-icon>
|
|
140
|
+
${(0,o.msg)(`Group`,{desc:`Add group button label`})}
|
|
151
141
|
</luzmo-button>
|
|
152
142
|
</div>
|
|
153
143
|
`:``}
|
|
154
144
|
</div>
|
|
155
|
-
`}};t.t([(0,
|
|
145
|
+
`}};t.t([(0,a.property)({type:String,attribute:`api-url`,reflect:!0})],b.prototype,`apiUrl`,void 0),t.t([(0,a.property)({type:String,attribute:`auth-key`,reflect:!0})],b.prototype,`authKey`,void 0),t.t([(0,a.property)({type:String,attribute:`auth-token`,reflect:!0})],b.prototype,`authToken`,void 0),t.t([(0,a.property)({type:Number,attribute:`cache-time`,reflect:!0})],b.prototype,`cacheTime`,void 0),t.t([(0,a.property)({type:String,attribute:`content-language`,reflect:!0})],b.prototype,`contentLanguage`,void 0),t.t([(0,a.property)({type:String,attribute:`time-zone`,reflect:!0})],b.prototype,`timeZone`,void 0),t.t([(0,a.property)({type:Array,attribute:`dataset-ids`,reflect:!0})],b.prototype,`datasetIds`,void 0),t.t([(0,a.property)({type:Array,reflect:!1})],b.prototype,`filters`,void 0),t.t([(0,a.property)({type:Number,reflect:!0})],b.prototype,`debounce`,void 0),t.t([(0,a.state)()],b.prototype,`_internalFilterGroup`,void 0),b=t.t([(0,o.localized)()],b),customElements.get(`luzmo-edit-filters`)||customElements.define(`luzmo-edit-filters`,b),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return b}});
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
18
18
|
* SOFTWARE.
|
|
19
19
|
* */
|
|
20
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../base-C_azywlB.cjs`),require(`../focus-visible-3ACCHno4.cjs`),require(`../set-locale-
|
|
20
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../base-C_azywlB.cjs`),require(`../focus-visible-3ACCHno4.cjs`),require(`../set-locale-DjOkyNGu.cjs`),require(`../localized-mixin-BmZhC9XV.cjs`),require(`../data-broker-BUIUM5hr.cjs`),require(`../edit-option-CAqIUpWx.cjs`);const e=require(`../edit-item-C89gy9JF.cjs`);exports.LuzmoEditItem=e.t;
|