@react-querybuilder/core 8.24.0 → 8.24.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 +9 -7
- package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +9 -7
- package/dist/cjs/react-querybuilder_core.cjs.production.js +74 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.js.map +1 -1
- package/dist/derivations.d.mts +3 -3
- package/dist/derivations.d.ts +3 -3
- package/dist/formatQuery.d.mts +1 -1
- package/dist/formatQuery.d.ts +1 -1
- package/dist/{import-BfZTwhp2.d.ts → import-BCkipOTY.d.ts} +2 -2
- package/dist/{import-BdKPtLzo.d.mts → import-C9el4B_K.d.mts} +2 -2
- package/dist/{index-DOIE2pwx.d.ts → index-BExDPYEG.d.mts} +10 -8
- package/dist/{index-DOIE2pwx.d.mts → index-BExDPYEG.d.ts} +10 -8
- package/dist/{index-94yESPHr.d.mts → index-icv8DBhg.d.mts} +2 -2
- package/dist/{index-D41_Ba4j.d.ts → index-yXGVO31H.d.ts} +2 -2
- package/dist/parseCEL.d.mts +2 -2
- package/dist/parseCEL.d.ts +2 -2
- package/dist/parseCypher.d.mts +1 -1
- package/dist/parseCypher.d.ts +1 -1
- package/dist/parseGremlin.d.mts +1 -1
- package/dist/parseGremlin.d.ts +1 -1
- package/dist/parseJSONata.d.mts +2 -2
- package/dist/parseJSONata.d.ts +2 -2
- package/dist/parseJsonLogic.d.mts +2 -2
- package/dist/parseJsonLogic.d.ts +2 -2
- package/dist/parseMongoDB.d.mts +2 -2
- package/dist/parseMongoDB.d.ts +2 -2
- package/dist/parseSPARQL.d.mts +1 -1
- package/dist/parseSPARQL.d.ts +1 -1
- 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.d.mts +9 -7
- package/dist/react-querybuilder_core.legacy-esm.d.ts +9 -7
- package/dist/react-querybuilder_core.legacy-esm.js +7 -7
- package/dist/react-querybuilder_core.production.d.mts +9 -7
- package/dist/react-querybuilder_core.production.mjs +74 -1
- package/dist/react-querybuilder_core.production.mjs.map +1 -1
- package/dist/{transformQuery-B7d9AWUf.d.mts → transformQuery-B6PRLRkS.d.mts} +2 -2
- package/dist/{transformQuery-BXDiUBGB.d.ts → transformQuery-DVjJZXnB.d.ts} +2 -2
- package/dist/transformQuery.d.mts +1 -1
- package/dist/transformQuery.d.ts +1 -1
- package/package.json +5 -5
|
@@ -1239,16 +1239,18 @@ Required<HomomorphicPick<BaseType, Keys>>>;
|
|
|
1239
1239
|
Remove the optional modifier from the specified keys in an array.
|
|
1240
1240
|
*/
|
|
1241
1241
|
type SetArrayRequired<TArray extends UnknownArray, Keys, Counter extends any[] = [], Accumulator extends UnknownArray = []> = TArray extends unknown // For distributing `TArray` when it's a union
|
|
1242
|
-
? keyof TArray
|
|
1243
|
-
//
|
|
1244
|
-
// `
|
|
1245
|
-
[
|
|
1246
|
-
? `${Counter['length']}` extends `${Keys & (string | number)}` // If the current index needs to be required
|
|
1242
|
+
? '0' extends keyof TArray ? TArray extends readonly [(infer First)?, ...infer Rest] ?
|
|
1243
|
+
// A tuple allows fewer than one element only when its first element is optional. Written in exactly this shape because equivalent ones, such as `[] extends TArray`, are several times slower.
|
|
1244
|
+
// Unlike the other array loops, this one has no `any` guard above it, so the check is wrapped in tuples to stop `any` from matching both branches.
|
|
1245
|
+
[TArray] extends [readonly [unknown, ...unknown[]]] ? SetArrayRequired<Rest, Keys, [...Counter, any], [...Accumulator, First]> : `${Counter['length']}` extends `${Keys & (string | number)}` // If the current index needs to be required
|
|
1247
1246
|
? SetArrayRequired<Rest, Keys, [...Counter, any], [...Accumulator, First]> :
|
|
1248
1247
|
// If the current element is optional, but it doesn't need to be required,
|
|
1249
1248
|
// then we can exit early, since no further elements can now be made required.
|
|
1250
|
-
[...Accumulator, ...TArray] :
|
|
1251
|
-
:
|
|
1249
|
+
[...Accumulator, ...TArray] : never // Should never happen, since `[(infer F)?, ...infer R]` is a top-type for arrays.
|
|
1250
|
+
:
|
|
1251
|
+
// Exit if `TArray` is empty (e.g., []), or
|
|
1252
|
+
// `TArray` contains no non-rest elements preceding the rest element (e.g., `[...string[]]` or `[...string[], string]`).
|
|
1253
|
+
[...Accumulator, ...TArray] : never; // Should never happen
|
|
1252
1254
|
//#endregion
|
|
1253
1255
|
//#region src/types/options.d.ts
|
|
1254
1256
|
type RequireAtLeastOne<O, K extends keyof O> = { [P in K]-?: Required<Pick<O, P>> & Partial<Pick<O, Exclude<K, P>>>; }[K] & Except<O, K>;
|
|
@@ -1239,16 +1239,18 @@ Required<HomomorphicPick<BaseType, Keys>>>;
|
|
|
1239
1239
|
Remove the optional modifier from the specified keys in an array.
|
|
1240
1240
|
*/
|
|
1241
1241
|
type SetArrayRequired<TArray extends UnknownArray, Keys, Counter extends any[] = [], Accumulator extends UnknownArray = []> = TArray extends unknown // For distributing `TArray` when it's a union
|
|
1242
|
-
? keyof TArray
|
|
1243
|
-
//
|
|
1244
|
-
// `
|
|
1245
|
-
[
|
|
1246
|
-
? `${Counter['length']}` extends `${Keys & (string | number)}` // If the current index needs to be required
|
|
1242
|
+
? '0' extends keyof TArray ? TArray extends readonly [(infer First)?, ...infer Rest] ?
|
|
1243
|
+
// A tuple allows fewer than one element only when its first element is optional. Written in exactly this shape because equivalent ones, such as `[] extends TArray`, are several times slower.
|
|
1244
|
+
// Unlike the other array loops, this one has no `any` guard above it, so the check is wrapped in tuples to stop `any` from matching both branches.
|
|
1245
|
+
[TArray] extends [readonly [unknown, ...unknown[]]] ? SetArrayRequired<Rest, Keys, [...Counter, any], [...Accumulator, First]> : `${Counter['length']}` extends `${Keys & (string | number)}` // If the current index needs to be required
|
|
1247
1246
|
? SetArrayRequired<Rest, Keys, [...Counter, any], [...Accumulator, First]> :
|
|
1248
1247
|
// If the current element is optional, but it doesn't need to be required,
|
|
1249
1248
|
// then we can exit early, since no further elements can now be made required.
|
|
1250
|
-
[...Accumulator, ...TArray] :
|
|
1251
|
-
:
|
|
1249
|
+
[...Accumulator, ...TArray] : never // Should never happen, since `[(infer F)?, ...infer R]` is a top-type for arrays.
|
|
1250
|
+
:
|
|
1251
|
+
// Exit if `TArray` is empty (e.g., []), or
|
|
1252
|
+
// `TArray` contains no non-rest elements preceding the rest element (e.g., `[...string[]]` or `[...string[], string]`).
|
|
1253
|
+
[...Accumulator, ...TArray] : never; // Should never happen
|
|
1252
1254
|
//#endregion
|
|
1253
1255
|
//#region src/types/options.d.ts
|
|
1254
1256
|
type RequireAtLeastOne<O, K extends keyof O> = { [P in K]-?: Required<Pick<O, P>> & Partial<Pick<O, Exclude<K, P>>>; }[K] & Except<O, K>;
|