@instructure/quiz-core 17.36.1-rc.5 → 17.36.1-rc.8
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/components/resources/quizEntry/QuizEntryShow/presenter.js +2 -1
- package/es/common/components/layout/sidebar/Sidebar/index.js +28 -14
- package/es/common/components/layout/sidebar/SidebarItem/presenter.js +9 -5
- package/es/common/components/layout/sidebar/Stimulus/presenter.js +13 -6
- package/es/common/components/resources/stimulus/StimulusEditInfo/presenter.js +2 -1
- package/es/common/components/resources/stimulus/StimulusShowInfo/index.js +8 -3
- package/lib/building/components/resources/quizEntry/QuizEntryShow/presenter.js +2 -1
- package/lib/common/components/layout/sidebar/Sidebar/index.js +29 -15
- package/lib/common/components/layout/sidebar/SidebarItem/presenter.js +9 -5
- package/lib/common/components/layout/sidebar/Stimulus/presenter.js +13 -7
- package/lib/common/components/resources/stimulus/StimulusEditInfo/presenter.js +2 -1
- package/lib/common/components/resources/stimulus/StimulusShowInfo/index.js +9 -3
- package/package.json +10 -10
|
@@ -291,7 +291,8 @@ var QuizEntryShow = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cl
|
|
|
291
291
|
className: styles.connectingLines
|
|
292
292
|
}), /*#__PURE__*/React.createElement(PositionBox, {
|
|
293
293
|
position: positionToDisplay,
|
|
294
|
-
headingText: positionText
|
|
294
|
+
headingText: positionText,
|
|
295
|
+
headingLevel: quizEntry.isInStimulus ? 'h3' : 'h2'
|
|
295
296
|
}), this.renderLeftHeader(), /*#__PURE__*/React.createElement(ActionButtons, {
|
|
296
297
|
connectDragSource: this.props.connectDragSource,
|
|
297
298
|
displayPosition: this.props.displayPosition,
|
|
@@ -15,11 +15,11 @@ import classNames from 'classnames';
|
|
|
15
15
|
import { IconMoveStartLine, IconMoveEndLine, IconPinSolid, IconQuizInstructionsLine, IconQuizTitleLine } from '@instructure/ui-icons';
|
|
16
16
|
import { AccessibleContent, ScreenReaderContent, PresentationContent } from '@instructure/ui-a11y-content';
|
|
17
17
|
import { Button } from '@instructure/ui-buttons';
|
|
18
|
+
import { Link } from '@instructure/ui-link';
|
|
18
19
|
import { Text } from '@instructure/ui-text';
|
|
19
20
|
import { View } from '@instructure/ui-view';
|
|
20
21
|
import { themeable } from '@instructure/ui-themeable';
|
|
21
22
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
22
|
-
import keyboardClickable from "../../../../util/keyboardClickable.js";
|
|
23
23
|
import { onPhone } from "../../../../util/windowChecks.js";
|
|
24
24
|
import CustomPropTypes from "../../../../util/CustomPropTypes.js";
|
|
25
25
|
import { SIDEBAR_NAV_ID } from '@instructure/quiz-common';
|
|
@@ -46,7 +46,15 @@ var styles = {
|
|
|
46
46
|
};
|
|
47
47
|
import theme from "./theme.js";
|
|
48
48
|
|
|
49
|
-
var _ref = /*#__PURE__*/React.createElement(
|
|
49
|
+
var _ref = /*#__PURE__*/React.createElement(IconQuizTitleLine, {
|
|
50
|
+
color: "primary"
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
var _ref2 = /*#__PURE__*/React.createElement(IconQuizInstructionsLine, {
|
|
54
|
+
color: "primary"
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
var _ref3 = /*#__PURE__*/React.createElement(IconPinSolid, null);
|
|
50
58
|
|
|
51
59
|
export var Sidebar = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
52
60
|
_inherits(Sidebar, _Component);
|
|
@@ -64,11 +72,15 @@ export var Sidebar = (_dec = themeable(theme, styles), _dec(_class = (_temp = _c
|
|
|
64
72
|
|
|
65
73
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
66
74
|
|
|
67
|
-
_this.scrollToTitle = function () {
|
|
75
|
+
_this.scrollToTitle = function (e) {
|
|
76
|
+
e.preventDefault(); // prevent default link navigation
|
|
77
|
+
|
|
68
78
|
_this.props.scrollToItem(null)('title');
|
|
69
79
|
};
|
|
70
80
|
|
|
71
|
-
_this.scrollToInfo = function () {
|
|
81
|
+
_this.scrollToInfo = function (e) {
|
|
82
|
+
e.preventDefault(); // prevent default link navigation
|
|
83
|
+
|
|
72
84
|
_this.props.scrollToItem(null)('instructions');
|
|
73
85
|
};
|
|
74
86
|
|
|
@@ -115,11 +127,12 @@ export var Sidebar = (_dec = themeable(theme, styles), _dec(_class = (_temp = _c
|
|
|
115
127
|
value: function renderTitle() {
|
|
116
128
|
return /*#__PURE__*/React.createElement("div", {
|
|
117
129
|
className: styles.actionableInfo
|
|
118
|
-
}, /*#__PURE__*/React.createElement(
|
|
119
|
-
|
|
130
|
+
}, /*#__PURE__*/React.createElement(Link, {
|
|
131
|
+
href: "#",
|
|
132
|
+
margin: "small",
|
|
133
|
+
forceButtonRole: false,
|
|
120
134
|
onClick: this.scrollToTitle,
|
|
121
|
-
|
|
122
|
-
variant: "icon"
|
|
135
|
+
renderIcon: _ref
|
|
123
136
|
}, /*#__PURE__*/React.createElement(ScreenReaderContent, null, t('Scroll to title'))), /*#__PURE__*/React.createElement(PresentationContent, null, /*#__PURE__*/React.createElement("span", {
|
|
124
137
|
className: styles.description,
|
|
125
138
|
onClick: this.scrollToTitle,
|
|
@@ -131,12 +144,13 @@ export var Sidebar = (_dec = themeable(theme, styles), _dec(_class = (_temp = _c
|
|
|
131
144
|
value: function renderInstructions() {
|
|
132
145
|
return /*#__PURE__*/React.createElement("div", {
|
|
133
146
|
className: styles.actionableInfo
|
|
134
|
-
}, /*#__PURE__*/React.createElement(
|
|
135
|
-
|
|
147
|
+
}, /*#__PURE__*/React.createElement(Link, {
|
|
148
|
+
href: "#",
|
|
149
|
+
margin: "small",
|
|
150
|
+
forceButtonRole: false,
|
|
136
151
|
onClick: this.scrollToInfo,
|
|
137
|
-
|
|
138
|
-
"data-automation": "sidebar-instructions-button"
|
|
139
|
-
variant: "icon"
|
|
152
|
+
renderIcon: _ref2,
|
|
153
|
+
"data-automation": "sidebar-instructions-button"
|
|
140
154
|
}, /*#__PURE__*/React.createElement(ScreenReaderContent, null, t('Scroll to instructions'))), /*#__PURE__*/React.createElement(PresentationContent, null, /*#__PURE__*/React.createElement("span", {
|
|
141
155
|
className: styles.description,
|
|
142
156
|
"data-automation": "sidebar-instructions-text",
|
|
@@ -239,7 +253,7 @@ export var Sidebar = (_dec = themeable(theme, styles), _dec(_class = (_temp = _c
|
|
|
239
253
|
size: "x-small",
|
|
240
254
|
"aria-label": t('Pinned Questions'),
|
|
241
255
|
role: "img"
|
|
242
|
-
},
|
|
256
|
+
}, _ref3))), /*#__PURE__*/React.createElement("div", {
|
|
243
257
|
className: closedClasses
|
|
244
258
|
}, pinnedItems.map(function (pin) {
|
|
245
259
|
return /*#__PURE__*/React.createElement(Pin, {
|
|
@@ -11,7 +11,7 @@ import PropTypes from 'prop-types';
|
|
|
11
11
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
12
12
|
import classNames from 'classnames';
|
|
13
13
|
import { AccessibleContent } from '@instructure/ui-a11y-content';
|
|
14
|
-
import {
|
|
14
|
+
import { Link } from '@instructure/ui-link';
|
|
15
15
|
import { Flex } from '@instructure/ui-flex';
|
|
16
16
|
import { themeable } from '@instructure/ui-themeable';
|
|
17
17
|
import PositionSummary from "../PositionSummary/index.js";
|
|
@@ -53,6 +53,8 @@ export var SidebarItem = (_dec = themeable(theme, styles), _dec(_class = (_temp
|
|
|
53
53
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
54
54
|
|
|
55
55
|
_this.scrollToItem = function (e) {
|
|
56
|
+
e.preventDefault(); // prevent default link navigation
|
|
57
|
+
|
|
56
58
|
if (_this.props.preventScrollToItem) {
|
|
57
59
|
return;
|
|
58
60
|
} // this can be a real scroll or a oqaat change
|
|
@@ -106,12 +108,14 @@ export var SidebarItem = (_dec = themeable(theme, styles), _dec(_class = (_temp
|
|
|
106
108
|
var _this$props2 = this.props,
|
|
107
109
|
displayPosition = _this$props2.displayPosition,
|
|
108
110
|
itemId = _this$props2.itemId;
|
|
109
|
-
return /*#__PURE__*/React.createElement(
|
|
111
|
+
return /*#__PURE__*/React.createElement(Link, {
|
|
112
|
+
href: "#",
|
|
113
|
+
size: "small",
|
|
114
|
+
margin: "small",
|
|
115
|
+
isWithinText: false,
|
|
116
|
+
forceButtonRole: false,
|
|
110
117
|
onClick: this.scrollToItem,
|
|
111
118
|
"data-automation-item-id": itemId,
|
|
112
|
-
variant: "link",
|
|
113
|
-
size: "small",
|
|
114
|
-
margin: "xxx-small",
|
|
115
119
|
"data-automation": "sdk-sidebar-item-button"
|
|
116
120
|
}, /*#__PURE__*/React.createElement(AccessibleContent, {
|
|
117
121
|
alt: t('Scroll to item at position {displayPosition}', {
|
|
@@ -10,10 +10,9 @@ import PropTypes from 'prop-types';
|
|
|
10
10
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
11
11
|
import { IconTextLeftLine } from '@instructure/ui-icons';
|
|
12
12
|
import { themeable } from '@instructure/ui-themeable';
|
|
13
|
-
import {
|
|
13
|
+
import { Link } from '@instructure/ui-link';
|
|
14
14
|
import { Flex } from '@instructure/ui-flex';
|
|
15
15
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
16
|
-
import keyboardClickable from "../../../../../common/util/keyboardClickable.js";
|
|
17
16
|
import Collection from "./Collection/index.js";
|
|
18
17
|
import Title from "./Title/index.js";
|
|
19
18
|
import Summary from "./Summary/index.js";
|
|
@@ -31,6 +30,11 @@ var styles = {
|
|
|
31
30
|
import theme from "./theme.js";
|
|
32
31
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
33
32
|
export var DISPLAY_AS_SUMMARY_LIMIT = 5;
|
|
33
|
+
|
|
34
|
+
var _ref = /*#__PURE__*/React.createElement(IconTextLeftLine, {
|
|
35
|
+
color: "primary"
|
|
36
|
+
});
|
|
37
|
+
|
|
34
38
|
export var SidebarStimulus = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
35
39
|
_inherits(SidebarStimulus, _Component);
|
|
36
40
|
|
|
@@ -48,8 +52,10 @@ export var SidebarStimulus = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
48
52
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
49
53
|
|
|
50
54
|
_this.scrollToItem = function (e) {
|
|
55
|
+
e.preventDefault(); // prevent default link navigation
|
|
51
56
|
// this can be a real scroll or a oqaat change
|
|
52
57
|
// depending on whether is is oqaat or not
|
|
58
|
+
|
|
53
59
|
_this.props.scrollToItem(_this.props.stimulusParent.id);
|
|
54
60
|
|
|
55
61
|
e.stopPropagation();
|
|
@@ -85,11 +91,12 @@ export var SidebarStimulus = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
85
91
|
key: "renderButton",
|
|
86
92
|
value: function renderButton() {
|
|
87
93
|
var displayPosition = this.props.displayPosition;
|
|
88
|
-
return /*#__PURE__*/React.createElement(
|
|
89
|
-
|
|
94
|
+
return /*#__PURE__*/React.createElement(Link, {
|
|
95
|
+
href: "#",
|
|
96
|
+
margin: "small",
|
|
97
|
+
forceButtonRole: false,
|
|
90
98
|
onClick: this.scrollToItem,
|
|
91
|
-
|
|
92
|
-
variant: "icon"
|
|
99
|
+
renderIcon: _ref
|
|
93
100
|
}, /*#__PURE__*/React.createElement(ScreenReaderContent, null, t('Scroll to stimulus at position { displayPosition }', {
|
|
94
101
|
displayPosition: displayPosition
|
|
95
102
|
})));
|
|
@@ -149,7 +149,8 @@ export var StimulusEditInfo = (_dec = themeable(theme, styles), _dec(_class = (_
|
|
|
149
149
|
messages: this.inputErrors('onSelf'),
|
|
150
150
|
description: /*#__PURE__*/React.createElement(ScreenReaderContent, null, t('Edit Stimulus'))
|
|
151
151
|
}, /*#__PURE__*/React.createElement(Heading, {
|
|
152
|
-
level: "h3"
|
|
152
|
+
level: "h3",
|
|
153
|
+
as: "h2"
|
|
153
154
|
}, this.headerText()), /*#__PURE__*/React.createElement("div", {
|
|
154
155
|
className: styles.section
|
|
155
156
|
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
@@ -4,6 +4,7 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
|
4
4
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
5
|
import React, { Component } from 'react';
|
|
6
6
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
7
|
+
import { Heading } from '@instructure/ui-heading';
|
|
7
8
|
import { Text } from '@instructure/ui-text';
|
|
8
9
|
import { View } from '@instructure/ui-view';
|
|
9
10
|
import { RichContentRenderer } from '@instructure/quiz-rce';
|
|
@@ -46,10 +47,14 @@ var StimulusShowInfo = /*#__PURE__*/function (_Component) {
|
|
|
46
47
|
}, this.props.stimulus.instructions))));
|
|
47
48
|
return /*#__PURE__*/React.createElement(View, {
|
|
48
49
|
as: "div"
|
|
49
|
-
}, /*#__PURE__*/React.createElement(
|
|
50
|
+
}, this.props.stimulus.title && /*#__PURE__*/React.createElement(Heading, {
|
|
51
|
+
level: "h3",
|
|
52
|
+
as: "h2",
|
|
50
53
|
color: "primary",
|
|
51
|
-
|
|
52
|
-
|
|
54
|
+
margin: "0 0 small",
|
|
55
|
+
theme: {
|
|
56
|
+
h2FontWeight: '700'
|
|
57
|
+
}
|
|
53
58
|
}, this.props.stimulus.title), instructions, /*#__PURE__*/React.createElement("div", {
|
|
54
59
|
"data-automation": "sdk-stimulus-LeftPanelShow-content"
|
|
55
60
|
}, /*#__PURE__*/React.createElement(RichContentRenderer, {
|
|
@@ -324,7 +324,8 @@ var QuizEntryShow = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles),
|
|
|
324
324
|
className: styles.connectingLines
|
|
325
325
|
}), /*#__PURE__*/_react.default.createElement(_PositionBox.default, {
|
|
326
326
|
position: positionToDisplay,
|
|
327
|
-
headingText: positionText
|
|
327
|
+
headingText: positionText,
|
|
328
|
+
headingLevel: quizEntry.isInStimulus ? 'h3' : 'h2'
|
|
328
329
|
}), this.renderLeftHeader(), /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
329
330
|
connectDragSource: this.props.connectDragSource,
|
|
330
331
|
displayPosition: this.props.displayPosition,
|
|
@@ -35,6 +35,8 @@ var _uiA11yContent = require("@instructure/ui-a11y-content");
|
|
|
35
35
|
|
|
36
36
|
var _uiButtons = require("@instructure/ui-buttons");
|
|
37
37
|
|
|
38
|
+
var _uiLink = require("@instructure/ui-link");
|
|
39
|
+
|
|
38
40
|
var _uiText = require("@instructure/ui-text");
|
|
39
41
|
|
|
40
42
|
var _uiView = require("@instructure/ui-view");
|
|
@@ -43,8 +45,6 @@ var _uiThemeable = require("@instructure/ui-themeable");
|
|
|
43
45
|
|
|
44
46
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
45
47
|
|
|
46
|
-
var _keyboardClickable = _interopRequireDefault(require("../../../../util/keyboardClickable.js"));
|
|
47
|
-
|
|
48
48
|
var _windowChecks = require("../../../../util/windowChecks.js");
|
|
49
49
|
|
|
50
50
|
var _CustomPropTypes = _interopRequireDefault(require("../../../../util/CustomPropTypes.js"));
|
|
@@ -79,7 +79,15 @@ var styles = {
|
|
|
79
79
|
'commonContainer': 'jUsaR_eYHq'
|
|
80
80
|
};
|
|
81
81
|
|
|
82
|
-
var _ref = /*#__PURE__*/_react.default.createElement(_uiIcons.
|
|
82
|
+
var _ref = /*#__PURE__*/_react.default.createElement(_uiIcons.IconQuizTitleLine, {
|
|
83
|
+
color: "primary"
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
var _ref2 = /*#__PURE__*/_react.default.createElement(_uiIcons.IconQuizInstructionsLine, {
|
|
87
|
+
color: "primary"
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
var _ref3 = /*#__PURE__*/_react.default.createElement(_uiIcons.IconPinSolid, null);
|
|
83
91
|
|
|
84
92
|
var Sidebar = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
85
93
|
(0, _inherits2.default)(Sidebar, _Component);
|
|
@@ -97,11 +105,15 @@ var Sidebar = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(
|
|
|
97
105
|
|
|
98
106
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
99
107
|
|
|
100
|
-
_this.scrollToTitle = function () {
|
|
108
|
+
_this.scrollToTitle = function (e) {
|
|
109
|
+
e.preventDefault(); // prevent default link navigation
|
|
110
|
+
|
|
101
111
|
_this.props.scrollToItem(null)('title');
|
|
102
112
|
};
|
|
103
113
|
|
|
104
|
-
_this.scrollToInfo = function () {
|
|
114
|
+
_this.scrollToInfo = function (e) {
|
|
115
|
+
e.preventDefault(); // prevent default link navigation
|
|
116
|
+
|
|
105
117
|
_this.props.scrollToItem(null)('instructions');
|
|
106
118
|
};
|
|
107
119
|
|
|
@@ -148,11 +160,12 @@ var Sidebar = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(
|
|
|
148
160
|
value: function renderTitle() {
|
|
149
161
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
150
162
|
className: styles.actionableInfo
|
|
151
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
152
|
-
|
|
163
|
+
}, /*#__PURE__*/_react.default.createElement(_uiLink.Link, {
|
|
164
|
+
href: "#",
|
|
165
|
+
margin: "small",
|
|
166
|
+
forceButtonRole: false,
|
|
153
167
|
onClick: this.scrollToTitle,
|
|
154
|
-
|
|
155
|
-
variant: "icon"
|
|
168
|
+
renderIcon: _ref
|
|
156
169
|
}, /*#__PURE__*/_react.default.createElement(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage.default)('Scroll to title'))), /*#__PURE__*/_react.default.createElement(_uiA11yContent.PresentationContent, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
157
170
|
className: styles.description,
|
|
158
171
|
onClick: this.scrollToTitle,
|
|
@@ -164,12 +177,13 @@ var Sidebar = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(
|
|
|
164
177
|
value: function renderInstructions() {
|
|
165
178
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
166
179
|
className: styles.actionableInfo
|
|
167
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
168
|
-
|
|
180
|
+
}, /*#__PURE__*/_react.default.createElement(_uiLink.Link, {
|
|
181
|
+
href: "#",
|
|
182
|
+
margin: "small",
|
|
183
|
+
forceButtonRole: false,
|
|
169
184
|
onClick: this.scrollToInfo,
|
|
170
|
-
|
|
171
|
-
"data-automation": "sidebar-instructions-button"
|
|
172
|
-
variant: "icon"
|
|
185
|
+
renderIcon: _ref2,
|
|
186
|
+
"data-automation": "sidebar-instructions-button"
|
|
173
187
|
}, /*#__PURE__*/_react.default.createElement(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage.default)('Scroll to instructions'))), /*#__PURE__*/_react.default.createElement(_uiA11yContent.PresentationContent, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
174
188
|
className: styles.description,
|
|
175
189
|
"data-automation": "sidebar-instructions-text",
|
|
@@ -273,7 +287,7 @@ var Sidebar = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(
|
|
|
273
287
|
size: "x-small",
|
|
274
288
|
"aria-label": (0, _formatMessage.default)('Pinned Questions'),
|
|
275
289
|
role: "img"
|
|
276
|
-
},
|
|
290
|
+
}, _ref3))), /*#__PURE__*/_react.default.createElement("div", {
|
|
277
291
|
className: closedClasses
|
|
278
292
|
}, pinnedItems.map(function (pin) {
|
|
279
293
|
return /*#__PURE__*/_react.default.createElement(_Pin.default, {
|
|
@@ -29,7 +29,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
29
29
|
|
|
30
30
|
var _uiA11yContent = require("@instructure/ui-a11y-content");
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _uiLink = require("@instructure/ui-link");
|
|
33
33
|
|
|
34
34
|
var _uiFlex = require("@instructure/ui-flex");
|
|
35
35
|
|
|
@@ -81,6 +81,8 @@ var SidebarItem = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _
|
|
|
81
81
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
82
82
|
|
|
83
83
|
_this.scrollToItem = function (e) {
|
|
84
|
+
e.preventDefault(); // prevent default link navigation
|
|
85
|
+
|
|
84
86
|
if (_this.props.preventScrollToItem) {
|
|
85
87
|
return;
|
|
86
88
|
} // this can be a real scroll or a oqaat change
|
|
@@ -134,12 +136,14 @@ var SidebarItem = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _
|
|
|
134
136
|
var _this$props2 = this.props,
|
|
135
137
|
displayPosition = _this$props2.displayPosition,
|
|
136
138
|
itemId = _this$props2.itemId;
|
|
137
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
139
|
+
return /*#__PURE__*/_react.default.createElement(_uiLink.Link, {
|
|
140
|
+
href: "#",
|
|
141
|
+
size: "small",
|
|
142
|
+
margin: "small",
|
|
143
|
+
isWithinText: false,
|
|
144
|
+
forceButtonRole: false,
|
|
138
145
|
onClick: this.scrollToItem,
|
|
139
146
|
"data-automation-item-id": itemId,
|
|
140
|
-
variant: "link",
|
|
141
|
-
size: "small",
|
|
142
|
-
margin: "xxx-small",
|
|
143
147
|
"data-automation": "sdk-sidebar-item-button"
|
|
144
148
|
}, /*#__PURE__*/_react.default.createElement(_uiA11yContent.AccessibleContent, {
|
|
145
149
|
alt: (0, _formatMessage.default)('Scroll to item at position {displayPosition}', {
|
|
@@ -27,14 +27,12 @@ var _uiIcons = require("@instructure/ui-icons");
|
|
|
27
27
|
|
|
28
28
|
var _uiThemeable = require("@instructure/ui-themeable");
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _uiLink = require("@instructure/ui-link");
|
|
31
31
|
|
|
32
32
|
var _uiFlex = require("@instructure/ui-flex");
|
|
33
33
|
|
|
34
34
|
var _uiA11yContent = require("@instructure/ui-a11y-content");
|
|
35
35
|
|
|
36
|
-
var _keyboardClickable = _interopRequireDefault(require("../../../../../common/util/keyboardClickable.js"));
|
|
37
|
-
|
|
38
36
|
var _index = _interopRequireDefault(require("./Collection/index.js"));
|
|
39
37
|
|
|
40
38
|
var _index2 = _interopRequireDefault(require("./Title/index.js"));
|
|
@@ -60,6 +58,11 @@ var styles = {
|
|
|
60
58
|
};
|
|
61
59
|
var DISPLAY_AS_SUMMARY_LIMIT = 5;
|
|
62
60
|
exports.DISPLAY_AS_SUMMARY_LIMIT = DISPLAY_AS_SUMMARY_LIMIT;
|
|
61
|
+
|
|
62
|
+
var _ref = /*#__PURE__*/_react.default.createElement(_uiIcons.IconTextLeftLine, {
|
|
63
|
+
color: "primary"
|
|
64
|
+
});
|
|
65
|
+
|
|
63
66
|
var SidebarStimulus = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
64
67
|
(0, _inherits2.default)(SidebarStimulus, _Component);
|
|
65
68
|
|
|
@@ -77,8 +80,10 @@ var SidebarStimulus = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
77
80
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
78
81
|
|
|
79
82
|
_this.scrollToItem = function (e) {
|
|
83
|
+
e.preventDefault(); // prevent default link navigation
|
|
80
84
|
// this can be a real scroll or a oqaat change
|
|
81
85
|
// depending on whether is is oqaat or not
|
|
86
|
+
|
|
82
87
|
_this.props.scrollToItem(_this.props.stimulusParent.id);
|
|
83
88
|
|
|
84
89
|
e.stopPropagation();
|
|
@@ -114,11 +119,12 @@ var SidebarStimulus = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
114
119
|
key: "renderButton",
|
|
115
120
|
value: function renderButton() {
|
|
116
121
|
var displayPosition = this.props.displayPosition;
|
|
117
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
118
|
-
|
|
122
|
+
return /*#__PURE__*/_react.default.createElement(_uiLink.Link, {
|
|
123
|
+
href: "#",
|
|
124
|
+
margin: "small",
|
|
125
|
+
forceButtonRole: false,
|
|
119
126
|
onClick: this.scrollToItem,
|
|
120
|
-
|
|
121
|
-
variant: "icon"
|
|
127
|
+
renderIcon: _ref
|
|
122
128
|
}, /*#__PURE__*/_react.default.createElement(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage.default)('Scroll to stimulus at position { displayPosition }', {
|
|
123
129
|
displayPosition: displayPosition
|
|
124
130
|
})));
|
|
@@ -182,7 +182,8 @@ var StimulusEditInfo = (_dec = (0, _uiThemeable.themeable)(_theme.default, style
|
|
|
182
182
|
messages: this.inputErrors('onSelf'),
|
|
183
183
|
description: /*#__PURE__*/_react.default.createElement(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage.default)('Edit Stimulus'))
|
|
184
184
|
}, /*#__PURE__*/_react.default.createElement(_uiHeading.Heading, {
|
|
185
|
-
level: "h3"
|
|
185
|
+
level: "h3",
|
|
186
|
+
as: "h2"
|
|
186
187
|
}, this.headerText()), /*#__PURE__*/_react.default.createElement("div", {
|
|
187
188
|
className: styles.section
|
|
188
189
|
}, /*#__PURE__*/_react.default.createElement(_uiTextInput.TextInput, {
|
|
@@ -21,6 +21,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
21
21
|
|
|
22
22
|
var _reactImmutableProptypes = _interopRequireDefault(require("react-immutable-proptypes"));
|
|
23
23
|
|
|
24
|
+
var _uiHeading = require("@instructure/ui-heading");
|
|
25
|
+
|
|
24
26
|
var _uiText = require("@instructure/ui-text");
|
|
25
27
|
|
|
26
28
|
var _uiView = require("@instructure/ui-view");
|
|
@@ -67,10 +69,14 @@ var StimulusShowInfo = /*#__PURE__*/function (_Component) {
|
|
|
67
69
|
|
|
68
70
|
return /*#__PURE__*/_react.default.createElement(_uiView.View, {
|
|
69
71
|
as: "div"
|
|
70
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
72
|
+
}, this.props.stimulus.title && /*#__PURE__*/_react.default.createElement(_uiHeading.Heading, {
|
|
73
|
+
level: "h3",
|
|
74
|
+
as: "h2",
|
|
71
75
|
color: "primary",
|
|
72
|
-
|
|
73
|
-
|
|
76
|
+
margin: "0 0 small",
|
|
77
|
+
theme: {
|
|
78
|
+
h2FontWeight: '700'
|
|
79
|
+
}
|
|
74
80
|
}, this.props.stimulus.title), instructions, /*#__PURE__*/_react.default.createElement("div", {
|
|
75
81
|
"data-automation": "sdk-stimulus-LeftPanelShow-content"
|
|
76
82
|
}, /*#__PURE__*/_react.default.createElement(_quizRce.RichContentRenderer, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "17.36.1-rc.
|
|
3
|
+
"version": "17.36.1-rc.8+1d56b76b1",
|
|
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.36.1-rc.
|
|
45
|
-
"@instructure/quiz-i18n": "17.36.1-rc.
|
|
46
|
-
"@instructure/quiz-interactions": "17.36.1-rc.
|
|
47
|
-
"@instructure/quiz-number-input": "17.36.1-rc.
|
|
48
|
-
"@instructure/quiz-rce": "17.36.1-rc.
|
|
44
|
+
"@instructure/quiz-common": "17.36.1-rc.8+1d56b76b1",
|
|
45
|
+
"@instructure/quiz-i18n": "17.36.1-rc.8+1d56b76b1",
|
|
46
|
+
"@instructure/quiz-interactions": "17.36.1-rc.8+1d56b76b1",
|
|
47
|
+
"@instructure/quiz-number-input": "17.36.1-rc.8+1d56b76b1",
|
|
48
|
+
"@instructure/quiz-rce": "17.36.1-rc.8+1d56b76b1",
|
|
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.36.1-rc.
|
|
109
|
+
"instructure-validations": "17.36.1-rc.8+1d56b76b1",
|
|
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.36.1-rc.
|
|
140
|
+
"@instructure/quiz-scripts": "17.36.1-rc.8+1d56b76b1",
|
|
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.36.1-rc.
|
|
159
|
+
"quiz-presets": "17.36.1-rc.8+1d56b76b1",
|
|
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": "1d56b76b1320ded62cfaff30f4635ac07f88181b"
|
|
176
176
|
}
|