@react-querybuilder/antd 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.
@@ -347,6 +347,41 @@ type B = IfEqual<string, number, 'equal', 'not equal'>;
347
347
  //=> 'not equal'
348
348
  ```
349
349
 
350
+ 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:
351
+
352
+ @example
353
+ ```
354
+ import type {If, IsEqual, StringRepeat} from 'type-fest';
355
+
356
+ type HundredZeroes = StringRepeat<'0', 100>;
357
+
358
+ // The following implementation is not tail recursive
359
+ type Includes<S extends string, Char extends string> =
360
+ S extends `${infer First}${infer Rest}`
361
+ ? If<IsEqual<First, Char>,
362
+ 'found',
363
+ Includes<Rest, Char>>
364
+ : 'not found';
365
+
366
+ // Hence, instantiations with long strings will fail
367
+ // @ts-expect-error
368
+ type Fails = Includes<HundredZeroes, '1'>;
369
+ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
370
+ // Error: Type instantiation is excessively deep and possibly infinite.
371
+
372
+ // However, if we use a simple conditional instead of `If`, the implementation becomes tail-recursive
373
+ type IncludesWithoutIf<S extends string, Char extends string> =
374
+ S extends `${infer First}${infer Rest}`
375
+ ? IsEqual<First, Char> extends true
376
+ ? 'found'
377
+ : IncludesWithoutIf<Rest, Char>
378
+ : 'not found';
379
+
380
+ // Now, instantiations with long strings will work
381
+ type Works = IncludesWithoutIf<HundredZeroes, '1'>;
382
+ //=> 'not found'
383
+ ```
384
+
350
385
  @category Type Guard
351
386
  @category Utilities
352
387
  */
@@ -380,7 +415,6 @@ type C = IsArray<string>;
380
415
  type UnknownArray = readonly unknown[];
381
416
  //#endregion
382
417
  //#region ../../node_modules/type-fest/source/internal/array.d.ts
383
-
384
418
  /**
385
419
  Returns whether the given array `T` is readonly.
386
420
  */
@@ -441,7 +475,7 @@ fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface`
441
475
  ```
442
476
 
443
477
  @link https://github.com/microsoft/TypeScript/issues/15300
444
- @see SimplifyDeep
478
+ @see {@link SimplifyDeep}
445
479
  @category Object
446
480
  */
447
481
  type Simplify<T$1> = { [KeyType in keyof T$1]: T$1[KeyType] } & {};
@@ -565,7 +599,7 @@ type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
565
599
  // => { foo: 'bar'; qux?: 'baz' | undefined; }
566
600
  ```
567
601
 
568
- @see PickIndexSignature
602
+ @see {@link PickIndexSignature}
569
603
  @category Object
570
604
  */
571
605
  type OmitIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType] };
@@ -613,7 +647,7 @@ type ExampleIndexSignature = PickIndexSignature<Example>;
613
647
  // }
