@react-querybuilder/core 8.10.0 → 8.11.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.
Files changed (73) hide show
  1. package/dist/{arrayUtils-C9sO4qLO.mjs → arrayUtils-A_OXU9W1.mjs} +3 -3
  2. package/dist/{arrayUtils-C9sO4qLO.mjs.map → arrayUtils-A_OXU9W1.mjs.map} +1 -1
  3. package/dist/basic-B4vXboTG.d.mts +1257 -0
  4. package/dist/basic-BeKPP0_1.d.ts +1257 -0
  5. package/dist/cjs/react-querybuilder_core.cjs.development.d.ts +412 -278
  6. package/dist/cjs/react-querybuilder_core.cjs.development.js +53 -1
  7. package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
  8. package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +412 -278
  9. package/dist/cjs/react-querybuilder_core.cjs.production.js +1 -1
  10. package/dist/cjs/react-querybuilder_core.cjs.production.js.map +1 -1
  11. package/dist/{convertQuery-BUgyz1GA.mjs → convertQuery-CqX3rPvj.mjs} +3 -3
  12. package/dist/{convertQuery-BUgyz1GA.mjs.map → convertQuery-CqX3rPvj.mjs.map} +1 -1
  13. package/dist/{export-GUuxJ7zR.d.ts → export-BjRt-qrK.d.mts} +6 -7
  14. package/dist/{export-Ccjfea21.d.mts → export-CQB0nuvW.d.ts} +6 -7
  15. package/dist/formatQuery.d.mts +2 -3
  16. package/dist/formatQuery.d.ts +2 -3
  17. package/dist/formatQuery.mjs +6 -6
  18. package/dist/{import-Dxevzw_-.d.mts → import-Bc_p8ls9.d.mts} +3 -3
  19. package/dist/{import-D-hm1phN.d.ts → import-Dvayhrgj.d.ts} +3 -3
  20. package/dist/{isRuleGroup-CGe_rb2w.mjs → isRuleGroup-CYcfPgbg.mjs} +2 -2
  21. package/dist/{isRuleGroup-CGe_rb2w.mjs.map → isRuleGroup-CYcfPgbg.mjs.map} +1 -1
  22. package/dist/optGroupUtils-B0hTpodo.js.map +1 -1
  23. package/dist/{optGroupUtils-DrubUpx0.mjs → optGroupUtils-VeZ3k7-1.mjs} +3 -3
  24. package/dist/optGroupUtils-VeZ3k7-1.mjs.map +1 -0
  25. package/dist/parseCEL.d.mts +2 -3
  26. package/dist/parseCEL.d.ts +2 -3
  27. package/dist/parseCEL.js +761 -1095
  28. package/dist/parseCEL.js.map +1 -1
  29. package/dist/parseCEL.mjs +763 -1099
  30. package/dist/parseCEL.mjs.map +1 -1
  31. package/dist/parseJSONata.d.mts +2 -3
  32. package/dist/parseJSONata.d.ts +2 -3
  33. package/dist/parseJSONata.mjs +3 -3
  34. package/dist/parseJsonLogic.d.mts +4 -4
  35. package/dist/parseJsonLogic.d.ts +4 -4
  36. package/dist/parseJsonLogic.mjs +5 -5
  37. package/dist/parseMongoDB.d.mts +2 -3
  38. package/dist/parseMongoDB.d.ts +2 -3
  39. package/dist/parseMongoDB.mjs +5 -5
  40. package/dist/{parseNumber-B_-sR6d5.mjs → parseNumber-CXdMVNFx.mjs} +2 -2
  41. package/dist/{parseNumber-B_-sR6d5.mjs.map → parseNumber-CXdMVNFx.mjs.map} +1 -1
  42. package/dist/parseSQL.d.mts +2 -3
  43. package/dist/parseSQL.d.ts +2 -3
  44. package/dist/parseSQL.js +2681 -3021
  45. package/dist/parseSQL.js.map +1 -1
  46. package/dist/parseSQL.mjs +2684 -3026
  47. package/dist/parseSQL.mjs.map +1 -1
  48. package/dist/parseSpEL.d.mts +2 -3
  49. package/dist/parseSpEL.d.ts +2 -3
  50. package/dist/parseSpEL.mjs +4 -4
  51. package/dist/{prepareQueryObjects-CJNpnGcJ.mjs → prepareQueryObjects-DPCC-iHp.mjs} +4 -4
  52. package/dist/{prepareQueryObjects-CJNpnGcJ.mjs.map → prepareQueryObjects-DPCC-iHp.mjs.map} +1 -1
  53. package/dist/query-builder.css +1 -1
  54. package/dist/query-builder.css.map +1 -1
  55. package/dist/react-querybuilder_core.d.mts +412 -278
  56. package/dist/react-querybuilder_core.legacy-esm.d.ts +412 -278
  57. package/dist/react-querybuilder_core.legacy-esm.js +57 -9
  58. package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
  59. package/dist/react-querybuilder_core.mjs +50 -2
  60. package/dist/react-querybuilder_core.mjs.map +1 -1
  61. package/dist/react-querybuilder_core.production.d.mts +412 -278
  62. package/dist/react-querybuilder_core.production.mjs +1 -1
  63. package/dist/react-querybuilder_core.production.mjs.map +1 -1
  64. package/dist/styles/_main.scss +5 -0
  65. package/dist/{transformQuery-DHvtgDgZ.mjs → transformQuery-DCCpjtyq.mjs} +3 -3
  66. package/dist/{transformQuery-DHvtgDgZ.mjs.map → transformQuery-DCCpjtyq.mjs.map} +1 -1
  67. package/dist/transformQuery.d.mts +1 -1
  68. package/dist/transformQuery.d.ts +1 -1
  69. package/dist/transformQuery.mjs +2 -2
  70. package/package.json +11 -9
  71. package/dist/basic-BmpEwexQ.d.mts +0 -363
  72. package/dist/basic-CDDA-KZa.d.ts +0 -363
  73. package/dist/optGroupUtils-DrubUpx0.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { defaultJoinChar } from "./optGroupUtils-DrubUpx0.mjs";
