@beppla/tapas-ui 1.0.70 → 1.0.72

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 (579) hide show
  1. package/commonjs/Alert/Alert.js +67 -47
  2. package/commonjs/AnimatedNavItem/AnimatedNavItem.js +0 -72
  3. package/commonjs/AnimatedNavItem/index.js +9 -16
  4. package/commonjs/BarChart/BarChart.js +0 -1
  5. package/commonjs/BarChart/index.js +0 -1
  6. package/commonjs/Button/Button.js +77 -97
  7. package/commonjs/Button/ButtonGroup.js +0 -1
  8. package/commonjs/Button/react-native-hoverable.d.js +0 -1
  9. package/commonjs/Calendar/Calendar.base.js +189 -163
  10. package/commonjs/Calendar/Calendar.js +102 -87
  11. package/commonjs/Calendar/ConcreteTimeSelector.js +0 -2
  12. package/commonjs/Calendar/CustomRange.js +0 -1
  13. package/commonjs/Calendar/DaySelector.js +113 -116
  14. package/commonjs/Calendar/MonthSelector.js +0 -2
  15. package/commonjs/Calendar/TimeSelector.js +223 -275
  16. package/commonjs/Calendar/WeekDaySelector.js +0 -1
  17. package/commonjs/Calendar/helper.js +68 -69
  18. package/commonjs/Calendar/local.js +0 -1
  19. package/commonjs/Calendar/types.js +10 -11
  20. package/commonjs/Card/Card.js +158 -232
  21. package/commonjs/CheckBox/CheckBox.js +0 -1
  22. package/commonjs/CheckBox/CheckBoxItem.js +36 -87
  23. package/commonjs/CheckBox/GroupCheckBox.js +66 -81
  24. package/commonjs/CircularProgress/CircularProgress.js +0 -1
  25. package/commonjs/Collapsible/Collapsible.js +0 -2
  26. package/commonjs/DashboardCard/DashboardCard.js +94 -75
  27. package/commonjs/DataCell/DataCell.js +235 -290
  28. package/commonjs/DataCell/index.js +0 -2
  29. package/commonjs/DataTable/DataTable.js +144 -71
  30. package/commonjs/DataTable/index.js +0 -1
  31. package/commonjs/DeviceSelectionModal/DeviceSelectionModal.js +243 -243
  32. package/commonjs/DraggableFlatList/DraggableFlatList.js +0 -1
  33. package/commonjs/Drawer/Drawer.js +0 -1
  34. package/commonjs/Dropdown/CustomDropdown.js +0 -1
  35. package/commonjs/Dropdown/Dropdown.js +461 -494
  36. package/commonjs/Dropdown/InputDropdown.js +113 -124
  37. package/commonjs/ExternalLink/ExternalLink.js +58 -51
  38. package/commonjs/Gantt/Accessories.js +0 -1
  39. package/commonjs/Gantt/Gantt.js +0 -2
  40. package/commonjs/Gantt/GanttInnerElementType.js +0 -2
  41. package/commonjs/Gantt/helper.js +0 -1
  42. package/commonjs/Gantt/types.js +0 -1
  43. package/commonjs/Grid/FixedSizeGrid.js +0 -1
  44. package/commonjs/Grid/Grid.base.js +400 -337
  45. package/commonjs/Grid/StaticFixedSizeGrid.js +0 -1
  46. package/commonjs/Grid/VariableSizeGrid.js +113 -121
  47. package/commonjs/Grid/helper.js +15 -12
  48. package/commonjs/Grid/timer.js +0 -1
  49. package/commonjs/Header/Header.js +177 -167
  50. package/commonjs/HelloWave/HelloWave.js +52 -47
  51. package/commonjs/Hoverable/Hoverable.js +0 -2
  52. package/commonjs/IconText/IconText.js +0 -2
  53. package/commonjs/Icons/TapasIcon.js +99 -100
  54. package/commonjs/Icons/TapasIconExpo.js +93 -102
  55. package/commonjs/Icons/expoFontLoader.js +0 -2
  56. package/commonjs/Icons/fontLoader.js +0 -1
  57. package/commonjs/Icons/index.js +0 -2
  58. package/commonjs/Icons/smartFontLoader.js +222 -267
  59. package/commonjs/Image/Image.js +106 -97
  60. package/commonjs/Image/PreviewImg.js +0 -1
  61. package/commonjs/Input/Input.js +0 -2
  62. package/commonjs/Layout/DrawerContext.js +34 -50
  63. package/commonjs/Layout/Layout.js +0 -2
  64. package/commonjs/Layout/ToastContext.js +46 -35
  65. package/commonjs/Layout/index.js +37 -35
  66. package/commonjs/LineChart/LineChart.js +0 -1
  67. package/commonjs/LineChart/index.js +2 -4
  68. package/commonjs/ListItem/ListItem.js +108 -81
  69. package/commonjs/Loading/Loading.js +0 -1
  70. package/commonjs/MessageBox/MessageBox.js +0 -2
  71. package/commonjs/MultiSelector/MultiSelector.js +225 -251
  72. package/commonjs/MultiSelector/index.js +0 -2
  73. package/commonjs/Navigation/Navigation.js +117 -115
  74. package/commonjs/Notification/Notification.js +66 -136
  75. package/commonjs/Notification/index.js +0 -2
  76. package/commonjs/NumericInput/NumericInput.js +85 -72
  77. package/commonjs/Overlay/Overlay.js +45 -25
  78. package/commonjs/Pagination/Pagination.js +0 -1
  79. package/commonjs/PieChart/PieChart.js +0 -2
  80. package/commonjs/PieChart/index.js +0 -1
  81. package/commonjs/Popover/Popover.js +136 -113
  82. package/commonjs/Progress/Progress.js +48 -55
  83. package/commonjs/Quantity/Quantity.js +69 -1
  84. package/commonjs/Quantity/index.js +0 -1
  85. package/commonjs/RadioButton/RadioButton.js +94 -47
  86. package/commonjs/ReasonModal/ReasonModal.js +0 -2
  87. package/commonjs/ReasonModal/index.js +14 -10
  88. package/commonjs/ScanButton/ScanButton.js +0 -2
  89. package/commonjs/SearchInput/SearchInput.js +0 -2
  90. package/commonjs/SearchInput/index.js +0 -1
  91. package/commonjs/SheetTitle/SheetTitle.js +34 -32
  92. package/commonjs/Shell/Shell.js +92 -85
  93. package/commonjs/Shell/styles.js +2 -3
  94. package/commonjs/Shell/types.js +0 -1
  95. package/commonjs/StatisticCard/StatisticCard.js +46 -42
  96. package/commonjs/StatisticCard/index.js +0 -2
  97. package/commonjs/Status/Status.js +34 -32
  98. package/commonjs/Steps/Steps.js +40 -42
  99. package/commonjs/TabTitle/TabTitle.js +53 -49
  100. package/commonjs/TabTitle/index.js +0 -1
  101. package/commonjs/TableColumnHeader/TableColumnHeader.js +0 -1
  102. package/commonjs/TableColumnHeader/index.js +0 -2
  103. package/commonjs/Tag/Tag.js +88 -35
  104. package/commonjs/Task/Task.js +112 -202
  105. package/commonjs/Task/type.js +3 -4
  106. package/commonjs/Text/Text.js +96 -57
  107. package/commonjs/TextArea/TextArea.js +0 -2
  108. package/commonjs/Theme/ThemeProvider.js +15 -19
  109. package/commonjs/Theme/defaultTheme.js +0 -2
  110. package/commonjs/Theme/themed.d.js +0 -1
  111. package/commonjs/Timeline/Timeline.js +0 -24
  112. package/commonjs/Toast/Toast.js +83 -63
  113. package/commonjs/UserSwitcher/UserSwitcher.js +0 -2
  114. package/commonjs/UserSwitcher/index.js +8 -15
  115. package/commonjs/common.js +4 -5
  116. package/commonjs/index.js +335 -427
  117. package/module/Alert/Alert.js +0 -2
  118. package/module/AnimatedNavItem/AnimatedNavItem.js +124 -160
  119. package/module/AnimatedNavItem/index.js +2 -8
  120. package/module/BarChart/BarChart.js +0 -2
  121. package/module/BarChart/index.js +0 -1
  122. package/module/Button/Button.js +70 -81
  123. package/module/Button/ButtonGroup.js +128 -121
  124. package/module/Button/react-native-hoverable.d.js +0 -1
  125. package/module/Calendar/Calendar.base.js +225 -150
  126. package/module/Calendar/Calendar.js +76 -81
  127. package/module/Calendar/ConcreteTimeSelector.js +0 -2
  128. package/module/Calendar/CustomRange.js +0 -1
  129. package/module/Calendar/DaySelector.js +95 -119
  130. package/module/Calendar/MonthSelector.js +0 -2
  131. package/module/Calendar/TimeSelector.js +0 -2
  132. package/module/Calendar/WeekDaySelector.js +0 -1
  133. package/module/Calendar/helper.js +73 -75
  134. package/module/Calendar/local.js +7 -8
  135. package/module/Calendar/types.js +13 -14
  136. package/module/Card/Card.js +0 -1
  137. package/module/CheckBox/CheckBox.js +93 -90
  138. package/module/CheckBox/CheckBoxItem.js +69 -85
  139. package/module/CheckBox/GroupCheckBox.js +66 -77
  140. package/module/CircularProgress/CircularProgress.js +21 -1
  141. package/module/Collapsible/Collapsible.js +54 -65
  142. package/module/DashboardCard/DashboardCard.js +0 -1
  143. package/module/DataCell/DataCell.js +310 -225
  144. package/module/DataCell/index.js +4 -4
  145. package/module/DataTable/DataTable.js +0 -2
  146. package/module/DataTable/index.js +1 -5
  147. package/module/DeviceSelectionModal/DeviceSelectionModal.js +178 -242
  148. package/module/DraggableFlatList/DraggableFlatList.js +0 -10
  149. package/module/Drawer/Drawer.js +166 -140
  150. package/module/Dropdown/CustomDropdown.js +55 -1
  151. package/module/Dropdown/Dropdown.js +0 -1
  152. package/module/Dropdown/InputDropdown.js +116 -135
  153. package/module/ExternalLink/ExternalLink.js +149 -1
  154. package/module/Gantt/Accessories.js +182 -125
  155. package/module/Gantt/Gantt.js +139 -153
  156. package/module/Gantt/GanttInnerElementType.js +0 -1
  157. package/module/Gantt/helper.js +0 -2
  158. package/module/Gantt/types.js +3 -9
  159. package/module/Grid/FixedSizeGrid.js +85 -81
  160. package/module/Grid/Grid.base.js +400 -340
  161. package/module/Grid/StaticFixedSizeGrid.js +192 -256
  162. package/module/Grid/VariableSizeGrid.js +120 -119
  163. package/module/Grid/helper.js +0 -1
  164. package/module/Grid/timer.js +13 -17
  165. package/module/Header/Header.js +167 -184
  166. package/module/HelloWave/HelloWave.js +0 -2
  167. package/module/Hoverable/Hoverable.js +0 -1
  168. package/module/IconText/IconText.js +63 -89
  169. package/module/Icons/TapasIcon.js +119 -97
  170. package/module/Icons/TapasIconExpo.js +78 -99
  171. package/module/Icons/expoFontLoader.js +0 -2
  172. package/module/Icons/fontLoader.js +212 -183
  173. package/module/Icons/index.js +8 -11
  174. package/module/Icons/smartFontLoader.js +0 -1
  175. package/module/Image/Image.js +0 -2
  176. package/module/Image/PreviewImg.js +0 -1
  177. package/module/Input/Input.js +0 -2
  178. package/module/Layout/DrawerContext.js +0 -2
  179. package/module/Layout/Layout.js +100 -101
  180. package/module/Layout/ToastContext.js +26 -16
  181. package/module/Layout/index.js +0 -1
  182. package/module/LineChart/LineChart.js +121 -158
  183. package/module/LineChart/index.js +0 -2
  184. package/module/ListItem/ListItem.js +0 -2
  185. package/module/Loading/Loading.js +0 -2
  186. package/module/MessageBox/MessageBox.js +0 -2
  187. package/module/MultiSelector/MultiSelector.js +0 -1
  188. package/module/MultiSelector/index.js +0 -2
  189. package/module/Navigation/Navigation.js +0 -2
  190. package/module/Notification/Notification.js +101 -106
  191. package/module/Notification/index.js +1 -4
  192. package/module/NumericInput/NumericInput.js +0 -55
  193. package/module/Overlay/Overlay.js +0 -2
  194. package/module/Pagination/Pagination.js +71 -1
  195. package/module/PieChart/PieChart.js +76 -102
  196. package/module/PieChart/index.js +0 -2
  197. package/module/Popover/Popover.js +97 -126
  198. package/module/Progress/Progress.js +51 -58
  199. package/module/Quantity/Quantity.js +112 -130
  200. package/module/Quantity/index.js +3 -3
  201. package/module/RadioButton/RadioButton.js +0 -2
  202. package/module/ReasonModal/ReasonModal.js +0 -1
  203. package/module/ReasonModal/index.js +5 -4
  204. package/module/ScanButton/ScanButton.js +76 -54
  205. package/module/SearchInput/SearchInput.js +83 -94
  206. package/module/SearchInput/index.js +0 -1
  207. package/module/SheetTitle/SheetTitle.js +29 -40
  208. package/module/Shell/Shell.js +91 -80
  209. package/module/Shell/styles.js +7 -9
  210. package/module/Shell/types.js +4 -3
  211. package/module/StatisticCard/StatisticCard.js +48 -80
  212. package/module/StatisticCard/index.js +0 -2
  213. package/module/Status/Status.js +0 -2
  214. package/module/Steps/Steps.js +36 -42
  215. package/module/TabTitle/TabTitle.js +0 -2
  216. package/module/TabTitle/index.js +0 -2
  217. package/module/TableColumnHeader/TableColumnHeader.js +126 -154
  218. package/module/TableColumnHeader/index.js +8 -4
  219. package/module/Tag/Tag.js +72 -88
  220. package/module/Task/Task.js +206 -114
  221. package/module/Task/type.js +8 -5
  222. package/module/Text/Text.js +69 -81
  223. package/module/TextArea/TextArea.js +0 -2
  224. package/module/Theme/ThemeProvider.js +0 -2
  225. package/module/Theme/defaultTheme.js +0 -2
  226. package/module/Theme/themed.d.js +0 -1
  227. package/module/Timeline/Timeline.js +0 -2
  228. package/module/Toast/Toast.js +66 -78
  229. package/module/UserSwitcher/UserSwitcher.js +130 -172
  230. package/module/UserSwitcher/index.js +0 -2
  231. package/module/common.js +0 -1
  232. package/module/index.js +119 -132
  233. package/package.json +1 -1
  234. package/commonjs/Alert/Alert.js.map +0 -2
  235. package/commonjs/AnimatedNavItem/AnimatedNavItem.js.map +0 -2
  236. package/commonjs/AnimatedNavItem/index.js.map +0 -2
  237. package/commonjs/BarChart/BarChart.js.map +0 -1
  238. package/commonjs/BarChart/index.js.map +0 -2
  239. package/commonjs/Button/Button.js.map +0 -1
  240. package/commonjs/Button/ButtonGroup.js.map +0 -1
  241. package/commonjs/Button/react-native-hoverable.d.js.map +0 -1
  242. package/commonjs/Calendar/Calendar.base.js.map +0 -1
  243. package/commonjs/Calendar/Calendar.js.map +0 -2
  244. package/commonjs/Calendar/ConcreteTimeSelector.js.map +0 -2
  245. package/commonjs/Calendar/CustomRange.js.map +0 -2
  246. package/commonjs/Calendar/DaySelector.js.map +0 -2
  247. package/commonjs/Calendar/MonthSelector.js.map +0 -2
  248. package/commonjs/Calendar/TimeSelector.js.map +0 -2
  249. package/commonjs/Calendar/WeekDaySelector.js.map +0 -2
  250. package/commonjs/Calendar/helper.js.map +0 -2
  251. package/commonjs/Calendar/local.js.map +0 -2
  252. package/commonjs/Calendar/types.js.map +0 -1
  253. package/commonjs/Card/Card.js.map +0 -1
  254. package/commonjs/CheckBox/CheckBox.js.map +0 -1
  255. package/commonjs/CheckBox/CheckBoxItem.js.map +0 -1
  256. package/commonjs/CheckBox/GroupCheckBox.js.map +0 -1
  257. package/commonjs/CircularProgress/CircularProgress.js.map +0 -1
  258. package/commonjs/Collapsible/Collapsible.js.map +0 -2
  259. package/commonjs/DashboardCard/DashboardCard.js.map +0 -1
  260. package/commonjs/DataCell/DataCell.js.map +0 -2
  261. package/commonjs/DataCell/index.js.map +0 -1
  262. package/commonjs/DataTable/DataTable.js.map +0 -2
  263. package/commonjs/DataTable/index.js.map +0 -2
  264. package/commonjs/DeviceSelectionModal/DeviceSelectionModal.js.map +0 -1
  265. package/commonjs/DraggableFlatList/DraggableFlatList.js.map +0 -1
  266. package/commonjs/Drawer/Drawer.js.map +0 -1
  267. package/commonjs/Dropdown/CustomDropdown.js.map +0 -1
  268. package/commonjs/Dropdown/Dropdown.js.map +0 -2
  269. package/commonjs/Dropdown/InputDropdown.js.map +0 -2
  270. package/commonjs/ExternalLink/ExternalLink.js.map +0 -2
  271. package/commonjs/Gantt/Accessories.js.map +0 -1
  272. package/commonjs/Gantt/Gantt.js.map +0 -2
  273. package/commonjs/Gantt/GanttInnerElementType.js.map +0 -2
  274. package/commonjs/Gantt/helper.js.map +0 -2
  275. package/commonjs/Gantt/types.js.map +0 -2
  276. package/commonjs/Grid/FixedSizeGrid.js.map +0 -1
  277. package/commonjs/Grid/Grid.base.js.map +0 -1
  278. package/commonjs/Grid/StaticFixedSizeGrid.js.map +0 -1
  279. package/commonjs/Grid/VariableSizeGrid.js.map +0 -2
  280. package/commonjs/Grid/helper.js.map +0 -2
  281. package/commonjs/Grid/timer.js.map +0 -1
  282. package/commonjs/Header/Header.js.map +0 -2
  283. package/commonjs/HelloWave/HelloWave.js.map +0 -1
  284. package/commonjs/Hoverable/Hoverable.js.map +0 -2
  285. package/commonjs/IconText/IconText.js.map +0 -2
  286. package/commonjs/Icons/TapasIcon.js.map +0 -1
  287. package/commonjs/Icons/TapasIconExpo.js.map +0 -2
  288. package/commonjs/Icons/expoFontLoader.js.map +0 -2
  289. package/commonjs/Icons/fontLoader.js.map +0 -1
  290. package/commonjs/Icons/index.js.map +0 -2
  291. package/commonjs/Icons/smartFontLoader.js.map +0 -2
  292. package/commonjs/Image/Image.js.map +0 -2
  293. package/commonjs/Image/PreviewImg.js.map +0 -1
  294. package/commonjs/Input/Input.js.map +0 -2
  295. package/commonjs/Layout/DrawerContext.js.map +0 -1
  296. package/commonjs/Layout/Layout.js.map +0 -2
  297. package/commonjs/Layout/ToastContext.js.map +0 -2
  298. package/commonjs/Layout/index.js.map +0 -2
  299. package/commonjs/LineChart/LineChart.js.map +0 -1
  300. package/commonjs/LineChart/index.js.map +0 -1
  301. package/commonjs/ListItem/ListItem.js.map +0 -2
  302. package/commonjs/Loading/Loading.js.map +0 -1
  303. package/commonjs/MessageBox/MessageBox.js.map +0 -2
  304. package/commonjs/MultiSelector/MultiSelector.js.map +0 -2
  305. package/commonjs/MultiSelector/index.js.map +0 -2
  306. package/commonjs/Navigation/Navigation.js.map +0 -2
  307. package/commonjs/Notification/Notification.js.map +0 -1
  308. package/commonjs/Notification/index.js.map +0 -2
  309. package/commonjs/NumericInput/NumericInput.js.map +0 -2
  310. package/commonjs/Overlay/Overlay.js.map +0 -1
  311. package/commonjs/Pagination/Pagination.js.map +0 -1
  312. package/commonjs/PieChart/PieChart.js.map +0 -2
  313. package/commonjs/PieChart/index.js.map +0 -2
  314. package/commonjs/Popover/Popover.js.map +0 -1
  315. package/commonjs/Progress/Progress.js.map +0 -1
  316. package/commonjs/Quantity/Quantity.js.map +0 -1
  317. package/commonjs/Quantity/index.js.map +0 -1
  318. package/commonjs/RadioButton/RadioButton.js.map +0 -1
  319. package/commonjs/ReasonModal/ReasonModal.js.map +0 -2
  320. package/commonjs/ReasonModal/index.js.map +0 -1
  321. package/commonjs/ScanButton/ScanButton.js.map +0 -2
  322. package/commonjs/SearchInput/SearchInput.js.map +0 -2
  323. package/commonjs/SearchInput/index.js.map +0 -1
  324. package/commonjs/SheetTitle/SheetTitle.js.map +0 -1
  325. package/commonjs/Shell/Shell.js.map +0 -2
  326. package/commonjs/Shell/styles.js.map +0 -1
  327. package/commonjs/Shell/types.js.map +0 -1
  328. package/commonjs/StatisticCard/StatisticCard.js.map +0 -2
  329. package/commonjs/StatisticCard/index.js.map +0 -2
  330. package/commonjs/Status/Status.js.map +0 -1
  331. package/commonjs/Steps/Steps.js.map +0 -1
  332. package/commonjs/TabTitle/TabTitle.js.map +0 -2
  333. package/commonjs/TabTitle/index.js.map +0 -1
  334. package/commonjs/TableColumnHeader/TableColumnHeader.js.map +0 -2
  335. package/commonjs/TableColumnHeader/index.js.map +0 -2
  336. package/commonjs/Tag/Tag.js.map +0 -1
  337. package/commonjs/Task/Task.js.map +0 -2
  338. package/commonjs/Task/type.js.map +0 -1
  339. package/commonjs/Text/Text.js.map +0 -1
  340. package/commonjs/TextArea/TextArea.js.map +0 -2
  341. package/commonjs/Theme/ThemeProvider.js.map +0 -2
  342. package/commonjs/Theme/defaultTheme.js.map +0 -2
  343. package/commonjs/Theme/themed.d.js.map +0 -1
  344. package/commonjs/Timeline/Timeline.js.map +0 -2
  345. package/commonjs/Toast/Toast.js.map +0 -2
  346. package/commonjs/UserSwitcher/UserSwitcher.js.map +0 -2
  347. package/commonjs/UserSwitcher/index.js.map +0 -2
  348. package/commonjs/common.js.map +0 -1
  349. package/commonjs/index.js.map +0 -2
  350. package/module/Alert/Alert.js.map +0 -2
  351. package/module/AnimatedNavItem/AnimatedNavItem.js.map +0 -1
  352. package/module/AnimatedNavItem/index.js.map +0 -1
  353. package/module/BarChart/BarChart.js.map +0 -2
  354. package/module/BarChart/index.js.map +0 -2
  355. package/module/Button/Button.js.map +0 -1
  356. package/module/Button/ButtonGroup.js.map +0 -1
  357. package/module/Button/react-native-hoverable.d.js.map +0 -1
  358. package/module/Calendar/Calendar.base.js.map +0 -1
  359. package/module/Calendar/Calendar.js.map +0 -2
  360. package/module/Calendar/ConcreteTimeSelector.js.map +0 -2
  361. package/module/Calendar/CustomRange.js.map +0 -1
  362. package/module/Calendar/DaySelector.js.map +0 -2
  363. package/module/Calendar/MonthSelector.js.map +0 -2
  364. package/module/Calendar/TimeSelector.js.map +0 -1
  365. package/module/Calendar/WeekDaySelector.js.map +0 -2
  366. package/module/Calendar/helper.js.map +0 -1
  367. package/module/Calendar/local.js.map +0 -2
  368. package/module/Calendar/types.js.map +0 -1
  369. package/module/Card/Card.js.map +0 -1
  370. package/module/CheckBox/CheckBox.js.map +0 -2
  371. package/module/CheckBox/CheckBoxItem.js.map +0 -1
  372. package/module/CheckBox/GroupCheckBox.js.map +0 -2
  373. package/module/CircularProgress/CircularProgress.js.map +0 -1
  374. package/module/Collapsible/Collapsible.js.map +0 -2
  375. package/module/DashboardCard/DashboardCard.js.map +0 -1
  376. package/module/DataCell/DataCell.js.map +0 -1
  377. package/module/DataCell/index.js.map +0 -2
  378. package/module/DataTable/DataTable.js.map +0 -2
  379. package/module/DataTable/index.js.map +0 -1
  380. package/module/DeviceSelectionModal/DeviceSelectionModal.js.map +0 -2
  381. package/module/DraggableFlatList/DraggableFlatList.js.map +0 -2
  382. package/module/Drawer/Drawer.js.map +0 -1
  383. package/module/Dropdown/CustomDropdown.js.map +0 -1
  384. package/module/Dropdown/Dropdown.js.map +0 -1
  385. package/module/Dropdown/InputDropdown.js.map +0 -2
  386. package/module/ExternalLink/ExternalLink.js.map +0 -1
  387. package/module/Gantt/Accessories.js.map +0 -2
  388. package/module/Gantt/Gantt.js.map +0 -2
  389. package/module/Gantt/GanttInnerElementType.js.map +0 -1
  390. package/module/Gantt/helper.js.map +0 -1
  391. package/module/Gantt/types.js.map +0 -1
  392. package/module/Grid/FixedSizeGrid.js.map +0 -1
  393. package/module/Grid/Grid.base.js.map +0 -1
  394. package/module/Grid/StaticFixedSizeGrid.js.map +0 -2
  395. package/module/Grid/VariableSizeGrid.js.map +0 -1
  396. package/module/Grid/helper.js.map +0 -2
  397. package/module/Grid/timer.js.map +0 -1
  398. package/module/Header/Header.js.map +0 -2
  399. package/module/HelloWave/HelloWave.js.map +0 -2
  400. package/module/Hoverable/Hoverable.js.map +0 -1
  401. package/module/IconText/IconText.js.map +0 -2
  402. package/module/Icons/TapasIcon.js.map +0 -1
  403. package/module/Icons/TapasIconExpo.js.map +0 -2
  404. package/module/Icons/expoFontLoader.js.map +0 -2
  405. package/module/Icons/fontLoader.js.map +0 -2
  406. package/module/Icons/index.js.map +0 -2
  407. package/module/Icons/smartFontLoader.js.map +0 -2
  408. package/module/Image/Image.js.map +0 -2
  409. package/module/Image/PreviewImg.js.map +0 -1
  410. package/module/Input/Input.js.map +0 -2
  411. package/module/Layout/DrawerContext.js.map +0 -2
  412. package/module/Layout/Layout.js.map +0 -1
  413. package/module/Layout/ToastContext.js.map +0 -1
  414. package/module/Layout/index.js.map +0 -2
  415. package/module/LineChart/LineChart.js.map +0 -1
  416. package/module/LineChart/index.js.map +0 -2
  417. package/module/ListItem/ListItem.js.map +0 -2
  418. package/module/Loading/Loading.js.map +0 -2
  419. package/module/MessageBox/MessageBox.js.map +0 -2
  420. package/module/MultiSelector/MultiSelector.js.map +0 -2
  421. package/module/MultiSelector/index.js.map +0 -2
  422. package/module/Navigation/Navigation.js.map +0 -2
  423. package/module/Notification/Notification.js.map +0 -2
  424. package/module/Notification/index.js.map +0 -1
  425. package/module/NumericInput/NumericInput.js.map +0 -2
  426. package/module/Overlay/Overlay.js.map +0 -2
  427. package/module/Pagination/Pagination.js.map +0 -1
  428. package/module/PieChart/PieChart.js.map +0 -1
  429. package/module/PieChart/index.js.map +0 -2
  430. package/module/Popover/Popover.js.map +0 -1
  431. package/module/Progress/Progress.js.map +0 -2
  432. package/module/Quantity/Quantity.js.map +0 -2
  433. package/module/Quantity/index.js.map +0 -2
  434. package/module/RadioButton/RadioButton.js.map +0 -2
  435. package/module/ReasonModal/ReasonModal.js.map +0 -1
  436. package/module/ReasonModal/index.js.map +0 -2
  437. package/module/ScanButton/ScanButton.js.map +0 -1
  438. package/module/SearchInput/SearchInput.js.map +0 -2
  439. package/module/SearchInput/index.js.map +0 -1
  440. package/module/SheetTitle/SheetTitle.js.map +0 -1
  441. package/module/Shell/Shell.js.map +0 -1
  442. package/module/Shell/styles.js.map +0 -1
  443. package/module/Shell/types.js.map +0 -2
  444. package/module/StatisticCard/StatisticCard.js.map +0 -2
  445. package/module/StatisticCard/index.js.map +0 -2
  446. package/module/Status/Status.js.map +0 -2
  447. package/module/Steps/Steps.js.map +0 -2
  448. package/module/TabTitle/TabTitle.js.map +0 -1
  449. package/module/TabTitle/index.js.map +0 -2
  450. package/module/TableColumnHeader/TableColumnHeader.js.map +0 -2
  451. package/module/TableColumnHeader/index.js.map +0 -2
  452. package/module/Tag/Tag.js.map +0 -2
  453. package/module/Task/Task.js.map +0 -1
  454. package/module/Task/type.js.map +0 -1
  455. package/module/Text/Text.js.map +0 -1
  456. package/module/TextArea/TextArea.js.map +0 -2
  457. package/module/Theme/ThemeProvider.js.map +0 -2
  458. package/module/Theme/defaultTheme.js.map +0 -2
  459. package/module/Theme/themed.d.js.map +0 -1
  460. package/module/Timeline/Timeline.js.map +0 -2
  461. package/module/Toast/Toast.js.map +0 -2
  462. package/module/UserSwitcher/UserSwitcher.js.map +0 -2
  463. package/module/UserSwitcher/index.js.map +0 -2
  464. package/module/common.js.map +0 -1
  465. package/module/index.js.map +0 -1
  466. package/typescript/Alert/Alert.d.ts.map +0 -1
  467. package/typescript/AnimatedNavItem/AnimatedNavItem.d.ts.map +0 -1
  468. package/typescript/AnimatedNavItem/index.d.ts.map +0 -1
  469. package/typescript/BarChart/BarChart.d.ts.map +0 -1
  470. package/typescript/BarChart/index.d.ts.map +0 -1
  471. package/typescript/Button/Button.d.ts.map +0 -1
  472. package/typescript/Button/ButtonGroup.d.ts.map +0 -1
  473. package/typescript/Calendar/Calendar.base.d.ts.map +0 -1
  474. package/typescript/Calendar/Calendar.d.ts.map +0 -1
  475. package/typescript/Calendar/ConcreteTimeSelector.d.ts.map +0 -1
  476. package/typescript/Calendar/CustomRange.d.ts.map +0 -1
  477. package/typescript/Calendar/DaySelector.d.ts.map +0 -1
  478. package/typescript/Calendar/MonthSelector.d.ts.map +0 -1
  479. package/typescript/Calendar/TimeSelector.d.ts.map +0 -1
  480. package/typescript/Calendar/WeekDaySelector.d.ts.map +0 -1
  481. package/typescript/Calendar/helper.d.ts.map +0 -1
  482. package/typescript/Calendar/local.d.ts.map +0 -1
  483. package/typescript/Calendar/types.d.ts.map +0 -1
  484. package/typescript/Card/Card.d.ts.map +0 -1
  485. package/typescript/CheckBox/CheckBox.d.ts.map +0 -1
  486. package/typescript/CheckBox/CheckBoxItem.d.ts.map +0 -1
  487. package/typescript/CheckBox/GroupCheckBox.d.ts.map +0 -1
  488. package/typescript/CircularProgress/CircularProgress.d.ts.map +0 -1
  489. package/typescript/Collapsible/Collapsible.d.ts.map +0 -1
  490. package/typescript/DashboardCard/DashboardCard.d.ts.map +0 -1
  491. package/typescript/DataCell/DataCell.d.ts.map +0 -1
  492. package/typescript/DataCell/index.d.ts.map +0 -1
  493. package/typescript/DataTable/DataTable.d.ts.map +0 -1
  494. package/typescript/DataTable/index.d.ts.map +0 -1
  495. package/typescript/DeviceSelectionModal/DeviceSelectionModal.d.ts.map +0 -1
  496. package/typescript/DraggableFlatList/DraggableFlatList.d.ts.map +0 -1
  497. package/typescript/Drawer/Drawer.d.ts.map +0 -1
  498. package/typescript/Dropdown/CustomDropdown.d.ts.map +0 -1
  499. package/typescript/Dropdown/Dropdown.d.ts.map +0 -1
  500. package/typescript/Dropdown/InputDropdown.d.ts.map +0 -1
  501. package/typescript/ExternalLink/ExternalLink.d.ts.map +0 -1
  502. package/typescript/Gantt/Accessories.d.ts.map +0 -1
  503. package/typescript/Gantt/Gantt.d.ts.map +0 -1
  504. package/typescript/Gantt/GanttInnerElementType.d.ts.map +0 -1
  505. package/typescript/Gantt/helper.d.ts.map +0 -1
  506. package/typescript/Gantt/types.d.ts.map +0 -1
  507. package/typescript/Grid/FixedSizeGrid.d.ts.map +0 -1
  508. package/typescript/Grid/Grid.base.d.ts.map +0 -1
  509. package/typescript/Grid/StaticFixedSizeGrid.d.ts.map +0 -1
  510. package/typescript/Grid/VariableSizeGrid.d.ts.map +0 -1
  511. package/typescript/Grid/helper.d.ts.map +0 -1
  512. package/typescript/Grid/timer.d.ts.map +0 -1
  513. package/typescript/Header/Header.d.ts.map +0 -1
  514. package/typescript/HelloWave/HelloWave.d.ts.map +0 -1
  515. package/typescript/Hoverable/Hoverable.d.ts.map +0 -1
  516. package/typescript/IconText/IconText.d.ts.map +0 -1
  517. package/typescript/Icons/TapasIcon.d.ts.map +0 -1
  518. package/typescript/Icons/TapasIconExpo.d.ts.map +0 -1
  519. package/typescript/Icons/expoFontLoader.d.ts.map +0 -1
  520. package/typescript/Icons/fontLoader.d.ts.map +0 -1
  521. package/typescript/Icons/index.d.ts.map +0 -1
  522. package/typescript/Icons/smartFontLoader.d.ts.map +0 -1
  523. package/typescript/Image/Image.d.ts.map +0 -1
  524. package/typescript/Image/PreviewImg.d.ts.map +0 -1
  525. package/typescript/Input/Input.d.ts.map +0 -1
  526. package/typescript/Layout/DrawerContext.d.ts.map +0 -1
  527. package/typescript/Layout/Layout.d.ts.map +0 -1
  528. package/typescript/Layout/ToastContext.d.ts.map +0 -1
  529. package/typescript/Layout/index.d.ts.map +0 -1
  530. package/typescript/LineChart/LineChart.d.ts.map +0 -1
  531. package/typescript/LineChart/index.d.ts.map +0 -1
  532. package/typescript/ListItem/ListItem.d.ts.map +0 -1
  533. package/typescript/Loading/Loading.d.ts.map +0 -1
  534. package/typescript/MessageBox/MessageBox.d.ts.map +0 -1
  535. package/typescript/MultiSelector/MultiSelector.d.ts.map +0 -1
  536. package/typescript/MultiSelector/index.d.ts.map +0 -1
  537. package/typescript/Navigation/Navigation.d.ts.map +0 -1
  538. package/typescript/Notification/Notification.d.ts.map +0 -1
  539. package/typescript/Notification/index.d.ts.map +0 -1
  540. package/typescript/NumericInput/NumericInput.d.ts.map +0 -1
  541. package/typescript/Overlay/Overlay.d.ts.map +0 -1
  542. package/typescript/Pagination/Pagination.d.ts.map +0 -1
  543. package/typescript/PieChart/PieChart.d.ts.map +0 -1
  544. package/typescript/PieChart/index.d.ts.map +0 -1
  545. package/typescript/Popover/Popover.d.ts.map +0 -1
  546. package/typescript/Progress/Progress.d.ts.map +0 -1
  547. package/typescript/Quantity/Quantity.d.ts.map +0 -1
  548. package/typescript/Quantity/index.d.ts.map +0 -1
  549. package/typescript/RadioButton/RadioButton.d.ts.map +0 -1
  550. package/typescript/ReasonModal/ReasonModal.d.ts.map +0 -1
  551. package/typescript/ReasonModal/index.d.ts.map +0 -1
  552. package/typescript/ScanButton/ScanButton.d.ts.map +0 -1
  553. package/typescript/SearchInput/SearchInput.d.ts.map +0 -1
  554. package/typescript/SearchInput/index.d.ts.map +0 -1
  555. package/typescript/SheetTitle/SheetTitle.d.ts.map +0 -1
  556. package/typescript/Shell/Shell.d.ts.map +0 -1
  557. package/typescript/Shell/styles.d.ts.map +0 -1
  558. package/typescript/Shell/types.d.ts.map +0 -1
  559. package/typescript/StatisticCard/StatisticCard.d.ts.map +0 -1
  560. package/typescript/StatisticCard/index.d.ts.map +0 -1
  561. package/typescript/Status/Status.d.ts.map +0 -1
  562. package/typescript/Steps/Steps.d.ts.map +0 -1
  563. package/typescript/TabTitle/TabTitle.d.ts.map +0 -1
  564. package/typescript/TabTitle/index.d.ts.map +0 -1
  565. package/typescript/TableColumnHeader/TableColumnHeader.d.ts.map +0 -1
  566. package/typescript/TableColumnHeader/index.d.ts.map +0 -1
  567. package/typescript/Tag/Tag.d.ts.map +0 -1
  568. package/typescript/Task/Task.d.ts.map +0 -1
  569. package/typescript/Task/type.d.ts.map +0 -1
  570. package/typescript/Text/Text.d.ts.map +0 -1
  571. package/typescript/TextArea/TextArea.d.ts.map +0 -1
  572. package/typescript/Theme/ThemeProvider.d.ts.map +0 -1
  573. package/typescript/Theme/defaultTheme.d.ts.map +0 -1
  574. package/typescript/Timeline/Timeline.d.ts.map +0 -1
  575. package/typescript/Toast/Toast.d.ts.map +0 -1
  576. package/typescript/UserSwitcher/UserSwitcher.d.ts.map +0 -1
  577. package/typescript/UserSwitcher/index.d.ts.map +0 -1
  578. package/typescript/common.d.ts.map +0 -1
  579. package/typescript/index.d.ts.map +0 -1
@@ -1,61 +1,30 @@
1
1
  "use strict";
2
2
 
3
- var __extends = void 0 && (void 0).__extends || function () {
4
- var extendStatics = function (d, b) {
5
- extendStatics = Object.setPrototypeOf || {
6
- __proto__: []
7
- } instanceof Array && function (d, b) {
8
- d.__proto__ = b;
9
- } || function (d, b) {
10
- for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
11
- };
12
- return extendStatics(d, b);
13
- };
14
- return function (d, b) {
15
- if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
16
- extendStatics(d, b);
17
- function __() {
18
- this.constructor = d;
19
- }
20
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21
- };
22
- }();
23
- var __assign = void 0 && (void 0).__assign || function () {
24
- __assign = Object.assign || function (t) {
25
- for (var s, i = 1, n = arguments.length; i < n; i++) {
26
- s = arguments[i];
27
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
28
- }
29
- return t;
30
- };
31
- return __assign.apply(this, arguments);
32
- };
33
- var __importDefault = void 0 && (void 0).__importDefault || function (mod) {
34
- return mod && mod.__esModule ? mod : {
35
- "default": mod
36
- };
37
- };
38
3
  Object.defineProperty(exports, "__esModule", {
39
4
  value: true
40
5
  });
41
6
  exports.default = createGridComponent;
42
- var memoize_one_1 = __importDefault(require("memoize-one"));
43
- var react_1 = require("react");
44
- var timer_1 = require("./timer");
45
- var helper_1 = require("./helper");
46
- var IS_SCROLLING_DEBOUNCE_INTERVAL = 150;
7
+ var _memoizeOne = _interopRequireDefault(require("memoize-one"));
8
+ var _react = require("react");
9
+ var _timer = require("./timer");
10
+ var _helper = require("./helper");
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ /* eslint-disable @typescript-eslint/no-explicit-any */
13
+ /* eslint-disable no-console */
14
+
15
+ const IS_SCROLLING_DEBOUNCE_INTERVAL = 150;
16
+
47
17
  // @ts-ignore
48
- var defaultItemKey = function (_a) {
49
- var columnIndex = _a.columnIndex,
50
- _data = _a.data,
51
- rowIndex = _a.rowIndex;
52
- return "".concat(rowIndex, ":").concat(columnIndex);
53
- };
18
+ const defaultItemKey = ({
19
+ columnIndex,
20
+ data: _data,
21
+ rowIndex
22
+ }) => `${rowIndex}:${columnIndex}`;
54
23
  // In DEV mode, this Set helps us only log a warning once per component instance.
55
24
  // This avoids spamming the console every time a render happens.
56
- var devWarningsOverscanCount = null;
57
- var devWarningsOverscanRowsColumnsCount = null;
58
- var devWarningsTagName = null;
25
+ let devWarningsOverscanCount = null;
26
+ let devWarningsOverscanRowsColumnsCount = null;
27
+ let devWarningsTagName = null;
59
28
  if (process.env.NODE_ENV !== 'production') {
60
29
  if (typeof window !== 'undefined' && typeof window.WeakSet !== 'undefined') {
61
30
  devWarningsOverscanCount = new WeakSet();
@@ -63,175 +32,63 @@ if (process.env.NODE_ENV !== 'production') {
63
32
  devWarningsTagName = new WeakSet();
64
33
  }
65
34
  }
66
- function createGridComponent(_a) {
67
- var _b;
68
- var getColumnOffset = _a.getColumnOffset,
69
- getColumnStartIndexForOffset = _a.getColumnStartIndexForOffset,
70
- getColumnStopIndexForStartIndex = _a.getColumnStopIndexForStartIndex,
71
- getColumnWidth = _a.getColumnWidth,
72
- getEstimatedTotalHeight = _a.getEstimatedTotalHeight,
73
- getEstimatedTotalWidth = _a.getEstimatedTotalWidth,
74
- getOffsetForColumnAndAlignment = _a.getOffsetForColumnAndAlignment,
75
- getOffsetForRowAndAlignment = _a.getOffsetForRowAndAlignment,
76
- getRowHeight = _a.getRowHeight,
77
- getRowOffset = _a.getRowOffset,
78
- getRowStartIndexForOffset = _a.getRowStartIndexForOffset,
79
- getRowStopIndexForStartIndex = _a.getRowStopIndexForStartIndex,
80
- initInstanceProps = _a.initInstanceProps,
81
- shouldResetStyleCacheOnItemSizeChange = _a.shouldResetStyleCacheOnItemSizeChange,
82
- validateProps = _a.validateProps;
83
- return _b = /** @class */function (_super) {
84
- __extends(Grid, _super);
35
+ function createGridComponent({
36
+ getColumnOffset,
37
+ getColumnStartIndexForOffset,
38
+ getColumnStopIndexForStartIndex,
39
+ getColumnWidth,
40
+ getEstimatedTotalHeight,
41
+ getEstimatedTotalWidth,
42
+ getOffsetForColumnAndAlignment,
43
+ getOffsetForRowAndAlignment,
44
+ getRowHeight,
45
+ getRowOffset,
46
+ getRowStartIndexForOffset,
47
+ getRowStopIndexForStartIndex,
48
+ initInstanceProps,
49
+ shouldResetStyleCacheOnItemSizeChange,
50
+ validateProps
51
+ }) {
52
+ return class Grid extends _react.PureComponent {
53
+ _instanceProps = initInstanceProps(this.props, this);
54
+ _resetIsScrollingTimeoutId = null;
55
+ static defaultProps = {
56
+ direction: 'ltr',
57
+ itemData: undefined,
58
+ useIsScrolling: false
59
+ };
60
+ state = {
61
+ instance: this,
62
+ isScrolling: false,
63
+ horizontalScrollDirection: 'forward',
64
+ scrollLeft: typeof this.props.initialScrollLeft === 'number' ? this.props.initialScrollLeft : 0,
65
+ scrollTop: typeof this.props.initialScrollTop === 'number' ? this.props.initialScrollTop : 0,
66
+ scrollUpdateWasRequested: false,
67
+ verticalScrollDirection: 'forward'
68
+ };
69
+
85
70
  // Always use explicit constructor for React components.
86
71
  // It produces less code after transpilation. (#26)
87
72
  // eslint-disable-next-line no-useless-constructor
88
- function Grid(props) {
89
- var _this = _super.call(this, props) || this;
90
- _this._instanceProps = initInstanceProps(_this.props, _this);
91
- _this._resetIsScrollingTimeoutId = null;
92
- _this.state = {
93
- instance: _this,
94
- isScrolling: false,
95
- horizontalScrollDirection: 'forward',
96
- scrollLeft: typeof _this.props.initialScrollLeft === 'number' ? _this.props.initialScrollLeft : 0,
97
- scrollTop: typeof _this.props.initialScrollTop === 'number' ? _this.props.initialScrollTop : 0,
98
- scrollUpdateWasRequested: false,
99
- verticalScrollDirection: 'forward'
100
- };
101
- _this._outerRefSetter = function (ref) {
102
- var outerRef = _this.props.outerRef;
103
- _this._outerRef = ref;
104
- if (typeof outerRef === 'function') {
105
- outerRef(ref);
106
- } else if (outerRef != null && typeof outerRef === 'object' && Object.prototype.hasOwnProperty.call(outerRef, 'current')) {
107
- outerRef.current = ref;
108
- }
109
- };
110
- _this._onScroll = function (event) {
111
- var _a = event.currentTarget,
112
- clientHeight = _a.clientHeight,
113
- clientWidth = _a.clientWidth,
114
- scrollLeft = _a.scrollLeft,
115
- scrollTop = _a.scrollTop,
116
- scrollHeight = _a.scrollHeight,
117
- scrollWidth = _a.scrollWidth;
118
- _this.setState(function (prevState) {
119
- if (prevState.scrollLeft === scrollLeft && prevState.scrollTop === scrollTop) {
120
- // Scroll position may have been updated by cDM/cDU,
121
- // In which case we don't need to trigger another render,
122
- // And we don't want to update state.isScrolling.
123
- return null;
124
- }
125
- var direction = _this.props.direction;
126
- // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.
127
- // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).
128
- // It's also easier for this component if we convert offsets to the same format as they would be in for ltr.
129
- // So the simplest solution is to determine which browser behavior we're dealing with, and convert based on it.
130
- var calculatedScrollLeft = scrollLeft;
131
- if (direction === 'rtl') {
132
- switch ((0, helper_1.getRTLOffsetType)()) {
133
- case 'negative':
134
- calculatedScrollLeft = -scrollLeft;
135
- break;
136
- case 'positive-descending':
137
- calculatedScrollLeft = scrollWidth - clientWidth - scrollLeft;
138
- break;
139
- }
140
- }
141
- // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.
142
- calculatedScrollLeft = Math.max(0, Math.min(calculatedScrollLeft, scrollWidth - clientWidth));
143
- var calculatedScrollTop = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));
144
- return {
145
- isScrolling: true,
146
- horizontalScrollDirection: prevState.scrollLeft < scrollLeft ? 'forward' : 'backward',
147
- scrollLeft: calculatedScrollLeft,
148
- scrollTop: calculatedScrollTop,
149
- verticalScrollDirection: prevState.scrollTop < scrollTop ? 'forward' : 'backward',
150
- scrollUpdateWasRequested: false
151
- };
152
- }, _this._resetIsScrollingDebounced);
153
- };
154
- _this._getItemStyle = function (rowIndex, columnIndex) {
155
- var _a = _this.props,
156
- columnWidth = _a.columnWidth,
157
- direction = _a.direction,
158
- rowHeight = _a.rowHeight;
159
- var itemStyleCache = _this._getItemStyleCache(shouldResetStyleCacheOnItemSizeChange && columnWidth, shouldResetStyleCacheOnItemSizeChange && direction, shouldResetStyleCacheOnItemSizeChange && rowHeight);
160
- var key = "".concat(rowIndex, ":").concat(columnIndex);
161
- var style;
162
- if (Object.prototype.hasOwnProperty.call(itemStyleCache, key)) {
163
- style = itemStyleCache[key];
164
- } else {
165
- var offset = getColumnOffset(_this.props, columnIndex, _this._instanceProps);
166
- var isRtl = direction === 'rtl';
167
- itemStyleCache[key] = style = {
168
- position: 'absolute',
169
- left: isRtl ? undefined : offset,
170
- right: isRtl ? offset : undefined,
171
- top: getRowOffset(_this.props, rowIndex, _this._instanceProps),
172
- height: getRowHeight(_this.props, rowIndex, _this._instanceProps),
173
- width: getColumnWidth(_this.props, columnIndex, _this._instanceProps)
174
- };
175
- }
176
- return style || {};
177
- };
178
- _this._callOnScroll = (0, memoize_one_1.default)(function (scrollLeft, scrollTop, horizontalScrollDirection, verticalScrollDirection, scrollUpdateWasRequested) {
179
- return _this.props.onScroll({
180
- horizontalScrollDirection: horizontalScrollDirection,
181
- scrollLeft: scrollLeft,
182
- scrollTop: scrollTop,
183
- verticalScrollDirection: verticalScrollDirection,
184
- scrollUpdateWasRequested: scrollUpdateWasRequested
185
- });
186
- });
187
- _this._callOnItemsRendered = (0, memoize_one_1.default)(function (overscanColumnStartIndex, overscanColumnStopIndex, overscanRowStartIndex, overscanRowStopIndex, visibleColumnStartIndex, visibleColumnStopIndex, visibleRowStartIndex, visibleRowStopIndex) {
188
- return _this.props.onItemsRendered({
189
- overscanColumnStartIndex: overscanColumnStartIndex,
190
- overscanColumnStopIndex: overscanColumnStopIndex,
191
- overscanRowStartIndex: overscanRowStartIndex,
192
- overscanRowStopIndex: overscanRowStopIndex,
193
- visibleColumnStartIndex: visibleColumnStartIndex,
194
- visibleColumnStopIndex: visibleColumnStopIndex,
195
- visibleRowStartIndex: visibleRowStartIndex,
196
- visibleRowStopIndex: visibleRowStopIndex
197
- });
198
- });
199
- _this._resetIsScrollingDebounced = function () {
200
- if (_this._resetIsScrollingTimeoutId !== null) {
201
- (0, timer_1.cancelTimeout)(_this._resetIsScrollingTimeoutId);
202
- }
203
- _this._resetIsScrollingTimeoutId = (0, timer_1.requestTimeout)(_this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL);
204
- };
205
- _this._resetIsScrolling = function () {
206
- _this._resetIsScrollingTimeoutId = null;
207
- _this.setState({
208
- isScrolling: false
209
- }, function () {
210
- // Clear style cache after state update has been committed.
211
- // This way we don't break pure sCU for items that don't use isScrolling param.
212
- _this._getItemStyleCache(-1);
213
- });
214
- };
215
- _this._getItemStyleCache = (0, memoize_one_1.default)(function (_, __, ___) {
216
- return {};
217
- });
218
- return _this;
73
+ constructor(props) {
74
+ super(props);
219
75
  }
220
- Grid.getDerivedStateFromProps = function (nextProps, prevState) {
76
+ static getDerivedStateFromProps(nextProps, prevState) {
221
77
  validateSharedProps(nextProps, prevState);
222
78
  validateProps(nextProps);
223
79
  return null;
224
- };
225
- Grid.prototype.scrollTo = function (_a) {
226
- var scrollLeft = _a.scrollLeft,
227
- scrollTop = _a.scrollTop;
80
+ }
81
+ scrollTo({
82
+ scrollLeft,
83
+ scrollTop
84
+ }) {
228
85
  if (scrollLeft !== undefined) {
229
86
  scrollLeft = Math.max(0, scrollLeft);
230
87
  }
231
88
  if (scrollTop !== undefined) {
232
89
  scrollTop = Math.max(0, scrollTop);
233
90
  }
234
- this.setState(function (prevState) {
91
+ this.setState(prevState => {
235
92
  if (scrollLeft === undefined) {
236
93
  scrollLeft = prevState.scrollLeft;
237
94
  }
@@ -243,51 +100,55 @@ function createGridComponent(_a) {
243
100
  }
244
101
  return {
245
102
  horizontalScrollDirection: prevState.scrollLeft < scrollLeft ? 'forward' : 'backward',
246
- scrollLeft: scrollLeft,
247
- scrollTop: scrollTop,
103
+ scrollLeft,
104
+ scrollTop,
248
105
  scrollUpdateWasRequested: true,
249
106
  verticalScrollDirection: prevState.scrollTop < scrollTop ? 'forward' : 'backward'
250
107
  };
251
108
  }, this._resetIsScrollingDebounced);
252
- };
253
- Grid.prototype.scrollToItem = function (_a) {
254
- var _c = _a.align,
255
- align = _c === void 0 ? 'auto' : _c,
256
- columnIndex = _a.columnIndex,
257
- rowIndex = _a.rowIndex;
258
- var _d = this.props,
259
- columnCount = _d.columnCount,
260
- height = _d.height,
261
- rowCount = _d.rowCount,
262
- width = _d.width;
263
- var _e = this.state,
264
- scrollLeft = _e.scrollLeft,
265
- scrollTop = _e.scrollTop;
266
- var scrollbarSize = (0, helper_1.getScrollbarSize)();
109
+ }
110
+ scrollToItem({
111
+ align = 'auto',
112
+ columnIndex,
113
+ rowIndex
114
+ }) {
115
+ const {
116
+ columnCount,
117
+ height,
118
+ rowCount,
119
+ width
120
+ } = this.props;
121
+ const {
122
+ scrollLeft,
123
+ scrollTop
124
+ } = this.state;
125
+ const scrollbarSize = (0, _helper.getScrollbarSize)();
267
126
  if (columnIndex !== undefined) {
268
127
  columnIndex = Math.max(0, Math.min(columnIndex, columnCount - 1));
269
128
  }
270
129
  if (rowIndex !== undefined) {
271
130
  rowIndex = Math.max(0, Math.min(rowIndex, rowCount - 1));
272
131
  }
273
- var estimatedTotalHeight = getEstimatedTotalHeight(this.props, this._instanceProps);
274
- var estimatedTotalWidth = getEstimatedTotalWidth(this.props, this._instanceProps);
132
+ const estimatedTotalHeight = getEstimatedTotalHeight(this.props, this._instanceProps);
133
+ const estimatedTotalWidth = getEstimatedTotalWidth(this.props, this._instanceProps);
134
+
275
135
  // The scrollbar size should be considered when scrolling an item into view,
276
136
  // to ensure it's fully visible.
277
137
  // But we only need to account for its size when it's actually visible.
278
- var horizontalScrollbarSize = estimatedTotalWidth > width ? scrollbarSize : 0;
279
- var verticalScrollbarSize = estimatedTotalHeight > height ? scrollbarSize : 0;
138
+ const horizontalScrollbarSize = estimatedTotalWidth > width ? scrollbarSize : 0;
139
+ const verticalScrollbarSize = estimatedTotalHeight > height ? scrollbarSize : 0;
280
140
  this.scrollTo({
281
141
  scrollLeft: columnIndex !== undefined ? getOffsetForColumnAndAlignment(this.props, columnIndex, align, scrollLeft, this._instanceProps, verticalScrollbarSize) : scrollLeft,
282
142
  scrollTop: rowIndex !== undefined ? getOffsetForRowAndAlignment(this.props, rowIndex, align, scrollTop, this._instanceProps, horizontalScrollbarSize) : scrollTop
283
143
  });
284
- };
285
- Grid.prototype.componentDidMount = function () {
286
- var _a = this.props,
287
- initialScrollLeft = _a.initialScrollLeft,
288
- initialScrollTop = _a.initialScrollTop;
144
+ }
145
+ componentDidMount() {
146
+ const {
147
+ initialScrollLeft,
148
+ initialScrollTop
149
+ } = this.props;
289
150
  if (this._outerRef != null) {
290
- var outerRef = this._outerRef;
151
+ const outerRef = this._outerRef;
291
152
  if (typeof initialScrollLeft === 'number') {
292
153
  outerRef.scrollLeft = initialScrollLeft;
293
154
  }
@@ -296,20 +157,23 @@ function createGridComponent(_a) {
296
157
  }
297
158
  }
298
159
  this._callPropsCallbacks();
299
- };
300
- Grid.prototype.componentDidUpdate = function () {
301
- var direction = this.props.direction;
302
- var _a = this.state,
303
- scrollLeft = _a.scrollLeft,
304
- scrollTop = _a.scrollTop,
305
- scrollUpdateWasRequested = _a.scrollUpdateWasRequested;
160
+ }
161
+ componentDidUpdate() {
162
+ const {
163
+ direction
164
+ } = this.props;
165
+ const {
166
+ scrollLeft,
167
+ scrollTop,
168
+ scrollUpdateWasRequested
169
+ } = this.state;
306
170
  if (scrollUpdateWasRequested && this._outerRef != null) {
307
171
  // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.
308
172
  // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).
309
173
  // So we need to determine which browser behavior we're dealing with, and mimic it.
310
- var outerRef = this._outerRef;
174
+ const outerRef = this._outerRef;
311
175
  if (direction === 'rtl') {
312
- switch ((0, helper_1.getRTLOffsetType)()) {
176
+ switch ((0, _helper.getRTLOffsetType)()) {
313
177
  case 'negative':
314
178
  outerRef.scrollLeft = -scrollLeft;
315
179
  break;
@@ -318,8 +182,10 @@ function createGridComponent(_a) {
318
182
  break;
319
183
  default:
320
184
  {
321
- var clientWidth = outerRef.clientWidth,
322
- scrollWidth = outerRef.scrollWidth;
185
+ const {
186
+ clientWidth,
187
+ scrollWidth
188
+ } = outerRef;
323
189
  outerRef.scrollLeft = scrollWidth - clientWidth - scrollLeft;
324
190
  break;
325
191
  }
@@ -330,80 +196,81 @@ function createGridComponent(_a) {
330
196
  outerRef.scrollTop = Math.max(0, scrollTop);
331
197
  }
332
198
  this._callPropsCallbacks();
333
- };
334
- Grid.prototype.componentWillUnmount = function () {
199
+ }
200
+ componentWillUnmount() {
335
201
  if (this._resetIsScrollingTimeoutId !== null) {
336
- (0, timer_1.cancelTimeout)(this._resetIsScrollingTimeoutId);
202
+ (0, _timer.cancelTimeout)(this._resetIsScrollingTimeoutId);
337
203
  }
338
- };
339
- Grid.prototype.render = function () {
340
- var _a = this.props,
341
- children = _a.children,
342
- className = _a.className,
343
- columnCount = _a.columnCount,
344
- direction = _a.direction,
345
- height = _a.height,
346
- innerRef = _a.innerRef,
347
- innerElementType = _a.innerElementType,
348
- innerTagName = _a.innerTagName,
349
- itemData = _a.itemData,
350
- _c = _a.itemKey,
351
- itemKey = _c === void 0 ? defaultItemKey : _c,
352
- outerElementType = _a.outerElementType,
353
- outerTagName = _a.outerTagName,
354
- rowCount = _a.rowCount,
355
- style = _a.style,
356
- testID = _a.testID,
357
- useIsScrolling = _a.useIsScrolling,
358
- width = _a.width;
359
- var isScrolling = this.state.isScrolling;
360
- var _d = this._getHorizontalRangeToRender(),
361
- columnStartIndex = _d[0],
362
- columnStopIndex = _d[1];
363
- var _e = this._getVerticalRangeToRender(),
364
- rowStartIndex = _e[0],
365
- rowStopIndex = _e[1];
366
- var items = [];
204
+ }
205
+ render() {
206
+ const {
207
+ children,
208
+ className,
209
+ columnCount,
210
+ direction,
211
+ height,
212
+ innerRef,
213
+ innerElementType,
214
+ innerTagName,
215
+ itemData,
216
+ itemKey = defaultItemKey,
217
+ outerElementType,
218
+ outerTagName,
219
+ rowCount,
220
+ style,
221
+ testID,
222
+ useIsScrolling,
223
+ width
224
+ } = this.props;
225
+ const {
226
+ isScrolling
227
+ } = this.state;
228
+ const [columnStartIndex, columnStopIndex] = this._getHorizontalRangeToRender();
229
+ const [rowStartIndex, rowStopIndex] = this._getVerticalRangeToRender();
230
+ const items = [];
367
231
  if (columnCount > 0 && rowCount) {
368
- for (var rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) {
369
- for (var columnIndex = columnStartIndex; columnIndex <= columnStopIndex; columnIndex++) {
370
- items.push((0, react_1.createElement)(children, {
371
- columnIndex: columnIndex,
232
+ for (let rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) {
233
+ for (let columnIndex = columnStartIndex; columnIndex <= columnStopIndex; columnIndex++) {
234
+ items.push(/*#__PURE__*/(0, _react.createElement)(children, {
235
+ columnIndex,
372
236
  data: itemData,
373
237
  isScrolling: useIsScrolling ? isScrolling : undefined,
374
238
  key: itemKey({
375
- columnIndex: columnIndex,
239
+ columnIndex,
376
240
  data: itemData,
377
- rowIndex: rowIndex
241
+ rowIndex
378
242
  }),
379
- rowIndex: rowIndex,
243
+ rowIndex,
380
244
  style: this._getItemStyle(rowIndex, columnIndex)
381
245
  }));
382
246
  }
383
247
  }
384
248
  }
249
+
385
250
  // Read this value AFTER items have been created,
386
251
  // So their actual sizes (if variable) are taken into consideration.
387
- var estimatedTotalHeight = getEstimatedTotalHeight(this.props, this._instanceProps);
388
- var estimatedTotalWidth = getEstimatedTotalWidth(this.props, this._instanceProps);
389
- var outerRefSetter = __assign({
390
- className: className,
252
+ const estimatedTotalHeight = getEstimatedTotalHeight(this.props, this._instanceProps);
253
+ const estimatedTotalWidth = getEstimatedTotalWidth(this.props, this._instanceProps);
254
+ const outerRefSetter = {
255
+ className,
391
256
  onScroll: this._onScroll,
392
257
  ref: this._outerRefSetter,
393
- style: __assign({
258
+ style: {
394
259
  position: 'relative',
395
- height: height,
396
- width: width,
260
+ height,
261
+ width,
397
262
  overflow: 'auto',
398
263
  WebkitOverflowScrolling: 'touch',
399
264
  willChange: 'transform',
400
- direction: direction
401
- }, style),
402
- children: undefined
403
- }, testID && {
404
- testID: testID
405
- });
406
- var innerElement = {
265
+ direction,
266
+ ...style
267
+ },
268
+ children: undefined,
269
+ ...(testID && {
270
+ testID
271
+ })
272
+ };
273
+ const innerElement = {
407
274
  children: items,
408
275
  ref: innerRef,
409
276
  style: {
@@ -412,60 +279,257 @@ function createGridComponent(_a) {
412
279
  width: estimatedTotalWidth || 0
413
280
  }
414
281
  };
415
- return (0, react_1.createElement)(outerElementType || outerTagName || 'div', outerRefSetter, (0, react_1.createElement)(innerElementType || innerTagName || 'div', innerElement));
282
+ return /*#__PURE__*/(0, _react.createElement)(outerElementType || outerTagName || 'div', outerRefSetter, /*#__PURE__*/(0, _react.createElement)(innerElementType || innerTagName || 'div', innerElement));
283
+ }
284
+ _outerRefSetter = ref => {
285
+ const {
286
+ outerRef
287
+ } = this.props;
288
+ this._outerRef = ref;
289
+ if (typeof outerRef === 'function') {
290
+ outerRef(ref);
291
+ } else if (outerRef != null && typeof outerRef === 'object' && Object.prototype.hasOwnProperty.call(outerRef, 'current')) {
292
+ outerRef.current = ref;
293
+ }
416
294
  };
417
- Grid.prototype._callPropsCallbacks = function () {
418
- var _a = this.props,
419
- columnCount = _a.columnCount,
420
- onItemsRendered = _a.onItemsRendered,
421
- onScroll = _a.onScroll,
422
- rowCount = _a.rowCount;
295
+ _onScroll = event => {
296
+ const {
297
+ clientHeight,
298
+ clientWidth,
299
+ scrollLeft,
300
+ scrollTop,
301
+ scrollHeight,
302
+ scrollWidth
303
+ } = event.currentTarget;
304
+ this.setState(prevState => {
305
+ if (prevState.scrollLeft === scrollLeft && prevState.scrollTop === scrollTop) {
306
+ // Scroll position may have been updated by cDM/cDU,
307
+ // In which case we don't need to trigger another render,
308
+ // And we don't want to update state.isScrolling.
309
+ return null;
310
+ }
311
+ const {
312
+ direction
313
+ } = this.props;
314
+
315
+ // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.
316
+ // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).
317
+ // It's also easier for this component if we convert offsets to the same format as they would be in for ltr.
318
+ // So the simplest solution is to determine which browser behavior we're dealing with, and convert based on it.
319
+ let calculatedScrollLeft = scrollLeft;
320
+ if (direction === 'rtl') {
321
+ switch ((0, _helper.getRTLOffsetType)()) {
322
+ case 'negative':
323
+ calculatedScrollLeft = -scrollLeft;
324
+ break;
325
+ case 'positive-descending':
326
+ calculatedScrollLeft = scrollWidth - clientWidth - scrollLeft;
327
+ break;
328
+ }
329
+ }
330
+
331
+ // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.
332
+ calculatedScrollLeft = Math.max(0, Math.min(calculatedScrollLeft, scrollWidth - clientWidth));
333
+ const calculatedScrollTop = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));
334
+ return {
335
+ isScrolling: true,
336
+ horizontalScrollDirection: prevState.scrollLeft < scrollLeft ? 'forward' : 'backward',
337
+ scrollLeft: calculatedScrollLeft,
338
+ scrollTop: calculatedScrollTop,
339
+ verticalScrollDirection: prevState.scrollTop < scrollTop ? 'forward' : 'backward',
340
+ scrollUpdateWasRequested: false
341
+ };
342
+ }, this._resetIsScrollingDebounced);
343
+ };
344
+ _getItemStyle = (rowIndex, columnIndex) => {
345
+ const {
346
+ columnWidth,
347
+ direction,
348
+ rowHeight
349
+ } = this.props;
350
+ const itemStyleCache = this._getItemStyleCache(shouldResetStyleCacheOnItemSizeChange && columnWidth, shouldResetStyleCacheOnItemSizeChange && direction, shouldResetStyleCacheOnItemSizeChange && rowHeight);
351
+ const key = `${rowIndex}:${columnIndex}`;
352
+ let style;
353
+ if (Object.prototype.hasOwnProperty.call(itemStyleCache, key)) {
354
+ style = itemStyleCache[key];
355
+ } else {
356
+ const offset = getColumnOffset(this.props, columnIndex, this._instanceProps);
357
+ const isRtl = direction === 'rtl';
358
+ itemStyleCache[key] = style = {
359
+ position: 'absolute',
360
+ left: isRtl ? undefined : offset,
361
+ right: isRtl ? offset : undefined,
362
+ top: getRowOffset(this.props, rowIndex, this._instanceProps),
363
+ height: getRowHeight(this.props, rowIndex, this._instanceProps),
364
+ width: getColumnWidth(this.props, columnIndex, this._instanceProps)
365
+ };
366
+ }
367
+ return style || {};
368
+ };
369
+ _callPropsCallbacks() {
370
+ const {
371
+ columnCount,
372
+ onItemsRendered,
373
+ onScroll,
374
+ rowCount
375
+ } = this.props;
423
376
  if (typeof onItemsRendered === 'function') {
424
377
  if (columnCount > 0 && rowCount > 0) {
425
- var _c = this._getHorizontalRangeToRender(),
426
- overscanColumnStartIndex = _c[0],
427
- overscanColumnStopIndex = _c[1],
428
- visibleColumnStartIndex = _c[2],
429
- visibleColumnStopIndex = _c[3];
430
- var _d = this._getVerticalRangeToRender(),
431
- overscanRowStartIndex = _d[0],
432
- overscanRowStopIndex = _d[1],
433
- visibleRowStartIndex = _d[2],
434
- visibleRowStopIndex = _d[3];
378
+ const [overscanColumnStartIndex, overscanColumnStopIndex, visibleColumnStartIndex, visibleColumnStopIndex] = this._getHorizontalRangeToRender();
379
+ const [overscanRowStartIndex, overscanRowStopIndex, visibleRowStartIndex, visibleRowStopIndex] = this._getVerticalRangeToRender();
435
380
  this._callOnItemsRendered(overscanColumnStartIndex, overscanColumnStopIndex, overscanRowStartIndex, overscanRowStopIndex, visibleColumnStartIndex, visibleColumnStopIndex, visibleRowStartIndex, visibleRowStopIndex);
436
381
  }
437
382
  }
438
383
  if (typeof onScroll === 'function') {
439
- var _e = this.state,
440
- horizontalScrollDirection = _e.horizontalScrollDirection,
441
- scrollLeft = _e.scrollLeft,
442
- scrollTop = _e.scrollTop,
443
- scrollUpdateWasRequested = _e.scrollUpdateWasRequested,
444
- verticalScrollDirection = _e.verticalScrollDirection;
384
+ const {
385
+ horizontalScrollDirection,
386
+ scrollLeft,
387
+ scrollTop,
388
+ scrollUpdateWasRequested,
389
+ verticalScrollDirection
390
+ } = this.state;
445
391
  this._callOnScroll(scrollLeft, scrollTop, horizontalScrollDirection, verticalScrollDirection, scrollUpdateWasRequested);
446
392
  }
447
- };
448
- Grid.prototype._getVerticalRangeToRender = function () {
449
- var _a = this.props,
450
- columnCount = _a.columnCount,
451
- overscanCount = _a.overscanCount,
452
- overscanRowCount = _a.overscanRowCount,
453
- overscanRowsCount = _a.overscanRowsCount,
454
- rowCount = _a.rowCount;
455
- var _c = this.state,
456
- isScrolling = _c.isScrolling,
457
- verticalScrollDirection = _c.verticalScrollDirection,
458
- scrollTop = _c.scrollTop;
459
- var overscanCountResolved = overscanRowCount || overscanRowsCount || overscanCount || 1;
393
+ }
394
+ _callOnScroll = (0, _memoizeOne.default)((scrollLeft, scrollTop, horizontalScrollDirection, verticalScrollDirection, scrollUpdateWasRequested) => this.props.onScroll({
395
+ horizontalScrollDirection,
396
+ scrollLeft,
397
+ scrollTop,
398
+ verticalScrollDirection,
399
+ scrollUpdateWasRequested
400
+ }));
401
+ _callOnItemsRendered = (0, _memoizeOne.default)((overscanColumnStartIndex, overscanColumnStopIndex, overscanRowStartIndex, overscanRowStopIndex, visibleColumnStartIndex, visibleColumnStopIndex, visibleRowStartIndex, visibleRowStopIndex) => this.props.onItemsRendered({
402
+ overscanColumnStartIndex,
403
+ overscanColumnStopIndex,
404
+ overscanRowStartIndex,
405
+ overscanRowStopIndex,
406
+ visibleColumnStartIndex,
407
+ visibleColumnStopIndex,
408
+ visibleRowStartIndex,
409
+ visibleRowStopIndex
410
+ }));
411
+ _getVerticalRangeToRender() {
412
+ const {
413
+ columnCount,
414
+ overscanCount,
415
+ overscanRowCount,
416
+ overscanRowsCount,
417
+ rowCount
418
+ } = this.props;
419
+ const {
420
+ isScrolling,
421
+ verticalScrollDirection,
422
+ scrollTop
423
+ } = this.state;
424
+ const overscanCountResolved = overscanRowCount || overscanRowsCount || overscanCount || 1;
460
425
  if (columnCount === 0 || rowCount === 0) {
461
426
  return [0, 0, 0, 0];
462
427
  }
463
- var startIndex = getRowStartIndexForOffset(this.props, scrollTop, this._instanceProps);
464
- var stopIndex = getRowStopIndexForStartIndex(this.props, startIndex, scrollTop, this._instanceProps);
428
+ const startIndex = getRowStartIndexForOffset(this.props, scrollTop, this._instanceProps);
429
+ const stopIndex = getRowStopIndexForStartIndex(this.props, startIndex, scrollTop, this._instanceProps);
430
+
465
431
  // Overscan by one item in each direction so that tab/focus works.
466
432
  // If there isn't at least one extra item, tab loops back around.
467
- var overscanBackward = !isScrolling || verticalScrollDirection === 'backward' ? Math.max(1, overscanCountResolved) : 1;
468
- var overscanForward = !isScrolling || verticalScrollDirection === 'forward' ? Math.max(1, overscanCountResolved) : 1;
433
+ const overscanBackward = !isScrolling || verticalScrollDirection === 'backward' ? Math.max(1, overscanCountResolved) : 1;
434
+ const overscanForward = !isScrolling || verticalScrollDirection === 'forward' ? Math.max(1, overscanCountResolved) : 1;
435
+ return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(rowCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];
436
+ }
437
+ _getHorizontalRangeToRender() {
438
+ const {
439
+ columnCount,
440
+ overscanColumnCount,
441
+ overscanColumnsCount,
442
+ overscanCount,
443
+ rowCount
444
+ } = this.props;
445
+ const {
446
+ horizontalScrollDirection,
447
+ isScrolling,
448
+ scrollLeft
449
+ } = this.state;
450
+ const overscanCountResolved = overscanColumnCount || overscanColumnsCount || overscanCount || 1;
451
+ if (columnCount === 0 || rowCount === 0) {
452
+ return [0, 0, 0, 0];
453
+ }
454
+ const startIndex = getColumnStartIndexForOffset(this.props, scrollLeft, this._instanceProps);
455
+ const stopIndex = getColumnStopIndexForStartIndex(this.props, startIndex, scrollLeft, this._instanceProps);
456
+
457
+ // Overscan by one item in each direction so that tab/focus works.
458
+ // If there isn't at least one extra item, tab loops back around.
459
+ const overscanBackward = !isScrolling || horizontalScrollDirection === 'backward' ? Math.max(1, overscanCountResolved) : 1;
460
+ const overscanForward = !isScrolling || horizontalScrollDirection === 'forward' ? Math.max(1, overscanCountResolved) : 1;
461
+ return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(columnCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];
462
+ }
463
+ _resetIsScrollingDebounced = () => {
464
+ if (this._resetIsScrollingTimeoutId !== null) {
465
+ (0, _timer.cancelTimeout)(this._resetIsScrollingTimeoutId);
466
+ }
467
+ this._resetIsScrollingTimeoutId = (0, _timer.requestTimeout)(this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL);
468
+ };
469
+ _resetIsScrolling = () => {
470
+ this._resetIsScrollingTimeoutId = null;
471
+ this.setState({
472
+ isScrolling: false
473
+ }, () => {
474
+ // Clear style cache after state update has been committed.
475
+ // This way we don't break pure sCU for items that don't use isScrolling param.
476
+ this._getItemStyleCache(-1);
477
+ });
478
+ };
479
+ _getItemStyleCache = (0, _memoizeOne.default)((_, __, ___) => ({}));
480
+ };
481
+ }
482
+ const validateSharedProps = ({
483
+ children,
484
+ direction,
485
+ height,
486
+ innerTagName,
487
+ outerTagName,
488
+ overscanColumnsCount,
489
+ overscanCount,
490
+ overscanRowsCount,
491
+ width
492
+ }, {
493
+ instance
494
+ }) => {
495
+ if (process.env.NODE_ENV !== 'production') {
496
+ if (typeof overscanCount === 'number') {
497
+ if (devWarningsOverscanCount && !devWarningsOverscanCount.has(instance)) {
498
+ devWarningsOverscanCount.add(instance);
499
+ console.warn('The overscanCount prop has been deprecated. ' + 'Please use the overscanColumnCount and overscanRowCount props instead.');
500
+ }
501
+ }
502
+ if (typeof overscanColumnsCount === 'number' || typeof overscanRowsCount === 'number') {
503
+ if (devWarningsOverscanRowsColumnsCount && !devWarningsOverscanRowsColumnsCount.has(instance)) {
504
+ devWarningsOverscanRowsColumnsCount.add(instance);
505
+ console.warn('The overscanColumnsCount and overscanRowsCount props have been deprecated. ' + 'Please use the overscanColumnCount and overscanRowCount props instead.');
506
+ }
507
+ }
508
+ if (innerTagName != null || outerTagName != null) {
509
+ if (devWarningsTagName && !devWarningsTagName.has(instance)) {
510
+ devWarningsTagName.add(instance);
511
+ console.warn('The innerTagName and outerTagName props have been deprecated. ' + 'Please use the innerElementType and outerElementType props instead.');
512
+ }
513
+ }
514
+ if (children == null) {
515
+ throw Error('An invalid "children" prop has been specified. ' + 'Value should be a React component. ' + `"${children === null ? 'null' : typeof children}" was specified.`);
516
+ }
517
+ switch (direction) {
518
+ case 'ltr':
519
+ case 'rtl':
520
+ // Valid values
521
+ break;
522
+ default:
523
+ throw Error('An invalid "direction" prop has been specified. ' + 'Value should be either "ltr" or "rtl". ' + `"${direction}" was specified.`);
524
+ }
525
+ if (typeof width !== 'number') {
526
+ throw Error('An invalid "width" prop has been specified. ' + 'Grids must specify a number for width. ' + `"${width === null ? 'null' : typeof width}" was specified.`);
527
+ }
528
+ if (typeof height !== 'number') {
529
+ throw Error('An invalid "height" prop has been specified. ' + 'Grids must specify a number for height. ' + `"${height === null ? 'null' : typeof height}" was specified.`);
530
+ }
531
+ }
532
+ };
469
533
  return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(rowCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];
470
534
  };
471
535
  Grid.prototype._getHorizontalRangeToRender = function () {
@@ -547,4 +611,3 @@ var validateSharedProps = function (_a, _b) {
547
611
  }
548
612
  }
549
613
  };
550
- //# sourceMappingURL=Grid.base.js.map