yach.open.jssdk 4.4.4-beta.10 → 4.4.4-beta.12

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 (304) hide show
  1. package/dist/yach_jssdk_4.4.4-beta.12.js +1 -0
  2. package/es/api/app/custom/talYoungFilesUpload.js +0 -2
  3. package/es/api/biz/chat/chooseConversationByCorpId.js +0 -2
  4. package/es/api/biz/chat/openSingleChat.js +0 -2
  5. package/es/api/biz/chat/openSquad.js +0 -2
  6. package/es/api/biz/chat/openTeamChat.js +0 -2
  7. package/es/api/biz/chat/pickConversation.js +0 -2
  8. package/es/api/biz/chat/sendP2PMsg.js +0 -2
  9. package/es/api/biz/contact/complexPicker.js +0 -2
  10. package/es/api/biz/contact/departmentsPicker.js +0 -2
  11. package/es/api/biz/group/groupComplexPicker.js +0 -2
  12. package/es/api/biz/map/multipointView.js +0 -2
  13. package/es/api/biz/map/view.js +0 -2
  14. package/es/api/biz/navigation/close.js +0 -2
  15. package/es/api/biz/navigation/goBack.js +0 -2
  16. package/es/api/biz/navigation/quit.js +0 -2
  17. package/es/api/biz/navigation/replace.js +0 -2
  18. package/es/api/biz/navigation/setIcon.js +0 -2
  19. package/es/api/biz/navigation/setLeft.js +0 -2
  20. package/es/api/biz/navigation/setMenu.js +0 -2
  21. package/es/api/biz/navigation/setPanGestureEnable.js +0 -2
  22. package/es/api/biz/navigation/setRight.js +0 -2
  23. package/es/api/biz/navigation/setTitle.js +0 -2
  24. package/es/api/biz/navigation/setTitleExpandIcon.js +0 -2
  25. package/es/api/biz/navigation/setWindowBig.js +0 -2
  26. package/es/api/biz/navigation/tencentMeeting.js +0 -2
  27. package/es/api/biz/navigation/tencentMeetingBegin.js +0 -2
  28. package/es/api/biz/navigation/updateExpandTitle.js +0 -2
  29. package/es/api/biz/telephone/call.js +0 -2
  30. package/es/api/biz/telephone/showCallMenu.js +0 -2
  31. package/es/api/biz/util/addAppToNav.js +0 -2
  32. package/es/api/biz/util/assistantCreate.js +0 -2
  33. package/es/api/biz/util/authFinish.js +0 -2
  34. package/es/api/biz/util/authStart.js +0 -2
  35. package/es/api/biz/util/chosen.js +0 -2
  36. package/es/api/biz/util/clipboardFileUpload.js +0 -2
  37. package/es/api/biz/util/closeWindow.js +0 -2
  38. package/es/api/biz/util/complain.js +0 -2
  39. package/es/api/biz/util/copy.js +0 -2
  40. package/es/api/biz/util/createModifySchedule.js +0 -2
  41. package/es/api/biz/util/datepicker.js +0 -2
  42. package/es/api/biz/util/datetimepicker.js +0 -2
  43. package/es/api/biz/util/disableScreenCapture.js +0 -2
  44. package/es/api/biz/util/downloadFile.js +0 -2
  45. package/es/api/biz/util/entergroupCheck.js +0 -2
  46. package/es/api/biz/util/externalLinkPreviewFile.js +0 -2
  47. package/es/api/biz/util/feedback.js +0 -2
  48. package/es/api/biz/util/getConfig.d.ts +13 -0
  49. package/es/api/biz/util/getConfig.js +19 -0
  50. package/es/api/biz/util/getSingleWebviewData.js +0 -2
  51. package/es/api/biz/util/getTogetherConfig.js +0 -2
  52. package/es/api/biz/util/getToken.js +0 -2
  53. package/es/api/biz/util/injectScript.js +0 -2
  54. package/es/api/biz/util/invoice.js +0 -2
  55. package/es/api/biz/util/knowledgeBaseSelect.js +0 -2
  56. package/es/api/biz/util/knowledgeSelectParams.d.ts +5 -5
  57. package/es/api/biz/util/knowledgeSelectParams.js +0 -2
  58. package/es/api/biz/util/lorebaseRefreshNodeWebview.js +0 -2
  59. package/es/api/biz/util/lorebaseShowList.js +0 -2
  60. package/es/api/biz/util/mediaFileUpload.js +0 -2
  61. package/es/api/biz/util/onlineDocmentOpenTeamChat.js +0 -2
  62. package/es/api/biz/util/open.js +0 -2
  63. package/es/api/biz/util/openFutureGroup.js +0 -2
  64. package/es/api/biz/util/openLink.js +0 -2
  65. package/es/api/biz/util/openMediaFileDialog.js +0 -2
  66. package/es/api/biz/util/openPublish.js +0 -2
  67. package/es/api/biz/util/openSingleWebview.js +0 -2
  68. package/es/api/biz/util/openSlidePanel.js +0 -2
  69. package/es/api/biz/util/openTalYoungToTopic.js +0 -2
  70. package/es/api/biz/util/openTogetherEyeWebview.js +0 -2
  71. package/es/api/biz/util/openUserSchedule.js +0 -2
  72. package/es/api/biz/util/openVideoPlayer.js +0 -2
  73. package/es/api/biz/util/previewFile.js +0 -2
  74. package/es/api/biz/util/previewImage.js +0 -2
  75. package/es/api/biz/util/proxy.js +0 -2
  76. package/es/api/biz/util/pushWorkMsg.js +0 -2
  77. package/es/api/biz/util/remind.js +0 -2
  78. package/es/api/biz/util/resetSessionUnread.js +0 -2
  79. package/es/api/biz/util/rouseApp.js +0 -2
  80. package/es/api/biz/util/savePic.js +0 -2
  81. package/es/api/biz/util/scan.js +0 -2
  82. package/es/api/biz/util/screen.js +0 -2
  83. package/es/api/biz/util/selectDepartment.js +0 -2
  84. package/es/api/biz/util/share.js +0 -2
  85. package/es/api/biz/util/takePicture.js +0 -2
  86. package/es/api/biz/util/topicEvent.js +0 -2
  87. package/es/api/biz/util/uploadAttachment.js +0 -2
  88. package/es/api/biz/util/weeklyRead.js +0 -2
  89. package/es/api/biz/util/yachEvent.js +0 -2
  90. package/es/api/biz/util/zfbAuth.js +0 -2
  91. package/es/api/biz/webViewMessage/send.js +0 -2
  92. package/es/api/device/audio/download.js +0 -2
  93. package/es/api/device/audio/onPlayEnd.js +0 -2
  94. package/es/api/device/audio/onRecordEnd.js +0 -2
  95. package/es/api/device/audio/onRecordEnd_v2.js +0 -2
  96. package/es/api/device/audio/pause.js +0 -2
  97. package/es/api/device/audio/play.js +0 -2
  98. package/es/api/device/audio/resume.js +0 -2
  99. package/es/api/device/audio/startRecord.js +0 -2
  100. package/es/api/device/audio/startRecord_v2.js +0 -2
  101. package/es/api/device/audio/stop.js +0 -2
  102. package/es/api/device/audio/stopRecord.js +0 -2
  103. package/es/api/device/audio/stopRecord_v2.js +0 -2
  104. package/es/api/device/base/checkStepPermission.js +0 -2
  105. package/es/api/device/base/getPhoneInfo.js +0 -2
  106. package/es/api/device/base/getUUID.js +0 -2
  107. package/es/api/device/connection/getNetworkType.js +0 -2
  108. package/es/api/device/connection/isAtTal.js +2 -4
  109. package/es/api/device/geolocation/get.js +0 -2
  110. package/es/api/device/geolocation/getSwitch.js +0 -2
  111. package/es/api/device/notification/actionSheet.js +0 -2
  112. package/es/api/device/notification/alert.js +0 -2
  113. package/es/api/device/notification/confirm.js +0 -2
  114. package/es/api/device/notification/hidePreloader.js +0 -4
  115. package/es/api/device/notification/showPreloader.js +0 -4
  116. package/es/api/device/notification/toast.js +0 -2
  117. package/es/api/device/notification/vibrate.js +0 -2
  118. package/es/api/device/system/getLang.js +0 -2
  119. package/es/api/device/system/setLight.js +0 -2
  120. package/es/api/initAPI.js +3 -5
  121. package/es/api/primary/createTab.js +0 -2
  122. package/es/api/primary/exitFullScreen.js +0 -2
  123. package/es/api/primary/fullScreen.js +0 -2
  124. package/es/api/primary/updateTab.js +0 -2
  125. package/es/api/primary/weeklyShare.js +0 -2
  126. package/es/api/runtime/permission/requestAuthCode.js +0 -2
  127. package/es/api/ui/pullToRefresh/disable.js +0 -2
  128. package/es/api/ui/pullToRefresh/enable.js +0 -2
  129. package/es/api/ui/pullToRefresh/stop.js +0 -2
  130. package/es/api/ui/webViewBounce/disable.js +0 -2
  131. package/es/api/util/domainStorage/getItem.js +0 -2
  132. package/es/api/util/domainStorage/removeItem.js +0 -2
  133. package/es/api/util/domainStorage/setItem.js +0 -2
  134. package/es/api/util/tool/flushLog.js +0 -2
  135. package/es/api/util/tool/log.js +0 -2
  136. package/es/index.d.ts +3 -1
  137. package/es/index.js +20 -29
  138. package/es/lib/bridge/mobile.js +12 -27
  139. package/es/lib/bridge/pc.js +11 -18
  140. package/es/lib/helper/apiHelper.js +0 -2
  141. package/es/lib/helper/codeMap.js +0 -2
  142. package/es/lib/helper/event.js +7 -19
  143. package/es/lib/helper/pcIframe.js +23 -59
  144. package/es/lib/index.js +7 -21
  145. package/es/lib/sdk/index.js +16 -37
  146. package/es/lib/sdk/sdk.typings.js +0 -1
  147. package/es/utils/bpitLog.js +4 -13
  148. package/es/utils/compareVersions.js +26 -53
  149. package/es/utils/console.js +1 -17
  150. package/es/utils/env.js +13 -20
  151. package/es/utils/index.js +1 -6
  152. package/libs/api/app/custom/talYoungFilesUpload.js +2 -7
  153. package/libs/api/biz/chat/chooseConversationByCorpId.js +1 -7
  154. package/libs/api/biz/chat/openSingleChat.js +1 -7
  155. package/libs/api/biz/chat/openSquad.js +1 -7
  156. package/libs/api/biz/chat/openTeamChat.js +1 -7
  157. package/libs/api/biz/chat/pickConversation.js +1 -7
  158. package/libs/api/biz/chat/sendP2PMsg.js +1 -7
  159. package/libs/api/biz/contact/complexPicker.js +1 -7
  160. package/libs/api/biz/contact/departmentsPicker.js +1 -7
  161. package/libs/api/biz/group/groupComplexPicker.js +1 -7
  162. package/libs/api/biz/map/multipointView.js +1 -7
  163. package/libs/api/biz/map/view.js +1 -7
  164. package/libs/api/biz/navigation/close.js +1 -7
  165. package/libs/api/biz/navigation/goBack.js +1 -7
  166. package/libs/api/biz/navigation/quit.js +1 -7
  167. package/libs/api/biz/navigation/replace.js +1 -7
  168. package/libs/api/biz/navigation/setIcon.js +1 -8
  169. package/libs/api/biz/navigation/setLeft.js +1 -8
  170. package/libs/api/biz/navigation/setMenu.js +1 -8
  171. package/libs/api/biz/navigation/setPanGestureEnable.js +1 -8
  172. package/libs/api/biz/navigation/setRight.js +1 -8
  173. package/libs/api/biz/navigation/setTitle.js +1 -7
  174. package/libs/api/biz/navigation/setTitleExpandIcon.js +1 -8
  175. package/libs/api/biz/navigation/setWindowBig.js +2 -7
  176. package/libs/api/biz/navigation/tencentMeeting.js +1 -7
  177. package/libs/api/biz/navigation/tencentMeetingBegin.js +1 -7
  178. package/libs/api/biz/navigation/updateExpandTitle.js +1 -7
  179. package/libs/api/biz/telephone/call.js +1 -7
  180. package/libs/api/biz/telephone/showCallMenu.js +1 -7
  181. package/libs/api/biz/util/addAppToNav.js +1 -7
  182. package/libs/api/biz/util/assistantCreate.js +1 -7
  183. package/libs/api/biz/util/authFinish.js +1 -7
  184. package/libs/api/biz/util/authStart.js +1 -7
  185. package/libs/api/biz/util/chosen.js +1 -7
  186. package/libs/api/biz/util/clipboardFileUpload.js +1 -7
  187. package/libs/api/biz/util/closeWindow.js +1 -7
  188. package/libs/api/biz/util/complain.js +1 -7
  189. package/libs/api/biz/util/copy.js +1 -7
  190. package/libs/api/biz/util/createModifySchedule.js +1 -7
  191. package/libs/api/biz/util/datepicker.js +1 -7
  192. package/libs/api/biz/util/datetimepicker.js +1 -7
  193. package/libs/api/biz/util/disableScreenCapture.js +1 -7
  194. package/libs/api/biz/util/downloadFile.js +1 -7
  195. package/libs/api/biz/util/entergroupCheck.js +1 -7
  196. package/libs/api/biz/util/externalLinkPreviewFile.js +1 -7
  197. package/libs/api/biz/util/feedback.js +1 -7
  198. package/libs/api/biz/util/getConfig.d.ts +13 -0
  199. package/libs/api/biz/util/getConfig.js +26 -0
  200. package/libs/api/biz/util/getSingleWebviewData.js +1 -7
  201. package/libs/api/biz/util/getTogetherConfig.js +1 -7
  202. package/libs/api/biz/util/getToken.js +1 -7
  203. package/libs/api/biz/util/injectScript.js +1 -7
  204. package/libs/api/biz/util/invoice.js +2 -7
  205. package/libs/api/biz/util/knowledgeBaseSelect.js +1 -7
  206. package/libs/api/biz/util/knowledgeSelectParams.d.ts +5 -5
  207. package/libs/api/biz/util/knowledgeSelectParams.js +1 -7
  208. package/libs/api/biz/util/lorebaseRefreshNodeWebview.js +1 -7
  209. package/libs/api/biz/util/lorebaseShowList.js +1 -7
  210. package/libs/api/biz/util/mediaFileUpload.js +2 -7
  211. package/libs/api/biz/util/onlineDocmentOpenTeamChat.js +1 -7
  212. package/libs/api/biz/util/open.js +1 -7
  213. package/libs/api/biz/util/openFutureGroup.js +1 -7
  214. package/libs/api/biz/util/openLink.js +1 -7
  215. package/libs/api/biz/util/openMediaFileDialog.js +2 -7
  216. package/libs/api/biz/util/openPublish.js +1 -7
  217. package/libs/api/biz/util/openSingleWebview.js +1 -7
  218. package/libs/api/biz/util/openSlidePanel.js +1 -7
  219. package/libs/api/biz/util/openTalYoungToTopic.js +2 -7
  220. package/libs/api/biz/util/openTogetherEyeWebview.js +1 -7
  221. package/libs/api/biz/util/openUserSchedule.js +1 -7
  222. package/libs/api/biz/util/openVideoPlayer.js +1 -7
  223. package/libs/api/biz/util/previewFile.js +1 -7
  224. package/libs/api/biz/util/previewImage.js +1 -7
  225. package/libs/api/biz/util/proxy.js +1 -7
  226. package/libs/api/biz/util/pushWorkMsg.js +2 -7
  227. package/libs/api/biz/util/remind.js +1 -7
  228. package/libs/api/biz/util/resetSessionUnread.js +1 -7
  229. package/libs/api/biz/util/rouseApp.js +2 -7
  230. package/libs/api/biz/util/savePic.js +1 -7
  231. package/libs/api/biz/util/scan.js +1 -7
  232. package/libs/api/biz/util/screen.js +1 -7
  233. package/libs/api/biz/util/selectDepartment.js +1 -7
  234. package/libs/api/biz/util/share.js +1 -7
  235. package/libs/api/biz/util/takePicture.js +1 -7
  236. package/libs/api/biz/util/topicEvent.js +1 -7
  237. package/libs/api/biz/util/uploadAttachment.js +1 -7
  238. package/libs/api/biz/util/weeklyRead.js +1 -7
  239. package/libs/api/biz/util/yachEvent.js +1 -7
  240. package/libs/api/biz/util/zfbAuth.js +1 -7
  241. package/libs/api/biz/webViewMessage/send.js +1 -7
  242. package/libs/api/device/audio/download.js +1 -7
  243. package/libs/api/device/audio/onPlayEnd.js +1 -7
  244. package/libs/api/device/audio/onRecordEnd.js +1 -7
  245. package/libs/api/device/audio/onRecordEnd_v2.js +1 -7
  246. package/libs/api/device/audio/pause.js +1 -7
  247. package/libs/api/device/audio/play.js +1 -7
  248. package/libs/api/device/audio/resume.js +1 -7
  249. package/libs/api/device/audio/startRecord.js +1 -7
  250. package/libs/api/device/audio/startRecord_v2.js +1 -7
  251. package/libs/api/device/audio/stop.js +1 -7
  252. package/libs/api/device/audio/stopRecord.js +1 -7
  253. package/libs/api/device/audio/stopRecord_v2.js +1 -7
  254. package/libs/api/device/base/checkStepPermission.js +1 -7
  255. package/libs/api/device/base/getPhoneInfo.js +1 -7
  256. package/libs/api/device/base/getUUID.js +1 -7
  257. package/libs/api/device/connection/getNetworkType.js +1 -7
  258. package/libs/api/device/connection/isAtTal.js +3 -9
  259. package/libs/api/device/geolocation/get.js +1 -7
  260. package/libs/api/device/geolocation/getSwitch.js +1 -7
  261. package/libs/api/device/notification/actionSheet.js +1 -7
  262. package/libs/api/device/notification/alert.js +1 -7
  263. package/libs/api/device/notification/confirm.js +1 -7
  264. package/libs/api/device/notification/hidePreloader.js +2 -10
  265. package/libs/api/device/notification/showPreloader.js +2 -10
  266. package/libs/api/device/notification/toast.js +1 -7
  267. package/libs/api/device/notification/vibrate.js +1 -7
  268. package/libs/api/device/system/getLang.js +1 -7
  269. package/libs/api/device/system/setLight.js +1 -7
  270. package/libs/api/initAPI.js +4 -13
  271. package/libs/api/primary/createTab.js +1 -7
  272. package/libs/api/primary/exitFullScreen.js +1 -7
  273. package/libs/api/primary/fullScreen.js +1 -7
  274. package/libs/api/primary/updateTab.js +1 -7
  275. package/libs/api/primary/weeklyShare.js +1 -7
  276. package/libs/api/runtime/permission/requestAuthCode.js +1 -7
  277. package/libs/api/ui/pullToRefresh/disable.js +1 -7
  278. package/libs/api/ui/pullToRefresh/enable.js +1 -7
  279. package/libs/api/ui/pullToRefresh/stop.js +1 -7
  280. package/libs/api/ui/webViewBounce/disable.js +1 -7
  281. package/libs/api/util/domainStorage/getItem.js +1 -7
  282. package/libs/api/util/domainStorage/removeItem.js +1 -7
  283. package/libs/api/util/domainStorage/setItem.js +1 -7
  284. package/libs/api/util/tool/flushLog.js +1 -7
  285. package/libs/api/util/tool/log.js +1 -7
  286. package/libs/index.d.ts +3 -1
  287. package/libs/index.js +287 -559
  288. package/libs/lib/bridge/index.js +6 -13
  289. package/libs/lib/bridge/mobile.js +16 -51
  290. package/libs/lib/bridge/pc.js +16 -37
  291. package/libs/lib/helper/apiHelper.js +1 -7
  292. package/libs/lib/helper/codeMap.js +1 -7
  293. package/libs/lib/helper/event.js +8 -28
  294. package/libs/lib/helper/pcIframe.js +22 -67
  295. package/libs/lib/index.js +9 -33
  296. package/libs/lib/sdk/index.js +17 -47
  297. package/libs/lib/sdk/sdk.typings.js +0 -4
  298. package/libs/utils/bpitLog.js +4 -16
  299. package/libs/utils/compareVersions.js +32 -77
  300. package/libs/utils/console.js +2 -18
  301. package/libs/utils/env.js +13 -22
  302. package/libs/utils/index.js +8 -21
  303. package/package.json +1 -1
  304. package/dist/yach_jssdk_4.4.4-beta.10.js +0 -1
