@react-querybuilder/core 8.14.4 → 8.16.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.
Files changed (123) hide show
  1. package/README.md +114 -53
  2. package/dist/cjs/react-querybuilder_core.cjs.development.d.ts +288 -22
  3. package/dist/cjs/react-querybuilder_core.cjs.development.js +796 -77
  4. package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
  5. package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +288 -22
  6. package/dist/cjs/react-querybuilder_core.cjs.production.js +1 -1
  7. package/dist/cjs/react-querybuilder_core.cjs.production.js.map +1 -1
  8. package/dist/{convertQuery-CeJSNn37.mjs → convertQuery-BeJJH9BI.mjs} +2 -2
  9. package/dist/convertQuery-BeJJH9BI.mjs.map +1 -0
  10. package/dist/{convertQuery-J8LpTG-7.js → convertQuery-Lx2HQa0m.js} +2 -2
  11. package/dist/convertQuery-Lx2HQa0m.js.map +1 -0
  12. package/dist/formatQuery.d.mts +89 -2
  13. package/dist/formatQuery.d.ts +89 -2
  14. package/dist/formatQuery.js +775 -66
  15. package/dist/formatQuery.js.map +1 -1
  16. package/dist/formatQuery.mjs +768 -67
  17. package/dist/formatQuery.mjs.map +1 -1
  18. package/dist/{import-BwQqExpO.d.mts → import-BHlzBLM_.d.mts} +2 -2
  19. package/dist/{import-CrJf23Nf.d.ts → import-C6imciDf.d.ts} +2 -2
  20. package/dist/{index-CYT4Saz-.d.mts → index-Cjapnb-H.d.ts} +161 -10
  21. package/dist/{index-DBlQeLax.d.ts → index-D-Iej37L.d.mts} +161 -10
  22. package/dist/{objectUtils-ButT0Mng.js → objectUtils-Bzug_QfX.js} +2 -2
  23. package/dist/objectUtils-Bzug_QfX.js.map +1 -0
  24. package/dist/{objectUtils-C0WB-8ex.mjs → objectUtils-D96eEEzL.mjs} +2 -2
  25. package/dist/objectUtils-D96eEEzL.mjs.map +1 -0
  26. package/dist/parseCEL.d.mts +2 -2
  27. package/dist/parseCEL.d.ts +2 -2
  28. package/dist/parseCEL.js +35 -35
  29. package/dist/parseCEL.js.map +1 -1
  30. package/dist/parseCEL.mjs +35 -35
  31. package/dist/parseCEL.mjs.map +1 -1
  32. package/dist/parseCypher.d.mts +49 -0
  33. package/dist/parseCypher.d.ts +49 -0
  34. package/dist/parseCypher.js +578 -0
  35. package/dist/parseCypher.js.map +1 -0
  36. package/dist/parseCypher.mjs +575 -0
  37. package/dist/parseCypher.mjs.map +1 -0
  38. package/dist/parseGremlin.d.mts +35 -0
  39. package/dist/parseGremlin.d.ts +35 -0
  40. package/dist/parseGremlin.js +192 -0
  41. package/dist/parseGremlin.js.map +1 -0
  42. package/dist/parseGremlin.mjs +191 -0
  43. package/dist/parseGremlin.mjs.map +1 -0
  44. package/dist/parseJSONata.d.mts +2 -2
  45. package/dist/parseJSONata.d.ts +2 -2
  46. package/dist/parseJSONata.js +11 -11
  47. package/dist/parseJSONata.js.map +1 -1
  48. package/dist/parseJSONata.mjs +11 -11
  49. package/dist/parseJSONata.mjs.map +1 -1
  50. package/dist/parseJsonLogic.d.mts +2 -2
  51. package/dist/parseJsonLogic.d.ts +2 -2
  52. package/dist/parseJsonLogic.js +6 -6
  53. package/dist/parseJsonLogic.js.map +1 -1
  54. package/dist/parseJsonLogic.mjs +6 -6
  55. package/dist/parseJsonLogic.mjs.map +1 -1
  56. package/dist/parseMongoDB.d.mts +2 -2
  57. package/dist/parseMongoDB.d.ts +2 -2
  58. package/dist/parseMongoDB.js +6 -6
  59. package/dist/parseMongoDB.js.map +1 -1
  60. package/dist/parseMongoDB.mjs +6 -6
  61. package/dist/parseMongoDB.mjs.map +1 -1
  62. package/dist/parseSPARQL.d.mts +34 -0
  63. package/dist/parseSPARQL.d.ts +34 -0
  64. package/dist/parseSPARQL.js +253 -0
  65. package/dist/parseSPARQL.js.map +1 -0
  66. package/dist/parseSPARQL.mjs +251 -0
  67. package/dist/parseSPARQL.mjs.map +1 -0
  68. package/dist/parseSQL.d.mts +2 -2
  69. package/dist/parseSQL.d.ts +2 -2
  70. package/dist/parseSQL.js +16 -16
  71. package/dist/parseSQL.js.map +1 -1
  72. package/dist/parseSQL.mjs +16 -16
  73. package/dist/parseSQL.mjs.map +1 -1
  74. package/dist/parseSpEL.d.mts +2 -2
  75. package/dist/parseSpEL.d.ts +2 -2
  76. package/dist/parseSpEL.js +10 -10
  77. package/dist/parseSpEL.js.map +1 -1
  78. package/dist/parseSpEL.mjs +10 -10
  79. package/dist/parseSpEL.mjs.map +1 -1
  80. package/dist/{prepareQueryObjects-DO3qXriW.js → prepareQueryObjects-BoG5Rt8z.js} +6 -6
  81. package/dist/prepareQueryObjects-BoG5Rt8z.js.map +1 -0
  82. package/dist/{prepareQueryObjects-BfMlS4ql.mjs → prepareQueryObjects-uA10ZpZX.mjs} +6 -6
  83. package/dist/prepareQueryObjects-uA10ZpZX.mjs.map +1 -0
  84. package/dist/query-builder.css +1 -1
  85. package/dist/query-builder.css.map +1 -1
  86. package/dist/react-querybuilder_core.d.mts +288 -22
  87. package/dist/react-querybuilder_core.legacy-esm.d.ts +288 -22
  88. package/dist/react-querybuilder_core.legacy-esm.js +833 -108
  89. package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
  90. package/dist/react-querybuilder_core.mjs +788 -78
  91. package/dist/react-querybuilder_core.mjs.map +1 -1
  92. package/dist/react-querybuilder_core.production.d.mts +288 -22
  93. package/dist/react-querybuilder_core.production.mjs +1 -1
  94. package/dist/react-querybuilder_core.production.mjs.map +1 -1
  95. package/dist/styles/_main.scss +4 -0
  96. package/dist/transformQuery.d.mts +1 -1
  97. package/dist/transformQuery.d.ts +1 -1
  98. package/dist/transformQuery.js +1 -1
  99. package/dist/transformQuery.mjs +1 -1
  100. package/dist/{utils-BlMGIhvx.mjs → utils-ChLG90DP.mjs} +3 -3
  101. package/dist/utils-ChLG90DP.mjs.map +1 -0
  102. package/dist/{utils-CZRhzje-.js → utils-Qwkq2Q0F.js} +3 -3
  103. package/dist/utils-Qwkq2Q0F.js.map +1 -0
  104. package/formatQuery/package.json +1 -1
  105. package/package.json +53 -14
  106. package/parseCEL/package.json +1 -1
  107. package/parseCypher/package.json +4 -0
  108. package/parseGremlin/package.json +4 -0
  109. package/parseJSONata/package.json +1 -1
  110. package/parseJsonLogic/package.json +1 -1
  111. package/parseMongoDB/package.json +1 -1
  112. package/parseSPARQL/package.json +4 -0
  113. package/parseSQL/package.json +1 -1
  114. package/parseSpEL/package.json +1 -1
  115. package/transformQuery/package.json +1 -1
  116. package/dist/convertQuery-CeJSNn37.mjs.map +0 -1
  117. package/dist/convertQuery-J8LpTG-7.js.map +0 -1
  118. package/dist/objectUtils-ButT0Mng.js.map +0 -1
  119. package/dist/objectUtils-C0WB-8ex.mjs.map +0 -1
  120. package/dist/prepareQueryObjects-BfMlS4ql.mjs.map +0 -1
  121. package/dist/prepareQueryObjects-DO3qXriW.js.map +0 -1
  122. package/dist/utils-BlMGIhvx.mjs.map +0 -1
  123. package/dist/utils-CZRhzje-.js.map +0 -1
