@instructure/quiz-core 20.31.2-snapshot.19 → 20.31.2-snapshot.22

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.
@@ -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
- }, _this.props.duplicateItemBanks ? duplicateBankOption : null, jsx(IfFeature, {
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
@@ -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
- }, _this.props.duplicateItemBanks ? duplicateBankOption : null, (0, _emotion.jsx)(_index.default, {
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "20.31.2-snapshot.19+f13087389",
3
+ "version": "20.31.2-snapshot.22+0ea974b4c",
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.19+f13087389",
50
- "@instructure/quiz-i18n": "^20.31.2-snapshot.19+f13087389",
51
- "@instructure/quiz-interactions": "^20.31.2-snapshot.19+f13087389",
52
- "@instructure/quiz-number-input": "^20.31.2-snapshot.19+f13087389",
53
- "@instructure/quiz-rce": "^20.31.2-snapshot.19+f13087389",
49
+ "@instructure/quiz-common": "^20.31.2-snapshot.22+0ea974b4c",
50
+ "@instructure/quiz-i18n": "^20.31.2-snapshot.22+0ea974b4c",
51
+ "@instructure/quiz-interactions": "^20.31.2-snapshot.22+0ea974b4c",
52
+ "@instructure/quiz-number-input": "^20.31.2-snapshot.22+0ea974b4c",
53
+ "@instructure/quiz-rce": "^20.31.2-snapshot.22+0ea974b4c",
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.19+f13087389",
117
+ "instructure-validations": "^20.31.2-snapshot.22+0ea974b4c",
118
118
  "ipaddr.js": "^1.5.4",
119
119
  "isomorphic-fetch": "^2.2.0",
120
120
  "isuuid": "^0.1.0",
@@ -145,7 +145,7 @@
145
145
  "uuid": "^3.2.1"
146
146
  },
147
147
  "devDependencies": {
148
- "@instructure/quiz-scripts": "^20.33.0",
148
+ "@instructure/quiz-scripts": "^20.34.0",
149
149
  "@instructure/ui-axe-check": "^8.56.3",
150
150
  "@instructure/ui-babel-preset": "^7.22.1",
151
151
  "@instructure/ui-test-utils": "^7.22.1",
@@ -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.19+f13087389",
166
+ "quiz-presets": "^20.31.2-snapshot.22+0ea974b4c",
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": "f1308738924eaedf7350c1db9e9e9f2a300dd7a5"
182
+ "gitHead": "0ea974b4cc0200b59fa970a34f8147ed6262ba97"
183
183
  }