@astrato-io/visualizations 0.10.0 → 0.11.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 (138) hide show
  1. package/CHANGELOG.md +21 -1
  2. package/README.md +22 -4
  3. package/THIRD_PARTY_NOTICES.md +494 -0
  4. package/VISUALIZATION_DEFINITIONS.md +59 -145
  5. package/chunks/{Button-CCF851ea.js → Button-CPG4WX8X.js} +3 -3
  6. package/chunks/{CircularProgress-yupH6YWs.js → CircularProgress-PSLW8HmD.js} +12 -12
  7. package/chunks/FieldTypeIcon-5k2bkqd0.js +22 -0
  8. package/chunks/{LinearProgress-CyFjN4px.js → LinearProgress-KQ2EQlGL.js} +16 -16
  9. package/chunks/{MenuOption-CQpT79AP.js → MenuOption-B-6K7kks.js} +151 -151
  10. package/chunks/{Title-C-p4ZarD.js → Title-BmvwZYkh.js} +32 -32
  11. package/chunks/{_createAggregator-BF4qG9XK.js → _createAggregator-CFmH6gUN.js} +11 -11
  12. package/chunks/{app-filter-bar.compiler-8fxCo2q7.js → app-filter-bar.compiler-BY5-T16I.js} +8 -8
  13. package/chunks/{bar-layout-DStC-GNV.js → bar-layout-BNou0dZF.js} +2 -2
  14. package/chunks/{bar.compiler-CQAu8KL8.js → bar.compiler-BkhO7sDd.js} +55 -53
  15. package/chunks/{builder-CScg1TOS.js → builder-CNjuqD2z.js} +107 -56
  16. package/chunks/category-axis-D1OVyMrr.js +20 -0
  17. package/chunks/{coloring-9jU3s_-p.js → coloring-BOiP0rmn.js} +54 -54
  18. package/chunks/{createSimplePaletteValueFilter-C4hZpCdn.js → createSimplePaletteValueFilter-BkgQ7MFE.js} +166 -166
  19. package/chunks/defaults-B5_8S-J-.js +3 -0
  20. package/chunks/{definitions-C4grxhye.js → definitions-AS9GcavE.js} +263 -242
  21. package/chunks/{escobar-CjirINHP.js → escobar-cQ1eQ64G.js} +8528 -8461
  22. package/chunks/{extend-preset-D-l9u_we.js → extend-preset-BlCbcXKR.js} +421 -421
  23. package/chunks/{filter.compiler-lji2Acgn.js → filter.compiler-CI7dDNM1.js} +12 -12
  24. package/chunks/{filtering-C1zakrrX.js → filtering-Dwi7hDPZ.js} +263 -263
  25. package/chunks/handlers-C63NVo7i.js +15433 -0
  26. package/chunks/{icon-picker-styles-Bj80ZUBK.js → icon-picker-styles-CBlxEu3s.js} +8 -8
  27. package/chunks/{isEqual-Ch9OEye3.js → isEqual-BdHo6wqq.js} +1 -1
  28. package/chunks/{isFocusVisible-CgMP0qkR.js → isFocusVisible-C1nlVUwL.js} +9 -9
  29. package/chunks/line.compiler-DCv3h42f.js +198 -0
  30. package/chunks/linear-Bq_r9l5S.js +264 -0
  31. package/chunks/{logger-CKRjhSHQ.js → logger-Bc-DqDM_.js} +72 -72
  32. package/chunks/{lookup-BWllin0q.js → lookup-B3tWH2hX.js} +1 -0
  33. package/chunks/{map.compiler-CKzorLgK.js → map.compiler-CRO6XpdI.js} +43 -45
  34. package/chunks/measure-format-default-B6ghxih7.js +22 -0
  35. package/chunks/{metadata-Bb9pTXrq.js → metadata-CtkvZEhS.js} +1 -1
  36. package/chunks/number.compiler-kV4lobCZ.js +57 -0
  37. package/chunks/{operations-DZoY50VX.js → operations-COl9wgqi.js} +9893 -9831
  38. package/chunks/{range-D1BTmFMp.js → range-CMJ5yc5Z.js} +2 -2
  39. package/chunks/{react-dom-Dgv2azN2.js → react-dom-BjsCbYHq.js} +76 -76
  40. package/chunks/{render-wrappers-_P3xwu5A.js → render-wrappers-DFHi3Wkr.js} +1 -1
  41. package/chunks/{requirements-NHNrR8Ie.js → requirements-C5YLmHKe.js} +251 -227
  42. package/chunks/{shared-UitWpq1J.js → shared-DyqxOie0.js} +290 -278
  43. package/chunks/standalone-06i1wmIX.js +6 -0
  44. package/chunks/{standalone-DtBk_iUz.js → standalone-9jrQ3zJT.js} +10 -10
  45. package/chunks/standalone-B6zUvxNQ.js +357 -0
  46. package/chunks/{standalone-Bnnr87pc.js → standalone-BYK2U0Vd.js} +418 -679
  47. package/chunks/standalone-Be5APcVv.js +762 -0
  48. package/chunks/standalone-Bp4G3MDx.js +396 -0
  49. package/chunks/{standalone-CbPk8bKn.js → standalone-BrjtMIdd.js} +132 -132
  50. package/chunks/{standalone-BOzHA_d4.js → standalone-Bsfz5vnJ.js} +57 -57
  51. package/chunks/standalone-BuXpKMnc.js +2 -0
  52. package/chunks/standalone-CIjNYyya.js +8378 -0
  53. package/chunks/{standalone-B0U6c3su.js → standalone-CS5VGoja.js} +358 -358
  54. package/chunks/standalone-CUGt2FUF.js +2 -0
  55. package/chunks/{standalone-BapqaniK.js → standalone-ChfEHb28.js} +2299 -1072
  56. package/chunks/standalone-CnF2OYLQ.js +355 -0
  57. package/chunks/standalone-CznEEiq3.js +422 -0
  58. package/chunks/{standalone-Ck63MZzj.js → standalone-D9k5SCd8.js} +165 -165
  59. package/chunks/{standalone-CRdDZYeM.js → standalone-DYVYccmY.js} +855 -855
  60. package/chunks/{standalone-CVknVdUC.js → standalone-DaNxWIKn.js} +27 -27
  61. package/chunks/{standalone-swGs70tD.js → standalone-Db_HNuWx.js} +50 -50
  62. package/chunks/standalone-DcuE8KBa.js +287 -0
  63. package/chunks/{standalone-U0WJwFlG.js → standalone-I5kRIsp8.js} +97 -97
  64. package/chunks/{standalone-BBu90BhK.js → standalone-K2OvRAQM.js} +125 -125
  65. package/chunks/{standalone-DCFY1MAV.js → standalone-c4CPN6ug.js} +4634 -4633
  66. package/chunks/{standalone-ByKKqT5L.js → standalone-iOnJhCvA.js} +302 -302
  67. package/chunks/standalone-pCrzBiTy.js +773 -0
  68. package/chunks/standalone-qrZaimgC.js +689 -0
  69. package/chunks/standalone-yqDJ8h3K.js +1012 -0
  70. package/chunks/{table.compiler-OWSx5MOq.js → table.compiler-CMH_dtYs.js} +29 -29
  71. package/chunks/{useFieldName-B8iCYyw1.js → useFieldName-BfxBzhhH.js} +1 -1
  72. package/chunks/{utils-3Igg6xmO.js → utils-BdJrEeIQ.js} +4037 -4015
  73. package/chunks/{view-DdMLZySj.js → view-Q-_XIrWE.js} +1615 -1615
  74. package/chunks/{visualization-filters-CzvFHE6M.js → visualization-filters-BwS0xUqs.js} +1723 -1693
  75. package/chunks/{with-html-element-DOfkR3C1.js → with-html-element-D_ooGNWI.js} +4006 -3994
  76. package/definitions.js +2 -2
  77. package/docs/operations/astrato-app-filter-bar.md +1 -1
  78. package/docs/operations/bar.md +30 -1
  79. package/docs/operations/combo.md +30 -1
  80. package/docs/operations/date-picker.md +1 -1
  81. package/docs/operations/distribution-gauge.md +1 -1
  82. package/docs/operations/dot.md +1 -1
  83. package/docs/operations/filter.md +1 -1
  84. package/docs/operations/gauge.md +1 -1
  85. package/docs/operations/heatMap.md +1 -1
  86. package/docs/operations/histogram.md +1 -1
  87. package/docs/operations/iframe.md +1 -1
  88. package/docs/operations/image.md +1 -1
  89. package/docs/operations/index.md +5 -4
  90. package/docs/operations/line.md +48 -1
  91. package/docs/operations/map.md +5274 -0
  92. package/docs/operations/number.md +1 -1
  93. package/docs/operations/pie.md +1 -1
  94. package/docs/operations/radar.md +1 -1
  95. package/docs/operations/sankey.md +1 -1
  96. package/docs/operations/scatter.md +1 -1
  97. package/docs/operations/shape.md +1 -1
  98. package/docs/operations/simpleTextObject.md +1 -1
  99. package/docs/operations/slider.md +1 -1
  100. package/docs/operations/table.md +1 -1
  101. package/docs/operations/tree.md +1 -1
  102. package/docs/operations/treemap.md +1 -1
  103. package/docs/operations/waterfall.md +1 -1
  104. package/docs/operations/word-cloud.md +1 -1
  105. package/getters.js +3 -3
  106. package/index.js +528 -504
  107. package/metadata.js +2 -2
  108. package/operations.js +6 -6
  109. package/package.json +73 -68
  110. package/src/definitions/index.d.ts +1 -1
  111. package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +34 -53
  112. package/src/definitions/model/definitions/schema-registry.d.ts +2 -2
  113. package/src/definitions/model/definitions/schemas/bar.schema.d.ts +1 -1
  114. package/src/definitions/model/definitions/schemas/broad-chart.schema.d.ts +2 -2
  115. package/src/definitions/model/definitions/schemas/common.schema.d.ts +14 -2
  116. package/src/definitions/model/definitions/schemas/index.d.ts +1 -1
  117. package/src/definitions/model/definitions/schemas/line.schema.d.ts +1 -1
  118. package/src/definitions/model/definitions/types/compilation.types.d.ts +4 -1
  119. package/src/types.d.ts +28 -28
  120. package/src/visualization-catalog.d.ts +3 -0
  121. package/styles.css +1 -1
  122. package/chunks/FieldTypeIcon-D_MzsdfY.js +0 -22
  123. package/chunks/defaults-cyNhn37t.js +0 -3
  124. package/chunks/handlers-ZviIUC-j.js +0 -15387
  125. package/chunks/line.compiler-De5fiKuR.js +0 -198
  126. package/chunks/number.compiler-CaTmJkmi.js +0 -53
  127. package/chunks/standalone-BEekPuA12.js +0 -357
  128. package/chunks/standalone-BR2JuRIC.js +0 -422
  129. package/chunks/standalone-BwJqDj2Z.js +0 -396
  130. package/chunks/standalone-CRfDOO1x.js +0 -287
  131. package/chunks/standalone-DZDGX3aa.js +0 -518
  132. package/chunks/standalone-DhfgeJIk.js +0 -1012
  133. package/chunks/standalone-DibjA73M.js +0 -6
  134. package/chunks/standalone-DxBAyqAu.js +0 -772
  135. package/chunks/standalone-KMQPsNsq.js +0 -2
  136. package/chunks/standalone-MBLSvsrY.js +0 -2
  137. package/chunks/standalone-wgFAVnnm.js +0 -355
  138. package/chunks/standalone-xGV0dqPV.js +0 -689
