studiokit-scaffolding-js 7.0.12 → 7.1.0

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 (390) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +137 -137
  3. package/lib/components/ActionList.d.ts +2 -2
  4. package/lib/components/ActionList.js +166 -87
  5. package/lib/components/AlertDialog.d.ts +3 -3
  6. package/lib/components/AlertDialog.js +133 -18
  7. package/lib/components/AlertWithIcon.js +93 -52
  8. package/lib/components/ConnectedModal.d.ts +1 -2
  9. package/lib/components/ConnectedModal.js +43 -37
  10. package/lib/components/Dropdowns/GroupsDropdown.d.ts +4 -4
  11. package/lib/components/Dropdowns/GroupsDropdown.js +69 -82
  12. package/lib/components/Dropdowns/ManagedNavDropdown.d.ts +2 -2
  13. package/lib/components/Dropdowns/ManagedNavDropdown.js +99 -111
  14. package/lib/components/Dropdowns/UserDropdown.js +109 -70
  15. package/lib/components/Dropdowns/index.js +27 -11
  16. package/lib/components/EntityOwnerList.d.ts +3 -3
  17. package/lib/components/EntityOwnerList.js +52 -60
  18. package/lib/components/Error.js +107 -27
  19. package/lib/components/ErrorBoundary.js +133 -94
  20. package/lib/components/ErrorMessage.d.ts +2 -2
  21. package/lib/components/ErrorMessage.js +44 -14
  22. package/lib/components/Forms/DateField.d.ts +2 -2
  23. package/lib/components/Forms/DateField.js +63 -95
  24. package/lib/components/Forms/TimeField.d.ts +2 -2
  25. package/lib/components/Forms/TimeField.js +84 -108
  26. package/lib/components/Forms/index.js +27 -13
  27. package/lib/components/Groups/CreateEditCopySaveButtons.d.ts +2 -2
  28. package/lib/components/Groups/CreateEditCopySaveButtons.js +102 -14
  29. package/lib/components/Groups/ExternalGroups/Attach.d.ts +6 -7
  30. package/lib/components/Groups/ExternalGroups/Attach.js +213 -188
  31. package/lib/components/Groups/ExternalGroups/Table.js +183 -76
  32. package/lib/components/Groups/GroupCreateOrEditCommonProps.js +5 -1
  33. package/lib/components/Groups/RosterSyncInfo.js +140 -49
  34. package/lib/components/HOC/AccessibleAppComponent.d.ts +2 -2
  35. package/lib/components/HOC/AccessibleAppComponent.js +101 -124
  36. package/lib/components/HOC/ActivityRequiredComponent.d.ts +14 -14
  37. package/lib/components/HOC/ActivityRequiredComponent.js +93 -107
  38. package/lib/components/HOC/AsyncComponent.d.ts +9 -9
  39. package/lib/components/HOC/AsyncComponent.js +53 -129
  40. package/lib/components/HOC/AuthenticatedComponent.d.ts +4 -4
  41. package/lib/components/HOC/AuthenticatedComponent.js +59 -96
  42. package/lib/components/HOC/CollectionComponent.d.ts +12 -12
  43. package/lib/components/HOC/CollectionComponent.js +171 -171
  44. package/lib/components/HOC/CollectionFirstItemComponent.d.ts +13 -13
  45. package/lib/components/HOC/CollectionFirstItemComponent.js +52 -94
  46. package/lib/components/HOC/CollectionItemComponent.d.ts +9 -9
  47. package/lib/components/HOC/CollectionItemComponent.js +169 -168
  48. package/lib/components/HOC/ConnectedModalComponent.d.ts +9 -9
  49. package/lib/components/HOC/ConnectedModalComponent.js +110 -140
  50. package/lib/components/HOC/DataDependentComponent.d.ts +3 -55
  51. package/lib/components/HOC/DataDependentComponent.js +30 -79
  52. package/lib/components/HOC/EntityComponent.d.ts +13 -13
  53. package/lib/components/HOC/EntityComponent.js +74 -112
  54. package/lib/components/HOC/FullscreenModalComponent.d.ts +9 -9
  55. package/lib/components/HOC/FullscreenModalComponent.js +165 -185
  56. package/lib/components/HOC/GroupActivityRequiredComponent.d.ts +2 -2
  57. package/lib/components/HOC/GroupActivityRequiredComponent.js +48 -47
  58. package/lib/components/HOC/GuidComponent.d.ts +1 -1
  59. package/lib/components/HOC/GuidComponent.js +29 -68
  60. package/lib/components/HOC/ModelContextDependencyVerifyComponent.d.ts +28 -29
  61. package/lib/components/HOC/ModelContextDependencyVerifyComponent.js +42 -65
  62. package/lib/components/HOC/ModelErrorRedirectComponent.d.ts +10 -10
  63. package/lib/components/HOC/ModelErrorRedirectComponent.js +51 -94
  64. package/lib/components/HOC/SearchPersistorComponent.d.ts +4 -4
  65. package/lib/components/HOC/SearchPersistorComponent.js +243 -216
  66. package/lib/components/HOC/UnauthenticatedComponent.d.ts +12 -12
  67. package/lib/components/HOC/UnauthenticatedComponent.js +37 -82
  68. package/lib/components/HOC/UserComponent.d.ts +1 -1
  69. package/lib/components/HOC/UserComponent.js +12 -11
  70. package/lib/components/Icons/IconAlphaList.js +34 -20
  71. package/lib/components/Icons/IconExternalUser.js +34 -20
  72. package/lib/components/Icons/IconImpersonation.js +34 -20
  73. package/lib/components/Icons/IconStopImpersonating.js +34 -20
  74. package/lib/components/Icons/IconTable.js +35 -21
  75. package/lib/components/Icons/IconTableDeleteCol.js +34 -20
  76. package/lib/components/Icons/IconTableDeleteRow.js +34 -20
  77. package/lib/components/Icons/IconTableInsertCol.js +34 -20
  78. package/lib/components/Icons/IconTableInsertRow.js +34 -20
  79. package/lib/components/Impersonation/Button.d.ts +2 -2
  80. package/lib/components/Impersonation/Button.js +76 -56
  81. package/lib/components/Impersonation/Link.d.ts +2 -2
  82. package/lib/components/Impersonation/Link.js +76 -53
  83. package/lib/components/Impersonation/UserDetail.css +22 -22
  84. package/lib/components/Impersonation/UserDetail.d.ts +2 -2
  85. package/lib/components/Impersonation/UserDetail.js +66 -17
  86. package/lib/components/Loading.js +27 -21
  87. package/lib/components/LockDownBrowser/Check.js +194 -107
  88. package/lib/components/LockDownBrowser/ExitButton.js +27 -14
  89. package/lib/components/LockDownBrowser/Launch.js +70 -85
  90. package/lib/components/Lti/Confirm.js +152 -33
  91. package/lib/components/Lti/CreateNonLtiGroupAlertDialog.d.ts +4 -2
  92. package/lib/components/Lti/CreateNonLtiGroupAlertDialog.js +170 -78
  93. package/lib/components/Lti/Launch.js +105 -49
  94. package/lib/components/Lti/LaunchGroup.js +85 -39
  95. package/lib/components/ManageTable.d.ts +1 -2
  96. package/lib/components/ManageTable.js +309 -104
  97. package/lib/components/ManageTableNoDataComponent.js +42 -22
  98. package/lib/components/NewVersionAlert.d.ts +2 -2
  99. package/lib/components/NewVersionAlert.js +82 -91
  100. package/lib/components/NotFound.js +87 -28
  101. package/lib/components/Notifications.d.ts +4 -4
  102. package/lib/components/Notifications.js +187 -169
  103. package/lib/components/PaginationNextButton.js +33 -21
  104. package/lib/components/PaginationPreviousButton.js +33 -21
  105. package/lib/components/Quill/CustomToolbar.d.ts +2 -2
  106. package/lib/components/Quill/CustomToolbar.js +432 -257
  107. package/lib/components/Quill/Formats/Image.d.ts +10 -25
  108. package/lib/components/Quill/Formats/Image.js +80 -86
  109. package/lib/components/Quill/Formats/List.d.ts +6 -3
  110. package/lib/components/Quill/Formats/List.js +52 -74
  111. package/lib/components/Quill/Formats/Video.d.ts +2 -1
  112. package/lib/components/Quill/Formats/Video.js +31 -45
  113. package/lib/components/Quill/ImageDropModule.d.ts +1 -1
  114. package/lib/components/Quill/ImageDropModule.js +149 -122
  115. package/lib/components/Quill/ImageWarning.d.ts +2 -2
  116. package/lib/components/Quill/ImageWarning.js +45 -32
  117. package/lib/components/Quill/ImageWithAltTextModal.d.ts +0 -1
  118. package/lib/components/Quill/ImageWithAltTextModal.js +425 -141
  119. package/lib/components/Quill/Specs/CustomImageSpec.d.ts +1 -1
  120. package/lib/components/Quill/Specs/CustomImageSpec.js +43 -51
  121. package/lib/components/Quill/Specs/CustomVideoSpec.d.ts +1 -1
  122. package/lib/components/Quill/Specs/CustomVideoSpec.js +35 -44
  123. package/lib/components/Quill/TableModule/Blots/BaseTableBlot.d.ts +2 -1
  124. package/lib/components/Quill/TableModule/Blots/BaseTableBlot.js +105 -121
  125. package/lib/components/Quill/TableModule/Blots/TableBlot.js +53 -66
  126. package/lib/components/Quill/TableModule/Blots/TableBodyBlot.js +54 -67
  127. package/lib/components/Quill/TableModule/Blots/TableCellBlot.d.ts +1 -1
  128. package/lib/components/Quill/TableModule/Blots/TableCellBlot.js +225 -241
  129. package/lib/components/Quill/TableModule/Blots/TableContainer.js +82 -99
  130. package/lib/components/Quill/TableModule/Blots/TableRowBlot.js +76 -87
  131. package/lib/components/Quill/TableModule/constants.js +45 -41
  132. package/lib/components/Quill/TableModule/index.css +171 -171
  133. package/lib/components/Quill/TableModule/index.d.ts +14 -5
  134. package/lib/components/Quill/TableModule/index.js +373 -313
  135. package/lib/components/Quill/TableModule/utils.js +45 -45
  136. package/lib/components/Quill/accessibilityFix.d.ts +0 -1
  137. package/lib/components/Quill/accessibilityFix.js +235 -251
  138. package/lib/components/Quill/index.js +36 -32
  139. package/lib/components/RefreshIndicator/Bordered.js +48 -32
  140. package/lib/components/RefreshIndicator/Inline.js +48 -33
  141. package/lib/components/RefreshIndicator/index.d.ts +2 -2
  142. package/lib/components/RefreshIndicator/index.js +263 -113
  143. package/lib/components/SearchControls.js +216 -31
  144. package/lib/components/SentryRoute.js +10 -23
  145. package/lib/components/Tables/RoleFilter.d.ts +3 -4
  146. package/lib/components/Tables/RoleFilter.js +71 -46
  147. package/lib/components/Tables/TextFilter.d.ts +2 -3
  148. package/lib/components/Tables/TextFilter.js +62 -20
  149. package/lib/components/UserRoles/Add.d.ts +3 -3
  150. package/lib/components/UserRoles/Add.js +199 -161
  151. package/lib/components/UserRoles/Context.js +11 -9
  152. package/lib/components/UserRoles/RoleCell.js +180 -100
  153. package/lib/components/UserRoles/Select.js +157 -51
  154. package/lib/components/UserRoles/Table.js +221 -102
  155. package/lib/components/UserRoles/index.d.ts +6 -6
  156. package/lib/components/UserRoles/index.js +537 -466
  157. package/lib/config/eslint/index.d.ts +2 -0
  158. package/lib/config/eslint/index.js +36 -0
  159. package/lib/config/eslint/lib/order.d.ts +3 -0
  160. package/lib/config/eslint/lib/order.js +30 -0
  161. package/lib/config/eslint/lib/prettier.d.ts +3 -0
  162. package/lib/config/eslint/lib/prettier.js +23 -0
  163. package/lib/config/eslint/lib/typescript.d.ts +2 -0
  164. package/lib/config/eslint/lib/typescript.js +98 -0
  165. package/lib/config/eslint/react.d.ts +2 -0
  166. package/lib/config/eslint/react.js +30 -0
  167. package/lib/constants/baseActivity.js +30 -26
  168. package/lib/constants/baseRole.js +14 -10
  169. package/lib/constants/configuration.d.ts +1 -1
  170. package/lib/constants/configuration.js +43 -39
  171. package/lib/constants/externalProviderType.js +10 -6
  172. package/lib/constants/fetchErrorData.js +15 -11
  173. package/lib/constants/index.js +137 -23
  174. package/lib/constants/lockDownBrowser.js +28 -24
  175. package/lib/constants/mockData.d.ts +4 -6
  176. package/lib/constants/mockData.js +385 -326
  177. package/lib/constants/modelStatus.js +15 -11
  178. package/lib/constants/notificationType.js +12 -8
  179. package/lib/constants/operatingSystem.js +12 -8
  180. package/lib/constants/shard.js +11 -7
  181. package/lib/constants/table.js +21 -21
  182. package/lib/constants/tier.js +12 -8
  183. package/lib/constants/userRole.d.ts +1 -2
  184. package/lib/constants/userRole.js +15 -17
  185. package/lib/css/base/_base.css +98 -98
  186. package/lib/css/base/_typography.css +130 -130
  187. package/lib/css/components/_alert.css +86 -86
  188. package/lib/css/components/_bootstrap-grid.css +28 -28
  189. package/lib/css/components/_buttons.css +397 -397
  190. package/lib/css/components/_forms.css +101 -101
  191. package/lib/css/components/_menu.css +56 -56
  192. package/lib/css/components/_modals.css +46 -46
  193. package/lib/css/components/_quill.css +315 -315
  194. package/lib/css/components/_tables.css +497 -497
  195. package/lib/css/components/_tags.css +12 -12
  196. package/lib/css/index-with-variables.css +15 -15
  197. package/lib/css/index.css +14 -14
  198. package/lib/css/utils/_border.css +463 -463
  199. package/lib/css/utils/_color.css +317 -317
  200. package/lib/css/utils/_display.css +305 -312
  201. package/lib/css/utils/_general.css +48 -48
  202. package/lib/css/utils/_icon.css +16 -16
  203. package/lib/css/utils/_text.css +25 -24
  204. package/lib/css/utils/_width.css +60 -60
  205. package/lib/css/variables.css +84 -84
  206. package/lib/endpointMappings.js +197 -193
  207. package/lib/hooks/useCollection.js +83 -65
  208. package/lib/hooks/useCollectionConfiguration.d.ts +0 -1
  209. package/lib/hooks/useCollectionConfiguration.js +185 -88
  210. package/lib/hooks/useCollectionItem.js +155 -58
  211. package/lib/hooks/useEventCalback.d.ts +14 -0
  212. package/lib/hooks/useEventCalback.js +51 -0
  213. package/lib/hooks/useGuid.js +21 -10
  214. package/lib/hooks/usePrevious.d.ts +24 -1
  215. package/lib/hooks/usePrevious.js +84 -14
  216. package/lib/index.js +156 -36
  217. package/lib/redux/actionCreator.d.ts +6 -6
  218. package/lib/redux/actionCreator.js +51 -40
  219. package/lib/redux/actions/AuthAction.js +44 -31
  220. package/lib/redux/actions/ModalAction.d.ts +1 -1
  221. package/lib/redux/actions/ModalAction.js +10 -6
  222. package/lib/redux/actions/ModelAction.d.ts +1 -1
  223. package/lib/redux/actions/ModelAction.js +77 -49
  224. package/lib/redux/actions/NotificationAction.js +10 -6
  225. package/lib/redux/actions/SearchAction.js +9 -5
  226. package/lib/redux/actions/index.js +60 -16
  227. package/lib/redux/configureReducers.d.ts +2 -5
  228. package/lib/redux/configureReducers.js +67 -78
  229. package/lib/redux/configureStore.d.ts +2 -2
  230. package/lib/redux/configureStore.js +83 -115
  231. package/lib/redux/helpers.js +7 -2
  232. package/lib/redux/reducers/authReducer.js +52 -46
  233. package/lib/redux/reducers/index.js +41 -15
  234. package/lib/redux/reducers/modalsReducer.js +49 -52
  235. package/lib/redux/reducers/modelsReducer.d.ts +2 -2
  236. package/lib/redux/reducers/modelsReducer.js +183 -182
  237. package/lib/redux/reducers/notificationsReducer.js +26 -21
  238. package/lib/redux/reducers/searchReducer.js +26 -20
  239. package/lib/redux/sagas/appInsightsSaga.js +24 -62
  240. package/lib/redux/sagas/authSaga.js +287 -414
  241. package/lib/redux/sagas/caliperSaga.js +169 -263
  242. package/lib/redux/sagas/clockOffsetSaga.js +36 -77
  243. package/lib/redux/sagas/configurationSaga.js +13 -46
  244. package/lib/redux/sagas/downtimeApiErrorSaga.d.ts +0 -1
  245. package/lib/redux/sagas/downtimeApiErrorSaga.js +23 -64
  246. package/lib/redux/sagas/errorSaga.d.ts +0 -1
  247. package/lib/redux/sagas/errorSaga.js +29 -63
  248. package/lib/redux/sagas/googleAnalyticsSaga.js +29 -69
  249. package/lib/redux/sagas/identityProviderSaga.js +24 -69
  250. package/lib/redux/sagas/initialDataLoadSaga.js +38 -29
  251. package/lib/redux/sagas/lockDownBrowserErrorSaga.d.ts +0 -1
  252. package/lib/redux/sagas/lockDownBrowserErrorSaga.js +32 -81
  253. package/lib/redux/sagas/modelFetchSaga.js +379 -459
  254. package/lib/redux/sagas/noStoreSaga.d.ts +1 -1
  255. package/lib/redux/sagas/noStoreSaga.js +68 -101
  256. package/lib/redux/sagas/postLoginDataSaga.js +47 -79
  257. package/lib/redux/sagas/postLoginRedirectSaga.js +30 -71
  258. package/lib/redux/sagas/rootSaga.js +85 -137
  259. package/lib/redux/sagas/sentrySaga.js +29 -85
  260. package/lib/redux/sagas/userIdSaga.js +18 -54
  261. package/lib/services/codeProviderService.js +25 -29
  262. package/lib/services/dateService.js +14 -12
  263. package/lib/services/documentService.js +18 -13
  264. package/lib/services/fetchService.js +134 -168
  265. package/lib/services/persistenceService.d.ts +4 -4
  266. package/lib/services/persistenceService.js +45 -43
  267. package/lib/services/ticketProviderService.js +29 -33
  268. package/lib/services/tokenPersistenceService.js +13 -9
  269. package/lib/services/windowService.js +21 -17
  270. package/lib/startup.d.ts +1 -1
  271. package/lib/startup.js +132 -135
  272. package/lib/types/AppConfiguration.js +5 -1
  273. package/lib/types/Artifact.js +11 -7
  274. package/lib/types/BaseReduxState.js +5 -1
  275. package/lib/types/Client.js +5 -1
  276. package/lib/types/Collection.d.ts +3 -3
  277. package/lib/types/Collection.js +5 -1
  278. package/lib/types/Configuration.js +5 -1
  279. package/lib/types/DeepLinkingResponseRequest.js +5 -1
  280. package/lib/types/DeletableModel.js +5 -1
  281. package/lib/types/Event.js +5 -1
  282. package/lib/types/ExternalGroup.js +5 -1
  283. package/lib/types/ExternalProvider.js +5 -1
  284. package/lib/types/ExternalTerm.js +5 -1
  285. package/lib/types/Group.js +5 -1
  286. package/lib/types/IdentityProvider.js +5 -1
  287. package/lib/types/LtiLaunch.js +5 -1
  288. package/lib/types/NameOnlyEntity.js +5 -1
  289. package/lib/types/Notification.d.ts +2 -2
  290. package/lib/types/Notification.js +5 -1
  291. package/lib/types/OptionalRecord.d.ts +1 -1
  292. package/lib/types/OptionalRecord.js +5 -1
  293. package/lib/types/OwnerSchedule.d.ts +3 -1
  294. package/lib/types/OwnerSchedule.js +5 -1
  295. package/lib/types/PropertyOfType.d.ts +3 -3
  296. package/lib/types/PropertyOfType.js +5 -1
  297. package/lib/types/Quill.js +5 -1
  298. package/lib/types/RoleDescription.d.ts +0 -1
  299. package/lib/types/RoleDescription.js +5 -1
  300. package/lib/types/Search.js +5 -1
  301. package/lib/types/SimpleLocation.js +5 -1
  302. package/lib/types/UniTime.js +5 -1
  303. package/lib/types/User.js +5 -1
  304. package/lib/types/UserRole.js +5 -1
  305. package/lib/types/auth/AuthState.js +5 -1
  306. package/lib/types/auth/CasV1LoginRequestBody.js +5 -1
  307. package/lib/types/auth/ClientCredentials.js +5 -1
  308. package/lib/types/auth/CodeProviderService.js +5 -1
  309. package/lib/types/auth/LocalLoginRequestBody.js +5 -1
  310. package/lib/types/auth/TicketProviderService.js +5 -1
  311. package/lib/types/auth/TokenPersistenceService.js +5 -1
  312. package/lib/types/auth/index.js +82 -18
  313. package/lib/types/externals.d.js +2 -0
  314. package/lib/types/index.js +313 -39
  315. package/lib/types/net/EndpointConfig.js +5 -1
  316. package/lib/types/net/EndpointMapping.js +5 -1
  317. package/lib/types/net/EndpointMappings.js +5 -1
  318. package/lib/types/net/ErrorHandler.d.ts +1 -1
  319. package/lib/types/net/ErrorHandler.js +5 -1
  320. package/lib/types/net/FetchConfig.d.ts +1 -1
  321. package/lib/types/net/FetchConfig.js +5 -1
  322. package/lib/types/net/FetchErrorData.js +10 -6
  323. package/lib/types/net/FetchResult.d.ts +2 -2
  324. package/lib/types/net/FetchResult.js +5 -1
  325. package/lib/types/net/HTTPMethod.d.ts +1 -1
  326. package/lib/types/net/HTTPMethod.js +5 -1
  327. package/lib/types/net/HTTPStatusCode.js +16 -12
  328. package/lib/types/net/Metadata.js +5 -1
  329. package/lib/types/net/Model.js +5 -1
  330. package/lib/types/net/ModelCollection.js +5 -1
  331. package/lib/types/net/ModelsState.js +5 -1
  332. package/lib/types/net/OAuthToken.js +5 -1
  333. package/lib/types/net/OAuthTokenOrNull.d.ts +1 -1
  334. package/lib/types/net/OAuthTokenOrNull.js +5 -1
  335. package/lib/types/net/TokenAccessFunction.d.ts +1 -1
  336. package/lib/types/net/TokenAccessFunction.js +5 -1
  337. package/lib/types/net/index.js +181 -27
  338. package/lib/utils/baseActivity.d.ts +2 -2
  339. package/lib/utils/baseActivity.js +138 -136
  340. package/lib/utils/baseRole.js +37 -33
  341. package/lib/utils/collection.js +432 -310
  342. package/lib/utils/cookies.js +22 -37
  343. package/lib/utils/date.js +320 -320
  344. package/lib/utils/dom.js +186 -174
  345. package/lib/utils/domainIdentifier.js +9 -9
  346. package/lib/utils/entityUserRole.js +6 -2
  347. package/lib/utils/error.d.ts +1 -1
  348. package/lib/utils/error.js +18 -16
  349. package/lib/utils/events.js +40 -33
  350. package/lib/utils/externalGroup.js +25 -21
  351. package/lib/utils/externalProviders.js +8 -4
  352. package/lib/utils/externalTerms.js +9 -6
  353. package/lib/utils/fetch.d.ts +1 -1
  354. package/lib/utils/fetch.js +188 -185
  355. package/lib/utils/group.js +17 -9
  356. package/lib/utils/groupDates.d.ts +1 -1
  357. package/lib/utils/groupDates.js +43 -39
  358. package/lib/utils/groupRoles.js +28 -28
  359. package/lib/utils/lockDownBrowser.js +16 -12
  360. package/lib/utils/logger.js +30 -25
  361. package/lib/utils/lti.js +10 -5
  362. package/lib/utils/model.d.ts +2 -2
  363. package/lib/utils/model.js +39 -48
  364. package/lib/utils/number.js +23 -26
  365. package/lib/utils/promise.d.ts +6 -1
  366. package/lib/utils/promise.js +34 -15
  367. package/lib/utils/quill.js +66 -77
  368. package/lib/utils/route.d.ts +2 -2
  369. package/lib/utils/route.js +61 -60
  370. package/lib/utils/search.d.ts +1 -1
  371. package/lib/utils/search.js +78 -85
  372. package/lib/utils/shard.js +38 -41
  373. package/lib/utils/sort.d.ts +3 -3
  374. package/lib/utils/sort.js +62 -58
  375. package/lib/utils/string.js +14 -10
  376. package/lib/utils/table.d.ts +3 -3
  377. package/lib/utils/table.js +39 -36
  378. package/lib/utils/timezone.js +12 -26
  379. package/lib/utils/url.d.ts +2 -1
  380. package/lib/utils/url.js +146 -200
  381. package/lib/utils/user.js +59 -61
  382. package/lib/utils/userAgent.js +11 -11
  383. package/lib/utils/userRole.d.ts +3 -3
  384. package/lib/utils/userRole.js +58 -56
  385. package/package.json +224 -207
  386. package/lib/config/eslint/index.cjs +0 -21
  387. package/lib/config/eslint/lib/order.cjs +0 -22
  388. package/lib/config/eslint/lib/prettier.cjs +0 -18
  389. package/lib/config/eslint/lib/typescript.cjs +0 -86
  390. package/lib/config/eslint/react.cjs +0 -9
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { ComponentType } from 'react';
3
2
  import { RouteComponentProps } from 'react-router';
