@luzmo/analytics-components-kit 1.0.1-alpha.81 → 1.0.1-alpha.82

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.
@@ -0,0 +1,139 @@
1
+ /*! * A kit of modern Luzmo Web Components for analytics in your web application.
2
+ *
3
+ * Copyright © 2025 Luzmo
4
+ * All rights reserved.
5
+ * Luzmo web components (“Luzmo Web Components”)
6
+ * must be used according to the Luzmo Terms of Service.
7
+ * This license allows users with a current active Luzmo account
8
+ * to use the Luzmo Web Components. This license terminates
9
+ * automatically if a user no longer has an active Luzmo account.
10
+ * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
11
+ *
12
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
+ * SOFTWARE.
19
+ * */
20
+ import { luzmoTypeArrayHierarchy as l, luzmoTypeArrayHierarchy14 as C, luzmoTypeArrayHierarchy12 as I, luzmoTypeArrayDatetime as o, luzmoTypeArrayDatetime14 as b, luzmoTypeArrayDatetime12 as v, luzmoTypeArrayCurrency as p, luzmoTypeArrayCurrency14 as H, luzmoTypeArrayCurrency12 as N, luzmoTypeArrayDuration as i, luzmoTypeArrayDuration14 as F, luzmoTypeArrayDuration12 as S, luzmoTypeArrayNumeric as n, luzmoTypeArrayNumeric14 as j, luzmoTypeArrayNumeric12 as k, luzmoTypeImage as c, luzmoTypeImage14 as q, luzmoTypeImage12 as w, luzmoTypeTopography as u, luzmoTypeCoordinates as T, luzmoTypeCoordinates14 as B, luzmoTypeCoordinates12 as E, luzmoTypeCurrency as s, luzmoTypeCurrency14 as G, luzmoTypeCurrency12 as J, luzmoTypeDuration as z, luzmoTypeDuration14 as K, luzmoTypeDuration12 as L, luzmoTypeNumeric as h, luzmoTypeNumeric14 as M, luzmoTypeNumeric12 as O, luzmoTypeTime as f, luzmoTypeTime14 as P, luzmoTypeTime12 as Q, luzmoTypeDate as t, luzmoTypeDate14 as R, luzmoTypeDate12 as U, luzmoTypeDatetime as D, luzmoTypeDatetime14 as V, luzmoTypeDatetime12 as W, luzmoTypeIpAddress as x, luzmoTypeIpAddress14 as X, luzmoTypeIpAddress12 as Y, luzmoTypeHierarchy as A, luzmoTypeHierarchy14 as Z, luzmoTypeHierarchy12 as _, luzmoTypeDerived as g, luzmoTypeDerived14 as $, luzmoTypeDerived12 as d, luzmoFormula as m } from "@luzmo/icons";
21
+ const y = {
22
+ "array[hierarchy]": {
23
+ s: I,
24
+ m: C,
25
+ l,
26
+ xl: l
27
+ },
28
+ "array[datetime]": {
29
+ s: v,
30
+ m: b,
31
+ l: o,
32
+ xl: o
33
+ },
34
+ "array[numeric]": {
35
+ s: k,
36
+ m: j,
37
+ l: n,
38
+ xl: n
39
+ },
40
+ "array[currency]": {
41
+ s: N,
42
+ m: H,
43
+ l: p,
44
+ xl: p
45
+ },
46
+ "array[duration]": {
47
+ s: S,
48
+ m: F,
49
+ l: i,
50
+ xl: i
51
+ },
52
+ coordinates: {
53
+ s: E,
54
+ m: B,
55
+ l: T,
56
+ xl: T
57
+ },
58
+ currency: {
59
+ s: J,
60
+ m: G,
61
+ l: s,
62
+ xl: s
63
+ },
64
+ date: {
65
+ s: U,
66
+ m: R,
67
+ l: t,
68
+ xl: t
69
+ },
70
+ datetime: {
71
+ s: W,
72
+ m: V,
73
+ l: D,
74
+ xl: D
75
+ },
76
+ derived: {
77
+ s: d,
78
+ m: $,
79
+ l: g,
80
+ xl: g
81
+ },
82
+ duration: {
83
+ s: L,
84
+ m: K,
85
+ l: z,
86
+ xl: z
87
+ },
88
+ hierarchy: {
89
+ s: _,
90
+ m: Z,
91
+ l: A,
92
+ xl: A
93
+ },
94
+ image: {
95
+ s: w,
96
+ m: q,
97
+ l: c,
98
+ xl: c
99
+ },
100
+ numeric: {
101
+ s: O,
102
+ m: M,
103
+ l: h,
104
+ xl: h
105
+ },
106
+ time: {
107
+ s: Q,
108
+ m: P,
109
+ l: f,
110
+ xl: f
111
+ },
112
+ topography: {
113
+ s: u,
114
+ m: u,
115
+ l: u,
116
+ xl: u
117
+ },
118
+ ipaddress: {
119
+ s: Y,
120
+ m: X,
121
+ l: x,
122
+ xl: x
123
+ },
124
+ formula: {
125
+ s: m,
126
+ m,
127
+ l: m,
128
+ xl: m
129
+ }
130
+ }, ee = (e, r = "m") => {
131
+ if (e === "formula")
132
+ return y.formula[r];
133
+ if (e === "derived")
134
+ return y.derived[r];
135
+ }, re = (e, r = "m") => (e == null ? void 0 : e.type) === "array[hierarchy]" ? y["array[hierarchy]"][r] : (e == null ? void 0 : e.type) === "array[datetime]" ? y["array[datetime]"][r] : (e == null ? void 0 : e.type) === "array[numeric]" ? (e == null ? void 0 : e.subtype) === "currency" ? y["array[currency]"][r] : (e == null ? void 0 : e.subtype) === "duration" ? y["array[duration]"][r] : y["array[numeric]"][r] : (e == null ? void 0 : e.type) === "image" ? y.image[r] : (e == null ? void 0 : e.type) === "spatial" ? (e == null ? void 0 : e.subtype) === "topography" ? y.topography[r] : y.coordinates[r] : (e == null ? void 0 : e.type) === "numeric" ? (e == null ? void 0 : e.subtype) === "currency" ? y.currency[r] : (e == null ? void 0 : e.subtype) === "duration" ? y.duration[r] : y.numeric[r] : (e == null ? void 0 : e.type) === "datetime" ? (e == null ? void 0 : e.subtype) === "time" ? y.time[r] : (e == null ? void 0 : e.subtype) === "date" ? y.date[r] : y.datetime[r] : (e == null ? void 0 : e.type) === "hierarchy" && (e == null ? void 0 : e.subtype) === "ipaddress" ? y.ipaddress[r] : y.hierarchy[r];
136
+ export {
137
+ ee as a,
138
+ re as c
139
+ };
@@ -17,4 +17,4 @@
17
17
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
18
  * SOFTWARE.
19
19
  * */
