yach.open.jssdk 4.4.3-beta2 → 4.4.3-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.
- package/dist/yach_jssdk_4.4.3-beta3.js +1 -0
- package/es/api/app/custom/talYoungFilesUpload.d.ts +38 -0
- package/es/api/app/custom/talYoungFilesUpload.js +16 -0
- package/es/api/biz/chat/chooseConversationByCorpId.d.ts +36 -0
- package/es/api/biz/chat/chooseConversationByCorpId.js +8 -0
- package/es/api/biz/chat/openSingleChat.d.ts +10 -0
- package/es/api/biz/chat/openSingleChat.js +8 -0
- package/es/api/biz/chat/openSquad.d.ts +8 -0
- package/es/api/biz/chat/openSquad.js +8 -0
- package/es/api/biz/chat/openTeamChat.d.ts +10 -0
- package/es/api/biz/chat/openTeamChat.js +8 -0
- package/es/api/biz/chat/pickConversation.d.ts +19 -0
- package/es/api/biz/chat/pickConversation.js +19 -0
- package/es/api/biz/chat/sendP2PMsg.d.ts +10 -0
- package/es/api/biz/chat/sendP2PMsg.js +8 -0
- package/es/api/biz/contact/complexPicker.d.ts +62 -0
- package/es/api/biz/contact/complexPicker.js +8 -0
- package/es/api/biz/contact/departmentsPicker.d.ts +35 -0
- package/es/api/biz/contact/departmentsPicker.js +8 -0
- package/es/api/biz/group/groupComplexPicker.d.ts +33 -0
- package/es/api/biz/group/groupComplexPicker.js +8 -0
- package/es/api/biz/map/multipointView.d.ts +21 -0
- package/es/api/biz/map/multipointView.js +19 -0
- package/es/api/biz/map/view.d.ts +13 -0
- package/es/api/biz/map/view.js +19 -0
- package/es/api/biz/navigation/close.d.ts +8 -0
- package/es/api/biz/navigation/close.js +9 -0
- package/es/api/biz/navigation/goBack.d.ts +7 -0
- package/es/api/biz/navigation/goBack.js +19 -0
- package/es/api/biz/navigation/quit.d.ts +8 -0
- package/es/api/biz/navigation/quit.js +15 -0
- package/es/api/biz/navigation/replace.d.ts +8 -0
- package/es/api/biz/navigation/replace.js +8 -0
- package/es/api/biz/navigation/setIcon.d.ts +12 -0
- package/es/api/biz/navigation/setIcon.js +27 -0
- package/es/api/biz/navigation/setLeft.d.ts +9 -0
- package/es/api/biz/navigation/setLeft.js +31 -0
- package/es/api/biz/navigation/setMenu.d.ts +20 -0
- package/es/api/biz/navigation/setMenu.js +25 -0
- package/es/api/biz/navigation/setPanGestureEnable.d.ts +9 -0
- package/es/api/biz/navigation/setPanGestureEnable.js +26 -0
- package/es/api/biz/navigation/setRight.d.ts +13 -0
- package/es/api/biz/navigation/setRight.js +31 -0
- package/es/api/biz/navigation/setTitle.d.ts +11 -0
- package/es/api/biz/navigation/setTitle.js +8 -0
- package/es/api/biz/navigation/setTitleExpandIcon.d.ts +9 -0
- package/es/api/biz/navigation/setTitleExpandIcon.js +25 -0
- package/es/api/biz/navigation/setWindowBig.d.ts +9 -0
- package/es/api/biz/navigation/setWindowBig.js +16 -0
- package/es/api/biz/navigation/tencentMeeting.d.ts +23 -0
- package/es/api/biz/navigation/tencentMeeting.js +8 -0
- package/es/api/biz/navigation/tencentMeetingBegin.d.ts +7 -0
- package/es/api/biz/navigation/tencentMeetingBegin.js +8 -0
- package/es/api/biz/navigation/updateExpandTitle.d.ts +8 -0
- package/es/api/biz/navigation/updateExpandTitle.js +8 -0
- package/es/api/biz/telephone/call.d.ts +9 -0
- package/es/api/biz/telephone/call.js +19 -0
- package/es/api/biz/telephone/showCallMenu.d.ts +12 -0
- package/es/api/biz/telephone/showCallMenu.js +19 -0
- package/es/api/biz/util/addAppToNav.d.ts +9 -0
- package/es/api/biz/util/addAppToNav.js +23 -0
- package/es/api/biz/util/assistantCreate.d.ts +11 -0
- package/es/api/biz/util/assistantCreate.js +23 -0
- package/es/api/biz/util/authFinish.d.ts +11 -0
- package/es/api/biz/util/authFinish.js +19 -0
- package/es/api/biz/util/authStart.d.ts +9 -0
- package/es/api/biz/util/authStart.js +19 -0
- package/es/api/biz/util/chosen.d.ts +15 -0
- package/es/api/biz/util/chosen.js +19 -0
- package/es/api/biz/util/clipboardFileUpload.d.ts +7 -0
- package/es/api/biz/util/clipboardFileUpload.js +8 -0
- package/es/api/biz/util/closeWindow.d.ts +8 -0
- package/es/api/biz/util/closeWindow.js +15 -0
- package/es/api/biz/util/complain.d.ts +12 -0
- package/es/api/biz/util/complain.js +8 -0
- package/es/api/biz/util/copy.d.ts +11 -0
- package/es/api/biz/util/copy.js +19 -0
- package/es/api/biz/util/createModifySchedule.d.ts +26 -0
- package/es/api/biz/util/createModifySchedule.js +15 -0
- package/es/api/biz/util/datepicker.d.ts +14 -0
- package/es/api/biz/util/datepicker.js +19 -0
- package/es/api/biz/util/datetimepicker.d.ts +14 -0
- package/es/api/biz/util/datetimepicker.js +19 -0
- package/es/api/biz/util/disableScreenCapture.d.ts +8 -0
- package/es/api/biz/util/disableScreenCapture.js +19 -0
- package/es/api/biz/util/downloadFile.d.ts +9 -0
- package/es/api/biz/util/downloadFile.js +8 -0
- package/es/api/biz/util/entergroupCheck.d.ts +11 -0
- package/es/api/biz/util/entergroupCheck.js +23 -0
- package/es/api/biz/util/externalLinkPreviewFile.d.ts +11 -0
- package/es/api/biz/util/externalLinkPreviewFile.js +8 -0
- package/es/api/biz/util/feedback.d.ts +11 -0
- package/es/api/biz/util/feedback.js +8 -0
- package/es/api/biz/util/getSingleWebviewData.d.ts +8 -0
- package/es/api/biz/util/getSingleWebviewData.js +8 -0
- package/es/api/biz/util/getTogetherConfig.d.ts +11 -0
- package/es/api/biz/util/getTogetherConfig.js +23 -0
- package/es/api/biz/util/getToken.d.ts +11 -0
- package/es/api/biz/util/getToken.js +19 -0
- package/es/api/biz/util/injectScript.d.ts +9 -0
- package/es/api/biz/util/injectScript.js +8 -0
- package/es/api/biz/util/invoice.d.ts +12 -0
- package/es/api/biz/util/invoice.js +15 -0
- package/es/api/biz/util/knowledgeBaseSelect.d.ts +21 -0
- package/es/api/biz/util/knowledgeBaseSelect.js +15 -0
- package/es/api/biz/util/lorebaseRefreshNodeWebview.d.ts +11 -0
- package/es/api/biz/util/lorebaseRefreshNodeWebview.js +19 -0
- package/es/api/biz/util/lorebaseShowList.d.ts +11 -0
- package/es/api/biz/util/lorebaseShowList.js +19 -0
- package/es/api/biz/util/mediaFileUpload.d.ts +26 -0
- package/es/api/biz/util/mediaFileUpload.js +15 -0
- package/es/api/biz/util/onlineDocmentOpenTeamChat.d.ts +10 -0
- package/es/api/biz/util/onlineDocmentOpenTeamChat.js +23 -0
- package/es/api/biz/util/open.d.ts +9 -0
- package/es/api/biz/util/open.js +8 -0
- package/es/api/biz/util/openFutureGroup.d.ts +10 -0
- package/es/api/biz/util/openFutureGroup.js +23 -0
- package/es/api/biz/util/openLink.d.ts +8 -0
- package/es/api/biz/util/openLink.js +8 -0
- package/es/api/biz/util/openMediaFileDialog.d.ts +23 -0
- package/es/api/biz/util/openMediaFileDialog.js +15 -0
- package/es/api/biz/util/openPublish.d.ts +16 -0
- package/es/api/biz/util/openPublish.js +15 -0
- package/es/api/biz/util/openSingleWebview.d.ts +23 -0
- package/es/api/biz/util/openSingleWebview.js +15 -0
- package/es/api/biz/util/openSlidePanel.d.ts +11 -0
- package/es/api/biz/util/openSlidePanel.js +15 -0
- package/es/api/biz/util/openTalYoungToTopic.d.ts +6 -0
- package/es/api/biz/util/openTalYoungToTopic.js +15 -0
- package/es/api/biz/util/openTogetherEyeWebview.d.ts +11 -0
- package/es/api/biz/util/openTogetherEyeWebview.js +23 -0
- package/es/api/biz/util/openUserSchedule.d.ts +11 -0
- package/es/api/biz/util/openUserSchedule.js +23 -0
- package/es/api/biz/util/openVideoPlayer.d.ts +27 -0
- package/es/api/biz/util/openVideoPlayer.js +23 -0
- package/es/api/biz/util/previewFile.d.ts +11 -0
- package/es/api/biz/util/previewFile.js +8 -0
- package/es/api/biz/util/previewImage.d.ts +9 -0
- package/es/api/biz/util/previewImage.js +8 -0
- package/es/api/biz/util/proxy.d.ts +13 -0
- package/es/api/biz/util/proxy.js +8 -0
- package/es/api/biz/util/pushWorkMsg.d.ts +10 -0
- package/es/api/biz/util/pushWorkMsg.js +15 -0
- package/es/api/biz/util/remind.d.ts +15 -0
- package/es/api/biz/util/remind.js +23 -0
- package/es/api/biz/util/resetSessionUnread.d.ts +8 -0
- package/es/api/biz/util/resetSessionUnread.js +21 -0
- package/es/api/biz/util/rouseApp.d.ts +12 -0
- package/es/api/biz/util/rouseApp.js +15 -0
- package/es/api/biz/util/savePic.d.ts +8 -0
- package/es/api/biz/util/savePic.js +19 -0
- package/es/api/biz/util/scan.d.ts +11 -0
- package/es/api/biz/util/scan.js +19 -0
- package/es/api/biz/util/screen.d.ts +15 -0
- package/es/api/biz/util/screen.js +15 -0
- package/es/api/biz/util/selectDepartment.d.ts +9 -0
- package/es/api/biz/util/selectDepartment.js +8 -0
- package/es/api/biz/util/share.d.ts +12 -0
- package/es/api/biz/util/share.js +19 -0
- package/es/api/biz/util/takePicture.d.ts +13 -0
- package/es/api/biz/util/takePicture.js +8 -0
- package/es/api/biz/util/topicEvent.d.ts +13 -0
- package/es/api/biz/util/topicEvent.js +27 -0
- package/es/api/biz/util/uploadAttachment.d.ts +55 -0
- package/es/api/biz/util/uploadAttachment.js +8 -0
- package/es/api/biz/util/weeklyRead.d.ts +5 -0
- package/es/api/biz/util/weeklyRead.js +23 -0
- package/es/api/biz/util/yachEvent.d.ts +12 -0
- package/es/api/biz/util/yachEvent.js +27 -0
- package/es/api/biz/util/zfbAuth.d.ts +10 -0
- package/es/api/biz/util/zfbAuth.js +19 -0
- package/es/api/biz/webViewMessage/send.d.ts +7 -0
- package/es/api/biz/webViewMessage/send.js +15 -0
- package/es/api/common.typings.d.ts +9 -0
- package/es/api/common.typings.js +0 -0
- package/es/api/device/audio/download.d.ts +8 -0
- package/es/api/device/audio/download.js +19 -0
- package/es/api/device/audio/onPlayEnd.d.ts +7 -0
- package/es/api/device/audio/onPlayEnd.js +19 -0
- package/es/api/device/audio/onRecordEnd.d.ts +7 -0
- package/es/api/device/audio/onRecordEnd.js +19 -0
- package/es/api/device/audio/onRecordEnd_v2.d.ts +7 -0
- package/es/api/device/audio/onRecordEnd_v2.js +19 -0
- package/es/api/device/audio/pause.d.ts +8 -0
- package/es/api/device/audio/pause.js +19 -0
- package/es/api/device/audio/play.d.ts +8 -0
- package/es/api/device/audio/play.js +19 -0
- package/es/api/device/audio/resume.d.ts +8 -0
- package/es/api/device/audio/resume.js +19 -0
- package/es/api/device/audio/startRecord.d.ts +8 -0
- package/es/api/device/audio/startRecord.js +19 -0
- package/es/api/device/audio/startRecord_v2.d.ts +8 -0
- package/es/api/device/audio/startRecord_v2.js +19 -0
- package/es/api/device/audio/stop.d.ts +8 -0
- package/es/api/device/audio/stop.js +19 -0
- package/es/api/device/audio/stopRecord.d.ts +7 -0
- package/es/api/device/audio/stopRecord.js +19 -0
- package/es/api/device/audio/stopRecord_v2.d.ts +7 -0
- package/es/api/device/audio/stopRecord_v2.js +19 -0
- package/es/api/device/base/checkStepPermission.d.ts +8 -0
- package/es/api/device/base/checkStepPermission.js +19 -0
- package/es/api/device/base/getPhoneInfo.d.ts +16 -0
- package/es/api/device/base/getPhoneInfo.js +19 -0
- package/es/api/device/base/getUUID.d.ts +10 -0
- package/es/api/device/base/getUUID.js +23 -0
- package/es/api/device/connection/getNetworkType.d.ts +10 -0
- package/es/api/device/connection/getNetworkType.js +19 -0
- package/es/api/device/connection/isAtTal.d.ts +10 -0
- package/es/api/device/connection/isAtTal.js +21 -0
- package/es/api/device/geolocation/get.d.ts +42 -0
- package/es/api/device/geolocation/get.js +19 -0
- package/es/api/device/geolocation/getSwitch.d.ts +10 -0
- package/es/api/device/geolocation/getSwitch.js +15 -0
- package/es/api/device/notification/actionSheet.d.ts +15 -0
- package/es/api/device/notification/actionSheet.js +19 -0
- package/es/api/device/notification/alert.d.ts +13 -0
- package/es/api/device/notification/alert.js +23 -0
- package/es/api/device/notification/confirm.d.ts +16 -0
- package/es/api/device/notification/confirm.js +23 -0
- package/es/api/device/notification/hidePreloader.d.ts +12 -0
- package/es/api/device/notification/hidePreloader.js +32 -0
- package/es/api/device/notification/showPreloader.d.ts +18 -0
- package/es/api/device/notification/showPreloader.js +32 -0
- package/es/api/device/notification/toast.d.ts +15 -0
- package/es/api/device/notification/toast.js +8 -0
- package/es/api/device/notification/vibrate.d.ts +8 -0
- package/es/api/device/notification/vibrate.js +19 -0
- package/es/api/device/system/getLang.d.ts +10 -0
- package/es/api/device/system/getLang.js +8 -0
- package/es/api/device/system/setLight.d.ts +8 -0
- package/es/api/device/system/setLight.js +19 -0
- package/es/api/initAPI.d.ts +6 -0
- package/es/api/initAPI.js +22 -0
- package/es/api/primary/createTab.d.ts +13 -0
- package/es/api/primary/createTab.js +15 -0
- package/es/api/primary/exitFullScreen.d.ts +7 -0
- package/es/api/primary/exitFullScreen.js +15 -0
- package/es/api/primary/fullScreen.d.ts +7 -0
- package/es/api/primary/fullScreen.js +15 -0
- package/es/api/primary/weeklyShare.d.ts +13 -0
- package/es/api/primary/weeklyShare.js +15 -0
- package/es/api/runtime/permission/requestAuthCode.d.ts +12 -0
- package/es/api/runtime/permission/requestAuthCode.js +8 -0
- package/es/api/ui/pullToRefresh/disable.d.ts +7 -0
- package/es/api/ui/pullToRefresh/disable.js +19 -0
- package/es/api/ui/pullToRefresh/enable.d.ts +7 -0
- package/es/api/ui/pullToRefresh/enable.js +19 -0
- package/es/api/ui/pullToRefresh/stop.d.ts +7 -0
- package/es/api/ui/pullToRefresh/stop.js +19 -0
- package/es/api/ui/webViewBounce/disable.d.ts +7 -0
- package/es/api/ui/webViewBounce/disable.js +15 -0
- package/es/api/util/domainStorage/getItem.d.ts +12 -0
- package/es/api/util/domainStorage/getItem.js +19 -0
- package/es/api/util/domainStorage/removeItem.d.ts +9 -0
- package/es/api/util/domainStorage/removeItem.js +19 -0
- package/es/api/util/domainStorage/setItem.d.ts +11 -0
- package/es/api/util/domainStorage/setItem.js +19 -0
- package/es/api/util/tool/flushLog.d.ts +7 -0
- package/es/api/util/tool/flushLog.js +15 -0
- package/es/api/util/tool/log.d.ts +9 -0
- package/es/api/util/tool/log.js +15 -0
- package/es/index.d.ts +335 -0
- package/es/index.js +352 -0
- package/es/lib/bridge/index.d.ts +2 -0
- package/es/lib/bridge/index.js +2 -0
- package/es/lib/bridge/mobile.d.ts +13 -0
- package/es/lib/bridge/mobile.js +178 -0
- package/es/lib/bridge/pc.d.ts +4 -0
- package/es/lib/bridge/pc.js +86 -0
- package/es/lib/helper/apiHelper.d.ts +2 -0
- package/es/lib/helper/apiHelper.js +8 -0
- package/es/lib/helper/codeMap.d.ts +2 -0
- package/es/lib/helper/codeMap.js +6 -0
- package/es/lib/helper/event.d.ts +9 -0
- package/es/lib/helper/event.js +40 -0
- package/es/lib/helper/pcIframe.d.ts +44 -0
- package/es/lib/helper/pcIframe.js +150 -0
- package/es/lib/index.d.ts +4 -0
- package/es/lib/index.js +78 -0
- package/es/lib/sdk/index.d.ts +19 -0
- package/es/lib/sdk/index.js +169 -0
- package/es/lib/sdk/sdk.typings.d.ts +85 -0
- package/es/lib/sdk/sdk.typings.js +7 -0
- package/es/utils/bpitLog.d.ts +16 -0
- package/es/utils/bpitLog.js +62 -0
- package/es/utils/compareVersions.d.ts +58 -0
- package/es/utils/compareVersions.js +165 -0
- package/es/utils/console.d.ts +4 -0
- package/es/utils/console.js +44 -0
- package/es/utils/env.d.ts +3 -0
- package/es/utils/env.js +45 -0
- package/es/utils/index.d.ts +4 -0
- package/es/utils/index.js +20 -0
- package/libs/api/app/custom/talYoungFilesUpload.d.ts +38 -0
- package/libs/api/app/custom/talYoungFilesUpload.js +24 -0
- package/libs/api/biz/chat/chooseConversationByCorpId.d.ts +36 -0
- package/libs/api/biz/chat/chooseConversationByCorpId.js +15 -0
- package/libs/api/biz/chat/openSingleChat.d.ts +10 -0
- package/libs/api/biz/chat/openSingleChat.js +15 -0
- package/libs/api/biz/chat/openSquad.d.ts +8 -0
- package/libs/api/biz/chat/openSquad.js +15 -0
- package/libs/api/biz/chat/openTeamChat.d.ts +10 -0
- package/libs/api/biz/chat/openTeamChat.js +15 -0
- package/libs/api/biz/chat/pickConversation.d.ts +19 -0
- package/libs/api/biz/chat/pickConversation.js +26 -0
- package/libs/api/biz/chat/sendP2PMsg.d.ts +10 -0
- package/libs/api/biz/chat/sendP2PMsg.js +15 -0
- package/libs/api/biz/contact/complexPicker.d.ts +62 -0
- package/libs/api/biz/contact/complexPicker.js +15 -0
- package/libs/api/biz/contact/departmentsPicker.d.ts +35 -0
- package/libs/api/biz/contact/departmentsPicker.js +15 -0
- package/libs/api/biz/group/groupComplexPicker.d.ts +33 -0
- package/libs/api/biz/group/groupComplexPicker.js +15 -0
- package/libs/api/biz/map/multipointView.d.ts +21 -0
- package/libs/api/biz/map/multipointView.js +26 -0
- package/libs/api/biz/map/view.d.ts +13 -0
- package/libs/api/biz/map/view.js +26 -0
- package/libs/api/biz/navigation/close.d.ts +8 -0
- package/libs/api/biz/navigation/close.js +16 -0
- package/libs/api/biz/navigation/goBack.d.ts +7 -0
- package/libs/api/biz/navigation/goBack.js +26 -0
- package/libs/api/biz/navigation/quit.d.ts +8 -0
- package/libs/api/biz/navigation/quit.js +22 -0
- package/libs/api/biz/navigation/replace.d.ts +8 -0
- package/libs/api/biz/navigation/replace.js +15 -0
- package/libs/api/biz/navigation/setIcon.d.ts +12 -0
- package/libs/api/biz/navigation/setIcon.js +34 -0
- package/libs/api/biz/navigation/setLeft.d.ts +9 -0
- package/libs/api/biz/navigation/setLeft.js +38 -0
- package/libs/api/biz/navigation/setMenu.d.ts +20 -0
- package/libs/api/biz/navigation/setMenu.js +32 -0
- package/libs/api/biz/navigation/setPanGestureEnable.d.ts +9 -0
- package/libs/api/biz/navigation/setPanGestureEnable.js +33 -0
- package/libs/api/biz/navigation/setRight.d.ts +13 -0
- package/libs/api/biz/navigation/setRight.js +38 -0
- package/libs/api/biz/navigation/setTitle.d.ts +11 -0
- package/libs/api/biz/navigation/setTitle.js +15 -0
- package/libs/api/biz/navigation/setTitleExpandIcon.d.ts +9 -0
- package/libs/api/biz/navigation/setTitleExpandIcon.js +32 -0
- package/libs/api/biz/navigation/setWindowBig.d.ts +9 -0
- package/libs/api/biz/navigation/setWindowBig.js +24 -0
- package/libs/api/biz/navigation/tencentMeeting.d.ts +23 -0
- package/libs/api/biz/navigation/tencentMeeting.js +15 -0
- package/libs/api/biz/navigation/tencentMeetingBegin.d.ts +7 -0
- package/libs/api/biz/navigation/tencentMeetingBegin.js +15 -0
- package/libs/api/biz/navigation/updateExpandTitle.d.ts +8 -0
- package/libs/api/biz/navigation/updateExpandTitle.js +15 -0
- package/libs/api/biz/telephone/call.d.ts +9 -0
- package/libs/api/biz/telephone/call.js +26 -0
- package/libs/api/biz/telephone/showCallMenu.d.ts +12 -0
- package/libs/api/biz/telephone/showCallMenu.js +26 -0
- package/libs/api/biz/util/addAppToNav.d.ts +9 -0
- package/libs/api/biz/util/addAppToNav.js +30 -0
- package/libs/api/biz/util/assistantCreate.d.ts +11 -0
- package/libs/api/biz/util/assistantCreate.js +30 -0
- package/libs/api/biz/util/authFinish.d.ts +11 -0
- package/libs/api/biz/util/authFinish.js +26 -0
- package/libs/api/biz/util/authStart.d.ts +9 -0
- package/libs/api/biz/util/authStart.js +26 -0
- package/libs/api/biz/util/chosen.d.ts +15 -0
- package/libs/api/biz/util/chosen.js +26 -0
- package/libs/api/biz/util/clipboardFileUpload.d.ts +7 -0
- package/libs/api/biz/util/clipboardFileUpload.js +15 -0
- package/libs/api/biz/util/closeWindow.d.ts +8 -0
- package/libs/api/biz/util/closeWindow.js +22 -0
- package/libs/api/biz/util/complain.d.ts +12 -0
- package/libs/api/biz/util/complain.js +15 -0
- package/libs/api/biz/util/copy.d.ts +11 -0
- package/libs/api/biz/util/copy.js +26 -0
- package/libs/api/biz/util/createModifySchedule.d.ts +26 -0
- package/libs/api/biz/util/createModifySchedule.js +22 -0
- package/libs/api/biz/util/datepicker.d.ts +14 -0
- package/libs/api/biz/util/datepicker.js +26 -0
- package/libs/api/biz/util/datetimepicker.d.ts +14 -0
- package/libs/api/biz/util/datetimepicker.js +26 -0
- package/libs/api/biz/util/disableScreenCapture.d.ts +8 -0
- package/libs/api/biz/util/disableScreenCapture.js +26 -0
- package/libs/api/biz/util/downloadFile.d.ts +9 -0
- package/libs/api/biz/util/downloadFile.js +15 -0
- package/libs/api/biz/util/entergroupCheck.d.ts +11 -0
- package/libs/api/biz/util/entergroupCheck.js +30 -0
- package/libs/api/biz/util/externalLinkPreviewFile.d.ts +11 -0
- package/libs/api/biz/util/externalLinkPreviewFile.js +15 -0
- package/libs/api/biz/util/feedback.d.ts +11 -0
- package/libs/api/biz/util/feedback.js +15 -0
- package/libs/api/biz/util/getSingleWebviewData.d.ts +8 -0
- package/libs/api/biz/util/getSingleWebviewData.js +15 -0
- package/libs/api/biz/util/getTogetherConfig.d.ts +11 -0
- package/libs/api/biz/util/getTogetherConfig.js +30 -0
- package/libs/api/biz/util/getToken.d.ts +11 -0
- package/libs/api/biz/util/getToken.js +26 -0
- package/libs/api/biz/util/injectScript.d.ts +9 -0
- package/libs/api/biz/util/injectScript.js +15 -0
- package/libs/api/biz/util/invoice.d.ts +12 -0
- package/libs/api/biz/util/invoice.js +23 -0
- package/libs/api/biz/util/knowledgeBaseSelect.d.ts +21 -0
- package/libs/api/biz/util/knowledgeBaseSelect.js +22 -0
- package/libs/api/biz/util/lorebaseRefreshNodeWebview.d.ts +11 -0
- package/libs/api/biz/util/lorebaseRefreshNodeWebview.js +26 -0
- package/libs/api/biz/util/lorebaseShowList.d.ts +11 -0
- package/libs/api/biz/util/lorebaseShowList.js +26 -0
- package/libs/api/biz/util/mediaFileUpload.d.ts +26 -0
- package/libs/api/biz/util/mediaFileUpload.js +23 -0
- package/libs/api/biz/util/onlineDocmentOpenTeamChat.d.ts +10 -0
- package/libs/api/biz/util/onlineDocmentOpenTeamChat.js +30 -0
- package/libs/api/biz/util/open.d.ts +9 -0
- package/libs/api/biz/util/open.js +15 -0
- package/libs/api/biz/util/openFutureGroup.d.ts +10 -0
- package/libs/api/biz/util/openFutureGroup.js +30 -0
- package/libs/api/biz/util/openLink.d.ts +8 -0
- package/libs/api/biz/util/openLink.js +15 -0
- package/libs/api/biz/util/openMediaFileDialog.d.ts +23 -0
- package/libs/api/biz/util/openMediaFileDialog.js +23 -0
- package/libs/api/biz/util/openPublish.d.ts +16 -0
- package/libs/api/biz/util/openPublish.js +22 -0
- package/libs/api/biz/util/openSingleWebview.d.ts +23 -0
- package/libs/api/biz/util/openSingleWebview.js +22 -0
- package/libs/api/biz/util/openSlidePanel.d.ts +11 -0
- package/libs/api/biz/util/openSlidePanel.js +22 -0
- package/libs/api/biz/util/openTalYoungToTopic.d.ts +6 -0
- package/libs/api/biz/util/openTalYoungToTopic.js +23 -0
- package/libs/api/biz/util/openTogetherEyeWebview.d.ts +11 -0
- package/libs/api/biz/util/openTogetherEyeWebview.js +30 -0
- package/libs/api/biz/util/openUserSchedule.d.ts +11 -0
- package/libs/api/biz/util/openUserSchedule.js +30 -0
- package/libs/api/biz/util/openVideoPlayer.d.ts +27 -0
- package/libs/api/biz/util/openVideoPlayer.js +30 -0
- package/libs/api/biz/util/previewFile.d.ts +11 -0
- package/libs/api/biz/util/previewFile.js +15 -0
- package/libs/api/biz/util/previewImage.d.ts +9 -0
- package/libs/api/biz/util/previewImage.js +15 -0
- package/libs/api/biz/util/proxy.d.ts +13 -0
- package/libs/api/biz/util/proxy.js +15 -0
- package/libs/api/biz/util/pushWorkMsg.d.ts +10 -0
- package/libs/api/biz/util/pushWorkMsg.js +23 -0
- package/libs/api/biz/util/remind.d.ts +15 -0
- package/libs/api/biz/util/remind.js +30 -0
- package/libs/api/biz/util/resetSessionUnread.d.ts +8 -0
- package/libs/api/biz/util/resetSessionUnread.js +28 -0
- package/libs/api/biz/util/rouseApp.d.ts +12 -0
- package/libs/api/biz/util/rouseApp.js +23 -0
- package/libs/api/biz/util/savePic.d.ts +8 -0
- package/libs/api/biz/util/savePic.js +26 -0
- package/libs/api/biz/util/scan.d.ts +11 -0
- package/libs/api/biz/util/scan.js +26 -0
- package/libs/api/biz/util/screen.d.ts +15 -0
- package/libs/api/biz/util/screen.js +22 -0
- package/libs/api/biz/util/selectDepartment.d.ts +9 -0
- package/libs/api/biz/util/selectDepartment.js +15 -0
- package/libs/api/biz/util/share.d.ts +12 -0
- package/libs/api/biz/util/share.js +26 -0
- package/libs/api/biz/util/takePicture.d.ts +13 -0
- package/libs/api/biz/util/takePicture.js +15 -0
- package/libs/api/biz/util/topicEvent.d.ts +13 -0
- package/libs/api/biz/util/topicEvent.js +34 -0
- package/libs/api/biz/util/uploadAttachment.d.ts +55 -0
- package/libs/api/biz/util/uploadAttachment.js +15 -0
- package/libs/api/biz/util/weeklyRead.d.ts +5 -0
- package/libs/api/biz/util/weeklyRead.js +30 -0
- package/libs/api/biz/util/yachEvent.d.ts +12 -0
- package/libs/api/biz/util/yachEvent.js +34 -0
- package/libs/api/biz/util/zfbAuth.d.ts +10 -0
- package/libs/api/biz/util/zfbAuth.js +26 -0
- package/libs/api/biz/webViewMessage/send.d.ts +7 -0
- package/libs/api/biz/webViewMessage/send.js +22 -0
- package/libs/api/common.typings.d.ts +9 -0
- package/libs/api/common.typings.js +1 -0
- package/libs/api/device/audio/download.d.ts +8 -0
- package/libs/api/device/audio/download.js +26 -0
- package/libs/api/device/audio/onPlayEnd.d.ts +7 -0
- package/libs/api/device/audio/onPlayEnd.js +26 -0
- package/libs/api/device/audio/onRecordEnd.d.ts +7 -0
- package/libs/api/device/audio/onRecordEnd.js +26 -0
- package/libs/api/device/audio/onRecordEnd_v2.d.ts +7 -0
- package/libs/api/device/audio/onRecordEnd_v2.js +26 -0
- package/libs/api/device/audio/pause.d.ts +8 -0
- package/libs/api/device/audio/pause.js +26 -0
- package/libs/api/device/audio/play.d.ts +8 -0
- package/libs/api/device/audio/play.js +26 -0
- package/libs/api/device/audio/resume.d.ts +8 -0
- package/libs/api/device/audio/resume.js +26 -0
- package/libs/api/device/audio/startRecord.d.ts +8 -0
- package/libs/api/device/audio/startRecord.js +26 -0
- package/libs/api/device/audio/startRecord_v2.d.ts +8 -0
- package/libs/api/device/audio/startRecord_v2.js +26 -0
- package/libs/api/device/audio/stop.d.ts +8 -0
- package/libs/api/device/audio/stop.js +26 -0
- package/libs/api/device/audio/stopRecord.d.ts +7 -0
- package/libs/api/device/audio/stopRecord.js +26 -0
- package/libs/api/device/audio/stopRecord_v2.d.ts +7 -0
- package/libs/api/device/audio/stopRecord_v2.js +26 -0
- package/libs/api/device/base/checkStepPermission.d.ts +8 -0
- package/libs/api/device/base/checkStepPermission.js +26 -0
- package/libs/api/device/base/getPhoneInfo.d.ts +16 -0
- package/libs/api/device/base/getPhoneInfo.js +26 -0
- package/libs/api/device/base/getUUID.d.ts +10 -0
- package/libs/api/device/base/getUUID.js +30 -0
- package/libs/api/device/connection/getNetworkType.d.ts +10 -0
- package/libs/api/device/connection/getNetworkType.js +26 -0
- package/libs/api/device/connection/isAtTal.d.ts +10 -0
- package/libs/api/device/connection/isAtTal.js +28 -0
- package/libs/api/device/geolocation/get.d.ts +42 -0
- package/libs/api/device/geolocation/get.js +26 -0
- package/libs/api/device/geolocation/getSwitch.d.ts +10 -0
- package/libs/api/device/geolocation/getSwitch.js +22 -0
- package/libs/api/device/notification/actionSheet.d.ts +15 -0
- package/libs/api/device/notification/actionSheet.js +26 -0
- package/libs/api/device/notification/alert.d.ts +13 -0
- package/libs/api/device/notification/alert.js +30 -0
- package/libs/api/device/notification/confirm.d.ts +16 -0
- package/libs/api/device/notification/confirm.js +30 -0
- package/libs/api/device/notification/hidePreloader.d.ts +12 -0
- package/libs/api/device/notification/hidePreloader.js +40 -0
- package/libs/api/device/notification/showPreloader.d.ts +18 -0
- package/libs/api/device/notification/showPreloader.js +40 -0
- package/libs/api/device/notification/toast.d.ts +15 -0
- package/libs/api/device/notification/toast.js +15 -0
- package/libs/api/device/notification/vibrate.d.ts +8 -0
- package/libs/api/device/notification/vibrate.js +26 -0
- package/libs/api/device/system/getLang.d.ts +10 -0
- package/libs/api/device/system/getLang.js +15 -0
- package/libs/api/device/system/setLight.d.ts +8 -0
- package/libs/api/device/system/setLight.js +26 -0
- package/libs/api/initAPI.d.ts +6 -0
- package/libs/api/initAPI.js +29 -0
- package/libs/api/primary/createTab.d.ts +13 -0
- package/libs/api/primary/createTab.js +22 -0
- package/libs/api/primary/exitFullScreen.d.ts +7 -0
- package/libs/api/primary/exitFullScreen.js +22 -0
- package/libs/api/primary/fullScreen.d.ts +7 -0
- package/libs/api/primary/fullScreen.js +22 -0
- package/libs/api/primary/weeklyShare.d.ts +13 -0
- package/libs/api/primary/weeklyShare.js +22 -0
- package/libs/api/runtime/permission/requestAuthCode.d.ts +12 -0
- package/libs/api/runtime/permission/requestAuthCode.js +15 -0
- package/libs/api/ui/pullToRefresh/disable.d.ts +7 -0
- package/libs/api/ui/pullToRefresh/disable.js +26 -0
- package/libs/api/ui/pullToRefresh/enable.d.ts +7 -0
- package/libs/api/ui/pullToRefresh/enable.js +26 -0
- package/libs/api/ui/pullToRefresh/stop.d.ts +7 -0
- package/libs/api/ui/pullToRefresh/stop.js +26 -0
- package/libs/api/ui/webViewBounce/disable.d.ts +7 -0
- package/libs/api/ui/webViewBounce/disable.js +22 -0
- package/libs/api/util/domainStorage/getItem.d.ts +12 -0
- package/libs/api/util/domainStorage/getItem.js +26 -0
- package/libs/api/util/domainStorage/removeItem.d.ts +9 -0
- package/libs/api/util/domainStorage/removeItem.js +26 -0
- package/libs/api/util/domainStorage/setItem.d.ts +11 -0
- package/libs/api/util/domainStorage/setItem.js +26 -0
- package/libs/api/util/tool/flushLog.d.ts +7 -0
- package/libs/api/util/tool/flushLog.js +22 -0
- package/libs/api/util/tool/log.d.ts +9 -0
- package/libs/api/util/tool/log.js +22 -0
- package/libs/index.d.ts +335 -0
- package/libs/index.js +1158 -0
- package/libs/lib/bridge/index.d.ts +2 -0
- package/libs/lib/bridge/index.js +32 -0
- package/libs/lib/bridge/mobile.d.ts +13 -0
- package/libs/lib/bridge/mobile.js +185 -0
- package/libs/lib/bridge/pc.d.ts +4 -0
- package/libs/lib/bridge/pc.js +93 -0
- package/libs/lib/helper/apiHelper.d.ts +2 -0
- package/libs/lib/helper/apiHelper.js +15 -0
- package/libs/lib/helper/codeMap.d.ts +2 -0
- package/libs/lib/helper/codeMap.js +13 -0
- package/libs/lib/helper/event.d.ts +9 -0
- package/libs/lib/helper/event.js +48 -0
- package/libs/lib/helper/pcIframe.d.ts +44 -0
- package/libs/lib/helper/pcIframe.js +158 -0
- package/libs/lib/index.d.ts +4 -0
- package/libs/lib/index.js +86 -0
- package/libs/lib/sdk/index.d.ts +19 -0
- package/libs/lib/sdk/index.js +177 -0
- package/libs/lib/sdk/sdk.typings.d.ts +85 -0
- package/libs/lib/sdk/sdk.typings.js +14 -0
- package/libs/utils/bpitLog.d.ts +16 -0
- package/libs/utils/bpitLog.js +69 -0
- package/libs/utils/compareVersions.d.ts +58 -0
- package/libs/utils/compareVersions.js +173 -0
- package/libs/utils/console.d.ts +4 -0
- package/libs/utils/console.js +53 -0
- package/libs/utils/env.d.ts +3 -0
- package/libs/utils/env.js +51 -0
- package/libs/utils/index.d.ts +4 -0
- package/libs/utils/index.js +51 -0
- package/package.json +1 -1
package/es/index.js
ADDED
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
import { yachSdk } from './lib';
|
|
2
|
+
/*biz*****************************/
|
|
3
|
+
/**util*/
|
|
4
|
+
import { openLink } from './api/biz/util/openLink';
|
|
5
|
+
import { feedback } from './api/biz/util/feedback';
|
|
6
|
+
import { open } from './api/biz/util/open';
|
|
7
|
+
import { openSlidePanel } from './api/biz/util/openSlidePanel';
|
|
8
|
+
import { share } from './api/biz/util/share';
|
|
9
|
+
import { previewFile } from './api/biz/util/previewFile';
|
|
10
|
+
import { previewImage } from './api/biz/util/previewImage';
|
|
11
|
+
import { downloadFile } from './api/biz/util/downloadFile';
|
|
12
|
+
import { uploadAttachment } from './api/biz/util/uploadAttachment';
|
|
13
|
+
import { clipboardFileUpload } from './api/biz/util/clipboardFileUpload';
|
|
14
|
+
import { proxy } from './api/biz/util/proxy';
|
|
15
|
+
import { datepicker } from './api/biz/util/datepicker';
|
|
16
|
+
import { datetimepicker } from './api/biz/util/datetimepicker';
|
|
17
|
+
import { scan } from './api/biz/util/scan';
|
|
18
|
+
import { view as mapView } from './api/biz/map/view';
|
|
19
|
+
import { multipointView } from './api/biz/map/multipointView';
|
|
20
|
+
import { chosen } from './api/biz/util/chosen';
|
|
21
|
+
import { openSingleWebview } from './api/biz/util/openSingleWebview';
|
|
22
|
+
import { getSingleWebviewData } from './api/biz/util/getSingleWebviewData';
|
|
23
|
+
import { injectScript } from './api/biz/util/injectScript';
|
|
24
|
+
import { closeWindow } from './api/biz/util/closeWindow';
|
|
25
|
+
import { remind } from './api/biz/util/remind';
|
|
26
|
+
import { takePicture } from './api/biz/util/takePicture';
|
|
27
|
+
import { openVideoPlayer } from './api/biz/util/openVideoPlayer';
|
|
28
|
+
import { openMediaFileDialog } from './api/biz/util/openMediaFileDialog';
|
|
29
|
+
import { mediaFileUpload } from './api/biz/util/mediaFileUpload';
|
|
30
|
+
import { invoice } from './api/biz/util/invoice';
|
|
31
|
+
import { pushWorkMsg } from './api/biz/util/pushWorkMsg';
|
|
32
|
+
import { openTalYoungToTopic } from './api/biz/util/openTalYoungToTopic';
|
|
33
|
+
import { getToken } from './api/biz/util/getToken';
|
|
34
|
+
import { authStart } from './api/biz/util/authStart';
|
|
35
|
+
import { authFinish } from './api/biz/util/authFinish';
|
|
36
|
+
import { assistantCreate } from './api/biz/util/assistantCreate';
|
|
37
|
+
import { yachEvent } from './api/biz/util/yachEvent';
|
|
38
|
+
import { topicEvent } from './api/biz/util/topicEvent';
|
|
39
|
+
import { openTogetherEyeWebview } from './api/biz/util/openTogetherEyeWebview';
|
|
40
|
+
import { getTogetherConfig } from './api/biz/util/getTogetherConfig';
|
|
41
|
+
import { rouseApp } from './api/biz/util/rouseApp';
|
|
42
|
+
import { externalLinkPreviewFile } from './api/biz/util/externalLinkPreviewFile';
|
|
43
|
+
import { zfbAuth } from './api/biz/util/zfbAuth';
|
|
44
|
+
import { savePic } from './api/biz/util/savePic';
|
|
45
|
+
import { complain } from './api/biz/util/complain';
|
|
46
|
+
import { selectDepartment } from './api/biz/util/selectDepartment';
|
|
47
|
+
import { createModifySchedule } from './api/biz/util/createModifySchedule';
|
|
48
|
+
import { openUserSchedule } from './api/biz/util/openUserSchedule';
|
|
49
|
+
import { onlineDocmentOpenTeamChat } from './api/biz/util/onlineDocmentOpenTeamChat';
|
|
50
|
+
import { entergroupCheck } from './api/biz/util/entergroupCheck';
|
|
51
|
+
import { resetSessionUnread } from './api/biz/util/resetSessionUnread';
|
|
52
|
+
import { weeklyRead } from './api/biz/util/weeklyRead';
|
|
53
|
+
import { disableScreenCapture } from './api/biz/util/disableScreenCapture';
|
|
54
|
+
import { openFutureGroup } from './api/biz/util/openFutureGroup';
|
|
55
|
+
import { knowledgeBaseSelect } from './api/biz/util/knowledgeBaseSelect';
|
|
56
|
+
import { lorebaseShowList } from './api/biz/util/lorebaseShowList';
|
|
57
|
+
import { lorebaseRefreshNodeWebview } from './api/biz/util/lorebaseRefreshNodeWebview';
|
|
58
|
+
import { copy } from './api/biz/util/copy';
|
|
59
|
+
import { openPublish } from './api/biz/util/openPublish';
|
|
60
|
+
/**navigation*/
|
|
61
|
+
import { setIcon } from './api/biz/navigation/setIcon';
|
|
62
|
+
import { setTitle } from './api/biz/navigation/setTitle';
|
|
63
|
+
import { setMenu } from './api/biz/navigation/setMenu';
|
|
64
|
+
import { close } from './api/biz/navigation/close';
|
|
65
|
+
import { replace as replacePage } from './api/biz/navigation/replace';
|
|
66
|
+
import { quit } from './api/biz/navigation/quit';
|
|
67
|
+
import { setRight } from './api/biz/navigation/setRight';
|
|
68
|
+
import { setTitleExpandIcon } from './api/biz/navigation/setTitleExpandIcon';
|
|
69
|
+
import { updateExpandTitle } from './api/biz/navigation/updateExpandTitle';
|
|
70
|
+
import { setLeft } from './api/biz/navigation/setLeft';
|
|
71
|
+
import { goBack } from './api/biz/navigation/goBack';
|
|
72
|
+
import { setWindowBig } from './api/biz/navigation/setWindowBig';
|
|
73
|
+
import { tencentMeeting } from './api/biz/navigation/tencentMeeting';
|
|
74
|
+
import { tencentMeetingBegin } from './api/biz/navigation/tencentMeetingBegin';
|
|
75
|
+
import { setPanGestureEnable } from './api/biz/navigation/setPanGestureEnable';
|
|
76
|
+
/**contact*/
|
|
77
|
+
import { complexPicker } from './api/biz/contact/complexPicker';
|
|
78
|
+
import { departmentsPicker } from './api/biz/contact/departmentsPicker';
|
|
79
|
+
/** group*/
|
|
80
|
+
import { groupComplexPicker } from './api/biz/group/groupComplexPicker';
|
|
81
|
+
/** chat*/
|
|
82
|
+
import { chooseConversationByCorpId } from './api/biz/chat/chooseConversationByCorpId';
|
|
83
|
+
import { pickConversation } from './api/biz/chat/pickConversation';
|
|
84
|
+
import { openSingleChat } from './api/biz/chat/openSingleChat';
|
|
85
|
+
import { openTeamChat } from './api/biz/chat/openTeamChat';
|
|
86
|
+
import { openSquad } from './api/biz/chat/openSquad';
|
|
87
|
+
import { sendP2PMsg } from './api/biz/chat/sendP2PMsg';
|
|
88
|
+
/* primary*****************************/
|
|
89
|
+
import { createTab } from './api/primary/createTab';
|
|
90
|
+
import { weeklyShare } from './api/primary/weeklyShare';
|
|
91
|
+
import { fullScreen } from './api/primary/fullScreen';
|
|
92
|
+
import { exitFullScreen } from './api/primary/exitFullScreen';
|
|
93
|
+
/* runtime*****************************/
|
|
94
|
+
import { requestAuthCode } from './api/runtime/permission/requestAuthCode';
|
|
95
|
+
/** device */
|
|
96
|
+
import { showPreloader, showCustomOverlayContent } from './api/device/notification/showPreloader';
|
|
97
|
+
import { hidePreloader, hideCustomOverlayContent } from './api/device/notification/hidePreloader';
|
|
98
|
+
import { vibrate } from './api/device/notification/vibrate';
|
|
99
|
+
import { toast } from './api/device/notification/toast';
|
|
100
|
+
import { actionSheet } from './api/device/notification/actionSheet';
|
|
101
|
+
import { getPhoneInfo } from './api/device/base/getPhoneInfo';
|
|
102
|
+
import { alert } from './api/device/notification/alert';
|
|
103
|
+
import { confirm } from './api/device/notification/confirm';
|
|
104
|
+
import { get as getGeolocation } from './api/device/geolocation/get';
|
|
105
|
+
import { getSwitch as getGeolocationSwitch } from './api/device/geolocation/getSwitch';
|
|
106
|
+
import { getLang } from './api/device/system/getLang';
|
|
107
|
+
import { startRecord } from './api/device/audio/startRecord';
|
|
108
|
+
import { stopRecord } from './api/device/audio/stopRecord';
|
|
109
|
+
import { onRecordEnd } from './api/device/audio/onRecordEnd';
|
|
110
|
+
import { download as downloadAudio } from './api/device/audio/download';
|
|
111
|
+
import { play as playAudio } from './api/device/audio/play';
|
|
112
|
+
import { pause as pauseAudio } from './api/device/audio/pause';
|
|
113
|
+
import { stop as stopAudio } from './api/device/audio/stop';
|
|
114
|
+
import { onPlayEnd } from './api/device/audio/onPlayEnd';
|
|
115
|
+
import { resume as resumeAudio } from './api/device/audio/resume';
|
|
116
|
+
import { getNetworkType } from './api/device/connection/getNetworkType';
|
|
117
|
+
import { isAtTal } from './api/device/connection/isAtTal';
|
|
118
|
+
import { getUUID } from './api/device/base/getUUID';
|
|
119
|
+
import { checkStepPermission } from './api/device/base/checkStepPermission';
|
|
120
|
+
import { onRecordEnd_v2 } from './api/device/audio/onRecordEnd_v2';
|
|
121
|
+
import { startRecord_v2 } from './api/device/audio/startRecord_v2';
|
|
122
|
+
import { stopRecord_v2 } from './api/device/audio/stopRecord_v2';
|
|
123
|
+
import { setLight } from './api/device/system/setLight';
|
|
124
|
+
/** telephone */
|
|
125
|
+
import { showCallMenu } from './api/biz/telephone/showCallMenu';
|
|
126
|
+
import { call } from './api/biz/telephone/call';
|
|
127
|
+
/** ui */
|
|
128
|
+
import { disable as webViewBounceDisable } from './api/ui/webViewBounce/disable';
|
|
129
|
+
import { enable as pullToRefreshEnable } from './api/ui/pullToRefresh/enable';
|
|
130
|
+
import { stop as pullToRefreshStop } from './api/ui/pullToRefresh/stop';
|
|
131
|
+
import { disable as pullToRefreshDisable } from './api/ui/pullToRefresh/disable';
|
|
132
|
+
// demainStorage
|
|
133
|
+
import { getItem } from './api/util/domainStorage/getItem';
|
|
134
|
+
import { setItem } from './api/util/domainStorage/setItem';
|
|
135
|
+
import { removeItem } from './api/util/domainStorage/removeItem';
|
|
136
|
+
// log
|
|
137
|
+
import { writeLog } from './api/util/tool/log';
|
|
138
|
+
import { flushLog } from './api/util/tool/flushLog';
|
|
139
|
+
// screen
|
|
140
|
+
import { capturePage } from './api/biz/util/screen';
|
|
141
|
+
import { send as webViewMessageSend } from './api/biz/webViewMessage/send';
|
|
142
|
+
import { talYoungFilesUpload } from './api/app/custom/talYoungFilesUpload';
|
|
143
|
+
import { addAppToNav } from './api/biz/util/addAppToNav';
|
|
144
|
+
console.log('add rouseApp ------------>', rouseApp);
|
|
145
|
+
var _yachSdk$exportSdk = yachSdk.exportSdk,
|
|
146
|
+
version = _yachSdk$exportSdk.version,
|
|
147
|
+
sdkVersion = _yachSdk$exportSdk.sdkVersion,
|
|
148
|
+
env = _yachSdk$exportSdk.env,
|
|
149
|
+
platform = _yachSdk$exportSdk.platform,
|
|
150
|
+
platformV2 = _yachSdk$exportSdk.platformV2,
|
|
151
|
+
config = _yachSdk$exportSdk.config,
|
|
152
|
+
ready = _yachSdk$exportSdk.ready,
|
|
153
|
+
error = _yachSdk$exportSdk.error,
|
|
154
|
+
on = _yachSdk$exportSdk.on,
|
|
155
|
+
off = _yachSdk$exportSdk.off;
|
|
156
|
+
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, lorebaseShowList, lorebaseRefreshNodeWebview, openPublish, setLight, openUserSchedule, disableScreenCapture, setPanGestureEnable, addAppToNav, copy, capturePage };
|
|
157
|
+
export default {
|
|
158
|
+
version: version,
|
|
159
|
+
sdkVersion: sdkVersion,
|
|
160
|
+
env: env,
|
|
161
|
+
platform: platform,
|
|
162
|
+
platformV2: platformV2,
|
|
163
|
+
config: config,
|
|
164
|
+
ready: ready,
|
|
165
|
+
error: error,
|
|
166
|
+
on: on,
|
|
167
|
+
off: off,
|
|
168
|
+
biz: {
|
|
169
|
+
util: {
|
|
170
|
+
openLink: openLink,
|
|
171
|
+
feedback: feedback,
|
|
172
|
+
open: open,
|
|
173
|
+
openSlidePanel: openSlidePanel,
|
|
174
|
+
share: share,
|
|
175
|
+
previewFile: previewFile,
|
|
176
|
+
previewImage: previewImage,
|
|
177
|
+
downloadFile: downloadFile,
|
|
178
|
+
uploadAttachment: uploadAttachment,
|
|
179
|
+
clipboardFileUpload: clipboardFileUpload,
|
|
180
|
+
proxy: proxy,
|
|
181
|
+
datepicker: datepicker,
|
|
182
|
+
datetimepicker: datetimepicker,
|
|
183
|
+
scan: scan,
|
|
184
|
+
chosen: chosen,
|
|
185
|
+
openSingleWebview: openSingleWebview,
|
|
186
|
+
getSingleWebviewData: getSingleWebviewData,
|
|
187
|
+
injectScript: injectScript,
|
|
188
|
+
onlineDocmentOpenTeamChat: onlineDocmentOpenTeamChat,
|
|
189
|
+
entergroupCheck: entergroupCheck,
|
|
190
|
+
resetSessionUnread: resetSessionUnread,
|
|
191
|
+
weeklyRead: weeklyRead,
|
|
192
|
+
openFutureGroup: openFutureGroup,
|
|
193
|
+
closeWindow: closeWindow,
|
|
194
|
+
remind: remind,
|
|
195
|
+
takePicture: takePicture,
|
|
196
|
+
openVideoPlayer: openVideoPlayer,
|
|
197
|
+
openMediaFileDialog: openMediaFileDialog,
|
|
198
|
+
mediaFileUpload: mediaFileUpload,
|
|
199
|
+
invoice: invoice,
|
|
200
|
+
pushWorkMsg: pushWorkMsg,
|
|
201
|
+
openTalYoungToTopic: openTalYoungToTopic,
|
|
202
|
+
getToken: getToken,
|
|
203
|
+
authStart: authStart,
|
|
204
|
+
authFinish: authFinish,
|
|
205
|
+
assistantCreate: assistantCreate,
|
|
206
|
+
yachEvent: yachEvent,
|
|
207
|
+
topicEvent: topicEvent,
|
|
208
|
+
openTogetherEyeWebview: openTogetherEyeWebview,
|
|
209
|
+
getTogetherConfig: getTogetherConfig,
|
|
210
|
+
rouseApp: rouseApp,
|
|
211
|
+
externalLinkPreviewFile: externalLinkPreviewFile,
|
|
212
|
+
savePic: savePic,
|
|
213
|
+
zfbAuth: zfbAuth,
|
|
214
|
+
complain: complain,
|
|
215
|
+
selectDepartment: selectDepartment,
|
|
216
|
+
createModifySchedule: createModifySchedule,
|
|
217
|
+
openUserSchedule: openUserSchedule,
|
|
218
|
+
disableScreenCapture: disableScreenCapture,
|
|
219
|
+
addAppToNav: addAppToNav,
|
|
220
|
+
knowledgeBaseSelect: knowledgeBaseSelect,
|
|
221
|
+
lorebaseShowList: lorebaseShowList,
|
|
222
|
+
lorebaseRefreshNodeWebview: lorebaseRefreshNodeWebview,
|
|
223
|
+
copy: copy,
|
|
224
|
+
openPublish: openPublish,
|
|
225
|
+
capturePage: capturePage
|
|
226
|
+
},
|
|
227
|
+
telephone: {
|
|
228
|
+
showCallMenu: showCallMenu,
|
|
229
|
+
call: call
|
|
230
|
+
},
|
|
231
|
+
navigation: {
|
|
232
|
+
setIcon: setIcon,
|
|
233
|
+
setTitle: setTitle,
|
|
234
|
+
setMenu: setMenu,
|
|
235
|
+
close: close,
|
|
236
|
+
replace: replacePage,
|
|
237
|
+
quit: quit,
|
|
238
|
+
setRight: setRight,
|
|
239
|
+
setTitleExpandIcon: setTitleExpandIcon,
|
|
240
|
+
updateExpandTitle: updateExpandTitle,
|
|
241
|
+
setLeft: setLeft,
|
|
242
|
+
goBack: goBack,
|
|
243
|
+
setWindowBig: setWindowBig,
|
|
244
|
+
tencentMeeting: tencentMeeting,
|
|
245
|
+
tencentMeetingBegin: tencentMeetingBegin,
|
|
246
|
+
setPanGestureEnable: setPanGestureEnable
|
|
247
|
+
},
|
|
248
|
+
contact: {
|
|
249
|
+
complexPicker: complexPicker,
|
|
250
|
+
departmentsPicker: departmentsPicker
|
|
251
|
+
},
|
|
252
|
+
group: {
|
|
253
|
+
groupComplexPicker: groupComplexPicker
|
|
254
|
+
},
|
|
255
|
+
chat: {
|
|
256
|
+
chooseConversationByCorpId: chooseConversationByCorpId,
|
|
257
|
+
pickConversation: pickConversation,
|
|
258
|
+
openSingleChat: openSingleChat,
|
|
259
|
+
openTeamChat: openTeamChat,
|
|
260
|
+
openSquad: openSquad,
|
|
261
|
+
sendP2PMsg: sendP2PMsg
|
|
262
|
+
},
|
|
263
|
+
map: {
|
|
264
|
+
view: mapView,
|
|
265
|
+
multipointView: multipointView
|
|
266
|
+
},
|
|
267
|
+
webViewMessage: {
|
|
268
|
+
send: webViewMessageSend
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
runtime: {
|
|
272
|
+
permission: {
|
|
273
|
+
requestAuthCode: requestAuthCode
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
primary: {
|
|
277
|
+
createTab: createTab,
|
|
278
|
+
weeklyShare: weeklyShare,
|
|
279
|
+
fullScreen: fullScreen,
|
|
280
|
+
exitFullScreen: exitFullScreen
|
|
281
|
+
},
|
|
282
|
+
device: {
|
|
283
|
+
notification: {
|
|
284
|
+
showPreloader: showPreloader,
|
|
285
|
+
showCustomOverlayContent: showCustomOverlayContent,
|
|
286
|
+
hidePreloader: hidePreloader,
|
|
287
|
+
hideCustomOverlayContent: hideCustomOverlayContent,
|
|
288
|
+
vibrate: vibrate,
|
|
289
|
+
toast: toast,
|
|
290
|
+
alert: alert,
|
|
291
|
+
confirm: confirm,
|
|
292
|
+
actionSheet: actionSheet
|
|
293
|
+
},
|
|
294
|
+
base: {
|
|
295
|
+
getPhoneInfo: getPhoneInfo,
|
|
296
|
+
getUUID: getUUID,
|
|
297
|
+
checkStepPermission: checkStepPermission
|
|
298
|
+
},
|
|
299
|
+
geolocation: {
|
|
300
|
+
get: getGeolocation,
|
|
301
|
+
getSwitch: getGeolocationSwitch
|
|
302
|
+
},
|
|
303
|
+
system: {
|
|
304
|
+
getLang: getLang,
|
|
305
|
+
setLight: setLight
|
|
306
|
+
},
|
|
307
|
+
audio: {
|
|
308
|
+
startRecord: startRecord,
|
|
309
|
+
stopRecord: stopRecord,
|
|
310
|
+
onRecordEnd: onRecordEnd,
|
|
311
|
+
download: downloadAudio,
|
|
312
|
+
play: playAudio,
|
|
313
|
+
pause: pauseAudio,
|
|
314
|
+
stop: stopAudio,
|
|
315
|
+
onPlayEnd: onPlayEnd,
|
|
316
|
+
resume: resumeAudio,
|
|
317
|
+
onRecordEnd_v2: onRecordEnd_v2,
|
|
318
|
+
startRecord_v2: startRecord_v2,
|
|
319
|
+
stopRecord_v2: stopRecord_v2
|
|
320
|
+
},
|
|
321
|
+
connection: {
|
|
322
|
+
getNetworkType: getNetworkType,
|
|
323
|
+
isAtTal: isAtTal
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
ui: {
|
|
327
|
+
webViewBounce: {
|
|
328
|
+
disable: webViewBounceDisable
|
|
329
|
+
},
|
|
330
|
+
pullToRefresh: {
|
|
331
|
+
enable: pullToRefreshEnable,
|
|
332
|
+
stop: pullToRefreshStop,
|
|
333
|
+
disable: pullToRefreshDisable
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
util: {
|
|
337
|
+
domainStorage: {
|
|
338
|
+
getItem: getItem,
|
|
339
|
+
setItem: setItem,
|
|
340
|
+
removeItem: removeItem
|
|
341
|
+
},
|
|
342
|
+
tool: {
|
|
343
|
+
writeLog: writeLog,
|
|
344
|
+
flushLog: flushLog
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
app: {
|
|
348
|
+
custom: {
|
|
349
|
+
talYoungFilesUpload: talYoungFilesUpload
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IJSBridge } from '../sdk/sdk.typings';
|
|
2
|
+
declare global {
|
|
3
|
+
const WebViewJavascriptBridge: any;
|
|
4
|
+
const WKWebViewJavascriptBridge: any;
|
|
5
|
+
interface Window {
|
|
6
|
+
WebViewJavascriptBridge: any;
|
|
7
|
+
WKWebViewJavascriptBridge: any;
|
|
8
|
+
WVJBCallbacks: any;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
declare const mobileBridgeInit: () => Promise<unknown>;
|
|
12
|
+
declare const mobileBridge: IJSBridge;
|
|
13
|
+
export { mobileBridge, mobileBridgeInit };
|
|
@@ -0,0 +1,178 @@
|
|
|
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
|
+
import Event from '../helper/event';
|
|
7
|
+
import { electronResCodeMap } from '../helper/codeMap';
|
|
8
|
+
import { log, bpitLog } from '../../utils';
|
|
9
|
+
function setupWebViewJavascriptBridge(callback) {
|
|
10
|
+
if (window.WebViewJavascriptBridge) {
|
|
11
|
+
return callback(WebViewJavascriptBridge);
|
|
12
|
+
}
|
|
13
|
+
if (window.WKWebViewJavascriptBridge) {
|
|
14
|
+
return callback(WKWebViewJavascriptBridge);
|
|
15
|
+
}
|
|
16
|
+
if (window.WVJBCallbacks) {
|
|
17
|
+
return window.WVJBCallbacks.push(callback);
|
|
18
|
+
}
|
|
19
|
+
window.WVJBCallbacks = [callback];
|
|
20
|
+
var WVJBIframe = document.createElement('iframe');
|
|
21
|
+
WVJBIframe.style.display = 'none';
|
|
22
|
+
WVJBIframe.src = 'https://__bridge_loaded__';
|
|
23
|
+
document.documentElement.appendChild(WVJBIframe);
|
|
24
|
+
_setTimeout(function () {
|
|
25
|
+
document.documentElement.removeChild(WVJBIframe);
|
|
26
|
+
}, 0);
|
|
27
|
+
}
|
|
28
|
+
var mobileBridgeInit = function mobileBridgeInit() {
|
|
29
|
+
return new _Promise(function (resolve, reject) {
|
|
30
|
+
setupWebViewJavascriptBridge(function (bridge) {
|
|
31
|
+
log("\u6CE8\u518Cresume\u4E8B\u4EF6 ");
|
|
32
|
+
bridge.registerHandler('resume', function (resData) {
|
|
33
|
+
log("resume\u76D1\u542C\u5230\u56DE\u8C03\uFF0C\u76F8\u5173\u53C2\u6570 ", {
|
|
34
|
+
resData: resData
|
|
35
|
+
});
|
|
36
|
+
Event.execEvent('resume', resData);
|
|
37
|
+
});
|
|
38
|
+
log("\u6CE8\u518CunreadMsgAction\u4E8B\u4EF6 ");
|
|
39
|
+
bridge.registerHandler('unreadMsgAction', function (resData) {
|
|
40
|
+
log("unreadMsgAction\u76D1\u542C\u5230\u56DE\u8C03\uFF0C\u76F8\u5173\u53C2\u6570 ", {
|
|
41
|
+
resData: resData
|
|
42
|
+
});
|
|
43
|
+
Event.execEvent('unreadMsgAction', resData);
|
|
44
|
+
});
|
|
45
|
+
log("\u6CE8\u518CwebViewMsgReceive\u4E8B\u4EF6 ");
|
|
46
|
+
bridge.registerHandler('webViewMsgReceive', function (resData) {
|
|
47
|
+
log("webViewMsgReceive\u76D1\u542C\u5230\u56DE\u8C03\uFF0C\u76F8\u5173\u53C2\u6570 ", {
|
|
48
|
+
resData: resData
|
|
49
|
+
});
|
|
50
|
+
Event.execEvent('webViewMsgReceive', resData);
|
|
51
|
+
});
|
|
52
|
+
bridge.registerHandler('pushWorkMsg', function (resData) {
|
|
53
|
+
log("pushWorkMsg\u76D1\u542C\u5230\u56DE\u8C03\uFF0C\u76F8\u5173\u53C2\u6570 ", {
|
|
54
|
+
resData: resData
|
|
55
|
+
});
|
|
56
|
+
Event.execEvent('pushWorkMsg', resData);
|
|
57
|
+
});
|
|
58
|
+
bridge.registerHandler('getTogetherCallback', function (resData) {
|
|
59
|
+
log("getTogetherCallback\u76D1\u542C\u5230\u56DE\u8C03\uFF0C\u76F8\u5173\u53C2\u6570 ", {
|
|
60
|
+
resData: resData
|
|
61
|
+
});
|
|
62
|
+
Event.execEvent('getTogetherCallback', resData);
|
|
63
|
+
});
|
|
64
|
+
bridge.registerHandler('sendMsgCommon', function (resData) {
|
|
65
|
+
log("sendMsgCommon ", {
|
|
66
|
+
resData: resData
|
|
67
|
+
});
|
|
68
|
+
Event.execEvent('sendMsgCommon', resData);
|
|
69
|
+
});
|
|
70
|
+
bridge.registerHandler('toolbarClickEvent', function (resData, responseCallback) {
|
|
71
|
+
log("toolbarClickEvent ", {
|
|
72
|
+
resData: resData
|
|
73
|
+
});
|
|
74
|
+
var responseData = {
|
|
75
|
+
data: resData,
|
|
76
|
+
callback: responseCallback
|
|
77
|
+
};
|
|
78
|
+
Event.execEvent('toolbarClickEvent', responseData);
|
|
79
|
+
});
|
|
80
|
+
resolve();
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
var mobileBridge = function mobileBridge(method, param) {
|
|
85
|
+
return new _Promise(function (resolve, reject) {
|
|
86
|
+
var p = _Object$assign({}, param);
|
|
87
|
+
setupWebViewJavascriptBridge(function (bridge) {
|
|
88
|
+
if (param.control) {
|
|
89
|
+
bridge.registerHandler(method, function (data) {
|
|
90
|
+
var onSuccess = param.onSuccess;
|
|
91
|
+
delete p.onSuccess;
|
|
92
|
+
if ('function' === typeof onSuccess) {
|
|
93
|
+
onSuccess(data);
|
|
94
|
+
resolve({
|
|
95
|
+
code: '0',
|
|
96
|
+
message: 'success'
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
bridge.callHandler(method, param, function (e) {
|
|
102
|
+
var code = e.code,
|
|
103
|
+
message = e.message,
|
|
104
|
+
data = e.data;
|
|
105
|
+
var _code = _parseInt(code);
|
|
106
|
+
var callbackStr = electronResCodeMap(_code);
|
|
107
|
+
var callbackFun = p[callbackStr];
|
|
108
|
+
log("SDK\u6267\u884C\u540E\u56DE\u8C03\uFF0C\u76F8\u5173\u53C2\u6570 ", {
|
|
109
|
+
method: method,
|
|
110
|
+
param: param,
|
|
111
|
+
data: data,
|
|
112
|
+
_code: _code,
|
|
113
|
+
message: message,
|
|
114
|
+
callbackFun: callbackFun
|
|
115
|
+
});
|
|
116
|
+
// 请求失败
|
|
117
|
+
if (callbackStr === 'onFail') {
|
|
118
|
+
bpitLog({
|
|
119
|
+
method: method,
|
|
120
|
+
errorcode: _code,
|
|
121
|
+
message: message || _JSON$stringify(data) || 'SDK执行失败回调,相关参数'
|
|
122
|
+
});
|
|
123
|
+
if ('function' === typeof callbackFun) {
|
|
124
|
+
message ? callbackFun({
|
|
125
|
+
code: code,
|
|
126
|
+
message: message
|
|
127
|
+
}) : callbackFun(data);
|
|
128
|
+
}
|
|
129
|
+
reject({
|
|
130
|
+
_code: _code,
|
|
131
|
+
message: message,
|
|
132
|
+
data: data
|
|
133
|
+
});
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
// 请求成功
|
|
137
|
+
if ('function' === typeof callbackFun) {
|
|
138
|
+
callbackFun(data || message);
|
|
139
|
+
}
|
|
140
|
+
resolve({
|
|
141
|
+
_code: _code,
|
|
142
|
+
message: message,
|
|
143
|
+
data: data
|
|
144
|
+
});
|
|
145
|
+
// if (_code === -2 || _code === 7) {
|
|
146
|
+
// bpitLog({
|
|
147
|
+
// method,
|
|
148
|
+
// errorcode: _code,
|
|
149
|
+
// message: message || 'SDK执行失败回调,相关参数',
|
|
150
|
+
// });
|
|
151
|
+
// log(`SDK执行后回调,相关参数 `, {
|
|
152
|
+
// method,
|
|
153
|
+
// param,
|
|
154
|
+
// data,
|
|
155
|
+
// _code,
|
|
156
|
+
// message,
|
|
157
|
+
// });
|
|
158
|
+
// reject({_code, message});
|
|
159
|
+
// // return;
|
|
160
|
+
// }
|
|
161
|
+
// const callbackFun = p[callbackStr];
|
|
162
|
+
// log(`SDK执行后回调,相关参数 `, {
|
|
163
|
+
// method,
|
|
164
|
+
// param,
|
|
165
|
+
// data,
|
|
166
|
+
// _code,
|
|
167
|
+
// message,
|
|
168
|
+
// callbackFun,
|
|
169
|
+
// });
|
|
170
|
+
// if ('function' === typeof callbackFun) {
|
|
171
|
+
// callbackFun(data || message);
|
|
172
|
+
// }
|
|
173
|
+
// resolve({_code, message, data});
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
};
|
|
178
|
+
export { mobileBridge, mobileBridgeInit };
|
|
@@ -0,0 +1,86 @@
|
|
|
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
|
+
import PcIframe from '../helper/pcIframe';
|
|
6
|
+
import { electronResCodeMap } from '../helper/codeMap';
|
|
7
|
+
import { log, bpitLog } from '../../utils';
|
|
8
|
+
var PcBridgeInit = function PcBridgeInit() {
|
|
9
|
+
PcIframe.init();
|
|
10
|
+
};
|
|
11
|
+
var pcBridge = function pcBridge(method, param) {
|
|
12
|
+
return new _Promise(function (resolve, reject) {
|
|
13
|
+
return PcIframe.invokeAPI(method, param, function (_ref) {
|
|
14
|
+
var data = _ref.data,
|
|
15
|
+
code = _ref.code,
|
|
16
|
+
message = _ref.message;
|
|
17
|
+
var _code = _parseInt(code);
|
|
18
|
+
var callbackStr = electronResCodeMap(_code);
|
|
19
|
+
var callbackFun = param[callbackStr];
|
|
20
|
+
log("SDK\u6267\u884C\u540E\u56DE\u8C03\uFF0C\u76F8\u5173\u53C2\u6570 ", {
|
|
21
|
+
method: method,
|
|
22
|
+
param: param,
|
|
23
|
+
data: data,
|
|
24
|
+
_code: _code,
|
|
25
|
+
message: message,
|
|
26
|
+
callbackFun: callbackFun
|
|
27
|
+
});
|
|
28
|
+
// 请求失败
|
|
29
|
+
if (callbackStr === 'onFail') {
|
|
30
|
+
bpitLog({
|
|
31
|
+
method: method,
|
|
32
|
+
errorcode: _code,
|
|
33
|
+
message: message || _JSON$stringify(data) || 'SDK执行失败回调,相关参数'
|
|
34
|
+
});
|
|
35
|
+
if ('function' === typeof callbackFun) {
|
|
36
|
+
console.log('wenai-code', code, _code);
|
|
37
|
+
var callbackData = Object.prototype.toString.call(data) === "[object Object]" ? _Object$assign(_Object$assign({}, data), {
|
|
38
|
+
code: code,
|
|
39
|
+
message: message
|
|
40
|
+
}) : {
|
|
41
|
+
data: data,
|
|
42
|
+
code: code,
|
|
43
|
+
message: message
|
|
44
|
+
};
|
|
45
|
+
message ? callbackFun(callbackData) : callbackFun(data);
|
|
46
|
+
}
|
|
47
|
+
reject({
|
|
48
|
+
_code: _code,
|
|
49
|
+
message: message,
|
|
50
|
+
data: data
|
|
51
|
+
});
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
// 请求成功
|
|
55
|
+
if ('function' === typeof callbackFun) {
|
|
56
|
+
callbackFun(data || message);
|
|
57
|
+
}
|
|
58
|
+
resolve({
|
|
59
|
+
_code: _code,
|
|
60
|
+
message: message,
|
|
61
|
+
data: data
|
|
62
|
+
});
|
|
63
|
+
// if (_code === -2) {
|
|
64
|
+
// bpitLog({
|
|
65
|
+
// method,
|
|
66
|
+
// errorcode: _code,
|
|
67
|
+
// message: message || 'SDK执行失败回调,相关参数',
|
|
68
|
+
// });
|
|
69
|
+
// }
|
|
70
|
+
// const callbackFun = param[callbackStr];
|
|
71
|
+
// log(`SDK执行后回调,相关参数 `, {
|
|
72
|
+
// method,
|
|
73
|
+
// param,
|
|
74
|
+
// data,
|
|
75
|
+
// _code,
|
|
76
|
+
// message,
|
|
77
|
+
// callbackFun
|
|
78
|
+
// });
|
|
79
|
+
// if ('function' === typeof callbackFun) {
|
|
80
|
+
// callbackFun(data || message);
|
|
81
|
+
// }
|
|
82
|
+
// resolve({ _code, message, data });
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
export { pcBridge, PcBridgeInit };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import _Map from "@babel/runtime-corejs3/core-js/map";
|
|
2
|
+
var resCodeMap = new _Map([[0, 'onSuccess'], [-1, 'onCancel'], [-2, 'onFail'], [-3, 'onProgress'], [-4, 'onSubmit']]);
|
|
3
|
+
function electronResCodeMap(code) {
|
|
4
|
+
return resCodeMap.get(code) || 'onFail';
|
|
5
|
+
}
|
|
6
|
+
export { electronResCodeMap };
|