@progress/kendo-react-common 7.2.4-develop.2 → 7.2.4-develop.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/Draggable.js +8 -0
  2. package/Draggable.mjs +79 -0
  3. package/Droppable.js +8 -0
  4. package/Droppable.mjs +64 -0
  5. package/FormComponent.js +8 -0
  6. package/FormComponent.mjs +13 -0
  7. package/browser-support.service.js +8 -0
  8. package/browser-support.service.mjs +25 -0
  9. package/canUseDOM.js +8 -0
  10. package/canUseDOM.mjs +13 -0
  11. package/canUseRef.js +8 -0
  12. package/canUseRef.mjs +15 -0
  13. package/classNames.js +8 -0
  14. package/classNames.mjs +17 -0
  15. package/clone.js +8 -0
  16. package/clone.mjs +44 -0
  17. package/constants/index.js +8 -0
  18. package/constants/index.mjs +12 -0
  19. package/contexts/ZIndexContext.js +8 -0
  20. package/contexts/ZIndexContext.mjs +15 -0
  21. package/dist/cdn/js/kendo-react-common.js +8 -5
  22. package/drag-n-drop/context/index.js +8 -0
  23. package/drag-n-drop/context/index.mjs +23 -0
  24. package/drag-n-drop/index.js +8 -0
  25. package/drag-n-drop/index.mjs +46 -0
  26. package/events/dispatchEvent.js +8 -0
  27. package/events/dispatchEvent.mjs +21 -0
  28. package/fieldList.js +8 -0
  29. package/fieldList.mjs +18 -0
  30. package/getActiveElement.js +8 -0
  31. package/getActiveElement.mjs +19 -0
  32. package/getTabIndex.js +8 -0
  33. package/getTabIndex.mjs +16 -0
  34. package/getter.js +8 -0
  35. package/getter.mjs +26 -0
  36. package/guid.js +8 -0
  37. package/guid.mjs +17 -0
  38. package/hasRelativeStackingContext.js +8 -0
  39. package/hasRelativeStackingContext.mjs +25 -0
  40. package/hocs/AsyncFocusBlur.js +8 -0
  41. package/hocs/AsyncFocusBlur.mjs +23 -0
  42. package/hocs/use-id-hoc.js +8 -0
  43. package/hocs/use-id-hoc.mjs +17 -0
  44. package/hocs/withPropsContext.js +8 -0
  45. package/hocs/withPropsContext.mjs +18 -0
  46. package/hooks/use-id.js +8 -0
  47. package/hooks/use-id.mjs +35 -0
  48. package/hooks/use-isomorphic-layout-effect.js +8 -0
  49. package/hooks/use-isomorphic-layout-effect.mjs +13 -0
  50. package/hooks/useAsyncFocusBlur.js +8 -0
  51. package/hooks/useAsyncFocusBlur.mjs +38 -0
  52. package/hooks/useCollection.js +8 -0
  53. package/hooks/useCollection.mjs +32 -0
  54. package/hooks/useControlledState.js +8 -0
  55. package/hooks/useControlledState.mjs +21 -0
  56. package/hooks/useCustomComponent.js +8 -0
  57. package/hooks/useCustomComponent.mjs +22 -0
  58. package/hooks/useDir.js +8 -0
  59. package/hooks/useDir.mjs +24 -0
  60. package/hooks/useDocument.js +8 -0
  61. package/hooks/useDocument.mjs +22 -0
  62. package/hooks/useDraggable.js +8 -0
  63. package/hooks/useDraggable.mjs +308 -0
  64. package/hooks/useDroppable.js +8 -0
  65. package/hooks/useDroppable.mjs +67 -0
  66. package/hooks/useInheritedState.js +8 -0
  67. package/hooks/useInheritedState.mjs +21 -0
  68. package/hooks/useMouse.js +8 -0
  69. package/hooks/useMouse.mjs +98 -0
  70. package/hooks/usePropsContext.js +8 -0
  71. package/hooks/usePropsContext.mjs +13 -0
  72. package/hooks/useRtl.js +8 -0
  73. package/hooks/useRtl.mjs +24 -0
  74. package/hooks/useWindow.js +8 -0
  75. package/hooks/useWindow.mjs +20 -0
  76. package/icons/Icon.js +8 -0
  77. package/icons/Icon.mjs +92 -0
  78. package/icons/IconWrap.js +8 -0
  79. package/icons/IconWrap.mjs +24 -0
  80. package/icons/IconsContext.js +8 -0
  81. package/icons/IconsContext.mjs +14 -0
  82. package/icons/SvgIcon.js +8 -0
  83. package/icons/SvgIcon.mjs +124 -0
  84. package/icons/constants.js +8 -0
  85. package/icons/constants.mjs +21 -0
  86. package/icons/utils.js +8 -0
  87. package/icons/utils.mjs +19 -0
  88. package/index.d.mts +1771 -5
  89. package/index.d.ts +1771 -65
  90. package/index.js +8 -5
  91. package/index.mjs +147 -1812
  92. package/keys.js +8 -0
  93. package/keys.mjs +28 -0
  94. package/memoize.js +8 -0
  95. package/memoize.mjs +38 -0
  96. package/navigation.js +8 -0
  97. package/navigation.mjs +97 -0
  98. package/noop.js +8 -0
  99. package/noop.mjs +13 -0
  100. package/package.json +1 -1
  101. package/scrollbarWidth.js +8 -0
  102. package/scrollbarWidth.mjs +20 -0
  103. package/setter.js +8 -0
  104. package/setter.mjs +27 -0
  105. package/theme.js +8 -0
  106. package/theme.mjs +27 -0
  107. package/trappedFocus.js +8 -0
  108. package/trappedFocus.mjs +58 -0
  109. package/tree-utils/FieldsService.js +8 -0
  110. package/tree-utils/FieldsService.mjs +48 -0
  111. package/tree-utils/SortedPublicItemIds.js +8 -0
  112. package/tree-utils/SortedPublicItemIds.mjs +24 -0
  113. package/tree-utils/itemIdUtils.js +8 -0
  114. package/tree-utils/itemIdUtils.mjs +87 -0
  115. package/tree-utils/itemUtils.js +8 -0
  116. package/tree-utils/itemUtils.mjs +118 -0
  117. package/tree-utils/misc.js +8 -0
  118. package/tree-utils/misc.mjs +22 -0
  119. package/treeDataOperations.js +8 -0
  120. package/treeDataOperations.mjs +45 -0
  121. package/typography/Typography.js +8 -0
  122. package/typography/Typography.mjs +110 -0
  123. package/typography/constants.js +8 -0
  124. package/typography/constants.mjs +71 -0
  125. package/validate-package.js +8 -0
  126. package/validate-package.mjs +20 -0
  127. package/watermark/WatermarkOverlay.js +8 -0
  128. package/watermark/WatermarkOverlay.mjs +93 -0
  129. package/Draggable.d.ts +0 -90
  130. package/Droppable.d.ts +0 -81
  131. package/FormComponent.d.ts +0 -167
  132. package/browser-support.service.d.ts +0 -11
  133. package/canUseDOM.d.ts +0 -8
  134. package/canUseRef.d.ts +0 -9
  135. package/classNames.d.ts +0 -8
  136. package/clone.d.ts +0 -24
  137. package/constants/index.d.ts +0 -8
  138. package/contexts/ZIndexContext.d.ts +0 -11
  139. package/drag-n-drop/context/index.d.ts +0 -23
  140. package/drag-n-drop/index.d.ts +0 -25
  141. package/events/BaseEvent.d.ts +0 -22
  142. package/events/dispatchEvent.d.ts +0 -18
  143. package/fieldList.d.ts +0 -8
  144. package/focus.d.ts +0 -8
  145. package/getActiveElement.d.ts +0 -12
  146. package/getTabIndex.d.ts +0 -8
  147. package/getter.d.ts +0 -18
  148. package/guid.d.ts +0 -8
  149. package/hasRelativeStackingContext.d.ts +0 -6
  150. package/hocs/AsyncFocusBlur.d.ts +0 -17
  151. package/hocs/use-id-hoc.d.ts +0 -7
  152. package/hocs/withPropsContext.d.ts +0 -9
  153. package/hooks/index.d.ts +0 -16
  154. package/hooks/use-id.d.ts +0 -6
  155. package/hooks/use-isomorphic-layout-effect.d.ts +0 -7
  156. package/hooks/useAsyncFocusBlur.d.ts +0 -29
  157. package/hooks/useCollection.d.ts +0 -18
  158. package/hooks/useControlledState.d.ts +0 -11
  159. package/hooks/useCustomComponent.d.ts +0 -15
  160. package/hooks/useDir.d.ts +0 -9
  161. package/hooks/useDocument.d.ts +0 -11
  162. package/hooks/useDraggable.d.ts +0 -67
  163. package/hooks/useDroppable.d.ts +0 -32
  164. package/hooks/useInheritedState.d.ts +0 -17
  165. package/hooks/useMouse.d.ts +0 -24
  166. package/hooks/usePropsContext.d.ts +0 -7
  167. package/hooks/useRtl.d.ts +0 -9
  168. package/hooks/useWindow.d.ts +0 -11
  169. package/icons/BaseIconProps.d.ts +0 -76
  170. package/icons/Icon.d.ts +0 -39
  171. package/icons/IconWrap.d.ts +0 -11
  172. package/icons/IconsContext.d.ts +0 -25
  173. package/icons/SvgIcon.d.ts +0 -75
  174. package/icons/constants.d.ts +0 -17
  175. package/icons/models/flip.d.ts +0 -15
  176. package/icons/models/size.d.ts +0 -19
  177. package/icons/models/theme-color.d.ts +0 -25
  178. package/icons/utils.d.ts +0 -21
  179. package/keys.d.ts +0 -24
  180. package/memoize.d.ts +0 -14
  181. package/models/auto-scroll-options.d.ts +0 -26
  182. package/models/index.d.ts +0 -9
  183. package/models/kendoReactComponentBaseProps.d.ts +0 -27
  184. package/models/mouse.d.ts +0 -20
  185. package/models/pointer.d.ts +0 -27
  186. package/models/touch.d.ts +0 -21
  187. package/navigation.d.ts +0 -131
  188. package/noop.d.ts +0 -8
  189. package/scrollbarWidth.d.ts +0 -12
  190. package/setter.d.ts +0 -20
  191. package/theme.d.ts +0 -12
  192. package/tree-utils/FieldsService.d.ts +0 -29
  193. package/tree-utils/SortedPublicItemIds.d.ts +0 -12
  194. package/tree-utils/itemIdUtils.d.ts +0 -64
  195. package/tree-utils/itemUtils.d.ts +0 -49
  196. package/tree-utils/misc.d.ts +0 -12
  197. package/treeDataOperations.d.ts +0 -43
  198. package/typography/Typography.d.ts +0 -39
  199. package/typography/TypographyProps.d.ts +0 -124
  200. package/typography/constants.d.ts +0 -88
  201. package/typography/models/margin.d.ts +0 -27
  202. package/validate-package.d.ts +0 -13
  203. package/watermark/WatermarkOverlay.d.ts +0 -9
