yach.open.jssdk 4.4.6-beta2 → 4.4.6-beta4

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.
Files changed (37) hide show
  1. package/dist/yach_jssdk_4.4.6-beta4.js +1 -0
  2. package/es/api/biz/util/focus.d.ts +7 -0
  3. package/es/api/biz/util/focus.js +23 -0
  4. package/es/api/biz/util/getConfig.d.ts +13 -0
  5. package/es/api/biz/util/getConfig.js +19 -0
  6. package/es/api/biz/util/knowledgeSelectParams.d.ts +5 -5
  7. package/es/api/biz/util/openAudioPlayer.d.ts +17 -0
  8. package/es/api/biz/util/openAudioPlayer.js +23 -0
  9. package/es/api/biz/util/openPublish.d.ts +22 -0
  10. package/es/api/biz/util/openPublish.js +15 -0
  11. package/es/api/primary/updateTab.d.ts +9 -0
  12. package/es/api/primary/updateTab.js +15 -0
  13. package/es/index.d.ts +11 -1
  14. package/es/index.js +12 -2
  15. package/es/lib/helper/pcIframe.d.ts +8 -25
  16. package/es/lib/helper/pcIframe.js +29 -5
  17. package/es/lib/sdk/sdk.typings.d.ts +1 -0
  18. package/es/utils/env.js +4 -2
  19. package/libs/api/biz/util/focus.d.ts +7 -0
  20. package/libs/api/biz/util/focus.js +30 -0
  21. package/libs/api/biz/util/getConfig.d.ts +13 -0
  22. package/libs/api/biz/util/getConfig.js +26 -0
  23. package/libs/api/biz/util/knowledgeSelectParams.d.ts +5 -5
  24. package/libs/api/biz/util/openAudioPlayer.d.ts +17 -0
  25. package/libs/api/biz/util/openAudioPlayer.js +30 -0
  26. package/libs/api/biz/util/openPublish.d.ts +22 -0
  27. package/libs/api/biz/util/openPublish.js +22 -0
  28. package/libs/api/primary/updateTab.d.ts +9 -0
  29. package/libs/api/primary/updateTab.js +22 -0
  30. package/libs/index.d.ts +11 -1
  31. package/libs/index.js +41 -1
  32. package/libs/lib/helper/pcIframe.d.ts +8 -25
  33. package/libs/lib/helper/pcIframe.js +29 -5
  34. package/libs/lib/sdk/sdk.typings.d.ts +1 -0
  35. package/libs/utils/env.js +4 -2
  36. package/package.json +1 -1
  37. package/dist/yach_jssdk_4.4.4-beta4.js +0 -1
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
4
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
5
+ _Object$defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.focus = focus;
9
+ var _initAPI = _interopRequireDefault(require("../../initAPI"));
10
+ var pc = {
11
+ vs: '1.9.13'
12
+ };
13
+ var ios = {
14
+ vs: '1.9.13'
15
+ };
16
+ var android = {
17
+ vs: '1.9.13'
18
+ };
19
+ var platform = {
20
+ pc: pc,
21
+ ios: ios,
22
+ android: android
23
+ };
24
+ var apiName = 'biz.util.focus';
25
+ function focus(params) {
26
+ (0, _initAPI["default"])(apiName, {
27
+ params: params,
28
+ platform: platform
29
+ });
30
+ }
@@ -0,0 +1,13 @@
1
+ import { IError } from '../../common.typings';
2
+ export interface GetConfigResult {
3
+ code: number;
4
+ message: string;
5
+ data: any;
6
+ }
7
+ export interface GetConfigParams {
8
+ configNode: String;
9
+ onSuccess?: (res: GetConfigResult) => void;
10
+ onFail?: (err: IError) => void;
11
+ }
12
+ declare function getConfig(params: GetConfigParams): void;
13
+ export { getConfig };
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
4
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
5
+ _Object$defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.getConfig = getConfig;
9
+ var _initAPI = _interopRequireDefault(require("../../initAPI"));
10
+ var ios = {
11
+ vs: '1.9.12'
12
+ };
13
+ var android = {
14
+ vs: '1.9.12'
15
+ };
16
+ var platform = {
17
+ ios: ios,
18
+ android: android
19
+ };
20
+ var apiName = 'biz.util.getConfig';
21
+ function getConfig(params) {
22
+ (0, _initAPI["default"])(apiName, {
23
+ params: params,
24
+ platform: platform
25
+ });
26
+ }
@@ -1,14 +1,14 @@
1
1
  import { IError } from '../../common.typings';