614
648
  ```
615
649
 
616
- @see OmitIndexSignature
650
+ @see {@link OmitIndexSignature}
617
651
  @category Object
618
652
  */
619
653
  type PickIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? KeyType : never]: ObjectType[KeyType] };
@@ -1119,7 +1153,7 @@ interface RuleGroupType<R$1 extends RuleType = RuleType, C extends string = stri
1119
1153
  /**
1120
1154
  * The type of the `rules` array in a {@link RuleGroupType}.
1121
1155
  */
1122
- type RuleGroupArray<RG$1 extends RuleGroupType = RuleGroupType, R$1 extends RuleType = RuleType> = (R$1 | RG$1)[];
1156
+ type RuleGroupArray<RG extends RuleGroupType = RuleGroupType, R$1 extends RuleType = RuleType> = (R$1 | RG)[];
1123
1157
  //#endregion
1124
1158
  //#region ../core/src/types/ruleGroupsIC.utils.d.ts
1125
1159
  type MAXIMUM_ALLOWED_BOUNDARY = 80;
@@ -1145,7 +1179,7 @@ type RuleGroupTypeAny<R$1 extends RuleType = RuleType, C extends string = string
1145
1179
  /**
1146
1180
  * The type of the `rules` array in a {@link RuleGroupTypeIC}.
1147
1181
  */
1148
- type RuleGroupICArray<RG$1 extends RuleGroupTypeIC = RuleGroupTypeIC, R$1 extends RuleType = RuleType, C extends string = string> = [R$1 | RG$1] | [R$1 | RG$1, ...MappedTuple<[C, R$1 | RG$1]>] | ((R$1 | RG$1)[] & {
1182
+ type RuleGroupICArray<RG extends RuleGroupTypeIC = RuleGroupTypeIC, R$1 extends RuleType = RuleType, C extends string = string> = [R$1 | RG] | [R$1 | RG, ...MappedTuple<[C, R$1 | RG]>] | ((R$1 | RG)[] & {
1149
1183
  length: 0;
1150
1184
  });
1151
1185
  /**
@@ -1155,7 +1189,7 @@ type RuleOrGroupArray = RuleGroupArray | RuleGroupICArray;
1155
1189
  /**
1156
1190
  * Converts a narrowed rule group type to its most generic form.
1157
1191
  */
1158
- type GenericizeRuleGroupType<RG$1> = RG$1 extends RuleGroupType ? RuleGroupType : RuleGroupTypeIC;
1192
+ type GenericizeRuleGroupType<RG> = RG extends RuleGroupType ? RuleGroupType : RuleGroupTypeIC;
1159
1193
  //#endregion
1160
1194
  //#region ../core/src/types/validation.d.ts
1161
1195
  /**
@@ -1493,9 +1527,13 @@ interface Classnames {
1493
1527
  */
1494
1528
  branches: Classname;
1495
1529
  /**
1496
- * Classname(s) rules that render a subquery.
1530
+ * Classname(s) applied to rules that render a subquery.
1497
1531
  */
1498
1532
  hasSubQuery: Classname;
1533
+ /**
1534
+ * Classname(s) applied to async components in their "loading" state.
1535
+ */
1536
+ loading: Classname;
1499
1537
  }
1500
1538
  /**
1501
1539
  * Placeholder strings for option lists.
@@ -2412,15 +2450,15 @@ type QueryBuilderContextProvider<ExtraProps extends object = Record<string, any>
2412
2450
  *
2413
2451
  * @group Props
2414
2452
  */
2415
- type QueryBuilderProps<RG$1 extends RuleGroupTypeAny, F extends FullField, O extends FullOperator, C extends FullCombinator> = RG$1 extends RuleGroupType<infer R> | RuleGroupTypeIC<infer R> ? QueryBuilderContextProps<F, GetOptionIdentifierType<O>> & {
2453
+ type QueryBuilderProps<RG extends RuleGroupTypeAny, F extends FullField, O extends FullOperator, C extends FullCombinator> = RG extends RuleGroupType<infer R> | RuleGroupTypeIC<infer R> ? QueryBuilderContextProps<F, GetOptionIdentifierType<O>> & {
2416
2454
  /**
2417
2455
  * Initial query object for uncontrolled components.
2418
2456
  */
2419
- defaultQuery?: RG$1;
2457
+ defaultQuery?: RG;
2420
2458
  /**
2421
2459
  * Query object for controlled components.
2422
2460
  */
2423
- query?: RG$1;
2461
+ query?: RG;
2424
2462
  /**
2425
2463
  * List of valid {@link FullField}s.
2426
2464
  *
@@ -2572,7 +2610,7 @@ type QueryBuilderProps<RG$1 extends RuleGroupTypeAny, F extends FullField, O ext
2572
2610
  */
2573
2611
  getSubQueryBuilderProps?(field: GetOptionIdentifierType<F>, misc: {
2574
2612
  fieldData: F;
2575
- }): QueryBuilderProps<GenericizeRuleGroupType<RG$1>, FullOption, FullOption, FullOption>;
2613
+ }): QueryBuilderProps<GenericizeRuleGroupType<RG>, FullOption, FullOption, FullOption>;
2576
2614
  /**
2577
2615
  * The return value of this function will be used to apply classnames to the
2578
2616
  * outer `<div>` of the given {@link Rule}.
@@ -2584,56 +2622,56 @@ type QueryBuilderProps<RG$1 extends RuleGroupTypeAny, F extends FullField, O ext
2584
2622
  * The return value of this function will be used to apply classnames to the
2585
2623
  * outer `<div>` of the given {@link RuleGroup}.
2586
2624
  */
2587
- getRuleGroupClassname?(ruleGroup: RG$1): Classname;
2625
+ getRuleGroupClassname?(ruleGroup: RG): Classname;
2588
2626
  /**
2589
2627
  * This callback is invoked before a new rule is added. The function should either manipulate
2590
2628
  * the rule and return the new object, return `true` to allow the addition to proceed as normal,
2591
2629
  * or return `false` to cancel the addition of the rule.
2592
2630
  */
2593
- onAddRule?(rule: R, parentPath: Path, query: RG$1, context?: any): RuleType | boolean;
2631
+ onAddRule?(rule: R, parentPath: Path, query: RG, context?: any): RuleType | boolean;
2594
2632
  /**
2595
2633
  * This callback is invoked before a new group is added. The function should either manipulate
2596
2634
  * the group and return the new object, return `true` to allow the addition to proceed as normal,
2597
2635
  * or return `false` to cancel the addition of the group.
2598
2636
  */
2599
- onAddGroup?(ruleGroup: RG$1, parentPath: Path, query: RG$1, context?: any): RG$1 | boolean;
2637
+ onAddGroup?(ruleGroup: RG, parentPath: Path, query: RG, context?: any): RG | boolean;
2600
2638
  /**
2601
2639
  * This callback is invoked before a rule is moved or shifted. The function should return
2602
2640
  * `true` to allow the move/shift to proceed as normal, `false` to cancel the move/shift, or
2603
2641
  * a new query object (presumably based on `query` or `nextQuery`) which will become the new
2604
2642
  * query state.
2605
2643
  */
2606
- onMoveRule?(rule: R, fromPath: Path, toPath: Path | "up" | "down", query: RG$1, nextQuery: RG$1, options: MoveOptions, context?: any): RG$1 | boolean;
2644
+ onMoveRule?(rule: R, fromPath: Path, toPath: Path | "up" | "down", query: RG, nextQuery: RG, options: MoveOptions, context?: any): RG | boolean;
2607
2645
  /**
2608
2646
  * This callback is invoked before a group is moved or shifted. The function should return
2609
2647
  * `true` to allow the move/shift to proceed as normal, `false` to cancel the move/shift, or
2610
2648
  * a new query object (presumably based on `query` or `nextQuery`) which will become the new
2611
2649
  * query state.
2612
2650
  */
2613
- onMoveGroup?(ruleGroup: RG$1, fromPath: Path, toPath: Path | "up" | "down", query: RG$1, nextQuery: RG$1, options: MoveOptions, context?: any): RG$1 | boolean;
2651
+ onMoveGroup?(ruleGroup: RG, fromPath: Path, toPath: Path | "up" | "down", query: RG, nextQuery: RG, options: MoveOptions, context?: any): RG | boolean;
2614
2652
  /**
2615
2653
  * This callback is invoked before a rule is grouped with another object. The function should
2616
2654
  * return `true` to allow the grouping to proceed as normal, `false` to cancel the grouping,
2617
2655
  * or a new query object (presumably based on `query` or `nextQuery`) which will become the new
2618
2656
  * query state.
2619
2657
  */
2620
- onGroupRule?(rule: R, fromPath: Path, toPath: Path, query: RG$1, nextQuery: RG$1, options: GroupOptions, context?: any): RG$1 | boolean;
2658
+ onGroupRule?(rule: R, fromPath: Path, toPath: Path, query: RG, nextQuery: RG, options: GroupOptions, context?: any): RG | boolean;
2621
2659
  /**
2622
2660
  * This callback is invoked before a group is grouped with another object. The function should
2623
2661
  * return `true` to allow the grouping to proceed as normal, `false` to cancel the grouping,
2624
2662
  * or a new query object (presumably based on `query` or `nextQuery`) which will become the new
2625
2663
  * query state.
2626
2664
  */
2627
- onGroupGroup?(ruleGroup: RG$1, fromPath: Path, toPath: Path, query: RG$1, nextQuery: RG$1, options: GroupOptions, context?: any): RG$1 | boolean;
2665
+ onGroupGroup?(ruleGroup: RG, fromPath: Path, toPath: Path, query: RG, nextQuery: RG, options: GroupOptions, context?: any): RG | boolean;
2628
2666
  /**
2629
2667
  * This callback is invoked before a rule or group is removed. The function should return
2630
2668
  * `true` if the rule or group should be removed or `false` if it should not be removed.
2631
2669
  */
2632
- onRemove?(ruleOrGroup: R | RG$1, path: Path, query: RG$1, context?: any): boolean;
2670
+ onRemove?(ruleOrGroup: R | RG, path: Path, query: RG, context?: any): boolean;
2633
2671
  /**
2634
2672
  * This callback is invoked anytime the query state is updated.
2635
2673
  */
2636
- onQueryChange?(query: RG$1): void;
2674
+ onQueryChange?(query: RG): void;
2637
2675
  /**
2638
2676
  * Each log object will be passed to this function when `debugMode` is `true`.
2639
2677
  *
@@ -25,13 +25,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
25
25
 
26
26
  //#endregion
27
27
  let __ant_design_icons = require("@ant-design/icons");
28
- __ant_design_icons = __toESM(__ant_design_icons);
29
28
  let react = require("react");
30
29
  react = __toESM(react);
31
30
  let react_querybuilder = require("react-querybuilder");
32
- react_querybuilder = __toESM(react_querybuilder);
33
31
  let antd = require("antd");
34
- antd = __toESM(antd);
35
32
  let antd_es_date_picker_generatePicker_index_js = require("antd/es/date-picker/generatePicker/index.js");
36
33
  antd_es_date_picker_generatePicker_index_js = __toESM(antd_es_date_picker_generatePicker_index_js);
37
34
  let dayjs = require("dayjs");
@@ -116,7 +113,9 @@ const AntDShiftActions = ({ shiftUp, shiftDown, shiftUpDisabled, shiftDownDisabl
116
113
  //#region ../../node_modules/rc-util/lib/warning.js
117
114
  var require_warning = /* @__PURE__ */ __commonJS({ "../../node_modules/rc-util/lib/warning.js": ((exports) => {
118
115
  Object.defineProperty(exports, "__esModule", { value: true });
116
+ exports.default = void 0;
119
117
  exports.noteOnce = noteOnce$1;
118
+ exports.preMessage = void 0;
120
119
  var warned = {};
121
120
  var preWarningFns = [];
122
121
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"react-querybuilder_antd.cjs.development.js","names":["Button","AntDDragHandle: React.ForwardRefExoticComponent<\n Omit<AntDDragHandleProps, 'ref'> & React.RefAttributes<HTMLSpanElement>\n>","HolderOutlined","Switch","Button","noteOnce","preMessage","customParseFormat","advancedFormat","weekday","localeData","weekOfYear","weekYear","localeMap: IlocaleMapObject","generateConfig: GenerateConfig<Dayjs>","dayjsGenerateConfig","InputNumber","Input","ValueEditor","Switch","Checkbox","Radio","React","Select","antdControlElements: ControlElementsProp<FullField, string>","antdTranslations: Partial<Translations>","CloseOutlined","CopyOutlined","UnlockOutlined","LockOutlined","UpOutlined","DownOutlined","QueryBuilderAntD: QueryBuilderContextProvider"],"sources":["../../src/AntDActionElement.tsx","../../src/AntDDragHandle.tsx","../../src/AntDNotToggle.tsx","../../src/AntDShiftActions.tsx","../../../../node_modules/rc-util/lib/warning.js","../../src/dayjs.ts","../../src/AntDValueEditor.tsx","../../src/AntDValueSelector.tsx","../../src/index.tsx"],"sourcesContent":["import { Button } from 'antd';\nimport type { ComponentPropsWithoutRef } from 'react';\nimport * as React from 'react';\nimport type { ActionProps } from 'react-querybuilder';\n\n// TODO: This may be unnecessary. Find out if there's a way to allow\n// `data-${string}` index keys without breaking other type contraints.\ntype RemoveDataIndexKeys<T> = {\n [K in keyof T as `data-${string}` extends K ? never : K]: T[K];\n};\n\n/**\n * @group Props\n */\nexport interface AntDActionProps\n extends ActionProps,\n RemoveDataIndexKeys<ComponentPropsWithoutRef<typeof Button>> {}\n\n/**\n * @group Components\n */\nexport const AntDActionElement = ({\n className,\n handleOnClick,\n label,\n title,\n disabled,\n disabledTranslation,\n // Props that should not be in extraProps\n testID: _testID,\n level: _level,\n path: _path,\n context: _context,\n validation: _validation,\n ruleOrGroup: _ruleOrGroup,\n schema: _schema,\n ...extraProps\n}: AntDActionProps): React.JSX.Element => (\n <Button\n type=\"primary\"\n className={className}\n title={disabledTranslation && disabled ? disabledTranslation.title : title}\n onClick={e => handleOnClick(e)}\n disabled={disabled && !disabledTranslation}\n {...extraProps}>\n {disabledTranslation && disabled ? disabledTranslation.label : label}\n </Button>\n);\n","import { HolderOutlined } from '@ant-design/icons';\nimport type { ComponentPropsWithRef } from 'react';\nimport * as React from 'react';\nimport { forwardRef } from 'react';\nimport type { DragHandleProps } from 'react-querybuilder';\n\n/**\n * @group Props\n */\n// oxlint-disable-next-line typescript/no-explicit-any\nexport type AntDDragHandleProps = DragHandleProps & { label?: any } & ComponentPropsWithRef<\n typeof HolderOutlined\n >;\n\n/**\n * @group Components\n */\nexport const AntDDragHandle: React.ForwardRefExoticComponent<\n Omit<AntDDragHandleProps, 'ref'> & React.RefAttributes<HTMLSpanElement>\n> = forwardRef<HTMLSpanElement, AntDDragHandleProps>(\n (\n {\n className,\n title,\n // Props that should not be in extraProps\n testID: _testID,\n level: _level,\n path: _path,\n label: _label,\n disabled: _disabled,\n context: _context,\n validation: _validation,\n schema: _schema,\n ruleOrGroup: _ruleOrGroup,\n ...extraProps\n },\n dragRef\n ) => <HolderOutlined className={className} title={title} {...extraProps} ref={dragRef} />\n);\n","import { Switch } from 'antd';\nimport type { ComponentPropsWithoutRef } from 'react';\nimport * as React from 'react';\nimport type { NotToggleProps } from 'react-querybuilder';\n\n/**\n * @group Props\n */\nexport interface AntDNotToggleProps\n extends NotToggleProps,\n ComponentPropsWithoutRef<typeof Switch> {}\n\n/**\n * @group Components\n */\nexport const AntDNotToggle = ({\n className,\n handleOnChange,\n label,\n checked,\n title,\n disabled,\n // Props that should not be in extraProps\n path: _path,\n context: _context,\n validation: _validation,\n testID: _testID,\n schema: _schema,\n ruleGroup: _ruleGroup,\n ...extraProps\n}: AntDNotToggleProps): React.JSX.Element => (\n <Switch\n title={title}\n className={className}\n onChange={v => handleOnChange(v)}\n checked={!!checked}\n disabled={disabled}\n checkedChildren={label}\n unCheckedChildren=\"=\"\n {...extraProps}\n />\n);\n","import { Button } from 'antd';\nimport * as React from 'react';\nimport type { ShiftActionsProps } from 'react-querybuilder';\n\n/**\n * @group Components\n */\nexport const AntDShiftActions = ({\n shiftUp,\n shiftDown,\n shiftUpDisabled,\n shiftDownDisabled,\n disabled,\n className,\n labels,\n titles,\n testID,\n}: ShiftActionsProps): React.JSX.Element => (\n <div data-testid={testID} className={className}>\n <Button\n type=\"primary\"\n size=\"small\"\n title={titles?.shiftUp}\n onClick={shiftUp}\n disabled={disabled || shiftUpDisabled}>\n {labels?.shiftUp}\n </Button>\n <Button\n type=\"primary\"\n size=\"small\"\n title={titles?.shiftDown}\n onClick={shiftDown}\n disabled={disabled || shiftDownDisabled}>\n {labels?.shiftDown}\n </Button>\n </div>\n);\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.call = call;\nexports.default = void 0;\nexports.note = note;\nexports.noteOnce = noteOnce;\nexports.preMessage = void 0;\nexports.resetWarned = resetWarned;\nexports.warning = warning;\nexports.warningOnce = warningOnce;\n/* eslint-disable no-console */\nvar warned = {};\nvar preWarningFns = [];\n\n/**\n * Pre warning enable you to parse content before console.error.\n * Modify to null will prevent warning.\n */\nvar preMessage = exports.preMessage = function preMessage(fn) {\n preWarningFns.push(fn);\n};\n\n/**\n * Warning if condition not match.\n * @param valid Condition\n * @param message Warning message\n * @example\n * ```js\n * warning(false, 'some error'); // print some error\n * warning(true, 'some error'); // print nothing\n * warning(1 === 2, 'some error'); // print some error\n * ```\n */\nfunction warning(valid, message) {\n if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {\n var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {\n return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'warning');\n }, message);\n if (finalMessage) {\n console.error(\"Warning: \".concat(finalMessage));\n }\n }\n}\n\n/** @see Similar to {@link warning} */\nfunction note(valid, message) {\n if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {\n var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {\n return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'note');\n }, message);\n if (finalMessage) {\n console.warn(\"Note: \".concat(finalMessage));\n }\n }\n}\nfunction resetWarned() {\n warned = {};\n}\nfunction call(method, valid, message) {\n if (!valid && !warned[message]) {\n method(false, message);\n warned[message] = true;\n }\n}\n\n/** @see Same as {@link warning}, but only warn once for the same message */\nfunction warningOnce(valid, message) {\n call(warning, valid, message);\n}\n\n/** @see Same as {@link warning}, but only warn once for the same message */\nfunction noteOnce(valid, message) {\n call(note, valid, message);\n}\nwarningOnce.preMessage = preMessage;\nwarningOnce.resetWarned = resetWarned;\nwarningOnce.noteOnce = noteOnce;\nvar _default = exports.default = warningOnce;","/**\n * This file is adapted from the following sources:\n * - https://github.com/react-component/picker/blob/d526bd551778070be3295060f1b5841786cb9500/src/generate/dayjs.ts\n * - https://github.com/react-component/picker/blob/d526bd551778070be3295060f1b5841786cb9500/src/generate/index.ts\n */\n\nimport type { Dayjs } from 'dayjs';\nimport dayjs from 'dayjs';\nimport advancedFormat from 'dayjs/plugin/advancedFormat.js';\nimport customParseFormat from 'dayjs/plugin/customParseFormat.js';\nimport localeData from 'dayjs/plugin/localeData.js';\nimport weekOfYear from 'dayjs/plugin/weekOfYear.js';\nimport weekYear from 'dayjs/plugin/weekYear.js';\nimport weekday from 'dayjs/plugin/weekday.js';\nimport { noteOnce } from 'rc-util/lib/warning';\n\ntype GenerateConfig<DateType> = {\n // Get\n getWeekDay: (value: DateType) => number;\n getMillisecond: (value: DateType) => number;\n getSecond: (value: DateType) => number;\n getMinute: (value: DateType) => number;\n getHour: (value: DateType) => number;\n getDate: (value: DateType) => number;\n getMonth: (value: DateType) => number;\n getYear: (value: DateType) => number;\n getNow: () => DateType;\n getFixedDate: (fixed: string) => DateType;\n getEndDate: (value: DateType) => DateType;\n\n // Set\n addYear: (value: DateType, diff: number) => DateType;\n addMonth: (value: DateType, diff: number) => DateType;\n addDate: (value: DateType, diff: number) => DateType;\n setYear: (value: DateType, year: number) => DateType;\n setMonth: (value: DateType, month: number) => DateType;\n setDate: (value: DateType, date: number) => DateType;\n setHour: (value: DateType, hour: number) => DateType;\n setMinute: (value: DateType, minute: number) => DateType;\n setSecond: (value: DateType, second: number) => DateType;\n setMillisecond: (value: DateType, millisecond: number) => DateType;\n\n // Compare\n isAfter: (date1: DateType, date2: DateType) => boolean;\n isValidate: (date: DateType) => boolean;\n\n locale: {\n getWeekFirstDay: (locale: string) => number;\n getWeekFirstDate: (locale: string, value: DateType) => DateType;\n getWeek: (locale: string, value: DateType) => number;\n\n format: (locale: string, date: DateType, format: string) => string;\n\n /** Should only return validate date instance */\n parse: (locale: string, text: string, formats: string[]) => DateType | null;\n\n /** A proxy for getting locale with moment or other locale library */\n getShortWeekDays?: (locale: string) => string[];\n /** A proxy for getting locale with moment or other locale library */\n getShortMonths?: (locale: string) => string[];\n };\n};\n\ndayjs.extend(customParseFormat);\ndayjs.extend(advancedFormat);\ndayjs.extend(weekday);\ndayjs.extend(localeData);\ndayjs.extend(weekOfYear);\ndayjs.extend(weekYear);\n\ndayjs.extend((o, c) => {\n // todo support Wo (ISO week)\n const proto = c.prototype;\n const oldFormat = proto.format;\n proto.format = function f(formatStr: string) {\n const str = (formatStr || '').replace('Wo', 'wo');\n return oldFormat.bind(this)(str);\n };\n});\n\ntype IlocaleMapObject = Record<string, string>;\nconst localeMap: IlocaleMapObject = {\n // ar_EG:\n // az_AZ:\n // bg_BG:\n bn_BD: 'bn-bd',\n by_BY: 'be',\n // ca_ES:\n // cs_CZ:\n // da_DK:\n // de_DE:\n // el_GR:\n en_GB: 'en-gb',\n en_US: 'en',\n // es_ES:\n // et_EE:\n // fa_IR:\n // fi_FI:\n fr_BE: 'fr', // todo: dayjs has no fr_BE locale, use fr at present\n fr_CA: 'fr-ca',\n // fr_FR:\n // ga_IE:\n // gl_ES:\n // he_IL:\n // hi_IN:\n // hr_HR:\n // hu_HU:\n hy_AM: 'hy-am',\n // id_ID:\n // is_IS:\n // it_IT:\n // ja_JP:\n // ka_GE:\n // kk_KZ:\n // km_KH:\n kmr_IQ: 'ku',\n // kn_IN:\n // ko_KR:\n // ku_IQ: // previous ku in antd\n // lt_LT:\n // lv_LV:\n // mk_MK:\n // ml_IN:\n // mn_MN:\n // ms_MY:\n // nb_NO:\n // ne_NP:\n nl_BE: 'nl-be',\n // nl_NL:\n // pl_PL:\n pt_BR: 'pt-br',\n // pt_PT:\n // ro_RO:\n // ru_RU:\n // sk_SK:\n // sl_SI:\n // sr_RS:\n // sv_SE:\n // ta_IN:\n // th_TH:\n // tr_TR:\n // uk_UA:\n // ur_PK:\n // vi_VN:\n zh_CN: 'zh-cn',\n zh_HK: 'zh-hk',\n zh_TW: 'zh-tw',\n};\n\nconst parseLocale = (locale: string) => {\n const mapLocale = localeMap[locale];\n return mapLocale || locale.split('_')[0];\n};\n\nconst parseNoMatchNotice = () => {\n /* istanbul ignore next */\n noteOnce(false, 'Not match any format. Please help to fire a issue about this.');\n};\n\nconst generateConfig: GenerateConfig<Dayjs> = {\n // get\n getNow: () => dayjs(),\n getFixedDate: string => dayjs(string, ['YYYY-M-DD', 'YYYY-MM-DD']),\n getEndDate: date => date.endOf('month'),\n getWeekDay: date => {\n const clone = date.locale('en');\n return clone.weekday() + clone.localeData().firstDayOfWeek();\n },\n getYear: date => date.year(),\n getMonth: date => date.month(),\n getDate: date => date.date(),\n getHour: date => date.hour(),\n getMinute: date => date.minute(),\n getSecond: date => date.second(),\n getMillisecond: date => date.millisecond(),\n\n // set\n addYear: (date, diff) => date.add(diff, 'year'),\n addMonth: (date, diff) => date.add(diff, 'month'),\n addDate: (date, diff) => date.add(diff, 'day'),\n setYear: (date, year) => date.year(year),\n setMonth: (date, month) => date.month(month),\n setDate: (date, num) => date.date(num),\n setHour: (date, hour) => date.hour(hour),\n setMinute: (date, minute) => date.minute(minute),\n setSecond: (date, second) => date.second(second),\n setMillisecond: (date, milliseconds) => date.millisecond(milliseconds),\n\n // Compare\n isAfter: (date1, date2) => date1.isAfter(date2),\n isValidate: date => date.isValid(),\n\n locale: {\n getWeekFirstDay: locale => dayjs().locale(parseLocale(locale)).localeData().firstDayOfWeek(),\n getWeekFirstDate: (locale, date) => date.locale(parseLocale(locale)).weekday(0),\n getWeek: (locale, date) => date.locale(parseLocale(locale)).week(),\n getShortWeekDays: locale => dayjs().locale(parseLocale(locale)).localeData().weekdaysMin(),\n getShortMonths: locale => dayjs().locale(parseLocale(locale)).localeData().monthsShort(),\n format: (locale, date, format) => date.locale(parseLocale(locale)).format(format),\n parse: (locale, text, formats) => {\n const localeStr = parseLocale(locale);\n for (const format of formats) {\n const formatText = text;\n if (format.includes('wo') || format.includes('Wo')) {\n // parse Wo\n const year = formatText.split('-')[0];\n const weekStr = formatText.split('-')[1];\n const firstWeek = dayjs(year, 'YYYY').startOf('year').locale(localeStr);\n for (let j = 0; j <= 52; j += 1) {\n const nextWeek = firstWeek.add(j, 'week');\n if (nextWeek.format('Wo') === weekStr) {\n return nextWeek;\n }\n }\n parseNoMatchNotice();\n return null;\n }\n const date = dayjs(formatText, format, true).locale(localeStr);\n if (date.isValid()) {\n return date;\n }\n }\n\n if (text) {\n parseNoMatchNotice();\n }\n return null;\n },\n },\n};\n\nexport default generateConfig;\n","import { Checkbox, Input, InputNumber, Radio, Switch } from 'antd';\nimport generatePicker from 'antd/es/date-picker/generatePicker/index.js';\nimport type { Dayjs } from 'dayjs';\nimport dayjs from 'dayjs';\nimport * as React from 'react';\nimport type { ValueEditorProps } from 'react-querybuilder';\nimport { joinWith, useValueEditor, ValueEditor } from 'react-querybuilder';\nimport dayjsGenerateConfig from './dayjs';\n\n/**\n * @group Props\n */\nexport interface AntDValueEditorProps extends ValueEditorProps {\n extraProps?: Record<string, unknown>;\n}\n\nconst DatePicker = generatePicker(dayjsGenerateConfig);\n\n/**\n * @group Components\n */\nexport const AntDValueEditor = (allProps: AntDValueEditorProps): React.JSX.Element | null => {\n const {\n fieldData,\n operator,\n value,\n handleOnChange,\n title,\n className,\n type,\n inputType,\n values = [],\n listsAsArrays,\n separator,\n valueSource: _vs,\n disabled,\n testID,\n selectorComponent: SelectorComponent = allProps.schema.controls.valueSelector,\n extraProps,\n parseNumbers: _parseNumbers,\n ...propsForValueSelector\n } = allProps;\n\n const {\n valueAsArray,\n multiValueHandler,\n bigIntValueHandler,\n valueListItemClassName,\n inputTypeCoerced,\n } = useValueEditor(allProps);\n\n if (operator === 'null' || operator === 'notNull') {\n return null;\n }\n\n const placeHolderText = fieldData?.placeholder ?? '';\n\n if (\n (operator === 'between' || operator === 'notBetween') &&\n (type === 'select' || type === 'text') &&\n // Date ranges are handled differently in AntD--see below\n inputTypeCoerced !== 'date' &&\n inputTypeCoerced !== 'datetime-local'\n ) {\n if (type === 'text') {\n const editors = ['from', 'to'].map((key, i) => {\n if (inputTypeCoerced === 'time') {\n return (\n <DatePicker.TimePicker\n key={key}\n value={valueAsArray[i] ? dayjs(valueAsArray[i], 'HH:mm:ss') : null}\n className={valueListItemClassName}\n disabled={disabled}\n placeholder={placeHolderText}\n onChange={d => multiValueHandler(d?.format('HH:mm:ss') ?? '', i)}\n {...extraProps}\n />\n );\n } else if (inputTypeCoerced === 'number') {\n return (\n <InputNumber\n key={key}\n type={inputTypeCoerced}\n value={valueAsArray[i] ?? ''}\n className={valueListItemClassName}\n disabled={disabled}\n placeholder={placeHolderText}\n onChange={v => multiValueHandler(v, i)}\n {...extraProps}\n />\n );\n }\n return (\n <Input\n key={key}\n type={inputTypeCoerced}\n value={valueAsArray[i] ?? ''}\n className={valueListItemClassName}\n disabled={disabled}\n placeholder={placeHolderText}\n onChange={e => multiValueHandler(e.target.value, i)}\n {...extraProps}\n />\n );\n });\n return (\n <span data-testid={testID} className={className} title={title}>\n {editors[0]}\n {separator}\n {editors[1]}\n </span>\n );\n }\n\n return <ValueEditor {...allProps} skipHook />;\n }\n\n switch (type) {\n case 'select':\n case 'multiselect':\n return (\n <SelectorComponent\n {...propsForValueSelector}\n className={className}\n title={title}\n value={value}\n disabled={disabled}\n listsAsArrays={listsAsArrays}\n multiple={type === 'multiselect'}\n handleOnChange={handleOnChange}\n options={values}\n {...extraProps}\n />\n );\n\n case 'textarea':\n return (\n <Input.TextArea\n value={value}\n title={title}\n className={className}\n disabled={disabled}\n placeholder={placeHolderText}\n onChange={e => handleOnChange(e.target.value)}\n {...extraProps}\n />\n );\n\n case 'switch':\n return (\n <Switch\n checked={!!value}\n title={title}\n className={className}\n disabled={disabled}\n onChange={v => handleOnChange(v)}\n {...extraProps}\n />\n );\n\n case 'checkbox':\n return (\n <span title={title} className={className}>\n <Checkbox\n type=\"checkbox\"\n disabled={disabled}\n onChange={e => handleOnChange(e.target.checked)}\n checked={!!value}\n {...extraProps}\n />\n </span>\n );\n\n case 'radio':\n return (\n <span className={className} title={title}>\n {values.map(v => (\n <Radio\n key={v.name}\n value={v.name}\n checked={value === v.name}\n disabled={disabled}\n onChange={e => handleOnChange(e.target.value)}\n {...extraProps}>\n {v.label}\n </Radio>\n ))}\n </span>\n );\n }\n\n switch (inputTypeCoerced) {\n case 'date':\n case 'datetime-local': {\n if (operator === 'between' || operator === 'notBetween') {\n // oxlint-disable-next-line typescript/no-explicit-any\n const dayjsArray = valueAsArray.slice(0, 2).map((v: any) => dayjs(v)) as [Dayjs, Dayjs];\n return (\n <DatePicker.RangePicker\n value={dayjsArray.every(d => d.isValid()) ? dayjsArray : undefined}\n showTime={inputTypeCoerced === 'datetime-local'}\n className={className}\n disabled={disabled}\n placeholder={[placeHolderText, placeHolderText]}\n // TODO: the function below is currently untested (see the\n // \"renders a date range picker\" test in ./AntD.test.tsx)\n onChange={\n // istanbul ignore next\n dates => {\n const timeFormat = inputTypeCoerced === 'datetime-local' ? 'THH:mm:ss' : '';\n const format = `YYYY-MM-DD${timeFormat}`;\n const dateArray = dates?.map(d => (d?.isValid() ? d.format(format) : undefined));\n handleOnChange(\n dateArray ? (listsAsArrays ? dateArray : joinWith(dateArray, ',')) : dates\n );\n }\n }\n {...extraProps}\n />\n );\n }\n\n const dateValue = dayjs(value);\n return (\n <DatePicker\n value={dateValue.isValid() ? dateValue : undefined}\n showTime={inputTypeCoerced === 'datetime-local'}\n className={className}\n disabled={disabled}\n placeholder={placeHolderText}\n onChange={(_d, dateString) => handleOnChange(dateString)}\n {...extraProps}\n />\n );\n }\n\n case 'time': {\n const dateValue = dayjs(value, 'HH:mm:ss');\n return (\n <DatePicker.TimePicker\n value={dateValue.isValid() ? dateValue : undefined}\n className={className}\n disabled={disabled}\n placeholder={placeHolderText}\n onChange={d => handleOnChange(d?.format('HH:mm:ss') ?? '')}\n {...extraProps}\n />\n );\n }\n\n case 'number': {\n return (\n <InputNumber\n type={inputTypeCoerced}\n value={value}\n title={title}\n className={className}\n disabled={disabled}\n placeholder={placeHolderText}\n onChange={handleOnChange}\n {...extraProps}\n />\n );\n }\n }\n\n if (inputType === 'bigint') {\n return (\n <Input\n data-testid={testID}\n type={inputTypeCoerced}\n placeholder={placeHolderText}\n value={`${value}`}\n title={title}\n className={className}\n disabled={disabled}\n onChange={e => bigIntValueHandler(e.target.value)}\n {...extraProps}\n />\n );\n }\n\n return (\n <Input\n type={inputTypeCoerced}\n value={value}\n title={title}\n className={className}\n disabled={disabled}\n placeholder={placeHolderText}\n onChange={e => handleOnChange(e.target.value)}\n {...extraProps}\n />\n );\n};\n","import { Select } from 'antd';\nimport type { ComponentPropsWithoutRef } from 'react';\nimport * as React from 'react';\nimport type { VersatileSelectorProps } from 'react-querybuilder';\nimport { joinWith, useValueSelector } from 'react-querybuilder';\n\n/**\n * @group Props\n */\nexport type AntDValueSelectorProps = VersatileSelectorProps &\n Omit<ComponentPropsWithoutRef<typeof Select>, 'onChange' | 'defaultValue'>;\n\n/**\n * @group Components\n */\nexport const AntDValueSelector = ({\n className,\n handleOnChange,\n options,\n value,\n title,\n disabled,\n multiple,\n listsAsArrays,\n // Props that should not be in extraProps\n testID: _testID,\n rule: _rule,\n ruleGroup: _ruleGroup,\n rules: _rules,\n level: _level,\n path: _path,\n context: _context,\n validation: _validation,\n operator: _operator,\n field: _field,\n fieldData: _fieldData,\n schema: _schema,\n ...extraProps\n}: AntDValueSelectorProps): React.JSX.Element => {\n // Alternate onChange handler that doesn't use arrays even when `multiple` is true\n const { onChange: onChangeNoArrays } = useValueSelector({\n handleOnChange,\n listsAsArrays: false,\n multiple: false,\n value,\n });\n const { onChange: onChangeNormal, val } = useValueSelector({\n handleOnChange,\n // This forces `val` to be an array if `multiple` is true,\n // even if `listsAsArrays` is false\n listsAsArrays: multiple || listsAsArrays,\n multiple,\n value,\n });\n\n const onChange = React.useCallback(\n (v: string | string[]) => {\n if (multiple && !listsAsArrays && Array.isArray(v)) {\n // `multiple: true` means `v` is probably an array, but we don't want\n // to send an array to `handleOnChange` when `listsAsArrays` is false\n onChangeNoArrays(joinWith(v));\n } else {\n onChangeNormal(v);\n }\n },\n [listsAsArrays, multiple, onChangeNoArrays, onChangeNormal]\n );\n\n return (\n <Select\n {...(multiple ? { mode: 'multiple', allowClear: true } : {})}\n title={title}\n className={className}\n popupMatchSelectWidth={false}\n disabled={disabled}\n value={val}\n onChange={onChange}\n optionFilterProp=\"label\"\n options={options}\n {...extraProps}\n />\n );\n};\n","import {\n CloseOutlined,\n CopyOutlined,\n DownOutlined,\n LockOutlined,\n UnlockOutlined,\n UpOutlined,\n} from '@ant-design/icons';\nimport * as React from 'react';\nimport type {\n ControlElementsProp,\n FullField,\n QueryBuilderContextProvider,\n Translations,\n} from 'react-querybuilder';\nimport { getCompatContextProvider } from 'react-querybuilder';\nimport { AntDActionElement } from './AntDActionElement';\nimport { AntDDragHandle } from './AntDDragHandle';\nimport { AntDNotToggle } from './AntDNotToggle';\nimport { AntDShiftActions } from './AntDShiftActions';\nimport { AntDValueEditor } from './AntDValueEditor';\nimport { AntDValueSelector } from './AntDValueSelector';\n\nexport * from './AntDActionElement';\nexport * from './AntDDragHandle';\nexport * from './AntDNotToggle';\nexport * from './AntDShiftActions';\nexport * from './AntDValueEditor';\nexport * from './AntDValueSelector';\n\n/**\n * @group Props\n */\nexport const antdControlElements: ControlElementsProp<FullField, string> = {\n actionElement: AntDActionElement,\n dragHandle: AntDDragHandle,\n notToggle: AntDNotToggle,\n shiftActions: AntDShiftActions,\n valueEditor: AntDValueEditor,\n valueSelector: AntDValueSelector,\n};\n\n/**\n * @group Props\n */\nexport const antdTranslations: Partial<Translations> = {\n removeGroup: { label: <CloseOutlined /> },\n removeRule: { label: <CloseOutlined /> },\n cloneRule: { label: <CopyOutlined /> },\n cloneRuleGroup: { label: <CopyOutlined /> },\n lockGroup: { label: <UnlockOutlined /> },\n lockRule: { label: <UnlockOutlined /> },\n lockGroupDisabled: { label: <LockOutlined /> },\n lockRuleDisabled: { label: <LockOutlined /> },\n shiftActionUp: { label: <UpOutlined /> },\n shiftActionDown: { label: <DownOutlined /> },\n};\n\n/**\n * @group Components\n */\nexport const QueryBuilderAntD: QueryBuilderContextProvider = getCompatContextProvider({\n controlElements: antdControlElements,\n translations: antdTranslations,\n});\n"],"x_google_ignoreList":[4],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAa,qBAAqB,EAChC,WACA,eACA,OACA,OACA,UACA,qBAEA,QAAQ,SACR,OAAO,QACP,MAAM,OACN,SAAS,UACT,YAAY,aACZ,aAAa,cACb,QAAQ,QACR,GAAG,iBAEH,oCAACA;CACC,MAAK;CACM;CACX,OAAO,uBAAuB,WAAW,oBAAoB,QAAQ;CACrE,UAAS,MAAK,cAAc,EAAE;CAC9B,UAAU,YAAY,CAAC;CACvB,GAAI;GACH,uBAAuB,WAAW,oBAAoB,QAAQ,MACxD;;;;;;;AC7BX,MAAaC,wCAIT,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ACC,GAAK,WAAW;GAAE,MAAM;GAAY,YAAY;GAAM,GAAG,EAAE;EACpD;EACI;EACX,uBAAuB;EACb;EACV,OAAO;EACG;EACV,kBAAiB;EACR;EACT,GAAI;GACJ;;;;;;;;AC/CN,MAAaC,sBAA8D;CACzE,eAAe;CACf,YAAY;CACZ,WAAW;CACX,cAAc;CACd,aAAa;CACb,eAAe;CAChB;;;;AAKD,MAAaC,mBAA0C;CACrD,aAAa,EAAE,OAAO,oCAACC,uCAAgB,EAAE;CACzC,YAAY,EAAE,OAAO,oCAACA,uCAAgB,EAAE;CACxC,WAAW,EAAE,OAAO,oCAACC,sCAAe,EAAE;CACtC,gBAAgB,EAAE,OAAO,oCAACA,sCAAe,EAAE;CAC3C,WAAW,EAAE,OAAO,oCAACC,wCAAiB,EAAE;CACxC,UAAU,EAAE,OAAO,oCAACA,wCAAiB,EAAE;CACvC,mBAAmB,EAAE,OAAO,oCAACC,sCAAe,EAAE;CAC9C,kBAAkB,EAAE,OAAO,oCAACA,sCAAe,EAAE;CAC7C,eAAe,EAAE,OAAO,oCAACC,oCAAa,EAAE;CACxC,iBAAiB,EAAE,OAAO,oCAACC,sCAAe,EAAE;CAC7C;;;;AAKD,MAAaC,oEAAyE;CACpF,iBAAiB;CACjB,cAAc;CACf,CAAC"}
1
+ {"version":3,"file":"react-querybuilder_antd.cjs.development.js","names":["Button","AntDDragHandle: React.ForwardRefExoticComponent<\n Omit<AntDDragHandleProps, 'ref'> & React.RefAttributes<HTMLSpanElement>\n>","HolderOutlined","Switch","Button","noteOnce","preMessage","customParseFormat","advancedFormat","weekday","localeData","weekOfYear","weekYear","localeMap: IlocaleMapObject","generateConfig: GenerateConfig<Dayjs>","dayjsGenerateConfig","InputNumber","Input","ValueEditor","Switch","Checkbox","Radio","React","Select","antdControlElements: ControlElementsProp<FullField, string>","antdTranslations: Partial<Translations>","CloseOutlined","CopyOutlined","UnlockOutlined","LockOutlined","UpOutlined","DownOutlined","QueryBuilderAntD: QueryBuilderContextProvider"],"sources":["../../src/AntDActionElement.tsx","../../src/AntDDragHandle.tsx","../../src/AntDNotToggle.tsx","../../src/AntDShiftActions.tsx","../../../../node_modules/rc-util/lib/warning.js","../../src/dayjs.ts","../../src/AntDValueEditor.tsx","../../src/AntDValueSelector.tsx","../../src/index.tsx"],"sourcesContent":["import { Button } from 'antd';\nimport type { ComponentPropsWithoutRef } from 'react';\nimport * as React from 'react';\nimport type { ActionProps } from 'react-querybuilder';\n\n// TODO: This may be unnecessary. Find out if there's a way to allow\n// `data-${string}` index keys without breaking other type contraints.\ntype RemoveDataIndexKeys<T> = {\n [K in keyof T as `data-${string}` extends K ? never : K]: T[K];\n};\n\n/**\n * @group Props\n */\nexport interface AntDActionProps\n extends ActionProps,\n RemoveDataIndexKeys<ComponentPropsWithoutRef<typeof Button>> {}\n\n/**\n * @group Components\n */\nexport const AntDActionElement = ({\n className,\n handleOnClick,\n label,\n title,\n disabled,\n disabledTranslation,\n // Props that should not be in extraProps\n testID: _testID,\n level: _level,\n path: _path,\n context: _context,\n validation: _validation,\n ruleOrGroup: _ruleOrGroup,\n schema: _schema,\n ...extraProps\n}: AntDActionProps): React.JSX.Element => (\n <Button\n type=\"primary\"\n className={className}\n title={disabledTranslation && disabled ? disabledTranslation.title : title}\n onClick={e => handleOnClick(e)}\n disabled={disabled && !disabledTranslation}\n {...extraProps}>\n {disabledTranslation && disabled ? disabledTranslation.label : label}\n </Button>\n);\n","import { HolderOutlined } from '@ant-design/icons';\nimport type { ComponentPropsWithRef } from 'react';\nimport * as React from 'react';\nimport { forwardRef } from 'react';\nimport type { DragHandleProps } from 'react-querybuilder';\n\n/**\n * @group Props\n */\n// oxlint-disable-next-line typescript/no-explicit-any\nexport type AntDDragHandleProps = DragHandleProps & { label?: any } & ComponentPropsWithRef<\n typeof HolderOutlined\n >;\n\n/**\n * @group Components\n */\nexport const AntDDragHandle: React.ForwardRefExoticComponent<\n Omit<AntDDragHandleProps, 'ref'> & React.RefAttributes<HTMLSpanElement>\n> = forwardRef<HTMLSpanElement, AntDDragHandleProps>(\n (\n {\n className,\n title,\n // Props that should not be in extraProps\n testID: _testID,\n level: _level,\n path: _path,\n label: _label,\n disabled: _disabled,\n context: _context,\n validation: _validation,\n schema: _schema,\n ruleOrGroup: _ruleOrGroup,\n ...extraProps\n },\n dragRef\n ) => <HolderOutlined className={className} title={title} {...extraProps} ref={dragRef} />\n);\n","import { Switch } from 'antd';\nimport type { ComponentPropsWithoutRef } from 'react';\nimport * as React from 'react';\nimport type { NotToggleProps } from 'react-querybuilder';\n\n/**\n * @group Props\n */\nexport interface AntDNotToggleProps\n extends NotToggleProps,\n ComponentPropsWithoutRef<typeof Switch> {}\n\n/**\n * @group Components\n */\nexport const AntDNotToggle = ({\n className,\n handleOnChange,\n label,\n checked,\n title,\n disabled,\n // Props that should not be in extraProps\n path: _path,\n context: _context,\n validation: _validation,\n testID: _testID,\n schema: _schema,\n ruleGroup: _ruleGroup,\n ...extraProps\n}: AntDNotToggleProps): React.JSX.Element => (\n <Switch\n title={title}\n className={className}\n onChange={v => handleOnChange(v)}\n checked={!!checked}\n disabled={disabled}\n checkedChildren={label}\n unCheckedChildren=\"=\"\n {...extraProps}\n />\n);\n","import { Button } from 'antd';\nimport * as React from 'react';\nimport type { ShiftActionsProps } from 'react-querybuilder';\n\n/**\n * @group Components\n */\nexport const AntDShiftActions = ({\n shiftUp,\n shiftDown,\n shiftUpDisabled,\n shiftDownDisabled,\n disabled,\n className,\n labels,\n titles,\n testID,\n}: ShiftActionsProps): React.JSX.Element => (\n <div data-testid={testID} className={className}>\n <Button\n type=\"primary\"\n size=\"small\"\n title={titles?.shiftUp}\n onClick={shiftUp}\n disabled={disabled || shiftUpDisabled}>\n {labels?.shiftUp}\n </Button>\n <Button\n type=\"primary\"\n size=\"small\"\n title={titles?.shiftDown}\n onClick={shiftDown}\n disabled={disabled || shiftDownDisabled}>\n {labels?.shiftDown}\n </Button>\n </div>\n);\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.call = call;\nexports.default = void 0;\nexports.note = note;\nexports.noteOnce = noteOnce;\nexports.preMessage = void 0;\nexports.resetWarned = resetWarned;\nexports.warning = warning;\nexports.warningOnce = warningOnce;\n/* eslint-disable no-console */\nvar warned = {};\nvar preWarningFns = [];\n\n/**\n * Pre warning enable you to parse content before console.error.\n * Modify to null will prevent warning.\n */\nvar preMessage = exports.preMessage = function preMessage(fn) {\n preWarningFns.push(fn);\n};\n\n/**\n * Warning if condition not match.\n * @param valid Condition\n * @param message Warning message\n * @example\n * ```js\n * warning(false, 'some error'); // print some error\n * warning(true, 'some error'); // print nothing\n * warning(1 === 2, 'some error'); // print some error\n * ```\n */\nfunction warning(valid, message) {\n if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {\n var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {\n return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'warning');\n }, message);\n if (finalMessage) {\n console.error(\"Warning: \".concat(finalMessage));\n }\n }\n}\n\n/** @see Similar to {@link warning} */\nfunction note(valid, message) {\n if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {\n var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {\n return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'note');\n }, message);\n if (finalMessage) {\n console.warn(\"Note: \".concat(finalMessage));\n }\n }\n}\nfunction resetWarned() {\n warned = {};\n}\nfunction call(method, valid, message) {\n if (!valid && !warned[message]) {\n method(false, message);\n warned[message] = true;\n }\n}\n\n/** @see Same as {@link warning}, but only warn once for the same message */\nfunction warningOnce(valid, message) {\n call(warning, valid, message);\n}\n\n/** @see Same as {@link warning}, but only warn once for the same message */\nfunction noteOnce(valid, message) {\n call(note, valid, message);\n}\nwarningOnce.preMessage = preMessage;\nwarningOnce.resetWarned = resetWarned;\nwarningOnce.noteOnce = noteOnce;\nvar _default = exports.default = warningOnce;","/**\n * This file is adapted from the following sources:\n * - https://github.com/react-component/picker/blob/d526bd551778070be3295060f1b5841786cb9500/src/generate/dayjs.ts\n * - https://github.com/react-component/picker/blob/d526bd551778070be3295060f1b5841786cb9500/src/generate/index.ts\n */\n\nimport type { Dayjs } from 'dayjs';\nimport dayjs from 'dayjs';\nimport advancedFormat from 'dayjs/plugin/advancedFormat.js';\nimport customParseFormat from 'dayjs/plugin/customParseFormat.js';\nimport localeData from 'dayjs/plugin/localeData.js';\nimport weekOfYear from 'dayjs/plugin/weekOfYear.js';\nimport weekYear from 'dayjs/plugin/weekYear.js';\nimport weekday from 'dayjs/plugin/weekday.js';\nimport { noteOnce } from 'rc-util/lib/warning';\n\ntype GenerateConfig<DateType> = {\n // Get\n getWeekDay: (value: DateType) => number;\n getMillisecond: (value: DateType) => number;\n getSecond: (value: DateType) => number;\n getMinute: (value: DateType) => number;\n getHour: (value: DateType) => number;\n getDate: (value: DateType) => number;\n getMonth: (value: DateType) => number;\n getYear: (value: DateType) => number;\n getNow: () => DateType;\n getFixedDate: (fixed: string) => DateType;\n getEndDate: (value: DateType) => DateType;\n\n // Set\n addYear: (value: DateType, diff: number) => DateType;\n addMonth: (value: DateType, diff: number) => DateType;\n addDate: (value: DateType, diff: number) => DateType;\n setYear: (value: DateType, year: number) => DateType;\n setMonth: (value: DateType, month: number) => DateType;\n setDate: (value: DateType, date: number) => DateType;\n setHour: (value: DateType, hour: number) => DateType;\n setMinute: (value: DateType, minute: number) => DateType;\n setSecond: (value: DateType, second: number) => DateType;\n setMillisecond: (value: DateType, millisecond: number) => DateType;\n\n // Compare\n isAfter: (date1: DateType, date2: DateType) => boolean;\n isValidate: (date: DateType) => boolean;\n\n locale: {\n getWeekFirstDay: (locale: string) => number;\n getWeekFirstDate: (locale: string, value: DateType) => DateType;\n getWeek: (locale: string, value: DateType) => number;\n\n format: (locale: string, date: DateType, format: string) => string;\n\n /** Should only return validate date instance */\n parse: (locale: string, text: string, formats: string[]) => DateType | null;\n\n /** A proxy for getting locale with moment or other locale library */\n getShortWeekDays?: (locale: string) => string[];\n /** A proxy for getting locale with moment or other locale library */\n getShortMonths?: (locale: string) => string[];\n };\n};\n\ndayjs.extend(customParseFormat);\ndayjs.extend(advancedFormat);\ndayjs.extend(weekday);\ndayjs.extend(localeData);\ndayjs.extend(weekOfYear);\ndayjs.extend(weekYear);\n\ndayjs.extend((o, c) => {\n // todo support Wo (ISO week)\n const proto = c.prototype;\n const oldFormat = proto.format;\n proto.format = function f(formatStr: string) {\n const str = (formatStr || '').replace('Wo', 'wo');\n return oldFormat.bind(this)(str);\n };\n});\n\ntype IlocaleMapObject = Record<string, string>;\nconst localeMap: IlocaleMapObject = {\n // ar_EG:\n // az_AZ:\n // bg_BG:\n bn_BD: 'bn-bd',\n by_BY: 'be',\n // ca_ES:\n // cs_CZ:\n // da_DK:\n // de_DE:\n // el_GR:\n en_GB: 'en-gb',\n en_US: 'en',\n // es_ES:\n // et_EE:\n // fa_IR:\n // fi_FI:\n fr_BE: 'fr', // todo: dayjs has no fr_BE locale, use fr at present\n fr_CA: 'fr-ca',\n // fr_FR:\n // ga_IE:\n // gl_ES:\n // he_IL:\n // hi_IN:\n // hr_HR:\n // hu_HU:\n hy_AM: 'hy-am',\n // id_ID:\n // is_IS:\n // it_IT:\n // ja_JP:\n // ka_GE:\n // kk_KZ:\n // km_KH:\n kmr_IQ: 'ku',\n // kn_IN:\n // ko_KR:\n // ku_IQ: // previous ku in antd\n // lt_LT:\n // lv_LV:\n // mk_MK:\n // ml_IN:\n // mn_MN:\n // ms_MY:\n // nb_NO:\n // ne_NP:\n nl_BE: 'nl-be',\n // nl_NL:\n // pl_PL:\n pt_BR: 'pt-br',\n // pt_PT:\n // ro_RO:\n // ru_RU:\n // sk_SK:\n // sl_SI:\n // sr_RS:\n // sv_SE:\n // ta_IN:\n // th_TH:\n // tr_TR:\n // uk_UA:\n // ur_PK:\n // vi_VN:\n zh_CN: 'zh-cn',\n zh_HK: 'zh-hk',\n zh_TW: 'zh-tw',\n};\n\nconst parseLocale = (locale: string) => {\n const mapLocale = localeMap[locale];\n return mapLocale || locale.split('_')[0];\n};\n\nconst parseNoMatchNotice = () => {\n /* istanbul ignore next */\n noteOnce(false, 'Not match any format. Please help to fire a issue about this.');\n};\n\nconst generateConfig: GenerateConfig<Dayjs> = {\n // get\n getNow: () => dayjs(),\n getFixedDate: string => dayjs(string, ['YYYY-M-DD', 'YYYY-MM-DD']),\n getEndDate: date => date.endOf('month'),\n getWeekDay: date => {\n const clone = date.locale('en');\n return clone.weekday() + clone.localeData().firstDayOfWeek();\n },\n getYear: date => date.year(),\n getMonth: date => date.month(),\n getDate: date => date.date(),\n getHour: date => date.hour(),\n getMinute: date => date.minute(),\n getSecond: date => date.second(),\n getMillisecond: date => date.millisecond(),\n\n // set\n addYear: (date, diff) => date.add(diff, 'year'),\n addMonth: (date, diff) => date.add(diff, 'month'),\n addDate: (date, diff) => date.add(diff, 'day'),\n setYear: (date, year) => date.year(year),\n setMonth: (date, month) => date.month(month),\n setDate: (date, num) => date.date(num),\n setHour: (date, hour) => date.hour(hour),\n setMinute: (date, minute) => date.minute(minute),\n setSecond: (date, second) => date.second(second),\n setMillisecond: (date, milliseconds) => date.millisecond(milliseconds),\n\n // Compare\n isAfter: (date1, date2) => date1.isAfter(date2),\n isValidate: date => date.isValid(),\n\n locale: {\n getWeekFirstDay: locale => dayjs().locale(parseLocale(locale)).localeData().firstDayOfWeek(),\n getWeekFirstDate: (locale, date) => date.locale(parseLocale(locale)).weekday(0),\n getWeek: (locale, date) => date.locale(parseLocale(locale)).week(),\n getShortWeekDays: locale => dayjs().locale(parseLocale(locale)).localeData().weekdaysMin(),\n getShortMonths: locale => dayjs().locale(parseLocale(locale)).localeData().monthsShort(),\n format: (locale, date, format) => date.locale(parseLocale(locale)).format(format),\n parse: (locale, text, formats) => {\n const localeStr = parseLocale(locale);\n for (const format of formats) {\n const formatText = text;\n if (format.includes('wo') || format.includes('Wo')) {\n // parse Wo\n const year = formatText.split('-')[0];\n const weekStr = formatText.split('-')[1];\n const firstWeek = dayjs(year, 'YYYY').startOf('year').locale(localeStr);\n for (let j = 0; j <= 52; j += 1) {\n const nextWeek = firstWeek.add(j, 'week');\n if (nextWeek.format('Wo') === weekStr) {\n return nextWeek;\n }\n }\n parseNoMatchNotice();\n return null;\n }\n const date = dayjs(formatText, format, true).locale(localeStr);\n if (date.isValid()) {\n return date;\n }\n }\n\n if (text) {\n parseNoMatchNotice();\n }\n return null;\n },\n },\n};\n\nexport default generateConfig;\n","import { Checkbox, Input, InputNumber, Radio, Switch } from 'antd';\nimport generatePicker from 'antd/es/date-picker/generatePicker/index.js';\nimport type { Dayjs } from 'dayjs';\nimport dayjs from 'dayjs';\nimport * as React from 'react';\nimport type { ValueEditorProps } from 'react-querybuilder';\nimport { joinWith, useValueEditor, ValueEditor } from 'react-querybuilder';\nimport dayjsGenerateConfig from './dayjs';\n\n/**\n * @group Props\n */\nexport interface AntDValueEditorProps extends ValueEditorProps {\n extraProps?: Record<string, unknown>;\n}\n\nconst DatePicker = generatePicker(dayjsGenerateConfig);\n\n/**\n * @group Components\n */\nexport const AntDValueEditor = (allProps: AntDValueEditorProps): React.JSX.Element | null => {\n const {\n fieldData,\n operator,\n value,\n handleOnChange,\n title,\n className,\n type,\n inputType,\n values = [],\n listsAsArrays,\n separator,\n valueSource: _vs,\n disabled,\n testID,\n selectorComponent: SelectorComponent = allProps.schema.controls.valueSelector,\n extraProps,\n parseNumbers: _parseNumbers,\n ...propsForValueSelector\n } = allProps;\n\n const {\n valueAsArray,\n multiValueHandler,\n bigIntValueHandler,\n valueListItemClassName,\n inputTypeCoerced,\n } = useValueEditor(allProps);\n\n if (operator === 'null' || operator === 'notNull') {\n return null;\n }\n\n const placeHolderText = fieldData?.placeholder ?? '';\n\n if (\n (operator === 'between' || operator === 'notBetween') &&\n (type === 'select' || type === 'text') &&\n // Date ranges are handled differently in AntD--see below\n inputTypeCoerced !== 'date' &&\n inputTypeCoerced !== 'datetime-local'\n ) {\n if (type === 'text') {\n const editors = ['from', 'to'].map((key, i) => {\n if (inputTypeCoerced === 'time') {\n return (\n <DatePicker.TimePicker\n key={key}\n value={valueAsArray[i] ? dayjs(valueAsArray[i], 'HH:mm:ss') : null}\n className={valueListItemClassName}\n disabled={disabled}\n placeholder={placeHolderText}\n onChange={d => multiValueHandler(d?.format('HH:mm:ss') ?? '', i)}\n {...extraProps}\n />\n );\n } else if (inputTypeCoerced === 'number') {\n return (\n <InputNumber\n key={key}\n type={inputTypeCoerced}\n value={valueAsArray[i] ?? ''}\n className={valueListItemClassName}\n disabled={disabled}\n placeholder={placeHolderText}\n onChange={v => multiValueHandler(v, i)}\n {...extraProps}\n />\n );\n }\n return (\n <Input\n key={key}\n type={inputTypeCoerced}\n value={valueAsArray[i] ?? ''}\n className={valueListItemClassName}\n disabled={disabled}\n placeholder={placeHolderText}\n onChange={e => multiValueHandler(e.target.value, i)}\n {...extraProps}\n />\n );\n });\n return (\n <span data-testid={testID} className={className} title={title}>\n {editors[0]}\n {separator}\n {editors[1]}\n </span>\n );\n }\n\n return <ValueEditor {...allProps} skipHook />;\n }\n\n switch (type) {\n case 'select':\n case 'multiselect':\n return (\n <SelectorComponent\n {...propsForValueSelector}\n className={className}\n title={title}\n value={value}\n disabled={disabled}\n listsAsArrays={listsAsArrays}\n multiple={type === 'multiselect'}\n handleOnChange={handleOnChange}\n options={values}\n {...extraProps}\n />\n );\n\n case 'textarea':\n return (\n <Input.TextArea\n value={value}\n title={title}\n className={className}\n disabled={disabled}\n placeholder={placeHolderText}\n onChange={e => handleOnChange(e.target.value)}\n {...extraProps}\n />\n );\n\n case 'switch':\n return (\n <Switch\n checked={!!value}\n title={title}\n className={className}\n disabled={disabled}\n onChange={v => handleOnChange(v)}\n {...extraProps}\n />\n );\n\n case 'checkbox':\n return (\n <span title={title} className={className}>\n <Checkbox\n type=\"checkbox\"\n disabled={disabled}\n onChange={e => handleOnChange(e.target.checked)}\n checked={!!value}\n {...extraProps}\n />\n </span>\n );\n\n case 'radio':\n return (\n <span className={className} title={title}>\n {values.map(v => (\n <Radio\n key={v.name}\n value={v.name}\n checked={value === v.name}\n disabled={disabled}\n onChange={e => handleOnChange(e.target.value)}\n {...extraProps}>\n {v.label}\n </Radio>\n ))}\n </span>\n );\n }\n\n switch (inputTypeCoerced) {\n case 'date':\n case 'datetime-local': {\n if (operator === 'between' || operator === 'notBetween') {\n // oxlint-disable-next-line typescript/no-explicit-any\n const dayjsArray = valueAsArray.slice(0, 2).map((v: any) => dayjs(v)) as [Dayjs, Dayjs];\n return (\n <DatePicker.RangePicker\n value={dayjsArray.every(d => d.isValid()) ? dayjsArray : undefined}\n showTime={inputTypeCoerced === 'datetime-local'}\n className={className}\n disabled={disabled}\n placeholder={[placeHolderText, placeHolderText]}\n // TODO: the function below is currently untested (see the\n // \"renders a date range picker\" test in ./AntD.test.tsx)\n onChange={\n // istanbul ignore next\n dates => {\n const timeFormat = inputTypeCoerced === 'datetime-local' ? 'THH:mm:ss' : '';\n const format = `YYYY-MM-DD${timeFormat}`;\n const dateArray = dates?.map(d => (d?.isValid() ? d.format(format) : undefined));\n handleOnChange(\n dateArray ? (listsAsArrays ? dateArray : joinWith(dateArray, ',')) : dates\n );\n }\n }\n {...extraProps}\n />\n );\n }\n\n const dateValue = dayjs(value);\n return (\n <DatePicker\n value={dateValue.isValid() ? dateValue : undefined}\n showTime={inputTypeCoerced === 'datetime-local'}\n className={className}\n disabled={disabled}\n placeholder={placeHolderText}\n onChange={(_d, dateString) => handleOnChange(dateString)}\n {...extraProps}\n />\n );\n }\n\n case 'time': {\n const dateValue = dayjs(value, 'HH:mm:ss');\n return (\n <DatePicker.TimePicker\n value={dateValue.isValid() ? dateValue : undefined}\n className={className}\n disabled={disabled}\n placeholder={placeHolderText}\n onChange={d => handleOnChange(d?.format('HH:mm:ss') ?? '')}\n {...extraProps}\n />\n );\n }\n\n case 'number': {\n return (\n <InputNumber\n type={inputTypeCoerced}\n value={value}\n title={title}\n className={className}\n disabled={disabled}\n placeholder={placeHolderText}\n onChange={handleOnChange}\n {...extraProps}\n />\n );\n }\n }\n\n if (inputType === 'bigint') {\n return (\n <Input\n data-testid={testID}\n type={inputTypeCoerced}\n placeholder={placeHolderText}\n value={`${value}`}\n title={title}\n className={className}\n disabled={disabled}\n onChange={e => bigIntValueHandler(e.target.value)}\n {...extraProps}\n />\n );\n }\n\n return (\n <Input\n type={inputTypeCoerced}\n value={value}\n title={title}\n className={className}\n disabled={disabled}\n placeholder={placeHolderText}\n onChange={e => handleOnChange(e.target.value)}\n {...extraProps}\n />\n );\n};\n","import { Select } from 'antd';\nimport type { ComponentPropsWithoutRef } from 'react';\nimport * as React from 'react';\nimport type { VersatileSelectorProps } from 'react-querybuilder';\nimport { joinWith, useValueSelector } from 'react-querybuilder';\n\n/**\n * @group Props\n */\nexport type AntDValueSelectorProps = VersatileSelectorProps &\n Omit<ComponentPropsWithoutRef<typeof Select>, 'onChange' | 'defaultValue'>;\n\n/**\n * @group Components\n */\nexport const AntDValueSelector = ({\n className,\n handleOnChange,\n options,\n value,\n title,\n disabled,\n multiple,\n listsAsArrays,\n // Props that should not be in extraProps\n testID: _testID,\n rule: _rule,\n ruleGroup: _ruleGroup,\n rules: _rules,\n level: _level,\n path: _path,\n context: _context,\n validation: _validation,\n operator: _operator,\n field: _field,\n fieldData: _fieldData,\n schema: _schema,\n ...extraProps\n}: AntDValueSelectorProps): React.JSX.Element => {\n // Alternate onChange handler that doesn't use arrays even when `multiple` is true\n const { onChange: onChangeNoArrays } = useValueSelector({\n handleOnChange,\n listsAsArrays: false,\n multiple: false,\n value,\n });\n const { onChange: onChangeNormal, val } = useValueSelector({\n handleOnChange,\n // This forces `val` to be an array if `multiple` is true,\n // even if `listsAsArrays` is false\n listsAsArrays: multiple || listsAsArrays,\n multiple,\n value,\n });\n\n const onChange = React.useCallback(\n (v: string | string[]) => {\n if (multiple && !listsAsArrays && Array.isArray(v)) {\n // `multiple: true` means `v` is probably an array, but we don't want\n // to send an array to `handleOnChange` when `listsAsArrays` is false\n onChangeNoArrays(joinWith(v));\n } else {\n onChangeNormal(v);\n }\n },\n [listsAsArrays, multiple, onChangeNoArrays, onChangeNormal]\n );\n\n return (\n <Select\n {...(multiple ? { mode: 'multiple', allowClear: true } : {})}\n title={title}\n className={className}\n popupMatchSelectWidth={false}\n disabled={disabled}\n value={val}\n onChange={onChange}\n optionFilterProp=\"label\"\n options={options}\n {...extraProps}\n />\n );\n};\n","import {\n CloseOutlined,\n CopyOutlined,\n DownOutlined,\n LockOutlined,\n UnlockOutlined,\n UpOutlined,\n} from '@ant-design/icons';\nimport * as React from 'react';\nimport type {\n ControlElementsProp,\n FullField,\n QueryBuilderContextProvider,\n Translations,\n} from 'react-querybuilder';\nimport { getCompatContextProvider } from 'react-querybuilder';\nimport { AntDActionElement } from './AntDActionElement';\nimport { AntDDragHandle } from './AntDDragHandle';\nimport { AntDNotToggle } from './AntDNotToggle';\nimport { AntDShiftActions } from './AntDShiftActions';\nimport { AntDValueEditor } from './AntDValueEditor';\nimport { AntDValueSelector } from './AntDValueSelector';\n\nexport * from './AntDActionElement';\nexport * from './AntDDragHandle';\nexport * from './AntDNotToggle';\nexport * from './AntDShiftActions';\nexport * from './AntDValueEditor';\nexport * from './AntDValueSelector';\n\n/**\n * @group Props\n */\nexport const antdControlElements: ControlElementsProp<FullField, string> = {\n actionElement: AntDActionElement,\n dragHandle: AntDDragHandle,\n notToggle: AntDNotToggle,\n shiftActions: AntDShiftActions,\n valueEditor: AntDValueEditor,\n valueSelector: AntDValueSelector,\n};\n\n/**\n * @group Props\n */\nexport const antdTranslations: Partial<Translations> = {\n removeGroup: { label: <CloseOutlined /> },\n removeRule: { label: <CloseOutlined /> },\n cloneRule: { label: <CopyOutlined /> },\n cloneRuleGroup: { label: <CopyOutlined /> },\n lockGroup: { label: <UnlockOutlined /> },\n lockRule: { label: <UnlockOutlined /> },\n lockGroupDisabled: { label: <LockOutlined /> },\n lockRuleDisabled: { label: <LockOutlined /> },\n shiftActionUp: { label: <UpOutlined /> },\n shiftActionDown: { label: <DownOutlined /> },\n};\n\n/**\n * @group Components\n */\nexport const QueryBuilderAntD: QueryBuilderContextProvider = getCompatContextProvider({\n controlElements: antdControlElements,\n translations: antdTranslations,\n});\n"],"x_google_ignoreList":[4],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAa,qBAAqB,EAChC,WACA,eACA,OACA,OACA,UACA,qBAEA,QAAQ,SACR,OAAO,QACP,MAAM,OACN,SAAS,UACT,YAAY,aACZ,aAAa,cACb,QAAQ,QACR,GAAG,iBAEH,oCAACA;CACC,MAAK;CACM;CACX,OAAO,uBAAuB,WAAW,oBAAoB,QAAQ;CACrE,UAAS,MAAK,cAAc,EAAE;CAC9B,UAAU,YAAY,CAAC;CACvB,GAAI;GACH,uBAAuB,WAAW,oBAAoB,QAAQ,MACxD;;;;;;;AC7BX,MAAaC,wCAIT,EACE,WACA,OAEA,QAAQ,SACR,OAAO,QACP,MAAM,OACN,OAAO,QACP,UAAU,WACV,SAAS,UACT,YAAY,aACZ,QAAQ,SACR,aAAa,aACb,GAAG,cAEL,YACG,oCAACC;CAA0B;CAAkB;CAAO,GAAI;CAAY,KAAK;EAAW,CAC1F;;;;;;;ACvBD,MAAa,iBAAiB,EAC5B,WACA,gBACA,OACA,SACA,OACA,UAEA,MAAM,OACN,SAAS,UACT,YAAY,aACZ,QAAQ,SACR,QAAQ,SACR,WAAW,WACX,GAAG,iBAEH,oCAACC;CACQ;CACI;CACX,WAAU,MAAK,eAAe,EAAE;CAChC,SAAS,CAAC,CAAC;CACD;CACV,iBAAiB;CACjB,mBAAkB;CAClB,GAAI;EACJ;;;;;;;ACjCJ,MAAa,oBAAoB,EAC/B,SACA,WACA,iBACA,mBACA,UACA,WACA,QACA,QACA,aAEA,oCAAC;CAAI,eAAa;CAAmB;GACnC,oCAACC;CACC,MAAK;CACL,MAAK;CACL,OAAO,QAAQ;CACf,SAAS;CACT,UAAU,YAAY;GACrB,QAAQ,QACF,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ACA,sCAAe,EAAE;CAC7C,eAAe,EAAE,OAAO,oCAACC,oCAAa,EAAE;CACxC,iBAAiB,EAAE,OAAO,oCAACC,sCAAe,EAAE;CAC7C;;;;AAKD,MAAaC,oEAAyE;CACpF,iBAAiB;CACjB,cAAc;CACf,CAAC"}
@@ -347,6 +347,41 @@ type B = IfEqual<string, number, 'equal', 'not equal'>;
347
347
  //=> 'not equal'
348
348
  ```
349
349
 
350
+ 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:
351
+
352
+ @example
353
+ ```
354
+ import type {If, IsEqual, StringRepeat} from 'type-fest';
355
+
356
+ type HundredZeroes = StringRepeat<'0', 100>;
357
+
358
+ // The following implementation is not tail recursive
359
+ type Includes<S extends string, Char extends string> =
360
+ S extends `${infer First}${infer Rest}`
361
+ ? If<IsEqual<First, Char>,
362
+ 'found',
363
+ Includes<Rest, Char>>
364
+ : 'not found';
365
+
366
+ // Hence, instantiations with long strings will fail
367
+ // @ts-expect-error
368
+ type Fails = Includes<HundredZeroes, '1'>;
369
+ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
370
+ // Error: Type instantiation is excessively deep and possibly infinite.
371
+
372
+ // However, if we use a simple conditional instead of `If`, the implementation becomes tail-recursive
373
+ type IncludesWithoutIf<S extends string, Char extends string> =
374
+ S extends `${infer First}${infer Rest}`
375
+ ? IsEqual<First, Char> extends true
376
+ ? 'found'
377
+ : IncludesWithoutIf<Rest, Char>
378
+ : 'not found';
379
+
380
+ // Now, instantiations with long strings will work
381
+ type Works = IncludesWithoutIf<HundredZeroes, '1'>;
382
+ //=> 'not found'
383
+ ```
384
+
350
385
  @category Type Guard
351
386
  @category Utilities
352
387
  */
@@ -380,7 +415,6 @@ type C = IsArray<string>;
380
415
  type UnknownArray = readonly unknown[];
381
416
  //#endregion
382
417
  //#region ../../node_modules/type-fest/source/internal/array.d.ts
383
-
384
418
  /**
385
419
  Returns whether the given array `T` is readonly.
386
420
  */
@@ -441,7 +475,7 @@ fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface`
441
475
  ```
442
476
 
443
477
  @link https://github.com/microsoft/TypeScript/issues/15300
444
- @see SimplifyDeep
478
+ @see {@link SimplifyDeep}
445
479
  @category Object
446
480
  */
447
481
  type Simplify<T$1> = { [KeyType in keyof T$1]: T$1[KeyType] } & {};
@@ -565,7 +599,7 @@ type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
565
599
  // => { foo: 'bar'; qux?: 'baz' | undefined; }
566
600
  ```
567
601
 
568
- @see PickIndexSignature
602
+ @see {@link PickIndexSignature}
569
603
  @category Object
570
604
  */
571
605
  type OmitIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType] };
