@react-querybuilder/core 8.14.0 → 8.14.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/dist/{basic-Dxm6jWFu.d.ts → basic-BXJVfD0P.d.ts} +68 -50
- package/dist/{basic-GFsWfi0Z.d.mts → basic-CNIjb6rI.d.mts} +68 -50
- package/dist/cjs/react-querybuilder_core.cjs.development.d.ts +178 -127
- package/dist/cjs/react-querybuilder_core.cjs.development.js +299 -251
- package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +178 -127
- package/dist/cjs/react-querybuilder_core.cjs.production.js +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.js.map +1 -1
- package/dist/{convertQuery-DAj92cbM.mjs → convertQuery-B5Qm_6ut.mjs} +30 -22
- package/dist/convertQuery-B5Qm_6ut.mjs.map +1 -0
- package/dist/convertQuery-DfZehtnd.js +94 -0
- package/dist/convertQuery-DfZehtnd.js.map +1 -0
- package/dist/{export-_wipiqJZ.d.mts → export-6x7MilFR.d.mts} +2 -3
- package/dist/{export-6VbkhCrf.d.ts → export-CpJOQuZv.d.ts} +2 -3
- package/dist/formatQuery.d.mts +4 -3
- package/dist/formatQuery.d.ts +4 -3
- package/dist/formatQuery.js +18 -50
- package/dist/formatQuery.js.map +1 -1
- package/dist/formatQuery.mjs +17 -49
- package/dist/formatQuery.mjs.map +1 -1
- package/dist/{import-D8M7awTx.d.ts → import-B5Iq8XmL.d.ts} +2 -3
- package/dist/{import-DRmutNSr.d.mts → import-Bltb2mT4.d.mts} +2 -3
- package/dist/{isRuleGroup-Cjk1Q2mj.js → isRuleGroup-BCwaLzDj.js} +38 -40
- package/dist/isRuleGroup-BCwaLzDj.js.map +1 -0
- package/dist/{isRuleGroup-DztIOOKa.mjs → isRuleGroup-LzP0HCKh.mjs} +2 -4
- package/dist/isRuleGroup-LzP0HCKh.mjs.map +1 -0
- package/dist/parseCEL.d.mts +2 -2
- package/dist/parseCEL.d.ts +2 -2
- package/dist/parseCEL.js +9 -11
- package/dist/parseCEL.js.map +1 -1
- package/dist/parseCEL.mjs +7 -10
- package/dist/parseCEL.mjs.map +1 -1
- package/dist/parseJSONata.d.mts +2 -3
- package/dist/parseJSONata.d.ts +2 -3
- package/dist/parseJSONata.js +37 -5611
- package/dist/parseJSONata.js.map +1 -1
- package/dist/parseJSONata.mjs +11 -13
- package/dist/parseJSONata.mjs.map +1 -1
- package/dist/parseJsonLogic.d.mts +3 -4
- package/dist/parseJsonLogic.d.ts +3 -4
- package/dist/parseJsonLogic.js +20 -21
- package/dist/parseJsonLogic.js.map +1 -1
- package/dist/parseJsonLogic.mjs +19 -21
- package/dist/parseJsonLogic.mjs.map +1 -1
- package/dist/parseMongoDB.d.mts +2 -3
- package/dist/parseMongoDB.d.ts +2 -3
- package/dist/parseMongoDB.js +7 -8
- package/dist/parseMongoDB.js.map +1 -1
- package/dist/parseMongoDB.mjs +6 -8
- package/dist/parseMongoDB.mjs.map +1 -1
- package/dist/parseSQL.d.mts +2 -3
- package/dist/parseSQL.d.ts +2 -3
- package/dist/parseSQL.js +9 -11
- package/dist/parseSQL.js.map +1 -1
- package/dist/parseSQL.mjs +7 -10
- package/dist/parseSQL.mjs.map +1 -1
- package/dist/parseSpEL.d.mts +2 -3
- package/dist/parseSpEL.d.ts +2 -3
- package/dist/parseSpEL.js +11 -2700
- package/dist/parseSpEL.js.map +1 -1
- package/dist/parseSpEL.mjs +7 -9
- package/dist/parseSpEL.mjs.map +1 -1
- package/dist/{prepareQueryObjects-BxWvIPI4.js → prepareQueryObjects-Dc8rqsYM.js} +49 -34
- package/dist/prepareQueryObjects-Dc8rqsYM.js.map +1 -0
- package/dist/{prepareQueryObjects-BBayjIn2.mjs → prepareQueryObjects-tMukQHT9.mjs} +34 -18
- package/dist/prepareQueryObjects-tMukQHT9.mjs.map +1 -0
- package/dist/react-querybuilder_core.d.mts +178 -127
- package/dist/react-querybuilder_core.legacy-esm.d.ts +178 -127
- package/dist/react-querybuilder_core.legacy-esm.js +296 -279
- package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
- package/dist/react-querybuilder_core.mjs +288 -247
- package/dist/react-querybuilder_core.mjs.map +1 -1
- package/dist/react-querybuilder_core.production.d.mts +178 -127
- package/dist/react-querybuilder_core.production.mjs +1 -1
- package/dist/react-querybuilder_core.production.mjs.map +1 -1
- package/dist/transformQuery.d.mts +1 -2
- package/dist/transformQuery.d.ts +1 -2
- package/dist/transformQuery.js +44 -2
- package/dist/transformQuery.js.map +1 -0
- package/dist/transformQuery.mjs +43 -2
- package/dist/transformQuery.mjs.map +1 -0
- package/dist/{utils-nQU7WCM9.mjs → utils-DQoYnxpa.mjs} +32 -84
- package/dist/utils-DQoYnxpa.mjs.map +1 -0
- package/dist/{utils-CR1ToTMW.js → utils-EsYRkPtf.js} +182 -246
- package/dist/utils-EsYRkPtf.js.map +1 -0
- package/package.json +25 -17
- package/dist/chunk-U64pC571.js +0 -41
- package/dist/convertQuery-DAj92cbM.mjs.map +0 -1
- package/dist/convertQuery-DRldbzhZ.js +0 -87
- package/dist/convertQuery-DRldbzhZ.js.map +0 -1
- package/dist/isRuleGroup-Cjk1Q2mj.js.map +0 -1
- package/dist/isRuleGroup-DztIOOKa.mjs.map +0 -1
- package/dist/prepareQueryObjects-BBayjIn2.mjs.map +0 -1
- package/dist/prepareQueryObjects-BxWvIPI4.js.map +0 -1
- package/dist/transformQuery-ClBRfnFg.js +0 -54
- package/dist/transformQuery-ClBRfnFg.js.map +0 -1
- package/dist/transformQuery-DUpbpqjX.mjs +0 -48
- package/dist/transformQuery-DUpbpqjX.mjs.map +0 -1
- package/dist/utils-CR1ToTMW.js.map +0 -1
- package/dist/utils-nQU7WCM9.mjs.map +0 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { o as ValueSources, t as FullField, x as OptionList } from "./basic-
|
|
1
|
+
import { o as ValueSources, t as FullField, x as OptionList } from "./basic-BXJVfD0P.js";
|
|
2
2
|
|
|
3
3
|
//#region src/types/import.d.ts
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
5
|
* Options common to all parsers.
|
|
7
6
|
*/
|
|
@@ -25,4 +24,4 @@ interface ParserCommonOptions {
|
|
|
25
24
|
}
|
|
26
25
|
//#endregion
|
|
27
26
|
export { ParserCommonOptions as t };
|
|
28
|
-
//# sourceMappingURL=import-
|
|
27
|
+
//# sourceMappingURL=import-B5Iq8XmL.d.ts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { o as ValueSources, t as FullField, x as OptionList } from "./basic-
|
|
1
|
+
import { o as ValueSources, t as FullField, x as OptionList } from "./basic-CNIjb6rI.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/types/import.d.ts
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
5
|
* Options common to all parsers.
|
|
7
6
|
*/
|
|
@@ -25,4 +24,4 @@ interface ParserCommonOptions {
|
|
|
25
24
|
}
|
|
26
25
|
//#endregion
|
|
27
26
|
export { ParserCommonOptions as t };
|
|
28
|
-
//# sourceMappingURL=import-
|
|
27
|
+
//# sourceMappingURL=import-Bltb2mT4.d.mts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
require("./parseJSONata.js");
|
|
2
2
|
let numeric_quantity = require("numeric-quantity");
|
|
3
|
-
|
|
4
3
|
//#region src/utils/misc.ts
|
|
5
4
|
/**
|
|
6
5
|
* Converts a value to lowercase if it's a string, otherwise returns the value as is.
|
|
@@ -20,7 +19,6 @@ const isPojo = (obj) => obj === null || typeof obj !== "object" ? false : Object
|
|
|
20
19
|
* Simple helper to determine whether a value is null, undefined, or an empty string.
|
|
21
20
|
*/
|
|
22
21
|
const nullOrUndefinedOrEmpty = (value) => value === null || value === void 0 || value === "";
|
|
23
|
-
|
|
24
22
|
//#endregion
|
|
25
23
|
//#region src/utils/isRuleGroup.ts
|
|
26
24
|
/**
|
|
@@ -35,48 +33,48 @@ const isRuleGroupType = (rg) => isRuleGroup(rg) && typeof rg.combinator === "str
|
|
|
35
33
|
* Determines if an object is a {@link RuleGroupTypeIC}.
|
|
36
34
|
*/
|
|
37
35
|
const isRuleGroupTypeIC = (rg) => isRuleGroup(rg) && rg.combinator === void 0;
|
|
38
|
-
|
|
39
36
|
//#endregion
|
|
40
|
-
Object.defineProperty(exports,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
37
|
+
Object.defineProperty(exports, "isPojo", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function() {
|
|
40
|
+
return isPojo;
|
|
41
|
+
}
|
|
45
42
|
});
|
|
46
|
-
Object.defineProperty(exports,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
43
|
+
Object.defineProperty(exports, "isRuleGroup", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function() {
|
|
46
|
+
return isRuleGroup;
|
|
47
|
+
}
|
|
51
48
|
});
|
|
52
|
-
Object.defineProperty(exports,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
49
|
+
Object.defineProperty(exports, "isRuleGroupType", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function() {
|
|
52
|
+
return isRuleGroupType;
|
|
53
|
+
}
|
|
57
54
|
});
|
|
58
|
-
Object.defineProperty(exports,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
55
|
+
Object.defineProperty(exports, "isRuleGroupTypeIC", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function() {
|
|
58
|
+
return isRuleGroupTypeIC;
|
|
59
|
+
}
|
|
63
60
|
});
|
|
64
|
-
Object.defineProperty(exports,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
Object.defineProperty(exports, "lc", {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
get: function() {
|
|
64
|
+
return lc;
|
|
65
|
+
}
|
|
69
66
|
});
|
|
70
|
-
Object.defineProperty(exports,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
67
|
+
Object.defineProperty(exports, "nullOrUndefinedOrEmpty", {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
get: function() {
|
|
70
|
+
return nullOrUndefinedOrEmpty;
|
|
71
|
+
}
|
|
75
72
|
});
|
|
76
|
-
Object.defineProperty(exports,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
73
|
+
Object.defineProperty(exports, "numericRegex", {
|
|
74
|
+
enumerable: true,
|
|
75
|
+
get: function() {
|
|
76
|
+
return numericRegex;
|
|
77
|
+
}
|
|
81
78
|
});
|
|
82
|
-
|
|
79
|
+
|
|
80
|
+
//# sourceMappingURL=isRuleGroup-BCwaLzDj.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isRuleGroup-BCwaLzDj.js","names":["numericQuantityRegex"],"sources":["../src/utils/misc.ts","../src/utils/isRuleGroup.ts"],"sourcesContent":["import { numericRegex as numericQuantityRegex } from 'numeric-quantity';\n\n/**\n * Converts a value to lowercase if it's a string, otherwise returns the value as is.\n */\n// istanbul ignore next\nexport const lc = <T>(v: T): T => (typeof v === 'string' ? (v.toLowerCase() as T) : v);\n\n/**\n * Regex matching numeric strings. Passes for positive/negative integers, decimals,\n * and E notation, with optional surrounding whitespace.\n */\nexport const numericRegex: RegExp = new RegExp(\n numericQuantityRegex.source.replace(/^\\^/, String.raw`^\\s*`).replace(/\\$$/, String.raw`\\s*$`)\n);\n\n/**\n * Determines if a variable is a plain old JavaScript object, aka POJO.\n */\n// oxlint-disable-next-line typescript/no-explicit-any\nexport const isPojo = (obj: any): obj is Record<string, any> =>\n obj === null || typeof obj !== 'object' ? false : Object.getPrototypeOf(obj) === Object.prototype;\n\n/**\n * Simple helper to determine whether a value is null, undefined, or an empty string.\n */\nexport const nullOrUndefinedOrEmpty = (value: unknown): value is null | undefined | '' =>\n value === null || value === undefined || value === '';\n","import type { RuleGroupType, RuleGroupTypeAny, RuleGroupTypeIC, RuleType } from '../types';\nimport { isPojo } from './misc';\n\n/**\n * Determines if an object is a {@link RuleType} (only checks for a `field` property).\n */\nexport const isRuleType = (s: unknown): s is RuleType =>\n isPojo(s) && 'field' in s && typeof s.field === 'string';\n\n/**\n * Determines if an object is a {@link RuleGroupType} or {@link RuleGroupTypeIC}.\n */\nexport const isRuleGroup = (rg: unknown): rg is RuleGroupTypeAny =>\n isPojo(rg) && Array.isArray(rg.rules);\n\n/**\n * Determines if an object is a {@link RuleGroupType}.\n */\nexport const isRuleGroupType = (rg: unknown): rg is RuleGroupType =>\n isRuleGroup(rg) && typeof rg.combinator === 'string';\n\n/**\n * Determines if an object is a {@link RuleGroupTypeIC}.\n */\nexport const isRuleGroupTypeIC = (rg: unknown): rg is RuleGroupTypeIC =>\n isRuleGroup(rg) && rg.combinator === undefined;\n"],"mappings":";;;;;;;AAMA,MAAa,MAAS,MAAa,OAAO,MAAM,WAAY,EAAE,aAAa,GAAS;;;;;AAMpF,MAAa,eAAuB,IAAI,OACtCA,iBAAAA,aAAqB,OAAO,QAAQ,OAAO,OAAO,GAAG,OAAO,CAAC,QAAQ,OAAO,OAAO,GAAG,OAAO,CAC9F;;;;AAMD,MAAa,UAAU,QACrB,QAAQ,QAAQ,OAAO,QAAQ,WAAW,QAAQ,OAAO,eAAe,IAAI,KAAK,OAAO;;;;AAK1F,MAAa,0BAA0B,UACrC,UAAU,QAAQ,UAAU,KAAA,KAAa,UAAU;;;;;;ACfrD,MAAa,eAAe,OAC1B,OAAO,GAAG,IAAI,MAAM,QAAQ,GAAG,MAAM;;;;AAKvC,MAAa,mBAAmB,OAC9B,YAAY,GAAG,IAAI,OAAO,GAAG,eAAe;;;;AAK9C,MAAa,qBAAqB,OAChC,YAAY,GAAG,IAAI,GAAG,eAAe,KAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { numericRegex } from "numeric-quantity";
|
|
2
|
-
|
|
3
2
|
//#region src/utils/misc.ts
|
|
4
3
|
/**
|
|
5
4
|
* Converts a value to lowercase if it's a string, otherwise returns the value as is.
|
|
@@ -19,7 +18,6 @@ const isPojo = (obj) => obj === null || typeof obj !== "object" ? false : Object
|
|
|
19
18
|
* Simple helper to determine whether a value is null, undefined, or an empty string.
|
|
20
19
|
*/
|
|
21
20
|
const nullOrUndefinedOrEmpty = (value) => value === null || value === void 0 || value === "";
|
|
22
|
-
|
|
23
21
|
//#endregion
|
|
24
22
|
//#region src/utils/isRuleGroup.ts
|
|
25
23
|
/**
|
|
@@ -34,7 +32,7 @@ const isRuleGroupType = (rg) => isRuleGroup(rg) && typeof rg.combinator === "str
|
|
|
34
32
|
* Determines if an object is a {@link RuleGroupTypeIC}.
|
|
35
33
|
*/
|
|
36
34
|
const isRuleGroupTypeIC = (rg) => isRuleGroup(rg) && rg.combinator === void 0;
|
|
37
|
-
|
|
38
35
|
//#endregion
|
|
39
36
|
export { lc as a, isPojo as i, isRuleGroupType as n, nullOrUndefinedOrEmpty as o, isRuleGroupTypeIC as r, numericRegex$1 as s, isRuleGroup as t };
|
|
40
|
-
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=isRuleGroup-LzP0HCKh.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isRuleGroup-LzP0HCKh.mjs","names":["numericRegex","numericQuantityRegex"],"sources":["../src/utils/misc.ts","../src/utils/isRuleGroup.ts"],"sourcesContent":["import { numericRegex as numericQuantityRegex } from 'numeric-quantity';\n\n/**\n * Converts a value to lowercase if it's a string, otherwise returns the value as is.\n */\n// istanbul ignore next\nexport const lc = <T>(v: T): T => (typeof v === 'string' ? (v.toLowerCase() as T) : v);\n\n/**\n * Regex matching numeric strings. Passes for positive/negative integers, decimals,\n * and E notation, with optional surrounding whitespace.\n */\nexport const numericRegex: RegExp = new RegExp(\n numericQuantityRegex.source.replace(/^\\^/, String.raw`^\\s*`).replace(/\\$$/, String.raw`\\s*$`)\n);\n\n/**\n * Determines if a variable is a plain old JavaScript object, aka POJO.\n */\n// oxlint-disable-next-line typescript/no-explicit-any\nexport const isPojo = (obj: any): obj is Record<string, any> =>\n obj === null || typeof obj !== 'object' ? false : Object.getPrototypeOf(obj) === Object.prototype;\n\n/**\n * Simple helper to determine whether a value is null, undefined, or an empty string.\n */\nexport const nullOrUndefinedOrEmpty = (value: unknown): value is null | undefined | '' =>\n value === null || value === undefined || value === '';\n","import type { RuleGroupType, RuleGroupTypeAny, RuleGroupTypeIC, RuleType } from '../types';\nimport { isPojo } from './misc';\n\n/**\n * Determines if an object is a {@link RuleType} (only checks for a `field` property).\n */\nexport const isRuleType = (s: unknown): s is RuleType =>\n isPojo(s) && 'field' in s && typeof s.field === 'string';\n\n/**\n * Determines if an object is a {@link RuleGroupType} or {@link RuleGroupTypeIC}.\n */\nexport const isRuleGroup = (rg: unknown): rg is RuleGroupTypeAny =>\n isPojo(rg) && Array.isArray(rg.rules);\n\n/**\n * Determines if an object is a {@link RuleGroupType}.\n */\nexport const isRuleGroupType = (rg: unknown): rg is RuleGroupType =>\n isRuleGroup(rg) && typeof rg.combinator === 'string';\n\n/**\n * Determines if an object is a {@link RuleGroupTypeIC}.\n */\nexport const isRuleGroupTypeIC = (rg: unknown): rg is RuleGroupTypeIC =>\n isRuleGroup(rg) && rg.combinator === undefined;\n"],"mappings":";;;;;;AAMA,MAAa,MAAS,MAAa,OAAO,MAAM,WAAY,EAAE,aAAa,GAAS;;;;;AAMpF,MAAaA,iBAAuB,IAAI,OACtCC,aAAqB,OAAO,QAAQ,OAAO,OAAO,GAAG,OAAO,CAAC,QAAQ,OAAO,OAAO,GAAG,OAAO,CAC9F;;;;AAMD,MAAa,UAAU,QACrB,QAAQ,QAAQ,OAAO,QAAQ,WAAW,QAAQ,OAAO,eAAe,IAAI,KAAK,OAAO;;;;AAK1F,MAAa,0BAA0B,UACrC,UAAU,QAAQ,UAAU,KAAA,KAAa,UAAU;;;;;;ACfrD,MAAa,eAAe,OAC1B,OAAO,GAAG,IAAI,MAAM,QAAQ,GAAG,MAAM;;;;AAKvC,MAAa,mBAAmB,OAC9B,YAAY,GAAG,IAAI,OAAO,GAAG,eAAe;;;;AAK9C,MAAa,qBAAqB,OAChC,YAAY,GAAG,IAAI,GAAG,eAAe,KAAA"}
|
package/dist/parseCEL.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as Except, _ as RuleGroupType, d as DefaultRuleGroupTypeIC, g as DefaultRuleGroupType, h as DefaultOperatorName, m as DefaultCombinatorName, p as RuleGroupTypeIC, v as RuleType } from "./basic-
|
|
2
|
-
import { t as ParserCommonOptions } from "./import-
|
|
1
|
+
import { C as Except, _ as RuleGroupType, d as DefaultRuleGroupTypeIC, g as DefaultRuleGroupType, h as DefaultOperatorName, m as DefaultCombinatorName, p as RuleGroupTypeIC, v as RuleType } from "./basic-CNIjb6rI.mjs";
|
|
2
|
+
import { t as ParserCommonOptions } from "./import-Bltb2mT4.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/utils/parseCEL/types.d.ts
|
|
5
5
|
type CELExpressionType = "Addition" | "BooleanLiteral" | "BytesLiteral" | "ConditionalAnd" | "ConditionalExpr" | "ConditionalOr" | "Division" | "DynamicPropertyAccessor" | "ExpressionGroup" | "ExpressionList" | "FieldInit" | "FieldInits" | "FieldsObject" | "FloatLiteral" | "FunctionCall" | "Identifier" | "IntegerLiteral" | "List" | "Map" | "MapInit" | "MapInits" | "Member" | "Modulo" | "Multiplication" | "Negation" | "Negative" | "NullLiteral" | "Property" | "Relation" | "StringLiteral" | "Subtraction" | "Unary" | "UnsignedIntegerLiteral" | "LikeExpression" | "SubqueryExpression";
|
package/dist/parseCEL.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as Except, _ as RuleGroupType, d as DefaultRuleGroupTypeIC, g as DefaultRuleGroupType, h as DefaultOperatorName, m as DefaultCombinatorName, p as RuleGroupTypeIC, v as RuleType } from "./basic-
|
|
2
|
-
import { t as ParserCommonOptions } from "./import-
|
|
1
|
+
import { C as Except, _ as RuleGroupType, d as DefaultRuleGroupTypeIC, g as DefaultRuleGroupType, h as DefaultOperatorName, m as DefaultCombinatorName, p as RuleGroupTypeIC, v as RuleType } from "./basic-BXJVfD0P.js";
|
|
2
|
+
import { t as ParserCommonOptions } from "./import-B5Iq8XmL.js";
|
|
3
3
|
|
|
4
4
|
//#region src/utils/parseCEL/types.d.ts
|
|
5
5
|
type CELExpressionType = "Addition" | "BooleanLiteral" | "BytesLiteral" | "ConditionalAnd" | "ConditionalExpr" | "ConditionalOr" | "Division" | "DynamicPropertyAccessor" | "ExpressionGroup" | "ExpressionList" | "FieldInit" | "FieldInits" | "FieldsObject" | "FloatLiteral" | "FunctionCall" | "Identifier" | "IntegerLiteral" | "List" | "Map" | "MapInit" | "MapInits" | "Member" | "Modulo" | "Multiplication" | "Negation" | "Negative" | "NullLiteral" | "Property" | "Relation" | "StringLiteral" | "Subtraction" | "Unary" | "UnsignedIntegerLiteral" | "LikeExpression" | "SubqueryExpression";
|
package/dist/parseCEL.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
const require_utils = require(
|
|
3
|
-
const require_isRuleGroup = require(
|
|
4
|
-
const require_prepareQueryObjects = require(
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_utils = require("./utils-EsYRkPtf.js");
|
|
3
|
+
const require_isRuleGroup = require("./isRuleGroup-BCwaLzDj.js");
|
|
4
|
+
const require_prepareQueryObjects = require("./prepareQueryObjects-Dc8rqsYM.js");
|
|
5
|
+
require("./parseJSONata.js");
|
|
5
6
|
let _ts_jison_parser = require("@ts-jison/parser");
|
|
6
7
|
let _ts_jison_lexer = require("@ts-jison/lexer");
|
|
7
|
-
|
|
8
8
|
//#region src/utils/parseCEL/celParser.ts
|
|
9
9
|
/**
|
|
10
10
|
* parser generated by @ts-jison/parser-generator 0.4.1-alpha.2
|
|
@@ -2005,7 +2005,6 @@ var CELLexer = class extends _ts_jison_lexer.JisonLexer {
|
|
|
2005
2005
|
}
|
|
2006
2006
|
}
|
|
2007
2007
|
};
|
|
2008
|
-
|
|
2009
2008
|
//#endregion
|
|
2010
2009
|
//#region src/utils/parseCEL/utils.ts
|
|
2011
2010
|
const isCELExpressionGroup = (expr) => expr.type === "ExpressionGroup";
|
|
@@ -2249,7 +2248,6 @@ const transformAliasInExpression = (expr, alias) => {
|
|
|
2249
2248
|
if (!alias) return expr;
|
|
2250
2249
|
return transformAliasInExpressionInternal(expr, alias, isPrimitiveArrayUsage(expr, alias));
|
|
2251
2250
|
};
|
|
2252
|
-
|
|
2253
2251
|
//#endregion
|
|
2254
2252
|
//#region src/utils/parseCEL/parseCEL.ts
|
|
2255
2253
|
function parseCEL(cel, options = {}) {
|
|
@@ -2308,12 +2306,12 @@ function parseCEL(cel, options = {}) {
|
|
|
2308
2306
|
}
|
|
2309
2307
|
} else if (isCELConditionalAnd(expr) || isCELConditionalOr(expr)) {
|
|
2310
2308
|
if (ic) {
|
|
2311
|
-
const rules
|
|
2309
|
+
const rules = celGenerateFlatAndOrList(expr).map((v) => {
|
|
2312
2310
|
if (typeof v === "string") return v;
|
|
2313
2311
|
return processCELExpression(v);
|
|
2314
2312
|
});
|
|
2315
|
-
if (!rules
|
|
2316
|
-
return { rules
|
|
2313
|
+
if (!rules.every(Boolean)) return null;
|
|
2314
|
+
return { rules };
|
|
2317
2315
|
}
|
|
2318
2316
|
const andOrList = celGenerateMixedAndOrList(expr);
|
|
2319
2317
|
const combinator = andOrList[1];
|
|
@@ -2456,7 +2454,6 @@ function parseCEL(cel, options = {}) {
|
|
|
2456
2454
|
}
|
|
2457
2455
|
return prepare(emptyQuery);
|
|
2458
2456
|
}
|
|
2459
|
-
|
|
2460
2457
|
//#endregion
|
|
2461
2458
|
exports.celGenerateFlatAndOrList = celGenerateFlatAndOrList;
|
|
2462
2459
|
exports.celGenerateMixedAndOrList = celGenerateMixedAndOrList;
|
|
@@ -2509,4 +2506,5 @@ exports.isCELSubtraction = isCELSubtraction;
|
|
|
2509
2506
|
exports.isCELUnsignedIntegerLiteral = isCELUnsignedIntegerLiteral;
|
|
2510
2507
|
exports.parseCEL = parseCEL;
|
|
2511
2508
|
exports.transformAliasInExpression = transformAliasInExpression;
|
|
2509
|
+
|
|
2512
2510
|
//# sourceMappingURL=parseCEL.js.map
|