@progress/kendo-react-common 6.1.1 → 7.0.0-develop.2
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/npm/Draggable.d.ts → Draggable.d.ts} +5 -1
- package/{dist/npm/Droppable.d.ts → Droppable.d.ts} +5 -1
- package/{dist/es/FormComponent.d.ts → FormComponent.d.ts} +4 -0
- package/LICENSE.md +1 -1
- package/browser-support.service.d.ts +11 -0
- package/canUseDOM.d.ts +8 -0
- package/canUseRef.d.ts +9 -0
- package/classNames.d.ts +8 -0
- package/{dist/npm/clone.d.ts → clone.d.ts} +4 -0
- package/constants/index.d.ts +8 -0
- package/contexts/ZIndexContext.d.ts +11 -0
- package/dist/cdn/js/kendo-react-common.js +8 -1
- package/{dist/npm/drag-n-drop → drag-n-drop}/context/index.d.ts +6 -2
- package/{dist/es/drag-n-drop → drag-n-drop}/index.d.ts +6 -2
- package/events/BaseEvent.d.ts +22 -0
- package/{dist/npm/events → events}/dispatchEvent.d.ts +4 -1
- package/fieldList.d.ts +8 -0
- package/focus.d.ts +8 -0
- package/getActiveElement.d.ts +12 -0
- package/getTabIndex.d.ts +8 -0
- package/{dist/es/getter.d.ts → getter.d.ts} +4 -0
- package/guid.d.ts +8 -0
- package/hasRelativeStackingContext.d.ts +6 -0
- package/{dist/npm/hocs → hocs}/AsyncFocusBlur.d.ts +5 -1
- package/{dist/npm/hocs → hocs}/withPropsContext.d.ts +4 -0
- package/{dist/npm/hooks → hooks}/index.d.ts +4 -0
- package/{dist/npm/hooks → hooks}/useAsyncFocusBlur.d.ts +5 -1
- package/hooks/useCollection.d.ts +18 -0
- package/hooks/useControlledState.d.ts +11 -0
- package/hooks/useCustomComponent.d.ts +17 -0
- package/hooks/useDir.d.ts +9 -0
- package/hooks/useDocument.d.ts +11 -0
- package/{dist/es/hooks → hooks}/useDraggable.d.ts +4 -0
- package/{dist/es/hooks → hooks}/useDroppable.d.ts +4 -0
- package/hooks/useInheritedState.d.ts +17 -0
- package/{dist/es/hooks → hooks}/useMouse.d.ts +5 -1
- package/hooks/usePropsContext.d.ts +7 -0
- package/hooks/useRtl.d.ts +9 -0
- package/hooks/useWindow.d.ts +11 -0
- package/{dist/npm/icons → icons}/BaseIconProps.d.ts +4 -1
- package/{dist/es/icons → icons}/Icon.d.ts +4 -0
- package/icons/IconWrap.d.ts +11 -0
- package/{dist/es/icons → icons}/IconsContext.d.ts +4 -0
- package/{dist/es/icons → icons}/SvgIcon.d.ts +4 -0
- package/icons/constants.d.ts +17 -0
- package/icons/models/flip.d.ts +15 -0
- package/{dist/npm/icons → icons}/models/size.d.ts +5 -1
- package/{dist/es/icons → icons}/models/theme-color.d.ts +5 -1
- package/{dist/es/icons → icons}/utils.d.ts +4 -0
- package/{dist/es/main.d.ts → index.d.ts} +4 -0
- package/index.js +8 -0
- package/index.mjs +1787 -0
- package/keys.d.ts +24 -0
- package/memoize.d.ts +14 -0
- package/{dist/es/models → models}/auto-scroll-options.d.ts +4 -1
- package/models/index.d.ts +9 -0
- package/{dist/npm/models → models}/kendoReactComponentBaseProps.d.ts +4 -1
- package/{dist/npm/models → models}/mouse.d.ts +4 -0
- package/{dist/npm/models → models}/pointer.d.ts +4 -0
- package/{dist/es/models → models}/touch.d.ts +4 -0
- package/{dist/npm/navigation.d.ts → navigation.d.ts} +4 -1
- package/noop.d.ts +8 -0
- package/package.json +26 -45
- package/scrollbarWidth.d.ts +12 -0
- package/{dist/npm/setter.d.ts → setter.d.ts} +4 -0
- package/theme.d.ts +12 -0
- package/{dist/es/tree-utils → tree-utils}/FieldsService.d.ts +4 -0
- package/tree-utils/SortedPublicItemIds.d.ts +12 -0
- package/{dist/es/tree-utils → tree-utils}/itemIdUtils.d.ts +4 -0
- package/{dist/es/tree-utils → tree-utils}/itemUtils.d.ts +4 -0
- package/tree-utils/misc.d.ts +12 -0
- package/{dist/es/treeDataOperations.d.ts → treeDataOperations.d.ts} +4 -0
- package/{dist/npm/typography → typography}/Typography.d.ts +4 -0
- package/{dist/es/typography → typography}/TypographyProps.d.ts +4 -1
- package/{dist/npm/typography → typography}/constants.d.ts +4 -0
- package/{dist/es/typography → typography}/models/margin.d.ts +5 -1
- package/validate-package.d.ts +12 -0
- package/watermark/WatermarkOverlay.d.ts +9 -0
- package/about.md +0 -3
- package/dist/es/Draggable.d.ts +0 -86
- package/dist/es/Draggable.js +0 -84
- package/dist/es/Droppable.d.ts +0 -77
- package/dist/es/Droppable.js +0 -68
- package/dist/es/FormComponent.js +0 -9
- package/dist/es/browser-support.service.d.ts +0 -7
- package/dist/es/browser-support.service.js +0 -30
- package/dist/es/canUseDOM.d.ts +0 -4
- package/dist/es/canUseDOM.js +0 -8
- package/dist/es/canUseRef.d.ts +0 -5
- package/dist/es/canUseRef.js +0 -12
- package/dist/es/classNames.d.ts +0 -4
- package/dist/es/classNames.js +0 -30
- package/dist/es/clone.d.ts +0 -20
- package/dist/es/clone.js +0 -52
- package/dist/es/constants/index.d.ts +0 -4
- package/dist/es/constants/index.js +0 -4
- package/dist/es/contexts/ZIndexContext.d.ts +0 -7
- package/dist/es/contexts/ZIndexContext.js +0 -6
- package/dist/es/drag-n-drop/context/index.d.ts +0 -19
- package/dist/es/drag-n-drop/context/index.js +0 -24
- package/dist/es/drag-n-drop/index.js +0 -44
- package/dist/es/events/BaseEvent.d.ts +0 -18
- package/dist/es/events/BaseEvent.js +0 -1
- package/dist/es/events/dispatchEvent.d.ts +0 -15
- package/dist/es/events/dispatchEvent.js +0 -22
- package/dist/es/fieldList.d.ts +0 -4
- package/dist/es/fieldList.js +0 -11
- package/dist/es/focus.d.ts +0 -4
- package/dist/es/focus.js +0 -15
- package/dist/es/getActiveElement.d.ts +0 -8
- package/dist/es/getActiveElement.js +0 -23
- package/dist/es/getTabIndex.d.ts +0 -4
- package/dist/es/getTabIndex.js +0 -23
- package/dist/es/getter.js +0 -30
- package/dist/es/guid.d.ts +0 -4
- package/dist/es/guid.js +0 -17
- package/dist/es/hasRelativeStackingContext.d.ts +0 -2
- package/dist/es/hasRelativeStackingContext.js +0 -25
- package/dist/es/hocs/AsyncFocusBlur.d.ts +0 -13
- package/dist/es/hocs/AsyncFocusBlur.js +0 -26
- package/dist/es/hocs/withPropsContext.d.ts +0 -5
- package/dist/es/hocs/withPropsContext.js +0 -22
- package/dist/es/hooks/index.d.ts +0 -12
- package/dist/es/hooks/index.js +0 -12
- package/dist/es/hooks/useAsyncFocusBlur.d.ts +0 -25
- package/dist/es/hooks/useAsyncFocusBlur.js +0 -72
- package/dist/es/hooks/useCollection.d.ts +0 -14
- package/dist/es/hooks/useCollection.js +0 -26
- package/dist/es/hooks/useControlledState.d.ts +0 -7
- package/dist/es/hooks/useControlledState.js +0 -23
- package/dist/es/hooks/useCustomComponent.d.ts +0 -13
- package/dist/es/hooks/useCustomComponent.js +0 -9
- package/dist/es/hooks/useDir.d.ts +0 -5
- package/dist/es/hooks/useDir.js +0 -19
- package/dist/es/hooks/useDocument.d.ts +0 -7
- package/dist/es/hooks/useDocument.js +0 -14
- package/dist/es/hooks/useDraggable.js +0 -336
- package/dist/es/hooks/useDroppable.js +0 -59
- package/dist/es/hooks/useInheritedState.d.ts +0 -13
- package/dist/es/hooks/useInheritedState.js +0 -21
- package/dist/es/hooks/useMouse.js +0 -117
- package/dist/es/hooks/usePointer.d.ts +0 -21
- package/dist/es/hooks/usePointer.js +0 -29
- package/dist/es/hooks/usePropsContext.d.ts +0 -3
- package/dist/es/hooks/usePropsContext.js +0 -7
- package/dist/es/hooks/useRtl.d.ts +0 -5
- package/dist/es/hooks/useRtl.js +0 -22
- package/dist/es/hooks/useTouch.d.ts +0 -15
- package/dist/es/hooks/useTouch.js +0 -29
- package/dist/es/hooks/useWindow.d.ts +0 -7
- package/dist/es/hooks/useWindow.js +0 -15
- package/dist/es/icons/BaseIconProps.d.ts +0 -73
- package/dist/es/icons/BaseIconProps.js +0 -1
- package/dist/es/icons/Icon.js +0 -78
- package/dist/es/icons/IconWrap.d.ts +0 -7
- package/dist/es/icons/IconWrap.js +0 -41
- package/dist/es/icons/IconsContext.js +0 -7
- package/dist/es/icons/SvgIcon.js +0 -96
- package/dist/es/icons/constants.d.ts +0 -13
- package/dist/es/icons/constants.js +0 -13
- package/dist/es/icons/models/flip.d.ts +0 -11
- package/dist/es/icons/models/flip.js +0 -1
- package/dist/es/icons/models/size.d.ts +0 -15
- package/dist/es/icons/models/size.js +0 -1
- package/dist/es/icons/models/theme-color.js +0 -1
- package/dist/es/icons/utils.js +0 -17
- package/dist/es/keys.d.ts +0 -20
- package/dist/es/keys.js +0 -20
- package/dist/es/main.js +0 -59
- package/dist/es/memoize.d.ts +0 -10
- package/dist/es/memoize.js +0 -41
- package/dist/es/models/auto-scroll-options.js +0 -1
- package/dist/es/models/index.d.ts +0 -5
- package/dist/es/models/index.js +0 -5
- package/dist/es/models/kendoReactComponentBaseProps.d.ts +0 -24
- package/dist/es/models/kendoReactComponentBaseProps.js +0 -1
- package/dist/es/models/mouse.d.ts +0 -16
- package/dist/es/models/mouse.js +0 -1
- package/dist/es/models/pointer.d.ts +0 -23
- package/dist/es/models/pointer.js +0 -1
- package/dist/es/models/touch.js +0 -1
- package/dist/es/navigation.d.ts +0 -128
- package/dist/es/navigation.js +0 -144
- package/dist/es/noop.d.ts +0 -4
- package/dist/es/noop.js +0 -4
- package/dist/es/scrollbarWidth.d.ts +0 -8
- package/dist/es/scrollbarWidth.js +0 -22
- package/dist/es/setter.d.ts +0 -16
- package/dist/es/setter.js +0 -36
- package/dist/es/theme.d.ts +0 -8
- package/dist/es/theme.js +0 -17
- package/dist/es/tree-utils/FieldsService.js +0 -50
- package/dist/es/tree-utils/SortedPublicItemIds.d.ts +0 -8
- package/dist/es/tree-utils/SortedPublicItemIds.js +0 -26
- package/dist/es/tree-utils/itemIdUtils.js +0 -117
- package/dist/es/tree-utils/itemUtils.js +0 -191
- package/dist/es/tree-utils/misc.d.ts +0 -8
- package/dist/es/tree-utils/misc.js +0 -17
- package/dist/es/treeDataOperations.js +0 -105
- package/dist/es/typography/Typography.d.ts +0 -35
- package/dist/es/typography/Typography.js +0 -266
- package/dist/es/typography/TypographyProps.js +0 -1
- package/dist/es/typography/constants.d.ts +0 -84
- package/dist/es/typography/constants.js +0 -84
- package/dist/es/typography/models/margin.js +0 -1
- package/dist/es/validate-package.d.ts +0 -8
- package/dist/es/validate-package.js +0 -23
- package/dist/es/watermark/WatermarkOverlay.d.ts +0 -6
- package/dist/es/watermark/WatermarkOverlay.js +0 -86
- package/dist/npm/Draggable.js +0 -87
- package/dist/npm/Droppable.js +0 -71
- package/dist/npm/FormComponent.d.ts +0 -98
- package/dist/npm/FormComponent.js +0 -12
- package/dist/npm/browser-support.service.d.ts +0 -7
- package/dist/npm/browser-support.service.js +0 -33
- package/dist/npm/canUseDOM.d.ts +0 -4
- package/dist/npm/canUseDOM.js +0 -11
- package/dist/npm/canUseRef.d.ts +0 -5
- package/dist/npm/canUseRef.js +0 -16
- package/dist/npm/classNames.d.ts +0 -4
- package/dist/npm/classNames.js +0 -34
- package/dist/npm/clone.js +0 -60
- package/dist/npm/constants/index.d.ts +0 -4
- package/dist/npm/constants/index.js +0 -7
- package/dist/npm/contexts/ZIndexContext.d.ts +0 -7
- package/dist/npm/contexts/ZIndexContext.js +0 -10
- package/dist/npm/drag-n-drop/context/index.js +0 -27
- package/dist/npm/drag-n-drop/index.d.ts +0 -21
- package/dist/npm/drag-n-drop/index.js +0 -48
- package/dist/npm/events/BaseEvent.d.ts +0 -18
- package/dist/npm/events/BaseEvent.js +0 -2
- package/dist/npm/events/dispatchEvent.js +0 -26
- package/dist/npm/fieldList.d.ts +0 -4
- package/dist/npm/fieldList.js +0 -15
- package/dist/npm/focus.d.ts +0 -4
- package/dist/npm/focus.js +0 -19
- package/dist/npm/getActiveElement.d.ts +0 -8
- package/dist/npm/getActiveElement.js +0 -28
- package/dist/npm/getTabIndex.d.ts +0 -4
- package/dist/npm/getTabIndex.js +0 -27
- package/dist/npm/getter.d.ts +0 -14
- package/dist/npm/getter.js +0 -34
- package/dist/npm/guid.d.ts +0 -4
- package/dist/npm/guid.js +0 -21
- package/dist/npm/hasRelativeStackingContext.d.ts +0 -2
- package/dist/npm/hasRelativeStackingContext.js +0 -29
- package/dist/npm/hocs/AsyncFocusBlur.js +0 -30
- package/dist/npm/hocs/withPropsContext.js +0 -27
- package/dist/npm/hooks/index.js +0 -28
- package/dist/npm/hooks/useAsyncFocusBlur.js +0 -76
- package/dist/npm/hooks/useCollection.d.ts +0 -14
- package/dist/npm/hooks/useCollection.js +0 -30
- package/dist/npm/hooks/useControlledState.d.ts +0 -7
- package/dist/npm/hooks/useControlledState.js +0 -27
- package/dist/npm/hooks/useCustomComponent.d.ts +0 -13
- package/dist/npm/hooks/useCustomComponent.js +0 -13
- package/dist/npm/hooks/useDir.d.ts +0 -5
- package/dist/npm/hooks/useDir.js +0 -23
- package/dist/npm/hooks/useDocument.d.ts +0 -7
- package/dist/npm/hooks/useDocument.js +0 -18
- package/dist/npm/hooks/useDraggable.d.ts +0 -63
- package/dist/npm/hooks/useDraggable.js +0 -340
- package/dist/npm/hooks/useDroppable.d.ts +0 -28
- package/dist/npm/hooks/useDroppable.js +0 -63
- package/dist/npm/hooks/useInheritedState.d.ts +0 -13
- package/dist/npm/hooks/useInheritedState.js +0 -25
- package/dist/npm/hooks/useMouse.d.ts +0 -20
- package/dist/npm/hooks/useMouse.js +0 -121
- package/dist/npm/hooks/usePointer.d.ts +0 -21
- package/dist/npm/hooks/usePointer.js +0 -33
- package/dist/npm/hooks/usePropsContext.d.ts +0 -3
- package/dist/npm/hooks/usePropsContext.js +0 -11
- package/dist/npm/hooks/useRtl.d.ts +0 -5
- package/dist/npm/hooks/useRtl.js +0 -26
- package/dist/npm/hooks/useTouch.d.ts +0 -15
- package/dist/npm/hooks/useTouch.js +0 -33
- package/dist/npm/hooks/useWindow.d.ts +0 -7
- package/dist/npm/hooks/useWindow.js +0 -19
- package/dist/npm/icons/BaseIconProps.js +0 -2
- package/dist/npm/icons/Icon.d.ts +0 -35
- package/dist/npm/icons/Icon.js +0 -81
- package/dist/npm/icons/IconWrap.d.ts +0 -7
- package/dist/npm/icons/IconWrap.js +0 -44
- package/dist/npm/icons/IconsContext.d.ts +0 -21
- package/dist/npm/icons/IconsContext.js +0 -10
- package/dist/npm/icons/SvgIcon.d.ts +0 -71
- package/dist/npm/icons/SvgIcon.js +0 -99
- package/dist/npm/icons/constants.d.ts +0 -13
- package/dist/npm/icons/constants.js +0 -16
- package/dist/npm/icons/models/flip.d.ts +0 -11
- package/dist/npm/icons/models/flip.js +0 -2
- package/dist/npm/icons/models/size.js +0 -2
- package/dist/npm/icons/models/theme-color.d.ts +0 -21
- package/dist/npm/icons/models/theme-color.js +0 -2
- package/dist/npm/icons/utils.d.ts +0 -17
- package/dist/npm/icons/utils.js +0 -22
- package/dist/npm/keys.d.ts +0 -20
- package/dist/npm/keys.js +0 -23
- package/dist/npm/main.d.ts +0 -58
- package/dist/npm/main.js +0 -75
- package/dist/npm/memoize.d.ts +0 -10
- package/dist/npm/memoize.js +0 -45
- package/dist/npm/models/auto-scroll-options.d.ts +0 -23
- package/dist/npm/models/auto-scroll-options.js +0 -2
- package/dist/npm/models/index.d.ts +0 -5
- package/dist/npm/models/index.js +0 -21
- package/dist/npm/models/kendoReactComponentBaseProps.js +0 -2
- package/dist/npm/models/mouse.js +0 -2
- package/dist/npm/models/pointer.js +0 -2
- package/dist/npm/models/touch.d.ts +0 -17
- package/dist/npm/models/touch.js +0 -2
- package/dist/npm/navigation.js +0 -147
- package/dist/npm/noop.d.ts +0 -4
- package/dist/npm/noop.js +0 -8
- package/dist/npm/scrollbarWidth.d.ts +0 -8
- package/dist/npm/scrollbarWidth.js +0 -27
- package/dist/npm/setter.js +0 -40
- package/dist/npm/theme.d.ts +0 -8
- package/dist/npm/theme.js +0 -20
- package/dist/npm/tree-utils/FieldsService.d.ts +0 -25
- package/dist/npm/tree-utils/FieldsService.js +0 -53
- package/dist/npm/tree-utils/SortedPublicItemIds.d.ts +0 -8
- package/dist/npm/tree-utils/SortedPublicItemIds.js +0 -29
- package/dist/npm/tree-utils/itemIdUtils.d.ts +0 -60
- package/dist/npm/tree-utils/itemIdUtils.js +0 -132
- package/dist/npm/tree-utils/itemUtils.d.ts +0 -45
- package/dist/npm/tree-utils/itemUtils.js +0 -205
- package/dist/npm/tree-utils/misc.d.ts +0 -8
- package/dist/npm/tree-utils/misc.js +0 -22
- package/dist/npm/treeDataOperations.d.ts +0 -39
- package/dist/npm/treeDataOperations.js +0 -112
- package/dist/npm/typography/Typography.js +0 -269
- package/dist/npm/typography/TypographyProps.d.ts +0 -121
- package/dist/npm/typography/TypographyProps.js +0 -2
- package/dist/npm/typography/constants.js +0 -87
- package/dist/npm/typography/models/margin.d.ts +0 -23
- package/dist/npm/typography/models/margin.js +0 -2
- package/dist/npm/validate-package.d.ts +0 -8
- package/dist/npm/validate-package.js +0 -28
- package/dist/npm/watermark/WatermarkOverlay.d.ts +0 -6
- package/dist/npm/watermark/WatermarkOverlay.js +0 -90
- package/dist/systemjs/kendo-react-common.js +0 -1
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
|
-
if (ar || !(i in from)) {
|
|
15
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
16
|
-
ar[i] = from[i];
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
|
-
};
|
|
21
|
-
// Gets and sets the children. Returns the children or the re-created item with the new children.
|
|
22
|
-
function children(item, subItemsField, subItems) {
|
|
23
|
-
var _a;
|
|
24
|
-
if (subItems) {
|
|
25
|
-
return __assign(__assign({}, item), (_a = {}, _a[subItemsField] = subItems.length ? __spreadArray([], subItems, true) : undefined, _a));
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
return item && item[subItemsField] ? __spreadArray([], item[subItemsField], true) : [];
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
function mapItem(dataItem, subItemsField, callbackfn) {
|
|
32
|
-
if (dataItem[subItemsField]) {
|
|
33
|
-
var subItems = children(dataItem, subItemsField).map(function (child) { return mapItem(child, subItemsField, callbackfn); });
|
|
34
|
-
return callbackfn(children(dataItem, subItemsField, subItems));
|
|
35
|
-
}
|
|
36
|
-
return callbackfn(dataItem);
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Creates a new array with the results of calling the provided callback function
|
|
40
|
-
* on every element in the provided data tree.
|
|
41
|
-
*
|
|
42
|
-
* @param {any[]} tree - The data tree.
|
|
43
|
-
* @param {string} subItemsField - The field which points to the subitems collection of each data item.
|
|
44
|
-
* @param {(value: any) => any} callback - The callback function.
|
|
45
|
-
* @returns {any[]} - The new data tree.
|
|
46
|
-
*/
|
|
47
|
-
export var mapTree = function (tree, subItemsField, callback) {
|
|
48
|
-
return __spreadArray([], tree.map(function (item) { return mapItem(item, subItemsField, callback); }), true);
|
|
49
|
-
};
|
|
50
|
-
/**
|
|
51
|
-
* Creates a new array with the results of calling the provided callback function
|
|
52
|
-
* on the element which match the `level` in the provided data tree.
|
|
53
|
-
*
|
|
54
|
-
* @param {any[]} tree - The data tree.
|
|
55
|
-
* @param {number[]} level - An array of indexes of each parent and current item in the data tree.
|
|
56
|
-
* @param {string} subItemsField - The field which points to the subitems collection of each data item.
|
|
57
|
-
* @param {(value: any) => any} callback - The callback function.
|
|
58
|
-
* @returns {any[]} - The new data tree.
|
|
59
|
-
*/
|
|
60
|
-
export var mapTreeItem = function (tree, level, subItemsField, callback) {
|
|
61
|
-
var curData = tree;
|
|
62
|
-
var parentNodes = [];
|
|
63
|
-
for (var i = 0; i < level.length; i++) {
|
|
64
|
-
curData = curData[level[i]];
|
|
65
|
-
curData = Array.isArray(curData) ? curData : curData[subItemsField];
|
|
66
|
-
parentNodes.push(curData);
|
|
67
|
-
}
|
|
68
|
-
var parent = parentNodes.length > 1 ? parentNodes[parentNodes.length - 2] : tree;
|
|
69
|
-
var newItemIndex = level[level.length - 1];
|
|
70
|
-
var newItem = callback(parent[newItemIndex]);
|
|
71
|
-
parent.splice(newItemIndex, 1, newItem);
|
|
72
|
-
};
|
|
73
|
-
/**
|
|
74
|
-
* Similar to the `Object.assign` function. Additionally, creates a new array for the subitems.
|
|
75
|
-
*
|
|
76
|
-
* @param {object} item - The source data item.
|
|
77
|
-
* @param {string} subItemsField - The field which points to the subitems collection of each data item.
|
|
78
|
-
* @param {object} propsToExtend - The props with which the source data item will be extended.
|
|
79
|
-
* @returns {object} - The target data item.
|
|
80
|
-
*/
|
|
81
|
-
export var extendDataItem = function (item, subItemsField, propsToExtend) {
|
|
82
|
-
var _a;
|
|
83
|
-
return Object.assign({}, item, item[subItemsField] ? (_a = {}, _a[subItemsField] = item[subItemsField].slice(), _a) : {}, propsToExtend || {});
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* Returns the data item path in the tree based on the level parameter.
|
|
87
|
-
*
|
|
88
|
-
* @param {any[]} tree - The data tree.
|
|
89
|
-
* @param {number[]} level - The level of the target tree item.
|
|
90
|
-
* @param {string} subItemsField - The field which points to the subitems collection of each data item.
|
|
91
|
-
* @returns {any[]} - The path of the data item.
|
|
92
|
-
*/
|
|
93
|
-
export var getItemPath = function (tree, level, subItemsField) {
|
|
94
|
-
var nodes = [];
|
|
95
|
-
var itemLevel = __spreadArray([], level, true);
|
|
96
|
-
if (itemLevel.length) {
|
|
97
|
-
var element = tree[itemLevel.shift() || 0];
|
|
98
|
-
nodes.push(element);
|
|
99
|
-
while (itemLevel.length && subItemsField) {
|
|
100
|
-
element = element[subItemsField][itemLevel.shift() || 0];
|
|
101
|
-
nodes.push(element);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
return nodes;
|
|
105
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { TypographyProps } from './TypographyProps';
|
|
3
|
-
/**
|
|
4
|
-
* @hidden
|
|
5
|
-
*/
|
|
6
|
-
export interface TypographyHandle {
|
|
7
|
-
/**
|
|
8
|
-
* The TypographyHandle element.
|
|
9
|
-
*/
|
|
10
|
-
element: HTMLElement | null;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Represents the [KendoReact Typography component]({% slug overview_typography %}).
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```jsx
|
|
17
|
-
* const App = () => {
|
|
18
|
-
* return (
|
|
19
|
-
* <Typography.h2>Heading 2</Typography.h2>
|
|
20
|
-
* );
|
|
21
|
-
* };
|
|
22
|
-
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
export declare const Typography: {
|
|
26
|
-
h1: React.ForwardRefExoticComponent<TypographyProps>;
|
|
27
|
-
h2: React.ForwardRefExoticComponent<TypographyProps>;
|
|
28
|
-
h3: React.ForwardRefExoticComponent<TypographyProps>;
|
|
29
|
-
h4: React.ForwardRefExoticComponent<TypographyProps>;
|
|
30
|
-
h5: React.ForwardRefExoticComponent<TypographyProps>;
|
|
31
|
-
h6: React.ForwardRefExoticComponent<TypographyProps>;
|
|
32
|
-
p: React.ForwardRefExoticComponent<TypographyProps>;
|
|
33
|
-
code: React.ForwardRefExoticComponent<TypographyProps>;
|
|
34
|
-
pre: React.ForwardRefExoticComponent<TypographyProps>;
|
|
35
|
-
};
|
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import * as React from 'react';
|
|
24
|
-
import * as PropTypes from 'prop-types';
|
|
25
|
-
import { FONT_SIZE_CLASSES, FONT_WEIGHT_CLASSES, MARGIN_ENUM_CLASSES, MARGIN_ENUM_VALUES, MARGIN_SIDES_CLASSES, TEXT_ALIGN_CLASSES, TEXT_TRANSFORM_CLASSES, THEME_COLOR_CLASSES } from './constants';
|
|
26
|
-
/**
|
|
27
|
-
* @hidden
|
|
28
|
-
*/
|
|
29
|
-
var generateTypography = function (element) {
|
|
30
|
-
var component = React.forwardRef(function (props, ref) {
|
|
31
|
-
var id = props.id, style = props.style, className = props.className, fontSize = props.fontSize, fontWeight = props.fontWeight, textAlign = props.textAlign, textTransform = props.textTransform, themeColor = props.themeColor, margin = props.margin, others = __rest(props, ["id", "style", "className", "fontSize", "fontWeight", "textAlign", "textTransform", "themeColor", "margin"]);
|
|
32
|
-
var target = React.useRef(null);
|
|
33
|
-
var elementRef = React.useRef(null);
|
|
34
|
-
React.useImperativeHandle(target, function () { return ({
|
|
35
|
-
element: elementRef.current,
|
|
36
|
-
props: props
|
|
37
|
-
}); });
|
|
38
|
-
React.useImperativeHandle(ref, function () { return target.current; });
|
|
39
|
-
var defaultClass = function () {
|
|
40
|
-
var classMap = element === 'p' ? 'paragraph' : element;
|
|
41
|
-
return "k-".concat(classMap);
|
|
42
|
-
};
|
|
43
|
-
var Component = element;
|
|
44
|
-
var setMarginClassPerSide = function (marginSide, value) {
|
|
45
|
-
var val = typeof value === 'string' ? MARGIN_ENUM_VALUES[value] : value;
|
|
46
|
-
return "".concat(MARGIN_SIDES_CLASSES[marginSide]).concat(val);
|
|
47
|
-
};
|
|
48
|
-
var setMarginClasses = function () {
|
|
49
|
-
if (margin === undefined) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
if (typeof margin === 'string') {
|
|
53
|
-
return [MARGIN_ENUM_CLASSES[margin]];
|
|
54
|
-
}
|
|
55
|
-
// The the predefined Kendo classes are starting from 0 to 24.
|
|
56
|
-
if (typeof margin === 'number' && margin >= 0 && margin <= 24) {
|
|
57
|
-
return ["k-m-".concat(margin)];
|
|
58
|
-
}
|
|
59
|
-
if (typeof margin === 'object') {
|
|
60
|
-
var marginClassesList_1 = [];
|
|
61
|
-
Object.keys(margin).forEach(function (key) {
|
|
62
|
-
if (margin[key] !== null && margin[key] !== undefined) {
|
|
63
|
-
marginClassesList_1.push(setMarginClassPerSide(key, margin[key]));
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
var classes = marginClassesList_1.join(' ');
|
|
67
|
-
return classes;
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
var setTypographyClasses = function () {
|
|
71
|
-
var typographyArray = [
|
|
72
|
-
defaultClass(),
|
|
73
|
-
FONT_SIZE_CLASSES[fontSize],
|
|
74
|
-
FONT_WEIGHT_CLASSES[fontWeight],
|
|
75
|
-
TEXT_ALIGN_CLASSES[textAlign],
|
|
76
|
-
TEXT_TRANSFORM_CLASSES[textTransform],
|
|
77
|
-
THEME_COLOR_CLASSES[themeColor],
|
|
78
|
-
setMarginClasses(),
|
|
79
|
-
className
|
|
80
|
-
];
|
|
81
|
-
var typographyClasses = typographyArray.filter(function (n) { return n !== undefined; }).join(' ');
|
|
82
|
-
return typographyClasses;
|
|
83
|
-
};
|
|
84
|
-
return (React.createElement(Component, __assign({ id: id, ref: elementRef, className: setTypographyClasses(), style: style }, others), props.children));
|
|
85
|
-
});
|
|
86
|
-
component.propTypes = {
|
|
87
|
-
style: PropTypes.object,
|
|
88
|
-
className: PropTypes.string,
|
|
89
|
-
fontSize: PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge']),
|
|
90
|
-
fontWeight: PropTypes.oneOf(['light', 'normal', 'bold']),
|
|
91
|
-
margin: PropTypes.oneOfType([
|
|
92
|
-
PropTypes.number,
|
|
93
|
-
PropTypes.object,
|
|
94
|
-
PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge', 'thin', 'hair'])
|
|
95
|
-
]),
|
|
96
|
-
textAlign: PropTypes.oneOf(['left', 'right', 'center', 'justify']),
|
|
97
|
-
textTransform: PropTypes.oneOf(['lowercase', 'uppercase', 'capitalize']),
|
|
98
|
-
themeColor: PropTypes.oneOf([
|
|
99
|
-
'inherit', 'primary', 'secondary', 'tertiary',
|
|
100
|
-
'info', 'success', 'error', 'warning',
|
|
101
|
-
'dark', 'light', 'inverse'
|
|
102
|
-
])
|
|
103
|
-
};
|
|
104
|
-
component.displayName = "KendoReactTypography".concat(element.toUpperCase());
|
|
105
|
-
return component;
|
|
106
|
-
};
|
|
107
|
-
/**
|
|
108
|
-
* Represents [KendoReact Typography Heading1 component]({% slug overview_typography %}).
|
|
109
|
-
*
|
|
110
|
-
* @example
|
|
111
|
-
* ```jsx
|
|
112
|
-
* const App = () => {
|
|
113
|
-
* return (
|
|
114
|
-
* <Typography.h1>Heading 1</Typography.h1>
|
|
115
|
-
* );
|
|
116
|
-
* };
|
|
117
|
-
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
118
|
-
* ```
|
|
119
|
-
*/
|
|
120
|
-
var h1 = generateTypography('h1');
|
|
121
|
-
/**
|
|
122
|
-
* Represents [KendoReact Typography Heading2 component]({% slug overview_typography %}).
|
|
123
|
-
*
|
|
124
|
-
* @example
|
|
125
|
-
* ```jsx
|
|
126
|
-
* const App = () => {
|
|
127
|
-
* return (
|
|
128
|
-
* <Typography.h2>Heading 2</Typography.h2>
|
|
129
|
-
* );
|
|
130
|
-
* };
|
|
131
|
-
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
132
|
-
* ```
|
|
133
|
-
*/
|
|
134
|
-
var h2 = generateTypography('h2');
|
|
135
|
-
/**
|
|
136
|
-
* Represents [KendoReact Typography Heading3 component]({% slug overview_typography %}).
|
|
137
|
-
*
|
|
138
|
-
* @example
|
|
139
|
-
* ```jsx
|
|
140
|
-
* const App = () => {
|
|
141
|
-
* return (
|
|
142
|
-
* <Typography.h3>Heading 3</Typography.h3>
|
|
143
|
-
* );
|
|
144
|
-
* };
|
|
145
|
-
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
146
|
-
* ```
|
|
147
|
-
*/
|
|
148
|
-
var h3 = generateTypography('h3');
|
|
149
|
-
/**
|
|
150
|
-
* Represents [KendoReact Typography Heading4 component]({% slug overview_typography %}).
|
|
151
|
-
*
|
|
152
|
-
* @example
|
|
153
|
-
* ```jsx
|
|
154
|
-
* const App = () => {
|
|
155
|
-
* return (
|
|
156
|
-
* <Typography.h4>Heading 4</Typography.h4>
|
|
157
|
-
* );
|
|
158
|
-
* };
|
|
159
|
-
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
160
|
-
* ```
|
|
161
|
-
*/
|
|
162
|
-
var h4 = generateTypography('h4');
|
|
163
|
-
/**
|
|
164
|
-
* Represents [KendoReact Typography Heading5 component]({% slug overview_typography %}).
|
|
165
|
-
*
|
|
166
|
-
* @example
|
|
167
|
-
* ```jsx
|
|
168
|
-
* const App = () => {
|
|
169
|
-
* return (
|
|
170
|
-
* <Typography.h5>Heading 5</Typography.h5>
|
|
171
|
-
* );
|
|
172
|
-
* };
|
|
173
|
-
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
174
|
-
* ```
|
|
175
|
-
*/
|
|
176
|
-
var h5 = generateTypography('h5');
|
|
177
|
-
/**
|
|
178
|
-
* Represents [KendoReact Typography Heading6 component]({% slug overview_typography %}).
|
|
179
|
-
*
|
|
180
|
-
* @example
|
|
181
|
-
* ```jsx
|
|
182
|
-
* const App = () => {
|
|
183
|
-
* return (
|
|
184
|
-
* <Typography.h6>Heading 6</Typography.h6>
|
|
185
|
-
* );
|
|
186
|
-
* };
|
|
187
|
-
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
188
|
-
* ```
|
|
189
|
-
*/
|
|
190
|
-
var h6 = generateTypography('h6');
|
|
191
|
-
/**
|
|
192
|
-
* Represents [KendoReact Typography Paragraph component]({% slug overview_typography %}).
|
|
193
|
-
*
|
|
194
|
-
* @example
|
|
195
|
-
* ```jsx
|
|
196
|
-
* const App = () => {
|
|
197
|
-
* return (
|
|
198
|
-
* <Typography.p>I'm a paragraph text.</Typography.p>
|
|
199
|
-
* );
|
|
200
|
-
* };
|
|
201
|
-
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
202
|
-
* ```
|
|
203
|
-
*/
|
|
204
|
-
var p = generateTypography('p');
|
|
205
|
-
/**
|
|
206
|
-
* Represents [KendoReact Typography Code component]({% slug overview_typography %}).
|
|
207
|
-
* Use to create a single-line code snippet.
|
|
208
|
-
*
|
|
209
|
-
* @example
|
|
210
|
-
* ```jsx
|
|
211
|
-
* const App = () => {
|
|
212
|
-
* return (
|
|
213
|
-
* <Typography.code>code</Typography.code>
|
|
214
|
-
* );
|
|
215
|
-
* };
|
|
216
|
-
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
217
|
-
* ```
|
|
218
|
-
*/
|
|
219
|
-
var code = generateTypography('code');
|
|
220
|
-
/**
|
|
221
|
-
* Represents [KendoReact Typography Pre component]({% slug overview_typography %}).
|
|
222
|
-
* Used along with [KendoReact Typography Code component]({% slug overview_typography %}) to create multi-line code snippet.
|
|
223
|
-
*
|
|
224
|
-
* @example
|
|
225
|
-
* ```jsx
|
|
226
|
-
* const App = () => {
|
|
227
|
-
* return (
|
|
228
|
-
* <Typography.pre>
|
|
229
|
-
* <Typography.code dangerouslySetInnerHTML={{__html: `
|
|
230
|
-
* const handleChange = ({ target }) => {
|
|
231
|
-
* const { name, value } = target;
|
|
232
|
-
* const newData = Object.assign({}, data, { [name]: value });
|
|
233
|
-
* setData(newData);
|
|
234
|
-
* }
|
|
235
|
-
* `}} />
|
|
236
|
-
* </Typography.pre>
|
|
237
|
-
* );
|
|
238
|
-
* };
|
|
239
|
-
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
240
|
-
* ```
|
|
241
|
-
*/
|
|
242
|
-
var pre = generateTypography('pre');
|
|
243
|
-
/**
|
|
244
|
-
* Represents the [KendoReact Typography component]({% slug overview_typography %}).
|
|
245
|
-
*
|
|
246
|
-
* @example
|
|
247
|
-
* ```jsx
|
|
248
|
-
* const App = () => {
|
|
249
|
-
* return (
|
|
250
|
-
* <Typography.h2>Heading 2</Typography.h2>
|
|
251
|
-
* );
|
|
252
|
-
* };
|
|
253
|
-
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
254
|
-
* ```
|
|
255
|
-
*/
|
|
256
|
-
export var Typography = {
|
|
257
|
-
h1: h1,
|
|
258
|
-
h2: h2,
|
|
259
|
-
h3: h3,
|
|
260
|
-
h4: h4,
|
|
261
|
-
h5: h5,
|
|
262
|
-
h6: h6,
|
|
263
|
-
p: p,
|
|
264
|
-
code: code,
|
|
265
|
-
pre: pre
|
|
266
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @hidden
|
|
3
|
-
*/
|
|
4
|
-
export declare const FONT_SIZE_CLASSES: {
|
|
5
|
-
xsmall: string;
|
|
6
|
-
small: string;
|
|
7
|
-
medium: string;
|
|
8
|
-
large: string;
|
|
9
|
-
xlarge: string;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* @hidden
|
|
13
|
-
*/
|
|
14
|
-
export declare const FONT_WEIGHT_CLASSES: {
|
|
15
|
-
light: string;
|
|
16
|
-
normal: string;
|
|
17
|
-
bold: string;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* @hidden
|
|
21
|
-
*/
|
|
22
|
-
export declare const MARGIN_ENUM_CLASSES: {
|
|
23
|
-
xsmall: string;
|
|
24
|
-
small: string;
|
|
25
|
-
medium: string;
|
|
26
|
-
large: string;
|
|
27
|
-
xlarge: string;
|
|
28
|
-
thin: string;
|
|
29
|
-
hair: string;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* @hidden
|
|
33
|
-
*/
|
|
34
|
-
export declare const MARGIN_ENUM_VALUES: {
|
|
35
|
-
xsmall: string;
|
|
36
|
-
small: string;
|
|
37
|
-
medium: string;
|
|
38
|
-
large: string;
|
|
39
|
-
xlarge: string;
|
|
40
|
-
thin: string;
|
|
41
|
-
hair: string;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* @hidden
|
|
45
|
-
*/
|
|
46
|
-
export declare const MARGIN_SIDES_CLASSES: {
|
|
47
|
-
top: string;
|
|
48
|
-
right: string;
|
|
49
|
-
bottom: string;
|
|
50
|
-
left: string;
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* @hidden
|
|
54
|
-
*/
|
|
55
|
-
export declare const TEXT_ALIGN_CLASSES: {
|
|
56
|
-
left: string;
|
|
57
|
-
right: string;
|
|
58
|
-
center: string;
|
|
59
|
-
justify: string;
|
|
60
|
-
};
|
|
61
|
-
/**
|
|
62
|
-
* @hidden
|
|
63
|
-
*/
|
|
64
|
-
export declare const TEXT_TRANSFORM_CLASSES: {
|
|
65
|
-
lowercase: string;
|
|
66
|
-
uppercase: string;
|
|
67
|
-
capitalize: string;
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* @hidden
|
|
71
|
-
*/
|
|
72
|
-
export declare const THEME_COLOR_CLASSES: {
|
|
73
|
-
inherit: string;
|
|
74
|
-
primary: string;
|
|
75
|
-
secondary: string;
|
|
76
|
-
tertiary: string;
|
|
77
|
-
info: string;
|
|
78
|
-
success: string;
|
|
79
|
-
warning: string;
|
|
80
|
-
error: string;
|
|
81
|
-
dark: string;
|
|
82
|
-
light: string;
|
|
83
|
-
inverse: string;
|
|
84
|
-
};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @hidden
|
|
3
|
-
*/
|
|
4
|
-
export var FONT_SIZE_CLASSES = {
|
|
5
|
-
'xsmall': 'k-fs-xs',
|
|
6
|
-
'small': 'k-fs-sm',
|
|
7
|
-
'medium': 'k-fs-md',
|
|
8
|
-
'large': 'k-fs-lg',
|
|
9
|
-
'xlarge': 'k-fs-xl'
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* @hidden
|
|
13
|
-
*/
|
|
14
|
-
export var FONT_WEIGHT_CLASSES = {
|
|
15
|
-
'light': 'k-font-weight-light',
|
|
16
|
-
'normal': 'k-font-weight-normal',
|
|
17
|
-
'bold': 'k-font-weight-bold'
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* @hidden
|
|
21
|
-
*/
|
|
22
|
-
export var MARGIN_ENUM_CLASSES = {
|
|
23
|
-
'xsmall': 'k-m-xs',
|
|
24
|
-
'small': 'k-m-sm',
|
|
25
|
-
'medium': 'k-m-md',
|
|
26
|
-
'large': 'k-m-lg',
|
|
27
|
-
'xlarge': 'k-m-xl',
|
|
28
|
-
'thin': 'k-m-thin',
|
|
29
|
-
'hair': 'k-m-hair'
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* @hidden
|
|
33
|
-
*/
|
|
34
|
-
export var MARGIN_ENUM_VALUES = {
|
|
35
|
-
'xsmall': 'xs',
|
|
36
|
-
'small': 'sm',
|
|
37
|
-
'medium': 'md',
|
|
38
|
-
'large': 'lg',
|
|
39
|
-
'xlarge': 'xl',
|
|
40
|
-
'thin': 'thin',
|
|
41
|
-
'hair': 'hair'
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* @hidden
|
|
45
|
-
*/
|
|
46
|
-
export var MARGIN_SIDES_CLASSES = {
|
|
47
|
-
'top': 'k-mt-',
|
|
48
|
-
'right': 'k-mr-',
|
|
49
|
-
'bottom': 'k-mb-',
|
|
50
|
-
'left': 'k-ml-'
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* @hidden
|
|
54
|
-
*/
|
|
55
|
-
export var TEXT_ALIGN_CLASSES = {
|
|
56
|
-
'left': 'k-text-left',
|
|
57
|
-
'right': 'k-text-right',
|
|
58
|
-
'center': 'k-text-center',
|
|
59
|
-
'justify': 'k-text-justify'
|
|
60
|
-
};
|
|
61
|
-
/**
|
|
62
|
-
* @hidden
|
|
63
|
-
*/
|
|
64
|
-
export var TEXT_TRANSFORM_CLASSES = {
|
|
65
|
-
'lowercase': 'k-text-lowercase',
|
|
66
|
-
'uppercase': 'k-text-uppercase',
|
|
67
|
-
'capitalize': 'k-text-capitalize'
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* @hidden
|
|
71
|
-
*/
|
|
72
|
-
export var THEME_COLOR_CLASSES = {
|
|
73
|
-
'inherit': 'k-color-inherit',
|
|
74
|
-
'primary': 'k-color-primary',
|
|
75
|
-
'secondary': 'k-color-secondary',
|
|
76
|
-
'tertiary': 'k-color-tertiary',
|
|
77
|
-
'info': 'k-color-info',
|
|
78
|
-
'success': 'k-color-success',
|
|
79
|
-
'warning': 'k-color-warning',
|
|
80
|
-
'error': 'k-color-error',
|
|
81
|
-
'dark': 'k-color-dark',
|
|
82
|
-
'light': 'k-color-light',
|
|
83
|
-
'inverse': 'k-color-inverse'
|
|
84
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as licensing from '@progress/kendo-licensing';
|
|
2
|
-
var allowed = ['telerik.com', 'progress.com', 'stackblitz.io', 'csb.app'];
|
|
3
|
-
/**
|
|
4
|
-
* @hidden
|
|
5
|
-
*/
|
|
6
|
-
export function validatePackage(packageMetadata) {
|
|
7
|
-
if (typeof licensing !== 'undefined') {
|
|
8
|
-
licensing.validatePackage(packageMetadata);
|
|
9
|
-
}
|
|
10
|
-
else {
|
|
11
|
-
var message = "License activation failed for ".concat(packageMetadata.name, "\n");
|
|
12
|
-
message += 'The @progress/kendo-licensing script is not loaded.\n';
|
|
13
|
-
message += "See ".concat(packageMetadata.licensingDocsUrl, " for more information.\n");
|
|
14
|
-
console.warn(message);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* @hidden
|
|
19
|
-
*/
|
|
20
|
-
export function shouldShowValidationUI(packageMetadata) {
|
|
21
|
-
var skip = allowed.some(function (hostname) { var _a; return (_a = globalThis.document) === null || _a === void 0 ? void 0 : _a.location.hostname.endsWith(hostname); });
|
|
22
|
-
return !skip && !(licensing === null || licensing === void 0 ? void 0 : licensing.validatePackage(packageMetadata));
|
|
23
|
-
}
|