@react-querybuilder/antd 8.23.1 → 8.24.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.
@@ -8,75 +8,74 @@ type RemoveDataIndexKeys<T> = { [K in keyof T as `data-${string}` extends K ? ne
8
8
  /**
9
9
  * @group Props
10
10
  */
11
- interface AntDActionProps extends ActionProps, RemoveDataIndexKeys<ComponentPropsWithoutRef<typeof Button>> {}
11
+ export interface AntDActionProps extends ActionProps, RemoveDataIndexKeys<ComponentPropsWithoutRef<typeof Button>> {}
12
12
  /**
13
13
  * @group Components
14
14
  */
15
- declare const AntDActionElement: ({ className, handleOnClick, label, title, disabled, disabledTranslation, testID: _testID, level: _level, path: _path, context: _context, validation: _validation, ruleOrGroup: _ruleOrGroup, schema: _schema, ...extraProps }: AntDActionProps) => React.JSX.Element;
15
+ export declare const AntDActionElement: ({ className, handleOnClick, label, title, disabled, disabledTranslation, testID: _testID, level: _level, path: _path, context: _context, validation: _validation, ruleOrGroup: _ruleOrGroup, schema: _schema, ...extraProps }: AntDActionProps) => React.JSX.Element;
16
16
  //#endregion
17
17
  //#region src/AntDDragHandle.d.ts
18
18
  /**
19
19
  * @group Props
20
20
  */
21
- type AntDDragHandleProps = DragHandleProps & {
21
+ export type AntDDragHandleProps = DragHandleProps & {
22
22
  label?: any;
23
23
  } & ComponentPropsWithRef<typeof HolderOutlined>;
24
24
  /**
25
25
  * @group Components
26
26
  */
27
- declare const AntDDragHandle: React.ForwardRefExoticComponent<Omit<AntDDragHandleProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
27
+ export declare const AntDDragHandle: React.ForwardRefExoticComponent<Omit<AntDDragHandleProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
28
28
  //#endregion
29
29
  //#region src/AntDNotToggle.d.ts
30
30
  /**
31
31
  * @group Props
32
32
  */
33
- interface AntDNotToggleProps extends NotToggleProps, ComponentPropsWithoutRef<typeof Switch> {}
33
+ export interface AntDNotToggleProps extends NotToggleProps, ComponentPropsWithoutRef<typeof Switch> {}
34
34
  /**
35
35
  * @group Components
36
36
  */
37
- declare const AntDNotToggle: ({ className, handleOnChange, label, checked, title, disabled, path: _path, context: _context, validation: _validation, testID: _testID, schema: _schema, ruleGroup: _ruleGroup, ...extraProps }: AntDNotToggleProps) => React.JSX.Element;
37
+ export declare const AntDNotToggle: ({ className, handleOnChange, label, checked, title, disabled, path: _path, context: _context, validation: _validation, testID: _testID, schema: _schema, ruleGroup: _ruleGroup, ...extraProps }: AntDNotToggleProps) => React.JSX.Element;
38
38
  //#endregion
39
39
  //#region src/AntDShiftActions.d.ts
40
40
  /**
41
41
  * @group Components
42
42
  */
43
- declare const AntDShiftActions: ({ shiftUp, shiftDown, shiftUpDisabled, shiftDownDisabled, disabled, className, labels, titles, testID }: ShiftActionsProps) => React.JSX.Element;
43
+ export declare const AntDShiftActions: ({ shiftUp, shiftDown, shiftUpDisabled, shiftDownDisabled, disabled, className, labels, titles, testID }: ShiftActionsProps) => React.JSX.Element;
44
44
  //#endregion
45
45
  //#region src/AntDValueEditor.d.ts
46
46
  /**
47
47
  * @group Props
48
48
  */
49
- interface AntDValueEditorProps extends ValueEditorProps {
49
+ export interface AntDValueEditorProps extends ValueEditorProps {
50
50
  extraProps?: Record<string, unknown>;
51
51
  }
52
52
  /**
53
53
  * @group Components
54
54
  */
55
- declare const AntDValueEditor: (allProps: AntDValueEditorProps) => React.JSX.Element | null;
55
+ export declare const AntDValueEditor: (allProps: AntDValueEditorProps) => React.JSX.Element | null;
56
56
  //#endregion
57
57
  //#region src/AntDValueSelector.d.ts
58
58
  /**
59
59
  * @group Props
60
60
  */
61
- type AntDValueSelectorProps = VersatileSelectorProps & Omit<ComponentPropsWithoutRef<typeof Select>, "onChange" | "defaultValue">;
61
+ export type AntDValueSelectorProps = VersatileSelectorProps & Omit<ComponentPropsWithoutRef<typeof Select>, "onChange" | "defaultValue">;
62
62
  /**
63
63
  * @group Components
64
64
  */
65
- declare const AntDValueSelector: ({ className, handleOnChange, options, value, title, disabled, multiple, listsAsArrays, testID: _testID, rule: _rule, ruleGroup: _ruleGroup, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, operator: _operator, field: _field, fieldData: _fieldData, schema: _schema, ...extraProps }: AntDValueSelectorProps) => React.JSX.Element;
65
+ export declare const AntDValueSelector: ({ className, handleOnChange, options, value, title, disabled, multiple, listsAsArrays, testID: _testID, rule: _rule, ruleGroup: _ruleGroup, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, operator: _operator, field: _field, fieldData: _fieldData, schema: _schema, ...extraProps }: AntDValueSelectorProps) => React.JSX.Element;
66
66
  //#endregion
67
67
  //#region src/index.d.ts
68
68
  /**
69
69
  * @group Props
70
70
  */
71
- declare const antdControlElements: ControlElementsProp<FullField, string>;
71
+ export declare const antdControlElements: ControlElementsProp<FullField, string>;
72
72
  /**
73
73
  * @group Props
74
74
  */
75
- declare const antdTranslations: Partial<Translations>;
75
+ export declare const antdTranslations: Partial<Translations>;
76
76
  /**
77
77
  * @group Components
78
78
  */
79
- declare const QueryBuilderAntD: QueryBuilderContextProvider;
79
+ export declare const QueryBuilderAntD: QueryBuilderContextProvider;
80
80
  //#endregion
81
- export { AntDActionElement, AntDActionProps, AntDDragHandle, AntDDragHandleProps, AntDNotToggle, AntDNotToggleProps, AntDShiftActions, AntDValueEditor, AntDValueEditorProps, AntDValueSelector, AntDValueSelectorProps, QueryBuilderAntD, antdControlElements, antdTranslations };
82
81
  //# sourceMappingURL=react-querybuilder_antd.d.mts.map
@@ -8,75 +8,74 @@ type RemoveDataIndexKeys<T> = { [K in keyof T as `data-${string}` extends K ? ne
8
8
  /**
9
9
  * @group Props
10
10
  */
11
- interface AntDActionProps extends ActionProps, RemoveDataIndexKeys<ComponentPropsWithoutRef<typeof Button>> {}
11
+ export interface AntDActionProps extends ActionProps, RemoveDataIndexKeys<ComponentPropsWithoutRef<typeof Button>> {}
12
12
  /**
13
13
  * @group Components
14
14
  */
15
- declare const AntDActionElement: ({ className, handleOnClick, label, title, disabled, disabledTranslation, testID: _testID, level: _level, path: _path, context: _context, validation: _validation, ruleOrGroup: _ruleOrGroup, schema: _schema, ...extraProps }: AntDActionProps) => React.JSX.Element;
15
+ export declare const AntDActionElement: ({ className, handleOnClick, label, title, disabled, disabledTranslation, testID: _testID, level: _level, path: _path, context: _context, validation: _validation, ruleOrGroup: _ruleOrGroup, schema: _schema, ...extraProps }: AntDActionProps) => React.JSX.Element;
16
16
  //#endregion
17
17
  //#region src/AntDDragHandle.d.ts
18
18
  /**
19
19
  * @group Props
20
20
  */
21
- type AntDDragHandleProps = DragHandleProps & {
21
+ export type AntDDragHandleProps = DragHandleProps & {
22
22
  label?: any;
23
23
  } & ComponentPropsWithRef<typeof HolderOutlined>;
24
24
  /**
25
25
  * @group Components
26
26
  */
27
- declare const AntDDragHandle: React.ForwardRefExoticComponent<Omit<AntDDragHandleProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
27
+ export declare const AntDDragHandle: React.ForwardRefExoticComponent<Omit<AntDDragHandleProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
28
28
  //#endregion
29
29
  //#region src/AntDNotToggle.d.ts
30
30
  /**
31
31
  * @group Props
32
32
  */
33
- interface AntDNotToggleProps extends NotToggleProps, ComponentPropsWithoutRef<typeof Switch> {}
33
+ export interface AntDNotToggleProps extends NotToggleProps, ComponentPropsWithoutRef<typeof Switch> {}
34
34
  /**
35
35
  * @group Components
36
36
  */
37
- declare const AntDNotToggle: ({ className, handleOnChange, label, checked, title, disabled, path: _path, context: _context, validation: _validation, testID: _testID, schema: _schema, ruleGroup: _ruleGroup, ...extraProps }: AntDNotToggleProps) => React.JSX.Element;
37
+ export declare const AntDNotToggle: ({ className, handleOnChange, label, checked, title, disabled, path: _path, context: _context, validation: _validation, testID: _testID, schema: _schema, ruleGroup: _ruleGroup, ...extraProps }: AntDNotToggleProps) => React.JSX.Element;
38
38
  //#endregion
39
39
  //#region src/AntDShiftActions.d.ts
40
40
  /**
41
41
  * @group Components
42
42
  */
43
- declare const AntDShiftActions: ({ shiftUp, shiftDown, shiftUpDisabled, shiftDownDisabled, disabled, className, labels, titles, testID }: ShiftActionsProps) => React.JSX.Element;
43
+ export declare const AntDShiftActions: ({ shiftUp, shiftDown, shiftUpDisabled, shiftDownDisabled, disabled, className, labels, titles, testID }: ShiftActionsProps) => React.JSX.Element;
44
44
  //#endregion
45
45
  //#region src/AntDValueEditor.d.ts
46
46
  /**
47
47
  * @group Props
48
48
  */
49
- interface AntDValueEditorProps extends ValueEditorProps {
49
+ export interface AntDValueEditorProps extends ValueEditorProps {
50
50
  extraProps?: Record<string, unknown>;
51
51
  }
52
52
  /**
53
53
  * @group Components
54
54
  */
55
- declare const AntDValueEditor: (allProps: AntDValueEditorProps) => React.JSX.Element | null;
55
+ export declare const AntDValueEditor: (allProps: AntDValueEditorProps) => React.JSX.Element | null;
56
56
  //#endregion
57
57
  //#region src/AntDValueSelector.d.ts
58
58
  /**
59
59
  * @group Props
60
60
  */
61
- type AntDValueSelectorProps = VersatileSelectorProps & Omit<ComponentPropsWithoutRef<typeof Select>, "onChange" | "defaultValue">;
61
+ export type AntDValueSelectorProps = VersatileSelectorProps & Omit<ComponentPropsWithoutRef<typeof Select>, "onChange" | "defaultValue">;
62
62
  /**
63
63
  * @group Components
64
64
  */
65
- declare const AntDValueSelector: ({ className, handleOnChange, options, value, title, disabled, multiple, listsAsArrays, testID: _testID, rule: _rule, ruleGroup: _ruleGroup, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, operator: _operator, field: _field, fieldData: _fieldData, schema: _schema, ...extraProps }: AntDValueSelectorProps) => React.JSX.Element;
65
+ export declare const AntDValueSelector: ({ className, handleOnChange, options, value, title, disabled, multiple, listsAsArrays, testID: _testID, rule: _rule, ruleGroup: _ruleGroup, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, operator: _operator, field: _field, fieldData: _fieldData, schema: _schema, ...extraProps }: AntDValueSelectorProps) => React.JSX.Element;
66
66
  //#endregion
67
67
  //#region src/index.d.ts
68
68
  /**
69
69
  * @group Props
70
70
  */
71
- declare const antdControlElements: ControlElementsProp<FullField, string>;
71
+ export declare const antdControlElements: ControlElementsProp<FullField, string>;
72
72
  /**
73
73
  * @group Props
74
74
  */
75
- declare const antdTranslations: Partial<Translations>;
75
+ export declare const antdTranslations: Partial<Translations>;
76
76
  /**
77
77
  * @group Components
78
78
  */
79
- declare const QueryBuilderAntD: QueryBuilderContextProvider;
79
+ export declare const QueryBuilderAntD: QueryBuilderContextProvider;
80
80
  //#endregion
81
- export { AntDActionElement, AntDActionProps, AntDDragHandle, AntDDragHandleProps, AntDNotToggle, AntDNotToggleProps, AntDShiftActions, AntDValueEditor, AntDValueEditorProps, AntDValueSelector, AntDValueSelectorProps, QueryBuilderAntD, antdControlElements, antdTranslations };
82
81
  //# sourceMappingURL=react-querybuilder_antd.legacy-esm.d.ts.map
@@ -1,4 +1,4 @@
1
- import { CloseOutlined, CopyOutlined, DownOutlined, HolderOutlined, LockOutlined, RedoOutlined, UndoOutlined, UnlockOutlined, UpOutlined } from "@ant-design/icons";
1
+ import { CloseOutlined, CopyOutlined, DownOutlined, HolderOutlined, LockOutlined, RedoOutlined, UndoOutlined, UngroupOutlined, UnlockOutlined, UpOutlined } from "@ant-design/icons";
2
2
  import * as React from "react";
3
3
  import { forwardRef } from "react";
4
4
  import { ValueEditor, getCompatContextProvider, joinWith, useValueEditor, useValueSelector } from "react-querybuilder";
@@ -11,7 +11,7 @@ import localeData from "dayjs/plugin/localeData.js";
11
11
  import weekday from "dayjs/plugin/weekday.js";
12
12
  import weekOfYear from "dayjs/plugin/weekOfYear.js";
13
13
  import weekYear from "dayjs/plugin/weekYear.js";
14
- //#region \0@oxc-project+runtime@0.144.0/helpers/esm/objectWithoutPropertiesLoose.js
14
+ //#region \0@oxc-project+runtime@0.149.0/helpers/esm/objectWithoutPropertiesLoose.js
15
15
  function _objectWithoutPropertiesLoose(r, e) {
16
16
  if (null == r) return {};
17
17
  var t = {};
@@ -22,7 +22,7 @@ function _objectWithoutPropertiesLoose(r, e) {
22
22
  return t;
23
23
  }
24
24
  //#endregion
25
- //#region \0@oxc-project+runtime@0.144.0/helpers/esm/objectWithoutProperties.js
25
+ //#region \0@oxc-project+runtime@0.149.0/helpers/esm/objectWithoutProperties.js
26
26
  function _objectWithoutProperties(e, t) {
27
27
  if (null == e) return {};
28
28
  var o, r, i = _objectWithoutPropertiesLoose(e, t);
@@ -33,7 +33,7 @@ function _objectWithoutProperties(e, t) {
33
33
  return i;
34
34
  }
35
35
  //#endregion
36
- //#region \0@oxc-project+runtime@0.144.0/helpers/esm/typeof.js
36
+ //#region \0@oxc-project+runtime@0.149.0/helpers/esm/typeof.js
37
37
  function _typeof(o) {
38
38
  "@babel/helpers - typeof";
39
39
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -43,7 +43,7 @@ function _typeof(o) {
43
43
  }, _typeof(o);
44
44
  }
45
45
  //#endregion
46
- //#region \0@oxc-project+runtime@0.144.0/helpers/esm/toPrimitive.js
46
+ //#region \0@oxc-project+runtime@0.149.0/helpers/esm/toPrimitive.js
47
47
  function toPrimitive(t, r) {
48
48
  if ("object" != _typeof(t) || !t) return t;
49
49
  var e = t[Symbol.toPrimitive];
@@ -55,13 +55,13 @@ function toPrimitive(t, r) {
55
55
  return ("string" === r ? String : Number)(t);
56
56
  }
57
57
  //#endregion
58
- //#region \0@oxc-project+runtime@0.144.0/helpers/esm/toPropertyKey.js
58
+ //#region \0@oxc-project+runtime@0.149.0/helpers/esm/toPropertyKey.js
59
59
  function toPropertyKey(t) {
60
60
  var i = toPrimitive(t, "string");
61
61
  return "symbol" == _typeof(i) ? i : i + "";
62
62
  }
63
63
  //#endregion
64
- //#region \0@oxc-project+runtime@0.144.0/helpers/esm/defineProperty.js
64
+ //#region \0@oxc-project+runtime@0.149.0/helpers/esm/defineProperty.js
65
65
  function _defineProperty(e, r, t) {
66
66
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
67
67
  value: t,
@@ -71,7 +71,7 @@ function _defineProperty(e, r, t) {
71
71
  }) : e[r] = t, e;
72
72
  }
73
73
  //#endregion
74
- //#region \0@oxc-project+runtime@0.144.0/helpers/esm/objectSpread2.js
74
+ //#region \0@oxc-project+runtime@0.149.0/helpers/esm/objectSpread2.js
75
75
  function ownKeys(e, r) {
76
76
  var t = Object.keys(e);
77
77
  if (Object.getOwnPropertySymbols) {
@@ -573,6 +573,7 @@ const antdTranslations = {
573
573
  removeRule: { label: /* @__PURE__ */ React.createElement(CloseOutlined, null) },
574
574
  cloneRule: { label: /* @__PURE__ */ React.createElement(CopyOutlined, null) },
575
575
  cloneRuleGroup: { label: /* @__PURE__ */ React.createElement(CopyOutlined, null) },
576
+ ungroupRuleGroup: { label: /* @__PURE__ */ React.createElement(UngroupOutlined, null) },
576
577
  lockGroup: { label: /* @__PURE__ */ React.createElement(UnlockOutlined, null) },
577
578
  lockRule: { label: /* @__PURE__ */ React.createElement(UnlockOutlined, null) },
578
579
  lockGroupDisabled: { label: /* @__PURE__ */ React.createElement(LockOutlined, null) },
@@ -1 +1 @@
1
- {"version":3,"file":"react-querybuilder_antd.legacy-esm.js","names":["dayjsGenerateConfig"],"sources":["../src/AntDActionElement.tsx","../src/AntDDragHandle.tsx","../src/AntDNotToggle.tsx","../src/AntDShiftActions.tsx","../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, 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 dragHandleAttributes,\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 ) => (\n <HolderOutlined\n className={className}\n title={title}\n {...extraProps}\n {...dragHandleAttributes}\n ref={dragRef}\n />\n )\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, 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","/**\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 weekday from 'dayjs/plugin/weekday.js';\nimport weekOfYear from 'dayjs/plugin/weekOfYear.js';\nimport weekYear from 'dayjs/plugin/weekYear.js';\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\n/* v8 ignore file -- @preserve */\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 // 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 /* v8 ignore start -- @preserve */\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 /* v8 ignore stop -- @preserve */\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 RedoOutlined,\n UndoOutlined,\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 undo: { label: <UndoOutlined /> },\n redo: { label: <RedoOutlined /> },\n};\n\n/**\n * @group Components\n */\nexport const QueryBuilderAntD: QueryBuilderContextProvider = getCompatContextProvider({\n controlElements: antdControlElements,\n translations: antdTranslations,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqBE;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;;;;;AAdF,MAAa,qBAAqB,SAiBhC;CAjBgC,I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;EAAY,YAAY;CAAK,IAAI,CAAC,CAAA,GAAA,CAAA,GAAA;EACnD;EACI;EACX,uBAAuB;EACb;EACV,OAAO;EACG;EACV,kBAAiB;EACR;CACL,GAAA,UACL,CAAA;AAEL;;;;;;AC/CA,MAAa,sBAA8D;CACzE,eAAe;CACf,YAAY;CACZ,WAAW;CACX,cAAc;CACd,aAAa;CACb,eAAe;AACjB;;;;AAKA,MAAa,mBAA0C;CACrD,aAAa,EAAE,OAAO,sBAAA,cAAC,eAAA,IAAe,EAAE;CACxC,YAAY,EAAE,OAAO,sBAAA,cAAC,eAAA,IAAe,EAAE;CACvC,WAAW,EAAE,OAAO,sBAAA,cAAC,cAAA,IAAc,EAAE;CACrC,gBAAgB,EAAE,OAAO,sBAAA,cAAC,cAAA,IAAc,EAAE;CAC1C,WAAW,EAAE,OAAO,sBAAA,cAAC,gBAAA,IAAgB,EAAE;CACvC,UAAU,EAAE,OAAO,sBAAA,cAAC,gBAAA,IAAgB,EAAE;CACtC,mBAAmB,EAAE,OAAO,sBAAA,cAAC,cAAA,IAAc,EAAE;CAC7C,kBAAkB,EAAE,OAAO,sBAAA,cAAC,cAAA,IAAc,EAAE;CAC5C,eAAe,EAAE,OAAO,sBAAA,cAAC,YAAA,IAAY,EAAE;CACvC,iBAAiB,EAAE,OAAO,sBAAA,cAAC,cAAA,IAAc,EAAE;CAC3C,MAAM,EAAE,OAAO,sBAAA,cAAC,cAAA,IAAc,EAAE;CAChC,MAAM,EAAE,OAAO,sBAAA,cAAC,cAAA,IAAc,EAAE;AAClC;;;;AAKA,MAAa,mBAAgD,yBAAyB;CACpF,iBAAiB;CACjB,cAAc;AAChB,CAAC"}
1
+ {"version":3,"file":"react-querybuilder_antd.legacy-esm.js","names":["dayjsGenerateConfig"],"sources":["../src/AntDActionElement.tsx","../src/AntDDragHandle.tsx","../src/AntDNotToggle.tsx","../src/AntDShiftActions.tsx","../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, 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 dragHandleAttributes,\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 ) => (\n <HolderOutlined\n className={className}\n title={title}\n {...extraProps}\n {...dragHandleAttributes}\n ref={dragRef}\n />\n )\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, 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","/**\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 weekday from 'dayjs/plugin/weekday.js';\nimport weekOfYear from 'dayjs/plugin/weekOfYear.js';\nimport weekYear from 'dayjs/plugin/weekYear.js';\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\n/* v8 ignore file -- @preserve */\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 // 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 /* v8 ignore start -- @preserve */\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 /* v8 ignore stop -- @preserve */\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 RedoOutlined,\n UndoOutlined,\n UngroupOutlined,\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 ungroupRuleGroup: { label: <UngroupOutlined /> },\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 undo: { label: <UndoOutlined /> },\n redo: { label: <RedoOutlined /> },\n};\n\n/**\n * @group Components\n */\nexport const QueryBuilderAntD: QueryBuilderContextProvider = getCompatContextProvider({\n controlElements: antdControlElements,\n translations: antdTranslations,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqBE;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;;;;;AAdF,MAAa,qBAAqB,SAiBhC;CAjBgC,IAAA,EAChC,WACA,eACA,OACA,OACA,UACA,qBAEA,QAAQ,SACR,OAAO,QACP,MAAM,OACN,SAAS,UACT,YAAY,aACZ,aAAa,cACb,QAAQ,YAAA,MACL,aAAA,yBAAA,MAAA,WAAA;CAEH,OAAA,sBAAA,cAAC,QAAA,eAAA;EACC,MAAK;EACM;EACX,OAAO,uBAAuB,WAAW,oBAAoB,QAAQ;EACrE,UAAS,MAAK,cAAc,CAAC;EAC7B,UAAU,YAAY,CAAC;CACnB,GAAA,UAEE,GADL,uBAAuB,WAAW,oBAAoB,QAAQ,KACzD;;;;;CCvBJ;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;;;AAjBN,MAAa,iBAET,YAEA,MAgBA,YAEA;CAlBA,IAAA,EACE,WACA,OACA,sBAEA,QAAQ,SACR,OAAO,QACP,MAAM,OACN,OAAO,QACP,UAAU,WACV,SAAS,UACT,YAAY,aACZ,QAAQ,SACR,aAAa,iBAAA,MACV,aAAA,yBAAA,MAAA,WAAA;CAIL,OAAA,sBAAA,cAAC,gBAAA,eAAA,eAAA,eAAA;EACY;EACJ;CACH,GAAA,UAAA,GACA,oBAAA,GAAA,CAAA,GAAA,EACJ,KAAK,QAAA,CACN,CAAA;AAEL,CAAA;;;;CChCE;CACA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;;;;;AAbF,MAAa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AO,sBAAA,cAAC,cAAA,IAAc,EAAE;CAC3C,MAAM,EAAE,OAAO,sBAAA,cAAC,cAAA,IAAc,EAAE;CAChC,MAAM,EAAE,OAAO,sBAAA,cAAC,cAAA,IAAc,EAAE;AAClC;;;;AAKA,MAAa,mBAAgD,yBAAyB;CACpF,iBAAiB;CACjB,cAAc;AAChB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { CloseOutlined, CopyOutlined, DownOutlined, HolderOutlined, LockOutlined, RedoOutlined, UndoOutlined, UnlockOutlined, UpOutlined } from "@ant-design/icons";
1
+ import { CloseOutlined, CopyOutlined, DownOutlined, HolderOutlined, LockOutlined, RedoOutlined, UndoOutlined, UngroupOutlined, UnlockOutlined, UpOutlined } from "@ant-design/icons";
2
2
  import * as React from "react";
3
3
  import { forwardRef } from "react";
4
4
  import { ValueEditor, getCompatContextProvider, joinWith, useValueEditor, useValueSelector } from "react-querybuilder";
@@ -409,6 +409,7 @@ const antdTranslations = {
409
409
  removeRule: { label: /* @__PURE__ */ React.createElement(CloseOutlined, null) },
410
410
  cloneRule: { label: /* @__PURE__ */ React.createElement(CopyOutlined, null) },
411
411
  cloneRuleGroup: { label: /* @__PURE__ */ React.createElement(CopyOutlined, null) },
412
+ ungroupRuleGroup: { label: /* @__PURE__ */ React.createElement(UngroupOutlined, null) },
412
413
  lockGroup: { label: /* @__PURE__ */ React.createElement(UnlockOutlined, null) },
413
414
  lockRule: { label: /* @__PURE__ */ React.createElement(UnlockOutlined, null) },
414
415
  lockGroupDisabled: { label: /* @__PURE__ */ React.createElement(LockOutlined, null) },