4
3
  import { Model } from '../../types';
@@ -7,21 +6,21 @@ export interface ModelContextDependencyVerifyComponentProps {
7
6
  }
8
7
  export declare function setupModelContextDependencyVerifyComponent<TOwnProps extends ModelContextDependencyVerifyComponentProps>(WrappedComponent: ComponentType<TOwnProps>, modelName: string, dependentModelName: string): {
9
8
  new (props: (TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>) | Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>): {
10
- render(): React.JSX.Element;
9
+ render(): import("react/jsx-runtime").JSX.Element;
11
10
  context: any;
12
11
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
13
12
  forceUpdate(callback?: (() => void) | undefined): void;
14
13
  readonly props: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>> & Readonly<{
15
- children?: React.ReactNode;
14
+ children?: import("react").ReactNode | undefined;
16
15
  }>;
17
16
  state: Readonly<{}>;
18
17
  refs: {
19
- [key: string]: React.ReactInstance;
18
+ [key: string]: import("react").ReactInstance;
20
19
  };
21
20
  componentDidMount?(): void;
22
21
  shouldComponentUpdate?(nextProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, nextState: Readonly<{}>, nextContext: any): boolean;
23
22
  componentWillUnmount?(): void;
24
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
23
+ componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
25
24
  getSnapshotBeforeUpdate?(prevProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, prevState: Readonly<{}>): any;
26
25
  componentDidUpdate?(prevProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, prevState: Readonly<{}>, snapshot?: any): void;
27
26
  componentWillMount?(): void;
@@ -32,21 +31,21 @@ export declare function setupModelContextDependencyVerifyComponent<TOwnProps ext
32
31
  UNSAFE_componentWillUpdate?(nextProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, nextState: Readonly<{}>, nextContext: any): void;
33
32
  };
34
33
  new (props: TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>, context: any): {
35
- render(): React.JSX.Element;
34
+ render(): import("react/jsx-runtime").JSX.Element;
36
35
  context: any;
37
36
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
38
37
  forceUpdate(callback?: (() => void) | undefined): void;
39
38
  readonly props: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>> & Readonly<{
40
- children?: React.ReactNode;
39
+ children?: import("react").ReactNode | undefined;
41
40
  }>;
42
41
  state: Readonly<{}>;
43
42
  refs: {
44
- [key: string]: React.ReactInstance;
43
+ [key: string]: import("react").ReactInstance;
45
44
  };
46
45
  componentDidMount?(): void;
47
46
  shouldComponentUpdate?(nextProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, nextState: Readonly<{}>, nextContext: any): boolean;
48
47
  componentWillUnmount?(): void;
49
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
48
+ componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
50
49
  getSnapshotBeforeUpdate?(prevProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, prevState: Readonly<{}>): any;
51
50
  componentDidUpdate?(prevProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, prevState: Readonly<{}>, snapshot?: any): void;
52
51
  componentWillMount?(): void;
@@ -56,7 +55,7 @@ export declare function setupModelContextDependencyVerifyComponent<TOwnProps ext
56
55
  componentWillUpdate?(nextProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, nextState: Readonly<{}>, nextContext: any): void;
57
56
  UNSAFE_componentWillUpdate?(nextProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, nextState: Readonly<{}>, nextContext: any): void;
58
57
  };
59
- contextType?: React.Context<any> | undefined;
58
+ contextType?: import("react").Context<any> | undefined;
60
59
  };
