@kanaries/graphic-walker 0.2.14 → 0.2.16

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.
Files changed (128) hide show
  1. package/dist/App.d.ts +5 -2
  2. package/dist/assets/explainer.worker-8428eb12.js.map +1 -1
  3. package/dist/assets/transform.worker-5d54ff09.js.map +1 -0
  4. package/dist/assets/viewQuery.worker-ffefc111.js.map +1 -0
  5. package/dist/components/callout.d.ts +2 -0
  6. package/dist/components/codeExport/index.d.ts +3 -0
  7. package/dist/components/loadingLayer.d.ts +2 -0
  8. package/dist/components/tabs/defaultTab.d.ts +1 -0
  9. package/dist/components/tabs/editableTab.d.ts +1 -2
  10. package/dist/components/toolbar/components.d.ts +4 -1
  11. package/dist/components/toolbar/index.d.ts +2 -0
  12. package/dist/components/toolbar/toolbar-item.d.ts +3 -0
  13. package/dist/components/tooltip.d.ts +2 -0
  14. package/dist/dataSource/dataSelection/config.d.ts +1 -0
  15. package/dist/dataSource/dataSelection/utils.d.ts +2 -0
  16. package/dist/datasets/tmp/test.json +1 -0
  17. package/dist/fields/components.d.ts +0 -1
  18. package/dist/fields/filterField/filterEditDialog.d.ts +1 -1
  19. package/dist/graphic-walker.es.js +23930 -23320
  20. package/dist/graphic-walker.es.js.map +1 -1
  21. package/dist/graphic-walker.umd.js +143 -273
  22. package/dist/graphic-walker.umd.js.map +1 -1
  23. package/dist/index.d.ts +3 -3
  24. package/dist/interfaces.d.ts +23 -1
  25. package/dist/lib/execExp.d.ts +8 -0
  26. package/dist/lib/interfaces.d.ts +22 -0
  27. package/dist/lib/op/aggregate.d.ts +3 -0
  28. package/dist/lib/op/bin.d.ts +3 -0
  29. package/dist/lib/op/fold.d.ts +3 -0
  30. package/dist/lib/op/stat.d.ts +8 -0
  31. package/dist/lib/viewQuery.d.ts +5 -0
  32. package/dist/models/visSpecHistory.d.ts +2 -0
  33. package/dist/renderer/index.d.ts +6 -3
  34. package/dist/renderer/specRenderer.d.ts +13 -0
  35. package/dist/services.d.ts +4 -1
  36. package/dist/store/commonStore.d.ts +6 -0
  37. package/dist/store/index.d.ts +3 -2
  38. package/dist/store/visualSpecStore.d.ts +11 -4
  39. package/dist/utils/dataPrep.d.ts +2 -0
  40. package/dist/utils/index.d.ts +3 -5
  41. package/dist/utils/media.d.ts +2 -1
  42. package/dist/utils/save.d.ts +1 -2
  43. package/dist/vis/react-vega.d.ts +4 -23
  44. package/dist/vis/spec/aggregate.d.ts +4 -0
  45. package/dist/vis/spec/encode.d.ts +19 -0
  46. package/dist/vis/spec/field.d.ts +2 -0
  47. package/dist/vis/spec/mark.d.ts +7 -0
  48. package/dist/vis/spec/stack.d.ts +4 -0
  49. package/dist/vis/spec/view.d.ts +67 -0
  50. package/dist/vis/theme.d.ts +36 -20
  51. package/dist/visualSettings/index.d.ts +2 -1
  52. package/dist/workers/transform.d.ts +2 -0
  53. package/package.json +4 -3
  54. package/src/App.tsx +23 -15
  55. package/src/components/callout.tsx +9 -7
  56. package/src/components/clickMenu.tsx +1 -7
  57. package/src/components/codeExport/index.tsx +114 -0
  58. package/src/components/dataTable/index.tsx +10 -10
  59. package/src/components/loadingLayer.tsx +7 -0
  60. package/src/components/modal.tsx +1 -15
  61. package/src/components/sizeSetting.tsx +2 -2
  62. package/src/components/tabs/defaultTab.tsx +4 -2
  63. package/src/components/tabs/editableTab.tsx +75 -40
  64. package/src/components/toolbar/components.tsx +8 -23
  65. package/src/components/toolbar/index.tsx +11 -4
  66. package/src/components/toolbar/toolbar-button.tsx +2 -1
  67. package/src/components/toolbar/toolbar-item.tsx +17 -12
  68. package/src/components/toolbar/toolbar-select-button.tsx +9 -13
  69. package/src/components/toolbar/toolbar-toggle-button.tsx +2 -1
  70. package/src/components/tooltip.tsx +10 -6
  71. package/src/dataSource/dataSelection/config.ts +11 -0
  72. package/src/dataSource/dataSelection/csvData.tsx +72 -40
  73. package/src/dataSource/dataSelection/gwFile.tsx +2 -2
  74. package/src/dataSource/dataSelection/utils.ts +28 -0
  75. package/src/dataSource/index.tsx +2 -3
  76. package/src/dataSource/utils.ts +8 -3
  77. package/src/fields/components.tsx +13 -50
  78. package/src/fields/datasetFields/index.tsx +3 -4
  79. package/src/fields/datasetFields/meaFields.tsx +12 -4
  80. package/src/fields/encodeFields/singleEncodeEditor.tsx +1 -1
  81. package/src/fields/filterField/filterEditDialog.tsx +63 -99
  82. package/src/fields/filterField/slider.tsx +1 -1
  83. package/src/index.css +4 -4
  84. package/src/index.tsx +22 -22
  85. package/src/insightBoard/mainBoard.tsx +9 -2
  86. package/src/interfaces.ts +30 -3
  87. package/src/lib/execExp.ts +147 -0
  88. package/src/lib/interfaces.ts +39 -0
  89. package/src/lib/op/aggregate.ts +49 -0
  90. package/src/lib/op/bin.ts +25 -0
  91. package/src/lib/op/fold.ts +17 -0
  92. package/src/lib/op/stat.ts +46 -0
  93. package/src/lib/viewQuery.ts +23 -0
  94. package/src/locales/en-US.json +8 -3
  95. package/src/locales/i18n.ts +7 -1
  96. package/src/locales/ja-JP.json +197 -0
  97. package/src/locales/zh-CN.json +8 -3
  98. package/src/main.tsx +1 -1
  99. package/src/models/visSpecHistory.ts +14 -0
  100. package/src/renderer/index.tsx +58 -101
  101. package/src/renderer/specRenderer.tsx +119 -0
  102. package/src/segments/segmentNav.tsx +3 -16
  103. package/src/segments/visNav.tsx +17 -6
  104. package/src/services.ts +37 -1
  105. package/src/store/commonStore.ts +14 -9
  106. package/src/store/index.tsx +11 -4
  107. package/src/store/visualSpecStore.ts +89 -50
  108. package/src/utils/dataPrep.ts +24 -0
  109. package/src/utils/index.ts +16 -17
  110. package/src/utils/media.ts +16 -11
  111. package/src/utils/normalization.ts +3 -1
  112. package/src/utils/save.ts +1 -2
  113. package/src/vis/react-vega.tsx +11 -332
  114. package/src/vis/spec/aggregate.ts +13 -0
  115. package/src/vis/spec/encode.ts +69 -0
  116. package/src/vis/spec/field.ts +10 -0
  117. package/src/vis/spec/mark.ts +30 -0
  118. package/src/vis/spec/stack.ts +11 -0
  119. package/src/vis/spec/view.ts +138 -0
  120. package/src/vis/theme.ts +35 -25
  121. package/src/visualSettings/index.tsx +22 -33
  122. package/src/workers/transform.ts +12 -0
  123. package/src/workers/transform.worker.js +13 -0
  124. package/src/workers/viewQuery.worker.js +16 -0
  125. package/dist/components/container.d.ts +0 -2
  126. package/dist/dataSource/pannel.d.ts +0 -5
  127. package/src/components/container.tsx +0 -25
  128. package/src/dataSource/pannel.tsx +0 -71
