@instructure/quiz-core 17.53.1-rc.10 → 17.53.1-rc.11
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.
|
@@ -5,6 +5,7 @@ import handleCapabilities from './subjectHandlers/lti.capabilities';
|
|
|
5
5
|
import forwardMessage from "./subjectHandlers/forwardMessage.js";
|
|
6
6
|
import handlePutData from './subjectHandlers/lti.put_data';
|
|
7
7
|
import handleGetData from './subjectHandlers/lti.get_data';
|
|
8
|
+
import handleFetchWindowSize from './subjectHandlers/lti.fetchWindowSize';
|
|
8
9
|
import handleRequestFullWindowLaunch from "./subjectHandlers/requestFullWindowLaunch.js";
|
|
9
10
|
|
|
10
11
|
var PostMessageService = function PostMessageService() {
|
|
@@ -84,6 +85,7 @@ var PostMessageService = function PostMessageService() {
|
|
|
84
85
|
};
|
|
85
86
|
|
|
86
87
|
this.handlerMap = new Map();
|
|
88
|
+
this.handlerMap.set('lti.fetchWindowSize', handleFetchWindowSize);
|
|
87
89
|
this.handlerMap.set('lti.frameResize', handleFrameResize);
|
|
88
90
|
this.handlerMap.set('lti.capabilities', handleCapabilities);
|
|
89
91
|
this.handlerMap.set('lti.setUnloadMessage', forwardMessage);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var handleFetchWindowSize = function handleFetchWindowSize(event, postMessageService) {
|
|
2
|
+
var height = window.innerHeight;
|
|
3
|
+
var width = window.innerWidth;
|
|
4
|
+
var scrollY = window.scrollY;
|
|
5
|
+
var offset = 0;
|
|
6
|
+
var footer = 0;
|
|
7
|
+
postMessageService.sendSuccessPostMessageResponse('lti.fetchWindowSize', {
|
|
8
|
+
height: height,
|
|
9
|
+
width: width,
|
|
10
|
+
footer: footer,
|
|
11
|
+
scrollY: scrollY,
|
|
12
|
+
offset: offset
|
|
13
|
+
}, event.source, event.origin);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default handleFetchWindowSize;
|
|
@@ -21,6 +21,8 @@ var _lti3 = _interopRequireDefault(require("./subjectHandlers/lti.put_data"));
|
|
|
21
21
|
|
|
22
22
|
var _lti4 = _interopRequireDefault(require("./subjectHandlers/lti.get_data"));
|
|
23
23
|
|
|
24
|
+
var _lti5 = _interopRequireDefault(require("./subjectHandlers/lti.fetchWindowSize"));
|
|
25
|
+
|
|
24
26
|
var _requestFullWindowLaunch = _interopRequireDefault(require("./subjectHandlers/requestFullWindowLaunch.js"));
|
|
25
27
|
|
|
26
28
|
var PostMessageService = function PostMessageService() {
|
|
@@ -99,6 +101,7 @@ var PostMessageService = function PostMessageService() {
|
|
|
99
101
|
};
|
|
100
102
|
|
|
101
103
|
this.handlerMap = new Map();
|
|
104
|
+
this.handlerMap.set('lti.fetchWindowSize', _lti5.default);
|
|
102
105
|
this.handlerMap.set('lti.frameResize', _lti.default);
|
|
103
106
|
this.handlerMap.set('lti.capabilities', _lti2.default);
|
|
104
107
|
this.handlerMap.set('lti.setUnloadMessage', _forwardMessage.default);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var handleFetchWindowSize = function handleFetchWindowSize(event, postMessageService) {
|
|
9
|
+
var height = window.innerHeight;
|
|
10
|
+
var width = window.innerWidth;
|
|
11
|
+
var scrollY = window.scrollY;
|
|
12
|
+
var offset = 0;
|
|
13
|
+
var footer = 0;
|
|
14
|
+
postMessageService.sendSuccessPostMessageResponse('lti.fetchWindowSize', {
|
|
15
|
+
height: height,
|
|
16
|
+
width: width,
|
|
17
|
+
footer: footer,
|
|
18
|
+
scrollY: scrollY,
|
|
19
|
+
offset: offset
|
|
20
|
+
}, event.source, event.origin);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
var _default = handleFetchWindowSize;
|
|
24
|
+
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "17.53.1-rc.
|
|
3
|
+
"version": "17.53.1-rc.11+ddb9475ba",
|
|
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.7",
|
|
44
|
-
"@instructure/quiz-common": "17.53.1-rc.
|
|
45
|
-
"@instructure/quiz-i18n": "17.53.1-rc.
|
|
46
|
-
"@instructure/quiz-interactions": "17.53.1-rc.
|
|
47
|
-
"@instructure/quiz-number-input": "17.53.1-rc.
|
|
48
|
-
"@instructure/quiz-rce": "17.53.1-rc.
|
|
44
|
+
"@instructure/quiz-common": "17.53.1-rc.11+ddb9475ba",
|
|
45
|
+
"@instructure/quiz-i18n": "17.53.1-rc.11+ddb9475ba",
|
|
46
|
+
"@instructure/quiz-interactions": "17.53.1-rc.11+ddb9475ba",
|
|
47
|
+
"@instructure/quiz-number-input": "17.53.1-rc.11+ddb9475ba",
|
|
48
|
+
"@instructure/quiz-rce": "17.53.1-rc.11+ddb9475ba",
|
|
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.53.1-rc.
|
|
109
|
+
"instructure-validations": "17.53.1-rc.11+ddb9475ba",
|
|
110
110
|
"ipaddr.js": "^1.5.4",
|
|
111
111
|
"isomorphic-fetch": "^2.2.0",
|
|
112
112
|
"isuuid": "^0.1.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.53.1-rc.
|
|
159
|
+
"quiz-presets": "17.53.1-rc.11+ddb9475ba",
|
|
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": "ddb9475ba46e701f3cdb2d80cb34a0713c0916c1"
|
|
176
176
|
}
|