@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
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
|
|
2
|
+
import{i as e,r as t}from"./version-BW4Ixl63.js";import{p as n}from"./chart-helpers-DsIGsaDc.js";import{n as r}from"./data-broker-DXDyIrj_.js";import{n as i}from"./is-same-option-value-Di-A7Wmg.js";import{n as a,t as o}from"./themes-C2pxFlIq.js";import{t as s}from"./task-BlhDPTQS.js";import{b as c}from"./item-slot-picker-panel-D4BMxGs9.js";import{html as l,ifDefined as u,property as d,unsafeCSS as f}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/lit.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/divider.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/accordion.js";var p={"area-chart":()=>import(`./area-chart-options.config-BMvUma_d.js`),"bar-chart":()=>import(`./bar-chart-options.config-BpHqXBFq.js`),"box-plot":()=>import(`./box-plot-options.config-DDWb_KmV.js`),"bubble-chart":()=>import(`./bubble-chart-options.config-BKPTymfC.js`),"bullet-chart":()=>import(`./bullet-chart-options.config-BhYe0N0o.js`),"choropleth-map":()=>import(`./choropleth-map-options.config-rUJsEJcm.js`),"circle-pack-chart":()=>import(`./circle-pack-chart-options.config-CjDkh4DG.js`),"circular-gauge":()=>import(`./circular-gauge-options.config-p2zb-ORR.js`),"column-chart":()=>import(`./column-chart-options.config-YIe6cMV5.js`),"combination-chart":()=>import(`./combination-chart-options.config-Bf7cNmpc.js`),"conditional-number":()=>import(`./conditional-number-options.config-hdARPTD7.js`),"date-comparison-filter":()=>import(`./date-comparison-filter-options.config-a_qCDcWA.js`),"date-filter":()=>import(`./date-filter-options.config-DHTbxiWn.js`),"donut-chart":()=>import(`./donut-chart-options.config-DWpePR5V.js`),"dropdown-filter":()=>import(`./dropdown-filter-options.config-zwR7hmkX.js`),"evolution-number":()=>import(`./evolution-number-options.config-Brbyq_TD.js`),"funnel-chart":()=>import(`./funnel-chart-options.config-S1yxc6IG.js`),"heat-map":()=>import(`./heat-map-options.config-D93AeYFi.js`),"heat-table":()=>import(`./heat-table-options.config-ZVML76FK.js`),"hexbin-map":()=>import(`./hexbin-map-options.config-Elr44Jin.js`),image:()=>import(`./image-options.config-Cj4r1ypi.js`),kpi:()=>import(`./kpi-options.config-DGl2N2HJ.js`),"line-chart":()=>import(`./line-chart-options.config--_LXaPbB.js`),"marker-map":()=>import(`./marker-map-options.config-D_OTOZRe.js`),"ohlc-chart":()=>import(`./ohlc-chart-options.config-kyYOgBtR.js`),"parallel-coordinates-plot":()=>import(`./parallel-coordinates-plot-options.config-BcIYCRdF.js`),"pivot-table":()=>import(`./pivot-table-options.config-BZpId1ju.js`),"pyramid-chart":()=>import(`./pyramid-chart-options.config-xYIVE_ib.js`),"radar-chart":()=>import(`./radar-chart-options.config-CoGFqCqy.js`),"regular-table":()=>import(`./regular-table-options.config-BnhDzc-m.js`),"route-map":()=>import(`./route-map-options.config-Dwy0JSVq.js`),"sankey-diagram":()=>import(`./sankey-diagram-options.config-Curc2-If.js`),"scatter-plot":()=>import(`./scatter-plot-options.config-DG9Ki-mt.js`),"search-filter":()=>import(`./search-filter-options.config-DPhYMtlJ.js`),"slicer-filter":()=>import(`./slicer-filter-options.config-BQ1vpcTb.js`),"slider-filter":()=>import(`./slider-filter-options.config-ZCkBkeXQ.js`),spacer:()=>import(`./spacer-options.config-DmYOnwBz.js`),"speedometer-chart":()=>import(`./speedometer-chart-options.config-YmUv49lQ.js`),"spike-map":()=>import(`./spike-map-options.config-DFmuNxym.js`),"strip-plot":()=>import(`./strip-plot-options.config-D84diNaB.js`),"sunburst-chart":()=>import(`./sunburst-chart-options.config-DOBSe3i5.js`),"symbol-map":()=>import(`./symbol-map-options.config-Bbb3xIKg.js`),text:()=>import(`./text-options.config-Chv14kyQ.js`),"treemap-chart":()=>import(`./treemap-chart-options.config-DxkumoYq.js`),"venn-diagram":()=>import(`./venn-diagram-options.config-DmYOnwBz.js`),video:()=>import(`./video-options.config-CfgT_MAw.js`),"wordcloud-chart":()=>import(`./wordcloud-chart-options.config-b-ibtRWp.js`)},m={"area-chart:de":()=>import(`./area-chart-options.de-CiUYKjuF.js`),"area-chart:en":()=>import(`./area-chart-options.en-ClANS4ox.js`),"area-chart:es":()=>import(`./area-chart-options.es-CJ9G7w-d.js`),"area-chart:fr":()=>import(`./area-chart-options.fr-HT5lv1Xa.js`),"area-chart:nl":()=>import(`./area-chart-options.nl-BLkEkEtR.js`),"bar-chart:de":()=>import(`./bar-chart-options.de-BFaQAeSt.js`),"bar-chart:en":()=>import(`./bar-chart-options.en-uZbbpK84.js`),"bar-chart:es":()=>import(`./bar-chart-options.es-twNx5B2m.js`),"bar-chart:fr":()=>import(`./bar-chart-options.fr-DRaaaSSH.js`),"bar-chart:nl":()=>import(`./bar-chart-options.nl-CJiMjH5v.js`),"box-plot:de":()=>import(`./box-plot-options.de-CI5qJAF7.js`),"box-plot:en":()=>import(`./box-plot-options.en-BQtMNcl5.js`),"box-plot:es":()=>import(`./box-plot-options.es-CHjivUoY.js`),"box-plot:fr":()=>import(`./box-plot-options.fr-FkvAk1kX.js`),"box-plot:nl":()=>import(`./box-plot-options.nl-BRnSzvbY.js`),"bubble-chart:de":()=>import(`./bubble-chart-options.de-C4pA9ZdS.js`),"bubble-chart:en":()=>import(`./bubble-chart-options.en-DM-MH8pT.js`),"bubble-chart:es":()=>import(`./bubble-chart-options.es-C2VE7E7k.js`),"bubble-chart:fr":()=>import(`./bubble-chart-options.fr-BugyvkW9.js`),"bubble-chart:nl":()=>import(`./bubble-chart-options.nl-oDPNybDE.js`),"bullet-chart:de":()=>import(`./bullet-chart-options.de-kCP9VTDJ.js`),"bullet-chart:en":()=>import(`./bullet-chart-options.en-CQ7u24xM.js`),"bullet-chart:es":()=>import(`./bullet-chart-options.es-CMRwpRyH.js`),"bullet-chart:fr":()=>import(`./bullet-chart-options.fr-NLzgxbaB.js`),"bullet-chart:nl":()=>import(`./bullet-chart-options.nl-BxNIes0u.js`),"choropleth-map:de":()=>import(`./choropleth-map-options.de-eALhIYgW.js`),"choropleth-map:en":()=>import(`./choropleth-map-options.en-DNdPCTz7.js`),"choropleth-map:es":()=>import(`./choropleth-map-options.es-BoHXBNpE.js`),"choropleth-map:fr":()=>import(`./choropleth-map-options.fr-Di8f-OWA.js`),"choropleth-map:nl":()=>import(`./choropleth-map-options.nl-XKS-glHm.js`),"circle-pack-chart:de":()=>import(`./circle-pack-chart-options.de-Dwf0pYf1.js`),"circle-pack-chart:en":()=>import(`./circle-pack-chart-options.en-DhCFF4vx.js`),"circle-pack-chart:es":()=>import(`./circle-pack-chart-options.es-DDKEbXse.js`),"circle-pack-chart:fr":()=>import(`./circle-pack-chart-options.fr-Dezqd3QL.js`),"circle-pack-chart:nl":()=>import(`./circle-pack-chart-options.nl-BNXyskRD.js`),"circular-gauge:de":()=>import(`./circular-gauge-options.de-DXGoiD0i.js`),"circular-gauge:en":()=>import(`./circular-gauge-options.en-SHYrAgsX.js`),"circular-gauge:es":()=>import(`./circular-gauge-options.es-D4xJXTQ-.js`),"circular-gauge:fr":()=>import(`./circular-gauge-options.fr-6vBd5iUe.js`),"circular-gauge:nl":()=>import(`./circular-gauge-options.nl-CDoO99Is.js`),"column-chart:de":()=>import(`./column-chart-options.de-CpCK5x2F.js`),"column-chart:en":()=>import(`./column-chart-options.en-uZbbpK84.js`),"column-chart:es":()=>import(`./column-chart-options.es-CNgSUKXK.js`),"column-chart:fr":()=>import(`./column-chart-options.fr-DRaaaSSH.js`),"column-chart:nl":()=>import(`./column-chart-options.nl-CJiMjH5v.js`),"combination-chart:de":()=>import(`./combination-chart-options.de-BarapFn7.js`),"combination-chart:en":()=>import(`./combination-chart-options.en-Dip8nNUE.js`),"combination-chart:es":()=>import(`./combination-chart-options.es-3xQbg-Up.js`),"combination-chart:fr":()=>import(`./combination-chart-options.fr-BsXLtxB_.js`),"combination-chart:nl":()=>import(`./combination-chart-options.nl-8LA_bn9G.js`),"conditional-number:de":()=>import(`./conditional-number-options.de-BNkYWqfn.js`),"conditional-number:en":()=>import(`./conditional-number-options.en-J7yPXdbP.js`),"conditional-number:es":()=>import(`./conditional-number-options.es-CKDTBiYp.js`),"conditional-number:fr":()=>import(`./conditional-number-options.fr-BX1cbt1S.js`),"conditional-number:nl":()=>import(`./conditional-number-options.nl-6IE86oA9.js`),"date-comparison-filter:de":()=>import(`./date-comparison-filter-options.de-WqpVCnC1.js`),"date-comparison-filter:en":()=>import(`./date-comparison-filter-options.en-Obm6KfbI.js`),"date-comparison-filter:es":()=>import(`./date-comparison-filter-options.es-CxYTNaTq.js`),"date-comparison-filter:fr":()=>import(`./date-comparison-filter-options.fr-DhrKNPxX.js`),"date-comparison-filter:nl":()=>import(`./date-comparison-filter-options.nl-D2RV7246.js`),"date-filter:de":()=>import(`./date-filter-options.de-B83VkpDz.js`),"date-filter:en":()=>import(`./date-filter-options.en-DKQexBC1.js`),"date-filter:es":()=>import(`./date-filter-options.es-DfDqzkVB.js`),"date-filter:fr":()=>import(`./date-filter-options.fr-DoZy8DU8.js`),"date-filter:nl":()=>import(`./date-filter-options.nl-DKtF0sFB.js`),"donut-chart:de":()=>import(`./donut-chart-options.de-IKGJRoDL.js`),"donut-chart:en":()=>import(`./donut-chart-options.en-O2IK3YiS.js`),"donut-chart:es":()=>import(`./donut-chart-options.es-gKAHuFAU.js`),"donut-chart:fr":()=>import(`./donut-chart-options.fr-Q-uMrtQG.js`),"donut-chart:nl":()=>import(`./donut-chart-options.nl-B6v6jK4l.js`),"dropdown-filter:de":()=>import(`./dropdown-filter-options.de-dj6aTNQQ.js`),"dropdown-filter:en":()=>import(`./dropdown-filter-options.en-DH7Jfk8Q.js`),"dropdown-filter:es":()=>import(`./dropdown-filter-options.es-K2L8ln9j.js`),"dropdown-filter:fr":()=>import(`./dropdown-filter-options.fr-CMapzFiR.js`),"dropdown-filter:nl":()=>import(`./dropdown-filter-options.nl-BLAyit4D.js`),"evolution-number:de":()=>import(`./evolution-number-options.de-NPOdl5mB.js`),"evolution-number:en":()=>import(`./evolution-number-options.en-Eq53ZOMK.js`),"evolution-number:es":()=>import(`./evolution-number-options.es-WS8nAzvW.js`),"evolution-number:fr":()=>import(`./evolution-number-options.fr-DmcY0jGH.js`),"evolution-number:nl":()=>import(`./evolution-number-options.nl-CvjB2qil.js`),"funnel-chart:de":()=>import(`./funnel-chart-options.de-u5OrFyng.js`),"funnel-chart:en":()=>import(`./funnel-chart-options.en-BEGSBn35.js`),"funnel-chart:es":()=>import(`./funnel-chart-options.es-CxWkEgMs.js`),"funnel-chart:fr":()=>import(`./funnel-chart-options.fr-DZmmgK2t.js`),"funnel-chart:nl":()=>import(`./funnel-chart-options.nl-C6BitaEJ.js`),"heat-map:de":()=>import(`./heat-map-options.de-BfJMMX2Q.js`),"heat-map:en":()=>import(`./heat-map-options.en-Dr653pN6.js`),"heat-map:es":()=>import(`./heat-map-options.es-CklrBP1w.js`),"heat-map:fr":()=>import(`./heat-map-options.fr-DwtCOHrA.js`),"heat-map:nl":()=>import(`./heat-map-options.nl-DQBLussF.js`),"heat-table:de":()=>import(`./heat-table-options.de-B4y9dcra.js`),"heat-table:en":()=>import(`./heat-table-options.en-Bouip0NE.js`),"heat-table:es":()=>import(`./heat-table-options.es-BRAQP8GK.js`),"heat-table:fr":()=>import(`./heat-table-options.fr-CTzciHeO.js`),"heat-table:nl":()=>import(`./heat-table-options.nl-DzmWrTeQ.js`),"hexbin-map:de":()=>import(`./hexbin-map-options.de-C45yz1mZ.js`),"hexbin-map:en":()=>import(`./hexbin-map-options.en-CIrLRJJ1.js`),"hexbin-map:es":()=>import(`./hexbin-map-options.es-wf4yF2eW.js`),"hexbin-map:fr":()=>import(`./hexbin-map-options.fr-C0SN47Nq.js`),"hexbin-map:nl":()=>import(`./hexbin-map-options.nl-CweMyvfk.js`),"image:de":()=>import(`./image-options.de-CFUHfYzb.js`),"image:en":()=>import(`./image-options.en-BIyq9f_H.js`),"image:es":()=>import(`./image-options.es-BD---IOk.js`),"image:fr":()=>import(`./image-options.fr-BGFgsNTs.js`),"image:nl":()=>import(`./image-options.nl-DD1JEJSa.js`),"kpi:de":()=>import(`./kpi-options.de-CJMQBEs7.js`),"kpi:en":()=>import(`./kpi-options.en-BzKmi3Bd.js`),"kpi:es":()=>import(`./kpi-options.es-BTmFYV0w.js`),"kpi:fr":()=>import(`./kpi-options.fr-mlazGpRq.js`),"kpi:nl":()=>import(`./kpi-options.nl-BV1eFo_U.js`),"line-chart:de":()=>import(`./line-chart-options.de-CCCH4dI_.js`),"line-chart:en":()=>import(`./line-chart-options.en-BwtEj00F.js`),"line-chart:es":()=>import(`./line-chart-options.es-BWWaIDbd.js`),"line-chart:fr":()=>import(`./line-chart-options.fr-Rp7fs4Id.js`),"line-chart:nl":()=>import(`./line-chart-options.nl-DcgJ9CUw.js`),"marker-map:de":()=>import(`./marker-map-options.de-SuCAxwxR.js`),"marker-map:en":()=>import(`./marker-map-options.en-B-gl_14v.js`),"marker-map:es":()=>import(`./marker-map-options.es-CSJGCzjk.js`),"marker-map:fr":()=>import(`./marker-map-options.fr-D5P_HjSn.js`),"marker-map:nl":()=>import(`./marker-map-options.nl-DdeyYFJQ.js`),"ohlc-chart:de":()=>import(`./ohlc-chart-options.de-DeQ8wdeE.js`),"ohlc-chart:en":()=>import(`./ohlc-chart-options.en-DopM1kPj.js`),"ohlc-chart:es":()=>import(`./ohlc-chart-options.es-BKjQWwH0.js`),"ohlc-chart:fr":()=>import(`./ohlc-chart-options.fr-DWhV_lXz.js`),"ohlc-chart:nl":()=>import(`./ohlc-chart-options.nl-D8lhNKIv.js`),"parallel-coordinates-plot:de":()=>import(`./parallel-coordinates-plot-options.de-Dvi0gBbB.js`),"parallel-coordinates-plot:en":()=>import(`./parallel-coordinates-plot-options.en-LdifcLcc.js`),"parallel-coordinates-plot:es":()=>import(`./parallel-coordinates-plot-options.es-DNisZWdC.js`),"parallel-coordinates-plot:fr":()=>import(`./parallel-coordinates-plot-options.fr-DwOBR0cp.js`),"parallel-coordinates-plot:nl":()=>import(`./parallel-coordinates-plot-options.nl-DCXeTldD.js`),"pivot-table:de":()=>import(`./pivot-table-options.de-B0l711Q7.js`),"pivot-table:en":()=>import(`./pivot-table-options.en-D3MYHTWH.js`),"pivot-table:es":()=>import(`./pivot-table-options.es-CDACogGQ.js`),"pivot-table:fr":()=>import(`./pivot-table-options.fr-C-w1sys8.js`),"pivot-table:nl":()=>import(`./pivot-table-options.nl-Dy9VJ1bm.js`),"pyramid-chart:de":()=>import(`./pyramid-chart-options.de-CaxalCcg.js`),"pyramid-chart:en":()=>import(`./pyramid-chart-options.en-B-weoYGh.js`),"pyramid-chart:es":()=>import(`./pyramid-chart-options.es-BahFoH3_.js`),"pyramid-chart:fr":()=>import(`./pyramid-chart-options.fr-DcTxsNGH.js`),"pyramid-chart:nl":()=>import(`./pyramid-chart-options.nl-ChImCr8r.js`),"radar-chart:de":()=>import(`./radar-chart-options.de-vruPXtB4.js`),"radar-chart:en":()=>import(`./radar-chart-options.en-D8rstMVn.js`),"radar-chart:es":()=>import(`./radar-chart-options.es-By21lK8S.js`),"radar-chart:fr":()=>import(`./radar-chart-options.fr-C4b5cJxg.js`),"radar-chart:nl":()=>import(`./radar-chart-options.nl-CzEi0MTf.js`),"regular-table:de":()=>import(`./regular-table-options.de-DPmii-jp.js`),"regular-table:en":()=>import(`./regular-table-options.en-DQugncwx.js`),"regular-table:es":()=>import(`./regular-table-options.es-DzbTEFoh.js`),"regular-table:fr":()=>import(`./regular-table-options.fr-roRCzuK8.js`),"regular-table:nl":()=>import(`./regular-table-options.nl-DxYUm_Rz.js`),"route-map:de":()=>import(`./route-map-options.de-Ke-Bybpi.js`),"route-map:en":()=>import(`./route-map-options.en-CDXIcBc0.js`),"route-map:es":()=>import(`./route-map-options.es-CCEXcHLb.js`),"route-map:fr":()=>import(`./route-map-options.fr-BXoMKK54.js`),"route-map:nl":()=>import(`./route-map-options.nl-U52AE8MW.js`),"sankey-diagram:de":()=>import(`./sankey-diagram-options.de-Bisx6mpj.js`),"sankey-diagram:en":()=>import(`./sankey-diagram-options.en-DonChVRz.js`),"sankey-diagram:es":()=>import(`./sankey-diagram-options.es-TCXmlth5.js`),"sankey-diagram:fr":()=>import(`./sankey-diagram-options.fr-B3iAnJNW.js`),"sankey-diagram:nl":()=>import(`./sankey-diagram-options.nl-BnXZQEKn.js`),"scatter-plot:de":()=>import(`./scatter-plot-options.de-eebqIJA1.js`),"scatter-plot:en":()=>import(`./scatter-plot-options.en-5i08biJm.js`),"scatter-plot:es":()=>import(`./scatter-plot-options.es-Bx8kHesL.js`),"scatter-plot:fr":()=>import(`./scatter-plot-options.fr-DK6rPCT_.js`),"scatter-plot:nl":()=>import(`./scatter-plot-options.nl-9mS62LyK.js`),"search-filter:de":()=>import(`./search-filter-options.de-DewLFwK0.js`),"search-filter:en":()=>import(`./search-filter-options.en-DyIupnO9.js`),"search-filter:es":()=>import(`./search-filter-options.es-Dx1WGz-q.js`),"search-filter:fr":()=>import(`./search-filter-options.fr-BdnlKNNx.js`),"search-filter:nl":()=>import(`./search-filter-options.nl-DsKcc6ke.js`),"slicer-filter:de":()=>import(`./slicer-filter-options.de-v0So4hDH.js`),"slicer-filter:en":()=>import(`./slicer-filter-options.en-BkVZDku6.js`),"slicer-filter:es":()=>import(`./slicer-filter-options.es-BATOs827.js`),"slicer-filter:fr":()=>import(`./slicer-filter-options.fr-DROih5R8.js`),"slicer-filter:nl":()=>import(`./slicer-filter-options.nl-CT4HfMiT.js`),"slider-filter:de":()=>import(`./slider-filter-options.de-BToTmIkJ.js`),"slider-filter:en":()=>import(`./slider-filter-options.en-Du0cf6NC.js`),"slider-filter:es":()=>import(`./slider-filter-options.es-6yGUkJ9r.js`),"slider-filter:fr":()=>import(`./slider-filter-options.fr-DeupuOm1.js`),"slider-filter:nl":()=>import(`./slider-filter-options.nl-K6BEul4-.js`),"speedometer-chart:de":()=>import(`./speedometer-chart-options.de-CWVMBrx9.js`),"speedometer-chart:en":()=>import(`./speedometer-chart-options.en-DtCdA113.js`),"speedometer-chart:es":()=>import(`./speedometer-chart-options.es-BC1Y-Hje.js`),"speedometer-chart:fr":()=>import(`./speedometer-chart-options.fr-BqnVNM9x.js`),"speedometer-chart:nl":()=>import(`./speedometer-chart-options.nl-D2dmDbhJ.js`),"spike-map:de":()=>import(`./spike-map-options.de-cIVh4l8Z.js`),"spike-map:en":()=>import(`./spike-map-options.en-CKjynYQl.js`),"spike-map:es":()=>import(`./spike-map-options.es-_GxcrK73.js`),"spike-map:fr":()=>import(`./spike-map-options.fr-DHi_gHN6.js`),"spike-map:nl":()=>import(`./spike-map-options.nl-Bicq35x0.js`),"strip-plot:de":()=>import(`./strip-plot-options.de-DjNnWJl2.js`),"strip-plot:en":()=>import(`./strip-plot-options.en-Of1sTT_A.js`),"strip-plot:es":()=>import(`./strip-plot-options.es-BEHY8I7g.js`),"strip-plot:fr":()=>import(`./strip-plot-options.fr-DLfEoXBO.js`),"strip-plot:nl":()=>import(`./strip-plot-options.nl-CA3oh18P.js`),"sunburst-chart:de":()=>import(`./sunburst-chart-options.de-D3iq4Q-m.js`),"sunburst-chart:en":()=>import(`./sunburst-chart-options.en-BUJ_Pr9C.js`),"sunburst-chart:es":()=>import(`./sunburst-chart-options.es-stKrKGz2.js`),"sunburst-chart:fr":()=>import(`./sunburst-chart-options.fr-RkBtlMNp.js`),"sunburst-chart:nl":()=>import(`./sunburst-chart-options.nl-BUeDNot_.js`),"symbol-map:de":()=>import(`./symbol-map-options.de-CqxosoVr.js`),"symbol-map:en":()=>import(`./symbol-map-options.en-DT7vsjRh.js`),"symbol-map:es":()=>import(`./symbol-map-options.es-PGR-C-uM.js`),"symbol-map:fr":()=>import(`./symbol-map-options.fr-CPNydqFW.js`),"symbol-map:nl":()=>import(`./symbol-map-options.nl-BBHmJwLF.js`),"text:de":()=>import(`./text-options.de-CRVu5VAm.js`),"text:en":()=>import(`./text-options.en-CupCY5Us.js`),"text:es":()=>import(`./text-options.es-uKgRI4LZ.js`),"text:fr":()=>import(`./text-options.fr-C256Njqd.js`),"text:nl":()=>import(`./text-options.nl-CpMqMCOZ.js`),"treemap-chart:de":()=>import(`./treemap-chart-options.de-DdhcpjTu.js`),"treemap-chart:en":()=>import(`./treemap-chart-options.en-DB87QjbN.js`),"treemap-chart:es":()=>import(`./treemap-chart-options.es-DEImFeIB.js`),"treemap-chart:fr":()=>import(`./treemap-chart-options.fr-BzM5c_vV.js`),"treemap-chart:nl":()=>import(`./treemap-chart-options.nl-CFJgBJi2.js`),"video:de":()=>import(`./video-options.de-Cxs3-JN3.js`),"video:en":()=>import(`./video-options.en-ck74JByC.js`),"video:es":()=>import(`./video-options.es-UdEH3Rzk.js`),"video:fr":()=>import(`./video-options.fr-p5bOI-bw.js`),"video:nl":()=>import(`./video-options.nl-CBYWp-Df.js`),"wordcloud-chart:de":()=>import(`./wordcloud-chart-options.de-B0CeI2KB.js`),"wordcloud-chart:en":()=>import(`./wordcloud-chart-options.en-BQ-8ciOw.js`),"wordcloud-chart:es":()=>import(`./wordcloud-chart-options.es-DyMrHpJL.js`),"wordcloud-chart:fr":()=>import(`./wordcloud-chart-options.fr-V1k_70yq.js`),"wordcloud-chart:nl":()=>import(`./wordcloud-chart-options.nl-CrfYuaYy.js`)},h=async e=>{try{let t=p[e];return t?(await t())?.default??null:null}catch{return null}},g=async(e,t)=>{try{let n=m[`${e}:${t}`];if(!n)return null;let r=await n();if(!r?.default)return null;let[{getAxisTranslations:i},{getInfoTooltipTranslations:a},{getInteractivityTranslations:o}]=await Promise.all([import(`./axis-options.i18n-BiaLcciz.js`),import(`./info-tooltip-options.i18n-B_gjTq0R.js`),import(`./interactivity-options.i18n-BLDCmZkC.js`)]),s=[i(t),a(t),o(t)];return{...r.default,groups:Object.assign({},...s.map(e=>e.groups),r.default.groups),options:Object.assign({},...s.map(e=>e.options),r.default.options)}}catch{return null}},_=e=>e?h(e):Promise.resolve(null),v=async(e,t,n=!1)=>{if(!e||!t)return null;let r=await g(e,t);return!r&&n&&t!==`en`&&(r=await g(e,`en`)),r??null},y=[`value`,`average`,`median`,`average open`,`average close`],b=[`0`,`1,2`,`3,3`],x=[`1`,`2`,`3`],ee=[`value`,`average`,`median`],S={type:`3,3`,width:`1`},C=`rgba(0, 0, 0, 0.3)`,w=`rgba(255, 255, 255, 0.7)`,T=0,E=200,D=(e,t,n)=>{let r=t=>{for(let i of t??[]){if(i.key===e)return n?i:i.control;if(i.children){let e=r(i.children);if(e)return e}}return null};if(t&&Array.isArray(t))for(let e of t){let t=r(e.children);if(t)return t}return null},O=`: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}`,k=e=>{let t;return typeof e?.controlInfo?.default==`function`?t=e.controlInfo.default({options:e.options,slots:e.slots,theme:e.theme}):e.controlInfo?.default!==void 0&&e.controlInfo?.default!==null&&(t=e.controlInfo.default),t},A=e=>{let t;if(typeof e.controlInfo?.extraLabel==`function`?t=e.controlInfo.extraLabel({options:e.options,slots:e.slots,theme:e.theme}):typeof e.controlInfo?.extraLabel==`string`&&(t=e.controlInfo.extraLabel),typeof t==`string`){let n=e.translations?.options?.[e.optionKey]?.extraLabel;typeof n==`string`?t=n:n&&typeof n==`object`&&(t=n[t]??t)}let n;if(typeof e.controlInfo?.extraLabelTooltip==`function`?n=e.controlInfo.extraLabelTooltip({options:e.options,slots:e.slots,theme:e.theme}):typeof e.controlInfo?.extraLabelTooltip==`string`&&(n=e.controlInfo.extraLabelTooltip),typeof n==`string`){let t=e.translations?.options?.[e.optionKey]?.extraLabelTooltip;typeof t==`string`?n=t:t&&typeof t==`object`&&(n=t[n]??n)}let r;typeof e.controlInfo?.extraLabelHasClickAction==`function`?r=e.controlInfo.extraLabelHasClickAction({options:e.options,slots:e.slots,theme:e.theme}):typeof e.controlInfo?.extraLabelHasClickAction==`boolean`&&(r=e.controlInfo.extraLabelHasClickAction);let i=typeof e.controlInfo?.extraLabelClickAction==`function`?()=>e.controlInfo.extraLabelClickAction({options:e.getOptions?.()??e.options,slots:e.slots,theme:e.theme}):()=>{};return{extraLabel:t,extraLabelTooltip:n,extraLabelHasClickAction:r,extraLabelClickAction:i}},j=(e,t)=>{let n=e?.options??{};if(typeof e?.controlInfo?.calculateValue==`function`)return e.controlInfo.calculateValue({options:n});if(t.includes(`.`)){let e=t.split(`.`),r=n;for(let t=0;t<e.length-1;t++)r=r[e[t]]??{};let i=e.length-1;return r[e[i]]}return n[t]},te=/^(0|[1-9]\d*)$/,ne=e=>typeof e==`object`&&!!e,M=e=>te.test(e)?[]:{},N=(e,t,n)=>{let[r,...i]=t,a=Array.isArray(e)?[...e]:{...e},o=a;if(i.length===0)return o[r]=n,a;let s=o[r];return o[r]=N(ne(s)?s:M(i[0]),i,n),a},P=(e,t,n)=>{let r=t.split(`.`).filter(Boolean);if(r.length===0)return e;if(r.includes(`__proto__`))throw Error(`Unsafe nested path segment: __proto__`);return N(e,r,n)},F=e=>t=>{let n={...e.getOptions?.()??e.options};typeof e?.controlInfo?.toOptions==`function`?n=e.controlInfo.toOptions({options:n,value:t?.detail?.value}):e.optionKey.includes(`.`)?n=P(n,e.optionKey,t.detail.value):n[e.optionKey]=t.detail.value;let r=t?.detail?.interaction;return r?e.changeCallback(n,r):e.changeCallback(n)},I=e=>{let t=e.translations?.options?.[e.optionKey]?.label??e.controlInfo?.label??e.optionKey??``,n=e.size,r={};Object.keys(e.controlInfo?.values).forEach(t=>{r[t]={...e.controlInfo?.values[t],label:e.translations?.options?.[e.optionKey]?.enum?.[t]??e.controlInfo?.values[t].label}});let i=e.translations?.options?.[e.optionKey]?.tooltip??e.controlInfo?.tooltip,a=j(e,e.optionKey),o=k(e),{extraLabel:s,extraLabelTooltip:c,extraLabelHasClickAction:u,extraLabelClickAction:d}=A(e),f=F(e);return l`
|
|
3
|
+
<luzmo-item-option-action-button-group
|
|
4
|
+
.label=${t}
|
|
5
|
+
?hide-label=${e.controlInfo?.hideLabel}
|
|
6
|
+
.value=${a}
|
|
7
|
+
.values=${r}
|
|
8
|
+
.default=${o}
|
|
9
|
+
.selects=${e.controlInfo?.selects}
|
|
10
|
+
.size=${n}
|
|
11
|
+
.tooltip=${i}
|
|
12
|
+
.extraLabel=${s}
|
|
13
|
+
.extraLabelTooltip=${c}
|
|
14
|
+
.extraLabelHasClickAction=${u}
|
|
15
|
+
@luzmo-extra-label-click=${d}
|
|
16
|
+
@luzmo-option-changed=${f}
|
|
17
|
+
.parseValue=${e.controlInfo?.parseValue}
|
|
18
|
+
.toValue=${e.controlInfo?.toValue}
|
|
19
|
+
></luzmo-item-option-action-button-group>
|
|
20
|
+
`},L=e=>{let t;return typeof e?.controlInfo?.enum==`function`?t=e.controlInfo.enum({options:e.options,slots:e.slots,theme:e.theme}):e.controlInfo?.enum!==void 0&&e.controlInfo?.enum!==null&&(t=e.controlInfo.enum),t},R=e=>{let t=e.translations?.options?.[e.optionKey]?.label??e.controlInfo?.label??e.optionKey??``,n=j(e,e.optionKey),r=L(e),i=e.size,a=e.translations?.options?.[e.optionKey]?.tooltip??e.controlInfo?.tooltip,o=k(e),{extraLabel:s,extraLabelTooltip:c,extraLabelHasClickAction:u,extraLabelClickAction:d}=A(e),f=F(e);return l`
|
|
21
|
+
<luzmo-item-option-color-palette-picker
|
|
22
|
+
.value=${n??o}
|
|
23
|
+
.values=${r}
|
|
24
|
+
.label=${t}
|
|
25
|
+
?hide-label=${e.controlInfo?.hideLabel}
|
|
26
|
+
.size=${i}
|
|
27
|
+
.tooltip=${a}
|
|
28
|
+
.extraLabel=${s}
|
|
29
|
+
.extraLabelTooltip=${c}
|
|
30
|
+
.extraLabelHasClickAction=${u}
|
|
31
|
+
@luzmo-extra-label-click=${()=>{if(typeof d==`function`){let{options:t}=d();return e.changeCallback(t)}}}
|
|
32
|
+
@luzmo-option-changed=${f}
|
|
33
|
+
.parseValue=${e.controlInfo?.parseValue}
|
|
34
|
+
.toValue=${e.controlInfo?.toValue}
|
|
35
|
+
></luzmo-item-option-color-palette-picker>
|
|
36
|
+
`},z=e=>{let t=e.translations?.options?.[e.optionKey]?.label??e.controlInfo?.label??e.optionKey??``,n=j(e,e.optionKey),r=e.size,i=e.translations?.options?.[e.optionKey]?.tooltip??e.controlInfo?.tooltip,a=k(e),{extraLabel:o,extraLabelTooltip:s,extraLabelHasClickAction:c,extraLabelClickAction:u}=A(e),d=F(e);return l`
|
|
37
|
+
<luzmo-item-option-color-picker
|
|
38
|
+
.value=${n??a}
|
|
39
|
+
.label=${t}
|
|
40
|
+
?hide-label=${e.controlInfo?.hideLabel}
|
|
41
|
+
.size=${r}
|
|
42
|
+
.tooltip=${i}
|
|
43
|
+
.extraLabel=${o}
|
|
44
|
+
.extraLabelTooltip=${s}
|
|
45
|
+
.extraLabelHasClickAction=${c}
|
|
46
|
+
@luzmo-extra-label-click=${()=>{if(typeof u==`function`){let{options:t}=u();return e.changeCallback(t)}}}
|
|
47
|
+
@luzmo-option-changed=${d}
|
|
48
|
+
?live-interactions=${e.liveInteractions??!1}
|
|
49
|
+
@luzmo-option-interaction-start=${e.interactionCallback}
|
|
50
|
+
@luzmo-option-interaction-end=${e.interactionCallback}
|
|
51
|
+
@luzmo-option-interaction-cancel=${e.interactionCallback}
|
|
52
|
+
.parseValue=${e.controlInfo?.parseValue}
|
|
53
|
+
.toValue=${e.controlInfo?.toValue}
|
|
54
|
+
></luzmo-item-option-color-picker>
|
|
55
|
+
`},B=e=>{let t=e.translations?.options?.[e.optionKey]?.label??e.controlInfo?.label??e.optionKey??``,n=j(e,e.optionKey),r=e.size,i=e.translations?.options?.[e.optionKey]?.tooltip??e.controlInfo?.tooltip,a=k(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}=A(e),y=F(e);return l`
|
|
56
|
+
<luzmo-item-option-color-range
|
|
57
|
+
.value=${n??a}
|
|
58
|
+
.label=${t}
|
|
59
|
+
.size=${r}
|
|
60
|
+
.tooltip=${i}
|
|
61
|
+
?hide-label=${e.controlInfo?.hideLabel}
|
|
62
|
+
.extraLabel=${h}
|
|
63
|
+
.extraLabelTooltip=${g}
|
|
64
|
+
.extraLabelHasClickAction=${_}
|
|
65
|
+
.debounce=${e.controlInfo?.debounce}
|
|
66
|
+
?reverse=${s}
|
|
67
|
+
?percentage=${o}
|
|
68
|
+
?no-alpha-channel=${c}
|
|
69
|
+
?edit-range-size=${u}
|
|
70
|
+
?no-values=${p}
|
|
71
|
+
?read-only-color-picker=${m}
|
|
72
|
+
.minimum-range-size=${d}
|
|
73
|
+
?negative-infinity-value=${f}
|
|
74
|
+
@luzmo-extra-label-click=${()=>{if(typeof v==`function`){let{options:t}=v();return e.changeCallback(t)}}}
|
|
75
|
+
@luzmo-option-changed=${y}
|
|
76
|
+
?live-interactions=${e.liveInteractions??!1}
|
|
77
|
+
@luzmo-option-interaction-start=${e.interactionCallback}
|
|
78
|
+
@luzmo-option-interaction-end=${e.interactionCallback}
|
|
79
|
+
@luzmo-option-interaction-cancel=${e.interactionCallback}
|
|
80
|
+
.parseValue=${e.controlInfo?.parseValue}
|
|
81
|
+
.toValue=${e.controlInfo?.toValue}
|
|
82
|
+
></luzmo-item-option-color-range>
|
|
83
|
+
`},V=e=>{let t=e.translations?.options?.[e.optionKey]?.label??e.controlInfo?.label??e.optionKey,n=j(e,e.optionKey),r=k(e),i=L(e),a=Array.isArray(i)?i:[],o=e.translations?.options?.[e.optionKey]?.enum??{},s=e.theme?.editDarkOrLight===`dark-edit`?w:C,{extraLabel:c,extraLabelTooltip:u,extraLabelHasClickAction:d,extraLabelClickAction:f}=A(e),p=F(e);return l`
|
|
84
|
+
<luzmo-item-option-guidelines
|
|
85
|
+
hide-label
|
|
86
|
+
.label=${t}
|
|
87
|
+
.value=${n??r}
|
|
88
|
+
.lineTypes=${a}
|
|
89
|
+
.lineTypeLabels=${o}
|
|
90
|
+
.defaultColor=${s}
|
|
91
|
+
.size=${e.size}
|
|
92
|
+
.language=${e.language}
|
|
93
|
+
.extraLabel=${c}
|
|
94
|
+
.extraLabelTooltip=${u}
|
|
95
|
+
.extraLabelHasClickAction=${d}
|
|
96
|
+
.debounce=${e.controlInfo?.debounce??200}
|
|
97
|
+
@luzmo-extra-label-click=${()=>{let t=f();if(t&&typeof t==`object`&&`options`in t)return e.changeCallback(t.options)}}
|
|
98
|
+
@luzmo-option-changed=${p}
|
|
99
|
+
?live-interactions=${e.liveInteractions??!1}
|
|
100
|
+
@luzmo-option-interaction-start=${e.interactionCallback}
|
|
101
|
+
@luzmo-option-interaction-end=${e.interactionCallback}
|
|
102
|
+
@luzmo-option-interaction-cancel=${e.interactionCallback}
|
|
103
|
+
></luzmo-item-option-guidelines>
|
|
104
|
+
`},H=e=>{let t=e.translations?.options?.[e.optionKey]?.label??e.controlInfo?.label??e.optionKey??``,n=j(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=k(e),{extraLabel:c,extraLabelTooltip:d,extraLabelHasClickAction:f,extraLabelClickAction:p}=A(e),m=F(e);return l`
|
|
105
|
+
<luzmo-item-option-multi-language-field
|
|
106
|
+
.label=${t}
|
|
107
|
+
?hide-label=${e.controlInfo?.hideLabel}
|
|
108
|
+
.placeholder=${a}
|
|
109
|
+
.value=${n??s}
|
|
110
|
+
language=${u(i)}
|
|
111
|
+
.size=${o}
|
|
112
|
+
.tooltip=${r}
|
|
113
|
+
.extraLabel=${c}
|
|
114
|
+
.extraLabelTooltip=${d}
|
|
115
|
+
.extraLabelHasClickAction=${f}
|
|
116
|
+
@luzmo-extra-label-click=${p}
|
|
117
|
+
@luzmo-option-changed=${m}
|
|
118
|
+
.parseValue=${e.controlInfo?.parseValue}
|
|
119
|
+
.toValue=${e.controlInfo?.toValue}
|
|
120
|
+
></luzmo-item-option-multi-language-field>
|
|
121
|
+
`},U=e=>{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=j(e,e.optionKey),o=e.translations?.options?.[e.optionKey]?.tooltip??e.controlInfo?.tooltip,s=k(e),c=e.size,{extraLabel:u,extraLabelTooltip:d,extraLabelHasClickAction:f,extraLabelClickAction:p}=A(e),m=F(e);return l`
|
|
122
|
+
<luzmo-item-option-number-field
|
|
123
|
+
.value=${a}
|
|
124
|
+
.default=${s}
|
|
125
|
+
.min=${n}
|
|
126
|
+
.max=${r}
|
|
127
|
+
.step=${i}
|
|
128
|
+
.label=${t}
|
|
129
|
+
?hide-label=${e.controlInfo?.hideLabel}
|
|
130
|
+
.size=${c}
|
|
131
|
+
.tooltip=${o}
|
|
132
|
+
.placeholder=${e.controlInfo?.placeholder}
|
|
133
|
+
.minWidthInputField=${e.controlInfo?.minWidthInputField}
|
|
134
|
+
.debounce=${e.controlInfo?.debounce}
|
|
135
|
+
.extraLabel=${u}
|
|
136
|
+
.extraLabelTooltip=${d}
|
|
137
|
+
.extraLabelHasClickAction=${f}
|
|
138
|
+
@luzmo-extra-label-click=${p}
|
|
139
|
+
@luzmo-option-changed=${m}
|
|
140
|
+
.parseValue=${e.controlInfo?.parseValue}
|
|
141
|
+
.toValue=${e.controlInfo?.toValue}
|
|
142
|
+
></luzmo-item-option-number-field>
|
|
143
|
+
`},W=(e,t)=>{let n={};if(Array.isArray(e)){for(let r of e)typeof r==`string`&&(n[r]=t?.[r]??r);return n}if(e&&typeof e==`object`)for(let[r,i]of Object.entries(e)){let e=t?.[r],a=typeof i==`string`?i:typeof i==`object`&&i&&`label`in i?String(i.label??r):r;n[r]=e??a??r}return n},G=e=>{let t=e.translations?.options?.[e.optionKey]?.label??e.controlInfo?.label??e.optionKey??``,n=j(e,e.optionKey),r=e.translations?.options?.[e.optionKey]?.tooltip??e.controlInfo?.tooltip,i=e.translations?.options?.[e.optionKey]?.enum,a=W(e.controlInfo?.enum,i),o=e.size,s=k(e),{extraLabel:c,extraLabelTooltip:u,extraLabelHasClickAction:d,extraLabelClickAction:f}=A(e),p=F(e);return l`
|
|
144
|
+
<luzmo-item-option-picker
|
|
145
|
+
.value=${n}
|
|
146
|
+
.default=${s}
|
|
147
|
+
.values=${a}
|
|
148
|
+
.label=${t}
|
|
149
|
+
?hide-label=${e.controlInfo?.hideLabel}
|
|
150
|
+
.tooltip=${r}
|
|
151
|
+
.size=${o}
|
|
152
|
+
.extraLabel=${c}
|
|
153
|
+
.extraLabelTooltip=${u}
|
|
154
|
+
.extraLabelHasClickAction=${d}
|
|
155
|
+
@luzmo-extra-label-click=${f}
|
|
156
|
+
@luzmo-option-changed=${p}
|
|
157
|
+
.parseValue=${e.controlInfo?.parseValue}
|
|
158
|
+
.toValue=${e.controlInfo?.toValue}
|
|
159
|
+
></luzmo-item-option-picker>
|
|
160
|
+
`},K=e=>{let t=e.translations?.options?.[e.optionKey]?.label??e.controlInfo?.label,n=e.controlInfo?.enum??e.controlInfo?.positions,r=e.size,i=j(e,e.optionKey),a=e.translations?.options?.[e.optionKey]?.tooltip??e.controlInfo?.tooltip,o=k(e)??`topRight`,{extraLabel:s,extraLabelTooltip:c,extraLabelHasClickAction:u,extraLabelClickAction:d}=A(e),f=F(e);return l`
|
|
161
|
+
<luzmo-item-option-position-picker
|
|
162
|
+
.value=${i}
|
|
163
|
+
.positions=${n}
|
|
164
|
+
.default=${o}
|
|
165
|
+
.label=${t}
|
|
166
|
+
?hide-label=${e.controlInfo?.hideLabel}
|
|
167
|
+
.tooltip=${a}
|
|
168
|
+
.size=${r}
|
|
169
|
+
.extraLabel=${s}
|
|
170
|
+
.extraLabelTooltip=${c}
|
|
171
|
+
.extraLabelHasClickAction=${u}
|
|
172
|
+
@luzmo-extra-label-click=${d}
|
|
173
|
+
@luzmo-option-changed=${f}
|
|
174
|
+
.readonly=${e.controlInfo?.readonly}
|
|
175
|
+
></luzmo-item-option-position-picker>
|
|
176
|
+
`},q=e=>{let t=e.translations?.options?.[e.optionKey]?.label??e.controlInfo?.label,n=j(e,e.optionKey),r=e.size,i=e.translations?.options?.[e.optionKey]?.tooltip??e.controlInfo?.tooltip,a=k(e),{extraLabel:o,extraLabelTooltip:s,extraLabelHasClickAction:c,extraLabelClickAction:u}=A(e),d=F(e);return l`
|
|
177
|
+
<luzmo-item-option-positions-number-field
|
|
178
|
+
.values=${n??a}
|
|
179
|
+
.positions=${e.controlInfo?.positions}
|
|
180
|
+
.positionConfiguration=${e.controlInfo?.positionConfiguration}
|
|
181
|
+
.label=${t}
|
|
182
|
+
?hide-label=${e.controlInfo?.hideLabel}
|
|
183
|
+
.size=${r}
|
|
184
|
+
.tooltip=${i}
|
|
185
|
+
.extraLabel=${o}
|
|
186
|
+
.extraLabelTooltip=${s}
|
|
187
|
+
.extraLabelHasClickAction=${c}
|
|
188
|
+
@luzmo-extra-label-click=${u}
|
|
189
|
+
@luzmo-option-changed=${d}
|
|
190
|
+
.parseValue=${e.controlInfo?.parseValue}
|
|
191
|
+
.toValue=${e.controlInfo?.toValue}
|
|
192
|
+
></luzmo-item-option-positions-number-field>
|
|
193
|
+
`},J=e=>{let t=e.translations?.options?.[e.optionKey]?.label??e.controlInfo?.label??e.optionKey??``,n=j(e,e.optionKey),r=k(e),i=e.translations?.options?.[e.optionKey]?.enum,a=W(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}=A(e),p=F(e);return l`
|
|
194
|
+
<luzmo-item-option-radio-button-group
|
|
195
|
+
.value=${n??r}
|
|
196
|
+
.values=${a}
|
|
197
|
+
.label=${t}
|
|
198
|
+
?hide-label=${e.controlInfo?.hideLabel}
|
|
199
|
+
.size=${o}
|
|
200
|
+
.tooltip=${s}
|
|
201
|
+
.extraLabel=${c}
|
|
202
|
+
.extraLabelTooltip=${u}
|
|
203
|
+
.extraLabelHasClickAction=${d}
|
|
204
|
+
@luzmo-extra-label-click=${f}
|
|
205
|
+
@luzmo-option-changed=${p}
|
|
206
|
+
.parseValue=${e.controlInfo?.parseValue}
|
|
207
|
+
.toValue=${e.controlInfo?.toValue}
|
|
208
|
+
></luzmo-item-option-radio-button-group>
|
|
209
|
+
`},Y=e=>{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=j(e,e.optionKey),s=e.size,c=k(e),{extraLabel:u,extraLabelTooltip:d,extraLabelHasClickAction:f,extraLabelClickAction:p}=A(e),m=F(e);return l`
|
|
210
|
+
<luzmo-item-option-slider
|
|
211
|
+
.value=${o}
|
|
212
|
+
.default=${c}
|
|
213
|
+
.min=${r}
|
|
214
|
+
.max=${i}
|
|
215
|
+
.step=${a}
|
|
216
|
+
.label=${t}
|
|
217
|
+
?hide-label=${e.controlInfo?.hideLabel}
|
|
218
|
+
.tooltip=${n}
|
|
219
|
+
.size=${s}
|
|
220
|
+
.extraLabel=${u}
|
|
221
|
+
.extraLabelTooltip=${d}
|
|
222
|
+
.extraLabelHasClickAction=${f}
|
|
223
|
+
@luzmo-extra-label-click=${()=>{if(typeof p==`function`){let{options:t}=p();return e.changeCallback(t)}}}
|
|
224
|
+
@luzmo-option-changed=${m}
|
|
225
|
+
?live-interactions=${e.liveInteractions??!1}
|
|
226
|
+
@luzmo-option-interaction-start=${e.interactionCallback}
|
|
227
|
+
@luzmo-option-interaction-end=${e.interactionCallback}
|
|
228
|
+
@luzmo-option-interaction-cancel=${e.interactionCallback}
|
|
229
|
+
.parseValue=${e.controlInfo?.parseValue}
|
|
230
|
+
.toValue=${e.controlInfo?.toValue}
|
|
231
|
+
></luzmo-item-option-slider>
|
|
232
|
+
`},X=e=>{let t=e.translations?.options?.[e.optionKey]?.label??e.controlInfo?.label??e.optionKey??``,n=j(e,e.optionKey),r=e.size,i=e.translations?.options?.[e.optionKey]?.tooltip??e.controlInfo?.tooltip,a=k(e),{extraLabel:o,extraLabelTooltip:s,extraLabelHasClickAction:c,extraLabelClickAction:u}=A(e),d=F(e);return l`
|
|
233
|
+
<luzmo-item-option-switch
|
|
234
|
+
.value=${n??a??!1}
|
|
235
|
+
.label=${t}
|
|
236
|
+
?hide-label=${e.controlInfo?.hideLabel}
|
|
237
|
+
.size=${r}
|
|
238
|
+
.tooltip=${i}
|
|
239
|
+
.extraLabel=${o}
|
|
240
|
+
.extraLabelTooltip=${s}
|
|
241
|
+
.extraLabelHasClickAction=${c}
|
|
242
|
+
@luzmo-extra-label-click=${u}
|
|
243
|
+
@luzmo-option-changed=${d}
|
|
244
|
+
.parseValue=${e.controlInfo?.parseValue}
|
|
245
|
+
.toValue=${e.controlInfo?.toValue}
|
|
246
|
+
></luzmo-item-option-switch>
|
|
247
|
+
`},re=e=>{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=j(e,e.optionKey)??``,a=e.size,o=e.translations?.options?.[e.optionKey]?.tooltip??e.controlInfo?.tooltip,s=k(e),{extraLabel:c,extraLabelTooltip:u,extraLabelHasClickAction:d,extraLabelClickAction:f}=A(e),p=F(e);return l`
|
|
248
|
+
<luzmo-item-option-text-field
|
|
249
|
+
.label=${t}
|
|
250
|
+
?hide-label=${e.controlInfo?.hideLabel}
|
|
251
|
+
.placeholder=${r[n]}
|
|
252
|
+
.value=${i??s}
|
|
253
|
+
.size=${a}
|
|
254
|
+
.tooltip=${o}
|
|
255
|
+
.extraLabel=${c}
|
|
256
|
+
.extraLabelTooltip=${u}
|
|
257
|
+
.extraLabelHasClickAction=${d}
|
|
258
|
+
@luzmo-extra-label-click=${f}
|
|
259
|
+
@luzmo-option-changed=${p}
|
|
260
|
+
.parseValue=${e.controlInfo?.parseValue}
|
|
261
|
+
.toValue=${e.controlInfo?.toValue}
|
|
262
|
+
></luzmo-item-option-text-field>
|
|
263
|
+
`},ie=e=>{switch(e.controlType){case`picker`:return G(e);case`slider`:return Y(e);case`switch`:return X(e);case`multi-language-field`:return H(e);case`text-field`:return re(e);case`number-field`:return U(e);case`color-range`:return B(e);case`guidelines`:return V(e);case`color-palette-picker`:return R(e);case`position-picker`:return K(e);case`positions-number-field`:return q(e);case`radio-button-group`:return J(e);case`color-picker`:return z(e);case`action-button-group`:return I(e)}},ae=5,Z=class extends n{constructor(...e){super(...e),this._loadItemConfig=new s(this,{task:async([e,t,n,i,s,c,l,u,d])=>{if(l||u||d){let e={};l&&(e.apiUrl=l),u&&(e.authKey=u),d&&(e.authToken=d),r.configure(e)}if(c&&c.type!==`custom`)try{if(c?.id&&a.includes(c.id))this._fullTheme=await o(c.id);else if(c?.id){let e=await r.fetchTheme(c.id);this._fullTheme=e?.theme??{}}}catch(e){console.error(`Error loading theme:`,e),this._fullTheme=c}else this._fullTheme=c?.type===`custom`?structuredClone(c):c;let f=this._getTranslationOverrides(s),p=this._getOptionTranslation(s);if(this._translationOverrides=f,i){this._optionsConfig=[{key:`custom`,children:[i]}],t=i.key,this._itemTypeLoaded=void 0,this._languageLoaded=void 0,this._translations={};let e=p??f?.[t??``],n=this._mergeOptionTranslations(void 0,e);this._effectiveTranslations=n?{options:{[t??``]:n}}:{}}else if(e){let r=e!==this._itemTypeLoaded,i=e!==this._itemTypeLoaded||n!==this._languageLoaded;if(r&&(this._optionsConfig=await _(e)??[],this._itemTypeLoaded=e),i){let t=n??`en`;this._translations=await v(e,t,!0)??{},this._languageLoaded=n}let a=this._translations.options?.[t??``],o=p??f?.[t??``],s=this._mergeOptionTranslations(a,o);this._effectiveTranslations=s?{options:{[t??``]:s}}:{}}else this._optionsConfig=[],this._translations={},this._effectiveTranslations={};let m=D(t??``,this._optionsConfig),h=m?.type;if(h!==this._controlTypeLoaded){let e=/* #__PURE__ */ Object.assign({"../item-option-action-button-group/index.ts":()=>import(`./item-option-action-button-group-BEAwPHVw.js`),"../item-option-color-palette-picker/index.ts":()=>import(`./item-option-color-palette-picker-CBz61iZb.js`),"../item-option-color-picker/index.ts":()=>import(`./item-option-color-picker-lLvBPnKA.js`),"../item-option-color-range/index.ts":()=>import(`./item-option-color-range-BqeatOei.js`),"../item-option-guidelines/index.ts":()=>import(`./item-option-guidelines-Cop8rM8y.js`),"../item-option-multi-language-field/index.ts":()=>import(`./item-option-multi-language-field-DPPpN2qg.js`),"../item-option-number-field/index.ts":()=>import(`./item-option-number-field-CkqJjInE.js`),"../item-option-panel/index.ts":()=>Promise.resolve().then(()=>$),"../item-option-picker/index.ts":()=>import(`./item-option-picker-BnwQPT9A.js`),"../item-option-position-picker/index.ts":()=>import(`./item-option-position-picker-Bkc4JvJX.js`),"../item-option-positions-number-field/index.ts":()=>import(`./item-option-positions-number-field-Dr_315TE.js`),"../item-option-radio-button-group/index.ts":()=>import(`./item-option-radio-button-group-BkymJq3E.js`),"../item-option-slider/index.ts":()=>import(`./item-option-slider-K_bsNci8.js`),"../item-option-switch/index.ts":()=>import(`./item-option-switch-DeihDHhM.js`),"../item-option-text-field/index.ts":()=>import(`./item-option-text-field-D7bkuhsv.js`)});try{e[`../item-option-${h}/index.ts`]&&(await e[`../item-option-${h}/index.ts`](),this._controlTypeLoaded=h)}catch(e){console.error(e)}}return m},args:()=>[this.itemType,this.optionKey,this.language,this.customOptionConfiguration,this.customTranslations,this.theme,this.apiUrl,this.authKey,this.authToken],argsEqual:(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]||n===ae&&i(e,t[n]))}),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)=>{this.options=e,this.dispatchEvent(new CustomEvent(`luzmo-options-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:t?{options:e,interaction:t}:{options:e}}))},this._interactionOptionKeys=/* @__PURE__ */ new Map,this._handleInteraction=e=>{let{id:t}=e.detail,n=this._interactionOptionKeys.get(t)??this._renderedOptionKey;e.stopPropagation(),e.type===`luzmo-option-interaction-start`?this._interactionOptionKeys.set(t,n):this._interactionOptionKeys.delete(t),this.dispatchEvent(new CustomEvent(e.type,{bubbles:!0,composed:!0,detail:{...e.detail,optionKey:n}}))}}static{this.styles=f(O)}endInteraction(){for(let e of this.renderRoot?.children??[])e.endInteraction?.()}get _renderedOptionKey(){return this.customOptionConfiguration?.key??this.optionKey??``}render(){return this._loadItemConfig.render({pending:()=>l`
|
|
264
|
+
<p role="status">Loading...</p>
|
|
265
|
+
`,complete:e=>ie({controlType:e?.type,optionKey:this._renderedOptionKey,controlInfo:e,options:this.options,getOptions:this._getLatestOptions,slots:this.slots,theme:this._fullTheme??this.theme,language:this.language,translations:this._effectiveTranslations,size:this.size,changeCallback:this.changedOptions,liveInteractions:this.liveInteractions,interactionCallback:this._handleInteraction}),error:t=>(console.error(t),l`
|
|
266
|
+
<span class="sr-only" role="alert">${e(`Failed to load option`,{desc:`Error message when item option fails to load`})}</span>
|
|
267
|
+
`)})}_getTranslationOverrides(e){if(e&&typeof e==`object`&&!(`groups`in e||`options`in e)&&!this._isOptionTranslation(e))return e}_mergeOptionTranslations(e,t){if(!e)return t;if(!t)return e;let n={...e},r=e=>{t[e]!==void 0&&(n[e]=t[e])};return r(`label`),r(`description`),r(`placeholder`),r(`tooltip`),n.extraLabel=this._mergeTranslationValue(e.extraLabel,t.extraLabel),n.extraLabelTooltip=this._mergeTranslationValue(e.extraLabelTooltip,t.extraLabelTooltip),n.enum=this._mergeTranslationRecord(e.enum,t.enum),n}_mergeTranslationValue(e,t){return t===void 0?e:typeof t==`string`?t:t&&typeof t==`object`?e&&typeof e==`object`?{...e,...t}:t:e}_mergeTranslationRecord(e,t){return t===void 0?e:e&&typeof e==`object`?{...e,...t}:t}_getOptionTranslation(e){if(e&&typeof e==`object`&&this._isOptionTranslation(e))return e}_isOptionTranslation(e){if(!e||typeof e!=`object`)return!1;let t=e,n=/* @__PURE__ */ new Set([`label`,`description`,`placeholder`,`tooltip`,`extraLabel`,`extraLabelTooltip`,`enum`]),r=Object.keys(t);if(r.length===0||!r.every(e=>n.has(e)))return!1;for(let e of[`label`,`description`,`placeholder`,`tooltip`])if(e in t&&typeof t[e]!=`string`)return!1;for(let e of[`extraLabel`,`extraLabelTooltip`]){let n=t[e];if(e in t&&typeof n!=`string`&&(typeof n!=`object`||!n))return!1}return!(`enum`in t&&(typeof t.enum!=`object`||t.enum===null))}};t([d({type:String,reflect:!0})],Z.prototype,`language`,void 0),t([d({type:String,reflect:!0,attribute:`item-type`})],Z.prototype,`itemType`,void 0),t([d({type:String,reflect:!0,attribute:`option-key`})],Z.prototype,`optionKey`,void 0),t([d({type:Object,reflect:!1})],Z.prototype,`customOptionConfiguration`,void 0),t([d({type:Object,reflect:!1})],Z.prototype,`customTranslations`,void 0),t([d({type:Object})],Z.prototype,`options`,void 0),t([d({type:Object})],Z.prototype,`slots`,void 0),t([d({type:Object})],Z.prototype,`theme`,void 0),t([d({type:String,attribute:`api-url`,reflect:!0})],Z.prototype,`apiUrl`,void 0),t([d({type:String,attribute:`auth-key`,reflect:!0})],Z.prototype,`authKey`,void 0),t([d({type:String,attribute:`auth-token`,reflect:!0})],Z.prototype,`authToken`,void 0),t([d({type:String,reflect:!0})],Z.prototype,`size`,void 0),t([d({type:Boolean,reflect:!0,attribute:`live-interactions`})],Z.prototype,`liveInteractions`,void 0),customElements.get(`luzmo-item-option`)||customElements.define(`luzmo-item-option`,Z);var oe=`:host{font-size:var(--luzmo-item-option-panel-font-size,var(--luzmo-font-size))}:host luzmo-divider{margin:var(--luzmo-item-option-panel-divider-vertical-margin,calc(var(--luzmo-spacing-5) + var(--luzmo-spacing-2))) 0;display:block}:host luzmo-item-option{margin:var(--luzmo-item-option-divider-vertical-margin,var(--luzmo-spacing-4)) 0;display:block}:host([size=s]){font-size:var(--luzmo-item-option-panel-font-size-s,var(--luzmo-font-size-s))}:host([size=l]){font-size:var(--luzmo-item-option-panel-font-size-l,var(--luzmo-font-size-l))}:host([size=xl]){font-size:var(--luzmo-item-option-panel-font-size-xl,var(--luzmo-font-size-xl))}`,Q=class extends n{constructor(...e){super(...e),this._loadItemConfig=new s(this,{task:async([e,t,n,r])=>{let i=this._getTranslationOverrides(r),a=this._getTranslationsFile(r),o=this._hasCustomTranslationsFile;if(this._translationOverrides=i??a?.options,this._groupTranslationOverrides=i,this._hasCustomTranslationsFile=!!a,n)return this._isCustomOptionsConfiguration=!0,this._optionsConfiguration=n,this._translations=a??{},this._itemTypeLoaded=void 0,this._languageLoaded=void 0,{config:this._optionsConfiguration};if(e){let n=e!==this._itemTypeLoaded,r=e!==this._itemTypeLoaded||t!==this._languageLoaded||!a&&o;if(n&&(this._optionsConfiguration=await _(e)??[],this._itemTypeLoaded=e),a)this._translations=a,this._languageLoaded=t;else if(r){let n=t??`en`;this._translations=await v(e,n,!0)??{},this._languageLoaded=t}this._isCustomOptionsConfiguration=!1}else this._optionsConfiguration=[],this._translations=a??{};return{config:this._optionsConfiguration}},args:()=>[this.itemType,this.language,this.customOptionsConfiguration,this.customTranslations]}),this.language=`en`,this.options={},this.slots=[],this.size=`m`,this.liveInteractions=!1,this._optionsConfiguration=[],this._translations={},this._hasCustomTranslationsFile=!1,this.renderAllGroups=e=>{if(!Array.isArray(e))return l`
|
|
268
|
+
|
|
269
|
+
`;let t=e?.map(e=>{if(e?.children)return this.renderGroup(e)});return e&&e.length>0?l`<luzmo-accordion
|
|
270
|
+
variant="highlight"
|
|
271
|
+
.size=${this.size}
|
|
272
|
+
density="compact"
|
|
273
|
+
allow-multiple
|
|
274
|
+
no-content-padding
|
|
275
|
+
header-case="uppercase"
|
|
276
|
+
>${t}</luzmo-accordion
|
|
277
|
+
>`:l`
|
|
278
|
+
|
|
279
|
+
`},this.renderGroup=e=>{if(typeof e?.visibleIf==`function`&&!e.visibleIf({options:this.options,slots:this.slots,theme:this.theme}))return l`
|
|
280
|
+
|
|
281
|
+
`;let t=e=>e?.map(e=>{if(typeof e?.visibleIf==`function`&&!e.visibleIf({options:this.options,slots:this.slots,theme:this.theme}))return l`
|
|
282
|
+
|
|
283
|
+
`;if(e?.control&&e.key)return this.renderOptionControl(e.key);if(e?.type===`divider`)return this.renderDivider();if(e?.type===`group`)return l`<luzmo-accordion
|
|
284
|
+
variant="highlight-child"
|
|
285
|
+
.size=${this.size}
|
|
286
|
+
density="compact"
|
|
287
|
+
allow-multiple
|
|
288
|
+
no-content-padding
|
|
289
|
+
header-case="default"
|
|
290
|
+
>${this.renderGroup(e)}</luzmo-accordion
|
|
291
|
+
>`}),n=e.key?this._groupTranslationOverrides?.[e.key]?.label??this._translations.groups?.[e.key]?.label??e.label??e.key:e.label??``;return l`<luzmo-accordion-item label=${n} ?open=${e.open}>
|
|
292
|
+
${t(e.children)}
|
|
293
|
+
</luzmo-accordion-item>`},this._getLatestOptions=()=>this.options??{},this.changedOptions=e=>{let t=e?.detail?.options,n=e?.detail?.interaction;this.options=e?.detail?.options,e.preventDefault(),e.stopPropagation(),this.dispatchEvent(new CustomEvent(`luzmo-options-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:n?{options:t,interaction:n}:{options:t}}))},this.renderOptionControl=e=>{let t=this._isCustomOptionsConfiguration,n=t?D(e,this.customOptionsConfiguration??[],!0):void 0,r=t?this._getOptionTranslation(e):this._translationOverrides;return l`<luzmo-item-option
|
|
294
|
+
class="control"
|
|
295
|
+
.itemType=${t?void 0:this.itemType}
|
|
296
|
+
.optionKey=${e}
|
|
297
|
+
.options=${this.options}
|
|
298
|
+
.latestOptions=${this._getLatestOptions}
|
|
299
|
+
.customOptionConfiguration=${n}
|
|
300
|
+
.customTranslations=${r}
|
|
301
|
+
.slots=${this.slots}
|
|
302
|
+
.theme=${this.theme}
|
|
303
|
+
.size=${this.size}
|
|
304
|
+
.language=${this.language}
|
|
305
|
+
.apiUrl=${this.apiUrl}
|
|
306
|
+
.authKey=${this.authKey}
|
|
307
|
+
.authToken=${this.authToken}
|
|
308
|
+
?live-interactions=${this.liveInteractions}
|
|
309
|
+
@luzmo-options-changed=${this.changedOptions}
|
|
310
|
+
></luzmo-item-option>`},this.renderDivider=()=>l`
|
|
311
|
+
<luzmo-divider></luzmo-divider>
|
|
312
|
+
`}static{this.styles=f(oe)}endInteraction(){for(let e of this.renderRoot?.querySelectorAll(`luzmo-item-option`)??[])e.endInteraction?.()}render(){return this._loadItemConfig.render({pending:()=>l`
|
|
313
|
+
<p role="status">Loading...</p>
|
|
314
|
+
`,complete:e=>this.renderAllGroups(e.config),error:e=>(console.error(e),l`
|
|
315
|
+
|
|
316
|
+
`)})}_getOptionTranslation(e){return this._translationOverrides?.[e]??this._translations.options?.[e]}_getTranslationsFile(e){if(e&&typeof e==`object`&&(`groups`in e||`options`in e))return e}_getTranslationOverrides(e){if(e&&typeof e==`object`&&!(`groups`in e||`options`in e))return e}};t([d({type:String,reflect:!0})],Q.prototype,`language`,void 0),t([d({type:String,reflect:!0,attribute:`item-type`})],Q.prototype,`itemType`,void 0),t([d({type:Object})],Q.prototype,`options`,void 0),t([d({type:Object})],Q.prototype,`slots`,void 0),t([d({type:Object,reflect:!1})],Q.prototype,`customOptionsConfiguration`,void 0),t([d({type:Object,reflect:!1})],Q.prototype,`customTranslations`,void 0),t([d({type:Object})],Q.prototype,`theme`,void 0),t([d({type:String,reflect:!0})],Q.prototype,`size`,void 0),t([d({type:String,attribute:`api-url`,reflect:!0})],Q.prototype,`apiUrl`,void 0),t([d({type:String,attribute:`auth-key`,reflect:!0})],Q.prototype,`authKey`,void 0),t([d({type:String,attribute:`auth-token`,reflect:!0})],Q.prototype,`authToken`,void 0),t([d({type:Boolean,reflect:!0,attribute:`live-interactions`})],Q.prototype,`liveInteractions`,void 0);var $=/* @__PURE__ */ c({LuzmoItemOptionPanel:()=>Q});customElements.get(`luzmo-item-option-panel`)||customElements.define(`luzmo-item-option-panel`,Q);export{Q as LuzmoItemOptionPanel,E as a,y as c,C as i,b as l,ee as n,S as o,w as r,T as s,$ as t,x as u};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
import{r as e}from"./version-BW4Ixl63.js";import{t}from"./option-interaction-controller-BslAXAHF.js";import{t as n}from"./item-option-base-CRUxNhJQ.js";import{html as r,property as i,query as a,unsafeCSS as o}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/lit.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/slider.js";var s=`:host{overflow:visible}luzmo-slider{contain:layout}`,c=class extends n{constructor(...e){super(...e),this.value=0,this.default=0,this.min=0,this.max=100,this.step=100,this.debounce=200,this.liveInteractions=!1,this._interaction=new t(this),this._debounceTimeout=null}static get styles(){return[...super.styles,o(s)]}willUpdate(e){super.willUpdate(e),e.has(`liveInteractions`)&&(this.liveInteractions?this._clearDebounce():this.endInteraction())}disconnectedCallback(){super.disconnectedCallback(),this._clearDebounce()}_clearDebounce(){this._debounceTimeout&&=(clearTimeout(this._debounceTimeout),null)}endInteraction(){this._slider?.endInteraction?.(),this._interaction.endAll()}_emitOptionChanged(e,t){let n=typeof this.toValue==`function`?this.toValue(e):e;this._lastEmittedSliderValue=e,this.dispatchEvent(new CustomEvent(`luzmo-option-changed`,{bubbles:!0,composed:!0,cancelable:!0,detail:t?{value:n,interaction:t}:{value:n}}))}_handleInteractionStart(e){this.liveInteractions&&this._interaction.start(e.currentTarget,e.detail,this._slider.value)}_handleInteractionEnd(e){this._interaction.end(e.currentTarget,e.detail)}_handleInteractionCancel(e){this._interaction.cancel(e.currentTarget,e.detail)}_handleEvent(e){let t=this._slider.value;this.liveInteractions?this._interaction.update(e.currentTarget,t,e=>this._emitOptionChanged(t,e)):(e.type!==`change`||this._debounceTimeout||!Object.is(t,this._lastEmittedSliderValue))&&(this._debounceTimeout&&=(clearTimeout(this._debounceTimeout),null),this.debounce>0?this._debounceTimeout=setTimeout(()=>{this._debounceTimeout=null,this._emitOptionChanged(t)},this.debounce):this._emitOptionChanged(t))}renderController(){let e=typeof this.parseValue==`function`?this.parseValue(this.value):this.value,t=typeof this.parseValue==`function`?this.parseValue(this.default):this.default;return r`
|
|
3
|
+
<luzmo-slider
|
|
4
|
+
id="luzmo-item-option-control"
|
|
5
|
+
.label=${this.label}
|
|
6
|
+
.min=${this.min}
|
|
7
|
+
.max=${this.max}
|
|
8
|
+
.value=${e??t}
|
|
9
|
+
.step=${this.step}
|
|
10
|
+
.size=${this.size}
|
|
11
|
+
.disabled=${this.disabled}
|
|
12
|
+
@input=${this._handleEvent}
|
|
13
|
+
@change=${this._handleEvent}
|
|
14
|
+
@luzmo-interaction-start=${this._handleInteractionStart}
|
|
15
|
+
@luzmo-interaction-end=${this._handleInteractionEnd}
|
|
16
|
+
@luzmo-interaction-cancel=${this._handleInteractionCancel}
|
|
17
|
+
></luzmo-slider>
|
|
18
|
+
`}};e([i({type:Number,reflect:!0})],c.prototype,`value`,void 0),e([i({type:Number,reflect:!0})],c.prototype,`default`,void 0),e([i({type:Number,reflect:!0})],c.prototype,`min`,void 0),e([i({type:Number,reflect:!0})],c.prototype,`max`,void 0),e([i({type:Number,reflect:!0})],c.prototype,`step`,void 0),e([i({type:Number,reflect:!0})],c.prototype,`debounce`,void 0),e([i({type:Boolean,reflect:!0,attribute:`live-interactions`})],c.prototype,`liveInteractions`,void 0),e([i()],c.prototype,`parseValue`,void 0),e([i()],c.prototype,`toValue`,void 0),e([a(`luzmo-slider`)],c.prototype,`_slider`,void 0),customElements.get(`luzmo-item-option-slider`)||customElements.define(`luzmo-item-option-slider`,c);export{c as LuzmoItemOptionSlider};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{n as e}from"./is-same-option-value-Di-A7Wmg.js";var t=0,n=e=>typeof e==`object`&&e?structuredClone(e):e,r=class{constructor(t,n=e){this._host=t,this._isSame=n,this._open=[],this._hasDiscreteValue=!1,t.addController(this)}get active(){return this._open.length>0}hostUpdated(){this._hasDiscreteValue=!1;for(let e of this._open.filter(({source:e})=>e instanceof Node&&!e.isConnected))this.end(e.source,{id:e.sourceId})}hostDisconnected(){this.endAll()}start(e,r,i){if(this._find(e,r.id))return;let a=`luzmo-option-interaction-${++t}`;this._open.push({id:a,source:e,sourceId:r.id,startValue:n(i),lastValue:n(i),started:!1})}update(e,t,r,i=t){let a=[...this._open].reverse().find(t=>t.source===e);if(a){if(this._isSame(i,a.lastValue)||!a.started&&(a.started=!0,this._dispatch(`luzmo-option-interaction-start`,{id:a.id}),!this._open.includes(a)))return;a.lastValue=n(i),this._rememberEmitted(t),r({id:a.id})}else this._hasDiscreteValue&&this._isSame(t,this._discreteValue)||(this._rememberEmitted(t),r())}end(e,t){let n=this._take(e,t.id);n?.started&&this._dispatch(`luzmo-option-interaction-end`,{id:n.id,changed:!this._isSame(n.lastValue,n.startValue)})}cancel(e,t){let n=this._take(e,t.id);n?.started&&this._dispatch(`luzmo-option-interaction-cancel`,{id:n.id,changed:!1})}endAll(){for(let e of this._open)this.end(e.source,{id:e.sourceId})}_rememberEmitted(e){this._hasDiscreteValue=!0,this._discreteValue=n(e)}_find(e,t){return this._open.find(n=>n.source===e&&n.sourceId===t)}_take(e,t){let n=this._find(e,t);return n&&(this._open=this._open.filter(e=>e!==n)),n}_dispatch(e,t){this._host.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}};export{r as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{a as e,c as t,t as n,u as r}from"./helpers-DalWg6k7.js";import{t as i}from"./info-tooltip-options.config-DtfU5ZO8.js";import{n as a,t as o}from"./color-palettes-B41FvzWH.js";import{t as s}from"./map-tile-providers-DZT1QZX_.js";import{n as c,r as l,t as u}from"./color-range-utils-
|
|
2
|
+
import{a as e,c as t,t as n,u as r}from"./helpers-DalWg6k7.js";import{t as i}from"./info-tooltip-options.config-DtfU5ZO8.js";import{n as a,t as o}from"./color-palettes-B41FvzWH.js";import{t as s}from"./map-tile-providers-DZT1QZX_.js";import{n as c,r as l,t as u}from"./color-range-utils-DxOtqAKB.js";var d=(e,t)=>{let n=`colors${t}`;return o()[e]?.[n]},f=({slots:e})=>Array.isArray(e)&&e?.length>0?e?.find(e=>e?.name===`legend`)?.content?.length===0:!0,p=({slots:e})=>{if(Array.isArray(e)&&e?.length>0){let t=e?.find(e=>e?.name===`legend`);if(t){let e=t?.content;if(e)return e?.some(e=>e?.type===`numeric`)}}return!1},m=[{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}},{key:`lineWeight`,control:{type:`slider`,label:`Line weight`,default:4,min:1,max:8,step: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?.name||`Basic`,toValue:e=>s[e]??{}}}]},{key:`colors`,type:`group`,open:!0,children:[{key:`opacity`,control:{type:`slider`,label:`Opacity`,default:.8,min:0,max:1,step:.01}},{key:`color`,control:{type:`color-picker`,label:`Route color`,default:({theme:e})=>r(e),extraLabel:({options:t,theme:n})=>e(t,n,`color`),extraLabelHasClickAction:({options:e,theme:t})=>n(e,t,`color`),extraLabelClickAction:({options:e,theme:n})=>t(e,n,`color`)},visibleIf:f},{key:`colorsClassType`,control:{type:`picker`,label:`Colors type`,default:`sequential`,enum:[`sequential`,`divergent`,`manual`],calculateValue:({options:e})=>e?.colorsClass===`manual`?`manual`:o()?.[e?.colorsClass]?.type??`sequential`,toOptions:({options:e,value:t})=>{let n=e?.colorsClass??`PuBu`,r=e?.numberClasses??5,i=c(e?.manualValues?.ranges),s=n===`manual`?`manual`:n,d;t===`manual`?d=`manual`:t!==o()?.[e?.colorsClass]?.type&&(d=a(t??`sequential`)[0]);let f={...e,colorsClass:d};if(t===`manual`||e?.classification===`manual`){let e=u(r,t===`manual`?s:d,i);f.manualValues={...f.manualValues,ranges:l(e)}}else delete f?.manualValues?.ranges;return f}},visibleIf:p},{key:`colorsClass`,control:{type:`color-palette-picker`,label:`Color palette`,hideLabel:!0,default:({options:e})=>{let t=o()?.[e?.colorsClass]?.type;return a(t??`sequential`)[0]},enum:({options:e})=>{let t=o()?.[e?.colorsClass]?.type;return a(t??`sequential`)},toOptions:({options:e,value:t})=>{let n={...e,colorsClass:t};if(e?.classification===`manual`){let r=d(t,e?.numberClasses??5);n.manualValues={...n.manualValues,ranges:e?.manualValues?.ranges?.map(e=>{let t=typeof e.val==`number`?e.val:void 0;return{...e,color:t===void 0?void 0:r?.[t]}})}}return n}},visibleIf:({options:e,slots:t})=>p({slots:t})&&e?.colorsClass!==`manual`},{key:`manualValues.ranges`,control:{type:`color-range`,editRangeSize:!1,debounce:500,noValues:!0,noAlphaChannel:!0,label:`Manual range colors`,hideLabel:!0},calculateValue:({options:e})=>u(e?.numberClasses,e?.colorsClass,c(e?.manualValues?.ranges)),toOptions:({options:e,value:t})=>({...e,manualValues:{...e.manualValues,ranges:l(t)}}),visibleIf:({options:e,slots:t})=>p({slots:t})&&e?.colorsClass===`manual`}]},{key:`classification`,type:`group`,open:!0,children:[{key:`numberClasses`,control:{type:`picker`,label:`Number of classes`,default:`5`,enum:[`3`,`4`,`5`,`6`,`7`,`8`,`9`],parseValue:e=>e?.toString()??`5`,toOptions:({options:e,value:t})=>{let n=Number.parseInt(t,10)||5,r={...e,numberClasses:n};if(e?.classification===`manual`||e?.colorsClass===`manual`){let n=u(t,e?.colorsClass,c(e?.manualValues?.ranges));r.manualValues={...r.manualValues,ranges:l(n)}}return r}},visibleIf:p},{key:`classification`,control:{type:`picker`,label:`Method`,default:`interval`,enum:[`interval`,`manual`,`quantile`,`continuous`],toOptions:({options:e,value:t})=>{let n={...e,classification:t};if(t===`manual`||e?.colorsClass===`manual`){let t=u(e?.numberClasses,e?.colorsClass,c(e?.manualValues?.ranges));n.manualValues={...n.manualValues,ranges:l(t)}}else delete n?.manualValues?.ranges;return n}},visibleIf:p},{key:`manualValues.rangesValues`,control:{type:`color-range`,editRangeSize:!1,debounce:500,noValues:!1,readOnlyColorPicker:!0,label:`Manual range values`,hideLabel:!0,calculateValue:({options:e})=>u(e?.numberClasses,e?.colorsClass,c(e?.manualValues?.ranges)),toOptions:({options:e,value:t})=>({...e,manualValues:{...e.manualValues,ranges:l(t)}})},visibleIf:({options:e,slots:t})=>p({slots:t})&&e?.classification===`manual`}],visibleIf:p},i()];export{m as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{a as e,c as t,t as n,u as r}from"./helpers-DalWg6k7.js";import{t as i}from"./info-tooltip-options.config-DtfU5ZO8.js";import{n as a,t as o}from"./color-palettes-B41FvzWH.js";import{t as s}from"./map-tile-providers-DZT1QZX_.js";import{n as c,r as l,t as u}from"./color-range-utils-
|
|
2
|
+
import{a as e,c as t,t as n,u as r}from"./helpers-DalWg6k7.js";import{t as i}from"./info-tooltip-options.config-DtfU5ZO8.js";import{n as a,t as o}from"./color-palettes-B41FvzWH.js";import{t as s}from"./map-tile-providers-DZT1QZX_.js";import{n as c,r as l,t as u}from"./color-range-utils-DxOtqAKB.js";var d=(e,t)=>{let n=`colors${t}`;return o()[e]?.[n]},f=({slots:e})=>Array.isArray(e)&&e?.length>0?e?.find(e=>e?.name===`color`)?.content?.length===0:!0,p=({slots:e})=>Array.isArray(e)&&e?.length>0?(e?.find(e=>e?.name===`color`)?.content?.length??0)>0:!1,m=({slots:e})=>{if(Array.isArray(e)&&e?.length>0){let t=e?.find(e=>e?.name===`color`);if(t){let e=t?.content;if(e)return e?.some(e=>e?.type===`numeric`)}}return!1},h=[{key:`general`,type:`group`,open:!0,children:[{key:`display.title`,control:{type:`switch`,label:`Title`,default:!0}},{key:`display.legend`,control:{type:`switch`,label:`Legend`,default:!0},visibleIf:p},{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?.name||`Basic`,toValue:e=>s[e]??{}}}]},{key:`spike`,type:`group`,open:!0,children:[{key:`color`,control:{type:`color-picker`,label:`Spike color`,default:({theme:e})=>r(e),extraLabel:({options:t,theme:n})=>e(t,n,`color`),extraLabelHasClickAction:({options:e,theme:t})=>n(e,t,`color`),extraLabelClickAction:({options:e,theme:n})=>t(e,n,`color`)},visibleIf:f},{key:`spikeWidth`,control:{type:`slider`,label:`Width`,default:30,min:1,max:100,step:1}},{key:`spikeHeight`,control:{type:`slider`,label:`Height`,default:150,min:1,max:350,step:1}},{key:`strokeOpacity`,control:{type:`slider`,label:`Stroke opacity`,default:.9,min:.1,max:1,step:.01}},{key:`fillOpacity`,control:{type:`slider`,label:`Fill opacity`,default:.5,min:.1,max:1,step:.01}}]},{key:`colors`,type:`group`,open:!0,children:[{key:`colorsClassType`,control:{type:`picker`,label:`Colors type`,default:`sequential`,enum:[`sequential`,`divergent`,`manual`],calculateValue:({options:e})=>e?.colorsClass===`manual`?`manual`:o()?.[e?.colorsClass]?.type??`sequential`,toOptions:({options:e,value:t})=>{let n=e?.colorsClass??`PuBu`,r=e?.numberClasses??5,i=c(e?.manualValues?.ranges),s=n===`manual`?`manual`:n,d;t===`manual`?d=`manual`:t!==o()?.[e?.colorsClass]?.type&&(d=a(t??`sequential`)[0]);let f={...e,colorsClass:d};if(t===`manual`||e?.classification===`manual`){let e=u(r,t===`manual`?s:d,i);f.manualValues={...f.manualValues,ranges:l(e)}}else delete f?.manualValues?.ranges;return f}},visibleIf:m},{key:`colorsClass`,control:{type:`color-palette-picker`,label:`Color palette`,hideLabel:!0,default:({options:e})=>{let t=o()?.[e?.colorsClass]?.type;return a(t??`sequential`)[0]},enum:({options:e})=>{let t=o()?.[e?.colorsClass]?.type;return a(t??`sequential`)},toOptions:({options:e,value:t})=>{let n={...e,colorsClass:t};if(e?.classification===`manual`){let r=d(t,e?.numberClasses??5);n.manualValues={...n.manualValues,ranges:e?.manualValues?.ranges?.map(e=>{let t=typeof e.val==`number`?e.val:void 0;return{...e,color:t===void 0?void 0:r?.[t]}})}}return n}},visibleIf:({options:e,slots:t})=>m({slots:t})&&e?.colorsClass!==`manual`},{key:`manualValues.ranges`,control:{type:`color-range`,editRangeSize:!1,debounce:500,noValues:!0,noAlphaChannel:!0,label:`Manual range colors`,hideLabel:!0},calculateValue:({options:e})=>u(e?.numberClasses,e?.colorsClass,c(e?.manualValues?.ranges)),toOptions:({options:e,value:t})=>({...e,manualValues:{...e.manualValues,ranges:l(t)}}),visibleIf:({options:e,slots:t})=>m({slots:t})&&e?.colorsClass===`manual`}],visibleIf:m},{key:`classification`,type:`group`,open:!0,children:[{key:`numberClasses`,control:{type:`picker`,label:`Number of classes`,default:`5`,enum:[`3`,`4`,`5`,`6`,`7`,`8`,`9`],parseValue:e=>e?.toString()??`5`,toOptions:({options:e,value:t})=>{let n=Number.parseInt(t,10)||5,r={...e,numberClasses:n};if(e?.classification===`manual`||e?.colorsClass===`manual`){let n=u(t,e?.colorsClass,c(e?.manualValues?.ranges));r.manualValues={...r.manualValues,ranges:l(n)}}return r}},visibleIf:m},{key:`classification`,control:{type:`picker`,label:`Method`,default:`interval`,enum:[`interval`,`manual`,`quantile`,`continuous`],toOptions:({options:e,value:t})=>{let n={...e,classification:t};if(t===`manual`||e?.colorsClass===`manual`){let t=u(e?.numberClasses,e?.colorsClass,c(e?.manualValues?.ranges));n.manualValues={...n.manualValues,ranges:l(t)}}else delete n?.manualValues?.ranges;return n}},visibleIf:m},{key:`manualValues.rangesValues`,control:{type:`color-range`,editRangeSize:!1,debounce:500,noValues:!1,readOnlyColorPicker:!0,label:`Manual range values`,hideLabel:!0,calculateValue:({options:e})=>u(e?.numberClasses,e?.colorsClass,c(e?.manualValues?.ranges)),toOptions:({options:e,value:t})=>({...e,manualValues:{...e.manualValues,ranges:l(t)}})},visibleIf:({options:e,slots:t})=>m({slots:t})&&e?.classification===`manual`}],visibleIf:m},{key:`legend`,type:`group`,open:!1,children:[{key:`legend.size`,control:{type:`action-button-group`,label:`Size`,default:[`M`],values:{S:{buttonText:`S`,label:`Small`},M:{buttonText:`M`,label:`Medium`},L:{buttonText:`L`,label:`Large`}},selects:`single`},visibleIf:({options:e})=>e?.display?.legend!==!1},{key:`legend.position`,control:{type:`position-picker`,label:`Position`,default:`bottomLeft`,enum:[`topLeft`,`top`,`topRight`,`right`,`bottomRight`,`bottom`,`bottomLeft`,`left`]},visibleIf:({options:e})=>e?.display?.legend!==!1}],visibleIf:p},i()];export{h as default};
|