package/es/index.js CHANGED
@@ -1,8 +1,6 @@
1
1
  import { yachSdk } from './lib';
2
2
  /*biz*****************************/
3
-
4
3
  /**util*/
5
-
6
4
  import { openLink } from './api/biz/util/openLink';
7
5
  import { feedback } from './api/biz/util/feedback';
8
6
  import { open } from './api/biz/util/open';
@@ -60,8 +58,8 @@ import { lorebaseShowList } from './api/biz/util/lorebaseShowList';
60
58
  import { lorebaseRefreshNodeWebview } from './api/biz/util/lorebaseRefreshNodeWebview';
61
59
  import { copy } from './api/biz/util/copy';
62
60
  import { openPublish } from './api/biz/util/openPublish';
61
+ import { getConfig } from './api/biz/util/getConfig';
63
62
  /**navigation*/
64
-
65
63
  import { setIcon } from './api/biz/navigation/setIcon';
66
64
  import { setTitle } from './api/biz/navigation/setTitle';
67
65
  import { setMenu } from './api/biz/navigation/setMenu';
@@ -78,14 +76,11 @@ import { tencentMeeting } from './api/biz/navigation/tencentMeeting';
78
76
  import { tencentMeetingBegin } from './api/biz/navigation/tencentMeetingBegin';
