@astrato-io/visualizations 0.11.0 → 0.12.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 +19 -0
- package/README.md +129 -4
- package/VISUALIZATION_DEFINITIONS.md +3 -1
- package/chunks/{Button-CPG4WX8X.js → Button-CQdoKSXX.js} +3 -3
- package/chunks/{CircularProgress-PSLW8HmD.js → CircularProgress-DpT1lwWw.js} +18 -18
- package/chunks/FieldTypeIcon-Cg4F9Q5D.js +22 -0
- package/chunks/{LinearProgress-KQ2EQlGL.js → LinearProgress-B7S0Q26A.js} +8 -8
- package/chunks/{MenuOption-B-6K7kks.js → MenuOption-DpKFJxmo.js} +133 -133
- package/chunks/{Title-BmvwZYkh.js → Title-m5damhc0.js} +10 -10
- package/chunks/{_createAggregator-CFmH6gUN.js → _createAggregator-BA8_iU9q.js} +7 -7
- package/chunks/{app-filter-bar.compiler-BY5-T16I.js → app-filter-bar.compiler--T4Qz3Wu.js} +3 -3
- package/chunks/{bar-layout-BNou0dZF.js → bar-layout-OFhxn2Go.js} +2 -2
- package/chunks/{bar.compiler-BkhO7sDd.js → bar.compiler-hWZBYYvV.js} +62 -62
- package/chunks/{builder-CNjuqD2z.js → builder-7w_bgV_h.js} +31 -31
- package/chunks/{coloring-BOiP0rmn.js → coloring-Cd6p0GQJ.js} +88 -83
- package/chunks/{createSimplePaletteValueFilter-BkgQ7MFE.js → createSimplePaletteValueFilter-CiJT8s1s.js} +55 -55
- package/chunks/defaults-CMFqXvaJ.js +3 -0
- package/chunks/{definitions-AS9GcavE.js → definitions-DTauTjIX.js} +412 -406
- package/chunks/{escobar-cQ1eQ64G.js → escobar-CMvphKSK.js} +4787 -4717
- package/chunks/{extend-preset-BlCbcXKR.js → extend-preset-BpXttHFk.js} +371 -372
- package/chunks/{filter.compiler-CI7dDNM1.js → filter.compiler-DOGFweJz.js} +4 -4
- package/chunks/{filtering-Dwi7hDPZ.js → filtering-NOnDcGbo.js} +183 -183
- package/chunks/handlers-CyYFSfhM.js +15393 -0
- package/chunks/{icon-picker-styles-CBlxEu3s.js → icon-picker-styles-DuSERhBU.js} +2 -2
- package/chunks/{isEqual-BdHo6wqq.js → isEqual-4f8yUUtC.js} +1 -1
- package/chunks/{isFocusVisible-C1nlVUwL.js → isFocusVisible-Czm70MGc.js} +1 -1
- package/chunks/line.compiler-B-4H55_T.js +203 -0
- package/chunks/{logger-Bc-DqDM_.js → logger-Cioob-QV.js} +71 -70
- package/chunks/{map.compiler-CRO6XpdI.js → map.compiler-Cv5V6EhF.js} +13 -13
- package/chunks/measure-axis-label-format-COy8U_dd.js +27 -0
- package/chunks/{measure-format-default-B6ghxih7.js → measure-format-default-B_kuGSzi.js} +7 -3
- package/chunks/{metadata-CtkvZEhS.js → metadata-dGSe5UWy.js} +5 -5
- package/chunks/{number.compiler-kV4lobCZ.js → number.compiler-D7nMcEMv.js} +8 -8
- package/chunks/{operations-COl9wgqi.js → operations-CgfehCad.js} +11462 -11223
- package/chunks/{range-CMJ5yc5Z.js → range-Dmwp9kVB.js} +2 -2
- package/chunks/{react-dom-BjsCbYHq.js → react-dom-CfuL-m78.js} +24 -24
- package/chunks/{render-wrappers-DFHi3Wkr.js → render-wrappers--g-zPFBW.js} +1 -1
- package/chunks/{requirements-C5YLmHKe.js → requirements-DHayNJ2C.js} +83 -83
- package/chunks/{shared-DyqxOie0.js → shared-DoEN9nNM.js} +282 -277
- package/chunks/standalone-B3hRGgYi.js +773 -0
- package/chunks/{standalone-BYK2U0Vd.js → standalone-BPNXgFft.js} +380 -380
- package/chunks/standalone-BPTT8XEu.js +424 -0
- package/chunks/standalone-BgAeHROc.js +2 -0
- package/chunks/{standalone-I5kRIsp8.js → standalone-BkQxag7M.js} +81 -81
- package/chunks/{standalone-DYVYccmY.js → standalone-Bxa3x6dg.js} +913 -913
- package/chunks/standalone-C0If-V6O.js +773 -0
- package/chunks/standalone-C1TOyflX.js +287 -0
- package/chunks/{standalone-DaNxWIKn.js → standalone-CE5PwJN0.js} +21 -21
- package/chunks/{standalone-K2OvRAQM.js → standalone-CG7IFN6n.js} +121 -121
- package/chunks/{standalone-Db_HNuWx.js → standalone-CKlgGu80.js} +44 -44
- package/chunks/standalone-CNf-oA2U.js +355 -0
- package/chunks/{standalone-9jrQ3zJT.js → standalone-CXPdWFlw.js} +10 -10
- package/chunks/{standalone-c4CPN6ug.js → standalone-Cf0_5tbu.js} +5783 -5785
- package/chunks/{standalone-Bp4G3MDx.js → standalone-DMi4-Vp3.js} +118 -118
- package/chunks/{standalone-BrjtMIdd.js → standalone-DTEX67C8.js} +108 -108
- package/chunks/{standalone-iOnJhCvA.js → standalone-DU46-kYv.js} +181 -181
- package/chunks/standalone-Dbn3jSH6.js +690 -0
- package/chunks/{standalone-CS5VGoja.js → standalone-DdcAL_k_.js} +833 -837
- package/chunks/standalone-DwCIA0UG.js +1057 -0
- package/chunks/standalone-Dz13tl3P.js +357 -0
- package/chunks/{standalone-CIjNYyya.js → standalone-H9GFzFk_.js} +937 -938
- package/chunks/{standalone-ChfEHb28.js → standalone-MduR0qre.js} +1279 -1279
- package/chunks/standalone-ejTz66P3.js +2 -0
- package/chunks/{standalone-D9k5SCd8.js → standalone-keB-0wK3.js} +189 -189
- package/chunks/{standalone-Bsfz5vnJ.js → standalone-nnkuQd0K.js} +35 -35
- package/chunks/standalone-vGGR6Vcn.js +6 -0
- package/chunks/{table.compiler-CMH_dtYs.js → table.compiler-mS4UvhLT.js} +12 -12
- package/chunks/theme-MYp6Rj1J.js +232 -0
- package/chunks/{useFieldName-BfxBzhhH.js → useFieldName-AdSak4Ch.js} +1 -1
- package/chunks/{utils-BdJrEeIQ.js → utils-CUKgR7it.js} +3265 -3133
- package/chunks/{view-Q-_XIrWE.js → view-BeYwpcVD.js} +478 -478
- package/chunks/{visualization-filters-BwS0xUqs.js → visualization-filters-B9qik5_K.js} +2706 -2384
- package/chunks/{with-html-element-D_ooGNWI.js → with-html-element-1GSeLT59.js} +3888 -3870
- package/definitions.js +2 -2
- package/docs/operations/astrato-app-filter-bar.md +1 -1
- package/docs/operations/bar.md +115 -32
- package/docs/operations/combo.md +50 -17
- package/docs/operations/date-picker.md +4 -4
- package/docs/operations/distribution-gauge.md +18 -16
- package/docs/operations/dot.md +107 -24
- package/docs/operations/filter.md +10 -8
- package/docs/operations/gauge.md +20 -18
- package/docs/operations/heatMap.md +73 -21
- package/docs/operations/histogram.md +45 -12
- package/docs/operations/iframe.md +1 -1
- package/docs/operations/image.md +1 -1
- package/docs/operations/index.md +11 -11
- package/docs/operations/line.md +57 -24
- package/docs/operations/map.md +16 -16
- package/docs/operations/number.md +10 -9
- package/docs/operations/pie.md +23 -21
- package/docs/operations/radar.md +13 -11
- package/docs/operations/sankey.md +19 -17
- package/docs/operations/scatter.md +111 -28
- package/docs/operations/shape.md +5 -5
- package/docs/operations/simpleTextObject.md +4 -4
- package/docs/operations/slider.md +1 -1
- package/docs/operations/table.md +27 -25
- package/docs/operations/tree.md +5 -3
- package/docs/operations/treemap.md +70 -18
- package/docs/operations/waterfall.md +40 -7
- package/docs/operations/word-cloud.md +69 -17
- package/getters.js +2 -2
- package/index.js +474 -525
- package/metadata.js +2 -2
- package/operations.js +24 -17
- package/package.json +71 -72
- package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +1 -1
- package/src/definitions/model/definitions/schema-registry.d.ts +13 -12
- package/src/definitions/model/definitions/schemas/bar.schema.d.ts +2 -2
- package/src/definitions/model/definitions/schemas/common.schema.d.ts +5 -4
- package/src/definitions/model/definitions/schemas/line.schema.d.ts +3 -2
- package/src/definitions/model/definitions/schemas/number.schema.d.ts +1 -1
- package/src/definitions/model/definitions/schemas/table.schema.d.ts +14 -14
- package/src/index.d.ts +1 -1
- package/src/operations/index.d.ts +11 -1
- package/src/types.d.ts +166 -1
- package/chunks/FieldTypeIcon-5k2bkqd0.js +0 -22
- package/chunks/category-axis-D1OVyMrr.js +0 -20
- package/chunks/color-rules-DYJL4fIW.js +0 -15
- package/chunks/color-settings-DJFoFTip.js +0 -5
- package/chunks/defaults-B5_8S-J-.js +0 -3
- package/chunks/handlers-C63NVo7i.js +0 -15433
- package/chunks/line.compiler-DCv3h42f.js +0 -198
- package/chunks/standalone-06i1wmIX.js +0 -6
- package/chunks/standalone-B6zUvxNQ.js +0 -357
- package/chunks/standalone-Be5APcVv.js +0 -762
- package/chunks/standalone-BuXpKMnc.js +0 -2
- package/chunks/standalone-CUGt2FUF.js +0 -2
- package/chunks/standalone-CnF2OYLQ.js +0 -355
- package/chunks/standalone-CznEEiq3.js +0 -422
- package/chunks/standalone-DcuE8KBa.js +0 -287
- package/chunks/standalone-pCrzBiTy.js +0 -773
- package/chunks/standalone-qrZaimgC.js +0 -689
- package/chunks/standalone-yqDJ8h3K.js +0 -1012
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $ as s, A as c, B as l, C as u, D as
|
|
3
|
-
import {
|
|
4
|
-
import { n as
|
|
5
|
-
import {
|
|
6
|
-
import { n as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { z as
|
|
10
|
-
var
|
|
1
|
+
import { $c as e, Jl as t, To as n, al as r, d as i, po as a, rl as o } from "./visualization-filters-B9qik5_K.js";
|
|
2
|
+
import { $ as s, A as c, B as l, C as u, D as ee, F as d, G as te, H as f, I as p, J as ne, K as re, L as ie, M as m, P as ae, Q as oe, R as se, S as ce, T as h, 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, ct as ye, d as g, et as be, f as xe, g as _, h as v, i as Se, it as Ce, j as we, k as Te, lt as Ee, n as De, nt as Oe, o as ke, ot as Ae, q as je, r as Me, rt as Ne, s as Pe, st as Fe, t as y, tt as Ie, u as b, v as x, w as Le, x as Re, y as S, z as ze } from "./shared-DoEN9nNM.js";
|
|
3
|
+
import { Am as Be, Bm as Ve, Dm as He, Fp as C, Gm as Ue, Hm as We, Kp as Ge, Mm as Ke, Rm as qe, Up as Je, Vp as Ye, _m as Xe, bm as Ze, dm as Qe, ih as $e, km as et, mm as tt, p_ as nt, um as rt, xm as it, ym as at, zm as ot, zp as st } from "./handlers-CyYFSfhM.js";
|
|
4
|
+
import { n as ct } from "./label-format-type-C46pzgx7.js";
|
|
5
|
+
import { A as lt, D as ut, E as dt, M as w, N as ft, _ as pt, b as mt, g as ht, h as gt, j as _t, u as vt, w as yt } from "./operations-CgfehCad.js";
|
|
6
|
+
import { n as bt } from "./bar-layout-OFhxn2Go.js";
|
|
7
|
+
import { n as xt, t as St } from "./measure-axis-label-format-COy8U_dd.js";
|
|
8
|
+
import { t as Ct } from "./measure-format-default-B_kuGSzi.js";
|
|
9
|
+
import { z as T } from "zod";
|
|
10
|
+
var E = (e) => [{
|
|
11
11
|
ref: `${e}Latitude`,
|
|
12
12
|
fieldKey: "[Locations].[Latitude]",
|
|
13
13
|
aggregation: "AVG",
|
|
@@ -17,11 +17,11 @@ var D = (e) => [{
|
|
|
17
17
|
fieldKey: "[Locations].[Longitude]",
|
|
18
18
|
aggregation: "AVG",
|
|
19
19
|
role: "secondGeo"
|
|
20
|
-
}],
|
|
20
|
+
}], D = {
|
|
21
21
|
type: "map",
|
|
22
22
|
ref: "basemap",
|
|
23
23
|
presentation: { mapType: "openStreetMap" }
|
|
24
|
-
},
|
|
24
|
+
}, wt = {
|
|
25
25
|
type: "map",
|
|
26
26
|
documentation: {
|
|
27
27
|
title: "Map",
|
|
@@ -54,13 +54,13 @@ var D = (e) => [{
|
|
|
54
54
|
ref: "location",
|
|
55
55
|
fieldKey: "[Locations].[Name]"
|
|
56
56
|
}],
|
|
57
|
-
measures:
|
|
57
|
+
measures: E("location")
|
|
58
58
|
},
|
|
59
59
|
presentation: {
|
|
60
60
|
color: "#2563EB",
|
|
61
61
|
sizing: { size: 12 }
|
|
62
62
|
}
|
|
63
|
-
},
|
|
63
|
+
}, D]
|
|
64
64
|
},
|
|
65
65
|
additionalExamples: [
|
|
66
66
|
{
|
|
@@ -77,7 +77,7 @@ var D = (e) => [{
|
|
|
77
77
|
ref: "location",
|
|
78
78
|
fieldKey: "[Locations].[Name]"
|
|
79
79
|
}],
|
|
80
|
-
measures:
|
|
80
|
+
measures: E("density")
|
|
81
81
|
},
|
|
82
82
|
presentation: {
|
|
83
83
|
heat: {
|
|
@@ -89,7 +89,7 @@ var D = (e) => [{
|
|
|
89
89
|
value: 1
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
},
|
|
92
|
+
}, D]
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
{
|
|
@@ -111,7 +111,7 @@ var D = (e) => [{
|
|
|
111
111
|
fieldKey: "[Locations].[Destination]"
|
|
112
112
|
}],
|
|
113
113
|
measures: [
|
|
114
|
-
...
|
|
114
|
+
...E("origin"),
|
|
115
115
|
{
|
|
116
116
|
ref: "destinationLatitude",
|
|
117
117
|
fieldKey: "[Locations].[Destination Latitude]",
|
|
@@ -130,7 +130,7 @@ var D = (e) => [{
|
|
|
130
130
|
useGeodesicLines: !0,
|
|
131
131
|
arrow: { show: !0 }
|
|
132
132
|
}
|
|
133
|
-
},
|
|
133
|
+
}, D]
|
|
134
134
|
}
|
|
135
135
|
},
|
|
136
136
|
{
|
|
@@ -158,7 +158,7 @@ var D = (e) => [{
|
|
|
158
158
|
opacity: 60,
|
|
159
159
|
strokeEnabled: !0
|
|
160
160
|
}
|
|
161
|
-
},
|
|
161
|
+
}, D]
|
|
162
162
|
}
|
|
163
163
|
},
|
|
164
164
|
{
|
|
@@ -177,7 +177,7 @@ var D = (e) => [{
|
|
|
177
177
|
bottomRightLongitude: 21
|
|
178
178
|
},
|
|
179
179
|
opacity: 60
|
|
180
|
-
},
|
|
180
|
+
}, D],
|
|
181
181
|
view: {
|
|
182
182
|
latitude: 51.5,
|
|
183
183
|
longitude: 20.5,
|
|
@@ -195,25 +195,25 @@ var D = (e) => [{
|
|
|
195
195
|
"data-labels",
|
|
196
196
|
"object-settings"
|
|
197
197
|
]
|
|
198
|
-
},
|
|
198
|
+
}, Tt = (e, ...t) => e, O = {
|
|
199
199
|
horsepower: "[Cars].[Horsepower]",
|
|
200
200
|
latestLaunch: "[Cars].[Latest Launch]",
|
|
201
201
|
manufacturer: "[Cars].[Manufacturer]",
|
|
202
202
|
model: "[Cars].[Model]",
|
|
203
203
|
sales: "[Cars].[Sales In Thousands]"
|
|
204
|
-
},
|
|
204
|
+
}, k = (e, t) => ({
|
|
205
205
|
fieldKey: t,
|
|
206
206
|
ref: e
|
|
207
|
-
}),
|
|
207
|
+
}), A = (e, t) => ({
|
|
208
208
|
fieldKey: t,
|
|
209
209
|
ref: e
|
|
210
|
-
}),
|
|
210
|
+
}), j = (e, t = O.sales, n = "SUM") => ({
|
|
211
211
|
aggregation: n,
|
|
212
212
|
fieldKey: t,
|
|
213
213
|
ref: e
|
|
214
|
-
}),
|
|
214
|
+
}), M = {
|
|
215
215
|
filters: [{
|
|
216
|
-
fieldKey:
|
|
216
|
+
fieldKey: O.manufacturer,
|
|
217
217
|
operator: "inList",
|
|
218
218
|
values: [
|
|
219
219
|
"Acura",
|
|
@@ -222,18 +222,18 @@ var D = (e) => [{
|
|
|
222
222
|
]
|
|
223
223
|
}],
|
|
224
224
|
operator: "and"
|
|
225
|
-
},
|
|
226
|
-
fieldKey:
|
|
225
|
+
}, Et = {
|
|
226
|
+
fieldKey: O.latestLaunch,
|
|
227
227
|
ref: "launchMonth",
|
|
228
228
|
temporalGrouping: {
|
|
229
229
|
dateLevel: "month",
|
|
230
230
|
mode: "level"
|
|
231
231
|
}
|
|
232
|
-
},
|
|
232
|
+
}, N = {
|
|
233
233
|
position: "right",
|
|
234
234
|
title: "Cars comparison",
|
|
235
235
|
visible: !0
|
|
236
|
-
},
|
|
236
|
+
}, P = {
|
|
237
237
|
dimension: {
|
|
238
238
|
labelsVisible: !0,
|
|
239
239
|
title: "Manufacturer",
|
|
@@ -249,7 +249,7 @@ var D = (e) => [{
|
|
|
249
249
|
title: "Horsepower",
|
|
250
250
|
titleVisible: !0
|
|
251
251
|
}
|
|
252
|
-
},
|
|
252
|
+
}, Dt = {
|
|
253
253
|
dimension: {
|
|
254
254
|
labelsVisible: !0,
|
|
255
255
|
title: "Manufacturer",
|
|
@@ -265,7 +265,7 @@ var D = (e) => [{
|
|
|
265
265
|
title: "Model",
|
|
266
266
|
titleVisible: !0
|
|
267
267
|
}
|
|
268
|
-
},
|
|
268
|
+
}, Ot = {
|
|
269
269
|
dimension: {
|
|
270
270
|
labelsVisible: !0,
|
|
271
271
|
title: "Manufacturer",
|
|
@@ -276,7 +276,7 @@ var D = (e) => [{
|
|
|
276
276
|
title: "Sales",
|
|
277
277
|
titleVisible: !0
|
|
278
278
|
}
|
|
279
|
-
},
|
|
279
|
+
}, kt = {
|
|
280
280
|
dimension: {
|
|
281
281
|
labelsVisible: !0,
|
|
282
282
|
title: "Horsepower",
|
|
@@ -287,7 +287,7 @@ var D = (e) => [{
|
|
|
287
287
|
title: "Count",
|
|
288
288
|
titleVisible: !0
|
|
289
289
|
}
|
|
290
|
-
},
|
|
290
|
+
}, At = {
|
|
291
291
|
primaryMeasure: {
|
|
292
292
|
labelsVisible: !0,
|
|
293
293
|
title: "Sales",
|
|
@@ -298,7 +298,7 @@ var D = (e) => [{
|
|
|
298
298
|
title: "Horsepower",
|
|
299
299
|
titleVisible: !0
|
|
300
300
|
}
|
|
301
|
-
},
|
|
301
|
+
}, jt = {
|
|
302
302
|
dimension: {
|
|
303
303
|
labelsVisible: !0,
|
|
304
304
|
title: "Measure",
|
|
@@ -309,19 +309,19 @@ var D = (e) => [{
|
|
|
309
309
|
title: "Value",
|
|
310
310
|
titleVisible: !0
|
|
311
311
|
}
|
|
312
|
-
},
|
|
312
|
+
}, 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.", Mt = (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 = `${Mt("a measure axis")} Set inverted on a measure axis to reverse its values, for example to put rank 1 at the top.`, L = `${Mt("the primary measure axis")} Set inverted on the primary measure axis to reverse its values.`, R = [
|
|
313
313
|
"dimensions",
|
|
314
314
|
"filters",
|
|
315
315
|
"measures",
|
|
316
316
|
"value-formatting"
|
|
317
|
-
],
|
|
318
|
-
|
|
317
|
+
], Nt = Tt([
|
|
318
|
+
wt,
|
|
319
319
|
{
|
|
320
320
|
additionalExamples: [{
|
|
321
321
|
definition: {
|
|
322
322
|
data: {
|
|
323
|
-
dimensions: [
|
|
324
|
-
measures: [
|
|
323
|
+
dimensions: [k("manufacturer", O.manufacturer)],
|
|
324
|
+
measures: [j("sales")]
|
|
325
325
|
},
|
|
326
326
|
presentation: { coloring: {
|
|
327
327
|
overwrites: [{
|
|
@@ -349,8 +349,8 @@ var D = (e) => [{
|
|
|
349
349
|
"Sorting and Top N refer to definition-local refs, not generated data-item IDs.",
|
|
350
350
|
"Every dimension and measure must resolve to an available field with a compatible role.",
|
|
351
351
|
"Set axis per measure to plot it against the primary or the secondary measure axis.",
|
|
352
|
+
F,
|
|
352
353
|
I,
|
|
353
|
-
L,
|
|
354
354
|
"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.",
|
|
355
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.",
|
|
356
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."
|
|
@@ -362,18 +362,18 @@ var D = (e) => [{
|
|
|
362
362
|
example: {
|
|
363
363
|
data: {
|
|
364
364
|
dimensions: [{
|
|
365
|
-
...
|
|
365
|
+
...k("manufacturer", O.manufacturer),
|
|
366
366
|
showNullValues: !1
|
|
367
367
|
}],
|
|
368
368
|
measures: [{
|
|
369
|
-
...
|
|
369
|
+
...j("sales"),
|
|
370
370
|
dataLabels: {
|
|
371
371
|
placements: ["outside", "inside"],
|
|
372
372
|
visible: !0
|
|
373
373
|
}
|
|
374
374
|
}]
|
|
375
375
|
},
|
|
376
|
-
filterGroup:
|
|
376
|
+
filterGroup: M,
|
|
377
377
|
limiting: {
|
|
378
378
|
queryLimit: 100,
|
|
379
379
|
topN: {
|
|
@@ -385,9 +385,9 @@ var D = (e) => [{
|
|
|
385
385
|
},
|
|
386
386
|
presentation: {
|
|
387
387
|
axes: {
|
|
388
|
-
...
|
|
388
|
+
...P,
|
|
389
389
|
primaryMeasure: {
|
|
390
|
-
...
|
|
390
|
+
...P.primaryMeasure,
|
|
391
391
|
bands: [{
|
|
392
392
|
color: "#E6E6E6",
|
|
393
393
|
end: 15e4,
|
|
@@ -396,7 +396,7 @@ var D = (e) => [{
|
|
|
396
396
|
}]
|
|
397
397
|
}
|
|
398
398
|
},
|
|
399
|
-
legend:
|
|
399
|
+
legend: N,
|
|
400
400
|
orientation: "vertical"
|
|
401
401
|
},
|
|
402
402
|
sorting: [{
|
|
@@ -434,8 +434,8 @@ var D = (e) => [{
|
|
|
434
434
|
"Data labels apply only to bar series.",
|
|
435
435
|
"Sorting refers to definition-local refs, not generated data-item IDs.",
|
|
436
436
|
"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.",
|
|
437
|
+
F,
|
|
437
438
|
I,
|
|
438
|
-
L,
|
|
439
439
|
"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."
|
|
440
440
|
],
|
|
441
441
|
dataRequirements: ["Exactly one dimension.", "Between one and ten measures."],
|
|
@@ -444,23 +444,23 @@ var D = (e) => [{
|
|
|
444
444
|
},
|
|
445
445
|
example: {
|
|
446
446
|
data: {
|
|
447
|
-
dimensions: [
|
|
447
|
+
dimensions: [k("manufacturer", O.manufacturer)],
|
|
448
448
|
measures: [{
|
|
449
|
-
...
|
|
449
|
+
...j("sales"),
|
|
450
450
|
dataLabels: { visible: !0 },
|
|
451
451
|
seriesType: "bar"
|
|
452
452
|
}, {
|
|
453
|
-
...
|
|
453
|
+
...j("horsepower", O.horsepower, "AVG"),
|
|
454
454
|
axis: "secondary",
|
|
455
455
|
seriesType: "line"
|
|
456
456
|
}]
|
|
457
457
|
},
|
|
458
|
-
filterGroup:
|
|
458
|
+
filterGroup: M,
|
|
459
459
|
limiting: { queryLimit: 100 },
|
|
460
460
|
presentation: {
|
|
461
|
-
axes:
|
|
461
|
+
axes: Ot,
|
|
462
462
|
dataLabels: { visible: !0 },
|
|
463
|
-
legend:
|
|
463
|
+
legend: N,
|
|
464
464
|
orientation: "vertical"
|
|
465
465
|
},
|
|
466
466
|
sorting: [{
|
|
@@ -495,13 +495,13 @@ var D = (e) => [{
|
|
|
495
495
|
},
|
|
496
496
|
example: {
|
|
497
497
|
data: {
|
|
498
|
-
dimensions: [
|
|
499
|
-
measures: [
|
|
498
|
+
dimensions: [k("manufacturer", O.manufacturer)],
|
|
499
|
+
measures: [j("sales"), j("averageSales", O.sales, "AVG")]
|
|
500
500
|
},
|
|
501
|
-
filterGroup:
|
|
501
|
+
filterGroup: M,
|
|
502
502
|
presentation: {
|
|
503
503
|
displayMode: "bar",
|
|
504
|
-
legend:
|
|
504
|
+
legend: N
|
|
505
505
|
},
|
|
506
506
|
type: "distribution-gauge",
|
|
507
507
|
version: 1
|
|
@@ -516,20 +516,20 @@ var D = (e) => [{
|
|
|
516
516
|
},
|
|
517
517
|
{
|
|
518
518
|
documentation: {
|
|
519
|
-
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.", L],
|
|
520
520
|
dataRequirements: ["Exactly two dimensions.", "Exactly one measure."],
|
|
521
521
|
summary: "Dot comparison using two categorical dimensions and one measure.",
|
|
522
522
|
title: "Dot chart"
|
|
523
523
|
},
|
|
524
524
|
example: {
|
|
525
525
|
data: {
|
|
526
|
-
dimensions: [
|
|
527
|
-
measures: [
|
|
526
|
+
dimensions: [k("manufacturer", O.manufacturer), k("model", O.model)],
|
|
527
|
+
measures: [j("sales")]
|
|
528
528
|
},
|
|
529
|
-
filterGroup:
|
|
529
|
+
filterGroup: M,
|
|
530
530
|
presentation: {
|
|
531
|
-
axes:
|
|
532
|
-
legend:
|
|
531
|
+
axes: Ot,
|
|
532
|
+
legend: N,
|
|
533
533
|
orientation: "horizontal"
|
|
534
534
|
},
|
|
535
535
|
type: "dot",
|
|
@@ -558,13 +558,13 @@ var D = (e) => [{
|
|
|
558
558
|
},
|
|
559
559
|
example: {
|
|
560
560
|
data: {
|
|
561
|
-
dimensions: [
|
|
562
|
-
measures: [
|
|
561
|
+
dimensions: [k("manufacturer", O.manufacturer)],
|
|
562
|
+
measures: [j("sales"), j("targetSales", O.sales, "AVG")]
|
|
563
563
|
},
|
|
564
|
-
filterGroup:
|
|
564
|
+
filterGroup: M,
|
|
565
565
|
presentation: {
|
|
566
566
|
displayMode: "radial",
|
|
567
|
-
legend:
|
|
567
|
+
legend: N
|
|
568
568
|
},
|
|
569
569
|
type: "gauge",
|
|
570
570
|
version: 1
|
|
@@ -586,14 +586,14 @@ var D = (e) => [{
|
|
|
586
586
|
},
|
|
587
587
|
example: {
|
|
588
588
|
data: {
|
|
589
|
-
dimensions: [
|
|
590
|
-
measures: [
|
|
589
|
+
dimensions: [k("manufacturer", O.manufacturer), k("model", O.model)],
|
|
590
|
+
measures: [j("sales"), j("horsepower", O.horsepower, "AVG")]
|
|
591
591
|
},
|
|
592
|
-
filterGroup:
|
|
592
|
+
filterGroup: M,
|
|
593
593
|
limiting: { queryLimit: 100 },
|
|
594
594
|
presentation: {
|
|
595
|
-
axes:
|
|
596
|
-
legend:
|
|
595
|
+
axes: Dt,
|
|
596
|
+
legend: N
|
|
597
597
|
},
|
|
598
598
|
sorting: [{
|
|
599
599
|
by: "sales",
|
|
@@ -616,19 +616,19 @@ var D = (e) => [{
|
|
|
616
616
|
documentation: {
|
|
617
617
|
constraints: [
|
|
618
618
|
"The compiler creates the canonical generated count measure; callers do not provide measures.",
|
|
619
|
-
|
|
620
|
-
|
|
619
|
+
F,
|
|
620
|
+
L
|
|
621
621
|
],
|
|
622
622
|
dataRequirements: ["Exactly one numeric dimension.", "No caller-supplied measures."],
|
|
623
623
|
summary: "Distribution of a numeric field into generated bins and counts.",
|
|
624
624
|
title: "Histogram"
|
|
625
625
|
},
|
|
626
626
|
example: {
|
|
627
|
-
data: { dimensions: [
|
|
628
|
-
filterGroup:
|
|
627
|
+
data: { dimensions: [k("horsepower", O.horsepower)] },
|
|
628
|
+
filterGroup: M,
|
|
629
629
|
presentation: {
|
|
630
|
-
axes:
|
|
631
|
-
legend:
|
|
630
|
+
axes: kt,
|
|
631
|
+
legend: N,
|
|
632
632
|
orientation: "vertical"
|
|
633
633
|
},
|
|
634
634
|
type: "histogram",
|
|
@@ -650,9 +650,9 @@ var D = (e) => [{
|
|
|
650
650
|
additionalExamples: [{
|
|
651
651
|
definition: {
|
|
652
652
|
data: {
|
|
653
|
-
dimensions: [
|
|
653
|
+
dimensions: [k("manufacturer", O.manufacturer)],
|
|
654
654
|
measures: [{
|
|
655
|
-
...
|
|
655
|
+
...j("sales"),
|
|
656
656
|
dataPointShape: "circle"
|
|
657
657
|
}]
|
|
658
658
|
},
|
|
@@ -671,9 +671,9 @@ var D = (e) => [{
|
|
|
671
671
|
}, {
|
|
672
672
|
definition: {
|
|
673
673
|
data: {
|
|
674
|
-
dimensions: [
|
|
674
|
+
dimensions: [k("manufacturer", O.manufacturer), k("model", O.model)],
|
|
675
675
|
measures: [{
|
|
676
|
-
...
|
|
676
|
+
...j("sales"),
|
|
677
677
|
dataPointShape: "circle"
|
|
678
678
|
}]
|
|
679
679
|
},
|
|
@@ -690,9 +690,10 @@ var D = (e) => [{
|
|
|
690
690
|
documentation: {
|
|
691
691
|
constraints: [
|
|
692
692
|
"Each measure may select the primary or secondary axis using its axis property.",
|
|
693
|
+
"Clicking a point, the line near a point or an axis label selects its axis value. Set presentation.selectOnClick to false to turn this off; when it is omitted, a selectOnClick already set on the base vSpec is kept.",
|
|
693
694
|
"Data labels are off unless presentation.dataLabels.visible is true. Visible labels require dataPointShape on every measure.",
|
|
695
|
+
F,
|
|
694
696
|
I,
|
|
695
|
-
L,
|
|
696
697
|
"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.",
|
|
697
698
|
"Value colors in presentation.coloring require at least two dimensions; measure color rules are not supported.",
|
|
698
699
|
"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."
|
|
@@ -703,28 +704,28 @@ var D = (e) => [{
|
|
|
703
704
|
},
|
|
704
705
|
example: {
|
|
705
706
|
data: {
|
|
706
|
-
dimensions: [
|
|
707
|
+
dimensions: [Et],
|
|
707
708
|
measures: [{
|
|
708
|
-
...
|
|
709
|
+
...j("sales"),
|
|
709
710
|
axis: "primary",
|
|
710
711
|
dataPointShape: "circle"
|
|
711
712
|
}, {
|
|
712
|
-
...
|
|
713
|
+
...j("horsepower", O.horsepower, "AVG"),
|
|
713
714
|
axis: "secondary",
|
|
714
715
|
dataPointShape: "square"
|
|
715
716
|
}]
|
|
716
717
|
},
|
|
717
|
-
filterGroup:
|
|
718
|
+
filterGroup: M,
|
|
718
719
|
limiting: { queryLimit: 100 },
|
|
719
720
|
presentation: {
|
|
720
721
|
axes: {
|
|
721
|
-
...
|
|
722
|
+
...P,
|
|
722
723
|
dimension: {
|
|
723
|
-
...
|
|
724
|
+
...P.dimension,
|
|
724
725
|
title: "Launch month"
|
|
725
726
|
}
|
|
726
727
|
},
|
|
727
|
-
legend:
|
|
728
|
+
legend: N,
|
|
728
729
|
orientation: "vertical"
|
|
729
730
|
},
|
|
730
731
|
sorting: [{
|
|
@@ -767,11 +768,11 @@ var D = (e) => [{
|
|
|
767
768
|
},
|
|
768
769
|
example: {
|
|
769
770
|
data: {
|
|
770
|
-
dimensions: [
|
|
771
|
-
measures: [
|
|
771
|
+
dimensions: [k("manufacturer", O.manufacturer)],
|
|
772
|
+
measures: [j("sales")]
|
|
772
773
|
},
|
|
773
|
-
filterGroup:
|
|
774
|
-
presentation: { legend:
|
|
774
|
+
filterGroup: M,
|
|
775
|
+
presentation: { legend: N },
|
|
775
776
|
type: "radar",
|
|
776
777
|
version: 1
|
|
777
778
|
},
|
|
@@ -786,8 +787,8 @@ var D = (e) => [{
|
|
|
786
787
|
additionalExamples: [{
|
|
787
788
|
definition: {
|
|
788
789
|
data: {
|
|
789
|
-
dimensions: [
|
|
790
|
-
measures: [
|
|
790
|
+
dimensions: [k("manufacturer", O.manufacturer)],
|
|
791
|
+
measures: [j("sales")]
|
|
791
792
|
},
|
|
792
793
|
presentation: { coloring: { overwrites: [
|
|
793
794
|
{
|
|
@@ -816,12 +817,12 @@ var D = (e) => [{
|
|
|
816
817
|
},
|
|
817
818
|
example: {
|
|
818
819
|
data: {
|
|
819
|
-
dimensions: [
|
|
820
|
-
measures: [
|
|
820
|
+
dimensions: [k("manufacturer", O.manufacturer)],
|
|
821
|
+
measures: [j("sales")]
|
|
821
822
|
},
|
|
822
|
-
filterGroup:
|
|
823
|
+
filterGroup: M,
|
|
823
824
|
limiting: { queryLimit: 100 },
|
|
824
|
-
presentation: { legend:
|
|
825
|
+
presentation: { legend: N },
|
|
825
826
|
sorting: [{
|
|
826
827
|
by: "sales",
|
|
827
828
|
direction: "desc"
|
|
@@ -847,10 +848,10 @@ var D = (e) => [{
|
|
|
847
848
|
},
|
|
848
849
|
example: {
|
|
849
850
|
data: {
|
|
850
|
-
dimensions: [
|
|
851
|
-
measures: [
|
|
851
|
+
dimensions: [k("manufacturer", O.manufacturer), k("model", O.model)],
|
|
852
|
+
measures: [j("sales")]
|
|
852
853
|
},
|
|
853
|
-
filterGroup:
|
|
854
|
+
filterGroup: M,
|
|
854
855
|
limiting: { queryLimit: 100 },
|
|
855
856
|
presentation: { layout: {
|
|
856
857
|
compact: !0,
|
|
@@ -882,11 +883,11 @@ var D = (e) => [{
|
|
|
882
883
|
},
|
|
883
884
|
example: {
|
|
884
885
|
data: {
|
|
885
|
-
dimensions: [
|
|
886
|
-
measures: [
|
|
886
|
+
dimensions: [k("manufacturer", O.manufacturer), k("model", O.model)],
|
|
887
|
+
measures: [j("sales")]
|
|
887
888
|
},
|
|
888
|
-
filterGroup:
|
|
889
|
-
presentation: { legend:
|
|
889
|
+
filterGroup: M,
|
|
890
|
+
presentation: { legend: N },
|
|
890
891
|
type: "treemap",
|
|
891
892
|
version: 1
|
|
892
893
|
},
|
|
@@ -901,8 +902,8 @@ var D = (e) => [{
|
|
|
901
902
|
additionalExamples: [{
|
|
902
903
|
definition: {
|
|
903
904
|
data: {
|
|
904
|
-
dimensions: [
|
|
905
|
-
measures: [
|
|
905
|
+
dimensions: [k("manufacturer", O.manufacturer), k("model", O.model)],
|
|
906
|
+
measures: [j("sales")]
|
|
906
907
|
},
|
|
907
908
|
presentation: { coloring: { overwrites: [{
|
|
908
909
|
color: "#CA8A04",
|
|
@@ -922,10 +923,10 @@ var D = (e) => [{
|
|
|
922
923
|
},
|
|
923
924
|
example: {
|
|
924
925
|
data: {
|
|
925
|
-
dimensions: [
|
|
926
|
-
measures: [
|
|
926
|
+
dimensions: [k("manufacturer", O.manufacturer), k("model", O.model)],
|
|
927
|
+
measures: [j("sales")]
|
|
927
928
|
},
|
|
928
|
-
filterGroup:
|
|
929
|
+
filterGroup: M,
|
|
929
930
|
type: "sankey",
|
|
930
931
|
version: 1
|
|
931
932
|
},
|
|
@@ -939,7 +940,7 @@ var D = (e) => [{
|
|
|
939
940
|
"The optional second dimension receives the image role.",
|
|
940
941
|
"Roles come from item order only; a ref is a label and does not select a role.",
|
|
941
942
|
"With a size measure, points scale between the setPointSize and setMaxPointSize operation values.",
|
|
942
|
-
|
|
943
|
+
I
|
|
943
944
|
],
|
|
944
945
|
dataRequirements: ["One or two dimensions.", "Two or three measures."],
|
|
945
946
|
summary: "Relationship chart using horizontal and vertical measures with optional size and image roles.",
|
|
@@ -947,17 +948,17 @@ var D = (e) => [{
|
|
|
947
948
|
},
|
|
948
949
|
example: {
|
|
949
950
|
data: {
|
|
950
|
-
dimensions: [
|
|
951
|
+
dimensions: [k("manufacturer", O.manufacturer)],
|
|
951
952
|
measures: [
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
953
|
+
j("sales"),
|
|
954
|
+
j("horsepower", O.horsepower, "AVG"),
|
|
955
|
+
j("size", O.sales, "AVG")
|
|
955
956
|
]
|
|
956
957
|
},
|
|
957
|
-
filterGroup:
|
|
958
|
+
filterGroup: M,
|
|
958
959
|
presentation: {
|
|
959
|
-
axes:
|
|
960
|
-
legend:
|
|
960
|
+
axes: At,
|
|
961
|
+
legend: N
|
|
961
962
|
},
|
|
962
963
|
type: "scatter",
|
|
963
964
|
version: 1
|
|
@@ -977,11 +978,11 @@ var D = (e) => [{
|
|
|
977
978
|
additionalExamples: [{
|
|
978
979
|
definition: {
|
|
979
980
|
data: {
|
|
980
|
-
dimensions: [
|
|
981
|
-
measures: [
|
|
981
|
+
dimensions: [k("manufacturer", O.manufacturer), k("model", O.model)],
|
|
982
|
+
measures: [j("sales")],
|
|
982
983
|
structure: "expandable"
|
|
983
984
|
},
|
|
984
|
-
filterGroup:
|
|
985
|
+
filterGroup: M,
|
|
985
986
|
limiting: { queryLimit: 100 },
|
|
986
987
|
sorting: [{
|
|
987
988
|
by: "sales",
|
|
@@ -994,12 +995,12 @@ var D = (e) => [{
|
|
|
994
995
|
}, {
|
|
995
996
|
definition: {
|
|
996
997
|
data: {
|
|
997
|
-
columnDimensions: [
|
|
998
|
-
measures: [
|
|
999
|
-
rowDimensions: [
|
|
998
|
+
columnDimensions: [k("model", O.model)],
|
|
999
|
+
measures: [j("sales")],
|
|
1000
|
+
rowDimensions: [k("manufacturer", O.manufacturer)],
|
|
1000
1001
|
structure: "pivot"
|
|
1001
1002
|
},
|
|
1002
|
-
filterGroup:
|
|
1003
|
+
filterGroup: M,
|
|
1003
1004
|
limiting: { queryLimit: 100 },
|
|
1004
1005
|
sorting: [{
|
|
1005
1006
|
by: "sales",
|
|
@@ -1031,27 +1032,27 @@ var D = (e) => [{
|
|
|
1031
1032
|
data: {
|
|
1032
1033
|
columns: [
|
|
1033
1034
|
{
|
|
1034
|
-
...
|
|
1035
|
+
...k("manufacturer", O.manufacturer),
|
|
1035
1036
|
role: "dimension"
|
|
1036
1037
|
},
|
|
1037
1038
|
{
|
|
1038
|
-
...
|
|
1039
|
+
...k("model", O.model),
|
|
1039
1040
|
role: "dimension"
|
|
1040
1041
|
},
|
|
1041
1042
|
{
|
|
1042
|
-
...
|
|
1043
|
+
...k("latestLaunch", O.latestLaunch),
|
|
1043
1044
|
format: { formatType: "ddmmmyyyy" },
|
|
1044
1045
|
role: "dimension"
|
|
1045
1046
|
},
|
|
1046
1047
|
{
|
|
1047
|
-
...
|
|
1048
|
+
...j("sales"),
|
|
1048
1049
|
format: { formatType: "numberNoDecimal" },
|
|
1049
1050
|
role: "measure"
|
|
1050
1051
|
}
|
|
1051
1052
|
],
|
|
1052
1053
|
structure: "normal"
|
|
1053
1054
|
},
|
|
1054
|
-
filterGroup:
|
|
1055
|
+
filterGroup: M,
|
|
1055
1056
|
limiting: { queryLimit: 100 },
|
|
1056
1057
|
presentation: {
|
|
1057
1058
|
background: {
|
|
@@ -1127,8 +1128,8 @@ var D = (e) => [{
|
|
|
1127
1128
|
constraints: [
|
|
1128
1129
|
"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
1130
|
"Comparison totals sum the returned rows, rather than requesting a separate aggregate total. Use two numeric measures with comparable units.",
|
|
1130
|
-
|
|
1131
|
-
|
|
1131
|
+
L,
|
|
1132
|
+
F
|
|
1132
1133
|
],
|
|
1133
1134
|
dataRequirements: ["No dimensions and between one and one hundred measures, or exactly one dimension and exactly two measures."],
|
|
1134
1135
|
summary: "Sequential contribution chart, or a comparison of two measures across one dimension.",
|
|
@@ -1137,8 +1138,8 @@ var D = (e) => [{
|
|
|
1137
1138
|
additionalExamples: [{
|
|
1138
1139
|
definition: {
|
|
1139
1140
|
data: {
|
|
1140
|
-
dimensions: [
|
|
1141
|
-
measures: [
|
|
1141
|
+
dimensions: [k("manufacturer", O.manufacturer)],
|
|
1142
|
+
measures: [j("totalSales"), j("averageSales", O.sales, "AVG")]
|
|
1142
1143
|
},
|
|
1143
1144
|
presentation: {
|
|
1144
1145
|
axes: {
|
|
@@ -1160,15 +1161,15 @@ var D = (e) => [{
|
|
|
1160
1161
|
}],
|
|
1161
1162
|
example: {
|
|
1162
1163
|
data: { measures: [{
|
|
1163
|
-
...
|
|
1164
|
+
...j("sales"),
|
|
1164
1165
|
dataLabels: { visible: !0 }
|
|
1165
1166
|
}, {
|
|
1166
|
-
...
|
|
1167
|
+
...j("horsepower", O.horsepower, "AVG"),
|
|
1167
1168
|
dataLabels: { visible: !0 }
|
|
1168
1169
|
}] },
|
|
1169
|
-
filterGroup:
|
|
1170
|
+
filterGroup: M,
|
|
1170
1171
|
presentation: {
|
|
1171
|
-
axes:
|
|
1172
|
+
axes: jt,
|
|
1172
1173
|
dataLabels: { visible: !0 },
|
|
1173
1174
|
orientation: "vertical"
|
|
1174
1175
|
},
|
|
@@ -1197,10 +1198,10 @@ var D = (e) => [{
|
|
|
1197
1198
|
},
|
|
1198
1199
|
example: {
|
|
1199
1200
|
data: {
|
|
1200
|
-
dimensions: [
|
|
1201
|
-
measures: [
|
|
1201
|
+
dimensions: [k("manufacturer", O.manufacturer)],
|
|
1202
|
+
measures: [j("sales")]
|
|
1202
1203
|
},
|
|
1203
|
-
filterGroup:
|
|
1204
|
+
filterGroup: M,
|
|
1204
1205
|
type: "word-cloud",
|
|
1205
1206
|
version: 1
|
|
1206
1207
|
},
|
|
@@ -1215,7 +1216,7 @@ var D = (e) => [{
|
|
|
1215
1216
|
title: "Date picker"
|
|
1216
1217
|
},
|
|
1217
1218
|
example: {
|
|
1218
|
-
data: { field:
|
|
1219
|
+
data: { field: A("latestLaunch", O.latestLaunch) },
|
|
1219
1220
|
settings: {
|
|
1220
1221
|
endDateLabel: "To",
|
|
1221
1222
|
pickerState: "expanded",
|
|
@@ -1239,7 +1240,7 @@ var D = (e) => [{
|
|
|
1239
1240
|
title: "Filter"
|
|
1240
1241
|
},
|
|
1241
1242
|
example: {
|
|
1242
|
-
data: { field:
|
|
1243
|
+
data: { field: A("manufacturer", O.manufacturer) },
|
|
1243
1244
|
presentation: {
|
|
1244
1245
|
mode: "listbox",
|
|
1245
1246
|
quickSelect: !0,
|
|
@@ -1295,14 +1296,14 @@ var D = (e) => [{
|
|
|
1295
1296
|
{
|
|
1296
1297
|
additionalExamples: [{
|
|
1297
1298
|
definition: {
|
|
1298
|
-
data: { measure:
|
|
1299
|
+
data: { measure: j("sales") },
|
|
1299
1300
|
filterGroup: {
|
|
1300
1301
|
filters: [{
|
|
1301
|
-
fieldKey:
|
|
1302
|
+
fieldKey: O.model,
|
|
1302
1303
|
operator: "contains",
|
|
1303
1304
|
value: "Sport"
|
|
1304
1305
|
}, {
|
|
1305
|
-
fieldKey:
|
|
1306
|
+
fieldKey: O.horsepower,
|
|
1306
1307
|
operator: "greaterThanOrEqualTo",
|
|
1307
1308
|
value: "200"
|
|
1308
1309
|
}],
|
|
@@ -1324,8 +1325,8 @@ var D = (e) => [{
|
|
|
1324
1325
|
title: "Number"
|
|
1325
1326
|
},
|
|
1326
1327
|
example: {
|
|
1327
|
-
data: { measure:
|
|
1328
|
-
filterGroup:
|
|
1328
|
+
data: { measure: j("sales") },
|
|
1329
|
+
filterGroup: M,
|
|
1329
1330
|
type: "number",
|
|
1330
1331
|
version: 1
|
|
1331
1332
|
},
|
|
@@ -1448,7 +1449,7 @@ var D = (e) => [{
|
|
|
1448
1449
|
title: "Slider"
|
|
1449
1450
|
},
|
|
1450
1451
|
example: {
|
|
1451
|
-
data: { field:
|
|
1452
|
+
data: { field: A("horsepower", O.horsepower) },
|
|
1452
1453
|
settings: {
|
|
1453
1454
|
layout: "multi",
|
|
1454
1455
|
quickSelect: !0,
|
|
@@ -1465,43 +1466,43 @@ var D = (e) => [{
|
|
|
1465
1466
|
type: "slider"
|
|
1466
1467
|
}
|
|
1467
1468
|
]), z = (e) => {
|
|
1468
|
-
let t =
|
|
1469
|
+
let t = Nt.find((t) => t.type === e);
|
|
1469
1470
|
if (!t) throw Error(`Missing visualization definition documentation for ${e}`);
|
|
1470
1471
|
return t;
|
|
1471
|
-
}, B = (e, t) =>
|
|
1472
|
+
}, B = (e, t) => T.toJSONSchema(e.meta({ title: t }), {
|
|
1472
1473
|
reused: "inline",
|
|
1473
1474
|
target: "draft-2020-12"
|
|
1474
1475
|
}), V = {
|
|
1475
|
-
"astrato-app-filter-bar":
|
|
1476
|
-
bar:
|
|
1477
|
-
combo:
|
|
1478
|
-
dot:
|
|
1479
|
-
scatter:
|
|
1480
|
-
histogram:
|
|
1481
|
-
heatMap:
|
|
1482
|
-
radar:
|
|
1483
|
-
gauge:
|
|
1484
|
-
"distribution-gauge":
|
|
1476
|
+
"astrato-app-filter-bar": Ee,
|
|
1477
|
+
bar: Fe,
|
|
1478
|
+
combo: je,
|
|
1479
|
+
dot: pe,
|
|
1480
|
+
scatter: Oe,
|
|
1481
|
+
histogram: oe,
|
|
1482
|
+
heatMap: me,
|
|
1483
|
+
radar: be,
|
|
1484
|
+
gauge: fe,
|
|
1485
|
+
"distribution-gauge": ne,
|
|
1485
1486
|
pie: s,
|
|
1486
|
-
tree:
|
|
1487
|
-
treemap:
|
|
1488
|
-
sankey:
|
|
1489
|
-
waterfall:
|
|
1490
|
-
"word-cloud":
|
|
1491
|
-
"date-picker":
|
|
1492
|
-
iframe:
|
|
1493
|
-
image:
|
|
1487
|
+
tree: Ne,
|
|
1488
|
+
treemap: Ce,
|
|
1489
|
+
sankey: Ie,
|
|
1490
|
+
waterfall: _e,
|
|
1491
|
+
"word-cloud": Ae,
|
|
1492
|
+
"date-picker": ie,
|
|
1493
|
+
iframe: se,
|
|
1494
|
+
image: ze,
|
|
1494
1495
|
shape: l,
|
|
1495
|
-
simpleTextObject:
|
|
1496
|
-
"atomic-input":
|
|
1497
|
-
slider:
|
|
1498
|
-
line:
|
|
1499
|
-
map:
|
|
1500
|
-
table:
|
|
1501
|
-
number:
|
|
1502
|
-
filter:
|
|
1503
|
-
},
|
|
1504
|
-
let t =
|
|
1496
|
+
simpleTextObject: f,
|
|
1497
|
+
"atomic-input": p,
|
|
1498
|
+
slider: ue,
|
|
1499
|
+
line: te,
|
|
1500
|
+
map: de,
|
|
1501
|
+
table: d,
|
|
1502
|
+
number: le,
|
|
1503
|
+
filter: re
|
|
1504
|
+
}, Pt = new Map(Object.entries(V)), Ft = (e, t = 1) => t === 1 ? Pt.get(e) : void 0, It = () => Object.keys(V), Lt = (e) => {
|
|
1505
|
+
let t = C(e);
|
|
1505
1506
|
if (t) return {
|
|
1506
1507
|
code: "invalid_structure",
|
|
1507
1508
|
message: t,
|
|
@@ -1520,22 +1521,22 @@ var D = (e) => [{
|
|
|
1520
1521
|
path: ["version"]
|
|
1521
1522
|
};
|
|
1522
1523
|
let r = "type" in e ? e.type : void 0;
|
|
1523
|
-
if (!(typeof r == "string" &&
|
|
1524
|
-
allowedValues:
|
|
1524
|
+
if (!(typeof r == "string" && Ft(r, n))) return {
|
|
1525
|
+
allowedValues: It(),
|
|
1525
1526
|
code: "unsupported_visualization",
|
|
1526
1527
|
message: `Visualization type "${String(r)}" is not supported.`,
|
|
1527
1528
|
path: ["type"]
|
|
1528
1529
|
};
|
|
1529
|
-
},
|
|
1530
|
-
let t =
|
|
1530
|
+
}, Rt = (e) => {
|
|
1531
|
+
let t = Lt(e);
|
|
1531
1532
|
if (t) return {
|
|
1532
1533
|
issues: [t],
|
|
1533
1534
|
success: !1
|
|
1534
1535
|
};
|
|
1535
|
-
let n =
|
|
1536
|
+
let n = Ft(e.type, e.version);
|
|
1536
1537
|
if (!n) return {
|
|
1537
1538
|
issues: [{
|
|
1538
|
-
allowedValues:
|
|
1539
|
+
allowedValues: It(),
|
|
1539
1540
|
code: "unsupported_visualization",
|
|
1540
1541
|
message: "Visualization definition descriptor is not available.",
|
|
1541
1542
|
path: ["type"]
|
|
@@ -1548,34 +1549,34 @@ var D = (e) => [{
|
|
|
1548
1549
|
issues: [],
|
|
1549
1550
|
success: !0
|
|
1550
1551
|
} : {
|
|
1551
|
-
issues:
|
|
1552
|
+
issues: h(r.error, e),
|
|
1552
1553
|
success: !1
|
|
1553
1554
|
};
|
|
1554
|
-
},
|
|
1555
|
+
}, zt = async (e) => (await import("./app-filter-bar.compiler--T4Qz3Wu.js")).compileAppFilterBarVisualizationDefinition(e), Bt = async (e) => (await import("./bar.compiler-hWZBYYvV.js")).compileBarVisualizationDefinition(e), Vt = async (e) => (await import("./filter.compiler-DOGFweJz.js")).compileFilterVisualizationDefinition(e), Ht = async (e) => (await import("./line.compiler-B-4H55_T.js")).compileLineVisualizationDefinition(e), Ut = async (e) => (await import("./number.compiler-D7nMcEMv.js")).compileNumberVisualizationDefinition(e), Wt = async (e) => (await import("./map.compiler-Cv5V6EhF.js")).compileMapVisualizationDefinition(e), Gt = async (e) => (await import("./table.compiler-mS4UvhLT.js")).compileTableVisualizationDefinition(e), H = t(), Kt = [
|
|
1555
1556
|
H.FieldType.DATE,
|
|
1556
1557
|
H.FieldType.TIMESTAMP,
|
|
1557
1558
|
H.FieldType.TIMESTAMP_TZ
|
|
1558
|
-
],
|
|
1559
|
+
], qt = ["none", "inherit"], Jt = [
|
|
1559
1560
|
"dimensions",
|
|
1560
1561
|
"rowDimensions",
|
|
1561
1562
|
"columnDimensions",
|
|
1562
1563
|
"columns"
|
|
1563
|
-
],
|
|
1564
|
-
if (
|
|
1565
|
-
dataType:
|
|
1564
|
+
], Yt = (e) => {
|
|
1565
|
+
if (e?.kind === "field") return {
|
|
1566
|
+
dataType: e.dataType,
|
|
1566
1567
|
hasOwnFormat: !1,
|
|
1567
1568
|
label: "field"
|
|
1568
1569
|
};
|
|
1569
|
-
if (
|
|
1570
|
-
let [
|
|
1570
|
+
if (e?.kind !== "dimension") return;
|
|
1571
|
+
let [t] = ae([e]);
|
|
1571
1572
|
return {
|
|
1572
|
-
dataType:
|
|
1573
|
-
hasOwnFormat: !!
|
|
1573
|
+
dataType: r(t),
|
|
1574
|
+
hasOwnFormat: !!o(t),
|
|
1574
1575
|
label: "dimension"
|
|
1575
1576
|
};
|
|
1576
|
-
},
|
|
1577
|
+
}, Xt = (e) => {
|
|
1577
1578
|
let t = "data" in e ? e.data : void 0;
|
|
1578
|
-
return
|
|
1579
|
+
return Jt.flatMap((e) => {
|
|
1579
1580
|
let n = t?.[e];
|
|
1580
1581
|
return Array.isArray(n) ? n.flatMap((t, n) => e === "columns" && t.role !== "dimension" ? [] : [{
|
|
1581
1582
|
dimension: t,
|
|
@@ -1586,9 +1587,9 @@ var D = (e) => [{
|
|
|
1586
1587
|
]
|
|
1587
1588
|
}]) : [];
|
|
1588
1589
|
});
|
|
1589
|
-
},
|
|
1590
|
-
let r = e.format?.formatType, i =
|
|
1591
|
-
if (r === void 0 || !
|
|
1590
|
+
}, Zt = (e, t) => Xt(e).flatMap(({ dimension: e, path: n }) => {
|
|
1591
|
+
let r = e.format?.formatType, i = Yt(t.find((t) => t.fieldKey === e.fieldKey));
|
|
1592
|
+
if (r === void 0 || !qt.includes(r) || e.temporalGrouping?.mode === "part" || i?.dataType === void 0 || !Kt.includes(i.dataType) || r === "inherit" && i.hasOwnFormat) return [];
|
|
1592
1593
|
let a = [
|
|
1593
1594
|
...n,
|
|
1594
1595
|
"format",
|
|
@@ -1602,20 +1603,20 @@ var D = (e) => [{
|
|
|
1602
1603
|
received: r,
|
|
1603
1604
|
ref: e.ref
|
|
1604
1605
|
},
|
|
1605
|
-
message: `${
|
|
1606
|
+
message: `${Le(a)}: ${o} such as 1672531200000 instead of dates. ${s}`,
|
|
1606
1607
|
path: a
|
|
1607
1608
|
}];
|
|
1608
|
-
}),
|
|
1609
|
-
if (e.type !== "bar" || !
|
|
1609
|
+
}), Qt = (e) => {
|
|
1610
|
+
if (e.type !== "bar" || !bt(e)) return [];
|
|
1610
1611
|
let t = ["presentation", "layout"];
|
|
1611
1612
|
return [{
|
|
1612
1613
|
code: "inapplicable_layout",
|
|
1613
1614
|
details: { received: e.presentation?.layout },
|
|
1614
|
-
message: `${
|
|
1615
|
+
message: `${Le(t)}: one dimension with one measure draws plain bars, so the layout is ignored. Omit layout, or add a measure or a series dimension.`,
|
|
1615
1616
|
path: t
|
|
1616
1617
|
}];
|
|
1617
|
-
},
|
|
1618
|
-
compile:
|
|
1618
|
+
}, $t = (e, t) => [...Qt(e), ...Zt(e, t)], U = z("bar"), en = {
|
|
1619
|
+
compile: Bt,
|
|
1619
1620
|
documentation: U.documentation,
|
|
1620
1621
|
examples: [U.example, ...(U.additionalExamples ?? []).map(({ definition: e }) => e)],
|
|
1621
1622
|
jsonSchema: B(V.bar, `${U.documentation.title} definition`),
|
|
@@ -1623,8 +1624,8 @@ var D = (e) => [{
|
|
|
1623
1624
|
supportedFeatures: U.supportedFeatures,
|
|
1624
1625
|
type: "bar",
|
|
1625
1626
|
version: 1
|
|
1626
|
-
}, W = z("astrato-app-filter-bar"),
|
|
1627
|
-
compile:
|
|
1627
|
+
}, W = z("astrato-app-filter-bar"), tn = {
|
|
1628
|
+
compile: zt,
|
|
1628
1629
|
documentation: W.documentation,
|
|
1629
1630
|
examples: [W.example],
|
|
1630
1631
|
jsonSchema: B(V["astrato-app-filter-bar"], `${W.documentation.title} definition`),
|
|
@@ -1633,179 +1634,184 @@ var D = (e) => [{
|
|
|
1633
1634
|
type: "astrato-app-filter-bar",
|
|
1634
1635
|
version: 1
|
|
1635
1636
|
};
|
|
1636
|
-
|
|
1637
|
-
var
|
|
1637
|
+
i();
|
|
1638
|
+
var nn = {
|
|
1638
1639
|
combo: {
|
|
1639
|
-
coloringType:
|
|
1640
|
+
coloringType: e.PerEachMeasure,
|
|
1641
|
+
measureAxes: pt.rangeAxes,
|
|
1640
1642
|
queryLimit: !0,
|
|
1641
|
-
schema:
|
|
1643
|
+
schema: je,
|
|
1642
1644
|
sorting: !0,
|
|
1643
1645
|
type: "combo",
|
|
1644
|
-
vSpecSchema:
|
|
1646
|
+
vSpecSchema: Ue
|
|
1645
1647
|
},
|
|
1646
1648
|
"distribution-gauge": {
|
|
1647
|
-
coloringType:
|
|
1648
|
-
measureRole: () =>
|
|
1649
|
-
schema:
|
|
1649
|
+
coloringType: e.PerEachMeasure,
|
|
1650
|
+
measureRole: () => a.GAUGE_VALUE,
|
|
1651
|
+
schema: ne,
|
|
1650
1652
|
type: "distribution-gauge",
|
|
1651
|
-
vSpecSchema:
|
|
1653
|
+
vSpecSchema: ot
|
|
1652
1654
|
},
|
|
1653
1655
|
dot: {
|
|
1654
|
-
coloringType:
|
|
1655
|
-
|
|
1656
|
+
coloringType: e.Categorical,
|
|
1657
|
+
measureAxes: gt.rangeAxes,
|
|
1658
|
+
schema: pe,
|
|
1656
1659
|
type: "dot",
|
|
1657
|
-
vSpecSchema:
|
|
1660
|
+
vSpecSchema: qe
|
|
1658
1661
|
},
|
|
1659
1662
|
gauge: {
|
|
1660
|
-
coloringType: (
|
|
1661
|
-
measureRole: (e, t) => (t.data.dimensions?.length ?? 0) > 0 && e === 1 ?
|
|
1662
|
-
schema:
|
|
1663
|
+
coloringType: (t) => (t.data.dimensions?.length ?? 0) > 0 ? e.Categorical : e.PerEachMeasure,
|
|
1664
|
+
measureRole: (e, t) => (t.data.dimensions?.length ?? 0) > 0 && e === 1 ? a.GAUGE_TARGET : a.GAUGE_VALUE,
|
|
1665
|
+
schema: fe,
|
|
1663
1666
|
type: "gauge",
|
|
1664
|
-
vSpecSchema:
|
|
1667
|
+
vSpecSchema: Ve
|
|
1665
1668
|
},
|
|
1666
1669
|
heatMap: {
|
|
1667
|
-
coloringType:
|
|
1668
|
-
dimensionRole: (e) => e === 0 ?
|
|
1669
|
-
measureRole: (e) => e === 0 ?
|
|
1670
|
+
coloringType: e.Gradient,
|
|
1671
|
+
dimensionRole: (e) => e === 0 ? n.HEAT_MAP_HORIZONTAL : n.HEAT_MAP_VERTICAL,
|
|
1672
|
+
measureRole: (e) => e === 0 ? a.HEAT_MAP_COLOR : a.HEAT_MAP_SIZE,
|
|
1670
1673
|
queryLimit: !0,
|
|
1671
|
-
schema:
|
|
1674
|
+
schema: me,
|
|
1672
1675
|
sorting: !0,
|
|
1673
1676
|
type: "heatMap",
|
|
1674
|
-
vSpecSchema:
|
|
1677
|
+
vSpecSchema: Ke
|
|
1675
1678
|
},
|
|
1676
1679
|
histogram: {
|
|
1677
|
-
coloringType:
|
|
1678
|
-
|
|
1680
|
+
coloringType: e.Single,
|
|
1681
|
+
measureAxes: ut.rangeAxes,
|
|
1682
|
+
schema: oe,
|
|
1679
1683
|
type: "histogram",
|
|
1680
1684
|
vSpecSchema: Be
|
|
1681
1685
|
},
|
|
1682
1686
|
pie: {
|
|
1683
|
-
coloringType:
|
|
1684
|
-
measureRole: (e) => e === 0 ?
|
|
1687
|
+
coloringType: e.Categorical,
|
|
1688
|
+
measureRole: (e) => e === 0 ? a.PIE_CHART_SLICE : a.PIE_CHART_LENGTH,
|
|
1685
1689
|
queryLimit: !0,
|
|
1686
1690
|
schema: s,
|
|
1687
1691
|
sorting: !0,
|
|
1688
1692
|
type: "pie",
|
|
1689
|
-
vSpecSchema:
|
|
1693
|
+
vSpecSchema: it
|
|
1690
1694
|
},
|
|
1691
1695
|
radar: {
|
|
1692
|
-
conditionalColoringFallbackType:
|
|
1693
|
-
schema:
|
|
1696
|
+
conditionalColoringFallbackType: e.Single,
|
|
1697
|
+
schema: be,
|
|
1694
1698
|
type: "radar",
|
|
1695
|
-
vSpecSchema:
|
|
1699
|
+
vSpecSchema: Ze
|
|
1696
1700
|
},
|
|
1697
1701
|
sankey: {
|
|
1698
|
-
schema:
|
|
1702
|
+
schema: Ie,
|
|
1699
1703
|
type: "sankey",
|
|
1700
|
-
vSpecSchema:
|
|
1704
|
+
vSpecSchema: at
|
|
1701
1705
|
},
|
|
1702
1706
|
scatter: {
|
|
1703
|
-
coloringType:
|
|
1704
|
-
dimensionRole: (e) => e === 0 ?
|
|
1707
|
+
coloringType: e.Categorical,
|
|
1708
|
+
dimensionRole: (e) => e === 0 ? n.SCATTER_DIMENSION : n.SCATTER_IMAGE,
|
|
1709
|
+
measureAxes: vt.rangeAxes,
|
|
1705
1710
|
measureRole: (e) => [
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1711
|
+
a.SCATTER_HORIZONTAL,
|
|
1712
|
+
a.SCATTER_VERTICAL,
|
|
1713
|
+
a.SCATTER_SIZE
|
|
1709
1714
|
][e],
|
|
1710
1715
|
queryLimit: !0,
|
|
1711
|
-
schema:
|
|
1716
|
+
schema: Oe,
|
|
1712
1717
|
sorting: !0,
|
|
1713
1718
|
type: "scatter",
|
|
1714
|
-
vSpecSchema:
|
|
1719
|
+
vSpecSchema: Xe
|
|
1715
1720
|
},
|
|
1716
1721
|
tree: {
|
|
1717
1722
|
queryLimit: !0,
|
|
1718
|
-
schema:
|
|
1723
|
+
schema: Ne,
|
|
1719
1724
|
sorting: !0,
|
|
1720
1725
|
type: "tree",
|
|
1721
|
-
vSpecSchema:
|
|
1726
|
+
vSpecSchema: Ge
|
|
1722
1727
|
},
|
|
1723
1728
|
treemap: {
|
|
1724
|
-
schema:
|
|
1729
|
+
schema: Ce,
|
|
1725
1730
|
type: "treemap",
|
|
1726
1731
|
vSpecSchema: Je
|
|
1727
1732
|
},
|
|
1728
1733
|
waterfall: {
|
|
1729
|
-
|
|
1734
|
+
measureAxes: mt.rangeAxes,
|
|
1735
|
+
schema: _e,
|
|
1730
1736
|
type: "waterfall",
|
|
1731
|
-
vSpecSchema:
|
|
1737
|
+
vSpecSchema: Ye
|
|
1732
1738
|
},
|
|
1733
1739
|
"word-cloud": {
|
|
1734
|
-
conditionalColoringFallbackType:
|
|
1735
|
-
schema:
|
|
1740
|
+
conditionalColoringFallbackType: e.Single,
|
|
1741
|
+
schema: Ae,
|
|
1736
1742
|
type: "word-cloud",
|
|
1737
|
-
vSpecSchema:
|
|
1743
|
+
vSpecSchema: st
|
|
1738
1744
|
}
|
|
1739
|
-
},
|
|
1740
|
-
let
|
|
1741
|
-
if (
|
|
1742
|
-
issue:
|
|
1745
|
+
}, rn = (e, t, n) => {
|
|
1746
|
+
let r = [], i = t.presentation, a = he(i?.axes);
|
|
1747
|
+
if (a) return Promise.resolve({
|
|
1748
|
+
issue: a,
|
|
1743
1749
|
success: !1
|
|
1744
1750
|
});
|
|
1745
|
-
|
|
1751
|
+
i?.orientation !== void 0 && r.push({
|
|
1746
1752
|
name: "setOrientation",
|
|
1747
|
-
payload:
|
|
1748
|
-
}), t.type === "combo" && n.push(...
|
|
1749
|
-
t.titleVisible !== void 0 &&
|
|
1753
|
+
payload: i.orientation
|
|
1754
|
+
}), t.type === "combo" && r.push(...xt(i)), n.measureAxes && r.push(...St(i, e.input.baseVSpec, n.measureAxes)), i?.legend && r.push(...xe(e.vSpec, i.legend)), Object.entries(i?.axes ?? {}).forEach(([e, t]) => {
|
|
1755
|
+
t.titleVisible !== void 0 && r.push({
|
|
1750
1756
|
name: "setShowAxisTitle",
|
|
1751
1757
|
payload: {
|
|
1752
1758
|
axisName: e,
|
|
1753
1759
|
showAxisName: t.titleVisible
|
|
1754
1760
|
}
|
|
1755
|
-
}), t.title !== void 0 &&
|
|
1761
|
+
}), t.title !== void 0 && r.push({
|
|
1756
1762
|
name: "setAxisTitle",
|
|
1757
1763
|
payload: {
|
|
1758
1764
|
axisName: e,
|
|
1759
1765
|
axisTitle: t.title
|
|
1760
1766
|
}
|
|
1761
|
-
}), t.labelsVisible !== void 0 &&
|
|
1767
|
+
}), t.labelsVisible !== void 0 && r.push({
|
|
1762
1768
|
name: "setShowAxisLabels",
|
|
1763
1769
|
payload: {
|
|
1764
1770
|
axisName: e,
|
|
1765
1771
|
showLabels: t.labelsVisible
|
|
1766
1772
|
}
|
|
1767
|
-
}), t.ticksVisible !== void 0 &&
|
|
1773
|
+
}), t.ticksVisible !== void 0 && r.push({
|
|
1768
1774
|
name: "setShowAxisTicks",
|
|
1769
1775
|
payload: {
|
|
1770
1776
|
axisName: e,
|
|
1771
1777
|
showAxisTicks: t.ticksVisible
|
|
1772
1778
|
}
|
|
1773
|
-
}), t.lineVisible !== void 0 &&
|
|
1779
|
+
}), t.lineVisible !== void 0 && r.push({
|
|
1774
1780
|
name: "setShowAxisLine",
|
|
1775
1781
|
payload: {
|
|
1776
1782
|
axisName: e,
|
|
1777
1783
|
showAxisLine: t.lineVisible
|
|
1778
1784
|
}
|
|
1779
|
-
}),
|
|
1780
|
-
name:
|
|
1785
|
+
}), r.push(...ve(e, t)), "scale" in t && t.scale !== void 0 && r.push({
|
|
1786
|
+
name: dt.SET_AXIS_SCALE,
|
|
1781
1787
|
payload: {
|
|
1782
1788
|
axisName: e,
|
|
1783
1789
|
scale: t.scale
|
|
1784
1790
|
}
|
|
1785
1791
|
});
|
|
1786
1792
|
});
|
|
1787
|
-
let
|
|
1788
|
-
return
|
|
1789
|
-
name:
|
|
1790
|
-
payload: { bands:
|
|
1791
|
-
}), (t.data.measures ?? []).forEach((
|
|
1792
|
-
let a =
|
|
1793
|
-
a &&
|
|
1793
|
+
let o = i?.axes?.primaryMeasure?.bands;
|
|
1794
|
+
return o && r.push({
|
|
1795
|
+
name: lt.SET_MEASURE_AXIS_BANDS,
|
|
1796
|
+
payload: { bands: o }
|
|
1797
|
+
}), (t.data.measures ?? []).forEach((n) => {
|
|
1798
|
+
let a = n.dataLabels ?? (t.type !== "combo" || n.seriesType === "bar" ? i?.dataLabels : void 0);
|
|
1799
|
+
a && r.push({
|
|
1794
1800
|
name: "setMeasureDataLabelsShow",
|
|
1795
1801
|
payload: {
|
|
1796
|
-
...
|
|
1802
|
+
...S(e.resolvedRefs[n.ref]),
|
|
1797
1803
|
show: a.visible
|
|
1798
1804
|
}
|
|
1799
1805
|
});
|
|
1800
|
-
}),
|
|
1801
|
-
},
|
|
1806
|
+
}), v(e, r, ["presentation"]);
|
|
1807
|
+
}, an = (e, t) => {
|
|
1802
1808
|
let n = [];
|
|
1803
1809
|
if (t.type === "combo") {
|
|
1804
1810
|
(t.data.measures ?? []).forEach((t) => {
|
|
1805
1811
|
t.seriesType && n.push({
|
|
1806
|
-
name:
|
|
1812
|
+
name: ht.SET_MEASURE_GRAPH_TYPE,
|
|
1807
1813
|
payload: {
|
|
1808
|
-
...
|
|
1814
|
+
...S(e.resolvedRefs[t.ref]),
|
|
1809
1815
|
graphType: t.seriesType
|
|
1810
1816
|
}
|
|
1811
1817
|
});
|
|
@@ -1813,16 +1819,16 @@ var Xt = {
|
|
|
1813
1819
|
let r = t.data.measures ?? [], i = r.find((e) => e.seriesType === "bar"), a = r.find((e) => e.seriesType === "bar" && e.axis)?.axis;
|
|
1814
1820
|
r.forEach((t) => {
|
|
1815
1821
|
t.seriesType !== "bar" && t.axis && n.push({
|
|
1816
|
-
name:
|
|
1822
|
+
name: yt.CHANGE_MEASURE_AXIS,
|
|
1817
1823
|
payload: {
|
|
1818
|
-
...
|
|
1824
|
+
...S(e.resolvedRefs[t.ref]),
|
|
1819
1825
|
secondaryAxis: t.axis === "secondary"
|
|
1820
1826
|
}
|
|
1821
1827
|
});
|
|
1822
1828
|
}), i && a && n.push({
|
|
1823
|
-
name:
|
|
1829
|
+
name: yt.CHANGE_MEASURE_AXIS,
|
|
1824
1830
|
payload: {
|
|
1825
|
-
...
|
|
1831
|
+
...S(e.resolvedRefs[i.ref]),
|
|
1826
1832
|
secondaryAxis: a === "secondary"
|
|
1827
1833
|
}
|
|
1828
1834
|
});
|
|
@@ -1830,44 +1836,44 @@ var Xt = {
|
|
|
1830
1836
|
if (t.type === "gauge" || t.type === "distribution-gauge") {
|
|
1831
1837
|
let e = t.type === "distribution-gauge";
|
|
1832
1838
|
e && n.push({
|
|
1833
|
-
name:
|
|
1839
|
+
name: _t.SET_GAUGE_COMPARISON_MODE,
|
|
1834
1840
|
payload: !0
|
|
1835
1841
|
}), t.presentation?.displayMode && n.push({
|
|
1836
|
-
name: e ?
|
|
1842
|
+
name: e ? _t.SET_GAUGE_BAR_MODE : ft.SET_GAUGE_BAR_MODE,
|
|
1837
1843
|
payload: t.presentation.displayMode === "bar"
|
|
1838
1844
|
}), !e && (t.data.dimensions?.length ?? 0) > 0 && (t.data.measures?.length ?? 0) > 1 && n.push({
|
|
1839
|
-
name:
|
|
1840
|
-
payload:
|
|
1845
|
+
name: ft.SET_GAUGE_TARGET_TYPE,
|
|
1846
|
+
payload: ct.Data
|
|
1841
1847
|
});
|
|
1842
1848
|
}
|
|
1843
1849
|
if (t.type === "tree" && t.presentation?.layout) {
|
|
1844
1850
|
let e = t.presentation.layout;
|
|
1845
1851
|
e.compact !== void 0 && n.push({
|
|
1846
|
-
name:
|
|
1852
|
+
name: w.SET_TREE_COMPACT,
|
|
1847
1853
|
payload: e.compact
|
|
1848
1854
|
}), e.forceAutoFit !== void 0 && n.push({
|
|
1849
|
-
name:
|
|
1855
|
+
name: w.SET_TREE_FORCE_AUTO_FIT,
|
|
1850
1856
|
payload: e.forceAutoFit
|
|
1851
1857
|
}), e.direction !== void 0 && n.push({
|
|
1852
|
-
name:
|
|
1858
|
+
name: w.SET_TREE_DIRECTION_ORIGIN,
|
|
1853
1859
|
payload: e.direction
|
|
1854
1860
|
}), e.initialExpandedLevels !== void 0 && n.push({
|
|
1855
|
-
name:
|
|
1861
|
+
name: w.SET_TREE_INITIAL_EXPANDED_LEVELS,
|
|
1856
1862
|
payload: e.initialExpandedLevels
|
|
1857
1863
|
});
|
|
1858
1864
|
}
|
|
1859
|
-
return
|
|
1860
|
-
},
|
|
1865
|
+
return v(e, n, ["presentation"]);
|
|
1866
|
+
}, on = (e, t, n) => {
|
|
1861
1867
|
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);
|
|
1862
1868
|
return !s || r || !a && !o ? Promise.resolve({
|
|
1863
1869
|
state: e,
|
|
1864
1870
|
success: !0
|
|
1865
|
-
}) :
|
|
1871
|
+
}) : v(e, [{
|
|
1866
1872
|
name: "setColoringType",
|
|
1867
1873
|
payload: typeof s == "function" ? s(t) : s
|
|
1868
1874
|
}], a ? ["presentation", "legend"] : ["presentation", "coloring"]);
|
|
1869
|
-
},
|
|
1870
|
-
let n =
|
|
1875
|
+
}, sn = async (e, t) => {
|
|
1876
|
+
let n = nn[t], r = C(e);
|
|
1871
1877
|
if (r) return {
|
|
1872
1878
|
issues: [{
|
|
1873
1879
|
code: "invalid_structure",
|
|
@@ -1878,38 +1884,38 @@ var Xt = {
|
|
|
1878
1884
|
};
|
|
1879
1885
|
let i = n.schema.safeParse(e.definition);
|
|
1880
1886
|
if (!i.success) return {
|
|
1881
|
-
issues:
|
|
1887
|
+
issues: h(i.error, e.definition),
|
|
1882
1888
|
success: !1
|
|
1883
1889
|
};
|
|
1884
1890
|
let a = n.vSpecSchema.safeParse(e.baseVSpec);
|
|
1885
1891
|
if (!a.success) return {
|
|
1886
|
-
issues: [
|
|
1892
|
+
issues: [g("invalid_structure", ["baseVSpec"], `Base ${t} vSpec is invalid.`, { details: { issues: a.error.issues } })],
|
|
1887
1893
|
success: !1
|
|
1888
1894
|
};
|
|
1889
1895
|
let o = a.data;
|
|
1890
|
-
if (!
|
|
1896
|
+
if (!x(o, [
|
|
1891
1897
|
"dimensions",
|
|
1892
1898
|
"measures",
|
|
1893
1899
|
"supportingMeasures",
|
|
1894
1900
|
"sortingMeasures"
|
|
1895
1901
|
])) return {
|
|
1896
|
-
issues: [
|
|
1902
|
+
issues: [g("non_fresh_base_vspec", ["baseVSpec"], `${t} definitions require a fresh base vSpec.`)],
|
|
1897
1903
|
success: !1
|
|
1898
1904
|
};
|
|
1899
|
-
let s = i.data, l = s.data.dimensions ?? [],
|
|
1905
|
+
let s = i.data, l = s.data.dimensions ?? [], d = s.data.measures ?? [], te = [...l, ...d].map((e) => e.ref), f = [
|
|
1900
1906
|
...c(l, e.availableFields, ["data", "dimensions"], "dimension"),
|
|
1901
|
-
...c(
|
|
1907
|
+
...c(d, e.availableFields, ["data", "measures"], "measure"),
|
|
1902
1908
|
...u([{
|
|
1903
1909
|
items: l,
|
|
1904
1910
|
path: ["data", "dimensions"]
|
|
1905
1911
|
}, {
|
|
1906
|
-
items:
|
|
1912
|
+
items: d,
|
|
1907
1913
|
path: ["data", "measures"]
|
|
1908
1914
|
}]),
|
|
1909
|
-
...
|
|
1910
|
-
...
|
|
1911
|
-
...
|
|
1912
|
-
...t === "histogram" && l[0] ?
|
|
1915
|
+
...we(s.filterGroup, e.availableFields),
|
|
1916
|
+
...Re(s.sorting, te),
|
|
1917
|
+
...ce(s.presentation?.coloring, l.map((e) => e.ref), d.map((e) => e.ref)),
|
|
1918
|
+
...t === "histogram" && l[0] ? m(l[0], e.availableFields, [
|
|
1913
1919
|
"data",
|
|
1914
1920
|
"dimensions",
|
|
1915
1921
|
0
|
|
@@ -1920,21 +1926,21 @@ var Xt = {
|
|
|
1920
1926
|
H.FieldType.REAL
|
|
1921
1927
|
], "a histogram dimension") : []
|
|
1922
1928
|
];
|
|
1923
|
-
if (
|
|
1924
|
-
issues:
|
|
1929
|
+
if (f.length > 0) return {
|
|
1930
|
+
issues: f,
|
|
1925
1931
|
success: !1
|
|
1926
1932
|
};
|
|
1927
|
-
let
|
|
1928
|
-
state:
|
|
1933
|
+
let p = {
|
|
1934
|
+
state: b(e, o),
|
|
1929
1935
|
success: !0
|
|
1930
1936
|
};
|
|
1931
1937
|
for (let [e, t] of l.entries()) {
|
|
1932
|
-
if ("issue" in
|
|
1933
|
-
issues: [
|
|
1938
|
+
if ("issue" in p) return {
|
|
1939
|
+
issues: [p.issue],
|
|
1934
1940
|
success: !1
|
|
1935
1941
|
};
|
|
1936
1942
|
let r = n.dimensionRole?.(e, s);
|
|
1937
|
-
|
|
1943
|
+
p = await y(p.state, t, "dimension", "addDimension", {
|
|
1938
1944
|
key: t.fieldKey,
|
|
1939
1945
|
...r ? { role: r } : {}
|
|
1940
1946
|
}, [
|
|
@@ -1943,41 +1949,41 @@ var Xt = {
|
|
|
1943
1949
|
e
|
|
1944
1950
|
]);
|
|
1945
1951
|
}
|
|
1946
|
-
for (let [t, r] of
|
|
1947
|
-
if ("issue" in
|
|
1948
|
-
issues: [
|
|
1952
|
+
for (let [t, r] of d.entries()) {
|
|
1953
|
+
if ("issue" in p) return {
|
|
1954
|
+
issues: [p.issue],
|
|
1949
1955
|
success: !1
|
|
1950
1956
|
};
|
|
1951
1957
|
let i = n.measureRole?.(t, s);
|
|
1952
|
-
|
|
1958
|
+
p = await y(p.state, r, "measure", "addMeasure", ee(r, e.availableFields, i ? { role: i } : {}), [
|
|
1953
1959
|
"data",
|
|
1954
1960
|
"measures",
|
|
1955
1961
|
t
|
|
1956
1962
|
]);
|
|
1957
1963
|
}
|
|
1958
|
-
return "issue" in
|
|
1964
|
+
return "issue" in p || (p = await Me(p.state, l, "updateDimension", ["data", "dimensions"]), "issue" in p) || (p = await an(p.state, s), "issue" in p) || (p = await on(p.state, s, n), "issue" in p) || (p = await Pe(p.state, l, "setDimensionTemporalGrouping", ["data", "dimensions"]), "issue" in p) || (p = await ge(p.state, l, {
|
|
1959
1965
|
formatString: "setDimensionFormatString",
|
|
1960
1966
|
formatType: "setDimensionFormatType"
|
|
1961
|
-
}, ["data", "dimensions"]), "issue" in
|
|
1967
|
+
}, ["data", "dimensions"]), "issue" in p) || (p = await ge(p.state, d, {
|
|
1962
1968
|
currency: "setMeasureCurrency",
|
|
1963
1969
|
currencyIsPrefix: "setMeasureCurrencyIsPrefix",
|
|
1964
1970
|
formatString: "setMeasureFormatString",
|
|
1965
1971
|
formatType: "setMeasureFormatType",
|
|
1966
1972
|
negativeType: "setMeasureNegativeType"
|
|
1967
|
-
}, ["data", "measures"]), "issue" in
|
|
1973
|
+
}, ["data", "measures"]), "issue" in p) || (p = await Ct(p.state, d, ["data", "measures"]), "issue" in p) || (p = await Se(p.state, s.filterGroup), "issue" in p) || n.sorting && (p = await ke(p.state, s.sorting, "changeSortOrderAndDirection", "toggleSortingItem"), "issue" in p) || n.queryLimit && s.limiting?.queryLimit !== void 0 && (p = await v(p.state, [{
|
|
1968
1974
|
name: "setQueryLimit",
|
|
1969
1975
|
payload: s.limiting.queryLimit
|
|
1970
|
-
}], ["limiting"]), "issue" in
|
|
1971
|
-
issues: [
|
|
1976
|
+
}], ["limiting"]), "issue" in p) || (p = await rn(p.state, s, n), "issue" in p) ? {
|
|
1977
|
+
issues: [p.issue],
|
|
1972
1978
|
success: !1
|
|
1973
|
-
} : (
|
|
1974
|
-
issues: [
|
|
1979
|
+
} : (p = await De(p.state, s.presentation?.coloring), "issue" in p ? {
|
|
1980
|
+
issues: [p.issue],
|
|
1975
1981
|
success: !1
|
|
1976
|
-
} :
|
|
1982
|
+
} : _(p.state, n.vSpecSchema));
|
|
1977
1983
|
}, G = (e) => {
|
|
1978
1984
|
let t = z(e.type);
|
|
1979
1985
|
return {
|
|
1980
|
-
compile: (t) =>
|
|
1986
|
+
compile: (t) => sn(t, e.type),
|
|
1981
1987
|
documentation: t.documentation,
|
|
1982
1988
|
examples: [t.example, ...(t.additionalExamples ?? []).map(({ definition: e }) => e)],
|
|
1983
1989
|
jsonSchema: B(e.schema, `${t.documentation.title} definition`),
|
|
@@ -1986,7 +1992,7 @@ var Xt = {
|
|
|
1986
1992
|
type: e.type,
|
|
1987
1993
|
version: 1
|
|
1988
1994
|
};
|
|
1989
|
-
},
|
|
1995
|
+
}, cn = [
|
|
1990
1996
|
G({
|
|
1991
1997
|
schema: V.combo,
|
|
1992
1998
|
type: "combo"
|
|
@@ -2043,8 +2049,8 @@ var Xt = {
|
|
|
2043
2049
|
schema: V["word-cloud"],
|
|
2044
2050
|
type: "word-cloud"
|
|
2045
2051
|
})
|
|
2046
|
-
], K = z("filter"),
|
|
2047
|
-
compile:
|
|
2052
|
+
], K = z("filter"), ln = {
|
|
2053
|
+
compile: Vt,
|
|
2048
2054
|
documentation: K.documentation,
|
|
2049
2055
|
examples: [K.example],
|
|
2050
2056
|
jsonSchema: B(V.filter, `${K.documentation.title} definition`),
|
|
@@ -2052,8 +2058,8 @@ var Xt = {
|
|
|
2052
2058
|
supportedFeatures: K.supportedFeatures,
|
|
2053
2059
|
type: "filter",
|
|
2054
2060
|
version: 1
|
|
2055
|
-
}, q = z("line"),
|
|
2056
|
-
compile:
|
|
2061
|
+
}, q = z("line"), un = {
|
|
2062
|
+
compile: Ht,
|
|
2057
2063
|
documentation: q.documentation,
|
|
2058
2064
|
examples: [q.example, ...(q.additionalExamples ?? []).map(({ definition: e }) => e)],
|
|
2059
2065
|
jsonSchema: B(V.line, `${q.documentation.title} definition`),
|
|
@@ -2061,8 +2067,8 @@ var Xt = {
|
|
|
2061
2067
|
supportedFeatures: q.supportedFeatures,
|
|
2062
2068
|
type: "line",
|
|
2063
2069
|
version: 1
|
|
2064
|
-
}, J = z("map"),
|
|
2065
|
-
compile:
|
|
2070
|
+
}, J = z("map"), dn = {
|
|
2071
|
+
compile: Wt,
|
|
2066
2072
|
documentation: J.documentation,
|
|
2067
2073
|
examples: [J.example, ...(J.additionalExamples ?? []).map(({ definition: e }) => e)],
|
|
2068
2074
|
jsonSchema: B(V.map, "Map definition"),
|
|
@@ -2070,8 +2076,8 @@ var Xt = {
|
|
|
2070
2076
|
supportedFeatures: J.supportedFeatures,
|
|
2071
2077
|
type: "map",
|
|
2072
2078
|
version: 1
|
|
2073
|
-
}, Y = z("number"),
|
|
2074
|
-
compile:
|
|
2079
|
+
}, Y = z("number"), fn = {
|
|
2080
|
+
compile: Ut,
|
|
2075
2081
|
documentation: Y.documentation,
|
|
2076
2082
|
examples: [Y.example],
|
|
2077
2083
|
jsonSchema: B(V.number, `${Y.documentation.title} definition`),
|
|
@@ -2082,7 +2088,7 @@ var Xt = {
|
|
|
2082
2088
|
}, X = (e, t) => Object.entries(e).flatMap(([e, n]) => n === void 0 || !t[e] ? [] : [{
|
|
2083
2089
|
name: t[e],
|
|
2084
2090
|
payload: n
|
|
2085
|
-
}]),
|
|
2091
|
+
}]), pn = {
|
|
2086
2092
|
"atomic-input": {
|
|
2087
2093
|
createRequests: (e) => {
|
|
2088
2094
|
let t = e.customLabel;
|
|
@@ -2100,18 +2106,18 @@ var Xt = {
|
|
|
2100
2106
|
payload: t.text
|
|
2101
2107
|
}]] : []];
|
|
2102
2108
|
},
|
|
2103
|
-
schema:
|
|
2109
|
+
schema: p,
|
|
2104
2110
|
type: "atomic-input",
|
|
2105
|
-
vSpecSchema:
|
|
2111
|
+
vSpecSchema: $e
|
|
2106
2112
|
},
|
|
2107
2113
|
iframe: {
|
|
2108
2114
|
createRequests: (e) => [{
|
|
2109
2115
|
name: "setIframeUrl",
|
|
2110
2116
|
payload: e.url
|
|
2111
2117
|
}],
|
|
2112
|
-
schema:
|
|
2118
|
+
schema: se,
|
|
2113
2119
|
type: "iframe",
|
|
2114
|
-
vSpecSchema:
|
|
2120
|
+
vSpecSchema: et
|
|
2115
2121
|
},
|
|
2116
2122
|
image: {
|
|
2117
2123
|
createRequests: (e) => X(e, {
|
|
@@ -2122,9 +2128,9 @@ var Xt = {
|
|
|
2122
2128
|
shadow: "setImageShadow",
|
|
2123
2129
|
source: "setImageSource"
|
|
2124
2130
|
}),
|
|
2125
|
-
schema:
|
|
2131
|
+
schema: ze,
|
|
2126
2132
|
type: "image",
|
|
2127
|
-
vSpecSchema:
|
|
2133
|
+
vSpecSchema: He
|
|
2128
2134
|
},
|
|
2129
2135
|
shape: {
|
|
2130
2136
|
createRequests: (e) => X(e, {
|
|
@@ -2144,7 +2150,7 @@ var Xt = {
|
|
|
2144
2150
|
}),
|
|
2145
2151
|
schema: l,
|
|
2146
2152
|
type: "shape",
|
|
2147
|
-
vSpecSchema:
|
|
2153
|
+
vSpecSchema: tt
|
|
2148
2154
|
},
|
|
2149
2155
|
simpleTextObject: {
|
|
2150
2156
|
createRequests: (e) => [...e.content === void 0 ? [] : [{
|
|
@@ -2163,12 +2169,12 @@ var Xt = {
|
|
|
2163
2169
|
textColor: "setTextColor",
|
|
2164
2170
|
wordWrap: "setTextWordWrap"
|
|
2165
2171
|
})],
|
|
2166
|
-
schema:
|
|
2172
|
+
schema: f,
|
|
2167
2173
|
type: "simpleTextObject",
|
|
2168
|
-
vSpecSchema:
|
|
2174
|
+
vSpecSchema: Qe
|
|
2169
2175
|
}
|
|
2170
2176
|
}, Z = async (e, t) => {
|
|
2171
|
-
let n =
|
|
2177
|
+
let n = pn[t], r = C(e);
|
|
2172
2178
|
if (r) return {
|
|
2173
2179
|
issues: [{
|
|
2174
2180
|
code: "invalid_structure",
|
|
@@ -2179,21 +2185,21 @@ var Xt = {
|
|
|
2179
2185
|
};
|
|
2180
2186
|
let i = n.schema.safeParse(e.definition);
|
|
2181
2187
|
if (!i.success) return {
|
|
2182
|
-
issues:
|
|
2188
|
+
issues: h(i.error, e.definition),
|
|
2183
2189
|
success: !1
|
|
2184
2190
|
};
|
|
2185
2191
|
let a = n.vSpecSchema.safeParse(e.baseVSpec);
|
|
2186
2192
|
if (!a.success) return {
|
|
2187
|
-
issues: [
|
|
2193
|
+
issues: [g("invalid_structure", ["baseVSpec"], `Base ${t} vSpec is invalid.`, { details: { issues: a.error.issues } })],
|
|
2188
2194
|
success: !1
|
|
2189
2195
|
};
|
|
2190
|
-
let o =
|
|
2196
|
+
let o = b(e, a.data), s = i.data.settings, c = await v(o, n.createRequests(s), ["settings"]);
|
|
2191
2197
|
return "issue" in c ? {
|
|
2192
2198
|
issues: [c.issue],
|
|
2193
2199
|
success: !1
|
|
2194
|
-
} :
|
|
2195
|
-
},
|
|
2196
|
-
let t =
|
|
2200
|
+
} : _(c.state, n.vSpecSchema);
|
|
2201
|
+
}, mn = async (e) => {
|
|
2202
|
+
let t = C(e);
|
|
2197
2203
|
if (t) return {
|
|
2198
2204
|
issues: [{
|
|
2199
2205
|
code: "invalid_structure",
|
|
@@ -2202,22 +2208,22 @@ var Xt = {
|
|
|
2202
2208
|
}],
|
|
2203
2209
|
success: !1
|
|
2204
2210
|
};
|
|
2205
|
-
let n =
|
|
2211
|
+
let n = ie.safeParse(e.definition);
|
|
2206
2212
|
if (!n.success) return {
|
|
2207
|
-
issues:
|
|
2213
|
+
issues: h(n.error, e.definition),
|
|
2208
2214
|
success: !1
|
|
2209
2215
|
};
|
|
2210
|
-
let r =
|
|
2216
|
+
let r = We.safeParse(e.baseVSpec);
|
|
2211
2217
|
if (!r.success) return {
|
|
2212
|
-
issues: [
|
|
2218
|
+
issues: [g("invalid_structure", ["baseVSpec"], "Base date-picker vSpec is invalid.", { details: { issues: r.error.issues } })],
|
|
2213
2219
|
success: !1
|
|
2214
2220
|
};
|
|
2215
2221
|
let i = r.data;
|
|
2216
|
-
if (!
|
|
2217
|
-
issues: [
|
|
2222
|
+
if (!x(i, ["dimensions", "measures"])) return {
|
|
2223
|
+
issues: [g("non_fresh_base_vspec", ["baseVSpec"], "Date-picker definitions require a fresh vSpec.")],
|
|
2218
2224
|
success: !1
|
|
2219
2225
|
};
|
|
2220
|
-
let a = n.data, o = [...
|
|
2226
|
+
let a = n.data, o = [...Te(a.data.field, e.availableFields, ["data", "field"], "dimension"), ...m(a.data.field, e.availableFields, ["data", "field"], [
|
|
2221
2227
|
H.FieldType.DATE,
|
|
2222
2228
|
H.FieldType.TIMESTAMP,
|
|
2223
2229
|
H.FieldType.TIMESTAMP_TZ
|
|
@@ -2226,13 +2232,13 @@ var Xt = {
|
|
|
2226
2232
|
issues: o,
|
|
2227
2233
|
success: !1
|
|
2228
2234
|
};
|
|
2229
|
-
let s = await b(
|
|
2235
|
+
let s = await y(b(e, i), a.data.field, "dimension", "addDatePickerDimension", { key: a.data.field.fieldKey }, ["data", "field"]);
|
|
2230
2236
|
if ("issue" in s) return {
|
|
2231
2237
|
issues: [s.issue],
|
|
2232
2238
|
success: !1
|
|
2233
2239
|
};
|
|
2234
2240
|
let { pickerType: c, ...l } = a.settings ?? {};
|
|
2235
|
-
return s = await
|
|
2241
|
+
return s = await v(s.state, X({
|
|
2236
2242
|
pickerType: c,
|
|
2237
2243
|
...l
|
|
2238
2244
|
}, {
|
|
@@ -2247,9 +2253,9 @@ var Xt = {
|
|
|
2247
2253
|
}), ["settings"]), "issue" in s ? {
|
|
2248
2254
|
issues: [s.issue],
|
|
2249
2255
|
success: !1
|
|
2250
|
-
} :
|
|
2251
|
-
},
|
|
2252
|
-
let t =
|
|
2256
|
+
} : _(s.state, We);
|
|
2257
|
+
}, hn = async (e) => {
|
|
2258
|
+
let t = C(e);
|
|
2253
2259
|
if (t) return {
|
|
2254
2260
|
issues: [{
|
|
2255
2261
|
code: "invalid_structure",
|
|
@@ -2258,22 +2264,22 @@ var Xt = {
|
|
|
2258
2264
|
}],
|
|
2259
2265
|
success: !1
|
|
2260
2266
|
};
|
|
2261
|
-
let n =
|
|
2267
|
+
let n = ue.safeParse(e.definition);
|
|
2262
2268
|
if (!n.success) return {
|
|
2263
|
-
issues:
|
|
2269
|
+
issues: h(n.error, e.definition),
|
|
2264
2270
|
success: !1
|
|
2265
2271
|
};
|
|
2266
|
-
let r =
|
|
2272
|
+
let r = rt.safeParse(e.baseVSpec);
|
|
2267
2273
|
if (!r.success) return {
|
|
2268
|
-
issues: [
|
|
2274
|
+
issues: [g("invalid_structure", ["baseVSpec"], "Base slider vSpec is invalid.", { details: { issues: r.error.issues } })],
|
|
2269
2275
|
success: !1
|
|
2270
2276
|
};
|
|
2271
2277
|
let i = r.data;
|
|
2272
|
-
if (!
|
|
2273
|
-
issues: [
|
|
2278
|
+
if (!x(i, ["dimensions", "measures"])) return {
|
|
2279
|
+
issues: [g("non_fresh_base_vspec", ["baseVSpec"], "Slider definitions require a fresh vSpec.")],
|
|
2274
2280
|
success: !1
|
|
2275
2281
|
};
|
|
2276
|
-
let a = n.data, o = [...
|
|
2282
|
+
let a = n.data, o = [...Te(a.data.field, e.availableFields, ["data", "field"], "dimension"), ...m(a.data.field, e.availableFields, ["data", "field"], [
|
|
2277
2283
|
H.FieldType.DATE,
|
|
2278
2284
|
H.FieldType.DECIMAL,
|
|
2279
2285
|
H.FieldType.FLOAT,
|
|
@@ -2286,13 +2292,13 @@ var Xt = {
|
|
|
2286
2292
|
issues: o,
|
|
2287
2293
|
success: !1
|
|
2288
2294
|
};
|
|
2289
|
-
let s = await b(
|
|
2295
|
+
let s = await y(b(e, i), a.data.field, "dimension", "addSliderDimension", { key: a.data.field.fieldKey }, ["data", "field"]);
|
|
2290
2296
|
if ("issue" in s) return {
|
|
2291
2297
|
issues: [s.issue],
|
|
2292
2298
|
success: !1
|
|
2293
2299
|
};
|
|
2294
2300
|
let c = a.settings ?? {};
|
|
2295
|
-
return s = await
|
|
2301
|
+
return s = await v(s.state, [...c.range === void 0 ? [] : [{
|
|
2296
2302
|
name: "setSliderManualRangeEnabled",
|
|
2297
2303
|
payload: !0
|
|
2298
2304
|
}], ...X(c, {
|
|
@@ -2303,7 +2309,7 @@ var Xt = {
|
|
|
2303
2309
|
})], ["settings"]), "issue" in s ? {
|
|
2304
2310
|
issues: [s.issue],
|
|
2305
2311
|
success: !1
|
|
2306
|
-
} :
|
|
2312
|
+
} : _(s.state, rt);
|
|
2307
2313
|
}, Q = (e) => {
|
|
2308
2314
|
let t = z(e.type);
|
|
2309
2315
|
return {
|
|
@@ -2316,9 +2322,9 @@ var Xt = {
|
|
|
2316
2322
|
type: e.type,
|
|
2317
2323
|
version: 1
|
|
2318
2324
|
};
|
|
2319
|
-
},
|
|
2325
|
+
}, gn = [
|
|
2320
2326
|
Q({
|
|
2321
|
-
compile:
|
|
2327
|
+
compile: mn,
|
|
2322
2328
|
schema: V["date-picker"],
|
|
2323
2329
|
type: "date-picker"
|
|
2324
2330
|
}),
|
|
@@ -2348,12 +2354,12 @@ var Xt = {
|
|
|
2348
2354
|
type: "atomic-input"
|
|
2349
2355
|
}),
|
|
2350
2356
|
Q({
|
|
2351
|
-
compile:
|
|
2357
|
+
compile: hn,
|
|
2352
2358
|
schema: V.slider,
|
|
2353
2359
|
type: "slider"
|
|
2354
2360
|
})
|
|
2355
|
-
], $ = z("table"),
|
|
2356
|
-
compile:
|
|
2361
|
+
], $ = z("table"), _n = {
|
|
2362
|
+
compile: Gt,
|
|
2357
2363
|
documentation: $.documentation,
|
|
2358
2364
|
examples: [$.example, ...($.additionalExamples ?? []).map(({ definition: e }) => e)],
|
|
2359
2365
|
jsonSchema: B(V.table, `${$.documentation.title} definition`),
|
|
@@ -2361,25 +2367,25 @@ var Xt = {
|
|
|
2361
2367
|
supportedFeatures: $.supportedFeatures,
|
|
2362
2368
|
type: "table",
|
|
2363
2369
|
version: 1
|
|
2364
|
-
},
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
...
|
|
2368
|
-
...
|
|
2369
|
-
|
|
2370
|
-
an,
|
|
2370
|
+
}, vn = (e, t) => `${t}:${e}`, yn = [
|
|
2371
|
+
tn,
|
|
2372
|
+
en,
|
|
2373
|
+
...cn,
|
|
2374
|
+
...gn,
|
|
2375
|
+
un,
|
|
2371
2376
|
dn,
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2377
|
+
_n,
|
|
2378
|
+
fn,
|
|
2379
|
+
ln
|
|
2380
|
+
], bn = new Map(yn.map((e) => [vn(e.type, e.version), e])), xn = (e, t = 1) => bn.get(vn(e, t)), Sn = () => [...bn.values()].map(({ documentation: e, examples: t, jsonSchema: n, supportedFeatures: r, type: i, version: a }) => ({
|
|
2375
2381
|
documentation: e,
|
|
2376
2382
|
examples: t,
|
|
2377
2383
|
jsonSchema: n,
|
|
2378
2384
|
supportedFeatures: r,
|
|
2379
2385
|
type: i,
|
|
2380
2386
|
version: a
|
|
2381
|
-
})),
|
|
2382
|
-
let t =
|
|
2387
|
+
})), Cn = async (e) => {
|
|
2388
|
+
let t = C(e);
|
|
2383
2389
|
if (t) return {
|
|
2384
2390
|
issues: [{
|
|
2385
2391
|
code: "invalid_structure",
|
|
@@ -2388,14 +2394,14 @@ var Xt = {
|
|
|
2388
2394
|
}],
|
|
2389
2395
|
success: !1
|
|
2390
2396
|
};
|
|
2391
|
-
let n =
|
|
2397
|
+
let n = Lt(e.definition);
|
|
2392
2398
|
if (n) return {
|
|
2393
2399
|
issues: [n],
|
|
2394
2400
|
success: !1
|
|
2395
2401
|
};
|
|
2396
|
-
let r = e.definition, i =
|
|
2402
|
+
let r = e.definition, i = xn(r.type, r.version), a = T.array(ye).safeParse(e.availableFields);
|
|
2397
2403
|
if (!a.success) return {
|
|
2398
|
-
issues:
|
|
2404
|
+
issues: h(a.error, e.availableFields, ["availableFields"]),
|
|
2399
2405
|
success: !1
|
|
2400
2406
|
};
|
|
2401
2407
|
let o = /* @__PURE__ */ new Map(), s = a.data.flatMap((e, t) => {
|
|
@@ -2415,14 +2421,14 @@ var Xt = {
|
|
|
2415
2421
|
issues: s,
|
|
2416
2422
|
success: !1
|
|
2417
2423
|
};
|
|
2418
|
-
let c =
|
|
2424
|
+
let c = ae(a.data), l = T.array(nt).safeParse(c);
|
|
2419
2425
|
if (!l.success) return {
|
|
2420
|
-
issues:
|
|
2426
|
+
issues: h(l.error, c, ["availableFields"]),
|
|
2421
2427
|
success: !1
|
|
2422
2428
|
};
|
|
2423
2429
|
if (!i) return {
|
|
2424
2430
|
issues: [{
|
|
2425
|
-
allowedValues:
|
|
2431
|
+
allowedValues: It(),
|
|
2426
2432
|
code: "unsupported_visualization",
|
|
2427
2433
|
message: "Visualization definition descriptor is not available.",
|
|
2428
2434
|
path: ["type"]
|
|
@@ -2434,10 +2440,10 @@ var Xt = {
|
|
|
2434
2440
|
availableFields: a.data
|
|
2435
2441
|
});
|
|
2436
2442
|
if (!u.success) return u;
|
|
2437
|
-
let
|
|
2438
|
-
return
|
|
2443
|
+
let ee = $t(r, a.data);
|
|
2444
|
+
return ee.length > 0 ? {
|
|
2439
2445
|
...u,
|
|
2440
|
-
warnings:
|
|
2446
|
+
warnings: ee
|
|
2441
2447
|
} : u;
|
|
2442
2448
|
};
|
|
2443
|
-
export {
|
|
2449
|
+
export { Rt as i, xn as n, Sn as r, Cn as t };
|