@progress/kendo-react-dropdowns 5.18.0-dev.202309120912 → 5.18.0-dev.202309120952

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.
@@ -12,5 +12,59 @@ export declare const DropDownTreePropsContext: React.Context<(p: DropDownTreePro
12
12
  *
13
13
  * Accepts properties of type [DropDownTreeProps]({% slug api_dropdowns_dropdowntreeprops %}).
14
14
  * Obtaining the `ref` returns an object of type [DropDownTreeHandle]({% slug api_dropdowns_dropdowntreehandle %}).
15
+ *
16
+ * @example
17
+ * ```jsx
18
+ * const selectField = "selected";
19
+ * const expandField = "expanded";
20
+ * const dataItemKey = "id";
21
+ * const textField = "text";
22
+ * const subItemsField = "items";
23
+ * const fields = {
24
+ * selectField,
25
+ * expandField,
26
+ * dataItemKey,
27
+ * subItemsField,
28
+ * };
29
+ * const App = () => {
30
+ * const [value, setValue] = React.useState(null);
31
+ * const [expanded, setExpanded] = React.useState([data[0][dataItemKey]]);
32
+ * const onChange = (event) => setValue(event.value);
33
+ * const onExpandChange = React.useCallback(
34
+ * (event) => setExpanded(expandedState(event.item, dataItemKey, expanded)),
35
+ * [expanded]
36
+ * );
37
+ * const treeData = React.useMemo(
38
+ * () =>
39
+ * processTreeData(
40
+ * data,
41
+ * {
42
+ * expanded,
43
+ * value,
44
+ * },
45
+ * fields
46
+ * ),
47
+ * [expanded, value]
48
+ * );
49
+ *
50
+ * return (
51
+ * <DropDownTree
52
+ * style={{
53
+ * width: '300px',
54
+ * }}
55
+ * placeholder="Please select ..."
56
+ * data={treeData}
57
+ * value={value}
58
+ * onChange={onChange}
59
+ * textField={textField}
60
+ * dataItemKey={dataItemKey}
61
+ * selectField={selectField}
62
+ * expandField={expandField}
63
+ * onExpandChange={onExpandChange}
64
+ * />
65
+ * );
66
+ * };
67
+ * ReactDOM.render(<App />, document.querySelector('my-app'));
68
+ * ```
15
69
  */
16
70
  export declare const DropDownTree: React.ForwardRefExoticComponent<DropDownTreeProps & React.RefAttributes<DropDownTreeHandle | null>>;
@@ -80,6 +80,60 @@ export var DropDownTreePropsContext = createPropsContext();
80
80
  *
81
81
  * Accepts properties of type [DropDownTreeProps]({% slug api_dropdowns_dropdowntreeprops %}).
82
82
  * Obtaining the `ref` returns an object of type [DropDownTreeHandle]({% slug api_dropdowns_dropdowntreehandle %}).
83
+ *
84
+ * @example
85
+ * ```jsx
86
+ * const selectField = "selected";
87
+ * const expandField = "expanded";
88
+ * const dataItemKey = "id";
89
+ * const textField = "text";
90
+ * const subItemsField = "items";
91
+ * const fields = {
92
+ * selectField,
93
+ * expandField,
94
+ * dataItemKey,
95
+ * subItemsField,
96
+ * };
97
+ * const App = () => {
98
+ * const [value, setValue] = React.useState(null);
99
+ * const [expanded, setExpanded] = React.useState([data[0][dataItemKey]]);
100
+ * const onChange = (event) => setValue(event.value);
101
+ * const onExpandChange = React.useCallback(
102
+ * (event) => setExpanded(expandedState(event.item, dataItemKey, expanded)),
103
+ * [expanded]
104
+ * );
105
+ * const treeData = React.useMemo(
106
+ * () =>
107
+ * processTreeData(
108
+ * data,
109
+ * {
110
+ * expanded,
111
+ * value,
112
+ * },
113
+ * fields
114
+ * ),
115
+ * [expanded, value]
116
+ * );
117
+ *
118
+ * return (
119
+ * <DropDownTree
120
+ * style={{
121
+ * width: '300px',
122
+ * }}
123
+ * placeholder="Please select ..."
124
+ * data={treeData}
125
+ * value={value}
126
+ * onChange={onChange}
127
+ * textField={textField}
128
+ * dataItemKey={dataItemKey}
129
+ * selectField={selectField}
130
+ * expandField={expandField}
131
+ * onExpandChange={onExpandChange}
132
+ * />
133
+ * );
134
+ * };
135
+ * ReactDOM.render(<App />, document.querySelector('my-app'));
136
+ * ```
83
137
  */
84
138
  export var DropDownTree = React.forwardRef(function (directProps, ref) {
85
139
  var _a;
@@ -246,5 +246,42 @@ export declare const MultiColumnComboBoxPropsContext: React.Context<(p: MultiCol
246
246
  * Accepts properties of type [MultiColumnComboBoxProps]({% slug api_dropdowns_multicolumncomboboxprops %}).
247
247
  * Obtaining the `ref` returns an object of type [MultiColumnComboBoxHandle]({% slug api_dropdowns_multicolumncomboboxhandle %}).
248
248
  *
249
+ * @example
250
+ * ```jsx
251
+ * const columns = [
252
+ * {
253
+ * field: "id",
254
+ * header: "ID",
255
+ * width: "100px",
256
+ * },
257
+ * {
258
+ * field: "name",
259
+ * header: "Name",
260
+ * width: "300px",
261
+ * },
262
+ * {
263
+ * field: "position",
264
+ * header: "Position",
265
+ * width: "300px",
266
+ * },
267
+ * ];
268
+ * const App = () => {
269
+ * return (
270
+ * <div>
271
+ * <div>Employees:</div>
272
+ * <MultiColumnComboBox
273
+ * data={employees}
274
+ * columns={columns}
275
+ * textField={"name"}
276
+ * style={{
277
+ * width: "300px",
278
+ * }}
279
+ * placeholder="Please select ..."
280
+ * />
281
+ * </div>
282
+ * );
283
+ * };
284
+ * ReactDOM.render(<App />, document.querySelector("my-app"));
285
+ * ```
249
286
  */
250
287
  export declare const MultiColumnComboBox: React.ForwardRefExoticComponent<MultiColumnComboBoxProps & React.RefAttributes<MultiColumnComboBoxHandle | null>>;
@@ -46,6 +46,43 @@ export var MultiColumnComboBoxPropsContext = createPropsContext();
46
46
  * Accepts properties of type [MultiColumnComboBoxProps]({% slug api_dropdowns_multicolumncomboboxprops %}).
47
47
  * Obtaining the `ref` returns an object of type [MultiColumnComboBoxHandle]({% slug api_dropdowns_multicolumncomboboxhandle %}).
48
48
  *
49
+ * @example
50
+ * ```jsx
51
+ * const columns = [
52
+ * {
53
+ * field: "id",
54
+ * header: "ID",
55
+ * width: "100px",
56
+ * },
57
+ * {
58
+ * field: "name",
59
+ * header: "Name",
60
+ * width: "300px",
61
+ * },
62
+ * {
63
+ * field: "position",
64
+ * header: "Position",
65
+ * width: "300px",
66
+ * },
67
+ * ];
68
+ * const App = () => {
69
+ * return (
70
+ * <div>
71
+ * <div>Employees:</div>
72
+ * <MultiColumnComboBox
73
+ * data={employees}
74
+ * columns={columns}
75
+ * textField={"name"}
76
+ * style={{
77
+ * width: "300px",
78
+ * }}
79
+ * placeholder="Please select ..."
80
+ * />
81
+ * </div>
82
+ * );
83
+ * };
84
+ * ReactDOM.render(<App />, document.querySelector("my-app"));
85
+ * ```
49
86
  */
50
87
  export var MultiColumnComboBox = React.forwardRef(function (directProps, ref) {
51
88
  var props = usePropsContext(MultiColumnComboBoxPropsContext, directProps);
@@ -12,5 +12,70 @@ export declare const MultiSelectTreePropsContext: React.Context<(p: MultiSelectT
12
12
  *
13
13
  * Accepts properties of type [MultiSelectTreeProps]({% slug api_dropdowns_multiselecttreeprops %}).
14
14
  * Obtaining the `ref` returns an object of type [MultiSelectTreeHandle]({% slug api_dropdowns_multiselecttreehandle %}).
15
+ *
16
+ * @example
17
+ * ```jsx
18
+ * const dataItemKey = 'id';
19
+ * const checkField = 'checkField';
20
+ * const checkIndeterminateField = 'checkIndeterminateField';
21
+ * const subItemsField = 'items';
22
+ * const expandField = 'expanded';
23
+ * const textField = 'text';
24
+ * const fields = {
25
+ * dataItemKey,
26
+ * checkField,
27
+ * checkIndeterminateField,
28
+ * expandField,
29
+ * subItemsField,
30
+ * };
31
+ * const App = () => {
32
+ * const [value, setValue] = React.useState([]);
33
+ * const [expanded, setExpanded] = React.useState([data[0][dataItemKey]]);
34
+ * const onChange = (event) =>
35
+ * setValue(
36
+ * getMultiSelectTreeValue(data, {
37
+ * ...fields,
38
+ * ...event,
39
+ * value,
40
+ * })
41
+ * );
42
+ * const onExpandChange = React.useCallback(
43
+ * (event) => setExpanded(expandedState(event.item, dataItemKey, expanded)),
44
+ * [expanded]
45
+ * );
46
+ * const treeData = React.useMemo(
47
+ * () =>
48
+ * processMultiSelectTreeData(data, {
49
+ * expanded,
50
+ * value,
51
+ * ...fields,
52
+ * }),
53
+ * [expanded, value]
54
+ * );
55
+ *
56
+ * return (
57
+ * <div>
58
+ * <div>Categories:</div>
59
+ * <MultiSelectTree
60
+ * style={{
61
+ * width: '300px',
62
+ * }}
63
+ * data={treeData}
64
+ * value={value}
65
+ * onChange={onChange}
66
+ * placeholder="Please select ..."
67
+ * textField={textField}
68
+ * dataItemKey={dataItemKey}
69
+ * checkField={checkField}
70
+ * checkIndeterminateField={checkIndeterminateField}
71
+ * expandField={expandField}
72
+ * subItemsField={subItemsField}
73
+ * onExpandChange={onExpandChange}
74
+ * />
75
+ * </div>
76
+ * );
77
+ * };
78
+ * ReactDOM.render(<App />, document.querySelector('my-app'));
79
+ * ```
15
80
  */
16
81
  export declare const MultiSelectTree: React.ForwardRefExoticComponent<MultiSelectTreeProps & React.RefAttributes<MultiSelectTreeHandle | null>>;
@@ -78,6 +78,71 @@ export var MultiSelectTreePropsContext = createPropsContext();
78
78
  *
79
79
  * Accepts properties of type [MultiSelectTreeProps]({% slug api_dropdowns_multiselecttreeprops %}).
80
80
  * Obtaining the `ref` returns an object of type [MultiSelectTreeHandle]({% slug api_dropdowns_multiselecttreehandle %}).
81
+ *
82
+ * @example
83
+ * ```jsx
84
+ * const dataItemKey = 'id';
85
+ * const checkField = 'checkField';
86
+ * const checkIndeterminateField = 'checkIndeterminateField';
87
+ * const subItemsField = 'items';
88
+ * const expandField = 'expanded';
89
+ * const textField = 'text';
90
+ * const fields = {
91
+ * dataItemKey,
92
+ * checkField,
93
+ * checkIndeterminateField,
94
+ * expandField,
95
+ * subItemsField,
96
+ * };
97
+ * const App = () => {
98
+ * const [value, setValue] = React.useState([]);
99
+ * const [expanded, setExpanded] = React.useState([data[0][dataItemKey]]);
100
+ * const onChange = (event) =>
101
+ * setValue(
102
+ * getMultiSelectTreeValue(data, {
103
+ * ...fields,
104
+ * ...event,
105
+ * value,
106
+ * })
107
+ * );
108
+ * const onExpandChange = React.useCallback(
109
+ * (event) => setExpanded(expandedState(event.item, dataItemKey, expanded)),
110
+ * [expanded]
111
+ * );
112
+ * const treeData = React.useMemo(
113
+ * () =>
114
+ * processMultiSelectTreeData(data, {
115
+ * expanded,
116
+ * value,
117
+ * ...fields,
118
+ * }),
119
+ * [expanded, value]
120
+ * );
121
+ *
122
+ * return (
123
+ * <div>
124
+ * <div>Categories:</div>
125
+ * <MultiSelectTree
126
+ * style={{
127
+ * width: '300px',
128
+ * }}
129
+ * data={treeData}
130
+ * value={value}
131
+ * onChange={onChange}
132
+ * placeholder="Please select ..."
133
+ * textField={textField}
134
+ * dataItemKey={dataItemKey}
135
+ * checkField={checkField}
136
+ * checkIndeterminateField={checkIndeterminateField}
137
+ * expandField={expandField}
138
+ * subItemsField={subItemsField}
139
+ * onExpandChange={onExpandChange}
140
+ * />
141
+ * </div>
142
+ * );
143
+ * };
144
+ * ReactDOM.render(<App />, document.querySelector('my-app'));
145
+ * ```
81
146
  */
82
147
  export var MultiSelectTree = React.forwardRef(function (directProps, ref) {
83
148
  var _a, _b;
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-react-dropdowns',
6
6
  productName: 'KendoReact',
7
7
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
8
- publishDate: 1694508042,
8
+ publishDate: 1694510545,
9
9
  version: '',
10
10
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
11
11
  };
@@ -12,5 +12,59 @@ export declare const DropDownTreePropsContext: React.Context<(p: DropDownTreePro
12
12
  *
13
13
  * Accepts properties of type [DropDownTreeProps]({% slug api_dropdowns_dropdowntreeprops %}).
14
14
  * Obtaining the `ref` returns an object of type [DropDownTreeHandle]({% slug api_dropdowns_dropdowntreehandle %}).
15
+ *
16
+ * @example
17
+ * ```jsx
18
+ * const selectField = "selected";
19
+ * const expandField = "expanded";
20
+ * const dataItemKey = "id";
21
+ * const textField = "text";
22
+ * const subItemsField = "items";
23
+ * const fields = {
24
+ * selectField,
25
+ * expandField,
26
+ * dataItemKey,
27
+ * subItemsField,
28
+ * };
29
+ * const App = () => {
30
+ * const [value, setValue] = React.useState(null);
31
+ * const [expanded, setExpanded] = React.useState([data[0][dataItemKey]]);
32
+ * const onChange = (event) => setValue(event.value);
33
+ * const onExpandChange = React.useCallback(
34
+ * (event) => setExpanded(expandedState(event.item, dataItemKey, expanded)),
35
+ * [expanded]
36
+ * );
37
+ * const treeData = React.useMemo(
38
+ * () =>
39
+ * processTreeData(
40
+ * data,
41
+ * {
42
+ * expanded,
43
+ * value,
44
+ * },
45
+ * fields
46
+ * ),
47
+ * [expanded, value]
48
+ * );
49
+ *
50
+ * return (
51
+ * <DropDownTree
52
+ * style={{
53
+ * width: '300px',
54
+ * }}
55
+ * placeholder="Please select ..."
56
+ * data={treeData}
57
+ * value={value}
58
+ * onChange={onChange}
59
+ * textField={textField}
60
+ * dataItemKey={dataItemKey}
61
+ * selectField={selectField}
62
+ * expandField={expandField}
63
+ * onExpandChange={onExpandChange}
64
+ * />
65
+ * );
66
+ * };
67
+ * ReactDOM.render(<App />, document.querySelector('my-app'));
68
+ * ```
15
69
  */
16
70
  export declare const DropDownTree: React.ForwardRefExoticComponent<DropDownTreeProps & React.RefAttributes<DropDownTreeHandle | null>>;
@@ -83,6 +83,60 @@ exports.DropDownTreePropsContext = (0, kendo_react_common_1.createPropsContext)(
83
83
  *
84
84
  * Accepts properties of type [DropDownTreeProps]({% slug api_dropdowns_dropdowntreeprops %}).
85
85
  * Obtaining the `ref` returns an object of type [DropDownTreeHandle]({% slug api_dropdowns_dropdowntreehandle %}).
86
+ *
87
+ * @example
88
+ * ```jsx
89
+ * const selectField = "selected";
90
+ * const expandField = "expanded";
91
+ * const dataItemKey = "id";
92
+ * const textField = "text";
93
+ * const subItemsField = "items";
94
+ * const fields = {
95
+ * selectField,
96
+ * expandField,
97
+ * dataItemKey,
98
+ * subItemsField,
99
+ * };
100
+ * const App = () => {
101
+ * const [value, setValue] = React.useState(null);
102
+ * const [expanded, setExpanded] = React.useState([data[0][dataItemKey]]);
103
+ * const onChange = (event) => setValue(event.value);
104
+ * const onExpandChange = React.useCallback(
105
+ * (event) => setExpanded(expandedState(event.item, dataItemKey, expanded)),
106
+ * [expanded]
107
+ * );
108
+ * const treeData = React.useMemo(
109
+ * () =>
110
+ * processTreeData(
111
+ * data,
112
+ * {
113
+ * expanded,
114
+ * value,
115
+ * },
116
+ * fields
117
+ * ),
118
+ * [expanded, value]
119
+ * );
120
+ *
121
+ * return (
122
+ * <DropDownTree
123
+ * style={{
124
+ * width: '300px',
125
+ * }}
126
+ * placeholder="Please select ..."
127
+ * data={treeData}
128
+ * value={value}
129
+ * onChange={onChange}
130
+ * textField={textField}
131
+ * dataItemKey={dataItemKey}
132
+ * selectField={selectField}
133
+ * expandField={expandField}
134
+ * onExpandChange={onExpandChange}
135
+ * />
136
+ * );
137
+ * };
138
+ * ReactDOM.render(<App />, document.querySelector('my-app'));
139
+ * ```
86
140
  */
87
141
  exports.DropDownTree = React.forwardRef(function (directProps, ref) {
88
142
  var _a;
@@ -246,5 +246,42 @@ export declare const MultiColumnComboBoxPropsContext: React.Context<(p: MultiCol
246
246
  * Accepts properties of type [MultiColumnComboBoxProps]({% slug api_dropdowns_multicolumncomboboxprops %}).
247
247
  * Obtaining the `ref` returns an object of type [MultiColumnComboBoxHandle]({% slug api_dropdowns_multicolumncomboboxhandle %}).
248
248
  *
249
+ * @example
250
+ * ```jsx
251
+ * const columns = [
252
+ * {
253
+ * field: "id",
254
+ * header: "ID",
255
+ * width: "100px",
256
+ * },
257
+ * {
258
+ * field: "name",
259
+ * header: "Name",
260
+ * width: "300px",
261
+ * },
262
+ * {
263
+ * field: "position",
264
+ * header: "Position",
265
+ * width: "300px",
266
+ * },
267
+ * ];
268
+ * const App = () => {
269
+ * return (
270
+ * <div>
271
+ * <div>Employees:</div>
272
+ * <MultiColumnComboBox
273
+ * data={employees}
274
+ * columns={columns}
275
+ * textField={"name"}
276
+ * style={{
277
+ * width: "300px",
278
+ * }}
279
+ * placeholder="Please select ..."
280
+ * />
281
+ * </div>
282
+ * );
283
+ * };
284
+ * ReactDOM.render(<App />, document.querySelector("my-app"));
285
+ * ```
249
286
  */
250
287
  export declare const MultiColumnComboBox: React.ForwardRefExoticComponent<MultiColumnComboBoxProps & React.RefAttributes<MultiColumnComboBoxHandle | null>>;
@@ -49,6 +49,43 @@ exports.MultiColumnComboBoxPropsContext = (0, kendo_react_common_1.createPropsCo
49
49
  * Accepts properties of type [MultiColumnComboBoxProps]({% slug api_dropdowns_multicolumncomboboxprops %}).
50
50
  * Obtaining the `ref` returns an object of type [MultiColumnComboBoxHandle]({% slug api_dropdowns_multicolumncomboboxhandle %}).
51
51
  *
52
+ * @example
53
+ * ```jsx
54
+ * const columns = [
55
+ * {
56
+ * field: "id",
57
+ * header: "ID",
58
+ * width: "100px",
59
+ * },
60
+ * {
61
+ * field: "name",
62
+ * header: "Name",
63
+ * width: "300px",
64
+ * },
65
+ * {
66
+ * field: "position",
67
+ * header: "Position",
68
+ * width: "300px",
69
+ * },
70
+ * ];
71
+ * const App = () => {
72
+ * return (
73
+ * <div>
74
+ * <div>Employees:</div>
75
+ * <MultiColumnComboBox
76
+ * data={employees}
77
+ * columns={columns}
78
+ * textField={"name"}
79
+ * style={{
80
+ * width: "300px",
81
+ * }}
82
+ * placeholder="Please select ..."
83
+ * />
84
+ * </div>
85
+ * );
86
+ * };
87
+ * ReactDOM.render(<App />, document.querySelector("my-app"));
88
+ * ```
52
89
  */
53
90
  exports.MultiColumnComboBox = React.forwardRef(function (directProps, ref) {
54
91
  var props = (0, kendo_react_common_1.usePropsContext)(exports.MultiColumnComboBoxPropsContext, directProps);
@@ -12,5 +12,70 @@ export declare const MultiSelectTreePropsContext: React.Context<(p: MultiSelectT
12
12
  *
13
13
  * Accepts properties of type [MultiSelectTreeProps]({% slug api_dropdowns_multiselecttreeprops %}).
14
14
  * Obtaining the `ref` returns an object of type [MultiSelectTreeHandle]({% slug api_dropdowns_multiselecttreehandle %}).
15
+ *
16
+ * @example
17
+ * ```jsx
18
+ * const dataItemKey = 'id';
19
+ * const checkField = 'checkField';
20
+ * const checkIndeterminateField = 'checkIndeterminateField';
21
+ * const subItemsField = 'items';
22
+ * const expandField = 'expanded';
23
+ * const textField = 'text';
24
+ * const fields = {
25
+ * dataItemKey,
26
+ * checkField,
27
+ * checkIndeterminateField,
28
+ * expandField,
29
+ * subItemsField,
30
+ * };
31
+ * const App = () => {
32
+ * const [value, setValue] = React.useState([]);
33
+ * const [expanded, setExpanded] = React.useState([data[0][dataItemKey]]);
34
+ * const onChange = (event) =>
35
+ * setValue(
36
+ * getMultiSelectTreeValue(data, {
37
+ * ...fields,
38
+ * ...event,
39
+ * value,
40
+ * })
41
+ * );
42
+ * const onExpandChange = React.useCallback(
43
+ * (event) => setExpanded(expandedState(event.item, dataItemKey, expanded)),
44
+ * [expanded]
45
+ * );
46
+ * const treeData = React.useMemo(
47
+ * () =>
48
+ * processMultiSelectTreeData(data, {
49
+ * expanded,
50
+ * value,
51
+ * ...fields,
52
+ * }),
53
+ * [expanded, value]
54
+ * );
55
+ *
56
+ * return (
57
+ * <div>
58
+ * <div>Categories:</div>
59
+ * <MultiSelectTree
60
+ * style={{
61
+ * width: '300px',
62
+ * }}
63
+ * data={treeData}
64
+ * value={value}
65
+ * onChange={onChange}
66
+ * placeholder="Please select ..."
67
+ * textField={textField}
68
+ * dataItemKey={dataItemKey}
69
+ * checkField={checkField}
70
+ * checkIndeterminateField={checkIndeterminateField}
71
+ * expandField={expandField}
72
+ * subItemsField={subItemsField}
73
+ * onExpandChange={onExpandChange}
74
+ * />
75
+ * </div>
76
+ * );
77
+ * };
78
+ * ReactDOM.render(<App />, document.querySelector('my-app'));
79
+ * ```
15
80
  */
16
81
  export declare const MultiSelectTree: React.ForwardRefExoticComponent<MultiSelectTreeProps & React.RefAttributes<MultiSelectTreeHandle | null>>;