79
77
  import { setPanGestureEnable } from './api/biz/navigation/setPanGestureEnable';
80
78
  /**contact*/
81
-
82
79
  import { complexPicker } from './api/biz/contact/complexPicker';
83
80
  import { departmentsPicker } from './api/biz/contact/departmentsPicker';
84
81
  /** group*/
85
-
86
82
  import { groupComplexPicker } from './api/biz/group/groupComplexPicker';
87
83
  /** chat*/
88
-
89
84
  import { chooseConversationByCorpId } from './api/biz/chat/chooseConversationByCorpId';
90
85
  import { pickConversation } from './api/biz/chat/pickConversation';
91
86
  import { openSingleChat } from './api/biz/chat/openSingleChat';
@@ -93,17 +88,14 @@ import { openTeamChat } from './api/biz/chat/openTeamChat';
93
88
  import { openSquad } from './api/biz/chat/openSquad';
94
89
  import { sendP2PMsg } from './api/biz/chat/sendP2PMsg';
95
90
  /* primary*****************************/
96
-
97
91
  import { createTab } from './api/primary/createTab';
98
92
  import { updateTab } from './api/primary/updateTab';
99
93
  import { weeklyShare } from './api/primary/weeklyShare';
100
94
  import { fullScreen } from './api/primary/fullScreen';
