@react-querybuilder/antd 7.0.0-alpha.1 → 7.0.0-alpha.3

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/README.md CHANGED
@@ -31,7 +31,7 @@ const App = () => {
31
31
 
32
32
  return (
33
33
  <QueryBuilderAntD>
34
- <QueryBuilder fields={fields} query={query} onQueryChange={q => setQuery(q)} />
34
+ <QueryBuilder fields={fields} query={query} onQueryChange={setQuery} />
35
35
  </QueryBuilderAntD>
36
36
  );
37
37
  };
@@ -1,14 +1,15 @@
1
- import { HolderOutlined } from '@ant-design/icons';
1
+ import { Select, Switch, Button } from 'antd';
2
2
  import * as React from 'react';
3
- import { ComponentPropsWithRef, ComponentPropsWithoutRef } from 'react';
3
+ import { ComponentPropsWithoutRef, ComponentPropsWithRef } from 'react';
4
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';
5
+ import { VersatileSelectorProps, NotToggleProps, DragHandleProps, ActionWithRulesProps, ShiftActionsProps, ValueEditorProps, Field } from 'react-querybuilder';
6
+ import { HolderOutlined } from '@ant-design/icons';
7
7
 
8
- type AntDDragHandleProps = DragHandleProps & {
9
- label?: any;
10
- } & ComponentPropsWithRef<typeof HolderOutlined>;
11
- declare const AntDDragHandle: React.ForwardRefExoticComponent<Omit<AntDDragHandleProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
8
+ type AntDValueSelectorProps = VersatileSelectorProps & Omit<ComponentPropsWithoutRef<typeof Select>, 'onChange' | 'defaultValue'>;
9
+ declare const AntDValueSelector: {
10
+ ({ 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;
11
+ displayName: string;
12
+ };
12
13
 
13
14
  type AntDNotToggleProps = NotToggleProps & ComponentPropsWithoutRef<typeof Switch>;
14
15
  declare const AntDNotToggle: {
@@ -16,11 +17,10 @@ declare const AntDNotToggle: {
16
17
  displayName: string;
17
18
  };
18
19
 
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
- };
20
+ type AntDDragHandleProps = DragHandleProps & {
21
+ label?: any;
22
+ } & ComponentPropsWithRef<typeof HolderOutlined>;
23
+ declare const AntDDragHandle: React.ForwardRefExoticComponent<Omit<AntDDragHandleProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
24
24
 
25
25
  type RemoveDataIndexKeys<T> = {
26
26
  [K in keyof T as `data-${string}` extends K ? never : K]: T[K];
@@ -32,77 +32,37 @@ declare const AntDActionElement: {
32
32
  };
33
33
 
34
34
  declare const AntDShiftActions: {
35
- ({ path, disabled, className, labels, titles, testID, lastInGroup, schema: { combinators, dispatchQuery, getQuery }, }: ShiftActionsProps): React.JSX.Element;
35
+ ({ shiftUp, shiftDown, shiftUpDisabled, shiftDownDisabled, disabled, className, labels, titles, testID, }: ShiftActionsProps): React.JSX.Element;
36
36
  displayName: string;
37
37
  };
38
38
 
39
39
  declare const AntDValueEditor: {
40
- ({ fieldData, operator, value, handleOnChange, title, className, type, inputType, values, listsAsArrays, parseNumbers, separator, valueSource: _vs, disabled, testID, selectorComponent: SelectorComponent, ...props }: ValueEditorProps): React.JSX.Element | null;
40
+ (allProps: ValueEditorProps): React.JSX.Element | null;
41
41
  displayName: string;
42
42
  };
43
43
 
44
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: {
45
+ actionElement: {
66
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;
67
47
  displayName: string;
68
48
  };
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
- };
49
+ dragHandle: React.ForwardRefExoticComponent<Omit<AntDDragHandleProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
77
50
  notToggle: {
78
51
  ({ className, handleOnChange, label, checked, title, disabled, path: _path, context: _context, validation: _validation, testID: _testID, schema: _schema, ruleGroup: _ruleGroup, ...extraProps }: AntDNotToggleProps): React.JSX.Element;
79
52
  displayName: string;
80
53
  };
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;
54
+ shiftActions: {
55
+ ({ shiftUp, shiftDown, shiftUpDisabled, shiftDownDisabled, disabled, className, labels, titles, testID, }: react_querybuilder.ShiftActionsProps): React.JSX.Element;
91
56
  displayName: string;
92
57
  };
93
58
  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;
59
+ (allProps: react_querybuilder.ValueEditorProps<Field<string, string, string, react_querybuilder.Option<string>, react_querybuilder.Option<string>>, string>): React.JSX.Element | null;
95
60
  displayName: string;
96
61
  };
97
- dragHandle: React.ForwardRefExoticComponent<Omit<AntDDragHandleProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
98
- valueSourceSelector: {
62
+ valueSelector: {
99
63
  ({ 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
64
  displayName: string;
101
65
  };
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
66
  };
107
67
  declare const antdTranslations: {
108
68
  removeGroup: {
@@ -138,4 +98,4 @@ declare const antdTranslations: {
138
98
  };
139
99
  declare const QueryBuilderAntD: react_querybuilder.QueryBuilderContextProvider<Record<string, any>>;
140
100
 
141
- export { AntDActionElement, AntDActionProps, AntDDragHandle, AntDDragHandleProps, AntDNotToggle, AntDNotToggleProps, AntDShiftActions, AntDValueEditor, AntDValueSelector, AntDValueSelectorProps, QueryBuilderAntD, antdControlElements, antdTranslations };
101
+ export { AntDActionElement, type AntDActionProps, AntDDragHandle, type AntDDragHandleProps, AntDNotToggle, type AntDNotToggleProps, AntDShiftActions, AntDValueEditor, AntDValueSelector, type AntDValueSelectorProps, QueryBuilderAntD, antdControlElements, antdTranslations };