@react-querybuilder/datetime 8.12.0 → 8.14.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.
Files changed (65) hide show
  1. package/date-fns/package.json +4 -0
  2. package/dayjs/package.json +4 -0
  3. package/dist/cjs/{getDatetimeRuleProcessorSQL-B0uQUU_F.js → getDatetimeRuleProcessorSQL-xGETy1ec.js} +1 -1
  4. package/dist/cjs/{getDatetimeRuleProcessorSQL-B0uQUU_F.js.map → getDatetimeRuleProcessorSQL-xGETy1ec.js.map} +1 -1
  5. package/dist/cjs/react-querybuilder_datetime.cjs.development.d.ts +1 -1
  6. package/dist/cjs/react-querybuilder_datetime.cjs.development.date-fns.d.ts +1 -1
  7. package/dist/cjs/react-querybuilder_datetime.cjs.development.dayjs.d.ts +1 -1
  8. package/dist/cjs/react-querybuilder_datetime.cjs.development.dayjs.js +10 -6
  9. package/dist/cjs/react-querybuilder_datetime.cjs.development.dayjs.js.map +1 -1
  10. package/dist/cjs/react-querybuilder_datetime.cjs.development.jsdate.d.ts +1 -1
  11. package/dist/cjs/react-querybuilder_datetime.cjs.development.luxon.d.ts +1 -1
  12. package/dist/cjs/react-querybuilder_datetime.cjs.production.d.ts +1 -1
  13. package/dist/cjs/react-querybuilder_datetime.cjs.production.date-fns.d.ts +1 -1
  14. package/dist/cjs/react-querybuilder_datetime.cjs.production.date-fns.js +1 -1
  15. package/dist/cjs/react-querybuilder_datetime.cjs.production.dayjs.d.ts +1 -1
  16. package/dist/cjs/react-querybuilder_datetime.cjs.production.dayjs.js +1 -1
  17. package/dist/cjs/react-querybuilder_datetime.cjs.production.js +1 -1
  18. package/dist/cjs/react-querybuilder_datetime.cjs.production.jsdate.d.ts +1 -1
  19. package/dist/cjs/react-querybuilder_datetime.cjs.production.jsdate.js +1 -1
  20. package/dist/cjs/react-querybuilder_datetime.cjs.production.luxon.d.ts +1 -1
  21. package/dist/cjs/react-querybuilder_datetime.cjs.production.luxon.js +1 -1
  22. package/dist/cjs/{types-BF3ibCEu.d.ts → types-B0Eveeq4.d.ts} +104 -103
  23. package/dist/{getDatetimeRuleProcessorSQL-Cf79Th_c.mjs → getDatetimeRuleProcessorSQL-CugqyF_a.mjs} +1 -1
  24. package/dist/{getDatetimeRuleProcessorSQL-Cf79Th_c.mjs.map → getDatetimeRuleProcessorSQL-CugqyF_a.mjs.map} +1 -1
  25. package/dist/{getDatetimeRuleProcessorSQL-DfPnCZiT.js → getDatetimeRuleProcessorSQL-Cxyajj0g.js} +6 -6
  26. package/dist/{getDatetimeRuleProcessorSQL-DfPnCZiT.js.map → getDatetimeRuleProcessorSQL-Cxyajj0g.js.map} +1 -1
  27. package/dist/getDatetimeRuleProcessorSQL-Dcqi5kh5.mjs +2 -0
  28. package/dist/getDatetimeRuleProcessorSQL-Dcqi5kh5.mjs.map +1 -0
  29. package/dist/react-querybuilder_datetime.d.mts +1 -1
  30. package/dist/react-querybuilder_datetime.date-fns.d.mts +1 -1
  31. package/dist/react-querybuilder_datetime.date-fns.mjs +1 -1
  32. package/dist/react-querybuilder_datetime.dayjs.d.mts +1 -1
  33. package/dist/react-querybuilder_datetime.dayjs.mjs +1 -1
  34. package/dist/react-querybuilder_datetime.jsdate.d.mts +1 -1
  35. package/dist/react-querybuilder_datetime.jsdate.mjs +1 -1
  36. package/dist/react-querybuilder_datetime.legacy-esm.d.ts +1 -1
  37. package/dist/react-querybuilder_datetime.legacy-esm.date-fns.d.ts +1 -1
  38. package/dist/react-querybuilder_datetime.legacy-esm.date-fns.js +1 -1
  39. package/dist/react-querybuilder_datetime.legacy-esm.dayjs.d.ts +1 -1
  40. package/dist/react-querybuilder_datetime.legacy-esm.dayjs.js +1 -1
  41. package/dist/react-querybuilder_datetime.legacy-esm.js +1 -1
  42. package/dist/react-querybuilder_datetime.legacy-esm.jsdate.d.ts +1 -1
  43. package/dist/react-querybuilder_datetime.legacy-esm.jsdate.js +1 -1
  44. package/dist/react-querybuilder_datetime.legacy-esm.luxon.d.ts +1 -1
  45. package/dist/react-querybuilder_datetime.legacy-esm.luxon.js +1 -1
  46. package/dist/react-querybuilder_datetime.luxon.d.mts +1 -1
  47. package/dist/react-querybuilder_datetime.luxon.mjs +1 -1
  48. package/dist/react-querybuilder_datetime.mjs +1 -1
  49. package/dist/react-querybuilder_datetime.production.d.mts +1 -1
  50. package/dist/react-querybuilder_datetime.production.date-fns.d.mts +1 -1
  51. package/dist/react-querybuilder_datetime.production.date-fns.mjs +1 -1
  52. package/dist/react-querybuilder_datetime.production.dayjs.d.mts +1 -1
  53. package/dist/react-querybuilder_datetime.production.dayjs.mjs +1 -1
  54. package/dist/react-querybuilder_datetime.production.jsdate.d.mts +1 -1
  55. package/dist/react-querybuilder_datetime.production.jsdate.mjs +1 -1
  56. package/dist/react-querybuilder_datetime.production.luxon.d.mts +1 -1
  57. package/dist/react-querybuilder_datetime.production.luxon.mjs +1 -1
  58. package/dist/react-querybuilder_datetime.production.mjs +1 -1
  59. package/dist/{types-CU16s8jw.d.ts → types-C-P0L9xh.d.mts} +110 -109
  60. package/dist/{types-DNawVAiI.d.mts → types-DuaAB95e.d.ts} +110 -109
  61. package/jsdate/package.json +4 -0
  62. package/luxon/package.json +4 -0
  63. package/package.json +17 -13
  64. package/dist/chunk-DrjzjjTJ.mjs +0 -23
  65. package/dist/chunk-Dv2ph0Ay.js +0 -23
@@ -17,34 +17,6 @@ type Intersection = UnionToIntersection<Union>;
17
17
  //=> {the(): void; great(arg: string): void; escape: boolean};
18
18
  ```
19
19
 
20
- A more applicable example which could make its way into your library code follows.
21
-
22
- @example
23
- ```
24
- import type {UnionToIntersection} from 'type-fest';
25
-
26
- class CommandOne {
27
- commands: {
28
- a1: () => undefined,
29
- b1: () => undefined,
30
- }
31
- }
32
-
33
- class CommandTwo {
34
- commands: {
35
- a2: (argA: string) => undefined,
36
- b2: (argB: string) => undefined,
37
- }
38
- }
39
-
40
- const union = [new CommandOne(), new CommandTwo()].map(instance => instance.commands);
41
- type Union = typeof union;
42
- //=> {a1(): void; b1(): void} | {a2(argA: string): void; b2(argB: string): void}
43
-
44
- type Intersection = UnionToIntersection<Union>;
45
- //=> {a1(): void; b1(): void; a2(argA: string): void; b2(argB: string): void}
46
- ```
47
-
48
20
  @category Type
49
21
  */
50
22
  type UnionToIntersection<Union> = (
@@ -120,8 +92,8 @@ import type {IsAny} from 'type-fest';
120
92
  const typedObject = {a: 1, b: 2} as const;
121
93
  const anyObject: any = {a: 1, b: 2};
122
94
 
123
- function get<O extends (IsAny<O> extends true ? {} : Record<string, number>), K extends keyof O = keyof O>(obj: O, key: K) {
124
- return obj[key];
95
+ function get<O extends (IsAny<O> extends true ? {} : Record<string, number>), K extends keyof O = keyof O>(object: O, key: K) {
96
+ return object[key];
125
97
  }
126
98
 
127
99
  const typedA = get(typedObject, 'a');
@@ -146,17 +118,17 @@ This is useful when writing utility types or schema validators that need to diff
146
118
  ```
147
119
  import type {IsOptionalKeyOf} from 'type-fest';
148
120
 
149
- interface User {
121
+ type User = {
150
122
  name: string;
151
123
  surname: string;
152
124
 
153
125
  luckyNumber?: number;
154
- }
126
+ };
155
127
 
156
- interface Admin {
128
+ type Admin = {
157
129
  name: string;
158
130
  surname?: string;
159
- }
131
+ };
160
132
 
161
133
  type T1 = IsOptionalKeyOf<User, 'luckyNumber'>;
162
134
  //=> true
@@ -189,12 +161,12 @@ This is useful when you want to create a new type that contains different type v
189
161
  ```
190
162
  import type {OptionalKeysOf, Except} from 'type-fest';
191
163
 
192
- interface User {
164
+ type User = {
193
165
  name: string;
194
166
  surname: string;
195
167
 
196
168
  luckyNumber?: number;
197
- }
169
+ };
198
170
 
199
171
  const REMOVE_FIELD = Symbol('remove field symbol');
200
172
  type UpdateOperation<Entity extends object> = Except<Partial<Entity>, OptionalKeysOf<Entity>> & {
@@ -202,12 +174,12 @@ type UpdateOperation<Entity extends object> = Except<Partial<Entity>, OptionalKe
202
174
  };
203
175
 
204
176
  const update1: UpdateOperation<User> = {
205
- name: 'Alice'
177
+ name: 'Alice',
206
178
  };
207
179
 
208
180
  const update2: UpdateOperation<User> = {
209
181
  name: 'Bob',
210
- luckyNumber: REMOVE_FIELD
182
+ luckyNumber: REMOVE_FIELD,
211
183
  };
212
184
  ```
