@react-querybuilder/core 8.22.5 → 8.23.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/derivations/package.json +4 -0
- package/dist/cjs/react-querybuilder_core.cjs.development.d.ts +2078 -1665
- package/dist/cjs/react-querybuilder_core.cjs.development.js +1293 -422
- package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +2078 -1665
- 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-Cw76XFIn.js → convertQuery-BLT0GIhM.js} +17 -8
- package/dist/{convertQuery-Cw76XFIn.js.map → convertQuery-BLT0GIhM.js.map} +1 -1
- package/dist/{convertQuery-D_4J7E-Z.mjs → convertQuery-DaXv3h7S.mjs} +6 -3
- package/dist/{convertQuery-D_4J7E-Z.mjs.map → convertQuery-DaXv3h7S.mjs.map} +1 -1
- package/dist/derivations.d.mts +2902 -0
- package/dist/derivations.d.ts +2902 -0
- package/dist/derivations.js +2845 -0
- package/dist/derivations.js.map +1 -0
- package/dist/derivations.mjs +2678 -0
- package/dist/derivations.mjs.map +1 -0
- package/dist/formatQuery.d.mts +2 -895
- package/dist/formatQuery.d.ts +2 -895
- package/dist/formatQuery.js +120 -140
- package/dist/formatQuery.js.map +1 -1
- package/dist/formatQuery.mjs +8 -28
- package/dist/formatQuery.mjs.map +1 -1
- package/dist/{import-DVWI7Fdh.d.mts → import-BdKPtLzo.d.mts} +2 -2
- package/dist/{import-6ExjhifL.d.ts → import-BfZTwhp2.d.ts} +2 -2
- package/dist/{index-CX9mehdL.d.mts → index-DOIE2pwx.d.mts} +274 -3
- package/dist/{index-CX9mehdL.d.ts → index-DOIE2pwx.d.ts} +274 -3
- package/dist/index-OF2Q1gTp.d.mts +895 -0
- package/dist/index-XueTy_XQ.d.ts +895 -0
- package/dist/isRuleOrGroupValid-CIMZNkt4.mjs +27 -0
- package/dist/isRuleOrGroupValid-CIMZNkt4.mjs.map +1 -0
- package/dist/isRuleOrGroupValid-CtUf4_4x.js +38 -0
- package/dist/isRuleOrGroupValid-CtUf4_4x.js.map +1 -0
- package/dist/{isRuleGroup-CqLThsbu.mjs → objectUtils-DDZ-KhV5.mjs} +25 -2
- package/dist/objectUtils-DDZ-KhV5.mjs.map +1 -0
- package/dist/{isRuleGroup-0JNiQgLg.js → objectUtils-DfnEmDSV.js} +48 -1
- package/dist/objectUtils-DfnEmDSV.js.map +1 -0
- package/dist/parseCEL.d.mts +2 -2
- package/dist/parseCEL.d.ts +2 -2
- package/dist/parseCEL.js +19 -16
- package/dist/parseCEL.js.map +1 -1
- package/dist/parseCEL.mjs +12 -9
- package/dist/parseCEL.mjs.map +1 -1
- package/dist/parseCypher.d.mts +1 -1
- package/dist/parseCypher.d.ts +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 +17 -14
- package/dist/parseJSONata.js.map +1 -1
- package/dist/parseJSONata.mjs +11 -8
- package/dist/parseJSONata.mjs.map +1 -1
- package/dist/parseJsonLogic.d.mts +2 -2
- package/dist/parseJsonLogic.d.ts +2 -2
- package/dist/parseJsonLogic.js +38 -38
- package/dist/parseJsonLogic.js.map +1 -1
- package/dist/parseJsonLogic.mjs +5 -5
- package/dist/parseMongoDB.d.mts +2 -2
- package/dist/parseMongoDB.d.ts +2 -2
- package/dist/parseMongoDB.js +50 -47
- package/dist/parseMongoDB.js.map +1 -1
- package/dist/parseMongoDB.mjs +35 -32
- package/dist/parseMongoDB.mjs.map +1 -1
- package/dist/parseSPARQL.d.mts +1 -1
- package/dist/parseSPARQL.d.ts +1 -1
- package/dist/parseSQL.d.mts +2 -2
- package/dist/parseSQL.d.ts +2 -2
- package/dist/parseSQL.js +27 -23
- package/dist/parseSQL.js.map +1 -1
- package/dist/parseSQL.mjs +21 -17
- 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 +17 -14
- package/dist/parseSpEL.js.map +1 -1
- package/dist/parseSpEL.mjs +13 -10
- package/dist/parseSpEL.mjs.map +1 -1
- package/dist/parserUtils-BKPstAaO.mjs +30 -0
- package/dist/parserUtils-BKPstAaO.mjs.map +1 -0
- package/dist/parserUtils-DbBXyAht.js +41 -0
- package/dist/parserUtils-DbBXyAht.js.map +1 -0
- package/dist/{prepareQueryObjects-BnGL91Tt.js → prepareQueryObjects-Dj9cTl9D.js} +90 -63
- package/dist/prepareQueryObjects-Dj9cTl9D.js.map +1 -0
- package/dist/{prepareQueryObjects-ChINDIap.mjs → prepareQueryObjects-Dmyf3Wi_.mjs} +56 -59
- package/dist/prepareQueryObjects-Dmyf3Wi_.mjs.map +1 -0
- package/dist/react-querybuilder_core.d.mts +2078 -1665
- package/dist/react-querybuilder_core.legacy-esm.d.ts +2078 -1665
- package/dist/react-querybuilder_core.legacy-esm.js +1445 -635
- package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
- package/dist/react-querybuilder_core.mjs +1288 -424
- package/dist/react-querybuilder_core.mjs.map +1 -1
- package/dist/react-querybuilder_core.production.d.mts +2078 -1665
- package/dist/react-querybuilder_core.production.mjs +1 -1
- package/dist/react-querybuilder_core.production.mjs.map +1 -1
- package/dist/transformQuery-B7d9AWUf.d.mts +116 -0
- package/dist/transformQuery-BXDiUBGB.d.ts +116 -0
- package/dist/transformQuery.d.mts +2 -116
- package/dist/transformQuery.d.ts +2 -116
- package/dist/transformQuery.js +3 -4
- package/dist/transformQuery.js.map +1 -1
- package/dist/transformQuery.mjs +1 -2
- package/dist/transformQuery.mjs.map +1 -1
- package/dist/utils-CP5Jqy1P.mjs +1294 -0
- package/dist/utils-CP5Jqy1P.mjs.map +1 -0
- package/dist/utils-e-7KHkjV.js +1779 -0
- package/dist/utils-e-7KHkjV.js.map +1 -0
- package/package.json +33 -22
- package/dist/isRuleGroup-0JNiQgLg.js.map +0 -1
- package/dist/isRuleGroup-CqLThsbu.mjs.map +0 -1
- package/dist/objectUtils-Cr02aGxb.js +0 -27
- package/dist/objectUtils-Cr02aGxb.js.map +0 -1
- package/dist/objectUtils-DBlmJgBf.mjs +0 -16
- package/dist/objectUtils-DBlmJgBf.mjs.map +0 -1
- package/dist/prepareQueryObjects-BnGL91Tt.js.map +0 -1
- package/dist/prepareQueryObjects-ChINDIap.mjs.map +0 -1
- package/dist/utils-4k-j5FBa.mjs +0 -537
- package/dist/utils-4k-j5FBa.mjs.map +0 -1
- package/dist/utils-C79dxwZb.js +0 -752
- package/dist/utils-C79dxwZb.js.map +0 -1
package/dist/formatQuery.mjs
CHANGED
|
@@ -1,30 +1,8 @@
|
|
|
1
|
-
import { C as withParamPrefix, E as
|
|
2
|
-
import { a as
|
|
1
|
+
import { C as withParamPrefix, E as parseNumber, F as toFlatOptionArray, K as toArray, L as toFullOptionList, O as getOption, S as subqueryElementAliasBase, T as getParseNumberMethod, _ as numerifyValues, a as getLikeWildcards, b as shouldRenderAsNumber, c as getQuotedFieldName, d as isValidValue, f as isValueProcessorLegacy, g as normalizeConstituentWordOrder, h as mongoOperators, i as defaultNLTranslations, l as getSQLConcat, m as mapSQLOperator, n as bigIntJsonStringifyReplacer, o as getNLTranslataion, p as jsonLogicAdditionalOperators, q as trimIfString, r as celCombinatorMap, s as getQuoteFieldNamesWithArray, t as bigIntJsonParseReviver, u as getSubqueryElementAlias, v as prismaOperators, w as wrapLikeFragment, x as stripParamPrefix, y as processMatchMode } from "./utils-CP5Jqy1P.mjs";
|
|
2
|
+
import { a as isRuleGroupType, c as isPojo, d as numericRegex, i as isRuleGroup, l as lc, o as isRuleGroupTypeIC, u as nullOrUndefinedOrEmpty } from "./objectUtils-DDZ-KhV5.mjs";
|
|
3
|
+
import { t as convertFromIC } from "./convertQuery-DaXv3h7S.mjs";
|
|
4
|
+
import { n as isValidationResult, t as isRuleOrGroupValid } from "./isRuleOrGroupValid-CIMZNkt4.mjs";
|
|
3
5
|
import { transformQuery } from "./transformQuery.mjs";
|
|
4
|
-
import { t as convertFromIC } from "./convertQuery-D_4J7E-Z.mjs";
|
|
5
|
-
//#region src/utils/isRuleOrGroupValid.ts
|
|
6
|
-
/**
|
|
7
|
-
* Determines if an object is useful as a validation result.
|
|
8
|
-
*/
|
|
9
|
-
const isValidationResult = (vr) => isPojo(vr) && typeof vr.valid === "boolean";
|
|
10
|
-
/**
|
|
11
|
-
* Determines if a rule or group is valid based on a validation result (if defined)
|
|
12
|
-
* or a validator function. Returns `true` if neither are defined and the `muted`
|
|
13
|
-
* property is not `true`.
|
|
14
|
-
*/
|
|
15
|
-
const isRuleOrGroupValid = (rg, validationResult, validator) => {
|
|
16
|
-
if (rg.muted) return false;
|
|
17
|
-
if (typeof validationResult === "boolean") return validationResult;
|
|
18
|
-
if (isValidationResult(validationResult)) return validationResult.valid;
|
|
19
|
-
if (typeof validator === "function" && !isRuleGroup(rg)) {
|
|
20
|
-
const vr = validator(rg);
|
|
21
|
-
if (typeof vr === "boolean") return vr;
|
|
22
|
-
// v8 ignore else
|
|
23
|
-
if (isValidationResult(vr)) return vr.valid;
|
|
24
|
-
}
|
|
25
|
-
return true;
|
|
26
|
-
};
|
|
27
|
-
//#endregion
|
|
28
6
|
//#region src/utils/formatQuery/defaultRuleGroupProcessorCEL.ts
|
|
29
7
|
/**
|
|
30
8
|
* Rule group processor used by {@link formatQuery} for "cel" format.
|
|
@@ -2600,8 +2578,10 @@ const defaultRuleProcessorParameterized = (rule, opts, meta) => {
|
|
|
2600
2578
|
return finalize(`${qPre}${rule.field}${qPost} ${sqlOperator} ${paramPrefix}${firstParamName} and ${paramPrefix}${secondParamName}`);
|
|
2601
2579
|
}
|
|
2602
2580
|
let paramValue = rule.value;
|
|
2603
|
-
if (typeof rule.value === "string")
|
|
2604
|
-
|
|
2581
|
+
if (typeof rule.value === "string") {
|
|
2582
|
+
if (shouldRenderAsNumber(rule.value, parseNumbers)) paramValue = parseNumber(rule.value, { parseNumbers });
|
|
2583
|
+
else paramValue = /^'.*'$/g.test(value) ? value.replaceAll(/(^'|'$)/g, "") : /* v8 ignore next -- @preserve */ value;
|
|
2584
|
+
}
|
|
2605
2585
|
let paramName = "";
|
|
2606
2586
|
if (parameterized) params.push(paramValue);
|
|
2607
2587
|
else {
|