@progress/kendo-react-dropdowns 7.2.4-develop.3 → 7.3.0-develop.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.
Files changed (107) hide show
  1. package/AutoComplete/AutoComplete.js +8 -0
  2. package/AutoComplete/AutoComplete.mjs +458 -0
  3. package/ComboBox/ComboBox.js +8 -0
  4. package/ComboBox/ComboBox.mjs +618 -0
  5. package/DropDownList/DropDownList.js +8 -0
  6. package/DropDownList/DropDownList.mjs +630 -0
  7. package/DropDownTree/DropDownTree.js +8 -0
  8. package/DropDownTree/DropDownTree.mjs +550 -0
  9. package/DropDownTree/ListNoData.js +8 -0
  10. package/DropDownTree/ListNoData.mjs +13 -0
  11. package/DropDownTree/useDropdownWidth.js +8 -0
  12. package/DropDownTree/useDropdownWidth.mjs +25 -0
  13. package/MultiColumnComboBox/MultiColumnComboBox.js +8 -0
  14. package/MultiColumnComboBox/MultiColumnComboBox.mjs +186 -0
  15. package/MultiSelect/MultiSelect.js +8 -0
  16. package/MultiSelect/MultiSelect.mjs +694 -0
  17. package/MultiSelect/TagList.js +8 -0
  18. package/MultiSelect/TagList.mjs +48 -0
  19. package/MultiSelectTree/MultiSelectTree.js +8 -0
  20. package/MultiSelectTree/MultiSelectTree.mjs +590 -0
  21. package/MultiSelectTree/utils.js +8 -0
  22. package/MultiSelectTree/utils.mjs +74 -0
  23. package/common/AdaptiveMode.js +8 -0
  24. package/common/AdaptiveMode.mjs +73 -0
  25. package/common/ClearButton.js +8 -0
  26. package/common/ClearButton.mjs +38 -0
  27. package/common/DropDownBase.js +8 -0
  28. package/common/DropDownBase.mjs +194 -0
  29. package/common/GroupStickyHeader.js +8 -0
  30. package/common/GroupStickyHeader.mjs +22 -0
  31. package/common/List.js +8 -0
  32. package/common/List.mjs +117 -0
  33. package/common/ListContainer.js +8 -0
  34. package/common/ListContainer.mjs +33 -0
  35. package/common/ListDefaultItem.js +8 -0
  36. package/common/ListDefaultItem.mjs +36 -0
  37. package/common/ListFilter.js +8 -0
  38. package/common/ListFilter.mjs +49 -0
  39. package/common/ListGroupItem.js +8 -0
  40. package/common/ListGroupItem.mjs +32 -0
  41. package/common/ListItem.js +8 -0
  42. package/common/ListItem.mjs +49 -0
  43. package/common/MultiColumnList.js +8 -0
  44. package/common/MultiColumnList.mjs +28 -0
  45. package/common/Navigation.js +8 -0
  46. package/common/Navigation.mjs +29 -0
  47. package/common/SearchBar.js +8 -0
  48. package/common/SearchBar.mjs +65 -0
  49. package/common/VirtualScroll.js +8 -0
  50. package/common/VirtualScroll.mjs +75 -0
  51. package/common/constants.js +8 -0
  52. package/common/constants.mjs +13 -0
  53. package/common/settings.js +8 -0
  54. package/common/settings.mjs +12 -0
  55. package/common/utils.js +8 -0
  56. package/common/utils.mjs +109 -0
  57. package/common/withCustomComponent.js +8 -0
  58. package/common/withCustomComponent.mjs +13 -0
  59. package/dist/cdn/js/kendo-react-dropdowns.js +8 -5
  60. package/index.d.mts +4098 -5
  61. package/index.d.ts +4098 -31
  62. package/index.js +8 -5
  63. package/index.mjs +55 -4429
  64. package/messages/index.js +8 -0
  65. package/messages/index.mjs +27 -0
  66. package/package-metadata.js +8 -0
  67. package/package-metadata.mjs +19 -0
  68. package/package.json +9 -9
  69. package/AutoComplete/AutoComplete.d.ts +0 -236
  70. package/AutoComplete/AutoCompleteProps.d.ts +0 -254
  71. package/ComboBox/ComboBox.d.ts +0 -254
  72. package/ComboBox/ComboBoxProps.d.ts +0 -324
  73. package/DropDownList/DropDownList.d.ts +0 -264
  74. package/DropDownList/DropDownListProps.d.ts +0 -329
  75. package/DropDownTree/DropDownTree.d.ts +0 -74
  76. package/DropDownTree/DropDownTreeProps.d.ts +0 -297
  77. package/DropDownTree/ListNoData.d.ts +0 -10
  78. package/DropDownTree/useDropdownWidth.d.ts +0 -10
  79. package/MultiColumnComboBox/MultiColumnComboBox.d.ts +0 -300
  80. package/MultiSelect/MultiSelect.d.ts +0 -262
  81. package/MultiSelect/MultiSelectProps.d.ts +0 -325
  82. package/MultiSelect/TagList.d.ts +0 -42
  83. package/MultiSelectTree/MultiSelectTree.d.ts +0 -85
  84. package/MultiSelectTree/MultiSelectTreeProps.d.ts +0 -324
  85. package/MultiSelectTree/utils.d.ts +0 -21
  86. package/common/AdaptiveMode.d.ts +0 -25
  87. package/common/ClearButton.d.ts +0 -18
  88. package/common/DropDownBase.d.ts +0 -180
  89. package/common/GroupStickyHeader.d.ts +0 -28
  90. package/common/List.d.ts +0 -50
  91. package/common/ListContainer.d.ts +0 -22
  92. package/common/ListDefaultItem.d.ts +0 -20
  93. package/common/ListFilter.d.ts +0 -23
  94. package/common/ListGroupItem.d.ts +0 -37
  95. package/common/ListItem.d.ts +0 -65
  96. package/common/MultiColumnList.d.ts +0 -9
  97. package/common/Navigation.d.ts +0 -17
  98. package/common/SearchBar.d.ts +0 -47
  99. package/common/VirtualScroll.d.ts +0 -45
  100. package/common/constants.d.ts +0 -8
  101. package/common/events.d.ts +0 -76
  102. package/common/filterDescriptor.d.ts +0 -45
  103. package/common/settings.d.ts +0 -109
  104. package/common/utils.d.ts +0 -70
  105. package/common/withCustomComponent.d.ts +0 -11
  106. package/messages/index.d.ts +0 -44
  107. package/package-metadata.d.ts +0 -9
