@laerdal/life-react-components 3.5.1-dev.12 → 3.5.1-dev.13

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 (655) hide show
  1. package/dist/Accordion/AccordionItem.js +69 -47
  2. package/dist/Accordion/AccordionMenu.js +91 -64
  3. package/dist/Accordion/ContentAccordion.js +154 -105
  4. package/dist/Accordion/index.js +8 -7
  5. package/dist/Accordion/styles.js +16 -12
  6. package/dist/AuthPage/AuthPage.d.ts +1 -1
  7. package/dist/AuthPage/AuthPage.js +36 -29
  8. package/dist/AuthPage/ScreenSetsContainer.js +9 -9
  9. package/dist/AuthPage/index.js +5 -4
  10. package/dist/Banners/Banner.d.ts +2 -2
  11. package/dist/Banners/Banner.js +182 -112
  12. package/dist/Banners/OverviewBanner.d.ts +1 -1
  13. package/dist/Banners/OverviewBanner.js +32 -39
  14. package/dist/Banners/index.js +5 -4
  15. package/dist/Banners/styles.js +53 -55
  16. package/dist/Breadcrumb/Breadcrumb.d.ts +1 -1
  17. package/dist/Breadcrumb/Breadcrumb.js +126 -67
  18. package/dist/Breadcrumb/BreadcrumbItem.js +2 -1
  19. package/dist/Breadcrumb/index.js +5 -4
  20. package/dist/Breadcrumb/styles.js +32 -24
  21. package/dist/Button/BackButton.js +48 -45
  22. package/dist/Button/Button.js +195 -85
  23. package/dist/Button/DualFunctionButton.js +160 -71
  24. package/dist/Button/Iconbutton.js +127 -70
  25. package/dist/Button/index.js +9 -8
  26. package/dist/Card/HorizontalCard/HorizontalCard.js +78 -55
  27. package/dist/Card/HorizontalCard/HorizontalCardActions.d.ts +1 -1
  28. package/dist/Card/HorizontalCard/HorizontalCardActions.js +92 -39
  29. package/dist/Card/HorizontalCard/HorizontalCardBody.d.ts +1 -1
  30. package/dist/Card/HorizontalCard/HorizontalCardBody.js +38 -23
  31. package/dist/Card/HorizontalCard/HorizontalCardThumbnail.d.ts +1 -1
  32. package/dist/Card/HorizontalCard/HorizontalCardThumbnail.js +34 -21
  33. package/dist/Card/HorizontalCard/index.js +5 -4
  34. package/dist/Card/HorizontalCard/types.d.ts +5 -5
  35. package/dist/Card/HorizontalCard/types.js +2 -1
  36. package/dist/Card/VerticalCard/Card.js +81 -61
  37. package/dist/Card/VerticalCard/CardBottomSection.js +110 -45
  38. package/dist/Card/VerticalCard/CardMiddleSection.js +66 -32
  39. package/dist/Card/VerticalCard/CardTopSection.js +101 -33
  40. package/dist/Card/VerticalCard/index.js +8 -7
  41. package/dist/Card/index.js +3 -2
  42. package/dist/Chips/ActionChip.js +63 -41
  43. package/dist/Chips/ChipStyles.js +11 -12
  44. package/dist/Chips/ChipTypes.d.ts +1 -1
  45. package/dist/Chips/ChipTypes.js +2 -1
  46. package/dist/Chips/ChoiceChips.js +93 -66
  47. package/dist/Chips/FilterChip.js +64 -43
  48. package/dist/Chips/InputChip.js +106 -65
  49. package/dist/Chips/index.js +7 -6
  50. package/dist/ChipsInput/ChipDropdownInput.js +361 -224
  51. package/dist/ChipsInput/ChipInput.js +124 -95
  52. package/dist/ChipsInput/ChipInputField.js +195 -114
  53. package/dist/ChipsInput/ChipInputTypes.js +2 -1
  54. package/dist/ChipsInput/index.js +3 -2
  55. package/dist/Dropdown/BasicDropdown.d.ts +3 -3
  56. package/dist/Dropdown/BasicDropdown.js +305 -153
  57. package/dist/Dropdown/CommonStyling.js +44 -24
  58. package/dist/Dropdown/DropdownButton.js +206 -103
  59. package/dist/Dropdown/DropdownButtonTypes.d.ts +3 -3
  60. package/dist/Dropdown/DropdownButtonTypes.js +2 -1
  61. package/dist/Dropdown/DropdownContent.js +605 -339
  62. package/dist/Dropdown/DropdownFilter.js +318 -161
  63. package/dist/Dropdown/index.js +9 -8
  64. package/dist/Footer/Components/FooterBottomLinks.js +41 -20
  65. package/dist/Footer/Components/FooterDropdownLinks.js +61 -25
  66. package/dist/Footer/Components/FooterNavSection.js +62 -32
  67. package/dist/Footer/Components/FooterNewsletterAndSocialSection.js +95 -42
  68. package/dist/Footer/Components/FooterTop.js +60 -34
  69. package/dist/Footer/Footer.js +20 -17
  70. package/dist/Footer/SiteFooter.js +89 -51
  71. package/dist/Footer/index.js +3 -2
  72. package/dist/GlobalNavigationBar/GlobalNavigationBar.d.ts +1 -1
  73. package/dist/GlobalNavigationBar/GlobalNavigationBar.js +192 -89
  74. package/dist/GlobalNavigationBar/Logo.d.ts +1 -1
  75. package/dist/GlobalNavigationBar/Logo.js +74 -33
  76. package/dist/GlobalNavigationBar/desktop/DesktopActions.js +146 -88
  77. package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.d.ts +1 -1
  78. package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.js +66 -42
  79. package/dist/GlobalNavigationBar/desktop/MainMenu.d.ts +1 -1
  80. package/dist/GlobalNavigationBar/desktop/MainMenu.js +282 -175
  81. package/dist/GlobalNavigationBar/desktop/RightSideNav.d.ts +1 -1
  82. package/dist/GlobalNavigationBar/desktop/RightSideNav.js +64 -46
  83. package/dist/GlobalNavigationBar/desktop/SubMenu.d.ts +1 -1
  84. package/dist/GlobalNavigationBar/desktop/SubMenu.js +248 -131
  85. package/dist/GlobalNavigationBar/desktop/UserMenu.js +155 -90
  86. package/dist/GlobalNavigationBar/index.js +4 -3
  87. package/dist/GlobalNavigationBar/mobile/CommonStyles.js +26 -28
  88. package/dist/GlobalNavigationBar/mobile/MobileActionContainer.js +32 -18
  89. package/dist/GlobalNavigationBar/mobile/MobileMenu.d.ts +1 -1
  90. package/dist/GlobalNavigationBar/mobile/MobileMenu.js +146 -94
  91. package/dist/GlobalNavigationBar/mobile/MobileMenuContent.js +145 -89
  92. package/dist/GlobalNavigationBar/mobile/MobileMenuHeader.js +152 -108
  93. package/dist/GlobalNavigationBar/types.d.ts +8 -8
  94. package/dist/GlobalNavigationBar/types.js +2 -1
  95. package/dist/GlobalNavigationBar/utils.js +10 -7
  96. package/dist/HyperLink/HyperLink.js +42 -36
  97. package/dist/HyperLink/index.js +4 -3
  98. package/dist/HyperLink/styling.js +7 -9
  99. package/dist/Image/ImageWithFallbacks.d.ts +1 -1
  100. package/dist/Image/ImageWithFallbacks.js +106 -87
  101. package/dist/Image/index.js +3 -2
  102. package/dist/InputFields/Checkbox.js +95 -65
  103. package/dist/InputFields/DatepickerField.d.ts +1 -1
  104. package/dist/InputFields/DatepickerField.js +335 -227
  105. package/dist/InputFields/DatepickerFieldHeader.js +80 -43
  106. package/dist/InputFields/Label.d.ts +1 -1
  107. package/dist/InputFields/Label.js +116 -77
  108. package/dist/InputFields/NumberField.js +304 -194
  109. package/dist/InputFields/PasswordField.d.ts +1 -1
  110. package/dist/InputFields/PasswordField.js +129 -60
  111. package/dist/InputFields/QuickSearch.d.ts +1 -1
  112. package/dist/InputFields/QuickSearch.js +189 -92
  113. package/dist/InputFields/RadioButton.d.ts +1 -1
  114. package/dist/InputFields/RadioButton.js +96 -54
  115. package/dist/InputFields/ResponsiveComponentWrapper.d.ts +1 -1
  116. package/dist/InputFields/ResponsiveComponentWrapper.js +44 -20
  117. package/dist/InputFields/RichTextField.js +111 -83
  118. package/dist/InputFields/SearchBar.d.ts +1 -1
  119. package/dist/InputFields/SearchBar.js +187 -63
  120. package/dist/InputFields/TextField.d.ts +1 -1
  121. package/dist/InputFields/TextField.js +121 -51
  122. package/dist/InputFields/Textarea.js +88 -57
  123. package/dist/InputFields/components/SearchBarInput.d.ts +1 -1
  124. package/dist/InputFields/components/SearchBarInput.js +73 -26
  125. package/dist/InputFields/components/SearchField.js +45 -44
  126. package/dist/InputFields/index.js +14 -13
  127. package/dist/InputFields/styling.js +38 -33
  128. package/dist/InputFields/types.d.ts +2 -2
  129. package/dist/InputFields/types.js +3 -2
  130. package/dist/Layouts/index.js +41 -25
  131. package/dist/LinearProgress/LinearProgress.js +105 -78
  132. package/dist/LinearProgress/index.js +4 -3
  133. package/dist/List/ListRow.js +140 -83
  134. package/dist/List/index.js +3 -2
  135. package/dist/LoadingIndicator/LoadingIndicator.d.ts +1 -1
  136. package/dist/LoadingIndicator/LoadingIndicator.js +46 -26
  137. package/dist/LoadingIndicator/index.js +2 -1
  138. package/dist/LoadingPage/GlobalLoadingPage.js +36 -26
  139. package/dist/LoadingPage/index.js +2 -1
  140. package/dist/MenuItem/MenuItem.d.ts +1 -1
  141. package/dist/MenuItem/MenuItem.js +101 -60
  142. package/dist/MenuItem/index.js +2 -1
  143. package/dist/MiniProductCard/MiniProductCard.d.ts +1 -1
  144. package/dist/MiniProductCard/MiniProductCard.js +47 -30
  145. package/dist/MiniProductCard/index.js +2 -1
  146. package/dist/Modals/Modal.d.ts +1 -1
  147. package/dist/Modals/Modal.js +55 -36
  148. package/dist/Modals/ModalContainer.d.ts +2 -2
  149. package/dist/Modals/ModalContainer.js +185 -130
  150. package/dist/Modals/ModalContent.js +246 -159
  151. package/dist/Modals/ModalDialog.js +339 -166
  152. package/dist/Modals/ModalNote.js +66 -27
  153. package/dist/Modals/ModalStyles.js +94 -53
  154. package/dist/Modals/ModalTypes.d.ts +2 -2
  155. package/dist/Modals/ModalTypes.js +2 -1
  156. package/dist/Modals/index.js +7 -6
  157. package/dist/NavItem/NavItem.d.ts +1 -1
  158. package/dist/NavItem/NavItem.js +18 -26
  159. package/dist/NavItem/NestedNavItem.js +28 -18
  160. package/dist/NavItem/index.js +2 -1
  161. package/dist/NotificationDot/NotificationDot.js +47 -17
  162. package/dist/NotificationDot/index.js +2 -1
  163. package/dist/Paginator/Paginator.js +147 -77
  164. package/dist/Paginator/index.js +3 -2
  165. package/dist/Panel/Panel.d.ts +1 -1
  166. package/dist/Panel/Panel.js +131 -82
  167. package/dist/Panel/index.js +2 -1
  168. package/dist/Popover/Popover.js +226 -101
  169. package/dist/Popover/index.js +2 -1
  170. package/dist/ProfileButton/ProfileButton.d.ts +2 -2
  171. package/dist/ProfileButton/ProfileButton.js +75 -52
  172. package/dist/ProfileButton/index.js +2 -1
  173. package/dist/QuizButton/QuizButton.d.ts +1 -1
  174. package/dist/QuizButton/QuizButton.js +121 -53
  175. package/dist/QuizButton/index.js +2 -1
  176. package/dist/SegmentControl/SegmentControl.js +78 -57
  177. package/dist/SegmentControl/index.js +3 -2
  178. package/dist/Services/functions.js +12 -11
  179. package/dist/SideMenu/SideMenu.js +30 -43
  180. package/dist/SideMenu/SideMenuBody.js +38 -24
  181. package/dist/SideMenu/SideMenuFooter.js +46 -43
  182. package/dist/SideMenu/SideMenuHeader.js +42 -46
  183. package/dist/SideMenu/index.js +3 -2
  184. package/dist/SideMenu/types.d.ts +3 -3
  185. package/dist/SideMenu/types.js +2 -1
  186. package/dist/SkipToContent/SkipToContent.d.ts +1 -1
  187. package/dist/SkipToContent/SkipToContent.js +24 -17
  188. package/dist/SkipToContent/index.js +2 -1
  189. package/dist/Switcher/MobileCustomMenuContent.js +37 -26
  190. package/dist/Switcher/MobileSwitcherMenu.js +55 -21
  191. package/dist/Switcher/SwitcherMenuItem.js +44 -18
  192. package/dist/Switcher/index.js +4 -3
  193. package/dist/Table/Table.js +391 -286
  194. package/dist/Table/TableBody.js +244 -116
  195. package/dist/Table/TableFooter.js +94 -41
  196. package/dist/Table/TableHeaders.js +31 -26
  197. package/dist/Table/TableStyles.js +48 -40
  198. package/dist/Table/TableTypes.d.ts +4 -4
  199. package/dist/Table/TableTypes.js +2 -2
  200. package/dist/Table/index.js +4 -3
  201. package/dist/Tabs/HorizontalTabs.js +161 -116
  202. package/dist/Tabs/TabLink.js +117 -76
  203. package/dist/Tabs/Tabs.d.ts +1 -1
  204. package/dist/Tabs/Tabs.js +80 -62
  205. package/dist/Tabs/VerticalTabs.js +46 -13
  206. package/dist/Tabs/index.js +4 -3
  207. package/dist/Tag/Tag.d.ts +2 -2
  208. package/dist/Tag/Tag.js +49 -41
  209. package/dist/Tag/index.js +2 -1
  210. package/dist/Tile/Tile.js +42 -43
  211. package/dist/Tile/TileBody.js +18 -15
  212. package/dist/Tile/TileCommonItems.js +117 -75
  213. package/dist/Tile/TileFooter.js +28 -19
  214. package/dist/Tile/TileHeader.js +81 -57
  215. package/dist/Tile/TileTypes.d.ts +8 -8
  216. package/dist/Tile/TileTypes.js +2 -1
  217. package/dist/Tile/index.js +4 -3
  218. package/dist/Toasters/Toast.d.ts +2 -2
  219. package/dist/Toasters/Toast.js +241 -166
  220. package/dist/Toasters/ToastContext.d.ts +2 -2
  221. package/dist/Toasters/ToastContext.js +145 -69
  222. package/dist/Toasters/index.js +5 -4
  223. package/dist/Toggles/ToggleButton.js +71 -48
  224. package/dist/Toggles/ToggleSwitch.js +83 -61
  225. package/dist/Toggles/TogglerStyles.js +12 -13
  226. package/dist/Toggles/TogglerTypes.js +2 -1
  227. package/dist/Toggles/index.js +4 -3
  228. package/dist/Tooltips/TooltipOverflow.js +102 -71
  229. package/dist/Tooltips/TooltipStyles.d.ts +1 -1
  230. package/dist/Tooltips/TooltipStyles.js +70 -41
  231. package/dist/Tooltips/TooltipTypes.js +2 -1
  232. package/dist/Tooltips/TooltipWrapper.js +93 -65
  233. package/dist/Tooltips/index.js +4 -3
  234. package/dist/assets/index.d.ts +1 -1
  235. package/dist/assets/index.js +154 -41
  236. package/dist/common/ActionWithin.js +45 -25
  237. package/dist/common/ClickOutside.js +23 -20
  238. package/dist/common/EventHandlers.js +9 -8
  239. package/dist/common/FocusOutside.js +23 -20
  240. package/dist/common/FocusVisible.d.ts +1 -1
  241. package/dist/common/FocusVisible.js +89 -75
  242. package/dist/common/InputStyling.js +6 -8
  243. package/dist/common/NavigationHelper.js +24 -18
  244. package/dist/common/ScrollableContainer.js +25 -22
  245. package/dist/common/StackState.js +29 -10
  246. package/dist/common/index.js +7 -6
  247. package/dist/icons/contenticons/Adaptive.js +37 -31
  248. package/dist/icons/contenticons/Add.js +37 -31
  249. package/dist/icons/contenticons/Adult.js +37 -31
  250. package/dist/icons/contenticons/AedNoShockAdvised.js +37 -31
  251. package/dist/icons/contenticons/AedPads.js +37 -31
  252. package/dist/icons/contenticons/AedPadsCorrect.js +37 -31
  253. package/dist/icons/contenticons/AedPadsError.js +37 -31
  254. package/dist/icons/contenticons/AedShockAdvised.js +37 -31
  255. package/dist/icons/contenticons/Ambulance.js +37 -31
  256. package/dist/icons/contenticons/Assignments.js +37 -31
  257. package/dist/icons/contenticons/Attention.js +37 -31
  258. package/dist/icons/contenticons/AutomaticMode.js +37 -31
  259. package/dist/icons/contenticons/AwardWinningPerson.js +37 -31
  260. package/dist/icons/contenticons/Biohazard.js +37 -31
  261. package/dist/icons/contenticons/Bleeding.js +37 -31
  262. package/dist/icons/contenticons/Book.js +37 -31
  263. package/dist/icons/contenticons/Buildings.js +37 -31
  264. package/dist/icons/contenticons/CPRCall.js +37 -31
  265. package/dist/icons/contenticons/CPRCycles.js +37 -31
  266. package/dist/icons/contenticons/CPRTraining.js +37 -31
  267. package/dist/icons/contenticons/Calendar.js +37 -31
  268. package/dist/icons/contenticons/Call.js +37 -31
  269. package/dist/icons/contenticons/Certificate.js +37 -31
  270. package/dist/icons/contenticons/ChestCompressionFraction.js +37 -31
  271. package/dist/icons/contenticons/Child.js +37 -31
  272. package/dist/icons/contenticons/Cleaning.js +37 -31
  273. package/dist/icons/contenticons/ClinicalFindings.js +37 -31
  274. package/dist/icons/contenticons/Cloud.js +37 -31
  275. package/dist/icons/contenticons/CloudAttension.js +37 -31
  276. package/dist/icons/contenticons/CloudChecked.js +37 -31
  277. package/dist/icons/contenticons/CloudDownload.js +37 -31
  278. package/dist/icons/contenticons/CloudLocked.js +37 -31
  279. package/dist/icons/contenticons/CloudNoConnection.js +37 -31
  280. package/dist/icons/contenticons/CloudSyncing.js +37 -31
  281. package/dist/icons/contenticons/CloudUpload.js +37 -31
  282. package/dist/icons/contenticons/Code.js +37 -31
  283. package/dist/icons/contenticons/CoffeeBreak.js +37 -31
  284. package/dist/icons/contenticons/Contact.js +37 -31
  285. package/dist/icons/contenticons/ContactInfo.js +37 -31
  286. package/dist/icons/contenticons/Cookie.js +37 -31
  287. package/dist/icons/contenticons/CountAloud.js +37 -31
  288. package/dist/icons/contenticons/Dashboard.js +37 -31
  289. package/dist/icons/contenticons/Data.js +37 -31
  290. package/dist/icons/contenticons/DecisionFlow.js +37 -31
  291. package/dist/icons/contenticons/Defribilator.js +37 -31
  292. package/dist/icons/contenticons/DefribilatorMonitor.js +37 -31
  293. package/dist/icons/contenticons/Depth.js +37 -31
  294. package/dist/icons/contenticons/Desktop.js +37 -31
  295. package/dist/icons/contenticons/DeviceChecked.js +37 -31
  296. package/dist/icons/contenticons/Dispatcher.js +37 -31
  297. package/dist/icons/contenticons/Doctor.js +37 -31
  298. package/dist/icons/contenticons/DocumentChecked.js +37 -31
  299. package/dist/icons/contenticons/Download.js +37 -31
  300. package/dist/icons/contenticons/ELearning.js +37 -31
  301. package/dist/icons/contenticons/EMSRescuer.js +37 -31
  302. package/dist/icons/contenticons/ESimulation.js +37 -31
  303. package/dist/icons/contenticons/Edit.js +37 -31
  304. package/dist/icons/contenticons/Educator.js +37 -31
  305. package/dist/icons/contenticons/Elderly.js +37 -31
  306. package/dist/icons/contenticons/Embryo.js +37 -31
  307. package/dist/icons/contenticons/EventLog.js +37 -31
  308. package/dist/icons/contenticons/Faq.js +37 -31
  309. package/dist/icons/contenticons/Female.js +37 -31
  310. package/dist/icons/contenticons/FirstAid.js +37 -31
  311. package/dist/icons/contenticons/Geriatric.js +37 -31
  312. package/dist/icons/contenticons/GiftCard.js +37 -31
  313. package/dist/icons/contenticons/Goals.js +37 -31
  314. package/dist/icons/contenticons/Grid.js +37 -31
  315. package/dist/icons/contenticons/GuidedTour.js +37 -31
  316. package/dist/icons/contenticons/HandPlacement.js +37 -31
  317. package/dist/icons/contenticons/HandPlacementCorrect.js +37 -31
  318. package/dist/icons/contenticons/HandPlacementIncorrect.js +37 -31
  319. package/dist/icons/contenticons/HeadTilt.js +37 -31
  320. package/dist/icons/contenticons/Heart.js +37 -31
  321. package/dist/icons/contenticons/HeartPulse.js +37 -31
  322. package/dist/icons/contenticons/HeartShock.js +37 -31
  323. package/dist/icons/contenticons/Help.js +37 -31
  324. package/dist/icons/contenticons/Hierarchy.js +37 -31
  325. package/dist/icons/contenticons/Hospital.js +37 -31
  326. package/dist/icons/contenticons/Hospitalized.js +37 -31
  327. package/dist/icons/contenticons/House.js +37 -31
  328. package/dist/icons/contenticons/Infant.js +37 -31
  329. package/dist/icons/contenticons/Information.js +37 -31
  330. package/dist/icons/contenticons/Injustice.js +37 -31
  331. package/dist/icons/contenticons/Institute.js +37 -31
  332. package/dist/icons/contenticons/Justice.js +37 -31
  333. package/dist/icons/contenticons/Laptop.js +37 -31
  334. package/dist/icons/contenticons/Leaflet.js +37 -31
  335. package/dist/icons/contenticons/Learner.js +37 -31
  336. package/dist/icons/contenticons/Levels.js +37 -31
  337. package/dist/icons/contenticons/LevelsDecreasing.js +37 -31
  338. package/dist/icons/contenticons/LevelsIncreasing.js +37 -31
  339. package/dist/icons/contenticons/LevelsStarred.js +37 -31
  340. package/dist/icons/contenticons/Maintenance.js +37 -31
  341. package/dist/icons/contenticons/Male.js +37 -31
  342. package/dist/icons/contenticons/Manikin.js +37 -31
  343. package/dist/icons/contenticons/ManikinCorrect.js +37 -31
  344. package/dist/icons/contenticons/ManikinError.js +37 -31
  345. package/dist/icons/contenticons/ManualMode.js +37 -31
  346. package/dist/icons/contenticons/MapPoint.js +37 -31
  347. package/dist/icons/contenticons/MaskLeak.js +37 -31
  348. package/dist/icons/contenticons/MedicalHistory.js +37 -31
  349. package/dist/icons/contenticons/MedicalRecord.js +37 -31
  350. package/dist/icons/contenticons/Medication.js +37 -31
  351. package/dist/icons/contenticons/Metronome.js +37 -31
  352. package/dist/icons/contenticons/MoodHappy.js +37 -31
  353. package/dist/icons/contenticons/MoodIndifferent.js +37 -31
  354. package/dist/icons/contenticons/MoodSad.js +37 -31
  355. package/dist/icons/contenticons/MoodVeryHappy.js +37 -31
  356. package/dist/icons/contenticons/MoodVerySad.js +37 -31
  357. package/dist/icons/contenticons/Newborn.js +37 -31
  358. package/dist/icons/contenticons/NoInterruption.js +37 -31
  359. package/dist/icons/contenticons/Note.js +37 -31
  360. package/dist/icons/contenticons/Pain.js +37 -31
  361. package/dist/icons/contenticons/Patient.js +37 -31
  362. package/dist/icons/contenticons/PatientAssignment.js +37 -31
  363. package/dist/icons/contenticons/PatientMonitor.js +37 -31
  364. package/dist/icons/contenticons/PatientStretcher.js +37 -31
  365. package/dist/icons/contenticons/PatientTransfer.js +37 -31
  366. package/dist/icons/contenticons/PatientTreatment.js +37 -31
  367. package/dist/icons/contenticons/Person.js +37 -31
  368. package/dist/icons/contenticons/PhysiologicalModel.js +37 -31
  369. package/dist/icons/contenticons/PieChart.js +37 -31
  370. package/dist/icons/contenticons/Pill.js +37 -31
  371. package/dist/icons/contenticons/Pregnant.js +37 -31
  372. package/dist/icons/contenticons/Print.js +37 -31
  373. package/dist/icons/contenticons/ProvidersOrders.js +37 -31
  374. package/dist/icons/contenticons/Pulse.js +37 -31
  375. package/dist/icons/contenticons/RQICart.js +37 -31
  376. package/dist/icons/contenticons/Rate.js +37 -31
  377. package/dist/icons/contenticons/RateTooFast.js +37 -31
  378. package/dist/icons/contenticons/RateTooSlow.js +37 -31
  379. package/dist/icons/contenticons/Recoil.js +37 -31
  380. package/dist/icons/contenticons/Ruler.js +37 -31
  381. package/dist/icons/contenticons/Screens.js +37 -31
  382. package/dist/icons/contenticons/Search.js +37 -31
  383. package/dist/icons/contenticons/Sepsis.js +37 -31
  384. package/dist/icons/contenticons/Settings.js +37 -31
  385. package/dist/icons/contenticons/Shock.js +37 -31
  386. package/dist/icons/contenticons/ShockAdvised.js +37 -31
  387. package/dist/icons/contenticons/ShockAutomated.js +37 -31
  388. package/dist/icons/contenticons/ShockNotAdvised.js +37 -31
  389. package/dist/icons/contenticons/Sleep.js +37 -31
  390. package/dist/icons/contenticons/Smartphone.js +37 -31
  391. package/dist/icons/contenticons/Speech.js +37 -31
  392. package/dist/icons/contenticons/SpeechBubble.js +37 -31
  393. package/dist/icons/contenticons/SpeechBubbles.js +37 -31
  394. package/dist/icons/contenticons/Star.js +37 -31
  395. package/dist/icons/contenticons/Stethoscope.js +37 -31
  396. package/dist/icons/contenticons/Stock.js +37 -31
  397. package/dist/icons/contenticons/Stopwatch.js +37 -31
  398. package/dist/icons/contenticons/Suitcase.js +37 -31
  399. package/dist/icons/contenticons/SwitchCamera.js +37 -31
  400. package/dist/icons/contenticons/SwitchRoles.js +37 -31
  401. package/dist/icons/contenticons/Tablet.js +37 -31
  402. package/dist/icons/contenticons/Talking.js +37 -31
  403. package/dist/icons/contenticons/TargetGroup.js +37 -31
  404. package/dist/icons/contenticons/TaskTrainer.js +37 -31
  405. package/dist/icons/contenticons/TeamLead.js +37 -31
  406. package/dist/icons/contenticons/TeamWork.js +37 -31
  407. package/dist/icons/contenticons/Terms.js +37 -31
  408. package/dist/icons/contenticons/TimelineReview.js +37 -31
  409. package/dist/icons/contenticons/Translation.js +37 -31
  410. package/dist/icons/contenticons/Trophy.js +37 -31
  411. package/dist/icons/contenticons/Trophy1st.js +37 -31
  412. package/dist/icons/contenticons/Trophy2nd.js +37 -31
  413. package/dist/icons/contenticons/Trophy3rd.js +37 -31
  414. package/dist/icons/contenticons/TrophyStar.js +37 -31
  415. package/dist/icons/contenticons/Truck.js +37 -31
  416. package/dist/icons/contenticons/TwoRescuerCPR.js +37 -31
  417. package/dist/icons/contenticons/USB.js +37 -31
  418. package/dist/icons/contenticons/Ultrasound.js +37 -31
  419. package/dist/icons/contenticons/VentilationLungs.js +37 -31
  420. package/dist/icons/contenticons/VentilationPressure.js +37 -31
  421. package/dist/icons/contenticons/VentilationVolume.js +37 -31
  422. package/dist/icons/contenticons/Video.js +37 -31
  423. package/dist/icons/contenticons/VideoRecording.js +37 -31
  424. package/dist/icons/contenticons/Visibility.js +37 -31
  425. package/dist/icons/contenticons/VitalSigns.js +37 -31
  426. package/dist/icons/contenticons/index.js +180 -179
  427. package/dist/icons/index.d.ts +1 -1
  428. package/dist/icons/index.js +67 -41
  429. package/dist/icons/systemicons/Accessibility.js +37 -31
  430. package/dist/icons/systemicons/Add.js +37 -31
  431. package/dist/icons/systemicons/AddUser.js +37 -31
  432. package/dist/icons/systemicons/Adult.js +37 -31
  433. package/dist/icons/systemicons/AedPads.js +37 -31
  434. package/dist/icons/systemicons/AedPadsCorrect.js +37 -31
  435. package/dist/icons/systemicons/AedPadsError.js +37 -31
  436. package/dist/icons/systemicons/Archive.js +37 -31
  437. package/dist/icons/systemicons/ArrowCollapse.js +37 -31
  438. package/dist/icons/systemicons/ArrowDropDown.js +37 -31
  439. package/dist/icons/systemicons/ArrowDropLeft.js +37 -31
  440. package/dist/icons/systemicons/ArrowDropRight.js +37 -31
  441. package/dist/icons/systemicons/ArrowDropUp.js +37 -31
  442. package/dist/icons/systemicons/ArrowExpand.js +37 -31
  443. package/dist/icons/systemicons/ArrowLineDown.js +37 -31
  444. package/dist/icons/systemicons/ArrowLineLeft.js +37 -31
  445. package/dist/icons/systemicons/ArrowLineRight.js +37 -31
  446. package/dist/icons/systemicons/ArrowLineUp.js +37 -31
  447. package/dist/icons/systemicons/ArrowStopLeft.js +37 -31
  448. package/dist/icons/systemicons/ArrowStopRight.js +37 -31
  449. package/dist/icons/systemicons/Assignments.js +37 -31
  450. package/dist/icons/systemicons/Asterisk.js +37 -31
  451. package/dist/icons/systemicons/Attachment.js +37 -31
  452. package/dist/icons/systemicons/Attention.js +37 -31
  453. package/dist/icons/systemicons/AudioDescriptionOn.js +37 -31
  454. package/dist/icons/systemicons/BackwardsFiveSec.js +37 -31
  455. package/dist/icons/systemicons/Battery0.js +37 -31
  456. package/dist/icons/systemicons/Battery1.js +37 -31
  457. package/dist/icons/systemicons/Battery2.js +37 -31
  458. package/dist/icons/systemicons/Battery3.js +37 -31
  459. package/dist/icons/systemicons/Battery4.js +37 -31
  460. package/dist/icons/systemicons/Battery5.js +37 -31
  461. package/dist/icons/systemicons/Battery6.js +37 -31
  462. package/dist/icons/systemicons/BatteryFull.js +37 -31
  463. package/dist/icons/systemicons/Bluetooth.js +37 -31
  464. package/dist/icons/systemicons/Book.js +37 -31
  465. package/dist/icons/systemicons/BookmarkAdd.js +37 -31
  466. package/dist/icons/systemicons/BookmarkCollection.js +37 -31
  467. package/dist/icons/systemicons/BookmarkOff.js +37 -31
  468. package/dist/icons/systemicons/BookmarkOn.js +37 -31
  469. package/dist/icons/systemicons/Bullet.js +37 -31
  470. package/dist/icons/systemicons/Calendar.js +37 -31
  471. package/dist/icons/systemicons/CheckMark.js +37 -31
  472. package/dist/icons/systemicons/CheckboxOff.js +37 -31
  473. package/dist/icons/systemicons/CheckboxOn.js +37 -31
  474. package/dist/icons/systemicons/CheckboxSemi.js +37 -31
  475. package/dist/icons/systemicons/ChevronDown.js +37 -31
  476. package/dist/icons/systemicons/ChevronLeft.js +37 -31
  477. package/dist/icons/systemicons/ChevronRight.js +37 -31
  478. package/dist/icons/systemicons/ChevronUp.js +37 -31
  479. package/dist/icons/systemicons/Child.js +37 -31
  480. package/dist/icons/systemicons/Clear.js +37 -31
  481. package/dist/icons/systemicons/Close.js +37 -31
  482. package/dist/icons/systemicons/ClosedCaptionOn.js +37 -31
  483. package/dist/icons/systemicons/Cloud.js +37 -31
  484. package/dist/icons/systemicons/CloudAttention.js +37 -31
  485. package/dist/icons/systemicons/CloudCheck.js +37 -31
  486. package/dist/icons/systemicons/CloudDownload.js +37 -31
  487. package/dist/icons/systemicons/CloudLocked.js +37 -31
  488. package/dist/icons/systemicons/CloudNoConnection.js +37 -31
  489. package/dist/icons/systemicons/CloudSyncing.js +37 -31
  490. package/dist/icons/systemicons/CloudUpload.js +37 -31
  491. package/dist/icons/systemicons/CoffeeBreak.js +37 -31
  492. package/dist/icons/systemicons/Copy.js +37 -31
  493. package/dist/icons/systemicons/Dashboard.js +37 -31
  494. package/dist/icons/systemicons/DecisionFlow.js +37 -31
  495. package/dist/icons/systemicons/Delete.js +37 -31
  496. package/dist/icons/systemicons/Document.js +39 -31
  497. package/dist/icons/systemicons/Download.js +37 -31
  498. package/dist/icons/systemicons/DragHandle.js +37 -31
  499. package/dist/icons/systemicons/DragIndicator.js +37 -31
  500. package/dist/icons/systemicons/Edit.js +37 -31
  501. package/dist/icons/systemicons/Educator.js +37 -31
  502. package/dist/icons/systemicons/Equals.js +37 -31
  503. package/dist/icons/systemicons/EventLog.js +37 -31
  504. package/dist/icons/systemicons/Export.js +37 -31
  505. package/dist/icons/systemicons/ExportCVS.js +37 -31
  506. package/dist/icons/systemicons/ExportDoc.js +37 -31
  507. package/dist/icons/systemicons/ExportEXL.js +37 -31
  508. package/dist/icons/systemicons/ExportJpg.js +37 -31
  509. package/dist/icons/systemicons/ExportPDF.js +37 -31
  510. package/dist/icons/systemicons/ExportPNG.js +37 -31
  511. package/dist/icons/systemicons/ExtendTextArea.js +37 -31
  512. package/dist/icons/systemicons/Facebook.js +37 -31
  513. package/dist/icons/systemicons/Filter.js +37 -31
  514. package/dist/icons/systemicons/Flickr.js +37 -31
  515. package/dist/icons/systemicons/Forward.js +37 -31
  516. package/dist/icons/systemicons/ForwardFiveSec.js +37 -31
  517. package/dist/icons/systemicons/ForwardSlash.js +37 -31
  518. package/dist/icons/systemicons/Fullscreen.js +37 -31
  519. package/dist/icons/systemicons/FullscreenExit.js +37 -31
  520. package/dist/icons/systemicons/GearSettings.js +37 -31
  521. package/dist/icons/systemicons/GridView.js +37 -31
  522. package/dist/icons/systemicons/Group.js +37 -31
  523. package/dist/icons/systemicons/GuidedTour.js +37 -31
  524. package/dist/icons/systemicons/HeartShock.js +37 -31
  525. package/dist/icons/systemicons/Help.js +37 -31
  526. package/dist/icons/systemicons/Hierarchy.js +37 -31
  527. package/dist/icons/systemicons/History.js +37 -31
  528. package/dist/icons/systemicons/Home.js +37 -31
  529. package/dist/icons/systemicons/Image.js +37 -31
  530. package/dist/icons/systemicons/Infant.js +37 -31
  531. package/dist/icons/systemicons/Information.js +37 -31
  532. package/dist/icons/systemicons/Institute.js +37 -31
  533. package/dist/icons/systemicons/Keyboard.js +37 -31
  534. package/dist/icons/systemicons/Language.js +37 -31
  535. package/dist/icons/systemicons/Learner.js +37 -31
  536. package/dist/icons/systemicons/Legend.js +37 -31
  537. package/dist/icons/systemicons/Legend1Circle.js +37 -31
  538. package/dist/icons/systemicons/Legend2Triangle.js +37 -31
  539. package/dist/icons/systemicons/Legend3Star.js +37 -31
  540. package/dist/icons/systemicons/Legend4Square.js +37 -31
  541. package/dist/icons/systemicons/Legend5Diamond.js +37 -31
  542. package/dist/icons/systemicons/Legend6Nabla.js +37 -31
  543. package/dist/icons/systemicons/Legend7Pentagon.js +37 -31
  544. package/dist/icons/systemicons/Legend8Rectangle.js +37 -31
  545. package/dist/icons/systemicons/LegendStrokeDashed.js +37 -31
  546. package/dist/icons/systemicons/LegendStrokeSolid.js +37 -31
  547. package/dist/icons/systemicons/LikeOff.js +37 -31
  548. package/dist/icons/systemicons/LikeOn.js +37 -31
  549. package/dist/icons/systemicons/Link.js +37 -31
  550. package/dist/icons/systemicons/LinkedIn.js +37 -31
  551. package/dist/icons/systemicons/ListView.js +37 -31
  552. package/dist/icons/systemicons/LoadingMedium.js +30 -8
  553. package/dist/icons/systemicons/LoadingSmall.js +30 -8
  554. package/dist/icons/systemicons/LockedOff.js +37 -31
  555. package/dist/icons/systemicons/LockedOn.js +37 -31
  556. package/dist/icons/systemicons/Login.js +37 -31
  557. package/dist/icons/systemicons/Logout.js +37 -31
  558. package/dist/icons/systemicons/Loop.js +37 -31
  559. package/dist/icons/systemicons/Mail.js +37 -31
  560. package/dist/icons/systemicons/Manikin.js +37 -31
  561. package/dist/icons/systemicons/MapPoint.js +37 -31
  562. package/dist/icons/systemicons/Menu.js +37 -31
  563. package/dist/icons/systemicons/Metronome.js +37 -31
  564. package/dist/icons/systemicons/Microphone.js +37 -31
  565. package/dist/icons/systemicons/Minus.js +37 -31
  566. package/dist/icons/systemicons/MoreHorizontal.js +37 -31
  567. package/dist/icons/systemicons/MoreVertical.js +37 -31
  568. package/dist/icons/systemicons/Notification.js +37 -31
  569. package/dist/icons/systemicons/NotificationNew.js +37 -31
  570. package/dist/icons/systemicons/OpenFolder.js +37 -31
  571. package/dist/icons/systemicons/OpenNewWindow.js +37 -31
  572. package/dist/icons/systemicons/OverView.js +37 -31
  573. package/dist/icons/systemicons/Pause.js +37 -31
  574. package/dist/icons/systemicons/PieChart.js +37 -31
  575. package/dist/icons/systemicons/Pin.js +37 -31
  576. package/dist/icons/systemicons/Play.js +37 -31
  577. package/dist/icons/systemicons/PlayList.js +37 -31
  578. package/dist/icons/systemicons/PlayOutline.js +37 -31
  579. package/dist/icons/systemicons/PlaybackSpeed.js +37 -31
  580. package/dist/icons/systemicons/Plus.js +37 -31
  581. package/dist/icons/systemicons/PointDown.js +37 -31
  582. package/dist/icons/systemicons/PointLeft.js +37 -31
  583. package/dist/icons/systemicons/PointRight.js +37 -31
  584. package/dist/icons/systemicons/PointUp.js +37 -31
  585. package/dist/icons/systemicons/Print.js +37 -31
  586. package/dist/icons/systemicons/RadioButtonOff.js +37 -31
  587. package/dist/icons/systemicons/RadioButtonOn.js +37 -31
  588. package/dist/icons/systemicons/Record.js +37 -31
  589. package/dist/icons/systemicons/Refresh.js +37 -31
  590. package/dist/icons/systemicons/Replay.js +37 -31
  591. package/dist/icons/systemicons/Rewind.js +37 -31
  592. package/dist/icons/systemicons/SUN.js +37 -31
  593. package/dist/icons/systemicons/Save.js +37 -31
  594. package/dist/icons/systemicons/Search.js +37 -31
  595. package/dist/icons/systemicons/SendTo.js +37 -31
  596. package/dist/icons/systemicons/Share.js +37 -31
  597. package/dist/icons/systemicons/Shock.js +37 -31
  598. package/dist/icons/systemicons/ShockAdvised.js +37 -31
  599. package/dist/icons/systemicons/ShockAutomated.js +37 -31
  600. package/dist/icons/systemicons/ShockNotAdvised.js +37 -31
  601. package/dist/icons/systemicons/ShoppingCart.js +37 -31
  602. package/dist/icons/systemicons/SkipForward.js +37 -31
  603. package/dist/icons/systemicons/Sort.js +37 -31
  604. package/dist/icons/systemicons/SpeechBuble.js +37 -31
  605. package/dist/icons/systemicons/StarFilled.js +37 -31
  606. package/dist/icons/systemicons/StarOutlined.js +37 -31
  607. package/dist/icons/systemicons/Stop.js +37 -31
  608. package/dist/icons/systemicons/Support.js +37 -31
  609. package/dist/icons/systemicons/SwitchApp.js +37 -31
  610. package/dist/icons/systemicons/Team.js +37 -31
  611. package/dist/icons/systemicons/TechnicalWarning.js +37 -31
  612. package/dist/icons/systemicons/ThumbsDown.js +37 -31
  613. package/dist/icons/systemicons/ThumbsUp.js +37 -31
  614. package/dist/icons/systemicons/Time.js +37 -31
  615. package/dist/icons/systemicons/TimeLimited.js +37 -31
  616. package/dist/icons/systemicons/Timeline.js +37 -31
  617. package/dist/icons/systemicons/Tip.js +37 -31
  618. package/dist/icons/systemicons/Transcript.js +37 -31
  619. package/dist/icons/systemicons/Translation.js +37 -31
  620. package/dist/icons/systemicons/Twitter.js +37 -31
  621. package/dist/icons/systemicons/Upload.js +37 -31
  622. package/dist/icons/systemicons/Usb.js +37 -31
  623. package/dist/icons/systemicons/User.js +37 -31
  624. package/dist/icons/systemicons/Video.js +37 -31
  625. package/dist/icons/systemicons/VisibleOff.js +37 -31
  626. package/dist/icons/systemicons/VisibleOn.js +37 -31
  627. package/dist/icons/systemicons/VolumeDown.js +37 -31
  628. package/dist/icons/systemicons/VolumeOff.js +37 -31
  629. package/dist/icons/systemicons/VolumeUp.js +37 -31
  630. package/dist/icons/systemicons/Youtube.js +37 -31
  631. package/dist/icons/systemicons/Zoom.js +37 -31
  632. package/dist/icons/systemicons/ZoomOut.js +37 -31
  633. package/dist/icons/systemicons/index.js +205 -204
  634. package/dist/index.js +46 -45
  635. package/dist/styles/breakpoints.js +7 -6
  636. package/dist/styles/colors.js +110 -89
  637. package/dist/styles/focus-styles.js +7 -9
  638. package/dist/styles/global.js +25 -13
  639. package/dist/styles/index.cjs +2 -2
  640. package/dist/styles/index.cjs.map +1 -1
  641. package/dist/styles/index.d.ts +1 -1
  642. package/dist/styles/index.js +18 -20
  643. package/dist/styles/index.js.map +1 -1
  644. package/dist/styles/overwritecolors.cjs +2 -2
  645. package/dist/styles/overwritecolors.cjs.map +1 -1
  646. package/dist/styles/overwritecolors.d.ts +2 -1
  647. package/dist/styles/overwritecolors.js +12 -12
  648. package/dist/styles/overwritecolors.js.map +1 -1
  649. package/dist/styles/shadowstyles.js +8 -7
  650. package/dist/styles/typography.d.ts +1 -1
  651. package/dist/styles/typography.js +279 -130
  652. package/dist/styles/z-indexes.js +17 -16
  653. package/dist/types.js +52 -51
  654. package/dist/utils/utils.js +4 -3
  655. package/package.json +1 -1
