@instructure/quiz-core 22.4.0 → 22.5.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/es/building/api/quizzes.js +6 -1
- package/es/building/components/resources/quiz/title/Edit/index.js +68 -61
- package/es/common/actions/modifications.js +11 -0
- package/es/common/components/resources/item/ItemEdit/index.js +5 -3
- package/es/common/components/resources/item/ItemEdit/presenter.js +4 -2
- package/es/common/records/Quiz.js +1 -0
- package/es/common/util/interactionTypePropsHelper.js +2 -1
- package/es/index.js +1 -2
- package/lib/building/api/quizzes.js +6 -0
- package/lib/building/components/resources/quiz/title/Edit/index.js +69 -60
- package/lib/common/actions/modifications.js +12 -0
- package/lib/common/components/resources/item/ItemEdit/index.js +5 -3
- package/lib/common/components/resources/item/ItemEdit/presenter.js +4 -2
- package/lib/common/records/Quiz.js +1 -0
- package/lib/common/util/interactionTypePropsHelper.js +2 -1
- package/lib/index.js +7 -8
- package/package.json +8 -8
- package/es/building/components/resources/quiz/title/Edit/styles.js +0 -38
- package/es/building/components/resources/quiz/title/Edit/theme.js +0 -17
- package/es/common/components/shared/errors/Errors.js +0 -69
- package/es/common/components/shared/errors/styles.js +0 -16
- package/es/common/components/shared/errors/theme.js +0 -10
- package/lib/building/components/resources/quiz/title/Edit/styles.js +0 -45
- package/lib/building/components/resources/quiz/title/Edit/theme.js +0 -23
- package/lib/common/components/shared/errors/Errors.js +0 -76
- package/lib/common/components/shared/errors/styles.js +0 -22
- package/lib/common/components/shared/errors/theme.js +0 -16
|
@@ -3,7 +3,7 @@ import { noop } from 'lodash';
|
|
|
3
3
|
import { DO_NOTHING, NEW_QUIZ_ID, QUIZ_SAVE_CALL, PARENT_TYPE_BANK, PARENT_TYPE_QUIZ, PARENT_TYPE_QUIZ_SESSION } from '@instructure/quiz-common';
|
|
4
4
|
import Fetcher from '../../common/util/Fetcher';
|
|
5
5
|
import { getQTIInfo } from './qtiImports';
|
|
6
|
-
import { changeQuizAllowBacktracking, changeQuizAllowClearMCSelection, changeQuizChoiceElimination, changeQuizHasTimeLimit, changeQuizOneAtATimeType, changeQuizDefaultRceSettings, changeQuizShuffleQuestions, changeQuizShuffleAnswers, changeQuizRequireStudentAccessCode, changeQuizStudentAccessCode, changeSessionTimeLimitInSeconds, changeQuizFilterIpAddress, changeQuizIpFilters, changeQuizCalculatorType, changeResultsFeedback, changeResultsFeedbackEnabled } from '../../common/actions/modifications';
|
|
6
|
+
import { changeQuizAllowBacktracking, changeQuizAllowClearMCSelection, changeQuizChoiceElimination, changeQuizHasTimeLimit, changeQuizOneAtATimeType, changeQuizDefaultRceSettings, changeQuizShuffleQuestions, changeQuizShuffleAnswers, changeQuizRequireStudentAccessCode, changeQuizStudentAccessCode, changeSessionTimeLimitInSeconds, changeQuizFilterIpAddress, changeQuizIpFilters, changeQuizCalculatorType, changeResultsFeedback, changeResultsFeedbackEnabled, changeQuizDisableDocumentAccess } from '../../common/actions/modifications';
|
|
7
7
|
import { handleQuizResponse } from '../../common/api/callHandlers';
|
|
8
8
|
import { getUploadUrl, sendFileToS3 } from '../../common/api/fileUpload';
|
|
9
9
|
import { interactionTypeFetch } from '../../common/api/interactionTypes';
|
|
@@ -190,6 +190,11 @@ export function setQuizShuffleAnswers(quizId, value, completeCb) {
|
|
|
190
190
|
shuffle_answers: Boolean(value)
|
|
191
191
|
}, changeQuizShuffleAnswers(quizId, value), completeCb);
|
|
192
192
|
}
|
|
193
|
+
export function setQuizDisableDocumentAccess(quizId, value, completeCb) {
|
|
194
|
+
return setQuizProperty(quizId, {
|
|
195
|
+
disable_document_access: Boolean(value)
|
|
196
|
+
}, changeQuizDisableDocumentAccess(quizId, value), completeCb);
|
|
197
|
+
}
|
|
193
198
|
export function setRequireStudentAccessCode(quizId, value, completeCb) {
|
|
194
199
|
return setQuizProperty(quizId, {
|
|
195
200
|
require_student_access_code: Boolean(value)
|
|
@@ -4,7 +4,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConst
|
|
|
4
4
|
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
5
5
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
6
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
|
-
var
|
|
7
|
+
var _TitleEdit;
|
|
8
8
|
function _callSuper(_this, derived, args) {
|
|
9
9
|
function isNativeReflectConstruct() {
|
|
10
10
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
@@ -20,17 +20,14 @@ function _callSuper(_this, derived, args) {
|
|
|
20
20
|
return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args));
|
|
21
21
|
}
|
|
22
22
|
/** @jsx jsx */
|
|
23
|
-
import { Component } from 'react';
|
|
23
|
+
import React, { Component } from 'react';
|
|
24
24
|
import PropTypes from 'prop-types';
|
|
25
25
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
26
|
-
import ReactDOM from 'react-dom';
|
|
27
26
|
import defer from 'lodash/defer';
|
|
28
27
|
import { jsx } from '@instructure/emotion';
|
|
29
|
-
import generateStyle from './styles';
|
|
30
|
-
import generateComponentTheme from './theme';
|
|
31
|
-
import Errors from '../../../../../../common/components/shared/errors/Errors';
|
|
32
28
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
33
|
-
import {
|
|
29
|
+
import { Flex, TextInput } from '@instructure/quiz-common';
|
|
30
|
+
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
34
31
|
|
|
35
32
|
// =================================
|
|
36
33
|
|
|
@@ -40,19 +37,23 @@ import { withStyleOverrides } from '@instructure/quiz-common';
|
|
|
40
37
|
|
|
41
38
|
// =================================
|
|
42
39
|
|
|
43
|
-
export var TitleEdit =
|
|
44
|
-
function TitleEdit() {
|
|
40
|
+
export var TitleEdit = /*#__PURE__*/function (_Component) {
|
|
41
|
+
function TitleEdit(props) {
|
|
45
42
|
var _this2;
|
|
46
43
|
_classCallCheck(this, TitleEdit);
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
_this2 = _callSuper(this, TitleEdit, [props]);
|
|
45
|
+
/**
|
|
46
|
+
* @type {React.RefObject<TextInput> | null}
|
|
47
|
+
*/
|
|
48
|
+
_defineProperty(_this2, "inputRef", null);
|
|
51
49
|
_defineProperty(_this2, "defer", function (fn) {
|
|
52
|
-
// to enable
|
|
50
|
+
// to enable synchronous testing
|
|
53
51
|
var deferFn = _this2.props.deferMock || defer;
|
|
54
52
|
deferFn(fn);
|
|
55
53
|
});
|
|
54
|
+
_defineProperty(_this2, "setInputRef", function (node) {
|
|
55
|
+
_this2.inputRef.current = node;
|
|
56
|
+
});
|
|
56
57
|
_defineProperty(_this2, "switchOffEditing", function () {
|
|
57
58
|
var fromEnterPressed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
58
59
|
_this2.ifValidElseError(function () {
|
|
@@ -81,26 +82,21 @@ export var TitleEdit = (_dec = withStyleOverrides(generateStyle, generateCompone
|
|
|
81
82
|
_defineProperty(_this2, "handleBlur", function (e) {
|
|
82
83
|
_this2.switchOffEditing(false);
|
|
83
84
|
});
|
|
85
|
+
_this2.inputRef = React.createRef();
|
|
84
86
|
return _this2;
|
|
85
87
|
}
|
|
86
88
|
_inherits(TitleEdit, _Component);
|
|
87
89
|
return _createClass(TitleEdit, [{
|
|
88
90
|
key: "componentDidMount",
|
|
89
|
-
value:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
input.setSelectionRange(valLength, valLength);
|
|
99
|
-
}
|
|
100
|
-
}, {
|
|
101
|
-
key: "componentDidUpdate",
|
|
102
|
-
value: function componentDidUpdate() {
|
|
103
|
-
this.props.makeStyles();
|
|
91
|
+
value: function componentDidMount() {
|
|
92
|
+
var input = this.inputRef.current;
|
|
93
|
+
if (input) {
|
|
94
|
+
input.focus();
|
|
95
|
+
|
|
96
|
+
// Note: Some browsers add extra characters so we need to multiply the length by 2 to ensure
|
|
97
|
+
// the cursor is at the end
|
|
98
|
+
input.setSelectionRange(input.value.length * 2, input.value.length * 2);
|
|
99
|
+
}
|
|
104
100
|
}
|
|
105
101
|
}, {
|
|
106
102
|
key: "ifValidElseError",
|
|
@@ -121,46 +117,57 @@ export var TitleEdit = (_dec = withStyleOverrides(generateStyle, generateCompone
|
|
|
121
117
|
};
|
|
122
118
|
}
|
|
123
119
|
}, {
|
|
124
|
-
key: "
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
value: function renderErrors() {
|
|
131
|
-
if (this.hasErrors()) {
|
|
132
|
-
return jsx("div", {
|
|
133
|
-
css: this.props.styles.errorsWrapper
|
|
134
|
-
}, jsx(Errors, {
|
|
135
|
-
errorList: this.props.errors
|
|
136
|
-
}));
|
|
120
|
+
key: "normalizedErrors",
|
|
121
|
+
get: function get() {
|
|
122
|
+
var _this$props$errors;
|
|
123
|
+
var hasErrors = this.props.errorsAreShowing && this.props.errors.size > 0;
|
|
124
|
+
if (!hasErrors) {
|
|
125
|
+
return [];
|
|
137
126
|
}
|
|
127
|
+
var errorList = (_this$props$errors = this.props.errors) === null || _this$props$errors === void 0 || (_this$props$errors = _this$props$errors.toArray()) === null || _this$props$errors === void 0 ? void 0 : _this$props$errors.map(function (error) {
|
|
128
|
+
if (typeof error === 'object') {
|
|
129
|
+
return error;
|
|
130
|
+
}
|
|
131
|
+
return {
|
|
132
|
+
text: error,
|
|
133
|
+
type: 'newError'
|
|
134
|
+
};
|
|
135
|
+
});
|
|
136
|
+
return errorList || [];
|
|
138
137
|
}
|
|
139
138
|
}, {
|
|
140
139
|
key: "render",
|
|
141
140
|
value: function render() {
|
|
142
|
-
return jsx(
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
141
|
+
return jsx(Flex, {
|
|
142
|
+
direction: "column",
|
|
143
|
+
justifyItems: "center",
|
|
144
|
+
padding: "medium large",
|
|
146
145
|
"data-automation": "sdk-quiz-title-edit-wrapper"
|
|
147
|
-
}, jsx(
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
ref: this.setRef('input'),
|
|
151
|
-
type: "text",
|
|
152
|
-
"aria-label": t('title'),
|
|
146
|
+
}, jsx(Flex.Item, null, jsx(TextInput, {
|
|
147
|
+
inputRef: this.setInputRef,
|
|
148
|
+
renderLabel: jsx(ScreenReaderContent, null, t('Title')),
|
|
153
149
|
placeholder: t('Add a Title...'),
|
|
154
|
-
|
|
150
|
+
messages: this.normalizedErrors,
|
|
155
151
|
onKeyDown: this.handleKeyDown,
|
|
156
152
|
onKeyUp: this.handleKeyUp,
|
|
157
153
|
onChange: this.props.onInputChange,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
154
|
+
onBlur: this.handleBlur,
|
|
155
|
+
defaultValue: this.props.value,
|
|
156
|
+
"data-automation": "sdk-quiz-title-edit",
|
|
157
|
+
themeOverride: {
|
|
158
|
+
padding: 0,
|
|
159
|
+
borderColor: 'transparent',
|
|
160
|
+
mediumFontSize: '1.75rem',
|
|
161
|
+
fontWeight: '400'
|
|
162
|
+
}
|
|
163
|
+
})));
|
|
161
164
|
}
|
|
162
165
|
}]);
|
|
163
|
-
}(Component)
|
|
166
|
+
}(Component);
|
|
167
|
+
_TitleEdit = TitleEdit;
|
|
168
|
+
_defineProperty(TitleEdit, "displayName", 'TitleEdit');
|
|
169
|
+
_defineProperty(TitleEdit, "componentId", "Quizzes".concat(_TitleEdit.displayName));
|
|
170
|
+
_defineProperty(TitleEdit, "propTypes", {
|
|
164
171
|
value: PropTypes.string.isRequired,
|
|
165
172
|
isValid: PropTypes.bool.isRequired,
|
|
166
173
|
showError: PropTypes.func.isRequired,
|
|
@@ -170,10 +177,10 @@ export var TitleEdit = (_dec = withStyleOverrides(generateStyle, generateCompone
|
|
|
170
177
|
onInputChange: PropTypes.func.isRequired,
|
|
171
178
|
saveAndPreview: PropTypes.func.isRequired,
|
|
172
179
|
deferMock: PropTypes.func,
|
|
173
|
-
styles: PropTypes.object
|
|
174
|
-
|
|
175
|
-
|
|
180
|
+
styles: PropTypes.object
|
|
181
|
+
});
|
|
182
|
+
_defineProperty(TitleEdit, "defaultProps", {
|
|
176
183
|
errorsAreShowing: false,
|
|
177
184
|
deferMock: defer
|
|
178
|
-
})
|
|
185
|
+
});
|
|
179
186
|
export default TitleEdit;
|
|
@@ -99,6 +99,17 @@ export function changeQuizShuffleAnswers(quizId, value) {
|
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
+
export function changeQuizDisableDocumentAccess(quizId, value) {
|
|
103
|
+
return {
|
|
104
|
+
type: QUIZ_MODIFICATION,
|
|
105
|
+
payload: {
|
|
106
|
+
id: quizId,
|
|
107
|
+
modifications: {
|
|
108
|
+
disableDocumentAccess: Boolean(value)
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
}
|
|
102
113
|
export function changeQuizRequireStudentAccessCode(quizId, value) {
|
|
103
114
|
return {
|
|
104
115
|
type: QUIZ_MODIFICATION,
|
|
@@ -5,7 +5,7 @@ import ItemEdit from './presenter';
|
|
|
5
5
|
import makeEditable from '../../../shared/functionality/makeEditable';
|
|
6
6
|
import { openModal } from '../../../../actions/modal';
|
|
7
7
|
import { occludeQuizEntries } from '../../../../actions/ui';
|
|
8
|
-
import { generateImportModalId } from '
|
|
8
|
+
import { generateImportModalId } from '../../../ImportModal';
|
|
9
9
|
import { showError, hideError } from '../../../../actions/errorsShowing';
|
|
10
10
|
import { uploadStatus as setUploadStatus } from '../../../../actions/upload';
|
|
11
11
|
import * as modificationActions from '../../../../actions/modifications';
|
|
@@ -13,8 +13,9 @@ import { addError, screenreaderNotification } from '../../../../actions/alerts';
|
|
|
13
13
|
import { updateItem } from '../../../../../building/api/items';
|
|
14
14
|
import { interactionFileUpload, setOneAtATimeType } from '../../../../../building/api/quizzes';
|
|
15
15
|
import { featureOn } from '../../../../util/featureCheck';
|
|
16
|
-
import { getActiveQuizId, isActiveQuizWorkingInstanceOneQuestionAtATime } from '
|
|
16
|
+
import { getActiveQuizId, isActiveQuizWorkingInstanceOneQuestionAtATime } from '../../../../selectors/quizzes';
|
|
17
17
|
export function mapStateToProps(state, props) {
|
|
18
|
+
var _props$showCalculator;
|
|
18
19
|
// Error Related:
|
|
19
20
|
var workingItem = props.entry.getWorkingInstance();
|
|
20
21
|
var isValid = workingItem.isValid();
|
|
@@ -39,7 +40,8 @@ export function mapStateToProps(state, props) {
|
|
|
39
40
|
partialScoringEnabled: featureOn('partial_scoring'),
|
|
40
41
|
quizId: getActiveQuizId(state),
|
|
41
42
|
scope: props.scope,
|
|
42
|
-
rootAccountUuid: state.getIn(['outcomes', 'externalAccountUuid'])
|
|
43
|
+
rootAccountUuid: state.getIn(['outcomes', 'externalAccountUuid']),
|
|
44
|
+
showCalculatorOption: (_props$showCalculator = props.showCalculator) !== null && _props$showCalculator !== void 0 ? _props$showCalculator : true // used by Studio team to control calculator checkbox visibility
|
|
43
45
|
};
|
|
44
46
|
}
|
|
45
47
|
function mapDispatchToProps(dispatch) {
|
|
@@ -191,7 +191,8 @@ _defineProperty(ItemEdit, "propTypes", {
|
|
|
191
191
|
launch_context_uuid: PropTypes.string,
|
|
192
192
|
root_account_name: PropTypes.string
|
|
193
193
|
}),
|
|
194
|
-
rootAccountUuid: PropTypes.string
|
|
194
|
+
rootAccountUuid: PropTypes.string,
|
|
195
|
+
showCalculatorOption: PropTypes.bool
|
|
195
196
|
});
|
|
196
197
|
_defineProperty(ItemEdit, "defaultProps", {
|
|
197
198
|
additionalOptions: [],
|
|
@@ -207,6 +208,7 @@ _defineProperty(ItemEdit, "defaultProps", {
|
|
|
207
208
|
initialFocusId: null,
|
|
208
209
|
validationErrorsFromApi: {},
|
|
209
210
|
scope: {},
|
|
210
|
-
rootAccountUuid: null
|
|
211
|
+
rootAccountUuid: null,
|
|
212
|
+
showCalculatorOption: true
|
|
211
213
|
});
|
|
212
214
|
export default ItemEdit;
|
|
@@ -165,6 +165,7 @@ export var Quiz = (_dec = withStateCache(function (quiz) {
|
|
|
165
165
|
choiceElimination: false,
|
|
166
166
|
contextId: null,
|
|
167
167
|
defaultRceSettings: null,
|
|
168
|
+
disableDocumentAccess: false,
|
|
168
169
|
hasTimeLimit: false,
|
|
169
170
|
id: '0',
|
|
170
171
|
instructions: t('Add Instructions...'),
|
|
@@ -60,7 +60,8 @@ export var propsForInteractionEdit = function propsForInteractionEdit(props, add
|
|
|
60
60
|
stemErrors: props.workingItem.errorsFor('itemBody').toJS(),
|
|
61
61
|
initialFocusId: props.initialFocusId,
|
|
62
62
|
calculatorType: item.calculatorType,
|
|
63
|
-
multipleHotSpotEnabled: featureOn('multiple_hotspot_selections')
|
|
63
|
+
multipleHotSpotEnabled: featureOn('multiple_hotspot_selections'),
|
|
64
|
+
showCalculatorOption: props.showCalculatorOption
|
|
64
65
|
};
|
|
65
66
|
};
|
|
66
67
|
export var propsForInteractionShow = function propsForInteractionShow(item) {
|
package/es/index.js
CHANGED
|
@@ -74,7 +74,6 @@ export { StimulusShow } from './common/components/resources/stimulus/StimulusSho
|
|
|
74
74
|
export { QuizSessionResultHeader } from './common/components/resources/quizSessionResult/Header';
|
|
75
75
|
export { Info as QuizSessionResultInfo } from './common/components/resources/quizSessionResult/Info';
|
|
76
76
|
export { SessionItemResultsList } from './common/components/resources/sessionItemResult/SessionItemResultsList';
|
|
77
|
-
export { Errors } from './common/components/shared/errors/Errors';
|
|
78
77
|
export { TimeUnitsInput } from './common/components/shared/TimeUnitsInput';
|
|
79
78
|
export { QuizEntry as QuizEntryView } from './building/components/resources/quizEntry/QuizEntry';
|
|
80
79
|
export { Provider } from './common/react-redux';
|
|
@@ -117,7 +116,7 @@ export { getClientIpAddress } from './common/util/getClientIpAddress';
|
|
|
117
116
|
export { createQuizEntryRegrade } from './grading/api/quizEntryRegrades';
|
|
118
117
|
export { getQuizEntry } from './building/api/quizEntries';
|
|
119
118
|
export { getItem } from './building/api/items';
|
|
120
|
-
export { interactionFileUpload, setOneAtATimeType, quizBuildingSession, saveQuizChange, setBacktracking, setCalculatorType, setAllowClearMCSelection, setChoiceElimination, setFilterIpAddress, setIpFiltersApi, setIpFiltersUi, setQuizDefaultRceSettings, setQuizShuffleAnswers, setQuizShuffleQuestions, setRequireStudentAccessCode, setStudentAccessCodeApi, setStudentAccessCodeUi, setQuizHasTimeLimit, setSessionTimeLimitInSecondsUi, setSessionTimeLimitInSecondsApi, setResultsFeedback, setResultsFeedbackEnabled } from './building/api/quizzes';
|
|
119
|
+
export { interactionFileUpload, setOneAtATimeType, quizBuildingSession, saveQuizChange, setBacktracking, setCalculatorType, setAllowClearMCSelection, setChoiceElimination, setFilterIpAddress, setIpFiltersApi, setIpFiltersUi, setQuizDefaultRceSettings, setQuizShuffleAnswers, setQuizDisableDocumentAccess, setQuizShuffleQuestions, setRequireStudentAccessCode, setStudentAccessCodeApi, setStudentAccessCodeUi, setQuizHasTimeLimit, setSessionTimeLimitInSecondsUi, setSessionTimeLimitInSecondsApi, setResultsFeedback, setResultsFeedbackEnabled } from './building/api/quizzes';
|
|
121
120
|
export { getExistingQuiz } from './common/api/quizzes';
|
|
122
121
|
export { confirmSessionStartPage, submitStudentAccessCode, nextQuestion, submitQuiz } from './taking/api/taking';
|
|
123
122
|
export { pinSessionItem } from './common/api/quizSessions';
|
|
@@ -17,6 +17,7 @@ exports.setIpFiltersApi = setIpFiltersApi;
|
|
|
17
17
|
exports.setIpFiltersUi = setIpFiltersUi;
|
|
18
18
|
exports.setOneAtATimeType = setOneAtATimeType;
|
|
19
19
|
exports.setQuizDefaultRceSettings = setQuizDefaultRceSettings;
|
|
20
|
+
exports.setQuizDisableDocumentAccess = setQuizDisableDocumentAccess;
|
|
20
21
|
exports.setQuizHasTimeLimit = setQuizHasTimeLimit;
|
|
21
22
|
exports.setQuizShuffleAnswers = setQuizShuffleAnswers;
|
|
22
23
|
exports.setQuizShuffleQuestions = setQuizShuffleQuestions;
|
|
@@ -220,6 +221,11 @@ function setQuizShuffleAnswers(quizId, value, completeCb) {
|
|
|
220
221
|
shuffle_answers: Boolean(value)
|
|
221
222
|
}, (0, _modifications.changeQuizShuffleAnswers)(quizId, value), completeCb);
|
|
222
223
|
}
|
|
224
|
+
function setQuizDisableDocumentAccess(quizId, value, completeCb) {
|
|
225
|
+
return setQuizProperty(quizId, {
|
|
226
|
+
disable_document_access: Boolean(value)
|
|
227
|
+
}, (0, _modifications.changeQuizDisableDocumentAccess)(quizId, value), completeCb);
|
|
228
|
+
}
|
|
223
229
|
function setRequireStudentAccessCode(quizId, value, completeCb) {
|
|
224
230
|
return setQuizProperty(quizId, {
|
|
225
231
|
require_student_access_code: Boolean(value)
|
|
@@ -11,19 +11,18 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
11
11
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
12
12
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
-
var _react = require("react");
|
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
15
15
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
16
16
|
var _reactImmutableProptypes = _interopRequireDefault(require("react-immutable-proptypes"));
|
|
17
|
-
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
18
17
|
var _defer = _interopRequireDefault(require("lodash/defer"));
|
|
19
18
|
var _emotion = require("@instructure/emotion");
|
|
20
|
-
var _styles = _interopRequireDefault(require("./styles"));
|
|
21
|
-
var _theme = _interopRequireDefault(require("./theme"));
|
|
22
|
-
var _Errors = _interopRequireDefault(require("../../../../../../common/components/shared/errors/Errors"));
|
|
23
19
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
24
20
|
var _quizCommon = require("@instructure/quiz-common");
|
|
25
|
-
var
|
|
21
|
+
var _uiA11yContent = require("@instructure/ui-a11y-content");
|
|
22
|
+
var _TitleEdit;
|
|
26
23
|
/** @jsx jsx */
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
26
|
function _callSuper(_this, derived, args) {
|
|
28
27
|
function isNativeReflectConstruct() {
|
|
29
28
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
@@ -43,19 +42,23 @@ function _callSuper(_this, derived, args) {
|
|
|
43
42
|
// is rendered & has actions that
|
|
44
43
|
// allow for canceling
|
|
45
44
|
// =================================
|
|
46
|
-
var TitleEdit = exports.TitleEdit =
|
|
47
|
-
function TitleEdit() {
|
|
45
|
+
var TitleEdit = exports.TitleEdit = /*#__PURE__*/function (_Component) {
|
|
46
|
+
function TitleEdit(props) {
|
|
48
47
|
var _this2;
|
|
49
48
|
(0, _classCallCheck2["default"])(this, TitleEdit);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
_this2 = _callSuper(this, TitleEdit, [props]);
|
|
50
|
+
/**
|
|
51
|
+
* @type {React.RefObject<TextInput> | null}
|
|
52
|
+
*/
|
|
53
|
+
(0, _defineProperty2["default"])(_this2, "inputRef", null);
|
|
54
54
|
(0, _defineProperty2["default"])(_this2, "defer", function (fn) {
|
|
55
|
-
// to enable
|
|
55
|
+
// to enable synchronous testing
|
|
56
56
|
var deferFn = _this2.props.deferMock || _defer["default"];
|
|
57
57
|
deferFn(fn);
|
|
58
58
|
});
|
|
59
|
+
(0, _defineProperty2["default"])(_this2, "setInputRef", function (node) {
|
|
60
|
+
_this2.inputRef.current = node;
|
|
61
|
+
});
|
|
59
62
|
(0, _defineProperty2["default"])(_this2, "switchOffEditing", function () {
|
|
60
63
|
var fromEnterPressed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
61
64
|
_this2.ifValidElseError(function () {
|
|
@@ -84,26 +87,21 @@ var TitleEdit = exports.TitleEdit = (_dec = (0, _quizCommon.withStyleOverrides)(
|
|
|
84
87
|
(0, _defineProperty2["default"])(_this2, "handleBlur", function (e) {
|
|
85
88
|
_this2.switchOffEditing(false);
|
|
86
89
|
});
|
|
90
|
+
_this2.inputRef = _react["default"].createRef();
|
|
87
91
|
return _this2;
|
|
88
92
|
}
|
|
89
93
|
(0, _inherits2["default"])(TitleEdit, _Component);
|
|
90
94
|
return (0, _createClass2["default"])(TitleEdit, [{
|
|
91
95
|
key: "componentDidMount",
|
|
92
|
-
value:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
input.setSelectionRange(valLength, valLength);
|
|
102
|
-
}
|
|
103
|
-
}, {
|
|
104
|
-
key: "componentDidUpdate",
|
|
105
|
-
value: function componentDidUpdate() {
|
|
106
|
-
this.props.makeStyles();
|
|
96
|
+
value: function componentDidMount() {
|
|
97
|
+
var input = this.inputRef.current;
|
|
98
|
+
if (input) {
|
|
99
|
+
input.focus();
|
|
100
|
+
|
|
101
|
+
// Note: Some browsers add extra characters so we need to multiply the length by 2 to ensure
|
|
102
|
+
// the cursor is at the end
|
|
103
|
+
input.setSelectionRange(input.value.length * 2, input.value.length * 2);
|
|
104
|
+
}
|
|
107
105
|
}
|
|
108
106
|
}, {
|
|
109
107
|
key: "ifValidElseError",
|
|
@@ -124,46 +122,57 @@ var TitleEdit = exports.TitleEdit = (_dec = (0, _quizCommon.withStyleOverrides)(
|
|
|
124
122
|
};
|
|
125
123
|
}
|
|
126
124
|
}, {
|
|
127
|
-
key: "
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
value: function renderErrors() {
|
|
134
|
-
if (this.hasErrors()) {
|
|
135
|
-
return (0, _emotion.jsx)("div", {
|
|
136
|
-
css: this.props.styles.errorsWrapper
|
|
137
|
-
}, (0, _emotion.jsx)(_Errors["default"], {
|
|
138
|
-
errorList: this.props.errors
|
|
139
|
-
}));
|
|
125
|
+
key: "normalizedErrors",
|
|
126
|
+
get: function get() {
|
|
127
|
+
var _this$props$errors;
|
|
128
|
+
var hasErrors = this.props.errorsAreShowing && this.props.errors.size > 0;
|
|
129
|
+
if (!hasErrors) {
|
|
130
|
+
return [];
|
|
140
131
|
}
|
|
132
|
+
var errorList = (_this$props$errors = this.props.errors) === null || _this$props$errors === void 0 || (_this$props$errors = _this$props$errors.toArray()) === null || _this$props$errors === void 0 ? void 0 : _this$props$errors.map(function (error) {
|
|
133
|
+
if (typeof error === 'object') {
|
|
134
|
+
return error;
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
text: error,
|
|
138
|
+
type: 'newError'
|
|
139
|
+
};
|
|
140
|
+
});
|
|
141
|
+
return errorList || [];
|
|
141
142
|
}
|
|
142
143
|
}, {
|
|
143
144
|
key: "render",
|
|
144
145
|
value: function render() {
|
|
145
|
-
return (0, _emotion.jsx)(
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
return (0, _emotion.jsx)(_quizCommon.Flex, {
|
|
147
|
+
direction: "column",
|
|
148
|
+
justifyItems: "center",
|
|
149
|
+
padding: "medium large",
|
|
149
150
|
"data-automation": "sdk-quiz-title-edit-wrapper"
|
|
150
|
-
}, (0, _emotion.jsx)(
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
ref: this.setRef('input'),
|
|
154
|
-
type: "text",
|
|
155
|
-
"aria-label": (0, _formatMessage["default"])('title'),
|
|
151
|
+
}, (0, _emotion.jsx)(_quizCommon.Flex.Item, null, (0, _emotion.jsx)(_quizCommon.TextInput, {
|
|
152
|
+
inputRef: this.setInputRef,
|
|
153
|
+
renderLabel: (0, _emotion.jsx)(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage["default"])('Title')),
|
|
156
154
|
placeholder: (0, _formatMessage["default"])('Add a Title...'),
|
|
157
|
-
|
|
155
|
+
messages: this.normalizedErrors,
|
|
158
156
|
onKeyDown: this.handleKeyDown,
|
|
159
157
|
onKeyUp: this.handleKeyUp,
|
|
160
158
|
onChange: this.props.onInputChange,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
159
|
+
onBlur: this.handleBlur,
|
|
160
|
+
defaultValue: this.props.value,
|
|
161
|
+
"data-automation": "sdk-quiz-title-edit",
|
|
162
|
+
themeOverride: {
|
|
163
|
+
padding: 0,
|
|
164
|
+
borderColor: 'transparent',
|
|
165
|
+
mediumFontSize: '1.75rem',
|
|
166
|
+
fontWeight: '400'
|
|
167
|
+
}
|
|
168
|
+
})));
|
|
164
169
|
}
|
|
165
170
|
}]);
|
|
166
|
-
}(_react.Component)
|
|
171
|
+
}(_react.Component);
|
|
172
|
+
_TitleEdit = TitleEdit;
|
|
173
|
+
(0, _defineProperty2["default"])(TitleEdit, "displayName", 'TitleEdit');
|
|
174
|
+
(0, _defineProperty2["default"])(TitleEdit, "componentId", "Quizzes".concat(_TitleEdit.displayName));
|
|
175
|
+
(0, _defineProperty2["default"])(TitleEdit, "propTypes", {
|
|
167
176
|
value: _propTypes["default"].string.isRequired,
|
|
168
177
|
isValid: _propTypes["default"].bool.isRequired,
|
|
169
178
|
showError: _propTypes["default"].func.isRequired,
|
|
@@ -173,10 +182,10 @@ var TitleEdit = exports.TitleEdit = (_dec = (0, _quizCommon.withStyleOverrides)(
|
|
|
173
182
|
onInputChange: _propTypes["default"].func.isRequired,
|
|
174
183
|
saveAndPreview: _propTypes["default"].func.isRequired,
|
|
175
184
|
deferMock: _propTypes["default"].func,
|
|
176
|
-
styles: _propTypes["default"].object
|
|
177
|
-
|
|
178
|
-
|
|
185
|
+
styles: _propTypes["default"].object
|
|
186
|
+
});
|
|
187
|
+
(0, _defineProperty2["default"])(TitleEdit, "defaultProps", {
|
|
179
188
|
errorsAreShowing: false,
|
|
180
189
|
deferMock: _defer["default"]
|
|
181
|
-
})
|
|
190
|
+
});
|
|
182
191
|
var _default = exports["default"] = TitleEdit;
|
|
@@ -15,6 +15,7 @@ exports.changeQuizAllowClearMCSelection = changeQuizAllowClearMCSelection;
|
|
|
15
15
|
exports.changeQuizCalculatorType = changeQuizCalculatorType;
|
|
16
16
|
exports.changeQuizChoiceElimination = changeQuizChoiceElimination;
|
|
17
17
|
exports.changeQuizDefaultRceSettings = changeQuizDefaultRceSettings;
|
|
18
|
+
exports.changeQuizDisableDocumentAccess = changeQuizDisableDocumentAccess;
|
|
18
19
|
exports.changeQuizEntryEntry = changeQuizEntryEntry;
|
|
19
20
|
exports.changeQuizEntryPoints = changeQuizEntryPoints;
|
|
20
21
|
exports.changeQuizEntryProperties = changeQuizEntryProperties;
|
|
@@ -145,6 +146,17 @@ function changeQuizShuffleAnswers(quizId, value) {
|
|
|
145
146
|
}
|
|
146
147
|
};
|
|
147
148
|
}
|
|
149
|
+
function changeQuizDisableDocumentAccess(quizId, value) {
|
|
150
|
+
return {
|
|
151
|
+
type: _quizCommon.QUIZ_MODIFICATION,
|
|
152
|
+
payload: {
|
|
153
|
+
id: quizId,
|
|
154
|
+
modifications: {
|
|
155
|
+
disableDocumentAccess: Boolean(value)
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
}
|
|
148
160
|
function changeQuizRequireStudentAccessCode(quizId, value) {
|
|
149
161
|
return {
|
|
150
162
|
type: _quizCommon.QUIZ_MODIFICATION,
|
|
@@ -13,7 +13,7 @@ var _presenter = _interopRequireDefault(require("./presenter"));
|
|
|
13
13
|
var _makeEditable = _interopRequireDefault(require("../../../shared/functionality/makeEditable"));
|
|
14
14
|
var _modal = require("../../../../actions/modal");
|
|
15
15
|
var _ui = require("../../../../actions/ui");
|
|
16
|
-
var _ImportModal = require("
|
|
16
|
+
var _ImportModal = require("../../../ImportModal");
|
|
17
17
|
var _errorsShowing = require("../../../../actions/errorsShowing");
|
|
18
18
|
var _upload = require("../../../../actions/upload");
|
|
19
19
|
var modificationActions = _interopRequireWildcard(require("../../../../actions/modifications"));
|
|
@@ -21,10 +21,11 @@ var _alerts = require("../../../../actions/alerts");
|
|
|
21
21
|
var _items = require("../../../../../building/api/items");
|
|
22
22
|
var _quizzes = require("../../../../../building/api/quizzes");
|
|
23
23
|
var _featureCheck = require("../../../../util/featureCheck");
|
|
24
|
-
var _quizzes2 = require("
|
|
24
|
+
var _quizzes2 = require("../../../../selectors/quizzes");
|
|
25
25
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
26
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
27
|
function mapStateToProps(state, props) {
|
|
28
|
+
var _props$showCalculator;
|
|
28
29
|
// Error Related:
|
|
29
30
|
var workingItem = props.entry.getWorkingInstance();
|
|
30
31
|
var isValid = workingItem.isValid();
|
|
@@ -49,7 +50,8 @@ function mapStateToProps(state, props) {
|
|
|
49
50
|
partialScoringEnabled: (0, _featureCheck.featureOn)('partial_scoring'),
|
|
50
51
|
quizId: (0, _quizzes2.getActiveQuizId)(state),
|
|
51
52
|
scope: props.scope,
|
|
52
|
-
rootAccountUuid: state.getIn(['outcomes', 'externalAccountUuid'])
|
|
53
|
+
rootAccountUuid: state.getIn(['outcomes', 'externalAccountUuid']),
|
|
54
|
+
showCalculatorOption: (_props$showCalculator = props.showCalculator) !== null && _props$showCalculator !== void 0 ? _props$showCalculator : true // used by Studio team to control calculator checkbox visibility
|
|
53
55
|
};
|
|
54
56
|
}
|
|
55
57
|
function mapDispatchToProps(dispatch) {
|
|
@@ -200,7 +200,8 @@ var ItemEdit = exports.ItemEdit = /*#__PURE__*/function (_Component) {
|
|
|
200
200
|
launch_context_uuid: _propTypes["default"].string,
|
|
201
201
|
root_account_name: _propTypes["default"].string
|
|
202
202
|
}),
|
|
203
|
-
rootAccountUuid: _propTypes["default"].string
|
|
203
|
+
rootAccountUuid: _propTypes["default"].string,
|
|
204
|
+
showCalculatorOption: _propTypes["default"].bool
|
|
204
205
|
});
|
|
205
206
|
(0, _defineProperty2["default"])(ItemEdit, "defaultProps", {
|
|
206
207
|
additionalOptions: [],
|
|
@@ -216,6 +217,7 @@ var ItemEdit = exports.ItemEdit = /*#__PURE__*/function (_Component) {
|
|
|
216
217
|
initialFocusId: null,
|
|
217
218
|
validationErrorsFromApi: {},
|
|
218
219
|
scope: {},
|
|
219
|
-
rootAccountUuid: null
|
|
220
|
+
rootAccountUuid: null,
|
|
221
|
+
showCalculatorOption: true
|
|
220
222
|
});
|
|
221
223
|
var _default = exports["default"] = ItemEdit;
|
|
@@ -172,6 +172,7 @@ var Quiz = exports.Quiz = (_dec = (0, _withStateCache["default"])(function (quiz
|
|
|
172
172
|
choiceElimination: false,
|
|
173
173
|
contextId: null,
|
|
174
174
|
defaultRceSettings: null,
|
|
175
|
+
disableDocumentAccess: false,
|
|
175
176
|
hasTimeLimit: false,
|
|
176
177
|
id: '0',
|
|
177
178
|
instructions: (0, _formatMessage["default"])('Add Instructions...'),
|
|
@@ -67,7 +67,8 @@ var propsForInteractionEdit = exports.propsForInteractionEdit = function propsFo
|
|
|
67
67
|
stemErrors: props.workingItem.errorsFor('itemBody').toJS(),
|
|
68
68
|
initialFocusId: props.initialFocusId,
|
|
69
69
|
calculatorType: item.calculatorType,
|
|
70
|
-
multipleHotSpotEnabled: (0, _featureCheck.featureOn)('multiple_hotspot_selections')
|
|
70
|
+
multipleHotSpotEnabled: (0, _featureCheck.featureOn)('multiple_hotspot_selections'),
|
|
71
|
+
showCalculatorOption: props.showCalculatorOption
|
|
71
72
|
};
|
|
72
73
|
};
|
|
73
74
|
var propsForInteractionShow = exports.propsForInteractionShow = function propsForInteractionShow(item) {
|
package/lib/index.js
CHANGED
|
@@ -70,7 +70,6 @@ var _exportNames = {
|
|
|
70
70
|
QuizSessionResultHeader: true,
|
|
71
71
|
QuizSessionResultInfo: true,
|
|
72
72
|
SessionItemResultsList: true,
|
|
73
|
-
Errors: true,
|
|
74
73
|
TimeUnitsInput: true,
|
|
75
74
|
QuizEntryView: true,
|
|
76
75
|
Provider: true,
|
|
@@ -135,6 +134,7 @@ var _exportNames = {
|
|
|
135
134
|
setIpFiltersUi: true,
|
|
136
135
|
setQuizDefaultRceSettings: true,
|
|
137
136
|
setQuizShuffleAnswers: true,
|
|
137
|
+
setQuizDisableDocumentAccess: true,
|
|
138
138
|
setQuizShuffleQuestions: true,
|
|
139
139
|
setRequireStudentAccessCode: true,
|
|
140
140
|
setStudentAccessCodeApi: true,
|
|
@@ -334,12 +334,6 @@ Object.defineProperty(exports, "DropTargetCreator", {
|
|
|
334
334
|
return _dragAndDropUtils.DropTargetCreator;
|
|
335
335
|
}
|
|
336
336
|
});
|
|
337
|
-
Object.defineProperty(exports, "Errors", {
|
|
338
|
-
enumerable: true,
|
|
339
|
-
get: function get() {
|
|
340
|
-
return _Errors.Errors;
|
|
341
|
-
}
|
|
342
|
-
});
|
|
343
337
|
Object.defineProperty(exports, "Event", {
|
|
344
338
|
enumerable: true,
|
|
345
339
|
get: function get() {
|
|
@@ -1331,6 +1325,12 @@ Object.defineProperty(exports, "setQuizDefaultRceSettings", {
|
|
|
1331
1325
|
return _quizzes.setQuizDefaultRceSettings;
|
|
1332
1326
|
}
|
|
1333
1327
|
});
|
|
1328
|
+
Object.defineProperty(exports, "setQuizDisableDocumentAccess", {
|
|
1329
|
+
enumerable: true,
|
|
1330
|
+
get: function get() {
|
|
1331
|
+
return _quizzes.setQuizDisableDocumentAccess;
|
|
1332
|
+
}
|
|
1333
|
+
});
|
|
1334
1334
|
Object.defineProperty(exports, "setQuizHasTimeLimit", {
|
|
1335
1335
|
enumerable: true,
|
|
1336
1336
|
get: function get() {
|
|
@@ -1553,7 +1553,6 @@ var _StimulusShow = require("./common/components/resources/stimulus/StimulusShow
|
|
|
1553
1553
|
var _Header = require("./common/components/resources/quizSessionResult/Header");
|
|
1554
1554
|
var _Info = require("./common/components/resources/quizSessionResult/Info");
|
|
1555
1555
|
var _SessionItemResultsList = require("./common/components/resources/sessionItemResult/SessionItemResultsList");
|
|
1556
|
-
var _Errors = require("./common/components/shared/errors/Errors");
|
|
1557
1556
|
var _TimeUnitsInput = require("./common/components/shared/TimeUnitsInput");
|
|
1558
1557
|
var _QuizEntry = require("./building/components/resources/quizEntry/QuizEntry");
|
|
1559
1558
|
var _reactRedux = require("./common/react-redux");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.5.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The Quiz React SDK by Instructure Inc.",
|
|
6
6
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
@@ -111,12 +111,12 @@
|
|
|
111
111
|
"store": "^1.3.20",
|
|
112
112
|
"striptags": "^2.0.0",
|
|
113
113
|
"uuid": "^3.2.1",
|
|
114
|
-
"@instructure/quiz-common": "22.
|
|
115
|
-
"@instructure/quiz-i18n": "22.
|
|
116
|
-
"@instructure/quiz-
|
|
117
|
-
"@instructure/quiz-
|
|
118
|
-
"@instructure/quiz-
|
|
119
|
-
"instructure-validations": "22.
|
|
114
|
+
"@instructure/quiz-common": "22.5.0",
|
|
115
|
+
"@instructure/quiz-i18n": "22.5.0",
|
|
116
|
+
"@instructure/quiz-interactions": "22.5.0",
|
|
117
|
+
"@instructure/quiz-number-input": "22.5.0",
|
|
118
|
+
"@instructure/quiz-rce": "22.5.0",
|
|
119
|
+
"instructure-validations": "22.5.0"
|
|
120
120
|
},
|
|
121
121
|
"devDependencies": {
|
|
122
122
|
"@instructure/ui-axe-check": "10.14.0",
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"sinon": "^6.1.3",
|
|
146
146
|
"sinon-chai": "^3.3.0",
|
|
147
147
|
"@instructure/quiz-scripts": "21.0.0",
|
|
148
|
-
"quiz-presets": "22.
|
|
148
|
+
"quiz-presets": "22.5.0"
|
|
149
149
|
},
|
|
150
150
|
"peerDependencies": {
|
|
151
151
|
"react": "^15 || ^16"
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
4
|
-
var generateStyle = function generateStyle(componentTheme, props) {
|
|
5
|
-
var wrapperStyles = {
|
|
6
|
-
width: '100%',
|
|
7
|
-
flex: '1 1 auto',
|
|
8
|
-
display: 'flex',
|
|
9
|
-
flexDirection: 'column',
|
|
10
|
-
justifyContent: 'center'
|
|
11
|
-
};
|
|
12
|
-
var errorBorderStyles = {
|
|
13
|
-
margin: componentTheme.errorBorderMargin,
|
|
14
|
-
padding: componentTheme.errorBorderPadding,
|
|
15
|
-
border: "solid 1px ".concat(componentTheme.errorBorderColor),
|
|
16
|
-
borderRadius: componentTheme.errorBorderBorderRadius
|
|
17
|
-
};
|
|
18
|
-
return {
|
|
19
|
-
titleEditWrapper: {
|
|
20
|
-
position: 'relative',
|
|
21
|
-
width: '100%',
|
|
22
|
-
height: '5rem',
|
|
23
|
-
boxSizing: 'border-box',
|
|
24
|
-
paddingLeft: componentTheme.titleEditWrapperLeftPadding,
|
|
25
|
-
paddingRight: componentTheme.titleEditWrapperRightPadding,
|
|
26
|
-
display: 'flex',
|
|
27
|
-
flexDirection: 'column',
|
|
28
|
-
justifyContent: 'center'
|
|
29
|
-
},
|
|
30
|
-
titleEditInput: _objectSpread({
|
|
31
|
-
fontFamily: componentTheme.titleEditInputFontFamily,
|
|
32
|
-
fontSize: componentTheme.titleEditInputFontSize
|
|
33
|
-
}, props.errorsAreShowing && props.errors.size > 0 && errorBorderStyles),
|
|
34
|
-
inputWrapper: wrapperStyles,
|
|
35
|
-
errorsWrapper: wrapperStyles
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
export default generateStyle;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
2
|
-
var spacing = _ref.spacing,
|
|
3
|
-
colors = _ref.colors,
|
|
4
|
-
typography = _ref.typography,
|
|
5
|
-
borders = _ref.borders;
|
|
6
|
-
return {
|
|
7
|
-
titleEditWrapperLeftPadding: spacing.large,
|
|
8
|
-
titleEditWrapperRightPadding: spacing.large,
|
|
9
|
-
titleEditInputFontFamily: typography.fontFamily,
|
|
10
|
-
titleEditInputFontSize: typography.fontSizeXLarge,
|
|
11
|
-
errorBorderMargin: spacing.xxSmall,
|
|
12
|
-
errorBorderPadding: spacing.xxSmall,
|
|
13
|
-
errorBorderColor: colors.contrasts.red4570,
|
|
14
|
-
errorBorderBorderRadius: borders.radiusSmall
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export default generateComponentTheme;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
4
|
-
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
|
-
var _dec, _class, _Errors;
|
|
8
|
-
function _callSuper(_this, derived, args) {
|
|
9
|
-
function isNativeReflectConstruct() {
|
|
10
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
11
|
-
if (Reflect.construct.sham) return false;
|
|
12
|
-
if (typeof Proxy === "function") return true;
|
|
13
|
-
try {
|
|
14
|
-
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
15
|
-
} catch (e) {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
derived = _getPrototypeOf(derived);
|
|
20
|
-
return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args));
|
|
21
|
-
}
|
|
22
|
-
/** @jsx jsx */
|
|
23
|
-
import { Component } from 'react';
|
|
24
|
-
import { List } from 'immutable';
|
|
25
|
-
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
26
|
-
import PropTypes from 'prop-types';
|
|
27
|
-
import { jsx } from '@instructure/emotion';
|
|
28
|
-
import generateStyle from './styles';
|
|
29
|
-
import generateComponentTheme from './theme';
|
|
30
|
-
import { withStyleOverrides } from '@instructure/quiz-common';
|
|
31
|
-
export var Errors = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_Errors = /*#__PURE__*/function (_Component) {
|
|
32
|
-
function Errors() {
|
|
33
|
-
var _this2;
|
|
34
|
-
_classCallCheck(this, Errors);
|
|
35
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
36
|
-
args[_key] = arguments[_key];
|
|
37
|
-
}
|
|
38
|
-
_this2 = _callSuper(this, Errors, [].concat(args));
|
|
39
|
-
_defineProperty(_this2, "renderError", function (errorText, i) {
|
|
40
|
-
var key = "error_for_".concat(i);
|
|
41
|
-
return jsx("div", {
|
|
42
|
-
css: _this2.props.styles.error,
|
|
43
|
-
key: key,
|
|
44
|
-
"data-automation": "sdk-core-error"
|
|
45
|
-
}, errorText);
|
|
46
|
-
});
|
|
47
|
-
return _this2;
|
|
48
|
-
}
|
|
49
|
-
_inherits(Errors, _Component);
|
|
50
|
-
return _createClass(Errors, [{
|
|
51
|
-
key: "render",
|
|
52
|
-
value: function render() {
|
|
53
|
-
var _this$props$errorList;
|
|
54
|
-
if (this.props.errorList.size === 0) {
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
return jsx("div", {
|
|
58
|
-
css: this.props.styles.errors,
|
|
59
|
-
"data-testid": "errors-container"
|
|
60
|
-
}, (_this$props$errorList = this.props.errorList) === null || _this$props$errorList === void 0 ? void 0 : _this$props$errorList.toArray().map(this.renderError));
|
|
61
|
-
}
|
|
62
|
-
}]);
|
|
63
|
-
}(Component), _defineProperty(_Errors, "displayName", 'Errors'), _defineProperty(_Errors, "componentId", "Quizzes".concat(_Errors.displayName)), _defineProperty(_Errors, "propTypes", {
|
|
64
|
-
errorList: ImmutablePropTypes.list,
|
|
65
|
-
styles: PropTypes.object
|
|
66
|
-
}), _defineProperty(_Errors, "defaultProps", {
|
|
67
|
-
errorList: List()
|
|
68
|
-
}), _Errors)) || _class);
|
|
69
|
-
export default Errors;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
var generateStyle = function generateStyle(componentTheme) {
|
|
2
|
-
return {
|
|
3
|
-
errors: {
|
|
4
|
-
display: 'flex',
|
|
5
|
-
alignItems: 'flex-start',
|
|
6
|
-
flexDirection: 'column'
|
|
7
|
-
},
|
|
8
|
-
error: {
|
|
9
|
-
fontFamily: componentTheme.errorFontFamily,
|
|
10
|
-
fontSize: componentTheme.errorFontSize,
|
|
11
|
-
color: componentTheme.errorColor,
|
|
12
|
-
flex: '1 1 auto'
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export default generateStyle;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
2
|
-
var colors = _ref.colors,
|
|
3
|
-
typography = _ref.typography;
|
|
4
|
-
return {
|
|
5
|
-
errorFontFamily: typography.fontFamily,
|
|
6
|
-
errorFontSize: typography.fontSizeSmall,
|
|
7
|
-
errorColor: colors.contrasts.red4570
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export default generateComponentTheme;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
10
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
11
|
-
var generateStyle = function generateStyle(componentTheme, props) {
|
|
12
|
-
var wrapperStyles = {
|
|
13
|
-
width: '100%',
|
|
14
|
-
flex: '1 1 auto',
|
|
15
|
-
display: 'flex',
|
|
16
|
-
flexDirection: 'column',
|
|
17
|
-
justifyContent: 'center'
|
|
18
|
-
};
|
|
19
|
-
var errorBorderStyles = {
|
|
20
|
-
margin: componentTheme.errorBorderMargin,
|
|
21
|
-
padding: componentTheme.errorBorderPadding,
|
|
22
|
-
border: "solid 1px ".concat(componentTheme.errorBorderColor),
|
|
23
|
-
borderRadius: componentTheme.errorBorderBorderRadius
|
|
24
|
-
};
|
|
25
|
-
return {
|
|
26
|
-
titleEditWrapper: {
|
|
27
|
-
position: 'relative',
|
|
28
|
-
width: '100%',
|
|
29
|
-
height: '5rem',
|
|
30
|
-
boxSizing: 'border-box',
|
|
31
|
-
paddingLeft: componentTheme.titleEditWrapperLeftPadding,
|
|
32
|
-
paddingRight: componentTheme.titleEditWrapperRightPadding,
|
|
33
|
-
display: 'flex',
|
|
34
|
-
flexDirection: 'column',
|
|
35
|
-
justifyContent: 'center'
|
|
36
|
-
},
|
|
37
|
-
titleEditInput: _objectSpread({
|
|
38
|
-
fontFamily: componentTheme.titleEditInputFontFamily,
|
|
39
|
-
fontSize: componentTheme.titleEditInputFontSize
|
|
40
|
-
}, props.errorsAreShowing && props.errors.size > 0 && errorBorderStyles),
|
|
41
|
-
inputWrapper: wrapperStyles,
|
|
42
|
-
errorsWrapper: wrapperStyles
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
var _default = exports["default"] = generateStyle;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
8
|
-
var spacing = _ref.spacing,
|
|
9
|
-
colors = _ref.colors,
|
|
10
|
-
typography = _ref.typography,
|
|
11
|
-
borders = _ref.borders;
|
|
12
|
-
return {
|
|
13
|
-
titleEditWrapperLeftPadding: spacing.large,
|
|
14
|
-
titleEditWrapperRightPadding: spacing.large,
|
|
15
|
-
titleEditInputFontFamily: typography.fontFamily,
|
|
16
|
-
titleEditInputFontSize: typography.fontSizeXLarge,
|
|
17
|
-
errorBorderMargin: spacing.xxSmall,
|
|
18
|
-
errorBorderPadding: spacing.xxSmall,
|
|
19
|
-
errorBorderColor: colors.contrasts.red4570,
|
|
20
|
-
errorBorderBorderRadius: borders.radiusSmall
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
var _default = exports["default"] = generateComponentTheme;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = exports.Errors = void 0;
|
|
8
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
11
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
12
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
-
var _react = require("react");
|
|
15
|
-
var _immutable = require("immutable");
|
|
16
|
-
var _reactImmutableProptypes = _interopRequireDefault(require("react-immutable-proptypes"));
|
|
17
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
18
|
-
var _emotion = require("@instructure/emotion");
|
|
19
|
-
var _styles = _interopRequireDefault(require("./styles"));
|
|
20
|
-
var _theme = _interopRequireDefault(require("./theme"));
|
|
21
|
-
var _quizCommon = require("@instructure/quiz-common");
|
|
22
|
-
var _dec, _class, _Errors;
|
|
23
|
-
/** @jsx jsx */
|
|
24
|
-
function _callSuper(_this, derived, args) {
|
|
25
|
-
function isNativeReflectConstruct() {
|
|
26
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
27
|
-
if (Reflect.construct.sham) return false;
|
|
28
|
-
if (typeof Proxy === "function") return true;
|
|
29
|
-
try {
|
|
30
|
-
return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
31
|
-
} catch (e) {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
derived = (0, _getPrototypeOf2["default"])(derived);
|
|
36
|
-
return (0, _possibleConstructorReturn2["default"])(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], (0, _getPrototypeOf2["default"])(_this).constructor) : derived.apply(_this, args));
|
|
37
|
-
}
|
|
38
|
-
var Errors = exports.Errors = (_dec = (0, _quizCommon.withStyleOverrides)(_styles["default"], _theme["default"]), _dec(_class = (_Errors = /*#__PURE__*/function (_Component) {
|
|
39
|
-
function Errors() {
|
|
40
|
-
var _this2;
|
|
41
|
-
(0, _classCallCheck2["default"])(this, Errors);
|
|
42
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
43
|
-
args[_key] = arguments[_key];
|
|
44
|
-
}
|
|
45
|
-
_this2 = _callSuper(this, Errors, [].concat(args));
|
|
46
|
-
(0, _defineProperty2["default"])(_this2, "renderError", function (errorText, i) {
|
|
47
|
-
var key = "error_for_".concat(i);
|
|
48
|
-
return (0, _emotion.jsx)("div", {
|
|
49
|
-
css: _this2.props.styles.error,
|
|
50
|
-
key: key,
|
|
51
|
-
"data-automation": "sdk-core-error"
|
|
52
|
-
}, errorText);
|
|
53
|
-
});
|
|
54
|
-
return _this2;
|
|
55
|
-
}
|
|
56
|
-
(0, _inherits2["default"])(Errors, _Component);
|
|
57
|
-
return (0, _createClass2["default"])(Errors, [{
|
|
58
|
-
key: "render",
|
|
59
|
-
value: function render() {
|
|
60
|
-
var _this$props$errorList;
|
|
61
|
-
if (this.props.errorList.size === 0) {
|
|
62
|
-
return null;
|
|
63
|
-
}
|
|
64
|
-
return (0, _emotion.jsx)("div", {
|
|
65
|
-
css: this.props.styles.errors,
|
|
66
|
-
"data-testid": "errors-container"
|
|
67
|
-
}, (_this$props$errorList = this.props.errorList) === null || _this$props$errorList === void 0 ? void 0 : _this$props$errorList.toArray().map(this.renderError));
|
|
68
|
-
}
|
|
69
|
-
}]);
|
|
70
|
-
}(_react.Component), (0, _defineProperty2["default"])(_Errors, "displayName", 'Errors'), (0, _defineProperty2["default"])(_Errors, "componentId", "Quizzes".concat(_Errors.displayName)), (0, _defineProperty2["default"])(_Errors, "propTypes", {
|
|
71
|
-
errorList: _reactImmutableProptypes["default"].list,
|
|
72
|
-
styles: _propTypes["default"].object
|
|
73
|
-
}), (0, _defineProperty2["default"])(_Errors, "defaultProps", {
|
|
74
|
-
errorList: (0, _immutable.List)()
|
|
75
|
-
}), _Errors)) || _class);
|
|
76
|
-
var _default = exports["default"] = Errors;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var generateStyle = function generateStyle(componentTheme) {
|
|
8
|
-
return {
|
|
9
|
-
errors: {
|
|
10
|
-
display: 'flex',
|
|
11
|
-
alignItems: 'flex-start',
|
|
12
|
-
flexDirection: 'column'
|
|
13
|
-
},
|
|
14
|
-
error: {
|
|
15
|
-
fontFamily: componentTheme.errorFontFamily,
|
|
16
|
-
fontSize: componentTheme.errorFontSize,
|
|
17
|
-
color: componentTheme.errorColor,
|
|
18
|
-
flex: '1 1 auto'
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
var _default = exports["default"] = generateStyle;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
8
|
-
var colors = _ref.colors,
|
|
9
|
-
typography = _ref.typography;
|
|
10
|
-
return {
|
|
11
|
-
errorFontFamily: typography.fontFamily,
|
|
12
|
-
errorFontSize: typography.fontSizeSmall,
|
|
13
|
-
errorColor: colors.contrasts.red4570
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
var _default = exports["default"] = generateComponentTheme;
|