@luzmo/analytics-components-kit 1.0.1-alpha.50 → 1.0.1-alpha.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/components/display-settings/display-settings.d.ts +1 -0
  2. package/components/display-settings/index.cjs +1 -1
  3. package/components/display-settings/index.js +1 -1
  4. package/components/display-settings-numeric/helpers/constants.d.ts +1 -0
  5. package/components/display-settings-numeric/index.cjs +16 -10
  6. package/components/display-settings-numeric/index.js +52 -34
  7. package/components/draggable-data-item/draggable-data-item.d.ts +0 -1
  8. package/components/draggable-data-item/index.cjs +5 -8
  9. package/components/draggable-data-item/index.js +32 -38
  10. package/components/draggable-data-item-level/draggable-data-item-level.d.ts +1 -1
  11. package/components/draggable-data-item-level/index.cjs +6 -6
  12. package/components/draggable-data-item-level/index.js +106 -113
  13. package/components/droppable-slot/droppable-slot.d.ts +6 -1
  14. package/components/droppable-slot/index.cjs +14 -12
  15. package/components/droppable-slot/index.js +186 -160
  16. package/components/filter-item/index.cjs +1 -1
  17. package/components/filter-item/index.js +1 -1
  18. package/components/filter-value-picker-hierarchy/index.cjs +1 -1
  19. package/components/filter-value-picker-hierarchy/index.js +1 -1
  20. package/components/filter-value-picker-numeric/index.cjs +1 -1
  21. package/components/filter-value-picker-numeric/index.js +1 -1
  22. package/components/{index-DAoFunRy.cjs → index-3X8Iuo7y.cjs} +11 -11
  23. package/components/{index-Delpl7qa.js → index-Cyo2hwg7.js} +1 -1
  24. package/components/{index-eBsINoH9.cjs → index-DpHum3lw.cjs} +1 -1
  25. package/components/{index-Ct7UvUif.js → index-fmbD10nN.js} +123 -109
  26. package/components/index.cjs +1 -1
  27. package/components/index.js +1 -1
  28. package/components/slot-contents-picker/index.cjs +1 -1
  29. package/components/slot-contents-picker/index.js +1 -1
  30. package/components/slot-menu/index.cjs +11 -11
  31. package/components/slot-menu/index.js +186 -171
  32. package/components/slot-menu/slot-menu.d.ts +5 -1
  33. package/components/slot-menu-list/index.cjs +1 -1
  34. package/components/slot-menu-list/index.js +19 -16
  35. package/components/slot-menu-list/slot-menu-list.d.ts +1 -0
  36. package/custom-elements.json +29 -43
  37. package/item-definitions/box-plot/box-plot-options.config.d.ts +1 -1
  38. package/item-definitions/choropleth-map/choropleth-map-options.config.d.ts +1 -1
  39. package/item-definitions/hexbin-map/hexbin-map-options.config.d.ts +1 -1
  40. package/item-definitions/route-map/route-map-options.config.d.ts +1 -1
  41. package/item-definitions/spike-map/spike-map-options.config.d.ts +1 -1
  42. package/package.json +1 -1
  43. package/utils/data-broker/index.d.ts +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
- import { L as p } from "./index-Ct7UvUif.js";
20
+ import { L as p } from "./index-fmbD10nN.js";
21
21
  import { LuzmoDisplaySettingsBinning as u } from "./display-settings-binning/index.js";
22
22
  import { LuzmoDisplaySettingsDatetime as n } from "./display-settings-datetime/index.js";
23
23
  import { LuzmoDisplaySettingsGrandTotals as s } from "./display-settings-grand-totals/index.js";
