@react-querybuilder/core 8.13.0 → 8.14.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 (68) hide show
  1. package/dist/{basic-_KlsCAyT.d.ts → basic-Dxm6jWFu.d.ts} +10 -10
  2. package/dist/{basic-Cw014pDc.d.mts → basic-GFsWfi0Z.d.mts} +10 -10
  3. package/dist/cjs/react-querybuilder_core.cjs.development.d.ts +23 -23
  4. package/dist/cjs/react-querybuilder_core.cjs.development.js +24 -1
  5. package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
  6. package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +23 -23
  7. package/dist/cjs/react-querybuilder_core.cjs.production.js +1 -1
  8. package/dist/cjs/react-querybuilder_core.cjs.production.js.map +1 -1
  9. package/dist/{export-DRA8O1Wz.d.ts → export-6VbkhCrf.d.ts} +2 -2
  10. package/dist/{export-CffjLxEe.d.mts → export-_wipiqJZ.d.mts} +2 -2
  11. package/dist/formatQuery.d.mts +2 -2
  12. package/dist/formatQuery.d.ts +2 -2
  13. package/dist/formatQuery.js +24 -1
  14. package/dist/formatQuery.js.map +1 -1
  15. package/dist/formatQuery.mjs +24 -1
  16. package/dist/formatQuery.mjs.map +1 -1
  17. package/dist/{import-CWYJkN_w.d.ts → import-D8M7awTx.d.ts} +2 -2
  18. package/dist/{import-DjHGaGhJ.d.mts → import-DRmutNSr.d.mts} +2 -2
  19. package/dist/parseCEL.d.mts +2 -2
  20. package/dist/parseCEL.d.ts +2 -2
  21. package/dist/parseCEL.js +6 -6
  22. package/dist/parseCEL.js.map +1 -1
  23. package/dist/parseCEL.mjs +1 -1
  24. package/dist/parseJSONata.d.mts +2 -2
  25. package/dist/parseJSONata.d.ts +2 -2
  26. package/dist/parseJSONata.js +3 -3
  27. package/dist/parseJSONata.js.map +1 -1
  28. package/dist/parseJSONata.mjs +1 -2
  29. package/dist/parseJSONata.mjs.map +1 -1
  30. package/dist/parseJsonLogic.d.mts +3 -3
  31. package/dist/parseJsonLogic.d.ts +3 -3
  32. package/dist/parseJsonLogic.js +1 -1
  33. package/dist/parseJsonLogic.mjs +1 -1
  34. package/dist/parseMongoDB.d.mts +2 -2
  35. package/dist/parseMongoDB.d.ts +2 -2
  36. package/dist/parseMongoDB.js +1 -1
  37. package/dist/parseMongoDB.mjs +1 -1
  38. package/dist/parseSQL.d.mts +2 -2
  39. package/dist/parseSQL.d.ts +2 -2
  40. package/dist/parseSQL.js +6 -6
  41. package/dist/parseSQL.js.map +1 -1
  42. package/dist/parseSQL.mjs +1 -1
  43. package/dist/parseSpEL.d.mts +2 -2
  44. package/dist/parseSpEL.d.ts +2 -2
  45. package/dist/parseSpEL.js +1 -1
  46. package/dist/parseSpEL.mjs +1 -1
  47. package/dist/{prepareQueryObjects-6Bxx4Bs1.mjs → prepareQueryObjects-BBayjIn2.mjs} +2 -5
  48. package/dist/prepareQueryObjects-BBayjIn2.mjs.map +1 -0
  49. package/dist/{prepareQueryObjects-CkN0bTKm.js → prepareQueryObjects-BxWvIPI4.js} +2 -5
  50. package/dist/prepareQueryObjects-BxWvIPI4.js.map +1 -0
  51. package/dist/react-querybuilder_core.d.mts +23 -23
  52. package/dist/react-querybuilder_core.legacy-esm.d.ts +23 -23
  53. package/dist/react-querybuilder_core.legacy-esm.js +28 -8
  54. package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
  55. package/dist/react-querybuilder_core.mjs +24 -1
  56. package/dist/react-querybuilder_core.mjs.map +1 -1
  57. package/dist/react-querybuilder_core.production.d.mts +23 -23
  58. package/dist/react-querybuilder_core.production.mjs +1 -1
  59. package/dist/react-querybuilder_core.production.mjs.map +1 -1
  60. package/dist/transformQuery.d.mts +1 -1
  61. package/dist/transformQuery.d.ts +1 -1
  62. package/dist/transformQuery.js +0 -1
  63. package/dist/transformQuery.mjs +0 -1
  64. package/dist/utils-CR1ToTMW.js.map +1 -1
  65. package/dist/utils-nQU7WCM9.mjs.map +1 -1
  66. package/package.json +14 -14
  67. package/dist/prepareQueryObjects-6Bxx4Bs1.mjs.map +0 -1
  68. package/dist/prepareQueryObjects-CkN0bTKm.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { C as Except, a as ValueSource, b as FullOptionList, c as RuleValidator, f as RuleGroupTypeAny, h as DefaultOperatorName, i as ParseNumbersPropConfig, l as ValidationMap, n as FullOperator, r as InputType, s as QueryValidator, t as FullField, u as ValidationResult, v as RuleType, y as FlexibleOptionList } from "./basic-_KlsCAyT.js";
