@react-querybuilder/bootstrap 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.
- package/dist/cjs/react-querybuilder_bootstrap.cjs.development.d.ts +113 -112
- package/dist/cjs/react-querybuilder_bootstrap.cjs.development.js +10 -6
- package/dist/cjs/react-querybuilder_bootstrap.cjs.development.js.map +1 -1
- package/dist/cjs/react-querybuilder_bootstrap.cjs.production.d.ts +113 -112
- package/dist/react-querybuilder_bootstrap.d.mts +113 -112
- package/dist/react-querybuilder_bootstrap.legacy-esm.d.ts +113 -112
- package/dist/react-querybuilder_bootstrap.legacy-esm.js +5 -5
- package/dist/react-querybuilder_bootstrap.production.d.mts +113 -112
- package/package.json +10 -10
- package/dist/chunk-DrjzjjTJ.mjs +0 -23
- package/dist/chunk-Dv2ph0Ay.js +0 -23
|
@@ -18,34 +18,6 @@ type Intersection = UnionToIntersection<Union>;
|
|
|
18
18
|
//=> {the(): void; great(arg: string): void; escape: boolean};
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
A more applicable example which could make its way into your library code follows.
|
|
22
|
-
|
|
23
|
-
@example
|
|
24
|
-
```
|
|
25
|
-
import type {UnionToIntersection} from 'type-fest';
|
|
26
|
-
|
|
27
|
-
class CommandOne {
|
|
28
|
-
commands: {
|
|
29
|
-
a1: () => undefined,
|
|
30
|
-
b1: () => undefined,
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
class CommandTwo {
|
|
35
|
-
commands: {
|
|
36
|
-
a2: (argA: string) => undefined,
|
|
37
|
-
b2: (argB: string) => undefined,
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const union = [new CommandOne(), new CommandTwo()].map(instance => instance.commands);
|
|
42
|
-
type Union = typeof union;
|
|
43
|
-
//=> {a1(): void; b1(): void} | {a2(argA: string): void; b2(argB: string): void}
|
|
44
|
-
|
|
45
|
-
type Intersection = UnionToIntersection<Union>;
|
|
46
|
-
//=> {a1(): void; b1(): void; a2(argA: string): void; b2(argB: string): void}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
21
|
@category Type
|
|
50
22
|
*/
|
|
51
23
|
type UnionToIntersection<Union> = (
|
|
@@ -121,8 +93,8 @@ import type {IsAny} from 'type-fest';
|
|
|
121
93
|
const typedObject = {a: 1, b: 2} as const;
|
|
122
94
|
const anyObject: any = {a: 1, b: 2};
|
|
123
95
|
|
|
124
|
-
function get<O extends (IsAny<O> extends true ? {} : Record<string, number>), K extends keyof O = keyof O>(
|
|
125
|
-
return
|
|
96
|
+
function get<O extends (IsAny<O> extends true ? {} : Record<string, number>), K extends keyof O = keyof O>(object: O, key: K) {
|
|
97
|
+
return object[key];
|
|
126
98
|
}
|
|
127
99
|
|
|
128
100
|
const typedA = get(typedObject, 'a');
|
|
@@ -147,17 +119,17 @@ This is useful when writing utility types or schema validators that need to diff
|
|
|
147
119
|
```
|
|
148
120
|
import type {IsOptionalKeyOf} from 'type-fest';
|
|
149
121
|
|
|
150
|
-
|
|
122
|
+
type User = {
|
|
151
123
|
name: string;
|
|
152
124
|
surname: string;
|
|
153
125
|
|
|
154
126
|
luckyNumber?: number;
|
|
155
|
-
}
|
|
127
|
+
};
|
|
156
128
|
|
|
157
|
-
|
|
129
|
+
type Admin = {
|
|
158
130
|
name: string;
|
|
159
131
|
surname?: string;
|
|
160
|
-
}
|
|
132
|
+
};
|
|
161
133
|
|
|
162
134
|
type T1 = IsOptionalKeyOf<User, 'luckyNumber'>;
|
|
163
135
|
//=> true
|
|
@@ -190,12 +162,12 @@ This is useful when you want to create a new type that contains different type v
|
|
|
190
162
|
```
|
|
191
163
|
import type {OptionalKeysOf, Except} from 'type-fest';
|
|
192
164
|
|
|
193
|
-
|
|
165
|
+
type User = {
|
|
194
166
|
name: string;
|
|
195
167
|
surname: string;
|
|
196
168
|
|
|
197
169
|
luckyNumber?: number;
|
|
198
|
-
}
|
|
170
|
+
};
|
|
199
171
|
|
|
200
172
|
const REMOVE_FIELD = Symbol('remove field symbol');
|
|
201
173
|
type UpdateOperation<Entity extends object> = Except<Partial<Entity>, OptionalKeysOf<Entity>> & {
|
|
@@ -203,12 +175,12 @@ type UpdateOperation<Entity extends object> = Except<Partial<Entity>, OptionalKe
|
|
|
203
175
|
};
|
|
204
176
|
|
|
205
177
|
const update1: UpdateOperation<User> = {
|
|
206
|
-
name: 'Alice'
|
|
178
|
+
name: 'Alice',
|
|
207
179
|
};
|
|
208
180
|
|
|
209
181
|
const update2: UpdateOperation<User> = {
|
|
210
182
|
name: 'Bob',
|
|
211
|
-
luckyNumber: REMOVE_FIELD
|
|
183
|
+
luckyNumber: REMOVE_FIELD,
|
|
212
184
|
};
|
|
213
185
|
```
|
|
214
186
|
|
|
@@ -228,17 +200,23 @@ This is useful when you want to create a new type that contains different type v
|
|
|
228
200
|
```
|
|
229
201
|
import type {RequiredKeysOf} from 'type-fest';
|
|
230
202
|
|
|
231
|
-
declare function createValidation<
|
|
203
|
+
declare function createValidation<
|
|
204
|
+
Entity extends object,
|
|
205
|
+
Key extends RequiredKeysOf<Entity> = RequiredKeysOf<Entity>,
|
|
206
|
+
>(field: Key, validator: (value: Entity[Key]) => boolean): (entity: Entity) => boolean;
|
|
232
207
|
|
|
233
|
-
|
|
208
|
+
type User = {
|
|
234
209
|
name: string;
|
|
235
210
|
surname: string;
|
|
236
|
-
|
|
237
211
|
luckyNumber?: number;
|
|
238
|
-
}
|
|
212
|
+
};
|
|
239
213
|
|
|
240
214
|
const validator1 = createValidation<User>('name', value => value.length < 25);
|
|
241
215
|
const validator2 = createValidation<User>('surname', value => value.length < 25);
|
|
216
|
+
|
|
217
|
+
// @ts-expect-error
|
|
218
|
+
const validator3 = createValidation<User>('luckyNumber', value => value > 0);
|
|
219
|
+
// Error: Argument of type '"luckyNumber"' is not assignable to parameter of type '"name" | "surname"'.
|
|
242
220
|
```
|
|
243
221
|
|
|
244
222
|
@category Utilities
|
|
@@ -260,29 +238,41 @@ Useful in type utilities, such as checking if something does not occur.
|
|
|
260
238
|
```
|
|
261
239
|
import type {IsNever, And} from 'type-fest';
|
|
262
240
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
And<
|
|
266
|
-
IsNever<Exclude<A, B>> extends true ? true : false,
|
|
267
|
-
IsNever<Exclude<B, A>> extends true ? true : false
|
|
268
|
-
>;
|
|
269
|
-
|
|
270
|
-
type EndIfEqual<I extends string, O extends string> =
|
|
271
|
-
AreStringsEqual<I, O> extends true
|
|
272
|
-
? never
|
|
273
|
-
: void;
|
|
274
|
-
|
|
275
|
-
function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
|
|
276
|
-
if (input === output) {
|
|
277
|
-
process.exit(0);
|
|
278
|
-
}
|
|
279
|
-
}
|
|
241
|
+
type A = IsNever<never>;
|
|
242
|
+
//=> true
|
|
280
243
|
|
|
281
|
-
|
|
282
|
-
//=>
|
|
244
|
+
type B = IsNever<any>;
|
|
245
|
+
//=> false
|
|
246
|
+
|
|
247
|
+
type C = IsNever<unknown>;
|
|
248
|
+
//=> false
|
|
249
|
+
|
|
250
|
+
type D = IsNever<never[]>;
|
|
251
|
+
//=> false
|
|
252
|
+
|
|
253
|
+
type E = IsNever<object>;
|
|
254
|
+
//=> false
|
|
255
|
+
|
|
256
|
+
type F = IsNever<string>;
|
|
257
|
+
//=> false
|
|
258
|
+
```
|
|
283
259
|
|
|
284
|
-
|
|
285
|
-
|
|
260
|
+
@example
|
|
261
|
+
```
|
|
262
|
+
import type {IsNever} from 'type-fest';
|
|
263
|
+
|
|
264
|
+
type IsTrue<T> = T extends true ? true : false;
|
|
265
|
+
|
|
266
|
+
// When a distributive conditional is instantiated with `never`, the entire conditional results in `never`.
|
|
267
|
+
type A = IsTrue<never>;
|
|
268
|
+
// ^? type A = never
|
|
269
|
+
|
|
270
|
+
// If you don't want that behaviour, you can explicitly add an `IsNever` check before the distributive conditional.
|
|
271
|
+
type IsTrueFixed<T> =
|
|
272
|
+
IsNever<T> extends true ? false : T extends true ? true : false;
|
|
273
|
+
|
|
274
|
+
type B = IsTrueFixed<never>;
|
|
275
|
+
// ^? type B = false
|
|
286
276
|
```
|
|
287
277
|
|
|
288
278
|
@category Type Guard
|
|
@@ -303,7 +293,7 @@ Note:
|
|
|
303
293
|
|
|
304
294
|
@example
|
|
305
295
|
```
|
|
306
|
-
import {If} from 'type-fest';
|
|
296
|
+
import type {If} from 'type-fest';
|
|
307
297
|
|
|
308
298
|
type A = If<true, 'yes', 'no'>;
|
|
309
299
|
//=> 'yes'
|
|
@@ -323,7 +313,7 @@ type E = If<never, 'yes', 'no'>;
|
|
|
323
313
|
|
|
324
314
|
@example
|
|
325
315
|
```
|
|
326
|
-
import {If, IsAny, IsNever} from 'type-fest';
|
|
316
|
+
import type {If, IsAny, IsNever} from 'type-fest';
|
|
327
317
|
|
|
328
318
|
type A = If<IsAny<unknown>, 'is any', 'not any'>;
|
|
329
319
|
//=> 'not any'
|
|
@@ -334,7 +324,7 @@ type B = If<IsNever<never>, 'is never', 'not never'>;
|
|
|
334
324
|
|
|
335
325
|
@example
|
|
336
326
|
```
|
|
337
|
-
import {If, IsEqual} from 'type-fest';
|
|
327
|
+
import type {If, IsEqual} from 'type-fest';
|
|
338
328
|
|
|
339
329
|
type IfEqual<T, U, IfBranch, ElseBranch> = If<IsEqual<T, U>, IfBranch, ElseBranch>;
|
|
340
330
|
|
|
@@ -465,10 +455,11 @@ const literal = {foo: 123, bar: 'hello', baz: 456};
|
|
|
465
455
|
const someType: SomeType = literal;
|
|
466
456
|
const someInterface: SomeInterface = literal;
|
|
467
457
|
|
|
468
|
-
function fn(object: Record<string, unknown>): void
|
|
458
|
+
declare function fn(object: Record<string, unknown>): void;
|
|
469
459
|
|
|
470
460
|
fn(literal); // Good: literal object type is sealed
|
|
471
461
|
fn(someType); // Good: type is sealed
|
|
462
|
+
// @ts-expect-error
|
|
472
463
|
fn(someInterface); // Error: Index signature for type 'string' is missing in type 'someInterface'. Because `interface` can be re-opened
|
|
473
464
|
fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface` into a `type`
|
|
474
465
|
```
|
|
@@ -506,7 +497,7 @@ type Includes<Value extends readonly any[], Item> =
|
|
|
506
497
|
@category Type Guard
|
|
507
498
|
@category Utilities
|
|
508
499
|
*/
|
|
509
|
-
type IsEqual<A, B> = [A
|
|
500
|
+
type IsEqual<A, B> = [A] extends [B] ? [B] extends [A] ? _IsEqual<A, B> : false : false;
|
|
510
501
|
// This version fails the `equalWrappedTupleIntersectionToBeNeverAndNeverExpanded` test in `test-d/is-equal.ts`.
|
|
511
502
|
type _IsEqual<A, B> = (<G>() => G extends A & G | G ? 1 : 2) extends (<G>() => G extends B & G | G ? 1 : 2) ? true : false;
|
|
512
503
|
//#endregion
|
|
@@ -528,6 +519,7 @@ It relies on the fact that an empty object (`{}`) is assignable to an object wit
|
|
|
528
519
|
```
|
|
529
520
|
const indexed: Record<string, unknown> = {}; // Allowed
|
|
530
521
|
|
|
522
|
+
// @ts-expect-error
|
|
531
523
|
const keyed: Record<'foo', unknown> = {}; // Error
|
|
532
524
|
// => TS2739: Type '{}' is missing the following properties from type 'Record<"foo" | "bar", unknown>': foo, bar
|
|
533
525
|
```
|
|
@@ -541,16 +533,14 @@ type Indexed = {} extends Record<string, unknown>
|
|
|
541
533
|
// => '✅ `{}` is assignable to `Record<string, unknown>`'
|
|
542
534
|
|
|
543
535
|
type Keyed = {} extends Record<'foo' | 'bar', unknown>
|
|
544
|
-
?
|
|
545
|
-
:
|
|
536
|
+
? '✅ `{}` is assignable to `Record<\'foo\' | \'bar\', unknown>`'
|
|
537
|
+
: '❌ `{}` is NOT assignable to `Record<\'foo\' | \'bar\', unknown>`';
|
|
546
538
|
// => "❌ `{}` is NOT assignable to `Record<'foo' | 'bar', unknown>`"
|
|
547
539
|
```
|
|
548
540
|
|
|
549
541
|
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`...
|
|
550
542
|
|
|
551
543
|
```
|
|
552
|
-
import type {OmitIndexSignature} from 'type-fest';
|
|
553
|
-
|
|
554
544
|
type OmitIndexSignature<ObjectType> = {
|
|
555
545
|
[KeyType in keyof ObjectType // Map each key of `ObjectType`...
|
|
556
546
|
]: ObjectType[KeyType]; // ...to its original value, i.e. `OmitIndexSignature<Foo> == Foo`.
|
|
@@ -560,14 +550,12 @@ type OmitIndexSignature<ObjectType> = {
|
|
|
560
550
|
...whether an empty object (`{}`) would be assignable to an object with that `KeyType` (`Record<KeyType, unknown>`)...
|
|
561
551
|
|
|
562
552
|
```
|
|
563
|
-
import type {OmitIndexSignature} from 'type-fest';
|
|
564
|
-
|
|
565
553
|
type OmitIndexSignature<ObjectType> = {
|
|
566
554
|
[KeyType in keyof ObjectType
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
555
|
+
// Is `{}` assignable to `Record<KeyType, unknown>`?
|
|
556
|
+
as {} extends Record<KeyType, unknown>
|
|
557
|
+
? never // ✅ `{}` is assignable to `Record<KeyType, unknown>`
|
|
558
|
+
: KeyType // ❌ `{}` is NOT assignable to `Record<KeyType, unknown>`
|
|
571
559
|
]: ObjectType[KeyType];
|
|
572
560
|
};
|
|
573
561
|
```
|
|
@@ -578,21 +566,21 @@ If `{}` is assignable, it means that `KeyType` is an index signature and we want
|
|
|
578
566
|
```
|
|
579
567
|
import type {OmitIndexSignature} from 'type-fest';
|
|
580
568
|
|
|
581
|
-
|
|
569
|
+
type Example = {
|
|
582
570
|
// These index signatures will be removed.
|
|
583
|
-
[x: string]: any
|
|
584
|
-
[x: number]: any
|
|
585
|
-
[x: symbol]: any
|
|
586
|
-
[x: `head-${string}`]: string
|
|
587
|
-
[x: `${string}-tail`]: string
|
|
588
|
-
[x: `head-${string}-tail`]: string
|
|
589
|
-
[x: `${bigint}`]: string
|
|
590
|
-
[x: `embedded-${number}`]: string
|
|
571
|
+
[x: string]: any;
|
|
572
|
+
[x: number]: any;
|
|
573
|
+
[x: symbol]: any;
|
|
574
|
+
[x: `head-${string}`]: string;
|
|
575
|
+
[x: `${string}-tail`]: string;
|
|
576
|
+
[x: `head-${string}-tail`]: string;
|
|
577
|
+
[x: `${bigint}`]: string;
|
|
578
|
+
[x: `embedded-${number}`]: string;
|
|
591
579
|
|
|
592
580
|
// These explicitly defined keys will remain.
|
|
593
581
|
foo: 'bar';
|
|
594
582
|
qux?: 'baz';
|
|
595
|
-
}
|
|
583
|
+
};
|
|
596
584
|
|
|
597
585
|
type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
|
|
598
586
|
// => { foo: 'bar'; qux?: 'baz' | undefined; }
|
|
@@ -662,12 +650,12 @@ Merge two types into a new type. Keys of the second type overrides keys of the f
|
|
|
662
650
|
```
|
|
663
651
|
import type {Merge} from 'type-fest';
|
|
664
652
|
|
|
665
|
-
|
|
653
|
+
type Foo = {
|
|
666
654
|
[x: string]: unknown;
|
|
667
655
|
[x: number]: unknown;
|
|
668
656
|
foo: string;
|
|
669
657
|
bar: symbol;
|
|
670
|
-
}
|
|
658
|
+
};
|
|
671
659
|
|
|
672
660
|
type Bar = {
|
|
673
661
|
[x: number]: number;
|
|
@@ -846,12 +834,14 @@ type Foo = {
|
|
|
846
834
|
type FooWithoutA = Except<Foo, 'a'>;
|
|
847
835
|
//=> {b: string}
|
|
848
836
|
|
|
837
|
+
// @ts-expect-error
|
|
849
838
|
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
850
839
|
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
851
840
|
|
|
852
841
|
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
853
842
|
//=> {a: number} & Partial<Record<"b", never>>
|
|
854
843
|
|
|
844
|
+
// @ts-expect-error
|
|
855
845
|
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
856
846
|
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
857
847
|
|
|
@@ -868,12 +858,12 @@ type UserData = {
|
|
|
868
858
|
|
|
869
859
|
// `Omit` clearly doesn't behave as expected in this case:
|
|
870
860
|
type PostPayload = Omit<UserData, 'email'>;
|
|
871
|
-
//=>
|
|
861
|
+
//=> { [x: string]: string; [x: number]: string; }
|
|
872
862
|
|
|
873
863
|
// In situations like this, `Except` works better.
|
|
874
864
|
// It simply removes the `email` key while preserving all the other keys.
|
|
875
|
-
type
|
|
876
|
-
//=>
|
|
865
|
+
type PostPayloadFixed = Except<UserData, 'email'>;
|
|
866
|
+
//=> { [x: string]: string; name: string; role: 'admin' | 'user'; }
|
|
877
867
|
```
|
|
878
868
|
|
|
879
869
|
@category Object
|
|
@@ -895,7 +885,7 @@ type Foo = {
|
|
|
895
885
|
a?: number;
|
|
896
886
|
b: string;
|
|
897
887
|
c?: boolean;
|
|
898
|
-
}
|
|
888
|
+
};
|
|
899
889
|
|
|
900
890
|
type SomeRequired = SetRequired<Foo, 'b' | 'c'>;
|
|
901
891
|
// type SomeRequired = {
|
|
@@ -949,7 +939,7 @@ type Foo = {
|
|
|
949
939
|
a: number | null;
|
|
950
940
|
b: string | undefined;
|
|
951
941
|
c?: boolean | null;
|
|
952
|
-
}
|
|
942
|
+
};
|
|
953
943
|
|
|
954
944
|
type SomeNonNullable = SetNonNullable<Foo, 'b' | 'c'>;
|
|
955
945
|
// type SomeNonNullable = {
|
|
@@ -979,7 +969,7 @@ type StringUnionToFullOptionArray<Op extends string> = Array<Op extends unknown
|
|
|
979
969
|
*
|
|
980
970
|
* @group Option Lists
|
|
981
971
|
*/
|
|
982
|
-
type GetOptionIdentifierType<Opt
|
|
972
|
+
type GetOptionIdentifierType<Opt extends BaseOption> = Opt extends Option<infer NameType> | ValueOption<infer NameType> ? NameType : string;
|
|
983
973
|
/**
|
|
984
974
|
* Adds an `unknown` index property to an interface.
|
|
985
975
|
*/
|
|
@@ -1028,7 +1018,7 @@ type FlexibleOption<N extends string = string> = Simplify<WithUnknownIndex<Requi
|
|
|
1028
1018
|
*
|
|
1029
1019
|
* @group Option Lists
|
|
1030
1020
|
*/
|
|
1031
|
-
type ToFlexibleOption<Opt
|
|
1021
|
+
type ToFlexibleOption<Opt extends BaseOption | string> = WithUnknownIndex<RequireAtLeastOne<Opt extends string ? FlexibleOption<Opt> : Opt, "name" | "value">>;
|
|
1032
1022
|
/**
|
|
1033
1023
|
* A generic {@link Option} requiring both `name` _and_ `value` properties.
|
|
1034
1024
|
* Props that extend {@link OptionList} accept {@link BaseOption}, but
|
|
@@ -1056,45 +1046,45 @@ type BaseFullOption<N extends string = string> = Simplify<SetRequired<BaseOption
|
|
|
1056
1046
|
*
|
|
1057
1047
|
* @group Option Lists
|
|
1058
1048
|
*/
|
|
1059
|
-
type ToFullOption<Opt
|
|
1049
|
+
type ToFullOption<Opt extends BaseOption> = Opt extends BaseFullOption ? Opt : Opt extends BaseOption<infer IdentifierType> ? WithUnknownIndex<Opt & FullOption<IdentifierType>> : never;
|
|
1060
1050
|
/**
|
|
1061
1051
|
* A group of {@link Option}s, usually within an {@link OptionList}.
|
|
1062
1052
|
*
|
|
1063
1053
|
* @group Option Lists
|
|
1064
1054
|
*/
|
|
1065
|
-
interface OptionGroup<Opt
|
|
1055
|
+
interface OptionGroup<Opt extends BaseOption = FlexibleOption> {
|
|
1066
1056
|
label: string;
|
|
1067
|
-
options: WithUnknownIndex<Opt
|
|
1057
|
+
options: WithUnknownIndex<Opt>[];
|
|
1068
1058
|
}
|
|
1069
1059
|
/**
|
|
1070
1060
|
* A group of {@link BaseOption}s, usually within a {@link FlexibleOptionList}.
|
|
1071
1061
|
*
|
|
1072
1062
|
* @group Option Lists
|
|
1073
1063
|
*/
|
|
1074
|
-
type FlexibleOptionGroup<Opt
|
|
1064
|
+
type FlexibleOptionGroup<Opt extends BaseOption | string = BaseOption> = {
|
|
1075
1065
|
label: string;
|
|
1076
|
-
options: (Opt
|
|
1066
|
+
options: (Opt extends BaseFullOption ? Opt : ToFlexibleOption<Opt>)[];
|
|
1077
1067
|
};
|
|
1078
1068
|
/**
|
|
1079
1069
|
* Either an array of {@link Option}s or an array of {@link OptionGroup}s.
|
|
1080
1070
|
*
|
|
1081
1071
|
* @group Option Lists
|
|
1082
1072
|
*/
|
|
1083
|
-
type OptionList<Opt
|
|
1073
|
+
type OptionList<Opt extends Option = Option> = Opt[] | OptionGroup<Opt>[];
|
|
1084
1074
|
/**
|
|
1085
1075
|
* An array of options or option groups, like {@link OptionList} but the option type
|
|
1086
1076
|
* may use either `name` or `value` as the primary identifier.
|
|
1087
1077
|
*
|
|
1088
1078
|
* @group Option Lists
|
|
1089
1079
|
*/
|
|
1090
|
-
type FlexibleOptionList<Opt
|
|
1080
|
+
type FlexibleOptionList<Opt extends BaseOption> = ToFlexibleOption<Opt>[] | FlexibleOptionGroup<ToFlexibleOption<Opt>>[];
|
|
1091
1081
|
/**
|
|
1092
1082
|
* An array of options or option groups, like {@link OptionList} but the option type
|
|
1093
1083
|
* may use either `name` or `value` as the primary identifier.
|
|
1094
1084
|
*
|
|
1095
1085
|
* @group Option Lists
|
|
1096
1086
|
*/
|
|
1097
|
-
type FlexibleOptionListProp<Opt
|
|
1087
|
+
type FlexibleOptionListProp<Opt extends BaseOption> = (ToFlexibleOption<Opt> | GetOptionIdentifierType<Opt>)[] | FlexibleOptionGroup<ToFlexibleOption<Opt> | GetOptionIdentifierType<Opt>>[];
|
|
1098
1088
|
/**
|
|
1099
1089
|
* An array of options or option groups, like {@link OptionList}, but using
|
|
1100
1090
|
* {@link FullOption} instead of {@link Option}. This means that every member is
|
|
@@ -1102,7 +1092,7 @@ type FlexibleOptionListProp<Opt$1 extends BaseOption> = (ToFlexibleOption<Opt$1>
|
|
|
1102
1092
|
*
|
|
1103
1093
|
* @group Option Lists
|
|
1104
1094
|
*/
|
|
1105
|
-
type FullOptionList<Opt
|
|
1095
|
+
type FullOptionList<Opt extends BaseOption> = Opt extends BaseFullOption ? Opt[] | OptionGroup<Opt>[] : ToFullOption<Opt>[] | OptionGroup<ToFullOption<Opt>>[];
|
|
1106
1096
|
/**
|
|
1107
1097
|
* Map of option identifiers to their respective {@link Option}.
|
|
1108
1098
|
*
|
|
@@ -1270,17 +1260,17 @@ type ValueChangeEventHandler = (value?: any, context?: any) => void;
|
|
|
1270
1260
|
/**
|
|
1271
1261
|
* Base for all Field types/interfaces.
|
|
1272
1262
|
*/
|
|
1273
|
-
interface BaseFullField<FieldName extends string = string, OperatorName
|
|
1263
|
+
interface BaseFullField<FieldName extends string = string, OperatorName extends string = string, ValueName extends string = string, OperatorObj extends FullOption = FullOption<OperatorName>, ValueObj extends FullOption = FullOption<ValueName>> extends WithOptionalClassName<BaseFullOption<FieldName>> {
|
|
1274
1264
|
id?: string;
|
|
1275
|
-
operators?: FlexibleOptionList<OperatorObj> | OperatorName
|
|
1276
|
-
valueEditorType?: ValueEditorType | ((operator: OperatorName
|
|
1277
|
-
valueSources?: ValueSources | ValueSourceFlexibleOptions | ((operator: OperatorName
|
|
1265
|
+
operators?: FlexibleOptionList<OperatorObj> | OperatorName[] | FlexibleOption<OperatorName>[] | (OperatorName | FlexibleOption<OperatorName>)[];
|
|
1266
|
+
valueEditorType?: ValueEditorType | ((operator: OperatorName) => ValueEditorType);
|
|
1267
|
+
valueSources?: ValueSources | ValueSourceFlexibleOptions | ((operator: OperatorName) => ValueSources | ValueSourceFlexibleOptions);
|
|
1278
1268
|
inputType?: InputType | null;
|
|
1279
1269
|
values?: FlexibleOptionList<ValueObj>;
|
|
1280
1270
|
matchModes?: boolean | MatchMode[] | FlexibleOption<MatchMode>[];
|
|
1281
1271
|
/** Properties of items in the value. */
|
|
1282
1272
|
subproperties?: FlexibleOptionList<FullField>;
|
|
1283
|
-
defaultOperator?: OperatorName
|
|
1273
|
+
defaultOperator?: OperatorName;
|
|
1284
1274
|
defaultValue?: any;
|
|
1285
1275
|
placeholder?: string;
|
|
1286
1276
|
validator?: RuleValidator;
|
|
@@ -1298,7 +1288,7 @@ interface BaseFullField<FieldName extends string = string, OperatorName$1 extend
|
|
|
1298
1288
|
*
|
|
1299
1289
|
* @group Option Lists
|
|
1300
1290
|
*/
|
|
1301
|
-
type FullField<FieldName extends string = string, OperatorName
|
|
1291
|
+
type FullField<FieldName extends string = string, OperatorName extends string = string, ValueName extends string = string, OperatorObj extends FullOption = FullOption<OperatorName>, ValueObj extends FullOption = FullOption<ValueName>> = Simplify<FullOption<FieldName> & BaseFullField<FieldName, OperatorName, ValueName, OperatorObj, ValueObj>>;
|
|
1302
1292
|
/**
|
|
1303
1293
|
* Allowed values of the {@link FullOperator} property `arity`. A value of `"unary"` or
|
|
1304
1294
|
* a number less than two will cause the default {@link react-querybuilder!ValueEditor ValueEditor} to render `null`.
|
|
@@ -2736,6 +2726,17 @@ type QueryBuilderProps<RG extends RuleGroupTypeAny, F extends FullField, O exten
|
|
|
2736
2726
|
context?: any;
|
|
2737
2727
|
} : never;
|
|
2738
2728
|
//#endregion
|
|
2729
|
+
//#region ../react-querybuilder/src/redux/getRqbStore.d.ts
|
|
2730
|
+
declare global {
|
|
2731
|
+
var __RQB_DEVTOOLS__: boolean | undefined;
|
|
2732
|
+
}
|
|
2733
|
+
/**
|
|
2734
|
+
* Gets the singleton React Query Builder store instance.
|
|
2735
|
+
* DevTools are enabled if either:
|
|
2736
|
+
* - globalThis.__RQB_DEVTOOLS__ is truthy
|
|
2737
|
+
* - window.__RQB_DEVTOOLS__ is truthy
|
|
2738
|
+
*/
|
|
2739
|
+
//#endregion
|
|
2739
2740
|
//#region src/BootstrapNotToggle.d.ts
|
|
2740
2741
|
/**
|
|
2741
2742
|
* @group Components
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-querybuilder/bootstrap",
|
|
3
3
|
"description": "Custom Bootstrap components for react-querybuilder",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.14.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -53,23 +53,23 @@
|
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@popperjs/core": "^2.11.8",
|
|
55
55
|
"@testing-library/dom": "^10.4.1",
|
|
56
|
-
"@testing-library/react": "^16.3.
|
|
57
|
-
"@types/react": "^19.2.
|
|
58
|
-
"@vitejs/plugin-react": "^5.1.
|
|
56
|
+
"@testing-library/react": "^16.3.1",
|
|
57
|
+
"@types/react": "^19.2.7",
|
|
58
|
+
"@vitejs/plugin-react": "^5.1.2",
|
|
59
59
|
"bootstrap": "^5.3.8",
|
|
60
60
|
"bootstrap-icons": "^1.13.1",
|
|
61
|
-
"react": "^19.2.
|
|
62
|
-
"react-dom": "^19.2.
|
|
63
|
-
"react-querybuilder": "8.
|
|
61
|
+
"react": "^19.2.3",
|
|
62
|
+
"react-dom": "^19.2.3",
|
|
63
|
+
"react-querybuilder": "8.14.0",
|
|
64
64
|
"rollup-plugin-visualizer": "^6.0.5",
|
|
65
65
|
"typescript": "^5.9.3",
|
|
66
|
-
"vite": "^7.
|
|
66
|
+
"vite": "^7.3.1"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"bootstrap": ">=5",
|
|
70
70
|
"bootstrap-icons": ">=1.7.0",
|
|
71
71
|
"react": ">=18",
|
|
72
|
-
"react-querybuilder": "8.
|
|
72
|
+
"react-querybuilder": "8.14.0"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "efdb45ff71a9fa11dde3b5ebe0990a48de0dfa7f"
|
|
75
75
|
}
|
package/dist/chunk-DrjzjjTJ.mjs
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
//#region rolldown:runtime
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
-
key = keys[i];
|
|
11
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
-
get: ((k) => from[k]).bind(null, key),
|
|
13
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
-
value: mod,
|
|
20
|
-
enumerable: true
|
|
21
|
-
}) : target, mod));
|
|
22
|
-
|
|
23
|
-
//#endregion
|
package/dist/chunk-Dv2ph0Ay.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
//#region rolldown:runtime
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
-
key = keys[i];
|
|
11
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
-
get: ((k) => from[k]).bind(null, key),
|
|
13
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
-
value: mod,
|
|
20
|
-
enumerable: true
|
|
21
|
-
}) : target, mod));
|
|
22
|
-
|
|
23
|
-
//#endregion
|