@@ -1,292 +1,397 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
13
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
14
- if (ar || !(i in from)) {
15
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
16
- ar[i] = from[i];
17
- }
18
- }
19
- return to.concat(ar || Array.prototype.slice.call(from));
20
- };
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
7
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
8
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
21
9
  /**
22
10
  * Import React libraries.
23
- */
24
- import * as React from 'react';
11
+ */
12
+ import * as React from 'react';
13
+
25
14
  /**
26
15
  * Import custom components.
27
- */
28
- import { Size } from '../types';
16
+ */
17
+ import { Size } from '../types';
18
+
29
19
  /**
30
20
  * Import custom styles.
31
- */
32
- import { StyledTableSpinner, TableWrapper } from './TableStyles';
33
- import { LoadingIndicator } from '../LoadingIndicator';
34
- import TableHeader from './TableHeaders';
35
- import TableFooter from './TableFooter';
36
- import TableBody from './TableBody';
37
- var Table = function (props) {
38
- var onPreviousPageClick = props.onPreviousPageClick, onNextPageClick = props.onNextPageClick, onRowsPerPageChange = props.onRowsPerPageChange, onTriggerSortingChange = props.onTriggerSortingChange, columns = props.columns, rows = props.rows, remoteOperations = props.remoteOperations, pagination = props.pagination, showLoadingIndicator = props.showLoadingIndicator, selectable = props.selectable, multiSelect = props.multiSelect, keyExpr = props.keyExpr, sortProps = props.sortProps, accordion = props.accordion, _a = props.collapsed, collapsed = _a === void 0 ? true : _a, collapsedRows = props.collapsedRows, rowsPerPageLabel = props.rowsPerPageLabel, loaderZIndex = props.loaderZIndex;
39
- // States used within the component
40
- var _b = React.useState(10), rowsPerPage = _b[0], setRowsPerPage = _b[1];
41
- var _c = React.useState([]), filteredRows = _c[0], setFilteredRows = _c[1];
42
- var _d = React.useState([]), currentPageRows = _d[0], setCurrentPageRows = _d[1];
43
- var _e = React.useState(1), currentPage = _e[0], setCurrentPage = _e[1];
44
- var _f = React.useState(), sort = _f[0], setSort = _f[1];
45
- var _g = React.useState(), from = _g[0], setFrom = _g[1];
46
- var _h = React.useState(), to = _h[0], setTo = _h[1];
47
- var _j = React.useState(), total = _j[0], setTotal = _j[1];
48
- var _k = React.useState(true), isCollapsed = _k[0], setIsCollapsed = _k[1];
49
- var _l = React.useState('none'), selectAllState = _l[0], setSelectAllState = _l[1];
50
- var _m = React.useState(multiSelect ? [] : undefined), selected = _m[0], setSelected = _m[1];
51
- React.useEffect(function () {
52
- var _a, _b;
53
- setSort({
54
- column: (_a = sortProps === null || sortProps === void 0 ? void 0 : sortProps.column) !== null && _a !== void 0 ? _a : '',
55
- direction: (_b = sortProps === null || sortProps === void 0 ? void 0 : sortProps.direction) !== null && _b !== void 0 ? _b : 'asc',
56
- allowClearingSort: (sortProps === null || sortProps === void 0 ? void 0 : sortProps.allowClearingSort) === undefined ? true : sortProps.allowClearingSort
57
- });
58
- }, [sortProps]);
59
- React.useEffect(function () {
60
- setSelected(props.selectedRows || (multiSelect ? [] : undefined));
61
- }, [props.selectedRows, multiSelect]);
62
- /**
63
- * update select all checkbox state
64
- */
65
- React.useEffect(function () {
66
- if (multiSelect) {
67
- var currentList_1 = currentPageRows.map(function (row) { return keyExpr ? row[keyExpr] : row; });
68
- var count = selected.filter(function (item) { return currentList_1.includes(item); }).length;
69
- setSelectAllState(count === currentList_1.length ? 'all' : count > 0 ? 'some' : 'none');
70
- }
71
- }, [currentPageRows, multiSelect, selected, keyExpr]);
72
- /**
73
- * Takes care of remote pagination.
74
- * Works only in case remote pagination is set to true.
75
- */
76
- React.useEffect(function () {
77
- if (remoteOperations) {
78
- setCurrentPageRows(rows);
79
- // Let's assign pagination values
80
- setFrom(pagination === null || pagination === void 0 ? void 0 : pagination.from);
81
- setTo(pagination === null || pagination === void 0 ? void 0 : pagination.to);
82
- setTotal(pagination === null || pagination === void 0 ? void 0 : pagination.total);
83
- setCurrentPage(pagination === null || pagination === void 0 ? void 0 : pagination.currentPage);
84
- setRowsPerPage(pagination === null || pagination === void 0 ? void 0 : pagination.rowsPerPage);
85
- }
86
- }, [remoteOperations, pagination, rows]);
87
- /**
88
- * Sets number of rows to display when accordion.
89
- */
90
- React.useEffect(function () {
91
- if (!accordion)
92
- return;
93
- setRowsPerPage(isCollapsed ? collapsedRows || 10 : rows.length);
94
- }, [rows, accordion, collapsedRows, isCollapsed]);
95
- React.useEffect(function () {
96
- if (!accordion)
97
- return;
98
- setIsCollapsed(!!collapsed);
99
- }, [accordion, collapsed]);
100
- /**
101
- * Filters out a rows by specific column filters and sorts them if any sorting is set.
102
- * @returns Filtered and sorted rows.
103
- */
104
- var filterAndSortRows = function () {
105
- var tmpFilteredRows = rows.filter(function (row) {
106
- // Let's start with matched filter criteria
107
- var matchFilterCriteria = true;
108
- // Let's go through columns
109
- for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {
110
- var column = columns_1[_i];
111
- // Let's check if filter value is specified for the column
112
- // And if it doesn't match the current row column value
113
- // Then let's update match filter criteria to failed
114
- if (column.filterValue && row[column.key].toLowerCase().indexOf(column.filterValue.toLowerCase()) === -1) {
115
- matchFilterCriteria = false;
116
- }
117
- }
118
- // Let's return row only in case match filter criteria succeeds
119
- if (matchFilterCriteria) {
120
- return row;
121
- }
122
- });
123
- // Let's apply sorting if needed
124
- if (!!(sort === null || sort === void 0 ? void 0 : sort.column) && !!(sort === null || sort === void 0 ? void 0 : sort.direction)) {
125
- // Let's sort the rows
126
- tmpFilteredRows.sort(function (a, b) {
127
- if (a[sort.column] > b[sort.column]) {
128
- return sort.direction === 'asc' ? 1 : -1;
129
- }
130
- else if (a[sort.column] < b[sort.column]) {
131
- return sort.direction === 'asc' ? -1 : 1;
132
- }
133
- else {
134
- return 0;
135
- }
136
- });
137
- }
138
- // Let's return filtered rows
139
- return tmpFilteredRows;
140
- };
141
- /**
142
- * Takes care of local pagination.
143
- * Works only in case remote pagination is not defined or is set to false.
144
- */
145
- React.useEffect(function () {
146
- if (!remoteOperations) {
147
- // Let's retrieve temporary filtered rows and update globally filtered rows
148
- var tmpFilteredRows = filterAndSortRows();
149
- setFilteredRows(tmpFilteredRows);
150
- setTotal(tmpFilteredRows.length);
151
- // Assign rows from and rows to
152
- var rowsFrom = (currentPage - 1) * rowsPerPage;
153
- var rowsTo = rowsFrom + rowsPerPage >= tmpFilteredRows.length ? tmpFilteredRows.length : rowsFrom + rowsPerPage;
154
- // Set from and to values
155
- setFrom(rowsFrom + 1);
156
- setTo(rowsTo);
157
- // Filter out the rows
158
- setCurrentPageRows(tmpFilteredRows.slice(rowsFrom, rowsTo));
159
- }
160
- }, [rowsPerPage, rows, currentPage, columns, sort, remoteOperations]);
161
- /**
162
- * Applies a specific sorting to a column.
163
- * If no sorting exists, then applies ascending initially
164
- * @param column - Column to which sorting should be applied.
165
- */
166
- var sortTableColumn = function (column) {
167
- var columnKey = '';
168
- var sortDirection = undefined;
169
- if ((sort === null || sort === void 0 ? void 0 : sort.column) !== column.key) {
170
- columnKey = column.key;
171
- sortDirection = 'asc';
172
- }
173
- else {
174
- if ((sort === null || sort === void 0 ? void 0 : sort.direction) === 'desc' && (sort === null || sort === void 0 ? void 0 : sort.allowClearingSort)) {
175
- columnKey = '';
176
- sortDirection = undefined;
177
- }
178
- else {
179
- columnKey = sort.column;
180
- sortDirection = sort.direction === 'asc' ? 'desc' : 'asc';
181
- }
182
- }
183
- if (columnKey == '')
184
- setSort({ column: '', direction: 'asc', allowClearingSort: sort === null || sort === void 0 ? void 0 : sort.allowClearingSort });
185
- else
186
- setSort({ column: columnKey, direction: sortDirection, allowClearingSort: sort === null || sort === void 0 ? void 0 : sort.allowClearingSort });
187
- remoteOperations && onTriggerSortingChange && onTriggerSortingChange(columnKey, sortDirection);
188
- };
189
- /**
190
- * Navigates user back to the previous page and updates the current table page.
191
- */
192
- var previousPage = function () {
193
- if (remoteOperations) {
194
- // Let's inform parent component about page change
195
- if (onPreviousPageClick) {
196
- onPreviousPageClick();
197
- }
198
- }
199
- else {
200
- // Let's change the page within the component
201
- setCurrentPage(currentPage > 1 ? currentPage - 1 : 1);
202
- }
203
- };
204
- /**
205
- * Navigates user to the next page and updates the current table page.
206
- */
207
- var nextPage = function () {
208
- if (remoteOperations) {
209
- // Let's inform parent component about page change
210
- if (onNextPageClick) {
211
- onNextPageClick();
212
- }
213
- }
214
- else {
215
- // Let's change the page within the component
216
- setCurrentPage(currentPage * rowsPerPage >= filteredRows.length ? currentPage : currentPage + 1);
217
- }
218
- };
219
- /**
220
- * Updates the rows per page value and refreshes the table content accordingly.
221
- * @param value - Newly selected rows per page value.
222
- */
223
- var changeRowsPerPage = function (value) {
224
- // Let's check if we are using remote pagination
225
- if (remoteOperations) {
226
- // Inform parent component about rows per page change
227
- if (onRowsPerPageChange) {
228
- onRowsPerPageChange(value);
229
- }
230
- }
231
- else {
232
- // Let's reset current page to 1
233
- setCurrentPage(1);
234
- }
235
- // Let's set rows per page
236
- setRowsPerPage(value);
237
- };
238
- /**
239
- * Function which is called when a mouse click happens on a row to pass data to the parent component.
240
- * @param row - Row in which the link is located.
241
- */
242
- var onRowClick = function (row) {
243
- var _a;
244
- var selectedText = (_a = window === null || window === void 0 ? void 0 : window.getSelection()) === null || _a === void 0 ? void 0 : _a.toString();
245
- if ((selectedText === null || selectedText === void 0 ? void 0 : selectedText.length) === 0 && selectable) {
246
- var value = keyExpr ? row[keyExpr] : row;
247
- var currentSelection = value;
248
- if (!!multiSelect) {
249
- var existing = selected === null || selected === void 0 ? void 0 : selected.indexOf(value);
250
- if (existing > -1) {
251
- currentSelection = __spreadArray([], selected, true);
252
- currentSelection.splice(existing, 1);
253
- }
254
- else {
255
- currentSelection = __spreadArray(__spreadArray([], selected, true), [currentSelection], false);
256
- }
257
- }
258
- setSelected(currentSelection);
259
- props.onSelectionChange && props.onSelectionChange(currentSelection);
260
- }
261
- };
262
- /**
263
- * Function which is called when user clicks checkbox to select or deselect all rows.
264
- */
265
- var onSelectAllClick = function () {
266
- var currentList = currentPageRows.map(function (row) { return keyExpr ? row[keyExpr] : row; });
267
- switch (selectAllState) {
268
- case 'all':
269
- setSelected(__spreadArray([], selected, true).filter(function (item) { return !currentList.includes(item); }));
270
- setSelectAllState('none');
271
- break;
272
- case 'none':
273
- setSelected(__spreadArray(__spreadArray([], selected, true), currentList, true));
274
- setSelectAllState('all');
275
- break;
276
- case 'some':
277
- setSelected(__spreadArray(__spreadArray([], selected, true), currentList.filter(function (item) { return !selected.includes(item); }), true));
278
- setSelectAllState('all');
279
- break;
280
- }
281
- };
282
- /**
283
- * Return Table component.
284
- */
285
- return (React.createElement(TableWrapper, { className: props.border ? 'border' : undefined },
286
- React.createElement(TableHeader, __assign({}, props)),
287
- React.createElement(TableBody, __assign({}, props, { currentPageRows: currentPageRows, selected: selected, onRowClick: onRowClick, sortByColumn: sortTableColumn, onSelectAllClick: onSelectAllClick, sortProps: sort, selectAllState: selectAllState })),
288
- React.createElement(TableFooter, __assign({}, props, { onRowsPerPageChange: changeRowsPerPage, rowsPerPage: rowsPerPage, setIsCollapsed: setIsCollapsed, isCollapsed: isCollapsed, from: from, to: to, total: total, nextPage: nextPage, prevPage: previousPage })),
289
- showLoadingIndicator && (React.createElement(StyledTableSpinner, { zindex: loaderZIndex },
290
- React.createElement(LoadingIndicator, { size: Size.Medium })))));
291
- };
292
- export default Table;
21
+ */
22
+ import { StyledTableSpinner, TableWrapper } from './TableStyles';
23
+
24
+ /**
25
+ * Import custom types.
26
+ */
27
+
28
+ import { LoadingIndicator } from '../LoadingIndicator';
29
+ import TableHeader from './TableHeaders';
30
+ import TableFooter from './TableFooter';
31
+ import TableBody from './TableBody';
32
+ import { jsx as _jsx } from "react/jsx-runtime";
33
+ import { jsxs as _jsxs } from "react/jsx-runtime";
34
+ var Table = function Table(props) {
35
+ var onPreviousPageClick = props.onPreviousPageClick,
36
+ onNextPageClick = props.onNextPageClick,
37
+ onRowsPerPageChange = props.onRowsPerPageChange,
38
+ onTriggerSortingChange = props.onTriggerSortingChange,
39
+ columns = props.columns,
40
+ rows = props.rows,
41
+ remoteOperations = props.remoteOperations,
42
+ pagination = props.pagination,
43
+ showLoadingIndicator = props.showLoadingIndicator,
44
+ selectable = props.selectable,
45
+ multiSelect = props.multiSelect,
46
+ keyExpr = props.keyExpr,
47
+ sortProps = props.sortProps,
48
+ accordion = props.accordion,
49
+ _props$collapsed = props.collapsed,
50
+ collapsed = _props$collapsed === void 0 ? true : _props$collapsed,
51
+ collapsedRows = props.collapsedRows,
52
+ rowsPerPageLabel = props.rowsPerPageLabel,
53
+ loaderZIndex = props.loaderZIndex;
54
+
55
+ // States used within the component
56
+ var _React$useState = React.useState(10),
57
+ _React$useState2 = _slicedToArray(_React$useState, 2),
58
+ rowsPerPage = _React$useState2[0],
59
+ setRowsPerPage = _React$useState2[1];
60
+ var _React$useState3 = React.useState([]),
61
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
62
+ filteredRows = _React$useState4[0],
63
+ setFilteredRows = _React$useState4[1];
64
+ var _React$useState5 = React.useState([]),
65
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
66
+ currentPageRows = _React$useState6[0],
67
+ setCurrentPageRows = _React$useState6[1];
68
+ var _React$useState7 = React.useState(1),
69
+ _React$useState8 = _slicedToArray(_React$useState7, 2),
70
+ currentPage = _React$useState8[0],
71
+ setCurrentPage = _React$useState8[1];
72
+ var _React$useState9 = React.useState(),
73
+ _React$useState10 = _slicedToArray(_React$useState9, 2),
74
+ sort = _React$useState10[0],
75
+ setSort = _React$useState10[1];
76
+ var _React$useState11 = React.useState(),
77
+ _React$useState12 = _slicedToArray(_React$useState11, 2),
78
+ from = _React$useState12[0],
79
+ setFrom = _React$useState12[1];
80
+ var _React$useState13 = React.useState(),
81
+ _React$useState14 = _slicedToArray(_React$useState13, 2),
82
+ to = _React$useState14[0],
83
+ setTo = _React$useState14[1];
84
+ var _React$useState15 = React.useState(),
85
+ _React$useState16 = _slicedToArray(_React$useState15, 2),
86
+ total = _React$useState16[0],
87
+ setTotal = _React$useState16[1];
88
+ var _React$useState17 = React.useState(true),
89
+ _React$useState18 = _slicedToArray(_React$useState17, 2),
90
+ isCollapsed = _React$useState18[0],
91
+ setIsCollapsed = _React$useState18[1];
92
+ var _React$useState19 = React.useState('none'),
93
+ _React$useState20 = _slicedToArray(_React$useState19, 2),
94
+ selectAllState = _React$useState20[0],
95
+ setSelectAllState = _React$useState20[1];
96
+ var _React$useState21 = React.useState(multiSelect ? [] : undefined),
97
+ _React$useState22 = _slicedToArray(_React$useState21, 2),
98
+ selected = _React$useState22[0],
99
+ setSelected = _React$useState22[1];
100
+ React.useEffect(function () {
101
+ var _sortProps$column, _sortProps$direction;
102
+ setSort({
103
+ column: (_sortProps$column = sortProps === null || sortProps === void 0 ? void 0 : sortProps.column) !== null && _sortProps$column !== void 0 ? _sortProps$column : '',
104
+ direction: (_sortProps$direction = sortProps === null || sortProps === void 0 ? void 0 : sortProps.direction) !== null && _sortProps$direction !== void 0 ? _sortProps$direction : 'asc',
105
+ allowClearingSort: (sortProps === null || sortProps === void 0 ? void 0 : sortProps.allowClearingSort) === undefined ? true : sortProps.allowClearingSort
106
+ });
107
+ }, [sortProps]);
108
+ React.useEffect(function () {
109
+ setSelected(props.selectedRows || (multiSelect ? [] : undefined));
110
+ }, [props.selectedRows, multiSelect]);
111
+
112
+ /**
113
+ * update select all checkbox state
114
+ */
115
+ React.useEffect(function () {
116
+ if (multiSelect) {
117
+ var currentList = currentPageRows.map(function (row) {
118
+ return keyExpr ? row[keyExpr] : row;
119
+ });
120
+ var count = selected.filter(function (item) {
121
+ return currentList.includes(item);
122
+ }).length;
123
+ setSelectAllState(count === currentList.length ? 'all' : count > 0 ? 'some' : 'none');
124
+ }
125
+ }, [currentPageRows, multiSelect, selected, keyExpr]);
126
+
127
+ /**
128
+ * Takes care of remote pagination.
129
+ * Works only in case remote pagination is set to true.
130
+ */
131
+ React.useEffect(function () {
132
+ if (remoteOperations) {
133
+ setCurrentPageRows(rows);
134
+
135
+ // Let's assign pagination values
136
+ setFrom(pagination === null || pagination === void 0 ? void 0 : pagination.from);
137
+ setTo(pagination === null || pagination === void 0 ? void 0 : pagination.to);
138
+ setTotal(pagination === null || pagination === void 0 ? void 0 : pagination.total);
139
+ setCurrentPage(pagination === null || pagination === void 0 ? void 0 : pagination.currentPage);
140
+ setRowsPerPage(pagination === null || pagination === void 0 ? void 0 : pagination.rowsPerPage);
141
+ }
142
+ }, [remoteOperations, pagination, rows]);
143
+
144
+ /**
145
+ * Sets number of rows to display when accordion.
146
+ */
147
+ React.useEffect(function () {
148
+ if (!accordion) return;
149
+ setRowsPerPage(isCollapsed ? collapsedRows || 10 : rows.length);
150
+ }, [rows, accordion, collapsedRows, isCollapsed]);
151
+ React.useEffect(function () {
152
+ if (!accordion) return;
153
+ setIsCollapsed(!!collapsed);
154
+ }, [accordion, collapsed]);
155
+
156
+ /**
157
+ * Filters out a rows by specific column filters and sorts them if any sorting is set.
158
+ * @returns Filtered and sorted rows.
159
+ */
160
+ var filterAndSortRows = function filterAndSortRows() {
161
+ var tmpFilteredRows = rows.filter(function (row) {
162
+ // Let's start with matched filter criteria
163
+ var matchFilterCriteria = true;
164
+
165
+ // Let's go through columns
166
+ var _iterator = _createForOfIteratorHelper(columns),
167
+ _step;
168
+ try {
169
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
170
+ var column = _step.value;
171
+ // Let's check if filter value is specified for the column
172
+ // And if it doesn't match the current row column value
173
+ // Then let's update match filter criteria to failed
174
+ if (column.filterValue && row[column.key].toLowerCase().indexOf(column.filterValue.toLowerCase()) === -1) {
175
+ matchFilterCriteria = false;
176
+ }
177
+ }
178
+
179
+ // Let's return row only in case match filter criteria succeeds
180
+ } catch (err) {
181
+ _iterator.e(err);
182
+ } finally {
183
+ _iterator.f();
184
+ }
185
+ if (matchFilterCriteria) {
186
+ return row;
187
+ }
188
+ });
189
+
190
+ // Let's apply sorting if needed
191
+ if (!!(sort !== null && sort !== void 0 && sort.column) && !!(sort !== null && sort !== void 0 && sort.direction)) {
192
+ // Let's sort the rows
193
+ tmpFilteredRows.sort(function (a, b) {
194
+ if (a[sort.column] > b[sort.column]) {
195
+ return sort.direction === 'asc' ? 1 : -1;
196
+ } else if (a[sort.column] < b[sort.column]) {
197
+ return sort.direction === 'asc' ? -1 : 1;
198
+ } else {
199
+ return 0;
200
+ }
201
+ });
202
+ }
203
+
204
+ // Let's return filtered rows
205
+ return tmpFilteredRows;
206
+ };
207
+
208
+ /**
209
+ * Takes care of local pagination.
210
+ * Works only in case remote pagination is not defined or is set to false.
211
+ */
212
+ React.useEffect(function () {
213
+ if (!remoteOperations) {
214
+ // Let's retrieve temporary filtered rows and update globally filtered rows
215
+ var tmpFilteredRows = filterAndSortRows();
216
+ setFilteredRows(tmpFilteredRows);
217
+ setTotal(tmpFilteredRows.length);
218
+
219
+ // Assign rows from and rows to
220
+ var rowsFrom = (currentPage - 1) * rowsPerPage;
221
+ var rowsTo = rowsFrom + rowsPerPage >= tmpFilteredRows.length ? tmpFilteredRows.length : rowsFrom + rowsPerPage;
222
+
223
+ // Set from and to values
224
+ setFrom(rowsFrom + 1);
225
+ setTo(rowsTo);
226
+
227
+ // Filter out the rows
228
+ setCurrentPageRows(tmpFilteredRows.slice(rowsFrom, rowsTo));
229
+ }
230
+ }, [rowsPerPage, rows, currentPage, columns, sort, remoteOperations]);
231
+
232
+ /**
233
+ * Applies a specific sorting to a column.
234
+ * If no sorting exists, then applies ascending initially
235
+ * @param column - Column to which sorting should be applied.
236
+ */
237
+ var sortTableColumn = function sortTableColumn(column) {
238
+ var columnKey = '';
239
+ var sortDirection = undefined;
240
+ if ((sort === null || sort === void 0 ? void 0 : sort.column) !== column.key) {
241
+ columnKey = column.key;
242
+ sortDirection = 'asc';
243
+ } else {
244
+ if ((sort === null || sort === void 0 ? void 0 : sort.direction) === 'desc' && sort !== null && sort !== void 0 && sort.allowClearingSort) {
245
+ columnKey = '';
246
+ sortDirection = undefined;
247
+ } else {
248
+ columnKey = sort.column;
249
+ sortDirection = sort.direction === 'asc' ? 'desc' : 'asc';
250
+ }
251
+ }
252
+ if (columnKey == '') setSort({
253
+ column: '',
254
+ direction: 'asc',
255
+ allowClearingSort: sort === null || sort === void 0 ? void 0 : sort.allowClearingSort
256
+ });else setSort({
257
+ column: columnKey,
258
+ direction: sortDirection,
259
+ allowClearingSort: sort === null || sort === void 0 ? void 0 : sort.allowClearingSort
260
+ });
261
+ remoteOperations && onTriggerSortingChange && onTriggerSortingChange(columnKey, sortDirection);
262
+ };
263
+
264
+ /**
265
+ * Navigates user back to the previous page and updates the current table page.
266
+ */
267
+ var previousPage = function previousPage() {
268
+ if (remoteOperations) {
269
+ // Let's inform parent component about page change
270
+ if (onPreviousPageClick) {
271
+ onPreviousPageClick();
272
+ }
273
+ } else {
274
+ // Let's change the page within the component
275
+ setCurrentPage(currentPage > 1 ? currentPage - 1 : 1);
276
+ }
277
+ };
278
+
279
+ /**
280
+ * Navigates user to the next page and updates the current table page.
281
+ */
282
+ var nextPage = function nextPage() {
283
+ if (remoteOperations) {
284
+ // Let's inform parent component about page change
285
+ if (onNextPageClick) {
286
+ onNextPageClick();
287
+ }
288
+ } else {
289
+ // Let's change the page within the component
290
+ setCurrentPage(currentPage * rowsPerPage >= filteredRows.length ? currentPage : currentPage + 1);
291
+ }
292
+ };
293
+
294
+ /**
295
+ * Updates the rows per page value and refreshes the table content accordingly.
296
+ * @param value - Newly selected rows per page value.
297
+ */
298
+ var changeRowsPerPage = function changeRowsPerPage(value) {
299
+ // Let's check if we are using remote pagination
300
+ if (remoteOperations) {
301
+ // Inform parent component about rows per page change
302
+ if (onRowsPerPageChange) {
303
+ onRowsPerPageChange(value);
304
+ }
305
+ } else {
306
+ // Let's reset current page to 1
307
+ setCurrentPage(1);
308
+ }
309
+
310
+ // Let's set rows per page
311
+ setRowsPerPage(value);
312
+ };
313
+
314
+ /**
315
+ * Function which is called when a mouse click happens on a row to pass data to the parent component.
316
+ * @param row - Row in which the link is located.
317
+ */
318
+ var onRowClick = function onRowClick(row) {
319
+ var _window, _window$getSelection;
320
+ var selectedText = (_window = window) === null || _window === void 0 ? void 0 : (_window$getSelection = _window.getSelection()) === null || _window$getSelection === void 0 ? void 0 : _window$getSelection.toString();
321
+ if ((selectedText === null || selectedText === void 0 ? void 0 : selectedText.length) === 0 && selectable) {
322
+ var value = keyExpr ? row[keyExpr] : row;
323
+ var currentSelection = value;
324
+ if (!!multiSelect) {
325
+ var existing = selected === null || selected === void 0 ? void 0 : selected.indexOf(value);
326
+ if (existing > -1) {
327
+ currentSelection = _toConsumableArray(selected);
328
+ currentSelection.splice(existing, 1);
329
+ } else {
330
+ currentSelection = [].concat(_toConsumableArray(selected), [currentSelection]);
331
+ }
332
+ }
333
+ setSelected(currentSelection);
334
+ props.onSelectionChange && props.onSelectionChange(currentSelection);
335
+ }
336
+ };
337
+
338
+ /**
339
+ * Function which is called when user clicks checkbox to select or deselect all rows.
340
+ */
341
+ var onSelectAllClick = function onSelectAllClick() {
342
+ var currentList = currentPageRows.map(function (row) {
343
+ return keyExpr ? row[keyExpr] : row;
344
+ });
345
+ switch (selectAllState) {
346
+ case 'all':
347
+ setSelected(_toConsumableArray(selected).filter(function (item) {
348
+ return !currentList.includes(item);
349
+ }));
350
+ setSelectAllState('none');
351
+ break;
352
+ case 'none':
353
+ setSelected([].concat(_toConsumableArray(selected), _toConsumableArray(currentList)));
354
+ setSelectAllState('all');
355
+ break;
356
+ case 'some':
357
+ setSelected([].concat(_toConsumableArray(selected), _toConsumableArray(currentList.filter(function (item) {
358
+ return !selected.includes(item);
359
+ }))));
360
+ setSelectAllState('all');
361
+ break;
362
+ }
363
+ };
364
+
365
+ /**
366
+ * Return Table component.
367
+ */
368
+ return /*#__PURE__*/_jsxs(TableWrapper, {
369
+ className: props.border ? 'border' : undefined,
370
+ children: [/*#__PURE__*/_jsx(TableHeader, _objectSpread({}, props)), /*#__PURE__*/_jsx(TableBody, _objectSpread(_objectSpread({}, props), {}, {
371
+ currentPageRows: currentPageRows,
372
+ selected: selected,
373
+ onRowClick: onRowClick,
374
+ sortByColumn: sortTableColumn,
375
+ onSelectAllClick: onSelectAllClick,
376
+ sortProps: sort,
377
+ selectAllState: selectAllState
378
+ })), /*#__PURE__*/_jsx(TableFooter, _objectSpread(_objectSpread({}, props), {}, {
379
+ onRowsPerPageChange: changeRowsPerPage,
380
+ rowsPerPage: rowsPerPage,
381
+ setIsCollapsed: setIsCollapsed,
382
+ isCollapsed: isCollapsed,
383
+ from: from,
384
+ to: to,
385
+ total: total,
386
+ nextPage: nextPage,
387
+ prevPage: previousPage
388
+ })), showLoadingIndicator && /*#__PURE__*/_jsx(StyledTableSpinner, {
389
+ zindex: loaderZIndex,
390
+ children: /*#__PURE__*/_jsx(LoadingIndicator, {
391
+ size: Size.Medium
392
+ })
393
+ })]
394
+ });
395
+ };
396
+ export default Table;
397
+ //# sourceMappingURL=Table.js.map