213
185
 
@@ -227,17 +199,23 @@ This is useful when you want to create a new type that contains different type v
227
199
  ```
228
200
  import type {RequiredKeysOf} from 'type-fest';
229
201
 
230
- declare function createValidation<Entity extends object, Key extends RequiredKeysOf<Entity> = RequiredKeysOf<Entity>>(field: Key, validator: (value: Entity[Key]) => boolean): ValidatorFn;
202
+ declare function createValidation<
203
+ Entity extends object,
204
+ Key extends RequiredKeysOf<Entity> = RequiredKeysOf<Entity>,
205
+ >(field: Key, validator: (value: Entity[Key]) => boolean): (entity: Entity) => boolean;
231
206
 
232
- interface User {
207
+ type User = {
233
208
  name: string;
234
209
  surname: string;
235
-
236
210
  luckyNumber?: number;
237
- }
211
+ };
238
212
 
239
213
  const validator1 = createValidation<User>('name', value => value.length < 25);
240
214
  const validator2 = createValidation<User>('surname', value => value.length < 25);
215
+
216
+ // @ts-expect-error
217
+ const validator3 = createValidation<User>('luckyNumber', value => value > 0);
218
+ // Error: Argument of type '"luckyNumber"' is not assignable to parameter of type '"name" | "surname"'.
241
219
  ```
242
220
 
243
221
  @category Utilities
@@ -259,29 +237,41 @@ Useful in type utilities, such as checking if something does not occur.
259
237
  ```
260
238
  import type {IsNever, And} from 'type-fest';
261
239
 
262
- // https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
263
- type AreStringsEqual<A extends string, B extends string> =
264
- And<
265
- IsNever<Exclude<A, B>> extends true ? true : false,
266
- IsNever<Exclude<B, A>> extends true ? true : false
267
- >;
268
-
269
- type EndIfEqual<I extends string, O extends string> =
270
- AreStringsEqual<I, O> extends true
271
- ? never
272
- : void;
273
-
274
- function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
275
- if (input === output) {
276
- process.exit(0);
277
- }
278
- }
240
+ type A = IsNever<never>;
241
+ //=> true
279
242
 
280
- endIfEqual('abc', 'abc');
281
- //=> never
243
+ type B = IsNever<any>;
244
+ //=> false
245
+
246
+ type C = IsNever<unknown>;
247
+ //=> false
248
+
249
+ type D = IsNever<never[]>;
250
+ //=> false
251
+
252
+ type E = IsNever<object>;
253
+ //=> false
282
254
 
283
- endIfEqual('abc', '123');
284
- //=> void
255
+ type F = IsNever<string>;
256
+ //=> false
257
+ ```
258
+
259
+ @example
260
+ ```
261
+ import type {IsNever} from 'type-fest';
262
+
263
+ type IsTrue<T> = T extends true ? true : false;
264
+
265
+ // When a distributive conditional is instantiated with `never`, the entire conditional results in `never`.
266
+ type A = IsTrue<never>;
267
+ // ^? type A = never
268
+
269
+ // If you don't want that behaviour, you can explicitly add an `IsNever` check before the distributive conditional.
270
+ type IsTrueFixed<T> =
271
+ IsNever<T> extends true ? false : T extends true ? true : false;
272
+
273
+ type B = IsTrueFixed<never>;
274
+ // ^? type B = false
285
275
  ```
286
276
 
287
277
  @category Type Guard
@@ -302,7 +292,7 @@ Note:
302
292
 
303
293
  @example
304
294
  ```
305
- import {If} from 'type-fest';
295
+ import type {If} from 'type-fest';
306
296
 
307
297
  type A = If<true, 'yes', 'no'>;
308
298
  //=> 'yes'
@@ -322,7 +312,7 @@ type E = If<never, 'yes', 'no'>;
322
312
 
323
313
  @example
324
314
  ```
325
- import {If, IsAny, IsNever} from 'type-fest';
315
+ import type {If, IsAny, IsNever} from 'type-fest';
326
316
 
327
317
  type A = If<IsAny<unknown>, 'is any', 'not any'>;
328
318
  //=> 'not any'
@@ -333,7 +323,7 @@ type B = If<IsNever<never>, 'is never', 'not never'>;
333
323
 
334
324
  @example
335
325
  ```
336
- import {If, IsEqual} from 'type-fest';
326
+ import type {If, IsEqual} from 'type-fest';
337
327
 
338
328
  type IfEqual<T, U, IfBranch, ElseBranch> = If<IsEqual<T, U>, IfBranch, ElseBranch>;
339
329
 
@@ -464,10 +454,11 @@ const literal = {foo: 123, bar: 'hello', baz: 456};
464
454
  const someType: SomeType = literal;
465
455
  const someInterface: SomeInterface = literal;
466
456
 
467
- function fn(object: Record<string, unknown>): void {}
457
+ declare function fn(object: Record<string, unknown>): void;
468
458
 
469
459
  fn(literal); // Good: literal object type is sealed
470
460
  fn(someType); // Good: type is sealed
461
+ // @ts-expect-error
471
462
  fn(someInterface); // Error: Index signature for type 'string' is missing in type 'someInterface'. Because `interface` can be re-opened
472
463
  fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface` into a `type`
473
464
  ```
@@ -505,7 +496,7 @@ type Includes<Value extends readonly any[], Item> =
505
496
  @category Type Guard
506
497
  @category Utilities
507
498
  */
508
- type IsEqual<A, B> = [A, B] extends [infer AA, infer BB] ? [AA] extends [never] ? [BB] extends [never] ? true : false : [BB] extends [never] ? false : _IsEqual<AA, BB> : false;
499
+ type IsEqual<A, B> = [A] extends [B] ? [B] extends [A] ? _IsEqual<A, B> : false : false;
509
500
  // This version fails the `equalWrappedTupleIntersectionToBeNeverAndNeverExpanded` test in `test-d/is-equal.ts`.
510
501
  type _IsEqual<A, B> = (<G>() => G extends A & G | G ? 1 : 2) extends (<G>() => G extends B & G | G ? 1 : 2) ? true : false;
511
502
  //#endregion
@@ -527,6 +518,7 @@ It relies on the fact that an empty object (`{}`) is assignable to an object wit
527
518
  ```
528
519
  const indexed: Record<string, unknown> = {}; // Allowed
529
520
 
521
+ // @ts-expect-error
530
522
  const keyed: Record<'foo', unknown> = {}; // Error
531
523
  // => TS2739: Type '{}' is missing the following properties from type 'Record<"foo" | "bar", unknown>': foo, bar
532
524
  ```
@@ -540,16 +532,14 @@ type Indexed = {} extends Record<string, unknown>
540
532
  // => '✅ `{}` is assignable to `Record<string, unknown>`'
541
533
 
542
534
  type Keyed = {} extends Record<'foo' | 'bar', unknown>
543
- ? "✅ `{}` is assignable to `Record<'foo' | 'bar', unknown>`"
544
- : "❌ `{}` is NOT assignable to `Record<'foo' | 'bar', unknown>`";
535
+ ? '✅ `{}` is assignable to `Record<\'foo\' | \'bar\', unknown>`'
536
+ : '❌ `{}` is NOT assignable to `Record<\'foo\' | \'bar\', unknown>`';
545
537
  // => "❌ `{}` is NOT assignable to `Record<'foo' | 'bar', unknown>`"
546
538
  ```
547
539
 
548
540
  Using a [mapped type](https://www.typescriptlang.org/docs/handbook/2/mapped-types.html#further-exploration), you can then check for each `KeyType` of `ObjectType`...
549
541
 
550
542
  ```
