@kanaries/graphic-walker 0.3.16 → 0.4.1
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/App.d.ts +9 -2
- package/dist/assets/filter.worker-f09fcd6f.js.map +1 -1
- package/dist/assets/sort.worker-f77540ac.js.map +1 -0
- package/dist/assets/transform.worker-bae8e910.js.map +1 -0
- package/dist/assets/{viewQuery.worker-03404216.js.map → viewQuery.worker-bdb6477c.js.map} +1 -1
- package/dist/components/askViz/index.d.ts +6 -0
- package/dist/components/askViz/schemaTransform.d.ts +2 -0
- package/dist/components/dataTable/index.d.ts +9 -5
- package/dist/components/pivotTable/store.d.ts +0 -2
- package/dist/components/spinner.d.ts +2 -0
- package/dist/computation/clientComputation.d.ts +3 -0
- package/dist/computation/serverComputation.d.ts +8 -0
- package/dist/config.d.ts +3 -1
- package/dist/fields/filterField/tabs.d.ts +2 -1
- package/dist/graphic-walker.es.js +22268 -21682
- package/dist/graphic-walker.es.js.map +1 -1
- package/dist/graphic-walker.umd.js +139 -139
- package/dist/graphic-walker.umd.js.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/interfaces.d.ts +93 -4
- package/dist/lib/execExp.d.ts +4 -4
- package/dist/lib/interfaces.d.ts +1 -0
- package/dist/lib/viewQuery.d.ts +2 -2
- package/dist/renderer/hooks.d.ts +8 -4
- package/dist/renderer/index.d.ts +2 -1
- package/dist/renderer/pureRenderer.d.ts +17 -1
- package/dist/renderer/specRenderer.d.ts +1 -0
- package/dist/services.d.ts +8 -5
- package/dist/store/commonStore.d.ts +2 -2
- package/dist/store/visualSpecStore.d.ts +58 -42
- package/dist/utils/save.d.ts +10 -2
- package/dist/utils/workflow.d.ts +3 -0
- package/dist/vis/react-vega.d.ts +3 -1
- package/dist/workers/sort.d.ts +2 -2
- package/dist/workers/transform.d.ts +5 -2
- package/package.json +2 -2
- package/src/App.tsx +46 -7
- package/src/components/askViz/index.tsx +93 -0
- package/src/components/askViz/schemaTransform.ts +38 -0
- package/src/components/dataTable/index.tsx +53 -11
- package/src/components/limitSetting.tsx +8 -6
- package/src/components/pivotTable/index.tsx +0 -1
- package/src/components/pivotTable/store.tsx +0 -16
- package/src/components/sizeSetting.tsx +9 -7
- package/src/components/spinner.tsx +14 -0
- package/src/components/toggle.tsx +2 -2
- package/src/components/visualConfig/index.tsx +78 -8
- package/src/computation/clientComputation.ts +55 -0
- package/src/computation/serverComputation.ts +158 -0
- package/src/config.ts +15 -2
- package/src/dataSource/datasetConfig/index.tsx +38 -6
- package/src/dataSource/table.tsx +15 -2
- package/src/fields/filterField/filterEditDialog.tsx +11 -10
- package/src/fields/filterField/tabs.tsx +178 -77
- package/src/hooks/index.ts +8 -0
- package/src/index.tsx +2 -0
- package/src/interfaces.ts +108 -5
- package/src/lib/execExp.ts +20 -11
- package/src/lib/interfaces.ts +1 -0
- package/src/lib/op/aggregate.ts +1 -1
- package/src/lib/viewQuery.ts +2 -2
- package/src/locales/en-US.json +11 -2
- package/src/locales/ja-JP.json +11 -2
- package/src/locales/zh-CN.json +11 -2
- package/src/main.tsx +1 -1
- package/src/renderer/hooks.ts +57 -69
- package/src/renderer/index.tsx +10 -6
- package/src/renderer/pureRenderer.tsx +40 -14
- package/src/renderer/specRenderer.tsx +24 -7
- package/src/services.ts +7 -8
- package/src/store/commonStore.ts +7 -7
- package/src/store/visualSpecStore.ts +288 -192
- package/src/utils/save.ts +81 -3
- package/src/utils/workflow.ts +148 -0
- package/src/vis/react-vega.tsx +21 -6
- package/src/vis/spec/aggregate.ts +3 -2
- package/src/vis/spec/stack.ts +7 -6
- package/src/visualSettings/index.tsx +2 -4
- package/src/workers/filter.worker.js +1 -1
- package/src/workers/sort.ts +3 -4
- package/src/workers/sort.worker.ts +2 -2
- package/src/workers/transform.ts +7 -8
- package/src/workers/transform.worker.js +2 -2
- package/src/workers/viewQuery.worker.js +2 -2
- package/dist/assets/sort.worker-4299a6a0.js.map +0 -1
- package/dist/assets/transform.worker-a12fb3d8.js.map +0 -1
package/src/store/commonStore.ts
CHANGED
|
@@ -147,14 +147,14 @@ export class CommonStore {
|
|
|
147
147
|
this.initTempDS();
|
|
148
148
|
this.showDSPanel = true;
|
|
149
149
|
}
|
|
150
|
-
public addAndUseDS(dataset: IDataSetInfo) {
|
|
151
|
-
const
|
|
150
|
+
public addAndUseDS(dataset: IDataSetInfo, datasetId?: string | undefined) {
|
|
151
|
+
const id = this.addDS(dataset, datasetId);
|
|
152
152
|
this.dsIndex = this.datasets.length - 1;
|
|
153
|
-
return
|
|
153
|
+
return id
|
|
154
154
|
}
|
|
155
|
-
public addDS(dataset: IDataSetInfo) {
|
|
155
|
+
public addDS(dataset: IDataSetInfo, datasetId?: string | undefined) {
|
|
156
156
|
const timestamp = new Date().getTime();
|
|
157
|
-
const dataSetId = `dst-${timestamp}`
|
|
157
|
+
const dataSetId = datasetId || `dst-${timestamp}`
|
|
158
158
|
const dataSourceId = `dse-${timestamp}`;
|
|
159
159
|
this.dataSources.push({
|
|
160
160
|
id: dataSourceId,
|
|
@@ -166,12 +166,12 @@ export class CommonStore {
|
|
|
166
166
|
rawFields: dataset.rawFields,
|
|
167
167
|
dsId: dataSourceId
|
|
168
168
|
})
|
|
169
|
-
return
|
|
169
|
+
return dataSourceId;
|
|
170
170
|
}
|
|
171
171
|
public removeDS(datasetId: string) {
|
|
172
172
|
const datasetIndex = this.datasets.findIndex(d => d.id === datasetId);
|
|
173
173
|
if (datasetIndex > -1) {
|
|
174
|
-
const dataSourceId = this.datasets[datasetIndex].
|
|
174
|
+
const dataSourceId = this.datasets[datasetIndex].id;
|
|
175
175
|
const dataSourceIndex = this.dataSources.findIndex(d => d.id === dataSourceId);
|
|
176
176
|
this.dataSources.splice(dataSourceIndex, 1);
|
|
177
177
|
this.datasets.splice(datasetIndex, 1);
|