1
+ import { c as defaultJoinChar } from "./optGroupUtils-VeZ3k7-1.mjs";
2
2
 
3
3
  //#region src/utils/arrayUtils.ts
4
4
  /**
@@ -46,5 +46,5 @@ const trimIfString = (val) => typeof val === "string" ? val.trim() : val;
46
46
  const toArray = (v, { retainEmptyStrings } = {}) => Array.isArray(v) ? v.map((v$1) => trimIfString(v$1)) : typeof v === "string" ? splitBy(v, defaultJoinChar).filter(retainEmptyStrings ? () => true : (s) => !/^\s*$/.test(s)).map((s) => s.trim()) : typeof v === "number" ? [v] : [];
47
47
 
48
48
  //#endregion
49
- export { joinWith, splitBy, toArray, trimIfString };
50
- //# sourceMappingURL=arrayUtils-C9sO4qLO.mjs.map
49
+ export { trimIfString as i, splitBy as n, toArray as r, joinWith as t };
50
+ //# sourceMappingURL=arrayUtils-A_OXU9W1.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"arrayUtils-C9sO4qLO.mjs","names":["v"],"sources":["../src/utils/arrayUtils.ts"],"sourcesContent":["import { defaultJoinChar } from '../defaults';\n\n/**\n * Splits a string by a given character (see {@link defaultJoinChar}). Escaped characters\n * (characters preceded by a backslash) will not apply to the split, and the backslash will\n * be removed in the array element. Inverse of {@link joinWith}.\n *\n * @example\n * splitBy('this\\\\,\\\\,that,,the other,,,\\\\,')\n * // or\n * splitBy('this\\\\,\\\\,that,,the other,,,\\\\,', ',')\n * // would return\n * ['this,,that', '', 'the other', '', '', ',']\n */\nexport const splitBy = (str?: string, splitChar: string = defaultJoinChar): string[] =>\n typeof str === 'string'\n ? str\n .split(`\\\\${splitChar}`)\n .map(c => c.split(splitChar))\n .reduce((prev, curr, idx) => {\n if (idx === 0) {\n return curr;\n }\n return [...prev.slice(0, -1), `${prev.at(-1)}${splitChar}${curr[0]}`, ...curr.slice(1)];\n }, [])\n : [];\n\n/**\n * Joins an array of strings using the given character (see {@link defaultJoinChar}). When\n * the given character appears in an array element, a backslash will be added just before it\n * to distinguish it from the join character. Effectively the inverse of {@link splitBy}.\n *\n * TIP: The join character can actually be a string of any length. Only the first character\n * will be searched for in the array elements and preceded by a backslash.\n *\n * @example\n * joinWith(['this,,that', '', 'the other', '', '', ','], ', ')\n * // would return\n * 'this\\\\,\\\\,that, , the other, , , \\\\,'\n */\n// oxlint-disable-next-line typescript/no-explicit-any\nexport const joinWith = (strArr: any[], joinChar: string = defaultJoinChar): string =>\n strArr.map(str => `${str ?? ''}`.replaceAll(joinChar[0], `\\\\${joinChar[0]}`)).join(joinChar);\n\n/**\n * Trims the value if it is a string. Otherwise returns the value as is.\n */\n// oxlint-disable-next-line typescript/no-explicit-any\nexport const trimIfString = (val: any): any => (typeof val === 'string' ? val.trim() : val);\n\n/**\n * Splits a string by comma then trims each element. Arrays are returned as is except\n * any string elements are trimmed.\n */\nexport const toArray = (\n // oxlint-disable-next-line typescript/no-explicit-any\n v: any,\n { retainEmptyStrings }: { retainEmptyStrings?: boolean } = {}\n // oxlint-disable-next-line typescript/no-explicit-any\n): any[] =>\n Array.isArray(v)\n ? v.map(v => trimIfString(v))\n : typeof v === 'string'\n ? splitBy(v, defaultJoinChar)\n .filter(retainEmptyStrings ? () => true : s => !/^\\s*$/.test(s))\n .map(s => s.trim())\n : typeof v === 'number'\n ? [v]\n : [];\n\n/**\n * Determines if an array is free of `null`/`undefined`.\n */\nexport const nullFreeArray = <T>(arr: T[]): arr is Exclude<T, null>[] =>\n arr.every(el => el === false || (el ?? false) !== false);\n"],"mappings":";;;;;;;;;;;;;;;AAcA,MAAa,WAAW,KAAc,YAAoB,oBACxD,OAAO,QAAQ,WACX,IACG,MAAM,KAAK,YAAY,CACvB,KAAI,MAAK,EAAE,MAAM,UAAU,CAAC,CAC5B,QAAQ,MAAM,MAAM,QAAQ;AAC3B,KAAI,QAAQ,EACV,QAAO;AAET,QAAO;EAAC,GAAG,KAAK,MAAM,GAAG,GAAG;EAAE,GAAG,KAAK,GAAG,GAAG,GAAG,YAAY,KAAK;EAAM,GAAG,KAAK,MAAM,EAAE;EAAC;GACtF,EAAE,CAAC,GACR,EAAE;;;;;;;;;;;;;;AAgBR,MAAa,YAAY,QAAe,WAAmB,oBACzD,OAAO,KAAI,QAAO,GAAG,OAAO,KAAK,WAAW,SAAS,IAAI,KAAK,SAAS,KAAK,CAAC,CAAC,KAAK,SAAS;;;;AAM9F,MAAa,gBAAgB,QAAmB,OAAO,QAAQ,WAAW,IAAI,MAAM,GAAG;;;;;AAMvF,MAAa,WAEX,GACA,EAAE,uBAAyD,EAAE,KAG7D,MAAM,QAAQ,EAAE,GACZ,EAAE,KAAI,QAAK,aAAaA,IAAE,CAAC,GAC3B,OAAO,MAAM,WACX,QAAQ,GAAG,gBAAgB,CACxB,OAAO,2BAA2B,QAAO,MAAK,CAAC,QAAQ,KAAK,EAAE,CAAC,CAC/D,KAAI,MAAK,EAAE,MAAM,CAAC,GACrB,OAAO,MAAM,WACX,CAAC,EAAE,GACH,EAAE"}
1
+ {"version":3,"file":"arrayUtils-A_OXU9W1.mjs","names":["v"],"sources":["../src/utils/arrayUtils.ts"],"sourcesContent":["import { defaultJoinChar } from '../defaults';\n\n/**\n * Splits a string by a given character (see {@link defaultJoinChar}). Escaped characters\n * (characters preceded by a backslash) will not apply to the split, and the backslash will\n * be removed in the array element. Inverse of {@link joinWith}.\n *\n * @example\n * splitBy('this\\\\,\\\\,that,,the other,,,\\\\,')\n * // or\n * splitBy('this\\\\,\\\\,that,,the other,,,\\\\,', ',')\n * // would return\n * ['this,,that', '', 'the other', '', '', ',']\n */\nexport const splitBy = (str?: string, splitChar: string = defaultJoinChar): string[] =>\n typeof str === 'string'\n ? str\n .split(`\\\\${splitChar}`)\n .map(c => c.split(splitChar))\n .reduce((prev, curr, idx) => {\n if (idx === 0) {\n return curr;\n }\n return [...prev.slice(0, -1), `${prev.at(-1)}${splitChar}${curr[0]}`, ...curr.slice(1)];\n }, [])\n : [];\n\n/**\n * Joins an array of strings using the given character (see {@link defaultJoinChar}). When\n * the given character appears in an array element, a backslash will be added just before it\n * to distinguish it from the join character. Effectively the inverse of {@link splitBy}.\n *\n * TIP: The join character can actually be a string of any length. Only the first character\n * will be searched for in the array elements and preceded by a backslash.\n *\n * @example\n * joinWith(['this,,that', '', 'the other', '', '', ','], ', ')\n * // would return\n * 'this\\\\,\\\\,that, , the other, , , \\\\,'\n */\n// oxlint-disable-next-line typescript/no-explicit-any\nexport const joinWith = (strArr: any[], joinChar: string = defaultJoinChar): string =>\n strArr.map(str => `${str ?? ''}`.replaceAll(joinChar[0], `\\\\${joinChar[0]}`)).join(joinChar);\n\n/**\n * Trims the value if it is a string. Otherwise returns the value as is.\n */\n// oxlint-disable-next-line typescript/no-explicit-any\nexport const trimIfString = (val: any): any => (typeof val === 'string' ? val.trim() : val);\n\n/**\n * Splits a string by comma then trims each element. Arrays are returned as is except\n * any string elements are trimmed.\n */\nexport const toArray = (\n // oxlint-disable-next-line typescript/no-explicit-any\n v: any,\n { retainEmptyStrings }: { retainEmptyStrings?: boolean } = {}\n // oxlint-disable-next-line typescript/no-explicit-any\n): any[] =>\n Array.isArray(v)\n ? v.map(v => trimIfString(v))\n : typeof v === 'string'\n ? splitBy(v, defaultJoinChar)\n .filter(retainEmptyStrings ? () => true : s => !/^\\s*$/.test(s))\n .map(s => s.trim())\n : typeof v === 'number'\n ? [v]\n : [];\n\n/**\n * Determines if an array is free of `null`/`undefined`.\n */\nexport const nullFreeArray = <T>(arr: T[]): arr is Exclude<T, null>[] =>\n arr.every(el => el === false || (el ?? false) !== false);\n"],"mappings":";;;;;;;;;;;;;;;AAcA,MAAa,WAAW,KAAc,YAAoB,oBACxD,OAAO,QAAQ,WACX,IACG,MAAM,KAAK,YAAY,CACvB,KAAI,MAAK,EAAE,MAAM,UAAU,CAAC,CAC5B,QAAQ,MAAM,MAAM,QAAQ;AAC3B,KAAI,QAAQ,EACV,QAAO;AAET,QAAO;EAAC,GAAG,KAAK,MAAM,GAAG,GAAG;EAAE,GAAG,KAAK,GAAG,GAAG,GAAG,YAAY,KAAK;EAAM,GAAG,KAAK,MAAM,EAAE;EAAC;GACtF,EAAE,CAAC,GACR,EAAE;;;;;;;;;;;;;;AAgBR,MAAa,YAAY,QAAe,WAAmB,oBACzD,OAAO,KAAI,QAAO,GAAG,OAAO,KAAK,WAAW,SAAS,IAAI,KAAK,SAAS,KAAK,CAAC,CAAC,KAAK,SAAS;;;;AAM9F,MAAa,gBAAgB,QAAmB,OAAO,QAAQ,WAAW,IAAI,MAAM,GAAG;;;;;AAMvF,MAAa,WAEX,GACA,EAAE,uBAAyD,EAAE,KAG7D,MAAM,QAAQ,EAAE,GACZ,EAAE,KAAI,QAAK,aAAaA,IAAE,CAAC,GAC3B,OAAO,MAAM,WACX,QAAQ,GAAG,gBAAgB,CACxB,OAAO,2BAA2B,QAAO,MAAK,CAAC,QAAQ,KAAK,EAAE,CAAC,CAC/D,KAAI,MAAK,EAAE,MAAM,CAAC,GACrB,OAAO,MAAM,WACX,CAAC,EAAE,GACH,EAAE"}