@astrato-io/visualizations 0.0.0-stage → 0.6.4

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 (145) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/LICENSE +93 -0
  3. package/README.md +843 -2
  4. package/THIRD_PARTY_NOTICES.md +8387 -0
  5. package/VISUALIZATION_DEFINITIONS.md +2378 -0
  6. package/chunks/LinearProgress-CUZ0D8_t.js +253 -0
  7. package/chunks/Radio-Ciu-F4CU.js +957 -0
  8. package/chunks/ToggleButton-BCJc3Jlc.js +153 -0
  9. package/chunks/_baseFlatten-DPXPOrea.js +7076 -0
  10. package/chunks/accessors-DemrDevR.js +128 -0
  11. package/chunks/app-filter-bar.compiler-j_CVoWTa.js +55 -0
  12. package/chunks/bar.compiler-oqaPzIut.js +370 -0
  13. package/chunks/color-settings-ZIvgNTq1.js +10 -0
  14. package/chunks/coloring-C16AUZEi.js +663 -0
  15. package/chunks/data-item-resolution-1lvYB5ln.js +53 -0
  16. package/chunks/debounce-fn-CUixuz45.js +7 -0
  17. package/chunks/escobar-BGqT1EsE.js +34580 -0
  18. package/chunks/event-bus-KiSiCJrC.js +2683 -0
  19. package/chunks/events-WZut5Ow6.js +4 -0
  20. package/chunks/extend-BKUkc4_i.js +37 -0
  21. package/chunks/filter.compiler-CuLtc_02.js +60 -0
  22. package/chunks/filtering-Yq4DEa0t.js +953 -0
  23. package/chunks/gauge-target-type-BkKXAqkX.js +4 -0
  24. package/chunks/grouping-type-BX_9Ix5q.js +3 -0
  25. package/chunks/interfaces-VUY4_yVO.js +8742 -0
  26. package/chunks/line-settings-DfYTUyPz.js +4 -0
  27. package/chunks/line.compiler-BpA_6Tc7.js +188 -0
  28. package/chunks/metadata-CPXdYoln.js +28 -0
  29. package/chunks/number.compiler-DbkWcG4S.js +44 -0
  30. package/chunks/pie-uv42Eqal.js +10 -0
  31. package/chunks/range-DrzdfBX4.js +22 -0
  32. package/chunks/registry-CExpGJ1N.js +920 -0
  33. package/chunks/requirements-DNhuShLS.js +6 -0
  34. package/chunks/rolldown-runtime-DleVn1XH.js +28 -0
  35. package/chunks/set-coloring-datafield-B3uIS1Pe.js +8 -0
  36. package/chunks/shared-CKDL4hx9.js +1171 -0
  37. package/chunks/src-BC7cGcJ-.js +2024 -0
  38. package/chunks/src-BOS6SqkZ.js +67 -0
  39. package/chunks/src-C0LgoUWY.js +26105 -0
  40. package/chunks/src-Cum_2NLV.js +12145 -0
  41. package/chunks/src-D9XogOrc.js +422 -0
  42. package/chunks/src-Dun_jXtz.js +10295 -0
  43. package/chunks/src-DvX5LU9T.js +14742 -0
  44. package/chunks/standalone-87YV_m9n.js +687 -0
  45. package/chunks/standalone-BDCwI6Hn.js +4619 -0
  46. package/chunks/standalone-BH5NqDwp.js +1763 -0
  47. package/chunks/standalone-BLVAWLNJ.js +385 -0
  48. package/chunks/standalone-BPomtAVs.js +2 -0
  49. package/chunks/standalone-BXyBcUOQ.js +2 -0
  50. package/chunks/standalone-BYm1UjLr.js +140 -0
  51. package/chunks/standalone-BllF4rDp.js +383 -0
  52. package/chunks/standalone-BmfMt74U.js +726 -0
  53. package/chunks/standalone-BqWyrnZI.js +281 -0
  54. package/chunks/standalone-C85u7U6I.js +340 -0
  55. package/chunks/standalone-CCNtaJ7s.js +741 -0
  56. package/chunks/standalone-CDQnr6qT.js +345 -0
  57. package/chunks/standalone-CNyNHKVx.js +674 -0
  58. package/chunks/standalone-CY57qwZ-.js +1129 -0
  59. package/chunks/standalone-CZynjFG7.js +12979 -0
  60. package/chunks/standalone-D5vnf-9y.js +3943 -0
  61. package/chunks/standalone-DFPva_ku.js +299 -0
  62. package/chunks/standalone-DQxxNwF8.js +675 -0
  63. package/chunks/standalone-DS9T0FZ-.js +830 -0
  64. package/chunks/standalone-Dx3MLlrO.js +512 -0
  65. package/chunks/standalone-DzixzZAL.js +411 -0
  66. package/chunks/standalone-QJ1kKMnO.js +6 -0
  67. package/chunks/standalone-jiz0L2Dg.js +3855 -0
  68. package/chunks/standalone-lBm9hQ-q.js +179 -0
  69. package/chunks/standalone-rJ45Zfl1.js +68 -0
  70. package/chunks/stroke-dash-UgMEcCS4.js +6 -0
  71. package/chunks/table.compiler-BrXkm4Fz.js +213 -0
  72. package/chunks/toInteger-DVZr-D1j.js +11 -0
  73. package/chunks/treemap-x_zmJoG7.js +23 -0
  74. package/chunks/typeof-CJDtcySz.js +13 -0
  75. package/chunks/types-dVVCsDWD.js +4 -0
  76. package/chunks/ui-D1HQNIBy.js +54039 -0
  77. package/chunks/url-utils-B17gj_mr.js +5501 -0
  78. package/chunks/useFieldName-oqQ3bvnO.js +7 -0
  79. package/chunks/utils-Ba9T0TqC.js +31097 -0
  80. package/chunks/view-CLqWMV7Z.js +156 -0
  81. package/definitions.js +3 -0
  82. package/docs/operations/astrato-app-filter-bar.md +161 -0
  83. package/docs/operations/bar.md +7050 -0
  84. package/docs/operations/combo.md +5825 -0
  85. package/docs/operations/date-picker.md +644 -0
  86. package/docs/operations/distribution-gauge.md +3218 -0
  87. package/docs/operations/dot.md +5662 -0
  88. package/docs/operations/filter.md +1507 -0
  89. package/docs/operations/gauge.md +3452 -0
  90. package/docs/operations/heatMap.md +6026 -0
  91. package/docs/operations/histogram.md +1870 -0
  92. package/docs/operations/iframe.md +56 -0
  93. package/docs/operations/image.md +177 -0
  94. package/docs/operations/index.md +46 -0
  95. package/docs/operations/line.md +6468 -0
  96. package/docs/operations/number.md +3969 -0
  97. package/docs/operations/pie.md +6089 -0
  98. package/docs/operations/radar.md +4646 -0
  99. package/docs/operations/sankey.md +3210 -0
  100. package/docs/operations/scatter.md +6075 -0
  101. package/docs/operations/shape.md +315 -0
  102. package/docs/operations/simpleTextObject.md +706 -0
  103. package/docs/operations/slider.md +230 -0
  104. package/docs/operations/table.md +8790 -0
  105. package/docs/operations/tree.md +2874 -0
  106. package/docs/operations/treemap.md +3619 -0
  107. package/docs/operations/waterfall.md +2938 -0
  108. package/docs/operations/word-cloud.md +3071 -0
  109. package/getters.js +18 -0
  110. package/index.js +1183 -0
  111. package/metadata.js +20 -0
  112. package/operations.js +64 -0
  113. package/package.json +191 -4
  114. package/src/definitions/index.d.ts +2 -0
  115. package/src/definitions/shared/index.d.ts +5 -0
  116. package/src/definitions/shared/lib/available-fields.d.ts +36 -0
  117. package/src/definitions/shared/lib/compilers/index.d.ts +7 -0
  118. package/src/definitions/shared/lib/registry/compile.d.ts +2 -0
  119. package/src/definitions/shared/lib/registry/descriptor-registry.d.ts +587 -0
  120. package/src/definitions/shared/lib/registry/index.d.ts +3 -0
  121. package/src/definitions/shared/lib/registry/validation.d.ts +3 -0
  122. package/src/definitions/shared/lib/schemas/app-filter-bar.schema.d.ts +22 -0
  123. package/src/definitions/shared/lib/schemas/bar.schema.d.ts +73 -0
  124. package/src/definitions/shared/lib/schemas/broad-chart.schema.d.ts +68 -0
  125. package/src/definitions/shared/lib/schemas/common.schema.d.ts +304 -0
  126. package/src/definitions/shared/lib/schemas/filter.schema.d.ts +22 -0
  127. package/src/definitions/shared/lib/schemas/index.d.ts +9 -0
  128. package/src/definitions/shared/lib/schemas/line.schema.d.ts +72 -0
  129. package/src/definitions/shared/lib/schemas/number.schema.d.ts +21 -0
  130. package/src/definitions/shared/lib/schemas/object.schema.d.ts +215 -0
  131. package/src/definitions/shared/lib/schemas/table.schema.d.ts +458 -0
  132. package/src/definitions/shared/lib/types/compilation.types.d.ts +36 -0
  133. package/src/definitions/shared/lib/types/definition.types.d.ts +2 -0
  134. package/src/definitions/shared/lib/types/descriptor.types.d.ts +39 -0
  135. package/src/definitions/shared/lib/types/index.d.ts +3 -0
  136. package/src/getters/index.d.ts +30 -0
  137. package/src/index.d.ts +4 -0
  138. package/src/metadata/index.d.ts +4 -0
  139. package/src/operations/index.d.ts +30 -0
  140. package/src/registry/index.d.ts +6 -0
  141. package/src/runtime/index.d.ts +2 -0
  142. package/src/types.d.ts +307 -0
  143. package/src/visualization-catalog.d.ts +82 -0
  144. package/src/web-components/index.d.ts +12 -0
  145. package/styles.css +2 -0