@@ -413,6 +413,8 @@ const standardClassnames = {
413
413
  dndCopy: "dndCopy",
414
414
  dndGroup: "dndGroup",
415
415
  dndDropNotAllowed: "dndDropNotAllowed",
416
+ dndPreviewPosition: "dndPreviewPosition",
417
+ dndHidden: "dndHidden",
416
418
  dragHandle: "queryBuilder-dragHandle",
417
419
  disabled: "queryBuilder-disabled",
418
420
  muted: "queryBuilder-muted",
@@ -469,6 +471,8 @@ const defaultControlClassnames = {
469
471
  dndGroup: "",
470
472
  dndCopy: "",
471
473
  dndDropNotAllowed: "",
474
+ dndPreviewPosition: "",
475
+ dndHidden: "",
472
476
  disabled: "",
473
477
  valueListItem: "",
474
478
  branches: "",
@@ -613,7 +617,7 @@ const toArray = (a, { retainEmptyStrings } = {}) => Array.isArray(a) ? a.map((v)
613
617
  const nullFreeArray = (arr) => arr.every((el) => el === false || (el ?? false) !== false);
614
618
  //#endregion
615
619
  //#region src/utils/clsx.ts
616
- // istanbul ignore next
620
+ /* v8 ignore start -- @preserve */
617
621
  function toVal(mix) {
618
622
  let k;
619
623
  let y;
@@ -633,12 +637,13 @@ function toVal(mix) {
633
637
  }
634
638
  return str;
635
639
  }
640
+ /* v8 ignore stop -- @preserve */
636
641
  /**
637
642
  * Vendored/adapted version of the `clsx` package.
638
643
  *
639
644
  * **NOTE:** Prefer the official package from npm outside the context of React Query Builder.
640
645
  */
641
- // istanbul ignore next
646
+ // v8 ignore next
642
647
  function clsx(...args) {
643
648
  let i = 0;
644
649
  let tmp;
@@ -656,7 +661,7 @@ function clsx(...args) {
656
661
  /**
657
662
  * Converts a value to lowercase if it's a string, otherwise returns the value as is.
658
663
  */
659
- // istanbul ignore next
664
+ // v8 ignore next
660
665
  const lc = (v) => typeof v === "string" ? v.toLowerCase() : v;
661
666
  /**
662
667
  * Regex matching numeric strings. Passes for positive/negative integers, decimals,
@@ -784,8 +789,9 @@ const defaultValidator = (query) => {
784
789
  * Replace this with your custom rule validator.
785
790
  */
786
791
  const validateRule = (rule) => {
787
- // istanbul ignore else
792
+ /* v8 ignore start -- @preserve */
788
793
  if (rule.id) result[rule.id];
794
+ /* v8 ignore stop -- @preserve */
789
795
  };
790
796
  const validateGroup = (rg) => {
791
797
  const reasons = [];
@@ -796,7 +802,7 @@ const defaultValidator = (query) => {
796
802
  if (invalidICs) reasons.push(groupInvalidReasons.invalidIndependentCombinators);
797
803
  }
798
804
  if (isRuleGroupType(rg) && !defaultCombinators.map((c) => c.name).includes(rg.combinator) && rg.rules.length > 1) reasons.push(groupInvalidReasons.invalidCombinator);
799
- /* istanbul ignore else */
805
+ /* v8 ignore else -- @preserve */
800
806
  if (rg.id) result[rg.id] = reasons.length > 0 ? {
801
807
  valid: false,
802
808
  reasons
@@ -957,7 +963,7 @@ function getFirstOption(arr) {
957
963
  if (!Array.isArray(arr) || arr.length === 0) return null;
958
964
  else if (isFlexibleOptionGroupArray(arr, { allowEmpty: true })) {
959
965
  for (const og of arr) if (og.options.length > 0) return og.options[0].value ?? og.options[0].name;
960
- // istanbul ignore next
966
+ // v8 ignore next
961
967
  return null;
962
968
  }
963
969
  return arr[0].value ?? arr[0].name;
@@ -1004,7 +1010,7 @@ const uniqOptList = (originalArray) => {
1004
1010
  return uniqByIdentifier(originalArray.map((o) => toFullOption(o)));
1005
1011
  };
1006
1012
  const prepareOptionList = (props) => {
1007
- // istanbul ignore next
1013
+ // v8 ignore next
1008
1014
  const { optionList: optionListPropOriginal, baseOption = {}, labelMap = {}, placeholder: { placeholderName = "~", placeholderLabel = defaultPlaceholderLabel, placeholderGroupLabel = defaultPlaceholderLabel } = {}, autoSelectOption = true } = props;
1009
1015
  const defaultOption = {
1010
1016
  id: placeholderName,
@@ -1152,7 +1158,7 @@ const isRuleOrGroupValid = (rg, validationResult, validator) => {
1152
1158
  if (typeof validator === "function" && !isRuleGroup(rg)) {
1153
1159
  const vr = validator(rg);
1154
1160
  if (typeof vr === "boolean") return vr;
1155
- // istanbul ignore else
1161
+ // v8 ignore else
1156
1162
  if (isValidationResult(vr)) return vr.valid;
1157
1163
  }
1158
1164
  return true;
@@ -1271,7 +1277,7 @@ const numerifyValues = (rg, options) => ({
1271
1277
  };
1272
1278
  const valAsArray = toArray(r.value, { retainEmptyStrings: true }).map((v) => parseNumber(v, { parseNumbers }));
1273
1279
  if (valAsArray.every((v) => typeof v === "number")) {
1274
- // istanbul ignore else
1280
+ // v8 ignore else
1275
1281
  if (valAsArray.length > 1) return {
1276
1282
  ...r,
1277
1283
  value: valAsArray
@@ -1476,7 +1482,7 @@ const defaultRuleGroupProcessorCEL = (ruleGroup, options) => {
1476
1482
  //#endregion
1477
1483
  //#region src/utils/formatQuery/defaultRuleProcessorCEL.ts
1478
1484
  const shouldNegate$2 = (op) => op.startsWith("not") || op.startsWith("doesnot");
1479
- const escapeDoubleQuotes = (v, escapeQuotes) => typeof v !== "string" || !escapeQuotes ? `${v}` : v.replaceAll(`"`, `\\"`);
1485
+ const escapeDoubleQuotes$1 = (v, escapeQuotes) => typeof v !== "string" || !escapeQuotes ? `${v}` : v.replaceAll(`"`, `\\"`);
1480
1486
  /**
1481
1487
  * Default rule processor used by {@link formatQuery} for "cel" format.
1482
1488
  *
@@ -1518,19 +1524,19 @@ const defaultRuleProcessorCEL = (rule, opts = {}) => {
1518
1524
  case "==":
1519
1525
  case "!=":
1520
1526
  case ">":
1521
- case ">=": return `${field} ${operatorTL} ${valueIsField || useBareValue ? trimIfString(value) : `"${escapeDoubleQuotes(value, escapeQuotes)}"`}`;
1527
+ case ">=": return `${field} ${operatorTL} ${valueIsField || useBareValue ? trimIfString(value) : `"${escapeDoubleQuotes$1(value, escapeQuotes)}"`}`;
1522
1528
  case "contains":
1523
- case "doesnotcontain": return `${shouldNegate$2(operatorTL) ? "!" : ""}${field}.contains(${valueIsField ? trimIfString(value) : `"${escapeDoubleQuotes(value, escapeQuotes)}"`})`;
1529
+ case "doesnotcontain": return `${shouldNegate$2(operatorTL) ? "!" : ""}${field}.contains(${valueIsField ? trimIfString(value) : `"${escapeDoubleQuotes$1(value, escapeQuotes)}"`})`;
1524
1530
  case "beginswith":
1525
- case "doesnotbeginwith": return `${shouldNegate$2(operatorTL) ? "!" : ""}${field}.startsWith(${valueIsField ? trimIfString(value) : `"${escapeDoubleQuotes(value, escapeQuotes)}"`})`;
1531
+ case "doesnotbeginwith": return `${shouldNegate$2(operatorTL) ? "!" : ""}${field}.startsWith(${valueIsField ? trimIfString(value) : `"${escapeDoubleQuotes$1(value, escapeQuotes)}"`})`;
1526
1532
  case "endswith":
1527
- case "doesnotendwith": return `${shouldNegate$2(operatorTL) ? "!" : ""}${field}.endsWith(${valueIsField ? trimIfString(value) : `"${escapeDoubleQuotes(value, escapeQuotes)}"`})`;
1533
+ case "doesnotendwith": return `${shouldNegate$2(operatorTL) ? "!" : ""}${field}.endsWith(${valueIsField ? trimIfString(value) : `"${escapeDoubleQuotes$1(value, escapeQuotes)}"`})`;
1528
1534
  case "null": return `${field} == null`;
1529
1535
  case "notnull": return `${field} != null`;
1530
1536
  case "in":
1531
1537
  case "notin": {
1532
1538
  const [prefix, suffix] = shouldNegate$2(operatorTL) ? ["!(", ")"] : ["", ""];
1533
- return `${prefix}${field} in [${toArray(value).map((val) => valueIsField || shouldRenderAsNumber(val, parseNumbers) ? `${trimIfString(val)}` : `"${escapeDoubleQuotes(val, escapeQuotes)}"`).join(", ")}]${suffix}`;
1539
+ return `${prefix}${field} in [${toArray(value).map((val) => valueIsField || shouldRenderAsNumber(val, parseNumbers) ? `${trimIfString(val)}` : `"${escapeDoubleQuotes$1(val, escapeQuotes)}"`).join(", ")}]${suffix}`;
1534
1540
  }
1535
1541
  case "between":
1536
1542
  case "notbetween": {
@@ -1540,8 +1546,8 @@ const defaultRuleProcessorCEL = (rule, opts = {}) => {
1540
1546
  const shouldParseNumbers = !(parseNumbers === false);
1541
1547
  const firstNum = shouldRenderAsNumber(first, shouldParseNumbers) ? parseNumber(first, { parseNumbers: shouldParseNumbers }) : NaN;
1542
1548
  const secondNum = shouldRenderAsNumber(second, shouldParseNumbers) ? parseNumber(second, { parseNumbers: shouldParseNumbers }) : NaN;
1543
- let firstValue = Number.isNaN(firstNum) ? valueIsField ? `${first}` : `"${escapeDoubleQuotes(first, escapeQuotes)}"` : firstNum;
1544
- let secondValue = Number.isNaN(secondNum) ? valueIsField ? `${second}` : `"${escapeDoubleQuotes(second, escapeQuotes)}"` : secondNum;
1549
+ let firstValue = Number.isNaN(firstNum) ? valueIsField ? `${first}` : `"${escapeDoubleQuotes$1(first, escapeQuotes)}"` : firstNum;
1550
+ let secondValue = Number.isNaN(secondNum) ? valueIsField ? `${second}` : `"${escapeDoubleQuotes$1(second, escapeQuotes)}"` : secondNum;
1545
1551
  if (!preserveValueOrder && firstValue === firstNum && secondValue === secondNum && secondNum < firstNum) {
1546
1552
  const tempNum = secondNum;
1547
1553
  secondValue = firstNum;
@@ -1797,7 +1803,7 @@ const defaultRuleGroupProcessorSpEL = (ruleGroup, options) => {
1797
1803
  //#region src/utils/formatQuery/defaultRuleProcessorSpEL.ts
1798
1804
  const shouldNegate$1 = (op) => op.startsWith("not") || op.startsWith("doesnot");
1799
1805
  const wrapInNegation = (clause, negate) => negate ? `!(${clause})` : clause;
1800
- const escapeSingleQuotes = (v, escapeQuotes) => typeof v !== "string" || !escapeQuotes ? `${v}` : v.replaceAll(`'`, `\\'`);
1806
+ const escapeSingleQuotes$2 = (v, escapeQuotes) => typeof v !== "string" || !escapeQuotes ? `${v}` : v.replaceAll(`'`, `\\'`);
1801
1807
  /**
1802
1808
  * Default rule processor used by {@link formatQuery} for "spel" format.
1803
1809
  *
@@ -1838,20 +1844,20 @@ const defaultRuleProcessorSpEL = (rule, opts = {}) => {
1838
1844
  case "==":
1839
1845
  case "!=":
1840
1846
  case ">":
1841
- case ">=": return `${field} ${operatorTL} ${valueIsField || useBareValue ? trimIfString(value) : `'${escapeSingleQuotes(value, escapeQuotes)}'`}`;
1847
+ case ">=": return `${field} ${operatorTL} ${valueIsField || useBareValue ? trimIfString(value) : `'${escapeSingleQuotes$2(value, escapeQuotes)}'`}`;
1842
1848
  case "contains":
1843
- case "doesnotcontain": return wrapInNegation(`${field} matches ${valueIsField || useBareValue ? trimIfString(value) : `'${escapeSingleQuotes(value, escapeQuotes)}'`}`, shouldNegate$1(operatorTL));
1849
+ case "doesnotcontain": return wrapInNegation(`${field} matches ${valueIsField || useBareValue ? trimIfString(value) : `'${escapeSingleQuotes$2(value, escapeQuotes)}'`}`, shouldNegate$1(operatorTL));
1844
1850
  case "beginswith":
1845
- case "doesnotbeginwith": return wrapInNegation(`${field} matches ${valueIsField ? `'^'.concat(${trimIfString(value)})` : `'${typeof value === "string" && !value.startsWith("^") || useBareValue ? "^" : ""}${escapeSingleQuotes(value, escapeQuotes)}'`}`, shouldNegate$1(operatorTL));
1851
+ case "doesnotbeginwith": return wrapInNegation(`${field} matches ${valueIsField ? `'^'.concat(${trimIfString(value)})` : `'${typeof value === "string" && !value.startsWith("^") || useBareValue ? "^" : ""}${escapeSingleQuotes$2(value, escapeQuotes)}'`}`, shouldNegate$1(operatorTL));
1846
1852
  case "endswith":
1847
- case "doesnotendwith": return wrapInNegation(`${field} matches ${valueIsField ? `${trimIfString(value)}.concat('$')` : `'${escapeSingleQuotes(value, escapeQuotes)}${typeof value === "string" && !value.endsWith("$") || useBareValue ? "$" : ""}'`}`, shouldNegate$1(operatorTL));
1853
+ case "doesnotendwith": return wrapInNegation(`${field} matches ${valueIsField ? `${trimIfString(value)}.concat('$')` : `'${escapeSingleQuotes$2(value, escapeQuotes)}${typeof value === "string" && !value.endsWith("$") || useBareValue ? "$" : ""}'`}`, shouldNegate$1(operatorTL));
1848
1854
  case "null": return `${field} == null`;
1849
1855
  case "notnull": return `${field} != null`;
1850
1856
  case "in":
1851
1857
  case "notin": {
1852
1858
  const negate = shouldNegate$1(operatorTL) ? "!" : "";
1853
1859
  const valueAsArray = toArray(value);
1854
- return valueAsArray.length > 0 ? `${negate}(${valueAsArray.map((val) => `${field} == ${valueIsField || shouldRenderAsNumber(val, parseNumbers) ? `${trimIfString(val)}` : `'${escapeSingleQuotes(val, escapeQuotes)}'`}`).join(" or ")})` : "";
1860
+ return valueAsArray.length > 0 ? `${negate}(${valueAsArray.map((val) => `${field} == ${valueIsField || shouldRenderAsNumber(val, parseNumbers) ? `${trimIfString(val)}` : `'${escapeSingleQuotes$2(val, escapeQuotes)}'`}`).join(" or ")})` : "";
1855
1861
  }
1856
1862
  case "between":
1857
1863
  case "notbetween": {
@@ -1861,8 +1867,8 @@ const defaultRuleProcessorSpEL = (rule, opts = {}) => {
1861
1867
  const shouldParseNumbers = !(parseNumbers === false);
1862
1868
  const firstNum = shouldRenderAsNumber(first, shouldParseNumbers) ? parseNumber(first, { parseNumbers: shouldParseNumbers }) : NaN;
1863
1869
  const secondNum = shouldRenderAsNumber(second, shouldParseNumbers) ? parseNumber(second, { parseNumbers: shouldParseNumbers }) : NaN;
1864
- let firstValue = Number.isNaN(firstNum) ? valueIsField ? `${first}` : `'${escapeSingleQuotes(first, escapeQuotes)}'` : firstNum;
1865
- let secondValue = Number.isNaN(secondNum) ? valueIsField ? `${second}` : `'${escapeSingleQuotes(second, escapeQuotes)}'` : secondNum;
1870
+ let firstValue = Number.isNaN(firstNum) ? valueIsField ? `${first}` : `'${escapeSingleQuotes$2(first, escapeQuotes)}'` : firstNum;
1871
+ let secondValue = Number.isNaN(secondNum) ? valueIsField ? `${second}` : `'${escapeSingleQuotes$2(second, escapeQuotes)}'` : secondNum;
1866
1872
  if (!preserveValueOrder && firstValue === firstNum && secondValue === secondNum && secondNum < firstNum) {
1867
1873
  const tempNum = secondNum;
1868
1874
  secondValue = firstNum;
@@ -1930,6 +1936,70 @@ const defaultValueProcessorByRule = ({ operator, value, valueSource }, { escapeQ
1930
1936
  return valueIsField ? wrapFieldName(value) : shouldRenderAsNumber(value, parseNumbers) ? `${trimIfString(value)}` : `${wrapAndEscape(value)}`;
1931
1937
  };
1932
1938
  //#endregion
1939
+ //#region src/utils/formatQuery/defaultRuleGroupProcessorCypher.ts
1940
+ /**
1941
+ * Maps a {@link DefaultCombinatorName} to a Cypher combinator keyword.
1942
+ *
1943
+ * @group Export
1944
+ */
1945
+ const cypherCombinatorMap = {
1946
+ and: "AND",
1947
+ or: "OR"
1948
+ };
1949
+ /**
1950
+ * Rule group processor used by {@link formatQuery} for "cypher" and "gql" formats.
1951
+ *
1952
+ * @group Export
1953
+ */
1954
+ const defaultRuleGroupProcessorCypher = (ruleGroup, options) => {
1955
+ const { fields, fallbackExpression, getParseNumberBoolean, placeholderFieldName, placeholderOperatorName, placeholderValueName, ruleProcessor, validateRule, validationMap } = options;
1956
+ const processRuleGroup = (rg, outermost) => {
1957
+ if (!isRuleOrGroupValid(rg, validationMap[rg.id ?? ""])) return outermost ? fallbackExpression : "";
1958
+ const processedRules = [];
1959
+ let precedingCombinator = "";
1960
+ let firstRule = true;
1961
+ for (const rule of rg.rules) {
1962
+ if (typeof rule === "string") {
1963
+ precedingCombinator = cypherCombinatorMap[rule];
1964
+ continue;
1965
+ }
1966
+ if (isRuleGroup(rule)) {
1967
+ const processedGroup = processRuleGroup(rule);
1968
+ if (processedGroup) {
1969
+ if (!firstRule && precedingCombinator) {
1970
+ processedRules.push(precedingCombinator);
1971
+ precedingCombinator = "";
1972
+ }
1973
+ firstRule = false;
1974
+ processedRules.push(processedGroup);
1975
+ }
1976
+ continue;
1977
+ }
1978
+ const [validationResult, fieldValidator] = validateRule(rule);
1979
+ if (!isRuleOrGroupValid(rule, validationResult, fieldValidator) || rule.field === placeholderFieldName || rule.operator === placeholderOperatorName || placeholderValueName !== void 0 && rule.value === placeholderValueName) continue;
1980
+ const fieldData = getOption(fields, rule.field);
1981
+ const processedRule = ruleProcessor(rule, {
1982
+ ...options,
1983
+ parseNumbers: getParseNumberBoolean(fieldData?.inputType),
1984
+ escapeQuotes: (rule.valueSource ?? "value") === "value",
1985
+ fieldData
1986
+ });
1987
+ if (processedRule) {
1988
+ if (!firstRule && precedingCombinator) {
1989
+ processedRules.push(precedingCombinator);
1990
+ precedingCombinator = "";
1991
+ }
1992
+ firstRule = false;
1993
+ processedRules.push(processedRule);
1994
+ }
1995
+ }
1996
+ const expression = processedRules.join(isRuleGroupType(rg) ? ` ${cypherCombinatorMap[rg.combinator]} ` : " ");
1997
+ const [prefix, suffix] = rg.not || !outermost ? [`${rg.not ? "NOT " : ""}(`, ")"] : ["", ""];
1998
+ return expression ? `${prefix}${expression}${suffix}` : fallbackExpression;
1999
+ };
2000
+ return processRuleGroup(ruleGroup, true);
2001
+ };
2002
+ //#endregion
1933
2003
  //#region src/utils/formatQuery/defaultRuleProcessorDrizzle.ts
1934
2004
  /**
1935
2005
  * Default rule processor used by {@link formatQuery} for the "drizzle" format.
@@ -1937,22 +2007,22 @@ const defaultValueProcessorByRule = ({ operator, value, valueSource }, { escapeQ
1937
2007
  * @group Export
1938
2008
  */
1939
2009
  const defaultRuleProcessorDrizzle = (rule, _options) => {
1940
- const opts = _options ?? ( /* istanbul ignore next */ {});
1941
- // istanbul ignore next
2010
+ const opts = _options ?? ( /* v8 ignore start -- @preserve */ {});
2011
+ // v8 ignore next
1942
2012
  const { parseNumbers, preserveValueOrder, context = {} } = opts;
1943
2013
  const { columns, drizzleOperators, useRawFields } = context;
1944
- if (!columns || !drizzleOperators) return;
2014
+ if (!columns || !drizzleOperators) return void 0;
1945
2015
  const { between, eq, gt, gte, inArray, isNotNull, isNull, like, lt, lte, ne, notBetween, notInArray, notLike, sql } = drizzleOperators;
1946
2016
  const { field, operator, value, valueSource } = rule;
1947
2017
  const column = useRawFields && /[a-z][a-z0-9]*/i.test(field) ? sql.raw(field) : columns[field];
1948
2018
  const operatorLC = lc(operator);
1949
2019
  const valueIsField = valueSource === "field";
1950
2020
  const asFieldOrValue = (v) => valueIsField ? columns[v] : v;
1951
- if (!column) return;
2021
+ if (!column) return void 0;
1952
2022
  const matchEval = processMatchMode(rule);
1953
2023
  if (matchEval === false) return;
1954
2024
  else if (matchEval) {
1955
- if (opts.preset !== "postgresql") return;
2025
+ if (opts.preset !== "postgresql") return void 0;
1956
2026
  const { mode, threshold } = matchEval;
1957
2027
  const arrayElementAlias = "elem_alias";
1958
2028
  const nestedArrayFilter = defaultRuleGroupProcessorDrizzle(transformQuery(rule.value, { ruleProcessor: (r) => ({
@@ -2041,7 +2111,7 @@ const defaultRuleProcessorDrizzle = (rule, _options) => {
2041
2111
  */
2042
2112
  const defaultRuleGroupProcessorDrizzle = (ruleGroup, options, _meta) => (columns, drizzleOperators) => {
2043
2113
  const { fields, getParseNumberBoolean, placeholderFieldName, placeholderOperatorName, placeholderValueName, validateRule, validationMap } = options;
2044
- if (!columns || !drizzleOperators) return;
2114
+ if (!columns || !drizzleOperators) return void 0;
2045
2115
  const { and, not, or } = drizzleOperators;
2046
2116
  const ruleProcessor = defaultRuleProcessorDrizzle;
2047
2117
  const processRuleGroup = (rg, _outermost) => {
@@ -2097,6 +2167,67 @@ const defaultRuleGroupProcessorElasticSearch = (ruleGroup, options) => {
2097
2167
  return processedRuleGroup === false ? {} : processedRuleGroup;
2098
2168
  };
2099
2169
  //#endregion
2170
+ //#region src/utils/formatQuery/defaultRuleGroupProcessorGremlin.ts
2171
+ /**
2172
+ * Rule group processor used by {@link formatQuery} for "gremlin" format.
2173
+ *
2174
+ * At the top level, filter rules produce chained `.has()` steps (implicit AND).
2175
+ * Nested groups use `.and()` / `.or()` / `.not()` compound traversals with
2176
+ * `__` anonymous traversal prefixes.
2177
+ *
2178
+ * @group Export
2179
+ */
2180
+ const defaultRuleGroupProcessorGremlin = (ruleGroup, options) => {
2181
+ const { fields, fallbackExpression, getParseNumberBoolean, placeholderFieldName, placeholderOperatorName, placeholderValueName, ruleProcessor, validateRule, validationMap } = options;
2182
+ const validateAndProcess = (rule) => {
2183
+ // v8 ignore next -- @preserve
2184
+ if (typeof rule === "string" || isRuleGroup(rule)) return void 0;
2185
+ const [validationResult, fieldValidator] = validateRule(rule);
2186
+ if (!isRuleOrGroupValid(rule, validationResult, fieldValidator) || rule.field === placeholderFieldName || rule.operator === placeholderOperatorName || placeholderValueName !== void 0 && rule.value === placeholderValueName) return;
2187
+ const fieldData = getOption(fields, rule.field);
2188
+ return ruleProcessor(rule, {
2189
+ ...options,
2190
+ parseNumbers: getParseNumberBoolean(fieldData?.inputType),
2191
+ escapeQuotes: (rule.valueSource ?? "value") === "value",
2192
+ fieldData
2193
+ });
2194
+ };
2195
+ /** Recursively processes a nested group into `.and()`/`.or()`/`.not()` form. */
2196
+ const processNested = (rg) => {
2197
+ if (!isRuleOrGroupValid(rg, validationMap[rg.id ?? ""])) return "";
2198
+ const predicates = [];
2199
+ for (const rule of rg.rules) {
2200
+ if (typeof rule === "string") continue;
2201
+ if (isRuleGroup(rule)) {
2202
+ const nested = processNested(rule);
2203
+ if (nested) predicates.push(nested);
2204
+ continue;
2205
+ }
2206
+ const processed = validateAndProcess(rule);
2207
+ if (processed) predicates.push(processed);
2208
+ }
2209
+ if (predicates.length === 0) return "";
2210
+ const combinator = rg.combinator ?? "and";
2211
+ const prefix = rg.not ? "not" : combinator;
2212
+ if (predicates.length === 1 && !rg.not) return predicates[0];
2213
+ return `.${prefix}(${predicates.map((p) => p.startsWith(".") ? `__${p}` : p).join(", ")})`;
2214
+ };
2215
+ if (!isRuleOrGroupValid(ruleGroup, validationMap[ruleGroup.id ?? ""])) return fallbackExpression;
2216
+ const steps = [];
2217
+ for (const rule of ruleGroup.rules) {
2218
+ if (typeof rule === "string") continue;
2219
+ if (isRuleGroup(rule)) {
2220
+ const compound = processNested(rule);
2221
+ if (compound) steps.push(compound);
2222
+ continue;
2223
+ }
2224
+ const processed = validateAndProcess(rule);
2225
+ if (processed) steps.push(processed);
2226
+ }
2227
+ if (steps.length === 0) return fallbackExpression;
2228
+ return steps.join("");
2229
+ };
2230
+ //#endregion
2100
2231
  //#region src/utils/formatQuery/defaultRuleGroupProcessorJSONata.ts
2101
2232
  /**
2102
2233
  * Rule group processor used by {@link formatQuery} for "jsonata" format.
@@ -2260,7 +2391,7 @@ const defaultRuleGroupProcessorMongoDB = (ruleGroup, options, meta) => {
2260
2391
  const defaultRuleGroupProcessorNL = (ruleGroup, options) => {
2261
2392
  const { fields, fallbackExpression, getParseNumberBoolean, placeholderFieldName, placeholderOperatorName, placeholderValueName, ruleProcessor, translations, validateRule, validationMap } = options;
2262
2393
  const processRuleGroup = (rg, outermostOrLonelyInGroup) => {
2263
- if (!isRuleOrGroupValid(rg, validationMap[rg.id ?? ""])) return outermostOrLonelyInGroup ? fallbackExpression : "";
2394
+ if (!isRuleOrGroupValid(rg, validationMap[rg.id ?? ""])) return outermostOrLonelyInGroup ? fallbackExpression : /* v8 ignore next -- @preserve */ "";
2264
2395
  const rg2 = isRuleGroupTypeIC(rg) && rg.rules.some((r) => typeof r === "string" && lc(r) === "xor") ? convertFromIC(rg) : rg;
2265
2396
  const processedRules = [];
2266
2397
  let precedingCombinator = "";
@@ -2272,7 +2403,7 @@ const defaultRuleGroupProcessorNL = (ruleGroup, options) => {
2272
2403
  }
2273
2404
  if (isRuleGroup(rule)) {
2274
2405
  const processedGroup = processRuleGroup(rule, rg2.rules.length === 1 && !(rg2.not || /^xor$/i.test(rg2.combinator ?? "")));
2275
- // istanbul ignore else
2406
+ // v8 ignore else
2276
2407
  if (processedGroup) {
2277
2408
  if (!firstRule && precedingCombinator) {
2278
2409
  processedRules.push(precedingCombinator);
@@ -2348,7 +2479,7 @@ const defaultRuleGroupProcessorParameterized = (ruleGroup, options) => {
2348
2479
  if (!isPojo(processedRule)) return "";
2349
2480
  const { sql, params: customParams } = processedRule;
2350
2481
  if (typeof sql !== "string" || !sql) return "";
2351
- // istanbul ignore else
2482
+ // v8 ignore else
2352
2483
  if (format === "parameterized" && Array.isArray(customParams)) params.push(...customParams);
2353
2484
  else if (format === "parameterized_named" && isPojo(customParams)) {
2354
2485
  Object.assign(paramsNamed, customParams);
@@ -2357,7 +2488,7 @@ const defaultRuleGroupProcessorParameterized = (ruleGroup, options) => {
2357
2488
  return sql;
2358
2489
  };
2359
2490
  const processRuleGroup = (rg, outermostOrLonelyInGroup) => {
2360
- if (!isRuleOrGroupValid(rg, validationMap[rg.id ?? ""])) return outermostOrLonelyInGroup ? fallbackExpression : "";
2491
+ if (!isRuleOrGroupValid(rg, validationMap[rg.id ?? ""])) return outermostOrLonelyInGroup ? fallbackExpression : /* v8 ignore next -- @preserve */ "";
2361
2492
  const processedRules = [];
2362
2493
  let precedingCombinator = "";
2363
2494
  let firstRule = true;
@@ -2368,7 +2499,7 @@ const defaultRuleGroupProcessorParameterized = (ruleGroup, options) => {
2368
2499
  }
2369
2500
  if (isRuleGroup(rule)) {
2370
2501
  const processedGroup = processRuleGroup(rule, rg.rules.length === 1);
2371
- // istanbul ignore else
2502
+ // v8 ignore else
2372
2503
  if (processedGroup) {
2373
2504
  if (!firstRule && precedingCombinator) {
2374
2505
  processedRules.push(precedingCombinator);
@@ -2451,10 +2582,10 @@ const defaultRuleGroupProcessorPrisma = (ruleGroup, options) => {
2451
2582
  * @group Export
2452
2583
  */
2453
2584
  const defaultRuleGroupProcessorSequelize = (ruleGroup, options) => {
2454
- // istanbul ignore next
2585
+ // v8 ignore next
2455
2586
  const { fields, getParseNumberBoolean, placeholderFieldName, placeholderOperatorName, placeholderValueName, ruleProcessor, validateRule, validationMap, context = {} } = options;
2456
2587
  const { sequelizeOperators: Op } = context;
2457
- if (!Op) return;
2588
+ if (!Op) return void 0;
2458
2589
  const processRuleGroup = (rg, _outermost) => {
2459
2590
  if (!isRuleOrGroupValid(rg, validationMap[rg.id ?? ""])) return;
2460
2591
  const combinator = rg.combinator.toUpperCase();
@@ -2477,13 +2608,70 @@ const defaultRuleGroupProcessorSequelize = (ruleGroup, options) => {
2477
2608
  fieldData
2478
2609
  });
2479
2610
  }).filter(Boolean);
2480
- if (expressions.length === 0) return;
2611
+ if (expressions.length === 0) return void 0;
2481
2612
  const result = expressions.length === 1 && !hasChildRules ? expressions[0] : { [lc(combinator) === "or" ? Op.or : Op.and]: expressions };
2482
2613
  return rg.not ? { [Op.not]: result } : result;
2483
2614
  };
2484
2615
  return processRuleGroup(convertFromIC(ruleGroup), true);
2485
2616
  };
2486
2617
  //#endregion
2618
+ //#region src/utils/formatQuery/defaultRuleGroupProcessorSPARQL.ts
2619
+ /**
2620
+ * Rule group processor used by {@link formatQuery} for "sparql" format.
2621
+ *
2622
+ * SPARQL uses the same combinators as CEL (`&&` / `||`) and `!()` for negation.
2623
+ *
2624
+ * @group Export
2625
+ */
2626
+ const defaultRuleGroupProcessorSPARQL = (ruleGroup, options) => {
2627
+ const { fields, fallbackExpression, getParseNumberBoolean, placeholderFieldName, placeholderOperatorName, placeholderValueName, ruleProcessor, validateRule, validationMap } = options;
2628
+ const processRuleGroup = (rg, outermost) => {
2629
+ if (!isRuleOrGroupValid(rg, validationMap[rg.id ?? ""])) return outermost ? fallbackExpression : "";
2630
+ const processedRules = [];
2631
+ let precedingCombinator = "";
2632
+ let firstRule = true;
2633
+ for (const rule of rg.rules) {
2634
+ if (typeof rule === "string") {
2635
+ precedingCombinator = celCombinatorMap[rule];
2636
+ continue;
2637
+ }
2638
+ if (isRuleGroup(rule)) {
2639
+ const processedGroup = processRuleGroup(rule);
2640
+ if (processedGroup) {
2641
+ if (!firstRule && precedingCombinator) {
2642
+ processedRules.push(precedingCombinator);
2643
+ precedingCombinator = "";
2644
+ }
2645
+ firstRule = false;
2646
+ processedRules.push(processedGroup);
2647
+ }
2648
+ continue;
2649
+ }
2650
+ const [validationResult, fieldValidator] = validateRule(rule);
2651
+ if (!isRuleOrGroupValid(rule, validationResult, fieldValidator) || rule.field === placeholderFieldName || rule.operator === placeholderOperatorName || placeholderValueName !== void 0 && rule.value === placeholderValueName) continue;
2652
+ const fieldData = getOption(fields, rule.field);
2653
+ const processedRule = ruleProcessor(rule, {
2654
+ ...options,
2655
+ parseNumbers: getParseNumberBoolean(fieldData?.inputType),
2656
+ escapeQuotes: (rule.valueSource ?? "value") === "value",
2657
+ fieldData
2658
+ });
2659
+ if (processedRule) {
2660
+ if (!firstRule && precedingCombinator) {
2661
+ processedRules.push(precedingCombinator);
2662
+ precedingCombinator = "";
2663
+ }
2664
+ firstRule = false;
2665
+ processedRules.push(processedRule);
2666
+ }
2667
+ }
2668
+ const expression = processedRules.join(isRuleGroupType(rg) ? ` ${celCombinatorMap[rg.combinator]} ` : " ");
2669
+ const [prefix, suffix] = rg.not || !outermost ? [`${rg.not ? "!" : ""}(`, ")"] : ["", ""];
2670
+ return expression ? `${prefix}${expression}${suffix}` : fallbackExpression;
2671
+ };
2672
+ return processRuleGroup(ruleGroup, true);
2673
+ };
2674
+ //#endregion
2487
2675
  //#region src/utils/formatQuery/defaultRuleGroupProcessorSQL.ts
2488
2676
  /**
2489
2677
  * Default rule processor used by {@link formatQuery} for "sql" format.
@@ -2493,7 +2681,7 @@ const defaultRuleGroupProcessorSequelize = (ruleGroup, options) => {
2493
2681
  const defaultRuleGroupProcessorSQL = (ruleGroup, options) => {
2494
2682
  const { fields, fallbackExpression, getParseNumberBoolean, placeholderFieldName, placeholderOperatorName, placeholderValueName, ruleProcessor, validateRule, validationMap } = options;
2495
2683
  const processRuleGroup = (rg, outermostOrLonelyInGroup) => {
2496
- if (!isRuleOrGroupValid(rg, validationMap[rg.id ?? ""])) return outermostOrLonelyInGroup ? fallbackExpression : "";
2684
+ if (!isRuleOrGroupValid(rg, validationMap[rg.id ?? ""])) return outermostOrLonelyInGroup ? fallbackExpression : /* v8 ignore next -- @preserve */ "";
2497
2685
  const processedRules = [];
2498
2686
  let precedingCombinator = "";
2499
2687
  let firstRule = true;
@@ -2504,7 +2692,7 @@ const defaultRuleGroupProcessorSQL = (ruleGroup, options) => {
2504
2692
  }
2505
2693
  if (isRuleGroup(rule)) {
2506
2694
  const processedGroup = processRuleGroup(rule, rg.rules.length === 1);
2507
- // istanbul ignore else
2695
+ // v8 ignore else
2508
2696
  if (processedGroup) {
2509
2697
  if (!firstRule && precedingCombinator) {
2510
2698
  processedRules.push(precedingCombinator);
@@ -2540,6 +2728,378 @@ const defaultRuleGroupProcessorSQL = (ruleGroup, options) => {
2540
2728
  return processRuleGroup(ruleGroup, true);
2541
2729
  };
2542
2730
  //#endregion
2731
+ //#region src/utils/formatQuery/defaultRuleGroupProcessorDiagnostics.ts
2732
+ const numericInputTypes = new Set([
2733
+ "number",
2734
+ "range",
2735
+ "bigint"
2736
+ ]);
2737
+ const dateRegex = /^\d{4}-\d{2}-\d{2}$/;
2738
+ const timeRegex = /^\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/;
2739
+ const monthRegex = /^\d{4}-\d{2}$/;
2740
+ const weekRegex = /^\d{4}-W\d{2}$/;
2741
+ const colorRegex = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i;
2742
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
2743
+ const isValidDateComponents = (y, m, d) => {
2744
+ const date = new Date(Date.UTC(y, m - 1, d));
2745
+ return date.getUTCFullYear() === y && date.getUTCMonth() === m - 1 && date.getUTCDate() === d;
2746
+ };
2747
+ const isValidTimeComponents = (s) => {
2748
+ const parts = s.split(":");
2749
+ const h = Number(parts[0]);
2750
+ const m = Number(parts[1]);
2751
+ const sec = parts[2] ? Number.parseFloat(parts[2]) : 0;
2752
+ return h >= 0 && h <= 23 && m >= 0 && m <= 59 && sec >= 0 && sec < 60;
2753
+ };
2754
+ /**
2755
+ * Checks whether a value is compatible with the given {@link FullField.inputType}.
2756
+ * Returns a diagnostic code string if there is a mismatch, or `undefined` if OK.
2757
+ */
2758
+ const checkValueTypeMismatch = (value, inputType) => {
2759
+ if (value === null || value === void 0 || value === "") return void 0;
2760
+ if (numericInputTypes.has(inputType)) {
2761
+ const v = typeof value === "string" ? value.trim() : value;
2762
+ if (typeof v === "number" || typeof v === "bigint") return void 0;
2763
+ if (typeof v === "string" && numericRegex.test(v)) return void 0;
2764
+ return "VALUE_TYPE_MISMATCH";
2765
+ }
2766
+ if (inputType === "date") {
2767
+ if (typeof value !== "string") return "VALUE_TYPE_MISMATCH";
2768
+ const v = value.trim();
2769
+ if (!dateRegex.test(v)) return "VALUE_TYPE_MISMATCH";
2770
+ const [y, m, d] = v.split("-").map(Number);
2771
+ return isValidDateComponents(y, m, d) ? void 0 : "VALUE_TYPE_MISMATCH";
2772
+ }
2773
+ if (inputType === "datetime-local") {
2774
+ if (typeof value !== "string") return "VALUE_TYPE_MISMATCH";
2775
+ const base = value.trim().replace(/(Z|[+-]\d{2}:?\d{2}|[+-]\d{2})$/, "");
2776
+ const tIndex = base.indexOf("T");
2777
+ if (tIndex === -1) return "VALUE_TYPE_MISMATCH";
2778
+ const datePart = base.slice(0, tIndex);
2779
+ const timePart = base.slice(tIndex + 1);
2780
+ if (!dateRegex.test(datePart) || !timeRegex.test(timePart)) return "VALUE_TYPE_MISMATCH";
2781
+ const [y, m, d] = datePart.split("-").map(Number);
2782
+ if (!isValidDateComponents(y, m, d)) return "VALUE_TYPE_MISMATCH";
2783
+ return isValidTimeComponents(timePart) ? void 0 : "VALUE_TYPE_MISMATCH";
2784
+ }
2785
+ if (inputType === "time") {
2786
+ if (typeof value !== "string") return "VALUE_TYPE_MISMATCH";
2787
+ const v = value.trim();
2788
+ if (!timeRegex.test(v)) return "VALUE_TYPE_MISMATCH";
2789
+ return isValidTimeComponents(v) ? void 0 : "VALUE_TYPE_MISMATCH";
2790
+ }
2791
+ if (inputType === "month") {
2792
+ if (typeof value !== "string") return "VALUE_TYPE_MISMATCH";
2793
+ const v = value.trim();
2794
+ if (!monthRegex.test(v)) return "VALUE_TYPE_MISMATCH";
2795
+ const m = Number(v.slice(5));
2796
+ return m >= 1 && m <= 12 ? void 0 : "VALUE_TYPE_MISMATCH";
2797
+ }
2798
+ if (inputType === "week") {
2799
+ if (typeof value !== "string") return "VALUE_TYPE_MISMATCH";
2800
+ const v = value.trim();
2801
+ if (!weekRegex.test(v)) return "VALUE_TYPE_MISMATCH";
2802
+ const w = Number(v.slice(6));
2803
+ return w >= 1 && w <= 53 ? void 0 : "VALUE_TYPE_MISMATCH";
2804
+ }
2805
+ if (inputType === "color") {
2806
+ if (typeof value !== "string") return "VALUE_TYPE_MISMATCH";
2807
+ return colorRegex.test(value.trim()) ? void 0 : "VALUE_TYPE_MISMATCH";
2808
+ }
2809
+ if (inputType === "url") {
2810
+ if (typeof value !== "string") return "VALUE_TYPE_MISMATCH";
2811
+ try {
2812
+ new URL(value.trim());
2813
+ return;
2814
+ } catch {
2815
+ return "VALUE_TYPE_MISMATCH";
2816
+ }
2817
+ }
2818
+ if (inputType === "email") {
2819
+ if (typeof value !== "string") return "VALUE_TYPE_MISMATCH";
2820
+ return emailRegex.test(value.trim()) ? void 0 : "VALUE_TYPE_MISMATCH";
2821
+ }
2822
+ };
2823
+ /**
2824
+ * Rule group processor used by {@link formatQuery} for "diagnostics" format.
2825
+ *
2826
+ * Produces a {@link DiagnosticsResult} containing an annotated copy of the query
2827
+ * tree (`query`) with `valid`, `reasons`, `path`, and `level` properties on every
2828
+ * rule and group; a flat `diagnostics` array; aggregate `stats`; and a per-field
2829
+ * `fieldSummary`.
2830
+ *
2831
+ * @group Export
2832
+ */
2833
+ const defaultRuleGroupProcessorDiagnostics = (ruleGroup, options) => {
2834
+ const { fields: fieldsOption, placeholderFieldName, placeholderOperatorName, placeholderValueName, validateRule, validationMap } = options;
2835
+ const diagnostics = [];
2836
+ const stats = {
2837
+ totalRules: 0,
2838
+ totalGroups: 0,
2839
+ validRules: 0,
2840
+ invalidRules: 0,
2841
+ validGroups: 0,
2842
+ invalidGroups: 0
2843
+ };
2844
+ const fieldSummary = {};
2845
+ const uniqueFields = toFlatOptionArray(fieldsOption);
2846
+ const fieldsByName = /* @__PURE__ */ new Map();
2847
+ for (const f of uniqueFields) fieldsByName.set(f.name, f);
2848
+ const hasFieldsConfig = fieldsByName.size > 0;
2849
+ const processRuleGroup = (rg, path) => {
2850
+ stats.totalGroups++;
2851
+ const level = path.length;
2852
+ const groupValidationEntry = validationMap[rg.id ?? ""];
2853
+ const groupSelfValid = isRuleOrGroupValid(rg, groupValidationEntry);
2854
+ const groupReasons = getReasons(groupValidationEntry);
2855
+ if (rg.muted) diagnostics.push({
2856
+ id: rg.id ?? "",
2857
+ path,
2858
+ code: "MUTED",
2859
+ message: "Group is muted",
2860
+ source: "muted"
2861
+ });
2862
+ else if (!groupSelfValid && groupValidationEntry !== void 0) diagnostics.push({
2863
+ id: rg.id ?? "",
2864
+ path,
2865
+ code: "CUSTOM_VALIDATOR",
2866
+ message: groupReasons ? `Invalid: ${groupReasons.join(", ")}` : "Group failed validation",
2867
+ source: "query-validator"
2868
+ });
2869
+ let allChildrenValid = true;
2870
+ let ruleIndex = 0;
2871
+ const annotatedRules = [];
2872
+ for (const rule of rg.rules) {
2873
+ if (typeof rule === "string") {
2874
+ annotatedRules.push(rule);
2875
+ ruleIndex++;
2876
+ continue;
2877
+ }
2878
+ const childPath = [...path, ruleIndex];
2879
+ if (isRuleGroup(rule)) {
2880
+ const annotatedGroup = processRuleGroup(rule, childPath);
2881
+ if (!annotatedGroup.valid) allChildrenValid = false;
2882
+ annotatedRules.push(annotatedGroup);
2883
+ ruleIndex++;
2884
+ continue;
2885
+ }
2886
+ stats.totalRules++;
2887
+ const childLevel = childPath.length;
2888
+ const [validationResult, fieldValidator] = validateRule(rule);
2889
+ const ruleValid = isRuleOrGroupValid(rule, validationResult, fieldValidator) && rule.field !== placeholderFieldName && rule.operator !== placeholderOperatorName && !(placeholderValueName !== void 0 && rule.value === placeholderValueName);
2890
+ collectRuleDiagnostics(rule, childPath, validationResult, fieldValidator, ruleValid, diagnostics, placeholderFieldName, placeholderOperatorName, placeholderValueName, hasFieldsConfig, fieldsByName);
2891
+ if (!ruleValid) {
2892
+ allChildrenValid = false;
2893
+ stats.invalidRules++;
2894
+ } else stats.validRules++;
2895
+ const fieldName = rule.field;
2896
+ if (!fieldSummary[fieldName]) fieldSummary[fieldName] = {
2897
+ ruleCount: 0,
2898
+ invalidCount: 0
2899
+ };
2900
+ fieldSummary[fieldName].ruleCount++;
2901
+ if (!ruleValid) fieldSummary[fieldName].invalidCount++;
2902
+ const ruleReasons = getReasons(validationResult) ?? getFieldValidatorReasons(rule, fieldValidator);
2903
+ const annotatedRule = {
2904
+ ...rule,
2905
+ valid: ruleValid,
2906
+ ...ruleReasons ? { reasons: ruleReasons } : null,
2907
+ path: childPath,
2908
+ level: childLevel
2909
+ };
2910
+ annotatedRules.push(annotatedRule);
2911
+ ruleIndex++;
2912
+ }
2913
+ const groupValid = groupSelfValid && allChildrenValid;
2914
+ if (groupValid) stats.validGroups++;
2915
+ else stats.invalidGroups++;
2916
+ if (isRuleGroupType(rg)) return {
2917
+ ...rg,
2918
+ valid: groupValid,
2919
+ ...groupReasons ? { reasons: groupReasons } : null,
2920
+ path,
2921
+ level,
2922
+ rules: annotatedRules
2923
+ };
2924
+ return {
2925
+ ...rg,
2926
+ valid: groupValid,
2927
+ ...groupReasons ? { reasons: groupReasons } : null,
2928
+ path,
2929
+ level,
2930
+ rules: annotatedRules
2931
+ };
2932
+ };
2933
+ const query = processRuleGroup(ruleGroup, []);
2934
+ if (hasFieldsConfig) {
2935
+ const referencedFields = new Set(Object.keys(fieldSummary));
2936
+ for (const [fieldName] of fieldsByName) if (!referencedFields.has(fieldName)) diagnostics.push({
2937
+ id: "",
2938
+ path: [],
2939
+ code: "UNREFERENCED_FIELD",
2940
+ message: `Field "${fieldName}" is defined in the fields config but not used in the query`,
2941
+ source: "field-check"
2942
+ });
2943
+ }
2944
+ return {
2945
+ query,
2946
+ diagnostics,
2947
+ stats,
2948
+ fieldSummary
2949
+ };
2950
+ };
2951
+ /**
2952
+ * Collects diagnostic entries for a single rule.
2953
+ */
2954
+ const collectRuleDiagnostics = (rule, path, validationResult, fieldValidator, ruleValid, diagnostics, placeholderFieldName, placeholderOperatorName, placeholderValueName, hasFieldsConfig, fieldsByName) => {
2955
+ const id = rule.id ?? "";
2956
+ if (rule.muted) diagnostics.push({
2957
+ id,
2958
+ path,
2959
+ code: "MUTED",
2960
+ message: "Rule is muted",
2961
+ source: "muted"
2962
+ });
2963
+ if (rule.field === placeholderFieldName) diagnostics.push({
2964
+ id,
2965
+ path,
2966
+ code: "PLACEHOLDER_FIELD",
2967
+ message: "Rule has a placeholder field",
2968
+ source: "placeholder"
2969
+ });
2970
+ if (rule.operator === placeholderOperatorName) diagnostics.push({
2971
+ id,
2972
+ path,
2973
+ code: "PLACEHOLDER_OPERATOR",
2974
+ message: "Rule has a placeholder operator",
2975
+ source: "placeholder"
2976
+ });
2977
+ if (placeholderValueName !== void 0 && rule.value === placeholderValueName) diagnostics.push({
2978
+ id,
2979
+ path,
2980
+ code: "PLACEHOLDER_VALUE",
2981
+ message: "Rule has a placeholder value",
2982
+ source: "placeholder"
2983
+ });
2984
+ if (!rule.muted && rule.field !== placeholderFieldName && rule.operator !== placeholderOperatorName && !(placeholderValueName !== void 0 && rule.value === placeholderValueName)) {
2985
+ if (typeof validationResult === "boolean" && !validationResult) diagnostics.push({
2986
+ id,
2987
+ path,
2988
+ code: "CUSTOM_VALIDATOR",
2989
+ message: "Rule failed validation",
2990
+ source: "query-validator"
2991
+ });
2992
+ else if (typeof validationResult !== "boolean" && isValidationResult(validationResult) && !validationResult.valid) {
2993
+ const reasons = validationResult.reasons;
2994
+ diagnostics.push({
2995
+ id,
2996
+ path,
2997
+ code: "CUSTOM_VALIDATOR",
2998
+ message: reasons ? `Invalid: ${reasons.join(", ")}` : "Rule failed validation",
2999
+ source: "query-validator"
3000
+ });
3001
+ } else if (!ruleValid && typeof fieldValidator === "function") {
3002
+ const vr = fieldValidator(rule);
3003
+ const reasons = typeof vr !== "boolean" && isValidationResult(vr) && !vr.valid ? vr.reasons : void 0;
3004
+ diagnostics.push({
3005
+ id,
3006
+ path,
3007
+ code: "CUSTOM_VALIDATOR",
3008
+ message: reasons ? `Invalid: ${reasons.join(", ")}` : "Rule failed field validation",
3009
+ source: "field-validator"
3010
+ });
3011
+ }
3012
+ }
3013
+ if (hasFieldsConfig && !fieldsByName.has(rule.field) && rule.field !== placeholderFieldName) diagnostics.push({
3014
+ id,
3015
+ path,
3016
+ code: "UNDEFINED_FIELD",
3017
+ message: `Field "${rule.field}" is not defined in the fields config`,
3018
+ source: "field-check"
3019
+ });
3020
+ if (hasFieldsConfig) {
3021
+ const fieldDef = fieldsByName.get(rule.field);
3022
+ if (fieldDef?.inputType) {
3023
+ const mismatchCode = checkValueTypeMismatch(rule.value, fieldDef.inputType);
3024
+ if (mismatchCode) diagnostics.push({
3025
+ id,
3026
+ path,
3027
+ code: mismatchCode,
3028
+ message: `Value "${rule.value}" is not compatible with input type "${fieldDef.inputType}"`,
3029
+ source: "type-check"
3030
+ });
3031
+ }
3032
+ }
3033
+ };
3034
+ /**
3035
+ * Extracts `reasons` from a validation result, if present.
3036
+ */
3037
+ const getReasons = (validationResult) => {
3038
+ if (typeof validationResult !== "boolean" && isValidationResult(validationResult) && !validationResult.valid && validationResult.reasons) return validationResult.reasons;
3039
+ };
3040
+ /**
3041
+ * Runs a field-level validator and extracts `reasons` if present.
3042
+ */
3043
+ const getFieldValidatorReasons = (rule, fieldValidator) => {
3044
+ if (typeof fieldValidator === "function") {
3045
+ const vr = fieldValidator(rule);
3046
+ if (typeof vr !== "boolean" && isValidationResult(vr) && !vr.valid && vr.reasons) return vr.reasons;
3047
+ }
3048
+ };
3049
+ //#endregion
3050
+ //#region src/utils/formatQuery/defaultRuleProcessorCypher.ts
3051
+ const escapeSingleQuotes$1 = (v, escapeQuotes) => typeof v !== "string" || !escapeQuotes ? `${v}` : v.replaceAll("'", "\\'");
3052
+ /**
3053
+ * Default rule processor used by {@link formatQuery} for "cypher" and "gql" formats.
3054
+ *
3055
+ * @group Export
3056
+ */
3057
+ const defaultRuleProcessorCypher = (rule, opts = {}) => {
3058
+ const { escapeQuotes, parseNumbers } = opts;
3059
+ const { field, operator, value, valueSource } = rule;
3060
+ const valueIsField = valueSource === "field";
3061
+ const operatorTL = operator.toLowerCase();
3062
+ const fmtVal = (v) => {
3063
+ if (v === null || v === void 0) return "null";
3064
+ if (typeof v === "boolean" || typeof v === "bigint") return String(v);
3065
+ if (valueIsField) return trimIfString(v);
3066
+ if (typeof v === "number" || shouldRenderAsNumber(v, parseNumbers)) return trimIfString(v);
3067
+ return `'${escapeSingleQuotes$1(v, escapeQuotes)}'`;
3068
+ };
3069
+ switch (operatorTL) {
3070
+ case "=": return `${field} = ${fmtVal(value)}`;
3071
+ case "!=":
3072
+ case "<>": return `${field} <> ${fmtVal(value)}`;
3073
+ case "<":
3074
+ case ">":
3075
+ case "<=":
3076
+ case ">=": return `${field} ${operatorTL} ${fmtVal(value)}`;
3077
+ case "contains": return `${field} CONTAINS ${fmtVal(value)}`;
3078
+ case "doesnotcontain": return `NOT ${field} CONTAINS ${fmtVal(value)}`;
3079
+ case "beginswith": return `${field} STARTS WITH ${fmtVal(value)}`;
3080
+ case "doesnotbeginwith": return `NOT ${field} STARTS WITH ${fmtVal(value)}`;
3081
+ case "endswith": return `${field} ENDS WITH ${fmtVal(value)}`;
3082
+ case "doesnotendwith": return `NOT ${field} ENDS WITH ${fmtVal(value)}`;
3083
+ case "null": return `${field} IS NULL`;
3084
+ case "notnull": return `${field} IS NOT NULL`;
3085
+ case "in":
3086
+ case "notin": {
3087
+ const values = toArray(value).map(fmtVal);
3088
+ if (!values.length) return "";
3089
+ return `${operatorTL === "notin" ? "NOT " : ""}${field} IN [${values.join(", ")}]`;
3090
+ }
3091
+ case "between":
3092
+ case "notbetween": {
3093
+ const arr = toArray(value);
3094
+ if (arr.length < 2) return "";
3095
+ const [low, high] = [fmtVal(arr[0]), fmtVal(arr[1])];
3096
+ const expr = `${low} <= ${field} AND ${field} <= ${high}`;
3097
+ return operatorTL === "notbetween" ? `NOT (${expr})` : expr;
3098
+ }
3099
+ default: return `${field} ${operator} ${fmtVal(value)}`;
3100
+ }
3101
+ };
3102
+ //#endregion
2543
3103
  //#region src/utils/formatQuery/defaultRuleProcessorElasticSearch.ts
2544
3104
  const rangeOperatorMap = {
2545
3105
  "<": "lt",
@@ -2691,6 +3251,68 @@ const defaultRuleProcessorElasticSearch = (rule, options = {}) => {
2691
3251
  return false;
2692
3252
  };
2693
3253
  //#endregion
3254
+ //#region src/utils/formatQuery/defaultRuleProcessorGremlin.ts
3255
+ const escapeSingleQuotes = (v, escapeQuotes) => typeof v !== "string" || !escapeQuotes ? `${v}` : v.replaceAll("'", "\\'");
3256
+ /**
3257
+ * Default rule processor used by {@link formatQuery} for "gremlin" format.
3258
+ *
3259
+ * Each rule becomes a `.has()` step (or `.hasNot()`/`.has()` for null checks).
3260
+ *
3261
+ * @group Export
3262
+ */
3263
+ const defaultRuleProcessorGremlin = (rule, opts = {}) => {
3264
+ const { escapeQuotes, parseNumbers } = opts;
3265
+ const { field, operator, value, valueSource } = rule;
3266
+ const valueIsField = valueSource === "field";
3267
+ const operatorTL = operator.toLowerCase();
3268
+ const prop = field.includes(".") ? field.split(".").pop() : field;
3269
+ const fmtVal = (v) => {
3270
+ if (v === null || v === void 0) return "null";
3271
+ if (typeof v === "boolean" || typeof v === "bigint") return String(v);
3272
+ if (valueIsField) return trimIfString(v);
3273
+ if (typeof v === "number" || shouldRenderAsNumber(v, parseNumbers)) return trimIfString(v);
3274
+ return `'${escapeSingleQuotes(v, escapeQuotes)}'`;
3275
+ };
3276
+ switch (operatorTL) {
3277
+ case "=": return `.has('${prop}', ${fmtVal(value)})`;
3278
+ case "!=":
3279
+ case "<>": return `.has('${prop}', neq(${fmtVal(value)}))`;
3280
+ case "<": return `.has('${prop}', lt(${fmtVal(value)}))`;
3281
+ case ">": return `.has('${prop}', gt(${fmtVal(value)}))`;
3282
+ case "<=": return `.has('${prop}', lte(${fmtVal(value)}))`;
3283
+ case ">=": return `.has('${prop}', gte(${fmtVal(value)}))`;
3284
+ case "contains": return `.has('${prop}', containing(${fmtVal(value)}))`;
3285
+ case "doesnotcontain": return `.has('${prop}', notContaining(${fmtVal(value)}))`;
3286
+ case "beginswith": return `.has('${prop}', startingWith(${fmtVal(value)}))`;
3287
+ case "doesnotbeginwith": return `.has('${prop}', notStartingWith(${fmtVal(value)}))`;
3288
+ case "endswith": return `.has('${prop}', endingWith(${fmtVal(value)}))`;
3289
+ case "doesnotendwith": return `.has('${prop}', notEndingWith(${fmtVal(value)}))`;
3290
+ case "null": return `.hasNot('${prop}')`;
3291
+ case "notnull": return `.has('${prop}')`;
3292
+ case "in": {
3293
+ const items = toArray(value).map(fmtVal);
3294
+ if (!items.length) return "";
3295
+ return `.has('${prop}', within(${items.join(", ")}))`;
3296
+ }
3297
+ case "notin": {
3298
+ const items = toArray(value).map(fmtVal);
3299
+ if (!items.length) return "";
3300
+ return `.has('${prop}', without(${items.join(", ")}))`;
3301
+ }
3302
+ case "between": {
3303
+ const arr = toArray(value);
3304
+ if (arr.length < 2) return "";
3305
+ return `.has('${prop}', between(${fmtVal(arr[0])}, ${fmtVal(arr[1])}))`;
3306
+ }
3307
+ case "notbetween": {
3308
+ const arr = toArray(value);
3309
+ if (arr.length < 2) return "";
3310
+ return `.has('${prop}', outside(${fmtVal(arr[0])}, ${fmtVal(arr[1])}))`;
3311
+ }
3312
+ default: return `.has('${prop}', ${fmtVal(value)})`;
3313
+ }
3314
+ };
3315
+ //#endregion
2694
3316
  //#region src/utils/formatQuery/defaultRuleProcessorJSONata.ts
2695
3317
  const shouldNegate = (op) => op.startsWith("not") || op.startsWith("doesnot");
2696
3318
  const quote = (v, escapeQuotes) => `"${typeof v !== "string" || !escapeQuotes ? `${v}` : v.replaceAll(`"`, `\\"`)}"`;
@@ -2918,12 +3540,12 @@ const defaultRuleProcessorLDAP = (rule, options = {}) => {
2918
3540
  return negateIf(`(&(${field}>=${ldapEscape(firstValue)})(${field}<=${ldapEscape(secondValue)}))`, operatorLC === "notbetween");
2919
3541
  }
2920
3542
  }
2921
- // istanbul ignore next
3543
+ // v8 ignore next
2922
3544
  return "";
2923
3545
  };
2924
3546
  //#endregion
2925
3547
  //#region src/utils/formatQuery/defaultValueProcessorNL.ts
2926
- const escapeStringValueQuotes = (v, quoteChar, escapeQuotes) => escapeQuotes && typeof v === "string" ? v.replaceAll(`${quoteChar}`, `${quoteChar}${quoteChar}`) : v;
3548
+ const escapeStringValueQuotes = (v, quoteChar, escapeQuotes) => escapeQuotes && typeof v === "string" ? v.replaceAll(`${quoteChar}`, `${quoteChar}${quoteChar}`) : /* v8 ignore next -- @preserve */ v;
2927
3549
  /**
2928
3550
  * Default value processor used by {@link formatQuery} for "natural_language" format.
2929
3551
  *
@@ -2941,7 +3563,7 @@ const defaultValueProcessorNL = (rule, opts = {}) => {
2941
3563
  quoteFieldNamesWith,
2942
3564
  fieldIdentifierSeparator
2943
3565
  });
2944
- const t = translations ?? ( /* istanbul ignore next */ {});
3566
+ const t = translations ?? ( /* v8 ignore start -- @preserve */ {});
2945
3567
  const orTL = t.or ?? "or";
2946
3568
  const trueTL = t.true ?? "true";
2947
3569
  const falseTL = t.false ?? "false";
@@ -2997,7 +3619,7 @@ const defaultExportOperatorMap = {
2997
3619
  between: ["is between", "is between the values in"],
2998
3620
  notbetween: ["is not between", "is not between the values in"]
2999
3621
  };
3000
- /* istanbul ignore next */
3622
+ /* v8 ignore next -- @preserve */
3001
3623
  const defaultGetOperators = () => [];
3002
3624
  /**
3003
3625
  * Default operator processor used by {@link formatQuery} for "natural_language" format.
@@ -3006,7 +3628,7 @@ const defaultGetOperators = () => [];
3006
3628
  */
3007
3629
  const defaultOperatorProcessorNL = (rule, opts = {}) => {
3008
3630
  const { field, operator, valueSource = "value" } = rule;
3009
- // istanbul ignore next
3631
+ // v8 ignore next
3010
3632
  const { getOperators = defaultGetOperators, operatorMap: operatorMapParam = defaultExportOperatorMap } = opts;
3011
3633
  const mergedOperatorMap = new Map(Object.entries(defaultExportOperatorMap));
3012
3634
  for (const [key, value] of Object.entries(operatorMapParam)) mergedOperatorMap.set(lc(key), value);
@@ -3035,8 +3657,8 @@ const defaultOperatorProcessorNL = (rule, opts = {}) => {
3035
3657
  */
3036
3658
  const defaultRuleProcessorNL = (rule, opts) => {
3037
3659
  const { field, operator } = rule;
3038
- // istanbul ignore next
3039
- const { fieldData, quoteFieldNamesWith = ["", ""], fieldIdentifierSeparator = "", quoteValuesWith = `'`, operatorProcessor = defaultOperatorProcessorNL, valueProcessor = defaultValueProcessorNL, concatOperator = "||", wordOrder = "SVO" } = opts ?? ( /* istanbul ignore next */ {});
3660
+ // v8 ignore next
3661
+ const { fieldData, quoteFieldNamesWith = ["", ""], fieldIdentifierSeparator = "", quoteValuesWith = `'`, operatorProcessor = defaultOperatorProcessorNL, valueProcessor = defaultValueProcessorNL, concatOperator = "||", wordOrder = "SVO" } = opts ?? ( /* v8 ignore start -- @preserve */ {});
3040
3662
  const processedField = getQuotedFieldName(fieldData?.label ?? field, {
3041
3663
  quoteFieldNamesWith,
3042
3664
  fieldIdentifierSeparator
@@ -3142,7 +3764,7 @@ const defaultRuleProcessorSQL = (rule, opts = {}) => {
3142
3764
  * @group Export
3143
3765
  */
3144
3766
  const defaultRuleProcessorParameterized = (rule, opts, meta) => {
3145
- // istanbul ignore next
3767
+ // v8 ignore next
3146
3768
  const { fieldData, format, getNextNamedParam, parseNumbers, paramPrefix, paramsKeepPrefix, numberedParams, quoteFieldNamesWith = ["", ""], fieldIdentifierSeparator, concatOperator, operatorProcessor = defaultOperatorProcessorSQL, valueProcessor = defaultValueProcessorByRule } = opts ?? {};
3147
3769
  const { processedParams = [] } = meta ?? {};
3148
3770
  const parameterized = format === "parameterized";
@@ -3161,6 +3783,7 @@ const defaultRuleProcessorParameterized = (rule, opts, meta) => {
3161
3783
  });
3162
3784
  const ruleField = wrapFieldName(rule.field);
3163
3785
  const matchEval = processMatchMode(rule);
3786
+ /* v8 ignore start -- @preserve */
3164
3787
  if (matchEval === false) return;
3165
3788
  else if (matchEval) {
3166
3789
  if (opts?.preset !== "postgresql") return finalize("");
@@ -3173,7 +3796,6 @@ const defaultRuleProcessorParameterized = (rule, opts, meta) => {
3173
3796
  ...opts,
3174
3797
  fields: []
3175
3798
  });
3176
- // istanbul ignore else
3177
3799
  if (Array.isArray(nestedParams)) params.push(...nestedParams);
3178
3800
  else Object.assign(paramsNamed, nestedParams);
3179
3801
  switch (mode) {
@@ -3188,6 +3810,7 @@ const defaultRuleProcessorParameterized = (rule, opts, meta) => {
3188
3810
  }
3189
3811
  }
3190
3812
  }
3813
+ /* v8 ignore stop -- @preserve */
3191
3814
  const value = valueProcessor(rule, {
3192
3815
  parseNumbers,
3193
3816
  quoteFieldNamesWith,
@@ -3228,7 +3851,7 @@ const defaultRuleProcessorParameterized = (rule, opts, meta) => {
3228
3851
  }
3229
3852
  let paramValue = rule.value;
3230
3853
  if (typeof rule.value === "string") if (shouldRenderAsNumber(rule.value, parseNumbers)) paramValue = parseNumber(rule.value, { parseNumbers });
3231
- else paramValue = /^'.*'$/g.test(value) ? value.replaceAll(/(^'|'$)/g, "") : value;
3854
+ else paramValue = /^'.*'$/g.test(value) ? value.replaceAll(/(^'|'$)/g, "") : /* v8 ignore next -- @preserve */ value;
3232
3855
  let paramName = "";
3233
3856
  if (parameterized) params.push(paramValue);
3234
3857
  else {
@@ -3247,9 +3870,9 @@ const processNumber = (value, fallback, parseNumbers) => shouldRenderAsNumber(va
3247
3870
  */
3248
3871
  const defaultRuleProcessorPrisma = (rule, options = {}) => {
3249
3872
  const { field, operator, value, valueSource } = rule;
3250
- // istanbul ignore next
3873
+ // v8 ignore next
3251
3874
  const { parseNumbers, preserveValueOrder } = options;
3252
- if (valueSource === "field" || processMatchMode(rule)) return;
3875
+ if (valueSource === "field" || processMatchMode(rule)) return void 0;
3253
3876
  const operatorLC = lc(operator);
3254
3877
  switch (operatorLC) {
3255
3878
  case "=": return { [field]: processNumber(value, value, parseNumbers) };
@@ -3307,13 +3930,16 @@ const defaultRuleProcessorPrisma = (rule, options = {}) => {
3307
3930
  */
3308
3931
  const defaultRuleProcessorSequelize = (rule, { parseNumbers, preserveValueOrder, context = {} } = {}) => {
3309
3932
  const { sequelizeOperators: Op, sequelizeCol: col, sequelizeFn: fn } = context;
3310
- if (processMatchMode(rule)) return;
3933
+ if (processMatchMode(rule)) return void 0;
3311
3934
  const { field, operator, value, valueSource } = rule;
3312
3935
  const valueIsField = valueSource === "field";
3313
3936
  const operatorLC = lc(operator);
3314
3937
  if (!Op || valueIsField && (!col || !fn && [
3938
+ "contains",
3315
3939
  "doesnotcontain",
3940
+ "beginswith",
3316
3941
  "doesnotbeginwith",
3942
+ "endswith",
3317
3943
  "doesnotendwith"
3318
3944
  ].includes(operatorLC))) return;
3319
3945
  switch (operatorLC) {
@@ -3333,9 +3959,9 @@ const defaultRuleProcessorSequelize = (rule, { parseNumbers, preserveValueOrder,
3333
3959
  }[operatorLC];
3334
3960
  return { [field]: valueIsField && operatorLC === "=" ? { [Op.col]: value } : { [sequelizeOperator]: valueIsField ? col(value) : shouldRenderAsNumber(value, parseNumbers) ? parseNumber(value, { parseNumbers: "strict" }) : value } };
3335
3961
  }
3336
- case "contains": return { [field]: { [Op.substring]: valueIsField ? col(value) : `${value}` } };
3337
- case "beginswith": return { [field]: { [Op.startsWith]: valueIsField ? col(value) : `${value}` } };
3338
- case "endswith": return { [field]: { [Op.endsWith]: valueIsField ? col(value) : `${value}` } };
3962
+ case "contains": return { [field]: { [valueIsField ? Op.like : Op.substring]: valueIsField ? fn("CONCAT", "%", col(value), "%") : `${value}` } };
3963
+ case "beginswith": return { [field]: { [valueIsField ? Op.like : Op.startsWith]: valueIsField ? fn("CONCAT", col(value), "%") : `${value}` } };
3964
+ case "endswith": return { [field]: { [valueIsField ? Op.like : Op.endsWith]: valueIsField ? fn("CONCAT", "%", col(value)) : `${value}` } };
3339
3965
  case "doesnotcontain": return { [field]: { [Op.notLike]: valueIsField ? fn("CONCAT", "%", col(value), "%") : `%${value}%` } };
3340
3966
  case "doesnotbeginwith": return { [field]: { [Op.notLike]: valueIsField ? fn("CONCAT", col(value), "%") : `${value}%` } };
3341
3967
  case "doesnotendwith": return { [field]: { [Op.notLike]: valueIsField ? fn("CONCAT", "%", col(value)) : `%${value}` } };
@@ -3365,6 +3991,68 @@ const defaultRuleProcessorSequelize = (rule, { parseNumbers, preserveValueOrder,
3365
3991
  }
3366
3992
  };
3367
3993
  //#endregion
3994
+ //#region src/utils/formatQuery/defaultRuleProcessorSPARQL.ts
3995
+ const escapeDoubleQuotes = (v, escapeQuotes) => typeof v !== "string" || !escapeQuotes ? `${v}` : v.replaceAll(`"`, `\\"`);
3996
+ /**
3997
+ * Default rule processor used by {@link formatQuery} for "sparql" format.
3998
+ *
3999
+ * @group Export
4000
+ */
4001
+ const defaultRuleProcessorSPARQL = (rule, opts = {}) => {
4002
+ const { escapeQuotes, parseNumbers } = opts;
4003
+ const { field, operator, value, valueSource } = rule;
4004
+ const valueIsField = valueSource === "field";
4005
+ const operatorTL = operator.toLowerCase();
4006
+ const fmtVal = (v) => {
4007
+ if (v === null || v === void 0) return "\"\"";
4008
+ if (typeof v === "boolean") return `"${v}"^^xsd:boolean`;
4009
+ if (typeof v === "bigint") return String(v);
4010
+ if (valueIsField) return trimIfString(v);
4011
+ if (typeof v === "number" || shouldRenderAsNumber(v, parseNumbers)) return trimIfString(v);
4012
+ const s = typeof v === "string" ? v : JSON.stringify(v) ?? "";
4013
+ if (s.startsWith("?") || s.startsWith("<") || s.includes(":")) return s;
4014
+ return `"${escapeDoubleQuotes(s, escapeQuotes)}"`;
4015
+ };
4016
+ switch (operatorTL) {
4017
+ case "=":
4018
+ case "!=":
4019
+ case "<":
4020
+ case ">":
4021
+ case "<=":
4022
+ case ">=": return `${field} ${operatorTL} ${fmtVal(value)}`;
4023
+ case "<>": return `${field} != ${fmtVal(value)}`;
4024
+ case "contains": return `CONTAINS(${field}, ${fmtVal(value)})`;
4025
+ case "doesnotcontain": return `!CONTAINS(${field}, ${fmtVal(value)})`;
4026
+ case "beginswith": return `STRSTARTS(${field}, ${fmtVal(value)})`;
4027
+ case "doesnotbeginwith": return `!STRSTARTS(${field}, ${fmtVal(value)})`;
4028
+ case "endswith": return `STRENDS(${field}, ${fmtVal(value)})`;
4029
+ case "doesnotendwith": return `!STRENDS(${field}, ${fmtVal(value)})`;
4030
+ case "null": return `!BOUND(${field})`;
4031
+ case "notnull": return `BOUND(${field})`;
4032
+ case "in": {
4033
+ const items = toArray(value).map(fmtVal);
4034
+ if (!items.length) return "";
4035
+ return items.map((item) => `${field} = ${item}`).join(" || ");
4036
+ }
4037
+ case "notin": {
4038
+ const items = toArray(value).map(fmtVal);
4039
+ if (!items.length) return "";
4040
+ return items.map((item) => `${field} != ${item}`).join(" && ");
4041
+ }
4042
+ case "between": {
4043
+ const arr = toArray(value);
4044
+ if (arr.length < 2) return "";
4045
+ return `${field} >= ${fmtVal(arr[0])} && ${field} <= ${fmtVal(arr[1])}`;
4046
+ }
4047
+ case "notbetween": {
4048
+ const arr = toArray(value);
4049
+ if (arr.length < 2) return "";
4050
+ return `(${field} < ${fmtVal(arr[0])} || ${field} > ${fmtVal(arr[1])})`;
4051
+ }
4052
+ default: return `${field} ${operator} ${fmtVal(value)}`;
4053
+ }
4054
+ };
4055
+ //#endregion
3368
4056
  //#region src/utils/formatQuery/formatQuery.ts
3369
4057
  /**
3370
4058
  * A collection of option presets for {@link formatQuery}, specifically for SQL-based formats.
@@ -3411,9 +4099,14 @@ const defaultRuleProcessors = {
3411
4099
  prisma: defaultRuleProcessorPrisma,
3412
4100
  sequelize: defaultRuleProcessorSequelize,
3413
4101
  spel: defaultRuleProcessorSpEL,
3414
- sql: defaultRuleProcessorSQL
4102
+ sql: defaultRuleProcessorSQL,
4103
+ cypher: defaultRuleProcessorCypher,
4104
+ gql: defaultRuleProcessorCypher,
4105
+ sparql: defaultRuleProcessorSPARQL,
4106
+ gremlin: defaultRuleProcessorGremlin,
4107
+ diagnostics: defaultRuleProcessorSQL
3415
4108
  };
3416
- /* istanbul ignore next */
4109
+ /* v8 ignore next -- @preserve */
3417
4110
  const defaultOperatorProcessor = (r) => r.operator;
3418
4111
  const defaultOperatorProcessors = {
3419
4112
  cel: defaultOperatorProcessor,
@@ -3432,13 +4125,20 @@ const defaultOperatorProcessors = {
3432
4125
  prisma: defaultOperatorProcessor,
3433
4126
  sequelize: defaultOperatorProcessor,
3434
4127
  spel: defaultOperatorProcessor,
3435
- sql: defaultOperatorProcessorSQL
4128
+ sql: defaultOperatorProcessorSQL,
4129
+ cypher: defaultOperatorProcessor,
4130
+ gql: defaultOperatorProcessor,
4131
+ sparql: defaultOperatorProcessor,
4132
+ gremlin: defaultOperatorProcessor,
4133
+ diagnostics: defaultOperatorProcessor
3436
4134
  };
3437
4135
  const defaultFallbackExpressions = {
3438
4136
  cel: "1 == 1",
3439
4137
  ldap: "",
3440
4138
  mongodb: "\"$and\":[{\"$expr\":true}]",
3441
4139
  natural_language: "1 is 1",
4140
+ sparql: "1 = 1",
4141
+ gremlin: "",
3442
4142
  spel: "1 == 1",
3443
4143
  sql: "(1 = 1)"
3444
4144
  };
@@ -3506,24 +4206,26 @@ function formatQuery(ruleGroup, optionParam = {}) {
3506
4206
  const getOperators = (f, m) => toFullOptionList(getOperators_option(f, m) ?? []);
3507
4207
  const fallbackExpression = fallbackExpression_option ?? defaultFallbackExpressions[format] ?? defaultFallbackExpressions.sql;
3508
4208
  let validationMap = {};
3509
- // istanbul ignore else
4209
+ // v8 ignore else
3510
4210
  if (typeof validator === "function") {
3511
4211
  const validationResult = validator(ruleGroup);
3512
4212
  if (typeof validationResult === "boolean") {
3513
- // istanbul ignore else
3514
- if (!validationResult) return format === "parameterized" ? {
3515
- sql: fallbackExpression,
3516
- params: []
3517
- } : format === "parameterized_named" ? {
3518
- sql: fallbackExpression,
3519
- params: {}
3520
- } : format === "mongodb" ? `{${fallbackExpression}}` : format === "mongodb_query" ? mongoDbFallback : format === "prisma" ? prismaFallback : format === "jsonlogic" ? false : format === "elasticsearch" ? {} : format === "drizzle" || format === "sequelize" ? void 0 : fallbackExpression;
4213
+ // v8 ignore else
4214
+ if (!validationResult) {
4215
+ if (format !== "diagnostics") return format === "parameterized" ? {
4216
+ sql: fallbackExpression,
4217
+ params: []
4218
+ } : format === "parameterized_named" ? {
4219
+ sql: fallbackExpression,
4220
+ params: {}
4221
+ } : format === "mongodb" ? `{${fallbackExpression}}` : format === "mongodb_query" ? mongoDbFallback : format === "prisma" ? prismaFallback : format === "jsonlogic" ? false : format === "elasticsearch" ? {} : format === "drizzle" || format === "sequelize" ? void 0 : fallbackExpression;
4222
+ }
3521
4223
  } else validationMap = validationResult;
3522
4224
  }
3523
4225
  const validatorMap = {};
3524
4226
  const uniqueFields = toFlatOptionArray(fields);
3525
4227
  for (const f of uniqueFields)
3526
- // istanbul ignore else
4228
+ // v8 ignore else
3527
4229
  if (typeof f.validator === "function") validatorMap[f.value ?? f.name] = f.validator;
3528
4230
  const validateRule = (rule) => {
3529
4231
  let validationResult;
@@ -3533,7 +4235,7 @@ function formatQuery(ruleGroup, optionParam = {}) {
3533
4235
  const fieldArr = uniqueFields.filter((f) => f.name === rule.field);
3534
4236
  if (fieldArr.length > 0) {
3535
4237
  const field = fieldArr[0];
3536
- // istanbul ignore else
4238
+ // v8 ignore else
3537
4239
  if (typeof field.validator === "function") fieldValidator = field.validator;
3538
4240
  }
3539
4241
  }
@@ -3577,6 +4279,11 @@ function formatQuery(ruleGroup, optionParam = {}) {
3577
4279
  case "prisma": return defaultRuleGroupProcessorPrisma(ruleGroup, finalOptions);
3578
4280
  case "drizzle": return defaultRuleGroupProcessorDrizzle(ruleGroup, finalOptions);
3579
4281
  case "sequelize": return defaultRuleGroupProcessorSequelize(ruleGroup, finalOptions);
4282
+ case "cypher":
4283
+ case "gql": return defaultRuleGroupProcessorCypher(ruleGroup, finalOptions);
4284
+ case "sparql": return defaultRuleGroupProcessorSPARQL(ruleGroup, finalOptions);
4285
+ case "gremlin": return defaultRuleGroupProcessorGremlin(ruleGroup, finalOptions);
4286
+ case "diagnostics": return defaultRuleGroupProcessorDiagnostics(ruleGroup, finalOptions);
3580
4287
  default: return "";
3581
4288
  }
3582
4289
  }
@@ -3727,6 +4434,7 @@ const generateAccessibleDescription = (params) => pathsAreEqual([], params.path)
3727
4434
  //#endregion
3728
4435
  //#region src/utils/generateID.ts
3729
4436
  const cryptoModule = globalThis.crypto;
4437
+ const uuidV4regex = /^[\da-f]{8}-[\da-f]{4}-4[\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}$/i;
3730
4438
  /**
3731
4439
  * Default `id` generator. Generates a valid v4 UUID. Uses `crypto.randomUUID()`
3732
4440
  * when available, otherwise uses an alternate method based on `getRandomValues`.
@@ -3736,11 +4444,11 @@ const cryptoModule = globalThis.crypto;
3736
4444
  * ```
3737
4445
  * @returns Valid v4 UUID
3738
4446
  */
3739
- // istanbul ignore next
4447
+ // v8 ignore next
3740
4448
  let generateID = () => "00-0-4-2-000".replaceAll(/[^-]/g, (s) => ((Math.random() + Math.trunc(s)) * 65536 >> Number.parseInt(s)).toString(16).padStart(4, "0"));
3741
- // istanbul ignore else
4449
+ // v8 ignore else
3742
4450
  if (cryptoModule) {
3743
- // istanbul ignore else
4451
+ // v8 ignore else
3744
4452
  if (typeof cryptoModule.randomUUID === "function") generateID = () => cryptoModule.randomUUID();
3745
4453
  else if (typeof cryptoModule.getRandomValues === "function") {
3746
4454
  const position19vals = "89ab";
@@ -3773,7 +4481,7 @@ const dummyFD$1 = {
3773
4481
  * `FullOption<MatchMode>[]` of all match modes by default.
3774
4482
  */
3775
4483
  const getMatchModesUtil = (fieldData, getMatchModes) => {
3776
- const fd = fieldData ? toFullOption(fieldData) : dummyFD$1;
4484
+ const fd = fieldData ? toFullOption(fieldData) : /* v8 ignore next -- @preserve */ dummyFD$1;
3777
4485
  let matchModes = fd.matchModes ?? false;
3778
4486
  if (!matchModes && getMatchModes) matchModes = getMatchModes(fd.value, { fieldData: fd });
3779
4487
  if (matchModes === true) return defaultMatchModes;
@@ -3835,7 +4543,7 @@ const getValueSourcesUtil = (fieldData, operator, getValueSources) => {
3835
4543
  const mergeAnyTranslations = (base, ...otherTranslations) => {
3836
4544
  const result = { ...base };
3837
4545
  for (const translations of otherTranslations)
3838
- // istanbul ignore else
4546
+ // v8 ignore else
3839
4547
  if (translations) for (const key of objectKeys(translations)) {
3840
4548
  if (isUnsafeKey(key)) continue;
3841
4549
  if (result[key]) result[key] = {
@@ -3896,6 +4604,8 @@ const mergeClassnames = (...args) => ({
3896
4604
  dndCopy: joinClassnamesByName("dndCopy", args),
3897
4605
  dndGroup: joinClassnamesByName("dndGroup", args),
3898
4606
  dndDropNotAllowed: joinClassnamesByName("dndDropNotAllowed", args),
4607
+ dndPreviewPosition: joinClassnamesByName("dndPreviewPosition", args),
4608
+ dndHidden: joinClassnamesByName("dndHidden", args),
3899
4609
  disabled: joinClassnamesByName("disabled", args),
3900
4610
  valueListItem: joinClassnamesByName("valueListItem", args),
3901
4611
  matchMode: joinClassnamesByName("matchMode", args),
@@ -3991,7 +4701,7 @@ const regenerateIDs = (subject, { idGenerator = generateID } = {}) => {
3991
4701
  ...subject,
3992
4702
  id: idGenerator()
3993
4703
  };
3994
- // istanbul ignore else
4704
+ // v8 ignore else
3995
4705
  if (Array.isArray(newGroup.rules)) newGroup.rules = subject.rules.map((r) => typeof r === "string" ? r : isRuleGroup(r) ? regenerateIDs(r, { idGenerator }) : regenerateID(r, { idGenerator }));
3996
4706
  return newGroup;
3997
4707
  };
@@ -4296,6 +5006,7 @@ exports.clsx = clsx;
4296
5006
  exports.convertFromIC = convertFromIC;
4297
5007
  exports.convertQuery = convertQuery;
4298
5008
  exports.convertToIC = convertToIC;
5009
+ exports.cypherCombinatorMap = cypherCombinatorMap;
4299
5010
  exports.defaultCELValueProcessor = defaultCELValueProcessor;
4300
5011
  exports.defaultCombinatorLabelMap = defaultCombinatorLabelMap;
4301
5012
  exports.defaultCombinators = defaultCombinators;
@@ -4323,8 +5034,11 @@ exports.defaultPlaceholderValueGroupLabel = defaultPlaceholderValueGroupLabel;
4323
5034
  exports.defaultPlaceholderValueLabel = defaultPlaceholderValueLabel;
4324
5035
  exports.defaultPlaceholderValueName = defaultPlaceholderValueName;
4325
5036
  exports.defaultRuleGroupProcessorCEL = defaultRuleGroupProcessorCEL;
5037
+ exports.defaultRuleGroupProcessorCypher = defaultRuleGroupProcessorCypher;
5038
+ exports.defaultRuleGroupProcessorDiagnostics = defaultRuleGroupProcessorDiagnostics;
4326
5039
  exports.defaultRuleGroupProcessorDrizzle = defaultRuleGroupProcessorDrizzle;
4327
5040
  exports.defaultRuleGroupProcessorElasticSearch = defaultRuleGroupProcessorElasticSearch;
5041
+ exports.defaultRuleGroupProcessorGremlin = defaultRuleGroupProcessorGremlin;
4328
5042
  exports.defaultRuleGroupProcessorJSONata = defaultRuleGroupProcessorJSONata;
4329
5043
  exports.defaultRuleGroupProcessorJsonLogic = defaultRuleGroupProcessorJsonLogic;
4330
5044
  exports.defaultRuleGroupProcessorLDAP = defaultRuleGroupProcessorLDAP;
@@ -4333,12 +5047,15 @@ exports.defaultRuleGroupProcessorMongoDBQuery = defaultRuleGroupProcessorMongoDB
4333
5047
  exports.defaultRuleGroupProcessorNL = defaultRuleGroupProcessorNL;
4334
5048
  exports.defaultRuleGroupProcessorParameterized = defaultRuleGroupProcessorParameterized;
4335
5049
  exports.defaultRuleGroupProcessorPrisma = defaultRuleGroupProcessorPrisma;
5050
+ exports.defaultRuleGroupProcessorSPARQL = defaultRuleGroupProcessorSPARQL;
4336
5051
  exports.defaultRuleGroupProcessorSQL = defaultRuleGroupProcessorSQL;
4337
5052
  exports.defaultRuleGroupProcessorSequelize = defaultRuleGroupProcessorSequelize;
4338
5053
  exports.defaultRuleGroupProcessorSpEL = defaultRuleGroupProcessorSpEL;
4339
5054
  exports.defaultRuleProcessorCEL = defaultRuleProcessorCEL;
5055
+ exports.defaultRuleProcessorCypher = defaultRuleProcessorCypher;
4340
5056
  exports.defaultRuleProcessorDrizzle = defaultRuleProcessorDrizzle;
4341
5057
  exports.defaultRuleProcessorElasticSearch = defaultRuleProcessorElasticSearch;
5058
+ exports.defaultRuleProcessorGremlin = defaultRuleProcessorGremlin;
4342
5059
  exports.defaultRuleProcessorJSONata = defaultRuleProcessorJSONata;
4343
5060
  exports.defaultRuleProcessorJsonLogic = defaultRuleProcessorJsonLogic;
4344
5061
  exports.defaultRuleProcessorLDAP = defaultRuleProcessorLDAP;
@@ -4347,6 +5064,7 @@ exports.defaultRuleProcessorMongoDBQuery = defaultRuleProcessorMongoDBQuery;
4347
5064
  exports.defaultRuleProcessorNL = defaultRuleProcessorNL;
4348
5065
  exports.defaultRuleProcessorParameterized = defaultRuleProcessorParameterized;
4349
5066
  exports.defaultRuleProcessorPrisma = defaultRuleProcessorPrisma;
5067
+ exports.defaultRuleProcessorSPARQL = defaultRuleProcessorSPARQL;
4350
5068
  exports.defaultRuleProcessorSQL = defaultRuleProcessorSQL;
4351
5069
  exports.defaultRuleProcessorSequelize = defaultRuleProcessorSequelize;
4352
5070
  exports.defaultRuleProcessorSpEL = defaultRuleProcessorSpEL;
@@ -4458,5 +5176,6 @@ exports.uniqOptGroups = uniqOptGroups;
4458
5176
  exports.uniqOptList = uniqOptList;
4459
5177
  exports.update = update;
4460
5178
  exports.updateInPlace = updateInPlace;
5179
+ exports.uuidV4regex = uuidV4regex;
4461
5180
 
4462
5181
  //# sourceMappingURL=react-querybuilder_core.cjs.development.js.map