@instructure/quiz-core 20.11.3 → 20.11.4-rc.0
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.
|
@@ -78,7 +78,6 @@ export var ShareList = (_dec = withStyle(generateStyle, null), _dec(_class = (_t
|
|
|
78
78
|
_this.renderEntity = function (entity) {
|
|
79
79
|
var isEntityRemoved = entity.get('permission') === REMOVED_ACCESS;
|
|
80
80
|
var isCourse = entity.get('entityType') === SHARED_WITH_COURSE;
|
|
81
|
-
var isOnlyEntity = _this.props.shares.size <= 1;
|
|
82
81
|
var originalEntity = _this.props.sharedBanks.find(function (sb) {
|
|
83
82
|
return sb.get('id') == entity.get('id');
|
|
84
83
|
}) || Map();
|
|
@@ -95,7 +94,7 @@ export var ShareList = (_dec = withStyle(generateStyle, null), _dec(_class = (_t
|
|
|
95
94
|
})), jsx(Grid.Col, null, jsx("span", {
|
|
96
95
|
css: isEntityRemoved ? _this.props.styles.labelRemoved : null,
|
|
97
96
|
"data-automation": isEntityRemoved ? 'sdk-shared-entity-removed' : null
|
|
98
|
-
}, entity.get('title'))), _this.props.improvedBankSharingEnabled &&
|
|
97
|
+
}, entity.get('title'))), _this.props.improvedBankSharingEnabled && jsx(Grid.Col, {
|
|
99
98
|
width: "auto"
|
|
100
99
|
}, jsx(SimpleSelect, {
|
|
101
100
|
onChange: _this.handlePermissionChange(entity),
|
|
@@ -112,7 +111,7 @@ export var ShareList = (_dec = withStyle(generateStyle, null), _dec(_class = (_t
|
|
|
112
111
|
value: CAN_EDIT
|
|
113
112
|
}, t('Can edit')))), jsx(Grid.Col, {
|
|
114
113
|
width: "auto"
|
|
115
|
-
},
|
|
114
|
+
}, _this.props.canEdit && (_this.props.improvedBankSharingEnabled || !isCourse) && _this.renderRemoveButton(entity, isEntityRemoved)));
|
|
116
115
|
};
|
|
117
116
|
|
|
118
117
|
return _this;
|
|
@@ -141,14 +140,6 @@ export var ShareList = (_dec = withStyle(generateStyle, null), _dec(_class = (_t
|
|
|
141
140
|
onPermissionChange: PropTypes.func.isRequired,
|
|
142
141
|
onEntityRemove: PropTypes.func.isRequired,
|
|
143
142
|
sharedBanks: ImmutablePropTypes.list,
|
|
144
|
-
shares: ImmutablePropTypes.listOf(ImmutablePropTypes.contains({
|
|
145
|
-
avatar: PropTypes.string,
|
|
146
|
-
title: PropTypes.string.isRequired,
|
|
147
|
-
entityType: PropTypes.string.isRequired,
|
|
148
|
-
entityId: PropTypes.string.isRequired,
|
|
149
|
-
permission: PropTypes.string.isRequired,
|
|
150
|
-
id: PropTypes.string.isRequired
|
|
151
|
-
})).isRequired,
|
|
152
143
|
// eslint-disable-next-line react/require-default-props,react/forbid-prop-types
|
|
153
144
|
styles: PropTypes.object
|
|
154
145
|
}, _temp)) || _class);
|
|
@@ -419,8 +419,7 @@ export var SharingModalPresenter = (_dec = withStyle(generateStyle, generateComp
|
|
|
419
419
|
improvedBankSharingEnabled: _this.props.improvedBankSharingEnabled,
|
|
420
420
|
onPermissionChange: _this.handleEntityPermissionChange,
|
|
421
421
|
onEntityRemove: _this.handleEntityRemove,
|
|
422
|
-
sharedBanks: _this.props.sharedBanks
|
|
423
|
-
shares: _this.state.shares
|
|
422
|
+
sharedBanks: _this.props.sharedBanks
|
|
424
423
|
});
|
|
425
424
|
};
|
|
426
425
|
|
|
@@ -104,7 +104,6 @@ var ShareList = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec(_cl
|
|
|
104
104
|
|
|
105
105
|
var isCourse = entity.get('entityType') === _quizCommon.SHARED_WITH_COURSE;
|
|
106
106
|
|
|
107
|
-
var isOnlyEntity = _this.props.shares.size <= 1;
|
|
108
107
|
var originalEntity = _this.props.sharedBanks.find(function (sb) {
|
|
109
108
|
return sb.get('id') == entity.get('id');
|
|
110
109
|
}) || (0, _immutable.Map)();
|
|
@@ -121,7 +120,7 @@ var ShareList = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec(_cl
|
|
|
121
120
|
})), (0, _emotion.jsx)(_uiGrid.Grid.Col, null, (0, _emotion.jsx)("span", {
|
|
122
121
|
css: isEntityRemoved ? _this.props.styles.labelRemoved : null,
|
|
123
122
|
"data-automation": isEntityRemoved ? 'sdk-shared-entity-removed' : null
|
|
124
|
-
}, entity.get('title'))), _this.props.improvedBankSharingEnabled &&
|
|
123
|
+
}, entity.get('title'))), _this.props.improvedBankSharingEnabled && (0, _emotion.jsx)(_uiGrid.Grid.Col, {
|
|
125
124
|
width: "auto"
|
|
126
125
|
}, (0, _emotion.jsx)(_uiSimpleSelect.SimpleSelect, {
|
|
127
126
|
onChange: _this.handlePermissionChange(entity),
|
|
@@ -138,7 +137,7 @@ var ShareList = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec(_cl
|
|
|
138
137
|
value: _quizCommon.CAN_EDIT
|
|
139
138
|
}, (0, _formatMessage.default)('Can edit')))), (0, _emotion.jsx)(_uiGrid.Grid.Col, {
|
|
140
139
|
width: "auto"
|
|
141
|
-
},
|
|
140
|
+
}, _this.props.canEdit && (_this.props.improvedBankSharingEnabled || !isCourse) && _this.renderRemoveButton(entity, isEntityRemoved)));
|
|
142
141
|
};
|
|
143
142
|
|
|
144
143
|
return _this;
|
|
@@ -166,14 +165,6 @@ var ShareList = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec(_cl
|
|
|
166
165
|
onPermissionChange: _propTypes.default.func.isRequired,
|
|
167
166
|
onEntityRemove: _propTypes.default.func.isRequired,
|
|
168
167
|
sharedBanks: _reactImmutableProptypes.default.list,
|
|
169
|
-
shares: _reactImmutableProptypes.default.listOf(_reactImmutableProptypes.default.contains({
|
|
170
|
-
avatar: _propTypes.default.string,
|
|
171
|
-
title: _propTypes.default.string.isRequired,
|
|
172
|
-
entityType: _propTypes.default.string.isRequired,
|
|
173
|
-
entityId: _propTypes.default.string.isRequired,
|
|
174
|
-
permission: _propTypes.default.string.isRequired,
|
|
175
|
-
id: _propTypes.default.string.isRequired
|
|
176
|
-
})).isRequired,
|
|
177
168
|
// eslint-disable-next-line react/require-default-props,react/forbid-prop-types
|
|
178
169
|
styles: _propTypes.default.object
|
|
179
170
|
}, _temp)) || _class);
|
|
@@ -457,8 +457,7 @@ var SharingModalPresenter = (_dec = (0, _emotion.withStyle)(_styles.default, _th
|
|
|
457
457
|
improvedBankSharingEnabled: _this.props.improvedBankSharingEnabled,
|
|
458
458
|
onPermissionChange: _this.handleEntityPermissionChange,
|
|
459
459
|
onEntityRemove: _this.handleEntityRemove,
|
|
460
|
-
sharedBanks: _this.props.sharedBanks
|
|
461
|
-
shares: _this.state.shares
|
|
460
|
+
sharedBanks: _this.props.sharedBanks
|
|
462
461
|
});
|
|
463
462
|
};
|
|
464
463
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "20.11.
|
|
3
|
+
"version": "20.11.4-rc.0+4dda23638",
|
|
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.1",
|
|
47
|
-
"@instructure/quiz-common": "
|
|
48
|
-
"@instructure/quiz-i18n": "
|
|
49
|
-
"@instructure/quiz-interactions": "
|
|
50
|
-
"@instructure/quiz-number-input": "
|
|
51
|
-
"@instructure/quiz-rce": "
|
|
47
|
+
"@instructure/quiz-common": "20.11.4-rc.0+4dda23638",
|
|
48
|
+
"@instructure/quiz-i18n": "20.11.4-rc.0+4dda23638",
|
|
49
|
+
"@instructure/quiz-interactions": "20.11.4-rc.0+4dda23638",
|
|
50
|
+
"@instructure/quiz-number-input": "20.11.4-rc.0+4dda23638",
|
|
51
|
+
"@instructure/quiz-rce": "20.11.4-rc.0+4dda23638",
|
|
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": "
|
|
115
|
+
"instructure-validations": "20.11.4-rc.0+4dda23638",
|
|
116
116
|
"ipaddr.js": "^1.5.4",
|
|
117
117
|
"isomorphic-fetch": "^2.2.0",
|
|
118
118
|
"isuuid": "^0.1.0",
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
"uuid": "^3.2.1"
|
|
144
144
|
},
|
|
145
145
|
"devDependencies": {
|
|
146
|
-
"@instructure/quiz-scripts": "
|
|
146
|
+
"@instructure/quiz-scripts": "20.11.3",
|
|
147
147
|
"@instructure/ui-axe-check": "^8.51.0",
|
|
148
148
|
"@instructure/ui-babel-preset": "^7.22.1",
|
|
149
149
|
"@instructure/ui-karma-config": "^7.22.1",
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
"intl": "^1.2.4",
|
|
164
164
|
"jquery": "^2.2.3",
|
|
165
165
|
"most-subject": "^5.3.0",
|
|
166
|
-
"quiz-presets": "
|
|
166
|
+
"quiz-presets": "20.11.4-rc.0+4dda23638",
|
|
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": "4dda2363876be59480e71c6d35c73cf703797e9d"
|
|
183
183
|
}
|