@instructure/quiz-core 20.31.2-snapshot.21 → 20.31.2-snapshot.23
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/BanksList/index.js +1 -3
- package/es/banks/components/BanksList/presenter.js +16 -19
- package/es/common/components/layout/Page/index.js +4 -2
- package/es/common/components/layout/sidebar/Sidebar/index.js +2 -1
- package/lib/banks/components/BanksList/index.js +1 -3
- package/lib/banks/components/BanksList/presenter.js +16 -19
- package/lib/common/components/layout/Page/index.js +4 -2
- package/lib/common/components/layout/sidebar/Sidebar/index.js +2 -1
- package/package.json +9 -9
|
@@ -4,7 +4,6 @@ import BanksList from "./presenter.js";
|
|
|
4
4
|
import Bank from "../../../common/records/Bank.js";
|
|
5
5
|
import { openModal, withConfirm } from "../../../common/actions/modal.js";
|
|
6
6
|
import { deleteBank, createBankCloneJob } from "../../api/banks.js";
|
|
7
|
-
import { featureOn } from "../../../common/util/featureCheck.js";
|
|
8
7
|
import { addInfo } from "../../../common/actions/alerts.js";
|
|
9
8
|
import { addToPolling } from "../../api/copyingBanksPoller.js";
|
|
10
9
|
export function mapStateToProps(state, props) {
|
|
@@ -12,8 +11,7 @@ export function mapStateToProps(state, props) {
|
|
|
12
11
|
appContainer: state.getIn(['ui', 'appContainer']),
|
|
13
12
|
banks: List(props.recordIds).map(function (id) {
|
|
14
13
|
return Bank.create(state.getIn(['banks', id]));
|
|
15
|
-
})
|
|
16
|
-
duplicateItemBanks: featureOn('duplicate_item_banks')
|
|
14
|
+
})
|
|
17
15
|
};
|
|
18
16
|
}
|
|
19
17
|
export default connect(mapStateToProps, {
|
|
@@ -263,21 +263,6 @@ export var BanksList = (_dec = withStyle(generateStyle, generateComponentTheme),
|
|
|
263
263
|
name: bank.title
|
|
264
264
|
})
|
|
265
265
|
}));
|
|
266
|
-
var duplicateBankOption = jsx(IconButton, {
|
|
267
|
-
onClick: _this.openDuplicateBankModal(bank),
|
|
268
|
-
name: "Duplicate",
|
|
269
|
-
size: "small",
|
|
270
|
-
"data-automation": "sdk-duplicate-bank-button",
|
|
271
|
-
renderIcon: IconCopyLine,
|
|
272
|
-
withBackground: false,
|
|
273
|
-
withBorder: false,
|
|
274
|
-
title: t('Duplicate bank {name}', {
|
|
275
|
-
name: bank.title
|
|
276
|
-
}),
|
|
277
|
-
screenReaderLabel: t('Duplicate bank {name}', {
|
|
278
|
-
name: bank.title
|
|
279
|
-
})
|
|
280
|
-
});
|
|
281
266
|
if (bank.status === 'copying') {
|
|
282
267
|
return jsx("div", {
|
|
283
268
|
css: _this.props.styles.bankOptions
|
|
@@ -289,7 +274,21 @@ export var BanksList = (_dec = withStyle(generateStyle, generateComponentTheme),
|
|
|
289
274
|
} else {
|
|
290
275
|
return jsx("div", {
|
|
291
276
|
css: _this.props.styles.bankOptions
|
|
292
|
-
},
|
|
277
|
+
}, jsx(IconButton, {
|
|
278
|
+
onClick: _this.openDuplicateBankModal(bank),
|
|
279
|
+
name: "Duplicate",
|
|
280
|
+
size: "small",
|
|
281
|
+
"data-automation": "sdk-duplicate-bank-button",
|
|
282
|
+
renderIcon: IconCopyLine,
|
|
283
|
+
withBackground: false,
|
|
284
|
+
withBorder: false,
|
|
285
|
+
title: t('Duplicate bank {name}', {
|
|
286
|
+
name: bank.title
|
|
287
|
+
}),
|
|
288
|
+
screenReaderLabel: t('Duplicate bank {name}', {
|
|
289
|
+
name: bank.title
|
|
290
|
+
})
|
|
291
|
+
}), jsx(IfFeature, {
|
|
293
292
|
name: "item_bank_sharing"
|
|
294
293
|
}, jsx(IconButton, {
|
|
295
294
|
onClick: _this.openSharingModal(bank),
|
|
@@ -479,7 +478,6 @@ export var BanksList = (_dec = withStyle(generateStyle, generateComponentTheme),
|
|
|
479
478
|
}),
|
|
480
479
|
focusCreateBankButton: PropTypes.func.isRequired,
|
|
481
480
|
deleteBank: PropTypes.func.isRequired,
|
|
482
|
-
duplicateItemBanks: PropTypes.bool,
|
|
483
481
|
getCourseInfo: PropTypes.func,
|
|
484
482
|
getUserInfo: PropTypes.func,
|
|
485
483
|
getShareableCourses: PropTypes.func,
|
|
@@ -503,8 +501,7 @@ export var BanksList = (_dec = withStyle(generateStyle, generateComponentTheme),
|
|
|
503
501
|
minChars: void 0,
|
|
504
502
|
locale: null,
|
|
505
503
|
timezone: null,
|
|
506
|
-
onShare: function onShare() {}
|
|
507
|
-
duplicateItemBanks: false
|
|
504
|
+
onShare: function onShare() {}
|
|
508
505
|
}, _BanksList.contextTypes = {
|
|
509
506
|
locale: PropTypes.string,
|
|
510
507
|
timezone: PropTypes.string
|
|
@@ -9,6 +9,7 @@ import PropTypes from 'prop-types';
|
|
|
9
9
|
import { withStyle, jsx } from '@instructure/emotion';
|
|
10
10
|
import generateStyle from "./styles.js";
|
|
11
11
|
import generateComponentTheme from "./theme.js";
|
|
12
|
+
import t from '@instructure/quiz-i18n/es/format-message';
|
|
12
13
|
export var Page = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_Page = /*#__PURE__*/function (_Component) {
|
|
13
14
|
_inherits(Page, _Component);
|
|
14
15
|
var _super = _createSuper(Page);
|
|
@@ -50,7 +51,8 @@ export var Page = (_dec = withStyle(generateStyle, generateComponentTheme), _dec
|
|
|
50
51
|
tabIndex: "-1",
|
|
51
52
|
ref: this.props.childrenWrapperRef,
|
|
52
53
|
role: this.props.contentRole,
|
|
53
|
-
css: this.props.styles.childrenWrapper
|
|
54
|
+
css: this.props.styles.childrenWrapper,
|
|
55
|
+
"aria-label": t('Quiz content')
|
|
54
56
|
}, this.props.children));
|
|
55
57
|
}
|
|
56
58
|
}]);
|
|
@@ -68,7 +70,7 @@ export var Page = (_dec = withStyle(generateStyle, generateComponentTheme), _dec
|
|
|
68
70
|
makeStyles: PropTypes.func
|
|
69
71
|
}, _Page.defaultProps = {
|
|
70
72
|
childrenWrapperRef: function childrenWrapperRef() {},
|
|
71
|
-
contentRole: '
|
|
73
|
+
contentRole: 'region',
|
|
72
74
|
sidebarComponent: null,
|
|
73
75
|
sidebarOpen: null,
|
|
74
76
|
sidebarRole: 'navigation',
|
|
@@ -290,7 +290,8 @@ export var Sidebar = (_dec = withStyle(generateStyle, generateComponentTheme), _
|
|
|
290
290
|
// take the click and scroll to itself when the nav is clicked by SR
|
|
291
291
|
,
|
|
292
292
|
onClick: noop,
|
|
293
|
-
id: SIDEBAR_NAV_ID
|
|
293
|
+
id: SIDEBAR_NAV_ID,
|
|
294
|
+
"aria-label": t('Question Navigator')
|
|
294
295
|
}, this.renderSidebarHeader(), this.renderTotalPointsPossible(), this.renderPinned(), this.renderTitle(), this.renderInstructions(), this.renderResults(), jsx("div", {
|
|
295
296
|
css: this.props.styles.sidebarContent
|
|
296
297
|
}, this.props.children)))));
|
|
@@ -12,7 +12,6 @@ var _presenter = _interopRequireDefault(require("./presenter.js"));
|
|
|
12
12
|
var _Bank = _interopRequireDefault(require("../../../common/records/Bank.js"));
|
|
13
13
|
var _modal = require("../../../common/actions/modal.js");
|
|
14
14
|
var _banks = require("../../api/banks.js");
|
|
15
|
-
var _featureCheck = require("../../../common/util/featureCheck.js");
|
|
16
15
|
var _alerts = require("../../../common/actions/alerts.js");
|
|
17
16
|
var _copyingBanksPoller = require("../../api/copyingBanksPoller.js");
|
|
18
17
|
function mapStateToProps(state, props) {
|
|
@@ -20,8 +19,7 @@ function mapStateToProps(state, props) {
|
|
|
20
19
|
appContainer: state.getIn(['ui', 'appContainer']),
|
|
21
20
|
banks: (0, _immutable.List)(props.recordIds).map(function (id) {
|
|
22
21
|
return _Bank.default.create(state.getIn(['banks', id]));
|
|
23
|
-
})
|
|
24
|
-
duplicateItemBanks: (0, _featureCheck.featureOn)('duplicate_item_banks')
|
|
22
|
+
})
|
|
25
23
|
};
|
|
26
24
|
}
|
|
27
25
|
var _default = (0, _reactRedux.connect)(mapStateToProps, {
|
|
@@ -271,21 +271,6 @@ var BanksList = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default)
|
|
|
271
271
|
name: bank.title
|
|
272
272
|
})
|
|
273
273
|
}));
|
|
274
|
-
var duplicateBankOption = (0, _emotion.jsx)(_uiButtons.IconButton, {
|
|
275
|
-
onClick: _this.openDuplicateBankModal(bank),
|
|
276
|
-
name: "Duplicate",
|
|
277
|
-
size: "small",
|
|
278
|
-
"data-automation": "sdk-duplicate-bank-button",
|
|
279
|
-
renderIcon: _uiIcons.IconCopyLine,
|
|
280
|
-
withBackground: false,
|
|
281
|
-
withBorder: false,
|
|
282
|
-
title: (0, _formatMessage.default)('Duplicate bank {name}', {
|
|
283
|
-
name: bank.title
|
|
284
|
-
}),
|
|
285
|
-
screenReaderLabel: (0, _formatMessage.default)('Duplicate bank {name}', {
|
|
286
|
-
name: bank.title
|
|
287
|
-
})
|
|
288
|
-
});
|
|
289
274
|
if (bank.status === 'copying') {
|
|
290
275
|
return (0, _emotion.jsx)("div", {
|
|
291
276
|
css: _this.props.styles.bankOptions
|
|
@@ -297,7 +282,21 @@ var BanksList = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default)
|
|
|
297
282
|
} else {
|
|
298
283
|
return (0, _emotion.jsx)("div", {
|
|
299
284
|
css: _this.props.styles.bankOptions
|
|
300
|
-
},
|
|
285
|
+
}, (0, _emotion.jsx)(_uiButtons.IconButton, {
|
|
286
|
+
onClick: _this.openDuplicateBankModal(bank),
|
|
287
|
+
name: "Duplicate",
|
|
288
|
+
size: "small",
|
|
289
|
+
"data-automation": "sdk-duplicate-bank-button",
|
|
290
|
+
renderIcon: _uiIcons.IconCopyLine,
|
|
291
|
+
withBackground: false,
|
|
292
|
+
withBorder: false,
|
|
293
|
+
title: (0, _formatMessage.default)('Duplicate bank {name}', {
|
|
294
|
+
name: bank.title
|
|
295
|
+
}),
|
|
296
|
+
screenReaderLabel: (0, _formatMessage.default)('Duplicate bank {name}', {
|
|
297
|
+
name: bank.title
|
|
298
|
+
})
|
|
299
|
+
}), (0, _emotion.jsx)(_index.default, {
|
|
301
300
|
name: "item_bank_sharing"
|
|
302
301
|
}, (0, _emotion.jsx)(_uiButtons.IconButton, {
|
|
303
302
|
onClick: _this.openSharingModal(bank),
|
|
@@ -487,7 +486,6 @@ var BanksList = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default)
|
|
|
487
486
|
}),
|
|
488
487
|
focusCreateBankButton: _propTypes.default.func.isRequired,
|
|
489
488
|
deleteBank: _propTypes.default.func.isRequired,
|
|
490
|
-
duplicateItemBanks: _propTypes.default.bool,
|
|
491
489
|
getCourseInfo: _propTypes.default.func,
|
|
492
490
|
getUserInfo: _propTypes.default.func,
|
|
493
491
|
getShareableCourses: _propTypes.default.func,
|
|
@@ -511,8 +509,7 @@ var BanksList = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default)
|
|
|
511
509
|
minChars: void 0,
|
|
512
510
|
locale: null,
|
|
513
511
|
timezone: null,
|
|
514
|
-
onShare: function onShare() {}
|
|
515
|
-
duplicateItemBanks: false
|
|
512
|
+
onShare: function onShare() {}
|
|
516
513
|
}, _BanksList.contextTypes = {
|
|
517
514
|
locale: _propTypes.default.string,
|
|
518
515
|
timezone: _propTypes.default.string
|
|
@@ -14,6 +14,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
14
14
|
var _emotion = require("@instructure/emotion");
|
|
15
15
|
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
16
16
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
17
|
+
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
17
18
|
var _dec, _class, _Page;
|
|
18
19
|
/** @jsx jsx */
|
|
19
20
|
var Page = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_Page = /*#__PURE__*/function (_Component) {
|
|
@@ -57,7 +58,8 @@ var Page = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
|
|
|
57
58
|
tabIndex: "-1",
|
|
58
59
|
ref: this.props.childrenWrapperRef,
|
|
59
60
|
role: this.props.contentRole,
|
|
60
|
-
css: this.props.styles.childrenWrapper
|
|
61
|
+
css: this.props.styles.childrenWrapper,
|
|
62
|
+
"aria-label": (0, _formatMessage.default)('Quiz content')
|
|
61
63
|
}, this.props.children));
|
|
62
64
|
}
|
|
63
65
|
}]);
|
|
@@ -75,7 +77,7 @@ var Page = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
|
|
|
75
77
|
makeStyles: _propTypes.default.func
|
|
76
78
|
}, _Page.defaultProps = {
|
|
77
79
|
childrenWrapperRef: function childrenWrapperRef() {},
|
|
78
|
-
contentRole: '
|
|
80
|
+
contentRole: 'region',
|
|
79
81
|
sidebarComponent: null,
|
|
80
82
|
sidebarOpen: null,
|
|
81
83
|
sidebarRole: 'navigation',
|
|
@@ -297,7 +297,8 @@ var Sidebar = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default),
|
|
|
297
297
|
// take the click and scroll to itself when the nav is clicked by SR
|
|
298
298
|
,
|
|
299
299
|
onClick: _noop.default,
|
|
300
|
-
id: _quizCommon.SIDEBAR_NAV_ID
|
|
300
|
+
id: _quizCommon.SIDEBAR_NAV_ID,
|
|
301
|
+
"aria-label": (0, _formatMessage.default)('Question Navigator')
|
|
301
302
|
}, this.renderSidebarHeader(), this.renderTotalPointsPossible(), this.renderPinned(), this.renderTitle(), this.renderInstructions(), this.renderResults(), (0, _emotion.jsx)("div", {
|
|
302
303
|
css: this.props.styles.sidebarContent
|
|
303
304
|
}, this.props.children)))));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "20.31.2-snapshot.
|
|
3
|
+
"version": "20.31.2-snapshot.23+b671f4530",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The Quiz React SDK by Instructure Inc.",
|
|
6
6
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"@instructure/emotion": "^8.56.3",
|
|
47
47
|
"@instructure/grading-utils": "^1.0.0",
|
|
48
48
|
"@instructure/outcomes-ui": "^3.2.2",
|
|
49
|
-
"@instructure/quiz-common": "^20.31.2-snapshot.
|
|
50
|
-
"@instructure/quiz-i18n": "^20.31.2-snapshot.
|
|
51
|
-
"@instructure/quiz-interactions": "^20.31.2-snapshot.
|
|
52
|
-
"@instructure/quiz-number-input": "^20.31.2-snapshot.
|
|
53
|
-
"@instructure/quiz-rce": "^20.31.2-snapshot.
|
|
49
|
+
"@instructure/quiz-common": "^20.31.2-snapshot.23+b671f4530",
|
|
50
|
+
"@instructure/quiz-i18n": "^20.31.2-snapshot.23+b671f4530",
|
|
51
|
+
"@instructure/quiz-interactions": "^20.31.2-snapshot.23+b671f4530",
|
|
52
|
+
"@instructure/quiz-number-input": "^20.31.2-snapshot.23+b671f4530",
|
|
53
|
+
"@instructure/quiz-rce": "^20.31.2-snapshot.23+b671f4530",
|
|
54
54
|
"@instructure/ui-a11y-content": "^8.56.3",
|
|
55
55
|
"@instructure/ui-alerts": "^8.56.3",
|
|
56
56
|
"@instructure/ui-avatar": "^8.56.3",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"file-saver": "~2.0.5",
|
|
115
115
|
"humps": "^2.0.0",
|
|
116
116
|
"immutable": "^3.8.1",
|
|
117
|
-
"instructure-validations": "^20.31.2-snapshot.
|
|
117
|
+
"instructure-validations": "^20.31.2-snapshot.23+b671f4530",
|
|
118
118
|
"ipaddr.js": "^1.5.4",
|
|
119
119
|
"isomorphic-fetch": "^2.2.0",
|
|
120
120
|
"isuuid": "^0.1.0",
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
"jquery": "^2.2.3",
|
|
164
164
|
"karma-junit-reporter": "^2.0.1",
|
|
165
165
|
"most-subject": "^5.3.0",
|
|
166
|
-
"quiz-presets": "^20.31.2-snapshot.
|
|
166
|
+
"quiz-presets": "^20.31.2-snapshot.23+b671f4530",
|
|
167
167
|
"react": "^16.8.6",
|
|
168
168
|
"react-addons-test-utils": "^15.6.2",
|
|
169
169
|
"react-dom": "^16.8.6",
|
|
@@ -179,5 +179,5 @@
|
|
|
179
179
|
"publishConfig": {
|
|
180
180
|
"access": "public"
|
|
181
181
|
},
|
|
182
|
-
"gitHead": "
|
|
182
|
+
"gitHead": "b671f4530b93ebb0970575c2321141af751fcd9a"
|
|
183
183
|
}
|