@react-querybuilder/core 8.23.0 → 8.24.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/cjs/react-querybuilder_core.cjs.development.d.ts +507 -448
- package/dist/cjs/react-querybuilder_core.cjs.development.js +169 -6
- package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +507 -448
- 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/derivations.d.mts +288 -237
- package/dist/derivations.d.ts +288 -237
- package/dist/derivations.js +137 -4
- package/dist/derivations.js.map +1 -1
- package/dist/derivations.mjs +136 -5
- package/dist/derivations.mjs.map +1 -1
- package/dist/formatQuery.d.mts +1 -1
- package/dist/formatQuery.d.ts +1 -1
- package/dist/formatQuery.js +7 -4
- package/dist/formatQuery.js.map +1 -1
- package/dist/formatQuery.mjs +7 -4
- package/dist/formatQuery.mjs.map +1 -1
- package/dist/{index-OF2Q1gTp.d.mts → index-94yESPHr.d.mts} +4 -2
- package/dist/{index-XueTy_XQ.d.ts → index-D41_Ba4j.d.ts} +4 -2
- package/dist/parseCEL.d.mts +110 -110
- package/dist/parseCEL.d.ts +110 -110
- package/dist/parseCEL.js +4 -4
- package/dist/parseCEL.js.map +1 -1
- package/dist/parseCEL.mjs +4 -4
- package/dist/parseCEL.mjs.map +1 -1
- package/dist/parseCypher.d.mts +7 -7
- package/dist/parseCypher.d.ts +7 -7
- package/dist/parseGremlin.d.mts +4 -4
- package/dist/parseGremlin.d.ts +4 -4
- package/dist/parseJSONata.d.mts +37 -37
- package/dist/parseJSONata.d.ts +37 -37
- package/dist/parseJSONata.js +2 -2
- package/dist/parseJSONata.mjs +2 -2
- package/dist/parseJsonLogic.d.mts +8 -8
- package/dist/parseJsonLogic.d.ts +8 -8
- package/dist/parseJsonLogic.js +3 -3
- package/dist/parseJsonLogic.mjs +3 -3
- package/dist/parseMongoDB.d.mts +7 -7
- package/dist/parseMongoDB.d.ts +7 -7
- package/dist/parseMongoDB.js +3 -3
- package/dist/parseMongoDB.mjs +3 -3
- package/dist/parseSPARQL.d.mts +4 -4
- package/dist/parseSPARQL.d.ts +4 -4
- package/dist/parseSQL.d.mts +61 -61
- package/dist/parseSQL.d.ts +61 -61
- package/dist/parseSQL.js +4 -4
- package/dist/parseSQL.js.map +1 -1
- package/dist/parseSQL.mjs +4 -4
- package/dist/parseSQL.mjs.map +1 -1
- package/dist/parseSpEL.d.mts +55 -55
- package/dist/parseSpEL.d.ts +55 -55
- package/dist/parseSpEL.js +4 -4
- package/dist/parseSpEL.js.map +1 -1
- package/dist/parseSpEL.mjs +4 -4
- package/dist/parseSpEL.mjs.map +1 -1
- package/dist/{parserUtils-DbBXyAht.js → parserUtils-2VtG7m8L.js} +3 -3
- package/dist/{parserUtils-DbBXyAht.js.map → parserUtils-2VtG7m8L.js.map} +1 -1
- package/dist/{parserUtils-BKPstAaO.mjs → parserUtils-BlafvoFb.mjs} +3 -3
- package/dist/{parserUtils-BKPstAaO.mjs.map → parserUtils-BlafvoFb.mjs.map} +1 -1
- package/dist/{prepareQueryObjects-Dj9cTl9D.js → prepareQueryObjects-DJ_VjOLb.js} +2 -2
- package/dist/{prepareQueryObjects-Dj9cTl9D.js.map → prepareQueryObjects-DJ_VjOLb.js.map} +1 -1
- package/dist/{prepareQueryObjects-Dmyf3Wi_.mjs → prepareQueryObjects-DawsH4e3.mjs} +2 -2
- package/dist/{prepareQueryObjects-Dmyf3Wi_.mjs.map → prepareQueryObjects-DawsH4e3.mjs.map} +1 -1
- package/dist/react-querybuilder_core.d.mts +507 -448
- package/dist/react-querybuilder_core.legacy-esm.d.ts +507 -448
- package/dist/react-querybuilder_core.legacy-esm.js +172 -14
- package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
- package/dist/react-querybuilder_core.mjs +168 -7
- package/dist/react-querybuilder_core.mjs.map +1 -1
- package/dist/react-querybuilder_core.production.d.mts +507 -448
- package/dist/react-querybuilder_core.production.mjs +1 -1
- package/dist/react-querybuilder_core.production.mjs.map +1 -1
- package/dist/{utils-e-7KHkjV.js → utils-B4E1-ZvU.js} +12 -2
- package/dist/utils-B4E1-ZvU.js.map +1 -0
- package/dist/{utils-CP5Jqy1P.mjs → utils-DLZCoyAh.mjs} +12 -2
- package/dist/utils-DLZCoyAh.mjs.map +1 -0
- package/package.json +20 -19
- package/dist/utils-CP5Jqy1P.mjs.map +0 -1
- package/dist/utils-e-7KHkjV.js.map +0 -1
package/dist/formatQuery.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as withParamPrefix, E as parseNumber, F as toFlatOptionArray, K as toArray, L as toFullOptionList, O as getOption, S as subqueryElementAliasBase, T as getParseNumberMethod, _ as numerifyValues, a as getLikeWildcards, b as shouldRenderAsNumber, c as getQuotedFieldName, d as isValidValue, f as isValueProcessorLegacy, g as normalizeConstituentWordOrder, h as mongoOperators, i as defaultNLTranslations, l as getSQLConcat, m as mapSQLOperator, n as bigIntJsonStringifyReplacer, o as getNLTranslataion, p as jsonLogicAdditionalOperators, q as trimIfString, r as celCombinatorMap, s as getQuoteFieldNamesWithArray, t as bigIntJsonParseReviver, u as getSubqueryElementAlias, v as prismaOperators, w as wrapLikeFragment, x as stripParamPrefix, y as processMatchMode } from "./utils-
|
|
1
|
+
import { C as withParamPrefix, E as parseNumber, F as toFlatOptionArray, K as toArray, L as toFullOptionList, O as getOption, S as subqueryElementAliasBase, T as getParseNumberMethod, _ as numerifyValues, a as getLikeWildcards, b as shouldRenderAsNumber, c as getQuotedFieldName, d as isValidValue, f as isValueProcessorLegacy, g as normalizeConstituentWordOrder, h as mongoOperators, i as defaultNLTranslations, l as getSQLConcat, m as mapSQLOperator, n as bigIntJsonStringifyReplacer, o as getNLTranslataion, p as jsonLogicAdditionalOperators, q as trimIfString, r as celCombinatorMap, s as getQuoteFieldNamesWithArray, t as bigIntJsonParseReviver, u as getSubqueryElementAlias, v as prismaOperators, w as wrapLikeFragment, x as stripParamPrefix, y as processMatchMode } from "./utils-DLZCoyAh.mjs";
|
|
2
2
|
import { a as isRuleGroupType, c as isPojo, d as numericRegex, i as isRuleGroup, l as lc, o as isRuleGroupTypeIC, u as nullOrUndefinedOrEmpty } from "./objectUtils-DDZ-KhV5.mjs";
|
|
3
3
|
import { t as convertFromIC } from "./convertQuery-DaXv3h7S.mjs";
|
|
4
4
|
import { n as isValidationResult, t as isRuleOrGroupValid } from "./isRuleOrGroupValid-CIMZNkt4.mjs";
|
|
@@ -700,7 +700,9 @@ const defaultRuleGroupProcessorElasticSearch = (ruleGroup, options) => {
|
|
|
700
700
|
*
|
|
701
701
|
* At the top level, filter rules produce chained `.has()` steps (implicit AND).
|
|
702
702
|
* Nested groups use `.and()` / `.or()` / `.not()` compound traversals with
|
|
703
|
-
* `__` anonymous traversal prefixes.
|
|
703
|
+
* `__` anonymous traversal prefixes. Since `not()` accepts exactly one
|
|
704
|
+
* traversal, negated groups with multiple predicates wrap them in a single
|
|
705
|
+
* `__.and()`/`__.or()` sub-traversal.
|
|
704
706
|
*
|
|
705
707
|
* @group Export
|
|
706
708
|
*/
|
|
@@ -737,9 +739,10 @@ const defaultRuleGroupProcessorGremlin = (ruleGroup, options) => {
|
|
|
737
739
|
}
|
|
738
740
|
if (predicates.length === 0) return "";
|
|
739
741
|
const combinator = rg.combinator ?? "and";
|
|
740
|
-
const prefix = rg.not ? "not" : combinator;
|
|
741
742
|
if (predicates.length === 1 && !rg.not) return predicates[0];
|
|
742
|
-
|
|
743
|
+
const args = predicates.map((p) => p.startsWith(".") ? `__${p}` : p).join(", ");
|
|
744
|
+
if (rg.not) return predicates.length === 1 ? `.not(${args})` : `.not(__.${combinator}(${args}))`;
|
|
745
|
+
return `.${combinator}(${args})`;
|
|
743
746
|
};
|
|
744
747
|
if (!isRuleOrGroupValid(ruleGroup, validationMap[ruleGroup.id ?? /* v8 ignore start -- @preserve */ ""])) return fallbackExpression;
|
|
745
748
|
const steps = [];
|