@instructure/quiz-core 20.36.1-rc.2 → 20.36.1-rc.4

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.
Files changed (55) hide show
  1. package/es/banks/components/AddToBankModal/presenter.js +1 -2
  2. package/es/banks/components/AsyncSearch/index.js +1 -2
  3. package/es/banks/components/BankEntry/presenter.js +1 -2
  4. package/es/banks/components/BankSearch/presenter.js +1 -2
  5. package/es/banks/components/Banks/presenter.js +1 -3
  6. package/es/banks/components/CopyMoveBankEntryModal/presenter.js +1 -2
  7. package/es/banks/components/CreateBankModal/presenter.js +1 -2
  8. package/es/banks/components/EditBankModal/presenter.js +1 -2
  9. package/es/banks/components/SharingModal/RootAccountSharing.js +1 -2
  10. package/es/banks/components/SharingModal/ShareList/index.js +1 -2
  11. package/es/banks/components/SharingModal/presenter.js +1 -2
  12. package/es/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +1 -2
  13. package/es/common/components/AccessCodeTextInput/AccessCodeTextInput.stories.js +11 -0
  14. package/es/common/components/AccessCodeTextInput/index.js +47 -0
  15. package/es/common/components/ImportModal/presenter.js +1 -2
  16. package/es/common/components/MaskedTextInput/MaskedTextInput.stories.js +19 -0
  17. package/es/common/components/MaskedTextInput/index.js +64 -0
  18. package/es/common/components/resources/item/ItemEdit/presenter.js +1 -2
  19. package/es/common/components/resources/stimulus/StimulusEditInfo/presenter.js +1 -3
  20. package/es/common/components/shared/GenericAsyncSearch/GenericAsyncSearch.js +1 -2
  21. package/es/common/components/shared/TagSelect/presenter.js +1 -2
  22. package/es/common/components/shared/TimeUnitsInput/index.js +2 -1
  23. package/es/index.js +3 -1
  24. package/es/moderating/components/resources/AccommodationsModal/ExtraTimeSettings/index.js +2 -2
  25. package/es/moderating/components/resources/AccommodationsModal/index.js +5 -13
  26. package/es/moderating/components/resources/ModerateTable/presenter.js +4 -2
  27. package/es/moderating/components/sidebar/ModerateTray/presenter.js +20 -29
  28. package/lib/banks/components/AddToBankModal/presenter.js +1 -2
  29. package/lib/banks/components/AsyncSearch/index.js +8 -9
  30. package/lib/banks/components/BankEntry/presenter.js +1 -2
  31. package/lib/banks/components/BankSearch/presenter.js +1 -2
  32. package/lib/banks/components/Banks/presenter.js +5 -7
  33. package/lib/banks/components/CopyMoveBankEntryModal/presenter.js +1 -2
  34. package/lib/banks/components/CreateBankModal/presenter.js +1 -2
  35. package/lib/banks/components/EditBankModal/presenter.js +1 -2
  36. package/lib/banks/components/SharingModal/RootAccountSharing.js +3 -4
  37. package/lib/banks/components/SharingModal/ShareList/index.js +3 -4
  38. package/lib/banks/components/SharingModal/presenter.js +3 -4
  39. package/lib/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +1 -2
  40. package/lib/common/components/AccessCodeTextInput/AccessCodeTextInput.stories.js +20 -0
  41. package/lib/common/components/AccessCodeTextInput/index.js +57 -0
  42. package/lib/common/components/ImportModal/presenter.js +1 -2
  43. package/lib/common/components/MaskedTextInput/MaskedTextInput.stories.js +29 -0
  44. package/lib/common/components/MaskedTextInput/index.js +74 -0
  45. package/lib/common/components/resources/item/ItemEdit/presenter.js +1 -2
  46. package/lib/common/components/resources/stimulus/StimulusEditInfo/presenter.js +6 -8
  47. package/lib/common/components/shared/GenericAsyncSearch/GenericAsyncSearch.js +3 -4
  48. package/lib/common/components/shared/TagSelect/presenter.js +4 -5
  49. package/lib/common/components/shared/TimeUnitsInput/index.js +2 -1
  50. package/lib/index.js +22 -6
  51. package/lib/moderating/components/resources/AccommodationsModal/ExtraTimeSettings/index.js +7 -7
  52. package/lib/moderating/components/resources/AccommodationsModal/index.js +5 -13
  53. package/lib/moderating/components/resources/ModerateTable/presenter.js +4 -2
  54. package/lib/moderating/components/sidebar/ModerateTray/presenter.js +20 -29
  55. package/package.json +10 -9
