@luzmo/analytics-components-kit 1.0.1-alpha.70 → 1.0.1-alpha.72

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.
@@ -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 A=require("../get-css-variable-DLiZYZEi.cjs"),b=require("../index-DtwYU_wx.cjs"),$=require("../localized-decorator-C8sbzZGl.cjs"),z=require("../runtime-CH-wFJgm.cjs"),O=require("../task-CwmAXlv0.cjs"),y=require("../luzmo-icons-DFyTIc5o.cjs");require("../index-Bf_6bsDf.cjs");const k=require("../index-DpHum3lw.cjs"),T=require("../localize-r7ALOUy_.cjs"),n=require("../property-Cu4Q1hS4.cjs"),E=require("../state-fyl3IYMu.cjs"),w=require("../query-D5qWDopr.cjs"),I=require("../focusable-DAGGGYyz.cjs"),M=require("../sized-mixin-j_7aJM4b.cjs"),C=require("../types-VPf7E5dD.cjs"),_=require("../set-locale-DTROmCuU.cjs");require("../slot-menu/index.cjs");/**
20
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../get-css-variable-DLiZYZEi.cjs"),b=require("../index-DtwYU_wx.cjs"),$=require("../localized-decorator-C8sbzZGl.cjs"),z=require("../runtime-CH-wFJgm.cjs"),O=require("../task-CwmAXlv0.cjs"),C=require("../luzmo-icons-DFyTIc5o.cjs");require("../index-Bf_6bsDf.cjs");const k=require("../index-DpHum3lw.cjs"),T=require("../localize-r7ALOUy_.cjs"),n=require("../property-Cu4Q1hS4.cjs"),E=require("../state-fyl3IYMu.cjs"),w=require("../query-D5qWDopr.cjs"),I=require("../focusable-DAGGGYyz.cjs"),M=require("../sized-mixin-j_7aJM4b.cjs"),y=require("../types-VPf7E5dD.cjs"),_=require("../set-locale-DTROmCuU.cjs");require("../slot-menu/index.cjs");/**
21
21
  * @license
22
22
  * Copyright 2021 Google LLC
23
23
  * SPDX-License-Identifier: BSD-3-Clause
@@ -25,7 +25,7 @@
25
25
  * @license
26
26
  * Copyright 2021 Google LLC
27
27
  * SPDX-License-Identifier: BSD-3-Clause
28
- */class R extends Event{constructor(t,e){super("context-provider",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=e}}class G extends U{constructor(t,e,o){var l,i;super(e.context!==void 0?e.initialValue:o),this.onContextRequest=r=>{if(r.context!==this.context)return;const a=r.contextTarget??r.composedPath()[0];a!==this.host&&(r.stopPropagation(),this.addCallback(r.callback,a,r.subscribe))},this.onProviderRequest=r=>{if(r.context!==this.context||(r.contextTarget??r.composedPath()[0])===this.host)return;const a=new Set;for(const[p,{consumerHost:s}]of this.subscriptions)a.has(p)||(a.add(p),s.dispatchEvent(new b.s(this.context,s,p,!0)));r.stopPropagation()},this.host=t,e.context!==void 0?this.context=e.context:this.context=e,this.attachListeners(),(i=(l=this.host).addController)==null||i.call(l,this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new R(this.context,this.host))}}class B{constructor(){this.slotContents=b.r([]),this.slotsContents=b.r([]),this.periodOverPeriodUiType=b.r(null),this.linkedDataset=b.r([]),this._popEnabledChartTypes=["area-chart","bar-chart","combination-chart","column-chart","line-chart"],this.activeSlotContents=b.i(()=>this.slotContents.get()[this.activeIndex.get()]),this.activeIndex=b.r(0)}isArrayColumnType(t){return new Set(["array[numeric]","array[spatial]","array[datetime]","array[hierarchy]"]).has(t)}setPeriodOverPeriodCondition(t,e){var o;if(!((o=e==null?void 0:e.periodOverPeriod)!=null&&o.newUi)){this.periodOverPeriodUiType.set(this.oldConditionalLogic(t));return}this.periodOverPeriodUiType.set(this.getUiConditionToApply())}getUiConditionToApply(){const t=this.hasDatetimeColumnOnCategoryOrXAxis(),e=this.linkedDataset.get().some(({columns:o})=>o==null?void 0:o.some(l=>l.type==="datetime"));return!t&&!e?null:t?C.PeriodOverPeriodCondition.HasDatetimeColumnAndNoComparisonFilters:C.PeriodOverPeriodCondition.NoDatetimeColumnAndNoComparisonFilters}oldConditionalLogic(t){var a,p;const e=this.slotsContents.get()??[],o=((a=e.find(s=>["y-axis","x-axis","row"].includes(s.name)))==null?void 0:a.content)??[],l=(o==null?void 0:o[0])??null,i=((p=e.find(s=>s.name==="measure"))==null?void 0:p.content)??[];return l&&this._popEnabledChartTypes.includes(t)&&l.type==="datetime"&&!this.isArrayColumnType(l.type)&&!l.datetimeDisplayMode&&l.level!==4&&i.length>0?C.PeriodOverPeriodCondition.OldImplementation:null}hasDatetimeColumnOnCategoryOrXAxis(){var l;const e=((l=(this.slotsContents.get()??[]).find(i=>["y-axis","x-axis"].includes(i.name)))==null?void 0:l.content)??[],o=(e==null?void 0:e[0])??null;return!!(o&&o.type==="datetime"&&!this.isArrayColumnType(o.type))}setContents(t,e){if(this.slotContents.set(t),this.activeIndex.get()>=t.length&&this.activeIndex.set(t.length>0?t.length-1:0),e){const o=structuredClone(this.slotsContents.get())??[],l=o.find(i=>i.name===e);l&&(l.content=t),this.setFullContents(o)}}setFullContents(t){this.slotsContents.set(t)}updateActive(t){t>=0&&t<this.slotContents.get().length&&this.activeIndex.set(t)}updateContent(t,e=this.activeIndex.get()){if(e<0||e>=this.slotContents.get().length)return;const o=[...this.slotContents.get()];o[e]=structuredClone(t),this.slotContents.set(o)}removeContent(t){if(t<0||t>=this.slotContents.get().length)return;const e=this.slotContents.get().filter((o,l)=>l!==t);this.slotContents.set(e),this.activeIndex.get()>=e.length&&this.activeIndex.set(e.length>0?e.length-1:0)}}const N=":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{position:relative;width:var(--slot-height);min-width:var(--slot-height);height:auto;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));padding-right:0;gap:var(--luzmo-droppable-slot-filled-gap, var(--droppable-slot-filled-gap))}.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));display:flex;justify-content:space-between;align-items:center;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))}: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:dropelementpulse 1s infinite ease-in-out}: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 transparent,0 0 0 1rem transparent}}: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));flex-grow:1;max-width:var(--luzmo-droppable-slot-label-max-width);margin-right:var(--luzmo-droppable-slot-text-to-controls, var(--droppable-slot-text-to-controls));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.controls{height:100%;display:flex;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));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)}.controls div{cursor:pointer;height:100%;display:flex;align-items:center;padding:0 var(--luzmo-droppable-slot-controls-control-horizontal-padding, var(--droppable-slot-controls-control-horizontal-padding))}.droppable-slot.rotate{position:absolute;top:0;left:50%;transform-origin:center;max-width:15rem;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-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-accept-drag-controls-background-color: var( --luzmo-positive-color-down );--droppable-slot-accept-drag-controls-color: white;--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: var(--luzmo-secondary-outline);--droppable-slot-border-radius: var(--luzmo-border-radius);--droppable-slot-filled-gap: var(--luzmo-spacing-5)}:host{--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-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}",q={Category:()=>z.msg("Category",{desc:"Category label"}),Measure:()=>z.msg("Measure",{desc:"Measure label"}),Legend:()=>z.msg("Legend",{desc:"Legend label"}),"Y-Axis":()=>z.msg("Y-Axis",{desc:"Y-Axis label"}),"X-Axis":()=>z.msg("X-Axis",{desc:"X-Axis label"}),"Group by":()=>z.msg("Group by",{desc:"Group by label"})};var j=Object.defineProperty,F=Object.getOwnPropertyDescriptor,d=(g,t,e,o)=>{for(var l=o>1?void 0:o?F(t,e):t,i=g.length-1,r;i>=0;i--)(r=g[i])&&(l=(o?r(t,e,l):r(l))||l);return o&&l&&j(t,e,l),l};exports.LuzmoDroppableSlot=class extends M.SizedMixin(I.LuzmoElement,{validSizes:["s","m","l","xl"],noDefaultSize:!0}){constructor(){super(),this._loadSlotsConfig=new O.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-comparison-filter/date-comparison-filter-slots.config.ts":()=>Promise.resolve().then(()=>require("../date-comparison-filter-slots.config-CrA5ijD3.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"))}),o=`../../item-definitions/${t}/${t}-slots.config.ts`;if(e[o]){const l=await e[o]();this._itemTypeLoaded=t,this._slotsConfig=(l==null?void 0:l.default)??{}}return this._slotsConfig}},args:()=>[this.itemType,this.language]}),this.slotConfiguration={},this.slotsContents=[],this.language="en",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 B,this._currentSlotContents=[],this._lastFetchedDatasetId=null,this._linkedDatasetsIds=[],this._attachDroppable=()=>{this._cleanupDroppable||(this._cleanupDroppable=A.dropTargetForElements({element:this,onDrop:async t=>{var a,p,s,u,c;const e={...(a=t.source)==null?void 0:a.data},o={...(e==null?void 0:e.label)??{en:"Untitled"}},l=e==null?void 0:e.type;if(l==="datetime"&&!e.level&&(e.level=e.lowestLevel??(e.subtype==="date"?5:9)),l==="datetime"&&((s=(p=t==null?void 0:t.source)==null?void 0:p.element)!=null&&s.hasAttribute("sublevel"))){const h=["(Yr)","(Qtr)","(Mth)","(Wk)","(Date)","(Hr)","(Min)","(Sec)","(Msec)"],v=(e==null?void 0:e.level)??1,f=Object.keys(o);for(const m of f)o[m]=`${o[m]} ${h[v-1]}`;e.label=e.name=o}const{securable_id:i}=e;i&&i!==this._lastFetchedDatasetId&&(this._lastFetchedDatasetId=i,await k.dataBroker.fetchDatasetsRecursive([i]),this._linkedDatasetsIds=k.dataBroker.getLinkedDatasetsIds(i));const r=((u=this._slotContents)==null?void 0:u.length)===0;this._slotContents=(c=this.slotConfiguration)!=null&&c.canAcceptMultipleDataItems?[...this._slotContents??[],e]:[e],this.removeAttribute("accept-drag"),r?(this._overlayReady=!1,setTimeout(()=>{this._overlayReady=!0},200)):this._overlayReady=!0,this.changedSlotContents(this._slotContents,this._linkedDatasetsIds)},canDrop:({source:t})=>this._canDropItem({source:t}),getDropEffect:()=>"move",onDragEnter:()=>{this.setAttribute("accept-drag",""),this.classList.add("pulse")},onDragLeave:()=>{this.removeAttribute("accept-drag"),this.classList.remove("pulse")}}))},this._canDropItem=({source:t})=>{var o,l,i,r,a,p,s,u,c,h,v,f,m;if(!["LUZMO-DRAGGABLE-DATA-ITEM-LEVEL","LUZMO-DRAGGABLE-DATA-ITEM"].includes((o=t.element)==null?void 0:o.tagName)||!((l=this.slotConfiguration)!=null&&l.canAcceptFormula)&&((i=t==null?void 0:t.data)!=null&&i.formulaId||(r=t==null?void 0:t.data)!=null&&r.formula||((a=t==null?void 0:t.data)==null?void 0:a.entity)==="formula"))return!1;const e=((s=(p=this.slotConfiguration)==null?void 0:p.acceptableDataItemTypes)==null?void 0:s.length)>0?this.slotConfiguration.acceptableDataItemTypes:["datetime","hierarchy","numeric","array[datetime]","array[numeric]","array[hierarchy]"];return(u=t==null?void 0:t.data)!=null&&u.type&&!e.includes((c=t==null?void 0:t.data)==null?void 0:c.type)?!1:!((h=t==null?void 0:t.data)!=null&&h.subtype&&((f=(v=this.slotConfiguration)==null?void 0:v.acceptableColumnSubtypes)==null?void 0:f.length)>0&&!this.slotConfiguration.acceptableColumnSubtypes.includes((m=t==null?void 0:t.data)==null?void 0:m.subtype))},this.changedSlotContents=(t,e=[])=>{var o;(o=this._store)==null||o.setContents(t,this.slotName),this.dispatchEvent(new CustomEvent("slot-contents-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContents:t,linkedDatasetsIds:e}}))},this._handleDragStart=t=>{var r;const e=t,o=(r=e.detail)==null?void 0:r.data;if(this._overlayElement&&(this._overlayElement.open=!1),!o)return;const l={data:o,element:{tagName:e.target instanceof HTMLElement&&e.target.tagName==="LUZMO-DRAGGABLE-DATA-ITEM-LEVEL"?"LUZMO-DRAGGABLE-DATA-ITEM-LEVEL":"LUZMO-DRAGGABLE-DATA-ITEM"}};this._canDropItem({source:l})&&this.setAttribute("would-accept-drag","")},this._handleDragEnd=()=>{this.removeAttribute("would-accept-drag")},this._handleOverlayClick=t=>{t.detail>0&&t.target===this._overlayElement?this._overlayElement.open=!1:t.stopPropagation()},new G(this,{context:b.slotContext,initialValue:this._store})}connectedCallback(){super.connectedCallback(),this._attachDroppable(),document.addEventListener("data-item-drag-started",this._handleDragStart),document.addEventListener("data-item-dropped",this._handleDragEnd)}disconnectedCallback(){var t,e;super.disconnectedCallback(),this._cleanupDroppable&&(this._cleanupDroppable(),this._cleanupDroppable=void 0),(e=(t=this._loadSlotsConfig).abort)==null||e.call(t),document.removeEventListener("data-item-drag-started",this._handleDragStart),document.removeEventListener("data-item-dropped",this._handleDragEnd)}emptySlotContents(t){t.preventDefault(),t.stopPropagation(),this._slotContents=[],this.changedSlotContents([])}willUpdate(t){t.has("slotConfiguration")&&(this._cleanupDroppable&&(this._cleanupDroppable(),this._cleanupDroppable=void 0),this._attachDroppable()),t.has("slotsContents")&&this._processSlotsContents(),t.has("language")&&this.language!==_.getLocale()&&([..._.targetLocales].includes(this.language??"en")||this.language==="en")&&_.setLocale(this.language)}_processSlotsContents(){var t,e,o,l,i;(t=this._store)==null||t.setFullContents(this.slotsContents),this._slotContents=((o=(e=this.slotsContents)==null?void 0:e.find(r=>r.name===this.slotName))==null?void 0:o.content)??[],this._currentSlotContents=[...this._slotContents],((l=this._slotContents)==null?void 0:l.length)>0&&(this._overlayReady=!0),(i=this._store)==null||i.setContents(this._slotContents)}firstUpdated(){this._attachDroppable()}_onOverlayClosed(t){const e=t.overlay;this._slotMenuElement&&e===this._overlayElement&&(setTimeout(()=>{this._slotMenuElement.resetPosition()},500),this.dispatchEvent(new CustomEvent("slot-menu-inactive",{bubbles:!0,composed:!0})))}_onOverlayOpened(t){var o,l,i,r,a;const e=t.overlay;if(this._slotMenuElement&&e===this._overlayElement){const p=((i=(o=this._store)==null?void 0:(l=o.activeIndex).get)==null?void 0:i.call(l))??0,s=((r=this._slotContents)==null?void 0:r[p])??((a=this._slotContents)==null?void 0:a[0]);if(!s)return;const u=(s==null?void 0:s.column)??(s==null?void 0:s.columnId),c=(s==null?void 0:s.set)??(s==null?void 0:s.datasetId),h=s==null?void 0:s.formula;(u||h)&&c&&(this.dispatchEvent(new CustomEvent("slot-menu-active",{bubbles:!0,composed:!0,detail:{securableId:c}})),setTimeout(()=>{this.dispatchEvent(new CustomEvent("slot-menu-highlight",{bubbles:!0,composed:!0,detail:{columnId:u,securableId:c,formulaId:h,level:(s==null?void 0:s.level)??0}}))}))}}_onSlotMenuChanges(t){var o;t.preventDefault(),t.stopPropagation();const e=t.detail.linkedDatasetsIds;this._slotContents.length===((o=t.detail.slotContents)==null?void 0:o.length)?(this._currentSlotContents=t.detail.slotContents,this.changedSlotContents(this._currentSlotContents,e)):(this._slotContents=t.detail.slotContents,this.changedSlotContents(this._slotContents,e))}get _fullLabel(){var l,i,r,a,p,s,u,c,h;let t="";const e=q[(l=this.slotConfiguration)==null?void 0:l.label]?q[(i=this.slotConfiguration)==null?void 0:i.label]():(r=this.slotConfiguration)==null?void 0:r.label;((a=this._currentSlotContents)==null?void 0:a.length)===1?t=T.localize((s=(p=this._currentSlotContents)==null?void 0:p[0])==null?void 0:s.label,this.language)??"Untitled":((u=this._currentSlotContents)==null?void 0:u.length)>1&&(t=`${this._currentSlotContents.length} items`);let o=this.label||e||"Untitled";return((c=this._currentSlotContents)==null?void 0:c.length)>0&&(o+=((h=this._currentSlotContents)==null?void 0:h.length)>1?`: ${this._currentSlotContents.length} items`:`: ${t}`),o}droppableSlotMarkup(){var e,o,l,i,r,a,p,s,u,c,h,v,f,m,D,x,S,L,P;const t=n.x`
28
+ */class R extends Event{constructor(t,e){super("context-provider",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=e}}class B extends U{constructor(t,e,o){var l,i;super(e.context!==void 0?e.initialValue:o),this.onContextRequest=s=>{if(s.context!==this.context)return;const a=s.contextTarget??s.composedPath()[0];a!==this.host&&(s.stopPropagation(),this.addCallback(s.callback,a,s.subscribe))},this.onProviderRequest=s=>{if(s.context!==this.context||(s.contextTarget??s.composedPath()[0])===this.host)return;const a=new Set;for(const[p,{consumerHost:r}]of this.subscriptions)a.has(p)||(a.add(p),r.dispatchEvent(new b.s(this.context,r,p,!0)));s.stopPropagation()},this.host=t,e.context!==void 0?this.context=e.context:this.context=e,this.attachListeners(),(i=(l=this.host).addController)==null||i.call(l,this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new R(this.context,this.host))}}class G{constructor(){this.slotContents=b.r([]),this.slotsContents=b.r([]),this.periodOverPeriodUiType=b.r(null),this.linkedDataset=b.r([]),this._popEnabledChartTypes=["area-chart","bar-chart","combination-chart","column-chart","line-chart"],this.activeSlotContents=b.i(()=>this.slotContents.get()[this.activeIndex.get()]),this.activeIndex=b.r(0)}isArrayColumnType(t){return new Set(["array[numeric]","array[spatial]","array[datetime]","array[hierarchy]"]).has(t)}setPeriodOverPeriodCondition(t,e){var o;if(!((o=e==null?void 0:e.periodOverPeriod)!=null&&o.newUi)){this.periodOverPeriodUiType.set(this.oldConditionalLogic(t));return}this.periodOverPeriodUiType.set(this.getUiConditionToApply(e))}getUiConditionToApply(t){var i;const e=this.hasDatetimeColumnOnCategoryOrXAxis(),o=(i=t==null?void 0:t.periodOverPeriod)==null?void 0:i.hasConnectedComparisonFilter,l=this.linkedDataset.get().some(({columns:s})=>s==null?void 0:s.some(a=>a.type==="datetime"));return!e&&!o&&!l?null:e&&o?y.PeriodOverPeriodCondition.HasDatetimeColumnAndComparisonFilters:e&&!o?y.PeriodOverPeriodCondition.HasDatetimeColumnAndNoComparisonFilters:!e&&o?y.PeriodOverPeriodCondition.NoDatetimeColumnButComparisonFilters:y.PeriodOverPeriodCondition.NoDatetimeColumnAndNoComparisonFilters}oldConditionalLogic(t){var a,p;const e=this.slotsContents.get()??[],o=((a=e.find(r=>["y-axis","x-axis","row"].includes(r.name)))==null?void 0:a.content)??[],l=(o==null?void 0:o[0])??null,i=((p=e.find(r=>r.name==="measure"))==null?void 0:p.content)??[];return l&&this._popEnabledChartTypes.includes(t)&&l.type==="datetime"&&!this.isArrayColumnType(l.type)&&!l.datetimeDisplayMode&&l.level!==4&&i.length>0?y.PeriodOverPeriodCondition.OldImplementation:null}hasDatetimeColumnOnCategoryOrXAxis(){var l;const e=((l=(this.slotsContents.get()??[]).find(i=>["y-axis","x-axis"].includes(i.name)))==null?void 0:l.content)??[],o=(e==null?void 0:e[0])??null;return!!(o&&o.type==="datetime"&&!this.isArrayColumnType(o.type))}setContents(t,e){if(this.slotContents.set(t),this.activeIndex.get()>=t.length&&this.activeIndex.set(t.length>0?t.length-1:0),e){const o=structuredClone(this.slotsContents.get())??[],l=o.find(i=>i.name===e);l&&(l.content=t),this.setFullContents(o)}}setFullContents(t){this.slotsContents.set(t)}updateActive(t){t>=0&&t<this.slotContents.get().length&&this.activeIndex.set(t)}updateContent(t,e=this.activeIndex.get()){if(e<0||e>=this.slotContents.get().length)return;const o=[...this.slotContents.get()];o[e]=structuredClone(t),this.slotContents.set(o)}removeContent(t){if(t<0||t>=this.slotContents.get().length)return;const e=this.slotContents.get().filter((o,l)=>l!==t);this.slotContents.set(e),this.activeIndex.get()>=e.length&&this.activeIndex.set(e.length>0?e.length-1:0)}}const F=":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{position:relative;width:var(--slot-height);min-width:var(--slot-height);height:auto;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));padding-right:0;gap:var(--luzmo-droppable-slot-filled-gap, var(--droppable-slot-filled-gap))}.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));display:flex;justify-content:space-between;align-items:center;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))}: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:dropelementpulse 1s infinite ease-in-out}: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 transparent,0 0 0 1rem transparent}}: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));flex-grow:1;max-width:var(--luzmo-droppable-slot-label-max-width);margin-right:var(--luzmo-droppable-slot-text-to-controls, var(--droppable-slot-text-to-controls));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.controls{height:100%;display:flex;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));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)}.controls div{cursor:pointer;height:100%;display:flex;align-items:center;padding:0 var(--luzmo-droppable-slot-controls-control-horizontal-padding, var(--droppable-slot-controls-control-horizontal-padding))}.droppable-slot.rotate{position:absolute;top:0;left:50%;transform-origin:center;max-width:15rem;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-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-accept-drag-controls-background-color: var( --luzmo-positive-color-down );--droppable-slot-accept-drag-controls-color: white;--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: var(--luzmo-secondary-outline);--droppable-slot-border-radius: var(--luzmo-border-radius);--droppable-slot-filled-gap: var(--luzmo-spacing-5)}:host{--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-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}",q={Category:()=>z.msg("Category",{desc:"Category label"}),Measure:()=>z.msg("Measure",{desc:"Measure label"}),Legend:()=>z.msg("Legend",{desc:"Legend label"}),"Y-Axis":()=>z.msg("Y-Axis",{desc:"Y-Axis label"}),"X-Axis":()=>z.msg("X-Axis",{desc:"X-Axis label"}),"Group by":()=>z.msg("Group by",{desc:"Group by label"})};var N=Object.defineProperty,j=Object.getOwnPropertyDescriptor,d=(g,t,e,o)=>{for(var l=o>1?void 0:o?j(t,e):t,i=g.length-1,s;i>=0;i--)(s=g[i])&&(l=(o?s(t,e,l):s(l))||l);return o&&l&&N(t,e,l),l};exports.LuzmoDroppableSlot=class extends M.SizedMixin(I.LuzmoElement,{validSizes:["s","m","l","xl"],noDefaultSize:!0}){constructor(){super(),this._loadSlotsConfig=new O.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-comparison-filter/date-comparison-filter-slots.config.ts":()=>Promise.resolve().then(()=>require("../date-comparison-filter-slots.config-CrA5ijD3.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"))}),o=`../../item-definitions/${t}/${t}-slots.config.ts`;if(e[o]){const l=await e[o]();this._itemTypeLoaded=t,this._slotsConfig=(l==null?void 0:l.default)??{}}return this._slotsConfig}},args:()=>[this.itemType,this.language]}),this.slotConfiguration={},this.slotsContents=[],this.language="en",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 G,this._currentSlotContents=[],this._lastFetchedDatasetId=null,this._linkedDatasetsIds=[],this._attachDroppable=()=>{this._cleanupDroppable||(this._cleanupDroppable=A.dropTargetForElements({element:this,onDrop:async t=>{var a,p,r,u,c;const e={...(a=t.source)==null?void 0:a.data},o={...(e==null?void 0:e.label)??{en:"Untitled"}},l=e==null?void 0:e.type;if(l==="datetime"&&!e.level&&(e.level=e.lowestLevel??(e.subtype==="date"?5:9)),l==="datetime"&&((r=(p=t==null?void 0:t.source)==null?void 0:p.element)!=null&&r.hasAttribute("sublevel"))){const h=["(Yr)","(Qtr)","(Mth)","(Wk)","(Date)","(Hr)","(Min)","(Sec)","(Msec)"],v=(e==null?void 0:e.level)??1,f=Object.keys(o);for(const m of f)o[m]=`${o[m]} ${h[v-1]}`;e.label=e.name=o}const{securable_id:i}=e;i&&i!==this._lastFetchedDatasetId&&(this._lastFetchedDatasetId=i,await k.dataBroker.fetchDatasetsRecursive([i]),this._linkedDatasetsIds=k.dataBroker.getLinkedDatasetsIds(i));const s=((u=this._slotContents)==null?void 0:u.length)===0;this._slotContents=(c=this.slotConfiguration)!=null&&c.canAcceptMultipleDataItems?[...this._slotContents??[],e]:[e],this.removeAttribute("accept-drag"),s?(this._overlayReady=!1,setTimeout(()=>{this._overlayReady=!0},200)):this._overlayReady=!0,this.changedSlotContents(this._slotContents,this._linkedDatasetsIds)},canDrop:({source:t})=>this._canDropItem({source:t}),getDropEffect:()=>"move",onDragEnter:()=>{this.setAttribute("accept-drag",""),this.classList.add("pulse")},onDragLeave:()=>{this.removeAttribute("accept-drag"),this.classList.remove("pulse")}}))},this._canDropItem=({source:t})=>{var o,l,i,s,a,p,r,u,c,h,v,f,m;if(!["LUZMO-DRAGGABLE-DATA-ITEM-LEVEL","LUZMO-DRAGGABLE-DATA-ITEM"].includes((o=t.element)==null?void 0:o.tagName)||!((l=this.slotConfiguration)!=null&&l.canAcceptFormula)&&((i=t==null?void 0:t.data)!=null&&i.formulaId||(s=t==null?void 0:t.data)!=null&&s.formula||((a=t==null?void 0:t.data)==null?void 0:a.entity)==="formula"))return!1;const e=((r=(p=this.slotConfiguration)==null?void 0:p.acceptableDataItemTypes)==null?void 0:r.length)>0?this.slotConfiguration.acceptableDataItemTypes:["datetime","hierarchy","numeric","array[datetime]","array[numeric]","array[hierarchy]"];return(u=t==null?void 0:t.data)!=null&&u.type&&!e.includes((c=t==null?void 0:t.data)==null?void 0:c.type)?!1:!((h=t==null?void 0:t.data)!=null&&h.subtype&&((f=(v=this.slotConfiguration)==null?void 0:v.acceptableColumnSubtypes)==null?void 0:f.length)>0&&!this.slotConfiguration.acceptableColumnSubtypes.includes((m=t==null?void 0:t.data)==null?void 0:m.subtype))},this.changedSlotContents=(t,e=[])=>{var o;(o=this._store)==null||o.setContents(t,this.slotName),this.dispatchEvent(new CustomEvent("slot-contents-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContents:t,linkedDatasetsIds:e}}))},this._handleDragStart=t=>{var s;const e=t,o=(s=e.detail)==null?void 0:s.data;if(this._overlayElement&&(this._overlayElement.open=!1),!o)return;const l={data:o,element:{tagName:e.target instanceof HTMLElement&&e.target.tagName==="LUZMO-DRAGGABLE-DATA-ITEM-LEVEL"?"LUZMO-DRAGGABLE-DATA-ITEM-LEVEL":"LUZMO-DRAGGABLE-DATA-ITEM"}};this._canDropItem({source:l})&&this.setAttribute("would-accept-drag","")},this._handleDragEnd=()=>{this.removeAttribute("would-accept-drag")},this._handleOverlayClick=t=>{t.detail>0&&t.target===this._overlayElement?this._overlayElement.open=!1:t.stopPropagation()},new B(this,{context:b.slotContext,initialValue:this._store})}connectedCallback(){super.connectedCallback(),this._attachDroppable(),document.addEventListener("data-item-drag-started",this._handleDragStart),document.addEventListener("data-item-dropped",this._handleDragEnd)}disconnectedCallback(){var t,e;super.disconnectedCallback(),this._cleanupDroppable&&(this._cleanupDroppable(),this._cleanupDroppable=void 0),(e=(t=this._loadSlotsConfig).abort)==null||e.call(t),document.removeEventListener("data-item-drag-started",this._handleDragStart),document.removeEventListener("data-item-dropped",this._handleDragEnd)}emptySlotContents(t){t.preventDefault(),t.stopPropagation(),this._slotContents=[],this.changedSlotContents([])}willUpdate(t){t.has("slotConfiguration")&&(this._cleanupDroppable&&(this._cleanupDroppable(),this._cleanupDroppable=void 0),this._attachDroppable()),t.has("slotsContents")&&this._processSlotsContents(),t.has("language")&&this.language!==_.getLocale()&&([..._.targetLocales].includes(this.language??"en")||this.language==="en")&&_.setLocale(this.language)}_processSlotsContents(){var t,e,o,l,i;(t=this._store)==null||t.setFullContents(this.slotsContents),this._slotContents=((o=(e=this.slotsContents)==null?void 0:e.find(s=>s.name===this.slotName))==null?void 0:o.content)??[],this._currentSlotContents=[...this._slotContents],((l=this._slotContents)==null?void 0:l.length)>0&&(this._overlayReady=!0),(i=this._store)==null||i.setContents(this._slotContents)}firstUpdated(){this._attachDroppable()}_onOverlayClosed(t){const e=t.overlay;this._slotMenuElement&&e===this._overlayElement&&(setTimeout(()=>{this._slotMenuElement.resetPosition()},500),this.dispatchEvent(new CustomEvent("slot-menu-inactive",{bubbles:!0,composed:!0})))}_onOverlayOpened(t){var o,l,i,s,a;const e=t.overlay;if(this._slotMenuElement&&e===this._overlayElement){const p=((i=(o=this._store)==null?void 0:(l=o.activeIndex).get)==null?void 0:i.call(l))??0,r=((s=this._slotContents)==null?void 0:s[p])??((a=this._slotContents)==null?void 0:a[0]);if(!r)return;const u=(r==null?void 0:r.column)??(r==null?void 0:r.columnId),c=(r==null?void 0:r.set)??(r==null?void 0:r.datasetId),h=r==null?void 0:r.formula;(u||h)&&c&&(this.dispatchEvent(new CustomEvent("slot-menu-active",{bubbles:!0,composed:!0,detail:{securableId:c}})),setTimeout(()=>{this.dispatchEvent(new CustomEvent("slot-menu-highlight",{bubbles:!0,composed:!0,detail:{columnId:u,securableId:c,formulaId:h,level:(r==null?void 0:r.level)??0}}))}))}}_onSlotMenuChanges(t){var o;t.preventDefault(),t.stopPropagation();const e=t.detail.linkedDatasetsIds;this._slotContents.length===((o=t.detail.slotContents)==null?void 0:o.length)?(this._currentSlotContents=t.detail.slotContents,this.changedSlotContents(this._currentSlotContents,e)):(this._slotContents=t.detail.slotContents,this.changedSlotContents(this._slotContents,e))}get _fullLabel(){var l,i,s,a,p,r,u,c,h;let t="";const e=q[(l=this.slotConfiguration)==null?void 0:l.label]?q[(i=this.slotConfiguration)==null?void 0:i.label]():(s=this.slotConfiguration)==null?void 0:s.label;((a=this._currentSlotContents)==null?void 0:a.length)===1?t=T.localize((r=(p=this._currentSlotContents)==null?void 0:p[0])==null?void 0:r.label,this.language)??"Untitled":((u=this._currentSlotContents)==null?void 0:u.length)>1&&(t=`${this._currentSlotContents.length} items`);let o=this.label||e||"Untitled";return((c=this._currentSlotContents)==null?void 0:c.length)>0&&(o+=((h=this._currentSlotContents)==null?void 0:h.length)>1?`: ${this._currentSlotContents.length} items`:`: ${t}`),o}droppableSlotMarkup(){var e,o,l,i,s,a,p,r,u,c,h,v,f,m,D,x,L,P,S;const t=n.x`
29
29
  <div
30
30
  id="trigger"
31
31
  class="droppable-slot ${(e=this.slotConfiguration)!=null&&e.rotate?"rotate":""}"
@@ -34,7 +34,7 @@
34
34
  <div class="droppable-slot-label">${this._fullLabel}</div>
35
35
  ${((l=this._slotContents)==null?void 0:l.length)>0&&!(this.hideConfiguration&&this.hideDelete)?n.x`<div class="controls">
36
36
  ${this.hideConfiguration?"":n.x`<div>
37
- ${y.y3(y.M1)}
37
+ ${C.y3(C.M1)}
38
38
  <luzmo-tooltip
39
39
  self-managed
40
40
  placement=${(i=this.slotConfiguration)!=null&&i.rotate?"right":"top"}
@@ -44,10 +44,10 @@
44
44
  </luzmo-tooltip>
45
45
  </div> `}
46
46
  ${this.hideDelete?"":n.x`<div @click=${this.emptySlotContents}>
47
- ${y.y3(y.C1)}
47
+ ${C.y3(C.C1)}
48
48
  <luzmo-tooltip
49
49
  self-managed
50
- placement=${(r=this.slotConfiguration)!=null&&r.rotate?"right":"top"}
50
+ placement=${(s=this.slotConfiguration)!=null&&s.rotate?"right":"top"}
51
51
  size=${this.size}
52
52
  >
53
53
  Delete
@@ -66,14 +66,14 @@
66
66
  language=${this.language}
67
67
  content-language=${this.language}
68
68
  drag-boundary=${this.dragBoundary}
69
- slot-type=${(s=this.slotConfiguration)==null?void 0:s.type}
69
+ slot-type=${(r=this.slotConfiguration)==null?void 0:r.type}
70
70
  slot-name=${this.slotName}
71
71
  item-type=${this.itemType}
72
72
  .areGrandTotalsEnabled=${(c=(u=this.slotConfiguration)==null?void 0:u.options)==null?void 0:c.areGrandTotalsEnabled}
73
73
  .areDatetimeOptionsEnabled=${(v=(h=this.slotConfiguration)==null?void 0:h.options)==null?void 0:v.areDatetimeOptionsEnabled}
74
74
  .isBinningDisabled=${(m=(f=this.slotConfiguration)==null?void 0:f.options)==null?void 0:m.isBinningDisabled}
75
75
  .isAggregationDisabled=${(x=(D=this.slotConfiguration)==null?void 0:D.options)==null?void 0:x.isAggregationDisabled}
76
- .isCumulativeSumEnabled=${(L=(S=this.slotConfiguration)==null?void 0:S.options)==null?void 0:L.isCumulativeSumEnabled}
76
+ .isCumulativeSumEnabled=${(P=(L=this.slotConfiguration)==null?void 0:L.options)==null?void 0:P.isCumulativeSumEnabled}
77
77
  slot-contents=${this._slotContents}
78
78
  variant=${this.menu==="draggable"?"draggable":"popup"}
79
79
  .size=${this.size}
@@ -84,9 +84,9 @@
84
84
  ></luzmo-slot-menu>
85
85
  </luzmo-overlay>`:""}
86
86
  </div>
87
- `;return(P=this.slotConfiguration)!=null&&P.rotate?n.x`<div class="droppable-slot-wrapper">${t}</div>`:t}render(){return this.slotConfiguration&&Object.keys(this.slotConfiguration).length>0?this.droppableSlotMarkup():this._loadSlotsConfig.render({pending:()=>n.x`<p>Loading...</p>`,complete:t=>{if(this.slotName&&this.itemType&&t){const e=t.find(o=>o.name===this.slotName);e&&(this.slotConfiguration=e)}return this.droppableSlotMarkup()},error:t=>n.x`
87
+ `;return(S=this.slotConfiguration)!=null&&S.rotate?n.x`<div class="droppable-slot-wrapper">${t}</div>`:t}render(){return this.slotConfiguration&&Object.keys(this.slotConfiguration).length>0?this.droppableSlotMarkup():this._loadSlotsConfig.render({pending:()=>n.x`<p>Loading...</p>`,complete:t=>{if(this.slotName&&this.itemType&&t){const e=t.find(o=>o.name===this.slotName);e&&(this.slotConfiguration=e)}return this.droppableSlotMarkup()},error:t=>n.x`
88
88
  <div>
89
89
  Could not load droppable slot: '${this.slotName}' of chart
90
90
  '${this.itemType}': ${t}.
91
91
  </div>
92
- `})}};exports.LuzmoDroppableSlot.styles=n.r(N);d([n.n({type:String,reflect:!0,attribute:"item-type"})],exports.LuzmoDroppableSlot.prototype,"itemType",2);d([n.n({type:String,reflect:!0,attribute:"slot-name"})],exports.LuzmoDroppableSlot.prototype,"slotName",2);d([n.n({type:Object})],exports.LuzmoDroppableSlot.prototype,"slotConfiguration",2);d([n.n({type:Object})],exports.LuzmoDroppableSlot.prototype,"slotsContents",2);d([n.n({type:String,reflect:!0})],exports.LuzmoDroppableSlot.prototype,"label",2);d([n.n({type:String,reflect:!0})],exports.LuzmoDroppableSlot.prototype,"language",2);d([n.n({type:String,reflect:!0,attribute:"drag-boundary"})],exports.LuzmoDroppableSlot.prototype,"dragBoundary",2);d([n.n({type:String,attribute:"api-url",reflect:!0})],exports.LuzmoDroppableSlot.prototype,"apiUrl",2);d([n.n({type:String,attribute:"auth-key",reflect:!0})],exports.LuzmoDroppableSlot.prototype,"authKey",2);d([n.n({type:String,attribute:"auth-token",reflect:!0})],exports.LuzmoDroppableSlot.prototype,"authToken",2);d([n.n({type:String,reflect:!0})],exports.LuzmoDroppableSlot.prototype,"menu",2);d([n.n({type:String,reflect:!0})],exports.LuzmoDroppableSlot.prototype,"placement",2);d([n.n({type:Boolean,reflect:!0,attribute:"hide-delete"})],exports.LuzmoDroppableSlot.prototype,"hideDelete",2);d([n.n({type:Boolean,reflect:!0,attribute:"hide-configuration"})],exports.LuzmoDroppableSlot.prototype,"hideConfiguration",2);d([w.e("luzmo-slot-menu")],exports.LuzmoDroppableSlot.prototype,"_slotMenuElement",2);d([w.e("luzmo-overlay")],exports.LuzmoDroppableSlot.prototype,"_overlayElement",2);d([E.r()],exports.LuzmoDroppableSlot.prototype,"_slotContents",2);d([E.r()],exports.LuzmoDroppableSlot.prototype,"_overlayReady",2);exports.LuzmoDroppableSlot=d([$.localized()],exports.LuzmoDroppableSlot);customElements.get("luzmo-droppable-slot")||customElements.define("luzmo-droppable-slot",exports.LuzmoDroppableSlot);
92
+ `})}};exports.LuzmoDroppableSlot.styles=n.r(F);d([n.n({type:String,reflect:!0,attribute:"item-type"})],exports.LuzmoDroppableSlot.prototype,"itemType",2);d([n.n({type:String,reflect:!0,attribute:"slot-name"})],exports.LuzmoDroppableSlot.prototype,"slotName",2);d([n.n({type:Object})],exports.LuzmoDroppableSlot.prototype,"slotConfiguration",2);d([n.n({type:Object})],exports.LuzmoDroppableSlot.prototype,"slotsContents",2);d([n.n({type:String,reflect:!0})],exports.LuzmoDroppableSlot.prototype,"label",2);d([n.n({type:String,reflect:!0})],exports.LuzmoDroppableSlot.prototype,"language",2);d([n.n({type:String,reflect:!0,attribute:"drag-boundary"})],exports.LuzmoDroppableSlot.prototype,"dragBoundary",2);d([n.n({type:String,attribute:"api-url",reflect:!0})],exports.LuzmoDroppableSlot.prototype,"apiUrl",2);d([n.n({type:String,attribute:"auth-key",reflect:!0})],exports.LuzmoDroppableSlot.prototype,"authKey",2);d([n.n({type:String,attribute:"auth-token",reflect:!0})],exports.LuzmoDroppableSlot.prototype,"authToken",2);d([n.n({type:String,reflect:!0})],exports.LuzmoDroppableSlot.prototype,"menu",2);d([n.n({type:String,reflect:!0})],exports.LuzmoDroppableSlot.prototype,"placement",2);d([n.n({type:Boolean,reflect:!0,attribute:"hide-delete"})],exports.LuzmoDroppableSlot.prototype,"hideDelete",2);d([n.n({type:Boolean,reflect:!0,attribute:"hide-configuration"})],exports.LuzmoDroppableSlot.prototype,"hideConfiguration",2);d([w.e("luzmo-slot-menu")],exports.LuzmoDroppableSlot.prototype,"_slotMenuElement",2);d([w.e("luzmo-overlay")],exports.LuzmoDroppableSlot.prototype,"_overlayElement",2);d([E.r()],exports.LuzmoDroppableSlot.prototype,"_slotContents",2);d([E.r()],exports.LuzmoDroppableSlot.prototype,"_overlayReady",2);exports.LuzmoDroppableSlot=d([$.localized()],exports.LuzmoDroppableSlot);customElements.get("luzmo-droppable-slot")||customElements.define("luzmo-droppable-slot",exports.LuzmoDroppableSlot);
@@ -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 { a as O } from "../get-css-variable-YlLiVgo8.js";
20
+ import { a as T } from "../get-css-variable-YlLiVgo8.js";
21
21
  import { s as I, r as y, i as M, a as P } from "../index-ROK-0H25.js";
22
22
  import { l as U } from "../localized-decorator-DEV_0e49.js";
23
23
  import { m as z } from "../runtime-BSHB_4iz.js";
@@ -25,22 +25,22 @@ import { h as R } from "../task-Bh_X-xIU.js";
25
25
  import { ak as E, an as G, aj as B } from "../luzmo-icons-Bn3XEkNW.js";
26
26
  import "../index-Bj1ejOP6.js";
27
27
  import { d as S } from "../index-Cyo2hwg7.js";
28
- import { l as N } from "../localize-BX7q0S0M.js";
29
- import { x as b, r as F, n as u } from "../property-DCzt3DR1.js";
28
+ import { l as F } from "../localize-BX7q0S0M.js";
29
+ import { x as b, r as N, n as u } from "../property-DCzt3DR1.js";
30
30
  import { r as L } from "../state-nDsQPund.js";
31
31
  import { e as $ } from "../query-Ddbd72Um.js";
32
32
  import { L as j } from "../focusable-BbymtxWI.js";
33
- import { S as V } from "../sized-mixin-BGzkX2g1.js";
33
+ import { S as H } from "../sized-mixin-BGzkX2g1.js";
34
34
  import { P as C } from "../types-RxAJdtVT.js";
35
- import { g as H, t as q, s as X } from "../set-locale-DGtL70Yx.js";
35
+ import { g as V, t as q, s as X } from "../set-locale-DGtL70Yx.js";
36
36
  import "../slot-menu/index.js";
37
- const T = () => {
37
+ const O = () => {
38
38
  if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
39
39
  const o = document.createElement("style");
40
40
  o.setAttribute("data-luzmo-vars", ""), o.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-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-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(o);
41
41
  }
42
42
  };
43
- T();
43
+ O();
44
44
  /**
45
45
  * @license
46
46
  * Copyright 2021 Google LLC
@@ -133,13 +133,16 @@ class Q {
133
133
  this.periodOverPeriodUiType.set(this.oldConditionalLogic(t));
134
134
  return;
135
135
  }
136
- this.periodOverPeriodUiType.set(this.getUiConditionToApply());
136
+ this.periodOverPeriodUiType.set(
137
+ this.getUiConditionToApply(e)
138
+ );
137
139
  }
138
- getUiConditionToApply() {
139
- const t = this.hasDatetimeColumnOnCategoryOrXAxis(), e = this.linkedDataset.get().some(
140
- ({ columns: l }) => l == null ? void 0 : l.some((r) => r.type === "datetime")
140
+ getUiConditionToApply(t) {
141
+ var a;
142
+ const e = this.hasDatetimeColumnOnCategoryOrXAxis(), l = (a = t == null ? void 0 : t.periodOverPeriod) == null ? void 0 : a.hasConnectedComparisonFilter, r = this.linkedDataset.get().some(
143
+ ({ columns: i }) => i == null ? void 0 : i.some((n) => n.type === "datetime")
141
144
  );
142
- return !t && !e ? null : t ? C.HasDatetimeColumnAndNoComparisonFilters : C.NoDatetimeColumnAndNoComparisonFilters;
145
+ return !e && !l && !r ? null : e && l ? C.HasDatetimeColumnAndComparisonFilters : e && !l ? C.HasDatetimeColumnAndNoComparisonFilters : !e && l ? C.NoDatetimeColumnButComparisonFilters : C.NoDatetimeColumnAndNoComparisonFilters;
143
146
  }
144
147
  oldConditionalLogic(t) {
145
148
  var n, s;
@@ -158,14 +161,6 @@ class Q {
158
161
  )) == null ? void 0 : r.content) ?? [], l = (e == null ? void 0 : e[0]) ?? null;
159
162
  return !!(l && l.type === "datetime" && !this.isArrayColumnType(l.type));
160
163
  }
161
- /**
162
- * Detects if there are date comparison filters connected to the widget
163
- * This method will be implemented later
164
- */
165
- // private connectedComparisonDateFilter(): boolean {
166
- // // TODO: Implement logic to detect connected date comparison filters
167
- // return false;
168
- // }
169
164
  /** Replace the full list (e.g. after dropping or re-ordering). */
170
165
  setContents(t, e) {
171
166
  if (this.slotContents.set(t), this.activeIndex.get() >= t.length && this.activeIndex.set(t.length > 0 ? t.length - 1 : 0), e) {
@@ -206,7 +201,7 @@ var J = Object.defineProperty, tt = Object.getOwnPropertyDescriptor, c = (o, t,
206
201
  (i = o[a]) && (r = (l ? i(t, e, r) : i(r)) || r);
207
202
  return l && r && J(t, e, r), r;
208
203
  };
209
- let p = class extends V(j, {
204
+ let p = class extends H(j, {
210
205
  validSizes: ["s", "m", "l", "xl"],
211
206
  noDefaultSize: !0
212
207
  }) {
@@ -270,7 +265,7 @@ let p = class extends V(j, {
270
265
  },
271
266
  args: () => [this.itemType, this.language]
272
267
  }), this.slotConfiguration = {}, this.slotsContents = [], this.language = "en", 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 Q(), this._currentSlotContents = [], this._lastFetchedDatasetId = null, this._linkedDatasetsIds = [], this._attachDroppable = () => {
273
- this._cleanupDroppable || (this._cleanupDroppable = O({
268
+ this._cleanupDroppable || (this._cleanupDroppable = T({
274
269
  element: this,
275
270
  onDrop: async (o) => {
276
271
  var i, n, s, d, m;
@@ -374,7 +369,7 @@ let p = class extends V(j, {
374
369
  o.preventDefault(), o.stopPropagation(), this._slotContents = [], this.changedSlotContents([]);
375
370
  }
376
371
  willUpdate(o) {
377
- o.has("slotConfiguration") && (this._cleanupDroppable && (this._cleanupDroppable(), this._cleanupDroppable = void 0), this._attachDroppable()), o.has("slotsContents") && this._processSlotsContents(), o.has("language") && this.language !== H() && ([...q].includes(this.language ?? "en") || this.language === "en") && X(this.language);
372
+ o.has("slotConfiguration") && (this._cleanupDroppable && (this._cleanupDroppable(), this._cleanupDroppable = void 0), this._attachDroppable()), o.has("slotsContents") && this._processSlotsContents(), o.has("language") && this.language !== V() && ([...q].includes(this.language ?? "en") || this.language === "en") && X(this.language);
378
373
  }
379
374
  _processSlotsContents() {
380
375
  var o, t, e, l, r;
@@ -440,7 +435,7 @@ let p = class extends V(j, {
440
435
  var l, r, a, i, n, s, d, m, h;
441
436
  let o = "";
442
437
  const t = A[(l = this.slotConfiguration) == null ? void 0 : l.label] ? A[(r = this.slotConfiguration) == null ? void 0 : r.label]() : (a = this.slotConfiguration) == null ? void 0 : a.label;
443
- ((i = this._currentSlotContents) == null ? void 0 : i.length) === 1 ? o = N(
438
+ ((i = this._currentSlotContents) == null ? void 0 : i.length) === 1 ? o = F(
444
439
  (s = (n = this._currentSlotContents) == null ? void 0 : n[0]) == null ? void 0 : s.label,
445
440
  this.language
446
441
  ) ?? "Untitled" : ((d = this._currentSlotContents) == null ? void 0 : d.length) > 1 && (o = `${this._currentSlotContents.length} items`);
@@ -448,7 +443,7 @@ let p = class extends V(j, {
448
443
  return ((m = this._currentSlotContents) == null ? void 0 : m.length) > 0 && (e += ((h = this._currentSlotContents) == null ? void 0 : h.length) > 1 ? `: ${this._currentSlotContents.length} items` : `: ${o}`), e;
449
444
  }
450
445
  droppableSlotMarkup() {
451
- var t, e, l, r, a, i, n, s, d, m, h, f, v, g, x, _, k, w, D;
446
+ var t, e, l, r, a, i, n, s, d, m, h, f, v, g, x, _, k, D, w;
452
447
  const o = b`
453
448
  <div
454
449
  id="trigger"
@@ -497,7 +492,7 @@ let p = class extends V(j, {
497
492
  .areDatetimeOptionsEnabled=${(f = (h = this.slotConfiguration) == null ? void 0 : h.options) == null ? void 0 : f.areDatetimeOptionsEnabled}
498
493
  .isBinningDisabled=${(g = (v = this.slotConfiguration) == null ? void 0 : v.options) == null ? void 0 : g.isBinningDisabled}
499
494
  .isAggregationDisabled=${(_ = (x = this.slotConfiguration) == null ? void 0 : x.options) == null ? void 0 : _.isAggregationDisabled}
500
- .isCumulativeSumEnabled=${(w = (k = this.slotConfiguration) == null ? void 0 : k.options) == null ? void 0 : w.isCumulativeSumEnabled}
495
+ .isCumulativeSumEnabled=${(D = (k = this.slotConfiguration) == null ? void 0 : k.options) == null ? void 0 : D.isCumulativeSumEnabled}
501
496
  slot-contents=${this._slotContents}
502
497
  variant=${this.menu === "draggable" ? "draggable" : "popup"}
503
498
  .size=${this.size}
@@ -509,7 +504,7 @@ let p = class extends V(j, {
509
504
  </luzmo-overlay>` : ""}
510
505
  </div>
511
506
  `;
512
- return (D = this.slotConfiguration) != null && D.rotate ? b`<div class="droppable-slot-wrapper">${o}</div>` : o;
507
+ return (w = this.slotConfiguration) != null && w.rotate ? b`<div class="droppable-slot-wrapper">${o}</div>` : o;
513
508
  }
514
509
  render() {
515
510
  return this.slotConfiguration && Object.keys(this.slotConfiguration).length > 0 ? this.droppableSlotMarkup() : this._loadSlotsConfig.render({
@@ -530,7 +525,7 @@ let p = class extends V(j, {
530
525
  });
531
526
  }
532
527
  };
533
- p.styles = F(W);
528
+ p.styles = N(W);
534
529
  c([
535
530
  u({ type: String, reflect: !0, attribute: "item-type" })
536
531
  ], p.prototype, "itemType", 2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luzmo/analytics-components-kit",
3
- "version": "1.0.1-alpha.70",
3
+ "version": "1.0.1-alpha.72",
4
4
  "type": "module",
5
5
  "main": "./components/index.js",
6
6
  "module": "./components/index.js",
@@ -27,10 +27,6 @@ export declare class SlotStore {
27
27
  * Detects if there's a datetime column on Category or X-axis slots
28
28
  */
29
29
  private hasDatetimeColumnOnCategoryOrXAxis;
30
- /**
31
- * Detects if there are date comparison filters connected to the widget
32
- * This method will be implemented later
33
- */
34
30
  /** Replace the full list (e.g. after dropping or re-ordering). */
35
31
  setContents(contents: SlotContent[], slotName?: SlotName): void;
36
32
  setFullContents(fullSlotsContents: VizItemSlots): void;