551
- import type {OmitIndexSignature} from 'type-fest';
552
-
553
543
  type OmitIndexSignature<ObjectType> = {
554
544
  [KeyType in keyof ObjectType // Map each key of `ObjectType`...
555
545
  ]: ObjectType[KeyType]; // ...to its original value, i.e. `OmitIndexSignature<Foo> == Foo`.
@@ -559,14 +549,12 @@ type OmitIndexSignature<ObjectType> = {
559
549
  ...whether an empty object (`{}`) would be assignable to an object with that `KeyType` (`Record<KeyType, unknown>`)...
560
550
 
561
551
  ```
562
- import type {OmitIndexSignature} from 'type-fest';
563
-
564
552
  type OmitIndexSignature<ObjectType> = {
565
553
  [KeyType in keyof ObjectType
566
- // Is `{}` assignable to `Record<KeyType, unknown>`?
567
- as {} extends Record<KeyType, unknown>
568
- ? ... // ✅ `{}` is assignable to `Record<KeyType, unknown>`
569
- : ... // ❌ `{}` is NOT assignable to `Record<KeyType, unknown>`
554
+ // Is `{}` assignable to `Record<KeyType, unknown>`?
555
+ as {} extends Record<KeyType, unknown>
556
+ ? never // ✅ `{}` is assignable to `Record<KeyType, unknown>`
557
+ : KeyType // ❌ `{}` is NOT assignable to `Record<KeyType, unknown>`
570
558
  ]: ObjectType[KeyType];
571
559
  };
572
560
  ```
@@ -577,21 +565,21 @@ If `{}` is assignable, it means that `KeyType` is an index signature and we want
577
565
  ```
578
566
  import type {OmitIndexSignature} from 'type-fest';
579
567
 
580
- interface Example {
568
+ type Example = {
581
569
  // These index signatures will be removed.
582
- [x: string]: any
583
- [x: number]: any
584
- [x: symbol]: any
585
- [x: `head-${string}`]: string
586
- [x: `${string}-tail`]: string
587
- [x: `head-${string}-tail`]: string
588
- [x: `${bigint}`]: string
589
- [x: `embedded-${number}`]: string
570
+ [x: string]: any;
571
+ [x: number]: any;
572
+ [x: symbol]: any;
573
+ [x: `head-${string}`]: string;
574
+ [x: `${string}-tail`]: string;
575
+ [x: `head-${string}-tail`]: string;
576
+ [x: `${bigint}`]: string;
577
+ [x: `embedded-${number}`]: string;
590
578
 
591
579
  // These explicitly defined keys will remain.
592
580
  foo: 'bar';
593
581
  qux?: 'baz';
594
- }
582
+ };
595
583
 
596
584
  type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
597
585
  // => { foo: 'bar'; qux?: 'baz' | undefined; }
@@ -661,12 +649,12 @@ Merge two types into a new type. Keys of the second type overrides keys of the f
661
649
  ```
662
650
  import type {Merge} from 'type-fest';
663
651
 
664
- interface Foo {
652
+ type Foo = {
665
653
  [x: string]: unknown;
666
654
  [x: number]: unknown;
667
655
  foo: string;
668
656
  bar: symbol;
669
- }
657
+ };
670
658
 
671
659
  type Bar = {
672
660
  [x: number]: number;
@@ -845,12 +833,14 @@ type Foo = {
845
833
  type FooWithoutA = Except<Foo, 'a'>;
846
834
  //=> {b: string}
847
835
 
836
+ // @ts-expect-error
848
837
  const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
849
838
  //=> errors: 'a' does not exist in type '{ b: string; }'
850
839
 
851
840
  type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
852
841
  //=> {a: number} & Partial<Record<"b", never>>
853
842
 
843
+ // @ts-expect-error
854
844
  const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
855
845
  //=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
856
846
 
@@ -867,12 +857,12 @@ type UserData = {
867
857
 
868
858
  // `Omit` clearly doesn't behave as expected in this case:
869
859
  type PostPayload = Omit<UserData, 'email'>;
870
- //=> type PostPayload = { [x: string]: string; [x: number]: string; }
860
+ //=> { [x: string]: string; [x: number]: string; }
871
861
 
872
862
  // In situations like this, `Except` works better.
873
863
  // It simply removes the `email` key while preserving all the other keys.
874
- type PostPayload = Except<UserData, 'email'>;
875
- //=> type PostPayload = { [x: string]: string; name: string; role: 'admin' | 'user'; }
864
+ type PostPayloadFixed = Except<UserData, 'email'>;
865
+ //=> { [x: string]: string; name: string; role: 'admin' | 'user'; }
876
866
  ```
877
867
 
878
868
  @category Object
@@ -894,7 +884,7 @@ type Foo = {
894
884
  a?: number;
895
885
  b: string;
896
886
  c?: boolean;
897
- }
887
+ };
898
888
 
899
889
  type SomeRequired = SetRequired<Foo, 'b' | 'c'>;
900
890
  // type SomeRequired = {
@@ -969,7 +959,7 @@ type FlexibleOption<N extends string = string> = Simplify<WithUnknownIndex<Requi
969
959
  *
970
960
  * @group Option Lists
971
961
  */
972
- type ToFlexibleOption<Opt$1 extends BaseOption | string> = WithUnknownIndex<RequireAtLeastOne<Opt$1 extends string ? FlexibleOption<Opt$1> : Opt$1, "name" | "value">>;
962
+ type ToFlexibleOption<Opt extends BaseOption | string> = WithUnknownIndex<RequireAtLeastOne<Opt extends string ? FlexibleOption<Opt> : Opt, "name" | "value">>;
973
963
  /**
974
964
  * A generic {@link Option} requiring both `name` _and_ `value` properties.
975
965
  * Props that extend {@link OptionList} accept {@link BaseOption}, but
@@ -997,24 +987,24 @@ type BaseFullOption<N extends string = string> = Simplify<SetRequired<BaseOption
997
987
  *
998
988
  * @group Option Lists
999
989
  */
1000
- type ToFullOption<Opt$1 extends BaseOption> = Opt$1 extends BaseFullOption ? Opt$1 : Opt$1 extends BaseOption<infer IdentifierType> ? WithUnknownIndex<Opt$1 & FullOption<IdentifierType>> : never;
990
+ type ToFullOption<Opt extends BaseOption> = Opt extends BaseFullOption ? Opt : Opt extends BaseOption<infer IdentifierType> ? WithUnknownIndex<Opt & FullOption<IdentifierType>> : never;
1001
991
  /**
1002
992
  * A group of {@link Option}s, usually within an {@link OptionList}.
1003
993
  *
1004
994
  * @group Option Lists
1005
995
  */
1006
- interface OptionGroup<Opt$1 extends BaseOption = FlexibleOption> {
996
+ interface OptionGroup<Opt extends BaseOption = FlexibleOption> {
1007
997
  label: string;
1008
- options: WithUnknownIndex<Opt$1>[];
998
+ options: WithUnknownIndex<Opt>[];
1009
999
  }
1010
1000
  /**
1011
1001
  * A group of {@link BaseOption}s, usually within a {@link FlexibleOptionList}.
1012
1002
  *
1013
1003
  * @group Option Lists
1014
1004
  */
1015
- type FlexibleOptionGroup<Opt$1 extends BaseOption | string = BaseOption> = {
1005
+ type FlexibleOptionGroup<Opt extends BaseOption | string = BaseOption> = {
1016
1006
  label: string;
1017
- options: (Opt$1 extends BaseFullOption ? Opt$1 : ToFlexibleOption<Opt$1>)[];
1007
+ options: (Opt extends BaseFullOption ? Opt : ToFlexibleOption<Opt>)[];
1018
1008
  };
1019
1009
  /**
1020
1010
  * An array of options or option groups, like {@link OptionList} but the option type
@@ -1022,7 +1012,7 @@ type FlexibleOptionGroup<Opt$1 extends BaseOption | string = BaseOption> = {
1022
1012
  *
1023
1013
  * @group Option Lists
1024
1014
  */
1025
- type FlexibleOptionList<Opt$1 extends BaseOption> = ToFlexibleOption<Opt$1>[] | FlexibleOptionGroup<ToFlexibleOption<Opt$1>>[];
1015
+ type FlexibleOptionList<Opt extends BaseOption> = ToFlexibleOption<Opt>[] | FlexibleOptionGroup<ToFlexibleOption<Opt>>[];
1026
1016
  /**
1027
1017
  * An array of options or option groups, like {@link OptionList}, but using
1028
1018
  * {@link FullOption} instead of {@link Option}. This means that every member is
@@ -1030,7 +1020,7 @@ type FlexibleOptionList<Opt$1 extends BaseOption> = ToFlexibleOption<Opt$1>[] |
1030
1020
  *
1031
1021
  * @group Option Lists
1032
1022
  */
1033
- type FullOptionList<Opt$1 extends BaseOption> = Opt$1 extends BaseFullOption ? Opt$1[] | OptionGroup<Opt$1>[] : ToFullOption<Opt$1>[] | OptionGroup<ToFullOption<Opt$1>>[];
1023
+ type FullOptionList<Opt extends BaseOption> = Opt extends BaseFullOption ? Opt[] | OptionGroup<Opt>[] : ToFullOption<Opt>[] | OptionGroup<ToFullOption<Opt>>[];
1034
1024
  //#endregion
1035
1025
  //#region ../core/src/types/ruleGroups.d.ts
1036
1026
  /**
@@ -1637,6 +1627,17 @@ type ZeroOrMoreGroupVariants = RepeatStrings<["xor", "not"]>;
1637
1627
  */
1638
1628
  type NLTranslationKey = "and" | "or" | "true" | "false" | `groupPrefix${ZeroOrMoreGroupVariants}` | `groupSuffix${ZeroOrMoreGroupVariants}`;
1639
1629
  //#endregion
1630
+ //#region ../react-querybuilder/src/redux/getRqbStore.d.ts
1631
+ declare global {
1632
+ var __RQB_DEVTOOLS__: boolean | undefined;
1633
+ }
1634
+ /**
1635
+ * Gets the singleton React Query Builder store instance.
1636
+ * DevTools are enabled if either:
1637
+ * - globalThis.__RQB_DEVTOOLS__ is truthy
1638
+ * - window.__RQB_DEVTOOLS__ is truthy
1639
+ */
1640
+ //#endregion
1640
1641
  //#region src/types.d.ts
1641
1642
  interface RQBJsonLogicDateBetween {
1642
1643
  dateBetween: [RQBJsonLogic, RQBJsonLogic, RQBJsonLogic];
@@ -1748,4 +1749,4 @@ type IsDateFieldFunction = (...[rule, opts]: Parameters<RuleProcessor>) => boole
1748
1749
  type IsDateField = IsDateFieldFunction | Record<string, unknown> | Record<string, unknown>[] | boolean | undefined;
1749
1750
  //#endregion
1750
1751
  export { RuleProcessor as _, RQBJsonLogicDateAfter as a, RQBJsonLogicDateIn as c, RQBJsonLogicDateNotOn as d, RQBJsonLogicDateOn as f, ExportOperatorMap as g, RQBJsonLogicDateTimeOperations as h, RQBDateTimeLibraryAPI as i, RQBJsonLogicDateNotBetween as l, RQBJsonLogicDateOnOrBefore as m, IsDateFieldFunction as n, RQBJsonLogicDateBefore as o, RQBJsonLogicDateOnOrAfter as p, RQBDateTimeJsonLogic as r, RQBJsonLogicDateBetween as s, IsDateField as t, RQBJsonLogicDateNotIn as u, ValueProcessorByRule as v };
1751
- //# sourceMappingURL=types-BF3ibCEu.d.ts.map
1752
+ //# sourceMappingURL=types-B0Eveeq4.d.ts.map
@@ -362,4 +362,4 @@ const getDatetimeRuleProcessorSQL = (apiFns) => (rule, options) => {
362
362
 
363
363
  //#endregion
364
364
  export { getDatetimeValueProcessorOracle as a, defaultDateTimeNLOperatorMap as c, getDatetimeRuleProcessorCEL as d, getDatetimeJsonLogicOperations as f, getDatetimeValueProcessorMySQL as i, getDatetimeRuleProcessorNL as l, processIsDateField as m, getDatetimeValueProcessorANSI as n, getDatetimeValueProcessorPostgreSQL as o, isISOStringDateOnly as p, getDatetimeValueProcessorMSSQL as r, datetimeValueProcessorNL as s, getDatetimeRuleProcessorSQL as t, getDatetimeRuleProcessorMongoDBQuery as u };
365
- //# sourceMappingURL=getDatetimeRuleProcessorSQL-Cf79Th_c.mjs.map
365
+ //# sourceMappingURL=getDatetimeRuleProcessorSQL-CugqyF_a.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"getDatetimeRuleProcessorSQL-Cf79Th_c.mjs","names":["defaultIsDateField: IsDateFieldFunction","defaultDateTimeNLOperatorMap: ExportOperatorMap","datetimeValueProcessorNL: ValueProcessorByRule"],"sources":["../src/utils.ts","../src/getDatetimeJsonLogicOperations.ts","../src/getDatetimeRuleProcessorCEL.ts","../src/getDatetimeRuleProcessorMongoDBQuery.ts","../src/getDatetimeRuleProcessorNL.ts","../src/getDatetimeRuleProcessorSQL.ts"],"sourcesContent":["import type { RuleProcessor } from 'react-querybuilder';\nimport type { IsDateField, IsDateFieldFunction } from './types';\n\nexport const isISOStringDateOnly = (\n date: unknown\n): date is `${number}${number}${number}${number}-${number}${number}-${number}${number}` =>\n typeof date === 'string' && /^\\d{4}-\\d{2}-\\d{2}$/.test(date);\n\nexport const defaultIsDateField: IsDateFieldFunction = (\n ...[rule, opts]: Parameters<RuleProcessor>\n): boolean =>\n rule.operator !== 'contains' &&\n rule.operator !== 'beginsWith' &&\n rule.operator !== 'endsWith' &&\n rule.operator !== 'doesNotContain' &&\n rule.operator !== 'doesNotBeginWith' &&\n rule.operator !== 'doesNotEndWith' &&\n rule.operator !== 'null' &&\n rule.operator !== 'notNull' &&\n /^(?:date|datetime|datetimeoffset|timestamp)\\b/i.test(opts?.fieldData?.datatype as string);\n\nexport const processIsDateField = (\n isDateField: IsDateField,\n ...[rule, opts]: Parameters<RuleProcessor>\n): boolean => {\n if (typeof isDateField === 'boolean') {\n return isDateField;\n }\n\n if (typeof isDateField === 'function') {\n return isDateField(rule, opts);\n }\n\n if (Array.isArray(isDateField)) {\n return isDateField.some(condition =>\n Object.entries(condition).every(([key, value]) => opts?.fieldData?.[key] === value)\n );\n }\n\n if (typeof isDateField === 'object') {\n return Object.entries(isDateField).every(([key, value]) => opts?.fieldData?.[key] === value);\n }\n\n return defaultIsDateField(rule, opts);\n};\n","import type { RQBDateTimeLibraryAPI, RQBJsonLogicDateTimeOperations } from './types';\n\n/**\n * Custom operations for use with JsonLogic objects generated by\n * {@link datetimeRuleProcessorJsonLogic}.\n */\nexport const getDatetimeJsonLogicOperations = ({\n isAfter,\n isBefore,\n isSame,\n}: RQBDateTimeLibraryAPI): RQBJsonLogicDateTimeOperations => ({\n dateAfter: (a, b) => isAfter(a, b),\n dateBefore: (a, b) => isBefore(a, b),\n dateBetween: (a, b, c) =>\n isSame(b, a) ||\n isSame(b, c) ||\n (isAfter(b, a) && isBefore(b, c)) ||\n (isAfter(b, c) && isBefore(b, a)),\n dateNotBetween: (a, b, c) =>\n !isSame(b, a) &&\n !isSame(b, c) &&\n ((isBefore(a, c) && (isBefore(b, a) || isAfter(b, c))) ||\n (isAfter(a, c) && (isBefore(b, c) || isAfter(b, a)))),\n dateIn: (a, b) => b.some(v => isSame(a, v)),\n dateNotIn: (a, b) => b.every(v => !isSame(a, v)),\n dateNotOn: (a, b) => !isSame(a, b),\n dateOn: (a, b) => isSame(a, b),\n dateOnOrAfter: (a, b) => isAfter(a, b) || isSame(a, b),\n dateOnOrBefore: (a, b) => isBefore(a, b) || isSame(a, b),\n});\n","import type { RuleProcessor } from 'react-querybuilder';\nimport { defaultRuleProcessorCEL, lc, toArray } from 'react-querybuilder';\nimport type { RQBDateTimeLibraryAPI } from './types';\nimport { processIsDateField } from './utils';\n\nconst shouldNegate = (op: string) => /^(does)?not/i.test(op);\n\n/**\n * Generates a rule processor with date/time features for use by\n * {@link @react-querybuilder/core!formatQuery formatQuery} with the \"cel\" format.\n */\nexport const getDatetimeRuleProcessorCEL =\n (apiFns: RQBDateTimeLibraryAPI): RuleProcessor =>\n (rule, options) => {\n const opts = options ?? /* istanbul ignore next */ {};\n const { context = {} } = opts;\n\n if (rule.valueSource === 'field' || !processIsDateField(context.isDateField, rule, opts)) {\n return defaultRuleProcessorCEL(rule, opts);\n }\n\n const ts = (d: string | Date) => `timestamp(\"${apiFns.toISOString(d)}\")`;\n\n const operatorTL = lc(rule.operator.replace(/^=$/, '=='));\n\n switch (operatorTL) {\n case '<':\n case '<=':\n case '==':\n case '!=':\n case '>':\n case '>=':\n return `${rule.field} ${operatorTL} ${ts(rule.value)}`;\n }\n\n const valueAsArray: string[] = toArray(rule.value, { retainEmptyStrings: false });\n const valueAsDateArray = valueAsArray\n .map(v => apiFns.toDate(v))\n .filter(dateVal => apiFns.isValid(dateVal));\n\n switch (operatorTL) {\n case 'in':\n case 'notin': {\n if (valueAsDateArray.length === 0) return '';\n const [prefix, suffix] = shouldNegate(operatorTL) ? ['!(', ')'] : ['', ''];\n return `${prefix}${rule.field} in [${valueAsDateArray\n .map(val => ts(val))\n .join(', ')}]${suffix}`;\n }\n\n case 'between':\n case 'notbetween': {\n if (valueAsDateArray.length < 2) return '';\n const [first, second] = valueAsDateArray;\n const [firstDate, secondDate] = apiFns.isBefore(first, second)\n ? [first, second]\n : [second, first];\n return operatorTL === 'between'\n ? `(${rule.field} >= ${ts(firstDate)} && ${rule.field} <= ${ts(secondDate)})`\n : `(${rule.field} < ${ts(firstDate)} || ${rule.field} > ${ts(secondDate)})`;\n }\n }\n\n return defaultRuleProcessorCEL(rule, opts);\n };\n","import type { RuleProcessor } from 'react-querybuilder';\nimport { defaultRuleProcessorMongoDBQuery, mongoOperators, toArray } from 'react-querybuilder';\nimport type { RQBDateTimeLibraryAPI } from './types';\nimport { processIsDateField } from './utils';\n\n/**\n * Generates a rule processor with date/time features for use by\n * {@link @react-querybuilder/core!formatQuery formatQuery} with the \"mongodb_query\" format.\n */\nexport const getDatetimeRuleProcessorMongoDBQuery =\n (apiFns: RQBDateTimeLibraryAPI): RuleProcessor =>\n (rule, options) => {\n const opts = options ?? /* istanbul ignore next */ {};\n const { field, operator, value, valueSource } = rule;\n\n if (valueSource === 'field' || !processIsDateField(opts.context?.isDateField, rule, opts)) {\n return defaultRuleProcessorMongoDBQuery(rule, opts);\n }\n\n if (operator === '=') {\n return { [field]: apiFns.toDate(value) };\n }\n\n switch (operator) {\n case '<':\n case '<=':\n case '!=':\n case '>':\n case '>=':\n return { [field]: { [mongoOperators[operator]]: apiFns.toDate(value) } };\n }\n\n const valueAsArray: string[] = toArray(rule.value, { retainEmptyStrings: false });\n const valueAsDateArray = valueAsArray\n .map(v => apiFns.toDate(v))\n .filter(dateVal => apiFns.isValid(dateVal));\n\n switch (operator) {\n case 'in':\n case 'notIn':\n return { [field]: { [mongoOperators[operator]]: valueAsDateArray } };\n\n case 'between':\n case 'notBetween': {\n if (valueAsDateArray.length < 2) return '';\n const [first, second] = valueAsDateArray;\n const orderedArray = apiFns.isBefore(first, second) ? [first, second] : [second, first];\n return operator === 'between'\n ? { [field]: { $gte: orderedArray[0], $lte: orderedArray[1] } }\n : {\n $or: [{ [field]: { $lt: orderedArray[0] } }, { [field]: { $gt: orderedArray[1] } }],\n };\n }\n }\n\n return defaultRuleProcessorMongoDBQuery(rule, opts);\n };\n","import type { ExportOperatorMap, RuleProcessor, ValueProcessorByRule } from 'react-querybuilder';\nimport {\n defaultOperatorProcessorNL,\n defaultRuleProcessorNL,\n getQuotedFieldName,\n lc,\n normalizeConstituentWordOrder,\n toArray,\n} from 'react-querybuilder';\nimport type { RQBDateTimeLibraryAPI } from './types';\nimport { isISOStringDateOnly, processIsDateField } from './utils';\n\nexport const defaultDateTimeNLOperatorMap: ExportOperatorMap = {\n // '=': 'is',\n // '!=': 'is not',\n '<': 'is before',\n '>': 'is after',\n '<=': 'is on or before',\n '>=': 'is on or after',\n in: ['is one of the dates', 'is the same as a date in'],\n notin: ['is not one of the dates', 'is not the same as any date in'],\n between: ['is between', 'is between the dates in'],\n notbetween: ['is not between', 'is not between the dates in'],\n};\n\n/**\n * Generates a value processor with date/time features for use by\n * {@link @react-querybuilder/core!formatQuery formatQuery} with the \"natural_language\" format.\n */\nexport const datetimeValueProcessorNL: ValueProcessorByRule = (rule, opts) => {\n if (isISOStringDateOnly(opts?.context?.originalValue)) {\n return new Intl.DateTimeFormat(opts?.context?.locales, {\n dateStyle: 'full',\n ...opts?.context?.dateFormat,\n }).format(rule.value);\n }\n return new Intl.DateTimeFormat(opts?.context?.locales, {\n dateStyle: 'full',\n timeStyle: 'long',\n ...opts?.context?.dateTimeFormat,\n }).format(rule.value);\n};\n\n/**\n * Generates a rule processor with date/time features for use by {@link @react-querybuilder/core!formatQuery formatQuery} with\n * the \"natural_language\" format.\n */\nexport const getDatetimeRuleProcessorNL =\n (apiFns: RQBDateTimeLibraryAPI): RuleProcessor =>\n (rule, options) => {\n const opts = options ?? /* istanbul ignore next */ {};\n const operatorLowerCase = lc(rule.operator);\n let finalValue = '';\n\n // istanbul ignore next\n const {\n fieldData,\n quoteFieldNamesWith = ['', ''] as [string, string],\n fieldIdentifierSeparator = '',\n operatorProcessor = defaultOperatorProcessorNL,\n // valueProcessor = datetimeValueProcessorNL,\n wordOrder = 'SVO',\n context = {},\n operatorMap = defaultDateTimeNLOperatorMap,\n } = opts;\n\n if (!processIsDateField(context.isDateField, rule, opts)) {\n return defaultRuleProcessorNL(rule, opts);\n }\n\n if (rule.valueSource === 'field') {\n return defaultRuleProcessorNL(rule, { ...opts, operatorMap: defaultDateTimeNLOperatorMap });\n }\n\n if (\n (operatorLowerCase === 'in' ||\n operatorLowerCase === 'notin' ||\n operatorLowerCase === 'between' ||\n operatorLowerCase === 'notbetween') &&\n !rule.value\n ) {\n return '';\n }\n\n const valueAsArray: string[] = toArray(rule.value, { retainEmptyStrings: false });\n const valueAsDateArray = valueAsArray\n .map((v): [string, Date] => [v, apiFns.toDate(v)])\n .filter(v => apiFns.isValid(v[1]));\n\n switch (operatorLowerCase) {\n case 'in':\n case 'notin':\n {\n if (valueAsDateArray.length === 0) return '';\n finalValue = `(${valueAsDateArray\n .map(value =>\n datetimeValueProcessorNL(\n { field: rule.field, operator: '=', value: value[1] },\n { ...opts, context: { ...context, originalValue: value[0] } }\n )\n )\n .join(', ')})`;\n }\n break;\n\n case 'between':\n case 'notbetween':\n {\n if (valueAsDateArray.length < 2) return '';\n const [first, second] = valueAsDateArray;\n const orderedArray = apiFns.isBefore(first[1], second[1])\n ? [first, second]\n : [second, first];\n finalValue = orderedArray\n .map(([originalValue, value]) =>\n datetimeValueProcessorNL(\n { field: rule.field, operator: '=', value },\n { ...opts, context: { ...context, originalValue } }\n )\n )\n .join(` ${opts.translations?.and ?? 'and'} `);\n }\n break;\n\n default: {\n const [originalValue, value] = valueAsDateArray[0] ?? ['', ''];\n finalValue = originalValue\n ? datetimeValueProcessorNL(\n { field: rule.field, operator: '=', value },\n { ...opts, context: { ...context, originalValue } }\n )\n : '';\n }\n }\n\n const processedField = getQuotedFieldName(fieldData?.label ?? rule.field, {\n quoteFieldNamesWith,\n fieldIdentifierSeparator,\n });\n\n const processedOperator = operatorProcessor(rule, {\n ...opts,\n operatorMap: { ...defaultDateTimeNLOperatorMap, ...operatorMap },\n });\n\n const wordOrderMap = {\n S: processedField,\n V: processedOperator,\n O: finalValue,\n };\n\n return normalizeConstituentWordOrder(wordOrder)\n .map(term => `${wordOrderMap[term]}`)\n .join(' ')\n .trim();\n };\n","import type { RuleProcessor, SQLPreset, ValueProcessorByRule } from 'react-querybuilder';\nimport {\n defaultRuleProcessorSQL,\n defaultValueProcessorByRule,\n getQuotedFieldName,\n lc,\n mapSQLOperator,\n toArray,\n} from 'react-querybuilder';\nimport type { RQBDateTimeLibraryAPI } from './types';\nimport { isISOStringDateOnly, processIsDateField } from './utils';\n\n/**\n * Generates a value processor with date/time features for use by\n * {@link @react-querybuilder/core!formatQuery formatQuery} with the \"sql\" format and \"ansi\" preset.\n */\nexport const getDatetimeValueProcessorANSI =\n ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI): ValueProcessorByRule =>\n (rule, opts) => {\n if (isISOStringDateOnly(opts?.context?.originalValue)) {\n return defaultValueProcessorByRule({ ...rule, value: toISOStringDateOnly(rule.value) }, opts);\n }\n return defaultValueProcessorByRule({ ...rule, value: toISOString(rule.value as Date) }, opts);\n };\n\n/**\n * Generates a value processor with date/time features for use by {@link @react-querybuilder/core!formatQuery formatQuery} with\n * the \"sql\" format and \"mssql\" preset.\n */\nexport const getDatetimeValueProcessorMSSQL =\n ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI): ValueProcessorByRule =>\n (rule, opts) => {\n const datatype = /^(?:small)?datetime/i.test(opts?.fieldData?.datatype as string)\n ? 'datetimeoffset'\n : 'date';\n const value =\n datatype === 'datetimeoffset' ? toISOString(rule.value) : toISOStringDateOnly(rule.value);\n return defaultValueProcessorByRule(\n { ...rule, value },\n { ...opts, wrapValueWith: [`cast(`, ` as ${datatype})`] }\n );\n };\n\n/**\n * Generates a value processor with date/time features for use by {@link @react-querybuilder/core!formatQuery formatQuery} with\n * the \"sql\" format and \"mysql\" preset.\n */\nexport const getDatetimeValueProcessorMySQL =\n ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI): ValueProcessorByRule =>\n (rule, opts) => {\n const datatype = /^(?:datetime|timestamp)/i.test(opts?.fieldData?.datatype as string)\n ? 'datetime'\n : 'date';\n const value =\n datatype === 'datetime' ? toISOString(rule.value) : toISOStringDateOnly(rule.value);\n return defaultValueProcessorByRule(\n { ...rule, value },\n { ...opts, wrapValueWith: [`cast(`, ` as ${datatype})`] }\n );\n };\n\n/**\n * Generates a value processor with date/time features for use by {@link @react-querybuilder/core!formatQuery formatQuery} with\n * the \"sql\" format and \"oracle\" preset.\n */\nexport const getDatetimeValueProcessorOracle =\n ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI): ValueProcessorByRule =>\n (rule, opts) => {\n // Oracle date format for _reading_ ISO 8601: 'YYYY-MM-DD\"T\"HH24:MI:SS.ff3\"Z\"'\n const datatype = /^timestamp/i.test(opts?.fieldData?.datatype as string) ? 'timestamp' : 'date';\n const value =\n datatype === 'timestamp'\n ? toISOString(rule.value).replaceAll('T', ' ').replace('Z', ' UTC')\n : toISOStringDateOnly(rule.value);\n return defaultValueProcessorByRule(\n { ...rule, value },\n { ...opts, wrapValueWith: [datatype, ``] }\n );\n };\n\n/**\n * Generates a value processor with date/time features for use by {@link @react-querybuilder/core!formatQuery formatQuery} with\n * the \"sql\" format and \"postgresql\" preset.\n */\nexport const getDatetimeValueProcessorPostgreSQL =\n ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI): ValueProcessorByRule =>\n (rule, opts) => {\n const datatype = /^timestamp/i.test(opts?.fieldData?.datatype as string) ? 'timestamp' : 'date';\n const value =\n datatype === 'timestamp' ? toISOString(rule.value) : toISOStringDateOnly(rule.value);\n return defaultValueProcessorByRule(\n { ...rule, value },\n { ...opts, wrapValueWith: [datatype, ``] }\n );\n };\n\nconst presetToValueProcessorMap = {\n ansi: getDatetimeValueProcessorANSI,\n mssql: getDatetimeValueProcessorMSSQL,\n mysql: getDatetimeValueProcessorMySQL,\n oracle: getDatetimeValueProcessorOracle,\n postgresql: getDatetimeValueProcessorPostgreSQL,\n sqlite: getDatetimeValueProcessorANSI,\n} satisfies Record<SQLPreset, (apiFns: RQBDateTimeLibraryAPI) => ValueProcessorByRule>;\n\n/**\n * Generates a rule processor with date/time features for use by {@link @react-querybuilder/core!formatQuery formatQuery} with\n * the \"sql\" format.\n */\nexport const getDatetimeRuleProcessorSQL =\n (apiFns: RQBDateTimeLibraryAPI): RuleProcessor =>\n (rule, options) => {\n const opts = options ?? /* istanbul ignore next */ {};\n const operator = mapSQLOperator(rule.operator);\n const operatorLowerCase = lc(operator);\n // istanbul ignore next\n const {\n quoteFieldNamesWith = ['', ''] as [string, string],\n fieldIdentifierSeparator = '',\n context = {},\n } = opts;\n let finalValue = '';\n\n if (rule.valueSource === 'field' || !processIsDateField(context.isDateField, rule, opts)) {\n return defaultRuleProcessorSQL(rule, opts);\n }\n\n const valueProcessor = presetToValueProcessorMap[opts.preset!](apiFns);\n\n const valueAsArray: string[] = toArray(rule.value, { retainEmptyStrings: false });\n const valueAsDateArray = valueAsArray\n .map((v): [string, Date] => [v, apiFns.toDate(v)])\n .filter(v => apiFns.isValid(v[1]));\n\n switch (operatorLowerCase) {\n case 'in':\n case 'not in':\n {\n if (valueAsDateArray.length === 0) return '';\n finalValue = `(${valueAsDateArray\n .map(value =>\n valueProcessor(\n { field: rule.field, operator: '=', value: value[1] },\n { ...opts, context: { originalValue: value[0] } }\n )\n )\n .join(', ')})`;\n }\n break;\n\n case 'between':\n case 'not between':\n {\n if (valueAsDateArray.length < 2) return '';\n const [first, second] = valueAsDateArray;\n const orderedArray = apiFns.isBefore(first[1], second[1])\n ? [first, second]\n : [second, first];\n finalValue = orderedArray\n .map(([originalValue, value]) =>\n valueProcessor(\n { field: rule.field, operator: '=', value },\n { ...opts, context: { originalValue } }\n )\n )\n .join(' and ');\n }\n break;\n\n default: {\n const [originalValue, value] = valueAsDateArray[0] ?? ['', ''];\n finalValue = valueProcessor(\n { field: rule.field, operator: '=', value },\n { ...opts, context: { originalValue } }\n );\n }\n }\n\n return `${getQuotedFieldName(rule.field, { quoteFieldNamesWith, fieldIdentifierSeparator })} ${operator} ${finalValue}`.trim();\n };\n"],"mappings":";;;AAGA,MAAa,uBACX,SAEA,OAAO,SAAS,YAAY,sBAAsB,KAAK,KAAK;AAE9D,MAAaA,sBACX,GAAG,CAAC,MAAM,UAEV,KAAK,aAAa,cAClB,KAAK,aAAa,gBACl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K,MAAsB,CAAC,GAAG,OAAO,OAAO,EAAE,CAAC,CAAC,CACjD,QAAO,MAAK,OAAO,QAAQ,EAAE,GAAG,CAAC;AAEpC,SAAQ,mBAAR;EACE,KAAK;EACL,KAAK;AAED,OAAI,iBAAiB,WAAW,EAAG,QAAO;AAC1C,gBAAa,IAAI,iBACd,KAAI,UACH,eACE;IAAE,OAAO,KAAK;IAAO,UAAU;IAAK,OAAO,MAAM;IAAI,EACrD;IAAE,GAAG;IAAM,SAAS,EAAE,eAAe,MAAM,IAAI;IAAE,CAClD,CACF,CACA,KAAK,KAAK,CAAC;AAEhB;EAEF,KAAK;EACL,KAAK;GACH;AACE,QAAI,iBAAiB,SAAS,EAAG,QAAO;IACxC,MAAM,CAAC,OAAO,UAAU;AAIxB,kBAHqB,OAAO,SAAS,MAAM,IAAI,OAAO,GAAG,GACrD,CAAC,OAAO,OAAO,GACf,CAAC,QAAQ,MAAM,EAEhB,KAAK,CAAC,eAAe,WACpB,eACE;KAAE,OAAO,KAAK;KAAO,UAAU;KAAK;KAAO,EAC3C;KAAE,GAAG;KAAM,SAAS,EAAE,eAAe;KAAE,CACxC,CACF,CACA,KAAK,QAAQ;;AAElB;EAEF,SAAS;GACP,MAAM,CAAC,eAAe,SAAS,iBAAiB,MAAM,CAAC,IAAI,GAAG;AAC9D,gBAAa,eACX;IAAE,OAAO,KAAK;IAAO,UAAU;IAAK;IAAO,EAC3C;IAAE,GAAG;IAAM,SAAS,EAAE,eAAe;IAAE,CACxC;;;AAIL,QAAO,GAAG,mBAAmB,KAAK,OAAO;EAAE;EAAqB;EAA0B,CAAC,CAAC,GAAG,SAAS,GAAG,aAAa,MAAM"}
1
+ {"version":3,"file":"getDatetimeRuleProcessorSQL-CugqyF_a.mjs","names":["defaultIsDateField: IsDateFieldFunction","defaultDateTimeNLOperatorMap: ExportOperatorMap","datetimeValueProcessorNL: ValueProcessorByRule"],"sources":["../src/utils.ts","../src/getDatetimeJsonLogicOperations.ts","../src/getDatetimeRuleProcessorCEL.ts","../src/getDatetimeRuleProcessorMongoDBQuery.ts","../src/getDatetimeRuleProcessorNL.ts","../src/getDatetimeRuleProcessorSQL.ts"],"sourcesContent":["import type { RuleProcessor } from 'react-querybuilder';\nimport type { IsDateField, IsDateFieldFunction } from './types';\n\nexport const isISOStringDateOnly = (\n date: unknown\n): date is `${number}${number}${number}${number}-${number}${number}-${number}${number}` =>\n typeof date === 'string' && /^\\d{4}-\\d{2}-\\d{2}$/.test(date);\n\nexport const defaultIsDateField: IsDateFieldFunction = (\n ...[rule, opts]: Parameters<RuleProcessor>\n): boolean =>\n rule.operator !== 'contains' &&\n rule.operator !== 'beginsWith' &&\n rule.operator !== 'endsWith' &&\n rule.operator !== 'doesNotContain' &&\n rule.operator !== 'doesNotBeginWith' &&\n rule.operator !== 'doesNotEndWith' &&\n rule.operator !== 'null' &&\n rule.operator !== 'notNull' &&\n /^(?:date|datetime|datetimeoffset|timestamp)\\b/i.test(opts?.fieldData?.datatype as string);\n\nexport const processIsDateField = (\n isDateField: IsDateField,\n ...[rule, opts]: Parameters<RuleProcessor>\n): boolean => {\n if (typeof isDateField === 'boolean') {\n return isDateField;\n }\n\n if (typeof isDateField === 'function') {\n return isDateField(rule, opts);\n }\n\n if (Array.isArray(isDateField)) {\n return isDateField.some(condition =>\n Object.entries(condition).every(([key, value]) => opts?.fieldData?.[key] === value)\n );\n }\n\n if (typeof isDateField === 'object') {\n return Object.entries(isDateField).every(([key, value]) => opts?.fieldData?.[key] === value);\n }\n\n return defaultIsDateField(rule, opts);\n};\n","import type { RQBDateTimeLibraryAPI, RQBJsonLogicDateTimeOperations } from './types';\n\n/**\n * Custom operations for use with JsonLogic objects generated by\n * {@link datetimeRuleProcessorJsonLogic}.\n */\nexport const getDatetimeJsonLogicOperations = ({\n isAfter,\n isBefore,\n isSame,\n}: RQBDateTimeLibraryAPI): RQBJsonLogicDateTimeOperations => ({\n dateAfter: (a, b) => isAfter(a, b),\n dateBefore: (a, b) => isBefore(a, b),\n dateBetween: (a, b, c) =>\n isSame(b, a) ||\n isSame(b, c) ||\n (isAfter(b, a) && isBefore(b, c)) ||\n (isAfter(b, c) && isBefore(b, a)),\n dateNotBetween: (a, b, c) =>\n !isSame(b, a) &&\n !isSame(b, c) &&\n ((isBefore(a, c) && (isBefore(b, a) || isAfter(b, c))) ||\n (isAfter(a, c) && (isBefore(b, c) || isAfter(b, a)))),\n dateIn: (a, b) => b.some(v => isSame(a, v)),\n dateNotIn: (a, b) => b.every(v => !isSame(a, v)),\n dateNotOn: (a, b) => !isSame(a, b),\n dateOn: (a, b) => isSame(a, b),\n dateOnOrAfter: (a, b) => isAfter(a, b) || isSame(a, b),\n dateOnOrBefore: (a, b) => isBefore(a, b) || isSame(a, b),\n});\n","import type { RuleProcessor } from 'react-querybuilder';\nimport { defaultRuleProcessorCEL, lc, toArray } from 'react-querybuilder';\nimport type { RQBDateTimeLibraryAPI } from './types';\nimport { processIsDateField } from './utils';\n\nconst shouldNegate = (op: string) => /^(does)?not/i.test(op);\n\n/**\n * Generates a rule processor with date/time features for use by\n * {@link @react-querybuilder/core!formatQuery formatQuery} with the \"cel\" format.\n */\nexport const getDatetimeRuleProcessorCEL =\n (apiFns: RQBDateTimeLibraryAPI): RuleProcessor =>\n (rule, options) => {\n const opts = options ?? /* istanbul ignore next */ {};\n const { context = {} } = opts;\n\n if (rule.valueSource === 'field' || !processIsDateField(context.isDateField, rule, opts)) {\n return defaultRuleProcessorCEL(rule, opts);\n }\n\n const ts = (d: string | Date) => `timestamp(\"${apiFns.toISOString(d)}\")`;\n\n const operatorTL = lc(rule.operator.replace(/^=$/, '=='));\n\n switch (operatorTL) {\n case '<':\n case '<=':\n case '==':\n case '!=':\n case '>':\n case '>=':\n return `${rule.field} ${operatorTL} ${ts(rule.value)}`;\n }\n\n const valueAsArray: string[] = toArray(rule.value, { retainEmptyStrings: false });\n const valueAsDateArray = valueAsArray\n .map(v => apiFns.toDate(v))\n .filter(dateVal => apiFns.isValid(dateVal));\n\n switch (operatorTL) {\n case 'in':\n case 'notin': {\n if (valueAsDateArray.length === 0) return '';\n const [prefix, suffix] = shouldNegate(operatorTL) ? ['!(', ')'] : ['', ''];\n return `${prefix}${rule.field} in [${valueAsDateArray\n .map(val => ts(val))\n .join(', ')}]${suffix}`;\n }\n\n case 'between':\n case 'notbetween': {\n if (valueAsDateArray.length < 2) return '';\n const [first, second] = valueAsDateArray;\n const [firstDate, secondDate] = apiFns.isBefore(first, second)\n ? [first, second]\n : [second, first];\n return operatorTL === 'between'\n ? `(${rule.field} >= ${ts(firstDate)} && ${rule.field} <= ${ts(secondDate)})`\n : `(${rule.field} < ${ts(firstDate)} || ${rule.field} > ${ts(secondDate)})`;\n }\n }\n\n return defaultRuleProcessorCEL(rule, opts);\n };\n","import type { RuleProcessor } from 'react-querybuilder';\nimport { defaultRuleProcessorMongoDBQuery, mongoOperators, toArray } from 'react-querybuilder';\nimport type { RQBDateTimeLibraryAPI } from './types';\nimport { processIsDateField } from './utils';\n\n/**\n * Generates a rule processor with date/time features for use by\n * {@link @react-querybuilder/core!formatQuery formatQuery} with the \"mongodb_query\" format.\n */\nexport const getDatetimeRuleProcessorMongoDBQuery =\n (apiFns: RQBDateTimeLibraryAPI): RuleProcessor =>\n (rule, options) => {\n const opts = options ?? /* istanbul ignore next */ {};\n const { field, operator, value, valueSource } = rule;\n\n if (valueSource === 'field' || !processIsDateField(opts.context?.isDateField, rule, opts)) {\n return defaultRuleProcessorMongoDBQuery(rule, opts);\n }\n\n if (operator === '=') {\n return { [field]: apiFns.toDate(value) };\n }\n\n switch (operator) {\n case '<':\n case '<=':\n case '!=':\n case '>':\n case '>=':\n return { [field]: { [mongoOperators[operator]]: apiFns.toDate(value) } };\n }\n\n const valueAsArray: string[] = toArray(rule.value, { retainEmptyStrings: false });\n const valueAsDateArray = valueAsArray\n .map(v => apiFns.toDate(v))\n .filter(dateVal => apiFns.isValid(dateVal));\n\n switch (operator) {\n case 'in':\n case 'notIn':\n return { [field]: { [mongoOperators[operator]]: valueAsDateArray } };\n\n case 'between':\n case 'notBetween': {\n if (valueAsDateArray.length < 2) return '';\n const [first, second] = valueAsDateArray;\n const orderedArray = apiFns.isBefore(first, second) ? [first, second] : [second, first];\n return operator === 'between'\n ? { [field]: { $gte: orderedArray[0], $lte: orderedArray[1] } }\n : {\n $or: [{ [field]: { $lt: orderedArray[0] } }, { [field]: { $gt: orderedArray[1] } }],\n };\n }\n }\n\n return defaultRuleProcessorMongoDBQuery(rule, opts);\n };\n","import type { ExportOperatorMap, RuleProcessor, ValueProcessorByRule } from 'react-querybuilder';\nimport {\n defaultOperatorProcessorNL,\n defaultRuleProcessorNL,\n getQuotedFieldName,\n lc,\n normalizeConstituentWordOrder,\n toArray,\n} from 'react-querybuilder';\nimport type { RQBDateTimeLibraryAPI } from './types';\nimport { isISOStringDateOnly, processIsDateField } from './utils';\n\nexport const defaultDateTimeNLOperatorMap: ExportOperatorMap = {\n // '=': 'is',\n // '!=': 'is not',\n '<': 'is before',\n '>': 'is after',\n '<=': 'is on or before',\n '>=': 'is on or after',\n in: ['is one of the dates', 'is the same as a date in'],\n notin: ['is not one of the dates', 'is not the same as any date in'],\n between: ['is between', 'is between the dates in'],\n notbetween: ['is not between', 'is not between the dates in'],\n};\n\n/**\n * Generates a value processor with date/time features for use by\n * {@link @react-querybuilder/core!formatQuery formatQuery} with the \"natural_language\" format.\n */\nexport const datetimeValueProcessorNL: ValueProcessorByRule = (rule, opts) => {\n if (isISOStringDateOnly(opts?.context?.originalValue)) {\n return new Intl.DateTimeFormat(opts?.context?.locales, {\n dateStyle: 'full',\n ...opts?.context?.dateFormat,\n }).format(rule.value);\n }\n return new Intl.DateTimeFormat(opts?.context?.locales, {\n dateStyle: 'full',\n timeStyle: 'long',\n ...opts?.context?.dateTimeFormat,\n }).format(rule.value);\n};\n\n/**\n * Generates a rule processor with date/time features for use by {@link @react-querybuilder/core!formatQuery formatQuery} with\n * the \"natural_language\" format.\n */\nexport const getDatetimeRuleProcessorNL =\n (apiFns: RQBDateTimeLibraryAPI): RuleProcessor =>\n (rule, options) => {\n const opts = options ?? /* istanbul ignore next */ {};\n const operatorLowerCase = lc(rule.operator);\n let finalValue = '';\n\n // istanbul ignore next\n const {\n fieldData,\n quoteFieldNamesWith = ['', ''] as [string, string],\n fieldIdentifierSeparator = '',\n operatorProcessor = defaultOperatorProcessorNL,\n // valueProcessor = datetimeValueProcessorNL,\n wordOrder = 'SVO',\n context = {},\n operatorMap = defaultDateTimeNLOperatorMap,\n } = opts;\n\n if (!processIsDateField(context.isDateField, rule, opts)) {\n return defaultRuleProcessorNL(rule, opts);\n }\n\n if (rule.valueSource === 'field') {\n return defaultRuleProcessorNL(rule, { ...opts, operatorMap: defaultDateTimeNLOperatorMap });\n }\n\n if (\n (operatorLowerCase === 'in' ||\n operatorLowerCase === 'notin' ||\n operatorLowerCase === 'between' ||\n operatorLowerCase === 'notbetween') &&\n !rule.value\n ) {\n return '';\n }\n\n const valueAsArray: string[] = toArray(rule.value, { retainEmptyStrings: false });\n const valueAsDateArray = valueAsArray\n .map((v): [string, Date] => [v, apiFns.toDate(v)])\n .filter(v => apiFns.isValid(v[1]));\n\n switch (operatorLowerCase) {\n case 'in':\n case 'notin':\n {\n if (valueAsDateArray.length === 0) return '';\n finalValue = `(${valueAsDateArray\n .map(value =>\n datetimeValueProcessorNL(\n { field: rule.field, operator: '=', value: value[1] },\n { ...opts, context: { ...context, originalValue: value[0] } }\n )\n )\n .join(', ')})`;\n }\n break;\n\n case 'between':\n case 'notbetween':\n {\n if (valueAsDateArray.length < 2) return '';\n const [first, second] = valueAsDateArray;\n const orderedArray = apiFns.isBefore(first[1], second[1])\n ? [first, second]\n : [second, first];\n finalValue = orderedArray\n .map(([originalValue, value]) =>\n datetimeValueProcessorNL(\n { field: rule.field, operator: '=', value },\n { ...opts, context: { ...context, originalValue } }\n )\n )\n .join(` ${opts.translations?.and ?? 'and'} `);\n }\n break;\n\n default: {\n const [originalValue, value] = valueAsDateArray[0] ?? ['', ''];\n finalValue = originalValue\n ? datetimeValueProcessorNL(\n { field: rule.field, operator: '=', value },\n { ...opts, context: { ...context, originalValue } }\n )\n : '';\n }\n }\n\n const processedField = getQuotedFieldName(fieldData?.label ?? rule.field, {\n quoteFieldNamesWith,\n fieldIdentifierSeparator,\n });\n\n const processedOperator = operatorProcessor(rule, {\n ...opts,\n operatorMap: { ...defaultDateTimeNLOperatorMap, ...operatorMap },\n });\n\n const wordOrderMap = {\n S: processedField,\n V: processedOperator,\n O: finalValue,\n };\n\n return normalizeConstituentWordOrder(wordOrder)\n .map(term => `${wordOrderMap[term]}`)\n .join(' ')\n .trim();\n };\n","import type { RuleProcessor, SQLPreset, ValueProcessorByRule } from 'react-querybuilder';\nimport {\n defaultRuleProcessorSQL,\n defaultValueProcessorByRule,\n getQuotedFieldName,\n lc,\n mapSQLOperator,\n toArray,\n} from 'react-querybuilder';\nimport type { RQBDateTimeLibraryAPI } from './types';\nimport { isISOStringDateOnly, processIsDateField } from './utils';\n\n/**\n * Generates a value processor with date/time features for use by\n * {@link @react-querybuilder/core!formatQuery formatQuery} with the \"sql\" format and \"ansi\" preset.\n */\nexport const getDatetimeValueProcessorANSI =\n ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI): ValueProcessorByRule =>\n (rule, opts) => {\n if (isISOStringDateOnly(opts?.context?.originalValue)) {\n return defaultValueProcessorByRule({ ...rule, value: toISOStringDateOnly(rule.value) }, opts);\n }\n return defaultValueProcessorByRule({ ...rule, value: toISOString(rule.value as Date) }, opts);\n };\n\n/**\n * Generates a value processor with date/time features for use by {@link @react-querybuilder/core!formatQuery formatQuery} with\n * the \"sql\" format and \"mssql\" preset.\n */\nexport const getDatetimeValueProcessorMSSQL =\n ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI): ValueProcessorByRule =>\n (rule, opts) => {\n const datatype = /^(?:small)?datetime/i.test(opts?.fieldData?.datatype as string)\n ? 'datetimeoffset'\n : 'date';\n const value =\n datatype === 'datetimeoffset' ? toISOString(rule.value) : toISOStringDateOnly(rule.value);\n return defaultValueProcessorByRule(\n { ...rule, value },\n { ...opts, wrapValueWith: [`cast(`, ` as ${datatype})`] }\n );\n };\n\n/**\n * Generates a value processor with date/time features for use by {@link @react-querybuilder/core!formatQuery formatQuery} with\n * the \"sql\" format and \"mysql\" preset.\n */\nexport const getDatetimeValueProcessorMySQL =\n ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI): ValueProcessorByRule =>\n (rule, opts) => {\n const datatype = /^(?:datetime|timestamp)/i.test(opts?.fieldData?.datatype as string)\n ? 'datetime'\n : 'date';\n const value =\n datatype === 'datetime' ? toISOString(rule.value) : toISOStringDateOnly(rule.value);\n return defaultValueProcessorByRule(\n { ...rule, value },\n { ...opts, wrapValueWith: [`cast(`, ` as ${datatype})`] }\n );\n };\n\n/**\n * Generates a value processor with date/time features for use by {@link @react-querybuilder/core!formatQuery formatQuery} with\n * the \"sql\" format and \"oracle\" preset.\n */\nexport const getDatetimeValueProcessorOracle =\n ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI): ValueProcessorByRule =>\n (rule, opts) => {\n // Oracle date format for _reading_ ISO 8601: 'YYYY-MM-DD\"T\"HH24:MI:SS.ff3\"Z\"'\n const datatype = /^timestamp/i.test(opts?.fieldData?.datatype as string) ? 'timestamp' : 'date';\n const value =\n datatype === 'timestamp'\n ? toISOString(rule.value).replaceAll('T', ' ').replace('Z', ' UTC')\n : toISOStringDateOnly(rule.value);\n return defaultValueProcessorByRule(\n { ...rule, value },\n { ...opts, wrapValueWith: [datatype, ``] }\n );\n };\n\n/**\n * Generates a value processor with date/time features for use by {@link @react-querybuilder/core!formatQuery formatQuery} with\n * the \"sql\" format and \"postgresql\" preset.\n */\nexport const getDatetimeValueProcessorPostgreSQL =\n ({ toISOStringDateOnly, toISOString }: RQBDateTimeLibraryAPI): ValueProcessorByRule =>\n (rule, opts) => {\n const datatype = /^timestamp/i.test(opts?.fieldData?.datatype as string) ? 'timestamp' : 'date';\n const value =\n datatype === 'timestamp' ? toISOString(rule.value) : toISOStringDateOnly(rule.value);\n return defaultValueProcessorByRule(\n { ...rule, value },\n { ...opts, wrapValueWith: [datatype, ``] }\n );\n };\n\nconst presetToValueProcessorMap = {\n ansi: getDatetimeValueProcessorANSI,\n mssql: getDatetimeValueProcessorMSSQL,\n mysql: getDatetimeValueProcessorMySQL,\n oracle: getDatetimeValueProcessorOracle,\n postgresql: getDatetimeValueProcessorPostgreSQL,\n sqlite: getDatetimeValueProcessorANSI,\n} satisfies Record<SQLPreset, (apiFns: RQBDateTimeLibraryAPI) => ValueProcessorByRule>;\n\n/**\n * Generates a rule processor with date/time features for use by {@link @react-querybuilder/core!formatQuery formatQuery} with\n * the \"sql\" format.\n */\nexport const getDatetimeRuleProcessorSQL =\n (apiFns: RQBDateTimeLibraryAPI): RuleProcessor =>\n (rule, options) => {\n const opts = options ?? /* istanbul ignore next */ {};\n const operator = mapSQLOperator(rule.operator);\n const operatorLowerCase = lc(operator);\n // istanbul ignore next\n const {\n quoteFieldNamesWith = ['', ''] as [string, string],\n fieldIdentifierSeparator = '',\n context = {},\n } = opts;\n let finalValue = '';\n\n if (rule.valueSource === 'field' || !processIsDateField(context.isDateField, rule, opts)) {\n return defaultRuleProcessorSQL(rule, opts);\n }\n\n const valueProcessor = presetToValueProcessorMap[opts.preset!](apiFns);\n\n const valueAsArray: string[] = toArray(rule.value, { retainEmptyStrings: false });\n const valueAsDateArray = valueAsArray\n .map((v): [string, Date] => [v, apiFns.toDate(v)])\n .filter(v => apiFns.isValid(v[1]));\n\n switch (operatorLowerCase) {\n case 'in':\n case 'not in':\n {\n if (valueAsDateArray.length === 0) return '';\n finalValue = `(${valueAsDateArray\n .map(value =>\n valueProcessor(\n { field: rule.field, operator: '=', value: value[1] },\n { ...opts, context: { originalValue: value[0] } }\n )\n )\n .join(', ')})`;\n }\n break;\n\n case 'between':\n case 'not between':\n {\n if (valueAsDateArray.length < 2) return '';\n const [first, second] = valueAsDateArray;\n const orderedArray = apiFns.isBefore(first[1], second[1])\n ? [first, second]\n : [second, first];\n finalValue = orderedArray\n .map(([originalValue, value]) =>\n valueProcessor(\n { field: rule.field, operator: '=', value },\n { ...opts, context: { originalValue } }\n )\n )\n .join(' and ');\n }\n break;\n\n default: {\n const [originalValue, value] = valueAsDateArray[0] ?? ['', ''];\n finalValue = valueProcessor(\n { field: rule.field, operator: '=', value },\n { ...opts, context: { originalValue } }\n );\n }\n }\n\n return `${getQuotedFieldName(rule.field, { quoteFieldNamesWith, fieldIdentifierSeparator })} ${operator} ${finalValue}`.trim();\n };\n"],"mappings":";;;AAGA,MAAa,uBACX,SAEA,OAAO,SAAS,YAAY,sBAAsB,KAAK,KAAK;AAE9D,MAAaA,sBACX,GAAG,CAAC,MAAM,UAEV,KAAK,aAAa,cAClB,KAAK,aAAa,gBAClB,KAAK,aAAa,cAClB,KAAK,aAAa,oBAClB,KAAK,aAAa,sBAClB,KAAK,aAAa,oBAClB,KAAK,aAAa,UAClB,KAAK,aAAa,aAClB,iDAAiD,KAAK,MAAM,WAAW,SAAmB;AAE5F,MAAa,sBACX,aACA,GAAG,CAAC,MAAM,UACE;AACZ,KAAI,OAAO,gBAAgB,UACzB,QAAO;AAGT,KAAI,OAAO,gBAAgB,WACzB,QAAO,YAAY,MAAM,KAAK;AAGhC,KAAI,MAAM,QAAQ,YAAY,CAC5B,QAAO,YAAY,MAAK,cACtB,OAAO,QAAQ,UAAU,CAAC,OAAO,CAAC,KAAK,WAAW,MAAM,YAAY,SAAS,MAAM,CACpF;AAGH,KAAI,OAAO,gBAAgB,SACzB,QAAO,OAAO,QAAQ,YAAY,CAAC,OAAO,CAAC,KAAK,WAAW,MAAM,YAAY,SAAS,MAAM;AAG9F,QAAO,mBAAmB,MAAM,KAAK;;;;;;;;;ACrCvC,MAAa,kCAAkC,EAC7C,SACA,UACA,cAC4D;CAC5D,YAAY,GAAG,MAAM,QAAQ,GAAG,EAAE;CAClC,aAAa,GAAG,M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E,CACxC,CACF,CACA,KAAK,QAAQ;;AAElB;EAEF,SAAS;GACP,MAAM,CAAC,eAAe,SAAS,iBAAiB,MAAM,CAAC,IAAI,GAAG;AAC9D,gBAAa,eACX;IAAE,OAAO,KAAK;IAAO,UAAU;IAAK;IAAO,EAC3C;IAAE,GAAG;IAAM,SAAS,EAAE,eAAe;IAAE,CACxC;;;AAIL,QAAO,GAAG,mBAAmB,KAAK,OAAO;EAAE;EAAqB;EAA0B,CAAC,CAAC,GAAG,SAAS,GAAG,aAAa,MAAM"}
@@ -117,7 +117,7 @@ const getDatetimeRuleProcessorMongoDBQuery = (apiFns) => (rule, options) => {
117
117
  };
118
118
 
119
119
  //#endregion
120
- //#region \0@oxc-project+runtime@0.96.0/helpers/typeof.js
120
+ //#region \0@oxc-project+runtime@0.103.0/helpers/typeof.js
121
121
  function _typeof(o) {
122
122
  "@babel/helpers - typeof";
123
123
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) {
@@ -128,7 +128,7 @@ function _typeof(o) {
128
128
  }
129
129
 
130
130
  //#endregion
131
- //#region \0@oxc-project+runtime@0.96.0/helpers/toPrimitive.js
131
+ //#region \0@oxc-project+runtime@0.103.0/helpers/toPrimitive.js
132
132
  function toPrimitive(t, r) {
133
133
  if ("object" != _typeof(t) || !t) return t;
134
134
  var e = t[Symbol.toPrimitive];
@@ -141,14 +141,14 @@ function toPrimitive(t, r) {
141
141
  }
142
142
 
143
143
  //#endregion
144
- //#region \0@oxc-project+runtime@0.96.0/helpers/toPropertyKey.js
144
+ //#region \0@oxc-project+runtime@0.103.0/helpers/toPropertyKey.js
145
145
  function toPropertyKey(t) {
146
146
  var i = toPrimitive(t, "string");
147
147
  return "symbol" == _typeof(i) ? i : i + "";
148
148
  }
149
149
 
150
150
  //#endregion
151
- //#region \0@oxc-project+runtime@0.96.0/helpers/defineProperty.js
151
+ //#region \0@oxc-project+runtime@0.103.0/helpers/defineProperty.js
152
152
  function _defineProperty(e, r, t) {
153
153
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
154
154
  value: t,
@@ -159,7 +159,7 @@ function _defineProperty(e, r, t) {
159
159
  }
160
160
 
161
161
  //#endregion
162
- //#region \0@oxc-project+runtime@0.96.0/helpers/objectSpread2.js
162
+ //#region \0@oxc-project+runtime@0.103.0/helpers/objectSpread2.js
163
163
  function ownKeys(e, r) {
164
164
  var t = Object.keys(e);
165
165
  if (Object.getOwnPropertySymbols) {
@@ -381,4 +381,4 @@ const getDatetimeRuleProcessorSQL = (apiFns) => (rule, options) => {
381
381
 
382
382
  //#endregion
383
383
  export { getDatetimeValueProcessorOracle as a, defaultDateTimeNLOperatorMap as c, getDatetimeRuleProcessorCEL as d, getDatetimeJsonLogicOperations as f, getDatetimeValueProcessorMySQL as i, getDatetimeRuleProcessorNL as l, processIsDateField as m, getDatetimeValueProcessorANSI as n, getDatetimeValueProcessorPostgreSQL as o, isISOStringDateOnly as p, getDatetimeValueProcessorMSSQL as r, datetimeValueProcessorNL as s, getDatetimeRuleProcessorSQL as t, getDatetimeRuleProcessorMongoDBQuery as u };
384
- //# sourceMappingURL=getDatetimeRuleProcessorSQL-DfPnCZiT.js.map
384
+ //# sourceMappingURL=getDatetimeRuleProcessorSQL-Cxyajj0g.js.map