@luzmo/analytics-components-kit 1.3.0 → 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.
Files changed (118) hide show
  1. package/README.md +6 -3
  2. package/angular/components/add-to-dashboard.ts +20 -6
  3. package/angular/components/data-fields-select.ts +5 -0
  4. package/angular/components/interactive-viz-item.ts +87 -22
  5. package/angular/components/item-grid-item-actions-menu.ts +5 -0
  6. package/angular/components/item-grid.ts +7 -0
  7. package/angular/components/item-option-color-picker.ts +28 -28
  8. package/angular/components/item-option-guidelines.ts +22 -1
  9. package/angular/components/item-option-multi-language-field.ts +7 -7
  10. package/angular/components/item-option-number-field.ts +14 -14
  11. package/angular/components/item-option-positions-number-field.ts +14 -14
  12. package/angular/components/item-option-radio-button-group.ts +7 -7
  13. package/angular/components/item-option-text-field.ts +7 -7
  14. package/angular/components/item-slot-picker-panel.ts +1 -1
  15. package/angular/components/item-slot-picker.ts +7 -7
  16. package/angular/esm/components/add-to-dashboard.d.ts +8 -4
  17. package/angular/esm/components/add-to-dashboard.js +23 -7
  18. package/angular/esm/components/data-fields-select.d.ts +2 -0
  19. package/angular/esm/components/data-fields-select.js +4 -0
  20. package/angular/esm/components/interactive-viz-item.d.ts +30 -9
  21. package/angular/esm/components/interactive-viz-item.js +98 -27
  22. package/angular/esm/components/item-grid-item-actions-menu.d.ts +2 -0
  23. package/angular/esm/components/item-grid-item-actions-menu.js +4 -0
  24. package/angular/esm/components/item-grid.d.ts +3 -1
  25. package/angular/esm/components/item-grid.js +9 -1
  26. package/angular/esm/components/item-option-color-picker.d.ts +10 -10
  27. package/angular/esm/components/item-option-color-picker.js +34 -34
  28. package/angular/esm/components/item-option-guidelines.d.ts +8 -2
  29. package/angular/esm/components/item-option-guidelines.js +26 -2
  30. package/angular/esm/components/item-option-multi-language-field.d.ts +3 -3
  31. package/angular/esm/components/item-option-multi-language-field.js +10 -10
  32. package/angular/esm/components/item-option-number-field.d.ts +5 -5
  33. package/angular/esm/components/item-option-number-field.js +18 -18
  34. package/angular/esm/components/item-option-positions-number-field.d.ts +5 -5
  35. package/angular/esm/components/item-option-positions-number-field.js +18 -18
  36. package/angular/esm/components/item-option-radio-button-group.d.ts +3 -3
  37. package/angular/esm/components/item-option-radio-button-group.js +10 -10
  38. package/angular/esm/components/item-option-text-field.d.ts +3 -3
  39. package/angular/esm/components/item-option-text-field.js +10 -10
  40. package/angular/esm/components/item-slot-picker-panel.d.ts +1 -1
  41. package/angular/esm/components/item-slot-picker-panel.js +1 -1
  42. package/angular/esm/components/item-slot-picker.d.ts +3 -3
  43. package/angular/esm/components/item-slot-picker.js +9 -9
  44. package/angular/package.json +2 -2
  45. package/components/add-to-dashboard/dashboard-actions.d.ts +2 -1
  46. package/components/add-to-dashboard/index.cjs +1 -1
  47. package/components/add-to-dashboard/index.js +1 -1
  48. package/components/{add-to-dashboard-CzIuDtAq.cjs → add-to-dashboard-BtzTZdjN.cjs} +1 -1
  49. package/components/{add-to-dashboard-DGC0_hRB.js → add-to-dashboard-Bu6S3qVz.js} +125 -120
  50. package/components/chart-helpers-BHxQbLBw.cjs +20 -0
  51. package/components/{chart-helpers-Cbl3sRra.js → chart-helpers-BKeMLhov.js} +51 -38
  52. package/components/filters/index.cjs +1 -1
  53. package/components/filters/index.js +1 -1
  54. package/components/{filters-CxIzuI5q.js → filters-DEpmh9Nj.js} +113 -102
  55. package/components/filters-LDXhe1Bp.cjs +187 -0
  56. package/components/index.cjs +1 -1
  57. package/components/index.js +6 -6
  58. package/components/interactive-viz-item/helpers/chart-helpers.d.ts +2 -1
  59. package/components/interactive-viz-item/index.cjs +1 -1
  60. package/components/interactive-viz-item/index.js +3 -3
  61. package/components/interactive-viz-item/interactive-viz-item.d.ts +44 -0
  62. package/components/{interactive-viz-item-BKLOmawA.js → interactive-viz-item-Cc3Ix95e.js} +151 -110
  63. package/components/interactive-viz-item-SF12d97t.cjs +269 -0
  64. package/components/item-grid/item-grid.d.ts +1 -0
  65. package/components/item-slot-picker-panel/index.cjs +1 -1
  66. package/components/item-slot-picker-panel/index.js +1 -1
  67. package/components/item-slot-picker-panel/item-slot-picker-panel.d.ts +19 -1
  68. package/components/item-slot-picker-panel-Cw3UCK03.cjs +84 -0
  69. package/components/{item-slot-picker-panel-fJqEmxeD.js → item-slot-picker-panel-DprM9Rli.js} +64 -33
  70. package/custom-elements.json +3044 -2532
  71. package/grid-core/item-grid-base.d.ts +5 -4
  72. package/package.json +1 -1
  73. package/react/package.json +2 -2
  74. package/standalone/add-to-dashboard.js +1 -1
  75. package/standalone/chunks/{chart-helpers-CR-EUEPf.js → chart-helpers-DZsidiCl.js} +1 -1
  76. package/standalone/chunks/data-broker-DpSrH3IP.js +2 -0
  77. package/standalone/chunks/{display-settings-binning-BeLLxd3i.js → display-settings-binning-DhHlclWH.js} +1 -1
  78. package/standalone/chunks/{display-settings-datetime-BkeiKIVV.js → display-settings-datetime-C8xvOvi4.js} +1 -1
  79. package/standalone/chunks/{display-settings-grand-totals-BuhpQKJ6.js → display-settings-grand-totals-CUpigDcs.js} +1 -1
  80. package/standalone/chunks/{display-settings-numeric-m30IYI7I.js → display-settings-numeric-BLWF54Jx.js} +1 -1
  81. package/standalone/chunks/{display-settings-period-over-period-CqDlOSRn.js → display-settings-period-over-period-COd4tvUw.js} +1 -1
  82. package/standalone/chunks/en-DNsyAwgq.js +2 -0
  83. package/standalone/chunks/en-GB-Di3OzVdL.js +2 -0
  84. package/standalone/chunks/en-US-DNsyAwgq.js +2 -0
  85. package/standalone/chunks/{filters-CxgBXUF1.js → filters-lhg_WVDK.js} +72 -72
  86. package/standalone/chunks/{formula-codemirror-Cq94j3-f.js → formula-codemirror-DZMzLE2I.js} +1 -1
  87. package/standalone/chunks/{item-option-action-button-group-BoyqF9vt.js → item-option-action-button-group-Bl1HR1JK.js} +1 -1
  88. package/standalone/chunks/{item-option-base-CBcDT8MX.js → item-option-base-DF24wTyv.js} +1 -1
  89. package/standalone/chunks/{item-option-color-palette-picker-C9PGAv4V.js → item-option-color-palette-picker-MkIIn56p.js} +1 -1
  90. package/standalone/chunks/{item-option-color-picker-D4fVJlqF.js → item-option-color-picker-CxosMo_p.js} +1 -1
  91. package/standalone/chunks/{item-option-color-range-BlAdTguE.js → item-option-color-range-C7C70r4J.js} +1 -1
  92. package/standalone/chunks/{item-option-guidelines-DMsYsHDu.js → item-option-guidelines-iu8yWRzr.js} +1 -1
  93. package/standalone/chunks/{item-option-multi-language-field-NUbm1drg.js → item-option-multi-language-field-foanqCdr.js} +1 -1
  94. package/standalone/chunks/{item-option-number-field-DRp7kbHL.js → item-option-number-field-ByVD4oq0.js} +1 -1
  95. package/standalone/chunks/{item-option-panel-cXrRclzM.js → item-option-panel-Bya-K7HH.js} +2 -2
  96. package/standalone/chunks/{item-option-picker-Ba09L4Cs.js → item-option-picker-CqNNVIML.js} +1 -1
  97. package/standalone/chunks/{item-option-position-picker-GEGTnhjw.js → item-option-position-picker-BjCFVtDH.js} +1 -1
  98. package/standalone/chunks/{item-option-positions-number-field-n44s1k5v.js → item-option-positions-number-field-BJJtXZL-.js} +1 -1
  99. package/standalone/chunks/{item-option-radio-button-group-3s_b1NvR.js → item-option-radio-button-group-C5bxsD85.js} +1 -1
  100. package/standalone/chunks/{item-option-slider-DtY65Gxk.js → item-option-slider-DUXWz70B.js} +1 -1
  101. package/standalone/chunks/{item-option-switch-4sJaI0mx.js → item-option-switch-BHyJuOkP.js} +1 -1
  102. package/standalone/chunks/{item-option-text-field-Bt6Lj6kh.js → item-option-text-field-rBZY9OX4.js} +1 -1
  103. package/standalone/chunks/{item-slot-picker-panel-BOSVFBIy.js → item-slot-picker-panel-BM82vSXi.js} +74 -72
  104. package/standalone/chunks/load-data-fields-for-datasets-DS9O1oyy.js +25 -0
  105. package/standalone/chunks/localize-DLl7tgQp.js +2 -0
  106. package/standalone/interactive-viz-item.js +54 -53
  107. package/standalone/manifest.json +31 -31
  108. package/types.d.ts +1 -1
  109. package/components/chart-helpers-fMnqHRzC.cjs +0 -20
  110. package/components/filters-BPbPFOu5.cjs +0 -187
  111. package/components/interactive-viz-item-ojdH1uk0.cjs +0 -268
  112. package/components/item-slot-picker-panel-BhhN54IM.cjs +0 -82
  113. package/standalone/chunks/data-broker-DXDyIrj_.js +0 -2
  114. package/standalone/chunks/en-63f7j4v7.js +0 -2
  115. package/standalone/chunks/en-GB-QAmXQf8W.js +0 -2
  116. package/standalone/chunks/en-US-63f7j4v7.js +0 -2
  117. package/standalone/chunks/load-data-fields-for-datasets-CDlut-6S.js +0 -25
  118. package/standalone/chunks/localize-DXRmGRe-.js +0 -2