61
60
  /**
62
61
  * HOC that checks if the depender component is related to the dependee component.
@@ -65,23 +64,23 @@ export declare function setupModelContextDependencyVerifyComponent<TOwnProps ext
65
64
  * @param {string} modelName The modelName of the dependent component itself.
66
65
  * @param {string} dependentModelName The modelName that the dependent component depends on.
67
66
  */
68
- export default function modelContextDependencyVerifyComponent<TOwnProps extends ModelContextDependencyVerifyComponentProps>(WrappedComponent: ComponentType<TOwnProps>, modelName: string, dependentModelName: string): React.ComponentClass<import("react-router").Omit<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>, "match" | "location" | "history" | "staticContext"> & import("react-router").WithRouterProps<{
67
+ export default function modelContextDependencyVerifyComponent<TOwnProps extends ModelContextDependencyVerifyComponentProps>(WrappedComponent: ComponentType<TOwnProps>, modelName: string, dependentModelName: string): import("react").ComponentClass<import("react-router").Omit<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>, keyof RouteComponentProps<any, import("react-router").StaticContext, unknown>> & import("react-router").WithRouterProps<{
69
68
  new (props: (TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>) | Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>): {
70
- render(): React.JSX.Element;
69
+ render(): import("react/jsx-runtime").JSX.Element;
71
70
  context: any;
72
71
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
73
72
  forceUpdate(callback?: (() => void) | undefined): void;
74
73
  readonly props: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>> & Readonly<{
75
- children?: React.ReactNode;
74
+ children?: import("react").ReactNode | undefined;
76
75
  }>;
77
76
  state: Readonly<{}>;
78
77
  refs: {
79
- [key: string]: React.ReactInstance;
78
+ [key: string]: import("react").ReactInstance;
80
79
  };
81
80
  componentDidMount?(): void;
82
81
  shouldComponentUpdate?(nextProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, nextState: Readonly<{}>, nextContext: any): boolean;
83
82
  componentWillUnmount?(): void;
84
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
83
+ componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
85
84
  getSnapshotBeforeUpdate?(prevProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, prevState: Readonly<{}>): any;
86
85
  componentDidUpdate?(prevProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, prevState: Readonly<{}>, snapshot?: any): void;
87
86
  componentWillMount?(): void;
@@ -92,21 +91,21 @@ export default function modelContextDependencyVerifyComponent<TOwnProps extends
92
91
  UNSAFE_componentWillUpdate?(nextProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, nextState: Readonly<{}>, nextContext: any): void;
93
92
  };
94
93
  new (props: TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>, context: any): {
95
- render(): React.JSX.Element;
94
+ render(): import("react/jsx-runtime").JSX.Element;
96
95
  context: any;
97
96
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
98
97
  forceUpdate(callback?: (() => void) | undefined): void;
99
98
  readonly props: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>> & Readonly<{
100
- children?: React.ReactNode;
99
+ children?: import("react").ReactNode | undefined;
101
100
  }>;
102
101
  state: Readonly<{}>;
103
102
  refs: {
104
- [key: string]: React.ReactInstance;
103
+ [key: string]: import("react").ReactInstance;
105
104
  };
106
105
  componentDidMount?(): void;
107
106
  shouldComponentUpdate?(nextProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, nextState: Readonly<{}>, nextContext: any): boolean;
108
107
  componentWillUnmount?(): void;
109
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
108
+ componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
110
109
  getSnapshotBeforeUpdate?(prevProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, prevState: Readonly<{}>): any;
111
110
  componentDidUpdate?(prevProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, prevState: Readonly<{}>, snapshot?: any): void;
112
111
  componentWillMount?(): void;
@@ -116,24 +115,24 @@ export default function modelContextDependencyVerifyComponent<TOwnProps extends
116
115
  componentWillUpdate?(nextProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, nextState: Readonly<{}>, nextContext: any): void;
117
116
  UNSAFE_componentWillUpdate?(nextProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, nextState: Readonly<{}>, nextContext: any): void;
118
117
  };
119
- contextType?: React.Context<any> | undefined;
118
+ contextType?: import("react").Context<any> | undefined;
120
119
  }>, any> & import("react-router").WithRouterStatics<{
121
120
  new (props: (TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>) | Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>): {
122
- render(): React.JSX.Element;
121
+ render(): import("react/jsx-runtime").JSX.Element;
123
122
  context: any;
124
123
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
125
124
  forceUpdate(callback?: (() => void) | undefined): void;
126
125
  readonly props: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>> & Readonly<{
127
- children?: React.ReactNode;
126
+ children?: import("react").ReactNode | undefined;
128
127
  }>;
129
128
  state: Readonly<{}>;
130
129
  refs: {
131
- [key: string]: React.ReactInstance;
130
+ [key: string]: import("react").ReactInstance;
132
131
  };
133
132
  componentDidMount?(): void;
134
133
  shouldComponentUpdate?(nextProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, nextState: Readonly<{}>, nextContext: any): boolean;
135
134
  componentWillUnmount?(): void;
136
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
135
+ componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
137
136
  getSnapshotBeforeUpdate?(prevProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, prevState: Readonly<{}>): any;
138
137
  componentDidUpdate?(prevProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, prevState: Readonly<{}>, snapshot?: any): void;
139
138
  componentWillMount?(): void;
@@ -144,21 +143,21 @@ export default function modelContextDependencyVerifyComponent<TOwnProps extends
144
143
  UNSAFE_componentWillUpdate?(nextProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, nextState: Readonly<{}>, nextContext: any): void;
145
144
  };
146
145
  new (props: TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>, context: any): {
147
- render(): React.JSX.Element;
146
+ render(): import("react/jsx-runtime").JSX.Element;
148
147
  context: any;
149
148
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
150
149
  forceUpdate(callback?: (() => void) | undefined): void;
151
150
  readonly props: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>> & Readonly<{
152
- children?: React.ReactNode;
151
+ children?: import("react").ReactNode | undefined;
153
152
  }>;
154
153
  state: Readonly<{}>;
155
154
  refs: {
156
- [key: string]: React.ReactInstance;
155
+ [key: string]: import("react").ReactInstance;
157
156
  };
158
157
  componentDidMount?(): void;
159
158
  shouldComponentUpdate?(nextProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, nextState: Readonly<{}>, nextContext: any): boolean;
160
159
  componentWillUnmount?(): void;
161
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
160
+ componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
162
161
  getSnapshotBeforeUpdate?(prevProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, prevState: Readonly<{}>): any;
163
162
  componentDidUpdate?(prevProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, prevState: Readonly<{}>, snapshot?: any): void;
164
163
  componentWillMount?(): void;
@@ -168,5 +167,5 @@ export default function modelContextDependencyVerifyComponent<TOwnProps extends
168
167
  componentWillUpdate?(nextProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, nextState: Readonly<{}>, nextContext: any): void;
169
168
  UNSAFE_componentWillUpdate?(nextProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, nextState: Readonly<{}>, nextContext: any): void;
170
169
  };
171
- contextType?: React.Context<any> | undefined;
170
+ contextType?: import("react").Context<any> | undefined;
172
171
  }>;
@@ -1,72 +1,49 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- extendStatics(d, b);
11
- function __() { this.constructor = d; }
12
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
- };
14
- })();
15
- var __assign = (this && this.__assign) || function () {
16
- __assign = Object.assign || function(t) {
17
- for (var s, i = 1, n = arguments.length; i < n; i++) {
18
- s = arguments[i];
19
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
20
- t[p] = s[p];
21
- }
22
- return t;
23
- };
24
- return __assign.apply(this, arguments);
25
- };
26
- var __importDefault = (this && this.__importDefault) || function (mod) {
27
- return (mod && mod.__esModule) ? mod : { "default": mod };
28
- };
29
- Object.defineProperty(exports, "__esModule", { value: true });
30
- exports.setupModelContextDependencyVerifyComponent = void 0;
31
- var react_1 = __importDefault(require("react"));
32
- var react_2 = require("react");
33
- var react_router_dom_1 = require("react-router-dom");
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = modelContextDependencyVerifyComponent;
7
+ exports.setupModelContextDependencyVerifyComponent = setupModelContextDependencyVerifyComponent;
8
+ var _react = require("react");
9
+ var _reactRouterDom = require("react-router-dom");
10
+ var _jsxRuntime = require("react/jsx-runtime");
34
11
  function setupModelContextDependencyVerifyComponent(WrappedComponent, modelName, dependentModelName) {
35
- return /** @class */ (function (_super) {
36
- __extends(ModelContextVerifyComponent, _super);
37
- function ModelContextVerifyComponent() {
38
- return _super !== null && _super.apply(this, arguments) || this;
12
+ return class ModelContextVerifyComponent extends _react.Component {
13
+ render() {
14
+ const {
15
+ match: {
16
+ params
17
+ },
18
+ model
19
+ } = this.props;
20
+ const routeParams = params;
21
+ const modelId = routeParams[`${modelName}Id`] ? parseInt(routeParams[`${modelName}Id`], 10) : undefined;
22
+ const dependentModelId = routeParams[`${dependentModelName}Id`] ? parseInt(routeParams[`${dependentModelName}Id`], 10) : undefined;
23
+ if (!!modelId && !!dependentModelId && model.id === modelId && model[`${dependentModelName}Id`] === dependentModelId) {
24
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(WrappedComponent, {
25
+ ...this.props
26
+ });
27
+ }
28
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Redirect, {
29
+ to: {
30
+ pathname: '/error'
39
31
  }
40
- ModelContextVerifyComponent.prototype.render = function () {
41
- var _a = this.props, params = _a.match.params, model = _a.model;
42
- var routeParams = params;
43
- var modelId = routeParams[modelName + "Id"] ? parseInt(routeParams[modelName + "Id"], 10) : undefined;
44
- var dependentModelId = routeParams[dependentModelName + "Id"]
45
- ? parseInt(routeParams[dependentModelName + "Id"], 10)
46
- : undefined;
47
- if (!!modelId &&
48
- !!dependentModelId &&
49
- model.id === modelId &&
50
- model[dependentModelName + "Id"] === dependentModelId) {
51
- return react_1.default.createElement(WrappedComponent, __assign({}, this.props));
52
- }
53
- return (react_1.default.createElement(react_router_dom_1.Redirect, { to: {
54
- pathname: '/error'
55
- } }));
56
- };
57
- return ModelContextVerifyComponent;
58
- }(react_2.Component));
32
+ });
33
+ }
34
+ };
59
35
  }
