@react-querybuilder/core 8.18.0 → 8.19.1
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 +24 -21
- package/dist/cjs/react-querybuilder_core.cjs.development.js +222 -238
- package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +24 -21
- 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/{convertQuery-BoMPXL7_.js → convertQuery-BJKNgecE.js} +2 -2
- package/dist/{convertQuery-BoMPXL7_.js.map → convertQuery-BJKNgecE.js.map} +1 -1
- package/dist/{convertQuery-CQwOrjQr.mjs → convertQuery-J1CaoDxe.mjs} +2 -2
- package/dist/{convertQuery-CQwOrjQr.mjs.map → convertQuery-J1CaoDxe.mjs.map} +1 -1
- package/dist/formatQuery.d.mts +2 -2
- package/dist/formatQuery.d.ts +2 -2
- package/dist/formatQuery.js +195 -197
- package/dist/formatQuery.js.map +1 -1
- package/dist/formatQuery.mjs +195 -197
- package/dist/formatQuery.mjs.map +1 -1
- package/dist/{objectUtils-DxVaGCdg.js → objectUtils-DBJI82bl.js} +2 -2
- package/dist/objectUtils-DBJI82bl.js.map +1 -0
- package/dist/{objectUtils-D-w8MzpZ.mjs → objectUtils-ZvPkF6u6.mjs} +2 -2
- package/dist/objectUtils-ZvPkF6u6.mjs.map +1 -0
- package/dist/parseCEL.js +3 -3
- package/dist/parseCEL.js.map +1 -1
- package/dist/parseCEL.mjs +3 -3
- package/dist/parseCEL.mjs.map +1 -1
- package/dist/parseCypher.js.map +1 -1
- package/dist/parseCypher.mjs.map +1 -1
- package/dist/parseGremlin.js.map +1 -1
- package/dist/parseGremlin.mjs.map +1 -1
- package/dist/parseJSONata.js +2 -2
- package/dist/parseJSONata.js.map +1 -1
- package/dist/parseJSONata.mjs +2 -2
- package/dist/parseJSONata.mjs.map +1 -1
- package/dist/parseJsonLogic.js +4 -4
- package/dist/parseJsonLogic.js.map +1 -1
- package/dist/parseJsonLogic.mjs +4 -4
- package/dist/parseJsonLogic.mjs.map +1 -1
- package/dist/parseMongoDB.js +4 -4
- package/dist/parseMongoDB.js.map +1 -1
- package/dist/parseMongoDB.mjs +4 -4
- package/dist/parseMongoDB.mjs.map +1 -1
- package/dist/parseSPARQL.js.map +1 -1
- package/dist/parseSPARQL.mjs.map +1 -1
- package/dist/parseSQL.js +3 -3
- package/dist/parseSQL.js.map +1 -1
- package/dist/parseSQL.mjs +3 -3
- package/dist/parseSQL.mjs.map +1 -1
- package/dist/parseSpEL.js +3 -3
- package/dist/parseSpEL.js.map +1 -1
- package/dist/parseSpEL.mjs +3 -3
- package/dist/parseSpEL.mjs.map +1 -1
- package/dist/{prepareQueryObjects-BXf5aV-A.mjs → prepareQueryObjects-Cd_tt4oy.mjs} +3 -3
- package/dist/{prepareQueryObjects-BXf5aV-A.mjs.map → prepareQueryObjects-Cd_tt4oy.mjs.map} +1 -1
- package/dist/{prepareQueryObjects-gRQqiBPR.js → prepareQueryObjects-DaAXX792.js} +3 -3
- package/dist/{prepareQueryObjects-gRQqiBPR.js.map → prepareQueryObjects-DaAXX792.js.map} +1 -1
- package/dist/react-querybuilder_core.d.mts +24 -21
- package/dist/react-querybuilder_core.legacy-esm.d.ts +24 -21
- package/dist/react-querybuilder_core.legacy-esm.js +221 -236
- package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
- package/dist/react-querybuilder_core.mjs +222 -238
- package/dist/react-querybuilder_core.mjs.map +1 -1
- package/dist/react-querybuilder_core.production.d.mts +24 -21
- package/dist/react-querybuilder_core.production.mjs +1 -1
- package/dist/react-querybuilder_core.production.mjs.map +1 -1
- package/dist/transformQuery.js +1 -1
- package/dist/transformQuery.mjs +1 -1
- package/dist/{utils-ZlKseh1X.js → utils-BpaOtylk.js} +3 -3
- package/dist/utils-BpaOtylk.js.map +1 -0
- package/dist/{utils-01WaTGBL.mjs → utils-CJRGiPb-.mjs} +3 -3
- package/dist/utils-CJRGiPb-.mjs.map +1 -0
- package/package.json +10 -9
- package/dist/objectUtils-D-w8MzpZ.mjs.map +0 -1
- package/dist/objectUtils-DxVaGCdg.js.map +0 -1
- package/dist/utils-01WaTGBL.mjs.map +0 -1
- package/dist/utils-ZlKseh1X.js.map +0 -1
|
@@ -2581,6 +2581,10 @@ interface Classnames {
|
|
|
2581
2581
|
* Classname(s) applied to async components in their "loading" state.
|
|
2582
2582
|
*/
|
|
2583
2583
|
loading: Classname;
|
|
2584
|
+
/**
|
|
2585
|
+
* Classname(s) applied to value editors for relative date/time values.
|
|
2586
|
+
*/
|
|
2587
|
+
valueDateTimeRelative: Classname;
|
|
2584
2588
|
}
|
|
2585
2589
|
/**
|
|
2586
2590
|
* Placeholder strings for option lists.
|
|
@@ -2948,6 +2952,7 @@ declare const standardClassnames: {
|
|
|
2948
2952
|
readonly justified: "queryBuilder-justified";
|
|
2949
2953
|
readonly hasSubQuery: "rule-hasSubQuery";
|
|
2950
2954
|
readonly loading: "queryBuilder-loading";
|
|
2955
|
+
readonly valueDateTimeRelative: "rule-value-dateTimeRelative";
|
|
2951
2956
|
};
|
|
2952
2957
|
/**
|
|
2953
2958
|
* Default classnames for each component.
|
|
@@ -3052,35 +3057,33 @@ declare const splitBy: (str?: string, splitChar?: string) => string[];
|
|
|
3052
3057
|
* // would return
|
|
3053
3058
|
* 'this\\,\\,that, , the other, , , \\,'
|
|
3054
3059
|
*/
|
|
3055
|
-
declare const joinWith: (strArr:
|
|
3060
|
+
declare const joinWith: (strArr: unknown[], joinChar?: string) => string;
|
|
3061
|
+
type IsUnknown<T> = unknown extends T ? true : false;
|
|
3062
|
+
type Trimmed<T> = IsUnknown<T> extends true ? string : T;
|
|
3056
3063
|
/**
|
|
3057
3064
|
* Trims the value if it is a string. Otherwise returns the value as is.
|
|
3058
3065
|
*/
|
|
3059
|
-
declare const trimIfString: (val:
|
|
3066
|
+
declare const trimIfString: <T>(val: T) => Trimmed<T>;
|
|
3067
|
+
type ToArrayResult<T> = IsUnknown<T> extends true ? string[] : T extends readonly (infer U)[] ? Trimmed<U>[] : T extends string ? string[] : T extends number ? number[] : never[];
|
|
3060
3068
|
/**
|
|
3061
3069
|
* Splits a string by comma then trims each element. Arrays are returned as is except
|
|
3062
3070
|
* any string elements are trimmed.
|
|
3063
3071
|
*/
|
|
3064
|
-
declare const toArray: (a:
|
|
3072
|
+
declare const toArray: <T>(a: T, {
|
|
3065
3073
|
retainEmptyStrings
|
|
3066
3074
|
}?: {
|
|
3067
3075
|
retainEmptyStrings?: boolean;
|
|
3068
|
-
}) =>
|
|
3076
|
+
}) => ToArrayResult<T>;
|
|
3069
3077
|
/**
|
|
3070
3078
|
* Determines if an array is free of `null`/`undefined`.
|
|
3071
3079
|
*/
|
|
3072
3080
|
declare const nullFreeArray: <T>(arr: T[]) => arr is Exclude<T, null>[];
|
|
3073
3081
|
//#endregion
|
|
3074
|
-
//#region
|
|
3075
|
-
type ClassDictionary = Record<string, any>;
|
|
3082
|
+
//#region ../../node_modules/clsx/clsx.d.mts
|
|
3076
3083
|
type ClassValue = ClassArray | ClassDictionary | string | number | bigint | null | boolean | undefined;
|
|
3084
|
+
type ClassDictionary = Record<string, any>;
|
|
3077
3085
|
type ClassArray = ClassValue[];
|
|
3078
|
-
|
|
3079
|
-
* Vendored/adapted version of the `clsx` package.
|
|
3080
|
-
*
|
|
3081
|
-
* **NOTE:** Prefer the official package from npm outside the context of React Query Builder.
|
|
3082
|
-
*/
|
|
3083
|
-
declare function clsx(...args: ClassValue[]): string;
|
|
3086
|
+
declare function clsx(...inputs: ClassValue[]): string;
|
|
3084
3087
|
//#endregion
|
|
3085
3088
|
//#region src/utils/convertQuery.d.ts
|
|
3086
3089
|
/**
|
|
@@ -3782,7 +3785,7 @@ declare const numerifyValues: (rg: RuleGroupTypeAny, options: SetRequired<Format
|
|
|
3782
3785
|
*
|
|
3783
3786
|
* @group Export
|
|
3784
3787
|
*/
|
|
3785
|
-
declare const isValidValue: (value:
|
|
3788
|
+
declare const isValidValue: (value: unknown) => boolean;
|
|
3786
3789
|
/**
|
|
3787
3790
|
* Determines whether {@link formatQuery} should render the given value as a number.
|
|
3788
3791
|
* As long as `parseNumbers` is `true`, `number` and `bigint` values will return `true` and
|
|
@@ -3790,7 +3793,7 @@ declare const isValidValue: (value: any) => boolean;
|
|
|
3790
3793
|
*
|
|
3791
3794
|
* @group Export
|
|
3792
3795
|
*/
|
|
3793
|
-
declare const shouldRenderAsNumber: (value:
|
|
3796
|
+
declare const shouldRenderAsNumber: (value: unknown, parseNumbers?: boolean) => boolean;
|
|
3794
3797
|
/**
|
|
3795
3798
|
* Used by {@link formatQuery} to determine whether the given value processor is a
|
|
3796
3799
|
* "legacy" value processor by counting the number of arguments. Legacy value
|
|
@@ -4053,7 +4056,7 @@ declare const numericRegex: RegExp;
|
|
|
4053
4056
|
/**
|
|
4054
4057
|
* Determines if a variable is a plain old JavaScript object, aka POJO.
|
|
4055
4058
|
*/
|
|
4056
|
-
declare const isPojo: (obj:
|
|
4059
|
+
declare const isPojo: (obj: unknown) => obj is Record<string, any>;
|
|
4057
4060
|
/**
|
|
4058
4061
|
* Simple helper to determine whether a value is null, undefined, or an empty string.
|
|
4059
4062
|
*/
|
|
@@ -4134,25 +4137,25 @@ declare const uniqByIdentifier: <T extends RequireAtLeastOne$1<{
|
|
|
4134
4137
|
*
|
|
4135
4138
|
* @group Option Lists
|
|
4136
4139
|
*/
|
|
4137
|
-
declare const isOptionGroupArray: (arr:
|
|
4140
|
+
declare const isOptionGroupArray: (arr: unknown) => arr is OptionGroup<BaseOption>[];
|
|
4138
4141
|
/**
|
|
4139
4142
|
* Determines if an array is a flat array of {@link FlexibleOption}.
|
|
4140
4143
|
*
|
|
4141
4144
|
* @group Option Lists
|
|
4142
4145
|
*/
|
|
4143
|
-
declare const isFlexibleOptionArray: (arr:
|
|
4146
|
+
declare const isFlexibleOptionArray: (arr: unknown) => arr is FlexibleOption[];
|
|
4144
4147
|
/**
|
|
4145
4148
|
* Determines if an array is a flat array of {@link FullOption}.
|
|
4146
4149
|
*
|
|
4147
4150
|
* @group Option Lists
|
|
4148
4151
|
*/
|
|
4149
|
-
declare const isFullOptionArray: (arr:
|
|
4152
|
+
declare const isFullOptionArray: (arr: unknown) => arr is FullOption[];
|
|
4150
4153
|
/**
|
|
4151
4154
|
* Determines if a {@link FlexibleOptionList} is a {@link FlexibleOptionGroup} array.
|
|
4152
4155
|
*
|
|
4153
4156
|
* @group Option Lists
|
|
4154
4157
|
*/
|
|
4155
|
-
declare const isFlexibleOptionGroupArray: (arr:
|
|
4158
|
+
declare const isFlexibleOptionGroupArray: (arr: unknown, {
|
|
4156
4159
|
allowEmpty
|
|
4157
4160
|
}?: {
|
|
4158
4161
|
allowEmpty?: boolean;
|
|
@@ -4162,7 +4165,7 @@ declare const isFlexibleOptionGroupArray: (arr: any, {
|
|
|
4162
4165
|
*
|
|
4163
4166
|
* @group Option Lists
|
|
4164
4167
|
*/
|
|
4165
|
-
declare const isFullOptionGroupArray: (arr:
|
|
4168
|
+
declare const isFullOptionGroupArray: (arr: unknown, {
|
|
4166
4169
|
allowEmpty
|
|
4167
4170
|
}?: {
|
|
4168
4171
|
allowEmpty?: boolean;
|
|
@@ -4237,7 +4240,7 @@ interface ParseNumberOptions {
|
|
|
4237
4240
|
* If that returns `NaN`, the string is returned unchanged. Numeric values are returned
|
|
4238
4241
|
* as-is regardless of the `parseNumbers` option.
|
|
4239
4242
|
*/
|
|
4240
|
-
declare const parseNumber: (val:
|
|
4243
|
+
declare const parseNumber: (val: unknown, {
|
|
4241
4244
|
parseNumbers,
|
|
4242
4245
|
bigIntOnOverflow
|
|
4243
4246
|
}?: ParseNumberOptions) => any;
|