@instructure/quiz-core 20.26.1-snapshot.4 → 20.26.1-snapshot.6
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/building/api/quizzes.js +5 -4
- package/es/common/actions/modifications.js +3 -2
- package/es/common/components/shared/TagWrapper/presenter.js +9 -3
- package/es/index.js +2 -1
- package/lib/building/api/quizzes.js +5 -4
- package/lib/common/actions/modifications.js +3 -2
- package/lib/common/components/shared/TagWrapper/presenter.js +9 -3
- package/lib/index.js +15 -6
- package/package.json +9 -9
|
@@ -231,15 +231,16 @@ export function setFilterIpAddress(quizId, value, completeCb) {
|
|
|
231
231
|
filter_ip_address: Boolean(value)
|
|
232
232
|
}, changeQuizFilterIpAddress(quizId, value), completeCb);
|
|
233
233
|
}
|
|
234
|
-
export function setIpFiltersUi(quizId,
|
|
234
|
+
export function setIpFiltersUi(quizId, ips, namedIps) {
|
|
235
235
|
return function (dispatch, getState) {
|
|
236
|
-
dispatch(changeQuizIpFilters(quizId,
|
|
236
|
+
dispatch(changeQuizIpFilters(quizId, ips, namedIps));
|
|
237
237
|
};
|
|
238
238
|
}
|
|
239
|
-
export function setIpFiltersApi(quizId,
|
|
239
|
+
export function setIpFiltersApi(quizId, ips, namedIps, completeCb) {
|
|
240
240
|
return setQuizProperty(quizId, {
|
|
241
241
|
filters: {
|
|
242
|
-
ips:
|
|
242
|
+
ips: ips,
|
|
243
|
+
named_ips: namedIps
|
|
243
244
|
}
|
|
244
245
|
}, null, completeCb);
|
|
245
246
|
}
|
|
@@ -512,14 +512,15 @@ export function changeQuizFilterIpAddress(quizId, value) {
|
|
|
512
512
|
}
|
|
513
513
|
};
|
|
514
514
|
}
|
|
515
|
-
export function changeQuizIpFilters(quizId,
|
|
515
|
+
export function changeQuizIpFilters(quizId, ips, namedIps) {
|
|
516
516
|
return {
|
|
517
517
|
type: QUIZ_MODIFICATION,
|
|
518
518
|
payload: {
|
|
519
519
|
id: quizId,
|
|
520
520
|
modifications: {
|
|
521
521
|
filters: {
|
|
522
|
-
ips:
|
|
522
|
+
ips: ips,
|
|
523
|
+
namedIps: namedIps
|
|
523
524
|
}
|
|
524
525
|
}
|
|
525
526
|
}
|
|
@@ -31,7 +31,8 @@ export var TagWrapper = /*#__PURE__*/function (_Component) {
|
|
|
31
31
|
var _this$props = this.props,
|
|
32
32
|
id = _this$props.id,
|
|
33
33
|
text = _this$props.text,
|
|
34
|
-
index = _this$props.index
|
|
34
|
+
index = _this$props.index,
|
|
35
|
+
themeOverride = _this$props.themeOverride;
|
|
35
36
|
return /*#__PURE__*/React.createElement(Tag, {
|
|
36
37
|
text: /*#__PURE__*/React.createElement(AccessibleContent, {
|
|
37
38
|
alt: t('Remove {label}', {
|
|
@@ -41,7 +42,8 @@ export var TagWrapper = /*#__PURE__*/function (_Component) {
|
|
|
41
42
|
dismissible: true,
|
|
42
43
|
key: id,
|
|
43
44
|
margin: index > 0 ? 'xxx-small 0 xxx-small xx-small' : 'xxx-small 0',
|
|
44
|
-
onClick: this.dismissTag
|
|
45
|
+
onClick: this.dismissTag,
|
|
46
|
+
themeOverride: themeOverride
|
|
45
47
|
});
|
|
46
48
|
}
|
|
47
49
|
}]);
|
|
@@ -52,6 +54,10 @@ TagWrapper.propTypes = {
|
|
|
52
54
|
text: PropTypes.string.isRequired,
|
|
53
55
|
index: PropTypes.number.isRequired,
|
|
54
56
|
id: PropTypes.string.isRequired,
|
|
55
|
-
onClick: PropTypes.func.isRequired
|
|
57
|
+
onClick: PropTypes.func.isRequired,
|
|
58
|
+
themeOverride: PropTypes.object
|
|
59
|
+
};
|
|
60
|
+
TagWrapper.defaultProps = {
|
|
61
|
+
themeOverride: {}
|
|
56
62
|
};
|
|
57
63
|
export default TagWrapper;
|
package/es/index.js
CHANGED
|
@@ -75,7 +75,8 @@ export { Errors } from "./common/components/shared/errors/Errors.js";
|
|
|
75
75
|
export { TimeUnitsInput } from "./common/components/shared/TimeUnitsInput/index.js";
|
|
76
76
|
export { QuizEntry as QuizEntryView } from "./building/components/resources/quizEntry/QuizEntry/index.js";
|
|
77
77
|
export { Provider } from "./common/react-redux.js";
|
|
78
|
-
export { FormattedTimer } from "./common/components/shared/FormattedDuration/index.js";
|
|
78
|
+
export { FormattedTimer } from "./common/components/shared/FormattedDuration/index.js";
|
|
79
|
+
export { default as TagWrapper } from "./common/components/shared/TagWrapper/index.js"; // Utilities
|
|
79
80
|
export { environment as config } from "./config.js";
|
|
80
81
|
export { Fetcher } from "./common/util/Fetcher.js";
|
|
81
82
|
export { httpHeaders } from "./common/util/httpHeaders.js";
|
|
@@ -260,15 +260,16 @@ function setFilterIpAddress(quizId, value, completeCb) {
|
|
|
260
260
|
filter_ip_address: Boolean(value)
|
|
261
261
|
}, (0, _modifications.changeQuizFilterIpAddress)(quizId, value), completeCb);
|
|
262
262
|
}
|
|
263
|
-
function setIpFiltersUi(quizId,
|
|
263
|
+
function setIpFiltersUi(quizId, ips, namedIps) {
|
|
264
264
|
return function (dispatch, getState) {
|
|
265
|
-
dispatch((0, _modifications.changeQuizIpFilters)(quizId,
|
|
265
|
+
dispatch((0, _modifications.changeQuizIpFilters)(quizId, ips, namedIps));
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
|
-
function setIpFiltersApi(quizId,
|
|
268
|
+
function setIpFiltersApi(quizId, ips, namedIps, completeCb) {
|
|
269
269
|
return setQuizProperty(quizId, {
|
|
270
270
|
filters: {
|
|
271
|
-
ips:
|
|
271
|
+
ips: ips,
|
|
272
|
+
named_ips: namedIps
|
|
272
273
|
}
|
|
273
274
|
}, null, completeCb);
|
|
274
275
|
}
|
|
@@ -557,14 +557,15 @@ function changeQuizFilterIpAddress(quizId, value) {
|
|
|
557
557
|
}
|
|
558
558
|
};
|
|
559
559
|
}
|
|
560
|
-
function changeQuizIpFilters(quizId,
|
|
560
|
+
function changeQuizIpFilters(quizId, ips, namedIps) {
|
|
561
561
|
return {
|
|
562
562
|
type: _quizCommon.QUIZ_MODIFICATION,
|
|
563
563
|
payload: {
|
|
564
564
|
id: quizId,
|
|
565
565
|
modifications: {
|
|
566
566
|
filters: {
|
|
567
|
-
ips:
|
|
567
|
+
ips: ips,
|
|
568
|
+
namedIps: namedIps
|
|
568
569
|
}
|
|
569
570
|
}
|
|
570
571
|
}
|
|
@@ -39,7 +39,8 @@ var TagWrapper = /*#__PURE__*/function (_Component) {
|
|
|
39
39
|
var _this$props = this.props,
|
|
40
40
|
id = _this$props.id,
|
|
41
41
|
text = _this$props.text,
|
|
42
|
-
index = _this$props.index
|
|
42
|
+
index = _this$props.index,
|
|
43
|
+
themeOverride = _this$props.themeOverride;
|
|
43
44
|
return /*#__PURE__*/_react.default.createElement(_uiTag.Tag, {
|
|
44
45
|
text: /*#__PURE__*/_react.default.createElement(_uiA11yContent.AccessibleContent, {
|
|
45
46
|
alt: (0, _formatMessage.default)('Remove {label}', {
|
|
@@ -49,7 +50,8 @@ var TagWrapper = /*#__PURE__*/function (_Component) {
|
|
|
49
50
|
dismissible: true,
|
|
50
51
|
key: id,
|
|
51
52
|
margin: index > 0 ? 'xxx-small 0 xxx-small xx-small' : 'xxx-small 0',
|
|
52
|
-
onClick: this.dismissTag
|
|
53
|
+
onClick: this.dismissTag,
|
|
54
|
+
themeOverride: themeOverride
|
|
53
55
|
});
|
|
54
56
|
}
|
|
55
57
|
}]);
|
|
@@ -61,7 +63,11 @@ TagWrapper.propTypes = {
|
|
|
61
63
|
text: _propTypes.default.string.isRequired,
|
|
62
64
|
index: _propTypes.default.number.isRequired,
|
|
63
65
|
id: _propTypes.default.string.isRequired,
|
|
64
|
-
onClick: _propTypes.default.func.isRequired
|
|
66
|
+
onClick: _propTypes.default.func.isRequired,
|
|
67
|
+
themeOverride: _propTypes.default.object
|
|
68
|
+
};
|
|
69
|
+
TagWrapper.defaultProps = {
|
|
70
|
+
themeOverride: {}
|
|
65
71
|
};
|
|
66
72
|
var _default = TagWrapper;
|
|
67
73
|
exports.default = _default;
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
@@ -77,6 +78,7 @@ var _exportNames = {
|
|
|
77
78
|
FormattedTimer: true,
|
|
78
79
|
breakdownSeconds: true,
|
|
79
80
|
HOUR_IN_SECONDS: true,
|
|
81
|
+
TagWrapper: true,
|
|
80
82
|
config: true,
|
|
81
83
|
Fetcher: true,
|
|
82
84
|
httpHeaders: true,
|
|
@@ -637,6 +639,12 @@ Object.defineProperty(exports, "HOUR_IN_SECONDS", {
|
|
|
637
639
|
return _index54.HOUR_IN_SECONDS;
|
|
638
640
|
}
|
|
639
641
|
});
|
|
642
|
+
Object.defineProperty(exports, "TagWrapper", {
|
|
643
|
+
enumerable: true,
|
|
644
|
+
get: function get() {
|
|
645
|
+
return _index55.default;
|
|
646
|
+
}
|
|
647
|
+
});
|
|
640
648
|
Object.defineProperty(exports, "config", {
|
|
641
649
|
enumerable: true,
|
|
642
650
|
get: function get() {
|
|
@@ -748,7 +756,7 @@ Object.defineProperty(exports, "formatTime", {
|
|
|
748
756
|
Object.defineProperty(exports, "generateImportModalId", {
|
|
749
757
|
enumerable: true,
|
|
750
758
|
get: function get() {
|
|
751
|
-
return
|
|
759
|
+
return _index56.generateImportModalId;
|
|
752
760
|
}
|
|
753
761
|
});
|
|
754
762
|
Object.defineProperty(exports, "TimerService", {
|
|
@@ -1451,6 +1459,7 @@ var _index52 = require("./common/components/shared/TimeUnitsInput/index.js");
|
|
|
1451
1459
|
var _index53 = require("./building/components/resources/quizEntry/QuizEntry/index.js");
|
|
1452
1460
|
var _reactRedux = require("./common/react-redux.js");
|
|
1453
1461
|
var _index54 = require("./common/components/shared/FormattedDuration/index.js");
|
|
1462
|
+
var _index55 = _interopRequireDefault(require("./common/components/shared/TagWrapper/index.js"));
|
|
1454
1463
|
var _config = require("./config.js");
|
|
1455
1464
|
var _Fetcher = require("./common/util/Fetcher.js");
|
|
1456
1465
|
var _httpHeaders = require("./common/util/httpHeaders.js");
|
|
@@ -1463,7 +1472,7 @@ var _interactionTypePropsHelper = require("./common/util/interactionTypePropsHel
|
|
|
1463
1472
|
var _generateDisplayPositions = require("./common/util/generateDisplayPositions.js");
|
|
1464
1473
|
var _makeScrollable = require("./common/components/shared/functionality/makeScrollable.js");
|
|
1465
1474
|
var _formatTimespan = require("./common/util/formatTimespan.js");
|
|
1466
|
-
var
|
|
1475
|
+
var _index56 = require("./common/components/ImportModal/index.js");
|
|
1467
1476
|
var _TimerService = require("./common/util/TimerService.js");
|
|
1468
1477
|
var _TimeRecordingService = require("./common/util/TimeRecordingService.js");
|
|
1469
1478
|
var _windowChecks = require("./common/util/windowChecks.js");
|
|
@@ -1509,15 +1518,15 @@ var _rce2 = require("./common/selectors/rce.js");
|
|
|
1509
1518
|
var _quizSessions4 = require("./common/selectors/quizSessions.js");
|
|
1510
1519
|
var _sessionItems = require("./common/selectors/sessionItems.js");
|
|
1511
1520
|
var _sessionItemResults = require("./common/selectors/sessionItemResults.js");
|
|
1512
|
-
var
|
|
1513
|
-
Object.keys(
|
|
1521
|
+
var _index57 = require("./common/records/index.js");
|
|
1522
|
+
Object.keys(_index57).forEach(function (key) {
|
|
1514
1523
|
if (key === "default" || key === "__esModule") return;
|
|
1515
1524
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
1516
|
-
if (key in exports && exports[key] ===
|
|
1525
|
+
if (key in exports && exports[key] === _index57[key]) return;
|
|
1517
1526
|
Object.defineProperty(exports, key, {
|
|
1518
1527
|
enumerable: true,
|
|
1519
1528
|
get: function get() {
|
|
1520
|
-
return
|
|
1529
|
+
return _index57[key];
|
|
1521
1530
|
}
|
|
1522
1531
|
});
|
|
1523
1532
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "20.26.1-snapshot.
|
|
3
|
+
"version": "20.26.1-snapshot.6+2bd5dc61c",
|
|
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.26.1-snapshot.
|
|
48
|
-
"@instructure/quiz-i18n": "20.26.1-snapshot.
|
|
49
|
-
"@instructure/quiz-interactions": "20.26.1-snapshot.
|
|
50
|
-
"@instructure/quiz-number-input": "20.26.1-snapshot.
|
|
51
|
-
"@instructure/quiz-rce": "20.26.1-snapshot.
|
|
47
|
+
"@instructure/quiz-common": "20.26.1-snapshot.6+2bd5dc61c",
|
|
48
|
+
"@instructure/quiz-i18n": "20.26.1-snapshot.6+2bd5dc61c",
|
|
49
|
+
"@instructure/quiz-interactions": "20.26.1-snapshot.6+2bd5dc61c",
|
|
50
|
+
"@instructure/quiz-number-input": "20.26.1-snapshot.6+2bd5dc61c",
|
|
51
|
+
"@instructure/quiz-rce": "20.26.1-snapshot.6+2bd5dc61c",
|
|
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",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"file-saver": "~2.0.5",
|
|
113
113
|
"humps": "^2.0.0",
|
|
114
114
|
"immutable": "^3.8.1",
|
|
115
|
-
"instructure-validations": "20.26.1-snapshot.
|
|
115
|
+
"instructure-validations": "20.26.1-snapshot.6+2bd5dc61c",
|
|
116
116
|
"ipaddr.js": "^1.5.4",
|
|
117
117
|
"isomorphic-fetch": "^2.2.0",
|
|
118
118
|
"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.26.1-snapshot.
|
|
164
|
+
"quiz-presets": "20.26.1-snapshot.6+2bd5dc61c",
|
|
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": "
|
|
180
|
+
"gitHead": "2bd5dc61c4b551474eae0b2d4046986106e2c383"
|
|
181
181
|
}
|