@visactor/vbi 0.0.0 → 0.4.13
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/LICENSE +21 -0
- package/dist/builder/sub-builders/havingFilters/having-builder.d.ts +33 -20
- package/dist/builder/sub-builders/havingFilters/having-group-builder.d.ts +48 -0
- package/dist/builder/sub-builders/havingFilters/having-node-builder.d.ts +8 -0
- package/dist/builder/sub-builders/havingFilters/index.d.ts +1 -0
- package/dist/builder/sub-builders/index.d.ts +1 -1
- package/dist/builder/sub-builders/whereFilters/index.d.ts +1 -0
- package/dist/builder/sub-builders/whereFilters/where-builder.d.ts +30 -17
- package/dist/builder/sub-builders/whereFilters/where-group-builder.d.ts +48 -0
- package/dist/builder/sub-builders/whereFilters/where-node-builder.d.ts +8 -0
- package/dist/index.cjs +424 -129
- package/dist/index.js +406 -120
- package/dist/pipeline/index.d.ts +1 -1
- package/dist/pipeline/vqueryDSL/buildGroupBy.d.ts +2 -0
- package/dist/pipeline/vqueryDSL/buildHaving.d.ts +2 -0
- package/dist/pipeline/vqueryDSL/buildLimit.d.ts +2 -0
- package/dist/pipeline/vqueryDSL/buildSelect.d.ts +2 -0
- package/dist/pipeline/vqueryDSL/buildWhere.d.ts +2 -0
- package/dist/pipeline/vqueryDSL/index.d.ts +4 -1
- package/dist/pipeline/vqueryDSL/types.d.ts +7 -0
- package/dist/types/dsl/havingFilters/having.d.ts +12 -7
- package/dist/types/dsl/index.d.ts +4 -2
- package/dist/types/dsl/vbi/vbi.d.ts +2 -10
- package/dist/types/dsl/whereFilters/filters.d.ts +12 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/utils/id.d.ts +3 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +38 -23
- package/dist/pipeline/vqueryDSL/buildVQuery.d.ts +0 -4
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import type { VQueryDSL } from '@visactor/vquery';
|
|
2
|
+
import type { VBIDSL } from '../../types';
|
|
3
|
+
import type { VBIBuilder } from '../../builder';
|
|
4
|
+
export declare const buildVQuery: (vbiDSL: VBIDSL, builder: VBIBuilder) => VQueryDSL;
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const zVBIHavingFilter: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
3
4
|
field: z.ZodString;
|
|
4
|
-
|
|
5
|
+
op: z.ZodOptional<z.ZodString>;
|
|
5
6
|
value: z.ZodOptional<z.ZodAny>;
|
|
6
7
|
}, z.core.$strip>;
|
|
7
8
|
export type VBIHavingFilter = z.infer<typeof zVBIHavingFilter>;
|
|
8
|
-
export declare const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
export declare const zVBIHavingGroup: z.ZodType<VBIHavingGroup>;
|
|
10
|
+
export declare const zVBIHavingClause: z.ZodType<VBIHavingClause>;
|
|
11
|
+
export type VBIHavingGroup = {
|
|
12
|
+
id: string;
|
|
13
|
+
op: 'and' | 'or';
|
|
14
|
+
conditions: VBIHavingClause[];
|
|
15
|
+
};
|
|
16
|
+
export type VBIHavingClause = VBIHavingFilter | VBIHavingGroup;
|
|
17
|
+
export declare function isVBIHavingFilter(clause: VBIHavingClause): clause is VBIHavingFilter;
|
|
18
|
+
export declare function isVBIHavingGroup(clause: VBIHavingClause): clause is VBIHavingGroup;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export type { VBIDimensionTree, VBIDimensionGroup, VBIDimension } from './dimensions/dimensions';
|
|
2
2
|
export type { VBIMeasureTree, VBIMeasureGroup, VBIMeasure } from './measures/measures';
|
|
3
|
-
export type { VBIFilter } from './whereFilters/filters';
|
|
4
|
-
export
|
|
3
|
+
export type { VBIFilter, VBIWhereGroup, VBIWhereClause } from './whereFilters/filters';
|
|
4
|
+
export { isVBIFilter, isVBIWhereGroup } from './whereFilters/filters';
|
|
5
|
+
export type { VBIHavingFilter, VBIHavingGroup, VBIHavingClause } from './havingFilters/having';
|
|
6
|
+
export { isVBIHavingFilter, isVBIHavingGroup } from './havingFilters/having';
|
|
5
7
|
export type { VBIDSLTheme } from './theme/theme';
|
|
6
8
|
export type { VBIDSL } from './vbi/vbi';
|
|
@@ -17,16 +17,8 @@ export declare const zVBIDSL: z.ZodObject<{
|
|
|
17
17
|
quantile: z.ZodNumber;
|
|
18
18
|
}, z.core.$strip>], "func">;
|
|
19
19
|
}, z.core.$strip>, z.ZodType<import("..").VBIMeasureGroup, unknown, z.core.$ZodTypeInternals<import("..").VBIMeasureGroup, unknown>>]>>;
|
|
20
|
-
havingFilters: z.ZodDefault<z.ZodOptional<z.ZodArray<z.
|
|
21
|
-
|
|
22
|
-
operator: z.ZodOptional<z.ZodString>;
|
|
23
|
-
value: z.ZodOptional<z.ZodAny>;
|
|
24
|
-
}, z.core.$strip>>>>;
|
|
25
|
-
whereFilters: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
26
|
-
field: z.ZodString;
|
|
27
|
-
operator: z.ZodOptional<z.ZodString>;
|
|
28
|
-
value: z.ZodOptional<z.ZodAny>;
|
|
29
|
-
}, z.core.$strip>>>>;
|
|
20
|
+
havingFilters: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodType<import("..").VBIHavingClause, unknown, z.core.$ZodTypeInternals<import("..").VBIHavingClause, unknown>>>>>;
|
|
21
|
+
whereFilters: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodType<import("..").VBIWhereClause, unknown, z.core.$ZodTypeInternals<import("..").VBIWhereClause, unknown>>>>>;
|
|
30
22
|
theme: z.ZodEnum<{
|
|
31
23
|
light: "light";
|
|
32
24
|
dark: "dark";
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const zVBIFilter: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
3
4
|
field: z.ZodString;
|
|
4
|
-
|
|
5
|
+
op: z.ZodOptional<z.ZodString>;
|
|
5
6
|
value: z.ZodOptional<z.ZodAny>;
|
|
6
7
|
}, z.core.$strip>;
|
|
7
8
|
export type VBIFilter = z.infer<typeof zVBIFilter>;
|
|
9
|
+
export declare const zVBIWhereGroup: z.ZodType<VBIWhereGroup>;
|
|
10
|
+
export declare const zVBIWhereClause: z.ZodType<VBIWhereClause>;
|
|
11
|
+
export type VBIWhereGroup = {
|
|
12
|
+
id: string;
|
|
13
|
+
op: 'and' | 'or';
|
|
14
|
+
conditions: VBIWhereClause[];
|
|
15
|
+
};
|
|
16
|
+
export type VBIWhereClause = VBIFilter | VBIWhereGroup;
|
|
17
|
+
export declare function isVBIFilter(clause: VBIWhereClause): clause is VBIFilter;
|
|
18
|
+
export declare function isVBIWhereGroup(clause: VBIWhereClause): clause is VBIWhereGroup;
|
package/dist/types/index.d.ts
CHANGED
package/dist/utils/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visactor/vbi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.13",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"homepage": "https://visactor.github.io/VBI",
|
|
6
|
+
"bugs": "https://github.com/VisActor/VBI/issues",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/VisActor/VBI",
|
|
10
|
+
"directory": "packages/vquery"
|
|
11
|
+
},
|
|
12
|
+
"author": {
|
|
13
|
+
"name": "VisActor",
|
|
14
|
+
"url": "https://www.visactor.io/"
|
|
15
|
+
},
|
|
4
16
|
"type": "module",
|
|
5
17
|
"exports": {
|
|
6
18
|
".": {
|
|
@@ -15,41 +27,44 @@
|
|
|
15
27
|
"files": [
|
|
16
28
|
"dist"
|
|
17
29
|
],
|
|
18
|
-
"scripts": {
|
|
19
|
-
"build": "rslib build",
|
|
20
|
-
"dev": "rslib build --watch --no-clean",
|
|
21
|
-
"format": "prettier --write .",
|
|
22
|
-
"lint": "eslint .",
|
|
23
|
-
"test": "rstest",
|
|
24
|
-
"test:update": "rstest --update",
|
|
25
|
-
"test:coverage": "rstest --coverage && node scripts/build-coverage-badge.mjs && open coverage/index.html",
|
|
26
|
-
"typecheck": "tsc --noEmit",
|
|
27
|
-
"build:test": "node scripts/build-tests.mjs",
|
|
28
|
-
"build:examples": "node scripts/build-examples.mjs",
|
|
29
|
-
"build:api": "node scripts/build-api.mjs",
|
|
30
|
-
"g": "pnpm run build:test && pnpm run build:examples && pnpm run build:api && pnpm run format"
|
|
31
|
-
},
|
|
32
30
|
"dependencies": {
|
|
33
|
-
"zod": "4.0.17",
|
|
34
31
|
"remeda": "2.28.0",
|
|
35
|
-
"yjs": "13.6.28",
|
|
36
32
|
"simple-statistics": "7.8.8",
|
|
37
|
-
"
|
|
33
|
+
"uuid": "13.0.0",
|
|
34
|
+
"yjs": "13.6.28",
|
|
35
|
+
"zod": "4.0.17",
|
|
36
|
+
"@visactor/vseed": "0.4.13"
|
|
38
37
|
},
|
|
39
|
-
"
|
|
40
|
-
"@visactor/
|
|
38
|
+
"optionalDependencies": {
|
|
39
|
+
"@visactor/vquery": "0.4.13",
|
|
40
|
+
"@visactor/vseed": "0.4.13"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@visactor/vquery": "workspace:*",
|
|
44
43
|
"@eslint/js": "9.39.0",
|
|
45
44
|
"@rslib/core": "0.16.1",
|
|
46
45
|
"@rstest/core": "0.8.3",
|
|
47
46
|
"@types/node": "24.10.1",
|
|
47
|
+
"@types/uuid": "11.0.0",
|
|
48
48
|
"eslint": "9.39.0",
|
|
49
49
|
"globals": "16.4.0",
|
|
50
50
|
"prettier": "3.6.2",
|
|
51
|
+
"ts-morph": "26.0.0",
|
|
51
52
|
"typescript": "5.9.3",
|
|
52
53
|
"typescript-eslint": "8.48.0",
|
|
53
|
-
"
|
|
54
|
+
"@visactor/vquery": "0.4.13"
|
|
55
|
+
},
|
|
56
|
+
"scripts": {
|
|
57
|
+
"build": "rslib build",
|
|
58
|
+
"dev": "rslib build --watch --no-clean",
|
|
59
|
+
"format": "prettier --write .",
|
|
60
|
+
"lint": "eslint .",
|
|
61
|
+
"test": "rstest",
|
|
62
|
+
"test:update": "rstest --update",
|
|
63
|
+
"test:coverage": "rstest --coverage && node scripts/build-coverage-badge.mjs && open coverage/index.html",
|
|
64
|
+
"typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.test.json",
|
|
65
|
+
"build:test": "node scripts/build-tests.mjs",
|
|
66
|
+
"build:examples": "node scripts/build-examples.mjs",
|
|
67
|
+
"build:api": "node scripts/build-api.mjs",
|
|
68
|
+
"g": "pnpm build:test && pnpm build:examples && pnpm build:api && pnpm test:update && pnpm format"
|
|
54
69
|
}
|
|
55
|
-
}
|
|
70
|
+
}
|