@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.
Files changed (87) hide show
  1. package/dist/App.d.ts +9 -2
  2. package/dist/assets/filter.worker-f09fcd6f.js.map +1 -1
  3. package/dist/assets/sort.worker-f77540ac.js.map +1 -0
  4. package/dist/assets/transform.worker-bae8e910.js.map +1 -0
  5. package/dist/assets/{viewQuery.worker-03404216.js.map → viewQuery.worker-bdb6477c.js.map} +1 -1
  6. package/dist/components/askViz/index.d.ts +6 -0
  7. package/dist/components/askViz/schemaTransform.d.ts +2 -0
  8. package/dist/components/dataTable/index.d.ts +9 -5
  9. package/dist/components/pivotTable/store.d.ts +0 -2
  10. package/dist/components/spinner.d.ts +2 -0
  11. package/dist/computation/clientComputation.d.ts +3 -0
  12. package/dist/computation/serverComputation.d.ts +8 -0
  13. package/dist/config.d.ts +3 -1
  14. package/dist/fields/filterField/tabs.d.ts +2 -1
  15. package/dist/graphic-walker.es.js +22268 -21682
  16. package/dist/graphic-walker.es.js.map +1 -1
  17. package/dist/graphic-walker.umd.js +139 -139
  18. package/dist/graphic-walker.umd.js.map +1 -1
  19. package/dist/hooks/index.d.ts +1 -0
  20. package/dist/index.d.ts +2 -0
  21. package/dist/interfaces.d.ts +93 -4
  22. package/dist/lib/execExp.d.ts +4 -4
  23. package/dist/lib/interfaces.d.ts +1 -0
  24. package/dist/lib/viewQuery.d.ts +2 -2
  25. package/dist/renderer/hooks.d.ts +8 -4
  26. package/dist/renderer/index.d.ts +2 -1
  27. package/dist/renderer/pureRenderer.d.ts +17 -1
  28. package/dist/renderer/specRenderer.d.ts +1 -0
  29. package/dist/services.d.ts +8 -5
  30. package/dist/store/commonStore.d.ts +2 -2
  31. package/dist/store/visualSpecStore.d.ts +58 -42
  32. package/dist/utils/save.d.ts +10 -2
  33. package/dist/utils/workflow.d.ts +3 -0
  34. package/dist/vis/react-vega.d.ts +3 -1
  35. package/dist/workers/sort.d.ts +2 -2
  36. package/dist/workers/transform.d.ts +5 -2
  37. package/package.json +2 -2
  38. package/src/App.tsx +46 -7
  39. package/src/components/askViz/index.tsx +93 -0
  40. package/src/components/askViz/schemaTransform.ts +38 -0
  41. package/src/components/dataTable/index.tsx +53 -11
  42. package/src/components/limitSetting.tsx +8 -6
  43. package/src/components/pivotTable/index.tsx +0 -1
  44. package/src/components/pivotTable/store.tsx +0 -16
  45. package/src/components/sizeSetting.tsx +9 -7
  46. package/src/components/spinner.tsx +14 -0
  47. package/src/components/toggle.tsx +2 -2
  48. package/src/components/visualConfig/index.tsx +78 -8
  49. package/src/computation/clientComputation.ts +55 -0
  50. package/src/computation/serverComputation.ts +158 -0
  51. package/src/config.ts +15 -2
  52. package/src/dataSource/datasetConfig/index.tsx +38 -6
  53. package/src/dataSource/table.tsx +15 -2
  54. package/src/fields/filterField/filterEditDialog.tsx +11 -10
  55. package/src/fields/filterField/tabs.tsx +178 -77
  56. package/src/hooks/index.ts +8 -0
  57. package/src/index.tsx +2 -0
  58. package/src/interfaces.ts +108 -5
  59. package/src/lib/execExp.ts +20 -11
  60. package/src/lib/interfaces.ts +1 -0
  61. package/src/lib/op/aggregate.ts +1 -1
  62. package/src/lib/viewQuery.ts +2 -2
  63. package/src/locales/en-US.json +11 -2
  64. package/src/locales/ja-JP.json +11 -2
  65. package/src/locales/zh-CN.json +11 -2
  66. package/src/main.tsx +1 -1
  67. package/src/renderer/hooks.ts +57 -69
  68. package/src/renderer/index.tsx +10 -6
  69. package/src/renderer/pureRenderer.tsx +40 -14
  70. package/src/renderer/specRenderer.tsx +24 -7
  71. package/src/services.ts +7 -8
  72. package/src/store/commonStore.ts +7 -7
  73. package/src/store/visualSpecStore.ts +288 -192
  74. package/src/utils/save.ts +81 -3
  75. package/src/utils/workflow.ts +148 -0
  76. package/src/vis/react-vega.tsx +21 -6
  77. package/src/vis/spec/aggregate.ts +3 -2
  78. package/src/vis/spec/stack.ts +7 -6
  79. package/src/visualSettings/index.tsx +2 -4
  80. package/src/workers/filter.worker.js +1 -1
  81. package/src/workers/sort.ts +3 -4
  82. package/src/workers/sort.worker.ts +2 -2
  83. package/src/workers/transform.ts +7 -8
  84. package/src/workers/transform.worker.js +2 -2
  85. package/src/workers/viewQuery.worker.js +2 -2
  86. package/dist/assets/sort.worker-4299a6a0.js.map +0 -1
  87. package/dist/assets/transform.worker-a12fb3d8.js.map +0 -1
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ declare const _default: React.FunctionComponent<{
3
+ api?: string | undefined;
4
+ headers?: Record<string, string> | undefined;
5
+ }>;
6
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import { Specification } from "../../interfaces";
2
+ export declare function parseGW(vlSpec: any): Specification;
@@ -1,10 +1,14 @@
1
1
  import React from 'react';
