fcr-ui-scene 3.7.2 → 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 +351 -267
- 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/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 +7 -59
- package/lib/modules/layout/store.js +126 -24
- 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 +331 -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.js +1 -2
- 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,77 +160,79 @@ 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',
|
|
@@ -271,31 +240,55 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
271
240
|
},
|
|
272
241
|
maxScaleRatio: 1
|
|
273
242
|
}, this._FORGE_WHITEBOARD_APP_ID);
|
|
274
|
-
case
|
|
243
|
+
case 8:
|
|
275
244
|
whiteboard = _context.sent;
|
|
276
|
-
this.
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
// @ts-ignore
|
|
284
|
-
window._boardInstance = this._boardInstance;
|
|
285
|
-
this._initBoardStyle(whiteboard);
|
|
286
|
-
this.joined = true;
|
|
287
|
-
this.logger.info("[annotation-fragment][open]: mount success, the joined is ".concat(this.joined));
|
|
288
|
-
// 共享发起端 开启标注时,重置30s轮询updateWindowSize
|
|
289
|
-
this._handlePollingUpdateWindowSize('sender-board-room-init');
|
|
290
|
-
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;
|
|
291
252
|
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
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:
|
|
295
288
|
case "end":
|
|
296
289
|
return _context.stop();
|
|
297
290
|
}
|
|
298
|
-
}, _callee, this);
|
|
291
|
+
}, _callee, this, [[2, 10, 11, 12]]);
|
|
299
292
|
}));
|
|
300
293
|
function open() {
|
|
301
294
|
return _open.apply(this, arguments);
|
|
@@ -311,47 +304,48 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
311
304
|
key: "close",
|
|
312
305
|
value: function () {
|
|
313
306
|
var _close = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
314
|
-
var
|
|
307
|
+
var boardInstance, boardRoom;
|
|
315
308
|
return _regenerator["default"].wrap(function (_context2) {
|
|
316
309
|
while (1) switch (_context2.prev = _context2.next) {
|
|
317
310
|
case 0:
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
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');
|
|
329
343
|
}
|
|
330
|
-
_context2.next = 1;
|
|
331
|
-
return (_this$_boardRoom = this._boardRoom) === null || _this$_boardRoom === void 0 ? void 0 : _this$_boardRoom.leaveRoom();
|
|
332
344
|
case 1:
|
|
333
|
-
this.logger.info(// @ts-ignore
|
|
334
|
-
"[annotation-fragment][close] leaveRoom , ".concat(this._boardRoom['traceId']));
|
|
335
|
-
(_this$_boardRoom2 = this._boardRoom) === null || _this$_boardRoom2 === void 0 || _this$_boardRoom2.applicationManager.removeListener('launch', this._launchHandler);
|
|
336
|
-
(_this$_boardRoom3 = this._boardRoom) === null || _this$_boardRoom3 === void 0 || _this$_boardRoom3.applicationManager.removeListener('terminal', this._terminalHandler);
|
|
337
|
-
this._boardInstance = null;
|
|
338
|
-
this._boardRoom = null;
|
|
339
|
-
_context2.next = 3;
|
|
340
|
-
break;
|
|
341
|
-
case 2:
|
|
342
|
-
_context2.prev = 2;
|
|
343
|
-
_t = _context2["catch"](0);
|
|
344
|
-
this.logger.info('[annotation-fragment][close]: catch error', _t);
|
|
345
|
-
case 3:
|
|
346
|
-
_context2.prev = 3;
|
|
347
|
-
window.runtime.browserWindow.hide();
|
|
348
|
-
this.logger.info('[annotation-fragment][close]: close annotation window');
|
|
349
|
-
return _context2.finish(3);
|
|
350
|
-
case 4:
|
|
351
345
|
case "end":
|
|
352
346
|
return _context2.stop();
|
|
353
347
|
}
|
|
354
|
-
}, _callee2, this
|
|
348
|
+
}, _callee2, this);
|
|
355
349
|
}));
|
|
356
350
|
function close() {
|
|
357
351
|
return _close.apply(this, arguments);
|
|
@@ -362,25 +356,26 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
362
356
|
key: "hide",
|
|
363
357
|
value: function hide() {
|
|
364
358
|
window.runtime.browserWindow.hide();
|
|
365
|
-
this.logger.info('
|
|
359
|
+
this.logger.info('hide annotation window');
|
|
366
360
|
}
|
|
367
361
|
}, {
|
|
368
362
|
key: "show",
|
|
369
363
|
value: function show() {
|
|
370
364
|
window.runtime.browserWindow.setAlwaysOnTop(true, 'pop-up-menu');
|
|
371
365
|
window.runtime.browserWindow.show();
|
|
372
|
-
this.logger.info('
|
|
366
|
+
this.logger.info('show annotation window');
|
|
373
367
|
}
|
|
374
368
|
}, {
|
|
375
369
|
key: "focus",
|
|
376
370
|
value: function focus() {
|
|
371
|
+
this.logger.info('focus annotation window');
|
|
377
372
|
window.runtime.browserWindow.focus();
|
|
378
373
|
}
|
|
379
374
|
}, {
|
|
380
375
|
key: "setBounds",
|
|
381
376
|
value: function setBounds(bounds) {
|
|
382
377
|
this.bounds = bounds;
|
|
383
|
-
this.logger.info("
|
|
378
|
+
this.logger.info("bounds is changed =>, ".concat(JSON.stringify(bounds)));
|
|
384
379
|
window.runtime.browserWindow.setBounds(bounds);
|
|
385
380
|
this._updateBoardElBySize({
|
|
386
381
|
width: bounds.width,
|
|
@@ -402,28 +397,27 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
402
397
|
}, {
|
|
403
398
|
key: "_updateWindowSize",
|
|
404
399
|
value: function _updateWindowSize(paramWidth, paramHeight) {
|
|
405
|
-
var _this$_boardInstance;
|
|
406
400
|
if (!paramWidth || !paramHeight) {
|
|
407
401
|
return;
|
|
408
402
|
}
|
|
409
|
-
// if (
|
|
410
|
-
// paramWidth !== this._lastViewPortSet.width ||
|
|
411
|
-
// paramHeight !== this._lastViewPortSet.height
|
|
412
|
-
// ) {
|
|
413
403
|
this._lastViewPortSet.width = paramWidth;
|
|
414
404
|
this._lastViewPortSet.height = paramHeight;
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
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
|
+
}
|
|
418
411
|
}
|
|
419
412
|
}, {
|
|
420
413
|
key: "_updateBoardElBySize",
|
|
421
414
|
value: function _updateBoardElBySize(size) {
|
|
422
415
|
if (size) {
|
|
423
|
-
var _this$
|
|
416
|
+
var _this$_boardInstance;
|
|
417
|
+
this.logger.info('update board element size', size);
|
|
424
418
|
this._boardView.style.width = "".concat(size.width, "px");
|
|
425
419
|
this._boardView.style.height = "".concat(size.height, "px");
|
|
426
|
-
var currentBoardInstanceView = (_this$
|
|
420
|
+
var currentBoardInstanceView = (_this$_boardInstance = this._boardInstance) === null || _this$_boardInstance === void 0 ? void 0 : _this$_boardInstance.view;
|
|
427
421
|
if (currentBoardInstanceView) {
|
|
428
422
|
currentBoardInstanceView.style.width = "".concat(size.width, "px");
|
|
429
423
|
currentBoardInstanceView.style.height = "".concat(size.height, "px");
|
|
@@ -434,15 +428,14 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
434
428
|
}, {
|
|
435
429
|
key: "setIgnore",
|
|
436
430
|
value: function setIgnore(ignore) {
|
|
437
|
-
this.logger.info("
|
|
438
|
-
this.isIgnore = ignore;
|
|
431
|
+
this.logger.info("setIgnore method is called, the ignore is => ".concat(ignore));
|
|
439
432
|
window.runtime.browserWindow.setIgnoreMouseEvents(ignore);
|
|
440
433
|
}
|
|
441
434
|
}, {
|
|
442
435
|
key: "toolChanged",
|
|
443
436
|
value: function toolChanged(event) {
|
|
444
437
|
if (!this._boardInstance) return;
|
|
445
|
-
this.logger.info("
|
|
438
|
+
this.logger.info("toolChanged method is called, the event is => ".concat(JSON.stringify(event)));
|
|
446
439
|
var board = this._boardInstance;
|
|
447
440
|
var payload = event.payload;
|
|
448
441
|
switch (event.action) {
|
|
@@ -478,7 +471,7 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
478
471
|
}, {
|
|
479
472
|
key: "setDrawing",
|
|
480
473
|
value: function setDrawing(drawing) {
|
|
481
|
-
this.logger.info("
|
|
474
|
+
this.logger.info("setDrawing method is called, the drawing is => ".concat(drawing));
|
|
482
475
|
this.drawing = drawing;
|
|
483
476
|
}
|
|
484
477
|
}, {
|
|
@@ -486,7 +479,7 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
486
479
|
value: function _initBoardStyle(whiteboard) {
|
|
487
480
|
var frameWidth = this.bounds.width;
|
|
488
481
|
var frameHeight = this.bounds.height;
|
|
489
|
-
this.logger.info("
|
|
482
|
+
this.logger.info("mount success, width: ".concat(frameWidth, " , height: ").concat(frameHeight));
|
|
490
483
|
this._boardView.style.width = "".concat(frameWidth, "px");
|
|
491
484
|
this._boardView.style.height = "".concat(frameHeight, "px");
|
|
492
485
|
whiteboard.view.style.height = "".concat(frameHeight, "px");
|
|
@@ -499,7 +492,7 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
499
492
|
whiteboard.strokeColor = '#FFC908';
|
|
500
493
|
whiteboard.setCurrentTool('curve');
|
|
501
494
|
this._updateWindowSize(frameWidth, frameHeight);
|
|
502
|
-
this.logger.info("
|
|
495
|
+
this.logger.info("mount success current tool, ".concat(whiteboard.getCurrentTool(), ", updateViewport width: ").concat(frameWidth, " height: ").concat(frameHeight));
|
|
503
496
|
whiteboard.on('undoStackLength', function (steps) {
|
|
504
497
|
// isWindows() && window.runtime.browserWindow.blur();
|
|
505
498
|
(0, _rendererEvent.sendEvent)({
|
|
@@ -518,16 +511,16 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
518
511
|
}, {
|
|
519
512
|
key: "_handleSetTool",
|
|
520
513
|
value: function _handleSetTool(payload) {
|
|
521
|
-
var
|
|
514
|
+
var _this3 = this;
|
|
522
515
|
var board = this._boardInstance;
|
|
523
516
|
this.currentTool = 'none';
|
|
524
517
|
var currentTool = (0, _libs.convertTool)(payload);
|
|
525
518
|
if (board) {
|
|
526
519
|
board.setCurrentTool(currentTool);
|
|
527
520
|
var timber = setTimeout(function () {
|
|
528
|
-
var
|
|
529
|
-
(
|
|
530
|
-
|
|
521
|
+
var _this3$_boardDom;
|
|
522
|
+
(_this3$_boardDom = _this3._boardDom) === null || _this3$_boardDom === void 0 || _this3$_boardDom.getBoundingClientRect();
|
|
523
|
+
_this3.currentTool = currentTool;
|
|
531
524
|
clearTimeout(timber);
|
|
532
525
|
}, 600);
|
|
533
526
|
}
|
|
@@ -536,37 +529,38 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
536
529
|
key: "_init",
|
|
537
530
|
value: function () {
|
|
538
531
|
var _init2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(engine) {
|
|
539
|
-
var
|
|
532
|
+
var _this4 = this;
|
|
540
533
|
return _regenerator["default"].wrap(function (_context3) {
|
|
541
534
|
while (1) switch (_context3.prev = _context3.next) {
|
|
542
535
|
case 0:
|
|
543
536
|
engine.addObserver({
|
|
544
537
|
onConnectionStateUpdated: function onConnectionStateUpdated(state) {
|
|
538
|
+
(0, _sharedStorage.setAnnotationEngineState)(state);
|
|
545
539
|
(0, _rendererEvent.sendEvent)({
|
|
546
540
|
action: _constant.FcrUIRendererEventAction.FRAGMENT_ANNOTATION_ENGINE_STATE,
|
|
547
541
|
payload: state
|
|
548
542
|
});
|
|
549
543
|
if (state === _fcrCore.FcrConnectionState.CONNECTED) {
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
if (
|
|
553
|
-
|
|
554
|
-
|
|
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();
|
|
555
549
|
}
|
|
556
550
|
}
|
|
557
551
|
if (state === _fcrCore.FcrConnectionState.DISCONNECTED) {
|
|
558
|
-
|
|
559
|
-
|
|
552
|
+
_this4.logger.info("engine connection state updated => DISCONNECTED, the engine is ".concat(_this4._engine));
|
|
553
|
+
_this4._engine && engine.login();
|
|
560
554
|
}
|
|
561
555
|
if (state === _fcrCore.FcrConnectionState.CONNECTING) {
|
|
562
|
-
|
|
556
|
+
_this4.logger.info("engine connection state updated => CONNECTING");
|
|
563
557
|
}
|
|
564
558
|
if (state === _fcrCore.FcrConnectionState.RECONNECTING) {
|
|
565
|
-
|
|
559
|
+
_this4.logger.info("engine connection state updated => RECONNECTING");
|
|
566
560
|
}
|
|
567
561
|
if (state === _fcrCore.FcrConnectionState.ABORTED) {
|
|
568
|
-
|
|
569
|
-
|
|
562
|
+
_this4.logger.info("engine connection state updated => ABORTED, the engine is ".concat(_this4._engine));
|
|
563
|
+
_this4._engine && engine.login();
|
|
570
564
|
}
|
|
571
565
|
}
|
|
572
566
|
});
|
|
@@ -586,15 +580,20 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
586
580
|
}, {
|
|
587
581
|
key: "_initBoardRoom",
|
|
588
582
|
value: function () {
|
|
589
|
-
var _initBoardRoom2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
590
|
-
var
|
|
591
|
-
var _this$_config, userId, boardToken, region, appIdentifier, boardId, nickName, rtmClient, rtmProvider, wbRoom, currentTimeStamp,
|
|
592
|
-
return _regenerator["default"].wrap(function (
|
|
593
|
-
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) {
|
|
594
588
|
case 0:
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
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));
|
|
598
597
|
// @ts-ignore
|
|
599
598
|
rtmClient = this._engine._rteEngine._rtmClient._client;
|
|
600
599
|
rtmProvider = new _imports.FcrRTMProvider_2_2(rtmClient);
|
|
@@ -603,73 +602,111 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
603
602
|
currentTimeStamp = Date.now(); // @ts-ignore
|
|
604
603
|
this._boardRoom['traceId'] = "".concat(boardToken, "-").concat(boardId, "-").concat(userId, "-").concat(currentTimeStamp);
|
|
605
604
|
wbRoom.applicationManager.registerApplication(_imports.FcrWhiteboardApplication);
|
|
606
|
-
this.logger.info("
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
_context4.next = 1;
|
|
615
|
-
return wbRoom.joinRoom({
|
|
616
|
-
userId: userId,
|
|
617
|
-
nickName: nickName,
|
|
618
|
-
roomToken: boardToken,
|
|
619
|
-
sdkConfig: {
|
|
620
|
-
// @ts-ignore
|
|
621
|
-
region: region,
|
|
622
|
-
appIdentifier: appIdentifier
|
|
623
|
-
}
|
|
624
|
-
});
|
|
625
|
-
case 1:
|
|
626
|
-
// @ts-ignore
|
|
627
|
-
_this3.logger.info(// @ts-ignore
|
|
628
|
-
"[annotation-fragment][initBoardRoom]: join room success, traceId ".concat(_this3._boardRoom['traceId']));
|
|
629
|
-
// room.userManager.on("join") 和 room.userManager.on("leave")
|
|
630
|
-
wbRoom.userManager.on('join', _this3._handleBoardRoomUserJoin);
|
|
631
|
-
// wbRoom.userManager.on('leave',this._handleBoardRoomUserLeave);
|
|
632
|
-
case 2:
|
|
633
|
-
case "end":
|
|
634
|
-
return _context4.stop();
|
|
635
|
-
}
|
|
636
|
-
}, _callee4);
|
|
637
|
-
})), [], {
|
|
638
|
-
retriesMax: retriesMax
|
|
639
|
-
}).fail(/*#__PURE__*/function () {
|
|
640
|
-
var _ref4 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5(_ref3) {
|
|
641
|
-
var error, timeFn, currentRetry;
|
|
642
|
-
return _regenerator["default"].wrap(function (_context5) {
|
|
643
|
-
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) {
|
|
644
613
|
case 0:
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
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();
|
|
651
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:
|
|
652
696
|
case "end":
|
|
653
|
-
return
|
|
697
|
+
return _context6.stop();
|
|
654
698
|
}
|
|
655
|
-
},
|
|
699
|
+
}, _callee6, null, [[1, 4, 5, 6]]);
|
|
656
700
|
}));
|
|
657
|
-
return function (_x2) {
|
|
658
|
-
return
|
|
701
|
+
return function (_x2, _x3) {
|
|
702
|
+
return _ref2.apply(this, arguments);
|
|
659
703
|
};
|
|
660
|
-
}())
|
|
704
|
+
}()));
|
|
661
705
|
case 2:
|
|
662
|
-
_context6.next = 4;
|
|
663
|
-
break;
|
|
664
|
-
case 3:
|
|
665
|
-
_context6.prev = 3;
|
|
666
|
-
_t2 = _context6["catch"](1);
|
|
667
|
-
this.logger.error("[annotation-fragment][initBoardRoom]: join room failed");
|
|
668
|
-
case 4:
|
|
669
706
|
case "end":
|
|
670
|
-
return
|
|
707
|
+
return _context7.stop();
|
|
671
708
|
}
|
|
672
|
-
},
|
|
709
|
+
}, _callee7, this);
|
|
673
710
|
}));
|
|
674
711
|
function _initBoardRoom() {
|
|
675
712
|
return _initBoardRoom2.apply(this, arguments);
|
|
@@ -677,26 +714,34 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
677
714
|
return _initBoardRoom;
|
|
678
715
|
}()
|
|
679
716
|
}, {
|
|
680
|
-
key: "
|
|
681
|
-
value: function
|
|
717
|
+
key: "_createEngine",
|
|
718
|
+
value: function _createEngine(config) {
|
|
682
719
|
var userId = config.userId,
|
|
683
720
|
token = config.roomToken,
|
|
684
721
|
appId = config.appId;
|
|
685
|
-
this.logger.
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
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
|
+
}
|
|
692
738
|
}
|
|
693
739
|
}, {
|
|
694
740
|
key: "_launchHandler",
|
|
695
741
|
value: function _launchHandler(appId, app) {
|
|
696
742
|
if (appId === this._FORGE_WHITEBOARD_APP_ID) {
|
|
697
|
-
this.logger.info("
|
|
698
|
-
this.
|
|
699
|
-
this._currentAnntationView && this._boardView.appendChild(this._currentAnntationView);
|
|
743
|
+
this.logger.info("launch event is triggered => ".concat(app.selfUserId));
|
|
744
|
+
this._boardView.appendChild(app.view);
|
|
700
745
|
this._initBoardStyle(app);
|
|
701
746
|
}
|
|
702
747
|
}
|
|
@@ -705,7 +750,7 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
705
750
|
value: function _terminalHandler(appId, app) {
|
|
706
751
|
if (appId === this._FORGE_WHITEBOARD_APP_ID) {
|
|
707
752
|
var _this$_boardView;
|
|
708
|
-
this.logger.info("
|
|
753
|
+
this.logger.info("terminal event is triggered => ".concat(app.selfUserId));
|
|
709
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));
|
|
710
755
|
}
|
|
711
756
|
}
|
|
@@ -724,15 +769,15 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
724
769
|
value: function _cancelCurrentUpdateWindowSizeTimber(stage) {
|
|
725
770
|
if (this._pollingCancelHandler && typeof this._pollingCancelHandler === 'function') {
|
|
726
771
|
this._pollingCancelHandler();
|
|
727
|
-
this.logger.info("
|
|
772
|
+
this.logger.info("end a new 30s polling to updateWindowSize, when ".concat(stage));
|
|
728
773
|
}
|
|
729
774
|
}
|
|
730
775
|
}, {
|
|
731
776
|
key: "_handlePollingUpdateWindowSize",
|
|
732
777
|
value: function _handlePollingUpdateWindowSize(stage) {
|
|
733
778
|
this._cancelCurrentUpdateWindowSizeTimber(stage);
|
|
734
|
-
this._pollingCancelHandler = startPolling(this._updateWindowSizeWithCurrentBounds);
|
|
735
|
-
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));
|
|
736
781
|
}
|
|
737
782
|
}, {
|
|
738
783
|
key: "_handleBoardRoomUserJoin",
|
|
@@ -743,20 +788,59 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
743
788
|
}, {
|
|
744
789
|
key: "_syncScreenShareOwnerOpenDone",
|
|
745
790
|
value: function _syncScreenShareOwnerOpenDone() {
|
|
746
|
-
this.logger.info('
|
|
791
|
+
this.logger.info('syncScreenShareOwnerOpenDone');
|
|
747
792
|
(0, _rendererEvent.sendEvent)({
|
|
748
793
|
action: _constant.FcrUIRendererEventAction.FRAGMENT_ANNOTATION_SYNC_OWNER_OPEN_DONE,
|
|
749
794
|
payload: null
|
|
750
795
|
});
|
|
751
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
|
+
}
|
|
752
837
|
}]);
|
|
753
838
|
}();
|
|
754
839
|
_FragmentAnnotationStore = FragmentAnnotationStore;
|
|
755
|
-
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);
|
|
756
841
|
_init_joined = _applyDecs$e[0];
|
|
757
842
|
_init_bounds = _applyDecs$e[1];
|
|
758
843
|
_init_currentTool = _applyDecs$e[2];
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
_initProto = _applyDecs$e[5];
|
|
844
|
+
_init_drawing = _applyDecs$e[3];
|
|
845
|
+
_initProto = _applyDecs$e[4];
|
|
762
846
|
var FragmentAnnotationStoreContext = exports.FragmentAnnotationStoreContext = /*#__PURE__*/(0, _react.createContext)(null);
|