@kanaries/graphic-walker 0.2.19 → 0.3.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.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ import { IAggregator } from "../../interfaces";
2
+ export interface INestNode {
3
+ key: string;
4
+ value: string;
5
+ children: INestNode[];
6
+ }
7
+ export interface IGroupByQuery {
8
+ groupBy: string[];
9
+ measures: {
10
+ field: string;
11
+ agg: IAggregator;
12
+ }[];
13
+ }
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { INestNode } from './inteface';
3
+ export interface TreeProps {
4
+ data: INestNode;
5
+ }
6
+ declare const LeftTree: React.FC<TreeProps>;
7
+ export default LeftTree;
@@ -0,0 +1,24 @@
1
+ import { IGroupByQuery, INestNode } from './inteface';
2
+ import { IField, IRow } from '../../interfaces';
3
+ import React from 'react';
4
+ declare class PivotTableStore {
5
+ leftTree: INestNode | null;
6
+ topTree: INestNode | null;
7
+ metricTable: any[][];
8
+ dataSource: IRow[];
9
+ metas: IField[];
10
+ viewData: IRow[];
11
+ constructor();
12
+ init(dataSource: IRow[], metas: IField[]): void;
13
+ createTree(query: IGroupByQuery, viewData: IRow[]): void;
14
+ createTopTree(query: IGroupByQuery, viewData: any): void;
15
+ createLeftTree(query: IGroupByQuery, viewData: any): void;
16
+ queryData(leftQuery: IGroupByQuery, topQuery: IGroupByQuery): Promise<void>;
17
+ }
18
+ export interface PivotTableDataProps {
19
+ data: IRow[];
20
+ metas: IField[];
21
+ }
22
+ export declare const PivotTableStoreWrapper: React.FC<PivotTableDataProps>;
23
+ export declare function usePivotTableStore(): PivotTableStore;
24
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { INestNode } from './inteface';
3
+ export interface TreeProps {
4
+ data: INestNode;
5
+ }
6
+ declare const TopTree: React.FC<TreeProps>;
7
+ export default TopTree;
@@ -0,0 +1,4 @@
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;
@@ -11982,7 +11982,7 @@ class Vp {
11982
11982
  }
11983
11983
  clone() {
11984
11984
  const t = new Vp(this.frame);
11985
- return t.cursor = this.cursor, t;
11985
+ return t.snapshots = this.snapshots.slice().map((n) => ({ ...n })), t.cursor = this.cursor, t;
11986
11986
  }
11987
11987
  exportGW() {
11988
11988
  return {