@dlh.io/bideux 0.1.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/LICENSE +202 -0
- package/README.md +90 -0
- package/dist/all.d.ts +14 -0
- package/dist/all.js +15 -0
- package/dist/all.js.map +1 -0
- package/dist/chunk-62IQGXLW.js +11470 -0
- package/dist/chunk-62IQGXLW.js.map +1 -0
- package/dist/chunk-75CRTQK7.js +315 -0
- package/dist/chunk-75CRTQK7.js.map +1 -0
- package/dist/chunk-FVO6E22Z.js +225 -0
- package/dist/chunk-FVO6E22Z.js.map +1 -0
- package/dist/chunk-GRITOB4M.js +337 -0
- package/dist/chunk-GRITOB4M.js.map +1 -0
- package/dist/chunk-HPFHIZWO.js +40 -0
- package/dist/chunk-HPFHIZWO.js.map +1 -0
- package/dist/chunk-IMNUQGHE.js +2864 -0
- package/dist/chunk-IMNUQGHE.js.map +1 -0
- package/dist/chunk-LHD445PJ.js +571 -0
- package/dist/chunk-LHD445PJ.js.map +1 -0
- package/dist/chunk-LPLBBHOW.js +386 -0
- package/dist/chunk-LPLBBHOW.js.map +1 -0
- package/dist/chunk-NGM5R3LW.js +881 -0
- package/dist/chunk-NGM5R3LW.js.map +1 -0
- package/dist/chunk-OMPR32AR.js +1320 -0
- package/dist/chunk-OMPR32AR.js.map +1 -0
- package/dist/chunk-QDQ5VVTC.js +255 -0
- package/dist/chunk-QDQ5VVTC.js.map +1 -0
- package/dist/chunk-RRWZKNDZ.js +1004 -0
- package/dist/chunk-RRWZKNDZ.js.map +1 -0
- package/dist/chunk-SRWIBMEB.js +178 -0
- package/dist/chunk-SRWIBMEB.js.map +1 -0
- package/dist/element/chunk-AOKCBPMV.js +1646 -0
- package/dist/element/chunk-AOKCBPMV.js.map +1 -0
- package/dist/element/chunk-B67SYRQP.js +281 -0
- package/dist/element/chunk-B67SYRQP.js.map +1 -0
- package/dist/element/chunk-FNRVFA2C.js +55 -0
- package/dist/element/chunk-FNRVFA2C.js.map +1 -0
- package/dist/element/chunk-G3C722QP.js +4707 -0
- package/dist/element/chunk-G3C722QP.js.map +1 -0
- package/dist/element/chunk-H5IFOSQP.js +346 -0
- package/dist/element/chunk-H5IFOSQP.js.map +1 -0
- package/dist/element/chunk-LXR3CLCN.js +30 -0
- package/dist/element/chunk-LXR3CLCN.js.map +1 -0
- package/dist/element/chunk-TFV4CJR4.js +183 -0
- package/dist/element/chunk-TFV4CJR4.js.map +1 -0
- package/dist/element/chunk-TXSK3CIN.js +859 -0
- package/dist/element/chunk-TXSK3CIN.js.map +1 -0
- package/dist/element/chunk-WDTTBY3S.js +45 -0
- package/dist/element/chunk-WDTTBY3S.js.map +1 -0
- package/dist/element/chunk-ZI3RYCAR.js +233 -0
- package/dist/element/chunk-ZI3RYCAR.js.map +1 -0
- package/dist/element/element.d.ts +3044 -0
- package/dist/element/element.js +146554 -0
- package/dist/element/element.js.map +1 -0
- package/dist/element/revo-grid.entry-7FHEBN3O.js +4817 -0
- package/dist/element/revo-grid.entry-7FHEBN3O.js.map +1 -0
- package/dist/element/revogr-attribution_7.entry-LSOFVZRA.js +1328 -0
- package/dist/element/revogr-attribution_7.entry-LSOFVZRA.js.map +1 -0
- package/dist/element/revogr-clipboard_3.entry-V74UIBPJ.js +494 -0
- package/dist/element/revogr-clipboard_3.entry-V74UIBPJ.js.map +1 -0
- package/dist/element/revogr-data_4.entry-2UBOKTFN.js +1041 -0
- package/dist/element/revogr-data_4.entry-2UBOKTFN.js.map +1 -0
- package/dist/element/revogr-filter-panel.entry-B24PLQU4.js +552 -0
- package/dist/element/revogr-filter-panel.entry-B24PLQU4.js.map +1 -0
- package/dist/index.d.ts +1041 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/react.d.ts +1915 -0
- package/dist/react.js +14 -0
- package/dist/react.js.map +1 -0
- package/dist/renderers/echarts.d.ts +44 -0
- package/dist/renderers/echarts.js +6 -0
- package/dist/renderers/echarts.js.map +1 -0
- package/dist/renderers/index.d.ts +48 -0
- package/dist/renderers/index.js +12 -0
- package/dist/renderers/index.js.map +1 -0
- package/dist/renderers/revogrid.d.ts +76 -0
- package/dist/renderers/revogrid.js +6 -0
- package/dist/renderers/revogrid.js.map +1 -0
- package/dist/renderers/tabulator.d.ts +37 -0
- package/dist/renderers/tabulator.js +6 -0
- package/dist/renderers/tabulator.js.map +1 -0
- package/dist/result-table-CPls-277.d.ts +1885 -0
- package/dist/schema/dashboard.schema.json +4374 -0
- package/dist/schema/semantic-model.schema.json +1200 -0
- package/dist/schema/widget.schema.json +1793 -0
- package/dist/styles.css +156 -0
- package/dist/theme.css +1789 -0
- package/dist/types-CHFSsU_X.d.ts +1007 -0
- package/package.json +119 -0
|
@@ -0,0 +1,1007 @@
|
|
|
1
|
+
type Kind = "widget";
|
|
2
|
+
type Author = string | null;
|
|
3
|
+
type Description = string;
|
|
4
|
+
type Backgroundcolor = string | null;
|
|
5
|
+
type Border = string | boolean | null;
|
|
6
|
+
type Borderradius = string | number | null;
|
|
7
|
+
type Color = string | null;
|
|
8
|
+
type Fontsize = string | number | null;
|
|
9
|
+
type Fontweight = string | number | null;
|
|
10
|
+
type Padding = string | number | null;
|
|
11
|
+
type Textalign = ("left" | "center" | "right" | "justify") | null;
|
|
12
|
+
type Title = string | LabelBlock | null;
|
|
13
|
+
type Icon = string | null;
|
|
14
|
+
type Position = ("top" | "bottom" | "left" | "right") | null;
|
|
15
|
+
type Text = string | null;
|
|
16
|
+
type Tooltip = string | null;
|
|
17
|
+
type Verticalalign = ("top" | "middle" | "bottom") | null;
|
|
18
|
+
type Visible = boolean | null;
|
|
19
|
+
type Id = string;
|
|
20
|
+
type Name = string;
|
|
21
|
+
type AllowEmbed = boolean;
|
|
22
|
+
type Owner = string | null;
|
|
23
|
+
type Public = boolean;
|
|
24
|
+
type Roles = string[];
|
|
25
|
+
type Scope = "org" | "project" | "dashboard" | "widget";
|
|
26
|
+
type Status = "draft" | "published" | "archived";
|
|
27
|
+
type Tags = string[];
|
|
28
|
+
type Version = string;
|
|
29
|
+
type Tags1 = string[];
|
|
30
|
+
type Version1 = string;
|
|
31
|
+
type Field = string;
|
|
32
|
+
type Operator = "eq" | "in" | "gt" | "lt" | "gte" | "lte" | "contains" | "date" | "between";
|
|
33
|
+
type Param = string | null;
|
|
34
|
+
type Target = string;
|
|
35
|
+
type Bindings = FilterBinding[];
|
|
36
|
+
type Component = "echarts" | "kpi" | "filter" | "select" | "table" | "tabulator" | "pivot_table" | "text" | "image" | "markdown";
|
|
37
|
+
type Data = Data1 | null;
|
|
38
|
+
type Data1 = KpiDataSource | StaticDataSource | DemoDataSource | SqlDataSource | DatasetDataSource | QueryDataSource;
|
|
39
|
+
type DataModelId = string | null;
|
|
40
|
+
type Kind1 = "kpi";
|
|
41
|
+
type Kpi = string;
|
|
42
|
+
type Labelcolumn = string | null;
|
|
43
|
+
type JsonValue = unknown;
|
|
44
|
+
type Valuecolumn = string | null;
|
|
45
|
+
type Columns = string[] | null;
|
|
46
|
+
type Kind2 = "static";
|
|
47
|
+
type Label = string;
|
|
48
|
+
type Options = StaticOption[];
|
|
49
|
+
type Rows = {
|
|
50
|
+
[k: string]: JsonValue;
|
|
51
|
+
}[];
|
|
52
|
+
type Columns1 = string[] | null;
|
|
53
|
+
type Dataset = string | null;
|
|
54
|
+
type Kind3 = "demo";
|
|
55
|
+
type Rows1 = number;
|
|
56
|
+
type Seed = number;
|
|
57
|
+
type DataModelId1 = string | null;
|
|
58
|
+
type FilterField = string | null;
|
|
59
|
+
type Kind4 = "sql";
|
|
60
|
+
type Query = string;
|
|
61
|
+
type Columns2 = string[] | null;
|
|
62
|
+
type DataModelId2 = string | null;
|
|
63
|
+
type Dataset1 = string;
|
|
64
|
+
type Dimensions = string[] | null;
|
|
65
|
+
type Field1 = string;
|
|
66
|
+
type FilterId = string;
|
|
67
|
+
type Operator1 = "eq" | "in" | "gt" | "lt" | "gte" | "lte" | "contains" | "date" | "between";
|
|
68
|
+
type Param1 = string | null;
|
|
69
|
+
type Filters = IncomingFilter[];
|
|
70
|
+
type Kind5 = "dataset";
|
|
71
|
+
type Metrics = string[] | null;
|
|
72
|
+
type DataModelId3 = string | null;
|
|
73
|
+
type Kind6 = "query";
|
|
74
|
+
type Query1 = string;
|
|
75
|
+
type Background = string | null;
|
|
76
|
+
type Border1 = string | boolean | null;
|
|
77
|
+
type Borderradius1 = string | number | null;
|
|
78
|
+
type Echarts = {
|
|
79
|
+
[k: string]: JsonValue;
|
|
80
|
+
} | null;
|
|
81
|
+
type Filter = {
|
|
82
|
+
[k: string]: JsonValue;
|
|
83
|
+
} | null;
|
|
84
|
+
type Image = {
|
|
85
|
+
[k: string]: JsonValue;
|
|
86
|
+
} | null;
|
|
87
|
+
type Kpi1 = {
|
|
88
|
+
[k: string]: JsonValue;
|
|
89
|
+
} | null;
|
|
90
|
+
type Margin = string | number | null;
|
|
91
|
+
type Markdown = {
|
|
92
|
+
[k: string]: JsonValue;
|
|
93
|
+
} | null;
|
|
94
|
+
type Padding1 = string | number | null;
|
|
95
|
+
type PivotTable = {
|
|
96
|
+
[k: string]: JsonValue;
|
|
97
|
+
} | null;
|
|
98
|
+
type Select = {
|
|
99
|
+
[k: string]: JsonValue;
|
|
100
|
+
} | null;
|
|
101
|
+
type Shadow = string | boolean | null;
|
|
102
|
+
type Table = {
|
|
103
|
+
[k: string]: JsonValue;
|
|
104
|
+
} | null;
|
|
105
|
+
type Tabulator = {
|
|
106
|
+
[k: string]: JsonValue;
|
|
107
|
+
} | null;
|
|
108
|
+
type Text1 = {
|
|
109
|
+
[k: string]: JsonValue;
|
|
110
|
+
} | null;
|
|
111
|
+
type Filters1 = IncomingFilter[];
|
|
112
|
+
type Id1 = string;
|
|
113
|
+
type Label1 = string | null;
|
|
114
|
+
type OpenIn = "modal" | "same" | "new" | "detail";
|
|
115
|
+
type PassFilters = boolean;
|
|
116
|
+
type PassSelection = boolean;
|
|
117
|
+
type Target1 = string;
|
|
118
|
+
type TargetType = "dashboard" | "url" | "filter" | "dimension";
|
|
119
|
+
type Type = "drilldown" | "set_filter" | "navigate";
|
|
120
|
+
type Field2 = string | null;
|
|
121
|
+
type Kind7 = "event" | "filter" | "literal";
|
|
122
|
+
type Target2 = string;
|
|
123
|
+
type TargetType1 = "filter" | "dimension";
|
|
124
|
+
type VariableMappings = InteractionVariableMapping[];
|
|
125
|
+
type Interactions = WidgetInteraction[];
|
|
126
|
+
type H = number;
|
|
127
|
+
type Isbounded = boolean | null;
|
|
128
|
+
type Isdraggable = boolean | null;
|
|
129
|
+
type Isresizable = boolean | null;
|
|
130
|
+
type Maxh = number | null;
|
|
131
|
+
type Maxw = number | null;
|
|
132
|
+
type Minh = number | null;
|
|
133
|
+
type Minw = number | null;
|
|
134
|
+
type Resizehandles = string[] | null;
|
|
135
|
+
type H1 = number;
|
|
136
|
+
type Isbounded1 = boolean | null;
|
|
137
|
+
type Isdraggable1 = boolean | null;
|
|
138
|
+
type Isresizable1 = boolean | null;
|
|
139
|
+
type Maxh1 = number | null;
|
|
140
|
+
type Maxw1 = number | null;
|
|
141
|
+
type Minh1 = number | null;
|
|
142
|
+
type Minw1 = number | null;
|
|
143
|
+
type Resizehandles1 = string[] | null;
|
|
144
|
+
type W = number;
|
|
145
|
+
type X = number;
|
|
146
|
+
type Y = number;
|
|
147
|
+
type Unplaced = boolean | null;
|
|
148
|
+
type W1 = number;
|
|
149
|
+
type X1 = number;
|
|
150
|
+
type Y1 = number;
|
|
151
|
+
type Category = string | null;
|
|
152
|
+
type Date = string | null;
|
|
153
|
+
type Delta = string | null;
|
|
154
|
+
type Label2 = string | null;
|
|
155
|
+
type Series = string | null;
|
|
156
|
+
type SeriesName = string | null;
|
|
157
|
+
type Value = string | null;
|
|
158
|
+
type X2 = string | null;
|
|
159
|
+
type Y2 = string | null;
|
|
160
|
+
type Version2 = string;
|
|
161
|
+
/**
|
|
162
|
+
* Specification for a single widget/object.
|
|
163
|
+
*/
|
|
164
|
+
interface WidgetSpec {
|
|
165
|
+
kind?: Kind;
|
|
166
|
+
metadata: Metadata;
|
|
167
|
+
spec: WidgetSpecInner;
|
|
168
|
+
version?: Version2;
|
|
169
|
+
[k: string]: unknown;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Common metadata for dashboards and widgets.
|
|
173
|
+
*/
|
|
174
|
+
interface Metadata {
|
|
175
|
+
author?: Author;
|
|
176
|
+
description?: Description;
|
|
177
|
+
header?: WidgetHeader | null;
|
|
178
|
+
id: Id;
|
|
179
|
+
name: Name;
|
|
180
|
+
platform?: PlatformAttributes;
|
|
181
|
+
tags?: Tags1;
|
|
182
|
+
version?: Version1;
|
|
183
|
+
[k: string]: unknown;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Object-level header/title configuration for any widget.
|
|
187
|
+
*/
|
|
188
|
+
interface WidgetHeader {
|
|
189
|
+
backgroundColor?: Backgroundcolor;
|
|
190
|
+
border?: Border;
|
|
191
|
+
borderRadius?: Borderradius;
|
|
192
|
+
color?: Color;
|
|
193
|
+
fontSize?: Fontsize;
|
|
194
|
+
fontWeight?: Fontweight;
|
|
195
|
+
padding?: Padding;
|
|
196
|
+
textAlign?: Textalign;
|
|
197
|
+
title?: Title;
|
|
198
|
+
verticalAlign?: Verticalalign;
|
|
199
|
+
visible?: Visible;
|
|
200
|
+
[k: string]: unknown;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* A rich label with optional tooltip and icon.
|
|
204
|
+
*/
|
|
205
|
+
interface LabelBlock {
|
|
206
|
+
icon?: Icon;
|
|
207
|
+
position?: Position;
|
|
208
|
+
text?: Text;
|
|
209
|
+
tooltip?: Tooltip;
|
|
210
|
+
[k: string]: unknown;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Cross-cutting platform attributes attached to every dashboard object.
|
|
214
|
+
*
|
|
215
|
+
* These attributes control the relationship of the object to the platform,
|
|
216
|
+
* the dashboard, the user, and security. They are intentionally generic so
|
|
217
|
+
* the spec can grow into the larger enterprise BI project.
|
|
218
|
+
*/
|
|
219
|
+
interface PlatformAttributes {
|
|
220
|
+
allow_embed?: AllowEmbed;
|
|
221
|
+
owner?: Owner;
|
|
222
|
+
public?: Public;
|
|
223
|
+
roles?: Roles;
|
|
224
|
+
scope?: Scope;
|
|
225
|
+
status?: Status;
|
|
226
|
+
tags?: Tags;
|
|
227
|
+
version?: Version;
|
|
228
|
+
[k: string]: unknown;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Inner spec body of a widget.
|
|
232
|
+
*/
|
|
233
|
+
interface WidgetSpecInner {
|
|
234
|
+
bindings?: Bindings;
|
|
235
|
+
component?: Component;
|
|
236
|
+
data?: Data;
|
|
237
|
+
display?: WidgetDisplay;
|
|
238
|
+
filters?: Filters1;
|
|
239
|
+
interactions?: Interactions;
|
|
240
|
+
layout?: WidgetLayout;
|
|
241
|
+
mappings?: FieldMapping;
|
|
242
|
+
[k: string]: unknown;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* How a filter widget is wired to a target widget.
|
|
246
|
+
*/
|
|
247
|
+
interface FilterBinding {
|
|
248
|
+
field: Field;
|
|
249
|
+
operator?: Operator;
|
|
250
|
+
param?: Param;
|
|
251
|
+
target?: Target;
|
|
252
|
+
[k: string]: unknown;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Run a KPI from the catalog.
|
|
256
|
+
*/
|
|
257
|
+
interface KpiDataSource {
|
|
258
|
+
data_model_id?: DataModelId;
|
|
259
|
+
kind?: Kind1;
|
|
260
|
+
kpi: Kpi;
|
|
261
|
+
labelColumn?: Labelcolumn;
|
|
262
|
+
params?: Params;
|
|
263
|
+
valueColumn?: Valuecolumn;
|
|
264
|
+
[k: string]: unknown;
|
|
265
|
+
}
|
|
266
|
+
interface Params {
|
|
267
|
+
[k: string]: JsonValue;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Static data supplied inline in the spec.
|
|
271
|
+
*/
|
|
272
|
+
interface StaticDataSource {
|
|
273
|
+
columns?: Columns;
|
|
274
|
+
default_value?: {
|
|
275
|
+
[k: string]: unknown;
|
|
276
|
+
};
|
|
277
|
+
kind?: Kind2;
|
|
278
|
+
options?: Options;
|
|
279
|
+
rows?: Rows;
|
|
280
|
+
[k: string]: unknown;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* A single option for a static select or filter.
|
|
284
|
+
*/
|
|
285
|
+
interface StaticOption {
|
|
286
|
+
label: Label;
|
|
287
|
+
value: JsonValue;
|
|
288
|
+
[k: string]: unknown;
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Deterministic generated data for testing and previews.
|
|
292
|
+
*/
|
|
293
|
+
interface DemoDataSource {
|
|
294
|
+
columns?: Columns1;
|
|
295
|
+
dataset?: Dataset;
|
|
296
|
+
kind?: Kind3;
|
|
297
|
+
rows?: Rows1;
|
|
298
|
+
seed?: Seed;
|
|
299
|
+
[k: string]: unknown;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Run an arbitrary SQL query against the configured data store.
|
|
303
|
+
*/
|
|
304
|
+
interface SqlDataSource {
|
|
305
|
+
data_model_id?: DataModelId1;
|
|
306
|
+
filter_field?: FilterField;
|
|
307
|
+
kind?: Kind4;
|
|
308
|
+
params?: Params1;
|
|
309
|
+
query: Query;
|
|
310
|
+
[k: string]: unknown;
|
|
311
|
+
}
|
|
312
|
+
interface Params1 {
|
|
313
|
+
[k: string]: JsonValue;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Reference a reusable Dataset defined in the dashboard manifest.
|
|
317
|
+
*/
|
|
318
|
+
interface DatasetDataSource {
|
|
319
|
+
columns?: Columns2;
|
|
320
|
+
data_model_id?: DataModelId2;
|
|
321
|
+
dataset: Dataset1;
|
|
322
|
+
dimensions?: Dimensions;
|
|
323
|
+
filters?: Filters;
|
|
324
|
+
kind?: Kind5;
|
|
325
|
+
metrics?: Metrics;
|
|
326
|
+
params?: Params2;
|
|
327
|
+
[k: string]: unknown;
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* How a target widget or dataset applies a filter broadcast from the dashboard.
|
|
331
|
+
*/
|
|
332
|
+
interface IncomingFilter {
|
|
333
|
+
field: Field1;
|
|
334
|
+
filter_id: FilterId;
|
|
335
|
+
operator?: Operator1;
|
|
336
|
+
param?: Param1;
|
|
337
|
+
[k: string]: unknown;
|
|
338
|
+
}
|
|
339
|
+
interface Params2 {
|
|
340
|
+
[k: string]: JsonValue;
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Reference a named query defined in the dashboard manifest.
|
|
344
|
+
*/
|
|
345
|
+
interface QueryDataSource {
|
|
346
|
+
data_model_id?: DataModelId3;
|
|
347
|
+
kind?: Kind6;
|
|
348
|
+
params?: Params3;
|
|
349
|
+
query: Query1;
|
|
350
|
+
[k: string]: unknown;
|
|
351
|
+
}
|
|
352
|
+
interface Params3 {
|
|
353
|
+
[k: string]: JsonValue;
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Display-specific configuration.
|
|
357
|
+
*/
|
|
358
|
+
interface WidgetDisplay {
|
|
359
|
+
background?: Background;
|
|
360
|
+
border?: Border1;
|
|
361
|
+
borderRadius?: Borderradius1;
|
|
362
|
+
echarts?: Echarts;
|
|
363
|
+
filter?: Filter;
|
|
364
|
+
image?: Image;
|
|
365
|
+
kpi?: Kpi1;
|
|
366
|
+
margin?: Margin;
|
|
367
|
+
markdown?: Markdown;
|
|
368
|
+
padding?: Padding1;
|
|
369
|
+
pivot_table?: PivotTable;
|
|
370
|
+
select?: Select;
|
|
371
|
+
shadow?: Shadow;
|
|
372
|
+
table?: Table;
|
|
373
|
+
tabulator?: Tabulator;
|
|
374
|
+
text?: Text1;
|
|
375
|
+
[k: string]: unknown;
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* A user-driven interaction on a widget.
|
|
379
|
+
*/
|
|
380
|
+
interface WidgetInteraction {
|
|
381
|
+
id: Id1;
|
|
382
|
+
label?: Label1;
|
|
383
|
+
open_in?: OpenIn;
|
|
384
|
+
pass_filters?: PassFilters;
|
|
385
|
+
pass_selection?: PassSelection;
|
|
386
|
+
target: Target1;
|
|
387
|
+
target_type?: TargetType;
|
|
388
|
+
type: Type;
|
|
389
|
+
variable_mappings?: VariableMappings;
|
|
390
|
+
[k: string]: unknown;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Map a source value (event, filter, or literal) to a target filter/variable.
|
|
394
|
+
*/
|
|
395
|
+
interface InteractionVariableMapping {
|
|
396
|
+
source?: InteractionVariableSource;
|
|
397
|
+
target: Target2;
|
|
398
|
+
target_type?: TargetType1;
|
|
399
|
+
[k: string]: unknown;
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Source of a value for an interaction variable mapping.
|
|
403
|
+
*/
|
|
404
|
+
interface InteractionVariableSource {
|
|
405
|
+
field?: Field2;
|
|
406
|
+
kind?: Kind7;
|
|
407
|
+
value?: unknown;
|
|
408
|
+
[k: string]: unknown;
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Layout configuration for a widget.
|
|
412
|
+
*/
|
|
413
|
+
interface WidgetLayout {
|
|
414
|
+
h?: H;
|
|
415
|
+
isBounded?: Isbounded;
|
|
416
|
+
isDraggable?: Isdraggable;
|
|
417
|
+
isResizable?: Isresizable;
|
|
418
|
+
maxH?: Maxh;
|
|
419
|
+
maxW?: Maxw;
|
|
420
|
+
minH?: Minh;
|
|
421
|
+
minW?: Minw;
|
|
422
|
+
resizeHandles?: Resizehandles;
|
|
423
|
+
responsive?: ResponsiveLayout;
|
|
424
|
+
unplaced?: Unplaced;
|
|
425
|
+
w?: W1;
|
|
426
|
+
x?: X1;
|
|
427
|
+
y?: Y1;
|
|
428
|
+
[k: string]: unknown;
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Responsive overrides for a layout item.
|
|
432
|
+
*/
|
|
433
|
+
interface ResponsiveLayout {
|
|
434
|
+
desktop?: LayoutItem | null;
|
|
435
|
+
mobile?: LayoutItem | null;
|
|
436
|
+
tablet?: LayoutItem | null;
|
|
437
|
+
wide?: LayoutItem | null;
|
|
438
|
+
[k: string]: unknown;
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* A single position/size entry in a responsive grid.
|
|
442
|
+
*/
|
|
443
|
+
interface LayoutItem {
|
|
444
|
+
h?: H1;
|
|
445
|
+
isBounded?: Isbounded1;
|
|
446
|
+
isDraggable?: Isdraggable1;
|
|
447
|
+
isResizable?: Isresizable1;
|
|
448
|
+
maxH?: Maxh1;
|
|
449
|
+
maxW?: Maxw1;
|
|
450
|
+
minH?: Minh1;
|
|
451
|
+
minW?: Minw1;
|
|
452
|
+
resizeHandles?: Resizehandles1;
|
|
453
|
+
w?: W;
|
|
454
|
+
x?: X;
|
|
455
|
+
y?: Y;
|
|
456
|
+
[k: string]: unknown;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Map widget fields to columns in the data source.
|
|
460
|
+
*/
|
|
461
|
+
interface FieldMapping {
|
|
462
|
+
category?: Category;
|
|
463
|
+
date?: Date;
|
|
464
|
+
delta?: Delta;
|
|
465
|
+
label?: Label2;
|
|
466
|
+
series?: Series;
|
|
467
|
+
series_name?: SeriesName;
|
|
468
|
+
value?: Value;
|
|
469
|
+
x?: X2;
|
|
470
|
+
y?: Y2;
|
|
471
|
+
[k: string]: unknown;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
interface WidgetInteractionContext {
|
|
475
|
+
widgetId: string;
|
|
476
|
+
data?: Record<string, unknown>;
|
|
477
|
+
value?: unknown;
|
|
478
|
+
}
|
|
479
|
+
interface DrillStackItem {
|
|
480
|
+
id: string;
|
|
481
|
+
name: string;
|
|
482
|
+
filters: Record<string, unknown>;
|
|
483
|
+
}
|
|
484
|
+
declare function getClickInteraction(widget: WidgetSpec): WidgetInteraction | undefined;
|
|
485
|
+
declare function findEventRow(rows: Record<string, unknown>[], mappings: WidgetSpec["spec"]["mappings"], name?: string | null, seriesName?: string | null): Record<string, unknown> | undefined;
|
|
486
|
+
declare function resolveInteractionValue(mapping: NonNullable<WidgetInteraction["variable_mappings"]>[number], context: WidgetInteractionContext, currentFilters: Record<string, unknown>): unknown;
|
|
487
|
+
declare function resolveInteractionValues(interaction: WidgetInteraction, context: WidgetInteractionContext, currentFilters: Record<string, unknown>): Record<string, unknown>;
|
|
488
|
+
declare function isUrlInteraction(interaction: WidgetInteraction): boolean;
|
|
489
|
+
declare function encodeDrillStack(stack: DrillStackItem[]): string;
|
|
490
|
+
declare function decodeDrillStack(raw: string | null): DrillStackItem[];
|
|
491
|
+
declare function buildDrillUrl(targetDashboardId: string, targetFilters: Record<string, unknown>, currentStack: DrillStackItem[], options?: {
|
|
492
|
+
detail?: boolean;
|
|
493
|
+
currentDashboard?: DrillStackItem;
|
|
494
|
+
}): string;
|
|
495
|
+
|
|
496
|
+
type ChartOption = Record<string, unknown>;
|
|
497
|
+
type DataRow = Record<string, unknown>;
|
|
498
|
+
type WidgetResult = Record<string, unknown>;
|
|
499
|
+
type WidgetComponent = "echarts" | "kpi" | "filter" | "select" | "table" | "tabulator" | "pivot_table" | "text" | "image" | "markdown";
|
|
500
|
+
interface RendererLabel {
|
|
501
|
+
text?: string;
|
|
502
|
+
position: "top" | "bottom";
|
|
503
|
+
tooltip?: string;
|
|
504
|
+
tooltipIcon?: "info" | "check" | "help" | "warning";
|
|
505
|
+
}
|
|
506
|
+
interface WidgetTheme {
|
|
507
|
+
padding?: string | number;
|
|
508
|
+
margin?: string | number;
|
|
509
|
+
borderRadius?: string | number;
|
|
510
|
+
background?: string;
|
|
511
|
+
border?: string | boolean;
|
|
512
|
+
shadow?: string | boolean;
|
|
513
|
+
}
|
|
514
|
+
type WidgetDefaults = Partial<Record<WidgetComponent | "global", WidgetTheme>>;
|
|
515
|
+
interface RendererFrame {
|
|
516
|
+
widgetId: string;
|
|
517
|
+
component: string;
|
|
518
|
+
theme: WidgetTheme;
|
|
519
|
+
showObjectHeader: boolean;
|
|
520
|
+
label?: RendererLabel;
|
|
521
|
+
interactive: boolean;
|
|
522
|
+
}
|
|
523
|
+
interface KpiDeltaModel {
|
|
524
|
+
value: number;
|
|
525
|
+
formattedValue: string;
|
|
526
|
+
tone: "up" | "down" | "flat";
|
|
527
|
+
icon: "up" | "down" | "neutral" | "none";
|
|
528
|
+
comparedWith?: string;
|
|
529
|
+
tooltip?: string;
|
|
530
|
+
tooltipIcon?: "info" | "check" | "help" | "warning";
|
|
531
|
+
color?: string;
|
|
532
|
+
reference?: {
|
|
533
|
+
value: number;
|
|
534
|
+
formattedValue: string;
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
interface KpiValueFormat {
|
|
538
|
+
format: string;
|
|
539
|
+
prefix: string;
|
|
540
|
+
suffix: string;
|
|
541
|
+
compact: boolean;
|
|
542
|
+
decimals?: number;
|
|
543
|
+
}
|
|
544
|
+
interface KpiRendererModel {
|
|
545
|
+
kind: "kpi";
|
|
546
|
+
frame: RendererFrame;
|
|
547
|
+
value: number;
|
|
548
|
+
formattedValue: string;
|
|
549
|
+
settledValue: string;
|
|
550
|
+
/** How the value was formatted, so a host can format intermediate values the same way. */
|
|
551
|
+
valueFormat: KpiValueFormat;
|
|
552
|
+
delta?: KpiDeltaModel;
|
|
553
|
+
note?: string;
|
|
554
|
+
}
|
|
555
|
+
interface ChartRendererModel {
|
|
556
|
+
kind: "chart";
|
|
557
|
+
frame: RendererFrame;
|
|
558
|
+
option: ChartOption;
|
|
559
|
+
axisKey: string;
|
|
560
|
+
structureKey: string;
|
|
561
|
+
loading: boolean;
|
|
562
|
+
}
|
|
563
|
+
interface TextRendererStyle {
|
|
564
|
+
textAlign: "left" | "center" | "right" | "justify";
|
|
565
|
+
verticalAlign: "top" | "middle" | "bottom";
|
|
566
|
+
fontSize?: string | number;
|
|
567
|
+
fontWeight?: string | number;
|
|
568
|
+
color?: string;
|
|
569
|
+
lineHeight?: string | number;
|
|
570
|
+
letterSpacing?: string | number;
|
|
571
|
+
whiteSpace?: "normal" | "nowrap" | "pre" | "pre-wrap" | "pre-line";
|
|
572
|
+
truncate: boolean;
|
|
573
|
+
custom: Record<string, string | number>;
|
|
574
|
+
}
|
|
575
|
+
interface TextRendererModel {
|
|
576
|
+
kind: "text";
|
|
577
|
+
frame: RendererFrame;
|
|
578
|
+
content: string;
|
|
579
|
+
contentFormat: "text" | "markdown";
|
|
580
|
+
style: TextRendererStyle;
|
|
581
|
+
}
|
|
582
|
+
interface MarkdownRendererModel {
|
|
583
|
+
kind: "markdown";
|
|
584
|
+
frame: RendererFrame;
|
|
585
|
+
content: string;
|
|
586
|
+
}
|
|
587
|
+
interface ImageRendererModel {
|
|
588
|
+
kind: "image";
|
|
589
|
+
frame: RendererFrame;
|
|
590
|
+
source: string | null;
|
|
591
|
+
alt: string;
|
|
592
|
+
objectFit: "cover" | "contain";
|
|
593
|
+
}
|
|
594
|
+
type SortDirection = "asc" | "desc";
|
|
595
|
+
interface TableSortState {
|
|
596
|
+
column: string;
|
|
597
|
+
direction: SortDirection;
|
|
598
|
+
}
|
|
599
|
+
interface TableExportModel {
|
|
600
|
+
csv: boolean;
|
|
601
|
+
excel: boolean;
|
|
602
|
+
filename: string;
|
|
603
|
+
}
|
|
604
|
+
interface TableColumnModel {
|
|
605
|
+
field: string;
|
|
606
|
+
title: string;
|
|
607
|
+
sortable: boolean;
|
|
608
|
+
sortDirection: SortDirection | null;
|
|
609
|
+
}
|
|
610
|
+
interface TableCellModel {
|
|
611
|
+
field: string;
|
|
612
|
+
value: unknown;
|
|
613
|
+
text: string;
|
|
614
|
+
}
|
|
615
|
+
interface TableRowModel {
|
|
616
|
+
key: number;
|
|
617
|
+
data: DataRow;
|
|
618
|
+
cells: TableCellModel[];
|
|
619
|
+
}
|
|
620
|
+
interface TableRendererModel {
|
|
621
|
+
kind: "table";
|
|
622
|
+
frame: RendererFrame;
|
|
623
|
+
columns: TableColumnModel[];
|
|
624
|
+
rows: TableRowModel[];
|
|
625
|
+
allRows: DataRow[];
|
|
626
|
+
page: number;
|
|
627
|
+
pageSize: number;
|
|
628
|
+
pageCount: number;
|
|
629
|
+
totalRows: number;
|
|
630
|
+
sort: TableSortState | null;
|
|
631
|
+
exports: TableExportModel;
|
|
632
|
+
}
|
|
633
|
+
type GridColumnFormatterModel = {
|
|
634
|
+
kind: "percent";
|
|
635
|
+
precision: number;
|
|
636
|
+
params: Record<string, unknown>;
|
|
637
|
+
} | {
|
|
638
|
+
kind: "named";
|
|
639
|
+
name: string;
|
|
640
|
+
params: Record<string, unknown>;
|
|
641
|
+
};
|
|
642
|
+
interface GridColumnModel {
|
|
643
|
+
field: string;
|
|
644
|
+
title: string;
|
|
645
|
+
frozen: boolean;
|
|
646
|
+
headerSort: boolean;
|
|
647
|
+
formatter?: GridColumnFormatterModel;
|
|
648
|
+
width?: number | string;
|
|
649
|
+
headerTooltip?: string;
|
|
650
|
+
sorter?: string;
|
|
651
|
+
}
|
|
652
|
+
interface GridOptionsModel {
|
|
653
|
+
layout: "fitColumns" | "fitData" | "fitDataFill";
|
|
654
|
+
pagination: boolean;
|
|
655
|
+
pageSize?: number;
|
|
656
|
+
groupBy?: string;
|
|
657
|
+
groupStartOpen: boolean;
|
|
658
|
+
sortable: boolean;
|
|
659
|
+
}
|
|
660
|
+
interface TabulatorRendererModel {
|
|
661
|
+
kind: "tabulator";
|
|
662
|
+
frame: RendererFrame;
|
|
663
|
+
columns: GridColumnModel[];
|
|
664
|
+
rows: DataRow[];
|
|
665
|
+
options: GridOptionsModel;
|
|
666
|
+
exports: TableExportModel;
|
|
667
|
+
}
|
|
668
|
+
type PivotAggregation = "sum" | "avg" | "min" | "max" | "count" | "count_distinct";
|
|
669
|
+
interface PivotFieldPayload {
|
|
670
|
+
key: string;
|
|
671
|
+
label: string;
|
|
672
|
+
}
|
|
673
|
+
interface PivotMeasurePayload {
|
|
674
|
+
key: string;
|
|
675
|
+
label: string;
|
|
676
|
+
agg: PivotAggregation;
|
|
677
|
+
format: "number" | "currency" | "percent" | null;
|
|
678
|
+
decimals: number | null;
|
|
679
|
+
}
|
|
680
|
+
interface PivotColumnNode {
|
|
681
|
+
key: string;
|
|
682
|
+
label: string;
|
|
683
|
+
column: string | null;
|
|
684
|
+
measure: string | null;
|
|
685
|
+
is_total: boolean;
|
|
686
|
+
is_group_total: boolean;
|
|
687
|
+
children: PivotColumnNode[];
|
|
688
|
+
}
|
|
689
|
+
type PivotRowKind = "group" | "leaf" | "other" | "grand_total";
|
|
690
|
+
type PivotDirection = "asc" | "desc";
|
|
691
|
+
interface PivotRowPayload {
|
|
692
|
+
key: string;
|
|
693
|
+
label: string;
|
|
694
|
+
path: string[];
|
|
695
|
+
depth: number;
|
|
696
|
+
kind: PivotRowKind;
|
|
697
|
+
cells: Record<string, number | null>;
|
|
698
|
+
}
|
|
699
|
+
interface PivotTablePayload {
|
|
700
|
+
row_fields: PivotFieldPayload[];
|
|
701
|
+
column_fields: PivotFieldPayload[];
|
|
702
|
+
measures: PivotMeasurePayload[];
|
|
703
|
+
column_tree: PivotColumnNode[];
|
|
704
|
+
column_keys: string[];
|
|
705
|
+
column_labels: Record<string, string>;
|
|
706
|
+
rows: PivotRowPayload[];
|
|
707
|
+
total_row: PivotRowPayload | null;
|
|
708
|
+
value_range: Record<string, {
|
|
709
|
+
min: number;
|
|
710
|
+
max: number;
|
|
711
|
+
}>;
|
|
712
|
+
empty_value: string;
|
|
713
|
+
subtotals: "expanded" | "collapsed" | "none";
|
|
714
|
+
heatmap_measure: string | null;
|
|
715
|
+
snapshot_expand: number | null;
|
|
716
|
+
snapshot_expand_columns?: number | null;
|
|
717
|
+
sort: {
|
|
718
|
+
column: string | null;
|
|
719
|
+
measure: string | null;
|
|
720
|
+
direction: PivotDirection;
|
|
721
|
+
};
|
|
722
|
+
truncated: {
|
|
723
|
+
row_groups: number;
|
|
724
|
+
row_groups_total: number;
|
|
725
|
+
rolled_up: number;
|
|
726
|
+
columns: number;
|
|
727
|
+
columns_total: number;
|
|
728
|
+
};
|
|
729
|
+
fields: {
|
|
730
|
+
dimensions: PivotFieldPayload[];
|
|
731
|
+
measures: PivotFieldPayload[];
|
|
732
|
+
};
|
|
733
|
+
explore: boolean;
|
|
734
|
+
explored: boolean;
|
|
735
|
+
source?: {
|
|
736
|
+
records: (string | number | null)[][];
|
|
737
|
+
};
|
|
738
|
+
}
|
|
739
|
+
interface PivotDetailColumn {
|
|
740
|
+
key: string;
|
|
741
|
+
label: string;
|
|
742
|
+
}
|
|
743
|
+
interface PivotDetailResult {
|
|
744
|
+
component: "pivot_detail";
|
|
745
|
+
columns: PivotDetailColumn[];
|
|
746
|
+
rows: DataRow[];
|
|
747
|
+
row_count: number;
|
|
748
|
+
truncated: boolean;
|
|
749
|
+
}
|
|
750
|
+
declare const PIVOT_META_PROP = "__pivotMeta";
|
|
751
|
+
interface PivotGridRowMeta {
|
|
752
|
+
key: string;
|
|
753
|
+
label: string;
|
|
754
|
+
path: string[];
|
|
755
|
+
depth: number;
|
|
756
|
+
kind: PivotRowKind;
|
|
757
|
+
}
|
|
758
|
+
interface PivotGridRow {
|
|
759
|
+
[PIVOT_META_PROP]: PivotGridRowMeta;
|
|
760
|
+
[prop: string]: string | number | null | PivotGridRowMeta;
|
|
761
|
+
}
|
|
762
|
+
interface PivotGridColumn {
|
|
763
|
+
prop: string;
|
|
764
|
+
name: string;
|
|
765
|
+
columnKey: string | null;
|
|
766
|
+
measure: string | null;
|
|
767
|
+
isTotal: boolean;
|
|
768
|
+
isRowField: boolean;
|
|
769
|
+
pinStart: boolean;
|
|
770
|
+
}
|
|
771
|
+
interface PivotGridColumnGroup {
|
|
772
|
+
name: string;
|
|
773
|
+
key: string;
|
|
774
|
+
foldable: boolean;
|
|
775
|
+
folded: boolean;
|
|
776
|
+
leafCount: number;
|
|
777
|
+
children: PivotGridColumnDefinition[];
|
|
778
|
+
}
|
|
779
|
+
type PivotGridColumnDefinition = PivotGridColumn | PivotGridColumnGroup;
|
|
780
|
+
interface PivotSortState {
|
|
781
|
+
column: string;
|
|
782
|
+
direction: PivotDirection;
|
|
783
|
+
}
|
|
784
|
+
type PivotFilterOp = "gte" | "gt" | "eq" | "lte" | "lt";
|
|
785
|
+
interface PivotColumnFilter {
|
|
786
|
+
op: PivotFilterOp;
|
|
787
|
+
value: number;
|
|
788
|
+
}
|
|
789
|
+
interface PivotViewState {
|
|
790
|
+
collapsed: ReadonlySet<string>;
|
|
791
|
+
collapsedColumns: ReadonlySet<string>;
|
|
792
|
+
search: string;
|
|
793
|
+
filters: Readonly<Record<string, PivotColumnFilter>>;
|
|
794
|
+
sort: PivotSortState | null;
|
|
795
|
+
}
|
|
796
|
+
interface PivotOpenLevels {
|
|
797
|
+
rows: number | null;
|
|
798
|
+
columns: number | null;
|
|
799
|
+
}
|
|
800
|
+
interface PivotCellPresentation {
|
|
801
|
+
text: string;
|
|
802
|
+
align: "left" | "right";
|
|
803
|
+
emphasized: boolean;
|
|
804
|
+
heatmapIntensity: number | null;
|
|
805
|
+
}
|
|
806
|
+
interface PivotControlsModel {
|
|
807
|
+
searchPlaceholder: string;
|
|
808
|
+
expandable: boolean;
|
|
809
|
+
groupCount: number;
|
|
810
|
+
filterCount: number;
|
|
811
|
+
reordered: boolean;
|
|
812
|
+
canFilter: true;
|
|
813
|
+
canRearrange: false;
|
|
814
|
+
embedded: boolean;
|
|
815
|
+
}
|
|
816
|
+
interface MissingPivotRendererModel {
|
|
817
|
+
kind: "pivot";
|
|
818
|
+
status: "missing";
|
|
819
|
+
frame: RendererFrame;
|
|
820
|
+
message: "This widget did not return a pivot table.";
|
|
821
|
+
}
|
|
822
|
+
interface ReadyPivotRendererModel {
|
|
823
|
+
kind: "pivot";
|
|
824
|
+
status: "ready";
|
|
825
|
+
frame: RendererFrame;
|
|
826
|
+
payload: PivotTablePayload;
|
|
827
|
+
view: PivotViewState;
|
|
828
|
+
columns: PivotGridColumnDefinition[];
|
|
829
|
+
rows: PivotGridRow[];
|
|
830
|
+
totalRow: PivotGridRow | null;
|
|
831
|
+
valueColumns: PivotFieldPayload[];
|
|
832
|
+
columnGroups: PivotFieldPayload[];
|
|
833
|
+
truncation: string | null;
|
|
834
|
+
controls: PivotControlsModel;
|
|
835
|
+
exports: TableExportModel;
|
|
836
|
+
openLevels: PivotOpenLevels;
|
|
837
|
+
}
|
|
838
|
+
type PivotRendererModel = MissingPivotRendererModel | ReadyPivotRendererModel;
|
|
839
|
+
type PivotCellAction = {
|
|
840
|
+
kind: "toggle-row-group";
|
|
841
|
+
key: string;
|
|
842
|
+
} | {
|
|
843
|
+
kind: "interaction";
|
|
844
|
+
interaction: WidgetInteraction;
|
|
845
|
+
context: WidgetInteractionContext;
|
|
846
|
+
} | {
|
|
847
|
+
kind: "detail";
|
|
848
|
+
filters: Record<string, string>;
|
|
849
|
+
label: string;
|
|
850
|
+
};
|
|
851
|
+
interface UnknownRendererModel {
|
|
852
|
+
kind: "unknown";
|
|
853
|
+
frame: RendererFrame;
|
|
854
|
+
message: "Unknown widget type";
|
|
855
|
+
}
|
|
856
|
+
interface ExtensionRendererModel {
|
|
857
|
+
kind: "extension";
|
|
858
|
+
frame: RendererFrame;
|
|
859
|
+
name: string;
|
|
860
|
+
content: unknown;
|
|
861
|
+
}
|
|
862
|
+
type BasicRendererModel = KpiRendererModel | ChartRendererModel | TableRendererModel | TabulatorRendererModel | PivotRendererModel | TextRendererModel | MarkdownRendererModel | ImageRendererModel | UnknownRendererModel | ExtensionRendererModel;
|
|
863
|
+
type WidgetRenderState = {
|
|
864
|
+
kind: "loading";
|
|
865
|
+
skeleton: "kpi" | "chart" | "content";
|
|
866
|
+
message: "Loading widget";
|
|
867
|
+
} | {
|
|
868
|
+
kind: "error";
|
|
869
|
+
message: string;
|
|
870
|
+
hint?: string;
|
|
871
|
+
retryable: boolean;
|
|
872
|
+
} | {
|
|
873
|
+
kind: "notice";
|
|
874
|
+
message: string;
|
|
875
|
+
} | {
|
|
876
|
+
kind: "ready";
|
|
877
|
+
refreshing: boolean;
|
|
878
|
+
};
|
|
879
|
+
interface WidgetRenderResolution {
|
|
880
|
+
state: WidgetRenderState;
|
|
881
|
+
answeredOnce: boolean;
|
|
882
|
+
model?: BasicRendererModel;
|
|
883
|
+
}
|
|
884
|
+
interface RendererContext {
|
|
885
|
+
filters?: Record<string, unknown>;
|
|
886
|
+
filterLabels?: Record<string, string>;
|
|
887
|
+
widgetDefaults?: WidgetDefaults;
|
|
888
|
+
reducedMotion?: boolean;
|
|
889
|
+
answeredOnce?: boolean;
|
|
890
|
+
loading?: boolean;
|
|
891
|
+
retryable?: boolean;
|
|
892
|
+
registry?: RendererRegistry;
|
|
893
|
+
tableSort?: TableSortState | null;
|
|
894
|
+
tablePage?: number;
|
|
895
|
+
pivotView?: PivotViewState;
|
|
896
|
+
capture?: boolean;
|
|
897
|
+
embedded?: boolean;
|
|
898
|
+
/**
|
|
899
|
+
* True when a host frame already draws the card around the renderer, so the
|
|
900
|
+
* renderer keeps only its inner padding and draws no border, shadow, radius
|
|
901
|
+
* or background of its own.
|
|
902
|
+
*/
|
|
903
|
+
framed?: boolean;
|
|
904
|
+
/**
|
|
905
|
+
* False when no host exporter can write Excel files, so renderers hide
|
|
906
|
+
* their Excel button and keep CSV.
|
|
907
|
+
*/
|
|
908
|
+
excelExport?: boolean;
|
|
909
|
+
}
|
|
910
|
+
interface RendererExtensionInput {
|
|
911
|
+
widget: WidgetSpec;
|
|
912
|
+
result: WidgetResult;
|
|
913
|
+
frame: RendererFrame;
|
|
914
|
+
context: RendererContext;
|
|
915
|
+
}
|
|
916
|
+
type RendererExtension = (input: RendererExtensionInput) => unknown;
|
|
917
|
+
interface RendererRegistry {
|
|
918
|
+
register(name: string, renderer: RendererExtension): void;
|
|
919
|
+
unregister(name: string): void;
|
|
920
|
+
get(name: string): RendererExtension | undefined;
|
|
921
|
+
}
|
|
922
|
+
type TabularRendererModel = TabulatorRendererModel | ReadyPivotRendererModel;
|
|
923
|
+
interface TabularGridAdapter<TOutput = unknown> {
|
|
924
|
+
readonly name: string;
|
|
925
|
+
project(model: TabularRendererModel): TOutput;
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
interface BrowserRenderer<TInput> {
|
|
929
|
+
update(input: TInput): void;
|
|
930
|
+
resize(): void;
|
|
931
|
+
destroy(): void;
|
|
932
|
+
}
|
|
933
|
+
interface RendererThemeTokens {
|
|
934
|
+
foreground: string;
|
|
935
|
+
mutedForeground: string;
|
|
936
|
+
border: string;
|
|
937
|
+
surface: string;
|
|
938
|
+
surfaceForeground: string;
|
|
939
|
+
primary: string;
|
|
940
|
+
secondary: string;
|
|
941
|
+
danger: string;
|
|
942
|
+
fontFamily: string;
|
|
943
|
+
seriesColors: string[];
|
|
944
|
+
heatmapColors: string[];
|
|
945
|
+
}
|
|
946
|
+
interface RendererLicenseRequest {
|
|
947
|
+
renderer: "revogrid";
|
|
948
|
+
capability: "pivot-pro";
|
|
949
|
+
}
|
|
950
|
+
interface RendererLicensePort {
|
|
951
|
+
getLicense(request: RendererLicenseRequest): string | null | Promise<string | null>;
|
|
952
|
+
}
|
|
953
|
+
interface RendererExtensionMount {
|
|
954
|
+
element: HTMLElement;
|
|
955
|
+
model: Extract<BasicRendererModel, {
|
|
956
|
+
kind: "extension";
|
|
957
|
+
}>;
|
|
958
|
+
}
|
|
959
|
+
interface RendererExportRequest {
|
|
960
|
+
widgetId: string;
|
|
961
|
+
format: "csv" | "excel";
|
|
962
|
+
filename: string;
|
|
963
|
+
}
|
|
964
|
+
interface RendererPivotDetailRequest {
|
|
965
|
+
widgetId: string;
|
|
966
|
+
filters: Record<string, string>;
|
|
967
|
+
label: string;
|
|
968
|
+
}
|
|
969
|
+
interface RendererHostCallbacks {
|
|
970
|
+
onInteraction?: (interaction: WidgetInteraction, context: WidgetInteractionContext) => void;
|
|
971
|
+
onFilterChange?: (widgetId: string, value: unknown) => void;
|
|
972
|
+
onFilterLabelChange?: (widgetId: string, label: string) => void;
|
|
973
|
+
onExport?: (request: RendererExportRequest) => void | Promise<void>;
|
|
974
|
+
onPivotViewChange?: (widgetId: string, view: PivotViewState) => void;
|
|
975
|
+
onPivotDetail?: (request: RendererPivotDetailRequest) => void | Promise<void>;
|
|
976
|
+
onRetry?: () => void;
|
|
977
|
+
onError?: (error: Error) => void;
|
|
978
|
+
renderExtension?: (input: RendererExtensionMount) => BrowserRenderer<RendererExtensionMount> | void;
|
|
979
|
+
}
|
|
980
|
+
interface NativeWidgetRenderInput {
|
|
981
|
+
element: HTMLElement;
|
|
982
|
+
widget: WidgetSpec;
|
|
983
|
+
result?: WidgetResult;
|
|
984
|
+
context?: RendererContext;
|
|
985
|
+
filterValue?: unknown;
|
|
986
|
+
callbacks?: RendererHostCallbacks;
|
|
987
|
+
theme?: Partial<RendererThemeTokens>;
|
|
988
|
+
}
|
|
989
|
+
/**
|
|
990
|
+
* One widget renderer, whatever library draws it. A shell mounts a widget by
|
|
991
|
+
* asking a factory for this handle, then updates it as results and filters
|
|
992
|
+
* change, and destroys it on unmount.
|
|
993
|
+
*/
|
|
994
|
+
type WidgetRendererHandle = BrowserRenderer<NativeWidgetRenderInput>;
|
|
995
|
+
type WidgetRendererFactory = (input: NativeWidgetRenderInput) => WidgetRendererHandle | Promise<WidgetRendererHandle>;
|
|
996
|
+
/**
|
|
997
|
+
* Factories keyed by widget component, with a fallback for every component the
|
|
998
|
+
* host did not name. A host wires the concrete renderer packages here, so no
|
|
999
|
+
* shell carries a charting or grid dependency of its own.
|
|
1000
|
+
*/
|
|
1001
|
+
type WidgetRendererFactories = Partial<Record<string, WidgetRendererFactory>> & {
|
|
1002
|
+
default?: WidgetRendererFactory;
|
|
1003
|
+
};
|
|
1004
|
+
declare const defaultRendererTheme: RendererThemeTokens;
|
|
1005
|
+
declare function resolveRendererTheme(theme?: Partial<RendererThemeTokens>): RendererThemeTokens;
|
|
1006
|
+
|
|
1007
|
+
export { type PivotAggregation as $, type PivotRowKind as A, type BasicRendererModel as B, type ChartOption as C, type DataRow as D, type ExtensionRendererModel as E, type FieldMapping as F, type GridColumnFormatterModel as G, type PivotRowPayload as H, type ImageRendererModel as I, type PivotSortState as J, type KpiDeltaModel as K, type LabelBlock as L, type MarkdownRendererModel as M, type NativeWidgetRenderInput as N, type PivotTablePayload as O, PIVOT_META_PROP as P, type PivotViewState as Q, type ReadyPivotRendererModel as R, type RendererContext as S, type RendererExtension as T, type RendererExtensionInput as U, type RendererExtensionMount as V, type RendererFrame as W, type RendererHostCallbacks as X, type RendererLabel as Y, type RendererLicensePort as Z, type RendererLicenseRequest as _, type BrowserRenderer as a, type RendererPivotDetailRequest as a0, type PivotDirection as a1, type PivotOpenLevels as a2, type RendererRegistry as a3, type RendererThemeTokens as a4, type ResponsiveLayout as a5, type SortDirection as a6, type TableCellModel as a7, type TableColumnModel as a8, type TableExportModel as a9, defaultRendererTheme as aA, encodeDrillStack as aB, findEventRow as aC, getClickInteraction as aD, isUrlInteraction as aE, resolveInteractionValue as aF, resolveInteractionValues as aG, resolveRendererTheme as aH, type TableRendererModel as aa, type TableRowModel as ab, type TableSortState as ac, type TabularGridAdapter as ad, type TabularRendererModel as ae, type TabulatorRendererModel as af, type TextRendererModel as ag, type TextRendererStyle as ah, type UnknownRendererModel as ai, type RendererExportRequest as aj, type WidgetComponent as ak, type WidgetDefaults as al, type WidgetHeader as am, type WidgetInteraction as an, type WidgetInteractionContext as ao, type WidgetLayout as ap, type WidgetRenderResolution as aq, type WidgetRenderState as ar, type WidgetRendererFactories as as, type WidgetRendererFactory as at, type WidgetRendererHandle as au, type WidgetResult as av, type WidgetSpec as aw, type WidgetTheme as ax, buildDrillUrl as ay, decodeDrillStack as az, type ChartRendererModel as b, type DrillStackItem as c, type GridColumnModel as d, type GridOptionsModel as e, type InteractionVariableMapping as f, type InteractionVariableSource as g, type KpiRendererModel as h, type KpiValueFormat as i, type MissingPivotRendererModel as j, type PivotCellAction as k, type PivotCellPresentation as l, type PivotColumnFilter as m, type PivotColumnNode as n, type PivotControlsModel as o, type PivotDetailColumn as p, type PivotDetailResult as q, type PivotFieldPayload as r, type PivotFilterOp as s, type PivotGridColumn as t, type PivotGridColumnDefinition as u, type PivotGridColumnGroup as v, type PivotGridRow as w, type PivotGridRowMeta as x, type PivotMeasurePayload as y, type PivotRendererModel as z };
|