fcr-ui-scene 3.7.1 → 3.7.3
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/lib/creator.js +23 -44
- package/lib/electron/app.js +7 -0
- package/lib/electron/injections.d.ts +1 -1
- package/lib/electron/injections.js +5 -3
- package/lib/electron/main.js +3 -1
- package/lib/fragments/annotation/index.d.ts +1 -0
- package/lib/fragments/annotation/index.js +13 -7
- package/lib/fragments/annotation/store.d.ts +8 -4
- package/lib/fragments/annotation/store.js +353 -268
- package/lib/fragments/annotation/toolbar/components/color-tool/index.js +4 -0
- package/lib/fragments/annotation/toolbar/components/graphic-tool/index.js +4 -0
- package/lib/fragments/annotation/toolbar/components/item/item.d.ts +2 -0
- package/lib/fragments/annotation/toolbar/components/item/item.js +2 -4
- package/lib/fragments/annotation/toolbar/components/item/style.css +4 -2
- package/lib/fragments/annotation/toolbar/components/pen-tool/index.js +4 -0
- package/lib/fragments/annotation/utils.d.ts +1 -0
- package/lib/fragments/annotation/utils.js +27 -0
- package/lib/fragments/annotation/view.js +1 -6
- package/lib/fragments/base.js +5 -3
- package/lib/fragments/whiteboard/cursor.css +77 -0
- package/lib/fragments/whiteboard/index.d.ts +11 -0
- package/lib/fragments/whiteboard/index.js +91 -0
- package/lib/fragments/whiteboard/store.d.ts +31 -0
- package/lib/fragments/whiteboard/store.js +475 -0
- package/lib/fragments/whiteboard/style.css +4 -0
- package/lib/fragments/whiteboard/view.d.ts +4 -0
- package/lib/fragments/whiteboard/view.js +31 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/modules/action-bar/components/apps/index.js +15 -5
- package/lib/modules/action-bar/components/leave/index.js +4 -11
- package/lib/modules/action-bar/view.d.ts +1 -0
- package/lib/modules/action-bar/view.js +3 -2
- package/lib/modules/annotation/annotation-toolbar-store.d.ts +4 -11
- package/lib/modules/annotation/annotation-toolbar-store.js +46 -88
- package/lib/modules/annotation/board-cursor.css +2 -1
- package/lib/modules/annotation/index.d.ts +2 -0
- package/lib/modules/annotation/index.js +2 -2
- package/lib/modules/annotation/store.d.ts +11 -49
- package/lib/modules/annotation/store.js +135 -418
- package/lib/modules/annotation/view.js +3 -6
- package/lib/modules/components/control-bar/components/loading/index.css +76 -0
- package/lib/modules/components/control-bar/components/loading/index.d.ts +8 -0
- package/lib/modules/components/control-bar/components/loading/index.js +64 -0
- package/lib/modules/components/control-bar/components/loading/loading.png +0 -0
- package/lib/modules/components/control-bar/components/progress/index.d.ts +5 -0
- package/lib/modules/components/control-bar/components/progress/index.js +43 -0
- package/lib/modules/components/control-bar/components/progress/style.css +51 -0
- package/lib/modules/components/control-bar/components/switch-theme/index.css +99 -0
- package/lib/modules/components/control-bar/components/switch-theme/index.d.ts +9 -0
- package/lib/modules/components/control-bar/components/switch-theme/index.js +94 -0
- package/lib/modules/components/control-bar/components/switch-theme/item.d.ts +9 -0
- package/lib/modules/components/control-bar/components/switch-theme/item.js +54 -0
- package/lib/modules/components/control-bar/components/switch-theme/libs.d.ts +4 -0
- package/lib/modules/components/control-bar/components/switch-theme/libs.js +31 -0
- package/lib/modules/components/control-bar/index.css +87 -0
- package/lib/modules/components/control-bar/index.d.ts +20 -0
- package/lib/modules/components/control-bar/index.js +276 -0
- package/lib/modules/components/leave-meeting/components/index.css +0 -9
- package/lib/modules/components/leave-meeting/index.d.ts +2 -1
- package/lib/modules/components/leave-meeting/index.js +15 -7
- package/lib/modules/components/leave-meeting/portal.d.ts +6 -0
- package/lib/modules/components/leave-meeting/portal.js +29 -0
- package/lib/modules/components/leave-meeting/style.css +9 -0
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.d.ts +5 -2
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +19 -9
- package/lib/modules/components/member-window/components/member-actions/components/share-status.js +4 -4
- package/lib/modules/components/member-window/components/member-actions/index.js +13 -6
- package/lib/modules/components/member-window/components/member-actions/provider.d.ts +1 -0
- package/lib/modules/components/member-window/components/member-actions/provider.js +4 -3
- package/lib/modules/components/member-window/components/member-actions/store.d.ts +2 -1
- package/lib/modules/components/member-window/components/member-actions/store.js +5 -1
- package/lib/modules/components/member-window/index.css +4 -0
- package/lib/modules/components/member-window/types.d.ts +6 -2
- package/lib/modules/components/toolbar/components/capture-tool/index.d.ts +9 -0
- package/lib/modules/components/toolbar/components/capture-tool/index.js +68 -0
- package/lib/modules/components/toolbar/components/clean-tool/index.d.ts +11 -0
- package/lib/modules/components/toolbar/components/clean-tool/index.js +71 -0
- package/lib/modules/components/toolbar/components/color-tool/color-panel/index.d.ts +11 -0
- package/lib/modules/components/toolbar/components/color-tool/color-panel/index.js +77 -0
- package/lib/modules/components/toolbar/components/color-tool/index.d.ts +14 -0
- package/lib/modules/components/toolbar/components/color-tool/index.js +66 -0
- package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/index.d.ts +11 -0
- package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/index.js +64 -0
- package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/libs.d.ts +12 -0
- package/lib/modules/components/toolbar/components/graphic-tool/graphic-panel/libs.js +65 -0
- package/lib/modules/components/toolbar/components/graphic-tool/index.d.ts +15 -0
- package/lib/modules/components/toolbar/components/graphic-tool/index.js +82 -0
- package/lib/modules/components/toolbar/components/group-tool/index.d.ts +5 -0
- package/lib/modules/components/toolbar/components/group-tool/index.js +43 -0
- package/lib/modules/components/toolbar/components/icons/fold-icon.d.ts +2 -0
- package/lib/modules/components/toolbar/components/icons/fold-icon.js +41 -0
- package/lib/modules/components/toolbar/components/icons/move-icon.d.ts +1 -0
- package/lib/modules/components/toolbar/components/icons/move-icon.js +66 -0
- package/lib/modules/components/toolbar/components/item/index.d.ts +25 -0
- package/lib/modules/components/toolbar/components/item/index.js +165 -0
- package/lib/modules/components/toolbar/components/item/style.css +94 -0
- package/lib/modules/components/toolbar/components/multiple-color-tool/index.d.ts +12 -0
- package/lib/modules/components/toolbar/components/multiple-color-tool/index.js +75 -0
- package/lib/modules/components/toolbar/components/panel/index.d.ts +9 -0
- package/lib/modules/components/toolbar/components/panel/index.js +28 -0
- package/lib/modules/components/toolbar/components/panel/style.css +86 -0
- package/lib/modules/components/toolbar/components/pen-tool/index.d.ts +13 -0
- package/lib/modules/components/toolbar/components/pen-tool/index.js +62 -0
- package/lib/modules/components/toolbar/components/pen-tool/pen-panel/index.d.ts +8 -0
- package/lib/modules/components/toolbar/components/pen-tool/pen-panel/index.js +39 -0
- package/lib/modules/components/toolbar/components/save-draft/index.d.ts +7 -0
- package/lib/modules/components/toolbar/components/save-draft/index.js +59 -0
- package/lib/modules/components/toolbar/components/vertical-frame/index.d.ts +8 -0
- package/lib/modules/components/toolbar/components/vertical-frame/index.js +179 -0
- package/lib/modules/components/toolbar/hooks/use-resize-visible.d.ts +4 -0
- package/lib/modules/components/toolbar/hooks/use-resize-visible.js +59 -0
- package/lib/modules/components/toolbar/index.d.ts +29 -0
- package/lib/modules/components/toolbar/index.js +258 -0
- package/lib/modules/components/toolbar/style.css +85 -0
- package/lib/modules/components/toolbar/types.d.ts +13 -0
- package/lib/modules/components/toolbar/types.js +6 -0
- package/lib/modules/control-bar/components/more-actions/index.js +0 -6
- package/lib/modules/control-bar/components/share-state-nav/index.js +3 -2
- package/lib/modules/control-bar/index.js +2 -1
- package/lib/modules/control-bar/store.d.ts +7 -6
- package/lib/modules/control-bar/store.js +28 -21
- package/lib/modules/control-bar/view.js +7 -55
- package/lib/modules/dialog/dialogs/control-bar/index.d.ts +1 -0
- package/lib/modules/dialog/dialogs/control-bar/index.js +17 -3
- package/lib/modules/dialog/dialogs/participant/components/title.js +1 -1
- package/lib/modules/dialog/dialogs/sub-window/index.d.ts +2 -0
- package/lib/modules/dialog/dialogs/sub-window/index.js +98 -0
- package/lib/modules/dialog/dialogs/video-window/index.d.ts +1 -0
- package/lib/modules/dialog/dialogs/video-window/index.js +3 -2
- package/lib/modules/dialog/dialogs/whiteboard/index.js +0 -1
- package/lib/modules/dialog/hooks/use-popover-watcher.js +1 -2
- package/lib/modules/dialog/hooks/useElectron.d.ts +13 -0
- package/lib/modules/dialog/hooks/useElectron.js +62 -12
- package/lib/modules/dialog/index.d.ts +6 -3
- package/lib/modules/dialog/index.js +5 -3
- package/lib/modules/dialog/store.d.ts +21 -8
- package/lib/modules/dialog/store.js +79 -11
- package/lib/modules/dialog/type.d.ts +8 -0
- package/lib/modules/event-confirm/index.css +5 -2
- package/lib/modules/event-confirm/store.js +6 -7
- package/lib/modules/event-confirm/view.js +1 -1
- package/lib/modules/event-sound/index.d.ts +1 -0
- package/lib/modules/event-sound/index.js +11 -24
- package/lib/modules/invite/components/pstn-invite.js +0 -1
- package/lib/modules/layout/components/CommonVideoRenderer.js +21 -21
- package/lib/modules/layout/components/who-is-speaking.js +3 -6
- package/lib/modules/layout/index.d.ts +3 -1
- package/lib/modules/layout/index.js +2 -1
- package/lib/modules/layout/store.d.ts +9 -59
- package/lib/modules/layout/store.js +162 -37
- package/lib/modules/layout/type.d.ts +55 -0
- package/lib/modules/participant/components/can-moveable/index.js +0 -1
- package/lib/modules/participant/components/participants/components/participants/components/attendee/index.js +4 -2
- package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.js +14 -2
- package/lib/modules/participant/components/participants/components/participants/components/user-row/index.d.ts +1 -1
- package/lib/modules/participant/components/participants/components/participants/components/user-row/index.js +3 -2
- package/lib/modules/participant/components/participants/components/participants/index.js +3 -2
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-actions-popover/index.d.ts +1 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-actions-popover/index.js +3 -1
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/index.js +4 -2
- package/lib/modules/participant/components/participants/components/render-user/index.d.ts +4 -2
- package/lib/modules/participant/components/participants/components/render-user/index.js +5 -3
- package/lib/modules/participant/components/participants/index.js +5 -2
- package/lib/modules/participant/components/participants/types.d.ts +3 -0
- package/lib/modules/participant/index.d.ts +2 -0
- package/lib/modules/participant/index.js +2 -1
- package/lib/modules/participant/store.d.ts +5 -1
- package/lib/modules/participant/store.js +8 -1
- package/lib/modules/secondary-window/index.d.ts +49 -0
- package/lib/modules/secondary-window/index.js +108 -0
- package/lib/modules/secondary-window/store.d.ts +76 -0
- package/lib/modules/secondary-window/store.js +407 -0
- package/lib/modules/secondary-window/type.d.ts +106 -0
- package/lib/modules/secondary-window/type.js +35 -0
- package/lib/modules/secondary-window/view.d.ts +6 -0
- package/lib/modules/secondary-window/view.js +257 -0
- package/lib/modules/setting/general-settings/general-settings.js +9 -0
- package/lib/modules/setting/state/index.js +0 -10
- package/lib/modules/setting/store.d.ts +1 -0
- package/lib/modules/setting/store.js +6 -3
- package/lib/modules/share-screen/components/control-bar/index.d.ts +14 -1
- package/lib/modules/share-screen/components/control-bar/index.js +17 -12
- package/lib/modules/share-screen/components/selection/index.js +10 -15
- package/lib/modules/share-screen/index.d.ts +4 -1
- package/lib/modules/share-screen/index.js +6 -3
- package/lib/modules/share-screen/store.d.ts +9 -9
- package/lib/modules/share-screen/store.js +39 -64
- package/lib/modules/state-bar/index.d.ts +2 -0
- package/lib/modules/state-bar/index.js +2 -1
- package/lib/modules/state-bar/live-streaming-state.js +0 -1
- package/lib/modules/state-bar/store.d.ts +5 -2
- package/lib/modules/state-bar/store.js +14 -7
- package/lib/modules/state-bar/view.js +3 -3
- package/lib/modules/video-window/components/members/index.js +7 -12
- package/lib/modules/video-window/store.d.ts +1 -0
- package/lib/modules/video-window/store.js +5 -0
- package/lib/modules/whiteboard/components/toolbar/store.d.ts +2 -2
- package/lib/modules/whiteboard/index.d.ts +10 -13
- package/lib/modules/whiteboard/index.js +12 -11
- package/lib/providers/ability-provider.js +2 -0
- package/lib/providers/device-provider.d.ts +6 -3
- package/lib/providers/device-provider.js +336 -333
- package/lib/providers/multi-display-provider.d.ts +85 -0
- package/lib/providers/multi-display-provider.js +581 -0
- package/lib/providers/privilege-provider.js +1 -7
- package/lib/providers/room-provider.js +7 -1
- package/lib/providers/screen-share-provider.d.ts +3 -1
- package/lib/providers/screen-share-provider.js +39 -40
- package/lib/providers/sharing-provider.d.ts +7 -1
- package/lib/providers/sharing-provider.js +32 -3
- package/lib/providers/whiteboard-provider.d.ts +24 -0
- package/lib/providers/whiteboard-provider.js +127 -0
- package/lib/runtime.d.ts +1 -0
- package/lib/scenes/main-scene.d.ts +6 -0
- package/lib/scenes/main-scene.js +38 -2
- package/lib/scenes/waiting-scene.d.ts +0 -2
- package/lib/scenes/waiting-scene.js +0 -6
- package/lib/shared-data-source/member-data.d.ts +2 -2
- package/lib/shared-data-source/screen-share-data.d.ts +6 -0
- package/lib/shared-data-source/screen-share-data.js +5 -0
- package/lib/shared-data-source/setting.js +2 -1
- package/lib/shared-data-source/video-window.d.ts +2 -0
- package/lib/shared-data-source/video-window.js +19 -6
- package/lib/shared-data-source/whiteboard-data.d.ts +68 -0
- package/lib/shared-data-source/whiteboard-data.js +347 -0
- package/lib/translations/enUS.d.ts +1 -0
- package/lib/translations/enUS.js +2 -1
- package/lib/translations/zhCN.d.ts +1 -0
- package/lib/translations/zhCN.js +2 -1
- package/lib/ui-scene.d.ts +0 -1
- package/lib/ui-scene.js +0 -3
- package/lib/utilities/constant.d.ts +4 -2
- package/lib/utilities/constant.js +3 -1
- package/lib/utilities/debug.d.ts +4 -0
- package/lib/utilities/debug.js +40 -0
- package/lib/utilities/dialog-utils.js +26 -4
- package/lib/utilities/meeting-detail.js +4 -1
- package/lib/utilities/renderer-event.d.ts +4 -6
- package/lib/utilities/renderer-event.js +23 -43
- package/lib/utilities/renderer.d.ts +1 -1
- package/lib/utilities/renderer.js +44 -10
- package/lib/utilities/shared-storage.d.ts +18 -0
- package/lib/utilities/shared-storage.js +63 -0
- package/lib/utilities/tools.js +2 -1
- package/package.json +5 -6
- package/lib/electron/tools.d.ts +0 -5
- package/lib/electron/tools.js +0 -62
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
require("core-js/modules/es.symbol.js");
|
|
4
4
|
require("core-js/modules/es.symbol.description.js");
|
|
5
5
|
require("core-js/modules/es.symbol.to-primitive.js");
|
|
6
|
-
require("core-js/modules/es.error.cause.js");
|
|
7
|
-
require("core-js/modules/es.error.to-string.js");
|
|
8
6
|
require("core-js/modules/es.array.filter.js");
|
|
9
7
|
require("core-js/modules/es.array.for-each.js");
|
|
10
8
|
require("core-js/modules/es.array.is-array.js");
|
|
@@ -19,6 +17,7 @@ require("core-js/modules/es.object.define-properties.js");
|
|
|
19
17
|
require("core-js/modules/es.object.define-property.js");
|
|
20
18
|
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
21
19
|
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
20
|
+
require("core-js/modules/es.object.keys.js");
|
|
22
21
|
require("core-js/modules/esnext.function.metadata.js");
|
|
23
22
|
require("core-js/modules/esnext.iterator.constructor.js");
|
|
24
23
|
require("core-js/modules/esnext.iterator.filter.js");
|
|
@@ -46,26 +45,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
46
45
|
});
|
|
47
46
|
exports.FragmentAnnotationStoreContext = exports.FragmentAnnotationStore = void 0;
|
|
48
47
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
52
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
53
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
48
|
+
require("core-js/modules/es.error.cause.js");
|
|
49
|
+
require("core-js/modules/es.error.to-string.js");
|
|
54
50
|
require("core-js/modules/es.array.concat.js");
|
|
55
51
|
require("core-js/modules/es.array.iterator.js");
|
|
56
52
|
require("core-js/modules/es.date.now.js");
|
|
57
53
|
require("core-js/modules/es.date.to-json.js");
|
|
58
54
|
require("core-js/modules/es.json.stringify.js");
|
|
59
|
-
require("core-js/modules/es.object.keys.js");
|
|
60
55
|
require("core-js/modules/es.object.to-string.js");
|
|
56
|
+
require("core-js/modules/es.promise.js");
|
|
61
57
|
require("core-js/modules/es.regexp.exec.js");
|
|
62
58
|
require("core-js/modules/es.string.iterator.js");
|
|
63
59
|
require("core-js/modules/es.weak-map.js");
|
|
64
|
-
require("core-js/modules/esnext.json.parse.js");
|
|
65
60
|
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
66
61
|
require("core-js/modules/esnext.weak-map.emplace.js");
|
|
67
62
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
68
63
|
require("core-js/modules/web.timers.js");
|
|
64
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
65
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
66
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
67
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
68
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
69
69
|
var _react = require("react");
|
|
70
70
|
var _imports = require("fcr-core/lib/imports");
|
|
71
71
|
var _mobx = require("mobx");
|
|
@@ -77,8 +77,12 @@ var _rendererEvent = require("../../utilities/renderer-event");
|
|
|
77
77
|
var _constant = require("../../utilities/constant");
|
|
78
78
|
var _asyncRetry = require("agora-foundation/lib/utilities/async-retry");
|
|
79
79
|
var _logger = require("../../utilities/logger");
|
|
80
|
+
var _utils = require("./utils");
|
|
81
|
+
var _electronRtcPlugin = require("fcr-core/lib/plugins/electron-rtc-plugin");
|
|
82
|
+
var _rtmPlugin = require("fcr-core/lib/plugins/rtm-plugin");
|
|
83
|
+
var _sharedStorage = require("../../utilities/shared-storage");
|
|
80
84
|
var _FragmentAnnotationStore;
|
|
81
|
-
var _initProto, _init_joined, _init_bounds, _init_currentTool,
|
|
85
|
+
var _initProto, _init_joined, _init_bounds, _init_currentTool, _init_drawing, _handleBoardDomLoadDecs, _closeDecs, _hideDecs, _showDecs, _handleSetToolDecs, _ref;
|
|
82
86
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
83
87
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
84
88
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
@@ -91,31 +95,14 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
91
95
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
92
96
|
function _setFunctionName(e, t, n) { "symbol" == _typeof(t) && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; }
|
|
93
97
|
function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? _typeof(e) : "null")); return e; }
|
|
94
|
-
var startPolling = function startPolling(pollingMethod) {
|
|
95
|
-
var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 30000;
|
|
96
|
-
var interval = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 200;
|
|
97
|
-
pollingMethod();
|
|
98
|
-
var startTime = Date.now();
|
|
99
|
-
var timer = setInterval(function () {
|
|
100
|
-
var elapsed = Date.now() - startTime;
|
|
101
|
-
if (elapsed >= duration) {
|
|
102
|
-
clearInterval(timer);
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
pollingMethod();
|
|
106
|
-
}, interval);
|
|
107
|
-
return function () {
|
|
108
|
-
clearInterval(timer);
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
98
|
var _A = /*#__PURE__*/new WeakMap();
|
|
112
99
|
var _B = /*#__PURE__*/new WeakMap();
|
|
113
100
|
var _C = /*#__PURE__*/new WeakMap();
|
|
114
101
|
var _D = /*#__PURE__*/new WeakMap();
|
|
115
|
-
var _E = /*#__PURE__*/new WeakMap();
|
|
116
102
|
_ref = (_handleBoardDomLoadDecs = [_mobx.action, _mobx.action.bound], _closeDecs = [_mobx.action, _mobx.action.bound], _hideDecs = [_mobx.action, _mobx.action.bound], _showDecs = [_mobx.action, _mobx.action.bound], _handleSetToolDecs = [(0, _decorator.debounced)(300), _decorator.bound], "logger");
|
|
117
103
|
var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/function () {
|
|
118
104
|
function FragmentAnnotationStore() {
|
|
105
|
+
var _this = this;
|
|
119
106
|
(0, _classCallCheck2["default"])(this, FragmentAnnotationStore);
|
|
120
107
|
(0, _defineProperty2["default"])(this, _ref, (_initProto(this), (0, _logger.createFragmentLogger)({
|
|
121
108
|
prefix: 'AnnotationFragmentStore'
|
|
@@ -133,40 +120,20 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
133
120
|
height: 600
|
|
134
121
|
}));
|
|
135
122
|
_classPrivateFieldInitSpec(this, _C, _init_currentTool(this, 'none'));
|
|
136
|
-
_classPrivateFieldInitSpec(this, _D,
|
|
137
|
-
_classPrivateFieldInitSpec(this, _E, _init_drawing(this, false));
|
|
123
|
+
_classPrivateFieldInitSpec(this, _D, _init_drawing(this, false));
|
|
138
124
|
(0, _defineProperty2["default"])(this, "_hasWaitingOpen", false);
|
|
139
125
|
(0, _defineProperty2["default"])(this, "_lastViewPortSet", {
|
|
140
126
|
width: 0,
|
|
141
127
|
height: 0
|
|
142
128
|
});
|
|
143
|
-
(0, _defineProperty2["default"])(this, "_currentAnntationView", null);
|
|
144
129
|
(0, _defineProperty2["default"])(this, "_pollingCancelHandler", function () {});
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
boardRegion = _JSON$parse.boardRegion,
|
|
153
|
-
boardToken = _JSON$parse.boardToken,
|
|
154
|
-
boardUserToken = _JSON$parse.boardUserToken,
|
|
155
|
-
userId = _JSON$parse.boardUserUuid;
|
|
156
|
-
this._config = {
|
|
157
|
-
appId: appId,
|
|
158
|
-
userId: userId,
|
|
159
|
-
region: boardRegion,
|
|
160
|
-
appIdentifier: boardAppId,
|
|
161
|
-
boardId: boardId,
|
|
162
|
-
boardToken: boardToken
|
|
163
|
-
};
|
|
164
|
-
this.logger.info("boardinfo => ".concat(JSON.stringify(this._config)));
|
|
165
|
-
this._init(this._initEngine({
|
|
166
|
-
userId: userId,
|
|
167
|
-
roomToken: boardUserToken,
|
|
168
|
-
appId: appId
|
|
169
|
-
}));
|
|
130
|
+
(0, _defineProperty2["default"])(this, "_checkForConnectTaskInterval", _imports.AgoraScheduler.Duration.second(1));
|
|
131
|
+
(0, _defineProperty2["default"])(this, "_isEngineInitialized", false);
|
|
132
|
+
(0, _defineProperty2["default"])(this, "_openAbortController", null);
|
|
133
|
+
(0, _defineProperty2["default"])(this, "_openLock", false);
|
|
134
|
+
this._checkForConnectTask = _imports.AgoraScheduler.shared.addIntervalTask(function () {
|
|
135
|
+
_this._checkForConnect();
|
|
136
|
+
}, this._checkForConnectTaskInterval);
|
|
170
137
|
}
|
|
171
138
|
return (0, _createClass2["default"])(FragmentAnnotationStore, [{
|
|
172
139
|
key: "joined",
|
|
@@ -193,108 +160,135 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
193
160
|
_classPrivateFieldSet(_C, this, v);
|
|
194
161
|
}
|
|
195
162
|
}, {
|
|
196
|
-
key: "
|
|
163
|
+
key: "drawing",
|
|
197
164
|
get: function get() {
|
|
198
165
|
return _classPrivateFieldGet(_D, this);
|
|
199
166
|
},
|
|
200
167
|
set: function set(v) {
|
|
201
168
|
_classPrivateFieldSet(_D, this, v);
|
|
202
169
|
}
|
|
203
|
-
}, {
|
|
204
|
-
key: "drawing",
|
|
205
|
-
get: function get() {
|
|
206
|
-
return _classPrivateFieldGet(_E, this);
|
|
207
|
-
},
|
|
208
|
-
set: function set(v) {
|
|
209
|
-
_classPrivateFieldSet(_E, this, v);
|
|
210
|
-
}
|
|
211
170
|
}, {
|
|
212
171
|
key: "open",
|
|
213
172
|
value: function () {
|
|
214
173
|
var _open = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
215
|
-
var
|
|
174
|
+
var _this2 = this;
|
|
175
|
+
var visible, boardRoom, _this$_resizeToMax, boundsWidth, boundsHeight, width, height, whiteboard, _t;
|
|
216
176
|
return _regenerator["default"].wrap(function (_context) {
|
|
217
177
|
while (1) switch (_context.prev = _context.next) {
|
|
218
178
|
case 0:
|
|
219
|
-
|
|
220
|
-
this.logger.info("[annotation-fragment][open]: open method is called, the init bounds is =>, ".concat(JSON.stringify(this.bounds), ", visible ").concat(visible));
|
|
221
|
-
if (!visible) {
|
|
179
|
+
if (!(this._openLock || this.joined)) {
|
|
222
180
|
_context.next = 1;
|
|
223
181
|
break;
|
|
224
182
|
}
|
|
225
183
|
return _context.abrupt("return");
|
|
226
184
|
case 1:
|
|
185
|
+
this._openLock = true;
|
|
186
|
+
_context.prev = 2;
|
|
187
|
+
visible = window.runtime.browserWindow.isVisible();
|
|
188
|
+
this.logger.info("open method is called, the init bounds is =>, ".concat(JSON.stringify(this.bounds), ", visible ").concat(visible));
|
|
189
|
+
if (!visible) {
|
|
190
|
+
_context.next = 3;
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
return _context.abrupt("return");
|
|
194
|
+
case 3:
|
|
227
195
|
this._cancelCurrentUpdateWindowSizeTimber('send-fragment-close');
|
|
228
196
|
this.currentTool = 'curve';
|
|
229
197
|
window.runtime.browserWindow.setAlwaysOnTop(true, 'pop-up-menu');
|
|
230
198
|
this.setIgnore(true);
|
|
231
199
|
this._hasWaitingOpen = !this._engine;
|
|
232
200
|
if (this._engine) {
|
|
233
|
-
_context.next = 2;
|
|
234
|
-
break;
|
|
235
|
-
}
|
|
236
|
-
this.logger.info("[annotation-fragment][open]: this._engine is null, so open fail,\n cannot draw, we will reopen after engine connected");
|
|
237
|
-
return _context.abrupt("return");
|
|
238
|
-
case 2:
|
|
239
|
-
this.logger.info('[annotation-fragment][open]: this._engine is initialized, show annotation window');
|
|
240
|
-
window.runtime.browserWindow.show();
|
|
241
|
-
case 3:
|
|
242
|
-
this.logger.info("[annotation-fragment][open]: this._joined ".concat(this.joined));
|
|
243
|
-
if (!this.joined) {
|
|
244
201
|
_context.next = 4;
|
|
245
202
|
break;
|
|
246
203
|
}
|
|
204
|
+
this.logger.info("this._engine is null, so open fail, cannot draw, we will reopen after engine connected");
|
|
247
205
|
return _context.abrupt("return");
|
|
248
206
|
case 4:
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
break;
|
|
252
|
-
}
|
|
253
|
-
_context.next = 5;
|
|
254
|
-
return this._initBoardRoom();
|
|
207
|
+
this.logger.info('this._engine is initialized, show annotation window');
|
|
208
|
+
window.runtime.browserWindow.show();
|
|
255
209
|
case 5:
|
|
256
|
-
if (this._boardRoom) {
|
|
210
|
+
if (!this._boardRoom) {
|
|
257
211
|
_context.next = 6;
|
|
258
212
|
break;
|
|
259
213
|
}
|
|
260
|
-
|
|
214
|
+
throw new Error('state is not in sync, joined state is false, but boardRoom is not null');
|
|
261
215
|
case 6:
|
|
262
|
-
_this$_resizeToMax = this._resizeToMax(this.bounds.width, this.bounds.height, 1920), boundsWidth = _this$_resizeToMax.width, boundsHeight = _this$_resizeToMax.height;
|
|
263
216
|
_context.next = 7;
|
|
264
|
-
return this.
|
|
265
|
-
|
|
266
|
-
|
|
217
|
+
return this._initBoardRoom();
|
|
218
|
+
case 7:
|
|
219
|
+
boardRoom = _context.sent;
|
|
220
|
+
this._boardRoom = boardRoom;
|
|
221
|
+
_this$_resizeToMax = this._resizeToMax(this.bounds.width, this.bounds.height, 1920), boundsWidth = _this$_resizeToMax.width, boundsHeight = _this$_resizeToMax.height;
|
|
222
|
+
width = boundsWidth;
|
|
223
|
+
height = boundsHeight;
|
|
224
|
+
if (!boundsWidth) {
|
|
225
|
+
this.logger.warn("boundsWidth is a invalid value: ".concat(boundsWidth, ", use default width 800"));
|
|
226
|
+
width = 800;
|
|
227
|
+
}
|
|
228
|
+
if (!boundsHeight) {
|
|
229
|
+
this.logger.warn("boundsHeight is a invalid value: ".concat(boundsHeight, ", use default height 600"));
|
|
230
|
+
height = 600;
|
|
231
|
+
}
|
|
232
|
+
_context.next = 8;
|
|
233
|
+
return boardRoom.applicationManager.launchApplication(_imports.FcrWhiteboardApplication, {
|
|
234
|
+
width: width,
|
|
235
|
+
height: height,
|
|
267
236
|
defaultToolbarStyle: {
|
|
268
237
|
tool: 'curve',
|
|
269
238
|
strokeColor: '#FFC908',
|
|
270
239
|
strokeWidth: 2
|
|
271
|
-
}
|
|
240
|
+
},
|
|
241
|
+
maxScaleRatio: 1
|
|
272
242
|
}, this._FORGE_WHITEBOARD_APP_ID);
|
|
273
|
-
case
|
|
243
|
+
case 8:
|
|
274
244
|
whiteboard = _context.sent;
|
|
275
|
-
this.
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
// @ts-ignore
|
|
283
|
-
window._boardInstance = this._boardInstance;
|
|
284
|
-
this._initBoardStyle(whiteboard);
|
|
285
|
-
this.joined = true;
|
|
286
|
-
this.logger.info("[annotation-fragment][open]: mount success, the joined is ".concat(this.joined));
|
|
287
|
-
// 共享发起端 开启标注时,重置30s轮询updateWindowSize
|
|
288
|
-
this._handlePollingUpdateWindowSize('sender-board-room-init');
|
|
289
|
-
this._syncScreenShareOwnerOpenDone();
|
|
245
|
+
this._boardInstance = whiteboard;
|
|
246
|
+
this.logger.info("whiteboard launch success");
|
|
247
|
+
this._boardView.classList.add('fcr-whiteboard-window-view');
|
|
248
|
+
this._boardView.appendChild(whiteboard.view);
|
|
249
|
+
if (this._boardDom) {
|
|
250
|
+
_context.next = 9;
|
|
251
|
+
break;
|
|
290
252
|
}
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
253
|
+
throw new Error('cannot mount board view, boardDom is not set');
|
|
254
|
+
case 9:
|
|
255
|
+
this._boardDom.appendChild(this._boardView);
|
|
256
|
+
|
|
257
|
+
// @ts-ignore
|
|
258
|
+
window._boardInstance = this._boardInstance;
|
|
259
|
+
this._initBoardStyle(whiteboard);
|
|
260
|
+
|
|
261
|
+
// 共享发起端 开启标注时,重置30s轮询updateWindowSize
|
|
262
|
+
this._handlePollingUpdateWindowSize('sender-board-room-init');
|
|
263
|
+
this._syncScreenShareOwnerOpenDone();
|
|
264
|
+
boardRoom.applicationManager.on('launch', this._launchHandler);
|
|
265
|
+
boardRoom.applicationManager.on('terminal', this._terminalHandler);
|
|
266
|
+
// workaround
|
|
267
|
+
setTimeout(function () {
|
|
268
|
+
_this2.logger.info('clear page');
|
|
269
|
+
whiteboard.clearPage();
|
|
270
|
+
});
|
|
271
|
+
this.joined = true;
|
|
272
|
+
_context.next = 11;
|
|
273
|
+
break;
|
|
274
|
+
case 10:
|
|
275
|
+
_context.prev = 10;
|
|
276
|
+
_t = _context["catch"](2);
|
|
277
|
+
this._boardInstance = null;
|
|
278
|
+
this._boardRoom = null;
|
|
279
|
+
this.joined = false;
|
|
280
|
+
this.logger.error("open failed, error: ".concat(_t));
|
|
281
|
+
throw _t;
|
|
282
|
+
case 11:
|
|
283
|
+
_context.prev = 11;
|
|
284
|
+
this._openLock = false;
|
|
285
|
+
this.logger.info("open method is finished");
|
|
286
|
+
return _context.finish(11);
|
|
287
|
+
case 12:
|
|
294
288
|
case "end":
|
|
295
289
|
return _context.stop();
|
|
296
290
|
}
|
|
297
|
-
}, _callee, this);
|
|
291
|
+
}, _callee, this, [[2, 10, 11, 12]]);
|
|
298
292
|
}));
|
|
299
293
|
function open() {
|
|
300
294
|
return _open.apply(this, arguments);
|
|
@@ -310,47 +304,48 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
310
304
|
key: "close",
|
|
311
305
|
value: function () {
|
|
312
306
|
var _close = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
313
|
-
var
|
|
307
|
+
var boardInstance, boardRoom;
|
|
314
308
|
return _regenerator["default"].wrap(function (_context2) {
|
|
315
309
|
while (1) switch (_context2.prev = _context2.next) {
|
|
316
310
|
case 0:
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
311
|
+
try {
|
|
312
|
+
if (this._openAbortController) {
|
|
313
|
+
this._openAbortController.abort();
|
|
314
|
+
this._openAbortController = null;
|
|
315
|
+
}
|
|
316
|
+
this._cancelCurrentUpdateWindowSizeTimber('send-fragment-close');
|
|
317
|
+
boardInstance = this._boardInstance;
|
|
318
|
+
boardRoom = this._boardRoom;
|
|
319
|
+
if (boardInstance) {
|
|
320
|
+
try {
|
|
321
|
+
this._boardView.removeChild(boardInstance.view);
|
|
322
|
+
} catch (domError) {
|
|
323
|
+
this.logger.warn('failed to remove board view', domError);
|
|
324
|
+
}
|
|
325
|
+
boardInstance.clearPage();
|
|
326
|
+
}
|
|
327
|
+
if (boardRoom) {
|
|
328
|
+
boardRoom.applicationManager.removeListener('launch', this._launchHandler);
|
|
329
|
+
boardRoom.applicationManager.removeListener('terminal', this._terminalHandler);
|
|
330
|
+
boardRoom.leaveRoom();
|
|
331
|
+
this.logger.info(// @ts-ignore
|
|
332
|
+
"leaveRoom, ".concat(boardRoom['traceId']));
|
|
333
|
+
}
|
|
334
|
+
this._boardInstance = null;
|
|
335
|
+
this._boardRoom = null;
|
|
336
|
+
this.joined = false;
|
|
337
|
+
this.currentTool = 'curve';
|
|
338
|
+
} catch (e) {
|
|
339
|
+
this.logger.error('catch error', e);
|
|
340
|
+
} finally {
|
|
341
|
+
window.runtime.browserWindow.hide();
|
|
342
|
+
this.logger.info('close annotation window');
|
|
328
343
|
}
|
|
329
|
-
_context2.next = 1;
|
|
330
|
-
return (_this$_boardRoom = this._boardRoom) === null || _this$_boardRoom === void 0 ? void 0 : _this$_boardRoom.leaveRoom();
|
|
331
344
|
case 1:
|
|
332
|
-
this.logger.info(// @ts-ignore
|
|
333
|
-
"[annotation-fragment][close] leaveRoom , ".concat(this._boardRoom['traceId']));
|
|
334
|
-
(_this$_boardRoom2 = this._boardRoom) === null || _this$_boardRoom2 === void 0 || _this$_boardRoom2.applicationManager.removeListener('launch', this._launchHandler);
|
|
335
|
-
(_this$_boardRoom3 = this._boardRoom) === null || _this$_boardRoom3 === void 0 || _this$_boardRoom3.applicationManager.removeListener('terminal', this._terminalHandler);
|
|
336
|
-
this._boardInstance = null;
|
|
337
|
-
this._boardRoom = null;
|
|
338
|
-
_context2.next = 3;
|
|
339
|
-
break;
|
|
340
|
-
case 2:
|
|
341
|
-
_context2.prev = 2;
|
|
342
|
-
_t = _context2["catch"](0);
|
|
343
|
-
this.logger.info('[annotation-fragment][close]: catch error', _t);
|
|
344
|
-
case 3:
|
|
345
|
-
_context2.prev = 3;
|
|
346
|
-
window.runtime.browserWindow.hide();
|
|
347
|
-
this.logger.info('[annotation-fragment][close]: close annotation window');
|
|
348
|
-
return _context2.finish(3);
|
|
349
|
-
case 4:
|
|
350
345
|
case "end":
|
|
351
346
|
return _context2.stop();
|
|
352
347
|
}
|
|
353
|
-
}, _callee2, this
|
|
348
|
+
}, _callee2, this);
|
|
354
349
|
}));
|
|
355
350
|
function close() {
|
|
356
351
|
return _close.apply(this, arguments);
|
|
@@ -361,25 +356,26 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
361
356
|
key: "hide",
|
|
362
357
|
value: function hide() {
|
|
363
358
|
window.runtime.browserWindow.hide();
|
|
364
|
-
this.logger.info('
|
|
359
|
+
this.logger.info('hide annotation window');
|
|
365
360
|
}
|
|
366
361
|
}, {
|
|
367
362
|
key: "show",
|
|
368
363
|
value: function show() {
|
|
369
364
|
window.runtime.browserWindow.setAlwaysOnTop(true, 'pop-up-menu');
|
|
370
365
|
window.runtime.browserWindow.show();
|
|
371
|
-
this.logger.info('
|
|
366
|
+
this.logger.info('show annotation window');
|
|
372
367
|
}
|
|
373
368
|
}, {
|
|
374
369
|
key: "focus",
|
|
375
370
|
value: function focus() {
|
|
371
|
+
this.logger.info('focus annotation window');
|
|
376
372
|
window.runtime.browserWindow.focus();
|
|
377
373
|
}
|
|
378
374
|
}, {
|
|
379
375
|
key: "setBounds",
|
|
380
376
|
value: function setBounds(bounds) {
|
|
381
377
|
this.bounds = bounds;
|
|
382
|
-
this.logger.info("
|
|
378
|
+
this.logger.info("bounds is changed =>, ".concat(JSON.stringify(bounds)));
|
|
383
379
|
window.runtime.browserWindow.setBounds(bounds);
|
|
384
380
|
this._updateBoardElBySize({
|
|
385
381
|
width: bounds.width,
|
|
@@ -401,28 +397,27 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
401
397
|
}, {
|
|
402
398
|
key: "_updateWindowSize",
|
|
403
399
|
value: function _updateWindowSize(paramWidth, paramHeight) {
|
|
404
|
-
var _this$_boardInstance;
|
|
405
400
|
if (!paramWidth || !paramHeight) {
|
|
406
401
|
return;
|
|
407
402
|
}
|
|
408
|
-
// if (
|
|
409
|
-
// paramWidth !== this._lastViewPortSet.width ||
|
|
410
|
-
// paramHeight !== this._lastViewPortSet.height
|
|
411
|
-
// ) {
|
|
412
403
|
this._lastViewPortSet.width = paramWidth;
|
|
413
404
|
this._lastViewPortSet.height = paramHeight;
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
405
|
+
if (this._boardInstance) {
|
|
406
|
+
this.logger.info("updateViewport width:".concat(paramWidth, " height:").concat(paramHeight));
|
|
407
|
+
this._boardInstance.updateViewport(paramWidth, paramHeight);
|
|
408
|
+
} else {
|
|
409
|
+
this.logger.error('cannot updateViewport, _boardInstance is null');
|
|
410
|
+
}
|
|
417
411
|
}
|
|
418
412
|
}, {
|
|
419
413
|
key: "_updateBoardElBySize",
|
|
420
414
|
value: function _updateBoardElBySize(size) {
|
|
421
415
|
if (size) {
|
|
422
|
-
var _this$
|
|
416
|
+
var _this$_boardInstance;
|
|
417
|
+
this.logger.info('update board element size', size);
|
|
423
418
|
this._boardView.style.width = "".concat(size.width, "px");
|
|
424
419
|
this._boardView.style.height = "".concat(size.height, "px");
|
|
425
|
-
var currentBoardInstanceView = (_this$
|
|
420
|
+
var currentBoardInstanceView = (_this$_boardInstance = this._boardInstance) === null || _this$_boardInstance === void 0 ? void 0 : _this$_boardInstance.view;
|
|
426
421
|
if (currentBoardInstanceView) {
|
|
427
422
|
currentBoardInstanceView.style.width = "".concat(size.width, "px");
|
|
428
423
|
currentBoardInstanceView.style.height = "".concat(size.height, "px");
|
|
@@ -433,15 +428,14 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
433
428
|
}, {
|
|
434
429
|
key: "setIgnore",
|
|
435
430
|
value: function setIgnore(ignore) {
|
|
436
|
-
this.logger.info("
|
|
437
|
-
this.isIgnore = ignore;
|
|
431
|
+
this.logger.info("setIgnore method is called, the ignore is => ".concat(ignore));
|
|
438
432
|
window.runtime.browserWindow.setIgnoreMouseEvents(ignore);
|
|
439
433
|
}
|
|
440
434
|
}, {
|
|
441
435
|
key: "toolChanged",
|
|
442
436
|
value: function toolChanged(event) {
|
|
443
437
|
if (!this._boardInstance) return;
|
|
444
|
-
this.logger.info("
|
|
438
|
+
this.logger.info("toolChanged method is called, the event is => ".concat(JSON.stringify(event)));
|
|
445
439
|
var board = this._boardInstance;
|
|
446
440
|
var payload = event.payload;
|
|
447
441
|
switch (event.action) {
|
|
@@ -477,7 +471,7 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
477
471
|
}, {
|
|
478
472
|
key: "setDrawing",
|
|
479
473
|
value: function setDrawing(drawing) {
|
|
480
|
-
this.logger.info("
|
|
474
|
+
this.logger.info("setDrawing method is called, the drawing is => ".concat(drawing));
|
|
481
475
|
this.drawing = drawing;
|
|
482
476
|
}
|
|
483
477
|
}, {
|
|
@@ -485,7 +479,7 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
485
479
|
value: function _initBoardStyle(whiteboard) {
|
|
486
480
|
var frameWidth = this.bounds.width;
|
|
487
481
|
var frameHeight = this.bounds.height;
|
|
488
|
-
this.logger.info("
|
|
482
|
+
this.logger.info("mount success, width: ".concat(frameWidth, " , height: ").concat(frameHeight));
|
|
489
483
|
this._boardView.style.width = "".concat(frameWidth, "px");
|
|
490
484
|
this._boardView.style.height = "".concat(frameHeight, "px");
|
|
491
485
|
whiteboard.view.style.height = "".concat(frameHeight, "px");
|
|
@@ -498,7 +492,7 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
498
492
|
whiteboard.strokeColor = '#FFC908';
|
|
499
493
|
whiteboard.setCurrentTool('curve');
|
|
500
494
|
this._updateWindowSize(frameWidth, frameHeight);
|
|
501
|
-
this.logger.info("
|
|
495
|
+
this.logger.info("mount success current tool, ".concat(whiteboard.getCurrentTool(), ", updateViewport width: ").concat(frameWidth, " height: ").concat(frameHeight));
|
|
502
496
|
whiteboard.on('undoStackLength', function (steps) {
|
|
503
497
|
// isWindows() && window.runtime.browserWindow.blur();
|
|
504
498
|
(0, _rendererEvent.sendEvent)({
|
|
@@ -517,16 +511,16 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
517
511
|
}, {
|
|
518
512
|
key: "_handleSetTool",
|
|
519
513
|
value: function _handleSetTool(payload) {
|
|
520
|
-
var
|
|
514
|
+
var _this3 = this;
|
|
521
515
|
var board = this._boardInstance;
|
|
522
516
|
this.currentTool = 'none';
|
|
523
517
|
var currentTool = (0, _libs.convertTool)(payload);
|
|
524
518
|
if (board) {
|
|
525
519
|
board.setCurrentTool(currentTool);
|
|
526
520
|
var timber = setTimeout(function () {
|
|
527
|
-
var
|
|
528
|
-
(
|
|
529
|
-
|
|
521
|
+
var _this3$_boardDom;
|
|
522
|
+
(_this3$_boardDom = _this3._boardDom) === null || _this3$_boardDom === void 0 || _this3$_boardDom.getBoundingClientRect();
|
|
523
|
+
_this3.currentTool = currentTool;
|
|
530
524
|
clearTimeout(timber);
|
|
531
525
|
}, 600);
|
|
532
526
|
}
|
|
@@ -535,37 +529,38 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
535
529
|
key: "_init",
|
|
536
530
|
value: function () {
|
|
537
531
|
var _init2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(engine) {
|
|
538
|
-
var
|
|
532
|
+
var _this4 = this;
|
|
539
533
|
return _regenerator["default"].wrap(function (_context3) {
|
|
540
534
|
while (1) switch (_context3.prev = _context3.next) {
|
|
541
535
|
case 0:
|
|
542
536
|
engine.addObserver({
|
|
543
537
|
onConnectionStateUpdated: function onConnectionStateUpdated(state) {
|
|
538
|
+
(0, _sharedStorage.setAnnotationEngineState)(state);
|
|
544
539
|
(0, _rendererEvent.sendEvent)({
|
|
545
540
|
action: _constant.FcrUIRendererEventAction.FRAGMENT_ANNOTATION_ENGINE_STATE,
|
|
546
541
|
payload: state
|
|
547
542
|
});
|
|
548
543
|
if (state === _fcrCore.FcrConnectionState.CONNECTED) {
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
if (
|
|
552
|
-
|
|
553
|
-
|
|
544
|
+
_this4._engine = engine;
|
|
545
|
+
_this4.logger.info("engine connection state updated => CONNECTED, hasWaitingOpen ".concat(_this4._hasWaitingOpen));
|
|
546
|
+
if (_this4._hasWaitingOpen) {
|
|
547
|
+
_this4._hasWaitingOpen = false;
|
|
548
|
+
_this4.open();
|
|
554
549
|
}
|
|
555
550
|
}
|
|
556
551
|
if (state === _fcrCore.FcrConnectionState.DISCONNECTED) {
|
|
557
|
-
|
|
558
|
-
|
|
552
|
+
_this4.logger.info("engine connection state updated => DISCONNECTED, the engine is ".concat(_this4._engine));
|
|
553
|
+
_this4._engine && engine.login();
|
|
559
554
|
}
|
|
560
555
|
if (state === _fcrCore.FcrConnectionState.CONNECTING) {
|
|
561
|
-
|
|
556
|
+
_this4.logger.info("engine connection state updated => CONNECTING");
|
|
562
557
|
}
|
|
563
558
|
if (state === _fcrCore.FcrConnectionState.RECONNECTING) {
|
|
564
|
-
|
|
559
|
+
_this4.logger.info("engine connection state updated => RECONNECTING");
|
|
565
560
|
}
|
|
566
561
|
if (state === _fcrCore.FcrConnectionState.ABORTED) {
|
|
567
|
-
|
|
568
|
-
|
|
562
|
+
_this4.logger.info("engine connection state updated => ABORTED, the engine is ".concat(_this4._engine));
|
|
563
|
+
_this4._engine && engine.login();
|
|
569
564
|
}
|
|
570
565
|
}
|
|
571
566
|
});
|
|
@@ -585,15 +580,20 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
585
580
|
}, {
|
|
586
581
|
key: "_initBoardRoom",
|
|
587
582
|
value: function () {
|
|
588
|
-
var _initBoardRoom2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
589
|
-
var
|
|
590
|
-
var _this$_config, userId, boardToken, region, appIdentifier, boardId, nickName, rtmClient, rtmProvider, wbRoom, currentTimeStamp,
|
|
591
|
-
return _regenerator["default"].wrap(function (
|
|
592
|
-
while (1) switch (
|
|
583
|
+
var _initBoardRoom2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee7() {
|
|
584
|
+
var _this5 = this;
|
|
585
|
+
var _this$_config, userId, boardToken, region, appIdentifier, boardId, nickName, rtmClient, rtmProvider, wbRoom, currentTimeStamp, abortController;
|
|
586
|
+
return _regenerator["default"].wrap(function (_context7) {
|
|
587
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
593
588
|
case 0:
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
589
|
+
if (this._config) {
|
|
590
|
+
_context7.next = 1;
|
|
591
|
+
break;
|
|
592
|
+
}
|
|
593
|
+
throw new Error('cannot init board room, config is not set');
|
|
594
|
+
case 1:
|
|
595
|
+
_this$_config = this._config, userId = _this$_config.userId, boardToken = _this$_config.boardToken, region = _this$_config.region, appIdentifier = _this$_config.appIdentifier, boardId = _this$_config.boardId, nickName = _this$_config.nickName;
|
|
596
|
+
this.logger.info("start init board room with config => ".concat(JSON.stringify(this._config), " - ").concat(nickName));
|
|
597
597
|
// @ts-ignore
|
|
598
598
|
rtmClient = this._engine._rteEngine._rtmClient._client;
|
|
599
599
|
rtmProvider = new _imports.FcrRTMProvider_2_2(rtmClient);
|
|
@@ -602,73 +602,111 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
602
602
|
currentTimeStamp = Date.now(); // @ts-ignore
|
|
603
603
|
this._boardRoom['traceId'] = "".concat(boardToken, "-").concat(boardId, "-").concat(userId, "-").concat(currentTimeStamp);
|
|
604
604
|
wbRoom.applicationManager.registerApplication(_imports.FcrWhiteboardApplication);
|
|
605
|
-
this.logger.info("
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
_context4.next = 1;
|
|
614
|
-
return wbRoom.joinRoom({
|
|
615
|
-
userId: userId,
|
|
616
|
-
nickName: nickName,
|
|
617
|
-
roomToken: boardToken,
|
|
618
|
-
sdkConfig: {
|
|
619
|
-
// @ts-ignore
|
|
620
|
-
region: region,
|
|
621
|
-
appIdentifier: appIdentifier
|
|
622
|
-
}
|
|
623
|
-
});
|
|
624
|
-
case 1:
|
|
625
|
-
// @ts-ignore
|
|
626
|
-
_this3.logger.info(// @ts-ignore
|
|
627
|
-
"[annotation-fragment][initBoardRoom]: join room success, traceId ".concat(_this3._boardRoom['traceId']));
|
|
628
|
-
// room.userManager.on("join") 和 room.userManager.on("leave")
|
|
629
|
-
wbRoom.userManager.on('join', _this3._handleBoardRoomUserJoin);
|
|
630
|
-
// wbRoom.userManager.on('leave',this._handleBoardRoomUserLeave);
|
|
631
|
-
case 2:
|
|
632
|
-
case "end":
|
|
633
|
-
return _context4.stop();
|
|
634
|
-
}
|
|
635
|
-
}, _callee4);
|
|
636
|
-
})), [], {
|
|
637
|
-
retriesMax: retriesMax
|
|
638
|
-
}).fail(/*#__PURE__*/function () {
|
|
639
|
-
var _ref4 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5(_ref3) {
|
|
640
|
-
var error, timeFn, currentRetry;
|
|
641
|
-
return _regenerator["default"].wrap(function (_context5) {
|
|
642
|
-
while (1) switch (_context5.prev = _context5.next) {
|
|
605
|
+
this.logger.info("bordRoom instance is created, start join room");
|
|
606
|
+
abortController = new AbortController();
|
|
607
|
+
this._openAbortController = abortController;
|
|
608
|
+
return _context7.abrupt("return", new Promise(/*#__PURE__*/function () {
|
|
609
|
+
var _ref2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6(resolve, reject) {
|
|
610
|
+
var retriesMax, _t2;
|
|
611
|
+
return _regenerator["default"].wrap(function (_context6) {
|
|
612
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
643
613
|
case 0:
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
614
|
+
// 监听中止信号
|
|
615
|
+
abortController.signal.addEventListener('abort', function () {
|
|
616
|
+
reject(new Error('join board room aborted'));
|
|
617
|
+
});
|
|
618
|
+
_context6.prev = 1;
|
|
619
|
+
retriesMax = 10;
|
|
620
|
+
_context6.next = 2;
|
|
621
|
+
return (0, _asyncRetry.retryAttempt)(/*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4() {
|
|
622
|
+
return _regenerator["default"].wrap(function (_context4) {
|
|
623
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
624
|
+
case 0:
|
|
625
|
+
_context4.next = 1;
|
|
626
|
+
return wbRoom.joinRoom({
|
|
627
|
+
userId: userId,
|
|
628
|
+
nickName: nickName,
|
|
629
|
+
roomToken: boardToken,
|
|
630
|
+
sdkConfig: {
|
|
631
|
+
// @ts-ignore
|
|
632
|
+
region: region,
|
|
633
|
+
appIdentifier: appIdentifier
|
|
634
|
+
}
|
|
635
|
+
});
|
|
636
|
+
case 1:
|
|
637
|
+
case "end":
|
|
638
|
+
return _context4.stop();
|
|
639
|
+
}
|
|
640
|
+
}, _callee4);
|
|
641
|
+
})), [], {
|
|
642
|
+
retriesMax: retriesMax
|
|
643
|
+
}).fail(/*#__PURE__*/function () {
|
|
644
|
+
var _ref5 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5(_ref4) {
|
|
645
|
+
var error, timeFn, currentRetry;
|
|
646
|
+
return _regenerator["default"].wrap(function (_context5) {
|
|
647
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
648
|
+
case 0:
|
|
649
|
+
error = _ref4.error, timeFn = _ref4.timeFn, currentRetry = _ref4.currentRetry;
|
|
650
|
+
if (!abortController.signal.aborted) {
|
|
651
|
+
_context5.next = 1;
|
|
652
|
+
break;
|
|
653
|
+
}
|
|
654
|
+
throw new Error('join board room aborted');
|
|
655
|
+
case 1:
|
|
656
|
+
_this5.logger.info("retry to join board room, ".concat(error.message, ", retry ").concat(currentRetry, " times"));
|
|
657
|
+
_context5.next = 2;
|
|
658
|
+
return timeFn();
|
|
659
|
+
case 2:
|
|
660
|
+
return _context5.abrupt("return", true);
|
|
661
|
+
case 3:
|
|
662
|
+
case "end":
|
|
663
|
+
return _context5.stop();
|
|
664
|
+
}
|
|
665
|
+
}, _callee5);
|
|
666
|
+
}));
|
|
667
|
+
return function (_x4) {
|
|
668
|
+
return _ref5.apply(this, arguments);
|
|
669
|
+
};
|
|
670
|
+
}()).exec();
|
|
650
671
|
case 2:
|
|
672
|
+
if (!abortController.signal.aborted) {
|
|
673
|
+
_context6.next = 3;
|
|
674
|
+
break;
|
|
675
|
+
}
|
|
676
|
+
throw new Error('join board room aborted');
|
|
677
|
+
case 3:
|
|
678
|
+
_this5.logger.info(// @ts-ignore
|
|
679
|
+
"join room success, traceId ".concat(_this5._boardRoom['traceId']));
|
|
680
|
+
wbRoom.userManager.on('join', _this5._handleBoardRoomUserJoin);
|
|
681
|
+
resolve(wbRoom);
|
|
682
|
+
_context6.next = 5;
|
|
683
|
+
break;
|
|
684
|
+
case 4:
|
|
685
|
+
_context6.prev = 4;
|
|
686
|
+
_t2 = _context6["catch"](1);
|
|
687
|
+
_this5.logger.error("join room failed");
|
|
688
|
+
reject(_t2);
|
|
689
|
+
case 5:
|
|
690
|
+
_context6.prev = 5;
|
|
691
|
+
_this5._openAbortController = null;
|
|
692
|
+
return _context6.finish(5);
|
|
693
|
+
case 6:
|
|
694
|
+
return _context6.abrupt("return", wbRoom);
|
|
695
|
+
case 7:
|
|
651
696
|
case "end":
|
|
652
|
-
return
|
|
697
|
+
return _context6.stop();
|
|
653
698
|
}
|
|
654
|
-
},
|
|
699
|
+
}, _callee6, null, [[1, 4, 5, 6]]);
|
|
655
700
|
}));
|
|
656
|
-
return function (_x2) {
|
|
657
|
-
return
|
|
701
|
+
return function (_x2, _x3) {
|
|
702
|
+
return _ref2.apply(this, arguments);
|
|
658
703
|
};
|
|
659
|
-
}())
|
|
704
|
+
}()));
|
|
660
705
|
case 2:
|
|
661
|
-
_context6.next = 4;
|
|
662
|
-
break;
|
|
663
|
-
case 3:
|
|
664
|
-
_context6.prev = 3;
|
|
665
|
-
_t2 = _context6["catch"](1);
|
|
666
|
-
this.logger.error("[annotation-fragment][initBoardRoom]: join room failed");
|
|
667
|
-
case 4:
|
|
668
706
|
case "end":
|
|
669
|
-
return
|
|
707
|
+
return _context7.stop();
|
|
670
708
|
}
|
|
671
|
-
},
|
|
709
|
+
}, _callee7, this);
|
|
672
710
|
}));
|
|
673
711
|
function _initBoardRoom() {
|
|
674
712
|
return _initBoardRoom2.apply(this, arguments);
|
|
@@ -676,26 +714,34 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
676
714
|
return _initBoardRoom;
|
|
677
715
|
}()
|
|
678
716
|
}, {
|
|
679
|
-
key: "
|
|
680
|
-
value: function
|
|
717
|
+
key: "_createEngine",
|
|
718
|
+
value: function _createEngine(config) {
|
|
681
719
|
var userId = config.userId,
|
|
682
720
|
token = config.roomToken,
|
|
683
721
|
appId = config.appId;
|
|
684
|
-
this.logger.
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
722
|
+
this.logger.debug('before create engine');
|
|
723
|
+
try {
|
|
724
|
+
(0, _fcrCore.registerPlugin)(new _rtmPlugin.RtmPlugin());
|
|
725
|
+
(0, _fcrCore.registerPlugin)(new _electronRtcPlugin.ElectronRtcPlugin());
|
|
726
|
+
var engine = new _fcrCore.FcrCoreEngine(_objectSpread({
|
|
727
|
+
appId: appId,
|
|
728
|
+
token: token,
|
|
729
|
+
userId: userId,
|
|
730
|
+
region: _fcrCore.FcrRegion.CN
|
|
731
|
+
}, _libs.engineRestConfig));
|
|
732
|
+
this.logger.debug('after create engine');
|
|
733
|
+
return engine;
|
|
734
|
+
} catch (e) {
|
|
735
|
+
this.logger.error("create engine failed, error: ".concat(e));
|
|
736
|
+
throw e;
|
|
737
|
+
}
|
|
691
738
|
}
|
|
692
739
|
}, {
|
|
693
740
|
key: "_launchHandler",
|
|
694
741
|
value: function _launchHandler(appId, app) {
|
|
695
742
|
if (appId === this._FORGE_WHITEBOARD_APP_ID) {
|
|
696
|
-
this.logger.info("
|
|
697
|
-
this.
|
|
698
|
-
this._currentAnntationView && this._boardView.appendChild(this._currentAnntationView);
|
|
743
|
+
this.logger.info("launch event is triggered => ".concat(app.selfUserId));
|
|
744
|
+
this._boardView.appendChild(app.view);
|
|
699
745
|
this._initBoardStyle(app);
|
|
700
746
|
}
|
|
701
747
|
}
|
|
@@ -704,7 +750,7 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
704
750
|
value: function _terminalHandler(appId, app) {
|
|
705
751
|
if (appId === this._FORGE_WHITEBOARD_APP_ID) {
|
|
706
752
|
var _this$_boardView;
|
|
707
|
-
this.logger.info("
|
|
753
|
+
this.logger.info("terminal event is triggered => ".concat(app.selfUserId));
|
|
708
754
|
(app === null || app === void 0 ? void 0 : app.view) && this._boardView.hasChildNodes() && ((_this$_boardView = this._boardView) === null || _this$_boardView === void 0 ? void 0 : _this$_boardView.removeChild(app.view));
|
|
709
755
|
}
|
|
710
756
|
}
|
|
@@ -723,15 +769,15 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
723
769
|
value: function _cancelCurrentUpdateWindowSizeTimber(stage) {
|
|
724
770
|
if (this._pollingCancelHandler && typeof this._pollingCancelHandler === 'function') {
|
|
725
771
|
this._pollingCancelHandler();
|
|
726
|
-
this.logger.info("
|
|
772
|
+
this.logger.info("end a new 30s polling to updateWindowSize, when ".concat(stage));
|
|
727
773
|
}
|
|
728
774
|
}
|
|
729
775
|
}, {
|
|
730
776
|
key: "_handlePollingUpdateWindowSize",
|
|
731
777
|
value: function _handlePollingUpdateWindowSize(stage) {
|
|
732
778
|
this._cancelCurrentUpdateWindowSizeTimber(stage);
|
|
733
|
-
this._pollingCancelHandler = startPolling(this._updateWindowSizeWithCurrentBounds);
|
|
734
|
-
this.logger.info("
|
|
779
|
+
this._pollingCancelHandler = (0, _utils.startPolling)(this._updateWindowSizeWithCurrentBounds);
|
|
780
|
+
this.logger.info("start a new 30s polling to updateWindowSize, after ".concat(stage));
|
|
735
781
|
}
|
|
736
782
|
}, {
|
|
737
783
|
key: "_handleBoardRoomUserJoin",
|
|
@@ -742,20 +788,59 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
742
788
|
}, {
|
|
743
789
|
key: "_syncScreenShareOwnerOpenDone",
|
|
744
790
|
value: function _syncScreenShareOwnerOpenDone() {
|
|
745
|
-
this.logger.info('
|
|
791
|
+
this.logger.info('syncScreenShareOwnerOpenDone');
|
|
746
792
|
(0, _rendererEvent.sendEvent)({
|
|
747
793
|
action: _constant.FcrUIRendererEventAction.FRAGMENT_ANNOTATION_SYNC_OWNER_OPEN_DONE,
|
|
748
794
|
payload: null
|
|
749
795
|
});
|
|
750
796
|
}
|
|
797
|
+
}, {
|
|
798
|
+
key: "_checkForConnect",
|
|
799
|
+
value: function _checkForConnect() {
|
|
800
|
+
var boardOptions = (0, _sharedStorage.getBoardOptions)();
|
|
801
|
+
var readyToConnect = !!boardOptions;
|
|
802
|
+
var isEngineInitialized = this._isEngineInitialized;
|
|
803
|
+
this.logger.info("check for connect, readyToConnect: ".concat(readyToConnect, ", isEngineInitialized: ").concat(isEngineInitialized));
|
|
804
|
+
if (!isEngineInitialized && readyToConnect) {
|
|
805
|
+
this._checkForConnectTask.stop();
|
|
806
|
+
var rtmAppId = boardOptions.rtmAppId,
|
|
807
|
+
boardAppId = boardOptions.boardAppId,
|
|
808
|
+
boardId = boardOptions.boardId,
|
|
809
|
+
boardRegion = boardOptions.boardRegion,
|
|
810
|
+
boardToken = boardOptions.boardToken,
|
|
811
|
+
boardUserToken = boardOptions.boardUserToken,
|
|
812
|
+
userId = boardOptions.boardUserUuid,
|
|
813
|
+
nickName = boardOptions.nickName;
|
|
814
|
+
this._config = {
|
|
815
|
+
appId: rtmAppId,
|
|
816
|
+
userId: userId,
|
|
817
|
+
region: boardRegion,
|
|
818
|
+
appIdentifier: boardAppId,
|
|
819
|
+
boardId: boardId,
|
|
820
|
+
boardToken: boardToken,
|
|
821
|
+
nickName: nickName
|
|
822
|
+
};
|
|
823
|
+
this.logger.info("boardinfo => ".concat((0, _imports.jsonstring)(this._config)));
|
|
824
|
+
var engine = this._createEngine({
|
|
825
|
+
userId: userId,
|
|
826
|
+
roomToken: boardUserToken,
|
|
827
|
+
appId: rtmAppId
|
|
828
|
+
});
|
|
829
|
+
|
|
830
|
+
// @ts-ignore
|
|
831
|
+
window._coreEngine = engine;
|
|
832
|
+
this.logger.info("login engine with the following config: annotationRtmAppId => ".concat(rtmAppId, ", boardOptions => ").concat((0, _imports.jsonstring)(boardOptions)));
|
|
833
|
+
this._init(engine);
|
|
834
|
+
this._isEngineInitialized = true;
|
|
835
|
+
}
|
|
836
|
+
}
|
|
751
837
|
}]);
|
|
752
838
|
}();
|
|
753
839
|
_FragmentAnnotationStore = FragmentAnnotationStore;
|
|
754
|
-
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_FragmentAnnotationStore, [[_mobx.observable, 1, "joined"], [_mobx.observable, 1, "bounds"], [_mobx.observable, 1, "currentTool"], [_mobx.observable, 1, "
|
|
840
|
+
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_FragmentAnnotationStore, [[_mobx.observable, 1, "joined"], [_mobx.observable, 1, "bounds"], [_mobx.observable, 1, "currentTool"], [_mobx.observable, 1, "drawing"], [_decorator.bound, 2, "open"], [_handleBoardDomLoadDecs, 18, "handleBoardDomLoad"], [_closeDecs, 18, "close"], [_hideDecs, 18, "hide"], [_showDecs, 18, "show"], [_decorator.bound, 2, "focus"], [_decorator.bound, 2, "updateWindowSize"], [_decorator.bound, 2, "_updateWindowSizeWithCurrentBounds"], [_decorator.bound, 2, "_updateWindowSize"], [_decorator.bound, 2, "_updateBoardElBySize"], [_decorator.bound, 2, "setIgnore"], [_decorator.bound, 2, "toolChanged"], [_decorator.bound, 2, "setDrawing"], [_decorator.bound, 2, "_initBoardStyle"], [_handleSetToolDecs, 2, "_handleSetTool"], [_decorator.bound, 2, "_init"], [_decorator.bound, 2, "_initBoardRoom"], [_decorator.bound, 2, "_launchHandler"], [_decorator.bound, 2, "_terminalHandler"], [_decorator.bound, 2, "_resizeToMax"], [_decorator.bound, 2, "_cancelCurrentUpdateWindowSizeTimber"], [_decorator.bound, 2, "_handlePollingUpdateWindowSize"], [_decorator.bound, 2, "_handleBoardRoomUserJoin"], [_decorator.bound, 2, "_syncScreenShareOwnerOpenDone"]], []).e, 5);
|
|
755
841
|
_init_joined = _applyDecs$e[0];
|
|
756
842
|
_init_bounds = _applyDecs$e[1];
|
|
757
843
|
_init_currentTool = _applyDecs$e[2];
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
_initProto = _applyDecs$e[5];
|
|
844
|
+
_init_drawing = _applyDecs$e[3];
|
|
845
|
+
_initProto = _applyDecs$e[4];
|
|
761
846
|
var FragmentAnnotationStoreContext = exports.FragmentAnnotationStoreContext = /*#__PURE__*/(0, _react.createContext)(null);
|