@elliemae/ds-shared 1.60.0 → 2.0.0-alpha.12

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 (264) hide show
  1. package/cjs/Animations/BaseAnimation.js +19 -27
  2. package/cjs/Animations/Grow.js +17 -22
  3. package/cjs/Animations/GrowRight.js +17 -23
  4. package/cjs/Animations/GrowVertical.js +3 -2
  5. package/cjs/CheckableGroup.js +40 -46
  6. package/cjs/DeferRenderAfterComputation.js +12 -21
  7. package/cjs/FocusGroup/FocusGrid.js +91 -92
  8. package/cjs/FocusGroup/FocusGroup.js +225 -262
  9. package/cjs/FocusGroup/FocusGroupContext.js +1 -2
  10. package/cjs/FocusGroup/FocusGroupManager.js +88 -126
  11. package/cjs/FocusGroup/focusGroupManagerHoc.js +28 -27
  12. package/cjs/FocusGroup/index.js +14 -28
  13. package/cjs/FocusGroup/useFocusGroupItem.js +27 -24
  14. package/cjs/FocusGroup/utils/getNextCellPosition.js +14 -15
  15. package/cjs/GroupContext/Group.js +81 -103
  16. package/cjs/GroupContext/GroupContext.js +1 -2
  17. package/cjs/GroupContext/GroupItem.js +12 -10
  18. package/cjs/GroupContext/index.js +6 -15
  19. package/cjs/ScrollSync/ScrollSync.js +90 -112
  20. package/cjs/ScrollSync/ScrollSyncPane.js +58 -90
  21. package/cjs/ScrollSync/ScrollSyncProvider.js +36 -26
  22. package/cjs/ScrollSync/index.js +4 -13
  23. package/cjs/ScrollSync/useScrollSync.js +0 -1
  24. package/cjs/constants.js +43 -4
  25. package/cjs/createDataInstance/createInstancePlugin.js +11 -10
  26. package/cjs/createDataInstance/createInstanceRef.js +41 -42
  27. package/cjs/createDataInstance/utils.js +56 -58
  28. package/cjs/defer-render-hoc/index.js +26 -61
  29. package/cjs/dimsum.config.js +7 -0
  30. package/cjs/index.js +10 -20
  31. package/cjs/prop-types.js +59 -0
  32. package/cjs/react-spring/index.js +3 -6
  33. package/cjs/react-spring/renderprops.js +3 -6
  34. package/cjs/toolbar/ToolbarProvider.js +65 -77
  35. package/cjs/useDataGrid/VolatileRowsListener.js +13 -27
  36. package/cjs/useDataGrid/index.js +2 -17
  37. package/cjs/useDataGrid/initColumnDefinition.js +46 -47
  38. package/cjs/useDataGrid/useDataGrid.js +104 -144
  39. package/cjs/useDataList/index.js +2 -15
  40. package/cjs/useDataList/recordIterator.js +9 -10
  41. package/cjs/useDataList/useDataList.js +51 -59
  42. package/cjs/utils.js +46 -59
  43. package/cjs/virtualization/AutoHeightList.js +31 -22
  44. package/cjs/virtualization/FluidHeightList.js +26 -12
  45. package/cjs/virtualization/index.js +12 -17
  46. package/esm/Animations/BaseAnimation.js +18 -26
  47. package/esm/Animations/Grow.js +15 -20
  48. package/esm/Animations/GrowRight.js +15 -21
  49. package/esm/Animations/GrowVertical.js +3 -2
  50. package/esm/CheckableGroup.js +38 -42
  51. package/esm/DeferRenderAfterComputation.js +12 -20
  52. package/esm/FocusGroup/FocusGrid.js +87 -89
  53. package/esm/FocusGroup/FocusGroup.js +222 -257
  54. package/esm/FocusGroup/FocusGroupContext.js +0 -1
  55. package/esm/FocusGroup/FocusGroupManager.js +82 -114
  56. package/esm/FocusGroup/focusGroupManagerHoc.js +24 -22
  57. package/esm/FocusGroup/index.js +0 -14
  58. package/esm/FocusGroup/useFocusGroupItem.js +25 -22
  59. package/esm/FocusGroup/utils/getNextCellPosition.js +14 -15
  60. package/esm/GroupContext/Group.js +80 -95
  61. package/esm/GroupContext/GroupContext.js +1 -2
  62. package/esm/GroupContext/GroupItem.js +10 -8
  63. package/esm/GroupContext/index.js +0 -9
  64. package/esm/ScrollSync/ScrollSync.js +88 -105
  65. package/esm/ScrollSync/ScrollSyncPane.js +56 -83
  66. package/esm/ScrollSync/ScrollSyncProvider.js +35 -26
  67. package/esm/ScrollSync/index.js +0 -9
  68. package/esm/ScrollSync/useScrollSync.js +0 -1
  69. package/esm/constants.js +31 -5
  70. package/esm/createDataInstance/createInstancePlugin.js +10 -8
  71. package/esm/createDataInstance/createInstanceRef.js +36 -36
  72. package/esm/createDataInstance/utils.js +55 -57
  73. package/esm/defer-render-hoc/index.js +25 -55
  74. package/esm/dimsum.config.js +5 -0
  75. package/esm/index.js +0 -10
  76. package/esm/prop-types.js +43 -0
  77. package/esm/react-spring/index.js +1 -2
  78. package/esm/react-spring/renderprops.js +1 -2
  79. package/esm/toolbar/ToolbarProvider.js +60 -71
  80. package/esm/useDataGrid/VolatileRowsListener.js +14 -23
  81. package/esm/useDataGrid/index.js +0 -15
  82. package/esm/useDataGrid/initColumnDefinition.js +43 -43
  83. package/esm/useDataGrid/useDataGrid.js +90 -127
  84. package/esm/useDataList/index.js +0 -13
  85. package/esm/useDataList/recordIterator.js +9 -10
  86. package/esm/useDataList/useDataList.js +39 -46
  87. package/esm/utils.js +44 -57
  88. package/esm/virtualization/AutoHeightList.js +28 -18
  89. package/esm/virtualization/FluidHeightList.js +24 -10
  90. package/esm/virtualization/index.js +6 -11
  91. package/package.json +201 -8
  92. package/types/Animations/BaseAnimation.d.ts +12 -0
  93. package/types/Animations/Grow.d.ts +11 -0
  94. package/types/Animations/GrowRight.d.ts +11 -0
  95. package/types/Animations/GrowVertical.d.ts +1 -0
  96. package/types/CheckableGroup.d.ts +20 -0
  97. package/types/DeferRenderAfterComputation.d.ts +6 -0
  98. package/types/FocusGroup/FocusGrid.d.ts +10 -0
  99. package/types/FocusGroup/FocusGroup.d.ts +36 -0
  100. package/types/FocusGroup/FocusGroupContext.d.ts +3 -0
  101. package/types/FocusGroup/FocusGroupManager.d.ts +24 -0
  102. package/types/FocusGroup/focusGroupManagerHoc.d.ts +7 -0
  103. package/types/FocusGroup/index.d.ts +6 -0
  104. package/types/FocusGroup/useFocusGroupItem.d.ts +2 -0
  105. package/types/FocusGroup/utils/getNextCellPosition.d.ts +12 -0
  106. package/types/GroupContext/Group.d.ts +14 -0
  107. package/types/GroupContext/GroupContext.d.ts +2 -0
  108. package/types/GroupContext/GroupItem.d.ts +5 -0
  109. package/types/GroupContext/index.d.ts +3 -0
  110. package/types/ScrollSync/ScrollSync.d.ts +21 -0
  111. package/types/ScrollSync/ScrollSyncPane.d.ts +3 -0
  112. package/types/ScrollSync/ScrollSyncProvider.d.ts +12 -0
  113. package/types/ScrollSync/index.d.ts +2 -0
  114. package/types/ScrollSync/useScrollSync.d.ts +6 -0
  115. package/types/constants.d.ts +30 -0
  116. package/types/createDataInstance/createInstancePlugin.d.ts +1 -0
  117. package/types/createDataInstance/createInstanceRef.d.ts +12 -0
  118. package/types/createDataInstance/tests/createInstanceRef.test.d.ts +0 -0
  119. package/types/createDataInstance/utils.d.ts +9 -0
  120. package/types/dimsum.config.d.ts +4 -0
  121. package/types/index.d.ts +2 -0
  122. package/types/prop-types.d.ts +41 -0
  123. package/types/react-spring/index.d.ts +1 -0
  124. package/types/react-spring/renderprops.d.ts +1 -0
  125. package/types/toolbar/ToolbarProvider.d.ts +10 -0
  126. package/types/useDataGrid/VolatileRowsListener.d.ts +5 -0
  127. package/types/useDataGrid/index.d.ts +1 -0
  128. package/types/useDataGrid/initColumnDefinition.d.ts +5 -0
  129. package/types/useDataGrid/useDataGrid.d.ts +8 -0
  130. package/types/useDataList/index.d.ts +1 -0
  131. package/types/useDataList/recordIterator.d.ts +1 -0
  132. package/types/useDataList/useDataList.d.ts +13 -0
  133. package/types/utils.d.ts +22 -0
  134. package/types/virtualization/AutoHeightList.d.ts +2 -0
  135. package/types/virtualization/FluidHeightList.d.ts +2 -0
  136. package/types/virtualization/index.d.ts +9 -0
  137. package/Animations/BaseAnimation/package.json +0 -10
  138. package/Animations/Grow/package.json +0 -10
  139. package/Animations/GrowRight/package.json +0 -10
  140. package/Animations/GrowVertical/package.json +0 -10
  141. package/CheckableGroup/package.json +0 -10
  142. package/DeferRenderAfterComputation/package.json +0 -10
  143. package/FocusGroup/FocusGrid/package.json +0 -10
  144. package/FocusGroup/FocusGroup/package.json +0 -10
  145. package/FocusGroup/FocusGroupContext/package.json +0 -10
  146. package/FocusGroup/FocusGroupManager/package.json +0 -10
  147. package/FocusGroup/focusGroupManagerHoc/package.json +0 -10
  148. package/FocusGroup/package.json +0 -10
  149. package/FocusGroup/useFocusGroupItem/package.json +0 -10
  150. package/FocusGroup/utils/getNextCellPosition/package.json +0 -10
  151. package/GroupContext/Group/package.json +0 -10
  152. package/GroupContext/GroupContext/package.json +0 -10
  153. package/GroupContext/GroupItem/package.json +0 -10
  154. package/GroupContext/package.json +0 -10
  155. package/ScrollSync/ScrollSync/package.json +0 -10
  156. package/ScrollSync/ScrollSyncPane/package.json +0 -10
  157. package/ScrollSync/ScrollSyncProvider/package.json +0 -10
  158. package/ScrollSync/package.json +0 -10
  159. package/ScrollSync/useScrollSync/package.json +0 -10
  160. package/cjs/Animations/BaseAnimation.js.map +0 -1
  161. package/cjs/Animations/Grow.js.map +0 -1
  162. package/cjs/Animations/GrowRight.js.map +0 -1
  163. package/cjs/Animations/GrowVertical.js.map +0 -1
  164. package/cjs/CheckableGroup.js.map +0 -1
  165. package/cjs/DeferRenderAfterComputation.js.map +0 -1
  166. package/cjs/FocusGroup/FocusGrid.js.map +0 -1
  167. package/cjs/FocusGroup/FocusGroup.js.map +0 -1
  168. package/cjs/FocusGroup/FocusGroupContext.js.map +0 -1
  169. package/cjs/FocusGroup/FocusGroupManager.js.map +0 -1
  170. package/cjs/FocusGroup/focusGroupManagerHoc.js.map +0 -1
  171. package/cjs/FocusGroup/index.js.map +0 -1
  172. package/cjs/FocusGroup/useFocusGroupItem.js.map +0 -1
  173. package/cjs/FocusGroup/utils/getNextCellPosition.js.map +0 -1
  174. package/cjs/GroupContext/Group.js.map +0 -1
  175. package/cjs/GroupContext/GroupContext.js.map +0 -1
  176. package/cjs/GroupContext/GroupItem.js.map +0 -1
  177. package/cjs/GroupContext/index.js.map +0 -1
  178. package/cjs/ScrollSync/ScrollSync.js.map +0 -1
  179. package/cjs/ScrollSync/ScrollSyncPane.js.map +0 -1
  180. package/cjs/ScrollSync/ScrollSyncProvider.js.map +0 -1
  181. package/cjs/ScrollSync/index.js.map +0 -1
  182. package/cjs/ScrollSync/useScrollSync.js.map +0 -1
  183. package/cjs/constants.js.map +0 -1
  184. package/cjs/createDataInstance/createInstancePlugin.js.map +0 -1
  185. package/cjs/createDataInstance/createInstanceRef.js.map +0 -1
  186. package/cjs/createDataInstance/utils.js.map +0 -1
  187. package/cjs/defer-render-hoc/index.js.map +0 -1
  188. package/cjs/index.js.map +0 -1
  189. package/cjs/react-spring/index.js.map +0 -1
  190. package/cjs/react-spring/renderprops.js.map +0 -1
  191. package/cjs/toolbar/ToolbarProvider.js.map +0 -1
  192. package/cjs/useDataGrid/VolatileRowsListener.js.map +0 -1
  193. package/cjs/useDataGrid/index.js.map +0 -1
  194. package/cjs/useDataGrid/initColumnDefinition.js.map +0 -1
  195. package/cjs/useDataGrid/useDataGrid.js.map +0 -1
  196. package/cjs/useDataList/index.js.map +0 -1
  197. package/cjs/useDataList/recordIterator.js.map +0 -1
  198. package/cjs/useDataList/useDataList.js.map +0 -1
  199. package/cjs/utils.js.map +0 -1
  200. package/cjs/virtualization/AutoHeightList.js.map +0 -1
  201. package/cjs/virtualization/FluidHeightList.js.map +0 -1
  202. package/cjs/virtualization/index.js.map +0 -1
  203. package/constants/package.json +0 -10
  204. package/createDataInstance/createInstancePlugin/package.json +0 -10
  205. package/createDataInstance/createInstanceRef/package.json +0 -10
  206. package/createDataInstance/utils/package.json +0 -10
  207. package/defer-render-hoc/package.json +0 -10
  208. package/esm/Animations/BaseAnimation.js.map +0 -1
  209. package/esm/Animations/Grow.js.map +0 -1
  210. package/esm/Animations/GrowRight.js.map +0 -1
  211. package/esm/Animations/GrowVertical.js.map +0 -1
  212. package/esm/CheckableGroup.js.map +0 -1
  213. package/esm/DeferRenderAfterComputation.js.map +0 -1
  214. package/esm/FocusGroup/FocusGrid.js.map +0 -1
  215. package/esm/FocusGroup/FocusGroup.js.map +0 -1
  216. package/esm/FocusGroup/FocusGroupContext.js.map +0 -1
  217. package/esm/FocusGroup/FocusGroupManager.js.map +0 -1
  218. package/esm/FocusGroup/focusGroupManagerHoc.js.map +0 -1
  219. package/esm/FocusGroup/index.js.map +0 -1
  220. package/esm/FocusGroup/useFocusGroupItem.js.map +0 -1
  221. package/esm/FocusGroup/utils/getNextCellPosition.js.map +0 -1
  222. package/esm/GroupContext/Group.js.map +0 -1
  223. package/esm/GroupContext/GroupContext.js.map +0 -1
  224. package/esm/GroupContext/GroupItem.js.map +0 -1
  225. package/esm/GroupContext/index.js.map +0 -1
  226. package/esm/ScrollSync/ScrollSync.js.map +0 -1
  227. package/esm/ScrollSync/ScrollSyncPane.js.map +0 -1
  228. package/esm/ScrollSync/ScrollSyncProvider.js.map +0 -1
  229. package/esm/ScrollSync/index.js.map +0 -1
  230. package/esm/ScrollSync/useScrollSync.js.map +0 -1
  231. package/esm/constants.js.map +0 -1
  232. package/esm/createDataInstance/createInstancePlugin.js.map +0 -1
  233. package/esm/createDataInstance/createInstanceRef.js.map +0 -1
  234. package/esm/createDataInstance/utils.js.map +0 -1
  235. package/esm/defer-render-hoc/index.js.map +0 -1
  236. package/esm/index.js.map +0 -1
  237. package/esm/react-spring/index.js.map +0 -1
  238. package/esm/react-spring/renderprops.js.map +0 -1
  239. package/esm/toolbar/ToolbarProvider.js.map +0 -1
  240. package/esm/useDataGrid/VolatileRowsListener.js.map +0 -1
  241. package/esm/useDataGrid/index.js.map +0 -1
  242. package/esm/useDataGrid/initColumnDefinition.js.map +0 -1
  243. package/esm/useDataGrid/useDataGrid.js.map +0 -1
  244. package/esm/useDataList/index.js.map +0 -1
  245. package/esm/useDataList/recordIterator.js.map +0 -1
  246. package/esm/useDataList/useDataList.js.map +0 -1
  247. package/esm/utils.js.map +0 -1
  248. package/esm/virtualization/AutoHeightList.js.map +0 -1
  249. package/esm/virtualization/FluidHeightList.js.map +0 -1
  250. package/esm/virtualization/index.js.map +0 -1
  251. package/react-spring/package.json +0 -10
  252. package/react-spring/renderprops/package.json +0 -10
  253. package/toolbar/ToolbarProvider/package.json +0 -10
  254. package/useDataGrid/VolatileRowsListener/package.json +0 -10
  255. package/useDataGrid/initColumnDefinition/package.json +0 -10
  256. package/useDataGrid/package.json +0 -10
  257. package/useDataGrid/useDataGrid/package.json +0 -10
  258. package/useDataList/package.json +0 -10
  259. package/useDataList/recordIterator/package.json +0 -10
  260. package/useDataList/useDataList/package.json +0 -10
  261. package/utils/package.json +0 -10
  262. package/virtualization/AutoHeightList/package.json +0 -10
  263. package/virtualization/FluidHeightList/package.json +0 -10
  264. package/virtualization/package.json +0 -10