package/keys.js ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={backspace:8,tab:9,enter:13,shift:16,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,delete:46};exports.Keys=e;
package/keys.mjs ADDED
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ const e = {
10
+ backspace: 8,
11
+ tab: 9,
12
+ enter: 13,
13
+ shift: 16,
14
+ esc: 27,
15
+ space: 32,
16
+ pageUp: 33,
17
+ pageDown: 34,
18
+ end: 35,
19
+ home: 36,
20
+ left: 37,
21
+ up: 38,
22
+ right: 39,
23
+ down: 40,
24
+ delete: 46
25
+ };
26
+ export {
27
+ e as Keys
28
+ };
package/memoize.js ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function n(t,l){return t===l||Number.isNaN(t)&&Number.isNaN(l)}function a(t,l){if(t.length!==l.length)return!1;for(let e=0;e<t.length;e++)if(!n(t[e],l[e]))return!1;return!0}function s(t,l=a){let e=null;function i(...r){if(e&&e.lastThis===this&&l(r,e.lastArgs))return e.lastResult;const u=t.apply(this,r);return e={lastResult:u,lastArgs:r,lastThis:this},u}return i.clear=function(){e=null},i}exports.memoizeOne=s;
package/memoize.mjs ADDED
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ function n(e, l) {
10
+ return e === l || Number.isNaN(e) && Number.isNaN(l);
11
+ }
12
+ function a(e, l) {
13
+ if (e.length !== l.length)
14
+ return !1;
15
+ for (let t = 0; t < e.length; t++)
16
+ if (!n(e[t], l[t]))
17
+ return !1;
18
+ return !0;
19
+ }
20
+ function s(e, l = a) {
21
+ let t = null;
22
+ function u(...r) {
23
+ if (t && t.lastThis === this && l(r, t.lastArgs))
24
+ return t.lastResult;
25
+ const i = e.apply(this, r);
26
+ return t = {
27
+ lastResult: i,
28
+ lastArgs: r,
29
+ lastThis: this
30
+ }, i;
31
+ }
32
+ return u.clear = function() {
33
+ t = null;
34
+ }, u;
35
+ }
36
+ export {
37
+ s as memoizeOne
38
+ };
package/navigation.js ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]",'[tabindex]:not([tabindex="-1"])'];class a{constructor(t){this.rovingTabIndex=!0,this.update=()=>{},this.focusNextIndex=(e,r)=>{const s=this.elements;let n=s.indexOf(e)+r;n=n<0?s.length-1:n;const i=s[n%s.length];return this.focusElement(i,e),i},this.tabIndex=t.tabIndex||0,this.root=t.root,this.selectors=t.selectors,this.focusOptions=t.focusOptions||{preventScroll:!0},this.rovingTabIndex=t.rovingTabIndex!==void 0?t.rovingTabIndex:!0,this.mouseEvents=t.mouseEvents||{},this.keyboardEvents=t.keyboardEvents||{}}get elements(){return this.root.current?Array.from(this.root.current.querySelectorAll(this.selectors.join(","))):[]}get first(){return this.root.current&&this.root.current.querySelector(this.selectors.join(","))||null}get last(){const t=this.elements;return t[t.length-1]||null}get current(){return this.elements.find(t=>t.matches(":focus"))||null}focusNext(t){return this.focusNextIndex(t,1)}focusPrevious(t){return this.focusNextIndex(t,-1)}triggerKeyboardEvent(t,e){const r=t.target instanceof Element&&t.target.closest(this.selectors.join(",")),s=t.key===" "?"Space":t.key,n=t.nativeEvent.type;r&&this.keyboardEvents[n][s]&&this.keyboardEvents[n][s].call(void 0,r,this,t,e)}triggerMouseEvent(t){const e=t.target instanceof Element&&t.target.closest(this.selectors.join(",")),r=t.nativeEvent.type;e&&this.mouseEvents[r].call(void 0,e,this,t)}focusElement(t,e){t&&(e&&(this.rovingTabIndex&&e.removeAttribute("tabindex"),e.classList.remove("k-focus")),this.rovingTabIndex&&t.setAttribute("tabindex",String(this.tabIndex)),t.focus(this.focusOptions))}}exports.FOCUSABLE_ELEMENTS=o;exports.Navigation=a;
package/navigation.mjs ADDED
@@ -0,0 +1,97 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ const c = [
10
+ "input:not([disabled]):not([type=hidden])",
11
+ "select:not([disabled])",
12
+ "textarea:not([disabled])",
13
+ "button:not([disabled])",
14
+ "a[href]",
15
+ "area[href]",
16
+ "summary",
17
+ "iframe",
18
+ "object",
19
+ "embed",
20
+ "audio[controls]",
21
+ "video[controls]",
22
+ "[contenteditable]",
23
+ '[tabindex]:not([tabindex="-1"])'
24
+ ];
25
+ class a {
26
+ constructor(t) {
27
+ this.rovingTabIndex = !0, this.update = () => {
28
+ }, this.focusNextIndex = (e, r) => {
29
+ const s = this.elements;
30
+ let n = s.indexOf(e) + r;
31
+ n = n < 0 ? s.length - 1 : n;
32
+ const o = s[n % s.length];
33
+ return this.focusElement(o, e), o;
34
+ }, this.tabIndex = t.tabIndex || 0, this.root = t.root, this.selectors = t.selectors, this.focusOptions = t.focusOptions || { preventScroll: !0 }, this.rovingTabIndex = t.rovingTabIndex !== void 0 ? t.rovingTabIndex : !0, this.mouseEvents = t.mouseEvents || {}, this.keyboardEvents = t.keyboardEvents || {};
35
+ }
36
+ /**
37
+ * Returns the collection of DOM elements which the module will navigate in.
38
+ */
39
+ get elements() {
40
+ return this.root.current ? Array.from(this.root.current.querySelectorAll(this.selectors.join(","))) : [];
41
+ }
42
+ /**
43
+ * Returns the first navigation DOM element.
44
+ */
45
+ get first() {
46
+ return this.root.current && this.root.current.querySelector(this.selectors.join(",")) || null;
47
+ }
48
+ /**
49
+ * Returns the last navigation DOM element.
50
+ */
51
+ get last() {
52
+ const t = this.elements;
53
+ return t[t.length - 1] || null;
54
+ }
55
+ /**
56
+ * Returns the focused DOM element from the navigation collection of DOM elements.
57
+ */
58
+ get current() {
59
+ return this.elements.find((t) => t.matches(":focus")) || null;
60
+ }
61
+ /**
62
+ * Focuses the next element from the navigation collection of DOM elements.
63
+ */
64
+ focusNext(t) {
65
+ return this.focusNextIndex(t, 1);
66
+ }
67
+ /**
68
+ * Focuses the previous element from the navigation collection of DOM elements.
69
+ */
70
+ focusPrevious(t) {
71
+ return this.focusNextIndex(t, -1);
72
+ }
73
+ /**
74
+ * The keyboard events handler.
75
+ */
76
+ triggerKeyboardEvent(t, e) {
77
+ const r = t.target instanceof Element && t.target.closest(this.selectors.join(",")), s = t.key === " " ? "Space" : t.key, n = t.nativeEvent.type;
78
+ r && this.keyboardEvents[n][s] && this.keyboardEvents[n][s].call(void 0, r, this, t, e);
79
+ }
80
+ /**
81
+ * The mouse events handler.
82
+ */
83
+ triggerMouseEvent(t) {
84
+ const e = t.target instanceof Element && t.target.closest(this.selectors.join(",")), r = t.nativeEvent.type;
85
+ e && this.mouseEvents[r].call(void 0, e, this, t);
86
+ }
87
+ /**
88
+ * Focuses the passed element from the navigation collection of DOM elements.
89
+ */
90
+ focusElement(t, e) {
91
+ t && (e && (this.rovingTabIndex && e.removeAttribute("tabindex"), e.classList.remove("k-focus")), this.rovingTabIndex && t.setAttribute("tabindex", String(this.tabIndex)), t.focus(this.focusOptions));
92
+ }
93
+ }
94
+ export {
95
+ c as FOCUSABLE_ELEMENTS,
96
+ a as Navigation
97
+ };
package/noop.js ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=function(){};exports.noop=o;
package/noop.mjs ADDED
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ const n = function() {
10
+ };
11
+ export {
12
+ n as noop
13
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-common",
3
- "version": "7.2.4-develop.2",
3
+ "version": "7.2.4-develop.4",
4
4
  "description": "React Common package delivers common utilities that can be used with the KendoReact UI components. KendoReact Common Utilities package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./browser-support.service.js"),t=require("./canUseDOM.js"),o=()=>!t.canUseDOM||!document.body?!1:new e.BrowserSupportService().scrollbarWidth,l=()=>{if(!t.canUseDOM||!document.body)return!1;let r=new e.BrowserSupportService().scrollbarWidth;document.body.style.setProperty("--kendo-scrollbar-width",`${r}px`)};exports.getScrollbarWidth=o;exports.setScrollbarWidth=l;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import { BrowserSupportService as t } from "./browser-support.service.mjs";
