@instructure/quiz-core 20.18.1-rc.0 → 20.18.1-rc.1

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.
@@ -113,16 +113,19 @@ export var copyBankEntry = function copyBankEntry(sourceBankId, bankEntryId, des
113
113
  source_bank_id: sourceBankId,
114
114
  source_bank_entry_id: bankEntryId
115
115
  };
116
- return copyOrMoveBankEntry(body, destinationBankId, 'copy');
116
+ var followUpActions = [clear("".concat(BANKS_BANK_ENTRY_PAGINATION, ":").concat(destinationBankId))];
117
+ return copyOrMoveBankEntry(body, destinationBankId, 'copy', null, followUpActions);
117
118
  };
118
119
  export var moveBankEntry = function moveBankEntry(sourceBankId, bankEntryId, destinationBankId) {
119
120
  var body = {
120
121
  source_bank_id: sourceBankId,
121
122
  source_bank_entry_id: bankEntryId
122
123
  };
123
- return copyOrMoveBankEntry(body, destinationBankId, 'move');
124
+ var followUpActions = [clear("".concat(BANKS_BANK_ENTRY_PAGINATION, ":").concat(destinationBankId)), clear("".concat(BANKS_BANK_ENTRY_PAGINATION, ":").concat(sourceBankId)), getBank(sourceBankId)];
125
+ return copyOrMoveBankEntry(body, destinationBankId, 'move', null, followUpActions);
124
126
  };
