@luzmo/analytics-components-kit 1.2.1 → 1.4.0
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 -3
- package/angular/components/add-to-dashboard.ts +20 -6
- package/angular/components/data-fields-select.ts +5 -0
- package/angular/components/interactive-viz-item.ts +89 -24
- package/angular/components/item-grid-item-actions-menu.ts +5 -0
- package/angular/components/item-grid.ts +7 -0
- package/angular/components/item-option-color-picker.ts +28 -28
- package/angular/components/item-option-guidelines.ts +22 -1
- package/angular/components/item-option-multi-language-field.ts +7 -7
- package/angular/components/item-option-number-field.ts +14 -14
- package/angular/components/item-option-positions-number-field.ts +14 -14
- package/angular/components/item-option-radio-button-group.ts +7 -7
- package/angular/components/item-option-text-field.ts +7 -7
- package/angular/components/item-slot-picker-panel.ts +1 -1
- package/angular/components/item-slot-picker.ts +7 -7
- package/angular/esm/components/add-to-dashboard.d.ts +8 -4
- package/angular/esm/components/add-to-dashboard.js +23 -7
- package/angular/esm/components/data-fields-select.d.ts +2 -0
- package/angular/esm/components/data-fields-select.js +4 -0
- package/angular/esm/components/interactive-viz-item.d.ts +32 -11
- package/angular/esm/components/interactive-viz-item.js +99 -28
- package/angular/esm/components/item-grid-item-actions-menu.d.ts +2 -0
- package/angular/esm/components/item-grid-item-actions-menu.js +4 -0
- package/angular/esm/components/item-grid.d.ts +3 -1
- package/angular/esm/components/item-grid.js +9 -1
- package/angular/esm/components/item-option-color-picker.d.ts +10 -10
- package/angular/esm/components/item-option-color-picker.js +34 -34
- package/angular/esm/components/item-option-guidelines.d.ts +8 -2
- package/angular/esm/components/item-option-guidelines.js +26 -2
- package/angular/esm/components/item-option-multi-language-field.d.ts +3 -3
- package/angular/esm/components/item-option-multi-language-field.js +10 -10
- package/angular/esm/components/item-option-number-field.d.ts +5 -5
- package/angular/esm/components/item-option-number-field.js +18 -18
- package/angular/esm/components/item-option-positions-number-field.d.ts +5 -5
- package/angular/esm/components/item-option-positions-number-field.js +18 -18
- package/angular/esm/components/item-option-radio-button-group.d.ts +3 -3
- package/angular/esm/components/item-option-radio-button-group.js +10 -10
- package/angular/esm/components/item-option-text-field.d.ts +3 -3
- package/angular/esm/components/item-option-text-field.js +10 -10
- package/angular/esm/components/item-slot-picker-panel.d.ts +1 -1
- package/angular/esm/components/item-slot-picker-panel.js +1 -1
- package/angular/esm/components/item-slot-picker.d.ts +3 -3
- package/angular/esm/components/item-slot-picker.js +9 -9
- package/angular/package.json +2 -2
- package/components/add-to-dashboard/dashboard-actions.d.ts +2 -1
- package/components/add-to-dashboard/index.cjs +1 -1
- package/components/add-to-dashboard/index.js +1 -1
- package/components/{add-to-dashboard-NwsCPIlg.cjs → add-to-dashboard-BtzTZdjN.cjs} +1 -1
- package/components/{add-to-dashboard-NcVHlqrc.js → add-to-dashboard-Bu6S3qVz.js} +125 -120
- package/components/chart-helpers-BHxQbLBw.cjs +20 -0
- package/components/{chart-helpers-Dng_LGfq.js → chart-helpers-BKeMLhov.js} +53 -39
- package/components/filters/index.cjs +1 -1
- package/components/filters/index.js +1 -1
- package/components/{filters-CxIzuI5q.js → filters-DEpmh9Nj.js} +113 -102
- package/components/filters-LDXhe1Bp.cjs +187 -0
- package/components/index.cjs +1 -1
- package/components/index.js +6 -6
- package/components/interactive-viz-item/helpers/chart-helpers.d.ts +2 -1
- package/components/interactive-viz-item/index.cjs +1 -1
- package/components/interactive-viz-item/index.d.ts +1 -1
- package/components/interactive-viz-item/index.js +3 -3
- package/components/interactive-viz-item/interactive-viz-item.d.ts +47 -1
- package/components/interactive-viz-item/types.d.ts +4 -0
- package/components/interactive-viz-item-Cc3Ix95e.js +630 -0
- package/components/interactive-viz-item-SF12d97t.cjs +269 -0
- package/components/item-grid/item-grid.d.ts +1 -0
- package/components/item-slot-picker-panel/index.cjs +1 -1
- package/components/item-slot-picker-panel/index.js +1 -1
- package/components/item-slot-picker-panel/item-slot-picker-panel.d.ts +19 -1
- package/components/item-slot-picker-panel-Cw3UCK03.cjs +84 -0
- package/components/{item-slot-picker-panel-fJqEmxeD.js → item-slot-picker-panel-DprM9Rli.js} +64 -33
- package/custom-elements.json +3051 -2531
- package/grid-core/item-grid-base.d.ts +5 -4
- package/package.json +2 -2
- package/react/package.json +2 -2
- package/standalone/add-to-dashboard.js +40 -40
- package/standalone/chunks/{chart-helpers-DsIGsaDc.js → chart-helpers-DZsidiCl.js} +2 -2
- package/standalone/chunks/{choropleth-map-options.config-rUJsEJcm.js → choropleth-map-options.config-CDMjKnJD.js} +1 -1
- package/standalone/chunks/{color-range-utils-DxOtqAKB.js → color-range-utils-BVyHBRiq.js} +1 -1
- package/standalone/chunks/data-broker-DpSrH3IP.js +2 -0
- package/standalone/chunks/de-BkB0q1Eg.js +2 -0
- package/standalone/chunks/display-settings-binning-DhHlclWH.js +38 -0
- package/standalone/chunks/display-settings-datetime-C8xvOvi4.js +199 -0
- package/standalone/chunks/display-settings-grand-totals-CUpigDcs.js +26 -0
- package/standalone/chunks/display-settings-numeric-BLWF54Jx.js +172 -0
- package/standalone/chunks/display-settings-period-over-period-COd4tvUw.js +209 -0
- package/standalone/chunks/embed-Bv1ps-EM.js +260 -0
- package/standalone/chunks/en-DNsyAwgq.js +2 -0
- package/standalone/chunks/en-GB-Di3OzVdL.js +2 -0
- package/standalone/chunks/en-US-DNsyAwgq.js +2 -0
- package/standalone/chunks/es-Bo0jStZn.js +2 -0
- package/standalone/chunks/{filters-DKgJcQGP.js → filters-lhg_WVDK.js} +108 -108
- package/standalone/chunks/{formula-codemirror-BbyvNEVD.js → formula-codemirror-DZMzLE2I.js} +17 -17
- package/standalone/chunks/fr-Co_qVhhV.js +2 -0
- package/standalone/chunks/{heat-map-options.config-D93AeYFi.js → heat-map-options.config-DDQMD38W.js} +1 -1
- package/standalone/chunks/{heat-table-options.config-ZVML76FK.js → heat-table-options.config-B4K0Ygug.js} +1 -1
- package/standalone/chunks/{is-same-option-value-Di-A7Wmg.js → is-same-option-value-7kXNF4st.js} +1 -1
- package/standalone/chunks/item-option-action-button-group-Bl1HR1JK.js +35 -0
- package/standalone/chunks/item-option-base-DF24wTyv.js +38 -0
- package/standalone/chunks/item-option-color-palette-picker-MkIIn56p.js +22 -0
- package/standalone/chunks/item-option-color-picker-CxosMo_p.js +19 -0
- package/standalone/chunks/item-option-color-range-C7C70r4J.js +83 -0
- package/standalone/chunks/item-option-guidelines-iu8yWRzr.js +120 -0
- package/standalone/chunks/{item-option-multi-language-field-DPPpN2qg.js → item-option-multi-language-field-foanqCdr.js} +1 -1
- package/standalone/chunks/{item-option-number-field-CkqJjInE.js → item-option-number-field-ByVD4oq0.js} +1 -1
- package/standalone/chunks/item-option-panel-Bya-K7HH.js +316 -0
- package/standalone/chunks/{item-option-picker-BnwQPT9A.js → item-option-picker-CqNNVIML.js} +1 -1
- package/standalone/chunks/item-option-position-picker-BjCFVtDH.js +14 -0
- package/standalone/chunks/item-option-positions-number-field-BJJtXZL-.js +31 -0
- package/standalone/chunks/{item-option-radio-button-group-BkymJq3E.js → item-option-radio-button-group-C5bxsD85.js} +1 -1
- package/standalone/chunks/item-option-slider-DUXWz70B.js +18 -0
- package/standalone/chunks/item-option-switch-BHyJuOkP.js +12 -0
- package/standalone/chunks/{item-option-text-field-D7bkuhsv.js → item-option-text-field-rBZY9OX4.js} +1 -1
- package/standalone/chunks/{item-slot-picker-panel-D4BMxGs9.js → item-slot-picker-panel-BM82vSXi.js} +101 -99
- package/standalone/chunks/load-data-fields-for-datasets-DS9O1oyy.js +25 -0
- package/standalone/chunks/localize-DLl7tgQp.js +2 -0
- package/standalone/chunks/localized-decorator-DosMCCQo.js +2 -0
- package/standalone/chunks/{version-BW4Ixl63.js → localized-mixin-BWJj88bd.js} +1 -1
- package/standalone/chunks/nl-CQz2jrVx.js +2 -0
- package/standalone/chunks/{option-interaction-controller-BslAXAHF.js → option-interaction-controller-BuwRr21c.js} +1 -1
- package/standalone/chunks/{route-map-options.config-Dwy0JSVq.js → route-map-options.config-CGBkHnhM.js} +1 -1
- package/standalone/chunks/{spike-map-options.config-DFmuNxym.js → spike-map-options.config-CSenlJ_F.js} +1 -1
- package/standalone/interactive-viz-item.js +88 -84
- package/standalone/item-grid.js +10 -10
- package/standalone/manifest.json +46 -46
- package/types.d.ts +1 -1
- package/components/chart-helpers-ufZ6VbXs.cjs +0 -20
- package/components/filters-BPbPFOu5.cjs +0 -187
- package/components/interactive-viz-item-CwRRaCZB.js +0 -583
- package/components/interactive-viz-item-CxdrGRKc.cjs +0 -265
- package/components/item-slot-picker-panel-BhhN54IM.cjs +0 -82
- package/standalone/chunks/data-broker-DXDyIrj_.js +0 -2
- package/standalone/chunks/de-mdZT2W1G.js +0 -2
- package/standalone/chunks/display-settings-binning-Byffw2Kl.js +0 -38
- package/standalone/chunks/display-settings-datetime-CD52d6Sv.js +0 -199
- package/standalone/chunks/display-settings-grand-totals-Cky99LX9.js +0 -26
- package/standalone/chunks/display-settings-numeric-C9ea7Tgc.js +0 -172
- package/standalone/chunks/display-settings-period-over-period-BLSGumkD.js +0 -209
- package/standalone/chunks/embed-CBu7iQRx.js +0 -231
- package/standalone/chunks/en-CSboh17P.js +0 -2
- package/standalone/chunks/en-GB-HoXKQBOY.js +0 -2
- package/standalone/chunks/en-US-CSboh17P.js +0 -2
- package/standalone/chunks/es-Di5D8JFd.js +0 -2
- package/standalone/chunks/fr-DZku7iB9.js +0 -2
- package/standalone/chunks/item-option-action-button-group-BEAwPHVw.js +0 -35
- package/standalone/chunks/item-option-base-CRUxNhJQ.js +0 -38
- package/standalone/chunks/item-option-color-palette-picker-CBz61iZb.js +0 -22
- package/standalone/chunks/item-option-color-picker-lLvBPnKA.js +0 -19
- package/standalone/chunks/item-option-color-range-BqeatOei.js +0 -83
- package/standalone/chunks/item-option-guidelines-Cop8rM8y.js +0 -120
- package/standalone/chunks/item-option-panel-CzSKFCVl.js +0 -316
- package/standalone/chunks/item-option-position-picker-Bkc4JvJX.js +0 -14
- package/standalone/chunks/item-option-positions-number-field-Dr_315TE.js +0 -31
- package/standalone/chunks/item-option-slider-K_bsNci8.js +0 -18
- package/standalone/chunks/item-option-switch-DeihDHhM.js +0 -12
- package/standalone/chunks/load-data-fields-for-datasets-ClctSj6y.js +0 -25
- package/standalone/chunks/localize-DXRmGRe-.js +0 -2
- package/standalone/chunks/localized-decorator-DJVBmJVH.js +0 -2
- package/standalone/chunks/nl-CViTevL3.js +0 -2
|
@@ -19,27 +19,27 @@
|
|
|
19
19
|
*
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
import{i as e,n as t,r as n}from"./chunks/version-BW4Ixl63.js";import{t as r}from"./chunks/luzmoAlignLeft-HA-XKPHy.js";import{a as i,c as a,d as o,f as s,i as c,l,n as u,o as d,p as f,r as p,s as m,t as h,u as g}from"./chunks/chart-helpers-DsIGsaDc.js";import"./chunks/embed-CBu7iQRx.js";import{n as _}from"./chunks/is-same-option-value-Di-A7Wmg.js";import{t as v}from"./chunks/create-lazy-loader-DC0rJePE.js";import{html as y,nothing as b,property as x,state as S,unsafeCSS as C}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/action-button.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/icon.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/overlay.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/popover.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/progress-circle.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/action-group.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/field-label.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/number-field.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/picker.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/tabs.js";var w={icon:[32,32,`M16 0a16 16 0 1 0 16 16A16 16 0 0 0 16 0m0 7q1.4 0 1.5 1.5c0 2-3 2-3 0 0-1 .8-1.5 1.5-1.5m0 5q.9 0 1 1v10c0 1.3-2 1.3-2 0V13q.1-1 1-1`],name:`info-circle`},T={icon:[32,32,`M18.05 5.11a1.5 1.5 0 1 1 2.9.8l-.29 1.02a13.67 13.67 0 0 1-1.54 3.56 1 1 0 0 0 .85 1.52H28a2 2 0 0 1 1.07 3.7 1 1 0 0 0-.33 1.32 2 2 0 0 1-.82 2.76 1 1 0 0 0-.33 1.5 1.99 1.99 0 0 1-.96 3.12 1 1 0 0 0-.67 1.17A2 2 0 0 1 24 28h-5.6c-.98 0-1.94-.3-2.77-.84l-2.4-1.6a4.94 4.94 0 0 1-1.4-1.42 1 1 0 0 0-1.4-.29 1 1 0 0 0-.28 1.4c.5.76 1.17 1.43 1.96 1.97l2.4 1.6a6.98 6.98 0 0 0 3.89 1.18H24a4 4 0 0 0 4-4v-.04a4 4 0 0 0 1.7-5 4 4 0 0 0 1.13-4.13A4 4 0 0 0 28 10h-6.35c.39-.82.7-1.67.94-2.56l.29-1.02a3.51 3.51 0 0 0-6.76-1.85l-.28 1.03a8.5 8.5 0 0 1-3.64 4.93l-.2.13a6.53 6.53 0 0 0-1.84 1.76 1 1 0 0 0 .25 1.4 1 1 0 0 0 1.4-.25c.33-.49.76-.9 1.27-1.22l.2-.13c2.2-1.4 3.8-3.57 4.49-6.1ZM2 14.01h4v14H2Zm-2 0v14c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V14a2 2 0 0 0-2-2H2a2 2 0 0 0-2 2z`],name:`thumbs-up`},E={icon:[32,32,`M18.05 26.89a1.5 1.5 0 1 0 2.9-.8l-.29-1.02a13.66 13.66 0 0 0-1.54-3.56 1 1 0 0 1 .85-1.52H28a2 2 0 0 0 1.07-3.69 1 1 0 0 1-.33-1.33 2 2 0 0 0-.82-2.76 1 1 0 0 1-.33-1.5 1.99 1.99 0 0 0-.96-3.12 1 1 0 0 1-.67-1.16A2 2 0 0 0 24 4h-5.6c-.98 0-1.94.3-2.77.84l-2.4 1.6c-.57.38-1.04.86-1.4 1.41a1 1 0 0 1-1.67-1.1 7.03 7.03 0 0 1 1.95-1.97l2.4-1.6A6.98 6.98 0 0 1 18.4 2H24a4 4 0 0 1 4 4v.04a4 4 0 0 1 1.7 5 3.99 3.99 0 0 1 1.13 4.13A3.99 3.99 0 0 1 28 22h-6.35c.39.81.7 1.66.94 2.55l.28 1.03a3.5 3.5 0 0 1-6.75 1.84l-.28-1.03a8.5 8.5 0 0 0-3.64-4.93l-.2-.13a6.52 6.52 0 0 1-1.84-1.76 1 1 0 0 1 .25-1.4 1 1 0 0 1 1.4.26c.33.48.76.9 1.27 1.22l.2.12c2.2 1.4 3.8 3.57 4.49 6.1zM2 21.99h4V8H2Zm-2 0V8c0-1.1.9-2 2-2h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2z`],name:`thumbs-down`},D=`:host{box-sizing:border-box;display:block;container-type:inline-size}.answer{width:100%;display:block}.chart-actions-bar{justify-content:space-between;align-items:flex-start;gap:var(--luzmo-interactive-viz-item-actions-gap,var(--interactive-viz-item-actions-gap));padding-block:var(--luzmo-interactive-viz-item-actions-padding-block,var(--interactive-viz-item-actions-padding-block));flex-wrap:nowrap;margin-block-start:var(--luzmo-interactive-viz-item-actions-margin-block-start,var(--interactive-viz-item-actions-margin-block-start));display:flex}.chart-actions-primary{gap:var(--luzmo-interactive-viz-item-actions-gap,var(--interactive-viz-item-actions-gap));flex-wrap:wrap;flex:1;align-items:center;min-width:0;display:flex}.ranking-content{gap:var(--luzmo-spacing-3);padding:var(--luzmo-spacing-3);flex-direction:column;display:flex}.ranking-row{gap:var(--luzmo-spacing-3);align-items:center;display:flex}.ranking-number{width:4rem}.icon-flipped{transform:scaleY(-1)}.chart-container{border-radius:var(--luzmo-interactive-viz-item-chart-border-radius,var(--interactive-viz-item-chart-border-radius));height:var(--luzmo-interactive-viz-item-chart-height,var(--interactive-viz-item-chart-height));overflow:hidden}.chart-container luzmo-embed-viz-item{width:100%;height:100%;display:block}.feedback-row{padding-block:var(--luzmo-interactive-viz-item-feedback-padding-block,var(--interactive-viz-item-feedback-padding-block));justify-content:space-between;align-items:center;display:flex}.rating-btn-positive{--luzmo-action-button-content-color-default-selected:var(--luzmo-interactive-viz-item-rating-positive-color,var(--interactive-viz-item-rating-positive-color));--luzmo-action-button-content-color-hover-selected:var(--luzmo-interactive-viz-item-rating-positive-color,var(--interactive-viz-item-rating-positive-color));--luzmo-action-button-content-color-down-selected:var(--luzmo-interactive-viz-item-rating-positive-color,var(--interactive-viz-item-rating-positive-color));--luzmo-action-button-content-color-focus-selected:var(--luzmo-interactive-viz-item-rating-positive-color,var(--interactive-viz-item-rating-positive-color));--luzmo-action-button-background-color-default-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-hover-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-down-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-focus-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background))}.rating-btn-negative{--luzmo-action-button-content-color-default-selected:var(--luzmo-interactive-viz-item-rating-negative-color,var(--interactive-viz-item-rating-negative-color));--luzmo-action-button-content-color-hover-selected:var(--luzmo-interactive-viz-item-rating-negative-color,var(--interactive-viz-item-rating-negative-color));--luzmo-action-button-content-color-down-selected:var(--luzmo-interactive-viz-item-rating-negative-color,var(--interactive-viz-item-rating-negative-color));--luzmo-action-button-content-color-focus-selected:var(--luzmo-interactive-viz-item-rating-negative-color,var(--interactive-viz-item-rating-negative-color));--luzmo-action-button-background-color-default-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-hover-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-down-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-focus-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background))}.config-toggle{--luzmo-action-button-border-radius:32px;margin-inline-start:auto}.sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.config-panel{border:1px solid var(--luzmo-interactive-viz-item-config-panel-border-color,var(--interactive-viz-item-config-panel-border-color));border-radius:var(--luzmo-interactive-viz-item-config-panel-border-radius,var(--interactive-viz-item-config-panel-border-radius));padding:var(--luzmo-interactive-viz-item-config-panel-padding,var(--interactive-viz-item-config-panel-padding));background:var(--luzmo-interactive-viz-item-config-panel-background,var(--interactive-viz-item-config-panel-background));margin-block-start:var(--luzmo-spacing-2)}.config-panel luzmo-tab-panel[selected]{padding-block-start:var(--luzmo-spacing-4);display:block}.config-panel luzmo-item-option-panel,.config-panel luzmo-item-slot-picker-panel,.config-panel luzmo-filters{width:100%;max-height:15rem;scrollbar-width:thin;scrollbar-color:var(--luzmo-interactive-viz-item-config-panel-border-color,var(--interactive-viz-item-config-panel-border-color)) transparent;padding-inline-end:var(--luzmo-spacing-3);overflow-y:auto}.edit-grid{min-height:12.5rem;display:flex}.edit-column{gap:var(--luzmo-spacing-3);flex-direction:column;display:flex}.edit-column:first-child{flex-shrink:0;max-width:15rem}.edit-column-filters{border-inline-start:1px solid var(--luzmo-interactive-viz-item-config-panel-border-color,var(--interactive-viz-item-config-panel-border-color));flex:1;min-width:18.75rem;padding-inline-start:var(--luzmo-spacing-5)}@container (width<=520px){.edit-grid{flex-direction:column}.edit-column,.edit-column:first-child{width:100%;min-width:0;max-width:100%}.edit-column-filters{border-inline-start:none;border-block-start:1px solid var(--luzmo-interactive-viz-item-config-panel-border-color,var(--interactive-viz-item-config-panel-border-color));min-width:0;margin-block-start:var(--luzmo-spacing-3);padding-block-start:var(--luzmo-spacing-4);padding-inline-start:0}}@container (width<=768px){.chart-container{height:calc(var(--luzmo-interactive-viz-item-chart-height,var(--interactive-viz-item-chart-height)) - var(--luzmo-interactive-viz-item-chart-narrow-offset,var(--interactive-viz-item-chart-narrow-offset)))}}:host{--interactive-viz-item-actions-gap:var(--luzmo-spacing-3);--interactive-viz-item-actions-padding-block:var(--luzmo-spacing-3);--interactive-viz-item-actions-margin-block-start:var(--luzmo-spacing-5);--interactive-viz-item-chart-height:20rem;--interactive-viz-item-chart-narrow-offset:2.5rem;--interactive-viz-item-chart-border-radius:var(--luzmo-border-radius);--interactive-viz-item-feedback-padding-block:var(--luzmo-spacing-4);--interactive-viz-item-config-panel-padding:var(--luzmo-spacing-5);--interactive-viz-item-config-panel-border-color:var(--luzmo-border-color);--interactive-viz-item-config-panel-border-radius:var(--luzmo-border-radius);--interactive-viz-item-config-panel-background:var(--luzmo-background-color);--interactive-viz-item-rating-positive-color:var(--luzmo-positive-color,#12855a);--interactive-viz-item-rating-negative-color:var(--luzmo-negative-color,#ca221c);--interactive-viz-item-rating-selected-background:var(--luzmo-background-color-focus,#0000000f)}:host([size=s]){--interactive-viz-item-chart-height:17.5rem}:host([size=l]){--interactive-viz-item-chart-height:22rem}:host([size=xl]){--interactive-viz-item-chart-height:24rem}`,O=v(()=>import(`./add-to-dashboard.js`)).load,k=[`luzmo-filters`,`luzmo-item-option-panel`,`luzmo-item-slot-picker-panel`],A=v(()=>Promise.all([import(`./chunks/filters-DKgJcQGP.js`),import(`./chunks/item-option-panel-CzSKFCVl.js`).then(e=>e.t),import(`./chunks/item-slot-picker-panel-D4BMxGs9.js`).then(e=>e.t)])),j=A.load,M=()=>A.isLoaded()||k.every(e=>customElements.get(e)!==void 0),N=0,P={},F=(e,t)=>t!==null&&_(JSON.parse(JSON.stringify(e)),JSON.parse(JSON.stringify(t))),I=class extends t(s(f,{validSizes:Object.values(o)})){constructor(...e){super(...e),this.chart=null,this.feedback=null,this.messageId=``,this.authKey=``,this.authToken=``,this.apiUrl=`https://api.luzmo.com`,this.appServer=`https://app.luzmo.com`,this.contentLanguage=``,this.hideActions=!1,this.hideFeedback=!1,this.hideConfigPanel=!1,this.addToDashboard=!1,this.dashboardActions=null,this.controlled=!1,this.liveInteractions=!1,this._configPanelOpen=!1,this._configPanelPending=!1,this._configPanelLoadFailed=!1,this._rankingTriggerId=`interactive-viz-item-ranking-${++N}`,this._interactionGeneration=0,this._openInteractions=/* @__PURE__ */ new Map,this._ownCharts=[],this._handleSlotsChanged=e=>{this.chart&&this._emitChart({...this.chart,slots:e.detail.slotsContents})},this._handleFiltersChanged=e=>{this.chart&&this._emitChart({...this.chart,filters:e.detail.filters})},this._handleOptionsChanged=e=>{if(!this.chart)return;let{options:t,interaction:n}=e.detail;if(!t)return;if(n){let e=this._openInteractions.get(n.id);if(!e||!this._isCurrentContext(e)){e?.generation===this._interactionGeneration&&this._invalidateInteractions();return}}let r=this.chart.options.theme??{};this._emitChart({...this.chart,options:{...t,theme:r}},n)},this._handleInteractionStart=e=>{if(!this.chart)return;let t={chart:this.chart,generation:this._interactionGeneration,auth:this._auth};this._openInteractions.set(e.detail.id,t),this._dispatchInteraction(e,t)},this._handleInteractionClosed=e=>{let t=this._openInteractions.get(e.detail.id);this._openInteractions.delete(e.detail.id),this._openInteractions.size===0&&(this._ownCharts=this._ownCharts.slice(-1)),t&&this._dispatchInteraction(e,t)}}static get styles(){return[C(D)]}get _effectiveContentLanguage(){return this.contentLanguage||this.language}_dispatch(e,t){let n=new CustomEvent(e,{detail:t,bubbles:!0,composed:!0});this.dispatchEvent(n)}get _chartActions(){return this.chart?u(d(this.chart)):[]}get _rating(){return this.feedback?.rating??0}get _canShowConfigPanel(){return!!this.chart&&!this.hideConfigPanel}async _toggleConfigPanel(){if(this._configPanelLoadFailed=!1,this._configPanelOpen)this.endInteraction(),this._configPanelOpen=!1;else if(!this._configPanelPending){if(!M()){this._configPanelPending=!0;try{await j()}catch(e){console.warn(`Failed to load the chart configuration panel:`,e),this._configPanelLoadFailed=!0;return}finally{this._configPanelPending=!1}}this.isConnected&&this._canShowConfigPanel&&(this._configPanelOpen=!0)}}endInteraction(){this.renderRoot?.querySelector(`luzmo-item-option-panel`)?.endInteraction?.()}willUpdate(e){super.willUpdate(e),this._openInteractions.size>0&&this._invalidatesInteractions(e)&&this._invalidateInteractions(),e.has(`addToDashboard`)&&this.addToDashboard&&O().catch(e=>console.warn(`Failed to load add to dashboard:`,e))}_emitOptions(e){!this.controlled&&this.chart&&(this.chart={...this.chart,options:e}),this._dispatch(`luzmo-chart-options-changed`,{options:e})}_invalidatesInteractions(e){return e.has(`authKey`)||e.has(`authToken`)||e.has(`apiUrl`)||e.has(`hideConfigPanel`)?!0:e.has(`chart`)&&[...this._openInteractions.values()].some(e=>!this._isCurrentChart(e))}_invalidateInteractions(){this._interactionGeneration++,this.endInteraction()}get _auth(){return[this.authKey,this.authToken,this.apiUrl]}_isCurrentChart(e){let t=this.chart;return t===e.chart||this._ownCharts.some(e=>e===t)||[...this._ownCharts].reverse().some(e=>F(e,t))||F(e.chart,t)}_isCurrentContext(e){return e.generation===this._interactionGeneration&&e.auth.every((e,t)=>e===this._auth[t])&&this._isCurrentChart(e)}_emitChart(e,t){this._ownCharts=this._openInteractions.size>0?[...this._ownCharts,e]:[e],this.controlled||(this.chart=e),this._dispatch(`luzmo-chart-changed`,t?{chart:e,interaction:t}:{chart:e})}_handleDropdownChange(e,t){if(!this.chart)return;t.stopPropagation();let n=t.detail,r=typeof n==`string`?n:n?.value??t.target?.value;if(!r)return;let i=h({...d(this.chart),options:this.chart.options},{type:`chartAction`,actionType:e.mutationType,key:r});this._emitOptions(i.options)}_currentRanking(e){return e.ranking??{active:!1,number:5,direction:a.Top}}_currentSort(e){return e.sort??{direction:g.Desc,by:l.Measure}}_emitRankAndSort(e,t){this.chart&&this._emitOptions({...this.chart.options,ranking:e,sort:t})}_renderOptionDropdown(e){let t=e.values??[],n=e.currentValue||t[0]?.key||``;return y`
|
|
22
|
+
import{n as e,r as t,t as n}from"./chunks/localized-mixin-BWJj88bd.js";import{t as r}from"./chunks/luzmoAlignLeft-HA-XKPHy.js";import{S as i,a,b as o,c as s,d as c,i as l,l as u,n as d,o as f,r as p,s as m,t as h,u as g,x as _}from"./chunks/chart-helpers-DZsidiCl.js";import"./chunks/embed-Bv1ps-EM.js";import{n as v}from"./chunks/is-same-option-value-7kXNF4st.js";import{t as y}from"./chunks/create-lazy-loader-DC0rJePE.js";import{html as b,nothing as x,property as S,query as C,state as w,unsafeCSS as T}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/action-button.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/icon.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/overlay.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/popover.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/progress-circle.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/action-group.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/field-label.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/number-field.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/picker.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.6.1/standalone/tabs.js";var E={icon:[32,32,`M16 0a16 16 0 1 0 16 16A16 16 0 0 0 16 0m0 7q1.4 0 1.5 1.5c0 2-3 2-3 0 0-1 .8-1.5 1.5-1.5m0 5q.9 0 1 1v10c0 1.3-2 1.3-2 0V13q.1-1 1-1`],name:`info-circle`},D={icon:[32,32,`M18.05 5.11a1.5 1.5 0 1 1 2.9.8l-.29 1.02a13.67 13.67 0 0 1-1.54 3.56 1 1 0 0 0 .85 1.52H28a2 2 0 0 1 1.07 3.7 1 1 0 0 0-.33 1.32 2 2 0 0 1-.82 2.76 1 1 0 0 0-.33 1.5 1.99 1.99 0 0 1-.96 3.12 1 1 0 0 0-.67 1.17A2 2 0 0 1 24 28h-5.6c-.98 0-1.94-.3-2.77-.84l-2.4-1.6a4.94 4.94 0 0 1-1.4-1.42 1 1 0 0 0-1.4-.29 1 1 0 0 0-.28 1.4c.5.76 1.17 1.43 1.96 1.97l2.4 1.6a6.98 6.98 0 0 0 3.89 1.18H24a4 4 0 0 0 4-4v-.04a4 4 0 0 0 1.7-5 4 4 0 0 0 1.13-4.13A4 4 0 0 0 28 10h-6.35c.39-.82.7-1.67.94-2.56l.29-1.02a3.51 3.51 0 0 0-6.76-1.85l-.28 1.03a8.5 8.5 0 0 1-3.64 4.93l-.2.13a6.53 6.53 0 0 0-1.84 1.76 1 1 0 0 0 .25 1.4 1 1 0 0 0 1.4-.25c.33-.49.76-.9 1.27-1.22l.2-.13c2.2-1.4 3.8-3.57 4.49-6.1ZM2 14.01h4v14H2Zm-2 0v14c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V14a2 2 0 0 0-2-2H2a2 2 0 0 0-2 2z`],name:`thumbs-up`},O={icon:[32,32,`M18.05 26.89a1.5 1.5 0 1 0 2.9-.8l-.29-1.02a13.66 13.66 0 0 0-1.54-3.56 1 1 0 0 1 .85-1.52H28a2 2 0 0 0 1.07-3.69 1 1 0 0 1-.33-1.33 2 2 0 0 0-.82-2.76 1 1 0 0 1-.33-1.5 1.99 1.99 0 0 0-.96-3.12 1 1 0 0 1-.67-1.16A2 2 0 0 0 24 4h-5.6c-.98 0-1.94.3-2.77.84l-2.4 1.6c-.57.38-1.04.86-1.4 1.41a1 1 0 0 1-1.67-1.1 7.03 7.03 0 0 1 1.95-1.97l2.4-1.6A6.98 6.98 0 0 1 18.4 2H24a4 4 0 0 1 4 4v.04a4 4 0 0 1 1.7 5 3.99 3.99 0 0 1 1.13 4.13A3.99 3.99 0 0 1 28 22h-6.35c.39.81.7 1.66.94 2.55l.28 1.03a3.5 3.5 0 0 1-6.75 1.84l-.28-1.03a8.5 8.5 0 0 0-3.64-4.93l-.2-.13a6.52 6.52 0 0 1-1.84-1.76 1 1 0 0 1 .25-1.4 1 1 0 0 1 1.4.26c.33.48.76.9 1.27 1.22l.2.12c2.2 1.4 3.8 3.57 4.49 6.1zM2 21.99h4V8H2Zm-2 0V8c0-1.1.9-2 2-2h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2z`],name:`thumbs-down`},k=`:host{box-sizing:border-box;display:block;container-type:inline-size}.answer{width:100%;display:block}.chart-actions-bar{justify-content:space-between;align-items:flex-start;gap:var(--luzmo-interactive-viz-item-actions-gap,var(--interactive-viz-item-actions-gap));padding-block:var(--luzmo-interactive-viz-item-actions-padding-block,var(--interactive-viz-item-actions-padding-block));flex-wrap:nowrap;margin-block-start:var(--luzmo-interactive-viz-item-actions-margin-block-start,var(--interactive-viz-item-actions-margin-block-start));display:flex}.chart-actions-bar[hidden]{display:none}.chart-actions-primary{gap:var(--luzmo-interactive-viz-item-actions-gap,var(--interactive-viz-item-actions-gap));flex-wrap:wrap;flex:1;align-items:center;min-width:0;display:flex}.ranking-content{gap:var(--luzmo-spacing-3);padding:var(--luzmo-spacing-3);flex-direction:column;display:flex}.ranking-row{gap:var(--luzmo-spacing-3);align-items:center;display:flex}.ranking-number{width:4rem}.icon-flipped{transform:scaleY(-1)}.chart-container{border-radius:var(--luzmo-interactive-viz-item-chart-border-radius,var(--interactive-viz-item-chart-border-radius));height:var(--luzmo-interactive-viz-item-chart-height,var(--interactive-viz-item-chart-height));overflow:hidden}.chart-container luzmo-embed-viz-item{width:100%;height:100%;display:block}.feedback-row{padding-block:var(--luzmo-interactive-viz-item-feedback-padding-block,var(--interactive-viz-item-feedback-padding-block));justify-content:space-between;align-items:center;display:flex}.rating-btn-positive{--luzmo-action-button-content-color-default-selected:var(--luzmo-interactive-viz-item-rating-positive-color,var(--interactive-viz-item-rating-positive-color));--luzmo-action-button-content-color-hover-selected:var(--luzmo-interactive-viz-item-rating-positive-color,var(--interactive-viz-item-rating-positive-color));--luzmo-action-button-content-color-down-selected:var(--luzmo-interactive-viz-item-rating-positive-color,var(--interactive-viz-item-rating-positive-color));--luzmo-action-button-content-color-focus-selected:var(--luzmo-interactive-viz-item-rating-positive-color,var(--interactive-viz-item-rating-positive-color));--luzmo-action-button-background-color-default-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-hover-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-down-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-focus-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background))}.rating-btn-negative{--luzmo-action-button-content-color-default-selected:var(--luzmo-interactive-viz-item-rating-negative-color,var(--interactive-viz-item-rating-negative-color));--luzmo-action-button-content-color-hover-selected:var(--luzmo-interactive-viz-item-rating-negative-color,var(--interactive-viz-item-rating-negative-color));--luzmo-action-button-content-color-down-selected:var(--luzmo-interactive-viz-item-rating-negative-color,var(--interactive-viz-item-rating-negative-color));--luzmo-action-button-content-color-focus-selected:var(--luzmo-interactive-viz-item-rating-negative-color,var(--interactive-viz-item-rating-negative-color));--luzmo-action-button-background-color-default-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-hover-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-down-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-focus-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background))}.config-toggle{--luzmo-action-button-border-radius:32px;margin-inline-start:auto}.sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.config-panel{border:1px solid var(--luzmo-interactive-viz-item-config-panel-border-color,var(--interactive-viz-item-config-panel-border-color));border-radius:var(--luzmo-interactive-viz-item-config-panel-border-radius,var(--interactive-viz-item-config-panel-border-radius));padding:var(--luzmo-interactive-viz-item-config-panel-padding,var(--interactive-viz-item-config-panel-padding));background:var(--luzmo-interactive-viz-item-config-panel-background,var(--interactive-viz-item-config-panel-background));margin-block-start:var(--luzmo-spacing-2)}.config-panel luzmo-tab-panel[selected]{padding-block-start:var(--luzmo-spacing-4);display:block}.config-panel luzmo-item-option-panel,.config-panel luzmo-item-slot-picker-panel,.config-panel luzmo-filters{width:100%;max-height:15rem;scrollbar-width:thin;scrollbar-color:var(--luzmo-interactive-viz-item-config-panel-border-color,var(--interactive-viz-item-config-panel-border-color)) transparent;padding-inline-end:var(--luzmo-spacing-3);overflow-y:auto}.edit-grid{min-height:12.5rem;display:flex}.edit-column{gap:var(--luzmo-spacing-3);flex-direction:column;display:flex}.edit-column:first-child{flex-shrink:0;max-width:15rem}.edit-column-filters{border-inline-start:1px solid var(--luzmo-interactive-viz-item-config-panel-border-color,var(--interactive-viz-item-config-panel-border-color));flex:1;min-width:18.75rem;padding-inline-start:var(--luzmo-spacing-5)}@container (width<=520px){.edit-grid{flex-direction:column}.edit-column,.edit-column:first-child{width:100%;min-width:0;max-width:100%}.edit-column-filters{border-inline-start:none;border-block-start:1px solid var(--luzmo-interactive-viz-item-config-panel-border-color,var(--interactive-viz-item-config-panel-border-color));min-width:0;margin-block-start:var(--luzmo-spacing-3);padding-block-start:var(--luzmo-spacing-4);padding-inline-start:0}}@container (width<=768px){.chart-container{height:calc(var(--luzmo-interactive-viz-item-chart-height,var(--interactive-viz-item-chart-height)) - var(--luzmo-interactive-viz-item-chart-narrow-offset,var(--interactive-viz-item-chart-narrow-offset)))}}:host{--interactive-viz-item-actions-gap:var(--luzmo-spacing-3);--interactive-viz-item-actions-padding-block:var(--luzmo-spacing-3);--interactive-viz-item-actions-margin-block-start:var(--luzmo-spacing-5);--interactive-viz-item-chart-height:20rem;--interactive-viz-item-chart-narrow-offset:2.5rem;--interactive-viz-item-chart-border-radius:var(--luzmo-border-radius);--interactive-viz-item-feedback-padding-block:var(--luzmo-spacing-4);--interactive-viz-item-config-panel-padding:var(--luzmo-spacing-5);--interactive-viz-item-config-panel-border-color:var(--luzmo-border-color);--interactive-viz-item-config-panel-border-radius:var(--luzmo-border-radius);--interactive-viz-item-config-panel-background:var(--luzmo-background-color);--interactive-viz-item-rating-positive-color:var(--luzmo-positive-color,#12855a);--interactive-viz-item-rating-negative-color:var(--luzmo-negative-color,#ca221c);--interactive-viz-item-rating-selected-background:var(--luzmo-background-color-focus,#0000000f)}:host([size=s]){--interactive-viz-item-chart-height:17.5rem}:host([size=l]){--interactive-viz-item-chart-height:22rem}:host([size=xl]){--interactive-viz-item-chart-height:24rem}`,A=y(()=>import(`./add-to-dashboard.js`)).load,j=[`luzmo-filters`,`luzmo-item-option-panel`,`luzmo-item-slot-picker-panel`],M=y(()=>Promise.all([import(`./chunks/filters-lhg_WVDK.js`),import(`./chunks/item-option-panel-Bya-K7HH.js`).then(e=>e.t),import(`./chunks/item-slot-picker-panel-BM82vSXi.js`).then(e=>e.t)])),N=M.load,P=()=>M.isLoaded()||j.every(e=>customElements.get(e)!==void 0),F=0,I={},L=(e,t)=>t!==null&&v(JSON.parse(JSON.stringify(e)),JSON.parse(JSON.stringify(t))),R=class extends n(_(i,{validSizes:Object.values(o)})){constructor(...e){super(...e),this.chart=null,this.feedback=null,this.messageId=``,this.authKey=``,this.authToken=``,this.apiUrl=`https://api.luzmo.com`,this.appServer=`https://app.luzmo.com`,this.contentLanguage=``,this.hideActions=!1,this.hideFeedback=!1,this.hideConfigPanel=!1,this.hideConfigOptions=!1,this.slotSelects=`multiple`,this.slotGrows=!1,this.slotsConfiguration=null,this.customOptionsConfiguration=null,this.customTranslations=null,this.chartRenderOptions=null,this.addToDashboard=!1,this.dashboardActions=null,this.controlled=!1,this.liveInteractions=!1,this._configPanelOpen=!1,this._actionsSlotHasContent=!1,this._configPanelPending=!1,this._configPanelLoadFailed=!1,this._rankingTriggerId=`interactive-viz-item-ranking-${++F}`,this._interactionGeneration=0,this._openInteractions=/* @__PURE__ */ new Map,this._ownCharts=[],this._handleActionsSlotChange=e=>{this._actionsSlotHasContent=e.target.assignedElements({flatten:!0}).length>0},this._handleSlotsChanged=e=>{this.chart&&this._emitChart({...this.chart,slots:e.detail.slotsContents})},this._handleFiltersChanged=e=>{this.chart&&this._emitChart({...this.chart,filters:e.detail.filters})},this._handleOptionsChanged=e=>{if(!this.chart)return;let{options:t,interaction:n}=e.detail;if(!t)return;if(n){let e=this._openInteractions.get(n.id);if(!e||!this._isCurrentContext(e)){e?.generation===this._interactionGeneration&&this._invalidateInteractions();return}}let r=this.chart.options.theme??{};this._emitChart({...this.chart,options:{...t,theme:r}},n)},this._handleInteractionStart=e=>{if(!this.chart)return;let t={chart:this.chart,generation:this._interactionGeneration,auth:this._auth};this._openInteractions.set(e.detail.id,t),this._dispatchInteraction(e,t)},this._handleInteractionClosed=e=>{let t=this._openInteractions.get(e.detail.id);this._openInteractions.delete(e.detail.id),this._openInteractions.size===0&&(this._ownCharts=this._ownCharts.slice(-1)),t&&this._dispatchInteraction(e,t)}}static get styles(){return[T(k)]}get _effectiveContentLanguage(){return this.contentLanguage||this.language}_dispatch(e,t){let n=new CustomEvent(e,{detail:t,bubbles:!0,composed:!0});this.dispatchEvent(n)}get _chartActions(){return this.chart?d(m(this.chart)):[]}get _rating(){return this.feedback?.rating??0}get _canShowConfigPanel(){return!this.chart||this.hideConfigPanel?!1:!this.chart.inlineData||l(m(this.chart).slots).length>0}async _toggleConfigPanel(){if(this._configPanelLoadFailed=!1,this._configPanelOpen)this.endInteraction(),this._configPanelOpen=!1;else if(!this._configPanelPending){if(!P()){this._configPanelPending=!0;try{await N()}catch(e){console.warn(`Failed to load the chart configuration panel:`,e),this._configPanelLoadFailed=!0;return}finally{this._configPanelPending=!1}}this.isConnected&&this._canShowConfigPanel&&(this._configPanelOpen=!0)}}async export(e){await this.updateComplete;let t=this._embed;if(this.chart&&t&&(t.chartElement||await this._waitForEmbedRendered(t)))return await t.export(e)}_waitForEmbedRendered(e){if(!this.isConnected)return Promise.resolve(!1);this._exportWaitAbort??=new AbortController;let t=this._exportWaitAbort.signal;return new Promise(n=>{let r=new AbortController,i=e=>{r.abort(),n(e)},{signal:a}=r;e.addEventListener(`rendered`,()=>i(!0),{signal:a}),e.addEventListener(`error`,()=>i(!1),{signal:a}),t.addEventListener(`abort`,()=>i(!1),{signal:a})})}_cancelExportWaits(){this._exportWaitAbort?.abort(),this._exportWaitAbort=void 0}endInteraction(){this.renderRoot?.querySelector(`luzmo-item-option-panel`)?.endInteraction?.()}disconnectedCallback(){super.disconnectedCallback(),this._cancelExportWaits()}willUpdate(e){super.willUpdate(e),e.has(`chart`)&&!this.chart&&this._cancelExportWaits(),this._openInteractions.size>0&&this._invalidatesInteractions(e)&&this._invalidateInteractions(),e.has(`addToDashboard`)&&this.addToDashboard&&A().catch(e=>console.warn(`Failed to load add to dashboard:`,e))}updated(e){super.updated(e),e.has(`hideConfigOptions`)&&this.hideConfigOptions&&this._configTabs&&(this._configTabs.selected=`data`)}_emitOptions(e){!this.controlled&&this.chart&&(this.chart={...this.chart,options:e}),this._dispatch(`luzmo-chart-options-changed`,{options:e})}_invalidatesInteractions(e){return e.has(`authKey`)||e.has(`authToken`)||e.has(`apiUrl`)||e.has(`hideConfigPanel`)?!0:e.has(`chart`)&&[...this._openInteractions.values()].some(e=>!this._isCurrentChart(e))}_invalidateInteractions(){this._interactionGeneration++,this.endInteraction()}get _auth(){return[this.authKey,this.authToken,this.apiUrl]}_isCurrentChart(e){let t=this.chart;return t===e.chart||this._ownCharts.some(e=>e===t)||[...this._ownCharts].reverse().some(e=>L(e,t))||L(e.chart,t)}_isCurrentContext(e){return e.generation===this._interactionGeneration&&e.auth.every((e,t)=>e===this._auth[t])&&this._isCurrentChart(e)}_emitChart(e,t){this._ownCharts=this._openInteractions.size>0?[...this._ownCharts,e]:[e],this.controlled||(this.chart=e),this._dispatch(`luzmo-chart-changed`,t?{chart:e,interaction:t}:{chart:e})}_handleDropdownChange(e,t){if(!this.chart)return;t.stopPropagation();let n=t.detail,r=typeof n==`string`?n:n?.value??t.target?.value;if(!r)return;let i=h({...m(this.chart),options:this.chart.options},{type:`chartAction`,actionType:e.mutationType,key:r});this._emitOptions(i.options)}_currentRanking(e){return e.ranking??{active:!1,number:5,direction:u.Top}}_currentSort(e){return e.sort??{direction:c.Desc,by:g.Measure}}_emitRankAndSort(e,t){this.chart&&this._emitOptions({...this.chart.options,ranking:e,sort:t})}_renderOptionDropdown(e){let t=e.values??[],n=e.currentValue||t[0]?.key||``;return b`
|
|
23
23
|
<luzmo-picker
|
|
24
24
|
size=${this.size}
|
|
25
25
|
variant="highlight"
|
|
26
26
|
value=${n}
|
|
27
27
|
@change=${t=>this._handleDropdownChange(e,t)}
|
|
28
28
|
>
|
|
29
|
-
${t.map(e=>
|
|
29
|
+
${t.map(e=>b`<luzmo-menu-item value=${e.key}>${e.label}</luzmo-menu-item>`)}
|
|
30
30
|
</luzmo-picker>
|
|
31
|
-
`}_renderRankingPicker(
|
|
31
|
+
`}_renderRankingPicker(e){let n=this._currentRanking(e),i=this._currentSort(e);if(!n.active)return b`
|
|
32
32
|
<luzmo-action-button
|
|
33
33
|
size=${this.size}
|
|
34
|
-
@click=${()=>this._emitRankAndSort({active:!0,number:5,direction:
|
|
34
|
+
@click=${()=>this._emitRankAndSort({active:!0,number:5,direction:u.Top},i)}
|
|
35
35
|
>
|
|
36
36
|
<luzmo-icon slot="icon" size="xs" .icon=${r}></luzmo-icon>
|
|
37
|
-
${
|
|
37
|
+
${t(`Show top 5`,{desc:`Label to activate top-N ranking on a chart`})}
|
|
38
38
|
</luzmo-action-button>
|
|
39
|
-
`;let
|
|
39
|
+
`;let a=n.direction===u.Bottom?t(`Bottom`,{desc:`Ranking direction: keep the lowest values`}):t(`Top`,{desc:`Ranking direction: keep the highest values`});return b`
|
|
40
40
|
<luzmo-action-button size=${this.size} id=${this._rankingTriggerId}>
|
|
41
41
|
<luzmo-icon slot="icon" size="xs" .icon=${r}></luzmo-icon>
|
|
42
|
-
${
|
|
42
|
+
${a} ${n.number||5}
|
|
43
43
|
</luzmo-action-button>
|
|
44
44
|
|
|
45
45
|
<luzmo-overlay type="auto" placement="bottom-start" trigger=${`${this._rankingTriggerId}@click`}>
|
|
@@ -51,13 +51,13 @@ import{i as e,n as t,r as n}from"./chunks/version-BW4Ixl63.js";import{t as r}fro
|
|
|
51
51
|
compact
|
|
52
52
|
selects="single"
|
|
53
53
|
.selected=${[n.direction]}
|
|
54
|
-
@change=${
|
|
54
|
+
@change=${t=>this._handleDirectionChange(e,t)}
|
|
55
55
|
>
|
|
56
56
|
<luzmo-action-button value="top" emphasized
|
|
57
|
-
>${
|
|
57
|
+
>${t(`Top`,{desc:`Ranking direction: keep the highest values`})}</luzmo-action-button
|
|
58
58
|
>
|
|
59
59
|
<luzmo-action-button value="bottom" emphasized
|
|
60
|
-
>${
|
|
60
|
+
>${t(`Bottom`,{desc:`Ranking direction: keep the lowest values`})}</luzmo-action-button
|
|
61
61
|
>
|
|
62
62
|
</luzmo-action-group>
|
|
63
63
|
|
|
@@ -69,8 +69,8 @@ import{i as e,n as t,r as n}from"./chunks/version-BW4Ixl63.js";import{t as r}fro
|
|
|
69
69
|
max="100"
|
|
70
70
|
step="1"
|
|
71
71
|
.value=${n.number}
|
|
72
|
-
@change=${
|
|
73
|
-
@input=${
|
|
72
|
+
@change=${t=>this._handleNumberChange(e,t)}
|
|
73
|
+
@input=${t=>this._handleNumberChange(e,t)}
|
|
74
74
|
></luzmo-number-field>
|
|
75
75
|
</div>
|
|
76
76
|
|
|
@@ -80,7 +80,7 @@ import{i as e,n as t,r as n}from"./chunks/version-BW4Ixl63.js";import{t as r}fro
|
|
|
80
80
|
compact
|
|
81
81
|
selects="single"
|
|
82
82
|
.selected=${[i.by]}
|
|
83
|
-
@change=${
|
|
83
|
+
@change=${t=>this._handleSortByChange(e,t)}
|
|
84
84
|
>
|
|
85
85
|
<luzmo-action-button value="measure" emphasized>123</luzmo-action-button>
|
|
86
86
|
<luzmo-action-button value="category" emphasized>ABC</luzmo-action-button>
|
|
@@ -91,19 +91,19 @@ import{i as e,n as t,r as n}from"./chunks/version-BW4Ixl63.js";import{t as r}fro
|
|
|
91
91
|
compact
|
|
92
92
|
selects="single"
|
|
93
93
|
.selected=${[i.direction]}
|
|
94
|
-
@change=${
|
|
94
|
+
@change=${t=>this._handleSortDirectionChange(e,t)}
|
|
95
95
|
>
|
|
96
96
|
<luzmo-action-button
|
|
97
97
|
value="desc"
|
|
98
98
|
emphasized
|
|
99
|
-
label=${
|
|
99
|
+
label=${t(`Sort descending`,{desc:`Sort chart values in descending order`})}
|
|
100
100
|
>
|
|
101
101
|
<luzmo-icon slot="icon" size="xs" .icon=${r}></luzmo-icon>
|
|
102
102
|
</luzmo-action-button>
|
|
103
103
|
<luzmo-action-button
|
|
104
104
|
value="asc"
|
|
105
105
|
emphasized
|
|
106
|
-
label=${
|
|
106
|
+
label=${t(`Sort ascending`,{desc:`Sort chart values in ascending order`})}
|
|
107
107
|
>
|
|
108
108
|
<luzmo-icon slot="icon" size="xs" class="icon-flipped" .icon=${r}></luzmo-icon>
|
|
109
109
|
</luzmo-action-button>
|
|
@@ -112,7 +112,7 @@ import{i as e,n as t,r as n}from"./chunks/version-BW4Ixl63.js";import{t as r}fro
|
|
|
112
112
|
</div>
|
|
113
113
|
</luzmo-popover>
|
|
114
114
|
</luzmo-overlay>
|
|
115
|
-
`}_handleDirectionChange(e,t){t.stopPropagation();let n=t.target?.selected;n?.length&&this._emitRankAndSort({...this._currentRanking(e),direction:n[0]},this._currentSort(e))}_handleNumberChange(e,t){t.stopPropagation();let n=t.target?.value,r=typeof n==`number`?n:Number.parseInt(String(n),10);!Number.isNaN(r)&&r>=1&&this._emitRankAndSort({...this._currentRanking(e),number:r},this._currentSort(e))}_handleSortByChange(e,t){t.stopPropagation();let n=t.target?.selected;n?.length&&this._emitRankAndSort(this._currentRanking(e),{...this._currentSort(e),by:n[0]})}_handleSortDirectionChange(e,t){t.stopPropagation();let n=t.target?.selected;n?.length&&this._emitRankAndSort(this._currentRanking(e),{...this._currentSort(e),direction:n[0]})}_renderAddToDashboard(){return this.addToDashboard?
|
|
115
|
+
`}_handleDirectionChange(e,t){t.stopPropagation();let n=t.target?.selected;n?.length&&this._emitRankAndSort({...this._currentRanking(e),direction:n[0]},this._currentSort(e))}_handleNumberChange(e,t){t.stopPropagation();let n=t.target?.value,r=typeof n==`number`?n:Number.parseInt(String(n),10);!Number.isNaN(r)&&r>=1&&this._emitRankAndSort({...this._currentRanking(e),number:r},this._currentSort(e))}_handleSortByChange(e,t){t.stopPropagation();let n=t.target?.selected;n?.length&&this._emitRankAndSort(this._currentRanking(e),{...this._currentSort(e),by:n[0]})}_handleSortDirectionChange(e,t){t.stopPropagation();let n=t.target?.selected;n?.length&&this._emitRankAndSort(this._currentRanking(e),{...this._currentSort(e),direction:n[0]})}_renderAddToDashboard(){return this.addToDashboard?b`
|
|
116
116
|
<luzmo-add-to-dashboard
|
|
117
117
|
size=${this.size}
|
|
118
118
|
language=${this.language}
|
|
@@ -122,27 +122,22 @@ import{i as e,n as t,r as n}from"./chunks/version-BW4Ixl63.js";import{t as r}fro
|
|
|
122
122
|
.authToken=${this.authToken}
|
|
123
123
|
.apiUrl=${this.apiUrl}
|
|
124
124
|
></luzmo-add-to-dashboard>
|
|
125
|
-
`:
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
${this._renderAddToDashboard()}
|
|
125
|
+
`:x}_renderActions(){let e=this.hideActions&&!this.addToDashboard&&!this._actionsSlotHasContent;return b`
|
|
126
|
+
<div class="chart-actions-bar" part="actions-bar" ?hidden=${e}>
|
|
127
|
+
<div class="chart-actions-primary" part="actions">
|
|
128
|
+
${this.hideActions?x:this._chartActions.map(e=>e.type===`optionDropdown`?this._renderOptionDropdown(e):this._renderRankingPicker(e))}
|
|
130
129
|
</div>
|
|
131
|
-
|
|
132
|
-
<div class="chart-actions-bar">
|
|
133
|
-
<div class="chart-actions-primary">
|
|
134
|
-
${this._chartActions.map(e=>e.type===`optionDropdown`?this._renderOptionDropdown(e):this._renderRankingPicker(e))}
|
|
135
|
-
</div>
|
|
136
|
-
<slot name="chart-actions-extra"></slot>
|
|
130
|
+
<slot name="chart-actions-extra" @slotchange=${this._handleActionsSlotChange}></slot>
|
|
137
131
|
${this._renderAddToDashboard()}
|
|
138
132
|
</div>
|
|
139
|
-
`}_renderChart(){if(!this.chart)return
|
|
133
|
+
`}_renderChart(){if(!this.chart)return x;let e=m(this.chart);return b`
|
|
140
134
|
<div class="chart-container" part="chart-container">
|
|
141
135
|
<luzmo-embed-viz-item
|
|
142
136
|
.type=${e.type}
|
|
143
|
-
.options=${e.options}
|
|
137
|
+
.options=${a(e.options,this.chartRenderOptions)}
|
|
144
138
|
.slots=${e.slots}
|
|
145
139
|
.filters=${e.filters??[]}
|
|
140
|
+
.inlineData=${e.inlineData}
|
|
146
141
|
.authKey=${this.authKey}
|
|
147
142
|
.authToken=${this.authToken}
|
|
148
143
|
.apiHost=${this.apiUrl}
|
|
@@ -151,53 +146,70 @@ import{i as e,n as t,r as n}from"./chunks/version-BW4Ixl63.js";import{t as r}fro
|
|
|
151
146
|
.canFilter=${this.canFilter??!1}
|
|
152
147
|
></luzmo-embed-viz-item>
|
|
153
148
|
</div>
|
|
154
|
-
`}_renderFeedback(){let
|
|
155
|
-
<div class="feedback-row">
|
|
156
|
-
${
|
|
149
|
+
`}_renderFeedback(){let e=!this.hideFeedback&&!!this.messageId,n=this._canShowConfigPanel,r=t(`Loading`,{desc:`Loading spinner label`});return!e&&!n?x:b`
|
|
150
|
+
<div class="feedback-row" part="footer">
|
|
151
|
+
${e?b`
|
|
157
152
|
<luzmo-action-group quiet size=${this.size}>
|
|
158
153
|
<luzmo-action-button
|
|
159
154
|
class="rating-btn-positive"
|
|
160
155
|
value="positive"
|
|
161
156
|
quiet
|
|
162
|
-
label=${
|
|
157
|
+
label=${t(`Good response`,{desc:`Accessible label for the positive feedback button`})}
|
|
163
158
|
?selected=${this._rating===1}
|
|
164
159
|
@click=${()=>this._toggleRating(!0)}
|
|
165
160
|
>
|
|
166
|
-
<luzmo-icon slot="icon" size="s" .icon=${
|
|
161
|
+
<luzmo-icon slot="icon" size="s" .icon=${D}></luzmo-icon>
|
|
167
162
|
</luzmo-action-button>
|
|
168
163
|
<luzmo-action-button
|
|
169
164
|
class="rating-btn-negative"
|
|
170
165
|
value="negative"
|
|
171
166
|
quiet
|
|
172
|
-
label=${
|
|
167
|
+
label=${t(`Bad response`,{desc:`Accessible label for the negative feedback button`})}
|
|
173
168
|
?selected=${this._rating===-1}
|
|
174
169
|
@click=${()=>this._toggleRating(!1)}
|
|
175
170
|
>
|
|
176
|
-
<luzmo-icon slot="icon" size="s" .icon=${
|
|
171
|
+
<luzmo-icon slot="icon" size="s" .icon=${O}></luzmo-icon>
|
|
177
172
|
</luzmo-action-button>
|
|
178
173
|
</luzmo-action-group>
|
|
179
|
-
`:
|
|
180
|
-
${n?
|
|
174
|
+
`:x}
|
|
175
|
+
${n?b`
|
|
181
176
|
<luzmo-action-button
|
|
182
177
|
class="config-toggle"
|
|
183
178
|
size=${this.size}
|
|
184
179
|
quiet
|
|
185
180
|
?selected=${this._configPanelOpen}
|
|
186
181
|
aria-expanded=${this._configPanelOpen}
|
|
187
|
-
aria-label=${this._configPanelPending?r:
|
|
182
|
+
aria-label=${this._configPanelPending?r:t(`Configure chart`,{desc:`Accessible label for the chart config toggle`})}
|
|
188
183
|
@click=${()=>this._toggleConfigPanel()}
|
|
189
184
|
>
|
|
190
|
-
${this._configPanelPending?
|
|
185
|
+
${this._configPanelPending?b`<luzmo-progress-circle slot="icon" size="s" indeterminate .label=${r}></luzmo-progress-circle>`:b`<luzmo-icon slot="icon" size="s" .icon=${E}></luzmo-icon>`}
|
|
191
186
|
</luzmo-action-button>
|
|
192
187
|
<span class="sr-only" role="status" aria-live="polite">${this._configPanelPending?r:``}</span>
|
|
193
|
-
<span class="sr-only" role="alert">${this._configPanelLoadFailed?
|
|
194
|
-
`:
|
|
188
|
+
<span class="sr-only" role="alert">${this._configPanelLoadFailed?t(`Failed to load the chart configuration. Please try again.`,{desc:`Error message when the chart config panel fails to load`}):``}</span>
|
|
189
|
+
`:x}
|
|
195
190
|
</div>
|
|
196
|
-
`}_toggleRating(e){let t=e?1:-1,n=this._rating===t?0:t;this._dispatch(`luzmo-feedback-changed`,{rating:n,comment:this.feedback?.comment})}
|
|
191
|
+
`}_toggleRating(e){let t=e?1:-1,n=this._rating===t?0:t;this._dispatch(`luzmo-feedback-changed`,{rating:n,comment:this.feedback?.comment})}_renderFilters(e,n){return e.inlineData?x:b`
|
|
192
|
+
<div class="edit-column edit-column-filters">
|
|
193
|
+
<luzmo-field-label size=${this.size}
|
|
194
|
+
>${t(`Filters`,{desc:`Label for the filters section`})}</luzmo-field-label
|
|
195
|
+
>
|
|
196
|
+
<luzmo-filters
|
|
197
|
+
size=${this.size}
|
|
198
|
+
.datasetIds=${n}
|
|
199
|
+
.filters=${e.filters??[]}
|
|
200
|
+
.authKey=${this.authKey}
|
|
201
|
+
.authToken=${this.authToken}
|
|
202
|
+
.apiUrl=${this.apiUrl}
|
|
203
|
+
.language=${this.language}
|
|
204
|
+
.contentLanguage=${this._effectiveContentLanguage}
|
|
205
|
+
@luzmo-filters-changed=${this._handleFiltersChanged}
|
|
206
|
+
></luzmo-filters>
|
|
207
|
+
</div>
|
|
208
|
+
`}_renderConfigPanel(){if(!this.chart||!this._canShowConfigPanel||!this._configPanelOpen)return x;let e=this.chart,n=p(e.slots??[]),r=l(n),i=e.options.theme??I;return b`
|
|
197
209
|
<div class="config-panel" part="config-panel">
|
|
198
210
|
<luzmo-tabs selected="data" size=${this.size}>
|
|
199
|
-
<luzmo-tab value="data">${
|
|
200
|
-
|
|
211
|
+
<luzmo-tab value="data">${t(`Data`,{desc:`Label for the data section`})}</luzmo-tab>
|
|
212
|
+
${this.hideConfigOptions?x:b`<luzmo-tab value="options">${t(`Options`,{desc:`Label for the options section`})}</luzmo-tab>`}
|
|
201
213
|
|
|
202
214
|
<luzmo-tab-panel value="data">
|
|
203
215
|
<div class="edit-grid">
|
|
@@ -205,7 +217,10 @@ import{i as e,n as t,r as n}from"./chunks/version-BW4Ixl63.js";import{t as r}fro
|
|
|
205
217
|
<luzmo-item-slot-picker-panel
|
|
206
218
|
size=${this.size}
|
|
207
219
|
slot-menu-placement="bottom-end"
|
|
208
|
-
|
|
220
|
+
selects=${this.slotSelects}
|
|
221
|
+
?grows=${this.slotGrows}
|
|
222
|
+
.itemType=${e.type}
|
|
223
|
+
.slotsConfiguration=${this.slotsConfiguration??void 0}
|
|
209
224
|
.slotsContents=${n}
|
|
210
225
|
.datasetIds=${r}
|
|
211
226
|
.authKey=${this.authKey}
|
|
@@ -216,52 +231,41 @@ import{i as e,n as t,r as n}from"./chunks/version-BW4Ixl63.js";import{t as r}fro
|
|
|
216
231
|
@luzmo-slots-contents-changed=${this._handleSlotsChanged}
|
|
217
232
|
></luzmo-item-slot-picker-panel>
|
|
218
233
|
</div>
|
|
219
|
-
|
|
220
|
-
<luzmo-field-label size=${this.size}
|
|
221
|
-
>${e(`Filters`,{desc:`Label for the filters section`})}</luzmo-field-label
|
|
222
|
-
>
|
|
223
|
-
<luzmo-filters
|
|
224
|
-
size=${this.size}
|
|
225
|
-
.datasetIds=${r}
|
|
226
|
-
.filters=${t.filters??[]}
|
|
227
|
-
.authKey=${this.authKey}
|
|
228
|
-
.authToken=${this.authToken}
|
|
229
|
-
.apiUrl=${this.apiUrl}
|
|
230
|
-
.language=${this.language}
|
|
231
|
-
.contentLanguage=${this._effectiveContentLanguage}
|
|
232
|
-
@luzmo-filters-changed=${this._handleFiltersChanged}
|
|
233
|
-
></luzmo-filters>
|
|
234
|
-
</div>
|
|
234
|
+
${this._renderFilters(e,r)}
|
|
235
235
|
</div>
|
|
236
236
|
</luzmo-tab-panel>
|
|
237
237
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
238
|
+
${this.hideConfigOptions?x:b`
|
|
239
|
+
<luzmo-tab-panel value="options">
|
|
240
|
+
<luzmo-item-option-panel
|
|
241
|
+
size=${this.size}
|
|
242
|
+
.itemType=${e.type}
|
|
243
|
+
.options=${e.options||{}}
|
|
244
|
+
.slots=${n}
|
|
245
|
+
.customOptionsConfiguration=${this.customOptionsConfiguration??void 0}
|
|
246
|
+
.customTranslations=${this.customTranslations??void 0}
|
|
247
|
+
.theme=${i}
|
|
248
|
+
.authKey=${this.authKey}
|
|
249
|
+
.authToken=${this.authToken}
|
|
250
|
+
.apiUrl=${this.apiUrl}
|
|
251
|
+
.language=${this.language}
|
|
252
|
+
?live-interactions=${this.liveInteractions}
|
|
253
|
+
@luzmo-options-changed=${this._handleOptionsChanged}
|
|
254
|
+
@luzmo-option-interaction-start=${this._handleInteractionStart}
|
|
255
|
+
@luzmo-option-interaction-end=${this._handleInteractionClosed}
|
|
256
|
+
@luzmo-option-interaction-cancel=${this._handleInteractionClosed}
|
|
257
|
+
></luzmo-item-option-panel>
|
|
258
|
+
</luzmo-tab-panel>
|
|
259
|
+
`}
|
|
256
260
|
</luzmo-tabs>
|
|
257
261
|
</div>
|
|
258
|
-
`}_dispatchInteraction(e,{chart:t,generation:n}){e.stopPropagation(),this._dispatch(e.type,{...e.detail,chart:t,generation:n})}render(){return this.chart?
|
|
262
|
+
`}_dispatchInteraction(e,{chart:t,generation:n}){e.stopPropagation(),this._dispatch(e.type,{...e.detail,chart:t,generation:n})}render(){return this.chart?b`
|
|
259
263
|
<div class="answer" part="container">
|
|
260
264
|
${this._renderActions()} ${this._renderChart()} ${this._renderFeedback()} ${this._renderConfigPanel()}
|
|
261
265
|
</div>
|
|
262
|
-
`:
|
|
266
|
+
`:b`
|
|
263
267
|
<div
|
|
264
268
|
class="answer"
|
|
265
269
|
part="container"
|
|
266
270
|
></div>
|
|
267
|
-
`}};
|
|
271
|
+
`}};e([S({type:Object})],R.prototype,`chart`,void 0),e([S({type:Object})],R.prototype,`feedback`,void 0),e([S({type:String,attribute:`message-id`})],R.prototype,`messageId`,void 0),e([S({type:String,attribute:`auth-key`})],R.prototype,`authKey`,void 0),e([S({type:String,attribute:`auth-token`})],R.prototype,`authToken`,void 0),e([S({type:String,attribute:`api-url`})],R.prototype,`apiUrl`,void 0),e([S({type:String,attribute:`app-server`})],R.prototype,`appServer`,void 0),e([S({type:String,attribute:`content-language`})],R.prototype,`contentLanguage`,void 0),e([S({type:Boolean,attribute:`hide-actions`,reflect:!0})],R.prototype,`hideActions`,void 0),e([S({type:Boolean,attribute:`hide-feedback`,reflect:!0})],R.prototype,`hideFeedback`,void 0),e([S({type:Boolean,attribute:`hide-config-panel`,reflect:!0})],R.prototype,`hideConfigPanel`,void 0),e([S({type:Boolean,attribute:`hide-config-options`,reflect:!0})],R.prototype,`hideConfigOptions`,void 0),e([S({type:String,attribute:`slot-selects`,reflect:!0})],R.prototype,`slotSelects`,void 0),e([S({type:Boolean,attribute:`slot-grows`,reflect:!0})],R.prototype,`slotGrows`,void 0),e([S({attribute:!1})],R.prototype,`slotsConfiguration`,void 0),e([S({attribute:!1})],R.prototype,`customOptionsConfiguration`,void 0),e([S({attribute:!1})],R.prototype,`customTranslations`,void 0),e([S({attribute:!1})],R.prototype,`chartRenderOptions`,void 0),e([S({type:Boolean,attribute:`add-to-dashboard`,reflect:!0})],R.prototype,`addToDashboard`,void 0),e([S({attribute:!1})],R.prototype,`dashboardActions`,void 0),e([S({type:Boolean,reflect:!0})],R.prototype,`controlled`,void 0),e([S({attribute:`can-filter`,converter:{fromAttribute:e=>e===null?void 0:`all`}})],R.prototype,`canFilter`,void 0),e([S({type:Boolean,reflect:!0,attribute:`live-interactions`})],R.prototype,`liveInteractions`,void 0),e([w()],R.prototype,`_configPanelOpen`,void 0),e([w()],R.prototype,`_actionsSlotHasContent`,void 0),e([C(`luzmo-embed-viz-item`)],R.prototype,`_embed`,void 0),e([C(`luzmo-tabs`)],R.prototype,`_configTabs`,void 0),e([w()],R.prototype,`_configPanelPending`,void 0),e([w()],R.prototype,`_configPanelLoadFailed`,void 0),customElements.get(`luzmo-interactive-viz-item`)||customElements.define(`luzmo-interactive-viz-item`,R);export{s as DEFAULT_RANKING_NUMBER,R as LuzmoInteractiveVizItem,u as RankingDirection,g as SortBy,c as SortDirection,h as applyChartMutation,d as calculateChartActions,p as convertSlotsToArray,l as getChartDatasetIds,f as mergeThemeIntoChart,m as normalizeChartConfig};
|