@@ -0,0 +1,385 @@
1
+ import { o as e, r as t } from "./rolldown-runtime-DleVn1XH.js";
2
+ import { Bs as n, Jn as r, Kn as i, No as a, On as o, Po as s, Ta as c, Ti as l, Un as u, Xs as d, Yn as f, bn as p, bo as m, hc as h, mo as g, pc as _, qn as v, qs as y, yo as b, zn as x } from "./interfaces-VUY4_yVO.js";
3
+ import { I as S, Ki as C, P as w, Zt as T, pn as E, wi as ee } from "./utils-Ba9T0TqC.js";
4
+ import { t as D } from "./stroke-dash-UgMEcCS4.js";
5
+ import { t as O } from "./line-settings-DfYTUyPz.js";
6
+ import { B as te, Ct as ne, Dt as re, Et as ie, Ft as k, G as ae, J as oe, Jt as se, Kt as ce, L as le, M as ue, Pt as de, Q as fe, Qt as pe, Rt as A, St as j, Tt as M, U as N, V as P, Wt as F, X as I, Xt as L, Y as R, Yt as z, Z as B, Zt as V, _t as me, an as H, at as he, ct as ge, dt as U, ht as _e, i as ve, j as ye, kt as be, lt as xe, mt as W, n as Se, ot as Ce, pt as G, q as we, rt as Te, st as Ee, un as K, ut as De, vt as Oe } from "./escobar-BGqT1EsE.js";
7
+ import { l as q, vt as J } from "./_baseFlatten-DPXPOrea.js";
8
+ import { _ as Y, c as ke, t as Ae } from "./coloring-C16AUZEi.js";
9
+ import { t as je } from "./set-coloring-datafield-B3uIS1Pe.js";
10
+ var X = /* @__PURE__ */ e(C()), Me = (e) => {
11
+ let { coloring: t } = e || {}, n = e.dimensions.filter(l);
12
+ switch (t?.type) {
13
+ case d.Categorical: return ne(e, [], n[1] || n[0]);
14
+ case d.Gradient: return M(e);
15
+ case d.Single: return _(n[0].dataItem);
16
+ default: return null;
17
+ }
18
+ }, Ne = (e, t, n) => {
19
+ let i = e.dimensions.filter(l), a = e.measures.filter(l), s = i[0], c = u(e.lineSettings, e.dimensions, e.measures), d = !1, f = {};
20
+ if (s && e?.axes?.dimension?.continuousAxis) {
21
+ let e = h(s.dataItem), t = !!s.datePart, n = e !== null && (o(e) || x(e));
22
+ d = !t && n;
23
+ }
24
+ let p = Me(e);
25
+ if (f = j(p ? je(e, p) : e, t, f), f = ae(e, f, n.collections, d, !0), c) {
26
+ let t = a[0]?.secondaryAxis ? e?.axes?.secondaryMeasure : e?.axes?.primaryMeasure;
27
+ f[L(e, a[0])] = {
28
+ invert: N(!0, t),
29
+ data: { collection: "collection" },
30
+ ...P(t)
31
+ };
32
+ }
33
+ return r(e) && a.forEach((e) => {
34
+ let t = _(e.dataItem);
35
+ t && (f[pe.YAxisScale]?.data)?.fields?.push(v(t));
36
+ }), {
37
+ ...n,
38
+ scales: f
39
+ };
40
+ }, Pe = (e, t, n, i) => {
41
+ let a = re(e, t, n, i), o = [], s = e.dimensions.filter(l), c = e.measures.filter(l), d = ue((e.supportingMeasures ?? []).filter(l)), f = u(e.lineSettings, e.dimensions, e.measures), p = r(e);
42
+ if (a.collections[0]?.data.extract[0] && (a.collections[0].data.extract[0].props = {
43
+ ...a.collections[0].data.extract[0].props,
44
+ ...d
45
+ }), s.length === 1 && c.length > 1 && f && (a.collections[0].data.extract = c.map((e) => {
46
+ let t = _(e.dataItem), n = p ? v(t) : t;
47
+ return {
48
+ field: _(s[0].dataItem),
49
+ props: {
50
+ end: { field: n },
51
+ series: t,
52
+ color: t,
53
+ ...d
54
+ }
55
+ };
56
+ })), s[1] && !f) {
57
+ let e = {
58
+ key: ie.LineSeries,
59
+ data: { extract: [{
60
+ field: _(s[1].dataItem),
61
+ props: {
62
+ [_(s[1].dataItem)]: { field: _(s[1].dataItem) },
63
+ ...d
64
+ }
65
+ }] }
66
+ };
67
+ o.push(e);
68
+ }
69
+ return {
70
+ ...a,
71
+ collections: [...a.collections, ...o]
72
+ };
73
+ }, Fe = (e, t, r, i, a, o) => {
74
+ if (!n(e)) return r;
75
+ let s = e.measures.filter(l);
76
+ if (u(e.lineSettings, e.dimensions, e.measures)) return r;
77
+ let c = {}, d = {}, f = te({
78
+ targetComponentKeys: s.map((t) => {
79
+ let n = _(t.dataItem), r = W(e, t, y.Point);
80
+ return d[r] = n, c[r] = {
81
+ enabled: t.dataLabels?.show || !1,
82
+ fontSize: se(t.dataLabels?.size),
83
+ backdropColor: t.dataLabels?.backdropColor,
84
+ textColor: t.dataLabels?.textColor,
85
+ isColored: t.dataLabels?.isColored,
86
+ colorType: t.dataLabels?.showBackdrop ? b.Backdrop : b.Text,
87
+ density: t.dataLabels?.density || m.Medium
88
+ }, r;
89
+ }).filter((e) => c[e].enabled),
90
+ targetSelector: `.${U}`,
91
+ label: ({ data: e, node: t }) => e[d[t.key]]?.label,
92
+ skipBrush: !0
93
+ }, c, o, t);
94
+ return {
95
+ ...r,
96
+ components: [...r.components, f]
97
+ };
98
+ }, Ie = "line-end-labels", Le = 6, Re = 160, ze = [2, 2], Be = (e) => Object.values(H).includes(e.type) && e.layout?.dock === a.Right, Ve = (e, t, n, r, o, s) => {
99
+ if (!e.lineSettings?.endLabels?.show || V(e) || u(e.lineSettings, e.dimensions, e.measures)) return n;
100
+ let c = e.dimensions.filter(l), d = e.measures.filter(l);
101
+ if (!c[0] || !d.length) return n;
102
+ let f = c[1], p = f ? _(f.dataItem) : void 0, m = d.length > 1, h = e.lineSettings.endLabels.showBackdrop ?? !1, g = (e.lineSettings.endLabels.position ?? O.Plot) === O.Right, v = t.fonts.general.color ?? J.fontDark, b = ({ node: e }) => e?.attrs?.fill ?? v, x = (e) => new q(b(e)).betterContrast(new q(v), new q(J.fontLight), new q(J.fontDark)).rgb(), S = (e) => {
103
+ let t = String(e?.label ?? e?.value ?? "");
104
+ return f?.formatter?.format ? String(E(f.formatter, e?.value)) : t;
105
+ }, C = d.map((n) => {
106
+ let r = i(n), a = ({ data: e }) => p ? e?.[p] : void 0;
107
+ return {
108
+ component: W(e, n, y.Point),
109
+ selector: `.${U}`,
110
+ strategy: {
111
+ type: "end",
112
+ settings: {
113
+ fontFamily: t.fonts.general.fontFamily,
114
+ fontSize: J.dataPoint.valueFontSize,
115
+ spacing: !0,
116
+ label: {
117
+ series: p,
118
+ label: p ? (e) => {
119
+ let t = S(a(e));
120
+ return m ? `${t} · ${r}` : t;
121
+ } : () => r,
122
+ linkData: p ? ({ data: e }) => e : void 0,
123
+ fontWeight: "bold",
124
+ offset: Le,
125
+ maxWidth: Re,
126
+ ...h ? {
127
+ fill: x,
128
+ backdrop: (e) => ({
129
+ fill: b(e),
130
+ padding: ze
131
+ })
132
+ } : {}
133
+ }
134
+ }
135
+ }
136
+ };
137
+ }), w = {
138
+ type: K.Labels,
139
+ key: Ie,
140
+ brush: p && !s?.disable?.interactions ? ce(F([""], {
141
+ ...s,
142
+ disable: { brushing: s?.disable?.brushing }
143
+ })) : void 0,
144
+ layout: g ? {
145
+ dock: a.Right,
146
+ displayOrder: k.Labels
147
+ } : { displayOrder: k.Labels },
148
+ settings: { sources: C }
149
+ }, T = g ? n.components.map((e) => Be(e) ? {
150
+ ...e,
151
+ layout: {
152
+ ...e.layout,
153
+ displayOrder: k.LegendOutsideLabels
154
+ }
155
+ } : e) : n.components;
156
+ return {
157
+ ...n,
158
+ components: [...T, w]
159
+ };
160
+ }, He = (e, t, n) => n.components.some((e) => e.key === "line-end-labels") ? {
161
+ ...n,
162
+ components: n.components.map((e) => {
163
+ if (e.type !== K.Tooltip || !e.settings?.filter) return e;
164
+ let t = e.settings.filter;
165
+ return {
166
+ ...e,
167
+ settings: {
168
+ ...e.settings,
169
+ filter: (e) => e.some((e) => e.key === "line-end-labels") ? [] : t(e)
170
+ }
171
+ };
172
+ })
173
+ } : n;
174
+ ke();
175
+ var Ue = (e, t, n, r, i) => {
176
+ let a = e.dimensions.filter(l), o = e.measures.filter(l), s = a[0], c = o.some((e) => e.forecasts?.length > 0), u = h(s?.dataItem), d = !!s.datePart;
177
+ return !c || !x(u) || !s || d ? n : [
178
+ oe,
179
+ Z,
180
+ We,
181
+ Ge,
182
+ qe,
183
+ Ke
184
+ ].reduce((n, a) => a(e, t, n, r, i), n);
185
+ }, Z = (e, t, n) => {
186
+ let r = e.measures.filter(l).filter((e) => !!e.forecasts).reduce((r, i) => {
187
+ let a = i.forecasts.map((r, a) => {
188
+ let o = Q(e, t, n, i, r), c = p(i.dataItem, r, `${a}`), l = W(e, i, y.Line, `-forecast-line-${a}`), u = z(e), d = L(e, i);
189
+ return xe({
190
+ coordinates: {
191
+ major: { scale: u },
192
+ minor: {
193
+ scale: d,
194
+ ref: c
195
+ }
196
+ },
197
+ layers: {
198
+ curve: e.lineSettings?.lineCurve,
199
+ line: {
200
+ stroke: o,
201
+ strokeWidth: r.strokeWidth,
202
+ strokeDasharray: D(r.strokeDash),
203
+ show: !0
204
+ }
205
+ },
206
+ orientation: V(e) ? s.Vertical : void 0
207
+ }, n, c, l);
208
+ });
209
+ return [...r, ...a];
210
+ }, []);
211
+ return {
212
+ ...n,
213
+ components: [...r, ...n.components]
214
+ };
215
+ }, We = (e, t, n) => {
216
+ let r = e.dimensions.filter(l), i = e.measures.filter(l), a = _(r[0]?.dataItem), o = i.filter((e) => !!e.forecasts).map((r) => r.forecasts.map((i, o) => {
217
+ let s = Q(e, t, n, r, i), c = p(r.dataItem, i, `${o}`), l = [], u = (e) => e[c]?.value === null || e[_(r.dataItem)]?.value === null;
218
+ if (_e(n, 0, {
219
+ [c]: { field: c },
220
+ [a]: { field: a }
221
+ }), i.showDataPoints) {
222
+ let t = W(e, r, y.Point, `-forecast-line-${o}`);
223
+ l.push(G(e, r, c, s, t, !1, u));
224
+ }
225
+ let d = W(e, r, y.Point, `-forecast-line-${o}-tooltip`);
226
+ return l.push(G(e, r, c, s, d, !0, u)), l;
227
+ }).reduce((e, t) => [...e, ...t], [])).reduce((e, t) => [...e, ...t], []);
228
+ return {
229
+ ...n,
230
+ components: [...n.components, ...o]
231
+ };
232
+ }, Ge = (e, t, n, r, i) => {
233
+ let a = e.dimensions.filter(l), o = e.measures.filter(l).find((e) => !!e.forecasts && e.forecasts[0]?.showForecastStart);
234
+ if (!i || !o) return n;
235
+ let s = _(a[0].dataItem), c = p(o.dataItem, o.forecasts[0], "0"), u = {
236
+ value: i[0].items.find((e) => e[c] !== null)[s],
237
+ label: {
238
+ text: o.forecasts[0].refLineLabel ?? "",
239
+ showValue: !1,
240
+ fill: "#4c4c3e"
241
+ },
242
+ stroke: "#96969680"
243
+ }, d = z(e), f = {
244
+ type: K.RefLine,
245
+ layout: { displayOrder: k.ForecastLine },
246
+ lines: { x: [Ce(u, d, t, a[0].formatter)] }
247
+ };
248
+ return {
249
+ ...n,
250
+ components: [...n.components, f]
251
+ };
252
+ }, Ke = (e, t, n) => {
253
+ let r = e.measures.filter(l), i = n.components.find((e) => e.type === H.CategoricalLegend), a = e.coloring?.type;
254
+ if (!i && !n.scales[a]) return n;
255
+ let o = { ...n.scales }, s = o[a];
256
+ return r.forEach((r) => {
257
+ r.forecasts.forEach((i, a) => {
258
+ let o = Q(e, t, n, r, i);
259
+ if (i.label && typeof o == "string") {
260
+ let e = p(r.dataItem, i, `${a}`);
261
+ s.data.push(e), (s?.range).push(o);
262
+ }
263
+ });
264
+ }), s.label = (e) => {
265
+ let t = "";
266
+ return r.forEach((n) => {
267
+ _(n.dataItem) === e.datum.value?.toString() ? t = f(n) ?? n.label ?? n.dataItem?.name : n.forecasts.forEach((r, i) => {
268
+ p(n.dataItem, r, `${i}`) === e.datum.value && (t = r.label ?? "");
269
+ });
270
+ }), t;
271
+ }, {
272
+ ...n,
273
+ scales: o
274
+ };
275
+ }, qe = (e, t, n, r, i) => {
276
+ let a = e.measures.filter(l).reduce((t, n) => {
277
+ let r = (n.forecasts ?? []).map((t, r) => W(e, n, y.Point, `-forecast-line-${r}-tooltip`));
278
+ return t.concat(r);
279
+ }, []);
280
+ return I(e, t, n, {
281
+ filter: (e) => e.filter((e) => a.findIndex((t) => t === e.key) !== -1),
282
+ placement: {
283
+ type: "pointer",
284
+ area: "target"
285
+ },
286
+ extract: B(e, t, Je, fe)
287
+ }, `tooltip-${K.Point}-forecast`, i);
288
+ }, Je = (e, t, n, r, i, a, o) => {
289
+ let s = [];
290
+ return e.forEach((e) => {
291
+ e.forecasts.forEach((r, i) => {
292
+ let a = p(e.dataItem, r, `${i}`), c = t.data[a].value, l = f(e), u = r.label || l || e.label || e.dataItem.name || "", d = c;
293
+ !o && e.formatter ? d = n.formatter(e.formatter)(c) : o && e.formatter && (d = n.formatter(Te(e.formatter))(c)), s.push({
294
+ label: u,
295
+ value: d
296
+ });
297
+ });
298
+ }), s;
299
+ }, Q = (e, t, n, r, i) => {
300
+ let a = new Ae(e, t).getMeasureColor(n, r);
301
+ switch (i.inheritColor) {
302
+ case g.Lighter: return Y(a).brighter().toString();
303
+ case g.Darker: return Y(a).darker().toString();
304
+ default: return a;
305
+ }
306
+ }, Ye = (e, t, n) => we(e, t, n), $ = class extends ye {
307
+ constructor() {
308
+ super([
309
+ Pe,
310
+ Ne,
311
+ A,
312
+ Oe,
313
+ Ee,
314
+ ge,
315
+ me,
316
+ Fe,
317
+ Ve,
318
+ he,
319
+ R,
320
+ He,
321
+ Ye,
322
+ be,
323
+ Ue,
324
+ de,
325
+ De,
326
+ le
327
+ ]);
328
+ }
329
+ };
330
+ function Xe(e, t) {
331
+ let n = e.dimensions.filter(l).map((e) => _(e.dataItem)), r = n[0], i = e.measures.filter((e) => {
332
+ let t = e.advancedCalculation;
333
+ return l(e) && t?.type === "growth" && t.startFromZero && typeof t.offset == "number" && t.offset < 0 && !t.nonTimePeriod;
334
+ }).map((e) => _(e.dataItem)).filter((e) => e !== null);
335
+ return !t || !r || i.length === 0 || e.querySettings?.hideZeroValues ? t : t.map((e) => {
336
+ let t = e.items[0];
337
+ if (!t || t[r] == null) return e;
338
+ let a = t[r], o = n.slice(1).filter((e) => e !== null), s = (e) => JSON.stringify(o.map((t) => e[t])), c = /* @__PURE__ */ new Set(), l = e.items.map((e) => e[r] === a ? (c.add(s(e)), {
339
+ ...e,
340
+ ...Object.fromEntries(i.map((e) => [e, 0]))
341
+ }) : e), u = [];
342
+ e.items.forEach((t) => {
343
+ let n = s(t);
344
+ if (c.has(n)) return;
345
+ c.add(n);
346
+ let l = Object.fromEntries(e.fields.map((e) => [e.dataItemId, null]));
347
+ o.forEach((e) => {
348
+ l[e] = t[e];
349
+ }), l[r] = a, i.forEach((e) => {
350
+ l[e] = 0;
351
+ }), u.push(l);
352
+ });
353
+ let d = l.findIndex((e) => e[r] !== a), f = d === -1 ? l.length : d, p = e.groupings ? Object.fromEntries(Object.entries(e.groupings).map(([e, t]) => [Number(e) < f ? e : Number(e) + u.length, t])) : void 0;
354
+ return {
355
+ ...e,
356
+ items: [
357
+ ...l.slice(0, f),
358
+ ...u,
359
+ ...l.slice(f)
360
+ ],
361
+ ...p ? { groupings: p } : {}
362
+ };
363
+ });
364
+ }
365
+ var Ze = ee(), Qe = T(({ vSpec: e, vTheme: t, data: n, elementSize: r, vizProperties: i }) => {
366
+ let a = w(), [o] = (0, X.useState)(() => new $()), s = S(), l = (0, X.useMemo)(() => ({
367
+ ...i,
368
+ disable: {
369
+ ...i.disable,
370
+ brushingAxis: !0
371
+ }
372
+ }), [i]), u = t || c, d = Se();
373
+ if (!e || !n || !r) return null;
374
+ let f = o.compile(e, u, Xe(e, n), r, l, y.Line, a, s, d);
375
+ return f ? /* @__PURE__ */ (0, Ze.jsx)(ve, {
376
+ config: i,
377
+ definition: f,
378
+ size: r,
379
+ vSpec: e
380
+ }) : null;
381
+ }), $e = /* @__PURE__ */ t({
382
+ LineChart: () => Qe,
383
+ LineChartCompiler: () => $
384
+ });
385
+ export { $ as n, $e as t };
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./view-CLqWMV7Z.js";
2
+ export { e as DatePicker };
@@ -0,0 +1,2 @@
1
+ import { n as e } from "./standalone-C85u7U6I.js";
2
+ export { e as DistributionGaugeChart };
@@ -0,0 +1,140 @@
1
+ import { o as e } from "./rolldown-runtime-DleVn1XH.js";
2
+ import { Ma as t, Oa as n, n as r } from "./interfaces-VUY4_yVO.js";
3
+ import { G as i, Ki as a, Lr as o, Nn as s, Xi as c, Zt as l, a as u, d, wi as f, xn as p } from "./utils-Ba9T0TqC.js";
4
+ import { t as m } from "./events-WZut5Ow6.js";
5
+ var h = /* @__PURE__ */ e(a());
6
+ h.forwardRef(function(e, t) {
7
+ return h.createElement("img", {
8
+ ...e,
9
+ ref: t,
10
+ src: "data:image/svg+xml,%3Csvg%20width%3D%22177%22%20height%3D%22177%22%20viewBox%3D%220%200%20177%20177%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Cpath%20d%3D%22M177%2041.2427V164.357C177%20167.71%20175.668%20170.926%20173.297%20173.297C170.926%20175.668%20167.71%20177%20164.357%20177H12.6429C9.28976%20177%206.074%20175.668%203.70301%20173.297C1.33201%20170.926%200%20167.71%200%20164.357V12.6429C0%209.28976%201.33201%206.074%203.70301%203.70301C6.074%201.33201%209.28976%200%2012.6429%200L135.757%200C139.11%200%20152.289%2016.5319%20154.66%2018.9029C157.031%2021.2739%20177%2037.8896%20177%2041.2427Z%22%20fill%3D%22%23F2F2F2%22%2F%3E%0A%20%20%3Cmask%20id%3D%22mask0%22%20mask-type%3D%22alpha%22%20maskUnits%3D%22userSpaceOnUse%22%20x%3D%2225%22%20y%3D%2225%22%20width%3D%22127%22%20height%3D%22127%22%3E%0A%20%20%20%20%3Crect%20x%3D%2225.2857%22%20y%3D%2225.2857%22%20width%3D%22126.429%22%20height%3D%22126.429%22%20fill%3D%22%23F2F2F2%22%2F%3E%0A%20%20%3C%2Fmask%3E%0A%20%20%3Cg%20mask%3D%22url(%23mask0)%22%3E%0A%20%20%20%20%3Cpath%20d%3D%22M135.703%20147.315L126.644%20123.059L90.9439%2027.4276C90.4703%2026.1541%2089.227%2025.2857%2087.8653%2025.2857C86.4444%2025.2857%2085.201%2026.0962%2084.7274%2027.3118L61.2231%2083.9847L44.3497%2069.7441C43.3432%2068.8758%2041.8631%2068.7021%2040.679%2069.281C39.4949%2069.8599%2038.7252%2071.0756%2038.8436%2072.407L42.3367%20130.469C42.3959%20131.685%2043.1656%20132.727%2044.2905%20133.248C45.4154%20133.769%2046.7179%20133.595%2047.7244%20132.901L80.287%20108.645L130.493%20150.904C131.144%20151.425%20131.914%20151.714%20132.683%20151.714C133.335%20151.714%20133.986%20151.541%20134.578%20151.135C135.703%20150.267%20136.236%20148.704%20135.703%20147.315ZM58.5589%2090.4103L48.0796%20115.65L45.9482%2079.8167L58.5589%2090.4103ZM53.2896%20120.454L63.8873%2094.9257L75.0178%20104.304L53.2896%20120.454ZM66.5515%2088.5L87.6284%2037.616L104.324%2082.3638L80.4055%20100.136L66.5515%2088.5ZM85.6155%20104.593L106.752%2088.8474L120.369%20125.259L125.046%20137.763L85.6155%20104.593Z%22%20fill%3D%22%23BDBDBD%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%20%20%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M137.419%200H135.757V28.5999C135.757%2031.953%20137.089%2035.1687%20139.46%2037.5397C141.831%2039.9107%20145.047%2041.2427%20148.4%2041.2427H177V39.581L137.419%200Z%22%20fill%3D%22%23E0E0E0%22%2F%3E%0A%3C%2Fsvg%3E%0A"
11
+ });
12
+ });
13
+ var g = "data:image/svg+xml,%3Csvg%20width%3D%22177%22%20height%3D%22177%22%20viewBox%3D%220%200%20177%20177%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Cpath%20d%3D%22M177%2041.2427V164.357C177%20167.71%20175.668%20170.926%20173.297%20173.297C170.926%20175.668%20167.71%20177%20164.357%20177H12.6429C9.28976%20177%206.074%20175.668%203.70301%20173.297C1.33201%20170.926%200%20167.71%200%20164.357V12.6429C0%209.28976%201.33201%206.074%203.70301%203.70301C6.074%201.33201%209.28976%200%2012.6429%200L135.757%200C139.11%200%20152.289%2016.5319%20154.66%2018.9029C157.031%2021.2739%20177%2037.8896%20177%2041.2427Z%22%20fill%3D%22%23F2F2F2%22%2F%3E%0A%20%20%3Cmask%20id%3D%22mask0%22%20mask-type%3D%22alpha%22%20maskUnits%3D%22userSpaceOnUse%22%20x%3D%2225%22%20y%3D%2225%22%20width%3D%22127%22%20height%3D%22127%22%3E%0A%20%20%20%20%3Crect%20x%3D%2225.2857%22%20y%3D%2225.2857%22%20width%3D%22126.429%22%20height%3D%22126.429%22%20fill%3D%22%23F2F2F2%22%2F%3E%0A%20%20%3C%2Fmask%3E%0A%20%20%3Cg%20mask%3D%22url(%23mask0)%22%3E%0A%20%20%20%20%3Cpath%20d%3D%22M135.703%20147.315L126.644%20123.059L90.9439%2027.4276C90.4703%2026.1541%2089.227%2025.2857%2087.8653%2025.2857C86.4444%2025.2857%2085.201%2026.0962%2084.7274%2027.3118L61.2231%2083.9847L44.3497%2069.7441C43.3432%2068.8758%2041.8631%2068.7021%2040.679%2069.281C39.4949%2069.8599%2038.7252%2071.0756%2038.8436%2072.407L42.3367%20130.469C42.3959%20131.685%2043.1656%20132.727%2044.2905%20133.248C45.4154%20133.769%2046.7179%20133.595%2047.7244%20132.901L80.287%20108.645L130.493%20150.904C131.144%20151.425%20131.914%20151.714%20132.683%20151.714C133.335%20151.714%20133.986%20151.541%20134.578%20151.135C135.703%20150.267%20136.236%20148.704%20135.703%20147.315ZM58.5589%2090.4103L48.0796%20115.65L45.9482%2079.8167L58.5589%2090.4103ZM53.2896%20120.454L63.8873%2094.9257L75.0178%20104.304L53.2896%20120.454ZM66.5515%2088.5L87.6284%2037.616L104.324%2082.3638L80.4055%20100.136L66.5515%2088.5ZM85.6155%20104.593L106.752%2088.8474L120.369%20125.259L125.046%20137.763L85.6155%20104.593Z%22%20fill%3D%22%23BDBDBD%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%20%20%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M137.419%200H135.757V28.5999C135.757%2031.953%20137.089%2035.1687%20139.46%2037.5397C141.831%2039.9107%20145.047%2041.2427%20148.4%2041.2427H177V39.581L137.419%200Z%22%20fill%3D%22%23E0E0E0%22%2F%3E%0A%3C%2Fsvg%3E%0A", _ = (e, t, n) => t?.imageSettings.image?.mediaItemId ? e.daedalus.mediaApi.getUrl(t?.imageSettings.image?.mediaItemId) : t?.imageSettings.image?.imageUrl ? t?.imageSettings.image?.imageUrl : t?.imageSettings.image?.imageVariable && n?.[t?.imageSettings.image?.imageVariable]?.value ? `${n?.[t?.imageSettings.image?.imageVariable]?.value}` : "", v = (e, n, r) => ({
14
+ imageSrc: _(e, n, r),
15
+ imageFit: n?.imageSettings.image?.imageFit ?? t.Contain,
16
+ opacity: n?.imageSettings.opacity ?? 1,
17
+ saturation: n?.imageSettings.saturation ?? 1,
18
+ blur: n?.imageSettings.blur ?? 0,
19
+ shadow: n?.imageSettings.shadow ?? !1
20
+ }), y = i({
21
+ singleImageContainer: {
22
+ display: "flex",
23
+ height: "100%",
24
+ width: "100%"
25
+ },
26
+ previewImageContainer: {
27
+ display: "flex",
28
+ height: "100%",
29
+ width: "100%",
30
+ justifyContent: "center",
31
+ alignItems: "center",
32
+ "& img": {
33
+ maxWidth: "100%",
34
+ maxHeight: "100%"
35
+ }
36
+ },
37
+ addGalleryButton: {
38
+ ...r.normal14,
39
+ padding: "10px 20px",
40
+ background: n.white,
41
+ borderRadius: 4,
42
+ border: `1px solid ${n.grey3}`,
43
+ color: n.secondaryPurple,
44
+ cursor: "pointer",
45
+ display: "flex",
46
+ justifyContent: "center",
47
+ alignItems: "center"
48
+ },
49
+ buttonIcon: { marginRight: 5 }
50
+ }), b = i({
51
+ mainContainer: {
52
+ display: "flex",
53
+ flexDirection: "column",
54
+ width: "100%",
55
+ flexGrow: 1,
56
+ maxHeight: "100%"
57
+ },
58
+ imageContainer: {
59
+ position: "relative",
60
+ display: "block",
61
+ width: "100%",
62
+ flexGrow: 1,
63
+ maxHeight: "100%"
64
+ },
65
+ image: {
66
+ height: "100%",
67
+ width: "100%",
68
+ pointerEvents: "none",
69
+ objectFit: "contain",
70
+ position: "absolute",
71
+ top: 0,
72
+ left: 0,
73
+ "&.cover": { objectFit: "cover" },
74
+ "&.contain": { objectFit: "contain" },
75
+ "&.fill": { objectFit: "fill" },
76
+ "&.none": { objectFit: "none" }
77
+ }
78
+ }), x = f(), S = (e) => s({
79
+ contain: e === t.Contain,
80
+ cover: e === t.Cover,
81
+ fill: e === t.Fill,
82
+ none: e === t.None
83
+ }), C = ({ imageSrc: e, imageFit: t, opacity: n, saturation: r, blur: i, shadow: a, onLoadCallback: o }) => {
84
+ let c = b(), l = a ? "drop-shadow(0px 3px 6px rgba(0,0,0,0.25))" : "";
85
+ return /* @__PURE__ */ (0, x.jsx)("div", {
86
+ className: c.mainContainer,
87
+ children: /* @__PURE__ */ (0, x.jsx)("div", {
88
+ className: c.imageContainer,
89
+ children: /* @__PURE__ */ (0, x.jsx)("img", {
90
+ className: s({
91
+ [c.image]: !0,
92
+ [S(t)]: !0
93
+ }),
94
+ style: {
95
+ filter: `blur(${i}px) saturate(${r}) ${l}`,
96
+ opacity: n
97
+ },
98
+ alt: "",
99
+ title: e.trim() ? "" : "Add Image",
100
+ src: e.trim() || "data:image/svg+xml,%3Csvg%20width%3D%22177%22%20height%3D%22177%22%20viewBox%3D%220%200%20177%20177%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Cpath%20d%3D%22M177%2041.2427V164.357C177%20167.71%20175.668%20170.926%20173.297%20173.297C170.926%20175.668%20167.71%20177%20164.357%20177H12.6429C9.28976%20177%206.074%20175.668%203.70301%20173.297C1.33201%20170.926%200%20167.71%200%20164.357V12.6429C0%209.28976%201.33201%206.074%203.70301%203.70301C6.074%201.33201%209.28976%200%2012.6429%200L135.757%200C139.11%200%20152.289%2016.5319%20154.66%2018.9029C157.031%2021.2739%20177%2037.8896%20177%2041.2427Z%22%20fill%3D%22%23F2F2F2%22%2F%3E%0A%20%20%3Cmask%20id%3D%22mask0%22%20mask-type%3D%22alpha%22%20maskUnits%3D%22userSpaceOnUse%22%20x%3D%2225%22%20y%3D%2225%22%20width%3D%22127%22%20height%3D%22127%22%3E%0A%20%20%20%20%3Crect%20x%3D%2225.2857%22%20y%3D%2225.2857%22%20width%3D%22126.429%22%20height%3D%22126.429%22%20fill%3D%22%23F2F2F2%22%2F%3E%0A%20%20%3C%2Fmask%3E%0A%20%20%3Cg%20mask%3D%22url(%23mask0)%22%3E%0A%20%20%20%20%3Cpath%20d%3D%22M135.703%20147.315L126.644%20123.059L90.9439%2027.4276C90.4703%2026.1541%2089.227%2025.2857%2087.8653%2025.2857C86.4444%2025.2857%2085.201%2026.0962%2084.7274%2027.3118L61.2231%2083.9847L44.3497%2069.7441C43.3432%2068.8758%2041.8631%2068.7021%2040.679%2069.281C39.4949%2069.8599%2038.7252%2071.0756%2038.8436%2072.407L42.3367%20130.469C42.3959%20131.685%2043.1656%20132.727%2044.2905%20133.248C45.4154%20133.769%2046.7179%20133.595%2047.7244%20132.901L80.287%20108.645L130.493%20150.904C131.144%20151.425%20131.914%20151.714%20132.683%20151.714C133.335%20151.714%20133.986%20151.541%20134.578%20151.135C135.703%20150.267%20136.236%20148.704%20135.703%20147.315ZM58.5589%2090.4103L48.0796%20115.65L45.9482%2079.8167L58.5589%2090.4103ZM53.2896%20120.454L63.8873%2094.9257L75.0178%20104.304L53.2896%20120.454ZM66.5515%2088.5L87.6284%2037.616L104.324%2082.3638L80.4055%20100.136L66.5515%2088.5ZM85.6155%20104.593L106.752%2088.8474L120.369%20125.259L125.046%20137.763L85.6155%20104.593Z%22%20fill%3D%22%23BDBDBD%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%20%20%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M137.419%200H135.757V28.5999C135.757%2031.953%20137.089%2035.1687%20139.46%2037.5397C141.831%2039.9107%20145.047%2041.2427%20148.4%2041.2427H177V39.581L137.419%200Z%22%20fill%3D%22%23E0E0E0%22%2F%3E%0A%3C%2Fsvg%3E%0A",
101
+ onLoad: o,
102
+ onError: o
103
+ })
104
+ })
105
+ });
106
+ }, w = l(({ vSpec: e }) => {
107
+ let t = p(), r = y(), { variablesDict: i } = u(), a = v(t, e, i), s = d();
108
+ return (0, h.useEffect)(() => {
109
+ (!e || !a.imageSrc) && t.daedalus.objectCapabilities.editable && s();
110
+ }, [e, a.imageSrc]), !e || !a.imageSrc ? t.daedalus.objectCapabilities.editable ? /* @__PURE__ */ (0, x.jsx)("div", {
111
+ className: r.previewImageContainer,
112
+ children: /* @__PURE__ */ (0, x.jsxs)("button", {
113
+ "data-testid": "open-media-gallery-button",
114
+ className: r.addGalleryButton,
115
+ onClick: () => {
116
+ t.emitEvent(c.SET_PROPERTY_PANEL_OBJECT_TAB, "ITEM"), t.emitEvent(m.OpenMediaPicker);
117
+ },
118
+ children: [/* @__PURE__ */ (0, x.jsx)(o, {
119
+ fill: n.mainDarkNavy,
120
+ size: 16,
121
+ className: r.buttonIcon
122
+ }), "Add from the Gallery"]
123
+ })
124
+ }) : /* @__PURE__ */ (0, x.jsx)("div", {
125
+ className: r.previewImageContainer,
126
+ children: /* @__PURE__ */ (0, x.jsx)("img", {
127
+ src: g,
128
+ alt: "no image",
129
+ onLoad: s,
130
+ onError: s
131
+ })
132
+ }) : /* @__PURE__ */ (0, x.jsx)("div", {
133
+ className: r.singleImageContainer,
134
+ children: /* @__PURE__ */ (0, x.jsx)(C, {
135
+ ...a,
136
+ onLoadCallback: s
137
+ })
138
+ });
139
+ });
140
+ export { w as Image };