@@ -2,12 +2,14 @@ import { IReactionDisposer, makeAutoObservable, observable, reaction, toJS } fro
2
2
  import produce from "immer";
3
3
  import { v4 as uuidv4 } from "uuid";
4
4
  import { Specification } from "visual-insights";
5
- import { DataSet, DraggableFieldState, IFilterRule, IViewField, IVisSpec, IVisualConfig } from "../interfaces";
5
+ import { DataSet, DraggableFieldState, IExpression, IFilterRule, IViewField, IVisSpec, IVisualConfig } from "../interfaces";
6
6
  import { CHANNEL_LIMIT, GEMO_TYPES, MetaFieldKeys } from "../config";
7
7
  import { makeBinField, makeLogField } from "../utils/normalization";
8
8
  import { VisSpecWithHistory } from "../models/visSpecHistory";
9
- import { dumpsGWPureSpec, parseGWContent, parseGWPureSpec, stringifyGWContent } from "../utils/save";
9
+ import { IStoInfo, dumpsGWPureSpec, parseGWContent, parseGWPureSpec, stringifyGWContent } from "../utils/save";
10
10
  import { CommonStore } from "./commonStore";
11
+ import { createCountField } from "../utils";
12
+ import { IViewQuery } from "../lib/viewQuery";
11
13
 
