@astrato-io/visualizations 0.6.4 → 0.7.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 (220) hide show
  1. package/CHANGELOG.md +0 -0
  2. package/README.md +32 -2
  3. package/THIRD_PARTY_NOTICES.md +68 -205
  4. package/VISUALIZATION_DEFINITIONS.md +68 -114
  5. package/chunks/Button-BrGKp9Nm.js +110 -0
  6. package/chunks/DefaultPropsProvider-BsfB7QTn.js +257 -0
  7. package/chunks/FieldTypeIcon-Drs6hSJF.js +22 -0
  8. package/chunks/{LinearProgress-CUZ0D8_t.js → LinearProgress-VtfFx2vJ.js} +51 -51
  9. package/chunks/MenuOption-ByRqhRdX.js +3934 -0
  10. package/chunks/Title-CO5dP1ma.js +1691 -0
  11. package/chunks/ToggleButton-KOBAimC1.js +112 -0
  12. package/chunks/app-filter-bar.compiler-TwVTeoj5.js +64 -0
  13. package/chunks/bar.compiler-DuQg8EUb.js +374 -0
  14. package/chunks/builder-DEDvNq1k.js +201 -0
  15. package/chunks/{color-settings-ZIvgNTq1.js → color-rules-CN7TcGrC.js} +2 -6
  16. package/chunks/color-settings-3VRlf_Vw.js +6 -0
  17. package/chunks/colorManipulator-D8Pjy1pf.js +45 -0
  18. package/chunks/coloring-CncX_JRX.js +278 -0
  19. package/chunks/{src-BC7cGcJ-.js → definitions-BPJQTx16.js} +650 -464
  20. package/chunks/{escobar-BGqT1EsE.js → escobar-DRhRMYRE.js} +6282 -4931
  21. package/chunks/event-bus-CrLB-Y8z.js +3 -0
  22. package/chunks/extend-preset-CUFNpmPe.js +4398 -0
  23. package/chunks/filter.compiler-w27dlv0C.js +70 -0
  24. package/chunks/filtering-cc7WqWpg.js +1153 -0
  25. package/chunks/handlers-TOT-7INo.js +12871 -0
  26. package/chunks/icon-picker-styles-CoJmwTRi.js +2246 -0
  27. package/chunks/isEqual-B8loyPsC.js +12 -0
  28. package/chunks/label-format-type-weq1XfcX.js +8 -0
  29. package/chunks/line.compiler-Ct1WhN2p.js +198 -0
  30. package/chunks/logger-DpQtYQnX.js +1163 -0
  31. package/chunks/lookup-BWllin0q.js +36 -0
  32. package/chunks/{metadata-CPXdYoln.js → metadata-WABZrt7Y.js} +1 -1
  33. package/chunks/number.compiler-D8TPly-4.js +53 -0
  34. package/chunks/{src-C0LgoUWY.js → operations-Dh4v1Ovt.js} +7716 -7541
  35. package/chunks/{range-DrzdfBX4.js → range-Bi-7zT0k.js} +2 -2
  36. package/chunks/registry-KervaxqJ.js +31 -0
  37. package/chunks/render-wrappers-OEmtaM8g.js +2 -0
  38. package/chunks/{registry-CExpGJ1N.js → requirements-PAoRaJyb.js} +294 -326
  39. package/chunks/responsive.styles-DSiOGD7u.js +82 -0
  40. package/chunks/shared-Bn4N5QcZ.js +1218 -0
  41. package/chunks/src-77e3mC7i.js +391 -0
  42. package/chunks/standalone-B55oyW6c.js +689 -0
  43. package/chunks/{standalone-CY57qwZ-.js → standalone-BDhPQtzQ.js} +386 -352
  44. package/chunks/{standalone-BDCwI6Hn.js → standalone-BGkmozIb.js} +1108 -953
  45. package/chunks/standalone-BMTCb10X.js +179 -0
  46. package/chunks/standalone-BXKRE_Se.js +468 -0
  47. package/chunks/standalone-Bes8srx1.js +354 -0
  48. package/chunks/standalone-BjZp0QMe.js +2 -0
  49. package/chunks/{standalone-BH5NqDwp.js → standalone-BlMIwpEe.js} +687 -573
  50. package/chunks/{standalone-CCNtaJ7s.js → standalone-C8ZAEutO.js} +44 -43
  51. package/chunks/standalone-C8qAelL4.js +2 -0
  52. package/chunks/standalone-CJvIXsQE.js +743 -0
  53. package/chunks/standalone-CLmGb7nn2.js +355 -0
  54. package/chunks/{ui-D1HQNIBy.js → standalone-CM5XcAN5.js} +15946 -17658
  55. package/chunks/standalone-CXNP6-xD.js +420 -0
  56. package/chunks/{standalone-BYm1UjLr.js → standalone-D5Q5ngsD.js} +59 -57
  57. package/chunks/standalone-DLlyRIE6.js +287 -0
  58. package/chunks/standalone-DMcI1afI.js +396 -0
  59. package/chunks/{standalone-jiz0L2Dg.js → standalone-DN4S1MjT.js} +1113 -1094
  60. package/chunks/{standalone-QJ1kKMnO.js → standalone-DT0wKji7.js} +2 -2
  61. package/chunks/{standalone-D5vnf-9y.js → standalone-DVTJwsTY.js} +1110 -1035
  62. package/chunks/standalone-DW6NT205.js +518 -0
  63. package/chunks/standalone-DYQIQH4c.js +2095 -0
  64. package/chunks/standalone-D__XCp-h.js +1003 -0
  65. package/chunks/standalone-XTgSsTAa.js +354 -0
  66. package/chunks/standalone-XuGksArp.js +68 -0
  67. package/chunks/{standalone-CNyNHKVx.js → standalone-we5D5MIn.js} +176 -172
  68. package/chunks/table.compiler-DMeeHxb6.js +222 -0
  69. package/chunks/useFieldName-Cjn9KCVp.js +7 -0
  70. package/chunks/useSlotProps-DLbQp4lc.js +166 -0
  71. package/chunks/{utils-Ba9T0TqC.js → utils-vdmi_2PK.js} +6266 -6517
  72. package/chunks/{src-DvX5LU9T.js → view-BuwQugKb.js} +2893 -5956
  73. package/chunks/visualization-filters-Cc4KU-l-.js +7455 -0
  74. package/chunks/web-components-DqClFkgO.js +1185 -0
  75. package/chunks/with-html-element-D0uY2zjI.js +7328 -0
  76. package/definitions.js +3 -3
  77. package/docs/operations/astrato-app-filter-bar.md +17 -17
  78. package/docs/operations/bar.md +1006 -1071
  79. package/docs/operations/combo.md +717 -738
  80. package/docs/operations/date-picker.md +27 -27
  81. package/docs/operations/distribution-gauge.md +471 -607
  82. package/docs/operations/dot.md +787 -879
  83. package/docs/operations/filter.md +139 -163
  84. package/docs/operations/gauge.md +491 -627
  85. package/docs/operations/heatMap.md +834 -916
  86. package/docs/operations/histogram.md +166 -180
  87. package/docs/operations/iframe.md +5 -5
  88. package/docs/operations/image.md +16 -16
  89. package/docs/operations/index.md +12 -12
  90. package/docs/operations/line.md +811 -888
  91. package/docs/operations/number.md +470 -536
  92. package/docs/operations/pie.md +825 -958
  93. package/docs/operations/radar.md +599 -679
  94. package/docs/operations/sankey.md +462 -584
  95. package/docs/operations/scatter.md +823 -929
  96. package/docs/operations/shape.md +34 -34
  97. package/docs/operations/simpleTextObject.md +18 -25
  98. package/docs/operations/slider.md +33 -43
  99. package/docs/operations/table.md +1177 -1150
  100. package/docs/operations/tree.md +404 -397
  101. package/docs/operations/treemap.md +595 -673
  102. package/docs/operations/waterfall.md +369 -379
  103. package/docs/operations/word-cloud.md +512 -583
  104. package/getters.js +7 -7
  105. package/index.js +3 -1183
  106. package/metadata.js +18 -18
  107. package/operations.js +13 -13
  108. package/package.json +133 -88
  109. package/render.js +10 -0
  110. package/src/charts/bar.d.ts +1 -0
  111. package/src/charts/combo.d.ts +1 -0
  112. package/src/charts/dot.d.ts +1 -0
  113. package/src/charts/gauge-distribution.d.ts +1 -0
  114. package/src/charts/gauge.d.ts +1 -0
  115. package/src/charts/heat-map.d.ts +1 -0
  116. package/src/charts/histogram.d.ts +1 -0
  117. package/src/charts/line.d.ts +1 -0
  118. package/src/charts/pie.d.ts +1 -0
  119. package/src/charts/radar.d.ts +1 -0
  120. package/src/charts/sankey.d.ts +1 -0
  121. package/src/charts/scatter.d.ts +1 -0
  122. package/src/charts/table.d.ts +1 -0
  123. package/src/charts/tree.d.ts +1 -0
  124. package/src/charts/treemap.d.ts +1 -0
  125. package/src/charts/waterfall.d.ts +1 -0
  126. package/src/charts/word-cloud.d.ts +1 -0
  127. package/src/definitions/index.d.ts +2 -2
  128. package/src/definitions/{shared/lib → model/definitions}/available-fields.d.ts +0 -1
  129. package/src/definitions/{shared/lib/compilers/index.d.ts → model/definitions/compilers/compile.d.ts} +1 -1
  130. package/src/definitions/model/definitions/data-item-resolution.d.ts +19 -0
  131. package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +1364 -0
  132. package/src/definitions/model/definitions/descriptors/json-schema.d.ts +2 -0
  133. package/src/definitions/model/definitions/diagnostics.d.ts +5 -0
  134. package/src/definitions/model/definitions/field-suggestions.d.ts +2 -0
  135. package/src/definitions/model/definitions/index.d.ts +23 -0
  136. package/src/definitions/{shared/lib → model/definitions}/registry/compile.d.ts +1 -1
  137. package/src/definitions/model/definitions/registry/descriptor-registry.d.ts +3 -0
  138. package/src/definitions/model/definitions/schema-registry.d.ts +660 -0
  139. package/src/definitions/{shared/lib → model/definitions}/schemas/broad-chart.schema.d.ts +1 -1
  140. package/src/definitions/{shared/lib → model/definitions}/schemas/common.schema.d.ts +0 -1
  141. package/src/definitions/model/definitions/schemas/index.d.ts +9 -0
  142. package/src/definitions/{shared/lib → model/definitions}/schemas/object.schema.d.ts +8 -8
  143. package/src/definitions/{shared/lib → model/definitions}/types/compilation.types.d.ts +10 -0
  144. package/src/definitions/{shared/lib → model/definitions}/types/definition.types.d.ts +1 -1
  145. package/src/definitions/model/definitions/types/index.d.ts +3 -0
  146. package/src/definitions/{shared/lib/registry → model/definitions}/validation.d.ts +1 -1
  147. package/src/getters/index.d.ts +3 -3
  148. package/src/index.d.ts +1 -1
  149. package/src/objects/app-filter-bar.d.ts +1 -0
  150. package/src/objects/date-picker.d.ts +1 -0
  151. package/src/objects/filter.d.ts +1 -0
  152. package/src/objects/iframe.d.ts +1 -0
  153. package/src/objects/image.d.ts +1 -0
  154. package/src/objects/number.d.ts +1 -0
  155. package/src/objects/shape.d.ts +1 -0
  156. package/src/objects/slider.d.ts +1 -0
  157. package/src/objects/text.d.ts +1 -0
  158. package/src/operations/index.d.ts +3 -3
  159. package/src/registry/create-visualization-registry.d.ts +5 -0
  160. package/src/render/index.d.ts +34 -0
  161. package/src/runtime/index.d.ts +2 -2
  162. package/src/types.d.ts +9 -4
  163. package/src/web-components/index.d.ts +3 -3
  164. package/chunks/Radio-Ciu-F4CU.js +0 -957
  165. package/chunks/ToggleButton-BCJc3Jlc.js +0 -153
  166. package/chunks/_baseFlatten-DPXPOrea.js +0 -7076
  167. package/chunks/app-filter-bar.compiler-j_CVoWTa.js +0 -55
  168. package/chunks/bar.compiler-oqaPzIut.js +0 -370
  169. package/chunks/coloring-C16AUZEi.js +0 -663
  170. package/chunks/data-item-resolution-1lvYB5ln.js +0 -53
  171. package/chunks/event-bus-KiSiCJrC.js +0 -2683
  172. package/chunks/events-WZut5Ow6.js +0 -4
  173. package/chunks/filter.compiler-CuLtc_02.js +0 -60
  174. package/chunks/filtering-Yq4DEa0t.js +0 -953
  175. package/chunks/gauge-target-type-BkKXAqkX.js +0 -4
  176. package/chunks/grouping-type-BX_9Ix5q.js +0 -3
  177. package/chunks/interfaces-VUY4_yVO.js +0 -8742
  178. package/chunks/line-settings-DfYTUyPz.js +0 -4
  179. package/chunks/line.compiler-BpA_6Tc7.js +0 -188
  180. package/chunks/number.compiler-DbkWcG4S.js +0 -44
  181. package/chunks/pie-uv42Eqal.js +0 -10
  182. package/chunks/requirements-DNhuShLS.js +0 -6
  183. package/chunks/shared-CKDL4hx9.js +0 -1171
  184. package/chunks/src-Cum_2NLV.js +0 -12145
  185. package/chunks/src-Dun_jXtz.js +0 -10295
  186. package/chunks/standalone-87YV_m9n.js +0 -687
  187. package/chunks/standalone-BLVAWLNJ.js +0 -385
  188. package/chunks/standalone-BPomtAVs.js +0 -2
  189. package/chunks/standalone-BXyBcUOQ.js +0 -2
  190. package/chunks/standalone-BllF4rDp.js +0 -383
  191. package/chunks/standalone-BmfMt74U.js +0 -726
  192. package/chunks/standalone-BqWyrnZI.js +0 -281
  193. package/chunks/standalone-C85u7U6I.js +0 -340
  194. package/chunks/standalone-CDQnr6qT.js +0 -345
  195. package/chunks/standalone-CZynjFG7.js +0 -12979
  196. package/chunks/standalone-DFPva_ku.js +0 -299
  197. package/chunks/standalone-DQxxNwF8.js +0 -675
  198. package/chunks/standalone-DS9T0FZ-.js +0 -830
  199. package/chunks/standalone-Dx3MLlrO.js +0 -512
  200. package/chunks/standalone-DzixzZAL.js +0 -411
  201. package/chunks/standalone-lBm9hQ-q.js +0 -179
  202. package/chunks/standalone-rJ45Zfl1.js +0 -68
  203. package/chunks/table.compiler-BrXkm4Fz.js +0 -213
  204. package/chunks/toInteger-DVZr-D1j.js +0 -11
  205. package/chunks/treemap-x_zmJoG7.js +0 -23
  206. package/chunks/types-dVVCsDWD.js +0 -4
  207. package/chunks/useFieldName-oqQ3bvnO.js +0 -7
  208. package/chunks/view-CLqWMV7Z.js +0 -156
  209. package/src/definitions/shared/index.d.ts +0 -5
  210. package/src/definitions/shared/lib/registry/descriptor-registry.d.ts +0 -587
  211. package/src/definitions/shared/lib/registry/index.d.ts +0 -3
  212. package/src/definitions/shared/lib/schemas/index.d.ts +0 -9
  213. package/src/definitions/shared/lib/types/index.d.ts +0 -3
  214. package/src/definitions/{shared/lib → model/definitions}/schemas/app-filter-bar.schema.d.ts +0 -0
  215. package/src/definitions/{shared/lib → model/definitions}/schemas/bar.schema.d.ts +0 -0
  216. package/src/definitions/{shared/lib → model/definitions}/schemas/filter.schema.d.ts +0 -0
  217. package/src/definitions/{shared/lib → model/definitions}/schemas/line.schema.d.ts +0 -0
  218. package/src/definitions/{shared/lib → model/definitions}/schemas/number.schema.d.ts +0 -0
  219. package/src/definitions/{shared/lib → model/definitions}/schemas/table.schema.d.ts +4 -4
  220. /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 };