@astrato-io/visualizations 0.6.4 → 0.6.5

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 (149) hide show
  1. package/CHANGELOG.md +0 -0
  2. package/THIRD_PARTY_NOTICES.md +94 -4
  3. package/chunks/ClickAwayListener-BbeNMAvj.js +52 -0
  4. package/chunks/{LinearProgress-CUZ0D8_t.js → LinearProgress-B1FeWaen.js} +54 -54
  5. package/chunks/app-filter-bar.compiler-BGJ7HAbr.js +64 -0
  6. package/chunks/bar.compiler-CT0ZbQKc.js +374 -0
  7. package/chunks/{src-Cum_2NLV.js → builder-B6dWSIdD.js} +5779 -5635
  8. package/chunks/{coloring-C16AUZEi.js → coloring-B1XAfg6b.js} +234 -233
  9. package/chunks/{src-BC7cGcJ-.js → definitions-D3OVqmXl.js} +438 -360
  10. package/chunks/{escobar-BGqT1EsE.js → escobar-eDjtGpkC.js} +4645 -4619
  11. package/chunks/filter.compiler-DBsyRBJt.js +70 -0
  12. package/chunks/{filtering-Yq4DEa0t.js → filtering-tqjAyJH5.js} +432 -313
  13. package/chunks/{grouping-type-BX_9Ix5q.js → grouping-type-On4s9Thj.js} +1 -1
  14. package/chunks/handlers-VTBfIZYZ.js +13072 -0
  15. package/chunks/isEqual-BDxAhUo8.js +7514 -0
  16. package/chunks/line.compiler-CzdM5Ld0.js +198 -0
  17. package/chunks/{metadata-CPXdYoln.js → metadata-BGElBy5Z.js} +1 -1
  18. package/chunks/number.compiler-G-R7y16P.js +53 -0
  19. package/chunks/{src-C0LgoUWY.js → operations-CTNUX6Sy.js} +9576 -9432
  20. package/chunks/{range-DrzdfBX4.js → range-CiwTbMig.js} +2 -2
  21. package/chunks/{registry-CExpGJ1N.js → registry-CsQQzukD.js} +153 -153
  22. package/chunks/{requirements-DNhuShLS.js → requirements-DYjZCFyf.js} +1 -1
  23. package/chunks/{shared-CKDL4hx9.js → shared-CBvcC5YV.js} +460 -413
  24. package/chunks/{standalone-D5vnf-9y.js → standalone-0M4HlmDW2.js} +823 -822
  25. package/chunks/standalone-0ashe9w1.js +411 -0
  26. package/chunks/{standalone-C85u7U6I.js → standalone-B7jax8wa.js} +93 -94
  27. package/chunks/standalone-BK0VYU-l.js +463 -0
  28. package/chunks/{standalone-BDCwI6Hn.js → standalone-BMIbT1b2.js} +815 -815
  29. package/chunks/standalone-BZV5vOwA.js +6 -0
  30. package/chunks/standalone-BhDrWj4p.js +1980 -0
  31. package/chunks/{standalone-CNyNHKVx.js → standalone-BtSHCp2U2.js} +97 -98
  32. package/chunks/{standalone-CDQnr6qT.js → standalone-BvaKdky9.js} +95 -96
  33. package/chunks/standalone-BwtM31-f.js +2 -0
  34. package/chunks/{standalone-CY57qwZ-.js → standalone-C3gg736V.js} +153 -153
  35. package/chunks/{standalone-DFPva_ku.js → standalone-CC1VUjO32.js} +60 -60
  36. package/chunks/{standalone-CCNtaJ7s.js → standalone-C_rYnZ0N.js} +41 -41
  37. package/chunks/{standalone-CZynjFG7.js → standalone-CoLrAxRV.js} +3701 -3482
  38. package/chunks/{standalone-jiz0L2Dg.js → standalone-DC-aUgXC.js} +104 -104
  39. package/chunks/standalone-DCtRoTWg.js +675 -0
  40. package/chunks/standalone-DUDFTBqL.js +833 -0
  41. package/chunks/standalone-DhZkX9Td.js +2 -0
  42. package/chunks/{standalone-Dx3MLlrO.js → standalone-DtLElfuM.js} +141 -141
  43. package/chunks/{standalone-BmfMt74U.js → standalone-G9Q4Uczu.js} +192 -192
  44. package/chunks/{standalone-BH5NqDwp.js → standalone-JuLF-OoH.js} +390 -391
  45. package/chunks/standalone-_DeX21JJ.js +383 -0
  46. package/chunks/{standalone-lBm9hQ-q.js → standalone-gFhKZh8m.js} +34 -34
  47. package/chunks/standalone-tDNy-SFH.js +281 -0
  48. package/chunks/{standalone-rJ45Zfl1.js → standalone-v1oxfU20.js} +10 -10
  49. package/chunks/{standalone-BYm1UjLr.js → standalone-vzBY6q0I2.js} +18 -18
  50. package/chunks/table.compiler-tb914oj3.js +222 -0
  51. package/chunks/{ui-D1HQNIBy.js → ui-DQWtv2iM.js} +13485 -3973
  52. package/chunks/{useFieldName-oqQ3bvnO.js → useFieldName-BvdcoJRl.js} +1 -1
  53. package/chunks/{utils-Ba9T0TqC.js → utils-Bg7K-t6K.js} +7306 -6024
  54. package/chunks/{src-DvX5LU9T.js → view-Bn83C8d9.js} +2555 -4831
  55. package/definitions.js +3 -3
  56. package/docs/operations/astrato-app-filter-bar.md +17 -17
  57. package/docs/operations/bar.md +989 -1071
  58. package/docs/operations/combo.md +717 -738
  59. package/docs/operations/date-picker.md +25 -25
  60. package/docs/operations/distribution-gauge.md +471 -607
  61. package/docs/operations/dot.md +787 -879
  62. package/docs/operations/filter.md +139 -163
  63. package/docs/operations/gauge.md +491 -627
  64. package/docs/operations/heatMap.md +834 -916
  65. package/docs/operations/histogram.md +166 -180
  66. package/docs/operations/iframe.md +5 -5
  67. package/docs/operations/image.md +16 -16
  68. package/docs/operations/index.md +12 -12
  69. package/docs/operations/line.md +811 -888
  70. package/docs/operations/number.md +470 -536
  71. package/docs/operations/pie.md +825 -958
  72. package/docs/operations/radar.md +599 -679
  73. package/docs/operations/sankey.md +462 -584
  74. package/docs/operations/scatter.md +823 -929
  75. package/docs/operations/shape.md +34 -34
  76. package/docs/operations/simpleTextObject.md +18 -25
  77. package/docs/operations/slider.md +33 -43
  78. package/docs/operations/table.md +1160 -1150
  79. package/docs/operations/tree.md +354 -361
  80. package/docs/operations/treemap.md +545 -637
  81. package/docs/operations/waterfall.md +369 -379
  82. package/docs/operations/word-cloud.md +512 -583
  83. package/getters.js +3 -3
  84. package/index.js +51 -51
  85. package/metadata.js +3 -3
  86. package/operations.js +7 -7
  87. package/package.json +80 -86
  88. package/src/definitions/index.d.ts +2 -2
  89. package/src/definitions/{shared/lib → model/definitions}/available-fields.d.ts +0 -1
  90. package/src/definitions/{shared/lib/compilers/index.d.ts → model/definitions/compilers/compile.d.ts} +1 -1
  91. package/src/definitions/model/definitions/data-item-resolution.d.ts +19 -0
  92. package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +1341 -0
  93. package/src/definitions/model/definitions/descriptors/json-schema.d.ts +2 -0
  94. package/src/definitions/model/definitions/diagnostics.d.ts +5 -0
  95. package/src/definitions/model/definitions/field-suggestions.d.ts +2 -0
  96. package/src/definitions/model/definitions/index.d.ts +23 -0
  97. package/src/definitions/{shared/lib → model/definitions}/registry/compile.d.ts +1 -1
  98. package/src/definitions/model/definitions/registry/descriptor-registry.d.ts +3 -0
  99. package/src/definitions/model/definitions/schema-registry.d.ts +660 -0
  100. package/src/definitions/{shared/lib → model/definitions}/schemas/broad-chart.schema.d.ts +1 -1
  101. package/src/definitions/{shared/lib → model/definitions}/schemas/common.schema.d.ts +0 -1
  102. package/src/definitions/model/definitions/schemas/index.d.ts +9 -0
  103. package/src/definitions/{shared/lib → model/definitions}/schemas/object.schema.d.ts +6 -6
  104. package/src/definitions/{shared/lib → model/definitions}/types/definition.types.d.ts +1 -1
  105. package/src/definitions/model/definitions/types/index.d.ts +3 -0
  106. package/src/definitions/{shared/lib/registry → model/definitions}/validation.d.ts +1 -1
  107. package/chunks/Radio-Ciu-F4CU.js +0 -957
  108. package/chunks/ToggleButton-BCJc3Jlc.js +0 -153
  109. package/chunks/_baseFlatten-DPXPOrea.js +0 -7076
  110. package/chunks/app-filter-bar.compiler-j_CVoWTa.js +0 -55
  111. package/chunks/bar.compiler-oqaPzIut.js +0 -370
  112. package/chunks/data-item-resolution-1lvYB5ln.js +0 -53
  113. package/chunks/event-bus-KiSiCJrC.js +0 -2683
  114. package/chunks/filter.compiler-CuLtc_02.js +0 -60
  115. package/chunks/gauge-target-type-BkKXAqkX.js +0 -4
  116. package/chunks/interfaces-VUY4_yVO.js +0 -8742
  117. package/chunks/line-settings-DfYTUyPz.js +0 -4
  118. package/chunks/line.compiler-BpA_6Tc7.js +0 -188
  119. package/chunks/number.compiler-DbkWcG4S.js +0 -44
  120. package/chunks/pie-uv42Eqal.js +0 -10
  121. package/chunks/src-Dun_jXtz.js +0 -10295
  122. package/chunks/standalone-87YV_m9n.js +0 -687
  123. package/chunks/standalone-BLVAWLNJ.js +0 -385
  124. package/chunks/standalone-BPomtAVs.js +0 -2
  125. package/chunks/standalone-BXyBcUOQ.js +0 -2
  126. package/chunks/standalone-BllF4rDp.js +0 -383
  127. package/chunks/standalone-BqWyrnZI.js +0 -281
  128. package/chunks/standalone-DQxxNwF8.js +0 -675
  129. package/chunks/standalone-DS9T0FZ-.js +0 -830
  130. package/chunks/standalone-DzixzZAL.js +0 -411
  131. package/chunks/standalone-QJ1kKMnO.js +0 -6
  132. package/chunks/table.compiler-BrXkm4Fz.js +0 -213
  133. package/chunks/toInteger-DVZr-D1j.js +0 -11
  134. package/chunks/treemap-x_zmJoG7.js +0 -23
  135. package/chunks/types-dVVCsDWD.js +0 -4
  136. package/chunks/view-CLqWMV7Z.js +0 -156
  137. package/src/definitions/shared/index.d.ts +0 -5
  138. package/src/definitions/shared/lib/registry/descriptor-registry.d.ts +0 -587
  139. package/src/definitions/shared/lib/registry/index.d.ts +0 -3
  140. package/src/definitions/shared/lib/schemas/index.d.ts +0 -9
  141. package/src/definitions/shared/lib/types/index.d.ts +0 -3
  142. package/src/definitions/{shared/lib → model/definitions}/schemas/app-filter-bar.schema.d.ts +0 -0
  143. package/src/definitions/{shared/lib → model/definitions}/schemas/bar.schema.d.ts +0 -0
  144. package/src/definitions/{shared/lib → model/definitions}/schemas/filter.schema.d.ts +0 -0
  145. package/src/definitions/{shared/lib → model/definitions}/schemas/line.schema.d.ts +0 -0
  146. package/src/definitions/{shared/lib → model/definitions}/schemas/number.schema.d.ts +0 -0
  147. package/src/definitions/{shared/lib → model/definitions}/schemas/table.schema.d.ts +4 -4
  148. /package/src/definitions/{shared/lib → model/definitions}/types/compilation.types.d.ts +0 -0
  149. /package/src/definitions/{shared/lib → model/definitions}/types/descriptor.types.d.ts +0 -0
@@ -1,385 +0,0 @@
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 };
@@ -1,2 +0,0 @@
1
- import { t as e } from "./view-CLqWMV7Z.js";
2
- export { e as DatePicker };
@@ -1,2 +0,0 @@
1
- import { n as e } from "./standalone-C85u7U6I.js";
2
- export { e as DistributionGaugeChart };