60
- exports.setupModelContextDependencyVerifyComponent = setupModelContextDependencyVerifyComponent;
61
- /**
62
- * HOC that checks if the depender component is related to the dependee component.
63
- *
64
- * @param {*} WrappedComponent The component to wrap.
65
- * @param {string} modelName The modelName of the dependent component itself.
66
- * @param {string} dependentModelName The modelName that the dependent component depends on.
36
+
37
+ /**
38
+ * HOC that checks if the depender component is related to the dependee component.
39
+ *
40
+ * @param {*} WrappedComponent The component to wrap.
41
+ * @param {string} modelName The modelName of the dependent component itself.
42
+ * @param {string} dependentModelName The modelName that the dependent component depends on.
67
43
  */
44
+
68
45
  function modelContextDependencyVerifyComponent(WrappedComponent, modelName, dependentModelName) {
69
- var component = setupModelContextDependencyVerifyComponent(WrappedComponent, modelName, dependentModelName);
70
- return react_router_dom_1.withRouter(component);
46
+ const component = setupModelContextDependencyVerifyComponent(WrappedComponent, modelName, dependentModelName);
47
+ return (0, _reactRouterDom.withRouter)(component);
71
48
  }
72
- exports.default = modelContextDependencyVerifyComponent;
49
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfcmVhY3QiLCJyZXF1aXJlIiwiX3JlYWN0Um91dGVyRG9tIiwiX2pzeFJ1bnRpbWUiLCJzZXR1cE1vZGVsQ29udGV4dERlcGVuZGVuY3lWZXJpZnlDb21wb25lbnQiLCJXcmFwcGVkQ29tcG9uZW50IiwibW9kZWxOYW1lIiwiZGVwZW5kZW50TW9kZWxOYW1lIiwiTW9kZWxDb250ZXh0VmVyaWZ5Q29tcG9uZW50IiwiQ29tcG9uZW50IiwicmVuZGVyIiwibWF0Y2giLCJwYXJhbXMiLCJtb2RlbCIsInByb3BzIiwicm91d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BRSxLQUFLSixPQUFPLElBQ25CSCxLQUFLLENBQVMsR0FBR04sa0JBQWtCLElBQUksQ0FBQyxLQUFLWSxnQkFBZ0IsRUFDN0Q7UUFDRCxvQkFBTyxJQUFBaEIsV0FBQSxDQUFBa0IsR0FBQSxFQUFDaEIsZ0JBQWdCO1VBQUEsR0FBSyxJQUFJLENBQUNTO1FBQUssQ0FBRyxDQUFDO01BQzVDO01BQ0Esb0JBQ0MsSUFBQVgsV0FBQSxDQUFBa0IsR0FBQSxFQUFDbkIsZUFBQSxDQUFBb0IsUUFBUTtRQUNSQyxFQUFFLEVBQUU7VUFDSEMsUUFBUSxFQUFFO1FBQ1g7TUFBRSxDQUNGLENBQUM7SUFFSjtFQUNELENBQUM7QUFDRjs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFZSxTQUFTQyxxQ0FBcUNBLENBRTNEcEIsZ0JBQTBDLEVBQUVDLFNBQWlCLEVBQUVDLGtCQUEwQixFQUFFO0VBQzVGLE1BQU1tQixTQUFTLEdBQUd0QiwwQ0FBMEMsQ0FBQ0MsZ0JBQWdCLEVBQUVDLFNBQVMsRUFBRUMsa0JBQWtCLENBQUM7RUFDN0csT0FBTyxJQUFBb0IsMEJBQVUsRUFBQ0QsU0FBUyxDQUFDO0FBQzdCIiwiaWdub3JlTGlzdCI6W119
@@ -1,4 +1,4 @@
1
- import React, { ComponentType } from 'react';
1
+ import { ComponentType } from 'react';
2
2
  import { Model } from '../../types';
