@vuu-ui/vuu-filter-parser 4.0.1 → 5.0.0-alpha.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.
- package/package.json +12 -10
- package/types/FilterParser.d.ts +1 -1
- package/types/FilterTreeWalker.d.ts +2 -2
- package/types/filter-evaluation-utils.d.ts +5 -5
- package/types/src/FilterParser.d.ts +0 -2
- package/types/src/FilterTreeWalker.d.ts +0 -3
- package/types/src/filter-evaluation-utils.d.ts +0 -17
- package/types/src/generated/filter-parser.d.ts +0 -2
- package/types/src/generated/filter-parser.terms.d.ts +0 -1
- package/types/src/index.d.ts +0 -4
package/package.json
CHANGED
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "5.0.0-alpha.1",
|
|
3
3
|
"main": "./src/index.js",
|
|
4
4
|
"author": "heswell",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"prebuild": "npm run lezer-generate:filter",
|
|
9
|
-
"build:dev": "node ../../scripts/run-build.mjs",
|
|
10
9
|
"build": "node ../../scripts/run-build-rslib.ts",
|
|
11
|
-
"lezer-generate:filter": "lezer-generator --output ./src/generated/filter-parser.
|
|
12
|
-
"type-defs": "node ../../scripts/build-type-defs.mjs"
|
|
10
|
+
"lezer-generate:filter": "lezer-generator --output ./src/generated/filter-parser.ts ./src/grammar/filter.grammar",
|
|
11
|
+
"type-defs": "node ../../scripts/build-type-defs.mjs",
|
|
12
|
+
"tsc": "tsc --showConfig -p ./tsconfig-emit-types.json",
|
|
13
|
+
"tsc:list": "tsc --listFilesOnly -p ./tsconfig-emit-types.json",
|
|
14
|
+
"tsc:trace": "tsc --traceResolution -p ./tsconfig-emit-types.json"
|
|
13
15
|
},
|
|
14
16
|
"devDependencies": {
|
|
15
|
-
"@vuu-ui/vuu-data-types": "
|
|
16
|
-
"@vuu-ui/vuu-filter-types": "
|
|
17
|
-
"@vuu-ui/vuu-table-types": "
|
|
17
|
+
"@vuu-ui/vuu-data-types": "5.0.0-alpha.1",
|
|
18
|
+
"@vuu-ui/vuu-filter-types": "5.0.0-alpha.1",
|
|
19
|
+
"@vuu-ui/vuu-table-types": "5.0.0-alpha.1"
|
|
18
20
|
},
|
|
19
21
|
"dependencies": {
|
|
20
22
|
"@lezer/common": "^1.0.2",
|
|
21
23
|
"@lezer/lr": "1.4.2",
|
|
22
|
-
"@vuu-ui/vuu-utils": "
|
|
24
|
+
"@vuu-ui/vuu-utils": "5.0.0-alpha.1"
|
|
23
25
|
},
|
|
24
26
|
"files": [
|
|
25
27
|
"README.md",
|
|
@@ -28,9 +30,9 @@
|
|
|
28
30
|
],
|
|
29
31
|
"exports": {
|
|
30
32
|
".": {
|
|
33
|
+
"types": "./types/index.d.ts",
|
|
31
34
|
"import": "./src/index.js",
|
|
32
|
-
"default": "./src/index.js"
|
|
33
|
-
"types": "./types/index.d.ts"
|
|
35
|
+
"default": "./src/index.js"
|
|
34
36
|
}
|
|
35
37
|
},
|
|
36
38
|
"module": "./src/index.js",
|
package/types/FilterParser.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Filter } from "@vuu-ui/vuu-filter-types";
|
|
1
|
+
import type { Filter } from "@vuu-ui/vuu-filter-types";
|
|
2
2
|
export declare const parseFilter: (filterQuery: string) => Filter;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Tree } from "@lezer/common";
|
|
2
|
-
import { Filter } from "@vuu-ui/vuu-filter-types";
|
|
1
|
+
import type { Tree } from "@lezer/common";
|
|
2
|
+
import type { Filter } from "@vuu-ui/vuu-filter-types";
|
|
3
3
|
export declare const walkTree: (tree: Tree, source: string) => Partial<Filter> | undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { DataSourceRowWithBigint } from "@vuu-ui/vuu-data-types";
|
|
2
|
-
import { ColumnDescriptorsByName, Filter } from "@vuu-ui/vuu-filter-types";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import type { DataSourceRowWithBigint } from "@vuu-ui/vuu-data-types";
|
|
2
|
+
import type { ColumnDescriptorsByName, Filter } from "@vuu-ui/vuu-filter-types";
|
|
3
|
+
import type { VuuDataRow } from "@vuu-ui/vuu-protocol-types";
|
|
4
|
+
import type { DataRow } from "@vuu-ui/vuu-table-types";
|
|
5
|
+
import { type ColumnMap } from "@vuu-ui/vuu-utils";
|
|
6
6
|
export type FilterPredicate = (row: DataSourceRowWithBigint | VuuDataRow) => boolean;
|
|
7
7
|
export type DataRowFilterPredicate = (row: DataRow) => boolean;
|
|
8
8
|
export declare function getFilterPredicate(columnMap: ColumnMap, filterQuery: string): FilterPredicate;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { DataSourceRowWithBigint } from "@vuu-ui/vuu-data-types";
|
|
2
|
-
import { Filter } from "@vuu-ui/vuu-filter-types";
|
|
3
|
-
import { ColumnMap } from "@vuu-ui/vuu-utils";
|
|
4
|
-
import { VuuDataRow } from "@vuu-ui/vuu-protocol-types";
|
|
5
|
-
import { DataRow } from "@vuu-ui/vuu-table-types";
|
|
6
|
-
export type FilterPredicate = (row: DataSourceRowWithBigint | VuuDataRow) => boolean;
|
|
7
|
-
export type DataRowFilterPredicate = (row: DataRow) => boolean;
|
|
8
|
-
export declare function getFilterPredicate(columnMap: ColumnMap, filterQuery: string): FilterPredicate;
|
|
9
|
-
export declare function getFilterPredicate(filterQuery: string): DataRowFilterPredicate;
|
|
10
|
-
/**
|
|
11
|
-
* Generates a filterPredicate that can be used to test a row against a filter
|
|
12
|
-
* Two row formats supported:
|
|
13
|
-
* - DataRow, used by Tables, when evaluatingn a Menu filter.
|
|
14
|
-
* - DataSourceRow, used by local data source, like ArrayDataSOurce
|
|
15
|
-
*/
|
|
16
|
-
export declare function filterPredicate(columnMap: ColumnMap, filter: Filter): FilterPredicate;
|
|
17
|
-
export declare function filterPredicate(filter: Filter): DataRowFilterPredicate;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const Filter = 1, ColumnValueExpression = 2, Column = 3, Operator = 4, Eq = 5, NotEq = 6, Gt = 7, Lt = 8, Starts = 9, Ends = 10, Contains = 11, Number = 12, String = 13, True = 14, False = 15, ColumnSetExpression = 16, In = 17, LBrack = 18, Values = 19, Comma = 20, RBrack = 21, AndExpression = 22, And = 23, OrExpression = 24, Or = 25, ParenthesizedExpression = 26, As = 27, FilterName = 28;
|
package/types/src/index.d.ts
DELETED