@luzmo/analytics-components-kit 1.0.1-alpha.41 → 1.0.1-alpha.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/{calculate-data-item-icon-B9B0iLjm.js → calculate-data-item-icon-BFpVWXnR.js} +61 -43
- package/components/{calculate-data-item-icon-CjHO4KtA.cjs → calculate-data-item-icon-C_3QUGmB.cjs} +1 -1
- package/components/display-settings/index.cjs +3 -3
- package/components/display-settings/index.js +2 -2
- package/components/display-settings-binning/index.cjs +1 -1
- package/components/display-settings-binning/index.js +1 -1
- package/components/display-settings-datetime/index.cjs +1 -1
- package/components/display-settings-datetime/index.js +1 -1
- package/components/display-settings-grand-totals/index.cjs +1 -1
- package/components/display-settings-grand-totals/index.js +1 -1
- package/components/display-settings-numeric/index.cjs +2 -2
- package/components/display-settings-numeric/index.js +1 -1
- package/components/display-settings-period-over-period/index.cjs +8 -8
- package/components/display-settings-period-over-period/index.js +82 -71
- package/components/draggable-data-item/draggable-data-item.d.ts +2 -0
- package/components/draggable-data-item/index.cjs +6 -5
- package/components/draggable-data-item/index.js +20 -16
- package/components/draggable-data-item-level/draggable-data-item-level.d.ts +3 -0
- package/components/draggable-data-item-level/index.cjs +12 -7
- package/components/draggable-data-item-level/index.js +78 -59
- package/components/droppable-slot/index.cjs +5 -5
- package/components/droppable-slot/index.js +3 -3
- package/components/edit-option-action-button-group/index.cjs +1 -1
- package/components/edit-option-action-button-group/index.js +1 -1
- package/components/edit-option-positions-number-field/index.cjs +2 -2
- package/components/edit-option-positions-number-field/index.js +1 -1
- package/components/filter-data-item-picker/index.cjs +1 -1
- package/components/filter-data-item-picker/index.js +1 -1
- package/components/grid/index.cjs +1 -1
- package/components/grid/index.js +1 -1
- package/components/{luzmo-icons-v9hKZ3HV.js → luzmo-icons-B2K7AcCF.js} +175 -141
- package/components/luzmo-icons-CP__dRRM.cjs +31 -0
- package/components/slot-contents-picker/index.cjs +8 -8
- package/components/slot-contents-picker/index.js +2 -2
- package/components/slot-menu/index.cjs +5 -4
- package/components/slot-menu/index.js +6 -5
- package/components/slot-menu-list/index.cjs +2 -2
- package/components/slot-menu-list/index.js +1 -1
- package/custom-elements.json +51 -1
- package/package.json +1 -1
- package/utils/data-item-types/calculate-data-item-icon.d.ts +1 -0
- package/components/luzmo-icons-B_3XTuMC.cjs +0 -31
@@ -17,20 +17,20 @@
|
|
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 c=require("../localized-decorator-SOrjcPab.cjs"),m=require("../set-locale-Cam8nRIW.cjs"),v=require("../periods.const-CfXsouLz.cjs"),e=require("../property-BCb4Kybn.cjs"),
|
20
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../localized-decorator-SOrjcPab.cjs"),m=require("../set-locale-Cam8nRIW.cjs"),v=require("../periods.const-CfXsouLz.cjs"),e=require("../property-BCb4Kybn.cjs"),p=require("../focusable-BTJYY_Mf.cjs"),h=require("../sized-mixin-BNtmplgF.cjs");require("../draggable-data-item-level/index.cjs");const y=":host{--draggable-data-item-sublevels-margin-vertical: var(--luzmo-spacing-1);--draggable-data-item-sublevels-gap: 0}:host([size=s]){--draggable-data-item-sublevels-margin-vertical: var(--luzmo-spacing-1)}:host([size=l]){--draggable-data-item-sublevels-margin-vertical: var(--luzmo-spacing-2)}:host([size=xl]){--draggable-data-item-sublevels-margin-vertical: var(--luzmo-spacing-3)}.draggable-data-item-sublevels{display:flex;flex-direction:column;gap:var(--luzmo-draggable-data-item-sublevels-gap, var(--draggable-data-item-sublevels-gap));margin:var(--luzmo-draggable-data-item-sublevels-margin-vertical, var(--draggable-data-item-sublevels-margin-vertical)) 0}:host{box-sizing:border-box}";var z=Object.defineProperty,D=Object.getOwnPropertyDescriptor,t=(n,l,s,i)=>{for(var a=i>1?void 0:i?D(l,s):l,g=n.length-1,o;g>=0;g--)(o=n[g])&&(a=(i?o(l,s,a):o(a))||a);return i&&a&&z(l,s,a),a};exports.LuzmoDraggableDataItem=class extends h.SizedMixin(p.LuzmoElement,{validSizes:["s","m","l","xl"],noDefaultSize:!0}){constructor(){super(...arguments),this.language="en",this.data={}}willUpdate(l){l.has("language")&&this.language!==m.getLocale()&&([...m.targetLocales].includes(this.language??"en")||this.language==="en")&&m.setLocale(this.language)}renderSublevels(){var s,i,a,g,o;let l;if(((s=this.data)==null?void 0:s.type)==="datetime")return l=((i=this.data)==null?void 0:i.subtype)==="date"?this.data.lowestLevel??5:this.data.lowestLevel??9,e.x`
|
21
21
|
<div class="draggable-data-item-sublevels">
|
22
|
-
${Array.from({length:
|
22
|
+
${Array.from({length:l},(b,r)=>{const d=v.DATETIME_LEVELS[r].i18n(),u={...this.data,level:r+1};return e.x`<luzmo-draggable-data-item-level
|
23
23
|
sublevel
|
24
24
|
.data=${u}
|
25
25
|
.language=${this.language}
|
26
26
|
.size=${this.size}
|
27
27
|
.variant=${this.variant}
|
28
28
|
.disabled=${this.disabled}
|
29
|
-
.label=${
|
29
|
+
.label=${d}
|
30
30
|
?hide-type-icon=${this.hideTypeIcon}
|
31
31
|
></luzmo-draggable-data-item-level>`})}
|
32
32
|
</div>
|
33
|
-
`;if(((a=this.data)==null?void 0:a.type)==="hierarchy"&&((o=(g=this.data)==null?void 0:g.hierarchyLevels)==null?void 0:o.length)>2){const b=this.data.hierarchyLevels.filter(
|
33
|
+
`;if(((a=this.data)==null?void 0:a.type)==="hierarchy"&&((o=(g=this.data)==null?void 0:g.hierarchyLevels)==null?void 0:o.length)>2){const b=this.data.hierarchyLevels.filter(r=>(r==null?void 0:r.level)>=1).map((r,d)=>{const u={...this.data,level:d,label:r.label};return e.x`<luzmo-draggable-data-item-level
|
34
34
|
sublevel
|
35
35
|
.data=${u}
|
36
36
|
.language=${this.language}
|
@@ -49,7 +49,8 @@
|
|
49
49
|
.disabled=${this.disabled}
|
50
50
|
.label=${this.label}
|
51
51
|
.description=${this.description}
|
52
|
+
.secondaryIconType=${this.secondaryIconType}
|
52
53
|
?hide-type-icon=${this.hideTypeIcon}
|
53
54
|
></luzmo-draggable-data-item-level>
|
54
55
|
${this.hideSublevels?"":this.renderSublevels()}
|
55
|
-
`}};exports.LuzmoDraggableDataItem.styles=e.r(
|
56
|
+
`}};exports.LuzmoDraggableDataItem.styles=e.r(y);t([e.n({type:String,reflect:!0})],exports.LuzmoDraggableDataItem.prototype,"variant",2);t([e.n({type:String,reflect:!0})],exports.LuzmoDraggableDataItem.prototype,"language",2);t([e.n({type:Boolean,reflect:!0})],exports.LuzmoDraggableDataItem.prototype,"disabled",2);t([e.n({type:Boolean,reflect:!0,attribute:"hide-sublevels"})],exports.LuzmoDraggableDataItem.prototype,"hideSublevels",2);t([e.n({type:Boolean,reflect:!0,attribute:"hide-type-icon"})],exports.LuzmoDraggableDataItem.prototype,"hideTypeIcon",2);t([e.n({type:String,reflect:!0,attribute:"secondary-icon-type"})],exports.LuzmoDraggableDataItem.prototype,"secondaryIconType",2);t([e.n({type:String,reflect:!0})],exports.LuzmoDraggableDataItem.prototype,"label",2);t([e.n({type:String,reflect:!0})],exports.LuzmoDraggableDataItem.prototype,"description",2);t([e.n({type:Object})],exports.LuzmoDraggableDataItem.prototype,"data",2);exports.LuzmoDraggableDataItem=t([c.localized()],exports.LuzmoDraggableDataItem);customElements.get("luzmo-draggable-data-item")||customElements.define("luzmo-draggable-data-item",exports.LuzmoDraggableDataItem);
|
@@ -20,8 +20,8 @@
|
|
20
20
|
import { l as b } from "../localized-decorator-DNr1P1m0.js";
|
21
21
|
import { g as p, t as h, s as f } from "../set-locale-DbEAMqUs.js";
|
22
22
|
import { D as v } from "../periods.const-C89NNRX-.js";
|
23
|
-
import { x as n, r as
|
24
|
-
import { L as
|
23
|
+
import { x as n, r as y, n as a } from "../property-Dn4zSyxu.js";
|
24
|
+
import { L as x } from "../focusable-BXhQz3_k.js";
|
25
25
|
import { S as $ } from "../sized-mixin-BR_Ii7le.js";
|
26
26
|
import "../draggable-data-item-level/index.js";
|
27
27
|
const z = () => {
|
@@ -37,7 +37,7 @@ var S = Object.defineProperty, L = Object.getOwnPropertyDescriptor, r = (o, i, u
|
|
37
37
|
(d = o[m]) && (l = (s ? d(i, u, l) : d(l)) || l);
|
38
38
|
return s && l && S(i, u, l), l;
|
39
39
|
};
|
40
|
-
let e = class extends $(
|
40
|
+
let e = class extends $(x, {
|
41
41
|
validSizes: ["s", "m", "l", "xl"],
|
42
42
|
noDefaultSize: !0
|
43
43
|
}) {
|
@@ -53,8 +53,8 @@ let e = class extends $(y, {
|
|
53
53
|
if (((i = this.data) == null ? void 0 : i.type) === "datetime")
|
54
54
|
return o = ((u = this.data) == null ? void 0 : u.subtype) === "date" ? this.data.lowestLevel ?? 5 : this.data.lowestLevel ?? 9, n`
|
55
55
|
<div class="draggable-data-item-sublevels">
|
56
|
-
${Array.from({ length: o }, (d,
|
57
|
-
const c = v[
|
56
|
+
${Array.from({ length: o }, (d, t) => {
|
57
|
+
const c = v[t].i18n(), g = { ...this.data, level: t + 1 };
|
58
58
|
return n`<luzmo-draggable-data-item-level
|
59
59
|
sublevel
|
60
60
|
.data=${g}
|
@@ -69,8 +69,8 @@ let e = class extends $(y, {
|
|
69
69
|
</div>
|
70
70
|
`;
|
71
71
|
if (((s = this.data) == null ? void 0 : s.type) === "hierarchy" && ((m = (l = this.data) == null ? void 0 : l.hierarchyLevels) == null ? void 0 : m.length) > 2) {
|
72
|
-
const d = this.data.hierarchyLevels.filter((
|
73
|
-
const g = { ...this.data, level: c, label:
|
72
|
+
const d = this.data.hierarchyLevels.filter((t) => (t == null ? void 0 : t.level) >= 1).map((t, c) => {
|
73
|
+
const g = { ...this.data, level: c, label: t.label };
|
74
74
|
return n`<luzmo-draggable-data-item-level
|
75
75
|
sublevel
|
76
76
|
.data=${g}
|
@@ -97,36 +97,40 @@ let e = class extends $(y, {
|
|
97
97
|
.disabled=${this.disabled}
|
98
98
|
.label=${this.label}
|
99
99
|
.description=${this.description}
|
100
|
+
.secondaryIconType=${this.secondaryIconType}
|
100
101
|
?hide-type-icon=${this.hideTypeIcon}
|
101
102
|
></luzmo-draggable-data-item-level>
|
102
103
|
${this.hideSublevels ? "" : this.renderSublevels()}
|
103
104
|
`;
|
104
105
|
}
|
105
106
|
};
|
106
|
-
e.styles =
|
107
|
+
e.styles = y(w);
|
107
108
|
r([
|
108
|
-
|
109
|
+
a({ type: String, reflect: !0 })
|
109
110
|
], e.prototype, "variant", 2);
|
110
111
|
r([
|
111
|
-
|
112
|
+
a({ type: String, reflect: !0 })
|
112
113
|
], e.prototype, "language", 2);
|
113
114
|
r([
|
114
|
-
|
115
|
+
a({ type: Boolean, reflect: !0 })
|
115
116
|
], e.prototype, "disabled", 2);
|
116
117
|
r([
|
117
|
-
|
118
|
+
a({ type: Boolean, reflect: !0, attribute: "hide-sublevels" })
|
118
119
|
], e.prototype, "hideSublevels", 2);
|
119
120
|
r([
|
120
|
-
|
121
|
+
a({ type: Boolean, reflect: !0, attribute: "hide-type-icon" })
|
121
122
|
], e.prototype, "hideTypeIcon", 2);
|
122
123
|
r([
|
123
|
-
|
124
|
+
a({ type: String, reflect: !0, attribute: "secondary-icon-type" })
|
125
|
+
], e.prototype, "secondaryIconType", 2);
|
126
|
+
r([
|
127
|
+
a({ type: String, reflect: !0 })
|
124
128
|
], e.prototype, "label", 2);
|
125
129
|
r([
|
126
|
-
|
130
|
+
a({ type: String, reflect: !0 })
|
127
131
|
], e.prototype, "description", 2);
|
128
132
|
r([
|
129
|
-
|
133
|
+
a({ type: Object })
|
130
134
|
], e.prototype, "data", 2);
|
131
135
|
e = r([
|
132
136
|
b()
|
@@ -9,6 +9,7 @@ declare const LuzmoDraggableDataItemLevel_base: typeof LuzmoElement & {
|
|
9
9
|
/**
|
10
10
|
* @element luzmo-draggable-data-item-level
|
11
11
|
* @fires data-item-dropped - Announces that the draggable data item has been dropped
|
12
|
+
* @fires data-item-drag-started - Announces that the drag is started on the data item
|
12
13
|
*/
|
13
14
|
export declare class LuzmoDraggableDataItemLevel extends LuzmoDraggableDataItemLevel_base {
|
14
15
|
static styles: import("lit").CSSResult;
|
@@ -19,10 +20,12 @@ export declare class LuzmoDraggableDataItemLevel extends LuzmoDraggableDataItemL
|
|
19
20
|
disabled: boolean;
|
20
21
|
label: string;
|
21
22
|
description: string;
|
23
|
+
secondaryIconType?: 'derived' | 'formula';
|
22
24
|
data: any;
|
23
25
|
private _cleanupDraggable;
|
24
26
|
disconnectedCallback(): void;
|
25
27
|
private dataItemLevelDropped;
|
28
|
+
private dataItemLevelDragStarted;
|
26
29
|
protected firstUpdated(_changedProperties: PropertyValues): void;
|
27
30
|
protected render(): TemplateResult;
|
28
31
|
}
|
@@ -17,20 +17,25 @@
|
|
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 p=require("../get-css-variable-DLiZYZEi.cjs"),b=require("../luzmo-icons-B_3XTuMC.cjs");require("../index-DSQyBS9Z.cjs");require("../index-CYeQkVeJ.cjs");const r=require("../property-BCb4Kybn.cjs"),M=require("../focusable-BTJYY_Mf.cjs"),T=require("../sized-mixin-BNtmplgF.cjs"),O=require("../calculate-data-item-icon-CjHO4KtA.cjs"),B=require("../localize-r7ALOUy_.cjs"),F=":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:flex;justify-content:space-between;align-items:center;padding:0 var(--luzmo-draggable-data-item-level-horizontal-padding, var(--draggable-data-item-level-horizontal-padding));gap:var(--luzmo-draggable-data-item-level-gap, var(--draggable-data-item-level-gap));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 .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}: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))}: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))}: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([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))}.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}.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}.data-label{flex-grow:1}.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([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) );--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([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}",U=e=>{var s,c,u,h,y,k,w,x,D,S,C,I,q,P,$,E,j;const d=e.source.element;let a="";(h=(u=(c=(s=e.source)==null?void 0:s.element)==null?void 0:c.renderRoot)==null?void 0:u.querySelector(".data-label"))!=null&&h.textContent&&(a=(w=(k=(y=e.source)==null?void 0:y.element)==null?void 0:k.renderRoot)==null?void 0:w.querySelector(".data-label").textContent),a||(a=B.localize((D=(x=e==null?void 0:e.source)==null?void 0:x.data)==null?void 0:D.label,(C=(S=e==null?void 0:e.source)==null?void 0:S.element)==null?void 0:C.language),a=a||"Untitled");const n=(q=(I=e==null?void 0:e.source)==null?void 0:I.data)==null?void 0:q.type,t=($=(P=e==null?void 0:e.source)==null?void 0:P.data)==null?void 0:$.subtype,i=O.calculateDataItemIcon({type:n,subtype:t},d.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(([z,_,R])=>{const V=p.getCssVariableValue(d,_)||p.getCssVariableValue(d,R);l[z]=V});const m=document.createElement("div"),v=document.createElement("div");if(m.innerHTML=a,!((j=(E=e==null?void 0:e.source)==null?void 0:E.element)!=null&&j.sublevel)){const z=document.createElement("luzmo-icon");z.icon=i,v.append(z)}return v.append(m),Object.assign(v.style,{display:"flex",alignItems:"center",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}),v};var L=Object.defineProperty,g=(e,d,a,n)=>{for(var t=void 0,i=e.length-1,l;i>=0;i--)(l=e[i])&&(t=l(d,a,t)||t);return t&&L(d,a,t),t};const f=class f extends T.SizedMixin(M.LuzmoElement,{validSizes:["s","m","l","xl"],noDefaultSize:!0}){constructor(){super(...arguments),this.language="en",this.data={},this.dataItemLevelDropped=d=>{this.dispatchEvent(new CustomEvent("data-item-dropped",{bubbles:!0,composed:!0,cancelable:!0,detail:{data:d}}))}}disconnectedCallback(){super.disconnectedCallback(),this._cleanupDraggable()}firstUpdated(d){this._cleanupDraggable=p.draggable({element:this,canDrag:()=>!this.disabled,onDragStart:()=>{this.style.opacity="0.5"},onDrop:()=>{this.style.opacity="1",this.dataItemLevelDropped(this.data)},getInitialData:()=>{const a={...this.data};return this.label&&this.language&&!this.sublevel&&(a.label={},a.label[this.language]=this.label),this.description&&this.language&&(a.description={},a.description[this.language]=this.description),a},onGenerateDragPreview:a=>{const n=a.nativeSetDragImage;p.setCustomNativeDragPreview({render({container:t}){const i=U(a);t.append(i)},nativeSetDragImage:n})}})}render(){var n,t,i,l,m,v,s,c,u,h;const d=this.label??((t=(n=this.data)==null?void 0:n.label)==null?void 0:t[this.language])??((m=(i=this.data)==null?void 0:i.label)==null?void 0:m[Object.keys((l=this.data)==null?void 0:l.label)[0]])??"Untitled",a=this.description??((s=(v=this.data)==null?void 0:v.description)==null?void 0:s[this.language])??((h=(c=this.data)==null?void 0:c.description)==null?void 0:h[Object.keys((u=this.data)==null?void 0:u.description)[0]]);return r.x`
|
20
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../get-css-variable-DLiZYZEi.cjs"),n=require("../luzmo-icons-CP__dRRM.cjs");require("../index-DSQyBS9Z.cjs");require("../index-CYeQkVeJ.cjs");const t=require("../property-BCb4Kybn.cjs"),V=require("../focusable-BTJYY_Mf.cjs"),L=require("../sized-mixin-BNtmplgF.cjs"),f=require("../calculate-data-item-icon-C_3QUGmB.cjs"),M=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:flex;justify-content:space-between;align-items:center;padding:0 var(--luzmo-draggable-data-item-level-horizontal-padding, var(--draggable-data-item-level-horizontal-padding));gap:var(--luzmo-draggable-data-item-level-gap, var(--draggable-data-item-level-gap));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 .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}: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))}: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))}: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([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))}.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}.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}.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}.data-label{flex-grow:1}.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([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) );--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([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=e=>{var m,c,u,h,z,w,x,I,S,D,C,$,q,E,P,T,j;const d=e.source.element;let a="";(h=(u=(c=(m=e.source)==null?void 0:m.element)==null?void 0:c.renderRoot)==null?void 0:u.querySelector(".data-label"))!=null&&h.textContent&&(a=(x=(w=(z=e.source)==null?void 0:z.element)==null?void 0:w.renderRoot)==null?void 0:x.querySelector(".data-label").textContent),a||(a=M.localize((S=(I=e==null?void 0:e.source)==null?void 0:I.data)==null?void 0:S.label,(C=(D=e==null?void 0:e.source)==null?void 0:D.element)==null?void 0:C.language),a=a||"Untitled");const v=(q=($=e==null?void 0:e.source)==null?void 0:$.data)==null?void 0:q.type,r=(P=(E=e==null?void 0:e.source)==null?void 0:E.data)==null?void 0:P.subtype,i=f.calculateDataItemIcon({type:v,subtype:r},d.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(([p,O,_])=>{const R=y.getCssVariableValue(d,O)||y.getCssVariableValue(d,_);l[p]=R});const s=document.createElement("div"),b=document.createElement("div");if(s.innerHTML=a,!((j=(T=e==null?void 0:e.source)==null?void 0:T.element)!=null&&j.sublevel)){const p=document.createElement("luzmo-icon");p.icon=i,b.append(p)}return b.append(s),Object.assign(b.style,{display:"flex",alignItems:"center",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}),b};var U=Object.defineProperty,g=(e,d,a,v)=>{for(var r=void 0,i=e.length-1,l;i>=0;i--)(l=e[i])&&(r=l(d,a,r)||r);return r&&U(d,a,r),r};const k=class k extends L.SizedMixin(V.LuzmoElement,{validSizes:["s","m","l","xl"],noDefaultSize:!0}){constructor(){super(...arguments),this.language="en",this.data={},this.dataItemLevelDropped=d=>{this.dispatchEvent(new CustomEvent("data-item-dropped",{bubbles:!0,composed:!0,cancelable:!0,detail:{data:d}}))},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()}firstUpdated(d){this._cleanupDraggable=y.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 a={...this.data};return this.label&&this.language&&!this.sublevel&&(a.label={},a.label[this.language]=this.label),this.description&&this.language&&(a.description={},a.description[this.language]=this.description),a},onGenerateDragPreview:a=>{const v=a.nativeSetDragImage;y.setCustomNativeDragPreview({render({container:r}){const i=F(a);r.append(i)},nativeSetDragImage:v})}})}render(){var r,i,l,s,b,m,c,u,h,z;const d=this.label??((i=(r=this.data)==null?void 0:r.label)==null?void 0:i[this.language])??((b=(l=this.data)==null?void 0:l.label)==null?void 0:b[Object.keys((s=this.data)==null?void 0:s.label)[0]])??"Untitled",a=this.description??((c=(m=this.data)==null?void 0:m.description)==null?void 0:c[this.language])??((z=(u=this.data)==null?void 0:u.description)==null?void 0:z[Object.keys((h=this.data)==null?void 0:h.description)[0]]),v=this.secondaryIconType?f.calculateDataItemSecondaryIcon(this.secondaryIconType,this.size):void 0;return t.x`
|
21
21
|
<div class="draggable-data-item-level">
|
22
22
|
<div class="drag-handle-icon">
|
23
|
-
${this.sublevel?
|
23
|
+
${this.sublevel?n.y3(n.b0):n.y3(n.W)}
|
24
24
|
</div>
|
25
|
-
${this.sublevel||this.hideTypeIcon?"":
|
26
|
-
|
25
|
+
${this.sublevel||this.hideTypeIcon?"":t.x`<div class="data-icon-type">
|
26
|
+
<div class=${this.secondaryIconType?"with-secondary-icon":""}>
|
27
|
+
${n.y3(f.calculateDataItemIcon(this.data,this.size))}
|
28
|
+
</div>
|
29
|
+
${v?t.x`<div class="secondary-icon">
|
30
|
+
${n.y3(v)}
|
31
|
+
</div>`:""}
|
27
32
|
</div>`}
|
28
33
|
<div class="data-label">${d}</div>
|
29
|
-
${!this.sublevel&&a?
|
30
|
-
${
|
34
|
+
${!this.sublevel&&a?t.x`<button class="data-description">
|
35
|
+
${n.y3(n.p1)}
|
31
36
|
<luzmo-tooltip self-managed placement="top" size=${this.size}>
|
32
37
|
${a}
|
33
38
|
</luzmo-tooltip>
|
34
39
|
</button>`:""}
|
35
40
|
</div>
|
36
|
-
`}};
|
41
|
+
`}};k.styles=t.r(B);let o=k;g([t.n({type:String,reflect:!0})],o.prototype,"variant");g([t.n({type:Boolean,reflect:!0,attribute:"hide-type-icon"})],o.prototype,"hideTypeIcon");g([t.n({type:Boolean,reflect:!0})],o.prototype,"sublevel");g([t.n({type:String,reflect:!0})],o.prototype,"language");g([t.n({type:Boolean,reflect:!0})],o.prototype,"disabled");g([t.n({type:String,reflect:!0})],o.prototype,"label");g([t.n({type:String,reflect:!0})],o.prototype,"description");g([t.n({type:String,reflect:!0,attribute:"secondary-icon-type"})],o.prototype,"secondaryIconType");g([t.n({type:Object})],o.prototype,"data");customElements.get("luzmo-draggable-data-item-level")||customElements.define("luzmo-draggable-data-item-level",o);exports.LuzmoDraggableDataItemLevel=o;
|
@@ -17,33 +17,33 @@
|
|
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 { g as
|
21
|
-
import {
|
20
|
+
import { g as O, d as L, s as q } from "../get-css-variable-YlLiVgo8.js";
|
21
|
+
import { a7 as h, ag as H, ad as M, a9 as V } from "../luzmo-icons-B2K7AcCF.js";
|
22
22
|
import "../index-BC1LV3vH.js";
|
23
23
|
import "../index-BmshD32H.js";
|
24
|
-
import { r as
|
25
|
-
import { L } from "../focusable-BXhQz3_k.js";
|
24
|
+
import { r as A, x as f, n as i } from "../property-Dn4zSyxu.js";
|
25
|
+
import { L as G } from "../focusable-BXhQz3_k.js";
|
26
26
|
import { S as N } from "../sized-mixin-BR_Ii7le.js";
|
27
|
-
import { c as
|
28
|
-
import { l as
|
29
|
-
const
|
27
|
+
import { c as R, a as W } from "../calculate-data-item-icon-BFpVWXnR.js";
|
28
|
+
import { l as J } from "../localize-BX7q0S0M.js";
|
29
|
+
const F = () => {
|
30
30
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
31
31
|
const e = document.createElement("style");
|
32
32
|
e.setAttribute("data-luzmo-vars", ""), e.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-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-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-color-informative: #1a77e9;--luzmo-color-informative-rgb: 26, 119, 233;--luzmo-color-disabled: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(e);
|
33
33
|
}
|
34
34
|
};
|
35
|
-
|
36
|
-
const
|
37
|
-
var
|
35
|
+
F();
|
36
|
+
const K = ":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:flex;justify-content:space-between;align-items:center;padding:0 var(--luzmo-draggable-data-item-level-horizontal-padding, var(--draggable-data-item-level-horizontal-padding));gap:var(--luzmo-draggable-data-item-level-gap, var(--draggable-data-item-level-gap));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 .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}: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))}: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))}: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([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))}.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}.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}.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}.data-label{flex-grow:1}.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([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) );--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([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}", Q = (e) => {
|
37
|
+
var b, u, s, v, z, x, k, w, S, C, I, D, E, $, P, T, j;
|
38
38
|
const r = e.source.element;
|
39
|
-
let
|
40
|
-
(v = (s = (
|
39
|
+
let a = "";
|
40
|
+
(v = (s = (u = (b = e.source) == null ? void 0 : b.element) == null ? void 0 : u.renderRoot) == null ? void 0 : s.querySelector(".data-label")) != null && v.textContent && (a = (k = (x = (z = e.source) == null ? void 0 : z.element) == null ? void 0 : x.renderRoot) == null ? void 0 : k.querySelector(
|
41
41
|
".data-label"
|
42
|
-
).textContent),
|
42
|
+
).textContent), a || (a = J(
|
43
43
|
(S = (w = e == null ? void 0 : e.source) == null ? void 0 : w.data) == null ? void 0 : S.label,
|
44
|
-
(
|
45
|
-
),
|
46
|
-
const
|
44
|
+
(I = (C = e == null ? void 0 : e.source) == null ? void 0 : C.element) == null ? void 0 : I.language
|
45
|
+
), a = a || "Untitled");
|
46
|
+
const n = (E = (D = e == null ? void 0 : e.source) == null ? void 0 : D.data) == null ? void 0 : E.type, o = (P = ($ = e == null ? void 0 : e.source) == null ? void 0 : $.data) == null ? void 0 : P.subtype, d = R({ type: n, subtype: o }, r.size), l = {};
|
47
47
|
[
|
48
48
|
[
|
49
49
|
"borderColor",
|
@@ -90,35 +90,35 @@ const J = ":host{font-family:var(--luzmo-draggable-data-item-level-font-family,
|
|
90
90
|
"--luzmo-draggable-data-item-level-gap",
|
91
91
|
"--draggable-data-item-level-gap"
|
92
92
|
]
|
93
|
-
].forEach(([
|
94
|
-
const
|
95
|
-
|
93
|
+
].forEach(([p, _, U]) => {
|
94
|
+
const B = O(r, _) || O(r, U);
|
95
|
+
l[p] = B;
|
96
96
|
});
|
97
|
-
const
|
98
|
-
if (
|
99
|
-
const
|
100
|
-
|
97
|
+
const c = document.createElement("div"), m = document.createElement("div");
|
98
|
+
if (c.innerHTML = a, !((j = (T = e == null ? void 0 : e.source) == null ? void 0 : T.element) != null && j.sublevel)) {
|
99
|
+
const p = document.createElement("luzmo-icon");
|
100
|
+
p.icon = d, m.append(p);
|
101
101
|
}
|
102
|
-
return
|
102
|
+
return m.append(c), Object.assign(m.style, {
|
103
103
|
display: "flex",
|
104
104
|
alignItems: "center",
|
105
|
-
height:
|
106
|
-
border: `1px solid ${
|
107
|
-
backgroundColor:
|
108
|
-
borderRadius:
|
109
|
-
fontFamily:
|
110
|
-
fontSize:
|
111
|
-
color:
|
112
|
-
padding: `0 ${
|
113
|
-
gap:
|
114
|
-
}),
|
105
|
+
height: l.height,
|
106
|
+
border: `1px solid ${l.borderColor}`,
|
107
|
+
backgroundColor: l.backgroundColor,
|
108
|
+
borderRadius: l.borderRadius,
|
109
|
+
fontFamily: l.fontFamily,
|
110
|
+
fontSize: l.fontSize,
|
111
|
+
color: l.color,
|
112
|
+
padding: `0 ${l.horizontalPadding}`,
|
113
|
+
gap: l.gap
|
114
|
+
}), m;
|
115
115
|
};
|
116
|
-
var
|
117
|
-
for (var o = void 0, d = e.length - 1,
|
118
|
-
(
|
119
|
-
return o &&
|
116
|
+
var X = Object.defineProperty, g = (e, r, a, n) => {
|
117
|
+
for (var o = void 0, d = e.length - 1, l; d >= 0; d--)
|
118
|
+
(l = e[d]) && (o = l(r, a, o) || o);
|
119
|
+
return o && X(r, a, o), o;
|
120
120
|
};
|
121
|
-
const
|
121
|
+
const y = class y extends N(G, {
|
122
122
|
validSizes: ["s", "m", "l", "xl"],
|
123
123
|
noDefaultSize: !0
|
124
124
|
}) {
|
@@ -134,61 +134,77 @@ const f = class f extends N(L, {
|
|
134
134
|
}
|
135
135
|
})
|
136
136
|
);
|
137
|
+
}, this.dataItemLevelDragStarted = () => {
|
138
|
+
this.dispatchEvent(
|
139
|
+
new CustomEvent("data-item-drag-started", {
|
140
|
+
bubbles: !0,
|
141
|
+
composed: !0,
|
142
|
+
cancelable: !0,
|
143
|
+
detail: {
|
144
|
+
data: this.data
|
145
|
+
}
|
146
|
+
})
|
147
|
+
);
|
137
148
|
};
|
138
149
|
}
|
139
150
|
disconnectedCallback() {
|
140
151
|
super.disconnectedCallback(), this._cleanupDraggable();
|
141
152
|
}
|
142
153
|
firstUpdated(r) {
|
143
|
-
this._cleanupDraggable =
|
154
|
+
this._cleanupDraggable = L({
|
144
155
|
element: this,
|
145
156
|
canDrag: () => !this.disabled,
|
146
157
|
onDragStart: () => {
|
147
|
-
this.style.opacity = "0.5";
|
158
|
+
this.style.opacity = "0.5", this.dataItemLevelDragStarted();
|
148
159
|
},
|
149
160
|
onDrop: () => {
|
150
161
|
this.style.opacity = "1", this.dataItemLevelDropped(this.data);
|
151
162
|
},
|
152
163
|
getInitialData: () => {
|
153
|
-
const
|
154
|
-
return this.label && this.language && !this.sublevel && (
|
164
|
+
const a = { ...this.data };
|
165
|
+
return this.label && this.language && !this.sublevel && (a.label = {}, a.label[this.language] = this.label), this.description && this.language && (a.description = {}, a.description[this.language] = this.description), a;
|
155
166
|
},
|
156
|
-
onGenerateDragPreview: (
|
157
|
-
const
|
158
|
-
|
167
|
+
onGenerateDragPreview: (a) => {
|
168
|
+
const n = a.nativeSetDragImage;
|
169
|
+
q({
|
159
170
|
render({ container: o }) {
|
160
|
-
const d =
|
171
|
+
const d = Q(a);
|
161
172
|
o.append(d);
|
162
173
|
},
|
163
|
-
nativeSetDragImage:
|
174
|
+
nativeSetDragImage: n
|
164
175
|
});
|
165
176
|
}
|
166
177
|
});
|
167
178
|
}
|
168
179
|
render() {
|
169
|
-
var
|
170
|
-
const r = this.label ?? ((
|
171
|
-
return
|
180
|
+
var o, d, l, c, m, b, u, s, v, z;
|
181
|
+
const r = this.label ?? ((d = (o = this.data) == null ? void 0 : o.label) == null ? void 0 : d[this.language]) ?? ((m = (l = this.data) == null ? void 0 : l.label) == null ? void 0 : m[Object.keys((c = this.data) == null ? void 0 : c.label)[0]]) ?? "Untitled", a = this.description ?? ((u = (b = this.data) == null ? void 0 : b.description) == null ? void 0 : u[this.language]) ?? ((z = (s = this.data) == null ? void 0 : s.description) == null ? void 0 : z[Object.keys((v = this.data) == null ? void 0 : v.description)[0]]), n = this.secondaryIconType ? W(this.secondaryIconType, this.size) : void 0;
|
182
|
+
return f`
|
172
183
|
<div class="draggable-data-item-level">
|
173
184
|
<div class="drag-handle-icon">
|
174
|
-
${this.sublevel ? h(
|
185
|
+
${this.sublevel ? h(H) : h(M)}
|
175
186
|
</div>
|
176
|
-
${this.sublevel || this.hideTypeIcon ? "" :
|
177
|
-
|
187
|
+
${this.sublevel || this.hideTypeIcon ? "" : f`<div class="data-icon-type">
|
188
|
+
<div class=${this.secondaryIconType ? "with-secondary-icon" : ""}>
|
189
|
+
${h(R(this.data, this.size))}
|
190
|
+
</div>
|
191
|
+
${n ? f`<div class="secondary-icon">
|
192
|
+
${h(n)}
|
193
|
+
</div>` : ""}
|
178
194
|
</div>`}
|
179
195
|
<div class="data-label">${r}</div>
|
180
|
-
${!this.sublevel &&
|
181
|
-
${h(
|
196
|
+
${!this.sublevel && a ? f`<button class="data-description">
|
197
|
+
${h(V)}
|
182
198
|
<luzmo-tooltip self-managed placement="top" size=${this.size}>
|
183
|
-
${
|
199
|
+
${a}
|
184
200
|
</luzmo-tooltip>
|
185
201
|
</button>` : ""}
|
186
202
|
</div>
|
187
203
|
`;
|
188
204
|
}
|
189
205
|
};
|
190
|
-
|
191
|
-
let t =
|
206
|
+
y.styles = A(K);
|
207
|
+
let t = y;
|
192
208
|
g([
|
193
209
|
i({ type: String, reflect: !0 })
|
194
210
|
], t.prototype, "variant");
|
@@ -210,6 +226,9 @@ g([
|
|
210
226
|
g([
|
211
227
|
i({ type: String, reflect: !0 })
|
212
228
|
], t.prototype, "description");
|
229
|
+
g([
|
230
|
+
i({ type: String, reflect: !0, attribute: "secondary-icon-type" })
|
231
|
+
], t.prototype, "secondaryIconType");
|
213
232
|
g([
|
214
233
|
i({ type: Object })
|
215
234
|
], t.prototype, "data");
|