@progress/kendo-react-common 5.4.0-dev.202205271059 → 5.4.0-dev.202206061009
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-react-common.js +1 -1
- package/dist/es/Draggable.d.ts +1 -1
- package/dist/es/Droppable.d.ts +1 -1
- package/dist/es/browser-support.service.js +1 -0
- package/dist/es/contexts/ZIndexContext.d.ts +1 -1
- package/dist/es/drag-n-drop/context/index.d.ts +2 -2
- package/dist/es/hasRelativeStackingContext.js +1 -1
- package/dist/es/hocs/AsyncFocusBlur.d.ts +1 -1
- package/dist/es/hocs/AsyncFocusBlur.js +2 -1
- package/dist/es/hooks/useAsyncFocusBlur.js +12 -8
- package/dist/es/hooks/useControlledState.d.ts +1 -1
- package/dist/es/hooks/useCustomComponent.d.ts +1 -1
- package/dist/es/hooks/useInheritedState.d.ts +1 -1
- package/dist/es/hooks/useMouse.d.ts +10 -10
- package/dist/es/hooks/usePointer.d.ts +11 -11
- package/dist/es/hooks/useTouch.d.ts +5 -5
- package/dist/es/icons/Icon.d.ts +1 -1
- package/dist/es/icons/SvgIcon.d.ts +1 -1
- package/dist/es/scrollbarWidth.d.ts +1 -1
- package/dist/es/scrollbarWidth.js +1 -1
- package/dist/es/treeDataOperations.js +12 -8
- package/dist/es/typography/Typography.js +4 -4
- package/dist/es/validate-package.js +2 -2
- package/dist/npm/Draggable.d.ts +1 -1
- package/dist/npm/Draggable.js +1 -1
- package/dist/npm/Droppable.d.ts +1 -1
- package/dist/npm/Droppable.js +1 -1
- package/dist/npm/browser-support.service.js +1 -0
- package/dist/npm/clone.js +1 -1
- package/dist/npm/contexts/ZIndexContext.d.ts +1 -1
- package/dist/npm/drag-n-drop/context/index.d.ts +2 -2
- package/dist/npm/drag-n-drop/index.js +4 -4
- package/dist/npm/getter.js +1 -1
- package/dist/npm/hasRelativeStackingContext.js +1 -1
- package/dist/npm/hocs/AsyncFocusBlur.d.ts +1 -1
- package/dist/npm/hocs/AsyncFocusBlur.js +3 -2
- package/dist/npm/hocs/withPropsContext.js +1 -1
- package/dist/npm/hooks/index.js +5 -1
- package/dist/npm/hooks/useAsyncFocusBlur.js +12 -8
- package/dist/npm/hooks/useControlledState.d.ts +1 -1
- package/dist/npm/hooks/useCustomComponent.d.ts +1 -1
- package/dist/npm/hooks/useDraggable.js +6 -6
- package/dist/npm/hooks/useDroppable.js +1 -1
- package/dist/npm/hooks/useInheritedState.d.ts +1 -1
- package/dist/npm/hooks/useMouse.d.ts +10 -10
- package/dist/npm/hooks/usePointer.d.ts +11 -11
- package/dist/npm/hooks/useTouch.d.ts +5 -5
- package/dist/npm/hooks/useWindow.js +1 -1
- package/dist/npm/icons/Icon.d.ts +1 -1
- package/dist/npm/icons/Icon.js +2 -2
- package/dist/npm/icons/SvgIcon.d.ts +1 -1
- package/dist/npm/icons/SvgIcon.js +1 -1
- package/dist/npm/main.js +5 -1
- package/dist/npm/models/index.js +5 -1
- package/dist/npm/scrollbarWidth.d.ts +1 -1
- package/dist/npm/scrollbarWidth.js +1 -1
- package/dist/npm/setter.js +1 -1
- package/dist/npm/treeDataOperations.js +12 -8
- package/dist/npm/typography/Typography.js +4 -4
- package/dist/npm/validate-package.js +2 -2
- package/dist/systemjs/kendo-react-common.js +1 -1
- package/package.json +10 -10
package/dist/npm/Draggable.js
CHANGED
|
@@ -68,7 +68,7 @@ exports.Draggable = React.forwardRef(function (props, ref) {
|
|
|
68
68
|
event: event
|
|
69
69
|
});
|
|
70
70
|
}, [getElement, props.onDragEnd]);
|
|
71
|
-
hooks_1.useDraggable(childRef, {
|
|
71
|
+
(0, hooks_1.useDraggable)(childRef, {
|
|
72
72
|
onPress: handlePress,
|
|
73
73
|
onRelease: handleRelease,
|
|
74
74
|
onDragStart: handleDragStart,
|
package/dist/npm/Droppable.d.ts
CHANGED
|
@@ -72,6 +72,6 @@ export interface DroppableProps {
|
|
|
72
72
|
* Accepts properties of type [DroppableProps]({% slug api_common_droppableprops %}),
|
|
73
73
|
* and returns an object of type [DroppableHandle]({% slug api_common_droppablehandle %}) when the `ref` is obtained.
|
|
74
74
|
*/
|
|
75
|
-
export declare const Droppable: React.ForwardRefExoticComponent<DroppableProps & React.RefAttributes<DroppableHandle>>;
|
|
75
|
+
export declare const Droppable: React.ForwardRefExoticComponent<DroppableProps & React.RefAttributes<DroppableHandle | null>>;
|
|
76
76
|
export declare type Droppable = DroppableHandle;
|
|
77
77
|
export {};
|
package/dist/npm/Droppable.js
CHANGED
|
@@ -58,7 +58,7 @@ exports.Droppable = React.forwardRef(function (props, ref) {
|
|
|
58
58
|
event: event
|
|
59
59
|
});
|
|
60
60
|
}, [props.onDrop, getElement]);
|
|
61
|
-
hooks_1.useDroppable(childRef, {
|
|
61
|
+
(0, hooks_1.useDroppable)(childRef, {
|
|
62
62
|
onDragEnter: handleDragEnter,
|
|
63
63
|
onDragOver: handleDragOver,
|
|
64
64
|
onDragLeave: handleDragLeave,
|
|
@@ -10,6 +10,7 @@ var getDocument = function () { return typeof document !== 'undefined' ? documen
|
|
|
10
10
|
*/
|
|
11
11
|
var BrowserSupportService = /** @class */ (function () {
|
|
12
12
|
function BrowserSupportService() {
|
|
13
|
+
this.scrollbar = 0;
|
|
13
14
|
}
|
|
14
15
|
Object.defineProperty(BrowserSupportService.prototype, "scrollbarWidth", {
|
|
15
16
|
get: function () {
|
package/dist/npm/clone.js
CHANGED
|
@@ -36,7 +36,7 @@ function cloneValue(value, nextValue) {
|
|
|
36
36
|
return cloneArray(value);
|
|
37
37
|
}
|
|
38
38
|
else if (value instanceof Date) {
|
|
39
|
-
return exports.cloneDate(value);
|
|
39
|
+
return (0, exports.cloneDate)(value);
|
|
40
40
|
}
|
|
41
41
|
else if (React.isValidElement(value)) {
|
|
42
42
|
return React.cloneElement(value, value.props);
|
|
@@ -2,6 +2,6 @@ import * as React from 'react';
|
|
|
2
2
|
/** @hidden */
|
|
3
3
|
export declare type ZIndexContextType = number | undefined;
|
|
4
4
|
/** @hidden */
|
|
5
|
-
export declare const ZIndexContext: React.Context<
|
|
5
|
+
export declare const ZIndexContext: React.Context<ZIndexContextType>;
|
|
6
6
|
/** @hidden */
|
|
7
7
|
export declare const useZIndexContext: () => ZIndexContextType;
|
|
@@ -4,11 +4,11 @@ import { ControlledStateHook } from '../../hooks';
|
|
|
4
4
|
/**
|
|
5
5
|
* @hidden
|
|
6
6
|
*/
|
|
7
|
-
export declare const DragContext: React.Context<ControlledStateHook<React.RefObject<DragTarget
|
|
7
|
+
export declare const DragContext: React.Context<ControlledStateHook<React.RefObject<DragTarget> | null | undefined, any>>;
|
|
8
8
|
/**
|
|
9
9
|
* @hidden
|
|
10
10
|
*/
|
|
11
|
-
export declare const DropContext: React.Context<ControlledStateHook<React.RefObject<DropTarget
|
|
11
|
+
export declare const DropContext: React.Context<ControlledStateHook<React.RefObject<DropTarget> | null | undefined, any>>;
|
|
12
12
|
/**
|
|
13
13
|
* @hidden
|
|
14
14
|
*/
|
|
@@ -11,10 +11,10 @@ var context_1 = require("./context");
|
|
|
11
11
|
* Accepts properties of type [DragAndDropProps]({% slug api_common_draganddropprops %}).
|
|
12
12
|
*/
|
|
13
13
|
var DragAndDrop = function (props) {
|
|
14
|
-
var _a = hooks_1.useControlledState(null, undefined), drag = _a[0], setDrag = _a[1];
|
|
15
|
-
var _b = hooks_1.useControlledState(null, undefined), drop = _b[0], setDrop = _b[1];
|
|
16
|
-
var _c = hooks_1.useCollection([]), drags = _c[0], dispatchDrags = _c[1];
|
|
17
|
-
var _d = hooks_1.useCollection([]), drops = _d[0], dispatchDrops = _d[1];
|
|
14
|
+
var _a = (0, hooks_1.useControlledState)(null, undefined), drag = _a[0], setDrag = _a[1];
|
|
15
|
+
var _b = (0, hooks_1.useControlledState)(null, undefined), drop = _b[0], setDrop = _b[1];
|
|
16
|
+
var _c = (0, hooks_1.useCollection)([]), drags = _c[0], dispatchDrags = _c[1];
|
|
17
|
+
var _d = (0, hooks_1.useCollection)([]), drops = _d[0], dispatchDrops = _d[1];
|
|
18
18
|
var registerDrag = function (item) {
|
|
19
19
|
dispatchDrags({
|
|
20
20
|
type: hooks_1.COLLECTION_ACTION.add,
|
package/dist/npm/getter.js
CHANGED
|
@@ -21,7 +21,7 @@ function getter(field) {
|
|
|
21
21
|
if (getterCache[field]) {
|
|
22
22
|
return getterCache[field];
|
|
23
23
|
}
|
|
24
|
-
var fields = fieldList_1.fieldList(field);
|
|
24
|
+
var fields = (0, fieldList_1.fieldList)(field);
|
|
25
25
|
getterCache[field] = function (obj) {
|
|
26
26
|
var result = obj;
|
|
27
27
|
for (var idx = 0; idx < fields.length && result; idx++) {
|
|
@@ -16,7 +16,7 @@ var hasRelativeStackingContext = function (elementSource) {
|
|
|
16
16
|
var top = 10;
|
|
17
17
|
var parent = currentDocument.createElement('div');
|
|
18
18
|
parent.style.transform = 'matrix(10, 0, 0, 10, 0, 0)';
|
|
19
|
-
parent.innerHTML = "<div style=\"position: fixed; top: "
|
|
19
|
+
parent.innerHTML = "<div style=\"position: fixed; top: ".concat(top, "px;\">child</div>");
|
|
20
20
|
currentDocument.body.appendChild(parent);
|
|
21
21
|
var isDifferent = parent.children[0].getBoundingClientRect().top !== top;
|
|
22
22
|
currentDocument.body.removeChild(parent);
|
|
@@ -10,4 +10,4 @@ import { AsyncFocusBlurArgs } from '../hooks/useAsyncFocusBlur';
|
|
|
10
10
|
*/
|
|
11
11
|
export declare const AsyncFocusBlur: ({ children, onFocus, onBlur, onSyncFocus, onSyncBlur }: AsyncFocusBlurArgs<any> & {
|
|
12
12
|
children: (args: AsyncFocusBlurArgs<any>) => React.ReactNode;
|
|
13
|
-
}) =>
|
|
13
|
+
}) => JSX.Element;
|
|
@@ -12,6 +12,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.AsyncFocusBlur = void 0;
|
|
15
|
+
var React = require("react");
|
|
15
16
|
var useAsyncFocusBlur_1 = require("../hooks/useAsyncFocusBlur");
|
|
16
17
|
/**
|
|
17
18
|
* An utility High-order Component for asynchronous focus/blur handling.
|
|
@@ -23,7 +24,7 @@ var useAsyncFocusBlur_1 = require("../hooks/useAsyncFocusBlur");
|
|
|
23
24
|
*/
|
|
24
25
|
var AsyncFocusBlur = function (_a) {
|
|
25
26
|
var children = _a.children, onFocus = _a.onFocus, onBlur = _a.onBlur, onSyncFocus = _a.onSyncFocus, onSyncBlur = _a.onSyncBlur;
|
|
26
|
-
var args = useAsyncFocusBlur_1.useAsyncFocusBlur({ onFocus: onFocus, onBlur: onBlur, onSyncFocus: onSyncFocus, onSyncBlur: onSyncBlur });
|
|
27
|
-
return children.call(undefined, __assign({}, args));
|
|
27
|
+
var args = (0, useAsyncFocusBlur_1.useAsyncFocusBlur)({ onFocus: onFocus, onBlur: onBlur, onSyncFocus: onSyncFocus, onSyncBlur: onSyncBlur });
|
|
28
|
+
return React.createElement(React.Fragment, null, children.call(undefined, __assign({}, args)));
|
|
28
29
|
};
|
|
29
30
|
exports.AsyncFocusBlur = AsyncFocusBlur;
|
|
@@ -21,7 +21,7 @@ exports.createPropsContext = createPropsContext;
|
|
|
21
21
|
var withPropsContext = function (context, Component
|
|
22
22
|
// eslint-disable-next-line react/display-name
|
|
23
23
|
) { return React.forwardRef(function (props, ref) {
|
|
24
|
-
var contextProps = usePropsContext_1.usePropsContext(context, props);
|
|
24
|
+
var contextProps = (0, usePropsContext_1.usePropsContext)(context, props);
|
|
25
25
|
return (React.createElement(Component, __assign({}, contextProps, { ref: ref })));
|
|
26
26
|
}); };
|
|
27
27
|
exports.withPropsContext = withPropsContext;
|
package/dist/npm/hooks/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
3
|
-
for (var i = 0,
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4
|
+
if (ar || !(i in from)) {
|
|
5
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
6
|
+
ar[i] = from[i];
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
6
10
|
};
|
|
7
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
12
|
exports.useAsyncFocusBlur = void 0;
|
|
@@ -30,7 +34,7 @@ function useAsyncFocusBlur(_a) {
|
|
|
30
34
|
}
|
|
31
35
|
clearTimeout(tick.current);
|
|
32
36
|
if (onSyncFocus) {
|
|
33
|
-
onSyncFocus.call
|
|
37
|
+
onSyncFocus.call(undefined, event[0]);
|
|
34
38
|
}
|
|
35
39
|
if (focused.current) {
|
|
36
40
|
return;
|
|
@@ -38,7 +42,7 @@ function useAsyncFocusBlur(_a) {
|
|
|
38
42
|
;
|
|
39
43
|
focused.current = true;
|
|
40
44
|
if (onFocus) {
|
|
41
|
-
onFocus.call.apply(onFocus, __spreadArray([undefined], event));
|
|
45
|
+
onFocus.call.apply(onFocus, __spreadArray([undefined], event, false));
|
|
42
46
|
}
|
|
43
47
|
}, [focused, onFocus, onSyncFocus]);
|
|
44
48
|
var handleBlur = React.useCallback(function () {
|
|
@@ -47,7 +51,7 @@ function useAsyncFocusBlur(_a) {
|
|
|
47
51
|
event[_i] = arguments[_i];
|
|
48
52
|
}
|
|
49
53
|
if (onSyncBlur) {
|
|
50
|
-
onSyncBlur.call
|
|
54
|
+
onSyncBlur.call(undefined, event[0]);
|
|
51
55
|
}
|
|
52
56
|
nextTick(function () {
|
|
53
57
|
if (!focused.current) {
|
|
@@ -55,7 +59,7 @@ function useAsyncFocusBlur(_a) {
|
|
|
55
59
|
}
|
|
56
60
|
if (onBlur) {
|
|
57
61
|
focused.current = false;
|
|
58
|
-
onBlur.call.apply(onBlur, __spreadArray([undefined], event));
|
|
62
|
+
onBlur.call.apply(onBlur, __spreadArray([undefined], event, false));
|
|
59
63
|
}
|
|
60
64
|
});
|
|
61
65
|
}, [focused, nextTick, onBlur, onSyncBlur]);
|
|
@@ -4,4 +4,4 @@ export declare type ControlledStateHook<T, A = any> = [
|
|
|
4
4
|
(value: T, args?: A) => void
|
|
5
5
|
];
|
|
6
6
|
/** @hidden */
|
|
7
|
-
export declare const useControlledState: <T = any, A = any>(defaultProp: T, prop?: T, callback?: any) => ControlledStateHook<T, any>;
|
|
7
|
+
export declare const useControlledState: <T = any, A = any>(defaultProp: T, prop?: T | undefined, callback?: any) => ControlledStateHook<T, any>;
|
|
@@ -7,5 +7,5 @@ export declare type CustomComponent<P extends {}> = React.ComponentType<P>;
|
|
|
7
7
|
* @hidden
|
|
8
8
|
*/
|
|
9
9
|
export declare const useCustomComponent: <P = {}>(comp: CustomComponent<P>) => [React.ComponentType<P & {
|
|
10
|
-
ref?: React.Ref<any
|
|
10
|
+
ref?: React.Ref<any> | undefined;
|
|
11
11
|
}>, Partial<P>];
|
|
@@ -23,8 +23,8 @@ function useDraggable(ref, callbacks, options) {
|
|
|
23
23
|
var _f = options.hint, hint = _f === void 0 ? null : _f, _g = options.mouseOnly, mouseOnly = _g === void 0 ? false : _g, _h = options.autoScroll, autoScroll = _h === void 0 ? true : _h, _j = options.scrollContainer, scrollContainer = _j === void 0 ? null : _j;
|
|
24
24
|
var _k = React.useState(false), pressed = _k[0], setPressed = _k[1];
|
|
25
25
|
var _l = React.useState(false), scrolling = _l[0], setScrolling = _l[1];
|
|
26
|
-
var drop = useInheritedState_1.useInheritedState(context_1.DropContext)[0];
|
|
27
|
-
var _m = useInheritedState_1.useInheritedState(context_1.DragContext), drag = _m[0], setDrag = _m[1];
|
|
26
|
+
var drop = (0, useInheritedState_1.useInheritedState)(context_1.DropContext)[0];
|
|
27
|
+
var _m = (0, useInheritedState_1.useInheritedState)(context_1.DragContext), drag = _m[0], setDrag = _m[1];
|
|
28
28
|
var drops = React.useContext(context_1.DropsContext)[0];
|
|
29
29
|
var _o = React.useContext(context_1.DragsContext), drags = _o[0], registerDrag = _o[1], deregisterDrag = _o[2];
|
|
30
30
|
var velocity = React.useRef({ x: 0, y: 0 });
|
|
@@ -149,7 +149,7 @@ function useDraggable(ref, callbacks, options) {
|
|
|
149
149
|
onDragEnd(event);
|
|
150
150
|
}, [onDragEnd, setDrag, ref]);
|
|
151
151
|
var dispatchDragEvent = React.useCallback(function (event) {
|
|
152
|
-
kendo_draggable_common_1.dispatchDragAndDrop(getState(), { event: event, payload: target.current }, {
|
|
152
|
+
(0, kendo_draggable_common_1.dispatchDragAndDrop)(getState(), { event: event, payload: target.current }, {
|
|
153
153
|
onVelocityChange: handleVelocityChange,
|
|
154
154
|
onOffsetChange: handleOffsetChange,
|
|
155
155
|
onClientOffsetChange: handleClientOffsetChange,
|
|
@@ -242,7 +242,7 @@ function useDraggable(ref, callbacks, options) {
|
|
|
242
242
|
var document = getDocument();
|
|
243
243
|
if (pointers) {
|
|
244
244
|
if (element) {
|
|
245
|
-
scrollable.current = kendo_draggable_common_1.getScrollableParent(element);
|
|
245
|
+
scrollable.current = (0, kendo_draggable_common_1.getScrollableParent)(element);
|
|
246
246
|
if (scrollable.current) {
|
|
247
247
|
scrollable.current.addEventListener('scroll', handleScroll, { passive: true });
|
|
248
248
|
}
|
|
@@ -298,10 +298,10 @@ function useDraggable(ref, callbacks, options) {
|
|
|
298
298
|
var window = getWindow();
|
|
299
299
|
if (scrolling) {
|
|
300
300
|
var scrollableParent_1 = getScrollContainer()
|
|
301
|
-
|| kendo_draggable_common_1.getScrollableParent(document.elementFromPoint(clientOffset.current.x, clientOffset.current.y));
|
|
301
|
+
|| (0, kendo_draggable_common_1.getScrollableParent)(document.elementFromPoint(clientOffset.current.x, clientOffset.current.y));
|
|
302
302
|
window.clearInterval(scrollInterval.current);
|
|
303
303
|
scrollInterval.current = window.setInterval(function () {
|
|
304
|
-
kendo_draggable_common_1.autoScroll(scrollableParent_1, { x: velocity.current.x, y: velocity.current.y });
|
|
304
|
+
(0, kendo_draggable_common_1.autoScroll)(scrollableParent_1, { x: velocity.current.x, y: velocity.current.y });
|
|
305
305
|
}, 50);
|
|
306
306
|
}
|
|
307
307
|
return function () {
|
|
@@ -22,7 +22,7 @@ function useDroppable(ref, callbacks) {
|
|
|
22
22
|
onDrop: noop_1.noop
|
|
23
23
|
}; }
|
|
24
24
|
var _a = callbacks.onDragEnter, onDragEnter = _a === void 0 ? noop_1.noop : _a, _b = callbacks.onDragOver, onDragOver = _b === void 0 ? noop_1.noop : _b, _c = callbacks.onDragLeave, onDragLeave = _c === void 0 ? noop_1.noop : _c, _d = callbacks.onDrop, onDrop = _d === void 0 ? noop_1.noop : _d;
|
|
25
|
-
var _e = useInheritedState_1.useInheritedState(context_1.DropContext), setDrop = _e[1];
|
|
25
|
+
var _e = (0, useInheritedState_1.useInheritedState)(context_1.DropContext), setDrop = _e[1];
|
|
26
26
|
var _f = React.useContext(context_1.DropsContext), registerDrop = _f[1], deregisterDrop = _f[2];
|
|
27
27
|
var getElement = React.useCallback(function () { return ref.current && ref.current.element
|
|
28
28
|
? ref.current.element
|
|
@@ -9,5 +9,5 @@ interface Setter<T> extends Array<any> {
|
|
|
9
9
|
/**
|
|
10
10
|
* @hidden
|
|
11
11
|
*/
|
|
12
|
-
export declare const useInheritedState: <T>(context: React.Context<[T, (...event: Setter<T>) => void]>, defaultValue?: any) => [T, (...event: Setter<T>) => void];
|
|
12
|
+
export declare const useInheritedState: <T>(context: React.Context<[T | undefined, (...event: Setter<T>) => void]>, defaultValue?: any) => [T, (...event: Setter<T>) => void];
|
|
13
13
|
export {};
|
|
@@ -6,15 +6,15 @@ declare type ElementMouse = {
|
|
|
6
6
|
/**
|
|
7
7
|
* @hidden
|
|
8
8
|
*/
|
|
9
|
-
export declare const useMouse: <E extends HTMLElement, P extends KendoMouse<any, any>, R extends {}>(props: P, target: React.RefObject<R>, extend?: {
|
|
10
|
-
onMouseDown?: (event: React.MouseEvent<E, MouseEvent>) => void;
|
|
11
|
-
onMouseUp?: (event: React.MouseEvent<E, MouseEvent>) => void;
|
|
12
|
-
onClick?: (event: React.MouseEvent<E, MouseEvent>) => void;
|
|
13
|
-
onDoubleClick?: (event: React.MouseEvent<E, MouseEvent>) => void;
|
|
14
|
-
onMouseEnter?: (event: React.MouseEvent<E, MouseEvent>) => void;
|
|
15
|
-
onMouseLeave?: (event: React.MouseEvent<E, MouseEvent>) => void;
|
|
16
|
-
onMouseMove?: (event: React.MouseEvent<E, MouseEvent>) => void;
|
|
17
|
-
onMouseOut?: (event: React.MouseEvent<E, MouseEvent>) => void;
|
|
18
|
-
onMouseOver?: (event: React.MouseEvent<E, MouseEvent>) => void;
|
|
9
|
+
export declare const useMouse: <E extends HTMLElement | null, P extends KendoMouse<any, any>, R extends {}>(props: P, target: React.RefObject<R>, extend?: {
|
|
10
|
+
onMouseDown?: ((event: React.MouseEvent<E, MouseEvent>) => void) | undefined;
|
|
11
|
+
onMouseUp?: ((event: React.MouseEvent<E, MouseEvent>) => void) | undefined;
|
|
12
|
+
onClick?: ((event: React.MouseEvent<E, MouseEvent>) => void) | undefined;
|
|
13
|
+
onDoubleClick?: ((event: React.MouseEvent<E, MouseEvent>) => void) | undefined;
|
|
14
|
+
onMouseEnter?: ((event: React.MouseEvent<E, MouseEvent>) => void) | undefined;
|
|
15
|
+
onMouseLeave?: ((event: React.MouseEvent<E, MouseEvent>) => void) | undefined;
|
|
16
|
+
onMouseMove?: ((event: React.MouseEvent<E, MouseEvent>) => void) | undefined;
|
|
17
|
+
onMouseOut?: ((event: React.MouseEvent<E, MouseEvent>) => void) | undefined;
|
|
18
|
+
onMouseOver?: ((event: React.MouseEvent<E, MouseEvent>) => void) | undefined;
|
|
19
19
|
}) => ElementMouse;
|
|
20
20
|
export {};
|
|
@@ -6,16 +6,16 @@ declare type ElementPointer = {
|
|
|
6
6
|
/**
|
|
7
7
|
* @hidden
|
|
8
8
|
*/
|
|
9
|
-
export declare const usePointer: <E extends HTMLElement, P extends KendoPointer<any, any>, R extends {}>(props: P, target: React.RefObject<R>, extend?: {
|
|
10
|
-
onPointerDown?: (args: React.PointerEvent<E>) => void;
|
|
11
|
-
onPointerMove?: (args: React.PointerEvent<E>) => void;
|
|
12
|
-
onPointerUp?: (args: React.PointerEvent<E>) => void;
|
|
13
|
-
onPointerCancel?: (args: React.PointerEvent<E>) => void;
|
|
14
|
-
onGotPointerCapture?: (args: React.PointerEvent<E>) => void;
|
|
15
|
-
onLostPointerCapture?: (args: React.PointerEvent<E>) => void;
|
|
16
|
-
onPointerEnter?: (args: React.PointerEvent<E>) => void;
|
|
17
|
-
onPointerOver?: (args: React.PointerEvent<E>) => void;
|
|
18
|
-
onPointerLeave?: (args: React.PointerEvent<E>) => void;
|
|
19
|
-
onPointerOut?: (args: React.PointerEvent<E>) => void;
|
|
9
|
+
export declare const usePointer: <E extends HTMLElement | null, P extends KendoPointer<any, any>, R extends {}>(props: P, target: React.RefObject<R>, extend?: {
|
|
10
|
+
onPointerDown?: ((args: React.PointerEvent<E>) => void) | undefined;
|
|
11
|
+
onPointerMove?: ((args: React.PointerEvent<E>) => void) | undefined;
|
|
12
|
+
onPointerUp?: ((args: React.PointerEvent<E>) => void) | undefined;
|
|
13
|
+
onPointerCancel?: ((args: React.PointerEvent<E>) => void) | undefined;
|
|
14
|
+
onGotPointerCapture?: ((args: React.PointerEvent<E>) => void) | undefined;
|
|
15
|
+
onLostPointerCapture?: ((args: React.PointerEvent<E>) => void) | undefined;
|
|
16
|
+
onPointerEnter?: ((args: React.PointerEvent<E>) => void) | undefined;
|
|
17
|
+
onPointerOver?: ((args: React.PointerEvent<E>) => void) | undefined;
|
|
18
|
+
onPointerLeave?: ((args: React.PointerEvent<E>) => void) | undefined;
|
|
19
|
+
onPointerOut?: ((args: React.PointerEvent<E>) => void) | undefined;
|
|
20
20
|
}) => ElementPointer;
|
|
21
21
|
export {};
|
|
@@ -6,10 +6,10 @@ declare type ElementTouch = {
|
|
|
6
6
|
/**
|
|
7
7
|
* @hidden
|
|
8
8
|
*/
|
|
9
|
-
export declare const useMouse: <E extends HTMLElement, P extends KendoTouch<any, any>, R extends {}>(props: P, target: React.RefObject<R>, extend?: {
|
|
10
|
-
onTouchStart?: (args: React.TouchEvent<E>) => void;
|
|
11
|
-
onTouchMove?: (args: React.TouchEvent<E>) => void;
|
|
12
|
-
onTouchEnd?: (args: React.TouchEvent<E>) => void;
|
|
13
|
-
onTouchCancel?: (args: React.TouchEvent<E>) => void;
|
|
9
|
+
export declare const useMouse: <E extends HTMLElement | null, P extends KendoTouch<any, any>, R extends {}>(props: P, target: React.RefObject<R>, extend?: {
|
|
10
|
+
onTouchStart?: ((args: React.TouchEvent<E>) => void) | undefined;
|
|
11
|
+
onTouchMove?: ((args: React.TouchEvent<E>) => void) | undefined;
|
|
12
|
+
onTouchEnd?: ((args: React.TouchEvent<E>) => void) | undefined;
|
|
13
|
+
onTouchCancel?: ((args: React.TouchEvent<E>) => void) | undefined;
|
|
14
14
|
}) => ElementTouch;
|
|
15
15
|
export {};
|
|
@@ -7,7 +7,7 @@ var useDocument_1 = require("./useDocument");
|
|
|
7
7
|
* Returns a function, which gets the `defaultView` based on the `ownerDocument` of the element.
|
|
8
8
|
*/
|
|
9
9
|
var useWindow = function (ref) {
|
|
10
|
-
var getDocument = useDocument_1.useDocument(ref);
|
|
10
|
+
var getDocument = (0, useDocument_1.useDocument)(ref);
|
|
11
11
|
var getWindow = React.useCallback(function () {
|
|
12
12
|
var document = getDocument();
|
|
13
13
|
return document
|
package/dist/npm/icons/Icon.d.ts
CHANGED
|
@@ -32,4 +32,4 @@ export interface IconProps extends BaseIconProps, KendoMouse<IconHandle, HTMLSpa
|
|
|
32
32
|
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
33
33
|
* ```
|
|
34
34
|
*/
|
|
35
|
-
export declare const Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<IconHandle>>;
|
|
35
|
+
export declare const Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<IconHandle | null>>;
|
package/dist/npm/icons/Icon.js
CHANGED
|
@@ -52,11 +52,11 @@ exports.Icon = React.forwardRef(function (props, ref) {
|
|
|
52
52
|
var themeColorProp = React.useMemo(function () { return themeColor || defaultProps.themeColor; }, [themeColor]);
|
|
53
53
|
var sizeProp = React.useMemo(function () { return size || defaultProps.size; }, [size]);
|
|
54
54
|
var flipProp = React.useMemo(function () { return flip || defaultProps.flip; }, [flip]);
|
|
55
|
-
var fontClassNames = React.useMemo(function () { return classNames_1.classNames('k-icon', 'k-i-' + name, 'k-color-' + themeColorProp, {
|
|
55
|
+
var fontClassNames = React.useMemo(function () { return (0, classNames_1.classNames)('k-icon', 'k-i-' + name, 'k-color-' + themeColorProp, {
|
|
56
56
|
'k-flip-h': flipProp === 'horizontal' || flipProp === 'both',
|
|
57
57
|
'k-flip-v': flipProp === 'vertical' || flipProp === 'both'
|
|
58
58
|
}, constants_1.SIZE_CLASSES[sizeProp], className); }, [name, themeColorProp, sizeProp, flipProp, className]);
|
|
59
|
-
var mouseProps = main_1.useMouse(props, target);
|
|
59
|
+
var mouseProps = (0, main_1.useMouse)(props, target);
|
|
60
60
|
return (React.createElement("span", __assign({ ref: elementRef }, others, mouseProps, { className: fontClassNames, style: style, role: "presentation" })));
|
|
61
61
|
});
|
|
62
62
|
exports.Icon.propTypes = {
|
|
@@ -68,4 +68,4 @@ export interface SvgIconProps extends BaseIconProps, React.SVGAttributes<HTMLOrS
|
|
|
68
68
|
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
69
69
|
* ```
|
|
70
70
|
*/
|
|
71
|
-
export declare const SvgIcon: React.ForwardRefExoticComponent<SvgIconProps & React.RefAttributes<SvgIconHandle>>;
|
|
71
|
+
export declare const SvgIcon: React.ForwardRefExoticComponent<SvgIconProps & React.RefAttributes<SvgIconHandle | null>>;
|
|
@@ -53,7 +53,7 @@ exports.SvgIcon = React.forwardRef(function (props, ref) {
|
|
|
53
53
|
var sizeProp = React.useMemo(function () { return size || defaultProps.size; }, [size]);
|
|
54
54
|
var flipProp = React.useMemo(function () { return flip || defaultProps.flip; }, [flip]);
|
|
55
55
|
var viewBoxProp = React.useMemo(function () { return viewBox || defaultProps.viewBox; }, [viewBox]);
|
|
56
|
-
var elementClassNames = React.useMemo(function () { return classNames_1.classNames('k-svg-icon', 'k-color-' + themeColorProp, 'k-svg-i-' + iconNameProp, {
|
|
56
|
+
var elementClassNames = React.useMemo(function () { return (0, classNames_1.classNames)('k-svg-icon', 'k-color-' + themeColorProp, 'k-svg-i-' + iconNameProp, {
|
|
57
57
|
'k-flip-h': flipProp === 'horizontal' || flipProp === 'both',
|
|
58
58
|
'k-flip-v': flipProp === 'vertical' || flipProp === 'both'
|
|
59
59
|
}, constants_1.SIZE_CLASSES[sizeProp], className); }, [iconNameProp, themeColorProp, sizeProp, flipProp, className]);
|
package/dist/npm/main.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/dist/npm/models/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -22,6 +22,6 @@ var setScrollbarWidth = function () {
|
|
|
22
22
|
return false;
|
|
23
23
|
}
|
|
24
24
|
var scrollbarWidth = new browser_support_service_1.BrowserSupportService().scrollbarWidth;
|
|
25
|
-
document.body.style.setProperty('--kendo-scrollbar-width', scrollbarWidth
|
|
25
|
+
document.body.style.setProperty('--kendo-scrollbar-width', "".concat(scrollbarWidth, "px"));
|
|
26
26
|
};
|
|
27
27
|
exports.setScrollbarWidth = setScrollbarWidth;
|
package/dist/npm/setter.js
CHANGED
|
@@ -26,7 +26,7 @@ function setter(field) {
|
|
|
26
26
|
if (setterCache[field]) {
|
|
27
27
|
return setterCache[field];
|
|
28
28
|
}
|
|
29
|
-
var fields = fieldList_1.fieldList(field);
|
|
29
|
+
var fields = (0, fieldList_1.fieldList)(field);
|
|
30
30
|
setterCache[field] = function (obj, value, options) {
|
|
31
31
|
var root = obj;
|
|
32
32
|
var depth = fields.length - 1;
|
|
@@ -10,10 +10,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
14
|
-
for (var i = 0,
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
14
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
15
|
+
if (ar || !(i in from)) {
|
|
16
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
17
|
+
ar[i] = from[i];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
17
21
|
};
|
|
18
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
23
|
exports.getItemPath = exports.extendDataItem = exports.mapTreeItem = exports.mapTree = void 0;
|
|
@@ -21,10 +25,10 @@ exports.getItemPath = exports.extendDataItem = exports.mapTreeItem = exports.map
|
|
|
21
25
|
function children(item, subItemsField, subItems) {
|
|
22
26
|
var _a;
|
|
23
27
|
if (subItems) {
|
|
24
|
-
return __assign(__assign({}, item), (_a = {}, _a[subItemsField] = subItems.length ? __spreadArray([], subItems) : undefined, _a));
|
|
28
|
+
return __assign(__assign({}, item), (_a = {}, _a[subItemsField] = subItems.length ? __spreadArray([], subItems, true) : undefined, _a));
|
|
25
29
|
}
|
|
26
30
|
else {
|
|
27
|
-
return item && item[subItemsField] ? __spreadArray([], item[subItemsField]) : [];
|
|
31
|
+
return item && item[subItemsField] ? __spreadArray([], item[subItemsField], true) : [];
|
|
28
32
|
}
|
|
29
33
|
}
|
|
30
34
|
function mapItem(dataItem, subItemsField, callbackfn) {
|
|
@@ -44,7 +48,7 @@ function mapItem(dataItem, subItemsField, callbackfn) {
|
|
|
44
48
|
* @returns {any[]} - The new data tree.
|
|
45
49
|
*/
|
|
46
50
|
var mapTree = function (tree, subItemsField, callback) {
|
|
47
|
-
return __spreadArray([], tree.map(function (item) { return mapItem(item, subItemsField, callback); }));
|
|
51
|
+
return __spreadArray([], tree.map(function (item) { return mapItem(item, subItemsField, callback); }), true);
|
|
48
52
|
};
|
|
49
53
|
exports.mapTree = mapTree;
|
|
50
54
|
/**
|
|
@@ -94,7 +98,7 @@ exports.extendDataItem = extendDataItem;
|
|
|
94
98
|
*/
|
|
95
99
|
var getItemPath = function (tree, level, subItemsField) {
|
|
96
100
|
var nodes = [];
|
|
97
|
-
var itemLevel = __spreadArray([], level);
|
|
101
|
+
var itemLevel = __spreadArray([], level, true);
|
|
98
102
|
if (itemLevel.length) {
|
|
99
103
|
var element = tree[itemLevel.shift() || 0];
|
|
100
104
|
nodes.push(element);
|
|
@@ -41,12 +41,12 @@ var generateTypography = function (element) {
|
|
|
41
41
|
React.useImperativeHandle(ref, function () { return target.current; });
|
|
42
42
|
var defaultClass = function () {
|
|
43
43
|
var classMap = element === 'p' ? 'paragraph' : element;
|
|
44
|
-
return "k-"
|
|
44
|
+
return "k-".concat(classMap);
|
|
45
45
|
};
|
|
46
46
|
var Component = element;
|
|
47
47
|
var setMarginClassPerSide = function (marginSide, value) {
|
|
48
48
|
var val = typeof value === 'string' ? constants_1.MARGIN_ENUM_VALUES[value] : value;
|
|
49
|
-
return ""
|
|
49
|
+
return "".concat(constants_1.MARGIN_SIDES_CLASSES[marginSide]).concat(val);
|
|
50
50
|
};
|
|
51
51
|
var setMarginClasses = function () {
|
|
52
52
|
if (margin === undefined) {
|
|
@@ -57,7 +57,7 @@ var generateTypography = function (element) {
|
|
|
57
57
|
}
|
|
58
58
|
// The the predefined Kendo classes are starting from 0 to 24.
|
|
59
59
|
if (typeof margin === 'number' && margin >= 0 && margin <= 24) {
|
|
60
|
-
return ["k-m-"
|
|
60
|
+
return ["k-m-".concat(margin)];
|
|
61
61
|
}
|
|
62
62
|
if (typeof margin === 'object') {
|
|
63
63
|
var marginClassesList_1 = [];
|
|
@@ -104,7 +104,7 @@ var generateTypography = function (element) {
|
|
|
104
104
|
'dark', 'light', 'inverse'
|
|
105
105
|
])
|
|
106
106
|
};
|
|
107
|
-
component.displayName = "KendoReactTypography"
|
|
107
|
+
component.displayName = "KendoReactTypography".concat(element.toUpperCase());
|
|
108
108
|
return component;
|
|
109
109
|
};
|
|
110
110
|
/**
|
|
@@ -10,9 +10,9 @@ function validatePackage(packageMetadata) {
|
|
|
10
10
|
licensing.validatePackage(packageMetadata);
|
|
11
11
|
}
|
|
12
12
|
else {
|
|
13
|
-
var message = "License activation failed for "
|
|
13
|
+
var message = "License activation failed for ".concat(packageMetadata.name, "\n");
|
|
14
14
|
message += 'The @progress/kendo-licensing script is not loaded.\n';
|
|
15
|
-
message += "See "
|
|
15
|
+
message += "See ".concat(packageMetadata.licensingDocsUrl, " for more information.\n");
|
|
16
16
|
console.warn(message);
|
|
17
17
|
}
|
|
18
18
|
}
|