studiokit-scaffolding-js 7.0.12-next.1.5 → 7.0.12-next.1.7

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 (39) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +137 -137
  3. package/lib/components/ActionList.js +1 -5
  4. package/lib/components/Dropdowns/UserDropdown.js +1 -3
  5. package/lib/components/Groups/CreateEditCopySaveButtons.js +1 -5
  6. package/lib/components/Groups/ExternalGroups/Attach.js +1 -3
  7. package/lib/components/Groups/RosterSyncInfo.js +1 -7
  8. package/lib/components/HOC/SearchPersistorComponent.js +2 -2
  9. package/lib/components/Impersonation/UserDetail.css +22 -22
  10. package/lib/components/Notifications.d.ts +1 -1
  11. package/lib/components/Notifications.js +2 -2
  12. package/lib/components/Quill/ImageDropModule.js +1 -1
  13. package/lib/components/Quill/TableModule/index.css +171 -171
  14. package/lib/css/base/_base.css +98 -98
  15. package/lib/css/base/_typography.css +130 -130
  16. package/lib/css/components/_alert.css +86 -86
  17. package/lib/css/components/_bootstrap-grid.css +28 -28
  18. package/lib/css/components/_buttons.css +397 -397
  19. package/lib/css/components/_forms.css +101 -101
  20. package/lib/css/components/_menu.css +56 -56
  21. package/lib/css/components/_modals.css +46 -46
  22. package/lib/css/components/_quill.css +315 -315
  23. package/lib/css/components/_tables.css +497 -497
  24. package/lib/css/components/_tags.css +12 -12
  25. package/lib/css/index-with-variables.css +15 -15
  26. package/lib/css/index.css +14 -14
  27. package/lib/css/utils/_border.css +463 -463
  28. package/lib/css/utils/_color.css +317 -317
  29. package/lib/css/utils/_display.css +305 -305
  30. package/lib/css/utils/_general.css +48 -48
  31. package/lib/css/utils/_icon.css +16 -16
  32. package/lib/css/utils/_text.css +25 -25
  33. package/lib/css/utils/_width.css +60 -60
  34. package/lib/css/variables.css +84 -84
  35. package/lib/hooks/usePrevious.d.ts +14 -1
  36. package/lib/hooks/usePrevious.js +23 -1
  37. package/lib/utils/fetch.js +9 -7
  38. package/lib/utils/url.d.ts +2 -2
  39. package/package.json +214 -214
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,137 +1,137 @@
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
- * As an alternative to the two steps above, if you don't need to make changes available to other devs yet you can:
109
- 1. In the studiokit directory, run `yarn build` then `yarn pack`. You'll still need to have incremented the version number to avoid having it cached.
110
- 1. Over in the Circuit/Variate/etc. directory, run `yarn add ../studiokit-scaffolding-js/package.tgz`.
111
- 1. Repeat as needed
112
- 1. Merging
113
- * After the Merge Request is approved, **remove** the "next" or "alpha" suffix from the version **before** merging to develop or master
114
- * For **hotfix** branches, the version number should be the new patch number, e.g. `1.0.1`
115
- 1. Release
116
- * **Feature/Issue**: After merging, create a new "release" branch from `develop` and follow the "git flow" release steps as normal
117
- * **Hotfix**: Finish the "git flow" hotfix steps as normal from the hotfix branch
118
- * Azure DevOps will run a pipeline to publish the version merged to `master` to npmjs.org
119
-
120
- ## Styles
121
-
122
- Styles are organized into the following folders and files inside of `src/css`
123
-
124
- 1. `variables.css`
125
- * Global constant variables
126
- * Common app-specific variables
127
- 1. `utils`
128
- * Assorted utility styles, similar to tachyons
129
- * Break out similar styles into separate files once a few similar ones exist
130
- * e.g. `_display.css` contains all `display: ...;` related modifier styles
131
- 1. `base`
132
- * `_base.css`: Generic tags, .skip-main link, and .main-content
133
- * `_typography.css`: Default fonts, font scale, and text colors
134
- 1. `components`
135
- * Global component specific styles (e.g. not functional like tachyons)
136
-
137
- 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
+ * As an alternative to the two steps above, if you don't need to make changes available to other devs yet you can:
109
+ 1. In the studiokit directory, run `yarn build` then `yarn pack`. You'll still need to have incremented the version number to avoid having it cached.
110
+ 1. Over in the Circuit/Variate/etc. directory, run `yarn add ../studiokit-scaffolding-js/package.tgz`.
111
+ 1. Repeat as needed
112
+ 1. Merging
113
+ * After the Merge Request is approved, **remove** the "next" or "alpha" suffix from the version **before** merging to develop or master
114
+ * For **hotfix** branches, the version number should be the new patch number, e.g. `1.0.1`
115
+ 1. Release
116
+ * **Feature/Issue**: After merging, create a new "release" branch from `develop` and follow the "git flow" release steps as normal
117
+ * **Hotfix**: Finish the "git flow" hotfix steps as normal from the hotfix branch
118
+ * Azure DevOps will run a pipeline to publish the version merged to `master` to npmjs.org
119
+
120
+ ## Styles
121
+
122
+ Styles are organized into the following folders and files inside of `src/css`
123
+
124
+ 1. `variables.css`
125
+ * Global constant variables
126
+ * Common app-specific variables
127
+ 1. `utils`
128
+ * Assorted utility styles, similar to tachyons
129
+ * Break out similar styles into separate files once a few similar ones exist
130
+ * e.g. `_display.css` contains all `display: ...;` related modifier styles
131
+ 1. `base`
132
+ * `_base.css`: Generic tags, .skip-main link, and .main-content
133
+ * `_typography.css`: Default fonts, font scale, and text colors
134
+ 1. `components`
135
+ * Global component specific styles (e.g. not functional like tachyons)
136
+
137
+ Your project’s css folders and files should follow this same pattern.
@@ -27,11 +27,7 @@ const ActionList = ({ actions = [], model = null, className, alwaysShowKebab })
27
27
  if (defaultAction) {
28
28
  allowedActions = allowedActions.filter(a => a !== defaultAction);
29
29
  }
