@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.
Files changed (43) hide show
  1. package/dist/cjs/react-querybuilder_core.cjs.development.d.ts +9 -7
  2. package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +9 -7
  3. package/dist/cjs/react-querybuilder_core.cjs.production.js +74 -1
  4. package/dist/cjs/react-querybuilder_core.cjs.production.js.map +1 -1
  5. package/dist/derivations.d.mts +3 -3
  6. package/dist/derivations.d.ts +3 -3
  7. package/dist/formatQuery.d.mts +1 -1
  8. package/dist/formatQuery.d.ts +1 -1
  9. package/dist/{import-BfZTwhp2.d.ts → import-BCkipOTY.d.ts} +2 -2
  10. package/dist/{import-BdKPtLzo.d.mts → import-C9el4B_K.d.mts} +2 -2
  11. package/dist/{index-DOIE2pwx.d.ts → index-BExDPYEG.d.mts} +10 -8
  12. package/dist/{index-DOIE2pwx.d.mts → index-BExDPYEG.d.ts} +10 -8
  13. package/dist/{index-94yESPHr.d.mts → index-icv8DBhg.d.mts} +2 -2
  14. package/dist/{index-D41_Ba4j.d.ts → index-yXGVO31H.d.ts} +2 -2
  15. package/dist/parseCEL.d.mts +2 -2
  16. package/dist/parseCEL.d.ts +2 -2
  17. package/dist/parseCypher.d.mts +1 -1
  18. package/dist/parseCypher.d.ts +1 -1
  19. package/dist/parseGremlin.d.mts +1 -1
  20. package/dist/parseGremlin.d.ts +1 -1
  21. package/dist/parseJSONata.d.mts +2 -2
  22. package/dist/parseJSONata.d.ts +2 -2
  23. package/dist/parseJsonLogic.d.mts +2 -2
  24. package/dist/parseJsonLogic.d.ts +2 -2
  25. package/dist/parseMongoDB.d.mts +2 -2
  26. package/dist/parseMongoDB.d.ts +2 -2
  27. package/dist/parseSPARQL.d.mts +1 -1
  28. package/dist/parseSPARQL.d.ts +1 -1
  29. package/dist/parseSQL.d.mts +2 -2
  30. package/dist/parseSQL.d.ts +2 -2
  31. package/dist/parseSpEL.d.mts +2 -2
  32. package/dist/parseSpEL.d.ts +2 -2
  33. package/dist/react-querybuilder_core.d.mts +9 -7
  34. package/dist/react-querybuilder_core.legacy-esm.d.ts +9 -7
  35. package/dist/react-querybuilder_core.legacy-esm.js +7 -7
  36. package/dist/react-querybuilder_core.production.d.mts +9 -7
  37. package/dist/react-querybuilder_core.production.mjs +74 -1
  38. package/dist/react-querybuilder_core.production.mjs.map +1 -1
  39. package/dist/{transformQuery-B7d9AWUf.d.mts → transformQuery-B6PRLRkS.d.mts} +2 -2
  40. package/dist/{transformQuery-BXDiUBGB.d.ts → transformQuery-DVjJZXnB.d.ts} +2 -2
  41. package/dist/transformQuery.d.mts +1 -1
  42. package/dist/transformQuery.d.ts +1 -1
  43. 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 & `${number}` extends never ?
1243
- // Exit if `TArray` is empty (e.g., []), or
1244
- // `TArray` contains no non-rest elements preceding the rest element (e.g., `[...string[]]` or `[...string[], string]`).
1245
- [...Accumulator, ...TArray] : TArray extends readonly [(infer First)?, ...infer Rest] ? '0' extends OptionalKeysOf<TArray> // If the first element of `TArray` is optional
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] : SetArrayRequired<Rest, Keys, [...Counter, any], [...Accumulator, TArray[0]]> : never // Should never happen, since `[(infer F)?, ...infer R]` is a top-type for arrays.
1251
- : never; // Should never happen
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 & `${number}` extends never ?
1243
- // Exit if `TArray` is empty (e.g., []), or
1244
- // `TArray` contains no non-rest elements preceding the rest element (e.g., `[...string[]]` or `[...string[], string]`).
1245
- [...Accumulator, ...TArray] : TArray extends readonly [(infer First)?, ...infer Rest] ? '0' extends OptionalKeysOf<TArray> // If the first element of `TArray` is optional
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] : SetArrayRequired<Rest, Keys, [...Counter, any], [...Accumulator, TArray[0]]> : never // Should never happen, since `[(infer F)?, ...infer R]` is a top-type for arrays.
1251
- : never; // Should never happen
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>;