1
+ import { C as Except, a as ValueSource, b as FullOptionList, c as RuleValidator, f as RuleGroupTypeAny, h as DefaultOperatorName, i as ParseNumbersPropConfig, l as ValidationMap, n as FullOperator, r as InputType, s as QueryValidator, t as FullField, u as ValidationResult, v as RuleType, y as FlexibleOptionList } from "./basic-Dxm6jWFu.js";
2
2
  import { RulesLogic } from "json-logic-js";
3
3
 
4
4
  //#region src/types/export.d.ts
@@ -449,4 +449,4 @@ type NLTranslationKey = "and" | "or" | "true" | "false" | `groupPrefix${ZeroOrMo
449
449
  type NLTranslations = Partial<Record<NLTranslationKey, string>>;
450
450
  //#endregion
451
451
  export { ValueProcessorOptions as _, FormatQueryOptions as a, NLTranslations as c, RQBJsonLogic as d, RuleGroupProcessor as f, ValueProcessorLegacy as g, ValueProcessorByRule as h, ExportOperatorMap as i, ParameterizedNamedSQL as l, SQLPreset as m, ExportFormat as n, GroupVariantCondition as o, RuleProcessor as p, ExportObjectFormats as r, NLTranslationKey as s, ConstituentWordOrder as t, ParameterizedSQL as u };
452
- //# sourceMappingURL=export-DRA8O1Wz.d.ts.map
452
+ //# sourceMappingURL=export-6VbkhCrf.d.ts.map
@@ -1,4 +1,4 @@
1
- import { C as Except, a as ValueSource, b as FullOptionList, c as RuleValidator, f as RuleGroupTypeAny, h as DefaultOperatorName, i as ParseNumbersPropConfig, l as ValidationMap, n as FullOperator, r as InputType, s as QueryValidator, t as FullField, u as ValidationResult, v as RuleType, y as FlexibleOptionList } from "./basic-Cw014pDc.mjs";
1
+ import { C as Except, a as ValueSource, b as FullOptionList, c as RuleValidator, f as RuleGroupTypeAny, h as DefaultOperatorName, i as ParseNumbersPropConfig, l as ValidationMap, n as FullOperator, r as InputType, s as QueryValidator, t as FullField, u as ValidationResult, v as RuleType, y as FlexibleOptionList } from "./basic-GFsWfi0Z.mjs";
2
2
  import { RulesLogic } from "json-logic-js";
3
3
 
4
4
  //#region src/types/export.d.ts
@@ -449,4 +449,4 @@ type NLTranslationKey = "and" | "or" | "true" | "false" | `groupPrefix${ZeroOrMo
449
449
  type NLTranslations = Partial<Record<NLTranslationKey, string>>;
450
450
  //#endregion
451
451
  export { ValueProcessorOptions as _, FormatQueryOptions as a, NLTranslations as c, RQBJsonLogic as d, RuleGroupProcessor as f, ValueProcessorLegacy as g, ValueProcessorByRule as h, ExportOperatorMap as i, ParameterizedNamedSQL as l, SQLPreset as m, ExportFormat as n, GroupVariantCondition as o, RuleProcessor as p, ExportObjectFormats as r, NLTranslationKey as s, ConstituentWordOrder as t, ParameterizedSQL as u };
452
- //# sourceMappingURL=export-CffjLxEe.d.mts.map
452
+ //# sourceMappingURL=export-_wipiqJZ.d.mts.map
@@ -1,5 +1,5 @@
1
- import { S as SetRequired, f as RuleGroupTypeAny, v as RuleType } from "./basic-Cw014pDc.mjs";
2
- import { _ as ValueProcessorOptions, a as FormatQueryOptions, c as NLTranslations, d as RQBJsonLogic, f as RuleGroupProcessor, g as ValueProcessorLegacy, h as ValueProcessorByRule, i as ExportOperatorMap, l as ParameterizedNamedSQL, m as SQLPreset, n as ExportFormat, o as GroupVariantCondition, p as RuleProcessor, r as ExportObjectFormats, s as NLTranslationKey, t as ConstituentWordOrder, u as ParameterizedSQL } from "./export-CffjLxEe.mjs";
1
+ import { S as SetRequired, f as RuleGroupTypeAny, v as RuleType } from "./basic-GFsWfi0Z.mjs";
2
+ import { _ as ValueProcessorOptions, a as FormatQueryOptions, c as NLTranslations, d as RQBJsonLogic, f as RuleGroupProcessor, g as ValueProcessorLegacy, h as ValueProcessorByRule, i as ExportOperatorMap, l as ParameterizedNamedSQL, m as SQLPreset, n as ExportFormat, o as GroupVariantCondition, p as RuleProcessor, r as ExportObjectFormats, s as NLTranslationKey, t as ConstituentWordOrder, u as ParameterizedSQL } from "./export-_wipiqJZ.mjs";
3
3
  import { Column, Operators, SQL, Table } from "drizzle-orm";
4
4
  import { WhereOptions } from "sequelize";
5
5
 
@@ -1,5 +1,5 @@
1
- import { S as SetRequired, f as RuleGroupTypeAny, v as RuleType } from "./basic-_KlsCAyT.js";
2
- import { _ as ValueProcessorOptions, a as FormatQueryOptions, c as NLTranslations, d as RQBJsonLogic, f as RuleGroupProcessor, g as ValueProcessorLegacy, h as ValueProcessorByRule, i as ExportOperatorMap, l as ParameterizedNamedSQL, m as SQLPreset, n as ExportFormat, o as GroupVariantCondition, p as RuleProcessor, r as ExportObjectFormats, s as NLTranslationKey, t as ConstituentWordOrder, u as ParameterizedSQL } from "./export-DRA8O1Wz.js";
1
+ import { S as SetRequired, f as RuleGroupTypeAny, v as RuleType } from "./basic-Dxm6jWFu.js";
2
+ import { _ as ValueProcessorOptions, a as FormatQueryOptions, c as NLTranslations, d as RQBJsonLogic, f as RuleGroupProcessor, g as ValueProcessorLegacy, h as ValueProcessorByRule, i as ExportOperatorMap, l as ParameterizedNamedSQL, m as SQLPreset, n as ExportFormat, o as GroupVariantCondition, p as RuleProcessor, r as ExportObjectFormats, s as NLTranslationKey, t as ConstituentWordOrder, u as ParameterizedSQL } from "./export-6VbkhCrf.js";
3
3
  import { Column, Operators, SQL, Table } from "drizzle-orm";
4
4
  import { WhereOptions } from "sequelize";
5
5
 
@@ -1196,7 +1196,30 @@ const defaultRuleProcessorElasticSearch = (rule, options = {}) => {
1196
1196
  const { field, operator, value, valueSource } = rule;
1197
1197
  const { parseNumbers, preserveValueOrder } = options;
1198
1198
  const operatorLC = require_isRuleGroup.lc(operator);
1199
- if (require_utils.processMatchMode(rule)) return false;
1199
+ const matchEval = require_utils.processMatchMode(rule);
1200
+ if (matchEval === false) return false;
1201
+ else if (matchEval) {
1202
+ const { mode } = matchEval;
1203
+ const subQuery = defaultRuleGroupProcessorElasticSearch(require_transformQuery.transformQuery(rule.value, { ruleProcessor: (r) => ({
1204
+ ...r,
1205
+ field: r.field ? `${field}.${r.field}` : field
1206
+ }) }), options);
1207
+ if (Object.keys(subQuery).length === 0) return false;
1208
+ switch (mode) {
1209
+ case "some": return { nested: {
1210
+ path: field,
1211
+ query: subQuery
1212
+ } };
1213
+ case "none": return { bool: { must_not: { nested: {
1214
+ path: field,
1215
+ query: subQuery
1216
+ } } } };
1217
+ case "all":
1218
+ case "atleast":
1219
+ case "atmost":
1220
+ case "exactly": return false;
1221
+ }
1222
+ }
1200
1223
  if (valueSource === "field") {
1201
1224
  if (require_utils.toArray(value).some((v) => typeof v !== "string")) return false;
1202
1225
  const fieldForScript = escapeSQ(field);