@react-querybuilder/core 8.21.1 → 8.22.0
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/README.md +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.development.d.ts +1426 -56
- package/dist/cjs/react-querybuilder_core.cjs.development.js +2241 -83
- package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +1426 -56
- 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/formatQuery.d.mts +17 -2
- package/dist/formatQuery.d.ts +17 -2
- package/dist/formatQuery.js +68 -45
- package/dist/formatQuery.js.map +1 -1
- package/dist/formatQuery.mjs +67 -46
- package/dist/formatQuery.mjs.map +1 -1
- package/dist/{import-Ddc3d_8q.d.ts → import-6ExjhifL.d.ts} +2 -2
- package/dist/{import-BVdxeIBO.d.mts → import-DVWI7Fdh.d.mts} +2 -2
- package/dist/{index-BSwFvkeI.d.mts → index-CX9mehdL.d.mts} +15 -1
- package/dist/{index-BSwFvkeI.d.ts → index-CX9mehdL.d.ts} +15 -1
- package/dist/parseCEL.d.mts +2 -2
- package/dist/parseCEL.d.ts +2 -2
- package/dist/parseCEL.js +6 -8
- package/dist/parseCEL.js.map +1 -1
- package/dist/parseCEL.mjs +6 -8
- package/dist/parseCEL.mjs.map +1 -1
- package/dist/parseCypher.d.mts +1 -1
- package/dist/parseCypher.d.ts +1 -1
- package/dist/parseCypher.js.map +1 -1
- package/dist/parseGremlin.d.mts +1 -1
- package/dist/parseGremlin.d.ts +1 -1
- package/dist/parseJSONata.d.mts +2 -2
- package/dist/parseJSONata.d.ts +2 -2
- package/dist/parseJSONata.js +2 -2
- package/dist/parseJSONata.js.map +1 -1
- package/dist/parseJSONata.mjs +1 -1
- package/dist/parseJsonLogic.d.mts +2 -2
- package/dist/parseJsonLogic.d.ts +2 -2
- package/dist/parseJsonLogic.js +3 -3
- package/dist/parseJsonLogic.js.map +1 -1
- package/dist/parseJsonLogic.mjs +3 -3
- package/dist/parseJsonLogic.mjs.map +1 -1
- package/dist/parseMongoDB.d.mts +2 -2
- package/dist/parseMongoDB.d.ts +2 -2
- package/dist/parseMongoDB.js +2 -2
- package/dist/parseMongoDB.mjs +2 -2
- package/dist/parseSPARQL.d.mts +1 -1
- package/dist/parseSPARQL.d.ts +1 -1
- package/dist/parseSPARQL.js +0 -1
- package/dist/parseSPARQL.js.map +1 -1
- package/dist/parseSPARQL.mjs +0 -1
- package/dist/parseSPARQL.mjs.map +1 -1
- package/dist/parseSQL.d.mts +2 -2
- package/dist/parseSQL.d.ts +2 -2
- package/dist/parseSQL.js +54 -62
- package/dist/parseSQL.js.map +1 -1
- package/dist/parseSQL.mjs +54 -62
- package/dist/parseSQL.mjs.map +1 -1
- package/dist/parseSpEL.d.mts +2 -2
- package/dist/parseSpEL.d.ts +2 -2
- package/dist/parseSpEL.js +3 -3
- package/dist/parseSpEL.js.map +1 -1
- package/dist/parseSpEL.mjs +3 -3
- package/dist/parseSpEL.mjs.map +1 -1
- package/dist/{prepareQueryObjects-C2-kTZvR.js → prepareQueryObjects-BnGL91Tt.js} +9 -5
- package/dist/{prepareQueryObjects-C2-kTZvR.js.map → prepareQueryObjects-BnGL91Tt.js.map} +1 -1
- package/dist/{prepareQueryObjects-Q18lHCKl.mjs → prepareQueryObjects-ChINDIap.mjs} +9 -5
- package/dist/{prepareQueryObjects-Q18lHCKl.mjs.map → prepareQueryObjects-ChINDIap.mjs.map} +1 -1
- package/dist/query-builder-layout.css +1 -1
- package/dist/query-builder-layout.css.map +1 -1
- package/dist/query-builder.css +1 -1
- package/dist/query-builder.css.map +1 -1
- package/dist/react-querybuilder_core.d.mts +1426 -56
- package/dist/react-querybuilder_core.legacy-esm.d.ts +1426 -56
- package/dist/react-querybuilder_core.legacy-esm.js +2279 -92
- package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
- package/dist/react-querybuilder_core.mjs +2198 -85
- package/dist/react-querybuilder_core.mjs.map +1 -1
- package/dist/react-querybuilder_core.production.d.mts +1426 -56
- package/dist/react-querybuilder_core.production.mjs +1 -1
- package/dist/react-querybuilder_core.production.mjs.map +1 -1
- package/dist/styles/_layout.scss +5 -2
- package/dist/transformQuery.d.mts +1 -1
- package/dist/transformQuery.d.ts +1 -1
- package/dist/{utils-Dt0D_DMV.mjs → utils-4k-j5FBa.mjs} +20 -3
- package/dist/utils-4k-j5FBa.mjs.map +1 -0
- package/dist/{utils-DEwV7F6B.js → utils-C79dxwZb.js} +31 -2
- package/dist/utils-C79dxwZb.js.map +1 -0
- package/package.json +9 -8
- package/dist/utils-DEwV7F6B.js.map +0 -1
- package/dist/utils-Dt0D_DMV.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as FullField, F as OptionList, w as ValueSources } from "./index-
|
|
1
|
+
import { C as FullField, F as OptionList, w as ValueSources } from "./index-CX9mehdL.js";
|
|
2
2
|
//#region src/types/import.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Options common to all parsers.
|
|
@@ -23,4 +23,4 @@ interface ParserCommonOptions {
|
|
|
23
23
|
}
|
|
24
24
|
//#endregion
|
|
25
25
|
export { ParserCommonOptions as t };
|
|
26
|
-
//# sourceMappingURL=import-
|
|
26
|
+
//# sourceMappingURL=import-6ExjhifL.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as FullField, F as OptionList, w as ValueSources } from "./index-
|
|
1
|
+
import { C as FullField, F as OptionList, w as ValueSources } from "./index-CX9mehdL.mjs";
|
|
2
2
|
//#region src/types/import.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Options common to all parsers.
|
|
@@ -23,4 +23,4 @@ interface ParserCommonOptions {
|
|
|
23
23
|
}
|
|
24
24
|
//#endregion
|
|
25
25
|
export { ParserCommonOptions as t };
|
|
26
|
-
//# sourceMappingURL=import-
|
|
26
|
+
//# sourceMappingURL=import-DVWI7Fdh.d.mts.map
|
|
@@ -1628,6 +1628,14 @@ interface ValueProcessorOptions extends FormatQueryOptions {
|
|
|
1628
1628
|
* @default false
|
|
1629
1629
|
*/
|
|
1630
1630
|
parseNumbers?: boolean;
|
|
1631
|
+
/**
|
|
1632
|
+
* Nesting level of the subquery currently being processed. Incremented each time a rule
|
|
1633
|
+
* processor recurses into a rule group stored in a rule's `value` (see `match` modes).
|
|
1634
|
+
* Used to generate collision-free element aliases.
|
|
1635
|
+
*
|
|
1636
|
+
* @default 0
|
|
1637
|
+
*/
|
|
1638
|
+
subqueryDepth?: number;
|
|
1631
1639
|
}
|
|
1632
1640
|
/**
|
|
1633
1641
|
* Options object curated by {@link formatQuery} and passed to a {@link RuleGroupProcessor}.
|
|
@@ -1645,6 +1653,12 @@ interface FormatQueryFinalOptions extends Required<Except<FormatQueryOptions, "c
|
|
|
1645
1653
|
validateRule: FormatQueryValidateRule;
|
|
1646
1654
|
validationMap: ValidationMap;
|
|
1647
1655
|
context?: Record<string, unknown>;
|
|
1656
|
+
/**
|
|
1657
|
+
* @see {@link ValueProcessorOptions.subqueryDepth}
|
|
1658
|
+
*
|
|
1659
|
+
* @default 0
|
|
1660
|
+
*/
|
|
1661
|
+
subqueryDepth?: number;
|
|
1648
1662
|
}
|
|
1649
1663
|
/**
|
|
1650
1664
|
* Function that produces a processed value for a given {@link RuleType}.
|
|
@@ -1973,4 +1987,4 @@ type NLTranslationKey = "and" | "or" | "true" | "false" | "ruleSeparator" | "bet
|
|
|
1973
1987
|
type NLTranslations = Partial<Record<NLTranslationKey, string>>;
|
|
1974
1988
|
//#endregion
|
|
1975
1989
|
export { DefaultOperatorName as A, FullField as C, RuleGroupTypeIC as D, RuleGroupTypeAny as E, OptionList as F, SetRequired as I, Except as L, RuleGroupType as M, RuleType as N, DefaultCombinatorName as O, ExpressionNode as P, Merge as R, ValueProcessorOptions as S, DefaultRuleGroupTypeIC as T, RuleGroupProcessor as _, DiagnosticsResult as a, ValueProcessorByRule as b, ExportOperatorMap as c, NLTranslationKey as d, NLTranslations as f, RQBJsonLogicVar as g, RQBJsonLogic as h, ConstituentWordOrder as i, DefaultRuleGroupType as j, DefaultCombinatorNameExtended as k, FormatQueryOptions as l, ParameterizedSQL as m, JsonLogicLessThanOrEqual as n, ExportFormat as o, ParameterizedNamedSQL as p, JsonLogicRulesLogic as r, ExportObjectFormats as s, JsonLogicLessThan as t, GroupVariantCondition as u, RuleProcessor as v, ValueSources as w, ValueProcessorLegacy as x, SQLPreset as y };
|
|
1976
|
-
//# sourceMappingURL=index-
|
|
1990
|
+
//# sourceMappingURL=index-CX9mehdL.d.mts.map
|
|
@@ -1628,6 +1628,14 @@ interface ValueProcessorOptions extends FormatQueryOptions {
|
|
|
1628
1628
|
* @default false
|
|
1629
1629
|
*/
|
|
1630
1630
|
parseNumbers?: boolean;
|
|
1631
|
+
/**
|
|
1632
|
+
* Nesting level of the subquery currently being processed. Incremented each time a rule
|
|
1633
|
+
* processor recurses into a rule group stored in a rule's `value` (see `match` modes).
|
|
1634
|
+
* Used to generate collision-free element aliases.
|
|
1635
|
+
*
|
|
1636
|
+
* @default 0
|
|
1637
|
+
*/
|
|
1638
|
+
subqueryDepth?: number;
|
|
1631
1639
|
}
|
|
1632
1640
|
/**
|
|
1633
1641
|
* Options object curated by {@link formatQuery} and passed to a {@link RuleGroupProcessor}.
|
|
@@ -1645,6 +1653,12 @@ interface FormatQueryFinalOptions extends Required<Except<FormatQueryOptions, "c
|
|
|
1645
1653
|
validateRule: FormatQueryValidateRule;
|
|
1646
1654
|
validationMap: ValidationMap;
|
|
1647
1655
|
context?: Record<string, unknown>;
|
|
1656
|
+
/**
|
|
1657
|
+
* @see {@link ValueProcessorOptions.subqueryDepth}
|
|
1658
|
+
*
|
|
1659
|
+
* @default 0
|
|
1660
|
+
*/
|
|
1661
|
+
subqueryDepth?: number;
|
|
1648
1662
|
}
|
|
1649
1663
|
/**
|
|
1650
1664
|
* Function that produces a processed value for a given {@link RuleType}.
|
|
@@ -1973,4 +1987,4 @@ type NLTranslationKey = "and" | "or" | "true" | "false" | "ruleSeparator" | "bet
|
|
|
1973
1987
|
type NLTranslations = Partial<Record<NLTranslationKey, string>>;
|
|
1974
1988
|
//#endregion
|
|
1975
1989
|
export { DefaultOperatorName as A, FullField as C, RuleGroupTypeIC as D, RuleGroupTypeAny as E, OptionList as F, SetRequired as I, Except as L, RuleGroupType as M, RuleType as N, DefaultCombinatorName as O, ExpressionNode as P, Merge as R, ValueProcessorOptions as S, DefaultRuleGroupTypeIC as T, RuleGroupProcessor as _, DiagnosticsResult as a, ValueProcessorByRule as b, ExportOperatorMap as c, NLTranslationKey as d, NLTranslations as f, RQBJsonLogicVar as g, RQBJsonLogic as h, ConstituentWordOrder as i, DefaultRuleGroupType as j, DefaultCombinatorNameExtended as k, FormatQueryOptions as l, ParameterizedSQL as m, JsonLogicLessThanOrEqual as n, ExportFormat as o, ParameterizedNamedSQL as p, JsonLogicRulesLogic as r, ExportObjectFormats as s, JsonLogicLessThan as t, GroupVariantCondition as u, RuleProcessor as v, ValueSources as w, ValueProcessorLegacy as x, SQLPreset as y };
|
|
1976
|
-
//# sourceMappingURL=index-
|
|
1990
|
+
//# sourceMappingURL=index-CX9mehdL.d.ts.map
|
package/dist/parseCEL.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as DefaultOperatorName, D as RuleGroupTypeIC, L as Except, M as RuleGroupType, N as RuleType, O as DefaultCombinatorName, P as ExpressionNode, T as DefaultRuleGroupTypeIC, j as DefaultRuleGroupType } from "./index-
|
|
2
|
-
import { t as ParserCommonOptions } from "./import-
|
|
1
|
+
import { A as DefaultOperatorName, D as RuleGroupTypeIC, L as Except, M as RuleGroupType, N as RuleType, O as DefaultCombinatorName, P as ExpressionNode, T as DefaultRuleGroupTypeIC, j as DefaultRuleGroupType } from "./index-CX9mehdL.mjs";
|
|
2
|
+
import { t as ParserCommonOptions } from "./import-DVWI7Fdh.mjs";
|
|
3
3
|
//#region src/utils/parseCEL/types.d.ts
|
|
4
4
|
type CELExpressionType = "Addition" | "BooleanLiteral" | "BytesLiteral" | "ConditionalAnd" | "ConditionalExpr" | "ConditionalOr" | "Division" | "DynamicPropertyAccessor" | "ExpressionGroup" | "ExpressionList" | "FieldInit" | "FieldInits" | "MessageInit" | "FloatLiteral" | "FunctionCall" | "Identifier" | "IntegerLiteral" | "List" | "Map" | "MapInit" | "MapInits" | "Member" | "Modulo" | "Multiplication" | "Negation" | "Negative" | "NullLiteral" | "Property" | "Relation" | "StringLiteral" | "Subtraction" | "Unary" | "UnsignedIntegerLiteral" | "LikeExpression" | "SubqueryExpression";
|
|
5
5
|
type CELRelop = "==" | ">=" | ">" | "<=" | "<" | "!=" | "in";
|
package/dist/parseCEL.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as DefaultOperatorName, D as RuleGroupTypeIC, L as Except, M as RuleGroupType, N as RuleType, O as DefaultCombinatorName, P as ExpressionNode, T as DefaultRuleGroupTypeIC, j as DefaultRuleGroupType } from "./index-
|
|
2
|
-
import { t as ParserCommonOptions } from "./import-
|
|
1
|
+
import { A as DefaultOperatorName, D as RuleGroupTypeIC, L as Except, M as RuleGroupType, N as RuleType, O as DefaultCombinatorName, P as ExpressionNode, T as DefaultRuleGroupTypeIC, j as DefaultRuleGroupType } from "./index-CX9mehdL.js";
|
|
2
|
+
import { t as ParserCommonOptions } from "./import-6ExjhifL.js";
|
|
3
3
|
//#region src/utils/parseCEL/types.d.ts
|
|
4
4
|
type CELExpressionType = "Addition" | "BooleanLiteral" | "BytesLiteral" | "ConditionalAnd" | "ConditionalExpr" | "ConditionalOr" | "Division" | "DynamicPropertyAccessor" | "ExpressionGroup" | "ExpressionList" | "FieldInit" | "FieldInits" | "MessageInit" | "FloatLiteral" | "FunctionCall" | "Identifier" | "IntegerLiteral" | "List" | "Map" | "MapInit" | "MapInits" | "Member" | "Modulo" | "Multiplication" | "Negation" | "Negative" | "NullLiteral" | "Property" | "Relation" | "StringLiteral" | "Subtraction" | "Unary" | "UnsignedIntegerLiteral" | "LikeExpression" | "SubqueryExpression";
|
|
5
5
|
type CELRelop = "==" | ">=" | ">" | "<=" | "<" | "!=" | "in";
|
package/dist/parseCEL.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_utils = require("./utils-
|
|
2
|
+
const require_utils = require("./utils-C79dxwZb.js");
|
|
3
3
|
const require_isRuleGroup = require("./isRuleGroup-0JNiQgLg.js");
|
|
4
|
-
const require_prepareQueryObjects = require("./prepareQueryObjects-
|
|
4
|
+
const require_prepareQueryObjects = require("./prepareQueryObjects-BnGL91Tt.js");
|
|
5
5
|
let _ts_jison_parser = require("@ts-jison/parser");
|
|
6
6
|
let _ts_jison_lexer = require("@ts-jison/lexer");
|
|
7
7
|
//#region src/utils/parseCEL/celParser.ts
|
|
@@ -1804,7 +1804,6 @@ var CELParser = class extends _ts_jison_parser.JisonParser {
|
|
|
1804
1804
|
left: $$[$0 - 2],
|
|
1805
1805
|
right: $$[$0]
|
|
1806
1806
|
});
|
|
1807
|
-
break;
|
|
1808
1807
|
}
|
|
1809
1808
|
}
|
|
1810
1809
|
};
|
|
@@ -1998,9 +1997,7 @@ var CELLexer = class extends _ts_jison_lexer.JisonLexer {
|
|
|
1998
1997
|
case 54: return 14;
|
|
1999
1998
|
case 55: return 5;
|
|
2000
1999
|
case 56: return "INVALID";
|
|
2001
|
-
case 57:
|
|
2002
|
-
console.log(yy_.yytext);
|
|
2003
|
-
break;
|
|
2000
|
+
case 57: console.log(yy_.yytext);
|
|
2004
2001
|
}
|
|
2005
2002
|
}
|
|
2006
2003
|
};
|
|
@@ -2072,7 +2069,7 @@ const extractSubqueryComponents = (expr) => {
|
|
|
2072
2069
|
return {
|
|
2073
2070
|
field,
|
|
2074
2071
|
method,
|
|
2075
|
-
alias: isCELIdentifier(aliasExpr) ? aliasExpr.value :
|
|
2072
|
+
alias: isCELIdentifier(aliasExpr) ? aliasExpr.value : /* v8 ignore next -- @preserve */ null,
|
|
2076
2073
|
condition: conditionExpr
|
|
2077
2074
|
};
|
|
2078
2075
|
};
|
|
@@ -2384,7 +2381,8 @@ function parseCEL(cel, options = {}) {
|
|
|
2384
2381
|
const field = getCELIdentifierFromNegatedChain(expr.left).replace(/^!+/, "");
|
|
2385
2382
|
const method = expr.right.value;
|
|
2386
2383
|
const [aliasExpr, conditionExpr] = expr.list.value;
|
|
2387
|
-
const
|
|
2384
|
+
const alias = isCELIdentifier(aliasExpr) ? aliasExpr.value : /* v8 ignore next -- @preserve */ null;
|
|
2385
|
+
const transformedCondition = transformAliasInExpression(conditionExpr, alias);
|
|
2388
2386
|
const subqueryValue = processCELExpression(transformedCondition);
|
|
2389
2387
|
// v8 ignore else
|
|
2390
2388
|
if (subqueryValue && fieldIsValid(field, "=")) {
|