@react-querybuilder/core 8.15.0 → 8.16.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/README.md +114 -53
- package/dist/cjs/react-querybuilder_core.cjs.development.d.ts +95 -17
- package/dist/cjs/react-querybuilder_core.cjs.development.js +425 -24
- package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +95 -17
- 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-BeJJH9BI.mjs.map +1 -1
- package/dist/convertQuery-Lx2HQa0m.js.map +1 -1
- package/dist/formatQuery.d.mts +72 -2
- package/dist/formatQuery.d.ts +72 -2
- package/dist/formatQuery.js +425 -24
- package/dist/formatQuery.js.map +1 -1
- package/dist/formatQuery.mjs +418 -25
- package/dist/formatQuery.mjs.map +1 -1
- package/dist/{import-0wp72lLT.d.mts → import-BC_bAKQ8.d.mts} +2 -2
- package/dist/{import-yRVJh7E1.d.ts → import-D1KnXhkQ.d.ts} +2 -2
- package/dist/{index-D5TXNIzF.d.ts → index-AAZg4Uh1.d.mts} +15 -8
- package/dist/{index-Lht_Wq3V.d.mts → index-Ds06V0zO.d.ts} +15 -8
- package/dist/objectUtils-Bzug_QfX.js.map +1 -1
- package/dist/objectUtils-D96eEEzL.mjs.map +1 -1
- package/dist/parseCEL.d.mts +2 -2
- package/dist/parseCEL.d.ts +2 -2
- package/dist/parseCEL.js.map +1 -1
- package/dist/parseCEL.mjs.map +1 -1
- package/dist/parseCypher.d.mts +49 -0
- package/dist/parseCypher.d.ts +49 -0
- package/dist/parseCypher.js +578 -0
- package/dist/parseCypher.js.map +1 -0
- package/dist/parseCypher.mjs +575 -0
- package/dist/parseCypher.mjs.map +1 -0
- package/dist/parseGremlin.d.mts +35 -0
- package/dist/parseGremlin.d.ts +35 -0
- package/dist/parseGremlin.js +192 -0
- package/dist/parseGremlin.js.map +1 -0
- package/dist/parseGremlin.mjs +191 -0
- package/dist/parseGremlin.mjs.map +1 -0
- package/dist/parseJSONata.d.mts +2 -2
- package/dist/parseJSONata.d.ts +2 -2
- package/dist/parseJSONata.js.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/parseMongoDB.mjs.map +1 -1
- package/dist/parseSPARQL.d.mts +34 -0
- package/dist/parseSPARQL.d.ts +34 -0
- package/dist/parseSPARQL.js +253 -0
- package/dist/parseSPARQL.js.map +1 -0
- package/dist/parseSPARQL.mjs +251 -0
- package/dist/parseSPARQL.mjs.map +1 -0
- package/dist/parseSQL.d.mts +2 -2
- package/dist/parseSQL.d.ts +2 -2
- package/dist/parseSQL.js.map +1 -1
- 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.map +1 -1
- package/dist/parseSpEL.mjs.map +1 -1
- package/dist/prepareQueryObjects-BoG5Rt8z.js.map +1 -1
- package/dist/prepareQueryObjects-uA10ZpZX.mjs.map +1 -1
- package/dist/react-querybuilder_core.d.mts +95 -17
- package/dist/react-querybuilder_core.legacy-esm.d.ts +95 -17
- package/dist/react-querybuilder_core.legacy-esm.js +435 -37
- package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
- package/dist/react-querybuilder_core.mjs +418 -25
- package/dist/react-querybuilder_core.mjs.map +1 -1
- package/dist/react-querybuilder_core.production.d.mts +95 -17
- 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 -1
- package/dist/transformQuery.d.ts +1 -1
- package/dist/transformQuery.js.map +1 -1
- package/dist/transformQuery.mjs.map +1 -1
- package/dist/utils-ChLG90DP.mjs.map +1 -1
- package/dist/utils-Qwkq2Q0F.js.map +1 -1
- package/formatQuery/package.json +1 -1
- package/package.json +51 -7
- package/parseCEL/package.json +1 -1
- package/parseCypher/package.json +4 -0
- package/parseGremlin/package.json +4 -0
- package/parseJSONata/package.json +1 -1
- package/parseJsonLogic/package.json +1 -1
- package/parseMongoDB/package.json +1 -1
- package/parseSPARQL/package.json +4 -0
- package/parseSQL/package.json +1 -1
- package/parseSpEL/package.json +1 -1
- package/transformQuery/package.json +1 -1
|
@@ -694,7 +694,7 @@ const isRuleGroupType = (rg) => isRuleGroup(rg) && typeof rg.combinator === "str
|
|
|
694
694
|
*/
|
|
695
695
|
const isRuleGroupTypeIC = (rg) => isRuleGroup(rg) && rg.combinator === void 0;
|
|
696
696
|
//#endregion
|
|
697
|
-
//#region \0@oxc-project+runtime@0.
|
|
697
|
+
//#region \0@oxc-project+runtime@0.130.0/helpers/typeof.js
|
|
698
698
|
function _typeof(o) {
|
|
699
699
|
"@babel/helpers - typeof";
|
|
700
700
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -704,7 +704,7 @@ function _typeof(o) {
|
|
|
704
704
|
}, _typeof(o);
|
|
705
705
|
}
|
|
706
706
|
//#endregion
|
|
707
|
-
//#region \0@oxc-project+runtime@0.
|
|
707
|
+
//#region \0@oxc-project+runtime@0.130.0/helpers/toPrimitive.js
|
|
708
708
|
function toPrimitive(t, r) {
|
|
709
709
|
if ("object" != _typeof(t) || !t) return t;
|
|
710
710
|
var e = t[Symbol.toPrimitive];
|
|
@@ -716,13 +716,13 @@ function toPrimitive(t, r) {
|
|
|
716
716
|
return ("string" === r ? String : Number)(t);
|
|
717
717
|
}
|
|
718
718
|
//#endregion
|
|
719
|
-
//#region \0@oxc-project+runtime@0.
|
|
719
|
+
//#region \0@oxc-project+runtime@0.130.0/helpers/toPropertyKey.js
|
|
720
720
|
function toPropertyKey(t) {
|
|
721
721
|
var i = toPrimitive(t, "string");
|
|
722
722
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
723
723
|
}
|
|
724
724
|
//#endregion
|
|
725
|
-
//#region \0@oxc-project+runtime@0.
|
|
725
|
+
//#region \0@oxc-project+runtime@0.130.0/helpers/defineProperty.js
|
|
726
726
|
function _defineProperty(e, r, t) {
|
|
727
727
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
728
728
|
value: t,
|
|
@@ -732,7 +732,7 @@ function _defineProperty(e, r, t) {
|
|
|
732
732
|
}) : e[r] = t, e;
|
|
733
733
|
}
|
|
734
734
|
//#endregion
|
|
735
|
-
//#region \0@oxc-project+runtime@0.
|
|
735
|
+
//#region \0@oxc-project+runtime@0.130.0/helpers/objectSpread2.js
|
|
736
736
|
function ownKeys(e, r) {
|
|
737
737
|
var t = Object.keys(e);
|
|
738
738
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -755,7 +755,7 @@ function _objectSpread2(e) {
|
|
|
755
755
|
return e;
|
|
756
756
|
}
|
|
757
757
|
//#endregion
|
|
758
|
-
//#region \0@oxc-project+runtime@0.
|
|
758
|
+
//#region \0@oxc-project+runtime@0.130.0/helpers/objectWithoutPropertiesLoose.js
|
|
759
759
|
function _objectWithoutPropertiesLoose(r, e) {
|
|
760
760
|
if (null == r) return {};
|
|
761
761
|
var t = {};
|
|
@@ -766,7 +766,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
766
766
|
return t;
|
|
767
767
|
}
|
|
768
768
|
//#endregion
|
|
769
|
-
//#region \0@oxc-project+runtime@0.
|
|
769
|
+
//#region \0@oxc-project+runtime@0.130.0/helpers/objectWithoutProperties.js
|
|
770
770
|
function _objectWithoutProperties(e, t) {
|
|
771
771
|
if (null == e) return {};
|
|
772
772
|
var o, r, i = _objectWithoutPropertiesLoose(e, t);
|
|
@@ -1558,7 +1558,7 @@ const defaultRuleGroupProcessorCEL = (ruleGroup, options) => {
|
|
|
1558
1558
|
//#endregion
|
|
1559
1559
|
//#region src/utils/formatQuery/defaultRuleProcessorCEL.ts
|
|
1560
1560
|
const shouldNegate$2 = (op) => op.startsWith("not") || op.startsWith("doesnot");
|
|
1561
|
-
const escapeDoubleQuotes = (v, escapeQuotes) => typeof v !== "string" || !escapeQuotes ? `${v}` : v.replaceAll(`"`, `\\"`);
|
|
1561
|
+
const escapeDoubleQuotes$1 = (v, escapeQuotes) => typeof v !== "string" || !escapeQuotes ? `${v}` : v.replaceAll(`"`, `\\"`);
|
|
1562
1562
|
/**
|
|
1563
1563
|
* Default rule processor used by {@link formatQuery} for "cel" format.
|
|
1564
1564
|
*
|
|
@@ -1597,19 +1597,19 @@ const defaultRuleProcessorCEL = (rule, opts = {}) => {
|
|
|
1597
1597
|
case "==":
|
|
1598
1598
|
case "!=":
|
|
1599
1599
|
case ">":
|
|
1600
|
-
case ">=": return `${field} ${operatorTL} ${valueIsField || useBareValue ? trimIfString(value) : `"${escapeDoubleQuotes(value, escapeQuotes)}"`}`;
|
|
1600
|
+
case ">=": return `${field} ${operatorTL} ${valueIsField || useBareValue ? trimIfString(value) : `"${escapeDoubleQuotes$1(value, escapeQuotes)}"`}`;
|
|
1601
1601
|
case "contains":
|
|
1602
|
-
case "doesnotcontain": return `${shouldNegate$2(operatorTL) ? "!" : ""}${field}.contains(${valueIsField ? trimIfString(value) : `"${escapeDoubleQuotes(value, escapeQuotes)}"`})`;
|
|
1602
|
+
case "doesnotcontain": return `${shouldNegate$2(operatorTL) ? "!" : ""}${field}.contains(${valueIsField ? trimIfString(value) : `"${escapeDoubleQuotes$1(value, escapeQuotes)}"`})`;
|
|
1603
1603
|
case "beginswith":
|
|
1604
|
-
case "doesnotbeginwith": return `${shouldNegate$2(operatorTL) ? "!" : ""}${field}.startsWith(${valueIsField ? trimIfString(value) : `"${escapeDoubleQuotes(value, escapeQuotes)}"`})`;
|
|
1604
|
+
case "doesnotbeginwith": return `${shouldNegate$2(operatorTL) ? "!" : ""}${field}.startsWith(${valueIsField ? trimIfString(value) : `"${escapeDoubleQuotes$1(value, escapeQuotes)}"`})`;
|
|
1605
1605
|
case "endswith":
|
|
1606
|
-
case "doesnotendwith": return `${shouldNegate$2(operatorTL) ? "!" : ""}${field}.endsWith(${valueIsField ? trimIfString(value) : `"${escapeDoubleQuotes(value, escapeQuotes)}"`})`;
|
|
1606
|
+
case "doesnotendwith": return `${shouldNegate$2(operatorTL) ? "!" : ""}${field}.endsWith(${valueIsField ? trimIfString(value) : `"${escapeDoubleQuotes$1(value, escapeQuotes)}"`})`;
|
|
1607
1607
|
case "null": return `${field} == null`;
|
|
1608
1608
|
case "notnull": return `${field} != null`;
|
|
1609
1609
|
case "in":
|
|
1610
1610
|
case "notin": {
|
|
1611
1611
|
const [prefix, suffix] = shouldNegate$2(operatorTL) ? ["!(", ")"] : ["", ""];
|
|
1612
|
-
return `${prefix}${field} in [${toArray(value).map((val) => valueIsField || shouldRenderAsNumber(val, parseNumbers) ? `${trimIfString(val)}` : `"${escapeDoubleQuotes(val, escapeQuotes)}"`).join(", ")}]${suffix}`;
|
|
1612
|
+
return `${prefix}${field} in [${toArray(value).map((val) => valueIsField || shouldRenderAsNumber(val, parseNumbers) ? `${trimIfString(val)}` : `"${escapeDoubleQuotes$1(val, escapeQuotes)}"`).join(", ")}]${suffix}`;
|
|
1613
1613
|
}
|
|
1614
1614
|
case "between":
|
|
1615
1615
|
case "notbetween": {
|
|
@@ -1619,8 +1619,8 @@ const defaultRuleProcessorCEL = (rule, opts = {}) => {
|
|
|
1619
1619
|
const shouldParseNumbers = !(parseNumbers === false);
|
|
1620
1620
|
const firstNum = shouldRenderAsNumber(first, shouldParseNumbers) ? parseNumber(first, { parseNumbers: shouldParseNumbers }) : NaN;
|
|
1621
1621
|
const secondNum = shouldRenderAsNumber(second, shouldParseNumbers) ? parseNumber(second, { parseNumbers: shouldParseNumbers }) : NaN;
|
|
1622
|
-
let firstValue = Number.isNaN(firstNum) ? valueIsField ? `${first}` : `"${escapeDoubleQuotes(first, escapeQuotes)}"` : firstNum;
|
|
1623
|
-
let secondValue = Number.isNaN(secondNum) ? valueIsField ? `${second}` : `"${escapeDoubleQuotes(second, escapeQuotes)}"` : secondNum;
|
|
1622
|
+
let firstValue = Number.isNaN(firstNum) ? valueIsField ? `${first}` : `"${escapeDoubleQuotes$1(first, escapeQuotes)}"` : firstNum;
|
|
1623
|
+
let secondValue = Number.isNaN(secondNum) ? valueIsField ? `${second}` : `"${escapeDoubleQuotes$1(second, escapeQuotes)}"` : secondNum;
|
|
1624
1624
|
if (!preserveValueOrder && firstValue === firstNum && secondValue === secondNum && secondNum < firstNum) {
|
|
1625
1625
|
const tempNum = secondNum;
|
|
1626
1626
|
secondValue = firstNum;
|
|
@@ -1865,7 +1865,7 @@ const defaultRuleGroupProcessorSpEL = (ruleGroup, options) => {
|
|
|
1865
1865
|
//#region src/utils/formatQuery/defaultRuleProcessorSpEL.ts
|
|
1866
1866
|
const shouldNegate$1 = (op) => op.startsWith("not") || op.startsWith("doesnot");
|
|
1867
1867
|
const wrapInNegation = (clause, negate) => negate ? `!(${clause})` : clause;
|
|
1868
|
-
const escapeSingleQuotes = (v, escapeQuotes) => typeof v !== "string" || !escapeQuotes ? `${v}` : v.replaceAll(`'`, `\\'`);
|
|
1868
|
+
const escapeSingleQuotes$2 = (v, escapeQuotes) => typeof v !== "string" || !escapeQuotes ? `${v}` : v.replaceAll(`'`, `\\'`);
|
|
1869
1869
|
/**
|
|
1870
1870
|
* Default rule processor used by {@link formatQuery} for "spel" format.
|
|
1871
1871
|
*
|
|
@@ -1903,20 +1903,20 @@ const defaultRuleProcessorSpEL = (rule, opts = {}) => {
|
|
|
1903
1903
|
case "==":
|
|
1904
1904
|
case "!=":
|
|
1905
1905
|
case ">":
|
|
1906
|
-
case ">=": return `${field} ${operatorTL} ${valueIsField || useBareValue ? trimIfString(value) : `'${escapeSingleQuotes(value, escapeQuotes)}'`}`;
|
|
1906
|
+
case ">=": return `${field} ${operatorTL} ${valueIsField || useBareValue ? trimIfString(value) : `'${escapeSingleQuotes$2(value, escapeQuotes)}'`}`;
|
|
1907
1907
|
case "contains":
|
|
1908
|
-
case "doesnotcontain": return wrapInNegation(`${field} matches ${valueIsField || useBareValue ? trimIfString(value) : `'${escapeSingleQuotes(value, escapeQuotes)}'`}`, shouldNegate$1(operatorTL));
|
|
1908
|
+
case "doesnotcontain": return wrapInNegation(`${field} matches ${valueIsField || useBareValue ? trimIfString(value) : `'${escapeSingleQuotes$2(value, escapeQuotes)}'`}`, shouldNegate$1(operatorTL));
|
|
1909
1909
|
case "beginswith":
|
|
1910
|
-
case "doesnotbeginwith": return wrapInNegation(`${field} matches ${valueIsField ? `'^'.concat(${trimIfString(value)})` : `'${typeof value === "string" && !value.startsWith("^") || useBareValue ? "^" : ""}${escapeSingleQuotes(value, escapeQuotes)}'`}`, shouldNegate$1(operatorTL));
|
|
1910
|
+
case "doesnotbeginwith": return wrapInNegation(`${field} matches ${valueIsField ? `'^'.concat(${trimIfString(value)})` : `'${typeof value === "string" && !value.startsWith("^") || useBareValue ? "^" : ""}${escapeSingleQuotes$2(value, escapeQuotes)}'`}`, shouldNegate$1(operatorTL));
|
|
1911
1911
|
case "endswith":
|
|
1912
|
-
case "doesnotendwith": return wrapInNegation(`${field} matches ${valueIsField ? `${trimIfString(value)}.concat('$')` : `'${escapeSingleQuotes(value, escapeQuotes)}${typeof value === "string" && !value.endsWith("$") || useBareValue ? "$" : ""}'`}`, shouldNegate$1(operatorTL));
|
|
1912
|
+
case "doesnotendwith": return wrapInNegation(`${field} matches ${valueIsField ? `${trimIfString(value)}.concat('$')` : `'${escapeSingleQuotes$2(value, escapeQuotes)}${typeof value === "string" && !value.endsWith("$") || useBareValue ? "$" : ""}'`}`, shouldNegate$1(operatorTL));
|
|
1913
1913
|
case "null": return `${field} == null`;
|
|
1914
1914
|
case "notnull": return `${field} != null`;
|
|
1915
1915
|
case "in":
|
|
1916
1916
|
case "notin": {
|
|
1917
1917
|
const negate = shouldNegate$1(operatorTL) ? "!" : "";
|
|
1918
1918
|
const valueAsArray = toArray(value);
|
|
1919
|
-
return valueAsArray.length > 0 ? `${negate}(${valueAsArray.map((val) => `${field} == ${valueIsField || shouldRenderAsNumber(val, parseNumbers) ? `${trimIfString(val)}` : `'${escapeSingleQuotes(val, escapeQuotes)}'`}`).join(" or ")})` : "";
|
|
1919
|
+
return valueAsArray.length > 0 ? `${negate}(${valueAsArray.map((val) => `${field} == ${valueIsField || shouldRenderAsNumber(val, parseNumbers) ? `${trimIfString(val)}` : `'${escapeSingleQuotes$2(val, escapeQuotes)}'`}`).join(" or ")})` : "";
|
|
1920
1920
|
}
|
|
1921
1921
|
case "between":
|
|
1922
1922
|
case "notbetween": {
|
|
@@ -1926,8 +1926,8 @@ const defaultRuleProcessorSpEL = (rule, opts = {}) => {
|
|
|
1926
1926
|
const shouldParseNumbers = !(parseNumbers === false);
|
|
1927
1927
|
const firstNum = shouldRenderAsNumber(first, shouldParseNumbers) ? parseNumber(first, { parseNumbers: shouldParseNumbers }) : NaN;
|
|
1928
1928
|
const secondNum = shouldRenderAsNumber(second, shouldParseNumbers) ? parseNumber(second, { parseNumbers: shouldParseNumbers }) : NaN;
|
|
1929
|
-
let firstValue = Number.isNaN(firstNum) ? valueIsField ? `${first}` : `'${escapeSingleQuotes(first, escapeQuotes)}'` : firstNum;
|
|
1930
|
-
let secondValue = Number.isNaN(secondNum) ? valueIsField ? `${second}` : `'${escapeSingleQuotes(second, escapeQuotes)}'` : secondNum;
|
|
1929
|
+
let firstValue = Number.isNaN(firstNum) ? valueIsField ? `${first}` : `'${escapeSingleQuotes$2(first, escapeQuotes)}'` : firstNum;
|
|
1930
|
+
let secondValue = Number.isNaN(secondNum) ? valueIsField ? `${second}` : `'${escapeSingleQuotes$2(second, escapeQuotes)}'` : secondNum;
|
|
1931
1931
|
if (!preserveValueOrder && firstValue === firstNum && secondValue === secondNum && secondNum < firstNum) {
|
|
1932
1932
|
const tempNum = secondNum;
|
|
1933
1933
|
secondValue = firstNum;
|
|
@@ -1970,7 +1970,7 @@ const defaultValueProcessorByRule = ({ operator, value, valueSource }, { escapeQ
|
|
|
1970
1970
|
}
|
|
1971
1971
|
case "between":
|
|
1972
1972
|
case "notbetween": {
|
|
1973
|
-
var _translations$
|
|
1973
|
+
var _ref, _translations$between;
|
|
1974
1974
|
const valueAsArray = toArray(value, { retainEmptyStrings: true });
|
|
1975
1975
|
if (valueAsArray.length < 2 || !isValidValue(valueAsArray[0]) || !isValidValue(valueAsArray[1])) return "";
|
|
1976
1976
|
const [first, second] = valueAsArray;
|
|
@@ -1983,7 +1983,7 @@ const defaultValueProcessorByRule = ({ operator, value, valueSource }, { escapeQ
|
|
|
1983
1983
|
valsOneAndTwoOnly[0] = secondNum;
|
|
1984
1984
|
valsOneAndTwoOnly[1] = firstNum;
|
|
1985
1985
|
}
|
|
1986
|
-
return (valueIsField ? valsOneAndTwoOnly.map((v) => wrapFieldName(v)) : valsOneAndTwoOnly.every((v) => shouldRenderAsNumber(v, parseNumbers)) ? valsOneAndTwoOnly.map((v) => parseNumber(v, { parseNumbers: "strict" })) : valsOneAndTwoOnly.map((v) => wrapAndEscape(v))).join(` ${(_translations$
|
|
1986
|
+
return (valueIsField ? valsOneAndTwoOnly.map((v) => wrapFieldName(v)) : valsOneAndTwoOnly.every((v) => shouldRenderAsNumber(v, parseNumbers)) ? valsOneAndTwoOnly.map((v) => parseNumber(v, { parseNumbers: "strict" })) : valsOneAndTwoOnly.map((v) => wrapAndEscape(v))).join(` ${(_ref = (_translations$between = translations === null || translations === void 0 ? void 0 : translations.betweenAnd) !== null && _translations$between !== void 0 ? _translations$between : translations === null || translations === void 0 ? void 0 : translations.and) !== null && _ref !== void 0 ? _ref : "and"} `);
|
|
1987
1987
|
}
|
|
1988
1988
|
case "contains":
|
|
1989
1989
|
case "doesnotcontain": return valueIsField ? concat(quoteValue("%"), wrapFieldName(value), quoteValue("%")) : quoteValue(`%${escapeValue(value)}%`);
|
|
@@ -1996,6 +1996,71 @@ const defaultValueProcessorByRule = ({ operator, value, valueSource }, { escapeQ
|
|
|
1996
1996
|
return valueIsField ? wrapFieldName(value) : shouldRenderAsNumber(value, parseNumbers) ? `${trimIfString(value)}` : `${wrapAndEscape(value)}`;
|
|
1997
1997
|
};
|
|
1998
1998
|
//#endregion
|
|
1999
|
+
//#region src/utils/formatQuery/defaultRuleGroupProcessorCypher.ts
|
|
2000
|
+
/**
|
|
2001
|
+
* Maps a {@link DefaultCombinatorName} to a Cypher combinator keyword.
|
|
2002
|
+
*
|
|
2003
|
+
* @group Export
|
|
2004
|
+
*/
|
|
2005
|
+
const cypherCombinatorMap = {
|
|
2006
|
+
and: "AND",
|
|
2007
|
+
or: "OR"
|
|
2008
|
+
};
|
|
2009
|
+
/**
|
|
2010
|
+
* Rule group processor used by {@link formatQuery} for "cypher" and "gql" formats.
|
|
2011
|
+
*
|
|
2012
|
+
* @group Export
|
|
2013
|
+
*/
|
|
2014
|
+
const defaultRuleGroupProcessorCypher = (ruleGroup, options) => {
|
|
2015
|
+
const { fields, fallbackExpression, getParseNumberBoolean, placeholderFieldName, placeholderOperatorName, placeholderValueName, ruleProcessor, validateRule, validationMap } = options;
|
|
2016
|
+
const processRuleGroup = (rg, outermost) => {
|
|
2017
|
+
var _rg$id;
|
|
2018
|
+
if (!isRuleOrGroupValid(rg, validationMap[(_rg$id = rg.id) !== null && _rg$id !== void 0 ? _rg$id : /* v8 ignore start -- @preserve */ ""])) return outermost ? fallbackExpression : "";
|
|
2019
|
+
const processedRules = [];
|
|
2020
|
+
let precedingCombinator = "";
|
|
2021
|
+
let firstRule = true;
|
|
2022
|
+
for (const rule of rg.rules) {
|
|
2023
|
+
var _rule$valueSource;
|
|
2024
|
+
if (typeof rule === "string") {
|
|
2025
|
+
precedingCombinator = cypherCombinatorMap[rule];
|
|
2026
|
+
continue;
|
|
2027
|
+
}
|
|
2028
|
+
if (isRuleGroup(rule)) {
|
|
2029
|
+
const processedGroup = processRuleGroup(rule);
|
|
2030
|
+
if (processedGroup) {
|
|
2031
|
+
if (!firstRule && precedingCombinator) {
|
|
2032
|
+
processedRules.push(precedingCombinator);
|
|
2033
|
+
precedingCombinator = "";
|
|
2034
|
+
}
|
|
2035
|
+
firstRule = false;
|
|
2036
|
+
processedRules.push(processedGroup);
|
|
2037
|
+
}
|
|
2038
|
+
continue;
|
|
2039
|
+
}
|
|
2040
|
+
const [validationResult, fieldValidator] = validateRule(rule);
|
|
2041
|
+
if (!isRuleOrGroupValid(rule, validationResult, fieldValidator) || rule.field === placeholderFieldName || rule.operator === placeholderOperatorName || placeholderValueName !== void 0 && rule.value === placeholderValueName) continue;
|
|
2042
|
+
const fieldData = getOption(fields, rule.field);
|
|
2043
|
+
const processedRule = ruleProcessor(rule, _objectSpread2(_objectSpread2({}, options), {}, {
|
|
2044
|
+
parseNumbers: getParseNumberBoolean(fieldData === null || fieldData === void 0 ? void 0 : fieldData.inputType),
|
|
2045
|
+
escapeQuotes: ((_rule$valueSource = rule.valueSource) !== null && _rule$valueSource !== void 0 ? _rule$valueSource : "value") === "value",
|
|
2046
|
+
fieldData
|
|
2047
|
+
}));
|
|
2048
|
+
if (processedRule) {
|
|
2049
|
+
if (!firstRule && precedingCombinator) {
|
|
2050
|
+
processedRules.push(precedingCombinator);
|
|
2051
|
+
precedingCombinator = "";
|
|
2052
|
+
}
|
|
2053
|
+
firstRule = false;
|
|
2054
|
+
processedRules.push(processedRule);
|
|
2055
|
+
}
|
|
2056
|
+
}
|
|
2057
|
+
const expression = processedRules.join(isRuleGroupType(rg) ? ` ${cypherCombinatorMap[rg.combinator]} ` : " ");
|
|
2058
|
+
const [prefix, suffix] = rg.not || !outermost ? [`${rg.not ? "NOT " : ""}(`, ")"] : ["", ""];
|
|
2059
|
+
return expression ? `${prefix}${expression}${suffix}` : fallbackExpression;
|
|
2060
|
+
};
|
|
2061
|
+
return processRuleGroup(ruleGroup, true);
|
|
2062
|
+
};
|
|
2063
|
+
//#endregion
|
|
1999
2064
|
//#region src/utils/formatQuery/defaultRuleProcessorDrizzle.ts
|
|
2000
2065
|
/**
|
|
2001
2066
|
* Default rule processor used by {@link formatQuery} for the "drizzle" format.
|
|
@@ -2153,6 +2218,69 @@ const defaultRuleGroupProcessorElasticSearch = (ruleGroup, options) => {
|
|
|
2153
2218
|
return processedRuleGroup === false ? {} : processedRuleGroup;
|
|
2154
2219
|
};
|
|
2155
2220
|
//#endregion
|
|
2221
|
+
//#region src/utils/formatQuery/defaultRuleGroupProcessorGremlin.ts
|
|
2222
|
+
/**
|
|
2223
|
+
* Rule group processor used by {@link formatQuery} for "gremlin" format.
|
|
2224
|
+
*
|
|
2225
|
+
* At the top level, filter rules produce chained `.has()` steps (implicit AND).
|
|
2226
|
+
* Nested groups use `.and()` / `.or()` / `.not()` compound traversals with
|
|
2227
|
+
* `__` anonymous traversal prefixes.
|
|
2228
|
+
*
|
|
2229
|
+
* @group Export
|
|
2230
|
+
*/
|
|
2231
|
+
const defaultRuleGroupProcessorGremlin = (ruleGroup, options) => {
|
|
2232
|
+
var _ruleGroup$id;
|
|
2233
|
+
const { fields, fallbackExpression, getParseNumberBoolean, placeholderFieldName, placeholderOperatorName, placeholderValueName, ruleProcessor, validateRule, validationMap } = options;
|
|
2234
|
+
const validateAndProcess = (rule) => {
|
|
2235
|
+
var _rule$valueSource;
|
|
2236
|
+
// v8 ignore next -- @preserve
|
|
2237
|
+
if (typeof rule === "string" || isRuleGroup(rule)) return void 0;
|
|
2238
|
+
const [validationResult, fieldValidator] = validateRule(rule);
|
|
2239
|
+
if (!isRuleOrGroupValid(rule, validationResult, fieldValidator) || rule.field === placeholderFieldName || rule.operator === placeholderOperatorName || placeholderValueName !== void 0 && rule.value === placeholderValueName) return;
|
|
2240
|
+
const fieldData = getOption(fields, rule.field);
|
|
2241
|
+
return ruleProcessor(rule, _objectSpread2(_objectSpread2({}, options), {}, {
|
|
2242
|
+
parseNumbers: getParseNumberBoolean(fieldData === null || fieldData === void 0 ? void 0 : fieldData.inputType),
|
|
2243
|
+
escapeQuotes: ((_rule$valueSource = rule.valueSource) !== null && _rule$valueSource !== void 0 ? _rule$valueSource : "value") === "value",
|
|
2244
|
+
fieldData
|
|
2245
|
+
}));
|
|
2246
|
+
};
|
|
2247
|
+
/** Recursively processes a nested group into `.and()`/`.or()`/`.not()` form. */
|
|
2248
|
+
const processNested = (rg) => {
|
|
2249
|
+
var _rg$id, _combinator;
|
|
2250
|
+
if (!isRuleOrGroupValid(rg, validationMap[(_rg$id = rg.id) !== null && _rg$id !== void 0 ? _rg$id : /* v8 ignore start -- @preserve */ ""])) return "";
|
|
2251
|
+
const predicates = [];
|
|
2252
|
+
for (const rule of rg.rules) {
|
|
2253
|
+
if (typeof rule === "string") continue;
|
|
2254
|
+
if (isRuleGroup(rule)) {
|
|
2255
|
+
const nested = processNested(rule);
|
|
2256
|
+
if (nested) predicates.push(nested);
|
|
2257
|
+
continue;
|
|
2258
|
+
}
|
|
2259
|
+
const processed = validateAndProcess(rule);
|
|
2260
|
+
if (processed) predicates.push(processed);
|
|
2261
|
+
}
|
|
2262
|
+
if (predicates.length === 0) return "";
|
|
2263
|
+
const combinator = (_combinator = rg.combinator) !== null && _combinator !== void 0 ? _combinator : "and";
|
|
2264
|
+
const prefix = rg.not ? "not" : combinator;
|
|
2265
|
+
if (predicates.length === 1 && !rg.not) return predicates[0];
|
|
2266
|
+
return `.${prefix}(${predicates.map((p) => p.startsWith(".") ? `__${p}` : p).join(", ")})`;
|
|
2267
|
+
};
|
|
2268
|
+
if (!isRuleOrGroupValid(ruleGroup, validationMap[(_ruleGroup$id = ruleGroup.id) !== null && _ruleGroup$id !== void 0 ? _ruleGroup$id : /* v8 ignore start -- @preserve */ ""])) return fallbackExpression;
|
|
2269
|
+
const steps = [];
|
|
2270
|
+
for (const rule of ruleGroup.rules) {
|
|
2271
|
+
if (typeof rule === "string") continue;
|
|
2272
|
+
if (isRuleGroup(rule)) {
|
|
2273
|
+
const compound = processNested(rule);
|
|
2274
|
+
if (compound) steps.push(compound);
|
|
2275
|
+
continue;
|
|
2276
|
+
}
|
|
2277
|
+
const processed = validateAndProcess(rule);
|
|
2278
|
+
if (processed) steps.push(processed);
|
|
2279
|
+
}
|
|
2280
|
+
if (steps.length === 0) return fallbackExpression;
|
|
2281
|
+
return steps.join("");
|
|
2282
|
+
};
|
|
2283
|
+
//#endregion
|
|
2156
2284
|
//#region src/utils/formatQuery/defaultRuleGroupProcessorJSONata.ts
|
|
2157
2285
|
/**
|
|
2158
2286
|
* Rule group processor used by {@link formatQuery} for "jsonata" format.
|
|
@@ -2318,7 +2446,7 @@ const defaultRuleGroupProcessorMongoDB = (ruleGroup, options, meta) => {
|
|
|
2318
2446
|
const defaultRuleGroupProcessorNL = (ruleGroup, options) => {
|
|
2319
2447
|
const { fields, fallbackExpression, getParseNumberBoolean, placeholderFieldName, placeholderOperatorName, placeholderValueName, ruleProcessor, translations, validateRule, validationMap } = options;
|
|
2320
2448
|
const processRuleGroup = (rg, outermostOrLonelyInGroup) => {
|
|
2321
|
-
var _rg$id, _rg2$combinator2, _translations2;
|
|
2449
|
+
var _rg$id, _rg2$combinator2, _translations$ruleSep2, _translations2;
|
|
2322
2450
|
if (!isRuleOrGroupValid(rg, validationMap[(_rg$id = rg.id) !== null && _rg$id !== void 0 ? _rg$id : /* v8 ignore start -- @preserve */ ""])) return outermostOrLonelyInGroup ? fallbackExpression : /* v8 ignore next -- @preserve */ "";
|
|
2323
2451
|
const rg2 = isRuleGroupTypeIC(rg) && rg.rules.some((r) => typeof r === "string" && lc(r) === "xor") ? convertFromIC(rg) : rg;
|
|
2324
2452
|
const processedRules = [];
|
|
@@ -2327,8 +2455,8 @@ const defaultRuleGroupProcessorNL = (ruleGroup, options) => {
|
|
|
2327
2455
|
for (const rule of rg2.rules) {
|
|
2328
2456
|
var _rule$valueSource;
|
|
2329
2457
|
if (typeof rule === "string") {
|
|
2330
|
-
var _translations;
|
|
2331
|
-
precedingCombinator =
|
|
2458
|
+
var _translations$ruleSep, _translations;
|
|
2459
|
+
precedingCombinator = `${(_translations$ruleSep = translations.ruleSeparator) !== null && _translations$ruleSep !== void 0 ? _translations$ruleSep : ", "}${(_translations = translations[rule]) !== null && _translations !== void 0 ? _translations : rule} `;
|
|
2332
2460
|
continue;
|
|
2333
2461
|
}
|
|
2334
2462
|
if (isRuleGroup(rule)) {
|
|
@@ -2371,7 +2499,8 @@ const defaultRuleGroupProcessorNL = (ruleGroup, options) => {
|
|
|
2371
2499
|
const [prefixTL, suffixTL] = ["groupPrefix", "groupSuffix"].map((key) => rg2.not ? isXOR ? getNLTranslataion(key, translations, ["not", "xor"]) : getNLTranslataion(key, translations, ["not"]) : isXOR ? getNLTranslataion(key, translations, ["xor"]) : getNLTranslataion(key, translations));
|
|
2372
2500
|
const prefix = mustWrap ? `${prefixTL} (`.trim() : "";
|
|
2373
2501
|
const suffix = mustWrap ? `) ${suffixTL}`.trim() : "";
|
|
2374
|
-
|
|
2502
|
+
const sep = (_translations$ruleSep2 = translations.ruleSeparator) !== null && _translations$ruleSep2 !== void 0 ? _translations$ruleSep2 : ", ";
|
|
2503
|
+
return `${prefix}${processedRules.join(isRuleGroupType(rg2) ? `${sep}${(_translations2 = translations[combinator]) !== null && _translations2 !== void 0 ? _translations2 : combinator} ` : "")}${suffix}`;
|
|
2375
2504
|
};
|
|
2376
2505
|
return processRuleGroup(ruleGroup, true);
|
|
2377
2506
|
};
|
|
@@ -2547,6 +2676,64 @@ const defaultRuleGroupProcessorSequelize = (ruleGroup, options) => {
|
|
|
2547
2676
|
return processRuleGroup(convertFromIC(ruleGroup), true);
|
|
2548
2677
|
};
|
|
2549
2678
|
//#endregion
|
|
2679
|
+
//#region src/utils/formatQuery/defaultRuleGroupProcessorSPARQL.ts
|
|
2680
|
+
/**
|
|
2681
|
+
* Rule group processor used by {@link formatQuery} for "sparql" format.
|
|
2682
|
+
*
|
|
2683
|
+
* SPARQL uses the same combinators as CEL (`&&` / `||`) and `!()` for negation.
|
|
2684
|
+
*
|
|
2685
|
+
* @group Export
|
|
2686
|
+
*/
|
|
2687
|
+
const defaultRuleGroupProcessorSPARQL = (ruleGroup, options) => {
|
|
2688
|
+
const { fields, fallbackExpression, getParseNumberBoolean, placeholderFieldName, placeholderOperatorName, placeholderValueName, ruleProcessor, validateRule, validationMap } = options;
|
|
2689
|
+
const processRuleGroup = (rg, outermost) => {
|
|
2690
|
+
var _rg$id;
|
|
2691
|
+
if (!isRuleOrGroupValid(rg, validationMap[(_rg$id = rg.id) !== null && _rg$id !== void 0 ? _rg$id : /* v8 ignore start -- @preserve */ ""])) return outermost ? fallbackExpression : "";
|
|
2692
|
+
const processedRules = [];
|
|
2693
|
+
let precedingCombinator = "";
|
|
2694
|
+
let firstRule = true;
|
|
2695
|
+
for (const rule of rg.rules) {
|
|
2696
|
+
var _rule$valueSource;
|
|
2697
|
+
if (typeof rule === "string") {
|
|
2698
|
+
precedingCombinator = celCombinatorMap[rule];
|
|
2699
|
+
continue;
|
|
2700
|
+
}
|
|
2701
|
+
if (isRuleGroup(rule)) {
|
|
2702
|
+
const processedGroup = processRuleGroup(rule);
|
|
2703
|
+
if (processedGroup) {
|
|
2704
|
+
if (!firstRule && precedingCombinator) {
|
|
2705
|
+
processedRules.push(precedingCombinator);
|
|
2706
|
+
precedingCombinator = "";
|
|
2707
|
+
}
|
|
2708
|
+
firstRule = false;
|
|
2709
|
+
processedRules.push(processedGroup);
|
|
2710
|
+
}
|
|
2711
|
+
continue;
|
|
2712
|
+
}
|
|
2713
|
+
const [validationResult, fieldValidator] = validateRule(rule);
|
|
2714
|
+
if (!isRuleOrGroupValid(rule, validationResult, fieldValidator) || rule.field === placeholderFieldName || rule.operator === placeholderOperatorName || placeholderValueName !== void 0 && rule.value === placeholderValueName) continue;
|
|
2715
|
+
const fieldData = getOption(fields, rule.field);
|
|
2716
|
+
const processedRule = ruleProcessor(rule, _objectSpread2(_objectSpread2({}, options), {}, {
|
|
2717
|
+
parseNumbers: getParseNumberBoolean(fieldData === null || fieldData === void 0 ? void 0 : fieldData.inputType),
|
|
2718
|
+
escapeQuotes: ((_rule$valueSource = rule.valueSource) !== null && _rule$valueSource !== void 0 ? _rule$valueSource : "value") === "value",
|
|
2719
|
+
fieldData
|
|
2720
|
+
}));
|
|
2721
|
+
if (processedRule) {
|
|
2722
|
+
if (!firstRule && precedingCombinator) {
|
|
2723
|
+
processedRules.push(precedingCombinator);
|
|
2724
|
+
precedingCombinator = "";
|
|
2725
|
+
}
|
|
2726
|
+
firstRule = false;
|
|
2727
|
+
processedRules.push(processedRule);
|
|
2728
|
+
}
|
|
2729
|
+
}
|
|
2730
|
+
const expression = processedRules.join(isRuleGroupType(rg) ? ` ${celCombinatorMap[rg.combinator]} ` : " ");
|
|
2731
|
+
const [prefix, suffix] = rg.not || !outermost ? [`${rg.not ? "!" : ""}(`, ")"] : ["", ""];
|
|
2732
|
+
return expression ? `${prefix}${expression}${suffix}` : fallbackExpression;
|
|
2733
|
+
};
|
|
2734
|
+
return processRuleGroup(ruleGroup, true);
|
|
2735
|
+
};
|
|
2736
|
+
//#endregion
|
|
2550
2737
|
//#region src/utils/formatQuery/defaultRuleGroupProcessorSQL.ts
|
|
2551
2738
|
/**
|
|
2552
2739
|
* Default rule processor used by {@link formatQuery} for "sql" format.
|
|
@@ -2922,6 +3109,59 @@ const getFieldValidatorReasons = (rule, fieldValidator) => {
|
|
|
2922
3109
|
}
|
|
2923
3110
|
};
|
|
2924
3111
|
//#endregion
|
|
3112
|
+
//#region src/utils/formatQuery/defaultRuleProcessorCypher.ts
|
|
3113
|
+
const escapeSingleQuotes$1 = (v, escapeQuotes) => typeof v !== "string" || !escapeQuotes ? `${v}` : v.replaceAll("'", "\\'");
|
|
3114
|
+
/**
|
|
3115
|
+
* Default rule processor used by {@link formatQuery} for "cypher" and "gql" formats.
|
|
3116
|
+
*
|
|
3117
|
+
* @group Export
|
|
3118
|
+
*/
|
|
3119
|
+
const defaultRuleProcessorCypher = (rule, opts = {}) => {
|
|
3120
|
+
const { escapeQuotes, parseNumbers } = opts;
|
|
3121
|
+
const { field, operator, value, valueSource } = rule;
|
|
3122
|
+
const valueIsField = valueSource === "field";
|
|
3123
|
+
const operatorTL = operator.toLowerCase();
|
|
3124
|
+
const fmtVal = (v) => {
|
|
3125
|
+
if (v === null || v === void 0) return "null";
|
|
3126
|
+
if (typeof v === "boolean" || typeof v === "bigint") return String(v);
|
|
3127
|
+
if (valueIsField) return trimIfString(v);
|
|
3128
|
+
if (typeof v === "number" || shouldRenderAsNumber(v, parseNumbers)) return trimIfString(v);
|
|
3129
|
+
return `'${escapeSingleQuotes$1(v, escapeQuotes)}'`;
|
|
3130
|
+
};
|
|
3131
|
+
switch (operatorTL) {
|
|
3132
|
+
case "=": return `${field} = ${fmtVal(value)}`;
|
|
3133
|
+
case "!=":
|
|
3134
|
+
case "<>": return `${field} <> ${fmtVal(value)}`;
|
|
3135
|
+
case "<":
|
|
3136
|
+
case ">":
|
|
3137
|
+
case "<=":
|
|
3138
|
+
case ">=": return `${field} ${operatorTL} ${fmtVal(value)}`;
|
|
3139
|
+
case "contains": return `${field} CONTAINS ${fmtVal(value)}`;
|
|
3140
|
+
case "doesnotcontain": return `NOT ${field} CONTAINS ${fmtVal(value)}`;
|
|
3141
|
+
case "beginswith": return `${field} STARTS WITH ${fmtVal(value)}`;
|
|
3142
|
+
case "doesnotbeginwith": return `NOT ${field} STARTS WITH ${fmtVal(value)}`;
|
|
3143
|
+
case "endswith": return `${field} ENDS WITH ${fmtVal(value)}`;
|
|
3144
|
+
case "doesnotendwith": return `NOT ${field} ENDS WITH ${fmtVal(value)}`;
|
|
3145
|
+
case "null": return `${field} IS NULL`;
|
|
3146
|
+
case "notnull": return `${field} IS NOT NULL`;
|
|
3147
|
+
case "in":
|
|
3148
|
+
case "notin": {
|
|
3149
|
+
const values = toArray(value).map(fmtVal);
|
|
3150
|
+
if (!values.length) return "";
|
|
3151
|
+
return `${operatorTL === "notin" ? "NOT " : ""}${field} IN [${values.join(", ")}]`;
|
|
3152
|
+
}
|
|
3153
|
+
case "between":
|
|
3154
|
+
case "notbetween": {
|
|
3155
|
+
const arr = toArray(value);
|
|
3156
|
+
if (arr.length < 2) return "";
|
|
3157
|
+
const [low, high] = [fmtVal(arr[0]), fmtVal(arr[1])];
|
|
3158
|
+
const expr = `${low} <= ${field} AND ${field} <= ${high}`;
|
|
3159
|
+
return operatorTL === "notbetween" ? `NOT (${expr})` : expr;
|
|
3160
|
+
}
|
|
3161
|
+
default: return `${field} ${operator} ${fmtVal(value)}`;
|
|
3162
|
+
}
|
|
3163
|
+
};
|
|
3164
|
+
//#endregion
|
|
2925
3165
|
//#region src/utils/formatQuery/defaultRuleProcessorElasticSearch.ts
|
|
2926
3166
|
const rangeOperatorMap = {
|
|
2927
3167
|
"<": "lt",
|
|
@@ -3071,6 +3311,68 @@ const defaultRuleProcessorElasticSearch = (rule, options = {}) => {
|
|
|
3071
3311
|
return false;
|
|
3072
3312
|
};
|
|
3073
3313
|
//#endregion
|
|
3314
|
+
//#region src/utils/formatQuery/defaultRuleProcessorGremlin.ts
|
|
3315
|
+
const escapeSingleQuotes = (v, escapeQuotes) => typeof v !== "string" || !escapeQuotes ? `${v}` : v.replaceAll("'", "\\'");
|
|
3316
|
+
/**
|
|
3317
|
+
* Default rule processor used by {@link formatQuery} for "gremlin" format.
|
|
3318
|
+
*
|
|
3319
|
+
* Each rule becomes a `.has()` step (or `.hasNot()`/`.has()` for null checks).
|
|
3320
|
+
*
|
|
3321
|
+
* @group Export
|
|
3322
|
+
*/
|
|
3323
|
+
const defaultRuleProcessorGremlin = (rule, opts = {}) => {
|
|
3324
|
+
const { escapeQuotes, parseNumbers } = opts;
|
|
3325
|
+
const { field, operator, value, valueSource } = rule;
|
|
3326
|
+
const valueIsField = valueSource === "field";
|
|
3327
|
+
const operatorTL = operator.toLowerCase();
|
|
3328
|
+
const prop = field.includes(".") ? field.split(".").pop() : field;
|
|
3329
|
+
const fmtVal = (v) => {
|
|
3330
|
+
if (v === null || v === void 0) return "null";
|
|
3331
|
+
if (typeof v === "boolean" || typeof v === "bigint") return String(v);
|
|
3332
|
+
if (valueIsField) return trimIfString(v);
|
|
3333
|
+
if (typeof v === "number" || shouldRenderAsNumber(v, parseNumbers)) return trimIfString(v);
|
|
3334
|
+
return `'${escapeSingleQuotes(v, escapeQuotes)}'`;
|
|
3335
|
+
};
|
|
3336
|
+
switch (operatorTL) {
|
|
3337
|
+
case "=": return `.has('${prop}', ${fmtVal(value)})`;
|
|
3338
|
+
case "!=":
|
|
3339
|
+
case "<>": return `.has('${prop}', neq(${fmtVal(value)}))`;
|
|
3340
|
+
case "<": return `.has('${prop}', lt(${fmtVal(value)}))`;
|
|
3341
|
+
case ">": return `.has('${prop}', gt(${fmtVal(value)}))`;
|
|
3342
|
+
case "<=": return `.has('${prop}', lte(${fmtVal(value)}))`;
|
|
3343
|
+
case ">=": return `.has('${prop}', gte(${fmtVal(value)}))`;
|
|
3344
|
+
case "contains": return `.has('${prop}', containing(${fmtVal(value)}))`;
|
|
3345
|
+
case "doesnotcontain": return `.has('${prop}', notContaining(${fmtVal(value)}))`;
|
|
3346
|
+
case "beginswith": return `.has('${prop}', startingWith(${fmtVal(value)}))`;
|
|
3347
|
+
case "doesnotbeginwith": return `.has('${prop}', notStartingWith(${fmtVal(value)}))`;
|
|
3348
|
+
case "endswith": return `.has('${prop}', endingWith(${fmtVal(value)}))`;
|
|
3349
|
+
case "doesnotendwith": return `.has('${prop}', notEndingWith(${fmtVal(value)}))`;
|
|
3350
|
+
case "null": return `.hasNot('${prop}')`;
|
|
3351
|
+
case "notnull": return `.has('${prop}')`;
|
|
3352
|
+
case "in": {
|
|
3353
|
+
const items = toArray(value).map(fmtVal);
|
|
3354
|
+
if (!items.length) return "";
|
|
3355
|
+
return `.has('${prop}', within(${items.join(", ")}))`;
|
|
3356
|
+
}
|
|
3357
|
+
case "notin": {
|
|
3358
|
+
const items = toArray(value).map(fmtVal);
|
|
3359
|
+
if (!items.length) return "";
|
|
3360
|
+
return `.has('${prop}', without(${items.join(", ")}))`;
|
|
3361
|
+
}
|
|
3362
|
+
case "between": {
|
|
3363
|
+
const arr = toArray(value);
|
|
3364
|
+
if (arr.length < 2) return "";
|
|
3365
|
+
return `.has('${prop}', between(${fmtVal(arr[0])}, ${fmtVal(arr[1])}))`;
|
|
3366
|
+
}
|
|
3367
|
+
case "notbetween": {
|
|
3368
|
+
const arr = toArray(value);
|
|
3369
|
+
if (arr.length < 2) return "";
|
|
3370
|
+
return `.has('${prop}', outside(${fmtVal(arr[0])}, ${fmtVal(arr[1])}))`;
|
|
3371
|
+
}
|
|
3372
|
+
default: return `.has('${prop}', ${fmtVal(value)})`;
|
|
3373
|
+
}
|
|
3374
|
+
};
|
|
3375
|
+
//#endregion
|
|
3074
3376
|
//#region src/utils/formatQuery/defaultRuleProcessorJSONata.ts
|
|
3075
3377
|
const shouldNegate = (op) => op.startsWith("not") || op.startsWith("doesnot");
|
|
3076
3378
|
const quote = (v, escapeQuotes) => `"${typeof v !== "string" || !escapeQuotes ? `${v}` : v.replaceAll(`"`, `\\"`)}"`;
|
|
@@ -3307,7 +3609,7 @@ const escapeStringValueQuotes = (v, quoteChar, escapeQuotes) => escapeQuotes &&
|
|
|
3307
3609
|
* @group Export
|
|
3308
3610
|
*/
|
|
3309
3611
|
const defaultValueProcessorNL = (rule, opts = {}) => {
|
|
3310
|
-
var _t$or, _t$true, _t$false, _getOption$label3, _getOption3, _ref3;
|
|
3612
|
+
var _t$or, _t$true, _t$false, _t$listSeparator, _getOption$label3, _getOption3, _ref3;
|
|
3311
3613
|
const { escapeQuotes, fields, parseNumbers, quoteFieldNamesWith, quoteValuesWith, fieldIdentifierSeparator, translations } = opts;
|
|
3312
3614
|
const valueIsField = rule.valueSource === "field";
|
|
3313
3615
|
const operatorLowerCase = lc(rule.operator);
|
|
@@ -3323,6 +3625,8 @@ const defaultValueProcessorNL = (rule, opts = {}) => {
|
|
|
3323
3625
|
const orTL = (_t$or = t.or) !== null && _t$or !== void 0 ? _t$or : "or";
|
|
3324
3626
|
const trueTL = (_t$true = t.true) !== null && _t$true !== void 0 ? _t$true : "true";
|
|
3325
3627
|
const falseTL = (_t$false = t.false) !== null && _t$false !== void 0 ? _t$false : "false";
|
|
3628
|
+
const listSep = (_t$listSeparator = t.listSeparator) !== null && _t$listSeparator !== void 0 ? _t$listSeparator : ", ";
|
|
3629
|
+
const useOxfordComma = !t.listSeparator;
|
|
3326
3630
|
switch (operatorLowerCase) {
|
|
3327
3631
|
case "null":
|
|
3328
3632
|
case "notnull": return "";
|
|
@@ -3347,7 +3651,8 @@ const defaultValueProcessorNL = (rule, opts = {}) => {
|
|
|
3347
3651
|
/* v8 ignore start -- @preserve */ [], v)) === null || _getOption2 === void 0 ? void 0 : _getOption2.label) !== null && _getOption$label2 !== void 0 ? _getOption$label2 : v) : shouldRenderAsNumber(v, parseNumbers) ? `${trimIfString(v)}` : `${wrapAndEscape(v)}`;
|
|
3348
3652
|
});
|
|
3349
3653
|
if (valStringArray.length === 1) return valStringArray[0];
|
|
3350
|
-
|
|
3654
|
+
const oxfordComma = useOxfordComma && valStringArray.length > 2 ? "," : "";
|
|
3655
|
+
return `(${`${valStringArray.slice(0, -1).join(listSep)}${oxfordComma} ${orTL} ${valStringArray.at(-1)}`})`;
|
|
3351
3656
|
}
|
|
3352
3657
|
}
|
|
3353
3658
|
if (typeof rule.value === "boolean") return rule.value ? trueTL : falseTL;
|
|
@@ -3419,7 +3724,7 @@ const defaultOperatorProcessorNL = (rule, opts = {}) => {
|
|
|
3419
3724
|
* @group Export
|
|
3420
3725
|
*/
|
|
3421
3726
|
const defaultRuleProcessorNL = (rule, opts) => {
|
|
3422
|
-
var _fieldData$label;
|
|
3727
|
+
var _fieldData$label, _opts$translations, _translations$afterSu, _translations$afterVe, _translations$afterOb;
|
|
3423
3728
|
const { field, operator } = rule;
|
|
3424
3729
|
// v8 ignore next
|
|
3425
3730
|
const { fieldData, quoteFieldNamesWith = ["", ""], fieldIdentifierSeparator = "", quoteValuesWith = `'`, operatorProcessor = defaultOperatorProcessorNL, valueProcessor = defaultValueProcessorNL, concatOperator = "||", wordOrder = "SVO" } = opts !== null && opts !== void 0 ? opts : /* v8 ignore start -- @preserve */ {};
|
|
@@ -3460,7 +3765,14 @@ const defaultRuleProcessorNL = (rule, opts) => {
|
|
|
3460
3765
|
V: operatorProcessor(rule, opts),
|
|
3461
3766
|
O: value
|
|
3462
3767
|
};
|
|
3463
|
-
|
|
3768
|
+
const translations = (_opts$translations = opts === null || opts === void 0 ? void 0 : opts.translations) !== null && _opts$translations !== void 0 ? _opts$translations : {};
|
|
3769
|
+
const suffixMap = {
|
|
3770
|
+
S: (_translations$afterSu = translations.afterSubject) !== null && _translations$afterSu !== void 0 ? _translations$afterSu : " ",
|
|
3771
|
+
V: (_translations$afterVe = translations.afterVerb) !== null && _translations$afterVe !== void 0 ? _translations$afterVe : " ",
|
|
3772
|
+
O: (_translations$afterOb = translations.afterObject) !== null && _translations$afterOb !== void 0 ? _translations$afterOb : " "
|
|
3773
|
+
};
|
|
3774
|
+
const wordOrderTuple = normalizeConstituentWordOrder(wordOrder).filter((term) => wordOrderMap[term] !== "");
|
|
3775
|
+
return wordOrderTuple.map((term, i) => `${wordOrderMap[term]}${i < wordOrderTuple.length - 1 ? suffixMap[term] : ""}`).join("").trim();
|
|
3464
3776
|
};
|
|
3465
3777
|
//#endregion
|
|
3466
3778
|
//#region src/utils/formatQuery/defaultRuleProcessorSQL.ts
|
|
@@ -3686,8 +3998,11 @@ const defaultRuleProcessorSequelize = (rule, { parseNumbers, preserveValueOrder,
|
|
|
3686
3998
|
const valueIsField = valueSource === "field";
|
|
3687
3999
|
const operatorLC = lc(operator);
|
|
3688
4000
|
if (!Op || valueIsField && (!col || !fn && [
|
|
4001
|
+
"contains",
|
|
3689
4002
|
"doesnotcontain",
|
|
4003
|
+
"beginswith",
|
|
3690
4004
|
"doesnotbeginwith",
|
|
4005
|
+
"endswith",
|
|
3691
4006
|
"doesnotendwith"
|
|
3692
4007
|
].includes(operatorLC))) return;
|
|
3693
4008
|
switch (operatorLC) {
|
|
@@ -3707,9 +4022,9 @@ const defaultRuleProcessorSequelize = (rule, { parseNumbers, preserveValueOrder,
|
|
|
3707
4022
|
}[operatorLC];
|
|
3708
4023
|
return { [field]: valueIsField && operatorLC === "=" ? { [Op.col]: value } : { [sequelizeOperator]: valueIsField ? col(value) : shouldRenderAsNumber(value, parseNumbers) ? parseNumber(value, { parseNumbers: "strict" }) : value } };
|
|
3709
4024
|
}
|
|
3710
|
-
case "contains": return { [field]: { [Op.substring]: valueIsField ? col(value) : `${value}` } };
|
|
3711
|
-
case "beginswith": return { [field]: { [Op.startsWith]: valueIsField ? col(value) : `${value}` } };
|
|
3712
|
-
case "endswith": return { [field]: { [Op.endsWith]: valueIsField ? col(value) : `${value}` } };
|
|
4025
|
+
case "contains": return { [field]: { [valueIsField ? Op.like : Op.substring]: valueIsField ? fn("CONCAT", "%", col(value), "%") : `${value}` } };
|
|
4026
|
+
case "beginswith": return { [field]: { [valueIsField ? Op.like : Op.startsWith]: valueIsField ? fn("CONCAT", col(value), "%") : `${value}` } };
|
|
4027
|
+
case "endswith": return { [field]: { [valueIsField ? Op.like : Op.endsWith]: valueIsField ? fn("CONCAT", "%", col(value)) : `${value}` } };
|
|
3713
4028
|
case "doesnotcontain": return { [field]: { [Op.notLike]: valueIsField ? fn("CONCAT", "%", col(value), "%") : `%${value}%` } };
|
|
3714
4029
|
case "doesnotbeginwith": return { [field]: { [Op.notLike]: valueIsField ? fn("CONCAT", col(value), "%") : `${value}%` } };
|
|
3715
4030
|
case "doesnotendwith": return { [field]: { [Op.notLike]: valueIsField ? fn("CONCAT", "%", col(value)) : `%${value}` } };
|
|
@@ -3739,6 +4054,75 @@ const defaultRuleProcessorSequelize = (rule, { parseNumbers, preserveValueOrder,
|
|
|
3739
4054
|
}
|
|
3740
4055
|
};
|
|
3741
4056
|
//#endregion
|
|
4057
|
+
//#region src/utils/formatQuery/defaultRuleProcessorSPARQL.ts
|
|
4058
|
+
const escapeDoubleQuotes = (v, escapeQuotes) => typeof v !== "string" || !escapeQuotes ? `${v}` : v.replaceAll(`"`, `\\"`);
|
|
4059
|
+
/** Auto-prefix a SPARQL variable name with `?` unless it's already prefixed, a URI, or a prefixed name.
|
|
4060
|
+
*
|
|
4061
|
+
* @group Export
|
|
4062
|
+
*/
|
|
4063
|
+
const sparqlVar = (name) => /^[?<]/.test(name) || name.includes(":") ? name : `?${name}`;
|
|
4064
|
+
/**
|
|
4065
|
+
* Default rule processor used by {@link formatQuery} for "sparql" format.
|
|
4066
|
+
*
|
|
4067
|
+
* @group Export
|
|
4068
|
+
*/
|
|
4069
|
+
const defaultRuleProcessorSPARQL = (rule, opts = {}) => {
|
|
4070
|
+
const { escapeQuotes, parseNumbers } = opts;
|
|
4071
|
+
const { field: rawField, operator, value, valueSource } = rule;
|
|
4072
|
+
const valueIsField = valueSource === "field";
|
|
4073
|
+
const operatorTL = operator.toLowerCase();
|
|
4074
|
+
const field = sparqlVar(rawField);
|
|
4075
|
+
const fmtVal = (v) => {
|
|
4076
|
+
var _JSON$stringify;
|
|
4077
|
+
if (v === null || v === void 0) return "\"\"";
|
|
4078
|
+
if (typeof v === "boolean") return `"${v}"^^xsd:boolean`;
|
|
4079
|
+
if (typeof v === "bigint") return String(v);
|
|
4080
|
+
if (valueIsField) return sparqlVar(trimIfString(v));
|
|
4081
|
+
if (typeof v === "number" || shouldRenderAsNumber(v, parseNumbers)) return trimIfString(v);
|
|
4082
|
+
const s = typeof v === "string" ? v : (_JSON$stringify = JSON.stringify(v)) !== null && _JSON$stringify !== void 0 ? _JSON$stringify : "";
|
|
4083
|
+
if (s.startsWith("?") || s.startsWith("<") || s.includes(":")) return s;
|
|
4084
|
+
return `"${escapeDoubleQuotes(s, escapeQuotes)}"`;
|
|
4085
|
+
};
|
|
4086
|
+
switch (operatorTL) {
|
|
4087
|
+
case "=":
|
|
4088
|
+
case "!=":
|
|
4089
|
+
case "<":
|
|
4090
|
+
case ">":
|
|
4091
|
+
case "<=":
|
|
4092
|
+
case ">=": return `${field} ${operatorTL} ${fmtVal(value)}`;
|
|
4093
|
+
case "<>": return `${field} != ${fmtVal(value)}`;
|
|
4094
|
+
case "contains": return `CONTAINS(${field}, ${fmtVal(value)})`;
|
|
4095
|
+
case "doesnotcontain": return `!CONTAINS(${field}, ${fmtVal(value)})`;
|
|
4096
|
+
case "beginswith": return `STRSTARTS(${field}, ${fmtVal(value)})`;
|
|
4097
|
+
case "doesnotbeginwith": return `!STRSTARTS(${field}, ${fmtVal(value)})`;
|
|
4098
|
+
case "endswith": return `STRENDS(${field}, ${fmtVal(value)})`;
|
|
4099
|
+
case "doesnotendwith": return `!STRENDS(${field}, ${fmtVal(value)})`;
|
|
4100
|
+
case "null": return `!BOUND(${field})`;
|
|
4101
|
+
case "notnull": return `BOUND(${field})`;
|
|
4102
|
+
case "in": {
|
|
4103
|
+
const items = toArray(value).map(fmtVal);
|
|
4104
|
+
if (!items.length) return "";
|
|
4105
|
+
return `${field} IN (${items.join(", ")})`;
|
|
4106
|
+
}
|
|
4107
|
+
case "notin": {
|
|
4108
|
+
const items = toArray(value).map(fmtVal);
|
|
4109
|
+
if (!items.length) return "";
|
|
4110
|
+
return `${field} NOT IN (${items.join(", ")})`;
|
|
4111
|
+
}
|
|
4112
|
+
case "between": {
|
|
4113
|
+
const arr = toArray(value);
|
|
4114
|
+
if (arr.length < 2) return "";
|
|
4115
|
+
return `${field} >= ${fmtVal(arr[0])} && ${field} <= ${fmtVal(arr[1])}`;
|
|
4116
|
+
}
|
|
4117
|
+
case "notbetween": {
|
|
4118
|
+
const arr = toArray(value);
|
|
4119
|
+
if (arr.length < 2) return "";
|
|
4120
|
+
return `(${field} < ${fmtVal(arr[0])} || ${field} > ${fmtVal(arr[1])})`;
|
|
4121
|
+
}
|
|
4122
|
+
default: return `${field} ${operator} ${fmtVal(value)}`;
|
|
4123
|
+
}
|
|
4124
|
+
};
|
|
4125
|
+
//#endregion
|
|
3742
4126
|
//#region src/utils/formatQuery/formatQuery.ts
|
|
3743
4127
|
/**
|
|
3744
4128
|
* A collection of option presets for {@link formatQuery}, specifically for SQL-based formats.
|
|
@@ -3786,6 +4170,10 @@ const defaultRuleProcessors = {
|
|
|
3786
4170
|
sequelize: defaultRuleProcessorSequelize,
|
|
3787
4171
|
spel: defaultRuleProcessorSpEL,
|
|
3788
4172
|
sql: defaultRuleProcessorSQL,
|
|
4173
|
+
cypher: defaultRuleProcessorCypher,
|
|
4174
|
+
gql: defaultRuleProcessorCypher,
|
|
4175
|
+
sparql: defaultRuleProcessorSPARQL,
|
|
4176
|
+
gremlin: defaultRuleProcessorGremlin,
|
|
3789
4177
|
diagnostics: defaultRuleProcessorSQL
|
|
3790
4178
|
};
|
|
3791
4179
|
/* v8 ignore next -- @preserve */
|
|
@@ -3808,6 +4196,10 @@ const defaultOperatorProcessors = {
|
|
|
3808
4196
|
sequelize: defaultOperatorProcessor,
|
|
3809
4197
|
spel: defaultOperatorProcessor,
|
|
3810
4198
|
sql: defaultOperatorProcessorSQL,
|
|
4199
|
+
cypher: defaultOperatorProcessor,
|
|
4200
|
+
gql: defaultOperatorProcessor,
|
|
4201
|
+
sparql: defaultOperatorProcessor,
|
|
4202
|
+
gremlin: defaultOperatorProcessor,
|
|
3811
4203
|
diagnostics: defaultOperatorProcessor
|
|
3812
4204
|
};
|
|
3813
4205
|
const defaultFallbackExpressions = {
|
|
@@ -3815,6 +4207,8 @@ const defaultFallbackExpressions = {
|
|
|
3815
4207
|
ldap: "",
|
|
3816
4208
|
mongodb: "\"$and\":[{\"$expr\":true}]",
|
|
3817
4209
|
natural_language: "1 is 1",
|
|
4210
|
+
sparql: "1 = 1",
|
|
4211
|
+
gremlin: "",
|
|
3818
4212
|
spel: "1 == 1",
|
|
3819
4213
|
sql: "(1 = 1)"
|
|
3820
4214
|
};
|
|
@@ -3957,6 +4351,10 @@ function formatQuery(ruleGroup, optionParam = {}) {
|
|
|
3957
4351
|
case "prisma": return defaultRuleGroupProcessorPrisma(ruleGroup, finalOptions);
|
|
3958
4352
|
case "drizzle": return defaultRuleGroupProcessorDrizzle(ruleGroup, finalOptions);
|
|
3959
4353
|
case "sequelize": return defaultRuleGroupProcessorSequelize(ruleGroup, finalOptions);
|
|
4354
|
+
case "cypher":
|
|
4355
|
+
case "gql": return defaultRuleGroupProcessorCypher(ruleGroup, finalOptions);
|
|
4356
|
+
case "sparql": return defaultRuleGroupProcessorSPARQL(ruleGroup, finalOptions);
|
|
4357
|
+
case "gremlin": return defaultRuleGroupProcessorGremlin(ruleGroup, finalOptions);
|
|
3960
4358
|
case "diagnostics": return defaultRuleGroupProcessorDiagnostics(ruleGroup, finalOptions);
|
|
3961
4359
|
default: return "";
|
|
3962
4360
|
}
|
|
@@ -4676,6 +5074,6 @@ const groupInPlace = (query, sourcePathOrID, targetPathOrID, options = {}) => {
|
|
|
4676
5074
|
return query;
|
|
4677
5075
|
};
|
|
4678
5076
|
//#endregion
|
|
4679
|
-
export { LogType, TestID, add, addInPlace, bigIntJsonParseReviver, bigIntJsonStringifyReplacer, celCombinatorMap, clsx, convertFromIC, convertQuery, convertToIC, defaultCELValueProcessor, defaultCombinatorLabelMap, defaultCombinators, defaultCombinatorsExtended, defaultControlClassnames, defaultExportOperatorMap, defaultJoinChar, defaultMatchModes, defaultMongoDBValueProcessor, defaultNLTranslations, defaultOperatorLabelMap, defaultOperatorNegationMap, defaultOperatorProcessorNL, defaultOperatorProcessorSQL, defaultOperators, defaultPlaceholderFieldGroupLabel, defaultPlaceholderFieldLabel, defaultPlaceholderFieldName, defaultPlaceholderLabel, defaultPlaceholderName, defaultPlaceholderOperatorGroupLabel, defaultPlaceholderOperatorLabel, defaultPlaceholderOperatorName, defaultPlaceholderValueGroupLabel, defaultPlaceholderValueLabel, defaultPlaceholderValueName, defaultRuleGroupProcessorCEL, defaultRuleGroupProcessorDiagnostics, defaultRuleGroupProcessorDrizzle, defaultRuleGroupProcessorElasticSearch, defaultRuleGroupProcessorJSONata, defaultRuleGroupProcessorJsonLogic, defaultRuleGroupProcessorLDAP, defaultRuleGroupProcessorMongoDB, defaultRuleGroupProcessorMongoDBQuery, defaultRuleGroupProcessorNL, defaultRuleGroupProcessorParameterized, defaultRuleGroupProcessorPrisma, defaultRuleGroupProcessorSQL, defaultRuleGroupProcessorSequelize, defaultRuleGroupProcessorSpEL, defaultRuleProcessorCEL, defaultRuleProcessorDrizzle, defaultRuleProcessorElasticSearch, defaultRuleProcessorJSONata, defaultRuleProcessorJsonLogic, defaultRuleProcessorLDAP, defaultRuleProcessorMongoDB, defaultRuleProcessorMongoDBQuery, defaultRuleProcessorNL, defaultRuleProcessorParameterized, defaultRuleProcessorPrisma, defaultRuleProcessorSQL, defaultRuleProcessorSequelize, defaultRuleProcessorSpEL, defaultSpELValueProcessor, defaultTranslations, defaultValidator, defaultValueProcessor, defaultValueProcessorByRule, defaultValueProcessorCELByRule, defaultValueProcessorMongoDBByRule, defaultValueProcessorNL, defaultValueProcessorSpELByRule, filterFieldsByComparator, findID, findPath, formatQuery, formatQueryOptionPresets, generateAccessibleDescription, generateID, getCommonAncestorPath, getFirstOption, getMatchModesUtil, getNLTranslataion, getOption, getParentPath, getParseNumberMethod, getPathOfID, getQuoteFieldNamesWithArray, getQuotedFieldName, getValidationClassNames, getValueSourcesUtil, group, groupInPlace, groupInvalidReasons, insert, insertInPlace, isAncestor, isFlexibleOptionArray, isFlexibleOptionGroupArray, isFullOptionArray, isFullOptionGroupArray, isOptionGroupArray, isPojo, isRuleGroup, isRuleGroupType, isRuleGroupTypeIC, isRuleOrGroupValid, isRuleType, isUnsafeKey, isValidValue, isValidationResult, isValueProcessorLegacy, joinWith, jsonLogicAdditionalOperators, lc, mapSQLOperator, mergeAnyTranslation, mergeAnyTranslations, mergeClassnames, mongoDbFallback, mongoOperators, move, moveInPlace, normalizeConstituentWordOrder, nullFreeArray, nullOrUndefinedOrEmpty, numericRegex, numerifyValues, objectEntries, objectKeys, parseNumber, pathIsDisabled, pathsAreEqual, preferAnyProp, preferFlagProps, preferProp, prepareOptionList, prepareRule, prepareRuleGroup, prepareRuleOrGroup, prismaFallback, prismaOperators, processMatchMode, queryBuilderFlagDefaults, regenerateID, regenerateIDs, remove, removeInPlace, rootPath, shouldRenderAsNumber, splitBy, sqlDialectPresets, standardClassnames, toArray, toFlatOptionArray, toFullOption, toFullOptionList, toFullOptionMap, transformQuery, trimIfString, uniqByIdentifier, uniqByName, uniqOptGroups, uniqOptList, update, updateInPlace, uuidV4regex };
|
|
5077
|
+
export { LogType, TestID, add, addInPlace, bigIntJsonParseReviver, bigIntJsonStringifyReplacer, celCombinatorMap, clsx, convertFromIC, convertQuery, convertToIC, cypherCombinatorMap, defaultCELValueProcessor, defaultCombinatorLabelMap, defaultCombinators, defaultCombinatorsExtended, defaultControlClassnames, defaultExportOperatorMap, defaultJoinChar, defaultMatchModes, defaultMongoDBValueProcessor, defaultNLTranslations, defaultOperatorLabelMap, defaultOperatorNegationMap, defaultOperatorProcessorNL, defaultOperatorProcessorSQL, defaultOperators, defaultPlaceholderFieldGroupLabel, defaultPlaceholderFieldLabel, defaultPlaceholderFieldName, defaultPlaceholderLabel, defaultPlaceholderName, defaultPlaceholderOperatorGroupLabel, defaultPlaceholderOperatorLabel, defaultPlaceholderOperatorName, defaultPlaceholderValueGroupLabel, defaultPlaceholderValueLabel, defaultPlaceholderValueName, defaultRuleGroupProcessorCEL, defaultRuleGroupProcessorCypher, defaultRuleGroupProcessorDiagnostics, defaultRuleGroupProcessorDrizzle, defaultRuleGroupProcessorElasticSearch, defaultRuleGroupProcessorGremlin, defaultRuleGroupProcessorJSONata, defaultRuleGroupProcessorJsonLogic, defaultRuleGroupProcessorLDAP, defaultRuleGroupProcessorMongoDB, defaultRuleGroupProcessorMongoDBQuery, defaultRuleGroupProcessorNL, defaultRuleGroupProcessorParameterized, defaultRuleGroupProcessorPrisma, defaultRuleGroupProcessorSPARQL, defaultRuleGroupProcessorSQL, defaultRuleGroupProcessorSequelize, defaultRuleGroupProcessorSpEL, defaultRuleProcessorCEL, defaultRuleProcessorCypher, defaultRuleProcessorDrizzle, defaultRuleProcessorElasticSearch, defaultRuleProcessorGremlin, defaultRuleProcessorJSONata, defaultRuleProcessorJsonLogic, defaultRuleProcessorLDAP, defaultRuleProcessorMongoDB, defaultRuleProcessorMongoDBQuery, defaultRuleProcessorNL, defaultRuleProcessorParameterized, defaultRuleProcessorPrisma, defaultRuleProcessorSPARQL, defaultRuleProcessorSQL, defaultRuleProcessorSequelize, defaultRuleProcessorSpEL, defaultSpELValueProcessor, defaultTranslations, defaultValidator, defaultValueProcessor, defaultValueProcessorByRule, defaultValueProcessorCELByRule, defaultValueProcessorMongoDBByRule, defaultValueProcessorNL, defaultValueProcessorSpELByRule, filterFieldsByComparator, findID, findPath, formatQuery, formatQueryOptionPresets, generateAccessibleDescription, generateID, getCommonAncestorPath, getFirstOption, getMatchModesUtil, getNLTranslataion, getOption, getParentPath, getParseNumberMethod, getPathOfID, getQuoteFieldNamesWithArray, getQuotedFieldName, getValidationClassNames, getValueSourcesUtil, group, groupInPlace, groupInvalidReasons, insert, insertInPlace, isAncestor, isFlexibleOptionArray, isFlexibleOptionGroupArray, isFullOptionArray, isFullOptionGroupArray, isOptionGroupArray, isPojo, isRuleGroup, isRuleGroupType, isRuleGroupTypeIC, isRuleOrGroupValid, isRuleType, isUnsafeKey, isValidValue, isValidationResult, isValueProcessorLegacy, joinWith, jsonLogicAdditionalOperators, lc, mapSQLOperator, mergeAnyTranslation, mergeAnyTranslations, mergeClassnames, mongoDbFallback, mongoOperators, move, moveInPlace, normalizeConstituentWordOrder, nullFreeArray, nullOrUndefinedOrEmpty, numericRegex, numerifyValues, objectEntries, objectKeys, parseNumber, pathIsDisabled, pathsAreEqual, preferAnyProp, preferFlagProps, preferProp, prepareOptionList, prepareRule, prepareRuleGroup, prepareRuleOrGroup, prismaFallback, prismaOperators, processMatchMode, queryBuilderFlagDefaults, regenerateID, regenerateIDs, remove, removeInPlace, rootPath, shouldRenderAsNumber, sparqlVar, splitBy, sqlDialectPresets, standardClassnames, toArray, toFlatOptionArray, toFullOption, toFullOptionList, toFullOptionMap, transformQuery, trimIfString, uniqByIdentifier, uniqByName, uniqOptGroups, uniqOptList, update, updateInPlace, uuidV4regex };
|
|
4680
5078
|
|
|
4681
5079
|
//# sourceMappingURL=react-querybuilder_core.legacy-esm.js.map
|