@@ -1,8 +1,8 @@
1
- import { As as e, Fo as t, Io as n, Ss as r, _s as i, ks as a, ll as o, r as s, us as c, vs as l, xs as u } from "./visualization-filters-CzvFHE6M.js";
2
- import { Ah as d, Gg as ee, Hh as te, Ih as ne, Im as re, Jg as ie, Jm as f, Lg as ae, Mh as oe, Qp as p, Sm as m, Uh as se, Vg as ce, Wh as le, dh as ue, f_ as h, fh as de, gh as g, h_ as fe, hh as pe, im as me, jh as he, lh as ge, mh as _e, o_ as ve, oh as ye, om as be, ph as xe, r_ as Se, rh as Ce, rm as _, sh as we, sm as Te, th as Ee, tm as v, xg as De, y_ as Oe } from "./handlers-ZviIUC-j.js";
3
- import { T as ke, d as Ae, t as je, y } from "./operations-DZoY50VX.js";
1
+ import { As as e, Es as t, Ls as n, Rs as r, Ts as i, Uo as a, Wo as o, bl as s, ks as c, r as l, vs as u } from "./visualization-filters-BwS0xUqs.js";
2
+ import { Bg as d, Fh as ee, Gh as te, Jg as ne, Kh as re, Nh as ie, Ph as ae, S_ as oe, Tm as f, Wg as se, Zg as ce, Zm as p, _h as le, fh as ue, gh as de, h_ as m, hh as fe, ih as pe, im as h, l_ as me, lh as he, lm as ge, mh as _e, o_ as ve, oh as ye, om as g, qh as be, sm as xe, tm as _, uh as Se, um as Ce, v_ as we, vh as Te, wg as Ee, yh as v, zh as De, zm as Oe } from "./handlers-C63NVo7i.js";
3
+ import { E as ke, b as y, d as Ae, t as je } from "./operations-COl9wgqi.js";
4
4
  import { z as b } from "zod";
