@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
package/dist/npm/navigation.js
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Navigation = exports.FOCUSABLE_ELEMENTS = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @hidden
|
|
6
|
-
*/
|
|
7
|
-
exports.FOCUSABLE_ELEMENTS = [
|
|
8
|
-
'input:not([disabled]):not([type=hidden])',
|
|
9
|
-
'select:not([disabled])',
|
|
10
|
-
'textarea:not([disabled])',
|
|
11
|
-
'button:not([disabled])',
|
|
12
|
-
'a[href]',
|
|
13
|
-
'area[href]',
|
|
14
|
-
'summary',
|
|
15
|
-
'iframe',
|
|
16
|
-
'object',
|
|
17
|
-
'embed',
|
|
18
|
-
'audio[controls]',
|
|
19
|
-
'video[controls]',
|
|
20
|
-
'[contenteditable]'
|
|
21
|
-
];
|
|
22
|
-
/**
|
|
23
|
-
* Represents the [KendoReact Navigation functionality]({% slug overview_navigation %}).
|
|
24
|
-
* It handles the navigation through a collection of DOM elements.
|
|
25
|
-
*/
|
|
26
|
-
var Navigation = /** @class */ (function () {
|
|
27
|
-
function Navigation(options) {
|
|
28
|
-
var _this = this;
|
|
29
|
-
/**
|
|
30
|
-
* @hidden
|
|
31
|
-
*/
|
|
32
|
-
this.rovingTabIndex = true;
|
|
33
|
-
/**
|
|
34
|
-
* @hidden
|
|
35
|
-
*/
|
|
36
|
-
this.update = function () { };
|
|
37
|
-
this.focusNextIndex = function (target, indexDiff) {
|
|
38
|
-
var all = _this.elements;
|
|
39
|
-
var index = all.indexOf(target) + indexDiff;
|
|
40
|
-
index = index < 0 ? all.length - 1 : index;
|
|
41
|
-
var next = all[index % all.length];
|
|
42
|
-
_this.focusElement(next, target);
|
|
43
|
-
return next;
|
|
44
|
-
};
|
|
45
|
-
this.tabIndex = options.tabIndex || 0;
|
|
46
|
-
this.root = options.root;
|
|
47
|
-
this.selectors = options.selectors;
|
|
48
|
-
this.focusOptions = options.focusOptions || { preventScroll: true };
|
|
49
|
-
this.rovingTabIndex = options.rovingTabIndex !== undefined ? options.rovingTabIndex : true;
|
|
50
|
-
this.mouseEvents = options.mouseEvents || {};
|
|
51
|
-
this.keyboardEvents = options.keyboardEvents || {};
|
|
52
|
-
}
|
|
53
|
-
Object.defineProperty(Navigation.prototype, "elements", {
|
|
54
|
-
/**
|
|
55
|
-
* Returns the collection of DOM elements which the module will navigate in.
|
|
56
|
-
*/
|
|
57
|
-
get: function () {
|
|
58
|
-
return this.root.current ? Array.from(this.root.current.querySelectorAll(this.selectors.join(','))) : [];
|
|
59
|
-
},
|
|
60
|
-
enumerable: false,
|
|
61
|
-
configurable: true
|
|
62
|
-
});
|
|
63
|
-
Object.defineProperty(Navigation.prototype, "first", {
|
|
64
|
-
/**
|
|
65
|
-
* Returns the first navigation DOM element.
|
|
66
|
-
*/
|
|
67
|
-
get: function () {
|
|
68
|
-
return (this.root.current && this.root.current.querySelector(this.selectors.join(','))) || null;
|
|
69
|
-
},
|
|
70
|
-
enumerable: false,
|
|
71
|
-
configurable: true
|
|
72
|
-
});
|
|
73
|
-
Object.defineProperty(Navigation.prototype, "last", {
|
|
74
|
-
/**
|
|
75
|
-
* Returns the last navigation DOM element.
|
|
76
|
-
*/
|
|
77
|
-
get: function () {
|
|
78
|
-
var all = this.elements;
|
|
79
|
-
return all[all.length - 1] || null;
|
|
80
|
-
},
|
|
81
|
-
enumerable: false,
|
|
82
|
-
configurable: true
|
|
83
|
-
});
|
|
84
|
-
Object.defineProperty(Navigation.prototype, "current", {
|
|
85
|
-
/**
|
|
86
|
-
* Returns the focused DOM element from the navigation collection of DOM elements.
|
|
87
|
-
*/
|
|
88
|
-
get: function () {
|
|
89
|
-
return this.elements.find(function (el) { return el.matches(':focus'); }) || null;
|
|
90
|
-
},
|
|
91
|
-
enumerable: false,
|
|
92
|
-
configurable: true
|
|
93
|
-
});
|
|
94
|
-
/**
|
|
95
|
-
* Focuses the next element from the navigation collection of DOM elements.
|
|
96
|
-
*/
|
|
97
|
-
Navigation.prototype.focusNext = function (target) {
|
|
98
|
-
return this.focusNextIndex(target, 1);
|
|
99
|
-
};
|
|
100
|
-
/**
|
|
101
|
-
* Focuses the previous element from the navigation collection of DOM elements.
|
|
102
|
-
*/
|
|
103
|
-
Navigation.prototype.focusPrevious = function (target) {
|
|
104
|
-
return this.focusNextIndex(target, -1);
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* The keyboard events handler.
|
|
108
|
-
*/
|
|
109
|
-
Navigation.prototype.triggerKeyboardEvent = function (ev, options) {
|
|
110
|
-
var target = ev.target instanceof Element && ev.target.closest(this.selectors.join(','));
|
|
111
|
-
var key = ev.key === ' ' ? 'Space' : ev.key;
|
|
112
|
-
var eventType = ev.nativeEvent.type;
|
|
113
|
-
if (target && this.keyboardEvents[eventType][key]) {
|
|
114
|
-
this.keyboardEvents[eventType][key].call(undefined, target, this, ev, options);
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
/**
|
|
118
|
-
* The mouse events handler.
|
|
119
|
-
*/
|
|
120
|
-
Navigation.prototype.triggerMouseEvent = function (ev) {
|
|
121
|
-
var target = ev.target instanceof Element && ev.target.closest(this.selectors.join(','));
|
|
122
|
-
var eventType = ev.nativeEvent.type;
|
|
123
|
-
if (target) {
|
|
124
|
-
this.mouseEvents[eventType].call(undefined, target, this, ev);
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
/**
|
|
128
|
-
* Focuses the passed element from the navigation collection of DOM elements.
|
|
129
|
-
*/
|
|
130
|
-
Navigation.prototype.focusElement = function (element, previous) {
|
|
131
|
-
if (element) {
|
|
132
|
-
if (previous) {
|
|
133
|
-
if (this.rovingTabIndex) {
|
|
134
|
-
previous.removeAttribute('tabindex');
|
|
135
|
-
}
|
|
136
|
-
previous.classList.remove('k-focus');
|
|
137
|
-
}
|
|
138
|
-
if (this.rovingTabIndex) {
|
|
139
|
-
element.setAttribute('tabindex', String(this.tabIndex));
|
|
140
|
-
}
|
|
141
|
-
element.focus(this.focusOptions);
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
return Navigation;
|
|
145
|
-
}());
|
|
146
|
-
exports.Navigation = Navigation;
|
|
147
|
-
;
|
package/dist/npm/noop.d.ts
DELETED
package/dist/npm/noop.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setScrollbarWidth = exports.getScrollbarWidth = void 0;
|
|
4
|
-
var browser_support_service_1 = require("./browser-support.service");
|
|
5
|
-
var canUseDOM_1 = require("./canUseDOM");
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
var getScrollbarWidth = function () {
|
|
10
|
-
if (!canUseDOM_1.canUseDOM || !document.body) {
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
var scrollbarWidth = new browser_support_service_1.BrowserSupportService().scrollbarWidth;
|
|
14
|
-
return scrollbarWidth;
|
|
15
|
-
};
|
|
16
|
-
exports.getScrollbarWidth = getScrollbarWidth;
|
|
17
|
-
/**
|
|
18
|
-
* @hidden
|
|
19
|
-
*/
|
|
20
|
-
var setScrollbarWidth = function () {
|
|
21
|
-
if (!canUseDOM_1.canUseDOM || !document.body) {
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
var scrollbarWidth = new browser_support_service_1.BrowserSupportService().scrollbarWidth;
|
|
25
|
-
document.body.style.setProperty('--kendo-scrollbar-width', "".concat(scrollbarWidth, "px"));
|
|
26
|
-
};
|
|
27
|
-
exports.setScrollbarWidth = setScrollbarWidth;
|
package/dist/npm/setter.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setter = void 0;
|
|
4
|
-
var fieldList_1 = require("./fieldList");
|
|
5
|
-
var setterCache = {};
|
|
6
|
-
setterCache.undefined = function (obj) { return obj; };
|
|
7
|
-
var defaultValue = function (nextField, options) {
|
|
8
|
-
return options && options.arrays && !isNaN(Number(nextField)) ? [] : {};
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Can be used for setting value to object using field path. For example `users[index].name`.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```jsx-no-run
|
|
15
|
-
* const values = {users:[{lastName: 'Doe'}]};
|
|
16
|
-
* const firstUserFirstName = setter('user[0].firstName');
|
|
17
|
-
*
|
|
18
|
-
* firstUserFirstName(values, 'John');
|
|
19
|
-
*
|
|
20
|
-
* console.log(values)
|
|
21
|
-
*
|
|
22
|
-
* // result: {users:[{firstName: 'John', lastName: 'Doe'}]}
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
function setter(field) {
|
|
26
|
-
if (setterCache[field]) {
|
|
27
|
-
return setterCache[field];
|
|
28
|
-
}
|
|
29
|
-
var fields = (0, fieldList_1.fieldList)(field);
|
|
30
|
-
setterCache[field] = function (obj, value, options) {
|
|
31
|
-
var root = obj;
|
|
32
|
-
var depth = fields.length - 1;
|
|
33
|
-
for (var idx = 0; idx < depth && root; idx++) {
|
|
34
|
-
root = root[fields[idx]] = root[fields[idx]] || defaultValue(fields[idx + 1], options);
|
|
35
|
-
}
|
|
36
|
-
root[fields[depth]] = value;
|
|
37
|
-
};
|
|
38
|
-
return setterCache[field];
|
|
39
|
-
}
|
|
40
|
-
exports.setter = setter;
|
package/dist/npm/theme.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** @hidden */
|
|
2
|
-
export interface KendoThemeMaps {
|
|
3
|
-
sizeMap: Record<Exclude<any, null>, String>;
|
|
4
|
-
roundedMap: Record<Exclude<any, null>, String>;
|
|
5
|
-
orientationMap: Record<Exclude<any, null>, String>;
|
|
6
|
-
}
|
|
7
|
-
/** @hidden */
|
|
8
|
-
export declare const kendoThemeMaps: KendoThemeMaps;
|
package/dist/npm/theme.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.kendoThemeMaps = void 0;
|
|
4
|
-
/** @hidden */
|
|
5
|
-
exports.kendoThemeMaps = {
|
|
6
|
-
sizeMap: {
|
|
7
|
-
small: 'sm',
|
|
8
|
-
medium: 'md',
|
|
9
|
-
large: 'lg'
|
|
10
|
-
},
|
|
11
|
-
roundedMap: {
|
|
12
|
-
small: 'sm',
|
|
13
|
-
medium: 'md',
|
|
14
|
-
large: 'lg'
|
|
15
|
-
},
|
|
16
|
-
orientationMap: {
|
|
17
|
-
vertical: 'vstack',
|
|
18
|
-
horizontal: 'hstack'
|
|
19
|
-
}
|
|
20
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @hidden
|
|
3
|
-
*/
|
|
4
|
-
export declare class TreeFieldsService {
|
|
5
|
-
focusIdField: string | undefined;
|
|
6
|
-
private expandField;
|
|
7
|
-
private selectField;
|
|
8
|
-
private childrenField;
|
|
9
|
-
private hasChildrenField;
|
|
10
|
-
private textField;
|
|
11
|
-
private disableField;
|
|
12
|
-
private checkField;
|
|
13
|
-
private checkIndeterminateField;
|
|
14
|
-
constructor(treeViewProps: any);
|
|
15
|
-
expanded(item: any): boolean | undefined;
|
|
16
|
-
selected(item: any): boolean | undefined;
|
|
17
|
-
text(item: any): string | undefined;
|
|
18
|
-
disabled(item: any): boolean | undefined;
|
|
19
|
-
hasChildren(item: any): boolean | undefined;
|
|
20
|
-
children(item: any): any[];
|
|
21
|
-
checked(item: any): boolean | undefined;
|
|
22
|
-
checkIndeterminate(item: any): boolean | undefined;
|
|
23
|
-
focusId(item: any): any;
|
|
24
|
-
getChildrenField(): string;
|
|
25
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TreeFieldsService = void 0;
|
|
4
|
-
var misc_1 = require("./misc");
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
var TreeFieldsService = /** @class */ (function () {
|
|
9
|
-
function TreeFieldsService(treeViewProps) {
|
|
10
|
-
this.expandField = treeViewProps.expandField;
|
|
11
|
-
this.selectField = treeViewProps.selectField;
|
|
12
|
-
this.hasChildrenField = treeViewProps.hasChildrenField;
|
|
13
|
-
this.childrenField = treeViewProps.childrenField;
|
|
14
|
-
this.textField = treeViewProps.textField;
|
|
15
|
-
this.disableField = treeViewProps.disableField;
|
|
16
|
-
this.checkField = treeViewProps.checkField;
|
|
17
|
-
this.checkIndeterminateField = treeViewProps.checkIndeterminateField;
|
|
18
|
-
this.focusIdField = treeViewProps.focusIdField;
|
|
19
|
-
}
|
|
20
|
-
TreeFieldsService.prototype.expanded = function (item) {
|
|
21
|
-
return (0, misc_1.getNestedValue)(this.expandField, item);
|
|
22
|
-
};
|
|
23
|
-
TreeFieldsService.prototype.selected = function (item) {
|
|
24
|
-
return (0, misc_1.getNestedValue)(this.selectField, item);
|
|
25
|
-
};
|
|
26
|
-
TreeFieldsService.prototype.text = function (item) {
|
|
27
|
-
return (0, misc_1.getNestedValue)(this.textField, item);
|
|
28
|
-
};
|
|
29
|
-
TreeFieldsService.prototype.disabled = function (item) {
|
|
30
|
-
return (0, misc_1.getNestedValue)(this.disableField, item);
|
|
31
|
-
};
|
|
32
|
-
TreeFieldsService.prototype.hasChildren = function (item) {
|
|
33
|
-
return (0, misc_1.getNestedValue)(this.hasChildrenField, item);
|
|
34
|
-
};
|
|
35
|
-
TreeFieldsService.prototype.children = function (item) {
|
|
36
|
-
var children = (0, misc_1.getNestedValue)(this.childrenField, item);
|
|
37
|
-
return children ? children : [];
|
|
38
|
-
};
|
|
39
|
-
TreeFieldsService.prototype.checked = function (item) {
|
|
40
|
-
return (0, misc_1.getNestedValue)(this.checkField, item);
|
|
41
|
-
};
|
|
42
|
-
TreeFieldsService.prototype.checkIndeterminate = function (item) {
|
|
43
|
-
return (0, misc_1.getNestedValue)(this.checkIndeterminateField, item);
|
|
44
|
-
};
|
|
45
|
-
TreeFieldsService.prototype.focusId = function (item) {
|
|
46
|
-
return this.focusIdField && (0, misc_1.getNestedValue)(this.focusIdField, item);
|
|
47
|
-
};
|
|
48
|
-
TreeFieldsService.prototype.getChildrenField = function () {
|
|
49
|
-
return this.childrenField;
|
|
50
|
-
};
|
|
51
|
-
return TreeFieldsService;
|
|
52
|
-
}());
|
|
53
|
-
exports.TreeFieldsService = TreeFieldsService;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SortedPublicItemIds = void 0;
|
|
4
|
-
var PROPS_COUNT_LIMIT = 50000;
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
// An alternative is to use array.sort() and
|
|
9
|
-
// implement a binary search function.
|
|
10
|
-
var SortedPublicItemIds = /** @class */ (function () {
|
|
11
|
-
function SortedPublicItemIds() {
|
|
12
|
-
this.objects = [];
|
|
13
|
-
}
|
|
14
|
-
SortedPublicItemIds.prototype.init = function (publicItemIds) {
|
|
15
|
-
var currentObj;
|
|
16
|
-
for (var i = 0; i < publicItemIds.length; i++) {
|
|
17
|
-
if (i % PROPS_COUNT_LIMIT === 0) {
|
|
18
|
-
currentObj = {};
|
|
19
|
-
this.objects.push(currentObj);
|
|
20
|
-
}
|
|
21
|
-
currentObj[publicItemIds[i]] = true;
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
SortedPublicItemIds.prototype.hasId = function (publicItemId) {
|
|
25
|
-
return this.objects.some(function (obj) { return obj[publicItemId]; });
|
|
26
|
-
};
|
|
27
|
-
return SortedPublicItemIds;
|
|
28
|
-
}());
|
|
29
|
-
exports.SortedPublicItemIds = SortedPublicItemIds;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @hidden
|
|
3
|
-
*/
|
|
4
|
-
export declare const EMPTY_ID = "";
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export declare const ZERO_LEVEL_ZERO_NODE_ID = "0";
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
export declare const SEPARATOR = "_";
|
|
13
|
-
/**
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
16
|
-
export declare function getItemById(itemId: string, items: any, childrenField: string): any;
|
|
17
|
-
/**
|
|
18
|
-
* @hidden
|
|
19
|
-
*/
|
|
20
|
-
export declare function getRootParentId(itemId: string): string;
|
|
21
|
-
/**
|
|
22
|
-
* @hidden
|
|
23
|
-
*/
|
|
24
|
-
export declare function getIdWithoutRootParentId(itemId: string): string;
|
|
25
|
-
/**
|
|
26
|
-
* @hidden
|
|
27
|
-
*/
|
|
28
|
-
export declare function getFirstChildId(itemId: string): string;
|
|
29
|
-
/**
|
|
30
|
-
* @hidden
|
|
31
|
-
*/
|
|
32
|
-
export declare function createId(childId: string | number, parentId?: string): string;
|
|
33
|
-
/**
|
|
34
|
-
* @hidden
|
|
35
|
-
*/
|
|
36
|
-
export declare function getDirectParentId(itemId: string): string;
|
|
37
|
-
/**
|
|
38
|
-
* @hidden
|
|
39
|
-
*/
|
|
40
|
-
export declare function isIdEmptyOrZeroLevel(itemId: string): boolean;
|
|
41
|
-
/**
|
|
42
|
-
* @hidden
|
|
43
|
-
*/
|
|
44
|
-
export declare function isIdZeroLevel(itemId: string): boolean;
|
|
45
|
-
/**
|
|
46
|
-
* @hidden
|
|
47
|
-
*/
|
|
48
|
-
export declare function getAllShortIds(itemId: string): string[];
|
|
49
|
-
/**
|
|
50
|
-
* @hidden
|
|
51
|
-
*/
|
|
52
|
-
export declare function getShortId(itemId: string): string;
|
|
53
|
-
/**
|
|
54
|
-
* @hidden
|
|
55
|
-
*/
|
|
56
|
-
export declare function isItemFirstFromSiblings(itemId: string): boolean;
|
|
57
|
-
/**
|
|
58
|
-
* @hidden
|
|
59
|
-
*/
|
|
60
|
-
export declare function getDecrementedItemIdAfterRemoval(removedItemId: string, itemId: string): string;
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDecrementedItemIdAfterRemoval = exports.isItemFirstFromSiblings = exports.getShortId = exports.getAllShortIds = exports.isIdZeroLevel = exports.isIdEmptyOrZeroLevel = exports.getDirectParentId = exports.createId = exports.getFirstChildId = exports.getIdWithoutRootParentId = exports.getRootParentId = exports.getItemById = exports.SEPARATOR = exports.ZERO_LEVEL_ZERO_NODE_ID = exports.EMPTY_ID = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @hidden
|
|
6
|
-
*/
|
|
7
|
-
exports.EMPTY_ID = '';
|
|
8
|
-
/**
|
|
9
|
-
* @hidden
|
|
10
|
-
*/
|
|
11
|
-
exports.ZERO_LEVEL_ZERO_NODE_ID = '0';
|
|
12
|
-
/**
|
|
13
|
-
* @hidden
|
|
14
|
-
*/
|
|
15
|
-
exports.SEPARATOR = '_';
|
|
16
|
-
/**
|
|
17
|
-
* @hidden
|
|
18
|
-
*/
|
|
19
|
-
function getItemById(itemId, items, childrenField) {
|
|
20
|
-
if (isIdZeroLevel(itemId)) {
|
|
21
|
-
return items[Number(itemId)];
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
var rootParentItem = items[Number(getRootParentId(itemId))];
|
|
25
|
-
var subItems = (rootParentItem && rootParentItem[childrenField]) || [];
|
|
26
|
-
return subItems.length ?
|
|
27
|
-
getItemById(getIdWithoutRootParentId(itemId), subItems, childrenField) : undefined;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.getItemById = getItemById;
|
|
31
|
-
/**
|
|
32
|
-
* @hidden
|
|
33
|
-
*/
|
|
34
|
-
function getRootParentId(itemId) {
|
|
35
|
-
return isIdEmptyOrZeroLevel(itemId) ? itemId : itemId.split(exports.SEPARATOR)[0];
|
|
36
|
-
}
|
|
37
|
-
exports.getRootParentId = getRootParentId;
|
|
38
|
-
/**
|
|
39
|
-
* @hidden
|
|
40
|
-
*/
|
|
41
|
-
function getIdWithoutRootParentId(itemId) {
|
|
42
|
-
if (isIdEmptyOrZeroLevel(itemId)) {
|
|
43
|
-
return itemId;
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
var firstSeparatorIndex = itemId.indexOf(exports.SEPARATOR);
|
|
47
|
-
return itemId.substring(firstSeparatorIndex + 1);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
exports.getIdWithoutRootParentId = getIdWithoutRootParentId;
|
|
51
|
-
/**
|
|
52
|
-
* @hidden
|
|
53
|
-
*/
|
|
54
|
-
function getFirstChildId(itemId) {
|
|
55
|
-
return createId('0', itemId);
|
|
56
|
-
}
|
|
57
|
-
exports.getFirstChildId = getFirstChildId;
|
|
58
|
-
/**
|
|
59
|
-
* @hidden
|
|
60
|
-
*/
|
|
61
|
-
function createId(childId, parentId) {
|
|
62
|
-
childId = childId.toString();
|
|
63
|
-
return parentId ? parentId + exports.SEPARATOR + childId : childId;
|
|
64
|
-
}
|
|
65
|
-
exports.createId = createId;
|
|
66
|
-
/**
|
|
67
|
-
* @hidden
|
|
68
|
-
*/
|
|
69
|
-
function getDirectParentId(itemId) {
|
|
70
|
-
var lastSeparatorIndex = itemId.lastIndexOf(exports.SEPARATOR);
|
|
71
|
-
return lastSeparatorIndex < 0 ? exports.EMPTY_ID : itemId.substring(0, lastSeparatorIndex);
|
|
72
|
-
}
|
|
73
|
-
exports.getDirectParentId = getDirectParentId;
|
|
74
|
-
/**
|
|
75
|
-
* @hidden
|
|
76
|
-
*/
|
|
77
|
-
function isIdEmptyOrZeroLevel(itemId) {
|
|
78
|
-
return itemId === exports.EMPTY_ID || itemId.indexOf(exports.SEPARATOR) < 0;
|
|
79
|
-
}
|
|
80
|
-
exports.isIdEmptyOrZeroLevel = isIdEmptyOrZeroLevel;
|
|
81
|
-
/**
|
|
82
|
-
* @hidden
|
|
83
|
-
*/
|
|
84
|
-
function isIdZeroLevel(itemId) {
|
|
85
|
-
return itemId !== exports.EMPTY_ID && itemId.indexOf(exports.SEPARATOR) < 0;
|
|
86
|
-
}
|
|
87
|
-
exports.isIdZeroLevel = isIdZeroLevel;
|
|
88
|
-
/**
|
|
89
|
-
* @hidden
|
|
90
|
-
*/
|
|
91
|
-
function getAllShortIds(itemId) {
|
|
92
|
-
return itemId.split(exports.SEPARATOR);
|
|
93
|
-
}
|
|
94
|
-
exports.getAllShortIds = getAllShortIds;
|
|
95
|
-
/**
|
|
96
|
-
* @hidden
|
|
97
|
-
*/
|
|
98
|
-
function getShortId(itemId) {
|
|
99
|
-
var lastSeparatorIndex = itemId.lastIndexOf(exports.SEPARATOR);
|
|
100
|
-
return lastSeparatorIndex < 0 ? itemId : itemId.substring(lastSeparatorIndex + 1);
|
|
101
|
-
}
|
|
102
|
-
exports.getShortId = getShortId;
|
|
103
|
-
/**
|
|
104
|
-
* @hidden
|
|
105
|
-
*/
|
|
106
|
-
function isItemFirstFromSiblings(itemId) {
|
|
107
|
-
return getShortId(itemId) === exports.ZERO_LEVEL_ZERO_NODE_ID;
|
|
108
|
-
}
|
|
109
|
-
exports.isItemFirstFromSiblings = isItemFirstFromSiblings;
|
|
110
|
-
/**
|
|
111
|
-
* @hidden
|
|
112
|
-
*/
|
|
113
|
-
function getDecrementedItemIdAfterRemoval(removedItemId, itemId) {
|
|
114
|
-
var preservedItemId = itemId;
|
|
115
|
-
removedItemId = 'r' + exports.SEPARATOR + removedItemId;
|
|
116
|
-
itemId = 'r' + exports.SEPARATOR + itemId;
|
|
117
|
-
var itemSharedPath = getDirectParentId(removedItemId) + exports.SEPARATOR;
|
|
118
|
-
if (itemId.startsWith(itemSharedPath)) {
|
|
119
|
-
var itemNotSharedPath = itemId.substring(itemSharedPath.length);
|
|
120
|
-
if (itemNotSharedPath) {
|
|
121
|
-
var siblingShortId = getRootParentId(itemNotSharedPath);
|
|
122
|
-
if (Number(getShortId(removedItemId)) < Number(siblingShortId)) {
|
|
123
|
-
var decrementedId = itemSharedPath +
|
|
124
|
-
(Number(siblingShortId) - 1).toString() +
|
|
125
|
-
itemNotSharedPath.substring(siblingShortId.length);
|
|
126
|
-
return getIdWithoutRootParentId(decrementedId);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
return preservedItemId;
|
|
131
|
-
}
|
|
132
|
-
exports.getDecrementedItemIdAfterRemoval = getDecrementedItemIdAfterRemoval;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { TreeFieldsService } from './FieldsService';
|
|
2
|
-
/**
|
|
3
|
-
* @hidden
|
|
4
|
-
*/
|
|
5
|
-
export declare function hasChildren(item: any, childrenField: string): boolean;
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
export declare function isItemExpandedAndWithChildren(item: any, fieldsSvc: TreeFieldsService): boolean | undefined;
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
export declare function resolveItemId(publicId: any, idField: string, items: any[], childrenField: string): string | undefined;
|
|
14
|
-
/**
|
|
15
|
-
* @hidden
|
|
16
|
-
*/
|
|
17
|
-
export declare function resolveItemsIds(publicIds: any[], idField: string, items: any[], childrenField: string): string[];
|
|
18
|
-
/**
|
|
19
|
-
* @hidden
|
|
20
|
-
*/
|
|
21
|
-
export declare function updateItem(items: any[], itemId: string, update: (item: any) => void, cloneField: string, childrenField: string): any[];
|
|
22
|
-
/**
|
|
23
|
-
* @hidden
|
|
24
|
-
*/
|
|
25
|
-
export declare function isEnabledAndAllParentsEnabled(itemId: string, items: any, fieldsSvc: TreeFieldsService): any;
|
|
26
|
-
/**
|
|
27
|
-
* @hidden
|
|
28
|
-
*/
|
|
29
|
-
export declare function getAllDirectIndirectChildrenIds(item: any, itemId: string, childrenField: string, idField: string | undefined): any[];
|
|
30
|
-
/**
|
|
31
|
-
* @hidden
|
|
32
|
-
*/
|
|
33
|
-
export declare function areAllDirectChildrenChecked(item: any, itemId: any, idField: string | undefined, childrenField: string, check: string[]): boolean;
|
|
34
|
-
/**
|
|
35
|
-
* @hidden
|
|
36
|
-
*/
|
|
37
|
-
export declare function getAllParents(itemId: string, childrenField: string, items: any[]): any[];
|
|
38
|
-
/**
|
|
39
|
-
* @hidden
|
|
40
|
-
*/
|
|
41
|
-
export declare function removeItem(itemId: string, childrenField: string, items: any[]): any[];
|
|
42
|
-
/**
|
|
43
|
-
* @hidden
|
|
44
|
-
*/
|
|
45
|
-
export declare function addItem(item: any, operation: 'before' | 'after' | 'child', childrenField: string, targetItemId: string, items: any[]): any[];
|