@instructure/quiz-core 22.15.1 → 22.16.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.
- package/es/banks/components/AsyncSearch/index.js +0 -1
- package/es/banks/components/BanksList/presenter.js +2 -1
- package/es/banks/components/NavWrapper/presenter.js +3 -2
- package/es/banks/components/SharingModal/presenter.js +4 -6
- package/es/common/components/resources/sessionItemResult/ResultStimulus/styles.js +1 -0
- package/es/common/middleware/quizTimerWebSocketMiddleware.js +2 -3
- package/es/index.js +2 -0
- package/lib/banks/components/AsyncSearch/index.js +0 -1
- package/lib/banks/components/BanksList/presenter.js +2 -1
- package/lib/banks/components/NavWrapper/presenter.js +3 -2
- package/lib/banks/components/SharingModal/presenter.js +4 -6
- package/lib/common/components/resources/sessionItemResult/ResultStimulus/styles.js +1 -0
- package/lib/common/middleware/quizTimerWebSocketMiddleware.js +2 -3
- package/lib/index.js +2 -0
- package/package.json +12 -8
|
@@ -491,7 +491,8 @@ export var BanksList = /*#__PURE__*/ function(_superClass) {
|
|
|
491
491
|
}),
|
|
492
492
|
screenReaderLabel: t('Share bank {name}', {
|
|
493
493
|
name: bank.title
|
|
494
|
-
})
|
|
494
|
+
}),
|
|
495
|
+
ref: _this1.handleSharingButtonRef(bank.id)
|
|
495
496
|
})), bank.canEdit() ? bankEditOptions : null);
|
|
496
497
|
}
|
|
497
498
|
}), _define_property(_this1, "renderBank", function(bank) {
|
|
@@ -148,7 +148,8 @@ var NavWrapper = /*#__PURE__*/ function(Component) {
|
|
|
148
148
|
returnToUrl: returnToUrl,
|
|
149
149
|
id: "ReturnButton",
|
|
150
150
|
key: "ReturnButton",
|
|
151
|
-
iceTopNavBarEnabled: iceTopNavBarEnabled
|
|
151
|
+
iceTopNavBarEnabled: iceTopNavBarEnabled,
|
|
152
|
+
text: t('Return')
|
|
152
153
|
});
|
|
153
154
|
} else if (navigateToBuild) {
|
|
154
155
|
if (iceTopNavBarEnabled) {
|
|
@@ -168,7 +169,7 @@ var NavWrapper = /*#__PURE__*/ function(Component) {
|
|
|
168
169
|
{
|
|
169
170
|
key: "renderCloseButton",
|
|
170
171
|
value: function renderCloseButton() {
|
|
171
|
-
if (this.props.closeTray) {
|
|
172
|
+
if (this.props.closeTray && this.props.isCompact) {
|
|
172
173
|
return /*#__PURE__*/ jsx(CloseButton, {
|
|
173
174
|
elementRef: this.setCloseButtonRef,
|
|
174
175
|
placement: "start",
|
|
@@ -328,12 +328,9 @@ export var SharingModalPresenter = /*#__PURE__*/ function(Component) {
|
|
|
328
328
|
_this1.checkForSharedBanks();
|
|
329
329
|
});
|
|
330
330
|
}), _define_property(_this1, "modalDismissCleanup", function() {
|
|
331
|
-
var focusCreateBank = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
332
331
|
_this1.props.onDismiss();
|
|
333
|
-
if (_this1.props.modalTrigger
|
|
332
|
+
if (_this1.props.modalTrigger) {
|
|
334
333
|
_this1.props.modalTrigger.focus();
|
|
335
|
-
} else {
|
|
336
|
-
setTimeout(_this1.props.focusCreateBankButton, 100);
|
|
337
334
|
}
|
|
338
335
|
// removes the creator's temporary sharedBank record
|
|
339
336
|
_this1.props.removeSharedBank('-1');
|
|
@@ -462,7 +459,8 @@ export var SharingModalPresenter = /*#__PURE__*/ function(Component) {
|
|
|
462
459
|
onSelectionChange: _this1.handleSearchSelectionChange,
|
|
463
460
|
searchType: searchType,
|
|
464
461
|
selectedOption: _this1.state.searchSelection,
|
|
465
|
-
selectionFilter: _this1.handleSearchFilter
|
|
462
|
+
selectionFilter: _this1.handleSearchFilter,
|
|
463
|
+
searchLabel: t('Share With')
|
|
466
464
|
})), /*#__PURE__*/ jsx(Grid.Col, {
|
|
467
465
|
width: "auto"
|
|
468
466
|
}, /*#__PURE__*/ jsx(SimpleSelect, {
|
|
@@ -616,7 +614,7 @@ export var SharingModalPresenter = /*#__PURE__*/ function(Component) {
|
|
|
616
614
|
});
|
|
617
615
|
this.debouncedSearch();
|
|
618
616
|
}
|
|
619
|
-
if (prevState.searchValue !== this.state.searchValue || prevState.startingPoint !== this.state.startingPoint || prevState.selectedTabIndex !== this.state.selectedTabIndex || prevState.shares
|
|
617
|
+
if (prevState.searchValue !== this.state.searchValue || prevState.startingPoint !== this.state.startingPoint || prevState.selectedTabIndex !== this.state.selectedTabIndex || prevState.shares !== this.state.shares) {
|
|
620
618
|
this.createFilteredList();
|
|
621
619
|
}
|
|
622
620
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { SET_WS_TOKEN, QUIZ_SUBMISSION_EVENT } from '@instructure/quiz-common';
|
|
2
|
-
import { featureOn } from '../../common/util/featureCheck';
|
|
3
2
|
import { formatTime } from '../../common/util/formatTimespan';
|
|
4
3
|
import { updateTime, notifyTimeAdded } from '../../taking/api/taking';
|
|
5
4
|
import { bindActionCreators } from 'redux';
|
|
@@ -46,12 +45,12 @@ export var handleWebSocketMessage = function(webSocketMessage, boundTakingApiAct
|
|
|
46
45
|
handleExtraTimeFn(webSocketMessageData.extra_time_in_seconds, webSocketMessageData.end_at, boundTakingApiActions.updateTime, boundTakingApiActions.notifyTimeAdded);
|
|
47
46
|
};
|
|
48
47
|
export var createQuizTimerWebSocketMiddleware = function() {
|
|
49
|
-
var createWebsocketFn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : createWebsocket
|
|
48
|
+
var createWebsocketFn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : createWebsocket;
|
|
50
49
|
var socket = null;
|
|
51
50
|
return function(store) {
|
|
52
51
|
return function(next) {
|
|
53
52
|
return function(action) {
|
|
54
|
-
if (action.type === SET_WS_TOKEN &&
|
|
53
|
+
if (action.type === SET_WS_TOKEN && socket === null) {
|
|
55
54
|
var token = action.payload.wsToken;
|
|
56
55
|
socket = initializeWebSocket(token, createWebsocketFn);
|
|
57
56
|
if (!socket) {
|
package/es/index.js
CHANGED
|
@@ -82,11 +82,13 @@ export { GenericAsyncSearch } from './common/components/shared/GenericAsyncSearc
|
|
|
82
82
|
export { MaskedTextInput } from './common/components/MaskedTextInput';
|
|
83
83
|
export { AccessCodeTextInput } from './common/components/AccessCodeTextInput';
|
|
84
84
|
export { LocalStoreService } from './common/util/localStoreService';
|
|
85
|
+
export { default as Alerts } from './common/components/alerts/index';
|
|
85
86
|
// Utilities
|
|
86
87
|
export { environment as config } from './config';
|
|
87
88
|
export { Fetcher } from './common/util/Fetcher';
|
|
88
89
|
export { httpHeaders } from './common/util/httpHeaders';
|
|
89
90
|
export { store, setFakeStore, unsetFakeStore } from './reduxStore';
|
|
91
|
+
export { configureStore } from './configureStore';
|
|
90
92
|
export { setFeatures, unsetFeatures, featureOn, withTestFeatures } from './common/util/featureCheck';
|
|
91
93
|
export { makeEditable } from './common/components/shared/functionality/makeEditable';
|
|
92
94
|
export { CustomPropTypes } from './common/util/CustomPropTypes';
|
|
@@ -491,7 +491,8 @@ export var BanksList = /*#__PURE__*/ function(_superClass) {
|
|
|
491
491
|
}),
|
|
492
492
|
screenReaderLabel: t('Share bank {name}', {
|
|
493
493
|
name: bank.title
|
|
494
|
-
})
|
|
494
|
+
}),
|
|
495
|
+
ref: _this1.handleSharingButtonRef(bank.id)
|
|
495
496
|
})), bank.canEdit() ? bankEditOptions : null);
|
|
496
497
|
}
|
|
497
498
|
}), _define_property(_this1, "renderBank", function(bank) {
|
|
@@ -148,7 +148,8 @@ var NavWrapper = /*#__PURE__*/ function(Component) {
|
|
|
148
148
|
returnToUrl: returnToUrl,
|
|
149
149
|
id: "ReturnButton",
|
|
150
150
|
key: "ReturnButton",
|
|
151
|
-
iceTopNavBarEnabled: iceTopNavBarEnabled
|
|
151
|
+
iceTopNavBarEnabled: iceTopNavBarEnabled,
|
|
152
|
+
text: t('Return')
|
|
152
153
|
});
|
|
153
154
|
} else if (navigateToBuild) {
|
|
154
155
|
if (iceTopNavBarEnabled) {
|
|
@@ -168,7 +169,7 @@ var NavWrapper = /*#__PURE__*/ function(Component) {
|
|
|
168
169
|
{
|
|
169
170
|
key: "renderCloseButton",
|
|
170
171
|
value: function renderCloseButton() {
|
|
171
|
-
if (this.props.closeTray) {
|
|
172
|
+
if (this.props.closeTray && this.props.isCompact) {
|
|
172
173
|
return /*#__PURE__*/ jsx(CloseButton, {
|
|
173
174
|
elementRef: this.setCloseButtonRef,
|
|
174
175
|
placement: "start",
|
|
@@ -328,12 +328,9 @@ export var SharingModalPresenter = /*#__PURE__*/ function(Component) {
|
|
|
328
328
|
_this1.checkForSharedBanks();
|
|
329
329
|
});
|
|
330
330
|
}), _define_property(_this1, "modalDismissCleanup", function() {
|
|
331
|
-
var focusCreateBank = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
332
331
|
_this1.props.onDismiss();
|
|
333
|
-
if (_this1.props.modalTrigger
|
|
332
|
+
if (_this1.props.modalTrigger) {
|
|
334
333
|
_this1.props.modalTrigger.focus();
|
|
335
|
-
} else {
|
|
336
|
-
setTimeout(_this1.props.focusCreateBankButton, 100);
|
|
337
334
|
}
|
|
338
335
|
// removes the creator's temporary sharedBank record
|
|
339
336
|
_this1.props.removeSharedBank('-1');
|
|
@@ -462,7 +459,8 @@ export var SharingModalPresenter = /*#__PURE__*/ function(Component) {
|
|
|
462
459
|
onSelectionChange: _this1.handleSearchSelectionChange,
|
|
463
460
|
searchType: searchType,
|
|
464
461
|
selectedOption: _this1.state.searchSelection,
|
|
465
|
-
selectionFilter: _this1.handleSearchFilter
|
|
462
|
+
selectionFilter: _this1.handleSearchFilter,
|
|
463
|
+
searchLabel: t('Share With')
|
|
466
464
|
})), /*#__PURE__*/ jsx(Grid.Col, {
|
|
467
465
|
width: "auto"
|
|
468
466
|
}, /*#__PURE__*/ jsx(SimpleSelect, {
|
|
@@ -616,7 +614,7 @@ export var SharingModalPresenter = /*#__PURE__*/ function(Component) {
|
|
|
616
614
|
});
|
|
617
615
|
this.debouncedSearch();
|
|
618
616
|
}
|
|
619
|
-
if (prevState.searchValue !== this.state.searchValue || prevState.startingPoint !== this.state.startingPoint || prevState.selectedTabIndex !== this.state.selectedTabIndex || prevState.shares
|
|
617
|
+
if (prevState.searchValue !== this.state.searchValue || prevState.startingPoint !== this.state.startingPoint || prevState.selectedTabIndex !== this.state.selectedTabIndex || prevState.shares !== this.state.shares) {
|
|
620
618
|
this.createFilteredList();
|
|
621
619
|
}
|
|
622
620
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { SET_WS_TOKEN, QUIZ_SUBMISSION_EVENT } from '@instructure/quiz-common';
|
|
2
|
-
import { featureOn } from '../../common/util/featureCheck';
|
|
3
2
|
import { formatTime } from '../../common/util/formatTimespan';
|
|
4
3
|
import { updateTime, notifyTimeAdded } from '../../taking/api/taking';
|
|
5
4
|
import { bindActionCreators } from 'redux';
|
|
@@ -46,12 +45,12 @@ export var handleWebSocketMessage = function(webSocketMessage, boundTakingApiAct
|
|
|
46
45
|
handleExtraTimeFn(webSocketMessageData.extra_time_in_seconds, webSocketMessageData.end_at, boundTakingApiActions.updateTime, boundTakingApiActions.notifyTimeAdded);
|
|
47
46
|
};
|
|
48
47
|
export var createQuizTimerWebSocketMiddleware = function() {
|
|
49
|
-
var createWebsocketFn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : createWebsocket
|
|
48
|
+
var createWebsocketFn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : createWebsocket;
|
|
50
49
|
var socket = null;
|
|
51
50
|
return function(store) {
|
|
52
51
|
return function(next) {
|
|
53
52
|
return function(action) {
|
|
54
|
-
if (action.type === SET_WS_TOKEN &&
|
|
53
|
+
if (action.type === SET_WS_TOKEN && socket === null) {
|
|
55
54
|
var token = action.payload.wsToken;
|
|
56
55
|
socket = initializeWebSocket(token, createWebsocketFn);
|
|
57
56
|
if (!socket) {
|
package/lib/index.js
CHANGED
|
@@ -82,11 +82,13 @@ export { GenericAsyncSearch } from './common/components/shared/GenericAsyncSearc
|
|
|
82
82
|
export { MaskedTextInput } from './common/components/MaskedTextInput';
|
|
83
83
|
export { AccessCodeTextInput } from './common/components/AccessCodeTextInput';
|
|
84
84
|
export { LocalStoreService } from './common/util/localStoreService';
|
|
85
|
+
export { default as Alerts } from './common/components/alerts/index';
|
|
85
86
|
// Utilities
|
|
86
87
|
export { environment as config } from './config';
|
|
87
88
|
export { Fetcher } from './common/util/Fetcher';
|
|
88
89
|
export { httpHeaders } from './common/util/httpHeaders';
|
|
89
90
|
export { store, setFakeStore, unsetFakeStore } from './reduxStore';
|
|
91
|
+
export { configureStore } from './configureStore';
|
|
90
92
|
export { setFeatures, unsetFeatures, featureOn, withTestFeatures } from './common/util/featureCheck';
|
|
91
93
|
export { makeEditable } from './common/components/shared/functionality/makeEditable';
|
|
92
94
|
export { CustomPropTypes } from './common/util/CustomPropTypes';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.16.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The Quiz React SDK by Instructure Inc.",
|
|
6
6
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
".": {
|
|
11
11
|
"import": "./es/index.js",
|
|
12
12
|
"require": "./lib/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./*": {
|
|
15
|
+
"import": "./es/*.js",
|
|
16
|
+
"require": "./lib/*.js"
|
|
13
17
|
}
|
|
14
18
|
},
|
|
15
19
|
"repository": {
|
|
@@ -117,12 +121,12 @@
|
|
|
117
121
|
"store": "^1.3.20",
|
|
118
122
|
"striptags": "^2.0.0",
|
|
119
123
|
"uuid": "^3.2.1",
|
|
120
|
-
"@instructure/quiz-common": "22.
|
|
121
|
-
"@instructure/quiz-i18n": "22.
|
|
122
|
-
"@instructure/quiz-interactions": "22.
|
|
123
|
-
"@instructure/quiz-number-input": "22.
|
|
124
|
-
"@instructure/quiz-rce": "22.
|
|
125
|
-
"instructure-validations": "22.
|
|
124
|
+
"@instructure/quiz-common": "22.16.0",
|
|
125
|
+
"@instructure/quiz-i18n": "22.16.0",
|
|
126
|
+
"@instructure/quiz-interactions": "22.16.0",
|
|
127
|
+
"@instructure/quiz-number-input": "22.16.0",
|
|
128
|
+
"@instructure/quiz-rce": "22.16.0",
|
|
129
|
+
"instructure-validations": "22.16.0"
|
|
126
130
|
},
|
|
127
131
|
"devDependencies": {
|
|
128
132
|
"@instructure/ui-axe-check": "10.17.0",
|
|
@@ -151,7 +155,7 @@
|
|
|
151
155
|
"sinon": "^6.1.3",
|
|
152
156
|
"sinon-chai": "^3.3.0",
|
|
153
157
|
"@instructure/quiz-scripts": "21.0.0",
|
|
154
|
-
"quiz-presets": "22.
|
|
158
|
+
"quiz-presets": "22.16.0"
|
|
155
159
|
},
|
|
156
160
|
"peerDependencies": {
|
|
157
161
|
"react": "^15 || ^16"
|