yach.open.jssdk 4.4.1 → 4.4.3-beta1
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/package.json +1 -1
- package/dist/yach_jssdk_4.4.1-beta6.js +0 -1
- package/es/api/app/custom/talYoungFilesUpload.d.ts +0 -38
- package/es/api/app/custom/talYoungFilesUpload.js +0 -16
- package/es/api/biz/chat/chooseConversationByCorpId.d.ts +0 -36
- package/es/api/biz/chat/chooseConversationByCorpId.js +0 -8
- package/es/api/biz/chat/openSingleChat.d.ts +0 -10
- package/es/api/biz/chat/openSingleChat.js +0 -8
- package/es/api/biz/chat/openSquad.d.ts +0 -8
- package/es/api/biz/chat/openSquad.js +0 -8
- package/es/api/biz/chat/openTeamChat.d.ts +0 -10
- package/es/api/biz/chat/openTeamChat.js +0 -8
- package/es/api/biz/chat/pickConversation.d.ts +0 -19
- package/es/api/biz/chat/pickConversation.js +0 -19
- package/es/api/biz/chat/sendP2PMsg.d.ts +0 -10
- package/es/api/biz/chat/sendP2PMsg.js +0 -8
- package/es/api/biz/contact/complexPicker.d.ts +0 -62
- package/es/api/biz/contact/complexPicker.js +0 -8
- package/es/api/biz/contact/departmentsPicker.d.ts +0 -35
- package/es/api/biz/contact/departmentsPicker.js +0 -8
- package/es/api/biz/group/groupComplexPicker.d.ts +0 -33
- package/es/api/biz/group/groupComplexPicker.js +0 -8
- package/es/api/biz/map/multipointView.d.ts +0 -21
- package/es/api/biz/map/multipointView.js +0 -19
- package/es/api/biz/map/view.d.ts +0 -13
- package/es/api/biz/map/view.js +0 -19
- package/es/api/biz/navigation/close.d.ts +0 -7
- package/es/api/biz/navigation/close.js +0 -9
- package/es/api/biz/navigation/goBack.d.ts +0 -7
- package/es/api/biz/navigation/goBack.js +0 -19
- package/es/api/biz/navigation/quit.d.ts +0 -8
- package/es/api/biz/navigation/quit.js +0 -15
- package/es/api/biz/navigation/replace.d.ts +0 -8
- package/es/api/biz/navigation/replace.js +0 -8
- package/es/api/biz/navigation/setIcon.d.ts +0 -12
- package/es/api/biz/navigation/setIcon.js +0 -27
- package/es/api/biz/navigation/setLeft.d.ts +0 -9
- package/es/api/biz/navigation/setLeft.js +0 -31
- package/es/api/biz/navigation/setMenu.d.ts +0 -20
- package/es/api/biz/navigation/setMenu.js +0 -25
- package/es/api/biz/navigation/setPanGestureEnable.d.ts +0 -9
- package/es/api/biz/navigation/setPanGestureEnable.js +0 -26
- package/es/api/biz/navigation/setRight.d.ts +0 -13
- package/es/api/biz/navigation/setRight.js +0 -31
- package/es/api/biz/navigation/setTitle.d.ts +0 -11
- package/es/api/biz/navigation/setTitle.js +0 -8
- package/es/api/biz/navigation/setTitleExpandIcon.d.ts +0 -9
- package/es/api/biz/navigation/setTitleExpandIcon.js +0 -25
- package/es/api/biz/navigation/setWindowBig.d.ts +0 -9
- package/es/api/biz/navigation/setWindowBig.js +0 -16
- package/es/api/biz/navigation/tencentMeeting.d.ts +0 -22
- package/es/api/biz/navigation/tencentMeeting.js +0 -8
- package/es/api/biz/navigation/tencentMeetingBegin.d.ts +0 -7
- package/es/api/biz/navigation/tencentMeetingBegin.js +0 -8
- package/es/api/biz/navigation/updateExpandTitle.d.ts +0 -8
- package/es/api/biz/navigation/updateExpandTitle.js +0 -8
- package/es/api/biz/telephone/call.d.ts +0 -9
- package/es/api/biz/telephone/call.js +0 -19
- package/es/api/biz/telephone/showCallMenu.d.ts +0 -12
- package/es/api/biz/telephone/showCallMenu.js +0 -19
- package/es/api/biz/util/addAppToNav.d.ts +0 -9
- package/es/api/biz/util/addAppToNav.js +0 -23
- package/es/api/biz/util/assistantCreate.d.ts +0 -11
- package/es/api/biz/util/assistantCreate.js +0 -23
- package/es/api/biz/util/authFinish.d.ts +0 -11
- package/es/api/biz/util/authFinish.js +0 -19
- package/es/api/biz/util/authStart.d.ts +0 -9
- package/es/api/biz/util/authStart.js +0 -19
- package/es/api/biz/util/chosen.d.ts +0 -15
- package/es/api/biz/util/chosen.js +0 -19
- package/es/api/biz/util/clipboardFileUpload.d.ts +0 -7
- package/es/api/biz/util/clipboardFileUpload.js +0 -8
- package/es/api/biz/util/closeWindow.d.ts +0 -8
- package/es/api/biz/util/closeWindow.js +0 -15
- package/es/api/biz/util/complain.d.ts +0 -12
- package/es/api/biz/util/complain.js +0 -8
- package/es/api/biz/util/copy.d.ts +0 -11
- package/es/api/biz/util/copy.js +0 -19
- package/es/api/biz/util/createModifySchedule.d.ts +0 -26
- package/es/api/biz/util/createModifySchedule.js +0 -15
- package/es/api/biz/util/datepicker.d.ts +0 -14
- package/es/api/biz/util/datepicker.js +0 -19
- package/es/api/biz/util/datetimepicker.d.ts +0 -14
- package/es/api/biz/util/datetimepicker.js +0 -19
- package/es/api/biz/util/disableScreenCapture.d.ts +0 -8
- package/es/api/biz/util/disableScreenCapture.js +0 -19
- package/es/api/biz/util/downloadFile.d.ts +0 -9
- package/es/api/biz/util/downloadFile.js +0 -8
- package/es/api/biz/util/entergroupCheck.d.ts +0 -11
- package/es/api/biz/util/entergroupCheck.js +0 -23
- package/es/api/biz/util/externalLinkPreviewFile.d.ts +0 -11
- package/es/api/biz/util/externalLinkPreviewFile.js +0 -8
- package/es/api/biz/util/feedback.d.ts +0 -11
- package/es/api/biz/util/feedback.js +0 -8
- package/es/api/biz/util/getSingleWebviewData.d.ts +0 -8
- package/es/api/biz/util/getSingleWebviewData.js +0 -8
- package/es/api/biz/util/getTogetherConfig.d.ts +0 -11
- package/es/api/biz/util/getTogetherConfig.js +0 -23
- package/es/api/biz/util/getToken.d.ts +0 -11
- package/es/api/biz/util/getToken.js +0 -19
- package/es/api/biz/util/injectScript.d.ts +0 -9
- package/es/api/biz/util/injectScript.js +0 -8
- package/es/api/biz/util/invoice.d.ts +0 -12
- package/es/api/biz/util/invoice.js +0 -15
- package/es/api/biz/util/knowledgeBaseSelect.d.ts +0 -21
- package/es/api/biz/util/knowledgeBaseSelect.js +0 -15
- package/es/api/biz/util/lorebaseRefreshNodeWebview.d.ts +0 -11
- package/es/api/biz/util/lorebaseRefreshNodeWebview.js +0 -19
- package/es/api/biz/util/lorebaseShowList.d.ts +0 -11
- package/es/api/biz/util/lorebaseShowList.js +0 -19
- package/es/api/biz/util/mediaFileUpload.d.ts +0 -26
- package/es/api/biz/util/mediaFileUpload.js +0 -15
- package/es/api/biz/util/onlineDocmentOpenTeamChat.d.ts +0 -10
- package/es/api/biz/util/onlineDocmentOpenTeamChat.js +0 -23
- package/es/api/biz/util/open.d.ts +0 -9
- package/es/api/biz/util/open.js +0 -8
- package/es/api/biz/util/openFutureGroup.d.ts +0 -10
- package/es/api/biz/util/openFutureGroup.js +0 -23
- package/es/api/biz/util/openLink.d.ts +0 -8
- package/es/api/biz/util/openLink.js +0 -8
- package/es/api/biz/util/openMediaFileDialog.d.ts +0 -23
- package/es/api/biz/util/openMediaFileDialog.js +0 -15
- package/es/api/biz/util/openSingleWebview.d.ts +0 -23
- package/es/api/biz/util/openSingleWebview.js +0 -15
- package/es/api/biz/util/openSlidePanel.d.ts +0 -11
- package/es/api/biz/util/openSlidePanel.js +0 -15
- package/es/api/biz/util/openTalYoungToTopic.d.ts +0 -6
- package/es/api/biz/util/openTalYoungToTopic.js +0 -15
- package/es/api/biz/util/openTogetherEyeWebview.d.ts +0 -11
- package/es/api/biz/util/openTogetherEyeWebview.js +0 -23
- package/es/api/biz/util/openUserSchedule.d.ts +0 -11
- package/es/api/biz/util/openUserSchedule.js +0 -23
- package/es/api/biz/util/openVideoPlayer.d.ts +0 -27
- package/es/api/biz/util/openVideoPlayer.js +0 -23
- package/es/api/biz/util/previewFile.d.ts +0 -11
- package/es/api/biz/util/previewFile.js +0 -8
- package/es/api/biz/util/previewImage.d.ts +0 -9
- package/es/api/biz/util/previewImage.js +0 -8
- package/es/api/biz/util/proxy.d.ts +0 -13
- package/es/api/biz/util/proxy.js +0 -8
- package/es/api/biz/util/pushWorkMsg.d.ts +0 -10
- package/es/api/biz/util/pushWorkMsg.js +0 -15
- package/es/api/biz/util/remind.d.ts +0 -15
- package/es/api/biz/util/remind.js +0 -23
- package/es/api/biz/util/resetSessionUnread.d.ts +0 -8
- package/es/api/biz/util/resetSessionUnread.js +0 -21
- package/es/api/biz/util/rouseApp.d.ts +0 -12
- package/es/api/biz/util/rouseApp.js +0 -15
- package/es/api/biz/util/savePic.d.ts +0 -8
- package/es/api/biz/util/savePic.js +0 -19
- package/es/api/biz/util/scan.d.ts +0 -11
- package/es/api/biz/util/scan.js +0 -19
- package/es/api/biz/util/selectDepartment.d.ts +0 -9
- package/es/api/biz/util/selectDepartment.js +0 -8
- package/es/api/biz/util/share.d.ts +0 -12
- package/es/api/biz/util/share.js +0 -19
- package/es/api/biz/util/takePicture.d.ts +0 -13
- package/es/api/biz/util/takePicture.js +0 -8
- package/es/api/biz/util/uploadAttachment.d.ts +0 -55
- package/es/api/biz/util/uploadAttachment.js +0 -8
- package/es/api/biz/util/yachEvent.d.ts +0 -12
- package/es/api/biz/util/yachEvent.js +0 -27
- package/es/api/biz/util/zfbAuth.d.ts +0 -10
- package/es/api/biz/util/zfbAuth.js +0 -19
- package/es/api/biz/webViewMessage/send.d.ts +0 -7
- package/es/api/biz/webViewMessage/send.js +0 -15
- package/es/api/common.typings.d.ts +0 -9
- package/es/api/common.typings.js +0 -0
- package/es/api/device/audio/download.d.ts +0 -8
- package/es/api/device/audio/download.js +0 -19
- package/es/api/device/audio/onPlayEnd.d.ts +0 -7
- package/es/api/device/audio/onPlayEnd.js +0 -19
- package/es/api/device/audio/onRecordEnd.d.ts +0 -7
- package/es/api/device/audio/onRecordEnd.js +0 -19
- package/es/api/device/audio/onRecordEnd_v2.d.ts +0 -7
- package/es/api/device/audio/onRecordEnd_v2.js +0 -19
- package/es/api/device/audio/pause.d.ts +0 -8
- package/es/api/device/audio/pause.js +0 -19
- package/es/api/device/audio/play.d.ts +0 -8
- package/es/api/device/audio/play.js +0 -19
- package/es/api/device/audio/resume.d.ts +0 -8
- package/es/api/device/audio/resume.js +0 -19
- package/es/api/device/audio/startRecord.d.ts +0 -8
- package/es/api/device/audio/startRecord.js +0 -19
- package/es/api/device/audio/startRecord_v2.d.ts +0 -8
- package/es/api/device/audio/startRecord_v2.js +0 -19
- package/es/api/device/audio/stop.d.ts +0 -8
- package/es/api/device/audio/stop.js +0 -19
- package/es/api/device/audio/stopRecord.d.ts +0 -7
- package/es/api/device/audio/stopRecord.js +0 -19
- package/es/api/device/audio/stopRecord_v2.d.ts +0 -7
- package/es/api/device/audio/stopRecord_v2.js +0 -19
- package/es/api/device/base/checkStepPermission.d.ts +0 -8
- package/es/api/device/base/checkStepPermission.js +0 -19
- package/es/api/device/base/getPhoneInfo.d.ts +0 -16
- package/es/api/device/base/getPhoneInfo.js +0 -19
- package/es/api/device/base/getUUID.d.ts +0 -10
- package/es/api/device/base/getUUID.js +0 -23
- package/es/api/device/connection/getNetworkType.d.ts +0 -10
- package/es/api/device/connection/getNetworkType.js +0 -19
- package/es/api/device/connection/isAtTal.d.ts +0 -10
- package/es/api/device/connection/isAtTal.js +0 -21
- package/es/api/device/geolocation/get.d.ts +0 -42
- package/es/api/device/geolocation/get.js +0 -19
- package/es/api/device/geolocation/getSwitch.d.ts +0 -10
- package/es/api/device/geolocation/getSwitch.js +0 -15
- package/es/api/device/notification/actionSheet.d.ts +0 -15
- package/es/api/device/notification/actionSheet.js +0 -19
- package/es/api/device/notification/alert.d.ts +0 -13
- package/es/api/device/notification/alert.js +0 -23
- package/es/api/device/notification/confirm.d.ts +0 -16
- package/es/api/device/notification/confirm.js +0 -23
- package/es/api/device/notification/hidePreloader.d.ts +0 -7
- package/es/api/device/notification/hidePreloader.js +0 -19
- package/es/api/device/notification/showPreloader.d.ts +0 -9
- package/es/api/device/notification/showPreloader.js +0 -19
- package/es/api/device/notification/toast.d.ts +0 -15
- package/es/api/device/notification/toast.js +0 -8
- package/es/api/device/notification/vibrate.d.ts +0 -8
- package/es/api/device/notification/vibrate.js +0 -19
- package/es/api/device/system/getLang.d.ts +0 -10
- package/es/api/device/system/getLang.js +0 -8
- package/es/api/device/system/setLight.d.ts +0 -8
- package/es/api/device/system/setLight.js +0 -19
- package/es/api/initAPI.d.ts +0 -6
- package/es/api/initAPI.js +0 -22
- package/es/api/primary/createTab.d.ts +0 -13
- package/es/api/primary/createTab.js +0 -15
- package/es/api/primary/exitFullScreen.d.ts +0 -7
- package/es/api/primary/exitFullScreen.js +0 -15
- package/es/api/primary/fullScreen.d.ts +0 -7
- package/es/api/primary/fullScreen.js +0 -15
- package/es/api/primary/weeklyShare.d.ts +0 -13
- package/es/api/primary/weeklyShare.js +0 -15
- package/es/api/runtime/permission/requestAuthCode.d.ts +0 -12
- package/es/api/runtime/permission/requestAuthCode.js +0 -8
- package/es/api/ui/pullToRefresh/disable.d.ts +0 -7
- package/es/api/ui/pullToRefresh/disable.js +0 -19
- package/es/api/ui/pullToRefresh/enable.d.ts +0 -7
- package/es/api/ui/pullToRefresh/enable.js +0 -19
- package/es/api/ui/pullToRefresh/stop.d.ts +0 -7
- package/es/api/ui/pullToRefresh/stop.js +0 -19
- package/es/api/ui/webViewBounce/disable.d.ts +0 -7
- package/es/api/ui/webViewBounce/disable.js +0 -15
- package/es/api/util/domainStorage/getItem.d.ts +0 -12
- package/es/api/util/domainStorage/getItem.js +0 -19
- package/es/api/util/domainStorage/removeItem.d.ts +0 -9
- package/es/api/util/domainStorage/removeItem.js +0 -19
- package/es/api/util/domainStorage/setItem.d.ts +0 -11
- package/es/api/util/domainStorage/setItem.js +0 -19
- package/es/api/util/tool/flushLog.d.ts +0 -7
- package/es/api/util/tool/flushLog.js +0 -15
- package/es/api/util/tool/log.d.ts +0 -9
- package/es/api/util/tool/log.js +0 -15
- package/es/index.d.ts +0 -325
- package/es/index.js +0 -341
- package/es/lib/bridge/index.d.ts +0 -2
- package/es/lib/bridge/index.js +0 -2
- package/es/lib/bridge/mobile.d.ts +0 -13
- package/es/lib/bridge/mobile.js +0 -179
- package/es/lib/bridge/pc.d.ts +0 -4
- package/es/lib/bridge/pc.js +0 -87
- package/es/lib/helper/apiHelper.d.ts +0 -2
- package/es/lib/helper/apiHelper.js +0 -8
- package/es/lib/helper/codeMap.d.ts +0 -2
- package/es/lib/helper/codeMap.js +0 -6
- package/es/lib/helper/event.d.ts +0 -9
- package/es/lib/helper/event.js +0 -40
- package/es/lib/helper/pcIframe.d.ts +0 -44
- package/es/lib/helper/pcIframe.js +0 -150
- package/es/lib/index.d.ts +0 -4
- package/es/lib/index.js +0 -78
- package/es/lib/sdk/index.d.ts +0 -19
- package/es/lib/sdk/index.js +0 -170
- package/es/lib/sdk/sdk.typings.d.ts +0 -85
- package/es/lib/sdk/sdk.typings.js +0 -7
- package/es/utils/bpitLog.d.ts +0 -16
- package/es/utils/bpitLog.js +0 -62
- package/es/utils/compareVersions.d.ts +0 -58
- package/es/utils/compareVersions.js +0 -165
- package/es/utils/console.d.ts +0 -4
- package/es/utils/console.js +0 -44
- package/es/utils/env.d.ts +0 -3
- package/es/utils/env.js +0 -45
- package/es/utils/index.d.ts +0 -4
- package/es/utils/index.js +0 -20
- package/libs/api/app/custom/talYoungFilesUpload.d.ts +0 -38
- package/libs/api/app/custom/talYoungFilesUpload.js +0 -24
- package/libs/api/biz/chat/chooseConversationByCorpId.d.ts +0 -36
- package/libs/api/biz/chat/chooseConversationByCorpId.js +0 -15
- package/libs/api/biz/chat/openSingleChat.d.ts +0 -10
- package/libs/api/biz/chat/openSingleChat.js +0 -15
- package/libs/api/biz/chat/openSquad.d.ts +0 -8
- package/libs/api/biz/chat/openSquad.js +0 -15
- package/libs/api/biz/chat/openTeamChat.d.ts +0 -10
- package/libs/api/biz/chat/openTeamChat.js +0 -15
- package/libs/api/biz/chat/pickConversation.d.ts +0 -19
- package/libs/api/biz/chat/pickConversation.js +0 -26
- package/libs/api/biz/chat/sendP2PMsg.d.ts +0 -10
- package/libs/api/biz/chat/sendP2PMsg.js +0 -15
- package/libs/api/biz/contact/complexPicker.d.ts +0 -62
- package/libs/api/biz/contact/complexPicker.js +0 -15
- package/libs/api/biz/contact/departmentsPicker.d.ts +0 -35
- package/libs/api/biz/contact/departmentsPicker.js +0 -15
- package/libs/api/biz/group/groupComplexPicker.d.ts +0 -33
- package/libs/api/biz/group/groupComplexPicker.js +0 -15
- package/libs/api/biz/map/multipointView.d.ts +0 -21
- package/libs/api/biz/map/multipointView.js +0 -26
- package/libs/api/biz/map/view.d.ts +0 -13
- package/libs/api/biz/map/view.js +0 -26
- package/libs/api/biz/navigation/close.d.ts +0 -7
- package/libs/api/biz/navigation/close.js +0 -16
- package/libs/api/biz/navigation/goBack.d.ts +0 -7
- package/libs/api/biz/navigation/goBack.js +0 -26
- package/libs/api/biz/navigation/quit.d.ts +0 -8
- package/libs/api/biz/navigation/quit.js +0 -22
- package/libs/api/biz/navigation/replace.d.ts +0 -8
- package/libs/api/biz/navigation/replace.js +0 -15
- package/libs/api/biz/navigation/setIcon.d.ts +0 -12
- package/libs/api/biz/navigation/setIcon.js +0 -34
- package/libs/api/biz/navigation/setLeft.d.ts +0 -9
- package/libs/api/biz/navigation/setLeft.js +0 -38
- package/libs/api/biz/navigation/setMenu.d.ts +0 -20
- package/libs/api/biz/navigation/setMenu.js +0 -32
- package/libs/api/biz/navigation/setPanGestureEnable.d.ts +0 -9
- package/libs/api/biz/navigation/setPanGestureEnable.js +0 -33
- package/libs/api/biz/navigation/setRight.d.ts +0 -13
- package/libs/api/biz/navigation/setRight.js +0 -38
- package/libs/api/biz/navigation/setTitle.d.ts +0 -11
- package/libs/api/biz/navigation/setTitle.js +0 -15
- package/libs/api/biz/navigation/setTitleExpandIcon.d.ts +0 -9
- package/libs/api/biz/navigation/setTitleExpandIcon.js +0 -32
- package/libs/api/biz/navigation/setWindowBig.d.ts +0 -9
- package/libs/api/biz/navigation/setWindowBig.js +0 -24
- package/libs/api/biz/navigation/tencentMeeting.d.ts +0 -22
- package/libs/api/biz/navigation/tencentMeeting.js +0 -15
- package/libs/api/biz/navigation/tencentMeetingBegin.d.ts +0 -7
- package/libs/api/biz/navigation/tencentMeetingBegin.js +0 -15
- package/libs/api/biz/navigation/updateExpandTitle.d.ts +0 -8
- package/libs/api/biz/navigation/updateExpandTitle.js +0 -15
- package/libs/api/biz/telephone/call.d.ts +0 -9
- package/libs/api/biz/telephone/call.js +0 -26
- package/libs/api/biz/telephone/showCallMenu.d.ts +0 -12
- package/libs/api/biz/telephone/showCallMenu.js +0 -26
- package/libs/api/biz/util/addAppToNav.d.ts +0 -9
- package/libs/api/biz/util/addAppToNav.js +0 -30
- package/libs/api/biz/util/assistantCreate.d.ts +0 -11
- package/libs/api/biz/util/assistantCreate.js +0 -30
- package/libs/api/biz/util/authFinish.d.ts +0 -11
- package/libs/api/biz/util/authFinish.js +0 -26
- package/libs/api/biz/util/authStart.d.ts +0 -9
- package/libs/api/biz/util/authStart.js +0 -26
- package/libs/api/biz/util/chosen.d.ts +0 -15
- package/libs/api/biz/util/chosen.js +0 -26
- package/libs/api/biz/util/clipboardFileUpload.d.ts +0 -7
- package/libs/api/biz/util/clipboardFileUpload.js +0 -15
- package/libs/api/biz/util/closeWindow.d.ts +0 -8
- package/libs/api/biz/util/closeWindow.js +0 -22
- package/libs/api/biz/util/complain.d.ts +0 -12
- package/libs/api/biz/util/complain.js +0 -15
- package/libs/api/biz/util/copy.d.ts +0 -11
- package/libs/api/biz/util/copy.js +0 -26
- package/libs/api/biz/util/createModifySchedule.d.ts +0 -26
- package/libs/api/biz/util/createModifySchedule.js +0 -22
- package/libs/api/biz/util/datepicker.d.ts +0 -14
- package/libs/api/biz/util/datepicker.js +0 -26
- package/libs/api/biz/util/datetimepicker.d.ts +0 -14
- package/libs/api/biz/util/datetimepicker.js +0 -26
- package/libs/api/biz/util/disableScreenCapture.d.ts +0 -8
- package/libs/api/biz/util/disableScreenCapture.js +0 -26
- package/libs/api/biz/util/downloadFile.d.ts +0 -9
- package/libs/api/biz/util/downloadFile.js +0 -15
- package/libs/api/biz/util/entergroupCheck.d.ts +0 -11
- package/libs/api/biz/util/entergroupCheck.js +0 -30
- package/libs/api/biz/util/externalLinkPreviewFile.d.ts +0 -11
- package/libs/api/biz/util/externalLinkPreviewFile.js +0 -15
- package/libs/api/biz/util/feedback.d.ts +0 -11
- package/libs/api/biz/util/feedback.js +0 -15
- package/libs/api/biz/util/getSingleWebviewData.d.ts +0 -8
- package/libs/api/biz/util/getSingleWebviewData.js +0 -15
- package/libs/api/biz/util/getTogetherConfig.d.ts +0 -11
- package/libs/api/biz/util/getTogetherConfig.js +0 -30
- package/libs/api/biz/util/getToken.d.ts +0 -11
- package/libs/api/biz/util/getToken.js +0 -26
- package/libs/api/biz/util/injectScript.d.ts +0 -9
- package/libs/api/biz/util/injectScript.js +0 -15
- package/libs/api/biz/util/invoice.d.ts +0 -12
- package/libs/api/biz/util/invoice.js +0 -23
- package/libs/api/biz/util/knowledgeBaseSelect.d.ts +0 -21
- package/libs/api/biz/util/knowledgeBaseSelect.js +0 -22
- package/libs/api/biz/util/lorebaseRefreshNodeWebview.d.ts +0 -11
- package/libs/api/biz/util/lorebaseRefreshNodeWebview.js +0 -26
- package/libs/api/biz/util/lorebaseShowList.d.ts +0 -11
- package/libs/api/biz/util/lorebaseShowList.js +0 -26
- package/libs/api/biz/util/mediaFileUpload.d.ts +0 -26
- package/libs/api/biz/util/mediaFileUpload.js +0 -23
- package/libs/api/biz/util/onlineDocmentOpenTeamChat.d.ts +0 -10
- package/libs/api/biz/util/onlineDocmentOpenTeamChat.js +0 -30
- package/libs/api/biz/util/open.d.ts +0 -9
- package/libs/api/biz/util/open.js +0 -15
- package/libs/api/biz/util/openFutureGroup.d.ts +0 -10
- package/libs/api/biz/util/openFutureGroup.js +0 -30
- package/libs/api/biz/util/openLink.d.ts +0 -8
- package/libs/api/biz/util/openLink.js +0 -15
- package/libs/api/biz/util/openMediaFileDialog.d.ts +0 -23
- package/libs/api/biz/util/openMediaFileDialog.js +0 -23
- package/libs/api/biz/util/openSingleWebview.d.ts +0 -23
- package/libs/api/biz/util/openSingleWebview.js +0 -22
- package/libs/api/biz/util/openSlidePanel.d.ts +0 -11
- package/libs/api/biz/util/openSlidePanel.js +0 -22
- package/libs/api/biz/util/openTalYoungToTopic.d.ts +0 -6
- package/libs/api/biz/util/openTalYoungToTopic.js +0 -23
- package/libs/api/biz/util/openTogetherEyeWebview.d.ts +0 -11
- package/libs/api/biz/util/openTogetherEyeWebview.js +0 -30
- package/libs/api/biz/util/openUserSchedule.d.ts +0 -11
- package/libs/api/biz/util/openUserSchedule.js +0 -30
- package/libs/api/biz/util/openVideoPlayer.d.ts +0 -27
- package/libs/api/biz/util/openVideoPlayer.js +0 -30
- package/libs/api/biz/util/previewFile.d.ts +0 -11
- package/libs/api/biz/util/previewFile.js +0 -15
- package/libs/api/biz/util/previewImage.d.ts +0 -9
- package/libs/api/biz/util/previewImage.js +0 -15
- package/libs/api/biz/util/proxy.d.ts +0 -13
- package/libs/api/biz/util/proxy.js +0 -15
- package/libs/api/biz/util/pushWorkMsg.d.ts +0 -10
- package/libs/api/biz/util/pushWorkMsg.js +0 -23
- package/libs/api/biz/util/remind.d.ts +0 -15
- package/libs/api/biz/util/remind.js +0 -30
- package/libs/api/biz/util/resetSessionUnread.d.ts +0 -8
- package/libs/api/biz/util/resetSessionUnread.js +0 -28
- package/libs/api/biz/util/rouseApp.d.ts +0 -12
- package/libs/api/biz/util/rouseApp.js +0 -23
- package/libs/api/biz/util/savePic.d.ts +0 -8
- package/libs/api/biz/util/savePic.js +0 -26
- package/libs/api/biz/util/scan.d.ts +0 -11
- package/libs/api/biz/util/scan.js +0 -26
- package/libs/api/biz/util/selectDepartment.d.ts +0 -9
- package/libs/api/biz/util/selectDepartment.js +0 -15
- package/libs/api/biz/util/share.d.ts +0 -12
- package/libs/api/biz/util/share.js +0 -26
- package/libs/api/biz/util/takePicture.d.ts +0 -13
- package/libs/api/biz/util/takePicture.js +0 -15
- package/libs/api/biz/util/uploadAttachment.d.ts +0 -55
- package/libs/api/biz/util/uploadAttachment.js +0 -15
- package/libs/api/biz/util/yachEvent.d.ts +0 -12
- package/libs/api/biz/util/yachEvent.js +0 -34
- package/libs/api/biz/util/zfbAuth.d.ts +0 -10
- package/libs/api/biz/util/zfbAuth.js +0 -26
- package/libs/api/biz/webViewMessage/send.d.ts +0 -7
- package/libs/api/biz/webViewMessage/send.js +0 -22
- package/libs/api/common.typings.d.ts +0 -9
- package/libs/api/common.typings.js +0 -1
- package/libs/api/device/audio/download.d.ts +0 -8
- package/libs/api/device/audio/download.js +0 -26
- package/libs/api/device/audio/onPlayEnd.d.ts +0 -7
- package/libs/api/device/audio/onPlayEnd.js +0 -26
- package/libs/api/device/audio/onRecordEnd.d.ts +0 -7
- package/libs/api/device/audio/onRecordEnd.js +0 -26
- package/libs/api/device/audio/onRecordEnd_v2.d.ts +0 -7
- package/libs/api/device/audio/onRecordEnd_v2.js +0 -26
- package/libs/api/device/audio/pause.d.ts +0 -8
- package/libs/api/device/audio/pause.js +0 -26
- package/libs/api/device/audio/play.d.ts +0 -8
- package/libs/api/device/audio/play.js +0 -26
- package/libs/api/device/audio/resume.d.ts +0 -8
- package/libs/api/device/audio/resume.js +0 -26
- package/libs/api/device/audio/startRecord.d.ts +0 -8
- package/libs/api/device/audio/startRecord.js +0 -26
- package/libs/api/device/audio/startRecord_v2.d.ts +0 -8
- package/libs/api/device/audio/startRecord_v2.js +0 -26
- package/libs/api/device/audio/stop.d.ts +0 -8
- package/libs/api/device/audio/stop.js +0 -26
- package/libs/api/device/audio/stopRecord.d.ts +0 -7
- package/libs/api/device/audio/stopRecord.js +0 -26
- package/libs/api/device/audio/stopRecord_v2.d.ts +0 -7
- package/libs/api/device/audio/stopRecord_v2.js +0 -26
- package/libs/api/device/base/checkStepPermission.d.ts +0 -8
- package/libs/api/device/base/checkStepPermission.js +0 -26
- package/libs/api/device/base/getPhoneInfo.d.ts +0 -16
- package/libs/api/device/base/getPhoneInfo.js +0 -26
- package/libs/api/device/base/getUUID.d.ts +0 -10
- package/libs/api/device/base/getUUID.js +0 -30
- package/libs/api/device/connection/getNetworkType.d.ts +0 -10
- package/libs/api/device/connection/getNetworkType.js +0 -26
- package/libs/api/device/connection/isAtTal.d.ts +0 -10
- package/libs/api/device/connection/isAtTal.js +0 -28
- package/libs/api/device/geolocation/get.d.ts +0 -42
- package/libs/api/device/geolocation/get.js +0 -26
- package/libs/api/device/geolocation/getSwitch.d.ts +0 -10
- package/libs/api/device/geolocation/getSwitch.js +0 -22
- package/libs/api/device/notification/actionSheet.d.ts +0 -15
- package/libs/api/device/notification/actionSheet.js +0 -26
- package/libs/api/device/notification/alert.d.ts +0 -13
- package/libs/api/device/notification/alert.js +0 -30
- package/libs/api/device/notification/confirm.d.ts +0 -16
- package/libs/api/device/notification/confirm.js +0 -30
- package/libs/api/device/notification/hidePreloader.d.ts +0 -7
- package/libs/api/device/notification/hidePreloader.js +0 -26
- package/libs/api/device/notification/showPreloader.d.ts +0 -9
- package/libs/api/device/notification/showPreloader.js +0 -26
- package/libs/api/device/notification/toast.d.ts +0 -15
- package/libs/api/device/notification/toast.js +0 -15
- package/libs/api/device/notification/vibrate.d.ts +0 -8
- package/libs/api/device/notification/vibrate.js +0 -26
- package/libs/api/device/system/getLang.d.ts +0 -10
- package/libs/api/device/system/getLang.js +0 -15
- package/libs/api/device/system/setLight.d.ts +0 -8
- package/libs/api/device/system/setLight.js +0 -26
- package/libs/api/initAPI.d.ts +0 -6
- package/libs/api/initAPI.js +0 -29
- package/libs/api/primary/createTab.d.ts +0 -13
- package/libs/api/primary/createTab.js +0 -22
- package/libs/api/primary/exitFullScreen.d.ts +0 -7
- package/libs/api/primary/exitFullScreen.js +0 -22
- package/libs/api/primary/fullScreen.d.ts +0 -7
- package/libs/api/primary/fullScreen.js +0 -22
- package/libs/api/primary/weeklyShare.d.ts +0 -13
- package/libs/api/primary/weeklyShare.js +0 -22
- package/libs/api/runtime/permission/requestAuthCode.d.ts +0 -12
- package/libs/api/runtime/permission/requestAuthCode.js +0 -15
- package/libs/api/ui/pullToRefresh/disable.d.ts +0 -7
- package/libs/api/ui/pullToRefresh/disable.js +0 -26
- package/libs/api/ui/pullToRefresh/enable.d.ts +0 -7
- package/libs/api/ui/pullToRefresh/enable.js +0 -26
- package/libs/api/ui/pullToRefresh/stop.d.ts +0 -7
- package/libs/api/ui/pullToRefresh/stop.js +0 -26
- package/libs/api/ui/webViewBounce/disable.d.ts +0 -7
- package/libs/api/ui/webViewBounce/disable.js +0 -22
- package/libs/api/util/domainStorage/getItem.d.ts +0 -12
- package/libs/api/util/domainStorage/getItem.js +0 -26
- package/libs/api/util/domainStorage/removeItem.d.ts +0 -9
- package/libs/api/util/domainStorage/removeItem.js +0 -26
- package/libs/api/util/domainStorage/setItem.d.ts +0 -11
- package/libs/api/util/domainStorage/setItem.js +0 -26
- package/libs/api/util/tool/flushLog.d.ts +0 -7
- package/libs/api/util/tool/flushLog.js +0 -22
- package/libs/api/util/tool/log.d.ts +0 -9
- package/libs/api/util/tool/log.js +0 -22
- package/libs/index.d.ts +0 -325
- package/libs/index.js +0 -1098
- package/libs/lib/bridge/index.d.ts +0 -2
- package/libs/lib/bridge/index.js +0 -32
- package/libs/lib/bridge/mobile.d.ts +0 -13
- package/libs/lib/bridge/mobile.js +0 -185
- package/libs/lib/bridge/pc.d.ts +0 -4
- package/libs/lib/bridge/pc.js +0 -93
- package/libs/lib/helper/apiHelper.d.ts +0 -2
- package/libs/lib/helper/apiHelper.js +0 -15
- package/libs/lib/helper/codeMap.d.ts +0 -2
- package/libs/lib/helper/codeMap.js +0 -13
- package/libs/lib/helper/event.d.ts +0 -9
- package/libs/lib/helper/event.js +0 -48
- package/libs/lib/helper/pcIframe.d.ts +0 -44
- package/libs/lib/helper/pcIframe.js +0 -158
- package/libs/lib/index.d.ts +0 -4
- package/libs/lib/index.js +0 -86
- package/libs/lib/sdk/index.d.ts +0 -19
- package/libs/lib/sdk/index.js +0 -178
- package/libs/lib/sdk/sdk.typings.d.ts +0 -85
- package/libs/lib/sdk/sdk.typings.js +0 -14
- package/libs/utils/bpitLog.d.ts +0 -16
- package/libs/utils/bpitLog.js +0 -69
- package/libs/utils/compareVersions.d.ts +0 -58
- package/libs/utils/compareVersions.js +0 -173
- package/libs/utils/console.d.ts +0 -4
- package/libs/utils/console.js +0 -53
- package/libs/utils/env.d.ts +0 -3
- package/libs/utils/env.js +0 -51
- package/libs/utils/index.d.ts +0 -4
- package/libs/utils/index.js +0 -51
package/libs/lib/bridge/index.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
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");
|
|
@@ -1,13 +0,0 @@
|
|
|
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 };
|
|
@@ -1,185 +0,0 @@
|
|
|
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
|
-
};
|
package/libs/lib/bridge/pc.d.ts
DELETED
package/libs/lib/bridge/pc.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
-
;
|
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
}
|
package/libs/lib/helper/event.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
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;
|
|
@@ -1,44 +0,0 @@
|
|
|
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;
|
|
@@ -1,158 +0,0 @@
|
|
|
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;
|
package/libs/lib/index.d.ts
DELETED