studiokit-scaffolding-js 5.1.4 → 5.1.5

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 (519) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +134 -134
  3. package/lib/components/ActionList.d.ts +20 -20
  4. package/lib/components/ActionList.js +94 -94
  5. package/lib/components/AlertDialog.d.ts +17 -17
  6. package/lib/components/AlertDialog.js +22 -22
  7. package/lib/components/AlertWithIcon.d.ts +6 -6
  8. package/lib/components/AlertWithIcon.js +58 -58
  9. package/lib/components/ConnectedModal.d.ts +7 -6
  10. package/lib/components/ConnectedModal.js +40 -11
  11. package/lib/components/Dropdowns/GroupsDropdown.d.ts +17 -17
  12. package/lib/components/Dropdowns/GroupsDropdown.js +87 -87
  13. package/lib/components/Dropdowns/ManagedNavDropdown.d.ts +32 -32
  14. package/lib/components/Dropdowns/ManagedNavDropdown.js +117 -117
  15. package/lib/components/Dropdowns/UserDropdown.d.ts +6 -6
  16. package/lib/components/Dropdowns/UserDropdown.js +76 -76
  17. package/lib/components/Dropdowns/index.d.ts +3 -3
  18. package/lib/components/Dropdowns/index.js +12 -12
  19. package/lib/components/EntityOwnerList.d.ts +11 -11
  20. package/lib/components/EntityOwnerList.js +64 -64
  21. package/lib/components/Error.d.ts +4 -4
  22. package/lib/components/Error.js +30 -30
  23. package/lib/components/ErrorBoundary.d.ts +8 -8
  24. package/lib/components/ErrorBoundary.js +101 -101
  25. package/lib/components/ErrorMessage.d.ts +6 -6
  26. package/lib/components/ErrorMessage.js +18 -18
  27. package/lib/components/Forms/DateField.d.ts +13 -13
  28. package/lib/components/Forms/DateField.js +100 -100
  29. package/lib/components/Forms/TimeField.d.ts +11 -11
  30. package/lib/components/Forms/TimeField.js +113 -113
  31. package/lib/components/Forms/index.d.ts +2 -2
  32. package/lib/components/Forms/index.js +14 -14
  33. package/lib/components/Groups/CreateEditCopySaveButtons.d.ts +10 -10
  34. package/lib/components/Groups/CreateEditCopySaveButtons.js +18 -18
  35. package/lib/components/Groups/ExternalGroups/Attach.d.ts +35 -35
  36. package/lib/components/Groups/ExternalGroups/Attach.js +195 -195
  37. package/lib/components/Groups/ExternalGroups/Table.d.ts +12 -12
  38. package/lib/components/Groups/ExternalGroups/Table.js +83 -83
  39. package/lib/components/Groups/GroupCreateOrEditCommonProps.d.ts +6 -6
  40. package/lib/components/Groups/GroupCreateOrEditCommonProps.js +2 -2
  41. package/lib/components/Groups/RosterSyncInfo.d.ts +5 -5
  42. package/lib/components/Groups/RosterSyncInfo.js +54 -54
  43. package/lib/components/HOC/AccessibleAppComponent.d.ts +15 -15
  44. package/lib/components/HOC/AccessibleAppComponent.js +132 -132
  45. package/lib/components/HOC/ActivityRequiredComponent.d.ts +101 -101
  46. package/lib/components/HOC/ActivityRequiredComponent.js +117 -117
  47. package/lib/components/HOC/AsyncComponent.d.ts +37 -37
  48. package/lib/components/HOC/AsyncComponent.js +133 -133
  49. package/lib/components/HOC/AuthenticatedComponent.d.ts +9 -9
  50. package/lib/components/HOC/AuthenticatedComponent.js +104 -104
  51. package/lib/components/HOC/CollectionComponent.d.ts +61 -61
  52. package/lib/components/HOC/CollectionComponent.js +179 -179
  53. package/lib/components/HOC/CollectionFirstItemComponent.d.ts +70 -70
  54. package/lib/components/HOC/CollectionFirstItemComponent.js +101 -101
  55. package/lib/components/HOC/CollectionItemComponent.d.ts +60 -60
  56. package/lib/components/HOC/CollectionItemComponent.js +176 -176
  57. package/lib/components/HOC/ConnectedModalComponent.d.ts +64 -64
  58. package/lib/components/HOC/ConnectedModalComponent.js +143 -132
  59. package/lib/components/HOC/DataDependentComponent.d.ts +61 -61
  60. package/lib/components/HOC/DataDependentComponent.js +87 -87
  61. package/lib/components/HOC/EntityComponent.d.ts +83 -83
  62. package/lib/components/HOC/EntityComponent.js +120 -120
  63. package/lib/components/HOC/FullscreenModalComponent.d.ts +74 -74
  64. package/lib/components/HOC/FullscreenModalComponent.js +175 -175
  65. package/lib/components/HOC/GroupActivityRequiredComponent.d.ts +31 -31
  66. package/lib/components/HOC/GroupActivityRequiredComponent.js +53 -53
  67. package/lib/components/HOC/GuidComponent.d.ts +14 -14
  68. package/lib/components/HOC/GuidComponent.js +72 -72
  69. package/lib/components/HOC/ModelContextDependencyVerifyComponent.d.ts +172 -172
  70. package/lib/components/HOC/ModelContextDependencyVerifyComponent.js +72 -72
  71. package/lib/components/HOC/ModelErrorRedirectComponent.d.ts +69 -69
  72. package/lib/components/HOC/ModelErrorRedirectComponent.js +98 -98
  73. package/lib/components/HOC/SearchPersistorComponent.d.ts +74 -74
  74. package/lib/components/HOC/SearchPersistorComponent.js +227 -227
  75. package/lib/components/HOC/UnauthenticatedComponent.d.ts +62 -62
  76. package/lib/components/HOC/UnauthenticatedComponent.js +90 -90
  77. package/lib/components/HOC/UserComponent.d.ts +3 -3
  78. package/lib/components/HOC/UserComponent.js +12 -12
  79. package/lib/components/Icons/IconAlphaList.d.ts +3 -3
  80. package/lib/components/Icons/IconAlphaList.js +24 -24
  81. package/lib/components/Icons/IconExternalUser.d.ts +3 -3
  82. package/lib/components/Icons/IconExternalUser.js +24 -24
  83. package/lib/components/Icons/IconImpersonation.d.ts +3 -3
  84. package/lib/components/Icons/IconImpersonation.js +24 -24
  85. package/lib/components/Icons/IconStopImpersonating.d.ts +3 -3
  86. package/lib/components/Icons/IconStopImpersonating.js +24 -24
  87. package/lib/components/Icons/IconTable.d.ts +5 -5
  88. package/lib/components/Icons/IconTable.js +24 -24
  89. package/lib/components/Icons/IconTableDeleteCol.d.ts +3 -3
  90. package/lib/components/Icons/IconTableDeleteCol.js +24 -24
  91. package/lib/components/Icons/IconTableDeleteRow.d.ts +3 -3
  92. package/lib/components/Icons/IconTableDeleteRow.js +24 -24
  93. package/lib/components/Icons/IconTableInsertCol.d.ts +3 -3
  94. package/lib/components/Icons/IconTableInsertCol.js +24 -24
  95. package/lib/components/Icons/IconTableInsertRow.d.ts +3 -3
  96. package/lib/components/Icons/IconTableInsertRow.js +24 -24
  97. package/lib/components/Impersonation/Button.d.ts +7 -7
  98. package/lib/components/Impersonation/Button.js +61 -61
  99. package/lib/components/Impersonation/Link.d.ts +7 -7
  100. package/lib/components/Impersonation/Link.js +58 -58
  101. package/lib/components/Impersonation/UserDetail.css +22 -22
  102. package/lib/components/Impersonation/UserDetail.d.ts +22 -22
  103. package/lib/components/Impersonation/UserDetail.js +23 -23
  104. package/lib/components/Loading.d.ts +3 -3
  105. package/lib/components/Loading.js +25 -25
  106. package/lib/components/LockDownBrowser/Check.d.ts +3 -3
  107. package/lib/components/LockDownBrowser/Check.js +50 -50
  108. package/lib/components/LockDownBrowser/ExitButton.d.ts +2 -2
  109. package/lib/components/LockDownBrowser/ExitButton.js +18 -18
  110. package/lib/components/LockDownBrowser/Launch.d.ts +3 -3
  111. package/lib/components/LockDownBrowser/Launch.js +89 -89
  112. package/lib/components/Lti/Confirm.d.ts +8 -8
  113. package/lib/components/Lti/Confirm.js +37 -37
  114. package/lib/components/Lti/CreateNonLtiGroupAlertDialog.d.ts +13 -13
  115. package/lib/components/Lti/CreateNonLtiGroupAlertDialog.js +83 -83
  116. package/lib/components/Lti/Launch.d.ts +21 -21
  117. package/lib/components/Lti/Launch.js +53 -53
  118. package/lib/components/Lti/LaunchGroup.d.ts +9 -9
  119. package/lib/components/Lti/LaunchGroup.js +45 -45
  120. package/lib/components/ManageTable.d.ts +19 -19
  121. package/lib/components/ManageTable.js +109 -109
  122. package/lib/components/ManageTableNoDataComponent.d.ts +11 -11
  123. package/lib/components/ManageTableNoDataComponent.js +26 -26
  124. package/lib/components/NewVersionAlert.d.ts +18 -18
  125. package/lib/components/NewVersionAlert.js +97 -97
  126. package/lib/components/NotFound.d.ts +3 -3
  127. package/lib/components/NotFound.js +31 -31
  128. package/lib/components/Notifications.d.ts +39 -39
  129. package/lib/components/Notifications.js +175 -175
  130. package/lib/components/PaginationNextButton.d.ts +3 -3
  131. package/lib/components/PaginationNextButton.js +24 -24
  132. package/lib/components/PaginationPreviousButton.d.ts +3 -3
  133. package/lib/components/PaginationPreviousButton.js +24 -24
  134. package/lib/components/Quill/CustomToolbar.d.ts +42 -42
  135. package/lib/components/Quill/CustomToolbar.js +214 -214
  136. package/lib/components/Quill/Formats/Image.d.ts +46 -46
  137. package/lib/components/Quill/Formats/Image.js +90 -90
  138. package/lib/components/Quill/Formats/List.d.ts +15 -15
  139. package/lib/components/Quill/Formats/List.js +79 -79
  140. package/lib/components/Quill/Formats/Video.d.ts +11 -11
  141. package/lib/components/Quill/Formats/Video.js +50 -50
  142. package/lib/components/Quill/ImageMissingAltTextWarning.d.ts +5 -5
  143. package/lib/components/Quill/ImageMissingAltTextWarning.js +15 -15
  144. package/lib/components/Quill/ImageWithAltTextModal.d.ts +15 -15
  145. package/lib/components/Quill/ImageWithAltTextModal.js +139 -139
  146. package/lib/components/Quill/Specs/CustomImageSpec.d.ts +14 -14
  147. package/lib/components/Quill/Specs/CustomImageSpec.js +55 -55
  148. package/lib/components/Quill/Specs/CustomVideoSpec.d.ts +15 -15
  149. package/lib/components/Quill/Specs/CustomVideoSpec.js +48 -48
  150. package/lib/components/Quill/TableModule/Blots/BaseTableBlot.d.ts +29 -29
  151. package/lib/components/Quill/TableModule/Blots/BaseTableBlot.js +126 -126
  152. package/lib/components/Quill/TableModule/Blots/TableBlot.d.ts +20 -20
  153. package/lib/components/Quill/TableModule/Blots/TableBlot.js +69 -69
  154. package/lib/components/Quill/TableModule/Blots/TableBodyBlot.d.ts +18 -18
  155. package/lib/components/Quill/TableModule/Blots/TableBodyBlot.js +71 -71
  156. package/lib/components/Quill/TableModule/Blots/TableCellBlot.d.ts +34 -34
  157. package/lib/components/Quill/TableModule/Blots/TableCellBlot.js +246 -246
  158. package/lib/components/Quill/TableModule/Blots/TableContainer.d.ts +16 -16
  159. package/lib/components/Quill/TableModule/Blots/TableContainer.js +103 -103
  160. package/lib/components/Quill/TableModule/Blots/TableRowBlot.d.ts +22 -22
  161. package/lib/components/Quill/TableModule/Blots/TableRowBlot.js +91 -91
  162. package/lib/components/Quill/TableModule/constants.d.ts +34 -34
  163. package/lib/components/Quill/TableModule/constants.js +42 -42
  164. package/lib/components/Quill/TableModule/index.css +171 -171
  165. package/lib/components/Quill/TableModule/index.d.ts +23 -23
  166. package/lib/components/Quill/TableModule/index.js +320 -320
  167. package/lib/components/Quill/TableModule/utils.d.ts +9 -9
  168. package/lib/components/Quill/TableModule/utils.js +54 -54
  169. package/lib/components/Quill/accessibilityFix.d.ts +19 -19
  170. package/lib/components/Quill/accessibilityFix.js +267 -267
  171. package/lib/components/Quill/index.d.ts +3 -3
  172. package/lib/components/Quill/index.js +36 -36
  173. package/lib/components/RefreshIndicator/Bordered.d.ts +7 -7
  174. package/lib/components/RefreshIndicator/Bordered.js +36 -36
  175. package/lib/components/RefreshIndicator/Inline.d.ts +3 -3
  176. package/lib/components/RefreshIndicator/Inline.js +37 -37
  177. package/lib/components/RefreshIndicator/index.d.ts +20 -20
  178. package/lib/components/RefreshIndicator/index.js +122 -122
  179. package/lib/components/SearchControls.d.ts +16 -16
  180. package/lib/components/SearchControls.js +35 -35
  181. package/lib/components/SentryRoute.d.ts +3 -3
  182. package/lib/components/SentryRoute.js +25 -25
  183. package/lib/components/Tables/RoleFilter.d.ts +14 -14
  184. package/lib/components/Tables/RoleFilter.js +53 -53
  185. package/lib/components/Tables/TextFilter.d.ts +7 -7
  186. package/lib/components/Tables/TextFilter.js +26 -26
  187. package/lib/components/UserRoles/Add.d.ts +31 -31
  188. package/lib/components/UserRoles/Add.js +166 -166
  189. package/lib/components/UserRoles/Context.d.ts +32 -32
  190. package/lib/components/UserRoles/Context.js +13 -13
  191. package/lib/components/UserRoles/RoleCell.d.ts +7 -7
  192. package/lib/components/UserRoles/RoleCell.js +106 -106
  193. package/lib/components/UserRoles/Select.d.ts +26 -26
  194. package/lib/components/UserRoles/Select.js +58 -58
  195. package/lib/components/UserRoles/Table.d.ts +7 -7
  196. package/lib/components/UserRoles/Table.js +109 -109
  197. package/lib/components/UserRoles/index.d.ts +111 -111
  198. package/lib/components/UserRoles/index.js +468 -468
  199. package/lib/config/eslint/index.js +21 -21
  200. package/lib/config/eslint/lib/order.js +22 -22
  201. package/lib/config/eslint/lib/prettier.js +18 -18
  202. package/lib/config/eslint/lib/typescript.js +86 -86
  203. package/lib/config/eslint/react.js +9 -9
  204. package/lib/constants/baseActivity.d.ts +24 -24
  205. package/lib/constants/baseActivity.js +28 -28
  206. package/lib/constants/baseRole.d.ts +8 -8
  207. package/lib/constants/baseRole.js +12 -12
  208. package/lib/constants/configuration.d.ts +12 -12
  209. package/lib/constants/configuration.js +60 -60
  210. package/lib/constants/externalProviderType.d.ts +4 -4
  211. package/lib/constants/externalProviderType.js +8 -8
  212. package/lib/constants/index.d.ts +12 -12
  213. package/lib/constants/index.js +24 -24
  214. package/lib/constants/lockDownBrowser.d.ts +20 -20
  215. package/lib/constants/lockDownBrowser.js +25 -25
  216. package/lib/constants/mockData.d.ts +83 -85
  217. package/lib/constants/mockData.js +337 -337
  218. package/lib/constants/modelStatus.d.ts +9 -9
  219. package/lib/constants/modelStatus.js +13 -13
  220. package/lib/constants/notificationType.d.ts +6 -6
  221. package/lib/constants/notificationType.js +10 -10
  222. package/lib/constants/operatingSystem.d.ts +6 -6
  223. package/lib/constants/operatingSystem.js +10 -10
  224. package/lib/constants/shard.d.ts +5 -5
  225. package/lib/constants/shard.js +9 -9
  226. package/lib/constants/table.d.ts +15 -15
  227. package/lib/constants/table.js +24 -24
  228. package/lib/constants/tier.d.ts +5 -5
  229. package/lib/constants/tier.js +9 -9
  230. package/lib/constants/userRole.d.ts +2 -2
  231. package/lib/constants/userRole.js +21 -21
  232. package/lib/css/base/_base.css +98 -98
  233. package/lib/css/base/_typography.css +130 -130
  234. package/lib/css/components/_alert.css +85 -85
  235. package/lib/css/components/_bootstrap-grid.css +28 -28
  236. package/lib/css/components/_buttons.css +397 -397
  237. package/lib/css/components/_forms.css +91 -91
  238. package/lib/css/components/_menu.css +56 -56
  239. package/lib/css/components/_modals.css +46 -46
  240. package/lib/css/components/_quill.css +314 -314
  241. package/lib/css/components/_tables.css +497 -497
  242. package/lib/css/components/_tags.css +12 -12
  243. package/lib/css/index-with-variables.css +14 -14
  244. package/lib/css/index.css +13 -13
  245. package/lib/css/utils/_border.css +463 -463
  246. package/lib/css/utils/_color.css +309 -309
  247. package/lib/css/utils/_display.css +312 -312
  248. package/lib/css/utils/_general.css +48 -48
  249. package/lib/css/utils/_icon.css +16 -16
  250. package/lib/css/utils/_text.css +24 -24
  251. package/lib/css/utils/_width.css +60 -60
  252. package/lib/css/variables.css +78 -78
  253. package/lib/endpointMappings.d.ts +5 -5
  254. package/lib/endpointMappings.js +200 -200
  255. package/lib/hooks/useCollection.d.ts +5 -5
  256. package/lib/hooks/useCollection.js +72 -72
  257. package/lib/hooks/useCollectionConfiguration.d.ts +27 -27
  258. package/lib/hooks/useCollectionConfiguration.js +77 -77
  259. package/lib/hooks/useCollectionItem.d.ts +5 -5
  260. package/lib/hooks/useCollectionItem.js +65 -65
  261. package/lib/hooks/useGuid.d.ts +4 -4
  262. package/lib/hooks/useGuid.js +14 -14
  263. package/lib/hooks/usePrevious.d.ts +5 -5
  264. package/lib/hooks/usePrevious.js +18 -18
  265. package/lib/index.d.ts +9 -9
  266. package/lib/index.js +31 -31
  267. package/lib/redux/actionCreator.d.ts +4 -4
  268. package/lib/redux/actionCreator.js +17 -17
  269. package/lib/redux/actions.d.ts +39 -39
  270. package/lib/redux/actions.js +65 -65
  271. package/lib/redux/configureReducers.d.ts +21 -21
  272. package/lib/redux/configureReducers.js +92 -92
  273. package/lib/redux/configureStore.d.ts +16 -16
  274. package/lib/redux/configureStore.js +121 -121
  275. package/lib/redux/helpers.d.ts +2 -2
  276. package/lib/redux/helpers.js +7 -7
  277. package/lib/redux/reducers/authReducer.d.ts +2 -2
  278. package/lib/redux/reducers/authReducer.js +47 -47
  279. package/lib/redux/reducers/fetchReducer.d.ts +56 -56
  280. package/lib/redux/reducers/fetchReducer.js +201 -201
  281. package/lib/redux/reducers/index.d.ts +6 -6
  282. package/lib/redux/reducers/index.js +16 -16
  283. package/lib/redux/reducers/modalsReducer.d.ts +12 -12
  284. package/lib/redux/reducers/modalsReducer.js +58 -58
  285. package/lib/redux/reducers/notificationsReducer.d.ts +9 -9
  286. package/lib/redux/reducers/notificationsReducer.js +27 -27
  287. package/lib/redux/reducers/searchReducer.d.ts +17 -17
  288. package/lib/redux/reducers/searchReducer.js +23 -23
  289. package/lib/redux/sagas/appInsightsSaga.d.ts +2 -2
  290. package/lib/redux/sagas/appInsightsSaga.js +64 -64
  291. package/lib/redux/sagas/authSaga.d.ts +21 -21
  292. package/lib/redux/sagas/authSaga.js +440 -440
  293. package/lib/redux/sagas/caliperSaga.d.ts +2 -2
  294. package/lib/redux/sagas/caliperSaga.js +292 -292
  295. package/lib/redux/sagas/clockOffsetSaga.d.ts +11 -11
  296. package/lib/redux/sagas/clockOffsetSaga.js +81 -81
  297. package/lib/redux/sagas/configurationSaga.d.ts +2 -2
  298. package/lib/redux/sagas/configurationSaga.js +48 -48
  299. package/lib/redux/sagas/downtimeApiErrorSaga.d.ts +2 -0
  300. package/lib/redux/sagas/downtimeApiErrorSaga.js +66 -0
  301. package/lib/redux/sagas/errorSaga.d.ts +2 -2
  302. package/lib/redux/sagas/errorSaga.js +66 -66
  303. package/lib/redux/sagas/fetchSaga.d.ts +97 -97
  304. package/lib/redux/sagas/fetchSaga.js +661 -661
  305. package/lib/redux/sagas/googleAnalyticsSaga.d.ts +2 -2
  306. package/lib/redux/sagas/googleAnalyticsSaga.js +71 -71
  307. package/lib/redux/sagas/identityProviderSaga.d.ts +2 -2
  308. package/lib/redux/sagas/identityProviderSaga.js +70 -70
  309. package/lib/redux/sagas/initialDataLoadSaga.d.ts +1 -1
  310. package/lib/redux/sagas/initialDataLoadSaga.js +33 -33
  311. package/lib/redux/sagas/lockDownBrowserErrorSaga.d.ts +2 -2
  312. package/lib/redux/sagas/lockDownBrowserErrorSaga.js +81 -81
  313. package/lib/redux/sagas/noStoreSaga.d.ts +17 -17
  314. package/lib/redux/sagas/noStoreSaga.js +123 -123
  315. package/lib/redux/sagas/postLoginDataSaga.d.ts +9 -9
  316. package/lib/redux/sagas/postLoginDataSaga.js +86 -86
  317. package/lib/redux/sagas/postLoginRedirectSaga.d.ts +6 -6
  318. package/lib/redux/sagas/postLoginRedirectSaga.js +74 -74
  319. package/lib/redux/sagas/rootSaga.d.ts +5 -5
  320. package/lib/redux/sagas/rootSaga.js +152 -151
  321. package/lib/redux/sagas/sentrySaga.d.ts +2 -2
  322. package/lib/redux/sagas/sentrySaga.js +102 -102
  323. package/lib/redux/sagas/userIdSaga.d.ts +2 -2
  324. package/lib/redux/sagas/userIdSaga.js +56 -56
  325. package/lib/services/codeProviderService.d.ts +2 -2
  326. package/lib/services/codeProviderService.js +33 -33
  327. package/lib/services/dateService.d.ts +4 -4
  328. package/lib/services/dateService.js +16 -16
  329. package/lib/services/documentService.d.ts +9 -9
  330. package/lib/services/documentService.js +17 -17
  331. package/lib/services/fetchService.d.ts +30 -30
  332. package/lib/services/fetchService.js +165 -165
  333. package/lib/services/persistenceService.d.ts +12 -12
  334. package/lib/services/persistenceService.js +44 -44
  335. package/lib/services/ticketProviderService.d.ts +2 -2
  336. package/lib/services/ticketProviderService.js +37 -37
  337. package/lib/services/tokenPersistenceService.d.ts +2 -2
  338. package/lib/services/tokenPersistenceService.js +12 -12
  339. package/lib/services/windowService.d.ts +8 -8
  340. package/lib/services/windowService.js +15 -15
  341. package/lib/setupTests.d.ts +1 -1
  342. package/lib/setupTests.js +25 -25
  343. package/lib/startup.d.ts +28 -28
  344. package/lib/startup.js +137 -137
  345. package/lib/types/AppConfiguration.d.ts +34 -34
  346. package/lib/types/AppConfiguration.js +2 -2
  347. package/lib/types/Artifact.d.ts +14 -14
  348. package/lib/types/Artifact.js +9 -9
  349. package/lib/types/BaseReduxState.d.ts +58 -58
  350. package/lib/types/BaseReduxState.js +2 -2
  351. package/lib/types/Client.d.ts +6 -6
  352. package/lib/types/Client.js +2 -2
  353. package/lib/types/Collection.d.ts +184 -184
  354. package/lib/types/Collection.js +2 -2
  355. package/lib/types/Configuration.d.ts +12 -12
  356. package/lib/types/Configuration.js +2 -2
  357. package/lib/types/DeepLinkingResponseRequest.d.ts +4 -4
  358. package/lib/types/DeepLinkingResponseRequest.js +2 -2
  359. package/lib/types/DeletableModel.d.ts +4 -4
  360. package/lib/types/DeletableModel.js +2 -2
  361. package/lib/types/Event.d.ts +13 -13
  362. package/lib/types/Event.js +2 -2
  363. package/lib/types/ExternalGroup.d.ts +14 -14
  364. package/lib/types/ExternalGroup.js +2 -2
  365. package/lib/types/ExternalProvider.d.ts +10 -10
  366. package/lib/types/ExternalProvider.js +2 -2
  367. package/lib/types/ExternalTerm.d.ts +9 -9
  368. package/lib/types/ExternalTerm.js +2 -2
  369. package/lib/types/Group.d.ts +19 -19
  370. package/lib/types/Group.js +2 -2
  371. package/lib/types/IdentityProvider.d.ts +11 -11
  372. package/lib/types/IdentityProvider.js +2 -2
  373. package/lib/types/LtiLaunch.d.ts +20 -20
  374. package/lib/types/LtiLaunch.js +2 -2
  375. package/lib/types/NameOnlyEntity.d.ts +3 -3
  376. package/lib/types/NameOnlyEntity.js +2 -2
  377. package/lib/types/Notification.d.ts +15 -15
  378. package/lib/types/Notification.js +2 -2
  379. package/lib/types/OptionalRecord.d.ts +4 -4
  380. package/lib/types/OptionalRecord.js +2 -2
  381. package/lib/types/OwnerSchedule.d.ts +9 -9
  382. package/lib/types/OwnerSchedule.js +2 -2
  383. package/lib/types/PropertyOfType.d.ts +12 -12
  384. package/lib/types/PropertyOfType.js +2 -2
  385. package/lib/types/Quill.d.ts +9 -9
  386. package/lib/types/Quill.js +2 -2
  387. package/lib/types/RoleDescription.d.ts +4 -4
  388. package/lib/types/RoleDescription.js +2 -2
  389. package/lib/types/Search.d.ts +18 -18
  390. package/lib/types/Search.js +2 -2
  391. package/lib/types/SimpleLocation.d.ts +46 -46
  392. package/lib/types/SimpleLocation.js +2 -2
  393. package/lib/types/UniTime.d.ts +17 -17
  394. package/lib/types/UniTime.js +2 -2
  395. package/lib/types/User.d.ts +69 -69
  396. package/lib/types/User.js +2 -2
  397. package/lib/types/UserRole.d.ts +14 -14
  398. package/lib/types/UserRole.js +2 -2
  399. package/lib/types/auth/AuthAction.d.ts +6 -6
  400. package/lib/types/auth/AuthAction.js +2 -2
  401. package/lib/types/auth/AuthState.d.ts +6 -6
  402. package/lib/types/auth/AuthState.js +2 -2
  403. package/lib/types/auth/ClientCredentials.d.ts +4 -4
  404. package/lib/types/auth/ClientCredentials.js +2 -2
  405. package/lib/types/auth/CodeProviderService.d.ts +4 -4
  406. package/lib/types/auth/CodeProviderService.js +2 -2
  407. package/lib/types/auth/Credentials.d.ts +4 -4
  408. package/lib/types/auth/Credentials.js +2 -2
  409. package/lib/types/auth/TicketProviderService.d.ts +5 -5
  410. package/lib/types/auth/TicketProviderService.js +2 -2
  411. package/lib/types/auth/TokenPersistenceService.d.ts +5 -5
  412. package/lib/types/auth/TokenPersistenceService.js +2 -2
  413. package/lib/types/auth/index.d.ts +7 -7
  414. package/lib/types/auth/index.js +19 -19
  415. package/lib/types/index.d.ts +28 -28
  416. package/lib/types/index.js +40 -40
  417. package/lib/types/net/EndpointConfig.d.ts +8 -8
  418. package/lib/types/net/EndpointConfig.js +2 -2
  419. package/lib/types/net/EndpointMapping.d.ts +7 -7
  420. package/lib/types/net/EndpointMapping.js +2 -2
  421. package/lib/types/net/EndpointMappings.d.ts +7 -7
  422. package/lib/types/net/EndpointMappings.js +2 -2
  423. package/lib/types/net/ErrorHandler.d.ts +3 -3
  424. package/lib/types/net/ErrorHandler.js +2 -2
  425. package/lib/types/net/FetchAction.d.ts +41 -41
  426. package/lib/types/net/FetchAction.js +2 -2
  427. package/lib/types/net/FetchConfig.d.ts +14 -14
  428. package/lib/types/net/FetchConfig.js +2 -2
  429. package/lib/types/net/FetchError.d.ts +7 -7
  430. package/lib/types/net/FetchError.js +5 -5
  431. package/lib/types/net/FetchResult.d.ts +10 -10
  432. package/lib/types/net/FetchResult.js +2 -2
  433. package/lib/types/net/HTTPMethod.d.ts +1 -1
  434. package/lib/types/net/HTTPMethod.js +2 -2
  435. package/lib/types/net/LoggerFunction.d.ts +1 -1
  436. package/lib/types/net/LoggerFunction.js +2 -2
  437. package/lib/types/net/Metadata.d.ts +9 -9
  438. package/lib/types/net/Metadata.js +5 -5
  439. package/lib/types/net/Model.d.ts +12 -12
  440. package/lib/types/net/Model.js +2 -2
  441. package/lib/types/net/ModelCollection.d.ts +13 -13
  442. package/lib/types/net/ModelCollection.js +2 -2
  443. package/lib/types/net/ModelsState.d.ts +8 -8
  444. package/lib/types/net/ModelsState.js +2 -2
  445. package/lib/types/net/OAuthToken.d.ts +12 -12
  446. package/lib/types/net/OAuthToken.js +5 -5
  447. package/lib/types/net/OAuthTokenResponse.d.ts +2 -2
  448. package/lib/types/net/OAuthTokenResponse.js +2 -2
  449. package/lib/types/net/TokenAccessFunction.d.ts +3 -3
  450. package/lib/types/net/TokenAccessFunction.js +2 -2
  451. package/lib/types/net/index.d.ts +17 -17
  452. package/lib/types/net/index.js +29 -29
  453. package/lib/utils/baseActivity.d.ts +62 -62
  454. package/lib/utils/baseActivity.js +152 -152
  455. package/lib/utils/baseRole.d.ts +2 -2
  456. package/lib/utils/baseRole.js +38 -38
  457. package/lib/utils/collection.d.ts +42 -42
  458. package/lib/utils/collection.js +346 -346
  459. package/lib/utils/cookies.d.ts +2 -2
  460. package/lib/utils/cookies.js +18 -18
  461. package/lib/utils/date.d.ts +162 -162
  462. package/lib/utils/date.js +401 -401
  463. package/lib/utils/dom.d.ts +25 -25
  464. package/lib/utils/dom.js +201 -201
  465. package/lib/utils/domainIdentifier.d.ts +2 -2
  466. package/lib/utils/domainIdentifier.js +12 -12
  467. package/lib/utils/entityUserRole.d.ts +3 -3
  468. package/lib/utils/entityUserRole.js +5 -5
  469. package/lib/utils/events.d.ts +6 -6
  470. package/lib/utils/events.js +38 -38
  471. package/lib/utils/externalGroup.d.ts +5 -5
  472. package/lib/utils/externalGroup.js +28 -28
  473. package/lib/utils/externalProviders.d.ts +2 -2
  474. package/lib/utils/externalProviders.js +8 -8
  475. package/lib/utils/externalTerms.d.ts +2 -2
  476. package/lib/utils/externalTerms.js +10 -10
  477. package/lib/utils/group.d.ts +15 -15
  478. package/lib/utils/group.js +15 -15
  479. package/lib/utils/groupDates.d.ts +7 -7
  480. package/lib/utils/groupDates.js +52 -52
  481. package/lib/utils/groupRoles.d.ts +7 -7
  482. package/lib/utils/groupRoles.js +43 -43
  483. package/lib/utils/lockDownBrowser.d.ts +8 -8
  484. package/lib/utils/lockDownBrowser.js +16 -16
  485. package/lib/utils/logger.d.ts +10 -10
  486. package/lib/utils/logger.js +34 -34
  487. package/lib/utils/lti.d.ts +3 -3
  488. package/lib/utils/lti.js +9 -9
  489. package/lib/utils/model.d.ts +15 -15
  490. package/lib/utils/model.js +55 -55
  491. package/lib/utils/number.d.ts +13 -13
  492. package/lib/utils/number.js +32 -32
  493. package/lib/utils/promise.d.ts +5 -5
  494. package/lib/utils/promise.js +17 -17
  495. package/lib/utils/quill.d.ts +9 -9
  496. package/lib/utils/quill.js +12 -12
  497. package/lib/utils/route.d.ts +5 -5
  498. package/lib/utils/route.js +69 -69
  499. package/lib/utils/search.d.ts +28 -28
  500. package/lib/utils/search.js +96 -96
  501. package/lib/utils/shard.d.ts +3 -3
  502. package/lib/utils/shard.js +48 -48
  503. package/lib/utils/sort.d.ts +11 -11
  504. package/lib/utils/sort.js +69 -69
  505. package/lib/utils/string.d.ts +2 -2
  506. package/lib/utils/string.js +16 -16
  507. package/lib/utils/table.d.ts +7 -7
  508. package/lib/utils/table.js +42 -42
  509. package/lib/utils/timezone.d.ts +2 -2
  510. package/lib/utils/timezone.js +32 -32
  511. package/lib/utils/url.d.ts +29 -29
  512. package/lib/utils/url.js +211 -211
  513. package/lib/utils/user.d.ts +8 -8
  514. package/lib/utils/user.js +72 -72
  515. package/lib/utils/userAgent.d.ts +2 -2
  516. package/lib/utils/userAgent.js +15 -15
  517. package/lib/utils/userRole.d.ts +27 -27
  518. package/lib/utils/userRole.js +68 -68
  519. package/package.json +200 -200
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2019 Purdue Informatics / StudioKit
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2019 Purdue Informatics / StudioKit
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,134 +1,134 @@
1
- # studiokit-scaffolding-js
2
-
3
- **studiokit-scaffolding-js** provides a common scaffolding for react apps.
4
-
5
- 1. [Installation](#installation)
6
- 1. [Usage](#usage)
7
- 1. [Development](#development)
8
-
9
- # Installation
10
-
11
- ## Install this library and call startup methods
12
- 1. `yarn add studiokit-scaffolding-js`
13
- 1. (Optional) Call configurable extensions in your main entry file
14
- * `redux/sagas/rootSaga`
15
- * `setOtherDependentSagas` to add more sagas
16
- * `redux/sagas/postLoginDataSaga`
17
- * `setOnPostLogin` to load more data after login
18
- * `redux/configureReducers`
19
- * `updatePersistBlacklist` and `setOtherReducers` to add more reducers
20
- 1. In your main entry file call `startup`
21
- ```js
22
- import { startup, endpointMappings } from 'studiokit-scaffolding-js'
23
-
24
- const appConfig = {/* AppConfiguration */}
25
- const endpointMappings = {...endpointMappings, .../* App EndpointMappings */}
26
- const { history, store, persistor } = startup(appConfig, endpointMappings)
27
-
28
- // render using history, store, persistor
29
- ReactDOM.render(
30
- ...
31
- )
32
- ```
33
- ## Styles
34
-
35
- ### Basic Setup
36
-
37
- In your project’s startup `index.tsx` file, import the scaffolding styles as follows
38
-
39
- ```ts
40
- ...third party css...
41
-
42
- import 'studiokit-scaffolding-js/lib/css/index-with-variables.css'
43
-
44
- ...project specific css...
45
- ```
46
-
47
- In `config-overrides.js` when setting up `react-app-require-postcss`, in order for css variables to work, the `importFrom` array should look like the following:
48
-
49
- ```js
50
- importFrom: [
51
- 'node_modules/studiokit-scaffolding-js/lib/css/variables.css'
52
- ]
53
- ```
54
- ### Variable Override Setup
55
-
56
- In order to override certain color variables from `variables.css`, they must be overridden _before_ scaffolding’s `index.css` file is imported.
57
-
58
- In your project’s startup `index.tsx` file, import the scaffolding styles as follows
59
-
60
- ```ts
61
- ...third party css...
62
-
63
- import 'studiokit-scaffolding-js/lib/css/variables.css'
64
- import './css/variables.css'
65
- import 'studiokit-scaffolding-js/lib/css/index.css'
66
- import './css/index.css'
67
- ```
68
-
69
- In `config-overrides.js` when setting up `react-app-require-postcss`, in order for css variables to work, the `importFrom` array should look like the following:
70
-
71
- ```js
72
- importFrom: [
73
- 'node_modules/studiokit-scaffolding-js/lib/css/variables.css',
74
- 'src/css/variables.css'
75
- ]
76
- ```
77
-
78
- # Usage
79
-
80
- ## Components and Utils
81
-
82
- Components and utils can be imported from `studiokit-scaffolding-js/lib/...`
83
-
84
- # Development
85
-
86
- ## Branches
87
-
88
- 1. Create a new branch
89
- * **Feature/Issue**: In GitLab from an issue, create a branch off of `develop`
90
- * **Hotfix**: Create a `hotfix` branch off of `master` (manually or in GitLab by making an MR)
91
- 1. Update the version number
92
- * **Feature/Issue**
93
- * append `-next.1.1`
94
- * e.g. If the current version is `1.0.0`, the new branch should be `1.0.0-next.1.1`
95
- * **Hotfix**
96
- * increase the version number and append `-alpha.1`
97
- * e.g. If the current version is `1.0.0`, the new branch should be `1.0.1-alpha.1` for hotfix
98
- * **NOTE:** if **more than one** branch is being developed on at the same time, simply increment the **first** number after "next"
99
- * e.g. `1.0.0-next.2.1` for the second issue branch (this won't apply for hotfixes)
100
- 1. Development Loop
101
- 1. Add/update new components, utils, or styles
102
- 1. Add/update unit tests for those components or utils to confirm basic functionality
103
- 1. Increment the **last** number in the version
104
- * e.g. `1.0.0-next.2.1` => `1.0.0-next.2.2` for a feature/issue branch
105
- * e.g. `1.0.1-alpha.1` => `1.0.1-alpha.2` for a hotfix branch
106
- 1. Push to gitlab. Azure DevOps will run a pipeline and publish this version to npmjs.org
107
- 1. Install the new version in the project(s) you are working on by updating its `package.json` and running `yarn`
108
- 1. Repeat as needed
109
- 1. Merging
110
- * After the Merge Request is approved, **remove** the "next" or "alpha" suffix from the version **before** merging to develop or master
111
- * For **hotfix** branches, the version number should be the new patch number, e.g. `1.0.1`
112
- 1. Release
113
- * **Feature/Issue**: After merging, create a new "release" branch from `develop` and follow the "git flow" release steps as normal
114
- * **Hotfix**: Finish the "git flow" hotfix steps as normal from the hotfix branch
115
- * Azure DevOps will run a pipeline to publish the version merged to `master` to npmjs.org
116
-
117
- ## Styles
118
-
119
- Styles are organized into the following folders and files inside of `src/css`
120
-
121
- 1. `variables.css`
122
- * Global constant variables
123
- * Common app-specific variables
124
- 1. `utils`
125
- * Assorted utility styles, similar to tachyons
126
- * Break out similar styles into separate files once a few similar ones exist
127
- * e.g. `_display.css` contains all `display: ...;` related modifier styles
128
- 1. `base`
129
- * `_base.css`: Generic tags, .skip-main link, and .main-content
130
- * `_typography.css`: Default fonts, font scale, and text colors
131
- 1. `components`
132
- * Global component specific styles (e.g. not functional like tachyons)
133
-
134
- Your project’s css folders and files should follow this same pattern.
1
+ # studiokit-scaffolding-js
2
+
3
+ **studiokit-scaffolding-js** provides a common scaffolding for react apps.
4
+
5
+ 1. [Installation](#installation)
6
+ 1. [Usage](#usage)
7
+ 1. [Development](#development)
8
+
9
+ # Installation
10
+
11
+ ## Install this library and call startup methods
12
+ 1. `yarn add studiokit-scaffolding-js`
13
+ 1. (Optional) Call configurable extensions in your main entry file
14
+ * `redux/sagas/rootSaga`
15
+ * `setOtherDependentSagas` to add more sagas
16
+ * `redux/sagas/postLoginDataSaga`
17
+ * `setOnPostLogin` to load more data after login
18
+ * `redux/configureReducers`
19
+ * `updatePersistBlacklist` and `setOtherReducers` to add more reducers
20
+ 1. In your main entry file call `startup`
21
+ ```js
22
+ import { startup, endpointMappings } from 'studiokit-scaffolding-js'
23
+
24
+ const appConfig = {/* AppConfiguration */}
25
+ const endpointMappings = {...endpointMappings, .../* App EndpointMappings */}
26
+ const { history, store, persistor } = startup(appConfig, endpointMappings)
27
+
28
+ // render using history, store, persistor
29
+ ReactDOM.render(
30
+ ...
31
+ )
32
+ ```
33
+ ## Styles
34
+
35
+ ### Basic Setup
36
+
37
+ In your project’s startup `index.tsx` file, import the scaffolding styles as follows
38
+
39
+ ```ts
40
+ ...third party css...
41
+
42
+ import 'studiokit-scaffolding-js/lib/css/index-with-variables.css'
43
+
44
+ ...project specific css...
45
+ ```
46
+
47
+ In `config-overrides.js` when setting up `react-app-require-postcss`, in order for css variables to work, the `importFrom` array should look like the following:
48
+
49
+ ```js
50
+ importFrom: [
51
+ 'node_modules/studiokit-scaffolding-js/lib/css/variables.css'
52
+ ]
53
+ ```
54
+ ### Variable Override Setup
55
+
56
+ In order to override certain color variables from `variables.css`, they must be overridden _before_ scaffolding’s `index.css` file is imported.
57
+
58
+ In your project’s startup `index.tsx` file, import the scaffolding styles as follows
59
+
60
+ ```ts
61
+ ...third party css...
62
+
63
+ import 'studiokit-scaffolding-js/lib/css/variables.css'
64
+ import './css/variables.css'
65
+ import 'studiokit-scaffolding-js/lib/css/index.css'
66
+ import './css/index.css'
67
+ ```
68
+
69
+ In `config-overrides.js` when setting up `react-app-require-postcss`, in order for css variables to work, the `importFrom` array should look like the following:
70
+
71
+ ```js
72
+ importFrom: [
73
+ 'node_modules/studiokit-scaffolding-js/lib/css/variables.css',
74
+ 'src/css/variables.css'
75
+ ]
76
+ ```
77
+
78
+ # Usage
79
+
80
+ ## Components and Utils
81
+
82
+ Components and utils can be imported from `studiokit-scaffolding-js/lib/...`
83
+
84
+ # Development
85
+
86
+ ## Branches
87
+
88
+ 1. Create a new branch
89
+ * **Feature/Issue**: In GitLab from an issue, create a branch off of `develop`
90
+ * **Hotfix**: Create a `hotfix` branch off of `master` (manually or in GitLab by making an MR)
91
+ 1. Update the version number
92
+ * **Feature/Issue**
93
+ * append `-next.1.1`
94
+ * e.g. If the current version is `1.0.0`, the new branch should be `1.0.0-next.1.1`
95
+ * **Hotfix**
96
+ * increase the version number and append `-alpha.1`
97
+ * e.g. If the current version is `1.0.0`, the new branch should be `1.0.1-alpha.1` for hotfix
98
+ * **NOTE:** if **more than one** branch is being developed on at the same time, simply increment the **first** number after "next"
99
+ * e.g. `1.0.0-next.2.1` for the second issue branch (this won't apply for hotfixes)
100
+ 1. Development Loop
101
+ 1. Add/update new components, utils, or styles
102
+ 1. Add/update unit tests for those components or utils to confirm basic functionality
103
+ 1. Increment the **last** number in the version
104
+ * e.g. `1.0.0-next.2.1` => `1.0.0-next.2.2` for a feature/issue branch
105
+ * e.g. `1.0.1-alpha.1` => `1.0.1-alpha.2` for a hotfix branch
106
+ 1. Push to gitlab. Azure DevOps will run a pipeline and publish this version to npmjs.org
107
+ 1. Install the new version in the project(s) you are working on by updating its `package.json` and running `yarn`
108
+ 1. Repeat as needed
109
+ 1. Merging
110
+ * After the Merge Request is approved, **remove** the "next" or "alpha" suffix from the version **before** merging to develop or master
111
+ * For **hotfix** branches, the version number should be the new patch number, e.g. `1.0.1`
112
+ 1. Release
113
+ * **Feature/Issue**: After merging, create a new "release" branch from `develop` and follow the "git flow" release steps as normal
114
+ * **Hotfix**: Finish the "git flow" hotfix steps as normal from the hotfix branch
115
+ * Azure DevOps will run a pipeline to publish the version merged to `master` to npmjs.org
116
+
117
+ ## Styles
118
+
119
+ Styles are organized into the following folders and files inside of `src/css`
120
+
121
+ 1. `variables.css`
122
+ * Global constant variables
123
+ * Common app-specific variables
124
+ 1. `utils`
125
+ * Assorted utility styles, similar to tachyons
126
+ * Break out similar styles into separate files once a few similar ones exist
127
+ * e.g. `_display.css` contains all `display: ...;` related modifier styles
128
+ 1. `base`
129
+ * `_base.css`: Generic tags, .skip-main link, and .main-content
130
+ * `_typography.css`: Default fonts, font scale, and text colors
131
+ 1. `components`
132
+ * Global component specific styles (e.g. not functional like tachyons)
133
+
134
+ Your project’s css folders and files should follow this same pattern.
@@ -1,20 +1,20 @@
1
- import { FunctionComponent } from 'react';
2
- import { Model } from '../types';
3
- export interface ActionListProps {
4
- actions?: ListAction[];
5
- model: Model | null;
6
- className?: string;
7
- /** Even when there is a single ListAction, show the kebab menu */
8
- alwaysShowKebab?: boolean;
9
- }
10
- export interface ListAction {
11
- predicate: boolean;
12
- action: () => void;
13
- name: string;
14
- icon: JSX.Element;
15
- className: string;
16
- id: string;
17
- isDefault?: boolean;
18
- disabled?: boolean;
19
- }
20
- export declare const ActionList: FunctionComponent<ActionListProps>;
1
+ import { FunctionComponent } from 'react';
2
+ import { Model } from '../types';
3
+ export interface ActionListProps {
4
+ actions?: ListAction[];
5
+ model: Model | null;
6
+ className?: string;
7
+ /** Even when there is a single ListAction, show the kebab menu */
8
+ alwaysShowKebab?: boolean;
9
+ }
10
+ export interface ListAction {
11
+ predicate: boolean;
12
+ action: () => void;
13
+ name: string;
14
+ icon: JSX.Element;
15
+ className: string;
16
+ id: string;
17
+ isDefault?: boolean;
18
+ disabled?: boolean;
19
+ }
20
+ export declare const ActionList: FunctionComponent<ActionListProps>;
@@ -1,94 +1,94 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
16
- }) : (function(o, m, k, k2) {
17
- if (k2 === undefined) k2 = k;
18
- o[k2] = m[k];
19
- }));
20
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
- Object.defineProperty(o, "default", { enumerable: true, value: v });
22
- }) : function(o, v) {
23
- o["default"] = v;
24
- });
25
- var __importStar = (this && this.__importStar) || function (mod) {
26
- if (mod && mod.__esModule) return mod;
27
- var result = {};
28
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
29
- __setModuleDefault(result, mod);
30
- return result;
31
- };
32
- var __spreadArrays = (this && this.__spreadArrays) || function () {
33
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
34
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
35
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
36
- r[k] = a[j];
37
- return r;
38
- };
39
- var __importDefault = (this && this.__importDefault) || function (mod) {
40
- return (mod && mod.__esModule) ? mod : { "default": mod };
41
- };
42
- Object.defineProperty(exports, "__esModule", { value: true });
43
- exports.ActionList = void 0;
44
- var core_1 = require("@material-ui/core");
45
- var MoreVert_1 = __importDefault(require("@material-ui/icons/MoreVert"));
46
- var react_1 = __importStar(require("react"));
47
- var ActionList = function (_a) {
48
- var _b = _a.actions, actions = _b === void 0 ? [] : _b, _c = _a.model, model = _c === void 0 ? null : _c, className = _a.className, alwaysShowKebab = _a.alwaysShowKebab;
49
- var anchorRef = react_1.default.useRef(null);
50
- var _d = react_1.useState(undefined), infoMenuAnchorElement = _d[0], setInfoMenuAnchorElement = _d[1];
51
- var onActionItemClick = function (action) { return function () {
52
- setInfoMenuAnchorElement(undefined);
53
- action === null || action === void 0 ? void 0 : action();
54
- }; };
55
- var handleListKeyDown = function (event) {
56
- var _a;
57
- if (event.key === 'Tab' || event.key === 'Escape' || event.key === 'Esc') {
58
- event.preventDefault();
59
- setInfoMenuAnchorElement(undefined);
60
- (_a = anchorRef.current) === null || _a === void 0 ? void 0 : _a.focus();
61
- }
62
- };
63
- var allowedActions = actions.filter(function (a) { return a.predicate; });
64
- var actionCount = allowedActions.length;
65
- var defaultAction = actionCount === 1 && !alwaysShowKebab ? allowedActions[0] : allowedActions.find(function (a) { return !!a.isDefault; });
66
- if (defaultAction) {
67
- allowedActions = allowedActions.filter(function (a) { return a !== defaultAction; });
68
- }
69
- return (react_1.default.createElement("div", { className: !!defaultAction && !!model && (actionCount > 1 || alwaysShowKebab) ? 'inline-flex' : 'di' },
70
- !!defaultAction && (react_1.default.createElement(core_1.Button, { color: "primary", onClick: defaultAction.action, id: defaultAction.id, className: defaultAction.className || '', disabled: defaultAction.disabled },
71
- defaultAction.icon,
72
- defaultAction.name)),
73
- !!model && (actionCount > 1 || alwaysShowKebab) && (react_1.default.createElement(react_1.default.Fragment, null,
74
- react_1.default.createElement(core_1.Button, { ref: anchorRef, onClick: function (event) { return setInfoMenuAnchorElement(event.currentTarget); }, "aria-label": "Actions", "aria-haspopup": "true", "aria-controls": infoMenuAnchorElement ? "info-menu-" + model.id : undefined, className: "action-list-text-button" + (defaultAction ? ' with-default-action' : ''), color: "primary" },
75
- "Actions",
76
- react_1.default.createElement(MoreVert_1.default, { color: "primary" })),
77
- react_1.default.createElement(core_1.IconButton, { ref: anchorRef, onClick: function (event) { return setInfoMenuAnchorElement(event.currentTarget); }, "aria-label": "Actions", "aria-haspopup": "true", "aria-controls": infoMenuAnchorElement ? "info-menu-" + model.id : undefined, className: "action-list-icon-button" + (defaultAction ? ' with-default-action' : '') },
78
- react_1.default.createElement(MoreVert_1.default, { color: "primary" })),
79
- react_1.default.createElement(core_1.Popper, { open: !!infoMenuAnchorElement, anchorEl: infoMenuAnchorElement, placement: "bottom-end", className: "z-1" + (className ? " " + className : ''), transition: true }, function (_a) {
80
- var TransitionProps = _a.TransitionProps, placement = _a.placement;
81
- return (react_1.default.createElement(core_1.Grow, __assign({}, TransitionProps, { style: { transformOrigin: placement === 'bottom-end' ? 'top right' : 'bottom right' } }),
82
- react_1.default.createElement(core_1.Paper, null,
83
- react_1.default.createElement(core_1.ClickAwayListener, { onClickAway: onActionItemClick() },
84
- react_1.default.createElement(core_1.MenuList, { id: "info-menu-" + model.id, autoFocusItem: !!infoMenuAnchorElement, onKeyDown: handleListKeyDown, className: "action-list shadow-large" }, allowedActions.map(function (a, index) {
85
- return a.predicate
86
- ? __spreadArrays((index > 0 ? [react_1.default.createElement(core_1.Divider, null)] : []), [
87
- react_1.default.createElement(core_1.MenuItem, { key: a.id, className: "action-list-menu mv1 pv2 " + a.className, onClick: onActionItemClick(a.action), color: "primary", disabled: a.disabled },
88
- a.icon,
89
- a.name)
90
- ]) : undefined;
91
- }))))));
92
- })))));
93
- };
94
- exports.ActionList = ActionList;
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
22
+ }) : function(o, v) {
23
+ o["default"] = v;
24
+ });
25
+ var __importStar = (this && this.__importStar) || function (mod) {
26
+ if (mod && mod.__esModule) return mod;
27
+ var result = {};
28
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
29
+ __setModuleDefault(result, mod);
30
+ return result;
31
+ };
32
+ var __spreadArrays = (this && this.__spreadArrays) || function () {
33
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
34
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
35
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
36
+ r[k] = a[j];
37
+ return r;
38
+ };
39
+ var __importDefault = (this && this.__importDefault) || function (mod) {
40
+ return (mod && mod.__esModule) ? mod : { "default": mod };
41
+ };
42
+ Object.defineProperty(exports, "__esModule", { value: true });
43
+ exports.ActionList = void 0;
44
+ var core_1 = require("@material-ui/core");
45
+ var MoreVert_1 = __importDefault(require("@material-ui/icons/MoreVert"));
46
+ var react_1 = __importStar(require("react"));
47
+ var ActionList = function (_a) {
48
+ var _b = _a.actions, actions = _b === void 0 ? [] : _b, _c = _a.model, model = _c === void 0 ? null : _c, className = _a.className, alwaysShowKebab = _a.alwaysShowKebab;
49
+ var anchorRef = react_1.default.useRef(null);
50
+ var _d = react_1.useState(undefined), infoMenuAnchorElement = _d[0], setInfoMenuAnchorElement = _d[1];
51
+ var onActionItemClick = function (action) { return function () {
52
+ setInfoMenuAnchorElement(undefined);
53
+ action === null || action === void 0 ? void 0 : action();
54
+ }; };
55
+ var handleListKeyDown = function (event) {
56
+ var _a;
57
+ if (event.key === 'Tab' || event.key === 'Escape' || event.key === 'Esc') {
58
+ event.preventDefault();
59
+ setInfoMenuAnchorElement(undefined);
60
+ (_a = anchorRef.current) === null || _a === void 0 ? void 0 : _a.focus();
61
+ }
62
+ };
63
+ var allowedActions = actions.filter(function (a) { return a.predicate; });
64
+ var actionCount = allowedActions.length;
65
+ var defaultAction = actionCount === 1 && !alwaysShowKebab ? allowedActions[0] : allowedActions.find(function (a) { return !!a.isDefault; });
66
+ if (defaultAction) {
67
+ allowedActions = allowedActions.filter(function (a) { return a !== defaultAction; });
68
+ }
69
+ return (react_1.default.createElement("div", { className: !!defaultAction && !!model && (actionCount > 1 || alwaysShowKebab) ? 'inline-flex' : 'di' },
70
+ !!defaultAction && (react_1.default.createElement(core_1.Button, { color: "primary", onClick: defaultAction.action, id: defaultAction.id, className: defaultAction.className || '', disabled: defaultAction.disabled },
71
+ defaultAction.icon,
72
+ defaultAction.name)),
73
+ !!model && (actionCount > 1 || alwaysShowKebab) && (react_1.default.createElement(react_1.default.Fragment, null,
74
+ react_1.default.createElement(core_1.Button, { ref: anchorRef, onClick: function (event) { return setInfoMenuAnchorElement(event.currentTarget); }, "aria-label": "Actions", "aria-haspopup": "true", "aria-controls": infoMenuAnchorElement ? "info-menu-" + model.id : undefined, className: "action-list-text-button" + (defaultAction ? ' with-default-action' : ''), color: "primary" },
75
+ "Actions",
76
+ react_1.default.createElement(MoreVert_1.default, { color: "primary" })),
77
+ react_1.default.createElement(core_1.IconButton, { ref: anchorRef, onClick: function (event) { return setInfoMenuAnchorElement(event.currentTarget); }, "aria-label": "Actions", "aria-haspopup": "true", "aria-controls": infoMenuAnchorElement ? "info-menu-" + model.id : undefined, className: "action-list-icon-button" + (defaultAction ? ' with-default-action' : '') },
78
+ react_1.default.createElement(MoreVert_1.default, { color: "primary" })),
79
+ react_1.default.createElement(core_1.Popper, { open: !!infoMenuAnchorElement, anchorEl: infoMenuAnchorElement, placement: "bottom-end", className: "z-1" + (className ? " " + className : ''), transition: true }, function (_a) {
80
+ var TransitionProps = _a.TransitionProps, placement = _a.placement;
81
+ return (react_1.default.createElement(core_1.Grow, __assign({}, TransitionProps, { style: { transformOrigin: placement === 'bottom-end' ? 'top right' : 'bottom right' } }),
82
+ react_1.default.createElement(core_1.Paper, null,
83
+ react_1.default.createElement(core_1.ClickAwayListener, { onClickAway: onActionItemClick() },
84
+ react_1.default.createElement(core_1.MenuList, { id: "info-menu-" + model.id, autoFocusItem: !!infoMenuAnchorElement, onKeyDown: handleListKeyDown, className: "action-list shadow-large" }, allowedActions.map(function (a, index) {
85
+ return a.predicate
86
+ ? __spreadArrays((index > 0 ? [react_1.default.createElement(core_1.Divider, null)] : []), [
87
+ react_1.default.createElement(core_1.MenuItem, { key: a.id, className: "action-list-menu mv1 pv2 " + a.className, onClick: onActionItemClick(a.action), color: "primary", disabled: a.disabled },
88
+ a.icon,
89
+ a.name)
90
+ ]) : undefined;
91
+ }))))));
92
+ })))));
93
+ };
94
+ exports.ActionList = ActionList;
@@ -1,17 +1,17 @@
1
- import { FunctionComponent, MouseEventHandler } from 'react';
2
- export interface AlertDialogProps {
3
- id?: string;
4
- isOpen: boolean;
5
- title: string | JSX.Element;
6
- description?: string | JSX.Element | void;
7
- onProceed?: MouseEventHandler<HTMLElement>;
8
- proceedText?: string;
9
- /** onCancel is needed for closing using the X button, clicking the backdrop, or clicking the cancel button*/
10
- onCancel: MouseEventHandler<HTMLElement>;
11
- cancelText?: string;
12
- hideCancel?: boolean;
13
- onDestroy?: MouseEventHandler<HTMLElement>;
14
- destroyText?: string;
15
- manualBackground?: boolean;
16
- }
17
- export declare const AlertDialog: FunctionComponent<AlertDialogProps>;
1
+ import { FunctionComponent, MouseEventHandler } from 'react';
2
+ export interface AlertDialogProps {
3
+ id?: string;
4
+ isOpen: boolean;
5
+ title: string | JSX.Element;
6
+ description?: string | JSX.Element | void;
7
+ onProceed?: MouseEventHandler<HTMLElement>;
8
+ proceedText?: string;
9
+ /** onCancel is needed for closing using the X button, clicking the backdrop, or clicking the cancel button*/
10
+ onCancel: MouseEventHandler<HTMLElement>;
11
+ cancelText?: string;
12
+ hideCancel?: boolean;
13
+ onDestroy?: MouseEventHandler<HTMLElement>;
14
+ destroyText?: string;
15
+ manualBackground?: boolean;
16
+ }
17
+ export declare const AlertDialog: FunctionComponent<AlertDialogProps>;
@@ -1,22 +1,22 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.AlertDialog = void 0;
7
- var Button_1 = __importDefault(require("@material-ui/core/Button"));
8
- var react_1 = __importDefault(require("react"));
9
- var react_bootstrap_1 = require("react-bootstrap");
10
- var ConnectedModal_1 = __importDefault(require("./ConnectedModal"));
11
- var AlertDialog = function (props) {
12
- var isOpen = props.isOpen, title = props.title, description = props.description, onProceed = props.onProceed, proceedText = props.proceedText, onCancel = props.onCancel, cancelText = props.cancelText, hideCancel = props.hideCancel, onDestroy = props.onDestroy, destroyText = props.destroyText, manualBackground = props.manualBackground;
13
- return (react_1.default.createElement(ConnectedModal_1.default, { show: isOpen, onHide: onCancel, className: "z-9999" + (manualBackground ? ' bg-black-50' : '') },
14
- react_1.default.createElement(react_bootstrap_1.Modal.Header, { closeButton: true },
15
- react_1.default.createElement(react_bootstrap_1.Modal.Title, null, title)),
16
- !!description && react_1.default.createElement(react_bootstrap_1.Modal.Body, null, description),
17
- react_1.default.createElement(react_bootstrap_1.Modal.Footer, null,
18
- !!onProceed && (react_1.default.createElement(Button_1.default, { id: "alert-dialog-proceed-btn", "aria-label": proceedText || 'Confirm', className: "btn-primary ttc fr mb1", color: "primary", onClick: onProceed }, proceedText || 'Confirm')),
19
- !hideCancel && (react_1.default.createElement(Button_1.default, { id: "alert-dialog-cancel-btn", color: "primary", "aria-label": cancelText || 'Cancel', className: "btn-text ttc" + (onDestroy ? ' fr' : ' fl') + " " + (onProceed ? ' mr1' : ''), onClick: onCancel }, cancelText || 'Cancel')),
20
- !!onDestroy && (react_1.default.createElement(Button_1.default, { id: "alert-dialog-destroy-btn", "aria-label": destroyText || 'Destroy', color: "secondary", className: "btn-text color-red ttc fl", onClick: onDestroy }, destroyText || 'Destroy')))));
21
- };
22
- exports.AlertDialog = AlertDialog;
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.AlertDialog = void 0;
7
+ var Button_1 = __importDefault(require("@material-ui/core/Button"));
8
+ var react_1 = __importDefault(require("react"));
9
+ var react_bootstrap_1 = require("react-bootstrap");
10
+ var ConnectedModal_1 = __importDefault(require("./ConnectedModal"));
11
+ var AlertDialog = function (props) {
12
+ var isOpen = props.isOpen, title = props.title, description = props.description, onProceed = props.onProceed, proceedText = props.proceedText, onCancel = props.onCancel, cancelText = props.cancelText, hideCancel = props.hideCancel, onDestroy = props.onDestroy, destroyText = props.destroyText, manualBackground = props.manualBackground;
13
+ return (react_1.default.createElement(ConnectedModal_1.default, { show: isOpen, onHide: onCancel, className: "z-9999" + (manualBackground ? ' bg-black-50' : '') },
14
+ react_1.default.createElement(react_bootstrap_1.Modal.Header, { closeButton: true },
15
+ react_1.default.createElement(react_bootstrap_1.Modal.Title, null, title)),
16
+ !!description && react_1.default.createElement(react_bootstrap_1.Modal.Body, null, description),
17
+ react_1.default.createElement(react_bootstrap_1.Modal.Footer, null,
18
+ !!onProceed && (react_1.default.createElement(Button_1.default, { id: "alert-dialog-proceed-btn", "aria-label": proceedText || 'Confirm', className: "btn-primary ttc fr mb1", color: "primary", onClick: onProceed }, proceedText || 'Confirm')),
19
+ !hideCancel && (react_1.default.createElement(Button_1.default, { id: "alert-dialog-cancel-btn", color: "primary", "aria-label": cancelText || 'Cancel', className: "btn-text ttc" + (onDestroy ? ' fr' : ' fl') + " " + (onProceed ? ' mr1' : ''), onClick: onCancel }, cancelText || 'Cancel')),
20
+ !!onDestroy && (react_1.default.createElement(Button_1.default, { id: "alert-dialog-destroy-btn", "aria-label": destroyText || 'Destroy', color: "secondary", className: "btn-text color-red ttc fl", onClick: onDestroy }, destroyText || 'Destroy')))));
21
+ };
22
+ exports.AlertDialog = AlertDialog;