12
14
  function getChannelSizeLimit(channel: string): number {
13
15
  if (typeof CHANNEL_LIMIT[channel] === "undefined") return Infinity;
@@ -40,7 +42,7 @@ function geomAdapter(geom: string) {
40
42
  }
41
43
  }
42
44
 
43
- function initEncoding(): DraggableFieldState {
45
+ export function initEncoding(): DraggableFieldState {
44
46
  return {
45
47
  dimensions: [],
46
48
  measures: [],
@@ -58,7 +60,7 @@ function initEncoding(): DraggableFieldState {
58
60
  };
59
61
  }
60
62
 
61
- function initVisualConfig(): IVisualConfig {
63
+ export function initVisualConfig(): IVisualConfig {
62
64
  return {
63
65
  defaultAggregated: true,
64
66
  geoms: [GEMO_TYPES[0]!],
@@ -92,6 +94,10 @@ const forwardVisualConfigs = (backwards: ReturnType<typeof parseGWContent>["spec
92
94
  }));
93
95
  };
94
96
 
97
+ function isDraggableStateEmpty(state: DeepReadonly<DraggableFieldState>): boolean {
98
+ return Object.values(state).every((value) => value.length === 0);
99
+ }
100
+
95
101
  export class VizSpecStore {
96
102
  // public fields: IViewField[] = [];
97
103
  private commonStore: CommonStore;
@@ -139,7 +145,7 @@ export class VizSpecStore {
139
145
  this.visualConfig = initVisualConfig();
140
146
  this.visList.push(
141
147
  new VisSpecWithHistory({
142
- name: ["main.tablist.autoTitle", { idx: 1 }],
148
+ name: 'Chart 1',
143
149
  visId: uuidv4(),
144
150
  config: this.visualConfig,
145
151
  encodings: this.draggableFieldState,
@@ -151,13 +157,6 @@ export class VizSpecStore {
151
157
  reactions: false,
152
158
  });
153
159
  this.reactions.push(
154
- reaction(
155
- () => commonStore.currentDataset,
156
- (dataset) => {
157
- // this.initState();
158
- this.initMetaState(dataset);
159
- }
160
- ),
161
160
  reaction(
162
161
  () => this.visList[this.visIndex],
163
162
  (frame) => {
@@ -168,6 +167,15 @@ export class VizSpecStore {
168
167
  this.canUndo = frame.canUndo;
169
168
  this.canRedo = frame.canRedo;
170
169
  }
170
+ ),
171
+ reaction(
172
+ () => commonStore.currentDataset,
173
+ (dataset) => {
174
+ // this.initState();
175
+ if (isDraggableStateEmpty(this.draggableFieldState) && dataset.dataSource.length > 0 && dataset.rawFields.length > 0) {
176
+ this.initMetaState(dataset);
177
+ }
178
+ }
171
179
  )
172
180
  );
173
181
  }
@@ -275,10 +283,24 @@ export class VizSpecStore {
275
283
  });
276
284
  return fields;
277
285
  }
278
- public addVisualization() {
286
+ public get allFields(): IViewField[] {
287
+ const { draggableFieldState } = this;
288
+ const dimensions = toJS(draggableFieldState.dimensions);
289
+ const measures = toJS(draggableFieldState.measures);
290
+ return [...dimensions, ...measures];
291
+ }
292
+ public get viewFilters() {
293
+ const { draggableFieldState } = this;
294
+ const state = toJS(draggableFieldState);
295
+ return state.filters;
296
+ }
297
+
298
+
299
+ public addVisualization(defaultName?: string) {
300
+ const name = defaultName || 'Chart ' + (this.visList.length + 1);
279
301
  this.visList.push(
280
302
  new VisSpecWithHistory({
281
- name: ["main.tablist.autoTitle", { idx: this.visList.length + 1 }],
303
+ name,
282
304
  visId: uuidv4(),
283
305
  config: initVisualConfig(),
284
306
  encodings: initEncoding(),
@@ -290,9 +312,10 @@ export class VizSpecStore {
290
312
  this.visIndex = visIndex;
291
313
  }
292
314
  public setVisName(visIndex: number, name: string) {
293
- this.useMutable(() => {
294
- this.visList[visIndex].name = [name];
295
- });
315
+ this.visList[visIndex] = this.visList[visIndex].clone();
316
+ this.visList[visIndex].updateLatest({
317
+ name
318
+ })
296
319
  }
297
320
  public initState() {
298
321
  this.useMutable((tab) => {
@@ -301,6 +324,7 @@ export class VizSpecStore {
301
324
  });
302
325
  }
303
326
  public initMetaState(dataset: DataSet) {
327
+ const countField = createCountField();
304
328
  this.useMutable(({ encodings }) => {
305
329
  encodings.fields = dataset.rawFields.map((f) => ({
306
330
  dragId: uuidv4(),
@@ -309,7 +333,8 @@ export class VizSpecStore {
309
333
  aggName: f.analyticType === "measure" ? "sum" : undefined,
310
334
  analyticType: f.analyticType,
311
335
  semanticType: f.semanticType,
312
- }));
336
+ }))//.concat(countField);
337
+ encodings.fields.push(countField);
313
338
  encodings.dimensions = dataset.rawFields
314
339
  .filter((f) => f.analyticType === "dimension")
315
340
  .map((f) => ({
@@ -329,17 +354,10 @@ export class VizSpecStore {
329
354
  semanticType: f.semanticType,
330
355
  aggName: "sum",
331
356
  }));
357
+ encodings.measures.push(countField);
332
358
  });
333
359
 
334
360
  this.freezeHistory();
335
- // this.draggableFieldState.measures.push({
336
- // dragId: uuidv4(),
337
- // fid: COUNT_FIELD_ID,
338
- // name: '记录数',
339
- // analyticType: 'measure',
340
- // semanticType: 'quantitative',
341
- // aggName: 'count'
342
- // })
343
361
  }
344
362
  public clearState() {
345
363
  this.useMutable(({ encodings }) => {
@@ -489,44 +507,59 @@ export class VizSpecStore {
489
507
  encodings.rows = fieldsInCup as typeof encodings.rows; // assume this as writable
490
508
  });
491
509
  }
492
- public createBinField(stateKey: keyof DraggableFieldState, index: number) {
510
+ public createBinField(stateKey: keyof DraggableFieldState, index: number, binType: 'bin' | 'binCount') {
493
511
  this.useMutable(({ encodings }) => {
494
512
  const originField = encodings[stateKey][index];
513
+ const newVarKey = uuidv4();
495
514
  const binField: IViewField = {
496
- fid: uuidv4(),
497
- dragId: uuidv4(),
498
- name: `bin(${originField.name})`,
515
+ fid: newVarKey,
516
+ dragId: newVarKey,
517
+ name: `${binType}(${originField.name})`,
499
518
  semanticType: "ordinal",
500
519
  analyticType: "dimension",
520
+ computed: true,
521
+ expressoion: {
522
+ op: binType,
523
+ as: newVarKey,
524
+ params: [
525
+ {
526
+ type: 'field',
527
+ value: originField.fid
528
+ }
529
+ ]
530
+ }
501
531
  };
502
532
  encodings.dimensions.push(binField);
503
- this.commonStore.currentDataset.dataSource = makeBinField(
504
- this.commonStore.currentDataset.dataSource,
505
- originField.fid,
506
- binField.fid
507
- );
508
533
  });
509
534
  }
510
- public createLogField(stateKey: keyof DraggableFieldState, index: number) {
535
+ public createLogField(stateKey: keyof DraggableFieldState, index: number, scaleType: 'log10' | 'log2') {
511
536
  if (stateKey === "filters") {
512
537
  return;
513
538
  }
514
539
 
515
540
  this.useMutable(({ encodings }) => {
516
541
  const originField = encodings[stateKey][index];
542
+ const newVarKey = uuidv4();
517
543
  const logField: IViewField = {
518
- fid: uuidv4(),
519
- dragId: uuidv4(),
520
- name: `log10(${originField.name})`,
544
+ fid: newVarKey,
545
+ dragId: newVarKey,
546
+ name: `${scaleType}(${originField.name})`,
521
547
  semanticType: "quantitative",
522
548
  analyticType: originField.analyticType,
549
+ aggName: 'sum',
550
+ computed: true,
551
+ expressoion: {
552
+ op: scaleType,
553
+ as: newVarKey,
554
+ params: [
555
+ {
556
+ type: 'field',
557
+ value: originField.fid
558
+ }
559
+ ]
560
+ }
523
561
  };
524
562
  encodings[stateKey].push(logField);
525
- this.commonStore.currentDataset.dataSource = makeLogField(
526
- this.commonStore.currentDataset.dataSource,
527
- originField.fid,
528
- logField.fid
529
- );
530
563
  });
531
564
  }
532
565
  public setFieldAggregator(stateKey: keyof DraggableFieldState, index: number, aggName: string) {
@@ -677,13 +710,19 @@ export class VizSpecStore {
677
710
  specList: pureVisList,
678
711
  });
679
712
  }
713
+ public exportViewSpec() {
714
+ const pureVisList = dumpsGWPureSpec(this.visList);
715
+ return pureVisList
716
+ }
717
+ public importStoInfo (stoInfo: IStoInfo) {
718
+ this.visList = parseGWPureSpec(forwardVisualConfigs(stoInfo.specList));
719
+ this.visIndex = 0;
720
+ this.commonStore.datasets = stoInfo.datasets;
721
+ this.commonStore.dataSources = stoInfo.dataSources;
722
+ this.commonStore.dsIndex = Math.max(stoInfo.datasets.length - 1, 0);
723
+ }
680
724
  public importRaw(raw: string) {
681
725
  const content = parseGWContent(raw);
682
- this.commonStore.datasets = content.datasets;
683
- this.commonStore.dataSources = content.dataSources;
684
- this.commonStore.dsIndex = Math.max(content.datasets.length - 1, 0);
685
- // 补上初始化新版本特性
686
- this.visList = parseGWPureSpec(forwardVisualConfigs(content.specList));
687
- this.visIndex = 0;
726
+ this.importStoInfo(content);
688
727
  }
689
728
  }
@@ -41,4 +41,28 @@ export function guardDataKeys (data: IRow[], metas: IMutField[]): {
41
41
  safeData,
42
42
  safeMetas
43
43
  }
44
+ }
45
+
46
+ const SPLITOR = '__'
47
+ export function flatNestKeys (object: any): string[] {
48
+ const keys = Object.keys(object);
49
+ let flatColKeys: string[] = [];
50
+ for (let key of keys) {
51
+ if (typeof object[key] === 'object') {
52
+ const subKeys = flatNestKeys(object[key]);
53
+ flatColKeys = flatColKeys.concat(subKeys.map(k => `${key}${SPLITOR}${k}`));
54
+ } else {
55
+ flatColKeys.push(key)
56
+ }
57
+ }
58
+ return flatColKeys;
59
+ }
60
+
61
+ export function getValueByKeyPath (object: any, keyPath: string): any {
62
+ const keys = keyPath.split(SPLITOR);
63
+ let value = object;
64
+ for (let key of keys) {
65
+ value = value[key];
66
+ }
67
+ return value;
44
68
  }
@@ -1,6 +1,6 @@
1
1
  import i18next from "i18next";
2
2
  import { COUNT_FIELD_ID } from "../constants";
3
- import { IRow, Filters, IMutField } from "../interfaces";
3
+ import { IRow, Filters, IMutField, IViewField } from "../interfaces";
4
4
  interface NRReturns {
5
5
  normalizedData: IRow[];
6
6
  maxMeasures: IRow;
@@ -236,26 +236,21 @@ export function applyFilters(dataSource: IRow[], filters: Filters): IRow[] {
236
236
  });
237
237
  }
238
238
 
239
- export function extendCountField(
240
- dataSource: IRow[],
241
- fields: IMutField[]
242
- ): {
243
- dataSource: IRow[];
244
- fields: IMutField[];
245
- } {
246
- const nextData = dataSource.map((r) => ({
247
- ...r,
248
- [COUNT_FIELD_ID]: 1,
249
- }));
250
- const nextFields = fields.concat({
239
+ export function createCountField(): IViewField {
240
+ return {
241
+ // viewId: "",
242
+ dragId: COUNT_FIELD_ID,
251
243
  fid: COUNT_FIELD_ID,
252
244
  name: i18next.t("constant.row_count"),
253
245
  analyticType: "measure",
254
246
  semanticType: "quantitative",
255
- });
256
- return {
257
- dataSource: nextData,
258
- fields: nextFields,
247
+ aggName: 'sum',
248
+ computed: true,
249
+ expressoion: {
250
+ op: 'one',
251
+ params: [],
252
+ as: COUNT_FIELD_ID,
253
+ }
259
254
  };
260
255
  }
261
256
 
@@ -276,4 +271,8 @@ export function makeNumbersBeautiful (nums: number[]): number[] {
276
271
  return nums.map((num) => {
277
272
  return Math.round(num / step) * step;
278
273
  })
274
+ }
275
+
276
+ export function classNames(...classes: string[]) {
277
+ return classes.filter(Boolean).join(' ')
279
278
  }
@@ -1,4 +1,5 @@
1
1
  import { useEffect, useState } from "react";
2
+ import { IDarkMode } from "../interfaces";
2
3
 
3
4
  export function currentMediaTheme(): "dark" | "light" {
4
5
  if (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches) {
@@ -8,19 +9,23 @@ export function currentMediaTheme(): "dark" | "light" {
8
9
  }
9
10
  }
10
11
 
11
- export function useCurrentMediaTheme(): "dark" | "light" {
12
- const [theme, setTheme] = useState<"dark" | "light">(currentMediaTheme());
12
+ export function useCurrentMediaTheme(mode: IDarkMode | undefined = 'media'): "dark" | "light" {
13
+ const [theme, setTheme] = useState<"dark" | "light">(mode === 'media' ? currentMediaTheme() : mode);
13
14
 
14
15
  useEffect(() => {
15
- const mediaQuery = window.matchMedia?.("(prefers-color-scheme: dark)") as MediaQueryList | undefined;
16
- const listener = (e: MediaQueryListEvent) => {
17
- setTheme(e.matches ? "dark" : "light");
18
- };
19
- mediaQuery?.addEventListener("change", listener);
20
- return () => {
21
- mediaQuery?.removeEventListener("change", listener);
22
- };
23
- }, []);
16
+ if (mode === 'media') {
17
+ const mediaQuery = window.matchMedia?.("(prefers-color-scheme: dark)") as MediaQueryList | undefined;
18
+ const listener = (e: MediaQueryListEvent) => {
19
+ setTheme(e.matches ? "dark" : "light");
20
+ };
21
+ mediaQuery?.addEventListener("change", listener);
22
+ return () => {
23
+ mediaQuery?.removeEventListener("change", listener);
24
+ };
25
+ } else {
26
+ setTheme(mode);
27
+ }
28
+ }, [mode]);
24
29
 
25
30
  return theme;
26
31
  }
@@ -146,7 +146,9 @@ export function makeBinField(dataSource: IRow[], fid: string, binFid: string, bi
146
146
  if (bIndex === binSize) bIndex = binSize - 1;
147
147
  return {
148
148
  ...r,
149
- [binFid]: Number(((bIndex * step + _min)).toFixed(beaStep)),
149
+ [binFid]: [bIndex * step + _min, (bIndex + 1) * step + _min],
150
+
151
+ // [binFid]: Number(((bIndex * step + _min)).toFixed(beaStep)),
150
152
  };
151
153
  });
152
154
  }
package/src/utils/save.ts CHANGED
@@ -9,10 +9,9 @@ export function parseGWPureSpec(list: IVisSpec[]): VisSpecWithHistory[] {
9
9
  return list.map((l) => new VisSpecWithHistory(l));
10
10
  }
11
11
 
12
- interface IStoInfo {
12
+ export interface IStoInfo {
13
13
  datasets: IDataSet[];
14
14
  specList: {
15
- /** 由于 gw 内部实现暂时未锁版本,这里获取到的信息可能会与当前实例内容有偏差,需要用初始值合入 */
16
15
  [K in keyof IVisSpec]: K extends "config" ? Partial<IVisSpec[K]> : IVisSpec[K];
17
16
  }[];
18
17
  dataSources: IDataSource[];