125
127
  export var copyOrMoveBankEntry = function copyOrMoveBankEntry(body, destinationBankId, operation, query_params) {
128
+ var followUpActions = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : [];
126
129
  var url = "/api/banks/".concat(destinationBankId, "/bank_entries/").concat(operation);
127
130
  return function (dispatch, getState) {
128
131
  var fetcher = new Fetcher({
@@ -137,7 +140,7 @@ export var copyOrMoveBankEntry = function copyOrMoveBankEntry(body, destinationB
137
140
  return fetcher.post(url, {
138
141
  body: JSON.stringify(body)
139
142
  }).then(function (response) {
140
- dispatch([handleBankEntryResponse(response), associateEntries(destinationBankId, [response.id]), getBank(destinationBankId)]);
143
+ dispatch([handleBankEntryResponse(response), associateEntries(destinationBankId, [response.id]), getBank(destinationBankId)].concat(_toConsumableArray(followUpActions)));
141
144
  return response;
142
145
  });
143
146
  };
@@ -150,7 +150,8 @@ var copyBankEntry = function copyBankEntry(sourceBankId, bankEntryId, destinatio
150
150
  source_bank_id: sourceBankId,
151
151
  source_bank_entry_id: bankEntryId
152
152
  };
153
- return copyOrMoveBankEntry(body, destinationBankId, 'copy');
153
+ var followUpActions = [(0, _ui.clear)("".concat(_quizCommon.BANKS_BANK_ENTRY_PAGINATION, ":").concat(destinationBankId))];
154
+ return copyOrMoveBankEntry(body, destinationBankId, 'copy', null, followUpActions);
154
155
  };
155
156
 
156
157
  exports.copyBankEntry = copyBankEntry;
@@ -160,12 +161,14 @@ var moveBankEntry = function moveBankEntry(sourceBankId, bankEntryId, destinatio
160
161
  source_bank_id: sourceBankId,
161
162
  source_bank_entry_id: bankEntryId
162
163
  };
163
- return copyOrMoveBankEntry(body, destinationBankId, 'move');
164
+ var followUpActions = [(0, _ui.clear)("".concat(_quizCommon.BANKS_BANK_ENTRY_PAGINATION, ":").concat(destinationBankId)), (0, _ui.clear)("".concat(_quizCommon.BANKS_BANK_ENTRY_PAGINATION, ":").concat(sourceBankId)), (0, _banks2.getBank)(sourceBankId)];
165
+ return copyOrMoveBankEntry(body, destinationBankId, 'move', null, followUpActions);
164
166
  };
165
167
 
166
168
  exports.moveBankEntry = moveBankEntry;
167
169
 
168
170
  var copyOrMoveBankEntry = function copyOrMoveBankEntry(body, destinationBankId, operation, query_params) {
171
+ var followUpActions = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : [];
169
172
  var url = "/api/banks/".concat(destinationBankId, "/bank_entries/").concat(operation);
170
173
  return function (dispatch, getState) {
171
174
  var fetcher = new _Fetcher.default({
@@ -180,7 +183,7 @@ var copyOrMoveBankEntry = function copyOrMoveBankEntry(body, destinationBankId,
180
183
  return fetcher.post(url, {
181
184
  body: JSON.stringify(body)
182
185
  }).then(function (response) {
183
- dispatch([(0, _callHandlers.handleBankEntryResponse)(response), (0, _banks.associateEntries)(destinationBankId, [response.id]), (0, _banks2.getBank)(destinationBankId)]);
186
+ dispatch([(0, _callHandlers.handleBankEntryResponse)(response), (0, _banks.associateEntries)(destinationBankId, [response.id]), (0, _banks2.getBank)(destinationBankId)].concat((0, _toConsumableArray2.default)(followUpActions)));
184
187
  return response;
185
188
  });
186
189
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "20.18.1-rc.0+392e66e66",
3
+ "version": "20.18.1-rc.1+70dd69c4d",
4
4
  "license": "MIT",
5
5
  "description": "The Quiz React SDK by Instructure Inc.",
6
6
  "author": "Instructure, Inc. Engineering and Product Design",
@@ -44,11 +44,11 @@
44
44
  "@instructure/emotion": "^8.51.0",
45
45
  "@instructure/grading-utils": "^1.0.0",
46
46
  "@instructure/outcomes-ui": "^3.2.2",
47
- "@instructure/quiz-common": "20.18.1-rc.0+392e66e66",
48
- "@instructure/quiz-i18n": "20.18.1-rc.0+392e66e66",
49
- "@instructure/quiz-interactions": "20.18.1-rc.0+392e66e66",
50
- "@instructure/quiz-number-input": "20.18.1-rc.0+392e66e66",
51
- "@instructure/quiz-rce": "20.18.1-rc.0+392e66e66",
47
+ "@instructure/quiz-common": "20.18.1-rc.1+70dd69c4d",
48
+ "@instructure/quiz-i18n": "20.18.1-rc.1+70dd69c4d",
49
+ "@instructure/quiz-interactions": "20.18.1-rc.1+70dd69c4d",
50
+ "@instructure/quiz-number-input": "20.18.1-rc.1+70dd69c4d",
51
+ "@instructure/quiz-rce": "20.18.1-rc.1+70dd69c4d",
52
52
  "@instructure/ui-a11y-content": "^8.51.0",
53
53
  "@instructure/ui-alerts": "^8.51.0",
54
54
  "@instructure/ui-avatar": "^8.51.0",
@@ -111,7 +111,7 @@
111
111
  "file-saver": "~2.0.5",
112
112
  "humps": "^2.0.0",
113
113
  "immutable": "^3.8.1",
114
- "instructure-validations": "20.18.1-rc.0+392e66e66",
114
+ "instructure-validations": "20.18.1-rc.1+70dd69c4d",
115
115
  "ipaddr.js": "^1.5.4",
116
116
  "isomorphic-fetch": "^2.2.0",
117
117
  "isuuid": "^0.1.0",
@@ -161,7 +161,7 @@
161
161
  "jquery": "^2.2.3",
162
162
  "karma-junit-reporter": "^2.0.1",
163
163
  "most-subject": "^5.3.0",
164
- "quiz-presets": "20.18.1-rc.0+392e66e66",
164
+ "quiz-presets": "20.18.1-rc.1+70dd69c4d",
165
165
  "react": "^16.8.6",
166
166
  "react-addons-test-utils": "^15.6.2",
167
167
  "react-dom": "^16.8.6",
@@ -177,5 +177,5 @@
177
177
  "publishConfig": {
178
178
  "access": "public"
179
179
  },
180
- "gitHead": "392e66e66be84e073171f29b85edaf54330b3b8f"
180
+ "gitHead": "70dd69c4d96b54c29d5adb229c7d6b7dad4f602c"
181
181
  }