yach.open.jssdk 4.4.3-beta1 → 4.4.3-beta3
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-beta2.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 +20 -0
- package/es/api/biz/util/openPublish.js +21 -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 +20 -0
- package/libs/api/biz/util/openPublish.js +29 -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
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
|
|
4
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
_Object$defineProperty(exports, "PcBridgeInit", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _pc.PcBridgeInit;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
_Object$defineProperty(exports, "mobileBridge", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function get() {
|
|
16
|
+
return _mobile.mobileBridge;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
_Object$defineProperty(exports, "mobileBridgeInit", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function get() {
|
|
22
|
+
return _mobile.mobileBridgeInit;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
_Object$defineProperty(exports, "pcBridge", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function get() {
|
|
28
|
+
return _pc.pcBridge;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
var _mobile = require("./mobile");
|
|
32
|
+
var _pc = require("./pc");
|
|
@@ -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,185 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
5
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.mobileBridgeInit = exports.mobileBridge = void 0;
|
|
9
|
+
var _setTimeout2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/set-timeout"));
|
|
10
|
+
var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/promise"));
|
|
11
|
+
var _assign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/object/assign"));
|
|
12
|
+
var _parseInt2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/parse-int"));
|
|
13
|
+
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/json/stringify"));
|
|
14
|
+
var _event = _interopRequireDefault(require("../helper/event"));
|
|
15
|
+
var _codeMap = require("../helper/codeMap");
|
|
16
|
+
var _utils = require("../../utils");
|
|
17
|
+
function setupWebViewJavascriptBridge(callback) {
|
|
18
|
+
if (window.WebViewJavascriptBridge) {
|
|
19
|
+
return callback(WebViewJavascriptBridge);
|
|
20
|
+
}
|
|
21
|
+
if (window.WKWebViewJavascriptBridge) {
|
|
22
|
+
return callback(WKWebViewJavascriptBridge);
|
|
23
|
+
}
|
|
24
|
+
if (window.WVJBCallbacks) {
|
|
25
|
+
return window.WVJBCallbacks.push(callback);
|
|
26
|
+
}
|
|
27
|
+
window.WVJBCallbacks = [callback];
|
|
28
|
+
var WVJBIframe = document.createElement('iframe');
|
|
29
|
+
WVJBIframe.style.display = 'none';
|
|
30
|
+
WVJBIframe.src = 'https://__bridge_loaded__';
|
|
31
|
+
document.documentElement.appendChild(WVJBIframe);
|
|
32
|
+
(0, _setTimeout2["default"])(function () {
|
|
33
|
+
document.documentElement.removeChild(WVJBIframe);
|
|
34
|
+
}, 0);
|
|
35
|
+
}
|
|
36
|
+
var mobileBridgeInit = exports.mobileBridgeInit = function mobileBridgeInit() {
|
|
37
|
+
return new _promise["default"](function (resolve, reject) {
|
|
38
|
+
setupWebViewJavascriptBridge(function (bridge) {
|
|
39
|
+
(0, _utils.log)("\u6CE8\u518Cresume\u4E8B\u4EF6 ");
|
|
40
|
+
bridge.registerHandler('resume', function (resData) {
|
|
41
|
+
(0, _utils.log)("resume\u76D1\u542C\u5230\u56DE\u8C03\uFF0C\u76F8\u5173\u53C2\u6570 ", {
|
|
42
|
+
resData: resData
|
|
43
|
+
});
|
|
44
|
+
_event["default"].execEvent('resume', resData);
|
|
45
|
+
});
|
|
46
|
+
(0, _utils.log)("\u6CE8\u518CunreadMsgAction\u4E8B\u4EF6 ");
|
|
47
|
+
bridge.registerHandler('unreadMsgAction', function (resData) {
|
|
48
|
+
(0, _utils.log)("unreadMsgAction\u76D1\u542C\u5230\u56DE\u8C03\uFF0C\u76F8\u5173\u53C2\u6570 ", {
|
|
49
|
+
resData: resData
|
|
50
|
+
});
|
|
51
|
+
_event["default"].execEvent('unreadMsgAction', resData);
|
|
52
|
+
});
|
|
53
|
+
(0, _utils.log)("\u6CE8\u518CwebViewMsgReceive\u4E8B\u4EF6 ");
|
|
54
|
+
bridge.registerHandler('webViewMsgReceive', function (resData) {
|
|
55
|
+
(0, _utils.log)("webViewMsgReceive\u76D1\u542C\u5230\u56DE\u8C03\uFF0C\u76F8\u5173\u53C2\u6570 ", {
|
|
56
|
+
resData: resData
|
|
57
|
+
});
|
|
58
|
+
_event["default"].execEvent('webViewMsgReceive', resData);
|
|
59
|
+
});
|
|
60
|
+
bridge.registerHandler('pushWorkMsg', function (resData) {
|
|
61
|
+
(0, _utils.log)("pushWorkMsg\u76D1\u542C\u5230\u56DE\u8C03\uFF0C\u76F8\u5173\u53C2\u6570 ", {
|
|
62
|
+
resData: resData
|
|
63
|
+
});
|
|
64
|
+
_event["default"].execEvent('pushWorkMsg', resData);
|
|
65
|
+
});
|
|
66
|
+
bridge.registerHandler('getTogetherCallback', function (resData) {
|
|
67
|
+
(0, _utils.log)("getTogetherCallback\u76D1\u542C\u5230\u56DE\u8C03\uFF0C\u76F8\u5173\u53C2\u6570 ", {
|
|
68
|
+
resData: resData
|
|
69
|
+
});
|
|
70
|
+
_event["default"].execEvent('getTogetherCallback', resData);
|
|
71
|
+
});
|
|
72
|
+
bridge.registerHandler('sendMsgCommon', function (resData) {
|
|
73
|
+
(0, _utils.log)("sendMsgCommon ", {
|
|
74
|
+
resData: resData
|
|
75
|
+
});
|
|
76
|
+
_event["default"].execEvent('sendMsgCommon', resData);
|
|
77
|
+
});
|
|
78
|
+
bridge.registerHandler('toolbarClickEvent', function (resData, responseCallback) {
|
|
79
|
+
(0, _utils.log)("toolbarClickEvent ", {
|
|
80
|
+
resData: resData
|
|
81
|
+
});
|
|
82
|
+
var responseData = {
|
|
83
|
+
data: resData,
|
|
84
|
+
callback: responseCallback
|
|
85
|
+
};
|
|
86
|
+
_event["default"].execEvent('toolbarClickEvent', responseData);
|
|
87
|
+
});
|
|
88
|
+
resolve();
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
var mobileBridge = exports.mobileBridge = function mobileBridge(method, param) {
|
|
93
|
+
return new _promise["default"](function (resolve, reject) {
|
|
94
|
+
var p = (0, _assign["default"])({}, param);
|
|
95
|
+
setupWebViewJavascriptBridge(function (bridge) {
|
|
96
|
+
if (param.control) {
|
|
97
|
+
bridge.registerHandler(method, function (data) {
|
|
98
|
+
var onSuccess = param.onSuccess;
|
|
99
|
+
delete p.onSuccess;
|
|
100
|
+
if ('function' === typeof onSuccess) {
|
|
101
|
+
onSuccess(data);
|
|
102
|
+
resolve({
|
|
103
|
+
code: '0',
|
|
104
|
+
message: 'success'
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
bridge.callHandler(method, param, function (e) {
|
|
110
|
+
var code = e.code,
|
|
111
|
+
message = e.message,
|
|
112
|
+
data = e.data;
|
|
113
|
+
var _code = (0, _parseInt2["default"])(code);
|
|
114
|
+
var callbackStr = (0, _codeMap.electronResCodeMap)(_code);
|
|
115
|
+
var callbackFun = p[callbackStr];
|
|
116
|
+
(0, _utils.log)("SDK\u6267\u884C\u540E\u56DE\u8C03\uFF0C\u76F8\u5173\u53C2\u6570 ", {
|
|
117
|
+
method: method,
|
|
118
|
+
param: param,
|
|
119
|
+
data: data,
|
|
120
|
+
_code: _code,
|
|
121
|
+
message: message,
|
|
122
|
+
callbackFun: callbackFun
|
|
123
|
+
});
|
|
124
|
+
// 请求失败
|
|
125
|
+
if (callbackStr === 'onFail') {
|
|
126
|
+
(0, _utils.bpitLog)({
|
|
127
|
+
method: method,
|
|
128
|
+
errorcode: _code,
|
|
129
|
+
message: message || (0, _stringify["default"])(data) || 'SDK执行失败回调,相关参数'
|
|
130
|
+
});
|
|
131
|
+
if ('function' === typeof callbackFun) {
|
|
132
|
+
message ? callbackFun({
|
|
133
|
+
code: code,
|
|
134
|
+
message: message
|
|
135
|
+
}) : callbackFun(data);
|
|
136
|
+
}
|
|
137
|
+
reject({
|
|
138
|
+
_code: _code,
|
|
139
|
+
message: message,
|
|
140
|
+
data: data
|
|
141
|
+
});
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
// 请求成功
|
|
145
|
+
if ('function' === typeof callbackFun) {
|
|
146
|
+
callbackFun(data || message);
|
|
147
|
+
}
|
|
148
|
+
resolve({
|
|
149
|
+
_code: _code,
|
|
150
|
+
message: message,
|
|
151
|
+
data: data
|
|
152
|
+
});
|
|
153
|
+
// if (_code === -2 || _code === 7) {
|
|
154
|
+
// bpitLog({
|
|
155
|
+
// method,
|
|
156
|
+
// errorcode: _code,
|
|
157
|
+
// message: message || 'SDK执行失败回调,相关参数',
|
|
158
|
+
// });
|
|
159
|
+
// log(`SDK执行后回调,相关参数 `, {
|
|
160
|
+
// method,
|
|
161
|
+
// param,
|
|
162
|
+
// data,
|
|
163
|
+
// _code,
|
|
164
|
+
// message,
|
|
165
|
+
// });
|
|
166
|
+
// reject({_code, message});
|
|
167
|
+
// // return;
|
|
168
|
+
// }
|
|
169
|
+
// const callbackFun = p[callbackStr];
|
|
170
|
+
// log(`SDK执行后回调,相关参数 `, {
|
|
171
|
+
// method,
|
|
172
|
+
// param,
|
|
173
|
+
// data,
|
|
174
|
+
// _code,
|
|
175
|
+
// message,
|
|
176
|
+
// callbackFun,
|
|
177
|
+
// });
|
|
178
|
+
// if ('function' === typeof callbackFun) {
|
|
179
|
+
// callbackFun(data || message);
|
|
180
|
+
// }
|
|
181
|
+
// resolve({_code, message, data});
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
5
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.pcBridge = exports.PcBridgeInit = void 0;
|
|
9
|
+
var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/promise"));
|
|
10
|
+
var _parseInt2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/parse-int"));
|
|
11
|
+
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/json/stringify"));
|
|
12
|
+
var _assign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/object/assign"));
|
|
13
|
+
var _pcIframe = _interopRequireDefault(require("../helper/pcIframe"));
|
|
14
|
+
var _codeMap = require("../helper/codeMap");
|
|
15
|
+
var _utils = require("../../utils");
|
|
16
|
+
var PcBridgeInit = exports.PcBridgeInit = function PcBridgeInit() {
|
|
17
|
+
_pcIframe["default"].init();
|
|
18
|
+
};
|
|
19
|
+
var pcBridge = exports.pcBridge = function pcBridge(method, param) {
|
|
20
|
+
return new _promise["default"](function (resolve, reject) {
|
|
21
|
+
return _pcIframe["default"].invokeAPI(method, param, function (_ref) {
|
|
22
|
+
var data = _ref.data,
|
|
23
|
+
code = _ref.code,
|
|
24
|
+
message = _ref.message;
|
|
25
|
+
var _code = (0, _parseInt2["default"])(code);
|
|
26
|
+
var callbackStr = (0, _codeMap.electronResCodeMap)(_code);
|
|
27
|
+
var callbackFun = param[callbackStr];
|
|
28
|
+
(0, _utils.log)("SDK\u6267\u884C\u540E\u56DE\u8C03\uFF0C\u76F8\u5173\u53C2\u6570 ", {
|
|
29
|
+
method: method,
|
|
30
|
+
param: param,
|
|
31
|
+
data: data,
|
|
32
|
+
_code: _code,
|
|
33
|
+
message: message,
|
|
34
|
+
callbackFun: callbackFun
|
|
35
|
+
});
|
|
36
|
+
// 请求失败
|
|
37
|
+
if (callbackStr === 'onFail') {
|
|
38
|
+
(0, _utils.bpitLog)({
|
|
39
|
+
method: method,
|
|
40
|
+
errorcode: _code,
|
|
41
|
+
message: message || (0, _stringify["default"])(data) || 'SDK执行失败回调,相关参数'
|
|
42
|
+
});
|
|
43
|
+
if ('function' === typeof callbackFun) {
|
|
44
|
+
console.log('wenai-code', code, _code);
|
|
45
|
+
var callbackData = Object.prototype.toString.call(data) === "[object Object]" ? (0, _assign["default"])((0, _assign["default"])({}, data), {
|
|
46
|
+
code: code,
|
|
47
|
+
message: message
|
|
48
|
+
}) : {
|
|
49
|
+
data: data,
|
|
50
|
+
code: code,
|
|
51
|
+
message: message
|
|
52
|
+
};
|
|
53
|
+
message ? callbackFun(callbackData) : callbackFun(data);
|
|
54
|
+
}
|
|
55
|
+
reject({
|
|
56
|
+
_code: _code,
|
|
57
|
+
message: message,
|
|
58
|
+
data: data
|
|
59
|
+
});
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
// 请求成功
|
|
63
|
+
if ('function' === typeof callbackFun) {
|
|
64
|
+
callbackFun(data || message);
|
|
65
|
+
}
|
|
66
|
+
resolve({
|
|
67
|
+
_code: _code,
|
|
68
|
+
message: message,
|
|
69
|
+
data: data
|
|
70
|
+
});
|
|
71
|
+
// if (_code === -2) {
|
|
72
|
+
// bpitLog({
|
|
73
|
+
// method,
|
|
74
|
+
// errorcode: _code,
|
|
75
|
+
// message: message || 'SDK执行失败回调,相关参数',
|
|
76
|
+
// });
|
|
77
|
+
// }
|
|
78
|
+
// const callbackFun = param[callbackStr];
|
|
79
|
+
// log(`SDK执行后回调,相关参数 `, {
|
|
80
|
+
// method,
|
|
81
|
+
// param,
|
|
82
|
+
// data,
|
|
83
|
+
// _code,
|
|
84
|
+
// message,
|
|
85
|
+
// callbackFun
|
|
86
|
+
// });
|
|
87
|
+
// if ('function' === typeof callbackFun) {
|
|
88
|
+
// callbackFun(data || message);
|
|
89
|
+
// }
|
|
90
|
+
// resolve({ _code, message, data });
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
5
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.genDefaultParamsDealFn = genDefaultParamsDealFn;
|
|
9
|
+
var _assign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/object/assign"));
|
|
10
|
+
function genDefaultParamsDealFn(p) {
|
|
11
|
+
return function (r) {
|
|
12
|
+
return (0, _assign["default"])((0, _assign["default"])({}, p), r);
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
5
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.electronResCodeMap = electronResCodeMap;
|
|
9
|
+
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/map"));
|
|
10
|
+
var resCodeMap = new _map["default"]([[0, 'onSuccess'], [-1, 'onCancel'], [-2, 'onFail'], [-3, 'onProgress'], [-4, 'onSubmit']]);
|
|
11
|
+
function electronResCodeMap(code) {
|
|
12
|
+
return resCodeMap.get(code) || 'onFail';
|
|
13
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
5
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
var _isArray = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/array/is-array"));
|
|
10
|
+
var _indexOf = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/instance/index-of"));
|
|
11
|
+
var _splice = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/instance/splice"));
|
|
12
|
+
var _forEach = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/instance/for-each"));
|
|
13
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
|
|
14
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
15
|
+
var Event = /*#__PURE__*/(0, _createClass2["default"])(function Event() {
|
|
16
|
+
var _this = this;
|
|
17
|
+
(0, _classCallCheck2["default"])(this, Event);
|
|
18
|
+
this.on = function (event, fn) {
|
|
19
|
+
if (!event || 'function' !== typeof fn) throw 'eventName is null or handle is not a function, on fail';
|
|
20
|
+
if (!(0, _isArray["default"])(_this.eventsHandle[event])) _this.eventsHandle[event] = [];
|
|
21
|
+
_this.eventsHandle[event].push(fn);
|
|
22
|
+
};
|
|
23
|
+
this.off = function (event, fn) {
|
|
24
|
+
if (!event) throw 'eventName is null, invoke off fail';
|
|
25
|
+
if (!fn) {
|
|
26
|
+
_this.eventsHandle[event] = [];
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if ((0, _isArray["default"])(_this.eventsHandle[event])) {
|
|
30
|
+
var _context, _context2;
|
|
31
|
+
var n = (0, _indexOf["default"])(_context = _this.eventsHandle[event]).call(_context, fn);
|
|
32
|
+
-1 !== n && (0, _splice["default"])(_context2 = _this.eventsHandle[event]).call(_context2, n, 1);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
this.execEvent = function (event, data) {
|
|
36
|
+
var _context3;
|
|
37
|
+
(0, _isArray["default"])(this.eventsHandle[event]) && (0, _forEach["default"])(_context3 = this.eventsHandle[event]).call(_context3, function (fn) {
|
|
38
|
+
try {
|
|
39
|
+
fn(data);
|
|
40
|
+
} catch (t) {
|
|
41
|
+
console.error(data);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
this.eventsHandle = {};
|
|
46
|
+
});
|
|
47
|
+
var event = new Event();
|
|
48
|
+
var _default = exports["default"] = event;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface Window {
|
|
3
|
+
sendToHost: any;
|
|
4
|
+
sendTo: any;
|
|
5
|
+
receiveBrowserViewData: any;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
interface APIParams {
|
|
9
|
+
invokeType?: 'browserView' | '';
|
|
10
|
+
[propName: string]: any;
|
|
11
|
+
}
|
|
12
|
+
declare class GenPostMsg {
|
|
13
|
+
private id;
|
|
14
|
+
private PromiseObj;
|
|
15
|
+
private methodName;
|
|
16
|
+
private plainMsg;
|
|
17
|
+
callback: (v: any) => void;
|
|
18
|
+
result: Promise<any>;
|
|
19
|
+
invokeType: 'browserView' | '';
|
|
20
|
+
constructor(method: string, param: APIParams, callback: any);
|
|
21
|
+
genid: () => string;
|
|
22
|
+
receiveResponse: (data: any) => void;
|
|
23
|
+
getPayload: () => {
|
|
24
|
+
msgId: string;
|
|
25
|
+
methodName: string;
|
|
26
|
+
body: object;
|
|
27
|
+
type: string;
|
|
28
|
+
invokeType: "" | "browserView";
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
declare class Frame {
|
|
32
|
+
pendingMsgs: {};
|
|
33
|
+
constructor();
|
|
34
|
+
addPending: (e: any) => void;
|
|
35
|
+
deletePending: (e: any) => void;
|
|
36
|
+
getPending: (t: any) => any;
|
|
37
|
+
invokeAPIInBrowserView: (payload: string) => void;
|
|
38
|
+
invokeAPIInWebview: (payload: string) => void;
|
|
39
|
+
invokeAPI: (method: string, param: any, callback: any) => GenPostMsg;
|
|
40
|
+
handleCallback: (datas: any, invokeType?: 'browserView' | '') => void;
|
|
41
|
+
init: () => void;
|
|
42
|
+
}
|
|
43
|
+
declare const frame: Frame;
|
|
44
|
+
export default frame;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
5
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
var _now = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/date/now"));
|
|
10
|
+
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/json/stringify"));
|
|
11
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
|
|
12
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
13
|
+
var _utils = require("../../utils");
|
|
14
|
+
var _event = _interopRequireDefault(require("./event"));
|
|
15
|
+
// 处理posmessage参数
|
|
16
|
+
var GenPostMsg = /*#__PURE__*/(0, _createClass2["default"])(function GenPostMsg(method, param, callback) {
|
|
17
|
+
var _this = this;
|
|
18
|
+
(0, _classCallCheck2["default"])(this, GenPostMsg);
|
|
19
|
+
this.genid = function () {
|
|
20
|
+
var idStr = (0, _now["default"])().toString(36);
|
|
21
|
+
idStr += Math.random().toString(36).substr(3);
|
|
22
|
+
return idStr;
|
|
23
|
+
};
|
|
24
|
+
this.receiveResponse = function (data) {
|
|
25
|
+
//this.PromiseObj.resolve(data);
|
|
26
|
+
_this.callback(data);
|
|
27
|
+
};
|
|
28
|
+
this.getPayload = function () {
|
|
29
|
+
return {
|
|
30
|
+
msgId: _this.id,
|
|
31
|
+
methodName: _this.methodName,
|
|
32
|
+
body: _this.plainMsg,
|
|
33
|
+
type: 'request',
|
|
34
|
+
invokeType: _this.invokeType
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
this.id = this.genid();
|
|
38
|
+
this.PromiseObj = {
|
|
39
|
+
resolve: null,
|
|
40
|
+
reject: null
|
|
41
|
+
};
|
|
42
|
+
this.methodName = method;
|
|
43
|
+
this.plainMsg = param;
|
|
44
|
+
this.invokeType = param === null || param === void 0 ? void 0 : param.invokeType;
|
|
45
|
+
this.callback = callback;
|
|
46
|
+
// this.result = new Promise(
|
|
47
|
+
// function (resolve, reject) {
|
|
48
|
+
// this.PromiseObj = {
|
|
49
|
+
// resolve,
|
|
50
|
+
// reject,
|
|
51
|
+
// };
|
|
52
|
+
// }.bind(this)
|
|
53
|
+
// );
|
|
54
|
+
});
|
|
55
|
+
var Frame = /*#__PURE__*/(0, _createClass2["default"])(function Frame() {
|
|
56
|
+
var _this2 = this;
|
|
57
|
+
(0, _classCallCheck2["default"])(this, Frame);
|
|
58
|
+
this.addPending = function (e) {
|
|
59
|
+
_this2.pendingMsgs[e.id] = e;
|
|
60
|
+
};
|
|
61
|
+
this.deletePending = function (e) {
|
|
62
|
+
delete _this2.pendingMsgs[e.id];
|
|
63
|
+
};
|
|
64
|
+
this.getPending = function (t) {
|
|
65
|
+
return this.pendingMsgs[t];
|
|
66
|
+
};
|
|
67
|
+
this.invokeAPIInBrowserView = function (payload) {
|
|
68
|
+
window.sendTo(payload);
|
|
69
|
+
};
|
|
70
|
+
this.invokeAPIInWebview = function (payload) {
|
|
71
|
+
window.sendToHost(payload);
|
|
72
|
+
};
|
|
73
|
+
this.invokeAPI = function (method, param, callback) {
|
|
74
|
+
var genPostMsg = new GenPostMsg(method, param, callback);
|
|
75
|
+
var payload = (0, _stringify["default"])(genPostMsg.getPayload());
|
|
76
|
+
var _param$invokeType = param.invokeType,
|
|
77
|
+
invokeType = _param$invokeType === void 0 ? '' : _param$invokeType;
|
|
78
|
+
invokeType === 'browserView' ? _this2.invokeAPIInBrowserView(payload) : _this2.invokeAPIInWebview(payload);
|
|
79
|
+
_this2.addPending(genPostMsg);
|
|
80
|
+
return genPostMsg;
|
|
81
|
+
};
|
|
82
|
+
this.handleCallback = function (datas, invokeType) {
|
|
83
|
+
var type = datas.type,
|
|
84
|
+
methodName = datas.methodName,
|
|
85
|
+
eventName = datas.eventName,
|
|
86
|
+
msgId = datas.msgId,
|
|
87
|
+
_datas$data = datas.data,
|
|
88
|
+
data = _datas$data === void 0 ? {} : _datas$data,
|
|
89
|
+
code = datas.code,
|
|
90
|
+
message = datas.message,
|
|
91
|
+
msg = datas.msg;
|
|
92
|
+
if (type === 'request') {
|
|
93
|
+
// 壳子的调用
|
|
94
|
+
switch (methodName) {
|
|
95
|
+
case 'refresh':
|
|
96
|
+
window.location.reload();
|
|
97
|
+
break;
|
|
98
|
+
case 'back':
|
|
99
|
+
window.history.back();
|
|
100
|
+
break;
|
|
101
|
+
case 'forward':
|
|
102
|
+
window.history.forward();
|
|
103
|
+
break;
|
|
104
|
+
case 'event':
|
|
105
|
+
_event["default"].execEvent(eventName, data);
|
|
106
|
+
break;
|
|
107
|
+
case 'zoomInClick':
|
|
108
|
+
var scrollTopVal = document.documentElement.scrollTop || document.body.scrollTop,
|
|
109
|
+
url = window.location.href;
|
|
110
|
+
if (invokeType === 'browserView') {
|
|
111
|
+
window.sendTo((0, _stringify["default"])({
|
|
112
|
+
type: type,
|
|
113
|
+
methodName: methodName,
|
|
114
|
+
body: {
|
|
115
|
+
scrollTopVal: scrollTopVal,
|
|
116
|
+
url: url,
|
|
117
|
+
title: data && data.title
|
|
118
|
+
}
|
|
119
|
+
}));
|
|
120
|
+
} else {
|
|
121
|
+
window.sendToHost((0, _stringify["default"])({
|
|
122
|
+
type: type,
|
|
123
|
+
methodName: methodName,
|
|
124
|
+
body: {
|
|
125
|
+
scrollTopVal: scrollTopVal,
|
|
126
|
+
url: url,
|
|
127
|
+
title: data && data.title
|
|
128
|
+
}
|
|
129
|
+
}));
|
|
130
|
+
}
|
|
131
|
+
break;
|
|
132
|
+
default:
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
} else if (type === 'response') {
|
|
136
|
+
// 响应壳子的回调
|
|
137
|
+
var pending = _this2.getPending(msgId);
|
|
138
|
+
pending && pending.receiveResponse({
|
|
139
|
+
data: data,
|
|
140
|
+
code: code,
|
|
141
|
+
message: message || msg || data.msg || data.message
|
|
142
|
+
});
|
|
143
|
+
code != -3 && _this2.deletePending(msgId);
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
this.init = function () {
|
|
147
|
+
window.addEventListener('message', function (msg) {
|
|
148
|
+
(0, _utils.log)('electron res: ', msg);
|
|
149
|
+
_this2.handleCallback(msg.data || {});
|
|
150
|
+
});
|
|
151
|
+
window.receiveBrowserViewData && window.receiveBrowserViewData(function (e, response) {
|
|
152
|
+
return _this2.handleCallback(response);
|
|
153
|
+
});
|
|
154
|
+
};
|
|
155
|
+
this.pendingMsgs = {};
|
|
156
|
+
});
|
|
157
|
+
var frame = new Frame();
|
|
158
|
+
var _default = exports["default"] = frame;
|