@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,25 +1,22 @@
1
- import { La as e, Xs as t, Ya as n, ds as r } from "./interfaces-VUY4_yVO.js";
2
- import { hn as i } from "./event-bus-KiSiCJrC.js";
3
- import { t as a } from "./gauge-target-type-BkKXAqkX.js";
4
- import { Au as o, Dd as s, Kd as c, Lu as l, Mu as u, Od as d, Pd as ee, Pu as te, Sd as ne, _d as re, ad as ie, bd as ae, cd as oe, dd as se, fd as ce, jd as f, kd as le, nd as ue, td as de, ud as fe, yd as pe } from "./src-Dun_jXtz.js";
5
- import { C as me, S as p, _ as m, b as he, f as ge, v as _e, x as ve } from "./src-C0LgoUWY.js";
6
- import { $ as ye, A as be, B as xe, C as Se, F as Ce, G as we, H as Te, I as Ee, J as De, K as Oe, L as h, M as ke, N as Ae, P as je, Q as Me, R as Ne, S as Pe, U as g, V as Fe, W as Ie, X as Le, Y as Re, Z as ze, _ as Be, a as Ve, c as He, d as _, et as Ue, f as We, g as v, h as y, i as Ge, j as b, k as Ke, n as qe, nt as Je, o as Ye, q as Xe, r as Ze, rt as Qe, s as $e, t as x, tt as et, u as S, v as C, w, x as tt, y as T, z as E } from "./shared-CKDL4hx9.js";
7
- import { a as nt, i as D, o as O, r as rt, t as it } from "./data-item-resolution-1lvYB5ln.js";
8
- import { z as k } from "zod";
9
- var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).compileAppFilterBarVisualizationDefinition(e), ot = async (e) => (await import("./bar.compiler-oqaPzIut.js")).compileBarVisualizationDefinition(e), st = async (e) => (await import("./filter.compiler-CuLtc_02.js")).compileFilterVisualizationDefinition(e), ct = async (e) => (await import("./line.compiler-BpA_6Tc7.js")).compileLineVisualizationDefinition(e), lt = async (e) => (await import("./number.compiler-DbkWcG4S.js")).compileNumberVisualizationDefinition(e), ut = async (e) => (await import("./table.compiler-BrXkm4Fz.js")).compileTableVisualizationDefinition(e), dt = (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 = {
10
8
  horsepower: "[Cars].[Horsepower]",
11
9
  latestLaunch: "[Cars].[Latest Launch]",
12
10
  manufacturer: "[Cars].[Manufacturer]",
13
11
  model: "[Cars].[Model]",
14
12
  sales: "[Cars].[Sales In Thousands]"
15
- }, j = (e, t) => ({
13
+ }, k = (e, t) => ({
16
14
  fieldKey: t,
17
- format: { formatType: "none" },
18
15
  ref: e
19
- }), M = (e, t) => ({
16
+ }), A = (e, t) => ({
20
17
  fieldKey: t,
21
18
  ref: e
22
- }), N = (e, t = A.sales, n = "SUM") => ({
19
+ }), j = (e, t = O.sales, n = "SUM") => ({
23
20
  aggregation: n,
24
21
  fieldKey: t,
25
22
  format: {
@@ -27,9 +24,9 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
27
24
  negativeType: "parenthesis"
28
25
  },
29
26
  ref: e
30
- }), P = {
27
+ }), M = {
31
28
  filters: [{
32
- fieldKey: A.manufacturer,
29
+ fieldKey: O.manufacturer,
33
30
  operator: "inList",
34
31
  values: [
35
32
  "Acura",
@@ -38,11 +35,18 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
38
35
  ]
39
36
  }],
40
37
  operator: "and"
41
- }, F = {
38
+ }, pt = {
39
+ fieldKey: O.latestLaunch,
40
+ ref: "launchMonth",
41
+ temporalGrouping: {
42
+ dateLevel: "month",
43
+ mode: "level"
44
+ }
45
+ }, N = {
42
46
  position: "right",
43
47
  title: "Cars comparison",
44
48
  visible: !0
45
- }, I = {
49
+ }, P = {
46
50
  dimension: {
47
51
  labelsVisible: !0,
48
52
  title: "Manufacturer",
@@ -58,7 +62,7 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
58
62
  title: "Horsepower",
59
63
  titleVisible: !0
60
64
  }
61
- }, ft = {
65
+ }, mt = {
62
66
  dimension: {
63
67
  labelsVisible: !0,
64
68
  title: "Manufacturer",
@@ -74,7 +78,7 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
74
78
  title: "Model",
75
79
  titleVisible: !0
76
80
  }
77
- }, pt = {
81
+ }, ht = {
78
82
  dimension: {
79
83
  labelsVisible: !0,
80
84
  title: "Manufacturer",
@@ -85,7 +89,7 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
85
89
  title: "Sales",
86
90
  titleVisible: !0
87
91
  }
88
- }, mt = {
92
+ }, gt = {
89
93
  dimension: {
90
94
  labelsVisible: !0,
91
95
  title: "Horsepower",
@@ -96,7 +100,7 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
96
100
  title: "Count",
97
101
  titleVisible: !0
98
102
  }
99
- }, ht = {
103
+ }, _t = {
100
104
  primaryMeasure: {
101
105
  labelsVisible: !0,
102
106
  title: "Sales",
@@ -107,7 +111,7 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
107
111
  title: "Horsepower",
108
112
  titleVisible: !0
109
113
  }
110
- }, gt = {
114
+ }, vt = {
111
115
  dimension: {
112
116
  labelsVisible: !0,
113
117
  title: "Measure",
@@ -118,18 +122,18 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
118
122
  title: "Value",
119
123
  titleVisible: !0
120
124
  }
121
- }, 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 = [
122
126
  "dimensions",
123
127
  "filters",
124
128
  "measures",
125
129
  "value-formatting"
126
- ], _t = dt([
130
+ ], bt = ft([
127
131
  {
128
132
  additionalExamples: [{
129
133
  definition: {
130
134
  data: {
131
- dimensions: [j("manufacturer", A.manufacturer)],
132
- measures: [N("sales")]
135
+ dimensions: [k("manufacturer", O.manufacturer)],
136
+ measures: [j("sales")]
133
137
  },
134
138
  presentation: { coloring: {
135
139
  overwrites: [{
@@ -157,8 +161,8 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
157
161
  "Sorting and Top N refer to definition-local refs, not generated data-item IDs.",
158
162
  "Every dimension and measure must resolve to an available field with a compatible role.",
159
163
  "Set axis per measure to plot it against the primary or the secondary measure axis.",
160
- L,
161
- "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,
162
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."
163
167
  ],
164
168
  dataRequirements: ["At least one dimension.", "At least one measure."],
@@ -168,18 +172,18 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
168
172
  example: {
169
173
  data: {
170
174
  dimensions: [{
171
- ...j("manufacturer", A.manufacturer),
175
+ ...k("manufacturer", O.manufacturer),
172
176
  showNullValues: !1
173
177
  }],
174
178
  measures: [{
175
- ...N("sales"),
179
+ ...j("sales"),
176
180
  dataLabels: {
177
181
  placements: ["outside", "inside"],
178
182
  visible: !0
179
183
  }
180
184
  }]
181
185
  },
182
- filterGroup: P,
186
+ filterGroup: M,
183
187
  limiting: {
184
188
  queryLimit: 100,
185
189
  topN: {
@@ -191,9 +195,9 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
191
195
  },
192
196
  presentation: {
193
197
  axes: {
194
- ...I,
198
+ ...P,
195
199
  primaryMeasure: {
196
- ...I.primaryMeasure,
200
+ ...P.primaryMeasure,
197
201
  bands: [{
198
202
  color: "#E6E6E6",
199
203
  end: 15e4,
@@ -202,7 +206,7 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
202
206
  }]
203
207
  }
204
208
  },
205
- legend: F,
209
+ legend: N,
206
210
  orientation: "vertical"
207
211
  },
208
212
  sorting: [{
@@ -240,8 +244,8 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
240
244
  "Data labels apply only to bar series.",
241
245
  "Sorting refers to definition-local refs, not generated data-item IDs.",
242
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.",
243
- L,
244
- "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,
245
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."
246
250
  ],
247
251
  dataRequirements: ["Exactly one dimension.", "Between one and ten measures."],
@@ -250,23 +254,23 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
250
254
  },
251
255
  example: {
252
256
  data: {
253
- dimensions: [j("manufacturer", A.manufacturer)],
257
+ dimensions: [k("manufacturer", O.manufacturer)],
254
258
  measures: [{
255
- ...N("sales"),
259
+ ...j("sales"),
256
260
  dataLabels: { visible: !0 },
257
261
  seriesType: "bar"
258
262
  }, {
259
- ...N("horsepower", A.horsepower, "AVG"),
263
+ ...j("horsepower", O.horsepower, "AVG"),
260
264
  axis: "secondary",
261
265
  seriesType: "line"
262
266
  }]
263
267
  },
264
- filterGroup: P,
268
+ filterGroup: M,
265
269
  limiting: { queryLimit: 100 },
266
270
  presentation: {
267
- axes: pt,
271
+ axes: ht,
268
272
  dataLabels: { visible: !0 },
269
- legend: F,
273
+ legend: N,
270
274
  orientation: "vertical"
271
275
  },
272
276
  sorting: [{
@@ -301,13 +305,13 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
301
305
  },
302
306
  example: {
303
307
  data: {
304
- dimensions: [j("manufacturer", A.manufacturer)],
305
- measures: [N("sales"), N("averageSales", A.sales, "AVG")]
308
+ dimensions: [k("manufacturer", O.manufacturer)],
309
+ measures: [j("sales"), j("averageSales", O.sales, "AVG")]
306
310
  },
307
- filterGroup: P,
311
+ filterGroup: M,
308
312
  presentation: {
309
313
  displayMode: "bar",
310
- legend: F
314
+ legend: N
311
315
  },
312
316
  type: "distribution-gauge",
313
317
  version: 1
@@ -322,20 +326,20 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
322
326
  },
323
327
  {
324
328
  documentation: {
325
- 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],
326
330
  dataRequirements: ["Exactly two dimensions.", "Exactly one measure."],
327
331
  summary: "Dot comparison using two categorical dimensions and one measure.",
328
332
  title: "Dot chart"
329
333
  },
330
334
  example: {
331
335
  data: {
332
- dimensions: [j("manufacturer", A.manufacturer), j("model", A.model)],
333
- measures: [N("sales")]
336
+ dimensions: [k("manufacturer", O.manufacturer), k("model", O.model)],
337
+ measures: [j("sales")]
334
338
  },
335
- filterGroup: P,
339
+ filterGroup: M,
336
340
  presentation: {
337
- axes: pt,
338
- legend: F,
341
+ axes: ht,
342
+ legend: N,
339
343
  orientation: "horizontal"
340
344
  },
341
345
  type: "dot",
@@ -364,13 +368,13 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
364
368
  },
365
369
  example: {
366
370
  data: {
367
- dimensions: [j("manufacturer", A.manufacturer)],
368
- measures: [N("sales"), N("targetSales", A.sales, "AVG")]
371
+ dimensions: [k("manufacturer", O.manufacturer)],
372
+ measures: [j("sales"), j("targetSales", O.sales, "AVG")]
369
373
  },
370
- filterGroup: P,
374
+ filterGroup: M,
371
375
  presentation: {
372
376
  displayMode: "radial",
373
- legend: F
377
+ legend: N
374
378
  },
375
379
  type: "gauge",
376
380
  version: 1
@@ -392,14 +396,14 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
392
396
  },
393
397
  example: {
394
398
  data: {
395
- dimensions: [j("manufacturer", A.manufacturer), j("model", A.model)],
396
- 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")]
397
401
  },
398
- filterGroup: P,
402
+ filterGroup: M,
399
403
  limiting: { queryLimit: 100 },
400
404
  presentation: {
401
- axes: ft,
402
- legend: F
405
+ axes: mt,
406
+ legend: N
403
407
  },
404
408
  sorting: [{
405
409
  by: "sales",
@@ -422,19 +426,19 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
422
426
  documentation: {
423
427
  constraints: [
424
428
  "The compiler creates the canonical generated count measure; callers do not provide measures.",
425
- L,
426
- "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
427
431
  ],
428
432
  dataRequirements: ["Exactly one numeric dimension.", "No caller-supplied measures."],
429
433
  summary: "Distribution of a numeric field into generated bins and counts.",
430
434
  title: "Histogram"
431
435
  },
432
436
  example: {
433
- data: { dimensions: [j("horsepower", A.horsepower)] },
434
- filterGroup: P,
437
+ data: { dimensions: [k("horsepower", O.horsepower)] },
438
+ filterGroup: M,
435
439
  presentation: {
436
- axes: mt,
437
- legend: F,
440
+ axes: gt,
441
+ legend: N,
438
442
  orientation: "vertical"
439
443
  },
440
444
  type: "histogram",
@@ -456,9 +460,9 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
456
460
  additionalExamples: [{
457
461
  definition: {
458
462
  data: {
459
- dimensions: [j("manufacturer", A.manufacturer)],
463
+ dimensions: [k("manufacturer", O.manufacturer)],
460
464
  measures: [{
461
- ...N("sales"),
465
+ ...j("sales"),
462
466
  dataPointShape: "circle"
463
467
  }]
464
468
  },
@@ -477,9 +481,9 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
477
481
  }, {
478
482
  definition: {
479
483
  data: {
480
- dimensions: [j("manufacturer", A.manufacturer), j("model", A.model)],
484
+ dimensions: [k("manufacturer", O.manufacturer), k("model", O.model)],
481
485
  measures: [{
482
- ...N("sales"),
486
+ ...j("sales"),
483
487
  dataPointShape: "circle"
484
488
  }]
485
489
  },
@@ -497,10 +501,11 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
497
501
  constraints: [
498
502
  "Each measure may select the primary or secondary axis using its axis property.",
499
503
  "Visible data labels require dataPointShape on every measure.",
500
- L,
501
- "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,
502
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.",
503
- "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."
504
509
  ],
505
510
  dataRequirements: ["At least one dimension.", "At least one measure."],
506
511
  summary: "Trend chart with sorting, query limiting, dual measure axes, labels, legend, and orientation.",
@@ -508,31 +513,37 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
508
513
  },
509
514
  example: {
510
515
  data: {
511
- dimensions: [j("manufacturer", A.manufacturer)],
516
+ dimensions: [pt],
512
517
  measures: [{
513
- ...N("sales"),
518
+ ...j("sales"),
514
519
  axis: "primary",
515
520
  dataPointShape: "circle"
516
521
  }, {
517
- ...N("horsepower", A.horsepower, "AVG"),
522
+ ...j("horsepower", O.horsepower, "AVG"),
518
523
  axis: "secondary",
519
524
  dataPointShape: "square"
520
525
  }]
521
526
  },
522
- filterGroup: P,
527
+ filterGroup: M,
523
528
  limiting: { queryLimit: 100 },
524
529
  presentation: {
525
- axes: I,
530
+ axes: {
531
+ ...P,
532
+ dimension: {
533
+ ...P.dimension,
534
+ title: "Launch month"
535
+ }
536
+ },
526
537
  dataLabels: {
527
538
  density: "medium",
528
539
  visible: !0
529
540
  },
530
- legend: F,
541
+ legend: N,
531
542
  orientation: "vertical"
532
543
  },
533
544
  sorting: [{
534
- by: "sales",
535
- direction: "desc"
545
+ by: "launchMonth",
546
+ direction: "asc"
536
547
  }],
537
548
  type: "line",
538
549
  version: 1
@@ -570,11 +581,11 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
570
581
  },
571
582
  example: {
572
583
  data: {
573
- dimensions: [j("manufacturer", A.manufacturer)],
574
- measures: [N("sales")]
584
+ dimensions: [k("manufacturer", O.manufacturer)],
585
+ measures: [j("sales")]
575
586
  },
576
- filterGroup: P,
577
- presentation: { legend: F },
587
+ filterGroup: M,
588
+ presentation: { legend: N },
578
589
  type: "radar",
579
590
  version: 1
580
591
  },
@@ -589,8 +600,8 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
589
600
  additionalExamples: [{
590
601
  definition: {
591
602
  data: {
592
- dimensions: [j("manufacturer", A.manufacturer)],
593
- measures: [N("sales")]
603
+ dimensions: [k("manufacturer", O.manufacturer)],
604
+ measures: [j("sales")]
594
605
  },
595
606
  presentation: { coloring: { overwrites: [
596
607
  {
@@ -619,12 +630,12 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
619
630
  },
620
631
  example: {
621
632
  data: {
622
- dimensions: [j("manufacturer", A.manufacturer)],
623
- measures: [N("sales")]
633
+ dimensions: [k("manufacturer", O.manufacturer)],
634
+ measures: [j("sales")]
624
635
  },
625
- filterGroup: P,
636
+ filterGroup: M,
626
637
  limiting: { queryLimit: 100 },
627
- presentation: { legend: F },
638
+ presentation: { legend: N },
628
639
  sorting: [{
629
640
  by: "sales",
630
641
  direction: "desc"
@@ -650,10 +661,10 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
650
661
  },
651
662
  example: {
652
663
  data: {
653
- dimensions: [j("manufacturer", A.manufacturer), j("model", A.model)],
654
- measures: [N("sales")]
664
+ dimensions: [k("manufacturer", O.manufacturer), k("model", O.model)],
665
+ measures: [j("sales")]
655
666
  },
656
- filterGroup: P,
667
+ filterGroup: M,
657
668
  limiting: { queryLimit: 100 },
658
669
  presentation: { layout: {
659
670
  compact: !0,
@@ -685,11 +696,11 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
685
696
  },
686
697
  example: {
687
698
  data: {
688
- dimensions: [j("manufacturer", A.manufacturer), j("model", A.model)],
689
- measures: [N("sales")]
699
+ dimensions: [k("manufacturer", O.manufacturer), k("model", O.model)],
700
+ measures: [j("sales")]
690
701
  },
691
- filterGroup: P,
692
- presentation: { legend: F },
702
+ filterGroup: M,
703
+ presentation: { legend: N },
693
704
  type: "treemap",
694
705
  version: 1
695
706
  },
@@ -704,8 +715,8 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
704
715
  additionalExamples: [{
705
716
  definition: {
706
717
  data: {
707
- dimensions: [j("manufacturer", A.manufacturer), j("model", A.model)],
708
- measures: [N("sales")]
718
+ dimensions: [k("manufacturer", O.manufacturer), k("model", O.model)],
719
+ measures: [j("sales")]
709
720
  },
710
721
  presentation: { coloring: { overwrites: [{
711
722
  color: "#CA8A04",
@@ -725,10 +736,10 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
725
736
  },
726
737
  example: {
727
738
  data: {
728
- dimensions: [j("manufacturer", A.manufacturer), j("model", A.model)],
729
- measures: [N("sales")]
739
+ dimensions: [k("manufacturer", O.manufacturer), k("model", O.model)],
740
+ measures: [j("sales")]
730
741
  },
731
- filterGroup: P,
742
+ filterGroup: M,
732
743
  type: "sankey",
733
744
  version: 1
734
745
  },
@@ -742,7 +753,7 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
742
753
  "The optional second dimension receives the image role.",
743
754
  "Roles come from item order only; a ref is a label and does not select a role.",
744
755
  "With a size measure, points scale between the setPointSize and setMaxPointSize operation values.",
745
- "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
746
757
  ],
747
758
  dataRequirements: ["One or two dimensions.", "Two or three measures."],
748
759
  summary: "Relationship chart using horizontal and vertical measures with optional size and image roles.",
@@ -750,17 +761,17 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
750
761
  },
751
762
  example: {
752
763
  data: {
753
- dimensions: [j("manufacturer", A.manufacturer)],
764
+ dimensions: [k("manufacturer", O.manufacturer)],
754
765
  measures: [
755
- N("sales"),
756
- N("horsepower", A.horsepower, "AVG"),
757
- N("size", A.sales, "AVG")
766
+ j("sales"),
767
+ j("horsepower", O.horsepower, "AVG"),
768
+ j("size", O.sales, "AVG")
758
769
  ]
759
770
  },
760
- filterGroup: P,
771
+ filterGroup: M,
761
772
  presentation: {
762
- axes: ht,
763
- legend: F
773
+ axes: _t,
774
+ legend: N
764
775
  },
765
776
  type: "scatter",
766
777
  version: 1
@@ -780,11 +791,11 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
780
791
  additionalExamples: [{
781
792
  definition: {
782
793
  data: {
783
- dimensions: [j("manufacturer", A.manufacturer), j("model", A.model)],
784
- measures: [N("sales")],
794
+ dimensions: [k("manufacturer", O.manufacturer), k("model", O.model)],
795
+ measures: [j("sales")],
785
796
  structure: "expandable"
786
797
  },
787
- filterGroup: P,
798
+ filterGroup: M,
788
799
  limiting: { queryLimit: 100 },
789
800
  sorting: [{
790
801
  by: "sales",
@@ -797,12 +808,12 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
797
808
  }, {
798
809
  definition: {
799
810
  data: {
800
- columnDimensions: [j("model", A.model)],
801
- measures: [N("sales")],
802
- rowDimensions: [j("manufacturer", A.manufacturer)],
811
+ columnDimensions: [k("model", O.model)],
812
+ measures: [j("sales")],
813
+ rowDimensions: [k("manufacturer", O.manufacturer)],
803
814
  structure: "pivot"
804
815
  },
805
- filterGroup: P,
816
+ filterGroup: M,
806
817
  limiting: { queryLimit: 100 },
807
818
  sorting: [{
808
819
  by: "sales",
@@ -834,21 +845,26 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
834
845
  data: {
835
846
  columns: [
836
847
  {
837
- ...j("manufacturer", A.manufacturer),
848
+ ...k("manufacturer", O.manufacturer),
849
+ role: "dimension"
850
+ },
851
+ {
852
+ ...k("model", O.model),
838
853
  role: "dimension"
839
854
  },
840
855
  {
841
- ...j("model", A.model),
856
+ ...k("latestLaunch", O.latestLaunch),
857
+ format: { formatType: "ddmmmyyyy" },
842
858
  role: "dimension"
843
859
  },
844
860
  {
845
- ...N("sales"),
861
+ ...j("sales"),
846
862
  role: "measure"
847
863
  }
848
864
  ],
849
865
  structure: "normal"
850
866
  },
851
- filterGroup: P,
867
+ filterGroup: M,
852
868
  limiting: { queryLimit: 100 },
853
869
  presentation: {
854
870
  background: {
@@ -923,8 +939,8 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
923
939
  documentation: {
924
940
  constraints: [
925
941
  "Dimensions are not supported. Measure order defines the waterfall sequence.",
926
- "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.",
927
- L
942
+ L,
943
+ F
928
944
  ],
929
945
  dataRequirements: ["Between one and one hundred measures."],
930
946
  summary: "Sequential contribution chart composed from one or more measures.",
@@ -932,15 +948,15 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
932
948
  },
933
949
  example: {
934
950
  data: { measures: [{
935
- ...N("sales"),
951
+ ...j("sales"),
936
952
  dataLabels: { visible: !0 }
937
953
  }, {
938
- ...N("horsepower", A.horsepower, "AVG"),
954
+ ...j("horsepower", O.horsepower, "AVG"),
939
955
  dataLabels: { visible: !0 }
940
956
  }] },
941
- filterGroup: P,
957
+ filterGroup: M,
942
958
  presentation: {
943
- axes: gt,
959
+ axes: vt,
944
960
  dataLabels: { visible: !0 },
945
961
  orientation: "vertical"
946
962
  },
@@ -968,10 +984,10 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
968
984
  },
969
985
  example: {
970
986
  data: {
971
- dimensions: [j("manufacturer", A.manufacturer)],
972
- measures: [N("sales")]
987
+ dimensions: [k("manufacturer", O.manufacturer)],
988
+ measures: [j("sales")]
973
989
  },
974
- filterGroup: P,
990
+ filterGroup: M,
975
991
  type: "word-cloud",
976
992
  version: 1
977
993
  },
@@ -980,19 +996,18 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
980
996
  },
981
997
  {
982
998
  documentation: {
983
- 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."],
984
1000
  dataRequirements: ["Exactly one field."],
985
1001
  summary: "Date selection control with single/range modes, labels, quick select, and responsive settings.",
986
1002
  title: "Date picker"
987
1003
  },
988
1004
  example: {
989
- data: { field: M("latestLaunch", A.latestLaunch) },
1005
+ data: { field: A("latestLaunch", O.latestLaunch) },
990
1006
  settings: {
991
1007
  endDateLabel: "To",
992
1008
  pickerState: "expanded",
993
1009
  pickerType: "range",
994
1010
  quickSelect: !0,
995
- responsive: !0,
996
1011
  startDateLabel: "From",
997
1012
  timePickerVisibility: "never",
998
1013
  weekStart: "1"
@@ -1011,11 +1026,10 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
1011
1026
  title: "Filter"
1012
1027
  },
1013
1028
  example: {
1014
- data: { field: M("manufacturer", A.manufacturer) },
1029
+ data: { field: A("manufacturer", O.manufacturer) },
1015
1030
  presentation: {
1016
1031
  mode: "listbox",
1017
1032
  quickSelect: !0,
1018
- responsive: !0,
1019
1033
  searchable: !0,
1020
1034
  showProgressBar: !1
1021
1035
  },
@@ -1066,15 +1080,39 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
1066
1080
  type: "image"
1067
1081
  },
1068
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
+ }],
1069
1103
  documentation: {
1070
- 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
+ ],
1071
1109
  dataRequirements: ["Exactly one measure."],
1072
1110
  summary: "Single aggregated or semantic value with value formatting and static filters.",
1073
1111
  title: "Number"
1074
1112
  },
1075
1113
  example: {
1076
- data: { measure: N("sales") },
1077
- filterGroup: P,
1114
+ data: { measure: j("sales") },
1115
+ filterGroup: M,
1078
1116
  type: "number",
1079
1117
  version: 1
1080
1118
  },
@@ -1197,7 +1235,7 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
1197
1235
  title: "Slider"
1198
1236
  },
1199
1237
  example: {
1200
- data: { field: M("horsepower", A.horsepower) },
1238
+ data: { field: A("horsepower", O.horsepower) },
1201
1239
  settings: {
1202
1240
  layout: "multi",
1203
1241
  quickSelect: !0,
@@ -1214,134 +1252,269 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
1214
1252
  type: "slider"
1215
1253
  }
1216
1254
  ]), z = (e) => {
1217
- let t = _t.find((t) => t.type === e);
1255
+ let t = bt.find((t) => t.type === e);
1218
1256
  if (!t) throw Error(`Missing visualization definition documentation for ${e}`);
1219
1257
  return t;
1220
- }, B = (e, t) => k.toJSONSchema(e.meta({ title: t }), {
1258
+ }, B = (e, t) => D.toJSONSchema(e.meta({ title: t }), {
1221
1259
  reused: "inline",
1222
1260
  target: "draft-2020-12"
1223
- }), V = z("bar"), vt = {
1224
- compile: ot,
1225
- documentation: V.documentation,
1226
- examples: [V.example, ...(V.additionalExamples ?? []).map(({ definition: e }) => e)],
1227
- jsonSchema: B(Je, `${V.documentation.title} definition`),
1228
- schema: Je,
1229
- supportedFeatures: V.supportedFeatures,
1261
+ }), V = {
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);
1291
+ if (t) return {
1292
+ code: "invalid_structure",
1293
+ message: t,
1294
+ path: []
1295
+ };
1296
+ if (typeof e != "object" || !e || Array.isArray(e)) return {
1297
+ code: "invalid_structure",
1298
+ message: "Visualization definition must be an object.",
1299
+ path: []
1300
+ };
1301
+ let n = "version" in e ? e.version : void 0;
1302
+ if (n !== 1) return {
1303
+ allowedValues: [1],
1304
+ code: "unsupported_version",
1305
+ message: `Visualization definition version "${String(n)}" is not supported.`,
1306
+ path: ["version"]
1307
+ };
1308
+ let r = "type" in e ? e.type : void 0;
1309
+ if (!(typeof r == "string" && St(r, n))) return {
1310
+ allowedValues: H(),
1311
+ code: "unsupported_visualization",
1312
+ message: `Visualization type "${String(r)}" is not supported.`,
1313
+ path: ["type"]
1314
+ };
1315
+ }, wt = (e) => {
1316
+ let t = Ct(e);
1317
+ if (t) return {
1318
+ issues: [t],
1319
+ success: !1
1320
+ };
1321
+ let n = St(e.type, e.version);
1322
+ if (!n) return {
1323
+ issues: [{
1324
+ allowedValues: H(),
1325
+ code: "unsupported_visualization",
1326
+ message: "Visualization definition descriptor is not available.",
1327
+ path: ["type"]
1328
+ }],
1329
+ success: !1
1330
+ };
1331
+ let r = n.safeParse(e);
1332
+ return r.success ? {
1333
+ definition: r.data,
1334
+ issues: [],
1335
+ success: !0
1336
+ } : {
1337
+ issues: g(r.error, e),
1338
+ success: !1
1339
+ };
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`),
1399
+ schema: V.bar,
1400
+ supportedFeatures: W.supportedFeatures,
1230
1401
  type: "bar",
1231
1402
  version: 1
1232
- }, H = z("astrato-app-filter-bar"), yt = {
1233
- compile: at,
1234
- documentation: H.documentation,
1235
- examples: [H.example],
1236
- jsonSchema: B(xe, `${H.documentation.title} definition`),
1237
- schema: xe,
1238
- supportedFeatures: H.supportedFeatures,
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`),
1408
+ schema: V["astrato-app-filter-bar"],
1409
+ supportedFeatures: G.supportedFeatures,
1239
1410
  type: "astrato-app-filter-bar",
1240
1411
  version: 1
1241
- }, U = r(), bt = {
1412
+ };
1413
+ a();
1414
+ var Bt = {
1242
1415
  combo: {
1243
1416
  coloringType: t.PerEachMeasure,
1244
1417
  queryLimit: !0,
1245
- schema: Te,
1418
+ schema: p,
1246
1419
  sorting: !0,
1247
1420
  type: "combo",
1248
- vSpecSchema: ee
1421
+ vSpecSchema: tt
1249
1422
  },
1250
1423
  "distribution-gauge": {
1251
1424
  coloringType: t.PerEachMeasure,
1252
1425
  measureRole: () => e.GAUGE_VALUE,
1253
- schema: g,
1426
+ schema: te,
1254
1427
  type: "distribution-gauge",
1255
- vSpecSchema: d
1428
+ vSpecSchema: $e
1256
1429
  },
1257
1430
  dot: {
1258
1431
  coloringType: t.Categorical,
1259
- schema: Ie,
1432
+ schema: Oe,
1260
1433
  type: "dot",
1261
- vSpecSchema: s
1434
+ vSpecSchema: We
1262
1435
  },
1263
1436
  gauge: {
1264
1437
  coloringType: (e) => (e.data.dimensions?.length ?? 0) > 0 ? t.Categorical : t.PerEachMeasure,
1265
1438
  measureRole: (t, n) => (n.data.dimensions?.length ?? 0) > 0 && t === 1 ? e.GAUGE_TARGET : e.GAUGE_VALUE,
1266
- schema: we,
1439
+ schema: ee,
1267
1440
  type: "gauge",
1268
- vSpecSchema: le
1441
+ vSpecSchema: rt
1269
1442
  },
1270
1443
  heatMap: {
1271
1444
  coloringType: t.Gradient,
1272
- dimensionRole: (e) => e === 0 ? n.HEAT_MAP_HORIZONTAL : n.HEAT_MAP_VERTICAL,
1445
+ dimensionRole: (e) => e === 0 ? r.HEAT_MAP_HORIZONTAL : r.HEAT_MAP_VERTICAL,
1273
1446
  measureRole: (t) => t === 0 ? e.HEAT_MAP_COLOR : e.HEAT_MAP_SIZE,
1274
1447
  queryLimit: !0,
1275
- schema: Oe,
1448
+ schema: pe,
1276
1449
  sorting: !0,
1277
1450
  type: "heatMap",
1278
- vSpecSchema: ne
1451
+ vSpecSchema: qe
1279
1452
  },
1280
1453
  histogram: {
1281
1454
  coloringType: t.Single,
1282
- schema: Xe,
1455
+ schema: fe,
1283
1456
  type: "histogram",
1284
- vSpecSchema: ae
1457
+ vSpecSchema: Qe
1285
1458
  },
1286
1459
  pie: {
1287
1460
  coloringType: t.Categorical,
1288
1461
  measureRole: (t) => t === 0 ? e.PIE_CHART_SLICE : e.PIE_CHART_LENGTH,
1289
1462
  queryLimit: !0,
1290
- schema: De,
1463
+ schema: me,
1291
1464
  sorting: !0,
1292
1465
  type: "pie",
1293
- vSpecSchema: ce
1466
+ vSpecSchema: Ye
1294
1467
  },
1295
1468
  radar: {
1296
1469
  conditionalColoringFallbackType: t.Single,
1297
- schema: Re,
1470
+ schema: oe,
1298
1471
  type: "radar",
1299
- vSpecSchema: se
1472
+ vSpecSchema: Ze
1300
1473
  },
1301
1474
  sankey: {
1302
- schema: Le,
1475
+ schema: s,
1303
1476
  type: "sankey",
1304
- vSpecSchema: fe
1477
+ vSpecSchema: Ke
1305
1478
  },
1306
1479
  scatter: {
1307
1480
  coloringType: t.Categorical,
1308
- dimensionRole: (e) => e === 0 ? n.SCATTER_DIMENSION : n.SCATTER_IMAGE,
1481
+ dimensionRole: (e) => e === 0 ? r.SCATTER_DIMENSION : r.SCATTER_IMAGE,
1309
1482
  measureRole: (t) => [
1310
1483
  e.SCATTER_HORIZONTAL,
1311
1484
  e.SCATTER_VERTICAL,
1312
1485
  e.SCATTER_SIZE
1313
1486
  ][t],
1314
1487
  queryLimit: !0,
1315
- schema: ze,
1488
+ schema: ye,
1316
1489
  sorting: !0,
1317
1490
  type: "scatter",
1318
- vSpecSchema: oe
1491
+ vSpecSchema: Ve
1319
1492
  },
1320
1493
  tree: {
1321
1494
  queryLimit: !0,
1322
- schema: Me,
1495
+ schema: Ne,
1323
1496
  sorting: !0,
1324
1497
  type: "tree",
1325
- vSpecSchema: l
1498
+ vSpecSchema: Le
1326
1499
  },
1327
1500
  treemap: {
1328
- schema: ye,
1501
+ schema: Te,
1329
1502
  type: "treemap",
1330
- vSpecSchema: te
1503
+ vSpecSchema: et
1331
1504
  },
1332
1505
  waterfall: {
1333
- schema: Ue,
1506
+ schema: Ae,
1334
1507
  type: "waterfall",
1335
- vSpecSchema: u
1508
+ vSpecSchema: He
1336
1509
  },
1337
1510
  "word-cloud": {
1338
1511
  conditionalColoringFallbackType: t.Single,
1339
- schema: et,
1512
+ schema: Se,
1340
1513
  type: "word-cloud",
1341
- vSpecSchema: o
1514
+ vSpecSchema: Ge
1342
1515
  }
1343
- }, xt = (e, t) => {
1344
- let n = [], r = t.presentation, i = Be(r?.axes);
1516
+ }, Vt = (e, t) => {
1517
+ let n = [], r = t.presentation, i = he(r?.axes);
1345
1518
  if (i) return Promise.resolve({
1346
1519
  issue: i,
1347
1520
  success: !1
@@ -1349,7 +1522,7 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
1349
1522
  r?.orientation !== void 0 && n.push({
1350
1523
  name: "setOrientation",
1351
1524
  payload: r.orientation
1352
- }), r?.legend && n.push(...We(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]) => {
1353
1526
  t.titleVisible !== void 0 && n.push({
1354
1527
  name: "setShowAxisTitle",
1355
1528
  payload: {
@@ -1380,8 +1553,8 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
1380
1553
  axisName: e,
1381
1554
  showAxisLine: t.lineVisible
1382
1555
  }
1383
- }), n.push(...He(e, t)), "scale" in t && t.scale !== void 0 && n.push({
1384
- name: _e.SET_AXIS_SCALE,
1556
+ }), n.push(...ve(e, t)), "scale" in t && t.scale !== void 0 && n.push({
1557
+ name: ut.SET_AXIS_SCALE,
1385
1558
  payload: {
1386
1559
  axisName: e,
1387
1560
  scale: t.scale
@@ -1390,26 +1563,26 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
1390
1563
  });
1391
1564
  let a = r?.axes?.primaryMeasure?.bands;
1392
1565
  return a && n.push({
1393
- name: he.SET_MEASURE_AXIS_BANDS,
1566
+ name: ct.SET_MEASURE_AXIS_BANDS,
1394
1567
  payload: { bands: a }
1395
1568
  }), (t.data.measures ?? []).forEach((i) => {
1396
1569
  let a = i.dataLabels ?? (t.type !== "combo" || i.seriesType === "bar" ? r?.dataLabels : void 0);
1397
1570
  a && n.push({
1398
1571
  name: "setMeasureDataLabelsShow",
1399
1572
  payload: {
1400
- ...T(e.resolvedRefs[i.ref]),
1573
+ ...w(e.resolvedRefs[i.ref]),
1401
1574
  show: a.visible
1402
1575
  }
1403
1576
  });
1404
1577
  }), y(e, n, ["presentation"]);
1405
- }, St = (e, t) => {
1578
+ }, Ht = (e, t) => {
1406
1579
  let n = [];
1407
1580
  if (t.type === "combo") {
1408
1581
  (t.data.measures ?? []).forEach((t) => {
1409
1582
  t.seriesType && n.push({
1410
- name: ge.SET_MEASURE_GRAPH_TYPE,
1583
+ name: lt.SET_MEASURE_GRAPH_TYPE,
1411
1584
  payload: {
1412
- ...T(e.resolvedRefs[t.ref]),
1585
+ ...w(e.resolvedRefs[t.ref]),
1413
1586
  graphType: t.seriesType
1414
1587
  }
1415
1588
  });
@@ -1417,16 +1590,16 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
1417
1590
  let r = t.data.measures ?? [], i = r.find((e) => e.seriesType === "bar"), a = r.find((e) => e.seriesType === "bar" && e.axis)?.axis;
1418
1591
  r.forEach((t) => {
1419
1592
  t.seriesType !== "bar" && t.axis && n.push({
1420
- name: m.CHANGE_MEASURE_AXIS,
1593
+ name: st.CHANGE_MEASURE_AXIS,
1421
1594
  payload: {
1422
- ...T(e.resolvedRefs[t.ref]),
1595
+ ...w(e.resolvedRefs[t.ref]),
1423
1596
  secondaryAxis: t.axis === "secondary"
1424
1597
  }
1425
1598
  });
1426
1599
  }), i && a && n.push({
1427
- name: m.CHANGE_MEASURE_AXIS,
1600
+ name: st.CHANGE_MEASURE_AXIS,
1428
1601
  payload: {
1429
- ...T(e.resolvedRefs[i.ref]),
1602
+ ...w(e.resolvedRefs[i.ref]),
1430
1603
  secondaryAxis: a === "secondary"
1431
1604
  }
1432
1605
  });
@@ -1434,34 +1607,34 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
1434
1607
  if (t.type === "gauge" || t.type === "distribution-gauge") {
1435
1608
  let e = t.type === "distribution-gauge";
1436
1609
  e && n.push({
1437
- name: ve.SET_GAUGE_COMPARISON_MODE,
1610
+ name: dt.SET_GAUGE_COMPARISON_MODE,
1438
1611
  payload: !0
1439
1612
  }), t.presentation?.displayMode && n.push({
1440
- name: e ? ve.SET_GAUGE_BAR_MODE : me.SET_GAUGE_BAR_MODE,
1613
+ name: e ? dt.SET_GAUGE_BAR_MODE : ot.SET_GAUGE_BAR_MODE,
1441
1614
  payload: t.presentation.displayMode === "bar"
1442
1615
  }), !e && (t.data.dimensions?.length ?? 0) > 0 && (t.data.measures?.length ?? 0) > 1 && n.push({
1443
- name: me.SET_GAUGE_TARGET_TYPE,
1444
- payload: a.Data
1616
+ name: ot.SET_GAUGE_TARGET_TYPE,
1617
+ payload: at.Data
1445
1618
  });
1446
1619
  }
1447
1620
  if (t.type === "tree" && t.presentation?.layout) {
1448
1621
  let e = t.presentation.layout;
1449
1622
  e.compact !== void 0 && n.push({
1450
- name: p.SET_TREE_COMPACT,
1623
+ name: E.SET_TREE_COMPACT,
1451
1624
  payload: e.compact
1452
1625
  }), e.forceAutoFit !== void 0 && n.push({
1453
- name: p.SET_TREE_FORCE_AUTO_FIT,
1626
+ name: E.SET_TREE_FORCE_AUTO_FIT,
1454
1627
  payload: e.forceAutoFit
1455
1628
  }), e.direction !== void 0 && n.push({
1456
- name: p.SET_TREE_DIRECTION_ORIGIN,
1629
+ name: E.SET_TREE_DIRECTION_ORIGIN,
1457
1630
  payload: e.direction
1458
1631
  }), e.initialExpandedLevels !== void 0 && n.push({
1459
- name: p.SET_TREE_INITIAL_EXPANDED_LEVELS,
1632
+ name: E.SET_TREE_INITIAL_EXPANDED_LEVELS,
1460
1633
  payload: e.initialExpandedLevels
1461
1634
  });
1462
1635
  }
1463
1636
  return y(e, n, ["presentation"]);
1464
- }, Ct = (e, t, n) => {
1637
+ }, Ut = (e, t, n) => {
1465
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);
1466
1639
  return !s || r || !a && !o ? Promise.resolve({
1467
1640
  state: e,
@@ -1470,19 +1643,28 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
1470
1643
  name: "setColoringType",
1471
1644
  payload: typeof s == "function" ? s(t) : s
1472
1645
  }], a ? ["presentation", "legend"] : ["presentation", "coloring"]);
1473
- }, wt = async (e, t) => {
1474
- let n = bt[t], r = n.schema.safeParse(e.definition);
1475
- if (!r.success) return {
1476
- issues: w(r.error, e.definition),
1646
+ }, Wt = async (e, t) => {
1647
+ let n = Bt[t], r = T(e);
1648
+ if (r) return {
1649
+ issues: [{
1650
+ code: "invalid_structure",
1651
+ message: r,
1652
+ path: []
1653
+ }],
1477
1654
  success: !1
1478
1655
  };
1479
- let i = n.vSpecSchema.safeParse(e.baseVSpec);
1656
+ let i = n.schema.safeParse(e.definition);
1480
1657
  if (!i.success) return {
1481
- issues: [_("invalid_structure", ["baseVSpec"], `Base ${t} vSpec is invalid.`, { details: { issues: i.error.issues } })],
1658
+ issues: g(i.error, e.definition),
1659
+ success: !1
1660
+ };
1661
+ let a = n.vSpecSchema.safeParse(e.baseVSpec);
1662
+ if (!a.success) return {
1663
+ issues: [_("invalid_structure", ["baseVSpec"], `Base ${t} vSpec is invalid.`, { details: { issues: a.error.issues } })],
1482
1664
  success: !1
1483
1665
  };
1484
- let a = i.data;
1485
- if (!C(a, [
1666
+ let o = a.data;
1667
+ if (!C(o, [
1486
1668
  "dimensions",
1487
1669
  "measures",
1488
1670
  "supportingMeasures",
@@ -1491,20 +1673,20 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
1491
1673
  issues: [_("non_fresh_base_vspec", ["baseVSpec"], `${t} definitions require a fresh base vSpec.`)],
1492
1674
  success: !1
1493
1675
  };
1494
- let o = r.data, s = o.data.dimensions ?? [], c = o.data.measures ?? [], l = [...s, ...c].map((e) => e.ref), u = [
1495
- ...D(s, e.availableFields, ["data", "dimensions"], "dimension"),
1496
- ...D(c, e.availableFields, ["data", "measures"], "measure"),
1497
- ...Se([{
1498
- items: s,
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,
1499
1681
  path: ["data", "dimensions"]
1500
1682
  }, {
1501
- items: c,
1683
+ items: f,
1502
1684
  path: ["data", "measures"]
1503
1685
  }]),
1504
- ...nt(o.filterGroup, e.availableFields),
1505
- ...tt(o.sorting, l),
1506
- ...Pe(o.presentation?.coloring, s.map((e) => e.ref), c.map((e) => e.ref)),
1507
- ...t === "histogram" && s[0] ? O(s[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, [
1508
1690
  "data",
1509
1691
  "dimensions",
1510
1692
  0
@@ -1515,21 +1697,21 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
1515
1697
  U.FieldType.REAL
1516
1698
  ], "a histogram dimension") : []
1517
1699
  ];
1518
- if (u.length > 0) return {
1519
- issues: u,
1700
+ if (m.length > 0) return {
1701
+ issues: m,
1520
1702
  success: !1
1521
1703
  };
1522
- let d = {
1523
- state: S(e, a),
1704
+ let h = {
1705
+ state: S(e, o),
1524
1706
  success: !0
1525
1707
  };
1526
- for (let [e, t] of s.entries()) {
1527
- if ("issue" in d) return {
1528
- issues: [d.issue],
1708
+ for (let [e, t] of l.entries()) {
1709
+ if ("issue" in h) return {
1710
+ issues: [h.issue],
1529
1711
  success: !1
1530
1712
  };
1531
- let r = n.dimensionRole?.(e, o);
1532
- d = await x(d.state, t, "dimension", "addDimension", {
1713
+ let r = n.dimensionRole?.(e, s);
1714
+ h = await x(h.state, t, "dimension", "addDimension", {
1533
1715
  key: t.fieldKey,
1534
1716
  ...r ? { role: r } : {}
1535
1717
  }, [
@@ -1538,41 +1720,41 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
1538
1720
  e
1539
1721
  ]);
1540
1722
  }
1541
- for (let [t, r] of c.entries()) {
1542
- if ("issue" in d) return {
1543
- issues: [d.issue],
1723
+ for (let [t, r] of f.entries()) {
1724
+ if ("issue" in h) return {
1725
+ issues: [h.issue],
1544
1726
  success: !1
1545
1727
  };
1546
- let i = n.measureRole?.(t, o);
1547
- d = await x(d.state, r, "measure", "addMeasure", it(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 } : {}), [
1548
1730
  "data",
1549
1731
  "measures",
1550
1732
  t
1551
1733
  ]);
1552
1734
  }
1553
- return "issue" in d || (d = await Ze(d.state, s, "updateDimension", ["data", "dimensions"]), "issue" in d) || (d = await St(d.state, o), "issue" in d) || (d = await Ct(d.state, o, n), "issue" in d) || (d = await $e(d.state, s, "setDimensionTemporalGrouping", ["data", "dimensions"]), "issue" in d) || (d = await Ve(d.state, s, {
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, {
1554
1736
  formatString: "setDimensionFormatString",
1555
1737
  formatType: "setDimensionFormatType"
1556
- }, ["data", "dimensions"]), "issue" in d) || (d = await Ve(d.state, c, {
1738
+ }, ["data", "dimensions"]), "issue" in h) || (h = await ge(h.state, f, {
1557
1739
  currency: "setMeasureCurrency",
1558
1740
  currencyIsPrefix: "setMeasureCurrencyIsPrefix",
1559
1741
  formatString: "setMeasureFormatString",
1560
1742
  formatType: "setMeasureFormatType",
1561
1743
  negativeType: "setMeasureNegativeType"
1562
- }, ["data", "measures"]), "issue" in d) || (d = await Ge(d.state, o.filterGroup), "issue" in d) || n.sorting && (d = await Ye(d.state, o.sorting, "changeSortOrderAndDirection", "toggleSortingItem"), "issue" in d) || n.queryLimit && o.limiting?.queryLimit !== void 0 && (d = await y(d.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, [{
1563
1745
  name: "setQueryLimit",
1564
- payload: o.limiting.queryLimit
1565
- }], ["limiting"]), "issue" in d) || (d = await xt(d.state, o), "issue" in d) ? {
1566
- issues: [d.issue],
1746
+ payload: s.limiting.queryLimit
1747
+ }], ["limiting"]), "issue" in h) || (h = await Vt(h.state, s), "issue" in h) ? {
1748
+ issues: [h.issue],
1567
1749
  success: !1
1568
- } : (d = await qe(d.state, o.presentation?.coloring), "issue" in d ? {
1569
- issues: [d.issue],
1750
+ } : (h = await we(h.state, s.presentation?.coloring), "issue" in h ? {
1751
+ issues: [h.issue],
1570
1752
  success: !1
1571
- } : v(d.state, n.vSpecSchema));
1572
- }, W = (e) => {
1753
+ } : v(h.state, n.vSpecSchema));
1754
+ }, K = (e) => {
1573
1755
  let t = z(e.type);
1574
1756
  return {
1575
- compile: (t) => wt(t, e.type),
1757
+ compile: (t) => Wt(t, e.type),
1576
1758
  documentation: t.documentation,
1577
1759
  examples: [t.example, ...(t.additionalExamples ?? []).map(({ definition: e }) => e)],
1578
1760
  jsonSchema: B(e.schema, `${t.documentation.title} definition`),
@@ -1581,98 +1763,98 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
1581
1763
  type: e.type,
1582
1764
  version: 1
1583
1765
  };
1584
- }, Tt = [
1585
- W({
1586
- schema: Te,
1766
+ }, Gt = [
1767
+ K({
1768
+ schema: V.combo,
1587
1769
  type: "combo"
1588
1770
  }),
1589
- W({
1590
- schema: Ie,
1771
+ K({
1772
+ schema: V.dot,
1591
1773
  type: "dot"
1592
1774
  }),
1593
- W({
1594
- schema: ze,
1775
+ K({
1776
+ schema: V.scatter,
1595
1777
  type: "scatter"
1596
1778
  }),
1597
- W({
1598
- schema: Xe,
1779
+ K({
1780
+ schema: V.histogram,
1599
1781
  type: "histogram"
1600
1782
  }),
1601
- W({
1602
- schema: Oe,
1783
+ K({
1784
+ schema: V.heatMap,
1603
1785
  type: "heatMap"
1604
1786
  }),
1605
- W({
1606
- schema: Re,
1787
+ K({
1788
+ schema: V.radar,
1607
1789
  type: "radar"
1608
1790
  }),
1609
- W({
1610
- schema: we,
1791
+ K({
1792
+ schema: V.gauge,
1611
1793
  type: "gauge"
1612
1794
  }),
1613
- W({
1614
- schema: g,
1795
+ K({
1796
+ schema: V["distribution-gauge"],
1615
1797
  type: "distribution-gauge"
1616
1798
  }),
1617
- W({
1618
- schema: De,
1799
+ K({
1800
+ schema: V.pie,
1619
1801
  type: "pie"
1620
1802
  }),
1621
- W({
1622
- schema: Me,
1803
+ K({
1804
+ schema: V.tree,
1623
1805
  type: "tree"
1624
1806
  }),
1625
- W({
1626
- schema: ye,
1807
+ K({
1808
+ schema: V.treemap,
1627
1809
  type: "treemap"
1628
1810
  }),
1629
- W({
1630
- schema: Le,
1811
+ K({
1812
+ schema: V.sankey,
1631
1813
  type: "sankey"
1632
1814
  }),
1633
- W({
1634
- schema: Ue,
1815
+ K({
1816
+ schema: V.waterfall,
1635
1817
  type: "waterfall"
1636
1818
  }),
1637
- W({
1638
- schema: et,
1819
+ K({
1820
+ schema: V["word-cloud"],
1639
1821
  type: "word-cloud"
1640
1822
  })
1641
- ], G = z("filter"), Et = {
1642
- compile: st,
1643
- documentation: G.documentation,
1644
- examples: [G.example],
1645
- jsonSchema: B(Fe, `${G.documentation.title} definition`),
1646
- schema: Fe,
1647
- supportedFeatures: G.supportedFeatures,
1823
+ ], q = z("filter"), Kt = {
1824
+ compile: Dt,
1825
+ documentation: q.documentation,
1826
+ examples: [q.example],
1827
+ jsonSchema: B(V.filter, `${q.documentation.title} definition`),
1828
+ schema: V.filter,
1829
+ supportedFeatures: q.supportedFeatures,
1648
1830
  type: "filter",
1649
1831
  version: 1
1650
- }, K = z("line"), Dt = {
1651
- compile: ct,
1652
- documentation: K.documentation,
1653
- examples: [K.example, ...(K.additionalExamples ?? []).map(({ definition: e }) => e)],
1654
- jsonSchema: B(E, `${K.documentation.title} definition`),
1655
- schema: E,
1656
- supportedFeatures: K.supportedFeatures,
1832
+ }, J = z("line"), qt = {
1833
+ compile: Ot,
1834
+ documentation: J.documentation,
1835
+ examples: [J.example, ...(J.additionalExamples ?? []).map(({ definition: e }) => e)],
1836
+ jsonSchema: B(V.line, `${J.documentation.title} definition`),
1837
+ schema: V.line,
1838
+ supportedFeatures: J.supportedFeatures,
1657
1839
  type: "line",
1658
1840
  version: 1
1659
- }, q = z("number"), Ot = {
1660
- compile: lt,
1661
- documentation: q.documentation,
1662
- examples: [q.example],
1663
- jsonSchema: B(Ne, `${q.documentation.title} definition`),
1664
- schema: Ne,
1665
- supportedFeatures: q.supportedFeatures,
1841
+ }, Y = z("number"), Jt = {
1842
+ compile: kt,
1843
+ documentation: Y.documentation,
1844
+ examples: [Y.example],
1845
+ jsonSchema: B(V.number, `${Y.documentation.title} definition`),
1846
+ schema: V.number,
1847
+ supportedFeatures: Y.supportedFeatures,
1666
1848
  type: "number",
1667
1849
  version: 1
1668
- }, J = (e, t) => Object.entries(e).flatMap(([e, n]) => n === void 0 || !t[e] ? [] : [{
1850
+ }, X = (e, t) => Object.entries(e).flatMap(([e, n]) => n === void 0 || !t[e] ? [] : [{
1669
1851
  name: t[e],
1670
1852
  payload: n
1671
- }]), kt = {
1853
+ }]), Yt = {
1672
1854
  "atomic-input": {
1673
1855
  createRequests: (e) => {
1674
1856
  let t = e.customLabel;
1675
- return [...J(e, {
1857
+ return [...X(e, {
1676
1858
  hideLabel: "setAtomicInputHideLabel",
1677
1859
  inputType: "setAtomicInputType",
1678
1860
  placeholder: "setAtomicInputPlaceholder",
@@ -1686,21 +1868,21 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
1686
1868
  payload: t.text
1687
1869
  }]] : []];
1688
1870
  },
1689
- schema: b,
1871
+ schema: f,
1690
1872
  type: "atomic-input",
1691
- vSpecSchema: c
1873
+ vSpecSchema: ze
1692
1874
  },
1693
1875
  iframe: {
1694
1876
  createRequests: (e) => [{
1695
1877
  name: "setIframeUrl",
1696
1878
  payload: e.url
1697
1879
  }],
1698
- schema: Ae,
1880
+ schema: ne,
1699
1881
  type: "iframe",
1700
- vSpecSchema: pe
1882
+ vSpecSchema: Je
1701
1883
  },
1702
1884
  image: {
1703
- createRequests: (e) => J(e, {
1885
+ createRequests: (e) => X(e, {
1704
1886
  blur: "setImageBlur",
1705
1887
  fit: "setImageFit",
1706
1888
  opacity: "setImageOpacity",
@@ -1708,12 +1890,12 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
1708
1890
  shadow: "setImageShadow",
1709
1891
  source: "setImageSource"
1710
1892
  }),
1711
- schema: je,
1893
+ schema: se,
1712
1894
  type: "image",
1713
- vSpecSchema: re
1895
+ vSpecSchema: Xe
1714
1896
  },
1715
1897
  shape: {
1716
- createRequests: (e) => J(e, {
1898
+ createRequests: (e) => X(e, {
1717
1899
  backgroundColor: "setShapeBackgroundColor",
1718
1900
  backgroundType: "setShapeBackgroundType",
1719
1901
  borderEnabled: "setShapeBorderEnabled",
@@ -1728,9 +1910,9 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
1728
1910
  shape: "setShapeType",
1729
1911
  strokeColor: "setShapeBorderColor"
1730
1912
  }),
1731
- schema: Ce,
1913
+ schema: Ie,
1732
1914
  type: "shape",
1733
- vSpecSchema: ie
1915
+ vSpecSchema: Ue
1734
1916
  },
1735
1917
  simpleTextObject: {
1736
1918
  createRequests: (e) => [...e.content === void 0 ? [] : [{
@@ -1739,7 +1921,7 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
1739
1921
  textContent: e.content,
1740
1922
  representation: e.representation
1741
1923
  }
1742
- }], ...J(e, {
1924
+ }], ...X(e, {
1743
1925
  align: "setTextHorizontalAlign",
1744
1926
  fontFamily: "setTextFontFamily",
1745
1927
  fontSize: "setTextFontSize",
@@ -1749,56 +1931,79 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
1749
1931
  textColor: "setTextColor",
1750
1932
  wordWrap: "setTextWordWrap"
1751
1933
  })],
1752
- schema: h,
1934
+ schema: ue,
1753
1935
  type: "simpleTextObject",
1754
- vSpecSchema: ue
1936
+ vSpecSchema: Be
1755
1937
  }
1756
- }, Y = async (e, t) => {
1757
- let n = kt[t], r = n.schema.safeParse(e.definition);
1758
- if (!r.success) return {
1759
- issues: w(r.error, e.definition),
1938
+ }, Z = async (e, t) => {
1939
+ let n = Yt[t], r = T(e);
1940
+ if (r) return {
1941
+ issues: [{
1942
+ code: "invalid_structure",
1943
+ message: r,
1944
+ path: []
1945
+ }],
1760
1946
  success: !1
1761
1947
  };
1762
- let i = n.vSpecSchema.safeParse(e.baseVSpec);
1948
+ let i = n.schema.safeParse(e.definition);
1763
1949
  if (!i.success) return {
1764
- issues: [_("invalid_structure", ["baseVSpec"], `Base ${t} vSpec is invalid.`, { details: { issues: i.error.issues } })],
1950
+ issues: g(i.error, e.definition),
1765
1951
  success: !1
1766
1952
  };
1767
- let a = S(e, i.data), o = r.data.settings, s = await y(a, n.createRequests(o), ["settings"]);
1768
- return "issue" in s ? {
1769
- issues: [s.issue],
1953
+ let a = n.vSpecSchema.safeParse(e.baseVSpec);
1954
+ if (!a.success) return {
1955
+ issues: [_("invalid_structure", ["baseVSpec"], `Base ${t} vSpec is invalid.`, { details: { issues: a.error.issues } })],
1770
1956
  success: !1
1771
- } : v(s.state, n.vSpecSchema);
1772
- }, At = async (e) => {
1773
- let t = ke.safeParse(e.definition);
1774
- if (!t.success) return {
1775
- issues: w(t.error, e.definition),
1957
+ };
1958
+ let o = S(e, a.data), s = i.data.settings, c = await y(o, n.createRequests(s), ["settings"]);
1959
+ return "issue" in c ? {
1960
+ issues: [c.issue],
1961
+ success: !1
1962
+ } : v(c.state, n.vSpecSchema);
1963
+ }, Xt = async (e) => {
1964
+ let t = T(e);
1965
+ if (t) return {
1966
+ issues: [{
1967
+ code: "invalid_structure",
1968
+ message: t,
1969
+ path: []
1970
+ }],
1776
1971
  success: !1
1777
1972
  };
1778
- let n = f.safeParse(e.baseVSpec);
1973
+ let n = h.safeParse(e.definition);
1779
1974
  if (!n.success) return {
1780
- issues: [_("invalid_structure", ["baseVSpec"], "Base date-picker vSpec is invalid.", { details: { issues: n.error.issues } })],
1975
+ issues: g(n.error, e.definition),
1976
+ success: !1
1977
+ };
1978
+ let r = nt.safeParse(e.baseVSpec);
1979
+ if (!r.success) return {
1980
+ issues: [_("invalid_structure", ["baseVSpec"], "Base date-picker vSpec is invalid.", { details: { issues: r.error.issues } })],
1781
1981
  success: !1
1782
1982
  };
1783
- let r = n.data;
1784
- if (!C(r, ["dimensions", "measures"])) return {
1983
+ let i = r.data;
1984
+ if (!C(i, ["dimensions", "measures"])) return {
1785
1985
  issues: [_("non_fresh_base_vspec", ["baseVSpec"], "Date-picker definitions require a fresh vSpec.")],
1786
1986
  success: !1
1787
1987
  };
1788
- let i = t.data, a = [...rt(i.data.field, e.availableFields, ["data", "field"], "dimension"), ...O(i.data.field, e.availableFields, ["data", "field"], [
1988
+ let a = n.data, o = [...ie(a.data.field, e.availableFields, ["data", "field"], "dimension"), ...b(a.data.field, e.availableFields, ["data", "field"], [
1789
1989
  U.FieldType.DATE,
1790
1990
  U.FieldType.TIMESTAMP,
1791
1991
  U.FieldType.TIMESTAMP_TZ
1792
1992
  ], "a date-picker field")];
1793
- if (a.length > 0) return {
1794
- issues: a,
1993
+ if (o.length > 0) return {
1994
+ issues: o,
1795
1995
  success: !1
1796
1996
  };
1797
- let o = await x(S(e, r), i.data.field, "dimension", "addDatePickerDimension", { key: i.data.field.fieldKey }, ["data", "field"]);
1798
- return "issue" in o ? {
1799
- issues: [o.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],
1800
2000
  success: !1
1801
- } : (o = await y(o.state, J(i.settings ?? {}, {
2001
+ };
2002
+ let { pickerType: c, ...l } = a.settings ?? {};
2003
+ return s = await y(s.state, X({
2004
+ pickerType: c,
2005
+ ...l
2006
+ }, {
1802
2007
  endDateLabel: "setDatePickerEndDateLabel",
1803
2008
  pickerState: "setDatePickerState",
1804
2009
  pickerType: "setDatePickerType",
@@ -1807,27 +2012,36 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
1807
2012
  startDateLabel: "setDatePickerStartDateLabel",
1808
2013
  timePickerVisibility: "setDatePickerTimePickerVisibility",
1809
2014
  weekStart: "setDatePickerWeekStart"
1810
- }), ["settings"]), "issue" in o ? {
1811
- issues: [o.issue],
2015
+ }), ["settings"]), "issue" in s ? {
2016
+ issues: [s.issue],
1812
2017
  success: !1
1813
- } : v(o.state, f));
1814
- }, jt = async (e) => {
1815
- let t = Ee.safeParse(e.definition);
1816
- if (!t.success) return {
1817
- issues: w(t.error, e.definition),
2018
+ } : v(s.state, nt);
2019
+ }, Zt = async (e) => {
2020
+ let t = T(e);
2021
+ if (t) return {
2022
+ issues: [{
2023
+ code: "invalid_structure",
2024
+ message: t,
2025
+ path: []
2026
+ }],
1818
2027
  success: !1
1819
2028
  };
1820
- let n = de.safeParse(e.baseVSpec);
2029
+ let n = l.safeParse(e.definition);
1821
2030
  if (!n.success) return {
1822
- issues: [_("invalid_structure", ["baseVSpec"], "Base slider vSpec is invalid.", { details: { issues: n.error.issues } })],
2031
+ issues: g(n.error, e.definition),
2032
+ success: !1
2033
+ };
2034
+ let r = Re.safeParse(e.baseVSpec);
2035
+ if (!r.success) return {
2036
+ issues: [_("invalid_structure", ["baseVSpec"], "Base slider vSpec is invalid.", { details: { issues: r.error.issues } })],
1823
2037
  success: !1
1824
2038
  };
1825
- let r = n.data;
1826
- if (!C(r, ["dimensions", "measures"])) return {
2039
+ let i = r.data;
2040
+ if (!C(i, ["dimensions", "measures"])) return {
1827
2041
  issues: [_("non_fresh_base_vspec", ["baseVSpec"], "Slider definitions require a fresh vSpec.")],
1828
2042
  success: !1
1829
2043
  };
1830
- let i = t.data, a = [...rt(i.data.field, e.availableFields, ["data", "field"], "dimension"), ...O(i.data.field, e.availableFields, ["data", "field"], [
2044
+ let a = n.data, o = [...ie(a.data.field, e.availableFields, ["data", "field"], "dimension"), ...b(a.data.field, e.availableFields, ["data", "field"], [
1831
2045
  U.FieldType.DATE,
1832
2046
  U.FieldType.DECIMAL,
1833
2047
  U.FieldType.FLOAT,
@@ -1836,29 +2050,29 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
1836
2050
  U.FieldType.TIMESTAMP,
1837
2051
  U.FieldType.TIMESTAMP_TZ
1838
2052
  ], "a slider field")];
1839
- if (a.length > 0) return {
1840
- issues: a,
2053
+ if (o.length > 0) return {
2054
+ issues: o,
1841
2055
  success: !1
1842
2056
  };
1843
- let o = await x(S(e, r), i.data.field, "dimension", "addSliderDimension", { key: i.data.field.fieldKey }, ["data", "field"]);
1844
- if ("issue" in o) return {
1845
- issues: [o.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],
1846
2060
  success: !1
1847
2061
  };
1848
- let s = i.settings ?? {};
1849
- return o = await y(o.state, [...s.range === void 0 ? [] : [{
2062
+ let c = a.settings ?? {};
2063
+ return s = await y(s.state, [...c.range === void 0 ? [] : [{
1850
2064
  name: "setSliderManualRangeEnabled",
1851
2065
  payload: !0
1852
- }], ...J(s, {
2066
+ }], ...X(c, {
1853
2067
  layout: "setSliderLayout",
1854
2068
  quickSelect: "setSliderQuickSelect",
1855
2069
  range: "setSliderRange",
1856
2070
  step: "setSliderStep"
1857
- })], ["settings"]), "issue" in o ? {
1858
- issues: [o.issue],
2071
+ })], ["settings"]), "issue" in s ? {
2072
+ issues: [s.issue],
1859
2073
  success: !1
1860
- } : v(o.state, de);
1861
- }, X = (e) => {
2074
+ } : v(s.state, Re);
2075
+ }, Q = (e) => {
1862
2076
  let t = z(e.type);
1863
2077
  return {
1864
2078
  compile: e.compile,
@@ -1870,121 +2084,85 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
1870
2084
  type: e.type,
1871
2085
  version: 1
1872
2086
  };
1873
- }, Mt = [
1874
- X({
1875
- compile: At,
1876
- schema: ke,
2087
+ }, Qt = [
2088
+ Q({
2089
+ compile: Xt,
2090
+ schema: V["date-picker"],
1877
2091
  type: "date-picker"
1878
2092
  }),
1879
- X({
1880
- compile: (e) => Y(e, "iframe"),
1881
- schema: Ae,
2093
+ Q({
2094
+ compile: (e) => Z(e, "iframe"),
2095
+ schema: V.iframe,
1882
2096
  type: "iframe"
1883
2097
  }),
1884
- X({
1885
- compile: (e) => Y(e, "image"),
1886
- schema: je,
2098
+ Q({
2099
+ compile: (e) => Z(e, "image"),
2100
+ schema: V.image,
1887
2101
  type: "image"
1888
2102
  }),
1889
- X({
1890
- compile: (e) => Y(e, "shape"),
1891
- schema: Ce,
2103
+ Q({
2104
+ compile: (e) => Z(e, "shape"),
2105
+ schema: V.shape,
1892
2106
  type: "shape"
1893
2107
  }),
1894
- X({
1895
- compile: (e) => Y(e, "simpleTextObject"),
1896
- schema: h,
2108
+ Q({
2109
+ compile: (e) => Z(e, "simpleTextObject"),
2110
+ schema: V.simpleTextObject,
1897
2111
  type: "simpleTextObject"
1898
2112
  }),
1899
- X({
1900
- compile: (e) => Y(e, "atomic-input"),
1901
- schema: b,
2113
+ Q({
2114
+ compile: (e) => Z(e, "atomic-input"),
2115
+ schema: V["atomic-input"],
1902
2116
  type: "atomic-input"
1903
2117
  }),
1904
- X({
1905
- compile: jt,
1906
- schema: Ee,
2118
+ Q({
2119
+ compile: Zt,
2120
+ schema: V.slider,
1907
2121
  type: "slider"
1908
2122
  })
1909
- ], Z = z("table"), Nt = {
1910
- compile: ut,
1911
- documentation: Z.documentation,
1912
- examples: [Z.example, ...(Z.additionalExamples ?? []).map(({ definition: e }) => e)],
1913
- jsonSchema: B(be, `${Z.documentation.title} definition`),
1914
- schema: be,
1915
- supportedFeatures: Z.supportedFeatures,
2123
+ ], $ = z("table"), $t = {
2124
+ compile: At,
2125
+ documentation: $.documentation,
2126
+ examples: [$.example, ...($.additionalExamples ?? []).map(({ definition: e }) => e)],
2127
+ jsonSchema: B(V.table, `${$.documentation.title} definition`),
2128
+ schema: V.table,
2129
+ supportedFeatures: $.supportedFeatures,
1916
2130
  type: "table",
1917
2131
  version: 1
1918
- }, Pt = (e, t) => `${t}:${e}`, Ft = [
1919
- yt,
1920
- vt,
1921
- ...Tt,
1922
- ...Mt,
1923
- Dt,
1924
- Nt,
1925
- Ot,
1926
- Et
1927
- ], It = new Map(Ft.map((e) => [Pt(e.type, e.version), e])), Q = (e, t = 1) => It.get(Pt(e, t)), Lt = () => [...It.values()].map(({ documentation: e, examples: t, jsonSchema: n, supportedFeatures: r, type: i, version: a }) => ({
2132
+ }, en = (e, t) => `${t}:${e}`, tn = [
2133
+ zt,
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 }) => ({
1928
2142
  documentation: e,
1929
2143
  examples: t,
1930
2144
  jsonSchema: n,
1931
2145
  supportedFeatures: r,
1932
2146
  type: i,
1933
2147
  version: a
1934
- })), $ = () => Ft.map((e) => e.type), Rt = (e) => {
1935
- if (typeof e != "object" || !e || Array.isArray(e)) return {
1936
- code: "invalid_structure",
1937
- message: "Visualization definition must be an object.",
1938
- path: []
1939
- };
1940
- let t = "version" in e ? e.version : void 0;
1941
- if (t !== 1) return {
1942
- allowedValues: [1],
1943
- code: "unsupported_version",
1944
- message: `Visualization definition version "${String(t)}" is not supported.`,
1945
- path: ["version"]
1946
- };
1947
- let n = "type" in e ? e.type : void 0;
1948
- if (!(typeof n == "string" && Q(n, t))) return {
1949
- allowedValues: $(),
1950
- code: "unsupported_visualization",
1951
- message: `Visualization type "${String(n)}" is not supported.`,
1952
- path: ["type"]
1953
- };
1954
- }, zt = (e) => {
1955
- let t = Rt(e);
2148
+ })), on = async (e) => {
2149
+ let t = T(e);
1956
2150
  if (t) return {
1957
- issues: [t],
1958
- success: !1
1959
- };
1960
- let n = Q(e.type, e.version);
1961
- if (!n) return {
1962
2151
  issues: [{
1963
- allowedValues: $(),
1964
- code: "unsupported_visualization",
1965
- message: "Visualization definition descriptor is not available.",
1966
- path: ["type"]
2152
+ code: "invalid_structure",
2153
+ message: t,
2154
+ path: []
1967
2155
  }],
1968
2156
  success: !1
1969
2157
  };
1970
- let r = n.schema.safeParse(e);
1971
- return r.success ? {
1972
- definition: r.data,
1973
- issues: [],
1974
- success: !0
1975
- } : {
1976
- issues: w(r.error, e),
2158
+ let n = Ct(e.definition);
2159
+ if (n) return {
2160
+ issues: [n],
1977
2161
  success: !1
1978
2162
  };
1979
- }, Bt = async (e) => {
1980
- let t = Rt(e.definition);
1981
- if (t) return {
1982
- issues: [t],
1983
- success: !1
1984
- };
1985
- let n = e.definition, r = Q(n.type, n.version), a = k.array(Qe).safeParse(e.availableFields);
2163
+ let r = e.definition, i = rn(r.type, r.version), a = D.array(De).safeParse(e.availableFields);
1986
2164
  if (!a.success) return {
1987
- issues: w(a.error, e.availableFields, ["availableFields"]),
2165
+ issues: g(a.error, e.availableFields, ["availableFields"]),
1988
2166
  success: !1
1989
2167
  };
1990
2168
  let o = /* @__PURE__ */ new Map(), s = a.data.flatMap((e, t) => {
@@ -2004,21 +2182,29 @@ var at = async (e) => (await import("./app-filter-bar.compiler-j_CVoWTa.js")).co
2004
2182
  issues: s,
2005
2183
  success: !1
2006
2184
  };
2007
- let c = Ke(a.data), l = k.array(i).safeParse(c);
2008
- return l.success ? r ? r.compile({
2009
- ...e,
2010
- availableFields: a.data
2011
- }) : {
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 {
2012
2191
  issues: [{
2013
- allowedValues: $(),
2192
+ allowedValues: H(),
2014
2193
  code: "unsupported_visualization",
2015
2194
  message: "Visualization definition descriptor is not available.",
2016
2195
  path: ["type"]
2017
2196
  }],
2018
2197
  success: !1
2019
- } : {
2020
- issues: w(l.error, c, ["availableFields"]),
2021
- success: !1
2022
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;
2023
2209
  };
2024
- export { Lt as i, zt as n, Q as r, Bt as t };
2210
+ export { wt as i, rn as n, an as r, on as t };