@@ -1,264 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as React from 'react';
6
- import PropTypes from 'prop-types';
7
- import { FormComponent, FormComponentValidity } from '@progress/kendo-react-common';
8
- import DropDownBase from '../common/DropDownBase';
9
- import { DropDownListProps } from './DropDownListProps';
10
- import { DropDownStateBase, InternalState } from './../common/settings';
11
- /**
12
- * @hidden
13
- */
14
- export interface DropDownListState extends DropDownStateBase {
15
- windowWidth?: number;
16
- }
17
- /**
18
- * @hidden
19
- */
20
- export declare class DropDownListWithoutContext extends React.Component<DropDownListProps, DropDownListState> implements FormComponent {
21
- static displayName: string;
22
- /**
23
- * @hidden
24
- */
25
- static propTypes: {
26
- value: PropTypes.Requireable<any>;
27
- defaultValue: PropTypes.Requireable<any>;
28
- filterable: PropTypes.Requireable<boolean>;
29
- filter: PropTypes.Requireable<string>;
30
- virtual: PropTypes.Requireable<PropTypes.InferProps<{
31
- pageSize: PropTypes.Validator<number>;
32
- skip: PropTypes.Validator<number>;
33
- total: PropTypes.Validator<number>;
34
- }>>;
35
- onFilterChange: PropTypes.Requireable<(...args: any[]) => any>;
36
- onPageChange: PropTypes.Requireable<(...args: any[]) => any>;
37
- opened: PropTypes.Requireable<boolean>;
38
- disabled: PropTypes.Requireable<boolean>;
39
- dir: PropTypes.Requireable<string>;
40
- tabIndex: PropTypes.Requireable<number>;
41
- accessKey: PropTypes.Requireable<string>;
42
- data: PropTypes.Requireable<any[]>;
43
- textField: PropTypes.Requireable<string>;
44
- className: PropTypes.Requireable<string>;
45
- label: PropTypes.Requireable<string>;
46
- loading: PropTypes.Requireable<boolean>;
47
- popupSettings: PropTypes.Requireable<PropTypes.InferProps<{
48
- animate: PropTypes.Requireable<NonNullable<boolean | PropTypes.InferProps<{
49
- openDuration: PropTypes.Requireable<number>;
50
- closeDuration: PropTypes.Requireable<number>;
51
- }> | null | undefined>>;
52
- popupClass: PropTypes.Requireable<string>;
53
- className: PropTypes.Requireable<string>;
54
- appendTo: PropTypes.Requireable<any>;
55
- width: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
56
- height: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
57
- }>>;
58
- onOpen: PropTypes.Requireable<(...args: any[]) => any>;
59
- onClose: PropTypes.Requireable<(...args: any[]) => any>;
60
- onFocus: PropTypes.Requireable<(...args: any[]) => any>;
61
- onBlur: PropTypes.Requireable<(...args: any[]) => any>;
62
- onChange: PropTypes.Requireable<(...args: any[]) => any>;
63
- itemRender: PropTypes.Requireable<(...args: any[]) => any>;
64
- listNoDataRender: PropTypes.Requireable<(...args: any[]) => any>;
65
- focusedItemIndex: PropTypes.Requireable<(...args: any[]) => any>;
66
- header: PropTypes.Requireable<PropTypes.ReactNodeLike>;
67
- footer: PropTypes.Requireable<PropTypes.ReactNodeLike>;
68
- delay: PropTypes.Requireable<number>;
69
- ignoreCase: PropTypes.Requireable<boolean>;
70
- iconClassName: PropTypes.Requireable<string>;
71
- svgIcon: PropTypes.Requireable<PropTypes.InferProps<{
72
- name: PropTypes.Validator<string>;
73
- content: PropTypes.Validator<string>;
74
- viewBox: PropTypes.Validator<string>;
75
- }>>;
76
- defaultItem: PropTypes.Requireable<any>;
77
- valueRender: PropTypes.Requireable<(...args: any[]) => any>;
78
- valueMap: PropTypes.Requireable<(...args: any[]) => any>;
79
- validationMessage: PropTypes.Requireable<string>;
80
- required: PropTypes.Requireable<boolean>;
81
- id: PropTypes.Requireable<string>;
82
- ariaLabelledBy: PropTypes.Requireable<string>;
83
- ariaDescribedBy: PropTypes.Requireable<string>;
84
- ariaLabel: PropTypes.Requireable<string>;
85
- leftRightKeysNavigation: PropTypes.Requireable<boolean>;
86
- title: PropTypes.Requireable<string>;
87
- groupField: PropTypes.Requireable<string>;
88
- list: PropTypes.Requireable<any>;
89
- skipDisabledItems: PropTypes.Requireable<boolean>;
90
- };
91
- /**
92
- * @hidden
93
- */
94
- static defaultProps: {
95
- required: boolean;
96
- size: "small" | "medium" | "large" | null | undefined;
97
- rounded: "small" | "medium" | "large" | "full" | null | undefined;
98
- fillMode: "solid" | "flat" | "outline" | null | undefined;
99
- groupMode: string | undefined;
100
- popupSettings: {
101
- height: string;
102
- };
103
- validityStyles: boolean;
104
- delay: number;
105
- tabIndex: number;
106
- ignoreCase: boolean;
107
- };
108
- /**
109
- * @hidden
110
- */
111
- readonly state: DropDownListState;
112
- private _element;
113
- private _typingTimeout;
114
- protected readonly base: DropDownBase;
115
- private searchState;
116
- private _select;
117
- private _skipFocusEvent;
118
- private _filterInput;
119
- private _valueDuringOnChange;
120
- private _navigated;
121
- private _lastKeypressIsFilter;
122
- private get _inputId();
123
- private get _listboxId();
124
- private get _guid();
125
- private itemHeight;
126
- private observerResize?;
127
- private get document();
128
- constructor(props: DropDownListProps);
129
- /**
130
- * @hidden
131
- */
132
- focus: () => void;
133
- /**
134
- * @hidden
135
- */
136
- get element(): HTMLSpanElement | null;
137
- /**
138
- * The value of the DropDownList.
139
- */
140
- get value(): any;
141
- /**
142
- * The index of the selected item.
143
- */
144
- get index(): number;
145
- /**
146
- * Gets the `name` property of the DropDownList.
147
- */
148
- get name(): string | undefined;
149
- /**
150
- * Represents the validity state into which the DropDownList is set.
151
- */
152
- get validity(): FormComponentValidity;
153
- protected get validityStyles(): boolean;
154
- /**
155
- * @hidden
156
- */
157
- protected get required(): boolean;
158
- /**
159
- * @hidden
160
- */
161
- componentDidUpdate(prevProps: DropDownListProps, prevState: DropDownListState): void;
162
- /**
163
- * @hidden
164
- */
165
- componentDidMount(): void;
166
- /** @hidden */
167
- componentWillUnmount(): void;
168
- /**
169
- * @hidden
170
- */
171
- render(): import("react/jsx-runtime").JSX.Element;
172
- /**
173
- * @hidden
174
- */
175
- handleItemSelect: (index: number, state: InternalState) => void;
176
- /**
177
- * @hidden
178
- */
179
- onNavigate(state: InternalState, keyCode: number, skipItems?: number): void;
180
- private componentRef;
181
- private dummySelect;
182
- private renderAdaptiveListContainer;
183
- private renderListContainer;
184
- private renderList;
185
- private onScroll;
186
- private renderListFilter;
187
- private renderDefaultItem;
188
- private search;
189
- private selectNext;
190
- private handleKeyDown;
191
- private handleItemClick;
192
- private handleFocus;
193
- private handleBlur;
194
- private handleDefaultItemClick;
195
- private handleWrapperClick;
196
- private handleKeyPress;
197
- private handleListFilterChange;
198
- private onPopupOpened;
199
- private onPopupClosed;
200
- private getFocusedIndex;
201
- private focusElement;
202
- private setValidity;
203
- private triggerOnChange;
204
- private applyState;
205
- private calculateMedia;
206
- private resetValueIfDisabledItem;
207
- private haveFocusedItemAndDataNotEmpty;
208
- }
209
- /**
210
- * Represents the PropsContext of the `DropDownList` component.
211
- * Used for global configuration of all `DropDownList` instances.
212
- *
213
- * For more information, refer to the [Dropdowns Props Context]({% slug props-context_dropdowns %}) article.
214
- */
215
- export declare const DropDownListPropsContext: React.Context<(p: DropDownListProps) => DropDownListProps>;
216
- /**
217
- * Represent the `ref` of the DropDownList component.
218
- */
219
- export interface DropDownListHandle extends Pick<DropDownListWithoutContext, keyof DropDownListWithoutContext> {
220
- /**
221
- * The index of the selected item.
222
- */
223
- index: number;
224
- /**
225
- * Gets the `name` property of the DropDownList.
226
- */
227
- name: string | undefined;
228
- /**
229
- * Represents the validity state into which the DropDownList is set.
230
- */
231
- validity: FormComponentValidity;
232
- /**
233
- * The value of the DropDownList.
234
- */
235
- value: any;
236
- }
237
- /** @hidden */
238
- export type DropDownList = DropDownListHandle;
239
- /**
240
- * Represents the [KendoReact DropDownList component]({% slug overview_dropdownlist %}).
241
- *
242
- * Accepts properties of type [DropDownListProps]({% slug api_dropdowns_dropdownlistprops %}).
243
- * Obtaining the `ref` returns an object of type [DropDownListHandle]({% slug api_dropdowns_dropdownlisthandle %}).
244
- *
245
- * @example
246
- * ```jsx
247
- * class App extends React.Component {
248
- * dropdownlist = null;
249
- * render() {
250
- * return (
251
- * <div>
252
- * <DropDownList
253
- * data={[ "Albania", "Andorra", "Austria", "Belarus" ]}
254
- * ref={component => this.dropdownlist = component}
255
- * />
256
- * <button onClick={() => alert(this.dropdownlist.value)}>alert value</button>
257
- * </div>
258
- * );
259
- * }
260
- * }
261
- * ReactDOM.render(<App />, document.querySelector('my-app'));
262
- * ```
263
- */
264
- export declare const DropDownList: React.ForwardRefExoticComponent<DropDownListProps & React.RefAttributes<any>>;
@@ -1,329 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { DropDownList } from './DropDownList';
6
- import { FilterChangeEvent, ChangeEvent, OpenEvent, CloseEvent, FocusEvent, BlurEvent, PageChangeEvent } from './../common/events';
7
- import { VirtualizationSettings, DropDownsPopupSettings } from '../common/settings';
8
- import { ListGroupItemProps } from '../common/ListGroupItem';
9
- import { GroupStickyHeaderProps } from '../common/GroupStickyHeader';
10
- import { ListItemProps } from '../common/ListItem';
11
- import { FormComponentProps, SVGIcon } from '@progress/kendo-react-common';
12
- /**
13
- * Represents the object of the `filterChange` DropDownList event.
14
- */
15
- export interface DropDownListFilterChangeEvent extends FilterChangeEvent<DropDownList> {
16
- }
17
- /**
18
- * Represents the object of the `change` DropDownList event.
19
- */
20
- export interface DropDownListChangeEvent extends ChangeEvent<DropDownList> {
21
- }
22
- /**
23
- * Represents the object of the `open` DropDownList event.
24
- */
25
- export interface DropDownListOpenEvent extends OpenEvent<DropDownList> {
26
- }
27
- /**
28
- * Represents the object of the `close` DropDownList event.
29
- */
30
- export interface DropDownListCloseEvent extends CloseEvent<DropDownList> {
31
- }
32
- /**
33
- * Represents the object of the `focus` DropDownList event.
34
- */
35
- export interface DropDownListFocusEvent extends FocusEvent<DropDownList> {
36
- }
37
- /**
38
- * Represents the object of the `blur` DropDownList event.
39
- */
40
- export interface DropDownListBlurEvent extends BlurEvent<DropDownList> {
41
- }
42
- /**
43
- * Represents the object of the `pageChange` DropDownList event.
44
- */
45
- export interface DropDownListPageChangeEvent extends PageChangeEvent<DropDownList> {
46
- }
47
- /**
48
- * Represents the props of the [KendoReact DropDownList component]({% slug overview_dropdownlist %}).
49
- */
50
- export interface DropDownListProps extends FormComponentProps {
51
- /**
52
- * Sets the data of the DropDownList ([see example]({% slug binding_dropdownlist %})).
53
- */
54
- data?: any[];
55
- /**
56
- * Sets the text of the default empty item. The type of the defined value has to match the data type.
57
- */
58
- defaultItem?: any;
59
- /**
60
- * Sets the delay before an item search is performed. When filtration is disabled, use this option.
61
- */
62
- delay?: number;
63
- /**
64
- * Enables a case-insensitive search. When filtering is disabled, use this option.
65
- */
66
- ignoreCase?: boolean;
67
- /**
68
- * Sets the opened and closed state of the DropDownList.
69
- */
70
- opened?: boolean;
71
- /**
72
- * The styles that are applied to the DropDownList.
73
- */
74
- style?: React.CSSProperties;
75
- /**
76
- * Sets the value of the DropDownList ([see example]({% slug binding_dropdownlist %})). It can either be of the primitive (string, numbers) or of the complex (objects) type.
77
- */
78
- value?: any;
79
- /**
80
- * Sets the default value of the DropDownList ([see example]({% slug defaultitem_dropdownlist %})). Similar to the native `select` HTML element.
81
- */
82
- defaultValue?: any;
83
- /**
84
- * Sets additional classes to the DropDownList.
85
- */
86
- className?: string;
87
- /**
88
- * Sets CSS classes to the expand `icon` DOM element.
89
- */
90
- iconClassName?: string;
91
- /**
92
- * Sets the specified SVG icon.
93
- */
94
- svgIcon?: SVGIcon;
95
- /**
96
- * Sets the title attribute to the DropDownList DOM element.
97
- */
98
- title?: string;
99
- /**
100
- * Sets the disabled state of the DropDownList.
101
- */
102
- disabled?: boolean;
103
- /**
104
- * Represents the `dir` HTML attribute.
105
- */
106
- dir?: string;
107
- /**
108
- * Enables the filtering functionality of the DropDownList ([more information and examples]({% slug filtering_dropdownlist %})).
109
- */
110
- filterable?: boolean;
111
- /**
112
- * Sets the value of filtering input. Useful for making the filtering input a [controlled component](https://reactjs.org/docs/forms.html#controlled-components).
113
- */
114
- filter?: string;
115
- /**
116
- * Sets the loading state of the DropDownList.
117
- */
118
- loading?: boolean;
119
- /**
120
- * Specifies the `tabIndex` of the DropDownList.
121
- */
122
- tabIndex?: number;
123
- /**
124
- * Specifies the `accessKey` of the DropDownList.
125
- */
126
- accessKey?: string;
127
- /**
128
- * Sets the data item field that represents the item text ([see example]({% slug defaultitem_dropdownlist %})). If the data contains only primitive values, do not define it.
129
- */
130
- textField?: string;
131
- /**
132
- * Sets the key for comparing the data items of the DropDownList. If `dataItemKey` is not set, the DropDownList compares the items by reference ([see example]({% slug binding_dropdownlist %}#toc-datasets-of-objects)).
133
- */
134
- dataItemKey?: string;
135
- /**
136
- * Represents a callback function, which returns the value for submitting. The returned value will be rendered in an `option` of a hidden [`select`](https://reactjs.org/docs/forms.html#the-select-tag) element.
137
- *
138
- * @example
139
- * ```jsx-no-run
140
- * class App extends React.Component {
141
- * render() {
142
- * return (
143
- * <form>
144
- * <DropDownList
145
- * data={[ { text: "Austria", id: 1 } , { text: "Belarus", id: 2 } ]}
146
- * valueMap={value => value && value.id}
147
- * />
148
- * <button type="submit">Submit</button>
149
- * </form>
150
- * );
151
- * }
152
- * }
153
- * ReactDOM.render(<App />, document.querySelector('my-app'));
154
- * ```
155
- */
156
- valueMap?: (value: any) => any;
157
- /**
158
- * Renders a floating label for the DropDownList.
159
- */
160
- label?: string;
161
- /**
162
- * Specifies the id of the component.
163
- */
164
- id?: string;
165
- /**
166
- * Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
167
- * For example these elements could contain error or hint message.
168
- */
169
- ariaDescribedBy?: string;
170
- /**
171
- * Identifies the element(s) which will label the component.
172
- */
173
- ariaLabelledBy?: string;
174
- /**
175
- * The accessible label of the component. By default is set to value of `label` prop.
176
- */
177
- ariaLabel?: string;
178
- /**
179
- * Configures the popup of the DropDownList.
180
- */
181
- popupSettings?: DropDownsPopupSettings;
182
- /**
183
- * Configures the virtual scrolling of the DropDownList ([see example]({% slug virtualization_dropdownlist %})).
184
- */
185
- virtual?: VirtualizationSettings;
186
- /**
187
- * If set, the DropDownList will use it to get the focused item index.
188
- *
189
- * Default functionality returns the first item which starts with the input text.
190
- *
191
- * @example
192
- * ```jsx-no-run
193
- * const focusedItemIndex = (data, inputText, textField) => {
194
- * let text = inputText.toLowerCase();
195
- * return data.findIndex(item =>
196
- * String(textField ? item[textField] : item).toLowerCase().includes(text));
197
- * };
198
- *
199
- * <DropDownList focusedItemIndex={focusedItemIndex} />
200
- * ```
201
- */
202
- focusedItemIndex?: (data: any, inputText: string, textField?: string) => number;
203
- /**
204
- * Fires each time the popup of the DropDownList is about to open.
205
- */
206
- onOpen?: (event: DropDownListOpenEvent) => void;
207
- /**
208
- * Fires each time the popup of the DropDownList is about to close.
209
- */
210
- onClose?: (event: DropDownListCloseEvent) => void;
211
- /**
212
- * Fires each time the user focuses the DropDownList.
213
- */
214
- onFocus?: (event: DropDownListFocusEvent) => void;
215
- /**
216
- * Fires each time the DropDownList gets blurred.
217
- */
218
- onBlur?: (event: DropDownListBlurEvent) => void;
219
- /**
220
- * Fires each time the value of the DropDownList is about to change ([see examples]({% slug binding_dropdownlist %})).
221
- */
222
- onChange?: (event: DropDownListChangeEvent) => void;
223
- /**
224
- * Fires each time the user types in the filter input. You can filter the source based on the passed filtration value.
225
- */
226
- onFilterChange?: (event: DropDownListFilterChangeEvent) => void;
227
- /**
228
- * Fires when both the virtual scrolling of the DropDownList is enabled and the component requires data for another page ([see example]({% slug virtualization_dropdownlist %})).
229
- */
230
- onPageChange?: (event: DropDownListPageChangeEvent) => void;
231
- /**
232
- * Fires when a DropDownList item is about to be rendered ([see example]({% slug customrendering_dropdownlist %}#toc-items)). Used to override the default appearance of the list items.
233
- */
234
- itemRender?: (li: React.ReactElement<HTMLLIElement>, itemProps: ListItemProps) => React.ReactNode;
235
- /**
236
- * Fires when the element which renders the value is about to be rendered ([see example]({% slug customrendering_dropdownlist %}#toc-values)). Used to override the default appearance of the element.
237
- */
238
- valueRender?: (element: React.ReactElement<HTMLSpanElement>, value: any) => React.ReactNode;
239
- /**
240
- * Fires when the element which indicates no data in the popup is about to be rendered ([see example]({% slug customrendering_dropdownlist %}#toc-no-data)). Used to override the default appearance of the element.
241
- */
242
- listNoDataRender?: (element: React.ReactElement<HTMLDivElement>) => React.ReactNode;
243
- /**
244
- * Sets the header component of the DropDownList ([see example]({% slug customrendering_dropdownlist %}#toc-headers-and-footers)).
245
- */
246
- header?: React.ReactNode;
247
- /**
248
- * Sets the footer component of the DropDownList ([see example]({% slug customrendering_dropdownlist %}#toc-headers-and-footers)).
249
- */
250
- footer?: React.ReactNode;
251
- /**
252
- * Specifies the `name` property of the `select` DOM element.
253
- */
254
- name?: string;
255
- /**
256
- * If set to `false`, the DropDownList will not navigate over its data through left and right keys.
257
- * Useful when the DropDownList is placed inside a toolbar which needs to handle left and right keys.
258
- */
259
- leftRightKeysNavigation?: boolean;
260
- /**
261
- * Configures the `size` of the DropDownList.
262
- *
263
- * The available options are:
264
- * - small
265
- * - medium
266
- * - large
267
- * - null&mdash;Does not set a size `className`.
268
- *
269
- * @default `medium`
270
- */
271
- size?: null | 'small' | 'medium' | 'large';
272
- /**
273
- * Configures the `roundness` of the DropDownList.
274
- *
275
- * The available options are:
276
- * - small
277
- * - medium
278
- * - large
279
- * - full
280
- * - null&mdash;Does not set a rounded `className`.
281
- *
282
- * @default `medium`
283
- */
284
- rounded?: null | 'small' | 'medium' | 'large' | 'full';
285
- /**
286
- * Configures the `fillMode` of the DropDownList.
287
- *
288
- * The available options are:
289
- * - solid
290
- * - flat
291
- * - outline
292
- * - null&mdash;Does not set a fillMode `className`.
293
- *
294
- * @default `solid`
295
- */
296
- fillMode?: null | 'solid' | 'flat' | 'outline';
297
- /**
298
- * Providing different rendering of the popup element based on the screen dimensions.
299
- */
300
- adaptive?: boolean;
301
- /**
302
- * Specifies the text that is rendered as title in the adaptive popup.
303
- */
304
- adaptiveTitle?: string;
305
- /**
306
- * Sets the data item field that represents the start of a group. Applicable to objects data.
307
- */
308
- groupField?: string;
309
- /**
310
- * Fires when a DropDownList's group header item is about to be rendered. Used to override the default appearance of the group's headers.
311
- */
312
- groupHeaderItemRender?: (li: React.ReactElement<HTMLLIElement>, itemProps: ListGroupItemProps) => React.ReactNode;
313
- /**
314
- * Fires when a DropDownList's sticky group header item is about to be rendered. Used to override the default appearance of the sticky group header of the component.
315
- */
316
- groupStickyHeaderItemRender?: (div: React.ReactElement<HTMLDivElement>, stickyHeaderProps: GroupStickyHeaderProps) => React.ReactNode;
317
- /**
318
- * @hidden
319
- */
320
- list?: any;
321
- /**
322
- * @hidden
323
- */
324
- groupMode?: string;
325
- /**
326
- * Defines if DropDownList's disabled items will be skipped or focused when navigating through the list of items using a keyboard. Defaults to `true`.
327
- */
328
- skipDisabledItems?: boolean;
329
- }
@@ -1,74 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the package root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as React from 'react';
6
- import { DropDownTreeProps, DropDownTreeHandle } from './DropDownTreeProps';
7
- /**
8
- * Represents the PropsContext of the `DropDownTree` component.
9
- * Used for global configuration of all `DropDownTree` instances.
10
- *
11
- * For more information, refer to the [Dropdowns Props Context]({% slug props-context_dropdowns %}) article.
12
- */
13
- export declare const DropDownTreePropsContext: React.Context<(p: DropDownTreeProps) => DropDownTreeProps>;
14
- /**
15
- * Represents the DropDownTree component.
16
- *
17
- * Accepts properties of type [DropDownTreeProps]({% slug api_dropdowns_dropdowntreeprops %}).
18
- * Obtaining the `ref` returns an object of type [DropDownTreeHandle]({% slug api_dropdowns_dropdowntreehandle %}).
19
- *
20
- * @example
21
- * ```jsx
22
- * const selectField = "selected";
23
- * const expandField = "expanded";
24
- * const dataItemKey = "id";
25
- * const textField = "text";
26
- * const subItemsField = "items";
27
- * const fields = {
28
- * selectField,
29
- * expandField,
30
- * dataItemKey,
31
- * subItemsField,
32
- * };
33
- * const App = () => {
34
- * const [value, setValue] = React.useState(null);
35
- * const [expanded, setExpanded] = React.useState([data[0][dataItemKey]]);
36
- * const onChange = (event) => setValue(event.value);
37
- * const onExpandChange = React.useCallback(
38
- * (event) => setExpanded(expandedState(event.item, dataItemKey, expanded)),
39
- * [expanded]
40
- * );
41
- * const treeData = React.useMemo(
42
- * () =>
43
- * processTreeData(
44
- * data,
45
- * {
46
- * expanded,
47
- * value,
48
- * },
49
- * fields
50
- * ),
51
- * [expanded, value]
52
- * );
53
- *
54
- * return (
55
- * <DropDownTree
56
- * style={{
57
- * width: '300px',
58
- * }}
59
- * placeholder="Please select ..."
60
- * data={treeData}
61
- * value={value}
62
- * onChange={onChange}
63
- * textField={textField}
64
- * dataItemKey={dataItemKey}
65
- * selectField={selectField}
66
- * expandField={expandField}
67
- * onExpandChange={onExpandChange}
68
- * />
69
- * );
70
- * };
71
- * ReactDOM.render(<App />, document.querySelector('my-app'));
72
- * ```
73
- */
74
- export declare const DropDownTree: React.ForwardRefExoticComponent<DropDownTreeProps & React.RefAttributes<DropDownTreeHandle | null>>;