@react-querybuilder/core 8.15.0 → 8.16.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/README.md +114 -53
- package/dist/cjs/react-querybuilder_core.cjs.development.d.ts +89 -16
- package/dist/cjs/react-querybuilder_core.cjs.development.js +402 -19
- package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +89 -16
- 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 +67 -2
- package/dist/formatQuery.d.ts +67 -2
- package/dist/formatQuery.js +402 -19
- package/dist/formatQuery.js.map +1 -1
- package/dist/formatQuery.mjs +396 -20
- package/dist/formatQuery.mjs.map +1 -1
- package/dist/{import-0wp72lLT.d.mts → import-BHlzBLM_.d.mts} +2 -2
- package/dist/{import-yRVJh7E1.d.ts → import-C6imciDf.d.ts} +2 -2
- package/dist/{index-D5TXNIzF.d.ts → index-Cjapnb-H.d.ts} +14 -7
- package/dist/{index-Lht_Wq3V.d.mts → index-D-Iej37L.d.mts} +14 -7
- package/dist/parseCEL.d.mts +2 -2
- package/dist/parseCEL.d.ts +2 -2
- package/dist/parseCEL.js.map +1 -1
- package/dist/parseCEL.mjs.map +1 -1
- package/dist/parseCypher.d.mts +49 -0
- package/dist/parseCypher.d.ts +49 -0
- package/dist/parseCypher.js +578 -0
- package/dist/parseCypher.js.map +1 -0
- package/dist/parseCypher.mjs +575 -0
- package/dist/parseCypher.mjs.map +1 -0
- package/dist/parseGremlin.d.mts +35 -0
- package/dist/parseGremlin.d.ts +35 -0
- package/dist/parseGremlin.js +192 -0
- package/dist/parseGremlin.js.map +1 -0
- package/dist/parseGremlin.mjs +191 -0
- package/dist/parseGremlin.mjs.map +1 -0
- package/dist/parseJSONata.d.mts +2 -2
- package/dist/parseJSONata.d.ts +2 -2
- package/dist/parseJSONata.js.map +1 -1
- package/dist/parseJSONata.mjs.map +1 -1
- package/dist/parseJsonLogic.d.mts +2 -2
- package/dist/parseJsonLogic.d.ts +2 -2
- package/dist/parseJsonLogic.js.map +1 -1
- package/dist/parseJsonLogic.mjs.map +1 -1
- package/dist/parseMongoDB.d.mts +2 -2
- package/dist/parseMongoDB.d.ts +2 -2
- package/dist/parseMongoDB.js.map +1 -1
- package/dist/parseMongoDB.mjs.map +1 -1
- package/dist/parseSPARQL.d.mts +34 -0
- package/dist/parseSPARQL.d.ts +34 -0
- package/dist/parseSPARQL.js +253 -0
- package/dist/parseSPARQL.js.map +1 -0
- package/dist/parseSPARQL.mjs +251 -0
- package/dist/parseSPARQL.mjs.map +1 -0
- package/dist/parseSQL.d.mts +2 -2
- package/dist/parseSQL.d.ts +2 -2
- package/dist/parseSQL.js.map +1 -1
- package/dist/parseSQL.mjs.map +1 -1
- package/dist/parseSpEL.d.mts +2 -2
- package/dist/parseSpEL.d.ts +2 -2
- package/dist/parseSpEL.js.map +1 -1
- package/dist/parseSpEL.mjs.map +1 -1
- package/dist/prepareQueryObjects-BoG5Rt8z.js.map +1 -1
- package/dist/prepareQueryObjects-uA10ZpZX.mjs.map +1 -1
- package/dist/react-querybuilder_core.d.mts +89 -16
- package/dist/react-querybuilder_core.legacy-esm.d.ts +89 -16
- package/dist/react-querybuilder_core.legacy-esm.js +408 -27
- package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
- package/dist/react-querybuilder_core.mjs +396 -20
- package/dist/react-querybuilder_core.mjs.map +1 -1
- package/dist/react-querybuilder_core.production.d.mts +89 -16
- 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/formatQuery/package.json +1 -1
- package/package.json +47 -3
- package/parseCEL/package.json +1 -1
- package/parseCypher/package.json +4 -0
- package/parseGremlin/package.json +4 -0
- package/parseJSONata/package.json +1 -1
- package/parseJsonLogic/package.json +1 -1
- package/parseMongoDB/package.json +1 -1
- package/parseSPARQL/package.json +4 -0
- package/parseSQL/package.json +1 -1
- package/parseSpEL/package.json +1 -1
- package/transformQuery/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as ValueSources, k as OptionList, y as FullField } from "./index-
|
|
1
|
+
import { b as ValueSources, k as OptionList, y as FullField } from "./index-D-Iej37L.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/types/import.d.ts
|
|
4
4
|
/**
|
|
@@ -24,4 +24,4 @@ interface ParserCommonOptions {
|
|
|
24
24
|
}
|
|
25
25
|
//#endregion
|
|
26
26
|
export { ParserCommonOptions as t };
|
|
27
|
-
//# sourceMappingURL=import-
|
|
27
|
+
//# sourceMappingURL=import-BHlzBLM_.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as ValueSources, k as OptionList, y as FullField } from "./index-
|
|
1
|
+
import { b as ValueSources, k as OptionList, y as FullField } from "./index-Cjapnb-H.js";
|
|
2
2
|
|
|
3
3
|
//#region src/types/import.d.ts
|
|
4
4
|
/**
|
|
@@ -24,4 +24,4 @@ interface ParserCommonOptions {
|
|
|
24
24
|
}
|
|
25
25
|
//#endregion
|
|
26
26
|
export { ParserCommonOptions as t };
|
|
27
|
-
//# sourceMappingURL=import-
|
|
27
|
+
//# sourceMappingURL=import-C6imciDf.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { RulesLogic } from "json-logic-js";
|
|
|
2
2
|
|
|
3
3
|
//#region ../../node_modules/type-fest/source/union-to-intersection.d.ts
|
|
4
4
|
/**
|
|
5
|
-
Convert a union type to an intersection type
|
|
5
|
+
Convert a union type to an intersection type.
|
|
6
6
|
|
|
7
7
|
Inspired by [this Stack Overflow answer](https://stackoverflow.com/a/50375286/2172153).
|
|
8
8
|
|
|
@@ -899,7 +899,7 @@ type _Except<ObjectType, KeysType extends keyof ObjectType, Options extends Requ
|
|
|
899
899
|
//#endregion
|
|
900
900
|
//#region ../../node_modules/type-fest/source/set-required.d.ts
|
|
901
901
|
/**
|
|
902
|
-
Create a type that makes the given keys required
|
|
902
|
+
Create a type that makes the given keys required, while keeping the remaining keys as is.
|
|
903
903
|
|
|
904
904
|
Use-case: You want to define a single model where the only thing that changes is whether or not some of the keys are required.
|
|
905
905
|
|
|
@@ -925,8 +925,8 @@ type ArrayExample = SetRequired<[number?, number?, number?], 0 | 1>;
|
|
|
925
925
|
*/
|
|
926
926
|
type SetRequired<BaseType, Keys extends keyof BaseType> = (BaseType extends ((...arguments_: never) => any) ? (...arguments_: Parameters<BaseType>) => ReturnType<BaseType> : unknown) & _SetRequired<BaseType, Keys>;
|
|
927
927
|
type _SetRequired<BaseType, Keys extends keyof BaseType> = BaseType extends UnknownArray ? SetArrayRequired<BaseType, Keys> extends infer ResultantArray ? If<IsArrayReadonly<BaseType>, Readonly<ResultantArray>, ResultantArray> : never : Simplify< // Pick just the keys that are optional from the base type.
|
|
928
|
-
Except<BaseType, Keys>
|
|
929
|
-
Required<HomomorphicPick<BaseType, Keys>>>;
|
|
928
|
+
Except<BaseType, Keys> // Pick the keys that should be required from the base type and make them required.
|
|
929
|
+
& Required<HomomorphicPick<BaseType, Keys>>>;
|
|
930
930
|
/**
|
|
931
931
|
Remove the optional modifier from the specified keys in an array.
|
|
932
932
|
*/
|
|
@@ -1072,7 +1072,7 @@ interface CommonRuleAndGroupProperties {
|
|
|
1072
1072
|
* The main rule type. The `field`, `operator`, and `value` properties
|
|
1073
1073
|
* can be narrowed with generics.
|
|
1074
1074
|
*/
|
|
1075
|
-
interface RuleType<F extends string = string, O extends string = string, V = any, C extends string = string
|
|
1075
|
+
interface RuleType<F extends string = string, O extends string = string, V = any, C extends string = string, M = Record<string, any>> extends CommonRuleAndGroupProperties {
|
|
1076
1076
|
field: F;
|
|
1077
1077
|
operator: O;
|
|
1078
1078
|
value: V;
|
|
@@ -1082,6 +1082,13 @@ interface RuleType<F extends string = string, O extends string = string, V = any
|
|
|
1082
1082
|
* Only used when adding a rule to a query that uses independent combinators.
|
|
1083
1083
|
*/
|
|
1084
1084
|
combinatorPreceding?: C;
|
|
1085
|
+
/**
|
|
1086
|
+
* Opaque metadata for use by extension packages. The core library
|
|
1087
|
+
* preserves this property but does not read or interpret it.
|
|
1088
|
+
* Extensions like `@react-querybuilder/graph` use `meta` to store
|
|
1089
|
+
* domain-specific context (e.g., graph pattern information).
|
|
1090
|
+
*/
|
|
1091
|
+
meta?: M;
|
|
1085
1092
|
}
|
|
1086
1093
|
/**
|
|
1087
1094
|
* The main rule group type. This type is used for query definitions as well as
|
|
@@ -1304,7 +1311,7 @@ type ParseNumbersPropConfig = boolean | `${ParseNumberMethodName}${ParseNumbersM
|
|
|
1304
1311
|
*
|
|
1305
1312
|
* @group Export
|
|
1306
1313
|
*/
|
|
1307
|
-
type ExportFormat = "json" | "sql" | "json_without_ids" | "parameterized" | "parameterized_named" | "mongodb" | "mongodb_query" | "cel" | "jsonlogic" | "spel" | "elasticsearch" | "jsonata" | "natural_language" | "ldap" | "drizzle" | "prisma" | "sequelize" | "diagnostics";
|
|
1314
|
+
type ExportFormat = "json" | "sql" | "json_without_ids" | "parameterized" | "parameterized_named" | "mongodb" | "mongodb_query" | "cel" | "jsonlogic" | "spel" | "elasticsearch" | "jsonata" | "natural_language" | "ldap" | "drizzle" | "prisma" | "sequelize" | "cypher" | "gql" | "sparql" | "gremlin" | "diagnostics";
|
|
1308
1315
|
/**
|
|
1309
1316
|
* Export formats for {@link formatQuery} that produce objects instead of strings.
|
|
1310
1317
|
*
|
|
@@ -1889,4 +1896,4 @@ type NLTranslationKey = "and" | "or" | "true" | "false" | `groupPrefix${ZeroOrMo
|
|
|
1889
1896
|
type NLTranslations = Partial<Record<NLTranslationKey, string>>;
|
|
1890
1897
|
//#endregion
|
|
1891
1898
|
export { SetRequired as A, RuleGroupTypeIC as C, RuleGroupType as D, DefaultRuleGroupType as E, RuleType as O, RuleGroupTypeAny as S, DefaultOperatorName as T, ValueProcessorLegacy as _, ExportOperatorMap as a, ValueSources as b, NLTranslationKey as c, ParameterizedSQL as d, RQBJsonLogic as f, ValueProcessorByRule as g, SQLPreset as h, ExportObjectFormats as i, Except as j, OptionList as k, NLTranslations as l, RuleProcessor as m, DiagnosticsResult as n, FormatQueryOptions as o, RuleGroupProcessor as p, ExportFormat as r, GroupVariantCondition as s, ConstituentWordOrder as t, ParameterizedNamedSQL as u, ValueProcessorOptions as v, DefaultCombinatorName as w, DefaultRuleGroupTypeIC as x, FullField as y };
|
|
1892
|
-
//# sourceMappingURL=index-
|
|
1899
|
+
//# sourceMappingURL=index-Cjapnb-H.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { RulesLogic } from "json-logic-js";
|
|
|
2
2
|
|
|
3
3
|
//#region ../../node_modules/type-fest/source/union-to-intersection.d.ts
|
|
4
4
|
/**
|
|
5
|
-
Convert a union type to an intersection type
|
|
5
|
+
Convert a union type to an intersection type.
|
|
6
6
|
|
|
7
7
|
Inspired by [this Stack Overflow answer](https://stackoverflow.com/a/50375286/2172153).
|
|
8
8
|
|
|
@@ -899,7 +899,7 @@ type _Except<ObjectType, KeysType extends keyof ObjectType, Options extends Requ
|
|
|
899
899
|
//#endregion
|
|
900
900
|
//#region ../../node_modules/type-fest/source/set-required.d.ts
|
|
901
901
|
/**
|
|
902
|
-
Create a type that makes the given keys required
|
|
902
|
+
Create a type that makes the given keys required, while keeping the remaining keys as is.
|
|
903
903
|
|
|
904
904
|
Use-case: You want to define a single model where the only thing that changes is whether or not some of the keys are required.
|
|
905
905
|
|
|
@@ -925,8 +925,8 @@ type ArrayExample = SetRequired<[number?, number?, number?], 0 | 1>;
|
|
|
925
925
|
*/
|
|
926
926
|
type SetRequired<BaseType, Keys extends keyof BaseType> = (BaseType extends ((...arguments_: never) => any) ? (...arguments_: Parameters<BaseType>) => ReturnType<BaseType> : unknown) & _SetRequired<BaseType, Keys>;
|
|
927
927
|
type _SetRequired<BaseType, Keys extends keyof BaseType> = BaseType extends UnknownArray ? SetArrayRequired<BaseType, Keys> extends infer ResultantArray ? If<IsArrayReadonly<BaseType>, Readonly<ResultantArray>, ResultantArray> : never : Simplify< // Pick just the keys that are optional from the base type.
|
|
928
|
-
Except<BaseType, Keys>
|
|
929
|
-
Required<HomomorphicPick<BaseType, Keys>>>;
|
|
928
|
+
Except<BaseType, Keys> // Pick the keys that should be required from the base type and make them required.
|
|
929
|
+
& Required<HomomorphicPick<BaseType, Keys>>>;
|
|
930
930
|
/**
|
|
931
931
|
Remove the optional modifier from the specified keys in an array.
|
|
932
932
|
*/
|
|
@@ -1072,7 +1072,7 @@ interface CommonRuleAndGroupProperties {
|
|
|
1072
1072
|
* The main rule type. The `field`, `operator`, and `value` properties
|
|
1073
1073
|
* can be narrowed with generics.
|
|
1074
1074
|
*/
|
|
1075
|
-
interface RuleType<F extends string = string, O extends string = string, V = any, C extends string = string
|
|
1075
|
+
interface RuleType<F extends string = string, O extends string = string, V = any, C extends string = string, M = Record<string, any>> extends CommonRuleAndGroupProperties {
|
|
1076
1076
|
field: F;
|
|
1077
1077
|
operator: O;
|
|
1078
1078
|
value: V;
|
|
@@ -1082,6 +1082,13 @@ interface RuleType<F extends string = string, O extends string = string, V = any
|
|
|
1082
1082
|
* Only used when adding a rule to a query that uses independent combinators.
|
|
1083
1083
|
*/
|
|
1084
1084
|
combinatorPreceding?: C;
|
|
1085
|
+
/**
|
|
1086
|
+
* Opaque metadata for use by extension packages. The core library
|
|
1087
|
+
* preserves this property but does not read or interpret it.
|
|
1088
|
+
* Extensions like `@react-querybuilder/graph` use `meta` to store
|
|
1089
|
+
* domain-specific context (e.g., graph pattern information).
|
|
1090
|
+
*/
|
|
1091
|
+
meta?: M;
|
|
1085
1092
|
}
|
|
1086
1093
|
/**
|
|
1087
1094
|
* The main rule group type. This type is used for query definitions as well as
|
|
@@ -1304,7 +1311,7 @@ type ParseNumbersPropConfig = boolean | `${ParseNumberMethodName}${ParseNumbersM
|
|
|
1304
1311
|
*
|
|
1305
1312
|
* @group Export
|
|
1306
1313
|
*/
|
|
1307
|
-
type ExportFormat = "json" | "sql" | "json_without_ids" | "parameterized" | "parameterized_named" | "mongodb" | "mongodb_query" | "cel" | "jsonlogic" | "spel" | "elasticsearch" | "jsonata" | "natural_language" | "ldap" | "drizzle" | "prisma" | "sequelize" | "diagnostics";
|
|
1314
|
+
type ExportFormat = "json" | "sql" | "json_without_ids" | "parameterized" | "parameterized_named" | "mongodb" | "mongodb_query" | "cel" | "jsonlogic" | "spel" | "elasticsearch" | "jsonata" | "natural_language" | "ldap" | "drizzle" | "prisma" | "sequelize" | "cypher" | "gql" | "sparql" | "gremlin" | "diagnostics";
|
|
1308
1315
|
/**
|
|
1309
1316
|
* Export formats for {@link formatQuery} that produce objects instead of strings.
|
|
1310
1317
|
*
|
|
@@ -1889,4 +1896,4 @@ type NLTranslationKey = "and" | "or" | "true" | "false" | `groupPrefix${ZeroOrMo
|
|
|
1889
1896
|
type NLTranslations = Partial<Record<NLTranslationKey, string>>;
|
|
1890
1897
|
//#endregion
|
|
1891
1898
|
export { SetRequired as A, RuleGroupTypeIC as C, RuleGroupType as D, DefaultRuleGroupType as E, RuleType as O, RuleGroupTypeAny as S, DefaultOperatorName as T, ValueProcessorLegacy as _, ExportOperatorMap as a, ValueSources as b, NLTranslationKey as c, ParameterizedSQL as d, RQBJsonLogic as f, ValueProcessorByRule as g, SQLPreset as h, ExportObjectFormats as i, Except as j, OptionList as k, NLTranslations as l, RuleProcessor as m, DiagnosticsResult as n, FormatQueryOptions as o, RuleGroupProcessor as p, ExportFormat as r, GroupVariantCondition as s, ConstituentWordOrder as t, ParameterizedNamedSQL as u, ValueProcessorOptions as v, DefaultCombinatorName as w, DefaultRuleGroupTypeIC as x, FullField as y };
|
|
1892
|
-
//# sourceMappingURL=index-
|
|
1899
|
+
//# sourceMappingURL=index-D-Iej37L.d.mts.map
|
package/dist/parseCEL.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as RuleGroupTypeIC, D as RuleGroupType, E as DefaultRuleGroupType, O as RuleType, T as DefaultOperatorName, j as Except, w as DefaultCombinatorName, x as DefaultRuleGroupTypeIC } from "./index-
|
|
2
|
-
import { t as ParserCommonOptions } from "./import-
|
|
1
|
+
import { C as RuleGroupTypeIC, D as RuleGroupType, E as DefaultRuleGroupType, O as RuleType, T as DefaultOperatorName, j as Except, w as DefaultCombinatorName, x as DefaultRuleGroupTypeIC } from "./index-D-Iej37L.mjs";
|
|
2
|
+
import { t as ParserCommonOptions } from "./import-BHlzBLM_.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/utils/parseCEL/types.d.ts
|
|
5
5
|
type CELExpressionType = "Addition" | "BooleanLiteral" | "BytesLiteral" | "ConditionalAnd" | "ConditionalExpr" | "ConditionalOr" | "Division" | "DynamicPropertyAccessor" | "ExpressionGroup" | "ExpressionList" | "FieldInit" | "FieldInits" | "FieldsObject" | "FloatLiteral" | "FunctionCall" | "Identifier" | "IntegerLiteral" | "List" | "Map" | "MapInit" | "MapInits" | "Member" | "Modulo" | "Multiplication" | "Negation" | "Negative" | "NullLiteral" | "Property" | "Relation" | "StringLiteral" | "Subtraction" | "Unary" | "UnsignedIntegerLiteral" | "LikeExpression" | "SubqueryExpression";
|
package/dist/parseCEL.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as RuleGroupTypeIC, D as RuleGroupType, E as DefaultRuleGroupType, O as RuleType, T as DefaultOperatorName, j as Except, w as DefaultCombinatorName, x as DefaultRuleGroupTypeIC } from "./index-
|
|
2
|
-
import { t as ParserCommonOptions } from "./import-
|
|
1
|
+
import { C as RuleGroupTypeIC, D as RuleGroupType, E as DefaultRuleGroupType, O as RuleType, T as DefaultOperatorName, j as Except, w as DefaultCombinatorName, x as DefaultRuleGroupTypeIC } from "./index-Cjapnb-H.js";
|
|
2
|
+
import { t as ParserCommonOptions } from "./import-C6imciDf.js";
|
|
3
3
|
|
|
4
4
|
//#region src/utils/parseCEL/types.d.ts
|
|
5
5
|
type CELExpressionType = "Addition" | "BooleanLiteral" | "BytesLiteral" | "ConditionalAnd" | "ConditionalExpr" | "ConditionalOr" | "Division" | "DynamicPropertyAccessor" | "ExpressionGroup" | "ExpressionList" | "FieldInit" | "FieldInits" | "FieldsObject" | "FloatLiteral" | "FunctionCall" | "Identifier" | "IntegerLiteral" | "List" | "Map" | "MapInit" | "MapInits" | "Member" | "Modulo" | "Multiplication" | "Negation" | "Negative" | "NullLiteral" | "Property" | "Relation" | "StringLiteral" | "Subtraction" | "Unary" | "UnsignedIntegerLiteral" | "LikeExpression" | "SubqueryExpression";
|