@instructure/quiz-core 20.9.1-rc.4 → 20.9.1-rc.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/banks/components/{SharingModal/asyncSearch.js → AsyncSearch/index.js} +17 -6
- package/es/banks/components/Banks/index.js +8 -4
- package/es/banks/components/Banks/presenter.js +60 -19
- package/es/banks/components/Banks/styles.js +0 -5
- package/es/banks/components/SharingModal/presenter.js +1 -1
- package/es/common/components/layout/Page/index.js +24 -22
- package/es/common/components/layout/Page/styles.js +26 -0
- package/es/common/components/layout/Page/theme.js +4 -3
- package/es/common/components/layout/header/HeaderMenuButton/presenter.js +16 -21
- package/es/common/components/layout/header/HeaderMenuButton/styles.js +27 -0
- package/es/common/components/layout/header/HeaderMenuButton/theme.js +4 -2
- package/es/common/components/layout/sidebar/Stimulus/Summary/presenter.js +23 -28
- package/es/common/components/layout/sidebar/Stimulus/Summary/styles.js +30 -0
- package/es/common/components/layout/sidebar/Stimulus/Summary/theme.js +4 -2
- package/es/common/reducers/ui.js +1 -1
- package/lib/banks/components/{SharingModal/asyncSearch.js → AsyncSearch/index.js} +17 -6
- package/lib/banks/components/Banks/index.js +7 -3
- package/lib/banks/components/Banks/presenter.js +63 -18
- package/lib/banks/components/Banks/styles.js +0 -5
- package/lib/banks/components/SharingModal/presenter.js +2 -2
- package/lib/common/components/layout/Page/index.js +22 -24
- package/lib/common/components/layout/Page/styles.js +37 -0
- package/lib/common/components/layout/Page/theme.js +6 -4
- package/lib/common/components/layout/header/HeaderMenuButton/presenter.js +13 -21
- package/lib/common/components/layout/header/HeaderMenuButton/styles.js +37 -0
- package/lib/common/components/layout/header/HeaderMenuButton/theme.js +6 -3
- package/lib/common/components/layout/sidebar/Stimulus/Summary/presenter.js +22 -29
- package/lib/common/components/layout/sidebar/Stimulus/Summary/styles.js +38 -0
- package/lib/common/components/layout/sidebar/Stimulus/Summary/theme.js +6 -3
- package/lib/common/reducers/ui.js +1 -1
- package/package.json +9 -9
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default =
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
function
|
|
8
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
9
9
|
var breakpoints = _ref.breakpoints,
|
|
10
10
|
colors = _ref.colors,
|
|
11
11
|
typography = _ref.typography;
|
|
@@ -15,4 +15,7 @@ function generator(_ref) {
|
|
|
15
15
|
menuButtonColor: colors.licorice,
|
|
16
16
|
menuButtonHoverOpacity: '0.6'
|
|
17
17
|
};
|
|
18
|
-
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
var _default = generateComponentTheme;
|
|
21
|
+
exports.default = _default;
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
@@ -17,34 +15,25 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
17
15
|
|
|
18
16
|
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
19
17
|
|
|
20
|
-
var _react =
|
|
18
|
+
var _react = require("react");
|
|
21
19
|
|
|
22
20
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
23
21
|
|
|
24
22
|
var _uiText = require("@instructure/ui-text");
|
|
25
23
|
|
|
26
|
-
var
|
|
24
|
+
var _emotion = require("@instructure/emotion");
|
|
27
25
|
|
|
28
26
|
var _presenter = require("../presenter.js");
|
|
29
27
|
|
|
28
|
+
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
29
|
+
|
|
30
30
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
31
31
|
|
|
32
32
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
33
33
|
|
|
34
34
|
var _dec, _class, _class2, _temp;
|
|
35
35
|
|
|
36
|
-
var
|
|
37
|
-
componentId: 'dhBxf',
|
|
38
|
-
template: function template(theme) {
|
|
39
|
-
return "\n\n.dhBxf_cltt{flex-grow:2}\n\n.dhBxf_eXht{flex-grow:1;text-align:right}\n\n[dir=ltr] .dhBxf_eXht,[dir=rtl] .dhBxf_eXht{text-align:right}\n\n.dhBxf_flYR{flex-grow:1}\n\n.dhBxf_dMbU{border:dotted ".concat(theme.itemContainerBorderWidth || 'inherit', ";border-color:").concat(theme.itemContainerBorderColor || 'inherit', ";color:").concat(theme.itemContainerColor || 'inherit', ";display:flex;padding:").concat(theme.itemContainerPadding || 'inherit', ";width:100%}\n\n.dhBxf_doNn{display:flex;flex-grow:1;margin:").concat(theme.summaryMargin || 'inherit', ";margin-left:").concat(theme.summaryMarginLeft || 'inherit', "}");
|
|
40
|
-
},
|
|
41
|
-
'middleSection': 'dhBxf_cltt',
|
|
42
|
-
'endSection': 'dhBxf_eXht',
|
|
43
|
-
'questionCount': 'dhBxf_flYR',
|
|
44
|
-
'itemsContainer': 'dhBxf_dMbU',
|
|
45
|
-
'summary': 'dhBxf_doNn'
|
|
46
|
-
};
|
|
47
|
-
var Summary = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
36
|
+
var Summary = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
48
37
|
(0, _inherits2.default)(Summary, _Component);
|
|
49
38
|
|
|
50
39
|
var _super = (0, _createSuper2.default)(Summary);
|
|
@@ -121,7 +110,7 @@ var Summary = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(
|
|
|
121
110
|
isShowingItems = _this$props2.isShowingItems;
|
|
122
111
|
|
|
123
112
|
if (!isDragging) {
|
|
124
|
-
return
|
|
113
|
+
return (0, _emotion.jsx)(_uiText.Text, {
|
|
125
114
|
size: "small",
|
|
126
115
|
weight: "light"
|
|
127
116
|
}, isShowingItems ? (0, _formatMessage.default)('Collapse') : (0, _formatMessage.default)('Expand'));
|
|
@@ -137,26 +126,29 @@ var Summary = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(
|
|
|
137
126
|
}
|
|
138
127
|
|
|
139
128
|
var id = "stimulus-summary-content-".concat(this.props.stimulusId);
|
|
140
|
-
return
|
|
129
|
+
return (0, _emotion.jsx)("div", {
|
|
141
130
|
role: "button",
|
|
142
131
|
tabIndex: "0",
|
|
143
132
|
"aria-expanded": this.props.isShowingItems,
|
|
144
133
|
"aria-controls": id,
|
|
145
|
-
|
|
134
|
+
"data-testid": "summary",
|
|
135
|
+
css: this.props.styles.summary,
|
|
146
136
|
onClick: this.handleShowItems,
|
|
147
137
|
onKeyDown: this.handleKeyDown
|
|
148
|
-
},
|
|
138
|
+
}, (0, _emotion.jsx)("div", {
|
|
149
139
|
id: id,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
140
|
+
css: this.props.styles.itemsContainer,
|
|
141
|
+
"data-testid": "items-container"
|
|
142
|
+
}, (0, _emotion.jsx)("div", {
|
|
143
|
+
css: this.props.styles.questionCount,
|
|
144
|
+
"data-testid": "question-count"
|
|
145
|
+
}, (0, _emotion.jsx)(_uiText.Text, {
|
|
154
146
|
size: "small",
|
|
155
147
|
weight: "light"
|
|
156
|
-
}, this.getCountText())),
|
|
157
|
-
|
|
158
|
-
}),
|
|
159
|
-
|
|
148
|
+
}, this.getCountText())), (0, _emotion.jsx)("div", {
|
|
149
|
+
css: this.props.styles.middleSection
|
|
150
|
+
}), (0, _emotion.jsx)("div", {
|
|
151
|
+
css: this.props.styles.endSection
|
|
160
152
|
}, this.renderEndSectionContent())));
|
|
161
153
|
}
|
|
162
154
|
}]);
|
|
@@ -172,7 +164,8 @@ var Summary = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(
|
|
|
172
164
|
isShowingItems: _propTypes.default.bool,
|
|
173
165
|
stimulusId: _propTypes.default.string.isRequired,
|
|
174
166
|
// from connected component
|
|
175
|
-
setSidebarStimulusIsShowing: _propTypes.default.func.isRequired
|
|
167
|
+
setSidebarStimulusIsShowing: _propTypes.default.func.isRequired,
|
|
168
|
+
styles: _propTypes.default.object
|
|
176
169
|
}, _class2.defaultProps = {
|
|
177
170
|
isDragging: false,
|
|
178
171
|
isShowingItems: false
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
9
|
+
return {
|
|
10
|
+
middleSection: {
|
|
11
|
+
flexGrow: '2'
|
|
12
|
+
},
|
|
13
|
+
endSection: {
|
|
14
|
+
flexGrow: '1',
|
|
15
|
+
textAlign: 'right'
|
|
16
|
+
},
|
|
17
|
+
questionCount: {
|
|
18
|
+
flexGrow: '1'
|
|
19
|
+
},
|
|
20
|
+
itemsContainer: {
|
|
21
|
+
color: componentTheme.itemContainerColor,
|
|
22
|
+
display: 'flex',
|
|
23
|
+
width: '100%',
|
|
24
|
+
padding: componentTheme.itemContainerPadding,
|
|
25
|
+
border: "dotted ".concat(componentTheme.itemContainerBorderWidth),
|
|
26
|
+
borderColor: componentTheme.itemContainerBorderColor
|
|
27
|
+
},
|
|
28
|
+
summary: {
|
|
29
|
+
margin: componentTheme.summaryMargin,
|
|
30
|
+
marginLeft: componentTheme.summaryMarginLeft,
|
|
31
|
+
display: 'flex',
|
|
32
|
+
flexGrow: '1'
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var _default = generateStyle;
|
|
38
|
+
exports.default = _default;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default =
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
function
|
|
8
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
9
9
|
var colors = _ref.colors,
|
|
10
10
|
spacing = _ref.spacing,
|
|
11
11
|
borders = _ref.borders;
|
|
@@ -17,4 +17,7 @@ function generator(_ref) {
|
|
|
17
17
|
summaryMargin: spacing.small,
|
|
18
18
|
summaryMarginLeft: spacing.medium
|
|
19
19
|
};
|
|
20
|
-
}
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
var _default = generateComponentTheme;
|
|
23
|
+
exports.default = _default;
|
|
@@ -29,7 +29,7 @@ var _default = function _default() {
|
|
|
29
29
|
return state.mergeDeepIn([action.payload.key], action.payload.value);
|
|
30
30
|
|
|
31
31
|
case _quizCommon.SET_UI:
|
|
32
|
-
return state.
|
|
32
|
+
return state.setIn([action.payload.key].flat(), action.payload.value);
|
|
33
33
|
|
|
34
34
|
case _quizCommon.TOGGLE_UI:
|
|
35
35
|
return toggle(state, action.payload);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "20.9.1-rc.
|
|
3
|
+
"version": "20.9.1-rc.6+20c0e2073",
|
|
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.1.0",
|
|
47
|
-
"@instructure/quiz-common": "20.9.1-rc.
|
|
48
|
-
"@instructure/quiz-i18n": "20.9.1-rc.
|
|
49
|
-
"@instructure/quiz-interactions": "20.9.1-rc.
|
|
50
|
-
"@instructure/quiz-number-input": "20.9.1-rc.
|
|
51
|
-
"@instructure/quiz-rce": "20.9.1-rc.
|
|
47
|
+
"@instructure/quiz-common": "20.9.1-rc.6+20c0e2073",
|
|
48
|
+
"@instructure/quiz-i18n": "20.9.1-rc.6+20c0e2073",
|
|
49
|
+
"@instructure/quiz-interactions": "20.9.1-rc.6+20c0e2073",
|
|
50
|
+
"@instructure/quiz-number-input": "20.9.1-rc.6+20c0e2073",
|
|
51
|
+
"@instructure/quiz-rce": "20.9.1-rc.6+20c0e2073",
|
|
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.9.1-rc.
|
|
115
|
+
"instructure-validations": "20.9.1-rc.6+20c0e2073",
|
|
116
116
|
"ipaddr.js": "^1.5.4",
|
|
117
117
|
"isomorphic-fetch": "^2.2.0",
|
|
118
118
|
"isuuid": "^0.1.0",
|
|
@@ -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": "20.9.1-rc.
|
|
166
|
+
"quiz-presets": "20.9.1-rc.6+20c0e2073",
|
|
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": "20c0e2073b0f835529113e082eadb37f25b68d8a"
|
|
183
183
|
}
|