20
- "use strict";const e=require("@luzmo/icons"),y={"array[hierarchy]":{s:e.luzmoTypeArrayHierarchy12,m:e.luzmoTypeArrayHierarchy14,l:e.luzmoTypeArrayHierarchy,xl:e.luzmoTypeArrayHierarchy},"array[datetime]":{s:e.luzmoTypeArrayDatetime12,m:e.luzmoTypeArrayDatetime14,l:e.luzmoTypeArrayDatetime,xl:e.luzmoTypeArrayDatetime},"array[numeric]":{s:e.luzmoTypeArrayNumeric12,m:e.luzmoTypeArrayNumeric14,l:e.luzmoTypeArrayNumeric,xl:e.luzmoTypeArrayNumeric},"array[currency]":{s:e.luzmoTypeArrayCurrency12,m:e.luzmoTypeArrayCurrency14,l:e.luzmoTypeArrayCurrency,xl:e.luzmoTypeArrayCurrency},"array[duration]":{s:e.luzmoTypeArrayDuration12,m:e.luzmoTypeArrayDuration14,l:e.luzmoTypeArrayDuration,xl:e.luzmoTypeArrayDuration},coordinates:{s:e.luzmoTypeCoordinates12,m:e.luzmoTypeCoordinates14,l:e.luzmoTypeCoordinates,xl:e.luzmoTypeCoordinates},currency:{s:e.luzmoTypeCurrency12,m:e.luzmoTypeCurrency14,l:e.luzmoTypeCurrency,xl:e.luzmoTypeCurrency},date:{s:e.luzmoTypeDate12,m:e.luzmoTypeDate14,l:e.luzmoTypeDate,xl:e.luzmoTypeDate},datetime:{s:e.luzmoTypeDatetime12,m:e.luzmoTypeDatetime14,l:e.luzmoTypeDatetime,xl:e.luzmoTypeDatetime},derived:{s:e.luzmoTypeDerived12,m:e.luzmoTypeDerived14,l:e.luzmoTypeDerived,xl:e.luzmoTypeDerived},duration:{s:e.luzmoTypeDuration12,m:e.luzmoTypeDuration14,l:e.luzmoTypeDuration,xl:e.luzmoTypeDuration},hierarchy:{s:e.luzmoTypeHierarchy12,m:e.luzmoTypeHierarchy14,l:e.luzmoTypeHierarchy,xl:e.luzmoTypeHierarchy},image:{s:e.luzmoTypeImage12,m:e.luzmoTypeImage14,l:e.luzmoTypeImage,xl:e.luzmoTypeImage},numeric:{s:e.luzmoTypeNumeric12,m:e.luzmoTypeNumeric14,l:e.luzmoTypeNumeric,xl:e.luzmoTypeNumeric},time:{s:e.luzmoTypeTime12,m:e.luzmoTypeTime14,l:e.luzmoTypeTime,xl:e.luzmoTypeTime},topography:{s:e.luzmoTypeTopography,m:e.luzmoTypeTopography,l:e.luzmoTypeTopography,xl:e.luzmoTypeTopography},ipaddress:{s:e.luzmoRouter12,m:e.luzmoRouter14,l:e.luzmoRouter16,xl:e.luzmoRouter16},formula:{s:e.luzmoFormula,m:e.luzmoFormula,l:e.luzmoFormula,xl:e.luzmoFormula}},m=(r,u="m")=>{if(r==="formula")return y.formula[u];if(r==="derived")return y.derived[u]},l=(r,u="m")=>(r==null?void 0:r.type)==="array[hierarchy]"?y["array[hierarchy]"][u]:(r==null?void 0:r.type)==="array[datetime]"?y["array[datetime]"][u]:(r==null?void 0:r.type)==="array[numeric]"?(r==null?void 0:r.subtype)==="currency"?y["array[currency]"][u]:(r==null?void 0:r.subtype)==="duration"?y["array[duration]"][u]:y["array[numeric]"][u]:(r==null?void 0:r.type)==="image"?y.image[u]:(r==null?void 0:r.type)==="spatial"?(r==null?void 0:r.subtype)==="topography"?y.topography[u]:y.coordinates[u]:(r==null?void 0:r.type)==="numeric"?(r==null?void 0:r.subtype)==="currency"?y.currency[u]:(r==null?void 0:r.subtype)==="duration"?y.duration[u]:y.numeric[u]:(r==null?void 0:r.type)==="datetime"?(r==null?void 0:r.subtype)==="time"?y.time[u]:(r==null?void 0:r.subtype)==="date"?y.date[u]:y.datetime[u]:(r==null?void 0:r.type)==="hierarchy"&&(r==null?void 0:r.subtype)==="ipaddress"?y.ipaddress[u]:y.hierarchy[u];exports.calculateDataItemIcon=l;exports.calculateDataItemSecondaryIcon=m;
20
+ "use strict";const e=require("@luzmo/icons"),y={"array[hierarchy]":{s:e.luzmoTypeArrayHierarchy12,m:e.luzmoTypeArrayHierarchy14,l:e.luzmoTypeArrayHierarchy,xl:e.luzmoTypeArrayHierarchy},"array[datetime]":{s:e.luzmoTypeArrayDatetime12,m:e.luzmoTypeArrayDatetime14,l:e.luzmoTypeArrayDatetime,xl:e.luzmoTypeArrayDatetime},"array[numeric]":{s:e.luzmoTypeArrayNumeric12,m:e.luzmoTypeArrayNumeric14,l:e.luzmoTypeArrayNumeric,xl:e.luzmoTypeArrayNumeric},"array[currency]":{s:e.luzmoTypeArrayCurrency12,m:e.luzmoTypeArrayCurrency14,l:e.luzmoTypeArrayCurrency,xl:e.luzmoTypeArrayCurrency},"array[duration]":{s:e.luzmoTypeArrayDuration12,m:e.luzmoTypeArrayDuration14,l:e.luzmoTypeArrayDuration,xl:e.luzmoTypeArrayDuration},coordinates:{s:e.luzmoTypeCoordinates12,m:e.luzmoTypeCoordinates14,l:e.luzmoTypeCoordinates,xl:e.luzmoTypeCoordinates},currency:{s:e.luzmoTypeCurrency12,m:e.luzmoTypeCurrency14,l:e.luzmoTypeCurrency,xl:e.luzmoTypeCurrency},date:{s:e.luzmoTypeDate12,m:e.luzmoTypeDate14,l:e.luzmoTypeDate,xl:e.luzmoTypeDate},datetime:{s:e.luzmoTypeDatetime12,m:e.luzmoTypeDatetime14,l:e.luzmoTypeDatetime,xl:e.luzmoTypeDatetime},derived:{s:e.luzmoTypeDerived12,m:e.luzmoTypeDerived14,l:e.luzmoTypeDerived,xl:e.luzmoTypeDerived},duration:{s:e.luzmoTypeDuration12,m:e.luzmoTypeDuration14,l:e.luzmoTypeDuration,xl:e.luzmoTypeDuration},hierarchy:{s:e.luzmoTypeHierarchy12,m:e.luzmoTypeHierarchy14,l:e.luzmoTypeHierarchy,xl:e.luzmoTypeHierarchy},image:{s:e.luzmoTypeImage12,m:e.luzmoTypeImage14,l:e.luzmoTypeImage,xl:e.luzmoTypeImage},numeric:{s:e.luzmoTypeNumeric12,m:e.luzmoTypeNumeric14,l:e.luzmoTypeNumeric,xl:e.luzmoTypeNumeric},time:{s:e.luzmoTypeTime12,m:e.luzmoTypeTime14,l:e.luzmoTypeTime,xl:e.luzmoTypeTime},topography:{s:e.luzmoTypeTopography,m:e.luzmoTypeTopography,l:e.luzmoTypeTopography,xl:e.luzmoTypeTopography},ipaddress:{s:e.luzmoTypeIpAddress12,m:e.luzmoTypeIpAddress14,l:e.luzmoTypeIpAddress,xl:e.luzmoTypeIpAddress},formula:{s:e.luzmoFormula,m:e.luzmoFormula,l:e.luzmoFormula,xl:e.luzmoFormula}},m=(r,u="m")=>{if(r==="formula")return y.formula[u];if(r==="derived")return y.derived[u]},l=(r,u="m")=>(r==null?void 0:r.type)==="array[hierarchy]"?y["array[hierarchy]"][u]:(r==null?void 0:r.type)==="array[datetime]"?y["array[datetime]"][u]:(r==null?void 0:r.type)==="array[numeric]"?(r==null?void 0:r.subtype)==="currency"?y["array[currency]"][u]:(r==null?void 0:r.subtype)==="duration"?y["array[duration]"][u]:y["array[numeric]"][u]:(r==null?void 0:r.type)==="image"?y.image[u]:(r==null?void 0:r.type)==="spatial"?(r==null?void 0:r.subtype)==="topography"?y.topography[u]:y.coordinates[u]:(r==null?void 0:r.type)==="numeric"?(r==null?void 0:r.subtype)==="currency"?y.currency[u]:(r==null?void 0:r.subtype)==="duration"?y.duration[u]:y.numeric[u]:(r==null?void 0:r.type)==="datetime"?(r==null?void 0:r.subtype)==="time"?y.time[u]:(r==null?void 0:r.subtype)==="date"?y.date[u]:y.datetime[u]:(r==null?void 0:r.type)==="hierarchy"&&(r==null?void 0:r.subtype)==="ipaddress"?y.ipaddress[u]:y.hierarchy[u];exports.calculateDataItemIcon=l;exports.calculateDataItemSecondaryIcon=m;
@@ -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 n=require("@lit/localize");require("@luzmo/lucero/action-button");require("@luzmo/lucero/action-group");require("@luzmo/lucero/field-label");require("@luzmo/lucero/menu");require("@luzmo/lucero/number-field");require("@luzmo/lucero/picker");require("@luzmo/lucero/popover");const f=require("../decompose-numeric-format-B3rVVHpO.cjs"),o=require("lit"),g=require("@luzmo/icons"),D=require("@luzmo/lucero/overlay");require("@luzmo/lucero/tooltip");const y=require("../calculate-data-item-icon-CHq4n9Kw.cjs"),z=require("../localize-r7ALOUy_.cjs"),m=require("lit/decorators.js"),N=require("../focusable-B3E_hQmm.cjs"),b=require("../sized-mixin-DcvJLFeo.cjs"),h=require("../set-locale-BRRalqne.cjs"),w=":host .settings-container{display:flex;flex-direction:column;gap:var(--luzmo-display-settings-vertical-gap, var(--luzmo-spacing-2))}:host .settings-row{display:flex;justify-content:flex-start;align-items:center;gap:var(--luzmo-display-settings-numeric-gap, var(--display-settings-numeric-gap))}.duration-angle-down-icon{margin-inline-start:var(--luzmo-numeric-duration-levels-dropdown-icon-margin-inline-start, var(--numeric-duration-levels-dropdown-icon-margin-inline-start))}.dataset-header{max-width:100%;font-weight:600;text-transform:uppercase;margin:.5rem 1rem;color:var(--luzmo-font-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:default}.no-weight-label{margin-left:1rem}.with-secondary-icon{clip-path:polygon(0 0,60% 0,65% 60%,100% 65%,100% 100%,0 100%)}.secondary-icon{position:absolute;bottom:45%;left:60%;width:auto;font-size:.75em;line-height:1}.data-icon-type{width:1.5rem;text-align:center;position:relative;display:inline-block}:host{--display-settings-numeric-gap: var(--luzmo-spacing-3);--numeric-duration-levels-dropdown-icon-margin-inline-start: var( --luzmo-spacing-2 )}:host([size=s]){--display-settings-numeric-gap: var(--luzmo-spacing-3);--numeric-duration-levels-dropdown-icon-margin-inline-start: var( --luzmo-spacing-1 )}:host([size=l]){--display-settings-numeric-gap: var(--luzmo-spacing-4);--numeric-duration-levels-dropdown-icon-margin-inline-start: var( --luzmo-spacing-3 )}:host([size=xl]){--display-settings-numeric-gap: var(--luzmo-spacing-5);--numeric-duration-levels-dropdown-icon-margin-inline-start: var( --luzmo-spacing-4 )}",C={sum:()=>n.msg("Sum",{desc:"Numeric Aggregation option"}),cumulativesum:()=>n.msg("Cumulative sum",{desc:"Numeric Aggregation option"}),average:()=>n.msg("Average",{desc:"Numeric Aggregation option"}),median:()=>n.msg("Median",{desc:"Numeric Aggregation option"}),count:()=>n.msg("Count rows",{desc:"Numeric Aggregation option"}),distinctcount:()=>n.msg("Count distinct",{desc:"Numeric Aggregation option"}),min:()=>n.msg("Minimum",{desc:"Numeric Aggregation option"}),max:()=>n.msg("Maximum",{desc:"Numeric Aggregation option"}),stddev:()=>n.msg("Standard deviation",{desc:"Numeric Aggregation option"}),rate:()=>n.msg("Rate",{desc:"Numeric Aggregation option"})},L={general:"123",percentage:"%",scientific:"SI"},S={time:()=>n.msg("Time",{desc:"Time format option"}),short:()=>n.msg("Short",{desc:"Short format option"}),long:()=>n.msg("Long",{desc:"Long format option"})},A={Auto:{auto:!0,label:()=>n.msg("Auto",{desc:"Automatic setting of the option"})},"1,000.00":{auto:!1,label:()=>"1,000.00",thousandSeparator:",",decimalSeparator:".",hiddenFor:"scientific"},"1.000,00":{auto:!1,label:()=>"1.000,00",thousandSeparator:".",decimalSeparator:",",hiddenFor:"scientific"},"1000.00":{auto:!1,label:()=>"1000.00",decimalSeparator:"."},"1000,00":{auto:!1,label:()=>"1000,00",decimalSeparator:","}},q={levels:[{level:1,label:"years"},{level:2,label:"quarters"},{level:3,label:"months"},{level:4,label:"weeks"},{level:5,label:"days"},{level:6,label:"hours"},{level:7,label:"minutes"},{level:8,label:"seconds"},{level:9,label:"milliseconds"}]};var E=Object.defineProperty,I=Object.getOwnPropertyDescriptor,u=(d,t,e,i)=>{for(var s=i>1?void 0:i?I(t,e):t,a=d.length-1,r;a>=0;a--)(r=d[a])&&(s=(i?r(t,e,s):r(s))||s);return i&&s&&E(t,e,s),s};exports.LuzmoDisplaySettingsNumeric=class extends b.SizedMixin(N.LuzmoElement,{validSizes:Object.values(b.ElementSizes)}){constructor(){super(...arguments),this.language="en",this.slotContent={},this.measureColumns=[],this._durationLevels=[],this._renderDurationLevelMenu=!1,this._sendEvent=()=>{const t={...this.slotContent};t.format=this._format,t.aggregationFunc=this._aggregationFunc,this._aggregationWeightColumn?t.aggregationWeight={...this._aggregationWeightColumn}:delete t.aggregationWeight,this._displayMode==="duration"?(t.duration=t.duration??{},t.duration.format=this._durationFormat,t.duration.levels=this._durationLevels):delete t.duration,this.dispatchEvent(new CustomEvent("slot-content-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContent:t}}))}}static get styles(){return[o.unsafeCSS(w)]}_parseSavedNumericFormatSettings(){var t,e,i,s,a,r,c;if(this._displayMode=((t=this.slotContent)==null?void 0:t.subtype)==="duration"?"duration":"numeric",this._durationFormat=((i=(e=this.slotContent)==null?void 0:e.duration)==null?void 0:i.format)??"short",this._durationLevels=((a=(s=this.slotContent)==null?void 0:s.duration)==null?void 0:a.levels)??[1],this._displayMode==="duration")this._precision=2,this._commaDecimals=!1,this._thousandSeparator=!1;else{this._format=((r=this.slotContent)==null?void 0:r.format)??".0f";const l=f.decomposeNumericFormat(this._format??".0f");this._isAuto=((c=l.typeFormat)==null?void 0:c.includes("a"))??!1,["%","a%","y","ay"].includes(l.typeFormat)?this._displayAs="percentage":["s","as","w","aw"].includes(l.typeFormat)?this._displayAs="scientific":this._displayAs="general",this._precision=l.precision?Number.parseInt(l.precision.replace(".",""),10):this._displayAs==="scientific"?1:0,this._commaDecimals=["z","az","y","ay","w","aw"].includes(l.typeFormat),this._thousandSeparator=l.comma===",",this._isAuto?this._numericFormatGroup="Auto":this._commaDecimals&&this._thousandSeparator?this._numericFormatGroup="1.000,00":!this._commaDecimals&&this._thousandSeparator?this._numericFormatGroup="1,000.00":this._commaDecimals&&!this._thousandSeparator?this._numericFormatGroup="1000,00":!this._commaDecimals&&!this._thousandSeparator&&(this._numericFormatGroup="1000.00")}}_setNumericDisplayAs(){var t,e;this._displayAs=((e=(t=this._displayAsElement)==null?void 0:t.selected)==null?void 0:e[0])??"general",this._displayAs==="scientific"&&(this._precision=Math.max(this._precision??0,1),this._thousandSeparator=!1),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_setNumericSeparators(t){const e=A[(t==null?void 0:t.detail)??"Auto"];this._thousandSeparator=[",","."].includes((e==null?void 0:e.thousandSeparator)??""),this._commaDecimals=(e==null?void 0:e.decimalSeparator)===",",this._isAuto=e==null?void 0:e.auto,this._setNumericFormat(),this._sendEvent()}_setPrecision(){this._precision=this._precisionElement.value,this._setNumericFormat(),this._sendEvent()}_setNumericFormat(){var i;let t="f";const e=this.slotContent.subtype==="duration"?this._durationLevels&&((i=this._durationLevels)==null?void 0:i.length)===1?"numeric":"duration":"numeric";this._maxDurationLevel=Math.min(...this._durationLevels),e==="duration"?(!["time","short","long"].includes(this._durationFormat??"")||this._maxDurationLevel<6&&this._durationFormat==="time")&&(this._durationFormat="short"):(this._displayAs==="general"&&this._commaDecimals?t="z":this._displayAs==="percentage"&&this._commaDecimals?t="y":this._displayAs==="scientific"&&this._commaDecimals?t="w":this._displayAs==="percentage"?t="%":this._displayAs==="scientific"&&(t="s"),this._format=(this._thousandSeparator||this._isAuto?",":"")+"."+this._precision+(this._isAuto?"a":"")+t)}_setAggregationFunc(){var a;const t=this._aggregationElement.value,e=this._aggregationFunc,i=this.slotContent.format;if(t!==(e==="weightedaverage"?"average":e)){if(this._aggregationFunc=t==="average"&&((a=this._aggregationWeightColumn)!=null&&a.column)?"weightedaverage":t,e==="rate"){const r=f.decomposeNumericFormat(i),c=["%","y","a%","ay"].includes(r.typeFormat);this.slotContent.subtype==="currency"&&c&&this._setNumericDisplayAs()}this._sendEvent(),(this._aggregationFunc==="rate"||e==="rate")&&this.requestUpdate()}}_setAggregationWeight(){var i;const t=this._aggregationWeightElement.value,e=this._aggregationFunc;if(t==="none")this._aggregationWeightColumn=void 0,this._aggregationFunc==="weightedaverage"&&(this._aggregationFunc="average");else{let s,a;for(const r of this.measureColumns??[]){const c=(i=r.columns)==null?void 0:i.find(l=>l.id===t);if(c){s=c,a=r.datasetId;break}}s&&(this._aggregationWeightColumn={column:s.id,set:a,columnSubType:s.subtype}),this._aggregationFunc==="average"&&(this._aggregationFunc="weightedaverage")}this._sendEvent(),this.requestUpdate(),(e==="weightedaverage"&&this._aggregationFunc==="average"||e==="average"&&this._aggregationFunc==="weightedaverage")&&this.requestUpdate()}_setDurationLevels(){const t=this._durationLevels,e=this._durationLevelsElement.value.split(",").filter(i=>i!=="").map(i=>Number.parseInt(i,10));this._durationLevels=((e==null?void 0:e.length)??0)>=1?e:t,this._maxDurationLevel=Math.min(...this._durationLevels),this._fillTimeDurationLevels(),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_setDurationFormat(){var t,e;this._durationFormat=(e=(t=this._durationFormatElement)==null?void 0:t.selected)==null?void 0:e[0],this._fillTimeDurationLevels(),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_fillTimeDurationLevels(){if(this._durationFormat==="time"){const t=this._durationLevels.sort().at(-1);if([7,8,9].includes(t)){const e={lev7:[6],lev8:[6,7],lev9:[6,7,8]};for(const i of e["lev"+t])this._durationLevels.includes(i)||this._durationLevels.push(i);this._durationLevels=[...this._durationLevels].sort()}}}willUpdate(t){var e,i,s,a,r;t.has("slotContent")&&(this._parseSavedNumericFormatSettings(),this._aggregationFunc=((e=this.slotContent)==null?void 0:e.aggregationFunc)??(((i=this.slotContent)==null?void 0:i.type)==="numeric"?"sum":"count"),this._aggregationWeightColumn=(s=this.slotContent)==null?void 0:s.aggregationWeight,this._isFormula=((a=this.slotContent)==null?void 0:a.formula)||((r=this.slotContent)==null?void 0:r.formulaId)),t.has("language")&&this.language!==h.getLocale()&&([...h.targetLocales].includes(this.language??"en")||this.language==="en")&&h.setLocale(this.language)}firstUpdated(){var t;(t=this.slotContent)!=null&&t.duration&&this._durationLevelsOverlay.addEventListener("slottable-request",e=>{this._renderDurationLevelMenu=e.data!==D.removeSlottableRequest})}_renderDurationLevelsSettings(){const t=q.levels.map(e=>{let i=!1;return this._durationFormat==="time"&&e.level>=6&&this._durationLevels.includes(e.level)&&e.level!==Math.max(...this._durationLevels)&&(i=!0),this._durationLevels.length===1&&this._durationLevels.includes(e.level)&&(i=!0),o.html`<luzmo-menu-item
20
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@lit/localize");require("@luzmo/lucero/action-button");require("@luzmo/lucero/action-group");require("@luzmo/lucero/field-label");require("@luzmo/lucero/menu");require("@luzmo/lucero/number-field");require("@luzmo/lucero/picker");require("@luzmo/lucero/popover");const f=require("../decompose-numeric-format-B3rVVHpO.cjs"),o=require("lit"),g=require("@luzmo/icons"),D=require("@luzmo/lucero/overlay");require("@luzmo/lucero/tooltip");const y=require("../calculate-data-item-icon-DjW1_RI1.cjs"),z=require("../localize-r7ALOUy_.cjs"),m=require("lit/decorators.js"),N=require("../focusable-B3E_hQmm.cjs"),b=require("../sized-mixin-DcvJLFeo.cjs"),h=require("../set-locale-BRRalqne.cjs"),w=":host .settings-container{display:flex;flex-direction:column;gap:var(--luzmo-display-settings-vertical-gap, var(--luzmo-spacing-2))}:host .settings-row{display:flex;justify-content:flex-start;align-items:center;gap:var(--luzmo-display-settings-numeric-gap, var(--display-settings-numeric-gap))}.duration-angle-down-icon{margin-inline-start:var(--luzmo-numeric-duration-levels-dropdown-icon-margin-inline-start, var(--numeric-duration-levels-dropdown-icon-margin-inline-start))}.dataset-header{max-width:100%;font-weight:600;text-transform:uppercase;margin:.5rem 1rem;color:var(--luzmo-font-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:default}.no-weight-label{margin-left:1rem}.with-secondary-icon{clip-path:polygon(0 0,60% 0,65% 60%,100% 65%,100% 100%,0 100%)}.secondary-icon{position:absolute;bottom:45%;left:60%;width:auto;font-size:.75em;line-height:1}.data-icon-type{width:1.5rem;text-align:center;position:relative;display:inline-block}:host{--display-settings-numeric-gap: var(--luzmo-spacing-3);--numeric-duration-levels-dropdown-icon-margin-inline-start: var( --luzmo-spacing-2 )}:host([size=s]){--display-settings-numeric-gap: var(--luzmo-spacing-3);--numeric-duration-levels-dropdown-icon-margin-inline-start: var( --luzmo-spacing-1 )}:host([size=l]){--display-settings-numeric-gap: var(--luzmo-spacing-4);--numeric-duration-levels-dropdown-icon-margin-inline-start: var( --luzmo-spacing-3 )}:host([size=xl]){--display-settings-numeric-gap: var(--luzmo-spacing-5);--numeric-duration-levels-dropdown-icon-margin-inline-start: var( --luzmo-spacing-4 )}",C={sum:()=>n.msg("Sum",{desc:"Numeric Aggregation option"}),cumulativesum:()=>n.msg("Cumulative sum",{desc:"Numeric Aggregation option"}),average:()=>n.msg("Average",{desc:"Numeric Aggregation option"}),median:()=>n.msg("Median",{desc:"Numeric Aggregation option"}),count:()=>n.msg("Count rows",{desc:"Numeric Aggregation option"}),distinctcount:()=>n.msg("Count distinct",{desc:"Numeric Aggregation option"}),min:()=>n.msg("Minimum",{desc:"Numeric Aggregation option"}),max:()=>n.msg("Maximum",{desc:"Numeric Aggregation option"}),stddev:()=>n.msg("Standard deviation",{desc:"Numeric Aggregation option"}),rate:()=>n.msg("Rate",{desc:"Numeric Aggregation option"})},L={general:"123",percentage:"%",scientific:"SI"},S={time:()=>n.msg("Time",{desc:"Time format option"}),short:()=>n.msg("Short",{desc:"Short format option"}),long:()=>n.msg("Long",{desc:"Long format option"})},A={Auto:{auto:!0,label:()=>n.msg("Auto",{desc:"Automatic setting of the option"})},"1,000.00":{auto:!1,label:()=>"1,000.00",thousandSeparator:",",decimalSeparator:".",hiddenFor:"scientific"},"1.000,00":{auto:!1,label:()=>"1.000,00",thousandSeparator:".",decimalSeparator:",",hiddenFor:"scientific"},"1000.00":{auto:!1,label:()=>"1000.00",decimalSeparator:"."},"1000,00":{auto:!1,label:()=>"1000,00",decimalSeparator:","}},q={levels:[{level:1,label:"years"},{level:2,label:"quarters"},{level:3,label:"months"},{level:4,label:"weeks"},{level:5,label:"days"},{level:6,label:"hours"},{level:7,label:"minutes"},{level:8,label:"seconds"},{level:9,label:"milliseconds"}]};var E=Object.defineProperty,I=Object.getOwnPropertyDescriptor,u=(d,t,e,i)=>{for(var s=i>1?void 0:i?I(t,e):t,a=d.length-1,r;a>=0;a--)(r=d[a])&&(s=(i?r(t,e,s):r(s))||s);return i&&s&&E(t,e,s),s};exports.LuzmoDisplaySettingsNumeric=class extends b.SizedMixin(N.LuzmoElement,{validSizes:Object.values(b.ElementSizes)}){constructor(){super(...arguments),this.language="en",this.slotContent={},this.measureColumns=[],this._durationLevels=[],this._renderDurationLevelMenu=!1,this._sendEvent=()=>{const t={...this.slotContent};t.format=this._format,t.aggregationFunc=this._aggregationFunc,this._aggregationWeightColumn?t.aggregationWeight={...this._aggregationWeightColumn}:delete t.aggregationWeight,this._displayMode==="duration"?(t.duration=t.duration??{},t.duration.format=this._durationFormat,t.duration.levels=this._durationLevels):delete t.duration,this.dispatchEvent(new CustomEvent("slot-content-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContent:t}}))}}static get styles(){return[o.unsafeCSS(w)]}_parseSavedNumericFormatSettings(){var t,e,i,s,a,r,c;if(this._displayMode=((t=this.slotContent)==null?void 0:t.subtype)==="duration"?"duration":"numeric",this._durationFormat=((i=(e=this.slotContent)==null?void 0:e.duration)==null?void 0:i.format)??"short",this._durationLevels=((a=(s=this.slotContent)==null?void 0:s.duration)==null?void 0:a.levels)??[1],this._displayMode==="duration")this._precision=2,this._commaDecimals=!1,this._thousandSeparator=!1;else{this._format=((r=this.slotContent)==null?void 0:r.format)??".0f";const l=f.decomposeNumericFormat(this._format??".0f");this._isAuto=((c=l.typeFormat)==null?void 0:c.includes("a"))??!1,["%","a%","y","ay"].includes(l.typeFormat)?this._displayAs="percentage":["s","as","w","aw"].includes(l.typeFormat)?this._displayAs="scientific":this._displayAs="general",this._precision=l.precision?Number.parseInt(l.precision.replace(".",""),10):this._displayAs==="scientific"?1:0,this._commaDecimals=["z","az","y","ay","w","aw"].includes(l.typeFormat),this._thousandSeparator=l.comma===",",this._isAuto?this._numericFormatGroup="Auto":this._commaDecimals&&this._thousandSeparator?this._numericFormatGroup="1.000,00":!this._commaDecimals&&this._thousandSeparator?this._numericFormatGroup="1,000.00":this._commaDecimals&&!this._thousandSeparator?this._numericFormatGroup="1000,00":!this._commaDecimals&&!this._thousandSeparator&&(this._numericFormatGroup="1000.00")}}_setNumericDisplayAs(){var t,e;this._displayAs=((e=(t=this._displayAsElement)==null?void 0:t.selected)==null?void 0:e[0])??"general",this._displayAs==="scientific"&&(this._precision=Math.max(this._precision??0,1),this._thousandSeparator=!1),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_setNumericSeparators(t){const e=A[(t==null?void 0:t.detail)??"Auto"];this._thousandSeparator=[",","."].includes((e==null?void 0:e.thousandSeparator)??""),this._commaDecimals=(e==null?void 0:e.decimalSeparator)===",",this._isAuto=e==null?void 0:e.auto,this._setNumericFormat(),this._sendEvent()}_setPrecision(){this._precision=this._precisionElement.value,this._setNumericFormat(),this._sendEvent()}_setNumericFormat(){var i;let t="f";const e=this.slotContent.subtype==="duration"?this._durationLevels&&((i=this._durationLevels)==null?void 0:i.length)===1?"numeric":"duration":"numeric";this._maxDurationLevel=Math.min(...this._durationLevels),e==="duration"?(!["time","short","long"].includes(this._durationFormat??"")||this._maxDurationLevel<6&&this._durationFormat==="time")&&(this._durationFormat="short"):(this._displayAs==="general"&&this._commaDecimals?t="z":this._displayAs==="percentage"&&this._commaDecimals?t="y":this._displayAs==="scientific"&&this._commaDecimals?t="w":this._displayAs==="percentage"?t="%":this._displayAs==="scientific"&&(t="s"),this._format=(this._thousandSeparator||this._isAuto?",":"")+"."+this._precision+(this._isAuto?"a":"")+t)}_setAggregationFunc(){var a;const t=this._aggregationElement.value,e=this._aggregationFunc,i=this.slotContent.format;if(t!==(e==="weightedaverage"?"average":e)){if(this._aggregationFunc=t==="average"&&((a=this._aggregationWeightColumn)!=null&&a.column)?"weightedaverage":t,e==="rate"){const r=f.decomposeNumericFormat(i),c=["%","y","a%","ay"].includes(r.typeFormat);this.slotContent.subtype==="currency"&&c&&this._setNumericDisplayAs()}this._sendEvent(),(this._aggregationFunc==="rate"||e==="rate")&&this.requestUpdate()}}_setAggregationWeight(){var i;const t=this._aggregationWeightElement.value,e=this._aggregationFunc;if(t==="none")this._aggregationWeightColumn=void 0,this._aggregationFunc==="weightedaverage"&&(this._aggregationFunc="average");else{let s,a;for(const r of this.measureColumns??[]){const c=(i=r.columns)==null?void 0:i.find(l=>l.id===t);if(c){s=c,a=r.datasetId;break}}s&&(this._aggregationWeightColumn={column:s.id,set:a,columnSubType:s.subtype}),this._aggregationFunc==="average"&&(this._aggregationFunc="weightedaverage")}this._sendEvent(),this.requestUpdate(),(e==="weightedaverage"&&this._aggregationFunc==="average"||e==="average"&&this._aggregationFunc==="weightedaverage")&&this.requestUpdate()}_setDurationLevels(){const t=this._durationLevels,e=this._durationLevelsElement.value.split(",").filter(i=>i!=="").map(i=>Number.parseInt(i,10));this._durationLevels=((e==null?void 0:e.length)??0)>=1?e:t,this._maxDurationLevel=Math.min(...this._durationLevels),this._fillTimeDurationLevels(),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_setDurationFormat(){var t,e;this._durationFormat=(e=(t=this._durationFormatElement)==null?void 0:t.selected)==null?void 0:e[0],this._fillTimeDurationLevels(),this._setNumericFormat(),this._sendEvent(),this.requestUpdate()}_fillTimeDurationLevels(){if(this._durationFormat==="time"){const t=this._durationLevels.sort().at(-1);if([7,8,9].includes(t)){const e={lev7:[6],lev8:[6,7],lev9:[6,7,8]};for(const i of e["lev"+t])this._durationLevels.includes(i)||this._durationLevels.push(i);this._durationLevels=[...this._durationLevels].sort()}}}willUpdate(t){var e,i,s,a,r;t.has("slotContent")&&(this._parseSavedNumericFormatSettings(),this._aggregationFunc=((e=this.slotContent)==null?void 0:e.aggregationFunc)??(((i=this.slotContent)==null?void 0:i.type)==="numeric"?"sum":"count"),this._aggregationWeightColumn=(s=this.slotContent)==null?void 0:s.aggregationWeight,this._isFormula=((a=this.slotContent)==null?void 0:a.formula)||((r=this.slotContent)==null?void 0:r.formulaId)),t.has("language")&&this.language!==h.getLocale()&&([...h.targetLocales].includes(this.language??"en")||this.language==="en")&&h.setLocale(this.language)}firstUpdated(){var t;(t=this.slotContent)!=null&&t.duration&&this._durationLevelsOverlay.addEventListener("slottable-request",e=>{this._renderDurationLevelMenu=e.data!==D.removeSlottableRequest})}_renderDurationLevelsSettings(){const t=q.levels.map(e=>{let i=!1;return this._durationFormat==="time"&&e.level>=6&&this._durationLevels.includes(e.level)&&e.level!==Math.max(...this._durationLevels)&&(i=!0),this._durationLevels.length===1&&this._durationLevels.includes(e.level)&&(i=!0),o.html`<luzmo-menu-item
21
21
  value=${e.level}
22
22
  ?selected=${this._durationLevels.includes(e.level)}
23
23
  ?disabled=${i}
@@ -30,7 +30,7 @@ import { unsafeCSS as L, html as r, nothing as _ } from "lit";
30
30
  import { luzmoIcon as h, luzmoAngleDown as S } from "@luzmo/icons";
31
31
  import { removeSlottableRequest as C } from "@luzmo/lucero/overlay";
32
32
  import "@luzmo/lucero/tooltip";
33
- import { c as D, a as N } from "../calculate-data-item-icon-DHRIbsqH.js";
33
+ import { c as D, a as N } from "../calculate-data-item-icon-DZDqb3xu.js";
34
34
  import { l as b } from "../localize-BX7q0S0M.js";
35
35
  import { property as g, query as d, state as E } from "lit/decorators.js";
36
36
  import { L as I } from "../focusable-DCIFkpiW.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 D=require("../get-css-variable-DLiZYZEi.cjs"),u=require("@luzmo/icons");require("@luzmo/lucero/icon");require("@luzmo/lucero/tooltip");const I=require("lit"),s=require("lit/decorators.js"),T=require("../focusable-B3E_hQmm.cjs"),M=require("../sized-mixin-DcvJLFeo.cjs"),_=require("../calculate-data-item-icon-CHq4n9Kw.cjs"),R=require("../localize-r7ALOUy_.cjs"),B=":host{font-family:var(--luzmo-draggable-data-item-level-font-family, var(--luzmo-font-family));color:var(--luzmo-draggable-data-item-level-font-color, var(--draggable-data-item-level-font-color))}.draggable-data-item-level{transition:background-color var(--luzmo-animation-duration);background-color:var(--luzmo-draggable-data-item-level-background-color, var(--draggable-data-item-level-background-color));display:grid;grid-template-columns:var(--luzmo-draggable-data-item-level-drag-handle-width, var(--draggable-data-item-level-drag-handle-width)) var(--luzmo-draggable-data-item-level-data-icon-width, var(--draggable-data-item-level-data-icon-width)) 1fr var(--luzmo-draggable-data-item-level-description-width, var(--draggable-data-item-level-description-width, auto));gap:var(--luzmo-draggable-data-item-level-gap, var(--draggable-data-item-level-gap));align-items:center;padding:0 var(--luzmo-draggable-data-item-level-horizontal-padding, var(--draggable-data-item-level-horizontal-padding));border-radius:var(--luzmo-draggable-data-item-level-border-radius, var(--draggable-data-item-level-border-radius));border-width:var(--luzmo-draggable-data-item-level-border-width, var(--draggable-data-item-level-border-width));border-style:var(--luzmo-draggable-data-item-level-border-style, var(--draggable-data-item-level-border-style));border-color:var(--luzmo-draggable-data-item-level-border-color, var(--draggable-data-item-level-border-color));height:var(--luzmo-draggable-data-item-level-height, var(--draggable-data-item-level-height));cursor:move}.draggable-data-item-level:hover{background-color:var(--luzmo-draggable-data-item-level-background-color-hover, var(--draggable-data-item-level-background-color-hover));color:var(--luzmo-draggable-data-item-level-font-color-hover, var(--draggable-data-item-level-font-color-hover));border-color:var(--luzmo-draggable-data-item-level-border-color-hover, var(--draggable-data-item-level-border-color-hover))}.draggable-data-item-level:hover .data-description{color:var(--luzmo-draggable-data-item-level-font-color-hover, var(--draggable-data-item-level-font-color-hover))}.draggable-data-item-level .data-label{font-size:var(--luzmo-draggable-data-item-level-label-font-size, var(--draggable-data-item-level-label-font-size));white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.draggable-data-item-level .data-description{height:100%;display:flex;align-items:center;background-color:transparent;outline:none;border:none;color:var(--luzmo-draggable-data-item-level-font-color, var(--draggable-data-item-level-font-color));font-size:var(--luzmo-draggable-data-item-level-label-font-size, var(--draggable-data-item-level-label-font-size))}:host([sublevel]) .draggable-data-item-level{height:var(--luzmo-draggable-data-item-level-sublevel-height, var(--draggable-data-item-level-sublevel-height));background-color:var(--luzmo-draggable-data-item-level-sublevel-background-color, var(--draggable-data-item-level-sublevel-background-color));border-color:var(--luzmo-draggable-data-item-level-sublevel-border-color, var(--draggable-data-item-level-sublevel-border-color));margin-inline-start:var(--luzmo-draggable-data-item-level-sublevel-margin-inline-start, var(--draggable-data-item-level-sublevel-margin-inline-start));grid-template-columns:var(--luzmo-draggable-data-item-level-sublevel-drag-handle-width, var(--luzmo-draggable-data-item-level-drag-handle-width)) 1fr}:host([sublevel]) .draggable-data-item-level:hover{background-color:var(--luzmo-draggable-data-item-level-sublevel-background-color-hover, var(--draggable-data-item-level-sublevel-background-color-hover));color:var(--luzmo-draggable-data-item-level-sublevel-font-color-hover, var(--draggable-data-item-level-sublevel-font-color-hover))}:host([sublevel]) .draggable-data-item-level .drag-handle-icon{width:var(--luzmo-draggable-data-item-level-sublevel-drag-handle-width, var(--draggable-data-item-level-sublevel-drag-handle-width));text-align:center}:host(.highlighted) .draggable-data-item-level:not(:hover){background-color:var(--luzmo-draggable-data-item-level-background-color-highlighted, var(--draggable-data-item-level-background-color-highlighted));color:var(--luzmo-draggable-data-item-level-font-color-highlighted, var(--draggable-data-item-level-font-color-highlighted));border-color:var(--luzmo-draggable-data-item-level-border-color-highlighted, var(--draggable-data-item-level-border-color-highlighted))}:host(.highlighted) .draggable-data-item-level:not(:hover) .data-description{color:var(--luzmo-draggable-data-item-level-font-color-highlighted, var(--draggable-data-item-level-font-color-highlighted))}:host([disabled]) .draggable-data-item-level{background-color:var(--luzmo-draggable-data-item-level-background-color-disabled, var(--draggable-data-item-level-background-color-disabled));color:var(--luzmo-draggable-data-item-level-color-disabled, var(--draggable-data-item-level-color-disabled));cursor:not-allowed}:host([disabled]) .drag-handle-icon{opacity:.25}:host([sublevel][disabled]) .draggable-data-item-level{background-color:var(--luzmo-draggable-data-item-level-sublevel-background-color-disabled, var(--draggable-data-item-level-sublevel-background-color-disabled))}:host(.pulse) .draggable-data-item-level{box-shadow:0 0 0 0 var(--luzmo-draggable-data-item-level-pulse-color, var(--draggable-data-item-level-pulse-color)),0 0 0 0 var(--luzmo-draggable-data-item-level-pulse-color, var(--draggable-data-item-level-pulse-color));animation:draggableDataItemPulse 1.5s infinite cubic-bezier(.66,.33,0,1)}:host(.focus) .draggable-data-item-level{background-color:var(--luzmo-draggable-data-item-level-background-color-focus, var(--draggable-data-item-level-background-color-focus));color:var(--luzmo-draggable-data-item-level-font-color-focus, var(--draggable-data-item-level-font-color-focus));border-color:var(--luzmo-draggable-data-item-level-border-color-focus, var(--draggable-data-item-level-border-color-focus))}:host(.focus) .draggable-data-item-level .data-description{color:var(--luzmo-draggable-data-item-level-font-color-focus, var(--draggable-data-item-level-font-color-focus))}@keyframes draggableDataItemPulse{0%{box-shadow:0 0 0 0 var(--luzmo-draggable-data-item-level-pulse-color, var(--draggable-data-item-level-pulse-color)),0 0 0 0 var(--luzmo-draggable-data-item-level-pulse-color, var(--draggable-data-item-level-pulse-color))}to{box-shadow:0 0 0 .5rem transparent,0 0 0 .5rem transparent}}.drag-handle-icon{opacity:.6;font-size:var(--luzmo-draggable-data-item-level-drag-handle-size, var(--luzmo-draggable-data-item-level-drag-handle-size));width:var(--luzmo-draggable-data-item-level-drag-handle-width, var(--luzmo-draggable-data-item-level-drag-handle-width));text-align:center;justify-self:center}.data-icon-type{width:var(--luzmo-draggable-data-item-level-data-icon-width, var(--luzmo-draggable-data-item-level-data-icon-width));text-align:center;position:relative;justify-self:center}.with-secondary-icon{clip-path:polygon(0 0,60% 0,65% 60%,100% 65%,100% 100%,0 100%)}.secondary-icon{position:absolute;bottom:45%;left:70%;width:auto;font-size:.75em;line-height:1}:host([variant=highlight]){--draggable-data-item-level-background-color: var( --luzmo-background-color-highlight );--draggable-data-item-level-border-color: var( --luzmo-background-color-highlight );--draggable-data-item-level-background-color-hover: var( --luzmo-background-color-highlight-hover );--draggable-data-item-level-font-color-hover: var(--luzmo-font-color-hover);--draggable-data-item-level-border-color-hover: var( --luzmo-background-color-highlight-hover )}:host{--draggable-data-item-level-height: var(--luzmo-component-height);--draggable-data-item-level-label-font-size: var(--luzmo-font-size);--draggable-data-item-level-icon-type-size: var(--luzmo-font-size);--draggable-data-item-level-horizontal-padding: var(--luzmo-spacing-5);--draggable-data-item-level-border-width: var(--luzmo-border-width);--draggable-data-item-level-border-style: solid;--draggable-data-item-level-border-color: var(--luzmo-border-color-hover);--draggable-data-item-level-border-radius: var(--luzmo-border-radius);--draggable-data-item-level-gap: var(--luzmo-spacing-4);--draggable-data-item-level-font-color: var(--luzmo-font-color);--draggable-data-item-level-color-disabled: var(--luzmo-color-disabled);--draggable-data-item-level-background-color-disabled: var( --luzmo-background-color-disabled );--luzmo-draggable-data-item-level-drag-handle-size: var(--luzmo-font-size-s);--luzmo-draggable-data-item-level-drag-handle-width: var( --draggable-data-item-level-icon-type-size );--luzmo-draggable-data-item-level-data-icon-width: calc( var(--draggable-data-item-level-icon-type-size) + var(--luzmo-spacing-3) );--luzmo-draggable-data-item-level-description-width: calc( var(--draggable-data-item-level-icon-type-size) + var(--luzmo-spacing-2) );--draggable-data-item-level-sublevel-height: var(--luzmo-component-height-s);--draggable-data-item-level-sublevel-border-color: transparent;--draggable-data-item-level-sublevel-background-color: transparent;--draggable-data-item-level-sublevel-background-color-disabled: transparent;--draggable-data-item-level-sublevel-margin-inline-start: calc( var(--draggable-data-item-level-gap) + var(--luzmo-draggable-data-item-level-drag-handle-width) );--luzmo-draggable-data-item-level-sublevel-drag-handle-width: var( --luzmo-draggable-data-item-level-data-icon-width );--draggable-data-item-level-sublevel-background-color-hover: rgba( var(--luzmo-border-color-rgb), .05 )}:host([hide-type-icon]){--draggable-data-item-level-sublevel-margin-inline-start: var( --draggable-data-item-level-gap )}:host(.highlighted){--draggable-data-item-level-background-color-highlighted: var( --luzmo-primary );--draggable-data-item-level-font-color-highlighted: var( --luzmo-primary-inverse-color );--draggable-data-item-level-border-color-highlighted: var( --luzmo-border-color )}:host(.focus){--draggable-data-item-level-background-color-focus: var( --luzmo-background-color-focus, var(--luzmo-secondary) );--draggable-data-item-level-font-color-focus: var( --luzmo-font-color-focus, var(--luzmo-secondary-inverse-color) );--draggable-data-item-level-border-color-focus: var( --luzmo-border-color-focus, var(--luzmo-secondary) )}:host(.pulse){--draggable-data-item-level-pulse-color: var( --luzmo-secondary-outline, rgba(var(--luzmo-secondary-rgb), .4) )}:host([size=s]){--draggable-data-item-level-height: var(--luzmo-component-height-s);--draggable-data-item-level-label-font-size: var(--luzmo-font-size-s);--draggable-data-item-level-icon-type-size: var(--luzmo-font-size-s);--draggable-data-item-level-horizontal-padding: var(--luzmo-spacing-4);--draggable-data-item-level-border-radius: var(--luzmo-border-radius);--draggable-data-item-level-gap: var(--luzmo-spacing-3);--draggable-data-item-level-sublevel-height: var(--luzmo-component-height-xs);--luzmo-draggable-data-item-level-drag-handle-size: var(--luzmo-font-size-xs)}:host([size=l]){--draggable-data-item-level-height: var(--luzmo-component-height-l);--draggable-data-item-level-label-font-size: var(--luzmo-font-size-l);--draggable-data-item-level-icon-type-size: var(--luzmo-font-size-l);--draggable-data-item-level-horizontal-padding: var(--luzmo-spacing-5);--draggable-data-item-level-border-radius: var(--luzmo-border-radius-l);--draggable-data-item-level-gap: var(--luzmo-spacing-5);--draggable-data-item-level-sublevel-height: var(--luzmo-component-height);--luzmo-draggable-data-item-level-drag-handle-size: var(--luzmo-font-size)}:host([size=xl]){--draggable-data-item-level-height: var(--luzmo-component-height-xl);--draggable-data-item-level-label-font-size: var(--luzmo-font-size-xl);--draggable-data-item-level-icon-type-size: var(--luzmo-font-size-xl);--draggable-data-item-level-horizontal-padding: var(--luzmo-spacing-5);--draggable-data-item-level-border-radius: var(--luzmo-border-radius-xl);--draggable-data-item-level-gap: var(--luzmo-spacing-5);--draggable-data-item-level-sublevel-height: var(--luzmo-component-height-l);--luzmo-draggable-data-item-level-drag-handle-size: var(--luzmo-font-size-l)}:host{box-sizing:border-box}",F=a=>{var h,z,v,m,b,p,f,y,w,k,x,S,H,$,L,P,q;const r=a.source.element;let e="";(m=(v=(z=(h=a.source)==null?void 0:h.element)==null?void 0:z.renderRoot)==null?void 0:v.querySelector(".data-label"))!=null&&m.textContent&&(e=(f=(p=(b=a.source)==null?void 0:b.element)==null?void 0:p.renderRoot)==null?void 0:f.querySelector(".data-label").textContent),e||(e=R.localize((w=(y=a==null?void 0:a.source)==null?void 0:y.data)==null?void 0:w.label,(x=(k=a==null?void 0:a.source)==null?void 0:k.element)==null?void 0:x.language),e=e||"Untitled");const i=(H=(S=a==null?void 0:a.source)==null?void 0:S.data)==null?void 0:H.type,t=(L=($=a==null?void 0:a.source)==null?void 0:$.data)==null?void 0:L.subtype,o=_.calculateDataItemIcon({type:i,subtype:t},r.size),l={};[["borderColor","--luzmo-draggable-data-item-level-border-color","--draggable-data-item-level-border-color"],["backgroundColor","--luzmo-draggable-data-item-level-background-color","--draggable-data-item-level-background-color"],["color","--luzmo-draggable-data-item-level-font-color","--draggable-data-item-level-font-color"],["fontSize","--luzmo-draggable-data-item-level-label-font-size","--draggable-data-item-level-label-font-size"],["height","--luzmo-draggable-data-item-level-height","--draggable-data-item-level-height"],["borderRadius","--luzmo-draggable-data-item-level-border-radius","--draggable-data-item-level-border-radius"],["fontFamily","--luzmo-draggable-data-item-level-font-family","--luzmo-font-family"],["horizontalPadding","--luzmo-draggable-data-item-level-horizontal-padding","--draggable-data-item-level-horizontal-padding"],["gap","--luzmo-draggable-data-item-level-gap","--draggable-data-item-level-gap"]].forEach(([C,O,j])=>{const V=D.getCssVariableValue(r,O)||D.getCssVariableValue(r,j);l[C]=V});const n=document.createElement("div"),g=document.createElement("div");if(n.innerHTML=e,Object.assign(n.style,{maxWidth:"12rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),!((q=(P=a==null?void 0:a.source)==null?void 0:P.element)!=null&&q.sublevel)){const C=document.createElement("luzmo-icon");C.icon=o,g.append(C)}return g.append(n),Object.assign(g.style,{display:"flex",alignItems:"center",maxWidth:"12rem",lineHeight:"1",height:l.height,border:`1px solid ${l.borderColor}`,backgroundColor:l.backgroundColor,borderRadius:l.borderRadius,fontFamily:l.fontFamily,fontSize:l.fontSize,color:l.color,padding:`0 ${l.horizontalPadding}`,gap:l.gap}),g};var U=Object.defineProperty,c=(a,r,e,i)=>{for(var t=void 0,o=a.length-1,l;o>=0;o--)(l=a[o])&&(t=l(r,e,t)||t);return t&&U(r,e,t),t};const E=class E extends M.SizedMixin(T.LuzmoElement,{validSizes:["s","m","l","xl"],noDefaultSize:!0}){constructor(){super(...arguments),this.language="en",this.data={},this._isCurrentlyHighlighted=!1,this._handleHighlight=r=>{var m,b,p,f,y,w;const e=r.detail??{},{columnId:i,level:t,formulaId:o}=e,l=((m=this.data)==null?void 0:m.columnId)??((b=this.data)==null?void 0:b.column)??((p=this.data)==null?void 0:p.formulaId)??((f=this.data)==null?void 0:f.formula)??((y=this.data)==null?void 0:y.id),n=((w=this.data)==null?void 0:w.level)??0,g=t??0,h=(l===i||l===o)&&n===g,z=(l===i||l===o)&&n===0&&g>0,v=h||z;if(this.classList.toggle("highlighted",v),v&&!this._isCurrentlyHighlighted){this._isCurrentlyHighlighted=!0;const k=this.getBoundingClientRect(),x=window.innerHeight||document.documentElement.clientHeight;if(k.top<0||k.bottom>x)try{this.scrollIntoView({block:"center"})}catch{this.scrollIntoView(!0)}}else!v&&this._isCurrentlyHighlighted&&(this._isCurrentlyHighlighted=!1)},this._clearHighlight=()=>{this.classList.remove("highlighted"),this._isCurrentlyHighlighted=!1},this.dataItemLevelDropped=r=>{this.dispatchEvent(new CustomEvent("data-item-dropped",{bubbles:!0,composed:!0,cancelable:!0,detail:{data:r}}))},this.dataItemLevelDragStarted=()=>{this.dispatchEvent(new CustomEvent("data-item-drag-started",{bubbles:!0,composed:!0,cancelable:!0,detail:{data:this.data}}))}}disconnectedCallback(){super.disconnectedCallback(),this._cleanupDraggable&&(this._cleanupDraggable(),this._cleanupDraggable=void 0),window.removeEventListener("slot-menu-highlight",this._handleHighlight),window.removeEventListener("slot-menu-inactive",this._clearHighlight)}connectedCallback(){super.connectedCallback(),window.addEventListener("slot-menu-highlight",this._handleHighlight),window.addEventListener("slot-menu-inactive",this._clearHighlight)}firstUpdated(r){this._cleanupDraggable=D.draggable({element:this,canDrag:()=>!this.disabled,onDragStart:()=>{this.style.opacity="0.5",this.dataItemLevelDragStarted()},onDrop:()=>{this.style.opacity="1",this.dataItemLevelDropped(this.data)},getInitialData:()=>{const e={...this.data};return this.label&&this.language&&!this.sublevel&&(e.label={},e.label[this.language]=this.label),this.description&&this.language&&(e.description={},e.description[this.language]=this.description),e},onGenerateDragPreview:e=>{const i=e.nativeSetDragImage;D.setCustomNativeDragPreview({render({container:t}){const o=F(e);t.append(o)},nativeSetDragImage:i})}})}render(){var t,o,l,n,g,h,z,v,m,b;const r=this.label??((o=(t=this.data)==null?void 0:t.label)==null?void 0:o[this.language])??((g=(l=this.data)==null?void 0:l.label)==null?void 0:g[Object.keys((n=this.data)==null?void 0:n.label)[0]])??"Untitled",e=this.description??((z=(h=this.data)==null?void 0:h.description)==null?void 0:z[this.language])??((b=(v=this.data)==null?void 0:v.description)==null?void 0:b[Object.keys((m=this.data)==null?void 0:m.description)[0]]),i=this.secondaryIconType?_.calculateDataItemSecondaryIcon(this.secondaryIconType,this.size):void 0;return I.html`
20
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("../get-css-variable-DLiZYZEi.cjs"),u=require("@luzmo/icons");require("@luzmo/lucero/icon");require("@luzmo/lucero/tooltip");const I=require("lit"),s=require("lit/decorators.js"),T=require("../focusable-B3E_hQmm.cjs"),M=require("../sized-mixin-DcvJLFeo.cjs"),_=require("../calculate-data-item-icon-DjW1_RI1.cjs"),R=require("../localize-r7ALOUy_.cjs"),B=":host{font-family:var(--luzmo-draggable-data-item-level-font-family, var(--luzmo-font-family));color:var(--luzmo-draggable-data-item-level-font-color, var(--draggable-data-item-level-font-color))}.draggable-data-item-level{transition:background-color var(--luzmo-animation-duration);background-color:var(--luzmo-draggable-data-item-level-background-color, var(--draggable-data-item-level-background-color));display:grid;grid-template-columns:var(--luzmo-draggable-data-item-level-drag-handle-width, var(--draggable-data-item-level-drag-handle-width)) var(--luzmo-draggable-data-item-level-data-icon-width, var(--draggable-data-item-level-data-icon-width)) 1fr var(--luzmo-draggable-data-item-level-description-width, var(--draggable-data-item-level-description-width, auto));gap:var(--luzmo-draggable-data-item-level-gap, var(--draggable-data-item-level-gap));align-items:center;padding:0 var(--luzmo-draggable-data-item-level-horizontal-padding, var(--draggable-data-item-level-horizontal-padding));border-radius:var(--luzmo-draggable-data-item-level-border-radius, var(--draggable-data-item-level-border-radius));border-width:var(--luzmo-draggable-data-item-level-border-width, var(--draggable-data-item-level-border-width));border-style:var(--luzmo-draggable-data-item-level-border-style, var(--draggable-data-item-level-border-style));border-color:var(--luzmo-draggable-data-item-level-border-color, var(--draggable-data-item-level-border-color));height:var(--luzmo-draggable-data-item-level-height, var(--draggable-data-item-level-height));cursor:move}.draggable-data-item-level:hover{background-color:var(--luzmo-draggable-data-item-level-background-color-hover, var(--draggable-data-item-level-background-color-hover));color:var(--luzmo-draggable-data-item-level-font-color-hover, var(--draggable-data-item-level-font-color-hover));border-color:var(--luzmo-draggable-data-item-level-border-color-hover, var(--draggable-data-item-level-border-color-hover))}.draggable-data-item-level:hover .data-description{color:var(--luzmo-draggable-data-item-level-font-color-hover, var(--draggable-data-item-level-font-color-hover))}.draggable-data-item-level .data-label{font-size:var(--luzmo-draggable-data-item-level-label-font-size, var(--draggable-data-item-level-label-font-size));white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.draggable-data-item-level .data-description{height:100%;display:flex;align-items:center;background-color:transparent;outline:none;border:none;color:var(--luzmo-draggable-data-item-level-font-color, var(--draggable-data-item-level-font-color));font-size:var(--luzmo-draggable-data-item-level-label-font-size, var(--draggable-data-item-level-label-font-size))}:host([sublevel]) .draggable-data-item-level{height:var(--luzmo-draggable-data-item-level-sublevel-height, var(--draggable-data-item-level-sublevel-height));background-color:var(--luzmo-draggable-data-item-level-sublevel-background-color, var(--draggable-data-item-level-sublevel-background-color));border-color:var(--luzmo-draggable-data-item-level-sublevel-border-color, var(--draggable-data-item-level-sublevel-border-color));margin-inline-start:var(--luzmo-draggable-data-item-level-sublevel-margin-inline-start, var(--draggable-data-item-level-sublevel-margin-inline-start));grid-template-columns:var(--luzmo-draggable-data-item-level-sublevel-drag-handle-width, var(--luzmo-draggable-data-item-level-drag-handle-width)) 1fr}:host([sublevel]) .draggable-data-item-level:hover{background-color:var(--luzmo-draggable-data-item-level-sublevel-background-color-hover, var(--draggable-data-item-level-sublevel-background-color-hover));color:var(--luzmo-draggable-data-item-level-sublevel-font-color-hover, var(--draggable-data-item-level-sublevel-font-color-hover))}:host([sublevel]) .draggable-data-item-level .drag-handle-icon{width:var(--luzmo-draggable-data-item-level-sublevel-drag-handle-width, var(--draggable-data-item-level-sublevel-drag-handle-width));text-align:center}:host(.highlighted) .draggable-data-item-level:not(:hover){background-color:var(--luzmo-draggable-data-item-level-background-color-highlighted, var(--draggable-data-item-level-background-color-highlighted));color:var(--luzmo-draggable-data-item-level-font-color-highlighted, var(--draggable-data-item-level-font-color-highlighted));border-color:var(--luzmo-draggable-data-item-level-border-color-highlighted, var(--draggable-data-item-level-border-color-highlighted))}:host(.highlighted) .draggable-data-item-level:not(:hover) .data-description{color:var(--luzmo-draggable-data-item-level-font-color-highlighted, var(--draggable-data-item-level-font-color-highlighted))}:host([disabled]) .draggable-data-item-level{background-color:var(--luzmo-draggable-data-item-level-background-color-disabled, var(--draggable-data-item-level-background-color-disabled));color:var(--luzmo-draggable-data-item-level-color-disabled, var(--draggable-data-item-level-color-disabled));cursor:not-allowed}:host([disabled]) .drag-handle-icon{opacity:.25}:host([sublevel][disabled]) .draggable-data-item-level{background-color:var(--luzmo-draggable-data-item-level-sublevel-background-color-disabled, var(--draggable-data-item-level-sublevel-background-color-disabled))}:host(.pulse) .draggable-data-item-level{box-shadow:0 0 0 0 var(--luzmo-draggable-data-item-level-pulse-color, var(--draggable-data-item-level-pulse-color)),0 0 0 0 var(--luzmo-draggable-data-item-level-pulse-color, var(--draggable-data-item-level-pulse-color));animation:draggableDataItemPulse 1.5s infinite cubic-bezier(.66,.33,0,1)}:host(.focus) .draggable-data-item-level{background-color:var(--luzmo-draggable-data-item-level-background-color-focus, var(--draggable-data-item-level-background-color-focus));color:var(--luzmo-draggable-data-item-level-font-color-focus, var(--draggable-data-item-level-font-color-focus));border-color:var(--luzmo-draggable-data-item-level-border-color-focus, var(--draggable-data-item-level-border-color-focus))}:host(.focus) .draggable-data-item-level .data-description{color:var(--luzmo-draggable-data-item-level-font-color-focus, var(--draggable-data-item-level-font-color-focus))}@keyframes draggableDataItemPulse{0%{box-shadow:0 0 0 0 var(--luzmo-draggable-data-item-level-pulse-color, var(--draggable-data-item-level-pulse-color)),0 0 0 0 var(--luzmo-draggable-data-item-level-pulse-color, var(--draggable-data-item-level-pulse-color))}to{box-shadow:0 0 0 .5rem transparent,0 0 0 .5rem transparent}}.drag-handle-icon{opacity:.6;font-size:var(--luzmo-draggable-data-item-level-drag-handle-size, var(--luzmo-draggable-data-item-level-drag-handle-size));width:var(--luzmo-draggable-data-item-level-drag-handle-width, var(--luzmo-draggable-data-item-level-drag-handle-width));text-align:center;justify-self:center}.data-icon-type{width:var(--luzmo-draggable-data-item-level-data-icon-width, var(--luzmo-draggable-data-item-level-data-icon-width));text-align:center;position:relative;justify-self:center}.with-secondary-icon{clip-path:polygon(0 0,60% 0,65% 60%,100% 65%,100% 100%,0 100%)}.secondary-icon{position:absolute;bottom:45%;left:70%;width:auto;font-size:.75em;line-height:1}:host([variant=highlight]){--draggable-data-item-level-background-color: var( --luzmo-background-color-highlight );--draggable-data-item-level-border-color: var( --luzmo-background-color-highlight );--draggable-data-item-level-background-color-hover: var( --luzmo-background-color-highlight-hover );--draggable-data-item-level-font-color-hover: var(--luzmo-font-color-hover);--draggable-data-item-level-border-color-hover: var( --luzmo-background-color-highlight-hover )}:host{--draggable-data-item-level-height: var(--luzmo-component-height);--draggable-data-item-level-label-font-size: var(--luzmo-font-size);--draggable-data-item-level-icon-type-size: var(--luzmo-font-size);--draggable-data-item-level-horizontal-padding: var(--luzmo-spacing-5);--draggable-data-item-level-border-width: var(--luzmo-border-width);--draggable-data-item-level-border-style: solid;--draggable-data-item-level-border-color: var(--luzmo-border-color-hover);--draggable-data-item-level-border-radius: var(--luzmo-border-radius);--draggable-data-item-level-gap: var(--luzmo-spacing-4);--draggable-data-item-level-font-color: var(--luzmo-font-color);--draggable-data-item-level-color-disabled: var(--luzmo-color-disabled);--draggable-data-item-level-background-color-disabled: var( --luzmo-background-color-disabled );--luzmo-draggable-data-item-level-drag-handle-size: var(--luzmo-font-size-s);--luzmo-draggable-data-item-level-drag-handle-width: var( --draggable-data-item-level-icon-type-size );--luzmo-draggable-data-item-level-data-icon-width: calc( var(--draggable-data-item-level-icon-type-size) + var(--luzmo-spacing-3) );--luzmo-draggable-data-item-level-description-width: calc( var(--draggable-data-item-level-icon-type-size) + var(--luzmo-spacing-2) );--draggable-data-item-level-sublevel-height: var(--luzmo-component-height-s);--draggable-data-item-level-sublevel-border-color: transparent;--draggable-data-item-level-sublevel-background-color: transparent;--draggable-data-item-level-sublevel-background-color-disabled: transparent;--draggable-data-item-level-sublevel-margin-inline-start: calc( var(--draggable-data-item-level-gap) + var(--luzmo-draggable-data-item-level-drag-handle-width) );--luzmo-draggable-data-item-level-sublevel-drag-handle-width: var( --luzmo-draggable-data-item-level-data-icon-width );--draggable-data-item-level-sublevel-background-color-hover: rgba( var(--luzmo-border-color-rgb), .05 )}:host([hide-type-icon]){--draggable-data-item-level-sublevel-margin-inline-start: var( --draggable-data-item-level-gap )}:host(.highlighted){--draggable-data-item-level-background-color-highlighted: var( --luzmo-primary );--draggable-data-item-level-font-color-highlighted: var( --luzmo-primary-inverse-color );--draggable-data-item-level-border-color-highlighted: var( --luzmo-border-color )}:host(.focus){--draggable-data-item-level-background-color-focus: var( --luzmo-background-color-focus, var(--luzmo-secondary) );--draggable-data-item-level-font-color-focus: var( --luzmo-font-color-focus, var(--luzmo-secondary-inverse-color) );--draggable-data-item-level-border-color-focus: var( --luzmo-border-color-focus, var(--luzmo-secondary) )}:host(.pulse){--draggable-data-item-level-pulse-color: var( --luzmo-secondary-outline, rgba(var(--luzmo-secondary-rgb), .4) )}:host([size=s]){--draggable-data-item-level-height: var(--luzmo-component-height-s);--draggable-data-item-level-label-font-size: var(--luzmo-font-size-s);--draggable-data-item-level-icon-type-size: var(--luzmo-font-size-s);--draggable-data-item-level-horizontal-padding: var(--luzmo-spacing-4);--draggable-data-item-level-border-radius: var(--luzmo-border-radius);--draggable-data-item-level-gap: var(--luzmo-spacing-3);--draggable-data-item-level-sublevel-height: var(--luzmo-component-height-xs);--luzmo-draggable-data-item-level-drag-handle-size: var(--luzmo-font-size-xs)}:host([size=l]){--draggable-data-item-level-height: var(--luzmo-component-height-l);--draggable-data-item-level-label-font-size: var(--luzmo-font-size-l);--draggable-data-item-level-icon-type-size: var(--luzmo-font-size-l);--draggable-data-item-level-horizontal-padding: var(--luzmo-spacing-5);--draggable-data-item-level-border-radius: var(--luzmo-border-radius-l);--draggable-data-item-level-gap: var(--luzmo-spacing-5);--draggable-data-item-level-sublevel-height: var(--luzmo-component-height);--luzmo-draggable-data-item-level-drag-handle-size: var(--luzmo-font-size)}:host([size=xl]){--draggable-data-item-level-height: var(--luzmo-component-height-xl);--draggable-data-item-level-label-font-size: var(--luzmo-font-size-xl);--draggable-data-item-level-icon-type-size: var(--luzmo-font-size-xl);--draggable-data-item-level-horizontal-padding: var(--luzmo-spacing-5);--draggable-data-item-level-border-radius: var(--luzmo-border-radius-xl);--draggable-data-item-level-gap: var(--luzmo-spacing-5);--draggable-data-item-level-sublevel-height: var(--luzmo-component-height-l);--luzmo-draggable-data-item-level-drag-handle-size: var(--luzmo-font-size-l)}:host{box-sizing:border-box}",F=a=>{var h,z,v,m,b,p,f,y,w,k,x,S,H,$,L,P,q;const r=a.source.element;let e="";(m=(v=(z=(h=a.source)==null?void 0:h.element)==null?void 0:z.renderRoot)==null?void 0:v.querySelector(".data-label"))!=null&&m.textContent&&(e=(f=(p=(b=a.source)==null?void 0:b.element)==null?void 0:p.renderRoot)==null?void 0:f.querySelector(".data-label").textContent),e||(e=R.localize((w=(y=a==null?void 0:a.source)==null?void 0:y.data)==null?void 0:w.label,(x=(k=a==null?void 0:a.source)==null?void 0:k.element)==null?void 0:x.language),e=e||"Untitled");const i=(H=(S=a==null?void 0:a.source)==null?void 0:S.data)==null?void 0:H.type,t=(L=($=a==null?void 0:a.source)==null?void 0:$.data)==null?void 0:L.subtype,o=_.calculateDataItemIcon({type:i,subtype:t},r.size),l={};[["borderColor","--luzmo-draggable-data-item-level-border-color","--draggable-data-item-level-border-color"],["backgroundColor","--luzmo-draggable-data-item-level-background-color","--draggable-data-item-level-background-color"],["color","--luzmo-draggable-data-item-level-font-color","--draggable-data-item-level-font-color"],["fontSize","--luzmo-draggable-data-item-level-label-font-size","--draggable-data-item-level-label-font-size"],["height","--luzmo-draggable-data-item-level-height","--draggable-data-item-level-height"],["borderRadius","--luzmo-draggable-data-item-level-border-radius","--draggable-data-item-level-border-radius"],["fontFamily","--luzmo-draggable-data-item-level-font-family","--luzmo-font-family"],["horizontalPadding","--luzmo-draggable-data-item-level-horizontal-padding","--draggable-data-item-level-horizontal-padding"],["gap","--luzmo-draggable-data-item-level-gap","--draggable-data-item-level-gap"]].forEach(([C,O,j])=>{const V=D.getCssVariableValue(r,O)||D.getCssVariableValue(r,j);l[C]=V});const n=document.createElement("div"),g=document.createElement("div");if(n.innerHTML=e,Object.assign(n.style,{maxWidth:"12rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),!((q=(P=a==null?void 0:a.source)==null?void 0:P.element)!=null&&q.sublevel)){const C=document.createElement("luzmo-icon");C.icon=o,g.append(C)}return g.append(n),Object.assign(g.style,{display:"flex",alignItems:"center",maxWidth:"12rem",lineHeight:"1",height:l.height,border:`1px solid ${l.borderColor}`,backgroundColor:l.backgroundColor,borderRadius:l.borderRadius,fontFamily:l.fontFamily,fontSize:l.fontSize,color:l.color,padding:`0 ${l.horizontalPadding}`,gap:l.gap}),g};var U=Object.defineProperty,c=(a,r,e,i)=>{for(var t=void 0,o=a.length-1,l;o>=0;o--)(l=a[o])&&(t=l(r,e,t)||t);return t&&U(r,e,t),t};const E=class E extends M.SizedMixin(T.LuzmoElement,{validSizes:["s","m","l","xl"],noDefaultSize:!0}){constructor(){super(...arguments),this.language="en",this.data={},this._isCurrentlyHighlighted=!1,this._handleHighlight=r=>{var m,b,p,f,y,w;const e=r.detail??{},{columnId:i,level:t,formulaId:o}=e,l=((m=this.data)==null?void 0:m.columnId)??((b=this.data)==null?void 0:b.column)??((p=this.data)==null?void 0:p.formulaId)??((f=this.data)==null?void 0:f.formula)??((y=this.data)==null?void 0:y.id),n=((w=this.data)==null?void 0:w.level)??0,g=t??0,h=(l===i||l===o)&&n===g,z=(l===i||l===o)&&n===0&&g>0,v=h||z;if(this.classList.toggle("highlighted",v),v&&!this._isCurrentlyHighlighted){this._isCurrentlyHighlighted=!0;const k=this.getBoundingClientRect(),x=window.innerHeight||document.documentElement.clientHeight;if(k.top<0||k.bottom>x)try{this.scrollIntoView({block:"center"})}catch{this.scrollIntoView(!0)}}else!v&&this._isCurrentlyHighlighted&&(this._isCurrentlyHighlighted=!1)},this._clearHighlight=()=>{this.classList.remove("highlighted"),this._isCurrentlyHighlighted=!1},this.dataItemLevelDropped=r=>{this.dispatchEvent(new CustomEvent("data-item-dropped",{bubbles:!0,composed:!0,cancelable:!0,detail:{data:r}}))},this.dataItemLevelDragStarted=()=>{this.dispatchEvent(new CustomEvent("data-item-drag-started",{bubbles:!0,composed:!0,cancelable:!0,detail:{data:this.data}}))}}disconnectedCallback(){super.disconnectedCallback(),this._cleanupDraggable&&(this._cleanupDraggable(),this._cleanupDraggable=void 0),window.removeEventListener("slot-menu-highlight",this._handleHighlight),window.removeEventListener("slot-menu-inactive",this._clearHighlight)}connectedCallback(){super.connectedCallback(),window.addEventListener("slot-menu-highlight",this._handleHighlight),window.addEventListener("slot-menu-inactive",this._clearHighlight)}firstUpdated(r){this._cleanupDraggable=D.draggable({element:this,canDrag:()=>!this.disabled,onDragStart:()=>{this.style.opacity="0.5",this.dataItemLevelDragStarted()},onDrop:()=>{this.style.opacity="1",this.dataItemLevelDropped(this.data)},getInitialData:()=>{const e={...this.data};return this.label&&this.language&&!this.sublevel&&(e.label={},e.label[this.language]=this.label),this.description&&this.language&&(e.description={},e.description[this.language]=this.description),e},onGenerateDragPreview:e=>{const i=e.nativeSetDragImage;D.setCustomNativeDragPreview({render({container:t}){const o=F(e);t.append(o)},nativeSetDragImage:i})}})}render(){var t,o,l,n,g,h,z,v,m,b;const r=this.label??((o=(t=this.data)==null?void 0:t.label)==null?void 0:o[this.language])??((g=(l=this.data)==null?void 0:l.label)==null?void 0:g[Object.keys((n=this.data)==null?void 0:n.label)[0]])??"Untitled",e=this.description??((z=(h=this.data)==null?void 0:h.description)==null?void 0:z[this.language])??((b=(v=this.data)==null?void 0:v.description)==null?void 0:b[Object.keys((m=this.data)==null?void 0:m.description)[0]]),i=this.secondaryIconType?_.calculateDataItemSecondaryIcon(this.secondaryIconType,this.size):void 0;return I.html`
21
21
  <div class="draggable-data-item-level" tabindex="0">
22
22
  <div class="drag-handle-icon">
23
23
  ${this.sublevel?u.luzmoIcon(u.luzmoDragLines):u.luzmoIcon(u.luzmoArrows)}
@@ -25,7 +25,7 @@ import { unsafeCSS as q, html as I } from "lit";
25
25
  import { property as c } from "lit/decorators.js";
26
26
  import { L as A } from "../focusable-DCIFkpiW.js";
27
27
  import { S as G } from "../sized-mixin-cJbo3PKR.js";
28
- import { c as O, a as N } from "../calculate-data-item-icon-DHRIbsqH.js";
28
+ import { c as O, a as N } from "../calculate-data-item-icon-DZDqb3xu.js";
29
29
  import { l as W } from "../localize-BX7q0S0M.js";
30
30
  (function() {
31
31
  if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
@@ -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"});require("@luzmo/lucero/field-label");require("@luzmo/lucero/icon");require("@luzmo/lucero/menu");require("@luzmo/lucero/picker");const u=require("lit"),f=require("@lit/localize"),p=require("@luzmo/lucero/utils"),I=require("../set-locale-BRRalqne.cjs"),m=require("lit/decorators.js"),y=require("../calculate-data-item-icon-CHq4n9Kw.cjs"),z=require("../localize-r7ALOUy_.cjs"),D=":host{--var: blue}:host{font-family:var(--luzmo-font-family)}";var b=Object.defineProperty,L=Object.getOwnPropertyDescriptor,n=(h,e,a,l)=>{for(var t=l>1?void 0:l?L(e,a):e,s=h.length-1,i;s>=0;s--)(i=h[s])&&(t=(l?i(e,a,t):i(t))||t);return l&&t&&b(e,a,t),t};exports.LuzmoFilterDataItemPicker=class extends p.SizedMixin(p.LuzmoElement,{validSizes:Object.values(p.ElementSizes)}){constructor(){super(...arguments),this.language="en",this.contentLanguage="en",this.hasLabel=!1,this.icons="only-menu",this.allowEmpty=!1,this.placeholder="",this.dataItemId="",this.loading=!1,this.invalid=!1,this.datasetsDataItems=[]}static get styles(){return[u.unsafeCSS(D)]}_sendChangeEvent(){this.dispatchEvent(new CustomEvent("data-item-selected",{bubbles:!0,composed:!0,cancelable:!0,detail:{dataItem:this._dataItemSelected}}))}setDataItem(e){const a=e==null?void 0:e.detail;for(const l of this.datasetsDataItems){const t=l.columns,s=l.formulas,i=t.find(d=>d.id===a),r=d=>{this._dataItemSelected=d,this.dataItemId=a,this._sendChangeEvent()};if(i){r(i);break}const o=s.find(d=>d.id===a);if(o){r(o);break}}}_findDataItemInDatasetsDataItems(e){for(const a of this.datasetsDataItems){const l=a.columns,t=a.formulas,s=l==null?void 0:l.find(r=>r.id===e);if(s){this._dataItemSelected=s,this._dataItemSelected.datasetId=a.id,["hierarchy","datetime"].includes(s.type??"")&&(this._dataItemSelected.lowestLevel=s.lowestLevel);break}const i=t==null?void 0:t.find(r=>r.id===e);if(i){this._dataItemSelected=i,this._dataItemSelected.isFormula=!0,this._dataItemSelected.datasetId=a.id,["hierarchy","datetime"].includes(i.type??"")&&(this._dataItemSelected.lowestLevel=i.lowestLevel);break}}}willUpdate(e){var s,i,r;const a=e.has("language"),l=e.has("dataItemId"),t=e.has("datasetsDataItems");if(a&&this.language!==I.getLocale()&&([...I.targetLocales].includes(this.language??"en")||this.language==="en")&&I.setLocale(this.language),(l||t)&&(this._findDataItemInDatasetsDataItems(this.dataItemId),!this._dataItemSelected&&!this.allowEmpty&&!this.loading)){for(const o of this.datasetsDataItems)if(((s=o==null?void 0:o.columns)==null?void 0:s.length)>0){this._dataItemSelected=o.columns[0];break}else if(((i=o==null?void 0:o.formulas)==null?void 0:i.length)>0){this._dataItemSelected=o.formulas[0];break}this.dataItemId=(r=this._dataItemSelected)==null?void 0:r.id,this._sendChangeEvent()}}render(){let e=u.html``;for(const t of this.datasetsDataItems??[]){const s=(t==null?void 0:t.columns)??[],i=(t==null?void 0:t.formulas)??[],r=c=>{const g=u.html`
20
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@luzmo/lucero/field-label");require("@luzmo/lucero/icon");require("@luzmo/lucero/menu");require("@luzmo/lucero/picker");const u=require("lit"),f=require("@lit/localize"),p=require("@luzmo/lucero/utils"),I=require("../set-locale-BRRalqne.cjs"),m=require("lit/decorators.js"),y=require("../calculate-data-item-icon-DjW1_RI1.cjs"),z=require("../localize-r7ALOUy_.cjs"),D=":host{--var: blue}:host{font-family:var(--luzmo-font-family)}";var b=Object.defineProperty,L=Object.getOwnPropertyDescriptor,n=(h,e,a,l)=>{for(var t=l>1?void 0:l?L(e,a):e,s=h.length-1,i;s>=0;s--)(i=h[s])&&(t=(l?i(e,a,t):i(t))||t);return l&&t&&b(e,a,t),t};exports.LuzmoFilterDataItemPicker=class extends p.SizedMixin(p.LuzmoElement,{validSizes:Object.values(p.ElementSizes)}){constructor(){super(...arguments),this.language="en",this.contentLanguage="en",this.hasLabel=!1,this.icons="only-menu",this.allowEmpty=!1,this.placeholder="",this.dataItemId="",this.loading=!1,this.invalid=!1,this.datasetsDataItems=[]}static get styles(){return[u.unsafeCSS(D)]}_sendChangeEvent(){this.dispatchEvent(new CustomEvent("data-item-selected",{bubbles:!0,composed:!0,cancelable:!0,detail:{dataItem:this._dataItemSelected}}))}setDataItem(e){const a=e==null?void 0:e.detail;for(const l of this.datasetsDataItems){const t=l.columns,s=l.formulas,i=t.find(d=>d.id===a),r=d=>{this._dataItemSelected=d,this.dataItemId=a,this._sendChangeEvent()};if(i){r(i);break}const o=s.find(d=>d.id===a);if(o){r(o);break}}}_findDataItemInDatasetsDataItems(e){for(const a of this.datasetsDataItems){const l=a.columns,t=a.formulas,s=l==null?void 0:l.find(r=>r.id===e);if(s){this._dataItemSelected=s,this._dataItemSelected.datasetId=a.id,["hierarchy","datetime"].includes(s.type??"")&&(this._dataItemSelected.lowestLevel=s.lowestLevel);break}const i=t==null?void 0:t.find(r=>r.id===e);if(i){this._dataItemSelected=i,this._dataItemSelected.isFormula=!0,this._dataItemSelected.datasetId=a.id,["hierarchy","datetime"].includes(i.type??"")&&(this._dataItemSelected.lowestLevel=i.lowestLevel);break}}}willUpdate(e){var s,i,r;const a=e.has("language"),l=e.has("dataItemId"),t=e.has("datasetsDataItems");if(a&&this.language!==I.getLocale()&&([...I.targetLocales].includes(this.language??"en")||this.language==="en")&&I.setLocale(this.language),(l||t)&&(this._findDataItemInDatasetsDataItems(this.dataItemId),!this._dataItemSelected&&!this.allowEmpty&&!this.loading)){for(const o of this.datasetsDataItems)if(((s=o==null?void 0:o.columns)==null?void 0:s.length)>0){this._dataItemSelected=o.columns[0];break}else if(((i=o==null?void 0:o.formulas)==null?void 0:i.length)>0){this._dataItemSelected=o.formulas[0];break}this.dataItemId=(r=this._dataItemSelected)==null?void 0:r.id,this._sendChangeEvent()}}render(){let e=u.html``;for(const t of this.datasetsDataItems??[]){const s=(t==null?void 0:t.columns)??[],i=(t==null?void 0:t.formulas)??[],r=c=>{const g=u.html`
21
21
  <luzmo-icon
22
22
  slot="icon"
23
23
  .size=${this.size}
@@ -26,7 +26,7 @@ import { msg as z, localized as g } from "@lit/localize";
26
26
  import { SizedMixin as b, LuzmoElement as y, ElementSizes as v } from "@luzmo/lucero/utils";
27
27
  import { g as I, t as x, s as S } from "../set-locale-Dp3N_gXN.js";
28
28
  import { property as u } from "lit/decorators.js";
29
- import { c as w } from "../calculate-data-item-icon-DHRIbsqH.js";
29
+ import { c as w } from "../calculate-data-item-icon-DZDqb3xu.js";
30
30
  import { l as _ } from "../localize-BX7q0S0M.js";
31
31
  (function() {
32
32
  if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {