@beppla/tapas-ui 1.0.66 → 1.0.68

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