@@ -6,13 +6,12 @@ import React, { Component } from 'react';
6
6
  import PropTypes from 'prop-types';
7
7
  import { Button, CloseButton } from '@instructure/ui-buttons';
8
8
  import { Heading } from '@instructure/ui-heading';
9
- import { TextInput } from '@instructure/ui-text-input';
10
9
  import { RadioInputGroup, RadioInput } from '@instructure/ui-radio-input';
11
10
  import { ScreenReaderContent } from '@instructure/ui-a11y-content';
12
11
  import Bank from "../../../common/records/Bank.js";
13
12
  import BankSelection from "../../../common/components/resources/BankSelection/presenter.js";
14
13
  import t from '@instructure/quiz-i18n/es/format-message';
15
- import { Modal, ModalHeader, ModalBody, ModalFooter, XSMALL_SIDE_MARGIN } from '@instructure/quiz-common';
14
+ import { Modal, ModalHeader, ModalBody, ModalFooter, TextInput, XSMALL_SIDE_MARGIN } from '@instructure/quiz-common';
16
15
  import { featureOn } from "../../../common/util/featureCheck.js";
17
16
  var _ref = /*#__PURE__*/React.createElement("br", null);
18
17
  export var AddToBankModal = /*#__PURE__*/function (_Component) {
@@ -9,10 +9,9 @@ import PropTypes from 'prop-types';
9
9
  import debounce from 'lodash/fp/debounce';
10
10
  import find from 'lodash/fp/find';
11
11
  import t from '@instructure/quiz-i18n/es/format-message';
12
- import { Select } from '@instructure/ui-select';
13
12
  import { Spinner } from '@instructure/ui-spinner';
14
13
  import TagWrapper from "../../../common/components/shared/TagWrapper/index.js";
15
- import { SHARED_WITH_USER, SHARED_WITH_COURSE, SHARED_WITH_ACCOUNT, SELECT_EMPTY_OPTION } from '@instructure/quiz-common';
14
+ import { SHARED_WITH_USER, SHARED_WITH_COURSE, SHARED_WITH_ACCOUNT, SELECT_EMPTY_OPTION, Select } from '@instructure/quiz-common';
16
15
  export var AsyncSearch = /*#__PURE__*/function (_Component) {
17
16
  _inherits(AsyncSearch, _Component);
18
17
  var _super = _createSuper(AsyncSearch);
@@ -23,7 +23,6 @@ import { Text } from '@instructure/ui-text';
23
23
  import { Heading } from '@instructure/ui-heading';
24
24
  import { IconDiscussionLine, IconDiscussionSolid } from '@instructure/ui-icons';
25
25
  import { PresentationContent, ScreenReaderContent } from '@instructure/ui-a11y-content';
26
- import { TextInput } from '@instructure/ui-text-input';
27
26
  import { jsx } from '@instructure/emotion';
28
27
  import { HeaderBreadCrumb } from "../HeaderBreadCrumb/index.js";
29
28
  import EntrySave from "../../../common/components/resources/entry/EntrySave/index.js";
@@ -41,7 +40,7 @@ import { createItem } from "../../../building/api/items.js";
41
40
  import { createStimulus } from "../../../building/api/stimuli.js";
42
41
  import { propsForItemVersioningWrapper, propsForStimulusVersioningWrapper } from "../../../common/util/warningHelpers.js";
43
42
  import NavWrapper from "../NavWrapper/index.js";
44
- import { API_INPUT_VALIDATION_ERROR, CLEAR_ALL_INPUT_VALIDATION_ERRORS, ITEM_FEEDBACK_MODAL, ITEM_FEEDBACK_MODAL_ITEM, ITEM_FEEDBACK_MODAL_FEEDBACK, PARENT_TYPE_BANK, withStyleOverrides } from '@instructure/quiz-common';
43
+ import { API_INPUT_VALIDATION_ERROR, CLEAR_ALL_INPUT_VALIDATION_ERRORS, ITEM_FEEDBACK_MODAL, ITEM_FEEDBACK_MODAL_ITEM, ITEM_FEEDBACK_MODAL_FEEDBACK, PARENT_TYPE_BANK, TextInput, withStyleOverrides } from '@instructure/quiz-common';
45
44
  import generateStyle from "./styles.js";
46
45
  import generateComponentTheme from "./theme.js";
47
46
  var _ref3 = jsx(Spinner, null);
@@ -10,7 +10,6 @@ import PropTypes from 'prop-types';
10
10
  import ImmutablePropTypes from 'react-immutable-proptypes';
11
11
  import { IconPlusLine } from '@instructure/ui-icons';
12
12
  import { Button, CondensedButton } from '@instructure/ui-buttons';
13
- import { TextInput } from '@instructure/ui-text-input';
14
13
  import { Checkbox } from '@instructure/ui-checkbox';
15
14
  import { View } from '@instructure/ui-view';
16
15
  import { Flex } from '@instructure/ui-flex';
@@ -22,7 +21,7 @@ import TagSuggestSelect from "../../../common/components/shared/TagSuggestSelect
22
21
  import { interactionTypesNameDictionary } from "../../../common/util/interactionTypeMetadata.js";
23
22
  import generateStyle from "./styles.js";
24
23
  import generateComponentTheme from "./theme.js";
25
- import { withStyleOverrides } from '@instructure/quiz-common';
24
+ import { TextInput, withStyleOverrides } from '@instructure/quiz-common';
26
25
  var tagShape = PropTypes.shape({
27
26
  tag: PropTypes.shape({
28
27
  id: PropTypes.string,
@@ -14,8 +14,6 @@ import { AccessibleContent, ScreenReaderContent } from '@instructure/ui-a11y-con
14
14
  import { IconPlusLine, IconArrowUpLine, IconArrowDownLine } from '@instructure/ui-icons';
15
15
  import { Billboard } from '@instructure/ui-billboard';
16
16
  import { Button } from '@instructure/ui-buttons';
17
- import { TextInput } from '@instructure/ui-text-input';
18
- import { SimpleSelect } from '@instructure/ui-simple-select';
19
17
  import { jsx } from '@instructure/emotion';
20
18
  import { Grid } from '@instructure/ui-grid';
21
19
  import { View } from '@instructure/ui-view';
@@ -24,7 +22,7 @@ import Page from "../../../common/components/layout/Page/index.js";
24
22
  import { HeaderBreadCrumb } from "../HeaderBreadCrumb/index.js";
25
23
  import PaginatedCollection from "../../../common/components/shared/PaginatedCollection/index.js";
26
24
  import t from '@instructure/quiz-i18n/es/format-message';
27
- import { BANKS_BANK_FILTERS, BANKS_BANK_PAGINATION, CREATE_BANK_MODAL, SHARED_WITH_ACCOUNT, withStyleOverrides } from '@instructure/quiz-common';
25
+ import { BANKS_BANK_FILTERS, BANKS_BANK_PAGINATION, CREATE_BANK_MODAL, SHARED_WITH_ACCOUNT, withStyleOverrides, SimpleSelect, TextInput } from '@instructure/quiz-common';
28
26
  import BanksList from "../../../banks/components/BanksList/index.js";
29
27
  import CreateBankModal from "../../../banks/components/CreateBankModal/index.js";
30
28
  import NavWrapper from "../NavWrapper/index.js";
@@ -5,7 +5,6 @@ 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 { Button, CloseButton } from '@instructure/ui-buttons';
8
- import { TextInput } from '@instructure/ui-text-input';
9
8
  import { RadioInputGroup, RadioInput } from '@instructure/ui-radio-input';
10
9
  import { Checkbox } from '@instructure/ui-checkbox';
11
10
  import { Heading } from '@instructure/ui-heading';
@@ -13,7 +12,7 @@ import { ScreenReaderContent } from '@instructure/ui-a11y-content';
13
12
  import t from '@instructure/quiz-i18n/es/format-message';
14
13
  import Bank from "../../../common/records/Bank.js";
15
14
  import BankSelection from "../../../common/components/resources/BankSelection/presenter.js";
16
- import { Modal, ModalHeader, ModalBody, ModalFooter, COPY_MOVE_BANK_ENTRY_MODAL_KEEP_COPY, XSMALL_SIDE_MARGIN } from '@instructure/quiz-common';
15
+ import { Modal, ModalHeader, ModalBody, ModalFooter, COPY_MOVE_BANK_ENTRY_MODAL_KEEP_COPY, TextInput, XSMALL_SIDE_MARGIN } from '@instructure/quiz-common';
17
16
  import { featureOn } from "../../../common/util/featureCheck.js";
18
17
  var _ref = /*#__PURE__*/React.createElement("br", null);
19
18
  var _ref2 = /*#__PURE__*/React.createElement("br", null);
@@ -9,13 +9,12 @@ import PropTypes from 'prop-types';
9
9
  import { Button, CloseButton } from '@instructure/ui-buttons';
10
10
  import { Checkbox } from '@instructure/ui-checkbox';
11
11
  import { View } from '@instructure/ui-view';
12
- import { TextInput } from '@instructure/ui-text-input';
13
12
  import { Heading } from '@instructure/ui-heading';
14
13
  import { jsx } from '@instructure/emotion';
15
14
  import t from '@instructure/quiz-i18n/es/format-message';
16
15
  import Bank from "../../../common/records/Bank.js";
17
16
  import { toErrors } from "../../../common/util/instUIMessages.js";
18
- import { Modal, ModalHeader, ModalBody, ModalFooter, XSMALL_SIDE_MARGIN, withStyleOverrides } from '@instructure/quiz-common';
17
+ import { Modal, ModalHeader, ModalBody, ModalFooter, TextInput, XSMALL_SIDE_MARGIN, withStyleOverrides } from '@instructure/quiz-common';
19
18
  import generateStyle from "./styles.js";
20
19
  import generateComponentTheme from "./theme.js";
21
20
  export var CreateBankModal = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_CreateBankModal = /*#__PURE__*/function (_Component) {
@@ -7,12 +7,11 @@ var _dec, _class, _EditBankModal;
7
7
  import { Component } from 'react';
8
8
  import PropTypes from 'prop-types';
9
9
  import { Button, CloseButton } from '@instructure/ui-buttons';
10
- import { TextInput } from '@instructure/ui-text-input';
11
10
  import { Heading } from '@instructure/ui-heading';
12
11
  import { jsx } from '@instructure/emotion';
13
12
  import t from '@instructure/quiz-i18n/es/format-message';
14
13
  import { toErrors } from "../../../common/util/instUIMessages.js";
15
- import { Modal, ModalHeader, ModalBody, ModalFooter, XSMALL_SIDE_MARGIN, withStyleOverrides } from '@instructure/quiz-common';
14
+ import { Modal, ModalHeader, ModalBody, ModalFooter, TextInput, XSMALL_SIDE_MARGIN, withStyleOverrides } from '@instructure/quiz-common';
16
15
  import Bank from "../../../common/records/Bank.js";
17
16
  import generateStyle from "./styles.js";
18
17
  import generateComponentTheme from "./theme.js";
@@ -5,13 +5,12 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
5
  var _dec, _class, _RootAccountSharing;
6
6
  import React, { Component } from 'react';
7
7
  import PropTypes from 'prop-types';
8
- import { withStyleOverrides, CAN_EDIT, READ_ONLY } from '@instructure/quiz-common';
8
+ import { withStyleOverrides, CAN_EDIT, READ_ONLY, SimpleSelect } from '@instructure/quiz-common';
9
9
  import { IconAdminLine } from '@instructure/ui-icons';
10
10
  import { Checkbox } from '@instructure/ui-checkbox';
11
11
  import { View } from '@instructure/ui-view';
12
12
  import { Grid } from '@instructure/ui-grid';
13
13
  import { ScreenReaderContent } from '@instructure/ui-a11y-content';
14
- import { SimpleSelect } from '@instructure/ui-simple-select';
15
14
  import generateStyle from "./styles.js";
16
15
  import generateComponentTheme from "./theme.js";
17
16
  import t from '@instructure/quiz-i18n/es/format-message';
@@ -11,10 +11,9 @@ import { Map } from 'immutable';
11
11
  import { IconCoursesLine, IconTrashLine, IconResetLine } from '@instructure/ui-icons';
12
12
  import { Grid } from '@instructure/ui-grid';
13
13
  import { Avatar } from '@instructure/ui-avatar';
14
- import { SimpleSelect } from '@instructure/ui-simple-select';
15
14
  import { ScreenReaderContent } from '@instructure/ui-a11y-content';
16
15
  import { jsx } from '@instructure/emotion';
17
- import { CAN_EDIT, READ_ONLY, REMOVED_ACCESS, SHARED_WITH_COURSE, withStyleOverrides } from '@instructure/quiz-common';
16
+ import { CAN_EDIT, READ_ONLY, REMOVED_ACCESS, SHARED_WITH_COURSE, SimpleSelect, withStyleOverrides } from '@instructure/quiz-common';
18
17
  import t from '@instructure/quiz-i18n/es/format-message';
19
18
  import { ContextualIconButton } from "../ContextualIconButton/index.js";
20
19
  import generateStyle from "./styles.js";
@@ -14,14 +14,13 @@ import PropTypes from 'prop-types';
14
14
  import { List, Map } from 'immutable';
15
15
  import ImmutablePropTypes from 'react-immutable-proptypes';
16
16
  import partial from 'lodash/partial';
17
- import { Modal, ModalHeader, ModalBody, ModalFooter, CAN_EDIT, READ_ONLY, REMOVED_ACCESS, SHARED_WITH_USER, SHARED_WITH_COURSE, SHARED_WITH_ACCOUNT, withStyleOverrides } from '@instructure/quiz-common';
17
+ import { Modal, ModalHeader, ModalBody, ModalFooter, CAN_EDIT, READ_ONLY, REMOVED_ACCESS, SHARED_WITH_USER, SHARED_WITH_COURSE, SHARED_WITH_ACCOUNT, SimpleSelect, withStyleOverrides } from '@instructure/quiz-common';
18
18
  import { Heading } from '@instructure/ui-heading';
19
19
  import { Button, CloseButton } from '@instructure/ui-buttons';
20
20
  import { View } from '@instructure/ui-view';
21
21
  import { Grid } from '@instructure/ui-grid';
22
22
  import { Tabs } from '@instructure/ui-tabs';
23
23
  import { Text } from '@instructure/ui-text';
24
- import { SimpleSelect } from '@instructure/ui-simple-select';
25
24
  import { jsx } from '@instructure/emotion';
26
25
  import elementsForSelectors from "../../../common/util/ElementsForSelectors.js";
27
26
  import CustomPropTypes from "../../../common/util/CustomPropTypes.js";
@@ -12,7 +12,6 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
12
12
  import partial from 'lodash/partial';
13
13
  import { ScreenReaderContent } from '@instructure/ui-a11y-content';
14
14
  import { CondensedButton } from '@instructure/ui-buttons';
15
- import { TextInput } from '@instructure/ui-text-input';
16
15
  import { jsx, Global } from '@instructure/emotion';
17
16
  import { FillBlankInteractionType } from '@instructure/quiz-interactions';
18
17
  import { IconBankLine } from '@instructure/ui-icons';
@@ -21,7 +20,7 @@ import { convertFITBtoRich } from "../../../../../../common/util/fitbCopyHelper.
21
20
  import PositionBox from "../../../../../../common/components/resources/positionBox/PositionBox.js";
22
21
  import Item from "../../../../../../common/records/Item.js";
23
22
  import ActionButtons from "../../../ActionButtons/index.js";
24
- import { DELETED_QUIZ_ENTRY, API_INPUT_VALIDATION_ERROR, BUILD_TRAY_OPEN, withStyleOverrides } from '@instructure/quiz-common';
23
+ import { DELETED_QUIZ_ENTRY, API_INPUT_VALIDATION_ERROR, BUILD_TRAY_OPEN, TextInput, withStyleOverrides } from '@instructure/quiz-common';
25
24
  import generateStyle from "./styles.js";
26
25
  import generateComponentTheme from "./theme.js";
27
26
  var _ref2 = jsx(IconBankLine, null);
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { AccessCodeTextInput } from "./index.js";
3
+ export default {
4
+ title: AccessCodeTextInput.name
5
+ };
6
+ var _ref = /*#__PURE__*/React.createElement(AccessCodeTextInput, {
7
+ value: "Is it secret? Is it safe?"
8
+ });
9
+ export var whenRendered = function whenRendered() {
10
+ return _ref;
11
+ };
@@ -0,0 +1,47 @@
1
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
3
+ import _inherits from "@babel/runtime/helpers/esm/inherits";
4
+ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
+ import React, { Component } from 'react';
6
+ import MaskedTextInput from "../MaskedTextInput/index.js";
7
+ import { ScreenReaderContent } from '@instructure/ui-a11y-content';
8
+ import t from '@instructure/quiz-i18n/es/format-message';
9
+ export var AccessCodeTextInput = /*#__PURE__*/function (_Component) {
10
+ _inherits(AccessCodeTextInput, _Component);
11
+ var _super = _createSuper(AccessCodeTextInput);
12
+ function AccessCodeTextInput() {
13
+ var _this;
14
+ _classCallCheck(this, AccessCodeTextInput);
15
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
16
+ args[_key] = arguments[_key];
17
+ }
18
+ _this = _super.call.apply(_super, [this].concat(args));
19
+ _this.state = {
20
+ masked: true
21
+ };
22
+ _this.handleMaskedChange = function () {
23
+ _this.setState(function (state) {
24
+ return {
25
+ masked: !state.masked
26
+ };
27
+ });
28
+ };
29
+ return _this;
30
+ }
31
+ _createClass(AccessCodeTextInput, [{
32
+ key: "render",
33
+ value: function render() {
34
+ return /*#__PURE__*/React.createElement(MaskedTextInput, Object.assign({
35
+ renderLabel: /*#__PURE__*/React.createElement(ScreenReaderContent, null, t('Access Code')),
36
+ display: "inline-block",
37
+ type: "text",
38
+ onMaskedChange: this.handleMaskedChange,
39
+ masked: this.state.masked,
40
+ checkboxLabel: t('Show access code')
41
+ }, this.props));
42
+ }
43
+ }]);
44
+ AccessCodeTextInput.displayName = "AccessCodeTextInput";
45
+ return AccessCodeTextInput;
46
+ }(Component);
47
+ export default AccessCodeTextInput;
@@ -14,9 +14,8 @@ import { ProgressBar } from '@instructure/ui-progress';
14
14
  import { Heading } from '@instructure/ui-heading';
15
15
  import { Tabs } from '@instructure/ui-tabs';
16
16
  import { ToggleDetails } from '@instructure/ui-toggle-details';
17
- import { TextInput } from '@instructure/ui-text-input';
18
17
  import { jsx } from '@instructure/emotion';
19
- import { ImportantModal, ModalHeader, ModalBody, ModalFooter, FILE_UPLOAD_SELECT, FILE_UPLOAD_IMPORTING, FILE_UPLOAD_SUCCESS, FILE_UPLOAD_FAILURE, FILE_UPLOAD_ERROR, XSMALL_SIDE_MARGIN, withStyleOverrides } from '@instructure/quiz-common';
18
+ import { ImportantModal, ModalHeader, ModalBody, ModalFooter, FILE_UPLOAD_SELECT, FILE_UPLOAD_IMPORTING, FILE_UPLOAD_SUCCESS, FILE_UPLOAD_FAILURE, FILE_UPLOAD_ERROR, TextInput, XSMALL_SIDE_MARGIN, withStyleOverrides } from '@instructure/quiz-common';
20
19
  import generateStyle from "./styles.js";
21
20
  import generateComponentTheme from "./theme.js";
22
21
  import ImportFileSelector from "./ImportFileSelector/index.js";
@@ -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;
@@ -7,11 +7,10 @@ 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";
@@ -8,16 +8,14 @@ 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
11
  import { FormField, FormFieldGroup } from '@instructure/ui-form-field';
13
12
  import { jsx } from '@instructure/emotion';
14
13
  import { Heading } from '@instructure/ui-heading';
15
14
  import { RichContentInput, RCE_SINGLE_LINE_HEIGHT } from '@instructure/quiz-rce';
16
15
  import { toErrors } from "../../../../util/instUIMessages.js";
17
- import { SimpleSelect } from '@instructure/ui-simple-select';
18
16
  import { IconUpdownLine } from '@instructure/ui-icons';
19
17
  import { ToggleDetails } from '@instructure/ui-toggle-details';
20
- import { TOP, withStyleOverrides } from '@instructure/quiz-common';
18
+ import { SimpleSelect, TextInput, TOP, withStyleOverrides } from '@instructure/quiz-common';
21
19
  import t from '@instructure/quiz-i18n/es/format-message';
22
20
  import generateStyle from "./styles.js";
23
21
  import generateComponentTheme from "./theme.js";
@@ -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.props.onReset();
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"; // Utilities
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/ui-simple-select';
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 (featureOn('atteq_apply_changes_to_current_quiz_attempts')) {
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 (featureOn('atteq_apply_changes_to_current_quiz_attempts')) {
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(IfFeature, {
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,