@instructure/quiz-core 17.22.1 → 17.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/es/building/components/resources/ItemFeedbackModal/presenter.js +3 -1
- package/es/building/components/resources/quiz/instructions/Edit/presenter.js +3 -1
- package/es/building/components/resources/quizEntry/QuizEntryShow/presenter.js +15 -15
- package/es/common/components/PrintFontSizeModal/presenter.js +3 -1
- package/es/common/components/layout/Page/index.js +5 -5
- package/es/common/components/resources/item/ItemEdit/index.js +2 -1
- package/es/common/components/resources/item/ItemEdit/presenter.js +2 -0
- package/es/common/components/resources/item/ItemOverride/index.js +2 -1
- package/es/common/components/resources/item/ItemOverride/presenter.js +4 -2
- package/es/common/components/resources/stimulus/StimulusEditInfo/presenter.js +3 -1
- package/es/common/components/shared/PrintTrigger/presenter.js +28 -20
- package/es/common/util/interactionTypePropsHelper.js +2 -1
- package/es/common/util/rceChecker.js +6 -0
- package/es/index.js +2 -1
- package/lib/building/components/resources/ItemFeedbackModal/presenter.js +4 -1
- package/lib/building/components/resources/quiz/instructions/Edit/presenter.js +4 -1
- package/lib/building/components/resources/quizEntry/QuizEntryShow/presenter.js +15 -15
- package/lib/common/components/PrintFontSizeModal/presenter.js +3 -1
- package/lib/common/components/layout/Page/index.js +5 -5
- package/lib/common/components/resources/item/ItemEdit/index.js +2 -1
- package/lib/common/components/resources/item/ItemEdit/presenter.js +2 -0
- package/lib/common/components/resources/item/ItemOverride/index.js +2 -1
- package/lib/common/components/resources/item/ItemOverride/presenter.js +4 -2
- package/lib/common/components/resources/stimulus/StimulusEditInfo/presenter.js +4 -1
- package/lib/common/components/shared/PrintTrigger/presenter.js +28 -21
- package/lib/common/util/interactionTypePropsHelper.js +2 -1
- package/lib/common/util/rceChecker.js +18 -0
- package/lib/index.js +9 -0
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [17.23.0](https://gerrit.instructure.com/quizzes-ui/compare/v17.22.1...v17.23.0) (2022-01-25)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **PrintTrigger:** Fix Firefox print preview issues ([e111d87](https://gerrit.instructure.com/quizzes-ui/commits/e111d87ac50f9213db4232c74b1f3c638b0494e7))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **quizzes-ui:** Reintroduce TinyMCE v5 to load based on a feature flag ([0021bba](https://gerrit.instructure.com/quizzes-ui/commits/0021bbab61162ff6f16f1ba58a910a1cdd28b72b))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [17.22.1](https://gerrit.instructure.com/quizzes-ui/compare/v17.22.0...v17.22.1) (2022-01-12)
|
|
7
23
|
|
|
8
24
|
|
|
@@ -12,6 +12,7 @@ import { Button, CloseButton } from '@instructure/ui-buttons';
|
|
|
12
12
|
import { Heading } from '@instructure/ui-heading';
|
|
13
13
|
import { themeable } from '@instructure/ui-themeable';
|
|
14
14
|
import { RichContentRenderer } from '@instructure/quiz-rce';
|
|
15
|
+
import { isNewRCEEnabled } from "../../../../common/util/rceChecker.js";
|
|
15
16
|
import RichContentInput from "../../../../common/components/RichContentInput/index.js";
|
|
16
17
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
17
18
|
import { Modal, ModalHeader, ModalBody, ModalFooter, ITEM_FEEDBACK_MODAL, ITEM_FEEDBACK_MODAL_FEEDBACK, XSMALL_SIDE_MARGIN } from '@instructure/quiz-common';
|
|
@@ -103,7 +104,8 @@ export var ItemFeedbackModal = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
103
104
|
onChange: this.onFeedbackChange,
|
|
104
105
|
parentType: this.props.parentType,
|
|
105
106
|
parentId: this.props.parentId,
|
|
106
|
-
importModalCloseOverride: this.returnToFeedback
|
|
107
|
+
importModalCloseOverride: this.returnToFeedback,
|
|
108
|
+
useNewRce: isNewRCEEnabled()
|
|
107
109
|
}));
|
|
108
110
|
}
|
|
109
111
|
}, {
|
|
@@ -11,6 +11,7 @@ import { Button } from '@instructure/ui-buttons';
|
|
|
11
11
|
import { themeable } from '@instructure/ui-themeable';
|
|
12
12
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
13
13
|
import RichContentInput from "../../../../../../common/components/RichContentInput/index.js";
|
|
14
|
+
import { isNewRCEEnabled } from "../../../../../../common/util/rceChecker.js";
|
|
14
15
|
import wrapWithOutsideClick from "../../../../../../common/components/shared/functionality/componentWithOutsideClick.js";
|
|
15
16
|
import CustomPropTypes from "../../../../../../common/util/CustomPropTypes.js";
|
|
16
17
|
import elementsForSelectors from "../../../../../../common/util/ElementsForSelectors.js";
|
|
@@ -88,7 +89,8 @@ var QuizInstructionsEdit = (_dec = themeable(theme, styles), _dec(_class = (_tem
|
|
|
88
89
|
onKeyUp: this.props.onInputChange,
|
|
89
90
|
onChange: this.props.onInputChange,
|
|
90
91
|
parentType: PARENT_TYPE_QUIZ,
|
|
91
|
-
parentId: this.props.quizId
|
|
92
|
+
parentId: this.props.quizId,
|
|
93
|
+
useNewRce: isNewRCEEnabled()
|
|
92
94
|
}), /*#__PURE__*/React.createElement("div", {
|
|
93
95
|
className: styles.footer
|
|
94
96
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
@@ -22,23 +22,23 @@ import { ItemTypes, dragSource, collectDrag } from "../../../../../common/compon
|
|
|
22
22
|
import PositionBox from "../../../../../common/components/resources/positionBox/PositionBox.js";
|
|
23
23
|
import DragAndDropZone from "../../../../../common/components/shared/drag_and_drop/DragAndDropZone/index.js";
|
|
24
24
|
var styles = {
|
|
25
|
-
componentId: '
|
|
25
|
+
componentId: 'cjiDL',
|
|
26
26
|
template: function template(theme) {
|
|
27
|
-
return "\n\n.
|
|
27
|
+
return "\n\n.cjiDL_eLmg{transform:translateZ(0)}\n\n.cjiDL_TMNr{background-color:".concat(theme.quizEntryShowBackgroundColor || 'inherit', ";padding:").concat(theme.quizEntryShowPadding || 'inherit', "}\n\n.cjiDL_fsuY{align-items:stretch;display:flex;flex-direction:row;flex-wrap:nowrap;height:").concat(theme.headerHeight || 'inherit', ";padding-right:").concat(theme.headerRightPadding || 'inherit', "}\n\n.cjiDL_bscQ{border:").concat(theme.dndBorder || 'inherit', "}\n\n.cjiDL_cKlw{align-items:center;display:inline-flex;flex:8 0 0;overflow:hidden}\n\n.cjiDL_eGWt{border-bottom:").concat(theme.phoneConnectingLinesBorderWidth || 'inherit', " dotted;border-color:").concat(theme.phoneConnectingLinesBorderColor || 'inherit', ";border-left:").concat(theme.phoneConnectingLinesBorderWidth || 'inherit', " dotted;height:2rem;margin-right:1.2rem;margin-top:-0.8rem;width:1.2rem}\n\n.cjiDL_eGWt,.cjiDL_IoDT{display:inline-flex;flex:0 0 auto}\n\n.cjiDL_IoDT{color:").concat(theme.rightHeaderColor || 'inherit', ";text-align:right;z-index:").concat(theme.rightHeaderZIndex || 'inherit', "}\n\n[dir=ltr] .cjiDL_IoDT,[dir=rtl] .cjiDL_IoDT{text-align:right}\n\n.cjiDL_IoDT button{background-color:transparent;background-color:initial}\n\n.cjiDL_eCZW,.cjiDL_cwte,.cjiDL_nvdO{color:").concat(theme.titleInteractionTypeNamePointsColor || 'inherit', ";font-size:").concat(theme.titleInteractionTypeNamePointsFontSize || 'inherit', ";margin-left:").concat(theme.titleInteractionTypeNamePointsLeftMargin || 'inherit', ";margin-right:").concat(theme.titleInteractionTypeNamePointsRightMargin || 'inherit', ";overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n\n.cjiDL_csjx{margin:").concat(theme.itemHolderMargin || 'inherit', "}\n\n.cjiDL_fPOQ,.cjiDL_gaTA{background-color:transparent;border:none;color:inherit;font-size:").concat(theme.optionsButtonDragDropHandleFontSize || 'inherit', ";margin:").concat(theme.optionsButtonDragDropHandleMargin || 'inherit', "}\n\n.cjiDL_gaTA{cursor:pointer}\n\n@media print{.cjiDL_eLmg{break-inside:avoid}}");
|
|
28
28
|
},
|
|
29
|
-
'quizEntryWrapper': '
|
|
30
|
-
'quizEntryShow': '
|
|
31
|
-
'header': '
|
|
32
|
-
'dndBorder': '
|
|
33
|
-
'leftHeader': '
|
|
34
|
-
'connectingLines': '
|
|
35
|
-
'rightHeader': '
|
|
36
|
-
'interactionTypeName': '
|
|
37
|
-
'points': '
|
|
38
|
-
'title': '
|
|
39
|
-
'itemHolder': '
|
|
40
|
-
'dragAndDropHandle': '
|
|
41
|
-
'optionsButton': '
|
|
29
|
+
'quizEntryWrapper': 'cjiDL_eLmg',
|
|
30
|
+
'quizEntryShow': 'cjiDL_TMNr',
|
|
31
|
+
'header': 'cjiDL_fsuY',
|
|
32
|
+
'dndBorder': 'cjiDL_bscQ',
|
|
33
|
+
'leftHeader': 'cjiDL_cKlw',
|
|
34
|
+
'connectingLines': 'cjiDL_eGWt',
|
|
35
|
+
'rightHeader': 'cjiDL_IoDT',
|
|
36
|
+
'interactionTypeName': 'cjiDL_eCZW',
|
|
37
|
+
'points': 'cjiDL_cwte',
|
|
38
|
+
'title': 'cjiDL_nvdO',
|
|
39
|
+
'itemHolder': 'cjiDL_csjx',
|
|
40
|
+
'dragAndDropHandle': 'cjiDL_fPOQ',
|
|
41
|
+
'optionsButton': 'cjiDL_gaTA'
|
|
42
42
|
};
|
|
43
43
|
import theme from "./theme.js";
|
|
44
44
|
|
|
@@ -112,6 +112,7 @@ export var PrintFontSizeModal = (_dec = themeable(theme, styles), _dec(_class =
|
|
|
112
112
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
113
113
|
open: this.props.isOpen,
|
|
114
114
|
onDismiss: this.props.onCancel,
|
|
115
|
+
onExited: this.props.onExited,
|
|
115
116
|
size: "small",
|
|
116
117
|
label: this.text.printQuiz
|
|
117
118
|
}, /*#__PURE__*/React.createElement(ModalHeader, null, /*#__PURE__*/React.createElement(Heading, null, this.text.printQuiz), /*#__PURE__*/React.createElement(CloseButton, {
|
|
@@ -170,7 +171,8 @@ export var PrintFontSizeModal = (_dec = themeable(theme, styles), _dec(_class =
|
|
|
170
171
|
isOpen: PropTypes.bool,
|
|
171
172
|
persistedPrintFontSize: PropTypes.string,
|
|
172
173
|
onSubmit: PropTypes.func.isRequired,
|
|
173
|
-
onCancel: PropTypes.func.isRequired
|
|
174
|
+
onCancel: PropTypes.func.isRequired,
|
|
175
|
+
onExited: PropTypes.func.isRequired
|
|
174
176
|
}, _class2.defaultProps = {
|
|
175
177
|
isOpen: false,
|
|
176
178
|
persistedPrintFontSize: 'medium'
|
|
@@ -11,13 +11,13 @@ import PropTypes from 'prop-types';
|
|
|
11
11
|
import classnames from 'classnames';
|
|
12
12
|
import { themeable } from '@instructure/ui-themeable';
|
|
13
13
|
var styles = {
|
|
14
|
-
componentId: '
|
|
14
|
+
componentId: 'KVDkV',
|
|
15
15
|
template: function template(theme) {
|
|
16
|
-
return "\n\n.
|
|
16
|
+
return "\n\n.KVDkV_gasz{display:flex;font-family:".concat(theme.fontFamily || 'inherit', ";height:100%;margin:0}\n\n@media screen and (--phoneBreakPoint){.KVDkV_caGd{-webkit-overflow-scrolling:touch}}\n\n.KVDkV_caGd{transition:").concat(theme.contentTransition || 'inherit', ";width:100%}\n\n.KVDkV_dxaC{overflow-x:hidden;overflow-y:auto}\n\n@media print{.KVDkV_gasz{display:block}}");
|
|
17
17
|
},
|
|
18
|
-
'wrapper': '
|
|
19
|
-
'content': '
|
|
20
|
-
'scrollable': '
|
|
18
|
+
'wrapper': 'KVDkV_gasz',
|
|
19
|
+
'content': 'KVDkV_caGd',
|
|
20
|
+
'scrollable': 'KVDkV_dxaC'
|
|
21
21
|
};
|
|
22
22
|
import theme from "./theme.js";
|
|
23
23
|
export var Page = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
@@ -36,7 +36,8 @@ export function mapStateToProps(state, props) {
|
|
|
36
36
|
partialDeepScoringEnabled: featureOn('partial_deep_scoring'),
|
|
37
37
|
partialScoringEnabled: featureOn('partial_scoring'),
|
|
38
38
|
quizId: getActiveQuizId(state),
|
|
39
|
-
showCalculator: featureOn('calculator_per_question')
|
|
39
|
+
showCalculator: featureOn('calculator_per_question'),
|
|
40
|
+
useNewRce: featureOn('use_new_rce')
|
|
40
41
|
};
|
|
41
42
|
}
|
|
42
43
|
|
|
@@ -179,6 +179,7 @@ ItemEdit.propTypes = {
|
|
|
179
179
|
setUploadStatus: PropTypes.func.isRequired,
|
|
180
180
|
initialFocusId: PropTypes.string,
|
|
181
181
|
showCalculator: PropTypes.bool,
|
|
182
|
+
useNewRce: PropTypes.bool,
|
|
182
183
|
clearValidationErrorsFromApi: PropTypes.func.isRequired,
|
|
183
184
|
validationErrorsFromApi: PropTypes.objectOf(PropTypes.arrayOf(PropTypes.shape({
|
|
184
185
|
type: PropTypes.string,
|
|
@@ -196,6 +197,7 @@ ItemEdit.defaultProps = {
|
|
|
196
197
|
partialScoringEnabled: false,
|
|
197
198
|
initialFocusId: null,
|
|
198
199
|
showCalculator: false,
|
|
200
|
+
useNewRce: false,
|
|
199
201
|
validationErrorsFromApi: {}
|
|
200
202
|
};
|
|
201
203
|
export default ItemEdit;
|
|
@@ -18,7 +18,8 @@ function mapStateToProps(state, props) {
|
|
|
18
18
|
oneQuestionAtATime: isActiveQuizWorkingInstanceOneQuestionAtATime(state),
|
|
19
19
|
partialDeepScoringEnabled: featureOn('partial_deep_scoring'),
|
|
20
20
|
partialScoringEnabled: featureOn('partial_scoring'),
|
|
21
|
-
quizId: getActiveQuizId(state)
|
|
21
|
+
quizId: getActiveQuizId(state),
|
|
22
|
+
useNewRce: featureOn('use_new_rce')
|
|
22
23
|
};
|
|
23
24
|
}
|
|
24
25
|
|
|
@@ -76,11 +76,13 @@ ItemOverride.propTypes = {
|
|
|
76
76
|
partialScoringEnabled: PropTypes.bool,
|
|
77
77
|
quizId: PropTypes.string.isRequired,
|
|
78
78
|
screenreaderNotification: PropTypes.func.isRequired,
|
|
79
|
-
setOneQuestionAtATime: PropTypes.func.isRequired
|
|
79
|
+
setOneQuestionAtATime: PropTypes.func.isRequired,
|
|
80
|
+
useNewRce: PropTypes.bool
|
|
80
81
|
};
|
|
81
82
|
ItemOverride.defaultProps = {
|
|
82
83
|
errorsAreShowing: false,
|
|
83
84
|
partialScoringEnabled: false,
|
|
84
|
-
partialDeepScoringEnabled: false
|
|
85
|
+
partialDeepScoringEnabled: false,
|
|
86
|
+
useNewRce: false
|
|
85
87
|
};
|
|
86
88
|
export default ItemOverride;
|
|
@@ -16,6 +16,7 @@ import { themeable } from '@instructure/ui-themeable';
|
|
|
16
16
|
import { Heading } from '@instructure/ui-heading';
|
|
17
17
|
import RichContentInput from "../../../RichContentInput/index.js";
|
|
18
18
|
import { toErrors } from "../../../../util/instUIMessages.js";
|
|
19
|
+
import { isNewRCEEnabled } from "../../../../util/rceChecker.js";
|
|
19
20
|
import Errors from "../../../shared/errors/Errors.js";
|
|
20
21
|
import { SimpleSelect } from '@instructure/ui-simple-select';
|
|
21
22
|
import { IconUpdownLine } from '@instructure/ui-icons';
|
|
@@ -174,7 +175,8 @@ export var StimulusEditInfo = (_dec = themeable(theme, styles), _dec(_class = (_
|
|
|
174
175
|
defaultContent: stimulus.get('body'),
|
|
175
176
|
onKeyUp: this.onBodyChange,
|
|
176
177
|
onBlur: this.onBodyChange,
|
|
177
|
-
uploadPath: this.fileUploadUrl()
|
|
178
|
+
uploadPath: this.fileUploadUrl(),
|
|
179
|
+
useNewRce: isNewRCEEnabled()
|
|
178
180
|
}), /*#__PURE__*/React.createElement(Errors, {
|
|
179
181
|
errorList: this.errorsList('body')
|
|
180
182
|
})), /*#__PURE__*/React.createElement("div", {
|
|
@@ -17,36 +17,42 @@ export var PrintTrigger = /*#__PURE__*/function (_Component) {
|
|
|
17
17
|
|
|
18
18
|
var _super = _createSuper(PrintTrigger);
|
|
19
19
|
|
|
20
|
-
function PrintTrigger() {
|
|
20
|
+
function PrintTrigger(props) {
|
|
21
21
|
var _this;
|
|
22
22
|
|
|
23
23
|
_classCallCheck(this, PrintTrigger);
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
args[_key] = arguments[_key];
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
25
|
+
_this = _super.call(this, props);
|
|
30
26
|
_this.state = {
|
|
31
|
-
|
|
27
|
+
waitingForPrintingToBeReady: false,
|
|
32
28
|
printType: PRINT_CURRENT_PAGE,
|
|
33
29
|
// quiz key or blank quiz
|
|
34
30
|
shouldPrint: false
|
|
35
31
|
};
|
|
36
32
|
|
|
37
|
-
_this.
|
|
33
|
+
_this.print = function () {
|
|
34
|
+
printWithCss(_this.fontSize, 100);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
_this.ensurePrintingIsReady = function (printFontSizeModalClose) {
|
|
38
38
|
_this.setState({
|
|
39
|
-
|
|
39
|
+
waitingForPrintingToBeReady: true
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
-
ensureImagesLoaded().then(function () {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
42
|
+
Promise.all([ensureImagesLoaded(), printFontSizeModalClose]).then(function () {
|
|
43
|
+
_this.setState({
|
|
44
|
+
waitingForPrintingToBeReady: false
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
_this.onExited = function () {};
|
|
46
48
|
});
|
|
47
49
|
};
|
|
48
50
|
|
|
49
51
|
_this.handlePrintModalSubmit = function (fontSize, shouldPersist) {
|
|
52
|
+
var printFontSizeModalClose = new Promise(function (resolve) {
|
|
53
|
+
_this.onExited = resolve;
|
|
54
|
+
});
|
|
55
|
+
|
|
50
56
|
_this.props.closePrintFontSizeModal();
|
|
51
57
|
|
|
52
58
|
if (shouldPersist) {
|
|
@@ -58,12 +64,9 @@ export var PrintTrigger = /*#__PURE__*/function (_Component) {
|
|
|
58
64
|
if (_this.state.printType === PRINT_BLANK) {
|
|
59
65
|
_this.props.navigateToPreviewPrint();
|
|
60
66
|
} else {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
_this.ensureImagesLoaded(function () {
|
|
65
|
-
return printWithCss(fontSize, 400);
|
|
66
|
-
});
|
|
67
|
+
_this.fontSize = fontSize;
|
|
68
|
+
|
|
69
|
+
_this.ensurePrintingIsReady(printFontSizeModalClose);
|
|
67
70
|
}
|
|
68
71
|
};
|
|
69
72
|
|
|
@@ -79,6 +82,9 @@ export var PrintTrigger = /*#__PURE__*/function (_Component) {
|
|
|
79
82
|
return elementsForSelectors(_this.props.appContainer);
|
|
80
83
|
};
|
|
81
84
|
|
|
85
|
+
_this.onExited = function () {};
|
|
86
|
+
|
|
87
|
+
_this.fontSize = '';
|
|
82
88
|
return _this;
|
|
83
89
|
}
|
|
84
90
|
|
|
@@ -87,9 +93,10 @@ export var PrintTrigger = /*#__PURE__*/function (_Component) {
|
|
|
87
93
|
value: function render() {
|
|
88
94
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Overlay, {
|
|
89
95
|
applicationElement: this.applicationElement,
|
|
90
|
-
open: this.state.
|
|
96
|
+
open: this.state.waitingForPrintingToBeReady,
|
|
91
97
|
shouldContainFocus: true,
|
|
92
98
|
transition: "fade",
|
|
99
|
+
onExited: this.print,
|
|
93
100
|
label: t('Preparing Print Preview')
|
|
94
101
|
}, /*#__PURE__*/React.createElement(Mask, null, /*#__PURE__*/React.createElement(Spinner, {
|
|
95
102
|
mainText: t('Preparing Print Preview')
|
|
@@ -97,6 +104,7 @@ export var PrintTrigger = /*#__PURE__*/function (_Component) {
|
|
|
97
104
|
isOpen: this.props.printFontSizeModalOpen,
|
|
98
105
|
onSubmit: this.handlePrintModalSubmit,
|
|
99
106
|
onCancel: this.props.closePrintFontSizeModal,
|
|
107
|
+
onExited: this.onExited,
|
|
100
108
|
persistedPrintFontSize: this.props.persistedPrintFontSize
|
|
101
109
|
}), this.props.render(this.handlePrint));
|
|
102
110
|
}
|
|
@@ -66,7 +66,8 @@ export var propsForInteractionEdit = function propsForInteractionEdit(props, add
|
|
|
66
66
|
setOneQuestionAtATime: setOneQuestionAtATime,
|
|
67
67
|
stemErrors: props.workingItem.errorsFor('itemBody').toJS(),
|
|
68
68
|
initialFocusId: props.initialFocusId,
|
|
69
|
-
calculatorType: item.calculatorType
|
|
69
|
+
calculatorType: item.calculatorType,
|
|
70
|
+
useNewRce: props.useNewRce
|
|
70
71
|
};
|
|
71
72
|
};
|
|
72
73
|
export var propsForInteractionShow = function propsForInteractionShow(item) {
|
package/es/index.js
CHANGED
|
@@ -89,7 +89,8 @@ export { formatTime } from "./common/util/formatTimespan.js";
|
|
|
89
89
|
export { connect } from "./common/react-redux.js";
|
|
90
90
|
export { breakdownSeconds, HOUR_IN_SECONDS } from "./common/components/shared/FormattedDuration/index.js";
|
|
91
91
|
export { sessionStore } from "./common/util/sessionStore.js";
|
|
92
|
-
export { printWithCss, ensureImagesLoaded } from "./common/util/printUtils.js";
|
|
92
|
+
export { printWithCss, ensureImagesLoaded } from "./common/util/printUtils.js";
|
|
93
|
+
export { isNewRCEEnabled } from "./common/util/rceChecker.js"; // APIs
|
|
93
94
|
|
|
94
95
|
export { createQuizEntryRegrade } from "./grading/api/quizEntryRegrades.js";
|
|
95
96
|
export { getQuizEntry } from "./building/api/quizEntries.js";
|
|
@@ -31,6 +31,8 @@ var _uiThemeable = require("@instructure/ui-themeable");
|
|
|
31
31
|
|
|
32
32
|
var _quizRce = require("@instructure/quiz-rce");
|
|
33
33
|
|
|
34
|
+
var _rceChecker = require("../../../../common/util/rceChecker.js");
|
|
35
|
+
|
|
34
36
|
var _index = _interopRequireDefault(require("../../../../common/components/RichContentInput/index.js"));
|
|
35
37
|
|
|
36
38
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
@@ -128,7 +130,8 @@ var ItemFeedbackModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, styl
|
|
|
128
130
|
onChange: this.onFeedbackChange,
|
|
129
131
|
parentType: this.props.parentType,
|
|
130
132
|
parentId: this.props.parentId,
|
|
131
|
-
importModalCloseOverride: this.returnToFeedback
|
|
133
|
+
importModalCloseOverride: this.returnToFeedback,
|
|
134
|
+
useNewRce: (0, _rceChecker.isNewRCEEnabled)()
|
|
132
135
|
}));
|
|
133
136
|
}
|
|
134
137
|
}, {
|
|
@@ -29,6 +29,8 @@ var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/f
|
|
|
29
29
|
|
|
30
30
|
var _index = _interopRequireDefault(require("../../../../../../common/components/RichContentInput/index.js"));
|
|
31
31
|
|
|
32
|
+
var _rceChecker = require("../../../../../../common/util/rceChecker.js");
|
|
33
|
+
|
|
32
34
|
var _componentWithOutsideClick = _interopRequireDefault(require("../../../../../../common/components/shared/functionality/componentWithOutsideClick.js"));
|
|
33
35
|
|
|
34
36
|
var _CustomPropTypes = _interopRequireDefault(require("../../../../../../common/util/CustomPropTypes.js"));
|
|
@@ -113,7 +115,8 @@ var QuizInstructionsEdit = (_dec = (0, _uiThemeable.themeable)(_theme.default, s
|
|
|
113
115
|
onKeyUp: this.props.onInputChange,
|
|
114
116
|
onChange: this.props.onInputChange,
|
|
115
117
|
parentType: _quizCommon.PARENT_TYPE_QUIZ,
|
|
116
|
-
parentId: this.props.quizId
|
|
118
|
+
parentId: this.props.quizId,
|
|
119
|
+
useNewRce: (0, _rceChecker.isNewRCEEnabled)()
|
|
117
120
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
118
121
|
className: styles.footer
|
|
119
122
|
}, /*#__PURE__*/_react.default.createElement(_uiButtons.Button, {
|
|
@@ -54,23 +54,23 @@ var _theme = _interopRequireDefault(require("./theme.js"));
|
|
|
54
54
|
var _dec, _class, _class2, _temp;
|
|
55
55
|
|
|
56
56
|
var styles = {
|
|
57
|
-
componentId: '
|
|
57
|
+
componentId: 'cjiDL',
|
|
58
58
|
template: function template(theme) {
|
|
59
|
-
return "\n\n.
|
|
59
|
+
return "\n\n.cjiDL_eLmg{transform:translateZ(0)}\n\n.cjiDL_TMNr{background-color:".concat(theme.quizEntryShowBackgroundColor || 'inherit', ";padding:").concat(theme.quizEntryShowPadding || 'inherit', "}\n\n.cjiDL_fsuY{align-items:stretch;display:flex;flex-direction:row;flex-wrap:nowrap;height:").concat(theme.headerHeight || 'inherit', ";padding-right:").concat(theme.headerRightPadding || 'inherit', "}\n\n.cjiDL_bscQ{border:").concat(theme.dndBorder || 'inherit', "}\n\n.cjiDL_cKlw{align-items:center;display:inline-flex;flex:8 0 0;overflow:hidden}\n\n.cjiDL_eGWt{border-bottom:").concat(theme.phoneConnectingLinesBorderWidth || 'inherit', " dotted;border-color:").concat(theme.phoneConnectingLinesBorderColor || 'inherit', ";border-left:").concat(theme.phoneConnectingLinesBorderWidth || 'inherit', " dotted;height:2rem;margin-right:1.2rem;margin-top:-0.8rem;width:1.2rem}\n\n.cjiDL_eGWt,.cjiDL_IoDT{display:inline-flex;flex:0 0 auto}\n\n.cjiDL_IoDT{color:").concat(theme.rightHeaderColor || 'inherit', ";text-align:right;z-index:").concat(theme.rightHeaderZIndex || 'inherit', "}\n\n[dir=ltr] .cjiDL_IoDT,[dir=rtl] .cjiDL_IoDT{text-align:right}\n\n.cjiDL_IoDT button{background-color:transparent;background-color:initial}\n\n.cjiDL_eCZW,.cjiDL_cwte,.cjiDL_nvdO{color:").concat(theme.titleInteractionTypeNamePointsColor || 'inherit', ";font-size:").concat(theme.titleInteractionTypeNamePointsFontSize || 'inherit', ";margin-left:").concat(theme.titleInteractionTypeNamePointsLeftMargin || 'inherit', ";margin-right:").concat(theme.titleInteractionTypeNamePointsRightMargin || 'inherit', ";overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n\n.cjiDL_csjx{margin:").concat(theme.itemHolderMargin || 'inherit', "}\n\n.cjiDL_fPOQ,.cjiDL_gaTA{background-color:transparent;border:none;color:inherit;font-size:").concat(theme.optionsButtonDragDropHandleFontSize || 'inherit', ";margin:").concat(theme.optionsButtonDragDropHandleMargin || 'inherit', "}\n\n.cjiDL_gaTA{cursor:pointer}\n\n@media print{.cjiDL_eLmg{break-inside:avoid}}");
|
|
60
60
|
},
|
|
61
|
-
'quizEntryWrapper': '
|
|
62
|
-
'quizEntryShow': '
|
|
63
|
-
'header': '
|
|
64
|
-
'dndBorder': '
|
|
65
|
-
'leftHeader': '
|
|
66
|
-
'connectingLines': '
|
|
67
|
-
'rightHeader': '
|
|
68
|
-
'interactionTypeName': '
|
|
69
|
-
'points': '
|
|
70
|
-
'title': '
|
|
71
|
-
'itemHolder': '
|
|
72
|
-
'dragAndDropHandle': '
|
|
73
|
-
'optionsButton': '
|
|
61
|
+
'quizEntryWrapper': 'cjiDL_eLmg',
|
|
62
|
+
'quizEntryShow': 'cjiDL_TMNr',
|
|
63
|
+
'header': 'cjiDL_fsuY',
|
|
64
|
+
'dndBorder': 'cjiDL_bscQ',
|
|
65
|
+
'leftHeader': 'cjiDL_cKlw',
|
|
66
|
+
'connectingLines': 'cjiDL_eGWt',
|
|
67
|
+
'rightHeader': 'cjiDL_IoDT',
|
|
68
|
+
'interactionTypeName': 'cjiDL_eCZW',
|
|
69
|
+
'points': 'cjiDL_cwte',
|
|
70
|
+
'title': 'cjiDL_nvdO',
|
|
71
|
+
'itemHolder': 'cjiDL_csjx',
|
|
72
|
+
'dragAndDropHandle': 'cjiDL_fPOQ',
|
|
73
|
+
'optionsButton': 'cjiDL_gaTA'
|
|
74
74
|
};
|
|
75
75
|
|
|
76
76
|
var _ref = /*#__PURE__*/_react.default.createElement(_uiIcons.IconBankLine, null);
|
|
@@ -136,6 +136,7 @@ var PrintFontSizeModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, sty
|
|
|
136
136
|
return /*#__PURE__*/_react.default.createElement(_quizCommon.Modal, {
|
|
137
137
|
open: this.props.isOpen,
|
|
138
138
|
onDismiss: this.props.onCancel,
|
|
139
|
+
onExited: this.props.onExited,
|
|
139
140
|
size: "small",
|
|
140
141
|
label: this.text.printQuiz
|
|
141
142
|
}, /*#__PURE__*/_react.default.createElement(_quizCommon.ModalHeader, null, /*#__PURE__*/_react.default.createElement(_uiHeading.Heading, null, this.text.printQuiz), /*#__PURE__*/_react.default.createElement(_uiButtons.CloseButton, {
|
|
@@ -194,7 +195,8 @@ var PrintFontSizeModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, sty
|
|
|
194
195
|
isOpen: _propTypes.default.bool,
|
|
195
196
|
persistedPrintFontSize: _propTypes.default.string,
|
|
196
197
|
onSubmit: _propTypes.default.func.isRequired,
|
|
197
|
-
onCancel: _propTypes.default.func.isRequired
|
|
198
|
+
onCancel: _propTypes.default.func.isRequired,
|
|
199
|
+
onExited: _propTypes.default.func.isRequired
|
|
198
200
|
}, _class2.defaultProps = {
|
|
199
201
|
isOpen: false,
|
|
200
202
|
persistedPrintFontSize: 'medium'
|
|
@@ -32,13 +32,13 @@ var _theme = _interopRequireDefault(require("./theme.js"));
|
|
|
32
32
|
var _dec, _class, _class2, _temp;
|
|
33
33
|
|
|
34
34
|
var styles = {
|
|
35
|
-
componentId: '
|
|
35
|
+
componentId: 'KVDkV',
|
|
36
36
|
template: function template(theme) {
|
|
37
|
-
return "\n\n.
|
|
37
|
+
return "\n\n.KVDkV_gasz{display:flex;font-family:".concat(theme.fontFamily || 'inherit', ";height:100%;margin:0}\n\n@media screen and (--phoneBreakPoint){.KVDkV_caGd{-webkit-overflow-scrolling:touch}}\n\n.KVDkV_caGd{transition:").concat(theme.contentTransition || 'inherit', ";width:100%}\n\n.KVDkV_dxaC{overflow-x:hidden;overflow-y:auto}\n\n@media print{.KVDkV_gasz{display:block}}");
|
|
38
38
|
},
|
|
39
|
-
'wrapper': '
|
|
40
|
-
'content': '
|
|
41
|
-
'scrollable': '
|
|
39
|
+
'wrapper': 'KVDkV_gasz',
|
|
40
|
+
'content': 'KVDkV_caGd',
|
|
41
|
+
'scrollable': 'KVDkV_dxaC'
|
|
42
42
|
};
|
|
43
43
|
var Page = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
44
44
|
(0, _inherits2.default)(Page, _Component);
|
|
@@ -64,7 +64,8 @@ function mapStateToProps(state, props) {
|
|
|
64
64
|
partialDeepScoringEnabled: (0, _featureCheck.featureOn)('partial_deep_scoring'),
|
|
65
65
|
partialScoringEnabled: (0, _featureCheck.featureOn)('partial_scoring'),
|
|
66
66
|
quizId: (0, _quizzes2.getActiveQuizId)(state),
|
|
67
|
-
showCalculator: (0, _featureCheck.featureOn)('calculator_per_question')
|
|
67
|
+
showCalculator: (0, _featureCheck.featureOn)('calculator_per_question'),
|
|
68
|
+
useNewRce: (0, _featureCheck.featureOn)('use_new_rce')
|
|
68
69
|
};
|
|
69
70
|
}
|
|
70
71
|
|
|
@@ -210,6 +210,7 @@ ItemEdit.propTypes = {
|
|
|
210
210
|
setUploadStatus: _propTypes.default.func.isRequired,
|
|
211
211
|
initialFocusId: _propTypes.default.string,
|
|
212
212
|
showCalculator: _propTypes.default.bool,
|
|
213
|
+
useNewRce: _propTypes.default.bool,
|
|
213
214
|
clearValidationErrorsFromApi: _propTypes.default.func.isRequired,
|
|
214
215
|
validationErrorsFromApi: _propTypes.default.objectOf(_propTypes.default.arrayOf(_propTypes.default.shape({
|
|
215
216
|
type: _propTypes.default.string,
|
|
@@ -227,6 +228,7 @@ ItemEdit.defaultProps = {
|
|
|
227
228
|
partialScoringEnabled: false,
|
|
228
229
|
initialFocusId: null,
|
|
229
230
|
showCalculator: false,
|
|
231
|
+
useNewRce: false,
|
|
230
232
|
validationErrorsFromApi: {}
|
|
231
233
|
};
|
|
232
234
|
var _default = ItemEdit;
|
|
@@ -38,7 +38,8 @@ function mapStateToProps(state, props) {
|
|
|
38
38
|
oneQuestionAtATime: (0, _quizzes2.isActiveQuizWorkingInstanceOneQuestionAtATime)(state),
|
|
39
39
|
partialDeepScoringEnabled: (0, _featureCheck.featureOn)('partial_deep_scoring'),
|
|
40
40
|
partialScoringEnabled: (0, _featureCheck.featureOn)('partial_scoring'),
|
|
41
|
-
quizId: (0, _quizzes2.getActiveQuizId)(state)
|
|
41
|
+
quizId: (0, _quizzes2.getActiveQuizId)(state),
|
|
42
|
+
useNewRce: (0, _featureCheck.featureOn)('use_new_rce')
|
|
42
43
|
};
|
|
43
44
|
}
|
|
44
45
|
|
|
@@ -99,12 +99,14 @@ ItemOverride.propTypes = {
|
|
|
99
99
|
partialScoringEnabled: _propTypes.default.bool,
|
|
100
100
|
quizId: _propTypes.default.string.isRequired,
|
|
101
101
|
screenreaderNotification: _propTypes.default.func.isRequired,
|
|
102
|
-
setOneQuestionAtATime: _propTypes.default.func.isRequired
|
|
102
|
+
setOneQuestionAtATime: _propTypes.default.func.isRequired,
|
|
103
|
+
useNewRce: _propTypes.default.bool
|
|
103
104
|
};
|
|
104
105
|
ItemOverride.defaultProps = {
|
|
105
106
|
errorsAreShowing: false,
|
|
106
107
|
partialScoringEnabled: false,
|
|
107
|
-
partialDeepScoringEnabled: false
|
|
108
|
+
partialDeepScoringEnabled: false,
|
|
109
|
+
useNewRce: false
|
|
108
110
|
};
|
|
109
111
|
var _default = ItemOverride;
|
|
110
112
|
exports.default = _default;
|
|
@@ -39,6 +39,8 @@ var _index = _interopRequireDefault(require("../../../RichContentInput/index.js"
|
|
|
39
39
|
|
|
40
40
|
var _instUIMessages = require("../../../../util/instUIMessages.js");
|
|
41
41
|
|
|
42
|
+
var _rceChecker = require("../../../../util/rceChecker.js");
|
|
43
|
+
|
|
42
44
|
var _Errors = _interopRequireDefault(require("../../../shared/errors/Errors.js"));
|
|
43
45
|
|
|
44
46
|
var _uiSimpleSelect = require("@instructure/ui-simple-select");
|
|
@@ -206,7 +208,8 @@ var StimulusEditInfo = (_dec = (0, _uiThemeable.themeable)(_theme.default, style
|
|
|
206
208
|
defaultContent: stimulus.get('body'),
|
|
207
209
|
onKeyUp: this.onBodyChange,
|
|
208
210
|
onBlur: this.onBodyChange,
|
|
209
|
-
uploadPath: this.fileUploadUrl()
|
|
211
|
+
uploadPath: this.fileUploadUrl(),
|
|
212
|
+
useNewRce: (0, _rceChecker.isNewRCEEnabled)()
|
|
210
213
|
}), /*#__PURE__*/_react.default.createElement(_Errors.default, {
|
|
211
214
|
errorList: this.errorsList('body')
|
|
212
215
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -42,36 +42,41 @@ var PrintTrigger = /*#__PURE__*/function (_Component) {
|
|
|
42
42
|
|
|
43
43
|
var _super = (0, _createSuper2.default)(PrintTrigger);
|
|
44
44
|
|
|
45
|
-
function PrintTrigger() {
|
|
45
|
+
function PrintTrigger(props) {
|
|
46
46
|
var _this;
|
|
47
47
|
|
|
48
48
|
(0, _classCallCheck2.default)(this, PrintTrigger);
|
|
49
|
-
|
|
50
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
51
|
-
args[_key] = arguments[_key];
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
49
|
+
_this = _super.call(this, props);
|
|
55
50
|
_this.state = {
|
|
56
|
-
|
|
51
|
+
waitingForPrintingToBeReady: false,
|
|
57
52
|
printType: _quizCommon.PRINT_CURRENT_PAGE,
|
|
58
53
|
// quiz key or blank quiz
|
|
59
54
|
shouldPrint: false
|
|
60
55
|
};
|
|
61
56
|
|
|
62
|
-
_this.
|
|
57
|
+
_this.print = function () {
|
|
58
|
+
(0, _printUtils.printWithCss)(_this.fontSize, 100);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
_this.ensurePrintingIsReady = function (printFontSizeModalClose) {
|
|
63
62
|
_this.setState({
|
|
64
|
-
|
|
63
|
+
waitingForPrintingToBeReady: true
|
|
65
64
|
});
|
|
66
65
|
|
|
67
|
-
(0, _printUtils.ensureImagesLoaded)().then(function () {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
66
|
+
Promise.all([(0, _printUtils.ensureImagesLoaded)(), printFontSizeModalClose]).then(function () {
|
|
67
|
+
_this.setState({
|
|
68
|
+
waitingForPrintingToBeReady: false
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
_this.onExited = function () {};
|
|
71
72
|
});
|
|
72
73
|
};
|
|
73
74
|
|
|
74
75
|
_this.handlePrintModalSubmit = function (fontSize, shouldPersist) {
|
|
76
|
+
var printFontSizeModalClose = new Promise(function (resolve) {
|
|
77
|
+
_this.onExited = resolve;
|
|
78
|
+
});
|
|
79
|
+
|
|
75
80
|
_this.props.closePrintFontSizeModal();
|
|
76
81
|
|
|
77
82
|
if (shouldPersist) {
|
|
@@ -83,12 +88,9 @@ var PrintTrigger = /*#__PURE__*/function (_Component) {
|
|
|
83
88
|
if (_this.state.printType === _quizCommon.PRINT_BLANK) {
|
|
84
89
|
_this.props.navigateToPreviewPrint();
|
|
85
90
|
} else {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
_this.ensureImagesLoaded(function () {
|
|
90
|
-
return (0, _printUtils.printWithCss)(fontSize, 400);
|
|
91
|
-
});
|
|
91
|
+
_this.fontSize = fontSize;
|
|
92
|
+
|
|
93
|
+
_this.ensurePrintingIsReady(printFontSizeModalClose);
|
|
92
94
|
}
|
|
93
95
|
};
|
|
94
96
|
|
|
@@ -104,6 +106,9 @@ var PrintTrigger = /*#__PURE__*/function (_Component) {
|
|
|
104
106
|
return (0, _ElementsForSelectors.default)(_this.props.appContainer);
|
|
105
107
|
};
|
|
106
108
|
|
|
109
|
+
_this.onExited = function () {};
|
|
110
|
+
|
|
111
|
+
_this.fontSize = '';
|
|
107
112
|
return _this;
|
|
108
113
|
}
|
|
109
114
|
|
|
@@ -112,9 +117,10 @@ var PrintTrigger = /*#__PURE__*/function (_Component) {
|
|
|
112
117
|
value: function render() {
|
|
113
118
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_uiOverlays.Overlay, {
|
|
114
119
|
applicationElement: this.applicationElement,
|
|
115
|
-
open: this.state.
|
|
120
|
+
open: this.state.waitingForPrintingToBeReady,
|
|
116
121
|
shouldContainFocus: true,
|
|
117
122
|
transition: "fade",
|
|
123
|
+
onExited: this.print,
|
|
118
124
|
label: (0, _formatMessage.default)('Preparing Print Preview')
|
|
119
125
|
}, /*#__PURE__*/_react.default.createElement(_uiOverlays.Mask, null, /*#__PURE__*/_react.default.createElement(_Spinner.QuizzesSpinner, {
|
|
120
126
|
mainText: (0, _formatMessage.default)('Preparing Print Preview')
|
|
@@ -122,6 +128,7 @@ var PrintTrigger = /*#__PURE__*/function (_Component) {
|
|
|
122
128
|
isOpen: this.props.printFontSizeModalOpen,
|
|
123
129
|
onSubmit: this.handlePrintModalSubmit,
|
|
124
130
|
onCancel: this.props.closePrintFontSizeModal,
|
|
131
|
+
onExited: this.onExited,
|
|
125
132
|
persistedPrintFontSize: this.props.persistedPrintFontSize
|
|
126
133
|
}), this.props.render(this.handlePrint));
|
|
127
134
|
}
|
|
@@ -77,7 +77,8 @@ var propsForInteractionEdit = function propsForInteractionEdit(props, additional
|
|
|
77
77
|
setOneQuestionAtATime: setOneQuestionAtATime,
|
|
78
78
|
stemErrors: props.workingItem.errorsFor('itemBody').toJS(),
|
|
79
79
|
initialFocusId: props.initialFocusId,
|
|
80
|
-
calculatorType: item.calculatorType
|
|
80
|
+
calculatorType: item.calculatorType,
|
|
81
|
+
useNewRce: props.useNewRce
|
|
81
82
|
};
|
|
82
83
|
};
|
|
83
84
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isNewRCEEnabled = isNewRCEEnabled;
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
|
|
9
|
+
var _featureCheck = require("./featureCheck.js");
|
|
10
|
+
|
|
11
|
+
var newRCEFeatureName = 'use_new_rce';
|
|
12
|
+
|
|
13
|
+
function isNewRCEEnabled() {
|
|
14
|
+
return (0, _featureCheck.featureOn)(newRCEFeatureName);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
var _default = isNewRCEEnabled;
|
|
18
|
+
exports.default = _default;
|
package/lib/index.js
CHANGED
|
@@ -103,6 +103,7 @@ var _exportNames = {
|
|
|
103
103
|
sessionStore: true,
|
|
104
104
|
printWithCss: true,
|
|
105
105
|
ensureImagesLoaded: true,
|
|
106
|
+
isNewRCEEnabled: true,
|
|
106
107
|
createQuizEntryRegrade: true,
|
|
107
108
|
getQuizEntry: true,
|
|
108
109
|
moveQuizEntry: true,
|
|
@@ -773,6 +774,12 @@ Object.defineProperty(exports, "ensureImagesLoaded", {
|
|
|
773
774
|
return _printUtils.ensureImagesLoaded;
|
|
774
775
|
}
|
|
775
776
|
});
|
|
777
|
+
Object.defineProperty(exports, "isNewRCEEnabled", {
|
|
778
|
+
enumerable: true,
|
|
779
|
+
get: function get() {
|
|
780
|
+
return _rceChecker.isNewRCEEnabled;
|
|
781
|
+
}
|
|
782
|
+
});
|
|
776
783
|
Object.defineProperty(exports, "createQuizEntryRegrade", {
|
|
777
784
|
enumerable: true,
|
|
778
785
|
get: function get() {
|
|
@@ -1453,6 +1460,8 @@ var _sessionStore = require("./common/util/sessionStore.js");
|
|
|
1453
1460
|
|
|
1454
1461
|
var _printUtils = require("./common/util/printUtils.js");
|
|
1455
1462
|
|
|
1463
|
+
var _rceChecker = require("./common/util/rceChecker.js");
|
|
1464
|
+
|
|
1456
1465
|
var _quizEntryRegrades = require("./grading/api/quizEntryRegrades.js");
|
|
1457
1466
|
|
|
1458
1467
|
var _quizEntries = require("./building/api/quizEntries.js");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.23.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The Quiz React SDK by Instructure Inc.",
|
|
6
6
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@instructure/outcomes-ui": "^2.1.2",
|
|
44
|
-
"@instructure/quiz-common": "^17.
|
|
45
|
-
"@instructure/quiz-i18n": "^17.
|
|
46
|
-
"@instructure/quiz-interactions": "^17.
|
|
47
|
-
"@instructure/quiz-number-input": "^17.
|
|
48
|
-
"@instructure/quiz-rce": "^17.
|
|
44
|
+
"@instructure/quiz-common": "^17.23.0",
|
|
45
|
+
"@instructure/quiz-i18n": "^17.23.0",
|
|
46
|
+
"@instructure/quiz-interactions": "^17.23.0",
|
|
47
|
+
"@instructure/quiz-number-input": "^17.23.0",
|
|
48
|
+
"@instructure/quiz-rce": "^17.23.0",
|
|
49
49
|
"@instructure/ui-a11y-content": "^7.11.0",
|
|
50
50
|
"@instructure/ui-alerts": "^7.11.0",
|
|
51
51
|
"@instructure/ui-avatar": "^7.11.0",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"eventemitter3": "^3.1.0",
|
|
107
107
|
"humps": "^2.0.0",
|
|
108
108
|
"immutable": "^3.8.1",
|
|
109
|
-
"instructure-validations": "^17.
|
|
109
|
+
"instructure-validations": "^17.23.0",
|
|
110
110
|
"ipaddr.js": "^1.5.4",
|
|
111
111
|
"isomorphic-fetch": "^2.2.0",
|
|
112
112
|
"isuuid": "^0.1.0",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"uuid": "^3.2.1"
|
|
138
138
|
},
|
|
139
139
|
"devDependencies": {
|
|
140
|
-
"@instructure/quiz-scripts": "^17.
|
|
140
|
+
"@instructure/quiz-scripts": "^17.23.0",
|
|
141
141
|
"@instructure/ui-axe-check": "^7.11.0",
|
|
142
142
|
"@instructure/ui-babel-preset": "^7.11.0",
|
|
143
143
|
"@instructure/ui-karma-config": "^7.11.0",
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
"intl": "^1.2.4",
|
|
157
157
|
"jquery": "^2.2.3",
|
|
158
158
|
"most-subject": "^5.3.0",
|
|
159
|
-
"quiz-presets": "^17.
|
|
159
|
+
"quiz-presets": "^17.23.0",
|
|
160
160
|
"react": "^16.8.6",
|
|
161
161
|
"react-addons-test-utils": "^15.6.2",
|
|
162
162
|
"react-dom": "^16.8.6",
|
|
@@ -172,5 +172,5 @@
|
|
|
172
172
|
"publishConfig": {
|
|
173
173
|
"access": "public"
|
|
174
174
|
},
|
|
175
|
-
"gitHead": "
|
|
175
|
+
"gitHead": "a7205c2f849e1fc65c29c4528ad35900dcc549ee"
|
|
176
176
|
}
|