studiokit-scaffolding-js 7.0.15 → 7.0.16
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/AlertDialog.d.ts +1 -0
- package/lib/components/AlertDialog.js +2 -2
- package/lib/components/HOC/FullscreenModalComponent.js +2 -2
- package/lib/components/Lti/CreateNonLtiGroupAlertDialog.d.ts +1 -1
- package/lib/css/base/_print.css +62 -0
- package/package.json +4 -4
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
|
|
|
@@ -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;
|
|
@@ -164,8 +164,8 @@ function configureFullscreenModalComponent(WrappedComponent) {
|
|
|
164
164
|
zIndex: zIndex !== null && zIndex !== void 0 ? zIndex : 2000
|
|
165
165
|
}
|
|
166
166
|
},
|
|
167
|
-
//
|
|
168
|
-
portalClassName: "ReactModalPortal" + (!isTopOpenFullscreenModal ? '
|
|
167
|
+
// apply custom class, if this is not the top open fullscreen modal, to allow targeted styling (e.g. hide when printing in Safari)
|
|
168
|
+
portalClassName: "ReactModalPortal" + (!isTopOpenFullscreenModal ? ' HiddenFullscreenModal' : ''), shouldCloseOnOverlayClick: false },
|
|
169
169
|
react_1.default.createElement(WrappedComponent, __assign({}, wrappedProps))));
|
|
170
170
|
};
|
|
171
171
|
return FullscreenModalComponent;
|
|
@@ -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,62 @@
|
|
|
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
|
+
.ReactModal__Body--open {
|
|
17
|
+
overflow: visible !important;
|
|
18
|
+
|
|
19
|
+
/* always hide content underneath the fullscreen modal */
|
|
20
|
+
& #root {
|
|
21
|
+
display: none;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* hide hidden fullscreen modal content when printing */
|
|
26
|
+
.ReactModalPortal.HiddenFullscreenModal {
|
|
27
|
+
display: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ReactModal__Overlay {
|
|
31
|
+
/* safari-only */
|
|
32
|
+
@supports (-webkit-hyphens:none) {
|
|
33
|
+
position: static !important;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.ReactModal__Content {
|
|
38
|
+
overflow: visible !important;
|
|
39
|
+
|
|
40
|
+
/* safari-only */
|
|
41
|
+
@supports (-webkit-hyphens:none) {
|
|
42
|
+
position: static !important;
|
|
43
|
+
border: none !important;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.page-break-after {
|
|
49
|
+
break-after: page;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.page-break-before {
|
|
53
|
+
break-before: page;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.print-only {
|
|
57
|
+
display: none;
|
|
58
|
+
|
|
59
|
+
@media print {
|
|
60
|
+
display: initial;
|
|
61
|
+
}
|
|
62
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "studiokit-scaffolding-js",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.16",
|
|
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,7 @@
|
|
|
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.
|
|
104
|
+
"@types/react-modal": "^3.16.3",
|
|
105
105
|
"@types/react-redux": "^7.1.16",
|
|
106
106
|
"@types/react-router": "^5.1.11",
|
|
107
107
|
"@types/react-router-bootstrap": "^0.24.5",
|
|
@@ -203,5 +203,5 @@
|
|
|
203
203
|
"optional": true
|
|
204
204
|
}
|
|
205
205
|
},
|
|
206
|
-
"packageManager": "yarn@4.
|
|
206
|
+
"packageManager": "yarn@4.12.0"
|
|
207
207
|
}
|