2
- import { IMutField, IRow } from '../../interfaces';
2
+ import type { IMutField, DataSet, IComputationFunction } from '../../interfaces';
3
3
  interface DataTableProps {
4
+ /** page limit */
4
5
  size?: number;
5
- metas: IMutField[];
6
- data: IRow[];
6
+ /** total count of rows */
7
+ total: number;
8
+ dataset: DataSet;
9
+ computation?: IComputationFunction;
7
10
  onMetaChange: (fid: string, fIndex: number, meta: Partial<IMutField>) => void;
11
+ loading?: boolean;
8
12
  }
9
- declare const DataTable: React.FC<DataTableProps>;
10
- export default DataTable;
13
+ declare const _default: React.FunctionComponent<DataTableProps>;
14
+ export default _default;
@@ -1,5 +1,4 @@
1
1
  import { INestNode } from './inteface';
2
- import { IAggQuery } from '../../lib/interfaces';
3
2
  import { IField, IRow } from '../../interfaces';
4
3
  import React from 'react';
5
4
  declare class PivotTableStore {
@@ -11,7 +10,6 @@ declare class PivotTableStore {
11
10
  viewData: IRow[];
12
11
  constructor();
13
12
  init(dataSource: IRow[], metas: IField[]): void;
14
- queryData(leftQuery: IAggQuery, topQuery: IAggQuery): Promise<void>;
15
13
  }
16
14
  export interface PivotTableDataProps {
17
15
  data: IRow[];
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function Spinner(): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { IDataQueryPayload, IDataQueryWorkflowStep, IRow } from "../interfaces";
2
+ export declare const dataQueryClient: (rawData: IRow[], workflow: IDataQueryWorkflowStep[], offset?: number, limit?: number) => Promise<IRow[]>;
3
+ export declare const getComputation: (rawData: IRow[]) => (payload: IDataQueryPayload) => Promise<IRow[]>;
@@ -0,0 +1,8 @@
1
+ import type { IComputationFunction, IDataQueryWorkflowStep, IDatasetStats, IFieldStats, IRow } from '../interfaces';
2
+ export declare const datasetStatsServer: (service: IComputationFunction) => Promise<IDatasetStats>;
3
+ export declare const dataReadRawServer: (service: IComputationFunction, pageSize: number, pageOffset?: number) => Promise<IRow[]>;
4
+ export declare const dataQueryServer: (service: IComputationFunction, workflow: IDataQueryWorkflowStep[], limit?: number) => Promise<IRow[]>;
5
+ export declare const fieldStatServer: (service: IComputationFunction, field: string, options: {
6
+ values?: boolean;
7
+ range?: boolean;
8
+ }) => Promise<IFieldStats>;
package/dist/config.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { DraggableFieldState, IStackMode } from "./interfaces";
1
+ import { DraggableFieldState, IStackMode, IVisualConfig } from "./interfaces";
2
2
  export declare const GEMO_TYPES: Readonly<string[]>;
3
3
  export declare const STACK_MODE: Readonly<IStackMode[]>;
4
4
  export declare const CHART_LAYOUT_TYPE: Readonly<string[]>;
@@ -22,3 +22,5 @@ export declare const CHANNEL_LIMIT: {
22
22
  text: number;
23
23
  };
24
24
  export declare const MetaFieldKeys: Array<keyof DraggableFieldState>;
25
+ export declare const PositionChannelConfigList: Array<keyof IVisualConfig['resolve']>;
26
+ export declare const NonPositionChannelConfigList: Array<keyof IVisualConfig['resolve']>;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
- import type { IFilterField, IFilterRule } from '../../interfaces';
2
+ import type { IFilterField, IFilterRule, DataSet } from '../../interfaces';
3
3
  export type RuleFormProps = {
4
+ dataset: DataSet;
4
5
  field: IFilterField;
5
6
  onChange: (rule: IFilterRule) => void;
6
7
  };