@react-querybuilder/core 8.11.2 → 8.12.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/{basic-CLG_Bmom.d.mts → basic-DbvrfPNz.d.mts} +39 -4
- package/dist/{basic-BeKPP0_1.d.ts → basic-o1-sYjK6.d.ts} +39 -4
- package/dist/chunk-BxBTb9qk.js +39 -0
- package/dist/chunk-DrjzjjTJ.mjs +23 -0
- package/dist/chunk-Dv2ph0Ay.js +23 -0
- package/dist/cjs/react-querybuilder_core.cjs.development.d.ts +118 -52
- package/dist/cjs/react-querybuilder_core.cjs.development.js +13 -28
- package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +118 -52
- package/dist/cjs/react-querybuilder_core.cjs.production.js +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.js.map +1 -1
- package/dist/{convertQuery-C7NvB0XA.js → convertQuery-DuY_BJHy.js} +3 -3
- package/dist/{convertQuery-C7NvB0XA.js.map → convertQuery-DuY_BJHy.js.map} +1 -1
- package/dist/{export-B2Yw5gak.d.mts → export-CCULKoP4.d.mts} +2 -2
- package/dist/{export-CQB0nuvW.d.ts → export-WDHFbiPz.d.ts} +2 -2
- package/dist/formatQuery.d.mts +2 -2
- package/dist/formatQuery.d.ts +2 -2
- package/dist/formatQuery.js +5 -5
- package/dist/formatQuery.mjs +1 -1
- package/dist/{import-Dvayhrgj.d.ts → import-BSWb9Vgd.d.ts} +2 -2
- package/dist/{import-BtpySRSy.d.mts → import-CLyHpgk8.d.mts} +2 -2
- package/dist/{isRuleGroup-DqAs2x4E.js → isRuleGroup-Do9KKsmt.js} +2 -40
- package/dist/{isRuleGroup-DqAs2x4E.js.map → isRuleGroup-Do9KKsmt.js.map} +1 -1
- package/dist/parseCEL.d.mts +2 -2
- package/dist/parseCEL.d.ts +2 -2
- package/dist/parseCEL.js +16 -6
- package/dist/parseCEL.js.map +1 -1
- package/dist/parseCEL.mjs +12 -1
- package/dist/parseCEL.mjs.map +1 -1
- package/dist/parseJSONata.d.mts +2 -2
- package/dist/parseJSONata.d.ts +2 -2
- package/dist/parseJSONata.js +6 -5
- package/dist/parseJSONata.js.map +1 -1
- package/dist/parseJsonLogic.d.mts +3 -3
- package/dist/parseJsonLogic.d.ts +3 -3
- package/dist/parseJsonLogic.js +4 -4
- package/dist/parseMongoDB.d.mts +2 -2
- package/dist/parseMongoDB.d.ts +2 -2
- package/dist/parseMongoDB.js +4 -4
- package/dist/parseSQL.d.mts +2 -2
- package/dist/parseSQL.d.ts +2 -2
- package/dist/parseSQL.js +4 -5
- package/dist/parseSQL.js.map +1 -1
- package/dist/parseSpEL.d.mts +2 -2
- package/dist/parseSpEL.d.ts +2 -2
- package/dist/parseSpEL.js +6 -5
- package/dist/parseSpEL.js.map +1 -1
- package/dist/{prepareQueryObjects-Cz_28zYz.js → prepareQueryObjects-DCtJJrF5.js} +4 -4
- package/dist/{prepareQueryObjects-Cz_28zYz.js.map → prepareQueryObjects-DCtJJrF5.js.map} +1 -1
- package/dist/react-querybuilder_core.d.mts +118 -52
- package/dist/react-querybuilder_core.legacy-esm.d.ts +118 -52
- package/dist/react-querybuilder_core.legacy-esm.js +20 -10
- package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
- package/dist/react-querybuilder_core.mjs +13 -3
- package/dist/react-querybuilder_core.mjs.map +1 -1
- package/dist/react-querybuilder_core.production.d.mts +118 -52
- package/dist/react-querybuilder_core.production.mjs +1 -1
- package/dist/react-querybuilder_core.production.mjs.map +1 -1
- package/dist/{transformQuery-C85j__7e.mjs → transformQuery-Bq4iyYsE.mjs} +8 -1
- package/dist/{transformQuery-C85j__7e.mjs.map → transformQuery-Bq4iyYsE.mjs.map} +1 -1
- package/dist/{transformQuery-B4SaTTO-.js → transformQuery-DvJTAvkh.js} +10 -3
- package/dist/{transformQuery-B4SaTTO-.js.map → transformQuery-DvJTAvkh.js.map} +1 -1
- package/dist/transformQuery.d.mts +1 -1
- package/dist/transformQuery.d.ts +1 -1
- package/dist/transformQuery.js +2 -2
- package/dist/transformQuery.mjs +1 -1
- package/dist/{utils-Dkz3Xn2D.js → utils-CoYbYnVo.js} +3 -4
- package/dist/utils-CoYbYnVo.js.map +1 -0
- package/dist/utils-DxH23QtE.mjs.map +1 -1
- package/package.json +11 -11
- package/dist/utils-Dkz3Xn2D.js.map +0 -1
|
@@ -341,6 +341,41 @@ type B = IfEqual<string, number, 'equal', 'not equal'>;
|
|
|
341
341
|
//=> 'not equal'
|
|
342
342
|
```
|
|
343
343
|
|
|
344
|
+
Note: Sometimes using the `If` type can make an implementation non–tail-recursive, which can impact performance. In such cases, it’s better to use a conditional directly. Refer to the following example:
|
|
345
|
+
|
|
346
|
+
@example
|
|
347
|
+
```
|
|
348
|
+
import type {If, IsEqual, StringRepeat} from 'type-fest';
|
|
349
|
+
|
|
350
|
+
type HundredZeroes = StringRepeat<'0', 100>;
|
|
351
|
+
|
|
352
|
+
// The following implementation is not tail recursive
|
|
353
|
+
type Includes<S extends string, Char extends string> =
|
|
354
|
+
S extends `${infer First}${infer Rest}`
|
|
355
|
+
? If<IsEqual<First, Char>,
|
|
356
|
+
'found',
|
|
357
|
+
Includes<Rest, Char>>
|
|
358
|
+
: 'not found';
|
|
359
|
+
|
|
360
|
+
// Hence, instantiations with long strings will fail
|
|
361
|
+
// @ts-expect-error
|
|
362
|
+
type Fails = Includes<HundredZeroes, '1'>;
|
|
363
|
+
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
364
|
+
// Error: Type instantiation is excessively deep and possibly infinite.
|
|
365
|
+
|
|
366
|
+
// However, if we use a simple conditional instead of `If`, the implementation becomes tail-recursive
|
|
367
|
+
type IncludesWithoutIf<S extends string, Char extends string> =
|
|
368
|
+
S extends `${infer First}${infer Rest}`
|
|
369
|
+
? IsEqual<First, Char> extends true
|
|
370
|
+
? 'found'
|
|
371
|
+
: IncludesWithoutIf<Rest, Char>
|
|
372
|
+
: 'not found';
|
|
373
|
+
|
|
374
|
+
// Now, instantiations with long strings will work
|
|
375
|
+
type Works = IncludesWithoutIf<HundredZeroes, '1'>;
|
|
376
|
+
//=> 'not found'
|
|
377
|
+
```
|
|
378
|
+
|
|
344
379
|
@category Type Guard
|
|
345
380
|
@category Utilities
|
|
346
381
|
*/
|
|
@@ -435,7 +470,7 @@ fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface`
|
|
|
435
470
|
```
|
|
436
471
|
|
|
437
472
|
@link https://github.com/microsoft/TypeScript/issues/15300
|
|
438
|
-
@see SimplifyDeep
|
|
473
|
+
@see {@link SimplifyDeep}
|
|
439
474
|
@category Object
|
|
440
475
|
*/
|
|
441
476
|
type Simplify<T> = { [KeyType in keyof T]: T[KeyType] } & {};
|
|
@@ -559,7 +594,7 @@ type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
|
|
|
559
594
|
// => { foo: 'bar'; qux?: 'baz' | undefined; }
|
|
560
595
|
```
|
|
561
596
|
|
|
562
|
-
@see PickIndexSignature
|
|
597
|
+
@see {@link PickIndexSignature}
|
|
563
598
|
@category Object
|
|
564
599
|
*/
|
|
565
600
|
type OmitIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType] };
|
|
@@ -607,7 +642,7 @@ type ExampleIndexSignature = PickIndexSignature<Example>;
|
|
|
607
642
|
// }
|
|
608
643
|
```
|
|
609
644
|
|
|
610
|
-
@see OmitIndexSignature
|
|
645
|
+
@see {@link OmitIndexSignature}
|
|
611
646
|
@category Object
|
|
612
647
|
*/
|
|
613
648
|
type PickIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? KeyType : never]: ObjectType[KeyType] };
|
|
@@ -1254,4 +1289,4 @@ type ParseNumbersModerationLevel = "-limited" | "";
|
|
|
1254
1289
|
type ParseNumbersPropConfig = boolean | `${ParseNumberMethodName}${ParseNumbersModerationLevel}`;
|
|
1255
1290
|
//#endregion
|
|
1256
1291
|
export { Except as C, SetRequired as S, RuleGroupType as _, ValueSource as a, FullOptionList as b, RuleValidator as c, DefaultRuleGroupTypeIC as d, RuleGroupTypeAny as f, DefaultRuleGroupType as g, DefaultOperatorName as h, ParseNumbersPropConfig as i, ValidationMap as l, DefaultCombinatorName as m, FullOperator as n, ValueSources as o, RuleGroupTypeIC as p, InputType as r, QueryValidator as s, FullField as t, ValidationResult as u, RuleType as v, OptionList as x, FlexibleOptionList as y };
|
|
1257
|
-
//# sourceMappingURL=basic-
|
|
1292
|
+
//# sourceMappingURL=basic-DbvrfPNz.d.mts.map
|
|
@@ -341,6 +341,41 @@ type B = IfEqual<string, number, 'equal', 'not equal'>;
|
|
|
341
341
|
//=> 'not equal'
|
|
342
342
|
```
|
|
343
343
|
|
|
344
|
+
Note: Sometimes using the `If` type can make an implementation non–tail-recursive, which can impact performance. In such cases, it’s better to use a conditional directly. Refer to the following example:
|
|
345
|
+
|
|
346
|
+
@example
|
|
347
|
+
```
|
|
348
|
+
import type {If, IsEqual, StringRepeat} from 'type-fest';
|
|
349
|
+
|
|
350
|
+
type HundredZeroes = StringRepeat<'0', 100>;
|
|
351
|
+
|
|
352
|
+
// The following implementation is not tail recursive
|
|
353
|
+
type Includes<S extends string, Char extends string> =
|
|
354
|
+
S extends `${infer First}${infer Rest}`
|
|
355
|
+
? If<IsEqual<First, Char>,
|
|
356
|
+
'found',
|
|
357
|
+
Includes<Rest, Char>>
|
|
358
|
+
: 'not found';
|
|
359
|
+
|
|
360
|
+
// Hence, instantiations with long strings will fail
|
|
361
|
+
// @ts-expect-error
|
|
362
|
+
type Fails = Includes<HundredZeroes, '1'>;
|
|
363
|
+
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
364
|
+
// Error: Type instantiation is excessively deep and possibly infinite.
|
|
365
|
+
|
|
366
|
+
// However, if we use a simple conditional instead of `If`, the implementation becomes tail-recursive
|
|
367
|
+
type IncludesWithoutIf<S extends string, Char extends string> =
|
|
368
|
+
S extends `${infer First}${infer Rest}`
|
|
369
|
+
? IsEqual<First, Char> extends true
|
|
370
|
+
? 'found'
|
|
371
|
+
: IncludesWithoutIf<Rest, Char>
|
|
372
|
+
: 'not found';
|
|
373
|
+
|
|
374
|
+
// Now, instantiations with long strings will work
|
|
375
|
+
type Works = IncludesWithoutIf<HundredZeroes, '1'>;
|
|
376
|
+
//=> 'not found'
|
|
377
|
+
```
|
|
378
|
+
|
|
344
379
|
@category Type Guard
|
|
345
380
|
@category Utilities
|
|
346
381
|
*/
|
|
@@ -435,7 +470,7 @@ fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface`
|
|
|
435
470
|
```
|
|
436
471
|
|
|
437
472
|
@link https://github.com/microsoft/TypeScript/issues/15300
|
|
438
|
-
@see SimplifyDeep
|
|
473
|
+
@see {@link SimplifyDeep}
|
|
439
474
|
@category Object
|
|
440
475
|
*/
|
|
441
476
|
type Simplify<T> = { [KeyType in keyof T]: T[KeyType] } & {};
|
|
@@ -559,7 +594,7 @@ type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
|
|
|
559
594
|
// => { foo: 'bar'; qux?: 'baz' | undefined; }
|
|
560
595
|
```
|
|
561
596
|
|
|
562
|
-
@see PickIndexSignature
|
|
597
|
+
@see {@link PickIndexSignature}
|
|
563
598
|
@category Object
|
|
564
599
|
*/
|
|
565
600
|
type OmitIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType] };
|
|
@@ -607,7 +642,7 @@ type ExampleIndexSignature = PickIndexSignature<Example>;
|
|
|
607
642
|
// }
|
|
608
643
|
```
|
|
609
644
|
|
|
610
|
-
@see OmitIndexSignature
|
|
645
|
+
@see {@link OmitIndexSignature}
|
|
611
646
|
@category Object
|
|
612
647
|
*/
|
|
613
648
|
type PickIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? KeyType : never]: ObjectType[KeyType] };
|
|
@@ -1254,4 +1289,4 @@ type ParseNumbersModerationLevel = "-limited" | "";
|
|
|
1254
1289
|
type ParseNumbersPropConfig = boolean | `${ParseNumberMethodName}${ParseNumbersModerationLevel}`;
|
|
1255
1290
|
//#endregion
|
|
1256
1291
|
export { Except as C, SetRequired as S, RuleGroupType as _, ValueSource as a, FullOptionList as b, RuleValidator as c, DefaultRuleGroupTypeIC as d, RuleGroupTypeAny as f, DefaultRuleGroupType as g, DefaultOperatorName as h, ParseNumbersPropConfig as i, ValidationMap as l, DefaultCombinatorName as m, FullOperator as n, ValueSources as o, RuleGroupTypeIC as p, InputType as r, QueryValidator as s, FullField as t, ValidationResult as u, RuleType as v, OptionList as x, FlexibleOptionList as y };
|
|
1257
|
-
//# sourceMappingURL=basic-
|
|
1292
|
+
//# sourceMappingURL=basic-o1-sYjK6.d.ts.map
|
|
@@ -0,0 +1,39 @@
|
|
|
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 __commonJS = (cb, mod) => function() {
|
|
9
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
13
|
+
key = keys[i];
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
|
+
get: ((k) => from[k]).bind(null, key),
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
22
|
+
value: mod,
|
|
23
|
+
enumerable: true
|
|
24
|
+
}) : target, mod));
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
|
|
28
|
+
Object.defineProperty(exports, '__commonJS', {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () {
|
|
31
|
+
return __commonJS;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
Object.defineProperty(exports, '__toESM', {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function () {
|
|
37
|
+
return __toESM;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|