@react-querybuilder/antd 7.0.0-alpha.0 → 7.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/react-querybuilder_antd.cjs.development.d.ts +116 -22
- package/dist/cjs/react-querybuilder_antd.cjs.development.js +63 -36
- package/dist/cjs/react-querybuilder_antd.cjs.development.js.map +1 -1
- package/dist/cjs/react-querybuilder_antd.cjs.production.d.ts +116 -22
- package/dist/cjs/react-querybuilder_antd.cjs.production.js +1 -1
- package/dist/cjs/react-querybuilder_antd.cjs.production.js.map +1 -1
- package/dist/react-querybuilder_antd.d.mts +116 -22
- package/dist/react-querybuilder_antd.legacy-esm.d.mts +116 -22
- package/dist/react-querybuilder_antd.legacy-esm.js +73 -45
- package/dist/react-querybuilder_antd.legacy-esm.js.map +1 -1
- package/dist/react-querybuilder_antd.mjs +70 -42
- package/dist/react-querybuilder_antd.mjs.map +1 -1
- package/dist/react-querybuilder_antd.production.d.mts +116 -22
- package/dist/react-querybuilder_antd.production.mjs +1 -1
- package/dist/react-querybuilder_antd.production.mjs.map +1 -1
- package/package.json +9 -9
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import * as react_querybuilder from 'react-querybuilder';
|
|
2
|
-
import { ActionWithRulesProps, DragHandleProps, NotToggleProps, ShiftActionsProps, ValueEditorProps, VersatileSelectorProps, Controls } from 'react-querybuilder';
|
|
3
|
-
import { Button, Switch, Select } from 'antd';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import { ComponentPropsWithoutRef, ComponentPropsWithRef } from 'react';
|
|
6
1
|
import { HolderOutlined } from '@ant-design/icons';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
declare const AntDActionElement: {
|
|
13
|
-
({ className, handleOnClick, label, title, disabled, disabledTranslation, testID: _testID, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, ruleOrGroup: _ruleOrGroup, schema: _schema, ...extraProps }: AntDActionProps): React.JSX.Element;
|
|
14
|
-
displayName: string;
|
|
15
|
-
};
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ComponentPropsWithRef, ComponentPropsWithoutRef } from 'react';
|
|
4
|
+
import * as react_querybuilder from 'react-querybuilder';
|
|
5
|
+
import { DragHandleProps, NotToggleProps, VersatileSelectorProps, ActionWithRulesProps, ShiftActionsProps, ValueEditorProps } from 'react-querybuilder';
|
|
6
|
+
import { Switch, Select, Button } from 'antd';
|
|
16
7
|
|
|
17
8
|
type AntDDragHandleProps = DragHandleProps & {
|
|
18
9
|
label?: any;
|
|
@@ -25,8 +16,23 @@ declare const AntDNotToggle: {
|
|
|
25
16
|
displayName: string;
|
|
26
17
|
};
|
|
27
18
|
|
|
19
|
+
type AntDValueSelectorProps = VersatileSelectorProps & Omit<ComponentPropsWithoutRef<typeof Select>, 'onChange' | 'defaultValue'>;
|
|
20
|
+
declare const AntDValueSelector: {
|
|
21
|
+
({ className, handleOnChange, options, value, title, disabled, multiple, listsAsArrays, testID: _testID, rule: _rule, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, operator: _operator, field: _field, fieldData: _fieldData, schema: _schema, ...extraProps }: AntDValueSelectorProps): React.JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
type RemoveDataIndexKeys<T> = {
|
|
26
|
+
[K in keyof T as `data-${string}` extends K ? never : K]: T[K];
|
|
27
|
+
};
|
|
28
|
+
type AntDActionProps = ActionWithRulesProps & RemoveDataIndexKeys<ComponentPropsWithoutRef<typeof Button>>;
|
|
29
|
+
declare const AntDActionElement: {
|
|
30
|
+
({ className, handleOnClick, label, title, disabled, disabledTranslation, testID: _testID, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, ruleOrGroup: _ruleOrGroup, schema: _schema, ...extraProps }: AntDActionProps): React.JSX.Element;
|
|
31
|
+
displayName: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
28
34
|
declare const AntDShiftActions: {
|
|
29
|
-
({ path, disabled, className, titles, testID, lastInGroup, schema: { combinators, dispatchQuery, getQuery }, }: ShiftActionsProps): React.JSX.Element;
|
|
35
|
+
({ path, disabled, className, labels, titles, testID, lastInGroup, schema: { combinators, dispatchQuery, getQuery }, }: ShiftActionsProps): React.JSX.Element;
|
|
30
36
|
displayName: string;
|
|
31
37
|
};
|
|
32
38
|
|
|
@@ -35,13 +41,101 @@ declare const AntDValueEditor: {
|
|
|
35
41
|
displayName: string;
|
|
36
42
|
};
|
|
37
43
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
44
|
+
declare const antdControlElements: {
|
|
45
|
+
addGroupAction: {
|
|
46
|
+
({ className, handleOnClick, label, title, disabled, disabledTranslation, testID: _testID, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, ruleOrGroup: _ruleOrGroup, schema: _schema, ...extraProps }: AntDActionProps): React.JSX.Element;
|
|
47
|
+
displayName: string;
|
|
48
|
+
};
|
|
49
|
+
addRuleAction: {
|
|
50
|
+
({ className, handleOnClick, label, title, disabled, disabledTranslation, testID: _testID, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, ruleOrGroup: _ruleOrGroup, schema: _schema, ...extraProps }: AntDActionProps): React.JSX.Element;
|
|
51
|
+
displayName: string;
|
|
52
|
+
};
|
|
53
|
+
cloneGroupAction: {
|
|
54
|
+
({ className, handleOnClick, label, title, disabled, disabledTranslation, testID: _testID, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, ruleOrGroup: _ruleOrGroup, schema: _schema, ...extraProps }: AntDActionProps): React.JSX.Element;
|
|
55
|
+
displayName: string;
|
|
56
|
+
};
|
|
57
|
+
cloneRuleAction: {
|
|
58
|
+
({ className, handleOnClick, label, title, disabled, disabledTranslation, testID: _testID, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, ruleOrGroup: _ruleOrGroup, schema: _schema, ...extraProps }: AntDActionProps): React.JSX.Element;
|
|
59
|
+
displayName: string;
|
|
60
|
+
};
|
|
61
|
+
lockGroupAction: {
|
|
62
|
+
({ className, handleOnClick, label, title, disabled, disabledTranslation, testID: _testID, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, ruleOrGroup: _ruleOrGroup, schema: _schema, ...extraProps }: AntDActionProps): React.JSX.Element;
|
|
63
|
+
displayName: string;
|
|
64
|
+
};
|
|
65
|
+
lockRuleAction: {
|
|
66
|
+
({ className, handleOnClick, label, title, disabled, disabledTranslation, testID: _testID, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, ruleOrGroup: _ruleOrGroup, schema: _schema, ...extraProps }: AntDActionProps): React.JSX.Element;
|
|
67
|
+
displayName: string;
|
|
68
|
+
};
|
|
69
|
+
combinatorSelector: {
|
|
70
|
+
({ className, handleOnChange, options, value, title, disabled, multiple, listsAsArrays, testID: _testID, rule: _rule, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, operator: _operator, field: _field, fieldData: _fieldData, schema: _schema, ...extraProps }: AntDValueSelectorProps): React.JSX.Element;
|
|
71
|
+
displayName: string;
|
|
72
|
+
};
|
|
73
|
+
fieldSelector: {
|
|
74
|
+
({ className, handleOnChange, options, value, title, disabled, multiple, listsAsArrays, testID: _testID, rule: _rule, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, operator: _operator, field: _field, fieldData: _fieldData, schema: _schema, ...extraProps }: AntDValueSelectorProps): React.JSX.Element;
|
|
75
|
+
displayName: string;
|
|
76
|
+
};
|
|
77
|
+
notToggle: {
|
|
78
|
+
({ className, handleOnChange, label, checked, title, disabled, path: _path, context: _context, validation: _validation, testID: _testID, schema: _schema, ruleGroup: _ruleGroup, ...extraProps }: AntDNotToggleProps): React.JSX.Element;
|
|
79
|
+
displayName: string;
|
|
80
|
+
};
|
|
81
|
+
operatorSelector: {
|
|
82
|
+
({ className, handleOnChange, options, value, title, disabled, multiple, listsAsArrays, testID: _testID, rule: _rule, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, operator: _operator, field: _field, fieldData: _fieldData, schema: _schema, ...extraProps }: AntDValueSelectorProps): React.JSX.Element;
|
|
83
|
+
displayName: string;
|
|
84
|
+
};
|
|
85
|
+
removeGroupAction: {
|
|
86
|
+
({ className, handleOnClick, label, title, disabled, disabledTranslation, testID: _testID, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, ruleOrGroup: _ruleOrGroup, schema: _schema, ...extraProps }: AntDActionProps): React.JSX.Element;
|
|
87
|
+
displayName: string;
|
|
88
|
+
};
|
|
89
|
+
removeRuleAction: {
|
|
90
|
+
({ className, handleOnClick, label, title, disabled, disabledTranslation, testID: _testID, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, ruleOrGroup: _ruleOrGroup, schema: _schema, ...extraProps }: AntDActionProps): React.JSX.Element;
|
|
91
|
+
displayName: string;
|
|
92
|
+
};
|
|
93
|
+
valueEditor: {
|
|
94
|
+
({ fieldData, operator, value, handleOnChange, title, className, type, inputType, values, listsAsArrays, parseNumbers, separator, valueSource: _vs, disabled, testID, selectorComponent: SelectorComponent, ...props }: react_querybuilder.ValueEditorProps<react_querybuilder.Field<string, string, string, react_querybuilder.Option<string>, react_querybuilder.Option<string>>, string>): React.JSX.Element | null;
|
|
95
|
+
displayName: string;
|
|
96
|
+
};
|
|
97
|
+
dragHandle: React.ForwardRefExoticComponent<Omit<AntDDragHandleProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
98
|
+
valueSourceSelector: {
|
|
99
|
+
({ className, handleOnChange, options, value, title, disabled, multiple, listsAsArrays, testID: _testID, rule: _rule, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, operator: _operator, field: _field, fieldData: _fieldData, schema: _schema, ...extraProps }: AntDValueSelectorProps): React.JSX.Element;
|
|
100
|
+
displayName: string;
|
|
101
|
+
};
|
|
102
|
+
shiftActions: {
|
|
103
|
+
({ path, disabled, className, labels, titles, testID, lastInGroup, schema: { combinators, dispatchQuery, getQuery }, }: react_querybuilder.ShiftActionsProps): React.JSX.Element;
|
|
104
|
+
displayName: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
declare const antdTranslations: {
|
|
108
|
+
removeGroup: {
|
|
109
|
+
label: React.JSX.Element;
|
|
110
|
+
};
|
|
111
|
+
removeRule: {
|
|
112
|
+
label: React.JSX.Element;
|
|
113
|
+
};
|
|
114
|
+
cloneRule: {
|
|
115
|
+
label: React.JSX.Element;
|
|
116
|
+
};
|
|
117
|
+
cloneRuleGroup: {
|
|
118
|
+
label: React.JSX.Element;
|
|
119
|
+
};
|
|
120
|
+
lockGroup: {
|
|
121
|
+
label: React.JSX.Element;
|
|
122
|
+
};
|
|
123
|
+
lockRule: {
|
|
124
|
+
label: React.JSX.Element;
|
|
125
|
+
};
|
|
126
|
+
lockGroupDisabled: {
|
|
127
|
+
label: React.JSX.Element;
|
|
128
|
+
};
|
|
129
|
+
lockRuleDisabled: {
|
|
130
|
+
label: React.JSX.Element;
|
|
131
|
+
};
|
|
132
|
+
shiftActionUp: {
|
|
133
|
+
label: React.JSX.Element;
|
|
134
|
+
};
|
|
135
|
+
shiftActionDown: {
|
|
136
|
+
label: React.JSX.Element;
|
|
137
|
+
};
|
|
42
138
|
};
|
|
43
|
-
|
|
44
|
-
declare const antdControlElements: Partial<Controls>;
|
|
45
139
|
declare const QueryBuilderAntD: react_querybuilder.QueryBuilderContextProvider<Record<string, any>>;
|
|
46
140
|
|
|
47
|
-
export { AntDActionElement, AntDActionProps, AntDDragHandle, AntDDragHandleProps, AntDNotToggle, AntDNotToggleProps, AntDShiftActions, AntDValueEditor, AntDValueSelector, AntDValueSelectorProps, QueryBuilderAntD, antdControlElements };
|
|
141
|
+
export { AntDActionElement, AntDActionProps, AntDDragHandle, AntDDragHandleProps, AntDNotToggle, AntDNotToggleProps, AntDShiftActions, AntDValueEditor, AntDValueSelector, AntDValueSelectorProps, QueryBuilderAntD, antdControlElements, antdTranslations };
|
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import * as react_querybuilder from 'react-querybuilder';
|
|
2
|
-
import { ActionWithRulesProps, DragHandleProps, NotToggleProps, ShiftActionsProps, ValueEditorProps, VersatileSelectorProps, Controls } from 'react-querybuilder';
|
|
3
|
-
import { Button, Switch, Select } from 'antd';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import { ComponentPropsWithoutRef, ComponentPropsWithRef } from 'react';
|
|
6
1
|
import { HolderOutlined } from '@ant-design/icons';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
declare const AntDActionElement: {
|
|
13
|
-
({ className, handleOnClick, label, title, disabled, disabledTranslation, testID: _testID, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, ruleOrGroup: _ruleOrGroup, schema: _schema, ...extraProps }: AntDActionProps): React.JSX.Element;
|
|
14
|
-
displayName: string;
|
|
15
|
-
};
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ComponentPropsWithRef, ComponentPropsWithoutRef } from 'react';
|
|
4
|
+
import * as react_querybuilder from 'react-querybuilder';
|
|
5
|
+
import { DragHandleProps, NotToggleProps, VersatileSelectorProps, ActionWithRulesProps, ShiftActionsProps, ValueEditorProps } from 'react-querybuilder';
|
|
6
|
+
import { Switch, Select, Button } from 'antd';
|
|
16
7
|
|
|
17
8
|
type AntDDragHandleProps = DragHandleProps & {
|
|
18
9
|
label?: any;
|
|
@@ -25,8 +16,23 @@ declare const AntDNotToggle: {
|
|
|
25
16
|
displayName: string;
|
|
26
17
|
};
|
|
27
18
|
|
|
19
|
+
type AntDValueSelectorProps = VersatileSelectorProps & Omit<ComponentPropsWithoutRef<typeof Select>, 'onChange' | 'defaultValue'>;
|
|
20
|
+
declare const AntDValueSelector: {
|
|
21
|
+
({ className, handleOnChange, options, value, title, disabled, multiple, listsAsArrays, testID: _testID, rule: _rule, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, operator: _operator, field: _field, fieldData: _fieldData, schema: _schema, ...extraProps }: AntDValueSelectorProps): React.JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
type RemoveDataIndexKeys<T> = {
|
|
26
|
+
[K in keyof T as `data-${string}` extends K ? never : K]: T[K];
|
|
27
|
+
};
|
|
28
|
+
type AntDActionProps = ActionWithRulesProps & RemoveDataIndexKeys<ComponentPropsWithoutRef<typeof Button>>;
|
|
29
|
+
declare const AntDActionElement: {
|
|
30
|
+
({ className, handleOnClick, label, title, disabled, disabledTranslation, testID: _testID, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, ruleOrGroup: _ruleOrGroup, schema: _schema, ...extraProps }: AntDActionProps): React.JSX.Element;
|
|
31
|
+
displayName: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
28
34
|
declare const AntDShiftActions: {
|
|
29
|
-
({ path, disabled, className, titles, testID, lastInGroup, schema: { combinators, dispatchQuery, getQuery }, }: ShiftActionsProps): React.JSX.Element;
|
|
35
|
+
({ path, disabled, className, labels, titles, testID, lastInGroup, schema: { combinators, dispatchQuery, getQuery }, }: ShiftActionsProps): React.JSX.Element;
|
|
30
36
|
displayName: string;
|
|
31
37
|
};
|
|
32
38
|
|
|
@@ -35,13 +41,101 @@ declare const AntDValueEditor: {
|
|
|
35
41
|
displayName: string;
|
|
36
42
|
};
|
|
37
43
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
44
|
+
declare const antdControlElements: {
|
|
45
|
+
addGroupAction: {
|
|
46
|
+
({ className, handleOnClick, label, title, disabled, disabledTranslation, testID: _testID, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, ruleOrGroup: _ruleOrGroup, schema: _schema, ...extraProps }: AntDActionProps): React.JSX.Element;
|
|
47
|
+
displayName: string;
|
|
48
|
+
};
|
|
49
|
+
addRuleAction: {
|
|
50
|
+
({ className, handleOnClick, label, title, disabled, disabledTranslation, testID: _testID, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, ruleOrGroup: _ruleOrGroup, schema: _schema, ...extraProps }: AntDActionProps): React.JSX.Element;
|
|
51
|
+
displayName: string;
|
|
52
|
+
};
|
|
53
|
+
cloneGroupAction: {
|
|
54
|
+
({ className, handleOnClick, label, title, disabled, disabledTranslation, testID: _testID, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, ruleOrGroup: _ruleOrGroup, schema: _schema, ...extraProps }: AntDActionProps): React.JSX.Element;
|
|
55
|
+
displayName: string;
|
|
56
|
+
};
|
|
57
|
+
cloneRuleAction: {
|
|
58
|
+
({ className, handleOnClick, label, title, disabled, disabledTranslation, testID: _testID, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, ruleOrGroup: _ruleOrGroup, schema: _schema, ...extraProps }: AntDActionProps): React.JSX.Element;
|
|
59
|
+
displayName: string;
|
|
60
|
+
};
|
|
61
|
+
lockGroupAction: {
|
|
62
|
+
({ className, handleOnClick, label, title, disabled, disabledTranslation, testID: _testID, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, ruleOrGroup: _ruleOrGroup, schema: _schema, ...extraProps }: AntDActionProps): React.JSX.Element;
|
|
63
|
+
displayName: string;
|
|
64
|
+
};
|
|
65
|
+
lockRuleAction: {
|
|
66
|
+
({ className, handleOnClick, label, title, disabled, disabledTranslation, testID: _testID, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, ruleOrGroup: _ruleOrGroup, schema: _schema, ...extraProps }: AntDActionProps): React.JSX.Element;
|
|
67
|
+
displayName: string;
|
|
68
|
+
};
|
|
69
|
+
combinatorSelector: {
|
|
70
|
+
({ className, handleOnChange, options, value, title, disabled, multiple, listsAsArrays, testID: _testID, rule: _rule, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, operator: _operator, field: _field, fieldData: _fieldData, schema: _schema, ...extraProps }: AntDValueSelectorProps): React.JSX.Element;
|
|
71
|
+
displayName: string;
|
|
72
|
+
};
|
|
73
|
+
fieldSelector: {
|
|
74
|
+
({ className, handleOnChange, options, value, title, disabled, multiple, listsAsArrays, testID: _testID, rule: _rule, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, operator: _operator, field: _field, fieldData: _fieldData, schema: _schema, ...extraProps }: AntDValueSelectorProps): React.JSX.Element;
|
|
75
|
+
displayName: string;
|
|
76
|
+
};
|
|
77
|
+
notToggle: {
|
|
78
|
+
({ className, handleOnChange, label, checked, title, disabled, path: _path, context: _context, validation: _validation, testID: _testID, schema: _schema, ruleGroup: _ruleGroup, ...extraProps }: AntDNotToggleProps): React.JSX.Element;
|
|
79
|
+
displayName: string;
|
|
80
|
+
};
|
|
81
|
+
operatorSelector: {
|
|
82
|
+
({ className, handleOnChange, options, value, title, disabled, multiple, listsAsArrays, testID: _testID, rule: _rule, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, operator: _operator, field: _field, fieldData: _fieldData, schema: _schema, ...extraProps }: AntDValueSelectorProps): React.JSX.Element;
|
|
83
|
+
displayName: string;
|
|
84
|
+
};
|
|
85
|
+
removeGroupAction: {
|
|
86
|
+
({ className, handleOnClick, label, title, disabled, disabledTranslation, testID: _testID, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, ruleOrGroup: _ruleOrGroup, schema: _schema, ...extraProps }: AntDActionProps): React.JSX.Element;
|
|
87
|
+
displayName: string;
|
|
88
|
+
};
|
|
89
|
+
removeRuleAction: {
|
|
90
|
+
({ className, handleOnClick, label, title, disabled, disabledTranslation, testID: _testID, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, ruleOrGroup: _ruleOrGroup, schema: _schema, ...extraProps }: AntDActionProps): React.JSX.Element;
|
|
91
|
+
displayName: string;
|
|
92
|
+
};
|
|
93
|
+
valueEditor: {
|
|
94
|
+
({ fieldData, operator, value, handleOnChange, title, className, type, inputType, values, listsAsArrays, parseNumbers, separator, valueSource: _vs, disabled, testID, selectorComponent: SelectorComponent, ...props }: react_querybuilder.ValueEditorProps<react_querybuilder.Field<string, string, string, react_querybuilder.Option<string>, react_querybuilder.Option<string>>, string>): React.JSX.Element | null;
|
|
95
|
+
displayName: string;
|
|
96
|
+
};
|
|
97
|
+
dragHandle: React.ForwardRefExoticComponent<Omit<AntDDragHandleProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
98
|
+
valueSourceSelector: {
|
|
99
|
+
({ className, handleOnChange, options, value, title, disabled, multiple, listsAsArrays, testID: _testID, rule: _rule, rules: _rules, level: _level, path: _path, context: _context, validation: _validation, operator: _operator, field: _field, fieldData: _fieldData, schema: _schema, ...extraProps }: AntDValueSelectorProps): React.JSX.Element;
|
|
100
|
+
displayName: string;
|
|
101
|
+
};
|
|
102
|
+
shiftActions: {
|
|
103
|
+
({ path, disabled, className, labels, titles, testID, lastInGroup, schema: { combinators, dispatchQuery, getQuery }, }: react_querybuilder.ShiftActionsProps): React.JSX.Element;
|
|
104
|
+
displayName: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
declare const antdTranslations: {
|
|
108
|
+
removeGroup: {
|
|
109
|
+
label: React.JSX.Element;
|
|
110
|
+
};
|
|
111
|
+
removeRule: {
|
|
112
|
+
label: React.JSX.Element;
|
|
113
|
+
};
|
|
114
|
+
cloneRule: {
|
|
115
|
+
label: React.JSX.Element;
|
|
116
|
+
};
|
|
117
|
+
cloneRuleGroup: {
|
|
118
|
+
label: React.JSX.Element;
|
|
119
|
+
};
|
|
120
|
+
lockGroup: {
|
|
121
|
+
label: React.JSX.Element;
|
|
122
|
+
};
|
|
123
|
+
lockRule: {
|
|
124
|
+
label: React.JSX.Element;
|
|
125
|
+
};
|
|
126
|
+
lockGroupDisabled: {
|
|
127
|
+
label: React.JSX.Element;
|
|
128
|
+
};
|
|
129
|
+
lockRuleDisabled: {
|
|
130
|
+
label: React.JSX.Element;
|
|
131
|
+
};
|
|
132
|
+
shiftActionUp: {
|
|
133
|
+
label: React.JSX.Element;
|
|
134
|
+
};
|
|
135
|
+
shiftActionDown: {
|
|
136
|
+
label: React.JSX.Element;
|
|
137
|
+
};
|
|
42
138
|
};
|
|
43
|
-
|
|
44
|
-
declare const antdControlElements: Partial<Controls>;
|
|
45
139
|
declare const QueryBuilderAntD: react_querybuilder.QueryBuilderContextProvider<Record<string, any>>;
|
|
46
140
|
|
|
47
|
-
export { AntDActionElement, AntDActionProps, AntDDragHandle, AntDDragHandleProps, AntDNotToggle, AntDNotToggleProps, AntDShiftActions, AntDValueEditor, AntDValueSelector, AntDValueSelectorProps, QueryBuilderAntD, antdControlElements };
|
|
141
|
+
export { AntDActionElement, AntDActionProps, AntDDragHandle, AntDDragHandleProps, AntDNotToggle, AntDNotToggleProps, AntDShiftActions, AntDValueEditor, AntDValueSelector, AntDValueSelectorProps, QueryBuilderAntD, antdControlElements, antdTranslations };
|
|
@@ -988,12 +988,20 @@ var require_dayjs = __commonJS({
|
|
|
988
988
|
}
|
|
989
989
|
}
|
|
990
990
|
};
|
|
991
|
-
var _default = generateConfig;
|
|
992
|
-
exports.default = _default;
|
|
991
|
+
var _default = exports.default = generateConfig;
|
|
993
992
|
}
|
|
994
993
|
});
|
|
995
994
|
|
|
996
|
-
// src/index.
|
|
995
|
+
// src/index.tsx
|
|
996
|
+
import {
|
|
997
|
+
CloseOutlined,
|
|
998
|
+
CopyOutlined,
|
|
999
|
+
DownOutlined,
|
|
1000
|
+
LockOutlined,
|
|
1001
|
+
UnlockOutlined,
|
|
1002
|
+
UpOutlined
|
|
1003
|
+
} from "@ant-design/icons";
|
|
1004
|
+
import * as React8 from "react";
|
|
997
1005
|
import { getCompatContextProvider } from "react-querybuilder";
|
|
998
1006
|
|
|
999
1007
|
// src/AntDActionElement.tsx
|
|
@@ -1131,7 +1139,6 @@ var AntDNotToggle = (_a) => {
|
|
|
1131
1139
|
AntDNotToggle.displayName = "AntDNotToggle";
|
|
1132
1140
|
|
|
1133
1141
|
// src/AntDShiftActions.tsx
|
|
1134
|
-
import { CaretDownOutlined, CaretUpOutlined } from "@ant-design/icons";
|
|
1135
1142
|
import { Button as Button2 } from "antd";
|
|
1136
1143
|
import * as React4 from "react";
|
|
1137
1144
|
import { useShiftActions } from "react-querybuilder";
|
|
@@ -1139,7 +1146,7 @@ var AntDShiftActions = ({
|
|
|
1139
1146
|
path,
|
|
1140
1147
|
disabled,
|
|
1141
1148
|
className,
|
|
1142
|
-
|
|
1149
|
+
labels,
|
|
1143
1150
|
titles,
|
|
1144
1151
|
testID,
|
|
1145
1152
|
lastInGroup,
|
|
@@ -1162,7 +1169,7 @@ var AntDShiftActions = ({
|
|
|
1162
1169
|
onClick: shiftUp,
|
|
1163
1170
|
disabled: shiftUpDisabled
|
|
1164
1171
|
},
|
|
1165
|
-
|
|
1172
|
+
labels == null ? void 0 : labels.shiftUp
|
|
1166
1173
|
), /* @__PURE__ */ React4.createElement(
|
|
1167
1174
|
Button2,
|
|
1168
1175
|
{
|
|
@@ -1172,7 +1179,7 @@ var AntDShiftActions = ({
|
|
|
1172
1179
|
onClick: shiftDown,
|
|
1173
1180
|
disabled: shiftDownDisabled
|
|
1174
1181
|
},
|
|
1175
|
-
|
|
1182
|
+
labels == null ? void 0 : labels.shiftDown
|
|
1176
1183
|
));
|
|
1177
1184
|
};
|
|
1178
1185
|
AntDShiftActions.displayName = "AntDShiftActions";
|
|
@@ -1180,14 +1187,10 @@ AntDShiftActions.displayName = "AntDShiftActions";
|
|
|
1180
1187
|
// src/AntDValueEditor.tsx
|
|
1181
1188
|
var import_dayjs = __toESM(require_dayjs_min());
|
|
1182
1189
|
var import_dayjs2 = __toESM(require_dayjs());
|
|
1183
|
-
import {
|
|
1190
|
+
import { Checkbox, Input, Radio, Switch as Switch2 } from "antd";
|
|
1191
|
+
import generatePicker from "antd/es/date-picker/generatePicker/index.js";
|
|
1184
1192
|
import * as React7 from "react";
|
|
1185
|
-
import {
|
|
1186
|
-
getFirstOption,
|
|
1187
|
-
standardClassnames,
|
|
1188
|
-
toArray,
|
|
1189
|
-
useValueEditor
|
|
1190
|
-
} from "react-querybuilder";
|
|
1193
|
+
import { getFirstOption, joinWith, standardClassnames, useValueEditor } from "react-querybuilder";
|
|
1191
1194
|
|
|
1192
1195
|
// src/AntDValueSelector.tsx
|
|
1193
1196
|
import { Select as Select2 } from "antd";
|
|
@@ -1264,7 +1267,7 @@ var AntDValueSelector = (_a) => {
|
|
|
1264
1267
|
AntDValueSelector.displayName = "AntDValueSelector";
|
|
1265
1268
|
|
|
1266
1269
|
// src/AntDValueEditor.tsx
|
|
1267
|
-
var DatePicker =
|
|
1270
|
+
var DatePicker = generatePicker(import_dayjs2.default);
|
|
1268
1271
|
var AntDValueEditor = (_a) => {
|
|
1269
1272
|
var _b = _a, {
|
|
1270
1273
|
fieldData,
|
|
@@ -1301,7 +1304,7 @@ var AntDValueEditor = (_a) => {
|
|
|
1301
1304
|
"testID",
|
|
1302
1305
|
"selectorComponent"
|
|
1303
1306
|
]);
|
|
1304
|
-
var _a2
|
|
1307
|
+
var _a2;
|
|
1305
1308
|
const { valueAsArray, multiValueHandler } = useValueEditor({
|
|
1306
1309
|
handleOnChange,
|
|
1307
1310
|
inputType,
|
|
@@ -1320,11 +1323,11 @@ var AntDValueEditor = (_a) => {
|
|
|
1320
1323
|
if ((operator === "between" || operator === "notBetween") && (type === "select" || type === "text") && // Date ranges are handled differently in AntD--see below
|
|
1321
1324
|
inputTypeCoerced !== "date" && inputTypeCoerced !== "datetime-local") {
|
|
1322
1325
|
const editors = ["from", "to"].map((key, i) => {
|
|
1323
|
-
var _a3,
|
|
1326
|
+
var _a3, _b2;
|
|
1324
1327
|
if (type === "text") {
|
|
1325
1328
|
if (inputTypeCoerced === "time") {
|
|
1326
1329
|
return /* @__PURE__ */ React7.createElement(
|
|
1327
|
-
TimePicker,
|
|
1330
|
+
DatePicker.TimePicker,
|
|
1328
1331
|
{
|
|
1329
1332
|
key,
|
|
1330
1333
|
value: valueAsArray[i] ? (0, import_dayjs.default)(valueAsArray[i], "HH:mm:ss") : null,
|
|
@@ -1358,7 +1361,7 @@ var AntDValueEditor = (_a) => {
|
|
|
1358
1361
|
className: standardClassnames.valueListItem,
|
|
1359
1362
|
handleOnChange: (v) => multiValueHandler(v, i),
|
|
1360
1363
|
disabled,
|
|
1361
|
-
value: (
|
|
1364
|
+
value: (_b2 = valueAsArray[i]) != null ? _b2 : getFirstOption(values),
|
|
1362
1365
|
options: values,
|
|
1363
1366
|
listsAsArrays
|
|
1364
1367
|
})
|
|
@@ -1430,28 +1433,36 @@ var AntDValueEditor = (_a) => {
|
|
|
1430
1433
|
}
|
|
1431
1434
|
switch (inputTypeCoerced) {
|
|
1432
1435
|
case "date":
|
|
1433
|
-
case "datetime-local":
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
(
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1436
|
+
case "datetime-local": {
|
|
1437
|
+
if (operator === "between" || operator === "notBetween") {
|
|
1438
|
+
const dayjsArray = valueAsArray.slice(0, 2).map(import_dayjs.default);
|
|
1439
|
+
return /* @__PURE__ */ React7.createElement(
|
|
1440
|
+
DatePicker.RangePicker,
|
|
1441
|
+
{
|
|
1442
|
+
value: dayjsArray.every((d) => d.isValid()) ? dayjsArray : void 0,
|
|
1443
|
+
showTime: inputTypeCoerced === "datetime-local",
|
|
1444
|
+
className,
|
|
1445
|
+
disabled,
|
|
1446
|
+
placeholder: [placeHolderText, placeHolderText],
|
|
1447
|
+
onChange: (
|
|
1448
|
+
/* istanbul ignore next */
|
|
1449
|
+
(dates) => {
|
|
1450
|
+
const timeFormat = inputTypeCoerced === "datetime-local" ? "THH:mm:ss" : "";
|
|
1451
|
+
const format = `YYYY-MM-DD${timeFormat}`;
|
|
1452
|
+
const dateArray = dates == null ? void 0 : dates.map((d) => (d == null ? void 0 : d.isValid()) ? d.format(format) : void 0);
|
|
1453
|
+
handleOnChange(
|
|
1454
|
+
dateArray ? listsAsArrays ? dateArray : joinWith(dateArray, ",") : dates
|
|
1455
|
+
);
|
|
1456
|
+
}
|
|
1457
|
+
)
|
|
1458
|
+
}
|
|
1459
|
+
);
|
|
1460
|
+
}
|
|
1461
|
+
const dateValue = (0, import_dayjs.default)(value);
|
|
1462
|
+
return /* @__PURE__ */ React7.createElement(
|
|
1452
1463
|
DatePicker,
|
|
1453
1464
|
{
|
|
1454
|
-
value:
|
|
1465
|
+
value: dateValue.isValid() ? dateValue : void 0,
|
|
1455
1466
|
showTime: inputTypeCoerced === "datetime-local",
|
|
1456
1467
|
className,
|
|
1457
1468
|
disabled,
|
|
@@ -1459,11 +1470,13 @@ var AntDValueEditor = (_a) => {
|
|
|
1459
1470
|
onChange: (_d, dateString) => handleOnChange(dateString)
|
|
1460
1471
|
}
|
|
1461
1472
|
);
|
|
1462
|
-
|
|
1473
|
+
}
|
|
1474
|
+
case "time": {
|
|
1475
|
+
const dateValue = (0, import_dayjs.default)(value, "HH:mm:ss");
|
|
1463
1476
|
return /* @__PURE__ */ React7.createElement(
|
|
1464
|
-
TimePicker,
|
|
1477
|
+
DatePicker.TimePicker,
|
|
1465
1478
|
{
|
|
1466
|
-
value:
|
|
1479
|
+
value: dateValue.isValid() ? dateValue : void 0,
|
|
1467
1480
|
className,
|
|
1468
1481
|
disabled,
|
|
1469
1482
|
placeholder: placeHolderText,
|
|
@@ -1473,6 +1486,7 @@ var AntDValueEditor = (_a) => {
|
|
|
1473
1486
|
}
|
|
1474
1487
|
}
|
|
1475
1488
|
);
|
|
1489
|
+
}
|
|
1476
1490
|
}
|
|
1477
1491
|
return /* @__PURE__ */ React7.createElement(
|
|
1478
1492
|
Input,
|
|
@@ -1489,7 +1503,7 @@ var AntDValueEditor = (_a) => {
|
|
|
1489
1503
|
};
|
|
1490
1504
|
AntDValueEditor.displayName = "AntDValueEditor";
|
|
1491
1505
|
|
|
1492
|
-
// src/index.
|
|
1506
|
+
// src/index.tsx
|
|
1493
1507
|
var antdControlElements = {
|
|
1494
1508
|
addGroupAction: AntDActionElement,
|
|
1495
1509
|
addRuleAction: AntDActionElement,
|
|
@@ -1508,9 +1522,22 @@ var antdControlElements = {
|
|
|
1508
1522
|
valueSourceSelector: AntDValueSelector,
|
|
1509
1523
|
shiftActions: AntDShiftActions
|
|
1510
1524
|
};
|
|
1525
|
+
var antdTranslations = {
|
|
1526
|
+
removeGroup: { label: /* @__PURE__ */ React8.createElement(CloseOutlined, null) },
|
|
1527
|
+
removeRule: { label: /* @__PURE__ */ React8.createElement(CloseOutlined, null) },
|
|
1528
|
+
cloneRule: { label: /* @__PURE__ */ React8.createElement(CopyOutlined, null) },
|
|
1529
|
+
cloneRuleGroup: { label: /* @__PURE__ */ React8.createElement(CopyOutlined, null) },
|
|
1530
|
+
lockGroup: { label: /* @__PURE__ */ React8.createElement(UnlockOutlined, null) },
|
|
1531
|
+
lockRule: { label: /* @__PURE__ */ React8.createElement(UnlockOutlined, null) },
|
|
1532
|
+
lockGroupDisabled: { label: /* @__PURE__ */ React8.createElement(LockOutlined, null) },
|
|
1533
|
+
lockRuleDisabled: { label: /* @__PURE__ */ React8.createElement(LockOutlined, null) },
|
|
1534
|
+
shiftActionUp: { label: /* @__PURE__ */ React8.createElement(UpOutlined, null) },
|
|
1535
|
+
shiftActionDown: { label: /* @__PURE__ */ React8.createElement(DownOutlined, null) }
|
|
1536
|
+
};
|
|
1511
1537
|
var QueryBuilderAntD = getCompatContextProvider({
|
|
1512
1538
|
key: "antd",
|
|
1513
|
-
controlElements: antdControlElements
|
|
1539
|
+
controlElements: antdControlElements,
|
|
1540
|
+
translations: antdTranslations
|
|
1514
1541
|
});
|
|
1515
1542
|
export {
|
|
1516
1543
|
AntDActionElement,
|
|
@@ -1520,6 +1547,7 @@ export {
|
|
|
1520
1547
|
AntDValueEditor,
|
|
1521
1548
|
AntDValueSelector,
|
|
1522
1549
|
QueryBuilderAntD,
|
|
1523
|
-
antdControlElements
|
|
1550
|
+
antdControlElements,
|
|
1551
|
+
antdTranslations
|
|
1524
1552
|
};
|
|
1525
1553
|
//# sourceMappingURL=react-querybuilder_antd.legacy-esm.js.map
|