@react-querybuilder/core 8.14.3 → 8.14.4
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/cjs/react-querybuilder_core.cjs.development.js +6 -4
- package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
- 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/formatQuery.d.mts +1 -2
- package/dist/formatQuery.d.ts +1 -2
- package/dist/formatQuery.js +6 -4
- package/dist/formatQuery.js.map +1 -1
- package/dist/formatQuery.mjs +6 -4
- package/dist/formatQuery.mjs.map +1 -1
- package/dist/{import-Bltb2mT4.d.mts → import-BwQqExpO.d.mts} +2 -2
- package/dist/{import-B5Iq8XmL.d.ts → import-CrJf23Nf.d.ts} +2 -2
- package/dist/{basic-CNIjb6rI.d.mts → index-CYT4Saz-.d.mts} +450 -2
- package/dist/{basic-BXJVfD0P.d.ts → index-DBlQeLax.d.ts} +450 -2
- package/dist/parseCEL.d.mts +2 -2
- package/dist/parseCEL.d.ts +2 -2
- package/dist/parseJSONata.d.mts +2 -2
- package/dist/parseJSONata.d.ts +2 -2
- package/dist/parseJsonLogic.d.mts +2 -3
- package/dist/parseJsonLogic.d.ts +2 -3
- package/dist/parseMongoDB.d.mts +2 -2
- package/dist/parseMongoDB.d.ts +2 -2
- package/dist/parseSQL.d.mts +2 -2
- package/dist/parseSQL.d.ts +2 -2
- package/dist/parseSpEL.d.mts +2 -2
- package/dist/parseSpEL.d.ts +2 -2
- package/dist/react-querybuilder_core.legacy-esm.js +15 -11
- package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
- package/dist/react-querybuilder_core.mjs +6 -4
- package/dist/react-querybuilder_core.mjs.map +1 -1
- 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/package.json +7 -6
- package/dist/export-6x7MilFR.d.mts +0 -451
- package/dist/export-CpJOQuZv.d.ts +0 -451
package/dist/formatQuery.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
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-6x7MilFR.mjs";
|
|
1
|
+
import { D as RuleType, _ as ValueProcessorOptions, a as FormatQueryOptions, c as NLTranslations, d as RQBJsonLogic, f as RuleGroupProcessor, g as ValueProcessorLegacy, h as ValueProcessorByRule, i as ExportOperatorMap, k as SetRequired, 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, x as RuleGroupTypeAny } from "./index-CYT4Saz-.mjs";
|
|
3
2
|
import { Column, Operators, SQL, Table } from "drizzle-orm";
|
|
4
3
|
import { WhereOptions } from "sequelize";
|
|
5
4
|
|
package/dist/formatQuery.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
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-CpJOQuZv.js";
|
|
1
|
+
import { D as RuleType, _ as ValueProcessorOptions, a as FormatQueryOptions, c as NLTranslations, d as RQBJsonLogic, f as RuleGroupProcessor, g as ValueProcessorLegacy, h as ValueProcessorByRule, i as ExportOperatorMap, k as SetRequired, 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, x as RuleGroupTypeAny } from "./index-DBlQeLax.js";
|
|
3
2
|
import { Column, Operators, SQL, Table } from "drizzle-orm";
|
|
4
3
|
import { WhereOptions } from "sequelize";
|
|
5
4
|
|
package/dist/formatQuery.js
CHANGED
|
@@ -174,7 +174,8 @@ const mongoDbFallback = { $and: [{ $expr: true }] };
|
|
|
174
174
|
* @group Export
|
|
175
175
|
*/
|
|
176
176
|
const defaultRuleGroupProcessorMongoDBQuery = (ruleGroup, options, meta) => {
|
|
177
|
-
const { fields, getParseNumberBoolean, placeholderFieldName, placeholderOperatorName, placeholderValueName, ruleProcessor, validateRule, validationMap } = options;
|
|
177
|
+
const { context, fields, getParseNumberBoolean, placeholderFieldName, placeholderOperatorName, placeholderValueName, ruleProcessor, validateRule, validationMap } = options;
|
|
178
|
+
const { inExpressionContext } = context ?? {};
|
|
178
179
|
const processRuleGroup = (rg, outermost) => {
|
|
179
180
|
if (!isRuleOrGroupValid(rg, validationMap[rg.id ?? ""])) return outermost ? mongoDbFallback : false;
|
|
180
181
|
const combinator = `$${require_objectUtils.lc(rg.combinator)}`;
|
|
@@ -198,7 +199,7 @@ const defaultRuleGroupProcessorMongoDBQuery = (ruleGroup, options, meta) => {
|
|
|
198
199
|
}, meta);
|
|
199
200
|
}).filter(Boolean);
|
|
200
201
|
const result = expressions.length > 0 ? expressions.length === 1 && !hasChildRules ? expressions[0] : { [combinator]: expressions } : mongoDbFallback;
|
|
201
|
-
return rg.not ? { $not: result } : result;
|
|
202
|
+
return rg.not ? inExpressionContext ? { $not: result } : { $nor: [result] } : result;
|
|
202
203
|
};
|
|
203
204
|
return processRuleGroup(require_convertQuery.convertFromIC(ruleGroup), true);
|
|
204
205
|
};
|
|
@@ -239,7 +240,8 @@ const defaultRuleProcessorMongoDBQuery = (rule, options = {}) => {
|
|
|
239
240
|
ruleProcessor: defaultRuleProcessorMongoDBQuery,
|
|
240
241
|
context: {
|
|
241
242
|
...options.context,
|
|
242
|
-
avoidFieldsAsKeys: true
|
|
243
|
+
avoidFieldsAsKeys: true,
|
|
244
|
+
inExpressionContext: true
|
|
243
245
|
}
|
|
244
246
|
});
|
|
245
247
|
const filteredCount = { $size: { $ifNull: [{ $filter: {
|
|
@@ -850,7 +852,7 @@ const defaultRuleGroupProcessorMongoDB = (ruleGroup, options, meta) => {
|
|
|
850
852
|
}, meta);
|
|
851
853
|
}).filter(Boolean);
|
|
852
854
|
const result = expressions.length > 0 ? expressions.length === 1 && !hasChildRules ? expressions[0] : `${combinator}:[${expressions.join(",")}]` : fallbackExpression;
|
|
853
|
-
return rg.not ? `"$
|
|
855
|
+
return rg.not ? `"$nor":[${isBracketed(result) ? result : `{${result}}`}]` : result;
|
|
854
856
|
};
|
|
855
857
|
const processedQuery = processRuleGroup(require_convertQuery.convertFromIC(ruleGroup), true);
|
|
856
858
|
return isBracketed(processedQuery) ? processedQuery : `{${processedQuery}}`;
|