101
95
  import { exitFullScreen } from './api/primary/exitFullScreen';
102
96
  /* runtime*****************************/
103
-
104
97
  import { requestAuthCode } from './api/runtime/permission/requestAuthCode';
105
98
  /** device */
106
-
107
99
  import { showPreloader, showCustomOverlayContent } from './api/device/notification/showPreloader';
108
100
  import { hidePreloader, hideCustomOverlayContent } from './api/device/notification/hidePreloader';
109
101
  import { vibrate } from './api/device/notification/vibrate';
@@ -133,40 +125,38 @@ import { startRecord_v2 } from './api/device/audio/startRecord_v2';
133
125
  import { stopRecord_v2 } from './api/device/audio/stopRecord_v2';
134
126
  import { setLight } from './api/device/system/setLight';
135
127
  /** telephone */
136
-
137
128
  import { showCallMenu } from './api/biz/telephone/showCallMenu';
138
129
  import { call } from './api/biz/telephone/call';
139
130
  /** ui */
140
-
141
131
  import { disable as webViewBounceDisable } from './api/ui/webViewBounce/disable';
142
132
  import { enable as pullToRefreshEnable } from './api/ui/pullToRefresh/enable';
143
133
  import { stop as pullToRefreshStop } from './api/ui/pullToRefresh/stop';
