@newtonschool/react_proctoring_library 0.0.104 → 0.0.106

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.
@@ -23,8 +23,19 @@ const OpenHeimdall = _ref => {
23
23
  } = _ref;
24
24
  const {
25
25
  permissionSetter,
26
- setPermissionErrors
26
+ setPermissionErrors,
27
+ endTimeStamp
27
28
  } = (0, _react.useContext)(proctoredContext);
29
+ (0, _react.useEffect)(() => {
30
+ if (endTimeStamp) {
31
+ var _window, _window$electron, _window$electron$acti;
32
+ if ((_window = window) !== null && _window !== void 0 && (_window$electron = _window.electron) !== null && _window$electron !== void 0 && (_window$electron$acti = _window$electron.actions) !== null && _window$electron$acti !== void 0 && _window$electron$acti.sendExamMappingDetails) {
33
+ window.electron.actions.sendExamMappingDetails({
34
+ endTimeStamp
35
+ });
36
+ }
37
+ }
38
+ }, [endTimeStamp]);
28
39
  (0, _react.useEffect)(() => {
29
40
  setAskPermissionAction(oldAskPermissionAction => _objectSpread(_objectSpread({}, oldAskPermissionAction), {}, {
30
41
  openHeimdall: async () => {
@@ -32,7 +32,6 @@ function FullScreen(_ref) {
32
32
  setAskPermissionAction(oldAskPermissionAction => _objectSpread(_objectSpread({}, oldAskPermissionAction), {}, {
33
33
  fullscreen: () => {
34
34
  setFullscreen(true);
35
- window.electron.actions.forceFocus();
36
35
  }
37
36
  }));
38
37
  }, [setAskPermissionAction, setFullscreen]);
@@ -33,6 +33,7 @@ const ProctoredContextApp = _ref => {
33
33
  customContext = {}
34
34
  } = _ref;
35
35
  const proctorParams = (0, _react.useMemo)(() => _objectSpread(_objectSpread({}, _defaults.defaultConfig), config.proctorParams), [config.proctorParams]);
36
+ const [endTimeStamp, setEndTimeStamp] = (0, _react.useState)(null);
36
37
  const [, isElectronApp] = (0, _useIsElectron.default)();
37
38
  const [webCamDeviceId, setWebCamDeviceId] = (0, _react.useState)();
38
39
  const [screenShareDeviceId, setScreenShareDeviceId] = (0, _react.useState)();
@@ -70,6 +71,8 @@ const ProctoredContextApp = _ref => {
70
71
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Context.Provider, {
71
72
  value: _objectSpread(_objectSpread({}, customContext), {}, {
72
73
  permissions,
74
+ endTimeStamp,
75
+ setEndTimeStamp,
73
76
  allPermissionGrantedOnce,
74
77
  permissionSetter: {
75
78
  audio: setAudioPermission,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newtonschool/react_proctoring_library",
3
- "version": "0.0.104",
3
+ "version": "0.0.106",
4
4
  "description": "Used to proctor online tests",
5
5
  "author": "ayushkagrawal,shreyachandra,weastel",
6
6
  "main": "dist/index.js",