studiokit-scaffolding-js 7.0.15 → 7.0.17
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.
- package/README.md +7 -2
- package/lib/components/ActionList.js +4 -14
- package/lib/components/AlertDialog.d.ts +1 -0
- package/lib/components/AlertDialog.js +2 -2
- package/lib/components/ConnectedModal.js +2 -2
- package/lib/components/HOC/FullscreenModalComponent.d.ts +7 -19
- package/lib/components/HOC/FullscreenModalComponent.js +6 -54
- package/lib/components/Lti/CreateNonLtiGroupAlertDialog.d.ts +1 -1
- package/lib/css/base/_print.css +66 -0
- package/lib/css/components/_buttons.css +15 -5
- package/lib/css/components/_modals.css +25 -4
- package/lib/utils/dom.js +0 -4
- package/package.json +3 -5
package/README.md
CHANGED
|
@@ -103,7 +103,10 @@ Components and utils can be imported from `studiokit-scaffolding-js/lib/...`
|
|
|
103
103
|
1. Increment the **last** number in the version
|
|
104
104
|
* e.g. `1.0.0-next.2.1` => `1.0.0-next.2.2` for a feature/issue branch
|
|
105
105
|
* e.g. `1.0.1-alpha.1` => `1.0.1-alpha.2` for a hotfix branch
|
|
106
|
-
1. Push to gitlab.
|
|
106
|
+
1. Push to gitlab.
|
|
107
|
+
1. Publish to npmjs.org
|
|
108
|
+
* `npm publish --tag next`
|
|
109
|
+
(You will need to be logged into npm via `npm login` if you aren't already. Use your own login, not the itap-informatics one.)
|
|
107
110
|
1. Install the new version in the project(s) you are working on by updating its `package.json` and running `yarn`
|
|
108
111
|
* As an alternative to the two steps above, if you don't need to make changes available to other devs yet you can:
|
|
109
112
|
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.
|
|
@@ -115,7 +118,9 @@ Components and utils can be imported from `studiokit-scaffolding-js/lib/...`
|
|
|
115
118
|
1. Release
|
|
116
119
|
* **Feature/Issue**: After merging, create a new "release" branch from `develop` and follow the "git flow" release steps as normal
|
|
117
120
|
* **Hotfix**: Finish the "git flow" hotfix steps as normal from the hotfix branch
|
|
118
|
-
|
|
121
|
+
1. Publish to npmjs.org
|
|
122
|
+
* `npm publish`
|
|
123
|
+
(You will need to be logged into npm via `npm login` if you aren't already. Use your own login, not the itap-informatics one.)
|
|
119
124
|
|
|
120
125
|
## Styles
|
|
121
126
|
|
|
@@ -29,13 +29,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
29
29
|
__setModuleDefault(result, mod);
|
|
30
30
|
return result;
|
|
31
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
32
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
40
33
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
41
34
|
};
|
|
@@ -81,13 +74,10 @@ var ActionList = function (_a) {
|
|
|
81
74
|
return (react_1.default.createElement(core_1.Grow, __assign({}, TransitionProps, { style: { transformOrigin: placement === 'bottom-end' ? 'top right' : 'bottom right' } }),
|
|
82
75
|
react_1.default.createElement(core_1.Paper, null,
|
|
83
76
|
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
|
|
85
|
-
return a.predicate
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
a.icon,
|
|
89
|
-
a.name)
|
|
90
|
-
]) : undefined;
|
|
77
|
+
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) {
|
|
78
|
+
return a.predicate ? (react_1.default.createElement(core_1.MenuItem, { key: a.id, className: "action-list-menu-item " + a.className, onClick: onActionItemClick(a.action), color: "primary", disabled: a.disabled },
|
|
79
|
+
a.icon,
|
|
80
|
+
a.name)) : undefined;
|
|
91
81
|
}))))));
|
|
92
82
|
})))));
|
|
93
83
|
};
|
|
@@ -12,6 +12,7 @@ export interface AlertDialogProps {
|
|
|
12
12
|
hideCancel?: boolean;
|
|
13
13
|
onDestroy?: MouseEventHandler<HTMLElement>;
|
|
14
14
|
destroyText?: string;
|
|
15
|
+
usePrimaryColorForDestroy?: boolean;
|
|
15
16
|
manualBackground?: boolean;
|
|
16
17
|
}
|
|
17
18
|
export declare const AlertDialog: FunctionComponent<AlertDialogProps>;
|
|
@@ -9,7 +9,7 @@ var react_1 = __importDefault(require("react"));
|
|
|
9
9
|
var react_bootstrap_1 = require("react-bootstrap");
|
|
10
10
|
var ConnectedModal_1 = __importDefault(require("./ConnectedModal"));
|
|
11
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;
|
|
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, usePrimaryColorForDestroy = props.usePrimaryColorForDestroy, manualBackground = props.manualBackground;
|
|
13
13
|
return (react_1.default.createElement(ConnectedModal_1.default, { show: isOpen, onHide: onCancel, className: "z-9999" + (manualBackground ? ' bg-black-50' : '') },
|
|
14
14
|
react_1.default.createElement(react_bootstrap_1.Modal.Header, { closeButton: true },
|
|
15
15
|
react_1.default.createElement(react_bootstrap_1.Modal.Title, null, title)),
|
|
@@ -17,6 +17,6 @@ var AlertDialog = function (props) {
|
|
|
17
17
|
react_1.default.createElement(react_bootstrap_1.Modal.Footer, null,
|
|
18
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
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:
|
|
20
|
+
!!onDestroy && (react_1.default.createElement(Button_1.default, { id: "alert-dialog-destroy-btn", "aria-label": destroyText || 'Destroy', color: usePrimaryColorForDestroy ? 'primary' : 'secondary', className: "btn-text fl ttc" + (usePrimaryColorForDestroy ? '' : ' color-red'), onClick: onDestroy }, destroyText || 'Destroy')))));
|
|
21
21
|
};
|
|
22
22
|
exports.AlertDialog = AlertDialog;
|
|
@@ -27,7 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
28
|
var react_1 = __importDefault(require("react"));
|
|
29
29
|
var react_bootstrap_1 = require("react-bootstrap");
|
|
30
|
-
var ConnectedModalComponent_1 =
|
|
30
|
+
var ConnectedModalComponent_1 = require("./HOC/ConnectedModalComponent");
|
|
31
31
|
var ConnectedModal = function (_a) {
|
|
32
32
|
var
|
|
33
33
|
// exclude props that shouldn't be passed to the Modal
|
|
@@ -37,4 +37,4 @@ var ConnectedModal = function (_a) {
|
|
|
37
37
|
/**
|
|
38
38
|
* Wrapped version of "react-bootstrap"'s `Modal` component. Uses `ConnectedModalComponent` to coordinate modal state in redux.
|
|
39
39
|
*/
|
|
40
|
-
exports.default = ConnectedModalComponent_1.
|
|
40
|
+
exports.default = ConnectedModalComponent_1.connectedModalComponent(ConnectedModal);
|
|
@@ -3,7 +3,6 @@ import { ConnectedModalWrappedProps } from './ConnectedModalComponent';
|
|
|
3
3
|
import { GuidComponentWrappedProps } from './GuidComponent';
|
|
4
4
|
/**
|
|
5
5
|
* The props that are provided to the HOC component directly from the caller, not other wrapping HOCs
|
|
6
|
-
* NOTE: if more flexibility is needed, add more props from `ReactModal.Props`
|
|
7
6
|
*/
|
|
8
7
|
export interface FullscreenModalOwnProps {
|
|
9
8
|
isOpen?: boolean;
|
|
@@ -12,12 +11,10 @@ export interface FullscreenModalOwnProps {
|
|
|
12
11
|
* If not provided, the modal manages itself.
|
|
13
12
|
*/
|
|
14
13
|
closeModal?: () => void;
|
|
15
|
-
contentLabel?: string;
|
|
16
|
-
zIndex?: number;
|
|
17
14
|
}
|
|
18
15
|
/** The props that are provided to the HOC component, either directly or from other wrapping HOCs */
|
|
19
16
|
export declare type FullscreenModalComponentProps = FullscreenModalOwnProps & ConnectedModalWrappedProps & GuidComponentWrappedProps;
|
|
20
|
-
/** The props that are
|
|
17
|
+
/** The props that are provided to the wrapped component. */
|
|
21
18
|
export interface FullscreenModalWrappedProps {
|
|
22
19
|
/** GUID of the fullscreen modal, used in state.modals. */
|
|
23
20
|
guid: string;
|
|
@@ -28,19 +25,16 @@ interface FullscreenModalState {
|
|
|
28
25
|
isOpen: boolean;
|
|
29
26
|
}
|
|
30
27
|
/**
|
|
31
|
-
* HOC that manages a `
|
|
32
|
-
* coordinates modal state in redux using.
|
|
28
|
+
* HOC that manages a "react-boostrap" `Modal` and adds fullscreen styles.
|
|
33
29
|
*
|
|
34
30
|
* NOTE: Meant for testing. Should be wrapped in `connectedModalComponent` normally.
|
|
35
31
|
*
|
|
36
32
|
* @param WrappedComponent The component to wrap.
|
|
37
33
|
*/
|
|
38
|
-
export declare function configureFullscreenModalComponent<TOwnProps extends
|
|
34
|
+
export declare function configureFullscreenModalComponent<TOwnProps extends object>(WrappedComponent: ComponentType<TOwnProps & FullscreenModalWrappedProps>): {
|
|
39
35
|
new (props: TOwnProps & FullscreenModalOwnProps & ConnectedModalWrappedProps & GuidComponentWrappedProps): {
|
|
40
36
|
componentDidMount(): void;
|
|
41
|
-
componentWillUnmount(): void;
|
|
42
37
|
componentDidUpdate(prevProps: TOwnProps & FullscreenModalOwnProps & ConnectedModalWrappedProps & GuidComponentWrappedProps, prevState: FullscreenModalState): void;
|
|
43
|
-
disableScroll: (e: Event) => boolean;
|
|
44
38
|
onOpen: () => void;
|
|
45
39
|
onClose: () => void;
|
|
46
40
|
closeModal: () => void;
|
|
@@ -56,6 +50,7 @@ export declare function configureFullscreenModalComponent<TOwnProps extends {}>(
|
|
|
56
50
|
[key: string]: React.ReactInstance;
|
|
57
51
|
};
|
|
58
52
|
shouldComponentUpdate?(nextProps: Readonly<TOwnProps & FullscreenModalOwnProps & ConnectedModalWrappedProps & GuidComponentWrappedProps>, nextState: Readonly<FullscreenModalState>, nextContext: any): boolean;
|
|
53
|
+
componentWillUnmount?(): void;
|
|
59
54
|
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
60
55
|
getSnapshotBeforeUpdate?(prevProps: Readonly<TOwnProps & FullscreenModalOwnProps & ConnectedModalWrappedProps & GuidComponentWrappedProps>, prevState: Readonly<FullscreenModalState>): any;
|
|
61
56
|
componentWillMount?(): void;
|
|
@@ -68,18 +63,11 @@ export declare function configureFullscreenModalComponent<TOwnProps extends {}>(
|
|
|
68
63
|
contextType?: React.Context<any> | undefined;
|
|
69
64
|
};
|
|
70
65
|
/**
|
|
71
|
-
* HOC that
|
|
72
|
-
* adds fullscreen styles, and coordinates modal state in redux.
|
|
66
|
+
* HOC that manages a "react-bootstrap" `Modal` and adds fullscreen styles.
|
|
73
67
|
*
|
|
74
|
-
* Uses `connectedModalComponent
|
|
75
|
-
*
|
|
76
|
-
* NOTE: Please add the following css
|
|
77
|
-
*
|
|
78
|
-
* .ReactModal__Body--open {
|
|
79
|
-
* overflow: hidden;
|
|
80
|
-
* }
|
|
68
|
+
* Uses `connectedModalComponent` to coordinate modal state in redux.
|
|
81
69
|
*
|
|
82
70
|
* @param WrappedComponent The component to wrap.
|
|
83
71
|
*/
|
|
84
|
-
export declare function fullscreenModalComponent<TOwnProps extends
|
|
72
|
+
export declare function fullscreenModalComponent<TOwnProps extends object>(WrappedComponent: ComponentType<TOwnProps & FullscreenModalWrappedProps>): ComponentClass<TOwnProps & FullscreenModalOwnProps>;
|
|
85
73
|
export default fullscreenModalComponent;
|
|
@@ -53,17 +53,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
53
53
|
}
|
|
54
54
|
return t;
|
|
55
55
|
};
|
|
56
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
57
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
58
|
-
};
|
|
59
56
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
57
|
exports.fullscreenModalComponent = exports.configureFullscreenModalComponent = void 0;
|
|
61
58
|
var react_1 = __importStar(require("react"));
|
|
62
|
-
var
|
|
59
|
+
var react_bootstrap_1 = require("react-bootstrap");
|
|
63
60
|
var ConnectedModalComponent_1 = require("./ConnectedModalComponent");
|
|
64
61
|
/**
|
|
65
|
-
* HOC that manages a `
|
|
66
|
-
* coordinates modal state in redux using.
|
|
62
|
+
* HOC that manages a "react-boostrap" `Modal` and adds fullscreen styles.
|
|
67
63
|
*
|
|
68
64
|
* NOTE: Meant for testing. Should be wrapped in `connectedModalComponent` normally.
|
|
69
65
|
*
|
|
@@ -74,17 +70,10 @@ function configureFullscreenModalComponent(WrappedComponent) {
|
|
|
74
70
|
__extends(FullscreenModalComponent, _super);
|
|
75
71
|
function FullscreenModalComponent(props) {
|
|
76
72
|
var _this = _super.call(this, props) || this;
|
|
77
|
-
_this.disableScroll = function (e) {
|
|
78
|
-
document.documentElement.scrollTop = 0;
|
|
79
|
-
e.preventDefault();
|
|
80
|
-
return false;
|
|
81
|
-
};
|
|
82
73
|
_this.onOpen = function () {
|
|
83
|
-
document.documentElement.addEventListener('touchmove', _this.disableScroll);
|
|
84
74
|
_this.props.onEntering();
|
|
85
75
|
};
|
|
86
76
|
_this.onClose = function () {
|
|
87
|
-
document.documentElement.removeEventListener('touchmove', _this.disableScroll);
|
|
88
77
|
_this.props.onExited();
|
|
89
78
|
};
|
|
90
79
|
_this.closeModal = function () {
|
|
@@ -99,11 +88,6 @@ function configureFullscreenModalComponent(WrappedComponent) {
|
|
|
99
88
|
_this.state = {
|
|
100
89
|
isOpen: props.isOpen === undefined ? true : props.isOpen
|
|
101
90
|
};
|
|
102
|
-
// https://github.com/reactjs/react-modal#app-element
|
|
103
|
-
// Accessibility fixed when reading the content in the modal
|
|
104
|
-
if (document.getElementById('root')) {
|
|
105
|
-
react_modal_1.default.setAppElement('#root');
|
|
106
|
-
}
|
|
107
91
|
return _this;
|
|
108
92
|
}
|
|
109
93
|
FullscreenModalComponent.prototype.componentDidMount = function () {
|
|
@@ -112,9 +96,6 @@ function configureFullscreenModalComponent(WrappedComponent) {
|
|
|
112
96
|
this.onOpen();
|
|
113
97
|
}
|
|
114
98
|
};
|
|
115
|
-
FullscreenModalComponent.prototype.componentWillUnmount = function () {
|
|
116
|
-
document.documentElement.removeEventListener('touchmove', this.disableScroll);
|
|
117
|
-
};
|
|
118
99
|
FullscreenModalComponent.prototype.componentDidUpdate = function (prevProps, prevState) {
|
|
119
100
|
var isOpen;
|
|
120
101
|
if (this.props.isOpen !== undefined && this.props.isOpen !== this.state.isOpen) {
|
|
@@ -139,33 +120,11 @@ function configureFullscreenModalComponent(WrappedComponent) {
|
|
|
139
120
|
});
|
|
140
121
|
};
|
|
141
122
|
FullscreenModalComponent.prototype.render = function () {
|
|
142
|
-
var _a = this.props,
|
|
123
|
+
var _a = this.props, isTopOpenFullscreenModal = _a.isTopOpenFullscreenModal, onEntering = _a.onEntering, onExited = _a.onExited, _ = _a.isOpen, closeModal = _a.closeModal, remainingProps = __rest(_a, ["isTopOpenFullscreenModal", "onEntering", "onExited", "isOpen", "closeModal"]);
|
|
143
124
|
// do not pass ConnectedModalWrappedProps to wrapped component
|
|
144
125
|
var wrappedProps = __assign(__assign({}, remainingProps), { closeModal: this.closeModal });
|
|
145
126
|
var isOpen = this.state.isOpen;
|
|
146
|
-
return (react_1.default.createElement(
|
|
147
|
-
content: {
|
|
148
|
-
position: 'absolute',
|
|
149
|
-
top: 0,
|
|
150
|
-
left: 0,
|
|
151
|
-
right: 0,
|
|
152
|
-
bottom: 0,
|
|
153
|
-
overflow: 'hidden',
|
|
154
|
-
padding: 0,
|
|
155
|
-
border: 'none',
|
|
156
|
-
backgroundColor: 'white'
|
|
157
|
-
},
|
|
158
|
-
overlay: {
|
|
159
|
-
position: 'absolute',
|
|
160
|
-
top: 0,
|
|
161
|
-
left: 0,
|
|
162
|
-
right: 0,
|
|
163
|
-
bottom: 0,
|
|
164
|
-
zIndex: zIndex !== null && zIndex !== void 0 ? zIndex : 2000
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
// hide the rendered portal if this is not the top open fullscreen modal
|
|
168
|
-
portalClassName: "ReactModalPortal" + (!isTopOpenFullscreenModal ? ' dn' : ''), shouldCloseOnOverlayClick: false },
|
|
127
|
+
return (react_1.default.createElement(react_bootstrap_1.Modal, { show: isOpen, backdrop: false, animation: false, className: "fullscreen-modal" },
|
|
169
128
|
react_1.default.createElement(WrappedComponent, __assign({}, wrappedProps))));
|
|
170
129
|
};
|
|
171
130
|
return FullscreenModalComponent;
|
|
@@ -173,16 +132,9 @@ function configureFullscreenModalComponent(WrappedComponent) {
|
|
|
173
132
|
}
|
|
174
133
|
exports.configureFullscreenModalComponent = configureFullscreenModalComponent;
|
|
175
134
|
/**
|
|
176
|
-
* HOC that
|
|
177
|
-
* adds fullscreen styles, and coordinates modal state in redux.
|
|
178
|
-
*
|
|
179
|
-
* Uses `connectedModalComponent`.
|
|
180
|
-
*
|
|
181
|
-
* NOTE: Please add the following css
|
|
135
|
+
* HOC that manages a "react-bootstrap" `Modal` and adds fullscreen styles.
|
|
182
136
|
*
|
|
183
|
-
* .
|
|
184
|
-
* overflow: hidden;
|
|
185
|
-
* }
|
|
137
|
+
* Uses `connectedModalComponent` to coordinate modal state in redux.
|
|
186
138
|
*
|
|
187
139
|
* @param WrappedComponent The component to wrap.
|
|
188
140
|
*/
|
|
@@ -9,5 +9,5 @@ export interface CreateNonLtiGroupAlertDialogProps extends Omit<AlertDialogProps
|
|
|
9
9
|
}
|
|
10
10
|
export declare const CreateNonLtiGroupAlertDialog: FunctionComponent<CreateNonLtiGroupAlertDialogProps>;
|
|
11
11
|
export declare const mapStateToProps: (state: BaseReduxState) => CreateNonLtiGroupAlertDialogReduxProps;
|
|
12
|
-
declare const _default: import("react-redux").ConnectedComponent<React.FunctionComponent<CreateNonLtiGroupAlertDialogProps>, Pick<React.PropsWithChildren<CreateNonLtiGroupAlertDialogProps>, "description" | "id" | "children" | "onCancel" | "isOpen" | "onProceed" | "proceedText" | "cancelText" | "hideCancel" | "onDestroy" | "destroyText" | "manualBackground" | "externalHelpResourcePageUrl">>;
|
|
12
|
+
declare const _default: import("react-redux").ConnectedComponent<React.FunctionComponent<CreateNonLtiGroupAlertDialogProps>, Pick<React.PropsWithChildren<CreateNonLtiGroupAlertDialogProps>, "description" | "id" | "children" | "onCancel" | "isOpen" | "onProceed" | "proceedText" | "cancelText" | "hideCancel" | "onDestroy" | "destroyText" | "usePrimaryColorForDestroy" | "manualBackground" | "externalHelpResourcePageUrl">>;
|
|
13
13
|
export default _default;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Sets the default printing options for the browser print dialog,
|
|
3
|
+
while still allowing the dialog to override.
|
|
4
|
+
|
|
5
|
+
NOTE: not supported by Safari
|
|
6
|
+
*/
|
|
7
|
+
@page {
|
|
8
|
+
size: 8.5in 11in;
|
|
9
|
+
margin: 0.5in;
|
|
10
|
+
/* stylelint-disable-next-line at-rule-descriptor-no-unknown */
|
|
11
|
+
widows: 5;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@media print {
|
|
15
|
+
/* override global react fullscreen modal styles */
|
|
16
|
+
.modal-open {
|
|
17
|
+
overflow: visible !important;
|
|
18
|
+
|
|
19
|
+
/* always hide content underneath the fullscreen modal */
|
|
20
|
+
& #root {
|
|
21
|
+
display: none;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.fullscreen-modal {
|
|
26
|
+
position: static;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* hide hidden fullscreen modal content when printing */
|
|
30
|
+
.fullscreen-modal[aria-hidden="true"] {
|
|
31
|
+
display: none !important;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.fullscreen-modal .modal-dialog {
|
|
35
|
+
overflow: visible !important;
|
|
36
|
+
|
|
37
|
+
/* safari-only */
|
|
38
|
+
@supports (-webkit-hyphens:none) {
|
|
39
|
+
border: none !important;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.fullscreen-modal .modal-dialog,
|
|
44
|
+
.fullscreen-modal .modal-dialog .modal-content {
|
|
45
|
+
/* safari-only */
|
|
46
|
+
@supports (-webkit-hyphens:none) {
|
|
47
|
+
position: static !important;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.page-break-after {
|
|
53
|
+
break-after: page;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.page-break-before {
|
|
57
|
+
break-before: page;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.print-only {
|
|
61
|
+
display: none;
|
|
62
|
+
|
|
63
|
+
@media print {
|
|
64
|
+
display: initial;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -281,6 +281,7 @@ button.close > span {
|
|
|
281
281
|
.action-list {
|
|
282
282
|
display: block;
|
|
283
283
|
min-width: 146px;
|
|
284
|
+
padding: 0;
|
|
284
285
|
|
|
285
286
|
& .btn-default {
|
|
286
287
|
padding: 0.5rem 1rem;
|
|
@@ -295,11 +296,20 @@ button.close > span {
|
|
|
295
296
|
align-self: stretch;
|
|
296
297
|
}
|
|
297
298
|
|
|
298
|
-
& .action-list-menu
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
299
|
+
& .action-list-menu-item {
|
|
300
|
+
padding-top: 0.75rem;
|
|
301
|
+
padding-bottom: 0.75rem;
|
|
302
|
+
|
|
303
|
+
& svg {
|
|
304
|
+
height: 2rem;
|
|
305
|
+
width: 2rem;
|
|
306
|
+
vertical-align: middle;
|
|
307
|
+
margin-right: 0.5rem;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
&:not(:last-of-type) {
|
|
311
|
+
border-bottom: 1px solid var(--color-medium-grey);
|
|
312
|
+
}
|
|
303
313
|
}
|
|
304
314
|
}
|
|
305
315
|
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
.ReactModal__Body--open {
|
|
2
|
-
overflow: hidden;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
.modal-dialog {
|
|
6
2
|
max-width: none;
|
|
7
3
|
width: auto;
|
|
@@ -40,6 +36,31 @@
|
|
|
40
36
|
}
|
|
41
37
|
}
|
|
42
38
|
|
|
39
|
+
.fullscreen-modal {
|
|
40
|
+
& .modal-dialog {
|
|
41
|
+
position: absolute;
|
|
42
|
+
top: 0;
|
|
43
|
+
left: 0;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
padding: 0;
|
|
46
|
+
margin: 0;
|
|
47
|
+
border: none;
|
|
48
|
+
background-color: white;
|
|
49
|
+
width: 100%;
|
|
50
|
+
transition: none !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
& .modal-content {
|
|
54
|
+
box-shadow: none;
|
|
55
|
+
border-radius: 0;
|
|
56
|
+
border: none;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.modal-open .fullscreen-modal {
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
}
|
|
63
|
+
|
|
43
64
|
/* Always display sentry feedback dialog on top of everything else. */
|
|
44
65
|
.sentry-error-embed-wrapper {
|
|
45
66
|
z-index: 9999 !important;
|
package/lib/utils/dom.js
CHANGED
|
@@ -188,10 +188,6 @@ var setupMobileEventListeners = function () {
|
|
|
188
188
|
// add event listeners
|
|
189
189
|
visualViewport.addEventListener('resize', function () {
|
|
190
190
|
setVisualViewportHeightVar();
|
|
191
|
-
// keep the document element scrolled to the top if a ReactModal is open
|
|
192
|
-
if (document.body.classList.contains('ReactModal__Body--open')) {
|
|
193
|
-
document.documentElement.scrollTop = 0;
|
|
194
|
-
}
|
|
195
191
|
});
|
|
196
192
|
window.addEventListener('focusin', onFocusIn);
|
|
197
193
|
window.addEventListener('focusout', onFocusOut);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "studiokit-scaffolding-js",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.17",
|
|
4
4
|
"description": "Common scaffolding for Studio apps at Purdue",
|
|
5
5
|
"repository": "https://gitlab.com/purdue-informatics/studiokit/studiokit-scaffolding-js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"prepublishOnly": "yarn build",
|
|
26
26
|
"test": "jest",
|
|
27
27
|
"test:ci": "cross-env CI=true yarn test",
|
|
28
|
-
"test:ci-junit": "cross-env CI=true
|
|
28
|
+
"test:ci-junit": "cross-env CI=true yarn test --coverage --reporters='default' --reporters='jest-junit' --coverageReporters='cobertura' --coverageReporters='html'"
|
|
29
29
|
},
|
|
30
30
|
"husky": {
|
|
31
31
|
"hooks": {
|
|
@@ -101,7 +101,6 @@
|
|
|
101
101
|
"@types/react": "^17.0.0",
|
|
102
102
|
"@types/react-dom": "^17.0.0",
|
|
103
103
|
"@types/react-helmet": "^6.1.0",
|
|
104
|
-
"@types/react-modal": "^3.10.6",
|
|
105
104
|
"@types/react-redux": "^7.1.16",
|
|
106
105
|
"@types/react-router": "^5.1.11",
|
|
107
106
|
"@types/react-router-bootstrap": "^0.24.5",
|
|
@@ -128,7 +127,6 @@
|
|
|
128
127
|
"react-bootstrap": "^1.4.3",
|
|
129
128
|
"react-ga4": "^2.1.0",
|
|
130
129
|
"react-helmet": "^6.1.0",
|
|
131
|
-
"react-modal": "^3.12.1",
|
|
132
130
|
"react-quill": "purdue-tlt/react-quill#fix/auto-focus",
|
|
133
131
|
"react-redux": "^7.2.2",
|
|
134
132
|
"react-router": "^5.2.0",
|
|
@@ -203,5 +201,5 @@
|
|
|
203
201
|
"optional": true
|
|
204
202
|
}
|
|
205
203
|
},
|
|
206
|
-
"packageManager": "yarn@4.
|
|
204
|
+
"packageManager": "yarn@4.12.0"
|
|
207
205
|
}
|