@@ -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
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../set-locale-DCPlazsZ.cjs"),v=require("../localized-decorator-DIXYZ3RL.cjs"),C=require("../task-CwmAXlv0.cjs"),u=require("../luzmo-icons-DonyjSXg.cjs");require("../index-Dy_5M3M5.cjs");require("../index-j8UKjHqY.cjs");require("../index-CUvucmA0.cjs");require("../index-1oIrlkAr.cjs");require("../index-CYeQkVeJ.cjs");const f=require("../calculate-data-item-icon-Dn-9Kd0U.cjs"),z=require("../localize-r7ALOUy_.cjs"),n=require("../property-Cu4Q1hS4.cjs"),y=require("../state-fyl3IYMu.cjs"),S=require("../focusable-DAGGGYyz.cjs"),b=require("../sized-mixin-j_7aJM4b.cjs");require("../index-DAoFunRy.cjs");require("../slot-menu/index.cjs");const _=":host{font-family:var(--luzmo-slot-contents-picker-font-family, var(--luzmo-font-family))}.container{width:fit-content;display:flex;flex-direction:column;gap:var(--luzmo-slot-contents-picker-gap, var(--slot-contents-picker-gap, var(--luzmo-spacing-5)))}.select-container{display:flex;align-items:center}:host([stretch]) .container{width:100%}:host([stretch]) .select-container{width:100%}:host([stretch]) luzmo-select{flex-grow:1}.extra-data-item-button-container{display:flex;align-items:center;justify-content:center}.slot-contents-picker-label{font-size:var(--luzmo-slot-contents-picker-label-font-size, var(--slot-contents-picker-label-font-size));flex-grow:1;margin-right:var(--luzmo-slot-contents-picker-text-to-controls, var(--slot-contents-picker-text-to-controls));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.controls{height:100%;display:flex;align-items:center;gap:var(--luzmo-slot-contents-picker-controls-gap, var(--slot-contents-picker-controls-gap));background-color:var(--luzmo-slot-contents-picker-controls-background-color, var(--slot-contents-picker-controls-background-color));color:var(--luzmo-slot-contents-picker-controls-color, var(--slot-contents-picker-controls-color));margin-right:var(--luzmo-slot-contents-picker-controls-to-edge, var(--slot-contents-picker-controls-to-edge));padding:0 var(--luzmo-slot-contents-picker-controls-horizontal-padding, var(--slot-contents-picker-controls-horizontal-padding))}.controls div{cursor:pointer;height:100%;display:flex;align-items:center;padding:0 var(--luzmo-slot-contents-picker-controls-control-horizontal-padding, var(--slot-contents-picker-controls-control-horizontal-padding))}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-slot-contents-picker-overlay-vertical-gap, var(--slot-contents-picker-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-slot-contents-picker-overlay-horizontal-gap, var(--slot-contents-picker-overlay-horizontal-gap))}:host{--slot-contents-picker-border-width: var(--luzmo-border-width);--slot-contents-picker-border-style: dashed;--slot-contents-picker-border-color: var(--luzmo-border-color);--slot-contents-picker-accept-drag-controls-background-color: transparent;--slot-contents-picker-font-color: var(--luzmo-font-color);--slot-contents-picker-controls-background-color: transparent;--slot-contents-picker-text-to-controls: var(--luzmo-spacing-3);--slot-contents-picker-controls-to-edge: 0;--slot-contents-picker-controls-gap: var(--luzmo-spacing-2);--slot-contents-picker-controls-horizontal-padding: var(--luzmo-spacing-2);--slot-contents-picker-controls-control-horizontal-padding: var( --luzmo-spacing-3 );--slot-contents-picker-label-font-size: var(--luzmo-font-size)}:host{--slot-contents-picker-horizontal-padding: var(--luzmo-spacing-4);--slot-contents-picker-overlay-horizontal-gap: var(--luzmo-spacing-4);--slot-contents-picker-overlay-vertical-gap: var(--luzmo-spacing-4)}:host([size=s]){--slot-contents-picker-horizontal-padding: var(--luzmo-spacing-4);--slot-contents-picker-overlay-horizontal-gap: var(--luzmo-spacing-4);--slot-contents-picker-overlay-vertical-gap: var(--luzmo-spacing-4)}:host([size=l]){--slot-contents-picker-horizontal-padding: var(--luzmo-spacing-5);--slot-contents-picker-overlay-horizontal-gap: var(--luzmo-spacing-5);--slot-contents-picker-overlay-vertical-gap: var(--luzmo-spacing-5)}:host([size=xl]){--slot-contents-picker-horizontal-padding: var(--luzmo-spacing-5);--slot-contents-picker-overlay-horizontal-gap: var(--luzmo-spacing-5);--slot-contents-picker-overlay-vertical-gap: var(--luzmo-spacing-5)}:host{box-sizing:border-box}";var k=Object.defineProperty,P=Object.getOwnPropertyDescriptor,a=(p,t,e,s)=>{for(var o=s>1?void 0:s?P(t,e):t,r=p.length-1,c;r>=0;r--)(c=p[r])&&(o=(s?c(t,e,o):c(o))||o);return s&&o&&k(t,e,o),o};exports.LuzmoSlotContentsPicker=class extends b.SizedMixin(S.LuzmoElement,{validSizes:["s","m","l","xl"],noDefaultSize:!0}){constructor(){super(...arguments),this._loadSlotsConfig=new C.h(this,{task:async([t])=>{if(t&&t!==this._itemTypeLoaded){const e=Object.assign({"../../item-definitions/area-chart/area-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../area-chart-slots.config-Dx_ysVZK.cjs")),"../../item-definitions/bar-chart/bar-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../bar-chart-slots.config-c_9ABPOI.cjs")),"../../item-definitions/box-plot/box-plot-slots.config.ts":()=>Promise.resolve().then(()=>require("../box-plot-slots.config-K-1CiWO-.cjs")),"../../item-definitions/bubble-chart/bubble-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../bubble-chart-slots.config-BwSwgleO.cjs")),"../../item-definitions/bullet-chart/bullet-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../bullet-chart-slots.config-DQarxMR7.cjs")),"../../item-definitions/choropleth-map/choropleth-map-slots.config.ts":()=>Promise.resolve().then(()=>require("../choropleth-map-slots.config-CFERs0ca.cjs")),"../../item-definitions/circle-pack-chart/circle-pack-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../circle-pack-chart-slots.config-B18aqdH1.cjs")),"../../item-definitions/circular-gauge/circular-gauge-slots.config.ts":()=>Promise.resolve().then(()=>require("../circular-gauge-slots.config-Cd-nkNPm.cjs")),"../../item-definitions/column-chart/column-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../column-chart-slots.config-C0nGjkmv.cjs")),"../../item-definitions/combination-chart/combination-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../combination-chart-slots.config-CY07Q5Hw.cjs")),"../../item-definitions/conditional-number/conditional-number-slots.config.ts":()=>Promise.resolve().then(()=>require("../conditional-number-slots.config-CD5ZwXuY.cjs")),"../../item-definitions/date-filter/date-filter-slots.config.ts":()=>Promise.resolve().then(()=>require("../date-filter-slots.config-CrA5ijD3.cjs")),"../../item-definitions/donut-chart/donut-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../donut-chart-slots.config-DBowIZNO.cjs")),"../../item-definitions/dropdown-filter/dropdown-filter-slots.config.ts":()=>Promise.resolve().then(()=>require("../dropdown-filter-slots.config-0wn6pMvi.cjs")),"../../item-definitions/evolution-number/evolution-number-slots.config.ts":()=>Promise.resolve().then(()=>require("../evolution-number-slots.config-CNNVp6vR.cjs")),"../../item-definitions/funnel-chart/funnel-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../funnel-chart-slots.config-GKBCY9xN.cjs")),"../../item-definitions/heat-map/heat-map-slots.config.ts":()=>Promise.resolve().then(()=>require("../heat-map-slots.config-D7cSAVdX.cjs")),"../../item-definitions/heat-table/heat-table-slots.config.ts":()=>Promise.resolve().then(()=>require("../heat-table-slots.config-GGX3BCh1.cjs")),"../../item-definitions/hexbin-map/hexbin-map-slots.config.ts":()=>Promise.resolve().then(()=>require("../hexbin-map-slots.config-D7cSAVdX.cjs")),"../../item-definitions/image/image-slots.config.ts":()=>Promise.resolve().then(()=>require("../image-slots.config-mPXMR1CE.cjs")),"../../item-definitions/line-chart/line-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../line-chart-slots.config-Dx_ysVZK.cjs")),"../../item-definitions/marker-map/marker-map-slots.config.ts":()=>Promise.resolve().then(()=>require("../marker-map-slots.config-D7cSAVdX.cjs")),"../../item-definitions/ohlc-chart/ohlc-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../ohlc-chart-slots.config-DMomcHMV.cjs")),"../../item-definitions/parallel-coordinates-plot/parallel-coordinates-plot-slots.config.ts":()=>Promise.resolve().then(()=>require("../parallel-coordinates-plot-slots.config--fk40ZDu.cjs")),"../../item-definitions/pivot-table/pivot-table-slots.config.ts":()=>Promise.resolve().then(()=>require("../pivot-table-slots.config-45V_Gdm7.cjs")),"../../item-definitions/pyramid-chart/pyramid-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../pyramid-chart-slots.config-D5F0WX2d.cjs")),"../../item-definitions/radar-chart/radar-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../radar-chart-slots.config-BEigR_Ml.cjs")),"../../item-definitions/regular-table/regular-table-slots.config.ts":()=>Promise.resolve().then(()=>require("../regular-table-slots.config-RLnMgOXn.cjs")),"../../item-definitions/route-map/route-map-slots.config.ts":()=>Promise.resolve().then(()=>require("../route-map-slots.config-DsVJBR3D.cjs")),"../../item-definitions/sankey-diagram/sankey-diagram-slots.config.ts":()=>Promise.resolve().then(()=>require("../sankey-diagram-slots.config-CiyYElLX.cjs")),"../../item-definitions/scatter-plot/scatter-plot-slots.config.ts":()=>Promise.resolve().then(()=>require("../scatter-plot-slots.config-47cB5_RC.cjs")),"../../item-definitions/search-filter/search-filter-slots.config.ts":()=>Promise.resolve().then(()=>require("../search-filter-slots.config-DeHkvc2Q.cjs")),"../../item-definitions/slicer-filter/slicer-filter-slots.config.ts":()=>Promise.resolve().then(()=>require("../slicer-filter-slots.config-V7hURjKI.cjs")),"../../item-definitions/slider-filter/slider-filter-slots.config.ts":()=>Promise.resolve().then(()=>require("../slider-filter-slots.config-B--K9cpP.cjs")),"../../item-definitions/speedometer-chart/speedometer-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../speedometer-chart-slots.config-Cd-nkNPm.cjs")),"../../item-definitions/spike-map/spike-map-slots.config.ts":()=>Promise.resolve().then(()=>require("../spike-map-slots.config-BM5-Dlub.cjs")),"../../item-definitions/strip-plot/strip-plot-slots.config.ts":()=>Promise.resolve().then(()=>require("../strip-plot-slots.config-DDUlLO8K.cjs")),"../../item-definitions/sunburst-chart/sunburst-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../sunburst-chart-slots.config-B18aqdH1.cjs")),"../../item-definitions/symbol-map/symbol-map-slots.config.ts":()=>Promise.resolve().then(()=>require("../symbol-map-slots.config-Dm_FRGHA.cjs")),"../../item-definitions/text/text-slots.config.ts":()=>Promise.resolve().then(()=>require("../text-slots.config-BMBEkf0O.cjs")),"../../item-definitions/treemap-chart/treemap-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../treemap-chart-slots.config-C3bnHCyy.cjs")),"../../item-definitions/venn-diagram/venn-diagram-slots.config.ts":()=>Promise.resolve().then(()=>require("../venn-diagram-slots.config-GytlZGbF.cjs")),"../../item-definitions/video/video-slots.config.ts":()=>Promise.resolve().then(()=>require("../video-slots.config-mPXMR1CE.cjs")),"../../item-definitions/wordcloud-chart/wordcloud-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../wordcloud-chart-slots.config-D7CiYopX.cjs"))});if(e[`../../item-definitions/${t}/${t}-slots.config.ts`]){const s=await e[`../../item-definitions/${t}/${t}-slots.config.ts`]();this._slotsConfig=(s==null?void 0:s.default)??{}}return this._slotsConfig}},args:()=>[this.itemType,this.language]}),this.slotConfiguration={},this.slotContents=[],this.language="en",this.disabled=!1,this.menu="default",this.hasLabel=!1,this.selects="multiple",this.icons="only-menu",this.datasetsDataItems=[],this.placement="bottom-end",this.hideDelete=!0,this._hasExtraEmptySelects=!1,this._currentSlotContents=[],this._selectOptions=[],this._slotContentOptions=[],this.stretch=!1,this._changedSlotContents=t=>{this.dispatchEvent(new CustomEvent("slot-contents-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContents:t}}))}}_emptySlotContents(t){typeof t!="number"?(this.slotContents=[],this._currentSlotContents=[],this._changedSlotContents([])):(this._currentSlotContents=this._currentSlotContents.filter((s,o)=>o!==t),this._changedSlotContents(this._currentSlotContents))}willUpdate(t){const e=t.has("slotContents"),s=t.has("datasetsDataItems"),o=t.has("language");e&&(this._currentSlotContents=structuredClone(this.slotContents)),s&&(this._selectOptions=this._createSelectOptions(),this._slotContentOptions=this._createSlotContentOptions()),o&&this.language!==h.getLocale()&&([...h.targetLocales].includes(this.language??"en")||this.language==="en")&&h.setLocale(this.language)}_onSlotMenuChanges(t){var e;t.preventDefault(),t.stopPropagation(),this.slotContents.length===((e=t.detail.slotContents)==null?void 0:e.length)?(this._currentSlotContents=t.detail.slotContents,this._changedSlotContents(this._currentSlotContents)):(this.slotContents=t.detail.slotContents,this._changedSlotContents(this.slotContents))}_setSlotContentAtIndex(t,e){var o,r,c,i,l,d;const s=(r=(o=t==null?void 0:t.detail)==null?void 0:o.value)==null?void 0:r[0];e>=this._currentSlotContents.length&&this._removeEmptySelect();for(let m=this._currentSlotContents.length;m<=e;m++)this._currentSlotContents[m]||this._currentSlotContents.push({});if(s&&!(s===((c=this._currentSlotContents[e])==null?void 0:c.columnId)||s===((i=this._currentSlotContents[e])==null?void 0:i.column)||s===((l=this._currentSlotContents[e])==null?void 0:l.formulaId)||s===((d=this._currentSlotContents[e])==null?void 0:d.formula))){const m=this._slotContentOptions.find(g=>g.columnId===s||g.formulaId===s);m&&(this._currentSlotContents[e]=structuredClone(m))}this.slotContents=structuredClone(this._currentSlotContents.filter(m=>m.columnId||m.formulaId||m.column||m.formula)),this._changedSlotContents(this.slotContents)}_setSlotContents(t){var s,o;let e=t.detail.value;(s=this.slotConfiguration)!=null&&s.canAcceptMultipleDataItems&&e.length>1||(e=e.slice(0,1)),this._currentSlotContents=((o=this._currentSlotContents)==null?void 0:o.filter(r=>e.includes(r.columnId??r.formulaId)))??[],e.forEach(r=>{if(this._currentSlotContents.some(i=>i.columnId===r||i.formulaId===r))return;const c=this._slotContentOptions.find(i=>i.columnId===r||i.formulaId===r);c&&this._currentSlotContents.push(structuredClone(c))}),this.slotContents=structuredClone(this._currentSlotContents),this._changedSlotContents(this._currentSlotContents)}_createSlotContentOptions(){var e,s;const t=[];for(const o of this.datasetsDataItems??[]){const r=(o==null?void 0:o.columns)??[],c=(o==null?void 0:o.formulas)??[];for(const i of r)if((((e=this.slotConfiguration)==null?void 0:e.acceptableDataItemTypes)??["hierarchy","numeric","datetime","array[hierarchy]","array[numeric]","array[datetime]"]).includes(i.type)){const l=structuredClone(i);l.columnId=i.id,l.datasetId=o.id,l.label=i.name,delete l.name,delete l.id,t.push(l)}if((s=this.slotConfiguration)!=null&&s.canAcceptFormula)for(const i of c){const l=structuredClone(i);l.formulaId=i.id,l.datasetId=o.id,l.label=i.name,delete l.name,delete l.id,t.push(l)}}return t}_createSelectOptions(){var e,s;const t=[];for(const o of this.datasetsDataItems??[]){const r=(o==null?void 0:o.columns)??[],c=(o==null?void 0:o.formulas)??[];for(const i of r)(((e=this.slotConfiguration)==null?void 0:e.acceptableDataItemTypes)??["hierarchy","numeric","datetime","array[hierarchy]","array[numeric]","array[datetime]"]).includes(i.type)&&t.push({value:i.id,label:z.localize((i==null?void 0:i.name)??{},this.language),icon:f.calculateDataItemIcon(i,this.size)});if((s=this.slotConfiguration)!=null&&s.canAcceptFormula)for(const i of c)t.push({value:i.id,label:z.localize((i==null?void 0:i.name)??{},this.language),icon:f.calculateDataItemIcon(i,this.size)})}return t}_renderFieldLabel(){return n.x`<luzmo-field-label for="data-item" size=${this.size}
20
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../set-locale-DCPlazsZ.cjs"),v=require("../localized-decorator-DIXYZ3RL.cjs"),C=require("../task-CwmAXlv0.cjs"),u=require("../luzmo-icons-DonyjSXg.cjs");require("../index-Dy_5M3M5.cjs");require("../index-j8UKjHqY.cjs");require("../index-CUvucmA0.cjs");require("../index-1oIrlkAr.cjs");require("../index-CYeQkVeJ.cjs");const f=require("../calculate-data-item-icon-Dn-9Kd0U.cjs"),z=require("../localize-r7ALOUy_.cjs"),n=require("../property-Cu4Q1hS4.cjs"),y=require("../state-fyl3IYMu.cjs"),S=require("../focusable-DAGGGYyz.cjs"),b=require("../sized-mixin-j_7aJM4b.cjs");require("../index-3X8Iuo7y.cjs");require("../slot-menu/index.cjs");const _=":host{font-family:var(--luzmo-slot-contents-picker-font-family, var(--luzmo-font-family))}.container{width:fit-content;display:flex;flex-direction:column;gap:var(--luzmo-slot-contents-picker-gap, var(--slot-contents-picker-gap, var(--luzmo-spacing-5)))}.select-container{display:flex;align-items:center}:host([stretch]) .container{width:100%}:host([stretch]) .select-container{width:100%}:host([stretch]) luzmo-select{flex-grow:1}.extra-data-item-button-container{display:flex;align-items:center;justify-content:center}.slot-contents-picker-label{font-size:var(--luzmo-slot-contents-picker-label-font-size, var(--slot-contents-picker-label-font-size));flex-grow:1;margin-right:var(--luzmo-slot-contents-picker-text-to-controls, var(--slot-contents-picker-text-to-controls));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.controls{height:100%;display:flex;align-items:center;gap:var(--luzmo-slot-contents-picker-controls-gap, var(--slot-contents-picker-controls-gap));background-color:var(--luzmo-slot-contents-picker-controls-background-color, var(--slot-contents-picker-controls-background-color));color:var(--luzmo-slot-contents-picker-controls-color, var(--slot-contents-picker-controls-color));margin-right:var(--luzmo-slot-contents-picker-controls-to-edge, var(--slot-contents-picker-controls-to-edge));padding:0 var(--luzmo-slot-contents-picker-controls-horizontal-padding, var(--slot-contents-picker-controls-horizontal-padding))}.controls div{cursor:pointer;height:100%;display:flex;align-items:center;padding:0 var(--luzmo-slot-contents-picker-controls-control-horizontal-padding, var(--slot-contents-picker-controls-control-horizontal-padding))}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-slot-contents-picker-overlay-vertical-gap, var(--slot-contents-picker-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-slot-contents-picker-overlay-horizontal-gap, var(--slot-contents-picker-overlay-horizontal-gap))}:host{--slot-contents-picker-border-width: var(--luzmo-border-width);--slot-contents-picker-border-style: dashed;--slot-contents-picker-border-color: var(--luzmo-border-color);--slot-contents-picker-accept-drag-controls-background-color: transparent;--slot-contents-picker-font-color: var(--luzmo-font-color);--slot-contents-picker-controls-background-color: transparent;--slot-contents-picker-text-to-controls: var(--luzmo-spacing-3);--slot-contents-picker-controls-to-edge: 0;--slot-contents-picker-controls-gap: var(--luzmo-spacing-2);--slot-contents-picker-controls-horizontal-padding: var(--luzmo-spacing-2);--slot-contents-picker-controls-control-horizontal-padding: var( --luzmo-spacing-3 );--slot-contents-picker-label-font-size: var(--luzmo-font-size)}:host{--slot-contents-picker-horizontal-padding: var(--luzmo-spacing-4);--slot-contents-picker-overlay-horizontal-gap: var(--luzmo-spacing-4);--slot-contents-picker-overlay-vertical-gap: var(--luzmo-spacing-4)}:host([size=s]){--slot-contents-picker-horizontal-padding: var(--luzmo-spacing-4);--slot-contents-picker-overlay-horizontal-gap: var(--luzmo-spacing-4);--slot-contents-picker-overlay-vertical-gap: var(--luzmo-spacing-4)}:host([size=l]){--slot-contents-picker-horizontal-padding: var(--luzmo-spacing-5);--slot-contents-picker-overlay-horizontal-gap: var(--luzmo-spacing-5);--slot-contents-picker-overlay-vertical-gap: var(--luzmo-spacing-5)}:host([size=xl]){--slot-contents-picker-horizontal-padding: var(--luzmo-spacing-5);--slot-contents-picker-overlay-horizontal-gap: var(--luzmo-spacing-5);--slot-contents-picker-overlay-vertical-gap: var(--luzmo-spacing-5)}:host{box-sizing:border-box}";var k=Object.defineProperty,P=Object.getOwnPropertyDescriptor,a=(p,t,e,s)=>{for(var o=s>1?void 0:s?P(t,e):t,r=p.length-1,c;r>=0;r--)(c=p[r])&&(o=(s?c(t,e,o):c(o))||o);return s&&o&&k(t,e,o),o};exports.LuzmoSlotContentsPicker=class extends b.SizedMixin(S.LuzmoElement,{validSizes:["s","m","l","xl"],noDefaultSize:!0}){constructor(){super(...arguments),this._loadSlotsConfig=new C.h(this,{task:async([t])=>{if(t&&t!==this._itemTypeLoaded){const e=Object.assign({"../../item-definitions/area-chart/area-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../area-chart-slots.config-Dx_ysVZK.cjs")),"../../item-definitions/bar-chart/bar-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../bar-chart-slots.config-c_9ABPOI.cjs")),"../../item-definitions/box-plot/box-plot-slots.config.ts":()=>Promise.resolve().then(()=>require("../box-plot-slots.config-K-1CiWO-.cjs")),"../../item-definitions/bubble-chart/bubble-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../bubble-chart-slots.config-BwSwgleO.cjs")),"../../item-definitions/bullet-chart/bullet-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../bullet-chart-slots.config-DQarxMR7.cjs")),"../../item-definitions/choropleth-map/choropleth-map-slots.config.ts":()=>Promise.resolve().then(()=>require("../choropleth-map-slots.config-CFERs0ca.cjs")),"../../item-definitions/circle-pack-chart/circle-pack-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../circle-pack-chart-slots.config-B18aqdH1.cjs")),"../../item-definitions/circular-gauge/circular-gauge-slots.config.ts":()=>Promise.resolve().then(()=>require("../circular-gauge-slots.config-Cd-nkNPm.cjs")),"../../item-definitions/column-chart/column-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../column-chart-slots.config-C0nGjkmv.cjs")),"../../item-definitions/combination-chart/combination-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../combination-chart-slots.config-CY07Q5Hw.cjs")),"../../item-definitions/conditional-number/conditional-number-slots.config.ts":()=>Promise.resolve().then(()=>require("../conditional-number-slots.config-CD5ZwXuY.cjs")),"../../item-definitions/date-filter/date-filter-slots.config.ts":()=>Promise.resolve().then(()=>require("../date-filter-slots.config-CrA5ijD3.cjs")),"../../item-definitions/donut-chart/donut-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../donut-chart-slots.config-DBowIZNO.cjs")),"../../item-definitions/dropdown-filter/dropdown-filter-slots.config.ts":()=>Promise.resolve().then(()=>require("../dropdown-filter-slots.config-0wn6pMvi.cjs")),"../../item-definitions/evolution-number/evolution-number-slots.config.ts":()=>Promise.resolve().then(()=>require("../evolution-number-slots.config-CNNVp6vR.cjs")),"../../item-definitions/funnel-chart/funnel-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../funnel-chart-slots.config-GKBCY9xN.cjs")),"../../item-definitions/heat-map/heat-map-slots.config.ts":()=>Promise.resolve().then(()=>require("../heat-map-slots.config-D7cSAVdX.cjs")),"../../item-definitions/heat-table/heat-table-slots.config.ts":()=>Promise.resolve().then(()=>require("../heat-table-slots.config-GGX3BCh1.cjs")),"../../item-definitions/hexbin-map/hexbin-map-slots.config.ts":()=>Promise.resolve().then(()=>require("../hexbin-map-slots.config-D7cSAVdX.cjs")),"../../item-definitions/image/image-slots.config.ts":()=>Promise.resolve().then(()=>require("../image-slots.config-mPXMR1CE.cjs")),"../../item-definitions/line-chart/line-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../line-chart-slots.config-Dx_ysVZK.cjs")),"../../item-definitions/marker-map/marker-map-slots.config.ts":()=>Promise.resolve().then(()=>require("../marker-map-slots.config-D7cSAVdX.cjs")),"../../item-definitions/ohlc-chart/ohlc-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../ohlc-chart-slots.config-DMomcHMV.cjs")),"../../item-definitions/parallel-coordinates-plot/parallel-coordinates-plot-slots.config.ts":()=>Promise.resolve().then(()=>require("../parallel-coordinates-plot-slots.config--fk40ZDu.cjs")),"../../item-definitions/pivot-table/pivot-table-slots.config.ts":()=>Promise.resolve().then(()=>require("../pivot-table-slots.config-45V_Gdm7.cjs")),"../../item-definitions/pyramid-chart/pyramid-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../pyramid-chart-slots.config-D5F0WX2d.cjs")),"../../item-definitions/radar-chart/radar-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../radar-chart-slots.config-BEigR_Ml.cjs")),"../../item-definitions/regular-table/regular-table-slots.config.ts":()=>Promise.resolve().then(()=>require("../regular-table-slots.config-RLnMgOXn.cjs")),"../../item-definitions/route-map/route-map-slots.config.ts":()=>Promise.resolve().then(()=>require("../route-map-slots.config-DsVJBR3D.cjs")),"../../item-definitions/sankey-diagram/sankey-diagram-slots.config.ts":()=>Promise.resolve().then(()=>require("../sankey-diagram-slots.config-CiyYElLX.cjs")),"../../item-definitions/scatter-plot/scatter-plot-slots.config.ts":()=>Promise.resolve().then(()=>require("../scatter-plot-slots.config-47cB5_RC.cjs")),"../../item-definitions/search-filter/search-filter-slots.config.ts":()=>Promise.resolve().then(()=>require("../search-filter-slots.config-DeHkvc2Q.cjs")),"../../item-definitions/slicer-filter/slicer-filter-slots.config.ts":()=>Promise.resolve().then(()=>require("../slicer-filter-slots.config-V7hURjKI.cjs")),"../../item-definitions/slider-filter/slider-filter-slots.config.ts":()=>Promise.resolve().then(()=>require("../slider-filter-slots.config-B--K9cpP.cjs")),"../../item-definitions/speedometer-chart/speedometer-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../speedometer-chart-slots.config-Cd-nkNPm.cjs")),"../../item-definitions/spike-map/spike-map-slots.config.ts":()=>Promise.resolve().then(()=>require("../spike-map-slots.config-BM5-Dlub.cjs")),"../../item-definitions/strip-plot/strip-plot-slots.config.ts":()=>Promise.resolve().then(()=>require("../strip-plot-slots.config-DDUlLO8K.cjs")),"../../item-definitions/sunburst-chart/sunburst-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../sunburst-chart-slots.config-B18aqdH1.cjs")),"../../item-definitions/symbol-map/symbol-map-slots.config.ts":()=>Promise.resolve().then(()=>require("../symbol-map-slots.config-Dm_FRGHA.cjs")),"../../item-definitions/text/text-slots.config.ts":()=>Promise.resolve().then(()=>require("../text-slots.config-BMBEkf0O.cjs")),"../../item-definitions/treemap-chart/treemap-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../treemap-chart-slots.config-C3bnHCyy.cjs")),"../../item-definitions/venn-diagram/venn-diagram-slots.config.ts":()=>Promise.resolve().then(()=>require("../venn-diagram-slots.config-GytlZGbF.cjs")),"../../item-definitions/video/video-slots.config.ts":()=>Promise.resolve().then(()=>require("../video-slots.config-mPXMR1CE.cjs")),"../../item-definitions/wordcloud-chart/wordcloud-chart-slots.config.ts":()=>Promise.resolve().then(()=>require("../wordcloud-chart-slots.config-D7CiYopX.cjs"))});if(e[`../../item-definitions/${t}/${t}-slots.config.ts`]){const s=await e[`../../item-definitions/${t}/${t}-slots.config.ts`]();this._slotsConfig=(s==null?void 0:s.default)??{}}return this._slotsConfig}},args:()=>[this.itemType,this.language]}),this.slotConfiguration={},this.slotContents=[],this.language="en",this.disabled=!1,this.menu="default",this.hasLabel=!1,this.selects="multiple",this.icons="only-menu",this.datasetsDataItems=[],this.placement="bottom-end",this.hideDelete=!0,this._hasExtraEmptySelects=!1,this._currentSlotContents=[],this._selectOptions=[],this._slotContentOptions=[],this.stretch=!1,this._changedSlotContents=t=>{this.dispatchEvent(new CustomEvent("slot-contents-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContents:t}}))}}_emptySlotContents(t){typeof t!="number"?(this.slotContents=[],this._currentSlotContents=[],this._changedSlotContents([])):(this._currentSlotContents=this._currentSlotContents.filter((s,o)=>o!==t),this._changedSlotContents(this._currentSlotContents))}willUpdate(t){const e=t.has("slotContents"),s=t.has("datasetsDataItems"),o=t.has("language");e&&(this._currentSlotContents=structuredClone(this.slotContents)),s&&(this._selectOptions=this._createSelectOptions(),this._slotContentOptions=this._createSlotContentOptions()),o&&this.language!==h.getLocale()&&([...h.targetLocales].includes(this.language??"en")||this.language==="en")&&h.setLocale(this.language)}_onSlotMenuChanges(t){var e;t.preventDefault(),t.stopPropagation(),this.slotContents.length===((e=t.detail.slotContents)==null?void 0:e.length)?(this._currentSlotContents=t.detail.slotContents,this._changedSlotContents(this._currentSlotContents)):(this.slotContents=t.detail.slotContents,this._changedSlotContents(this.slotContents))}_setSlotContentAtIndex(t,e){var o,r,c,i,l,d;const s=(r=(o=t==null?void 0:t.detail)==null?void 0:o.value)==null?void 0:r[0];e>=this._currentSlotContents.length&&this._removeEmptySelect();for(let m=this._currentSlotContents.length;m<=e;m++)this._currentSlotContents[m]||this._currentSlotContents.push({});if(s&&!(s===((c=this._currentSlotContents[e])==null?void 0:c.columnId)||s===((i=this._currentSlotContents[e])==null?void 0:i.column)||s===((l=this._currentSlotContents[e])==null?void 0:l.formulaId)||s===((d=this._currentSlotContents[e])==null?void 0:d.formula))){const m=this._slotContentOptions.find(g=>g.columnId===s||g.formulaId===s);m&&(this._currentSlotContents[e]=structuredClone(m))}this.slotContents=structuredClone(this._currentSlotContents.filter(m=>m.columnId||m.formulaId||m.column||m.formula)),this._changedSlotContents(this.slotContents)}_setSlotContents(t){var s,o;let e=t.detail.value;(s=this.slotConfiguration)!=null&&s.canAcceptMultipleDataItems&&e.length>1||(e=e.slice(0,1)),this._currentSlotContents=((o=this._currentSlotContents)==null?void 0:o.filter(r=>e.includes(r.columnId??r.formulaId)))??[],e.forEach(r=>{if(this._currentSlotContents.some(i=>i.columnId===r||i.formulaId===r))return;const c=this._slotContentOptions.find(i=>i.columnId===r||i.formulaId===r);c&&this._currentSlotContents.push(structuredClone(c))}),this.slotContents=structuredClone(this._currentSlotContents),this._changedSlotContents(this._currentSlotContents)}_createSlotContentOptions(){var e,s;const t=[];for(const o of this.datasetsDataItems??[]){const r=(o==null?void 0:o.columns)??[],c=(o==null?void 0:o.formulas)??[];for(const i of r)if((((e=this.slotConfiguration)==null?void 0:e.acceptableDataItemTypes)??["hierarchy","numeric","datetime","array[hierarchy]","array[numeric]","array[datetime]"]).includes(i.type)){const l=structuredClone(i);l.columnId=i.id,l.datasetId=o.id,l.label=i.name,delete l.name,delete l.id,t.push(l)}if((s=this.slotConfiguration)!=null&&s.canAcceptFormula)for(const i of c){const l=structuredClone(i);l.formulaId=i.id,l.datasetId=o.id,l.label=i.name,delete l.name,delete l.id,t.push(l)}}return t}_createSelectOptions(){var e,s;const t=[];for(const o of this.datasetsDataItems??[]){const r=(o==null?void 0:o.columns)??[],c=(o==null?void 0:o.formulas)??[];for(const i of r)(((e=this.slotConfiguration)==null?void 0:e.acceptableDataItemTypes)??["hierarchy","numeric","datetime","array[hierarchy]","array[numeric]","array[datetime]"]).includes(i.type)&&t.push({value:i.id,label:z.localize((i==null?void 0:i.name)??{},this.language),icon:f.calculateDataItemIcon(i,this.size)});if((s=this.slotConfiguration)!=null&&s.canAcceptFormula)for(const i of c)t.push({value:i.id,label:z.localize((i==null?void 0:i.name)??{},this.language),icon:f.calculateDataItemIcon(i,this.size)})}return t}_renderFieldLabel(){return n.x`<luzmo-field-label for="data-item" size=${this.size}
21
21
  >${this.label??h.msg("Select...")}
22
22
  </luzmo-field-label>`}_removeEmptySelect(){this._hasExtraEmptySelects=!1}_addDataItem(){this._hasExtraEmptySelects=!0}_renderExtraDataItemButton(){return n.x`<div class="extra-data-item-button-container">
23
23
  <luzmo-action-button
@@ -32,7 +32,7 @@ import { x as c, r as w, n as m } from "../property-DCzt3DR1.js";
32
32
  import { r as D } from "../state-nDsQPund.js";
33
33
  import { L as E } from "../focusable-BbymtxWI.js";
34
34
  import { S as O } from "../sized-mixin-BGzkX2g1.js";
35
- import "../index-Ct7UvUif.js";
35
+ import "../index-fmbD10nN.js";
36
36
  import "../slot-menu/index.js";
37
37
  const y = () => {
38
38
  if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
@@ -17,45 +17,45 @@
17
17
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
18
  * SOFTWARE.
19
19
  * */
20
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../index-DtohCwyO.cjs");const o=require("../property-Cu4Q1hS4.cjs"),E=require("../index-DAoFunRy.cjs"),g=require("../luzmo-icons-DonyjSXg.cjs"),w=require("../index-eBsINoH9.cjs"),D=require("../localize-r7ALOUy_.cjs"),I=require("../state-fyl3IYMu.cjs"),q=require("../query-D5qWDopr.cjs"),T=require("../directive-BOOaQO_r.cjs"),U=require("../focusable-DAGGGYyz.cjs"),M=require("../sized-mixin-j_7aJM4b.cjs");require("../slot-menu-list/index.cjs");/**
20
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../index-DtohCwyO.cjs");const n=require("../property-Cu4Q1hS4.cjs"),S=require("../index-3X8Iuo7y.cjs"),z=require("../luzmo-icons-DonyjSXg.cjs"),w=require("../index-DpHum3lw.cjs"),O=require("../localize-r7ALOUy_.cjs"),E=require("../state-fyl3IYMu.cjs"),D=require("../query-D5qWDopr.cjs"),T=require("../directive-BOOaQO_r.cjs"),U=require("../focusable-DAGGGYyz.cjs"),q=require("../sized-mixin-j_7aJM4b.cjs");require("../slot-menu-list/index.cjs");/**
21
21
  * @license
22
22
  * Copyright 2018 Google LLC
23
23
  * SPDX-License-Identifier: BSD-3-Clause
24
- */const Y={},R=T.e(class extends T.i{constructor(){super(...arguments),this.ot=Y}render(u,t){return t()}update(u,[t,e]){if(Array.isArray(t)){if(Array.isArray(this.ot)&&this.ot.length===t.length&&t.every((r,l)=>r===this.ot[l]))return o.T}else if(this.ot===t)return o.T;return this.ot=Array.isArray(t)?Array.from(t):t,this.render(t,e)}});function N({element:u,handle:t,boundary:e=document.documentElement,onDragStart:r,onDragEnd:l}){if(!u||!t)throw new Error("makeDraggable: element and handle are required");const a=u.ownerDocument??document;let i=-1,b=0,y=0,m=0,p=0,z=0,L=0,C=0,_=0;const x=d=>{if(d.pointerId!==i)return;const h=d.clientX-b,f=d.clientY-y,c=(e??document.documentElement).getBoundingClientRect();let v=m+h,S=p+f;v=Math.min(Math.max(v,c.left),c.right-z),S=Math.min(Math.max(S,c.top),c.bottom-L);const A=v-m,O=S-p,P=C+A,B=_+O;u.style.transform=`translate3d(${P}px, ${B}px, 0)`},k=d=>{d.pointerId===i&&(a.removeEventListener("pointermove",x),a.removeEventListener("pointerup",k),i=-1,l==null||l())},$=d=>{var f;if(d.button!==0)return;i=d.pointerId;const h=u.getBoundingClientRect();m=h.left,p=h.top,z=h.width,L=h.height,b=d.clientX,y=d.clientY;try{const c=(f=a.defaultView)==null?void 0:f.getComputedStyle(u);if(c){const v=new DOMMatrixReadOnly(c.transform);C=v.m41,_=v.m42}}catch{C=0,_=0}t.setPointerCapture(i),a.addEventListener("pointermove",x),a.addEventListener("pointerup",k),r==null||r()};return t.addEventListener("pointerdown",$),()=>{t.removeEventListener("pointerdown",$),a.removeEventListener("pointermove",x),a.removeEventListener("pointerup",k)}}const X=":host{font-family:var(--luzmo-slot-menu-font-family, var(--luzmo-font-family));font-size:var(--luzmo-slot-menu-font-size, var(--slot-menu-font-size));color:var(--luzmo-slot-menu-font-color, var(--luzmo-font-color));display:block;width:fit-content}luzmo-slot-menu-list{min-width:var(--luzmo-slot-menu-list-min-width, var(--slot-menu-list-min-width));max-width:var(--luzmo-slot-menu-list-max-width, var(--slot-menu-list-max-width))}.slot-contents-container{position:relative;border:var(--luzmo-slot-menu-border-width, var(--luzmo-border-width)) solid var(--luzmo-slot-menu-border-color, var(--luzmo-border-color));border-radius:var(--luzmo-slot-menu-border-radius, var(--luzmo-border-radius));background:var(--luzmo-slot-menu-background-color, var(--luzmo-background-color));box-shadow:var(--luzmo-slot-menu-popup-shadow-horizontal, var(--slot-menu-popup-shadow-horizontal)) var(--luzmo-slot-menu-popup-shadow-vertical, var(--slot-menu-popup-shadow-vertical)) var(--luzmo-slot-menu-popup-shadow-blur, var(--slot-menu-popup-shadow-blur)) var(--luzmo-slot-menu-popup-shadow-color, var(--slot-menu-popup-shadow-color));border-top-left-radius:0}.slot-contents-container .inner-container{display:flex}.slot-contents-container .inner-container luzmo-display-settings{min-width:var(--luzmo-slot-menu-display-settings-min-width, var(--slot-menu-display-settings-min-width));padding:var(--luzmo-slot-menu-display-settings-vertical-padding, var(--slot-menu-display-settings-vertical-padding)) var(--luzmo-slot-menu-display-settings-horizontal-padding, var(--slot-menu-display-settings-horizontal-padding))}:host([variant=popup]) .slot-contents-container{overflow:hidden;border-top-left-radius:var(--luzmo-slot-menu-border-radius, var(--luzmo-border-radius));--slot-menu-popup-filter: drop-shadow( var( --luzmo-slot-menu-popup-shadow-horizontal, var(--slot-menu-popup-shadow-horizontal) ) var( --luzmo-slot-menu-popup-shadow-vertical, var(--slot-menu-popup-shadow-vertical) ) var( --luzmo-slot-menu-popup-shadow-blur, var(--slot-menu-popup-shadow-blur) ) var( --luzmo-slot-menu-popup-shadow-color, var(--slot-menu-popup-shadow-color) ) );filter:var(--luzmo-slot-menu-popup-filter, var(--slot-menu-popup-filter))}.slot-menu-top-menu{display:flex;align-items:center;border-radius:var(--luzmo-slot-menu-border-radius, var(--luzmo-border-radius));border-bottom-left-radius:0;border-bottom-right-radius:0;overflow:hidden;width:fit-content}.drag-handle{background-color:var(--luzmo-slot-menu-drag-handle-background-color, var(--luzmo-background-color-highlight));cursor:grab;width:fit-content;border:var(--luzmo-slot-menu-border-width, var(--luzmo-border-width)) solid var(--luzmo-slot-menu-border-color, var(--luzmo-background-color-highlight));font-size:var(--luzmo-slot-menu-drag-handle-size, var(--slot-menu-drag-handle-size));padding:var(--luzmo-slot-menu-drag-handle-vertical-padding, var(--slot-menu-drag-handle-vertical-padding)) var(--luzmo-slot-menu-drag-handle-horizontal-padding, var(--slot-menu-drag-handle-horizontal-padding))}.drag-handle:hover{background-color:var(--luzmo-slot-menu-drag-handle-background-color-hover, var(--luzmo-background-color-highlight-hover))}.slot-content-action{display:flex;flex:0 1 auto;max-width:var(--luzmo-slot-menu-top-menu-label-max-width, var(--slot-menu-top-menu-label-max-width));gap:var(--luzmo-slot-menu-label-to-icon-gap, var(--slot-menu-label-to-icon-gap));background-color:var(--luzmo-slot-menu-content-label-background-color, var(--luzmo-primary));color:var(--luzmo-slot-menu-content-label-color, var(--luzmo-primary-inverse-color));border:var(--luzmo-slot-menu-border-width, var(--luzmo-border-width)) solid var(--luzmo-slot-menu-content-label-border-color, var(--luzmo-primary));padding:var(--luzmo-slot-menu-drag-handle-vertical-padding, var(--slot-menu-drag-handle-vertical-padding)) var(--luzmo-slot-menu-drag-handle-horizontal-padding, var(--slot-menu-drag-handle-horizontal-padding))}.slot-content-action:hover{background-color:var(--luzmo-slot-menu-content-label-background-color-hover, var(--luzmo-primary-hover))}.slot-content-action:focus{background-color:var(--luzmo-slot-menu-content-label-background-color-focus, var(--luzmo-primary-focus))}.slot-content-action .slot-content-label{flex:1 1 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.slot-content-action .slot-content-remove{flex:0 0 auto;cursor:pointer}.close{position:absolute;right:1rem;cursor:pointer;top:calc(-2 * var(--luzmo-slot-menu-border-width, var(--luzmo-border-width)));background-color:var(--luzmo-slot-menu-close-button-background-color, var(--luzmo-background-color-highlight));font-size:var(--luzmo-slot-menu-close-button-size, var(--slot-menu-close-button-size));border:var(--luzmo-slot-menu-border-width, var(--luzmo-border-width)) solid var(--luzmo-slot-menu-border-color, var(--luzmo-border-color));border-radius:var(--luzmo-slot-menu-border-radius, var(--luzmo-border-radius));border-top-left-radius:0;border-top-right-radius:0;padding:var(--luzmo-slot-menu-close-button-vertical-padding, var(--slot-menu-close-button-vertical-padding)) var(--luzmo-slot-menu-close-button-horizontal-padding, var(--slot-menu-close-button-horizontal-padding))}.close:hover{background-color:var(--luzmo-slot-menu-close-button-background-color-hover, var(--luzmo-background-color-highlight-hover))}:host{--slot-menu-display-settings-min-width: 19rem;--slot-menu-min-height: calc(var(--luzmo-component-height) * 2);--slot-menu-font-size: var(--luzmo-font-size);--slot-menu-display-settings-horizontal-padding: var(--luzmo-spacing-5);--slot-menu-display-settings-vertical-padding: var(--luzmo-spacing-4);--slot-menu-top-menu-label-max-width: 12rem;--slot-menu-list-min-width: 8rem;--slot-menu-list-max-width: 12rem;--slot-menu-label-to-icon-gap: var(--luzmo-spacing-3);--slot-menu-drag-handle-size: var(--luzmo-font-size);--slot-menu-drag-handle-vertical-padding: var(--luzmo-spacing-2);--slot-menu-drag-handle-horizontal-padding: var(--luzmo-spacing-3);--slot-menu-close-button-size: var(--luzmo-font-size-s);--slot-menu-close-button-vertical-padding: var(--luzmo-spacing-2);--slot-menu-close-button-horizontal-padding: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--slot-menu-popup-shadow-horizontal: 0;--slot-menu-popup-shadow-vertical: 1px;--slot-menu-popup-shadow-blur: 4px;--slot-menu-popup-shadow-color: var(--luzmo-border-color);--slot-menu-popup-box-shadow: var(--slot-menu-popup-shadow-horizontal) var(--slot-menu-popup-shadow-vertical) var(--slot-menu-popup-shadow-blur) var(--slot-menu-popup-shadow-color)}:host([size=s]){--slot-menu-display-settings-min-width: 16rem;--slot-menu-min-height: calc(var(--luzmo-component-height-s) * 2);--slot-menu-font-size: var(--luzmo-font-size-s);--slot-menu-display-settings-horizontal-padding: var(--luzmo-spacing-4);--slot-menu-display-settings-vertical-padding: var(--luzmo-spacing-3);--slot-menu-top-menu-label-max-width: 10rem;--slot-menu-list-min-width: 6rem;--slot-menu-list-max-width: 10rem;--slot-menu-label-to-icon-gap: var(--luzmo-spacing-2);--slot-menu-drag-handle-size: var(--luzmo-font-size-s);--slot-menu-drag-handle-vertical-padding: var(--luzmo-spacing-2);--slot-menu-drag-handle-horizontal-padding: var(--luzmo-spacing-3);--slot-menu-close-button-size: var(--luzmo-font-size-xs);--slot-menu-close-button-vertical-padding: var(--luzmo-spacing-2);--slot-menu-close-button-horizontal-padding: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) )}:host([size=l]){--slot-menu-display-settings-min-width: 23rem;--slot-menu-min-height: calc(var(--luzmo-component-height-l) * 2);--slot-menu-font-size: var(--luzmo-font-size-l);--slot-menu-display-settings-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--slot-menu-display-settings-vertical-padding: var(--luzmo-spacing-5);--slot-menu-top-menu-label-max-width: 14rem;--slot-menu-list-min-width: 9rem;--slot-menu-list-max-width: 14rem;--slot-menu-label-to-icon-gap: var(--luzmo-spacing-4);--slot-menu-drag-handle-size: var(--luzmo-font-size-l);--slot-menu-drag-handle-vertical-padding: var(--luzmo-spacing-3);--slot-menu-drag-handle-horizontal-padding: var(--luzmo-spacing-3);--slot-menu-close-button-size: var(--luzmo-font-size);--slot-menu-close-button-vertical-padding: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--slot-menu-close-button-horizontal-padding: var(--luzmo-spacing-3)}:host([size=xl]){--slot-menu-display-settings-min-width: 26rem;--slot-menu-min-height: calc(var(--luzmo-component-height-xl) * 2);--slot-menu-font-size: var(--luzmo-font-size-xl);--slot-menu-display-settings-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-2) );--slot-menu-display-settings-vertical-padding: var(--luzmo-spacing-5);--slot-menu-top-menu-label-max-width: 16rem;--slot-menu-list-min-width: 10rem;--slot-menu-list-max-width: 16rem;--slot-menu-label-to-icon-gap: var(--luzmo-spacing-5);--slot-menu-drag-handle-size: var(--luzmo-font-size-xl);--slot-menu-drag-handle-vertical-padding: var(--luzmo-spacing-3);--slot-menu-drag-handle-horizontal-padding: var(--luzmo-spacing-4);--slot-menu-close-button-size: var(--luzmo-font-size-l);--slot-menu-close-button-vertical-padding: var(--luzmo-spacing-3);--slot-menu-close-button-horizontal-padding: var(--luzmo-spacing-3)}";var G=Object.defineProperty,s=(u,t,e,r)=>{for(var l=void 0,a=u.length-1,i;a>=0;a--)(i=u[a])&&(l=i(t,e,l)||l);return l&&G(t,e,l),l};class n extends E.e(M.SizedMixin(U.LuzmoElement,{validSizes:Object.values(M.ElementSizes)})){constructor(){super(...arguments),this.language="en",this.contentLanguage="en",this.slotType="numeric",this.variant="draggable",this._periodOverPeriodEnabled=!1,this.measureColumns=[],this.apiUrl="https://api.luzmo.com",this.authKey="1a6069eb-9a30-424c-ad69-e0aa9e6bb8b6",this.authToken="AGAjEOVhJPyemwt5QNx1rI6nxuOH9pwdtyeg0aGSKuWenPR8GYmC3g2yKiCIjuD8POQOrEMGLYNnZdYRHZFAMi7QOfGd6gpSgZEbLXyhW9ucYG0U9Mc0uUksxIelkVH5yUESO3c6bVCV7FMVNIo7GW",this._slotContents=[],this._activeIndex=this.slotIndex??0,this._linkedDatasetIds=[]}static get styles(){return[o.r(X)]}get _currentSlotContent(){return this._slotContents[this.slotIndex??this._activeIndex]??{}}get _currentLabel(){return D.localize(this._currentSlotContent.label,this.contentLanguage)??"Untitled"}connectedCallback(){const t={};this.apiUrl&&(t.apiUrl=this.apiUrl),this.authKey&&this.authToken&&(t.authKey=this.authKey,t.authToken=this.authToken),w.dataBroker.configure(t),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._cleanupDrag&&(this._cleanupDrag(),this._cleanupDrag=void 0)}_sendChangeEvent(){this.dispatchEvent(new CustomEvent("slot-contents-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContents:[...this._slotContents],linkedDatasetIds:[...this._linkedDatasetIds]}}))}_sendCloseEvent(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0,cancelable:!0}))}isArrayColumnType(t){return new Set(["array[numeric]","array[spatial]","array[datetime]","array[hierarchy]"]).has(t)}async willUpdate(){var e,r,l,a;const t=this.slotContents??((e=this._store)==null?void 0:e.slotContents.get())??[];if(t!==this._slotContents){this._slotContents=structuredClone(t);const{set:i,column:b}=this._currentSlotContent;i&&i!==this._lastFetchedDatasetId&&(this._lastFetchedDatasetId=i,await w.dataBroker.fetchDatasetsRecursive([i]),this._linkedDatasetIds=w.dataBroker.getLinkedDatasetIds(i));const y=w.dataBroker.getAvailableDatasets();this.measureColumns=y.map(m=>{var p;return{datasetId:m.id,datasetName:m.name,columns:(p=m.columns)==null?void 0:p.filter(z=>z.type==="numeric"&&z.id!==b)}}),((r=this._store)==null?void 0:r.activeIndex.get())!==this._activeIndex&&((l=this._store)==null||l.updateActive(this._activeIndex)),this.slotName==="measure"&&(this._periodOverPeriodEnabled=((a=this._store)==null?void 0:a.periodOverPeriodEnabled.get())&&this._currentSlotContent.subtype!=="duration"&&!this.isArrayColumnType(this._currentSlotContent.type))}}updated(){var t;this.displaySettingsElement&&(this.displaySettingsElement.periodOverPeriod=this._periodOverPeriodEnabled,this.displaySettingsElement.measureColumns=this.measureColumns,this.displaySettingsElement.showRemoveButton=this.variant==="popup"&&(typeof this.slotIndex=="number"||((t=this._slotContents)==null?void 0:t.length)===1))}_handleSlotListChange(t){var r,l;this._slotContents=structuredClone(t.detail.slotContents);const e=t.detail.activeIndex;e!==this._activeIndex&&(this._activeIndex=e,(r=this._store)==null||r.updateActive(e)),this._slotContents.length<=1&&this.requestUpdate(),(l=this._store)==null||l.setContents(this._slotContents,this.slotName),this._sendChangeEvent()}_handleSlotContentChange(t){var e;this._slotContents[this.slotIndex??this._activeIndex]=structuredClone(t.detail.slotContent),this.slotMenuListElement&&(this.slotMenuListElement.slotContents=this._slotContents),(e=this._store)==null||e.updateContent(t.detail.slotContent,this.slotIndex??this._activeIndex),this._sendChangeEvent()}removeSlotContent(t){var e;this._slotContents=this._slotContents.filter((r,l)=>l!==t),(e=this._store)==null||e.setContents(this._slotContents,this.slotName),this._sendChangeEvent(),this._sendCloseEvent(),this.requestUpdate()}close(){this._sendCloseEvent()}_removeActiveSlotContent(){this.removeSlotContent(this.slotIndex??this._activeIndex)}render(){var t,e;return o.x`<div class="slot-menu-top-menu">
25
- ${this.variant==="draggable"?o.x`<div class="drag-handle">${g.y3(g.W)}</div>`:""}
26
- ${this._slotContents&&this._slotContents.length===1&&this.variant!=="popup"?o.x` <div class="slot-content-action">
24
+ */const R={},X=T.e(class extends T.i{constructor(){super(...arguments),this.ot=R}render(u,t){return t()}update(u,[t,o]){if(Array.isArray(t)){if(Array.isArray(this.ot)&&this.ot.length===t.length&&t.every((e,r)=>e===this.ot[r]))return n.T}else if(this.ot===t)return n.T;return this.ot=Array.isArray(t)?Array.from(t):t,this.render(t,o)}});function Y({element:u,handle:t,boundary:o=document.documentElement,onDragStart:e,onDragEnd:r}){if(!u||!t)throw new Error("makeDraggable: element and handle are required");const a=u.ownerDocument??document;let i=-1,m=0,y=0,c=0,h=0,b=0,L=0,_=0,C=0;const x=d=>{if(d.pointerId!==i)return;const g=d.clientX-m,f=d.clientY-y,p=(o??document.documentElement).getBoundingClientRect();let v=c+g,I=h+f;v=Math.min(Math.max(v,p.left),p.right-b),I=Math.min(Math.max(I,p.top),p.bottom-L);const M=v-c,A=I-h,B=_+M,P=C+A;u.style.transform=`translate3d(${B}px, ${P}px, 0)`},k=d=>{d.pointerId===i&&(a.removeEventListener("pointermove",x),a.removeEventListener("pointerup",k),i=-1,r==null||r())},$=d=>{var f;if(d.button!==0)return;i=d.pointerId;const g=u.getBoundingClientRect();c=g.left,h=g.top,b=g.width,L=g.height,m=d.clientX,y=d.clientY;try{const p=(f=a.defaultView)==null?void 0:f.getComputedStyle(u);if(p){const v=new DOMMatrixReadOnly(p.transform);_=v.m41,C=v.m42}}catch{_=0,C=0}t.setPointerCapture(i),a.addEventListener("pointermove",x),a.addEventListener("pointerup",k),e==null||e()};return t.addEventListener("pointerdown",$),()=>{t.removeEventListener("pointerdown",$),a.removeEventListener("pointermove",x),a.removeEventListener("pointerup",k)}}const N=":host{font-family:var(--luzmo-slot-menu-font-family, var(--luzmo-font-family));font-size:var(--luzmo-slot-menu-font-size, var(--slot-menu-font-size));color:var(--luzmo-slot-menu-font-color, var(--luzmo-font-color));display:block;width:fit-content}luzmo-slot-menu-list{min-width:var(--luzmo-slot-menu-list-min-width, var(--slot-menu-list-min-width));max-width:var(--luzmo-slot-menu-list-max-width, var(--slot-menu-list-max-width));background-color:var(--luzmo-slot-menu-list-background-color, var(--slot-menu-list-background-color))}.slot-contents-container{position:relative;border:var(--luzmo-slot-menu-border-width, var(--luzmo-border-width)) solid var(--luzmo-slot-menu-border-color, var(--luzmo-border-color));border-radius:var(--luzmo-slot-menu-border-radius, var(--luzmo-border-radius));background:var(--luzmo-slot-menu-background-color, var(--luzmo-background-color));box-shadow:var(--luzmo-slot-menu-popup-shadow-horizontal, var(--slot-menu-popup-shadow-horizontal)) var(--luzmo-slot-menu-popup-shadow-vertical, var(--slot-menu-popup-shadow-vertical)) var(--luzmo-slot-menu-popup-shadow-blur, var(--slot-menu-popup-shadow-blur)) var(--luzmo-slot-menu-popup-shadow-color, var(--slot-menu-popup-shadow-color));border-top-left-radius:0}.slot-contents-container .inner-container{display:flex}.slot-contents-container .inner-container luzmo-display-settings{min-width:var(--luzmo-slot-menu-display-settings-min-width, var(--slot-menu-display-settings-min-width));padding:var(--luzmo-slot-menu-display-settings-vertical-padding, var(--slot-menu-display-settings-vertical-padding)) var(--luzmo-slot-menu-display-settings-horizontal-padding, var(--slot-menu-display-settings-horizontal-padding))}:host([variant=popup]) .slot-contents-container{overflow:hidden;border-top-left-radius:var(--luzmo-slot-menu-border-radius, var(--luzmo-border-radius));--slot-menu-popup-filter: drop-shadow( var( --luzmo-slot-menu-popup-shadow-horizontal, var(--slot-menu-popup-shadow-horizontal) ) var( --luzmo-slot-menu-popup-shadow-vertical, var(--slot-menu-popup-shadow-vertical) ) var( --luzmo-slot-menu-popup-shadow-blur, var(--slot-menu-popup-shadow-blur) ) var( --luzmo-slot-menu-popup-shadow-color, var(--slot-menu-popup-shadow-color) ) );filter:var(--luzmo-slot-menu-popup-filter, var(--slot-menu-popup-filter))}.slot-menu-top-menu{display:flex;align-items:center;border-radius:var(--luzmo-slot-menu-border-radius, var(--luzmo-border-radius));border-bottom-left-radius:0;border-bottom-right-radius:0;overflow:hidden;width:fit-content}.drag-handle{background-color:var(--luzmo-slot-menu-drag-handle-background-color, var(--luzmo-background-color-highlight));cursor:grab;width:fit-content;border:var(--luzmo-slot-menu-border-width, var(--luzmo-border-width)) solid var(--luzmo-slot-menu-border-color, var(--luzmo-background-color-highlight));font-size:var(--luzmo-slot-menu-drag-handle-size, var(--slot-menu-drag-handle-size));padding:var(--luzmo-slot-menu-drag-handle-vertical-padding, var(--slot-menu-drag-handle-vertical-padding)) var(--luzmo-slot-menu-drag-handle-horizontal-padding, var(--slot-menu-drag-handle-horizontal-padding))}.drag-handle:hover{background-color:var(--luzmo-slot-menu-drag-handle-background-color-hover, var(--luzmo-background-color-highlight-hover))}.slot-content-action{display:flex;flex:0 1 auto;max-width:var(--luzmo-slot-menu-top-menu-label-max-width, var(--slot-menu-top-menu-label-max-width));gap:var(--luzmo-slot-menu-label-to-icon-gap, var(--slot-menu-label-to-icon-gap));background-color:var(--luzmo-slot-menu-content-label-background-color, var(--luzmo-primary));color:var(--luzmo-slot-menu-content-label-color, var(--luzmo-primary-inverse-color));border:var(--luzmo-slot-menu-border-width, var(--luzmo-border-width)) solid var(--luzmo-slot-menu-content-label-border-color, var(--luzmo-primary));padding:var(--luzmo-slot-menu-drag-handle-vertical-padding, var(--slot-menu-drag-handle-vertical-padding)) var(--luzmo-slot-menu-drag-handle-horizontal-padding, var(--slot-menu-drag-handle-horizontal-padding))}.slot-content-action:hover{background-color:var(--luzmo-slot-menu-content-label-background-color-hover, var(--luzmo-primary-hover))}.slot-content-action:focus{background-color:var(--luzmo-slot-menu-content-label-background-color-focus, var(--luzmo-primary-focus))}.slot-content-action .slot-content-label{flex:1 1 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.slot-content-action .slot-content-remove{flex:0 0 auto;cursor:pointer}.close{position:absolute;right:1rem;cursor:pointer;top:calc(-2 * var(--luzmo-slot-menu-border-width, var(--luzmo-border-width)));background-color:var(--luzmo-slot-menu-close-button-background-color, var(--luzmo-background-color-highlight));font-size:var(--luzmo-slot-menu-close-button-size, var(--slot-menu-close-button-size));border:var(--luzmo-slot-menu-border-width, var(--luzmo-border-width)) solid var(--luzmo-slot-menu-border-color, var(--luzmo-border-color));border-radius:var(--luzmo-slot-menu-border-radius, var(--luzmo-border-radius));border-top-left-radius:0;border-top-right-radius:0;padding:var(--luzmo-slot-menu-close-button-vertical-padding, var(--slot-menu-close-button-vertical-padding)) var(--luzmo-slot-menu-close-button-horizontal-padding, var(--slot-menu-close-button-horizontal-padding))}.close:hover{background-color:var(--luzmo-slot-menu-close-button-background-color-hover, var(--luzmo-background-color-highlight-hover))}:host{--slot-menu-display-settings-min-width: 19rem;--slot-menu-min-height: calc(var(--luzmo-component-height) * 2);--slot-menu-font-size: var(--luzmo-font-size);--slot-menu-display-settings-horizontal-padding: var(--luzmo-spacing-5);--slot-menu-display-settings-vertical-padding: var(--luzmo-spacing-4);--slot-menu-top-menu-label-max-width: 12rem;--slot-menu-list-min-width: 8rem;--slot-menu-list-max-width: 12rem;--slot-menu-label-to-icon-gap: var(--luzmo-spacing-3);--slot-menu-drag-handle-size: var(--luzmo-font-size);--slot-menu-drag-handle-vertical-padding: var(--luzmo-spacing-2);--slot-menu-drag-handle-horizontal-padding: var(--luzmo-spacing-3);--slot-menu-close-button-size: var(--luzmo-font-size-s);--slot-menu-close-button-vertical-padding: var(--luzmo-spacing-2);--slot-menu-close-button-horizontal-padding: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--slot-menu-popup-shadow-horizontal: 0;--slot-menu-popup-shadow-vertical: 1px;--slot-menu-popup-shadow-blur: 4px;--slot-menu-popup-shadow-color: var(--luzmo-border-color);--slot-menu-popup-box-shadow: var(--slot-menu-popup-shadow-horizontal) var(--slot-menu-popup-shadow-vertical) var(--slot-menu-popup-shadow-blur) var(--slot-menu-popup-shadow-color)}:host([size=s]){--slot-menu-display-settings-min-width: 16rem;--slot-menu-min-height: calc(var(--luzmo-component-height-s) * 2);--slot-menu-font-size: var(--luzmo-font-size-s);--slot-menu-display-settings-horizontal-padding: var(--luzmo-spacing-4);--slot-menu-display-settings-vertical-padding: var(--luzmo-spacing-3);--slot-menu-top-menu-label-max-width: 10rem;--slot-menu-list-min-width: 6rem;--slot-menu-list-max-width: 10rem;--slot-menu-label-to-icon-gap: var(--luzmo-spacing-2);--slot-menu-drag-handle-size: var(--luzmo-font-size-s);--slot-menu-drag-handle-vertical-padding: var(--luzmo-spacing-2);--slot-menu-drag-handle-horizontal-padding: var(--luzmo-spacing-3);--slot-menu-close-button-size: var(--luzmo-font-size-xs);--slot-menu-close-button-vertical-padding: var(--luzmo-spacing-2);--slot-menu-close-button-horizontal-padding: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) )}:host([size=l]){--slot-menu-display-settings-min-width: 23rem;--slot-menu-min-height: calc(var(--luzmo-component-height-l) * 2);--slot-menu-font-size: var(--luzmo-font-size-l);--slot-menu-display-settings-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--slot-menu-display-settings-vertical-padding: var(--luzmo-spacing-5);--slot-menu-top-menu-label-max-width: 14rem;--slot-menu-list-min-width: 9rem;--slot-menu-list-max-width: 14rem;--slot-menu-label-to-icon-gap: var(--luzmo-spacing-4);--slot-menu-drag-handle-size: var(--luzmo-font-size-l);--slot-menu-drag-handle-vertical-padding: var(--luzmo-spacing-3);--slot-menu-drag-handle-horizontal-padding: var(--luzmo-spacing-3);--slot-menu-close-button-size: var(--luzmo-font-size);--slot-menu-close-button-vertical-padding: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--slot-menu-close-button-horizontal-padding: var(--luzmo-spacing-3)}:host([size=xl]){--slot-menu-display-settings-min-width: 26rem;--slot-menu-min-height: calc(var(--luzmo-component-height-xl) * 2);--slot-menu-font-size: var(--luzmo-font-size-xl);--slot-menu-display-settings-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-2) );--slot-menu-display-settings-vertical-padding: var(--luzmo-spacing-5);--slot-menu-top-menu-label-max-width: 16rem;--slot-menu-list-min-width: 10rem;--slot-menu-list-max-width: 16rem;--slot-menu-label-to-icon-gap: var(--luzmo-spacing-5);--slot-menu-drag-handle-size: var(--luzmo-font-size-xl);--slot-menu-drag-handle-vertical-padding: var(--luzmo-spacing-3);--slot-menu-drag-handle-horizontal-padding: var(--luzmo-spacing-4);--slot-menu-close-button-size: var(--luzmo-font-size-l);--slot-menu-close-button-vertical-padding: var(--luzmo-spacing-3);--slot-menu-close-button-horizontal-padding: var(--luzmo-spacing-3)}";var K=Object.defineProperty,l=(u,t,o,e)=>{for(var r=void 0,a=u.length-1,i;a>=0;a--)(i=u[a])&&(r=i(t,o,r)||r);return r&&K(t,o,r),r};class s extends S.e(q.SizedMixin(U.LuzmoElement,{validSizes:Object.values(q.ElementSizes)})){constructor(){super(...arguments),this.language="en",this.contentLanguage="en",this.slotType="numeric",this.variant="draggable",this._periodOverPeriodEnabled=!1,this.measureColumns=[],this.apiUrl="https://api.luzmo.com",this.authKey="",this.authToken="",this._slotContents=[],this._activeIndex=this.slotIndex??0,this._linkedDatasetsIds=[]}static get styles(){return[n.r(N)]}get _currentSlotContent(){return this._slotContents[this.slotIndex??this._activeIndex]??{}}get _currentLabel(){return O.localize(this._currentSlotContent.label,this.contentLanguage)??"Untitled"}connectedCallback(){const t={};this.apiUrl&&(t.apiUrl=this.apiUrl),this.authKey&&this.authToken&&(t.authKey=this.authKey,t.authToken=this.authToken),w.dataBroker.configure(t),super.connectedCallback(),this._attachDragHandle()}disconnectedCallback(){super.disconnectedCallback(),this._cleanupDrag&&(this._cleanupDrag(),this._cleanupDrag=void 0)}_attachDragHandle(){if(this._cleanupDrag||this.variant!=="draggable"||this.noDrag)return;const t=this.renderRoot.querySelector(".drag-handle");if(!t)return;const o=this.dragBoundary?document.querySelector(this.dragBoundary):document.documentElement;this._cleanupDrag=Y({element:this,handle:t,boundary:o})}_sendChangeEvent(){this.dispatchEvent(new CustomEvent("slot-contents-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContents:[...this._slotContents],linkedDatasetsIds:[...this._linkedDatasetsIds]}}))}_sendCloseEvent(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0,cancelable:!0}))}isArrayColumnType(t){return new Set(["array[numeric]","array[spatial]","array[datetime]","array[hierarchy]"]).has(t)}async willUpdate(){var o,e,r,a;const t=this.slotContents??((o=this._store)==null?void 0:o.slotContents.get())??[];if(t!==this._slotContents){this._slotContents=structuredClone(t);const{set:i,column:m}=this._currentSlotContent;if(i&&i!==this._lastFetchedDatasetId){if(this._lastFetchedDatasetId=i,await w.dataBroker.fetchDatasetsRecursive([i]),!this.isConnected)return;this._linkedDatasetsIds=w.dataBroker.getLinkedDatasetsIds(i)}const y=w.dataBroker.getAvailableDatasets();this.measureColumns=y.map(c=>{var h;return{datasetId:c.id,datasetName:c.name,columns:(h=c.columns)==null?void 0:h.filter(b=>b.type==="numeric"&&b.id!==m)}}),((e=this._store)==null?void 0:e.activeIndex.get())!==this._activeIndex&&((r=this._store)==null||r.updateActive(this._activeIndex)),this.slotName==="measure"&&(this._periodOverPeriodEnabled=((a=this._store)==null?void 0:a.periodOverPeriodEnabled.get())&&this._currentSlotContent.subtype!=="duration"&&!this.isArrayColumnType(this._currentSlotContent.type))}}updated(){var t;this.displaySettingsElement&&(this.displaySettingsElement.periodOverPeriod=this._periodOverPeriodEnabled,this.displaySettingsElement.measureColumns=this.measureColumns,this.displaySettingsElement.showRemoveButton=this.variant==="popup"&&(typeof this.slotIndex=="number"||((t=this._slotContents)==null?void 0:t.length)===1))}_handleSlotListChange(t){var i,m;this._slotContents=structuredClone(t.detail.slotContents);const o=t.detail.activeIndex;o!==this._activeIndex&&(this._activeIndex=o,(i=this._store)==null||i.updateActive(o));const e=this._slotContents[this._activeIndex],r=(e==null?void 0:e.column)??(e==null?void 0:e.columnId),a=(e==null?void 0:e.set)??(e==null?void 0:e.datasetId);!r||!a||(this.dispatchEvent(new CustomEvent("slot-menu-highlight",{bubbles:!0,composed:!0,detail:{columnId:r,securableId:a,level:(e==null?void 0:e.level)??0}})),this._slotContents.length<=1&&this.requestUpdate(),(m=this._store)==null||m.setContents(this._slotContents,this.slotName),this._sendChangeEvent())}_handleSlotContentChange(t){var o;this._slotContents[this.slotIndex??this._activeIndex]=structuredClone(t.detail.slotContent),this.slotMenuListElement&&(this.slotMenuListElement.slotContents=this._slotContents),(o=this._store)==null||o.updateContent(t.detail.slotContent,this.slotIndex??this._activeIndex),this._sendChangeEvent()}removeSlotContent(t){var o;this._slotContents=this._slotContents.filter((e,r)=>r!==t),(o=this._store)==null||o.setContents(this._slotContents,this.slotName),this._sendChangeEvent(),this._sendCloseEvent(),this.requestUpdate()}close(){this._sendCloseEvent()}_removeActiveSlotContent(){this.removeSlotContent(this.slotIndex??this._activeIndex)}render(){var t,o;return n.x`<div class="slot-menu-top-menu">
25
+ ${this.variant==="draggable"?n.x`<div class="drag-handle">${z.y3(z.W)}</div>`:""}
26
+ ${this._slotContents&&this._slotContents.length===1&&this.variant!=="popup"?n.x` <div class="slot-content-action">
27
27
  <div class="slot-content-label">${this._currentLabel}</div>
28
28
  <div
29
29
  class="slot-content-remove"
30
30
  @click=${this.removeSlotContent.bind(this,0)}
31
31
  >
32
- ${g.y3(g.C1)}
32
+ ${z.y3(z.C1)}
33
33
  </div>
34
34
  </div>`:""}
35
35
  </div>
36
36
  <div
37
37
  class="slot-contents-container ${((t=this._slotContents)==null?void 0:t.length)>1?"multiple":""}"
38
38
  >
39
- ${this.variant==="popup"?"":o.x`<div class="close" @click=${this.close}>
40
- ${g.y3(g.F)}
39
+ ${this.variant==="popup"?"":n.x`<div class="close" @click=${this.close}>
40
+ ${z.y3(z.F)}
41
41
  </div>`}
42
42
  <div class="inner-container">
43
- ${((e=this._slotContents)==null?void 0:e.length)>1&&typeof this.slotIndex!="number"?o.x`<luzmo-slot-menu-list
43
+ ${((o=this._slotContents)==null?void 0:o.length)>1&&typeof this.slotIndex!="number"?n.x`<luzmo-slot-menu-list
44
44
  .slotContents=${this._slotContents}
45
45
  .contentLanguage=${this.contentLanguage}
46
46
  .activeIndex=${this.slotIndex??this._activeIndex}
47
47
  @slot-list-changed=${this._handleSlotListChange}
48
48
  ></luzmo-slot-menu-list>`:""}
49
- ${R([this.variant,this.slotType,this.language,this.contentLanguage],()=>{var r;return o.x`<luzmo-display-settings
49
+ ${X([this.variant,this.slotType,this.language,this.contentLanguage],()=>{var e;return n.x`<luzmo-display-settings
50
50
  .size=${this.size}
51
51
  .language=${this.language}
52
52
  .contentLanguage=${this.contentLanguage}
53
53
  .slotContent=${this._currentSlotContent}
54
54
  .slotType=${this.slotType}
55
55
  .measureColumns=${this.measureColumns}
56
- .showRemoveButton=${this.variant==="popup"&&(typeof this.slotIndex=="number"||((r=this._slotContents)==null?void 0:r.length)===1)}
56
+ .showRemoveButton=${this.variant==="popup"&&(typeof this.slotIndex=="number"||((e=this._slotContents)==null?void 0:e.length)===1)}
57
57
  @slot-content-changed=${this._handleSlotContentChange}
58
58
  @remove-slot-content=${this._removeActiveSlotContent}
59
59
  ></luzmo-display-settings>`})}
60
60
  </div>
61
- </div>`}firstUpdated(){if(this.variant==="draggable"&&!this.noDrag){const t=this.renderRoot.querySelector(".drag-handle");if(t){const e=this.dragBoundary?document.querySelector(this.dragBoundary):document.documentElement;this._cleanupDrag=N({element:this,handle:t,boundary:e})}}}resetPosition(){this.style.transform=""}}s([o.n({type:String,reflect:!0})],n.prototype,"language");s([o.n({type:String,attribute:"content-language",reflect:!0})],n.prototype,"contentLanguage");s([o.n({type:String,attribute:"slot-type",reflect:!0})],n.prototype,"slotType");s([o.n({type:String,attribute:"slot-name",reflect:!0})],n.prototype,"slotName");s([o.n({type:String,attribute:"item-type",reflect:!0})],n.prototype,"itemType");s([o.n({type:Boolean,attribute:"no-drag",reflect:!0})],n.prototype,"noDrag");s([o.n({type:Boolean,attribute:"no-close",reflect:!0})],n.prototype,"noClose");s([o.n({type:String,reflect:!0})],n.prototype,"variant");s([o.n({type:Boolean,attribute:"no-top-menu-label",reflect:!0})],n.prototype,"noTopMenuLabel");s([E.c({context:E.slotContext,subscribe:!0})],n.prototype,"_store");s([o.n({type:String,attribute:"drag-boundary",reflect:!1})],n.prototype,"dragBoundary");s([o.n({type:Array,reflect:!1,attribute:"slot-contents"})],n.prototype,"slotContents");s([I.r()],n.prototype,"_periodOverPeriodEnabled");s([I.r()],n.prototype,"measureColumns");s([o.n({type:Number,reflect:!1,attribute:"slot-index"})],n.prototype,"slotIndex");s([q.e("luzmo-display-settings")],n.prototype,"displaySettingsElement");s([q.e("luzmo-slot-menu-list")],n.prototype,"slotMenuListElement");s([o.n({type:String,attribute:"api-url",reflect:!0})],n.prototype,"apiUrl");s([o.n({type:String,attribute:"auth-key",reflect:!0})],n.prototype,"authKey");s([o.n({type:String,attribute:"auth-token",reflect:!0})],n.prototype,"authToken");s([I.r()],n.prototype,"_slotContents");customElements.get("luzmo-slot-menu")||customElements.define("luzmo-slot-menu",n);exports.LuzmoSlotMenu=n;
61
+ </div>`}firstUpdated(){this._attachDragHandle()}resetPosition(){this.style.transform=""}}l([n.n({type:String,reflect:!0})],s.prototype,"language");l([n.n({type:String,attribute:"content-language",reflect:!0})],s.prototype,"contentLanguage");l([n.n({type:String,attribute:"slot-type",reflect:!0})],s.prototype,"slotType");l([n.n({type:String,attribute:"slot-name",reflect:!0})],s.prototype,"slotName");l([n.n({type:String,attribute:"item-type",reflect:!0})],s.prototype,"itemType");l([n.n({type:Boolean,attribute:"no-drag",reflect:!0})],s.prototype,"noDrag");l([n.n({type:Boolean,attribute:"no-close",reflect:!0})],s.prototype,"noClose");l([n.n({type:String,reflect:!0})],s.prototype,"variant");l([n.n({type:Boolean,attribute:"no-top-menu-label",reflect:!0})],s.prototype,"noTopMenuLabel");l([S.c({context:S.slotContext,subscribe:!0})],s.prototype,"_store");l([n.n({type:String,attribute:"drag-boundary",reflect:!1})],s.prototype,"dragBoundary");l([n.n({type:Array,reflect:!1,attribute:"slot-contents"})],s.prototype,"slotContents");l([E.r()],s.prototype,"_periodOverPeriodEnabled");l([E.r()],s.prototype,"measureColumns");l([n.n({type:Number,reflect:!1,attribute:"slot-index"})],s.prototype,"slotIndex");l([D.e("luzmo-display-settings")],s.prototype,"displaySettingsElement");l([D.e("luzmo-slot-menu-list")],s.prototype,"slotMenuListElement");l([n.n({type:String,attribute:"api-url",reflect:!0})],s.prototype,"apiUrl");l([n.n({type:String,attribute:"auth-key",reflect:!0})],s.prototype,"authKey");l([n.n({type:String,attribute:"auth-token",reflect:!0})],s.prototype,"authToken");l([E.r()],s.prototype,"_slotContents");customElements.get("luzmo-slot-menu")||customElements.define("luzmo-slot-menu",s);exports.LuzmoSlotMenu=s;