3
3
  import { CollectionComponentWrappedProps } from './CollectionComponent';
4
4
  import { CollectionItemComponentWrappedProps } from './CollectionItemComponent';
@@ -16,21 +16,21 @@ import { CollectionItemComponentWrappedProps } from './CollectionItemComponent';
16
16
  */
17
17
  export default function modelErrorRedirectComponent<TOwnProps extends CollectionItemComponentWrappedProps<Model> | CollectionComponentWrappedProps<Model>>(WrappedComponent: ComponentType<TOwnProps>): {
18
18
  new (props: TOwnProps | Readonly<TOwnProps>): {
19
- render(): React.JSX.Element;
19
+ render(): import("react/jsx-runtime").JSX.Element;
20
20
  context: any;
21
21
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TOwnProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
22
22
  forceUpdate(callback?: (() => void) | undefined): void;
23
23
  readonly props: Readonly<TOwnProps> & Readonly<{
24
- children?: React.ReactNode;
24
+ children?: import("react").ReactNode | undefined;
25
25
  }>;
26
26
  state: Readonly<{}>;
27
27
  refs: {
28
- [key: string]: React.ReactInstance;
28
+ [key: string]: import("react").ReactInstance;
29
29
  };
30
30
  componentDidMount?(): void;
31
31
  shouldComponentUpdate?(nextProps: Readonly<TOwnProps>, nextState: Readonly<{}>, nextContext: any): boolean;
32
32
  componentWillUnmount?(): void;
33
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
33
+ componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
34
34
  getSnapshotBeforeUpdate?(prevProps: Readonly<TOwnProps>, prevState: Readonly<{}>): any;
35
35
  componentDidUpdate?(prevProps: Readonly<TOwnProps>, prevState: Readonly<{}>, snapshot?: any): void;
36
36
  componentWillMount?(): void;
@@ -41,21 +41,21 @@ export default function modelErrorRedirectComponent<TOwnProps extends Collection
41
41
  UNSAFE_componentWillUpdate?(nextProps: Readonly<TOwnProps>, nextState: Readonly<{}>, nextContext: any): void;
42
42
  };
43
43
  new (props: TOwnProps, context: any): {
44
- render(): React.JSX.Element;
44
+ render(): import("react/jsx-runtime").JSX.Element;
45
45
  context: any;
46
46
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TOwnProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
47
47
  forceUpdate(callback?: (() => void) | undefined): void;
48
48
  readonly props: Readonly<TOwnProps> & Readonly<{
49
- children?: React.ReactNode;
49
+ children?: import("react").ReactNode | undefined;
50
50
  }>;
51
51
  state: Readonly<{}>;
52
52
  refs: {
53
- [key: string]: React.ReactInstance;
53
+ [key: string]: import("react").ReactInstance;
54
54
  };
55
55
  componentDidMount?(): void;
56
56
  shouldComponentUpdate?(nextProps: Readonly<TOwnProps>, nextState: Readonly<{}>, nextContext: any): boolean;
57
57
  componentWillUnmount?(): void;
58
- componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
58
+ componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
59
59
  getSnapshotBeforeUpdate?(prevProps: Readonly<TOwnProps>, prevState: Readonly<{}>): any;
60
60
  componentDidUpdate?(prevProps: Readonly<TOwnProps>, prevState: Readonly<{}>, snapshot?: any): void;
61
61
  componentWillMount?(): void;
@@ -65,5 +65,5 @@ export default function modelErrorRedirectComponent<TOwnProps extends Collection
65
65
  componentWillUpdate?(nextProps: Readonly<TOwnProps>, nextState: Readonly<{}>, nextContext: any): void;
66
66
  UNSAFE_componentWillUpdate?(nextProps: Readonly<TOwnProps>, nextState: Readonly<{}>, nextContext: any): void;
67
67
  };
68
- contextType?: React.Context<any> | undefined;
68
+ contextType?: import("react").Context<any> | undefined;
69
69
  };
