@instructure/quiz-core 20.36.1-rc.2 → 20.36.1-rc.21
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/banks/components/AddToBankModal/presenter.js +1 -2
- package/es/banks/components/AsyncSearch/index.js +1 -2
- package/es/banks/components/BankEntry/presenter.js +1 -2
- package/es/banks/components/BankSearch/presenter.js +1 -2
- package/es/banks/components/Banks/index.js +0 -1
- package/es/banks/components/Banks/presenter.js +5 -9
- package/es/banks/components/CopyMoveBankEntryModal/presenter.js +1 -2
- package/es/banks/components/CreateBankModal/presenter.js +1 -2
- package/es/banks/components/EditBankModal/presenter.js +1 -2
- package/es/banks/components/SharingModal/RootAccountSharing.js +1 -2
- package/es/banks/components/SharingModal/ShareList/index.js +1 -2
- package/es/banks/components/SharingModal/index.js +0 -2
- package/es/banks/components/SharingModal/presenter.js +18 -78
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +34 -21
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Header/styles.js +0 -23
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Header/theme.js +1 -5
- package/es/common/components/AccessCodeTextInput/AccessCodeTextInput.stories.js +11 -0
- package/es/common/components/AccessCodeTextInput/index.js +47 -0
- package/es/common/components/ImportModal/presenter.js +1 -2
- package/es/common/components/MaskedTextInput/MaskedTextInput.stories.js +19 -0
- package/es/common/components/MaskedTextInput/index.js +64 -0
- package/es/common/components/layout/Page/styles.js +1 -1
- package/es/common/components/resources/item/ItemEdit/presenter.js +2 -4
- package/es/common/components/resources/quiz/instructions/styles.js +1 -1
- package/es/common/components/resources/stimulus/StimulusEditInfo/presenter.js +5 -8
- package/es/common/components/shared/GenericAsyncSearch/GenericAsyncSearch.js +1 -2
- package/es/common/components/shared/TagSelect/presenter.js +1 -2
- package/es/common/components/shared/TimeUnitsInput/index.js +2 -1
- package/es/index.js +3 -1
- package/es/moderating/components/resources/AccommodationsModal/ExtraTimeSettings/index.js +2 -2
- package/es/moderating/components/resources/AccommodationsModal/index.js +5 -13
- package/es/moderating/components/resources/ModerateTable/presenter.js +4 -2
- package/es/moderating/components/sidebar/ModerateTray/presenter.js +20 -29
- package/lib/banks/components/AddToBankModal/presenter.js +1 -2
- package/lib/banks/components/AsyncSearch/index.js +8 -9
- package/lib/banks/components/BankEntry/presenter.js +1 -2
- package/lib/banks/components/BankSearch/presenter.js +1 -2
- package/lib/banks/components/Banks/index.js +0 -1
- package/lib/banks/components/Banks/presenter.js +9 -13
- package/lib/banks/components/CopyMoveBankEntryModal/presenter.js +1 -2
- package/lib/banks/components/CreateBankModal/presenter.js +1 -2
- package/lib/banks/components/EditBankModal/presenter.js +1 -2
- package/lib/banks/components/SharingModal/RootAccountSharing.js +3 -4
- package/lib/banks/components/SharingModal/ShareList/index.js +3 -4
- package/lib/banks/components/SharingModal/index.js +0 -2
- package/lib/banks/components/SharingModal/presenter.js +20 -80
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +33 -20
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Header/styles.js +0 -23
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Header/theme.js +1 -5
- package/lib/common/components/AccessCodeTextInput/AccessCodeTextInput.stories.js +20 -0
- package/lib/common/components/AccessCodeTextInput/index.js +57 -0
- package/lib/common/components/ImportModal/presenter.js +1 -2
- package/lib/common/components/MaskedTextInput/MaskedTextInput.stories.js +29 -0
- package/lib/common/components/MaskedTextInput/index.js +74 -0
- package/lib/common/components/layout/Page/styles.js +1 -1
- package/lib/common/components/resources/item/ItemEdit/presenter.js +2 -4
- package/lib/common/components/resources/quiz/instructions/styles.js +1 -1
- package/lib/common/components/resources/stimulus/StimulusEditInfo/presenter.js +12 -15
- package/lib/common/components/shared/GenericAsyncSearch/GenericAsyncSearch.js +3 -4
- package/lib/common/components/shared/TagSelect/presenter.js +4 -5
- package/lib/common/components/shared/TimeUnitsInput/index.js +2 -1
- package/lib/index.js +22 -6
- package/lib/moderating/components/resources/AccommodationsModal/ExtraTimeSettings/index.js +7 -7
- package/lib/moderating/components/resources/AccommodationsModal/index.js +5 -13
- package/lib/moderating/components/resources/ModerateTable/presenter.js +4 -2
- package/lib/moderating/components/sidebar/ModerateTray/presenter.js +20 -29
- package/package.json +10 -9
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MaskedTextInput } from "./index.js";
|
|
3
|
+
var props = {
|
|
4
|
+
renderLabel: 'Example of a masked text input',
|
|
5
|
+
checkboxLabel: 'Select to show the current value',
|
|
6
|
+
value: 'Is it secret? Is it safe?',
|
|
7
|
+
onMaskedChange: Function.prototype
|
|
8
|
+
};
|
|
9
|
+
export default {
|
|
10
|
+
title: MaskedTextInput.name
|
|
11
|
+
};
|
|
12
|
+
export var whenMasked = function whenMasked() {
|
|
13
|
+
return /*#__PURE__*/React.createElement(MaskedTextInput, props);
|
|
14
|
+
};
|
|
15
|
+
export var whenUnmasked = function whenUnmasked() {
|
|
16
|
+
return /*#__PURE__*/React.createElement(MaskedTextInput, Object.assign({}, props, {
|
|
17
|
+
masked: false
|
|
18
|
+
}));
|
|
19
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
|
+
import React, { Component } from 'react';
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
|
+
import { View } from '@instructure/ui-view';
|
|
9
|
+
import { Checkbox } from '@instructure/ui-checkbox';
|
|
10
|
+
import { omitProps } from '@instructure/ui-react-utils';
|
|
11
|
+
import { TextInput } from '@instructure/quiz-common';
|
|
12
|
+
var maskedTextInputPropTypes = {
|
|
13
|
+
/**
|
|
14
|
+
* The label to be used for the checkbox that controls whether the input is masked
|
|
15
|
+
*/
|
|
16
|
+
checkboxLabel: PropTypes.string.isRequired,
|
|
17
|
+
/**
|
|
18
|
+
* Whether or not the input text is masked
|
|
19
|
+
*/
|
|
20
|
+
masked: PropTypes.bool,
|
|
21
|
+
/**
|
|
22
|
+
* The function to call when the user clicks the checkbox to either mask or unmask the input
|
|
23
|
+
*/
|
|
24
|
+
onMaskedChange: PropTypes.func
|
|
25
|
+
};
|
|
26
|
+
export var MaskedTextInput = /*#__PURE__*/function (_Component) {
|
|
27
|
+
_inherits(MaskedTextInput, _Component);
|
|
28
|
+
var _super = _createSuper(MaskedTextInput);
|
|
29
|
+
function MaskedTextInput() {
|
|
30
|
+
_classCallCheck(this, MaskedTextInput);
|
|
31
|
+
return _super.apply(this, arguments);
|
|
32
|
+
}
|
|
33
|
+
_createClass(MaskedTextInput, [{
|
|
34
|
+
key: "render",
|
|
35
|
+
value: function render() {
|
|
36
|
+
var _this$props = this.props,
|
|
37
|
+
checkboxLabel = _this$props.checkboxLabel,
|
|
38
|
+
masked = _this$props.masked,
|
|
39
|
+
onMaskedChange = _this$props.onMaskedChange,
|
|
40
|
+
type = _this$props.type;
|
|
41
|
+
var textInputProps = _objectSpread(_objectSpread({}, omitProps(this.props, maskedTextInputPropTypes)), {}, {
|
|
42
|
+
type: masked ? 'password' : type
|
|
43
|
+
});
|
|
44
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
45
|
+
as: "div"
|
|
46
|
+
}, /*#__PURE__*/React.createElement(TextInput, textInputProps), /*#__PURE__*/React.createElement(View, {
|
|
47
|
+
as: "div",
|
|
48
|
+
margin: "small 0"
|
|
49
|
+
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
50
|
+
label: checkboxLabel,
|
|
51
|
+
checked: !masked,
|
|
52
|
+
onChange: onMaskedChange
|
|
53
|
+
})));
|
|
54
|
+
}
|
|
55
|
+
}]);
|
|
56
|
+
MaskedTextInput.displayName = "MaskedTextInput";
|
|
57
|
+
return MaskedTextInput;
|
|
58
|
+
}(Component);
|
|
59
|
+
MaskedTextInput.propTypes = _objectSpread(_objectSpread({}, maskedTextInputPropTypes), TextInput.propTypes);
|
|
60
|
+
MaskedTextInput.defaultProps = _objectSpread(_objectSpread({}, TextInput.defaultProps), {}, {
|
|
61
|
+
masked: true,
|
|
62
|
+
onMaskedChange: Function.prototype
|
|
63
|
+
});
|
|
64
|
+
export default MaskedTextInput;
|
|
@@ -19,7 +19,7 @@ var generateStyle = function generateStyle(componentTheme, props) {
|
|
|
19
19
|
transition: componentTheme.contentTransition,
|
|
20
20
|
width: '100%',
|
|
21
21
|
'.user_content p': {
|
|
22
|
-
margin: componentTheme.userContentMargin,
|
|
22
|
+
margin: "".concat(componentTheme.userContentMargin, " 0"),
|
|
23
23
|
'&:first-of-type': {
|
|
24
24
|
marginTop: componentTheme.userContentZeroMargin
|
|
25
25
|
},
|
|
@@ -7,16 +7,14 @@ import PropTypes from 'prop-types';
|
|
|
7
7
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
8
8
|
import OutcomeAlignments from '@instructure/outcomes-ui/es/containers/OutcomeAlignments';
|
|
9
9
|
import OutcomeCount from '@instructure/outcomes-ui/es/containers/OutcomeCount';
|
|
10
|
-
import { FormFieldGroup } from '@instructure/ui-form-field';
|
|
11
10
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
12
11
|
import CustomPropTypes from "../../../../../common/util/CustomPropTypes.js";
|
|
13
12
|
import componentForItem from "../../../../util/componentForItem.js";
|
|
14
|
-
import { liveRegion, COMPONENT_EDIT } from '@instructure/quiz-common';
|
|
13
|
+
import { liveRegion, COMPONENT_EDIT, FormFieldGroup } from '@instructure/quiz-common';
|
|
15
14
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
16
15
|
import { propsForInteractionEdit } from "../../../../util/interactionTypePropsHelper.js";
|
|
17
16
|
import elementsForSelectors from "../../../../../common/util/ElementsForSelectors.js";
|
|
18
17
|
import { toErrors } from "../../../../util/instUIMessages.js";
|
|
19
|
-
import { featureOn } from "../../../../../common/util/featureCheck.js";
|
|
20
18
|
export var ItemEdit = /*#__PURE__*/function (_Component) {
|
|
21
19
|
_inherits(ItemEdit, _Component);
|
|
22
20
|
var _super = _createSuper(ItemEdit);
|
|
@@ -64,7 +62,7 @@ export var ItemEdit = /*#__PURE__*/function (_Component) {
|
|
|
64
62
|
var launchContextUuid = this.props.scope.launch_context_uuid;
|
|
65
63
|
var launchContextTitle = this.props.scope.title;
|
|
66
64
|
// If editing within a quiz, there is no account launch context
|
|
67
|
-
if (
|
|
65
|
+
if (rootAccountName) {
|
|
68
66
|
launchContexts.push({
|
|
69
67
|
uuid: this.props.rootAccountUuid,
|
|
70
68
|
name: rootAccountName
|
|
@@ -12,7 +12,7 @@ var generateStyle = function generateStyle(componentTheme) {
|
|
|
12
12
|
display: 'table'
|
|
13
13
|
},
|
|
14
14
|
'.user_content p': {
|
|
15
|
-
margin: componentTheme.userContentMargin,
|
|
15
|
+
margin: "".concat(componentTheme.userContentMargin, " 0"),
|
|
16
16
|
'&:first-of-type': {
|
|
17
17
|
marginTop: componentTheme.userContentZeroMargin
|
|
18
18
|
},
|
|
@@ -8,16 +8,13 @@ import { Component } from 'react';
|
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
10
10
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
11
|
-
import { TextInput } from '@instructure/ui-text-input';
|
|
12
|
-
import { FormField, FormFieldGroup } from '@instructure/ui-form-field';
|
|
13
11
|
import { jsx } from '@instructure/emotion';
|
|
14
12
|
import { Heading } from '@instructure/ui-heading';
|
|
15
13
|
import { RichContentInput, RCE_SINGLE_LINE_HEIGHT } from '@instructure/quiz-rce';
|
|
16
14
|
import { toErrors } from "../../../../util/instUIMessages.js";
|
|
17
|
-
import { SimpleSelect } from '@instructure/ui-simple-select';
|
|
18
15
|
import { IconUpdownLine } from '@instructure/ui-icons';
|
|
19
16
|
import { ToggleDetails } from '@instructure/ui-toggle-details';
|
|
20
|
-
import { TOP, withStyleOverrides } from '@instructure/quiz-common';
|
|
17
|
+
import { SimpleSelect, TextInput, TOP, withStyleOverrides, FormFieldGroup, FormField } from '@instructure/quiz-common';
|
|
21
18
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
22
19
|
import generateStyle from "./styles.js";
|
|
23
20
|
import generateComponentTheme from "./theme.js";
|
|
@@ -112,6 +109,7 @@ export var StimulusEditInfo = (_dec = withStyleOverrides(generateStyle, generate
|
|
|
112
109
|
}, jsx(TextInput, {
|
|
113
110
|
messages: this.inputErrors('title'),
|
|
114
111
|
renderLabel: t('Title'),
|
|
112
|
+
isRequired: true,
|
|
115
113
|
type: "text",
|
|
116
114
|
ref: this.props.setTitleRef,
|
|
117
115
|
onChange: this.onTextInputChange('title'),
|
|
@@ -128,13 +126,12 @@ export var StimulusEditInfo = (_dec = withStyleOverrides(generateStyle, generate
|
|
|
128
126
|
})), jsx("div", {
|
|
129
127
|
css: this.props.styles.section
|
|
130
128
|
}, jsx(FormField, {
|
|
131
|
-
id: stimulusBodyId
|
|
132
|
-
label: t('Content')
|
|
129
|
+
id: stimulusBodyId
|
|
133
130
|
}, jsx(RichContentInput, {
|
|
134
131
|
actsAsInput: true,
|
|
135
|
-
label:
|
|
132
|
+
label: t('Content'),
|
|
133
|
+
isRequired: true,
|
|
136
134
|
messages: this.inputErrors('body'),
|
|
137
|
-
placeholder: t('Add Stimulus Content...'),
|
|
138
135
|
textareaId: textAreaId,
|
|
139
136
|
defaultContent: stimulus.get('body'),
|
|
140
137
|
onKeyUp: this.onBodyChange,
|
|
@@ -5,10 +5,9 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
5
5
|
import React, { Component } from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import debounce from 'lodash/fp/debounce';
|
|
8
|
-
import { Select } from '@instructure/ui-select';
|
|
9
8
|
import { Spinner } from '@instructure/ui-spinner';
|
|
10
9
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
11
|
-
import { SELECT_EMPTY_OPTION } from '@instructure/quiz-common';
|
|
10
|
+
import { SELECT_EMPTY_OPTION, Select } from '@instructure/quiz-common';
|
|
12
11
|
export var GenericAsyncSearch = /*#__PURE__*/function (_Component) {
|
|
13
12
|
_inherits(GenericAsyncSearch, _Component);
|
|
14
13
|
var _super = _createSuper(GenericAsyncSearch);
|
|
@@ -5,11 +5,10 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
|
5
5
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
6
|
import React, { Component } from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import { Select } from '@instructure/ui-select';
|
|
9
8
|
import TagWrapper from "../TagWrapper/index.js";
|
|
10
9
|
import differenceBy from 'lodash/differenceBy';
|
|
11
10
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
12
|
-
import { SELECT_EMPTY_OPTION } from '@instructure/quiz-common';
|
|
11
|
+
import { SELECT_EMPTY_OPTION, Select } from '@instructure/quiz-common';
|
|
13
12
|
var tagShape = PropTypes.shape({
|
|
14
13
|
id: PropTypes.string,
|
|
15
14
|
value: PropTypes.string.isRequired
|
|
@@ -138,7 +138,8 @@ export var TimeUnitsInput = /*#__PURE__*/function (_Component) {
|
|
|
138
138
|
newHours = _breakdownSeconds4.hours,
|
|
139
139
|
newMinutes = _breakdownSeconds4.minutes;
|
|
140
140
|
if (_this.state.shouldResetOnNormalize) {
|
|
141
|
-
_this
|
|
141
|
+
var _this$props$onReset, _this$props;
|
|
142
|
+
(_this$props$onReset = (_this$props = _this.props).onReset) === null || _this$props$onReset === void 0 ? void 0 : _this$props$onReset.call(_this$props);
|
|
142
143
|
}
|
|
143
144
|
_this.setState({
|
|
144
145
|
days: newDays,
|
package/es/index.js
CHANGED
|
@@ -79,7 +79,9 @@ export { Provider } from "./common/react-redux.js";
|
|
|
79
79
|
export { FormattedTimer } from "./common/components/shared/FormattedDuration/index.js";
|
|
80
80
|
export { default as TagWrapper } from "./common/components/shared/TagWrapper/index.js";
|
|
81
81
|
export { RetryGradePassbackButton } from "./moderating/components/resources/RetryGradePassbackButton/index.js";
|
|
82
|
-
export { GenericAsyncSearch } from "./common/components/shared/GenericAsyncSearch/GenericAsyncSearch.js";
|
|
82
|
+
export { GenericAsyncSearch } from "./common/components/shared/GenericAsyncSearch/GenericAsyncSearch.js";
|
|
83
|
+
export { MaskedTextInput } from "./common/components/MaskedTextInput/index.js";
|
|
84
|
+
export { AccessCodeTextInput } from "./common/components/AccessCodeTextInput/index.js"; // Utilities
|
|
83
85
|
export { environment as config } from "./config.js";
|
|
84
86
|
export { Fetcher } from "./common/util/Fetcher.js";
|
|
85
87
|
export { httpHeaders } from "./common/util/httpHeaders.js";
|
|
@@ -6,7 +6,7 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
6
6
|
import React, { Component } from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { View } from '@instructure/ui-view';
|
|
9
|
-
import { SimpleSelect } from '@instructure/
|
|
9
|
+
import { SimpleSelect } from '@instructure/quiz-common';
|
|
10
10
|
import TimeUnitsInput from "../../../../../common/components/shared/TimeUnitsInput/index.js";
|
|
11
11
|
import ExtraTimeMultiplier from "../ExtraTimeMultiplier/index.js";
|
|
12
12
|
import { HOUR_IN_SECONDS } from "../../../../../common/components/shared/FormattedDuration/index.js";
|
|
@@ -94,7 +94,7 @@ export var ExtraTimeSettings = /*#__PURE__*/function (_Component) {
|
|
|
94
94
|
minutesLabel: t('Minutes'),
|
|
95
95
|
minutesDataAutomation: "sdk-moderation-time-minutes",
|
|
96
96
|
description: t('Additional time'),
|
|
97
|
-
margin: "medium none"
|
|
97
|
+
margin: "medium none none none"
|
|
98
98
|
}), timeAdjustmentType === 'timerMultiplierEnabled' && /*#__PURE__*/React.createElement(ExtraTimeMultiplier, {
|
|
99
99
|
onChange: this.onChangeMultiplier,
|
|
100
100
|
timerMultiplierValue: timerSettings.timerMultiplierValue,
|
|
@@ -4,7 +4,6 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
|
4
4
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
5
|
import React, { Component } from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
-
import { Text } from '@instructure/ui-text';
|
|
8
7
|
import { Tooltip } from '@instructure/ui-tooltip';
|
|
9
8
|
import { Modal } from '@instructure/ui-modal';
|
|
10
9
|
import { TruncateText } from '@instructure/ui-truncate-text';
|
|
@@ -13,8 +12,6 @@ import { View } from '@instructure/ui-view';
|
|
|
13
12
|
import { Button, CloseButton } from '@instructure/ui-buttons';
|
|
14
13
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
15
14
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
16
|
-
import { featureOn } from "../../../../common/util/featureCheck.js";
|
|
17
|
-
import { IfFeature } from "../../../../common/components/shared/IfFeature/index.js";
|
|
18
15
|
export var AccommodationModal = /*#__PURE__*/function (_Component) {
|
|
19
16
|
_inherits(AccommodationModal, _Component);
|
|
20
17
|
var _super = _createSuper(AccommodationModal);
|
|
@@ -57,7 +54,7 @@ export var AccommodationModal = /*#__PURE__*/function (_Component) {
|
|
|
57
54
|
}, _this.props.studentName));
|
|
58
55
|
};
|
|
59
56
|
_this.renderHeading = function () {
|
|
60
|
-
if (
|
|
57
|
+
if (_this.props.atteqApplyChangesToCurrentQuizAttemptsEnabled) {
|
|
61
58
|
return /*#__PURE__*/React.createElement(Heading, null, /*#__PURE__*/React.createElement(ScreenReaderContent, null, t('Student Accommodation')), t('Student Accommodation'));
|
|
62
59
|
}
|
|
63
60
|
var _this$props = _this.props,
|
|
@@ -84,7 +81,7 @@ export var AccommodationModal = /*#__PURE__*/function (_Component) {
|
|
|
84
81
|
_createClass(AccommodationModal, [{
|
|
85
82
|
key: "labelText",
|
|
86
83
|
value: function labelText() {
|
|
87
|
-
if (
|
|
84
|
+
if (this.props.atteqApplyChangesToCurrentQuizAttemptsEnabled) {
|
|
88
85
|
return t('Student Accommodation');
|
|
89
86
|
}
|
|
90
87
|
return this.props.studentName || t('Accommodations Modal');
|
|
@@ -93,7 +90,6 @@ export var AccommodationModal = /*#__PURE__*/function (_Component) {
|
|
|
93
90
|
key: "render",
|
|
94
91
|
value: function render() {
|
|
95
92
|
var _this$props2 = this.props,
|
|
96
|
-
studentName = _this$props2.studentName,
|
|
97
93
|
open = _this$props2.open,
|
|
98
94
|
closeModal = _this$props2.closeModal,
|
|
99
95
|
mountNode = _this$props2.mountNode,
|
|
@@ -109,12 +105,7 @@ export var AccommodationModal = /*#__PURE__*/function (_Component) {
|
|
|
109
105
|
placement: "end",
|
|
110
106
|
offset: "medium",
|
|
111
107
|
screenReaderLabel: t('Close')
|
|
112
|
-
}), this.renderHeading()), /*#__PURE__*/React.createElement(Modal.Body, null, /*#__PURE__*/React.createElement(
|
|
113
|
-
name: "atteq_apply_changes_to_current_quiz_attempts"
|
|
114
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
115
|
-
weight: "bold",
|
|
116
|
-
as: "h2"
|
|
117
|
-
}, studentName)), children), /*#__PURE__*/React.createElement(Modal.Footer, null, /*#__PURE__*/React.createElement(Button, {
|
|
108
|
+
}), this.renderHeading()), /*#__PURE__*/React.createElement(Modal.Body, null, children), /*#__PURE__*/React.createElement(Modal.Footer, null, /*#__PURE__*/React.createElement(Button, {
|
|
118
109
|
onClick: this.cancelAction,
|
|
119
110
|
margin: "xxx-small",
|
|
120
111
|
"data-automation": "sdk-moderation-cancel"
|
|
@@ -137,7 +128,8 @@ AccommodationModal.propTypes = {
|
|
|
137
128
|
onDismiss: PropTypes.func,
|
|
138
129
|
mountNode: PropTypes.string,
|
|
139
130
|
// this is just to fix chromatic
|
|
140
|
-
children: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)])
|
|
131
|
+
children: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)]),
|
|
132
|
+
atteqApplyChangesToCurrentQuizAttemptsEnabled: PropTypes.bool.isRequired
|
|
141
133
|
};
|
|
142
134
|
AccommodationModal.defaultProps = {
|
|
143
135
|
children: [],
|
|
@@ -325,7 +325,8 @@ export var ModerateTable = (_dec = withStyleOverrides(generateStyle, generateCom
|
|
|
325
325
|
css: this.props.styles.page
|
|
326
326
|
}, jsx(ModerateTray, {
|
|
327
327
|
onClose: this.onCloseTray,
|
|
328
|
-
onSave: this.props.onSaveTray
|
|
328
|
+
onSave: this.props.onSaveTray,
|
|
329
|
+
atteqApplyChangesToCurrentQuizAttemptsEnabled: this.props.atteqApplyChangesToCurrentQuizAttemptsEnabled
|
|
329
330
|
}, jsx(Flex.Item, null, !this.props.anonymousGrading && _ref6), this.props.children), this.renderContent());
|
|
330
331
|
}
|
|
331
332
|
}]);
|
|
@@ -380,7 +381,8 @@ export var ModerateTable = (_dec = withStyleOverrides(generateStyle, generateCom
|
|
|
380
381
|
getQuizSessions: PropTypes.func.isRequired,
|
|
381
382
|
addSuccess: PropTypes.func.isRequired,
|
|
382
383
|
styles: PropTypes.object,
|
|
383
|
-
makeStyles: PropTypes.func
|
|
384
|
+
makeStyles: PropTypes.func,
|
|
385
|
+
atteqApplyChangesToCurrentQuizAttemptsEnabled: PropTypes.bool.isRequired
|
|
384
386
|
}, _ModerateTable.defaultProps = {
|
|
385
387
|
anonymousGrading: false,
|
|
386
388
|
children: void 0,
|
|
@@ -8,6 +8,7 @@ import t from '@instructure/quiz-i18n/es/format-message';
|
|
|
8
8
|
import { Flex } from '@instructure/ui-flex';
|
|
9
9
|
import { View } from '@instructure/ui-view';
|
|
10
10
|
import { Text } from '@instructure/ui-text';
|
|
11
|
+
import { Heading } from '@instructure/ui-heading';
|
|
11
12
|
import { Tooltip } from '@instructure/ui-tooltip';
|
|
12
13
|
import { Tray } from '@instructure/ui-tray';
|
|
13
14
|
import { Button, CloseButton } from '@instructure/ui-buttons';
|
|
@@ -15,7 +16,6 @@ import { TruncateText } from '@instructure/ui-truncate-text';
|
|
|
15
16
|
import { Modal } from '@instructure/ui-modal';
|
|
16
17
|
import { liveRegion } from '@instructure/quiz-common';
|
|
17
18
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
18
|
-
import { featureOn } from "../../../../common/util/featureCheck.js";
|
|
19
19
|
export var ModerateTray = /*#__PURE__*/function (_Component) {
|
|
20
20
|
_inherits(ModerateTray, _Component);
|
|
21
21
|
var _super = _createSuper(ModerateTray);
|
|
@@ -67,20 +67,15 @@ export var ModerateTray = /*#__PURE__*/function (_Component) {
|
|
|
67
67
|
_this.props.closeTray();
|
|
68
68
|
};
|
|
69
69
|
_this.renderTitleAndCloseButton = function () {
|
|
70
|
-
return /*#__PURE__*/React.createElement(
|
|
71
|
-
justifyItems: "space-between"
|
|
72
|
-
}, /*#__PURE__*/React.createElement(Flex.Item, {
|
|
73
|
-
shouldGrow: true,
|
|
74
|
-
shouldShrink: true
|
|
75
|
-
}, featureOn('atteq_apply_changes_to_current_quiz_attempts') ? /*#__PURE__*/React.createElement(Text, {
|
|
76
|
-
as: "h2",
|
|
77
|
-
size: "large",
|
|
78
|
-
weight: "bold"
|
|
79
|
-
}, t('In Progress Accommodation')) : _this.renderHeading()), /*#__PURE__*/React.createElement(Flex.Item, null, /*#__PURE__*/React.createElement(CloseButton, {
|
|
70
|
+
return /*#__PURE__*/React.createElement(Modal.Header, null, /*#__PURE__*/React.createElement(CloseButton, {
|
|
80
71
|
onClick: _this.props.closeTray,
|
|
81
72
|
elementRef: _this.setCloseRef,
|
|
73
|
+
placement: "end",
|
|
74
|
+
offset: "medium",
|
|
82
75
|
screenReaderLabel: t('Close')
|
|
83
|
-
})
|
|
76
|
+
}), _this.props.atteqApplyChangesToCurrentQuizAttemptsEnabled ? /*#__PURE__*/React.createElement(Heading, {
|
|
77
|
+
level: "h3"
|
|
78
|
+
}, /*#__PURE__*/React.createElement(ScreenReaderContent, null, t('In Progress Accommodation')), t('In Progress Accommodation')) : _this.renderHeading());
|
|
84
79
|
};
|
|
85
80
|
_this.renderChildren = function () {
|
|
86
81
|
return React.Children.map(_this.props.children, function (child) {
|
|
@@ -128,12 +123,12 @@ export var ModerateTray = /*#__PURE__*/function (_Component) {
|
|
|
128
123
|
/*#__PURE__*/
|
|
129
124
|
// When using TruncateText inside a Tooltip, a focusable wrapper element is required
|
|
130
125
|
// tabIndex={0} makes the div focusable and allows KO users to access the tooltip
|
|
131
|
-
React.createElement(
|
|
126
|
+
React.createElement(Heading, {
|
|
132
127
|
display: "block",
|
|
133
128
|
borderRadius: "small",
|
|
134
129
|
position: "relative",
|
|
135
130
|
withFocusOutline: this.state.titleIsTruncated && focused,
|
|
136
|
-
|
|
131
|
+
level: "h3",
|
|
137
132
|
tabIndex: this.state.isTruncated ? 0 : null
|
|
138
133
|
}, /*#__PURE__*/React.createElement(ScreenReaderContent, null, this.labelText()), /*#__PURE__*/React.createElement(TruncateText, {
|
|
139
134
|
"aria-hidden": "true",
|
|
@@ -146,9 +141,6 @@ export var ModerateTray = /*#__PURE__*/function (_Component) {
|
|
|
146
141
|
}, {
|
|
147
142
|
key: "renderName",
|
|
148
143
|
value: function renderName(renderProps) {
|
|
149
|
-
if (!featureOn('atteq_apply_changes_to_current_quiz_attempts')) {
|
|
150
|
-
return null;
|
|
151
|
-
}
|
|
152
144
|
var focused = renderProps && renderProps.focused;
|
|
153
145
|
return (
|
|
154
146
|
/*#__PURE__*/
|
|
@@ -159,8 +151,7 @@ export var ModerateTray = /*#__PURE__*/function (_Component) {
|
|
|
159
151
|
borderRadius: "small",
|
|
160
152
|
position: "relative",
|
|
161
153
|
withFocusOutline: this.state.participantNameIsTruncated && focused,
|
|
162
|
-
tabIndex: this.state.participantNameIsTruncated ? 0 : null
|
|
163
|
-
margin: "small 0"
|
|
154
|
+
tabIndex: this.state.participantNameIsTruncated ? 0 : null
|
|
164
155
|
}, /*#__PURE__*/React.createElement(ScreenReaderContent, null, this.props.participantName), /*#__PURE__*/React.createElement(TruncateText, {
|
|
165
156
|
"aria-hidden": "true",
|
|
166
157
|
maxLines: 2,
|
|
@@ -175,9 +166,6 @@ export var ModerateTray = /*#__PURE__*/function (_Component) {
|
|
|
175
166
|
key: "renderNameWithTooltip",
|
|
176
167
|
value: function renderNameWithTooltip() {
|
|
177
168
|
var _this3 = this;
|
|
178
|
-
if (!featureOn('atteq_apply_changes_to_current_quiz_attempts')) {
|
|
179
|
-
return null;
|
|
180
|
-
}
|
|
181
169
|
return this.state.titleIsTruncated ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
182
170
|
placement: "start",
|
|
183
171
|
renderTip: this.props.participantName,
|
|
@@ -192,7 +180,7 @@ export var ModerateTray = /*#__PURE__*/function (_Component) {
|
|
|
192
180
|
}, {
|
|
193
181
|
key: "labelText",
|
|
194
182
|
value: function labelText() {
|
|
195
|
-
if (
|
|
183
|
+
if (this.props.atteqApplyChangesToCurrentQuizAttemptsEnabled) {
|
|
196
184
|
return t('In Progress Accommodation');
|
|
197
185
|
}
|
|
198
186
|
if (this.props.participantName) {
|
|
@@ -211,19 +199,21 @@ export var ModerateTray = /*#__PURE__*/function (_Component) {
|
|
|
211
199
|
onExited: this.handleTrayExited,
|
|
212
200
|
open: this.props.isOpen,
|
|
213
201
|
placement: "end",
|
|
214
|
-
size:
|
|
202
|
+
size: this.props.atteqApplyChangesToCurrentQuizAttemptsEnabled ? 'regular' : void 0,
|
|
215
203
|
shouldCloseOnDocumentClick: true,
|
|
216
204
|
ref: this.setTrayRef
|
|
217
205
|
}, /*#__PURE__*/React.createElement(Flex, {
|
|
218
206
|
as: "div",
|
|
219
207
|
direction: "column",
|
|
220
208
|
height: "100vh"
|
|
221
|
-
}, /*#__PURE__*/React.createElement(Flex.Item, {
|
|
222
|
-
padding: "
|
|
223
|
-
}, this.
|
|
209
|
+
}, this.renderTitleAndCloseButton(), this.props.atteqApplyChangesToCurrentQuizAttemptsEnabled && /*#__PURE__*/React.createElement(Flex.Item, {
|
|
210
|
+
padding: "medium medium 0 medium"
|
|
211
|
+
}, this.renderNameWithTooltip()), /*#__PURE__*/React.createElement(Flex.Item, {
|
|
212
|
+
padding: "medium"
|
|
213
|
+
}, t('These settings apply to current and all future attempts.')), /*#__PURE__*/React.createElement(Flex.Item, {
|
|
224
214
|
shouldGrow: true,
|
|
225
215
|
padding: "0 medium"
|
|
226
|
-
}, this.
|
|
216
|
+
}, this.renderChildren()), this.props.atteqApplyChangesToCurrentQuizAttemptsEnabled && /*#__PURE__*/React.createElement(Flex.Item, null, this.renderFooter())));
|
|
227
217
|
}
|
|
228
218
|
}]);
|
|
229
219
|
ModerateTray.displayName = "ModerateTray";
|
|
@@ -235,7 +225,8 @@ ModerateTray.propTypes = {
|
|
|
235
225
|
isOpen: PropTypes.bool.isRequired,
|
|
236
226
|
onClose: PropTypes.func,
|
|
237
227
|
onSave: PropTypes.func.isRequired,
|
|
238
|
-
participantName: PropTypes.string
|
|
228
|
+
participantName: PropTypes.string,
|
|
229
|
+
atteqApplyChangesToCurrentQuizAttemptsEnabled: PropTypes.bool.isRequired
|
|
239
230
|
};
|
|
240
231
|
ModerateTray.defaultProps = {
|
|
241
232
|
onClose: void 0,
|
|
@@ -14,7 +14,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
14
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
15
|
var _uiButtons = require("@instructure/ui-buttons");
|
|
16
16
|
var _uiHeading = require("@instructure/ui-heading");
|
|
17
|
-
var _uiTextInput = require("@instructure/ui-text-input");
|
|
18
17
|
var _uiRadioInput = require("@instructure/ui-radio-input");
|
|
19
18
|
var _uiA11yContent = require("@instructure/ui-a11y-content");
|
|
20
19
|
var _Bank = _interopRequireDefault(require("../../../common/records/Bank.js"));
|
|
@@ -128,7 +127,7 @@ var AddToBankModal = /*#__PURE__*/function (_Component) {
|
|
|
128
127
|
"data-automation": "sdk-bank-selection"
|
|
129
128
|
});
|
|
130
129
|
}
|
|
131
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
130
|
+
return /*#__PURE__*/_react.default.createElement(_quizCommon.TextInput, {
|
|
132
131
|
onChange: this.onTitleChange,
|
|
133
132
|
value: this.state.newBankTitle,
|
|
134
133
|
renderLabel: (0, _formatMessage.default)('New Bank Title'),
|
|
@@ -17,7 +17,6 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
17
17
|
var _debounce = _interopRequireDefault(require("lodash/fp/debounce"));
|
|
18
18
|
var _find = _interopRequireDefault(require("lodash/fp/find"));
|
|
19
19
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
20
|
-
var _uiSelect = require("@instructure/ui-select");
|
|
21
20
|
var _uiSpinner = require("@instructure/ui-spinner");
|
|
22
21
|
var _index = _interopRequireDefault(require("../../../common/components/shared/TagWrapper/index.js"));
|
|
23
22
|
var _quizCommon = require("@instructure/quiz-common");
|
|
@@ -243,11 +242,11 @@ var AsyncSearch = /*#__PURE__*/function (_Component) {
|
|
|
243
242
|
key: "renderPeopleOptions",
|
|
244
243
|
value: function renderPeopleOptions(people) {
|
|
245
244
|
var _this4 = this;
|
|
246
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
245
|
+
return /*#__PURE__*/_react.default.createElement(_quizCommon.Select.Group, {
|
|
247
246
|
key: _quizCommon.SHARED_WITH_USER,
|
|
248
247
|
renderLabel: (0, _formatMessage.default)('People')
|
|
249
248
|
}, people.map(function (person) {
|
|
250
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
249
|
+
return /*#__PURE__*/_react.default.createElement(_quizCommon.Select.Option, {
|
|
251
250
|
"data-automation": "sdk-item-bank-option-user-".concat(person.uuid),
|
|
252
251
|
id: person.uuid,
|
|
253
252
|
key: person.uuid,
|
|
@@ -259,11 +258,11 @@ var AsyncSearch = /*#__PURE__*/function (_Component) {
|
|
|
259
258
|
key: "renderCoursesOptions",
|
|
260
259
|
value: function renderCoursesOptions(courses) {
|
|
261
260
|
var _this5 = this;
|
|
262
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
261
|
+
return /*#__PURE__*/_react.default.createElement(_quizCommon.Select.Group, {
|
|
263
262
|
key: _quizCommon.SHARED_WITH_COURSE,
|
|
264
263
|
renderLabel: (0, _formatMessage.default)('Courses')
|
|
265
264
|
}, courses.map(function (course) {
|
|
266
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
265
|
+
return /*#__PURE__*/_react.default.createElement(_quizCommon.Select.Option, {
|
|
267
266
|
"data-automation": "sdk-item-bank-option-course-".concat(course.uuid),
|
|
268
267
|
id: course.uuid,
|
|
269
268
|
key: course.uuid,
|
|
@@ -275,11 +274,11 @@ var AsyncSearch = /*#__PURE__*/function (_Component) {
|
|
|
275
274
|
key: "renderSubaccountsOptions",
|
|
276
275
|
value: function renderSubaccountsOptions(subaccounts) {
|
|
277
276
|
var _this6 = this;
|
|
278
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
277
|
+
return /*#__PURE__*/_react.default.createElement(_quizCommon.Select.Group, {
|
|
279
278
|
key: _quizCommon.SHARED_WITH_ACCOUNT,
|
|
280
279
|
renderLabel: (0, _formatMessage.default)('Accounts')
|
|
281
280
|
}, subaccounts.map(function (subaccount) {
|
|
282
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
281
|
+
return /*#__PURE__*/_react.default.createElement(_quizCommon.Select.Option, {
|
|
283
282
|
"data-automation": "sdk-item-bank-option-subaccount-".concat(subaccount.uuid),
|
|
284
283
|
id: subaccount.uuid,
|
|
285
284
|
key: subaccount.uuid,
|
|
@@ -314,7 +313,7 @@ var AsyncSearch = /*#__PURE__*/function (_Component) {
|
|
|
314
313
|
if (subaccounts.length) {
|
|
315
314
|
groups.push(this.renderSubaccountsOptions(subaccounts));
|
|
316
315
|
}
|
|
317
|
-
return groups.length ? groups : /*#__PURE__*/_react.default.createElement(
|
|
316
|
+
return groups.length ? groups : /*#__PURE__*/_react.default.createElement(_quizCommon.Select.Option, {
|
|
318
317
|
id: _quizCommon.SELECT_EMPTY_OPTION,
|
|
319
318
|
key: _quizCommon.SELECT_EMPTY_OPTION
|
|
320
319
|
}, this.state.isLoading ? /*#__PURE__*/_react.default.createElement(_uiSpinner.Spinner, {
|
|
@@ -342,7 +341,7 @@ var AsyncSearch = /*#__PURE__*/function (_Component) {
|
|
|
342
341
|
var _this$state = this.state,
|
|
343
342
|
inputValue = _this$state.inputValue,
|
|
344
343
|
isShowingOptions = _this$state.isShowingOptions;
|
|
345
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
344
|
+
return /*#__PURE__*/_react.default.createElement(_quizCommon.Select, {
|
|
346
345
|
"data-automation": "sdk-item-bank-share-input",
|
|
347
346
|
renderLabel: this.props.searchLabel,
|
|
348
347
|
placeholder: this.placeholder(),
|
|
@@ -28,7 +28,6 @@ var _uiText = require("@instructure/ui-text");
|
|
|
28
28
|
var _uiHeading = require("@instructure/ui-heading");
|
|
29
29
|
var _uiIcons = require("@instructure/ui-icons");
|
|
30
30
|
var _uiA11yContent = require("@instructure/ui-a11y-content");
|
|
31
|
-
var _uiTextInput = require("@instructure/ui-text-input");
|
|
32
31
|
var _emotion = require("@instructure/emotion");
|
|
33
32
|
var _index = require("../HeaderBreadCrumb/index.js");
|
|
34
33
|
var _index2 = _interopRequireDefault(require("../../../common/components/resources/entry/EntrySave/index.js"));
|
|
@@ -284,7 +283,7 @@ var BankEntry = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.default, _th
|
|
|
284
283
|
key: "renderTitle",
|
|
285
284
|
value: function renderTitle(entry) {
|
|
286
285
|
if (this.isItemEntry()) {
|
|
287
|
-
return (0, _emotion.jsx)(
|
|
286
|
+
return (0, _emotion.jsx)(_quizCommon.TextInput, {
|
|
288
287
|
renderLabel: (0, _emotion.jsx)(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage.default)('Edit question title')),
|
|
289
288
|
type: "text",
|
|
290
289
|
placeholder: (0, _formatMessage.default)('Question Title'),
|
|
@@ -15,7 +15,6 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
15
15
|
var _reactImmutableProptypes = _interopRequireDefault(require("react-immutable-proptypes"));
|
|
16
16
|
var _uiIcons = require("@instructure/ui-icons");
|
|
17
17
|
var _uiButtons = require("@instructure/ui-buttons");
|
|
18
|
-
var _uiTextInput = require("@instructure/ui-text-input");
|
|
19
18
|
var _uiCheckbox = require("@instructure/ui-checkbox");
|
|
20
19
|
var _uiView = require("@instructure/ui-view");
|
|
21
20
|
var _uiFlex = require("@instructure/ui-flex");
|
|
@@ -145,7 +144,7 @@ var BankSearch = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.default, _t
|
|
|
145
144
|
}, (0, _emotion.jsx)(_uiFlex.Flex.Item, {
|
|
146
145
|
shouldGrow: true,
|
|
147
146
|
shouldShrink: true
|
|
148
|
-
}, (0, _emotion.jsx)(
|
|
147
|
+
}, (0, _emotion.jsx)(_quizCommon.TextInput, {
|
|
149
148
|
renderLabel: (0, _emotion.jsx)(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage.default)('Search')),
|
|
150
149
|
type: "search",
|
|
151
150
|
placeholder: (0, _formatMessage.default)('Search'),
|
|
@@ -26,7 +26,6 @@ function mapStateToProps(state, props) {
|
|
|
26
26
|
return {
|
|
27
27
|
itemBankSearchTableEnabled: (0, _featureCheck.featureOn)('item_bank_search_table'),
|
|
28
28
|
usedByCourseEnabled: (0, _featureCheck.featureOn)('filter_item_banks_used_by_course'),
|
|
29
|
-
subAccountBankSharingEnabled: (0, _featureCheck.featureOn)('sub_account_bank_sharing'),
|
|
30
29
|
scopeType: scopeType,
|
|
31
30
|
sortBy: sortBy,
|
|
32
31
|
sortOrder: sortOrder,
|