@astrato-io/visualizations 0.6.5 → 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 (174) hide show
  1. package/README.md +32 -2
  2. package/THIRD_PARTY_NOTICES.md +2 -229
  3. package/VISUALIZATION_DEFINITIONS.md +68 -114
  4. package/chunks/Button-BrGKp9Nm.js +110 -0
  5. package/chunks/DefaultPropsProvider-BsfB7QTn.js +257 -0
  6. package/chunks/FieldTypeIcon-Drs6hSJF.js +22 -0
  7. package/chunks/{LinearProgress-B1FeWaen.js → LinearProgress-VtfFx2vJ.js} +55 -55
  8. package/chunks/MenuOption-ByRqhRdX.js +3934 -0
  9. package/chunks/Title-CO5dP1ma.js +1691 -0
  10. package/chunks/ToggleButton-KOBAimC1.js +112 -0
  11. package/chunks/{app-filter-bar.compiler-BGJ7HAbr.js → app-filter-bar.compiler-TwVTeoj5.js} +10 -10
  12. package/chunks/{bar.compiler-CT0ZbQKc.js → bar.compiler-DuQg8EUb.js} +84 -84
  13. package/chunks/builder-DEDvNq1k.js +201 -0
  14. package/chunks/{color-settings-ZIvgNTq1.js → color-rules-CN7TcGrC.js} +2 -6
  15. package/chunks/color-settings-3VRlf_Vw.js +6 -0
  16. package/chunks/colorManipulator-D8Pjy1pf.js +45 -0
  17. package/chunks/coloring-CncX_JRX.js +278 -0
  18. package/chunks/{definitions-D3OVqmXl.js → definitions-BPJQTx16.js} +490 -382
  19. package/chunks/{escobar-eDjtGpkC.js → escobar-DRhRMYRE.js} +6067 -4742
  20. package/chunks/event-bus-CrLB-Y8z.js +3 -0
  21. package/chunks/extend-preset-CUFNpmPe.js +4398 -0
  22. package/chunks/{filter.compiler-DBsyRBJt.js → filter.compiler-w27dlv0C.js} +12 -12
  23. package/chunks/{filtering-tqjAyJH5.js → filtering-cc7WqWpg.js} +391 -310
  24. package/chunks/{handlers-VTBfIZYZ.js → handlers-TOT-7INo.js} +3241 -3442
  25. package/chunks/icon-picker-styles-CoJmwTRi.js +2246 -0
  26. package/chunks/isEqual-B8loyPsC.js +12 -0
  27. package/chunks/label-format-type-weq1XfcX.js +8 -0
  28. package/chunks/{line.compiler-CzdM5Ld0.js → line.compiler-Ct1WhN2p.js} +27 -27
  29. package/chunks/logger-DpQtYQnX.js +1163 -0
  30. package/chunks/lookup-BWllin0q.js +36 -0
  31. package/chunks/{metadata-BGElBy5Z.js → metadata-WABZrt7Y.js} +1 -1
  32. package/chunks/{number.compiler-G-R7y16P.js → number.compiler-D8TPly-4.js} +13 -13
  33. package/chunks/{operations-CTNUX6Sy.js → operations-Dh4v1Ovt.js} +9314 -9283
  34. package/chunks/{range-CiwTbMig.js → range-Bi-7zT0k.js} +2 -2
  35. package/chunks/registry-KervaxqJ.js +31 -0
  36. package/chunks/render-wrappers-OEmtaM8g.js +2 -0
  37. package/chunks/{registry-CsQQzukD.js → requirements-PAoRaJyb.js} +304 -336
  38. package/chunks/responsive.styles-DSiOGD7u.js +82 -0
  39. package/chunks/{shared-CBvcC5YV.js → shared-Bn4N5QcZ.js} +424 -424
  40. package/chunks/src-77e3mC7i.js +391 -0
  41. package/chunks/standalone-B55oyW6c.js +689 -0
  42. package/chunks/{standalone-C3gg736V.js → standalone-BDhPQtzQ.js} +375 -341
  43. package/chunks/{standalone-BMIbT1b2.js → standalone-BGkmozIb.js} +992 -837
  44. package/chunks/standalone-BMTCb10X.js +179 -0
  45. package/chunks/standalone-BXKRE_Se.js +468 -0
  46. package/chunks/standalone-Bes8srx1.js +354 -0
  47. package/chunks/standalone-BjZp0QMe.js +2 -0
  48. package/chunks/{standalone-JuLF-OoH.js → standalone-BlMIwpEe.js} +634 -519
  49. package/chunks/{standalone-C_rYnZ0N.js → standalone-C8ZAEutO.js} +43 -42
  50. package/chunks/standalone-C8qAelL4.js +2 -0
  51. package/chunks/standalone-CJvIXsQE.js +743 -0
  52. package/chunks/standalone-CLmGb7nn2.js +355 -0
  53. package/chunks/standalone-CM5XcAN5.js +52327 -0
  54. package/chunks/standalone-CXNP6-xD.js +420 -0
  55. package/chunks/{standalone-vzBY6q0I2.js → standalone-D5Q5ngsD.js} +57 -55
  56. package/chunks/standalone-DLlyRIE6.js +287 -0
  57. package/chunks/standalone-DMcI1afI.js +396 -0
  58. package/chunks/{standalone-DC-aUgXC.js → standalone-DN4S1MjT.js} +1111 -1092
  59. package/chunks/standalone-DT0wKji7.js +6 -0
  60. package/chunks/{standalone-0M4HlmDW2.js → standalone-DVTJwsTY.js} +1109 -1035
  61. package/chunks/standalone-DW6NT205.js +518 -0
  62. package/chunks/standalone-DYQIQH4c.js +2095 -0
  63. package/chunks/standalone-D__XCp-h.js +1003 -0
  64. package/chunks/standalone-XTgSsTAa.js +354 -0
  65. package/chunks/{standalone-v1oxfU20.js → standalone-XuGksArp.js} +20 -20
  66. package/chunks/{standalone-BtSHCp2U2.js → standalone-we5D5MIn.js} +173 -168
  67. package/chunks/{table.compiler-tb914oj3.js → table.compiler-DMeeHxb6.js} +29 -29
  68. package/chunks/useFieldName-Cjn9KCVp.js +7 -0
  69. package/chunks/useSlotProps-DLbQp4lc.js +166 -0
  70. package/chunks/{utils-Bg7K-t6K.js → utils-vdmi_2PK.js} +6271 -7804
  71. package/chunks/{view-Bn83C8d9.js → view-BuwQugKb.js} +2717 -3504
  72. package/chunks/{isEqual-BDxAhUo8.js → visualization-filters-Cc4KU-l-.js} +1887 -1946
  73. package/chunks/web-components-DqClFkgO.js +1185 -0
  74. package/chunks/with-html-element-D0uY2zjI.js +7328 -0
  75. package/definitions.js +2 -2
  76. package/docs/operations/astrato-app-filter-bar.md +1 -1
  77. package/docs/operations/bar.md +31 -14
  78. package/docs/operations/combo.md +1 -1
  79. package/docs/operations/date-picker.md +3 -3
  80. package/docs/operations/distribution-gauge.md +13 -13
  81. package/docs/operations/dot.md +13 -13
  82. package/docs/operations/filter.md +1 -1
  83. package/docs/operations/gauge.md +13 -13
  84. package/docs/operations/heatMap.md +13 -13
  85. package/docs/operations/histogram.md +1 -1
  86. package/docs/operations/iframe.md +1 -1
  87. package/docs/operations/image.md +1 -1
  88. package/docs/operations/index.md +3 -3
  89. package/docs/operations/line.md +7 -7
  90. package/docs/operations/number.md +1 -1
  91. package/docs/operations/pie.md +13 -13
  92. package/docs/operations/radar.md +7 -7
  93. package/docs/operations/sankey.md +13 -13
  94. package/docs/operations/scatter.md +13 -13
  95. package/docs/operations/shape.md +1 -1
  96. package/docs/operations/simpleTextObject.md +1 -1
  97. package/docs/operations/slider.md +1 -1
  98. package/docs/operations/table.md +18 -1
  99. package/docs/operations/tree.md +51 -37
  100. package/docs/operations/treemap.md +63 -49
  101. package/docs/operations/waterfall.md +1 -1
  102. package/docs/operations/word-cloud.md +13 -13
  103. package/getters.js +7 -7
  104. package/index.js +3 -1183
  105. package/metadata.js +18 -18
  106. package/operations.js +13 -13
  107. package/package.json +106 -55
  108. package/render.js +10 -0
  109. package/src/charts/bar.d.ts +1 -0
  110. package/src/charts/combo.d.ts +1 -0
  111. package/src/charts/dot.d.ts +1 -0
  112. package/src/charts/gauge-distribution.d.ts +1 -0
  113. package/src/charts/gauge.d.ts +1 -0
  114. package/src/charts/heat-map.d.ts +1 -0
  115. package/src/charts/histogram.d.ts +1 -0
  116. package/src/charts/line.d.ts +1 -0
  117. package/src/charts/pie.d.ts +1 -0
  118. package/src/charts/radar.d.ts +1 -0
  119. package/src/charts/sankey.d.ts +1 -0
  120. package/src/charts/scatter.d.ts +1 -0
  121. package/src/charts/table.d.ts +1 -0
  122. package/src/charts/tree.d.ts +1 -0
  123. package/src/charts/treemap.d.ts +1 -0
  124. package/src/charts/waterfall.d.ts +1 -0
  125. package/src/charts/word-cloud.d.ts +1 -0
  126. package/src/definitions/index.d.ts +1 -1
  127. package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +53 -30
  128. package/src/definitions/model/definitions/index.d.ts +1 -1
  129. package/src/definitions/model/definitions/schema-registry.d.ts +2 -2
  130. package/src/definitions/model/definitions/schemas/object.schema.d.ts +2 -2
  131. package/src/definitions/model/definitions/types/compilation.types.d.ts +10 -0
  132. package/src/definitions/model/definitions/types/index.d.ts +1 -1
  133. package/src/getters/index.d.ts +3 -3
  134. package/src/index.d.ts +1 -1
  135. package/src/objects/app-filter-bar.d.ts +1 -0
  136. package/src/objects/date-picker.d.ts +1 -0
  137. package/src/objects/filter.d.ts +1 -0
  138. package/src/objects/iframe.d.ts +1 -0
  139. package/src/objects/image.d.ts +1 -0
  140. package/src/objects/number.d.ts +1 -0
  141. package/src/objects/shape.d.ts +1 -0
  142. package/src/objects/slider.d.ts +1 -0
  143. package/src/objects/text.d.ts +1 -0
  144. package/src/operations/index.d.ts +3 -3
  145. package/src/registry/create-visualization-registry.d.ts +5 -0
  146. package/src/render/index.d.ts +34 -0
  147. package/src/runtime/index.d.ts +2 -2
  148. package/src/types.d.ts +9 -4
  149. package/src/web-components/index.d.ts +3 -3
  150. package/chunks/ClickAwayListener-BbeNMAvj.js +0 -52
  151. package/chunks/builder-B6dWSIdD.js +0 -12289
  152. package/chunks/coloring-B1XAfg6b.js +0 -664
  153. package/chunks/events-WZut5Ow6.js +0 -4
  154. package/chunks/grouping-type-On4s9Thj.js +0 -3
  155. package/chunks/requirements-DYjZCFyf.js +0 -6
  156. package/chunks/standalone-0ashe9w1.js +0 -411
  157. package/chunks/standalone-B7jax8wa.js +0 -339
  158. package/chunks/standalone-BK0VYU-l.js +0 -463
  159. package/chunks/standalone-BZV5vOwA.js +0 -6
  160. package/chunks/standalone-BhDrWj4p.js +0 -1980
  161. package/chunks/standalone-BvaKdky9.js +0 -344
  162. package/chunks/standalone-BwtM31-f.js +0 -2
  163. package/chunks/standalone-CC1VUjO32.js +0 -299
  164. package/chunks/standalone-CoLrAxRV.js +0 -13198
  165. package/chunks/standalone-DCtRoTWg.js +0 -675
  166. package/chunks/standalone-DUDFTBqL.js +0 -833
  167. package/chunks/standalone-DhZkX9Td.js +0 -2
  168. package/chunks/standalone-DtLElfuM.js +0 -512
  169. package/chunks/standalone-G9Q4Uczu.js +0 -726
  170. package/chunks/standalone-_DeX21JJ.js +0 -383
  171. package/chunks/standalone-gFhKZh8m.js +0 -179
  172. package/chunks/standalone-tDNy-SFH.js +0 -281
  173. package/chunks/ui-DQWtv2iM.js +0 -63551
  174. package/chunks/useFieldName-BvdcoJRl.js +0 -7
