@visactor/vbi 0.4.16 → 0.4.19
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/builder/adapters/index.d.ts +1 -0
- package/dist/builder/adapters/vquery-vseed/build-vquery.d.ts +3 -0
- package/dist/builder/adapters/vquery-vseed/build-vseed.d.ts +3 -0
- package/dist/builder/adapters/vquery-vseed/index.d.ts +7 -0
- package/dist/builder/adapters/vquery-vseed/types.d.ts +4 -0
- package/dist/builder/builder.d.ts +29 -0
- package/dist/builder/features/dimensions/dim-builder.d.ts +10 -10
- package/dist/builder/features/dimensions/dim-node-builder.d.ts +4 -0
- package/dist/builder/features/dimensions/dimension-utils.d.ts +4 -0
- package/dist/builder/features/havingFilter/having-builder.d.ts +3 -3
- package/dist/builder/features/havingFilter/having-node-builder.d.ts +10 -1
- package/dist/builder/features/measures/mea-builder.d.ts +9 -9
- package/dist/builder/features/measures/mea-node-builder.d.ts +4 -0
- package/dist/builder/features/measures/measure-utils.d.ts +4 -0
- package/dist/builder/features/whereFilter/where-builder.d.ts +3 -3
- package/dist/builder/index.d.ts +3 -2
- package/dist/builder/modules/apply-update.d.ts +2 -0
- package/dist/builder/modules/build.d.ts +3 -0
- package/dist/builder/modules/encode-state-as-update.d.ts +2 -0
- package/dist/builder/modules/get-schema.d.ts +5 -0
- package/dist/builder/modules/index.d.ts +5 -0
- package/dist/builder/modules/is-empty.d.ts +2 -0
- package/dist/index.cjs +617 -399
- package/dist/index.d.ts +7 -3
- package/dist/index.js +605 -396
- package/dist/pipeline/vqueryDSL/aggregateMap.d.ts +30 -0
- package/dist/pipeline/vqueryDSL/index.d.ts +2 -3
- package/dist/pipeline/vqueryDSL/types.d.ts +2 -3
- package/dist/types/builder/VBIInterface.d.ts +5 -5
- package/dist/types/builder/adapter.d.ts +21 -0
- package/dist/types/builder/index.d.ts +1 -0
- package/dist/types/dsl/dimensions/dimensions.d.ts +2 -0
- package/dist/types/dsl/havingFilter/having.d.ts +19 -0
- package/dist/types/dsl/index.d.ts +1 -1
- package/dist/types/dsl/measures/aggregate.d.ts +14 -2
- package/dist/types/dsl/measures/measures.d.ts +28 -4
- package/dist/types/dsl/vbi/vbi.d.ts +15 -2
- package/dist/vbi/create-vbi.d.ts +15 -0
- package/dist/vbi/from/from-vbi-dsl-input.d.ts +4 -0
- package/dist/vbi/from/set-base-dsl-fields.d.ts +3 -0
- package/dist/vbi/generate-empty-dsl.d.ts +3 -0
- package/dist/vbi/normalize/ensure-having-group.d.ts +2 -0
- package/dist/vbi/normalize/ensure-where-group.d.ts +2 -0
- package/dist/vbi/normalize/ensure-y-array.d.ts +3 -0
- package/dist/vbi/normalize/to-y-map.d.ts +3 -0
- package/dist/vbi/normalize/types.d.ts +5 -0
- package/dist/vbi.d.ts +1 -0
- package/package.json +5 -5
- package/dist/builder/vbi-builder.d.ts +0 -28
- package/dist/builder/vbi.d.ts +0 -16
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type VQueryAggregateFunc = 'count' | 'count_distinct' | 'sum' | 'avg' | 'min' | 'max' | 'variance' | 'variance_pop' | 'stddev' | 'median' | 'quantile';
|
|
2
|
+
export type VQueryAggregate = {
|
|
3
|
+
func: VQueryAggregateFunc;
|
|
4
|
+
quantile?: number;
|
|
5
|
+
};
|
|
6
|
+
export type VBIAggregateInput = {
|
|
7
|
+
func: 'count';
|
|
8
|
+
} | {
|
|
9
|
+
func: 'countDistinct';
|
|
10
|
+
} | {
|
|
11
|
+
func: 'sum';
|
|
12
|
+
} | {
|
|
13
|
+
func: 'avg';
|
|
14
|
+
} | {
|
|
15
|
+
func: 'min';
|
|
16
|
+
} | {
|
|
17
|
+
func: 'max';
|
|
18
|
+
} | {
|
|
19
|
+
func: 'variance';
|
|
20
|
+
} | {
|
|
21
|
+
func: 'variancePop';
|
|
22
|
+
} | {
|
|
23
|
+
func: 'stddev';
|
|
24
|
+
} | {
|
|
25
|
+
func: 'median';
|
|
26
|
+
} | {
|
|
27
|
+
func: 'quantile';
|
|
28
|
+
quantile?: number;
|
|
29
|
+
};
|
|
30
|
+
export declare const mapAggregateForVQuery: (aggregate: VBIAggregateInput | undefined) => VQueryAggregate | undefined;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { VQueryDSL } from '@visactor/vquery';
|
|
2
|
-
import type { VBIDSL } from '../../types';
|
|
3
|
-
|
|
4
|
-
export declare const buildVQuery: (vbiDSL: VBIDSL, builder: VBIBuilder) => VQueryDSL;
|
|
2
|
+
import type { VBIBuilderInterface, VBIDSL } from '../../types';
|
|
3
|
+
export declare const buildVQuery: (vbiDSL: VBIDSL, builder: VBIBuilderInterface<any, any>) => VQueryDSL;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { VQueryDSL } from '@visactor/vquery';
|
|
2
|
-
import type { VBIDSL } from '../../types';
|
|
3
|
-
import type { VBIBuilder } from '../../builder';
|
|
2
|
+
import type { VBIBuilderInterface, VBIDSL } from '../../types';
|
|
4
3
|
export type buildPipe = (queryDSL: VQueryDSL, context: {
|
|
5
4
|
vbiDSL: VBIDSL;
|
|
6
|
-
builder:
|
|
5
|
+
builder: VBIBuilderInterface<any, any>;
|
|
7
6
|
}) => VQueryDSL;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DefaultVBIQueryDSL, DefaultVBISeedDSL } from '../../builder/adapters/vquery-vseed/types';
|
|
2
2
|
import type { VBIDSL } from '../dsl';
|
|
3
|
-
import type { VSeedDSL } from '@visactor/vseed';
|
|
4
3
|
import type { MeasuresBuilder, DimensionsBuilder, ChartTypeBuilder, HavingFilterBuilder, WhereFilterBuilder, ThemeBuilder, LocaleBuilder, LimitBuilder, UndoManager } from '../../builder/features';
|
|
5
4
|
import type { Map, Doc } from 'yjs';
|
|
6
|
-
export interface VBIBuilderInterface {
|
|
5
|
+
export interface VBIBuilderInterface<TQueryDSL = DefaultVBIQueryDSL, TSeedDSL = DefaultVBISeedDSL> {
|
|
7
6
|
doc: Doc;
|
|
8
7
|
dsl: Map<any>;
|
|
9
8
|
undoManager: UndoManager;
|
|
@@ -17,7 +16,8 @@ export interface VBIBuilderInterface {
|
|
|
17
16
|
limit: LimitBuilder;
|
|
18
17
|
applyUpdate: (update: Uint8Array, origin?: any) => void;
|
|
19
18
|
encodeStateAsUpdate: (targetStateVector?: Uint8Array) => Uint8Array;
|
|
20
|
-
buildVSeed: () => Promise<
|
|
21
|
-
buildVQuery: () =>
|
|
19
|
+
buildVSeed: () => Promise<TSeedDSL>;
|
|
20
|
+
buildVQuery: () => TQueryDSL;
|
|
22
21
|
build: () => VBIDSL;
|
|
22
|
+
isEmpty: () => boolean;
|
|
23
23
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { DefaultVBIQueryDSL, DefaultVBISeedDSL } from '../../builder/adapters/vquery-vseed/types';
|
|
2
|
+
import type { Map } from 'yjs';
|
|
3
|
+
import type { VBIDSL } from '../dsl';
|
|
4
|
+
import type { VBIBuilderInterface } from './VBIInterface';
|
|
5
|
+
export interface VBIBuildVQueryContext<TQueryDSL = DefaultVBIQueryDSL, TSeedDSL = DefaultVBISeedDSL> {
|
|
6
|
+
dsl: Map<any>;
|
|
7
|
+
vbiDSL: VBIDSL;
|
|
8
|
+
builder: VBIBuilderInterface<TQueryDSL, TSeedDSL>;
|
|
9
|
+
}
|
|
10
|
+
export interface VBIBuildVSeedContext<TQueryDSL = DefaultVBIQueryDSL, TSeedDSL = DefaultVBISeedDSL> extends VBIBuildVQueryContext<TQueryDSL, TSeedDSL> {
|
|
11
|
+
queryDSL: TQueryDSL;
|
|
12
|
+
}
|
|
13
|
+
export type VBIQueryBuilder<TQueryDSL = DefaultVBIQueryDSL, TSeedDSL = DefaultVBISeedDSL> = (context: VBIBuildVQueryContext<TQueryDSL, TSeedDSL>) => TQueryDSL;
|
|
14
|
+
export type VBISeedBuilder<TQueryDSL = DefaultVBIQueryDSL, TSeedDSL = DefaultVBISeedDSL> = (context: VBIBuildVSeedContext<TQueryDSL, TSeedDSL>) => Promise<TSeedDSL> | TSeedDSL;
|
|
15
|
+
export interface VBIBuilderAdapters<TQueryDSL = DefaultVBIQueryDSL, TSeedDSL = DefaultVBISeedDSL> {
|
|
16
|
+
buildVQuery: VBIQueryBuilder<TQueryDSL, TSeedDSL>;
|
|
17
|
+
buildVSeed: VBISeedBuilder<TQueryDSL, TSeedDSL>;
|
|
18
|
+
}
|
|
19
|
+
export interface VBIBuilderOptions<TQueryDSL = DefaultVBIQueryDSL, TSeedDSL = DefaultVBISeedDSL> {
|
|
20
|
+
adapters?: Partial<VBIBuilderAdapters<TQueryDSL, TSeedDSL>>;
|
|
21
|
+
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const zVBIDimensionSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
3
4
|
field: z.ZodString;
|
|
4
5
|
alias: z.ZodString;
|
|
5
6
|
}, z.core.$strip>;
|
|
6
7
|
export declare const zVBIDimensionGroupSchema: z.ZodType<VBIDimensionGroup>;
|
|
7
8
|
export declare const zVBIDimensionTree: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
9
|
+
id: z.ZodString;
|
|
8
10
|
field: z.ZodString;
|
|
9
11
|
alias: z.ZodString;
|
|
10
12
|
}, z.core.$strip>, z.ZodType<VBIDimensionGroup, unknown, z.core.$ZodTypeInternals<VBIDimensionGroup, unknown>>]>>;
|
|
@@ -1,11 +1,30 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { zAggregate } from '../measures/aggregate';
|
|
2
3
|
declare const zHavingLogicalOperator: z.ZodEnum<{
|
|
3
4
|
and: "and";
|
|
4
5
|
or: "or";
|
|
5
6
|
}>;
|
|
7
|
+
export type VBIHavingAggregate = z.infer<typeof zAggregate>;
|
|
6
8
|
export declare const zVBIHavingFilter: z.ZodObject<{
|
|
7
9
|
id: z.ZodString;
|
|
8
10
|
field: z.ZodString;
|
|
11
|
+
aggregate: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
12
|
+
func: z.ZodEnum<{
|
|
13
|
+
count: "count";
|
|
14
|
+
countDistinct: "countDistinct";
|
|
15
|
+
sum: "sum";
|
|
16
|
+
avg: "avg";
|
|
17
|
+
min: "min";
|
|
18
|
+
max: "max";
|
|
19
|
+
variance: "variance";
|
|
20
|
+
variancePop: "variancePop";
|
|
21
|
+
stddev: "stddev";
|
|
22
|
+
median: "median";
|
|
23
|
+
}>;
|
|
24
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
25
|
+
func: z.ZodLiteral<"quantile">;
|
|
26
|
+
quantile: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
}, z.core.$strip>], "func">>;
|
|
9
28
|
op: z.ZodOptional<z.ZodString>;
|
|
10
29
|
value: z.ZodOptional<z.ZodAny>;
|
|
11
30
|
}, z.core.$strip>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type { VBIDimensionTree, VBIDimensionGroup, VBIDimension } from './dimensions/dimensions';
|
|
2
2
|
export type { VBIMeasureTree, VBIMeasureGroup, VBIMeasure } from './measures/measures';
|
|
3
3
|
export type { VBIFilter, VBIWhereGroup, VBIWhereClause } from './whereFilter/filters';
|
|
4
|
-
export type { VBIHavingFilter, VBIHavingGroup, VBIHavingClause } from './havingFilter/having';
|
|
4
|
+
export type { VBIHavingFilter, VBIHavingGroup, VBIHavingClause, VBIHavingAggregate } from './havingFilter/having';
|
|
5
5
|
export type { VBIDSLTheme } from './theme/theme';
|
|
6
6
|
export type { VBIDSLLocale } from './locale/locale';
|
|
7
7
|
export type { VBIDSL, VBIDSLInput } from './vbi/vbi';
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
export declare const VBI_MEASURE_SIMPLE_AGGREGATE_FUNCS: readonly ["count", "countDistinct", "sum", "avg", "min", "max", "variance", "variancePop", "stddev", "median"];
|
|
2
3
|
export declare const zAggregate: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
-
func: z.
|
|
4
|
+
func: z.ZodEnum<{
|
|
5
|
+
count: "count";
|
|
6
|
+
countDistinct: "countDistinct";
|
|
7
|
+
sum: "sum";
|
|
8
|
+
avg: "avg";
|
|
9
|
+
min: "min";
|
|
10
|
+
max: "max";
|
|
11
|
+
variance: "variance";
|
|
12
|
+
variancePop: "variancePop";
|
|
13
|
+
stddev: "stddev";
|
|
14
|
+
median: "median";
|
|
15
|
+
}>;
|
|
4
16
|
}, z.core.$strip>, z.ZodObject<{
|
|
5
17
|
func: z.ZodLiteral<"quantile">;
|
|
6
|
-
quantile: z.ZodNumber
|
|
18
|
+
quantile: z.ZodOptional<z.ZodNumber>;
|
|
7
19
|
}, z.core.$strip>], "func">;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const zVBIMeasure: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
3
4
|
field: z.ZodString;
|
|
4
5
|
alias: z.ZodString;
|
|
5
6
|
encoding: z.ZodEnum<{
|
|
@@ -11,14 +12,26 @@ export declare const zVBIMeasure: z.ZodObject<{
|
|
|
11
12
|
size: "size";
|
|
12
13
|
}>;
|
|
13
14
|
aggregate: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
14
|
-
func: z.
|
|
15
|
+
func: z.ZodEnum<{
|
|
16
|
+
count: "count";
|
|
17
|
+
countDistinct: "countDistinct";
|
|
18
|
+
sum: "sum";
|
|
19
|
+
avg: "avg";
|
|
20
|
+
min: "min";
|
|
21
|
+
max: "max";
|
|
22
|
+
variance: "variance";
|
|
23
|
+
variancePop: "variancePop";
|
|
24
|
+
stddev: "stddev";
|
|
25
|
+
median: "median";
|
|
26
|
+
}>;
|
|
15
27
|
}, z.core.$strip>, z.ZodObject<{
|
|
16
28
|
func: z.ZodLiteral<"quantile">;
|
|
17
|
-
quantile: z.ZodNumber
|
|
29
|
+
quantile: z.ZodOptional<z.ZodNumber>;
|
|
18
30
|
}, z.core.$strip>], "func">;
|
|
19
31
|
}, z.core.$strip>;
|
|
20
32
|
export declare const zVBIMeasureGroup: z.ZodType<VBIMeasureGroup>;
|
|
21
33
|
export declare const zVBIMeasureTree: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
34
|
+
id: z.ZodString;
|
|
22
35
|
field: z.ZodString;
|
|
23
36
|
alias: z.ZodString;
|
|
24
37
|
encoding: z.ZodEnum<{
|
|
@@ -30,10 +43,21 @@ export declare const zVBIMeasureTree: z.ZodArray<z.ZodUnion<readonly [z.ZodObjec
|
|
|
30
43
|
size: "size";
|
|
31
44
|
}>;
|
|
32
45
|
aggregate: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
33
|
-
func: z.
|
|
46
|
+
func: z.ZodEnum<{
|
|
47
|
+
count: "count";
|
|
48
|
+
countDistinct: "countDistinct";
|
|
49
|
+
sum: "sum";
|
|
50
|
+
avg: "avg";
|
|
51
|
+
min: "min";
|
|
52
|
+
max: "max";
|
|
53
|
+
variance: "variance";
|
|
54
|
+
variancePop: "variancePop";
|
|
55
|
+
stddev: "stddev";
|
|
56
|
+
median: "median";
|
|
57
|
+
}>;
|
|
34
58
|
}, z.core.$strip>, z.ZodObject<{
|
|
35
59
|
func: z.ZodLiteral<"quantile">;
|
|
36
|
-
quantile: z.ZodNumber
|
|
60
|
+
quantile: z.ZodOptional<z.ZodNumber>;
|
|
37
61
|
}, z.core.$strip>], "func">;
|
|
38
62
|
}, z.core.$strip>, z.ZodType<VBIMeasureGroup, unknown, z.core.$ZodTypeInternals<VBIMeasureGroup, unknown>>]>>;
|
|
39
63
|
export type VBIMeasure = z.infer<typeof zVBIMeasure>;
|
|
@@ -3,10 +3,12 @@ export declare const zVBIDSL: z.ZodObject<{
|
|
|
3
3
|
connectorId: z.ZodString;
|
|
4
4
|
chartType: z.ZodCustom<any, any>;
|
|
5
5
|
dimensions: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
6
|
+
id: z.ZodString;
|
|
6
7
|
field: z.ZodString;
|
|
7
8
|
alias: z.ZodString;
|
|
8
9
|
}, z.core.$strip>, z.ZodType<import("..").VBIDimensionGroup, unknown, z.core.$ZodTypeInternals<import("..").VBIDimensionGroup, unknown>>]>>;
|
|
9
10
|
measures: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
11
|
+
id: z.ZodString;
|
|
10
12
|
field: z.ZodString;
|
|
11
13
|
alias: z.ZodString;
|
|
12
14
|
encoding: z.ZodEnum<{
|
|
@@ -18,10 +20,21 @@ export declare const zVBIDSL: z.ZodObject<{
|
|
|
18
20
|
size: "size";
|
|
19
21
|
}>;
|
|
20
22
|
aggregate: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
21
|
-
func: z.
|
|
23
|
+
func: z.ZodEnum<{
|
|
24
|
+
count: "count";
|
|
25
|
+
countDistinct: "countDistinct";
|
|
26
|
+
sum: "sum";
|
|
27
|
+
avg: "avg";
|
|
28
|
+
min: "min";
|
|
29
|
+
max: "max";
|
|
30
|
+
variance: "variance";
|
|
31
|
+
variancePop: "variancePop";
|
|
32
|
+
stddev: "stddev";
|
|
33
|
+
median: "median";
|
|
34
|
+
}>;
|
|
22
35
|
}, z.core.$strip>, z.ZodObject<{
|
|
23
36
|
func: z.ZodLiteral<"quantile">;
|
|
24
|
-
quantile: z.ZodNumber
|
|
37
|
+
quantile: z.ZodOptional<z.ZodNumber>;
|
|
25
38
|
}, z.core.$strip>], "func">;
|
|
26
39
|
}, z.core.$strip>, z.ZodType<import("..").VBIMeasureGroup, unknown, z.core.$ZodTypeInternals<import("..").VBIMeasureGroup, unknown>>]>>;
|
|
27
40
|
havingFilter: z.ZodDefault<z.ZodOptional<z.ZodType<{
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DefaultVBIQueryDSL, DefaultVBISeedDSL } from '../builder/adapters/vquery-vseed/types';
|
|
2
|
+
import { connectorMap, getConnector, registerConnector } from '../builder/connector';
|
|
3
|
+
import type { VBIBuilder } from '../builder/builder';
|
|
4
|
+
import type { VBIDSLInput, VBIBuilderOptions } from '../types';
|
|
5
|
+
import { generateEmptyDSL } from './generate-empty-dsl';
|
|
6
|
+
export interface VBIInstance<TQueryDSL = DefaultVBIQueryDSL, TSeedDSL = DefaultVBISeedDSL> {
|
|
7
|
+
connectorMap: typeof connectorMap;
|
|
8
|
+
registerConnector: typeof registerConnector;
|
|
9
|
+
getConnector: typeof getConnector;
|
|
10
|
+
generateEmptyDSL: typeof generateEmptyDSL;
|
|
11
|
+
from: (vbi: VBIDSLInput, builderOptions?: VBIBuilderOptions<TQueryDSL, TSeedDSL>) => VBIBuilder<TQueryDSL, TSeedDSL>;
|
|
12
|
+
create: (vbi: VBIDSLInput, builderOptions?: VBIBuilderOptions<TQueryDSL, TSeedDSL>) => VBIBuilder<TQueryDSL, TSeedDSL>;
|
|
13
|
+
}
|
|
14
|
+
export declare function createVBI(): VBIInstance<DefaultVBIQueryDSL, DefaultVBISeedDSL>;
|
|
15
|
+
export declare function createVBI<TQueryDSL, TSeedDSL>(defaultBuilderOptions: VBIBuilderOptions<TQueryDSL, TSeedDSL>): VBIInstance<TQueryDSL, TSeedDSL>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { DefaultVBIQueryDSL, DefaultVBISeedDSL } from '../../builder/adapters/vquery-vseed/types';
|
|
2
|
+
import type { VBIDSLInput, VBIBuilderOptions } from '../../types';
|
|
3
|
+
import { VBIBuilder } from '../../builder';
|
|
4
|
+
export declare const fromVBIDSLInput: <TQueryDSL = DefaultVBIQueryDSL, TSeedDSL = DefaultVBISeedDSL>(vbi: VBIDSLInput, options?: VBIBuilderOptions<TQueryDSL, TSeedDSL>) => VBIBuilder<TQueryDSL, TSeedDSL>;
|
package/dist/vbi.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const VBI: import(".").VBIInstance<import("./builder").DefaultVBIQueryDSL, import("@visactor/vseed").VSeed>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visactor/vbi",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.19",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://visactor.github.io/VBI",
|
|
6
6
|
"bugs": "https://github.com/VisActor/VBI/issues",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"uuid": "13.0.0",
|
|
34
34
|
"yjs": "13.6.28",
|
|
35
35
|
"zod": "4.0.17",
|
|
36
|
-
"@visactor/vseed": "0.4.
|
|
36
|
+
"@visactor/vseed": "0.4.19"
|
|
37
37
|
},
|
|
38
38
|
"optionalDependencies": {
|
|
39
|
-
"@visactor/
|
|
40
|
-
"@visactor/
|
|
39
|
+
"@visactor/vquery": "0.4.19",
|
|
40
|
+
"@visactor/vseed": "0.4.19"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@eslint/js": "9.39.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"ts-morph": "26.0.0",
|
|
52
52
|
"typescript": "5.9.3",
|
|
53
53
|
"typescript-eslint": "8.48.0",
|
|
54
|
-
"@visactor/vquery": "0.4.
|
|
54
|
+
"@visactor/vquery": "0.4.19"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "rslib build",
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import * as Y from 'yjs';
|
|
2
|
-
import { VSeedDSL } from '@visactor/vseed';
|
|
3
|
-
import { VQueryDSL } from '@visactor/vquery';
|
|
4
|
-
import { DimensionsBuilder, MeasuresBuilder, HavingFilterBuilder, WhereFilterBuilder, ChartTypeBuilder, ThemeBuilder, LocaleBuilder, LimitBuilder, UndoManager } from './features';
|
|
5
|
-
import { VBIDSL, VBIBuilderInterface } from '../types';
|
|
6
|
-
export declare class VBIBuilder implements VBIBuilderInterface {
|
|
7
|
-
doc: Y.Doc;
|
|
8
|
-
dsl: Y.Map<any>;
|
|
9
|
-
undoManager: UndoManager;
|
|
10
|
-
chartType: ChartTypeBuilder;
|
|
11
|
-
measures: MeasuresBuilder;
|
|
12
|
-
dimensions: DimensionsBuilder;
|
|
13
|
-
havingFilter: HavingFilterBuilder;
|
|
14
|
-
whereFilter: WhereFilterBuilder;
|
|
15
|
-
theme: ThemeBuilder;
|
|
16
|
-
locale: LocaleBuilder;
|
|
17
|
-
limit: LimitBuilder;
|
|
18
|
-
constructor(doc: Y.Doc);
|
|
19
|
-
applyUpdate(update: Uint8Array): void;
|
|
20
|
-
encodeStateAsUpdate(targetStateVector?: Uint8Array): Uint8Array<ArrayBufferLike>;
|
|
21
|
-
buildVSeed: () => Promise<VSeedDSL>;
|
|
22
|
-
buildVQuery: () => VQueryDSL;
|
|
23
|
-
build: () => VBIDSL;
|
|
24
|
-
getSchema: () => Promise<{
|
|
25
|
-
name: string;
|
|
26
|
-
type: string;
|
|
27
|
-
}[]>;
|
|
28
|
-
}
|
package/dist/builder/vbi.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { VBIConnectorId } from '../types/connector/connector';
|
|
2
|
-
import { VBIDSL, VBIDSLInput } from '../types';
|
|
3
|
-
import { VBIBuilder } from './vbi-builder';
|
|
4
|
-
export declare const VBI: {
|
|
5
|
-
connectorMap: Map<string, {
|
|
6
|
-
discoverSchema: () => Promise<import("../types").VBISchema>;
|
|
7
|
-
query: (queryProps: import("../types").VBIQueryProps) => Promise<import("../types").VBIQueryResult>;
|
|
8
|
-
} | (() => Promise<import("../types").VBIConnector>)>;
|
|
9
|
-
registerConnector: (id: VBIConnectorId, connector: import("../types").VBIConnector | (() => Promise<import("../types").VBIConnector>)) => void;
|
|
10
|
-
getConnector: (id: VBIConnectorId) => Promise<{
|
|
11
|
-
discoverSchema: () => Promise<import("../types").VBISchema>;
|
|
12
|
-
query: (queryProps: import("../types").VBIQueryProps) => Promise<import("../types").VBIQueryResult>;
|
|
13
|
-
}>;
|
|
14
|
-
generateEmptyDSL: (connectorId: VBIConnectorId) => VBIDSL;
|
|
15
|
-
from: (vbi: VBIDSLInput) => VBIBuilder;
|
|
16
|
-
};
|