@luzmo/analytics-components-kit 1.0.1-alpha.52 → 1.0.1-alpha.54
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/{de-Cxe7xkT4.cjs → de-BimXztr7.cjs} +1 -1
- package/components/{de-ZPzjN2kc.js → de-Ca_gJecj.js} +0 -1
- package/components/display-settings/display-settings.d.ts +1 -0
- package/components/display-settings/index.cjs +1 -1
- package/components/display-settings/index.js +1 -1
- package/components/display-settings-binning/index.cjs +1 -1
- package/components/display-settings-binning/index.js +2 -2
- package/components/display-settings-datetime/display-settings-datetime.d.ts +1 -1
- package/components/display-settings-datetime/index.cjs +43 -56
- package/components/display-settings-datetime/index.js +81 -95
- package/components/display-settings-grand-totals/index.cjs +1 -1
- package/components/display-settings-grand-totals/index.js +2 -2
- package/components/display-settings-numeric/index.cjs +19 -19
- package/components/display-settings-numeric/index.js +84 -84
- package/components/display-settings-period-over-period/index.cjs +1 -1
- package/components/display-settings-period-over-period/index.js +2 -2
- package/components/draggable-data-item/index.cjs +1 -1
- package/components/draggable-data-item/index.js +3 -3
- package/components/draggable-data-item-level/index.cjs +1 -1
- package/components/draggable-data-item-level/index.js +1 -1
- package/components/droppable-slot/index.cjs +2 -2
- package/components/droppable-slot/index.js +4 -4
- package/components/edit-item/index.cjs +2 -2
- package/components/edit-item/index.js +6 -4
- package/components/edit-option/index.cjs +1 -1
- package/components/edit-option/index.js +1 -1
- package/components/{en-GB-BtLbN8o_.js → en-GB-UzDYaNfY.js} +1 -1
- package/components/{en-GB-Dd11ROdW.cjs → en-GB-cN3S24Cg.cjs} +1 -1
- package/components/{es-C0JGlz18.js → es-BHAnPxmj.js} +0 -1
- package/components/{es-4dEouIgb.cjs → es-CDzU1gsd.cjs} +1 -1
- package/components/filter-data-item-picker/index.cjs +1 -1
- package/components/filter-data-item-picker/index.js +2 -2
- package/components/filter-expression-picker/index.cjs +1 -1
- package/components/filter-expression-picker/index.js +1 -1
- package/components/filter-item/index.cjs +1 -1
- package/components/filter-item/index.js +3 -3
- package/components/filter-value-picker/index.cjs +1 -1
- package/components/filter-value-picker/index.js +1 -1
- package/components/filter-value-picker-datetime/index.cjs +1 -1
- package/components/filter-value-picker-datetime/index.js +2 -2
- package/components/filter-value-picker-hierarchy/index.cjs +1 -1
- package/components/filter-value-picker-hierarchy/index.js +2 -2
- package/components/filter-value-picker-numeric/index.cjs +1 -1
- package/components/filter-value-picker-numeric/index.js +2 -2
- package/components/{formatter-CQDms6fU.js → formatter-CqU9_98M.js} +1 -0
- package/components/{formatter-DiJYkB6b.cjs → formatter-Lo9PMcxy.cjs} +1 -1
- package/components/{fr-B_-_f-VN.js → fr-CKHxPDre.js} +0 -1
- package/components/{fr-Dwulhlbi.cjs → fr-s3wNsLiB.cjs} +1 -1
- package/components/grid/index.cjs +1 -1
- package/components/grid/index.js +2 -2
- package/components/{heat-map-options.config-DQya-lag.js → heat-map-options.config-BnLWe8jS.js} +16 -14
- package/components/heat-map-options.config-DVH-Bb5-.cjs +20 -0
- package/components/index-BF9-Mgs_.cjs +249 -0
- package/components/{index-5Z9GD60H.js → index-CZ0HI7ep.js} +2 -2
- package/components/index-D05oY5ND.cjs +178 -0
- package/components/{index-Df-_TbOD.cjs → index-D4JNE3zI.cjs} +1 -1
- package/components/{index-fmbD10nN.js → index-DV63kOPg.js} +269 -242
- package/components/{index-BPVXrhaX.js → index-KFE-WtKZ.js} +5 -3
- package/components/index.cjs +1 -1
- package/components/index.js +4 -4
- package/components/item-context-configs.cjs +225 -0
- package/components/item-context-configs.js +1013 -0
- package/components/item-options-configs.cjs +20 -0
- package/components/item-options-configs.js +109 -0
- package/components/{localized-decorator-DIXYZ3RL.cjs → localized-decorator-CIHsaT2_.cjs} +1 -1
- package/components/{localized-decorator-Bl5gcI6n.js → localized-decorator-Di4TdvRQ.js} +1 -1
- package/components/{marker-map-options.config-CYoq89Oz.js → marker-map-options.config-DPJ955tt.js} +1 -1
- package/components/{marker-map-options.config-_XFv5XWK.cjs → marker-map-options.config-_FYZzRwA.cjs} +1 -1
- package/components/{nl-gdQCG4WV.js → nl-CMVty5rf.js} +0 -1
- package/components/{nl-DxdBIXDd.cjs → nl-DHgf0PUG.cjs} +1 -1
- package/components/{periods.const-7sXlqgEo.cjs → periods.const-CTd6Hskz.cjs} +1 -1
- package/components/{periods.const-B7FKokcH.js → periods.const-D77iT3rK.js} +1 -1
- package/components/{set-locale-DCPlazsZ.cjs → set-locale-CSL8WaxL.cjs} +1 -1
- package/components/{set-locale-GI34z_M7.js → set-locale-CW9yA503.js} +1 -1
- package/components/slot-contents-picker/index.cjs +1 -1
- package/components/slot-contents-picker/index.js +3 -3
- package/components/slot-menu/index.cjs +8 -8
- package/components/slot-menu/index.js +88 -76
- package/components/slot-menu-list/index.cjs +1 -1
- package/components/slot-menu-list/index.js +9 -10
- package/components/{symbol-map-options.config-Bj-UuL9m.js → symbol-map-options.config-DdDA4aa7.js} +1 -1
- package/components/{symbol-map-options.config-sdPlHspI.cjs → symbol-map-options.config-m-lwLTtu.cjs} +1 -1
- package/components/utils.cjs +1 -1
- package/components/utils.js +1 -1
- package/components/venn-diagram-options.config-CGUMA930.js +23 -0
- package/components/venn-diagram-options.config-mPXMR1CE.cjs +20 -0
- package/custom-elements.json +6 -0
- package/item-definitions/area-chart/area-chart-context.config.d.ts +20 -0
- package/item-definitions/bar-chart/bar-chart-context.config.d.ts +20 -0
- package/item-definitions/box-plot/box-plot-context.config.d.ts +17 -0
- package/item-definitions/bubble-chart/bubble-chart-context.config.d.ts +20 -0
- package/item-definitions/bullet-chart/bullet-chart-context.config.d.ts +20 -0
- package/item-definitions/choropleth-map/choropleth-map-context.config.d.ts +20 -0
- package/item-definitions/circle-pack-chart/circle-pack-chart-context.config.d.ts +17 -0
- package/item-definitions/circular-gauge/circular-gauge-context.config.d.ts +17 -0
- package/item-definitions/circular-gauge/circular-gauge-options.config.d.ts +1 -1
- package/item-definitions/column-chart/column-chart-context.config.d.ts +20 -0
- package/item-definitions/combination-chart/combination-chart-context.config.d.ts +17 -0
- package/item-definitions/conditional-number/conditional-number-context.config.d.ts +17 -0
- package/item-definitions/context-helpers.d.ts +2 -0
- package/item-definitions/date-filter/date-filter-context.config.d.ts +14 -0
- package/item-definitions/donut-chart/donut-chart-context.config.d.ts +17 -0
- package/item-definitions/dropdown-filter/dropdown-filter-context.config.d.ts +14 -0
- package/item-definitions/evolution-number/evolution-number-context.config.d.ts +17 -0
- package/item-definitions/funnel-chart/funnel-chart-context.config.d.ts +17 -0
- package/item-definitions/heat-map/heat-map-context.config.d.ts +17 -0
- package/item-definitions/heat-table/heat-table-context.config.d.ts +20 -0
- package/item-definitions/hexbin-map/hexbin-map-context.config.d.ts +17 -0
- package/item-definitions/image/image-context.config.d.ts +10 -0
- package/item-definitions/item-context.config.d.ts +44 -0
- package/item-definitions/item-options.config.d.ts +44 -0
- package/item-definitions/line-chart/line-chart-context.config.d.ts +20 -0
- package/item-definitions/marker-map/marker-map-context.config.d.ts +17 -0
- package/item-definitions/ohlc-chart/ohlc-chart-context.config.d.ts +26 -0
- package/item-definitions/parallel-coordinates-plot/parallel-coordinates-plot-context.config.d.ts +17 -0
- package/item-definitions/pivot-table/pivot-table-context.config.d.ts +20 -0
- package/item-definitions/pyramid-chart/pyramid-chart-context.config.d.ts +20 -0
- package/item-definitions/radar-chart/radar-chart-context.config.d.ts +20 -0
- package/item-definitions/regular-table/regular-table-context.config.d.ts +14 -0
- package/item-definitions/route-map/route-map-context.config.d.ts +23 -0
- package/item-definitions/sankey-diagram/sankey-diagram-context.config.d.ts +19 -0
- package/item-definitions/scatter-plot/scatter-plot-context.config.d.ts +26 -0
- package/item-definitions/search-filter/search-filter-context.config.d.ts +14 -0
- package/item-definitions/slicer-filter/slicer-filter-context.config.d.ts +17 -0
- package/item-definitions/slider-filter/slider-filter-context.config.d.ts +14 -0
- package/item-definitions/spacer/spacer-context.config.d.ts +10 -0
- package/item-definitions/speedometer-chart/speedometer-chart-context.config.d.ts +17 -0
- package/item-definitions/spike-map/spike-map-context.config.d.ts +20 -0
- package/item-definitions/strip-plot/strip-plot-context.config.d.ts +17 -0
- package/item-definitions/sunburst-chart/sunburst-chart-context.config.d.ts +17 -0
- package/item-definitions/symbol-map/symbol-map-context.config.d.ts +20 -0
- package/item-definitions/text/text-context.config.d.ts +10 -0
- package/item-definitions/treemap-chart/treemap-chart-context.config.d.ts +20 -0
- package/item-definitions/venn-diagram/venn-diagram-context.config.d.ts +20 -0
- package/item-definitions/venn-diagram/venn-diagram-options.config.d.ts +2 -0
- package/item-definitions/video/video-context.config.d.ts +10 -0
- package/item-definitions/wordcloud-chart/wordcloud-chart-context.config.d.ts +20 -0
- package/package.json +11 -1
- package/components/heat-map-options.config-BQ-Afrbi.cjs +0 -20
- package/components/index-3X8Iuo7y.cjs +0 -174
- package/components/index-CSfR7FMV.cjs +0 -249
@@ -19,8 +19,8 @@
|
|
19
19
|
* */
|
20
20
|
import "../index-CskV_bXp.js";
|
21
21
|
import { T, r as O, x as v, n as u } from "../property-DCzt3DR1.js";
|
22
|
-
import { e as R, c as N, s as X } from "../index-
|
23
|
-
import { a8 as
|
22
|
+
import { e as R, c as N, s as X } from "../index-DV63kOPg.js";
|
23
|
+
import { a8 as S, ae as Y, a7 as q, ag as H } from "../luzmo-icons-CVeTZ59u.js";
|
24
24
|
import { d as x } from "../index-Cyo2hwg7.js";
|
25
25
|
import { l as K } from "../localize-BX7q0S0M.js";
|
26
26
|
import { r as I } from "../state-nDsQPund.js";
|
@@ -50,7 +50,7 @@ const J = {}, Q = F(class extends j {
|
|
50
50
|
}
|
51
51
|
update(i, [o, e]) {
|
52
52
|
if (Array.isArray(o)) {
|
53
|
-
if (Array.isArray(this.ot) && this.ot.length === o.length && o.every((t,
|
53
|
+
if (Array.isArray(this.ot) && this.ot.length === o.length && o.every((t, l) => t === this.ot[l])) return T;
|
54
54
|
} else if (this.ot === o) return T;
|
55
55
|
return this.ot = Array.isArray(o) ? Array.from(o) : o, this.render(o, e);
|
56
56
|
}
|
@@ -60,7 +60,7 @@ function Z({
|
|
60
60
|
handle: o,
|
61
61
|
boundary: e = document.documentElement,
|
62
62
|
onDragStart: t,
|
63
|
-
onDragEnd:
|
63
|
+
onDragEnd: l
|
64
64
|
}) {
|
65
65
|
if (!i || !o)
|
66
66
|
throw new Error("makeDraggable: element and handle are required");
|
@@ -69,18 +69,18 @@ function Z({
|
|
69
69
|
const C = (m) => {
|
70
70
|
if (m.pointerId !== a) return;
|
71
71
|
const g = m.clientX - d, y = m.clientY - f, p = (e ?? document.documentElement).getBoundingClientRect();
|
72
|
-
let z = c + g,
|
72
|
+
let z = c + g, E = h + y;
|
73
73
|
z = Math.min(
|
74
74
|
Math.max(z, p.left),
|
75
75
|
p.right - b
|
76
|
-
),
|
77
|
-
Math.max(
|
76
|
+
), E = Math.min(
|
77
|
+
Math.max(E, p.top),
|
78
78
|
p.bottom - $
|
79
79
|
);
|
80
|
-
const D = z - c, M =
|
80
|
+
const D = z - c, M = E - h, P = w + D, U = _ + M;
|
81
81
|
i.style.transform = `translate3d(${P}px, ${U}px, 0)`;
|
82
82
|
}, k = (m) => {
|
83
|
-
m.pointerId === a && (s.removeEventListener("pointermove", C), s.removeEventListener("pointerup", k), a = -1,
|
83
|
+
m.pointerId === a && (s.removeEventListener("pointermove", C), s.removeEventListener("pointerup", k), a = -1, l == null || l());
|
84
84
|
}, L = (m) => {
|
85
85
|
var y;
|
86
86
|
if (m.button !== 0) return;
|
@@ -103,12 +103,12 @@ function Z({
|
|
103
103
|
};
|
104
104
|
}
|
105
105
|
const oo = ":host{font-family:var(--luzmo-slot-menu-font-family, var(--luzmo-font-family));font-size:var(--luzmo-slot-menu-font-size, var(--slot-menu-font-size));color:var(--luzmo-slot-menu-font-color, var(--luzmo-font-color));display:block;width:fit-content}luzmo-slot-menu-list{min-width:var(--luzmo-slot-menu-list-min-width, var(--slot-menu-list-min-width));max-width:var(--luzmo-slot-menu-list-max-width, var(--slot-menu-list-max-width));background-color:var(--luzmo-slot-menu-list-background-color, var(--slot-menu-list-background-color))}.slot-contents-container{position:relative;border:var(--luzmo-slot-menu-border-width, var(--luzmo-border-width)) solid var(--luzmo-slot-menu-border-color, var(--luzmo-border-color));border-radius:var(--luzmo-slot-menu-border-radius, var(--luzmo-border-radius));background:var(--luzmo-slot-menu-background-color, var(--luzmo-background-color));box-shadow:var(--luzmo-slot-menu-popup-shadow-horizontal, var(--slot-menu-popup-shadow-horizontal)) var(--luzmo-slot-menu-popup-shadow-vertical, var(--slot-menu-popup-shadow-vertical)) var(--luzmo-slot-menu-popup-shadow-blur, var(--slot-menu-popup-shadow-blur)) var(--luzmo-slot-menu-popup-shadow-color, var(--slot-menu-popup-shadow-color));border-top-left-radius:0}.slot-contents-container .inner-container{display:flex}.slot-contents-container .inner-container luzmo-display-settings{min-width:var(--luzmo-slot-menu-display-settings-min-width, var(--slot-menu-display-settings-min-width));padding:var(--luzmo-slot-menu-display-settings-vertical-padding, var(--slot-menu-display-settings-vertical-padding)) var(--luzmo-slot-menu-display-settings-horizontal-padding, var(--slot-menu-display-settings-horizontal-padding))}:host([variant=popup]) .slot-contents-container{overflow:hidden;border-top-left-radius:var(--luzmo-slot-menu-border-radius, var(--luzmo-border-radius));--slot-menu-popup-filter: drop-shadow( var( --luzmo-slot-menu-popup-shadow-horizontal, var(--slot-menu-popup-shadow-horizontal) ) var( --luzmo-slot-menu-popup-shadow-vertical, var(--slot-menu-popup-shadow-vertical) ) var( --luzmo-slot-menu-popup-shadow-blur, var(--slot-menu-popup-shadow-blur) ) var( --luzmo-slot-menu-popup-shadow-color, var(--slot-menu-popup-shadow-color) ) );filter:var(--luzmo-slot-menu-popup-filter, var(--slot-menu-popup-filter))}.slot-menu-top-menu{display:flex;align-items:center;border-radius:var(--luzmo-slot-menu-border-radius, var(--luzmo-border-radius));border-bottom-left-radius:0;border-bottom-right-radius:0;overflow:hidden;width:fit-content}.drag-handle{background-color:var(--luzmo-slot-menu-drag-handle-background-color, var(--luzmo-background-color-highlight));cursor:grab;width:fit-content;border:var(--luzmo-slot-menu-border-width, var(--luzmo-border-width)) solid var(--luzmo-slot-menu-border-color, var(--luzmo-background-color-highlight));font-size:var(--luzmo-slot-menu-drag-handle-size, var(--slot-menu-drag-handle-size));padding:var(--luzmo-slot-menu-drag-handle-vertical-padding, var(--slot-menu-drag-handle-vertical-padding)) var(--luzmo-slot-menu-drag-handle-horizontal-padding, var(--slot-menu-drag-handle-horizontal-padding))}.drag-handle:hover{background-color:var(--luzmo-slot-menu-drag-handle-background-color-hover, var(--luzmo-background-color-highlight-hover))}.slot-content-action{display:flex;flex:0 1 auto;max-width:var(--luzmo-slot-menu-top-menu-label-max-width, var(--slot-menu-top-menu-label-max-width));gap:var(--luzmo-slot-menu-label-to-icon-gap, var(--slot-menu-label-to-icon-gap));background-color:var(--luzmo-slot-menu-content-label-background-color, var(--luzmo-primary));color:var(--luzmo-slot-menu-content-label-color, var(--luzmo-primary-inverse-color));border:var(--luzmo-slot-menu-border-width, var(--luzmo-border-width)) solid var(--luzmo-slot-menu-content-label-border-color, var(--luzmo-primary));padding:var(--luzmo-slot-menu-drag-handle-vertical-padding, var(--slot-menu-drag-handle-vertical-padding)) var(--luzmo-slot-menu-drag-handle-horizontal-padding, var(--slot-menu-drag-handle-horizontal-padding))}.slot-content-action:hover{background-color:var(--luzmo-slot-menu-content-label-background-color-hover, var(--luzmo-primary-hover))}.slot-content-action:focus{background-color:var(--luzmo-slot-menu-content-label-background-color-focus, var(--luzmo-primary-focus))}.slot-content-action .slot-content-label{flex:1 1 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.slot-content-action .slot-content-remove{flex:0 0 auto;cursor:pointer}.close{position:absolute;right:1rem;cursor:pointer;top:calc(-2 * var(--luzmo-slot-menu-border-width, var(--luzmo-border-width)));background-color:var(--luzmo-slot-menu-close-button-background-color, var(--luzmo-background-color-highlight));font-size:var(--luzmo-slot-menu-close-button-size, var(--slot-menu-close-button-size));border:var(--luzmo-slot-menu-border-width, var(--luzmo-border-width)) solid var(--luzmo-slot-menu-border-color, var(--luzmo-border-color));border-radius:var(--luzmo-slot-menu-border-radius, var(--luzmo-border-radius));border-top-left-radius:0;border-top-right-radius:0;padding:var(--luzmo-slot-menu-close-button-vertical-padding, var(--slot-menu-close-button-vertical-padding)) var(--luzmo-slot-menu-close-button-horizontal-padding, var(--slot-menu-close-button-horizontal-padding))}.close:hover{background-color:var(--luzmo-slot-menu-close-button-background-color-hover, var(--luzmo-background-color-highlight-hover))}:host{--slot-menu-display-settings-min-width: 19rem;--slot-menu-min-height: calc(var(--luzmo-component-height) * 2);--slot-menu-font-size: var(--luzmo-font-size);--slot-menu-display-settings-horizontal-padding: var(--luzmo-spacing-5);--slot-menu-display-settings-vertical-padding: var(--luzmo-spacing-4);--slot-menu-top-menu-label-max-width: 12rem;--slot-menu-list-min-width: 8rem;--slot-menu-list-max-width: 12rem;--slot-menu-label-to-icon-gap: var(--luzmo-spacing-3);--slot-menu-drag-handle-size: var(--luzmo-font-size);--slot-menu-drag-handle-vertical-padding: var(--luzmo-spacing-2);--slot-menu-drag-handle-horizontal-padding: var(--luzmo-spacing-3);--slot-menu-close-button-size: var(--luzmo-font-size-s);--slot-menu-close-button-vertical-padding: var(--luzmo-spacing-2);--slot-menu-close-button-horizontal-padding: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--slot-menu-popup-shadow-horizontal: 0;--slot-menu-popup-shadow-vertical: 1px;--slot-menu-popup-shadow-blur: 4px;--slot-menu-popup-shadow-color: var(--luzmo-border-color);--slot-menu-popup-box-shadow: var(--slot-menu-popup-shadow-horizontal) var(--slot-menu-popup-shadow-vertical) var(--slot-menu-popup-shadow-blur) var(--slot-menu-popup-shadow-color)}:host([size=s]){--slot-menu-display-settings-min-width: 16rem;--slot-menu-min-height: calc(var(--luzmo-component-height-s) * 2);--slot-menu-font-size: var(--luzmo-font-size-s);--slot-menu-display-settings-horizontal-padding: var(--luzmo-spacing-4);--slot-menu-display-settings-vertical-padding: var(--luzmo-spacing-3);--slot-menu-top-menu-label-max-width: 10rem;--slot-menu-list-min-width: 6rem;--slot-menu-list-max-width: 10rem;--slot-menu-label-to-icon-gap: var(--luzmo-spacing-2);--slot-menu-drag-handle-size: var(--luzmo-font-size-s);--slot-menu-drag-handle-vertical-padding: var(--luzmo-spacing-2);--slot-menu-drag-handle-horizontal-padding: var(--luzmo-spacing-3);--slot-menu-close-button-size: var(--luzmo-font-size-xs);--slot-menu-close-button-vertical-padding: var(--luzmo-spacing-2);--slot-menu-close-button-horizontal-padding: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) )}:host([size=l]){--slot-menu-display-settings-min-width: 23rem;--slot-menu-min-height: calc(var(--luzmo-component-height-l) * 2);--slot-menu-font-size: var(--luzmo-font-size-l);--slot-menu-display-settings-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--slot-menu-display-settings-vertical-padding: var(--luzmo-spacing-5);--slot-menu-top-menu-label-max-width: 14rem;--slot-menu-list-min-width: 9rem;--slot-menu-list-max-width: 14rem;--slot-menu-label-to-icon-gap: var(--luzmo-spacing-4);--slot-menu-drag-handle-size: var(--luzmo-font-size-l);--slot-menu-drag-handle-vertical-padding: var(--luzmo-spacing-3);--slot-menu-drag-handle-horizontal-padding: var(--luzmo-spacing-3);--slot-menu-close-button-size: var(--luzmo-font-size);--slot-menu-close-button-vertical-padding: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--slot-menu-close-button-horizontal-padding: var(--luzmo-spacing-3)}:host([size=xl]){--slot-menu-display-settings-min-width: 26rem;--slot-menu-min-height: calc(var(--luzmo-component-height-xl) * 2);--slot-menu-font-size: var(--luzmo-font-size-xl);--slot-menu-display-settings-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-2) );--slot-menu-display-settings-vertical-padding: var(--luzmo-spacing-5);--slot-menu-top-menu-label-max-width: 16rem;--slot-menu-list-min-width: 10rem;--slot-menu-list-max-width: 16rem;--slot-menu-label-to-icon-gap: var(--luzmo-spacing-5);--slot-menu-drag-handle-size: var(--luzmo-font-size-xl);--slot-menu-drag-handle-vertical-padding: var(--luzmo-spacing-3);--slot-menu-drag-handle-horizontal-padding: var(--luzmo-spacing-4);--slot-menu-close-button-size: var(--luzmo-font-size-l);--slot-menu-close-button-vertical-padding: var(--luzmo-spacing-3);--slot-menu-close-button-horizontal-padding: var(--luzmo-spacing-3)}";
|
106
|
-
var to = Object.defineProperty,
|
107
|
-
for (var
|
108
|
-
(a = i[s]) && (
|
109
|
-
return
|
106
|
+
var to = Object.defineProperty, r = (i, o, e, t) => {
|
107
|
+
for (var l = void 0, s = i.length - 1, a; s >= 0; s--)
|
108
|
+
(a = i[s]) && (l = a(o, e, l) || l);
|
109
|
+
return l && to(o, e, l), l;
|
110
110
|
};
|
111
|
-
class
|
111
|
+
class n extends R(
|
112
112
|
W(V, {
|
113
113
|
validSizes: Object.values(G)
|
114
114
|
})
|
@@ -181,7 +181,7 @@ class l extends R(
|
|
181
181
|
])).has(o);
|
182
182
|
}
|
183
183
|
async willUpdate() {
|
184
|
-
var e, t,
|
184
|
+
var e, t, l, s;
|
185
185
|
const o = this.slotContents ?? ((e = this._store) == null ? void 0 : e.slotContents.get()) ?? [];
|
186
186
|
if (o !== this._slotContents) {
|
187
187
|
this._slotContents = structuredClone(o);
|
@@ -201,7 +201,7 @@ class l extends R(
|
|
201
201
|
(b) => b.type === "numeric" && b.id !== d
|
202
202
|
)
|
203
203
|
};
|
204
|
-
}), ((t = this._store) == null ? void 0 : t.activeIndex.get()) !== this._activeIndex && ((
|
204
|
+
}), ((t = this._store) == null ? void 0 : t.activeIndex.get()) !== this._activeIndex && ((l = this._store) == null || l.updateActive(this._activeIndex)), this.slotName === "measure" && (this._periodOverPeriodEnabled = ((s = this._store) == null ? void 0 : s.periodOverPeriodEnabled.get()) && this._currentSlotContent.subtype !== "duration" && !this.isArrayColumnType(this._currentSlotContent.type));
|
205
205
|
}
|
206
206
|
}
|
207
207
|
updated() {
|
@@ -213,14 +213,14 @@ class l extends R(
|
|
213
213
|
this._slotContents = structuredClone(o.detail.slotContents);
|
214
214
|
const e = o.detail.activeIndex;
|
215
215
|
e !== this._activeIndex && (this._activeIndex = e, (a = this._store) == null || a.updateActive(e));
|
216
|
-
const t = this._slotContents[this._activeIndex],
|
217
|
-
|
216
|
+
const t = this._slotContents[this._activeIndex], l = (t == null ? void 0 : t.column) ?? (t == null ? void 0 : t.columnId), s = (t == null ? void 0 : t.set) ?? (t == null ? void 0 : t.datasetId);
|
217
|
+
l && s && this.dispatchEvent(
|
218
218
|
new CustomEvent("slot-menu-highlight", {
|
219
219
|
bubbles: !0,
|
220
220
|
composed: !0,
|
221
|
-
detail: { columnId:
|
221
|
+
detail: { columnId: l, securableId: s, level: (t == null ? void 0 : t.level) ?? 0 }
|
222
222
|
})
|
223
|
-
), this._slotContents.length <= 1 && this.requestUpdate(), (d = this._store) == null || d.setContents(this._slotContents, this.slotName), this._sendChangeEvent()
|
223
|
+
), this._slotContents.length <= 1 && this.requestUpdate(), (d = this._store) == null || d.setContents(this._slotContents, this.slotName), this._sendChangeEvent();
|
224
224
|
}
|
225
225
|
_handleSlotContentChange(o) {
|
226
226
|
var e;
|
@@ -235,8 +235,13 @@ class l extends R(
|
|
235
235
|
removeSlotContent(o) {
|
236
236
|
var e;
|
237
237
|
this._slotContents = this._slotContents.filter(
|
238
|
-
(t,
|
239
|
-
), (e = this._store) == null || e.setContents(this._slotContents, this.slotName), this.
|
238
|
+
(t, l) => l !== o
|
239
|
+
), (e = this._store) == null || e.setContents(this._slotContents, this.slotName), this._slotContents.length === 0 && this.dispatchEvent(
|
240
|
+
new CustomEvent("slot-menu-inactive", {
|
241
|
+
bubbles: !0,
|
242
|
+
composed: !0
|
243
|
+
})
|
244
|
+
), this._sendChangeEvent(), this._sendCloseEvent(), this.requestUpdate();
|
240
245
|
}
|
241
246
|
close() {
|
242
247
|
this._sendCloseEvent();
|
@@ -245,44 +250,51 @@ class l extends R(
|
|
245
250
|
this.removeSlotContent(this.slotIndex ?? this._activeIndex);
|
246
251
|
}
|
247
252
|
render() {
|
248
|
-
var
|
253
|
+
var e, t, l;
|
254
|
+
const o = `${this.slotType}-${((e = this._currentSlotContent) == null ? void 0 : e.type) ?? ""}`;
|
249
255
|
return v`<div class="slot-menu-top-menu">
|
250
|
-
${this.variant === "draggable" ? v`<div class="drag-handle">${
|
256
|
+
${this.variant === "draggable" ? v`<div class="drag-handle">${S(Y)}</div>` : ""}
|
251
257
|
${this._slotContents && this._slotContents.length === 1 && this.variant !== "popup" ? v` <div class="slot-content-action">
|
252
258
|
<div class="slot-content-label">${this._currentLabel}</div>
|
253
259
|
<div
|
254
260
|
class="slot-content-remove"
|
255
261
|
@click=${this.removeSlotContent.bind(this, 0)}
|
256
262
|
>
|
257
|
-
${
|
263
|
+
${S(q)}
|
258
264
|
</div>
|
259
265
|
</div>` : ""}
|
260
266
|
</div>
|
261
267
|
<div
|
262
|
-
class="slot-contents-container ${((
|
268
|
+
class="slot-contents-container ${((t = this._slotContents) == null ? void 0 : t.length) > 1 ? "multiple" : ""}"
|
263
269
|
>
|
264
270
|
${this.variant === "popup" ? "" : v`<div class="close" @click=${this.close}>
|
265
|
-
${
|
271
|
+
${S(H)}
|
266
272
|
</div>`}
|
267
273
|
<div class="inner-container">
|
268
|
-
${((
|
274
|
+
${((l = this._slotContents) == null ? void 0 : l.length) > 1 && typeof this.slotIndex != "number" ? v`<luzmo-slot-menu-list
|
269
275
|
.slotContents=${this._slotContents}
|
270
276
|
.contentLanguage=${this.contentLanguage}
|
271
277
|
.activeIndex=${this.slotIndex ?? this._activeIndex}
|
272
278
|
@slot-list-changed=${this._handleSlotListChange}
|
273
279
|
></luzmo-slot-menu-list>` : ""}
|
274
280
|
${Q(
|
275
|
-
[
|
281
|
+
[
|
282
|
+
this.variant,
|
283
|
+
this.language,
|
284
|
+
this.contentLanguage,
|
285
|
+
this._periodOverPeriodEnabled,
|
286
|
+
o
|
287
|
+
],
|
276
288
|
() => {
|
277
|
-
var
|
289
|
+
var s;
|
278
290
|
return v`<luzmo-display-settings
|
279
291
|
.size=${this.size}
|
280
292
|
.language=${this.language}
|
281
293
|
.contentLanguage=${this.contentLanguage}
|
282
|
-
.slotContent=${this._currentSlotContent}
|
283
294
|
.slotType=${this.slotType}
|
284
295
|
.measureColumns=${this.measureColumns}
|
285
|
-
.showRemoveButton=${this.variant === "popup" && (typeof this.slotIndex == "number" || ((
|
296
|
+
.showRemoveButton=${this.variant === "popup" && (typeof this.slotIndex == "number" || ((s = this._slotContents) == null ? void 0 : s.length) === 1)}
|
297
|
+
.slotContent=${this._currentSlotContent}
|
286
298
|
@slot-content-changed=${this._handleSlotContentChange}
|
287
299
|
@remove-slot-content=${this._removeActiveSlotContent}
|
288
300
|
></luzmo-display-settings>`;
|
@@ -301,70 +313,70 @@ class l extends R(
|
|
301
313
|
this.style.transform = "";
|
302
314
|
}
|
303
315
|
}
|
304
|
-
|
316
|
+
r([
|
305
317
|
u({ type: String, reflect: !0 })
|
306
|
-
],
|
307
|
-
|
318
|
+
], n.prototype, "language");
|
319
|
+
r([
|
308
320
|
u({ type: String, attribute: "content-language", reflect: !0 })
|
309
|
-
],
|
310
|
-
|
321
|
+
], n.prototype, "contentLanguage");
|
322
|
+
r([
|
311
323
|
u({ type: String, attribute: "slot-type", reflect: !0 })
|
312
|
-
],
|
313
|
-
|
324
|
+
], n.prototype, "slotType");
|
325
|
+
r([
|
314
326
|
u({ type: String, attribute: "slot-name", reflect: !0 })
|
315
|
-
],
|
316
|
-
|
327
|
+
], n.prototype, "slotName");
|
328
|
+
r([
|
317
329
|
u({ type: String, attribute: "item-type", reflect: !0 })
|
318
|
-
],
|
319
|
-
|
330
|
+
], n.prototype, "itemType");
|
331
|
+
r([
|
320
332
|
u({ type: Boolean, attribute: "no-drag", reflect: !0 })
|
321
|
-
],
|
322
|
-
|
333
|
+
], n.prototype, "noDrag");
|
334
|
+
r([
|
323
335
|
u({ type: Boolean, attribute: "no-close", reflect: !0 })
|
324
|
-
],
|
325
|
-
|
336
|
+
], n.prototype, "noClose");
|
337
|
+
r([
|
326
338
|
u({ type: String, reflect: !0 })
|
327
|
-
],
|
328
|
-
|
339
|
+
], n.prototype, "variant");
|
340
|
+
r([
|
329
341
|
u({ type: Boolean, attribute: "no-top-menu-label", reflect: !0 })
|
330
|
-
],
|
331
|
-
|
342
|
+
], n.prototype, "noTopMenuLabel");
|
343
|
+
r([
|
332
344
|
N({ context: X, subscribe: !0 })
|
333
|
-
],
|
334
|
-
|
345
|
+
], n.prototype, "_store");
|
346
|
+
r([
|
335
347
|
u({ type: String, attribute: "drag-boundary", reflect: !1 })
|
336
|
-
],
|
337
|
-
|
348
|
+
], n.prototype, "dragBoundary");
|
349
|
+
r([
|
338
350
|
u({ type: Array, reflect: !1, attribute: "slot-contents" })
|
339
|
-
],
|
340
|
-
|
351
|
+
], n.prototype, "slotContents");
|
352
|
+
r([
|
341
353
|
I()
|
342
|
-
],
|
343
|
-
|
354
|
+
], n.prototype, "_periodOverPeriodEnabled");
|
355
|
+
r([
|
344
356
|
I()
|
345
|
-
],
|
346
|
-
|
357
|
+
], n.prototype, "measureColumns");
|
358
|
+
r([
|
347
359
|
u({ type: Number, reflect: !1, attribute: "slot-index" })
|
348
|
-
],
|
349
|
-
|
360
|
+
], n.prototype, "slotIndex");
|
361
|
+
r([
|
350
362
|
A("luzmo-display-settings")
|
351
|
-
],
|
352
|
-
|
363
|
+
], n.prototype, "displaySettingsElement");
|
364
|
+
r([
|
353
365
|
A("luzmo-slot-menu-list")
|
354
|
-
],
|
355
|
-
|
366
|
+
], n.prototype, "slotMenuListElement");
|
367
|
+
r([
|
356
368
|
u({ type: String, attribute: "api-url", reflect: !0 })
|
357
|
-
],
|
358
|
-
|
369
|
+
], n.prototype, "apiUrl");
|
370
|
+
r([
|
359
371
|
u({ type: String, attribute: "auth-key", reflect: !0 })
|
360
|
-
],
|
361
|
-
|
372
|
+
], n.prototype, "authKey");
|
373
|
+
r([
|
362
374
|
u({ type: String, attribute: "auth-token", reflect: !0 })
|
363
|
-
],
|
364
|
-
|
375
|
+
], n.prototype, "authToken");
|
376
|
+
r([
|
365
377
|
I()
|
366
|
-
],
|
367
|
-
customElements.get("luzmo-slot-menu") || customElements.define("luzmo-slot-menu",
|
378
|
+
], n.prototype, "_slotContents");
|
379
|
+
customElements.get("luzmo-slot-menu") || customElements.define("luzmo-slot-menu", n);
|
368
380
|
export {
|
369
|
-
|
381
|
+
n as LuzmoSlotMenu
|
370
382
|
};
|
@@ -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 p=require("../property-Cu4Q1hS4.cjs"),v=require("../get-css-variable-DLiZYZEi.cjs"),C=require("../luzmo-icons-DonyjSXg.cjs"),O=require("../localize-r7ALOUy_.cjs"),P=require("../query-all-CR2wWKRD.cjs"),j=require("../focusable-DAGGGYyz.cjs"),k=require("../sized-mixin-j_7aJM4b.cjs");var D={large:700};function F(i){i.animate([{backgroundColor:"var(--ds-background-selected, #E9F2FF)"},{}],{duration:D.large,easing:"cubic-bezier(0.25, 0.1, 0.25, 1.0)",iterations:1})}function w(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(i);t&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})),e.push.apply(e,o)}return e}function S(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?w(Object(e),!0).forEach(function(o){v._defineProperty(i,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):w(Object(e)).forEach(function(o){Object.defineProperty(i,o,Object.getOwnPropertyDescriptor(e,o))})}return i}var L={top:function(t,e){return Math.abs(e.y-t.top)},right:function(t,e){return Math.abs(t.right-e.x)},bottom:function(t,e){return Math.abs(t.bottom-e.y)},left:function(t,e){return Math.abs(e.x-t.left)}},_=Symbol("closestEdge");function $(i,t){var e,o,s=t.element,u=t.input,n=t.allowedEdges,l={x:u.clientX,y:u.clientY},r=s.getBoundingClientRect(),a=n.map(function(c){return{edge:c,value:L[c](r,l)}}),d=(e=(o=a.sort(function(c,b){return c.value-b.value})[0])===null||o===void 0?void 0:o.edge)!==null&&e!==void 0?e:null;return S(S({},i),{},v._defineProperty({},_,d))}function E(i){var t;return(t=i[_])!==null&&t!==void 0?t:null}const M=':host{font-family:var(--luzmo-slot-menu-list-font-family, var(--luzmo-font-family));font-size:var(--luzmo-slot-menu-list-font-size, var(--slot-menu-list-font-size));color:var(--luzmo-slot-menu-listfont-color, var(--luzmo-font-color))}:host{margin:0;padding:0;list-style:none;border-right:var(--luzmo-slot-menu-list-border-right-width, var(--luzmo-border-width)) solid var(--luzmo-slot-menu-list-border-right-color, var(--luzmo-border-color))}:host li{position:relative;cursor:pointer}:host li:hover{background-color:var(--luzmo-slot-menu-list-background-color-hover, var(--slot-menu-list-background-color-hover))}:host .active{background-color:var(--luzmo-slot-menu-list-active-background-color, var(--slot-menu-list-active-background-color));color:var(--luzmo-slot-menu-list-active-color, var(--slot-menu-list-active-color))}:host .active:hover{background-color:var(--luzmo-slot-menu-list-active-background-color-hover, var(--slot-menu-list-active-background-color-hover))}.drop-indicator{position:absolute;left:0;right:0;height:var(--luzmo-slot-menu-list-drop-indicator-height, var(--slot-menu-list-drop-indicator-height));background-color:var(--luzmo-slot-menu-list-drop-indicator-color, var(--slot-menu-list-drop-indicator-color))}.drop-indicator:before{content:"";display:block;width:100%;border:var(--luzmo-slot-menu-list-drop-indicator-height, var(--slot-menu-list-drop-indicator-height)) solid var(--luzmo-slot-menu-list-drop-indicator-color, var(--slot-menu-list-drop-indicator-color));border-radius:50%;position:absolute;background:var(--luzmo-slot-menu-list-drop-indicator-background, var(--luzmo-background-color));left:calc(-.5 * (var(--luzmo-slot-menu-list-drop-indicator-circle-size, var(--slot-menu-list-drop-indicator-circle-size)) + var(--luzmo-slot-menu-list-drop-indicator-height, var(--slot-menu-list-drop-indicator-height))));top:calc(-.5 * (var(--luzmo-slot-menu-list-drop-indicator-circle-size, var(--slot-menu-list-drop-indicator-circle-size)) + var(--luzmo-slot-menu-list-drop-indicator-height, var(--slot-menu-list-drop-indicator-height))));height:var(--luzmo-slot-menu-list-drop-indicator-circle-size, var(--slot-menu-list-drop-indicator-circle-size));width:var(--luzmo-slot-menu-list-drop-indicator-circle-size, var(--slot-menu-list-drop-indicator-circle-size))}.drop-indicator[data-edge=top]{top:calc(-.5 * var(--luzmo-slot-menu-list-drop-indicator-height, var(--slot-menu-list-drop-indicator-height)))}.drop-indicator[data-edge=bottom]{bottom:calc(-.5 * var(--luzmo-slot-menu-list-drop-indicator-height, var(--slot-menu-list-drop-indicator-height)))}.draggable-slot-content{display:flex;justify-content:space-between;gap:var(--luzmo-slot-menu-label-to-icon-gap, var(--slot-menu-label-to-icon-gap));align-items:center}.draggable-slot-content .draggable-slot-content-label,.draggable-slot-content .draggable-slot-content-remove{padding-block-start:var(--luzmo-slot-menu-list-item-vertical-padding, var(--slot-menu-list-item-vertical-padding));padding-block-end:var(--luzmo-slot-menu-list-item-vertical-padding, var(--slot-menu-list-item-vertical-padding))}.draggable-slot-content .draggable-slot-content-label{padding-inline-start:var(--luzmo-slot-menu-list-item-horizontal-padding, var(--slot-menu-list-item-horizontal-padding));flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.draggable-slot-content .draggable-slot-content-remove{padding-inline-end:var(--luzmo-slot-menu-list-item-horizontal-padding, var(--slot-menu-list-item-horizontal-padding));flex:0 0 auto}:host{--slot-menu-list-active-background-color: var(--luzmo-primary);--slot-menu-list-active-background-color-hover: var(--luzmo-primary-hover);--slot-menu-list-active-color: var(--luzmo-primary-inverse-color);--slot-menu-list-background-color-hover: var(--luzmo-background-color-hover);--slot-menu-list-drop-indicator-color: var(--luzmo-font-color-down);--slot-menu-list-drop-indicator-height: 2px;--slot-menu-list-drop-indicator-circle-size: 4px}:host{--slot-menu-display-settings-min-width: 19rem;--slot-menu-min-height: calc(var(--luzmo-component-height) * 2);--slot-menu-font-size: var(--luzmo-font-size);--slot-menu-list-item-horizontal-padding: var(--luzmo-spacing-4);--slot-menu-list-item-vertical-padding: var(--luzmo-spacing-3);--slot-menu-label-to-icon-gap: var(--luzmo-spacing-3)}:host([size=s]){--slot-menu-display-settings-min-width: 16rem;--slot-menu-min-height: calc(var(--luzmo-component-height-s) * 2);--slot-menu-font-size: var(--luzmo-font-size-s);--slot-menu-list-item-horizontal-padding: var(--luzmo-spacing-3);--slot-menu-list-item-vertical-padding: var(--luzmo-spacing-3);--slot-menu-label-to-icon-gap: var(--luzmo-spacing-2)}:host([size=l]){--slot-menu-display-settings-min-width: 23rem;--slot-menu-min-height: calc(var(--luzmo-component-height-l) * 2);--slot-menu-font-size: var(--luzmo-font-size-l);--slot-menu-list-item-horizontal-padding: var(--luzmo-spacing-5);--slot-menu-list-item-vertical-padding: var(--luzmo-spacing-3);--slot-menu-label-to-icon-gap: var(--luzmo-spacing-4)}:host([size=xl]){--slot-menu-display-settings-min-width: 26rem;--slot-menu-min-height: calc(var(--luzmo-component-height-xl) * 2);--slot-menu-font-size: var(--luzmo-font-size-xl);--slot-menu-list-item-horizontal-padding: var(--luzmo-spacing-5);--slot-menu-list-item-vertical-padding: var(--luzmo-spacing-4);--slot-menu-label-to-icon-gap: var(--luzmo-spacing-5)}';var q=Object.defineProperty,f=(i,t,e,o)=>{for(var s=void 0,u=i.length-1,n;u>=0;u--)(n=i[u])&&(s=n(t,e,s)||s);return s&&q(t,e,s),s};class h extends k.SizedMixin(j.LuzmoElement,{validSizes:Object.values(k.ElementSizes)}){constructor(){super(...arguments),this.language="en",this.contentLanguage="en",this.slotContents=[],this.activeIndex=0,this._sendChangeEvent=()=>{this.dispatchEvent(new CustomEvent("slot-list-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContents:structuredClone(this.slotContents),activeIndex:this.activeIndex}}))},this._cleanupFns=[],this._attachAll=()=>{[...this._draggableSlotContentElements].forEach(t=>{const e=this._sendChangeEvent.bind(this),o=this,s=v.draggable({element:t,onGenerateDragPreview({nativeSetDragImage:n}){v.setCustomNativeDragPreview({nativeSetDragImage:n,render({container:l}){var d;const r=document.createElement("div");r.classList.add("drag-preview");const a={};[["borderColor","--luzmo-slot-menu-list-border-color","--luzmo-border-color"],["backgroundColor","--luzmo-slot-menu-list-background-color","--luzmo-background-color"],["color","--luzmo-slot-menu-list-font-color","--slot-menu-list-font-color"],["fontSize","--luzmo-slot-menu-list-font-size","--slot-menu-list-font-size"],["horizontalPadding","--luzmo-slot-menu-list-item-horizontal-padding","--slot-menu-list-item-horizontal-padding"],["verticalPadding","--luzmo-slot-menu-list-item-vertical-padding","--slot-menu-list-item-vertical-padding"],["borderRadius","--luzmo-slot-menu-list-border-radius","--luzmo-border-radius"],["fontFamily","--luzmo-slot-menu-list-font-family","--luzmo-font-family"]].forEach(([c,b,y])=>{const m=v.getCssVariableValue(t,b)||v.getCssVariableValue(t,y);a[c]=m}),r.textContent=((d=t.querySelector("[data-task-content]"))==null?void 0:d.textContent)??t.textContent,Object.assign(r.style,{border:`1px solid ${a.borderColor}`,backgroundColor:a.backgroundColor,borderRadius:a.borderRadius,fontFamily:a.fontFamily,fontSize:a.fontSize,color:a.color,paddingInline:`${a.horizontalPadding}`,paddingBlock:`${a.verticalPadding}`}),l.append(r)}})},getInitialData(){var r;const n=t.parentElement;let l=0;return n&&(l=[...((r=n.parentElement)==null?void 0:r.children)??[]].indexOf(n)),{index:l}},onDragStart(){t.style.opacity="0.5"},onDrop(){t.style.opacity="1"}});this._cleanupFns.push(s);const u=v.dropTargetForElements({element:t,canDrop({source:n}){var l;return n.element===t?!1:(l=n==null?void 0:n.element)==null?void 0:l.classList.contains("draggable-slot-content")},getData(n){return $({},{element:t,input:n.input,allowedEdges:["top","bottom"]})},getIsSticky(){return!0},onDragEnter({self:n}){const l=E(n.data);if(!l)return;const r=document.createElement("div");r.classList.add("drop-indicator"),r.dataset.edge=l,t.after(r)},onDrag({self:n}){var a,d,c;const l=E(n.data);if(!l){(a=t.nextElementSibling)==null||a.remove();return}if(((d=t.nextElementSibling)==null?void 0:d.getAttribute("data-edge"))===l)return;(c=t.nextElementSibling)==null||c.remove();const r=document.createElement("div");r.classList.add("drop-indicator"),r.dataset.edge=l,t.after(r)},onDragLeave(){var n;(n=t.nextElementSibling)==null||n.remove()},onDrop({self:n,source:l}){var d,c,b,y;(d=t.nextElementSibling)==null||d.remove();const r=E(n.data),a=n.element.parentElement;if(typeof l.data.index=="number"&&a){let m=[...((c=a.parentElement)==null?void 0:c.children)??[]].indexOf(a);r==="bottom"&&l.data.index>=m&&m<(((y=(b=a==null?void 0:a.parentElement)==null?void 0:b.children)==null?void 0:y.length)??0)-1?m+=1:r==="top"&&m>l.data.index&&(m-=1);const g=o.activeIndex,z=l.data.index,x=m,I=o.slotContents[z];o.slotContents.splice(z,1),o.slotContents.splice(x,0,I),z===g?o.activeIndex=x:z<g&&x>=g?o.activeIndex=g-1:z>g&&x<=g&&(o.activeIndex=g+1)}r&&(F(l.element),o.requestUpdate(),e())}});this._cleanupFns.push(u)})},this._detachAll=()=>{this._cleanupFns.forEach(t=>t()),this._cleanupFns=[]}}static get styles(){return[p.r(M)]}willUpdate(){this._detachAll()}updated(){this._attachAll()}disconnectedCallback(){super.disconnectedCallback(),this._detachAll()}setActiveIndex(t){this.activeIndex=t,this._sendChangeEvent()}removeSlotContent(t){this.slotContents=this.slotContents.filter((e,o)=>o!==t),this.activeIndex===t?this.activeIndex=t:this.slotContents.length>0&&this.activeIndex>t&&this.activeIndex--,this._sendChangeEvent()}render(){const t=this.slotContents.map((e,o)=>{const s=O.localize(e.label,this.contentLanguage);return p.x`<li class=${o===this.activeIndex?"active":""}>
|
20
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../property-Cu4Q1hS4.cjs"),v=require("../get-css-variable-DLiZYZEi.cjs"),C=require("../luzmo-icons-DonyjSXg.cjs"),I=require("../localize-r7ALOUy_.cjs"),P=require("../query-all-CR2wWKRD.cjs"),j=require("../focusable-DAGGGYyz.cjs"),k=require("../sized-mixin-j_7aJM4b.cjs");var D={large:700};function F(i){i.animate([{backgroundColor:"var(--ds-background-selected, #E9F2FF)"},{}],{duration:D.large,easing:"cubic-bezier(0.25, 0.1, 0.25, 1.0)",iterations:1})}function w(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(i);t&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})),e.push.apply(e,o)}return e}function S(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?w(Object(e),!0).forEach(function(o){v._defineProperty(i,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):w(Object(e)).forEach(function(o){Object.defineProperty(i,o,Object.getOwnPropertyDescriptor(e,o))})}return i}var L={top:function(t,e){return Math.abs(e.y-t.top)},right:function(t,e){return Math.abs(t.right-e.x)},bottom:function(t,e){return Math.abs(t.bottom-e.y)},left:function(t,e){return Math.abs(e.x-t.left)}},_=Symbol("closestEdge");function $(i,t){var e,o,s=t.element,u=t.input,n=t.allowedEdges,l={x:u.clientX,y:u.clientY},r=s.getBoundingClientRect(),a=n.map(function(c){return{edge:c,value:L[c](r,l)}}),d=(e=(o=a.sort(function(c,b){return c.value-b.value})[0])===null||o===void 0?void 0:o.edge)!==null&&e!==void 0?e:null;return S(S({},i),{},v._defineProperty({},_,d))}function E(i){var t;return(t=i[_])!==null&&t!==void 0?t:null}const M=':host{font-family:var(--luzmo-slot-menu-list-font-family, var(--luzmo-font-family));font-size:var(--luzmo-slot-menu-list-font-size, var(--slot-menu-list-font-size));color:var(--luzmo-slot-menu-listfont-color, var(--luzmo-font-color))}:host{margin:0;padding:0;list-style:none;border-right:var(--luzmo-slot-menu-list-border-right-width, var(--luzmo-border-width)) solid var(--luzmo-slot-menu-list-border-right-color, var(--luzmo-border-color))}:host li{position:relative;cursor:pointer}:host li:hover{background-color:var(--luzmo-slot-menu-list-background-color-hover, var(--slot-menu-list-background-color-hover))}:host .active{background-color:var(--luzmo-slot-menu-list-active-background-color, var(--slot-menu-list-active-background-color));color:var(--luzmo-slot-menu-list-active-color, var(--slot-menu-list-active-color))}:host .active:hover{background-color:var(--luzmo-slot-menu-list-active-background-color-hover, var(--slot-menu-list-active-background-color-hover))}.drop-indicator{position:absolute;left:0;right:0;height:var(--luzmo-slot-menu-list-drop-indicator-height, var(--slot-menu-list-drop-indicator-height));background-color:var(--luzmo-slot-menu-list-drop-indicator-color, var(--slot-menu-list-drop-indicator-color))}.drop-indicator:before{content:"";display:block;width:100%;border:var(--luzmo-slot-menu-list-drop-indicator-height, var(--slot-menu-list-drop-indicator-height)) solid var(--luzmo-slot-menu-list-drop-indicator-color, var(--slot-menu-list-drop-indicator-color));border-radius:50%;position:absolute;background:var(--luzmo-slot-menu-list-drop-indicator-background, var(--luzmo-background-color));left:calc(-.5 * (var(--luzmo-slot-menu-list-drop-indicator-circle-size, var(--slot-menu-list-drop-indicator-circle-size)) + var(--luzmo-slot-menu-list-drop-indicator-height, var(--slot-menu-list-drop-indicator-height))));top:calc(-.5 * (var(--luzmo-slot-menu-list-drop-indicator-circle-size, var(--slot-menu-list-drop-indicator-circle-size)) + var(--luzmo-slot-menu-list-drop-indicator-height, var(--slot-menu-list-drop-indicator-height))));height:var(--luzmo-slot-menu-list-drop-indicator-circle-size, var(--slot-menu-list-drop-indicator-circle-size));width:var(--luzmo-slot-menu-list-drop-indicator-circle-size, var(--slot-menu-list-drop-indicator-circle-size))}.drop-indicator[data-edge=top]{top:calc(-.5 * var(--luzmo-slot-menu-list-drop-indicator-height, var(--slot-menu-list-drop-indicator-height)))}.drop-indicator[data-edge=bottom]{bottom:calc(-.5 * var(--luzmo-slot-menu-list-drop-indicator-height, var(--slot-menu-list-drop-indicator-height)))}.draggable-slot-content{display:flex;justify-content:space-between;gap:var(--luzmo-slot-menu-label-to-icon-gap, var(--slot-menu-label-to-icon-gap));align-items:center}.draggable-slot-content .draggable-slot-content-label,.draggable-slot-content .draggable-slot-content-remove{padding-block-start:var(--luzmo-slot-menu-list-item-vertical-padding, var(--slot-menu-list-item-vertical-padding));padding-block-end:var(--luzmo-slot-menu-list-item-vertical-padding, var(--slot-menu-list-item-vertical-padding))}.draggable-slot-content .draggable-slot-content-label{padding-inline-start:var(--luzmo-slot-menu-list-item-horizontal-padding, var(--slot-menu-list-item-horizontal-padding));flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.draggable-slot-content .draggable-slot-content-remove{padding-inline-end:var(--luzmo-slot-menu-list-item-horizontal-padding, var(--slot-menu-list-item-horizontal-padding));flex:0 0 auto}:host{--slot-menu-list-active-background-color: var(--luzmo-primary);--slot-menu-list-active-background-color-hover: var(--luzmo-primary-hover);--slot-menu-list-active-color: var(--luzmo-primary-inverse-color);--slot-menu-list-background-color-hover: var(--luzmo-background-color-hover);--slot-menu-list-drop-indicator-color: var(--luzmo-font-color-down);--slot-menu-list-drop-indicator-height: 2px;--slot-menu-list-drop-indicator-circle-size: 4px}:host{--slot-menu-display-settings-min-width: 19rem;--slot-menu-min-height: calc(var(--luzmo-component-height) * 2);--slot-menu-font-size: var(--luzmo-font-size);--slot-menu-list-item-horizontal-padding: var(--luzmo-spacing-4);--slot-menu-list-item-vertical-padding: var(--luzmo-spacing-3);--slot-menu-label-to-icon-gap: var(--luzmo-spacing-3)}:host([size=s]){--slot-menu-display-settings-min-width: 16rem;--slot-menu-min-height: calc(var(--luzmo-component-height-s) * 2);--slot-menu-font-size: var(--luzmo-font-size-s);--slot-menu-list-item-horizontal-padding: var(--luzmo-spacing-3);--slot-menu-list-item-vertical-padding: var(--luzmo-spacing-3);--slot-menu-label-to-icon-gap: var(--luzmo-spacing-2)}:host([size=l]){--slot-menu-display-settings-min-width: 23rem;--slot-menu-min-height: calc(var(--luzmo-component-height-l) * 2);--slot-menu-font-size: var(--luzmo-font-size-l);--slot-menu-list-item-horizontal-padding: var(--luzmo-spacing-5);--slot-menu-list-item-vertical-padding: var(--luzmo-spacing-3);--slot-menu-label-to-icon-gap: var(--luzmo-spacing-4)}:host([size=xl]){--slot-menu-display-settings-min-width: 26rem;--slot-menu-min-height: calc(var(--luzmo-component-height-xl) * 2);--slot-menu-font-size: var(--luzmo-font-size-xl);--slot-menu-list-item-horizontal-padding: var(--luzmo-spacing-5);--slot-menu-list-item-vertical-padding: var(--luzmo-spacing-4);--slot-menu-label-to-icon-gap: var(--luzmo-spacing-5)}';var q=Object.defineProperty,f=(i,t,e,o)=>{for(var s=void 0,u=i.length-1,n;u>=0;u--)(n=i[u])&&(s=n(t,e,s)||s);return s&&q(t,e,s),s};class h extends k.SizedMixin(j.LuzmoElement,{validSizes:Object.values(k.ElementSizes)}){constructor(){super(...arguments),this.language="en",this.contentLanguage="en",this.slotContents=[],this.activeIndex=0,this._sendChangeEvent=()=>{this.dispatchEvent(new CustomEvent("slot-list-changed",{bubbles:!0,composed:!0,cancelable:!0,detail:{slotContents:structuredClone(this.slotContents),activeIndex:this.activeIndex}}))},this._cleanupFns=[],this._attachAll=()=>{[...this._draggableSlotContentElements].forEach(t=>{const e=this._sendChangeEvent.bind(this),o=this,s=v.draggable({element:t,onGenerateDragPreview({nativeSetDragImage:n}){v.setCustomNativeDragPreview({nativeSetDragImage:n,render({container:l}){var d;const r=document.createElement("div");r.classList.add("drag-preview");const a={};[["borderColor","--luzmo-slot-menu-list-border-color","--luzmo-border-color"],["backgroundColor","--luzmo-slot-menu-list-background-color","--luzmo-background-color"],["color","--luzmo-slot-menu-list-font-color","--slot-menu-list-font-color"],["fontSize","--luzmo-slot-menu-list-font-size","--slot-menu-list-font-size"],["horizontalPadding","--luzmo-slot-menu-list-item-horizontal-padding","--slot-menu-list-item-horizontal-padding"],["verticalPadding","--luzmo-slot-menu-list-item-vertical-padding","--slot-menu-list-item-vertical-padding"],["borderRadius","--luzmo-slot-menu-list-border-radius","--luzmo-border-radius"],["fontFamily","--luzmo-slot-menu-list-font-family","--luzmo-font-family"]].forEach(([c,b,y])=>{const m=v.getCssVariableValue(t,b)||v.getCssVariableValue(t,y);a[c]=m}),r.textContent=((d=t.querySelector("[data-task-content]"))==null?void 0:d.textContent)??t.textContent,Object.assign(r.style,{border:`1px solid ${a.borderColor}`,backgroundColor:a.backgroundColor,borderRadius:a.borderRadius,fontFamily:a.fontFamily,fontSize:a.fontSize,color:a.color,paddingInline:`${a.horizontalPadding}`,paddingBlock:`${a.verticalPadding}`}),l.append(r)}})},getInitialData(){var r;const n=t.parentElement;let l=0;return n&&(l=[...((r=n.parentElement)==null?void 0:r.children)??[]].indexOf(n)),{index:l}},onDragStart(){t.style.opacity="0.5"},onDrop(){t.style.opacity="1"}});this._cleanupFns.push(s);const u=v.dropTargetForElements({element:t,canDrop({source:n}){var l;return n.element===t?!1:(l=n==null?void 0:n.element)==null?void 0:l.classList.contains("draggable-slot-content")},getData(n){return $({},{element:t,input:n.input,allowedEdges:["top","bottom"]})},getIsSticky(){return!0},onDragEnter({self:n}){const l=E(n.data);if(!l)return;const r=document.createElement("div");r.classList.add("drop-indicator"),r.dataset.edge=l,t.after(r)},onDrag({self:n}){var a,d,c;const l=E(n.data);if(!l){(a=t.nextElementSibling)==null||a.remove();return}if(((d=t.nextElementSibling)==null?void 0:d.getAttribute("data-edge"))===l)return;(c=t.nextElementSibling)==null||c.remove();const r=document.createElement("div");r.classList.add("drop-indicator"),r.dataset.edge=l,t.after(r)},onDragLeave(){var n;(n=t.nextElementSibling)==null||n.remove()},onDrop({self:n,source:l}){var d,c,b,y;(d=t.nextElementSibling)==null||d.remove();const r=E(n.data),a=n.element.parentElement;if(typeof l.data.index=="number"&&a){let m=[...((c=a.parentElement)==null?void 0:c.children)??[]].indexOf(a);r==="bottom"&&l.data.index>=m&&m<(((y=(b=a==null?void 0:a.parentElement)==null?void 0:b.children)==null?void 0:y.length)??0)-1?m+=1:r==="top"&&m>l.data.index&&(m-=1);const g=o.activeIndex,z=l.data.index,x=m,O=o.slotContents[z];o.slotContents.splice(z,1),o.slotContents.splice(x,0,O),z===g?o.activeIndex=x:z<g&&x>=g?o.activeIndex=g-1:z>g&&x<=g&&(o.activeIndex=g+1)}r&&(F(l.element),o.requestUpdate(),e())}});this._cleanupFns.push(u)})},this._detachAll=()=>{this._cleanupFns.forEach(t=>t()),this._cleanupFns=[]}}static get styles(){return[p.r(M)]}willUpdate(){this._detachAll()}updated(){this._attachAll()}disconnectedCallback(){super.disconnectedCallback(),this._detachAll()}setActiveIndex(t){this.activeIndex=t,this._sendChangeEvent()}removeSlotContent(t){this.slotContents=this.slotContents.filter((e,o)=>o!==t),this.activeIndex=this.slotContents.length===0?0:Math.min(this.activeIndex,this.slotContents.length-1),this._sendChangeEvent()}render(){const t=this.slotContents.map((e,o)=>{const s=I.localize(e.label,this.contentLanguage);return p.x`<li class=${o===this.activeIndex?"active":""}>
|
21
21
|
<div class="draggable-slot-content">
|
22
22
|
<div
|
23
23
|
class="draggable-slot-content-label"
|
@@ -20,17 +20,17 @@
|
|
20
20
|
import { r as P, x as E, n as x } from "../property-DCzt3DR1.js";
|
21
21
|
import { _ as S, d as F, a as j, s as D, g as k } from "../get-css-variable-YlLiVgo8.js";
|
22
22
|
import { a8 as $, a7 as L } from "../luzmo-icons-CVeTZ59u.js";
|
23
|
-
import { l as
|
24
|
-
import { r as
|
23
|
+
import { l as M } from "../localize-BX7q0S0M.js";
|
24
|
+
import { r as A } from "../query-all-Ddzx2fEK.js";
|
25
25
|
import { L as R } from "../focusable-BbymtxWI.js";
|
26
26
|
import { S as T, E as q } from "../sized-mixin-BGzkX2g1.js";
|
27
|
-
const
|
27
|
+
const I = () => {
|
28
28
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
29
29
|
const r = document.createElement("style");
|
30
30
|
r.setAttribute("data-luzmo-vars", ""), r.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-color-disabled);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-secondary-outline: rgba(255, 0, 255, 0.2);--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-color-informative: #1a77e9;--luzmo-color-informative-rgb: 26, 119, 233;--luzmo-color-disabled: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(r);
|
31
31
|
}
|
32
32
|
};
|
33
|
-
|
33
|
+
I();
|
34
34
|
var U = {
|
35
35
|
large: 700
|
36
36
|
};
|
@@ -265,8 +265,8 @@ class z extends T(R, {
|
|
265
265
|
a
|
266
266
|
);
|
267
267
|
i === "bottom" && n.data.index >= m && m < (((b = (p = a == null ? void 0 : a.parentElement) == null ? void 0 : p.children) == null ? void 0 : b.length) ?? 0) - 1 ? m += 1 : i === "top" && m > n.data.index && (m -= 1);
|
268
|
-
const g = e.activeIndex, v = n.data.index, f = m,
|
269
|
-
e.slotContents.splice(v, 1), e.slotContents.splice(f, 0,
|
268
|
+
const g = e.activeIndex, v = n.data.index, f = m, O = e.slotContents[v];
|
269
|
+
e.slotContents.splice(v, 1), e.slotContents.splice(f, 0, O), v === g ? e.activeIndex = f : v < g && f >= g ? e.activeIndex = g - 1 : v > g && f <= g && (e.activeIndex = g + 1);
|
270
270
|
}
|
271
271
|
i && (B(n.element), e.requestUpdate(), t());
|
272
272
|
}
|
@@ -295,13 +295,12 @@ class z extends T(R, {
|
|
295
295
|
removeSlotContent(o) {
|
296
296
|
this.slotContents = this.slotContents.filter(
|
297
297
|
(t, e) => e !== o
|
298
|
-
), this.activeIndex
|
299
|
-
this.activeIndex > o && this.activeIndex--, this._sendChangeEvent();
|
298
|
+
), this.activeIndex = this.slotContents.length === 0 ? 0 : Math.min(this.activeIndex, this.slotContents.length - 1), this._sendChangeEvent();
|
300
299
|
}
|
301
300
|
render() {
|
302
301
|
const o = this.slotContents.map(
|
303
302
|
(t, e) => {
|
304
|
-
const s =
|
303
|
+
const s = M(t.label, this.contentLanguage);
|
305
304
|
return E`<li class=${e === this.activeIndex ? "active" : ""}>
|
306
305
|
<div class="draggable-slot-content">
|
307
306
|
<div
|
@@ -330,7 +329,7 @@ h([
|
|
330
329
|
x({ type: String, attribute: "content-language", reflect: !0 })
|
331
330
|
], z.prototype, "contentLanguage");
|
332
331
|
h([
|
333
|
-
|
332
|
+
A(".draggable-slot-content")
|
334
333
|
], z.prototype, "_draggableSlotContentElements");
|
335
334
|
h([
|
336
335
|
x()
|
package/components/{symbol-map-options.config-sdPlHspI.cjs → symbol-map-options.config-m-lwLTtu.cjs}
RENAMED
@@ -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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-DhDgy1sp.cjs"),i=require("./helpers-DXQwEH1P.cjs"),l=({slots:e})=>{var t,a;return Array.isArray(e)&&(e==null?void 0:e.length)>0?((a=(t=e==null?void 0:e.find(r=>(r==null?void 0:r.name)==="category"))==null?void 0:t.content)==null?void 0:a.length)===0:!0},n=({slots:e})=>{var t,a;return Array.isArray(e)&&(e==null?void 0:e.length)>0?((a=(t=e==null?void 0:e.find(r=>(r==null?void 0:r.name)==="category"))==null?void 0:t.content)==null?void 0:a.length)>0:!1},c=[{key:"general",type:"group",open:!0,children:[{key:"display.title",control:{type:"switch",label:"Title",default:!0}},{key:"enabled.zoom",control:{type:"switch",label:"Zoom",default:!0}},{key:"enabled.pan",control:{type:"switch",label:"Pan",default:!0}},{key:"enabled.pitchBearing",control:{type:"switch",label:"Pitch & Rotate",default:!1}},{type:"divider"},{key:"vectorTileProvider",control:{type:"picker",label:"Map style",default:"Basic",enum:["Basic","Bright","Dark","Fiord","Liberty","Pastel","Positron","Streets","Toner","Topographique","Voyager","No Tiles"],parseValue:e=>(e==null?void 0:e.name)||"Basic",toValue:e=>o.mapVectorTileProviders[e]??{}}}]},{key:"symbol",type:"group",open:!0,children:[{key:"color",control:{type:"color-picker",label:"Symbol color",default:({theme:e})=>i.getThemeMainColor(e),extraLabel:({options:e,theme:t})=>i.getThemeMainColorResetLabel(e,t,"color"),extraLabelHasClickAction:({options:e,theme:t})=>i.getThemeMainColorExtraLabelHasClickAction(e,t,"color"),extraLabelClickAction:({options:e,theme:t})=>i.getThemeMainColorExtraLabelClickAction(e,t,"color")},visibleIf:l},{key:"
|
20
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-DhDgy1sp.cjs"),i=require("./helpers-DXQwEH1P.cjs"),l=({slots:e})=>{var t,a;return Array.isArray(e)&&(e==null?void 0:e.length)>0?((a=(t=e==null?void 0:e.find(r=>(r==null?void 0:r.name)==="category"))==null?void 0:t.content)==null?void 0:a.length)===0:!0},n=({slots:e})=>{var t,a;return Array.isArray(e)&&(e==null?void 0:e.length)>0?((a=(t=e==null?void 0:e.find(r=>(r==null?void 0:r.name)==="category"))==null?void 0:t.content)==null?void 0:a.length)>0:!1},c=[{key:"general",type:"group",open:!0,children:[{key:"display.title",control:{type:"switch",label:"Title",default:!0}},{key:"enabled.zoom",control:{type:"switch",label:"Zoom",default:!0}},{key:"enabled.pan",control:{type:"switch",label:"Pan",default:!0}},{key:"enabled.pitchBearing",control:{type:"switch",label:"Pitch & Rotate",default:!1}},{type:"divider"},{key:"vectorTileProvider",control:{type:"picker",label:"Map style",default:"Basic",enum:["Basic","Bright","Dark","Fiord","Liberty","Pastel","Positron","Streets","Toner","Topographique","Voyager","No Tiles"],parseValue:e=>(e==null?void 0:e.name)||"Basic",toValue:e=>o.mapVectorTileProviders[e]??{}}}]},{key:"symbol",type:"group",open:!0,children:[{key:"color",control:{type:"color-picker",label:"Symbol color",default:({theme:e})=>i.getThemeMainColor(e),extraLabel:({options:e,theme:t})=>i.getThemeMainColorResetLabel(e,t,"color"),extraLabelHasClickAction:({options:e,theme:t})=>i.getThemeMainColorExtraLabelHasClickAction(e,t,"color"),extraLabelClickAction:({options:e,theme:t})=>i.getThemeMainColorExtraLabelClickAction(e,t,"color")},visibleIf:l},{key:"size",control:{type:"slider",label:"Size",default:30,min:1,max:250,step:1}},{key:"opacity",control:{type:"slider",label:"Opacity",default:.9,min:.1,max:1,step:.01}}]},{key:"legend",type:"group",open:!1,children:[{key:"legend.position",control:{type:"position-picker",label:"Position",default:"bottomLeft",enum:["topLeft","top","topRight","right","bottomRight","bottom","bottomLeft","left"]},visibleIf:({options:e})=>{var t;return((t=e==null?void 0:e.display)==null?void 0:t.legend)!==!1}}],visibleIf:n}];exports.default=c;
|
package/components/utils.cjs
CHANGED
@@ -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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("./decompose-numeric-format-B3rVVHpO.cjs"),q=require("./formatter-
|
20
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("./decompose-numeric-format-B3rVVHpO.cjs"),q=require("./formatter-Lo9PMcxy.cjs"),D=require("./localize-r7ALOUy_.cjs"),S=require("./index-B_rfLdXx.cjs"),x=require("./index-Vdyb9z2D.cjs");function z(o){var a,m,h,C;const c=[],f=[];Object.keys(S.slotsConfigs).forEach(e=>{e.replace("SlotsConfig","");const t=e.replace("SlotsConfig","").replaceAll(/([A-Z])/g,"-$1").toLowerCase();f.push({type:t,slotsConfig:S.slotsConfigs[e]})});const i=f.find(e=>e.type===(o==null?void 0:o.oldItemType)),n=f.find(e=>e.type===(o==null?void 0:o.newItemType)),s=structuredClone((n==null?void 0:n.slotsConfig)??[]);if(!n)return{type:(i==null?void 0:i.type)??"bar-chart",slots:o.slots??[]};const r=structuredClone(o.slots??[]);for(const e of r){const t=i==null?void 0:i.slotsConfig.find(b=>b.name===e.name);e.type=(t==null?void 0:t.type)??(e==null?void 0:e.type)}const u=r.filter(e=>e.type==="mixed").sort((e,t)=>e.order-t.order),y=s.filter(e=>e.type==="mixed").sort((e,t)=>e.order-t.order),O=r.filter(e=>e.type==="numeric").sort((e,t)=>e.order-t.order),T=s.filter(e=>e.type==="numeric").sort((e,t)=>e.order-t.order),l=[];for(const e of O)for(const t of e.content)t.key="old-measure-"+(e==null?void 0:e.name)+"-"+e.content.indexOf(t),l.push(t);for(const e of u)for(const t of e.content)t.type==="numeric"&&(t.key="old-mixed-"+(e==null?void 0:e.name)+"-"+e.content.indexOf(t),l.push(t));const k=[...T,...y].sort((e,t)=>s.indexOf(e)-s.indexOf(t));for(const e of l)for(const t of k)c.includes(e.key)||(t.content=(t==null?void 0:t.content)??[],(((a=t==null?void 0:t.content)==null?void 0:a.length)===0||((m=t==null?void 0:t.content)==null?void 0:m.length)>0&&(t==null?void 0:t.canAcceptMultipleDataItems)===!0)&&(t.content.push(e),c.push(e.key)));const g=r.filter(e=>e.type==="categorical").sort((e,t)=>e.order-t.order),w=s.filter(e=>e.type==="categorical").sort((e,t)=>e.order-t.order),d=[];for(const e of g)for(const t of e.content)t.key="old-dimension-"+(e==null?void 0:e.name)+"-"+e.content.indexOf(t),d.push(t);for(const e of u)for(const t of e.content)t.type!=="numeric"&&(t.key="old-mixed-"+(e==null?void 0:e.name)+"-"+e.content.indexOf(t),d.push(t));const M=[...w,...y].sort((e,t)=>s.indexOf(e)-s.indexOf(t));for(const e of d)if(!c.includes(e.key))for(const t of M)t&&!c.includes(e.key)&&(t.content=(t==null?void 0:t.content)??[],(((h=t==null?void 0:t.content)==null?void 0:h.length)===0||((C=t==null?void 0:t.content)==null?void 0:C.length)>0&&(t==null?void 0:t.canAcceptMultipleDataItems)===!0)&&(t.content.push(e),c.push(e.key)));let p={...o.options};return n.setInitialOptions&&(p=n==null?void 0:n.setInitialOptions({...p})),{type:n.type??"bar-chart",slots:s.map(e=>({name:e.name,content:e.content??[]}))??[],options:p??{...o.options}}}exports.decomposeNumericFormat=A.decomposeNumericFormat;exports.formatter=q.formatter;exports.localize=D.localize;exports.getTheme=x.getTheme;exports.systemThemeIds=x.systemThemeIds;exports.switchItem=z;
|
package/components/utils.js
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
* SOFTWARE.
|
19
19
|
* */
|
20
20
|
import { d as j } from "./decompose-numeric-format-BuZcjH2k.js";
|
21
|
-
import { f as E } from "./formatter-
|
21
|
+
import { f as E } from "./formatter-CqU9_98M.js";
|
22
22
|
import { l as N } from "./localize-BX7q0S0M.js";
|
23
23
|
import { s as C } from "./index-Bg5PqKqt.js";
|
24
24
|
import { g as $, s as q } from "./index-CgnTl6Sc.js";
|
@@ -0,0 +1,23 @@
|
|
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
|
+
const n = [];
|
21
|
+
export {
|
22
|
+
n as default
|
23
|
+
};
|
@@ -0,0 +1,20 @@
|
|
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
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=[];exports.default=e;
|
package/custom-elements.json
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
export declare const areaChartContextConfig: {
|
2
|
+
name: string;
|
3
|
+
label: string;
|
4
|
+
defaultSize: {
|
5
|
+
width: number;
|
6
|
+
height: number;
|
7
|
+
};
|
8
|
+
description: string;
|
9
|
+
slots: {
|
10
|
+
measure: {
|
11
|
+
description: string;
|
12
|
+
};
|
13
|
+
'x-axis': {
|
14
|
+
description: string;
|
15
|
+
};
|
16
|
+
legend: {
|
17
|
+
description: string;
|
18
|
+
};
|
19
|
+
};
|
20
|
+
};
|
@@ -0,0 +1,20 @@
|
|
1
|
+
export declare const barChartContextConfig: {
|
2
|
+
name: string;
|
3
|
+
label: string;
|
4
|
+
defaultSize: {
|
5
|
+
width: number;
|
6
|
+
height: number;
|
7
|
+
};
|
8
|
+
description: string;
|
9
|
+
slots: {
|
10
|
+
measure: {
|
11
|
+
description: string;
|
12
|
+
};
|
13
|
+
'y-axis': {
|
14
|
+
description: string;
|
15
|
+
};
|
16
|
+
legend: {
|
17
|
+
description: string;
|
18
|
+
};
|
19
|
+
};
|
20
|
+
};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
export declare const boxPlotContextConfig: {
|
2
|
+
name: string;
|
3
|
+
label: string;
|
4
|
+
defaultSize: {
|
5
|
+
width: number;
|
6
|
+
height: number;
|
7
|
+
};
|
8
|
+
description: string;
|
9
|
+
slots: {
|
10
|
+
measure: {
|
11
|
+
description: string;
|
12
|
+
};
|
13
|
+
category: {
|
14
|
+
description: string;
|
15
|
+
};
|
16
|
+
};
|
17
|
+
};
|