@@ -1,22 +1,22 @@
1
- import { Fa as e, Wc as t, Ys as n, a as r, qa as i } from "./isEqual-BDxAhUo8.js";
2
- import { $ as a, A as o, B as s, C as c, D as l, F as u, G as d, H as f, I as p, J as m, K as ee, L as h, M as te, N as ne, O as re, P as ie, Q as ae, R as oe, S as se, T as ce, U as le, V as ue, W as de, X as fe, Y as g, Z as pe, _ as me, a as he, at as ge, c as _e, d as _, et as ve, f as ye, g as v, h as y, i as be, it as xe, k as Se, n as Ce, nt as we, o as Te, ot as Ee, q as De, r as Oe, rt as ke, s as Ae, t as b, tt as je, u as x, v as S, w as C, x as Me, y as w, z as Ne } from "./shared-CBvcC5YV.js";
3
- import { Cf as Pe, Dd as Fe, Ef as Ie, Md as Le, Sf as Re, Td as ze, Vf as Be, Xd as T, Zd as Ve, _f as He, af as Ue, bd as E, ef as We, ff as Ge, hf as Ke, kd as qe, kf as Je, mf as Ye, of as Xe, rf as Ze, sf as Qe, wf as $e, wm as et, zm as tt } from "./handlers-VTBfIZYZ.js";
4
- import { C as D, S as O, _ as nt, b as rt, f as it, v as at, x as ot } from "./operations-CTNUX6Sy.js";
5
- import { z as k } from "zod";
6
- var st = (e, ...t) => e, A = {
1
+ import { $i as e, Ds as t, Ns as n, da as r, js as i, r as a, vc as o } from "./visualization-filters-Cc4KU-l-.js";
2
+ import { $ as s, A as c, B as l, C as u, E as d, F as f, G as p, H as m, I as h, J as ee, K as te, L as ne, N as re, O as ie, P as ae, Q as oe, R as se, S as ce, T as g, U as le, V as ue, W as de, X as fe, Y as pe, Z as me, _ as he, a as ge, at as _e, c as ve, d as _, et as ye, f as be, g as v, h as y, i as xe, it as Se, j as b, k as Ce, n as we, nt as Te, o as Ee, ot as De, q as Oe, r as ke, rt as Ae, s as je, st as Me, t as x, tt as Ne, u as S, v as C, w as Pe, x as Fe, y as w, z as Ie } from "./shared-Bn4N5QcZ.js";
3
+ import { Dd as Le, Gd as Re, If as ze, Kd as Be, Qd as Ve, Sd as He, Yd as Ue, _f as We, bd as Ge, ef as Ke, ff as qe, gd as T, lf as Je, nf as Ye, sf as Xe, tf as Ze, uf as Qe, vf as $e, wd as et, wf as tt, xf as nt, yf as rt, ym as it } from "./handlers-TOT-7INo.js";
4
+ import { n as at } from "./label-format-type-weq1XfcX.js";
5
+ import { C as ot, S as E, _ as st, b as ct, f as lt, v as ut, x as dt } from "./operations-Dh4v1Ovt.js";
6
+ import { z as D } from "zod";
7
+ var ft = (e, ...t) => e, O = {
7
8
  horsepower: "[Cars].[Horsepower]",
8
9
  latestLaunch: "[Cars].[Latest Launch]",
9
10
  manufacturer: "[Cars].[Manufacturer]",
10
11
  model: "[Cars].[Model]",
11
12
  sales: "[Cars].[Sales In Thousands]"
12
- }, j = (e, t) => ({
13
+ }, k = (e, t) => ({
13
14
  fieldKey: t,
14
- format: { formatType: "none" },
15
15
  ref: e
16
- }), M = (e, t) => ({
16
+ }), A = (e, t) => ({
17
17
  fieldKey: t,
18
18
  ref: e
19
- }), N = (e, t = A.sales, n = "SUM") => ({
19
+ }), j = (e, t = O.sales, n = "SUM") => ({
20
20
  aggregation: n,
21
21
  fieldKey: t,
22
22
  format: {
@@ -24,9 +24,9 @@ var st = (e, ...t) => e, A = {
24
24
  negativeType: "parenthesis"
25
25
  },
26
26
  ref: e
27
- }), P = {
27
+ }), M = {
28
28
  filters: [{
29
- fieldKey: A.manufacturer,
29
+ fieldKey: O.manufacturer,
30
30
  operator: "inList",
31
31
  values: [
32
32
  "Acura",
@@ -35,11 +35,18 @@ var st = (e, ...t) => e, A = {
35
35
  ]
36
36
  }],
37
37
  operator: "and"
38
- }, F = {
38
+ }, pt = {
39
+ fieldKey: O.latestLaunch,
40
+ ref: "launchMonth",
41
+ temporalGrouping: {
42
+ dateLevel: "month",
43
+ mode: "level"
44
+ }
45
+ }, N = {
39
46
  position: "right",
40
47
  title: "Cars comparison",
41
48
  visible: !0
42
- }, I = {
49
+ }, P = {
43
50
  dimension: {
44
51
  labelsVisible: !0,
45
52
  title: "Manufacturer",
@@ -55,7 +62,7 @@ var st = (e, ...t) => e, A = {
55
62
  title: "Horsepower",
56
63
  titleVisible: !0
57
64
  }
58
- }, ct = {
65
+ }, mt = {
59
66
  dimension: {
60
67
  labelsVisible: !0,
61
68
  title: "Manufacturer",
@@ -71,7 +78,7 @@ var st = (e, ...t) => e, A = {
71
78
  title: "Model",
72
79
  titleVisible: !0
73
80
  }
74
- }, lt = {
81
+ }, ht = {
75
82
  dimension: {
76
83
  labelsVisible: !0,
77
84
  title: "Manufacturer",
@@ -82,7 +89,7 @@ var st = (e, ...t) => e, A = {
82
89
  title: "Sales",
83
90
  titleVisible: !0
84
91
  }
85
- }, ut = {
92
+ }, gt = {
86
93
  dimension: {
87
94
  labelsVisible: !0,
88
95
  title: "Horsepower",
@@ -93,7 +100,7 @@ var st = (e, ...t) => e, A = {
93
100
  title: "Count",
94
101
  titleVisible: !0
95
102
  }
96
- }, dt = {
103
+ }, _t = {
97
104
  primaryMeasure: {
98
105
  labelsVisible: !0,
99
106
  title: "Sales",
@@ -104,7 +111,7 @@ var st = (e, ...t) => e, A = {
104
111
  title: "Horsepower",
105
112
  titleVisible: !0
106
113
  }
107
- }, ft = {
114
+ }, vt = {
108
115
  dimension: {
109
116
  labelsVisible: !0,
110
117
  title: "Measure",
@@ -115,18 +122,18 @@ var st = (e, ...t) => e, A = {
115
122
  title: "Value",
116
123
  titleVisible: !0
117
124
  }
118
- }, L = "presentation.axes.primaryMeasure.bands shades the plot between two primary measure axis values; start and end are measure values, and the bands replace any on the base vSpec.", R = [
125
+ }, F = "presentation.axes.primaryMeasure.bands shades the plot between two primary measure axis values; start and end are measure values, and the bands replace any on the base vSpec.", yt = (e) => `Set range on ${e} to fix its min, max, or both, for example to give several charts one shared scale. To keep an auto-fitted axis anchored at zero, leave both unset and put startsAtZero inside range, not on the axis itself: "primaryMeasure": { "range": { "startsAtZero": true } }.`, I = `${yt("a measure axis")} Set inverted on a measure axis to reverse its values, for example to put rank 1 at the top.`, L = `${yt("the primary measure axis")} Set inverted on the primary measure axis to reverse its values.`, R = [
119
126
  "dimensions",
120
127
  "filters",
121
128
  "measures",
122
129
  "value-formatting"
123
- ], pt = st([
130
+ ], bt = ft([
124
131
  {
125
132
  additionalExamples: [{
126
133
  definition: {
127
134
  data: {
128
- dimensions: [j("manufacturer", A.manufacturer)],
129
- measures: [N("sales")]
135
+ dimensions: [k("manufacturer", O.manufacturer)],
136
+ measures: [j("sales")]
130
137
  },
131
138
  presentation: { coloring: {
132
139
  overwrites: [{
@@ -154,8 +161,8 @@ var st = (e, ...t) => e, A = {
154
161
  "Sorting and Top N refer to definition-local refs, not generated data-item IDs.",
155
162
  "Every dimension and measure must resolve to an available field with a compatible role.",
156
163
  "Set axis per measure to plot it against the primary or the secondary measure axis.",
157
- L,
158
- "Set range on a measure axis to fix its min, max, or both, for example to give several charts one shared scale; leave both unset and set startsAtZero to keep an auto-fitted axis anchored at zero. Set inverted on a measure axis to reverse its values, for example to put rank 1 at the top.",
164
+ F,
165
+ I,
159
166
  "Set scale to log on a measure axis to draw it logarithmically, with gridlines at powers of ten. Zero and negative values are drawn at the floor of a log axis."
160
167
  ],
161
168
  dataRequirements: ["At least one dimension.", "At least one measure."],
@@ -165,18 +172,18 @@ var st = (e, ...t) => e, A = {
165
172
  example: {
166
173
  data: {
167
174
  dimensions: [{
168
- ...j("manufacturer", A.manufacturer),
175
+ ...k("manufacturer", O.manufacturer),
169
176
  showNullValues: !1
170
177
  }],
171
178
  measures: [{
172
- ...N("sales"),
179
+ ...j("sales"),
173
180
  dataLabels: {
174
181
  placements: ["outside", "inside"],
175
182
  visible: !0
176
183
  }
177
184
  }]
178
185
  },
179
- filterGroup: P,
186
+ filterGroup: M,
180
187
  limiting: {
181
188
  queryLimit: 100,
182
189
  topN: {
@@ -188,9 +195,9 @@ var st = (e, ...t) => e, A = {
188
195
  },
189
196
  presentation: {
190
197
  axes: {
191
- ...I,
198
+ ...P,
192
199
  primaryMeasure: {
193
- ...I.primaryMeasure,
200
+ ...P.primaryMeasure,
194
201
  bands: [{
195
202
  color: "#E6E6E6",
196
203
  end: 15e4,
@@ -199,7 +206,7 @@ var st = (e, ...t) => e, A = {
199
206
  }]
200
207
  }
201
208
  },
202
- legend: F,
209
+ legend: N,
203
210
  orientation: "vertical"
204
211
  },
205
212
  sorting: [{
@@ -237,8 +244,8 @@ var st = (e, ...t) => e, A = {
237
244
  "Data labels apply only to bar series.",
238
245
  "Sorting refers to definition-local refs, not generated data-item IDs.",
239
246
  "Set axis per measure to plot it against the primary or the secondary measure axis. Bar series share one axis: state it on any bar measure, and every bar measure that states one must state the same axis.",
240
- L,
241
- "Set range on a measure axis to fix its min, max, or both, for example to give several charts one shared scale; leave both unset and set startsAtZero to keep an auto-fitted axis anchored at zero. Set inverted on a measure axis to reverse its values, for example to put rank 1 at the top.",
247
+ F,
248
+ I,
242
249
  "Set scale to log on a measure axis to draw it logarithmically, with gridlines at powers of ten. Zero and negative values are drawn at the floor of a log axis."
243
250
  ],
244
251
  dataRequirements: ["Exactly one dimension.", "Between one and ten measures."],
@@ -247,23 +254,23 @@ var st = (e, ...t) => e, A = {
247
254
  },
248
255
  example: {
249
256
  data: {
250
- dimensions: [j("manufacturer", A.manufacturer)],
257
+ dimensions: [k("manufacturer", O.manufacturer)],
251
258
  measures: [{
252
- ...N("sales"),
259
+ ...j("sales"),
253
260
  dataLabels: { visible: !0 },
254
261
  seriesType: "bar"
255
262
  }, {
256
- ...N("horsepower", A.horsepower, "AVG"),
263
+ ...j("horsepower", O.horsepower, "AVG"),
257
264
  axis: "secondary",
258
265
  seriesType: "line"
259
266
  }]
260
267
  },
261
- filterGroup: P,
268
+ filterGroup: M,
262
269
  limiting: { queryLimit: 100 },
263
270
  presentation: {
264
- axes: lt,
271
+ axes: ht,
265
272
  dataLabels: { visible: !0 },
266
- legend: F,
273
+ legend: N,
267
274
  orientation: "vertical"
268
275
  },
269
276
  sorting: [{
@@ -298,13 +305,13 @@ var st = (e, ...t) => e, A = {
298
305
  },
299
306
  example: {
300
307
  data: {
301
- dimensions: [j("manufacturer", A.manufacturer)],
302
- measures: [N("sales"), N("averageSales", A.sales, "AVG")]
308
+ dimensions: [k("manufacturer", O.manufacturer)],
309
+ measures: [j("sales"), j("averageSales", O.sales, "AVG")]
303
310
  },
304
- filterGroup: P,
311
+ filterGroup: M,
305
312
  presentation: {
306
313
  displayMode: "bar",
307
- legend: F
314
+ legend: N
308
315
  },
309
316
  type: "distribution-gauge",
310
317
  version: 1
@@ -319,20 +326,20 @@ var st = (e, ...t) => e, A = {
319
326
  },
320
327
  {
321
328
  documentation: {
322
- constraints: ["Dimension order is significant and maps to the two dot-chart dimension roles.", "Set range on the primary measure axis to fix its min, max, or both, for example to give several charts one shared scale; leave both unset and set startsAtZero to keep an auto-fitted axis anchored at zero. Set inverted on the primary measure axis to reverse its values."],
329
+ constraints: ["Dimension order is significant and maps to the two dot-chart dimension roles.", L],
323
330
  dataRequirements: ["Exactly two dimensions.", "Exactly one measure."],
324
331
  summary: "Dot comparison using two categorical dimensions and one measure.",
325
332
  title: "Dot chart"
326
333
  },
327
334
  example: {
328
335
  data: {
329
- dimensions: [j("manufacturer", A.manufacturer), j("model", A.model)],
330
- measures: [N("sales")]
336
+ dimensions: [k("manufacturer", O.manufacturer), k("model", O.model)],
337
+ measures: [j("sales")]
331
338
  },
332
- filterGroup: P,
339
+ filterGroup: M,
333
340
  presentation: {
334
- axes: lt,
335
- legend: F,
341
+ axes: ht,
342
+ legend: N,
336
343
  orientation: "horizontal"
337
344
  },
338
345
  type: "dot",
@@ -361,13 +368,13 @@ var st = (e, ...t) => e, A = {
361
368
  },
362
369
  example: {
363
370
  data: {
364
- dimensions: [j("manufacturer", A.manufacturer)],
365
- measures: [N("sales"), N("targetSales", A.sales, "AVG")]
371
+ dimensions: [k("manufacturer", O.manufacturer)],
372
+ measures: [j("sales"), j("targetSales", O.sales, "AVG")]
366
373
  },
367
- filterGroup: P,
374
+ filterGroup: M,
368
375
  presentation: {
369
376
  displayMode: "radial",
370
- legend: F
377
+ legend: N
371
378
  },
372
379
  type: "gauge",
373
380
  version: 1
@@ -389,14 +396,14 @@ var st = (e, ...t) => e, A = {
389
396
  },
390
397
  example: {
391
398
  data: {
392
- dimensions: [j("manufacturer", A.manufacturer), j("model", A.model)],
393
- measures: [N("sales"), N("horsepower", A.horsepower, "AVG")]
399
+ dimensions: [k("manufacturer", O.manufacturer), k("model", O.model)],
400
+ measures: [j("sales"), j("horsepower", O.horsepower, "AVG")]
394
401
  },
395
- filterGroup: P,
402
+ filterGroup: M,
396
403
  limiting: { queryLimit: 100 },
397
404
  presentation: {
398
- axes: ct,
399
- legend: F
405
+ axes: mt,
406
+ legend: N
400
407
  },
401
408
  sorting: [{
402
409
  by: "sales",
@@ -419,19 +426,19 @@ var st = (e, ...t) => e, A = {
419
426
  documentation: {
420
427
  constraints: [
421
428
  "The compiler creates the canonical generated count measure; callers do not provide measures.",
422
- L,
423
- "Set range on the primary measure axis to fix its min, max, or both, for example to give several charts one shared scale; leave both unset and set startsAtZero to keep an auto-fitted axis anchored at zero. Set inverted on the primary measure axis to reverse its values."
429
+ F,
430
+ L
424
431
  ],
425
432
  dataRequirements: ["Exactly one numeric dimension.", "No caller-supplied measures."],
426
433
  summary: "Distribution of a numeric field into generated bins and counts.",
427
434
  title: "Histogram"
428
435
  },
429
436
  example: {
430
- data: { dimensions: [j("horsepower", A.horsepower)] },
431
- filterGroup: P,
437
+ data: { dimensions: [k("horsepower", O.horsepower)] },
438
+ filterGroup: M,
432
439
  presentation: {
433
- axes: ut,
434
- legend: F,
440
+ axes: gt,
441
+ legend: N,
435
442
  orientation: "vertical"
436
443
  },
437
444
  type: "histogram",
@@ -453,9 +460,9 @@ var st = (e, ...t) => e, A = {
453
460
  additionalExamples: [{
454
461
  definition: {
455
462
  data: {
456
- dimensions: [j("manufacturer", A.manufacturer)],
463
+ dimensions: [k("manufacturer", O.manufacturer)],
457
464
  measures: [{
458
- ...N("sales"),
465
+ ...j("sales"),
459
466
  dataPointShape: "circle"
460
467
  }]
461
468
  },
@@ -474,9 +481,9 @@ var st = (e, ...t) => e, A = {
474
481
  }, {
475
482
  definition: {
476
483
  data: {
477
- dimensions: [j("manufacturer", A.manufacturer), j("model", A.model)],
484
+ dimensions: [k("manufacturer", O.manufacturer), k("model", O.model)],
478
485
  measures: [{
479
- ...N("sales"),
486
+ ...j("sales"),
480
487
  dataPointShape: "circle"
481
488
  }]
482
489
  },
@@ -494,10 +501,11 @@ var st = (e, ...t) => e, A = {
494
501
  constraints: [
495
502
  "Each measure may select the primary or secondary axis using its axis property.",
496
503
  "Visible data labels require dataPointShape on every measure.",
497
- L,
498
- "Set range on a measure axis to fix its min, max, or both, for example to give several charts one shared scale; leave both unset and set startsAtZero to keep an auto-fitted axis anchored at zero. Set inverted on a measure axis to reverse its values, for example to put rank 1 at the top.",
504
+ F,
505
+ I,
499
506
  "Set scale to log on a measure axis to draw it logarithmically, with gridlines at powers of ten. Zero and negative values are drawn at the floor of a log axis.",
500
- "Value colors in presentation.coloring require at least two dimensions; measure color rules are not supported."
507
+ "Value colors in presentation.coloring require at least two dimensions; measure color rules are not supported.",
508
+ "For a trend over time, use a date field as the dimension with temporalGrouping, such as month, and sort by its ref in ascending order. Omit its format to show readable dates."
501
509
  ],
502
510
  dataRequirements: ["At least one dimension.", "At least one measure."],
503
511
  summary: "Trend chart with sorting, query limiting, dual measure axes, labels, legend, and orientation.",
@@ -505,31 +513,37 @@ var st = (e, ...t) => e, A = {
505
513
  },
506
514
  example: {
507
515
  data: {
508
- dimensions: [j("manufacturer", A.manufacturer)],
516
+ dimensions: [pt],
509
517
  measures: [{
510
- ...N("sales"),
518
+ ...j("sales"),
511
519
  axis: "primary",
512
520
  dataPointShape: "circle"
513
521
  }, {
514
- ...N("horsepower", A.horsepower, "AVG"),
522
+ ...j("horsepower", O.horsepower, "AVG"),
515
523
  axis: "secondary",
516
524
  dataPointShape: "square"
517
525
  }]
518
526
  },
519
- filterGroup: P,
527
+ filterGroup: M,
520
528
  limiting: { queryLimit: 100 },
521
529
  presentation: {
522
- axes: I,
530
+ axes: {
531
+ ...P,
532
+ dimension: {
533
+ ...P.dimension,
534
+ title: "Launch month"
535
+ }
536
+ },
523
537
  dataLabels: {
524
538
  density: "medium",
525
539
  visible: !0
526
540
  },
527
- legend: F,
541
+ legend: N,
528
542
  orientation: "vertical"
529
543
  },
530
544
  sorting: [{
531
- by: "sales",
532
- direction: "desc"
545
+ by: "launchMonth",
546
+ direction: "asc"
533
547
  }],
534
548
  type: "line",
535
549
  version: 1
@@ -567,11 +581,11 @@ var st = (e, ...t) => e, A = {
567
581
  },
568
582
  example: {
569
583
  data: {
570
- dimensions: [j("manufacturer", A.manufacturer)],
571
- measures: [N("sales")]
584
+ dimensions: [k("manufacturer", O.manufacturer)],
585
+ measures: [j("sales")]
572
586
  },
573
- filterGroup: P,
574
- presentation: { legend: F },
587
+ filterGroup: M,
588
+ presentation: { legend: N },
575
589
  type: "radar",
576
590
  version: 1
577
591
  },
@@ -586,8 +600,8 @@ var st = (e, ...t) => e, A = {
586
600
  additionalExamples: [{
587
601
  definition: {
588
602
  data: {
589
- dimensions: [j("manufacturer", A.manufacturer)],
590
- measures: [N("sales")]
603
+ dimensions: [k("manufacturer", O.manufacturer)],
604
+ measures: [j("sales")]
591
605
  },
592
606
  presentation: { coloring: { overwrites: [
593
607
  {
@@ -616,12 +630,12 @@ var st = (e, ...t) => e, A = {
616
630
  },
617
631
  example: {
618
632
  data: {
619
- dimensions: [j("manufacturer", A.manufacturer)],
620
- measures: [N("sales")]
633
+ dimensions: [k("manufacturer", O.manufacturer)],
634
+ measures: [j("sales")]
621
635
  },
622
- filterGroup: P,
636
+ filterGroup: M,
623
637
  limiting: { queryLimit: 100 },
624
- presentation: { legend: F },
638
+ presentation: { legend: N },
625
639
  sorting: [{
626
640
  by: "sales",
627
641
  direction: "desc"
@@ -647,10 +661,10 @@ var st = (e, ...t) => e, A = {
647
661
  },
648
662
  example: {
649
663
  data: {
650
- dimensions: [j("manufacturer", A.manufacturer), j("model", A.model)],
651
- measures: [N("sales")]
664
+ dimensions: [k("manufacturer", O.manufacturer), k("model", O.model)],
665
+ measures: [j("sales")]
652
666
  },
653
- filterGroup: P,
667
+ filterGroup: M,
654
668
  limiting: { queryLimit: 100 },
655
669
  presentation: { layout: {
656
670
  compact: !0,
@@ -682,11 +696,11 @@ var st = (e, ...t) => e, A = {
682
696
  },
683
697
  example: {
684
698
  data: {
685
- dimensions: [j("manufacturer", A.manufacturer), j("model", A.model)],
686
- measures: [N("sales")]
699
+ dimensions: [k("manufacturer", O.manufacturer), k("model", O.model)],
700
+ measures: [j("sales")]
687
701
  },
688
- filterGroup: P,
689
- presentation: { legend: F },
702
+ filterGroup: M,
703
+ presentation: { legend: N },
690
704
  type: "treemap",
691
705
  version: 1
692
706
  },
@@ -701,8 +715,8 @@ var st = (e, ...t) => e, A = {
701
715
  additionalExamples: [{
702
716
  definition: {
703
717
  data: {
704
- dimensions: [j("manufacturer", A.manufacturer), j("model", A.model)],
705
- measures: [N("sales")]
718
+ dimensions: [k("manufacturer", O.manufacturer), k("model", O.model)],
719
+ measures: [j("sales")]
706
720
  },
707
721
  presentation: { coloring: { overwrites: [{
708
722
  color: "#CA8A04",
@@ -722,10 +736,10 @@ var st = (e, ...t) => e, A = {
722
736
  },
723
737
  example: {
724
738
  data: {
725
- dimensions: [j("manufacturer", A.manufacturer), j("model", A.model)],
726
- measures: [N("sales")]
739
+ dimensions: [k("manufacturer", O.manufacturer), k("model", O.model)],
740
+ measures: [j("sales")]
727
741
  },
728
- filterGroup: P,
742
+ filterGroup: M,
729
743
  type: "sankey",
730
744
  version: 1
731
745
  },
@@ -739,7 +753,7 @@ var st = (e, ...t) => e, A = {
739
753
  "The optional second dimension receives the image role.",
740
754
  "Roles come from item order only; a ref is a label and does not select a role.",
741
755
  "With a size measure, points scale between the setPointSize and setMaxPointSize operation values.",
742
- "Set range on a measure axis to fix its min, max, or both, for example to give several charts one shared scale; leave both unset and set startsAtZero to keep an auto-fitted axis anchored at zero. Set inverted on a measure axis to reverse its values, for example to put rank 1 at the top."
756
+ I
743
757
  ],
744
758
  dataRequirements: ["One or two dimensions.", "Two or three measures."],
745
759
  summary: "Relationship chart using horizontal and vertical measures with optional size and image roles.",
@@ -747,17 +761,17 @@ var st = (e, ...t) => e, A = {
747
761
  },
748
762
  example: {
749
763
  data: {
750
- dimensions: [j("manufacturer", A.manufacturer)],
764
+ dimensions: [k("manufacturer", O.manufacturer)],
751
765
  measures: [
752
- N("sales"),
753
- N("horsepower", A.horsepower, "AVG"),
754
- N("size", A.sales, "AVG")
766
+ j("sales"),
767
+ j("horsepower", O.horsepower, "AVG"),
768
+ j("size", O.sales, "AVG")
755
769
  ]
756
770
  },
757
- filterGroup: P,
771
+ filterGroup: M,
758
772
  presentation: {
759
- axes: dt,
760
- legend: F
773
+ axes: _t,
774
+ legend: N
761
775
  },
762
776
  type: "scatter",
763
777
  version: 1
@@ -777,11 +791,11 @@ var st = (e, ...t) => e, A = {
777
791
  additionalExamples: [{
778
792
  definition: {
779
793
  data: {
780
- dimensions: [j("manufacturer", A.manufacturer), j("model", A.model)],
781
- measures: [N("sales")],
794
+ dimensions: [k("manufacturer", O.manufacturer), k("model", O.model)],
795
+ measures: [j("sales")],
782
796
  structure: "expandable"
783
797
  },
784
- filterGroup: P,
798
+ filterGroup: M,
785
799
  limiting: { queryLimit: 100 },
786
800
  sorting: [{
787
801
  by: "sales",
@@ -794,12 +808,12 @@ var st = (e, ...t) => e, A = {
794
808
  }, {
795
809
  definition: {
796
810
  data: {
797
- columnDimensions: [j("model", A.model)],
798
- measures: [N("sales")],
799
- rowDimensions: [j("manufacturer", A.manufacturer)],
811
+ columnDimensions: [k("model", O.model)],
812
+ measures: [j("sales")],
813
+ rowDimensions: [k("manufacturer", O.manufacturer)],
800
814
  structure: "pivot"
801
815
  },
802
- filterGroup: P,
816
+ filterGroup: M,
803
817
  limiting: { queryLimit: 100 },
804
818
  sorting: [{
805
819
  by: "sales",
@@ -831,21 +845,26 @@ var st = (e, ...t) => e, A = {
831
845
  data: {
832
846
  columns: [
833
847
  {
834
- ...j("manufacturer", A.manufacturer),
848
+ ...k("manufacturer", O.manufacturer),
849
+ role: "dimension"
850
+ },
851
+ {
852
+ ...k("model", O.model),
835
853
  role: "dimension"
836
854
  },
837
855
  {
838
- ...j("model", A.model),
856
+ ...k("latestLaunch", O.latestLaunch),
857
+ format: { formatType: "ddmmmyyyy" },
839
858
  role: "dimension"
840
859
  },
841
860
  {
842
- ...N("sales"),
861
+ ...j("sales"),
843
862
  role: "measure"
844
863
  }
845
864
  ],
846
865
  structure: "normal"
847
866
  },
848
- filterGroup: P,
867
+ filterGroup: M,
849
868
  limiting: { queryLimit: 100 },
850
869
  presentation: {
851
870
  background: {
@@ -920,8 +939,8 @@ var st = (e, ...t) => e, A = {
920
939
  documentation: {
921
940
  constraints: [
922
941
  "Dimensions are not supported. Measure order defines the waterfall sequence.",
923
- "Set range on the primary measure axis to fix its min, max, or both, for example to give several charts one shared scale; leave both unset and set startsAtZero to keep an auto-fitted axis anchored at zero. Set inverted on the primary measure axis to reverse its values.",
924
- L
942
+ L,
943
+ F
925
944
  ],
926
945
  dataRequirements: ["Between one and one hundred measures."],
927
946
  summary: "Sequential contribution chart composed from one or more measures.",
@@ -929,15 +948,15 @@ var st = (e, ...t) => e, A = {
929
948
  },
930
949
  example: {
931
950
  data: { measures: [{
932
- ...N("sales"),
951
+ ...j("sales"),
933
952
  dataLabels: { visible: !0 }
934
953
  }, {
935
- ...N("horsepower", A.horsepower, "AVG"),
954
+ ...j("horsepower", O.horsepower, "AVG"),
936
955
  dataLabels: { visible: !0 }
937
956
  }] },
938
- filterGroup: P,
957
+ filterGroup: M,
939
958
  presentation: {
940
- axes: ft,
959
+ axes: vt,
941
960
  dataLabels: { visible: !0 },
942
961
  orientation: "vertical"
943
962
  },
@@ -965,10 +984,10 @@ var st = (e, ...t) => e, A = {
965
984
  },
966
985
  example: {
967
986
  data: {
968
- dimensions: [j("manufacturer", A.manufacturer)],
969
- measures: [N("sales")]
987
+ dimensions: [k("manufacturer", O.manufacturer)],
988
+ measures: [j("sales")]
970
989
  },
971
- filterGroup: P,
990
+ filterGroup: M,
972
991
  type: "word-cloud",
973
992
  version: 1
974
993
  },
@@ -977,19 +996,18 @@ var st = (e, ...t) => e, A = {
977
996
  },
978
997
  {
979
998
  documentation: {
980
- constraints: ["The selected field must be date- or timestamp-compatible."],
999
+ constraints: ["The selected field must be date- or timestamp-compatible.", "A `range` picker always shows its calendar, so `pickerState: \"collapsed\"` is refused on it. Use `inputRange` for a compact picker."],
981
1000
  dataRequirements: ["Exactly one field."],
982
1001
  summary: "Date selection control with single/range modes, labels, quick select, and responsive settings.",
983
1002
  title: "Date picker"
984
1003
  },
985
1004
  example: {
986
- data: { field: M("latestLaunch", A.latestLaunch) },
1005
+ data: { field: A("latestLaunch", O.latestLaunch) },
987
1006
  settings: {
988
1007
  endDateLabel: "To",
989
1008
  pickerState: "expanded",
990
1009
  pickerType: "range",
991
1010
  quickSelect: !0,
992
- responsive: !0,
993
1011
  startDateLabel: "From",
994
1012
  timePickerVisibility: "never",
995
1013
  weekStart: "1"
@@ -1008,11 +1026,10 @@ var st = (e, ...t) => e, A = {
1008
1026
  title: "Filter"
1009
1027
  },
1010
1028
  example: {
1011
- data: { field: M("manufacturer", A.manufacturer) },
1029
+ data: { field: A("manufacturer", O.manufacturer) },
1012
1030
  presentation: {
1013
1031
  mode: "listbox",
1014
1032
  quickSelect: !0,
1015
- responsive: !0,
1016
1033
  searchable: !0,
1017
1034
  showProgressBar: !1
1018
1035
  },
@@ -1063,15 +1080,39 @@ var st = (e, ...t) => e, A = {
1063
1080
  type: "image"
1064
1081
  },
1065
1082
  {
1083
+ additionalExamples: [{
1084
+ definition: {
1085
+ data: { measure: j("sales") },
1086
+ filterGroup: {
1087
+ filters: [{
1088
+ fieldKey: O.model,
1089
+ operator: "contains",
1090
+ value: "Sport"
1091
+ }, {
1092
+ fieldKey: O.horsepower,
1093
+ operator: "greaterThanOrEqualTo",
1094
+ value: "200"
1095
+ }],
1096
+ operator: "and"
1097
+ },
1098
+ type: "number",
1099
+ version: 1
1100
+ },
1101
+ title: "Value filtered by single-value conditions"
1102
+ }],
1066
1103
  documentation: {
1067
- constraints: ["A raw field measure requires aggregation; semantic measures and calculations omit it."],
1104
+ constraints: [
1105
+ "A raw field measure requires aggregation; semantic measures and calculations omit it.",
1106
+ "Each static filter takes the value keys of its operator: inList and excludedFromList take a values array, isBetween and isNotBetween take valueFrom and valueTo, isNull and notNull take none, and every other operator, such as contains, takes one string in value.",
1107
+ "A measure with no value draws nothing rather than 0, and thresholds and comparisons do not apply to it."
1108
+ ],
1068
1109
  dataRequirements: ["Exactly one measure."],
1069
1110
  summary: "Single aggregated or semantic value with value formatting and static filters.",
1070
1111
  title: "Number"
1071
1112
  },
1072
1113
  example: {
1073
- data: { measure: N("sales") },
1074
- filterGroup: P,
1114
+ data: { measure: j("sales") },
1115
+ filterGroup: M,
1075
1116
  type: "number",
1076
1117
  version: 1
1077
1118
  },
@@ -1194,7 +1235,7 @@ var st = (e, ...t) => e, A = {
1194
1235
  title: "Slider"
1195
1236
  },
1196
1237
  example: {
1197
- data: { field: M("horsepower", A.horsepower) },
1238
+ data: { field: A("horsepower", O.horsepower) },
1198
1239
  settings: {
1199
1240
  layout: "multi",
1200
1241
  quickSelect: !0,
@@ -1211,42 +1252,42 @@ var st = (e, ...t) => e, A = {
1211
1252
  type: "slider"
1212
1253
  }
1213
1254
  ]), z = (e) => {
1214
- let t = pt.find((t) => t.type === e);
1255
+ let t = bt.find((t) => t.type === e);
1215
1256
  if (!t) throw Error(`Missing visualization definition documentation for ${e}`);
1216
1257
  return t;
1217
- }, B = (e, t) => k.toJSONSchema(e.meta({ title: t }), {
1258
+ }, B = (e, t) => D.toJSONSchema(e.meta({ title: t }), {
1218
1259
  reused: "inline",
1219
1260
  target: "draft-2020-12"
1220
1261
  }), V = {
1221
- "astrato-app-filter-bar": Ee,
1222
- bar: xe,
1223
- combo: de,
1224
- dot: ee,
1225
- scatter: a,
1226
- histogram: g,
1227
- heatMap: m,
1228
- radar: pe,
1229
- gauge: De,
1230
- "distribution-gauge": d,
1231
- pie: fe,
1232
- tree: ve,
1233
- treemap: je,
1234
- sankey: ae,
1235
- waterfall: we,
1236
- "word-cloud": ke,
1237
- "date-picker": u,
1238
- iframe: p,
1239
- image: h,
1240
- shape: oe,
1241
- simpleTextObject: s,
1242
- "atomic-input": ie,
1243
- slider: Ne,
1244
- line: f,
1245
- table: ne,
1246
- number: ue,
1247
- filter: le
1248
- }, mt = new Map(Object.entries(V)), ht = (e, t = 1) => t === 1 ? mt.get(e) : void 0, H = () => Object.keys(V), gt = (e) => {
1249
- let t = E(e);
1262
+ "astrato-app-filter-bar": Me,
1263
+ bar: _e,
1264
+ combo: p,
1265
+ dot: Oe,
1266
+ scatter: ye,
1267
+ histogram: fe,
1268
+ heatMap: pe,
1269
+ radar: oe,
1270
+ gauge: ee,
1271
+ "distribution-gauge": te,
1272
+ pie: me,
1273
+ tree: Ne,
1274
+ treemap: Te,
1275
+ sankey: s,
1276
+ waterfall: Ae,
1277
+ "word-cloud": Se,
1278
+ "date-picker": h,
1279
+ iframe: ne,
1280
+ image: se,
1281
+ shape: Ie,
1282
+ simpleTextObject: ue,
1283
+ "atomic-input": f,
1284
+ slider: l,
1285
+ line: le,
1286
+ table: ae,
1287
+ number: m,
1288
+ filter: de
1289
+ }, xt = new Map(Object.entries(V)), St = (e, t = 1) => t === 1 ? xt.get(e) : void 0, H = () => Object.keys(V), Ct = (e) => {
1290
+ let t = T(e);
1250
1291
  if (t) return {
1251
1292
  code: "invalid_structure",
1252
1293
  message: t,
@@ -1265,19 +1306,19 @@ var st = (e, ...t) => e, A = {
1265
1306
  path: ["version"]
1266
1307
  };
1267
1308
  let r = "type" in e ? e.type : void 0;
1268
- if (!(typeof r == "string" && ht(r, n))) return {
1309
+ if (!(typeof r == "string" && St(r, n))) return {
1269
1310
  allowedValues: H(),
1270
1311
  code: "unsupported_visualization",
1271
1312
  message: `Visualization type "${String(r)}" is not supported.`,
1272
1313
  path: ["type"]
1273
1314
  };
1274
- }, _t = (e) => {
1275
- let t = gt(e);
1315
+ }, wt = (e) => {
1316
+ let t = Ct(e);
1276
1317
  if (t) return {
1277
1318
  issues: [t],
1278
1319
  success: !1
1279
1320
  };
1280
- let n = ht(e.type, e.version);
1321
+ let n = St(e.type, e.version);
1281
1322
  if (!n) return {
1282
1323
  issues: [{
1283
1324
  allowedValues: H(),
@@ -1293,133 +1334,187 @@ var st = (e, ...t) => e, A = {
1293
1334
  issues: [],
1294
1335
  success: !0
1295
1336
  } : {
1296
- issues: C(r.error, e),
1337
+ issues: g(r.error, e),
1297
1338
  success: !1
1298
1339
  };
1299
- }, vt = async (e) => (await import("./app-filter-bar.compiler-BGJ7HAbr.js")).compileAppFilterBarVisualizationDefinition(e), yt = async (e) => (await import("./bar.compiler-CT0ZbQKc.js")).compileBarVisualizationDefinition(e), bt = async (e) => (await import("./filter.compiler-DBsyRBJt.js")).compileFilterVisualizationDefinition(e), xt = async (e) => (await import("./line.compiler-CzdM5Ld0.js")).compileLineVisualizationDefinition(e), St = async (e) => (await import("./number.compiler-G-R7y16P.js")).compileNumberVisualizationDefinition(e), Ct = async (e) => (await import("./table.compiler-tb914oj3.js")).compileTableVisualizationDefinition(e), U = z("bar"), wt = {
1300
- compile: yt,
1301
- documentation: U.documentation,
1302
- examples: [U.example, ...(U.additionalExamples ?? []).map(({ definition: e }) => e)],
1303
- jsonSchema: B(V.bar, `${U.documentation.title} definition`),
1340
+ }, Tt = async (e) => (await import("./app-filter-bar.compiler-TwVTeoj5.js")).compileAppFilterBarVisualizationDefinition(e), Et = async (e) => (await import("./bar.compiler-DuQg8EUb.js")).compileBarVisualizationDefinition(e), Dt = async (e) => (await import("./filter.compiler-w27dlv0C.js")).compileFilterVisualizationDefinition(e), Ot = async (e) => (await import("./line.compiler-Ct1WhN2p.js")).compileLineVisualizationDefinition(e), kt = async (e) => (await import("./number.compiler-D8TPly-4.js")).compileNumberVisualizationDefinition(e), At = async (e) => (await import("./table.compiler-DMeeHxb6.js")).compileTableVisualizationDefinition(e), U = o(), jt = [
1341
+ U.FieldType.DATE,
1342
+ U.FieldType.TIMESTAMP,
1343
+ U.FieldType.TIMESTAMP_TZ
1344
+ ], Mt = ["none", "inherit"], Nt = [
1345
+ "dimensions",
1346
+ "rowDimensions",
1347
+ "columnDimensions",
1348
+ "columns"
1349
+ ], Pt = (e) => {
1350
+ if (e?.kind === "field") return {
1351
+ dataType: e.dataType,
1352
+ hasOwnFormat: !1,
1353
+ label: "field"
1354
+ };
1355
+ if (e?.kind !== "dimension") return;
1356
+ let [t] = re([e]);
1357
+ return {
1358
+ dataType: n(t),
1359
+ hasOwnFormat: !!i(t),
1360
+ label: "dimension"
1361
+ };
1362
+ }, Ft = (e) => {
1363
+ let t = "data" in e ? e.data : void 0;
1364
+ return Nt.flatMap((e) => {
1365
+ let n = t?.[e];
1366
+ return Array.isArray(n) ? n.flatMap((t, n) => e === "columns" && t.role !== "dimension" ? [] : [{
1367
+ dimension: t,
1368
+ path: [
1369
+ "data",
1370
+ e,
1371
+ n
1372
+ ]
1373
+ }]) : [];
1374
+ });
1375
+ }, It = (e, t) => Ft(e).flatMap(({ dimension: e, path: n }) => {
1376
+ let r = e.format?.formatType, i = Pt(t.find((t) => t.fieldKey === e.fieldKey));
1377
+ if (r === void 0 || !Mt.includes(r) || e.temporalGrouping?.mode === "part" || i?.dataType === void 0 || !jt.includes(i.dataType) || r === "inherit" && i.hasOwnFormat) return [];
1378
+ let a = [
1379
+ ...n,
1380
+ "format",
1381
+ "formatType"
1382
+ ], o = r === "none" ? `"none" turns off date formatting, so date ${i.label} "${e.fieldKey}" shows raw timestamps` : `"inherit" finds no format on ${i.label} "${e.fieldKey}", so it shows raw timestamps`, s = "Omit format to use the default date format, or set a date format type such as \"ddmmmyyyy\".";
1383
+ return e.temporalGrouping ? s = "Omit format to use the default format for this grouping." : i.hasOwnFormat && (s = "Omit format or set it to \"inherit\" to use the format defined on the dimension."), [{
1384
+ code: "unformatted_temporal_dimension",
1385
+ details: {
1386
+ dataType: i.dataType,
1387
+ fieldKey: e.fieldKey,
1388
+ received: r,
1389
+ ref: e.ref
1390
+ },
1391
+ message: `${Pe(a)}: ${o} such as 1672531200000 instead of dates. ${s}`,
1392
+ path: a
1393
+ }];
1394
+ }), Lt = (e, t) => It(e, t), W = z("bar"), Rt = {
1395
+ compile: Et,
1396
+ documentation: W.documentation,
1397
+ examples: [W.example, ...(W.additionalExamples ?? []).map(({ definition: e }) => e)],
1398
+ jsonSchema: B(V.bar, `${W.documentation.title} definition`),
1304
1399
  schema: V.bar,
1305
- supportedFeatures: U.supportedFeatures,
1400
+ supportedFeatures: W.supportedFeatures,
1306
1401
  type: "bar",
1307
1402
  version: 1
1308
- }, W = z("astrato-app-filter-bar"), Tt = {
1309
- compile: vt,
1310
- documentation: W.documentation,
1311
- examples: [W.example],
1312
- jsonSchema: B(V["astrato-app-filter-bar"], `${W.documentation.title} definition`),
1403
+ }, G = z("astrato-app-filter-bar"), zt = {
1404
+ compile: Tt,
1405
+ documentation: G.documentation,
1406
+ examples: [G.example],
1407
+ jsonSchema: B(V["astrato-app-filter-bar"], `${G.documentation.title} definition`),
1313
1408
  schema: V["astrato-app-filter-bar"],
1314
- supportedFeatures: W.supportedFeatures,
1409
+ supportedFeatures: G.supportedFeatures,
1315
1410
  type: "astrato-app-filter-bar",
1316
1411
  version: 1
1317
1412
  };
1318
- r();
1319
- var G = t(), Et = {
1413
+ a();
1414
+ var Bt = {
1320
1415
  combo: {
1321
- coloringType: n.PerEachMeasure,
1416
+ coloringType: t.PerEachMeasure,
1322
1417
  queryLimit: !0,
1323
- schema: de,
1418
+ schema: p,
1324
1419
  sorting: !0,
1325
1420
  type: "combo",
1326
- vSpecSchema: Je
1421
+ vSpecSchema: tt
1327
1422
  },
1328
1423
  "distribution-gauge": {
1329
- coloringType: n.PerEachMeasure,
1424
+ coloringType: t.PerEachMeasure,
1330
1425
  measureRole: () => e.GAUGE_VALUE,
1331
- schema: d,
1426
+ schema: te,
1332
1427
  type: "distribution-gauge",
1333
- vSpecSchema: Pe
1428
+ vSpecSchema: $e
1334
1429
  },
1335
1430
  dot: {
1336
- coloringType: n.Categorical,
1337
- schema: ee,
1431
+ coloringType: t.Categorical,
1432
+ schema: Oe,
1338
1433
  type: "dot",
1339
- vSpecSchema: Re
1434
+ vSpecSchema: We
1340
1435
  },
1341
1436
  gauge: {
1342
- coloringType: (e) => (e.data.dimensions?.length ?? 0) > 0 ? n.Categorical : n.PerEachMeasure,
1437
+ coloringType: (e) => (e.data.dimensions?.length ?? 0) > 0 ? t.Categorical : t.PerEachMeasure,
1343
1438
  measureRole: (t, n) => (n.data.dimensions?.length ?? 0) > 0 && t === 1 ? e.GAUGE_TARGET : e.GAUGE_VALUE,
1344
- schema: De,
1439
+ schema: ee,
1345
1440
  type: "gauge",
1346
- vSpecSchema: $e
1441
+ vSpecSchema: rt
1347
1442
  },
1348
1443
  heatMap: {
1349
- coloringType: n.Gradient,
1350
- dimensionRole: (e) => e === 0 ? i.HEAT_MAP_HORIZONTAL : i.HEAT_MAP_VERTICAL,
1444
+ coloringType: t.Gradient,
1445
+ dimensionRole: (e) => e === 0 ? r.HEAT_MAP_HORIZONTAL : r.HEAT_MAP_VERTICAL,
1351
1446
  measureRole: (t) => t === 0 ? e.HEAT_MAP_COLOR : e.HEAT_MAP_SIZE,
1352
1447
  queryLimit: !0,
1353
- schema: m,
1448
+ schema: pe,
1354
1449
  sorting: !0,
1355
1450
  type: "heatMap",
1356
- vSpecSchema: He
1451
+ vSpecSchema: qe
1357
1452
  },
1358
1453
  histogram: {
1359
- coloringType: n.Single,
1360
- schema: g,
1454
+ coloringType: t.Single,
1455
+ schema: fe,
1361
1456
  type: "histogram",
1362
- vSpecSchema: Ke
1457
+ vSpecSchema: Qe
1363
1458
  },
1364
1459
  pie: {
1365
- coloringType: n.Categorical,
1460
+ coloringType: t.Categorical,
1366
1461
  measureRole: (t) => t === 0 ? e.PIE_CHART_SLICE : e.PIE_CHART_LENGTH,
1367
1462
  queryLimit: !0,
1368
- schema: fe,
1463
+ schema: me,
1369
1464
  sorting: !0,
1370
1465
  type: "pie",
1371
- vSpecSchema: Qe
1466
+ vSpecSchema: Ye
1372
1467
  },
1373
1468
  radar: {
1374
- conditionalColoringFallbackType: n.Single,
1375
- schema: pe,
1469
+ conditionalColoringFallbackType: t.Single,
1470
+ schema: oe,
1376
1471
  type: "radar",
1377
- vSpecSchema: Xe
1472
+ vSpecSchema: Ze
1378
1473
  },
1379
1474
  sankey: {
1380
- schema: ae,
1475
+ schema: s,
1381
1476
  type: "sankey",
1382
- vSpecSchema: Ue
1477
+ vSpecSchema: Ke
1383
1478
  },
1384
1479
  scatter: {
1385
- coloringType: n.Categorical,
1386
- dimensionRole: (e) => e === 0 ? i.SCATTER_DIMENSION : i.SCATTER_IMAGE,
1480
+ coloringType: t.Categorical,
1481
+ dimensionRole: (e) => e === 0 ? r.SCATTER_DIMENSION : r.SCATTER_IMAGE,
1387
1482
  measureRole: (t) => [
1388
1483
  e.SCATTER_HORIZONTAL,
1389
1484
  e.SCATTER_VERTICAL,
1390
1485
  e.SCATTER_SIZE
1391
1486
  ][t],
1392
1487
  queryLimit: !0,
1393
- schema: a,
1488
+ schema: ye,
1394
1489
  sorting: !0,
1395
1490
  type: "scatter",
1396
- vSpecSchema: Ze
1491
+ vSpecSchema: Ve
1397
1492
  },
1398
1493
  tree: {
1399
1494
  queryLimit: !0,
1400
- schema: ve,
1495
+ schema: Ne,
1401
1496
  sorting: !0,
1402
1497
  type: "tree",
1403
1498
  vSpecSchema: Le
1404
1499
  },
1405
1500
  treemap: {
1406
- schema: je,
1501
+ schema: Te,
1407
1502
  type: "treemap",
1408
- vSpecSchema: qe
1503
+ vSpecSchema: et
1409
1504
  },
1410
1505
  waterfall: {
1411
- schema: we,
1506
+ schema: Ae,
1412
1507
  type: "waterfall",
1413
- vSpecSchema: Fe
1508
+ vSpecSchema: He
1414
1509
  },
1415
1510
  "word-cloud": {
1416
- conditionalColoringFallbackType: n.Single,
1417
- schema: ke,
1511
+ conditionalColoringFallbackType: t.Single,
1512
+ schema: Se,
1418
1513
  type: "word-cloud",
1419
- vSpecSchema: ze
1514
+ vSpecSchema: Ge
1420
1515
  }
1421
- }, Dt = (e, t) => {
1422
- let n = [], r = t.presentation, i = me(r?.axes);
1516
+ }, Vt = (e, t) => {
1517
+ let n = [], r = t.presentation, i = he(r?.axes);
1423
1518
  if (i) return Promise.resolve({
1424
1519
  issue: i,
1425
1520
  success: !1
@@ -1427,7 +1522,7 @@ var G = t(), Et = {
1427
1522
  r?.orientation !== void 0 && n.push({
1428
1523
  name: "setOrientation",
1429
1524
  payload: r.orientation
1430
- }), r?.legend && n.push(...ye(e.vSpec, r.legend)), Object.entries(r?.axes ?? {}).forEach(([e, t]) => {
1525
+ }), r?.legend && n.push(...be(e.vSpec, r.legend)), Object.entries(r?.axes ?? {}).forEach(([e, t]) => {
1431
1526
  t.titleVisible !== void 0 && n.push({
1432
1527
  name: "setShowAxisTitle",
1433
1528
  payload: {
@@ -1458,8 +1553,8 @@ var G = t(), Et = {
1458
1553
  axisName: e,
1459
1554
  showAxisLine: t.lineVisible
1460
1555
  }
1461
- }), n.push(..._e(e, t)), "scale" in t && t.scale !== void 0 && n.push({
1462
- name: at.SET_AXIS_SCALE,
1556
+ }), n.push(...ve(e, t)), "scale" in t && t.scale !== void 0 && n.push({
1557
+ name: ut.SET_AXIS_SCALE,
1463
1558
  payload: {
1464
1559
  axisName: e,
1465
1560
  scale: t.scale
@@ -1468,7 +1563,7 @@ var G = t(), Et = {
1468
1563
  });
1469
1564
  let a = r?.axes?.primaryMeasure?.bands;
1470
1565
  return a && n.push({
1471
- name: rt.SET_MEASURE_AXIS_BANDS,
1566
+ name: ct.SET_MEASURE_AXIS_BANDS,
1472
1567
  payload: { bands: a }
1473
1568
  }), (t.data.measures ?? []).forEach((i) => {
1474
1569
  let a = i.dataLabels ?? (t.type !== "combo" || i.seriesType === "bar" ? r?.dataLabels : void 0);
@@ -1480,12 +1575,12 @@ var G = t(), Et = {
1480
1575
  }
1481
1576
  });
1482
1577
  }), y(e, n, ["presentation"]);
1483
- }, Ot = (e, t) => {
1578
+ }, Ht = (e, t) => {
1484
1579
  let n = [];
1485
1580
  if (t.type === "combo") {
1486
1581
  (t.data.measures ?? []).forEach((t) => {
1487
1582
  t.seriesType && n.push({
1488
- name: it.SET_MEASURE_GRAPH_TYPE,
1583
+ name: lt.SET_MEASURE_GRAPH_TYPE,
1489
1584
  payload: {
1490
1585
  ...w(e.resolvedRefs[t.ref]),
1491
1586
  graphType: t.seriesType
@@ -1495,14 +1590,14 @@ var G = t(), Et = {
1495
1590
  let r = t.data.measures ?? [], i = r.find((e) => e.seriesType === "bar"), a = r.find((e) => e.seriesType === "bar" && e.axis)?.axis;
1496
1591
  r.forEach((t) => {
1497
1592
  t.seriesType !== "bar" && t.axis && n.push({
1498
- name: nt.CHANGE_MEASURE_AXIS,
1593
+ name: st.CHANGE_MEASURE_AXIS,
1499
1594
  payload: {
1500
1595
  ...w(e.resolvedRefs[t.ref]),
1501
1596
  secondaryAxis: t.axis === "secondary"
1502
1597
  }
1503
1598
  });
1504
1599
  }), i && a && n.push({
1505
- name: nt.CHANGE_MEASURE_AXIS,
1600
+ name: st.CHANGE_MEASURE_AXIS,
1506
1601
  payload: {
1507
1602
  ...w(e.resolvedRefs[i.ref]),
1508
1603
  secondaryAxis: a === "secondary"
@@ -1512,34 +1607,34 @@ var G = t(), Et = {
1512
1607
  if (t.type === "gauge" || t.type === "distribution-gauge") {
1513
1608
  let e = t.type === "distribution-gauge";
1514
1609
  e && n.push({
1515
- name: ot.SET_GAUGE_COMPARISON_MODE,
1610
+ name: dt.SET_GAUGE_COMPARISON_MODE,
1516
1611
  payload: !0
1517
1612
  }), t.presentation?.displayMode && n.push({
1518
- name: e ? ot.SET_GAUGE_BAR_MODE : D.SET_GAUGE_BAR_MODE,
1613
+ name: e ? dt.SET_GAUGE_BAR_MODE : ot.SET_GAUGE_BAR_MODE,
1519
1614
  payload: t.presentation.displayMode === "bar"
1520
1615
  }), !e && (t.data.dimensions?.length ?? 0) > 0 && (t.data.measures?.length ?? 0) > 1 && n.push({
1521
- name: D.SET_GAUGE_TARGET_TYPE,
1522
- payload: tt.Data
1616
+ name: ot.SET_GAUGE_TARGET_TYPE,
1617
+ payload: at.Data
1523
1618
  });
1524
1619
  }
1525
1620
  if (t.type === "tree" && t.presentation?.layout) {
1526
1621
  let e = t.presentation.layout;
1527
1622
  e.compact !== void 0 && n.push({
1528
- name: O.SET_TREE_COMPACT,
1623
+ name: E.SET_TREE_COMPACT,
1529
1624
  payload: e.compact
1530
1625
  }), e.forceAutoFit !== void 0 && n.push({
1531
- name: O.SET_TREE_FORCE_AUTO_FIT,
1626
+ name: E.SET_TREE_FORCE_AUTO_FIT,
1532
1627
  payload: e.forceAutoFit
1533
1628
  }), e.direction !== void 0 && n.push({
1534
- name: O.SET_TREE_DIRECTION_ORIGIN,
1629
+ name: E.SET_TREE_DIRECTION_ORIGIN,
1535
1630
  payload: e.direction
1536
1631
  }), e.initialExpandedLevels !== void 0 && n.push({
1537
- name: O.SET_TREE_INITIAL_EXPANDED_LEVELS,
1632
+ name: E.SET_TREE_INITIAL_EXPANDED_LEVELS,
1538
1633
  payload: e.initialExpandedLevels
1539
1634
  });
1540
1635
  }
1541
1636
  return y(e, n, ["presentation"]);
1542
- }, kt = (e, t, n) => {
1637
+ }, Ut = (e, t, n) => {
1543
1638
  let r = "coloring" in e.vSpec && e.vSpec.coloring !== void 0, i = t.presentation?.legend, a = !!i && Object.keys(i).length > 0 && i.visible !== !1, o = t.presentation?.coloring !== void 0, s = n.coloringType ?? (o ? n.conditionalColoringFallbackType : void 0);
1544
1639
  return !s || r || !a && !o ? Promise.resolve({
1545
1640
  state: e,
@@ -1548,8 +1643,8 @@ var G = t(), Et = {
1548
1643
  name: "setColoringType",
1549
1644
  payload: typeof s == "function" ? s(t) : s
1550
1645
  }], a ? ["presentation", "legend"] : ["presentation", "coloring"]);
1551
- }, At = async (e, t) => {
1552
- let n = Et[t], r = E(e);
1646
+ }, Wt = async (e, t) => {
1647
+ let n = Bt[t], r = T(e);
1553
1648
  if (r) return {
1554
1649
  issues: [{
1555
1650
  code: "invalid_structure",
@@ -1560,7 +1655,7 @@ var G = t(), Et = {
1560
1655
  };
1561
1656
  let i = n.schema.safeParse(e.definition);
1562
1657
  if (!i.success) return {
1563
- issues: C(i.error, e.definition),
1658
+ issues: g(i.error, e.definition),
1564
1659
  success: !1
1565
1660
  };
1566
1661
  let a = n.vSpecSchema.safeParse(e.baseVSpec);
@@ -1568,8 +1663,8 @@ var G = t(), Et = {
1568
1663
  issues: [_("invalid_structure", ["baseVSpec"], `Base ${t} vSpec is invalid.`, { details: { issues: a.error.issues } })],
1569
1664
  success: !1
1570
1665
  };
1571
- let s = a.data;
1572
- if (!S(s, [
1666
+ let o = a.data;
1667
+ if (!C(o, [
1573
1668
  "dimensions",
1574
1669
  "measures",
1575
1670
  "supportingMeasures",
@@ -1578,45 +1673,45 @@ var G = t(), Et = {
1578
1673
  issues: [_("non_fresh_base_vspec", ["baseVSpec"], `${t} definitions require a fresh base vSpec.`)],
1579
1674
  success: !1
1580
1675
  };
1581
- let l = i.data, u = l.data.dimensions ?? [], d = l.data.measures ?? [], f = [...u, ...d].map((e) => e.ref), p = [
1582
- ...re(u, e.availableFields, ["data", "dimensions"], "dimension"),
1583
- ...re(d, e.availableFields, ["data", "measures"], "measure"),
1584
- ...c([{
1585
- items: u,
1676
+ let s = i.data, l = s.data.dimensions ?? [], f = s.data.measures ?? [], p = [...l, ...f].map((e) => e.ref), m = [
1677
+ ...Ce(l, e.availableFields, ["data", "dimensions"], "dimension"),
1678
+ ...Ce(f, e.availableFields, ["data", "measures"], "measure"),
1679
+ ...u([{
1680
+ items: l,
1586
1681
  path: ["data", "dimensions"]
1587
1682
  }, {
1588
- items: d,
1683
+ items: f,
1589
1684
  path: ["data", "measures"]
1590
1685
  }]),
1591
- ...Se(l.filterGroup, e.availableFields),
1592
- ...Me(l.sorting, f),
1593
- ...se(l.presentation?.coloring, u.map((e) => e.ref), d.map((e) => e.ref)),
1594
- ...t === "histogram" && u[0] ? o(u[0], e.availableFields, [
1686
+ ...c(s.filterGroup, e.availableFields),
1687
+ ...Fe(s.sorting, p),
1688
+ ...ce(s.presentation?.coloring, l.map((e) => e.ref), f.map((e) => e.ref)),
1689
+ ...t === "histogram" && l[0] ? b(l[0], e.availableFields, [
1595
1690
  "data",
1596
1691
  "dimensions",
1597
1692
  0
1598
1693
  ], [
1599
- G.FieldType.DECIMAL,
1600
- G.FieldType.FLOAT,
1601
- G.FieldType.INT,
1602
- G.FieldType.REAL
1694
+ U.FieldType.DECIMAL,
1695
+ U.FieldType.FLOAT,
1696
+ U.FieldType.INT,
1697
+ U.FieldType.REAL
1603
1698
  ], "a histogram dimension") : []
1604
1699
  ];
1605
- if (p.length > 0) return {
1606
- issues: p,
1700
+ if (m.length > 0) return {
1701
+ issues: m,
1607
1702
  success: !1
1608
1703
  };
1609
- let m = {
1610
- state: x(e, s),
1704
+ let h = {
1705
+ state: S(e, o),
1611
1706
  success: !0
1612
1707
  };
1613
- for (let [e, t] of u.entries()) {
1614
- if ("issue" in m) return {
1615
- issues: [m.issue],
1708
+ for (let [e, t] of l.entries()) {
1709
+ if ("issue" in h) return {
1710
+ issues: [h.issue],
1616
1711
  success: !1
1617
1712
  };
1618
- let r = n.dimensionRole?.(e, l);
1619
- m = await b(m.state, t, "dimension", "addDimension", {
1713
+ let r = n.dimensionRole?.(e, s);
1714
+ h = await x(h.state, t, "dimension", "addDimension", {
1620
1715
  key: t.fieldKey,
1621
1716
  ...r ? { role: r } : {}
1622
1717
  }, [
@@ -1625,41 +1720,41 @@ var G = t(), Et = {
1625
1720
  e
1626
1721
  ]);
1627
1722
  }
1628
- for (let [t, r] of d.entries()) {
1629
- if ("issue" in m) return {
1630
- issues: [m.issue],
1723
+ for (let [t, r] of f.entries()) {
1724
+ if ("issue" in h) return {
1725
+ issues: [h.issue],
1631
1726
  success: !1
1632
1727
  };
1633
- let i = n.measureRole?.(t, l);
1634
- m = await b(m.state, r, "measure", "addMeasure", ce(r, e.availableFields, i ? { role: i } : {}), [
1728
+ let i = n.measureRole?.(t, s);
1729
+ h = await x(h.state, r, "measure", "addMeasure", d(r, e.availableFields, i ? { role: i } : {}), [
1635
1730
  "data",
1636
1731
  "measures",
1637
1732
  t
1638
1733
  ]);
1639
1734
  }
1640
- return "issue" in m || (m = await Oe(m.state, u, "updateDimension", ["data", "dimensions"]), "issue" in m) || (m = await Ot(m.state, l), "issue" in m) || (m = await kt(m.state, l, n), "issue" in m) || (m = await Ae(m.state, u, "setDimensionTemporalGrouping", ["data", "dimensions"]), "issue" in m) || (m = await he(m.state, u, {
1735
+ return "issue" in h || (h = await ke(h.state, l, "updateDimension", ["data", "dimensions"]), "issue" in h) || (h = await Ht(h.state, s), "issue" in h) || (h = await Ut(h.state, s, n), "issue" in h) || (h = await je(h.state, l, "setDimensionTemporalGrouping", ["data", "dimensions"]), "issue" in h) || (h = await ge(h.state, l, {
1641
1736
  formatString: "setDimensionFormatString",
1642
1737
  formatType: "setDimensionFormatType"
1643
- }, ["data", "dimensions"]), "issue" in m) || (m = await he(m.state, d, {
1738
+ }, ["data", "dimensions"]), "issue" in h) || (h = await ge(h.state, f, {
1644
1739
  currency: "setMeasureCurrency",
1645
1740
  currencyIsPrefix: "setMeasureCurrencyIsPrefix",
1646
1741
  formatString: "setMeasureFormatString",
1647
1742
  formatType: "setMeasureFormatType",
1648
1743
  negativeType: "setMeasureNegativeType"
1649
- }, ["data", "measures"]), "issue" in m) || (m = await be(m.state, l.filterGroup), "issue" in m) || n.sorting && (m = await Te(m.state, l.sorting, "changeSortOrderAndDirection", "toggleSortingItem"), "issue" in m) || n.queryLimit && l.limiting?.queryLimit !== void 0 && (m = await y(m.state, [{
1744
+ }, ["data", "measures"]), "issue" in h) || (h = await xe(h.state, s.filterGroup), "issue" in h) || n.sorting && (h = await Ee(h.state, s.sorting, "changeSortOrderAndDirection", "toggleSortingItem"), "issue" in h) || n.queryLimit && s.limiting?.queryLimit !== void 0 && (h = await y(h.state, [{
1650
1745
  name: "setQueryLimit",
1651
- payload: l.limiting.queryLimit
1652
- }], ["limiting"]), "issue" in m) || (m = await Dt(m.state, l), "issue" in m) ? {
1653
- issues: [m.issue],
1746
+ payload: s.limiting.queryLimit
1747
+ }], ["limiting"]), "issue" in h) || (h = await Vt(h.state, s), "issue" in h) ? {
1748
+ issues: [h.issue],
1654
1749
  success: !1
1655
- } : (m = await Ce(m.state, l.presentation?.coloring), "issue" in m ? {
1656
- issues: [m.issue],
1750
+ } : (h = await we(h.state, s.presentation?.coloring), "issue" in h ? {
1751
+ issues: [h.issue],
1657
1752
  success: !1
1658
- } : v(m.state, n.vSpecSchema));
1753
+ } : v(h.state, n.vSpecSchema));
1659
1754
  }, K = (e) => {
1660
1755
  let t = z(e.type);
1661
1756
  return {
1662
- compile: (t) => At(t, e.type),
1757
+ compile: (t) => Wt(t, e.type),
1663
1758
  documentation: t.documentation,
1664
1759
  examples: [t.example, ...(t.additionalExamples ?? []).map(({ definition: e }) => e)],
1665
1760
  jsonSchema: B(e.schema, `${t.documentation.title} definition`),
@@ -1668,7 +1763,7 @@ var G = t(), Et = {
1668
1763
  type: e.type,
1669
1764
  version: 1
1670
1765
  };
1671
- }, jt = [
1766
+ }, Gt = [
1672
1767
  K({
1673
1768
  schema: V.combo,
1674
1769
  type: "combo"
@@ -1725,8 +1820,8 @@ var G = t(), Et = {
1725
1820
  schema: V["word-cloud"],
1726
1821
  type: "word-cloud"
1727
1822
  })
1728
- ], q = z("filter"), Mt = {
1729
- compile: bt,
1823
+ ], q = z("filter"), Kt = {
1824
+ compile: Dt,
1730
1825
  documentation: q.documentation,
1731
1826
  examples: [q.example],
1732
1827
  jsonSchema: B(V.filter, `${q.documentation.title} definition`),
@@ -1734,8 +1829,8 @@ var G = t(), Et = {
1734
1829
  supportedFeatures: q.supportedFeatures,
1735
1830
  type: "filter",
1736
1831
  version: 1
1737
- }, J = z("line"), Nt = {
1738
- compile: xt,
1832
+ }, J = z("line"), qt = {
1833
+ compile: Ot,
1739
1834
  documentation: J.documentation,
1740
1835
  examples: [J.example, ...(J.additionalExamples ?? []).map(({ definition: e }) => e)],
1741
1836
  jsonSchema: B(V.line, `${J.documentation.title} definition`),
@@ -1743,8 +1838,8 @@ var G = t(), Et = {
1743
1838
  supportedFeatures: J.supportedFeatures,
1744
1839
  type: "line",
1745
1840
  version: 1
1746
- }, Y = z("number"), Pt = {
1747
- compile: St,
1841
+ }, Y = z("number"), Jt = {
1842
+ compile: kt,
1748
1843
  documentation: Y.documentation,
1749
1844
  examples: [Y.example],
1750
1845
  jsonSchema: B(V.number, `${Y.documentation.title} definition`),
@@ -1755,7 +1850,7 @@ var G = t(), Et = {
1755
1850
  }, X = (e, t) => Object.entries(e).flatMap(([e, n]) => n === void 0 || !t[e] ? [] : [{
1756
1851
  name: t[e],
1757
1852
  payload: n
1758
- }]), Ft = {
1853
+ }]), Yt = {
1759
1854
  "atomic-input": {
1760
1855
  createRequests: (e) => {
1761
1856
  let t = e.customLabel;
@@ -1773,18 +1868,18 @@ var G = t(), Et = {
1773
1868
  payload: t.text
1774
1869
  }]] : []];
1775
1870
  },
1776
- schema: ie,
1871
+ schema: f,
1777
1872
  type: "atomic-input",
1778
- vSpecSchema: Be
1873
+ vSpecSchema: ze
1779
1874
  },
1780
1875
  iframe: {
1781
1876
  createRequests: (e) => [{
1782
1877
  name: "setIframeUrl",
1783
1878
  payload: e.url
1784
1879
  }],
1785
- schema: p,
1880
+ schema: ne,
1786
1881
  type: "iframe",
1787
- vSpecSchema: Ye
1882
+ vSpecSchema: Je
1788
1883
  },
1789
1884
  image: {
1790
1885
  createRequests: (e) => X(e, {
@@ -1795,9 +1890,9 @@ var G = t(), Et = {
1795
1890
  shadow: "setImageShadow",
1796
1891
  source: "setImageSource"
1797
1892
  }),
1798
- schema: h,
1893
+ schema: se,
1799
1894
  type: "image",
1800
- vSpecSchema: Ge
1895
+ vSpecSchema: Xe
1801
1896
  },
1802
1897
  shape: {
1803
1898
  createRequests: (e) => X(e, {
@@ -1815,9 +1910,9 @@ var G = t(), Et = {
1815
1910
  shape: "setShapeType",
1816
1911
  strokeColor: "setShapeBorderColor"
1817
1912
  }),
1818
- schema: oe,
1913
+ schema: Ie,
1819
1914
  type: "shape",
1820
- vSpecSchema: We
1915
+ vSpecSchema: Ue
1821
1916
  },
1822
1917
  simpleTextObject: {
1823
1918
  createRequests: (e) => [...e.content === void 0 ? [] : [{
@@ -1836,12 +1931,12 @@ var G = t(), Et = {
1836
1931
  textColor: "setTextColor",
1837
1932
  wordWrap: "setTextWordWrap"
1838
1933
  })],
1839
- schema: s,
1934
+ schema: ue,
1840
1935
  type: "simpleTextObject",
1841
- vSpecSchema: Ve
1936
+ vSpecSchema: Be
1842
1937
  }
1843
1938
  }, Z = async (e, t) => {
1844
- let n = Ft[t], r = E(e);
1939
+ let n = Yt[t], r = T(e);
1845
1940
  if (r) return {
1846
1941
  issues: [{
1847
1942
  code: "invalid_structure",
@@ -1852,7 +1947,7 @@ var G = t(), Et = {
1852
1947
  };
1853
1948
  let i = n.schema.safeParse(e.definition);
1854
1949
  if (!i.success) return {
1855
- issues: C(i.error, e.definition),
1950
+ issues: g(i.error, e.definition),
1856
1951
  success: !1
1857
1952
  };
1858
1953
  let a = n.vSpecSchema.safeParse(e.baseVSpec);
@@ -1860,13 +1955,13 @@ var G = t(), Et = {
1860
1955
  issues: [_("invalid_structure", ["baseVSpec"], `Base ${t} vSpec is invalid.`, { details: { issues: a.error.issues } })],
1861
1956
  success: !1
1862
1957
  };
1863
- let o = x(e, a.data), s = i.data.settings, c = await y(o, n.createRequests(s), ["settings"]);
1958
+ let o = S(e, a.data), s = i.data.settings, c = await y(o, n.createRequests(s), ["settings"]);
1864
1959
  return "issue" in c ? {
1865
1960
  issues: [c.issue],
1866
1961
  success: !1
1867
1962
  } : v(c.state, n.vSpecSchema);
1868
- }, It = async (e) => {
1869
- let t = E(e);
1963
+ }, Xt = async (e) => {
1964
+ let t = T(e);
1870
1965
  if (t) return {
1871
1966
  issues: [{
1872
1967
  code: "invalid_structure",
@@ -1875,35 +1970,40 @@ var G = t(), Et = {
1875
1970
  }],
1876
1971
  success: !1
1877
1972
  };
1878
- let n = u.safeParse(e.definition);
1973
+ let n = h.safeParse(e.definition);
1879
1974
  if (!n.success) return {
1880
- issues: C(n.error, e.definition),
1975
+ issues: g(n.error, e.definition),
1881
1976
  success: !1
1882
1977
  };
1883
- let r = Ie.safeParse(e.baseVSpec);
1978
+ let r = nt.safeParse(e.baseVSpec);
1884
1979
  if (!r.success) return {
1885
1980
  issues: [_("invalid_structure", ["baseVSpec"], "Base date-picker vSpec is invalid.", { details: { issues: r.error.issues } })],
1886
1981
  success: !1
1887
1982
  };
1888
1983
  let i = r.data;
1889
- if (!S(i, ["dimensions", "measures"])) return {
1984
+ if (!C(i, ["dimensions", "measures"])) return {
1890
1985
  issues: [_("non_fresh_base_vspec", ["baseVSpec"], "Date-picker definitions require a fresh vSpec.")],
1891
1986
  success: !1
1892
1987
  };
1893
- let a = n.data, s = [...l(a.data.field, e.availableFields, ["data", "field"], "dimension"), ...o(a.data.field, e.availableFields, ["data", "field"], [
1894
- G.FieldType.DATE,
1895
- G.FieldType.TIMESTAMP,
1896
- G.FieldType.TIMESTAMP_TZ
1988
+ let a = n.data, o = [...ie(a.data.field, e.availableFields, ["data", "field"], "dimension"), ...b(a.data.field, e.availableFields, ["data", "field"], [
1989
+ U.FieldType.DATE,
1990
+ U.FieldType.TIMESTAMP,
1991
+ U.FieldType.TIMESTAMP_TZ
1897
1992
  ], "a date-picker field")];
1898
- if (s.length > 0) return {
1899
- issues: s,
1993
+ if (o.length > 0) return {
1994
+ issues: o,
1900
1995
  success: !1
1901
1996
  };
1902
- let c = await b(x(e, i), a.data.field, "dimension", "addDatePickerDimension", { key: a.data.field.fieldKey }, ["data", "field"]);
1903
- return "issue" in c ? {
1904
- issues: [c.issue],
1997
+ let s = await x(S(e, i), a.data.field, "dimension", "addDatePickerDimension", { key: a.data.field.fieldKey }, ["data", "field"]);
1998
+ if ("issue" in s) return {
1999
+ issues: [s.issue],
1905
2000
  success: !1
1906
- } : (c = await y(c.state, X(a.settings ?? {}, {
2001
+ };
2002
+ let { pickerType: c, ...l } = a.settings ?? {};
2003
+ return s = await y(s.state, X({
2004
+ pickerType: c,
2005
+ ...l
2006
+ }, {
1907
2007
  endDateLabel: "setDatePickerEndDateLabel",
1908
2008
  pickerState: "setDatePickerState",
1909
2009
  pickerType: "setDatePickerType",
@@ -1912,12 +2012,12 @@ var G = t(), Et = {
1912
2012
  startDateLabel: "setDatePickerStartDateLabel",
1913
2013
  timePickerVisibility: "setDatePickerTimePickerVisibility",
1914
2014
  weekStart: "setDatePickerWeekStart"
1915
- }), ["settings"]), "issue" in c ? {
1916
- issues: [c.issue],
2015
+ }), ["settings"]), "issue" in s ? {
2016
+ issues: [s.issue],
1917
2017
  success: !1
1918
- } : v(c.state, Ie));
1919
- }, Lt = async (e) => {
1920
- let t = E(e);
2018
+ } : v(s.state, nt);
2019
+ }, Zt = async (e) => {
2020
+ let t = T(e);
1921
2021
  if (t) return {
1922
2022
  issues: [{
1923
2023
  code: "invalid_structure",
@@ -1926,52 +2026,52 @@ var G = t(), Et = {
1926
2026
  }],
1927
2027
  success: !1
1928
2028
  };
1929
- let n = Ne.safeParse(e.definition);
2029
+ let n = l.safeParse(e.definition);
1930
2030
  if (!n.success) return {
1931
- issues: C(n.error, e.definition),
2031
+ issues: g(n.error, e.definition),
1932
2032
  success: !1
1933
2033
  };
1934
- let r = T.safeParse(e.baseVSpec);
2034
+ let r = Re.safeParse(e.baseVSpec);
1935
2035
  if (!r.success) return {
1936
2036
  issues: [_("invalid_structure", ["baseVSpec"], "Base slider vSpec is invalid.", { details: { issues: r.error.issues } })],
1937
2037
  success: !1
1938
2038
  };
1939
2039
  let i = r.data;
1940
- if (!S(i, ["dimensions", "measures"])) return {
2040
+ if (!C(i, ["dimensions", "measures"])) return {
1941
2041
  issues: [_("non_fresh_base_vspec", ["baseVSpec"], "Slider definitions require a fresh vSpec.")],
1942
2042
  success: !1
1943
2043
  };
1944
- let a = n.data, s = [...l(a.data.field, e.availableFields, ["data", "field"], "dimension"), ...o(a.data.field, e.availableFields, ["data", "field"], [
1945
- G.FieldType.DATE,
1946
- G.FieldType.DECIMAL,
1947
- G.FieldType.FLOAT,
1948
- G.FieldType.INT,
1949
- G.FieldType.REAL,
1950
- G.FieldType.TIMESTAMP,
1951
- G.FieldType.TIMESTAMP_TZ
2044
+ let a = n.data, o = [...ie(a.data.field, e.availableFields, ["data", "field"], "dimension"), ...b(a.data.field, e.availableFields, ["data", "field"], [
2045
+ U.FieldType.DATE,
2046
+ U.FieldType.DECIMAL,
2047
+ U.FieldType.FLOAT,
2048
+ U.FieldType.INT,
2049
+ U.FieldType.REAL,
2050
+ U.FieldType.TIMESTAMP,
2051
+ U.FieldType.TIMESTAMP_TZ
1952
2052
  ], "a slider field")];
1953
- if (s.length > 0) return {
1954
- issues: s,
2053
+ if (o.length > 0) return {
2054
+ issues: o,
1955
2055
  success: !1
1956
2056
  };
1957
- let c = await b(x(e, i), a.data.field, "dimension", "addSliderDimension", { key: a.data.field.fieldKey }, ["data", "field"]);
1958
- if ("issue" in c) return {
1959
- issues: [c.issue],
2057
+ let s = await x(S(e, i), a.data.field, "dimension", "addSliderDimension", { key: a.data.field.fieldKey }, ["data", "field"]);
2058
+ if ("issue" in s) return {
2059
+ issues: [s.issue],
1960
2060
  success: !1
1961
2061
  };
1962
- let u = a.settings ?? {};
1963
- return c = await y(c.state, [...u.range === void 0 ? [] : [{
2062
+ let c = a.settings ?? {};
2063
+ return s = await y(s.state, [...c.range === void 0 ? [] : [{
1964
2064
  name: "setSliderManualRangeEnabled",
1965
2065
  payload: !0
1966
- }], ...X(u, {
2066
+ }], ...X(c, {
1967
2067
  layout: "setSliderLayout",
1968
2068
  quickSelect: "setSliderQuickSelect",
1969
2069
  range: "setSliderRange",
1970
2070
  step: "setSliderStep"
1971
- })], ["settings"]), "issue" in c ? {
1972
- issues: [c.issue],
2071
+ })], ["settings"]), "issue" in s ? {
2072
+ issues: [s.issue],
1973
2073
  success: !1
1974
- } : v(c.state, T);
2074
+ } : v(s.state, Re);
1975
2075
  }, Q = (e) => {
1976
2076
  let t = z(e.type);
1977
2077
  return {
@@ -1984,9 +2084,9 @@ var G = t(), Et = {
1984
2084
  type: e.type,
1985
2085
  version: 1
1986
2086
  };
1987
- }, Rt = [
2087
+ }, Qt = [
1988
2088
  Q({
1989
- compile: It,
2089
+ compile: Xt,
1990
2090
  schema: V["date-picker"],
1991
2091
  type: "date-picker"
1992
2092
  }),
@@ -2016,12 +2116,12 @@ var G = t(), Et = {
2016
2116
  type: "atomic-input"
2017
2117
  }),
2018
2118
  Q({
2019
- compile: Lt,
2119
+ compile: Zt,
2020
2120
  schema: V.slider,
2021
2121
  type: "slider"
2022
2122
  })
2023
- ], $ = z("table"), zt = {
2024
- compile: Ct,
2123
+ ], $ = z("table"), $t = {
2124
+ compile: At,
2025
2125
  documentation: $.documentation,
2026
2126
  examples: [$.example, ...($.additionalExamples ?? []).map(({ definition: e }) => e)],
2027
2127
  jsonSchema: B(V.table, `${$.documentation.title} definition`),
@@ -2029,24 +2129,24 @@ var G = t(), Et = {
2029
2129
  supportedFeatures: $.supportedFeatures,
2030
2130
  type: "table",
2031
2131
  version: 1
2032
- }, Bt = (e, t) => `${t}:${e}`, Vt = [
2033
- Tt,
2034
- wt,
2035
- ...jt,
2036
- ...Rt,
2037
- Nt,
2132
+ }, en = (e, t) => `${t}:${e}`, tn = [
2038
2133
  zt,
2039
- Pt,
2040
- Mt
2041
- ], Ht = new Map(Vt.map((e) => [Bt(e.type, e.version), e])), Ut = (e, t = 1) => Ht.get(Bt(e, t)), Wt = () => [...Ht.values()].map(({ documentation: e, examples: t, jsonSchema: n, supportedFeatures: r, type: i, version: a }) => ({
2134
+ Rt,
2135
+ ...Gt,
2136
+ ...Qt,
2137
+ qt,
2138
+ $t,
2139
+ Jt,
2140
+ Kt
2141
+ ], nn = new Map(tn.map((e) => [en(e.type, e.version), e])), rn = (e, t = 1) => nn.get(en(e, t)), an = () => [...nn.values()].map(({ documentation: e, examples: t, jsonSchema: n, supportedFeatures: r, type: i, version: a }) => ({
2042
2142
  documentation: e,
2043
2143
  examples: t,
2044
2144
  jsonSchema: n,
2045
2145
  supportedFeatures: r,
2046
2146
  type: i,
2047
2147
  version: a
2048
- })), Gt = async (e) => {
2049
- let t = E(e);
2148
+ })), on = async (e) => {
2149
+ let t = T(e);
2050
2150
  if (t) return {
2051
2151
  issues: [{
2052
2152
  code: "invalid_structure",
@@ -2055,14 +2155,14 @@ var G = t(), Et = {
2055
2155
  }],
2056
2156
  success: !1
2057
2157
  };
2058
- let n = gt(e.definition);
2158
+ let n = Ct(e.definition);
2059
2159
  if (n) return {
2060
2160
  issues: [n],
2061
2161
  success: !1
2062
2162
  };
2063
- let r = e.definition, i = Ut(r.type, r.version), a = k.array(ge).safeParse(e.availableFields);
2163
+ let r = e.definition, i = rn(r.type, r.version), a = D.array(De).safeParse(e.availableFields);
2064
2164
  if (!a.success) return {
2065
- issues: C(a.error, e.availableFields, ["availableFields"]),
2165
+ issues: g(a.error, e.availableFields, ["availableFields"]),
2066
2166
  success: !1
2067
2167
  };
2068
2168
  let o = /* @__PURE__ */ new Map(), s = a.data.flatMap((e, t) => {
@@ -2082,11 +2182,12 @@ var G = t(), Et = {
2082
2182
  issues: s,
2083
2183
  success: !1
2084
2184
  };
2085
- let c = te(a.data), l = k.array(et).safeParse(c);
2086
- return l.success ? i ? i.compile({
2087
- ...e,
2088
- availableFields: a.data
2089
- }) : {
2185
+ let c = re(a.data), l = D.array(it).safeParse(c);
2186
+ if (!l.success) return {
2187
+ issues: g(l.error, c, ["availableFields"]),
2188
+ success: !1
2189
+ };
2190
+ if (!i) return {
2090
2191
  issues: [{
2091
2192
  allowedValues: H(),
2092
2193
  code: "unsupported_visualization",
@@ -2094,9 +2195,16 @@ var G = t(), Et = {
2094
2195
  path: ["type"]
2095
2196
  }],
2096
2197
  success: !1
2097
- } : {
2098
- issues: C(l.error, c, ["availableFields"]),
2099
- success: !1
2100
2198
  };
2199
+ let u = await i.compile({
2200
+ ...e,
2201
+ availableFields: a.data
2202
+ });
2203
+ if (!u.success) return u;
2204
+ let d = Lt(r, a.data);
2205
+ return d.length > 0 ? {
2206
+ ...u,
2207
+ warnings: d
2208
+ } : u;
2101
2209
  };
2102
- export { _t as i, Ut as n, Wt as r, Gt as t };
2210
+ export { wt as i, rn as n, an as r, on as t };