@@ -23,17 +23,17 @@ import { t as r } from "./decorate-B2TzfnLZ.js";
23
23
  import { t as i } from "./localized-mixin-FPDNaZhb.js";
24
24
  import { t as a } from "./data-broker-C1Iz71TN.js";
25
25
  import { t as o } from "./localize-BNystXyK.js";
26
- import { o as s } from "./chart-helpers-Cbl3sRra.js";
27
- import { luzmoAlertOutline as c, luzmoAngleDown as l, luzmoAngleLeft as u, luzmoAngleRight as d, luzmoArrowLeft as f, luzmoArrowRight as p, luzmoArrowsHorizontal as m, luzmoCheckCircleOutline as h, luzmoDesktop as g, luzmoLaptop as _, luzmoLink as v, luzmoMobile as ee, luzmoPlus as y, luzmoTablet as te } from "@luzmo/icons";
26
+ import { s } from "./chart-helpers-BKeMLhov.js";
27
+ import { luzmoAlertOutline as c, luzmoAngleDown as l, luzmoAngleLeft as u, luzmoAngleRight as d, luzmoArrowLeft as f, luzmoArrowRight as p, luzmoArrowsHorizontal as m, luzmoCheckCircleOutline as h, luzmoDesktop as g, luzmoLaptop as _, luzmoLink as v, luzmoMobile as y, luzmoPlus as b, luzmoTablet as x } from "@luzmo/icons";
28
28
  import "@luzmo/lucero/action-button";
29
29
  import "@luzmo/lucero/button";
30
30
  import "@luzmo/lucero/icon";
31
31
  import "@luzmo/lucero/overlay";
32
32
  import "@luzmo/lucero/popover";
33
33
  import "@luzmo/lucero/tooltip";
34
- import { html as b, nothing as x, unsafeCSS as S } from "lit";
35
- import { property as C, query as w, state as T } from "lit/decorators.js";
36
- import { localized as E, msg as D, str as O } from "@lit/localize";
34
+ import { html as S, nothing as C, unsafeCSS as ee } from "lit";
35
+ import { property as w, query as T, state as E } from "lit/decorators.js";
36
+ import { localized as D, msg as O, str as k } from "@lit/localize";
37
37
  import "@luzmo/lucero/progress-circle";
38
38
  import "@luzmo/lucero/checkbox";
39
39
  import "@luzmo/lucero/divider";
@@ -41,16 +41,16 @@ import "@luzmo/lucero/field-group";
41
41
  import "@luzmo/lucero/menu";
42
42
  import "@luzmo/lucero/notice";
43
43
  import "@luzmo/lucero/search";
44
- import { ifDefined as k } from "lit/directives/if-defined.js";
44
+ import { ifDefined as A } from "lit/directives/if-defined.js";
45
45
  // src/components/add-to-dashboard/add-to-dashboard.module.scss?inline