10
+ import { canUseDOM as e } from "./canUseDOM.mjs";
11
+ const c = () => !e || !document.body ? !1 : new t().scrollbarWidth, s = () => {
12
+ if (!e || !document.body)
13
+ return !1;
14
+ let r = new t().scrollbarWidth;
15
+ document.body.style.setProperty("--kendo-scrollbar-width", `${r}px`);
16
+ };
17
+ export {
18
+ c as getScrollbarWidth,
19
+ s as setScrollbarWidth
20
+ };
package/setter.js ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./fieldList.js"),n={};n.undefined=e=>e;const l=(e,t)=>t&&t.arrays&&!isNaN(Number(e))?[]:{};function d(e){if(n[e])return n[e];const t=a.fieldList(e);return n[e]=(o,c,i)=>{let r=o;const u=t.length-1;for(let s=0;s<u&&r;s++)r=r[t[s]]=r[t[s]]||l(t[s+1],i);r[t[u]]=c},n[e]}exports.setter=d;
package/setter.mjs ADDED
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import { fieldList as i } from "./fieldList.mjs";
10
+ const s = {};
11
+ s.undefined = (t) => t;
12
+ const f = (t, e) => e && e.arrays && !isNaN(Number(t)) ? [] : {};
13
+ function d(t) {
14
+ if (s[t])
15
+ return s[t];
16
+ const e = i(t);
17
+ return s[t] = (u, c, a) => {
18
+ let r = u;
19
+ const o = e.length - 1;
20
+ for (let n = 0; n < o && r; n++)
21
+ r = r[e[n]] = r[e[n]] || f(e[n + 1], a);
22
+ r[e[o]] = c;
23
+ }, s[t];
24
+ }
25
+ export {
26
+ d as setter
27
+ };
package/theme.js ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={sizeMap:{small:"sm",medium:"md",large:"lg"},roundedMap:{small:"sm",medium:"md",large:"lg"},orientationMap:{vertical:"vstack",horizontal:"hstack"}};exports.kendoThemeMaps=e;
package/theme.mjs ADDED
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ const e = {
10
+ sizeMap: {
11
+ small: "sm",
12
+ medium: "md",
13
+ large: "lg"
14
+ },
15
+ roundedMap: {
16
+ small: "sm",
17
+ medium: "md",
18
+ large: "lg"
19
+ },
20
+ orientationMap: {
21
+ vertical: "vstack",
22
+ horizontal: "hstack"
23
+ }
24
+ };
25
+ export {
26
+ e as kendoThemeMaps
27
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./keys.js"),l=require("./navigation.js"),f=s=>{if(s){const t=s.querySelectorAll(l.FOCUSABLE_ELEMENTS.join(","));if(t.length&&t[0].focus)return t[0]}},r=s=>{if(s){const t=s.querySelectorAll(l.FOCUSABLE_ELEMENTS.join(","));if(t.length&&t[t.length-1].focus)return t[t.length-1]}},u=s=>{if(s){const t=f(s);t&&t.focus()}},a=s=>{if(s){const t=r(s);t&&t.focus()}},c=(s,t)=>{if(!t||s.keyCode!==i.Keys.tab)return;const o=f(t),e=r(t);o&&e&&!s.shiftKey&&s.target===e&&(s.preventDefault(),o.focus()),o&&e&&s.shiftKey&&s.target===o&&(s.preventDefault(),e.focus()),o||s.preventDefault()},n=(s,t,o)=>{let e=!0;if(s.keyCode!==i.Keys.enter&&s.target===t){o&&o(!1);return}s.keyCode===i.Keys.enter&&s.target===t?(e=!0,setTimeout(()=>{u(t)},1)):s.keyCode===i.Keys.esc?(e=!1,t.focus()):c(s,t),o&&o(e)};exports.applyTrappedFocus=n;exports.firstFocusableChild=f;exports.focusFirstFocusableChild=u;exports.focusLastFocusableChild=a;exports.keepFocusInContainer=c;exports.lastFocusableChild=r;
@@ -0,0 +1,58 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import { Keys as i } from "./keys.mjs";
10
+ import { FOCUSABLE_ELEMENTS as r } from "./navigation.mjs";
11
+ const l = (s) => {
12
+ if (s) {
13
+ const t = s.querySelectorAll(r.join(","));
14
+ if (t.length && t[0].focus)
15
+ return t[0];
16
+ }
17
+ }, u = (s) => {
18
+ if (s) {
19
+ const t = s.querySelectorAll(r.join(","));
20
+ if (t.length && t[t.length - 1].focus)
21
+ return t[t.length - 1];
22
+ }
23
+ }, c = (s) => {
24
+ if (s) {
25
+ const t = l(s);
26
+ t && t.focus();
27
+ }
28
+ }, C = (s) => {
29
+ if (s) {
30
+ const t = u(s);
31
+ t && t.focus();
32
+ }
33
+ }, e = (s, t) => {
34
+ if (!t || s.keyCode !== i.tab)
35
+ return;
36
+ const f = l(t), o = u(t);
37
+ f && o && !s.shiftKey && s.target === o && (s.preventDefault(), f.focus()), f && o && s.shiftKey && s.target === f && (s.preventDefault(), o.focus()), f || s.preventDefault();
38
+ }, a = (s, t, f) => {
39
+ let o = !0;
40
+ if (s.keyCode !== i.enter && s.target === t) {
41
+ f && f(!1);
42
+ return;
43
+ }
44
+ s.keyCode === i.enter && s.target === t ? (o = !0, setTimeout(
45
+ () => {
46
+ c(t);
47
+ },
48
+ 1
49
+ )) : s.keyCode === i.esc ? (o = !1, t.focus()) : e(s, t), f && f(o);
50
+ };
51
+ export {
52
+ a as applyTrappedFocus,
53
+ l as firstFocusableChild,
54
+ c as focusFirstFocusableChild,
55
+ C as focusLastFocusableChild,
56
+ e as keepFocusInContainer,
57
+ u as lastFocusableChild
58
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./misc.js");class i{constructor(e){this.expandField=e.expandField,this.selectField=e.selectField,this.hasChildrenField=e.hasChildrenField,this.childrenField=e.childrenField,this.textField=e.textField,this.disableField=e.disableField,this.checkField=e.checkField,this.checkIndeterminateField=e.checkIndeterminateField,this.focusIdField=e.focusIdField}expanded(e){return d.getNestedValue(this.expandField,e)}selected(e){return d.getNestedValue(this.selectField,e)}text(e){return d.getNestedValue(this.textField,e)}disabled(e){return d.getNestedValue(this.disableField,e)}hasChildren(e){return d.getNestedValue(this.hasChildrenField,e)}children(e){const t=d.getNestedValue(this.childrenField,e);return t||[]}checked(e){return d.getNestedValue(this.checkField,e)}checkIndeterminate(e){return d.getNestedValue(this.checkIndeterminateField,e)}focusId(e){return this.focusIdField&&d.getNestedValue(this.focusIdField,e)}getChildrenField(){return this.childrenField}}exports.TreeFieldsService=i;
@@ -0,0 +1,48 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import { getNestedValue as i } from "./misc.mjs";
10
+ class h {
11
+ constructor(e) {
12
+ this.expandField = e.expandField, this.selectField = e.selectField, this.hasChildrenField = e.hasChildrenField, this.childrenField = e.childrenField, this.textField = e.textField, this.disableField = e.disableField, this.checkField = e.checkField, this.checkIndeterminateField = e.checkIndeterminateField, this.focusIdField = e.focusIdField;
13
+ }
14
+ expanded(e) {
15
+ return i(this.expandField, e);
16
+ }
17
+ selected(e) {
18
+ return i(this.selectField, e);
19
+ }
20
+ text(e) {
21
+ return i(this.textField, e);
22
+ }
23
+ disabled(e) {
24
+ return i(this.disableField, e);
25
+ }
26
+ hasChildren(e) {
27
+ return i(this.hasChildrenField, e);
28
+ }
29
+ children(e) {
30
+ const d = i(this.childrenField, e);
31
+ return d || [];
32
+ }
33
+ checked(e) {
34
+ return i(this.checkField, e);
35
+ }
36
+ checkIndeterminate(e) {
37
+ return i(this.checkIndeterminateField, e);
38
+ }
39
+ focusId(e) {
40
+ return this.focusIdField && i(this.focusIdField, e);
41
+ }
42
+ getChildrenField() {
43
+ return this.childrenField;
44
+ }
45
+ }
46
+ export {
47
+ h as TreeFieldsService
48
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=5e4;class r{constructor(){this.objects=[]}init(e){let t;for(let s=0;s<e.length;s++)s%o===0&&(t={},this.objects.push(t)),t[e[s]]=!0}hasId(e){return this.objects.some(t=>t[e])}}exports.SortedPublicItemIds=r;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ class r {
10
+ constructor() {
11
+ this.objects = [];
12
+ }
13
+ init(e) {
14
+ let t;
15
+ for (let s = 0; s < e.length; s++)
16
+ s % 5e4 === 0 && (t = {}, this.objects.push(t)), t[e[s]] = !0;
17
+ }
18
+ hasId(e) {
19
+ return this.objects.some((t) => t[e]);
20
+ }
21
+ }
22
+ export {
23
+ r as SortedPublicItemIds
24
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u="",l="0",r="_";function I(t,e,s){if(E(t))return e[Number(t)];{const n=e[Number(c(t))],o=n&&n[s]||[];return o.length?I(g(t),o,s):void 0}}function c(t){return a(t)?t:t.split(r)[0]}function g(t){if(a(t))return t;{const e=t.indexOf(r);return t.substring(e+1)}}function d(t){return S("0",t)}function S(t,e){return t=t.toString(),e?e+r+t:t}function b(t){const e=t.lastIndexOf(r);return e<0?u:t.substring(0,e)}function a(t){return t===u||t.indexOf(r)<0}function E(t){return t!==u&&t.indexOf(r)<0}function P(t){return t.split(r)}function f(t){const e=t.lastIndexOf(r);return e<0?t:t.substring(e+1)}function R(t){return f(t)===l}function h(t,e){const s=e;t="r"+r+t,e="r"+r+e;const n=b(t)+r;if(e.startsWith(n)){const o=e.substring(n.length);if(o){const i=c(o);if(Number(f(t))<Number(i)){const O=n+(Number(i)-1).toString()+o.substring(i.length);return g(O)}}}return s}exports.EMPTY_ID=u;exports.SEPARATOR=r;exports.ZERO_LEVEL_ZERO_NODE_ID=l;exports.createId=S;exports.getAllShortIds=P;exports.getDecrementedItemIdAfterRemoval=h;exports.getDirectParentId=b;exports.getFirstChildId=d;exports.getIdWithoutRootParentId=g;exports.getItemById=I;exports.getRootParentId=c;exports.getShortId=f;exports.isIdEmptyOrZeroLevel=a;exports.isIdZeroLevel=E;exports.isItemFirstFromSiblings=R;
@@ -0,0 +1,87 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ const c = "", b = "0", r = "_";
10
+ function S(t, n, o) {
11
+ if (x(t))
12
+ return n[Number(t)];
13
+ {
14
+ const e = n[Number(f(t))], s = e && e[o] || [];
15
+ return s.length ? S(i(t), s, o) : void 0;
16
+ }
17
+ }
18
+ function f(t) {
19
+ return a(t) ? t : t.split(r)[0];
20
+ }
21
+ function i(t) {
22
+ if (a(t))
23
+ return t;
24
+ {
25
+ const n = t.indexOf(r);
26
+ return t.substring(n + 1);
27
+ }
28
+ }
29
+ function E(t) {
30
+ return O("0", t);
31
+ }
32
+ function O(t, n) {
33
+ return t = t.toString(), n ? n + r + t : t;
34
+ }
35
+ function h(t) {
36
+ const n = t.lastIndexOf(r);
37
+ return n < 0 ? c : t.substring(0, n);
38
+ }
39
+ function a(t) {
40
+ return t === c || t.indexOf(r) < 0;
41
+ }
42
+ function x(t) {
43
+ return t !== c && t.indexOf(r) < 0;
44
+ }
45
+ function P(t) {
46
+ return t.split(r);
47
+ }
48
+ function g(t) {
49
+ const n = t.lastIndexOf(r);
50
+ return n < 0 ? t : t.substring(n + 1);
51
+ }
52
+ function p(t) {
53
+ return g(t) === b;
54
+ }
55
+ function N(t, n) {
56
+ const o = n;
57
+ t = "r" + r + t, n = "r" + r + n;
58
+ const e = h(t) + r;
59
+ if (n.startsWith(e)) {
60
+ const s = n.substring(e.length);
61
+ if (s) {
62
+ const u = f(s);
63
+ if (Number(g(t)) < Number(u)) {
64
+ const l = e + (Number(u) - 1).toString() + s.substring(u.length);
65
+ return i(l);
66
+ }
67
+ }
68
+ }
69
+ return o;
70
+ }
71
+ export {
72
+ c as EMPTY_ID,
73
+ r as SEPARATOR,
74
+ b as ZERO_LEVEL_ZERO_NODE_ID,
75
+ O as createId,
76
+ P as getAllShortIds,
77
+ N as getDecrementedItemIdAfterRemoval,
78
+ h as getDirectParentId,
79
+ E as getFirstChildId,
80
+ i as getIdWithoutRootParentId,
81
+ S as getItemById,
82
+ f as getRootParentId,
83
+ g as getShortId,
84
+ a as isIdEmptyOrZeroLevel,
85
+ x as isIdZeroLevel,
86
+ p as isItemFirstFromSiblings
87
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./itemIdUtils.js"),C=require("./SortedPublicItemIds.js"),a=require("./misc.js");function f(e,s){const t=a.getNestedValue(s,e);return!!(t&&t.length)}function N(e,s){return s.expanded(e)&&f(e,s.getChildrenField())}function v(e,s,t,n){const u=g([e],s,t,n);return u.length?u[0]:void 0}function g(e,s,t,n){const u=[],r=new C.SortedPublicItemIds;return r.init(e),A(r,s,t,c.EMPTY_ID,u,n),u}function b(e,s,t,n,u){const r=Number(c.getRootParentId(s));if(r>=e.length)return e;let o=e,l=e[r];return l[n]||(o=e.slice(),l=o[r]=Object.assign({},l,{[n]:!0})),c.isIdZeroLevel(s)?t(l):l[u]&&(l[u]=b(l[u],c.getIdWithoutRootParentId(s),t,n,u)),o}function p(e,s,t){const n=c.getAllShortIds(e);let u=s;for(let r=0;r<n.length;r++){const o=u[Number(n[r])];if(t.disabled(o))return!1;u=o[t.getChildrenField()]}return!0}function x(e,s,t,n){return n?r(e):u(e,s);function u(o,l){let i=[];const d=o[t]||[];for(let I=0;I<d.length;I++){const h=c.createId(I,l);i.push(h),i=i.concat(u(d[I],h))}return i}function r(o){let l=[];const i=o[t]||[];for(let d=0;d<i.length;d++)l.push(a.getNestedValue(n,i[d])),l=l.concat(r(i[d]));return l}}function E(e,s,t,n,u){return(e[n]||[]).every((o,l)=>u.indexOf(t?a.getNestedValue(t,o):c.createId(l,s))>-1)}function R(e,s,t){const n=[],u=c.getAllShortIds(e);let r=t;for(let o=0;o<u.length-1&&r;o++){const l=r[Number(u[o])];n.push(l),r=l[s]}return n}function P(e,s,t){const n=t.slice();if(c.isIdZeroLevel(e))n.splice(Number(e),1);else{const u=Number(c.getRootParentId(e)),r=n[u]={...n[u]};r[s]=P(c.getIdWithoutRootParentId(e),s,r[s])}return n}function m(e,s,t,n,u){const r=u.slice();if(c.isIdZeroLevel(n))if(s==="child"){const o=r[Number(n)]={...r[Number(n)]};o[t]?(o[t]=o[t].slice(),o[t].push(e)):o[t]=[e]}else r.splice(Number(n)+(s==="after"?1:0),0,e);else{const o=Number(c.getRootParentId(n)),l=r[o]={...r[o]};l[t]=m(e,s,t,c.getIdWithoutRootParentId(n),l[t])}return r}function A(e,s,t,n,u,r){for(let o=0;o<t.length;o++){const l=t[o],i=c.createId(o,n);e.hasId(a.getNestedValue(s,l))&&u.push(i),f(l,r)&&A(e,s,a.getNestedValue(r,l),i,u,r)}}exports.addItem=m;exports.areAllDirectChildrenChecked=E;exports.getAllDirectIndirectChildrenIds=x;exports.getAllParents=R;exports.hasChildren=f;exports.isEnabledAndAllParentsEnabled=p;exports.isItemExpandedAndWithChildren=N;exports.removeItem=P;exports.resolveItemId=v;exports.resolveItemsIds=g;exports.updateItem=b;