@@ -1,99 +1,56 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- extendStatics(d, b);
11
- function __() { this.constructor = d; }
12
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
- };
14
- })();
15
- var __assign = (this && this.__assign) || function () {
16
- __assign = Object.assign || function(t) {
17
- for (var s, i = 1, n = arguments.length; i < n; i++) {
18
- s = arguments[i];
19
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
20
- t[p] = s[p];
21
- }
22
- return t;
23
- };
24
- return __assign.apply(this, arguments);
25
- };
26
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
27
- if (k2 === undefined) k2 = k;
28
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
29
- }) : (function(o, m, k, k2) {
30
- if (k2 === undefined) k2 = k;
31
- o[k2] = m[k];
32
- }));
33
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
34
- Object.defineProperty(o, "default", { enumerable: true, value: v });
35
- }) : function(o, v) {
36
- o["default"] = v;
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
37
5
  });
38
- var __importStar = (this && this.__importStar) || function (mod) {
39
- if (mod && mod.__esModule) return mod;
40
- var result = {};
41
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
42
- __setModuleDefault(result, mod);
43
- return result;
44
- };
45
- Object.defineProperty(exports, "__esModule", { value: true });
46
- var react_1 = __importStar(require("react"));
47
- var react_router_dom_1 = require("react-router-dom");
48
- var modelStatus_1 = require("../../constants/modelStatus");
49
- var types_1 = require("../../types");
50
- /**
51
- * This component exists as a child to CollectionItemComponent to
52
- * redirect the user to a 404/500 page if errors occur while fetching data.
53
- *
54
- * Nested CollectionItemComponent instances should not
55
- * use this - they’ll want to handle errors according to the need for
56
- * alerting the user in the parent.
57
- *
58
- * @export
59
- * @param WrappedComponent Wrapped component that depends on the model. (Usually AsyncComponent)
60
- * @returns A wrapped component or redirects
6
+ exports.default = modelErrorRedirectComponent;
7
+ var _react = require("react");
8
+ var _reactRouterDom = require("react-router-dom");
9
+ var _modelStatus = require("../../constants/modelStatus");
10
+ var _types = require("../../types");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ /**
13
+ * This component exists as a child to CollectionItemComponent to
14
+ * redirect the user to a 404/500 page if errors occur while fetching data.
15
+ *
16
+ * Nested CollectionItemComponent instances should not
17
+ * use this - they’ll want to handle errors according to the need for
18
+ * alerting the user in the parent.
19
+ *
20
+ * @export
21
+ * @param WrappedComponent Wrapped component that depends on the model. (Usually AsyncComponent)
22
+ * @returns A wrapped component or redirects
61
23
  */
