@kanaries/graphic-walker 0.3.4 → 0.3.6
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 +6 -0
- package/dist/assets/{transform.worker-5d54ff09.js.map → transform.worker-90e4f506.js.map} +1 -1
- package/dist/assets/viewQuery.worker-03404216.js.map +1 -0
- package/dist/components/pivotTable/index.d.ts +12 -0
- package/dist/components/pivotTable/inteface.d.ts +6 -0
- package/dist/components/pivotTable/leftTree.d.ts +10 -0
- package/dist/components/pivotTable/metricTable.d.ts +9 -0
- package/dist/components/pivotTable/store.d.ts +22 -0
- package/dist/components/pivotTable/topTree.d.ts +10 -0
- package/dist/components/pivotTable/utils.d.ts +6 -0
- package/dist/components/visualConfig/index.d.ts +3 -0
- package/dist/config.d.ts +2 -0
- package/dist/fields/aestheticFields.d.ts +2 -2
- package/dist/graphic-walker.es.js +23528 -23139
- package/dist/graphic-walker.es.js.map +1 -1
- package/dist/graphic-walker.umd.js +129 -129
- package/dist/graphic-walker.umd.js.map +1 -1
- package/dist/interfaces.d.ts +7 -1
- package/dist/lib/insights/utils.d.ts +0 -2
- package/dist/lib/interfaces.d.ts +5 -3
- package/dist/store/commonStore.d.ts +2 -0
- package/dist/store/visualSpecStore.d.ts +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/vis/react-vega.d.ts +3 -1
- package/dist/vis/spec/encode.d.ts +2 -0
- package/dist/visualSettings/index.d.ts +3 -0
- package/package.json +1 -1
- package/src/App.tsx +11 -1
- package/src/components/pivotTable/index.tsx +119 -0
- package/src/components/pivotTable/inteface.ts +8 -0
- package/src/components/pivotTable/leftTree.tsx +92 -0
- package/src/components/pivotTable/metricTable.tsx +107 -0
- package/src/components/pivotTable/store.tsx +66 -0
- package/src/components/pivotTable/topTree.tsx +77 -0
- package/src/components/pivotTable/utils.ts +141 -0
- package/src/components/visualConfig/index.tsx +76 -0
- package/src/config.ts +5 -1
- package/src/fields/aestheticFields.tsx +25 -4
- package/src/fields/components.tsx +2 -2
- package/src/fields/fieldsContext.tsx +2 -1
- package/src/interfaces.ts +7 -1
- package/src/lib/insights/explainByChildren.ts +11 -3
- package/src/lib/insights/explainBySelection.ts +14 -5
- package/src/lib/insights/explainValue.ts +10 -3
- package/src/lib/insights/utils.ts +0 -4
- package/src/lib/interfaces.ts +1 -3
- package/src/lib/op/aggregate.ts +9 -7
- package/src/locales/en-US.json +13 -3
- package/src/locales/ja-JP.json +188 -178
- package/src/locales/zh-CN.json +13 -3
- package/src/renderer/index.tsx +16 -2
- package/src/renderer/specRenderer.tsx +6 -2
- package/src/store/commonStore.ts +4 -0
- package/src/store/visualSpecStore.ts +14 -2
- package/src/utils/index.ts +8 -1
- package/src/vis/react-vega.tsx +31 -7
- package/src/vis/spec/aggregate.ts +3 -0
- package/src/vis/spec/encode.ts +5 -1
- package/src/vis/spec/view.ts +4 -2
- package/src/visualSettings/index.tsx +28 -4
- package/src/workers/transform.ts +1 -1
- package/dist/assets/viewQuery.worker-ffefc111.js.map +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DeepReadonly, DraggableFieldState, IDarkMode, IRow, IThemeKey, IVisualConfig } from '../../interfaces';
|
|
3
|
+
interface PivotTableProps {
|
|
4
|
+
themeKey?: IThemeKey;
|
|
5
|
+
dark?: IDarkMode;
|
|
6
|
+
data: IRow[];
|
|
7
|
+
loading: boolean;
|
|
8
|
+
draggableFieldState: DeepReadonly<DraggableFieldState>;
|
|
9
|
+
visualConfig: IVisualConfig;
|
|
10
|
+
}
|
|
11
|
+
declare const PivotTable: React.FC<PivotTableProps>;
|
|
12
|
+
export default PivotTable;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { INestNode } from './inteface';
|
|
3
|
+
import { IField } from '../../interfaces';
|
|
4
|
+
export interface TreeProps {
|
|
5
|
+
data: INestNode;
|
|
6
|
+
dimsInRow: IField[];
|
|
7
|
+
measInRow: IField[];
|
|
8
|
+
}
|
|
9
|
+
declare const LeftTree: React.FC<TreeProps>;
|
|
10
|
+
export default LeftTree;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { INestNode } from './inteface';
|
|
2
|
+
import { IAggQuery } from '../../lib/interfaces';
|
|
3
|
+
import { IField, IRow } from '../../interfaces';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
declare class PivotTableStore {
|
|
6
|
+
leftTree: INestNode | null;
|
|
7
|
+
topTree: INestNode | null;
|
|
8
|
+
metricTable: any[][];
|
|
9
|
+
dataSource: IRow[];
|
|
10
|
+
metas: IField[];
|
|
11
|
+
viewData: IRow[];
|
|
12
|
+
constructor();
|
|
13
|
+
init(dataSource: IRow[], metas: IField[]): void;
|
|
14
|
+
queryData(leftQuery: IAggQuery, topQuery: IAggQuery): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
export interface PivotTableDataProps {
|
|
17
|
+
data: IRow[];
|
|
18
|
+
metas: IField[];
|
|
19
|
+
}
|
|
20
|
+
export declare const PivotTableStoreWrapper: React.FC<PivotTableDataProps>;
|
|
21
|
+
export declare function usePivotTableStore(): PivotTableStore;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { INestNode } from './inteface';
|
|
3
|
+
import { IField } from '../../interfaces';
|
|
4
|
+
export interface TreeProps {
|
|
5
|
+
data: INestNode;
|
|
6
|
+
dimsInCol: IField[];
|
|
7
|
+
measInCol: IField[];
|
|
8
|
+
}
|
|
9
|
+
declare const TopTree: React.FC<TreeProps>;
|
|
10
|
+
export default TopTree;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IRow } from "../../interfaces";
|
|
2
|
+
import { INestNode } from "./inteface";
|
|
3
|
+
export declare function insertNode(tree: INestNode, layerKeys: string[], nodeData: IRow, depth: number): void;
|
|
4
|
+
export declare function buildNestTree(layerKeys: string[], data: IRow[]): INestNode;
|
|
5
|
+
export declare function buildMetricTableFromNestTree(leftTree: INestNode, topTree: INestNode, data: IRow[]): (IRow | null)[][];
|
|
6
|
+
export declare function getAllChildrenSize(node: INestNode, depth: number): number;
|
package/dist/config.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const _default: React.FunctionComponent<{}>;
|
|
3
|
+
export default _default;
|