@kanaries/graphic-walker 0.3.14 → 0.3.15
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/dist/assets/viewQuery.worker-03404216.js.map +1 -1
- package/dist/components/dataTable/index.d.ts +2 -2
- package/dist/dataSource/utils.d.ts +1 -1
- package/dist/graphic-walker.es.js +10001 -9898
- package/dist/graphic-walker.es.js.map +1 -1
- package/dist/graphic-walker.umd.js +114 -109
- package/dist/graphic-walker.umd.js.map +1 -1
- package/dist/interfaces.d.ts +11 -0
- package/dist/lib/inferMeta.d.ts +1 -1
- package/dist/lib/viewQuery.d.ts +2 -2
- package/dist/services.d.ts +3 -3
- package/dist/store/visualSpecStore.d.ts +428 -2
- package/dist/utils/dataPrep.d.ts +2 -2
- package/dist/utils/is-plain-object.d.ts +2 -0
- package/dist/utils/save.d.ts +2 -2
- package/package.json +1 -1
- package/src/components/dataTable/index.tsx +154 -74
- package/src/components/dataTable/pagination.tsx +1 -1
- package/src/dataSource/utils.ts +15 -13
- package/src/interfaces.ts +16 -0
- package/src/lib/inferMeta.ts +7 -4
- package/src/lib/viewQuery.ts +2 -2
- package/src/services.ts +3 -3
- package/src/store/visualSpecStore.ts +57 -5
- package/src/utils/dataPrep.ts +21 -28
- package/src/utils/is-plain-object.ts +33 -0
- package/src/utils/save.ts +2 -2
- package/src/visualSettings/index.tsx +1 -4
package/dist/interfaces.d.ts
CHANGED
|
@@ -30,17 +30,21 @@ export interface IMutField {
|
|
|
30
30
|
fid: string;
|
|
31
31
|
key?: string;
|
|
32
32
|
name?: string;
|
|
33
|
+
basename?: string;
|
|
33
34
|
disable?: boolean;
|
|
34
35
|
semanticType: ISemanticType;
|
|
35
36
|
analyticType: IAnalyticType;
|
|
37
|
+
path?: string[];
|
|
36
38
|
}
|
|
37
39
|
export interface IUncertainMutField {
|
|
38
40
|
fid: string;
|
|
39
41
|
key?: string;
|
|
40
42
|
name?: string;
|
|
43
|
+
basename?: string;
|
|
41
44
|
disable?: boolean;
|
|
42
45
|
semanticType: ISemanticType | '?';
|
|
43
46
|
analyticType: IAnalyticType | '?';
|
|
47
|
+
path: string[];
|
|
44
48
|
}
|
|
45
49
|
export type IExpParamter = {
|
|
46
50
|
type: 'field';
|
|
@@ -78,6 +82,8 @@ export interface IField {
|
|
|
78
82
|
cmp?: (a: any, b: any) => number;
|
|
79
83
|
computed?: boolean;
|
|
80
84
|
expression?: IExpression;
|
|
85
|
+
basename?: string;
|
|
86
|
+
path?: [];
|
|
81
87
|
}
|
|
82
88
|
export interface IViewField extends IField {
|
|
83
89
|
dragId: string;
|
|
@@ -184,6 +190,11 @@ export interface IVisSpec {
|
|
|
184
190
|
readonly encodings: DeepReadonly<DraggableFieldState>;
|
|
185
191
|
readonly config: DeepReadonly<IVisualConfig>;
|
|
186
192
|
}
|
|
193
|
+
export type SetToArray<T> = (T extends object ? (T extends Set<infer U> ? Array<U> : {
|
|
194
|
+
[K in keyof T]: SetToArray<T[K]>;
|
|
195
|
+
}) : T);
|
|
196
|
+
export type IVisSpecForExport = SetToArray<IVisSpec>;
|
|
197
|
+
export type IFilterFieldForExport = SetToArray<IFilterField>;
|
|
187
198
|
export declare enum ISegmentKey {
|
|
188
199
|
vis = "vis",
|
|
189
200
|
data = "data"
|
package/dist/lib/inferMeta.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { IMutField, IRow, ISemanticType, IUncertainMutField } from '../interface
|
|
|
6
6
|
*/
|
|
7
7
|
export declare function isDateTimeArray(data: string[]): boolean;
|
|
8
8
|
export declare function isNumericArray(data: any[]): boolean;
|
|
9
|
-
export declare function inferSemanticType(data: IRow[],
|
|
9
|
+
export declare function inferSemanticType(data: IRow[], path: string[]): ISemanticType;
|
|
10
10
|
export declare function inferMeta(props: {
|
|
11
11
|
dataSource: IRow[];
|
|
12
12
|
fields: IUncertainMutField[];
|
package/dist/lib/viewQuery.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IField, IRow } from "../interfaces";
|
|
2
2
|
import { IAggQuery, IBinQuery, IFoldQuery, IRawQuery } from "./interfaces";
|
|
3
3
|
export type IViewQuery = IAggQuery | IFoldQuery | IBinQuery | IRawQuery;
|
|
4
|
-
export declare function queryView(rawData: IRow[], metas:
|
|
4
|
+
export declare function queryView(rawData: IRow[], metas: IField[], query: IViewQuery): IRow[];
|
package/dist/services.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IRow,
|
|
1
|
+
import { IRow, IField, IFilterField, Specification } from './interfaces';
|
|
2
2
|
import { IViewQuery } from './lib/viewQuery';
|
|
3
3
|
export interface IVisSpace {
|
|
4
4
|
dataView: IRow[];
|
|
5
5
|
schema: Specification;
|
|
6
6
|
}
|
|
7
7
|
export declare const applyFilter: (data: IRow[], filters: readonly IFilterField[]) => Promise<IRow[]>;
|
|
8
|
-
export declare const transformDataService: (data: IRow[], columns:
|
|
9
|
-
export declare const applyViewQuery: (data: IRow[], metas:
|
|
8
|
+
export declare const transformDataService: (data: IRow[], columns: IField[]) => Promise<IRow[]>;
|
|
9
|
+
export declare const applyViewQuery: (data: IRow[], metas: IField[], query: IViewQuery) => Promise<IRow[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataSet, DraggableFieldState, IFilterRule, IViewField,
|
|
1
|
+
import { DataSet, DraggableFieldState, IFilterRule, IViewField, IVisualConfig, Specification } from "../interfaces";
|
|
2
2
|
import { VisSpecWithHistory } from "../models/visSpecHistory";
|
|
3
3
|
import { IStoInfo } from "../utils/save";
|
|
4
4
|
import { CommonStore } from "./commonStore";
|
|
@@ -113,8 +113,434 @@ export declare class VizSpecStore {
|
|
|
113
113
|
renderSpec(spec: Specification): void;
|
|
114
114
|
destroy(): void;
|
|
115
115
|
exportAsRaw(): string;
|
|
116
|
-
exportViewSpec():
|
|
116
|
+
exportViewSpec(): {
|
|
117
|
+
readonly visId: string;
|
|
118
|
+
readonly name?: string | undefined;
|
|
119
|
+
readonly encodings: {
|
|
120
|
+
readonly dimensions: readonly {
|
|
121
|
+
readonly dragId: string;
|
|
122
|
+
readonly sort?: "none" | "ascending" | "descending" | undefined;
|
|
123
|
+
readonly fid: string;
|
|
124
|
+
readonly name: string;
|
|
125
|
+
readonly aggName?: string | undefined;
|
|
126
|
+
readonly semanticType: import("../interfaces").ISemanticType;
|
|
127
|
+
readonly analyticType: import("../interfaces").IAnalyticType;
|
|
128
|
+
readonly cmp?: {} | undefined;
|
|
129
|
+
readonly computed?: boolean | undefined;
|
|
130
|
+
readonly expression?: {
|
|
131
|
+
op: "bin" | "log2" | "log10" | "one" | "binCount";
|
|
132
|
+
params: ({
|
|
133
|
+
type: "field";
|
|
134
|
+
value: string;
|
|
135
|
+
} | {
|
|
136
|
+
type: "value";
|
|
137
|
+
value: any;
|
|
138
|
+
} | {
|
|
139
|
+
type: "expression";
|
|
140
|
+
value: any;
|
|
141
|
+
} | {
|
|
142
|
+
type: "constant";
|
|
143
|
+
value: any;
|
|
144
|
+
})[];
|
|
145
|
+
as: string;
|
|
146
|
+
} | undefined;
|
|
147
|
+
readonly basename?: string | undefined;
|
|
148
|
+
readonly path?: [] | undefined;
|
|
149
|
+
}[];
|
|
150
|
+
readonly measures: readonly {
|
|
151
|
+
readonly dragId: string;
|
|
152
|
+
readonly sort?: "none" | "ascending" | "descending" | undefined;
|
|
153
|
+
readonly fid: string;
|
|
154
|
+
readonly name: string;
|
|
155
|
+
readonly aggName?: string | undefined;
|
|
156
|
+
readonly semanticType: import("../interfaces").ISemanticType;
|
|
157
|
+
readonly analyticType: import("../interfaces").IAnalyticType;
|
|
158
|
+
readonly cmp?: {} | undefined;
|
|
159
|
+
readonly computed?: boolean | undefined;
|
|
160
|
+
readonly expression?: {
|
|
161
|
+
op: "bin" | "log2" | "log10" | "one" | "binCount";
|
|
162
|
+
params: ({
|
|
163
|
+
type: "field";
|
|
164
|
+
value: string;
|
|
165
|
+
} | {
|
|
166
|
+
type: "value";
|
|
167
|
+
value: any;
|
|
168
|
+
} | {
|
|
169
|
+
type: "expression";
|
|
170
|
+
value: any;
|
|
171
|
+
} | {
|
|
172
|
+
type: "constant";
|
|
173
|
+
value: any;
|
|
174
|
+
})[];
|
|
175
|
+
as: string;
|
|
176
|
+
} | undefined;
|
|
177
|
+
readonly basename?: string | undefined;
|
|
178
|
+
readonly path?: [] | undefined;
|
|
179
|
+
}[];
|
|
180
|
+
readonly rows: readonly {
|
|
181
|
+
readonly dragId: string;
|
|
182
|
+
readonly sort?: "none" | "ascending" | "descending" | undefined;
|
|
183
|
+
readonly fid: string;
|
|
184
|
+
readonly name: string;
|
|
185
|
+
readonly aggName?: string | undefined;
|
|
186
|
+
readonly semanticType: import("../interfaces").ISemanticType;
|
|
187
|
+
readonly analyticType: import("../interfaces").IAnalyticType;
|
|
188
|
+
readonly cmp?: {} | undefined;
|
|
189
|
+
readonly computed?: boolean | undefined;
|
|
190
|
+
readonly expression?: {
|
|
191
|
+
op: "bin" | "log2" | "log10" | "one" | "binCount";
|
|
192
|
+
params: ({
|
|
193
|
+
type: "field";
|
|
194
|
+
value: string;
|
|
195
|
+
} | {
|
|
196
|
+
type: "value";
|
|
197
|
+
value: any;
|
|
198
|
+
} | {
|
|
199
|
+
type: "expression";
|
|
200
|
+
value: any;
|
|
201
|
+
} | {
|
|
202
|
+
type: "constant";
|
|
203
|
+
value: any;
|
|
204
|
+
})[];
|
|
205
|
+
as: string;
|
|
206
|
+
} | undefined;
|
|
207
|
+
readonly basename?: string | undefined;
|
|
208
|
+
readonly path?: [] | undefined;
|
|
209
|
+
}[];
|
|
210
|
+
readonly columns: readonly {
|
|
211
|
+
readonly dragId: string;
|
|
212
|
+
readonly sort?: "none" | "ascending" | "descending" | undefined;
|
|
213
|
+
readonly fid: string;
|
|
214
|
+
readonly name: string;
|
|
215
|
+
readonly aggName?: string | undefined;
|
|
216
|
+
readonly semanticType: import("../interfaces").ISemanticType;
|
|
217
|
+
readonly analyticType: import("../interfaces").IAnalyticType;
|
|
218
|
+
readonly cmp?: {} | undefined;
|
|
219
|
+
readonly computed?: boolean | undefined;
|
|
220
|
+
readonly expression?: {
|
|
221
|
+
op: "bin" | "log2" | "log10" | "one" | "binCount";
|
|
222
|
+
params: ({
|
|
223
|
+
type: "field";
|
|
224
|
+
value: string;
|
|
225
|
+
} | {
|
|
226
|
+
type: "value";
|
|
227
|
+
value: any;
|
|
228
|
+
} | {
|
|
229
|
+
type: "expression";
|
|
230
|
+
value: any;
|
|
231
|
+
} | {
|
|
232
|
+
type: "constant";
|
|
233
|
+
value: any;
|
|
234
|
+
})[];
|
|
235
|
+
as: string;
|
|
236
|
+
} | undefined;
|
|
237
|
+
readonly basename?: string | undefined;
|
|
238
|
+
readonly path?: [] | undefined;
|
|
239
|
+
}[];
|
|
240
|
+
readonly color: readonly {
|
|
241
|
+
readonly dragId: string;
|
|
242
|
+
readonly sort?: "none" | "ascending" | "descending" | undefined;
|
|
243
|
+
readonly fid: string;
|
|
244
|
+
readonly name: string;
|
|
245
|
+
readonly aggName?: string | undefined;
|
|
246
|
+
readonly semanticType: import("../interfaces").ISemanticType;
|
|
247
|
+
readonly analyticType: import("../interfaces").IAnalyticType;
|
|
248
|
+
readonly cmp?: {} | undefined;
|
|
249
|
+
readonly computed?: boolean | undefined;
|
|
250
|
+
readonly expression?: {
|
|
251
|
+
op: "bin" | "log2" | "log10" | "one" | "binCount";
|
|
252
|
+
params: ({
|
|
253
|
+
type: "field";
|
|
254
|
+
value: string;
|
|
255
|
+
} | {
|
|
256
|
+
type: "value";
|
|
257
|
+
value: any;
|
|
258
|
+
} | {
|
|
259
|
+
type: "expression";
|
|
260
|
+
value: any;
|
|
261
|
+
} | {
|
|
262
|
+
type: "constant";
|
|
263
|
+
value: any;
|
|
264
|
+
})[];
|
|
265
|
+
as: string;
|
|
266
|
+
} | undefined;
|
|
267
|
+
readonly basename?: string | undefined;
|
|
268
|
+
readonly path?: [] | undefined;
|
|
269
|
+
}[];
|
|
270
|
+
readonly opacity: readonly {
|
|
271
|
+
readonly dragId: string;
|
|
272
|
+
readonly sort?: "none" | "ascending" | "descending" | undefined;
|
|
273
|
+
readonly fid: string;
|
|
274
|
+
readonly name: string;
|
|
275
|
+
readonly aggName?: string | undefined;
|
|
276
|
+
readonly semanticType: import("../interfaces").ISemanticType;
|
|
277
|
+
readonly analyticType: import("../interfaces").IAnalyticType;
|
|
278
|
+
readonly cmp?: {} | undefined;
|
|
279
|
+
readonly computed?: boolean | undefined;
|
|
280
|
+
readonly expression?: {
|
|
281
|
+
op: "bin" | "log2" | "log10" | "one" | "binCount";
|
|
282
|
+
params: ({
|
|
283
|
+
type: "field";
|
|
284
|
+
value: string;
|
|
285
|
+
} | {
|
|
286
|
+
type: "value";
|
|
287
|
+
value: any;
|
|
288
|
+
} | {
|
|
289
|
+
type: "expression";
|
|
290
|
+
value: any;
|
|
291
|
+
} | {
|
|
292
|
+
type: "constant";
|
|
293
|
+
value: any;
|
|
294
|
+
})[];
|
|
295
|
+
as: string;
|
|
296
|
+
} | undefined;
|
|
297
|
+
readonly basename?: string | undefined;
|
|
298
|
+
readonly path?: [] | undefined;
|
|
299
|
+
}[];
|
|
300
|
+
readonly size: readonly {
|
|
301
|
+
readonly dragId: string;
|
|
302
|
+
readonly sort?: "none" | "ascending" | "descending" | undefined;
|
|
303
|
+
readonly fid: string;
|
|
304
|
+
readonly name: string;
|
|
305
|
+
readonly aggName?: string | undefined;
|
|
306
|
+
readonly semanticType: import("../interfaces").ISemanticType;
|
|
307
|
+
readonly analyticType: import("../interfaces").IAnalyticType;
|
|
308
|
+
readonly cmp?: {} | undefined;
|
|
309
|
+
readonly computed?: boolean | undefined;
|
|
310
|
+
readonly expression?: {
|
|
311
|
+
op: "bin" | "log2" | "log10" | "one" | "binCount";
|
|
312
|
+
params: ({
|
|
313
|
+
type: "field";
|
|
314
|
+
value: string;
|
|
315
|
+
} | {
|
|
316
|
+
type: "value";
|
|
317
|
+
value: any;
|
|
318
|
+
} | {
|
|
319
|
+
type: "expression";
|
|
320
|
+
value: any;
|
|
321
|
+
} | {
|
|
322
|
+
type: "constant";
|
|
323
|
+
value: any;
|
|
324
|
+
})[];
|
|
325
|
+
as: string;
|
|
326
|
+
} | undefined;
|
|
327
|
+
readonly basename?: string | undefined;
|
|
328
|
+
readonly path?: [] | undefined;
|
|
329
|
+
}[];
|
|
330
|
+
readonly shape: readonly {
|
|
331
|
+
readonly dragId: string;
|
|
332
|
+
readonly sort?: "none" | "ascending" | "descending" | undefined;
|
|
333
|
+
readonly fid: string;
|
|
334
|
+
readonly name: string;
|
|
335
|
+
readonly aggName?: string | undefined;
|
|
336
|
+
readonly semanticType: import("../interfaces").ISemanticType;
|
|
337
|
+
readonly analyticType: import("../interfaces").IAnalyticType;
|
|
338
|
+
readonly cmp?: {} | undefined;
|
|
339
|
+
readonly computed?: boolean | undefined;
|
|
340
|
+
readonly expression?: {
|
|
341
|
+
op: "bin" | "log2" | "log10" | "one" | "binCount";
|
|
342
|
+
params: ({
|
|
343
|
+
type: "field";
|
|
344
|
+
value: string;
|
|
345
|
+
} | {
|
|
346
|
+
type: "value";
|
|
347
|
+
value: any;
|
|
348
|
+
} | {
|
|
349
|
+
type: "expression";
|
|
350
|
+
value: any;
|
|
351
|
+
} | {
|
|
352
|
+
type: "constant";
|
|
353
|
+
value: any;
|
|
354
|
+
})[];
|
|
355
|
+
as: string;
|
|
356
|
+
} | undefined;
|
|
357
|
+
readonly basename?: string | undefined;
|
|
358
|
+
readonly path?: [] | undefined;
|
|
359
|
+
}[];
|
|
360
|
+
readonly theta: readonly {
|
|
361
|
+
readonly dragId: string;
|
|
362
|
+
readonly sort?: "none" | "ascending" | "descending" | undefined;
|
|
363
|
+
readonly fid: string;
|
|
364
|
+
readonly name: string;
|
|
365
|
+
readonly aggName?: string | undefined;
|
|
366
|
+
readonly semanticType: import("../interfaces").ISemanticType;
|
|
367
|
+
readonly analyticType: import("../interfaces").IAnalyticType;
|
|
368
|
+
readonly cmp?: {} | undefined;
|
|
369
|
+
readonly computed?: boolean | undefined;
|
|
370
|
+
readonly expression?: {
|
|
371
|
+
op: "bin" | "log2" | "log10" | "one" | "binCount";
|
|
372
|
+
params: ({
|
|
373
|
+
type: "field";
|
|
374
|
+
value: string;
|
|
375
|
+
} | {
|
|
376
|
+
type: "value";
|
|
377
|
+
value: any;
|
|
378
|
+
} | {
|
|
379
|
+
type: "expression";
|
|
380
|
+
value: any;
|
|
381
|
+
} | {
|
|
382
|
+
type: "constant";
|
|
383
|
+
value: any;
|
|
384
|
+
})[];
|
|
385
|
+
as: string;
|
|
386
|
+
} | undefined;
|
|
387
|
+
readonly basename?: string | undefined;
|
|
388
|
+
readonly path?: [] | undefined;
|
|
389
|
+
}[];
|
|
390
|
+
readonly radius: readonly {
|
|
391
|
+
readonly dragId: string;
|
|
392
|
+
readonly sort?: "none" | "ascending" | "descending" | undefined;
|
|
393
|
+
readonly fid: string;
|
|
394
|
+
readonly name: string;
|
|
395
|
+
readonly aggName?: string | undefined;
|
|
396
|
+
readonly semanticType: import("../interfaces").ISemanticType;
|
|
397
|
+
readonly analyticType: import("../interfaces").IAnalyticType;
|
|
398
|
+
readonly cmp?: {} | undefined;
|
|
399
|
+
readonly computed?: boolean | undefined;
|
|
400
|
+
readonly expression?: {
|
|
401
|
+
op: "bin" | "log2" | "log10" | "one" | "binCount";
|
|
402
|
+
params: ({
|
|
403
|
+
type: "field";
|
|
404
|
+
value: string;
|
|
405
|
+
} | {
|
|
406
|
+
type: "value";
|
|
407
|
+
value: any;
|
|
408
|
+
} | {
|
|
409
|
+
type: "expression";
|
|
410
|
+
value: any;
|
|
411
|
+
} | {
|
|
412
|
+
type: "constant";
|
|
413
|
+
value: any;
|
|
414
|
+
})[];
|
|
415
|
+
as: string;
|
|
416
|
+
} | undefined;
|
|
417
|
+
readonly basename?: string | undefined;
|
|
418
|
+
readonly path?: [] | undefined;
|
|
419
|
+
}[];
|
|
420
|
+
readonly details: readonly {
|
|
421
|
+
readonly dragId: string;
|
|
422
|
+
readonly sort?: "none" | "ascending" | "descending" | undefined;
|
|
423
|
+
readonly fid: string;
|
|
424
|
+
readonly name: string;
|
|
425
|
+
readonly aggName?: string | undefined;
|
|
426
|
+
readonly semanticType: import("../interfaces").ISemanticType;
|
|
427
|
+
readonly analyticType: import("../interfaces").IAnalyticType;
|
|
428
|
+
readonly cmp?: {} | undefined;
|
|
429
|
+
readonly computed?: boolean | undefined;
|
|
430
|
+
readonly expression?: {
|
|
431
|
+
op: "bin" | "log2" | "log10" | "one" | "binCount";
|
|
432
|
+
params: ({
|
|
433
|
+
type: "field";
|
|
434
|
+
value: string;
|
|
435
|
+
} | {
|
|
436
|
+
type: "value";
|
|
437
|
+
value: any;
|
|
438
|
+
} | {
|
|
439
|
+
type: "expression";
|
|
440
|
+
value: any;
|
|
441
|
+
} | {
|
|
442
|
+
type: "constant";
|
|
443
|
+
value: any;
|
|
444
|
+
})[];
|
|
445
|
+
as: string;
|
|
446
|
+
} | undefined;
|
|
447
|
+
readonly basename?: string | undefined;
|
|
448
|
+
readonly path?: [] | undefined;
|
|
449
|
+
}[];
|
|
450
|
+
readonly filters: readonly {
|
|
451
|
+
readonly rule: {
|
|
452
|
+
type: "range";
|
|
453
|
+
value: readonly [number, number];
|
|
454
|
+
} | {
|
|
455
|
+
type: "temporal range";
|
|
456
|
+
value: readonly [number, number];
|
|
457
|
+
} | {
|
|
458
|
+
type: "one of";
|
|
459
|
+
value: (string | number)[];
|
|
460
|
+
} | null;
|
|
461
|
+
readonly dragId: string;
|
|
462
|
+
readonly sort?: "none" | "ascending" | "descending" | undefined;
|
|
463
|
+
readonly fid: string;
|
|
464
|
+
readonly name: string;
|
|
465
|
+
readonly aggName?: string | undefined;
|
|
466
|
+
readonly semanticType: import("../interfaces").ISemanticType;
|
|
467
|
+
readonly analyticType: import("../interfaces").IAnalyticType;
|
|
468
|
+
readonly cmp?: {} | undefined;
|
|
469
|
+
readonly computed?: boolean | undefined;
|
|
470
|
+
readonly expression?: {
|
|
471
|
+
op: "bin" | "log2" | "log10" | "one" | "binCount";
|
|
472
|
+
params: ({
|
|
473
|
+
type: "field";
|
|
474
|
+
value: string;
|
|
475
|
+
} | {
|
|
476
|
+
type: "value";
|
|
477
|
+
value: any;
|
|
478
|
+
} | {
|
|
479
|
+
type: "expression";
|
|
480
|
+
value: any;
|
|
481
|
+
} | {
|
|
482
|
+
type: "constant";
|
|
483
|
+
value: any;
|
|
484
|
+
})[];
|
|
485
|
+
as: string;
|
|
486
|
+
} | undefined;
|
|
487
|
+
readonly basename?: string | undefined;
|
|
488
|
+
readonly path?: [] | undefined;
|
|
489
|
+
}[];
|
|
490
|
+
readonly text: readonly {
|
|
491
|
+
readonly dragId: string;
|
|
492
|
+
readonly sort?: "none" | "ascending" | "descending" | undefined;
|
|
493
|
+
readonly fid: string;
|
|
494
|
+
readonly name: string;
|
|
495
|
+
readonly aggName?: string | undefined;
|
|
496
|
+
readonly semanticType: import("../interfaces").ISemanticType;
|
|
497
|
+
readonly analyticType: import("../interfaces").IAnalyticType;
|
|
498
|
+
readonly cmp?: {} | undefined;
|
|
499
|
+
readonly computed?: boolean | undefined;
|
|
500
|
+
readonly expression?: {
|
|
501
|
+
op: "bin" | "log2" | "log10" | "one" | "binCount";
|
|
502
|
+
params: ({
|
|
503
|
+
type: "field";
|
|
504
|
+
value: string;
|
|
505
|
+
} | {
|
|
506
|
+
type: "value";
|
|
507
|
+
value: any;
|
|
508
|
+
} | {
|
|
509
|
+
type: "expression";
|
|
510
|
+
value: any;
|
|
511
|
+
} | {
|
|
512
|
+
type: "constant";
|
|
513
|
+
value: any;
|
|
514
|
+
})[];
|
|
515
|
+
as: string;
|
|
516
|
+
} | undefined;
|
|
517
|
+
readonly basename?: string | undefined;
|
|
518
|
+
readonly path?: [] | undefined;
|
|
519
|
+
}[];
|
|
520
|
+
};
|
|
521
|
+
readonly config: {
|
|
522
|
+
readonly defaultAggregated: boolean;
|
|
523
|
+
readonly geoms: readonly string[];
|
|
524
|
+
readonly stack: import("../interfaces").IStackMode;
|
|
525
|
+
readonly showActions: boolean;
|
|
526
|
+
readonly interactiveScale: boolean;
|
|
527
|
+
readonly sorted: "none" | "ascending" | "descending";
|
|
528
|
+
readonly zeroScale: boolean;
|
|
529
|
+
readonly format: {
|
|
530
|
+
readonly numberFormat?: string | undefined;
|
|
531
|
+
readonly timeFormat?: string | undefined;
|
|
532
|
+
readonly normalizedNumberFormat?: string | undefined;
|
|
533
|
+
};
|
|
534
|
+
readonly size: {
|
|
535
|
+
readonly mode: "auto" | "fixed";
|
|
536
|
+
readonly width: number;
|
|
537
|
+
readonly height: number;
|
|
538
|
+
};
|
|
539
|
+
};
|
|
540
|
+
}[];
|
|
117
541
|
importStoInfo(stoInfo: IStoInfo): void;
|
|
118
542
|
importRaw(raw: string): void;
|
|
543
|
+
private visSpecEncoder;
|
|
544
|
+
private visSpecDecoder;
|
|
119
545
|
}
|
|
120
546
|
export {};
|
package/dist/utils/dataPrep.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ export declare function guardDataKeys(data: IRow[], metas: IMutField[]): {
|
|
|
3
3
|
safeData: IRow[];
|
|
4
4
|
safeMetas: IMutField[];
|
|
5
5
|
};
|
|
6
|
-
export declare function
|
|
7
|
-
export declare function getValueByKeyPath(object: any, keyPath: string): any;
|
|
6
|
+
export declare function flatKeys(obj: Object, prefixKeys?: string[]): string[][];
|
|
7
|
+
export declare function getValueByKeyPath(object: any, keyPath: string[]): any;
|
package/dist/utils/save.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { IDataSet, IDataSource, IVisSpec } from "../interfaces";
|
|
1
|
+
import { IDataSet, IDataSource, IVisSpec, IVisSpecForExport } from "../interfaces";
|
|
2
2
|
import { VisSpecWithHistory } from "../models/visSpecHistory";
|
|
3
3
|
export declare function dumpsGWPureSpec(list: VisSpecWithHistory[]): IVisSpec[];
|
|
4
4
|
export declare function parseGWPureSpec(list: IVisSpec[]): VisSpecWithHistory[];
|
|
5
5
|
export interface IStoInfo {
|
|
6
6
|
datasets: IDataSet[];
|
|
7
7
|
specList: {
|
|
8
|
-
[K in keyof
|
|
8
|
+
[K in keyof IVisSpecForExport]: K extends "config" ? Partial<IVisSpecForExport[K]> : IVisSpecForExport[K];
|
|
9
9
|
}[];
|
|
10
10
|
dataSources: IDataSource[];
|
|
11
11
|
}
|