@instructure/quiz-core 17.34.1-rc.0 → 17.34.1-rc.1
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/DeleteStimulusModal/presenter.js +2 -2
- package/es/common/components/resources/quiz/AddContent/Button/index.js +6 -6
- package/es/common/components/resources/quiz/AddContent/Button/theme.js +1 -0
- package/es/common/components/resources/stimulus/StimulusEdit/presenter.js +5 -10
- package/lib/building/components/resources/DeleteStimulusModal/presenter.js +2 -2
- package/lib/common/components/resources/quiz/AddContent/Button/index.js +6 -6
- package/lib/common/components/resources/quiz/AddContent/Button/theme.js +1 -0
- package/lib/common/components/resources/stimulus/StimulusEdit/presenter.js +5 -10
- package/package.json +10 -10
|
@@ -179,7 +179,7 @@ export var DeleteStimulusModal = (_dec = themeable(theme, styles), _dec(_class =
|
|
|
179
179
|
return /*#__PURE__*/React.createElement(Button, {
|
|
180
180
|
onClick: this.closeAction,
|
|
181
181
|
margin: XSMALL_SIDE_MARGIN
|
|
182
|
-
}, t('
|
|
182
|
+
}, t('Keep Stimulus'));
|
|
183
183
|
}
|
|
184
184
|
}, {
|
|
185
185
|
key: "doneButton",
|
|
@@ -194,7 +194,7 @@ export var DeleteStimulusModal = (_dec = themeable(theme, styles), _dec(_class =
|
|
|
194
194
|
onClick: this.handleSubmit,
|
|
195
195
|
margin: XSMALL_SIDE_MARGIN,
|
|
196
196
|
"data-automation": "sdk-stimulus-doneButton"
|
|
197
|
-
}, t('
|
|
197
|
+
}, t('Remove Stimulus'));
|
|
198
198
|
}
|
|
199
199
|
}, {
|
|
200
200
|
key: "renderChooseWhich",
|
|
@@ -15,14 +15,14 @@ import { Button } from '@instructure/ui-buttons';
|
|
|
15
15
|
import { themeable } from '@instructure/ui-themeable';
|
|
16
16
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
17
17
|
var styles = {
|
|
18
|
-
componentId: '
|
|
18
|
+
componentId: 'cIWJr',
|
|
19
19
|
template: function template(theme) {
|
|
20
|
-
return "\n\n.
|
|
20
|
+
return "\n\n.cIWJr_ePYF{background-color:".concat(theme.newItemButtonBackgroundColor || 'inherit', ";border:none;border-radius:").concat(theme.newItemButtonBorderRadius || 'inherit', ";box-shadow:").concat(theme.newItemButtonBoxShadow || 'inherit', ";color:").concat(theme.newItemButtonColor || 'inherit', ";font-size:").concat(theme.newItemButtonFontSize || 'inherit', ";font-weight:").concat(theme.newItemButtonFontWeight || 'inherit', ";line-height:0;margin:").concat(theme.newItemButtonMargin || 'inherit', ";padding:").concat(theme.newItemButtonPadding || 'inherit', ";text-align:center;transform:rotate(0deg);transition:").concat(theme.newItemButtonTransition || 'inherit', ";z-index:").concat(theme.newItemButtonZIndex || 'inherit', "}\n\n[dir=ltr] .cIWJr_ePYF,[dir=rtl] .cIWJr_ePYF{text-align:center}\n\n.cIWJr_ePYF:focus{outline:").concat(theme.newItemButtonFocusOutline || 'inherit', ";outline-offset:").concat(theme.newItemButtonFocusOutlineOffset || 'inherit', "}\n\n.cIWJr_ePYF.cIWJr_cwUE{background-color:").concat(theme.newItemButtonEditingBackgroundColor || 'inherit', ";transform:rotate(45deg);transition:").concat(theme.newItemButtonTransition || 'inherit', "}\n\n.cIWJr_ekys{display:flex;justify-content:center;margin-top:-1.5rem;width:100%;z-index:").concat(theme.newItemButtonHolderZIndex || 'inherit', "}\n\n.cIWJr_egTu{display:flex;justify-content:center;width:100%;z-index:").concat(theme.attachQuestionButtonHolderZIndex || 'inherit', "}\n\n@media print{.cIWJr_egTu,.cIWJr_ekys{display:none}}");
|
|
21
21
|
},
|
|
22
|
-
'newItemButton': '
|
|
23
|
-
'newItemButtonEditing': '
|
|
24
|
-
'newItemButtonHolder': '
|
|
25
|
-
'attachQuestionButtonHolder': '
|
|
22
|
+
'newItemButton': 'cIWJr_ePYF',
|
|
23
|
+
'newItemButtonEditing': 'cIWJr_cwUE',
|
|
24
|
+
'newItemButtonHolder': 'cIWJr_ekys',
|
|
25
|
+
'attachQuestionButtonHolder': 'cIWJr_egTu'
|
|
26
26
|
};
|
|
27
27
|
import theme from "./theme.js";
|
|
28
28
|
export var AddContentButton = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
@@ -12,6 +12,7 @@ export default function generator(_ref) {
|
|
|
12
12
|
newItemButtonBorderRadius: spacing.large,
|
|
13
13
|
newItemButtonColor: colors.white,
|
|
14
14
|
newItemButtonFocusOutline: "2px solid ".concat(colors.brand),
|
|
15
|
+
newItemButtonFocusOutlineOffset: spacing.xxxSmall,
|
|
15
16
|
newItemButtonFontSize: typography.fontSizeMedium,
|
|
16
17
|
newItemButtonFontWeight: typography.fontWeightBold,
|
|
17
18
|
newItemButtonZIndex: '4444',
|
|
@@ -90,8 +90,8 @@ export var StimulusEdit = (_dec = themeable(theme, styles), _dec(_class = (_temp
|
|
|
90
90
|
}, {
|
|
91
91
|
title: t('Confirm Stimulus Removal'),
|
|
92
92
|
text: t('Are you sure you want to remove this stimulus?'),
|
|
93
|
-
continueText: t('
|
|
94
|
-
cancelText: t('
|
|
93
|
+
continueText: t('Remove Stimulus'),
|
|
94
|
+
cancelText: t('Keep Stimulus')
|
|
95
95
|
});
|
|
96
96
|
};
|
|
97
97
|
|
|
@@ -366,11 +366,6 @@ export var StimulusEdit = (_dec = themeable(theme, styles), _dec(_class = (_temp
|
|
|
366
366
|
this.createNextQuizEntry();
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
}, {
|
|
370
|
-
key: "saveText",
|
|
371
|
-
value: function saveText() {
|
|
372
|
-
return this.props.stimulus.isTemporary() ? t('Add Stimulus') : t('Save Stimulus');
|
|
373
|
-
}
|
|
374
369
|
}, {
|
|
375
370
|
key: "renderAddToBankModal",
|
|
376
371
|
value: function renderAddToBankModal() {
|
|
@@ -438,14 +433,14 @@ export var StimulusEdit = (_dec = themeable(theme, styles), _dec(_class = (_temp
|
|
|
438
433
|
type: "button",
|
|
439
434
|
onClick: this.onCancel,
|
|
440
435
|
"data-automation": "sdk-stimulus-discardButton"
|
|
441
|
-
}, t('
|
|
436
|
+
}, t('Cancel'))), /*#__PURE__*/React.createElement("div", {
|
|
442
437
|
className: styles.buttonWrapper
|
|
443
438
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
444
439
|
type: "button",
|
|
445
440
|
variant: "primary",
|
|
446
441
|
disabled: !this.state.canSubmit,
|
|
447
442
|
onClick: this.onSubmit
|
|
448
|
-
},
|
|
443
|
+
}, t('Done')))));
|
|
449
444
|
}
|
|
450
445
|
}, {
|
|
451
446
|
key: "render",
|
|
@@ -511,7 +506,7 @@ export var StimulusEdit = (_dec = themeable(theme, styles), _dec(_class = (_temp
|
|
|
511
506
|
shouldFocusOnMount: PropTypes.bool.isRequired
|
|
512
507
|
}, _class2.defaultProps = {
|
|
513
508
|
bankEntryWarningWrapperProps: function bankEntryWarningWrapperProps() {},
|
|
514
|
-
errorsShowing:
|
|
509
|
+
errorsShowing: false,
|
|
515
510
|
isBankedContent: false,
|
|
516
511
|
nextQuizEntry: null
|
|
517
512
|
}, _temp)) || _class);
|
|
@@ -208,7 +208,7 @@ var DeleteStimulusModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, st
|
|
|
208
208
|
return /*#__PURE__*/_react.default.createElement(_uiButtons.Button, {
|
|
209
209
|
onClick: this.closeAction,
|
|
210
210
|
margin: _quizCommon.XSMALL_SIDE_MARGIN
|
|
211
|
-
}, (0, _formatMessage.default)('
|
|
211
|
+
}, (0, _formatMessage.default)('Keep Stimulus'));
|
|
212
212
|
}
|
|
213
213
|
}, {
|
|
214
214
|
key: "doneButton",
|
|
@@ -223,7 +223,7 @@ var DeleteStimulusModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, st
|
|
|
223
223
|
onClick: this.handleSubmit,
|
|
224
224
|
margin: _quizCommon.XSMALL_SIDE_MARGIN,
|
|
225
225
|
"data-automation": "sdk-stimulus-doneButton"
|
|
226
|
-
}, (0, _formatMessage.default)('
|
|
226
|
+
}, (0, _formatMessage.default)('Remove Stimulus'));
|
|
227
227
|
}
|
|
228
228
|
}, {
|
|
229
229
|
key: "renderChooseWhich",
|
|
@@ -40,14 +40,14 @@ var _theme = _interopRequireDefault(require("./theme.js"));
|
|
|
40
40
|
var _dec, _class, _class2, _temp;
|
|
41
41
|
|
|
42
42
|
var styles = {
|
|
43
|
-
componentId: '
|
|
43
|
+
componentId: 'cIWJr',
|
|
44
44
|
template: function template(theme) {
|
|
45
|
-
return "\n\n.
|
|
45
|
+
return "\n\n.cIWJr_ePYF{background-color:".concat(theme.newItemButtonBackgroundColor || 'inherit', ";border:none;border-radius:").concat(theme.newItemButtonBorderRadius || 'inherit', ";box-shadow:").concat(theme.newItemButtonBoxShadow || 'inherit', ";color:").concat(theme.newItemButtonColor || 'inherit', ";font-size:").concat(theme.newItemButtonFontSize || 'inherit', ";font-weight:").concat(theme.newItemButtonFontWeight || 'inherit', ";line-height:0;margin:").concat(theme.newItemButtonMargin || 'inherit', ";padding:").concat(theme.newItemButtonPadding || 'inherit', ";text-align:center;transform:rotate(0deg);transition:").concat(theme.newItemButtonTransition || 'inherit', ";z-index:").concat(theme.newItemButtonZIndex || 'inherit', "}\n\n[dir=ltr] .cIWJr_ePYF,[dir=rtl] .cIWJr_ePYF{text-align:center}\n\n.cIWJr_ePYF:focus{outline:").concat(theme.newItemButtonFocusOutline || 'inherit', ";outline-offset:").concat(theme.newItemButtonFocusOutlineOffset || 'inherit', "}\n\n.cIWJr_ePYF.cIWJr_cwUE{background-color:").concat(theme.newItemButtonEditingBackgroundColor || 'inherit', ";transform:rotate(45deg);transition:").concat(theme.newItemButtonTransition || 'inherit', "}\n\n.cIWJr_ekys{display:flex;justify-content:center;margin-top:-1.5rem;width:100%;z-index:").concat(theme.newItemButtonHolderZIndex || 'inherit', "}\n\n.cIWJr_egTu{display:flex;justify-content:center;width:100%;z-index:").concat(theme.attachQuestionButtonHolderZIndex || 'inherit', "}\n\n@media print{.cIWJr_egTu,.cIWJr_ekys{display:none}}");
|
|
46
46
|
},
|
|
47
|
-
'newItemButton': '
|
|
48
|
-
'newItemButtonEditing': '
|
|
49
|
-
'newItemButtonHolder': '
|
|
50
|
-
'attachQuestionButtonHolder': '
|
|
47
|
+
'newItemButton': 'cIWJr_ePYF',
|
|
48
|
+
'newItemButtonEditing': 'cIWJr_cwUE',
|
|
49
|
+
'newItemButtonHolder': 'cIWJr_ekys',
|
|
50
|
+
'attachQuestionButtonHolder': 'cIWJr_egTu'
|
|
51
51
|
};
|
|
52
52
|
var AddContentButton = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
53
53
|
(0, _inherits2.default)(AddContentButton, _Component);
|
|
@@ -19,6 +19,7 @@ function generator(_ref) {
|
|
|
19
19
|
newItemButtonBorderRadius: spacing.large,
|
|
20
20
|
newItemButtonColor: colors.white,
|
|
21
21
|
newItemButtonFocusOutline: "2px solid ".concat(colors.brand),
|
|
22
|
+
newItemButtonFocusOutlineOffset: spacing.xxxSmall,
|
|
22
23
|
newItemButtonFontSize: typography.fontSizeMedium,
|
|
23
24
|
newItemButtonFontWeight: typography.fontWeightBold,
|
|
24
25
|
newItemButtonZIndex: '4444',
|
|
@@ -127,8 +127,8 @@ var StimulusEdit = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles),
|
|
|
127
127
|
}, {
|
|
128
128
|
title: (0, _formatMessage.default)('Confirm Stimulus Removal'),
|
|
129
129
|
text: (0, _formatMessage.default)('Are you sure you want to remove this stimulus?'),
|
|
130
|
-
continueText: (0, _formatMessage.default)('
|
|
131
|
-
cancelText: (0, _formatMessage.default)('
|
|
130
|
+
continueText: (0, _formatMessage.default)('Remove Stimulus'),
|
|
131
|
+
cancelText: (0, _formatMessage.default)('Keep Stimulus')
|
|
132
132
|
});
|
|
133
133
|
};
|
|
134
134
|
|
|
@@ -403,11 +403,6 @@ var StimulusEdit = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles),
|
|
|
403
403
|
this.createNextQuizEntry();
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
|
-
}, {
|
|
407
|
-
key: "saveText",
|
|
408
|
-
value: function saveText() {
|
|
409
|
-
return this.props.stimulus.isTemporary() ? (0, _formatMessage.default)('Add Stimulus') : (0, _formatMessage.default)('Save Stimulus');
|
|
410
|
-
}
|
|
411
406
|
}, {
|
|
412
407
|
key: "renderAddToBankModal",
|
|
413
408
|
value: function renderAddToBankModal() {
|
|
@@ -475,14 +470,14 @@ var StimulusEdit = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles),
|
|
|
475
470
|
type: "button",
|
|
476
471
|
onClick: this.onCancel,
|
|
477
472
|
"data-automation": "sdk-stimulus-discardButton"
|
|
478
|
-
}, (0, _formatMessage.default)('
|
|
473
|
+
}, (0, _formatMessage.default)('Cancel'))), /*#__PURE__*/_react.default.createElement("div", {
|
|
479
474
|
className: styles.buttonWrapper
|
|
480
475
|
}, /*#__PURE__*/_react.default.createElement(_uiButtons.Button, {
|
|
481
476
|
type: "button",
|
|
482
477
|
variant: "primary",
|
|
483
478
|
disabled: !this.state.canSubmit,
|
|
484
479
|
onClick: this.onSubmit
|
|
485
|
-
},
|
|
480
|
+
}, (0, _formatMessage.default)('Done')))));
|
|
486
481
|
}
|
|
487
482
|
}, {
|
|
488
483
|
key: "render",
|
|
@@ -547,7 +542,7 @@ var StimulusEdit = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles),
|
|
|
547
542
|
shouldFocusOnMount: _propTypes.default.bool.isRequired
|
|
548
543
|
}, _class2.defaultProps = {
|
|
549
544
|
bankEntryWarningWrapperProps: function bankEntryWarningWrapperProps() {},
|
|
550
|
-
errorsShowing:
|
|
545
|
+
errorsShowing: false,
|
|
551
546
|
isBankedContent: false,
|
|
552
547
|
nextQuizEntry: null
|
|
553
548
|
}, _temp)) || _class);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "17.34.1-rc.
|
|
3
|
+
"version": "17.34.1-rc.1+7f6b13320",
|
|
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.34.1-rc.
|
|
45
|
-
"@instructure/quiz-i18n": "17.34.1-rc.
|
|
46
|
-
"@instructure/quiz-interactions": "17.34.1-rc.
|
|
47
|
-
"@instructure/quiz-number-input": "17.34.1-rc.
|
|
48
|
-
"@instructure/quiz-rce": "17.34.1-rc.
|
|
44
|
+
"@instructure/quiz-common": "17.34.1-rc.1+7f6b13320",
|
|
45
|
+
"@instructure/quiz-i18n": "17.34.1-rc.1+7f6b13320",
|
|
46
|
+
"@instructure/quiz-interactions": "17.34.1-rc.1+7f6b13320",
|
|
47
|
+
"@instructure/quiz-number-input": "17.34.1-rc.1+7f6b13320",
|
|
48
|
+
"@instructure/quiz-rce": "17.34.1-rc.1+7f6b13320",
|
|
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.34.1-rc.
|
|
109
|
+
"instructure-validations": "17.34.1-rc.1+7f6b13320",
|
|
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.34.1-rc.
|
|
140
|
+
"@instructure/quiz-scripts": "17.34.1-rc.1+7f6b13320",
|
|
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.34.1-rc.
|
|
159
|
+
"quiz-presets": "17.34.1-rc.1+7f6b13320",
|
|
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": "7f6b13320fe7b875959e48d8f92c1792541dd9e2"
|
|
176
176
|
}
|