144
- import { disable as pullToRefreshDisable } from './api/ui/pullToRefresh/disable'; // demainStorage
145
-
134
+ import { disable as pullToRefreshDisable } from './api/ui/pullToRefresh/disable';
135
+ // demainStorage
146
136
  import { getItem } from './api/util/domainStorage/getItem';
147
137
  import { setItem } from './api/util/domainStorage/setItem';
148
- import { removeItem } from './api/util/domainStorage/removeItem'; // log
149
-
138
+ import { removeItem } from './api/util/domainStorage/removeItem';
139
+ // log
150
140
  import { writeLog } from './api/util/tool/log';
151
- import { flushLog } from './api/util/tool/flushLog'; // screen
152
-
141
+ import { flushLog } from './api/util/tool/flushLog';
142
+ // screen
153
143
  import { capturePage } from './api/biz/util/screen';
154
144
  import { send as webViewMessageSend } from './api/biz/webViewMessage/send';
155
145
  import { talYoungFilesUpload } from './api/app/custom/talYoungFilesUpload';
156
146
  import { addAppToNav } from './api/biz/util/addAppToNav';
157
147
  console.log('add rouseApp ------------>', rouseApp);
158
148
  var _yachSdk$exportSdk = yachSdk.exportSdk,
159
- version = _yachSdk$exportSdk.version,
160
- sdkVersion = _yachSdk$exportSdk.sdkVersion,
161
- env = _yachSdk$exportSdk.env,
162
- platform = _yachSdk$exportSdk.platform,
163
- platformV2 = _yachSdk$exportSdk.platformV2,
164
- config = _yachSdk$exportSdk.config,
165
- ready = _yachSdk$exportSdk.ready,
166
- error = _yachSdk$exportSdk.error,
167
- on = _yachSdk$exportSdk.on,
168
- off = _yachSdk$exportSdk.off;
169
- 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, 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 };
149
+ version = _yachSdk$exportSdk.version,
150
+ sdkVersion = _yachSdk$exportSdk.sdkVersion,
151
+ env = _yachSdk$exportSdk.env,
152
+ platform = _yachSdk$exportSdk.platform,
153
+ platformV2 = _yachSdk$exportSdk.platformV2,
154
+ config = _yachSdk$exportSdk.config,
155
+ ready = _yachSdk$exportSdk.ready,
156
+ error = _yachSdk$exportSdk.error,
157
+ on = _yachSdk$exportSdk.on,
158
+ off = _yachSdk$exportSdk.off;
159
+ 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, 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 };
170
160
  export default {
171
161
  version: version,
172
162
  sdkVersion: sdkVersion,
@@ -236,7 +226,8 @@ export default {
236
226
  lorebaseRefreshNodeWebview: lorebaseRefreshNodeWebview,
237
227
  copy: copy,
238
228
  openPublish: openPublish,
239
- capturePage: capturePage
229
+ capturePage: capturePage,
230
+ getConfig: getConfig
240
231
  },
241
232
  telephone: {
242
233
  showCallMenu: showCallMenu,
@@ -1,36 +1,30 @@
1
- import _JSON$stringify from "@babel/runtime-corejs3/core-js/json/stringify";
2
- import _parseInt from "@babel/runtime-corejs3/core-js/parse-int";
3
- import _Object$assign from "@babel/runtime-corejs3/core-js/object/assign";
4
- import _Promise from "@babel/runtime-corejs3/core-js/promise";
5
1
  import _setTimeout from "@babel/runtime-corejs3/core-js/set-timeout";
2
+ import _Promise from "@babel/runtime-corejs3/core-js/promise";
3
+ import _Object$assign from "@babel/runtime-corejs3/core-js/object/assign";
4
+ import _parseInt from "@babel/runtime-corejs3/core-js/parse-int";
5
+ import _JSON$stringify from "@babel/runtime-corejs3/core-js/json/stringify";
6
6
  import Event from '../helper/event';
7
7
  import { electronResCodeMap } from '../helper/codeMap';
8
8
  import { log, bpitLog } from '../../utils';
9
-
10
9
  function setupWebViewJavascriptBridge(callback) {
11
10
  if (window.WebViewJavascriptBridge) {
12
11
  return callback(WebViewJavascriptBridge);
13
12
  }
14
-
15
13
  if (window.WKWebViewJavascriptBridge) {
16
14
  return callback(WKWebViewJavascriptBridge);
17
15
  }
18
-
19
16
  if (window.WVJBCallbacks) {
20
17
  return window.WVJBCallbacks.push(callback);
21
18
  }
22
-
23
19
  window.WVJBCallbacks = [callback];
24
20
  var WVJBIframe = document.createElement('iframe');
25
21
  WVJBIframe.style.display = 'none';
26
22
  WVJBIframe.src = 'https://__bridge_loaded__';
27
23
  document.documentElement.appendChild(WVJBIframe);
28
-
29
24
  _setTimeout(function () {
30
25
  document.documentElement.removeChild(WVJBIframe);
31
26
  }, 0);
32
27
  }
33
-
34
28
  var mobileBridgeInit = function mobileBridgeInit() {
35
29
  return new _Promise(function (resolve, reject) {
36
30
  setupWebViewJavascriptBridge(function (bridge) {
@@ -87,17 +81,14 @@ var mobileBridgeInit = function mobileBridgeInit() {
87
81
  });
88
82
  });
89
83
  };
90
-
91
84
  var mobileBridge = function mobileBridge(method, param) {
92
85
  return new _Promise(function (resolve, reject) {
93
86
  var p = _Object$assign({}, param);
94
-
95
87
  setupWebViewJavascriptBridge(function (bridge) {
96
88
  if (param.control) {
97
89
  bridge.registerHandler(method, function (data) {
98
90
  var onSuccess = param.onSuccess;
99
91
  delete p.onSuccess;
100
-
101
92
  if ('function' === typeof onSuccess) {
102
93
  onSuccess(data);
103
94
  resolve({
@@ -107,14 +98,11 @@ var mobileBridge = function mobileBridge(method, param) {
107
98
  }
108
99
  });
109
100
  }
110
-
111
101
  bridge.callHandler(method, param, function (e) {
112
102
  var code = e.code,
113
- message = e.message,
114
- data = e.data;
115
-
103
+ message = e.message,
104
+ data = e.data;
116
105
  var _code = _parseInt(code);
117
-
118
106
  var callbackStr = electronResCodeMap(_code);
119
107
  var callbackFun = p[callbackStr];
120
108
  log("SDK\u6267\u884C\u540E\u56DE\u8C03\uFF0C\u76F8\u5173\u53C2\u6570 ", {
@@ -124,40 +112,37 @@ var mobileBridge = function mobileBridge(method, param) {
124
112
  _code: _code,
125
113
  message: message,
126
114
  callbackFun: callbackFun
127
- }); // 请求失败
128
-
115
+ });
116
+ // 请求失败
129
117
  if (callbackStr === 'onFail') {
130
118
  bpitLog({
131
119
  method: method,
132
120
  errorcode: _code,
133
121
  message: message || _JSON$stringify(data) || 'SDK执行失败回调,相关参数'
134
122
  });
135
-
136
123
  if ('function' === typeof callbackFun) {
137
124
  message ? callbackFun({
138
125
  code: code,
139
126
  message: message
140
127
  }) : callbackFun(data);
141
128
  }
142
-
143
129
  reject({
144
130
  _code: _code,
145
131
  message: message,
146
132
  data: data
147
133
  });
148
134
  return;
149
- } // 请求成功
150
-
151
-
135
+ }
136
+ // 请求成功
152
137
  if ('function' === typeof callbackFun) {
153
138
  callbackFun(data || message);
154
139
  }
155
-
156
140
  resolve({
157
141
  _code: _code,
158
142
  message: message,
159
143
  data: data
160
- }); // if (_code === -2 || _code === 7) {
144
+ });
145
+ // if (_code === -2 || _code === 7) {
161
146
  // bpitLog({
162
147
  // method,
163
148
  // errorcode: _code,
@@ -1,24 +1,20 @@
1
- import _Object$assign from "@babel/runtime-corejs3/core-js/object/assign";
2
- import _JSON$stringify from "@babel/runtime-corejs3/core-js/json/stringify";
3
- import _parseInt from "@babel/runtime-corejs3/core-js/parse-int";
4
1
  import _Promise from "@babel/runtime-corejs3/core-js/promise";
2
+ import _parseInt from "@babel/runtime-corejs3/core-js/parse-int";
3
+ import _JSON$stringify from "@babel/runtime-corejs3/core-js/json/stringify";
4
+ import _Object$assign from "@babel/runtime-corejs3/core-js/object/assign";
5
5
  import PcIframe from '../helper/pcIframe';
6
6
  import { electronResCodeMap } from '../helper/codeMap';
7
7
  import { log, bpitLog } from '../../utils';
8
-
9
8
  var PcBridgeInit = function PcBridgeInit() {
10
9
  PcIframe.init();
11
10
  };
12
-
13
11
  var pcBridge = function pcBridge(method, param) {
14
12
  return new _Promise(function (resolve, reject) {
15
13
  return PcIframe.invokeAPI(method, param, function (_ref) {
16
14
  var data = _ref.data,
17
- code = _ref.code,
18
- message = _ref.message;
19
-
15
+ code = _ref.code,
16
+ message = _ref.message;
20
17
  var _code = _parseInt(code);
21
-
22
18
  var callbackStr = electronResCodeMap(_code);
23
19
  var callbackFun = param[callbackStr];
24
20
  log("SDK\u6267\u884C\u540E\u56DE\u8C03\uFF0C\u76F8\u5173\u53C2\u6570 ", {
@@ -28,15 +24,14 @@ var pcBridge = function pcBridge(method, param) {
28
24
  _code: _code,
29
25
  message: message,
30
26
  callbackFun: callbackFun
31
- }); // 请求失败
32
-
27
+ });
28
+ // 请求失败
33
29
  if (callbackStr === 'onFail') {
34
30
  bpitLog({
35
31
  method: method,
36
32
  errorcode: _code,
37
33
  message: message || _JSON$stringify(data) || 'SDK执行失败回调,相关参数'
38
34
  });
39
-
40
35
  if ('function' === typeof callbackFun) {
41
36
  console.log('wenai-code', code, _code);
42
37
  var callbackData = Object.prototype.toString.call(data) === "[object Object]" ? _Object$assign(_Object$assign({}, data), {
@@ -49,25 +44,23 @@ var pcBridge = function pcBridge(method, param) {
49
44
  };
50
45
  message ? callbackFun(callbackData) : callbackFun(data);
51
46
  }
52
-
53
47
  reject({
54
48
  _code: _code,
55
49
  message: message,
56
50
  data: data
57
51
  });
58
52
  return;
59
- } // 请求成功
60
-
61
-
53
+ }
54
+ // 请求成功
62
55
  if ('function' === typeof callbackFun) {
63
56
  callbackFun(data || message);
64
57
  }
65
-
66
58
  resolve({
67
59
  _code: _code,
68
60
  message: message,
69
61
  data: data
70
- }); // if (_code === -2) {
62
+ });
63
+ // if (_code === -2) {
71
64
  // bpitLog({
72
65
  // method,
73
66
  // errorcode: _code,
@@ -1,10 +1,8 @@
1
1
  import _Object$assign from "@babel/runtime-corejs3/core-js/object/assign";
2
-
3
2
  function genDefaultParamsDealFn(p) {
4
3
  return function (r) {
5
4
  return _Object$assign(_Object$assign({}, p), r);
6
5
  };
7
6
  }
8
-
9
7
  ;
10
8
  export { genDefaultParamsDealFn };
@@ -1,8 +1,6 @@
1
1
  import _Map from "@babel/runtime-corejs3/core-js/map";
2
2
  var resCodeMap = new _Map([[0, 'onSuccess'], [-1, 'onCancel'], [-2, 'onFail'], [-3, 'onProgress'], [-4, 'onSubmit']]);
3
-
4
3
  function electronResCodeMap(code) {
5
4
  return resCodeMap.get(code) || 'onFail';
6
5
  }
7
-
8
6
  export { electronResCodeMap };
@@ -1,41 +1,31 @@
1
- import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js/instance/for-each";
2
- import _spliceInstanceProperty from "@babel/runtime-corejs3/core-js/instance/splice";
3
- import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js/instance/index-of";
4
- import _Array$isArray from "@babel/runtime-corejs3/core-js/array/is-array";
1
+ import _createClass from "@babel/runtime-corejs3/helpers/createClass";
5
2
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
6
-
7
- var Event = function Event() {
3
+ import _Array$isArray from "@babel/runtime-corejs3/core-js/array/is-array";
4
+ import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js/instance/index-of";
5
+ import _spliceInstanceProperty from "@babel/runtime-corejs3/core-js/instance/splice";
6
+ import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js/instance/for-each";
7
+ var Event = /*#__PURE__*/_createClass(function Event() {
8
8
  var _this = this;
9
-
10
9
  _classCallCheck(this, Event);
11
-
12
10
  this.on = function (event, fn) {
13
11
  if (!event || 'function' !== typeof fn) throw 'eventName is null or handle is not a function, on fail';
14
12
  if (!_Array$isArray(_this.eventsHandle[event])) _this.eventsHandle[event] = [];
15
-
16
13
  _this.eventsHandle[event].push(fn);
17
14
  };
18
-
19
15
  this.off = function (event, fn) {
20
16
  if (!event) throw 'eventName is null, invoke off fail';
21
-
22
17
  if (!fn) {
23
18
  _this.eventsHandle[event] = [];
24
19
  return;
25
20
  }
26
-
27
21
  if (_Array$isArray(_this.eventsHandle[event])) {
28
22
  var _context, _context2;
29
-
30
23
  var n = _indexOfInstanceProperty(_context = _this.eventsHandle[event]).call(_context, fn);
31
-
32
24
  -1 !== n && _spliceInstanceProperty(_context2 = _this.eventsHandle[event]).call(_context2, n, 1);
33
25
  }
34
26
  };
35
-
36
27
  this.execEvent = function (event, data) {
37
28
  var _context3;
38
-
39
29
  _Array$isArray(this.eventsHandle[event]) && _forEachInstanceProperty(_context3 = this.eventsHandle[event]).call(_context3, function (fn) {
40
30
  try {
41
31
  fn(data);
@@ -44,9 +34,7 @@ var Event = function Event() {
44
34
  }
45
35
  });
46
36
  };
47
-
48
37
  this.eventsHandle = {};
49
- };
50
-
38
+ });
51
39
  var event = new Event();
52
40
  export default event;
@@ -1,26 +1,22 @@
1
- import _JSON$stringify from "@babel/runtime-corejs3/core-js/json/stringify";
2
- import _Date$now from "@babel/runtime-corejs3/core-js/date/now";
1
+ import _createClass from "@babel/runtime-corejs3/helpers/createClass";
3
2
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
3
+ import _Date$now from "@babel/runtime-corejs3/core-js/date/now";
4
+ import _JSON$stringify from "@babel/runtime-corejs3/core-js/json/stringify";
4
5
  import { log } from '../../utils';
5
- import Event from './event'; // 处理posmessage参数
6
-
7
- var GenPostMsg = function GenPostMsg(method, param, callback) {
6
+ import Event from './event';
7
+ // 处理posmessage参数
8
+ var GenPostMsg = /*#__PURE__*/_createClass(function GenPostMsg(method, param, callback) {
8
9
  var _this = this;
9
-
10
10
  _classCallCheck(this, GenPostMsg);
11
-
12
11
  this.genid = function () {
13
12
  var idStr = _Date$now().toString(36);
14
-
15
13
  idStr += Math.random().toString(36).substr(3);
16
14
  return idStr;
17
15
  };
18
-
19
16
  this.receiveResponse = function (data) {
20
17
  //this.PromiseObj.resolve(data);
21
18
  _this.callback(data);
22
19
  };
23
-
24
20
  this.getPayload = function () {
25
21
  return {
26
22
  msgId: _this.id,
@@ -31,7 +27,6 @@ var GenPostMsg = function GenPostMsg(method, param, callback) {
31
27
  invokeType: _this.invokeType
32
28
  };
33
29
  };
34
-
35
30
  this.id = this.genid();
36
31
  this.PromiseObj = {
37
32
  resolve: null,
@@ -41,7 +36,8 @@ var GenPostMsg = function GenPostMsg(method, param, callback) {
41
36
  this.plainMsg = param;
42
37
  this.invokeType = param === null || param === void 0 ? void 0 : param.invokeType;
43
38
  this.moduleId = param === null || param === void 0 ? void 0 : param.moduleId;
44
- this.callback = callback; // this.result = new Promise(
39
+ this.callback = callback;
40
+ // this.result = new Promise(
45
41
  // function (resolve, reject) {
46
42
  // this.PromiseObj = {
47
43
  // resolve,
@@ -49,98 +45,75 @@ var GenPostMsg = function GenPostMsg(method, param, callback) {
49
45
  // };
50
46
  // }.bind(this)
51
47
  // );
52
- };
53
-
54
- var Frame = function Frame() {
48
+ });
49
+ var Frame = /*#__PURE__*/_createClass(function Frame() {
55
50
  var _this2 = this;
56
-
57
51
  _classCallCheck(this, Frame);
58
-
59
52
  this.addPending = function (e) {
60
53
  _this2.pendingMsgs[e.id] = e;
61
54
  };
62
-
63
55
  this.deletePending = function (e) {
64
56
  delete _this2.pendingMsgs[e.id];
65
57
  };
66
-
67
58
  this.getPending = function (t) {
68
59
  return this.pendingMsgs[t];
69
60
  };
70
-
71
61
  this.invokeAPIInBrowserView = function (payload) {
72
62
  window.sendTo(payload);
73
63
  };
74
-
75
64
  this.invokeAPIInWebview = function (payload) {
76
65
  window.sendToHost(payload);
77
66
  };
78
-
79
67
  this.invokeAPIInModuleFederation = function (payload) {
80
68
  window.remoteSendToHost(payload);
81
69
  };
82
-
83
70
  this.invokeAPI = function (method, param, callback) {
84
71
  var genPostMsg;
85
-
86
72
  if (_this2.invokeType === 'moduleFederation') {
87
73
  param.invokeType = _this2.invokeType;
88
74
  param.moduleId = _this2.moduleId;
89
75
  genPostMsg = new GenPostMsg(method, param, callback);
90
-
91
76
  var payload = _JSON$stringify(genPostMsg.getPayload());
92
-
93
77
  _this2.invokeAPIInModuleFederation(payload);
94
78
  } else {
95
79
  genPostMsg = new GenPostMsg(method, param, callback);
96
-
97
80
  var _payload = _JSON$stringify(genPostMsg.getPayload());
98
-
99
81
  var _param$invokeType = param.invokeType,
100
- invokeType = _param$invokeType === void 0 ? '' : _param$invokeType;
82
+ invokeType = _param$invokeType === void 0 ? '' : _param$invokeType;
101
83
  invokeType === 'browserView' ? _this2.invokeAPIInBrowserView(_payload) : _this2.invokeAPIInWebview(_payload);
102
- } // 调用时传入 moduleId
103
-
104
-
84
+ }
85
+ // 调用时传入 moduleId
105
86
  _this2.addPending(genPostMsg);
106
-
107
87
  return genPostMsg;
108
88
  };
109
-
110
89
  this.handleCallback = function (datas, invokeType) {
111
90
  var type = datas.type,
112
- methodName = datas.methodName,
113
- eventName = datas.eventName,
114
- msgId = datas.msgId,
115
- _datas$data = datas.data,
116
- data = _datas$data === void 0 ? {} : _datas$data,
117
- code = datas.code,
118
- message = datas.message,
119
- msg = datas.msg;
120
-
91
+ methodName = datas.methodName,
92
+ eventName = datas.eventName,
93
+ msgId = datas.msgId,
94
+ _datas$data = datas.data,
95
+ data = _datas$data === void 0 ? {} : _datas$data,
96
+ code = datas.code,
97
+ message = datas.message,
98
+ msg = datas.msg;
121
99
  if (type === 'request') {
122
100
  // 壳子的调用
123
101
  switch (methodName) {
124
102
  case 'refresh':
125
103
  window.location.reload();
126
104
  break;
127
-
128
105
  case 'back':
129
106
  window.history.back();
130
107
  break;
131
-
132
108
  case 'forward':
133
109
  window.history.forward();
134
110
  break;
135
-
136
111
  case 'event':
137
112
  Event.execEvent(eventName, data);
138
113
  break;
139
-
140
114
  case 'zoomInClick':
141
115
  var scrollTopVal = document.documentElement.scrollTop || document.body.scrollTop,
142
- url = window.location.href;
143
-
116
+ url = window.location.href;
144
117
  if (invokeType === 'browserView') {
145
118
  window.sendTo(_JSON$stringify({
146
119
  type: type,
@@ -162,16 +135,13 @@ var Frame = function Frame() {
162
135
  }
163
136
  }));
164
137
  }
165
-
166
138
  break;
167
-
168
139
  default:
169
140
  break;
170
141
  }
171
142
  } else if (type === 'response') {
172
143
  // 响应壳子的回调
173
144
  var pending = _this2.getPending(msgId);
174
-
175
145
  pending && pending.receiveResponse({
176
146
  data: data,
177
147
  code: code,
@@ -180,31 +150,25 @@ var Frame = function Frame() {
180
150
  code != -3 && _this2.deletePending(msgId);
181
151
  }
182
152
  };
183
-
184
153
  this.init = function () {
185
154
  var _a;
186
-
187
155
  if (_this2.invokeType === 'moduleFederation') {
188
156
  (_a = window.remoteReceiveFromHost) === null || _a === void 0 ? void 0 : _a.call(window, function (response) {
189
157
  _this2.handleCallback(response);
190
158
  }, _this2.moduleId);
191
159
  return;
192
160
  }
193
-
194
161
  window.addEventListener('message', function (msg) {
195
162
  log('electron res: ', msg);
196
-
197
163
  _this2.handleCallback(msg.data || {});
198
164
  });
199
165
  window.receiveBrowserViewData && window.receiveBrowserViewData(function (e, response) {
200
166
  return _this2.handleCallback(response);
201
167
  });
202
168
  };
203
-
204
169
  this.pendingMsgs = {};
205
170
  this.invokeType = window.remoteSendToHost && window.remoteReceiveFromHost && process ? 'moduleFederation' : '';
206
171
  this.moduleId = Math.random().toString(36).substring(2, 15);
207
- };
208
-
172
+ });
209
173
  var frame = new Frame();
210
174
  export default frame;