@instructure/quiz-core 20.1.1-rc.2 → 20.1.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.
- package/es/banks/components/CreateBankModal/presenter.js +22 -27
- package/es/banks/components/CreateBankModal/styles.js +16 -0
- package/es/banks/components/CreateBankModal/theme.js +4 -2
- package/es/banks/components/EditBankModal/presenter.js +19 -25
- package/es/banks/components/EditBankModal/styles.js +13 -0
- package/es/banks/components/EditBankModal/theme.js +4 -2
- package/es/banks/components/HeaderMenu/presenter.js +15 -18
- package/es/banks/components/HeaderMenu/styles.js +11 -0
- package/es/banks/components/HeaderMenu/theme.js +4 -2
- package/lib/banks/components/CreateBankModal/presenter.js +21 -28
- package/lib/banks/components/CreateBankModal/styles.js +24 -0
- package/lib/banks/components/CreateBankModal/theme.js +6 -3
- package/lib/banks/components/EditBankModal/presenter.js +18 -26
- package/lib/banks/components/EditBankModal/styles.js +21 -0
- package/lib/banks/components/EditBankModal/theme.js +6 -3
- package/lib/banks/components/HeaderMenu/presenter.js +14 -19
- package/lib/banks/components/HeaderMenu/styles.js +19 -0
- package/lib/banks/components/HeaderMenu/theme.js +6 -3
- package/package.json +58 -58
|
@@ -5,28 +5,22 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
5
5
|
|
|
6
6
|
var _dec, _class, _class2, _temp;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/** @jsx jsx */
|
|
9
|
+
import { Component } from 'react';
|
|
9
10
|
import PropTypes from 'prop-types';
|
|
10
11
|
import { Button, CloseButton } from '@instructure/ui-buttons';
|
|
11
12
|
import { Checkbox } from '@instructure/ui-checkbox';
|
|
12
13
|
import { View } from '@instructure/ui-view';
|
|
13
14
|
import { TextInput } from '@instructure/ui-text-input';
|
|
14
15
|
import { Heading } from '@instructure/ui-heading';
|
|
15
|
-
import {
|
|
16
|
+
import { withStyle, jsx } from '@instructure/emotion';
|
|
16
17
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
17
18
|
import Bank from "../../../common/records/Bank.js";
|
|
18
19
|
import { toErrors } from "../../../common/util/instUIMessages.js";
|
|
19
20
|
import { Modal, ModalHeader, ModalBody, ModalFooter, XSMALL_SIDE_MARGIN } from '@instructure/quiz-common';
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return "\n\n.fTWio_detV{flex:1 1 auto;font-size:".concat(theme.bankNameInputFontSize || 'inherit', ";padding:").concat(theme.bankNamePadding || 'inherit', ";text-overflow:ellipsis;white-space:nowrap}\n\n.fTWio_rOsj{padding:").concat(theme.bankNameLabelPadding || 'inherit', "}");
|
|
24
|
-
},
|
|
25
|
-
'bankNameInput': 'fTWio_detV',
|
|
26
|
-
'bankNameLabel': 'fTWio_rOsj'
|
|
27
|
-
};
|
|
28
|
-
import theme from "./theme.js";
|
|
29
|
-
export var CreateBankModal = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
21
|
+
import generateStyle from "./styles.js";
|
|
22
|
+
import generateComponentTheme from "./theme.js";
|
|
23
|
+
export var CreateBankModal = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
30
24
|
_inherits(CreateBankModal, _Component);
|
|
31
25
|
|
|
32
26
|
var _super = _createSuper(CreateBankModal);
|
|
@@ -103,16 +97,15 @@ export var CreateBankModal = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
103
97
|
_createClass(CreateBankModal, [{
|
|
104
98
|
key: "cancelButton",
|
|
105
99
|
value: function cancelButton() {
|
|
106
|
-
return
|
|
100
|
+
return jsx(Button, {
|
|
107
101
|
onClick: this.closeAction,
|
|
108
|
-
className: styles.footerButtonWrapper,
|
|
109
102
|
margin: XSMALL_SIDE_MARGIN
|
|
110
103
|
}, t('Cancel'));
|
|
111
104
|
}
|
|
112
105
|
}, {
|
|
113
106
|
key: "createBankButton",
|
|
114
107
|
value: function createBankButton() {
|
|
115
|
-
return
|
|
108
|
+
return jsx(Button, {
|
|
116
109
|
type: "button",
|
|
117
110
|
color: "primary",
|
|
118
111
|
onClick: this.continueAction,
|
|
@@ -123,13 +116,13 @@ export var CreateBankModal = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
123
116
|
}, {
|
|
124
117
|
key: "renderContent",
|
|
125
118
|
value: function renderContent() {
|
|
126
|
-
return
|
|
127
|
-
|
|
128
|
-
},
|
|
119
|
+
return jsx("div", {
|
|
120
|
+
css: this.props.styles.bankNameInput
|
|
121
|
+
}, jsx(TextInput, {
|
|
129
122
|
messages: this.getErrors(),
|
|
130
123
|
onChange: this.onNameChange,
|
|
131
|
-
renderLabel:
|
|
132
|
-
|
|
124
|
+
renderLabel: jsx("div", {
|
|
125
|
+
css: this.props.styles.bankNameLabel
|
|
133
126
|
}, t('Bank Name')),
|
|
134
127
|
type: "text",
|
|
135
128
|
placeholder: t('Enter a name...'),
|
|
@@ -148,10 +141,10 @@ export var CreateBankModal = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
148
141
|
var label = t('Share with { courseName }', {
|
|
149
142
|
courseName: this.props.itemBanksScope.title
|
|
150
143
|
});
|
|
151
|
-
return
|
|
144
|
+
return jsx(View, {
|
|
152
145
|
margin: "medium 0 0 0",
|
|
153
146
|
as: "div"
|
|
154
|
-
},
|
|
147
|
+
}, jsx(Checkbox, {
|
|
155
148
|
label: label,
|
|
156
149
|
checked: this.state.shareWithCourse,
|
|
157
150
|
onChange: this.toggleCheckbox
|
|
@@ -160,21 +153,21 @@ export var CreateBankModal = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
160
153
|
}, {
|
|
161
154
|
key: "render",
|
|
162
155
|
value: function render() {
|
|
163
|
-
return
|
|
156
|
+
return jsx(Modal, {
|
|
164
157
|
open: this.props.modalOpen,
|
|
165
158
|
onDismiss: this.closeAction,
|
|
166
159
|
size: "small",
|
|
167
160
|
label: t('Item Bank'),
|
|
168
161
|
"data-automation": "sdk-create-bank-modal"
|
|
169
|
-
},
|
|
162
|
+
}, jsx(ModalHeader, null, jsx(Heading, {
|
|
170
163
|
level: "reset",
|
|
171
164
|
as: "h2"
|
|
172
|
-
}, t('New Item Bank')),
|
|
165
|
+
}, t('New Item Bank')), jsx(CloseButton, {
|
|
173
166
|
onClick: this.closeAction,
|
|
174
167
|
placement: "end",
|
|
175
168
|
offset: "medium",
|
|
176
169
|
screenReaderLabel: t('Close')
|
|
177
|
-
})),
|
|
170
|
+
})), jsx(ModalBody, null, this.renderContent()), jsx(ModalFooter, null, this.cancelButton(), this.createBankButton()));
|
|
178
171
|
}
|
|
179
172
|
}]);
|
|
180
173
|
|
|
@@ -199,7 +192,9 @@ export var CreateBankModal = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
199
192
|
type: PropTypes.string,
|
|
200
193
|
uuid: PropTypes.string,
|
|
201
194
|
title: PropTypes.string
|
|
202
|
-
})
|
|
195
|
+
}),
|
|
196
|
+
// eslint-disable-next-line react/require-default-props,react/forbid-prop-types
|
|
197
|
+
styles: PropTypes.object
|
|
203
198
|
}, _class2.defaultProps = {
|
|
204
199
|
displayError: false,
|
|
205
200
|
modalTrigger: null,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
2
|
+
return {
|
|
3
|
+
bankNameInput: {
|
|
4
|
+
flex: '1 1 auto',
|
|
5
|
+
fontSize: componentTheme.bankNameInputFontSize,
|
|
6
|
+
whiteSpace: 'nowrap',
|
|
7
|
+
textOverflow: 'ellipsis',
|
|
8
|
+
padding: componentTheme.bankNamePadding
|
|
9
|
+
},
|
|
10
|
+
bankNameLabel: {
|
|
11
|
+
padding: componentTheme.bankNameLabelPadding
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default generateStyle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
2
2
|
var typography = _ref.typography,
|
|
3
3
|
spacing = _ref.spacing;
|
|
4
4
|
return {
|
|
@@ -6,4 +6,6 @@ export default function generator(_ref) {
|
|
|
6
6
|
bankNamePadding: spacing.xSmall,
|
|
7
7
|
bankNameLabelPadding: spacing.xSmall
|
|
8
8
|
};
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default generateComponentTheme;
|
|
@@ -5,25 +5,20 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
5
5
|
|
|
6
6
|
var _dec, _class, _class2, _temp;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/** @jsx jsx */
|
|
9
|
+
import { Component } from 'react';
|
|
9
10
|
import PropTypes from 'prop-types';
|
|
10
11
|
import { Button, CloseButton } from '@instructure/ui-buttons';
|
|
11
12
|
import { TextInput } from '@instructure/ui-text-input';
|
|
12
13
|
import { Heading } from '@instructure/ui-heading';
|
|
13
|
-
import {
|
|
14
|
+
import { withStyle, jsx } from '@instructure/emotion';
|
|
14
15
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
15
16
|
import { toErrors } from "../../../common/util/instUIMessages.js";
|
|
16
17
|
import { Modal, ModalHeader, ModalBody, ModalFooter, XSMALL_SIDE_MARGIN } from '@instructure/quiz-common';
|
|
17
18
|
import Bank from "../../../common/records/Bank.js";
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return "\n\n.cvAov_detV{flex:1 1 auto;font-size:".concat(theme.bankNameInputFontSize || 'inherit', ";padding:0 ").concat(theme.bankNameInputFontSize || 'inherit', ";text-overflow:ellipsis;white-space:nowrap}");
|
|
22
|
-
},
|
|
23
|
-
'bankNameInput': 'cvAov_detV'
|
|
24
|
-
};
|
|
25
|
-
import theme from "./theme.js";
|
|
26
|
-
export var EditBankModal = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
19
|
+
import generateStyle from "./styles.js";
|
|
20
|
+
import generateComponentTheme from "./theme.js";
|
|
21
|
+
export var EditBankModal = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
27
22
|
_inherits(EditBankModal, _Component);
|
|
28
23
|
|
|
29
24
|
var _super = _createSuper(EditBankModal);
|
|
@@ -81,16 +76,15 @@ export var EditBankModal = (_dec = themeable(theme, styles), _dec(_class = (_tem
|
|
|
81
76
|
_createClass(EditBankModal, [{
|
|
82
77
|
key: "renderCancelButton",
|
|
83
78
|
value: function renderCancelButton() {
|
|
84
|
-
return
|
|
79
|
+
return jsx(Button, {
|
|
85
80
|
onClick: this.closeAction,
|
|
86
|
-
className: styles.footerButtonWrapper,
|
|
87
81
|
margin: XSMALL_SIDE_MARGIN
|
|
88
82
|
}, t('Cancel'));
|
|
89
83
|
}
|
|
90
84
|
}, {
|
|
91
85
|
key: "renderSaveButton",
|
|
92
86
|
value: function renderSaveButton() {
|
|
93
|
-
return
|
|
87
|
+
return jsx(Button, {
|
|
94
88
|
type: "button",
|
|
95
89
|
color: "primary",
|
|
96
90
|
onClick: this.continueAction,
|
|
@@ -101,15 +95,13 @@ export var EditBankModal = (_dec = themeable(theme, styles), _dec(_class = (_tem
|
|
|
101
95
|
}, {
|
|
102
96
|
key: "renderContent",
|
|
103
97
|
value: function renderContent() {
|
|
104
|
-
return
|
|
105
|
-
|
|
106
|
-
},
|
|
98
|
+
return jsx("div", {
|
|
99
|
+
css: this.props.styles.bankNameInput
|
|
100
|
+
}, jsx(TextInput, {
|
|
107
101
|
value: this.props.workingBank.title,
|
|
108
102
|
messages: this.getErrors(),
|
|
109
103
|
onChange: this.onNameChange,
|
|
110
|
-
renderLabel:
|
|
111
|
-
className: styles.bankNameLabel
|
|
112
|
-
}, t('Bank Name')),
|
|
104
|
+
renderLabel: jsx("div", null, t('Bank Name')),
|
|
113
105
|
type: "text",
|
|
114
106
|
placeholder: t('Enter a name...'),
|
|
115
107
|
"data-automation": "sdk-edit-bank-name-textinput"
|
|
@@ -118,21 +110,21 @@ export var EditBankModal = (_dec = themeable(theme, styles), _dec(_class = (_tem
|
|
|
118
110
|
}, {
|
|
119
111
|
key: "render",
|
|
120
112
|
value: function render() {
|
|
121
|
-
return
|
|
113
|
+
return jsx(Modal, {
|
|
122
114
|
open: this.props.modalOpen,
|
|
123
115
|
onDismiss: this.closeAction,
|
|
124
116
|
size: "small",
|
|
125
117
|
label: t('Item Bank'),
|
|
126
118
|
"data-automation": "sdk-edit-bank-modal"
|
|
127
|
-
},
|
|
119
|
+
}, jsx(ModalHeader, null, jsx(Heading, {
|
|
128
120
|
level: "reset",
|
|
129
121
|
as: "h2"
|
|
130
|
-
}, t('Edit Item Bank')),
|
|
122
|
+
}, t('Edit Item Bank')), jsx(CloseButton, {
|
|
131
123
|
onClick: this.closeAction,
|
|
132
124
|
placement: "end",
|
|
133
125
|
offset: "medium",
|
|
134
126
|
screenReaderLabel: t('Close')
|
|
135
|
-
})),
|
|
127
|
+
})), jsx(ModalBody, null, this.renderContent()), jsx(ModalFooter, null, this.renderCancelButton(), this.renderSaveButton()));
|
|
136
128
|
}
|
|
137
129
|
}]);
|
|
138
130
|
|
|
@@ -149,7 +141,9 @@ export var EditBankModal = (_dec = themeable(theme, styles), _dec(_class = (_tem
|
|
|
149
141
|
clearModifications: PropTypes.func.isRequired,
|
|
150
142
|
showError: PropTypes.func.isRequired,
|
|
151
143
|
hideError: PropTypes.func.isRequired,
|
|
152
|
-
closeModal: PropTypes.func.isRequired
|
|
144
|
+
closeModal: PropTypes.func.isRequired,
|
|
145
|
+
// eslint-disable-next-line react/require-default-props,react/forbid-prop-types
|
|
146
|
+
styles: PropTypes.object
|
|
153
147
|
}, _class2.defaultProps = {
|
|
154
148
|
displayError: false,
|
|
155
149
|
modalTrigger: null
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
2
|
+
return {
|
|
3
|
+
bankNameInput: {
|
|
4
|
+
flex: '1 1 auto',
|
|
5
|
+
fontSize: componentTheme.bankNameInputFontSize,
|
|
6
|
+
whiteSpace: 'nowrap',
|
|
7
|
+
textOverflow: 'ellipsis',
|
|
8
|
+
padding: "0 ".concat(componentTheme.bankNameInputFontSize)
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default generateStyle;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
2
2
|
var typography = _ref.typography,
|
|
3
3
|
spacing = _ref.spacing;
|
|
4
4
|
return {
|
|
5
5
|
bankNameInputFontSize: typography.fontSizeMedium,
|
|
6
6
|
bankNameInputPadding: spacing.xSmall
|
|
7
7
|
};
|
|
8
|
-
}
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default generateComponentTheme;
|
|
@@ -5,25 +5,20 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
5
5
|
|
|
6
6
|
var _dec, _class, _class2, _temp;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/** @jsx jsx */
|
|
9
|
+
import { Component } from 'react';
|
|
9
10
|
import PropTypes from 'prop-types';
|
|
10
11
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
11
12
|
import { Menu } from '@instructure/ui-menu';
|
|
12
13
|
import { IconButton } from '@instructure/ui-buttons';
|
|
13
14
|
import { IconMoreSolid, IconImportLine } from '@instructure/ui-icons';
|
|
14
|
-
import {
|
|
15
|
+
import { withStyle, jsx } from '@instructure/emotion';
|
|
15
16
|
import QTIImportModal from "../../../building/components/QTIImportModal/index.js";
|
|
16
17
|
import { PARENT_TYPE_BANK } from '@instructure/quiz-common';
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
template: function template(theme) {
|
|
20
|
-
return "\n\n.HITck_cLWx{font-size:".concat(theme.menuIconFontSize || 'inherit', ";margin-right:").concat(theme.menuIconMargin || 'inherit', ";vertical-align:middle}");
|
|
21
|
-
},
|
|
22
|
-
'menuIcon': 'HITck_cLWx'
|
|
23
|
-
};
|
|
24
|
-
import theme from "./theme.js";
|
|
18
|
+
import generateStyle from "./styles.js";
|
|
19
|
+
import generateComponentTheme from "./theme.js";
|
|
25
20
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
26
|
-
export var HeaderMenu = (_dec =
|
|
21
|
+
export var HeaderMenu = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
27
22
|
_inherits(HeaderMenu, _Component);
|
|
28
23
|
|
|
29
24
|
var _super = _createSuper(HeaderMenu);
|
|
@@ -37,19 +32,19 @@ export var HeaderMenu = (_dec = themeable(theme, styles), _dec(_class = (_temp =
|
|
|
37
32
|
_createClass(HeaderMenu, [{
|
|
38
33
|
key: "renderMenu",
|
|
39
34
|
value: function renderMenu() {
|
|
40
|
-
return
|
|
41
|
-
trigger:
|
|
35
|
+
return jsx(Menu, {
|
|
36
|
+
trigger: jsx(IconButton, {
|
|
42
37
|
renderIcon: IconMoreSolid,
|
|
43
38
|
withBackground: false,
|
|
44
39
|
withBorder: false,
|
|
45
40
|
screenReaderLabel: t('More Item Banking Actions')
|
|
46
41
|
})
|
|
47
|
-
},
|
|
42
|
+
}, jsx(Menu.Item, {
|
|
48
43
|
key: "import",
|
|
49
44
|
disabled: !this.props.bank.canImport(),
|
|
50
45
|
onSelect: this.props.openImportModal
|
|
51
|
-
},
|
|
52
|
-
|
|
46
|
+
}, jsx(IconImportLine, {
|
|
47
|
+
css: this.props.styles.menuIcon,
|
|
53
48
|
"data-automation": "sdk-headermenu-import-content"
|
|
54
49
|
}), t('Import Content')));
|
|
55
50
|
}
|
|
@@ -57,7 +52,7 @@ export var HeaderMenu = (_dec = themeable(theme, styles), _dec(_class = (_temp =
|
|
|
57
52
|
key: "render",
|
|
58
53
|
value: function render() {
|
|
59
54
|
var bank = this.props.bank;
|
|
60
|
-
return
|
|
55
|
+
return jsx("div", null, this.renderMenu(), jsx(QTIImportModal, {
|
|
61
56
|
parentId: bank.id,
|
|
62
57
|
parentType: PARENT_TYPE_BANK,
|
|
63
58
|
qtiImport: bank.getLatestImport(),
|
|
@@ -70,6 +65,8 @@ export var HeaderMenu = (_dec = themeable(theme, styles), _dec(_class = (_temp =
|
|
|
70
65
|
return HeaderMenu;
|
|
71
66
|
}(Component), _class2.propTypes = {
|
|
72
67
|
openImportModal: PropTypes.func.isRequired,
|
|
73
|
-
bank: ImmutablePropTypes.record.isRequired
|
|
68
|
+
bank: ImmutablePropTypes.record.isRequired,
|
|
69
|
+
// eslint-disable-next-line react/require-default-props,react/forbid-prop-types
|
|
70
|
+
styles: PropTypes.object
|
|
74
71
|
}, _temp)) || _class);
|
|
75
72
|
export default HeaderMenu;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
2
2
|
var spacing = _ref.spacing,
|
|
3
3
|
typography = _ref.typography;
|
|
4
4
|
return {
|
|
5
5
|
menuIconMargin: spacing.xSmall,
|
|
6
6
|
menuIconFontSize: typography.fontSizeLarge
|
|
7
7
|
};
|
|
8
|
-
}
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default generateComponentTheme;
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
@@ -17,7 +15,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
17
15
|
|
|
18
16
|
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
19
17
|
|
|
20
|
-
var _react =
|
|
18
|
+
var _react = require("react");
|
|
21
19
|
|
|
22
20
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
23
21
|
|
|
@@ -31,7 +29,7 @@ var _uiTextInput = require("@instructure/ui-text-input");
|
|
|
31
29
|
|
|
32
30
|
var _uiHeading = require("@instructure/ui-heading");
|
|
33
31
|
|
|
34
|
-
var
|
|
32
|
+
var _emotion = require("@instructure/emotion");
|
|
35
33
|
|
|
36
34
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
37
35
|
|
|
@@ -41,19 +39,13 @@ var _instUIMessages = require("../../../common/util/instUIMessages.js");
|
|
|
41
39
|
|
|
42
40
|
var _quizCommon = require("@instructure/quiz-common");
|
|
43
41
|
|
|
42
|
+
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
43
|
+
|
|
44
44
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
45
45
|
|
|
46
46
|
var _dec, _class, _class2, _temp;
|
|
47
47
|
|
|
48
|
-
var
|
|
49
|
-
componentId: 'fTWio',
|
|
50
|
-
template: function template(theme) {
|
|
51
|
-
return "\n\n.fTWio_detV{flex:1 1 auto;font-size:".concat(theme.bankNameInputFontSize || 'inherit', ";padding:").concat(theme.bankNamePadding || 'inherit', ";text-overflow:ellipsis;white-space:nowrap}\n\n.fTWio_rOsj{padding:").concat(theme.bankNameLabelPadding || 'inherit', "}");
|
|
52
|
-
},
|
|
53
|
-
'bankNameInput': 'fTWio_detV',
|
|
54
|
-
'bankNameLabel': 'fTWio_rOsj'
|
|
55
|
-
};
|
|
56
|
-
var CreateBankModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
48
|
+
var CreateBankModal = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
57
49
|
(0, _inherits2.default)(CreateBankModal, _Component);
|
|
58
50
|
|
|
59
51
|
var _super = (0, _createSuper2.default)(CreateBankModal);
|
|
@@ -130,16 +122,15 @@ var CreateBankModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
130
122
|
(0, _createClass2.default)(CreateBankModal, [{
|
|
131
123
|
key: "cancelButton",
|
|
132
124
|
value: function cancelButton() {
|
|
133
|
-
return
|
|
125
|
+
return (0, _emotion.jsx)(_uiButtons.Button, {
|
|
134
126
|
onClick: this.closeAction,
|
|
135
|
-
className: styles.footerButtonWrapper,
|
|
136
127
|
margin: _quizCommon.XSMALL_SIDE_MARGIN
|
|
137
128
|
}, (0, _formatMessage.default)('Cancel'));
|
|
138
129
|
}
|
|
139
130
|
}, {
|
|
140
131
|
key: "createBankButton",
|
|
141
132
|
value: function createBankButton() {
|
|
142
|
-
return
|
|
133
|
+
return (0, _emotion.jsx)(_uiButtons.Button, {
|
|
143
134
|
type: "button",
|
|
144
135
|
color: "primary",
|
|
145
136
|
onClick: this.continueAction,
|
|
@@ -150,13 +141,13 @@ var CreateBankModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
150
141
|
}, {
|
|
151
142
|
key: "renderContent",
|
|
152
143
|
value: function renderContent() {
|
|
153
|
-
return
|
|
154
|
-
|
|
155
|
-
},
|
|
144
|
+
return (0, _emotion.jsx)("div", {
|
|
145
|
+
css: this.props.styles.bankNameInput
|
|
146
|
+
}, (0, _emotion.jsx)(_uiTextInput.TextInput, {
|
|
156
147
|
messages: this.getErrors(),
|
|
157
148
|
onChange: this.onNameChange,
|
|
158
|
-
renderLabel:
|
|
159
|
-
|
|
149
|
+
renderLabel: (0, _emotion.jsx)("div", {
|
|
150
|
+
css: this.props.styles.bankNameLabel
|
|
160
151
|
}, (0, _formatMessage.default)('Bank Name')),
|
|
161
152
|
type: "text",
|
|
162
153
|
placeholder: (0, _formatMessage.default)('Enter a name...'),
|
|
@@ -175,10 +166,10 @@ var CreateBankModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
175
166
|
var label = (0, _formatMessage.default)('Share with { courseName }', {
|
|
176
167
|
courseName: this.props.itemBanksScope.title
|
|
177
168
|
});
|
|
178
|
-
return
|
|
169
|
+
return (0, _emotion.jsx)(_uiView.View, {
|
|
179
170
|
margin: "medium 0 0 0",
|
|
180
171
|
as: "div"
|
|
181
|
-
},
|
|
172
|
+
}, (0, _emotion.jsx)(_uiCheckbox.Checkbox, {
|
|
182
173
|
label: label,
|
|
183
174
|
checked: this.state.shareWithCourse,
|
|
184
175
|
onChange: this.toggleCheckbox
|
|
@@ -187,21 +178,21 @@ var CreateBankModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
187
178
|
}, {
|
|
188
179
|
key: "render",
|
|
189
180
|
value: function render() {
|
|
190
|
-
return
|
|
181
|
+
return (0, _emotion.jsx)(_quizCommon.Modal, {
|
|
191
182
|
open: this.props.modalOpen,
|
|
192
183
|
onDismiss: this.closeAction,
|
|
193
184
|
size: "small",
|
|
194
185
|
label: (0, _formatMessage.default)('Item Bank'),
|
|
195
186
|
"data-automation": "sdk-create-bank-modal"
|
|
196
|
-
},
|
|
187
|
+
}, (0, _emotion.jsx)(_quizCommon.ModalHeader, null, (0, _emotion.jsx)(_uiHeading.Heading, {
|
|
197
188
|
level: "reset",
|
|
198
189
|
as: "h2"
|
|
199
|
-
}, (0, _formatMessage.default)('New Item Bank')),
|
|
190
|
+
}, (0, _formatMessage.default)('New Item Bank')), (0, _emotion.jsx)(_uiButtons.CloseButton, {
|
|
200
191
|
onClick: this.closeAction,
|
|
201
192
|
placement: "end",
|
|
202
193
|
offset: "medium",
|
|
203
194
|
screenReaderLabel: (0, _formatMessage.default)('Close')
|
|
204
|
-
})),
|
|
195
|
+
})), (0, _emotion.jsx)(_quizCommon.ModalBody, null, this.renderContent()), (0, _emotion.jsx)(_quizCommon.ModalFooter, null, this.cancelButton(), this.createBankButton()));
|
|
205
196
|
}
|
|
206
197
|
}]);
|
|
207
198
|
CreateBankModal.displayName = "CreateBankModal";
|
|
@@ -225,7 +216,9 @@ var CreateBankModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
225
216
|
type: _propTypes.default.string,
|
|
226
217
|
uuid: _propTypes.default.string,
|
|
227
218
|
title: _propTypes.default.string
|
|
228
|
-
})
|
|
219
|
+
}),
|
|
220
|
+
// eslint-disable-next-line react/require-default-props,react/forbid-prop-types
|
|
221
|
+
styles: _propTypes.default.object
|
|
229
222
|
}, _class2.defaultProps = {
|
|
230
223
|
displayError: false,
|
|
231
224
|
modalTrigger: null,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
9
|
+
return {
|
|
10
|
+
bankNameInput: {
|
|
11
|
+
flex: '1 1 auto',
|
|
12
|
+
fontSize: componentTheme.bankNameInputFontSize,
|
|
13
|
+
whiteSpace: 'nowrap',
|
|
14
|
+
textOverflow: 'ellipsis',
|
|
15
|
+
padding: componentTheme.bankNamePadding
|
|
16
|
+
},
|
|
17
|
+
bankNameLabel: {
|
|
18
|
+
padding: componentTheme.bankNameLabelPadding
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
var _default = generateStyle;
|
|
24
|
+
exports.default = _default;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default =
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
function
|
|
8
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
9
9
|
var typography = _ref.typography,
|
|
10
10
|
spacing = _ref.spacing;
|
|
11
11
|
return {
|
|
@@ -13,4 +13,7 @@ function generator(_ref) {
|
|
|
13
13
|
bankNamePadding: spacing.xSmall,
|
|
14
14
|
bankNameLabelPadding: spacing.xSmall
|
|
15
15
|
};
|
|
16
|
-
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
var _default = generateComponentTheme;
|
|
19
|
+
exports.default = _default;
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
@@ -17,7 +15,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
17
15
|
|
|
18
16
|
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
19
17
|
|
|
20
|
-
var _react =
|
|
18
|
+
var _react = require("react");
|
|
21
19
|
|
|
22
20
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
23
21
|
|
|
@@ -27,7 +25,7 @@ var _uiTextInput = require("@instructure/ui-text-input");
|
|
|
27
25
|
|
|
28
26
|
var _uiHeading = require("@instructure/ui-heading");
|
|
29
27
|
|
|
30
|
-
var
|
|
28
|
+
var _emotion = require("@instructure/emotion");
|
|
31
29
|
|
|
32
30
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
33
31
|
|
|
@@ -37,18 +35,13 @@ var _quizCommon = require("@instructure/quiz-common");
|
|
|
37
35
|
|
|
38
36
|
var _Bank = _interopRequireDefault(require("../../../common/records/Bank.js"));
|
|
39
37
|
|
|
38
|
+
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
39
|
+
|
|
40
40
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
41
41
|
|
|
42
42
|
var _dec, _class, _class2, _temp;
|
|
43
43
|
|
|
44
|
-
var
|
|
45
|
-
componentId: 'cvAov',
|
|
46
|
-
template: function template(theme) {
|
|
47
|
-
return "\n\n.cvAov_detV{flex:1 1 auto;font-size:".concat(theme.bankNameInputFontSize || 'inherit', ";padding:0 ").concat(theme.bankNameInputFontSize || 'inherit', ";text-overflow:ellipsis;white-space:nowrap}");
|
|
48
|
-
},
|
|
49
|
-
'bankNameInput': 'cvAov_detV'
|
|
50
|
-
};
|
|
51
|
-
var EditBankModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
44
|
+
var EditBankModal = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
52
45
|
(0, _inherits2.default)(EditBankModal, _Component);
|
|
53
46
|
|
|
54
47
|
var _super = (0, _createSuper2.default)(EditBankModal);
|
|
@@ -106,16 +99,15 @@ var EditBankModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles),
|
|
|
106
99
|
(0, _createClass2.default)(EditBankModal, [{
|
|
107
100
|
key: "renderCancelButton",
|
|
108
101
|
value: function renderCancelButton() {
|
|
109
|
-
return
|
|
102
|
+
return (0, _emotion.jsx)(_uiButtons.Button, {
|
|
110
103
|
onClick: this.closeAction,
|
|
111
|
-
className: styles.footerButtonWrapper,
|
|
112
104
|
margin: _quizCommon.XSMALL_SIDE_MARGIN
|
|
113
105
|
}, (0, _formatMessage.default)('Cancel'));
|
|
114
106
|
}
|
|
115
107
|
}, {
|
|
116
108
|
key: "renderSaveButton",
|
|
117
109
|
value: function renderSaveButton() {
|
|
118
|
-
return
|
|
110
|
+
return (0, _emotion.jsx)(_uiButtons.Button, {
|
|
119
111
|
type: "button",
|
|
120
112
|
color: "primary",
|
|
121
113
|
onClick: this.continueAction,
|
|
@@ -126,15 +118,13 @@ var EditBankModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles),
|
|
|
126
118
|
}, {
|
|
127
119
|
key: "renderContent",
|
|
128
120
|
value: function renderContent() {
|
|
129
|
-
return
|
|
130
|
-
|
|
131
|
-
},
|
|
121
|
+
return (0, _emotion.jsx)("div", {
|
|
122
|
+
css: this.props.styles.bankNameInput
|
|
123
|
+
}, (0, _emotion.jsx)(_uiTextInput.TextInput, {
|
|
132
124
|
value: this.props.workingBank.title,
|
|
133
125
|
messages: this.getErrors(),
|
|
134
126
|
onChange: this.onNameChange,
|
|
135
|
-
renderLabel:
|
|
136
|
-
className: styles.bankNameLabel
|
|
137
|
-
}, (0, _formatMessage.default)('Bank Name')),
|
|
127
|
+
renderLabel: (0, _emotion.jsx)("div", null, (0, _formatMessage.default)('Bank Name')),
|
|
138
128
|
type: "text",
|
|
139
129
|
placeholder: (0, _formatMessage.default)('Enter a name...'),
|
|
140
130
|
"data-automation": "sdk-edit-bank-name-textinput"
|
|
@@ -143,21 +133,21 @@ var EditBankModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles),
|
|
|
143
133
|
}, {
|
|
144
134
|
key: "render",
|
|
145
135
|
value: function render() {
|
|
146
|
-
return
|
|
136
|
+
return (0, _emotion.jsx)(_quizCommon.Modal, {
|
|
147
137
|
open: this.props.modalOpen,
|
|
148
138
|
onDismiss: this.closeAction,
|
|
149
139
|
size: "small",
|
|
150
140
|
label: (0, _formatMessage.default)('Item Bank'),
|
|
151
141
|
"data-automation": "sdk-edit-bank-modal"
|
|
152
|
-
},
|
|
142
|
+
}, (0, _emotion.jsx)(_quizCommon.ModalHeader, null, (0, _emotion.jsx)(_uiHeading.Heading, {
|
|
153
143
|
level: "reset",
|
|
154
144
|
as: "h2"
|
|
155
|
-
}, (0, _formatMessage.default)('Edit Item Bank')),
|
|
145
|
+
}, (0, _formatMessage.default)('Edit Item Bank')), (0, _emotion.jsx)(_uiButtons.CloseButton, {
|
|
156
146
|
onClick: this.closeAction,
|
|
157
147
|
placement: "end",
|
|
158
148
|
offset: "medium",
|
|
159
149
|
screenReaderLabel: (0, _formatMessage.default)('Close')
|
|
160
|
-
})),
|
|
150
|
+
})), (0, _emotion.jsx)(_quizCommon.ModalBody, null, this.renderContent()), (0, _emotion.jsx)(_quizCommon.ModalFooter, null, this.renderCancelButton(), this.renderSaveButton()));
|
|
161
151
|
}
|
|
162
152
|
}]);
|
|
163
153
|
EditBankModal.displayName = "EditBankModal";
|
|
@@ -173,7 +163,9 @@ var EditBankModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles),
|
|
|
173
163
|
clearModifications: _propTypes.default.func.isRequired,
|
|
174
164
|
showError: _propTypes.default.func.isRequired,
|
|
175
165
|
hideError: _propTypes.default.func.isRequired,
|
|
176
|
-
closeModal: _propTypes.default.func.isRequired
|
|
166
|
+
closeModal: _propTypes.default.func.isRequired,
|
|
167
|
+
// eslint-disable-next-line react/require-default-props,react/forbid-prop-types
|
|
168
|
+
styles: _propTypes.default.object
|
|
177
169
|
}, _class2.defaultProps = {
|
|
178
170
|
displayError: false,
|
|
179
171
|
modalTrigger: null
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
9
|
+
return {
|
|
10
|
+
bankNameInput: {
|
|
11
|
+
flex: '1 1 auto',
|
|
12
|
+
fontSize: componentTheme.bankNameInputFontSize,
|
|
13
|
+
whiteSpace: 'nowrap',
|
|
14
|
+
textOverflow: 'ellipsis',
|
|
15
|
+
padding: "0 ".concat(componentTheme.bankNameInputFontSize)
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
var _default = generateStyle;
|
|
21
|
+
exports.default = _default;
|
|
@@ -3,13 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default =
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
function
|
|
8
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
9
9
|
var typography = _ref.typography,
|
|
10
10
|
spacing = _ref.spacing;
|
|
11
11
|
return {
|
|
12
12
|
bankNameInputFontSize: typography.fontSizeMedium,
|
|
13
13
|
bankNameInputPadding: spacing.xSmall
|
|
14
14
|
};
|
|
15
|
-
}
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var _default = generateComponentTheme;
|
|
18
|
+
exports.default = _default;
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
@@ -17,7 +15,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
17
15
|
|
|
18
16
|
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
19
17
|
|
|
20
|
-
var _react =
|
|
18
|
+
var _react = require("react");
|
|
21
19
|
|
|
22
20
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
23
21
|
|
|
@@ -29,26 +27,21 @@ var _uiButtons = require("@instructure/ui-buttons");
|
|
|
29
27
|
|
|
30
28
|
var _uiIcons = require("@instructure/ui-icons");
|
|
31
29
|
|
|
32
|
-
var
|
|
30
|
+
var _emotion = require("@instructure/emotion");
|
|
33
31
|
|
|
34
32
|
var _index = _interopRequireDefault(require("../../../building/components/QTIImportModal/index.js"));
|
|
35
33
|
|
|
36
34
|
var _quizCommon = require("@instructure/quiz-common");
|
|
37
35
|
|
|
36
|
+
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
37
|
+
|
|
38
38
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
39
39
|
|
|
40
40
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
41
41
|
|
|
42
42
|
var _dec, _class, _class2, _temp;
|
|
43
43
|
|
|
44
|
-
var
|
|
45
|
-
componentId: 'HITck',
|
|
46
|
-
template: function template(theme) {
|
|
47
|
-
return "\n\n.HITck_cLWx{font-size:".concat(theme.menuIconFontSize || 'inherit', ";margin-right:").concat(theme.menuIconMargin || 'inherit', ";vertical-align:middle}");
|
|
48
|
-
},
|
|
49
|
-
'menuIcon': 'HITck_cLWx'
|
|
50
|
-
};
|
|
51
|
-
var HeaderMenu = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
44
|
+
var HeaderMenu = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
52
45
|
(0, _inherits2.default)(HeaderMenu, _Component);
|
|
53
46
|
|
|
54
47
|
var _super = (0, _createSuper2.default)(HeaderMenu);
|
|
@@ -61,19 +54,19 @@ var HeaderMenu = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _d
|
|
|
61
54
|
(0, _createClass2.default)(HeaderMenu, [{
|
|
62
55
|
key: "renderMenu",
|
|
63
56
|
value: function renderMenu() {
|
|
64
|
-
return
|
|
65
|
-
trigger:
|
|
57
|
+
return (0, _emotion.jsx)(_uiMenu.Menu, {
|
|
58
|
+
trigger: (0, _emotion.jsx)(_uiButtons.IconButton, {
|
|
66
59
|
renderIcon: _uiIcons.IconMoreSolid,
|
|
67
60
|
withBackground: false,
|
|
68
61
|
withBorder: false,
|
|
69
62
|
screenReaderLabel: (0, _formatMessage.default)('More Item Banking Actions')
|
|
70
63
|
})
|
|
71
|
-
},
|
|
64
|
+
}, (0, _emotion.jsx)(_uiMenu.Menu.Item, {
|
|
72
65
|
key: "import",
|
|
73
66
|
disabled: !this.props.bank.canImport(),
|
|
74
67
|
onSelect: this.props.openImportModal
|
|
75
|
-
},
|
|
76
|
-
|
|
68
|
+
}, (0, _emotion.jsx)(_uiIcons.IconImportLine, {
|
|
69
|
+
css: this.props.styles.menuIcon,
|
|
77
70
|
"data-automation": "sdk-headermenu-import-content"
|
|
78
71
|
}), (0, _formatMessage.default)('Import Content')));
|
|
79
72
|
}
|
|
@@ -81,7 +74,7 @@ var HeaderMenu = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _d
|
|
|
81
74
|
key: "render",
|
|
82
75
|
value: function render() {
|
|
83
76
|
var bank = this.props.bank;
|
|
84
|
-
return
|
|
77
|
+
return (0, _emotion.jsx)("div", null, this.renderMenu(), (0, _emotion.jsx)(_index.default, {
|
|
85
78
|
parentId: bank.id,
|
|
86
79
|
parentType: _quizCommon.PARENT_TYPE_BANK,
|
|
87
80
|
qtiImport: bank.getLatestImport(),
|
|
@@ -93,7 +86,9 @@ var HeaderMenu = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _d
|
|
|
93
86
|
return HeaderMenu;
|
|
94
87
|
}(_react.Component), _class2.propTypes = {
|
|
95
88
|
openImportModal: _propTypes.default.func.isRequired,
|
|
96
|
-
bank: _reactImmutableProptypes.default.record.isRequired
|
|
89
|
+
bank: _reactImmutableProptypes.default.record.isRequired,
|
|
90
|
+
// eslint-disable-next-line react/require-default-props,react/forbid-prop-types
|
|
91
|
+
styles: _propTypes.default.object
|
|
97
92
|
}, _temp)) || _class);
|
|
98
93
|
exports.HeaderMenu = HeaderMenu;
|
|
99
94
|
var _default = HeaderMenu;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
9
|
+
return {
|
|
10
|
+
menuIcon: {
|
|
11
|
+
verticalAlign: 'middle',
|
|
12
|
+
marginRight: componentTheme.menuIconMargin,
|
|
13
|
+
fontSize: componentTheme.menuIconFontSize
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
var _default = generateStyle;
|
|
19
|
+
exports.default = _default;
|
|
@@ -3,13 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default =
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
function
|
|
8
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
9
9
|
var spacing = _ref.spacing,
|
|
10
10
|
typography = _ref.typography;
|
|
11
11
|
return {
|
|
12
12
|
menuIconMargin: spacing.xSmall,
|
|
13
13
|
menuIconFontSize: typography.fontSizeLarge
|
|
14
14
|
};
|
|
15
|
-
}
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var _default = generateComponentTheme;
|
|
18
|
+
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "20.1.1-rc.
|
|
3
|
+
"version": "20.1.1-rc.4+126a33012",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The Quiz React SDK by Instructure Inc.",
|
|
6
6
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
@@ -41,62 +41,62 @@
|
|
|
41
41
|
"lib"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@instructure/emotion": "^8.
|
|
44
|
+
"@instructure/emotion": "^8.51.0",
|
|
45
45
|
"@instructure/grading-utils": "^1.0.0",
|
|
46
|
-
"@instructure/outcomes-ui": "^
|
|
47
|
-
"@instructure/quiz-common": "20.1.1-rc.
|
|
48
|
-
"@instructure/quiz-i18n": "20.1.1-rc.
|
|
49
|
-
"@instructure/quiz-interactions": "20.1.1-rc.
|
|
50
|
-
"@instructure/quiz-number-input": "20.1.1-rc.
|
|
51
|
-
"@instructure/quiz-rce": "20.1.1-rc.
|
|
52
|
-
"@instructure/ui-a11y-content": "^8.
|
|
53
|
-
"@instructure/ui-alerts": "^8.
|
|
54
|
-
"@instructure/ui-avatar": "^8.
|
|
55
|
-
"@instructure/ui-billboard": "^8.
|
|
56
|
-
"@instructure/ui-breadcrumb": "^8.
|
|
57
|
-
"@instructure/ui-buttons": "^8.
|
|
58
|
-
"@instructure/ui-checkbox": "^8.
|
|
59
|
-
"@instructure/ui-color-utils": "^8.
|
|
60
|
-
"@instructure/ui-dialog": "^8.
|
|
61
|
-
"@instructure/ui-flex": "^8.
|
|
62
|
-
"@instructure/ui-focusable": "^8.
|
|
63
|
-
"@instructure/ui-form-field": "^8.
|
|
64
|
-
"@instructure/ui-grid": "^8.
|
|
65
|
-
"@instructure/ui-heading": "^8.
|
|
46
|
+
"@instructure/outcomes-ui": "^3.0.0",
|
|
47
|
+
"@instructure/quiz-common": "20.1.1-rc.4+126a33012",
|
|
48
|
+
"@instructure/quiz-i18n": "20.1.1-rc.4+126a33012",
|
|
49
|
+
"@instructure/quiz-interactions": "20.1.1-rc.4+126a33012",
|
|
50
|
+
"@instructure/quiz-number-input": "20.1.1-rc.4+126a33012",
|
|
51
|
+
"@instructure/quiz-rce": "20.1.1-rc.4+126a33012",
|
|
52
|
+
"@instructure/ui-a11y-content": "^8.51.0",
|
|
53
|
+
"@instructure/ui-alerts": "^8.51.0",
|
|
54
|
+
"@instructure/ui-avatar": "^8.51.0",
|
|
55
|
+
"@instructure/ui-billboard": "^8.51.0",
|
|
56
|
+
"@instructure/ui-breadcrumb": "^8.51.0",
|
|
57
|
+
"@instructure/ui-buttons": "^8.51.0",
|
|
58
|
+
"@instructure/ui-checkbox": "^8.51.0",
|
|
59
|
+
"@instructure/ui-color-utils": "^8.51.0",
|
|
60
|
+
"@instructure/ui-dialog": "^8.51.0",
|
|
61
|
+
"@instructure/ui-flex": "^8.51.0",
|
|
62
|
+
"@instructure/ui-focusable": "^8.51.0",
|
|
63
|
+
"@instructure/ui-form-field": "^8.51.0",
|
|
64
|
+
"@instructure/ui-grid": "^8.51.0",
|
|
65
|
+
"@instructure/ui-heading": "^8.51.0",
|
|
66
66
|
"@instructure/ui-i18n": "^7.22.1",
|
|
67
|
-
"@instructure/ui-icons": "^8.
|
|
68
|
-
"@instructure/ui-img": "^8.
|
|
69
|
-
"@instructure/ui-link": "^8.
|
|
70
|
-
"@instructure/ui-list": "^8.
|
|
71
|
-
"@instructure/ui-menu": "^8.
|
|
72
|
-
"@instructure/ui-metric": "^8.
|
|
73
|
-
"@instructure/ui-modal": "^8.
|
|
74
|
-
"@instructure/ui-motion": "^8.
|
|
75
|
-
"@instructure/ui-number-input": "^8.
|
|
76
|
-
"@instructure/ui-overlays": "^8.
|
|
77
|
-
"@instructure/ui-pagination": "^8.
|
|
78
|
-
"@instructure/ui-popover": "^8.
|
|
79
|
-
"@instructure/ui-portal": "^8.
|
|
80
|
-
"@instructure/ui-progress": "^8.
|
|
81
|
-
"@instructure/ui-prop-types": "^8.
|
|
82
|
-
"@instructure/ui-radio-input": "^8.
|
|
83
|
-
"@instructure/ui-react-utils": "^8.
|
|
84
|
-
"@instructure/ui-select": "^8.
|
|
85
|
-
"@instructure/ui-simple-select": "^8.
|
|
86
|
-
"@instructure/ui-spinner": "^8.
|
|
87
|
-
"@instructure/ui-table": "^8.
|
|
88
|
-
"@instructure/ui-tabs": "^8.
|
|
89
|
-
"@instructure/ui-tag": "^8.
|
|
90
|
-
"@instructure/ui-text": "^8.
|
|
91
|
-
"@instructure/ui-text-input": "^8.
|
|
67
|
+
"@instructure/ui-icons": "^8.51.0",
|
|
68
|
+
"@instructure/ui-img": "^8.51.0",
|
|
69
|
+
"@instructure/ui-link": "^8.51.0",
|
|
70
|
+
"@instructure/ui-list": "^8.51.0",
|
|
71
|
+
"@instructure/ui-menu": "^8.51.0",
|
|
72
|
+
"@instructure/ui-metric": "^8.51.0",
|
|
73
|
+
"@instructure/ui-modal": "^8.51.0",
|
|
74
|
+
"@instructure/ui-motion": "^8.51.0",
|
|
75
|
+
"@instructure/ui-number-input": "^8.51.0",
|
|
76
|
+
"@instructure/ui-overlays": "^8.51.0",
|
|
77
|
+
"@instructure/ui-pagination": "^8.51.0",
|
|
78
|
+
"@instructure/ui-popover": "^8.51.0",
|
|
79
|
+
"@instructure/ui-portal": "^8.51.0",
|
|
80
|
+
"@instructure/ui-progress": "^8.51.0",
|
|
81
|
+
"@instructure/ui-prop-types": "^8.51.0",
|
|
82
|
+
"@instructure/ui-radio-input": "^8.51.0",
|
|
83
|
+
"@instructure/ui-react-utils": "^8.51.0",
|
|
84
|
+
"@instructure/ui-select": "^8.51.0",
|
|
85
|
+
"@instructure/ui-simple-select": "^8.51.0",
|
|
86
|
+
"@instructure/ui-spinner": "^8.51.0",
|
|
87
|
+
"@instructure/ui-table": "^8.51.0",
|
|
88
|
+
"@instructure/ui-tabs": "^8.51.0",
|
|
89
|
+
"@instructure/ui-tag": "^8.51.0",
|
|
90
|
+
"@instructure/ui-text": "^8.51.0",
|
|
91
|
+
"@instructure/ui-text-input": "^8.51.0",
|
|
92
92
|
"@instructure/ui-themeable": "^7.22.1",
|
|
93
|
-
"@instructure/ui-themes": "^8.
|
|
94
|
-
"@instructure/ui-toggle-details": "^8.
|
|
95
|
-
"@instructure/ui-tooltip": "^8.
|
|
96
|
-
"@instructure/ui-tray": "^8.
|
|
97
|
-
"@instructure/ui-truncate-text": "^8.
|
|
98
|
-
"@instructure/ui-utils": "^8.
|
|
99
|
-
"@instructure/ui-view": "^8.
|
|
93
|
+
"@instructure/ui-themes": "^8.51.0",
|
|
94
|
+
"@instructure/ui-toggle-details": "^8.51.0",
|
|
95
|
+
"@instructure/ui-tooltip": "^8.51.0",
|
|
96
|
+
"@instructure/ui-tray": "^8.51.0",
|
|
97
|
+
"@instructure/ui-truncate-text": "^8.51.0",
|
|
98
|
+
"@instructure/ui-utils": "^8.51.0",
|
|
99
|
+
"@instructure/ui-view": "^8.51.0",
|
|
100
100
|
"aws-sdk": "^2.3.2",
|
|
101
101
|
"classnames": "^2.2.5",
|
|
102
102
|
"content-disposition": "^0.5.2",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"file-saver": "~2.0.5",
|
|
111
111
|
"humps": "^2.0.0",
|
|
112
112
|
"immutable": "^3.8.1",
|
|
113
|
-
"instructure-validations": "20.1.1-rc.
|
|
113
|
+
"instructure-validations": "20.1.1-rc.4+126a33012",
|
|
114
114
|
"ipaddr.js": "^1.5.4",
|
|
115
115
|
"isomorphic-fetch": "^2.2.0",
|
|
116
116
|
"isuuid": "^0.1.0",
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
},
|
|
144
144
|
"devDependencies": {
|
|
145
145
|
"@instructure/quiz-scripts": "20.1.0",
|
|
146
|
-
"@instructure/ui-axe-check": "^8.
|
|
146
|
+
"@instructure/ui-axe-check": "^8.51.0",
|
|
147
147
|
"@instructure/ui-babel-preset": "^7.22.1",
|
|
148
148
|
"@instructure/ui-karma-config": "^7.22.1",
|
|
149
149
|
"@instructure/ui-postcss-config": "^7.22.1",
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
"intl": "^1.2.4",
|
|
163
163
|
"jquery": "^2.2.3",
|
|
164
164
|
"most-subject": "^5.3.0",
|
|
165
|
-
"quiz-presets": "20.1.1-rc.
|
|
165
|
+
"quiz-presets": "20.1.1-rc.4+126a33012",
|
|
166
166
|
"react": "^16.8.6",
|
|
167
167
|
"react-addons-test-utils": "^15.6.2",
|
|
168
168
|
"react-dom": "^16.8.6",
|
|
@@ -178,5 +178,5 @@
|
|
|
178
178
|
"publishConfig": {
|
|
179
179
|
"access": "public"
|
|
180
180
|
},
|
|
181
|
-
"gitHead": "
|
|
181
|
+
"gitHead": "126a33012ebfa161cfd4bc62fc26dad01b99e93b"
|
|
182
182
|
}
|