@progress/kendo-react-common 7.2.4-develop.2 → 7.2.4-develop.4
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/Draggable.js +8 -0
- package/Draggable.mjs +79 -0
- package/Droppable.js +8 -0
- package/Droppable.mjs +64 -0
- package/FormComponent.js +8 -0
- package/FormComponent.mjs +13 -0
- package/browser-support.service.js +8 -0
- package/browser-support.service.mjs +25 -0
- package/canUseDOM.js +8 -0
- package/canUseDOM.mjs +13 -0
- package/canUseRef.js +8 -0
- package/canUseRef.mjs +15 -0
- package/classNames.js +8 -0
- package/classNames.mjs +17 -0
- package/clone.js +8 -0
- package/clone.mjs +44 -0
- package/constants/index.js +8 -0
- package/constants/index.mjs +12 -0
- package/contexts/ZIndexContext.js +8 -0
- package/contexts/ZIndexContext.mjs +15 -0
- package/dist/cdn/js/kendo-react-common.js +8 -5
- package/drag-n-drop/context/index.js +8 -0
- package/drag-n-drop/context/index.mjs +23 -0
- package/drag-n-drop/index.js +8 -0
- package/drag-n-drop/index.mjs +46 -0
- package/events/dispatchEvent.js +8 -0
- package/events/dispatchEvent.mjs +21 -0
- package/fieldList.js +8 -0
- package/fieldList.mjs +18 -0
- package/getActiveElement.js +8 -0
- package/getActiveElement.mjs +19 -0
- package/getTabIndex.js +8 -0
- package/getTabIndex.mjs +16 -0
- package/getter.js +8 -0
- package/getter.mjs +26 -0
- package/guid.js +8 -0
- package/guid.mjs +17 -0
- package/hasRelativeStackingContext.js +8 -0
- package/hasRelativeStackingContext.mjs +25 -0
- package/hocs/AsyncFocusBlur.js +8 -0
- package/hocs/AsyncFocusBlur.mjs +23 -0
- package/hocs/use-id-hoc.js +8 -0
- package/hocs/use-id-hoc.mjs +17 -0
- package/hocs/withPropsContext.js +8 -0
- package/hocs/withPropsContext.mjs +18 -0
- package/hooks/use-id.js +8 -0
- package/hooks/use-id.mjs +35 -0
- package/hooks/use-isomorphic-layout-effect.js +8 -0
- package/hooks/use-isomorphic-layout-effect.mjs +13 -0
- package/hooks/useAsyncFocusBlur.js +8 -0
- package/hooks/useAsyncFocusBlur.mjs +38 -0
- package/hooks/useCollection.js +8 -0
- package/hooks/useCollection.mjs +32 -0
- package/hooks/useControlledState.js +8 -0
- package/hooks/useControlledState.mjs +21 -0
- package/hooks/useCustomComponent.js +8 -0
- package/hooks/useCustomComponent.mjs +22 -0
- package/hooks/useDir.js +8 -0
- package/hooks/useDir.mjs +24 -0
- package/hooks/useDocument.js +8 -0
- package/hooks/useDocument.mjs +22 -0
- package/hooks/useDraggable.js +8 -0
- package/hooks/useDraggable.mjs +308 -0
- package/hooks/useDroppable.js +8 -0
- package/hooks/useDroppable.mjs +67 -0
- package/hooks/useInheritedState.js +8 -0
- package/hooks/useInheritedState.mjs +21 -0
- package/hooks/useMouse.js +8 -0
- package/hooks/useMouse.mjs +98 -0
- package/hooks/usePropsContext.js +8 -0
- package/hooks/usePropsContext.mjs +13 -0
- package/hooks/useRtl.js +8 -0
- package/hooks/useRtl.mjs +24 -0
- package/hooks/useWindow.js +8 -0
- package/hooks/useWindow.mjs +20 -0
- package/icons/Icon.js +8 -0
- package/icons/Icon.mjs +92 -0
- package/icons/IconWrap.js +8 -0
- package/icons/IconWrap.mjs +24 -0
- package/icons/IconsContext.js +8 -0
- package/icons/IconsContext.mjs +14 -0
- package/icons/SvgIcon.js +8 -0
- package/icons/SvgIcon.mjs +124 -0
- package/icons/constants.js +8 -0
- package/icons/constants.mjs +21 -0
- package/icons/utils.js +8 -0
- package/icons/utils.mjs +19 -0
- package/index.d.mts +1771 -5
- package/index.d.ts +1771 -65
- package/index.js +8 -5
- package/index.mjs +147 -1812
- package/keys.js +8 -0
- package/keys.mjs +28 -0
- package/memoize.js +8 -0
- package/memoize.mjs +38 -0
- package/navigation.js +8 -0
- package/navigation.mjs +97 -0
- package/noop.js +8 -0
- package/noop.mjs +13 -0
- package/package.json +1 -1
- package/scrollbarWidth.js +8 -0
- package/scrollbarWidth.mjs +20 -0
- package/setter.js +8 -0
- package/setter.mjs +27 -0
- package/theme.js +8 -0
- package/theme.mjs +27 -0
- package/trappedFocus.js +8 -0
- package/trappedFocus.mjs +58 -0
- package/tree-utils/FieldsService.js +8 -0
- package/tree-utils/FieldsService.mjs +48 -0
- package/tree-utils/SortedPublicItemIds.js +8 -0
- package/tree-utils/SortedPublicItemIds.mjs +24 -0
- package/tree-utils/itemIdUtils.js +8 -0
- package/tree-utils/itemIdUtils.mjs +87 -0
- package/tree-utils/itemUtils.js +8 -0
- package/tree-utils/itemUtils.mjs +118 -0
- package/tree-utils/misc.js +8 -0
- package/tree-utils/misc.mjs +22 -0
- package/treeDataOperations.js +8 -0
- package/treeDataOperations.mjs +45 -0
- package/typography/Typography.js +8 -0
- package/typography/Typography.mjs +110 -0
- package/typography/constants.js +8 -0
- package/typography/constants.mjs +71 -0
- package/validate-package.js +8 -0
- package/validate-package.mjs +20 -0
- package/watermark/WatermarkOverlay.js +8 -0
- package/watermark/WatermarkOverlay.mjs +93 -0
- package/Draggable.d.ts +0 -90
- package/Droppable.d.ts +0 -81
- package/FormComponent.d.ts +0 -167
- package/browser-support.service.d.ts +0 -11
- package/canUseDOM.d.ts +0 -8
- package/canUseRef.d.ts +0 -9
- package/classNames.d.ts +0 -8
- package/clone.d.ts +0 -24
- package/constants/index.d.ts +0 -8
- package/contexts/ZIndexContext.d.ts +0 -11
- package/drag-n-drop/context/index.d.ts +0 -23
- package/drag-n-drop/index.d.ts +0 -25
- package/events/BaseEvent.d.ts +0 -22
- package/events/dispatchEvent.d.ts +0 -18
- package/fieldList.d.ts +0 -8
- package/focus.d.ts +0 -8
- package/getActiveElement.d.ts +0 -12
- package/getTabIndex.d.ts +0 -8
- package/getter.d.ts +0 -18
- package/guid.d.ts +0 -8
- package/hasRelativeStackingContext.d.ts +0 -6
- package/hocs/AsyncFocusBlur.d.ts +0 -17
- package/hocs/use-id-hoc.d.ts +0 -7
- package/hocs/withPropsContext.d.ts +0 -9
- package/hooks/index.d.ts +0 -16
- package/hooks/use-id.d.ts +0 -6
- package/hooks/use-isomorphic-layout-effect.d.ts +0 -7
- package/hooks/useAsyncFocusBlur.d.ts +0 -29
- package/hooks/useCollection.d.ts +0 -18
- package/hooks/useControlledState.d.ts +0 -11
- package/hooks/useCustomComponent.d.ts +0 -15
- package/hooks/useDir.d.ts +0 -9
- package/hooks/useDocument.d.ts +0 -11
- package/hooks/useDraggable.d.ts +0 -67
- package/hooks/useDroppable.d.ts +0 -32
- package/hooks/useInheritedState.d.ts +0 -17
- package/hooks/useMouse.d.ts +0 -24
- package/hooks/usePropsContext.d.ts +0 -7
- package/hooks/useRtl.d.ts +0 -9
- package/hooks/useWindow.d.ts +0 -11
- package/icons/BaseIconProps.d.ts +0 -76
- package/icons/Icon.d.ts +0 -39
- package/icons/IconWrap.d.ts +0 -11
- package/icons/IconsContext.d.ts +0 -25
- package/icons/SvgIcon.d.ts +0 -75
- package/icons/constants.d.ts +0 -17
- package/icons/models/flip.d.ts +0 -15
- package/icons/models/size.d.ts +0 -19
- package/icons/models/theme-color.d.ts +0 -25
- package/icons/utils.d.ts +0 -21
- package/keys.d.ts +0 -24
- package/memoize.d.ts +0 -14
- package/models/auto-scroll-options.d.ts +0 -26
- package/models/index.d.ts +0 -9
- package/models/kendoReactComponentBaseProps.d.ts +0 -27
- package/models/mouse.d.ts +0 -20
- package/models/pointer.d.ts +0 -27
- package/models/touch.d.ts +0 -21
- package/navigation.d.ts +0 -131
- package/noop.d.ts +0 -8
- package/scrollbarWidth.d.ts +0 -12
- package/setter.d.ts +0 -20
- package/theme.d.ts +0 -12
- package/tree-utils/FieldsService.d.ts +0 -29
- package/tree-utils/SortedPublicItemIds.d.ts +0 -12
- package/tree-utils/itemIdUtils.d.ts +0 -64
- package/tree-utils/itemUtils.d.ts +0 -49
- package/tree-utils/misc.d.ts +0 -12
- package/treeDataOperations.d.ts +0 -43
- package/typography/Typography.d.ts +0 -39
- package/typography/TypographyProps.d.ts +0 -124
- package/typography/constants.d.ts +0 -88
- package/typography/models/margin.d.ts +0 -27
- package/validate-package.d.ts +0 -13
- package/watermark/WatermarkOverlay.d.ts +0 -9
package/index.d.mts
CHANGED
|
@@ -1,5 +1,1771 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
9
|
+
import { NormalizedDragEvent } from '@progress/kendo-draggable-common';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
import * as React_2 from 'react';
|
|
12
|
+
import { validatePackage as validatePackage_2 } from '@progress/kendo-licensing';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @hidden
|
|
16
|
+
*/
|
|
17
|
+
export declare function addItem(item: any, operation: 'before' | 'after' | 'child', childrenField: string, targetItemId: string, items: any[]): any[];
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @hidden
|
|
21
|
+
*/
|
|
22
|
+
export declare const applyTrappedFocus: (e: React.KeyboardEvent, containerElement: HTMLElement, updateFocusedState?: ((isContainerFocused: boolean) => void) | undefined) => void;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @hidden
|
|
26
|
+
*/
|
|
27
|
+
export declare function areAllDirectChildrenChecked(item: any, itemId: any, idField: string | undefined, childrenField: string, check: string[]): boolean;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* An utility High-order Component for asynchronous focus/blur handling.
|
|
31
|
+
*
|
|
32
|
+
* By default, the `onFocus` and `onBlur` callbacks are called every time a child components receives/loses focus.
|
|
33
|
+
* Use this utility HOC for scenarios where you need to know if the parent has received focus for the first time, or completely lost focus.
|
|
34
|
+
*
|
|
35
|
+
* @returns
|
|
36
|
+
*/
|
|
37
|
+
export declare const AsyncFocusBlur: ({ children, onFocus, onBlur, onSyncFocus, onSyncBlur }: AsyncFocusBlurArgs<any> & {
|
|
38
|
+
children: (args: AsyncFocusBlurArgs<any>) => React_2.ReactNode;
|
|
39
|
+
}) => JSX_2.Element;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @hidden
|
|
43
|
+
*/
|
|
44
|
+
export declare type AsyncFocusBlurArgs<T extends any[]> = {
|
|
45
|
+
onFocus?: (...event: T) => void;
|
|
46
|
+
onBlur?: (...event: T) => void;
|
|
47
|
+
/**
|
|
48
|
+
* @hidden
|
|
49
|
+
*/
|
|
50
|
+
onSyncFocus?: (event: React_2.FocusEvent<any>) => void;
|
|
51
|
+
/**
|
|
52
|
+
* @hidden
|
|
53
|
+
*/
|
|
54
|
+
onSyncBlur?: (event: React_2.FocusEvent<any>) => void;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Represents additional configuration options for the `autoScroll` options of the `useDraggable` hook and `Draggable` component.
|
|
59
|
+
*/
|
|
60
|
+
export declare interface AutoScrollOptions {
|
|
61
|
+
/**
|
|
62
|
+
* Set to `false` to disable the `autoScroll` feature.
|
|
63
|
+
*/
|
|
64
|
+
enabled?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Allows the user to toggle `autoScroll` in a specific direction.
|
|
67
|
+
*/
|
|
68
|
+
direction?: {
|
|
69
|
+
horizontal: boolean;
|
|
70
|
+
vertical: boolean;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Overrides the calculated element used for boundary detection, used to calculate the `autoScroll` velocity.
|
|
74
|
+
*/
|
|
75
|
+
boundaryElementRef?: React.RefObject<HTMLElement | null | {
|
|
76
|
+
element: HTMLElement | null;
|
|
77
|
+
}> | null;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** @hidden */
|
|
81
|
+
declare interface BaseDraggableEvent {
|
|
82
|
+
/**
|
|
83
|
+
* The DOM element.
|
|
84
|
+
*/
|
|
85
|
+
element: HTMLElement;
|
|
86
|
+
/**
|
|
87
|
+
* The target Draggable reference.
|
|
88
|
+
*/
|
|
89
|
+
target: DraggableHandle;
|
|
90
|
+
/**
|
|
91
|
+
* The normalized drag event.
|
|
92
|
+
*/
|
|
93
|
+
event: NormalizedDragEvent;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** @hidden */
|
|
97
|
+
declare interface BaseDroppableEvent {
|
|
98
|
+
/**
|
|
99
|
+
* The DOM element.
|
|
100
|
+
*/
|
|
101
|
+
element: HTMLElement;
|
|
102
|
+
/**
|
|
103
|
+
* The target Draggable reference.
|
|
104
|
+
*/
|
|
105
|
+
target: DroppableHandle;
|
|
106
|
+
/**
|
|
107
|
+
* The normalized drag event.
|
|
108
|
+
*/
|
|
109
|
+
event: NormalizedDragEvent;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* @hidden
|
|
114
|
+
*/
|
|
115
|
+
export declare interface BaseEvent<T> {
|
|
116
|
+
/**
|
|
117
|
+
* A React Synthetic Event.
|
|
118
|
+
*/
|
|
119
|
+
syntheticEvent: React_2.SyntheticEvent<any>;
|
|
120
|
+
/**
|
|
121
|
+
* A native DOM event.
|
|
122
|
+
*/
|
|
123
|
+
nativeEvent: any;
|
|
124
|
+
/**
|
|
125
|
+
* An event target.
|
|
126
|
+
*/
|
|
127
|
+
target: T;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @hidden
|
|
132
|
+
*/
|
|
133
|
+
declare interface BaseIconProps {
|
|
134
|
+
/**
|
|
135
|
+
* Sets the `tabIndex` of the icon element.
|
|
136
|
+
*/
|
|
137
|
+
tabIndex?: number;
|
|
138
|
+
/**
|
|
139
|
+
* Sets the `id` of the icon element.
|
|
140
|
+
*/
|
|
141
|
+
id?: string;
|
|
142
|
+
/**
|
|
143
|
+
* Sets additional CSS styles to the icon.
|
|
144
|
+
*/
|
|
145
|
+
style?: React.CSSProperties;
|
|
146
|
+
/**
|
|
147
|
+
* Specifies a list of CSS classes that will be added to the root DOM element.
|
|
148
|
+
*/
|
|
149
|
+
className?: string;
|
|
150
|
+
/**
|
|
151
|
+
* Specifies the theme color of the Icon.
|
|
152
|
+
*
|
|
153
|
+
* The possible values are:
|
|
154
|
+
* * `inherit` (Default)—Applies coloring based on the current color.
|
|
155
|
+
* * `primary` —Applies coloring based on primary theme color.
|
|
156
|
+
* * `secondary`—Applies coloring based on secondary theme color.
|
|
157
|
+
* * `tertiary`— Applies coloring based on tertiary theme color.
|
|
158
|
+
* * `info`—Applies coloring based on info theme color.
|
|
159
|
+
* * `success`— Applies coloring based on success theme color.
|
|
160
|
+
* * `warning`— Applies coloring based on warning theme color.
|
|
161
|
+
* * `error`— Applies coloring based on error theme color.
|
|
162
|
+
* * `dark`— Applies coloring based on dark theme color.
|
|
163
|
+
* * `light`— Applies coloring based on light theme color.
|
|
164
|
+
* * `inverse`— Applies coloring based on inverse theme color.
|
|
165
|
+
*
|
|
166
|
+
* If the property is not set, the icon inherits the color from its parent.
|
|
167
|
+
*
|
|
168
|
+
* You can use the `style` prop to apply custom color related properties to the icon.
|
|
169
|
+
*/
|
|
170
|
+
themeColor?: IconThemeColor;
|
|
171
|
+
/**
|
|
172
|
+
* Specifies the size of the icon.
|
|
173
|
+
*
|
|
174
|
+
* The possible values are:
|
|
175
|
+
* * `default` (Default)—Font-size: 16px; Width: 16px; Height: 16px.
|
|
176
|
+
* * `xsmall`—Font-size: 12px; Width: 12px; Height: 12px.
|
|
177
|
+
* * `small`—Font-size: 14px; Width: 14px; Height: 14px.
|
|
178
|
+
* * `medium`—Font-size: 16px; Width: 16px; Height: 16px.
|
|
179
|
+
* * `large`—Font-size: 20px; Width: 20px; Height: 20px.
|
|
180
|
+
* * `xlarge`—Font-size: 24px; Width: 24px; Height: 24px.
|
|
181
|
+
* * `xxlarge`—Font-size: 32px; Width: 32px; Height: 32px.
|
|
182
|
+
* * `xxxlarge`—Font-size: 48px; Width: 48px; Height: 48px.
|
|
183
|
+
*
|
|
184
|
+
* You can use the `style` prop to apply custom font size to the icon.
|
|
185
|
+
*/
|
|
186
|
+
size?: IconSize;
|
|
187
|
+
/**
|
|
188
|
+
* Specifies the icon flip direction.
|
|
189
|
+
*
|
|
190
|
+
* The possible values are:
|
|
191
|
+
* * `default` (Default)—No flipping applied.
|
|
192
|
+
* * `horizontal`—Flips the icon in horizontal direction.
|
|
193
|
+
* * `vertical`—Flips the icon in vertical direction.
|
|
194
|
+
* * `both`—Flips the icon in both horizontal and vertical directions.
|
|
195
|
+
*
|
|
196
|
+
*/
|
|
197
|
+
flip?: IconFlip;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* @hidden
|
|
202
|
+
*/
|
|
203
|
+
export declare class BrowserSupportService {
|
|
204
|
+
private scrollbar;
|
|
205
|
+
get scrollbarWidth(): number;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* @hidden
|
|
210
|
+
*/
|
|
211
|
+
export declare const canUseDOM: boolean;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* @hidden
|
|
215
|
+
*/
|
|
216
|
+
export declare const canUseRef: (Component: React_2.ComponentType | string) => boolean;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* @hidden
|
|
220
|
+
*/
|
|
221
|
+
export declare const classNames: (...args: any[]) => string;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* @hidden
|
|
225
|
+
*/
|
|
226
|
+
export declare function clone(obj: any): any;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* @hidden
|
|
230
|
+
*/
|
|
231
|
+
export declare function cloneArray(array: any[]): any;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* @hidden
|
|
235
|
+
*/
|
|
236
|
+
export declare const cloneDate: (date?: Date) => Date | null;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* @hidden
|
|
240
|
+
*/
|
|
241
|
+
export declare function cloneObject(obj: any, result: any): void;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* @hidden
|
|
245
|
+
*/
|
|
246
|
+
export declare function cloneValue(value: any, nextValue: any): any;
|
|
247
|
+
|
|
248
|
+
/** @hidden */
|
|
249
|
+
export declare type Collection<T> = T[];
|
|
250
|
+
|
|
251
|
+
/** @hidden */
|
|
252
|
+
export declare enum COLLECTION_ACTION {
|
|
253
|
+
add = 0,
|
|
254
|
+
remove = 1
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/** @hidden */
|
|
258
|
+
export declare interface CollectionAction<T> {
|
|
259
|
+
type: COLLECTION_ACTION;
|
|
260
|
+
item: T;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* @hidden
|
|
265
|
+
*/
|
|
266
|
+
declare function createId(childId: string | number, parentId?: string): string;
|
|
267
|
+
|
|
268
|
+
/** @hidden */
|
|
269
|
+
export declare const createPropsContext: <T extends unknown>() => React_2.Context<(p: T) => T>;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* @hidden
|
|
273
|
+
*/
|
|
274
|
+
export declare type CustomComponent<P = unknown> = React_2.ComponentType<P> | React_2.ReactElement<Partial<P>> | string;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* @hidden
|
|
278
|
+
* Dispatches a new event based on an event that was already internally dispatched to KendoReact users.
|
|
279
|
+
*
|
|
280
|
+
* @param eventHandler - The public event handler that is assigned by the user.
|
|
281
|
+
* When undefined, the method is not an option.
|
|
282
|
+
* @param dispatchedEvent - The event that was already dispatched internally.
|
|
283
|
+
* @param target - The target component of the new event.
|
|
284
|
+
* @param eventData - The additional data that will be passed through the new event.
|
|
285
|
+
* When the new event has no additional data
|
|
286
|
+
* other than the `BaseEvent` arguments, pass `undefined`.
|
|
287
|
+
*/
|
|
288
|
+
declare function dispatchEvent_2<E extends BaseEvent<React.Component | FCHandle>, FCHandle = object>(eventHandler: ((event: E) => void) | undefined, dispatchedEvent: React.SyntheticEvent<any>, target: E['target'], eventData: Exclude<keyof E, keyof BaseEvent<React.Component | FCHandle>> extends never ? undefined : Pick<E, Exclude<keyof E, keyof BaseEvent<React.Component | FCHandle>>>): void;
|
|
289
|
+
export { dispatchEvent_2 as dispatchEvent }
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* The `DragAndDrop` component is required for the `droppable` functionality to work properly.
|
|
293
|
+
*
|
|
294
|
+
* It is used internally to synchronize the `drag` and `drop` functionalities.
|
|
295
|
+
* Accepts properties of type [DragAndDropProps]({% slug api_common_draganddropprops %}).
|
|
296
|
+
*/
|
|
297
|
+
export declare const DragAndDrop: {
|
|
298
|
+
(props: DragAndDropProps): JSX_2.Element;
|
|
299
|
+
displayName: string;
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Represents the properties of the `DragAndDrop` component.
|
|
304
|
+
*/
|
|
305
|
+
export declare interface DragAndDropProps {
|
|
306
|
+
/**
|
|
307
|
+
* Represents the `children` of the `DragAndDrop` component. The `children` prop can be any valid React Element.
|
|
308
|
+
*/
|
|
309
|
+
children?: React_2.ReactNode;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Represents the KendoReact Draggable component.
|
|
314
|
+
*
|
|
315
|
+
* Accepts properties of type [DraggableProps]({% slug api_common_draggableprops %}),
|
|
316
|
+
* and returns an object of type [DraggableHandle]({% slug api_common_draggablehandle %}) when the `ref` is obtained.
|
|
317
|
+
*/
|
|
318
|
+
export declare const Draggable: React_2.ForwardRefExoticComponent<DraggableProps & React_2.RefAttributes<DraggableHandle | null>>;
|
|
319
|
+
|
|
320
|
+
export declare type Draggable = DraggableHandle;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Represents the object of the `onDragEnd` callback.
|
|
324
|
+
*/
|
|
325
|
+
export declare interface DraggableDragEndEvent extends BaseDraggableEvent {
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Represents the object of the `onDrag` callback.
|
|
330
|
+
*/
|
|
331
|
+
export declare interface DraggableDragEvent extends BaseDraggableEvent {
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Represents the object of the `onDragStart` callback.
|
|
336
|
+
*/
|
|
337
|
+
export declare interface DraggableDragStartEvent extends BaseDraggableEvent {
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Represents the `ref` object of the `Draggable` component.
|
|
342
|
+
*/
|
|
343
|
+
export declare interface DraggableHandle {
|
|
344
|
+
/**
|
|
345
|
+
* The element which is being dragged.
|
|
346
|
+
*/
|
|
347
|
+
element: HTMLElement | null;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Represents the configuration object type of the `Draggable` component and `useDraggable` hook.
|
|
352
|
+
*/
|
|
353
|
+
export declare interface DraggableOptions {
|
|
354
|
+
/**
|
|
355
|
+
* Set the `hint` to override the element used for collision detection.
|
|
356
|
+
*
|
|
357
|
+
* For more information, refer to the [Drag Hint]({% slug drag-hint_drag-and-drop %}) article.
|
|
358
|
+
*/
|
|
359
|
+
hint?: React_2.RefObject<HTMLElement | null | {
|
|
360
|
+
element: HTMLElement | null;
|
|
361
|
+
}> | null;
|
|
362
|
+
/**
|
|
363
|
+
* Set the `mouseOnly` property to `true` to stop the draggable from attaching `touch` event handlers.
|
|
364
|
+
*
|
|
365
|
+
* Defaults to `false`.
|
|
366
|
+
*/
|
|
367
|
+
mouseOnly?: boolean;
|
|
368
|
+
/**
|
|
369
|
+
* Set the `autoScroll` property to `false` to disable automatic container scroll when close to the edge.
|
|
370
|
+
* For more information, refer to the [Auto Scroll]({% slug auto-scroll_drag-and-drop %}) article.
|
|
371
|
+
*
|
|
372
|
+
* Defaults to `true`.
|
|
373
|
+
*/
|
|
374
|
+
autoScroll?: boolean | AutoScrollOptions;
|
|
375
|
+
/**
|
|
376
|
+
* @hidden
|
|
377
|
+
*/
|
|
378
|
+
scrollContainer?: React_2.RefObject<HTMLElement | null | {
|
|
379
|
+
element: HTMLElement | null;
|
|
380
|
+
}>;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Represents the object of the `onPress` callback.
|
|
385
|
+
*/
|
|
386
|
+
export declare interface DraggablePressEvent extends BaseDraggableEvent {
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Represents the props of the KendoReact Draggable component.
|
|
391
|
+
*/
|
|
392
|
+
export declare interface DraggableProps extends DraggableOptions {
|
|
393
|
+
/**
|
|
394
|
+
* Fires when the user press element inside the Draggable component.
|
|
395
|
+
*/
|
|
396
|
+
onPress?: (event: DraggablePressEvent) => void;
|
|
397
|
+
/**
|
|
398
|
+
* Fires when the user starts dragging the element inside the Draggable component.
|
|
399
|
+
*/
|
|
400
|
+
onDragStart?: (event: DraggableDragStartEvent) => void;
|
|
401
|
+
/**
|
|
402
|
+
* Fires when the user drag the element inside the Draggable component.
|
|
403
|
+
*/
|
|
404
|
+
onDrag?: (event: DraggableDragEvent) => void;
|
|
405
|
+
/**
|
|
406
|
+
* Fires when the user finishes dragging the element inside the Draggable component.
|
|
407
|
+
*/
|
|
408
|
+
onDragEnd?: (event: DraggableDragEndEvent) => void;
|
|
409
|
+
/**
|
|
410
|
+
* Fires when the user release the current drag action.
|
|
411
|
+
*/
|
|
412
|
+
onRelease?: (event: DraggableReleaseEvent) => void;
|
|
413
|
+
/**
|
|
414
|
+
* Callback to get the child element ref. Useful as the Draggable overrides ref of the child element.
|
|
415
|
+
*/
|
|
416
|
+
childRef?: React_2.Ref<HTMLElement | null | {
|
|
417
|
+
element: HTMLElement | null;
|
|
418
|
+
[key: string]: any;
|
|
419
|
+
}>;
|
|
420
|
+
/** @hidden */
|
|
421
|
+
children?: React_2.ReactNode;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Represents the object of the `onRelease` callback.
|
|
426
|
+
*/
|
|
427
|
+
export declare interface DraggableReleaseEvent extends BaseDraggableEvent {
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Represents the KendoReact Droppable component.
|
|
432
|
+
*
|
|
433
|
+
* Accepts properties of type [DroppableProps]({% slug api_common_droppableprops %}),
|
|
434
|
+
* and returns an object of type [DroppableHandle]({% slug api_common_droppablehandle %}) when the `ref` is obtained.
|
|
435
|
+
*/
|
|
436
|
+
export declare const Droppable: React_2.ForwardRefExoticComponent<DroppableProps & React_2.RefAttributes<DroppableHandle | null>>;
|
|
437
|
+
|
|
438
|
+
export declare type Droppable = DroppableHandle;
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Represents the object of the `onDragEnter` callback.
|
|
442
|
+
*/
|
|
443
|
+
export declare interface DroppableDragEnterEvent extends BaseDroppableEvent {
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Represents the object of the `onDragLeave` callback.
|
|
448
|
+
*/
|
|
449
|
+
export declare interface DroppableDragLeaveEvent extends BaseDroppableEvent {
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Represents the object of the `onDragOver` callback.
|
|
454
|
+
*/
|
|
455
|
+
export declare interface DroppableDragOverEvent extends BaseDroppableEvent {
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Represents the object of the `onDrop` callback.
|
|
460
|
+
*/
|
|
461
|
+
export declare interface DroppableDropEvent extends BaseDroppableEvent {
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Represents the `ref` object of the `Droppable` component.
|
|
466
|
+
*/
|
|
467
|
+
export declare interface DroppableHandle {
|
|
468
|
+
/**
|
|
469
|
+
* The element which is registered as droppable.
|
|
470
|
+
*/
|
|
471
|
+
element?: HTMLElement;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* Represents the props of the KendoReact Droppable component.
|
|
476
|
+
*/
|
|
477
|
+
export declare interface DroppableProps {
|
|
478
|
+
/**
|
|
479
|
+
* Fires when the user enters the element during drag.
|
|
480
|
+
*/
|
|
481
|
+
onDragEnter?: (event: DroppableDragEnterEvent) => void;
|
|
482
|
+
/**
|
|
483
|
+
* Fires when the user is dragging an element over the Droppable component.
|
|
484
|
+
*/
|
|
485
|
+
onDragOver?: (event: DroppableDragOverEvent) => void;
|
|
486
|
+
/**
|
|
487
|
+
* Fires when the user leaves the element during drag.
|
|
488
|
+
*/
|
|
489
|
+
onDragLeave?: (event: DroppableDragLeaveEvent) => void;
|
|
490
|
+
/**
|
|
491
|
+
* Fires when the user drops a draggable element inside the Droppable component.
|
|
492
|
+
*/
|
|
493
|
+
onDrop?: (event: DroppableDropEvent) => void;
|
|
494
|
+
/**
|
|
495
|
+
* Callback to get the child element ref. Useful as the Droppable overrides ref of the child element.
|
|
496
|
+
*/
|
|
497
|
+
childRef?: React_2.Ref<HTMLElement | null | {
|
|
498
|
+
element: HTMLElement | null;
|
|
499
|
+
[key: string]: any;
|
|
500
|
+
}>;
|
|
501
|
+
/** @hidden */
|
|
502
|
+
children?: React_2.ReactNode;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
declare type ElementMouse = {
|
|
506
|
+
[P in keyof Required<KendoMouse<any, any>>]: (event: React_2.MouseEvent<any>) => void;
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* @hidden
|
|
511
|
+
*/
|
|
512
|
+
declare const EMPTY_ID = "";
|
|
513
|
+
|
|
514
|
+
declare type EqualityFn<TFunc extends (...args: any[]) => any> = (newArgs: Parameters<TFunc>, lastArgs: Parameters<TFunc>) => boolean;
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* Similar to the `Object.assign` function. Additionally, creates a new array for the subitems.
|
|
518
|
+
*
|
|
519
|
+
* @param {object} item - The source data item.
|
|
520
|
+
* @param {string} subItemsField - The field which points to the subitems collection of each data item.
|
|
521
|
+
* @param {object} propsToExtend - The props with which the source data item will be extended.
|
|
522
|
+
* @returns {object} - The target data item.
|
|
523
|
+
*/
|
|
524
|
+
export declare const extendDataItem: (item: any, subItemsField: string, propsToExtend?: any) => any;
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* @hidden
|
|
528
|
+
*/
|
|
529
|
+
export declare interface FieldRenderPropsBase {
|
|
530
|
+
/**
|
|
531
|
+
* A callback you have to call when the value of the rendered component is changed
|
|
532
|
+
* ([see example]({% slug common_scenarios_form %}#toc-changing-the-field-value)).
|
|
533
|
+
* The `value` property of the event takes precedence over `target.value`.
|
|
534
|
+
*/
|
|
535
|
+
onChange: (event: {
|
|
536
|
+
target?: any;
|
|
537
|
+
value?: any;
|
|
538
|
+
}) => void;
|
|
539
|
+
/**
|
|
540
|
+
* A callback you have to call when the rendered component is focused.
|
|
541
|
+
* Responsible for setting the visited state of the Field.
|
|
542
|
+
*/
|
|
543
|
+
onFocus: () => void;
|
|
544
|
+
/**
|
|
545
|
+
* A callback you have to call when the rendered component is blurred.
|
|
546
|
+
* Responsible for setting the touched state of the Field.
|
|
547
|
+
*/
|
|
548
|
+
onBlur: () => void;
|
|
549
|
+
/**
|
|
550
|
+
* Represents the current value of the Field
|
|
551
|
+
* ([see example]({% slug custom_components_form %}#toc-using-basic-properties)).
|
|
552
|
+
*/
|
|
553
|
+
value: any;
|
|
554
|
+
/**
|
|
555
|
+
* Represents the error message that is returned by the validator.
|
|
556
|
+
* The Field is considered valid if the `validationMessage` field is empty.
|
|
557
|
+
*/
|
|
558
|
+
validationMessage: string | null;
|
|
559
|
+
/**
|
|
560
|
+
* Indicates if the field is touched.
|
|
561
|
+
* The touched state is set to `true` when the `onBlur` callback is called.
|
|
562
|
+
*/
|
|
563
|
+
touched: boolean;
|
|
564
|
+
/**
|
|
565
|
+
* Indicates if the field is modified.
|
|
566
|
+
* The modified state is set to `true` when the `onChange` callback for the current field is called for first time.
|
|
567
|
+
*/
|
|
568
|
+
modified: boolean;
|
|
569
|
+
/**
|
|
570
|
+
* Indicates if the field is visited.
|
|
571
|
+
* The visited state is set to `true` when the `onFocus` callback is called.
|
|
572
|
+
*/
|
|
573
|
+
visited: boolean;
|
|
574
|
+
/**
|
|
575
|
+
* A calculated property based on whether `validationMessage` is present and the `touched` state is set to `true`.
|
|
576
|
+
*/
|
|
577
|
+
valid: boolean;
|
|
578
|
+
/**
|
|
579
|
+
* Represents the children that are passed to the Field.
|
|
580
|
+
*/
|
|
581
|
+
children: any;
|
|
582
|
+
/**
|
|
583
|
+
* The name of the field in the Form state.
|
|
584
|
+
*/
|
|
585
|
+
name: string;
|
|
586
|
+
/**
|
|
587
|
+
* @hidden
|
|
588
|
+
*/
|
|
589
|
+
[customProp: string]: any;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* @hidden
|
|
594
|
+
*/
|
|
595
|
+
export declare const firstFocusableChild: (element: HTMLElement) => HTMLElement | undefined;
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* @hidden
|
|
599
|
+
*/
|
|
600
|
+
export declare const FOCUSABLE_ELEMENTS: string[];
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* @hidden
|
|
604
|
+
*/
|
|
605
|
+
export declare const focusFirstFocusableChild: (element: HTMLElement) => void;
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* @hidden
|
|
609
|
+
*/
|
|
610
|
+
export declare const focusLastFocusableChild: (element: HTMLElement) => void;
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* @hidden
|
|
614
|
+
*/
|
|
615
|
+
export declare abstract class FormComponent {
|
|
616
|
+
abstract get value(): any;
|
|
617
|
+
abstract get validity(): FormComponentValidity;
|
|
618
|
+
abstract get name(): string | undefined;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* Represents the basic props of the KendoReact form components.
|
|
623
|
+
*
|
|
624
|
+
* For runnable examples on forms support, refer to the documentation of the respective form component:
|
|
625
|
+
* * [DateInput]({% slug forms_dateinput %})
|
|
626
|
+
* * [DatePicker]({% slug forms_datepicker %})
|
|
627
|
+
* * [TimePicker]({% slug forms_timepicker %})
|
|
628
|
+
* * [DateTimePicker]({% slug forms_datetimepicker %})
|
|
629
|
+
* * [AutoComplete]({% slug forms_autocomplete %})
|
|
630
|
+
* * [ComboBox]({% slug forms_combobox %})
|
|
631
|
+
* * [DropDownList]({% slug forms_dropdownlist %})
|
|
632
|
+
* * [MultiSelect]({% slug forms_multiselect %})
|
|
633
|
+
* * [Input]({% slug forms_input %})
|
|
634
|
+
* * [MaskedTextBox]({% slug forms_maskedtextbox %})
|
|
635
|
+
* * [NumericTextBox]({% slug forms_numerictextbox %})
|
|
636
|
+
* * [Checkbox]({% slug forms_support_checkbox %})
|
|
637
|
+
* * [Switch]({% slug forms_support_switch %})
|
|
638
|
+
*/
|
|
639
|
+
export declare interface FormComponentProps {
|
|
640
|
+
/**
|
|
641
|
+
* Controls the form error message of the component. If set to an empty string, no error will be thrown.
|
|
642
|
+
*
|
|
643
|
+
* This property is part of the [FormComponentProps]({% slug api_common_formcomponentprops %}) interface.
|
|
644
|
+
*/
|
|
645
|
+
validationMessage?: string;
|
|
646
|
+
/**
|
|
647
|
+
* Specifies if `null` is a valid value for the component.
|
|
648
|
+
*
|
|
649
|
+
* This property is part of the [FormComponentProps]({% slug api_common_formcomponentprops %}) interface.
|
|
650
|
+
*/
|
|
651
|
+
required?: boolean;
|
|
652
|
+
/**
|
|
653
|
+
* Specifies the `name` property of the `input` DOM element.
|
|
654
|
+
*
|
|
655
|
+
* This property is part of the [FormComponentProps]({% slug api_common_formcomponentprops %}) interface.
|
|
656
|
+
*/
|
|
657
|
+
name?: string;
|
|
658
|
+
/**
|
|
659
|
+
* Overrides the validity state of the component.
|
|
660
|
+
* If `valid` is set, the `required` property will be ignored.
|
|
661
|
+
*
|
|
662
|
+
* This property is part of the [FormComponentProps]({% slug api_common_formcomponentprops %}) interface.
|
|
663
|
+
*/
|
|
664
|
+
valid?: boolean;
|
|
665
|
+
/**
|
|
666
|
+
* If set to `false`, no visual representation of the invalid state of the component will be applied.
|
|
667
|
+
*
|
|
668
|
+
* This property is part of the [FormComponentProps]({% slug api_common_formcomponentprops %}) interface.
|
|
669
|
+
*/
|
|
670
|
+
validityStyles?: boolean;
|
|
671
|
+
/**
|
|
672
|
+
* @hidden
|
|
673
|
+
*/
|
|
674
|
+
value?: any;
|
|
675
|
+
/**
|
|
676
|
+
* @hidden
|
|
677
|
+
*/
|
|
678
|
+
defaultValue?: any;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Represents the `validity` state of the KendoReact form components.
|
|
683
|
+
*
|
|
684
|
+
* For runnable examples on forms support, refer to the documentation of the respective form component:
|
|
685
|
+
* * [DateInput]({% slug forms_dateinput %})
|
|
686
|
+
* * [DatePicker]({% slug forms_datepicker %})
|
|
687
|
+
* * [TimePicker]({% slug forms_timepicker %})
|
|
688
|
+
* * [DateTimePicker]({% slug forms_timepicker %})
|
|
689
|
+
* * [AutoComplete]({% slug forms_autocomplete %})
|
|
690
|
+
* * [ComboBox]({% slug forms_combobox %})
|
|
691
|
+
* * [DropDownList]({% slug forms_dropdownlist %})
|
|
692
|
+
* * [MultiSelect]({% slug forms_multiselect %})
|
|
693
|
+
* * [Input]({% slug forms_input %})
|
|
694
|
+
* * [MaskedTextBox]({% slug forms_maskedtextbox %})
|
|
695
|
+
* * [NumericTextBox]({% slug forms_numerictextbox %})
|
|
696
|
+
* * [Checkbox]({% slug forms_support_checkbox %})
|
|
697
|
+
* * [Switch]({% slug forms_support_switch %})
|
|
698
|
+
*/
|
|
699
|
+
export declare interface FormComponentValidity {
|
|
700
|
+
readonly badInput?: boolean;
|
|
701
|
+
readonly customError: boolean;
|
|
702
|
+
readonly patternMismatch?: boolean;
|
|
703
|
+
readonly rangeOverflow?: boolean;
|
|
704
|
+
readonly rangeUnderflow?: boolean;
|
|
705
|
+
readonly stepMismatch?: boolean;
|
|
706
|
+
readonly tooLong?: boolean;
|
|
707
|
+
readonly tooShort?: boolean;
|
|
708
|
+
readonly typeMismatch?: boolean;
|
|
709
|
+
readonly valid: boolean;
|
|
710
|
+
readonly valueMissing: boolean;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
/**
|
|
714
|
+
* @hidden
|
|
715
|
+
*/
|
|
716
|
+
export declare const getActiveElement: (document: any) => HTMLElement | undefined;
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* @hidden
|
|
720
|
+
*/
|
|
721
|
+
export declare function getAllDirectIndirectChildrenIds(item: any, itemId: string, childrenField: string, idField: string | undefined): any[];
|
|
722
|
+
|
|
723
|
+
/**
|
|
724
|
+
* @hidden
|
|
725
|
+
*/
|
|
726
|
+
export declare function getAllParents(itemId: string, childrenField: string, items: any[]): any[];
|
|
727
|
+
|
|
728
|
+
/**
|
|
729
|
+
* @hidden
|
|
730
|
+
*/
|
|
731
|
+
declare function getAllShortIds(itemId: string): string[];
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* @hidden
|
|
735
|
+
*/
|
|
736
|
+
declare function getDecrementedItemIdAfterRemoval(removedItemId: string, itemId: string): string;
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* @hidden
|
|
740
|
+
*/
|
|
741
|
+
declare function getDirectParentId(itemId: string): string;
|
|
742
|
+
|
|
743
|
+
/**
|
|
744
|
+
* @hidden
|
|
745
|
+
*/
|
|
746
|
+
declare function getFirstChildId(itemId: string): string;
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
* @hidden
|
|
750
|
+
*/
|
|
751
|
+
declare function getIdWithoutRootParentId(itemId: string): string;
|
|
752
|
+
|
|
753
|
+
/**
|
|
754
|
+
* @hidden
|
|
755
|
+
*/
|
|
756
|
+
export declare const getInnerActiveElement: any;
|
|
757
|
+
|
|
758
|
+
/**
|
|
759
|
+
* @hidden
|
|
760
|
+
*/
|
|
761
|
+
declare function getItemById(itemId: string, items: any, childrenField: string): any;
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* Returns the data item path in the tree based on the level parameter.
|
|
765
|
+
*
|
|
766
|
+
* @param {any[]} tree - The data tree.
|
|
767
|
+
* @param {number[]} level - The level of the target tree item.
|
|
768
|
+
* @param {string} subItemsField - The field which points to the subitems collection of each data item.
|
|
769
|
+
* @returns {any[]} - The path of the data item.
|
|
770
|
+
*/
|
|
771
|
+
export declare const getItemPath: (tree: any[], level: number[], subItemsField?: string) => any[];
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* @hidden
|
|
775
|
+
*/
|
|
776
|
+
export declare function getNestedValue(fieldName: string | undefined, dataItem: any): any;
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* @hidden
|
|
780
|
+
*/
|
|
781
|
+
declare function getRootParentId(itemId: string): string;
|
|
782
|
+
|
|
783
|
+
/**
|
|
784
|
+
* @hidden
|
|
785
|
+
*/
|
|
786
|
+
export declare const getScrollbarWidth: () => number | false;
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* @hidden
|
|
790
|
+
*/
|
|
791
|
+
declare function getShortId(itemId: string): string;
|
|
792
|
+
|
|
793
|
+
/**
|
|
794
|
+
* @hidden
|
|
795
|
+
*/
|
|
796
|
+
export declare const getTabIndex: (tabIndex?: number | string, disabled?: boolean, useDefaultTabIndexWhenDisabled?: boolean) => number | undefined;
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* Can be used for getting value from object using field path. For example `users[index].name`.
|
|
800
|
+
*
|
|
801
|
+
* @example
|
|
802
|
+
* ```jsx-no-run
|
|
803
|
+
* const values = {users:[{lastName: 'Doe'}]};
|
|
804
|
+
* const firstUserLastName = getter('user[0].lastName');
|
|
805
|
+
*
|
|
806
|
+
* console.log(firstUserLastName(values))
|
|
807
|
+
*
|
|
808
|
+
* // result: 'Doe'
|
|
809
|
+
* ```
|
|
810
|
+
*/
|
|
811
|
+
export declare function getter(field: string): (values: any) => any;
|
|
812
|
+
|
|
813
|
+
/**
|
|
814
|
+
* @hidden
|
|
815
|
+
*/
|
|
816
|
+
export declare const guid: Function;
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* @hidden
|
|
820
|
+
*/
|
|
821
|
+
export declare function hasChildren(item: any, childrenField: string): boolean;
|
|
822
|
+
|
|
823
|
+
/** @hidden */
|
|
824
|
+
export declare const hasRelativeStackingContext: (elementSource?: HTMLElement) => boolean;
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* Represents the [KendoReact Icon component]({% slug overview_icon %}).
|
|
828
|
+
*
|
|
829
|
+
* @example
|
|
830
|
+
* ```jsx
|
|
831
|
+
* const App = () => {
|
|
832
|
+
* return (
|
|
833
|
+
* <Icon name="home"/>
|
|
834
|
+
* );
|
|
835
|
+
* };
|
|
836
|
+
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
837
|
+
* ```
|
|
838
|
+
*/
|
|
839
|
+
export declare const Icon: React_2.ForwardRefExoticComponent<IconProps & React_2.RefAttributes<IconHandle | null>>;
|
|
840
|
+
|
|
841
|
+
/**
|
|
842
|
+
* Specifies the icon flip direction.
|
|
843
|
+
*
|
|
844
|
+
* The possible values are:
|
|
845
|
+
* * `default` (Default)—No flipping applied.
|
|
846
|
+
* * `horizontal`—Flips the icon in horizontal direction.
|
|
847
|
+
* * `vertical`—Flips the icon in vertical direction.
|
|
848
|
+
* * `both`—Flips the icon in both horizontal and vertical directions.
|
|
849
|
+
*
|
|
850
|
+
*/
|
|
851
|
+
export declare type IconFlip = 'default' | 'horizontal' | 'vertical' | 'both';
|
|
852
|
+
|
|
853
|
+
/**
|
|
854
|
+
* @hidden
|
|
855
|
+
*/
|
|
856
|
+
export declare interface IconHandle {
|
|
857
|
+
/**
|
|
858
|
+
* The IconHandle element.
|
|
859
|
+
*/
|
|
860
|
+
element: HTMLSpanElement | null;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
/**
|
|
864
|
+
* Represents the props of the [KendoReact Icon component]({% slug overview_icon %}).
|
|
865
|
+
*/
|
|
866
|
+
export declare interface IconProps extends BaseIconProps, KendoMouse<IconHandle, HTMLSpanElement> {
|
|
867
|
+
/**
|
|
868
|
+
* Represents the name of the icon.
|
|
869
|
+
*/
|
|
870
|
+
name?: string;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
/**
|
|
874
|
+
* Represents a React Context which provides you with the option to configure the KendoReact components icons.
|
|
875
|
+
*/
|
|
876
|
+
export declare const IconsContext: React_2.Context<IconsContextType>;
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* IconsContext type.
|
|
880
|
+
*/
|
|
881
|
+
export declare interface IconsContextType {
|
|
882
|
+
/**
|
|
883
|
+
* Sets the type of the icons used in the KendoReact components inside IconsContext.
|
|
884
|
+
*/
|
|
885
|
+
type?: 'font' | 'svg';
|
|
886
|
+
/**
|
|
887
|
+
* Overrides the built-in icons.
|
|
888
|
+
*/
|
|
889
|
+
icons?: {
|
|
890
|
+
[name: string]: SVGIcon | string;
|
|
891
|
+
};
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
/**
|
|
895
|
+
* Specifies the size of the icon.
|
|
896
|
+
*
|
|
897
|
+
* The possible values are:
|
|
898
|
+
* * `default` (Default)—Font-size: 16px; Width: 16px; Height: 16px.
|
|
899
|
+
* * `xsmall`—Font-size: 12px; Width: 12px; Height: 12px.
|
|
900
|
+
* * `small`—Font-size: 14px; Width: 14px; Height: 14px.
|
|
901
|
+
* * `medium`—Font-size: 16px; Width: 16px; Height: 16px.
|
|
902
|
+
* * `large`—Font-size: 20px; Width: 20px; Height: 20px.
|
|
903
|
+
* * `xlarge`—Font-size: 24px; Width: 24px; Height: 24px.
|
|
904
|
+
* * `xxlarge`—Font-size: 32px; Width: 32px; Height: 32px.
|
|
905
|
+
* * `xxxlarge`—Font-size: 48px; Width: 48px; Height: 48px.
|
|
906
|
+
*
|
|
907
|
+
*/
|
|
908
|
+
export declare type IconSize = 'default' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | 'xxxlarge';
|
|
909
|
+
|
|
910
|
+
/**
|
|
911
|
+
* Specifies the theme color of the Icon.
|
|
912
|
+
*
|
|
913
|
+
* The possible values are:
|
|
914
|
+
* * `inherit` (Default)—Applies coloring based on the current color.
|
|
915
|
+
* * `primary` —Applies coloring based on primary theme color.
|
|
916
|
+
* * `secondary`—Applies coloring based on secondary theme color.
|
|
917
|
+
* * `tertiary`— Applies coloring based on tertiary theme color.
|
|
918
|
+
* * `info`—Applies coloring based on info theme color.
|
|
919
|
+
* * `success`— Applies coloring based on success theme color.
|
|
920
|
+
* * `warning`— Applies coloring based on warning theme color.
|
|
921
|
+
* * `error`— Applies coloring based on error theme color.
|
|
922
|
+
* * `dark`— Applies coloring based on dark theme color.
|
|
923
|
+
* * `light`— Applies coloring based on light theme color.
|
|
924
|
+
* * `inverse`— Applies coloring based on inverse theme color.
|
|
925
|
+
*
|
|
926
|
+
* If the property is not set, the icon inherits the color from its parent.
|
|
927
|
+
*
|
|
928
|
+
* You can use the `style` prop to apply custom color related properties to the icon.
|
|
929
|
+
*/
|
|
930
|
+
export declare type IconThemeColor = 'inherit' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'error' | 'dark' | 'light' | 'inverse';
|
|
931
|
+
|
|
932
|
+
/**
|
|
933
|
+
* @hidden
|
|
934
|
+
*/
|
|
935
|
+
export declare const IconWrap: React_2.ForwardRefExoticComponent<IconProps & SvgIconProps & React_2.RefAttributes<(IconHandle & SvgIconHandle) | null>>;
|
|
936
|
+
|
|
937
|
+
/**
|
|
938
|
+
* @hidden
|
|
939
|
+
*/
|
|
940
|
+
export declare function isArray(operation: string[] | any): operation is any[];
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* @hidden
|
|
944
|
+
*/
|
|
945
|
+
export declare function isEnabledAndAllParentsEnabled(itemId: string, items: any, fieldsSvc: TreeFieldsService): any;
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* @hidden
|
|
949
|
+
*/
|
|
950
|
+
declare function isIdEmptyOrZeroLevel(itemId: string): boolean;
|
|
951
|
+
|
|
952
|
+
/**
|
|
953
|
+
* @hidden
|
|
954
|
+
*/
|
|
955
|
+
declare function isIdZeroLevel(itemId: string): boolean;
|
|
956
|
+
|
|
957
|
+
/**
|
|
958
|
+
* @hidden
|
|
959
|
+
*/
|
|
960
|
+
export declare function isItemExpandedAndWithChildren(item: any, fieldsSvc: TreeFieldsService): boolean | undefined;
|
|
961
|
+
|
|
962
|
+
/**
|
|
963
|
+
* @hidden
|
|
964
|
+
*/
|
|
965
|
+
declare function isItemFirstFromSiblings(itemId: string): boolean;
|
|
966
|
+
|
|
967
|
+
/**
|
|
968
|
+
* @hidden
|
|
969
|
+
*/
|
|
970
|
+
export declare const keepFocusInContainer: (e: React.KeyboardEvent, containerElement?: HTMLElement | null) => void;
|
|
971
|
+
|
|
972
|
+
export declare interface KendoMouse<T, E extends HTMLElement> {
|
|
973
|
+
onMouseDown?: (args: KendoMouseEvent<T, E>) => void;
|
|
974
|
+
onMouseUp?: (args: KendoMouseEvent<T, E>) => void;
|
|
975
|
+
onClick?: (args: KendoMouseEvent<T, E>) => void;
|
|
976
|
+
onDoubleClick?: (args: KendoMouseEvent<T, E>) => void;
|
|
977
|
+
onMouseEnter?: (args: KendoMouseEvent<T, E>) => void;
|
|
978
|
+
onMouseLeave?: (args: KendoMouseEvent<T, E>) => void;
|
|
979
|
+
onMouseMove?: (args: KendoMouseEvent<T, E>) => void;
|
|
980
|
+
onMouseOut?: (args: KendoMouseEvent<T, E>) => void;
|
|
981
|
+
onMouseOver?: (args: KendoMouseEvent<T, E>) => void;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
export declare interface KendoMouseEvent<T, E extends HTMLElement = HTMLElement> {
|
|
985
|
+
syntheticEvent: React_2.MouseEvent<E>;
|
|
986
|
+
target: T;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
/**
|
|
990
|
+
* @hidden
|
|
991
|
+
*/
|
|
992
|
+
export declare interface KendoPointer<T, E extends HTMLElement> {
|
|
993
|
+
onPointerDown?: (args: KendoPointerEvent<T, E>) => void;
|
|
994
|
+
onPointerMove?: (args: KendoPointerEvent<T, E>) => void;
|
|
995
|
+
onPointerUp?: (args: KendoPointerEvent<T, E>) => void;
|
|
996
|
+
onPointerCancel?: (args: KendoPointerEvent<T, E>) => void;
|
|
997
|
+
onGotPointerCapture?: (args: KendoPointerEvent<T, E>) => void;
|
|
998
|
+
onLostPointerCapture?: (args: KendoPointerEvent<T, E>) => void;
|
|
999
|
+
onPointerEnter?: (args: KendoPointerEvent<T, E>) => void;
|
|
1000
|
+
onPointerOver?: (args: KendoPointerEvent<T, E>) => void;
|
|
1001
|
+
onPointerLeave?: (args: KendoPointerEvent<T, E>) => void;
|
|
1002
|
+
onPointerOut?: (args: KendoPointerEvent<T, E>) => void;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
/**
|
|
1006
|
+
* @hidden
|
|
1007
|
+
*/
|
|
1008
|
+
export declare interface KendoPointerEvent<T, E extends HTMLElement = HTMLElement> {
|
|
1009
|
+
syntheticEvent: React_2.PointerEvent<E>;
|
|
1010
|
+
target: T;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
/**
|
|
1014
|
+
* @hidden
|
|
1015
|
+
*
|
|
1016
|
+
* Represents the base properties of a KendoReact component.
|
|
1017
|
+
*/
|
|
1018
|
+
export declare interface KendoReactComponentBaseProps {
|
|
1019
|
+
/**
|
|
1020
|
+
* Sets the `id` property of the top div element of the component.
|
|
1021
|
+
*/
|
|
1022
|
+
id?: string;
|
|
1023
|
+
/**
|
|
1024
|
+
* Determines the children nodes.
|
|
1025
|
+
*/
|
|
1026
|
+
children?: React.ReactNode;
|
|
1027
|
+
/**
|
|
1028
|
+
* Sets additional classes to the component.
|
|
1029
|
+
*/
|
|
1030
|
+
className?: string;
|
|
1031
|
+
/**
|
|
1032
|
+
* Sets additional CSS styles to the component.
|
|
1033
|
+
*/
|
|
1034
|
+
style?: React.CSSProperties;
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
/** @hidden */
|
|
1038
|
+
export declare interface KendoThemeMaps {
|
|
1039
|
+
sizeMap: Record<Exclude<any, null>, String>;
|
|
1040
|
+
roundedMap: Record<Exclude<any, null>, String>;
|
|
1041
|
+
orientationMap: Record<Exclude<any, null>, String>;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
/** @hidden */
|
|
1045
|
+
export declare const kendoThemeMaps: KendoThemeMaps;
|
|
1046
|
+
|
|
1047
|
+
/**
|
|
1048
|
+
* @hidden
|
|
1049
|
+
*/
|
|
1050
|
+
export declare interface KendoTouch<T, E extends HTMLElement> {
|
|
1051
|
+
onTouchStart?: (args: KendoTouchEvent<T, E>) => void;
|
|
1052
|
+
onTouchMove?: (args: KendoTouchEvent<T, E>) => void;
|
|
1053
|
+
onTouchEnd?: (args: KendoTouchEvent<T, E>) => void;
|
|
1054
|
+
onTouchCancel?: (args: KendoTouchEvent<T, E>) => void;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
/**
|
|
1058
|
+
* @hidden
|
|
1059
|
+
*/
|
|
1060
|
+
export declare interface KendoTouchEvent<T, E extends HTMLElement = HTMLElement> {
|
|
1061
|
+
syntheticEvent: React_2.TouchEvent<E>;
|
|
1062
|
+
target: T;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
/**
|
|
1066
|
+
* @hidden
|
|
1067
|
+
*/
|
|
1068
|
+
export declare const Keys: {
|
|
1069
|
+
backspace: number;
|
|
1070
|
+
tab: number;
|
|
1071
|
+
enter: number;
|
|
1072
|
+
shift: number;
|
|
1073
|
+
esc: number;
|
|
1074
|
+
space: number;
|
|
1075
|
+
pageUp: number;
|
|
1076
|
+
pageDown: number;
|
|
1077
|
+
end: number;
|
|
1078
|
+
home: number;
|
|
1079
|
+
left: number;
|
|
1080
|
+
up: number;
|
|
1081
|
+
right: number;
|
|
1082
|
+
down: number;
|
|
1083
|
+
delete: number;
|
|
1084
|
+
};
|
|
1085
|
+
|
|
1086
|
+
/**
|
|
1087
|
+
* @hidden
|
|
1088
|
+
*/
|
|
1089
|
+
export declare const lastFocusableChild: (element: HTMLElement) => HTMLElement | undefined;
|
|
1090
|
+
|
|
1091
|
+
/**
|
|
1092
|
+
* Creates a new array with the results of calling the provided callback function
|
|
1093
|
+
* on every element in the provided data tree.
|
|
1094
|
+
*
|
|
1095
|
+
* @param {any[]} tree - The data tree.
|
|
1096
|
+
* @param {string} subItemsField - The field which points to the subitems collection of each data item.
|
|
1097
|
+
* @param {(value: any) => any} callback - The callback function.
|
|
1098
|
+
* @returns {any[]} - The new data tree.
|
|
1099
|
+
*/
|
|
1100
|
+
export declare const mapTree: (tree: any[], subItemsField: string, callback: (value: any) => any) => any[];
|
|
1101
|
+
|
|
1102
|
+
/**
|
|
1103
|
+
* Creates a new array with the results of calling the provided callback function
|
|
1104
|
+
* on the element which match the `level` in the provided data tree.
|
|
1105
|
+
*
|
|
1106
|
+
* @param {any[]} tree - The data tree.
|
|
1107
|
+
* @param {number[]} level - An array of indexes of each parent and current item in the data tree.
|
|
1108
|
+
* @param {string} subItemsField - The field which points to the subitems collection of each data item.
|
|
1109
|
+
* @param {(value: any) => any} callback - The callback function.
|
|
1110
|
+
* @returns {any[]} - The new data tree.
|
|
1111
|
+
*/
|
|
1112
|
+
export declare const mapTreeItem: (tree: any[], level: number[], subItemsField: string, callback: (value: any) => any) => void;
|
|
1113
|
+
|
|
1114
|
+
/**
|
|
1115
|
+
* The possible values for the Default and Material themes are:
|
|
1116
|
+
* * `xsmall` —Applies 4px margin.
|
|
1117
|
+
* * `small` —Applies 8px margin.
|
|
1118
|
+
* * `medium` —Applies 12px margin.
|
|
1119
|
+
* * `large` —Applies 16px margin.
|
|
1120
|
+
* * `xlarge` —Applies 24px margin.
|
|
1121
|
+
* * `thin` —Applies 2px margin.
|
|
1122
|
+
* * `hair` —Applies 1px margin.
|
|
1123
|
+
* * `number` —Passing a number will apply a margin of 4 times the passed number in pixels. The minimum number value is 0 and the maximum is 24.
|
|
1124
|
+
*
|
|
1125
|
+
* The possible values for the Bootstrap theme are:
|
|
1126
|
+
* * `xsmall` —Applies 0.25rem margin.
|
|
1127
|
+
* * `small` —Applies 0.5rem margin.
|
|
1128
|
+
* * `medium` —Applies 0.75rem margin.
|
|
1129
|
+
* * `large` —Applies 1rem margin.
|
|
1130
|
+
* * `xlarge` —Applies 1.25rem margin.
|
|
1131
|
+
* * `thin` —Applies 0.125rem margin.
|
|
1132
|
+
* * `hair` —Applies 0.0625rem margin.
|
|
1133
|
+
* * `number` —Passing a number will apply a margin equal to the passed number divided by 4 in rem units.
|
|
1134
|
+
* The minimum number value is 0 and the maximum is 24.
|
|
1135
|
+
*/
|
|
1136
|
+
export declare type MarginEnum = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'thin' | 'hair' | number;
|
|
1137
|
+
|
|
1138
|
+
declare type MemoizedFn<TFunc extends (this: any, ...args: any[]) => any> = {
|
|
1139
|
+
clear: () => void;
|
|
1140
|
+
(this: ThisParameterType<TFunc>, ...args: Parameters<TFunc>): ReturnType<TFunc>;
|
|
1141
|
+
};
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* @hidden
|
|
1145
|
+
*/
|
|
1146
|
+
export declare function memoizeOne<TFunc extends (this: any, ...newArgs: any[]) => any>(resultFn: TFunc, isEqualFn?: EqualityFn<TFunc>): MemoizedFn<TFunc>;
|
|
1147
|
+
|
|
1148
|
+
/**
|
|
1149
|
+
* Represents the [KendoReact Navigation functionality]({% slug overview_navigation %}).
|
|
1150
|
+
* It handles the navigation through a collection of DOM elements.
|
|
1151
|
+
*/
|
|
1152
|
+
export declare class Navigation {
|
|
1153
|
+
/**
|
|
1154
|
+
* @hidden
|
|
1155
|
+
*/
|
|
1156
|
+
selectors: string[];
|
|
1157
|
+
/**
|
|
1158
|
+
* @hidden
|
|
1159
|
+
*/
|
|
1160
|
+
mouseEvents: {
|
|
1161
|
+
[type: string]: (target: HTMLElement, nav: Navigation, ev: React.MouseEvent<HTMLElement>) => void;
|
|
1162
|
+
};
|
|
1163
|
+
/**
|
|
1164
|
+
* @hidden
|
|
1165
|
+
*/
|
|
1166
|
+
keyboardEvents: {
|
|
1167
|
+
[type: string]: {
|
|
1168
|
+
[key: string]: (target: HTMLElement, nav: Navigation, ev: React.KeyboardEvent<HTMLElement>, options?: any) => void;
|
|
1169
|
+
};
|
|
1170
|
+
};
|
|
1171
|
+
/**
|
|
1172
|
+
* @hidden
|
|
1173
|
+
*/
|
|
1174
|
+
tabIndex: number;
|
|
1175
|
+
/**
|
|
1176
|
+
* @hidden
|
|
1177
|
+
*/
|
|
1178
|
+
focusOptions: FocusOptions;
|
|
1179
|
+
/**
|
|
1180
|
+
* @hidden
|
|
1181
|
+
*/
|
|
1182
|
+
root: React.RefObject<HTMLElement>;
|
|
1183
|
+
/**
|
|
1184
|
+
* @hidden
|
|
1185
|
+
*/
|
|
1186
|
+
rovingTabIndex?: boolean;
|
|
1187
|
+
constructor(options: NavigationOptions);
|
|
1188
|
+
/**
|
|
1189
|
+
* Returns the collection of DOM elements which the module will navigate in.
|
|
1190
|
+
*/
|
|
1191
|
+
get elements(): HTMLElement[];
|
|
1192
|
+
/**
|
|
1193
|
+
* Returns the first navigation DOM element.
|
|
1194
|
+
*/
|
|
1195
|
+
get first(): HTMLElement | null;
|
|
1196
|
+
/**
|
|
1197
|
+
* Returns the last navigation DOM element.
|
|
1198
|
+
*/
|
|
1199
|
+
get last(): HTMLElement | null;
|
|
1200
|
+
/**
|
|
1201
|
+
* Returns the focused DOM element from the navigation collection of DOM elements.
|
|
1202
|
+
*/
|
|
1203
|
+
get current(): HTMLElement | null;
|
|
1204
|
+
/**
|
|
1205
|
+
* Focuses the next element from the navigation collection of DOM elements.
|
|
1206
|
+
*/
|
|
1207
|
+
focusNext(target: HTMLElement): HTMLElement;
|
|
1208
|
+
/**
|
|
1209
|
+
* Focuses the previous element from the navigation collection of DOM elements.
|
|
1210
|
+
*/
|
|
1211
|
+
focusPrevious(target: HTMLElement): HTMLElement;
|
|
1212
|
+
/**
|
|
1213
|
+
* The keyboard events handler.
|
|
1214
|
+
*/
|
|
1215
|
+
triggerKeyboardEvent(ev: React.KeyboardEvent<HTMLElement>, options?: any): void;
|
|
1216
|
+
/**
|
|
1217
|
+
* The mouse events handler.
|
|
1218
|
+
*/
|
|
1219
|
+
triggerMouseEvent(ev: React.MouseEvent<HTMLElement>): void;
|
|
1220
|
+
/**
|
|
1221
|
+
* Focuses the passed element from the navigation collection of DOM elements.
|
|
1222
|
+
*/
|
|
1223
|
+
focusElement(element: HTMLElement | null, previous: HTMLElement | null): void;
|
|
1224
|
+
/**
|
|
1225
|
+
* @hidden
|
|
1226
|
+
*/
|
|
1227
|
+
update: () => void;
|
|
1228
|
+
private focusNextIndex;
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
/**
|
|
1232
|
+
* Represents the [Navigation]({% slug api_common_navigation %}) options object.
|
|
1233
|
+
*
|
|
1234
|
+
*/
|
|
1235
|
+
export declare interface NavigationOptions {
|
|
1236
|
+
/**
|
|
1237
|
+
* Sets the tabIndex used by the [Navigation]({% slug api_common_navigation %}).
|
|
1238
|
+
*/
|
|
1239
|
+
tabIndex: number;
|
|
1240
|
+
/**
|
|
1241
|
+
* Sets the root DOM element used by the [Navigation]({% slug api_common_navigation %}).
|
|
1242
|
+
*/
|
|
1243
|
+
root: React.RefObject<HTMLElement>;
|
|
1244
|
+
/**
|
|
1245
|
+
* Sets the CSS selectors used by the [Navigation]({% slug api_common_navigation %}). The navigation DOM elements will be queried using the selectors.
|
|
1246
|
+
* Make sure their order matches the navigating order.
|
|
1247
|
+
*/
|
|
1248
|
+
selectors: string[];
|
|
1249
|
+
/**
|
|
1250
|
+
* Configures if the roving tabIndex technique will be used in the [Navigation]({% slug api_common_navigation %}).
|
|
1251
|
+
*/
|
|
1252
|
+
rovingTabIndex?: boolean;
|
|
1253
|
+
/**
|
|
1254
|
+
* Sets the options of the focus methods that is used. Defaults to `{ preventScroll: true }`.
|
|
1255
|
+
*/
|
|
1256
|
+
focusOptions?: FocusOptions;
|
|
1257
|
+
/**
|
|
1258
|
+
* Sets the mouse events handlers.
|
|
1259
|
+
*/
|
|
1260
|
+
mouseEvents?: {
|
|
1261
|
+
[type: string]: (target: HTMLElement, nav: Navigation, ev: React.MouseEvent<HTMLElement>) => void;
|
|
1262
|
+
};
|
|
1263
|
+
/**
|
|
1264
|
+
* Sets the keyboard events handlers.
|
|
1265
|
+
*/
|
|
1266
|
+
keyboardEvents?: {
|
|
1267
|
+
[type: string]: {
|
|
1268
|
+
[key: string]: (target: HTMLElement, nav: Navigation, ev: React.KeyboardEvent<HTMLElement>) => void;
|
|
1269
|
+
};
|
|
1270
|
+
};
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
/**
|
|
1274
|
+
* @hidden
|
|
1275
|
+
*/
|
|
1276
|
+
export declare const noop: () => void;
|
|
1277
|
+
|
|
1278
|
+
export { NormalizedDragEvent }
|
|
1279
|
+
|
|
1280
|
+
/**
|
|
1281
|
+
* @hidden
|
|
1282
|
+
*/
|
|
1283
|
+
export declare function removeItem(itemId: string, childrenField: string, items: any[]): any[];
|
|
1284
|
+
|
|
1285
|
+
/**
|
|
1286
|
+
* @hidden
|
|
1287
|
+
*/
|
|
1288
|
+
export declare function resolveItemId(publicId: any, idField: string, items: any[], childrenField: string): string | undefined;
|
|
1289
|
+
|
|
1290
|
+
/**
|
|
1291
|
+
* @hidden
|
|
1292
|
+
*/
|
|
1293
|
+
export declare function resolveItemsIds(publicIds: any[], idField: string, items: any[], childrenField: string): string[];
|
|
1294
|
+
|
|
1295
|
+
/**
|
|
1296
|
+
* @hidden
|
|
1297
|
+
*/
|
|
1298
|
+
declare const SEPARATOR = "_";
|
|
1299
|
+
|
|
1300
|
+
/**
|
|
1301
|
+
* @hidden
|
|
1302
|
+
*/
|
|
1303
|
+
export declare const setScrollbarWidth: () => false | undefined;
|
|
1304
|
+
|
|
1305
|
+
/**
|
|
1306
|
+
* Can be used for setting value to object using field path. For example `users[index].name`.
|
|
1307
|
+
*
|
|
1308
|
+
* @example
|
|
1309
|
+
* ```jsx-no-run
|
|
1310
|
+
* const values = {users:[{lastName: 'Doe'}]};
|
|
1311
|
+
* const firstUserFirstName = setter('user[0].firstName');
|
|
1312
|
+
*
|
|
1313
|
+
* firstUserFirstName(values, 'John');
|
|
1314
|
+
*
|
|
1315
|
+
* console.log(values)
|
|
1316
|
+
*
|
|
1317
|
+
* // result: {users:[{firstName: 'John', lastName: 'Doe'}]}
|
|
1318
|
+
* ```
|
|
1319
|
+
*/
|
|
1320
|
+
export declare function setter(field: string): any;
|
|
1321
|
+
|
|
1322
|
+
/**
|
|
1323
|
+
* @hidden
|
|
1324
|
+
*/
|
|
1325
|
+
export declare function shouldShowValidationUI(packageMetadata: any): boolean;
|
|
1326
|
+
|
|
1327
|
+
/**
|
|
1328
|
+
* @hidden
|
|
1329
|
+
*/
|
|
1330
|
+
export declare class SortedPublicItemIds {
|
|
1331
|
+
private objects;
|
|
1332
|
+
init(publicItemIds: any[]): void;
|
|
1333
|
+
hasId(publicItemId: any): boolean;
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
/**
|
|
1337
|
+
* @hidden
|
|
1338
|
+
*/
|
|
1339
|
+
export declare interface SVGIcon {
|
|
1340
|
+
/**
|
|
1341
|
+
* The unique name of the icon.
|
|
1342
|
+
*/
|
|
1343
|
+
name: string;
|
|
1344
|
+
/**
|
|
1345
|
+
* The entire SVG content of the icon.
|
|
1346
|
+
*/
|
|
1347
|
+
content: string;
|
|
1348
|
+
/**
|
|
1349
|
+
* The [viewBox](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/viewBox)
|
|
1350
|
+
* definition that should be used for the icon.
|
|
1351
|
+
*/
|
|
1352
|
+
viewBox: string;
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
/**
|
|
1356
|
+
* Represents the [KendoReact SvgIcon component]({% slug overview_svgicon %}).
|
|
1357
|
+
*
|
|
1358
|
+
* @example
|
|
1359
|
+
* ```jsx
|
|
1360
|
+
* import { accessibility } from '@progress/kendo-svg-icons';
|
|
1361
|
+
*
|
|
1362
|
+
* const App = () => {
|
|
1363
|
+
* return (
|
|
1364
|
+
* <SvgIcon icon={accessibility} />
|
|
1365
|
+
* );
|
|
1366
|
+
* };
|
|
1367
|
+
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
1368
|
+
* ```
|
|
1369
|
+
*/
|
|
1370
|
+
export declare const SvgIcon: React_2.ForwardRefExoticComponent<SvgIconProps & React_2.RefAttributes<SvgIconHandle | null>>;
|
|
1371
|
+
|
|
1372
|
+
/**
|
|
1373
|
+
* @hidden
|
|
1374
|
+
*/
|
|
1375
|
+
export declare interface SvgIconHandle {
|
|
1376
|
+
/**
|
|
1377
|
+
* The SvgIconHandle element.
|
|
1378
|
+
*/
|
|
1379
|
+
element: HTMLSpanElement | null;
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
/**
|
|
1383
|
+
* Represents the props of the [KendoReact SvgIcon component]({% slug overview_svgicon %}).
|
|
1384
|
+
*/
|
|
1385
|
+
export declare interface SvgIconProps extends BaseIconProps, React_2.SVGAttributes<HTMLOrSVGElement> {
|
|
1386
|
+
/**
|
|
1387
|
+
* Specifies the SVG icon.
|
|
1388
|
+
*
|
|
1389
|
+
* * The possible keys are:
|
|
1390
|
+
* * `name`—The unique name of the icon.
|
|
1391
|
+
* * `content`—The entire SVG content of the icon.
|
|
1392
|
+
* * `viewBox`—The viewBox definition that should be used for the icon.
|
|
1393
|
+
*/
|
|
1394
|
+
icon?: SVGIcon;
|
|
1395
|
+
/**
|
|
1396
|
+
* Specifies the viewBox of the custom SVG icon.
|
|
1397
|
+
*/
|
|
1398
|
+
viewBox?: string;
|
|
1399
|
+
/**
|
|
1400
|
+
* Specifies a list of CSS classes that will be added to the svg element.
|
|
1401
|
+
*/
|
|
1402
|
+
svgClassName?: string;
|
|
1403
|
+
/**
|
|
1404
|
+
* Sets additional CSS styles to the svg element.
|
|
1405
|
+
*/
|
|
1406
|
+
svgStyle?: React_2.CSSProperties;
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
/**
|
|
1410
|
+
* @hidden
|
|
1411
|
+
*/
|
|
1412
|
+
export declare const svgIconPropType: PropTypes.Requireable<PropTypes.InferProps<{
|
|
1413
|
+
name: PropTypes.Validator<string>;
|
|
1414
|
+
content: PropTypes.Validator<string>;
|
|
1415
|
+
viewBox: PropTypes.Validator<string>;
|
|
1416
|
+
}>>;
|
|
1417
|
+
|
|
1418
|
+
/**
|
|
1419
|
+
* @hidden
|
|
1420
|
+
*/
|
|
1421
|
+
export declare const toIconClass: (name: string) => string;
|
|
1422
|
+
|
|
1423
|
+
/**
|
|
1424
|
+
* @hidden
|
|
1425
|
+
*/
|
|
1426
|
+
export declare const toIconName: (iconClass: string) => string;
|
|
1427
|
+
|
|
1428
|
+
/**
|
|
1429
|
+
* @hidden
|
|
1430
|
+
*/
|
|
1431
|
+
export declare class TreeFieldsService {
|
|
1432
|
+
focusIdField: string | undefined;
|
|
1433
|
+
private expandField;
|
|
1434
|
+
private selectField;
|
|
1435
|
+
private childrenField;
|
|
1436
|
+
private hasChildrenField;
|
|
1437
|
+
private textField;
|
|
1438
|
+
private disableField;
|
|
1439
|
+
private checkField;
|
|
1440
|
+
private checkIndeterminateField;
|
|
1441
|
+
constructor(treeViewProps: any);
|
|
1442
|
+
expanded(item: any): boolean | undefined;
|
|
1443
|
+
selected(item: any): boolean | undefined;
|
|
1444
|
+
text(item: any): string | undefined;
|
|
1445
|
+
disabled(item: any): boolean | undefined;
|
|
1446
|
+
hasChildren(item: any): boolean | undefined;
|
|
1447
|
+
children(item: any): any[];
|
|
1448
|
+
checked(item: any): boolean | undefined;
|
|
1449
|
+
checkIndeterminate(item: any): boolean | undefined;
|
|
1450
|
+
focusId(item: any): any;
|
|
1451
|
+
getChildrenField(): string;
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
declare namespace treeIdUtils {
|
|
1455
|
+
export {
|
|
1456
|
+
getItemById,
|
|
1457
|
+
getRootParentId,
|
|
1458
|
+
getIdWithoutRootParentId,
|
|
1459
|
+
getFirstChildId,
|
|
1460
|
+
createId,
|
|
1461
|
+
getDirectParentId,
|
|
1462
|
+
isIdEmptyOrZeroLevel,
|
|
1463
|
+
isIdZeroLevel,
|
|
1464
|
+
getAllShortIds,
|
|
1465
|
+
getShortId,
|
|
1466
|
+
isItemFirstFromSiblings,
|
|
1467
|
+
getDecrementedItemIdAfterRemoval,
|
|
1468
|
+
EMPTY_ID,
|
|
1469
|
+
ZERO_LEVEL_ZERO_NODE_ID,
|
|
1470
|
+
SEPARATOR
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
export { treeIdUtils }
|
|
1474
|
+
|
|
1475
|
+
/**
|
|
1476
|
+
* Represents the [KendoReact Typography component]({% slug overview_typography %}).
|
|
1477
|
+
*
|
|
1478
|
+
* @example
|
|
1479
|
+
* ```jsx
|
|
1480
|
+
* const App = () => {
|
|
1481
|
+
* return (
|
|
1482
|
+
* <Typography.h2>Heading 2</Typography.h2>
|
|
1483
|
+
* );
|
|
1484
|
+
* };
|
|
1485
|
+
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
1486
|
+
* ```
|
|
1487
|
+
*/
|
|
1488
|
+
export declare const Typography: {
|
|
1489
|
+
h1: React_2.ForwardRefExoticComponent<TypographyProps>;
|
|
1490
|
+
h2: React_2.ForwardRefExoticComponent<TypographyProps>;
|
|
1491
|
+
h3: React_2.ForwardRefExoticComponent<TypographyProps>;
|
|
1492
|
+
h4: React_2.ForwardRefExoticComponent<TypographyProps>;
|
|
1493
|
+
h5: React_2.ForwardRefExoticComponent<TypographyProps>;
|
|
1494
|
+
h6: React_2.ForwardRefExoticComponent<TypographyProps>;
|
|
1495
|
+
p: React_2.ForwardRefExoticComponent<TypographyProps>;
|
|
1496
|
+
code: React_2.ForwardRefExoticComponent<TypographyProps>;
|
|
1497
|
+
pre: React_2.ForwardRefExoticComponent<TypographyProps>;
|
|
1498
|
+
};
|
|
1499
|
+
|
|
1500
|
+
/**
|
|
1501
|
+
* @hidden
|
|
1502
|
+
*/
|
|
1503
|
+
export declare interface TypographyHandle {
|
|
1504
|
+
/**
|
|
1505
|
+
* The TypographyHandle element.
|
|
1506
|
+
*/
|
|
1507
|
+
element: HTMLElement | null;
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
/**
|
|
1511
|
+
* Represents the props of the [KendoReact Typography component]({% slug overview_typography %}).
|
|
1512
|
+
*/
|
|
1513
|
+
export declare interface TypographyProps extends KendoReactComponentBaseProps {
|
|
1514
|
+
/**
|
|
1515
|
+
* Sets additional CSS styles to the element.
|
|
1516
|
+
*/
|
|
1517
|
+
style?: React.CSSProperties;
|
|
1518
|
+
/**
|
|
1519
|
+
* Specifies a list of CSS classes that will be added to the element.
|
|
1520
|
+
*/
|
|
1521
|
+
className?: string;
|
|
1522
|
+
/**
|
|
1523
|
+
* Overrides the font size applied by the theme typography styles
|
|
1524
|
+
* [see example]({% slug appearance_typography %}#toc-font-size).
|
|
1525
|
+
*
|
|
1526
|
+
* The possible values are:
|
|
1527
|
+
* * `xsmall`
|
|
1528
|
+
* * `small`
|
|
1529
|
+
* * `medium`
|
|
1530
|
+
* * `large`
|
|
1531
|
+
* * `xlarge`
|
|
1532
|
+
*
|
|
1533
|
+
*/
|
|
1534
|
+
fontSize?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
|
|
1535
|
+
/**
|
|
1536
|
+
* Overrides the font weight applied by the theme typography styles
|
|
1537
|
+
* [see example]({% slug appearance_typography %}#toc-font-weight).
|
|
1538
|
+
*
|
|
1539
|
+
* The possible values are:
|
|
1540
|
+
* * `light`—font-weight: 300
|
|
1541
|
+
* * `normal`—font-weight: 400
|
|
1542
|
+
* * `bold`—For Default and Bootstrap themes—font-weight: 700. For Material theme—font-weight: 500.
|
|
1543
|
+
*
|
|
1544
|
+
*/
|
|
1545
|
+
fontWeight?: 'light' | 'normal' | 'bold';
|
|
1546
|
+
/**
|
|
1547
|
+
* Specifies the applied margin to the element
|
|
1548
|
+
* [see example]({% slug appearance_typography %}#toc-margin).
|
|
1549
|
+
*
|
|
1550
|
+
* The possible values for the Default and Material themes are:
|
|
1551
|
+
* * `xsmall` —Applies 4px margin.
|
|
1552
|
+
* * `small` —Applies 8px margin.
|
|
1553
|
+
* * `medium` —Applies 12px margin.
|
|
1554
|
+
* * `large` —Applies 16px margin.
|
|
1555
|
+
* * `xlarge` —Applies 24px margin.
|
|
1556
|
+
* * `thin` —Applies 2px margin.
|
|
1557
|
+
* * `hair` —Applies 1px margin.
|
|
1558
|
+
* * `number` —Passing a number will apply a margin of 4 times the passed number in pixels. The minimum number value is 0 and the maximum is 24.
|
|
1559
|
+
* * `object` &smdash;Passing an object allows setting the margins for each side.
|
|
1560
|
+
*
|
|
1561
|
+
* The possible values for the Bootstrap theme are:
|
|
1562
|
+
* * `xsmall` —Applies 0.25rem margin.
|
|
1563
|
+
* * `small` —Applies 0.5rem margin.
|
|
1564
|
+
* * `medium` —Applies 0.75rem margin.
|
|
1565
|
+
* * `large` —Applies 1rem margin.
|
|
1566
|
+
* * `xlarge` —Applies 1.25rem margin.
|
|
1567
|
+
* * `thin` —Applies 0.125rem margin.
|
|
1568
|
+
* * `hair` —Applies 0.0625rem margin.
|
|
1569
|
+
* * `number` —Passing a number will apply a margin equal to the passed number divided by 4 in rem units.
|
|
1570
|
+
* The minimum number value is 0 and the maximum is 24.
|
|
1571
|
+
* * `object` &smdash;Passing an object allows setting the margins for each side.
|
|
1572
|
+
*/
|
|
1573
|
+
margin?: MarginEnum | {
|
|
1574
|
+
top?: MarginEnum;
|
|
1575
|
+
bottom?: MarginEnum;
|
|
1576
|
+
left?: MarginEnum;
|
|
1577
|
+
right?: MarginEnum;
|
|
1578
|
+
};
|
|
1579
|
+
/**
|
|
1580
|
+
* Specifies the text align
|
|
1581
|
+
* [see example]({% slug appearance_typography %}#toc-text-align).
|
|
1582
|
+
*
|
|
1583
|
+
* The possible values are:
|
|
1584
|
+
* * `left`—Applies text-align: left
|
|
1585
|
+
* * `right`—Applies text-align: right
|
|
1586
|
+
* * `center`—Applies text-align: center
|
|
1587
|
+
* * `justify`—Applies text-align: justify
|
|
1588
|
+
*
|
|
1589
|
+
*/
|
|
1590
|
+
textAlign?: 'left' | 'right' | 'center' | 'justify';
|
|
1591
|
+
/**
|
|
1592
|
+
* Specifies the text transform
|
|
1593
|
+
* [see example]({% slug appearance_typography %}#toc-text-transform).
|
|
1594
|
+
*
|
|
1595
|
+
* The possible values are:
|
|
1596
|
+
* * `lowercase`—Applies text-transform: lowercase
|
|
1597
|
+
* * `uppercase`—Applies text-transform: uppercase
|
|
1598
|
+
* * `capitalize`—Applies text-transform: capitalize
|
|
1599
|
+
*
|
|
1600
|
+
*/
|
|
1601
|
+
textTransform?: 'lowercase' | 'uppercase' | 'capitalize';
|
|
1602
|
+
/**
|
|
1603
|
+
* Specifies the theme color of the Typography
|
|
1604
|
+
* [see example]({% slug appearance_typography %}#toc-theme-color).
|
|
1605
|
+
*
|
|
1606
|
+
* The possible values are:
|
|
1607
|
+
* * `inherit`—Applies coloring based on the current color.
|
|
1608
|
+
* * `primary` —Applies coloring based on primary theme color.
|
|
1609
|
+
* * `secondary`—Applies coloring based on secondary theme color.
|
|
1610
|
+
* * `tertiary`— Applies coloring based on tertiary theme color.
|
|
1611
|
+
* * `info`—Applies coloring based on info theme color.
|
|
1612
|
+
* * `success`— Applies coloring based on success theme color.
|
|
1613
|
+
* * `warning`— Applies coloring based on warning theme color.
|
|
1614
|
+
* * `error`— Applies coloring based on error theme color.
|
|
1615
|
+
* * `dark`— Applies coloring based on dark theme color.
|
|
1616
|
+
* * `light`— Applies coloring based on light theme color.
|
|
1617
|
+
* * `inverse`— Applies coloring based on inverse theme color.
|
|
1618
|
+
*
|
|
1619
|
+
* You can use the `style` property to apply custom color related properties to the element.
|
|
1620
|
+
*
|
|
1621
|
+
*/
|
|
1622
|
+
themeColor?: 'inherit' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'error' | 'dark' | 'light' | 'inverse';
|
|
1623
|
+
/**
|
|
1624
|
+
* Sets a custom property to the element.
|
|
1625
|
+
*/
|
|
1626
|
+
[customProp: string]: any;
|
|
1627
|
+
}
|
|
1628
|
+
|
|
1629
|
+
/**
|
|
1630
|
+
* @hidden
|
|
1631
|
+
*/
|
|
1632
|
+
export declare function updateItem(items: any[], itemId: string, update: (item: any) => void, cloneField: string, childrenField: string): any[];
|
|
1633
|
+
|
|
1634
|
+
/**
|
|
1635
|
+
* An utility function for asynchronous focus/blur handling.
|
|
1636
|
+
*
|
|
1637
|
+
* By default, the `onFocus` and `onBlur` callbacks are called every time a child components receives/loses focus.
|
|
1638
|
+
* Use this utility hook for scenarios where you need to know if the parent has received focus for the first time, or completely lost focus.
|
|
1639
|
+
*
|
|
1640
|
+
* @returns
|
|
1641
|
+
*/
|
|
1642
|
+
export declare function useAsyncFocusBlur<T extends any[]>({ onFocus, onBlur, onSyncFocus, onSyncBlur }: AsyncFocusBlurArgs<T>): AsyncFocusBlurArgs<T>;
|
|
1643
|
+
|
|
1644
|
+
/** @hidden */
|
|
1645
|
+
export declare const useCollection: <T extends unknown>(initial?: T[]) => [T[], (event: CollectionAction<T>) => void];
|
|
1646
|
+
|
|
1647
|
+
/**
|
|
1648
|
+
* @hidden
|
|
1649
|
+
*/
|
|
1650
|
+
export declare const useCustomComponent: <P = unknown>(comp: React_2.ExoticComponent<{
|
|
1651
|
+
children?: React_2.ReactNode;
|
|
1652
|
+
}> | CustomComponent<P> | null) => [string | React_2.ComponentType<P & React_2.RefAttributes<unknown>>, Partial<P>];
|
|
1653
|
+
|
|
1654
|
+
/**
|
|
1655
|
+
* @hidden
|
|
1656
|
+
*/
|
|
1657
|
+
export declare function useDir(elementRef: React_2.RefObject<HTMLElement | null>, initialDir?: string, args?: any): string | undefined;
|
|
1658
|
+
|
|
1659
|
+
/**
|
|
1660
|
+
* Returns a function, which gets the `ownerDocument` of the element.
|
|
1661
|
+
*/
|
|
1662
|
+
export declare const useDocument: (ref: React_2.RefObject<HTMLElement | null | {
|
|
1663
|
+
element: HTMLElement | null;
|
|
1664
|
+
}>) => () => Document;
|
|
1665
|
+
|
|
1666
|
+
/**
|
|
1667
|
+
* Represents the KendoReact `useDraggable` hook.
|
|
1668
|
+
* Use it to attach `drag` events to a native HTML DOM elements, or custom React Components.
|
|
1669
|
+
*
|
|
1670
|
+
* For more information, refer to the [KendoReact Draggable]({% slug draggable_drag-and-drop %}) article.
|
|
1671
|
+
*
|
|
1672
|
+
* @param ref - The `ref` of the HTML Element or React Component which will enable the `draggable` functionality.
|
|
1673
|
+
* @param callbacks - A collection of callbacks, called by the `useDraggable` hook when a specific action occurs.
|
|
1674
|
+
* @param options - Additional configuration of the `useDraggable` hook.
|
|
1675
|
+
*/
|
|
1676
|
+
export declare function useDraggable(ref: React_2.RefObject<HTMLElement | null | {
|
|
1677
|
+
element: HTMLElement | null;
|
|
1678
|
+
}>, callbacks: {
|
|
1679
|
+
onPress?: (event: NormalizedDragEvent) => void;
|
|
1680
|
+
onRelease?: (event: NormalizedDragEvent) => void;
|
|
1681
|
+
onDragStart?: (event: NormalizedDragEvent) => void;
|
|
1682
|
+
onDrag?: (event: NormalizedDragEvent) => void;
|
|
1683
|
+
onDragEnd?: (event: NormalizedDragEvent) => void;
|
|
1684
|
+
}, options?: DraggableOptions): void;
|
|
1685
|
+
|
|
1686
|
+
/**
|
|
1687
|
+
* Represents the KendoReact `useDroppable` hook.
|
|
1688
|
+
* Use it to attach `drop` events to a native HTML DOM elements, or custom React Components.
|
|
1689
|
+
*
|
|
1690
|
+
* For more information, refer to the [KendoReact Droppable]({% slug droppable_drag-and-drop %}) article.
|
|
1691
|
+
*
|
|
1692
|
+
* @param ref - The `ref` of the HTML Element or React Component which will enable the `droppable` functionality.
|
|
1693
|
+
* @param callbacks - A collection of callbacks, called by the `useDroppable` hook when a specific action occurs.
|
|
1694
|
+
*/
|
|
1695
|
+
export declare function useDroppable(ref: React_2.RefObject<HTMLElement | null | {
|
|
1696
|
+
element: HTMLElement | null;
|
|
1697
|
+
}>, callbacks?: {
|
|
1698
|
+
onDragEnter?: (event: NormalizedDragEvent) => void;
|
|
1699
|
+
onDragOver?: (event: NormalizedDragEvent) => void;
|
|
1700
|
+
onDragLeave?: (event: NormalizedDragEvent) => void;
|
|
1701
|
+
onDrop?: (event: NormalizedDragEvent) => void;
|
|
1702
|
+
}): void;
|
|
1703
|
+
|
|
1704
|
+
/** @hidden */
|
|
1705
|
+
export declare function useId(id?: string): any;
|
|
1706
|
+
|
|
1707
|
+
/** @hidden */
|
|
1708
|
+
export declare const useIsomorphicLayoutEffect: typeof React_2.useEffect;
|
|
1709
|
+
|
|
1710
|
+
/**
|
|
1711
|
+
* @hidden
|
|
1712
|
+
*/
|
|
1713
|
+
export declare const useMouse: <E extends HTMLElement | null, P extends KendoMouse<any, any>, R extends {}>(props: P, target: React_2.RefObject<R>, extend?: {
|
|
1714
|
+
onMouseDown?: ((event: React_2.MouseEvent<E, MouseEvent>) => void) | undefined;
|
|
1715
|
+
onMouseUp?: ((event: React_2.MouseEvent<E, MouseEvent>) => void) | undefined;
|
|
1716
|
+
onClick?: ((event: React_2.MouseEvent<E, MouseEvent>) => void) | undefined;
|
|
1717
|
+
onDoubleClick?: ((event: React_2.MouseEvent<E, MouseEvent>) => void) | undefined;
|
|
1718
|
+
onMouseEnter?: ((event: React_2.MouseEvent<E, MouseEvent>) => void) | undefined;
|
|
1719
|
+
onMouseLeave?: ((event: React_2.MouseEvent<E, MouseEvent>) => void) | undefined;
|
|
1720
|
+
onMouseMove?: ((event: React_2.MouseEvent<E, MouseEvent>) => void) | undefined;
|
|
1721
|
+
onMouseOut?: ((event: React_2.MouseEvent<E, MouseEvent>) => void) | undefined;
|
|
1722
|
+
onMouseOver?: ((event: React_2.MouseEvent<E, MouseEvent>) => void) | undefined;
|
|
1723
|
+
}) => ElementMouse;
|
|
1724
|
+
|
|
1725
|
+
/** @hidden */
|
|
1726
|
+
export declare const usePropsContext: <T extends unknown>(context: React_2.Context<(p: T) => T>, props: T) => T;
|
|
1727
|
+
|
|
1728
|
+
/**
|
|
1729
|
+
* @hidden
|
|
1730
|
+
*/
|
|
1731
|
+
export declare function useRtl(elementRef: React_2.RefObject<HTMLElement | null>, initialDir?: string, args?: any): string | undefined;
|
|
1732
|
+
|
|
1733
|
+
/**
|
|
1734
|
+
* Returns a function, which gets the `defaultView` based on the `ownerDocument` of the element.
|
|
1735
|
+
*/
|
|
1736
|
+
export declare const useWindow: (ref: React_2.RefObject<HTMLElement | null | {
|
|
1737
|
+
element: HTMLElement | null;
|
|
1738
|
+
}>) => () => Window;
|
|
1739
|
+
|
|
1740
|
+
/** @hidden */
|
|
1741
|
+
export declare const useZIndexContext: () => ZIndexContextType;
|
|
1742
|
+
|
|
1743
|
+
/**
|
|
1744
|
+
* @hidden
|
|
1745
|
+
*/
|
|
1746
|
+
export declare const validatePackage: typeof validatePackage_2;
|
|
1747
|
+
|
|
1748
|
+
/**
|
|
1749
|
+
*
|
|
1750
|
+
* @hidden
|
|
1751
|
+
*/
|
|
1752
|
+
export declare const WatermarkOverlay: () => JSX_2.Element;
|
|
1753
|
+
|
|
1754
|
+
/** @hidden */
|
|
1755
|
+
export declare const withIdHOC: <P extends object>(Component: React_2.ComponentType<P>) => React_2.ForwardRefExoticComponent<React_2.PropsWithoutRef<P> & React_2.RefAttributes<any>>;
|
|
1756
|
+
|
|
1757
|
+
/** @hidden */
|
|
1758
|
+
export declare const withPropsContext: <T extends unknown>(context: React_2.Context<(p: T) => T>, Component: React_2.ComponentType<T>) => React_2.ForwardRefExoticComponent<React_2.PropsWithoutRef<T> & React_2.RefAttributes<any>>;
|
|
1759
|
+
|
|
1760
|
+
/**
|
|
1761
|
+
* @hidden
|
|
1762
|
+
*/
|
|
1763
|
+
declare const ZERO_LEVEL_ZERO_NODE_ID = "0";
|
|
1764
|
+
|
|
1765
|
+
/** @hidden */
|
|
1766
|
+
export declare const ZIndexContext: React_2.Context<ZIndexContextType>;
|
|
1767
|
+
|
|
1768
|
+
/** @hidden */
|
|
1769
|
+
export declare type ZIndexContextType = number | undefined;
|
|
1770
|
+
|
|
1771
|
+
export { }
|