2
- export interface KnowledgeSelectParamsParamsResult {
2
+ export interface KnowledgeSelectParamsResult {
3
3
  code: number;
4
4
  message: string;
5
5
  data: any;
6
6
  }
7
- export interface KnowledgeSelectParamsParams {
7
+ export interface KnowledgeSelectParams {
8
8
  type: number;
9
- result: KnowledgeSelectParamsParamsResult;
10
- onSuccess?: (res: KnowledgeSelectParamsParamsResult) => void;
9
+ result: KnowledgeSelectParamsResult;
10
+ onSuccess?: (res: KnowledgeSelectParamsResult) => void;
11
11
  onFail?: (err: IError) => void;
12
12
  }
13
- declare function knowledgeSelectParams(params: KnowledgeSelectParamsParams): void;
13
+ declare function knowledgeSelectParams(params: KnowledgeSelectParams): void;
14
14
  export { knowledgeSelectParams };
@@ -0,0 +1,17 @@
1
+ import { IError } from '../../common.typings';
2
+ export interface IBizUtilopenAudioPlayerParams {
3
+ /**
4
+ * 播放地址
5
+ */
6
+ url?: string;
7
+ /**
8
+ * 腾讯云所返回,可根据 relationId 获取到视频资源
9
+ */
10
+ relationId?: string;
11
+ name?: string;
12
+ size?: number;
13
+ onSuccess?: () => void;
14
+ onFail?: (err: IError) => void;
15
+ }
16
+ declare function openAudioPlayer(params: IBizUtilopenAudioPlayerParams): void;
17
+ export { openAudioPlayer };
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
4
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
5
+ _Object$defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.openAudioPlayer = openAudioPlayer;
9
+ var _initAPI = _interopRequireDefault(require("../../initAPI"));
10
+ var apiName = 'biz.util.openAudioPlayer';
11
+ var pc = {
12
+ vs: '1.9.13'
13
+ };
14
+ var ios = {
15
+ vs: '1.9.13'
16
+ };
17
+ var android = {
18
+ vs: '1.9.13'
19
+ };
20
+ var platform = {
21
+ pc: pc,
22
+ ios: ios,
23
+ android: android
24
+ };
25
+ function openAudioPlayer(params) {
26
+ (0, _initAPI["default"])(apiName, {
27
+ params: params,
28
+ platform: platform
29
+ });
30
+ }
@@ -0,0 +1,22 @@
1
+ import { IError } from '../../common.typings';
2
+ export interface IOpenPublishResult {
3
+ code: number;
4
+ message: string;
5
+ data: any;
6
+ }
7
+ export interface IOpenPublishParams {
8
+ squadId?: string;
9
+ squadName?: string;
10
+ publishType?: 'publish' | 'forward';
11
+ multiple?: boolean;
12
+ topicType: '0' | '1' | '2';
13
+ TopicTypeMultiple?: boolean;
14
+ content?: string;
15
+ pic?: string;
16
+ video?: string;
17
+ url?: string;
18
+ onSuccess?: (res: IOpenPublishResult) => void;
19
+ onFail?: (err: IError) => void;
20
+ }
21
+ declare function openPublish(params: IOpenPublishParams): void;
22
+ export { openPublish };
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
4
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
5
+ _Object$defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.openPublish = openPublish;
9
+ var _initAPI = _interopRequireDefault(require("../../initAPI"));
10
+ var pc = {
11
+ vs: '1.8.8'
12
+ };
13
+ var platform = {
14
+ pc: pc
15
+ };
16
+ var apiName = 'biz.util.openPublish';
17
+ function openPublish(params) {
18
+ (0, _initAPI["default"])(apiName, {
19
+ params: params,
20
+ platform: platform
21
+ });
22
+ }
@@ -0,0 +1,9 @@
1
+ import { IError } from '../common.typings';
2
+ export interface IPrimaryUpdateTab {
3
+ /** 应用标题 */
4
+ title?: string;
5
+ onSuccess?: () => void;
6
+ onFail?: (err: IError) => void;
7
+ }
8
+ declare function updateTab(params: IPrimaryUpdateTab): void;
9
+ export { updateTab };
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
4
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
5
+ _Object$defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.updateTab = updateTab;
9
+ var _initAPI = _interopRequireDefault(require("../initAPI"));
10
+ var apiName = 'primary.updateTab';
11
+ var pc = {
12
+ vs: '1.9.12'
13
+ };
14
+ var platform = {
15
+ pc: pc
16
+ };
17
+ function updateTab(params) {
18
+ (0, _initAPI["default"])(apiName, {
19
+ params: params,
20
+ platform: platform
21
+ });
22
+ }
package/libs/index.d.ts CHANGED
@@ -22,6 +22,7 @@ import { injectScript } from './api/biz/util/injectScript';
22
22
  import { closeWindow } from './api/biz/util/closeWindow';
23
23
  import { remind } from './api/biz/util/remind';
24
24
  import { takePicture } from './api/biz/util/takePicture';
25
+ import { openAudioPlayer } from './api/biz/util/openAudioPlayer';
25
26
  import { openVideoPlayer } from './api/biz/util/openVideoPlayer';
26
27
  import { openMediaFileDialog } from './api/biz/util/openMediaFileDialog';
27
28
  import { mediaFileUpload } from './api/biz/util/mediaFileUpload';
@@ -55,6 +56,9 @@ import { knowledgeSelectParams } from './api/biz/util/knowledgeSelectParams';
55
56
  import { lorebaseShowList } from './api/biz/util/lorebaseShowList';
56
57
  import { lorebaseRefreshNodeWebview } from './api/biz/util/lorebaseRefreshNodeWebview';
57
58
  import { copy } from './api/biz/util/copy';
59
+ import { openPublish } from './api/biz/util/openPublish';
60
+ import { getConfig } from './api/biz/util/getConfig';
61
+ import { focus } from './api/biz/util/focus';
58
62
  /**navigation*/
59
63
  import { setIcon } from './api/biz/navigation/setIcon';
60
64
  import { setTitle } from './api/biz/navigation/setTitle';
@@ -84,6 +88,7 @@ import { openTeamChat } from './api/biz/chat/openTeamChat';
84
88
  import { openSquad } from './api/biz/chat/openSquad';
85
89
  import { sendP2PMsg } from './api/biz/chat/sendP2PMsg';
86
90
  import { createTab } from './api/primary/createTab';
91
+ import { updateTab } from './api/primary/updateTab';
87
92
  import { weeklyShare } from './api/primary/weeklyShare';
88
93
  import { fullScreen } from './api/primary/fullScreen';
89
94
  import { exitFullScreen } from './api/primary/exitFullScreen';
@@ -135,7 +140,7 @@ import { send as webViewMessageSend } from './api/biz/webViewMessage/send';
135
140
  import { talYoungFilesUpload } from './api/app/custom/talYoungFilesUpload';
136
141
  import { addAppToNav } from './api/biz/util/addAppToNav';
137
142
  declare const version: string, sdkVersion: string, env: import("./lib/sdk/sdk.typings").IENV, platform: import("./lib/sdk/sdk.typings").ENV_ENUM, platformV2: import("./lib/sdk/sdk.typings").PlatformV2Props, config: (configParams: import("./lib/sdk/sdk.typings").IConfigParams) => void, ready: (readyCallback: () => void) => void, error: (callback: (err: any) => void) => void, on: (methodName: string, listener: (e: any) => void) => void, off: (methodName: string, listener: (e: any) => void) => void;
138
- export { version, sdkVersion, env, platform, platformV2, config, ready, error, on, off, openLink, feedback, open, openSlidePanel, share, previewFile, previewImage, downloadFile, uploadAttachment, clipboardFileUpload, proxy, datepicker, scan, chosen, openSingleWebview, getSingleWebviewData, injectScript, closeWindow, showCallMenu, call, setIcon, setTitle, setMenu, close, replacePage, quit, setRight, setTitleExpandIcon, updateExpandTitle, setLeft, goBack, complexPicker, departmentsPicker, groupComplexPicker, chooseConversationByCorpId, pickConversation, openSingleChat, openTeamChat, openSquad, sendP2PMsg, mapView, multipointView, requestAuthCode, createTab, weeklyShare, fullScreen, exitFullScreen, showPreloader, showCustomOverlayContent, hidePreloader, hideCustomOverlayContent, vibrate, toast, alert, confirm, getPhoneInfo, getUUID, checkStepPermission, getGeolocation, getGeolocationSwitch, getLang, startRecord, stopRecord, onRecordEnd, downloadAudio, playAudio, pauseAudio, stopAudio, onPlayEnd, resumeAudio, getNetworkType, isAtTal, webViewBounceDisable, pullToRefreshEnable, pullToRefreshStop, pullToRefreshDisable, getItem, setItem, removeItem, writeLog, flushLog, remind, takePicture, datetimepicker, actionSheet, webViewMessageSend, talYoungFilesUpload, openVideoPlayer, openMediaFileDialog, mediaFileUpload, invoice, pushWorkMsg, openTalYoungToTopic, getToken, authStart, authFinish, assistantCreate, yachEvent, topicEvent, openTogetherEyeWebview, getTogetherConfig, rouseApp, externalLinkPreviewFile, savePic, zfbAuth, complain, onRecordEnd_v2, startRecord_v2, stopRecord_v2, selectDepartment, setWindowBig, tencentMeeting, tencentMeetingBegin, createModifySchedule, onlineDocmentOpenTeamChat, entergroupCheck, resetSessionUnread, weeklyRead, openFutureGroup, knowledgeBaseSelect, knowledgeSelectParams, lorebaseShowList, lorebaseRefreshNodeWebview, setLight, openUserSchedule, disableScreenCapture, setPanGestureEnable, addAppToNav, copy, capturePage, };
143
+ export { version, sdkVersion, env, platform, platformV2, config, ready, error, on, off, openLink, feedback, open, openSlidePanel, share, previewFile, previewImage, downloadFile, uploadAttachment, clipboardFileUpload, proxy, datepicker, scan, chosen, openSingleWebview, getSingleWebviewData, injectScript, closeWindow, showCallMenu, call, setIcon, setTitle, setMenu, close, replacePage, quit, setRight, setTitleExpandIcon, updateExpandTitle, setLeft, goBack, complexPicker, departmentsPicker, groupComplexPicker, chooseConversationByCorpId, pickConversation, openSingleChat, openTeamChat, openSquad, sendP2PMsg, mapView, multipointView, requestAuthCode, createTab, updateTab, weeklyShare, fullScreen, exitFullScreen, showPreloader, showCustomOverlayContent, hidePreloader, hideCustomOverlayContent, vibrate, toast, alert, confirm, getPhoneInfo, getUUID, checkStepPermission, getGeolocation, getGeolocationSwitch, getLang, startRecord, stopRecord, onRecordEnd, downloadAudio, playAudio, pauseAudio, stopAudio, onPlayEnd, resumeAudio, getNetworkType, isAtTal, webViewBounceDisable, pullToRefreshEnable, pullToRefreshStop, pullToRefreshDisable, getItem, setItem, removeItem, writeLog, flushLog, remind, takePicture, datetimepicker, actionSheet, webViewMessageSend, talYoungFilesUpload, openAudioPlayer, openVideoPlayer, openMediaFileDialog, mediaFileUpload, invoice, pushWorkMsg, openTalYoungToTopic, getToken, authStart, authFinish, assistantCreate, yachEvent, topicEvent, openTogetherEyeWebview, getTogetherConfig, rouseApp, externalLinkPreviewFile, savePic, zfbAuth, complain, onRecordEnd_v2, startRecord_v2, stopRecord_v2, selectDepartment, setWindowBig, tencentMeeting, tencentMeetingBegin, createModifySchedule, onlineDocmentOpenTeamChat, entergroupCheck, resetSessionUnread, weeklyRead, openFutureGroup, knowledgeBaseSelect, knowledgeSelectParams, lorebaseShowList, lorebaseRefreshNodeWebview, openPublish, setLight, openUserSchedule, disableScreenCapture, setPanGestureEnable, addAppToNav, copy, capturePage, getConfig, focus, };
139
144
  declare const _default: {
140
145
  version: string;
141
146
  sdkVersion: string;
@@ -151,6 +156,7 @@ declare const _default: {
151
156
  util: {
152
157
  openLink: typeof openLink;
153
158
  feedback: typeof feedback;
159
+ focus: typeof focus;
154
160
  open: typeof open;
155
161
  openSlidePanel: typeof openSlidePanel;
156
162
  share: typeof share;
@@ -175,6 +181,7 @@ declare const _default: {
175
181
  closeWindow: typeof closeWindow;
176
182
  remind: typeof remind;
177
183
  takePicture: typeof takePicture;
184
+ openAudioPlayer: typeof openAudioPlayer;
178
185
  openVideoPlayer: typeof openVideoPlayer;
179
186
  openMediaFileDialog: typeof openMediaFileDialog;
180
187
  mediaFileUpload: typeof mediaFileUpload;
@@ -204,7 +211,9 @@ declare const _default: {
204
211
  lorebaseShowList: typeof lorebaseShowList;
205
212
  lorebaseRefreshNodeWebview: typeof lorebaseRefreshNodeWebview;
206
213
  copy: typeof copy;
214
+ openPublish: typeof openPublish;
207
215
  capturePage: typeof capturePage;
216
+ getConfig: typeof getConfig;
208
217
  };
209
218
  telephone: {
210
219
  showCallMenu: typeof showCallMenu;
@@ -257,6 +266,7 @@ declare const _default: {
257
266
  };
258
267
  primary: {
259
268
  createTab: typeof createTab;
269
+ updateTab: typeof updateTab;
260
270
  weeklyShare: typeof weeklyShare;
261
271
  fullScreen: typeof fullScreen;
262
272
  exitFullScreen: typeof exitFullScreen;
package/libs/index.js CHANGED
@@ -193,12 +193,24 @@ _Object$defineProperty(exports, "flushLog", {
193
193
  return _flushLog.flushLog;
194
194
  }
195
195
  });
196
+ _Object$defineProperty(exports, "focus", {
197
+ enumerable: true,
198
+ get: function get() {
199
+ return _focus.focus;
200
+ }
201
+ });
196
202
  _Object$defineProperty(exports, "fullScreen", {
197
203
  enumerable: true,
198
204
  get: function get() {
199
205
  return _fullScreen.fullScreen;
200
206
  }
201
207
  });
208
+ _Object$defineProperty(exports, "getConfig", {
209
+ enumerable: true,
210
+ get: function get() {
211
+ return _getConfig.getConfig;
212
+ }
213
+ });
202
214
  _Object$defineProperty(exports, "getGeolocation", {
203
215
  enumerable: true,
204
216
  get: function get() {
@@ -374,6 +386,12 @@ _Object$defineProperty(exports, "open", {
374
386
  return _open.open;
375
387
  }
376
388
  });
389
+ _Object$defineProperty(exports, "openAudioPlayer", {
390
+ enumerable: true,
391
+ get: function get() {
392
+ return _openAudioPlayer.openAudioPlayer;
393
+ }
394
+ });
377
395
  _Object$defineProperty(exports, "openFutureGroup", {
378
396
  enumerable: true,
379
397
  get: function get() {
@@ -392,6 +410,12 @@ _Object$defineProperty(exports, "openMediaFileDialog", {
392
410
  return _openMediaFileDialog.openMediaFileDialog;
393
411
  }
394
412
  });
413
+ _Object$defineProperty(exports, "openPublish", {
414
+ enumerable: true,
415
+ get: function get() {
416
+ return _openPublish.openPublish;
417
+ }
418
+ });
395
419
  _Object$defineProperty(exports, "openSingleChat", {
396
420
  enumerable: true,
397
421
  get: function get() {
@@ -737,6 +761,12 @@ _Object$defineProperty(exports, "updateExpandTitle", {
737
761
  return _updateExpandTitle.updateExpandTitle;
738
762
  }
739
763
  });
764
+ _Object$defineProperty(exports, "updateTab", {
765
+ enumerable: true,
766
+ get: function get() {
767
+ return _updateTab.updateTab;
768
+ }
769
+ });
740
770
  _Object$defineProperty(exports, "uploadAttachment", {
741
771
  enumerable: true,
742
772
  get: function get() {
@@ -816,6 +846,7 @@ var _injectScript = require("./api/biz/util/injectScript");
816
846
  var _closeWindow = require("./api/biz/util/closeWindow");
817
847
  var _remind = require("./api/biz/util/remind");
818
848
  var _takePicture = require("./api/biz/util/takePicture");
849
+ var _openAudioPlayer = require("./api/biz/util/openAudioPlayer");
819
850
  var _openVideoPlayer = require("./api/biz/util/openVideoPlayer");
820
851
  var _openMediaFileDialog = require("./api/biz/util/openMediaFileDialog");
821
852
  var _mediaFileUpload = require("./api/biz/util/mediaFileUpload");
@@ -849,6 +880,9 @@ var _knowledgeSelectParams = require("./api/biz/util/knowledgeSelectParams");
849
880
  var _lorebaseShowList = require("./api/biz/util/lorebaseShowList");
850
881
  var _lorebaseRefreshNodeWebview = require("./api/biz/util/lorebaseRefreshNodeWebview");
851
882
  var _copy = require("./api/biz/util/copy");
883
+ var _openPublish = require("./api/biz/util/openPublish");
884
+ var _getConfig = require("./api/biz/util/getConfig");
885
+ var _focus = require("./api/biz/util/focus");
852
886
  var _setIcon = require("./api/biz/navigation/setIcon");
853
887
  var _setTitle = require("./api/biz/navigation/setTitle");
854
888
  var _setMenu = require("./api/biz/navigation/setMenu");
@@ -874,6 +908,7 @@ var _openTeamChat = require("./api/biz/chat/openTeamChat");
874
908
  var _openSquad = require("./api/biz/chat/openSquad");
875
909
  var _sendP2PMsg = require("./api/biz/chat/sendP2PMsg");
876
910
  var _createTab = require("./api/primary/createTab");
911
+ var _updateTab = require("./api/primary/updateTab");
877
912
  var _weeklyShare = require("./api/primary/weeklyShare");
878
913
  var _fullScreen = require("./api/primary/fullScreen");
879
914
  var _exitFullScreen = require("./api/primary/exitFullScreen");
@@ -975,6 +1010,7 @@ var _default = exports["default"] = {
975
1010
  util: {
976
1011
  openLink: _openLink.openLink,
977
1012
  feedback: _feedback.feedback,
1013
+ focus: _focus.focus,
978
1014
  open: _open.open,
979
1015
  openSlidePanel: _openSlidePanel.openSlidePanel,
980
1016
  share: _share.share,
@@ -999,6 +1035,7 @@ var _default = exports["default"] = {
999
1035
  closeWindow: _closeWindow.closeWindow,
1000
1036
  remind: _remind.remind,
1001
1037
  takePicture: _takePicture.takePicture,
1038
+ openAudioPlayer: _openAudioPlayer.openAudioPlayer,
1002
1039
  openVideoPlayer: _openVideoPlayer.openVideoPlayer,
1003
1040
  openMediaFileDialog: _openMediaFileDialog.openMediaFileDialog,
1004
1041
  mediaFileUpload: _mediaFileUpload.mediaFileUpload,
@@ -1028,7 +1065,9 @@ var _default = exports["default"] = {
1028
1065
  lorebaseShowList: _lorebaseShowList.lorebaseShowList,
1029
1066
  lorebaseRefreshNodeWebview: _lorebaseRefreshNodeWebview.lorebaseRefreshNodeWebview,
1030
1067
  copy: _copy.copy,
1031
- capturePage: _screen.capturePage
1068
+ openPublish: _openPublish.openPublish,
1069
+ capturePage: _screen.capturePage,
1070
+ getConfig: _getConfig.getConfig
1032
1071
  },
1033
1072
  telephone: {
1034
1073
  showCallMenu: _showCallMenu.showCallMenu,
@@ -1081,6 +1120,7 @@ var _default = exports["default"] = {
1081
1120
  },
1082
1121
  primary: {
1083
1122
  createTab: _createTab.createTab,
1123
+ updateTab: _updateTab.updateTab,
1084
1124
  weeklyShare: _weeklyShare.weeklyShare,
1085
1125
  fullScreen: _fullScreen.fullScreen,
1086
1126
  exitFullScreen: _exitFullScreen.exitFullScreen
@@ -3,41 +3,24 @@ declare global {
3
3
  sendToHost: any;
4
4
  sendTo: any;
5
5
  receiveBrowserViewData: any;
6
+ remoteSendToHost?: (payload: string) => void;
7
+ remoteReceiveFromHost?: (callback: (result: Record<string, any>) => void, moduleId?: string) => void;
6
8
  }
7
9
  }
8
- interface APIParams {
9
- invokeType?: 'browserView' | '';
10
- [propName: string]: any;
11
- }
12
- declare class GenPostMsg {
13
- private id;
14
- private PromiseObj;
15
- private methodName;
16
- private plainMsg;
17
- callback: (v: any) => void;
18
- result: Promise<any>;
19
- invokeType: 'browserView' | '';
20
- constructor(method: string, param: APIParams, callback: any);
21
- genid: () => string;
22
- receiveResponse: (data: any) => void;
23
- getPayload: () => {
24
- msgId: string;
25
- methodName: string;
26
- body: object;
27
- type: string;
28
- invokeType: "" | "browserView";
29
- };
30
- }
10
+ declare type InvokeType = 'browserView' | 'moduleFederation' | '';
31
11
  declare class Frame {
32
12
  pendingMsgs: {};
13
+ invokeType?: InvokeType;
14
+ moduleId?: string;
33
15
  constructor();
34
16
  addPending: (e: any) => void;
35
17
  deletePending: (e: any) => void;
36
18
  getPending: (t: any) => any;
37
19
  invokeAPIInBrowserView: (payload: string) => void;
38
20
  invokeAPIInWebview: (payload: string) => void;
39
- invokeAPI: (method: string, param: any, callback: any) => GenPostMsg;
40
- handleCallback: (datas: any, invokeType?: 'browserView' | '') => void;
21
+ invokeAPIInModuleFederation: (payload: string) => void;
22
+ invokeAPI: (method: string, param: any, callback: any) => any;
23
+ handleCallback: (datas: any, invokeType?: InvokeType) => void;
41
24
  init: () => void;
42
25
  }
43
26
  declare const frame: Frame;
@@ -29,6 +29,7 @@ var GenPostMsg = /*#__PURE__*/(0, _createClass2["default"])(function GenPostMsg(
29
29
  return {
30
30
  msgId: _this.id,
31
31
  methodName: _this.methodName,
32
+ moduleId: _this.moduleId,
32
33
  body: _this.plainMsg,
33
34
  type: 'request',
34
35
  invokeType: _this.invokeType
@@ -42,6 +43,7 @@ var GenPostMsg = /*#__PURE__*/(0, _createClass2["default"])(function GenPostMsg(
42
43
  this.methodName = method;
43
44
  this.plainMsg = param;
44
45
  this.invokeType = param === null || param === void 0 ? void 0 : param.invokeType;
46
+ this.moduleId = param === null || param === void 0 ? void 0 : param.moduleId;
45
47
  this.callback = callback;
46
48
  // this.result = new Promise(
47
49
  // function (resolve, reject) {
@@ -70,12 +72,25 @@ var Frame = /*#__PURE__*/(0, _createClass2["default"])(function Frame() {
70
72
  this.invokeAPIInWebview = function (payload) {
71
73
  window.sendToHost(payload);
72
74
  };
75
+ this.invokeAPIInModuleFederation = function (payload) {
76
+ window.remoteSendToHost(payload);
77
+ };
73
78
  this.invokeAPI = function (method, param, callback) {
74
- var genPostMsg = new GenPostMsg(method, param, callback);
75
- var payload = (0, _stringify["default"])(genPostMsg.getPayload());
76
- var _param$invokeType = param.invokeType,
77
- invokeType = _param$invokeType === void 0 ? '' : _param$invokeType;
78
- invokeType === 'browserView' ? _this2.invokeAPIInBrowserView(payload) : _this2.invokeAPIInWebview(payload);
79
+ var genPostMsg;
80
+ if (_this2.invokeType === 'moduleFederation') {
81
+ param.invokeType = _this2.invokeType;
82
+ param.moduleId = _this2.moduleId;
83
+ genPostMsg = new GenPostMsg(method, param, callback);
84
+ var payload = (0, _stringify["default"])(genPostMsg.getPayload());
85
+ _this2.invokeAPIInModuleFederation(payload);
86
+ } else {
87
+ genPostMsg = new GenPostMsg(method, param, callback);
88
+ var _payload = (0, _stringify["default"])(genPostMsg.getPayload());
89
+ var _param$invokeType = param.invokeType,
90
+ invokeType = _param$invokeType === void 0 ? '' : _param$invokeType;
91
+ invokeType === 'browserView' ? _this2.invokeAPIInBrowserView(_payload) : _this2.invokeAPIInWebview(_payload);
92
+ }
93
+ // 调用时传入 moduleId
79
94
  _this2.addPending(genPostMsg);
80
95
  return genPostMsg;
81
96
  };
@@ -144,6 +159,13 @@ var Frame = /*#__PURE__*/(0, _createClass2["default"])(function Frame() {
144
159
  }
145
160
  };
146
161
  this.init = function () {
162
+ var _a;
163
+ if (_this2.invokeType === 'moduleFederation') {
164
+ (_a = window.remoteReceiveFromHost) === null || _a === void 0 ? void 0 : _a.call(window, function (response) {
165
+ _this2.handleCallback(response);
166
+ }, _this2.moduleId);
167
+ return;
168
+ }
147
169
  window.addEventListener('message', function (msg) {
148
170
  (0, _utils.log)('electron res: ', msg);
149
171
  _this2.handleCallback(msg.data || {});
@@ -153,6 +175,8 @@ var Frame = /*#__PURE__*/(0, _createClass2["default"])(function Frame() {
153
175
  });
154
176
  };
155
177
  this.pendingMsgs = {};
178
+ this.invokeType = window.remoteSendToHost && window.remoteReceiveFromHost && process ? 'moduleFederation' : '';
179
+ this.moduleId = Math.random().toString(36).substring(2, 15);
156
180
  });
157
181
  var frame = new Frame();
158
182
  var _default = exports["default"] = frame;
@@ -17,6 +17,7 @@ export interface PlatformV2Props {
17
17
  inPC: boolean;
18
18
  inIpad: boolean;
19
19
  inIPhone: boolean;
20
+ inHarmonyNext: boolean;
20
21
  }
21
22
  export interface IENV {
22
23
  /** current platform (ios or android or pc or notInYach) */
package/libs/utils/env.js CHANGED
@@ -17,7 +17,8 @@ function getENV() {
17
17
  inPC = /YachPc/i.test(ua),
18
18
  inIpad = /iPad/i.test(ua) && inYach,
19
19
  inIPhone = /iPhone/i.test(ua) && inYach,
20
- isTest = /Yachtest/.test(ua) && inYach;
20
+ isTest = /Yachtest/.test(ua) && inYach,
21
+ inHarmonyNext = /HarmonyOSNext/i.test(ua) && inYach;
21
22
  // platform
22
23
  var platform = _sdk.ENV_ENUM.notInYach;
23
24
  if (inIOS) {
@@ -42,7 +43,8 @@ function getENV() {
42
43
  inAndroid: inAndroid,
43
44
  inPC: inPC,
44
45
  inIpad: inIpad,
45
- inIPhone: inIPhone
46
+ inIPhone: inIPhone,
47
+ inHarmonyNext: inHarmonyNext
46
48
  },
47
49
  version: version,
48
50
  language: language,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yach.open.jssdk",
3
- "version": "4.4.6-beta2",
3
+ "version": "4.4.6-beta4",
4
4
  "description": "",
5
5
  "module": "./es/index.js",
6
6
  "main": "./libs/index.js",