@astrato-io/visualizations 0.6.5 → 0.8.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 +8 -2
- package/THIRD_PARTY_NOTICES.md +2 -229
- package/VISUALIZATION_DEFINITIONS.md +68 -114
- package/chunks/Button-BrGKp9Nm.js +110 -0
- package/chunks/DefaultPropsProvider-BsfB7QTn.js +257 -0
- package/chunks/FieldTypeIcon-Drs6hSJF.js +22 -0
- package/chunks/{LinearProgress-B1FeWaen.js → LinearProgress-VtfFx2vJ.js} +55 -55
- package/chunks/MenuOption-ByRqhRdX.js +3934 -0
- package/chunks/Title-CO5dP1ma.js +1691 -0
- package/chunks/ToggleButton-KOBAimC1.js +112 -0
- package/chunks/{app-filter-bar.compiler-BGJ7HAbr.js → app-filter-bar.compiler-TwVTeoj5.js} +10 -10
- package/chunks/{bar.compiler-CT0ZbQKc.js → bar.compiler-DuQg8EUb.js} +84 -84
- package/chunks/builder-DEDvNq1k.js +201 -0
- package/chunks/{color-settings-ZIvgNTq1.js → color-rules-CN7TcGrC.js} +2 -6
- package/chunks/color-settings-3VRlf_Vw.js +6 -0
- package/chunks/colorManipulator-D8Pjy1pf.js +45 -0
- package/chunks/coloring-CncX_JRX.js +278 -0
- package/chunks/{definitions-D3OVqmXl.js → definitions-BPJQTx16.js} +490 -382
- package/chunks/{escobar-eDjtGpkC.js → escobar-DRhRMYRE.js} +6067 -4742
- package/chunks/event-bus-CrLB-Y8z.js +3 -0
- package/chunks/extend-preset-CUFNpmPe.js +4398 -0
- package/chunks/{filter.compiler-DBsyRBJt.js → filter.compiler-w27dlv0C.js} +12 -12
- package/chunks/{filtering-tqjAyJH5.js → filtering-cc7WqWpg.js} +391 -310
- package/chunks/{handlers-VTBfIZYZ.js → handlers-TOT-7INo.js} +3241 -3442
- package/chunks/icon-picker-styles-CoJmwTRi.js +2246 -0
- package/chunks/isEqual-B8loyPsC.js +12 -0
- package/chunks/label-format-type-weq1XfcX.js +8 -0
- package/chunks/{line.compiler-CzdM5Ld0.js → line.compiler-Ct1WhN2p.js} +27 -27
- package/chunks/logger-DpQtYQnX.js +1163 -0
- package/chunks/lookup-BWllin0q.js +36 -0
- package/chunks/{metadata-BGElBy5Z.js → metadata-WABZrt7Y.js} +1 -1
- package/chunks/{number.compiler-G-R7y16P.js → number.compiler-D8TPly-4.js} +13 -13
- package/chunks/{operations-CTNUX6Sy.js → operations-Dh4v1Ovt.js} +9314 -9283
- package/chunks/{range-CiwTbMig.js → range-Bi-7zT0k.js} +2 -2
- package/chunks/render-wrappers-OEmtaM8g.js +2 -0
- package/chunks/{registry-CsQQzukD.js → requirements-Dvd8jqYF.js} +218 -222
- package/chunks/responsive.styles-DSiOGD7u.js +82 -0
- package/chunks/{shared-CBvcC5YV.js → shared-Bn4N5QcZ.js} +424 -424
- package/chunks/src-77e3mC7i.js +391 -0
- package/chunks/standalone-B55oyW6c.js +689 -0
- package/chunks/{standalone-C3gg736V.js → standalone-BDhPQtzQ.js} +375 -341
- package/chunks/{standalone-BMIbT1b2.js → standalone-BGkmozIb.js} +992 -837
- package/chunks/standalone-BMTCb10X.js +179 -0
- package/chunks/standalone-BXKRE_Se.js +468 -0
- package/chunks/standalone-Bes8srx1.js +354 -0
- package/chunks/standalone-BjZp0QMe.js +2 -0
- package/chunks/{standalone-JuLF-OoH.js → standalone-BlMIwpEe.js} +634 -519
- package/chunks/{standalone-C_rYnZ0N.js → standalone-C8ZAEutO.js} +43 -42
- package/chunks/standalone-C8qAelL4.js +2 -0
- package/chunks/standalone-CJvIXsQE.js +743 -0
- package/chunks/standalone-CLmGb7nn2.js +355 -0
- package/chunks/standalone-CM5XcAN5.js +52327 -0
- package/chunks/standalone-CXNP6-xD.js +420 -0
- package/chunks/{standalone-vzBY6q0I2.js → standalone-D5Q5ngsD.js} +57 -55
- package/chunks/standalone-DLlyRIE6.js +287 -0
- package/chunks/standalone-DMcI1afI.js +396 -0
- package/chunks/{standalone-DC-aUgXC.js → standalone-DN4S1MjT.js} +1111 -1092
- package/chunks/standalone-DT0wKji7.js +6 -0
- package/chunks/standalone-DW6NT205.js +518 -0
- package/chunks/standalone-DYQIQH4c.js +2095 -0
- package/chunks/standalone-D__XCp-h.js +1003 -0
- package/chunks/standalone-XTgSsTAa.js +354 -0
- package/chunks/{standalone-v1oxfU20.js → standalone-XuGksArp.js} +20 -20
- package/chunks/{standalone-0M4HlmDW2.js → standalone-vBnBS2YC.js} +1047 -964
- package/chunks/{standalone-BtSHCp2U2.js → standalone-we5D5MIn.js} +173 -168
- package/chunks/{table.compiler-tb914oj3.js → table.compiler-DMeeHxb6.js} +29 -29
- package/chunks/useFieldName-Cjn9KCVp.js +7 -0
- package/chunks/useSlotProps-DLbQp4lc.js +166 -0
- package/chunks/{utils-Bg7K-t6K.js → utils-vdmi_2PK.js} +6271 -7804
- package/chunks/{view-Bn83C8d9.js → view-BuwQugKb.js} +2717 -3504
- package/chunks/{isEqual-BDxAhUo8.js → visualization-filters-Cc4KU-l-.js} +1887 -1946
- package/chunks/with-html-element-D0uY2zjI.js +7328 -0
- package/definitions.js +2 -2
- package/docs/operations/astrato-app-filter-bar.md +1 -1
- package/docs/operations/bar.md +31 -14
- package/docs/operations/combo.md +1 -1
- package/docs/operations/date-picker.md +3 -3
- package/docs/operations/distribution-gauge.md +13 -13
- package/docs/operations/dot.md +13 -13
- package/docs/operations/filter.md +1 -1
- package/docs/operations/gauge.md +13 -13
- package/docs/operations/heatMap.md +13 -13
- package/docs/operations/histogram.md +1 -1
- package/docs/operations/iframe.md +1 -1
- package/docs/operations/image.md +1 -1
- package/docs/operations/index.md +3 -3
- package/docs/operations/line.md +7 -7
- package/docs/operations/number.md +1 -1
- package/docs/operations/pie.md +13 -13
- package/docs/operations/radar.md +7 -7
- package/docs/operations/sankey.md +13 -13
- package/docs/operations/scatter.md +13 -13
- package/docs/operations/shape.md +1 -1
- package/docs/operations/simpleTextObject.md +1 -1
- package/docs/operations/slider.md +1 -1
- package/docs/operations/table.md +18 -1
- package/docs/operations/tree.md +51 -37
- package/docs/operations/treemap.md +63 -49
- package/docs/operations/waterfall.md +1 -1
- package/docs/operations/word-cloud.md +13 -13
- package/getters.js +7 -7
- package/index.js +419 -417
- package/metadata.js +17 -18
- package/operations.js +13 -13
- package/package.json +70 -55
- package/src/definitions/index.d.ts +1 -1
- package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +53 -30
- package/src/definitions/model/definitions/index.d.ts +1 -1
- package/src/definitions/model/definitions/schema-registry.d.ts +2 -2
- package/src/definitions/model/definitions/schemas/object.schema.d.ts +2 -2
- package/src/definitions/model/definitions/types/compilation.types.d.ts +10 -0
- package/src/definitions/model/definitions/types/index.d.ts +1 -1
- package/src/getters/index.d.ts +1 -1
- package/src/operations/index.d.ts +1 -1
- package/src/types.d.ts +1 -0
- package/chunks/ClickAwayListener-BbeNMAvj.js +0 -52
- package/chunks/builder-B6dWSIdD.js +0 -12289
- package/chunks/coloring-B1XAfg6b.js +0 -664
- package/chunks/events-WZut5Ow6.js +0 -4
- package/chunks/grouping-type-On4s9Thj.js +0 -3
- package/chunks/requirements-DYjZCFyf.js +0 -6
- package/chunks/standalone-0ashe9w1.js +0 -411
- package/chunks/standalone-B7jax8wa.js +0 -339
- package/chunks/standalone-BK0VYU-l.js +0 -463
- package/chunks/standalone-BZV5vOwA.js +0 -6
- package/chunks/standalone-BhDrWj4p.js +0 -1980
- package/chunks/standalone-BvaKdky9.js +0 -344
- package/chunks/standalone-BwtM31-f.js +0 -2
- package/chunks/standalone-CC1VUjO32.js +0 -299
- package/chunks/standalone-CoLrAxRV.js +0 -13198
- package/chunks/standalone-DCtRoTWg.js +0 -675
- package/chunks/standalone-DUDFTBqL.js +0 -833
- package/chunks/standalone-DhZkX9Td.js +0 -2
- package/chunks/standalone-DtLElfuM.js +0 -512
- package/chunks/standalone-G9Q4Uczu.js +0 -726
- package/chunks/standalone-_DeX21JJ.js +0 -383
- package/chunks/standalone-gFhKZh8m.js +0 -179
- package/chunks/standalone-tDNy-SFH.js +0 -281
- package/chunks/ui-DQWtv2iM.js +0 -63551
- package/chunks/useFieldName-BvdcoJRl.js +0 -7
|
@@ -1,252 +1,252 @@
|
|
|
1
|
-
import { Mo as e,
|
|
2
|
-
import {
|
|
3
|
-
import { T as
|
|
4
|
-
import { z as
|
|
5
|
-
var
|
|
6
|
-
orientation:
|
|
7
|
-
selectionMode:
|
|
1
|
+
import { Mo as e, Oo as t, Ro as n, Xa as r, Za as i, jo as a, r as o, vc as s, xo as c, zo as l } from "./visualization-filters-Cc4KU-l-.js";
|
|
2
|
+
import { Bp as u, Em as d, Kd as ee, Nm as te, Pf as f, Qp as p, Rd as m, Sf as ne, Ud as h, Vd as g, Wd as re, Xf as ie, Yf as ae, Zf as oe, _m as se, am as ce, bm as le, cf as _, cm as ue, cp as de, km as fe, lp as pe, nm as me, qd as he, sp as ge, tp as _e } from "./handlers-TOT-7INo.js";
|
|
3
|
+
import { T as ve, d as ye, t as be, y as v } from "./operations-Dh4v1Ovt.js";
|
|
4
|
+
import { z as y } from "zod";
|
|
5
|
+
var b = s(), xe = y.object({
|
|
6
|
+
orientation: y.enum(["horizontal", "vertical"]).optional(),
|
|
7
|
+
selectionMode: y.enum([
|
|
8
8
|
"inherit",
|
|
9
9
|
"auto",
|
|
10
10
|
"manual"
|
|
11
11
|
]).optional(),
|
|
12
|
-
enableAddingNewFilters:
|
|
13
|
-
enableAssociativeFilter:
|
|
14
|
-
showClearAll:
|
|
15
|
-
showChartBreakdown:
|
|
16
|
-
selectableFieldKeys:
|
|
17
|
-
}).strict(),
|
|
18
|
-
settings:
|
|
19
|
-
type:
|
|
20
|
-
version:
|
|
21
|
-
}).strict(),
|
|
22
|
-
distinct:
|
|
23
|
-
name:
|
|
24
|
-
resultType:
|
|
25
|
-
}).strict(),
|
|
26
|
-
aggregations:
|
|
27
|
-
dataType:
|
|
28
|
-
fieldKey:
|
|
29
|
-
isManualData:
|
|
30
|
-
kind:
|
|
31
|
-
name:
|
|
32
|
-
view:
|
|
33
|
-
}).strict(),
|
|
34
|
-
description:
|
|
35
|
-
id:
|
|
36
|
-
key:
|
|
37
|
-
name:
|
|
38
|
-
views:
|
|
39
|
-
}).passthrough(),
|
|
40
|
-
dimension:
|
|
41
|
-
type:
|
|
42
|
-
}),
|
|
43
|
-
measure:
|
|
44
|
-
type:
|
|
45
|
-
}),
|
|
46
|
-
calculation:
|
|
47
|
-
type:
|
|
48
|
-
}),
|
|
49
|
-
fieldKey:
|
|
50
|
-
item: Ee,
|
|
51
|
-
kind: b.literal("dimension"),
|
|
52
|
-
name: b.string().min(1)
|
|
53
|
-
}).strict(), Ae = b.object({
|
|
54
|
-
fieldKey: w,
|
|
12
|
+
enableAddingNewFilters: y.boolean().optional(),
|
|
13
|
+
enableAssociativeFilter: y.boolean().optional(),
|
|
14
|
+
showClearAll: y.boolean().optional(),
|
|
15
|
+
showChartBreakdown: y.boolean().optional(),
|
|
16
|
+
selectableFieldKeys: y.array(y.string()).optional()
|
|
17
|
+
}).strict(), Se = y.object({
|
|
18
|
+
settings: xe.optional(),
|
|
19
|
+
type: y.literal("astrato-app-filter-bar"),
|
|
20
|
+
version: y.literal(1)
|
|
21
|
+
}).strict(), x = (e) => e, S = y.string().trim().min(1).max(100), C = y.string().min(1).refine((e) => e.trim().length > 0, "Field key cannot be blank."), Ce = x(le.shape.dataType), we = x(se.shape.formatType), Te = y.object({
|
|
22
|
+
distinct: y.boolean().optional(),
|
|
23
|
+
name: y.string().trim().min(1),
|
|
24
|
+
resultType: y.string().optional()
|
|
25
|
+
}).strict(), Ee = y.object({
|
|
26
|
+
aggregations: y.array(Te).default([]),
|
|
27
|
+
dataType: Ce,
|
|
28
|
+
fieldKey: C,
|
|
29
|
+
isManualData: y.boolean().optional(),
|
|
30
|
+
kind: y.literal("field").default("field"),
|
|
31
|
+
name: y.string().min(1),
|
|
32
|
+
view: y.string().min(1)
|
|
33
|
+
}).strict(), w = y.object({
|
|
34
|
+
description: y.string().optional(),
|
|
35
|
+
id: y.string().min(1).optional(),
|
|
36
|
+
key: C,
|
|
37
|
+
name: y.string().min(1),
|
|
38
|
+
views: y.array(y.string()).optional()
|
|
39
|
+
}).passthrough(), De = w.extend({
|
|
40
|
+
dimension: y.record(y.string(), y.unknown()),
|
|
41
|
+
type: y.literal("dimension")
|
|
42
|
+
}), Oe = w.extend({
|
|
43
|
+
measure: y.object({ aggregation: y.string().min(1) }).passthrough(),
|
|
44
|
+
type: y.literal("measure")
|
|
45
|
+
}), ke = w.extend({
|
|
46
|
+
calculation: y.record(y.string(), y.unknown()),
|
|
47
|
+
type: y.literal("calculation")
|
|
48
|
+
}), Ae = y.object({
|
|
49
|
+
fieldKey: C,
|
|
55
50
|
item: De,
|
|
56
|
-
kind:
|
|
57
|
-
name:
|
|
58
|
-
}).strict(), je =
|
|
59
|
-
fieldKey:
|
|
51
|
+
kind: y.literal("dimension"),
|
|
52
|
+
name: y.string().min(1)
|
|
53
|
+
}).strict(), je = y.object({
|
|
54
|
+
fieldKey: C,
|
|
60
55
|
item: Oe,
|
|
61
|
-
kind:
|
|
62
|
-
name:
|
|
63
|
-
}).strict(),
|
|
64
|
-
|
|
65
|
-
ke,
|
|
56
|
+
kind: y.literal("measure"),
|
|
57
|
+
name: y.string().min(1)
|
|
58
|
+
}).strict(), Me = y.object({
|
|
59
|
+
fieldKey: C,
|
|
60
|
+
item: ke,
|
|
61
|
+
kind: y.literal("calculation"),
|
|
62
|
+
name: y.string().min(1)
|
|
63
|
+
}).strict(), T = y.union([
|
|
64
|
+
Ee,
|
|
66
65
|
Ae,
|
|
67
|
-
je
|
|
66
|
+
je,
|
|
67
|
+
Me
|
|
68
68
|
]).superRefine((e, t) => {
|
|
69
69
|
e.kind !== "field" && e.item.key !== e.fieldKey && t.addIssue({
|
|
70
70
|
code: "custom",
|
|
71
71
|
message: "Semantic item key must match fieldKey.",
|
|
72
72
|
path: ["item", "key"]
|
|
73
73
|
});
|
|
74
|
-
}),
|
|
75
|
-
currency:
|
|
76
|
-
currencyIsPrefix:
|
|
77
|
-
formatString:
|
|
78
|
-
formatType:
|
|
79
|
-
negativeType:
|
|
80
|
-
}).strict(),
|
|
81
|
-
dateLevel:
|
|
82
|
-
mode:
|
|
83
|
-
}).strict(),
|
|
84
|
-
datePart:
|
|
85
|
-
mode:
|
|
86
|
-
}).strict()]),
|
|
87
|
-
fieldKey:
|
|
88
|
-
format:
|
|
74
|
+
}), Ne = y.object({
|
|
75
|
+
currency: y.string().min(1).optional(),
|
|
76
|
+
currencyIsPrefix: y.boolean().optional(),
|
|
77
|
+
formatString: y.string().optional(),
|
|
78
|
+
formatType: we.optional(),
|
|
79
|
+
negativeType: x(se.shape.negativeType.unwrap()).optional()
|
|
80
|
+
}).strict(), Pe = y.discriminatedUnion("mode", [y.object({
|
|
81
|
+
dateLevel: x(y.enum(b.DateLevel)).describe("Year-aware bucket, such as month over time."),
|
|
82
|
+
mode: y.literal("level")
|
|
83
|
+
}).strict(), y.object({
|
|
84
|
+
datePart: x(y.enum(b.DatePart)).describe("Date part, such as month of year."),
|
|
85
|
+
mode: y.literal("part")
|
|
86
|
+
}).strict()]), E = y.object({
|
|
87
|
+
fieldKey: C,
|
|
88
|
+
format: Ne.pick({
|
|
89
89
|
formatString: !0,
|
|
90
90
|
formatType: !0
|
|
91
91
|
}).optional(),
|
|
92
|
-
ref:
|
|
93
|
-
showNullValues:
|
|
94
|
-
temporalGrouping:
|
|
95
|
-
}).strict(),
|
|
96
|
-
placements:
|
|
97
|
-
visible:
|
|
98
|
-
}).strict(),
|
|
99
|
-
aggregation:
|
|
100
|
-
dataLabels:
|
|
101
|
-
fieldKey:
|
|
102
|
-
format:
|
|
103
|
-
ref:
|
|
104
|
-
}).strict(),
|
|
105
|
-
fieldKey:
|
|
106
|
-
operator:
|
|
107
|
-
value:
|
|
108
|
-
}).strict(),
|
|
109
|
-
fieldKey:
|
|
110
|
-
operator:
|
|
111
|
-
valueFrom:
|
|
112
|
-
valueTo:
|
|
113
|
-
}).strict(),
|
|
114
|
-
fieldKey:
|
|
115
|
-
operator:
|
|
116
|
-
values:
|
|
117
|
-
}).strict(),
|
|
118
|
-
fieldKey:
|
|
119
|
-
operator:
|
|
120
|
-
}).strict(),
|
|
121
|
-
Fe,
|
|
92
|
+
ref: S,
|
|
93
|
+
showNullValues: y.boolean().optional(),
|
|
94
|
+
temporalGrouping: Pe.describe("Groups a date dimension. Applied before format; format must then suit the grouping.").optional()
|
|
95
|
+
}).strict(), Fe = y.object({
|
|
96
|
+
placements: y.array(x(y.enum(fe))).min(1).optional(),
|
|
97
|
+
visible: y.boolean()
|
|
98
|
+
}).strict(), D = y.object({
|
|
99
|
+
aggregation: y.string().trim().min(1).describe("Required for a raw field measure; omit for a predefined measure or calculation.").optional(),
|
|
100
|
+
dataLabels: Fe.optional(),
|
|
101
|
+
fieldKey: C,
|
|
102
|
+
format: Ne.optional(),
|
|
103
|
+
ref: S
|
|
104
|
+
}).strict(), Ie = y.object({
|
|
105
|
+
fieldKey: C,
|
|
106
|
+
operator: x(y.enum(_e)),
|
|
107
|
+
value: y.string()
|
|
108
|
+
}).strict(), Le = y.object({
|
|
109
|
+
fieldKey: C,
|
|
110
|
+
operator: x(y.enum(oe)),
|
|
111
|
+
valueFrom: y.string(),
|
|
112
|
+
valueTo: y.string()
|
|
113
|
+
}).strict(), Re = y.object({
|
|
114
|
+
fieldKey: C,
|
|
115
|
+
operator: x(y.enum(ae)),
|
|
116
|
+
values: y.array(y.string()).min(1)
|
|
117
|
+
}).strict(), ze = y.object({
|
|
118
|
+
fieldKey: C,
|
|
119
|
+
operator: x(y.enum(ie))
|
|
120
|
+
}).strict(), Be = y.union([
|
|
122
121
|
Ie,
|
|
123
122
|
Le,
|
|
124
|
-
Re
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
...
|
|
123
|
+
Re,
|
|
124
|
+
ze
|
|
125
|
+
]), O = y.lazy(() => y.object({
|
|
126
|
+
filters: y.array(y.union([Be, O])),
|
|
127
|
+
operator: y.enum(["and", "or"])
|
|
128
|
+
}).strict()), k = y.object({
|
|
129
|
+
by: S,
|
|
130
|
+
direction: x(p.shape.sortDirection),
|
|
131
|
+
enabled: y.boolean().optional()
|
|
132
|
+
}).strict(), Ve = y.object({
|
|
133
|
+
by: S,
|
|
134
|
+
count: y.number().int().positive(),
|
|
135
|
+
direction: x(p.shape.sortDirection),
|
|
136
|
+
showOthers: y.boolean().optional()
|
|
137
|
+
}).strict(), He = y.object({
|
|
138
|
+
queryLimit: y.number().int().positive().optional(),
|
|
139
|
+
topN: Ve.optional()
|
|
140
|
+
}).strict(), Ue = y.object({
|
|
141
|
+
position: x(ue.shape.position).optional(),
|
|
142
|
+
title: y.string().optional(),
|
|
143
|
+
visible: y.boolean().optional()
|
|
144
|
+
}).strict(), A = y.object({
|
|
145
|
+
labelsVisible: y.boolean().optional(),
|
|
146
|
+
lineVisible: y.boolean().optional(),
|
|
147
|
+
ticksVisible: y.boolean().optional(),
|
|
148
|
+
title: y.string().optional(),
|
|
149
|
+
titleVisible: y.boolean().optional()
|
|
150
|
+
}).strict(), We = y.union([y.object({
|
|
151
|
+
max: y.number().optional(),
|
|
152
|
+
min: y.number().optional().describe("Must be less than max when both are set")
|
|
153
|
+
}).strict(), y.object({ startsAtZero: y.boolean() }).strict()]).describe("Fix min, max or both, or set startsAtZero on an axis fitted to the data"), Ge = y.array(u).optional().describe("Shaded ranges drawn across the plot between two primary measure axis values"), Ke = ge({}), qe = ge({ dimension: S.describe(`Alias of a dimension in data.dimensions. ${pe}`) }), Je = de({ measure: S.describe("Alias of the measure in data.measures whose value is compared") }), Ye = "Colors bound to dimension values, eg. \"Happy\" is dark teal. The first matching entry wins, ahead of rules and the palette. For ordered bands, add one entry per band with colors taken along a ramp.", Xe = y.array(Je).min(1).describe("Colors bound to measure thresholds, eg. red when sales is below 100. The first matching rule wins."), j = (e) => y.object({
|
|
154
|
+
overwrites: y.array(e.requiresOverwriteDimension ? qe : Ke).min(1).describe(Ye).optional(),
|
|
155
|
+
...e.rules ? { rules: Xe.optional() } : {}
|
|
156
|
+
}).strict(), M = {
|
|
157
|
+
inverted: y.boolean().optional().describe("Reverse the direction of the axis values, eg. to put rank 1 at the top"),
|
|
158
|
+
range: We.optional()
|
|
159
|
+
}, N = { bands: Ge }, Ze = { scale: x(y.enum(te)).optional() };
|
|
160
|
+
A.extend({
|
|
161
|
+
...M,
|
|
162
|
+
...N,
|
|
163
163
|
...Ze
|
|
164
164
|
}).strict();
|
|
165
165
|
var P = ({ logScale: e = !1, primaryMeasureBands: t = !1, rangedMeasureAxes: n = [] } = {}) => {
|
|
166
|
-
let r = (t, r) =>
|
|
167
|
-
...n.includes(t) ?
|
|
168
|
-
...r ?
|
|
166
|
+
let r = (t, r) => A.extend({
|
|
167
|
+
...n.includes(t) ? M : {},
|
|
168
|
+
...r ? N : {},
|
|
169
169
|
...e ? Ze : {}
|
|
170
170
|
}).strict();
|
|
171
|
-
return
|
|
172
|
-
dimension:
|
|
171
|
+
return y.object({
|
|
172
|
+
dimension: A.optional(),
|
|
173
173
|
primaryMeasure: r("primaryMeasure", t).optional(),
|
|
174
174
|
secondaryMeasure: r("secondaryMeasure", !1).optional()
|
|
175
175
|
}).strict();
|
|
176
176
|
};
|
|
177
177
|
P();
|
|
178
|
-
var Qe =
|
|
178
|
+
var Qe = y.object({
|
|
179
179
|
axes: P({
|
|
180
180
|
logScale: !0,
|
|
181
181
|
primaryMeasureBands: !0,
|
|
182
182
|
rangedMeasureAxes: ["primaryMeasure", "secondaryMeasure"]
|
|
183
183
|
}).optional(),
|
|
184
|
-
legend:
|
|
185
|
-
orientation:
|
|
186
|
-
}).strict(), $e =
|
|
187
|
-
data:
|
|
188
|
-
dimensions:
|
|
189
|
-
measures:
|
|
184
|
+
legend: Ue.optional(),
|
|
185
|
+
orientation: x(y.enum(i)).optional()
|
|
186
|
+
}).strict(), $e = D.extend({ axis: y.enum(["primary", "secondary"]).optional() }), et = y.object({
|
|
187
|
+
data: y.object({
|
|
188
|
+
dimensions: y.array(E).min(1),
|
|
189
|
+
measures: y.array($e).min(1)
|
|
190
190
|
}).strict(),
|
|
191
|
-
filterGroup:
|
|
192
|
-
limiting:
|
|
193
|
-
presentation: Qe.extend({ coloring:
|
|
194
|
-
sorting:
|
|
195
|
-
type:
|
|
196
|
-
version:
|
|
197
|
-
}).strict(), tt =
|
|
198
|
-
let
|
|
199
|
-
if (
|
|
200
|
-
let e = nt(
|
|
201
|
-
|
|
191
|
+
filterGroup: O.optional(),
|
|
192
|
+
limiting: He.optional(),
|
|
193
|
+
presentation: Qe.extend({ coloring: j({ rules: !0 }).optional() }).optional(),
|
|
194
|
+
sorting: y.array(k).optional(),
|
|
195
|
+
type: y.literal("bar"),
|
|
196
|
+
version: y.literal(1)
|
|
197
|
+
}).strict(), tt = y.object({ visible: y.boolean() }).strict(), nt = (e, t) => y.array(e).min(t.min).max(t.max), F = (e, t) => {
|
|
198
|
+
let n = {};
|
|
199
|
+
if (t.dimensions.max > 0) {
|
|
200
|
+
let e = nt(E, t.dimensions);
|
|
201
|
+
n.dimensions = t.dimensions.min === 0 ? e.optional() : e;
|
|
202
202
|
}
|
|
203
|
-
if (
|
|
204
|
-
let e =
|
|
203
|
+
if (t.measures.max > 0) {
|
|
204
|
+
let e = t.dataLabels ? D.omit({ dataLabels: !0 }).extend({ dataLabels: tt.optional() }) : D.omit({ dataLabels: !0 }), r = t.comboSeriesTypes ? e.extend({ seriesType: y.enum([
|
|
205
205
|
"bar",
|
|
206
206
|
"line",
|
|
207
207
|
"point"
|
|
208
|
-
]).optional() }) : e, i = nt(
|
|
209
|
-
|
|
208
|
+
]).optional() }) : e, i = nt(t.measureAxis ? r.extend({ axis: y.enum(["primary", "secondary"]).optional() }) : r, t.measures);
|
|
209
|
+
n.measures = t.measures.min === 0 ? i.optional() : i;
|
|
210
210
|
}
|
|
211
|
-
let
|
|
212
|
-
if (
|
|
211
|
+
let r = {};
|
|
212
|
+
if (t.axes) {
|
|
213
213
|
let e = P({
|
|
214
|
-
logScale:
|
|
215
|
-
primaryMeasureBands:
|
|
216
|
-
rangedMeasureAxes:
|
|
214
|
+
logScale: t.measureAxisScale,
|
|
215
|
+
primaryMeasureBands: t.measureAxisBands,
|
|
216
|
+
rangedMeasureAxes: t.rangedMeasureAxes
|
|
217
217
|
});
|
|
218
|
-
|
|
218
|
+
r.axes = (t.secondaryDimensionAxis ? e.extend({ secondaryDimension: A.optional() }) : e).optional();
|
|
219
219
|
}
|
|
220
|
-
|
|
221
|
-
compact:
|
|
222
|
-
direction:
|
|
220
|
+
t.conditionalColoring && (r.coloring = j(t.conditionalColoring).optional()), t.dataLabels && (r.dataLabels = tt.optional()), t.gaugeDisplayMode && (r.displayMode = y.enum(["bar", "radial"]).optional()), t.legend && (r.legend = Ue.optional()), t.orientation && (r.orientation = x(y.enum(i)).optional()), t.treeLayout && (r.layout = y.object({
|
|
221
|
+
compact: y.boolean().optional(),
|
|
222
|
+
direction: y.enum([
|
|
223
223
|
"bottom",
|
|
224
224
|
"left",
|
|
225
225
|
"right",
|
|
226
226
|
"top"
|
|
227
227
|
]).optional(),
|
|
228
|
-
forceAutoFit:
|
|
229
|
-
initialExpandedLevels:
|
|
228
|
+
forceAutoFit: y.boolean().optional(),
|
|
229
|
+
initialExpandedLevels: y.number().int().min(0).optional()
|
|
230
230
|
}).strict().optional());
|
|
231
231
|
let a = {
|
|
232
|
-
data:
|
|
233
|
-
filterGroup:
|
|
234
|
-
type:
|
|
235
|
-
version:
|
|
232
|
+
data: y.object(n).strict(),
|
|
233
|
+
filterGroup: O.optional(),
|
|
234
|
+
type: y.literal(e),
|
|
235
|
+
version: y.literal(1)
|
|
236
236
|
};
|
|
237
|
-
return
|
|
238
|
-
let i =
|
|
237
|
+
return t.queryLimit && (a.limiting = y.object({ queryLimit: y.number().int().positive().optional() }).strict().optional()), Object.keys(r).length > 0 && (a.presentation = y.object(r).strict().optional()), t.sorting && (a.sorting = y.array(k).optional()), y.object(a).strict().superRefine((n, r) => {
|
|
238
|
+
let i = n.data, a = t.validateCounts?.(i.dimensions?.length ?? 0, i.measures?.length ?? 0);
|
|
239
239
|
a && r.addIssue({
|
|
240
240
|
code: "custom",
|
|
241
241
|
message: a,
|
|
242
242
|
path: ["data"]
|
|
243
243
|
});
|
|
244
|
-
let o =
|
|
245
|
-
|
|
244
|
+
let o = t.conditionalColoring?.minDimensions ?? 0;
|
|
245
|
+
n.presentation?.coloring && (i.dimensions?.length ?? 0) < o && r.addIssue({
|
|
246
246
|
code: "custom",
|
|
247
247
|
message: `${e} value colors require at least ${o} dimensions.`,
|
|
248
248
|
path: ["presentation", "coloring"]
|
|
249
|
-
}),
|
|
249
|
+
}), t.validateDefinition?.(n, r);
|
|
250
250
|
});
|
|
251
251
|
}, rt = F("combo", {
|
|
252
252
|
axes: !0,
|
|
@@ -473,41 +473,41 @@ var Qe = b.object({
|
|
|
473
473
|
min: 1,
|
|
474
474
|
max: 1
|
|
475
475
|
}
|
|
476
|
-
}), _t =
|
|
476
|
+
}), _t = y.enum(["dropdown", "listbox"]), vt = y.object({
|
|
477
477
|
mode: _t.optional(),
|
|
478
|
-
quickSelect:
|
|
479
|
-
responsive:
|
|
480
|
-
searchable:
|
|
481
|
-
showProgressBar:
|
|
482
|
-
}).strict(), yt =
|
|
483
|
-
data:
|
|
478
|
+
quickSelect: y.boolean().optional(),
|
|
479
|
+
responsive: y.boolean().optional(),
|
|
480
|
+
searchable: y.boolean().optional(),
|
|
481
|
+
showProgressBar: y.boolean().optional()
|
|
482
|
+
}).strict(), yt = y.object({
|
|
483
|
+
data: y.object({ field: E.omit({
|
|
484
484
|
format: !0,
|
|
485
485
|
showNullValues: !0,
|
|
486
486
|
temporalGrouping: !0
|
|
487
487
|
}) }).strict(),
|
|
488
488
|
presentation: vt.optional(),
|
|
489
|
-
type:
|
|
490
|
-
version:
|
|
491
|
-
}).strict(), bt =
|
|
492
|
-
axis:
|
|
493
|
-
dataPointShape:
|
|
494
|
-
}), xt =
|
|
495
|
-
density:
|
|
496
|
-
visible:
|
|
489
|
+
type: y.literal("filter"),
|
|
490
|
+
version: y.literal(1)
|
|
491
|
+
}).strict(), bt = D.omit({ dataLabels: !0 }).extend({
|
|
492
|
+
axis: y.enum(["primary", "secondary"]).optional(),
|
|
493
|
+
dataPointShape: x(ce.shape.dataPointShape)
|
|
494
|
+
}), xt = y.object({
|
|
495
|
+
density: me.optional(),
|
|
496
|
+
visible: y.boolean()
|
|
497
497
|
}).strict(), St = Qe.extend({
|
|
498
|
-
coloring:
|
|
498
|
+
coloring: j({ rules: !1 }).optional(),
|
|
499
499
|
dataLabels: xt.optional()
|
|
500
|
-
}), Ct =
|
|
501
|
-
data:
|
|
502
|
-
dimensions:
|
|
503
|
-
measures:
|
|
500
|
+
}), Ct = y.object({
|
|
501
|
+
data: y.object({
|
|
502
|
+
dimensions: y.array(E).min(1),
|
|
503
|
+
measures: y.array(bt).min(1)
|
|
504
504
|
}).strict(),
|
|
505
|
-
filterGroup:
|
|
506
|
-
limiting:
|
|
505
|
+
filterGroup: O.optional(),
|
|
506
|
+
limiting: y.object({ queryLimit: y.number().int().positive().optional() }).strict().optional(),
|
|
507
507
|
presentation: St.optional(),
|
|
508
|
-
sorting:
|
|
509
|
-
type:
|
|
510
|
-
version:
|
|
508
|
+
sorting: y.array(k).optional(),
|
|
509
|
+
type: y.literal("line"),
|
|
510
|
+
version: y.literal(1)
|
|
511
511
|
}).strict().superRefine((e, t) => {
|
|
512
512
|
e.presentation?.coloring && e.data.dimensions.length < 2 && t.addIssue({
|
|
513
513
|
code: "custom",
|
|
@@ -525,12 +525,12 @@ var Qe = b.object({
|
|
|
525
525
|
]
|
|
526
526
|
});
|
|
527
527
|
});
|
|
528
|
-
}), wt =
|
|
529
|
-
data:
|
|
530
|
-
filterGroup:
|
|
531
|
-
type:
|
|
532
|
-
version:
|
|
533
|
-
}).strict(), Tt =
|
|
528
|
+
}), wt = y.object({
|
|
529
|
+
data: y.object({ measure: D.omit({ dataLabels: !0 }) }).strict(),
|
|
530
|
+
filterGroup: O.optional(),
|
|
531
|
+
type: y.literal("number"),
|
|
532
|
+
version: y.literal(1)
|
|
533
|
+
}).strict(), Tt = x(ne.pick({
|
|
534
534
|
endDateLabel: !0,
|
|
535
535
|
pickerState: !0,
|
|
536
536
|
pickerType: !0,
|
|
@@ -539,32 +539,32 @@ var Qe = b.object({
|
|
|
539
539
|
startDateLabel: !0,
|
|
540
540
|
timePickerVisibility: !0,
|
|
541
541
|
weekStart: !0
|
|
542
|
-
}).partial()), Et =
|
|
543
|
-
data:
|
|
542
|
+
}).partial()), Et = y.object({
|
|
543
|
+
data: y.object({ field: E.omit({
|
|
544
544
|
format: !0,
|
|
545
545
|
showNullValues: !0,
|
|
546
546
|
temporalGrouping: !0
|
|
547
547
|
}) }).strict(),
|
|
548
548
|
settings: Tt.optional(),
|
|
549
|
-
type:
|
|
550
|
-
version:
|
|
551
|
-
}).strict(), Dt =
|
|
552
|
-
settings:
|
|
553
|
-
type:
|
|
554
|
-
version:
|
|
555
|
-
}).strict(), Ot =
|
|
556
|
-
settings:
|
|
557
|
-
blur:
|
|
558
|
-
fit:
|
|
559
|
-
opacity:
|
|
560
|
-
saturation:
|
|
561
|
-
shadow:
|
|
549
|
+
type: y.literal("date-picker"),
|
|
550
|
+
version: y.literal(1)
|
|
551
|
+
}).strict(), Dt = y.object({
|
|
552
|
+
settings: y.object({ url: y.string().url().nullable() }).strict(),
|
|
553
|
+
type: y.literal("iframe"),
|
|
554
|
+
version: y.literal(1)
|
|
555
|
+
}).strict(), Ot = y.object({
|
|
556
|
+
settings: x(y.object({
|
|
557
|
+
blur: _.shape.blur.optional(),
|
|
558
|
+
fit: _.shape.image.unwrap().shape.imageFit.optional(),
|
|
559
|
+
opacity: _.shape.opacity.optional(),
|
|
560
|
+
saturation: _.shape.saturation.optional(),
|
|
561
|
+
shadow: _.shape.shadow.optional(),
|
|
562
562
|
source: ye.optional()
|
|
563
563
|
}).strict()),
|
|
564
|
-
type:
|
|
565
|
-
version:
|
|
566
|
-
}).strict(), kt =
|
|
567
|
-
settings:
|
|
564
|
+
type: y.literal("image"),
|
|
565
|
+
version: y.literal(1)
|
|
566
|
+
}).strict(), kt = y.object({
|
|
567
|
+
settings: x(he.pick({
|
|
568
568
|
backgroundColor: !0,
|
|
569
569
|
backgroundType: !0,
|
|
570
570
|
borderEnabled: !0,
|
|
@@ -579,12 +579,12 @@ var Qe = b.object({
|
|
|
579
579
|
shape: !0,
|
|
580
580
|
strokeColor: !0
|
|
581
581
|
}).partial().strict()),
|
|
582
|
-
type:
|
|
583
|
-
version:
|
|
584
|
-
}).strict(), I =
|
|
585
|
-
settings:
|
|
582
|
+
type: y.literal("shape"),
|
|
583
|
+
version: y.literal(1)
|
|
584
|
+
}).strict(), I = ee.shape.simpleTextObjectSettings, At = y.object({
|
|
585
|
+
settings: x(y.object({
|
|
586
586
|
align: I.shape.align.optional(),
|
|
587
|
-
content:
|
|
587
|
+
content: y.string().optional(),
|
|
588
588
|
fontFamily: I.shape.fontFamily.optional(),
|
|
589
589
|
fontSize: I.shape.fontSize.optional(),
|
|
590
590
|
position: I.shape.position.optional(),
|
|
@@ -593,140 +593,140 @@ var Qe = b.object({
|
|
|
593
593
|
textColor: I.shape.textColor.optional(),
|
|
594
594
|
wordWrap: I.shape.wordWrap.optional()
|
|
595
595
|
}).strict()),
|
|
596
|
-
type:
|
|
597
|
-
version:
|
|
598
|
-
}).strict(), jt =
|
|
599
|
-
settings:
|
|
600
|
-
customLabel:
|
|
601
|
-
hideLabel:
|
|
602
|
-
inputType:
|
|
603
|
-
placeholder:
|
|
604
|
-
responsive:
|
|
605
|
-
variableId:
|
|
596
|
+
type: y.literal("simpleTextObject"),
|
|
597
|
+
version: y.literal(1)
|
|
598
|
+
}).strict(), jt = y.object({
|
|
599
|
+
settings: x(y.object({
|
|
600
|
+
customLabel: f.shape.commonSettings.shape.customLabel.optional(),
|
|
601
|
+
hideLabel: f.shape.commonSettings.shape.hideLabel.optional(),
|
|
602
|
+
inputType: f.shape.type.optional(),
|
|
603
|
+
placeholder: f.shape.commonSettings.shape.placeholder.optional(),
|
|
604
|
+
responsive: f.shape.commonSettings.shape.responsive.optional(),
|
|
605
|
+
variableId: f.shape.commonSettings.shape.variableId.optional()
|
|
606
606
|
}).strict()),
|
|
607
|
-
type:
|
|
608
|
-
version:
|
|
609
|
-
}).strict(), Mt =
|
|
610
|
-
data:
|
|
607
|
+
type: y.literal("atomic-input"),
|
|
608
|
+
version: y.literal(1)
|
|
609
|
+
}).strict(), Mt = y.object({
|
|
610
|
+
data: y.object({ field: E.omit({
|
|
611
611
|
format: !0,
|
|
612
612
|
showNullValues: !0,
|
|
613
613
|
temporalGrouping: !0
|
|
614
614
|
}) }).strict(),
|
|
615
|
-
settings:
|
|
615
|
+
settings: x(re.pick({
|
|
616
616
|
layout: !0,
|
|
617
617
|
quickSelect: !0,
|
|
618
618
|
range: !0,
|
|
619
619
|
step: !0
|
|
620
620
|
}).partial()).optional(),
|
|
621
|
-
type:
|
|
622
|
-
version:
|
|
623
|
-
}).strict(), Nt =
|
|
624
|
-
columns:
|
|
625
|
-
structure:
|
|
626
|
-
}).strict(), It =
|
|
627
|
-
dimensions:
|
|
628
|
-
measures:
|
|
629
|
-
structure:
|
|
630
|
-
}).strict(), Lt =
|
|
631
|
-
columnDimensions:
|
|
632
|
-
measures:
|
|
633
|
-
rowDimensions:
|
|
634
|
-
structure:
|
|
635
|
-
}).strict(), Rt =
|
|
621
|
+
type: y.literal("slider"),
|
|
622
|
+
version: y.literal(1)
|
|
623
|
+
}).strict(), Nt = E.extend({ role: y.literal("dimension") }), L = D.omit({ dataLabels: !0 }), Pt = L.extend({ role: y.literal("measure") }), Ft = y.object({
|
|
624
|
+
columns: y.array(y.discriminatedUnion("role", [Nt, Pt])).min(1),
|
|
625
|
+
structure: y.literal("normal").optional()
|
|
626
|
+
}).strict(), It = y.object({
|
|
627
|
+
dimensions: y.array(E).min(1),
|
|
628
|
+
measures: y.array(L).min(1),
|
|
629
|
+
structure: y.literal("expandable")
|
|
630
|
+
}).strict(), Lt = y.object({
|
|
631
|
+
columnDimensions: y.array(E).min(1),
|
|
632
|
+
measures: y.array(L).min(1),
|
|
633
|
+
rowDimensions: y.array(E).min(1),
|
|
634
|
+
structure: y.literal("pivot")
|
|
635
|
+
}).strict(), Rt = y.union([
|
|
636
636
|
Ft,
|
|
637
637
|
It,
|
|
638
638
|
Lt
|
|
639
|
-
]), zt =
|
|
640
|
-
applyTo:
|
|
641
|
-
enabled:
|
|
642
|
-
showRecordsCount:
|
|
643
|
-
style:
|
|
644
|
-
backgroundColor:
|
|
645
|
-
fontColor:
|
|
646
|
-
fontStyle:
|
|
647
|
-
position:
|
|
648
|
-
responsiveHeight:
|
|
639
|
+
]), zt = y.object({
|
|
640
|
+
applyTo: m.shape.applyTo,
|
|
641
|
+
enabled: m.shape.enabled,
|
|
642
|
+
showRecordsCount: m.shape.showRecordsCount,
|
|
643
|
+
style: y.object({
|
|
644
|
+
backgroundColor: h.shape.backgroundColor.optional(),
|
|
645
|
+
fontColor: h.shape.fontColor.optional(),
|
|
646
|
+
fontStyle: g.optional(),
|
|
647
|
+
position: h.shape.position.optional(),
|
|
648
|
+
responsiveHeight: h.shape.responsive
|
|
649
649
|
}).strict().optional()
|
|
650
|
-
}).strict(), Bt =
|
|
651
|
-
background:
|
|
652
|
-
color:
|
|
653
|
-
evenColor:
|
|
654
|
-
oddColor:
|
|
655
|
-
type:
|
|
650
|
+
}).strict(), Bt = y.object({
|
|
651
|
+
background: y.object({
|
|
652
|
+
color: d.optional(),
|
|
653
|
+
evenColor: d.optional(),
|
|
654
|
+
oddColor: d.optional(),
|
|
655
|
+
type: y.enum([
|
|
656
656
|
"none",
|
|
657
657
|
"single",
|
|
658
658
|
"zebra"
|
|
659
659
|
])
|
|
660
660
|
}).strict().optional(),
|
|
661
|
-
body:
|
|
662
|
-
fontColor:
|
|
663
|
-
fontFamily:
|
|
664
|
-
fontSize:
|
|
665
|
-
fontStyle:
|
|
666
|
-
horizontalAlign:
|
|
661
|
+
body: y.object({
|
|
662
|
+
fontColor: d.optional(),
|
|
663
|
+
fontFamily: y.string().trim().min(1).optional(),
|
|
664
|
+
fontSize: y.number().positive().optional(),
|
|
665
|
+
fontStyle: g.optional(),
|
|
666
|
+
horizontalAlign: y.enum([
|
|
667
667
|
"auto",
|
|
668
668
|
"center",
|
|
669
669
|
"left",
|
|
670
670
|
"right"
|
|
671
671
|
]).optional(),
|
|
672
|
-
verticalAlign:
|
|
672
|
+
verticalAlign: y.enum([
|
|
673
673
|
"auto",
|
|
674
674
|
"bottom",
|
|
675
675
|
"middle",
|
|
676
676
|
"top"
|
|
677
677
|
]).optional()
|
|
678
678
|
}).strict().optional(),
|
|
679
|
-
borders:
|
|
680
|
-
color:
|
|
681
|
-
dividerColor:
|
|
682
|
-
dividers:
|
|
679
|
+
borders: y.object({
|
|
680
|
+
color: d.optional(),
|
|
681
|
+
dividerColor: d.optional(),
|
|
682
|
+
dividers: y.enum([
|
|
683
683
|
"all",
|
|
684
684
|
"auto",
|
|
685
685
|
"horizontal",
|
|
686
686
|
"none",
|
|
687
687
|
"vertical"
|
|
688
688
|
]).optional(),
|
|
689
|
-
enabled:
|
|
690
|
-
lineStyle:
|
|
689
|
+
enabled: y.boolean(),
|
|
690
|
+
lineStyle: y.enum([
|
|
691
691
|
"dashed",
|
|
692
692
|
"dotted",
|
|
693
693
|
"line"
|
|
694
694
|
]).optional(),
|
|
695
|
-
radius:
|
|
696
|
-
strokeWidth:
|
|
695
|
+
radius: y.number().nonnegative().optional(),
|
|
696
|
+
strokeWidth: y.number().nonnegative().optional()
|
|
697
697
|
}).strict().optional(),
|
|
698
|
-
header:
|
|
699
|
-
backgroundColor:
|
|
700
|
-
borderColor:
|
|
701
|
-
fontColor:
|
|
702
|
-
fontFamily:
|
|
703
|
-
fontSize:
|
|
704
|
-
fontStyle:
|
|
705
|
-
responsiveHeight:
|
|
698
|
+
header: y.object({
|
|
699
|
+
backgroundColor: d.optional(),
|
|
700
|
+
borderColor: d.optional(),
|
|
701
|
+
fontColor: d.optional(),
|
|
702
|
+
fontFamily: y.string().trim().min(1).optional(),
|
|
703
|
+
fontSize: y.number().positive().optional(),
|
|
704
|
+
fontStyle: g.optional(),
|
|
705
|
+
responsiveHeight: y.boolean().optional()
|
|
706
706
|
}).strict().optional(),
|
|
707
|
-
highlight:
|
|
708
|
-
backgroundColor:
|
|
709
|
-
mode:
|
|
707
|
+
highlight: y.object({
|
|
708
|
+
backgroundColor: d.optional(),
|
|
709
|
+
mode: y.enum([
|
|
710
710
|
"column",
|
|
711
711
|
"none",
|
|
712
712
|
"row",
|
|
713
713
|
"row-and-column"
|
|
714
714
|
]),
|
|
715
|
-
textColor:
|
|
715
|
+
textColor: d.optional()
|
|
716
716
|
}).strict().optional(),
|
|
717
|
-
layout:
|
|
718
|
-
columnWidthBehavior:
|
|
719
|
-
rowHeight:
|
|
717
|
+
layout: y.object({
|
|
718
|
+
columnWidthBehavior: y.enum(["responsive", "static"]).optional(),
|
|
719
|
+
rowHeight: y.number().positive().optional()
|
|
720
720
|
}).strict().optional()
|
|
721
|
-
}).strict(), Vt =
|
|
721
|
+
}).strict(), Vt = y.object({
|
|
722
722
|
data: Rt,
|
|
723
|
-
filterGroup:
|
|
724
|
-
limiting:
|
|
723
|
+
filterGroup: O.optional(),
|
|
724
|
+
limiting: y.object({ queryLimit: y.number().int().positive().optional() }).strict().optional(),
|
|
725
725
|
presentation: Bt.optional(),
|
|
726
|
-
sorting:
|
|
726
|
+
sorting: y.array(k).optional(),
|
|
727
727
|
totals: zt.optional(),
|
|
728
|
-
type:
|
|
729
|
-
version:
|
|
728
|
+
type: y.literal("table"),
|
|
729
|
+
version: y.literal(1)
|
|
730
730
|
}).strict(), R = (e) => typeof e == "object" && !!e && !Array.isArray(e), Ht = (e) => {
|
|
731
731
|
let t = e.fieldKey ?? e.key;
|
|
732
732
|
return typeof t == "string" ? t : void 0;
|
|
@@ -746,7 +746,7 @@ var Qe = b.object({
|
|
|
746
746
|
}, Wt = (e, t) => {
|
|
747
747
|
let n = e.type;
|
|
748
748
|
if (!(n === "dimension" && R(e.dimension) || n === "measure" && R(e.measure) || n === "calculation" && R(e.calculation))) return;
|
|
749
|
-
let r =
|
|
749
|
+
let r = T.safeParse({
|
|
750
750
|
fieldKey: e.key,
|
|
751
751
|
item: e,
|
|
752
752
|
kind: n,
|
|
@@ -756,11 +756,11 @@ var Qe = b.object({
|
|
|
756
756
|
return r.data;
|
|
757
757
|
}, Gt = (e, t) => {
|
|
758
758
|
if (!R(e)) throw Error(`Available field at index ${t} must be an object.`);
|
|
759
|
-
let n =
|
|
759
|
+
let n = T.safeParse(e);
|
|
760
760
|
if (n.success) return n.data;
|
|
761
761
|
let r = Wt(e, t);
|
|
762
762
|
if (r) return r;
|
|
763
|
-
let i = Array.isArray(e.aggregations) ? e.aggregations : Array.isArray(e.aggregators) ? e.aggregators : [], a =
|
|
763
|
+
let i = Array.isArray(e.aggregations) ? e.aggregations : Array.isArray(e.aggregators) ? e.aggregators : [], a = T.safeParse({
|
|
764
764
|
aggregations: i.map((e) => R(e) ? {
|
|
765
765
|
distinct: e.distinct,
|
|
766
766
|
name: e.name ?? e.funcName,
|
|
@@ -785,29 +785,29 @@ var Qe = b.object({
|
|
|
785
785
|
}, qt = (e) => e.kind === "field" ? [...new Set(e.aggregations.flatMap((e) => [e.name, ...e.distinct ? [`${e.name}_DISTINCT`] : []]))] : [], Jt = (e, t) => e.kind === "field" || t === "dimension" && e.kind === "dimension" || t === "measure" && (e.kind === "measure" || e.kind === "calculation"), Yt = (e) => {
|
|
786
786
|
if (e.kind !== "dimension") return e.kind;
|
|
787
787
|
}, z = (e) => ({
|
|
788
|
-
...
|
|
788
|
+
...t(e.item),
|
|
789
789
|
id: e.item.id ?? e.fieldKey
|
|
790
|
-
}), B = (
|
|
791
|
-
aggregators:
|
|
790
|
+
}), B = (t) => t.map((t) => t.kind === "dimension" ? e(z(t)) : t.kind === "measure" || t.kind === "calculation" ? a(z(t)) : {
|
|
791
|
+
aggregators: n(t.aggregations.map((e) => ({
|
|
792
792
|
distinct: e.distinct ?? !1,
|
|
793
793
|
name: e.name,
|
|
794
794
|
resultType: e.resultType
|
|
795
795
|
}))),
|
|
796
|
-
dataType:
|
|
797
|
-
isManualData:
|
|
798
|
-
key:
|
|
799
|
-
name:
|
|
800
|
-
view:
|
|
801
|
-
views: [
|
|
796
|
+
dataType: t.dataType,
|
|
797
|
+
isManualData: t.isManualData,
|
|
798
|
+
key: t.fieldKey,
|
|
799
|
+
name: t.name,
|
|
800
|
+
view: t.view,
|
|
801
|
+
views: [t.view]
|
|
802
802
|
}), V = (e, t) => {
|
|
803
803
|
let n = Math.min(e.length, t.length), r = 0;
|
|
804
804
|
for (; r < n && e[r].toLocaleLowerCase() === t[r].toLocaleLowerCase();) r += 1;
|
|
805
805
|
return r;
|
|
806
806
|
}, Xt = (e, t) => [...t].sort((t, n) => V(e, n.fieldKey) - V(e, t.fieldKey) || t.fieldKey.localeCompare(n.fieldKey)).slice(0, 5).map((e) => e.fieldKey), Zt = [
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
807
|
+
b.FieldType.DATE,
|
|
808
|
+
b.FieldType.TIME,
|
|
809
|
+
b.FieldType.TIMESTAMP,
|
|
810
|
+
b.FieldType.TIMESTAMP_TZ
|
|
811
811
|
], H = (e, t, n, r) => ({
|
|
812
812
|
...r ? { allowedValues: r } : {},
|
|
813
813
|
code: e,
|
|
@@ -855,18 +855,18 @@ var Qe = b.object({
|
|
|
855
855
|
} catch {
|
|
856
856
|
return String(e);
|
|
857
857
|
}
|
|
858
|
-
},
|
|
858
|
+
}, q = (e, t) => t.reduce((e, t) => typeof e == "object" && e && Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0, e), an = (e) => {
|
|
859
859
|
if (e.code === "invalid_value") return e.values;
|
|
860
860
|
if (e.code !== "invalid_union" || e.errors.length === 0) return;
|
|
861
|
-
let t = e.errors.map((e) => e.length === 1 && e[0].path.length === 0 ?
|
|
861
|
+
let t = e.errors.map((e) => e.length === 1 && e[0].path.length === 0 ? an(e[0]) : void 0);
|
|
862
862
|
return t.every((e) => e !== void 0) ? [...new Set(t.flat())] : void 0;
|
|
863
|
-
}, sn = (e, t, n = []) => {
|
|
864
|
-
let r = (e, i) => {
|
|
865
|
-
let
|
|
863
|
+
}, on = (e) => e.filter((e) => typeof e != "symbol"), sn = (e, t, n = []) => {
|
|
864
|
+
let r = (e, n) => e.code === "invalid_union" && e.path.length === 0 ? e.errors.length > 0 && e.errors.every((e) => e.some((e) => r(e, n))) : e.code === "invalid_value" && e.path.length === 1 && q(t, [...n, ...on(e.path)]) !== void 0, i = (e, a) => {
|
|
865
|
+
let o = [...a, ...on(e.path)];
|
|
866
866
|
if (e.code === "unrecognized_keys") return e.keys.map((r) => {
|
|
867
867
|
let i = [
|
|
868
868
|
...n,
|
|
869
|
-
...
|
|
869
|
+
...o,
|
|
870
870
|
r
|
|
871
871
|
];
|
|
872
872
|
return {
|
|
@@ -874,51 +874,51 @@ var Qe = b.object({
|
|
|
874
874
|
path: i,
|
|
875
875
|
message: `${G(i)}: Unrecognized key.`,
|
|
876
876
|
details: {
|
|
877
|
-
received:
|
|
877
|
+
received: q(t, [...o, r]),
|
|
878
878
|
zodCode: e.code
|
|
879
879
|
}
|
|
880
880
|
};
|
|
881
881
|
});
|
|
882
|
-
let
|
|
883
|
-
received:
|
|
882
|
+
let s = [...n, ...o], c = q(t, o), l = an(e), u = {
|
|
883
|
+
received: c,
|
|
884
884
|
zodCode: e.code
|
|
885
|
-
},
|
|
886
|
-
if (e.code === "invalid_union" && !
|
|
887
|
-
let t = e.errors.filter((e) => !e.some((e) => e.code === "unrecognized_keys"));
|
|
888
|
-
if (
|
|
889
|
-
let
|
|
890
|
-
|
|
885
|
+
}, d = l ? `Unsupported value ${K(c)}. Allowed values: ${l.map(K).join(", ")}.` : `${e.message}. Received: ${K(c)}.`;
|
|
886
|
+
if (e.code === "invalid_union" && !l && e.errors.length > 0) {
|
|
887
|
+
let t = e.errors, n = t.filter((e) => !e.some((e) => r(e, o))), a = n.length > 0 ? n : t, s = a.length === 1 ? a : a.filter((e) => !e.some((e) => e.code === "unrecognized_keys"));
|
|
888
|
+
if (s.length === 1) return s[0].flatMap((e) => i(e, o));
|
|
889
|
+
let c = e.errors.map((e) => e.flatMap((e) => i(e, o)));
|
|
890
|
+
u.alternatives = c, d = `Value does not match any allowed shape. ${c.map((e, t) => `Alternative ${t + 1}: ${e.map((e) => e.message).join(" ")}`).join(" ")}`;
|
|
891
891
|
}
|
|
892
892
|
return [{
|
|
893
893
|
code: "invalid_structure",
|
|
894
|
-
path:
|
|
895
|
-
message: `${G(
|
|
896
|
-
details:
|
|
897
|
-
...
|
|
894
|
+
path: s,
|
|
895
|
+
message: `${G(s)}: ${d}`,
|
|
896
|
+
details: u,
|
|
897
|
+
...l ? { allowedValues: l } : {}
|
|
898
898
|
}];
|
|
899
899
|
};
|
|
900
|
-
return e.issues.flatMap((e) =>
|
|
900
|
+
return e.issues.flatMap((e) => i(e, []));
|
|
901
901
|
};
|
|
902
|
-
|
|
903
|
-
var cn = (
|
|
904
|
-
let
|
|
905
|
-
return
|
|
902
|
+
o();
|
|
903
|
+
var cn = (e, t) => {
|
|
904
|
+
let n = "legend" in e && !!e.legend, i = t.position !== void 0 || t.title !== void 0, a = [];
|
|
905
|
+
return t.visible !== void 0 && (t.visible || i || n) ? a.push({
|
|
906
906
|
name: "setLegendEnabled",
|
|
907
|
-
payload:
|
|
908
|
-
}) :
|
|
907
|
+
payload: t.visible
|
|
908
|
+
}) : t.visible === void 0 && i && !n && a.push({
|
|
909
909
|
name: "setLegendEnabled",
|
|
910
910
|
payload: !0
|
|
911
|
-
}),
|
|
911
|
+
}), t.position === void 0 ? (t.visible === !0 || i && !n) && a.push({
|
|
912
912
|
name: "setLegendPosition",
|
|
913
|
-
payload:
|
|
913
|
+
payload: r.Right
|
|
914
914
|
}) : a.push({
|
|
915
915
|
name: "setLegendPosition",
|
|
916
|
-
payload:
|
|
917
|
-
}),
|
|
916
|
+
payload: t.position
|
|
917
|
+
}), t.title !== void 0 && a.push({
|
|
918
918
|
name: "setLegendTitle",
|
|
919
|
-
payload:
|
|
919
|
+
payload: t.title
|
|
920
920
|
}), a;
|
|
921
|
-
},
|
|
921
|
+
}, J = (e, t, n, r = {}) => ({
|
|
922
922
|
code: e,
|
|
923
923
|
message: n,
|
|
924
924
|
path: t,
|
|
@@ -926,7 +926,7 @@ var cn = (t, n) => {
|
|
|
926
926
|
}), ln = (e, t, n, r, i, a) => ({
|
|
927
927
|
name: e,
|
|
928
928
|
payload: {
|
|
929
|
-
...
|
|
929
|
+
...Y(t),
|
|
930
930
|
[i]: a
|
|
931
931
|
},
|
|
932
932
|
definitionContext: {
|
|
@@ -955,14 +955,14 @@ var cn = (t, n) => {
|
|
|
955
955
|
ref: n,
|
|
956
956
|
kind: o
|
|
957
957
|
}
|
|
958
|
-
}),
|
|
958
|
+
}), Y = (e) => ({
|
|
959
959
|
dataItemInternalKey: e.dataItemInternalKey,
|
|
960
960
|
dataItemUniqueSignature: e.dataItemUniqueSignature
|
|
961
961
|
}), dn = (e) => {
|
|
962
962
|
let t = [], n = /* @__PURE__ */ new Set();
|
|
963
963
|
return e.forEach(({ items: e, path: r }) => {
|
|
964
964
|
e.forEach((e, i) => {
|
|
965
|
-
n.has(e.ref) && t.push(
|
|
965
|
+
n.has(e.ref) && t.push(J("duplicate_alias", [
|
|
966
966
|
...r,
|
|
967
967
|
i,
|
|
968
968
|
"ref"
|
|
@@ -980,7 +980,7 @@ var cn = (t, n) => {
|
|
|
980
980
|
}), mn = (e, t, n, r, i) => ({
|
|
981
981
|
name: e,
|
|
982
982
|
payload: {
|
|
983
|
-
...
|
|
983
|
+
...Y(t),
|
|
984
984
|
...i
|
|
985
985
|
},
|
|
986
986
|
definitionContext: {
|
|
@@ -995,24 +995,24 @@ var cn = (t, n) => {
|
|
|
995
995
|
} : "valueFrom" in e ? {
|
|
996
996
|
valueFrom: e.valueFrom,
|
|
997
997
|
valueTo: e.valueTo
|
|
998
|
-
} : {},
|
|
999
|
-
filters: e.filters.map((e) => "filters" in e ?
|
|
998
|
+
} : {}, X = (e) => ({
|
|
999
|
+
filters: e.filters.map((e) => "filters" in e ? X(e) : {
|
|
1000
1000
|
fieldKey: e.fieldKey,
|
|
1001
1001
|
operator: e.operator,
|
|
1002
1002
|
values: hn(e)
|
|
1003
1003
|
}),
|
|
1004
1004
|
operator: e.operator
|
|
1005
|
-
}), gn = (e, t) => (e ?? []).flatMap((e, n) => t.includes(e.by) ? [] : [
|
|
1005
|
+
}), gn = (e, t) => (e ?? []).flatMap((e, n) => t.includes(e.by) ? [] : [J("unknown_alias", [
|
|
1006
1006
|
"sorting",
|
|
1007
1007
|
n,
|
|
1008
1008
|
"by"
|
|
1009
|
-
], `Reference "${e.by}" does not exist.`, { allowedValues: t })]),
|
|
1010
|
-
...
|
|
1009
|
+
], `Reference "${e.by}" does not exist.`, { allowedValues: t })]), Z = ["presentation", "coloring"], _n = (e, t, n) => [...(e?.overwrites ?? []).flatMap(({ dimension: e }, n) => e === void 0 || t.includes(e) ? [] : [J("unknown_alias", [
|
|
1010
|
+
...Z,
|
|
1011
1011
|
"overwrites",
|
|
1012
1012
|
n,
|
|
1013
1013
|
"dimension"
|
|
1014
|
-
], `Dimension reference "${e}" does not exist.`, { allowedValues: t })]), ...(e?.rules ?? []).flatMap(({ measure: e }, t) => n.includes(e) ? [] : [
|
|
1015
|
-
...
|
|
1014
|
+
], `Dimension reference "${e}" does not exist.`, { allowedValues: t })]), ...(e?.rules ?? []).flatMap(({ measure: e }, t) => n.includes(e) ? [] : [J("unknown_alias", [
|
|
1015
|
+
...Z,
|
|
1016
1016
|
"rules",
|
|
1017
1017
|
t,
|
|
1018
1018
|
"measure"
|
|
@@ -1023,16 +1023,16 @@ var cn = (t, n) => {
|
|
|
1023
1023
|
success: !0,
|
|
1024
1024
|
vSpec: n.data
|
|
1025
1025
|
} : {
|
|
1026
|
-
issues: [
|
|
1026
|
+
issues: [J("invalid_compiled_vspec", [], "Compiled vSpec failed final validation.", { details: { issues: n.error.issues } })],
|
|
1027
1027
|
success: !1
|
|
1028
1028
|
};
|
|
1029
|
-
},
|
|
1030
|
-
let { max: t, min: n } =
|
|
1031
|
-
return n !== void 0 && t !== void 0 ?
|
|
1029
|
+
}, Q = (e) => "startsAtZero" in e ? {} : e, yn = (e) => {
|
|
1030
|
+
let { max: t, min: n } = Q(e);
|
|
1031
|
+
return n !== void 0 && t !== void 0 ? c.MinMax : n === void 0 ? t === void 0 ? c.Auto : c.Max : c.Min;
|
|
1032
1032
|
}, bn = (e) => {
|
|
1033
1033
|
for (let [t, n] of Object.entries(e ?? {})) {
|
|
1034
|
-
let { max: e, min: r } = n?.range ?
|
|
1035
|
-
if (r !== void 0 && e !== void 0 && r >= e) return
|
|
1034
|
+
let { max: e, min: r } = n?.range ? Q(n.range) : {};
|
|
1035
|
+
if (r !== void 0 && e !== void 0 && r >= e) return J("invalid_structure", [
|
|
1036
1036
|
"presentation",
|
|
1037
1037
|
"axes",
|
|
1038
1038
|
t,
|
|
@@ -1043,7 +1043,7 @@ var cn = (t, n) => {
|
|
|
1043
1043
|
}, xn = (e, t) => {
|
|
1044
1044
|
let n = [];
|
|
1045
1045
|
t.inverted !== void 0 && n.push({
|
|
1046
|
-
name:
|
|
1046
|
+
name: v.SET_INVERT_AXIS,
|
|
1047
1047
|
payload: {
|
|
1048
1048
|
axisName: e,
|
|
1049
1049
|
invertAxis: t.inverted
|
|
@@ -1052,27 +1052,27 @@ var cn = (t, n) => {
|
|
|
1052
1052
|
let { range: r } = t;
|
|
1053
1053
|
if (r) {
|
|
1054
1054
|
n.push({
|
|
1055
|
-
name:
|
|
1055
|
+
name: v.SET_AXIS_RANGE_OPTION,
|
|
1056
1056
|
payload: {
|
|
1057
1057
|
axisName: e,
|
|
1058
1058
|
axisRangeOption: yn(r)
|
|
1059
1059
|
}
|
|
1060
1060
|
});
|
|
1061
|
-
let { max: t, min: i } =
|
|
1061
|
+
let { max: t, min: i } = Q(r);
|
|
1062
1062
|
i !== void 0 && n.push({
|
|
1063
|
-
name:
|
|
1063
|
+
name: v.SET_AXIS_RANGE_MIN,
|
|
1064
1064
|
payload: {
|
|
1065
1065
|
axisName: e,
|
|
1066
1066
|
minValue: i
|
|
1067
1067
|
}
|
|
1068
1068
|
}), t !== void 0 && n.push({
|
|
1069
|
-
name:
|
|
1069
|
+
name: v.SET_AXIS_RANGE_MAX,
|
|
1070
1070
|
payload: {
|
|
1071
1071
|
axisName: e,
|
|
1072
1072
|
maxValue: t
|
|
1073
1073
|
}
|
|
1074
1074
|
}), "startsAtZero" in r && n.push({
|
|
1075
|
-
name:
|
|
1075
|
+
name: v.SET_AXIS_STARTS_AT_ZERO,
|
|
1076
1076
|
payload: {
|
|
1077
1077
|
axisName: e,
|
|
1078
1078
|
startsAtZero: r.startsAtZero
|
|
@@ -1080,7 +1080,7 @@ var cn = (t, n) => {
|
|
|
1080
1080
|
});
|
|
1081
1081
|
}
|
|
1082
1082
|
return n;
|
|
1083
|
-
},
|
|
1083
|
+
}, Sn = (e) => {
|
|
1084
1084
|
let t = Object.entries(e).find(([, e]) => e.success === !1);
|
|
1085
1085
|
return t ? {
|
|
1086
1086
|
id: t[0],
|
|
@@ -1090,11 +1090,11 @@ var cn = (t, n) => {
|
|
|
1090
1090
|
let r = t.map((e, t) => ({
|
|
1091
1091
|
...e,
|
|
1092
1092
|
id: e.id ?? `definition:${t}`
|
|
1093
|
-
})), i = await
|
|
1093
|
+
})), i = await be(e.vSpec, e.availableFields, r.map(({ id: e, name: t, payload: n }) => ({
|
|
1094
1094
|
id: e,
|
|
1095
1095
|
name: t,
|
|
1096
1096
|
payload: n
|
|
1097
|
-
})), e.input.variables ?? [], [], e.input.theme), a =
|
|
1097
|
+
})), e.input.variables ?? [], [], e.input.theme), a = Sn(i.results);
|
|
1098
1098
|
if (!a) return {
|
|
1099
1099
|
state: {
|
|
1100
1100
|
...e,
|
|
@@ -1102,9 +1102,9 @@ var cn = (t, n) => {
|
|
|
1102
1102
|
},
|
|
1103
1103
|
success: !0
|
|
1104
1104
|
};
|
|
1105
|
-
let o = r.find((e) => e.id === a.id), s = o?.definitionContext, c = s?.path ?? n, l = o?.name ?? a.id, u = a.result.error ?? "Operation failed.",
|
|
1105
|
+
let o = r.find((e) => e.id === a.id), s = o?.definitionContext, c = s?.path ?? n, l = o?.name ?? a.id, u = a.result.error ?? "Operation failed.", d = s ? `Cannot apply ${K(s.received)} to ${s.kind} ${K(s.ref)}` : "Operation failed";
|
|
1106
1106
|
return {
|
|
1107
|
-
issue:
|
|
1107
|
+
issue: J("operation_failed", c, `${G(c)}: ${d} (operation "${l}"): ${u}`, { details: {
|
|
1108
1108
|
error: a.result.error,
|
|
1109
1109
|
operationId: a.id,
|
|
1110
1110
|
operationName: l,
|
|
@@ -1116,7 +1116,7 @@ var cn = (t, n) => {
|
|
|
1116
1116
|
} }),
|
|
1117
1117
|
success: !1
|
|
1118
1118
|
};
|
|
1119
|
-
},
|
|
1119
|
+
}, Cn = (e, t) => {
|
|
1120
1120
|
if (!e || typeof e.data != "object" || e.data === null || !("dataItem" in e.data)) return;
|
|
1121
1121
|
let n = e.data.dataItem;
|
|
1122
1122
|
if (!(typeof n != "object" || !n || !("internalKey" in n) || typeof n.internalKey != "string" || !("uniqueSignature" in n) || typeof n.uniqueSignature != "string")) return {
|
|
@@ -1124,14 +1124,14 @@ var cn = (t, n) => {
|
|
|
1124
1124
|
dataItemUniqueSignature: n.uniqueSignature,
|
|
1125
1125
|
kind: t
|
|
1126
1126
|
};
|
|
1127
|
-
},
|
|
1128
|
-
let o = `${n}:${t.ref}`, s = await
|
|
1127
|
+
}, wn = async (e, t, n, r, i, a) => {
|
|
1128
|
+
let o = `${n}:${t.ref}`, s = await be(e.vSpec, e.availableFields, [{
|
|
1129
1129
|
id: o,
|
|
1130
1130
|
name: r,
|
|
1131
1131
|
payload: i
|
|
1132
|
-
}], e.input.variables ?? [], [], e.input.theme), c =
|
|
1132
|
+
}], e.input.variables ?? [], [], e.input.theme), c = Sn(s.results), l = Cn(s.results[o], n);
|
|
1133
1133
|
return c || !l ? {
|
|
1134
|
-
issue:
|
|
1134
|
+
issue: J("operation_failed", a, c?.result.error ?? `${n} operation did not return the created data-item identity.`),
|
|
1135
1135
|
success: !1
|
|
1136
1136
|
} : {
|
|
1137
1137
|
state: {
|
|
@@ -1144,7 +1144,7 @@ var cn = (t, n) => {
|
|
|
1144
1144
|
},
|
|
1145
1145
|
success: !0
|
|
1146
1146
|
};
|
|
1147
|
-
},
|
|
1147
|
+
}, Tn = (e, t, n, r) => {
|
|
1148
1148
|
let i = [
|
|
1149
1149
|
"formatType",
|
|
1150
1150
|
"formatString",
|
|
@@ -1159,20 +1159,20 @@ var cn = (t, n) => {
|
|
|
1159
1159
|
return i !== void 0 && s ? [ln(s, o, t.ref, t.path ?? [...r, a], e, i)] : [];
|
|
1160
1160
|
});
|
|
1161
1161
|
}), r);
|
|
1162
|
-
},
|
|
1162
|
+
}, En = (e, t, n, r) => $(e, t.flatMap((t, i) => t.temporalGrouping ? [mn(n, e.resolvedRefs[t.ref], t.ref, t.path ?? [...r, i], t.temporalGrouping)] : []), r), Dn = (e, t, n, r) => $(e, t.flatMap((t) => t.showNullValues === void 0 ? [] : [{
|
|
1163
1163
|
name: n,
|
|
1164
1164
|
payload: {
|
|
1165
|
-
...
|
|
1165
|
+
...Y(e.resolvedRefs[t.ref]),
|
|
1166
1166
|
changes: { showNullValues: t.showNullValues }
|
|
1167
1167
|
}
|
|
1168
|
-
}]), r),
|
|
1168
|
+
}]), r), On = (e, t) => t ? $(e, [{
|
|
1169
1169
|
id: "filterGroup",
|
|
1170
1170
|
name: "setStaticFilterGroup",
|
|
1171
|
-
payload:
|
|
1171
|
+
payload: X(t)
|
|
1172
1172
|
}], ["filterGroup"]) : Promise.resolve({
|
|
1173
1173
|
state: e,
|
|
1174
1174
|
success: !0
|
|
1175
|
-
}),
|
|
1175
|
+
}), kn = (e, t, n, r) => {
|
|
1176
1176
|
if (!t?.length) return Promise.resolve({
|
|
1177
1177
|
state: e,
|
|
1178
1178
|
success: !0
|
|
@@ -1187,7 +1187,7 @@ var cn = (t, n) => {
|
|
|
1187
1187
|
}))].map((e, t) => {
|
|
1188
1188
|
let n = `${e.dataItemInternalKey}:${e.dataItemUniqueSignature}`, r = o.get(n), s = i.find((e) => `${e.dataItem.internalKey}:${e.dataItem.uniqueSignature}` === n);
|
|
1189
1189
|
return {
|
|
1190
|
-
...
|
|
1190
|
+
...Y(e),
|
|
1191
1191
|
newIndex: t,
|
|
1192
1192
|
sortDirection: (r ? a.get(r)?.direction : void 0) ?? s?.sortDirection ?? "asc"
|
|
1193
1193
|
};
|
|
@@ -1195,24 +1195,24 @@ var cn = (t, n) => {
|
|
|
1195
1195
|
}, ...t.map((t) => ({
|
|
1196
1196
|
name: r,
|
|
1197
1197
|
payload: {
|
|
1198
|
-
...
|
|
1198
|
+
...Y(e.resolvedRefs[t.by]),
|
|
1199
1199
|
enabled: t.enabled ?? !0
|
|
1200
1200
|
}
|
|
1201
1201
|
}))], ["sorting"]);
|
|
1202
|
-
},
|
|
1202
|
+
}, An = (e, t) => {
|
|
1203
1203
|
let n = [];
|
|
1204
1204
|
return t?.overwrites && n.push({
|
|
1205
|
-
name:
|
|
1205
|
+
name: ve.SET_COLORING_OVERWRITES,
|
|
1206
1206
|
payload: { overwrites: t.overwrites.map(({ dimension: t, ...n }) => t === void 0 ? n : {
|
|
1207
1207
|
...n,
|
|
1208
|
-
dimension:
|
|
1208
|
+
dimension: Y(e.resolvedRefs[t])
|
|
1209
1209
|
}) }
|
|
1210
1210
|
}), t?.rules && n.push({
|
|
1211
|
-
name:
|
|
1211
|
+
name: ve.SET_COLORING_RULES,
|
|
1212
1212
|
payload: { rules: t.rules.map(({ measure: t, ...n }) => ({
|
|
1213
1213
|
...n,
|
|
1214
|
-
measure:
|
|
1214
|
+
measure: Y(e.resolvedRefs[t])
|
|
1215
1215
|
})) }
|
|
1216
|
-
}), $(e, n,
|
|
1216
|
+
}), $(e, n, Z);
|
|
1217
1217
|
};
|
|
1218
|
-
export {
|
|
1218
|
+
export { mt as $, rn as A, Mt as B, dn as C, $t as D, en as E, jt as F, rt as G, wt as H, Et as I, lt as J, ut as K, Dt as L, Kt as M, B as N, W as O, Vt as P, ct as Q, Ot as R, _n as S, sn as T, Ct as U, At as V, yt as W, ot as X, st as Y, dt as Z, bn as _, Tn as a, et as at, X as b, xn as c, J as d, at as et, cn as f, vn as g, $ as h, On as i, gt as it, nn as j, tn as k, ln as l, mn as m, An as n, pt as nt, kn as o, T as ot, un as p, it as q, Dn as r, ht as rt, En as s, Se as st, wn as t, ft as tt, pn as u, fn as v, G as w, gn as x, Y as y, kt as z };
|