@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,9 +1,11 @@
1
- import { Ra as e, Sc as t, Xa as n, ll as r, r as i, vc as a, wc as o } from "./visualization-filters-CzvFHE6M.js";
2
- import { $ as s, A as c, B as l, C as u, E as d, F as f, G as ee, H as p, I as m, J as te, K as ne, L as re, N as ie, O as ae, P as oe, Q as se, R as ce, S as le, T as h, U as ue, V as de, W as fe, X as pe, Y as me, Z as he, _ as ge, a as _e, at as ve, c as ye, ct as be, d as g, et as xe, f as Se, g as _, h as v, i as Ce, it as we, j as y, k as Te, n as Ee, nt as De, o as Oe, ot as ke, q as Ae, r as je, rt as Me, s as Ne, st as Pe, t as b, tt as Fe, u as x, v as S, w as Ie, x as Le, y as C, z as Re } from "./shared-UitWpq1J.js";
3
- import { Ap as w, Cm as ze, Em as Be, Fm as Ve, Ip as He, Mm as Ue, Nm as We, Pp as Ge, Rm as Ke, Rp as qe, Vp as Je, Xm as Ye, a_ as Xe, am as Ze, fm as Qe, gm as $e, hm as et, jm as tt, lm as nt, mm as rt, om as it, wm as at, xm as ot } from "./handlers-ZviIUC-j.js";
1
+ import { Ac as e, Ec as t, Mc as n, Wa as r, bl as i, no as a, r as o } from "./visualization-filters-BwS0xUqs.js";
2
+ import { $ as s, A as c, B as l, C as u, D as d, F as f, G as ee, H as p, I as m, J as te, K as ne, L as re, M as h, P as ie, Q as ae, R as oe, S as se, T as g, U as ce, V as le, W as ue, X as de, Y as fe, Z as pe, _ as me, a as he, at as ge, c as _e, ct as ve, d as _, et as ye, f as be, g as v, h as y, i as xe, it as Se, j as Ce, k as we, lt as Te, n as Ee, nt as De, o as Oe, ot as ke, q as Ae, r as je, rt as Me, s as Ne, st as Pe, t as b, tt as Fe, u as x, v as S, w as Ie, x as Le, y as C, z as Re } from "./shared-DyqxOie0.js";
3
+ import { $m as ze, Dm as Be, Em as Ve, Fm as He, Im as Ue, Lp as We, Np as w, Pm as Ge, Rm as Ke, Vm as qe, Vp as Je, Wp as Ye, _m as Xe, c_ as Ze, cm as Qe, fm as $e, hm as et, km as tt, lm as nt, vm as rt, wm as it, ym as at, zp as ot } from "./handlers-C63NVo7i.js";
4
4
  import { n as st } from "./label-format-type-C46pzgx7.js";
5
- import { C as ct, S as T, _ as lt, b as ut, f as dt, v as ft, x as pt } from "./operations-DZoY50VX.js";
6
- import { n as mt } from "./bar-layout-DStC-GNV.js";
5
+ import { C as T, S as ct, _ as lt, f as ut, w as dt, x as ft, y as pt } from "./operations-COl9wgqi.js";
6
+ import { n as mt } from "./bar-layout-BNou0dZF.js";
7
+ import { t as ht } from "./category-axis-D1OVyMrr.js";
8
+ import { t as gt } from "./measure-format-default-B6ghxih7.js";
7
9
  import { z as E } from "zod";
