@elliemae/ds-shared 2.3.0-alpha.9 → 2.3.0-next.11

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 (330) hide show
  1. package/cjs/Animations/BaseAnimation.js +36 -0
  2. package/cjs/Animations/Grow.js +42 -0
  3. package/cjs/Animations/GrowRight.js +42 -0
  4. package/cjs/Animations/GrowVertical.js +7 -0
  5. package/cjs/CheckableGroup.js +74 -0
  6. package/cjs/DeferRenderAfterComputation.js +28 -0
  7. package/cjs/FocusGroup/FocusGrid.js +215 -0
  8. package/cjs/FocusGroup/FocusGroup.js +308 -0
  9. package/cjs/FocusGroup/FocusGroupContext.js +11 -0
  10. package/cjs/FocusGroup/FocusGroupManager.js +117 -0
  11. package/cjs/FocusGroup/focusGroupManagerHoc.js +44 -0
  12. package/cjs/FocusGroup/index.js +21 -0
  13. package/cjs/FocusGroup/useFocusGroupItem.js +59 -0
  14. package/cjs/FocusGroup/utils/getNextCellPosition.js +60 -0
  15. package/cjs/GroupContext/Group.js +124 -0
  16. package/cjs/GroupContext/GroupContext.js +13 -0
  17. package/cjs/GroupContext/GroupItem.js +22 -0
  18. package/cjs/GroupContext/index.js +13 -0
  19. package/cjs/ScrollSync/ScrollSync.js +153 -0
  20. package/cjs/ScrollSync/ScrollSyncPane.js +81 -0
  21. package/cjs/ScrollSync/ScrollSyncProvider.js +67 -0
  22. package/cjs/ScrollSync/index.js +11 -0
  23. package/cjs/ScrollSync/useScrollSync.js +10 -0
  24. package/cjs/constants.js +51 -0
  25. package/cjs/createDataInstance/createInstancePlugin.js +36 -0
  26. package/cjs/createDataInstance/createInstanceRef.js +97 -0
  27. package/cjs/createDataInstance/utils.js +123 -0
  28. package/cjs/defer-render-hoc/index.js +49 -0
  29. package/cjs/dimsum.config.js +7 -0
  30. package/cjs/index.js +17 -0
  31. package/cjs/prop-types.js +59 -0
  32. package/cjs/react-spring/index.js +14 -0
  33. package/cjs/react-spring/renderprops.js +14 -0
  34. package/cjs/toolbar/ToolbarProvider.js +123 -0
  35. package/cjs/useDataGrid/VolatileRowsListener.js +24 -0
  36. package/cjs/useDataGrid/index.js +7 -0
  37. package/cjs/useDataGrid/initColumnDefinition.js +146 -0
  38. package/cjs/useDataGrid/useDataGrid.js +220 -0
  39. package/cjs/useDataList/index.js +7 -0
  40. package/cjs/useDataList/recordIterator.js +31 -0
  41. package/cjs/useDataList/useDataList.js +102 -0
  42. package/cjs/utils.js +116 -0
  43. package/cjs/virtualization/AutoHeightList.js +61 -0
  44. package/cjs/virtualization/FluidHeightList.js +49 -0
  45. package/cjs/virtualization/index.js +22 -0
  46. package/esm/Animations/BaseAnimation.js +30 -0
  47. package/esm/Animations/Grow.js +36 -0
  48. package/esm/Animations/GrowRight.js +36 -0
  49. package/esm/Animations/GrowVertical.js +4 -0
  50. package/esm/CheckableGroup.js +64 -0
  51. package/esm/DeferRenderAfterComputation.js +22 -0
  52. package/esm/FocusGroup/FocusGrid.js +204 -0
  53. package/{dist/esm → esm}/FocusGroup/FocusGroup.js +137 -56
  54. package/esm/FocusGroup/FocusGroupContext.js +5 -0
  55. package/{dist/esm → esm}/FocusGroup/FocusGroupManager.js +38 -24
  56. package/esm/FocusGroup/focusGroupManagerHoc.js +37 -0
  57. package/esm/FocusGroup/index.js +6 -0
  58. package/esm/FocusGroup/useFocusGroupItem.js +50 -0
  59. package/{dist/esm → esm}/FocusGroup/utils/getNextCellPosition.js +25 -18
  60. package/esm/GroupContext/Group.js +118 -0
  61. package/esm/GroupContext/GroupContext.js +5 -0
  62. package/esm/GroupContext/GroupItem.js +16 -0
  63. package/esm/GroupContext/index.js +3 -0
  64. package/{dist/esm → esm}/ScrollSync/ScrollSync.js +64 -30
  65. package/esm/ScrollSync/ScrollSyncPane.js +74 -0
  66. package/esm/ScrollSync/ScrollSyncProvider.js +59 -0
  67. package/esm/ScrollSync/index.js +2 -0
  68. package/esm/ScrollSync/useScrollSync.js +8 -0
  69. package/esm/constants.js +32 -0
  70. package/esm/createDataInstance/createInstancePlugin.js +30 -0
  71. package/esm/createDataInstance/createInstanceRef.js +90 -0
  72. package/esm/createDataInstance/utils.js +107 -0
  73. package/esm/defer-render-hoc/index.js +41 -0
  74. package/esm/dimsum.config.js +5 -0
  75. package/esm/index.js +5 -0
  76. package/esm/prop-types.js +43 -0
  77. package/{dist/types/react-spring/index.d.ts → esm/react-spring/index.js} +0 -0
  78. package/{dist/types/react-spring/renderprops.d.ts → esm/react-spring/renderprops.js} +0 -0
  79. package/esm/toolbar/ToolbarProvider.js +111 -0
  80. package/esm/useDataGrid/VolatileRowsListener.js +22 -0
  81. package/esm/useDataGrid/index.js +1 -0
  82. package/esm/useDataGrid/initColumnDefinition.js +134 -0
  83. package/esm/useDataGrid/useDataGrid.js +194 -0
  84. package/esm/useDataList/index.js +1 -0
  85. package/esm/useDataList/recordIterator.js +27 -0
  86. package/esm/useDataList/useDataList.js +90 -0
  87. package/esm/utils.js +95 -0
  88. package/esm/virtualization/AutoHeightList.js +52 -0
  89. package/esm/virtualization/FluidHeightList.js +38 -0
  90. package/esm/virtualization/index.js +18 -0
  91. package/package.json +108 -110
  92. package/{dist/types → types}/Animations/BaseAnimation.d.ts +0 -1
  93. package/{dist/types → types}/Animations/Grow.d.ts +0 -1
  94. package/{dist/types → types}/Animations/GrowRight.d.ts +0 -1
  95. package/{dist/types → types}/Animations/GrowVertical.d.ts +0 -0
  96. package/{dist/types → types}/CheckableGroup.d.ts +0 -1
  97. package/types/DeferRenderAfterComputation.d.ts +6 -0
  98. package/types/FocusGroup/FocusGrid.d.ts +10 -0
  99. package/{dist/types → types}/FocusGroup/FocusGroup.d.ts +1 -3
  100. package/types/FocusGroup/FocusGroupContext.d.ts +3 -0
  101. package/{dist/types → types}/FocusGroup/FocusGroupManager.d.ts +1 -3
  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/{dist/types → types}/FocusGroup/utils/getNextCellPosition.d.ts +1 -3
  106. package/{dist/types → types}/GroupContext/Group.d.ts +0 -1
  107. package/{dist/types → types}/GroupContext/GroupContext.d.ts +0 -0
  108. package/{dist/types → types}/GroupContext/GroupItem.d.ts +0 -1
  109. package/types/GroupContext/index.d.ts +3 -0
  110. package/{dist/types → types}/ScrollSync/ScrollSync.d.ts +2 -4
  111. package/types/ScrollSync/ScrollSyncPane.d.ts +3 -0
  112. package/{dist/types → types}/ScrollSync/ScrollSyncProvider.d.ts +0 -0
  113. package/types/ScrollSync/index.d.ts +2 -0
  114. package/types/ScrollSync/useScrollSync.d.ts +6 -0
  115. package/{dist/types → types}/constants.d.ts +0 -0
  116. package/types/createDataInstance/createInstancePlugin.d.ts +1 -0
  117. package/{dist/types → types}/createDataInstance/createInstanceRef.d.ts +1 -3
  118. package/{dist/types → types}/createDataInstance/tests/createInstanceRef.test.d.ts +0 -0
  119. package/{dist/types → types}/createDataInstance/utils.d.ts +0 -0
  120. package/types/dimsum.config.d.ts +4 -0
  121. package/types/index.d.ts +2 -0
  122. package/{dist/types → types}/prop-types.d.ts +0 -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/{dist/types → types}/useDataGrid/initColumnDefinition.d.ts +1 -2
  129. package/types/useDataGrid/useDataGrid.d.ts +8 -0
  130. package/types/useDataList/index.d.ts +1 -0
  131. package/{dist/types → types}/useDataList/recordIterator.d.ts +0 -0
  132. package/{dist/types → types}/useDataList/useDataList.d.ts +2 -3
  133. package/{dist/types → types}/utils.d.ts +0 -0
  134. package/{dist/types → types}/virtualization/AutoHeightList.d.ts +0 -0
  135. package/{dist/types → types}/virtualization/FluidHeightList.d.ts +0 -0
  136. package/{dist/types → types}/virtualization/index.d.ts +0 -0
  137. package/dist/cjs/Animations/BaseAnimation.js +0 -56
  138. package/dist/cjs/Animations/BaseAnimation.js.map +0 -7
  139. package/dist/cjs/Animations/Grow.js +0 -55
  140. package/dist/cjs/Animations/Grow.js.map +0 -7
  141. package/dist/cjs/Animations/GrowRight.js +0 -64
  142. package/dist/cjs/Animations/GrowRight.js.map +0 -7
  143. package/dist/cjs/Animations/GrowVertical.js +0 -47
  144. package/dist/cjs/Animations/GrowVertical.js.map +0 -7
  145. package/dist/cjs/CheckableGroup.js +0 -76
  146. package/dist/cjs/CheckableGroup.js.map +0 -7
  147. package/dist/cjs/DeferRenderAfterComputation.js +0 -52
  148. package/dist/cjs/DeferRenderAfterComputation.js.map +0 -7
  149. package/dist/cjs/FocusGroup/FocusGrid.js +0 -180
  150. package/dist/cjs/FocusGroup/FocusGrid.js.map +0 -7
  151. package/dist/cjs/FocusGroup/FocusGroup.js +0 -249
  152. package/dist/cjs/FocusGroup/FocusGroup.js.map +0 -7
  153. package/dist/cjs/FocusGroup/FocusGroupContext.js +0 -38
  154. package/dist/cjs/FocusGroup/FocusGroupContext.js.map +0 -7
  155. package/dist/cjs/FocusGroup/FocusGroupManager.js +0 -126
  156. package/dist/cjs/FocusGroup/FocusGroupManager.js.map +0 -7
  157. package/dist/cjs/FocusGroup/focusGroupManagerHoc.js +0 -54
  158. package/dist/cjs/FocusGroup/focusGroupManagerHoc.js.map +0 -7
  159. package/dist/cjs/FocusGroup/index.js +0 -47
  160. package/dist/cjs/FocusGroup/index.js.map +0 -7
  161. package/dist/cjs/FocusGroup/useFocusGroupItem.js +0 -67
  162. package/dist/cjs/FocusGroup/useFocusGroupItem.js.map +0 -7
  163. package/dist/cjs/FocusGroup/utils/getNextCellPosition.js +0 -80
  164. package/dist/cjs/FocusGroup/utils/getNextCellPosition.js.map +0 -7
  165. package/dist/cjs/GroupContext/Group.js +0 -115
  166. package/dist/cjs/GroupContext/Group.js.map +0 -7
  167. package/dist/cjs/GroupContext/GroupContext.js +0 -36
  168. package/dist/cjs/GroupContext/GroupContext.js.map +0 -7
  169. package/dist/cjs/GroupContext/GroupItem.js +0 -40
  170. package/dist/cjs/GroupContext/GroupItem.js.map +0 -7
  171. package/dist/cjs/GroupContext/index.js +0 -39
  172. package/dist/cjs/GroupContext/index.js.map +0 -7
  173. package/dist/cjs/ScrollSync/ScrollSync.js +0 -138
  174. package/dist/cjs/ScrollSync/ScrollSync.js.map +0 -7
  175. package/dist/cjs/ScrollSync/ScrollSyncPane.js +0 -73
  176. package/dist/cjs/ScrollSync/ScrollSyncPane.js.map +0 -7
  177. package/dist/cjs/ScrollSync/ScrollSyncProvider.js +0 -120
  178. package/dist/cjs/ScrollSync/ScrollSyncProvider.js.map +0 -7
  179. package/dist/cjs/ScrollSync/index.js +0 -37
  180. package/dist/cjs/ScrollSync/index.js.map +0 -7
  181. package/dist/cjs/ScrollSync/useScrollSync.js +0 -41
  182. package/dist/cjs/ScrollSync/useScrollSync.js.map +0 -7
  183. package/dist/cjs/constants.js +0 -70
  184. package/dist/cjs/constants.js.map +0 -7
  185. package/dist/cjs/createDataInstance/createInstancePlugin.js +0 -48
  186. package/dist/cjs/createDataInstance/createInstancePlugin.js.map +0 -7
  187. package/dist/cjs/createDataInstance/createInstanceRef.js +0 -92
  188. package/dist/cjs/createDataInstance/createInstanceRef.js.map +0 -7
  189. package/dist/cjs/createDataInstance/utils.js +0 -99
  190. package/dist/cjs/createDataInstance/utils.js.map +0 -7
  191. package/dist/cjs/defer-render-hoc/index.js +0 -56
  192. package/dist/cjs/defer-render-hoc/index.js.map +0 -7
  193. package/dist/cjs/dimsum.config.js +0 -39
  194. package/dist/cjs/dimsum.config.js.map +0 -7
  195. package/dist/cjs/index.js +0 -40
  196. package/dist/cjs/index.js.map +0 -7
  197. package/dist/cjs/prop-types.js +0 -116
  198. package/dist/cjs/prop-types.js.map +0 -7
  199. package/dist/cjs/react-spring/index.js +0 -28
  200. package/dist/cjs/react-spring/index.js.map +0 -7
  201. package/dist/cjs/react-spring/renderprops.js +0 -28
  202. package/dist/cjs/react-spring/renderprops.js.map +0 -7
  203. package/dist/cjs/toolbar/ToolbarProvider.js +0 -111
  204. package/dist/cjs/toolbar/ToolbarProvider.js.map +0 -7
  205. package/dist/cjs/useDataGrid/VolatileRowsListener.js +0 -49
  206. package/dist/cjs/useDataGrid/VolatileRowsListener.js.map +0 -7
  207. package/dist/cjs/useDataGrid/index.js +0 -36
  208. package/dist/cjs/useDataGrid/index.js.map +0 -7
  209. package/dist/cjs/useDataGrid/initColumnDefinition.js +0 -141
  210. package/dist/cjs/useDataGrid/initColumnDefinition.js.map +0 -7
  211. package/dist/cjs/useDataGrid/useDataGrid.js +0 -194
  212. package/dist/cjs/useDataGrid/useDataGrid.js.map +0 -7
  213. package/dist/cjs/useDataList/index.js +0 -36
  214. package/dist/cjs/useDataList/index.js.map +0 -7
  215. package/dist/cjs/useDataList/recordIterator.js +0 -55
  216. package/dist/cjs/useDataList/recordIterator.js.map +0 -7
  217. package/dist/cjs/useDataList/useDataList.js +0 -93
  218. package/dist/cjs/useDataList/useDataList.js.map +0 -7
  219. package/dist/cjs/utils.js +0 -107
  220. package/dist/cjs/utils.js.map +0 -7
  221. package/dist/cjs/virtualization/AutoHeightList.js +0 -69
  222. package/dist/cjs/virtualization/AutoHeightList.js.map +0 -7
  223. package/dist/cjs/virtualization/FluidHeightList.js +0 -43
  224. package/dist/cjs/virtualization/FluidHeightList.js.map +0 -7
  225. package/dist/cjs/virtualization/index.js +0 -50
  226. package/dist/cjs/virtualization/index.js.map +0 -7
  227. package/dist/esm/Animations/BaseAnimation.js +0 -27
  228. package/dist/esm/Animations/BaseAnimation.js.map +0 -7
  229. package/dist/esm/Animations/Grow.js +0 -26
  230. package/dist/esm/Animations/Grow.js.map +0 -7
  231. package/dist/esm/Animations/GrowRight.js +0 -35
  232. package/dist/esm/Animations/GrowRight.js.map +0 -7
  233. package/dist/esm/Animations/GrowVertical.js +0 -29
  234. package/dist/esm/Animations/GrowVertical.js.map +0 -7
  235. package/dist/esm/CheckableGroup.js +0 -47
  236. package/dist/esm/CheckableGroup.js.map +0 -7
  237. package/dist/esm/DeferRenderAfterComputation.js +0 -23
  238. package/dist/esm/DeferRenderAfterComputation.js.map +0 -7
  239. package/dist/esm/FocusGroup/FocusGrid.js +0 -151
  240. package/dist/esm/FocusGroup/FocusGrid.js.map +0 -7
  241. package/dist/esm/FocusGroup/FocusGroup.js.map +0 -7
  242. package/dist/esm/FocusGroup/FocusGroupContext.js +0 -9
  243. package/dist/esm/FocusGroup/FocusGroupContext.js.map +0 -7
  244. package/dist/esm/FocusGroup/FocusGroupManager.js.map +0 -7
  245. package/dist/esm/FocusGroup/focusGroupManagerHoc.js +0 -25
  246. package/dist/esm/FocusGroup/focusGroupManagerHoc.js.map +0 -7
  247. package/dist/esm/FocusGroup/index.js +0 -18
  248. package/dist/esm/FocusGroup/index.js.map +0 -7
  249. package/dist/esm/FocusGroup/useFocusGroupItem.js +0 -38
  250. package/dist/esm/FocusGroup/useFocusGroupItem.js.map +0 -7
  251. package/dist/esm/FocusGroup/utils/getNextCellPosition.js.map +0 -7
  252. package/dist/esm/GroupContext/Group.js +0 -86
  253. package/dist/esm/GroupContext/Group.js.map +0 -7
  254. package/dist/esm/GroupContext/GroupContext.js +0 -7
  255. package/dist/esm/GroupContext/GroupContext.js.map +0 -7
  256. package/dist/esm/GroupContext/GroupItem.js +0 -11
  257. package/dist/esm/GroupContext/GroupItem.js.map +0 -7
  258. package/dist/esm/GroupContext/index.js +0 -10
  259. package/dist/esm/GroupContext/index.js.map +0 -7
  260. package/dist/esm/ScrollSync/ScrollSync.js.map +0 -7
  261. package/dist/esm/ScrollSync/ScrollSyncPane.js +0 -44
  262. package/dist/esm/ScrollSync/ScrollSyncPane.js.map +0 -7
  263. package/dist/esm/ScrollSync/ScrollSyncProvider.js +0 -91
  264. package/dist/esm/ScrollSync/ScrollSyncProvider.js.map +0 -7
  265. package/dist/esm/ScrollSync/index.js +0 -8
  266. package/dist/esm/ScrollSync/index.js.map +0 -7
  267. package/dist/esm/ScrollSync/useScrollSync.js +0 -12
  268. package/dist/esm/ScrollSync/useScrollSync.js.map +0 -7
  269. package/dist/esm/constants.js +0 -41
  270. package/dist/esm/constants.js.map +0 -7
  271. package/dist/esm/createDataInstance/createInstancePlugin.js +0 -19
  272. package/dist/esm/createDataInstance/createInstancePlugin.js.map +0 -7
  273. package/dist/esm/createDataInstance/createInstanceRef.js +0 -67
  274. package/dist/esm/createDataInstance/createInstanceRef.js.map +0 -7
  275. package/dist/esm/createDataInstance/utils.js +0 -70
  276. package/dist/esm/createDataInstance/utils.js.map +0 -7
  277. package/dist/esm/defer-render-hoc/index.js +0 -27
  278. package/dist/esm/defer-render-hoc/index.js.map +0 -7
  279. package/dist/esm/dimsum.config.js +0 -10
  280. package/dist/esm/dimsum.config.js.map +0 -7
  281. package/dist/esm/index.js +0 -11
  282. package/dist/esm/index.js.map +0 -7
  283. package/dist/esm/prop-types.js +0 -87
  284. package/dist/esm/prop-types.js.map +0 -7
  285. package/dist/esm/react-spring/index.js +0 -3
  286. package/dist/esm/react-spring/index.js.map +0 -7
  287. package/dist/esm/react-spring/renderprops.js +0 -3
  288. package/dist/esm/react-spring/renderprops.js.map +0 -7
  289. package/dist/esm/toolbar/ToolbarProvider.js +0 -82
  290. package/dist/esm/toolbar/ToolbarProvider.js.map +0 -7
  291. package/dist/esm/useDataGrid/VolatileRowsListener.js +0 -20
  292. package/dist/esm/useDataGrid/VolatileRowsListener.js.map +0 -7
  293. package/dist/esm/useDataGrid/index.js +0 -7
  294. package/dist/esm/useDataGrid/index.js.map +0 -7
  295. package/dist/esm/useDataGrid/initColumnDefinition.js +0 -118
  296. package/dist/esm/useDataGrid/initColumnDefinition.js.map +0 -7
  297. package/dist/esm/useDataGrid/useDataGrid.js +0 -177
  298. package/dist/esm/useDataGrid/useDataGrid.js.map +0 -7
  299. package/dist/esm/useDataList/index.js +0 -7
  300. package/dist/esm/useDataList/index.js.map +0 -7
  301. package/dist/esm/useDataList/recordIterator.js +0 -26
  302. package/dist/esm/useDataList/recordIterator.js.map +0 -7
  303. package/dist/esm/useDataList/useDataList.js +0 -67
  304. package/dist/esm/useDataList/useDataList.js.map +0 -7
  305. package/dist/esm/utils.js +0 -78
  306. package/dist/esm/utils.js.map +0 -7
  307. package/dist/esm/virtualization/AutoHeightList.js +0 -40
  308. package/dist/esm/virtualization/AutoHeightList.js.map +0 -7
  309. package/dist/esm/virtualization/FluidHeightList.js +0 -14
  310. package/dist/esm/virtualization/FluidHeightList.js.map +0 -7
  311. package/dist/esm/virtualization/index.js +0 -21
  312. package/dist/esm/virtualization/index.js.map +0 -7
  313. package/dist/types/DeferRenderAfterComputation.d.ts +0 -7
  314. package/dist/types/FocusGroup/FocusGrid.d.ts +0 -12
  315. package/dist/types/FocusGroup/FocusGroupContext.d.ts +0 -4
  316. package/dist/types/FocusGroup/focusGroupManagerHoc.d.ts +0 -9
  317. package/dist/types/FocusGroup/index.d.ts +0 -6
  318. package/dist/types/FocusGroup/useFocusGroupItem.d.ts +0 -4
  319. package/dist/types/GroupContext/index.d.ts +0 -3
  320. package/dist/types/ScrollSync/ScrollSyncPane.d.ts +0 -3
  321. package/dist/types/ScrollSync/index.d.ts +0 -2
  322. package/dist/types/ScrollSync/useScrollSync.d.ts +0 -7
  323. package/dist/types/createDataInstance/createInstancePlugin.d.ts +0 -2
  324. package/dist/types/dimsum.config.d.ts +0 -5
  325. package/dist/types/index.d.ts +0 -2
  326. package/dist/types/toolbar/ToolbarProvider.d.ts +0 -5
  327. package/dist/types/useDataGrid/VolatileRowsListener.d.ts +0 -7
  328. package/dist/types/useDataGrid/index.d.ts +0 -1
  329. package/dist/types/useDataGrid/useDataGrid.d.ts +0 -9
  330. package/dist/types/useDataList/index.d.ts +0 -1