62
24
  function modelErrorRedirectComponent(WrappedComponent) {
63
- return /** @class */ (function (_super) {
64
- __extends(ModelErrorRedirectComponent, _super);
65
- function ModelErrorRedirectComponent() {
66
- return _super !== null && _super.apply(this, arguments) || this;
67
- }
68
- ModelErrorRedirectComponent.prototype.render = function () {
69
- var _a = this.props, model = _a.model, modelStatus = _a.modelStatus, previousModelStatus = _a.previousModelStatus;
70
- var notFoundRoute = previousModelStatus === modelStatus_1.MODEL_STATUS.UNINITIALIZED &&
71
- modelStatus === modelStatus_1.MODEL_STATUS.ERROR &&
72
- model._metadata &&
73
- model._metadata.hasError &&
74
- model._metadata.lastFetchErrorData &&
75
- model._metadata.lastFetchErrorData.status === types_1.HTTP_STATUS_CODE.NOT_FOUND;
76
- var errorRoute = previousModelStatus === modelStatus_1.MODEL_STATUS.UNINITIALIZED &&
77
- modelStatus === modelStatus_1.MODEL_STATUS.ERROR &&
78
- model._metadata &&
79
- model._metadata.hasError &&
80
- model._metadata.lastFetchErrorData &&
81
- model._metadata.lastFetchErrorData.status === types_1.HTTP_STATUS_CODE.INTERNAL_SERVER_ERROR;
82
- if (notFoundRoute) {
83
- var pathname = window.location.pathname;
84
- return (react_1.default.createElement(react_router_dom_1.Redirect, { to: {
85
- pathname: '/not-found',
86
- search: "?pathname=" + pathname
87
- } }));
88
- }
89
- if (errorRoute) {
90
- return (react_1.default.createElement(react_router_dom_1.Redirect, { to: {
91
- pathname: '/error'
92
- } }));
93
- }
94
- return react_1.default.createElement(WrappedComponent, __assign({}, this.props));
95
- };
96
- return ModelErrorRedirectComponent;
97
- }(react_1.Component));
25
+ return class ModelErrorRedirectComponent extends _react.Component {
26
+ render() {
27
+ const {
28
+ model,
29
+ modelStatus,
30
+ previousModelStatus
31
+ } = this.props;
32
+ const notFoundRoute = previousModelStatus === _modelStatus.MODEL_STATUS.UNINITIALIZED && modelStatus === _modelStatus.MODEL_STATUS.ERROR && model._metadata && model._metadata.hasError && model._metadata.lastFetchErrorData && model._metadata.lastFetchErrorData.status === _types.HTTP_STATUS_CODE.NOT_FOUND;
33
+ const errorRoute = previousModelStatus === _modelStatus.MODEL_STATUS.UNINITIALIZED && modelStatus === _modelStatus.MODEL_STATUS.ERROR && model._metadata && model._metadata.hasError && model._metadata.lastFetchErrorData && model._metadata.lastFetchErrorData.status === _types.HTTP_STATUS_CODE.INTERNAL_SERVER_ERROR;
34
+ if (notFoundRoute) {
35
+ const pathname = window.location.pathname;
36
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Redirect, {
37
+ to: {
38
+ pathname: '/not-found',
39
+ search: `?pathname=${pathname}`
40
+ }
41
+ });
42
+ }
43
+ if (errorRoute) {
44
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Redirect, {
45
+ to: {
46
+ pathname: '/error'
47
+ }
48
+ });
49
+ }
50
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(WrappedComponent, {
51
+ ...this.props
52
+ });
53
+ }
54
+ };
98
55
  }
