@astrato-io/visualizations 0.8.0 → 0.10.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 +9 -5
- package/THIRD_PARTY_NOTICES.md +403 -325
- package/VISUALIZATION_DEFINITIONS.md +319 -32
- package/chunks/{Button-BrGKp9Nm.js → Button-CCF851ea.js} +10 -10
- package/chunks/CircularProgress-yupH6YWs.js +765 -0
- package/chunks/FieldTypeIcon-D_MzsdfY.js +22 -0
- package/chunks/LinearProgress-CyFjN4px.js +327 -0
- package/chunks/{MenuOption-ByRqhRdX.js → MenuOption-CQpT79AP.js} +1391 -1008
- package/chunks/Title-C-p4ZarD.js +1804 -0
- package/chunks/_createAggregator-BF4qG9XK.js +50 -0
- package/chunks/{app-filter-bar.compiler-TwVTeoj5.js → app-filter-bar.compiler-8fxCo2q7.js} +10 -10
- package/chunks/bar-layout-DStC-GNV.js +9 -0
- package/chunks/{bar.compiler-DuQg8EUb.js → bar.compiler-CQAu8KL8.js} +102 -84
- package/chunks/{builder-DEDvNq1k.js → builder-CScg1TOS.js} +156 -60
- package/chunks/color-rules-DYJL4fIW.js +15 -0
- package/chunks/color-settings-DJFoFTip.js +5 -0
- package/chunks/{coloring-CncX_JRX.js → coloring-9jU3s_-p.js} +41 -41
- package/chunks/contains-BK-sRXcB.js +21 -0
- package/chunks/createSimplePaletteValueFilter-C4hZpCdn.js +2005 -0
- package/chunks/defaults-cyNhn37t.js +3 -0
- package/chunks/{definitions-BPJQTx16.js → definitions-C4grxhye.js} +612 -400
- package/chunks/{escobar-DRhRMYRE.js → escobar-CjirINHP.js} +5354 -5473
- package/chunks/{extend-preset-CUFNpmPe.js → extend-preset-D-l9u_we.js} +974 -909
- package/chunks/{filter.compiler-w27dlv0C.js → filter.compiler-lji2Acgn.js} +7 -7
- package/chunks/{filtering-cc7WqWpg.js → filtering-C1zakrrX.js} +570 -390
- package/chunks/handlers-ZviIUC-j.js +15387 -0
- package/chunks/{icon-picker-styles-CoJmwTRi.js → icon-picker-styles-Bj80ZUBK.js} +11 -11
- package/chunks/isEqual-Ch9OEye3.js +16 -0
- package/chunks/isFocusVisible-CgMP0qkR.js +144 -0
- package/chunks/label-format-type-C46pzgx7.js +17 -0
- package/chunks/{line.compiler-Ct1WhN2p.js → line.compiler-De5fiKuR.js} +6 -6
- package/chunks/{logger-DpQtYQnX.js → logger-CKRjhSHQ.js} +77 -66
- package/chunks/map.compiler-CKzorLgK.js +345 -0
- package/chunks/{metadata-WABZrt7Y.js → metadata-Bb9pTXrq.js} +1 -1
- package/chunks/{number.compiler-D8TPly-4.js → number.compiler-CaTmJkmi.js} +4 -4
- package/chunks/operations-DZoY50VX.js +31297 -0
- package/chunks/{range-Bi-7zT0k.js → range-D1BTmFMp.js} +2 -2
- package/chunks/react-dom-Dgv2azN2.js +368 -0
- package/chunks/{render-wrappers-OEmtaM8g.js → render-wrappers-_P3xwu5A.js} +1 -1
- package/chunks/{requirements-Dvd8jqYF.js → requirements-NHNrR8Ie.js} +55 -53
- package/chunks/responsive.styles-FItb913l.js +93 -0
- package/chunks/shared-UitWpq1J.js +1331 -0
- package/chunks/standalone-B0U6c3su.js +3638 -0
- package/chunks/{standalone-we5D5MIn.js → standalone-BBu90BhK.js} +113 -113
- package/chunks/standalone-BEekPuA12.js +357 -0
- package/chunks/{standalone-BMTCb10X.js → standalone-BOzHA_d4.js} +41 -41
- package/chunks/standalone-BR2JuRIC.js +422 -0
- package/chunks/{standalone-BGkmozIb.js → standalone-BapqaniK.js} +619 -619
- package/chunks/standalone-Bnnr87pc.js +2009 -0
- package/chunks/standalone-BwJqDj2Z.js +396 -0
- package/chunks/{standalone-BDhPQtzQ.js → standalone-ByKKqT5L.js} +308 -300
- package/chunks/{standalone-vBnBS2YC.js → standalone-CRdDZYeM.js} +1788 -1004
- package/chunks/standalone-CRfDOO1x.js +287 -0
- package/chunks/{standalone-D5Q5ngsD.js → standalone-CVknVdUC.js} +30 -27
- package/chunks/standalone-CbPk8bKn.js +580 -0
- package/chunks/{standalone-CJvIXsQE.js → standalone-Ck63MZzj.js} +234 -232
- package/chunks/{standalone-CM5XcAN5.js → standalone-DCFY1MAV.js} +8075 -7729
- package/chunks/{standalone-DW6NT205.js → standalone-DZDGX3aa.js} +168 -168
- package/chunks/standalone-DhfgeJIk.js +1012 -0
- package/chunks/{standalone-DT0wKji7.js → standalone-DibjA73M.js} +2 -2
- package/chunks/{standalone-XuGksArp.js → standalone-DtBk_iUz.js} +9 -8
- package/chunks/standalone-DxBAyqAu.js +772 -0
- package/chunks/standalone-KMQPsNsq.js +2 -0
- package/chunks/standalone-MBLSvsrY.js +2 -0
- package/chunks/standalone-U0WJwFlG.js +354 -0
- package/chunks/{standalone-C8ZAEutO.js → standalone-swGs70tD.js} +49 -51
- package/chunks/standalone-wgFAVnnm.js +355 -0
- package/chunks/standalone-xGV0dqPV.js +689 -0
- package/chunks/{table.compiler-DMeeHxb6.js → table.compiler-OWSx5MOq.js} +7 -7
- package/chunks/{typeof-CJDtcySz.js → typeof-DCq3QgvY.js} +6 -1
- package/chunks/useFieldName-B8iCYyw1.js +7 -0
- package/chunks/{utils-vdmi_2PK.js → utils-3Igg6xmO.js} +7668 -12779
- package/chunks/{view-BuwQugKb.js → view-DdMLZySj.js} +2430 -2110
- package/chunks/{visualization-filters-Cc4KU-l-.js → visualization-filters-CzvFHE6M.js} +5205 -4438
- package/chunks/with-html-element-DOfkR3C1.js +16094 -0
- package/definitions.js +2 -2
- package/docs/operations/astrato-app-filter-bar.md +1 -1
- package/docs/operations/bar.md +303 -2
- package/docs/operations/combo.md +262 -1
- package/docs/operations/date-picker.md +1 -1
- package/docs/operations/distribution-gauge.md +1 -1
- package/docs/operations/dot.md +148 -1
- package/docs/operations/filter.md +1 -1
- package/docs/operations/gauge.md +1 -1
- package/docs/operations/heatMap.md +1 -1
- package/docs/operations/histogram.md +262 -1
- package/docs/operations/iframe.md +1 -1
- package/docs/operations/image.md +1 -1
- package/docs/operations/index.md +8 -8
- package/docs/operations/line.md +262 -1
- package/docs/operations/number.md +1 -1
- package/docs/operations/pie.md +1 -1
- package/docs/operations/radar.md +1 -1
- package/docs/operations/sankey.md +1 -1
- package/docs/operations/scatter.md +148 -1
- package/docs/operations/shape.md +1 -1
- package/docs/operations/simpleTextObject.md +1 -1
- package/docs/operations/slider.md +1 -1
- package/docs/operations/table.md +439 -157
- package/docs/operations/tree.md +1 -1
- package/docs/operations/treemap.md +1 -1
- package/docs/operations/waterfall.md +1 -1
- package/docs/operations/word-cloud.md +1 -1
- package/getters.js +2 -2
- package/index.js +523 -469
- package/metadata.js +2 -2
- package/operations.js +5 -5
- package/package.json +74 -68
- package/src/definitions/index.d.ts +1 -1
- package/src/definitions/model/definitions/available-fields.d.ts +2 -2
- package/src/definitions/model/definitions/compilers/compile.d.ts +1 -0
- package/src/definitions/model/definitions/data-item-resolution.d.ts +3 -3
- package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +535 -349
- package/src/definitions/model/definitions/index.d.ts +2 -1
- package/src/definitions/model/definitions/schema-registry.d.ts +406 -101
- package/src/definitions/model/definitions/schemas/bar.schema.d.ts +10 -8
- package/src/definitions/model/definitions/schemas/common.schema.d.ts +33 -32
- package/src/definitions/model/definitions/schemas/index.d.ts +1 -0
- package/src/definitions/model/definitions/schemas/line.schema.d.ts +10 -10
- package/src/definitions/model/definitions/schemas/map.schema.d.ts +590 -0
- package/src/definitions/model/definitions/schemas/number.schema.d.ts +4 -4
- package/src/definitions/model/definitions/schemas/object.schema.d.ts +38 -38
- package/src/definitions/model/definitions/schemas/table.schema.d.ts +61 -61
- package/src/definitions/model/definitions/types/compilation.types.d.ts +7 -2
- package/src/definitions/model/definitions/types/definition.types.d.ts +2 -2
- package/src/definitions/model/definitions/types/index.d.ts +1 -1
- package/src/index.d.ts +1 -1
- package/src/operations/index.d.ts +1 -1
- package/src/types.d.ts +45 -41
- package/src/visualization-catalog.d.ts +26 -26
- package/chunks/DefaultPropsProvider-BsfB7QTn.js +0 -257
- package/chunks/FieldTypeIcon-Drs6hSJF.js +0 -22
- package/chunks/LinearProgress-VtfFx2vJ.js +0 -253
- package/chunks/Title-CO5dP1ma.js +0 -1691
- package/chunks/ToggleButton-KOBAimC1.js +0 -112
- package/chunks/color-rules-CN7TcGrC.js +0 -6
- package/chunks/color-settings-3VRlf_Vw.js +0 -6
- package/chunks/colorManipulator-D8Pjy1pf.js +0 -45
- package/chunks/handlers-TOT-7INo.js +0 -12871
- package/chunks/isEqual-B8loyPsC.js +0 -12
- package/chunks/label-format-type-weq1XfcX.js +0 -8
- package/chunks/operations-Dh4v1Ovt.js +0 -26280
- package/chunks/responsive.styles-DSiOGD7u.js +0 -82
- package/chunks/shared-Bn4N5QcZ.js +0 -1218
- package/chunks/standalone-B55oyW6c.js +0 -689
- package/chunks/standalone-BXKRE_Se.js +0 -468
- package/chunks/standalone-Bes8srx1.js +0 -354
- package/chunks/standalone-BjZp0QMe.js +0 -2
- package/chunks/standalone-BlMIwpEe.js +0 -1877
- package/chunks/standalone-C8qAelL4.js +0 -2
- package/chunks/standalone-CLmGb7nn2.js +0 -355
- package/chunks/standalone-CXNP6-xD.js +0 -420
- package/chunks/standalone-DLlyRIE6.js +0 -287
- package/chunks/standalone-DMcI1afI.js +0 -396
- package/chunks/standalone-DN4S1MjT.js +0 -3874
- package/chunks/standalone-DYQIQH4c.js +0 -2095
- package/chunks/standalone-D__XCp-h.js +0 -1003
- package/chunks/standalone-XTgSsTAa.js +0 -354
- package/chunks/useFieldName-Cjn9KCVp.js +0 -7
- package/chunks/useSlotProps-DLbQp4lc.js +0 -166
- package/chunks/with-html-element-D0uY2zjI.js +0 -7328
|
@@ -1,22 +1,211 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $ as s, A as c, B as l, C as u, E as d, F as f, G as
|
|
3
|
-
import {
|
|
4
|
-
import { n as
|
|
5
|
-
import { C as
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { Ra as e, Sc as t, Xa as n, ll as r, r as i, vc as a, wc as o } from "./visualization-filters-CzvFHE6M.js";
|
|
2
|
+
import { $ as s, A as c, B as l, C as u, E as d, F as f, G as ee, H as p, I as m, J as te, K as ne, L as re, N as ie, O as ae, P as oe, Q as se, R as ce, S as le, T as h, U as ue, V as de, W as fe, X as pe, Y as me, Z as he, _ as ge, a as _e, at as ve, c as ye, ct as be, d as g, et as xe, f as Se, g as _, h as v, i as Ce, it as we, j as y, k as Te, n as Ee, nt as De, o as Oe, ot as ke, q as Ae, r as je, rt as Me, s as Ne, st as Pe, t as b, tt as Fe, u as x, v as S, w as Ie, x as Le, y as C, z as Re } from "./shared-UitWpq1J.js";
|
|
3
|
+
import { Ap as w, Cm as ze, Em as Be, Fm as Ve, Ip as He, Mm as Ue, Nm as We, Pp as Ge, Rm as Ke, Rp as qe, Vp as Je, Xm as Ye, a_ as Xe, am as Ze, fm as Qe, gm as $e, hm as et, jm as tt, lm as nt, mm as rt, om as it, wm as at, xm as ot } from "./handlers-ZviIUC-j.js";
|
|
4
|
+
import { n as st } from "./label-format-type-C46pzgx7.js";
|
|
5
|
+
import { C as ct, S as T, _ as lt, b as ut, f as dt, v as ft, x as pt } from "./operations-DZoY50VX.js";
|
|
6
|
+
import { n as mt } from "./bar-layout-DStC-GNV.js";
|
|
7
|
+
import { z as E } from "zod";
|
|
8
|
+
var D = (e) => [{
|
|
9
|
+
ref: `${e}Latitude`,
|
|
10
|
+
fieldKey: "[Locations].[Latitude]",
|
|
11
|
+
aggregation: "AVG",
|
|
12
|
+
role: "geo"
|
|
13
|
+
}, {
|
|
14
|
+
ref: `${e}Longitude`,
|
|
15
|
+
fieldKey: "[Locations].[Longitude]",
|
|
16
|
+
aggregation: "AVG",
|
|
17
|
+
role: "secondGeo"
|
|
18
|
+
}], O = {
|
|
19
|
+
type: "map",
|
|
20
|
+
ref: "basemap",
|
|
21
|
+
presentation: { mapType: "openStreetMap" }
|
|
22
|
+
}, ht = {
|
|
23
|
+
type: "map",
|
|
24
|
+
documentation: {
|
|
25
|
+
title: "Map",
|
|
26
|
+
summary: "Layered geographic visualization with background maps, images, points, shapes, heatmaps and connections.",
|
|
27
|
+
dataRequirements: [
|
|
28
|
+
"Point, shape and heatmap layers require one dimension identifying locations. Connection layers require source and destination dimensions.",
|
|
29
|
+
"Location measures use geo for the first location and thirdGeo for a connection destination. For latLng, these are latitude; secondGeo and fourthGeo supply longitude.",
|
|
30
|
+
"Shape layers require a GeoJSON measure. Other data layers support latLng, geoPoint or geoHash.",
|
|
31
|
+
"Size measures use the size role on point/connection layers. Heat intensity uses the measure role. Background map and image layers have no data bindings."
|
|
32
|
+
],
|
|
33
|
+
constraints: [
|
|
34
|
+
"There is no fixed layer-count limit. Layers are ordered topmost first. Include a background map explicitly; the default basemap is replaced by the declared layers.",
|
|
35
|
+
"Layer and data-item references share one namespace and must all be unique across the definition. Display names may repeat.",
|
|
36
|
+
"resolvedRefs contains both layer and data-item references. A layer entry has kind \"layer\" and id; pass that id as the layer selector in map operations. Dimension and measure entries retain their data-item keys. Check kind before accessing an entry.",
|
|
37
|
+
"Raw measure fields require an available aggregation. Semantic measures and calculations supply their own aggregation.",
|
|
38
|
+
"Assign each measure role at most once per layer. Set sizing.sizeType to byMeasurePixels/byMeasureDistance to use a size measure, or value.type to byMeasure to use heat intensity.",
|
|
39
|
+
"Definitions cover initial data bindings, static filters, view and basic presentation. Additional styling and interactions use the existing map operations.",
|
|
40
|
+
"Compile only against an empty or unconfigured default map vSpec. HERE backgrounds require an API key."
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
example: {
|
|
44
|
+
type: "map",
|
|
45
|
+
version: 1,
|
|
46
|
+
layers: [{
|
|
47
|
+
type: "point",
|
|
48
|
+
ref: "locations",
|
|
49
|
+
locationType: "latLng",
|
|
50
|
+
data: {
|
|
51
|
+
dimensions: [{
|
|
52
|
+
ref: "location",
|
|
53
|
+
fieldKey: "[Locations].[Name]"
|
|
54
|
+
}],
|
|
55
|
+
measures: D("location")
|
|
56
|
+
},
|
|
57
|
+
presentation: {
|
|
58
|
+
color: "#2563EB",
|
|
59
|
+
sizing: { size: 12 }
|
|
60
|
+
}
|
|
61
|
+
}, O]
|
|
62
|
+
},
|
|
63
|
+
additionalExamples: [
|
|
64
|
+
{
|
|
65
|
+
title: "Heatmap",
|
|
66
|
+
definition: {
|
|
67
|
+
type: "map",
|
|
68
|
+
version: 1,
|
|
69
|
+
layers: [{
|
|
70
|
+
type: "heatMap",
|
|
71
|
+
ref: "density",
|
|
72
|
+
locationType: "latLng",
|
|
73
|
+
data: {
|
|
74
|
+
dimensions: [{
|
|
75
|
+
ref: "location",
|
|
76
|
+
fieldKey: "[Locations].[Name]"
|
|
77
|
+
}],
|
|
78
|
+
measures: D("density")
|
|
79
|
+
},
|
|
80
|
+
presentation: {
|
|
81
|
+
heat: {
|
|
82
|
+
radius: 25,
|
|
83
|
+
blur: 15
|
|
84
|
+
},
|
|
85
|
+
value: {
|
|
86
|
+
type: "fixed",
|
|
87
|
+
value: 1
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}, O]
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
title: "Connections",
|
|
95
|
+
definition: {
|
|
96
|
+
type: "map",
|
|
97
|
+
version: 1,
|
|
98
|
+
layers: [{
|
|
99
|
+
type: "pointConnection",
|
|
100
|
+
ref: "routes",
|
|
101
|
+
locationType: "latLng",
|
|
102
|
+
secondLocationType: "latLng",
|
|
103
|
+
data: {
|
|
104
|
+
dimensions: [{
|
|
105
|
+
ref: "origin",
|
|
106
|
+
fieldKey: "[Locations].[Name]"
|
|
107
|
+
}, {
|
|
108
|
+
ref: "destination",
|
|
109
|
+
fieldKey: "[Locations].[Destination]"
|
|
110
|
+
}],
|
|
111
|
+
measures: [
|
|
112
|
+
...D("origin"),
|
|
113
|
+
{
|
|
114
|
+
ref: "destinationLatitude",
|
|
115
|
+
fieldKey: "[Locations].[Destination Latitude]",
|
|
116
|
+
aggregation: "AVG",
|
|
117
|
+
role: "thirdGeo"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
ref: "destinationLongitude",
|
|
121
|
+
fieldKey: "[Locations].[Destination Longitude]",
|
|
122
|
+
aggregation: "AVG",
|
|
123
|
+
role: "fourthGeo"
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
presentation: {
|
|
128
|
+
useGeodesicLines: !0,
|
|
129
|
+
arrow: { show: !0 }
|
|
130
|
+
}
|
|
131
|
+
}, O]
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
title: "GeoJSON shapes",
|
|
136
|
+
definition: {
|
|
137
|
+
type: "map",
|
|
138
|
+
version: 1,
|
|
139
|
+
layers: [{
|
|
140
|
+
type: "shape",
|
|
141
|
+
ref: "regions",
|
|
142
|
+
data: {
|
|
143
|
+
dimensions: [{
|
|
144
|
+
ref: "region",
|
|
145
|
+
fieldKey: "[Locations].[Name]"
|
|
146
|
+
}],
|
|
147
|
+
measures: [{
|
|
148
|
+
ref: "boundary",
|
|
149
|
+
fieldKey: "[Locations].[Boundary]",
|
|
150
|
+
aggregation: "ANY_VALUE",
|
|
151
|
+
role: "geo"
|
|
152
|
+
}]
|
|
153
|
+
},
|
|
154
|
+
presentation: {
|
|
155
|
+
color: "#2563EB",
|
|
156
|
+
opacity: 60,
|
|
157
|
+
strokeEnabled: !0
|
|
158
|
+
}
|
|
159
|
+
}, O]
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
title: "Image overlay",
|
|
164
|
+
definition: {
|
|
165
|
+
type: "map",
|
|
166
|
+
version: 1,
|
|
167
|
+
layers: [{
|
|
168
|
+
type: "image",
|
|
169
|
+
ref: "overlay",
|
|
170
|
+
image: { imageUrl: "https://example.com/overlay.png" },
|
|
171
|
+
position: {
|
|
172
|
+
topLeftLatitude: 52,
|
|
173
|
+
topLeftLongitude: 20,
|
|
174
|
+
bottomRightLatitude: 51,
|
|
175
|
+
bottomRightLongitude: 21
|
|
176
|
+
},
|
|
177
|
+
opacity: 60
|
|
178
|
+
}, O],
|
|
179
|
+
view: {
|
|
180
|
+
latitude: 51.5,
|
|
181
|
+
longitude: 20.5,
|
|
182
|
+
zoom: 7,
|
|
183
|
+
zoomMode: "manual"
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
supportedFeatures: [
|
|
189
|
+
"dimensions",
|
|
190
|
+
"measures",
|
|
191
|
+
"filters",
|
|
192
|
+
"data-points",
|
|
193
|
+
"data-labels",
|
|
194
|
+
"object-settings"
|
|
195
|
+
]
|
|
196
|
+
}, gt = (e, ...t) => e, k = {
|
|
8
197
|
horsepower: "[Cars].[Horsepower]",
|
|
9
198
|
latestLaunch: "[Cars].[Latest Launch]",
|
|
10
199
|
manufacturer: "[Cars].[Manufacturer]",
|
|
11
200
|
model: "[Cars].[Model]",
|
|
12
201
|
sales: "[Cars].[Sales In Thousands]"
|
|
13
|
-
},
|
|
202
|
+
}, A = (e, t) => ({
|
|
14
203
|
fieldKey: t,
|
|
15
204
|
ref: e
|
|
16
|
-
}),
|
|
205
|
+
}), j = (e, t) => ({
|
|
17
206
|
fieldKey: t,
|
|
18
207
|
ref: e
|
|
19
|
-
}),
|
|
208
|
+
}), M = (e, t = k.sales, n = "SUM") => ({
|
|
20
209
|
aggregation: n,
|
|
21
210
|
fieldKey: t,
|
|
22
211
|
format: {
|
|
@@ -24,9 +213,9 @@ var ft = (e, ...t) => e, O = {
|
|
|
24
213
|
negativeType: "parenthesis"
|
|
25
214
|
},
|
|
26
215
|
ref: e
|
|
27
|
-
}),
|
|
216
|
+
}), N = {
|
|
28
217
|
filters: [{
|
|
29
|
-
fieldKey:
|
|
218
|
+
fieldKey: k.manufacturer,
|
|
30
219
|
operator: "inList",
|
|
31
220
|
values: [
|
|
32
221
|
"Acura",
|
|
@@ -35,18 +224,18 @@ var ft = (e, ...t) => e, O = {
|
|
|
35
224
|
]
|
|
36
225
|
}],
|
|
37
226
|
operator: "and"
|
|
38
|
-
},
|
|
39
|
-
fieldKey:
|
|
227
|
+
}, _t = {
|
|
228
|
+
fieldKey: k.latestLaunch,
|
|
40
229
|
ref: "launchMonth",
|
|
41
230
|
temporalGrouping: {
|
|
42
231
|
dateLevel: "month",
|
|
43
232
|
mode: "level"
|
|
44
233
|
}
|
|
45
|
-
},
|
|
234
|
+
}, P = {
|
|
46
235
|
position: "right",
|
|
47
236
|
title: "Cars comparison",
|
|
48
237
|
visible: !0
|
|
49
|
-
},
|
|
238
|
+
}, F = {
|
|
50
239
|
dimension: {
|
|
51
240
|
labelsVisible: !0,
|
|
52
241
|
title: "Manufacturer",
|
|
@@ -62,7 +251,7 @@ var ft = (e, ...t) => e, O = {
|
|
|
62
251
|
title: "Horsepower",
|
|
63
252
|
titleVisible: !0
|
|
64
253
|
}
|
|
65
|
-
},
|
|
254
|
+
}, vt = {
|
|
66
255
|
dimension: {
|
|
67
256
|
labelsVisible: !0,
|
|
68
257
|
title: "Manufacturer",
|
|
@@ -78,7 +267,7 @@ var ft = (e, ...t) => e, O = {
|
|
|
78
267
|
title: "Model",
|
|
79
268
|
titleVisible: !0
|
|
80
269
|
}
|
|
81
|
-
},
|
|
270
|
+
}, yt = {
|
|
82
271
|
dimension: {
|
|
83
272
|
labelsVisible: !0,
|
|
84
273
|
title: "Manufacturer",
|
|
@@ -89,7 +278,7 @@ var ft = (e, ...t) => e, O = {
|
|
|
89
278
|
title: "Sales",
|
|
90
279
|
titleVisible: !0
|
|
91
280
|
}
|
|
92
|
-
},
|
|
281
|
+
}, bt = {
|
|
93
282
|
dimension: {
|
|
94
283
|
labelsVisible: !0,
|
|
95
284
|
title: "Horsepower",
|
|
@@ -100,7 +289,7 @@ var ft = (e, ...t) => e, O = {
|
|
|
100
289
|
title: "Count",
|
|
101
290
|
titleVisible: !0
|
|
102
291
|
}
|
|
103
|
-
},
|
|
292
|
+
}, xt = {
|
|
104
293
|
primaryMeasure: {
|
|
105
294
|
labelsVisible: !0,
|
|
106
295
|
title: "Sales",
|
|
@@ -111,7 +300,7 @@ var ft = (e, ...t) => e, O = {
|
|
|
111
300
|
title: "Horsepower",
|
|
112
301
|
titleVisible: !0
|
|
113
302
|
}
|
|
114
|
-
},
|
|
303
|
+
}, St = {
|
|
115
304
|
dimension: {
|
|
116
305
|
labelsVisible: !0,
|
|
117
306
|
title: "Measure",
|
|
@@ -122,18 +311,19 @@ var ft = (e, ...t) => e, O = {
|
|
|
122
311
|
title: "Value",
|
|
123
312
|
titleVisible: !0
|
|
124
313
|
}
|
|
125
|
-
},
|
|
314
|
+
}, I = "presentation.axes.primaryMeasure.bands shades the plot between two primary measure axis values; start and end are measure values, and the bands replace any on the base vSpec.", Ct = (e) => `Set range on ${e} to fix its min, max, or both, for example to give several charts one shared scale. To keep an auto-fitted axis anchored at zero, leave both unset and put startsAtZero inside range, not on the axis itself: "primaryMeasure": { "range": { "startsAtZero": true } }.`, L = `${Ct("a measure axis")} Set inverted on a measure axis to reverse its values, for example to put rank 1 at the top.`, wt = `${Ct("the primary measure axis")} Set inverted on the primary measure axis to reverse its values.`, R = [
|
|
126
315
|
"dimensions",
|
|
127
316
|
"filters",
|
|
128
317
|
"measures",
|
|
129
318
|
"value-formatting"
|
|
130
|
-
],
|
|
319
|
+
], Tt = gt([
|
|
320
|
+
ht,
|
|
131
321
|
{
|
|
132
322
|
additionalExamples: [{
|
|
133
323
|
definition: {
|
|
134
324
|
data: {
|
|
135
|
-
dimensions: [
|
|
136
|
-
measures: [
|
|
325
|
+
dimensions: [A("manufacturer", k.manufacturer)],
|
|
326
|
+
measures: [M("sales")]
|
|
137
327
|
},
|
|
138
328
|
presentation: { coloring: {
|
|
139
329
|
overwrites: [{
|
|
@@ -161,29 +351,31 @@ var ft = (e, ...t) => e, O = {
|
|
|
161
351
|
"Sorting and Top N refer to definition-local refs, not generated data-item IDs.",
|
|
162
352
|
"Every dimension and measure must resolve to an available field with a compatible role.",
|
|
163
353
|
"Set axis per measure to plot it against the primary or the secondary measure axis.",
|
|
164
|
-
F,
|
|
165
354
|
I,
|
|
166
|
-
|
|
355
|
+
L,
|
|
356
|
+
"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.",
|
|
357
|
+
"Several measures on one dimension are drawn side by side unless presentation.layout is stacked. A second dimension is a series, stacked unless presentation.layout is groups. One dimension with one measure ignores layout.",
|
|
358
|
+
"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."
|
|
167
359
|
],
|
|
168
360
|
dataRequirements: ["At least one dimension.", "At least one measure."],
|
|
169
|
-
summary: "Categorical comparison chart with sorting, limiting, per-measure axes, labels, and orientation controls.",
|
|
361
|
+
summary: "Categorical comparison chart with sorting, limiting, per-measure axes, labels, layout, and orientation controls.",
|
|
170
362
|
title: "Bar chart"
|
|
171
363
|
},
|
|
172
364
|
example: {
|
|
173
365
|
data: {
|
|
174
366
|
dimensions: [{
|
|
175
|
-
...
|
|
367
|
+
...A("manufacturer", k.manufacturer),
|
|
176
368
|
showNullValues: !1
|
|
177
369
|
}],
|
|
178
370
|
measures: [{
|
|
179
|
-
...
|
|
371
|
+
...M("sales"),
|
|
180
372
|
dataLabels: {
|
|
181
373
|
placements: ["outside", "inside"],
|
|
182
374
|
visible: !0
|
|
183
375
|
}
|
|
184
376
|
}]
|
|
185
377
|
},
|
|
186
|
-
filterGroup:
|
|
378
|
+
filterGroup: N,
|
|
187
379
|
limiting: {
|
|
188
380
|
queryLimit: 100,
|
|
189
381
|
topN: {
|
|
@@ -195,9 +387,9 @@ var ft = (e, ...t) => e, O = {
|
|
|
195
387
|
},
|
|
196
388
|
presentation: {
|
|
197
389
|
axes: {
|
|
198
|
-
...
|
|
390
|
+
...F,
|
|
199
391
|
primaryMeasure: {
|
|
200
|
-
...
|
|
392
|
+
...F.primaryMeasure,
|
|
201
393
|
bands: [{
|
|
202
394
|
color: "#E6E6E6",
|
|
203
395
|
end: 15e4,
|
|
@@ -206,7 +398,7 @@ var ft = (e, ...t) => e, O = {
|
|
|
206
398
|
}]
|
|
207
399
|
}
|
|
208
400
|
},
|
|
209
|
-
legend:
|
|
401
|
+
legend: P,
|
|
210
402
|
orientation: "vertical"
|
|
211
403
|
},
|
|
212
404
|
sorting: [{
|
|
@@ -244,8 +436,8 @@ var ft = (e, ...t) => e, O = {
|
|
|
244
436
|
"Data labels apply only to bar series.",
|
|
245
437
|
"Sorting refers to definition-local refs, not generated data-item IDs.",
|
|
246
438
|
"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.",
|
|
247
|
-
F,
|
|
248
439
|
I,
|
|
440
|
+
L,
|
|
249
441
|
"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."
|
|
250
442
|
],
|
|
251
443
|
dataRequirements: ["Exactly one dimension.", "Between one and ten measures."],
|
|
@@ -254,23 +446,23 @@ var ft = (e, ...t) => e, O = {
|
|
|
254
446
|
},
|
|
255
447
|
example: {
|
|
256
448
|
data: {
|
|
257
|
-
dimensions: [
|
|
449
|
+
dimensions: [A("manufacturer", k.manufacturer)],
|
|
258
450
|
measures: [{
|
|
259
|
-
...
|
|
451
|
+
...M("sales"),
|
|
260
452
|
dataLabels: { visible: !0 },
|
|
261
453
|
seriesType: "bar"
|
|
262
454
|
}, {
|
|
263
|
-
...
|
|
455
|
+
...M("horsepower", k.horsepower, "AVG"),
|
|
264
456
|
axis: "secondary",
|
|
265
457
|
seriesType: "line"
|
|
266
458
|
}]
|
|
267
459
|
},
|
|
268
|
-
filterGroup:
|
|
460
|
+
filterGroup: N,
|
|
269
461
|
limiting: { queryLimit: 100 },
|
|
270
462
|
presentation: {
|
|
271
|
-
axes:
|
|
463
|
+
axes: yt,
|
|
272
464
|
dataLabels: { visible: !0 },
|
|
273
|
-
legend:
|
|
465
|
+
legend: P,
|
|
274
466
|
orientation: "vertical"
|
|
275
467
|
},
|
|
276
468
|
sorting: [{
|
|
@@ -305,13 +497,13 @@ var ft = (e, ...t) => e, O = {
|
|
|
305
497
|
},
|
|
306
498
|
example: {
|
|
307
499
|
data: {
|
|
308
|
-
dimensions: [
|
|
309
|
-
measures: [
|
|
500
|
+
dimensions: [A("manufacturer", k.manufacturer)],
|
|
501
|
+
measures: [M("sales"), M("averageSales", k.sales, "AVG")]
|
|
310
502
|
},
|
|
311
|
-
filterGroup:
|
|
503
|
+
filterGroup: N,
|
|
312
504
|
presentation: {
|
|
313
505
|
displayMode: "bar",
|
|
314
|
-
legend:
|
|
506
|
+
legend: P
|
|
315
507
|
},
|
|
316
508
|
type: "distribution-gauge",
|
|
317
509
|
version: 1
|
|
@@ -326,20 +518,20 @@ var ft = (e, ...t) => e, O = {
|
|
|
326
518
|
},
|
|
327
519
|
{
|
|
328
520
|
documentation: {
|
|
329
|
-
constraints: ["Dimension order is significant and maps to the two dot-chart dimension roles.",
|
|
521
|
+
constraints: ["Dimension order is significant and maps to the two dot-chart dimension roles.", wt],
|
|
330
522
|
dataRequirements: ["Exactly two dimensions.", "Exactly one measure."],
|
|
331
523
|
summary: "Dot comparison using two categorical dimensions and one measure.",
|
|
332
524
|
title: "Dot chart"
|
|
333
525
|
},
|
|
334
526
|
example: {
|
|
335
527
|
data: {
|
|
336
|
-
dimensions: [
|
|
337
|
-
measures: [
|
|
528
|
+
dimensions: [A("manufacturer", k.manufacturer), A("model", k.model)],
|
|
529
|
+
measures: [M("sales")]
|
|
338
530
|
},
|
|
339
|
-
filterGroup:
|
|
531
|
+
filterGroup: N,
|
|
340
532
|
presentation: {
|
|
341
|
-
axes:
|
|
342
|
-
legend:
|
|
533
|
+
axes: yt,
|
|
534
|
+
legend: P,
|
|
343
535
|
orientation: "horizontal"
|
|
344
536
|
},
|
|
345
537
|
type: "dot",
|
|
@@ -368,13 +560,13 @@ var ft = (e, ...t) => e, O = {
|
|
|
368
560
|
},
|
|
369
561
|
example: {
|
|
370
562
|
data: {
|
|
371
|
-
dimensions: [
|
|
372
|
-
measures: [
|
|
563
|
+
dimensions: [A("manufacturer", k.manufacturer)],
|
|
564
|
+
measures: [M("sales"), M("targetSales", k.sales, "AVG")]
|
|
373
565
|
},
|
|
374
|
-
filterGroup:
|
|
566
|
+
filterGroup: N,
|
|
375
567
|
presentation: {
|
|
376
568
|
displayMode: "radial",
|
|
377
|
-
legend:
|
|
569
|
+
legend: P
|
|
378
570
|
},
|
|
379
571
|
type: "gauge",
|
|
380
572
|
version: 1
|
|
@@ -396,14 +588,14 @@ var ft = (e, ...t) => e, O = {
|
|
|
396
588
|
},
|
|
397
589
|
example: {
|
|
398
590
|
data: {
|
|
399
|
-
dimensions: [
|
|
400
|
-
measures: [
|
|
591
|
+
dimensions: [A("manufacturer", k.manufacturer), A("model", k.model)],
|
|
592
|
+
measures: [M("sales"), M("horsepower", k.horsepower, "AVG")]
|
|
401
593
|
},
|
|
402
|
-
filterGroup:
|
|
594
|
+
filterGroup: N,
|
|
403
595
|
limiting: { queryLimit: 100 },
|
|
404
596
|
presentation: {
|
|
405
|
-
axes:
|
|
406
|
-
legend:
|
|
597
|
+
axes: vt,
|
|
598
|
+
legend: P
|
|
407
599
|
},
|
|
408
600
|
sorting: [{
|
|
409
601
|
by: "sales",
|
|
@@ -426,19 +618,19 @@ var ft = (e, ...t) => e, O = {
|
|
|
426
618
|
documentation: {
|
|
427
619
|
constraints: [
|
|
428
620
|
"The compiler creates the canonical generated count measure; callers do not provide measures.",
|
|
429
|
-
|
|
430
|
-
|
|
621
|
+
I,
|
|
622
|
+
wt
|
|
431
623
|
],
|
|
432
624
|
dataRequirements: ["Exactly one numeric dimension.", "No caller-supplied measures."],
|
|
433
625
|
summary: "Distribution of a numeric field into generated bins and counts.",
|
|
434
626
|
title: "Histogram"
|
|
435
627
|
},
|
|
436
628
|
example: {
|
|
437
|
-
data: { dimensions: [
|
|
438
|
-
filterGroup:
|
|
629
|
+
data: { dimensions: [A("horsepower", k.horsepower)] },
|
|
630
|
+
filterGroup: N,
|
|
439
631
|
presentation: {
|
|
440
|
-
axes:
|
|
441
|
-
legend:
|
|
632
|
+
axes: bt,
|
|
633
|
+
legend: P,
|
|
442
634
|
orientation: "vertical"
|
|
443
635
|
},
|
|
444
636
|
type: "histogram",
|
|
@@ -460,9 +652,9 @@ var ft = (e, ...t) => e, O = {
|
|
|
460
652
|
additionalExamples: [{
|
|
461
653
|
definition: {
|
|
462
654
|
data: {
|
|
463
|
-
dimensions: [
|
|
655
|
+
dimensions: [A("manufacturer", k.manufacturer)],
|
|
464
656
|
measures: [{
|
|
465
|
-
...
|
|
657
|
+
...M("sales"),
|
|
466
658
|
dataPointShape: "circle"
|
|
467
659
|
}]
|
|
468
660
|
},
|
|
@@ -481,9 +673,9 @@ var ft = (e, ...t) => e, O = {
|
|
|
481
673
|
}, {
|
|
482
674
|
definition: {
|
|
483
675
|
data: {
|
|
484
|
-
dimensions: [
|
|
676
|
+
dimensions: [A("manufacturer", k.manufacturer), A("model", k.model)],
|
|
485
677
|
measures: [{
|
|
486
|
-
...
|
|
678
|
+
...M("sales"),
|
|
487
679
|
dataPointShape: "circle"
|
|
488
680
|
}]
|
|
489
681
|
},
|
|
@@ -501,8 +693,8 @@ var ft = (e, ...t) => e, O = {
|
|
|
501
693
|
constraints: [
|
|
502
694
|
"Each measure may select the primary or secondary axis using its axis property.",
|
|
503
695
|
"Visible data labels require dataPointShape on every measure.",
|
|
504
|
-
F,
|
|
505
696
|
I,
|
|
697
|
+
L,
|
|
506
698
|
"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.",
|
|
507
699
|
"Value colors in presentation.coloring require at least two dimensions; measure color rules are not supported.",
|
|
508
700
|
"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."
|
|
@@ -513,24 +705,24 @@ var ft = (e, ...t) => e, O = {
|
|
|
513
705
|
},
|
|
514
706
|
example: {
|
|
515
707
|
data: {
|
|
516
|
-
dimensions: [
|
|
708
|
+
dimensions: [_t],
|
|
517
709
|
measures: [{
|
|
518
|
-
...
|
|
710
|
+
...M("sales"),
|
|
519
711
|
axis: "primary",
|
|
520
712
|
dataPointShape: "circle"
|
|
521
713
|
}, {
|
|
522
|
-
...
|
|
714
|
+
...M("horsepower", k.horsepower, "AVG"),
|
|
523
715
|
axis: "secondary",
|
|
524
716
|
dataPointShape: "square"
|
|
525
717
|
}]
|
|
526
718
|
},
|
|
527
|
-
filterGroup:
|
|
719
|
+
filterGroup: N,
|
|
528
720
|
limiting: { queryLimit: 100 },
|
|
529
721
|
presentation: {
|
|
530
722
|
axes: {
|
|
531
|
-
...
|
|
723
|
+
...F,
|
|
532
724
|
dimension: {
|
|
533
|
-
...
|
|
725
|
+
...F.dimension,
|
|
534
726
|
title: "Launch month"
|
|
535
727
|
}
|
|
536
728
|
},
|
|
@@ -538,7 +730,7 @@ var ft = (e, ...t) => e, O = {
|
|
|
538
730
|
density: "medium",
|
|
539
731
|
visible: !0
|
|
540
732
|
},
|
|
541
|
-
legend:
|
|
733
|
+
legend: P,
|
|
542
734
|
orientation: "vertical"
|
|
543
735
|
},
|
|
544
736
|
sorting: [{
|
|
@@ -581,11 +773,11 @@ var ft = (e, ...t) => e, O = {
|
|
|
581
773
|
},
|
|
582
774
|
example: {
|
|
583
775
|
data: {
|
|
584
|
-
dimensions: [
|
|
585
|
-
measures: [
|
|
776
|
+
dimensions: [A("manufacturer", k.manufacturer)],
|
|
777
|
+
measures: [M("sales")]
|
|
586
778
|
},
|
|
587
|
-
filterGroup:
|
|
588
|
-
presentation: { legend:
|
|
779
|
+
filterGroup: N,
|
|
780
|
+
presentation: { legend: P },
|
|
589
781
|
type: "radar",
|
|
590
782
|
version: 1
|
|
591
783
|
},
|
|
@@ -600,8 +792,8 @@ var ft = (e, ...t) => e, O = {
|
|
|
600
792
|
additionalExamples: [{
|
|
601
793
|
definition: {
|
|
602
794
|
data: {
|
|
603
|
-
dimensions: [
|
|
604
|
-
measures: [
|
|
795
|
+
dimensions: [A("manufacturer", k.manufacturer)],
|
|
796
|
+
measures: [M("sales")]
|
|
605
797
|
},
|
|
606
798
|
presentation: { coloring: { overwrites: [
|
|
607
799
|
{
|
|
@@ -630,12 +822,12 @@ var ft = (e, ...t) => e, O = {
|
|
|
630
822
|
},
|
|
631
823
|
example: {
|
|
632
824
|
data: {
|
|
633
|
-
dimensions: [
|
|
634
|
-
measures: [
|
|
825
|
+
dimensions: [A("manufacturer", k.manufacturer)],
|
|
826
|
+
measures: [M("sales")]
|
|
635
827
|
},
|
|
636
|
-
filterGroup:
|
|
828
|
+
filterGroup: N,
|
|
637
829
|
limiting: { queryLimit: 100 },
|
|
638
|
-
presentation: { legend:
|
|
830
|
+
presentation: { legend: P },
|
|
639
831
|
sorting: [{
|
|
640
832
|
by: "sales",
|
|
641
833
|
direction: "desc"
|
|
@@ -661,10 +853,10 @@ var ft = (e, ...t) => e, O = {
|
|
|
661
853
|
},
|
|
662
854
|
example: {
|
|
663
855
|
data: {
|
|
664
|
-
dimensions: [
|
|
665
|
-
measures: [
|
|
856
|
+
dimensions: [A("manufacturer", k.manufacturer), A("model", k.model)],
|
|
857
|
+
measures: [M("sales")]
|
|
666
858
|
},
|
|
667
|
-
filterGroup:
|
|
859
|
+
filterGroup: N,
|
|
668
860
|
limiting: { queryLimit: 100 },
|
|
669
861
|
presentation: { layout: {
|
|
670
862
|
compact: !0,
|
|
@@ -696,11 +888,11 @@ var ft = (e, ...t) => e, O = {
|
|
|
696
888
|
},
|
|
697
889
|
example: {
|
|
698
890
|
data: {
|
|
699
|
-
dimensions: [
|
|
700
|
-
measures: [
|
|
891
|
+
dimensions: [A("manufacturer", k.manufacturer), A("model", k.model)],
|
|
892
|
+
measures: [M("sales")]
|
|
701
893
|
},
|
|
702
|
-
filterGroup:
|
|
703
|
-
presentation: { legend:
|
|
894
|
+
filterGroup: N,
|
|
895
|
+
presentation: { legend: P },
|
|
704
896
|
type: "treemap",
|
|
705
897
|
version: 1
|
|
706
898
|
},
|
|
@@ -715,8 +907,8 @@ var ft = (e, ...t) => e, O = {
|
|
|
715
907
|
additionalExamples: [{
|
|
716
908
|
definition: {
|
|
717
909
|
data: {
|
|
718
|
-
dimensions: [
|
|
719
|
-
measures: [
|
|
910
|
+
dimensions: [A("manufacturer", k.manufacturer), A("model", k.model)],
|
|
911
|
+
measures: [M("sales")]
|
|
720
912
|
},
|
|
721
913
|
presentation: { coloring: { overwrites: [{
|
|
722
914
|
color: "#CA8A04",
|
|
@@ -736,10 +928,10 @@ var ft = (e, ...t) => e, O = {
|
|
|
736
928
|
},
|
|
737
929
|
example: {
|
|
738
930
|
data: {
|
|
739
|
-
dimensions: [
|
|
740
|
-
measures: [
|
|
931
|
+
dimensions: [A("manufacturer", k.manufacturer), A("model", k.model)],
|
|
932
|
+
measures: [M("sales")]
|
|
741
933
|
},
|
|
742
|
-
filterGroup:
|
|
934
|
+
filterGroup: N,
|
|
743
935
|
type: "sankey",
|
|
744
936
|
version: 1
|
|
745
937
|
},
|
|
@@ -753,7 +945,7 @@ var ft = (e, ...t) => e, O = {
|
|
|
753
945
|
"The optional second dimension receives the image role.",
|
|
754
946
|
"Roles come from item order only; a ref is a label and does not select a role.",
|
|
755
947
|
"With a size measure, points scale between the setPointSize and setMaxPointSize operation values.",
|
|
756
|
-
|
|
948
|
+
L
|
|
757
949
|
],
|
|
758
950
|
dataRequirements: ["One or two dimensions.", "Two or three measures."],
|
|
759
951
|
summary: "Relationship chart using horizontal and vertical measures with optional size and image roles.",
|
|
@@ -761,17 +953,17 @@ var ft = (e, ...t) => e, O = {
|
|
|
761
953
|
},
|
|
762
954
|
example: {
|
|
763
955
|
data: {
|
|
764
|
-
dimensions: [
|
|
956
|
+
dimensions: [A("manufacturer", k.manufacturer)],
|
|
765
957
|
measures: [
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
958
|
+
M("sales"),
|
|
959
|
+
M("horsepower", k.horsepower, "AVG"),
|
|
960
|
+
M("size", k.sales, "AVG")
|
|
769
961
|
]
|
|
770
962
|
},
|
|
771
|
-
filterGroup:
|
|
963
|
+
filterGroup: N,
|
|
772
964
|
presentation: {
|
|
773
|
-
axes:
|
|
774
|
-
legend:
|
|
965
|
+
axes: xt,
|
|
966
|
+
legend: P
|
|
775
967
|
},
|
|
776
968
|
type: "scatter",
|
|
777
969
|
version: 1
|
|
@@ -791,11 +983,11 @@ var ft = (e, ...t) => e, O = {
|
|
|
791
983
|
additionalExamples: [{
|
|
792
984
|
definition: {
|
|
793
985
|
data: {
|
|
794
|
-
dimensions: [
|
|
795
|
-
measures: [
|
|
986
|
+
dimensions: [A("manufacturer", k.manufacturer), A("model", k.model)],
|
|
987
|
+
measures: [M("sales")],
|
|
796
988
|
structure: "expandable"
|
|
797
989
|
},
|
|
798
|
-
filterGroup:
|
|
990
|
+
filterGroup: N,
|
|
799
991
|
limiting: { queryLimit: 100 },
|
|
800
992
|
sorting: [{
|
|
801
993
|
by: "sales",
|
|
@@ -808,12 +1000,12 @@ var ft = (e, ...t) => e, O = {
|
|
|
808
1000
|
}, {
|
|
809
1001
|
definition: {
|
|
810
1002
|
data: {
|
|
811
|
-
columnDimensions: [
|
|
812
|
-
measures: [
|
|
813
|
-
rowDimensions: [
|
|
1003
|
+
columnDimensions: [A("model", k.model)],
|
|
1004
|
+
measures: [M("sales")],
|
|
1005
|
+
rowDimensions: [A("manufacturer", k.manufacturer)],
|
|
814
1006
|
structure: "pivot"
|
|
815
1007
|
},
|
|
816
|
-
filterGroup:
|
|
1008
|
+
filterGroup: N,
|
|
817
1009
|
limiting: { queryLimit: 100 },
|
|
818
1010
|
sorting: [{
|
|
819
1011
|
by: "sales",
|
|
@@ -845,26 +1037,26 @@ var ft = (e, ...t) => e, O = {
|
|
|
845
1037
|
data: {
|
|
846
1038
|
columns: [
|
|
847
1039
|
{
|
|
848
|
-
...
|
|
1040
|
+
...A("manufacturer", k.manufacturer),
|
|
849
1041
|
role: "dimension"
|
|
850
1042
|
},
|
|
851
1043
|
{
|
|
852
|
-
...
|
|
1044
|
+
...A("model", k.model),
|
|
853
1045
|
role: "dimension"
|
|
854
1046
|
},
|
|
855
1047
|
{
|
|
856
|
-
...
|
|
1048
|
+
...A("latestLaunch", k.latestLaunch),
|
|
857
1049
|
format: { formatType: "ddmmmyyyy" },
|
|
858
1050
|
role: "dimension"
|
|
859
1051
|
},
|
|
860
1052
|
{
|
|
861
|
-
...
|
|
1053
|
+
...M("sales"),
|
|
862
1054
|
role: "measure"
|
|
863
1055
|
}
|
|
864
1056
|
],
|
|
865
1057
|
structure: "normal"
|
|
866
1058
|
},
|
|
867
|
-
filterGroup:
|
|
1059
|
+
filterGroup: N,
|
|
868
1060
|
limiting: { queryLimit: 100 },
|
|
869
1061
|
presentation: {
|
|
870
1062
|
background: {
|
|
@@ -939,8 +1131,8 @@ var ft = (e, ...t) => e, O = {
|
|
|
939
1131
|
documentation: {
|
|
940
1132
|
constraints: [
|
|
941
1133
|
"Dimensions are not supported. Measure order defines the waterfall sequence.",
|
|
942
|
-
|
|
943
|
-
|
|
1134
|
+
wt,
|
|
1135
|
+
I
|
|
944
1136
|
],
|
|
945
1137
|
dataRequirements: ["Between one and one hundred measures."],
|
|
946
1138
|
summary: "Sequential contribution chart composed from one or more measures.",
|
|
@@ -948,15 +1140,15 @@ var ft = (e, ...t) => e, O = {
|
|
|
948
1140
|
},
|
|
949
1141
|
example: {
|
|
950
1142
|
data: { measures: [{
|
|
951
|
-
...
|
|
1143
|
+
...M("sales"),
|
|
952
1144
|
dataLabels: { visible: !0 }
|
|
953
1145
|
}, {
|
|
954
|
-
...
|
|
1146
|
+
...M("horsepower", k.horsepower, "AVG"),
|
|
955
1147
|
dataLabels: { visible: !0 }
|
|
956
1148
|
}] },
|
|
957
|
-
filterGroup:
|
|
1149
|
+
filterGroup: N,
|
|
958
1150
|
presentation: {
|
|
959
|
-
axes:
|
|
1151
|
+
axes: St,
|
|
960
1152
|
dataLabels: { visible: !0 },
|
|
961
1153
|
orientation: "vertical"
|
|
962
1154
|
},
|
|
@@ -984,10 +1176,10 @@ var ft = (e, ...t) => e, O = {
|
|
|
984
1176
|
},
|
|
985
1177
|
example: {
|
|
986
1178
|
data: {
|
|
987
|
-
dimensions: [
|
|
988
|
-
measures: [
|
|
1179
|
+
dimensions: [A("manufacturer", k.manufacturer)],
|
|
1180
|
+
measures: [M("sales")]
|
|
989
1181
|
},
|
|
990
|
-
filterGroup:
|
|
1182
|
+
filterGroup: N,
|
|
991
1183
|
type: "word-cloud",
|
|
992
1184
|
version: 1
|
|
993
1185
|
},
|
|
@@ -1002,7 +1194,7 @@ var ft = (e, ...t) => e, O = {
|
|
|
1002
1194
|
title: "Date picker"
|
|
1003
1195
|
},
|
|
1004
1196
|
example: {
|
|
1005
|
-
data: { field:
|
|
1197
|
+
data: { field: j("latestLaunch", k.latestLaunch) },
|
|
1006
1198
|
settings: {
|
|
1007
1199
|
endDateLabel: "To",
|
|
1008
1200
|
pickerState: "expanded",
|
|
@@ -1026,7 +1218,7 @@ var ft = (e, ...t) => e, O = {
|
|
|
1026
1218
|
title: "Filter"
|
|
1027
1219
|
},
|
|
1028
1220
|
example: {
|
|
1029
|
-
data: { field:
|
|
1221
|
+
data: { field: j("manufacturer", k.manufacturer) },
|
|
1030
1222
|
presentation: {
|
|
1031
1223
|
mode: "listbox",
|
|
1032
1224
|
quickSelect: !0,
|
|
@@ -1082,14 +1274,14 @@ var ft = (e, ...t) => e, O = {
|
|
|
1082
1274
|
{
|
|
1083
1275
|
additionalExamples: [{
|
|
1084
1276
|
definition: {
|
|
1085
|
-
data: { measure:
|
|
1277
|
+
data: { measure: M("sales") },
|
|
1086
1278
|
filterGroup: {
|
|
1087
1279
|
filters: [{
|
|
1088
|
-
fieldKey:
|
|
1280
|
+
fieldKey: k.model,
|
|
1089
1281
|
operator: "contains",
|
|
1090
1282
|
value: "Sport"
|
|
1091
1283
|
}, {
|
|
1092
|
-
fieldKey:
|
|
1284
|
+
fieldKey: k.horsepower,
|
|
1093
1285
|
operator: "greaterThanOrEqualTo",
|
|
1094
1286
|
value: "200"
|
|
1095
1287
|
}],
|
|
@@ -1111,8 +1303,8 @@ var ft = (e, ...t) => e, O = {
|
|
|
1111
1303
|
title: "Number"
|
|
1112
1304
|
},
|
|
1113
1305
|
example: {
|
|
1114
|
-
data: { measure:
|
|
1115
|
-
filterGroup:
|
|
1306
|
+
data: { measure: M("sales") },
|
|
1307
|
+
filterGroup: N,
|
|
1116
1308
|
type: "number",
|
|
1117
1309
|
version: 1
|
|
1118
1310
|
},
|
|
@@ -1235,7 +1427,7 @@ var ft = (e, ...t) => e, O = {
|
|
|
1235
1427
|
title: "Slider"
|
|
1236
1428
|
},
|
|
1237
1429
|
example: {
|
|
1238
|
-
data: { field:
|
|
1430
|
+
data: { field: j("horsepower", k.horsepower) },
|
|
1239
1431
|
settings: {
|
|
1240
1432
|
layout: "multi",
|
|
1241
1433
|
quickSelect: !0,
|
|
@@ -1252,42 +1444,43 @@ var ft = (e, ...t) => e, O = {
|
|
|
1252
1444
|
type: "slider"
|
|
1253
1445
|
}
|
|
1254
1446
|
]), z = (e) => {
|
|
1255
|
-
let t =
|
|
1447
|
+
let t = Tt.find((t) => t.type === e);
|
|
1256
1448
|
if (!t) throw Error(`Missing visualization definition documentation for ${e}`);
|
|
1257
1449
|
return t;
|
|
1258
|
-
}, B = (e, t) =>
|
|
1450
|
+
}, B = (e, t) => E.toJSONSchema(e.meta({ title: t }), {
|
|
1259
1451
|
reused: "inline",
|
|
1260
1452
|
target: "draft-2020-12"
|
|
1261
1453
|
}), V = {
|
|
1262
|
-
"astrato-app-filter-bar":
|
|
1263
|
-
bar:
|
|
1264
|
-
combo:
|
|
1265
|
-
dot:
|
|
1266
|
-
scatter:
|
|
1267
|
-
histogram:
|
|
1454
|
+
"astrato-app-filter-bar": be,
|
|
1455
|
+
bar: ke,
|
|
1456
|
+
combo: ne,
|
|
1457
|
+
dot: te,
|
|
1458
|
+
scatter: Fe,
|
|
1459
|
+
histogram: he,
|
|
1268
1460
|
heatMap: pe,
|
|
1269
|
-
radar:
|
|
1270
|
-
gauge:
|
|
1271
|
-
"distribution-gauge":
|
|
1272
|
-
pie:
|
|
1273
|
-
tree:
|
|
1274
|
-
treemap:
|
|
1275
|
-
sankey:
|
|
1276
|
-
waterfall:
|
|
1277
|
-
"word-cloud":
|
|
1278
|
-
"date-picker":
|
|
1279
|
-
iframe:
|
|
1280
|
-
image:
|
|
1281
|
-
shape:
|
|
1282
|
-
simpleTextObject:
|
|
1461
|
+
radar: s,
|
|
1462
|
+
gauge: me,
|
|
1463
|
+
"distribution-gauge": Ae,
|
|
1464
|
+
pie: se,
|
|
1465
|
+
tree: De,
|
|
1466
|
+
treemap: Me,
|
|
1467
|
+
sankey: xe,
|
|
1468
|
+
waterfall: we,
|
|
1469
|
+
"word-cloud": ve,
|
|
1470
|
+
"date-picker": m,
|
|
1471
|
+
iframe: re,
|
|
1472
|
+
image: ce,
|
|
1473
|
+
shape: Re,
|
|
1474
|
+
simpleTextObject: de,
|
|
1283
1475
|
"atomic-input": f,
|
|
1284
1476
|
slider: l,
|
|
1285
|
-
line:
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1477
|
+
line: fe,
|
|
1478
|
+
map: ue,
|
|
1479
|
+
table: oe,
|
|
1480
|
+
number: p,
|
|
1481
|
+
filter: ee
|
|
1482
|
+
}, Et = new Map(Object.entries(V)), Dt = (e, t = 1) => t === 1 ? Et.get(e) : void 0, Ot = () => Object.keys(V), kt = (e) => {
|
|
1483
|
+
let t = w(e);
|
|
1291
1484
|
if (t) return {
|
|
1292
1485
|
code: "invalid_structure",
|
|
1293
1486
|
message: t,
|
|
@@ -1306,22 +1499,22 @@ var ft = (e, ...t) => e, O = {
|
|
|
1306
1499
|
path: ["version"]
|
|
1307
1500
|
};
|
|
1308
1501
|
let r = "type" in e ? e.type : void 0;
|
|
1309
|
-
if (!(typeof r == "string" &&
|
|
1310
|
-
allowedValues:
|
|
1502
|
+
if (!(typeof r == "string" && Dt(r, n))) return {
|
|
1503
|
+
allowedValues: Ot(),
|
|
1311
1504
|
code: "unsupported_visualization",
|
|
1312
1505
|
message: `Visualization type "${String(r)}" is not supported.`,
|
|
1313
1506
|
path: ["type"]
|
|
1314
1507
|
};
|
|
1315
|
-
},
|
|
1316
|
-
let t =
|
|
1508
|
+
}, At = (e) => {
|
|
1509
|
+
let t = kt(e);
|
|
1317
1510
|
if (t) return {
|
|
1318
1511
|
issues: [t],
|
|
1319
1512
|
success: !1
|
|
1320
1513
|
};
|
|
1321
|
-
let n =
|
|
1514
|
+
let n = Dt(e.type, e.version);
|
|
1322
1515
|
if (!n) return {
|
|
1323
1516
|
issues: [{
|
|
1324
|
-
allowedValues:
|
|
1517
|
+
allowedValues: Ot(),
|
|
1325
1518
|
code: "unsupported_visualization",
|
|
1326
1519
|
message: "Visualization definition descriptor is not available.",
|
|
1327
1520
|
path: ["type"]
|
|
@@ -1334,34 +1527,34 @@ var ft = (e, ...t) => e, O = {
|
|
|
1334
1527
|
issues: [],
|
|
1335
1528
|
success: !0
|
|
1336
1529
|
} : {
|
|
1337
|
-
issues:
|
|
1530
|
+
issues: h(r.error, e),
|
|
1338
1531
|
success: !1
|
|
1339
1532
|
};
|
|
1340
|
-
},
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
],
|
|
1533
|
+
}, jt = async (e) => (await import("./app-filter-bar.compiler-8fxCo2q7.js")).compileAppFilterBarVisualizationDefinition(e), Mt = async (e) => (await import("./bar.compiler-CQAu8KL8.js")).compileBarVisualizationDefinition(e), Nt = async (e) => (await import("./filter.compiler-lji2Acgn.js")).compileFilterVisualizationDefinition(e), Pt = async (e) => (await import("./line.compiler-De5fiKuR.js")).compileLineVisualizationDefinition(e), Ft = async (e) => (await import("./number.compiler-CaTmJkmi.js")).compileNumberVisualizationDefinition(e), It = async (e) => (await import("./map.compiler-CKzorLgK.js")).compileMapVisualizationDefinition(e), Lt = async (e) => (await import("./table.compiler-OWSx5MOq.js")).compileTableVisualizationDefinition(e), H = r(), Rt = [
|
|
1534
|
+
H.FieldType.DATE,
|
|
1535
|
+
H.FieldType.TIMESTAMP,
|
|
1536
|
+
H.FieldType.TIMESTAMP_TZ
|
|
1537
|
+
], zt = ["none", "inherit"], Bt = [
|
|
1345
1538
|
"dimensions",
|
|
1346
1539
|
"rowDimensions",
|
|
1347
1540
|
"columnDimensions",
|
|
1348
1541
|
"columns"
|
|
1349
|
-
],
|
|
1542
|
+
], Vt = (e) => {
|
|
1350
1543
|
if (e?.kind === "field") return {
|
|
1351
1544
|
dataType: e.dataType,
|
|
1352
1545
|
hasOwnFormat: !1,
|
|
1353
1546
|
label: "field"
|
|
1354
1547
|
};
|
|
1355
1548
|
if (e?.kind !== "dimension") return;
|
|
1356
|
-
let [
|
|
1549
|
+
let [n] = ie([e]);
|
|
1357
1550
|
return {
|
|
1358
|
-
dataType: n
|
|
1359
|
-
hasOwnFormat: !!
|
|
1551
|
+
dataType: o(n),
|
|
1552
|
+
hasOwnFormat: !!t(n),
|
|
1360
1553
|
label: "dimension"
|
|
1361
1554
|
};
|
|
1362
|
-
},
|
|
1555
|
+
}, Ht = (e) => {
|
|
1363
1556
|
let t = "data" in e ? e.data : void 0;
|
|
1364
|
-
return
|
|
1557
|
+
return Bt.flatMap((e) => {
|
|
1365
1558
|
let n = t?.[e];
|
|
1366
1559
|
return Array.isArray(n) ? n.flatMap((t, n) => e === "columns" && t.role !== "dimension" ? [] : [{
|
|
1367
1560
|
dimension: t,
|
|
@@ -1372,9 +1565,9 @@ var ft = (e, ...t) => e, O = {
|
|
|
1372
1565
|
]
|
|
1373
1566
|
}]) : [];
|
|
1374
1567
|
});
|
|
1375
|
-
},
|
|
1376
|
-
let r = e.format?.formatType, i =
|
|
1377
|
-
if (r === void 0 || !
|
|
1568
|
+
}, Ut = (e, t) => Ht(e).flatMap(({ dimension: e, path: n }) => {
|
|
1569
|
+
let r = e.format?.formatType, i = Vt(t.find((t) => t.fieldKey === e.fieldKey));
|
|
1570
|
+
if (r === void 0 || !zt.includes(r) || e.temporalGrouping?.mode === "part" || i?.dataType === void 0 || !Rt.includes(i.dataType) || r === "inherit" && i.hasOwnFormat) return [];
|
|
1378
1571
|
let a = [
|
|
1379
1572
|
...n,
|
|
1380
1573
|
"format",
|
|
@@ -1388,133 +1581,142 @@ var ft = (e, ...t) => e, O = {
|
|
|
1388
1581
|
received: r,
|
|
1389
1582
|
ref: e.ref
|
|
1390
1583
|
},
|
|
1391
|
-
message: `${
|
|
1584
|
+
message: `${Ie(a)}: ${o} such as 1672531200000 instead of dates. ${s}`,
|
|
1392
1585
|
path: a
|
|
1393
1586
|
}];
|
|
1394
|
-
}),
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1587
|
+
}), Wt = (e) => {
|
|
1588
|
+
if (e.type !== "bar" || !mt(e)) return [];
|
|
1589
|
+
let t = ["presentation", "layout"];
|
|
1590
|
+
return [{
|
|
1591
|
+
code: "inapplicable_layout",
|
|
1592
|
+
details: { received: e.presentation?.layout },
|
|
1593
|
+
message: `${Ie(t)}: one dimension with one measure draws plain bars, so the layout is ignored. Omit layout, or add a measure or a series dimension.`,
|
|
1594
|
+
path: t
|
|
1595
|
+
}];
|
|
1596
|
+
}, Gt = (e, t) => [...Wt(e), ...Ut(e, t)], U = z("bar"), Kt = {
|
|
1597
|
+
compile: Mt,
|
|
1598
|
+
documentation: U.documentation,
|
|
1599
|
+
examples: [U.example, ...(U.additionalExamples ?? []).map(({ definition: e }) => e)],
|
|
1600
|
+
jsonSchema: B(V.bar, `${U.documentation.title} definition`),
|
|
1399
1601
|
schema: V.bar,
|
|
1400
|
-
supportedFeatures:
|
|
1602
|
+
supportedFeatures: U.supportedFeatures,
|
|
1401
1603
|
type: "bar",
|
|
1402
1604
|
version: 1
|
|
1403
|
-
},
|
|
1404
|
-
compile:
|
|
1405
|
-
documentation:
|
|
1406
|
-
examples: [
|
|
1407
|
-
jsonSchema: B(V["astrato-app-filter-bar"], `${
|
|
1605
|
+
}, W = z("astrato-app-filter-bar"), qt = {
|
|
1606
|
+
compile: jt,
|
|
1607
|
+
documentation: W.documentation,
|
|
1608
|
+
examples: [W.example],
|
|
1609
|
+
jsonSchema: B(V["astrato-app-filter-bar"], `${W.documentation.title} definition`),
|
|
1408
1610
|
schema: V["astrato-app-filter-bar"],
|
|
1409
|
-
supportedFeatures:
|
|
1611
|
+
supportedFeatures: W.supportedFeatures,
|
|
1410
1612
|
type: "astrato-app-filter-bar",
|
|
1411
1613
|
version: 1
|
|
1412
1614
|
};
|
|
1413
|
-
|
|
1414
|
-
var
|
|
1615
|
+
i();
|
|
1616
|
+
var Jt = {
|
|
1415
1617
|
combo: {
|
|
1416
|
-
coloringType:
|
|
1618
|
+
coloringType: a.PerEachMeasure,
|
|
1417
1619
|
queryLimit: !0,
|
|
1418
|
-
schema:
|
|
1620
|
+
schema: ne,
|
|
1419
1621
|
sorting: !0,
|
|
1420
1622
|
type: "combo",
|
|
1421
|
-
vSpecSchema:
|
|
1623
|
+
vSpecSchema: Ke
|
|
1422
1624
|
},
|
|
1423
1625
|
"distribution-gauge": {
|
|
1424
|
-
coloringType:
|
|
1626
|
+
coloringType: a.PerEachMeasure,
|
|
1425
1627
|
measureRole: () => e.GAUGE_VALUE,
|
|
1426
|
-
schema:
|
|
1628
|
+
schema: Ae,
|
|
1427
1629
|
type: "distribution-gauge",
|
|
1428
|
-
vSpecSchema:
|
|
1630
|
+
vSpecSchema: Ue
|
|
1429
1631
|
},
|
|
1430
1632
|
dot: {
|
|
1431
|
-
coloringType:
|
|
1432
|
-
schema:
|
|
1633
|
+
coloringType: a.Categorical,
|
|
1634
|
+
schema: te,
|
|
1433
1635
|
type: "dot",
|
|
1434
|
-
vSpecSchema:
|
|
1636
|
+
vSpecSchema: tt
|
|
1435
1637
|
},
|
|
1436
1638
|
gauge: {
|
|
1437
|
-
coloringType: (e) => (e.data.dimensions?.length ?? 0) > 0 ?
|
|
1639
|
+
coloringType: (e) => (e.data.dimensions?.length ?? 0) > 0 ? a.Categorical : a.PerEachMeasure,
|
|
1438
1640
|
measureRole: (t, n) => (n.data.dimensions?.length ?? 0) > 0 && t === 1 ? e.GAUGE_TARGET : e.GAUGE_VALUE,
|
|
1439
|
-
schema:
|
|
1641
|
+
schema: me,
|
|
1440
1642
|
type: "gauge",
|
|
1441
|
-
vSpecSchema:
|
|
1643
|
+
vSpecSchema: We
|
|
1442
1644
|
},
|
|
1443
1645
|
heatMap: {
|
|
1444
|
-
coloringType:
|
|
1445
|
-
dimensionRole: (e) => e === 0 ?
|
|
1646
|
+
coloringType: a.Gradient,
|
|
1647
|
+
dimensionRole: (e) => e === 0 ? n.HEAT_MAP_HORIZONTAL : n.HEAT_MAP_VERTICAL,
|
|
1446
1648
|
measureRole: (t) => t === 0 ? e.HEAT_MAP_COLOR : e.HEAT_MAP_SIZE,
|
|
1447
1649
|
queryLimit: !0,
|
|
1448
1650
|
schema: pe,
|
|
1449
1651
|
sorting: !0,
|
|
1450
1652
|
type: "heatMap",
|
|
1451
|
-
vSpecSchema:
|
|
1653
|
+
vSpecSchema: Be
|
|
1452
1654
|
},
|
|
1453
1655
|
histogram: {
|
|
1454
|
-
coloringType:
|
|
1455
|
-
schema:
|
|
1656
|
+
coloringType: a.Single,
|
|
1657
|
+
schema: he,
|
|
1456
1658
|
type: "histogram",
|
|
1457
|
-
vSpecSchema:
|
|
1659
|
+
vSpecSchema: at
|
|
1458
1660
|
},
|
|
1459
1661
|
pie: {
|
|
1460
|
-
coloringType:
|
|
1662
|
+
coloringType: a.Categorical,
|
|
1461
1663
|
measureRole: (t) => t === 0 ? e.PIE_CHART_SLICE : e.PIE_CHART_LENGTH,
|
|
1462
1664
|
queryLimit: !0,
|
|
1463
|
-
schema:
|
|
1665
|
+
schema: se,
|
|
1464
1666
|
sorting: !0,
|
|
1465
1667
|
type: "pie",
|
|
1466
|
-
vSpecSchema:
|
|
1668
|
+
vSpecSchema: $e
|
|
1467
1669
|
},
|
|
1468
1670
|
radar: {
|
|
1469
|
-
conditionalColoringFallbackType:
|
|
1470
|
-
schema:
|
|
1671
|
+
conditionalColoringFallbackType: a.Single,
|
|
1672
|
+
schema: s,
|
|
1471
1673
|
type: "radar",
|
|
1472
|
-
vSpecSchema:
|
|
1674
|
+
vSpecSchema: et
|
|
1473
1675
|
},
|
|
1474
1676
|
sankey: {
|
|
1475
|
-
schema:
|
|
1677
|
+
schema: xe,
|
|
1476
1678
|
type: "sankey",
|
|
1477
|
-
vSpecSchema:
|
|
1679
|
+
vSpecSchema: rt
|
|
1478
1680
|
},
|
|
1479
1681
|
scatter: {
|
|
1480
|
-
coloringType:
|
|
1481
|
-
dimensionRole: (e) => e === 0 ?
|
|
1682
|
+
coloringType: a.Categorical,
|
|
1683
|
+
dimensionRole: (e) => e === 0 ? n.SCATTER_DIMENSION : n.SCATTER_IMAGE,
|
|
1482
1684
|
measureRole: (t) => [
|
|
1483
1685
|
e.SCATTER_HORIZONTAL,
|
|
1484
1686
|
e.SCATTER_VERTICAL,
|
|
1485
1687
|
e.SCATTER_SIZE
|
|
1486
1688
|
][t],
|
|
1487
1689
|
queryLimit: !0,
|
|
1488
|
-
schema:
|
|
1690
|
+
schema: Fe,
|
|
1489
1691
|
sorting: !0,
|
|
1490
1692
|
type: "scatter",
|
|
1491
|
-
vSpecSchema:
|
|
1693
|
+
vSpecSchema: Qe
|
|
1492
1694
|
},
|
|
1493
1695
|
tree: {
|
|
1494
1696
|
queryLimit: !0,
|
|
1495
|
-
schema:
|
|
1697
|
+
schema: De,
|
|
1496
1698
|
sorting: !0,
|
|
1497
1699
|
type: "tree",
|
|
1498
|
-
vSpecSchema:
|
|
1700
|
+
vSpecSchema: Je
|
|
1499
1701
|
},
|
|
1500
1702
|
treemap: {
|
|
1501
|
-
schema:
|
|
1703
|
+
schema: Me,
|
|
1502
1704
|
type: "treemap",
|
|
1503
|
-
vSpecSchema:
|
|
1705
|
+
vSpecSchema: qe
|
|
1504
1706
|
},
|
|
1505
1707
|
waterfall: {
|
|
1506
|
-
schema:
|
|
1708
|
+
schema: we,
|
|
1507
1709
|
type: "waterfall",
|
|
1508
1710
|
vSpecSchema: He
|
|
1509
1711
|
},
|
|
1510
1712
|
"word-cloud": {
|
|
1511
|
-
conditionalColoringFallbackType:
|
|
1512
|
-
schema:
|
|
1713
|
+
conditionalColoringFallbackType: a.Single,
|
|
1714
|
+
schema: ve,
|
|
1513
1715
|
type: "word-cloud",
|
|
1514
1716
|
vSpecSchema: Ge
|
|
1515
1717
|
}
|
|
1516
|
-
},
|
|
1517
|
-
let n = [], r = t.presentation, i =
|
|
1718
|
+
}, Yt = (e, t) => {
|
|
1719
|
+
let n = [], r = t.presentation, i = ge(r?.axes);
|
|
1518
1720
|
if (i) return Promise.resolve({
|
|
1519
1721
|
issue: i,
|
|
1520
1722
|
success: !1
|
|
@@ -1522,7 +1724,7 @@ var Bt = {
|
|
|
1522
1724
|
r?.orientation !== void 0 && n.push({
|
|
1523
1725
|
name: "setOrientation",
|
|
1524
1726
|
payload: r.orientation
|
|
1525
|
-
}), r?.legend && n.push(...
|
|
1727
|
+
}), r?.legend && n.push(...Se(e.vSpec, r.legend)), Object.entries(r?.axes ?? {}).forEach(([e, t]) => {
|
|
1526
1728
|
t.titleVisible !== void 0 && n.push({
|
|
1527
1729
|
name: "setShowAxisTitle",
|
|
1528
1730
|
payload: {
|
|
@@ -1553,8 +1755,8 @@ var Bt = {
|
|
|
1553
1755
|
axisName: e,
|
|
1554
1756
|
showAxisLine: t.lineVisible
|
|
1555
1757
|
}
|
|
1556
|
-
}), n.push(...
|
|
1557
|
-
name:
|
|
1758
|
+
}), n.push(...ye(e, t)), "scale" in t && t.scale !== void 0 && n.push({
|
|
1759
|
+
name: ft.SET_AXIS_SCALE,
|
|
1558
1760
|
payload: {
|
|
1559
1761
|
axisName: e,
|
|
1560
1762
|
scale: t.scale
|
|
@@ -1563,26 +1765,26 @@ var Bt = {
|
|
|
1563
1765
|
});
|
|
1564
1766
|
let a = r?.axes?.primaryMeasure?.bands;
|
|
1565
1767
|
return a && n.push({
|
|
1566
|
-
name:
|
|
1768
|
+
name: ut.SET_MEASURE_AXIS_BANDS,
|
|
1567
1769
|
payload: { bands: a }
|
|
1568
1770
|
}), (t.data.measures ?? []).forEach((i) => {
|
|
1569
1771
|
let a = i.dataLabels ?? (t.type !== "combo" || i.seriesType === "bar" ? r?.dataLabels : void 0);
|
|
1570
1772
|
a && n.push({
|
|
1571
1773
|
name: "setMeasureDataLabelsShow",
|
|
1572
1774
|
payload: {
|
|
1573
|
-
...
|
|
1775
|
+
...C(e.resolvedRefs[i.ref]),
|
|
1574
1776
|
show: a.visible
|
|
1575
1777
|
}
|
|
1576
1778
|
});
|
|
1577
|
-
}),
|
|
1578
|
-
},
|
|
1779
|
+
}), v(e, n, ["presentation"]);
|
|
1780
|
+
}, Xt = (e, t) => {
|
|
1579
1781
|
let n = [];
|
|
1580
1782
|
if (t.type === "combo") {
|
|
1581
1783
|
(t.data.measures ?? []).forEach((t) => {
|
|
1582
1784
|
t.seriesType && n.push({
|
|
1583
|
-
name:
|
|
1785
|
+
name: dt.SET_MEASURE_GRAPH_TYPE,
|
|
1584
1786
|
payload: {
|
|
1585
|
-
...
|
|
1787
|
+
...C(e.resolvedRefs[t.ref]),
|
|
1586
1788
|
graphType: t.seriesType
|
|
1587
1789
|
}
|
|
1588
1790
|
});
|
|
@@ -1590,16 +1792,16 @@ var Bt = {
|
|
|
1590
1792
|
let r = t.data.measures ?? [], i = r.find((e) => e.seriesType === "bar"), a = r.find((e) => e.seriesType === "bar" && e.axis)?.axis;
|
|
1591
1793
|
r.forEach((t) => {
|
|
1592
1794
|
t.seriesType !== "bar" && t.axis && n.push({
|
|
1593
|
-
name:
|
|
1795
|
+
name: lt.CHANGE_MEASURE_AXIS,
|
|
1594
1796
|
payload: {
|
|
1595
|
-
...
|
|
1797
|
+
...C(e.resolvedRefs[t.ref]),
|
|
1596
1798
|
secondaryAxis: t.axis === "secondary"
|
|
1597
1799
|
}
|
|
1598
1800
|
});
|
|
1599
1801
|
}), i && a && n.push({
|
|
1600
|
-
name:
|
|
1802
|
+
name: lt.CHANGE_MEASURE_AXIS,
|
|
1601
1803
|
payload: {
|
|
1602
|
-
...
|
|
1804
|
+
...C(e.resolvedRefs[i.ref]),
|
|
1603
1805
|
secondaryAxis: a === "secondary"
|
|
1604
1806
|
}
|
|
1605
1807
|
});
|
|
@@ -1607,44 +1809,44 @@ var Bt = {
|
|
|
1607
1809
|
if (t.type === "gauge" || t.type === "distribution-gauge") {
|
|
1608
1810
|
let e = t.type === "distribution-gauge";
|
|
1609
1811
|
e && n.push({
|
|
1610
|
-
name:
|
|
1812
|
+
name: pt.SET_GAUGE_COMPARISON_MODE,
|
|
1611
1813
|
payload: !0
|
|
1612
1814
|
}), t.presentation?.displayMode && n.push({
|
|
1613
|
-
name: e ?
|
|
1815
|
+
name: e ? pt.SET_GAUGE_BAR_MODE : ct.SET_GAUGE_BAR_MODE,
|
|
1614
1816
|
payload: t.presentation.displayMode === "bar"
|
|
1615
1817
|
}), !e && (t.data.dimensions?.length ?? 0) > 0 && (t.data.measures?.length ?? 0) > 1 && n.push({
|
|
1616
|
-
name:
|
|
1617
|
-
payload:
|
|
1818
|
+
name: ct.SET_GAUGE_TARGET_TYPE,
|
|
1819
|
+
payload: st.Data
|
|
1618
1820
|
});
|
|
1619
1821
|
}
|
|
1620
1822
|
if (t.type === "tree" && t.presentation?.layout) {
|
|
1621
1823
|
let e = t.presentation.layout;
|
|
1622
1824
|
e.compact !== void 0 && n.push({
|
|
1623
|
-
name:
|
|
1825
|
+
name: T.SET_TREE_COMPACT,
|
|
1624
1826
|
payload: e.compact
|
|
1625
1827
|
}), e.forceAutoFit !== void 0 && n.push({
|
|
1626
|
-
name:
|
|
1828
|
+
name: T.SET_TREE_FORCE_AUTO_FIT,
|
|
1627
1829
|
payload: e.forceAutoFit
|
|
1628
1830
|
}), e.direction !== void 0 && n.push({
|
|
1629
|
-
name:
|
|
1831
|
+
name: T.SET_TREE_DIRECTION_ORIGIN,
|
|
1630
1832
|
payload: e.direction
|
|
1631
1833
|
}), e.initialExpandedLevels !== void 0 && n.push({
|
|
1632
|
-
name:
|
|
1834
|
+
name: T.SET_TREE_INITIAL_EXPANDED_LEVELS,
|
|
1633
1835
|
payload: e.initialExpandedLevels
|
|
1634
1836
|
});
|
|
1635
1837
|
}
|
|
1636
|
-
return
|
|
1637
|
-
},
|
|
1838
|
+
return v(e, n, ["presentation"]);
|
|
1839
|
+
}, Zt = (e, t, n) => {
|
|
1638
1840
|
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);
|
|
1639
1841
|
return !s || r || !a && !o ? Promise.resolve({
|
|
1640
1842
|
state: e,
|
|
1641
1843
|
success: !0
|
|
1642
|
-
}) :
|
|
1844
|
+
}) : v(e, [{
|
|
1643
1845
|
name: "setColoringType",
|
|
1644
1846
|
payload: typeof s == "function" ? s(t) : s
|
|
1645
1847
|
}], a ? ["presentation", "legend"] : ["presentation", "coloring"]);
|
|
1646
|
-
},
|
|
1647
|
-
let n =
|
|
1848
|
+
}, Qt = async (e, t) => {
|
|
1849
|
+
let n = Jt[t], r = w(e);
|
|
1648
1850
|
if (r) return {
|
|
1649
1851
|
issues: [{
|
|
1650
1852
|
code: "invalid_structure",
|
|
@@ -1655,27 +1857,27 @@ var Bt = {
|
|
|
1655
1857
|
};
|
|
1656
1858
|
let i = n.schema.safeParse(e.definition);
|
|
1657
1859
|
if (!i.success) return {
|
|
1658
|
-
issues:
|
|
1860
|
+
issues: h(i.error, e.definition),
|
|
1659
1861
|
success: !1
|
|
1660
1862
|
};
|
|
1661
1863
|
let a = n.vSpecSchema.safeParse(e.baseVSpec);
|
|
1662
1864
|
if (!a.success) return {
|
|
1663
|
-
issues: [
|
|
1865
|
+
issues: [g("invalid_structure", ["baseVSpec"], `Base ${t} vSpec is invalid.`, { details: { issues: a.error.issues } })],
|
|
1664
1866
|
success: !1
|
|
1665
1867
|
};
|
|
1666
1868
|
let o = a.data;
|
|
1667
|
-
if (!
|
|
1869
|
+
if (!S(o, [
|
|
1668
1870
|
"dimensions",
|
|
1669
1871
|
"measures",
|
|
1670
1872
|
"supportingMeasures",
|
|
1671
1873
|
"sortingMeasures"
|
|
1672
1874
|
])) return {
|
|
1673
|
-
issues: [
|
|
1875
|
+
issues: [g("non_fresh_base_vspec", ["baseVSpec"], `${t} definitions require a fresh base vSpec.`)],
|
|
1674
1876
|
success: !1
|
|
1675
1877
|
};
|
|
1676
|
-
let s = i.data, l = s.data.dimensions ?? [], f = s.data.measures ?? [],
|
|
1677
|
-
...
|
|
1678
|
-
...
|
|
1878
|
+
let s = i.data, l = s.data.dimensions ?? [], f = s.data.measures ?? [], ee = [...l, ...f].map((e) => e.ref), p = [
|
|
1879
|
+
...Te(l, e.availableFields, ["data", "dimensions"], "dimension"),
|
|
1880
|
+
...Te(f, e.availableFields, ["data", "measures"], "measure"),
|
|
1679
1881
|
...u([{
|
|
1680
1882
|
items: l,
|
|
1681
1883
|
path: ["data", "dimensions"]
|
|
@@ -1684,34 +1886,34 @@ var Bt = {
|
|
|
1684
1886
|
path: ["data", "measures"]
|
|
1685
1887
|
}]),
|
|
1686
1888
|
...c(s.filterGroup, e.availableFields),
|
|
1687
|
-
...
|
|
1688
|
-
...
|
|
1689
|
-
...t === "histogram" && l[0] ?
|
|
1889
|
+
...Le(s.sorting, ee),
|
|
1890
|
+
...le(s.presentation?.coloring, l.map((e) => e.ref), f.map((e) => e.ref)),
|
|
1891
|
+
...t === "histogram" && l[0] ? y(l[0], e.availableFields, [
|
|
1690
1892
|
"data",
|
|
1691
1893
|
"dimensions",
|
|
1692
1894
|
0
|
|
1693
1895
|
], [
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1896
|
+
H.FieldType.DECIMAL,
|
|
1897
|
+
H.FieldType.FLOAT,
|
|
1898
|
+
H.FieldType.INT,
|
|
1899
|
+
H.FieldType.REAL
|
|
1698
1900
|
], "a histogram dimension") : []
|
|
1699
1901
|
];
|
|
1700
|
-
if (
|
|
1701
|
-
issues:
|
|
1902
|
+
if (p.length > 0) return {
|
|
1903
|
+
issues: p,
|
|
1702
1904
|
success: !1
|
|
1703
1905
|
};
|
|
1704
|
-
let
|
|
1705
|
-
state:
|
|
1906
|
+
let m = {
|
|
1907
|
+
state: x(e, o),
|
|
1706
1908
|
success: !0
|
|
1707
1909
|
};
|
|
1708
1910
|
for (let [e, t] of l.entries()) {
|
|
1709
|
-
if ("issue" in
|
|
1710
|
-
issues: [
|
|
1911
|
+
if ("issue" in m) return {
|
|
1912
|
+
issues: [m.issue],
|
|
1711
1913
|
success: !1
|
|
1712
1914
|
};
|
|
1713
1915
|
let r = n.dimensionRole?.(e, s);
|
|
1714
|
-
|
|
1916
|
+
m = await b(m.state, t, "dimension", "addDimension", {
|
|
1715
1917
|
key: t.fieldKey,
|
|
1716
1918
|
...r ? { role: r } : {}
|
|
1717
1919
|
}, [
|
|
@@ -1721,40 +1923,40 @@ var Bt = {
|
|
|
1721
1923
|
]);
|
|
1722
1924
|
}
|
|
1723
1925
|
for (let [t, r] of f.entries()) {
|
|
1724
|
-
if ("issue" in
|
|
1725
|
-
issues: [
|
|
1926
|
+
if ("issue" in m) return {
|
|
1927
|
+
issues: [m.issue],
|
|
1726
1928
|
success: !1
|
|
1727
1929
|
};
|
|
1728
1930
|
let i = n.measureRole?.(t, s);
|
|
1729
|
-
|
|
1931
|
+
m = await b(m.state, r, "measure", "addMeasure", d(r, e.availableFields, i ? { role: i } : {}), [
|
|
1730
1932
|
"data",
|
|
1731
1933
|
"measures",
|
|
1732
1934
|
t
|
|
1733
1935
|
]);
|
|
1734
1936
|
}
|
|
1735
|
-
return "issue" in
|
|
1937
|
+
return "issue" in m || (m = await je(m.state, l, "updateDimension", ["data", "dimensions"]), "issue" in m) || (m = await Xt(m.state, s), "issue" in m) || (m = await Zt(m.state, s, n), "issue" in m) || (m = await Ne(m.state, l, "setDimensionTemporalGrouping", ["data", "dimensions"]), "issue" in m) || (m = await _e(m.state, l, {
|
|
1736
1938
|
formatString: "setDimensionFormatString",
|
|
1737
1939
|
formatType: "setDimensionFormatType"
|
|
1738
|
-
}, ["data", "dimensions"]), "issue" in
|
|
1940
|
+
}, ["data", "dimensions"]), "issue" in m) || (m = await _e(m.state, f, {
|
|
1739
1941
|
currency: "setMeasureCurrency",
|
|
1740
1942
|
currencyIsPrefix: "setMeasureCurrencyIsPrefix",
|
|
1741
1943
|
formatString: "setMeasureFormatString",
|
|
1742
1944
|
formatType: "setMeasureFormatType",
|
|
1743
1945
|
negativeType: "setMeasureNegativeType"
|
|
1744
|
-
}, ["data", "measures"]), "issue" in
|
|
1946
|
+
}, ["data", "measures"]), "issue" in m) || (m = await Ce(m.state, s.filterGroup), "issue" in m) || n.sorting && (m = await Oe(m.state, s.sorting, "changeSortOrderAndDirection", "toggleSortingItem"), "issue" in m) || n.queryLimit && s.limiting?.queryLimit !== void 0 && (m = await v(m.state, [{
|
|
1745
1947
|
name: "setQueryLimit",
|
|
1746
1948
|
payload: s.limiting.queryLimit
|
|
1747
|
-
}], ["limiting"]), "issue" in
|
|
1748
|
-
issues: [
|
|
1949
|
+
}], ["limiting"]), "issue" in m) || (m = await Yt(m.state, s), "issue" in m) ? {
|
|
1950
|
+
issues: [m.issue],
|
|
1749
1951
|
success: !1
|
|
1750
|
-
} : (
|
|
1751
|
-
issues: [
|
|
1952
|
+
} : (m = await Ee(m.state, s.presentation?.coloring), "issue" in m ? {
|
|
1953
|
+
issues: [m.issue],
|
|
1752
1954
|
success: !1
|
|
1753
|
-
} :
|
|
1754
|
-
},
|
|
1955
|
+
} : _(m.state, n.vSpecSchema));
|
|
1956
|
+
}, G = (e) => {
|
|
1755
1957
|
let t = z(e.type);
|
|
1756
1958
|
return {
|
|
1757
|
-
compile: (t) =>
|
|
1959
|
+
compile: (t) => Qt(t, e.type),
|
|
1758
1960
|
documentation: t.documentation,
|
|
1759
1961
|
examples: [t.example, ...(t.additionalExamples ?? []).map(({ definition: e }) => e)],
|
|
1760
1962
|
jsonSchema: B(e.schema, `${t.documentation.title} definition`),
|
|
@@ -1763,83 +1965,92 @@ var Bt = {
|
|
|
1763
1965
|
type: e.type,
|
|
1764
1966
|
version: 1
|
|
1765
1967
|
};
|
|
1766
|
-
},
|
|
1767
|
-
|
|
1968
|
+
}, $t = [
|
|
1969
|
+
G({
|
|
1768
1970
|
schema: V.combo,
|
|
1769
1971
|
type: "combo"
|
|
1770
1972
|
}),
|
|
1771
|
-
|
|
1973
|
+
G({
|
|
1772
1974
|
schema: V.dot,
|
|
1773
1975
|
type: "dot"
|
|
1774
1976
|
}),
|
|
1775
|
-
|
|
1977
|
+
G({
|
|
1776
1978
|
schema: V.scatter,
|
|
1777
1979
|
type: "scatter"
|
|
1778
1980
|
}),
|
|
1779
|
-
|
|
1981
|
+
G({
|
|
1780
1982
|
schema: V.histogram,
|
|
1781
1983
|
type: "histogram"
|
|
1782
1984
|
}),
|
|
1783
|
-
|
|
1985
|
+
G({
|
|
1784
1986
|
schema: V.heatMap,
|
|
1785
1987
|
type: "heatMap"
|
|
1786
1988
|
}),
|
|
1787
|
-
|
|
1989
|
+
G({
|
|
1788
1990
|
schema: V.radar,
|
|
1789
1991
|
type: "radar"
|
|
1790
1992
|
}),
|
|
1791
|
-
|
|
1993
|
+
G({
|
|
1792
1994
|
schema: V.gauge,
|
|
1793
1995
|
type: "gauge"
|
|
1794
1996
|
}),
|
|
1795
|
-
|
|
1997
|
+
G({
|
|
1796
1998
|
schema: V["distribution-gauge"],
|
|
1797
1999
|
type: "distribution-gauge"
|
|
1798
2000
|
}),
|
|
1799
|
-
|
|
2001
|
+
G({
|
|
1800
2002
|
schema: V.pie,
|
|
1801
2003
|
type: "pie"
|
|
1802
2004
|
}),
|
|
1803
|
-
|
|
2005
|
+
G({
|
|
1804
2006
|
schema: V.tree,
|
|
1805
2007
|
type: "tree"
|
|
1806
2008
|
}),
|
|
1807
|
-
|
|
2009
|
+
G({
|
|
1808
2010
|
schema: V.treemap,
|
|
1809
2011
|
type: "treemap"
|
|
1810
2012
|
}),
|
|
1811
|
-
|
|
2013
|
+
G({
|
|
1812
2014
|
schema: V.sankey,
|
|
1813
2015
|
type: "sankey"
|
|
1814
2016
|
}),
|
|
1815
|
-
|
|
2017
|
+
G({
|
|
1816
2018
|
schema: V.waterfall,
|
|
1817
2019
|
type: "waterfall"
|
|
1818
2020
|
}),
|
|
1819
|
-
|
|
2021
|
+
G({
|
|
1820
2022
|
schema: V["word-cloud"],
|
|
1821
2023
|
type: "word-cloud"
|
|
1822
2024
|
})
|
|
1823
|
-
],
|
|
1824
|
-
compile:
|
|
1825
|
-
documentation:
|
|
1826
|
-
examples: [
|
|
1827
|
-
jsonSchema: B(V.filter, `${
|
|
2025
|
+
], K = z("filter"), en = {
|
|
2026
|
+
compile: Nt,
|
|
2027
|
+
documentation: K.documentation,
|
|
2028
|
+
examples: [K.example],
|
|
2029
|
+
jsonSchema: B(V.filter, `${K.documentation.title} definition`),
|
|
1828
2030
|
schema: V.filter,
|
|
1829
|
-
supportedFeatures:
|
|
2031
|
+
supportedFeatures: K.supportedFeatures,
|
|
1830
2032
|
type: "filter",
|
|
1831
2033
|
version: 1
|
|
1832
|
-
},
|
|
1833
|
-
compile:
|
|
2034
|
+
}, q = z("line"), tn = {
|
|
2035
|
+
compile: Pt,
|
|
2036
|
+
documentation: q.documentation,
|
|
2037
|
+
examples: [q.example, ...(q.additionalExamples ?? []).map(({ definition: e }) => e)],
|
|
2038
|
+
jsonSchema: B(V.line, `${q.documentation.title} definition`),
|
|
2039
|
+
schema: V.line,
|
|
2040
|
+
supportedFeatures: q.supportedFeatures,
|
|
2041
|
+
type: "line",
|
|
2042
|
+
version: 1
|
|
2043
|
+
}, J = z("map"), nn = {
|
|
2044
|
+
compile: It,
|
|
1834
2045
|
documentation: J.documentation,
|
|
1835
2046
|
examples: [J.example, ...(J.additionalExamples ?? []).map(({ definition: e }) => e)],
|
|
1836
|
-
jsonSchema: B(V.
|
|
1837
|
-
schema: V.
|
|
2047
|
+
jsonSchema: B(V.map, "Map definition"),
|
|
2048
|
+
schema: V.map,
|
|
1838
2049
|
supportedFeatures: J.supportedFeatures,
|
|
1839
|
-
type: "
|
|
2050
|
+
type: "map",
|
|
1840
2051
|
version: 1
|
|
1841
|
-
}, Y = z("number"),
|
|
1842
|
-
compile:
|
|
2052
|
+
}, Y = z("number"), rn = {
|
|
2053
|
+
compile: Ft,
|
|
1843
2054
|
documentation: Y.documentation,
|
|
1844
2055
|
examples: [Y.example],
|
|
1845
2056
|
jsonSchema: B(V.number, `${Y.documentation.title} definition`),
|
|
@@ -1850,7 +2061,7 @@ var Bt = {
|
|
|
1850
2061
|
}, X = (e, t) => Object.entries(e).flatMap(([e, n]) => n === void 0 || !t[e] ? [] : [{
|
|
1851
2062
|
name: t[e],
|
|
1852
2063
|
payload: n
|
|
1853
|
-
}]),
|
|
2064
|
+
}]), an = {
|
|
1854
2065
|
"atomic-input": {
|
|
1855
2066
|
createRequests: (e) => {
|
|
1856
2067
|
let t = e.customLabel;
|
|
@@ -1870,16 +2081,16 @@ var Bt = {
|
|
|
1870
2081
|
},
|
|
1871
2082
|
schema: f,
|
|
1872
2083
|
type: "atomic-input",
|
|
1873
|
-
vSpecSchema:
|
|
2084
|
+
vSpecSchema: Ye
|
|
1874
2085
|
},
|
|
1875
2086
|
iframe: {
|
|
1876
2087
|
createRequests: (e) => [{
|
|
1877
2088
|
name: "setIframeUrl",
|
|
1878
2089
|
payload: e.url
|
|
1879
2090
|
}],
|
|
1880
|
-
schema:
|
|
2091
|
+
schema: re,
|
|
1881
2092
|
type: "iframe",
|
|
1882
|
-
vSpecSchema:
|
|
2093
|
+
vSpecSchema: ze
|
|
1883
2094
|
},
|
|
1884
2095
|
image: {
|
|
1885
2096
|
createRequests: (e) => X(e, {
|
|
@@ -1890,9 +2101,9 @@ var Bt = {
|
|
|
1890
2101
|
shadow: "setImageShadow",
|
|
1891
2102
|
source: "setImageSource"
|
|
1892
2103
|
}),
|
|
1893
|
-
schema:
|
|
2104
|
+
schema: ce,
|
|
1894
2105
|
type: "image",
|
|
1895
|
-
vSpecSchema:
|
|
2106
|
+
vSpecSchema: ot
|
|
1896
2107
|
},
|
|
1897
2108
|
shape: {
|
|
1898
2109
|
createRequests: (e) => X(e, {
|
|
@@ -1910,9 +2121,9 @@ var Bt = {
|
|
|
1910
2121
|
shape: "setShapeType",
|
|
1911
2122
|
strokeColor: "setShapeBorderColor"
|
|
1912
2123
|
}),
|
|
1913
|
-
schema:
|
|
2124
|
+
schema: Re,
|
|
1914
2125
|
type: "shape",
|
|
1915
|
-
vSpecSchema:
|
|
2126
|
+
vSpecSchema: nt
|
|
1916
2127
|
},
|
|
1917
2128
|
simpleTextObject: {
|
|
1918
2129
|
createRequests: (e) => [...e.content === void 0 ? [] : [{
|
|
@@ -1931,12 +2142,12 @@ var Bt = {
|
|
|
1931
2142
|
textColor: "setTextColor",
|
|
1932
2143
|
wordWrap: "setTextWordWrap"
|
|
1933
2144
|
})],
|
|
1934
|
-
schema:
|
|
2145
|
+
schema: de,
|
|
1935
2146
|
type: "simpleTextObject",
|
|
1936
|
-
vSpecSchema:
|
|
2147
|
+
vSpecSchema: it
|
|
1937
2148
|
}
|
|
1938
2149
|
}, Z = async (e, t) => {
|
|
1939
|
-
let n =
|
|
2150
|
+
let n = an[t], r = w(e);
|
|
1940
2151
|
if (r) return {
|
|
1941
2152
|
issues: [{
|
|
1942
2153
|
code: "invalid_structure",
|
|
@@ -1947,21 +2158,21 @@ var Bt = {
|
|
|
1947
2158
|
};
|
|
1948
2159
|
let i = n.schema.safeParse(e.definition);
|
|
1949
2160
|
if (!i.success) return {
|
|
1950
|
-
issues:
|
|
2161
|
+
issues: h(i.error, e.definition),
|
|
1951
2162
|
success: !1
|
|
1952
2163
|
};
|
|
1953
2164
|
let a = n.vSpecSchema.safeParse(e.baseVSpec);
|
|
1954
2165
|
if (!a.success) return {
|
|
1955
|
-
issues: [
|
|
2166
|
+
issues: [g("invalid_structure", ["baseVSpec"], `Base ${t} vSpec is invalid.`, { details: { issues: a.error.issues } })],
|
|
1956
2167
|
success: !1
|
|
1957
2168
|
};
|
|
1958
|
-
let o =
|
|
2169
|
+
let o = x(e, a.data), s = i.data.settings, c = await v(o, n.createRequests(s), ["settings"]);
|
|
1959
2170
|
return "issue" in c ? {
|
|
1960
2171
|
issues: [c.issue],
|
|
1961
2172
|
success: !1
|
|
1962
|
-
} :
|
|
1963
|
-
},
|
|
1964
|
-
let t =
|
|
2173
|
+
} : _(c.state, n.vSpecSchema);
|
|
2174
|
+
}, on = async (e) => {
|
|
2175
|
+
let t = w(e);
|
|
1965
2176
|
if (t) return {
|
|
1966
2177
|
issues: [{
|
|
1967
2178
|
code: "invalid_structure",
|
|
@@ -1970,37 +2181,37 @@ var Bt = {
|
|
|
1970
2181
|
}],
|
|
1971
2182
|
success: !1
|
|
1972
2183
|
};
|
|
1973
|
-
let n =
|
|
2184
|
+
let n = m.safeParse(e.definition);
|
|
1974
2185
|
if (!n.success) return {
|
|
1975
|
-
issues:
|
|
2186
|
+
issues: h(n.error, e.definition),
|
|
1976
2187
|
success: !1
|
|
1977
2188
|
};
|
|
1978
|
-
let r =
|
|
2189
|
+
let r = Ve.safeParse(e.baseVSpec);
|
|
1979
2190
|
if (!r.success) return {
|
|
1980
|
-
issues: [
|
|
2191
|
+
issues: [g("invalid_structure", ["baseVSpec"], "Base date-picker vSpec is invalid.", { details: { issues: r.error.issues } })],
|
|
1981
2192
|
success: !1
|
|
1982
2193
|
};
|
|
1983
2194
|
let i = r.data;
|
|
1984
|
-
if (!
|
|
1985
|
-
issues: [
|
|
2195
|
+
if (!S(i, ["dimensions", "measures"])) return {
|
|
2196
|
+
issues: [g("non_fresh_base_vspec", ["baseVSpec"], "Date-picker definitions require a fresh vSpec.")],
|
|
1986
2197
|
success: !1
|
|
1987
2198
|
};
|
|
1988
|
-
let a = n.data, o = [...
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
2199
|
+
let a = n.data, o = [...ae(a.data.field, e.availableFields, ["data", "field"], "dimension"), ...y(a.data.field, e.availableFields, ["data", "field"], [
|
|
2200
|
+
H.FieldType.DATE,
|
|
2201
|
+
H.FieldType.TIMESTAMP,
|
|
2202
|
+
H.FieldType.TIMESTAMP_TZ
|
|
1992
2203
|
], "a date-picker field")];
|
|
1993
2204
|
if (o.length > 0) return {
|
|
1994
2205
|
issues: o,
|
|
1995
2206
|
success: !1
|
|
1996
2207
|
};
|
|
1997
|
-
let s = await x(
|
|
2208
|
+
let s = await b(x(e, i), a.data.field, "dimension", "addDatePickerDimension", { key: a.data.field.fieldKey }, ["data", "field"]);
|
|
1998
2209
|
if ("issue" in s) return {
|
|
1999
2210
|
issues: [s.issue],
|
|
2000
2211
|
success: !1
|
|
2001
2212
|
};
|
|
2002
2213
|
let { pickerType: c, ...l } = a.settings ?? {};
|
|
2003
|
-
return s = await
|
|
2214
|
+
return s = await v(s.state, X({
|
|
2004
2215
|
pickerType: c,
|
|
2005
2216
|
...l
|
|
2006
2217
|
}, {
|
|
@@ -2015,9 +2226,9 @@ var Bt = {
|
|
|
2015
2226
|
}), ["settings"]), "issue" in s ? {
|
|
2016
2227
|
issues: [s.issue],
|
|
2017
2228
|
success: !1
|
|
2018
|
-
} :
|
|
2019
|
-
},
|
|
2020
|
-
let t =
|
|
2229
|
+
} : _(s.state, Ve);
|
|
2230
|
+
}, sn = async (e) => {
|
|
2231
|
+
let t = w(e);
|
|
2021
2232
|
if (t) return {
|
|
2022
2233
|
issues: [{
|
|
2023
2234
|
code: "invalid_structure",
|
|
@@ -2028,39 +2239,39 @@ var Bt = {
|
|
|
2028
2239
|
};
|
|
2029
2240
|
let n = l.safeParse(e.definition);
|
|
2030
2241
|
if (!n.success) return {
|
|
2031
|
-
issues:
|
|
2242
|
+
issues: h(n.error, e.definition),
|
|
2032
2243
|
success: !1
|
|
2033
2244
|
};
|
|
2034
|
-
let r =
|
|
2245
|
+
let r = Ze.safeParse(e.baseVSpec);
|
|
2035
2246
|
if (!r.success) return {
|
|
2036
|
-
issues: [
|
|
2247
|
+
issues: [g("invalid_structure", ["baseVSpec"], "Base slider vSpec is invalid.", { details: { issues: r.error.issues } })],
|
|
2037
2248
|
success: !1
|
|
2038
2249
|
};
|
|
2039
2250
|
let i = r.data;
|
|
2040
|
-
if (!
|
|
2041
|
-
issues: [
|
|
2251
|
+
if (!S(i, ["dimensions", "measures"])) return {
|
|
2252
|
+
issues: [g("non_fresh_base_vspec", ["baseVSpec"], "Slider definitions require a fresh vSpec.")],
|
|
2042
2253
|
success: !1
|
|
2043
2254
|
};
|
|
2044
|
-
let a = n.data, o = [...
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2255
|
+
let a = n.data, o = [...ae(a.data.field, e.availableFields, ["data", "field"], "dimension"), ...y(a.data.field, e.availableFields, ["data", "field"], [
|
|
2256
|
+
H.FieldType.DATE,
|
|
2257
|
+
H.FieldType.DECIMAL,
|
|
2258
|
+
H.FieldType.FLOAT,
|
|
2259
|
+
H.FieldType.INT,
|
|
2260
|
+
H.FieldType.REAL,
|
|
2261
|
+
H.FieldType.TIMESTAMP,
|
|
2262
|
+
H.FieldType.TIMESTAMP_TZ
|
|
2052
2263
|
], "a slider field")];
|
|
2053
2264
|
if (o.length > 0) return {
|
|
2054
2265
|
issues: o,
|
|
2055
2266
|
success: !1
|
|
2056
2267
|
};
|
|
2057
|
-
let s = await x(
|
|
2268
|
+
let s = await b(x(e, i), a.data.field, "dimension", "addSliderDimension", { key: a.data.field.fieldKey }, ["data", "field"]);
|
|
2058
2269
|
if ("issue" in s) return {
|
|
2059
2270
|
issues: [s.issue],
|
|
2060
2271
|
success: !1
|
|
2061
2272
|
};
|
|
2062
2273
|
let c = a.settings ?? {};
|
|
2063
|
-
return s = await
|
|
2274
|
+
return s = await v(s.state, [...c.range === void 0 ? [] : [{
|
|
2064
2275
|
name: "setSliderManualRangeEnabled",
|
|
2065
2276
|
payload: !0
|
|
2066
2277
|
}], ...X(c, {
|
|
@@ -2071,7 +2282,7 @@ var Bt = {
|
|
|
2071
2282
|
})], ["settings"]), "issue" in s ? {
|
|
2072
2283
|
issues: [s.issue],
|
|
2073
2284
|
success: !1
|
|
2074
|
-
} :
|
|
2285
|
+
} : _(s.state, Ze);
|
|
2075
2286
|
}, Q = (e) => {
|
|
2076
2287
|
let t = z(e.type);
|
|
2077
2288
|
return {
|
|
@@ -2084,9 +2295,9 @@ var Bt = {
|
|
|
2084
2295
|
type: e.type,
|
|
2085
2296
|
version: 1
|
|
2086
2297
|
};
|
|
2087
|
-
},
|
|
2298
|
+
}, cn = [
|
|
2088
2299
|
Q({
|
|
2089
|
-
compile:
|
|
2300
|
+
compile: on,
|
|
2090
2301
|
schema: V["date-picker"],
|
|
2091
2302
|
type: "date-picker"
|
|
2092
2303
|
}),
|
|
@@ -2116,12 +2327,12 @@ var Bt = {
|
|
|
2116
2327
|
type: "atomic-input"
|
|
2117
2328
|
}),
|
|
2118
2329
|
Q({
|
|
2119
|
-
compile:
|
|
2330
|
+
compile: sn,
|
|
2120
2331
|
schema: V.slider,
|
|
2121
2332
|
type: "slider"
|
|
2122
2333
|
})
|
|
2123
|
-
], $ = z("table"),
|
|
2124
|
-
compile:
|
|
2334
|
+
], $ = z("table"), ln = {
|
|
2335
|
+
compile: Lt,
|
|
2125
2336
|
documentation: $.documentation,
|
|
2126
2337
|
examples: [$.example, ...($.additionalExamples ?? []).map(({ definition: e }) => e)],
|
|
2127
2338
|
jsonSchema: B(V.table, `${$.documentation.title} definition`),
|
|
@@ -2129,24 +2340,25 @@ var Bt = {
|
|
|
2129
2340
|
supportedFeatures: $.supportedFeatures,
|
|
2130
2341
|
type: "table",
|
|
2131
2342
|
version: 1
|
|
2132
|
-
},
|
|
2133
|
-
zt,
|
|
2134
|
-
Rt,
|
|
2135
|
-
...Gt,
|
|
2136
|
-
...Qt,
|
|
2343
|
+
}, un = (e, t) => `${t}:${e}`, dn = [
|
|
2137
2344
|
qt,
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2345
|
+
Kt,
|
|
2346
|
+
...$t,
|
|
2347
|
+
...cn,
|
|
2348
|
+
tn,
|
|
2349
|
+
nn,
|
|
2350
|
+
ln,
|
|
2351
|
+
rn,
|
|
2352
|
+
en
|
|
2353
|
+
], fn = new Map(dn.map((e) => [un(e.type, e.version), e])), pn = (e, t = 1) => fn.get(un(e, t)), mn = () => [...fn.values()].map(({ documentation: e, examples: t, jsonSchema: n, supportedFeatures: r, type: i, version: a }) => ({
|
|
2142
2354
|
documentation: e,
|
|
2143
2355
|
examples: t,
|
|
2144
2356
|
jsonSchema: n,
|
|
2145
2357
|
supportedFeatures: r,
|
|
2146
2358
|
type: i,
|
|
2147
2359
|
version: a
|
|
2148
|
-
})),
|
|
2149
|
-
let t =
|
|
2360
|
+
})), hn = async (e) => {
|
|
2361
|
+
let t = w(e);
|
|
2150
2362
|
if (t) return {
|
|
2151
2363
|
issues: [{
|
|
2152
2364
|
code: "invalid_structure",
|
|
@@ -2155,14 +2367,14 @@ var Bt = {
|
|
|
2155
2367
|
}],
|
|
2156
2368
|
success: !1
|
|
2157
2369
|
};
|
|
2158
|
-
let n =
|
|
2370
|
+
let n = kt(e.definition);
|
|
2159
2371
|
if (n) return {
|
|
2160
2372
|
issues: [n],
|
|
2161
2373
|
success: !1
|
|
2162
2374
|
};
|
|
2163
|
-
let r = e.definition, i =
|
|
2375
|
+
let r = e.definition, i = pn(r.type, r.version), a = E.array(Pe).safeParse(e.availableFields);
|
|
2164
2376
|
if (!a.success) return {
|
|
2165
|
-
issues:
|
|
2377
|
+
issues: h(a.error, e.availableFields, ["availableFields"]),
|
|
2166
2378
|
success: !1
|
|
2167
2379
|
};
|
|
2168
2380
|
let o = /* @__PURE__ */ new Map(), s = a.data.flatMap((e, t) => {
|
|
@@ -2182,14 +2394,14 @@ var Bt = {
|
|
|
2182
2394
|
issues: s,
|
|
2183
2395
|
success: !1
|
|
2184
2396
|
};
|
|
2185
|
-
let c =
|
|
2397
|
+
let c = ie(a.data), l = E.array(Xe).safeParse(c);
|
|
2186
2398
|
if (!l.success) return {
|
|
2187
|
-
issues:
|
|
2399
|
+
issues: h(l.error, c, ["availableFields"]),
|
|
2188
2400
|
success: !1
|
|
2189
2401
|
};
|
|
2190
2402
|
if (!i) return {
|
|
2191
2403
|
issues: [{
|
|
2192
|
-
allowedValues:
|
|
2404
|
+
allowedValues: Ot(),
|
|
2193
2405
|
code: "unsupported_visualization",
|
|
2194
2406
|
message: "Visualization definition descriptor is not available.",
|
|
2195
2407
|
path: ["type"]
|
|
@@ -2201,10 +2413,10 @@ var Bt = {
|
|
|
2201
2413
|
availableFields: a.data
|
|
2202
2414
|
});
|
|
2203
2415
|
if (!u.success) return u;
|
|
2204
|
-
let d =
|
|
2416
|
+
let d = Gt(r, a.data);
|
|
2205
2417
|
return d.length > 0 ? {
|
|
2206
2418
|
...u,
|
|
2207
2419
|
warnings: d
|
|
2208
2420
|
} : u;
|
|
2209
2421
|
};
|
|
2210
|
-
export {
|
|
2422
|
+
export { At as i, pn as n, mn as r, hn as t };
|