8
10
  var D = (e) => [{
9
11
  ref: `${e}Latitude`,
@@ -19,7 +21,7 @@ var D = (e) => [{
19
21
  type: "map",
20
22
  ref: "basemap",
21
23
  presentation: { mapType: "openStreetMap" }
22
- }, ht = {
24
+ }, _t = {
23
25
  type: "map",
24
26
  documentation: {
25
27
  title: "Map",
@@ -33,7 +35,7 @@ var D = (e) => [{
33
35
  constraints: [
34
36
  "There is no fixed layer-count limit. Layers are ordered topmost first. Include a background map explicitly; the default basemap is replaced by the declared layers.",
35
37
  "Layer and data-item references share one namespace and must all be unique across the definition. Display names may repeat.",
36
- "resolvedRefs contains both layer and data-item references. A layer entry has kind \"layer\" and id; pass that id as the layer selector in map operations. Dimension and measure entries retain their data-item keys. Check kind before accessing an entry.",
38
+ "resolvedRefs contains the data-item references. resolvedLayerRefs contains the layer references; pass the id of a layer entry as the layer selector in map operations.",
37
39
  "Raw measure fields require an available aggregation. Semantic measures and calculations supply their own aggregation.",
38
40
  "Assign each measure role at most once per layer. Set sizing.sizeType to byMeasurePixels/byMeasureDistance to use a size measure, or value.type to byMeasure to use heat intensity.",
39
41
  "Definitions cover initial data bindings, static filters, view and basic presentation. Additional styling and interactions use the existing map operations.",
@@ -193,7 +195,7 @@ var D = (e) => [{
193
195
  "data-labels",
194
196
  "object-settings"
195
197
  ]
196
- }, gt = (e, ...t) => e, k = {
198
+ }, vt = (e, ...t) => e, k = {
197
199
  horsepower: "[Cars].[Horsepower]",
198
200
  latestLaunch: "[Cars].[Latest Launch]",
199
201
  manufacturer: "[Cars].[Manufacturer]",
@@ -208,10 +210,6 @@ var D = (e) => [{
208
210
  }), M = (e, t = k.sales, n = "SUM") => ({
209
211
  aggregation: n,
210
212
  fieldKey: t,
211
- format: {
212
- formatType: "number2Decimal",
213
- negativeType: "parenthesis"
214
- },
215
213
  ref: e
216
214
  }), N = {
217
215
  filters: [{
@@ -224,7 +222,7 @@ var D = (e) => [{
224
222
  ]
225
223
  }],
226
224
  operator: "and"
227
- }, _t = {
225
+ }, yt = {
228
226
  fieldKey: k.latestLaunch,
229
227
  ref: "launchMonth",
230
228
  temporalGrouping: {
@@ -251,7 +249,7 @@ var D = (e) => [{
251
249
  title: "Horsepower",
252
250
  titleVisible: !0
253
251
  }
254
- }, vt = {
252
+ }, bt = {
255
253
  dimension: {
256
254
  labelsVisible: !0,
257
255
  title: "Manufacturer",
@@ -267,7 +265,7 @@ var D = (e) => [{
267
265
  title: "Model",
268
266
  titleVisible: !0
269
267
  }
270
- }, yt = {
268
+ }, xt = {
271
269
  dimension: {
272
270
  labelsVisible: !0,
273
271
  title: "Manufacturer",
@@ -278,7 +276,7 @@ var D = (e) => [{
278
276
  title: "Sales",
279
277
  titleVisible: !0
280
278
  }
281
- }, bt = {
279
+ }, St = {
282
280
  dimension: {
283
281
  labelsVisible: !0,
284
282
  title: "Horsepower",
@@ -289,7 +287,7 @@ var D = (e) => [{
289
287
  title: "Count",
290
288
  titleVisible: !0
291
289
  }
292
- }, xt = {
290
+ }, Ct = {
293
291
  primaryMeasure: {
294
292
  labelsVisible: !0,
295
293
  title: "Sales",
@@ -300,7 +298,7 @@ var D = (e) => [{
300
298
  title: "Horsepower",
301
299
  titleVisible: !0
302
300
  }
303
- }, St = {
301
+ }, wt = {
304
302
  dimension: {
305
303
  labelsVisible: !0,
306
304
  title: "Measure",
@@ -311,13 +309,13 @@ var D = (e) => [{
311
309
  title: "Value",
312
310
  titleVisible: !0
313
311
  }
314
- }, I = "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.", Ct = (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 } }.`, L = `${Ct("a measure axis")} Set inverted on a measure axis to reverse its values, for example to put rank 1 at the top.`, wt = `${Ct("the primary measure axis")} Set inverted on the primary measure axis to reverse its values.`, R = [
312
+ }, I = "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.", Tt = (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 } }.`, L = `${Tt("a measure axis")} Set inverted on a measure axis to reverse its values, for example to put rank 1 at the top.`, Et = `${Tt("the primary measure axis")} Set inverted on the primary measure axis to reverse its values.`, R = [
315
313
  "dimensions",
316
314
  "filters",
317
315
  "measures",
318
316
  "value-formatting"
319
- ], Tt = gt([
320
- ht,
317
+ ], Dt = vt([
318
+ _t,
321
319
  {
322
320
  additionalExamples: [{
323
321
  definition: {
@@ -357,7 +355,7 @@ var D = (e) => [{
357
355
  "Several measures on one dimension are drawn side by side unless presentation.layout is stacked. A second dimension is a series, stacked unless presentation.layout is groups. One dimension with one measure ignores layout.",
358
356
  "Data label placements are tried in order; inside labels sit at the end of the bar. Set dataLabels.textColor to fix the label color in every placement."
359
357
  ],
360
- dataRequirements: ["At least one dimension.", "At least one measure."],
358
+ dataRequirements: ["At least one measure.", "For a measure-only bar, send `dimensions: []` (the key is still required) with at least one measure. Several measures then stack into one bar unless presentation.layout is groups; a layout already set on the base vSpec is kept when presentation.layout is omitted."],
361
359
  summary: "Categorical comparison chart with sorting, limiting, per-measure axes, labels, layout, and orientation controls.",
362
360
  title: "Bar chart"
363
361
  },
@@ -460,7 +458,7 @@ var D = (e) => [{
460
458
  filterGroup: N,
461
459
  limiting: { queryLimit: 100 },
462
460
  presentation: {
463
- axes: yt,
461
+ axes: xt,
464
462
  dataLabels: { visible: !0 },
465
463
  legend: P,
466
464
  orientation: "vertical"
@@ -518,7 +516,7 @@ var D = (e) => [{
518
516
  },
519
517
  {
520
518
  documentation: {
521
- constraints: ["Dimension order is significant and maps to the two dot-chart dimension roles.", wt],
519
+ constraints: ["Dimension order is significant and maps to the two dot-chart dimension roles.", Et],
522
520
  dataRequirements: ["Exactly two dimensions.", "Exactly one measure."],
523
521
  summary: "Dot comparison using two categorical dimensions and one measure.",
524
522
  title: "Dot chart"
@@ -530,7 +528,7 @@ var D = (e) => [{
530
528
  },
531
529
  filterGroup: N,
532
530
  presentation: {
533
- axes: yt,
531
+ axes: xt,
534
532
  legend: P,
535
533
  orientation: "horizontal"
536
534
  },
@@ -594,7 +592,7 @@ var D = (e) => [{
594
592
  filterGroup: N,
595
593
  limiting: { queryLimit: 100 },
596
594
  presentation: {
597
- axes: vt,
595
+ axes: bt,
598
596
  legend: P
599
597
  },
600
598
  sorting: [{
@@ -619,7 +617,7 @@ var D = (e) => [{
619
617
  constraints: [
620
618
  "The compiler creates the canonical generated count measure; callers do not provide measures.",
621
619
  I,
622
- wt
620
+ Et
623
621
  ],
624
622
  dataRequirements: ["Exactly one numeric dimension.", "No caller-supplied measures."],
625
623
  summary: "Distribution of a numeric field into generated bins and counts.",
@@ -629,7 +627,7 @@ var D = (e) => [{
629
627
  data: { dimensions: [A("horsepower", k.horsepower)] },
630
628
  filterGroup: N,
631
629
  presentation: {
632
- axes: bt,
630
+ axes: St,
633
631
  legend: P,
634
632
  orientation: "vertical"
635
633
  },
@@ -692,7 +690,7 @@ var D = (e) => [{
692
690
  documentation: {
693
691
  constraints: [
694
692
  "Each measure may select the primary or secondary axis using its axis property.",
695
- "Visible data labels require dataPointShape on every measure.",
693
+ "Data labels are off unless presentation.dataLabels.visible is true. Visible labels require dataPointShape on every measure.",
696
694
  I,
697
695
  L,
698
696
  "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.",
@@ -705,7 +703,7 @@ var D = (e) => [{
705
703
  },
706
704
  example: {
707
705
  data: {
708
- dimensions: [_t],
706
+ dimensions: [yt],
709
707
  measures: [{
710
708
  ...M("sales"),
711
709
  axis: "primary",
@@ -726,10 +724,6 @@ var D = (e) => [{
726
724
  title: "Launch month"
727
725
  }
728
726
  },
729
- dataLabels: {
730
- density: "medium",
731
- visible: !0
732
- },
733
727
  legend: P,
734
728
  orientation: "vertical"
735
729
  },
@@ -962,7 +956,7 @@ var D = (e) => [{
962
956
  },
963
957
  filterGroup: N,
964
958
  presentation: {
965
- axes: xt,
959
+ axes: Ct,
966
960
  legend: P
967
961
  },
968
962
  type: "scatter",
@@ -1051,6 +1045,7 @@ var D = (e) => [{
1051
1045
  },
1052
1046
  {
1053
1047
  ...M("sales"),
1048
+ format: { formatType: "numberNoDecimal" },
1054
1049
  role: "measure"
1055
1050
  }
1056
1051
  ],
@@ -1130,14 +1125,39 @@ var D = (e) => [{
1130
1125
  {
1131
1126
  documentation: {
1132
1127
  constraints: [
1133
- "Dimensions are not supported. Measure order defines the waterfall sequence.",
1134
- wt,
1128
+ "Without a dimension, measure order defines the waterfall sequence. With one dimension, the first measure supplies the opening total, each dimension value contributes the second measure minus the first, and the second measure supplies the closing total.",
1129
+ "Comparison totals sum the returned rows, rather than requesting a separate aggregate total. Use two numeric measures with comparable units.",
1130
+ Et,
1135
1131
  I
1136
1132
  ],
1137
- dataRequirements: ["Between one and one hundred measures."],
1138
- summary: "Sequential contribution chart composed from one or more measures.",
1133
+ dataRequirements: ["No dimensions and between one and one hundred measures, or exactly one dimension and exactly two measures."],
1134
+ summary: "Sequential contribution chart, or a comparison of two measures across one dimension.",
1139
1135
  title: "Waterfall chart"
1140
1136
  },
1137
+ additionalExamples: [{
1138
+ definition: {
1139
+ data: {
1140
+ dimensions: [A("manufacturer", k.manufacturer)],
1141
+ measures: [M("totalSales"), M("averageSales", k.sales, "AVG")]
1142
+ },
1143
+ presentation: {
1144
+ axes: {
1145
+ dimension: {
1146
+ title: "Manufacturer",
1147
+ titleVisible: !0
1148
+ },
1149
+ primaryMeasure: {
1150
+ title: "Sales in thousands",
1151
+ titleVisible: !0
1152
+ }
1153
+ },
1154
+ dataLabels: { visible: !0 }
1155
+ },
1156
+ type: "waterfall",
1157
+ version: 1
1158
+ },
1159
+ title: "Compare total and average sales by manufacturer"
1160
+ }],
1141
1161
  example: {
1142
1162
  data: { measures: [{
1143
1163
  ...M("sales"),
@@ -1148,7 +1168,7 @@ var D = (e) => [{
1148
1168
  }] },
1149
1169
  filterGroup: N,
1150
1170
  presentation: {
1151
- axes: St,
1171
+ axes: wt,
1152
1172
  dataLabels: { visible: !0 },
1153
1173
  orientation: "vertical"
1154
1174
  },
@@ -1160,6 +1180,7 @@ var D = (e) => [{
1160
1180
  "axis-bands",
1161
1181
  "axis-range",
1162
1182
  "data-labels",
1183
+ "dimensions",
1163
1184
  "filters",
1164
1185
  "measures",
1165
1186
  "orientation",
@@ -1444,42 +1465,42 @@ var D = (e) => [{
1444
1465
  type: "slider"
1445
1466
  }
1446
1467
  ]), z = (e) => {
1447
- let t = Tt.find((t) => t.type === e);
1468
+ let t = Dt.find((t) => t.type === e);
1448
1469
  if (!t) throw Error(`Missing visualization definition documentation for ${e}`);
1449
1470
  return t;
1450
1471
  }, B = (e, t) => E.toJSONSchema(e.meta({ title: t }), {
1451
1472
  reused: "inline",
1452
1473
  target: "draft-2020-12"
1453
1474
  }), V = {
1454
- "astrato-app-filter-bar": be,
1455
- bar: ke,
1456
- combo: ne,
1457
- dot: te,
1458
- scatter: Fe,
1459
- histogram: he,
1475
+ "astrato-app-filter-bar": Te,
1476
+ bar: Pe,
1477
+ combo: Ae,
1478
+ dot: fe,
1479
+ scatter: De,
1480
+ histogram: ae,
1460
1481
  heatMap: pe,
1461
- radar: s,
1462
- gauge: me,
1463
- "distribution-gauge": Ae,
1464
- pie: se,
1465
- tree: De,
1466
- treemap: Me,
1467
- sankey: xe,
1468
- waterfall: we,
1469
- "word-cloud": ve,
1470
- "date-picker": m,
1471
- iframe: re,
1472
- image: ce,
1473
- shape: Re,
1474
- simpleTextObject: de,
1475
- "atomic-input": f,
1476
- slider: l,
1477
- line: fe,
1482
+ radar: ye,
1483
+ gauge: de,
1484
+ "distribution-gauge": te,
1485
+ pie: s,
1486
+ tree: Me,
1487
+ treemap: Se,
1488
+ sankey: Fe,
1489
+ waterfall: ge,
1490
+ "word-cloud": ke,
1491
+ "date-picker": re,
1492
+ iframe: oe,
1493
+ image: Re,
1494
+ shape: l,
1495
+ simpleTextObject: p,
1496
+ "atomic-input": m,
1497
+ slider: le,
1498
+ line: ee,
1478
1499
  map: ue,
1479
- table: oe,
1480
- number: p,
1481
- filter: ee
1482
- }, Et = new Map(Object.entries(V)), Dt = (e, t = 1) => t === 1 ? Et.get(e) : void 0, Ot = () => Object.keys(V), kt = (e) => {
1500
+ table: f,
1501
+ number: ce,
1502
+ filter: ne
1503
+ }, Ot = new Map(Object.entries(V)), kt = (e, t = 1) => t === 1 ? Ot.get(e) : void 0, At = () => Object.keys(V), jt = (e) => {
1483
1504
  let t = w(e);
1484
1505
  if (t) return {
1485
1506
  code: "invalid_structure",
@@ -1499,22 +1520,22 @@ var D = (e) => [{
1499
1520
  path: ["version"]
1500
1521
  };
1501
1522
  let r = "type" in e ? e.type : void 0;
1502
- if (!(typeof r == "string" && Dt(r, n))) return {
1503
- allowedValues: Ot(),
1523
+ if (!(typeof r == "string" && kt(r, n))) return {
1524
+ allowedValues: At(),
1504
1525
  code: "unsupported_visualization",
1505
1526
  message: `Visualization type "${String(r)}" is not supported.`,
1506
1527
  path: ["type"]
1507
1528
  };
1508
- }, At = (e) => {
1509
- let t = kt(e);
1529
+ }, Mt = (e) => {
1530
+ let t = jt(e);
1510
1531
  if (t) return {
1511
1532
  issues: [t],
1512
1533
  success: !1
1513
1534
  };
1514
- let n = Dt(e.type, e.version);
1535
+ let n = kt(e.type, e.version);
1515
1536
  if (!n) return {
1516
1537
  issues: [{
1517
- allowedValues: Ot(),
1538
+ allowedValues: At(),
1518
1539
  code: "unsupported_visualization",
1519
1540
  message: "Visualization definition descriptor is not available.",
1520
1541
  path: ["type"]
@@ -1527,34 +1548,34 @@ var D = (e) => [{
1527
1548
  issues: [],
1528
1549
  success: !0
1529
1550
  } : {
1530
- issues: h(r.error, e),
1551
+ issues: g(r.error, e),
1531
1552
  success: !1
1532
1553
  };
1533
- }, jt = async (e) => (await import("./app-filter-bar.compiler-8fxCo2q7.js")).compileAppFilterBarVisualizationDefinition(e), Mt = async (e) => (await import("./bar.compiler-CQAu8KL8.js")).compileBarVisualizationDefinition(e), Nt = async (e) => (await import("./filter.compiler-lji2Acgn.js")).compileFilterVisualizationDefinition(e), Pt = async (e) => (await import("./line.compiler-De5fiKuR.js")).compileLineVisualizationDefinition(e), Ft = async (e) => (await import("./number.compiler-CaTmJkmi.js")).compileNumberVisualizationDefinition(e), It = async (e) => (await import("./map.compiler-CKzorLgK.js")).compileMapVisualizationDefinition(e), Lt = async (e) => (await import("./table.compiler-OWSx5MOq.js")).compileTableVisualizationDefinition(e), H = r(), Rt = [
1554
+ }, Nt = async (e) => (await import("./app-filter-bar.compiler-BY5-T16I.js")).compileAppFilterBarVisualizationDefinition(e), Pt = async (e) => (await import("./bar.compiler-BkhO7sDd.js")).compileBarVisualizationDefinition(e), Ft = async (e) => (await import("./filter.compiler-CI7dDNM1.js")).compileFilterVisualizationDefinition(e), It = async (e) => (await import("./line.compiler-DCv3h42f.js")).compileLineVisualizationDefinition(e), Lt = async (e) => (await import("./number.compiler-kV4lobCZ.js")).compileNumberVisualizationDefinition(e), Rt = async (e) => (await import("./map.compiler-CRO6XpdI.js")).compileMapVisualizationDefinition(e), zt = async (e) => (await import("./table.compiler-CMH_dtYs.js")).compileTableVisualizationDefinition(e), H = i(), Bt = [
1534
1555
  H.FieldType.DATE,
1535
1556
  H.FieldType.TIMESTAMP,
1536
1557
  H.FieldType.TIMESTAMP_TZ
1537
- ], zt = ["none", "inherit"], Bt = [
1558
+ ], Vt = ["none", "inherit"], Ht = [
1538
1559
  "dimensions",
1539
1560
  "rowDimensions",
1540
1561
  "columnDimensions",
1541
1562
  "columns"
1542
- ], Vt = (e) => {
1543
- if (e?.kind === "field") return {
1544
- dataType: e.dataType,
1563
+ ], Ut = (t) => {
1564
+ if (t?.kind === "field") return {
1565
+ dataType: t.dataType,
1545
1566
  hasOwnFormat: !1,
1546
1567
  label: "field"
1547
1568
  };
1548
- if (e?.kind !== "dimension") return;
1549
- let [n] = ie([e]);
1569
+ if (t?.kind !== "dimension") return;
1570
+ let [r] = ie([t]);
1550
1571
  return {
1551
- dataType: o(n),
1552
- hasOwnFormat: !!t(n),
1572
+ dataType: n(r),
1573
+ hasOwnFormat: !!e(r),
1553
1574
  label: "dimension"
1554
1575
  };
1555
- }, Ht = (e) => {
1576
+ }, Wt = (e) => {
1556
1577
  let t = "data" in e ? e.data : void 0;
1557
- return Bt.flatMap((e) => {
1578
+ return Ht.flatMap((e) => {
1558
1579
  let n = t?.[e];
1559
1580
  return Array.isArray(n) ? n.flatMap((t, n) => e === "columns" && t.role !== "dimension" ? [] : [{
1560
1581
  dimension: t,
@@ -1565,9 +1586,9 @@ var D = (e) => [{
1565
1586
  ]
1566
1587
  }]) : [];
1567
1588
  });
1568
- }, Ut = (e, t) => Ht(e).flatMap(({ dimension: e, path: n }) => {
1569
- let r = e.format?.formatType, i = Vt(t.find((t) => t.fieldKey === e.fieldKey));
1570
- if (r === void 0 || !zt.includes(r) || e.temporalGrouping?.mode === "part" || i?.dataType === void 0 || !Rt.includes(i.dataType) || r === "inherit" && i.hasOwnFormat) return [];
1589
+ }, Gt = (e, t) => Wt(e).flatMap(({ dimension: e, path: n }) => {
1590
+ let r = e.format?.formatType, i = Ut(t.find((t) => t.fieldKey === e.fieldKey));
1591
+ if (r === void 0 || !Vt.includes(r) || e.temporalGrouping?.mode === "part" || i?.dataType === void 0 || !Bt.includes(i.dataType) || r === "inherit" && i.hasOwnFormat) return [];
1571
1592
  let a = [
1572
1593
  ...n,
1573
1594
  "format",
@@ -1584,7 +1605,7 @@ var D = (e) => [{
1584
1605
  message: `${Ie(a)}: ${o} such as 1672531200000 instead of dates. ${s}`,
1585
1606
  path: a
1586
1607
  }];
1587
- }), Wt = (e) => {
1608
+ }), Kt = (e) => {
1588
1609
  if (e.type !== "bar" || !mt(e)) return [];
1589
1610
  let t = ["presentation", "layout"];
1590
1611
  return [{
@@ -1593,8 +1614,8 @@ var D = (e) => [{
1593
1614
  message: `${Ie(t)}: one dimension with one measure draws plain bars, so the layout is ignored. Omit layout, or add a measure or a series dimension.`,
1594
1615
  path: t
1595
1616
  }];
1596
- }, Gt = (e, t) => [...Wt(e), ...Ut(e, t)], U = z("bar"), Kt = {
1597
- compile: Mt,
1617
+ }, qt = (e, t) => [...Kt(e), ...Gt(e, t)], U = z("bar"), Jt = {
1618
+ compile: Pt,
1598
1619
  documentation: U.documentation,
1599
1620
  examples: [U.example, ...(U.additionalExamples ?? []).map(({ definition: e }) => e)],
1600
1621
  jsonSchema: B(V.bar, `${U.documentation.title} definition`),
@@ -1602,8 +1623,8 @@ var D = (e) => [{
1602
1623
  supportedFeatures: U.supportedFeatures,
1603
1624
  type: "bar",
1604
1625
  version: 1
1605
- }, W = z("astrato-app-filter-bar"), qt = {
1606
- compile: jt,
1626
+ }, W = z("astrato-app-filter-bar"), Yt = {
1627
+ compile: Nt,
1607
1628
  documentation: W.documentation,
1608
1629
  examples: [W.example],
1609
1630
  jsonSchema: B(V["astrato-app-filter-bar"], `${W.documentation.title} definition`),
@@ -1612,111 +1633,111 @@ var D = (e) => [{
1612
1633
  type: "astrato-app-filter-bar",
1613
1634
  version: 1
1614
1635
  };
1615
- i();
1616
- var Jt = {
1636
+ o();
1637
+ var Xt = {
1617
1638
  combo: {
1618
- coloringType: a.PerEachMeasure,
1639
+ coloringType: t.PerEachMeasure,
1619
1640
  queryLimit: !0,
1620
- schema: ne,
1641
+ schema: Ae,
1621
1642
  sorting: !0,
1622
1643
  type: "combo",
1623
- vSpecSchema: Ke
1644
+ vSpecSchema: qe
1624
1645
  },
1625
1646
  "distribution-gauge": {
1626
- coloringType: a.PerEachMeasure,
1627
- measureRole: () => e.GAUGE_VALUE,
1628
- schema: Ae,
1647
+ coloringType: t.PerEachMeasure,
1648
+ measureRole: () => r.GAUGE_VALUE,
1649
+ schema: te,
1629
1650
  type: "distribution-gauge",
1630
- vSpecSchema: Ue
1651
+ vSpecSchema: He
1631
1652
  },
1632
1653
  dot: {
1633
- coloringType: a.Categorical,
1634
- schema: te,
1654
+ coloringType: t.Categorical,
1655
+ schema: fe,
1635
1656
  type: "dot",
1636
- vSpecSchema: tt
1657
+ vSpecSchema: Ge
1637
1658
  },
1638
1659
  gauge: {
1639
- coloringType: (e) => (e.data.dimensions?.length ?? 0) > 0 ? a.Categorical : a.PerEachMeasure,
1640
- measureRole: (t, n) => (n.data.dimensions?.length ?? 0) > 0 && t === 1 ? e.GAUGE_TARGET : e.GAUGE_VALUE,
1641
- schema: me,
1660
+ coloringType: (e) => (e.data.dimensions?.length ?? 0) > 0 ? t.Categorical : t.PerEachMeasure,
1661
+ measureRole: (e, t) => (t.data.dimensions?.length ?? 0) > 0 && e === 1 ? r.GAUGE_TARGET : r.GAUGE_VALUE,
1662
+ schema: de,
1642
1663
  type: "gauge",
1643
- vSpecSchema: We
1664
+ vSpecSchema: Ue
1644
1665
  },
1645
1666
  heatMap: {
1646
- coloringType: a.Gradient,
1647
- dimensionRole: (e) => e === 0 ? n.HEAT_MAP_HORIZONTAL : n.HEAT_MAP_VERTICAL,
1648
- measureRole: (t) => t === 0 ? e.HEAT_MAP_COLOR : e.HEAT_MAP_SIZE,
1667
+ coloringType: t.Gradient,
1668
+ dimensionRole: (e) => e === 0 ? a.HEAT_MAP_HORIZONTAL : a.HEAT_MAP_VERTICAL,
1669
+ measureRole: (e) => e === 0 ? r.HEAT_MAP_COLOR : r.HEAT_MAP_SIZE,
1649
1670
  queryLimit: !0,
1650
1671
  schema: pe,
1651
1672
  sorting: !0,
1652
1673
  type: "heatMap",
1653
- vSpecSchema: Be
1674
+ vSpecSchema: tt
1654
1675
  },
1655
1676
  histogram: {
1656
- coloringType: a.Single,
1657
- schema: he,
1677
+ coloringType: t.Single,
1678
+ schema: ae,
1658
1679
  type: "histogram",
1659
- vSpecSchema: at
1680
+ vSpecSchema: Be
1660
1681
  },
1661
1682
  pie: {
1662
- coloringType: a.Categorical,
1663
- measureRole: (t) => t === 0 ? e.PIE_CHART_SLICE : e.PIE_CHART_LENGTH,
1683
+ coloringType: t.Categorical,
1684
+ measureRole: (e) => e === 0 ? r.PIE_CHART_SLICE : r.PIE_CHART_LENGTH,
1664
1685
  queryLimit: !0,
1665
- schema: se,
1686
+ schema: s,
1666
1687
  sorting: !0,
1667
1688
  type: "pie",
1668
- vSpecSchema: $e
1689
+ vSpecSchema: at
1669
1690
  },
1670
1691
  radar: {
1671
- conditionalColoringFallbackType: a.Single,
1672
- schema: s,
1692
+ conditionalColoringFallbackType: t.Single,
1693
+ schema: ye,
1673
1694
  type: "radar",
1674
- vSpecSchema: et
1695
+ vSpecSchema: rt
1675
1696
  },
1676
1697
  sankey: {
1677
- schema: xe,
1698
+ schema: Fe,
1678
1699
  type: "sankey",
1679
- vSpecSchema: rt
1700
+ vSpecSchema: Xe
1680
1701
  },
1681
1702
  scatter: {
1682
- coloringType: a.Categorical,
1683
- dimensionRole: (e) => e === 0 ? n.SCATTER_DIMENSION : n.SCATTER_IMAGE,
1684
- measureRole: (t) => [
1685
- e.SCATTER_HORIZONTAL,
1686
- e.SCATTER_VERTICAL,
1687
- e.SCATTER_SIZE
1688
- ][t],
1703
+ coloringType: t.Categorical,
1704
+ dimensionRole: (e) => e === 0 ? a.SCATTER_DIMENSION : a.SCATTER_IMAGE,
1705
+ measureRole: (e) => [
1706
+ r.SCATTER_HORIZONTAL,
1707
+ r.SCATTER_VERTICAL,
1708
+ r.SCATTER_SIZE
1709
+ ][e],
1689
1710
  queryLimit: !0,
1690
- schema: Fe,
1711
+ schema: De,
1691
1712
  sorting: !0,
1692
1713
  type: "scatter",
1693
- vSpecSchema: Qe
1714
+ vSpecSchema: et
1694
1715
  },
1695
1716
  tree: {
1696
1717
  queryLimit: !0,
1697
- schema: De,
1718
+ schema: Me,
1698
1719
  sorting: !0,
1699
1720
  type: "tree",
1700
- vSpecSchema: Je
1721
+ vSpecSchema: Ye
1701
1722
  },
1702
1723
  treemap: {
1703
- schema: Me,
1724
+ schema: Se,
1704
1725
  type: "treemap",
1705
- vSpecSchema: qe
1726
+ vSpecSchema: Je
1706
1727
  },
1707
1728
  waterfall: {
1708
- schema: we,
1729
+ schema: ge,
1709
1730
  type: "waterfall",
1710
- vSpecSchema: He
1731
+ vSpecSchema: ot
1711
1732
  },
1712
1733
  "word-cloud": {
1713
- conditionalColoringFallbackType: a.Single,
1714
- schema: ve,
1734
+ conditionalColoringFallbackType: t.Single,
1735
+ schema: ke,
1715
1736
  type: "word-cloud",
1716
- vSpecSchema: Ge
1737
+ vSpecSchema: We
1717
1738
  }
1718
- }, Yt = (e, t) => {
1719
- let n = [], r = t.presentation, i = ge(r?.axes);
1739
+ }, Zt = (e, t) => {
1740
+ let n = [], r = t.presentation, i = me(r?.axes);
1720
1741
  if (i) return Promise.resolve({
1721
1742
  issue: i,
1722
1743
  success: !1
@@ -1724,7 +1745,7 @@ var Jt = {
1724
1745
  r?.orientation !== void 0 && n.push({
1725
1746
  name: "setOrientation",
1726
1747
  payload: r.orientation
1727
- }), r?.legend && n.push(...Se(e.vSpec, r.legend)), Object.entries(r?.axes ?? {}).forEach(([e, t]) => {
1748
+ }), t.type === "combo" && n.push(...ht(r)), r?.legend && n.push(...be(e.vSpec, r.legend)), Object.entries(r?.axes ?? {}).forEach(([e, t]) => {
1728
1749
  t.titleVisible !== void 0 && n.push({
1729
1750
  name: "setShowAxisTitle",
1730
1751
  payload: {
@@ -1755,8 +1776,8 @@ var Jt = {
1755
1776
  axisName: e,
1756
1777
  showAxisLine: t.lineVisible
1757
1778
  }
1758
- }), n.push(...ye(e, t)), "scale" in t && t.scale !== void 0 && n.push({
1759
- name: ft.SET_AXIS_SCALE,
1779
+ }), n.push(..._e(e, t)), "scale" in t && t.scale !== void 0 && n.push({
1780
+ name: pt.SET_AXIS_SCALE,
1760
1781
  payload: {
1761
1782
  axisName: e,
1762
1783
  scale: t.scale
@@ -1765,7 +1786,7 @@ var Jt = {
1765
1786
  });
1766
1787
  let a = r?.axes?.primaryMeasure?.bands;
1767
1788
  return a && n.push({
1768
- name: ut.SET_MEASURE_AXIS_BANDS,
1789
+ name: ft.SET_MEASURE_AXIS_BANDS,
1769
1790
  payload: { bands: a }
1770
1791
  }), (t.data.measures ?? []).forEach((i) => {
1771
1792
  let a = i.dataLabels ?? (t.type !== "combo" || i.seriesType === "bar" ? r?.dataLabels : void 0);
@@ -1776,13 +1797,13 @@ var Jt = {
1776
1797
  show: a.visible
1777
1798
  }
1778
1799
  });
1779
- }), v(e, n, ["presentation"]);
1780
- }, Xt = (e, t) => {
1800
+ }), y(e, n, ["presentation"]);
1801
+ }, Qt = (e, t) => {
1781
1802
  let n = [];
1782
1803
  if (t.type === "combo") {
1783
1804
  (t.data.measures ?? []).forEach((t) => {
1784
1805
  t.seriesType && n.push({
1785
- name: dt.SET_MEASURE_GRAPH_TYPE,
1806
+ name: ut.SET_MEASURE_GRAPH_TYPE,
1786
1807
  payload: {
1787
1808
  ...C(e.resolvedRefs[t.ref]),
1788
1809
  graphType: t.seriesType
@@ -1809,13 +1830,13 @@ var Jt = {
1809
1830
  if (t.type === "gauge" || t.type === "distribution-gauge") {
1810
1831
  let e = t.type === "distribution-gauge";
1811
1832
  e && n.push({
1812
- name: pt.SET_GAUGE_COMPARISON_MODE,
1833
+ name: ct.SET_GAUGE_COMPARISON_MODE,
1813
1834
  payload: !0
1814
1835
  }), t.presentation?.displayMode && n.push({
1815
- name: e ? pt.SET_GAUGE_BAR_MODE : ct.SET_GAUGE_BAR_MODE,
1836
+ name: e ? ct.SET_GAUGE_BAR_MODE : dt.SET_GAUGE_BAR_MODE,
1816
1837
  payload: t.presentation.displayMode === "bar"
1817
1838
  }), !e && (t.data.dimensions?.length ?? 0) > 0 && (t.data.measures?.length ?? 0) > 1 && n.push({
1818
- name: ct.SET_GAUGE_TARGET_TYPE,
1839
+ name: dt.SET_GAUGE_TARGET_TYPE,
1819
1840
  payload: st.Data
1820
1841
  });
1821
1842
  }
@@ -1835,18 +1856,18 @@ var Jt = {
1835
1856
  payload: e.initialExpandedLevels
1836
1857
  });
1837
1858
  }
1838
- return v(e, n, ["presentation"]);
1839
- }, Zt = (e, t, n) => {
1859
+ return y(e, n, ["presentation"]);
1860
+ }, $t = (e, t, n) => {
1840
1861
  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);
1841
1862
  return !s || r || !a && !o ? Promise.resolve({
1842
1863
  state: e,
1843
1864
  success: !0
1844
- }) : v(e, [{
1865
+ }) : y(e, [{
1845
1866
  name: "setColoringType",
1846
1867
  payload: typeof s == "function" ? s(t) : s
1847
1868
  }], a ? ["presentation", "legend"] : ["presentation", "coloring"]);
1848
- }, Qt = async (e, t) => {
1849
- let n = Jt[t], r = w(e);
1869
+ }, en = async (e, t) => {
1870
+ let n = Xt[t], r = w(e);
1850
1871
  if (r) return {
1851
1872
  issues: [{
1852
1873
  code: "invalid_structure",
@@ -1857,12 +1878,12 @@ var Jt = {
1857
1878
  };
1858
1879
  let i = n.schema.safeParse(e.definition);
1859
1880
  if (!i.success) return {
1860
- issues: h(i.error, e.definition),
1881
+ issues: g(i.error, e.definition),
1861
1882
  success: !1
1862
1883
  };
1863
1884
  let a = n.vSpecSchema.safeParse(e.baseVSpec);
1864
1885
  if (!a.success) return {
1865
- issues: [g("invalid_structure", ["baseVSpec"], `Base ${t} vSpec is invalid.`, { details: { issues: a.error.issues } })],
1886
+ issues: [_("invalid_structure", ["baseVSpec"], `Base ${t} vSpec is invalid.`, { details: { issues: a.error.issues } })],
1866
1887
  success: !1
1867
1888
  };
1868
1889
  let o = a.data;
@@ -1872,12 +1893,12 @@ var Jt = {
1872
1893
  "supportingMeasures",
1873
1894
  "sortingMeasures"
1874
1895
  ])) return {
1875
- issues: [g("non_fresh_base_vspec", ["baseVSpec"], `${t} definitions require a fresh base vSpec.`)],
1896
+ issues: [_("non_fresh_base_vspec", ["baseVSpec"], `${t} definitions require a fresh base vSpec.`)],
1876
1897
  success: !1
1877
1898
  };
1878
1899
  let s = i.data, l = s.data.dimensions ?? [], f = s.data.measures ?? [], ee = [...l, ...f].map((e) => e.ref), p = [
1879
- ...Te(l, e.availableFields, ["data", "dimensions"], "dimension"),
1880
- ...Te(f, e.availableFields, ["data", "measures"], "measure"),
1900
+ ...c(l, e.availableFields, ["data", "dimensions"], "dimension"),
1901
+ ...c(f, e.availableFields, ["data", "measures"], "measure"),
1881
1902
  ...u([{
1882
1903
  items: l,
1883
1904
  path: ["data", "dimensions"]
@@ -1885,10 +1906,10 @@ var Jt = {
1885
1906
  items: f,
1886
1907
  path: ["data", "measures"]
1887
1908
  }]),
1888
- ...c(s.filterGroup, e.availableFields),
1909
+ ...Ce(s.filterGroup, e.availableFields),
1889
1910
  ...Le(s.sorting, ee),
1890
- ...le(s.presentation?.coloring, l.map((e) => e.ref), f.map((e) => e.ref)),
1891
- ...t === "histogram" && l[0] ? y(l[0], e.availableFields, [
1911
+ ...se(s.presentation?.coloring, l.map((e) => e.ref), f.map((e) => e.ref)),
1912
+ ...t === "histogram" && l[0] ? h(l[0], e.availableFields, [
1892
1913
  "data",
1893
1914
  "dimensions",
1894
1915
  0
@@ -1934,29 +1955,29 @@ var Jt = {
1934
1955
  t
1935
1956
  ]);
1936
1957
  }
1937
- return "issue" in m || (m = await je(m.state, l, "updateDimension", ["data", "dimensions"]), "issue" in m) || (m = await Xt(m.state, s), "issue" in m) || (m = await Zt(m.state, s, n), "issue" in m) || (m = await Ne(m.state, l, "setDimensionTemporalGrouping", ["data", "dimensions"]), "issue" in m) || (m = await _e(m.state, l, {
1958
+ return "issue" in m || (m = await je(m.state, l, "updateDimension", ["data", "dimensions"]), "issue" in m) || (m = await Qt(m.state, s), "issue" in m) || (m = await $t(m.state, s, n), "issue" in m) || (m = await Ne(m.state, l, "setDimensionTemporalGrouping", ["data", "dimensions"]), "issue" in m) || (m = await he(m.state, l, {
1938
1959
  formatString: "setDimensionFormatString",
1939
1960
  formatType: "setDimensionFormatType"
1940
- }, ["data", "dimensions"]), "issue" in m) || (m = await _e(m.state, f, {
1961
+ }, ["data", "dimensions"]), "issue" in m) || (m = await he(m.state, f, {
1941
1962
  currency: "setMeasureCurrency",
1942
1963
  currencyIsPrefix: "setMeasureCurrencyIsPrefix",
1943
1964
  formatString: "setMeasureFormatString",
1944
1965
  formatType: "setMeasureFormatType",
1945
1966
  negativeType: "setMeasureNegativeType"
1946
- }, ["data", "measures"]), "issue" in m) || (m = await Ce(m.state, s.filterGroup), "issue" in m) || n.sorting && (m = await Oe(m.state, s.sorting, "changeSortOrderAndDirection", "toggleSortingItem"), "issue" in m) || n.queryLimit && s.limiting?.queryLimit !== void 0 && (m = await v(m.state, [{
1967
+ }, ["data", "measures"]), "issue" in m) || (m = await gt(m.state, f, ["data", "measures"]), "issue" in m) || (m = await xe(m.state, s.filterGroup), "issue" in m) || n.sorting && (m = await Oe(m.state, s.sorting, "changeSortOrderAndDirection", "toggleSortingItem"), "issue" in m) || n.queryLimit && s.limiting?.queryLimit !== void 0 && (m = await y(m.state, [{
1947
1968
  name: "setQueryLimit",
1948
1969
  payload: s.limiting.queryLimit
1949
- }], ["limiting"]), "issue" in m) || (m = await Yt(m.state, s), "issue" in m) ? {
1970
+ }], ["limiting"]), "issue" in m) || (m = await Zt(m.state, s), "issue" in m) ? {
1950
1971
  issues: [m.issue],
1951
1972
  success: !1
1952
1973
  } : (m = await Ee(m.state, s.presentation?.coloring), "issue" in m ? {
1953
1974
  issues: [m.issue],
1954
1975
  success: !1
1955
- } : _(m.state, n.vSpecSchema));
1976
+ } : v(m.state, n.vSpecSchema));
1956
1977
  }, G = (e) => {
1957
1978
  let t = z(e.type);
1958
1979
  return {
1959
- compile: (t) => Qt(t, e.type),
1980
+ compile: (t) => en(t, e.type),
1960
1981
  documentation: t.documentation,
1961
1982
  examples: [t.example, ...(t.additionalExamples ?? []).map(({ definition: e }) => e)],
1962
1983
  jsonSchema: B(e.schema, `${t.documentation.title} definition`),
@@ -1965,7 +1986,7 @@ var Jt = {
1965
1986
  type: e.type,
1966
1987
  version: 1
1967
1988
  };
1968
- }, $t = [
1989
+ }, tn = [
1969
1990
  G({
1970
1991
  schema: V.combo,
1971
1992
  type: "combo"
@@ -2022,8 +2043,8 @@ var Jt = {
2022
2043
  schema: V["word-cloud"],
2023
2044
  type: "word-cloud"
2024
2045
  })
2025
- ], K = z("filter"), en = {
2026
- compile: Nt,
2046
+ ], K = z("filter"), nn = {
2047
+ compile: Ft,
2027
2048
  documentation: K.documentation,
2028
2049
  examples: [K.example],
2029
2050
  jsonSchema: B(V.filter, `${K.documentation.title} definition`),
@@ -2031,8 +2052,8 @@ var Jt = {
2031
2052
  supportedFeatures: K.supportedFeatures,
2032
2053
  type: "filter",
2033
2054
  version: 1
2034
- }, q = z("line"), tn = {
2035
- compile: Pt,
2055
+ }, q = z("line"), rn = {
2056
+ compile: It,
2036
2057
  documentation: q.documentation,
2037
2058
  examples: [q.example, ...(q.additionalExamples ?? []).map(({ definition: e }) => e)],
2038
2059
  jsonSchema: B(V.line, `${q.documentation.title} definition`),
@@ -2040,8 +2061,8 @@ var Jt = {
2040
2061
  supportedFeatures: q.supportedFeatures,
2041
2062
  type: "line",
2042
2063
  version: 1
2043
- }, J = z("map"), nn = {
2044
- compile: It,
2064
+ }, J = z("map"), an = {
2065
+ compile: Rt,
2045
2066
  documentation: J.documentation,
2046
2067
  examples: [J.example, ...(J.additionalExamples ?? []).map(({ definition: e }) => e)],
2047
2068
  jsonSchema: B(V.map, "Map definition"),
@@ -2049,8 +2070,8 @@ var Jt = {
2049
2070
  supportedFeatures: J.supportedFeatures,
2050
2071
  type: "map",
2051
2072
  version: 1
2052
- }, Y = z("number"), rn = {
2053
- compile: Ft,
2073
+ }, Y = z("number"), on = {
2074
+ compile: Lt,
2054
2075
  documentation: Y.documentation,
2055
2076
  examples: [Y.example],
2056
2077
  jsonSchema: B(V.number, `${Y.documentation.title} definition`),
@@ -2061,7 +2082,7 @@ var Jt = {
2061
2082
  }, X = (e, t) => Object.entries(e).flatMap(([e, n]) => n === void 0 || !t[e] ? [] : [{
2062
2083
  name: t[e],
2063
2084
  payload: n
2064
- }]), an = {
2085
+ }]), sn = {
2065
2086
  "atomic-input": {
2066
2087
  createRequests: (e) => {
2067
2088
  let t = e.customLabel;
@@ -2079,18 +2100,18 @@ var Jt = {
2079
2100
  payload: t.text
2080
2101
  }]] : []];
2081
2102
  },
2082
- schema: f,
2103
+ schema: m,
2083
2104
  type: "atomic-input",
2084
- vSpecSchema: Ye
2105
+ vSpecSchema: ze
2085
2106
  },
2086
2107
  iframe: {
2087
2108
  createRequests: (e) => [{
2088
2109
  name: "setIframeUrl",
2089
2110
  payload: e.url
2090
2111
  }],
2091
- schema: re,
2112
+ schema: oe,
2092
2113
  type: "iframe",
2093
- vSpecSchema: ze
2114
+ vSpecSchema: Ve
2094
2115
  },
2095
2116
  image: {
2096
2117
  createRequests: (e) => X(e, {
@@ -2101,9 +2122,9 @@ var Jt = {
2101
2122
  shadow: "setImageShadow",
2102
2123
  source: "setImageSource"
2103
2124
  }),
2104
- schema: ce,
2125
+ schema: Re,
2105
2126
  type: "image",
2106
- vSpecSchema: ot
2127
+ vSpecSchema: it
2107
2128
  },
2108
2129
  shape: {
2109
2130
  createRequests: (e) => X(e, {
@@ -2121,9 +2142,9 @@ var Jt = {
2121
2142
  shape: "setShapeType",
2122
2143
  strokeColor: "setShapeBorderColor"
2123
2144
  }),
2124
- schema: Re,
2145
+ schema: l,
2125
2146
  type: "shape",
2126
- vSpecSchema: nt
2147
+ vSpecSchema: $e
2127
2148
  },
2128
2149
  simpleTextObject: {
2129
2150
  createRequests: (e) => [...e.content === void 0 ? [] : [{
@@ -2142,12 +2163,12 @@ var Jt = {
2142
2163
  textColor: "setTextColor",
2143
2164
  wordWrap: "setTextWordWrap"
2144
2165
  })],
2145
- schema: de,
2166
+ schema: p,
2146
2167
  type: "simpleTextObject",
2147
- vSpecSchema: it
2168
+ vSpecSchema: nt
2148
2169
  }
2149
2170
  }, Z = async (e, t) => {
2150
- let n = an[t], r = w(e);
2171
+ let n = sn[t], r = w(e);
2151
2172
  if (r) return {
2152
2173
  issues: [{
2153
2174
  code: "invalid_structure",
@@ -2158,20 +2179,20 @@ var Jt = {
2158
2179
  };
2159
2180
  let i = n.schema.safeParse(e.definition);
2160
2181
  if (!i.success) return {
2161
- issues: h(i.error, e.definition),
2182
+ issues: g(i.error, e.definition),
2162
2183
  success: !1
2163
2184
  };
2164
2185
  let a = n.vSpecSchema.safeParse(e.baseVSpec);
2165
2186
  if (!a.success) return {
2166
- issues: [g("invalid_structure", ["baseVSpec"], `Base ${t} vSpec is invalid.`, { details: { issues: a.error.issues } })],
2187
+ issues: [_("invalid_structure", ["baseVSpec"], `Base ${t} vSpec is invalid.`, { details: { issues: a.error.issues } })],
2167
2188
  success: !1
2168
2189
  };
2169
- let o = x(e, a.data), s = i.data.settings, c = await v(o, n.createRequests(s), ["settings"]);
2190
+ let o = x(e, a.data), s = i.data.settings, c = await y(o, n.createRequests(s), ["settings"]);
2170
2191
  return "issue" in c ? {
2171
2192
  issues: [c.issue],
2172
2193
  success: !1
2173
- } : _(c.state, n.vSpecSchema);
2174
- }, on = async (e) => {
2194
+ } : v(c.state, n.vSpecSchema);
2195
+ }, cn = async (e) => {
2175
2196
  let t = w(e);
2176
2197
  if (t) return {
2177
2198
  issues: [{
@@ -2181,22 +2202,22 @@ var Jt = {
2181
2202
  }],
2182
2203
  success: !1
2183
2204
  };
2184
- let n = m.safeParse(e.definition);
2205
+ let n = re.safeParse(e.definition);
2185
2206
  if (!n.success) return {
2186
- issues: h(n.error, e.definition),
2207
+ issues: g(n.error, e.definition),
2187
2208
  success: !1
2188
2209
  };
2189
- let r = Ve.safeParse(e.baseVSpec);
2210
+ let r = Ke.safeParse(e.baseVSpec);
2190
2211
  if (!r.success) return {
2191
- issues: [g("invalid_structure", ["baseVSpec"], "Base date-picker vSpec is invalid.", { details: { issues: r.error.issues } })],
2212
+ issues: [_("invalid_structure", ["baseVSpec"], "Base date-picker vSpec is invalid.", { details: { issues: r.error.issues } })],
2192
2213
  success: !1
2193
2214
  };
2194
2215
  let i = r.data;
2195
2216
  if (!S(i, ["dimensions", "measures"])) return {
2196
- issues: [g("non_fresh_base_vspec", ["baseVSpec"], "Date-picker definitions require a fresh vSpec.")],
2217
+ issues: [_("non_fresh_base_vspec", ["baseVSpec"], "Date-picker definitions require a fresh vSpec.")],
2197
2218
  success: !1
2198
2219
  };
2199
- let a = n.data, o = [...ae(a.data.field, e.availableFields, ["data", "field"], "dimension"), ...y(a.data.field, e.availableFields, ["data", "field"], [
2220
+ let a = n.data, o = [...we(a.data.field, e.availableFields, ["data", "field"], "dimension"), ...h(a.data.field, e.availableFields, ["data", "field"], [
2200
2221
  H.FieldType.DATE,
2201
2222
  H.FieldType.TIMESTAMP,
2202
2223
  H.FieldType.TIMESTAMP_TZ
@@ -2211,7 +2232,7 @@ var Jt = {
2211
2232
  success: !1
2212
2233
  };
2213
2234
  let { pickerType: c, ...l } = a.settings ?? {};
2214
- return s = await v(s.state, X({
2235
+ return s = await y(s.state, X({
2215
2236
  pickerType: c,
2216
2237
  ...l
2217
2238
  }, {
@@ -2226,8 +2247,8 @@ var Jt = {
2226
2247
  }), ["settings"]), "issue" in s ? {
2227
2248
  issues: [s.issue],
2228
2249
  success: !1
2229
- } : _(s.state, Ve);
2230
- }, sn = async (e) => {
2250
+ } : v(s.state, Ke);
2251
+ }, ln = async (e) => {
2231
2252
  let t = w(e);
2232
2253
  if (t) return {
2233
2254
  issues: [{
@@ -2237,22 +2258,22 @@ var Jt = {
2237
2258
  }],
2238
2259
  success: !1
2239
2260
  };
2240
- let n = l.safeParse(e.definition);
2261
+ let n = le.safeParse(e.definition);
2241
2262
  if (!n.success) return {
2242
- issues: h(n.error, e.definition),
2263
+ issues: g(n.error, e.definition),
2243
2264
  success: !1
2244
2265
  };
2245
- let r = Ze.safeParse(e.baseVSpec);
2266
+ let r = Qe.safeParse(e.baseVSpec);
2246
2267
  if (!r.success) return {
2247
- issues: [g("invalid_structure", ["baseVSpec"], "Base slider vSpec is invalid.", { details: { issues: r.error.issues } })],
2268
+ issues: [_("invalid_structure", ["baseVSpec"], "Base slider vSpec is invalid.", { details: { issues: r.error.issues } })],
2248
2269
  success: !1
2249
2270
  };
2250
2271
  let i = r.data;
2251
2272
  if (!S(i, ["dimensions", "measures"])) return {
2252
- issues: [g("non_fresh_base_vspec", ["baseVSpec"], "Slider definitions require a fresh vSpec.")],
2273
+ issues: [_("non_fresh_base_vspec", ["baseVSpec"], "Slider definitions require a fresh vSpec.")],
2253
2274
  success: !1
2254
2275
  };
2255
- let a = n.data, o = [...ae(a.data.field, e.availableFields, ["data", "field"], "dimension"), ...y(a.data.field, e.availableFields, ["data", "field"], [
2276
+ let a = n.data, o = [...we(a.data.field, e.availableFields, ["data", "field"], "dimension"), ...h(a.data.field, e.availableFields, ["data", "field"], [
2256
2277
  H.FieldType.DATE,
2257
2278
  H.FieldType.DECIMAL,
2258
2279
  H.FieldType.FLOAT,
@@ -2271,7 +2292,7 @@ var Jt = {
2271
2292
  success: !1
2272
2293
  };
2273
2294
  let c = a.settings ?? {};
2274
- return s = await v(s.state, [...c.range === void 0 ? [] : [{
2295
+ return s = await y(s.state, [...c.range === void 0 ? [] : [{
2275
2296
  name: "setSliderManualRangeEnabled",
2276
2297
  payload: !0
2277
2298
  }], ...X(c, {
@@ -2282,7 +2303,7 @@ var Jt = {
2282
2303
  })], ["settings"]), "issue" in s ? {
2283
2304
  issues: [s.issue],
2284
2305
  success: !1
2285
- } : _(s.state, Ze);
2306
+ } : v(s.state, Qe);
2286
2307
  }, Q = (e) => {
2287
2308
  let t = z(e.type);
2288
2309
  return {
@@ -2295,9 +2316,9 @@ var Jt = {
2295
2316
  type: e.type,
2296
2317
  version: 1
2297
2318
  };
2298
- }, cn = [
2319
+ }, un = [
2299
2320
  Q({
2300
- compile: on,
2321
+ compile: cn,
2301
2322
  schema: V["date-picker"],
2302
2323
  type: "date-picker"
2303
2324
  }),
@@ -2327,12 +2348,12 @@ var Jt = {
2327
2348
  type: "atomic-input"
2328
2349
  }),
2329
2350
  Q({
2330
- compile: sn,
2351
+ compile: ln,
2331
2352
  schema: V.slider,
2332
2353
  type: "slider"
2333
2354
  })
2334
- ], $ = z("table"), ln = {
2335
- compile: Lt,
2355
+ ], $ = z("table"), dn = {
2356
+ compile: zt,
2336
2357
  documentation: $.documentation,
2337
2358
  examples: [$.example, ...($.additionalExamples ?? []).map(({ definition: e }) => e)],
2338
2359
  jsonSchema: B(V.table, `${$.documentation.title} definition`),
@@ -2340,24 +2361,24 @@ var Jt = {
2340
2361
  supportedFeatures: $.supportedFeatures,
2341
2362
  type: "table",
2342
2363
  version: 1
2343
- }, un = (e, t) => `${t}:${e}`, dn = [
2344
- qt,
2345
- Kt,
2346
- ...$t,
2347
- ...cn,
2348
- tn,
2349
- nn,
2350
- ln,
2364
+ }, fn = (e, t) => `${t}:${e}`, pn = [
2365
+ Yt,
2366
+ Jt,
2367
+ ...tn,
2368
+ ...un,
2351
2369
  rn,
2352
- en
2353
- ], fn = new Map(dn.map((e) => [un(e.type, e.version), e])), pn = (e, t = 1) => fn.get(un(e, t)), mn = () => [...fn.values()].map(({ documentation: e, examples: t, jsonSchema: n, supportedFeatures: r, type: i, version: a }) => ({
2370
+ an,
2371
+ dn,
2372
+ on,
2373
+ nn
2374
+ ], mn = new Map(pn.map((e) => [fn(e.type, e.version), e])), hn = (e, t = 1) => mn.get(fn(e, t)), gn = () => [...mn.values()].map(({ documentation: e, examples: t, jsonSchema: n, supportedFeatures: r, type: i, version: a }) => ({
2354
2375
  documentation: e,
2355
2376
  examples: t,
2356
2377
  jsonSchema: n,
2357
2378
  supportedFeatures: r,
2358
2379
  type: i,
2359
2380
  version: a
2360
- })), hn = async (e) => {
2381
+ })), _n = async (e) => {
2361
2382
  let t = w(e);
2362
2383
  if (t) return {
2363
2384
  issues: [{
@@ -2367,14 +2388,14 @@ var Jt = {
2367
2388
  }],
2368
2389
  success: !1
2369
2390
  };
2370
- let n = kt(e.definition);
2391
+ let n = jt(e.definition);
2371
2392
  if (n) return {
2372
2393
  issues: [n],
2373
2394
  success: !1
2374
2395
  };
2375
- let r = e.definition, i = pn(r.type, r.version), a = E.array(Pe).safeParse(e.availableFields);
2396
+ let r = e.definition, i = hn(r.type, r.version), a = E.array(ve).safeParse(e.availableFields);
2376
2397
  if (!a.success) return {
2377
- issues: h(a.error, e.availableFields, ["availableFields"]),
2398
+ issues: g(a.error, e.availableFields, ["availableFields"]),
2378
2399
  success: !1
2379
2400
  };
2380
2401
  let o = /* @__PURE__ */ new Map(), s = a.data.flatMap((e, t) => {
@@ -2394,14 +2415,14 @@ var Jt = {
2394
2415
  issues: s,
2395
2416
  success: !1
2396
2417
  };
2397
- let c = ie(a.data), l = E.array(Xe).safeParse(c);
2418
+ let c = ie(a.data), l = E.array(Ze).safeParse(c);
2398
2419
  if (!l.success) return {
2399
- issues: h(l.error, c, ["availableFields"]),
2420
+ issues: g(l.error, c, ["availableFields"]),
2400
2421
  success: !1
2401
2422
  };
2402
2423
  if (!i) return {
2403
2424
  issues: [{
2404
- allowedValues: Ot(),
2425
+ allowedValues: At(),
2405
2426
  code: "unsupported_visualization",
2406
2427
  message: "Visualization definition descriptor is not available.",
2407
2428
  path: ["type"]
@@ -2413,10 +2434,10 @@ var Jt = {
2413
2434
  availableFields: a.data
2414
2435
  });
2415
2436
  if (!u.success) return u;
2416
- let d = Gt(r, a.data);
2437
+ let d = qt(r, a.data);
2417
2438
  return d.length > 0 ? {
2418
2439
  ...u,
2419
2440
  warnings: d
2420
2441
  } : u;
2421
2442
  };
2422
- export { At as i, pn as n, mn as r, hn as t };
2443
+ export { Mt as i, hn as n, gn as r, _n as t };