@instructure/quiz-core 17.42.1-rc.0 → 17.42.1-rc.2
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.
|
@@ -26,7 +26,7 @@ var styles = {
|
|
|
26
26
|
};
|
|
27
27
|
import theme from "./theme.js";
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _ref = /*#__PURE__*/React.createElement("br", null);
|
|
30
30
|
|
|
31
31
|
export var ItemFeedbackModal = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
32
32
|
_inherits(ItemFeedbackModal, _Component);
|
|
@@ -44,15 +44,18 @@ export var ItemFeedbackModal = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
44
44
|
|
|
45
45
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
46
46
|
|
|
47
|
-
_this.onFeedbackChange = function (
|
|
48
|
-
var
|
|
49
|
-
var key = e.target.id;
|
|
50
|
-
|
|
51
|
-
var newFeedback = _this.props.feedback.set(key, editorContent);
|
|
47
|
+
_this.onFeedbackChange = function (key, content) {
|
|
48
|
+
var newFeedback = _this.props.feedback.set(key, content);
|
|
52
49
|
|
|
53
50
|
_this.props.setUi(ITEM_FEEDBACK_MODAL_FEEDBACK, newFeedback);
|
|
54
51
|
};
|
|
55
52
|
|
|
53
|
+
_this.onFeedbackWrapper = function (key) {
|
|
54
|
+
return function (_, map) {
|
|
55
|
+
return _this.onFeedbackChange(key, map.editorContent);
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
|
|
56
59
|
_this.continueAction = function () {
|
|
57
60
|
_this.props.changeItemFeedback(_this.props.item.id, _this.props.feedback);
|
|
58
61
|
|
|
@@ -94,14 +97,14 @@ export var ItemFeedbackModal = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
94
97
|
}, {
|
|
95
98
|
key: "renderRichContentInput",
|
|
96
99
|
value: function renderRichContentInput(key, label) {
|
|
97
|
-
return /*#__PURE__*/React.createElement("div", null,
|
|
100
|
+
return /*#__PURE__*/React.createElement("div", null, _ref, /*#__PURE__*/React.createElement("label", {
|
|
98
101
|
className: styles.feedbackLabel,
|
|
99
102
|
htmlFor: key
|
|
100
103
|
}, label), /*#__PURE__*/React.createElement(RichContentInput, {
|
|
101
104
|
label: "",
|
|
102
105
|
textareaId: key,
|
|
103
106
|
defaultContent: this.props.feedback.get(key),
|
|
104
|
-
onChange: this.
|
|
107
|
+
onChange: this.onFeedbackWrapper(key),
|
|
105
108
|
parentType: this.props.parentType,
|
|
106
109
|
parentId: this.props.parentId,
|
|
107
110
|
importModalCloseOverride: this.returnToFeedback,
|
|
@@ -52,7 +52,7 @@ var styles = {
|
|
|
52
52
|
'feedbackLabel': 'esPWW_eCKf'
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
var
|
|
55
|
+
var _ref = /*#__PURE__*/_react.default.createElement("br", null);
|
|
56
56
|
|
|
57
57
|
var ItemFeedbackModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
58
58
|
(0, _inherits2.default)(ItemFeedbackModal, _Component);
|
|
@@ -70,15 +70,18 @@ var ItemFeedbackModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, styl
|
|
|
70
70
|
|
|
71
71
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
72
72
|
|
|
73
|
-
_this.onFeedbackChange = function (
|
|
74
|
-
var
|
|
75
|
-
var key = e.target.id;
|
|
76
|
-
|
|
77
|
-
var newFeedback = _this.props.feedback.set(key, editorContent);
|
|
73
|
+
_this.onFeedbackChange = function (key, content) {
|
|
74
|
+
var newFeedback = _this.props.feedback.set(key, content);
|
|
78
75
|
|
|
79
76
|
_this.props.setUi(_quizCommon.ITEM_FEEDBACK_MODAL_FEEDBACK, newFeedback);
|
|
80
77
|
};
|
|
81
78
|
|
|
79
|
+
_this.onFeedbackWrapper = function (key) {
|
|
80
|
+
return function (_, map) {
|
|
81
|
+
return _this.onFeedbackChange(key, map.editorContent);
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
|
|
82
85
|
_this.continueAction = function () {
|
|
83
86
|
_this.props.changeItemFeedback(_this.props.item.id, _this.props.feedback);
|
|
84
87
|
|
|
@@ -120,14 +123,14 @@ var ItemFeedbackModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, styl
|
|
|
120
123
|
}, {
|
|
121
124
|
key: "renderRichContentInput",
|
|
122
125
|
value: function renderRichContentInput(key, label) {
|
|
123
|
-
return /*#__PURE__*/_react.default.createElement("div", null,
|
|
126
|
+
return /*#__PURE__*/_react.default.createElement("div", null, _ref, /*#__PURE__*/_react.default.createElement("label", {
|
|
124
127
|
className: styles.feedbackLabel,
|
|
125
128
|
htmlFor: key
|
|
126
129
|
}, label), /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
127
130
|
label: "",
|
|
128
131
|
textareaId: key,
|
|
129
132
|
defaultContent: this.props.feedback.get(key),
|
|
130
|
-
onChange: this.
|
|
133
|
+
onChange: this.onFeedbackWrapper(key),
|
|
131
134
|
parentType: this.props.parentType,
|
|
132
135
|
parentId: this.props.parentId,
|
|
133
136
|
importModalCloseOverride: this.returnToFeedback,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "17.42.1-rc.
|
|
3
|
+
"version": "17.42.1-rc.2+3c9be26b3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The Quiz React SDK by Instructure Inc.",
|
|
6
6
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@instructure/outcomes-ui": "^2.1.2",
|
|
44
|
-
"@instructure/quiz-common": "17.42.1-rc.
|
|
45
|
-
"@instructure/quiz-i18n": "17.42.1-rc.
|
|
46
|
-
"@instructure/quiz-interactions": "17.42.1-rc.
|
|
47
|
-
"@instructure/quiz-number-input": "17.42.1-rc.
|
|
48
|
-
"@instructure/quiz-rce": "17.42.1-rc.
|
|
44
|
+
"@instructure/quiz-common": "17.42.1-rc.2+3c9be26b3",
|
|
45
|
+
"@instructure/quiz-i18n": "17.42.1-rc.2+3c9be26b3",
|
|
46
|
+
"@instructure/quiz-interactions": "17.42.1-rc.2+3c9be26b3",
|
|
47
|
+
"@instructure/quiz-number-input": "17.42.1-rc.2+3c9be26b3",
|
|
48
|
+
"@instructure/quiz-rce": "17.42.1-rc.2+3c9be26b3",
|
|
49
49
|
"@instructure/ui-a11y-content": "^7.20.0",
|
|
50
50
|
"@instructure/ui-alerts": "^7.20.0",
|
|
51
51
|
"@instructure/ui-avatar": "^7.20.0",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"eventemitter3": "^3.1.0",
|
|
107
107
|
"humps": "^2.0.0",
|
|
108
108
|
"immutable": "^3.8.1",
|
|
109
|
-
"instructure-validations": "17.42.1-rc.
|
|
109
|
+
"instructure-validations": "17.42.1-rc.2+3c9be26b3",
|
|
110
110
|
"ipaddr.js": "^1.5.4",
|
|
111
111
|
"isomorphic-fetch": "^2.2.0",
|
|
112
112
|
"isuuid": "^0.1.0",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"uuid": "^3.2.1"
|
|
138
138
|
},
|
|
139
139
|
"devDependencies": {
|
|
140
|
-
"@instructure/quiz-scripts": "17.42.1-rc.
|
|
140
|
+
"@instructure/quiz-scripts": "17.42.1-rc.2+3c9be26b3",
|
|
141
141
|
"@instructure/ui-axe-check": "^7.20.0",
|
|
142
142
|
"@instructure/ui-babel-preset": "^7.20.0",
|
|
143
143
|
"@instructure/ui-karma-config": "^7.20.0",
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
"intl": "^1.2.4",
|
|
157
157
|
"jquery": "^2.2.3",
|
|
158
158
|
"most-subject": "^5.3.0",
|
|
159
|
-
"quiz-presets": "17.42.1-rc.
|
|
159
|
+
"quiz-presets": "17.42.1-rc.2+3c9be26b3",
|
|
160
160
|
"react": "^16.8.6",
|
|
161
161
|
"react-addons-test-utils": "^15.6.2",
|
|
162
162
|
"react-dom": "^16.8.6",
|
|
@@ -172,5 +172,5 @@
|
|
|
172
172
|
"publishConfig": {
|
|
173
173
|
"access": "public"
|
|
174
174
|
},
|
|
175
|
-
"gitHead": "
|
|
175
|
+
"gitHead": "3c9be26b3675a162ef02fcd13b293821ff38890c"
|
|
176
176
|
}
|