@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.
- package/CHANGELOG.md +21 -1
- package/README.md +22 -4
- package/THIRD_PARTY_NOTICES.md +494 -0
- package/VISUALIZATION_DEFINITIONS.md +59 -145
- package/chunks/{Button-CCF851ea.js → Button-CPG4WX8X.js} +3 -3
- package/chunks/{CircularProgress-yupH6YWs.js → CircularProgress-PSLW8HmD.js} +12 -12
- package/chunks/FieldTypeIcon-5k2bkqd0.js +22 -0
- package/chunks/{LinearProgress-CyFjN4px.js → LinearProgress-KQ2EQlGL.js} +16 -16
- package/chunks/{MenuOption-CQpT79AP.js → MenuOption-B-6K7kks.js} +151 -151
- package/chunks/{Title-C-p4ZarD.js → Title-BmvwZYkh.js} +32 -32
- package/chunks/{_createAggregator-BF4qG9XK.js → _createAggregator-CFmH6gUN.js} +11 -11
- package/chunks/{app-filter-bar.compiler-8fxCo2q7.js → app-filter-bar.compiler-BY5-T16I.js} +8 -8
- package/chunks/{bar-layout-DStC-GNV.js → bar-layout-BNou0dZF.js} +2 -2
- package/chunks/{bar.compiler-CQAu8KL8.js → bar.compiler-BkhO7sDd.js} +55 -53
- package/chunks/{builder-CScg1TOS.js → builder-CNjuqD2z.js} +107 -56
- package/chunks/category-axis-D1OVyMrr.js +20 -0
- package/chunks/{coloring-9jU3s_-p.js → coloring-BOiP0rmn.js} +54 -54
- package/chunks/{createSimplePaletteValueFilter-C4hZpCdn.js → createSimplePaletteValueFilter-BkgQ7MFE.js} +166 -166
- package/chunks/defaults-B5_8S-J-.js +3 -0
- package/chunks/{definitions-C4grxhye.js → definitions-AS9GcavE.js} +263 -242
- package/chunks/{escobar-CjirINHP.js → escobar-cQ1eQ64G.js} +8528 -8461
- package/chunks/{extend-preset-D-l9u_we.js → extend-preset-BlCbcXKR.js} +421 -421
- package/chunks/{filter.compiler-lji2Acgn.js → filter.compiler-CI7dDNM1.js} +12 -12
- package/chunks/{filtering-C1zakrrX.js → filtering-Dwi7hDPZ.js} +263 -263
- package/chunks/handlers-C63NVo7i.js +15433 -0
- package/chunks/{icon-picker-styles-Bj80ZUBK.js → icon-picker-styles-CBlxEu3s.js} +8 -8
- package/chunks/{isEqual-Ch9OEye3.js → isEqual-BdHo6wqq.js} +1 -1
- package/chunks/{isFocusVisible-CgMP0qkR.js → isFocusVisible-C1nlVUwL.js} +9 -9
- package/chunks/line.compiler-DCv3h42f.js +198 -0
- package/chunks/linear-Bq_r9l5S.js +264 -0
- package/chunks/{logger-CKRjhSHQ.js → logger-Bc-DqDM_.js} +72 -72
- package/chunks/{lookup-BWllin0q.js → lookup-B3tWH2hX.js} +1 -0
- package/chunks/{map.compiler-CKzorLgK.js → map.compiler-CRO6XpdI.js} +43 -45
- package/chunks/measure-format-default-B6ghxih7.js +22 -0
- package/chunks/{metadata-Bb9pTXrq.js → metadata-CtkvZEhS.js} +1 -1
- package/chunks/number.compiler-kV4lobCZ.js +57 -0
- package/chunks/{operations-DZoY50VX.js → operations-COl9wgqi.js} +9893 -9831
- package/chunks/{range-D1BTmFMp.js → range-CMJ5yc5Z.js} +2 -2
- package/chunks/{react-dom-Dgv2azN2.js → react-dom-BjsCbYHq.js} +76 -76
- package/chunks/{render-wrappers-_P3xwu5A.js → render-wrappers-DFHi3Wkr.js} +1 -1
- package/chunks/{requirements-NHNrR8Ie.js → requirements-C5YLmHKe.js} +251 -227
- package/chunks/{shared-UitWpq1J.js → shared-DyqxOie0.js} +290 -278
- package/chunks/standalone-06i1wmIX.js +6 -0
- package/chunks/{standalone-DtBk_iUz.js → standalone-9jrQ3zJT.js} +10 -10
- package/chunks/standalone-B6zUvxNQ.js +357 -0
- package/chunks/{standalone-Bnnr87pc.js → standalone-BYK2U0Vd.js} +418 -679
- package/chunks/standalone-Be5APcVv.js +762 -0
- package/chunks/standalone-Bp4G3MDx.js +396 -0
- package/chunks/{standalone-CbPk8bKn.js → standalone-BrjtMIdd.js} +132 -132
- package/chunks/{standalone-BOzHA_d4.js → standalone-Bsfz5vnJ.js} +57 -57
- package/chunks/standalone-BuXpKMnc.js +2 -0
- package/chunks/standalone-CIjNYyya.js +8378 -0
- package/chunks/{standalone-B0U6c3su.js → standalone-CS5VGoja.js} +358 -358
- package/chunks/standalone-CUGt2FUF.js +2 -0
- package/chunks/{standalone-BapqaniK.js → standalone-ChfEHb28.js} +2299 -1072
- package/chunks/standalone-CnF2OYLQ.js +355 -0
- package/chunks/standalone-CznEEiq3.js +422 -0
- package/chunks/{standalone-Ck63MZzj.js → standalone-D9k5SCd8.js} +165 -165
- package/chunks/{standalone-CRdDZYeM.js → standalone-DYVYccmY.js} +855 -855
- package/chunks/{standalone-CVknVdUC.js → standalone-DaNxWIKn.js} +27 -27
- package/chunks/{standalone-swGs70tD.js → standalone-Db_HNuWx.js} +50 -50
- package/chunks/standalone-DcuE8KBa.js +287 -0
- package/chunks/{standalone-U0WJwFlG.js → standalone-I5kRIsp8.js} +97 -97
- package/chunks/{standalone-BBu90BhK.js → standalone-K2OvRAQM.js} +125 -125
- package/chunks/{standalone-DCFY1MAV.js → standalone-c4CPN6ug.js} +4634 -4633
- package/chunks/{standalone-ByKKqT5L.js → standalone-iOnJhCvA.js} +302 -302
- package/chunks/standalone-pCrzBiTy.js +773 -0
- package/chunks/standalone-qrZaimgC.js +689 -0
- package/chunks/standalone-yqDJ8h3K.js +1012 -0
- package/chunks/{table.compiler-OWSx5MOq.js → table.compiler-CMH_dtYs.js} +29 -29
- package/chunks/{useFieldName-B8iCYyw1.js → useFieldName-BfxBzhhH.js} +1 -1
- package/chunks/{utils-3Igg6xmO.js → utils-BdJrEeIQ.js} +4037 -4015
- package/chunks/{view-DdMLZySj.js → view-Q-_XIrWE.js} +1615 -1615
- package/chunks/{visualization-filters-CzvFHE6M.js → visualization-filters-BwS0xUqs.js} +1723 -1693
- package/chunks/{with-html-element-DOfkR3C1.js → with-html-element-D_ooGNWI.js} +4006 -3994
- package/definitions.js +2 -2
- package/docs/operations/astrato-app-filter-bar.md +1 -1
- package/docs/operations/bar.md +30 -1
- package/docs/operations/combo.md +30 -1
- package/docs/operations/date-picker.md +1 -1
- package/docs/operations/distribution-gauge.md +1 -1
- package/docs/operations/dot.md +1 -1
- package/docs/operations/filter.md +1 -1
- package/docs/operations/gauge.md +1 -1
- package/docs/operations/heatMap.md +1 -1
- package/docs/operations/histogram.md +1 -1
- package/docs/operations/iframe.md +1 -1
- package/docs/operations/image.md +1 -1
- package/docs/operations/index.md +5 -4
- package/docs/operations/line.md +48 -1
- package/docs/operations/map.md +5274 -0
- package/docs/operations/number.md +1 -1
- package/docs/operations/pie.md +1 -1
- package/docs/operations/radar.md +1 -1
- package/docs/operations/sankey.md +1 -1
- package/docs/operations/scatter.md +1 -1
- package/docs/operations/shape.md +1 -1
- package/docs/operations/simpleTextObject.md +1 -1
- package/docs/operations/slider.md +1 -1
- package/docs/operations/table.md +1 -1
- package/docs/operations/tree.md +1 -1
- package/docs/operations/treemap.md +1 -1
- package/docs/operations/waterfall.md +1 -1
- package/docs/operations/word-cloud.md +1 -1
- package/getters.js +3 -3
- package/index.js +528 -504
- package/metadata.js +2 -2
- package/operations.js +6 -6
- package/package.json +73 -68
- package/src/definitions/index.d.ts +1 -1
- package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +34 -53
- package/src/definitions/model/definitions/schema-registry.d.ts +2 -2
- package/src/definitions/model/definitions/schemas/bar.schema.d.ts +1 -1
- package/src/definitions/model/definitions/schemas/broad-chart.schema.d.ts +2 -2
- package/src/definitions/model/definitions/schemas/common.schema.d.ts +14 -2
- package/src/definitions/model/definitions/schemas/index.d.ts +1 -1
- package/src/definitions/model/definitions/schemas/line.schema.d.ts +1 -1
- package/src/definitions/model/definitions/types/compilation.types.d.ts +4 -1
- package/src/types.d.ts +28 -28
- package/src/visualization-catalog.d.ts +3 -0
- package/styles.css +1 -1
- package/chunks/FieldTypeIcon-D_MzsdfY.js +0 -22
- package/chunks/defaults-cyNhn37t.js +0 -3
- package/chunks/handlers-ZviIUC-j.js +0 -15387
- package/chunks/line.compiler-De5fiKuR.js +0 -198
- package/chunks/number.compiler-CaTmJkmi.js +0 -53
- package/chunks/standalone-BEekPuA12.js +0 -357
- package/chunks/standalone-BR2JuRIC.js +0 -422
- package/chunks/standalone-BwJqDj2Z.js +0 -396
- package/chunks/standalone-CRfDOO1x.js +0 -287
- package/chunks/standalone-DZDGX3aa.js +0 -518
- package/chunks/standalone-DhfgeJIk.js +0 -1012
- package/chunks/standalone-DibjA73M.js +0 -6
- package/chunks/standalone-DxBAyqAu.js +0 -772
- package/chunks/standalone-KMQPsNsq.js +0 -2
- package/chunks/standalone-MBLSvsrY.js +0 -2
- package/chunks/standalone-wgFAVnnm.js +0 -355
- package/chunks/standalone-xGV0dqPV.js +0 -689
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $ as s, A as c, B as l, C as u,
|
|
3
|
-
import {
|
|
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
|
|
6
|
-
import { n as mt } from "./bar-layout-
|
|
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
|
-
},
|
|
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
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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.",
|
|
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
|
-
],
|
|
320
|
-
|
|
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
|
|
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:
|
|
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.",
|
|
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:
|
|
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:
|
|
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
|
-
|
|
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:
|
|
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
|
|
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: [
|
|
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:
|
|
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
|
-
"
|
|
1134
|
-
|
|
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: ["
|
|
1138
|
-
summary: "Sequential contribution chart
|
|
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:
|
|
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 =
|
|
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":
|
|
1455
|
-
bar:
|
|
1456
|
-
combo:
|
|
1457
|
-
dot:
|
|
1458
|
-
scatter:
|
|
1459
|
-
histogram:
|
|
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:
|
|
1462
|
-
gauge:
|
|
1463
|
-
"distribution-gauge":
|
|
1464
|
-
pie:
|
|
1465
|
-
tree:
|
|
1466
|
-
treemap:
|
|
1467
|
-
sankey:
|
|
1468
|
-
waterfall:
|
|
1469
|
-
"word-cloud":
|
|
1470
|
-
"date-picker":
|
|
1471
|
-
iframe:
|
|
1472
|
-
image:
|
|
1473
|
-
shape:
|
|
1474
|
-
simpleTextObject:
|
|
1475
|
-
"atomic-input":
|
|
1476
|
-
slider:
|
|
1477
|
-
line:
|
|
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:
|
|
1480
|
-
number:
|
|
1481
|
-
filter:
|
|
1482
|
-
},
|
|
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" &&
|
|
1503
|
-
allowedValues:
|
|
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
|
-
},
|
|
1509
|
-
let t =
|
|
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 =
|
|
1535
|
+
let n = kt(e.type, e.version);
|
|
1515
1536
|
if (!n) return {
|
|
1516
1537
|
issues: [{
|
|
1517
|
-
allowedValues:
|
|
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:
|
|
1551
|
+
issues: g(r.error, e),
|
|
1531
1552
|
success: !1
|
|
1532
1553
|
};
|
|
1533
|
-
},
|
|
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
|
-
],
|
|
1558
|
+
], Vt = ["none", "inherit"], Ht = [
|
|
1538
1559
|
"dimensions",
|
|
1539
1560
|
"rowDimensions",
|
|
1540
1561
|
"columnDimensions",
|
|
1541
1562
|
"columns"
|
|
1542
|
-
],
|
|
1543
|
-
if (
|
|
1544
|
-
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 (
|
|
1549
|
-
let [
|
|
1569
|
+
if (t?.kind !== "dimension") return;
|
|
1570
|
+
let [r] = ie([t]);
|
|
1550
1571
|
return {
|
|
1551
|
-
dataType:
|
|
1552
|
-
hasOwnFormat: !!
|
|
1572
|
+
dataType: n(r),
|
|
1573
|
+
hasOwnFormat: !!e(r),
|
|
1553
1574
|
label: "dimension"
|
|
1554
1575
|
};
|
|
1555
|
-
},
|
|
1576
|
+
}, Wt = (e) => {
|
|
1556
1577
|
let t = "data" in e ? e.data : void 0;
|
|
1557
|
-
return
|
|
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
|
-
},
|
|
1569
|
-
let r = e.format?.formatType, i =
|
|
1570
|
-
if (r === void 0 || !
|
|
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
|
-
}),
|
|
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
|
-
},
|
|
1597
|
-
compile:
|
|
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"),
|
|
1606
|
-
compile:
|
|
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
|
-
|
|
1616
|
-
var
|
|
1636
|
+
o();
|
|
1637
|
+
var Xt = {
|
|
1617
1638
|
combo: {
|
|
1618
|
-
coloringType:
|
|
1639
|
+
coloringType: t.PerEachMeasure,
|
|
1619
1640
|
queryLimit: !0,
|
|
1620
|
-
schema:
|
|
1641
|
+
schema: Ae,
|
|
1621
1642
|
sorting: !0,
|
|
1622
1643
|
type: "combo",
|
|
1623
|
-
vSpecSchema:
|
|
1644
|
+
vSpecSchema: qe
|
|
1624
1645
|
},
|
|
1625
1646
|
"distribution-gauge": {
|
|
1626
|
-
coloringType:
|
|
1627
|
-
measureRole: () =>
|
|
1628
|
-
schema:
|
|
1647
|
+
coloringType: t.PerEachMeasure,
|
|
1648
|
+
measureRole: () => r.GAUGE_VALUE,
|
|
1649
|
+
schema: te,
|
|
1629
1650
|
type: "distribution-gauge",
|
|
1630
|
-
vSpecSchema:
|
|
1651
|
+
vSpecSchema: He
|
|
1631
1652
|
},
|
|
1632
1653
|
dot: {
|
|
1633
|
-
coloringType:
|
|
1634
|
-
schema:
|
|
1654
|
+
coloringType: t.Categorical,
|
|
1655
|
+
schema: fe,
|
|
1635
1656
|
type: "dot",
|
|
1636
|
-
vSpecSchema:
|
|
1657
|
+
vSpecSchema: Ge
|
|
1637
1658
|
},
|
|
1638
1659
|
gauge: {
|
|
1639
|
-
coloringType: (e) => (e.data.dimensions?.length ?? 0) > 0 ?
|
|
1640
|
-
measureRole: (
|
|
1641
|
-
schema:
|
|
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:
|
|
1664
|
+
vSpecSchema: Ue
|
|
1644
1665
|
},
|
|
1645
1666
|
heatMap: {
|
|
1646
|
-
coloringType:
|
|
1647
|
-
dimensionRole: (e) => e === 0 ?
|
|
1648
|
-
measureRole: (
|
|
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:
|
|
1674
|
+
vSpecSchema: tt
|
|
1654
1675
|
},
|
|
1655
1676
|
histogram: {
|
|
1656
|
-
coloringType:
|
|
1657
|
-
schema:
|
|
1677
|
+
coloringType: t.Single,
|
|
1678
|
+
schema: ae,
|
|
1658
1679
|
type: "histogram",
|
|
1659
|
-
vSpecSchema:
|
|
1680
|
+
vSpecSchema: Be
|
|
1660
1681
|
},
|
|
1661
1682
|
pie: {
|
|
1662
|
-
coloringType:
|
|
1663
|
-
measureRole: (
|
|
1683
|
+
coloringType: t.Categorical,
|
|
1684
|
+
measureRole: (e) => e === 0 ? r.PIE_CHART_SLICE : r.PIE_CHART_LENGTH,
|
|
1664
1685
|
queryLimit: !0,
|
|
1665
|
-
schema:
|
|
1686
|
+
schema: s,
|
|
1666
1687
|
sorting: !0,
|
|
1667
1688
|
type: "pie",
|
|
1668
|
-
vSpecSchema:
|
|
1689
|
+
vSpecSchema: at
|
|
1669
1690
|
},
|
|
1670
1691
|
radar: {
|
|
1671
|
-
conditionalColoringFallbackType:
|
|
1672
|
-
schema:
|
|
1692
|
+
conditionalColoringFallbackType: t.Single,
|
|
1693
|
+
schema: ye,
|
|
1673
1694
|
type: "radar",
|
|
1674
|
-
vSpecSchema:
|
|
1695
|
+
vSpecSchema: rt
|
|
1675
1696
|
},
|
|
1676
1697
|
sankey: {
|
|
1677
|
-
schema:
|
|
1698
|
+
schema: Fe,
|
|
1678
1699
|
type: "sankey",
|
|
1679
|
-
vSpecSchema:
|
|
1700
|
+
vSpecSchema: Xe
|
|
1680
1701
|
},
|
|
1681
1702
|
scatter: {
|
|
1682
|
-
coloringType:
|
|
1683
|
-
dimensionRole: (e) => e === 0 ?
|
|
1684
|
-
measureRole: (
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
][
|
|
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:
|
|
1711
|
+
schema: De,
|
|
1691
1712
|
sorting: !0,
|
|
1692
1713
|
type: "scatter",
|
|
1693
|
-
vSpecSchema:
|
|
1714
|
+
vSpecSchema: et
|
|
1694
1715
|
},
|
|
1695
1716
|
tree: {
|
|
1696
1717
|
queryLimit: !0,
|
|
1697
|
-
schema:
|
|
1718
|
+
schema: Me,
|
|
1698
1719
|
sorting: !0,
|
|
1699
1720
|
type: "tree",
|
|
1700
|
-
vSpecSchema:
|
|
1721
|
+
vSpecSchema: Ye
|
|
1701
1722
|
},
|
|
1702
1723
|
treemap: {
|
|
1703
|
-
schema:
|
|
1724
|
+
schema: Se,
|
|
1704
1725
|
type: "treemap",
|
|
1705
|
-
vSpecSchema:
|
|
1726
|
+
vSpecSchema: Je
|
|
1706
1727
|
},
|
|
1707
1728
|
waterfall: {
|
|
1708
|
-
schema:
|
|
1729
|
+
schema: ge,
|
|
1709
1730
|
type: "waterfall",
|
|
1710
|
-
vSpecSchema:
|
|
1731
|
+
vSpecSchema: ot
|
|
1711
1732
|
},
|
|
1712
1733
|
"word-cloud": {
|
|
1713
|
-
conditionalColoringFallbackType:
|
|
1714
|
-
schema:
|
|
1734
|
+
conditionalColoringFallbackType: t.Single,
|
|
1735
|
+
schema: ke,
|
|
1715
1736
|
type: "word-cloud",
|
|
1716
|
-
vSpecSchema:
|
|
1737
|
+
vSpecSchema: We
|
|
1717
1738
|
}
|
|
1718
|
-
},
|
|
1719
|
-
let n = [], r = t.presentation, i =
|
|
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(...
|
|
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(...
|
|
1759
|
-
name:
|
|
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:
|
|
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
|
-
}),
|
|
1780
|
-
},
|
|
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:
|
|
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:
|
|
1833
|
+
name: ct.SET_GAUGE_COMPARISON_MODE,
|
|
1813
1834
|
payload: !0
|
|
1814
1835
|
}), t.presentation?.displayMode && n.push({
|
|
1815
|
-
name: e ?
|
|
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:
|
|
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
|
|
1839
|
-
},
|
|
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
|
-
}) :
|
|
1865
|
+
}) : y(e, [{
|
|
1845
1866
|
name: "setColoringType",
|
|
1846
1867
|
payload: typeof s == "function" ? s(t) : s
|
|
1847
1868
|
}], a ? ["presentation", "legend"] : ["presentation", "coloring"]);
|
|
1848
|
-
},
|
|
1849
|
-
let n =
|
|
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:
|
|
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: [
|
|
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: [
|
|
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
|
-
...
|
|
1880
|
-
...
|
|
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
|
-
...
|
|
1909
|
+
...Ce(s.filterGroup, e.availableFields),
|
|
1889
1910
|
...Le(s.sorting, ee),
|
|
1890
|
-
...
|
|
1891
|
-
...t === "histogram" && l[0] ?
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
} :
|
|
1976
|
+
} : v(m.state, n.vSpecSchema));
|
|
1956
1977
|
}, G = (e) => {
|
|
1957
1978
|
let t = z(e.type);
|
|
1958
1979
|
return {
|
|
1959
|
-
compile: (t) =>
|
|
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
|
-
},
|
|
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"),
|
|
2026
|
-
compile:
|
|
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"),
|
|
2035
|
-
compile:
|
|
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"),
|
|
2044
|
-
compile:
|
|
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"),
|
|
2053
|
-
compile:
|
|
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
|
-
}]),
|
|
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:
|
|
2103
|
+
schema: m,
|
|
2083
2104
|
type: "atomic-input",
|
|
2084
|
-
vSpecSchema:
|
|
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:
|
|
2112
|
+
schema: oe,
|
|
2092
2113
|
type: "iframe",
|
|
2093
|
-
vSpecSchema:
|
|
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:
|
|
2125
|
+
schema: Re,
|
|
2105
2126
|
type: "image",
|
|
2106
|
-
vSpecSchema:
|
|
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:
|
|
2145
|
+
schema: l,
|
|
2125
2146
|
type: "shape",
|
|
2126
|
-
vSpecSchema:
|
|
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:
|
|
2166
|
+
schema: p,
|
|
2146
2167
|
type: "simpleTextObject",
|
|
2147
|
-
vSpecSchema:
|
|
2168
|
+
vSpecSchema: nt
|
|
2148
2169
|
}
|
|
2149
2170
|
}, Z = async (e, t) => {
|
|
2150
|
-
let n =
|
|
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:
|
|
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: [
|
|
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
|
|
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
|
-
} :
|
|
2174
|
-
},
|
|
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 =
|
|
2205
|
+
let n = re.safeParse(e.definition);
|
|
2185
2206
|
if (!n.success) return {
|
|
2186
|
-
issues:
|
|
2207
|
+
issues: g(n.error, e.definition),
|
|
2187
2208
|
success: !1
|
|
2188
2209
|
};
|
|
2189
|
-
let r =
|
|
2210
|
+
let r = Ke.safeParse(e.baseVSpec);
|
|
2190
2211
|
if (!r.success) return {
|
|
2191
|
-
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: [
|
|
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 = [...
|
|
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
|
|
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
|
-
} :
|
|
2230
|
-
},
|
|
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 =
|
|
2261
|
+
let n = le.safeParse(e.definition);
|
|
2241
2262
|
if (!n.success) return {
|
|
2242
|
-
issues:
|
|
2263
|
+
issues: g(n.error, e.definition),
|
|
2243
2264
|
success: !1
|
|
2244
2265
|
};
|
|
2245
|
-
let r =
|
|
2266
|
+
let r = Qe.safeParse(e.baseVSpec);
|
|
2246
2267
|
if (!r.success) return {
|
|
2247
|
-
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: [
|
|
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 = [...
|
|
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
|
|
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
|
-
} :
|
|
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
|
-
},
|
|
2319
|
+
}, un = [
|
|
2299
2320
|
Q({
|
|
2300
|
-
compile:
|
|
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:
|
|
2351
|
+
compile: ln,
|
|
2331
2352
|
schema: V.slider,
|
|
2332
2353
|
type: "slider"
|
|
2333
2354
|
})
|
|
2334
|
-
], $ = z("table"),
|
|
2335
|
-
compile:
|
|
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
|
-
},
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
...
|
|
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
|
-
|
|
2353
|
-
|
|
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
|
-
})),
|
|
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 =
|
|
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 =
|
|
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:
|
|
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(
|
|
2418
|
+
let c = ie(a.data), l = E.array(Ze).safeParse(c);
|
|
2398
2419
|
if (!l.success) return {
|
|
2399
|
-
issues:
|
|
2420
|
+
issues: g(l.error, c, ["availableFields"]),
|
|
2400
2421
|
success: !1
|
|
2401
2422
|
};
|
|
2402
2423
|
if (!i) return {
|
|
2403
2424
|
issues: [{
|
|
2404
|
-
allowedValues:
|
|
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 =
|
|
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 {
|
|
2443
|
+
export { Mt as i, hn as n, gn as r, _n as t };
|