46
- var A = ":host{align-items:flex-end;gap:var(--luzmo-spacing-2);font-family:var(--luzmo-font-family);flex-direction:column;display:inline-flex}.trigger-spinner{--luzmo-progress-circle-size:var(--luzmo-icon-size-xs)}.trigger-chevron{margin-inline-start:var(--luzmo-spacing-1)}.picker{gap:var(--luzmo-spacing-3);width:var(--luzmo-add-to-dashboard-picker-width,var(--add-to-dashboard-picker-width));max-width:90vw;padding:var(--luzmo-spacing-2);color:var(--luzmo-font-color);font-size:var(--luzmo-font-size-s);flex-direction:column;display:flex}luzmo-search{width:100%}.list{max-height:var(--luzmo-add-to-dashboard-list-max-height,var(--add-to-dashboard-list-max-height));flex-direction:column;display:flex;overflow-y:auto}.menu{--luzmo-menu-max-height:none;flex:none;width:100%;overflow:visible}.create-row{--luzmo-menu-item-label-icon-color-default:var(--luzmo-primary)}.thumbnail{object-fit:cover;border:var(--luzmo-border-width) solid var(--luzmo-border-color);border-radius:var(--luzmo-border-radius);width:2.75rem;height:2rem}.drill-in{color:var(--luzmo-font-color-extra-dimmed)}.header{align-items:center;gap:var(--luzmo-spacing-2);display:flex}.header-title{font-weight:var(--luzmo-font-weight-bold);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.empty{align-items:center;gap:var(--luzmo-spacing-3);padding:var(--luzmo-spacing-4);text-align:center;flex-direction:column;display:flex}.loading{padding:var(--luzmo-spacing-3);justify-content:center;display:flex}.screen-modes{gap:var(--luzmo-spacing-2);flex-direction:column;display:flex}.screen-mode{align-items:center;gap:var(--luzmo-spacing-2);display:flex}.screen-mode-size{color:var(--luzmo-font-color-extra-dimmed)}.footer{justify-content:flex-end;display:flex}.status{justify-content:flex-end;width:0;min-width:100%;display:flex}.status:empty{display:none}.alert{flex:none;inline-size:max-content}.alert-body{align-items:center;gap:var(--luzmo-spacing-3);block-size:1lh;min-inline-size:0;display:flex}.alert-text{min-inline-size:0;font-weight:var(--luzmo-font-weight-semibold);white-space:pre;display:flex}.alert[variant=negative] .alert-text{white-space:normal}.alert-name{min-inline-size:0;font-weight:var(--luzmo-font-weight-bold);text-overflow:ellipsis;white-space:nowrap;unicode-bidi:plaintext;overflow:hidden}.alert-open{flex:none}:host{--add-to-dashboard-picker-width:18rem;--add-to-dashboard-list-max-height:16rem}", j = "0.1.107", M = "0.1.0", N = [
46
+ var j = ":host{align-items:flex-end;gap:var(--luzmo-spacing-2);font-family:var(--luzmo-font-family);flex-direction:column;display:inline-flex}.trigger-spinner{--luzmo-progress-circle-size:var(--luzmo-icon-size-xs)}.trigger-chevron{margin-inline-start:var(--luzmo-spacing-1)}.picker{gap:var(--luzmo-spacing-3);width:var(--luzmo-add-to-dashboard-picker-width,var(--add-to-dashboard-picker-width));max-width:90vw;padding:var(--luzmo-spacing-2);color:var(--luzmo-font-color);font-size:var(--luzmo-font-size-s);flex-direction:column;display:flex}luzmo-search{width:100%}.list{max-height:var(--luzmo-add-to-dashboard-list-max-height,var(--add-to-dashboard-list-max-height));flex-direction:column;display:flex;overflow-y:auto}.menu{--luzmo-menu-max-height:none;flex:none;width:100%;overflow:visible}.create-row{--luzmo-menu-item-label-icon-color-default:var(--luzmo-primary)}.thumbnail{object-fit:cover;border:var(--luzmo-border-width) solid var(--luzmo-border-color);border-radius:var(--luzmo-border-radius);width:2.75rem;height:2rem}.drill-in{color:var(--luzmo-font-color-extra-dimmed)}.header{align-items:center;gap:var(--luzmo-spacing-2);display:flex}.header-title{font-weight:var(--luzmo-font-weight-bold);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.empty{align-items:center;gap:var(--luzmo-spacing-3);padding:var(--luzmo-spacing-4);text-align:center;flex-direction:column;display:flex}.loading{padding:var(--luzmo-spacing-3);justify-content:center;display:flex}.screen-modes{gap:var(--luzmo-spacing-2);flex-direction:column;display:flex}.screen-mode{align-items:center;gap:var(--luzmo-spacing-2);display:flex}.screen-mode-size{color:var(--luzmo-font-color-extra-dimmed)}.footer{justify-content:flex-end;display:flex}.status{justify-content:flex-end;width:0;min-width:100%;display:flex}.status:empty{display:none}.alert{flex:none;inline-size:max-content}.alert-body{align-items:center;gap:var(--luzmo-spacing-3);block-size:1lh;min-inline-size:0;display:flex}.alert-text{min-inline-size:0;font-weight:var(--luzmo-font-weight-semibold);white-space:pre;display:flex}.alert[variant=negative] .alert-text{white-space:normal}.alert-name{min-inline-size:0;font-weight:var(--luzmo-font-weight-bold);text-overflow:ellipsis;white-space:nowrap;unicode-bidi:plaintext;overflow:hidden}.alert-open{flex:none}:host{--add-to-dashboard-picker-width:18rem;--add-to-dashboard-list-max-height:16rem}", M = "0.1.107", N = "0.1.0", P = [
47
47
  "id",
48
48
  "name",
49
49
  "contents",
50
50
  "modified_at",
51
51
  "is_variant",
52
52
  "original_id"
53
- ], ne = /* @__PURE__ */ new Set(["designer", "owner"]), re = "flag_dashboard_variants", P = [
53
+ ], te = /* @__PURE__ */ new Set(["designer", "owner"]), ne = "flag_dashboard_variants", re = [
54
54
  "desktop",
55
55
  "tablet",
56
56
  "mobile"
@@ -66,24 +66,29 @@ async function F(e, t, n) {
66
66
  total: a
67
67
  };
68
68
  }
69
- async function I(e) {
70
- let t = await e.fetchApi("/user", {
69
+ async function I(e, t) {
70
+ let n = (await e.fetchApi("/user", {
71
71
  action: "get",
72
- version: M,
72
+ version: N,
73
73
  find: {
74
74
  where: { id: "me" },
75
- attributes: ["id", "flags"]
75
+ attributes: ["id", "flags"],
76
+ ...t ? { include: [{
77
+ model: "Organization",
78
+ attributes: ["id"]
79
+ }] } : {}
76
80
  }
77
- });
81
+ })).rows?.[0];
78
82
  return {
79
- id: t.rows?.[0]?.id ?? "",
80
- flags: t.rows?.[0]?.flags ?? []
83
+ id: n?.id ?? "",
84
+ flags: n?.flags ?? [],
85
+ organizations: n?.organizations
81
86
  };
82
87
  }
83
88
  async function L(e, t) {
84
89
  return (await e.fetchApi("/authorization", {
85
90
  action: "get",
86
- version: M,
91
+ version: N,
87
92
  find: { where: { id: t } }
88
93
  })).rows?.[0];
89
94
  }
@@ -96,7 +101,7 @@ async function R(e, t, n) {
96
101
  }
97
102
  }, i = await e.fetchApi("/securable", {
98
103
  action: "get",
99
- version: M,
104
+ version: N,
100
105
  find: r
101
106
  }, { signal: n });
102
107
  return {
@@ -114,9 +119,9 @@ function z(e) {
114
119
  }
115
120
  function B() {
116
121
  return {
117
- version: j,
122
+ version: M,
118
123
  syncScreenModes: !0,
119
- views: P.map((e) => ({
124
+ views: re.map((e) => ({
120
125
  screenModus: e,
121
126
  options: { theme: { id: "default" } },
122
127
  filterGroups: [],
@@ -153,7 +158,7 @@ async function U(e) {
153
158
  authKey: e.authKey,
154
159
  authToken: e.authToken,
155
160
  skipNetworkListeners: !0
156
- }), [n, r] = await Promise.all([I(t), L(t, e.authKey)]), i = z(r), s = r?.type !== "embed" || ne.has(r.role ?? ""), c = !!n.id && n.flags.includes(re), l = [...i.modifyIds, ...c ? i.useOnlyIds : []], u = l.length > 0 ? { id: { notIn: l } } : {}, d = (t, n = !1) => {
161
+ }), n = await L(t, e.authKey), r = n?.type === "embed", i = await I(t, !r), s = z(n), c = r ? te.has(n.role ?? "") : i.organizations?.[0]?.organizationRole?.flagEditor !== !1, l = !!i.id && i.flags.includes(ne), u = [...s.modifyIds, ...l ? s.useOnlyIds : []], d = u.length > 0 ? { id: { notIn: u } } : {}, f = (t, n = !1) => {
157
162
  let r = [...new Set((t.contents?.views ?? []).map((e) => e.screenModus))];
158
163
  return {
159
164
  id: t.id,
@@ -162,68 +167,68 @@ async function U(e) {
162
167
  screenModes: r.length > 0 ? r : ["desktop"],
163
168
  ...n ? { requiresVariant: n } : {}
164
169
  };
165
- }, f, p = (e, n) => async (r, a) => {
166
- if (l.length === 0) return {
170
+ }, p, m = (e, n) => async (r, i) => {
171
+ if (u.length === 0) return {
167
172
  count: 0,
168
173
  rows: []
169
174
  };
170
- let o = r > 0 && f?.search === e ? f.rows : void 0;
171
- return o || (o = (await R(t, {
175
+ let a = r > 0 && p?.search === e ? p.rows : void 0;
176
+ return a || (a = (await R(t, {
172
177
  where: {
173
178
  is_variant: !1,
174
179
  archived_at: null,
175
- id: { in: l }
180
+ id: { in: u }
176
181
  },
177
- attributes: N,
182
+ attributes: P,
178
183
  ...V(e)
179
- }, n)).rows.map((e) => d(e, !i.modifyIds.has(e.id))).sort((e, t) => e.name.localeCompare(t.name)), f = {
184
+ }, n)).rows.map((e) => f(e, !s.modifyIds.has(e.id))).sort((e, t) => e.name.localeCompare(t.name)), p = {
180
185
  search: e,
181
- rows: o
186
+ rows: a
182
187
  }), {
183
- count: o.length,
184
- rows: o.slice(r, r + a)
188
+ count: a.length,
189
+ rows: a.slice(r, r + i)
185
190
  };
186
- }, m = (e, r, i, a) => async (o, s) => {
191
+ }, h = (e, n, r, a) => async (o, s) => {
187
192
  let c = await R(t, {
188
193
  where: {
189
194
  is_variant: !1,
190
195
  archived_at: null,
191
- ...u
196
+ ...d
192
197
  },
193
- attributes: N,
194
- ...H(n.id, i),
198
+ attributes: P,
199
+ ...H(i.id, r),
195
200
  ...V(e),
196
201
  limit: s,
197
202
  offset: o,
198
203
  order: [["modified_at", "desc"]]
199
- }, r);
204
+ }, n);
200
205
  return {
201
206
  count: c.count,
202
- rows: c.rows.map((e) => d(e, a))
207
+ rows: c.rows.map((e) => f(e, a))
203
208
  };
204
- }, h = async (e, n, r, i) => {
209
+ }, g = async (e, n, r, i) => {
205
210
  await t.fetchApi("/securable", {
206
211
  action: "update",
207
- version: M,
212
+ version: N,
208
213
  id: e,
209
214
  properties: { append_item: {
210
215
  item: n,
211
216
  ...r?.length ? { screenModes: r } : {}
212
217
  } }
213
218
  }, { signal: i });
214
- }, g = async (e, n, r) => {
219
+ }, _ = async (e, n, r) => {
215
220
  try {
216
- await h(e.id, n, r);
221
+ await g(e.id, n, r);
217
222
  } catch (n) {
218
223
  throw await t.fetchApi("/securable", {
219
224
  action: "delete",
220
- version: M,
225
+ version: N,
221
226
  id: e.id
222
227
  }).catch(() => void 0), n;
223
228
  }
224
- }, _ = async (e, n) => await t.fetchApi("/securable", {
229
+ }, v = async (e, n) => await t.fetchApi("/securable", {
225
230
  action: "create",
226
- version: M,
231
+ version: N,
227
232
  properties: {
228
233
  ...e,
229
234
  type: "dashboard"
@@ -232,41 +237,41 @@ async function U(e) {
232
237
  });
233
238
  return {
234
239
  async list(e, t) {
235
- return n.id ? await F([
236
- p(e.search, t.signal),
237
- ...c ? [m(e.search, t.signal, {
240
+ return i.id ? await F([
241
+ m(e.search, t.signal),
242
+ ...l ? [h(e.search, t.signal, {
238
243
  flagUse: !0,
239
244
  flagModify: !1
240
245
  }, !0)] : [],
241
- m(e.search, t.signal, { flagModify: !0 }, !1)
246
+ h(e.search, t.signal, { flagModify: !0 }, !1)
242
247
  ], e.offset, e.limit) : {
243
248
  rows: [],
244
249
  total: 0
245
250
  };
246
251
  },
247
252
  async add(e, t, n, r) {
248
- await h(e.id, t, n.screenModes, r.signal);
253
+ await g(e.id, t, n.screenModes, r.signal);
249
254
  },
250
- ...s ? { async create(t, n) {
251
- let r = await _({
255
+ ...c ? { async create(t, n) {
256
+ let r = await v({
252
257
  name: n.name ? { [e.language]: n.name } : {},
253
258
  contents: B()
254
259
  });
255
- return await g(r, t, void 0), d(r);
260
+ return await _(r, t, void 0), f(r);
256
261
  } } : {},
257
- ...c ? { async listVariants(e, r) {
262
+ ...l ? { async listVariants(e, n) {
258
263
  return (await R(t, {
259
264
  where: {
260
265
  is_variant: !0,
261
266
  original_id: e.id,
262
267
  archived_at: null
263
268
  },
264
- attributes: N,
265
- ...H(n.id, { flagModify: !0 }),
269
+ attributes: P,
270
+ ...H(i.id, { flagModify: !0 }),
266
271
  order: [["modified_at", "desc"]]
267
- }, r.signal)).rows.map((e) => d(e));
272
+ }, n.signal)).rows.map((e) => f(e));
268
273
  } } : {},
269
- ...c && s ? { async addToVariant(n, r, i) {
274
+ ...l && c ? { async addToVariant(n, r, i) {
270
275
  let a = (await R(t, {
271
276
  where: { id: n.id },
272
277
  attributes: [
@@ -275,8 +280,8 @@ async function U(e) {
275
280
  "contents"
276
281
  ]
277
282
  })).rows[0];
278
- if (!a?.contents) throw Error(D("The dashboard was not found.", { desc: "Adding the chart to a variant failed because the original dashboard could not be loaded" }));
279
- let o = a.name ?? {}, s = await _({
283
+ if (!a?.contents) throw Error(O("The dashboard was not found.", { desc: "Adding the chart to a variant failed because the original dashboard could not be loaded" }));
284
+ let o = a.name ?? {}, s = await v({
280
285
  name: i.name ? {
281
286
  ...o,
282
287
  [e.language]: i.name
@@ -286,7 +291,7 @@ async function U(e) {
286
291
  role: "original",
287
292
  id: n.id
288
293
  }]);
289
- return await g(s, r, i.screenModes), d({
294
+ return await _(s, r, i.screenModes), f({
290
295
  ...s,
291
296
  contents: s.contents ?? a.contents
292
297
  });
@@ -313,7 +318,7 @@ var K = 20, q = 300, J = 8, Y = 48, X = "__luzmo-new-dashboard", Z = "__luzmo-ne
313
318
  }
314
319
  static get styles() {
315
320
  let e = super.styles ?? [];
316
- return [...Array.isArray(e) ? e : [e], S(A)];
321
+ return [...Array.isArray(e) ? e : [e], ee(j)];
317
322
  }
318
323
  get _hasSource() {
319
324
  return !!this.dashboardActions || !!(this.authKey && this.authToken);
@@ -367,41 +372,41 @@ var K = 20, q = 300, J = 8, Y = 48, X = "__luzmo-new-dashboard", Z = "__luzmo-ne
367
372
  this.dispatchEvent(n);
368
373
  }
369
374
  _displayName(e) {
370
- return e.name.trim() || D("Untitled dashboard", { desc: "Fallback name of a dashboard without a name" });
375
+ return e.name.trim() || O("Untitled dashboard", { desc: "Fallback name of a dashboard without a name" });
371
376
  }
372
377
  _variantName(e, t) {
373
378
  let n = this._displayName(e);
374
- return D(O`${n} (variant ${t})`, { desc: "Name of a new dashboard variant" });
379
+ return O(k`${n} (variant ${t})`, { desc: "Name of a new dashboard variant" });
375
380
  }
376
381
  _screenModeChoices() {
377
382
  return [
378
383
  {
379
384
  name: "mobile",
380
- label: D("Smartphone", { desc: "Screen mode name" }),
385
+ label: O("Smartphone", { desc: "Screen mode name" }),
381
386
  size: "< 768px",
382
- icon: ee
387
+ icon: y
383
388
  },
384
389
  {
385
390
  name: "tablet",
386
- label: D("Tablet", { desc: "Screen mode name" }),
391
+ label: O("Tablet", { desc: "Screen mode name" }),
387
392
  size: "≥ 768px",
388
- icon: te
393
+ icon: x
389
394
  },
390
395
  {
391
396
  name: "desktop",
392
- label: D("Desktop", { desc: "Screen mode name" }),
397
+ label: O("Desktop", { desc: "Screen mode name" }),
393
398
  size: "≥ 1200px",
394
399
  icon: _
395
400
  },
396
401
  {
397
402
  name: "largeScreen",
398
- label: D("Large screen", { desc: "Screen mode name" }),
403
+ label: O("Large screen", { desc: "Screen mode name" }),
399
404
  size: "≥ 1600px",
400
405
  icon: g
401
406
  },
402
407
  {
403
408
  name: "fixed",
404
- label: D("Fixed width", { desc: "Screen mode name" }),
409
+ label: O("Fixed width", { desc: "Screen mode name" }),
405
410
  icon: m
406
411
  }
407
412
  ];
@@ -567,50 +572,50 @@ var K = 20, q = 300, J = 8, Y = 48, X = "__luzmo-new-dashboard", Z = "__luzmo-ne
567
572
  await e?.updateComplete, e?.focus();
568
573
  }
569
574
  _renderRow(e) {
570
- return b`
575
+ return S`
571
576
  <luzmo-menu-item value=${e.id} no-wrap ?disabled=${this._saving}>
572
- ${e.thumbnailUrl ? b`<img slot="icon" class="thumbnail" alt="" src=${e.thumbnailUrl} />` : x}
577
+ ${e.thumbnailUrl ? S`<img slot="icon" class="thumbnail" alt="" src=${e.thumbnailUrl} />` : C}
573
578
  ${this._displayName(e)}
574
- ${e.requiresVariant ? b`<luzmo-icon slot="value" class="drill-in" size="xs" block .icon=${this.isLTR ? d : u}></luzmo-icon>` : x}
579
+ ${e.requiresVariant ? S`<luzmo-icon slot="value" class="drill-in" size="xs" block .icon=${this.isLTR ? d : u}></luzmo-icon>` : C}
575
580
  </luzmo-menu-item>
576
581
  `;
577
582
  }
578
583
  _renderCreateRow(e, t, n, r = !1) {
579
584
  let i = `${this._triggerId}-${e}-reason`;
580
- return b`
585
+ return S`
581
586
  <luzmo-menu-item
582
587
  class="create-row"
583
588
  value=${e}
584
589
  label=${t}
585
- aria-describedby=${k(n ? i : void 0)}
590
+ aria-describedby=${A(n ? i : void 0)}
586
591
  no-wrap
587
592
  ?disabled=${this._saving || r || !!n}
588
593
  >
589
- <luzmo-icon slot="icon" size="s" .icon=${y}></luzmo-icon>
590
- ${t} ${n ? b`<span slot="description" id=${i}>${n}</span>` : x}
594
+ <luzmo-icon slot="icon" size="s" .icon=${b}></luzmo-icon>
595
+ ${t} ${n ? S`<span slot="description" id=${i}>${n}</span>` : C}
591
596
  </luzmo-menu-item>
592
597
  `;
593
598
  }
594
599
  _renderLoading() {
595
- let e = D("Loading", { desc: "Loading spinner label" });
596
- return b`<div class="loading"><luzmo-progress-circle size="s" indeterminate .label=${e}></luzmo-progress-circle></div>`;
600
+ let e = O("Loading", { desc: "Loading spinner label" });
601
+ return S`<div class="loading"><luzmo-progress-circle size="s" indeterminate .label=${e}></luzmo-progress-circle></div>`;
597
602
  }
598
603
  async _handleRetry(e) {
599
604
  let t = e();
600
605
  await this.updateComplete, this._isFocusLost() && await this._focusStep(), await t;
601
606
  }
602
607
  _renderEmpty(e, t) {
603
- return b`
608
+ return S`
604
609
  <div class="empty">
605
610
  <span>${e}</span>
606
- ${t ? b`<luzmo-button size="s" treatment="outline" @click=${() => this._handleRetry(t)}>${D("Retry", { desc: "Retry a failed request" })}</luzmo-button>` : x}
611
+ ${t ? S`<luzmo-button size="s" treatment="outline" @click=${() => this._handleRetry(t)}>${O("Retry", { desc: "Retry a failed request" })}</luzmo-button>` : C}
607
612
  </div>
608
613
  `;
609
614
  }
610
615
  _renderHeader(e) {
611
- return b`
616
+ return S`
612
617
  <div class="header">
613
- <luzmo-action-button size="s" quiet label=${D("Back", { desc: "Go back to the previous step" })} @click=${this._handleBack}>
618
+ <luzmo-action-button size="s" quiet label=${O("Back", { desc: "Go back to the previous step" })} @click=${this._handleBack}>
614
619
  <luzmo-icon slot="icon" size="xs" .icon=${this.isLTR ? f : p}></luzmo-icon>
615
620
  </luzmo-action-button>
616
621
  <span class="header-title" tabindex="-1"
@@ -620,16 +625,16 @@ var K = 20, q = 300, J = 8, Y = 48, X = "__luzmo-new-dashboard", Z = "__luzmo-ne
620
625
  `;
621
626
  }
622
627
  _renderList() {
623
- let e = this._actions && !this._actions.create ? D("These credentials cannot create dashboards", {
628
+ let e = this._actions && !this._actions.create ? O("These credentials cannot create dashboards", {
624
629
  id: "add-to-dashboard-cannot-create",
625
630
  desc: "Why a new dashboard cannot be created"
626
631
  }) : void 0;
627
- return b`
632
+ return S`
628
633
  <luzmo-search
629
634
  size="s"
630
635
  border="none"
631
- label=${D("Search dashboards", { desc: "Label of the dashboard search field" })}
632
- placeholder=${D("Search dashboards", { desc: "Label of the dashboard search field" })}
636
+ label=${O("Search dashboards", { desc: "Label of the dashboard search field" })}
637
+ placeholder=${O("Search dashboards", { desc: "Label of the dashboard search field" })}
633
638
  .value=${this._search}
634
639
  @input=${this._handleSearchInput}
635
640
  @submit=${(e) => e.preventDefault()}
@@ -637,42 +642,42 @@ var K = 20, q = 300, J = 8, Y = 48, X = "__luzmo-new-dashboard", Z = "__luzmo-ne
637
642
  <luzmo-divider size="s"></luzmo-divider>
638
643
  <div class="list" @scroll=${this._handleListScroll}>
639
644
  <luzmo-menu class="menu" size="s" @change=${this._handleListChange} @close=${(e) => e.stopPropagation()}>
640
- ${this._renderCreateRow(X, D("New dashboard", { desc: "Create a new dashboard for the chart" }), e, !this._actions)}
645
+ ${this._renderCreateRow(X, O("New dashboard", { desc: "Create a new dashboard for the chart" }), e, !this._actions)}
641
646
  ${this._rows.map((e) => this._renderRow(e))}
642
647
  </luzmo-menu>
643
648
  <div class="list-state" role="status" aria-live="polite">
644
- ${this._listFailed ? this._renderEmpty(D("Failed to load dashboards", { desc: "Dashboard list failed to load" }), () => this._loadList()) : !this._loading && this._rows.length === 0 ? this._renderEmpty(D("No dashboards found", { desc: "Dashboard list is empty" })) : x}
645
- ${this._loading ? this._renderLoading() : x}
649
+ ${this._listFailed ? this._renderEmpty(O("Failed to load dashboards", { desc: "Dashboard list failed to load" }), () => this._loadList()) : !this._loading && this._rows.length === 0 ? this._renderEmpty(O("No dashboards found", { desc: "Dashboard list is empty" })) : C}
650
+ ${this._loading ? this._renderLoading() : C}
646
651
  </div>
647
652
  </div>
648
653
  `;
649
654
  }
650
655
  _renderVariants(e) {
651
- let t = this._actions?.addToVariant ? void 0 : D("These credentials cannot create variants", {
656
+ let t = this._actions?.addToVariant ? void 0 : O("These credentials cannot create variants", {
652
657
  id: "add-to-dashboard-cannot-create-variant",
653
658
  desc: "Why a new dashboard variant cannot be created"
654
659
  }), n = !this._variantsLoading && !this._variantsFailed;
655
- return b`
660
+ return S`
656
661
  ${this._renderHeader(this._displayName(e))}
657
662
  <luzmo-divider size="s"></luzmo-divider>
658
663
  <div class="list">
659
664
  <luzmo-menu class="menu" size="s" @change=${this._handleVariantChange} @close=${(e) => e.stopPropagation()}>
660
- ${this._renderCreateRow(Z, D("New variant", { desc: "Create a new variant of a dashboard" }), t, !n)}
665
+ ${this._renderCreateRow(Z, O("New variant", { desc: "Create a new variant of a dashboard" }), t, !n)}
661
666
  ${this._variants.map((e) => this._renderRow(e))}
662
667
  </luzmo-menu>
663
668
  <div class="list-state" role="status" aria-live="polite">
664
- ${this._variantsFailed ? this._renderEmpty(D("Failed to load variants", { desc: "Variant list failed to load" }), () => this._loadVariants()) : !this._variantsLoading && this._variants.length === 0 ? this._renderEmpty(D("No variants yet", { desc: "Variant list is empty" })) : x}
665
- ${this._variantsLoading ? this._renderLoading() : x}
669
+ ${this._variantsFailed ? this._renderEmpty(O("Failed to load variants", { desc: "Variant list failed to load" }), () => this._loadVariants()) : !this._variantsLoading && this._variants.length === 0 ? this._renderEmpty(O("No variants yet", { desc: "Variant list is empty" })) : C}
670
+ ${this._variantsLoading ? this._renderLoading() : C}
666
671
  </div>
667
672
  </div>
668
673
  `;
669
674
  }
670
675
  _renderScreenModes(e) {
671
676
  let t = e.kind === "variant" ? e.original : e.dashboard, n = e.kind === "variant" ? e.name : this._displayName(t), r = t.screenModes ?? [];
672
- return b`
677
+ return S`
673
678
  ${this._renderHeader(n)}
674
- <luzmo-field-group class="screen-modes" vertical label=${D("Screen modes", { desc: "Label of the group of screen-mode checkboxes" })}>
675
- ${this._screenModeChoices().filter((e) => r.includes(e.name)).map((e) => b`
679
+ <luzmo-field-group class="screen-modes" vertical label=${O("Screen modes", { desc: "Label of the group of screen-mode checkboxes" })}>
680
+ ${this._screenModeChoices().filter((e) => r.includes(e.name)).map((e) => S`
676
681
  <luzmo-checkbox
677
682
  size="s"
678
683
  ?checked=${this._screenModes.includes(e.name)}
@@ -681,14 +686,14 @@ var K = 20, q = 300, J = 8, Y = 48, X = "__luzmo-new-dashboard", Z = "__luzmo-ne
681
686
  <span class="screen-mode">
682
687
  <luzmo-icon size="xs" block .icon=${e.icon}></luzmo-icon>
683
688
  ${e.label}
684
- ${e.size ? b`<span class="screen-mode-size" dir="ltr">${e.size}</span>` : x}
689
+ ${e.size ? S`<span class="screen-mode-size" dir="ltr">${e.size}</span>` : C}
685
690
  </span>
686
691
  </luzmo-checkbox>
687
692
  `)}
688
693
  </luzmo-field-group>
689
694
  <div class="footer">
690
695
  <luzmo-button size="s" variant="primary" ?disabled=${this._screenModes.length === 0 || this._saving} @click=${this._handleConfirmScreenModes}>
691
- ${D("Confirm", { desc: "Confirm the selected screen modes" })}
696
+ ${O("Confirm", { desc: "Confirm the selected screen modes" })}
692
697
  </luzmo-button>
693
698
  </div>
694
699
  `;
@@ -697,15 +702,15 @@ var K = 20, q = 300, J = 8, Y = 48, X = "__luzmo-new-dashboard", Z = "__luzmo-ne
697
702
  return this._step === "screenModes" && this._pending ? this._renderScreenModes(this._pending) : this._step === "variants" && this._original ? this._renderVariants(this._original) : this._renderList();
698
703
  }
699
704
  _noticeLabels() {
700
- return { close: D("Close", {
705
+ return { close: O("Close", {
701
706
  id: "add-to-dashboard-close",
702
707
  desc: "Close the save result notice"
703
708
  }) };
704
709
  }
705
710
  _renderStatus() {
706
711
  let e = this._status;
707
- if (!e) return x;
708
- if (e.kind === "error") return b`
712
+ if (!e) return C;
713
+ if (e.kind === "error") return S`
709
714
  <luzmo-notice
710
715
  class="alert"
711
716
  size="s"
@@ -715,11 +720,11 @@ var K = 20, q = 300, J = 8, Y = 48, X = "__luzmo-new-dashboard", Z = "__luzmo-ne
715
720
  @luzmo-notice-close=${this._handleNoticeClose}
716
721
  >
717
722
  <luzmo-icon slot="icon" .icon=${c}></luzmo-icon>
718
- <span class="alert-text" dir="auto">${e.message ?? D("Failed to copy item", { desc: "Saving the chart to a dashboard failed" })}</span>
723
+ <span class="alert-text" dir="auto">${e.message ?? O("Failed to copy item", { desc: "Saving the chart to a dashboard failed" })}</span>
719
724
  </luzmo-notice>
720
725
  `;
721
- let t = this._displayName(e.dashboard), n = b`<strong class="alert-name" tabindex="-1">${t}<luzmo-tooltip self-managed show-only-if-truncated placement="top" .size=${this.size}>${t}</luzmo-tooltip></strong>`, r = e.openDashboard;
722
- return b`
726
+ let t = this._displayName(e.dashboard), n = S`<strong class="alert-name" tabindex="-1">${t}<luzmo-tooltip self-managed show-only-if-truncated placement="top" .size=${this.size}>${t}</luzmo-tooltip></strong>`, r = e.openDashboard;
727
+ return S`
723
728
  <luzmo-notice
724
729
  class="alert"
725
730
  size="s"
@@ -730,24 +735,24 @@ var K = 20, q = 300, J = 8, Y = 48, X = "__luzmo-new-dashboard", Z = "__luzmo-ne
730
735
  >
731
736
  <luzmo-icon slot="icon" .icon=${h}></luzmo-icon>
732
737
  <div class="alert-body">
733
- <span class="alert-text" dir="auto">${D(b`Item copied to ${n}`, { desc: "The chart was saved to a dashboard" })}</span>
734
- ${r && !e.isVariant ? b`
738
+ <span class="alert-text" dir="auto">${O(S`Item copied to ${n}`, { desc: "The chart was saved to a dashboard" })}</span>
739
+ ${r && !e.isVariant ? S`
735
740
  <luzmo-action-button class="alert-open" size="s" quiet @click=${() => r(e.dashboard)}>
736
741
  <luzmo-icon slot="icon" size="xs" .icon=${v}></luzmo-icon>
737
- ${D("Open", {
742
+ ${O("Open", {
738
743
  id: "add-to-dashboard-open",
739
744
  desc: "Open the dashboard the chart was saved to"
740
745
  })}
741
746
  </luzmo-action-button>
742
- ` : x}
747
+ ` : C}
743
748
  </div>
744
749
  </luzmo-notice>
745
750
  `;
746
751
  }
747
752
  render() {
748
- if (!this.chart || !this._hasSource) return x;
749
- let e = this._saving ? D("Adding to dashboard", { desc: "The chart is being saved to a dashboard" }) : D("Add to dashboard", { desc: "Button that opens the add to dashboard picker" });
750
- return b`
753
+ if (!this.chart || !this._hasSource) return C;
754
+ let e = this._saving ? O("Adding to dashboard", { desc: "The chart is being saved to a dashboard" }) : O("Add to dashboard", { desc: "Button that opens the add to dashboard picker" });
755
+ return S`
751
756
  <luzmo-action-button
752
757
  id=${this._triggerId}
753
758
  class="trigger"
@@ -756,7 +761,7 @@ var K = 20, q = 300, J = 8, Y = 48, X = "__luzmo-new-dashboard", Z = "__luzmo-ne
756
761
  aria-expanded=${this._open ? "true" : "false"}
757
762
  ?disabled=${this.disabled || this._saving}
758
763
  >
759
- ${this._saving ? b`<luzmo-progress-circle class="trigger-spinner" slot="icon" indeterminate .label=${e}></luzmo-progress-circle>` : b`<luzmo-icon slot="icon" size="xs" .icon=${y}></luzmo-icon>`}
764
+ ${this._saving ? S`<luzmo-progress-circle class="trigger-spinner" slot="icon" indeterminate .label=${e}></luzmo-progress-circle>` : S`<luzmo-icon slot="icon" size="xs" .icon=${b}></luzmo-icon>`}
760
765
  ${e}
761
766
  <luzmo-icon class="trigger-chevron" size="xs" .icon=${l}></luzmo-icon>
762
767
  </luzmo-action-button>
@@ -769,7 +774,7 @@ var K = 20, q = 300, J = 8, Y = 48, X = "__luzmo-new-dashboard", Z = "__luzmo-ne
769
774
  @luzmo-closed=${this._handleClosed}
770
775
  >
771
776
  <luzmo-popover>
772
- <div class="picker">${this._open ? this._renderPicker() : x}</div>
777
+ <div class="picker">${this._open ? this._renderPicker() : C}</div>
773
778
  </luzmo-popover>
774
779
  </luzmo-overlay>
775
780
  <div class="status">${this._renderStatus()}</div>
@@ -777,20 +782,20 @@ var K = 20, q = 300, J = 8, Y = 48, X = "__luzmo-new-dashboard", Z = "__luzmo-ne
777
782
  }
778
783
  };
779
784
  // src/components/add-to-dashboard/index.ts
780
- r([C({ attribute: !1 })], $.prototype, "chart", void 0), r([C({ attribute: !1 })], $.prototype, "dashboardActions", void 0), r([C({
785
+ r([w({ attribute: !1 })], $.prototype, "chart", void 0), r([w({ attribute: !1 })], $.prototype, "dashboardActions", void 0), r([w({
781
786
  type: String,
782
787
  attribute: "auth-key"
783
- })], $.prototype, "authKey", void 0), r([C({
788
+ })], $.prototype, "authKey", void 0), r([w({
784
789
  type: String,
785
790
  attribute: "auth-token"
786
- })], $.prototype, "authToken", void 0), r([C({
791
+ })], $.prototype, "authToken", void 0), r([w({
787
792
  type: String,
788
793
  attribute: "api-url"
789
- })], $.prototype, "apiUrl", void 0), r([C({
794
+ })], $.prototype, "apiUrl", void 0), r([w({
790
795
  type: String,
791
796
  reflect: !0
792
- })], $.prototype, "placement", void 0), r([C({
797
+ })], $.prototype, "placement", void 0), r([w({
793
798
  type: Boolean,
794
799
  reflect: !0
795
- })], $.prototype, "disabled", void 0), r([T()], $.prototype, "_open", void 0), r([T()], $.prototype, "_actions", void 0), r([T()], $.prototype, "_step", void 0), r([T()], $.prototype, "_rows", void 0), r([T()], $.prototype, "_hasMore", void 0), r([T()], $.prototype, "_loading", void 0), r([T()], $.prototype, "_listFailed", void 0), r([T()], $.prototype, "_original", void 0), r([T()], $.prototype, "_variants", void 0), r([T()], $.prototype, "_variantsLoading", void 0), r([T()], $.prototype, "_variantsFailed", void 0), r([T()], $.prototype, "_pending", void 0), r([T()], $.prototype, "_screenModes", void 0), r([T()], $.prototype, "_saving", void 0), r([T()], $.prototype, "_status", void 0), r([w(".trigger")], $.prototype, "_triggerElement", void 0), r([w("luzmo-search")], $.prototype, "_searchElement", void 0), r([w(".header luzmo-action-button")], $.prototype, "_backElement", void 0), r([w("luzmo-notice")], $.prototype, "_noticeElement", void 0), $ = r([E()], $), typeof customElements < "u" && !customElements.get("luzmo-add-to-dashboard") && customElements.define("luzmo-add-to-dashboard", $);
800
+ })], $.prototype, "disabled", void 0), r([E()], $.prototype, "_open", void 0), r([E()], $.prototype, "_actions", void 0), r([E()], $.prototype, "_step", void 0), r([E()], $.prototype, "_rows", void 0), r([E()], $.prototype, "_hasMore", void 0), r([E()], $.prototype, "_loading", void 0), r([E()], $.prototype, "_listFailed", void 0), r([E()], $.prototype, "_original", void 0), r([E()], $.prototype, "_variants", void 0), r([E()], $.prototype, "_variantsLoading", void 0), r([E()], $.prototype, "_variantsFailed", void 0), r([E()], $.prototype, "_pending", void 0), r([E()], $.prototype, "_screenModes", void 0), r([E()], $.prototype, "_saving", void 0), r([E()], $.prototype, "_status", void 0), r([T(".trigger")], $.prototype, "_triggerElement", void 0), r([T("luzmo-search")], $.prototype, "_searchElement", void 0), r([T(".header luzmo-action-button")], $.prototype, "_backElement", void 0), r([T("luzmo-notice")], $.prototype, "_noticeElement", void 0), $ = r([D()], $), typeof customElements < "u" && !customElements.get("luzmo-add-to-dashboard") && customElements.define("luzmo-add-to-dashboard", $);
796
801
  export { U as n, $ as t };
@@ -0,0 +1,20 @@
1
+ /*! * A kit of modern Luzmo Web Components for analytics in your web application.
2
+ *
3
+ * Copyright © 2026 Luzmo
4
+ * All rights reserved.
5
+ * Luzmo web components (“Luzmo Web Components”)
6
+ * must be used according to the Luzmo Terms of Service.
7
+ * This license allows users with a current active Luzmo account
8
+ * to use the Luzmo Web Components. This license terminates
9
+ * automatically if a user no longer has an active Luzmo account.
10
+ * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
11
+ *
12
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
+ * SOFTWARE.
19
+ * */
20
+ const e=require("./type-check-BehV9ZL1.cjs");var t=function(e){return e.Top=`top`,e.Bottom=`bottom`,e}({}),n=function(e){return e.Asc=`asc`,e.Desc=`desc`,e}({}),r=function(e){return e.Measure=`measure`,e.Category=`category`,e}({}),i=5,a=Array.isArray;function o(e){return typeof e==`string`}function s(t){let n={...t};return!n.datasetId&&n.set&&(n.datasetId=n.set),!n.set&&n.datasetId&&(n.set=n.datasetId),!n.columnId&&n.column&&(n.columnId=n.column),!n.column&&n.columnId&&(n.column=n.columnId),!n.formulaId&&n.formula&&e.s(n.formula)&&(n.formulaId=n.formula),!n.formula&&n.formulaId&&(n.formula=n.formulaId),n}function c(e){return a(e)?e:Object.entries(e).map(([e,t])=>({name:e,content:a(t)?t:[]}))}function l(e){let t=new Set;for(let n of e)for(let e of n.content){let n=e.datasetId??e.set;o(n)&&t.add(n)}return[...t]}function u(e){let t=c(e.slots??[]),n=e.options??{},r=n.interactivity;return{type:e.type,options:{...n,interactivity:{...r,scheduledExport:!1}},slots:t.map(e=>({...e,content:a(e.content)?e.content.map(e=>s(e)):[]})),filters:e.filters,inlineData:e.inlineData}}function d(t,n){if(!n)return t;let r={...t};for(let[t,i]of Object.entries(n)){let n=r[t];r[t]=e.a(n)&&e.a(i)?{...n,...i}:i}return r}function f(e,t){return{...e,options:{...e.options,theme:{...e.options.theme,...t}}}}function p(e){let t=e.find(e=>e.name===`measure`||e.name===`measures`);if(t&&t.content.length>1)return!0;let n=e.find(e=>e.name===`legend`);return n?n.content.length>0:!1}function m(e){let i=[],a=e.options;switch(e.type){case`area-chart`:case`bar-chart`:case`column-chart`:if(e.inlineData||i.push({type:`rankingPicker`,mutationType:`rankAndSort`,ranking:a.ranking??{active:!1,number:5,direction:t.Top},sort:a.sort??{direction:n.Desc,by:r.Measure},importance:100}),p(e.slots)){let t=e.type===`area-chart`,n=t?[{key:`stacked`,label:`Stacked`},{key:`unstacked`,label:`Unstacked`},{key:`100`,label:`100%`},{key:`stream`,label:`Stream`}]:[{key:`grouped`,label:`Grouped`},{key:`stacked`,label:`Stacked`},{key:`100`,label:`100%`}],r=t?`stacked`:`grouped`;i.push({type:`optionDropdown`,mutationType:`mode`,values:n,currentValue:a.mode??r,importance:90})}break;case`donut-chart`:{let e=a.display??{};i.push({type:`optionDropdown`,mutationType:`donutLabelDisplay`,values:[{key:`withLegend`,label:`With legend`},{key:`withLabels`,label:`With labels`}],currentValue:e.categoryLabels===!0?`withLabels`:`withLegend`,importance:90});break}case`bubble-chart`:{let e=a.display??{};i.push({type:`optionDropdown`,mutationType:`bubbleValues`,values:[{key:`none`,label:`No values`},{key:`absolute`,label:`Absolute`},{key:`percentage`,label:`Percentage`}],currentValue:e.bubbleValues??e.values??`none`,importance:100});break}}return i.sort((e,t)=>t.importance-e.importance)}function h(e,t,n){let r=e.options;switch(t){case`mode`:return{...e,options:{...r,mode:n}};case`donutLabelDisplay`:{let t={...r.display??{}};return n===`withLabels`?(t.legend=!1,t.categoryLabels=!0):(t.legend=!0,t.categoryLabels=!1),{...e,options:{...r,display:t}}}case`bubbleValues`:{let t={...r.display??{}};return t.bubbleLabels=t.bubbleLabels!==!1,t.bubbleValues=n,{...e,options:{...r,display:t}}}default:return e}}function g(e,t){switch(t.type){case`slots`:return{...e,slots:t.slotsContents};case`options`:return{...e,options:t.options};case`filters`:return{...e,filters:t.filters};case`chartAction`:return h(e,t.actionType,t.key);case`rankAndSort`:return{...e,options:{...e.options,ranking:t.ranking,sort:t.sort}};case`fullReplace`:return t.chart;default:return e}}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return r}});