5
- var x = o(), Me = b.object({
5
+ var x = s(), Me = b.object({
6
6
  orientation: b.enum(["horizontal", "vertical"]).optional(),
7
7
  selectionMode: b.enum([
8
8
  "inherit",
@@ -18,7 +18,7 @@ var x = o(), Me = b.object({
18
18
  settings: Me.optional(),
19
19
  type: b.literal("astrato-app-filter-bar"),
20
20
  version: b.literal(1)
21
- }).strict(), S = (e) => e, C = b.string().trim().min(1).max(100), w = b.string().min(1).refine((e) => e.trim().length > 0, "Field key cannot be blank."), Pe = S(ve.shape.dataType), Fe = S(Se.shape.formatType), Ie = b.object({
21
+ }).strict(), S = (e) => e, C = b.string().trim().min(1).max(100), w = b.string().min(1).refine((e) => e.trim().length > 0, "Field key cannot be blank."), Pe = S(me.shape.dataType), Fe = S(ve.shape.formatType), Ie = b.object({
22
22
  distinct: b.boolean().optional(),
23
23
  name: b.string().trim().min(1),
24
24
  resultType: b.string().optional()
@@ -76,7 +76,7 @@ var x = o(), Me = b.object({
76
76
  currencyIsPrefix: b.boolean().optional(),
77
77
  formatString: b.string().optional(),
78
78
  formatType: Fe.optional(),
79
- negativeType: S(Se.shape.negativeType.unwrap()).optional()
79
+ negativeType: S(ve.shape.negativeType.unwrap()).optional()
80
80
  }).strict(), Ge = b.discriminatedUnion("mode", [b.object({
81
81
  dateLevel: S(b.enum(x.DateLevel)).describe("Year-aware bucket, such as month over time."),
82
82
  mode: b.literal("level")
@@ -93,8 +93,8 @@ var x = o(), Me = b.object({
93
93
  showNullValues: b.boolean().optional(),
94
94
  temporalGrouping: Ge.describe("Groups a date dimension. Applied before format; format must then suit the grouping.").optional()
95
95
  }).strict(), Ke = b.object({
96
- placements: b.array(S(b.enum(fe))).min(1).describe("Positions tried in order. Inside labels sit at the end of the bar.").optional(),
97
- textColor: h.describe("Label text color in every placement. Omit to keep the automatic contrast color.").optional(),
96
+ placements: b.array(S(b.enum(we))).min(1).describe("Positions tried in order. Inside labels sit at the end of the bar.").optional(),
97
+ textColor: m.describe("Label text color in every placement. Omit to keep the automatic contrast color.").optional(),
98
98
  visible: b.boolean()
99
99
  }).strict(), O = b.object({
100
100
  aggregation: b.string().trim().min(1).describe("Required for a raw field measure; omit for a predefined measure or calculation.").optional(),
@@ -104,20 +104,20 @@ var x = o(), Me = b.object({
104
104
  ref: C
105
105
  }).strict(), qe = b.object({
106
106
  fieldKey: w,
107
- operator: S(b.enum(ne)),
107
+ operator: S(b.enum(De)),
108
108
  value: b.string()
109
109
  }).strict(), Je = b.object({
110
110
  fieldKey: w,
111
- operator: S(b.enum(oe)),
111
+ operator: S(b.enum(ee)),
112
112
  valueFrom: b.string(),
113
113
  valueTo: b.string()
114
114
  }).strict(), Ye = b.object({
115
115
  fieldKey: w,
116
- operator: S(b.enum(d)),
116
+ operator: S(b.enum(ie)),
117
117
  values: b.array(b.string()).min(1)
118
118
  }).strict(), Xe = b.object({
119
119
  fieldKey: w,
120
- operator: S(b.enum(he))
120
+ operator: S(b.enum(ae))
121
121
  }).strict(), Ze = b.union([
122
122
  qe,
123
123
  Je,
@@ -128,18 +128,18 @@ var x = o(), Me = b.object({
128
128
  operator: b.enum(["and", "or"])
129
129
  }).strict()), A = b.object({
130
130
  by: C,
131
- direction: S(ae.shape.sortDirection),
131
+ direction: S(d.shape.sortDirection),
132
132
  enabled: b.boolean().optional()
133
133
  }).strict(), Qe = b.object({
134
134
  by: C,
135
135
  count: b.number().int().positive(),
136
- direction: S(ae.shape.sortDirection),
136
+ direction: S(d.shape.sortDirection),
137
137
  showOthers: b.boolean().optional()
138
138
  }).strict(), $e = b.object({
139
139
  queryLimit: b.number().int().positive().optional(),
140
140
  topN: Qe.optional()
141
141
  }).strict(), et = b.object({
142
- position: S(ie.shape.position).optional(),
142
+ position: S(ce.shape.position).optional(),
143
143
  title: b.string().optional(),
144
144
  visible: b.boolean().optional()
145
145
  }).strict(), j = b.object({
@@ -148,80 +148,85 @@ var x = o(), Me = b.object({
148
148
  ticksVisible: b.boolean().optional(),
149
149
  title: b.string().optional(),
150
150
  titleVisible: b.boolean().optional()
151
- }).strict(), tt = b.union([b.object({
151
+ }).strict(), tt = j.extend({
152
+ labelWrap: b.boolean().describe("Wrap category labels onto several lines instead of tilting them. Helps a few long, multi-word names.").optional(),
153
+ labelWrapLines: b.number().int().min(1).max(10).describe("Most lines a wrapped category label uses; turns wrapping on. Defaults to 2.").optional()
154
+ }).strict(), nt = b.union([b.object({
152
155
  max: b.number().optional(),
153
156
  min: b.number().optional().describe("Must be less than max when both are set")
154
- }).strict(), b.object({ startsAtZero: b.boolean() }).strict()]).describe("Fix min, max or both, or set startsAtZero on an axis fitted to the data"), nt = b.array(De).optional().describe("Shaded ranges drawn across the plot between two primary measure axis values"), rt = te({}), it = te({ dimension: C.describe(`Alias of a dimension in data.dimensions. ${le}`) }), at = se({ measure: C.describe("Alias of the measure in data.measures whose value is compared") }), ot = "Colors bound to dimension values, eg. \"Happy\" is dark teal. The first matching entry wins, ahead of rules and the palette. For ordered bands, add one entry per band with colors taken along a ramp.", st = b.array(at).min(1).describe("Colors bound to measure thresholds, eg. red when sales is below 100. The first matching rule wins."), M = (e) => b.object({
155
- overwrites: b.array(e.requiresOverwriteDimension ? it : rt).min(1).describe(ot).optional(),
156
- ...e.rules ? { rules: st.optional() } : {}
157
- }).strict(), ct = {
157
+ }).strict(), b.object({ startsAtZero: b.boolean() }).strict()]).describe("Fix min, max or both, or set startsAtZero on an axis fitted to the data"), rt = b.array(Ee).optional().describe("Shaded ranges drawn across the plot between two primary measure axis values"), it = te({}), at = te({ dimension: C.describe(`Alias of a dimension in data.dimensions. ${be}`) }), ot = re({ measure: C.describe("Alias of the measure in data.measures whose value is compared") }), st = "Colors bound to dimension values, eg. \"Happy\" is dark teal. The first matching entry wins, ahead of rules and the palette. For ordered bands, add one entry per band with colors taken along a ramp.", ct = b.array(ot).min(1).describe("Colors bound to measure thresholds, eg. red when sales is below 100. The first matching rule wins."), M = (e) => b.object({
158
+ overwrites: b.array(e.requiresOverwriteDimension ? at : it).min(1).describe(st).optional(),
159
+ ...e.rules ? { rules: ct.optional() } : {}
160
+ }).strict(), lt = {
158
161
  inverted: b.boolean().optional().describe("Reverse the direction of the axis values, eg. to put rank 1 at the top"),
159
- range: tt.optional()
160
- }, lt = { bands: nt }, ut = { scale: S(b.enum(Oe)).optional() };
162
+ range: nt.optional()
163
+ }, ut = { bands: rt }, dt = { scale: S(b.enum(oe)).optional() };
161
164
  j.extend({
162
- ...ct,
163
165
  ...lt,
164
- ...ut
166
+ ...ut,
167
+ ...dt
165
168
  }).strict();
166
- var N = ({ logScale: e = !1, primaryMeasureBands: t = !1, rangedMeasureAxes: n = [] } = {}) => {
167
- let r = (t, r) => j.extend({
168
- ...n.includes(t) ? ct : {},
169
- ...r ? lt : {},
170
- ...e ? ut : {}
169
+ var N = ({ dimensionLabelWrap: e = !1, logScale: t = !1, primaryMeasureBands: n = !1, rangedMeasureAxes: r = [] } = {}) => {
170
+ let i = (e, n) => j.extend({
171
+ ...r.includes(e) ? lt : {},
172
+ ...n ? ut : {},
173
+ ...t ? dt : {}
171
174
  }).strict();
172
175
  return b.object({
173
- dimension: j.optional(),
174
- primaryMeasure: r("primaryMeasure", t).optional(),
175
- secondaryMeasure: r("secondaryMeasure", !1).optional()
176
+ dimension: (e ? tt : j).optional(),
177
+ primaryMeasure: i("primaryMeasure", n).optional(),
178
+ secondaryMeasure: i("secondaryMeasure", !1).optional()
176
179
  }).strict();
177
180
  };
178
181
  N();
179
- var dt = b.object({
182
+ var ft = b.object({
180
183
  axes: N({
184
+ dimensionLabelWrap: !0,
181
185
  logScale: !0,
182
186
  primaryMeasureBands: !0,
183
187
  rangedMeasureAxes: ["primaryMeasure", "secondaryMeasure"]
184
188
  }).optional(),
185
189
  legend: et.optional(),
186
- orientation: S(b.enum(n)).optional()
187
- }).strict(), ft = S(b.enum([i.Groups, i.Stacked])).describe("How several measures, or a series dimension, share a category: \"groups\" side by side, \"stacked\" into one bar. Ignored for one dimension with one measure. Defaults to groups for several measures on one dimension, otherwise stacked."), pt = O.extend({ axis: b.enum(["primary", "secondary"]).optional() }), mt = b.object({
190
+ orientation: S(b.enum(o)).optional()
191
+ }).strict(), pt = S(b.enum([i.Groups, i.Stacked])).describe("How several measures, or a series dimension, share a category: \"groups\" side by side, \"stacked\" into one bar. Ignored for one dimension with one measure. Defaults to groups for several measures on one dimension, otherwise stacked."), mt = O.extend({ axis: b.enum(["primary", "secondary"]).optional() }), ht = b.object({
188
192
  data: b.object({
189
- dimensions: b.array(D).min(1),
190
- measures: b.array(pt).min(1)
193
+ dimensions: b.array(D),
194
+ measures: b.array(mt).min(1)
191
195
  }).strict(),
192
196
  filterGroup: k.optional(),
193
197
  limiting: $e.optional(),
194
- presentation: dt.extend({
198
+ presentation: ft.extend({
195
199
  coloring: M({ rules: !0 }).optional(),
196
- layout: ft.optional()
200
+ layout: pt.optional()
197
201
  }).optional(),
198
202
  sorting: b.array(A).optional(),
199
203
  type: b.literal("bar"),
200
204
  version: b.literal(1)
201
- }).strict(), ht = b.object({ visible: b.boolean() }).strict(), gt = (e, t) => b.array(e).min(t.min).max(t.max), P = (e, t) => {
202
- let r = {};
205
+ }).strict(), gt = b.object({ visible: b.boolean() }).strict(), _t = (e, t) => b.array(e).min(t.min).max(t.max), P = (e, t) => {
206
+ let n = {};
203
207
  if (t.dimensions.max > 0) {
204
- let e = gt(D, t.dimensions);
205
- r.dimensions = t.dimensions.min === 0 ? e.optional() : e;
208
+ let e = _t(D, t.dimensions);
209
+ n.dimensions = t.dimensions.min === 0 ? e.optional() : e;
206
210
  }
207
211
  if (t.measures.max > 0) {
208
- let e = t.dataLabels ? O.omit({ dataLabels: !0 }).extend({ dataLabels: ht.optional() }) : O.omit({ dataLabels: !0 }), n = t.comboSeriesTypes ? e.extend({ seriesType: b.enum([
212
+ let e = t.dataLabels ? O.omit({ dataLabels: !0 }).extend({ dataLabels: gt.optional() }) : O.omit({ dataLabels: !0 }), r = t.comboSeriesTypes ? e.extend({ seriesType: b.enum([
209
213
  "bar",
210
214
  "line",
211
215
  "point"
212
- ]).optional() }) : e, i = gt(t.measureAxis ? n.extend({ axis: b.enum(["primary", "secondary"]).optional() }) : n, t.measures);
213
- r.measures = t.measures.min === 0 ? i.optional() : i;
216
+ ]).optional() }) : e, i = _t(t.measureAxis ? r.extend({ axis: b.enum(["primary", "secondary"]).optional() }) : r, t.measures);
217
+ n.measures = t.measures.min === 0 ? i.optional() : i;
214
218
  }
215
- let i = {};
219
+ let r = {};
216
220
  if (t.axes) {
217
221
  let e = N({
222
+ dimensionLabelWrap: t.dimensionLabelWrap,
218
223
  logScale: t.measureAxisScale,
219
224
  primaryMeasureBands: t.measureAxisBands,
220
225
  rangedMeasureAxes: t.rangedMeasureAxes
221
226
  });
222
- i.axes = (t.secondaryDimensionAxis ? e.extend({ secondaryDimension: j.optional() }) : e).optional();
227
+ r.axes = (t.secondaryDimensionAxis ? e.extend({ secondaryDimension: j.optional() }) : e).optional();
223
228
  }
224
- t.conditionalColoring && (i.coloring = M(t.conditionalColoring).optional()), t.dataLabels && (i.dataLabels = ht.optional()), t.gaugeDisplayMode && (i.displayMode = b.enum(["bar", "radial"]).optional()), t.legend && (i.legend = et.optional()), t.orientation && (i.orientation = S(b.enum(n)).optional()), t.treeLayout && (i.layout = b.object({
229
+ t.conditionalColoring && (r.coloring = M(t.conditionalColoring).optional()), t.dataLabels && (r.dataLabels = gt.optional()), t.gaugeDisplayMode && (r.displayMode = b.enum(["bar", "radial"]).optional()), t.legend && (r.legend = et.optional()), t.orientation && (r.orientation = S(b.enum(o)).optional()), t.treeLayout && (r.layout = b.object({
225
230
  compact: b.boolean().optional(),
226
231
  direction: b.enum([
227
232
  "bottom",
@@ -232,13 +237,13 @@ var dt = b.object({
232
237
  forceAutoFit: b.boolean().optional(),
233
238
  initialExpandedLevels: b.number().int().min(0).optional()
234
239
  }).strict().optional());
235
- let a = {
236
- data: b.object(r).strict(),
240
+ let i = {
241
+ data: b.object(n).strict(),
237
242
  filterGroup: k.optional(),
238
243
  type: b.literal(e),
239
244
  version: b.literal(1)
240
245
  };
241
- return t.queryLimit && (a.limiting = b.object({ queryLimit: b.number().int().positive().optional() }).strict().optional()), Object.keys(i).length > 0 && (a.presentation = b.object(i).strict().optional()), t.sorting && (a.sorting = b.array(A).optional()), b.object(a).strict().superRefine((n, r) => {
246
+ return t.queryLimit && (i.limiting = b.object({ queryLimit: b.number().int().positive().optional() }).strict().optional()), Object.keys(r).length > 0 && (i.presentation = b.object(r).strict().optional()), t.sorting && (i.sorting = b.array(A).optional()), b.object(i).strict().superRefine((n, r) => {
242
247
  let i = n.data, a = t.validateCounts?.(i.dimensions?.length ?? 0, i.measures?.length ?? 0);
243
248
  a && r.addIssue({
244
249
  code: "custom",
@@ -252,8 +257,9 @@ var dt = b.object({
252
257
  path: ["presentation", "coloring"]
253
258
  }), t.validateDefinition?.(n, r);
254
259
  });
255
- }, _t = P("combo", {
260
+ }, vt = P("combo", {
256
261
  axes: !0,
262
+ dimensionLabelWrap: !0,
257
263
  comboSeriesTypes: !0,
258
264
  dataLabels: !0,
259
265
  dimensions: {
@@ -302,7 +308,7 @@ var dt = b.object({
302
308
  });
303
309
  });
304
310
  }
305
- }), vt = P("dot", {
311
+ }), yt = P("dot", {
306
312
  conditionalColoring: { rules: !0 },
307
313
  axes: !0,
308
314
  dimensions: {
@@ -316,7 +322,7 @@ var dt = b.object({
316
322
  },
317
323
  orientation: !0,
318
324
  rangedMeasureAxes: ["primaryMeasure"]
319
- }), yt = P("scatter", {
325
+ }), bt = P("scatter", {
320
326
  conditionalColoring: { rules: !0 },
321
327
  axes: !0,
322
328
  dimensions: {
@@ -331,7 +337,7 @@ var dt = b.object({
331
337
  queryLimit: !0,
332
338
  rangedMeasureAxes: ["primaryMeasure", "secondaryMeasure"],
333
339
  sorting: !0
334
- }), bt = P("histogram", {
340
+ }), xt = P("histogram", {
335
341
  axes: !0,
336
342
  dimensions: {
337
343
  min: 1,
@@ -345,7 +351,7 @@ var dt = b.object({
345
351
  },
346
352
  orientation: !0,
347
353
  rangedMeasureAxes: ["primaryMeasure"]
348
- }), xt = P("heatMap", {
354
+ }), St = P("heatMap", {
349
355
  conditionalColoring: { rules: !0 },
350
356
  axes: !0,
351
357
  dimensions: {
@@ -360,7 +366,7 @@ var dt = b.object({
360
366
  queryLimit: !0,
361
367
  secondaryDimensionAxis: !0,
362
368
  sorting: !0
363
- }), St = P("radar", {
369
+ }), Ct = P("radar", {
364
370
  conditionalColoring: {
365
371
  minDimensions: 2,
366
372
  rules: !1
@@ -378,7 +384,7 @@ var dt = b.object({
378
384
  if (e === 0 && t < 2) return "Radar charts without dimensions require at least two measures.";
379
385
  if (e > 0 && t > 1) return "Radar charts with dimensions support exactly one measure.";
380
386
  }
381
- }), Ct = P("gauge", {
387
+ }), wt = P("gauge", {
382
388
  conditionalColoring: { rules: !0 },
383
389
  dimensions: {
384
390
  min: 0,
@@ -391,7 +397,7 @@ var dt = b.object({
391
397
  max: 20
392
398
  },
393
399
  validateCounts: (e, t) => e === 1 && t > 2 ? "Gauge charts with a dimension support at most two measures." : void 0
394
- }), wt = P("distribution-gauge", {
400
+ }), Tt = P("distribution-gauge", {
395
401
  conditionalColoring: { rules: !0 },
396
402
  dimensions: {
397
403
  min: 0,
@@ -403,7 +409,7 @@ var dt = b.object({
403
409
  min: 1,
404
410
  max: 20
405
411
  }
406
- }), Tt = P("pie", {
412
+ }), Et = P("pie", {
407
413
  conditionalColoring: { rules: !0 },
408
414
  dimensions: {
409
415
  min: 1,
@@ -416,7 +422,7 @@ var dt = b.object({
416
422
  },
417
423
  queryLimit: !0,
418
424
  sorting: !0
419
- }), Et = P("tree", {
425
+ }), Dt = P("tree", {
420
426
  dimensions: {
421
427
  min: 0,
422
428
  max: 10
@@ -429,7 +435,7 @@ var dt = b.object({
429
435
  sorting: !0,
430
436
  treeLayout: !0,
431
437
  validateCounts: (e, t) => e + t === 0 ? "Tree charts require at least one dimension or measure." : e > 0 && t > 1 ? "Tree charts with dimensions support at most one measure." : void 0
432
- }), Dt = P("treemap", {
438
+ }), Ot = P("treemap", {
433
439
  conditionalColoring: { rules: !0 },
434
440
  dimensions: {
435
441
  min: 1,
@@ -440,7 +446,7 @@ var dt = b.object({
440
446
  min: 1,
441
447
  max: 1
442
448
  }
443
- }), Ot = P("sankey", {
449
+ }), kt = P("sankey", {
444
450
  conditionalColoring: {
445
451
  requiresOverwriteDimension: !0,
446
452
  rules: !0
@@ -453,12 +459,12 @@ var dt = b.object({
453
459
  min: 1,
454
460
  max: 1
455
461
  }
456
- }), kt = P("waterfall", {
462
+ }), At = P("waterfall", {
457
463
  axes: !0,
458
464
  dataLabels: !0,
459
465
  dimensions: {
460
466
  min: 0,
461
- max: 0
467
+ max: 1
462
468
  },
463
469
  measureAxisBands: !0,
464
470
  measures: {
@@ -466,8 +472,9 @@ var dt = b.object({
466
472
  max: 100
467
473
  },
468
474
  orientation: !0,
469
- rangedMeasureAxes: ["primaryMeasure"]
470
- }), At = P("word-cloud", {
475
+ rangedMeasureAxes: ["primaryMeasure"],
476
+ validateCounts: (e, t) => e === 1 && t !== 2 ? "Waterfall charts with a dimension require exactly two measures." : void 0
477
+ }), jt = P("word-cloud", {
471
478
  conditionalColoring: { rules: !0 },
472
479
  dimensions: {
473
480
  min: 1,
@@ -477,38 +484,38 @@ var dt = b.object({
477
484
  min: 1,
478
485
  max: 1
479
486
  }
480
- }), jt = b.enum(["dropdown", "listbox"]), Mt = b.object({
481
- mode: jt.optional(),
487
+ }), Mt = b.enum(["dropdown", "listbox"]), Nt = b.object({
488
+ mode: Mt.optional(),
482
489
  quickSelect: b.boolean().optional(),
483
490
  responsive: b.boolean().optional(),
484
491
  searchable: b.boolean().optional(),
485
492
  showProgressBar: b.boolean().optional()
486
- }).strict(), Nt = b.object({
493
+ }).strict(), Pt = b.object({
487
494
  data: b.object({ field: D.omit({
488
495
  format: !0,
489
496
  showNullValues: !0,
490
497
  temporalGrouping: !0
491
498
  }) }).strict(),
492
- presentation: Mt.optional(),
499
+ presentation: Nt.optional(),
493
500
  type: b.literal("filter"),
494
501
  version: b.literal(1)
495
- }).strict(), Pt = O.omit({ dataLabels: !0 }).extend({
502
+ }).strict(), Ft = O.omit({ dataLabels: !0 }).extend({
496
503
  axis: b.enum(["primary", "secondary"]).optional(),
497
- dataPointShape: S(ee.shape.dataPointShape)
498
- }), Ft = b.object({
499
- density: ce.optional(),
504
+ dataPointShape: S(ne.shape.dataPointShape)
505
+ }), It = b.object({
506
+ density: se.optional(),
500
507
  visible: b.boolean()
501
- }).strict(), It = dt.extend({
508
+ }).strict(), Lt = ft.extend({
502
509
  coloring: M({ rules: !1 }).optional(),
503
- dataLabels: Ft.optional()
504
- }), Lt = b.object({
510
+ dataLabels: It.describe("Value labels on every line point. Omit to show none.").optional()
511
+ }), Rt = b.object({
505
512
  data: b.object({
506
513
  dimensions: b.array(D).min(1),
507
- measures: b.array(Pt).min(1)
514
+ measures: b.array(Ft).min(1)
508
515
  }).strict(),
509
516
  filterGroup: k.optional(),
510
517
  limiting: b.object({ queryLimit: b.number().int().positive().optional() }).strict().optional(),
511
- presentation: It.optional(),
518
+ presentation: Lt.optional(),
512
519
  sorting: b.array(A).optional(),
513
520
  type: b.literal("line"),
514
521
  version: b.literal(1)
@@ -529,14 +536,14 @@ var dt = b.object({
529
536
  ]
530
537
  });
531
538
  });
532
- }), Rt = D.pick({
539
+ }), zt = D.pick({
533
540
  fieldKey: !0,
534
541
  ref: !0
535
- }), zt = O.pick({
542
+ }), Bt = O.pick({
536
543
  aggregation: !0,
537
544
  fieldKey: !0,
538
545
  ref: !0
539
- }), Bt = zt.extend({ role: b.enum([
546
+ }), Vt = Bt.extend({ role: b.enum([
540
547
  "geo",
541
548
  "secondGeo",
542
549
  "thirdGeo",
@@ -549,21 +556,21 @@ var dt = b.object({
549
556
  "geoHash"
550
557
  ]), I = b.object({
551
558
  name: b.string().trim().min(1).optional(),
552
- ref: C.describe("Reference unique among all layers and data items; resolvedRefs returns it as { kind: \"layer\", id }."),
559
+ ref: C.describe("Reference unique among all layers and data items; resolvedLayerRefs returns it as { kind: \"layer\", id }."),
553
560
  visible: b.boolean().optional()
554
- }), Vt = b.object({
555
- dimensions: b.array(Rt).length(1),
556
- measures: b.array(Bt).min(1),
557
- supportingMeasures: b.array(zt).optional()
561
+ }), Ht = b.object({
562
+ dimensions: b.array(zt).length(1),
563
+ measures: b.array(Vt).min(1),
564
+ supportingMeasures: b.array(Bt).optional()
558
565
  }).strict(), L = I.extend({
559
- data: Vt,
566
+ data: Ht,
560
567
  filterGroup: k.optional()
561
- }), Ht = Ce.partial().strict(), R = b.object({
562
- color: h.optional(),
563
- opacity: xe
564
- }).strict(), Ut = I.extend({
568
+ }), Ut = ye.partial().strict(), R = b.object({
569
+ color: m.optional(),
570
+ opacity: de
571
+ }).strict(), Wt = I.extend({
565
572
  type: b.literal("map"),
566
- presentation: S(ge.pick({
573
+ presentation: S(ue.pick({
567
574
  mapType: !0,
568
575
  opacity: !0,
569
576
  apiKey: !0,
@@ -582,68 +589,68 @@ var dt = b.object({
582
589
  "dark"
583
590
  ])
584
591
  }).partial().strict()).optional()
585
- }).strict(), Wt = I.extend({
592
+ }).strict(), Gt = I.extend({
586
593
  type: b.literal("image"),
587
- image: we.shape.image.strict(),
588
- position: we.shape.position.strict(),
589
- opacity: xe
590
- }).strict(), Gt = L.extend({
594
+ image: Se.shape.image.strict(),
595
+ position: Se.shape.position.strict(),
596
+ opacity: de
597
+ }).strict(), Kt = L.extend({
591
598
  type: b.literal("point"),
592
599
  locationType: F,
593
600
  presentation: S(R.extend({
594
- shape: pe.shape.shape,
595
- sizing: Ht.optional(),
601
+ shape: Te.shape.shape,
602
+ sizing: Ut.optional(),
596
603
  labelsVisible: b.boolean().optional()
597
604
  }).strict()).optional()
598
- }).strict(), Kt = L.extend({
605
+ }).strict(), qt = L.extend({
599
606
  type: b.literal("shape"),
600
607
  presentation: S(R.extend({
601
- strokeEnabled: g.shape.strokeEnabled,
602
- strokeColor: g.shape.strokeColor,
603
- strokeWidth: g.shape.strokeWidth,
608
+ strokeEnabled: v.shape.strokeEnabled,
609
+ strokeColor: v.shape.strokeColor,
610
+ strokeWidth: v.shape.strokeWidth,
604
611
  labelsVisible: b.boolean().optional()
605
612
  }).strict()).optional()
606
- }).strict(), qt = L.extend({
613
+ }).strict(), Jt = L.extend({
607
614
  type: b.literal("heatMap"),
608
615
  locationType: F,
609
616
  presentation: S(b.object({
610
- heat: ye.pick({
617
+ heat: he.pick({
611
618
  radius: !0,
612
619
  maxZoom: !0,
613
620
  blur: !0,
614
621
  changeHeatWhenZooming: !0
615
622
  }).partial().strict().optional(),
616
- value: de.partial().strict().optional()
623
+ value: fe.partial().strict().optional()
617
624
  }).strict()).optional()
618
- }).strict(), Jt = L.extend({
625
+ }).strict(), Yt = L.extend({
619
626
  type: b.literal("pointConnection"),
620
- data: Vt.extend({ dimensions: b.array(Rt).length(2) }).strict(),
627
+ data: Ht.extend({ dimensions: b.array(zt).length(2) }).strict(),
621
628
  locationType: F,
622
629
  secondLocationType: F,
623
630
  presentation: S(R.extend({
624
- sizing: Ht.optional(),
631
+ sizing: Ut.optional(),
625
632
  useGeodesicLines: b.boolean().optional(),
626
- lineStyle: _e.shape.lineStyle.optional(),
627
- arrow: Ee.partial().strict().optional()
633
+ lineStyle: le.shape.lineStyle.optional(),
634
+ arrow: pe.partial().strict().optional()
628
635
  }).strict()).optional()
629
- }).strict(), Yt = b.discriminatedUnion("type", [
630
- Ut,
636
+ }).strict(), Xt = b.discriminatedUnion("type", [
631
637
  Wt,
632
638
  Gt,
633
639
  Kt,
634
640
  qt,
635
- Jt
636
- ]), Xt = b.object({
641
+ Jt,
642
+ Yt
643
+ ]), Zt = b.object({
637
644
  type: b.literal("map"),
638
645
  version: b.literal(1),
639
- layers: b.array(Yt).min(1).describe("Layers in stacking order, topmost first. Include a map layer explicitly when a basemap is wanted."),
640
- view: S(ue.partial().strict()).optional()
641
- }).strict(), Zt = b.object({
646
+ layers: b.array(Xt).min(1).describe("Layers in stacking order, topmost first. Include a map layer explicitly when a basemap is wanted."),
647
+ view: S(_e.partial().strict()).optional()
648
+ }).strict(), Qt = b.object({
642
649
  data: b.object({ measure: O.omit({ dataLabels: !0 }) }).strict(),
643
650
  filterGroup: k.optional(),
644
651
  type: b.literal("number"),
645
652
  version: b.literal(1)
646
- }).strict(), Qt = S(re.pick({
653
+ }).strict(), $t = S(Oe.pick({
647
654
  endDateLabel: !0,
648
655
  pickerState: !0,
649
656
  pickerType: !0,
@@ -652,32 +659,32 @@ var dt = b.object({
652
659
  startDateLabel: !0,
653
660
  timePickerVisibility: !0,
654
661
  weekStart: !0
655
- }).partial()), $t = b.object({
662
+ }).partial()), en = b.object({
656
663
  data: b.object({ field: D.omit({
657
664
  format: !0,
658
665
  showNullValues: !0,
659
666
  temporalGrouping: !0
660
667
  }) }).strict(),
661
- settings: Qt.optional(),
668
+ settings: $t.optional(),
662
669
  type: b.literal("date-picker"),
663
670
  version: b.literal(1)
664
- }).strict(), en = b.object({
671
+ }).strict(), tn = b.object({
665
672
  settings: b.object({ url: b.string().url().nullable() }).strict(),
666
673
  type: b.literal("iframe"),
667
674
  version: b.literal(1)
668
- }).strict(), tn = b.object({
675
+ }).strict(), nn = b.object({
669
676
  settings: S(b.object({
670
- blur: m.shape.blur.optional(),
671
- fit: m.shape.image.unwrap().shape.imageFit.optional(),
672
- opacity: m.shape.opacity.optional(),
673
- saturation: m.shape.saturation.optional(),
674
- shadow: m.shape.shadow.optional(),
677
+ blur: f.shape.blur.optional(),
678
+ fit: f.shape.image.unwrap().shape.imageFit.optional(),
679
+ opacity: f.shape.opacity.optional(),
680
+ saturation: f.shape.saturation.optional(),
681
+ shadow: f.shape.shadow.optional(),
675
682
  source: Ae.optional()
676
683
  }).strict()),
677
684
  type: b.literal("image"),
678
685
  version: b.literal(1)
679
- }).strict(), nn = b.object({
680
- settings: S(Te.pick({
686
+ }).strict(), rn = b.object({
687
+ settings: S(Ce.pick({
681
688
  backgroundColor: !0,
682
689
  backgroundType: !0,
683
690
  borderEnabled: !0,
@@ -694,7 +701,7 @@ var dt = b.object({
694
701
  }).partial().strict()),
695
702
  type: b.literal("shape"),
696
703
  version: b.literal(1)
697
- }).strict(), z = be.shape.simpleTextObjectSettings, rn = b.object({
704
+ }).strict(), z = ge.shape.simpleTextObjectSettings, an = b.object({
698
705
  settings: S(b.object({
699
706
  align: z.shape.align.optional(),
700
707
  content: b.string().optional(),
@@ -708,24 +715,24 @@ var dt = b.object({
708
715
  }).strict()),
709
716
  type: b.literal("simpleTextObject"),
710
717
  version: b.literal(1)
711
- }).strict(), an = b.object({
718
+ }).strict(), on = b.object({
712
719
  settings: S(b.object({
713
- customLabel: f.shape.commonSettings.shape.customLabel.optional(),
714
- hideLabel: f.shape.commonSettings.shape.hideLabel.optional(),
715
- inputType: f.shape.type.optional(),
716
- placeholder: f.shape.commonSettings.shape.placeholder.optional(),
717
- responsive: f.shape.commonSettings.shape.responsive.optional(),
718
- variableId: f.shape.commonSettings.shape.variableId.optional()
720
+ customLabel: p.shape.commonSettings.shape.customLabel.optional(),
721
+ hideLabel: p.shape.commonSettings.shape.hideLabel.optional(),
722
+ inputType: p.shape.type.optional(),
723
+ placeholder: p.shape.commonSettings.shape.placeholder.optional(),
724
+ responsive: p.shape.commonSettings.shape.responsive.optional(),
725
+ variableId: p.shape.commonSettings.shape.variableId.optional()
719
726
  }).strict()),
720
727
  type: b.literal("atomic-input"),
721
728
  version: b.literal(1)
722
- }).strict(), on = b.object({
729
+ }).strict(), sn = b.object({
723
730
  data: b.object({ field: D.omit({
724
731
  format: !0,
725
732
  showNullValues: !0,
726
733
  temporalGrouping: !0
727
734
  }) }).strict(),
728
- settings: S(me.pick({
735
+ settings: S(xe.pick({
729
736
  layout: !0,
730
737
  quickSelect: !0,
731
738
  range: !0,
@@ -733,38 +740,38 @@ var dt = b.object({
733
740
  }).partial()).optional(),
734
741
  type: b.literal("slider"),
735
742
  version: b.literal(1)
736
- }).strict(), sn = D.extend({ role: b.literal("dimension") }), B = O.omit({ dataLabels: !0 }), cn = B.extend({ role: b.literal("measure") }), ln = b.object({
737
- columns: b.array(b.discriminatedUnion("role", [sn, cn])).min(1),
743
+ }).strict(), cn = D.extend({ role: b.literal("dimension") }), B = O.omit({ dataLabels: !0 }), ln = B.extend({ role: b.literal("measure") }), un = b.object({
744
+ columns: b.array(b.discriminatedUnion("role", [cn, ln])).min(1),
738
745
  structure: b.literal("normal").optional()
739
- }).strict(), un = b.object({
746
+ }).strict(), dn = b.object({
740
747
  dimensions: b.array(D).min(1),
741
748
  measures: b.array(B).min(1),
742
749
  structure: b.literal("expandable")
743
- }).strict(), dn = b.object({
750
+ }).strict(), fn = b.object({
744
751
  columnDimensions: b.array(D).min(1),
745
752
  measures: b.array(B).min(1),
746
753
  rowDimensions: b.array(D).min(1),
747
754
  structure: b.literal("pivot")
748
- }).strict(), fn = b.union([
749
- ln,
755
+ }).strict(), pn = b.union([
750
756
  un,
751
- dn
752
- ]), pn = b.object({
753
- applyTo: p.shape.applyTo,
754
- enabled: p.shape.enabled,
755
- showRecordsCount: p.shape.showRecordsCount,
757
+ dn,
758
+ fn
759
+ ]), mn = b.object({
760
+ applyTo: _.shape.applyTo,
761
+ enabled: _.shape.enabled,
762
+ showRecordsCount: _.shape.showRecordsCount,
756
763
  style: b.object({
757
- backgroundColor: _.shape.backgroundColor.optional(),
758
- fontColor: _.shape.fontColor.optional(),
759
- fontStyle: v.optional(),
760
- position: _.shape.position.optional(),
761
- responsiveHeight: _.shape.responsive
764
+ backgroundColor: g.shape.backgroundColor.optional(),
765
+ fontColor: g.shape.fontColor.optional(),
766
+ fontStyle: h.optional(),
767
+ position: g.shape.position.optional(),
768
+ responsiveHeight: g.shape.responsive
762
769
  }).strict().optional()
763
- }).strict(), mn = b.object({
770
+ }).strict(), hn = b.object({
764
771
  background: b.object({
765
- color: h.optional(),
766
- evenColor: h.optional(),
767
- oddColor: h.optional(),
772
+ color: m.optional(),
773
+ evenColor: m.optional(),
774
+ oddColor: m.optional(),
768
775
  type: b.enum([
769
776
  "none",
770
777
  "single",
@@ -772,10 +779,10 @@ var dt = b.object({
772
779
  ])
773
780
  }).strict().optional(),
774
781
  body: b.object({
775
- fontColor: h.optional(),
782
+ fontColor: m.optional(),
776
783
  fontFamily: b.string().trim().min(1).optional(),
777
784
  fontSize: b.number().positive().optional(),
778
- fontStyle: v.optional(),
785
+ fontStyle: h.optional(),
779
786
  horizontalAlign: b.enum([
780
787
  "auto",
781
788
  "center",
@@ -790,8 +797,8 @@ var dt = b.object({
790
797
  ]).optional()
791
798
  }).strict().optional(),
792
799
  borders: b.object({
793
- color: h.optional(),
794
- dividerColor: h.optional(),
800
+ color: m.optional(),
801
+ dividerColor: m.optional(),
795
802
  dividers: b.enum([
796
803
  "all",
797
804
  "auto",
@@ -809,41 +816,41 @@ var dt = b.object({
809
816
  strokeWidth: b.number().nonnegative().optional()
810
817
  }).strict().optional(),
811
818
  header: b.object({
812
- backgroundColor: h.optional(),
813
- borderColor: h.optional(),
814
- fontColor: h.optional(),
819
+ backgroundColor: m.optional(),
820
+ borderColor: m.optional(),
821
+ fontColor: m.optional(),
815
822
  fontFamily: b.string().trim().min(1).optional(),
816
823
  fontSize: b.number().positive().optional(),
817
- fontStyle: v.optional(),
824
+ fontStyle: h.optional(),
818
825
  responsiveHeight: b.boolean().optional()
819
826
  }).strict().optional(),
820
827
  highlight: b.object({
821
- backgroundColor: h.optional(),
828
+ backgroundColor: m.optional(),
822
829
  mode: b.enum([
823
830
  "column",
824
831
  "none",
825
832
  "row",
826
833
  "row-and-column"
827
834
  ]),
828
- textColor: h.optional()
835
+ textColor: m.optional()
829
836
  }).strict().optional(),
830
837
  layout: b.object({
831
838
  columnWidthBehavior: b.enum(["responsive", "static"]).optional(),
832
839
  rowHeight: b.number().positive().optional()
833
840
  }).strict().optional()
834
- }).strict(), hn = b.object({
835
- data: fn,
841
+ }).strict(), gn = b.object({
842
+ data: pn,
836
843
  filterGroup: k.optional(),
837
844
  limiting: b.object({ queryLimit: b.number().int().positive().optional() }).strict().optional(),
838
- presentation: mn.optional(),
845
+ presentation: hn.optional(),
839
846
  sorting: b.array(A).optional(),
840
- totals: pn.optional(),
847
+ totals: mn.optional(),
841
848
  type: b.literal("table"),
842
849
  version: b.literal(1)
843
- }).strict(), V = (e) => typeof e == "object" && !!e && !Array.isArray(e), gn = (e) => {
850
+ }).strict(), V = (e) => typeof e == "object" && !!e && !Array.isArray(e), _n = (e) => {
844
851
  let t = e.fieldKey ?? e.key;
845
852
  return typeof t == "string" ? t : void 0;
846
- }, _n = (e) => {
853
+ }, vn = (e) => {
847
854
  if (Array.isArray(e)) return e;
848
855
  if (!V(e)) throw Error("Available field metadata must be an array or an object.");
849
856
  return [
@@ -856,7 +863,7 @@ var dt = b.object({
856
863
  if (!Array.isArray(n)) throw Error(`Available field metadata "${t}" must be an array.`);
857
864
  return n;
858
865
  });
859
- }, vn = (e, t) => {
866
+ }, yn = (e, t) => {
860
867
  let n = e.type;
861
868
  if (!(n === "dimension" && V(e.dimension) || n === "measure" && V(e.measure) || n === "calculation" && V(e.calculation))) return;
862
869
  let r = E.safeParse({
@@ -867,11 +874,11 @@ var dt = b.object({
867
874
  });
868
875
  if (!r.success) throw Error(`Invalid available semantic item at index ${t}: ${r.error.message}`);
869
876
  return r.data;
870
- }, yn = (e, t) => {
877
+ }, bn = (e, t) => {
871
878
  if (!V(e)) throw Error(`Available field at index ${t} must be an object.`);
872
879
  let n = E.safeParse(e);
873
880
  if (n.success) return n.data;
874
- let r = vn(e, t);
881
+ let r = yn(e, t);
875
882
  if (r) return r;
876
883
  let i = Array.isArray(e.aggregations) ? e.aggregations : Array.isArray(e.aggregators) ? e.aggregators : [], a = E.safeParse({
877
884
  aggregations: i.map((e) => V(e) ? {
@@ -880,7 +887,7 @@ var dt = b.object({
880
887
  resultType: e.resultType
881
888
  } : e),
882
889
  dataType: e.dataType,
883
- fieldKey: gn(e),
890
+ fieldKey: _n(e),
884
891
  isManualData: e.isManualData,
885
892
  kind: "field",
886
893
  name: e.name,
@@ -888,35 +895,35 @@ var dt = b.object({
888
895
  });
889
896
  if (!a.success) throw Error(`Invalid available field at index ${t}: ${a.error.message}`);
890
897
  return a.data;
891
- }, bn = (e) => {
892
- let t = _n(e).map(yn), n = /* @__PURE__ */ new Map();
898
+ }, xn = (e) => {
899
+ let t = vn(e).map(bn), n = /* @__PURE__ */ new Map();
893
900
  return t.forEach((e, t) => {
894
901
  let r = n.get(e.fieldKey);
895
902
  if (r !== void 0) throw Error(`Duplicate available field key "${e.fieldKey}" at indexes ${r} and ${t}.`);
896
903
  n.set(e.fieldKey, t);
897
904
  }), t;
898
- }, xn = (e) => e.kind === "field" ? [...new Set(e.aggregations.flatMap((e) => [e.name, ...e.distinct ? [`${e.name}_DISTINCT`] : []]))] : [], Sn = (e, t) => e.kind === "field" || t === "dimension" && e.kind === "dimension" || t === "measure" && (e.kind === "measure" || e.kind === "calculation"), Cn = (e) => {
905
+ }, Sn = (e) => e.kind === "field" ? [...new Set(e.aggregations.flatMap((e) => [e.name, ...e.distinct ? [`${e.name}_DISTINCT`] : []]))] : [], Cn = (e, t) => e.kind === "field" || t === "dimension" && e.kind === "dimension" || t === "measure" && (e.kind === "measure" || e.kind === "calculation"), wn = (e) => {
899
906
  if (e.kind !== "dimension") return e.kind;
900
- }, wn = (e) => ({
901
- ...l(e.item),
907
+ }, Tn = (e) => ({
908
+ ...t(e.item),
902
909
  id: e.item.id ?? e.fieldKey
903
- }), Tn = (e) => e.map((e) => e.kind === "dimension" ? r(wn(e)) : e.kind === "measure" || e.kind === "calculation" ? u(wn(e)) : {
904
- aggregators: a(e.aggregations.map((e) => ({
910
+ }), En = (t) => t.map((t) => t.kind === "dimension" ? e(Tn(t)) : t.kind === "measure" || t.kind === "calculation" ? c(Tn(t)) : {
911
+ aggregators: n(t.aggregations.map((e) => ({
905
912
  distinct: e.distinct ?? !1,
906
913
  name: e.name,
907
914
  resultType: e.resultType
908
915
  }))),
909
- dataType: e.dataType,
910
- isManualData: e.isManualData,
911
- key: e.fieldKey,
912
- name: e.name,
913
- view: e.view,
914
- views: [e.view]
915
- }), En = (e, t) => {
916
+ dataType: t.dataType,
917
+ isManualData: t.isManualData,
918
+ key: t.fieldKey,
919
+ name: t.name,
920
+ view: t.view,
921
+ views: [t.view]
922
+ }), Dn = (e, t) => {
916
923
  let n = Math.min(e.length, t.length), r = 0;
917
924
  for (; r < n && e[r].toLocaleLowerCase() === t[r].toLocaleLowerCase();) r += 1;
918
925
  return r;
919
- }, Dn = (e, t) => [...t].sort((t, n) => En(e, n.fieldKey) - En(e, t.fieldKey) || t.fieldKey.localeCompare(n.fieldKey)).slice(0, 5).map((e) => e.fieldKey), On = [
926
+ }, On = (e, t) => [...t].sort((t, n) => Dn(e, n.fieldKey) - Dn(e, t.fieldKey) || t.fieldKey.localeCompare(n.fieldKey)).slice(0, 5).map((e) => e.fieldKey), kn = [
920
927
  x.FieldType.DATE,
921
928
  x.FieldType.TIME,
922
929
  x.FieldType.TIMESTAMP,
@@ -926,29 +933,29 @@ var dt = b.object({
926
933
  code: e,
927
934
  message: n,
928
935
  path: t
929
- }), kn = (t) => xn(t).filter((t) => !!e(t)), An = (e, t) => {
936
+ }), An = (e) => Sn(e).filter((e) => !!r(e)), U = (e, t) => {
930
937
  let n = t.find((t) => t.fieldKey === e.fieldKey);
931
- return n?.kind === "field" ? kn(n).find((t) => t.toLocaleUpperCase() === e.aggregation?.toLocaleUpperCase()) : void 0;
938
+ return n?.kind === "field" ? An(n).find((t) => t.toLocaleUpperCase() === e.aggregation?.toLocaleUpperCase()) : void 0;
932
939
  }, jn = (e, t) => {
933
940
  let n = t.find((t) => t.fieldKey === e.fieldKey);
934
- return n?.kind === "measure" ? n.item.measure.aggregation : An(e, t);
941
+ return n?.kind === "measure" ? n.item.measure.aggregation : U(e, t);
935
942
  }, Mn = (e, t, n = {}) => {
936
- let r = t.find((t) => t.fieldKey === e.fieldKey), i = r ? Cn(r) : void 0, a = An(e, t);
943
+ let r = t.find((t) => t.fieldKey === e.fieldKey), i = r ? wn(r) : void 0, a = U(e, t);
937
944
  return {
938
945
  ...n,
939
946
  key: e.fieldKey,
940
947
  ...i ? { sourceKind: i } : {},
941
948
  ...a ? { aggregation: a } : {}
942
949
  };
943
- }, U = (e, t, n, r) => {
950
+ }, W = (e, t, n, r) => {
944
951
  let i = t.find((t) => t.fieldKey === e.fieldKey);
945
- if (!i) return [H("unknown_field_key", [...n, "fieldKey"], `Field key "${e.fieldKey}" is not available.`, Dn(e.fieldKey, t))];
946
- if (!Sn(i, r)) return [H("invalid_field_role", [...n, "fieldKey"], `Available item "${e.fieldKey}" of kind "${i.kind}" cannot be used as a ${r}.`)];
947
- if (r !== "measure") return e.temporalGrouping ? Pn(e, t, n, On, "a temporally grouped dimension") : [];
952
+ if (!i) return [H("unknown_field_key", [...n, "fieldKey"], `Field key "${e.fieldKey}" is not available.`, On(e.fieldKey, t))];
953
+ if (!Cn(i, r)) return [H("invalid_field_role", [...n, "fieldKey"], `Available item "${e.fieldKey}" of kind "${i.kind}" cannot be used as a ${r}.`)];
954
+ if (r !== "measure") return e.temporalGrouping ? Pn(e, t, n, kn, "a temporally grouped dimension") : [];
948
955
  if (i.kind !== "field") return e.aggregation === void 0 ? [] : [H("invalid_aggregation", [...n, "aggregation"], `Aggregation must be omitted for semantic ${i.kind} "${e.fieldKey}".`)];
949
- let a = kn(i);
956
+ let a = An(i);
950
957
  return e.aggregation ? a.some((t) => t.toLocaleUpperCase() === e.aggregation?.toLocaleUpperCase()) ? [] : [H("invalid_aggregation", [...n, "aggregation"], `Aggregation "${e.aggregation}" is not available for field key "${e.fieldKey}".`, a)] : [H("invalid_aggregation", [...n, "aggregation"], `Aggregation is required for raw field "${e.fieldKey}" when it is used as a measure.`, a)];
951
- }, Nn = (e, t, n, r) => e.flatMap((e, i) => U(e, t, [...n, i], r)), Pn = (e, t, n, r, i) => {
958
+ }, Nn = (e, t, n, r) => e.flatMap((e, i) => W(e, t, [...n, i], r)), Pn = (e, t, n, r, i) => {
952
959
  let a = t.find((t) => t.fieldKey === e.fieldKey);
953
960
  return a?.kind !== "field" || r.includes(a.dataType) ? [] : [H("invalid_field_role", [...n, "fieldKey"], `Raw field "${e.fieldKey}" has data type "${a.dataType}" and cannot be used as ${i}.`, [...r])];
954
961
  }, Fn = (e, t, n = ["filterGroup"]) => e ? e.filters.flatMap((e, r) => {
@@ -957,25 +964,30 @@ var dt = b.object({
957
964
  "filters",
958
965
  r
959
966
  ];
960
- return "filters" in e ? Fn(e, t, i) : U({
967
+ if ("filters" in e) return Fn(e, t, i);
968
+ let a = W({
961
969
  fieldKey: e.fieldKey,
962
970
  ref: `filter:${r}`
963
971
  }, t, i, "dimension");
964
- }) : [], W = (e) => e.reduce((e, t) => typeof t == "number" ? `${e}[${t}]` : /^[A-Za-z_$][\w$]*$/.test(t) ? e ? `${e}.${t}` : t : `${e}[${JSON.stringify(t)}]`, "") || "definition", G = (e) => {
972
+ return a.length > 0 ? a : In(e.fieldKey, t, i);
973
+ }) : [], In = (e, t, n) => {
974
+ let r = t.find((t) => t.fieldKey === e);
975
+ return r?.kind !== "field" || r.dataType === void 0 || r.dataType === x.FieldType.STRING ? [] : [H("invalid_filter", [...n, "fieldKey"], `Static filters only support string fields, but "${e}" has data type "${r.dataType}". Filter a string field instead.`)];
976
+ }, G = (e) => e.reduce((e, t) => typeof t == "number" ? `${e}[${t}]` : /^[A-Za-z_$][\w$]*$/.test(t) ? e ? `${e}.${t}` : t : `${e}[${JSON.stringify(t)}]`, "") || "definition", K = (e) => {
965
977
  if (typeof e == "number" && !Number.isFinite(e)) return String(e);
966
978
  try {
967
979
  return JSON.stringify(e) ?? String(e);
968
980
  } catch {
969
981
  return String(e);
970
982
  }
971
- }, K = (e, t) => t.reduce((e, t) => typeof e == "object" && e && Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0, e), In = (e) => {
983
+ }, q = (e, t) => t.reduce((e, t) => typeof e == "object" && e && Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0, e), Ln = (e) => {
972
984
  if (e.code === "invalid_value") return e.values;
973
985
  if (e.code !== "invalid_union" || e.errors.length === 0) return;
974
- let t = e.errors.map((e) => e.length === 1 && e[0].path.length === 0 ? In(e[0]) : void 0);
986
+ let t = e.errors.map((e) => e.length === 1 && e[0].path.length === 0 ? Ln(e[0]) : void 0);
975
987
  return t.every((e) => e !== void 0) ? [...new Set(t.flat())] : void 0;
976
- }, Ln = (e) => e.filter((e) => typeof e != "symbol"), Rn = (e, t, n = []) => {
977
- let r = (e, n) => e.code === "invalid_union" && e.path.length === 0 ? e.errors.length > 0 && e.errors.every((e) => e.some((e) => r(e, n))) : e.code === "invalid_value" && e.path.length === 1 && K(t, [...n, ...Ln(e.path)]) !== void 0, i = (e, a) => {
978
- let o = [...a, ...Ln(e.path)];
988
+ }, Rn = (e) => e.filter((e) => typeof e != "symbol"), zn = (e, t, n = []) => {
989
+ let r = (e, n) => e.code === "invalid_union" && e.path.length === 0 ? e.errors.length > 0 && e.errors.every((e) => e.some((e) => r(e, n))) : e.code === "invalid_value" && e.path.length === 1 && q(t, [...n, ...Rn(e.path)]) !== void 0, i = (e, a) => {
990
+ let o = [...a, ...Rn(e.path)];
979
991
  if (e.code === "unrecognized_keys") return e.keys.map((r) => {
980
992
  let i = [
981
993
  ...n,
@@ -985,17 +997,17 @@ var dt = b.object({
985
997
  return {
986
998
  code: "invalid_structure",
987
999
  path: i,
988
- message: `${W(i)}: Unrecognized key.`,
1000
+ message: `${G(i)}: Unrecognized key.`,
989
1001
  details: {
990
- received: K(t, [...o, r]),
1002
+ received: q(t, [...o, r]),
991
1003
  zodCode: e.code
992
1004
  }
993
1005
  };
994
1006
  });
995
- let s = [...n, ...o], c = K(t, o), l = In(e), u = {
1007
+ let s = [...n, ...o], c = q(t, o), l = Ln(e), u = {
996
1008
  received: c,
997
1009
  zodCode: e.code
998
- }, d = l ? `Unsupported value ${G(c)}. Allowed values: ${l.map(G).join(", ")}.` : `${e.message}. Received: ${G(c)}.`;
1010
+ }, d = l ? `Unsupported value ${K(c)}. Allowed values: ${l.map(K).join(", ")}.` : `${e.message}. Received: ${K(c)}.`;
999
1011
  if (e.code === "invalid_union" && !l && e.errors.length > 0) {
1000
1012
  let t = e.errors, n = t.filter((e) => !e.some((e) => r(e, o))), a = n.length > 0 ? n : t, s = a.length === 1 ? a : a.filter((e) => !e.some((e) => e.code === "unrecognized_keys"));
1001
1013
  if (s.length === 1) return s[0].flatMap((e) => i(e, o));
@@ -1005,41 +1017,41 @@ var dt = b.object({
1005
1017
  return [{
1006
1018
  code: "invalid_structure",
1007
1019
  path: s,
1008
- message: `${W(s)}: ${d}`,
1020
+ message: `${G(s)}: ${d}`,
1009
1021
  details: u,
1010
1022
  ...l ? { allowedValues: l } : {}
1011
1023
  }];
1012
1024
  };
1013
1025
  return e.issues.flatMap((e) => i(e, []));
1014
1026
  };
1015
- s();
1016
- var zn = (e, n) => {
1017
- let r = "legend" in e && !!e.legend, i = n.position !== void 0 || n.title !== void 0, a = [];
1018
- return n.visible !== void 0 && (n.visible || i || r) ? a.push({
1027
+ l();
1028
+ var Bn = (e, t) => {
1029
+ let n = "legend" in e && !!e.legend, r = t.position !== void 0 || t.title !== void 0, i = [];
1030
+ return t.visible !== void 0 && (t.visible || r || n) ? i.push({
1019
1031
  name: "setLegendEnabled",
1020
- payload: n.visible
1021
- }) : n.visible === void 0 && i && !r && a.push({
1032
+ payload: t.visible
1033
+ }) : t.visible === void 0 && r && !n && i.push({
1022
1034
  name: "setLegendEnabled",
1023
1035
  payload: !0
1024
- }), n.position === void 0 ? (n.visible === !0 || i && !r) && a.push({
1036
+ }), t.position === void 0 ? (t.visible === !0 || r && !n) && i.push({
1025
1037
  name: "setLegendPosition",
1026
- payload: t.Right
1027
- }) : a.push({
1038
+ payload: a.Right
1039
+ }) : i.push({
1028
1040
  name: "setLegendPosition",
1029
- payload: n.position
1030
- }), n.title !== void 0 && a.push({
1041
+ payload: t.position
1042
+ }), t.title !== void 0 && i.push({
1031
1043
  name: "setLegendTitle",
1032
- payload: n.title
1033
- }), a;
1034
- }, q = (e, t, n, r = {}) => ({
1044
+ payload: t.title
1045
+ }), i;
1046
+ }, J = (e, t, n, r = {}) => ({
1035
1047
  code: e,
1036
1048
  message: n,
1037
1049
  path: t,
1038
1050
  ...r
1039
- }), Bn = (e, t, n, r, i, a) => ({
1051
+ }), Vn = (e, t, n, r, i, a) => ({
1040
1052
  name: e,
1041
1053
  payload: {
1042
- ...J(t),
1054
+ ...Y(t),
1043
1055
  [i]: a
1044
1056
  },
1045
1057
  definitionContext: {
@@ -1052,7 +1064,7 @@ var zn = (e, n) => {
1052
1064
  ref: n,
1053
1065
  kind: t.kind
1054
1066
  }
1055
- }), Vn = (e, t, n, r, i, a, o) => ({
1067
+ }), Hn = (e, t, n, r, i, a, o) => ({
1056
1068
  name: e,
1057
1069
  payload: {
1058
1070
  name: t,
@@ -1068,32 +1080,32 @@ var zn = (e, n) => {
1068
1080
  ref: n,
1069
1081
  kind: o
1070
1082
  }
1071
- }), J = (e) => ({
1083
+ }), Y = (e) => ({
1072
1084
  dataItemInternalKey: e.dataItemInternalKey,
1073
1085
  dataItemUniqueSignature: e.dataItemUniqueSignature
1074
- }), Hn = (e) => {
1086
+ }), Un = (e) => {
1075
1087
  let t = [], n = /* @__PURE__ */ new Set();
1076
1088
  return e.forEach(({ items: e, path: r }) => {
1077
1089
  e.forEach((e, i) => {
1078
- n.has(e.ref) && t.push(q("duplicate_alias", [
1090
+ n.has(e.ref) && t.push(J("duplicate_alias", [
1079
1091
  ...r,
1080
1092
  i,
1081
1093
  "ref"
1082
1094
  ], `Reference "${e.ref}" is duplicated.`)), n.add(e.ref);
1083
1095
  });
1084
1096
  }), t;
1085
- }, Un = (e, t) => {
1097
+ }, Wn = (e, t) => {
1086
1098
  let n = e, r = n.referencedData;
1087
1099
  return t.every((e) => !Array.isArray(n[e]) || n[e].length === 0) && (typeof r != "object" || !r || Object.keys(r).length === 0);
1088
- }, Wn = (e, t) => ({
1089
- availableFields: Tn(e.availableFields),
1100
+ }, Gn = (e, t) => ({
1101
+ availableFields: En(e.availableFields),
1090
1102
  input: e,
1091
1103
  resolvedRefs: {},
1092
1104
  vSpec: t
1093
- }), Y = (e, t, n, r, i) => ({
1105
+ }), Kn = (e, t, n, r, i) => ({
1094
1106
  name: e,
1095
1107
  payload: {
1096
- ...J(t),
1108
+ ...Y(t),
1097
1109
  ...i
1098
1110
  },
1099
1111
  definitionContext: {
@@ -1102,7 +1114,7 @@ var zn = (e, n) => {
1102
1114
  ref: n,
1103
1115
  kind: t.kind
1104
1116
  }
1105
- }), Gn = (e) => "value" in e ? { value: e.value } : "values" in e ? {
1117
+ }), qn = (e) => "value" in e ? { value: e.value } : "values" in e ? {
1106
1118
  secondValue: e.values.join(","),
1107
1119
  value: ","
1108
1120
  } : "valueFrom" in e ? {
@@ -1112,40 +1124,40 @@ var zn = (e, n) => {
1112
1124
  filters: e.filters.map((e) => "filters" in e ? X(e) : {
1113
1125
  fieldKey: e.fieldKey,
1114
1126
  operator: e.operator,
1115
- values: Gn(e)
1127
+ values: qn(e)
1116
1128
  }),
1117
1129
  operator: e.operator
1118
- }), Kn = (e, t) => (e ?? []).flatMap((e, n) => t.includes(e.by) ? [] : [q("unknown_alias", [
1130
+ }), Jn = (e, t) => (e ?? []).flatMap((e, n) => t.includes(e.by) ? [] : [J("unknown_alias", [
1119
1131
  "sorting",
1120
1132
  n,
1121
1133
  "by"
1122
- ], `Reference "${e.by}" does not exist.`, { allowedValues: t })]), Z = ["presentation", "coloring"], qn = (e, t, n) => [...(e?.overwrites ?? []).flatMap(({ dimension: e }, n) => e === void 0 || t.includes(e) ? [] : [q("unknown_alias", [
1134
+ ], `Reference "${e.by}" does not exist.`, { allowedValues: t })]), Z = ["presentation", "coloring"], Yn = (e, t, n) => [...(e?.overwrites ?? []).flatMap(({ dimension: e }, n) => e === void 0 || t.includes(e) ? [] : [J("unknown_alias", [
1123
1135
  ...Z,
1124
1136
  "overwrites",
1125
1137
  n,
1126
1138
  "dimension"
1127
- ], `Dimension reference "${e}" does not exist.`, { allowedValues: t })]), ...(e?.rules ?? []).flatMap(({ measure: e }, t) => n.includes(e) ? [] : [q("unknown_alias", [
1139
+ ], `Dimension reference "${e}" does not exist.`, { allowedValues: t })]), ...(e?.rules ?? []).flatMap(({ measure: e }, t) => n.includes(e) ? [] : [J("unknown_alias", [
1128
1140
  ...Z,
1129
1141
  "rules",
1130
1142
  t,
1131
1143
  "measure"
1132
- ], `Measure reference "${e}" does not exist.`, { allowedValues: n })])], Jn = (e, t) => {
1144
+ ], `Measure reference "${e}" does not exist.`, { allowedValues: n })])], Xn = (e, t) => {
1133
1145
  let n = t.safeParse(e.vSpec);
1134
1146
  return n.success ? {
1135
1147
  resolvedRefs: e.resolvedRefs,
1136
1148
  success: !0,
1137
1149
  vSpec: n.data
1138
1150
  } : {
1139
- issues: [q("invalid_compiled_vspec", [], "Compiled vSpec failed final validation.", { details: { issues: n.error.issues } })],
1151
+ issues: [J("invalid_compiled_vspec", [], "Compiled vSpec failed final validation.", { details: { issues: n.error.issues } })],
1140
1152
  success: !1
1141
1153
  };
1142
- }, Q = (e) => "startsAtZero" in e ? {} : e, Yn = (e) => {
1154
+ }, Q = (e) => "startsAtZero" in e ? {} : e, Zn = (e) => {
1143
1155
  let { max: t, min: n } = Q(e);
1144
- return n !== void 0 && t !== void 0 ? c.MinMax : n === void 0 ? t === void 0 ? c.Auto : c.Max : c.Min;
1145
- }, Xn = (e) => {
1156
+ return n !== void 0 && t !== void 0 ? u.MinMax : n === void 0 ? t === void 0 ? u.Auto : u.Max : u.Min;
1157
+ }, Qn = (e) => {
1146
1158
  for (let [t, n] of Object.entries(e ?? {})) {
1147
1159
  let { max: e, min: r } = n?.range ? Q(n.range) : {};
1148
- if (r !== void 0 && e !== void 0 && r >= e) return q("invalid_structure", [
1160
+ if (r !== void 0 && e !== void 0 && r >= e) return J("invalid_structure", [
1149
1161
  "presentation",
1150
1162
  "axes",
1151
1163
  t,
@@ -1153,7 +1165,7 @@ var zn = (e, n) => {
1153
1165
  "min"
1154
1166
  ], `Axis range min (${r}) must be less than max (${e}).`);
1155
1167
  }
1156
- }, Zn = (e, t) => {
1168
+ }, $n = (e, t) => {
1157
1169
  let n = [];
1158
1170
  t.inverted !== void 0 && n.push({
1159
1171
  name: y.SET_INVERT_AXIS,
@@ -1168,7 +1180,7 @@ var zn = (e, n) => {
1168
1180
  name: y.SET_AXIS_RANGE_OPTION,
1169
1181
  payload: {
1170
1182
  axisName: e,
1171
- axisRangeOption: Yn(r)
1183
+ axisRangeOption: Zn(r)
1172
1184
  }
1173
1185
  });
1174
1186
  let { max: t, min: i } = Q(r);
@@ -1193,7 +1205,7 @@ var zn = (e, n) => {
1193
1205
  });
1194
1206
  }
1195
1207
  return n;
1196
- }, Qn = (e) => {
1208
+ }, er = (e) => {
1197
1209
  let t = Object.entries(e).find(([, e]) => e.success === !1);
1198
1210
  return t ? {
1199
1211
  id: t[0],
@@ -1207,7 +1219,7 @@ var zn = (e, n) => {
1207
1219
  id: e,
1208
1220
  name: t,
1209
1221
  payload: n
1210
- })), e.input.variables ?? [], [], e.input.theme), a = Qn(i.results);
1222
+ })), e.input.variables ?? [], [], e.input.theme), a = er(i.results);
1211
1223
  if (!a) return {
1212
1224
  state: {
1213
1225
  ...e,
@@ -1215,9 +1227,9 @@ var zn = (e, n) => {
1215
1227
  },
1216
1228
  success: !0
1217
1229
  };
1218
- let o = r.find((e) => e.id === a.id), s = o?.definitionContext, c = s?.path ?? n, l = o?.name ?? a.id, u = a.result.error ?? "Operation failed.", d = s ? `Cannot apply ${G(s.received)} to ${s.kind} ${G(s.ref)}` : "Operation failed";
1230
+ let o = r.find((e) => e.id === a.id), s = o?.definitionContext, c = s?.path ?? n, l = o?.name ?? a.id, u = a.result.error ?? "Operation failed.", d = s ? `Cannot apply ${K(s.received)} to ${s.kind} ${K(s.ref)}` : "Operation failed";
1219
1231
  return {
1220
- issue: q("operation_failed", c, `${W(c)}: ${d} (operation "${l}"): ${u}`, { details: {
1232
+ issue: J("operation_failed", c, `${G(c)}: ${d} (operation "${l}"): ${u}`, { details: {
1221
1233
  error: a.result.error,
1222
1234
  operationId: a.id,
1223
1235
  operationName: l,
@@ -1229,7 +1241,7 @@ var zn = (e, n) => {
1229
1241
  } }),
1230
1242
  success: !1
1231
1243
  };
1232
- }, $n = (e, t) => {
1244
+ }, tr = (e, t) => {
1233
1245
  if (!e || typeof e.data != "object" || e.data === null || !("dataItem" in e.data)) return;
1234
1246
  let n = e.data.dataItem;
1235
1247
  if (!(typeof n != "object" || !n || !("internalKey" in n) || typeof n.internalKey != "string" || !("uniqueSignature" in n) || typeof n.uniqueSignature != "string")) return {
@@ -1237,14 +1249,14 @@ var zn = (e, n) => {
1237
1249
  dataItemUniqueSignature: n.uniqueSignature,
1238
1250
  kind: t
1239
1251
  };
1240
- }, er = async (e, t, n, r, i, a) => {
1252
+ }, nr = async (e, t, n, r, i, a) => {
1241
1253
  let o = `${n}:${t.ref}`, s = await je(e.vSpec, e.availableFields, [{
1242
1254
  id: o,
1243
1255
  name: r,
1244
1256
  payload: i
1245
- }], e.input.variables ?? [], [], e.input.theme), c = Qn(s.results), l = $n(s.results[o], n);
1257
+ }], e.input.variables ?? [], [], e.input.theme), c = er(s.results), l = tr(s.results[o], n);
1246
1258
  return c || !l ? {
1247
- issue: q("operation_failed", a, c?.result.error ?? `${n} operation did not return the created data-item identity.`),
1259
+ issue: J("operation_failed", a, c?.result.error ?? `${n} operation did not return the created data-item identity.`),
1248
1260
  success: !1
1249
1261
  } : {
1250
1262
  state: {
@@ -1257,7 +1269,7 @@ var zn = (e, n) => {
1257
1269
  },
1258
1270
  success: !0
1259
1271
  };
1260
- }, tr = (e, t, n, r) => {
1272
+ }, rr = (e, t, n, r) => {
1261
1273
  let i = [
1262
1274
  "formatType",
1263
1275
  "formatString",
@@ -1269,23 +1281,23 @@ var zn = (e, n) => {
1269
1281
  let o = e.resolvedRefs[t.ref];
1270
1282
  return i.flatMap((e) => {
1271
1283
  let i = t.format?.[e], s = n[e];
1272
- return i !== void 0 && s ? [Bn(s, o, t.ref, t.path ?? [...r, a], e, i)] : [];
1284
+ return i !== void 0 && s ? [Vn(s, o, t.ref, t.path ?? [...r, a], e, i)] : [];
1273
1285
  });
1274
1286
  }), r);
1275
- }, nr = (e, t, n, r) => $(e, t.flatMap((t, i) => t.temporalGrouping ? [Y(n, e.resolvedRefs[t.ref], t.ref, t.path ?? [...r, i], t.temporalGrouping)] : []), r), rr = (e, t, n, r) => $(e, t.flatMap((t) => t.showNullValues === void 0 ? [] : [{
1287
+ }, ir = (e, t, n, r) => $(e, t.flatMap((t, i) => t.temporalGrouping ? [Kn(n, e.resolvedRefs[t.ref], t.ref, t.path ?? [...r, i], t.temporalGrouping)] : []), r), ar = (e, t, n, r) => $(e, t.flatMap((t) => t.showNullValues === void 0 ? [] : [{
1276
1288
  name: n,
1277
1289
  payload: {
1278
- ...J(e.resolvedRefs[t.ref]),
1290
+ ...Y(e.resolvedRefs[t.ref]),
1279
1291
  changes: { showNullValues: t.showNullValues }
1280
1292
  }
1281
- }]), r), ir = (e, t) => t ? $(e, [{
1293
+ }]), r), or = (e, t) => t ? $(e, [{
1282
1294
  id: "filterGroup",
1283
1295
  name: "setStaticFilterGroup",
1284
1296
  payload: X(t)
1285
1297
  }], ["filterGroup"]) : Promise.resolve({
1286
1298
  state: e,
1287
1299
  success: !0
1288
- }), ar = (e, t, n, r) => {
1300
+ }), sr = (e, t, n, r) => {
1289
1301
  if (!t?.length) return Promise.resolve({
1290
1302
  state: e,
1291
1303
  success: !0
@@ -1300,7 +1312,7 @@ var zn = (e, n) => {
1300
1312
  }))].map((e, t) => {
1301
1313
  let n = `${e.dataItemInternalKey}:${e.dataItemUniqueSignature}`, r = o.get(n), s = i.find((e) => `${e.dataItem.internalKey}:${e.dataItem.uniqueSignature}` === n);
1302
1314
  return {
1303
- ...J(e),
1315
+ ...Y(e),
1304
1316
  newIndex: t,
1305
1317
  sortDirection: (r ? a.get(r)?.direction : void 0) ?? s?.sortDirection ?? "asc"
1306
1318
  };
@@ -1308,24 +1320,24 @@ var zn = (e, n) => {
1308
1320
  }, ...t.map((t) => ({
1309
1321
  name: r,
1310
1322
  payload: {
1311
- ...J(e.resolvedRefs[t.by]),
1323
+ ...Y(e.resolvedRefs[t.by]),
1312
1324
  enabled: t.enabled ?? !0
1313
1325
  }
1314
1326
  }))], ["sorting"]);
1315
- }, or = (e, t) => {
1327
+ }, cr = (e, t) => {
1316
1328
  let n = [];
1317
1329
  return t?.overwrites && n.push({
1318
1330
  name: ke.SET_COLORING_OVERWRITES,
1319
1331
  payload: { overwrites: t.overwrites.map(({ dimension: t, ...n }) => t === void 0 ? n : {
1320
1332
  ...n,
1321
- dimension: J(e.resolvedRefs[t])
1333
+ dimension: Y(e.resolvedRefs[t])
1322
1334
  }) }
1323
1335
  }), t?.rules && n.push({
1324
1336
  name: ke.SET_COLORING_RULES,
1325
1337
  payload: { rules: t.rules.map(({ measure: t, ...n }) => ({
1326
1338
  ...n,
1327
- measure: J(e.resolvedRefs[t])
1339
+ measure: Y(e.resolvedRefs[t])
1328
1340
  })) }
1329
1341
  }), $(e, n, Z);
1330
1342
  };
1331
- export { St as $, Fn as A, on as B, Hn as C, jn as D, Mn as E, an as F, Nt as G, Zt as H, $t as I, vt as J, _t as K, en as L, bn as M, Tn as N, U as O, hn as P, Tt as Q, tn as R, qn as S, Rn as T, Xt as U, rn as V, Lt as W, xt as X, Ct as Y, bt as Z, Xn as _, tr as a, At as at, X as b, Zn as c, Ne as ct, q as d, Ot as et, zn as f, Jn as g, $ as h, ir as i, kt as it, Pn as j, Nn as k, Bn as l, Y as m, or as n, Et as nt, ar as o, mt as ot, Vn as p, wt as q, rr as r, Dt as rt, nr as s, E as st, er as t, yt as tt, Wn as u, Un as v, W as w, Kn as x, J as y, nn as z };
1343
+ export { Et as $, Nn as A, rn as B, Un as C, Mn as D, U as E, gn as F, Rt as G, an as H, on as I, Tt as J, Pt as K, en as L, Pn as M, xn as N, jn as O, En as P, xt as Q, tn as R, Yn as S, zn as T, Qt as U, sn as V, Zt as W, wt as X, yt as Y, St as Z, Qn as _, rr as a, At as at, X as b, $n as c, E as ct, J as d, Ct as et, Bn as f, Xn as g, $ as h, or as i, Ot as it, Fn as j, W as k, Vn as l, Ne as lt, Kn as m, cr as n, bt as nt, sr as o, jt as ot, Hn as p, vt as q, ar as r, Dt as rt, ir as s, ht as st, nr as t, kt as tt, Gn as u, Wn as v, G as w, Jn as x, Y as y, nn as z };