@luzmo/analytics-components-kit 1.1.1 → 1.3.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 +10 -2
- package/angular/components/interactive-viz-item.ts +41 -4
- 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 +14 -5
- package/angular/esm/components/interactive-viz-item.js +30 -4
- 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/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-CzIuDtAq.cjs} +1 -1
- package/components/{add-to-dashboard-NcVHlqrc.js → add-to-dashboard-DGC0_hRB.js} +1 -1
- 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/{chart-helpers-Dng_LGfq.js → chart-helpers-Cbl3sRra.js} +3 -2
- package/components/chart-helpers-fMnqHRzC.cjs +20 -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 +9 -9
- 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 +2 -2
- package/components/interactive-viz-item/interactive-viz-item.d.ts +34 -2
- package/components/interactive-viz-item/types.d.ts +17 -0
- package/components/{interactive-viz-item-CofUkpP6.js → interactive-viz-item-BKLOmawA.js} +166 -100
- package/components/interactive-viz-item-ojdH1uk0.cjs +268 -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 +418 -104
- package/package.json +2 -2
- 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/add-to-dashboard.js +40 -40
- package/standalone/chunks/{chart-helpers-DsIGsaDc.js → chart-helpers-CR-EUEPf.js} +2 -2
- package/standalone/chunks/{choropleth-map-options.config-Cs4Kvr9h.js → choropleth-map-options.config-CDMjKnJD.js} +1 -1
- package/standalone/chunks/{color-range-utils-CKDpd3gZ.js → color-range-utils-BVyHBRiq.js} +1 -1
- package/standalone/chunks/de-BkB0q1Eg.js +2 -0
- package/standalone/chunks/display-settings-binning-BeLLxd3i.js +38 -0
- package/standalone/chunks/display-settings-datetime-BkeiKIVV.js +199 -0
- package/standalone/chunks/display-settings-grand-totals-BuhpQKJ6.js +26 -0
- package/standalone/chunks/display-settings-numeric-m30IYI7I.js +172 -0
- package/standalone/chunks/display-settings-period-over-period-CqDlOSRn.js +209 -0
- package/standalone/chunks/embed-Bv1ps-EM.js +260 -0
- package/standalone/chunks/en-63f7j4v7.js +2 -0
- package/standalone/chunks/en-GB-QAmXQf8W.js +2 -0
- package/standalone/chunks/en-US-63f7j4v7.js +2 -0
- package/standalone/chunks/es-Bo0jStZn.js +2 -0
- package/standalone/chunks/{filters-DKgJcQGP.js → filters-CxgBXUF1.js} +61 -61
- package/standalone/chunks/{formula-codemirror-BbyvNEVD.js → formula-codemirror-Cq94j3-f.js} +17 -17
- package/standalone/chunks/fr-Co_qVhhV.js +2 -0
- package/standalone/chunks/{heat-map-options.config-DF5kjOOe.js → heat-map-options.config-DDQMD38W.js} +1 -1
- package/standalone/chunks/{heat-table-options.config-DaePzfHG.js → heat-table-options.config-B4K0Ygug.js} +1 -1
- package/standalone/chunks/is-same-option-value-7kXNF4st.js +2 -0
- package/standalone/chunks/item-option-action-button-group-BoyqF9vt.js +35 -0
- package/standalone/chunks/item-option-base-CBcDT8MX.js +38 -0
- package/standalone/chunks/item-option-color-palette-picker-C9PGAv4V.js +22 -0
- package/standalone/chunks/item-option-color-picker-D4fVJlqF.js +19 -0
- package/standalone/chunks/item-option-color-range-BlAdTguE.js +83 -0
- package/standalone/chunks/item-option-guidelines-DMsYsHDu.js +120 -0
- package/standalone/chunks/{item-option-multi-language-field-DPPpN2qg.js → item-option-multi-language-field-NUbm1drg.js} +1 -1
- package/standalone/chunks/{item-option-number-field-CkqJjInE.js → item-option-number-field-DRp7kbHL.js} +1 -1
- package/standalone/chunks/item-option-panel-cXrRclzM.js +316 -0
- package/standalone/chunks/{item-option-picker-BnwQPT9A.js → item-option-picker-Ba09L4Cs.js} +1 -1
- package/standalone/chunks/item-option-position-picker-GEGTnhjw.js +14 -0
- package/standalone/chunks/item-option-positions-number-field-n44s1k5v.js +31 -0
- package/standalone/chunks/{item-option-radio-button-group-BkymJq3E.js → item-option-radio-button-group-3s_b1NvR.js} +1 -1
- package/standalone/chunks/item-option-slider-DtY65Gxk.js +18 -0
- package/standalone/chunks/item-option-switch-4sJaI0mx.js +12 -0
- package/standalone/chunks/{item-option-text-field-D7bkuhsv.js → item-option-text-field-Bt6Lj6kh.js} +1 -1
- package/standalone/chunks/{item-slot-picker-panel-D4BMxGs9.js → item-slot-picker-panel-BOSVFBIy.js} +43 -43
- package/standalone/chunks/load-data-fields-for-datasets-CDlut-6S.js +25 -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-BuwRr21c.js +2 -0
- package/standalone/chunks/{route-map-options.config-D7FfzIiU.js → route-map-options.config-CGBkHnhM.js} +1 -1
- package/standalone/chunks/{spike-map-options.config-CZiFzDm9.js → spike-map-options.config-CSenlJ_F.js} +1 -1
- package/standalone/interactive-viz-item.js +62 -55
- package/standalone/item-grid.js +10 -10
- package/standalone/manifest.json +44 -43
- 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/chart-helpers-ufZ6VbXs.cjs +0 -20
- 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/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-BfHBKhIe.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-Cr7ujQNO.js +0 -16
- package/standalone/chunks/item-option-color-range-CyJd1LZ_.js +0 -80
- 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-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-l9wt7_0c.js +0 -15
- 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/localized-decorator-DJVBmJVH.js +0 -2
- package/standalone/chunks/nl-CViTevL3.js +0 -2
|
@@ -21,16 +21,17 @@ import "./tokens-6HmQYnEP.js";
|
|
|
21
21
|
import { i as e, n as t, t as n } from "./base-rAte-QzM.js";
|
|
22
22
|
import { t as r } from "./decorate-B2TzfnLZ.js";
|
|
23
23
|
import { t as i } from "./localized-mixin-FPDNaZhb.js";
|
|
24
|
-
import {
|
|
25
|
-
import { t as p } from "./
|
|
26
|
-
import {
|
|
24
|
+
import { n as a } from "./is-same-option-value-B2oyvEqT.js";
|
|
25
|
+
import { c as o, i as s, l as c, n as l, o as u, r as d, t as f, u as p } from "./chart-helpers-Cbl3sRra.js";
|
|
26
|
+
import { t as m } from "./create-lazy-loader-BFqDG_WK.js";
|
|
27
|
+
import { luzmoAlignLeft as h, luzmoInfoCircle as g, luzmoThumbsDown as _, luzmoThumbsUp as v } from "@luzmo/icons";
|
|
27
28
|
import "@luzmo/lucero/action-button";
|
|
28
29
|
import "@luzmo/lucero/icon";
|
|
29
30
|
import "@luzmo/lucero/overlay";
|
|
30
31
|
import "@luzmo/lucero/popover";
|
|
31
|
-
import { html as
|
|
32
|
-
import { property as
|
|
33
|
-
import { msg as
|
|
32
|
+
import { html as y, nothing as b, unsafeCSS as x } from "lit";
|
|
33
|
+
import { property as S, state as C } from "lit/decorators.js";
|
|
34
|
+
import { msg as w } from "@lit/localize";
|
|
34
35
|
import "@luzmo/embed";
|
|
35
36
|
import "@luzmo/lucero/action-group";
|
|
36
37
|
import "@luzmo/lucero/field-label";
|
|
@@ -39,17 +40,17 @@ import "@luzmo/lucero/picker";
|
|
|
39
40
|
import "@luzmo/lucero/progress-circle";
|
|
40
41
|
import "@luzmo/lucero/tabs";
|
|
41
42
|
// src/components/interactive-viz-item/interactive-viz-item.module.scss?inline
|
|
42
|
-
var
|
|
43
|
+
var T = ":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}", E = m(() => import("./add-to-dashboard/index.js")).load, D = [
|
|
43
44
|
"luzmo-filters",
|
|
44
45
|
"luzmo-item-option-panel",
|
|
45
46
|
"luzmo-item-slot-picker-panel"
|
|
46
|
-
],
|
|
47
|
+
], O = m(() => Promise.all([
|
|
47
48
|
import("./filters/index.js"),
|
|
48
49
|
import("./item-option-panel/index.js"),
|
|
49
50
|
import("./item-slot-picker-panel/index.js")
|
|
50
|
-
])),
|
|
51
|
+
])), k = O.load, A = () => O.isLoaded() || D.every((e) => customElements.get(e) !== void 0), j = 0, M = {}, N = (e, t) => t !== null && a(JSON.parse(JSON.stringify(e)), JSON.parse(JSON.stringify(t))), P = class extends i(t(e, { validSizes: Object.values(n) })) {
|
|
51
52
|
constructor(...e) {
|
|
52
|
-
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._configPanelOpen = !1, this._configPanelPending = !1, this._configPanelLoadFailed = !1, this._rankingTriggerId = `interactive-viz-item-ranking-${++
|
|
53
|
+
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-${++j}`, this._interactionGeneration = 0, this._openInteractions = /* @__PURE__ */ new Map(), this._ownCharts = [], this._handleSlotsChanged = (e) => {
|
|
53
54
|
this.chart && this._emitChart({
|
|
54
55
|
...this.chart,
|
|
55
56
|
slots: e.detail.slotsContents
|
|
@@ -61,20 +62,38 @@ var w = ":host{box-sizing:border-box;display:block;container-type:inline-size}.a
|
|
|
61
62
|
});
|
|
62
63
|
}, this._handleOptionsChanged = (e) => {
|
|
63
64
|
if (!this.chart) return;
|
|
64
|
-
let t = e.detail
|
|
65
|
+
let { options: t, interaction: n } = e.detail;
|
|
65
66
|
if (!t) return;
|
|
66
|
-
|
|
67
|
+
if (n) {
|
|
68
|
+
let e = this._openInteractions.get(n.id);
|
|
69
|
+
if (!e || !this._isCurrentContext(e)) {
|
|
70
|
+
e?.generation === this._interactionGeneration && this._invalidateInteractions();
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
let r = this.chart.options.theme ?? {};
|
|
67
75
|
this._emitChart({
|
|
68
76
|
...this.chart,
|
|
69
77
|
options: {
|
|
70
78
|
...t,
|
|
71
|
-
theme:
|
|
79
|
+
theme: r
|
|
72
80
|
}
|
|
73
|
-
});
|
|
81
|
+
}, n);
|
|
82
|
+
}, this._handleInteractionStart = (e) => {
|
|
83
|
+
if (!this.chart) return;
|
|
84
|
+
let t = {
|
|
85
|
+
chart: this.chart,
|
|
86
|
+
generation: this._interactionGeneration,
|
|
87
|
+
auth: this._auth
|
|
88
|
+
};
|
|
89
|
+
this._openInteractions.set(e.detail.id, t), this._dispatchInteraction(e, t);
|
|
90
|
+
}, this._handleInteractionClosed = (e) => {
|
|
91
|
+
let t = this._openInteractions.get(e.detail.id);
|
|
92
|
+
this._openInteractions.delete(e.detail.id), this._openInteractions.size === 0 && (this._ownCharts = this._ownCharts.slice(-1)), t && this._dispatchInteraction(e, t);
|
|
74
93
|
};
|
|
75
94
|
}
|
|
76
95
|
static get styles() {
|
|
77
|
-
return [
|
|
96
|
+
return [x(T)];
|
|
78
97
|
}
|
|
79
98
|
get _effectiveContentLanguage() {
|
|
80
99
|
return this.contentLanguage || this.language;
|
|
@@ -88,21 +107,21 @@ var w = ":host{box-sizing:border-box;display:block;container-type:inline-size}.a
|
|
|
88
107
|
this.dispatchEvent(n);
|
|
89
108
|
}
|
|
90
109
|
get _chartActions() {
|
|
91
|
-
return this.chart ?
|
|
110
|
+
return this.chart ? l(u(this.chart)) : [];
|
|
92
111
|
}
|
|
93
112
|
get _rating() {
|
|
94
113
|
return this.feedback?.rating ?? 0;
|
|
95
114
|
}
|
|
96
115
|
get _canShowConfigPanel() {
|
|
97
|
-
return
|
|
116
|
+
return !this.chart || this.hideConfigPanel ? !1 : !this.chart.inlineData || s(u(this.chart).slots).length > 0;
|
|
98
117
|
}
|
|
99
118
|
async _toggleConfigPanel() {
|
|
100
|
-
if (this._configPanelLoadFailed = !1, this._configPanelOpen) this._configPanelOpen = !1;
|
|
119
|
+
if (this._configPanelLoadFailed = !1, this._configPanelOpen) this.endInteraction(), this._configPanelOpen = !1;
|
|
101
120
|
else if (!this._configPanelPending) {
|
|
102
|
-
if (!
|
|
121
|
+
if (!A()) {
|
|
103
122
|
this._configPanelPending = !0;
|
|
104
123
|
try {
|
|
105
|
-
await
|
|
124
|
+
await k();
|
|
106
125
|
} catch (e) {
|
|
107
126
|
console.warn("Failed to load the chart configuration panel:", e), this._configPanelLoadFailed = !0;
|
|
108
127
|
return;
|
|
@@ -113,8 +132,11 @@ var w = ":host{box-sizing:border-box;display:block;container-type:inline-size}.a
|
|
|
113
132
|
this.isConnected && this._canShowConfigPanel && (this._configPanelOpen = !0);
|
|
114
133
|
}
|
|
115
134
|
}
|
|
135
|
+
endInteraction() {
|
|
136
|
+
this.renderRoot?.querySelector("luzmo-item-option-panel")?.endInteraction?.();
|
|
137
|
+
}
|
|
116
138
|
willUpdate(e) {
|
|
117
|
-
super.willUpdate(e), e.has("addToDashboard") && this.addToDashboard &&
|
|
139
|
+
super.willUpdate(e), this._openInteractions.size > 0 && this._invalidatesInteractions(e) && this._invalidateInteractions(), e.has("addToDashboard") && this.addToDashboard && E().catch((e) => console.warn("Failed to load add to dashboard:", e));
|
|
118
140
|
}
|
|
119
141
|
_emitOptions(e) {
|
|
120
142
|
!this.controlled && this.chart && (this.chart = {
|
|
@@ -122,16 +144,39 @@ var w = ":host{box-sizing:border-box;display:block;container-type:inline-size}.a
|
|
|
122
144
|
options: e
|
|
123
145
|
}), this._dispatch("luzmo-chart-options-changed", { options: e });
|
|
124
146
|
}
|
|
125
|
-
|
|
126
|
-
|
|
147
|
+
_invalidatesInteractions(e) {
|
|
148
|
+
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));
|
|
149
|
+
}
|
|
150
|
+
_invalidateInteractions() {
|
|
151
|
+
this._interactionGeneration++, this.endInteraction();
|
|
152
|
+
}
|
|
153
|
+
get _auth() {
|
|
154
|
+
return [
|
|
155
|
+
this.authKey,
|
|
156
|
+
this.authToken,
|
|
157
|
+
this.apiUrl
|
|
158
|
+
];
|
|
159
|
+
}
|
|
160
|
+
_isCurrentChart(e) {
|
|
161
|
+
let t = this.chart;
|
|
162
|
+
return t === e.chart || this._ownCharts.some((e) => e === t) || [...this._ownCharts].reverse().some((e) => N(e, t)) || N(e.chart, t);
|
|
163
|
+
}
|
|
164
|
+
_isCurrentContext(e) {
|
|
165
|
+
return e.generation === this._interactionGeneration && e.auth.every((e, t) => e === this._auth[t]) && this._isCurrentChart(e);
|
|
166
|
+
}
|
|
167
|
+
_emitChart(e, t) {
|
|
168
|
+
this._ownCharts = this._openInteractions.size > 0 ? [...this._ownCharts, e] : [e], this.controlled || (this.chart = e), this._dispatch("luzmo-chart-changed", t ? {
|
|
169
|
+
chart: e,
|
|
170
|
+
interaction: t
|
|
171
|
+
} : { chart: e });
|
|
127
172
|
}
|
|
128
173
|
_handleDropdownChange(e, t) {
|
|
129
174
|
if (!this.chart) return;
|
|
130
175
|
t.stopPropagation();
|
|
131
176
|
let n = t.detail, r = typeof n == "string" ? n : n?.value ?? t.target?.value;
|
|
132
177
|
if (!r) return;
|
|
133
|
-
let i =
|
|
134
|
-
...
|
|
178
|
+
let i = f({
|
|
179
|
+
...u(this.chart),
|
|
135
180
|
options: this.chart.options
|
|
136
181
|
}, {
|
|
137
182
|
type: "chartAction",
|
|
@@ -144,13 +189,13 @@ var w = ":host{box-sizing:border-box;display:block;container-type:inline-size}.a
|
|
|
144
189
|
return e.ranking ?? {
|
|
145
190
|
active: !1,
|
|
146
191
|
number: 5,
|
|
147
|
-
direction:
|
|
192
|
+
direction: o.Top
|
|
148
193
|
};
|
|
149
194
|
}
|
|
150
195
|
_currentSort(e) {
|
|
151
196
|
return e.sort ?? {
|
|
152
|
-
direction:
|
|
153
|
-
by:
|
|
197
|
+
direction: p.Desc,
|
|
198
|
+
by: c.Measure
|
|
154
199
|
};
|
|
155
200
|
}
|
|
156
201
|
_emitRankAndSort(e, t) {
|
|
@@ -162,36 +207,36 @@ var w = ":host{box-sizing:border-box;display:block;container-type:inline-size}.a
|
|
|
162
207
|
}
|
|
163
208
|
_renderOptionDropdown(e) {
|
|
164
209
|
let t = e.values ?? [], n = e.currentValue || t[0]?.key || "";
|
|
165
|
-
return
|
|
210
|
+
return y`
|
|
166
211
|
<luzmo-picker
|
|
167
212
|
size=${this.size}
|
|
168
213
|
variant="highlight"
|
|
169
214
|
value=${n}
|
|
170
215
|
@change=${(t) => this._handleDropdownChange(e, t)}
|
|
171
216
|
>
|
|
172
|
-
${t.map((e) =>
|
|
217
|
+
${t.map((e) => y`<luzmo-menu-item value=${e.key}>${e.label}</luzmo-menu-item>`)}
|
|
173
218
|
</luzmo-picker>
|
|
174
219
|
`;
|
|
175
220
|
}
|
|
176
221
|
_renderRankingPicker(e) {
|
|
177
222
|
let t = this._currentRanking(e), n = this._currentSort(e);
|
|
178
|
-
if (!t.active) return
|
|
223
|
+
if (!t.active) return y`
|
|
179
224
|
<luzmo-action-button
|
|
180
225
|
size=${this.size}
|
|
181
226
|
@click=${() => this._emitRankAndSort({
|
|
182
227
|
active: !0,
|
|
183
228
|
number: 5,
|
|
184
|
-
direction:
|
|
229
|
+
direction: o.Top
|
|
185
230
|
}, n)}
|
|
186
231
|
>
|
|
187
|
-
<luzmo-icon slot="icon" size="xs" .icon=${
|
|
188
|
-
${
|
|
232
|
+
<luzmo-icon slot="icon" size="xs" .icon=${h}></luzmo-icon>
|
|
233
|
+
${w("Show top 5", { desc: "Label to activate top-N ranking on a chart" })}
|
|
189
234
|
</luzmo-action-button>
|
|
190
235
|
`;
|
|
191
|
-
let r = t.direction ===
|
|
192
|
-
return
|
|
236
|
+
let r = t.direction === o.Bottom ? w("Bottom", { desc: "Ranking direction: keep the lowest values" }) : w("Top", { desc: "Ranking direction: keep the highest values" });
|
|
237
|
+
return y`
|
|
193
238
|
<luzmo-action-button size=${this.size} id=${this._rankingTriggerId}>
|
|
194
|
-
<luzmo-icon slot="icon" size="xs" .icon=${
|
|
239
|
+
<luzmo-icon slot="icon" size="xs" .icon=${h}></luzmo-icon>
|
|
195
240
|
${r} ${t.number || 5}
|
|
196
241
|
</luzmo-action-button>
|
|
197
242
|
|
|
@@ -207,10 +252,10 @@ var w = ":host{box-sizing:border-box;display:block;container-type:inline-size}.a
|
|
|
207
252
|
@change=${(t) => this._handleDirectionChange(e, t)}
|
|
208
253
|
>
|
|
209
254
|
<luzmo-action-button value="top" emphasized
|
|
210
|
-
>${
|
|
255
|
+
>${w("Top", { desc: "Ranking direction: keep the highest values" })}</luzmo-action-button
|
|
211
256
|
>
|
|
212
257
|
<luzmo-action-button value="bottom" emphasized
|
|
213
|
-
>${
|
|
258
|
+
>${w("Bottom", { desc: "Ranking direction: keep the lowest values" })}</luzmo-action-button
|
|
214
259
|
>
|
|
215
260
|
</luzmo-action-group>
|
|
216
261
|
|
|
@@ -249,16 +294,16 @@ var w = ":host{box-sizing:border-box;display:block;container-type:inline-size}.a
|
|
|
249
294
|
<luzmo-action-button
|
|
250
295
|
value="desc"
|
|
251
296
|
emphasized
|
|
252
|
-
label=${
|
|
297
|
+
label=${w("Sort descending", { desc: "Sort chart values in descending order" })}
|
|
253
298
|
>
|
|
254
|
-
<luzmo-icon slot="icon" size="xs" .icon=${
|
|
299
|
+
<luzmo-icon slot="icon" size="xs" .icon=${h}></luzmo-icon>
|
|
255
300
|
</luzmo-action-button>
|
|
256
301
|
<luzmo-action-button
|
|
257
302
|
value="asc"
|
|
258
303
|
emphasized
|
|
259
|
-
label=${
|
|
304
|
+
label=${w("Sort ascending", { desc: "Sort chart values in ascending order" })}
|
|
260
305
|
>
|
|
261
|
-
<luzmo-icon slot="icon" size="xs" class="icon-flipped" .icon=${
|
|
306
|
+
<luzmo-icon slot="icon" size="xs" class="icon-flipped" .icon=${h}></luzmo-icon>
|
|
262
307
|
</luzmo-action-button>
|
|
263
308
|
</luzmo-action-group>
|
|
264
309
|
</div>
|
|
@@ -300,7 +345,7 @@ var w = ":host{box-sizing:border-box;display:block;container-type:inline-size}.a
|
|
|
300
345
|
});
|
|
301
346
|
}
|
|
302
347
|
_renderAddToDashboard() {
|
|
303
|
-
return this.addToDashboard ?
|
|
348
|
+
return this.addToDashboard ? y`
|
|
304
349
|
<luzmo-add-to-dashboard
|
|
305
350
|
size=${this.size}
|
|
306
351
|
language=${this.language}
|
|
@@ -310,16 +355,16 @@ var w = ":host{box-sizing:border-box;display:block;container-type:inline-size}.a
|
|
|
310
355
|
.authToken=${this.authToken}
|
|
311
356
|
.apiUrl=${this.apiUrl}
|
|
312
357
|
></luzmo-add-to-dashboard>
|
|
313
|
-
` :
|
|
358
|
+
` : b;
|
|
314
359
|
}
|
|
315
360
|
_renderActions() {
|
|
316
|
-
return this.hideActions ?
|
|
361
|
+
return this.hideActions ? y`
|
|
317
362
|
<div class="chart-actions-bar">
|
|
318
363
|
<div class="chart-actions-primary"></div>
|
|
319
364
|
<slot name="chart-actions-extra"></slot>
|
|
320
365
|
${this._renderAddToDashboard()}
|
|
321
366
|
</div>
|
|
322
|
-
` :
|
|
367
|
+
` : y`
|
|
323
368
|
<div class="chart-actions-bar">
|
|
324
369
|
<div class="chart-actions-primary">
|
|
325
370
|
${this._chartActions.map((e) => e.type === "optionDropdown" ? this._renderOptionDropdown(e) : this._renderRankingPicker(e))}
|
|
@@ -330,15 +375,16 @@ var w = ":host{box-sizing:border-box;display:block;container-type:inline-size}.a
|
|
|
330
375
|
`;
|
|
331
376
|
}
|
|
332
377
|
_renderChart() {
|
|
333
|
-
if (!this.chart) return
|
|
334
|
-
let e =
|
|
335
|
-
return
|
|
378
|
+
if (!this.chart) return b;
|
|
379
|
+
let e = u(this.chart);
|
|
380
|
+
return y`
|
|
336
381
|
<div class="chart-container" part="chart-container">
|
|
337
382
|
<luzmo-embed-viz-item
|
|
338
383
|
.type=${e.type}
|
|
339
384
|
.options=${e.options}
|
|
340
385
|
.slots=${e.slots}
|
|
341
386
|
.filters=${e.filters ?? []}
|
|
387
|
+
.inlineData=${e.inlineData}
|
|
342
388
|
.authKey=${this.authKey}
|
|
343
389
|
.authToken=${this.authToken}
|
|
344
390
|
.apiHost=${this.apiUrl}
|
|
@@ -350,48 +396,48 @@ var w = ":host{box-sizing:border-box;display:block;container-type:inline-size}.a
|
|
|
350
396
|
`;
|
|
351
397
|
}
|
|
352
398
|
_renderFeedback() {
|
|
353
|
-
let e = !this.hideFeedback && !!this.messageId, t = this._canShowConfigPanel, n =
|
|
354
|
-
return !e && !t ?
|
|
399
|
+
let e = !this.hideFeedback && !!this.messageId, t = this._canShowConfigPanel, n = w("Loading", { desc: "Loading spinner label" });
|
|
400
|
+
return !e && !t ? b : y`
|
|
355
401
|
<div class="feedback-row">
|
|
356
|
-
${e ?
|
|
402
|
+
${e ? y`
|
|
357
403
|
<luzmo-action-group quiet size=${this.size}>
|
|
358
404
|
<luzmo-action-button
|
|
359
405
|
class="rating-btn-positive"
|
|
360
406
|
value="positive"
|
|
361
407
|
quiet
|
|
362
|
-
label=${
|
|
408
|
+
label=${w("Good response", { desc: "Accessible label for the positive feedback button" })}
|
|
363
409
|
?selected=${this._rating === 1}
|
|
364
410
|
@click=${() => this._toggleRating(!0)}
|
|
365
411
|
>
|
|
366
|
-
<luzmo-icon slot="icon" size="s" .icon=${
|
|
412
|
+
<luzmo-icon slot="icon" size="s" .icon=${v}></luzmo-icon>
|
|
367
413
|
</luzmo-action-button>
|
|
368
414
|
<luzmo-action-button
|
|
369
415
|
class="rating-btn-negative"
|
|
370
416
|
value="negative"
|
|
371
417
|
quiet
|
|
372
|
-
label=${
|
|
418
|
+
label=${w("Bad response", { desc: "Accessible label for the negative feedback button" })}
|
|
373
419
|
?selected=${this._rating === -1}
|
|
374
420
|
@click=${() => this._toggleRating(!1)}
|
|
375
421
|
>
|
|
376
|
-
<luzmo-icon slot="icon" size="s" .icon=${
|
|
422
|
+
<luzmo-icon slot="icon" size="s" .icon=${_}></luzmo-icon>
|
|
377
423
|
</luzmo-action-button>
|
|
378
424
|
</luzmo-action-group>
|
|
379
|
-
` :
|
|
380
|
-
${t ?
|
|
425
|
+
` : b}
|
|
426
|
+
${t ? y`
|
|
381
427
|
<luzmo-action-button
|
|
382
428
|
class="config-toggle"
|
|
383
429
|
size=${this.size}
|
|
384
430
|
quiet
|
|
385
431
|
?selected=${this._configPanelOpen}
|
|
386
432
|
aria-expanded=${this._configPanelOpen}
|
|
387
|
-
aria-label=${this._configPanelPending ? n :
|
|
433
|
+
aria-label=${this._configPanelPending ? n : w("Configure chart", { desc: "Accessible label for the chart config toggle" })}
|
|
388
434
|
@click=${() => this._toggleConfigPanel()}
|
|
389
435
|
>
|
|
390
|
-
${this._configPanelPending ?
|
|
436
|
+
${this._configPanelPending ? y`<luzmo-progress-circle slot="icon" size="s" indeterminate .label=${n}></luzmo-progress-circle>` : y`<luzmo-icon slot="icon" size="s" .icon=${g}></luzmo-icon>`}
|
|
391
437
|
</luzmo-action-button>
|
|
392
438
|
<span class="sr-only" role="status" aria-live="polite">${this._configPanelPending ? n : ""}</span>
|
|
393
|
-
<span class="sr-only" role="alert">${this._configPanelLoadFailed ?
|
|
394
|
-
` :
|
|
439
|
+
<span class="sr-only" role="alert">${this._configPanelLoadFailed ? w("Failed to load the chart configuration. Please try again.", { desc: "Error message when the chart config panel fails to load" }) : ""}</span>
|
|
440
|
+
` : b}
|
|
395
441
|
</div>
|
|
396
442
|
`;
|
|
397
443
|
}
|
|
@@ -402,14 +448,34 @@ var w = ":host{box-sizing:border-box;display:block;container-type:inline-size}.a
|
|
|
402
448
|
comment: this.feedback?.comment
|
|
403
449
|
});
|
|
404
450
|
}
|
|
451
|
+
_renderFilters(e, t) {
|
|
452
|
+
return e.inlineData ? b : y`
|
|
453
|
+
<div class="edit-column edit-column-filters">
|
|
454
|
+
<luzmo-field-label size=${this.size}
|
|
455
|
+
>${w("Filters", { desc: "Label for the filters section" })}</luzmo-field-label
|
|
456
|
+
>
|
|
457
|
+
<luzmo-filters
|
|
458
|
+
size=${this.size}
|
|
459
|
+
.datasetIds=${t}
|
|
460
|
+
.filters=${e.filters ?? []}
|
|
461
|
+
.authKey=${this.authKey}
|
|
462
|
+
.authToken=${this.authToken}
|
|
463
|
+
.apiUrl=${this.apiUrl}
|
|
464
|
+
.language=${this.language}
|
|
465
|
+
.contentLanguage=${this._effectiveContentLanguage}
|
|
466
|
+
@luzmo-filters-changed=${this._handleFiltersChanged}
|
|
467
|
+
></luzmo-filters>
|
|
468
|
+
</div>
|
|
469
|
+
`;
|
|
470
|
+
}
|
|
405
471
|
_renderConfigPanel() {
|
|
406
|
-
if (!this.chart || this.
|
|
407
|
-
let e = this.chart, t =
|
|
408
|
-
return
|
|
472
|
+
if (!this.chart || !this._canShowConfigPanel || !this._configPanelOpen) return b;
|
|
473
|
+
let e = this.chart, t = d(e.slots ?? []), n = s(t), r = e.options.theme ?? M;
|
|
474
|
+
return y`
|
|
409
475
|
<div class="config-panel" part="config-panel">
|
|
410
476
|
<luzmo-tabs selected="data" size=${this.size}>
|
|
411
|
-
<luzmo-tab value="data">${
|
|
412
|
-
<luzmo-tab value="options">${
|
|
477
|
+
<luzmo-tab value="data">${w("Data", { desc: "Label for the data section" })}</luzmo-tab>
|
|
478
|
+
<luzmo-tab value="options">${w("Options", { desc: "Label for the options section" })}</luzmo-tab>
|
|
413
479
|
|
|
414
480
|
<luzmo-tab-panel value="data">
|
|
415
481
|
<div class="edit-grid">
|
|
@@ -428,22 +494,7 @@ var w = ":host{box-sizing:border-box;display:block;container-type:inline-size}.a
|
|
|
428
494
|
@luzmo-slots-contents-changed=${this._handleSlotsChanged}
|
|
429
495
|
></luzmo-item-slot-picker-panel>
|
|
430
496
|
</div>
|
|
431
|
-
|
|
432
|
-
<luzmo-field-label size=${this.size}
|
|
433
|
-
>${C("Filters", { desc: "Label for the filters section" })}</luzmo-field-label
|
|
434
|
-
>
|
|
435
|
-
<luzmo-filters
|
|
436
|
-
size=${this.size}
|
|
437
|
-
.datasetIds=${n}
|
|
438
|
-
.filters=${e.filters ?? []}
|
|
439
|
-
.authKey=${this.authKey}
|
|
440
|
-
.authToken=${this.authToken}
|
|
441
|
-
.apiUrl=${this.apiUrl}
|
|
442
|
-
.language=${this.language}
|
|
443
|
-
.contentLanguage=${this._effectiveContentLanguage}
|
|
444
|
-
@luzmo-filters-changed=${this._handleFiltersChanged}
|
|
445
|
-
></luzmo-filters>
|
|
446
|
-
</div>
|
|
497
|
+
${this._renderFilters(e, n)}
|
|
447
498
|
</div>
|
|
448
499
|
</luzmo-tab-panel>
|
|
449
500
|
|
|
@@ -458,19 +509,30 @@ var w = ":host{box-sizing:border-box;display:block;container-type:inline-size}.a
|
|
|
458
509
|
.authToken=${this.authToken}
|
|
459
510
|
.apiUrl=${this.apiUrl}
|
|
460
511
|
.language=${this.language}
|
|
512
|
+
?live-interactions=${this.liveInteractions}
|
|
461
513
|
@luzmo-options-changed=${this._handleOptionsChanged}
|
|
514
|
+
@luzmo-option-interaction-start=${this._handleInteractionStart}
|
|
515
|
+
@luzmo-option-interaction-end=${this._handleInteractionClosed}
|
|
516
|
+
@luzmo-option-interaction-cancel=${this._handleInteractionClosed}
|
|
462
517
|
></luzmo-item-option-panel>
|
|
463
518
|
</luzmo-tab-panel>
|
|
464
519
|
</luzmo-tabs>
|
|
465
520
|
</div>
|
|
466
521
|
`;
|
|
467
522
|
}
|
|
523
|
+
_dispatchInteraction(e, { chart: t, generation: n }) {
|
|
524
|
+
e.stopPropagation(), this._dispatch(e.type, {
|
|
525
|
+
...e.detail,
|
|
526
|
+
chart: t,
|
|
527
|
+
generation: n
|
|
528
|
+
});
|
|
529
|
+
}
|
|
468
530
|
render() {
|
|
469
|
-
return this.chart ?
|
|
531
|
+
return this.chart ? y`
|
|
470
532
|
<div class="answer" part="container">
|
|
471
533
|
${this._renderActions()} ${this._renderChart()} ${this._renderFeedback()} ${this._renderConfigPanel()}
|
|
472
534
|
</div>
|
|
473
|
-
` :
|
|
535
|
+
` : y`
|
|
474
536
|
<div
|
|
475
537
|
class="answer"
|
|
476
538
|
part="container"
|
|
@@ -479,45 +541,49 @@ var w = ":host{box-sizing:border-box;display:block;container-type:inline-size}.a
|
|
|
479
541
|
}
|
|
480
542
|
};
|
|
481
543
|
// src/components/interactive-viz-item/index.ts
|
|
482
|
-
r([
|
|
544
|
+
r([S({ type: Object })], P.prototype, "chart", void 0), r([S({ type: Object })], P.prototype, "feedback", void 0), r([S({
|
|
483
545
|
type: String,
|
|
484
546
|
attribute: "message-id"
|
|
485
|
-
})],
|
|
547
|
+
})], P.prototype, "messageId", void 0), r([S({
|
|
486
548
|
type: String,
|
|
487
549
|
attribute: "auth-key"
|
|
488
|
-
})],
|
|
550
|
+
})], P.prototype, "authKey", void 0), r([S({
|
|
489
551
|
type: String,
|
|
490
552
|
attribute: "auth-token"
|
|
491
|
-
})],
|
|
553
|
+
})], P.prototype, "authToken", void 0), r([S({
|
|
492
554
|
type: String,
|
|
493
555
|
attribute: "api-url"
|
|
494
|
-
})],
|
|
556
|
+
})], P.prototype, "apiUrl", void 0), r([S({
|
|
495
557
|
type: String,
|
|
496
558
|
attribute: "app-server"
|
|
497
|
-
})],
|
|
559
|
+
})], P.prototype, "appServer", void 0), r([S({
|
|
498
560
|
type: String,
|
|
499
561
|
attribute: "content-language"
|
|
500
|
-
})],
|
|
562
|
+
})], P.prototype, "contentLanguage", void 0), r([S({
|
|
501
563
|
type: Boolean,
|
|
502
564
|
attribute: "hide-actions",
|
|
503
565
|
reflect: !0
|
|
504
|
-
})],
|
|
566
|
+
})], P.prototype, "hideActions", void 0), r([S({
|
|
505
567
|
type: Boolean,
|
|
506
568
|
attribute: "hide-feedback",
|
|
507
569
|
reflect: !0
|
|
508
|
-
})],
|
|
570
|
+
})], P.prototype, "hideFeedback", void 0), r([S({
|
|
509
571
|
type: Boolean,
|
|
510
572
|
attribute: "hide-config-panel",
|
|
511
573
|
reflect: !0
|
|
512
|
-
})],
|
|
574
|
+
})], P.prototype, "hideConfigPanel", void 0), r([S({
|
|
513
575
|
type: Boolean,
|
|
514
576
|
attribute: "add-to-dashboard",
|
|
515
577
|
reflect: !0
|
|
516
|
-
})],
|
|
578
|
+
})], P.prototype, "addToDashboard", void 0), r([S({ attribute: !1 })], P.prototype, "dashboardActions", void 0), r([S({
|
|
517
579
|
type: Boolean,
|
|
518
580
|
reflect: !0
|
|
519
|
-
})],
|
|
581
|
+
})], P.prototype, "controlled", void 0), r([S({
|
|
520
582
|
attribute: "can-filter",
|
|
521
583
|
converter: { fromAttribute: (e) => e === null ? void 0 : "all" }
|
|
522
|
-
})],
|
|
523
|
-
|
|
584
|
+
})], P.prototype, "canFilter", void 0), r([S({
|
|
585
|
+
type: Boolean,
|
|
586
|
+
reflect: !0,
|
|
587
|
+
attribute: "live-interactions"
|
|
588
|
+
})], P.prototype, "liveInteractions", void 0), r([C()], P.prototype, "_configPanelOpen", void 0), r([C()], P.prototype, "_configPanelPending", void 0), r([C()], P.prototype, "_configPanelLoadFailed", void 0), customElements.get("luzmo-interactive-viz-item") || customElements.define("luzmo-interactive-viz-item", P);
|
|
589
|
+
export { P as t };
|