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/es/lib/helper/event.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
2
|
-
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
3
|
-
import _Array$isArray from "@babel/runtime-corejs3/core-js/array/is-array";
|
|
4
|
-
import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js/instance/index-of";
|
|
5
|
-
import _spliceInstanceProperty from "@babel/runtime-corejs3/core-js/instance/splice";
|
|
6
|
-
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js/instance/for-each";
|
|
7
|
-
var Event = /*#__PURE__*/_createClass(function Event() {
|
|
8
|
-
var _this = this;
|
|
9
|
-
_classCallCheck(this, Event);
|
|
10
|
-
this.on = function (event, fn) {
|
|
11
|
-
if (!event || 'function' !== typeof fn) throw 'eventName is null or handle is not a function, on fail';
|
|
12
|
-
if (!_Array$isArray(_this.eventsHandle[event])) _this.eventsHandle[event] = [];
|
|
13
|
-
_this.eventsHandle[event].push(fn);
|
|
14
|
-
};
|
|
15
|
-
this.off = function (event, fn) {
|
|
16
|
-
if (!event) throw 'eventName is null, invoke off fail';
|
|
17
|
-
if (!fn) {
|
|
18
|
-
_this.eventsHandle[event] = [];
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
if (_Array$isArray(_this.eventsHandle[event])) {
|
|
22
|
-
var _context, _context2;
|
|
23
|
-
var n = _indexOfInstanceProperty(_context = _this.eventsHandle[event]).call(_context, fn);
|
|
24
|
-
-1 !== n && _spliceInstanceProperty(_context2 = _this.eventsHandle[event]).call(_context2, n, 1);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
this.execEvent = function (event, data) {
|
|
28
|
-
var _context3;
|
|
29
|
-
_Array$isArray(this.eventsHandle[event]) && _forEachInstanceProperty(_context3 = this.eventsHandle[event]).call(_context3, function (fn) {
|
|
30
|
-
try {
|
|
31
|
-
fn(data);
|
|
32
|
-
} catch (t) {
|
|
33
|
-
console.error(data);
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
this.eventsHandle = {};
|
|
38
|
-
});
|
|
39
|
-
var event = new Event();
|
|
40
|
-
export 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,150 +0,0 @@
|
|
|
1
|
-
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
2
|
-
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
3
|
-
import _Date$now from "@babel/runtime-corejs3/core-js/date/now";
|
|
4
|
-
import _JSON$stringify from "@babel/runtime-corejs3/core-js/json/stringify";
|
|
5
|
-
import { log } from '../../utils';
|
|
6
|
-
import Event from './event';
|
|
7
|
-
// 处理posmessage参数
|
|
8
|
-
var GenPostMsg = /*#__PURE__*/_createClass(function GenPostMsg(method, param, callback) {
|
|
9
|
-
var _this = this;
|
|
10
|
-
_classCallCheck(this, GenPostMsg);
|
|
11
|
-
this.genid = function () {
|
|
12
|
-
var idStr = _Date$now().toString(36);
|
|
13
|
-
idStr += Math.random().toString(36).substr(3);
|
|
14
|
-
return idStr;
|
|
15
|
-
};
|
|
16
|
-
this.receiveResponse = function (data) {
|
|
17
|
-
//this.PromiseObj.resolve(data);
|
|
18
|
-
_this.callback(data);
|
|
19
|
-
};
|
|
20
|
-
this.getPayload = function () {
|
|
21
|
-
return {
|
|
22
|
-
msgId: _this.id,
|
|
23
|
-
methodName: _this.methodName,
|
|
24
|
-
body: _this.plainMsg,
|
|
25
|
-
type: 'request',
|
|
26
|
-
invokeType: _this.invokeType
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
this.id = this.genid();
|
|
30
|
-
this.PromiseObj = {
|
|
31
|
-
resolve: null,
|
|
32
|
-
reject: null
|
|
33
|
-
};
|
|
34
|
-
this.methodName = method;
|
|
35
|
-
this.plainMsg = param;
|
|
36
|
-
this.invokeType = param === null || param === void 0 ? void 0 : param.invokeType;
|
|
37
|
-
this.callback = callback;
|
|
38
|
-
// this.result = new Promise(
|
|
39
|
-
// function (resolve, reject) {
|
|
40
|
-
// this.PromiseObj = {
|
|
41
|
-
// resolve,
|
|
42
|
-
// reject,
|
|
43
|
-
// };
|
|
44
|
-
// }.bind(this)
|
|
45
|
-
// );
|
|
46
|
-
});
|
|
47
|
-
var Frame = /*#__PURE__*/_createClass(function Frame() {
|
|
48
|
-
var _this2 = this;
|
|
49
|
-
_classCallCheck(this, Frame);
|
|
50
|
-
this.addPending = function (e) {
|
|
51
|
-
_this2.pendingMsgs[e.id] = e;
|
|
52
|
-
};
|
|
53
|
-
this.deletePending = function (e) {
|
|
54
|
-
delete _this2.pendingMsgs[e.id];
|
|
55
|
-
};
|
|
56
|
-
this.getPending = function (t) {
|
|
57
|
-
return this.pendingMsgs[t];
|
|
58
|
-
};
|
|
59
|
-
this.invokeAPIInBrowserView = function (payload) {
|
|
60
|
-
window.sendTo(payload);
|
|
61
|
-
};
|
|
62
|
-
this.invokeAPIInWebview = function (payload) {
|
|
63
|
-
window.sendToHost(payload);
|
|
64
|
-
};
|
|
65
|
-
this.invokeAPI = function (method, param, callback) {
|
|
66
|
-
var genPostMsg = new GenPostMsg(method, param, callback);
|
|
67
|
-
var payload = _JSON$stringify(genPostMsg.getPayload());
|
|
68
|
-
var _param$invokeType = param.invokeType,
|
|
69
|
-
invokeType = _param$invokeType === void 0 ? '' : _param$invokeType;
|
|
70
|
-
invokeType === 'browserView' ? _this2.invokeAPIInBrowserView(payload) : _this2.invokeAPIInWebview(payload);
|
|
71
|
-
_this2.addPending(genPostMsg);
|
|
72
|
-
return genPostMsg;
|
|
73
|
-
};
|
|
74
|
-
this.handleCallback = function (datas, invokeType) {
|
|
75
|
-
var type = datas.type,
|
|
76
|
-
methodName = datas.methodName,
|
|
77
|
-
eventName = datas.eventName,
|
|
78
|
-
msgId = datas.msgId,
|
|
79
|
-
_datas$data = datas.data,
|
|
80
|
-
data = _datas$data === void 0 ? {} : _datas$data,
|
|
81
|
-
code = datas.code,
|
|
82
|
-
message = datas.message,
|
|
83
|
-
msg = datas.msg;
|
|
84
|
-
if (type === 'request') {
|
|
85
|
-
// 壳子的调用
|
|
86
|
-
switch (methodName) {
|
|
87
|
-
case 'refresh':
|
|
88
|
-
window.location.reload();
|
|
89
|
-
break;
|
|
90
|
-
case 'back':
|
|
91
|
-
window.history.back();
|
|
92
|
-
break;
|
|
93
|
-
case 'forward':
|
|
94
|
-
window.history.forward();
|
|
95
|
-
break;
|
|
96
|
-
case 'event':
|
|
97
|
-
Event.execEvent(eventName, data);
|
|
98
|
-
break;
|
|
99
|
-
case 'zoomInClick':
|
|
100
|
-
var scrollTopVal = document.documentElement.scrollTop || document.body.scrollTop,
|
|
101
|
-
url = window.location.href;
|
|
102
|
-
if (invokeType === 'browserView') {
|
|
103
|
-
window.sendTo(_JSON$stringify({
|
|
104
|
-
type: type,
|
|
105
|
-
methodName: methodName,
|
|
106
|
-
body: {
|
|
107
|
-
scrollTopVal: scrollTopVal,
|
|
108
|
-
url: url,
|
|
109
|
-
title: data && data.title
|
|
110
|
-
}
|
|
111
|
-
}));
|
|
112
|
-
} else {
|
|
113
|
-
window.sendToHost(_JSON$stringify({
|
|
114
|
-
type: type,
|
|
115
|
-
methodName: methodName,
|
|
116
|
-
body: {
|
|
117
|
-
scrollTopVal: scrollTopVal,
|
|
118
|
-
url: url,
|
|
119
|
-
title: data && data.title
|
|
120
|
-
}
|
|
121
|
-
}));
|
|
122
|
-
}
|
|
123
|
-
break;
|
|
124
|
-
default:
|
|
125
|
-
break;
|
|
126
|
-
}
|
|
127
|
-
} else if (type === 'response') {
|
|
128
|
-
// 响应壳子的回调
|
|
129
|
-
var pending = _this2.getPending(msgId);
|
|
130
|
-
pending && pending.receiveResponse({
|
|
131
|
-
data: data,
|
|
132
|
-
code: code,
|
|
133
|
-
message: message || msg || data.msg || data.message
|
|
134
|
-
});
|
|
135
|
-
code != -3 && _this2.deletePending(msgId);
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
this.init = function () {
|
|
139
|
-
window.addEventListener('message', function (msg) {
|
|
140
|
-
log('electron res: ', msg);
|
|
141
|
-
_this2.handleCallback(msg.data || {});
|
|
142
|
-
});
|
|
143
|
-
window.receiveBrowserViewData && window.receiveBrowserViewData(function (e, response) {
|
|
144
|
-
return _this2.handleCallback(response);
|
|
145
|
-
});
|
|
146
|
-
};
|
|
147
|
-
this.pendingMsgs = {};
|
|
148
|
-
});
|
|
149
|
-
var frame = new Frame();
|
|
150
|
-
export default frame;
|
package/es/lib/index.d.ts
DELETED
package/es/lib/index.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
|
|
2
|
-
import _Promise from "@babel/runtime-corejs3/core-js/promise";
|
|
3
|
-
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
4
|
-
function adopt(value) {
|
|
5
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
6
|
-
resolve(value);
|
|
7
|
-
});
|
|
8
|
-
}
|
|
9
|
-
return new (P || (P = _Promise))(function (resolve, reject) {
|
|
10
|
-
function fulfilled(value) {
|
|
11
|
-
try {
|
|
12
|
-
step(generator.next(value));
|
|
13
|
-
} catch (e) {
|
|
14
|
-
reject(e);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
function rejected(value) {
|
|
18
|
-
try {
|
|
19
|
-
step(generator["throw"](value));
|
|
20
|
-
} catch (e) {
|
|
21
|
-
reject(e);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
function step(result) {
|
|
25
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
26
|
-
}
|
|
27
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
import { getENV } from '../utils';
|
|
31
|
-
import Sdk from './sdk';
|
|
32
|
-
import { mobileBridge, mobileBridgeInit, PcBridgeInit, pcBridge } from './bridge';
|
|
33
|
-
import Event from './helper/event';
|
|
34
|
-
var env = getENV();
|
|
35
|
-
var platform = env.platform;
|
|
36
|
-
var yachSdk = new Sdk(env);
|
|
37
|
-
function initSdk() {
|
|
38
|
-
var _this = this;
|
|
39
|
-
var bridgeInit;
|
|
40
|
-
if (platform === 'pc') {
|
|
41
|
-
bridgeInit = function bridgeInit() {
|
|
42
|
-
return __awaiter(_this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
43
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
44
|
-
while (1) switch (_context.prev = _context.next) {
|
|
45
|
-
case 0:
|
|
46
|
-
PcBridgeInit();
|
|
47
|
-
return _context.abrupt("return", pcBridge);
|
|
48
|
-
case 2:
|
|
49
|
-
case "end":
|
|
50
|
-
return _context.stop();
|
|
51
|
-
}
|
|
52
|
-
}, _callee);
|
|
53
|
-
}));
|
|
54
|
-
};
|
|
55
|
-
} else {
|
|
56
|
-
bridgeInit = function bridgeInit() {
|
|
57
|
-
return mobileBridgeInit().then(function () {
|
|
58
|
-
return mobileBridge;
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
var config = {
|
|
63
|
-
platform: platform,
|
|
64
|
-
authMethod: 'config',
|
|
65
|
-
bridgeInit: bridgeInit,
|
|
66
|
-
event: {
|
|
67
|
-
on: function on(event, fn) {
|
|
68
|
-
Event.on(event, fn);
|
|
69
|
-
},
|
|
70
|
-
off: function off(event, fn) {
|
|
71
|
-
Event.off(event, fn);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
yachSdk.setPlatform(config);
|
|
76
|
-
}
|
|
77
|
-
initSdk();
|
|
78
|
-
export { yachSdk, initSdk };
|
package/es/lib/sdk/index.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { IInvokeAPIConfigMap, IPlatformConfig, IENV, IUNCore } from './sdk.typings';
|
|
2
|
-
declare class Sdk {
|
|
3
|
-
private invokeAPIConfigMapByMethod;
|
|
4
|
-
private configJsApiList;
|
|
5
|
-
private platformConfigMap;
|
|
6
|
-
private hadConfig;
|
|
7
|
-
private env;
|
|
8
|
-
private bridgeInitFnPromise;
|
|
9
|
-
private cacheP;
|
|
10
|
-
private config$;
|
|
11
|
-
constructor(env: IENV);
|
|
12
|
-
exportSdk: IUNCore;
|
|
13
|
-
setAPI(method: string, config: IInvokeAPIConfigMap): void;
|
|
14
|
-
setPlatform(value: IPlatformConfig): void;
|
|
15
|
-
bridgeInitFn(): any;
|
|
16
|
-
_onFail(method: any, errorcode: any, message: any, onFail: any): void;
|
|
17
|
-
invokeAPI(method: string, params?: any): void;
|
|
18
|
-
}
|
|
19
|
-
export default Sdk;
|
package/es/lib/sdk/index.js
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
3
|
-
import _Promise from "@babel/runtime-corejs3/core-js/promise";
|
|
4
|
-
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
5
|
-
import { bpitLog, log } from '../../utils';
|
|
6
|
-
import { compareVersions } from '../../utils/compareVersions';
|
|
7
|
-
import packageInfo from '../../../package.json';
|
|
8
|
-
var Sdk = /*#__PURE__*/function () {
|
|
9
|
-
function Sdk(env) {
|
|
10
|
-
var _this = this;
|
|
11
|
-
_classCallCheck(this, Sdk);
|
|
12
|
-
this.invokeAPIConfigMapByMethod = {};
|
|
13
|
-
this.configJsApiList = [];
|
|
14
|
-
this.platformConfigMap = {};
|
|
15
|
-
this.hadConfig = false;
|
|
16
|
-
this.bridgeInitFnPromise = null;
|
|
17
|
-
this.cacheP = {};
|
|
18
|
-
this.config$ = new _Promise(function (a, b) {
|
|
19
|
-
_this.cacheP.resolve = a;
|
|
20
|
-
_this.cacheP.reject = b;
|
|
21
|
-
});
|
|
22
|
-
this.env = env;
|
|
23
|
-
this.exportSdk = {
|
|
24
|
-
version: env.version,
|
|
25
|
-
sdkVersion: packageInfo.version,
|
|
26
|
-
// sdkVersion: '0.0.0',
|
|
27
|
-
env: env,
|
|
28
|
-
platform: env.platform,
|
|
29
|
-
platformV2: env.platformV2,
|
|
30
|
-
config: function config() {
|
|
31
|
-
var _config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
32
|
-
// 鉴权
|
|
33
|
-
var _config$jsApiList = _config.jsApiList,
|
|
34
|
-
jsApiList = _config$jsApiList === void 0 ? [] : _config$jsApiList;
|
|
35
|
-
if (_this.hadConfig) {
|
|
36
|
-
console.log('Config has been executed');
|
|
37
|
-
} else {
|
|
38
|
-
_this.bridgeInitFn().then(function (fn) {
|
|
39
|
-
fn('config', _config).then(function (value) {
|
|
40
|
-
// 鉴权成功
|
|
41
|
-
_this.cacheP.resolve(value);
|
|
42
|
-
_this.hadConfig = true;
|
|
43
|
-
_this.configJsApiList = jsApiList;
|
|
44
|
-
})["catch"](function (error) {
|
|
45
|
-
// 后台鉴权失败
|
|
46
|
-
_this.cacheP.reject(error);
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
ready: function ready(fn) {
|
|
52
|
-
_this.bridgeInitFn().then(function () {
|
|
53
|
-
fn();
|
|
54
|
-
});
|
|
55
|
-
},
|
|
56
|
-
error: function error(fn) {
|
|
57
|
-
_this.config$["catch"](function (error) {
|
|
58
|
-
fn(error);
|
|
59
|
-
});
|
|
60
|
-
},
|
|
61
|
-
on: function on(o, n) {
|
|
62
|
-
_this.bridgeInitFn().then(function () {
|
|
63
|
-
_this.platformConfigMap[env.platform].event.on(o, n);
|
|
64
|
-
});
|
|
65
|
-
},
|
|
66
|
-
off: function off(o, n) {
|
|
67
|
-
_this.bridgeInitFn().then(function () {
|
|
68
|
-
_this.platformConfigMap[env.platform].event.off(o, n);
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
_createClass(Sdk, [{
|
|
74
|
-
key: "setAPI",
|
|
75
|
-
value: function setAPI(method, config) {
|
|
76
|
-
this.invokeAPIConfigMapByMethod[method] = config;
|
|
77
|
-
}
|
|
78
|
-
// 确定端的同事初始化bridge
|
|
79
|
-
}, {
|
|
80
|
-
key: "setPlatform",
|
|
81
|
-
value: function setPlatform(value) {
|
|
82
|
-
var platform = value.platform,
|
|
83
|
-
bridgeInit = value.bridgeInit;
|
|
84
|
-
this.platformConfigMap[platform] = value;
|
|
85
|
-
// if (this.env.platform === platform) bridgeInit();
|
|
86
|
-
}
|
|
87
|
-
}, {
|
|
88
|
-
key: "bridgeInitFn",
|
|
89
|
-
value: function bridgeInitFn() {
|
|
90
|
-
// 平台环境不对再调用api就肯定失败
|
|
91
|
-
if (this.bridgeInitFnPromise) {
|
|
92
|
-
return this.bridgeInitFnPromise;
|
|
93
|
-
}
|
|
94
|
-
var o = this.platformConfigMap[this.env.platform];
|
|
95
|
-
if (o) {
|
|
96
|
-
this.bridgeInitFnPromise = o.bridgeInit();
|
|
97
|
-
} else {
|
|
98
|
-
var n = 'Do not support the current environment�' + this.env.platform;
|
|
99
|
-
this.bridgeInitFnPromise = _Promise.reject(new Error(n));
|
|
100
|
-
}
|
|
101
|
-
return this.bridgeInitFnPromise;
|
|
102
|
-
}
|
|
103
|
-
}, {
|
|
104
|
-
key: "_onFail",
|
|
105
|
-
value: function _onFail(method, errorcode, message, onFail) {
|
|
106
|
-
bpitLog({
|
|
107
|
-
method: method,
|
|
108
|
-
errorcode: errorcode,
|
|
109
|
-
message: message
|
|
110
|
-
});
|
|
111
|
-
onFail && typeof onFail == 'function' && onFail({
|
|
112
|
-
code: errorcode,
|
|
113
|
-
message: message
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
}, {
|
|
117
|
-
key: "invokeAPI",
|
|
118
|
-
value: function invokeAPI(method, params) {
|
|
119
|
-
var _context2;
|
|
120
|
-
if (!params) params = {};
|
|
121
|
-
if (!method) return;
|
|
122
|
-
// 验证方法是否可用
|
|
123
|
-
var apiConfigs = this.invokeAPIConfigMapByMethod[method];
|
|
124
|
-
if (!apiConfigs) {
|
|
125
|
-
return this._onFail(method, '-1', "[".concat(method, "] method is not exist"), params.onFail);
|
|
126
|
-
}
|
|
127
|
-
var apiConfig = apiConfigs[this.env.platform];
|
|
128
|
-
if (apiConfig) {
|
|
129
|
-
var supportVersion = apiConfig.vs || '0.0.0';
|
|
130
|
-
if (compareVersions(this.env.version, supportVersion) < 0) {
|
|
131
|
-
var _context;
|
|
132
|
-
return this._onFail(method, '-1', _concatInstanceProperty(_context = "The current application version is ".concat(this.env.version, ". This method does not support versions less than ")).call(_context, supportVersion), params.onFail);
|
|
133
|
-
}
|
|
134
|
-
// 确定参数
|
|
135
|
-
var p = apiConfig.paramsDeal ? apiConfig.paramsDeal(params) : params;
|
|
136
|
-
// 确定回调
|
|
137
|
-
if ('function' == typeof p.onSuccess) {
|
|
138
|
-
var v = p.onSuccess;
|
|
139
|
-
p.onSuccess = function (e) {
|
|
140
|
-
v(e);
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
// 主方法
|
|
144
|
-
this.bridgeInitFn().then(function (fn) {
|
|
145
|
-
fn(method, p).then(function (res) {
|
|
146
|
-
// 调用成功
|
|
147
|
-
log("SDK \u8FD4\u56DE\u7ED3\u679C\u6210\u529F ", {
|
|
148
|
-
method: method,
|
|
149
|
-
params: p,
|
|
150
|
-
result: res
|
|
151
|
-
});
|
|
152
|
-
})["catch"](function (error) {
|
|
153
|
-
// 调用失败
|
|
154
|
-
log("SDK \u8FD4\u56DE\u7ED3\u679C\u5931\u8D25", {
|
|
155
|
-
method: method,
|
|
156
|
-
params: p,
|
|
157
|
-
error: error
|
|
158
|
-
});
|
|
159
|
-
});
|
|
160
|
-
})["catch"](function (err) {
|
|
161
|
-
console.log('wenai err', err);
|
|
162
|
-
});
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
165
|
-
this._onFail(method, '-1', _concatInstanceProperty(_context2 = "[".concat(method, "] method do not support the current platform (")).call(_context2, this.env.platform, ")"), params.onFail);
|
|
166
|
-
}
|
|
167
|
-
}]);
|
|
168
|
-
return Sdk;
|
|
169
|
-
}();
|
|
170
|
-
export default Sdk;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
export declare enum ENV_ENUM {
|
|
2
|
-
pc = "pc",
|
|
3
|
-
android = "android",
|
|
4
|
-
ios = "ios",
|
|
5
|
-
notInYach = "notInYach"
|
|
6
|
-
}
|
|
7
|
-
export declare enum ERROR_CODE {
|
|
8
|
-
cancel = "-1",
|
|
9
|
-
not_exist = "1",
|
|
10
|
-
no_permission = "7",
|
|
11
|
-
jsapi_internal_error = "22"
|
|
12
|
-
}
|
|
13
|
-
export interface PlatformV2Props {
|
|
14
|
-
inYach: boolean;
|
|
15
|
-
inIOS: boolean;
|
|
16
|
-
inAndroid: boolean;
|
|
17
|
-
inPC: boolean;
|
|
18
|
-
inIpad: boolean;
|
|
19
|
-
inIPhone: boolean;
|
|
20
|
-
}
|
|
21
|
-
export interface IENV {
|
|
22
|
-
/** current platform (ios or android or pc or notInYach) */
|
|
23
|
-
platform: ENV_ENUM;
|
|
24
|
-
/** current client version */
|
|
25
|
-
version?: string;
|
|
26
|
-
/** @deprecated recommend use navigator.language to get current language */
|
|
27
|
-
language?: string;
|
|
28
|
-
platformV2: PlatformV2Props;
|
|
29
|
-
env: 'test' | 'online';
|
|
30
|
-
}
|
|
31
|
-
export interface IInvokeAPIConfigMap {
|
|
32
|
-
[platform: string]: IAPIConfig | undefined;
|
|
33
|
-
}
|
|
34
|
-
export interface IAPIConfig {
|
|
35
|
-
/** version */
|
|
36
|
-
vs: string;
|
|
37
|
-
paramsDeal?: (params: object) => object;
|
|
38
|
-
}
|
|
39
|
-
export interface IInvokeAPIConfigMapByMethod {
|
|
40
|
-
[method: string]: IInvokeAPIConfigMap | undefined;
|
|
41
|
-
}
|
|
42
|
-
/** config参数 */
|
|
43
|
-
export interface IConfigParams {
|
|
44
|
-
jsApiList?: string[];
|
|
45
|
-
[key: string]: any;
|
|
46
|
-
}
|
|
47
|
-
export interface IPlatformConfig {
|
|
48
|
-
platform: string;
|
|
49
|
-
authMethod: string;
|
|
50
|
-
authParamsDeal?: (params: object) => object;
|
|
51
|
-
bridgeInit: () => Promise<IJSBridge>;
|
|
52
|
-
event: {
|
|
53
|
-
on: (type: string, handler: (e: any) => void) => void;
|
|
54
|
-
off: (type: string, handler: (e: any) => void) => void;
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
/** jsbridgehui回调函数 */
|
|
58
|
-
export declare type mobileCallback = (e: {
|
|
59
|
-
code: string;
|
|
60
|
-
message: string;
|
|
61
|
-
data?: Record<string, any>;
|
|
62
|
-
}) => void;
|
|
63
|
-
/** 定义主方法 */
|
|
64
|
-
export interface IUNCore {
|
|
65
|
-
config: (configParams: IConfigParams) => void;
|
|
66
|
-
env: IENV;
|
|
67
|
-
ready: (readyCallback: () => void) => void;
|
|
68
|
-
error: (callback: (err: any) => void) => void;
|
|
69
|
-
version: string;
|
|
70
|
-
sdkVersion: string;
|
|
71
|
-
platform: ENV_ENUM;
|
|
72
|
-
platformV2: PlatformV2Props;
|
|
73
|
-
on: (methodName: string, listener: (e: any) => void) => void;
|
|
74
|
-
off: (methodName: string, listener: (e: any) => void) => void;
|
|
75
|
-
}
|
|
76
|
-
/** all platform map */
|
|
77
|
-
export interface IConfigCoreMap {
|
|
78
|
-
[platform: string]: IPlatformConfig | undefined;
|
|
79
|
-
}
|
|
80
|
-
/** bridge主方法 */
|
|
81
|
-
export declare type IJSBridge = (method: string, params: any) => Promise<any>;
|
|
82
|
-
export interface IcacheP {
|
|
83
|
-
resolve?: (value: any) => void;
|
|
84
|
-
reject?: (error: any) => void;
|
|
85
|
-
}
|
package/es/utils/bpitLog.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
interface Options {
|
|
2
|
-
group: string;
|
|
3
|
-
project: string;
|
|
4
|
-
env: string;
|
|
5
|
-
version: string;
|
|
6
|
-
method?: string;
|
|
7
|
-
yachid?: string;
|
|
8
|
-
workcode?: string;
|
|
9
|
-
timestamp?: number;
|
|
10
|
-
api?: string;
|
|
11
|
-
time?: number;
|
|
12
|
-
errorcode?: string;
|
|
13
|
-
message?: string;
|
|
14
|
-
}
|
|
15
|
-
export default function bpitLog(options: Options): void;
|
|
16
|
-
export {};
|
package/es/utils/bpitLog.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
function loadScript(url) {
|
|
2
|
-
var script = document.createElement('script');
|
|
3
|
-
script.type = 'text/javascript';
|
|
4
|
-
if (script.readyState) {
|
|
5
|
-
// ie 浏览器
|
|
6
|
-
script.onreadystatechange = function () {
|
|
7
|
-
if (script.readyState == 'loaded' || script.readyState == 'complete') {
|
|
8
|
-
script.onreadystatechange = null;
|
|
9
|
-
document.getElementsByTagName('head')[0].removeChild(script);
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
} else {
|
|
13
|
-
//其他
|
|
14
|
-
script.onload = function () {
|
|
15
|
-
document.getElementsByTagName('head')[0].removeChild(script);
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
script.src = url;
|
|
19
|
-
document.getElementsByTagName('head')[0].appendChild(script);
|
|
20
|
-
}
|
|
21
|
-
export default function bpitLog(options) {
|
|
22
|
-
if (!options) {
|
|
23
|
-
console.log('bpit error: need options');
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
if (!options.group) {
|
|
27
|
-
console.log('bpit error: need options.group');
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
if (!options.project) {
|
|
31
|
-
console.log('bpit error: need options.project');
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
if (!options.hasOwnProperty('env')) {
|
|
35
|
-
console.log('bpit error: need options.env');
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
if (!options.hasOwnProperty('version')) {
|
|
39
|
-
console.log('bpit error: need options.version');
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
// upload data
|
|
43
|
-
var uploadData = ['https://es.zhiyinlou.com/log.js?'];
|
|
44
|
-
uploadData.push('group=' + options.group);
|
|
45
|
-
uploadData.push('&project=' + options.project);
|
|
46
|
-
uploadData.push('&env=' + options.env);
|
|
47
|
-
uploadData.push('&version=' + options.version);
|
|
48
|
-
uploadData.push('&method=' + options.method);
|
|
49
|
-
if (options.yachid) uploadData.push('&yachid=' + options.yachid);
|
|
50
|
-
if (options.workcode) uploadData.push('&workcode=' + options.workcode);
|
|
51
|
-
if (options.timestamp) uploadData.push('×tamp=' + options.timestamp);
|
|
52
|
-
if (options.errorcode) uploadData.push('&errorcode=' + options.errorcode);
|
|
53
|
-
if (options.message) uploadData.push('&message=' + options.message);
|
|
54
|
-
// api load time
|
|
55
|
-
if (options.api && options.time) {
|
|
56
|
-
uploadData.push('&api=' + options.api);
|
|
57
|
-
uploadData.push('&load_time=' + options.time);
|
|
58
|
-
}
|
|
59
|
-
var uploadDataUrl = uploadData.join('');
|
|
60
|
-
loadScript(uploadDataUrl);
|
|
61
|
-
if (options.env != 'online') console.log(uploadDataUrl);
|
|
62
|
-
}
|