@@ -0,0 +1,118 @@
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/web.dom-collections.iterator.js';
3
+ import { Component } from 'react';
4
+ import { GroupContext } from './GroupContext.js';
5
+
6
+ const getValueItem = e => {
7
+ const {
8
+ target,
9
+ currentTarget
10
+ } = e;
11
+
12
+ if (target) {
13
+ const {
14
+ value
15
+ } = target;
16
+ return value;
17
+ }
18
+
19
+ if (currentTarget) {
20
+ const {
21
+ value
22
+ } = currentTarget;
23
+ return value;
24
+ }
25
+
26
+ return e;
27
+ };
28
+
29
+ const toggleItemValue = (array, e) => {
30
+ const newvalue = getValueItem(e);
31
+ const res = array;
32
+ const index = array.indexOf(newvalue);
33
+
34
+ if (index === -1) {
35
+ res.push(newvalue);
36
+ } else {
37
+ res.splice(index, 1);
38
+ }
39
+
40
+ return res;
41
+ };
42
+
43
+ const {
44
+ Provider
45
+ } = GroupContext;
46
+ /** deprecated use CheckableGroup instead */
47
+
48
+ class Group extends Component {
49
+ constructor(props) {
50
+ super(props);
51
+ const {
52
+ activeValue,
53
+ disabled
54
+ } = props;
55
+ this.state = {
56
+ activeValue,
57
+ disabled,
58
+ prevValue: null,
59
+ onChange: this.handleChange.bind(this)
60
+ };
61
+ }
62
+
63
+ static getDerivedStateFromProps(nextProps, _ref) {
64
+ let {
65
+ prevValue
66
+ } = _ref;
67
+ if (nextProps.activeValue === prevValue) return null;
68
+ return {
69
+ activeValue: nextProps.activeValue,
70
+ prevValue: nextProps.activeValue
71
+ };
72
+ }
73
+
74
+ handleChange(e) {
75
+ const {
76
+ multiple,
77
+ onChange
78
+ } = this.props;
79
+ const {
80
+ activeValue
81
+ } = this.state;
82
+ const value = getValueItem(e);
83
+ let newValue;
84
+
85
+ if (multiple) {
86
+ newValue = toggleItemValue(activeValue || [], value);
87
+ } else if (activeValue !== value) {
88
+ // default behaviour it will be toggle the active value
89
+ newValue = value;
90
+ }
91
+
92
+ this.setState({
93
+ activeValue: newValue
94
+ });
95
+
96
+ for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
97
+ rest[_key - 1] = arguments[_key];
98
+ }
99
+
100
+ if (onChange) onChange(newValue, ...rest);
101
+ }
102
+
103
+ render() {
104
+ const {
105
+ children
106
+ } = this.props;
107
+ return /*#__PURE__*/_jsx(Provider, {
108
+ value: this.state
109
+ }, void 0, children);
110
+ }
111
+
112
+ }
113
+
114
+ Group.defaultProps = {
115
+ multiple: false
116
+ };
117
+
118
+ export { Group as default };
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+
3
+ const GroupContext = /*#__PURE__*/React.createContext();
4
+
5
+ export { GroupContext };
@@ -0,0 +1,16 @@
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
3
+ import { GroupContext } from './GroupContext.js';
4
+
5
+ const {
6
+ Consumer
7
+ } = GroupContext;
8
+
9
+ const GroupItem = _ref => {
10
+ let {
11
+ render
12
+ } = _ref;
13
+ return /*#__PURE__*/_jsx(Consumer, {}, void 0, context => render(context));
14
+ };
15
+
16
+ export { GroupItem as default };
@@ -0,0 +1,3 @@
1
+ export { default as Group } from './Group.js';
2
+ export { GroupContext } from './GroupContext.js';
3
+ export { default as GroupItem } from './GroupItem.js';
@@ -1,59 +1,83 @@
1
- import * as React from "react";
2
- import React2, { Component } from "react";
3
- const ScrollSyncContext = React2.createContext();
4
- const { Provider } = ScrollSyncContext;
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
3
+ import 'core-js/modules/esnext.iterator.constructor.js';
4
+ import 'core-js/modules/esnext.iterator.for-each.js';
5
+ import 'core-js/modules/esnext.async-iterator.find.js';
6
+ import 'core-js/modules/esnext.iterator.find.js';
7
+ import React, { Component } from 'react';
8
+
9
+ const ScrollSyncContext = /*#__PURE__*/React.createContext();
10
+ const {
11
+ Provider
12
+ } = ScrollSyncContext;
5
13
  class ScrollSync extends Component {
6
14
  constructor(props) {
7
15
  super(props);
8
16
  this.panes = {};
17
+
9
18
  this.registerPane = (node, groups) => {
10
- groups.forEach((group) => {
19
+ groups.forEach(group => {
11
20
  if (!this.panes[group]) {
12
21
  this.panes[group] = [];
13
22
  }
23
+
14
24
  if (this.panes[group].length > 0) {
15
25
  this.syncScrollPosition(this.panes[group][0], node);
16
26
  }
27
+
17
28
  this.panes[group].push(node);
18
29
  });
19
30
  this.addEvents(node, groups);
20
31
  };
32
+
21
33
  this.unregisterPane = (node, groups) => {
22
- groups.forEach((group) => {
34
+ groups.forEach(group => {
23
35
  if (this.findPane(node, group)) {
24
36
  this.removeEvents(node);
25
37
  this.panes[group].splice(this.panes[group].indexOf(node), 1);
26
38
  }
27
39
  });
28
40
  };
41
+
29
42
  this.addEvents = (node, groups) => {
30
- node.onscroll = this.handlePaneScroll.bind(this, node, groups);
43
+ /* For some reason element.addEventListener doesnt work with document.body */
44
+ node.onscroll = this.handlePaneScroll.bind(this, node, groups); // eslint-disable-line
31
45
  };
32
- this.removeEvents = (node) => {
33
- node.onscroll = null;
46
+
47
+ this.removeEvents = node => {
48
+ /* For some reason element.removeEventListener doesnt work with document.body */
49
+ node.onscroll = null; // eslint-disable-line
34
50
  };
51
+
35
52
  this.findPane = (node, group) => {
36
53
  if (!this.panes[group]) {
37
54
  return false;
38
55
  }
39
- return this.panes[group].find((pane) => pane === node);
56
+
57
+ return this.panes[group].find(pane => pane === node);
40
58
  };
59
+
41
60
  this.handlePaneScroll = (node, groups, e) => {
42
- const { enabled } = this.props;
43
- if (this.props.onScroll)
44
- this.props.onScroll(e);
45
- if (!enabled)
46
- return;
61
+ const {
62
+ enabled
63
+ } = this.props;
64
+ if (this.props.onScroll) this.props.onScroll(e);
65
+ if (!enabled) return;
47
66
  window.requestAnimationFrame(() => {
48
67
  this.syncScrollPositions(node, groups);
49
68
  });
50
69
  };
70
+
51
71
  this.syncScrollPositions = (scrolledPane, groups) => {
52
- groups.forEach((group) => {
53
- this.panes[group].forEach((pane) => {
72
+ groups.forEach(group => {
73
+ this.panes[group].forEach(pane => {
74
+ /* For all panes beside the currently scrolling one */
54
75
  if (scrolledPane !== pane) {
76
+ /* Remove event listeners from the node that we'll manipulate */
55
77
  this.removeEvents(pane, group);
56
78
  this.syncScrollPosition(scrolledPane, pane);
79
+ /* Re-attach event listeners after we're done scrolling */
80
+
57
81
  window.requestAnimationFrame(() => {
58
82
  this.addEvents(pane, groups);
59
83
  });
@@ -61,11 +85,13 @@ class ScrollSync extends Component {
61
85
  });
62
86
  });
63
87
  };
88
+
64
89
  this.syncContext = {
65
90
  registerPane: this.registerPane,
66
91
  unregisterPane: this.unregisterPane
67
92
  };
68
93
  }
94
+
69
95
  syncScrollPosition(scrolledPane, pane) {
70
96
  const {
71
97
  scrollTop,
@@ -77,22 +103,35 @@ class ScrollSync extends Component {
77
103
  } = scrolledPane;
78
104
  const scrollTopOffset = scrollHeight - clientHeight;
79
105
  const scrollLeftOffset = scrollWidth - clientWidth;
80
- const { proportional, vertical, horizontal } = this.props;
106
+ const {
107
+ proportional,
108
+ vertical,
109
+ horizontal
110
+ } = this.props;
111
+ /* Calculate the actual pane height */
112
+
81
113
  const paneHeight = pane.scrollHeight - clientHeight;
82
114
  const paneWidth = pane.scrollWidth - clientWidth;
115
+ /* Adjust the scrollTop position of it accordingly */
116
+
83
117
  if (vertical && scrollTopOffset > 0) {
84
- pane.scrollTop = proportional ? paneHeight * scrollTop / scrollTopOffset : scrollTop;
118
+ pane.scrollTop = proportional ? paneHeight * scrollTop / scrollTopOffset : scrollTop; // eslint-disable-line
85
119
  }
120
+
86
121
  if (horizontal && scrollLeftOffset > 0) {
87
- pane.scrollLeft = proportional ? paneWidth * scrollLeft / scrollLeftOffset : scrollLeft;
122
+ pane.scrollLeft = proportional ? paneWidth * scrollLeft / scrollLeftOffset : scrollLeft; // eslint-disable-line
88
123
  }
89
124
  }
125
+
90
126
  render() {
91
- const { children } = this.props;
92
- return /* @__PURE__ */ React2.createElement(Provider, {
127
+ const {
128
+ children
129
+ } = this.props;
130
+ return /*#__PURE__*/_jsx(Provider, {
93
131
  value: this.syncContext
94
- }, React2.Children.only(children));
132
+ }, void 0, React.Children.only(children));
95
133
  }
134
+
96
135
  }
97
136
  ScrollSync.defaultProps = {
98
137
  proportional: true,
@@ -100,10 +139,5 @@ ScrollSync.defaultProps = {
100
139
  horizontal: true,
101
140
  enabled: true
102
141
  };
103
- var ScrollSync_default = ScrollSync;
104
- export {
105
- ScrollSync,
106
- ScrollSyncContext,
107
- ScrollSync_default as default
108
- };
109
- //# sourceMappingURL=ScrollSync.js.map
142
+
143
+ export { ScrollSyncContext, ScrollSync as default };
@@ -0,0 +1,74 @@
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
3
+ import 'core-js/modules/web.dom-collections.iterator.js';
4
+ import 'core-js/modules/esnext.async-iterator.constructor.js';
5
+ import 'core-js/modules/esnext.async-iterator.to-array.js';
6
+ import 'core-js/modules/esnext.iterator.constructor.js';
7
+ import 'core-js/modules/esnext.iterator.to-array.js';
8
+ import 'core-js/modules/esnext.async-iterator.filter.js';
9
+ import 'core-js/modules/esnext.iterator.filter.js';
10
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
11
+ import 'core-js/modules/esnext.iterator.for-each.js';
12
+ import { Component } from 'react';
13
+ import { ScrollSyncContext } from './ScrollSync.js';
14
+ import { jsx } from 'react/jsx-runtime';
15
+
16
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17
+
18
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
19
+
20
+ class ScrollSyncPane extends Component {
21
+ constructor() {
22
+ super(...arguments);
23
+
24
+ this.toArray = groups => [].concat(groups);
25
+ }
26
+
27
+ componentWillUnmount() {
28
+ const {
29
+ enabled,
30
+ group,
31
+ syncContext
32
+ } = this.props;
33
+ const {
34
+ unregisterPane
35
+ } = syncContext;
36
+ if (enabled) unregisterPane(this.node, this.toArray(group));
37
+ }
38
+
39
+ render() {
40
+ const {
41
+ children,
42
+ group,
43
+ syncContext,
44
+ notPaginated
45
+ } = this.props;
46
+ const {
47
+ registerPane
48
+ } = syncContext;
49
+ return children({
50
+ registerPane: node => {
51
+ if (notPaginated) {
52
+ const virtualizedBody = node.querySelector('.virtualized-body-wrapper');
53
+
54
+ if (virtualizedBody) {
55
+ registerPane(virtualizedBody, this.toArray(group));
56
+ }
57
+ }
58
+
59
+ return registerPane(node, this.toArray(group));
60
+ }
61
+ });
62
+ }
63
+
64
+ }
65
+
66
+ ScrollSyncPane.defaultProps = {
67
+ group: 'default',
68
+ enabled: true
69
+ };
70
+ var ScrollSyncPane$1 = (props => /*#__PURE__*/_jsx(ScrollSyncContext.Consumer, {}, void 0, context => /*#__PURE__*/jsx(ScrollSyncPane, _objectSpread(_objectSpread({}, props), {}, {
71
+ syncContext: context
72
+ }))));
73
+
74
+ export { ScrollSyncPane$1 as default };
@@ -0,0 +1,59 @@
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
3
+ import 'core-js/modules/esnext.iterator.constructor.js';
4
+ import 'core-js/modules/esnext.iterator.for-each.js';
5
+ import 'core-js/modules/esnext.async-iterator.find.js';
6
+ import 'core-js/modules/esnext.iterator.find.js';
7
+ import React from 'react';
8
+ import raf from 'raf';
9
+
10
+ const ScrollSyncContext = /*#__PURE__*/React.createContext();
11
+ const {
12
+ Provider
13
+ } = ScrollSyncContext;
14
+
15
+ function ScrollSyncProvider(_ref) {
16
+ let {
17
+ enabled,
18
+ horizontal,
19
+ vertical,
20
+ children
21
+ } = _ref;
22
+ useRef();
23
+
24
+ raf((scrolledPane, pane) => {
25
+ const {
26
+ scrollTop,
27
+ scrollHeight,
28
+ clientHeight,
29
+ scrollLeft,
30
+ scrollWidth,
31
+ clientWidth
32
+ } = scrolledPane;
33
+ const scrollTopOffset = scrollHeight - clientHeight;
34
+ const scrollLeftOffset = scrollWidth - clientWidth;
35
+ const {
36
+ proportional,
37
+ vertical,
38
+ horizontal
39
+ } = this.props;
40
+ /* Calculate the actual pane height */
41
+
42
+ const paneHeight = pane.scrollHeight - clientHeight;
43
+ const paneWidth = pane.scrollWidth - clientWidth;
44
+ /* Adjust the scrollTop position of it accordingly */
45
+
46
+ if (vertical && scrollTopOffset > 0) {
47
+ pane.scrollTop = proportional ? paneHeight * scrollTop / scrollTopOffset : scrollTop; // eslint-disable-line
48
+ }
49
+
50
+ if (horizontal && scrollLeftOffset > 0) {
51
+ pane.scrollLeft = proportional ? paneWidth * scrollLeft / scrollLeftOffset : scrollLeft; // eslint-disable-line
52
+ }
53
+ });
54
+ return /*#__PURE__*/_jsx(Provider, {}, void 0, children);
55
+ }
56
+
57
+ ScrollSyncProvider.defaultProps = {};
58
+
59
+ export { ScrollSyncProvider as default };
@@ -0,0 +1,2 @@
1
+ export { default as ScrollSync } from './ScrollSync.js';
2
+ export { default as ScrollSyncPane } from './ScrollSyncPane.js';
@@ -0,0 +1,8 @@
1
+ function useScrollSync(props) {
2
+ return {};
3
+ }
4
+
5
+ useScrollSync.propTypes = {};
6
+ useScrollSync.defaultProps = {};
7
+
8
+ export { useScrollSync as default };
@@ -0,0 +1,32 @@
1
+ const DEFAULT_DELAY_OPEN = 200;
2
+ const DEFAULT_DELAY_CLOSE = 300;
3
+ const sizeOptions = ['small', 'medium', 'large', 'x-large'];
4
+ const AM = 'am';
5
+ const PM = 'pm';
6
+ const ARROW_UP = 'ArrowUp';
7
+ const ARROW_DOWN = 'ArrowDown';
8
+ const BACKSPACE = 'Backspace';
9
+ const ESCAPE = 'Escape';
10
+ const HOME = 'Home';
11
+ const SHIFT = 'Shift';
12
+ const END = 'End';
13
+ const HOUR_RANGE_12 = {
14
+ min: 0,
15
+ max: 12
16
+ };
17
+ const HOUR_RANGE_24 = {
18
+ min: 0,
19
+ max: 24
20
+ };
21
+ const GENERAL_TIME_RANGE = {
22
+ min: 0,
23
+ max: 59
24
+ };
25
+ const PLACEHOLDER_TIME = {
26
+ hour: 'hour',
27
+ minutes: 'minutes',
28
+ seconds: 'seconds',
29
+ meridiem: 'meridiem'
30
+ };
31
+
32
+ export { AM, ARROW_DOWN, ARROW_UP, BACKSPACE, DEFAULT_DELAY_CLOSE, DEFAULT_DELAY_OPEN, END, ESCAPE, GENERAL_TIME_RANGE, HOME, HOUR_RANGE_12, HOUR_RANGE_24, PLACEHOLDER_TIME, PM, SHIFT, sizeOptions };
@@ -0,0 +1,30 @@
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.filter.js';
3
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
4
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
+ import 'core-js/modules/esnext.iterator.constructor.js';
6
+ import 'core-js/modules/esnext.iterator.for-each.js';
7
+ import 'core-js/modules/web.dom-collections.iterator.js';
8
+
9
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
10
+
11
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
12
+
13
+ function getDecoratorsFromHooks(hooks, decorators) {
14
+ const nextDecorators = _objectSpread({}, decorators);
15
+
16
+ Object.keys(hooks).forEach(decorator => {
17
+ if (Array.isArray(decorators[decorator])) {
18
+ nextDecorators[decorator] = [...decorators[decorator], hooks[decorator]];
19
+ } else {
20
+ nextDecorators[decorator] = hooks[decorator];
21
+ }
22
+ });
23
+ return nextDecorators;
24
+ }
25
+
26
+ function createInstancePlugin(name, hooks) {
27
+ return decorators => getDecoratorsFromHooks(hooks, decorators);
28
+ }
29
+
30
+ export { createInstancePlugin as default };
@@ -0,0 +1,90 @@
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.filter.js';
3
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
4
+ import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
5
+ import 'core-js/modules/web.dom-collections.iterator.js';
6
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
7
+ import 'core-js/modules/esnext.iterator.constructor.js';
8
+ import 'core-js/modules/esnext.iterator.for-each.js';
9
+ import 'core-js/modules/esnext.async-iterator.reduce.js';
10
+ import 'core-js/modules/esnext.iterator.reduce.js';
11
+ import { v4 } from 'uuid';
12
+ import { useRef, useState, useMemo } from 'react';
13
+ import { orderBy } from 'lodash';
14
+ import { mergeInstance, registerStateHookToInstance, registerHotKeysHookToInstance } from './utils.js';
15
+
16
+ const _excluded = ["uuid", "data", "renderers", "plugins", "customDecorators"];
17
+
18
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
19
+
20
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
21
+ const defaultDecorators = {
22
+ instance: [],
23
+ state: [],
24
+ hotKeys: [],
25
+ renderers: [],
26
+ composeData: []
27
+ };
28
+ function createDataInstanceRef(_ref) {
29
+ let {
30
+ uuid: uuidProp,
31
+ data,
32
+ renderers,
33
+ plugins,
34
+ customDecorators
35
+ } = _ref,
36
+ props = _objectWithoutProperties(_ref, _excluded);
37
+
38
+ // eslint-disable-next-line react-hooks/rules-of-hooks
39
+ const instance = useRef(); // eslint-disable-next-line react-hooks/rules-of-hooks
40
+
41
+ const [uuid] = useState(uuidProp || (() => v4()));
42
+ instance.current = {
43
+ uuid,
44
+ state: {},
45
+ actions: {},
46
+ hotKeys: {},
47
+ // keyboard hotkeys to run specific actions
48
+ originalData: data,
49
+ records: [],
50
+ // item abstraction with meta data for originalData
51
+ renderers,
52
+
53
+ ref(key) {
54
+ // eslint-disable-next-line no-return-assign
55
+ return node => instance.current.refs[key] = node;
56
+ },
57
+
58
+ getInstance() {
59
+ return instance.current;
60
+ },
61
+
62
+ props
63
+ }; // eslint-disable-next-line react-hooks/rules-of-hooks
64
+
65
+ const decorators = useMemo(() => {
66
+ let nextDecorators = _objectSpread(_objectSpread({}, defaultDecorators), customDecorators);
67
+
68
+ plugins.forEach(plugin => {
69
+ if (!plugin) return;
70
+ nextDecorators = plugin(nextDecorators);
71
+ });
72
+ Object.keys(nextDecorators).forEach(key => {
73
+ if (Array.isArray(nextDecorators[key])) nextDecorators[key] = orderBy(nextDecorators[key], item => item.order);
74
+ });
75
+ return nextDecorators;
76
+ }, []); // the plugins are defined on creation, but not changed at runtime
77
+ // todo: test if getting the hooks without registering them
78
+ // here would be beneficial to memoize instance and squeeze performance
79
+
80
+ instance.current = decorators.instance.reduce(mergeInstance, instance.current);
81
+ instance.current = decorators.state.reduce(registerStateHookToInstance, instance.current);
82
+ instance.current = decorators.hotKeys.reduce(registerHotKeysHookToInstance, instance.current);
83
+ instance.current.renderers = decorators.renderers.reduce((result, decorator) => decorator(result, instance.current), renderers);
84
+ return {
85
+ instance,
86
+ decorators
87
+ };
88
+ }
89
+
90
+ export { createDataInstanceRef as default };