99
- exports.default = modelErrorRedirectComponent;
56
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfcmVhY3QiLCJyZXF1aXJlIiwiX3JlYWN0Um91dGVyRG9tIiwiX21vZGVsU3RhdHVzIiwiX3R5cGVzIiwiX2pzeFJ1bnRpbWUiLCJtb2RlbEVycm9yUmVkaXJlY3RDb21wb25lbnQiLCJXcmFwcGVkQ29tcG9uZW50IiwiTW9kZWxFcnJvclJlZGlyZWN0Q29tcG9uZW50IiwiQ29tcG9uZW50IiwicmVuZGVyIiwibW9kZWwiLCJtb2RlbFN0YXR1cyIsInByZXZpb3VzTW9kZWxTdGF0dXMiLCJwcm9wcyIsIm5vdEZvdW5kUm91dGUiLCJNT0RFT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Q0EsSUFBSUYsVUFBVSxFQUFFO1FBQ2Ysb0JBQ0MsSUFBQXBCLFdBQUEsQ0FBQXlCLEdBQUEsRUFBQzVCLGVBQUEsQ0FBQTZCLFFBQVE7VUFDUkMsRUFBRSxFQUFFO1lBQ0hMLFFBQVEsRUFBRTtVQUNYO1FBQUUsQ0FDRixDQUFDO01BRUo7TUFDQSxvQkFBTyxJQUFBdEIsV0FBQSxDQUFBeUIsR0FBQSxFQUFDdkIsZ0JBQWdCO1FBQUEsR0FBSyxJQUFJLENBQUNPO01BQUssQ0FBRyxDQUFDO0lBQzVDO0VBQ0QsQ0FBQztBQUNGIiwiaWdub3JlTGlzdCI6W119
@@ -4,7 +4,7 @@ import { Dispatch } from 'redux';
4
4
  import { BaseReduxState, Search } from '../../types';
5
5
  export interface SearchPersistorProps<T extends Search = Search> {
6
6
  persistSearch: (search?: T) => void;
7
- persistedSearch: T;
7
+ persistedSearch: T | undefined;
8
8
  }
9
9
  export interface SearchPersistorMethods<T extends Search = Search> {
10
10
  setSearchDefaults: (doSearch: () => void, search: T) => void;
@@ -22,9 +22,9 @@ export interface SearchPersistorMethods<T extends Search = Search> {
22
22
  export interface SearchPersistorWrappedProps<T extends Search = Search> extends SearchPersistorProps<T>, SearchPersistorMethods<T> {
23
23
  search?: T;
24
24
  }
25
- export declare function configureSearchPersistorComponent<TOwnProps extends {}>(WrappedComponent: ComponentType<TOwnProps & SearchPersistorWrappedProps>, disableLocalSearch?: boolean): ComponentType<TOwnProps & SearchPersistorProps>;
26
- export declare function configureSearchPersistorComponent<TOwnProps extends {}, TSearchType extends Search>(WrappedComponent: ComponentType<TOwnProps & SearchPersistorWrappedProps<TSearchType>>, disableLocalSearch?: boolean): ComponentType<TOwnProps & SearchPersistorProps<TSearchType>>;
27
- export declare const configureMapStateToProps: <TSearchType extends Search>(key: string) => (state: BaseReduxState) => SearchPersistorProps<TSearchType>;
25
+ export declare function configureSearchPersistorComponent<TOwnProps extends object>(WrappedComponent: ComponentType<TOwnProps & SearchPersistorWrappedProps>, disableLocalSearch?: boolean): ComponentType<TOwnProps & SearchPersistorProps>;
26
+ export declare function configureSearchPersistorComponent<TOwnProps extends object, TSearchType extends Search>(WrappedComponent: ComponentType<TOwnProps & SearchPersistorWrappedProps<TSearchType>>, disableLocalSearch?: boolean): ComponentType<TOwnProps & SearchPersistorProps<TSearchType>>;
27
+ export declare const configureMapStateToProps: <TSearchType extends Search>(key: string) => (state: BaseReduxState) => SearchPersistorProps<TSearchType> | undefined;
28
28
  export declare const configureMapDispatchToProps: <TSearchType extends Search>(key: string) => (dispatch: Dispatch) => SearchPersistorProps<TSearchType>;
29
29
  /**
30
30
  * HOC to handle persistence and restoration of "Manage" components search parameters.