@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.
- package/dist/{basic-_KlsCAyT.d.ts → basic-Dxm6jWFu.d.ts} +10 -10
- package/dist/{basic-Cw014pDc.d.mts → basic-GFsWfi0Z.d.mts} +10 -10
- package/dist/cjs/react-querybuilder_core.cjs.development.d.ts +23 -23
- package/dist/cjs/react-querybuilder_core.cjs.development.js +24 -1
- package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +23 -23
- package/dist/cjs/react-querybuilder_core.cjs.production.js +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.js.map +1 -1
- package/dist/{export-DRA8O1Wz.d.ts → export-6VbkhCrf.d.ts} +2 -2
- package/dist/{export-CffjLxEe.d.mts → export-_wipiqJZ.d.mts} +2 -2
- package/dist/formatQuery.d.mts +2 -2
- package/dist/formatQuery.d.ts +2 -2
- package/dist/formatQuery.js +24 -1
- package/dist/formatQuery.js.map +1 -1
- package/dist/formatQuery.mjs +24 -1
- package/dist/formatQuery.mjs.map +1 -1
- package/dist/{import-CWYJkN_w.d.ts → import-D8M7awTx.d.ts} +2 -2
- package/dist/{import-DjHGaGhJ.d.mts → import-DRmutNSr.d.mts} +2 -2
- package/dist/parseCEL.d.mts +2 -2
- package/dist/parseCEL.d.ts +2 -2
- package/dist/parseCEL.js +6 -6
- package/dist/parseCEL.js.map +1 -1
- package/dist/parseCEL.mjs +1 -1
- package/dist/parseJSONata.d.mts +2 -2
- package/dist/parseJSONata.d.ts +2 -2
- package/dist/parseJSONata.js +3 -3
- package/dist/parseJSONata.js.map +1 -1
- package/dist/parseJSONata.mjs +1 -2
- package/dist/parseJSONata.mjs.map +1 -1
- package/dist/parseJsonLogic.d.mts +3 -3
- package/dist/parseJsonLogic.d.ts +3 -3
- package/dist/parseJsonLogic.js +1 -1
- package/dist/parseJsonLogic.mjs +1 -1
- package/dist/parseMongoDB.d.mts +2 -2
- package/dist/parseMongoDB.d.ts +2 -2
- package/dist/parseMongoDB.js +1 -1
- package/dist/parseMongoDB.mjs +1 -1
- package/dist/parseSQL.d.mts +2 -2
- package/dist/parseSQL.d.ts +2 -2
- package/dist/parseSQL.js +6 -6
- package/dist/parseSQL.js.map +1 -1
- package/dist/parseSQL.mjs +1 -1
- package/dist/parseSpEL.d.mts +2 -2
- package/dist/parseSpEL.d.ts +2 -2
- package/dist/parseSpEL.js +1 -1
- package/dist/parseSpEL.mjs +1 -1
- package/dist/{prepareQueryObjects-6Bxx4Bs1.mjs → prepareQueryObjects-BBayjIn2.mjs} +2 -5
- package/dist/prepareQueryObjects-BBayjIn2.mjs.map +1 -0
- package/dist/{prepareQueryObjects-CkN0bTKm.js → prepareQueryObjects-BxWvIPI4.js} +2 -5
- package/dist/prepareQueryObjects-BxWvIPI4.js.map +1 -0
- package/dist/react-querybuilder_core.d.mts +23 -23
- package/dist/react-querybuilder_core.legacy-esm.d.ts +23 -23
- package/dist/react-querybuilder_core.legacy-esm.js +28 -8
- package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
- package/dist/react-querybuilder_core.mjs +24 -1
- package/dist/react-querybuilder_core.mjs.map +1 -1
- package/dist/react-querybuilder_core.production.d.mts +23 -23
- package/dist/react-querybuilder_core.production.mjs +1 -1
- package/dist/react-querybuilder_core.production.mjs.map +1 -1
- package/dist/transformQuery.d.mts +1 -1
- package/dist/transformQuery.d.ts +1 -1
- package/dist/transformQuery.js +0 -1
- package/dist/transformQuery.mjs +0 -1
- package/dist/utils-CR1ToTMW.js.map +1 -1
- package/dist/utils-nQU7WCM9.mjs.map +1 -1
- package/package.json +14 -14
- package/dist/prepareQueryObjects-6Bxx4Bs1.mjs.map +0 -1
- 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-
|
|
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-
|
|
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-
|
|
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-
|
|
452
|
+
//# sourceMappingURL=export-_wipiqJZ.d.mts.map
|
package/dist/formatQuery.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SetRequired, f as RuleGroupTypeAny, v as RuleType } from "./basic-
|
|
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-
|
|
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
|
|
package/dist/formatQuery.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SetRequired, f as RuleGroupTypeAny, v as RuleType } from "./basic-
|
|
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-
|
|
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
|
|
package/dist/formatQuery.js
CHANGED
|
@@ -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
|
-
|
|
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);
|