@@ -0,0 +1,8 @@
1
+ export default function useDataGrid({ uuid: uuidProp, plugins: pluginsFromProps, rows, columns, renderers, ...props }: {
2
+ [x: string]: any;
3
+ uuid: any;
4
+ plugins: any;
5
+ rows: any;
6
+ columns: any;
7
+ renderers?: {} | undefined;
8
+ }): any;
@@ -0,0 +1 @@
1
+ export { default } from './useDataList';
@@ -0,0 +1 @@
1
+ export declare function recordIterator(records: any, strategy: (() => never) | undefined, decorators: never[] | undefined, instance: any): any[];
@@ -0,0 +1,13 @@
1
+ export declare const getItemLabel: (record: any, nameKey?: string) => any;
2
+ export declare const getItemChildren: (record: any, childrenKey?: string) => any;
3
+ export default function useDataList({ data, plugins, renderers, itemRenderer, customDecorators, ...props }: {
4
+ [x: string]: any;
5
+ data?: never[] | undefined;
6
+ plugins?: never[] | undefined;
7
+ renderers?: {
8
+ list: string;
9
+ item: string;
10
+ } | undefined;
11
+ itemRenderer?: never[] | undefined;
12
+ customDecorators: any;
13
+ }): undefined;
@@ -0,0 +1,22 @@
1
+ export declare const objectType: (obj: any) => string;
2
+ export declare const isDefined: (param: any) => boolean;
3
+ export declare const isUndefined: (param: any) => boolean;
4
+ export declare const isFunction: (param: any) => boolean;
5
+ export declare const isNumber: (param: any) => boolean;
6
+ export declare const isString: (str: any) => boolean;
7
+ export declare const isArray: (arr: any) => boolean;
8
+ export declare const closest: (target: any, selector: any) => any;
9
+ export declare const getOffsetRect: (elem: any) => {
10
+ top: number;
11
+ left: number;
12
+ };
13
+ export declare const getTotalScroll: (elem: any) => {
14
+ top: number;
15
+ left: number;
16
+ };
17
+ export declare const getTransformProps: (x: any, y: any) => {
18
+ transform: string;
19
+ };
20
+ export declare const listWithChildren: (list: any, childrenProp: any) => any;
21
+ export declare const getAllNonEmptyNodesIds: (items: any, childrenProp: any) => any;
22
+ export declare const isInternetExplorer: () => boolean;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const AutoHeightList: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const FluidHeightList: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
@@ -0,0 +1,9 @@
1
+ import { FluidHeightList } from './FluidHeightList';
2
+ import { AutoHeightList } from './AutoHeightList';
3
+ export { FluidHeightList, AutoHeightList };
4
+ export declare function getVirtualListComponent({ component: Component, fluid, height, autoHeight, }: {
5
+ component: any;
6
+ fluid: any;
7
+ height: any;
8
+ autoHeight: any;
9
+ }): any;
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-shared/Animations/BaseAnimation",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/Animations/BaseAnimation.js",
9
- "module": "../../esm/Animations/BaseAnimation.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-shared/Animations/Grow",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/Animations/Grow.js",
9
- "module": "../../esm/Animations/Grow.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-shared/Animations/GrowRight",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/Animations/GrowRight.js",
9
- "module": "../../esm/Animations/GrowRight.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-shared/Animations/GrowVertical",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/Animations/GrowVertical.js",
9
- "module": "../../esm/Animations/GrowVertical.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-shared/CheckableGroup",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../cjs/CheckableGroup.js",
9
- "module": "../esm/CheckableGroup.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-shared/DeferRenderAfterComputation",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../cjs/DeferRenderAfterComputation.js",
9
- "module": "../esm/DeferRenderAfterComputation.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-shared/FocusGroup/FocusGrid",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/FocusGroup/FocusGrid.js",
9
- "module": "../../esm/FocusGroup/FocusGrid.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-shared/FocusGroup/FocusGroup",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/FocusGroup/FocusGroup.js",
9
- "module": "../../esm/FocusGroup/FocusGroup.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-shared/FocusGroup/FocusGroupContext",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/FocusGroup/FocusGroupContext.js",
9
- "module": "../../esm/FocusGroup/FocusGroupContext.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-shared/FocusGroup/FocusGroupManager",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/FocusGroup/FocusGroupManager.js",
9
- "module": "../../esm/FocusGroup/FocusGroupManager.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-shared/FocusGroup/focusGroupManagerHoc",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/FocusGroup/focusGroupManagerHoc.js",
9
- "module": "../../esm/FocusGroup/focusGroupManagerHoc.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-shared/FocusGroup",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../cjs/FocusGroup/index.js",
9
- "module": "../esm/FocusGroup/index.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-shared/FocusGroup/useFocusGroupItem",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/FocusGroup/useFocusGroupItem.js",
9
- "module": "../../esm/FocusGroup/useFocusGroupItem.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-shared/FocusGroup/utils/getNextCellPosition",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../../cjs/FocusGroup/utils/getNextCellPosition.js",
9
- "module": "../../../esm/FocusGroup/utils/getNextCellPosition.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-shared/GroupContext/Group",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/GroupContext/Group.js",
9
- "module": "../../esm/GroupContext/Group.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-shared/GroupContext/GroupContext",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/GroupContext/GroupContext.js",
9
- "module": "../../esm/GroupContext/GroupContext.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-shared/GroupContext/GroupItem",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/GroupContext/GroupItem.js",
9
- "module": "../../esm/GroupContext/GroupItem.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-shared/GroupContext",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../cjs/GroupContext/index.js",
9
- "module": "../esm/GroupContext/index.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-shared/ScrollSync/ScrollSync",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/ScrollSync/ScrollSync.js",
9
- "module": "../../esm/ScrollSync/ScrollSync.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-shared/ScrollSync/ScrollSyncPane",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/ScrollSync/ScrollSyncPane.js",
9
- "module": "../../esm/ScrollSync/ScrollSyncPane.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-shared/ScrollSync/ScrollSyncProvider",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/ScrollSync/ScrollSyncProvider.js",
9
- "module": "../../esm/ScrollSync/ScrollSyncProvider.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-shared/ScrollSync",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../cjs/ScrollSync/index.js",
9
- "module": "../esm/ScrollSync/index.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-shared/ScrollSync/useScrollSync",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/ScrollSync/useScrollSync.js",
9
- "module": "../../esm/ScrollSync/useScrollSync.js"
10
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaseAnimation.js","sources":["../../../src/Animations/BaseAnimation.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { Transition } from 'react-spring/renderprops.cjs';\n\nconst BaseAnimation = ({\n keys = undefined,\n items = [],\n duration = 100,\n enter = {},\n from = {},\n leave = {},\n onRest = () => null,\n children,\n}) => (\n <Transition\n config={{ duration }}\n enter={enter}\n from={from}\n items={items}\n keys={keys}\n leave={leave}\n onRest={onRest}\n >\n {children}\n </Transition>\n);\n\nexport default BaseAnimation;\n"],"names":["BaseAnimation","keys","undefined","items","duration","enter","from","leave","onRest","children","React","Transition"],"mappings":";;;;;;;;;AAAA;;IAIMA,aAAa,GAAG,SAAhBA,aAAgB;AAAA,uBACpBC,IADoB;AAAA,MACpBA,IADoB,0BACbC,SADa;AAAA,wBAEpBC,KAFoB;AAAA,MAEpBA,KAFoB,2BAEZ,EAFY;AAAA,2BAGpBC,QAHoB;AAAA,MAGpBA,QAHoB,8BAGT,GAHS;AAAA,wBAIpBC,KAJoB;AAAA,MAIpBA,KAJoB,2BAIZ,EAJY;AAAA,uBAKpBC,IALoB;AAAA,MAKpBA,IALoB,0BAKb,EALa;AAAA,wBAMpBC,KANoB;AAAA,MAMpBA,KANoB,2BAMZ,EANY;AAAA,yBAOpBC,MAPoB;AAAA,MAOpBA,MAPoB,4BAOX;AAAA,WAAM,IAAN;AAAA,GAPW;AAAA,MAQpBC,QARoB,QAQpBA,QARoB;AAAA,sBAUpBC,wCAACC,0BAAD;AACE,IAAA,MAAM,EAAE;AAAEP,MAAAA,QAAQ,EAARA;AAAF,KADV;AAEE,IAAA,KAAK,EAAEC,KAFT;AAGE,IAAA,IAAI,EAAEC,IAHR;AAIE,IAAA,KAAK,EAAEH,KAJT;AAKE,IAAA,IAAI,EAAEF,IALR;AAME,IAAA,KAAK,EAAEM,KANT;AAOE,IAAA,MAAM,EAAEC;AAPV,KASGC,QATH,CAVoB;AAAA;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Grow.js","sources":["../../../src/Animations/Grow.tsx"],"sourcesContent":["import React from 'react';\nimport BaseAnimation from './BaseAnimation';\n\nconst Grow = ({\n keys = undefined,\n duration,\n items = undefined,\n from = 0,\n to = 1,\n children,\n onRest = () => null,\n}) => (\n <BaseAnimation\n duration={duration}\n enter={{ opacity: 1, transform: `scale(${to})` }}\n from={{ opacity: 0, transform: `scale(${from})` }}\n items={items}\n keys={keys}\n leave={{ opacity: 0, transform: `scale(${from})` }}\n onRest={onRest}\n >\n {children}\n </BaseAnimation>\n);\n\nexport default Grow;\n"],"names":["Grow","keys","undefined","duration","items","from","to","children","onRest","React","BaseAnimation","opacity","transform"],"mappings":";;;;;;;;;;IAGMA,IAAI,GAAG,SAAPA,IAAO;AAAA,uBACXC,IADW;AAAA,MACXA,IADW,0BACJC,SADI;AAAA,MAEXC,QAFW,QAEXA,QAFW;AAAA,wBAGXC,KAHW;AAAA,MAGXA,KAHW,2BAGHF,SAHG;AAAA,uBAIXG,IAJW;AAAA,MAIXA,IAJW,0BAIJ,CAJI;AAAA,qBAKXC,EALW;AAAA,MAKXA,EALW,wBAKN,CALM;AAAA,MAMXC,QANW,QAMXA,QANW;AAAA,yBAOXC,MAPW;AAAA,MAOXA,MAPW,4BAOF;AAAA,WAAM,IAAN;AAAA,GAPE;AAAA,sBASXC,wCAACC,wBAAD;AACE,IAAA,QAAQ,EAAEP,QADZ;AAEE,IAAA,KAAK,EAAE;AAAEQ,MAAAA,OAAO,EAAE,CAAX;AAAcC,MAAAA,SAAS,kBAAWN,EAAX;AAAvB,KAFT;AAGE,IAAA,IAAI,EAAE;AAAEK,MAAAA,OAAO,EAAE,CAAX;AAAcC,MAAAA,SAAS,kBAAWP,IAAX;AAAvB,KAHR;AAIE,IAAA,KAAK,EAAED,KAJT;AAKE,IAAA,IAAI,EAAEH,IALR;AAME,IAAA,KAAK,EAAE;AAAEU,MAAAA,OAAO,EAAE,CAAX;AAAcC,MAAAA,SAAS,kBAAWP,IAAX;AAAvB,KANT;AAOE,IAAA,MAAM,EAAEG;AAPV,KASGD,QATH,CATW;AAAA;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"GrowRight.js","sources":["../../../src/Animations/GrowRight.tsx"],"sourcesContent":["import React from 'react';\nimport BaseAnimation from './BaseAnimation';\n\nconst GrowRight = ({\n keys = undefined,\n items = undefined,\n duration = 200,\n from = 0,\n to = 1,\n children,\n onRest = () => null,\n}) => (\n <BaseAnimation\n duration={duration}\n enter={{\n opacity: `${to}`,\n transform: 'translateX(0px)',\n }}\n from={{\n opacity: `${from}`,\n transform: 'translateX(100%)',\n }}\n items={items}\n keys={keys}\n leave={{\n opacity: `${from}`,\n transform: 'translateX(100%)',\n }}\n onRest={onRest}\n >\n {children}\n </BaseAnimation>\n);\n\nexport default GrowRight;\n"],"names":["GrowRight","keys","undefined","items","duration","from","to","children","onRest","React","BaseAnimation","opacity","transform"],"mappings":";;;;;;;;;;IAGMA,SAAS,GAAG,SAAZA,SAAY;AAAA,uBAChBC,IADgB;AAAA,MAChBA,IADgB,0BACTC,SADS;AAAA,wBAEhBC,KAFgB;AAAA,MAEhBA,KAFgB,2BAERD,SAFQ;AAAA,2BAGhBE,QAHgB;AAAA,MAGhBA,QAHgB,8BAGL,GAHK;AAAA,uBAIhBC,IAJgB;AAAA,MAIhBA,IAJgB,0BAIT,CAJS;AAAA,qBAKhBC,EALgB;AAAA,MAKhBA,EALgB,wBAKX,CALW;AAAA,MAMhBC,QANgB,QAMhBA,QANgB;AAAA,yBAOhBC,MAPgB;AAAA,MAOhBA,MAPgB,4BAOP;AAAA,WAAM,IAAN;AAAA,GAPO;AAAA,sBAShBC,wCAACC,wBAAD;AACE,IAAA,QAAQ,EAAEN,QADZ;AAEE,IAAA,KAAK,EAAE;AACLO,MAAAA,OAAO,YAAKL,EAAL,CADF;AAELM,MAAAA,SAAS,EAAE;AAFN,KAFT;AAME,IAAA,IAAI,EAAE;AACJD,MAAAA,OAAO,YAAKN,IAAL,CADH;AAEJO,MAAAA,SAAS,EAAE;AAFP,KANR;AAUE,IAAA,KAAK,EAAET,KAVT;AAWE,IAAA,IAAI,EAAEF,IAXR;AAYE,IAAA,KAAK,EAAE;AACLU,MAAAA,OAAO,YAAKN,IAAL,CADF;AAELO,MAAAA,SAAS,EAAE;AAFN,KAZT;AAgBE,IAAA,MAAM,EAAEJ;AAhBV,KAkBGD,QAlBH,CATgB;AAAA;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"GrowVertical.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"CheckableGroup.js","sources":["../../src/CheckableGroup.tsx"],"sourcesContent":["import React, { cloneElement } from 'react';\nimport PropTypes from 'prop-types';\nimport { addOrRemove, runAll, useDerivedStateFromProps } from '@elliemae/ds-utilities';\n\nexport function useCheckableGroup({\n children,\n active: activeProp,\n multi,\n onCheck = () => null,\n}) {\n const [active, setActive] = useDerivedStateFromProps(activeProp);\n\n const handleCheck = ({ target: { value } }, item) => {\n setActive(prevActive => {\n const nextActive = multi ? addOrRemove(prevActive, value) : value;\n onCheck(nextActive, item);\n return nextActive;\n });\n };\n\n return React.Children.map(children, child => {\n const { props } = child;\n const checked = Array.isArray(active)\n ? active.indexOf(props.name) !== -1\n : active === props.name;\n\n return cloneElement(child, {\n ...props,\n checked,\n onClick: runAll(handleCheck, props.onClick),\n });\n });\n}\n\nfunction CheckableGroup({\n active = [],\n multi = false, // checkbox or radio\n children,\n}) {\n return useCheckableGroup({ active, multi, children });\n}\n\nCheckableGroup.propTypes = {\n /* The item (if multi false) or items (if multi true) selected */\n active: PropTypes.arrayOf(PropTypes.string),\n /* Whether is multi select or not */\n multi: PropTypes.bool,\n /* Handler when a user checks an item */\n onCheck: PropTypes.func,\n};\n\nexport default CheckableGroup;\n"],"names":["useCheckableGroup","children","activeProp","active","multi","onCheck","useDerivedStateFromProps","setActive","handleCheck","item","value","target","prevActive","nextActive","addOrRemove","React","Children","map","child","props","checked","Array","isArray","indexOf","name","cloneElement","onClick","runAll","CheckableGroup","propTypes","PropTypes","arrayOf","string","bool","func"],"mappings":";;;;;;;;;;;;;;;;;;;;AAIO,SAASA,iBAAT,OAKJ;AAAA,MAJDC,QAIC,QAJDA,QAIC;AAAA,MAHOC,UAGP,QAHDC,MAGC;AAAA,MAFDC,KAEC,QAFDA,KAEC;AAAA,0BADDC,OACC;AAAA,MADDA,OACC,6BADS;AAAA,WAAM,IAAN;AAAA,GACT;;AACD,8BAA4BC,oCAAwB,CAACJ,UAAD,CAApD;AAAA;AAAA,MAAOC,MAAP;AAAA,MAAeI,SAAf;;AAEA,MAAMC,WAAW,GAAG,SAAdA,WAAc,QAAwBC,IAAxB,EAAiC;AAAA,QAApBC,KAAoB,SAA9BC,MAA8B,CAApBD,KAAoB;AACnDH,IAAAA,SAAS,CAAC,UAAAK,UAAU,EAAI;AACtB,UAAMC,UAAU,GAAGT,KAAK,GAAGU,uBAAW,CAACF,UAAD,EAAaF,KAAb,CAAd,GAAoCA,KAA5D;AACAL,MAAAA,OAAO,CAACQ,UAAD,EAAaJ,IAAb,CAAP;AACA,aAAOI,UAAP;AACD,KAJQ,CAAT;AAKD,GAND;;AAQA,SAAOE,yBAAK,CAACC,QAAN,CAAeC,GAAf,CAAmBhB,QAAnB,EAA6B,UAAAiB,KAAK,EAAI;AAC3C,QAAQC,KAAR,GAAkBD,KAAlB,CAAQC,KAAR;AACA,QAAMC,OAAO,GAAGC,KAAK,CAACC,OAAN,CAAcnB,MAAd,IACZA,MAAM,CAACoB,OAAP,CAAeJ,KAAK,CAACK,IAArB,MAA+B,CAAC,CADpB,GAEZrB,MAAM,KAAKgB,KAAK,CAACK,IAFrB;AAIA,wBAAOC,kBAAY,CAACP,KAAD,kCACdC,KADc;AAEjBC,MAAAA,OAAO,EAAPA,OAFiB;AAGjBM,MAAAA,OAAO,EAAEC,kBAAM,CAACnB,WAAD,EAAcW,KAAK,CAACO,OAApB;AAHE,OAAnB;AAKD,GAXM,CAAP;AAYD;;AAED,SAASE,cAAT,QAIG;AAAA,2BAHDzB,MAGC;AAAA,MAHDA,MAGC,6BAHQ,EAGR;AAAA,0BAFDC,KAEC;AAAA,MAFDA,KAEC,4BAFO,KAEP;AAAA,MADDH,QACC,SADDA,QACC;AACD,SAAOD,iBAAiB,CAAC;AAAEG,IAAAA,MAAM,EAANA,MAAF;AAAUC,IAAAA,KAAK,EAALA,KAAV;AAAiBH,IAAAA,QAAQ,EAARA;AAAjB,GAAD,CAAxB;AACD;;AAED2B,cAAc,CAACC,SAAf,GAA2B;AACzB;AACA1B,EAAAA,MAAM,EAAE2B,6BAAS,CAACC,OAAV,CAAkBD,6BAAS,CAACE,MAA5B,CAFiB;;AAGzB;AACA5B,EAAAA,KAAK,EAAE0B,6BAAS,CAACG,IAJQ;;AAKzB;AACA5B,EAAAA,OAAO,EAAEyB,6BAAS,CAACI;AANM,CAA3B;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeferRenderAfterComputation.js","sources":["../../src/DeferRenderAfterComputation.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport raf from 'raf';\n\nexport default function DeferRenderAfterComputation({\n children,\n resolve,\n fallback,\n timeout = 2000,\n}) {\n const [shouldRender, setShouldRender] = useState(false);\n\n useEffect(() => {\n // eslint-disable-next-line max-nested-callbacks\n raf(() =>\n raf(() =>\n resolve().then(() => {\n setShouldRender(true);\n }),\n ),\n );\n }, []);\n return shouldRender ? children : fallback;\n}\n"],"names":["DeferRenderAfterComputation","children","resolve","fallback","timeout","useState","shouldRender","setShouldRender","useEffect","raf","then"],"mappings":";;;;;;;;;;;AAGe,SAASA,2BAAT,OAKZ;AAAA,MAJDC,QAIC,QAJDA,QAIC;AAAA,MAHDC,OAGC,QAHDA,OAGC;AAAA,MAFDC,QAEC,QAFDA,QAEC;AAAA,WADDC,OACC;;AACD,kBAAwCC,cAAQ,CAAC,KAAD,CAAhD;AAAA;AAAA,MAAOC,YAAP;AAAA,MAAqBC,eAArB;;AAEAC,EAAAA,eAAS,CAAC,YAAM;AACd;AACAC,IAAAA,uBAAG,CAAC;AAAA,aACFA,uBAAG,CAAC;AAAA,eACFP,OAAO,GAAGQ,IAAV,CAAe,YAAM;AACnBH,UAAAA,eAAe,CAAC,IAAD,CAAf;AACD,SAFD,CADE;AAAA,OAAD,CADD;AAAA,KAAD,CAAH;AAOD,GATQ,EASN,EATM,CAAT;AAUA,SAAOD,YAAY,GAAGL,QAAH,GAAcE,QAAjC;AACD;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FocusGrid.js","sources":["../../../src/FocusGroup/FocusGrid.tsx"],"sourcesContent":["import React, { createContext, useEffect, useMemo, useRef } from 'react';\nimport { isFunction, runAll, get, useHotkeys, mergeRefs } from '@elliemae/ds-utilities';\nimport getNextCellPosition from './utils/getNextCellPosition';\n\nexport const FocusGridContext = createContext();\nconst { Provider } = FocusGridContext;\n\nconst preventDefault = e => e.preventDefault();\n\nfunction registerHotKeysHooks(hotKeys, { focusedRow, focusedCell }) {\n Object.keys(hotKeys).forEach(key => {\n const { handler, options } = hotKeys[key];\n useHotkeys({\n keys: key,\n handler: e => {\n e.preventDefault();\n handler({\n rowIndex: focusedRow.current,\n cellIndex: focusedCell.current,\n });\n },\n options,\n });\n });\n}\n\n// eslint-disable-next-line max-statements\nexport default function FocusGridProvider({\n shouldWrapRows = false,\n shouldWrapCells = false,\n shouldRefocus = true,\n children,\n keyBindings,\n hotKeys,\n}) {\n const focusedRow = useRef();\n const focusedCell = useRef();\n const grid = useRef([]);\n const containerRef = useRef(document);\n const child = React.Children.only(children);\n const decoratedChild = React.cloneElement(child, {\n innerRef: mergeRefs(child.props.innerRef, containerRef),\n });\n\n const getNode = ({ rowIndex, cellIndex }) =>\n get(grid.current, [rowIndex, cellIndex]);\n\n const register = (node, rowIndex, columnIndex) => {\n if (!node) return;\n if (!Array.isArray(grid.current[rowIndex])) {\n grid.current[rowIndex] = [];\n }\n\n if (rowIndex === 0 && columnIndex === 0) {\n node.setAttribute('tabindex', 0);\n } else {\n node.setAttribute('tabindex', -1);\n }\n\n node.onfocus = () => {\n const prevNode = getNode({\n rowIndex: focusedRow.current,\n cellIndex: focusedCell.current,\n });\n\n if (prevNode) prevNode.setAttribute('tabindex', -1);\n\n node.setAttribute('tabindex', 0);\n focusedRow.current = rowIndex;\n focusedCell.current = columnIndex;\n };\n grid.current[rowIndex][columnIndex] = node;\n };\n\n useEffect(() => {\n if (shouldRefocus) {\n const rowIndex = focusedRow.current;\n const cellIndex = focusedCell.current;\n\n const node = get(grid.current, [rowIndex, cellIndex]);\n if (node) node.focus();\n }\n });\n\n const focusNextCell = (directionY, directionX, position) => {\n const { rowIndex, cellIndex } =\n position ||\n getNextCellPosition({\n grid: grid.current,\n currentCell: focusedCell.current,\n currentRow: focusedRow.current,\n directionX,\n directionY,\n shouldWrapCells,\n shouldWrapRows,\n });\n\n const node = getNode({ rowIndex, cellIndex });\n\n // can focus\n if (node) {\n node.focus();\n focusedRow.current = rowIndex;\n focusedCell.current = cellIndex;\n }\n };\n\n registerHotKeysHooks(hotKeys, { focusedCell, focusedRow });\n\n const defaultKeyBindings = {\n ArrowUp: runAll(preventDefault, () => focusNextCell(-1, 0)),\n ArrowRight: runAll(preventDefault, () => focusNextCell(0, 1)),\n ArrowDown: runAll(preventDefault, () => focusNextCell(1, 0)),\n ArrowLeft: runAll(preventDefault, () => focusNextCell(0, -1)),\n Home: runAll(preventDefault, e => {\n let rowIndex = focusedRow.current;\n if (e.ctrlKey) {\n rowIndex = 0;\n }\n focusNextCell(0, 0, { rowIndex, cellIndex: 0 });\n }),\n End: runAll(preventDefault, e => {\n let rowIndex = focusedRow.current;\n if (e.ctrlKey) {\n rowIndex = grid.current.length - 1;\n }\n focusNextCell(0, 0, { rowIndex, cellIndex: grid.current[0].length - 1 });\n }),\n ...keyBindings,\n };\n const nextKeyBindings = isFunction(keyBindings)\n ? keyBindings({\n defaultBindings: defaultKeyBindings,\n rowIndex: focusedRow.current,\n cellIndex: focusedCell.current,\n })\n : { ...defaultKeyBindings, ...keyBindings };\n\n const onKeyDown = e => {\n if (e.target.tagName.toLowerCase() === 'input') return;\n const action = nextKeyBindings[e.key];\n if (isFunction(action)) action(e);\n };\n\n const activate = container => {\n container.addEventListener('keydown', onKeyDown, true);\n };\n\n const deactivate = container => {\n container.removeEventListener('keydown', onKeyDown, true);\n };\n\n useEffect(() => {\n activate(containerRef.current);\n return () => {\n deactivate(containerRef.current);\n };\n }, []);\n\n const valueProvider = useMemo(\n () => ({\n register,\n }),\n [],\n );\n\n return <Provider value={valueProvider}>{decoratedChild}</Provider>;\n}\n"],"names":["FocusGridContext","createContext","Provider","preventDefault","e","registerHotKeysHooks","hotKeys","focusedRow","focusedCell","Object","keys","forEach","key","handler","options","useHotkeys","rowIndex","current","cellIndex","FocusGridProvider","shouldWrapRows","shouldWrapCells","shouldRefocus","children","keyBindings","useRef","grid","containerRef","document","child","React","Children","only","decoratedChild","cloneElement","innerRef","mergeRefs","props","getNode","get","register","node","columnIndex","Array","isArray","setAttribute","onfocus","prevNode","useEffect","focus","focusNextCell","directionY","directionX","position","getNextCellPosition","currentCell","currentRow","defaultKeyBindings","ArrowUp","runAll","ArrowRight","ArrowDown","ArrowLeft","Home","ctrlKey","End","length","nextKeyBindings","isFunction","defaultBindings","onKeyDown","target","tagName","toLowerCase","action","activate","container","addEventListener","deactivate","removeEventListener","valueProvider","useMemo"],"mappings":";;;;;;;;;;;;;;;;;IAIaA,gBAAgB,gBAAGC,mBAAa;AAC7C,IAAQC,QAAR,GAAqBF,gBAArB,CAAQE,QAAR;;AAEA,IAAMC,cAAc,GAAG,S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;;AAIAtB,EAAAA,eAAS,CAAC,YAAM;AACd2B,IAAAA,QAAQ,CAAChD,YAAY,CAACV,OAAd,CAAR;AACA,WAAO,YAAM;AACX6D,MAAAA,UAAU,CAACnD,YAAY,CAACV,OAAd,CAAV;AACD,KAFD;AAGD,GALQ,EAKN,EALM,CAAT;AAOA,MAAM+D,aAAa,GAAGC,aAAO,CAC3B;AAAA,WAAO;AACLzC,MAAAA,QAAQ,EAARA;AADK,KAAP;AAAA,GAD2B,EAI3B,EAJ2B,CAA7B;AAOA,sBAAOV,wCAAC,QAAD;AAAU,IAAA,KAAK,EAAEkD;AAAjB,KAAiC/C,cAAjC,CAAP;AACD;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FocusGroup.js","sources":["../../../src/FocusGroup/FocusGroup.tsx"],"sourcesContent":["/* eslint-disable no-param-reassign */\n/* eslint-disable max-statements */\n/* eslint-disable max-lines */\nimport { isFunction, get } from '@elliemae/ds-utilities';\nimport hotkeys from 'hotkeys-js';\n\nconst defaultOptions = {\n orientation: 'vertical',\n};\n\nconst safeCallAction = (e, fun, ...args) => {\n if (isFunction(fun)) {\n e.preventDefault();\n fun(...args);\n }\n};\n\nconst registerHotkeys = (\n hotKeys = {},\n params,\n getContainer = () => document,\n) => {\n Object.keys(hotKeys).forEach((hotkey) => {\n const { options, handler, allowDocumentHandler = false } = hotKeys[hotkey];\n const parameterizedHandler = (e) => {\n const handlerParams = isFunction(params) ? params() : params;\n if (\n !allowDocumentHandler &&\n handlerParams.item !== document.activeElement\n )\n return;\n e.preventDefault();\n handler(handlerParams);\n };\n hotkeys(\n hotkey,\n { element: getContainer(), ...options },\n parameterizedHandler,\n );\n });\n};\n\nconst unregisterHotKeys = (hotKeys = {}) => {\n Object.keys(hotKeys).forEach((hotkey) => {\n hotkeys.unbind(hotkey);\n });\n};\n\nconst noop = () => null;\n\nexport default class FocusGroup {\n items = [];\n\n constructor(options = {}) {\n this.options = { ...defaultOptions, ...options };\n\n const { orientation } = this.options;\n\n this.keyBindings = {\n ArrowUp: orientation !== 'horizontal' && 'previous',\n ArrowRight: orientation !== 'vertical' && 'next',\n ArrowDown: orientation !== 'horizontal' && 'next',\n ArrowLeft: orientation !== 'vertical' && 'previous',\n Home: 'first',\n End: 'last',\n PageUp: 'first',\n PageDown: 'last',\n Escape: 'exit',\n ...options.keyBindings,\n };\n\n this.currentFocusedItem = null;\n this.currIndex = null;\n\n this.mapActions = {\n previous: this.focusPrevious.bind(this),\n next: this.focusNext.bind(this),\n first: this.focusFirst.bind(this),\n last: this.focusLast.bind(this),\n exit: this.exit.bind(this),\n enter: () => null,\n };\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.register = this.register.bind(this);\n this.focusFirst = this.focusFirst.bind(this);\n this.focusLast = this.focusLast.bind(this);\n this.isGroupActive = this.isGroupActive.bind(this);\n this.focusNext = this.focusNext.bind(this);\n this.focusPrevious = this.focusPrevious.bind(this);\n this.focusItem = this.focusItem.bind(this);\n this.focusCurrent = this.focusCurrent.bind(this);\n this.getHotKeysParams = this.getHotKeysParams.bind(this);\n }\n\n getHotKeysParams() {\n const item = this.currentFocusedItem;\n const { index } = get(item, ['dataset'], {});\n return {\n item,\n index,\n };\n }\n\n activate() {\n const { getContainer } = this.options;\n document.addEventListener('keydown', this.handleKeyDown, true);\n registerHotkeys(this.options.hotKeys, this.getHotKeysParams, getContainer);\n }\n\n deactivate() {\n document.removeEventListener('keydown', this.handleKeyDown, true);\n unregisterHotKeys(this.options.hotKeys);\n }\n\n handleKeyDown(e) {\n if (!this.isGroupActive()) return;\n this.executeActionByEvent(e);\n }\n\n executeActionByEvent(e) {\n const actions = Array.isArray(this.keyBindings[e.key])\n ? this.keyBindings[e.key]\n : [this.keyBindings[e.key]];\n return actions.map((action) =>\n typeof action === 'string'\n ? safeCallAction(e, this.mapActions[action])\n : safeCallAction(e, action),\n );\n }\n\n register(node, props = {}) {\n const afterIndex = this.items.findIndex(\n (item) =>\n item.compareDocumentPosition(node) === Node.DOCUMENT_POSITION_PRECEDING,\n );\n node.specialOnFocus = props.onFocus || noop;\n node.specialOnBlur = props.onBlur || noop;\n node.onclick = () => this.focusItem(node);\n node.onfocus = () => {\n this.focusItem(node);\n };\n if (afterIndex === -1) {\n this.items.push(node);\n } else {\n this.items.splice(afterIndex, 0, node);\n }\n }\n\n unregister(node) {\n const index = this.getItemIndexByNode(node);\n if (index > -1) this.items.splice(index, 1);\n }\n\n exit() {\n const { onExitFocusGroup } = this.options;\n onExitFocusGroup();\n }\n\n focusItem(node) {\n if (this.currentFocusedItem && this.currentFocusedItem !== node) {\n this.currentFocusedItem.specialOnBlur();\n this.currentFocusedItem.setAttribute('tabindex', -1);\n }\n if (!node) return;\n this.currentFocusedItem = node;\n node.setAttribute('tabindex', 0);\n node.focus();\n node.specialOnFocus();\n }\n\n focusNext() {\n const item = this.getNextItem();\n this.focusItem(item);\n }\n\n focusByNode(node) {\n const index = this.getItemIndexByNode(node);\n this.focusByIndex(index);\n }\n\n focusByIndex(index) {\n const item = this.getItemByIndex(index);\n this.focusItem(item);\n }\n\n focusPrevious() {\n const prevItem = this.getPreviousItem();\n this.focusItem(prevItem);\n }\n\n focusFirst() {\n const item = this.getFirstItem();\n this.focusItem(item);\n }\n\n focusLast() {\n const item = this.getLastItem();\n this.focusItem(item);\n }\n\n focusCurrent() {\n this.focusItem(this.currentFocusedItem);\n }\n\n focusNextGroup() {\n const { onFocusNextGroup } = this.options;\n this.exit();\n onFocusNextGroup();\n }\n\n focusPreviousGroup() {\n const { onFocusPreviousGroup } = this.options;\n this.exit();\n onFocusPreviousGroup();\n }\n\n getNextItem() {\n const { loop } = this.options;\n const currentIndex = this.getFocusedIndex();\n const supposedNextIndex = currentIndex + 1;\n if (!this.checkCanFocusNext(supposedNextIndex)) {\n return loop ? this.getFirstItem() : this.focusNextGroup();\n }\n return this.getItemByIndex(supposedNextIndex);\n }\n\n getPreviousItem() {\n const { loop } = this.options;\n const currentIndex = this.getFocusedIndex();\n const supposedPrevIndex = currentIndex - 1;\n if (!this.checkCanFocusPrev(supposedPrevIndex)) {\n return loop ? this.getLastItem() : this.focusPreviousGroup();\n }\n return this.getItemByIndex(supposedPrevIndex);\n }\n\n checkCanFocusNext(index) {\n return this.items.length > index;\n }\n\n checkCanFocusPrev(index) {\n return index >= 0;\n }\n\n getItemByIndex(index) {\n return this.items[index];\n }\n\n getItemIndexByNode(node) {\n return this.items.findIndex((item) => item === node);\n }\n\n getFocusedIndex() {\n return this.getItemIndexByNode(document.activeElement);\n }\n\n getFocusedItem() {\n const index = this.getFocusedIndex();\n return index > -1 && this.items[index];\n }\n\n isGroupActive() {\n return this.getFocusedIndex() !== -1;\n }\n\n getFirstItem() {\n return !!this.items.length && this.items[0];\n }\n\n getLastItem() {\n return !!this.items.length && this.items[this.items.length - 1];\n }\n}\n"],"names":["defaultOptions","orientation","safeCallAction","e","fun","isFunction","preventDefault","args","registerHotkeys","hotKeys","params","getContainer","document","Object","keys","forEach","hotkey","options","handler","allowDocumentHandler","parameterizedHandler","handlerParams","item","activeElement","hotkeys","element","unregisterHotKeys","unbind","noop","FocusGroup","items","keyBindings","ArrowUp","ArrowRight","ArrowDown","ArrowLeft","Home","End","PageUp","PageDown","Escape","currentFocusedItem","currIndex","mapActions","previous","focusPrevious","bind","next","focusNext","first","focusFirst","last","focusLast","exit","enter","handleKeyDown","register","isGroupActive","focusItem","focusCurrent","getHotKeysParams","get","index","addEventListener","removeEventListener","executeActionByEvent","actions","Array","isArray","key","map","action","node","props","afterIndex","findIndex","compareDocumentPosition","Node","DOCUMENT_POSITION_PRECEDING","specialOnFocus","onFocus","specialOnBlur","onBlur","onclick","onfocus","push","splice","getItemIndexByNode","onExitFocusGroup","setAttribute","focus","getNextItem","focusByIndex","getItemByIndex","prevItem","getPreviousItem","getFirstItem","getLastItem","onFocusNextGroup","onFocusPreviousGroup","loop","currentIndex","getFocusedIndex","supposedNextIndex","checkCanFocusNext","focusNextGroup","supposedPrevIndex","checkCanFocusPrev","focusPreviousGroup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ED,yBAAgB;AACd,aAAO,KAAKwC,eAAL,OAA2B,CAAC,CAAnC;AACD;;;WAED,wBAAe;AACb,aAAO,CAAC,CAAC,KAAKxE,KAAL,CAAW+E,MAAb,IAAuB,KAAK/E,KAAL,CAAW,CAAX,CAA9B;AACD;;;WAED,uBAAc;AACZ,aAAO,CAAC,CAAC,KAAKA,KAAL,CAAW+E,MAAb,IAAuB,KAAK/E,KAAL,CAAW,KAAKA,KAAL,CAAW+E,MAAX,GAAoB,CAA/B,CAA9B;AACD;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FocusGroupContext.js","sources":["../../../src/FocusGroup/FocusGroupContext.tsx"],"sourcesContent":["import React from 'react';\n\nexport default React.createContext();\n"],"names":["React","createContext"],"mappings":";;;;;;;;AAEA,qCAAeA,yBAAK,CAACC,aAAN,EAAf;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FocusGroupManager.js","sources":["../../../src/FocusGroup/FocusGroupManager.tsx"],"sourcesContent":["import React, { Component, useEffect } from 'react';\nimport { isFunction } from '@elliemae/ds-utilities';\nimport FocusGroup from './FocusGroup';\nimport FocusGroupContext from './FocusGroupContext';\n\nconst noop = () => null;\n\nexport default class FocusGroupProvider extends Component {\n activated = false;\n\n static defaultProps = {\n exitWhenNoPrevious: false,\n exitWhenNoNext: false,\n keyBindings: {},\n onFocus: noop,\n onExitFocusGroup: noop,\n onFocusPreviousGroup: noop,\n onFocusNextGroup: noop,\n onFocusGroupSet: noop,\n };\n\n constructor(props) {\n super(props);\n\n this.focusGroup = new FocusGroup(props);\n\n props.onFocusGroupSet(this);\n\n this.actions = {\n activate: this.activate.bind(this),\n deactivate: this.deactivate.bind(this),\n register: this.focusGroup.register,\n unregister: this.unregister.bind(this),\n focusFirst: this.focusGroup.focusFirst,\n focusLast: this.focusGroup.focusLast,\n focusItemByIndex: this.focusItemByIndex.bind(this),\n focusItemByNode: this.focusItemByNode.bind(this),\n focus: this.focusGroup.focusCurrent,\n isGroupActive: this.focusGroup.isGroupActive,\n focusNext: this.focusGroup.focusNext,\n focusPrevious: this.focusGroup.focusPrevious,\n };\n }\n\n componentDidMount() {\n const { autoFocusOnMount } = this.props;\n\n this.activate();\n\n if (autoFocusOnMount) {\n setTimeout(() => {\n this.actions.focusFirst();\n }, 0);\n }\n }\n\n componentWillUnmount() {\n this.deactivate();\n }\n\n activate() {\n const { onActivate } = this.props;\n this.focusGroup.activate();\n this.activated = true;\n if (isFunction(onActivate)) onActivate();\n }\n\n deactivate() {\n const { onExitFocusGroup } = this.props;\n this.activated = false;\n this.focusGroup.deactivate();\n if (isFunction(onExitFocusGroup)) {\n onExitFocusGroup();\n }\n }\n\n register(item) {\n this.focusGroup.register(item);\n }\n\n unregister(item) {\n this.focusGroup.unregister(item);\n }\n\n focusItemByIndex(index) {\n if (!this.activated) this.activate();\n setTimeout(() => {\n this.focusGroup.focusByIndex(index);\n }, 200);\n }\n\n focusItemByNode(node) {\n if (!this.activated) this.activate();\n const index = this.focusGroup.getItemIndexByNode(node);\n this.focusItemByIndex(index);\n }\n\n render() {\n const { children } = this.props;\n return (\n <FocusGroupContext.Provider value={this.actions}>\n {children}\n </FocusGroupContext.Provider>\n );\n }\n}\n"],"names":["noop","FocusGroupProvider","props","activated","focusGroup","FocusGroup","onFocusGroupSet","actions","activate","bind","deactivate","register","unregister","focusFirst","focusLast","focusItemByIndex","focusItemByNode","focus","focusCurrent","isGroupActive","focusNext","focusPrevious","autoFocusOnMount","setTimeout","onActivate","isFunction","onExitFocusGroup","item","index","focusByIndex","node","getItemIndexByNode","children","React","FocusGroupContext","Component","defaultProps","exitWhenNoPrevious","exitWhenNoNext","keyBindings","onFocus","onFocusPreviousGroup","onFocusNextGroup"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAMA,IAAI,GAAG,SAAPA,IAAO;AAAA,SAAM,IAAN;AAAA,CAAb;;IAEqBC;;;;;AAcnB,8BAAYC,KAAZ,EAAmB;AAAA;;AAAA;;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KAFI;AAGpBC,EAAAA,WAAW,EAAE,EAHO;AAIpBC,EAAAA,OAAO,EAAExC,IAJW;AAKpB0B,EAAAA,gBAAgB,EAAE1B,IALE;AAMpByC,EAAAA,oBAAoB,EAAEzC,IANF;AAOpB0C,EAAAA,gBAAgB,EAAE1C,IAPE;AAQpBM,EAAAA,eAAe,EAAEN;AARG;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"focusGroupManagerHoc.js","sources":["../../../src/FocusGroup/focusGroupManagerHoc.tsx"],"sourcesContent":["/* eslint-disable react/display-name */\nimport React from 'react';\nimport FocusGroupManager from './FocusGroupManager';\n\nexport default function FocusGroupHoc(WrappedComponent, options = {}) {\n return ({\n onExitFocusGroup,\n onFocusPrevGroup,\n focusKeyBindings,\n ...props\n }) => (\n <FocusGroupManager\n keyBindings={focusKeyBindings}\n onExitFocusGroup={onExitFocusGroup}\n onFocusPrevGroup={onFocusPrevGroup}\n {...options}\n >\n <WrappedComponent {...props} {...options} />\n </FocusGroupManager>\n );\n}\n"],"names":["FocusGroupHoc","WrappedComponent","options","onExitFocusGroup","onFocusPrevGroup","focusKeyBindings","props","React","FocusGroupManager"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAIe,SAASA,aAAT,CAAuBC,gBAAvB,EAAuD;AAAA,MAAdC,OAAc,uEAAJ,EAAI;AACpE,SAAO;AAAA,QACLC,gBADK,QACLA,gBADK;AAAA,QAELC,gBAFK,QAELA,gBAFK;AAAA,QAGLC,gBAHK,QAGLA,gBAHK;AAAA,QAIFC,KAJE;;AAAA,wBAMLC,wCAACC,4BAAD;AACE,MAAA,WAAW,EAAEH,gBADf;AAEE,MAAA,gBAAgB,EAAEF,gBAFpB;AAGE,MAAA,gBAAgB,EAAEC;AAHpB,OAIMF,OAJN,gBAMEK,wCAAC,gBAAD,mCAAsBD,KAAtB,EAAiCJ,OAAjC,EANF,CANK;AAAA,GAAP;AAeD;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useFocusGroupItem.js","sources":["../../../src/FocusGroup/useFocusGroupItem.tsx"],"sourcesContent":["import { useContext, useEffect } from 'react';\nimport FocusGroupContext from './FocusGroupContext';\n\nexport default function useFocusGroupItem(ref = {}, props) {\n const { register, unregister, ...otherActions } =\n useContext(FocusGroupContext) || {};\n\n useEffect(() => {\n if (ref.current && register) register(ref.current, props);\n return () => {\n if (ref.current && unregister) unregister(ref.current);\n };\n });\n\n // if the focus item is not wrapped with the focus provider then return null\n if (!register) return {};\n return otherActions;\n}\n\nexport const useFocusGroupWithState = (ref = {}, props) => {\n const { register, unregister, ...otherActions } =\n useContext(FocusGroupContext) || {};\n\n useEffect(() => {\n if (ref && register) register(ref, props);\n return () => {\n if (ref && unregister) unregister(ref);\n };\n }, [ref]);\n\n // if the focus item is not wrapped with the focus provider then return null\n if (!register) return {};\n return otherActions;\n};\n"],"names":["useFocusGroupItem","ref","props","useContext","FocusGroupContext","register","unregister","otherActions","useEffect","current","useFocusGroupWithState"],"mappings":";;;;;;;;;;;;;;AAGe,SAASA,iBAAT,GAA4C;AAAA,MAAjBC,GAAiB,uEAAX,EAAW;AAAA,MAAPC,KAAO;;AACzD,aACEC,gBAAU,CAACC,4BAAD,CAAV,IAAiC,EADnC;AAAA,MAAQC,QAAR,QAAQA,QAAR;AAAA,MAAkBC,UAAlB,QAAkBA,UAAlB;AAAA,MAAiCC,YAAjC;;AAGAC,EAAAA,eAAS,CAAC,YAAM;AACd,QAAIP,GAAG,CAACQ,OAAJ,IAAeJ,QAAnB,EAA6BA,QAAQ,CAACJ,GAAG,CAACQ,OAAL,EAAcP,KAAd,CAAR;AAC7B,WAAO,YAAM;AACX,UAAID,GAAG,CAACQ,OAAJ,IAAeH,UAAnB,EAA+BA,UAAU,CAACL,GAAG,CAACQ,OAAL,CAAV;AAChC,KAFD;AAGD,GALQ,CAAT,CAJyD;;AAYzD,MAAI,CAACJ,QAAL,EAAe,OAAO,EAAP;AACf,SAAOE,YAAP;AACD;IAEYG,sBAAsB,GAAG,SAAzBA,sBAAyB,GAAqB;AAAA,MAApBT,GAAoB,uEAAd,EAAc;AAAA,MAAVC,KAAU;;AACzD,cACEC,gBAAU,CAACC,4BAAD,CAAV,IAAiC,EADnC;AAAA,MAAQC,QAAR,SAAQA,QAAR;AAAA,MAAkBC,UAAlB,SAAkBA,UAAlB;AAAA,MAAiCC,YAAjC;;AAGAC,EAAAA,eAAS,CAAC,YAAM;AACd,QAAIP,GAAG,IAAII,QAAX,EAAqBA,QAAQ,CAACJ,GAAD,EAAMC,KAAN,CAAR;AACrB,WAAO,YAAM;AACX,UAAID,GAAG,IAAIK,UAAX,EAAuBA,UAAU,CAACL,GAAD,CAAV;AACxB,KAFD;AAGD,GALQ,EAKN,CAACA,GAAD,CALM,CAAT,CAJyD;;AAYzD,MAAI,CAACI,QAAL,EAAe,OAAO,EAAP;AACf,SAAOE,YAAP;AACD;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getNextCellPosition.js","sources":["../../../../src/FocusGroup/utils/getNextCellPosition.tsx"],"sourcesContent":["// eslint-disable-next-line max-statements\nexport default function getNextCellPosition({\n grid,\n currentRow = 0,\n currentCell = 0,\n directionY,\n directionX,\n shouldWrapCells,\n shouldWrapRows,\n}) {\n let nextRow = currentRow + directionY;\n let nextCell = currentCell + directionX;\n const rowCount = grid.length;\n const isLeftRight = directionX !== 0;\n\n if (!rowCount) {\n return false;\n }\n\n const cellsLength = grid[0].length;\n\n // moving horizontally\n if (shouldWrapCells && isLeftRight) {\n // to left\n if (nextCell < 0) {\n nextCell = cellsLength - 1;\n nextRow -= 1;\n }\n\n if (nextCell >= cellsLength) {\n nextCell = 0;\n nextRow += 1;\n }\n }\n\n // moving vertically\n if (shouldWrapRows && !isLeftRight) {\n // to top\n if (nextRow < 0) {\n nextCell -= 1;\n nextRow = rowCount - 1;\n if (grid[nextRow] && nextCell >= 0 && !grid[nextRow][nextCell]) {\n nextRow -= 1;\n }\n } else if (nextRow >= rowCount || !grid[nextRow][nextCell]) {\n nextRow = 0;\n nextCell += 1;\n }\n }\n\n return {\n cellIndex: nextCell,\n rowIndex: nextRow,\n };\n}\n"],"names":["getNextCellPosition","grid","currentRow","currentCell","directionY","directionX","shouldWrapCells","shouldWrapRows","nextRow","nextCell","rowCount","length","isLeftRight","cellsLength","cellIndex","rowIndex"],"mappings":";;AAAA;AACe,SAASA,mBAAT,OAQZ;AAAA,MAPDC,IAOC,QAPDA,IAOC;AAAA,6BANDC,UAMC;AAAA,MANDA,UAMC,gCANY,CAMZ;AAAA,8BALDC,WAKC;AAAA,MALDA,WAKC,iCALa,CAKb;AAAA,MAJDC,UAIC,QAJDA,UAIC;AAAA,MAHDC,UAGC,QAHDA,UAGC;AAAA,MAFDC,eAEC,QAFDA,eAEC;AAAA,MADDC,cACC,QADDA,cACC;AACD,MAAIC,OAAO,GAAGN,UAAU,GAAGE,UAA3B;AACA,MAAIK,QAAQ,GAAGN,WAAW,GAAGE,UAA7B;AACA,MAAMK,QAAQ,GAAGT,IAAI,CAACU,MAAtB;AACA,MAAMC,WAAW,GAAGP,UAAU,KAAK,CAAnC;;AAEA,MAAI,CAACK,QAAL,EAAe;AACb,WAAO,KAAP;AACD;;AAED,MAAMG,WAAW,GAAGZ,IAAI,CAAC,CAAD,CAAJ,CAAQU,MAA5B,CAVC;;AAaD,MAAIL,eAAe,IAAIM,WAAvB,EAAoC;AAClC;AACA,QAAIH,QAAQ,GAAG,CAAf,EAAkB;AAChBA,MAAAA,QAAQ,GAAGI,WAAW,GAAG,CAAzB;AACAL,MAAAA,OAAO,IAAI,CAAX;AACD;;AAED,QAAIC,QAAQ,IAAII,WAAhB,EAA6B;AAC3BJ,MAAAA,QAAQ,GAAG,CAAX;AACAD,MAAAA,OAAO,IAAI,CAAX;AACD;AACF,GAxBA;;;AA2BD,MAAID,cAAc,IAAI,CAACK,WAAvB,EAAoC;AAClC;AACA,QAAIJ,OAAO,GAAG,CAAd,EAAiB;AACfC,MAAAA,QAAQ,IAAI,CAAZ;AACAD,MAAAA,OAAO,GAAGE,QAAQ,GAAG,CAArB;;AACA,UAAIT,IAAI,CAACO,OAAD,CAAJ,IAAiBC,QAAQ,IAAI,CAA7B,IAAkC,CAACR,IAAI,CAACO,OAAD,CAAJ,CAAcC,QAAd,CAAvC,EAAgE;AAC9DD,QAAAA,OAAO,IAAI,CAAX;AACD;AACF,KAND,MAMO,IAAIA,OAAO,IAAIE,QAAX,IAAuB,CAACT,IAAI,CAACO,OAAD,CAAJ,CAAcC,QAAd,CAA5B,EAAqD;AAC1DD,MAAAA,OAAO,GAAG,CAAV;AACAC,MAAAA,QAAQ,IAAI,CAAZ;AACD;AACF;;AAED,SAAO;AACLK,IAAAA,SAAS,EAAEL,QADN;AAELM,IAAAA,QAAQ,EAAEP;AAFL,GAAP;AAID;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Group.js","sources":["../../../src/GroupContext/Group.tsx"],"sourcesContent":["/* eslint-disable react/no-unused-state */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { GroupContext } from './GroupContext';\n\nconst getValueItem = (e) => {\n const { target, currentTarget } = e;\n if (target) {\n const { value } = target;\n return value;\n }\n if (currentTarget) {\n const { value } = currentTarget;\n return value;\n }\n return e;\n};\n\nconst toggleItemValue = (array, e) => {\n const newvalue = getValueItem(e);\n const res = array;\n const index = array.indexOf(newvalue);\n\n if (index === -1) {\n res.push(newvalue);\n } else {\n res.splice(index, 1);\n }\n\n return res;\n};\n\nconst { Provider } = GroupContext;\n/** deprecated use CheckableGroup instead */\nclass Group extends Component {\n constructor(props) {\n super(props);\n const { activeValue, disabled } = props;\n this.state = {\n activeValue,\n disabled,\n prevValue: null,\n onChange: this.handleChange.bind(this),\n };\n }\n\n static getDerivedStateFromProps(nextProps, { prevValue }) {\n if (nextProps.activeValue === prevValue) return null;\n return {\n activeValue: nextProps.activeValue,\n prevValue: nextProps.activeValue,\n };\n }\n\n handleChange(e, ...rest) {\n const { multiple, onChange } = this.props;\n const { activeValue } = this.state;\n const value = getValueItem(e);\n let newValue;\n if (multiple) {\n newValue = toggleItemValue(activeValue || [], value);\n } else if (activeValue !== value) {\n // default behaviour it will be toggle the active value\n newValue = value;\n }\n\n this.setState({\n activeValue: newValue,\n });\n\n if (onChange) onChange(newValue, ...rest);\n }\n\n render() {\n const { children } = this.props;\n return <Provider value={this.state}>{children}</Provider>;\n }\n}\n\nGroup.defaultProps = {\n multiple: false,\n};\n\nGroup.propTypes = {\n children: PropTypes.array,\n multiple: PropTypes.bool,\n onChange: PropTypes.func,\n activeValue: PropTypes.oneOfType([PropTypes.array, PropTypes.number]),\n disabled: PropTypes.bool,\n};\n\nexport default Group;\n"],"names":["getValueItem","e","target","currentTarget","value","toggleItemValue","array","newvalue","res","index","indexOf","push","splice","Provider","GroupContext","Group","props","activeValue","disabled","state","prevValue","onChange","handleChange","bind","multiple","newValue","setState","rest","children","React","nextProps","Component","defaultProps","propTypes","PropTypes","bool","func","oneOfType","number"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAMA,YAAY,GAAG,SAAfA,YAAe,CAACC,CAAD,EAAO;AAC1B,MAAQC,MAAR,GAAkCD,CAAlC,CAAQC,MAAR;AAAA,MAAgBC,aAAhB,GAAkCF,CAAlC,CAAgBE,aAAhB;;AACA,MAAID,MAAJ,EAAY;AACV,QAAQE,KAAR,GAAkBF,MAAlB,CAAQE,KAAR;AACA,WAAOA,KAAP;AACD;;AACD,MAAID,aAAJ,EAAmB;AACjB,QAAQC,MAAR,GAAkBD,aAAlB,CAAQC,KAAR;AACA,WAAOA,MAAP;AACD;;AACD,SAAOH,CAAP;AACD,CAXD;;AAaA,IAAMI,eAAe,GAAG,SAAlBA,eAAkB,CAACC,KAAD,EAAQL,CAAR,EAAc;AACpC,MAAMM,QAAQ,GAAGP,YAAY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AAc;AACZT,QAAAA,WAAW,EAAEQ;AADD,OAAd;;AAZuB,wCAANE,IAAM;AAANA,QAAAA,IAAM;AAAA;;AAgBvB,UAAIN,QAAJ,EAAcA,QAAQ,MAAR,UAASI,QAAT,SAAsBE,IAAtB;AACf;;;WAED,kBAAS;AACP,UAAQC,QAAR,GAAqB,KAAKZ,KAA1B,CAAQY,QAAR;AACA,0BAAOC,wCAAC,QAAD;AAAU,QAAA,KAAK,EAAE,KAAKV;AAAtB,SAA8BS,QAA9B,CAAP;AACD;;;WA9BD,kCAAgCE,SAAhC,QAA0D;AAAA,UAAbV,SAAa,QAAbA,SAAa;AACxD,UAAIU,SAAS,CAACb,WAAV,KAA0BG,SAA9B,EAAyC,OAAO,IAAP;AACzC,aAAO;AACLH,QAAAA,WAAW,EAAEa,SAAS,CAACb,WADlB;AAELG,QAAAA,SAAS,EAAEU,SAAS,CAACb;AAFhB,OAAP;AAID;;;;EAlBiBc;;AA6CpBhB,KAAK,CAACiB,YAAN,GAAqB;AACnBR,EAAAA,QAAQ,EAAE;AADS,CAArB;AAIAT,KAAK,CAACkB,SAAN,GAAkB;AAChBL,EAAAA,QAAQ,EAAEM,6BAAS,CAAC5B,KADJ;AAEhBkB,EAAAA,QAAQ,EAAEU,6BAAS,CAACC,IAFJ;AAGhBd,EAAAA,QAAQ,EAAEa,6BAAS,CAACE,IAHJ;AAIhBnB,EAAAA,WAAW,EAAEiB,6BAAS,CAACG,SAAV,CAAoB,CAACH,6BAAS,CAAC5B,KAAX,EAAkB4B,6BAAS,CAACI,MAA5B,CAApB,CAJG;AAKhBpB,EAAAA,QAAQ,EAAEgB,6BAAS,CAACC;AALJ,CAAlB;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"GroupContext.js","sources":["../../../src/GroupContext/GroupContext.tsx"],"sourcesContent":["import React from 'react';\n\nexport const GroupContext = React.createContext();\n"],"names":["GroupContext","React","createContext"],"mappings":";;;;;;;;;;IAEaA,YAAY,gBAAGC,yBAAK,CAACC,aAAN;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"GroupItem.js","sources":["../../../src/GroupContext/GroupItem.tsx"],"sourcesContent":["import React from 'react';\nimport { GroupContext } from './GroupContext';\n\nconst { Consumer } = GroupContext;\n\nconst GroupItem = ({ render }) => (\n <Consumer>{context => render(context)}</Consumer>\n);\n\nexport default GroupItem;\n"],"names":["Consumer","GroupContext","GroupItem","render","React","context"],"mappings":";;;;;;;;;AAGA,IAAQA,QAAR,GAAqBC,sCAArB,CAAQD,QAAR;;IAEME,SAAS,GAAG,SAAZA,SAAY;AAAA,MAAGC,MAAH,QAAGA,MAAH;AAAA,sBAChBC,wCAAC,QAAD,QAAW,UAAAC,OAAO;AAAA,WAAIF,MAAM,CAACE,OAAD,CAAV;AAAA,GAAlB,CADgB;AAAA;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ScrollSync.js","sources":["../../../src/ScrollSync/ScrollSync.tsx"],"sourcesContent":["import React, { Component } from 'react';\n\nexport const ScrollSyncContext = React.createContext();\n\nconst { Provider } = ScrollSyncContext;\n\nexport default class ScrollSync extends Component {\n panes = {};\n\n static defaultProps = {\n proportional: true,\n vertical: true,\n horizontal: true,\n enabled: true,\n };\n\n constructor(props) {\n super(props);\n this.syncContext = {\n registerPane: this.registerPane,\n unregisterPane: this.unregisterPane,\n };\n }\n\n registerPane = (node, groups) => {\n groups.forEach((group) => {\n if (!this.panes[group]) {\n this.panes[group] = [];\n }\n\n if (this.panes[group].length > 0) {\n this.syncScrollPosition(this.panes[group][0], node);\n }\n this.panes[group].push(node);\n });\n this.addEvents(node, groups);\n };\n\n unregisterPane = (node, groups) => {\n groups.forEach((group) => {\n if (this.findPane(node, group)) {\n this.removeEvents(node);\n this.panes[group].splice(this.panes[group].indexOf(node), 1);\n }\n });\n };\n\n addEvents = (node, groups) => {\n /* For some reason element.addEventListener doesnt work with document.body */\n node.onscroll = this.handlePaneScroll.bind(this, node, groups); // eslint-disable-line\n };\n\n removeEvents = (node) => {\n /* For some reason element.removeEventListener doesnt work with document.body */\n node.onscroll = null; // eslint-disable-line\n };\n\n findPane = (node, group) => {\n if (!this.panes[group]) {\n return false;\n }\n\n return this.panes[group].find((pane) => pane === node);\n };\n\n handlePaneScroll = (node, groups, e) => {\n const { enabled } = this.props;\n if (this.props.onScroll) this.props.onScroll(e);\n\n if (!enabled) return;\n\n window.requestAnimationFrame(() => {\n this.syncScrollPositions(node, groups);\n });\n };\n\n syncScrollPositions = (scrolledPane, groups) => {\n groups.forEach((group) => {\n this.panes[group].forEach((pane) => {\n /* For all panes beside the currently scrolling one */\n if (scrolledPane !== pane) {\n /* Remove event listeners from the node that we'll manipulate */\n this.removeEvents(pane, group);\n this.syncScrollPosition(scrolledPane, pane);\n /* Re-attach event listeners after we're done scrolling */\n window.requestAnimationFrame(() => {\n this.addEvents(pane, groups);\n });\n }\n });\n });\n };\n\n syncScrollPosition(scrolledPane, pane) {\n const {\n scrollTop,\n scrollHeight,\n clientHeight,\n scrollLeft,\n scrollWidth,\n clientWidth,\n } = scrolledPane;\n\n const scrollTopOffset = scrollHeight - clientHeight;\n const scrollLeftOffset = scrollWidth - clientWidth;\n\n const { proportional, vertical, horizontal } = this.props;\n\n /* Calculate the actual pane height */\n const paneHeight = pane.scrollHeight - clientHeight;\n const paneWidth = pane.scrollWidth - clientWidth;\n /* Adjust the scrollTop position of it accordingly */\n if (vertical && scrollTopOffset > 0) {\n pane.scrollTop = proportional\n ? (paneHeight * scrollTop) / scrollTopOffset\n : scrollTop; // eslint-disable-line\n }\n if (horizontal && scrollLeftOffset > 0) {\n pane.scrollLeft = proportional\n ? (paneWidth * scrollLeft) / scrollLeftOffset\n : scrollLeft; // eslint-disable-line\n }\n }\n\n render() {\n const { children } = this.props;\n return (\n <Provider value={this.syncContext}>\n {React.Children.only(children)}\n </Provider>\n );\n }\n}\n"],"names":["ScrollSyncContext","React","createContext","Provider","ScrollSync","props","panes","registerPane","node","groups","forEach","group","length","syncScrollPosition","push","addEvents","unregisterPane","findPane","removeEvents","splice","indexOf","onscroll","handlePaneScroll","bind","find","pane","e","enabled","onScroll","window","requestAnimationFrame","syncScrollPositions","scrolledPane","syncContext","scrollTop","scrollHeight","clientHeight","scrollLeft","scrollWidth","clientWidth","scrollTopOffset","scrollLeftOffset","proportional","vertical","horizontal","paneHeight","paneWidth","children","Children","only","Component","defaultProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;IAEaA,iBAAiB,gBAAGC,yBAAK,CAACC,aAAN;AAEjC,IAAQC,QAAR,GAAqBH,iBAArB,CAAQG,QAAR;;IAEqBC;;;;;AAUnB,sBAAYC,KAAZ,EAAmB;AAAA;;AAAA;;AACjB,8BAAMA,KAAN;AADiB,UATnBC,KASmB,GATX,EASW;;AAAA,UAQnBC,YARmB,GAQJ,UAACC,IAAD,EAAOC,MAAP,EAAkB;AAC/BA,MAAAA,MAAM,CAACC,OAAP,CAAe,UAACC,KAAD,EAAW;AACxB,YAAI,CAAC,MAAKL,KAAL,CAAWK,KAAX,CAAL,EAAwB;AACtB,gBAAKL,KAAL,CAAWK,KAAX,IAAoB,EAApB;AACD;;AAED,YAAI,MAAKL,KAAL,CAAWK,KAAX,EAAkBC,MAAlB,GAA2B,CAA/B,EAAkC;AAChC,gBAAKC,kBAAL,CAAwB,MAAKP,KAAL,CAAWK,KAAX,EAAkB,CAAlB,CAAxB,EAA8CH,IAA9C;AACD;;AACD,cAAKF,KAAL,CAAWK,KAAX,EAAkBG,IAAlB,CAAuBN,IAAvB;AACD,OATD;;AAUA,YAAKO,SAAL,CAAeP,IAAf,EAAqBC,MAArB;AACD,KApBkB;;AAAA,UAsBnBO,cAtBmB,GAsBF,UAACR,IAAD,EAAOC,MAAP,EAAkB;AACjCA,MAAAA,MAAM,CAACC,OAAP,CAAe,UAACC,KAAD,EAAW;AACxB,YAAI,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;AACA,UAAMC,UAAU,GAAGpB,IAAI,CAACU,YAAL,GAAoBC,YAAvC;AACA,UAAMU,SAAS,GAAGrB,IAAI,CAACa,WAAL,GAAmBC,WAArC;AACA;;AACA,UAAII,QAAQ,IAAIH,eAAe,GAAG,CAAlC,EAAqC;AACnCf,QAAAA,IAAI,CAACS,SAAL,GAAiBQ,YAAY,GACxBG,UAAU,GAAGX,SAAd,GAA2BM,eADF,GAEzBN,SAFJ,CADmC;AAIpC;;AACD,UAAIU,UAAU,IAAIH,gBAAgB,GAAG,CAArC,EAAwC;AACtChB,QAAAA,IAAI,CAACY,UAAL,GAAkBK,YAAY,GACzBI,SAAS,GAAGT,UAAb,GAA2BI,gBADD,GAE1BJ,UAFJ,CADsC;AAIvC;AACF;;;WAED,kBAAS;AACP,UAAQU,QAAR,GAAqB,KAAK1C,KAA1B,CAAQ0C,QAAR;AACA,0BACE9C,wCAAC,QAAD;AAAU,QAAA,KAAK,EAAE,KAAKgC;AAAtB,SACGhC,yBAAK,CAAC+C,QAAN,CAAeC,IAAf,CAAoBF,QAApB,CADH,CADF;AAKD;;;;EA7HqCG;;AAAnB9C,WAGZ+C,eAAe;AACpBT,EAAAA,YAAY,EAAE,IADM;AAEpBC,EAAAA,QAAQ,EAAE,IAFU;AAGpBC,EAAAA,UAAU,EAAE,IAHQ;AAIpBjB,EAAAA,OAAO,EAAE;AAJW;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ScrollSyncPane.js","sources":["../../../src/ScrollSync/ScrollSyncPane.tsx"],"sourcesContent":["/* eslint-disable react/display-name */\nimport React, { Component } from 'react';\nimport { ScrollSyncContext } from './ScrollSync';\n\n/**\n * MODIFIED FROM react-scroll-sync\n *\n * ScrollSyncPane Component\n *\n * Wrap your content in it to keep its scroll position in sync with other panes\n *\n * @param groups\n * @example ./example.md\n */\nclass ScrollSyncPane extends Component {\n static defaultProps = {\n group: 'default',\n enabled: true,\n };\n\n componentWillUnmount() {\n const { enabled, group, syncContext } = this.props;\n const { unregisterPane } = syncContext;\n\n if (enabled) unregisterPane(this.node, this.toArray(group));\n }\n\n toArray = groups => [].concat(groups);\n\n render() {\n const { children, group, syncContext, notPaginated } = this.props;\n const { registerPane } = syncContext;\n\n return children({\n registerPane: node => {\n if (notPaginated) {\n const virtualizedBody = node.querySelector(\n '.virtualized-body-wrapper',\n );\n if (virtualizedBody) {\n registerPane(virtualizedBody, this.toArray(group));\n }\n }\n return registerPane(node, this.toArray(group));\n },\n });\n }\n}\n\nexport default props => (\n <ScrollSyncContext.Consumer>\n {context => <ScrollSyncPane {...props} syncContext={context} />}\n </ScrollSyncContext.Consumer>\n);\n"],"names":["ScrollSyncPane","toArray","groups","concat","props","enabled","group","syncContext","unregisterPane","node","children","notPaginated","registerPane","virtualizedBody","querySelector","Component","defaultProps","React","ScrollSyncContext","context"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;IACMA;;;;;;;;;;;;;;;;UAaJC,UAAU,UAAAC,MAAM;AAAA,aAAI,GAAGC,MAAH,CAAUD,MAAV,CAAJ;AAAA;;;;;;;WAPhB,gCAAuB;AACrB,wBAAwC,KAAKE,KAA7C;AAAA,UAAQC,OAAR,eAAQA,OAAR;AAAA,UAAiBC,KAAjB,eAAiBA,KAAjB;AAAA,UAAwBC,WAAxB,eAAwBA,WAAxB;AACA,UAAQC,cAAR,GAA2BD,WAA3B,CAAQC,cAAR;AAEA,UAAIH,OAAJ,EAAaG,cAAc,CAAC,KAAKC,IAAN,EAAY,KAAKR,OAAL,CAAaK,KAAb,CAAZ,CAAd;AACd;;;WAID,kBAAS;AAAA;;AACP,yBAAuD,KAAKF,KAA5D;AAAA,UAAQM,QAAR,gBAAQA,QAAR;AAAA,UAAkBJ,KAAlB,gBAAkBA,KAAlB;AAAA,UAAyBC,WAAzB,gBAAyBA,WAAzB;AAAA,UAAsCI,YAAtC,gBAAsCA,YAAtC;AACA,UAAQC,aAAR,GAAyBL,WAAzB,CAAQK,YAAR;AAEA,aAAOF,QAAQ,CAAC;AACdE,QAAAA,YAAY,EAAE,sBAAAH,IAAI,EAAI;AACpB,cAAIE,YAAJ,EAAkB;AAChB,gBAAME,eAAe,GAAGJ,IAAI,CAACK,aAAL,CACtB,2BADsB,CAAxB;;AAGA,gBAAID,eAAJ,EAAqB;AACnBD,cAAAA,aAAY,CAACC,eAAD,EAAkB,MAAI,CAACZ,OAAL,CAAaK,KAAb,CAAlB,CAAZ;AACD;AACF;;AACD,iBAAOM,aAAY,CAACH,IAAD,EAAO,MAAI,CAACR,OAAL,CAAaK,KAAb,CAAP,CAAnB;AACD;AAXa,OAAD,CAAf;AAaD;;;;EAhC0BS;;AAAvBf,eACGgB,eAAe;AACpBV,EAAAA,KAAK,EAAE,SADa;AAEpBD,EAAAA,OAAO,EAAE;AAFW;AAkCxB,wBAAe,UAAAD,KAAK;AAAA,sBAClBa,wCAACC,uCAAD,CAAmB,QAAnB,QACG,UAAAC,OAAO;AAAA,wBAAIF,wCAAC,cAAD,mCAAoBb,KAApB;AAA2B,MAAA,WAAW,EAAEe;AAAxC,OAAJ;AAAA,GADV,CADkB;AAAA,CAApB;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ScrollSyncProvider.js","sources":["../../../src/ScrollSync/ScrollSyncProvider.tsx"],"sourcesContent":["import React from 'react';\nimport raf from 'raf';\nimport PropTypes from 'prop-types';\n\nconst ScrollSyncContext = React.createContext();\n\nconst { Provider } = ScrollSyncContext;\n\nfunction ScrollSyncProvider({ enabled, horizontal, vertical, children }) {\n const panes = useRef();\n\n const registerPane = (node, groups) => {\n groups.forEach(group => {\n if (!this.panes[group]) {\n this.panes[group] = [];\n }\n\n if (!this.findPane(node, group)) {\n if (this.panes[group].length > 0) {\n this.syncScrollPosition(this.panes[group][0], node);\n }\n this.panes[group].push(node);\n }\n });\n this.addEvents(node, groups);\n };\n const unregisterPane = (node, groups) => {\n groups.forEach(group => {\n if (this.findPane(node, group)) {\n this.removeEvents(node);\n this.panes[group].splice(this.panes[group].indexOf(node), 1);\n }\n });\n };\n const addEvents = (node, groups) => {\n /* For some reason element.addEventListener doesnt work with document.body */\n node.onscroll = this.handlePaneScroll.bind(this, node, groups); // eslint-disable-line\n };\n const removeEvents = node => {\n /* For some reason element.removeEventListener doesnt work with document.body */\n node.onscroll = null; // eslint-disable-line\n };\n const findPane = (node, group) => {\n if (!this.panes[group]) {\n return false;\n }\n\n return this.panes[group].find(pane => pane === node);\n };\n const handlePaneScroll = (node, groups) => {\n if (!enabled) return;\n\n window.requestAnimationFrame(() => {\n this.syncScrollPositions(node, groups);\n });\n };\n const syncScrollPositions = (scrolledPane, groups) => {\n groups.forEach(group => {\n this.panes[group].forEach(pane => {\n /* For all panes beside the currently scrolling one */\n if (scrolledPane !== pane) {\n /* Remove event listeners from the node that we'll manipulate */\n this.removeEvents(pane, group);\n this.syncScrollPosition(scrolledPane, pane);\n /* Re-attach event listeners after we're done scrolling */\n window.requestAnimationFrame(() => {\n this.addEvents(pane, groups);\n });\n }\n });\n });\n };\n const syncScrollPosition = raf((scrolledPane, pane) => {\n const {\n scrollTop,\n scrollHeight,\n clientHeight,\n scrollLeft,\n scrollWidth,\n clientWidth,\n } = scrolledPane;\n\n const scrollTopOffset = scrollHeight - clientHeight;\n const scrollLeftOffset = scrollWidth - clientWidth;\n\n const { proportional, vertical, horizontal } = this.props;\n\n /* Calculate the actual pane height */\n const paneHeight = pane.scrollHeight - clientHeight;\n const paneWidth = pane.scrollWidth - clientWidth;\n /* Adjust the scrollTop position of it accordingly */\n if (vertical && scrollTopOffset > 0) {\n pane.scrollTop = proportional\n ? (paneHeight * scrollTop) / scrollTopOffset\n : scrollTop; // eslint-disable-line\n }\n if (horizontal && scrollLeftOffset > 0) {\n pane.scrollLeft = proportional\n ? (paneWidth * scrollLeft) / scrollLeftOffset\n : scrollLeft; // eslint-disable-line\n }\n });\n\n return <Provider>{children}</Provider>;\n}\n\nScrollSyncProvider.propTypes = {};\nScrollSyncProvider.defaultProps = {};\n\nexport default ScrollSyncProvider;\n"],"names":["ScrollSyncContext","React","createContext","Provider","ScrollSyncProvider","enabled","horizontal","vertical","children","useRef","raf","scrolledPane","pane","scrollTop","scrollHeight","clientHeight","scrollLeft","scrollWidth","clientWidth","scrollTopOffset","scrollLeftOffset","props","proportional","paneHeight","paneWidth","propTypes","defaultProps"],"mappings":";;;;;;;;;;AAIA,IAAMA,iBAAiB,gBAAGC,yBAAK,CAACC,aAAN,EAA1B;AAEA,IAAQC,QAAR,GAAqBH,iBAArB,CAAQG,QAAR;;AAEA,SAASC,kBAAT,OAAyE;AAAA;;AAAA,OAA3CC,OAA2C;AAAA,WAAlCC,UAAkC;AAAA,WAAtBC,QAAsB;AAAA,UAAZC,QAAY,QAAZA;AAC3D,EAAcC,MAAM;;AA+DpB,EAA2BC,uBAAG,CAAC,UAACC,YAAD,EAAeC,IAAf,EAAwB;AACrD,QACEC,SADF,GAOIF,YAPJ,CACEE,SADF;AAAA,QAEEC,YAFF,GAOIH,YAPJ,CAEEG,YAFF;AAAA,QAGEC,YAHF,GAOIJ,YAPJ,CAGEI,YAHF;AAAA,QAIEC,UAJF,GAOIL,YAPJ,CAIEK,UAJF;AAAA,QAKEC,WALF,GAOIN,YAPJ,CAKEM,WALF;AAAA,QAMEC,WANF,GAOIP,YAPJ,CAMEO,WANF;AASA,QAAMC,eAAe,GAAGL,YAAY,GAAGC,YAAvC;AACA,QAAMK,gBAAgB,GAAGH,WAAW,GAAGC,WAAvC;AAEA,sBAA+C,KAAI,CAACG,KAApD;AAAA,QAAQC,YAAR,eAAQA,YAAR;AAAA,QAAsBf,QAAtB,eAAsBA,QAAtB;AAAA,QAAgCD,UAAhC,eAAgCA,UAAhC;AAEA;;AACA,QAAMiB,UAAU,GAAGX,IAAI,CAACE,YAAL,GAAoBC,YAAvC;AACA,QAAMS,SAAS,GAAGZ,IAAI,CAACK,WAAL,GAAmBC,WAArC;AACA;;AACA,QAAIX,QAAQ,IAAIY,eAAe,GAAG,CAAlC,EAAqC;AACnCP,MAAAA,IAAI,CAACC,SAAL,GAAiBS,YAAY,GACxBC,UAAU,GAAGV,SAAd,GAA2BM,eADF,GAEzBN,SAFJ,CADmC;AAIpC;;AACD,QAAIP,UAAU,IAAIc,gBAAgB,GAAG,CAArC,EAAwC;AACtCR,MAAAA,IAAI,CAACI,UAAL,GAAkBM,YAAY,GACzBE,SAAS,GAAGR,UAAb,GAA2BI,gBADD,GAE1BJ,UAFJ,CADsC;AAIvC;AACF,GA7B6B;AA+B9B,sBAAOf,wCAAC,QAAD,QAAWO,QAAX,CAAP;AACD;;AAEDJ,kBAAkB,CAACqB,SAAnB,GAA+B,EAA/B;AACArB,kBAAkB,CAACsB,YAAnB,GAAkC,EAAlC;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useScrollSync.js","sources":["../../../src/ScrollSync/useScrollSync.tsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nfunction useScrollSync(props) {\n return {};\n}\n\nuseScrollSync.propTypes = {};\nuseScrollSync.defaultProps = {};\n\nexport default useScrollSync;\n"],"names":["useScrollSync","props","propTypes","defaultProps"],"mappings":";;AAGA,SAASA,aAAT,CAAuBC,KAAvB,EAA8B;AAC5B,SAAO,EAAP;AACD;;AAEDD,aAAa,CAACE,SAAd,GAA0B,EAA1B;AACAF,aAAa,CAACG,YAAd,GAA6B,EAA7B;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sources":["../../src/constants.tsx"],"sourcesContent":["export const DEFAULT_DELAY_OPEN = 200;\nexport const DEFAULT_DELAY_CLOSE = 300;\nexport const sizeOptions = ['small', 'medium', 'large', 'x-large'];\n"],"names":["DEFAULT_DELAY_OPEN","DEFAULT_DELAY_CLOSE","sizeOptions"],"mappings":";;;;IAAaA,kBAAkB,GAAG;IACrBC,mBAAmB,GAAG;IACtBC,WAAW,GAAG,CAAC,OAAD,EAAU,QAAV,EAAoB,OAApB,EAA6B,SAA7B;;;;;;"}