@@ -613,7 +647,7 @@ type ExampleIndexSignature = PickIndexSignature<Example>;
613
647
  // }
614
648
  ```
615
649
 
616
- @see OmitIndexSignature
650
+ @see {@link OmitIndexSignature}
617
651
  @category Object
618
652
  */
619
653
  type PickIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? KeyType : never]: ObjectType[KeyType] };
@@ -1119,7 +1153,7 @@ interface RuleGroupType<R$1 extends RuleType = RuleType, C extends string = stri
1119
1153
  /**
1120
1154
  * The type of the `rules` array in a {@link RuleGroupType}.
1121
1155
  */
1122
- type RuleGroupArray<RG$1 extends RuleGroupType = RuleGroupType, R$1 extends RuleType = RuleType> = (R$1 | RG$1)[];
1156
+ type RuleGroupArray<RG extends RuleGroupType = RuleGroupType, R$1 extends RuleType = RuleType> = (R$1 | RG)[];
1123
1157
  //#endregion
1124
1158
  //#region ../core/src/types/ruleGroupsIC.utils.d.ts
1125
1159
  type MAXIMUM_ALLOWED_BOUNDARY = 80;
@@ -1145,7 +1179,7 @@ type RuleGroupTypeAny<R$1 extends RuleType = RuleType, C extends string = string
1145
1179
  /**
1146
1180
  * The type of the `rules` array in a {@link RuleGroupTypeIC}.
1147
1181
  */
1148
- type RuleGroupICArray<RG$1 extends RuleGroupTypeIC = RuleGroupTypeIC, R$1 extends RuleType = RuleType, C extends string = string> = [R$1 | RG$1] | [R$1 | RG$1, ...MappedTuple<[C, R$1 | RG$1]>] | ((R$1 | RG$1)[] & {
1182
+ type RuleGroupICArray<RG extends RuleGroupTypeIC = RuleGroupTypeIC, R$1 extends RuleType = RuleType, C extends string = string> = [R$1 | RG] | [R$1 | RG, ...MappedTuple<[C, R$1 | RG]>] | ((R$1 | RG)[] & {
1149
1183
  length: 0;
1150
1184
  });
1151
1185
  /**
@@ -1155,7 +1189,7 @@ type RuleOrGroupArray = RuleGroupArray | RuleGroupICArray;
1155
1189
  /**
1156
1190
  * Converts a narrowed rule group type to its most generic form.
1157
1191
  */
1158
- type GenericizeRuleGroupType<RG$1> = RG$1 extends RuleGroupType ? RuleGroupType : RuleGroupTypeIC;
1192
+ type GenericizeRuleGroupType<RG> = RG extends RuleGroupType ? RuleGroupType : RuleGroupTypeIC;
1159
1193
  //#endregion
1160
1194
  //#region ../core/src/types/validation.d.ts
1161
1195
  /**
@@ -1493,9 +1527,13 @@ interface Classnames {
1493
1527
  */
1494
1528
  branches: Classname;
1495
1529
  /**
1496
- * Classname(s) rules that render a subquery.
1530
+ * Classname(s) applied to rules that render a subquery.
1497
1531
  */
1498
1532
  hasSubQuery: Classname;
1533
+ /**
1534
+ * Classname(s) applied to async components in their "loading" state.
1535
+ */
1536
+ loading: Classname;
1499
1537
  }
1500
1538
  /**
1501
1539
  * Placeholder strings for option lists.
@@ -2412,15 +2450,15 @@ type QueryBuilderContextProvider<ExtraProps extends object = Record<string, any>
2412
2450
  *
2413
2451
  * @group Props
2414
2452
  */
2415
- type QueryBuilderProps<RG$1 extends RuleGroupTypeAny, F extends FullField, O extends FullOperator, C extends FullCombinator> = RG$1 extends RuleGroupType<infer R> | RuleGroupTypeIC<infer R> ? QueryBuilderContextProps<F, GetOptionIdentifierType<O>> & {
2453
+ type QueryBuilderProps<RG extends RuleGroupTypeAny, F extends FullField, O extends FullOperator, C extends FullCombinator> = RG extends RuleGroupType<infer R> | RuleGroupTypeIC<infer R> ? QueryBuilderContextProps<F, GetOptionIdentifierType<O>> & {
2416
2454
  /**
2417
2455
  * Initial query object for uncontrolled components.
2418
2456
  */
2419
- defaultQuery?: RG$1;
2457
+ defaultQuery?: RG;
2420
2458
  /**
2421
2459
  * Query object for controlled components.
2422
2460
  */
2423
- query?: RG$1;
2461
+ query?: RG;
2424
2462
  /**
2425
2463
  * List of valid {@link FullField}s.
2426
2464
  *
@@ -2572,7 +2610,7 @@ type QueryBuilderProps<RG$1 extends RuleGroupTypeAny, F extends FullField, O ext
2572
2610
  */
2573
2611
  getSubQueryBuilderProps?(field: GetOptionIdentifierType<F>, misc: {
2574
2612
  fieldData: F;
2575
- }): QueryBuilderProps<GenericizeRuleGroupType<RG$1>, FullOption, FullOption, FullOption>;
2613
+ }): QueryBuilderProps<GenericizeRuleGroupType<RG>, FullOption, FullOption, FullOption>;
2576
2614
  /**
2577
2615
  * The return value of this function will be used to apply classnames to the
2578
2616
  * outer `<div>` of the given {@link Rule}.
@@ -2584,56 +2622,56 @@ type QueryBuilderProps<RG$1 extends RuleGroupTypeAny, F extends FullField, O ext
2584
2622
  * The return value of this function will be used to apply classnames to the
2585
2623
  * outer `<div>` of the given {@link RuleGroup}.
2586
2624
  */
2587
- getRuleGroupClassname?(ruleGroup: RG$1): Classname;
2625
+ getRuleGroupClassname?(ruleGroup: RG): Classname;
2588
2626
  /**
2589
2627
  * This callback is invoked before a new rule is added. The function should either manipulate
2590
2628
  * the rule and return the new object, return `true` to allow the addition to proceed as normal,
2591
2629
  * or return `false` to cancel the addition of the rule.
2592
2630
  */
2593
- onAddRule?(rule: R, parentPath: Path, query: RG$1, context?: any): RuleType | boolean;
2631
+ onAddRule?(rule: R, parentPath: Path, query: RG, context?: any): RuleType | boolean;
2594
2632
  /**
2595
2633
  * This callback is invoked before a new group is added. The function should either manipulate
2596
2634
  * the group and return the new object, return `true` to allow the addition to proceed as normal,
2597
2635
  * or return `false` to cancel the addition of the group.
2598
2636
  */
2599
- onAddGroup?(ruleGroup: RG$1, parentPath: Path, query: RG$1, context?: any): RG$1 | boolean;
2637
+ onAddGroup?(ruleGroup: RG, parentPath: Path, query: RG, context?: any): RG | boolean;
2600
2638
  /**
2601
2639
  * This callback is invoked before a rule is moved or shifted. The function should return
2602
2640
  * `true` to allow the move/shift to proceed as normal, `false` to cancel the move/shift, or
2603
2641
  * a new query object (presumably based on `query` or `nextQuery`) which will become the new
2604
2642
  * query state.
2605
2643
  */
2606
- onMoveRule?(rule: R, fromPath: Path, toPath: Path | "up" | "down", query: RG$1, nextQuery: RG$1, options: MoveOptions, context?: any): RG$1 | boolean;
2644
+ onMoveRule?(rule: R, fromPath: Path, toPath: Path | "up" | "down", query: RG, nextQuery: RG, options: MoveOptions, context?: any): RG | boolean;
2607
2645
  /**
2608
2646
  * This callback is invoked before a group is moved or shifted. The function should return
2609
2647
  * `true` to allow the move/shift to proceed as normal, `false` to cancel the move/shift, or
2610
2648
  * a new query object (presumably based on `query` or `nextQuery`) which will become the new
2611
2649
  * query state.
2612
2650
  */
2613
- onMoveGroup?(ruleGroup: RG$1, fromPath: Path, toPath: Path | "up" | "down", query: RG$1, nextQuery: RG$1, options: MoveOptions, context?: any): RG$1 | boolean;
2651
+ onMoveGroup?(ruleGroup: RG, fromPath: Path, toPath: Path | "up" | "down", query: RG, nextQuery: RG, options: MoveOptions, context?: any): RG | boolean;
2614
2652
  /**
2615
2653
  * This callback is invoked before a rule is grouped with another object. The function should
2616
2654
  * return `true` to allow the grouping to proceed as normal, `false` to cancel the grouping,
2617
2655
  * or a new query object (presumably based on `query` or `nextQuery`) which will become the new
2618
2656
  * query state.
2619
2657
  */
2620
- onGroupRule?(rule: R, fromPath: Path, toPath: Path, query: RG$1, nextQuery: RG$1, options: GroupOptions, context?: any): RG$1 | boolean;
2658
+ onGroupRule?(rule: R, fromPath: Path, toPath: Path, query: RG, nextQuery: RG, options: GroupOptions, context?: any): RG | boolean;
2621
2659
  /**
2622
2660
  * This callback is invoked before a group is grouped with another object. The function should
2623
2661
  * return `true` to allow the grouping to proceed as normal, `false` to cancel the grouping,
2624
2662
  * or a new query object (presumably based on `query` or `nextQuery`) which will become the new
2625
2663
  * query state.
2626
2664
  */
2627
- onGroupGroup?(ruleGroup: RG$1, fromPath: Path, toPath: Path, query: RG$1, nextQuery: RG$1, options: GroupOptions, context?: any): RG$1 | boolean;
2665
+ onGroupGroup?(ruleGroup: RG, fromPath: Path, toPath: Path, query: RG, nextQuery: RG, options: GroupOptions, context?: any): RG | boolean;
2628
2666
  /**
2629
2667
  * This callback is invoked before a rule or group is removed. The function should return
2630
2668
  * `true` if the rule or group should be removed or `false` if it should not be removed.
2631
2669
  */
2632
- onRemove?(ruleOrGroup: R | RG$1, path: Path, query: RG$1, context?: any): boolean;
2670
+ onRemove?(ruleOrGroup: R | RG, path: Path, query: RG, context?: any): boolean;
2633
2671
  /**
2634
2672
  * This callback is invoked anytime the query state is updated.
2635
2673
  */
2636
- onQueryChange?(query: RG$1): void;
2674
+ onQueryChange?(query: RG): void;
2637
2675
  /**
2638
2676
  * Each log object will be passed to this function when `debugMode` is `true`.
2639
2677
  *