30
- return ((0, jsx_runtime_1.jsxs)("div", { className: !!defaultAction && !!model && (actionCount > 1 || alwaysShowKebab) ? 'inline-flex' : 'di', children: [!!defaultAction && ((0, jsx_runtime_1.jsxs)(core_1.Button, { color: "primary", onClick: defaultAction.action, id: defaultAction.id, className: defaultAction.className || '', disabled: defaultAction.disabled, children: [defaultAction.icon, defaultAction.name] })), !!model && (actionCount > 1 || alwaysShowKebab) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(core_1.Button, { ref: anchorRef, onClick: event => {
31
- setInfoMenuAnchorElement(event.currentTarget);
32
- }, "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", children: ["Actions", (0, jsx_runtime_1.jsx)(MoreVert_1.default, { color: "primary" })] }), (0, jsx_runtime_1.jsx)(core_1.IconButton, { ref: anchorRef, onClick: event => {
33
- setInfoMenuAnchorElement(event.currentTarget);
34
- }, "aria-label": "Actions", "aria-haspopup": "true", "aria-controls": infoMenuAnchorElement ? `info-menu-${model.id}` : undefined, className: `action-list-icon-button${defaultAction ? ' with-default-action' : ''}`, children: (0, jsx_runtime_1.jsx)(MoreVert_1.default, { color: "primary" }) }), (0, jsx_runtime_1.jsx)(core_1.Popper, { open: !!infoMenuAnchorElement, anchorEl: infoMenuAnchorElement, placement: "bottom-end", className: `z-1${className ? ` ${className}` : ''}`, transition: true, children: ({ TransitionProps, placement }) => ((0, jsx_runtime_1.jsx)(core_1.Grow, Object.assign({}, TransitionProps, { style: { transformOrigin: placement === 'bottom-end' ? 'top right' : 'bottom right' }, children: (0, jsx_runtime_1.jsx)(core_1.Paper, { children: (0, jsx_runtime_1.jsx)(core_1.ClickAwayListener, { onClickAway: onActionItemClick(), children: (0, jsx_runtime_1.jsx)(core_1.MenuList, { id: `info-menu-${model.id}`, autoFocusItem: !!infoMenuAnchorElement, onKeyDown: handleListKeyDown, className: "action-list shadow-large", children: allowedActions.map((a, index) => a.predicate
30
+ return ((0, jsx_runtime_1.jsxs)("div", { className: !!defaultAction && !!model && (actionCount > 1 || alwaysShowKebab) ? 'inline-flex' : 'di', children: [!!defaultAction && ((0, jsx_runtime_1.jsxs)(core_1.Button, { color: "primary", onClick: defaultAction.action, id: defaultAction.id, className: defaultAction.className || '', disabled: defaultAction.disabled, children: [defaultAction.icon, defaultAction.name] })), !!model && (actionCount > 1 || alwaysShowKebab) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(core_1.Button, { ref: anchorRef, onClick: event => 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", children: ["Actions", (0, jsx_runtime_1.jsx)(MoreVert_1.default, { color: "primary" })] }), (0, jsx_runtime_1.jsx)(core_1.IconButton, { ref: anchorRef, onClick: event => 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' : ''}`, children: (0, jsx_runtime_1.jsx)(MoreVert_1.default, { color: "primary" }) }), (0, jsx_runtime_1.jsx)(core_1.Popper, { open: !!infoMenuAnchorElement, anchorEl: infoMenuAnchorElement, placement: "bottom-end", className: `z-1${className ? ` ${className}` : ''}`, transition: true, children: ({ TransitionProps, placement }) => ((0, jsx_runtime_1.jsx)(core_1.Grow, Object.assign({}, TransitionProps, { style: { transformOrigin: placement === 'bottom-end' ? 'top right' : 'bottom right' }, children: (0, jsx_runtime_1.jsx)(core_1.Paper, { children: (0, jsx_runtime_1.jsx)(core_1.ClickAwayListener, { onClickAway: onActionItemClick(), children: (0, jsx_runtime_1.jsx)(core_1.MenuList, { id: `info-menu-${model.id}`, autoFocusItem: !!infoMenuAnchorElement, onKeyDown: handleListKeyDown, className: "action-list shadow-large", children: allowedActions.map((a, index) => a.predicate
35
31
  ? [
36
32
  ...(index > 0 ? [(0, jsx_runtime_1.jsx)(core_1.Divider, {})] : []),
37
33
  (0, jsx_runtime_1.jsxs)(core_1.MenuItem, { className: `action-list-menu mv1 pv2 ${a.className}`, onClick: onActionItemClick(a.action), color: "primary", disabled: a.disabled, children: [a.icon, a.name] }, a.id)
@@ -20,8 +20,6 @@ const UserDropdown = (_a) => {
20
20
  var { userInfo, children } = _a, props = tslib_1.__rest(_a, ["userInfo", "children"]);
21
21
  const [guid] = (0, react_1.useState)((0, uuid_1.v4)());
22
22
  const dropdownTitle = userInfo.isImpersonated ? ((0, jsx_runtime_1.jsx)(UserDetail_1.ImpersonationUserDetail, Object.assign({ userInfo: userInfo }, props))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Hi, ", (0, user_1.displayFirstName)(userInfo)] }));
23
- return ((0, jsx_runtime_1.jsxs)(ManagedNavDropdown_1.ManagedNavDropdown, { id: "user-menu", className: `user-menu${userInfo.isImpersonated ? ' user-menu-impersonated' : ''}`, title: dropdownTitle, children: [children, userInfo.isImpersonated && ((0, jsx_runtime_1.jsxs)(react_bootstrap_1.NavDropdown.Item, { onSelect: () => {
24
- (0, user_1.stopImpersonation)(guid);
25
- }, children: [(0, jsx_runtime_1.jsx)(IconStopImpersonating_1.IconStopImpersonating, { className: "menu-icon" }), "Stop Impersonating"] })), (0, jsx_runtime_1.jsxs)(react_bootstrap_1.NavDropdown.Item, { onSelect: doLogOut, children: [(0, jsx_runtime_1.jsx)(Lock_1.default, { className: "menu-icon" }), "Log Out"] })] }));
23
+ return ((0, jsx_runtime_1.jsxs)(ManagedNavDropdown_1.ManagedNavDropdown, { id: "user-menu", className: `user-menu${userInfo.isImpersonated ? ' user-menu-impersonated' : ''}`, title: dropdownTitle, children: [children, userInfo.isImpersonated && ((0, jsx_runtime_1.jsxs)(react_bootstrap_1.NavDropdown.Item, { onSelect: () => (0, user_1.stopImpersonation)(guid), children: [(0, jsx_runtime_1.jsx)(IconStopImpersonating_1.IconStopImpersonating, { className: "menu-icon" }), "Stop Impersonating"] })), (0, jsx_runtime_1.jsxs)(react_bootstrap_1.NavDropdown.Item, { onSelect: doLogOut, children: [(0, jsx_runtime_1.jsx)(Lock_1.default, { className: "menu-icon" }), "Log Out"] })] }));
26
24
  };
27
25
  exports.UserDropdown = UserDropdown;
@@ -6,10 +6,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const Button_1 = tslib_1.__importDefault(require("@material-ui/core/Button"));
7
7
  const CircularProgress_1 = tslib_1.__importDefault(require("@material-ui/core/CircularProgress"));
8
8
  const GroupCreateEditCopySaveButtons = ({ disabled, cannotSave, cannotSaveAndAddOwners, canAddInstructors, save, cancel }) => {
9
- return ((0, jsx_runtime_1.jsxs)("div", { children: [!!disabled && (0, jsx_runtime_1.jsx)(CircularProgress_1.default, { size: 30, className: "fr" }), (0, jsx_runtime_1.jsx)(Button_1.default, { onClick: () => {
10
- save();
11
- }, color: "primary", className: `fr btn-primary${disabled ? ' visually-hidden' : ''}`, disabled: cannotSave(), children: "Save" }), canAddInstructors && ((0, jsx_runtime_1.jsx)(Button_1.default, { onClick: () => {
12
- save(true);
13
- }, color: "primary", className: `fr btn-primary mr1${disabled ? ' visually-hidden' : ''}`, disabled: cannotSaveAndAddOwners(), children: "Save and Add Instructors" })), (0, jsx_runtime_1.jsx)(Button_1.default, { onClick: cancel, color: "primary", className: `fr btn-text mr1${disabled ? ' visually-hidden' : ''}`, children: "Cancel" })] }));
9
+ return ((0, jsx_runtime_1.jsxs)("div", { children: [!!disabled && (0, jsx_runtime_1.jsx)(CircularProgress_1.default, { size: 30, className: "fr" }), (0, jsx_runtime_1.jsx)(Button_1.default, { onClick: () => save(), color: "primary", className: `fr btn-primary${disabled ? ' visually-hidden' : ''}`, disabled: cannotSave(), children: "Save" }), canAddInstructors && ((0, jsx_runtime_1.jsx)(Button_1.default, { onClick: () => save(true), color: "primary", className: `fr btn-primary mr1${disabled ? ' visually-hidden' : ''}`, disabled: cannotSaveAndAddOwners(), children: "Save and Add Instructors" })), (0, jsx_runtime_1.jsx)(Button_1.default, { onClick: cancel, color: "primary", className: `fr btn-text mr1${disabled ? ' visually-hidden' : ''}`, children: "Cancel" })] }));
14
10
  };
15
11
  exports.GroupCreateEditCopySaveButtons = GroupCreateEditCopySaveButtons;
@@ -131,9 +131,7 @@ class ExternalGroupsAttach extends react_1.Component {
131
131
  }
132
132
  componentWillUnmount() {
133
133
  const { ownerSchedules } = this.state;
134
- (0, lodash_1.forEach)(ownerSchedules, os => {
135
- (0, noStoreSaga_1.unregisterNoStoreActionHook)(os.hookId);
136
- });
134
+ (0, lodash_1.forEach)(ownerSchedules, os => (0, noStoreSaga_1.unregisterNoStoreActionHook)(os.hookId));
137
135
  }
138
136
  componentDidUpdate(prevProps) {
139
137
  const { externalTermId: prevExternalTermId, groupUserRoles: prevGroupUserRoles } = prevProps;
@@ -13,12 +13,6 @@ const RosterSyncInfo = ({ hasLtiRosterSync }) => {
13
13
  const [isModalOpen, setIsModalOpen] = (0, react_1.useState)(false);
14
14
  const lmsName = (0, configuration_1.getAppConfig)().LMS_NAME;
15
15
  const title = `${hasLtiRosterSync ? `${lmsName} ` : ''}Roster Sync`;
16
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Button_1.default, { color: "primary", className: "mb0 mr1-ns pv2 ph2 fr-ns btn-text", onClick: () => {
17
- setIsModalOpen(true);
18
- }, children: [(0, jsx_runtime_1.jsx)(Highlight_1.default, { className: "v-mid mr1" }), (0, jsx_runtime_1.jsx)("span", { className: "mb0 b", children: title })] }), (0, jsx_runtime_1.jsxs)(ConnectedModal_1.default, { show: isModalOpen, onHide: () => {
19
- setIsModalOpen(false);
20
- }, children: [(0, jsx_runtime_1.jsx)(react_bootstrap_1.Modal.Header, { closeButton: true, children: (0, jsx_runtime_1.jsx)(react_bootstrap_1.Modal.Title, { className: "f4", children: title }) }), (0, jsx_runtime_1.jsxs)(react_bootstrap_1.Modal.Body, { children: [(0, jsx_runtime_1.jsx)("h3", { children: "When is the roster synced?" }), (0, jsx_runtime_1.jsxs)("p", { children: ["The roster is synced nightly throughout the duration of the course. People are added and removed automatically as the", ' ', hasLtiRosterSync ? `roster changes in ${lmsName}` : 'external roster changes', "."] })] }), (0, jsx_runtime_1.jsx)(react_bootstrap_1.Modal.Footer, { children: (0, jsx_runtime_1.jsx)(Button_1.default, { color: "primary", className: "ma0 btn-primary", onClick: () => {
21
- setIsModalOpen(false);
22
- }, children: "Close" }) })] })] }));
16
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Button_1.default, { color: "primary", className: "mb0 mr1-ns pv2 ph2 fr-ns btn-text", onClick: () => setIsModalOpen(true), children: [(0, jsx_runtime_1.jsx)(Highlight_1.default, { className: "v-mid mr1" }), (0, jsx_runtime_1.jsx)("span", { className: "mb0 b", children: title })] }), (0, jsx_runtime_1.jsxs)(ConnectedModal_1.default, { show: isModalOpen, onHide: () => setIsModalOpen(false), children: [(0, jsx_runtime_1.jsx)(react_bootstrap_1.Modal.Header, { closeButton: true, children: (0, jsx_runtime_1.jsx)(react_bootstrap_1.Modal.Title, { className: "f4", children: title }) }), (0, jsx_runtime_1.jsxs)(react_bootstrap_1.Modal.Body, { children: [(0, jsx_runtime_1.jsx)("h3", { children: "When is the roster synced?" }), (0, jsx_runtime_1.jsxs)("p", { children: ["The roster is synced nightly throughout the duration of the course. People are added and removed automatically as the", ' ', hasLtiRosterSync ? `roster changes in ${lmsName}` : 'external roster changes', "."] })] }), (0, jsx_runtime_1.jsx)(react_bootstrap_1.Modal.Footer, { children: (0, jsx_runtime_1.jsx)(Button_1.default, { color: "primary", className: "ma0 btn-primary", onClick: () => setIsModalOpen(false), children: "Close" }) })] })] }));
23
17
  };
24
18
  exports.RosterSyncInfo = RosterSyncInfo;
@@ -162,9 +162,9 @@ const configureMapDispatchToProps = (key) => (dispatch) => {
162
162
  };
163
163
  const persistSearchDebounce = (search) => {
164
164
  if (searchDebounce) {
165
- clearTimeout(searchDebounce);
165
+ window.clearTimeout(searchDebounce);
166
166
  }
167
- searchDebounce = setTimeout(() => dispatchPersistSearch(search), 1000);
167
+ searchDebounce = window.setTimeout(() => dispatchPersistSearch(search), 1000);
168
168
  };
169
169
  return {
170
170
  persistSearch: persistSearchDebounce
@@ -1,22 +1,22 @@
1
- .ImpersonationUserDetail {
2
- display: inline-block;
3
- text-align: center;
4
-
5
- & > .ImpersonationUserDetail-IconWrapper {
6
- display: block;
7
- position: absolute;
8
- top: 0;
9
- left: 0;
10
- right: 0;
11
- font-size: 0.7rem;
12
- line-height: 1.5;
13
- text-transform: uppercase;
14
- border-radius: 0.25rem;
15
- border-top-left-radius: 0;
16
- border-top-right-radius: 0;
17
- }
18
-
19
- & svg {
20
- font-size: 1rem;
21
- }
22
- }
1
+ .ImpersonationUserDetail {
2
+ display: inline-block;
3
+ text-align: center;
4
+
5
+ & > .ImpersonationUserDetail-IconWrapper {
6
+ display: block;
7
+ position: absolute;
8
+ top: 0;
9
+ left: 0;
10
+ right: 0;
11
+ font-size: 0.7rem;
12
+ line-height: 1.5;
13
+ text-transform: uppercase;
14
+ border-radius: 0.25rem;
15
+ border-top-left-radius: 0;
16
+ border-top-right-radius: 0;
17
+ }
18
+
19
+ & svg {
20
+ font-size: 1rem;
21
+ }
22
+ }
@@ -16,7 +16,7 @@ interface NotificationsState {
16
16
  isOpen: boolean;
17
17
  }
18
18
  export declare class Notifications extends Component<NotificationsProps, NotificationsState> {
19
- afterCloseTimeout: NodeJS.Timeout | undefined;
19
+ afterCloseTimeout: number | undefined;
20
20
  constructor(props: NotificationsProps);
21
21
  componentDidMount(): void;
22
22
  componentDidUpdate(): void;
@@ -17,7 +17,7 @@ class Notifications extends react_1.Component {
17
17
  this.afterCloseTimeout = undefined;
18
18
  this.clearAfterCloseTimeout = () => {
19
19
  if (this.afterCloseTimeout) {
20
- clearTimeout(this.afterCloseTimeout);
20
+ window.clearTimeout(this.afterCloseTimeout);
21
21
  this.afterCloseTimeout = undefined;
22
22
  }
23
23
  };
@@ -60,7 +60,7 @@ class Notifications extends react_1.Component {
60
60
  isOpen: false
61
61
  }, () => {
62
62
  // wait until after Snackbar hide animation to clear the UI
63
- this.afterCloseTimeout = setTimeout(() => {
63
+ this.afterCloseTimeout = window.setTimeout(() => {
64
64
  this.removeNotification();
65
65
  this.clearAfterCloseTimeout();
66
66
  // removing the last notification, clear state
@@ -54,7 +54,7 @@ class ImageDropModule {
54
54
  if (evt.clipboardData && evt.clipboardData.items && evt.clipboardData.items.length) {
55
55
  this.readFiles(evt.clipboardData.items, base64DataUrl => {
56
56
  // wait until after the default paste action finishes
57
- setTimeout(() => this.insert(base64DataUrl, alt), 50);
57
+ window.setTimeout(() => this.insert(base64DataUrl, alt), 50);
58
58
  });
59
59
  }
60
60
  };