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