@luzmo/analytics-components-kit 1.1.1 → 1.2.1
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/README.md +8 -2
- package/angular/components/interactive-viz-item.ts +40 -3
- package/angular/components/item-option-color-picker.ts +30 -3
- package/angular/components/item-option-color-range.ts +30 -3
- package/angular/components/item-option-guidelines.ts +31 -4
- package/angular/components/item-option-panel.ts +41 -4
- package/angular/components/item-option-slider.ts +41 -4
- package/angular/components/item-option.ts +41 -4
- package/angular/esm/components/interactive-viz-item.d.ts +13 -4
- package/angular/esm/components/interactive-viz-item.js +29 -3
- package/angular/esm/components/item-option-color-picker.d.ts +11 -4
- package/angular/esm/components/item-option-color-picker.js +23 -3
- package/angular/esm/components/item-option-color-range.d.ts +11 -4
- package/angular/esm/components/item-option-color-range.js +23 -3
- package/angular/esm/components/item-option-guidelines.d.ts +11 -4
- package/angular/esm/components/item-option-guidelines.js +24 -4
- package/angular/esm/components/item-option-panel.d.ts +13 -4
- package/angular/esm/components/item-option-panel.js +30 -4
- package/angular/esm/components/item-option-slider.d.ts +13 -4
- package/angular/esm/components/item-option-slider.js +30 -4
- package/angular/esm/components/item-option.d.ts +13 -4
- package/angular/esm/components/item-option.js +30 -4
- package/angular/package.json +2 -2
- package/angular/utils/option-interaction/index.d.ts +2 -0
- package/angular/utils/option-interaction/is-same-option-value.d.ts +10 -0
- package/angular/utils/option-interaction/option-interaction-controller.d.ts +54 -0
- package/angular/utils/option-interaction/tests/option-interaction-controller.test.d.ts +1 -0
- package/angular/utils/store/base-store.d.ts +9 -0
- package/angular/utils/store/tests/store-base-history.test.d.ts +1 -0
- package/components/{base-store-SgJsjLap.cjs → base-store-D3whjduR.cjs} +1 -1
- package/components/{base-store-g0dt7ru7.js → base-store-DQYj8A1W.js} +3 -0
- package/components/{choropleth-map-options.config-D9-u-NwX.js → choropleth-map-options.config-Blu0Z2tR.js} +1 -1
- package/components/{choropleth-map-options.config-CXDGMiSJ.cjs → choropleth-map-options.config-DwFJ00CS.cjs} +1 -1
- package/components/{color-range-utils-CUCTsRXM.js → color-range-utils-CgwRGUkg.js} +18 -18
- package/components/{color-range-utils-BCFQAeY1.cjs → color-range-utils-D8uygiMe.cjs} +1 -1
- package/components/{heat-map-options.config-ChZeslEy.js → heat-map-options.config-BQkhkLPb.js} +16 -16
- package/components/{heat-map-options.config-DiNa8NnG.cjs → heat-map-options.config-DjQkB039.cjs} +1 -1
- package/components/{heat-table-options.config-BPCszrFn.js → heat-table-options.config-CMWWTeyo.js} +1 -1
- package/components/{heat-table-options.config-BvE6coaV.cjs → heat-table-options.config-D21xtaIk.cjs} +1 -1
- package/components/index.cjs +1 -1
- package/components/index.js +7 -7
- package/components/interactive-viz-item/index.cjs +1 -1
- package/components/interactive-viz-item/index.d.ts +2 -1
- package/components/interactive-viz-item/index.js +1 -1
- package/components/interactive-viz-item/interactive-viz-item.d.ts +31 -1
- package/components/interactive-viz-item/types.d.ts +13 -0
- package/components/{interactive-viz-item-CofUkpP6.js → interactive-viz-item-CwRRaCZB.js} +144 -84
- package/components/interactive-viz-item-CxdrGRKc.cjs +265 -0
- package/components/is-same-option-value-B2oyvEqT.js +42 -0
- package/components/is-same-option-value-Cf6BQcs7.cjs +20 -0
- package/components/item-option/helpers/control-markup.d.ts +7 -0
- package/components/item-option/index.cjs +1 -1
- package/components/item-option/index.d.ts +1 -1
- package/components/item-option/index.js +1 -1
- package/components/item-option/item-option.d.ts +23 -2
- package/components/item-option/types.d.ts +19 -0
- package/components/{item-option-Cgx3c08E.js → item-option-DKLRnicU.js} +182 -136
- package/components/item-option-DpLdospV.cjs +285 -0
- package/components/item-option-color-picker/index.cjs +1 -1
- package/components/item-option-color-picker/index.d.ts +1 -1
- package/components/item-option-color-picker/index.js +1 -1
- package/components/item-option-color-picker/item-option-color-picker.d.ts +17 -1
- package/components/item-option-color-picker-CNW7GsCO.cjs +37 -0
- package/components/item-option-color-picker-DDvsY7hV.js +129 -0
- package/components/item-option-color-range/index.cjs +1 -1
- package/components/item-option-color-range/index.d.ts +1 -1
- package/components/item-option-color-range/index.js +1 -1
- package/components/item-option-color-range/item-option-color-range.d.ts +20 -1
- package/components/item-option-color-range-BqSbuSZh.cjs +101 -0
- package/components/item-option-color-range-FQduqtz3.js +265 -0
- package/components/item-option-guidelines/index.cjs +1 -1
- package/components/item-option-guidelines/index.d.ts +1 -1
- package/components/item-option-guidelines/index.js +1 -1
- package/components/item-option-guidelines/item-option-guidelines.d.ts +16 -1
- package/components/{item-option-guidelines-DNJevmVD.js → item-option-guidelines-k5DwMONo.js} +132 -104
- package/components/item-option-guidelines-z9BsGR-l.cjs +138 -0
- package/components/item-option-panel/index.cjs +1 -1
- package/components/item-option-panel/index.d.ts +1 -1
- package/components/item-option-panel/index.js +1 -1
- package/components/item-option-panel/item-option-panel.d.ts +12 -1
- package/components/{item-option-panel-DHdnisRb.js → item-option-panel-BLXWIbjX.js} +18 -6
- package/components/{item-option-panel-Dl3aYBNe.cjs → item-option-panel-CU51qvgV.cjs} +6 -4
- package/components/item-option-slider/index.cjs +1 -1
- package/components/item-option-slider/index.d.ts +1 -1
- package/components/item-option-slider/index.js +1 -1
- package/components/item-option-slider/item-option-slider.d.ts +15 -2
- package/components/item-option-slider-BKtJfL3D.js +119 -0
- package/components/item-option-slider-Kz2eFBql.cjs +36 -0
- package/components/item-options-configs.cjs +1 -1
- package/components/item-options-configs.js +5 -5
- package/components/option-interaction-controller-B8S1N_Oo.js +90 -0
- package/components/option-interaction-controller-D0U-CTpZ.cjs +20 -0
- package/components/{route-map-options.config-DdCaVtIF.cjs → route-map-options.config-DER6ENky.cjs} +1 -1
- package/components/{route-map-options.config-B7vT6KG_.js → route-map-options.config-DTcS47fW.js} +1 -1
- package/components/{spike-map-options.config-DkmRZ1JZ.js → spike-map-options.config-CPYfKWoF.js} +1 -1
- package/components/{spike-map-options.config-B3hDh2qU.cjs → spike-map-options.config-DeF1Whq5.cjs} +1 -1
- package/components/utils/store.cjs +1 -1
- package/components/utils/store.js +1 -1
- package/custom-elements.json +409 -103
- package/package.json +1 -1
- package/react/components/interactive-viz-item.component.ts +11 -2
- package/react/components/item-option-color-picker.component.ts +9 -3
- package/react/components/item-option-color-range.component.ts +9 -3
- package/react/components/item-option-guidelines.component.ts +9 -3
- package/react/components/item-option-panel.component.ts +12 -3
- package/react/components/item-option-slider.component.ts +12 -3
- package/react/components/item-option.component.ts +12 -3
- package/react/esm/components/interactive-viz-item.component.d.ts +8 -2
- package/react/esm/components/interactive-viz-item.component.js +7 -1
- package/react/esm/components/item-option-color-picker.component.d.ts +6 -2
- package/react/esm/components/item-option-color-picker.component.js +6 -2
- package/react/esm/components/item-option-color-range.component.d.ts +6 -2
- package/react/esm/components/item-option-color-range.component.js +6 -2
- package/react/esm/components/item-option-guidelines.component.d.ts +6 -2
- package/react/esm/components/item-option-guidelines.component.js +6 -2
- package/react/esm/components/item-option-panel.component.d.ts +8 -2
- package/react/esm/components/item-option-panel.component.js +8 -2
- package/react/esm/components/item-option-slider.component.d.ts +8 -2
- package/react/esm/components/item-option-slider.component.js +8 -2
- package/react/esm/components/item-option.component.d.ts +8 -2
- package/react/esm/components/item-option.component.js +8 -2
- package/react/luzmo-stub.d.ts +7 -0
- package/react/package.json +2 -2
- package/standalone/chunks/{choropleth-map-options.config-Cs4Kvr9h.js → choropleth-map-options.config-rUJsEJcm.js} +1 -1
- package/standalone/chunks/{color-range-utils-CKDpd3gZ.js → color-range-utils-DxOtqAKB.js} +1 -1
- package/standalone/chunks/embed-CBu7iQRx.js +231 -0
- package/standalone/chunks/{heat-map-options.config-DF5kjOOe.js → heat-map-options.config-D93AeYFi.js} +1 -1
- package/standalone/chunks/{heat-table-options.config-DaePzfHG.js → heat-table-options.config-ZVML76FK.js} +1 -1
- package/standalone/chunks/is-same-option-value-Di-A7Wmg.js +2 -0
- package/standalone/chunks/item-option-color-picker-lLvBPnKA.js +19 -0
- package/standalone/chunks/{item-option-color-range-CyJd1LZ_.js → item-option-color-range-BqeatOei.js} +18 -15
- package/standalone/chunks/item-option-guidelines-Cop8rM8y.js +120 -0
- package/standalone/chunks/item-option-panel-CzSKFCVl.js +316 -0
- package/standalone/chunks/item-option-slider-K_bsNci8.js +18 -0
- package/standalone/chunks/option-interaction-controller-BslAXAHF.js +2 -0
- package/standalone/chunks/{route-map-options.config-D7FfzIiU.js → route-map-options.config-Dwy0JSVq.js} +1 -1
- package/standalone/chunks/{spike-map-options.config-CZiFzDm9.js → spike-map-options.config-DFmuNxym.js} +1 -1
- package/standalone/interactive-viz-item.js +24 -20
- package/standalone/item-grid.js +1 -1
- package/standalone/manifest.json +14 -13
- package/utils/option-interaction/index.d.ts +2 -0
- package/utils/option-interaction/is-same-option-value.d.ts +10 -0
- package/utils/option-interaction/option-interaction-controller.d.ts +54 -0
- package/utils/option-interaction/tests/option-interaction-controller.test.d.ts +1 -0
- package/utils/store/base-store.d.ts +9 -0
- package/utils/store/tests/store-base-history.test.d.ts +1 -0
- package/components/interactive-viz-item-D537mo3l.cjs +0 -261
- package/components/item-option-CqGDFdPj.cjs +0 -269
- package/components/item-option-color-picker-BpPoOO2b.cjs +0 -34
- package/components/item-option-color-picker-cojuCvu5.js +0 -84
- package/components/item-option-color-range-CMBEx1fi.cjs +0 -98
- package/components/item-option-color-range-Dt7Bv06p.js +0 -217
- package/components/item-option-guidelines-Beh0DlG0.cjs +0 -135
- package/components/item-option-slider-Bo5vs6nr.js +0 -89
- package/components/item-option-slider-CyWKWr5D.cjs +0 -33
- package/standalone/chunks/color-7IgCGZKz.js +0 -2
- package/standalone/chunks/embed-BfHBKhIe.js +0 -231
- package/standalone/chunks/item-option-color-picker-Cr7ujQNO.js +0 -16
- package/standalone/chunks/item-option-guidelines-6NjpzS6b.js +0 -117
- package/standalone/chunks/item-option-panel-VxvWU56c.js +0 -298
- package/standalone/chunks/item-option-slider-l9wt7_0c.js +0 -15
|
@@ -21,22 +21,23 @@ import "./tokens-6HmQYnEP.js";
|
|
|
21
21
|
import { i as e } from "./base-rAte-QzM.js";
|
|
22
22
|
import { t } from "./decorate-B2TzfnLZ.js";
|
|
23
23
|
import { n } from "./data-broker-C1Iz71TN.js";
|
|
24
|
-
import { n as r
|
|
25
|
-
import { t as a } from "./
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
24
|
+
import { n as r } from "./is-same-option-value-B2oyvEqT.js";
|
|
25
|
+
import { n as i, t as a } from "./themes-BO_1ebSB.js";
|
|
26
|
+
import { t as o } from "./set-nested-value-DmCMg2V3.js";
|
|
27
|
+
import { n as s, r as c } from "./types-DJuS9IwG.js";
|
|
28
|
+
import { html as l, unsafeCSS as u } from "lit";
|
|
29
|
+
import { property as d } from "lit/decorators.js";
|
|
30
|
+
import { msg as f } from "@lit/localize";
|
|
31
|
+
import { ifDefined as p } from "lit/directives/if-defined.js";
|
|
32
|
+
import { Task as m } from "@lit/task";
|
|
32
33
|
// node_modules/@luzmo/dashboard-contents-types/shared/utils/options-registry.generated.js
|
|
33
|
-
var
|
|
34
|
+
var h = {
|
|
34
35
|
"area-chart": () => import("./area-chart-options.config-Dnw8v2CA.js").then((e) => e.t),
|
|
35
36
|
"bar-chart": () => import("./bar-chart-options.config-DHO8grQN.js").then((e) => e.t),
|
|
36
37
|
"box-plot": () => import("./box-plot-options.config-BgiiwSrU.js").then((e) => e.t),
|
|
37
38
|
"bubble-chart": () => import("./bubble-chart-options.config-UM9w5tBs.js").then((e) => e.t),
|
|
38
39
|
"bullet-chart": () => import("./bullet-chart-options.config-D9HklLUI.js").then((e) => e.t),
|
|
39
|
-
"choropleth-map": () => import("./choropleth-map-options.config-
|
|
40
|
+
"choropleth-map": () => import("./choropleth-map-options.config-Blu0Z2tR.js").then((e) => e.t),
|
|
40
41
|
"circle-pack-chart": () => import("./circle-pack-chart-options.config-DQs-uitJ.js").then((e) => e.t),
|
|
41
42
|
"circular-gauge": () => import("./circular-gauge-options.config-CnWE16oE.js").then((e) => e.t),
|
|
42
43
|
"column-chart": () => import("./column-chart-options.config-BYDJTVx6.js").then((e) => e.t),
|
|
@@ -48,8 +49,8 @@ var m = {
|
|
|
48
49
|
"dropdown-filter": () => import("./dropdown-filter-options.config-B2S5I7IG.js").then((e) => e.t),
|
|
49
50
|
"evolution-number": () => import("./evolution-number-options.config-BBWPkY_K.js").then((e) => e.n),
|
|
50
51
|
"funnel-chart": () => import("./funnel-chart-options.config-W83a8ukL.js").then((e) => e.t),
|
|
51
|
-
"heat-map": () => import("./heat-map-options.config-
|
|
52
|
-
"heat-table": () => import("./heat-table-options.config-
|
|
52
|
+
"heat-map": () => import("./heat-map-options.config-BQkhkLPb.js").then((e) => e.n),
|
|
53
|
+
"heat-table": () => import("./heat-table-options.config-CMWWTeyo.js").then((e) => e.t),
|
|
53
54
|
"hexbin-map": () => import("./hexbin-map-options.config-DUbhSv0B.js").then((e) => e.t),
|
|
54
55
|
image: () => import("./image-options.config-D_QOqkE_.js").then((e) => e.n),
|
|
55
56
|
kpi: () => import("./kpi-options.config-D9WuRe5z.js"),
|
|
@@ -61,7 +62,7 @@ var m = {
|
|
|
61
62
|
"pyramid-chart": () => import("./pyramid-chart-options.config-0Qf1naIx.js").then((e) => e.t),
|
|
62
63
|
"radar-chart": () => import("./radar-chart-options.config-Dd6SMpMz.js").then((e) => e.t),
|
|
63
64
|
"regular-table": () => import("./regular-table-options.config-TXfzXF_Y.js").then((e) => e.n),
|
|
64
|
-
"route-map": () => import("./route-map-options.config-
|
|
65
|
+
"route-map": () => import("./route-map-options.config-DTcS47fW.js").then((e) => e.n),
|
|
65
66
|
"sankey-diagram": () => import("./sankey-diagram-options.config-Y6jRK3wk.js").then((e) => e.n),
|
|
66
67
|
"scatter-plot": () => import("./scatter-plot-options.config-DvGofFzR.js").then((e) => e.n),
|
|
67
68
|
"search-filter": () => import("./search-filter-options.config-JvAotvWb.js").then((e) => e.n),
|
|
@@ -69,7 +70,7 @@ var m = {
|
|
|
69
70
|
"slider-filter": () => import("./slider-filter-options.config-BaoIKTFj.js").then((e) => e.n),
|
|
70
71
|
spacer: () => import("./spacer-options.config-Dd_j69HB.js"),
|
|
71
72
|
"speedometer-chart": () => import("./speedometer-chart-options.config-CIZKRvbg.js").then((e) => e.n),
|
|
72
|
-
"spike-map": () => import("./spike-map-options.config-
|
|
73
|
+
"spike-map": () => import("./spike-map-options.config-CPYfKWoF.js").then((e) => e.n),
|
|
73
74
|
"strip-plot": () => import("./strip-plot-options.config-D1h3YBHj.js").then((e) => e.t),
|
|
74
75
|
"sunburst-chart": () => import("./sunburst-chart-options.config-DVETeZFc.js").then((e) => e.n),
|
|
75
76
|
"symbol-map": () => import("./symbol-map-options.config-BwZ7_S4w.js").then((e) => e.n),
|
|
@@ -78,7 +79,7 @@ var m = {
|
|
|
78
79
|
"venn-diagram": () => import("./venn-diagram-options.config-3-Adz8wM.js").then((e) => e.n),
|
|
79
80
|
video: () => import("./video-options.config-DVxtlO5_.js").then((e) => e.n),
|
|
80
81
|
"wordcloud-chart": () => import("./wordcloud-chart-options.config-UAl2hfU7.js").then((e) => e.n)
|
|
81
|
-
},
|
|
82
|
+
}, g = {
|
|
82
83
|
"area-chart:de": () => import("./area-chart-options.de-DXjvU5SP.js"),
|
|
83
84
|
"area-chart:en": () => import("./area-chart-options.en-C97TC7i-.js"),
|
|
84
85
|
"area-chart:es": () => import("./area-chart-options.es-BRZqqMoH.js"),
|
|
@@ -304,16 +305,16 @@ var m = {
|
|
|
304
305
|
"wordcloud-chart:es": () => import("./wordcloud-chart-options.es-C6dUmFLy.js"),
|
|
305
306
|
"wordcloud-chart:fr": () => import("./wordcloud-chart-options.fr-dNSX7uyQ.js"),
|
|
306
307
|
"wordcloud-chart:nl": () => import("./wordcloud-chart-options.nl-D1CFGAGK.js")
|
|
307
|
-
},
|
|
308
|
+
}, _ = async (e) => {
|
|
308
309
|
try {
|
|
309
|
-
let t =
|
|
310
|
+
let t = h[e];
|
|
310
311
|
return t ? (await t())?.default ?? null : null;
|
|
311
312
|
} catch {
|
|
312
313
|
return null;
|
|
313
314
|
}
|
|
314
|
-
},
|
|
315
|
+
}, v = async (e, t) => {
|
|
315
316
|
try {
|
|
316
|
-
let n =
|
|
317
|
+
let n = g[`${e}:${t}`];
|
|
317
318
|
if (!n) return null;
|
|
318
319
|
let r = await n();
|
|
319
320
|
if (!r?.default) return null;
|
|
@@ -334,11 +335,11 @@ var m = {
|
|
|
334
335
|
} catch {
|
|
335
336
|
return null;
|
|
336
337
|
}
|
|
337
|
-
},
|
|
338
|
+
}, y = (e) => e ? _(e) : Promise.resolve(null), b = async (e, t, n = !1) => {
|
|
338
339
|
if (!e || !t) return null;
|
|
339
|
-
let r = await
|
|
340
|
-
return !r && n && t !== "en" && (r = await
|
|
341
|
-
},
|
|
340
|
+
let r = await v(e, t);
|
|
341
|
+
return !r && n && t !== "en" && (r = await v(e, "en")), r ?? null;
|
|
342
|
+
}, x = (e, t, n) => {
|
|
342
343
|
let r = (t) => {
|
|
343
344
|
for (let i of t ?? []) {
|
|
344
345
|
if (i.key === e) return n ? i : i.control;
|
|
@@ -354,14 +355,14 @@ var m = {
|
|
|
354
355
|
if (t) return t;
|
|
355
356
|
}
|
|
356
357
|
return null;
|
|
357
|
-
},
|
|
358
|
+
}, S = ":host{font-family:var(--luzmo-item-option-font-family,var(--luzmo-font-family));font-size:var(--luzmo-item-option-font-size,var(--luzmo-font-size));display:block;overflow:visible}:host([size=s]){font-size:var(--luzmo-item-option-font-size-s,var(--luzmo-font-size-s))}:host([size=l]){font-size:var(--luzmo-item-option-font-size-l,var(--luzmo-font-size-l))}:host([size=xl]){font-size:var(--luzmo-item-option-font-size-xl,var(--luzmo-font-size-xl))}.sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}", C = (e) => {
|
|
358
359
|
let t;
|
|
359
360
|
return typeof e?.controlInfo?.default == "function" ? t = e.controlInfo.default({
|
|
360
361
|
options: e.options,
|
|
361
362
|
slots: e.slots,
|
|
362
363
|
theme: e.theme
|
|
363
364
|
}) : e.controlInfo?.default !== void 0 && e.controlInfo?.default !== null && (t = e.controlInfo.default), t;
|
|
364
|
-
},
|
|
365
|
+
}, w = (e) => {
|
|
365
366
|
let t;
|
|
366
367
|
if (typeof e.controlInfo?.extraLabel == "function" ? t = e.controlInfo.extraLabel({
|
|
367
368
|
options: e.options,
|
|
@@ -387,7 +388,7 @@ var m = {
|
|
|
387
388
|
theme: e.theme
|
|
388
389
|
}) : typeof e.controlInfo?.extraLabelHasClickAction == "boolean" && (r = e.controlInfo.extraLabelHasClickAction);
|
|
389
390
|
let i = typeof e.controlInfo?.extraLabelClickAction == "function" ? () => e.controlInfo.extraLabelClickAction({
|
|
390
|
-
options: e.options,
|
|
391
|
+
options: e.getOptions?.() ?? e.options,
|
|
391
392
|
slots: e.slots,
|
|
392
393
|
theme: e.theme
|
|
393
394
|
}) : () => {};
|
|
@@ -397,7 +398,7 @@ var m = {
|
|
|
397
398
|
extraLabelHasClickAction: r,
|
|
398
399
|
extraLabelClickAction: i
|
|
399
400
|
};
|
|
400
|
-
},
|
|
401
|
+
}, T = (e, t) => {
|
|
401
402
|
let n = e?.options ?? {};
|
|
402
403
|
if (typeof e?.controlInfo?.calculateValue == "function") return e.controlInfo.calculateValue({ options: n });
|
|
403
404
|
if (t.includes(".")) {
|
|
@@ -407,13 +408,15 @@ var m = {
|
|
|
407
408
|
return r[e[i]];
|
|
408
409
|
}
|
|
409
410
|
return n[t];
|
|
410
|
-
},
|
|
411
|
-
let n = { ...e.options };
|
|
412
|
-
|
|
411
|
+
}, E = (e) => (t) => {
|
|
412
|
+
let n = { ...e.getOptions?.() ?? e.options };
|
|
413
|
+
typeof e?.controlInfo?.toOptions == "function" ? n = e.controlInfo.toOptions({
|
|
413
414
|
options: n,
|
|
414
415
|
value: t?.detail?.value
|
|
415
|
-
}) : e.optionKey.includes(".") ? n =
|
|
416
|
-
|
|
416
|
+
}) : e.optionKey.includes(".") ? n = o(n, e.optionKey, t.detail.value) : n[e.optionKey] = t.detail.value;
|
|
417
|
+
let r = t?.detail?.interaction;
|
|
418
|
+
return r ? e.changeCallback(n, r) : e.changeCallback(n);
|
|
419
|
+
}, D = (e) => {
|
|
417
420
|
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label ?? e.optionKey ?? "", n = e.size, r = {};
|
|
418
421
|
Object.keys(e.controlInfo?.values).forEach((t) => {
|
|
419
422
|
r[t] = {
|
|
@@ -421,8 +424,8 @@ var m = {
|
|
|
421
424
|
label: e.translations?.options?.[e.optionKey]?.enum?.[t] ?? e.controlInfo?.values[t].label
|
|
422
425
|
};
|
|
423
426
|
});
|
|
424
|
-
let i = e.translations?.options?.[e.optionKey]?.tooltip ?? e.controlInfo?.tooltip, a =
|
|
425
|
-
return
|
|
427
|
+
let i = e.translations?.options?.[e.optionKey]?.tooltip ?? e.controlInfo?.tooltip, a = T(e, e.optionKey), o = C(e), { extraLabel: s, extraLabelTooltip: c, extraLabelHasClickAction: u, extraLabelClickAction: d } = w(e), f = E(e);
|
|
428
|
+
return l`
|
|
426
429
|
<luzmo-item-option-action-button-group
|
|
427
430
|
.label=${t}
|
|
428
431
|
?hide-label=${e.controlInfo?.hideLabel}
|
|
@@ -433,7 +436,7 @@ var m = {
|
|
|
433
436
|
.size=${n}
|
|
434
437
|
.tooltip=${i}
|
|
435
438
|
.extraLabel=${s}
|
|
436
|
-
.extraLabelTooltip=${
|
|
439
|
+
.extraLabelTooltip=${c}
|
|
437
440
|
.extraLabelHasClickAction=${u}
|
|
438
441
|
@luzmo-extra-label-click=${d}
|
|
439
442
|
@luzmo-option-changed=${f}
|
|
@@ -441,16 +444,16 @@ var m = {
|
|
|
441
444
|
.toValue=${e.controlInfo?.toValue}
|
|
442
445
|
></luzmo-item-option-action-button-group>
|
|
443
446
|
`;
|
|
444
|
-
},
|
|
447
|
+
}, O = (e) => {
|
|
445
448
|
let t;
|
|
446
449
|
return typeof e?.controlInfo?.enum == "function" ? t = e.controlInfo.enum({
|
|
447
450
|
options: e.options,
|
|
448
451
|
slots: e.slots,
|
|
449
452
|
theme: e.theme
|
|
450
453
|
}) : e.controlInfo?.enum !== void 0 && e.controlInfo?.enum !== null && (t = e.controlInfo.enum), t;
|
|
451
|
-
},
|
|
452
|
-
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label ?? e.optionKey ?? "", n =
|
|
453
|
-
return
|
|
454
|
+
}, k = (e) => {
|
|
455
|
+
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label ?? e.optionKey ?? "", n = T(e, e.optionKey), r = O(e), i = e.size, a = e.translations?.options?.[e.optionKey]?.tooltip ?? e.controlInfo?.tooltip, o = C(e), { extraLabel: s, extraLabelTooltip: c, extraLabelHasClickAction: u, extraLabelClickAction: d } = w(e), f = E(e);
|
|
456
|
+
return l`
|
|
454
457
|
<luzmo-item-option-color-palette-picker
|
|
455
458
|
.value=${n ?? o}
|
|
456
459
|
.values=${r}
|
|
@@ -459,7 +462,7 @@ var m = {
|
|
|
459
462
|
.size=${i}
|
|
460
463
|
.tooltip=${a}
|
|
461
464
|
.extraLabel=${s}
|
|
462
|
-
.extraLabelTooltip=${
|
|
465
|
+
.extraLabelTooltip=${c}
|
|
463
466
|
.extraLabelHasClickAction=${u}
|
|
464
467
|
@luzmo-extra-label-click=${() => {
|
|
465
468
|
if (typeof d == "function") {
|
|
@@ -472,9 +475,9 @@ var m = {
|
|
|
472
475
|
.toValue=${e.controlInfo?.toValue}
|
|
473
476
|
></luzmo-item-option-color-palette-picker>
|
|
474
477
|
`;
|
|
475
|
-
},
|
|
476
|
-
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label ?? e.optionKey ?? "", n =
|
|
477
|
-
return
|
|
478
|
+
}, A = (e) => {
|
|
479
|
+
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label ?? e.optionKey ?? "", n = T(e, e.optionKey), r = e.size, i = e.translations?.options?.[e.optionKey]?.tooltip ?? e.controlInfo?.tooltip, a = C(e), { extraLabel: o, extraLabelTooltip: s, extraLabelHasClickAction: c, extraLabelClickAction: u } = w(e), d = E(e);
|
|
480
|
+
return l`
|
|
478
481
|
<luzmo-item-option-color-picker
|
|
479
482
|
.value=${n ?? a}
|
|
480
483
|
.label=${t}
|
|
@@ -483,7 +486,7 @@ var m = {
|
|
|
483
486
|
.tooltip=${i}
|
|
484
487
|
.extraLabel=${o}
|
|
485
488
|
.extraLabelTooltip=${s}
|
|
486
|
-
.extraLabelHasClickAction=${
|
|
489
|
+
.extraLabelHasClickAction=${c}
|
|
487
490
|
@luzmo-extra-label-click=${() => {
|
|
488
491
|
if (typeof u == "function") {
|
|
489
492
|
let { options: t } = u();
|
|
@@ -491,13 +494,17 @@ var m = {
|
|
|
491
494
|
}
|
|
492
495
|
}}
|
|
493
496
|
@luzmo-option-changed=${d}
|
|
497
|
+
?live-interactions=${e.liveInteractions ?? !1}
|
|
498
|
+
@luzmo-option-interaction-start=${e.interactionCallback}
|
|
499
|
+
@luzmo-option-interaction-end=${e.interactionCallback}
|
|
500
|
+
@luzmo-option-interaction-cancel=${e.interactionCallback}
|
|
494
501
|
.parseValue=${e.controlInfo?.parseValue}
|
|
495
502
|
.toValue=${e.controlInfo?.toValue}
|
|
496
503
|
></luzmo-item-option-color-picker>
|
|
497
504
|
`;
|
|
498
|
-
},
|
|
499
|
-
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label ?? e.optionKey ?? "", n =
|
|
500
|
-
return
|
|
505
|
+
}, j = (e) => {
|
|
506
|
+
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label ?? e.optionKey ?? "", n = T(e, e.optionKey), r = e.size, i = e.translations?.options?.[e.optionKey]?.tooltip ?? e.controlInfo?.tooltip, a = C(e), o = typeof e?.controlInfo?.percentage == "function" ? e.controlInfo.percentage(e) : e.controlInfo.percentage, s = typeof e?.controlInfo?.reverse == "function" ? e.controlInfo.reverse(e) : e.controlInfo.reverse, c = typeof e?.controlInfo?.noAlphaChannel == "function" ? e.controlInfo.noAlphaChannel(e) : e.controlInfo.noAlphaChannel, u = typeof e?.controlInfo?.editRangeSize == "function" ? e.controlInfo.editRangeSize(e) : e.controlInfo.editRangeSize, d = typeof e?.controlInfo?.minimumRangeSize == "function" ? e.controlInfo.minimumRangeSize(e) : e.controlInfo.minimumRangeSize, f = typeof e?.controlInfo?.negativeInfinityValue == "function" ? e.controlInfo.negativeInfinityValue(e) : e.controlInfo.negativeInfinityValue, p = typeof e?.controlInfo?.noValues == "function" ? e.controlInfo.noValues(e) : e.controlInfo.noValues, m = typeof e?.controlInfo?.readOnlyColorPicker == "function" ? e.controlInfo.readOnlyColorPicker(e) : e.controlInfo.readOnlyColorPicker, { extraLabel: h, extraLabelTooltip: g, extraLabelHasClickAction: _, extraLabelClickAction: v } = w(e), y = E(e);
|
|
507
|
+
return l`
|
|
501
508
|
<luzmo-item-option-color-range
|
|
502
509
|
.value=${n ?? a}
|
|
503
510
|
.label=${t}
|
|
@@ -510,7 +517,7 @@ var m = {
|
|
|
510
517
|
.debounce=${e.controlInfo?.debounce}
|
|
511
518
|
?reverse=${s}
|
|
512
519
|
?percentage=${o}
|
|
513
|
-
?no-alpha-channel=${
|
|
520
|
+
?no-alpha-channel=${c}
|
|
514
521
|
?edit-range-size=${u}
|
|
515
522
|
?no-values=${p}
|
|
516
523
|
?read-only-color-picker=${m}
|
|
@@ -523,19 +530,23 @@ var m = {
|
|
|
523
530
|
}
|
|
524
531
|
}}
|
|
525
532
|
@luzmo-option-changed=${y}
|
|
533
|
+
?live-interactions=${e.liveInteractions ?? !1}
|
|
534
|
+
@luzmo-option-interaction-start=${e.interactionCallback}
|
|
535
|
+
@luzmo-option-interaction-end=${e.interactionCallback}
|
|
536
|
+
@luzmo-option-interaction-cancel=${e.interactionCallback}
|
|
526
537
|
.parseValue=${e.controlInfo?.parseValue}
|
|
527
538
|
.toValue=${e.controlInfo?.toValue}
|
|
528
539
|
></luzmo-item-option-color-range>
|
|
529
540
|
`;
|
|
530
|
-
},
|
|
531
|
-
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label ?? e.optionKey, n =
|
|
532
|
-
return
|
|
541
|
+
}, M = (e) => {
|
|
542
|
+
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label ?? e.optionKey, n = T(e, e.optionKey), r = C(e), i = O(e), a = Array.isArray(i) ? i : [], o = e.translations?.options?.[e.optionKey]?.enum ?? {}, u = e.theme?.editDarkOrLight === "dark-edit" ? s : c, { extraLabel: d, extraLabelTooltip: f, extraLabelHasClickAction: p, extraLabelClickAction: m } = w(e), h = E(e);
|
|
543
|
+
return l`
|
|
533
544
|
<luzmo-item-option-guidelines
|
|
534
545
|
hide-label
|
|
535
546
|
.label=${t}
|
|
536
547
|
.value=${n ?? r}
|
|
537
548
|
.lineTypes=${a}
|
|
538
|
-
.lineTypeLabels=${
|
|
549
|
+
.lineTypeLabels=${o}
|
|
539
550
|
.defaultColor=${u}
|
|
540
551
|
.size=${e.size}
|
|
541
552
|
.language=${e.language}
|
|
@@ -548,31 +559,35 @@ var m = {
|
|
|
548
559
|
if (t && typeof t == "object" && "options" in t) return e.changeCallback(t.options);
|
|
549
560
|
}}
|
|
550
561
|
@luzmo-option-changed=${h}
|
|
562
|
+
?live-interactions=${e.liveInteractions ?? !1}
|
|
563
|
+
@luzmo-option-interaction-start=${e.interactionCallback}
|
|
564
|
+
@luzmo-option-interaction-end=${e.interactionCallback}
|
|
565
|
+
@luzmo-option-interaction-cancel=${e.interactionCallback}
|
|
551
566
|
></luzmo-item-option-guidelines>
|
|
552
567
|
`;
|
|
553
|
-
},
|
|
554
|
-
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label ?? e.optionKey ?? "", n =
|
|
555
|
-
return
|
|
568
|
+
}, N = (e) => {
|
|
569
|
+
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label ?? e.optionKey ?? "", n = T(e, e.optionKey) ?? {}, r = e.translations?.options?.[e.optionKey]?.tooltip ?? e.controlInfo?.tooltip, i = e.language ?? "en", a = { [i]: e.translations?.options?.[e.optionKey]?.placeholder ?? e.controlInfo?.placeholder ?? "" }, o = e.size, s = C(e), { extraLabel: c, extraLabelTooltip: u, extraLabelHasClickAction: d, extraLabelClickAction: f } = w(e), m = E(e);
|
|
570
|
+
return l`
|
|
556
571
|
<luzmo-item-option-multi-language-field
|
|
557
572
|
.label=${t}
|
|
558
573
|
?hide-label=${e.controlInfo?.hideLabel}
|
|
559
574
|
.placeholder=${a}
|
|
560
575
|
.value=${n ?? s}
|
|
561
|
-
language=${
|
|
576
|
+
language=${p(i)}
|
|
562
577
|
.size=${o}
|
|
563
578
|
.tooltip=${r}
|
|
564
|
-
.extraLabel=${
|
|
579
|
+
.extraLabel=${c}
|
|
565
580
|
.extraLabelTooltip=${u}
|
|
566
581
|
.extraLabelHasClickAction=${d}
|
|
567
|
-
@luzmo-extra-label-click=${
|
|
582
|
+
@luzmo-extra-label-click=${f}
|
|
568
583
|
@luzmo-option-changed=${m}
|
|
569
584
|
.parseValue=${e.controlInfo?.parseValue}
|
|
570
585
|
.toValue=${e.controlInfo?.toValue}
|
|
571
586
|
></luzmo-item-option-multi-language-field>
|
|
572
587
|
`;
|
|
573
|
-
},
|
|
574
|
-
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label ?? e.optionKey ?? "", n = e.controlInfo?.min, r = e.controlInfo?.max, i = e.controlInfo?.step, a =
|
|
575
|
-
return
|
|
588
|
+
}, P = (e) => {
|
|
589
|
+
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label ?? e.optionKey ?? "", n = e.controlInfo?.min, r = e.controlInfo?.max, i = e.controlInfo?.step, a = T(e, e.optionKey), o = e.translations?.options?.[e.optionKey]?.tooltip ?? e.controlInfo?.tooltip, s = C(e), c = e.size, { extraLabel: u, extraLabelTooltip: d, extraLabelHasClickAction: f, extraLabelClickAction: p } = w(e), m = E(e);
|
|
590
|
+
return l`
|
|
576
591
|
<luzmo-item-option-number-field
|
|
577
592
|
.value=${a}
|
|
578
593
|
.default=${s}
|
|
@@ -581,7 +596,7 @@ var m = {
|
|
|
581
596
|
.step=${i}
|
|
582
597
|
.label=${t}
|
|
583
598
|
?hide-label=${e.controlInfo?.hideLabel}
|
|
584
|
-
.size=${
|
|
599
|
+
.size=${c}
|
|
585
600
|
.tooltip=${o}
|
|
586
601
|
.placeholder=${e.controlInfo?.placeholder}
|
|
587
602
|
.minWidthInputField=${e.controlInfo?.minWidthInputField}
|
|
@@ -595,7 +610,7 @@ var m = {
|
|
|
595
610
|
.toValue=${e.controlInfo?.toValue}
|
|
596
611
|
></luzmo-item-option-number-field>
|
|
597
612
|
`;
|
|
598
|
-
},
|
|
613
|
+
}, F = (e, t) => {
|
|
599
614
|
let n = {};
|
|
600
615
|
if (Array.isArray(e)) {
|
|
601
616
|
for (let r of e) typeof r == "string" && (n[r] = t?.[r] ?? r);
|
|
@@ -606,9 +621,9 @@ var m = {
|
|
|
606
621
|
n[r] = e ?? a ?? r;
|
|
607
622
|
}
|
|
608
623
|
return n;
|
|
609
|
-
},
|
|
610
|
-
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label ?? e.optionKey ?? "", n =
|
|
611
|
-
return
|
|
624
|
+
}, I = (e) => {
|
|
625
|
+
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label ?? e.optionKey ?? "", n = T(e, e.optionKey), r = e.translations?.options?.[e.optionKey]?.tooltip ?? e.controlInfo?.tooltip, i = e.translations?.options?.[e.optionKey]?.enum, a = F(e.controlInfo?.enum, i), o = e.size, s = C(e), { extraLabel: c, extraLabelTooltip: u, extraLabelHasClickAction: d, extraLabelClickAction: f } = w(e), p = E(e);
|
|
626
|
+
return l`
|
|
612
627
|
<luzmo-item-option-picker
|
|
613
628
|
.value=${n}
|
|
614
629
|
.default=${s}
|
|
@@ -617,7 +632,7 @@ var m = {
|
|
|
617
632
|
?hide-label=${e.controlInfo?.hideLabel}
|
|
618
633
|
.tooltip=${r}
|
|
619
634
|
.size=${o}
|
|
620
|
-
.extraLabel=${
|
|
635
|
+
.extraLabel=${c}
|
|
621
636
|
.extraLabelTooltip=${u}
|
|
622
637
|
.extraLabelHasClickAction=${d}
|
|
623
638
|
@luzmo-extra-label-click=${f}
|
|
@@ -626,9 +641,9 @@ var m = {
|
|
|
626
641
|
.toValue=${e.controlInfo?.toValue}
|
|
627
642
|
></luzmo-item-option-picker>
|
|
628
643
|
`;
|
|
629
|
-
},
|
|
630
|
-
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label, n = e.controlInfo?.enum ?? e.controlInfo?.positions, r = e.size, i =
|
|
631
|
-
return
|
|
644
|
+
}, L = (e) => {
|
|
645
|
+
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label, n = e.controlInfo?.enum ?? e.controlInfo?.positions, r = e.size, i = T(e, e.optionKey), a = e.translations?.options?.[e.optionKey]?.tooltip ?? e.controlInfo?.tooltip, o = C(e) ?? "topRight", { extraLabel: s, extraLabelTooltip: c, extraLabelHasClickAction: u, extraLabelClickAction: d } = w(e), f = E(e);
|
|
646
|
+
return l`
|
|
632
647
|
<luzmo-item-option-position-picker
|
|
633
648
|
.value=${i}
|
|
634
649
|
.positions=${n}
|
|
@@ -638,16 +653,16 @@ var m = {
|
|
|
638
653
|
.tooltip=${a}
|
|
639
654
|
.size=${r}
|
|
640
655
|
.extraLabel=${s}
|
|
641
|
-
.extraLabelTooltip=${
|
|
656
|
+
.extraLabelTooltip=${c}
|
|
642
657
|
.extraLabelHasClickAction=${u}
|
|
643
658
|
@luzmo-extra-label-click=${d}
|
|
644
659
|
@luzmo-option-changed=${f}
|
|
645
660
|
.readonly=${e.controlInfo?.readonly}
|
|
646
661
|
></luzmo-item-option-position-picker>
|
|
647
662
|
`;
|
|
648
|
-
},
|
|
649
|
-
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label, n =
|
|
650
|
-
return
|
|
663
|
+
}, R = (e) => {
|
|
664
|
+
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label, n = T(e, e.optionKey), r = e.size, i = e.translations?.options?.[e.optionKey]?.tooltip ?? e.controlInfo?.tooltip, a = C(e), { extraLabel: o, extraLabelTooltip: s, extraLabelHasClickAction: c, extraLabelClickAction: u } = w(e), d = E(e);
|
|
665
|
+
return l`
|
|
651
666
|
<luzmo-item-option-positions-number-field
|
|
652
667
|
.values=${n ?? a}
|
|
653
668
|
.positions=${e.controlInfo?.positions}
|
|
@@ -658,16 +673,16 @@ var m = {
|
|
|
658
673
|
.tooltip=${i}
|
|
659
674
|
.extraLabel=${o}
|
|
660
675
|
.extraLabelTooltip=${s}
|
|
661
|
-
.extraLabelHasClickAction=${
|
|
676
|
+
.extraLabelHasClickAction=${c}
|
|
662
677
|
@luzmo-extra-label-click=${u}
|
|
663
678
|
@luzmo-option-changed=${d}
|
|
664
679
|
.parseValue=${e.controlInfo?.parseValue}
|
|
665
680
|
.toValue=${e.controlInfo?.toValue}
|
|
666
681
|
></luzmo-item-option-positions-number-field>
|
|
667
682
|
`;
|
|
668
|
-
},
|
|
669
|
-
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label ?? e.optionKey ?? "", n =
|
|
670
|
-
return
|
|
683
|
+
}, z = (e) => {
|
|
684
|
+
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label ?? e.optionKey ?? "", n = T(e, e.optionKey), r = C(e), i = e.translations?.options?.[e.optionKey]?.enum, a = F(e.controlInfo?.enum, i), o = e.size, s = e.translations?.options?.[e.optionKey]?.tooltip ?? e.controlInfo?.tooltip, { extraLabel: c, extraLabelTooltip: u, extraLabelHasClickAction: d, extraLabelClickAction: f } = w(e), p = E(e);
|
|
685
|
+
return l`
|
|
671
686
|
<luzmo-item-option-radio-button-group
|
|
672
687
|
.value=${n ?? r}
|
|
673
688
|
.values=${a}
|
|
@@ -675,7 +690,7 @@ var m = {
|
|
|
675
690
|
?hide-label=${e.controlInfo?.hideLabel}
|
|
676
691
|
.size=${o}
|
|
677
692
|
.tooltip=${s}
|
|
678
|
-
.extraLabel=${
|
|
693
|
+
.extraLabel=${c}
|
|
679
694
|
.extraLabelTooltip=${u}
|
|
680
695
|
.extraLabelHasClickAction=${d}
|
|
681
696
|
@luzmo-extra-label-click=${f}
|
|
@@ -684,12 +699,12 @@ var m = {
|
|
|
684
699
|
.toValue=${e.controlInfo?.toValue}
|
|
685
700
|
></luzmo-item-option-radio-button-group>
|
|
686
701
|
`;
|
|
687
|
-
},
|
|
688
|
-
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label ?? e.optionKey ?? "", n = e.translations?.options?.[e.optionKey]?.tooltip ?? e.controlInfo?.tooltip, r = e.controlInfo?.min, i = e.controlInfo?.max, a = e.controlInfo?.step, o =
|
|
689
|
-
return
|
|
702
|
+
}, B = (e) => {
|
|
703
|
+
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label ?? e.optionKey ?? "", n = e.translations?.options?.[e.optionKey]?.tooltip ?? e.controlInfo?.tooltip, r = e.controlInfo?.min, i = e.controlInfo?.max, a = e.controlInfo?.step, o = T(e, e.optionKey), s = e.size, c = C(e), { extraLabel: u, extraLabelTooltip: d, extraLabelHasClickAction: f, extraLabelClickAction: p } = w(e), m = E(e);
|
|
704
|
+
return l`
|
|
690
705
|
<luzmo-item-option-slider
|
|
691
706
|
.value=${o}
|
|
692
|
-
.default=${
|
|
707
|
+
.default=${c}
|
|
693
708
|
.min=${r}
|
|
694
709
|
.max=${i}
|
|
695
710
|
.step=${a}
|
|
@@ -707,13 +722,17 @@ var m = {
|
|
|
707
722
|
}
|
|
708
723
|
}}
|
|
709
724
|
@luzmo-option-changed=${m}
|
|
725
|
+
?live-interactions=${e.liveInteractions ?? !1}
|
|
726
|
+
@luzmo-option-interaction-start=${e.interactionCallback}
|
|
727
|
+
@luzmo-option-interaction-end=${e.interactionCallback}
|
|
728
|
+
@luzmo-option-interaction-cancel=${e.interactionCallback}
|
|
710
729
|
.parseValue=${e.controlInfo?.parseValue}
|
|
711
730
|
.toValue=${e.controlInfo?.toValue}
|
|
712
731
|
></luzmo-item-option-slider>
|
|
713
732
|
`;
|
|
714
|
-
},
|
|
715
|
-
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label ?? e.optionKey ?? "", n =
|
|
716
|
-
return
|
|
733
|
+
}, V = (e) => {
|
|
734
|
+
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label ?? e.optionKey ?? "", n = T(e, e.optionKey), r = e.size, i = e.translations?.options?.[e.optionKey]?.tooltip ?? e.controlInfo?.tooltip, a = C(e), { extraLabel: o, extraLabelTooltip: s, extraLabelHasClickAction: c, extraLabelClickAction: u } = w(e), d = E(e);
|
|
735
|
+
return l`
|
|
717
736
|
<luzmo-item-option-switch
|
|
718
737
|
.value=${n ?? a ?? !1}
|
|
719
738
|
.label=${t}
|
|
@@ -722,16 +741,16 @@ var m = {
|
|
|
722
741
|
.tooltip=${i}
|
|
723
742
|
.extraLabel=${o}
|
|
724
743
|
.extraLabelTooltip=${s}
|
|
725
|
-
.extraLabelHasClickAction=${
|
|
744
|
+
.extraLabelHasClickAction=${c}
|
|
726
745
|
@luzmo-extra-label-click=${u}
|
|
727
746
|
@luzmo-option-changed=${d}
|
|
728
747
|
.parseValue=${e.controlInfo?.parseValue}
|
|
729
748
|
.toValue=${e.controlInfo?.toValue}
|
|
730
749
|
></luzmo-item-option-switch>
|
|
731
750
|
`;
|
|
732
|
-
},
|
|
733
|
-
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label ?? e.optionKey ?? "", n = e.language ?? "en", r = { [n]: e.translations?.options?.[e.optionKey]?.placeholder ?? e.controlInfo?.placeholder ?? "" }, i =
|
|
734
|
-
return
|
|
751
|
+
}, H = (e) => {
|
|
752
|
+
let t = e.translations?.options?.[e.optionKey]?.label ?? e.controlInfo?.label ?? e.optionKey ?? "", n = e.language ?? "en", r = { [n]: e.translations?.options?.[e.optionKey]?.placeholder ?? e.controlInfo?.placeholder ?? "" }, i = T(e, e.optionKey) ?? "", a = e.size, o = e.translations?.options?.[e.optionKey]?.tooltip ?? e.controlInfo?.tooltip, s = C(e), { extraLabel: c, extraLabelTooltip: u, extraLabelHasClickAction: d, extraLabelClickAction: f } = w(e), p = E(e);
|
|
753
|
+
return l`
|
|
735
754
|
<luzmo-item-option-text-field
|
|
736
755
|
.label=${t}
|
|
737
756
|
?hide-label=${e.controlInfo?.hideLabel}
|
|
@@ -739,7 +758,7 @@ var m = {
|
|
|
739
758
|
.value=${i ?? s}
|
|
740
759
|
.size=${a}
|
|
741
760
|
.tooltip=${o}
|
|
742
|
-
.extraLabel=${
|
|
761
|
+
.extraLabel=${c}
|
|
743
762
|
.extraLabelTooltip=${u}
|
|
744
763
|
.extraLabelHasClickAction=${d}
|
|
745
764
|
@luzmo-extra-label-click=${f}
|
|
@@ -748,33 +767,33 @@ var m = {
|
|
|
748
767
|
.toValue=${e.controlInfo?.toValue}
|
|
749
768
|
></luzmo-item-option-text-field>
|
|
750
769
|
`;
|
|
751
|
-
},
|
|
770
|
+
}, U = (e) => {
|
|
752
771
|
switch (e.controlType) {
|
|
753
|
-
case "picker": return
|
|
754
|
-
case "slider": return
|
|
755
|
-
case "switch": return
|
|
756
|
-
case "multi-language-field": return
|
|
757
|
-
case "text-field": return
|
|
758
|
-
case "number-field": return
|
|
759
|
-
case "color-range": return
|
|
760
|
-
case "guidelines": return
|
|
761
|
-
case "color-palette-picker": return
|
|
762
|
-
case "position-picker": return
|
|
763
|
-
case "positions-number-field": return
|
|
764
|
-
case "radio-button-group": return
|
|
765
|
-
case "color-picker": return
|
|
766
|
-
case "action-button-group": return
|
|
772
|
+
case "picker": return I(e);
|
|
773
|
+
case "slider": return B(e);
|
|
774
|
+
case "switch": return V(e);
|
|
775
|
+
case "multi-language-field": return N(e);
|
|
776
|
+
case "text-field": return H(e);
|
|
777
|
+
case "number-field": return P(e);
|
|
778
|
+
case "color-range": return j(e);
|
|
779
|
+
case "guidelines": return M(e);
|
|
780
|
+
case "color-palette-picker": return k(e);
|
|
781
|
+
case "position-picker": return L(e);
|
|
782
|
+
case "positions-number-field": return R(e);
|
|
783
|
+
case "radio-button-group": return z(e);
|
|
784
|
+
case "color-picker": return A(e);
|
|
785
|
+
case "action-button-group": return D(e);
|
|
767
786
|
}
|
|
768
|
-
},
|
|
787
|
+
}, W, G = 5, K = class extends e {
|
|
769
788
|
constructor(...e) {
|
|
770
|
-
super(...e), this._loadItemConfig = new
|
|
771
|
-
task: async ([e, t,
|
|
789
|
+
super(...e), this._loadItemConfig = new m(this, {
|
|
790
|
+
task: async ([e, t, r, o, s, c, l, u, d]) => {
|
|
772
791
|
if (l || u || d) {
|
|
773
792
|
let e = {};
|
|
774
793
|
l && (e.apiUrl = l), u && (e.authKey = u), d && (e.authToken = d), n.configure(e);
|
|
775
794
|
}
|
|
776
795
|
if (c && c.type !== "custom") try {
|
|
777
|
-
if (c?.id &&
|
|
796
|
+
if (c?.id && i.includes(c.id)) this._fullTheme = await a(c.id);
|
|
778
797
|
else if (c?.id) {
|
|
779
798
|
let e = await n.fetchTheme(c.id);
|
|
780
799
|
this._fullTheme = e?.theme ?? {};
|
|
@@ -792,15 +811,15 @@ var m = {
|
|
|
792
811
|
let e = p ?? f?.[t ?? ""], n = this._mergeOptionTranslations(void 0, e);
|
|
793
812
|
this._effectiveTranslations = n ? { options: { [t ?? ""]: n } } : {};
|
|
794
813
|
} else if (e) {
|
|
795
|
-
let n = e !== this._itemTypeLoaded,
|
|
796
|
-
if (n && (this._optionsConfig = await
|
|
797
|
-
let t =
|
|
798
|
-
this._translations = await
|
|
814
|
+
let n = e !== this._itemTypeLoaded, i = e !== this._itemTypeLoaded || r !== this._languageLoaded;
|
|
815
|
+
if (n && (this._optionsConfig = await y(e) ?? [], this._itemTypeLoaded = e), i) {
|
|
816
|
+
let t = r ?? "en";
|
|
817
|
+
this._translations = await b(e, t, !0) ?? {}, this._languageLoaded = r;
|
|
799
818
|
}
|
|
800
|
-
let
|
|
819
|
+
let a = this._translations.options?.[t ?? ""], o = p ?? f?.[t ?? ""], s = this._mergeOptionTranslations(a, o);
|
|
801
820
|
this._effectiveTranslations = s ? { options: { [t ?? ""]: s } } : {};
|
|
802
821
|
} else this._optionsConfig = [], this._translations = {}, this._effectiveTranslations = {};
|
|
803
|
-
let m =
|
|
822
|
+
let m = x(t ?? "", this._optionsConfig), h = m?.type;
|
|
804
823
|
if (h !== this._controlTypeLoaded) {
|
|
805
824
|
let e = /* #__PURE__ */ Object.assign({
|
|
806
825
|
"../item-option-action-button-group/index.ts": () => import("./item-option-action-button-group/index.js"),
|
|
@@ -837,35 +856,58 @@ var m = {
|
|
|
837
856
|
this.apiUrl,
|
|
838
857
|
this.authKey,
|
|
839
858
|
this.authToken
|
|
840
|
-
]
|
|
841
|
-
|
|
859
|
+
],
|
|
860
|
+
argsEqual: (e, t) => e.length === t.length && e.every((e, n) => e === t[n] || n === G && r(e, t[n]))
|
|
861
|
+
}), this.language = "en", this.options = {}, this.slots = [], this.size = "m", this.liveInteractions = !1, this._optionsConfig = [], this._translations = {}, this._effectiveTranslations = {}, this._getLatestOptions = () => this.latestOptions?.() ?? this.options ?? {}, this.changedOptions = (e, t) => {
|
|
842
862
|
this.options = e, this.dispatchEvent(new CustomEvent("luzmo-options-changed", {
|
|
843
863
|
bubbles: !0,
|
|
844
864
|
composed: !0,
|
|
845
865
|
cancelable: !0,
|
|
846
|
-
detail:
|
|
866
|
+
detail: t ? {
|
|
867
|
+
options: e,
|
|
868
|
+
interaction: t
|
|
869
|
+
} : { options: e }
|
|
870
|
+
}));
|
|
871
|
+
}, this._interactionOptionKeys = /* @__PURE__ */ new Map(), this._handleInteraction = (e) => {
|
|
872
|
+
let { id: t } = e.detail, n = this._interactionOptionKeys.get(t) ?? this._renderedOptionKey;
|
|
873
|
+
e.stopPropagation(), e.type === "luzmo-option-interaction-start" ? this._interactionOptionKeys.set(t, n) : this._interactionOptionKeys.delete(t), this.dispatchEvent(new CustomEvent(e.type, {
|
|
874
|
+
bubbles: !0,
|
|
875
|
+
composed: !0,
|
|
876
|
+
detail: {
|
|
877
|
+
...e.detail,
|
|
878
|
+
optionKey: n
|
|
879
|
+
}
|
|
847
880
|
}));
|
|
848
881
|
};
|
|
849
882
|
}
|
|
883
|
+
endInteraction() {
|
|
884
|
+
for (let e of this.renderRoot?.children ?? []) e.endInteraction?.();
|
|
885
|
+
}
|
|
886
|
+
get _renderedOptionKey() {
|
|
887
|
+
return this.customOptionConfiguration?.key ?? this.optionKey ?? "";
|
|
888
|
+
}
|
|
850
889
|
render() {
|
|
851
890
|
return this._loadItemConfig.render({
|
|
852
|
-
pending: () =>
|
|
891
|
+
pending: () => l`
|
|
853
892
|
<p role="status">Loading...</p>
|
|
854
893
|
`,
|
|
855
|
-
complete: (e) =>
|
|
894
|
+
complete: (e) => U({
|
|
856
895
|
controlType: e?.type,
|
|
857
|
-
optionKey: this.
|
|
896
|
+
optionKey: this._renderedOptionKey,
|
|
858
897
|
controlInfo: e,
|
|
859
898
|
options: this.options,
|
|
899
|
+
getOptions: this._getLatestOptions,
|
|
860
900
|
slots: this.slots,
|
|
861
901
|
theme: this._fullTheme ?? this.theme,
|
|
862
902
|
language: this.language,
|
|
863
903
|
translations: this._effectiveTranslations,
|
|
864
904
|
size: this.size,
|
|
865
|
-
changeCallback: this.changedOptions
|
|
905
|
+
changeCallback: this.changedOptions,
|
|
906
|
+
liveInteractions: this.liveInteractions,
|
|
907
|
+
interactionCallback: this._handleInteraction
|
|
866
908
|
}),
|
|
867
|
-
error: (e) => (console.error(e),
|
|
868
|
-
<span class="sr-only" role="alert">${
|
|
909
|
+
error: (e) => (console.error(e), l`
|
|
910
|
+
<span class="sr-only" role="alert">${f("Failed to load option", { desc: "Error message when item option fails to load" })}</span>
|
|
869
911
|
`)
|
|
870
912
|
});
|
|
871
913
|
}
|
|
@@ -921,37 +963,41 @@ var m = {
|
|
|
921
963
|
}
|
|
922
964
|
};
|
|
923
965
|
// src/components/item-option/index.ts
|
|
924
|
-
|
|
966
|
+
W = K, W.styles = u(S), t([d({
|
|
925
967
|
type: String,
|
|
926
968
|
reflect: !0
|
|
927
|
-
})],
|
|
969
|
+
})], K.prototype, "language", void 0), t([d({
|
|
928
970
|
type: String,
|
|
929
971
|
reflect: !0,
|
|
930
972
|
attribute: "item-type"
|
|
931
|
-
})],
|
|
973
|
+
})], K.prototype, "itemType", void 0), t([d({
|
|
932
974
|
type: String,
|
|
933
975
|
reflect: !0,
|
|
934
976
|
attribute: "option-key"
|
|
935
|
-
})],
|
|
977
|
+
})], K.prototype, "optionKey", void 0), t([d({
|
|
936
978
|
type: Object,
|
|
937
979
|
reflect: !1
|
|
938
|
-
})],
|
|
980
|
+
})], K.prototype, "customOptionConfiguration", void 0), t([d({
|
|
939
981
|
type: Object,
|
|
940
982
|
reflect: !1
|
|
941
|
-
})],
|
|
983
|
+
})], K.prototype, "customTranslations", void 0), t([d({ type: Object })], K.prototype, "options", void 0), t([d({ type: Object })], K.prototype, "slots", void 0), t([d({ type: Object })], K.prototype, "theme", void 0), t([d({
|
|
942
984
|
type: String,
|
|
943
985
|
attribute: "api-url",
|
|
944
986
|
reflect: !0
|
|
945
|
-
})],
|
|
987
|
+
})], K.prototype, "apiUrl", void 0), t([d({
|
|
946
988
|
type: String,
|
|
947
989
|
attribute: "auth-key",
|
|
948
990
|
reflect: !0
|
|
949
|
-
})],
|
|
991
|
+
})], K.prototype, "authKey", void 0), t([d({
|
|
950
992
|
type: String,
|
|
951
993
|
attribute: "auth-token",
|
|
952
994
|
reflect: !0
|
|
953
|
-
})],
|
|
995
|
+
})], K.prototype, "authToken", void 0), t([d({
|
|
954
996
|
type: String,
|
|
955
997
|
reflect: !0
|
|
956
|
-
})],
|
|
957
|
-
|
|
998
|
+
})], K.prototype, "size", void 0), t([d({
|
|
999
|
+
type: Boolean,
|
|
1000
|
+
reflect: !0,
|
|
1001
|
+
attribute: "live-interactions"
|
|
1002
|
+
})], K.prototype, "liveInteractions", void 0), customElements.get("luzmo-item-option") || customElements.define("luzmo-item-option", K);
|
|
1003
|
+
export { b as i, x as n, y as r, K as t };
|