yach.open.jssdk 4.4.3-beta2 → 4.4.3-beta4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/yach_jssdk_4.4.3-beta3.js +1 -0
- package/es/api/app/custom/talYoungFilesUpload.d.ts +38 -0
- package/es/api/app/custom/talYoungFilesUpload.js +16 -0
- package/es/api/biz/chat/chooseConversationByCorpId.d.ts +36 -0
- package/es/api/biz/chat/chooseConversationByCorpId.js +8 -0
- package/es/api/biz/chat/openSingleChat.d.ts +10 -0
- package/es/api/biz/chat/openSingleChat.js +8 -0
- package/es/api/biz/chat/openSquad.d.ts +8 -0
- package/es/api/biz/chat/openSquad.js +8 -0
- package/es/api/biz/chat/openTeamChat.d.ts +10 -0
- package/es/api/biz/chat/openTeamChat.js +8 -0
- package/es/api/biz/chat/pickConversation.d.ts +19 -0
- package/es/api/biz/chat/pickConversation.js +19 -0
- package/es/api/biz/chat/sendP2PMsg.d.ts +10 -0
- package/es/api/biz/chat/sendP2PMsg.js +8 -0
- package/es/api/biz/contact/complexPicker.d.ts +62 -0
- package/es/api/biz/contact/complexPicker.js +8 -0
- package/es/api/biz/contact/departmentsPicker.d.ts +35 -0
- package/es/api/biz/contact/departmentsPicker.js +8 -0
- package/es/api/biz/group/groupComplexPicker.d.ts +33 -0
- package/es/api/biz/group/groupComplexPicker.js +8 -0
- package/es/api/biz/map/multipointView.d.ts +21 -0
- package/es/api/biz/map/multipointView.js +19 -0
- package/es/api/biz/map/view.d.ts +13 -0
- package/es/api/biz/map/view.js +19 -0
- package/es/api/biz/navigation/close.d.ts +8 -0
- package/es/api/biz/navigation/close.js +9 -0
- package/es/api/biz/navigation/goBack.d.ts +7 -0
- package/es/api/biz/navigation/goBack.js +19 -0
- package/es/api/biz/navigation/quit.d.ts +8 -0
- package/es/api/biz/navigation/quit.js +15 -0
- package/es/api/biz/navigation/replace.d.ts +8 -0
- package/es/api/biz/navigation/replace.js +8 -0
- package/es/api/biz/navigation/setIcon.d.ts +12 -0
- package/es/api/biz/navigation/setIcon.js +27 -0
- package/es/api/biz/navigation/setLeft.d.ts +9 -0
- package/es/api/biz/navigation/setLeft.js +31 -0
- package/es/api/biz/navigation/setMenu.d.ts +20 -0
- package/es/api/biz/navigation/setMenu.js +25 -0
- package/es/api/biz/navigation/setPanGestureEnable.d.ts +9 -0
- package/es/api/biz/navigation/setPanGestureEnable.js +26 -0
- package/es/api/biz/navigation/setRight.d.ts +13 -0
- package/es/api/biz/navigation/setRight.js +31 -0
- package/es/api/biz/navigation/setTitle.d.ts +11 -0
- package/es/api/biz/navigation/setTitle.js +8 -0
- package/es/api/biz/navigation/setTitleExpandIcon.d.ts +9 -0
- package/es/api/biz/navigation/setTitleExpandIcon.js +25 -0
- package/es/api/biz/navigation/setWindowBig.d.ts +9 -0
- package/es/api/biz/navigation/setWindowBig.js +16 -0
- package/es/api/biz/navigation/tencentMeeting.d.ts +23 -0
- package/es/api/biz/navigation/tencentMeeting.js +8 -0
- package/es/api/biz/navigation/tencentMeetingBegin.d.ts +7 -0
- package/es/api/biz/navigation/tencentMeetingBegin.js +8 -0
- package/es/api/biz/navigation/updateExpandTitle.d.ts +8 -0
- package/es/api/biz/navigation/updateExpandTitle.js +8 -0
- package/es/api/biz/telephone/call.d.ts +9 -0
- package/es/api/biz/telephone/call.js +19 -0
- package/es/api/biz/telephone/showCallMenu.d.ts +12 -0
- package/es/api/biz/telephone/showCallMenu.js +19 -0
- package/es/api/biz/util/addAppToNav.d.ts +9 -0
- package/es/api/biz/util/addAppToNav.js +23 -0
- package/es/api/biz/util/assistantCreate.d.ts +11 -0
- package/es/api/biz/util/assistantCreate.js +23 -0
- package/es/api/biz/util/authFinish.d.ts +11 -0
- package/es/api/biz/util/authFinish.js +19 -0
- package/es/api/biz/util/authStart.d.ts +9 -0
- package/es/api/biz/util/authStart.js +19 -0
- package/es/api/biz/util/chosen.d.ts +15 -0
- package/es/api/biz/util/chosen.js +19 -0
- package/es/api/biz/util/clipboardFileUpload.d.ts +7 -0
- package/es/api/biz/util/clipboardFileUpload.js +8 -0
- package/es/api/biz/util/closeWindow.d.ts +8 -0
- package/es/api/biz/util/closeWindow.js +15 -0
- package/es/api/biz/util/complain.d.ts +12 -0
- package/es/api/biz/util/complain.js +8 -0
- package/es/api/biz/util/copy.d.ts +11 -0
- package/es/api/biz/util/copy.js +19 -0
- package/es/api/biz/util/createModifySchedule.d.ts +26 -0
- package/es/api/biz/util/createModifySchedule.js +15 -0
- package/es/api/biz/util/datepicker.d.ts +14 -0
- package/es/api/biz/util/datepicker.js +19 -0
- package/es/api/biz/util/datetimepicker.d.ts +14 -0
- package/es/api/biz/util/datetimepicker.js +19 -0
- package/es/api/biz/util/disableScreenCapture.d.ts +8 -0
- package/es/api/biz/util/disableScreenCapture.js +19 -0
- package/es/api/biz/util/downloadFile.d.ts +9 -0
- package/es/api/biz/util/downloadFile.js +8 -0
- package/es/api/biz/util/entergroupCheck.d.ts +11 -0
- package/es/api/biz/util/entergroupCheck.js +23 -0
- package/es/api/biz/util/externalLinkPreviewFile.d.ts +11 -0
- package/es/api/biz/util/externalLinkPreviewFile.js +8 -0
- package/es/api/biz/util/feedback.d.ts +11 -0
- package/es/api/biz/util/feedback.js +8 -0
- package/es/api/biz/util/getSingleWebviewData.d.ts +8 -0
- package/es/api/biz/util/getSingleWebviewData.js +8 -0
- package/es/api/biz/util/getTogetherConfig.d.ts +11 -0
- package/es/api/biz/util/getTogetherConfig.js +23 -0
- package/es/api/biz/util/getToken.d.ts +11 -0
- package/es/api/biz/util/getToken.js +19 -0
- package/es/api/biz/util/injectScript.d.ts +9 -0
- package/es/api/biz/util/injectScript.js +8 -0
- package/es/api/biz/util/invoice.d.ts +12 -0
- package/es/api/biz/util/invoice.js +15 -0
- package/es/api/biz/util/knowledgeBaseSelect.d.ts +21 -0
- package/es/api/biz/util/knowledgeBaseSelect.js +15 -0
- package/es/api/biz/util/lorebaseRefreshNodeWebview.d.ts +11 -0
- package/es/api/biz/util/lorebaseRefreshNodeWebview.js +19 -0
- package/es/api/biz/util/lorebaseShowList.d.ts +11 -0
- package/es/api/biz/util/lorebaseShowList.js +19 -0
- package/es/api/biz/util/mediaFileUpload.d.ts +26 -0
- package/es/api/biz/util/mediaFileUpload.js +15 -0
- package/es/api/biz/util/onlineDocmentOpenTeamChat.d.ts +10 -0
- package/es/api/biz/util/onlineDocmentOpenTeamChat.js +23 -0
- package/es/api/biz/util/open.d.ts +9 -0
- package/es/api/biz/util/open.js +8 -0
- package/es/api/biz/util/openFutureGroup.d.ts +10 -0
- package/es/api/biz/util/openFutureGroup.js +23 -0
- package/es/api/biz/util/openLink.d.ts +8 -0
- package/es/api/biz/util/openLink.js +8 -0
- package/es/api/biz/util/openMediaFileDialog.d.ts +23 -0
- package/es/api/biz/util/openMediaFileDialog.js +15 -0
- package/es/api/biz/util/openPublish.d.ts +16 -0
- package/es/api/biz/util/openPublish.js +15 -0
- package/es/api/biz/util/openSingleWebview.d.ts +23 -0
- package/es/api/biz/util/openSingleWebview.js +15 -0
- package/es/api/biz/util/openSlidePanel.d.ts +11 -0
- package/es/api/biz/util/openSlidePanel.js +15 -0
- package/es/api/biz/util/openTalYoungToTopic.d.ts +6 -0
- package/es/api/biz/util/openTalYoungToTopic.js +15 -0
- package/es/api/biz/util/openTogetherEyeWebview.d.ts +11 -0
- package/es/api/biz/util/openTogetherEyeWebview.js +23 -0
- package/es/api/biz/util/openUserSchedule.d.ts +11 -0
- package/es/api/biz/util/openUserSchedule.js +23 -0
- package/es/api/biz/util/openVideoPlayer.d.ts +27 -0
- package/es/api/biz/util/openVideoPlayer.js +23 -0
- package/es/api/biz/util/previewFile.d.ts +11 -0
- package/es/api/biz/util/previewFile.js +8 -0
- package/es/api/biz/util/previewImage.d.ts +9 -0
- package/es/api/biz/util/previewImage.js +8 -0
- package/es/api/biz/util/proxy.d.ts +13 -0
- package/es/api/biz/util/proxy.js +8 -0
- package/es/api/biz/util/pushWorkMsg.d.ts +10 -0
- package/es/api/biz/util/pushWorkMsg.js +15 -0
- package/es/api/biz/util/remind.d.ts +15 -0
- package/es/api/biz/util/remind.js +23 -0
- package/es/api/biz/util/resetSessionUnread.d.ts +8 -0
- package/es/api/biz/util/resetSessionUnread.js +21 -0
- package/es/api/biz/util/rouseApp.d.ts +12 -0
- package/es/api/biz/util/rouseApp.js +15 -0
- package/es/api/biz/util/savePic.d.ts +8 -0
- package/es/api/biz/util/savePic.js +19 -0
- package/es/api/biz/util/scan.d.ts +11 -0
- package/es/api/biz/util/scan.js +19 -0
- package/es/api/biz/util/screen.d.ts +15 -0
- package/es/api/biz/util/screen.js +15 -0
- package/es/api/biz/util/selectDepartment.d.ts +9 -0
- package/es/api/biz/util/selectDepartment.js +8 -0
- package/es/api/biz/util/share.d.ts +12 -0
- package/es/api/biz/util/share.js +19 -0
- package/es/api/biz/util/takePicture.d.ts +13 -0
- package/es/api/biz/util/takePicture.js +8 -0
- package/es/api/biz/util/topicEvent.d.ts +13 -0
- package/es/api/biz/util/topicEvent.js +27 -0
- package/es/api/biz/util/uploadAttachment.d.ts +55 -0
- package/es/api/biz/util/uploadAttachment.js +8 -0
- package/es/api/biz/util/weeklyRead.d.ts +5 -0
- package/es/api/biz/util/weeklyRead.js +23 -0
- package/es/api/biz/util/yachEvent.d.ts +12 -0
- package/es/api/biz/util/yachEvent.js +27 -0
- package/es/api/biz/util/zfbAuth.d.ts +10 -0
- package/es/api/biz/util/zfbAuth.js +19 -0
- package/es/api/biz/webViewMessage/send.d.ts +7 -0
- package/es/api/biz/webViewMessage/send.js +15 -0
- package/es/api/common.typings.d.ts +9 -0
- package/es/api/common.typings.js +0 -0
- package/es/api/device/audio/download.d.ts +8 -0
- package/es/api/device/audio/download.js +19 -0
- package/es/api/device/audio/onPlayEnd.d.ts +7 -0
- package/es/api/device/audio/onPlayEnd.js +19 -0
- package/es/api/device/audio/onRecordEnd.d.ts +7 -0
- package/es/api/device/audio/onRecordEnd.js +19 -0
- package/es/api/device/audio/onRecordEnd_v2.d.ts +7 -0
- package/es/api/device/audio/onRecordEnd_v2.js +19 -0
- package/es/api/device/audio/pause.d.ts +8 -0
- package/es/api/device/audio/pause.js +19 -0
- package/es/api/device/audio/play.d.ts +8 -0
- package/es/api/device/audio/play.js +19 -0
- package/es/api/device/audio/resume.d.ts +8 -0
- package/es/api/device/audio/resume.js +19 -0
- package/es/api/device/audio/startRecord.d.ts +8 -0
- package/es/api/device/audio/startRecord.js +19 -0
- package/es/api/device/audio/startRecord_v2.d.ts +8 -0
- package/es/api/device/audio/startRecord_v2.js +19 -0
- package/es/api/device/audio/stop.d.ts +8 -0
- package/es/api/device/audio/stop.js +19 -0
- package/es/api/device/audio/stopRecord.d.ts +7 -0
- package/es/api/device/audio/stopRecord.js +19 -0
- package/es/api/device/audio/stopRecord_v2.d.ts +7 -0
- package/es/api/device/audio/stopRecord_v2.js +19 -0
- package/es/api/device/base/checkStepPermission.d.ts +8 -0
- package/es/api/device/base/checkStepPermission.js +19 -0
- package/es/api/device/base/getPhoneInfo.d.ts +16 -0
- package/es/api/device/base/getPhoneInfo.js +19 -0
- package/es/api/device/base/getUUID.d.ts +10 -0
- package/es/api/device/base/getUUID.js +23 -0
- package/es/api/device/connection/getNetworkType.d.ts +10 -0
- package/es/api/device/connection/getNetworkType.js +19 -0
- package/es/api/device/connection/isAtTal.d.ts +10 -0
- package/es/api/device/connection/isAtTal.js +21 -0
- package/es/api/device/geolocation/get.d.ts +42 -0
- package/es/api/device/geolocation/get.js +19 -0
- package/es/api/device/geolocation/getSwitch.d.ts +10 -0
- package/es/api/device/geolocation/getSwitch.js +15 -0
- package/es/api/device/notification/actionSheet.d.ts +15 -0
- package/es/api/device/notification/actionSheet.js +19 -0
- package/es/api/device/notification/alert.d.ts +13 -0
- package/es/api/device/notification/alert.js +23 -0
- package/es/api/device/notification/confirm.d.ts +16 -0
- package/es/api/device/notification/confirm.js +23 -0
- package/es/api/device/notification/hidePreloader.d.ts +12 -0
- package/es/api/device/notification/hidePreloader.js +32 -0
- package/es/api/device/notification/showPreloader.d.ts +18 -0
- package/es/api/device/notification/showPreloader.js +32 -0
- package/es/api/device/notification/toast.d.ts +15 -0
- package/es/api/device/notification/toast.js +8 -0
- package/es/api/device/notification/vibrate.d.ts +8 -0
- package/es/api/device/notification/vibrate.js +19 -0
- package/es/api/device/system/getLang.d.ts +10 -0
- package/es/api/device/system/getLang.js +8 -0
- package/es/api/device/system/setLight.d.ts +8 -0
- package/es/api/device/system/setLight.js +19 -0
- package/es/api/initAPI.d.ts +6 -0
- package/es/api/initAPI.js +22 -0
- package/es/api/primary/createTab.d.ts +13 -0
- package/es/api/primary/createTab.js +15 -0
- package/es/api/primary/exitFullScreen.d.ts +7 -0
- package/es/api/primary/exitFullScreen.js +15 -0
- package/es/api/primary/fullScreen.d.ts +7 -0
- package/es/api/primary/fullScreen.js +15 -0
- package/es/api/primary/weeklyShare.d.ts +13 -0
- package/es/api/primary/weeklyShare.js +15 -0
- package/es/api/runtime/permission/requestAuthCode.d.ts +12 -0
- package/es/api/runtime/permission/requestAuthCode.js +8 -0
- package/es/api/ui/pullToRefresh/disable.d.ts +7 -0
- package/es/api/ui/pullToRefresh/disable.js +19 -0
- package/es/api/ui/pullToRefresh/enable.d.ts +7 -0
- package/es/api/ui/pullToRefresh/enable.js +19 -0
- package/es/api/ui/pullToRefresh/stop.d.ts +7 -0
- package/es/api/ui/pullToRefresh/stop.js +19 -0
- package/es/api/ui/webViewBounce/disable.d.ts +7 -0
- package/es/api/ui/webViewBounce/disable.js +15 -0
- package/es/api/util/domainStorage/getItem.d.ts +12 -0
- package/es/api/util/domainStorage/getItem.js +19 -0
- package/es/api/util/domainStorage/removeItem.d.ts +9 -0
- package/es/api/util/domainStorage/removeItem.js +19 -0
- package/es/api/util/domainStorage/setItem.d.ts +11 -0
- package/es/api/util/domainStorage/setItem.js +19 -0
- package/es/api/util/tool/flushLog.d.ts +7 -0
- package/es/api/util/tool/flushLog.js +15 -0
- package/es/api/util/tool/log.d.ts +9 -0
- package/es/api/util/tool/log.js +15 -0
- package/es/index.d.ts +335 -0
- package/es/index.js +352 -0
- package/es/lib/bridge/index.d.ts +2 -0
- package/es/lib/bridge/index.js +2 -0
- package/es/lib/bridge/mobile.d.ts +13 -0
- package/es/lib/bridge/mobile.js +178 -0
- package/es/lib/bridge/pc.d.ts +4 -0
- package/es/lib/bridge/pc.js +86 -0
- package/es/lib/helper/apiHelper.d.ts +2 -0
- package/es/lib/helper/apiHelper.js +8 -0
- package/es/lib/helper/codeMap.d.ts +2 -0
- package/es/lib/helper/codeMap.js +6 -0
- package/es/lib/helper/event.d.ts +9 -0
- package/es/lib/helper/event.js +40 -0
- package/es/lib/helper/pcIframe.d.ts +44 -0
- package/es/lib/helper/pcIframe.js +150 -0
- package/es/lib/index.d.ts +4 -0
- package/es/lib/index.js +78 -0
- package/es/lib/sdk/index.d.ts +19 -0
- package/es/lib/sdk/index.js +169 -0
- package/es/lib/sdk/sdk.typings.d.ts +85 -0
- package/es/lib/sdk/sdk.typings.js +7 -0
- package/es/utils/bpitLog.d.ts +16 -0
- package/es/utils/bpitLog.js +62 -0
- package/es/utils/compareVersions.d.ts +58 -0
- package/es/utils/compareVersions.js +165 -0
- package/es/utils/console.d.ts +4 -0
- package/es/utils/console.js +44 -0
- package/es/utils/env.d.ts +3 -0
- package/es/utils/env.js +45 -0
- package/es/utils/index.d.ts +4 -0
- package/es/utils/index.js +20 -0
- package/libs/api/app/custom/talYoungFilesUpload.d.ts +38 -0
- package/libs/api/app/custom/talYoungFilesUpload.js +24 -0
- package/libs/api/biz/chat/chooseConversationByCorpId.d.ts +36 -0
- package/libs/api/biz/chat/chooseConversationByCorpId.js +15 -0
- package/libs/api/biz/chat/openSingleChat.d.ts +10 -0
- package/libs/api/biz/chat/openSingleChat.js +15 -0
- package/libs/api/biz/chat/openSquad.d.ts +8 -0
- package/libs/api/biz/chat/openSquad.js +15 -0
- package/libs/api/biz/chat/openTeamChat.d.ts +10 -0
- package/libs/api/biz/chat/openTeamChat.js +15 -0
- package/libs/api/biz/chat/pickConversation.d.ts +19 -0
- package/libs/api/biz/chat/pickConversation.js +26 -0
- package/libs/api/biz/chat/sendP2PMsg.d.ts +10 -0
- package/libs/api/biz/chat/sendP2PMsg.js +15 -0
- package/libs/api/biz/contact/complexPicker.d.ts +62 -0
- package/libs/api/biz/contact/complexPicker.js +15 -0
- package/libs/api/biz/contact/departmentsPicker.d.ts +35 -0
- package/libs/api/biz/contact/departmentsPicker.js +15 -0
- package/libs/api/biz/group/groupComplexPicker.d.ts +33 -0
- package/libs/api/biz/group/groupComplexPicker.js +15 -0
- package/libs/api/biz/map/multipointView.d.ts +21 -0
- package/libs/api/biz/map/multipointView.js +26 -0
- package/libs/api/biz/map/view.d.ts +13 -0
- package/libs/api/biz/map/view.js +26 -0
- package/libs/api/biz/navigation/close.d.ts +8 -0
- package/libs/api/biz/navigation/close.js +16 -0
- package/libs/api/biz/navigation/goBack.d.ts +7 -0
- package/libs/api/biz/navigation/goBack.js +26 -0
- package/libs/api/biz/navigation/quit.d.ts +8 -0
- package/libs/api/biz/navigation/quit.js +22 -0
- package/libs/api/biz/navigation/replace.d.ts +8 -0
- package/libs/api/biz/navigation/replace.js +15 -0
- package/libs/api/biz/navigation/setIcon.d.ts +12 -0
- package/libs/api/biz/navigation/setIcon.js +34 -0
- package/libs/api/biz/navigation/setLeft.d.ts +9 -0
- package/libs/api/biz/navigation/setLeft.js +38 -0
- package/libs/api/biz/navigation/setMenu.d.ts +20 -0
- package/libs/api/biz/navigation/setMenu.js +32 -0
- package/libs/api/biz/navigation/setPanGestureEnable.d.ts +9 -0
- package/libs/api/biz/navigation/setPanGestureEnable.js +33 -0
- package/libs/api/biz/navigation/setRight.d.ts +13 -0
- package/libs/api/biz/navigation/setRight.js +38 -0
- package/libs/api/biz/navigation/setTitle.d.ts +11 -0
- package/libs/api/biz/navigation/setTitle.js +15 -0
- package/libs/api/biz/navigation/setTitleExpandIcon.d.ts +9 -0
- package/libs/api/biz/navigation/setTitleExpandIcon.js +32 -0
- package/libs/api/biz/navigation/setWindowBig.d.ts +9 -0
- package/libs/api/biz/navigation/setWindowBig.js +24 -0
- package/libs/api/biz/navigation/tencentMeeting.d.ts +23 -0
- package/libs/api/biz/navigation/tencentMeeting.js +15 -0
- package/libs/api/biz/navigation/tencentMeetingBegin.d.ts +7 -0
- package/libs/api/biz/navigation/tencentMeetingBegin.js +15 -0
- package/libs/api/biz/navigation/updateExpandTitle.d.ts +8 -0
- package/libs/api/biz/navigation/updateExpandTitle.js +15 -0
- package/libs/api/biz/telephone/call.d.ts +9 -0
- package/libs/api/biz/telephone/call.js +26 -0
- package/libs/api/biz/telephone/showCallMenu.d.ts +12 -0
- package/libs/api/biz/telephone/showCallMenu.js +26 -0
- package/libs/api/biz/util/addAppToNav.d.ts +9 -0
- package/libs/api/biz/util/addAppToNav.js +30 -0
- package/libs/api/biz/util/assistantCreate.d.ts +11 -0
- package/libs/api/biz/util/assistantCreate.js +30 -0
- package/libs/api/biz/util/authFinish.d.ts +11 -0
- package/libs/api/biz/util/authFinish.js +26 -0
- package/libs/api/biz/util/authStart.d.ts +9 -0
- package/libs/api/biz/util/authStart.js +26 -0
- package/libs/api/biz/util/chosen.d.ts +15 -0
- package/libs/api/biz/util/chosen.js +26 -0
- package/libs/api/biz/util/clipboardFileUpload.d.ts +7 -0
- package/libs/api/biz/util/clipboardFileUpload.js +15 -0
- package/libs/api/biz/util/closeWindow.d.ts +8 -0
- package/libs/api/biz/util/closeWindow.js +22 -0
- package/libs/api/biz/util/complain.d.ts +12 -0
- package/libs/api/biz/util/complain.js +15 -0
- package/libs/api/biz/util/copy.d.ts +11 -0
- package/libs/api/biz/util/copy.js +26 -0
- package/libs/api/biz/util/createModifySchedule.d.ts +26 -0
- package/libs/api/biz/util/createModifySchedule.js +22 -0
- package/libs/api/biz/util/datepicker.d.ts +14 -0
- package/libs/api/biz/util/datepicker.js +26 -0
- package/libs/api/biz/util/datetimepicker.d.ts +14 -0
- package/libs/api/biz/util/datetimepicker.js +26 -0
- package/libs/api/biz/util/disableScreenCapture.d.ts +8 -0
- package/libs/api/biz/util/disableScreenCapture.js +26 -0
- package/libs/api/biz/util/downloadFile.d.ts +9 -0
- package/libs/api/biz/util/downloadFile.js +15 -0
- package/libs/api/biz/util/entergroupCheck.d.ts +11 -0
- package/libs/api/biz/util/entergroupCheck.js +30 -0
- package/libs/api/biz/util/externalLinkPreviewFile.d.ts +11 -0
- package/libs/api/biz/util/externalLinkPreviewFile.js +15 -0
- package/libs/api/biz/util/feedback.d.ts +11 -0
- package/libs/api/biz/util/feedback.js +15 -0
- package/libs/api/biz/util/getSingleWebviewData.d.ts +8 -0
- package/libs/api/biz/util/getSingleWebviewData.js +15 -0
- package/libs/api/biz/util/getTogetherConfig.d.ts +11 -0
- package/libs/api/biz/util/getTogetherConfig.js +30 -0
- package/libs/api/biz/util/getToken.d.ts +11 -0
- package/libs/api/biz/util/getToken.js +26 -0
- package/libs/api/biz/util/injectScript.d.ts +9 -0
- package/libs/api/biz/util/injectScript.js +15 -0
- package/libs/api/biz/util/invoice.d.ts +12 -0
- package/libs/api/biz/util/invoice.js +23 -0
- package/libs/api/biz/util/knowledgeBaseSelect.d.ts +21 -0
- package/libs/api/biz/util/knowledgeBaseSelect.js +22 -0
- package/libs/api/biz/util/lorebaseRefreshNodeWebview.d.ts +11 -0
- package/libs/api/biz/util/lorebaseRefreshNodeWebview.js +26 -0
- package/libs/api/biz/util/lorebaseShowList.d.ts +11 -0
- package/libs/api/biz/util/lorebaseShowList.js +26 -0
- package/libs/api/biz/util/mediaFileUpload.d.ts +26 -0
- package/libs/api/biz/util/mediaFileUpload.js +23 -0
- package/libs/api/biz/util/onlineDocmentOpenTeamChat.d.ts +10 -0
- package/libs/api/biz/util/onlineDocmentOpenTeamChat.js +30 -0
- package/libs/api/biz/util/open.d.ts +9 -0
- package/libs/api/biz/util/open.js +15 -0
- package/libs/api/biz/util/openFutureGroup.d.ts +10 -0
- package/libs/api/biz/util/openFutureGroup.js +30 -0
- package/libs/api/biz/util/openLink.d.ts +8 -0
- package/libs/api/biz/util/openLink.js +15 -0
- package/libs/api/biz/util/openMediaFileDialog.d.ts +23 -0
- package/libs/api/biz/util/openMediaFileDialog.js +23 -0
- package/libs/api/biz/util/openPublish.d.ts +16 -0
- package/libs/api/biz/util/openPublish.js +22 -0
- package/libs/api/biz/util/openSingleWebview.d.ts +23 -0
- package/libs/api/biz/util/openSingleWebview.js +22 -0
- package/libs/api/biz/util/openSlidePanel.d.ts +11 -0
- package/libs/api/biz/util/openSlidePanel.js +22 -0
- package/libs/api/biz/util/openTalYoungToTopic.d.ts +6 -0
- package/libs/api/biz/util/openTalYoungToTopic.js +23 -0
- package/libs/api/biz/util/openTogetherEyeWebview.d.ts +11 -0
- package/libs/api/biz/util/openTogetherEyeWebview.js +30 -0
- package/libs/api/biz/util/openUserSchedule.d.ts +11 -0
- package/libs/api/biz/util/openUserSchedule.js +30 -0
- package/libs/api/biz/util/openVideoPlayer.d.ts +27 -0
- package/libs/api/biz/util/openVideoPlayer.js +30 -0
- package/libs/api/biz/util/previewFile.d.ts +11 -0
- package/libs/api/biz/util/previewFile.js +15 -0
- package/libs/api/biz/util/previewImage.d.ts +9 -0
- package/libs/api/biz/util/previewImage.js +15 -0
- package/libs/api/biz/util/proxy.d.ts +13 -0
- package/libs/api/biz/util/proxy.js +15 -0
- package/libs/api/biz/util/pushWorkMsg.d.ts +10 -0
- package/libs/api/biz/util/pushWorkMsg.js +23 -0
- package/libs/api/biz/util/remind.d.ts +15 -0
- package/libs/api/biz/util/remind.js +30 -0
- package/libs/api/biz/util/resetSessionUnread.d.ts +8 -0
- package/libs/api/biz/util/resetSessionUnread.js +28 -0
- package/libs/api/biz/util/rouseApp.d.ts +12 -0
- package/libs/api/biz/util/rouseApp.js +23 -0
- package/libs/api/biz/util/savePic.d.ts +8 -0
- package/libs/api/biz/util/savePic.js +26 -0
- package/libs/api/biz/util/scan.d.ts +11 -0
- package/libs/api/biz/util/scan.js +26 -0
- package/libs/api/biz/util/screen.d.ts +15 -0
- package/libs/api/biz/util/screen.js +22 -0
- package/libs/api/biz/util/selectDepartment.d.ts +9 -0
- package/libs/api/biz/util/selectDepartment.js +15 -0
- package/libs/api/biz/util/share.d.ts +12 -0
- package/libs/api/biz/util/share.js +26 -0
- package/libs/api/biz/util/takePicture.d.ts +13 -0
- package/libs/api/biz/util/takePicture.js +15 -0
- package/libs/api/biz/util/topicEvent.d.ts +13 -0
- package/libs/api/biz/util/topicEvent.js +34 -0
- package/libs/api/biz/util/uploadAttachment.d.ts +55 -0
- package/libs/api/biz/util/uploadAttachment.js +15 -0
- package/libs/api/biz/util/weeklyRead.d.ts +5 -0
- package/libs/api/biz/util/weeklyRead.js +30 -0
- package/libs/api/biz/util/yachEvent.d.ts +12 -0
- package/libs/api/biz/util/yachEvent.js +34 -0
- package/libs/api/biz/util/zfbAuth.d.ts +10 -0
- package/libs/api/biz/util/zfbAuth.js +26 -0
- package/libs/api/biz/webViewMessage/send.d.ts +7 -0
- package/libs/api/biz/webViewMessage/send.js +22 -0
- package/libs/api/common.typings.d.ts +9 -0
- package/libs/api/common.typings.js +1 -0
- package/libs/api/device/audio/download.d.ts +8 -0
- package/libs/api/device/audio/download.js +26 -0
- package/libs/api/device/audio/onPlayEnd.d.ts +7 -0
- package/libs/api/device/audio/onPlayEnd.js +26 -0
- package/libs/api/device/audio/onRecordEnd.d.ts +7 -0
- package/libs/api/device/audio/onRecordEnd.js +26 -0
- package/libs/api/device/audio/onRecordEnd_v2.d.ts +7 -0
- package/libs/api/device/audio/onRecordEnd_v2.js +26 -0
- package/libs/api/device/audio/pause.d.ts +8 -0
- package/libs/api/device/audio/pause.js +26 -0
- package/libs/api/device/audio/play.d.ts +8 -0
- package/libs/api/device/audio/play.js +26 -0
- package/libs/api/device/audio/resume.d.ts +8 -0
- package/libs/api/device/audio/resume.js +26 -0
- package/libs/api/device/audio/startRecord.d.ts +8 -0
- package/libs/api/device/audio/startRecord.js +26 -0
- package/libs/api/device/audio/startRecord_v2.d.ts +8 -0
- package/libs/api/device/audio/startRecord_v2.js +26 -0
- package/libs/api/device/audio/stop.d.ts +8 -0
- package/libs/api/device/audio/stop.js +26 -0
- package/libs/api/device/audio/stopRecord.d.ts +7 -0
- package/libs/api/device/audio/stopRecord.js +26 -0
- package/libs/api/device/audio/stopRecord_v2.d.ts +7 -0
- package/libs/api/device/audio/stopRecord_v2.js +26 -0
- package/libs/api/device/base/checkStepPermission.d.ts +8 -0
- package/libs/api/device/base/checkStepPermission.js +26 -0
- package/libs/api/device/base/getPhoneInfo.d.ts +16 -0
- package/libs/api/device/base/getPhoneInfo.js +26 -0
- package/libs/api/device/base/getUUID.d.ts +10 -0
- package/libs/api/device/base/getUUID.js +30 -0
- package/libs/api/device/connection/getNetworkType.d.ts +10 -0
- package/libs/api/device/connection/getNetworkType.js +26 -0
- package/libs/api/device/connection/isAtTal.d.ts +10 -0
- package/libs/api/device/connection/isAtTal.js +28 -0
- package/libs/api/device/geolocation/get.d.ts +42 -0
- package/libs/api/device/geolocation/get.js +26 -0
- package/libs/api/device/geolocation/getSwitch.d.ts +10 -0
- package/libs/api/device/geolocation/getSwitch.js +22 -0
- package/libs/api/device/notification/actionSheet.d.ts +15 -0
- package/libs/api/device/notification/actionSheet.js +26 -0
- package/libs/api/device/notification/alert.d.ts +13 -0
- package/libs/api/device/notification/alert.js +30 -0
- package/libs/api/device/notification/confirm.d.ts +16 -0
- package/libs/api/device/notification/confirm.js +30 -0
- package/libs/api/device/notification/hidePreloader.d.ts +12 -0
- package/libs/api/device/notification/hidePreloader.js +40 -0
- package/libs/api/device/notification/showPreloader.d.ts +18 -0
- package/libs/api/device/notification/showPreloader.js +40 -0
- package/libs/api/device/notification/toast.d.ts +15 -0
- package/libs/api/device/notification/toast.js +15 -0
- package/libs/api/device/notification/vibrate.d.ts +8 -0
- package/libs/api/device/notification/vibrate.js +26 -0
- package/libs/api/device/system/getLang.d.ts +10 -0
- package/libs/api/device/system/getLang.js +15 -0
- package/libs/api/device/system/setLight.d.ts +8 -0
- package/libs/api/device/system/setLight.js +26 -0
- package/libs/api/initAPI.d.ts +6 -0
- package/libs/api/initAPI.js +29 -0
- package/libs/api/primary/createTab.d.ts +13 -0
- package/libs/api/primary/createTab.js +22 -0
- package/libs/api/primary/exitFullScreen.d.ts +7 -0
- package/libs/api/primary/exitFullScreen.js +22 -0
- package/libs/api/primary/fullScreen.d.ts +7 -0
- package/libs/api/primary/fullScreen.js +22 -0
- package/libs/api/primary/weeklyShare.d.ts +13 -0
- package/libs/api/primary/weeklyShare.js +22 -0
- package/libs/api/runtime/permission/requestAuthCode.d.ts +12 -0
- package/libs/api/runtime/permission/requestAuthCode.js +15 -0
- package/libs/api/ui/pullToRefresh/disable.d.ts +7 -0
- package/libs/api/ui/pullToRefresh/disable.js +26 -0
- package/libs/api/ui/pullToRefresh/enable.d.ts +7 -0
- package/libs/api/ui/pullToRefresh/enable.js +26 -0
- package/libs/api/ui/pullToRefresh/stop.d.ts +7 -0
- package/libs/api/ui/pullToRefresh/stop.js +26 -0
- package/libs/api/ui/webViewBounce/disable.d.ts +7 -0
- package/libs/api/ui/webViewBounce/disable.js +22 -0
- package/libs/api/util/domainStorage/getItem.d.ts +12 -0
- package/libs/api/util/domainStorage/getItem.js +26 -0
- package/libs/api/util/domainStorage/removeItem.d.ts +9 -0
- package/libs/api/util/domainStorage/removeItem.js +26 -0
- package/libs/api/util/domainStorage/setItem.d.ts +11 -0
- package/libs/api/util/domainStorage/setItem.js +26 -0
- package/libs/api/util/tool/flushLog.d.ts +7 -0
- package/libs/api/util/tool/flushLog.js +22 -0
- package/libs/api/util/tool/log.d.ts +9 -0
- package/libs/api/util/tool/log.js +22 -0
- package/libs/index.d.ts +335 -0
- package/libs/index.js +1158 -0
- package/libs/lib/bridge/index.d.ts +2 -0
- package/libs/lib/bridge/index.js +32 -0
- package/libs/lib/bridge/mobile.d.ts +13 -0
- package/libs/lib/bridge/mobile.js +185 -0
- package/libs/lib/bridge/pc.d.ts +4 -0
- package/libs/lib/bridge/pc.js +93 -0
- package/libs/lib/helper/apiHelper.d.ts +2 -0
- package/libs/lib/helper/apiHelper.js +15 -0
- package/libs/lib/helper/codeMap.d.ts +2 -0
- package/libs/lib/helper/codeMap.js +13 -0
- package/libs/lib/helper/event.d.ts +9 -0
- package/libs/lib/helper/event.js +48 -0
- package/libs/lib/helper/pcIframe.d.ts +44 -0
- package/libs/lib/helper/pcIframe.js +158 -0
- package/libs/lib/index.d.ts +4 -0
- package/libs/lib/index.js +86 -0
- package/libs/lib/sdk/index.d.ts +19 -0
- package/libs/lib/sdk/index.js +177 -0
- package/libs/lib/sdk/sdk.typings.d.ts +85 -0
- package/libs/lib/sdk/sdk.typings.js +14 -0
- package/libs/utils/bpitLog.d.ts +16 -0
- package/libs/utils/bpitLog.js +69 -0
- package/libs/utils/compareVersions.d.ts +58 -0
- package/libs/utils/compareVersions.js +173 -0
- package/libs/utils/console.d.ts +4 -0
- package/libs/utils/console.js +53 -0
- package/libs/utils/env.d.ts +3 -0
- package/libs/utils/env.js +51 -0
- package/libs/utils/index.d.ts +4 -0
- package/libs/utils/index.js +51 -0
- package/package.json +1 -1
|
@@ -0,0 +1,86 @@
|
|
|
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.initSdk = initSdk;
|
|
9
|
+
exports.yachSdk = void 0;
|
|
10
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs3/regenerator"));
|
|
11
|
+
var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/promise"));
|
|
12
|
+
var _utils = require("../utils");
|
|
13
|
+
var _sdk = _interopRequireDefault(require("./sdk"));
|
|
14
|
+
var _bridge = require("./bridge");
|
|
15
|
+
var _event = _interopRequireDefault(require("./helper/event"));
|
|
16
|
+
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
17
|
+
function adopt(value) {
|
|
18
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
19
|
+
resolve(value);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return new (P || (P = _promise["default"]))(function (resolve, reject) {
|
|
23
|
+
function fulfilled(value) {
|
|
24
|
+
try {
|
|
25
|
+
step(generator.next(value));
|
|
26
|
+
} catch (e) {
|
|
27
|
+
reject(e);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function rejected(value) {
|
|
31
|
+
try {
|
|
32
|
+
step(generator["throw"](value));
|
|
33
|
+
} catch (e) {
|
|
34
|
+
reject(e);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function step(result) {
|
|
38
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
39
|
+
}
|
|
40
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
var env = (0, _utils.getENV)();
|
|
44
|
+
var platform = env.platform;
|
|
45
|
+
var yachSdk = exports.yachSdk = new _sdk["default"](env);
|
|
46
|
+
function initSdk() {
|
|
47
|
+
var _this = this;
|
|
48
|
+
var bridgeInit;
|
|
49
|
+
if (platform === 'pc') {
|
|
50
|
+
bridgeInit = function bridgeInit() {
|
|
51
|
+
return __awaiter(_this, void 0, void 0, /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
52
|
+
return _regenerator["default"].wrap(function (_context) {
|
|
53
|
+
while (1) switch (_context.prev = _context.next) {
|
|
54
|
+
case 0:
|
|
55
|
+
(0, _bridge.PcBridgeInit)();
|
|
56
|
+
return _context.abrupt("return", _bridge.pcBridge);
|
|
57
|
+
case 1:
|
|
58
|
+
case "end":
|
|
59
|
+
return _context.stop();
|
|
60
|
+
}
|
|
61
|
+
}, _callee);
|
|
62
|
+
}));
|
|
63
|
+
};
|
|
64
|
+
} else {
|
|
65
|
+
bridgeInit = function bridgeInit() {
|
|
66
|
+
return (0, _bridge.mobileBridgeInit)().then(function () {
|
|
67
|
+
return _bridge.mobileBridge;
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
var config = {
|
|
72
|
+
platform: platform,
|
|
73
|
+
authMethod: 'config',
|
|
74
|
+
bridgeInit: bridgeInit,
|
|
75
|
+
event: {
|
|
76
|
+
on: function on(event, fn) {
|
|
77
|
+
_event["default"].on(event, fn);
|
|
78
|
+
},
|
|
79
|
+
off: function off(event, fn) {
|
|
80
|
+
_event["default"].off(event, fn);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
yachSdk.setPlatform(config);
|
|
85
|
+
}
|
|
86
|
+
initSdk();
|
|
@@ -0,0 +1,19 @@
|
|
|
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;
|
|
@@ -0,0 +1,177 @@
|
|
|
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 _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/promise"));
|
|
10
|
+
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/instance/concat"));
|
|
11
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
12
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
|
|
13
|
+
var _utils = require("../../utils");
|
|
14
|
+
var _compareVersions = require("../../utils/compareVersions");
|
|
15
|
+
var _package = _interopRequireDefault(require("../../../package.json"));
|
|
16
|
+
var Sdk = /*#__PURE__*/function () {
|
|
17
|
+
function Sdk(env) {
|
|
18
|
+
var _this = this;
|
|
19
|
+
(0, _classCallCheck2["default"])(this, Sdk);
|
|
20
|
+
this.invokeAPIConfigMapByMethod = {};
|
|
21
|
+
this.configJsApiList = [];
|
|
22
|
+
this.platformConfigMap = {};
|
|
23
|
+
this.hadConfig = false;
|
|
24
|
+
this.bridgeInitFnPromise = null;
|
|
25
|
+
this.cacheP = {};
|
|
26
|
+
this.config$ = new _promise["default"](function (a, b) {
|
|
27
|
+
_this.cacheP.resolve = a;
|
|
28
|
+
_this.cacheP.reject = b;
|
|
29
|
+
});
|
|
30
|
+
this.env = env;
|
|
31
|
+
this.exportSdk = {
|
|
32
|
+
version: env.version,
|
|
33
|
+
sdkVersion: _package["default"].version,
|
|
34
|
+
// sdkVersion: '0.0.0',
|
|
35
|
+
env: env,
|
|
36
|
+
platform: env.platform,
|
|
37
|
+
platformV2: env.platformV2,
|
|
38
|
+
config: function config() {
|
|
39
|
+
var _config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
40
|
+
// 鉴权
|
|
41
|
+
var _config$jsApiList = _config.jsApiList,
|
|
42
|
+
jsApiList = _config$jsApiList === void 0 ? [] : _config$jsApiList;
|
|
43
|
+
if (_this.hadConfig) {
|
|
44
|
+
console.log('Config has been executed');
|
|
45
|
+
} else {
|
|
46
|
+
_this.bridgeInitFn().then(function (fn) {
|
|
47
|
+
fn('config', _config).then(function (value) {
|
|
48
|
+
// 鉴权成功
|
|
49
|
+
_this.cacheP.resolve(value);
|
|
50
|
+
_this.hadConfig = true;
|
|
51
|
+
_this.configJsApiList = jsApiList;
|
|
52
|
+
})["catch"](function (error) {
|
|
53
|
+
// 后台鉴权失败
|
|
54
|
+
_this.cacheP.reject(error);
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
ready: function ready(fn) {
|
|
60
|
+
_this.bridgeInitFn().then(function () {
|
|
61
|
+
fn();
|
|
62
|
+
});
|
|
63
|
+
},
|
|
64
|
+
error: function error(fn) {
|
|
65
|
+
_this.config$["catch"](function (error) {
|
|
66
|
+
fn(error);
|
|
67
|
+
});
|
|
68
|
+
},
|
|
69
|
+
on: function on(o, n) {
|
|
70
|
+
_this.bridgeInitFn().then(function () {
|
|
71
|
+
_this.platformConfigMap[env.platform].event.on(o, n);
|
|
72
|
+
});
|
|
73
|
+
},
|
|
74
|
+
off: function off(o, n) {
|
|
75
|
+
_this.bridgeInitFn().then(function () {
|
|
76
|
+
_this.platformConfigMap[env.platform].event.off(o, n);
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
return (0, _createClass2["default"])(Sdk, [{
|
|
82
|
+
key: "setAPI",
|
|
83
|
+
value: function setAPI(method, config) {
|
|
84
|
+
this.invokeAPIConfigMapByMethod[method] = config;
|
|
85
|
+
}
|
|
86
|
+
// 确定端的同事初始化bridge
|
|
87
|
+
}, {
|
|
88
|
+
key: "setPlatform",
|
|
89
|
+
value: function setPlatform(value) {
|
|
90
|
+
var platform = value.platform,
|
|
91
|
+
bridgeInit = value.bridgeInit;
|
|
92
|
+
this.platformConfigMap[platform] = value;
|
|
93
|
+
// if (this.env.platform === platform) bridgeInit();
|
|
94
|
+
}
|
|
95
|
+
}, {
|
|
96
|
+
key: "bridgeInitFn",
|
|
97
|
+
value: function bridgeInitFn() {
|
|
98
|
+
// 平台环境不对再调用api就肯定失败
|
|
99
|
+
if (this.bridgeInitFnPromise) {
|
|
100
|
+
return this.bridgeInitFnPromise;
|
|
101
|
+
}
|
|
102
|
+
var o = this.platformConfigMap[this.env.platform];
|
|
103
|
+
if (o) {
|
|
104
|
+
this.bridgeInitFnPromise = o.bridgeInit();
|
|
105
|
+
} else {
|
|
106
|
+
var n = 'Do not support the current environment�' + this.env.platform;
|
|
107
|
+
this.bridgeInitFnPromise = _promise["default"].reject(new Error(n));
|
|
108
|
+
}
|
|
109
|
+
return this.bridgeInitFnPromise;
|
|
110
|
+
}
|
|
111
|
+
}, {
|
|
112
|
+
key: "_onFail",
|
|
113
|
+
value: function _onFail(method, errorcode, message, onFail) {
|
|
114
|
+
(0, _utils.bpitLog)({
|
|
115
|
+
method: method,
|
|
116
|
+
errorcode: errorcode,
|
|
117
|
+
message: message
|
|
118
|
+
});
|
|
119
|
+
onFail && typeof onFail == 'function' && onFail({
|
|
120
|
+
code: errorcode,
|
|
121
|
+
message: message
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}, {
|
|
125
|
+
key: "invokeAPI",
|
|
126
|
+
value: function invokeAPI(method, params) {
|
|
127
|
+
var _context2;
|
|
128
|
+
if (!params) params = {};
|
|
129
|
+
if (!method) return;
|
|
130
|
+
// 验证方法是否可用
|
|
131
|
+
var apiConfigs = this.invokeAPIConfigMapByMethod[method];
|
|
132
|
+
if (!apiConfigs) {
|
|
133
|
+
return this._onFail(method, '-1', "[".concat(method, "] method is not exist"), params.onFail);
|
|
134
|
+
}
|
|
135
|
+
var apiConfig = apiConfigs[this.env.platform];
|
|
136
|
+
if (apiConfig) {
|
|
137
|
+
var supportVersion = apiConfig.vs || '0.0.0';
|
|
138
|
+
if ((0, _compareVersions.compareVersions)(this.env.version, supportVersion) < 0) {
|
|
139
|
+
var _context;
|
|
140
|
+
return this._onFail(method, '-1', (0, _concat["default"])(_context = "The current application version is ".concat(this.env.version, ". This method does not support versions less than ")).call(_context, supportVersion), params.onFail);
|
|
141
|
+
}
|
|
142
|
+
// 确定参数
|
|
143
|
+
var p = apiConfig.paramsDeal ? apiConfig.paramsDeal(params) : params;
|
|
144
|
+
// 确定回调
|
|
145
|
+
if ('function' == typeof p.onSuccess) {
|
|
146
|
+
var v = p.onSuccess;
|
|
147
|
+
p.onSuccess = function (e) {
|
|
148
|
+
v(e);
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
// 主方法
|
|
152
|
+
this.bridgeInitFn().then(function (fn) {
|
|
153
|
+
fn(method, p).then(function (res) {
|
|
154
|
+
// 调用成功
|
|
155
|
+
(0, _utils.log)("SDK \u8FD4\u56DE\u7ED3\u679C\u6210\u529F ", {
|
|
156
|
+
method: method,
|
|
157
|
+
params: p,
|
|
158
|
+
result: res
|
|
159
|
+
});
|
|
160
|
+
})["catch"](function (error) {
|
|
161
|
+
// 调用失败
|
|
162
|
+
(0, _utils.log)("SDK \u8FD4\u56DE\u7ED3\u679C\u5931\u8D25", {
|
|
163
|
+
method: method,
|
|
164
|
+
params: p,
|
|
165
|
+
error: error
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
})["catch"](function (err) {
|
|
169
|
+
console.log('wenai err', err);
|
|
170
|
+
});
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
this._onFail(method, '-1', (0, _concat["default"])(_context2 = "[".concat(method, "] method do not support the current platform (")).call(_context2, this.env.platform, ")"), params.onFail);
|
|
174
|
+
}
|
|
175
|
+
}]);
|
|
176
|
+
}();
|
|
177
|
+
var _default = exports["default"] = Sdk;
|
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
exports.ENV_ENUM = void 0;
|
|
8
|
+
var ENV_ENUM;
|
|
9
|
+
(function (ENV_ENUM) {
|
|
10
|
+
ENV_ENUM["pc"] = "pc";
|
|
11
|
+
ENV_ENUM["android"] = "android";
|
|
12
|
+
ENV_ENUM["ios"] = "ios";
|
|
13
|
+
ENV_ENUM["notInYach"] = "notInYach";
|
|
14
|
+
})(ENV_ENUM || (exports.ENV_ENUM = ENV_ENUM = {}));
|
|
@@ -0,0 +1,16 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
exports["default"] = bpitLog;
|
|
8
|
+
function loadScript(url) {
|
|
9
|
+
var script = document.createElement('script');
|
|
10
|
+
script.type = 'text/javascript';
|
|
11
|
+
if (script.readyState) {
|
|
12
|
+
// ie 浏览器
|
|
13
|
+
script.onreadystatechange = function () {
|
|
14
|
+
if (script.readyState == 'loaded' || script.readyState == 'complete') {
|
|
15
|
+
script.onreadystatechange = null;
|
|
16
|
+
document.getElementsByTagName('head')[0].removeChild(script);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
} else {
|
|
20
|
+
//其他
|
|
21
|
+
script.onload = function () {
|
|
22
|
+
document.getElementsByTagName('head')[0].removeChild(script);
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
script.src = url;
|
|
26
|
+
document.getElementsByTagName('head')[0].appendChild(script);
|
|
27
|
+
}
|
|
28
|
+
function bpitLog(options) {
|
|
29
|
+
if (!options) {
|
|
30
|
+
console.log('bpit error: need options');
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (!options.group) {
|
|
34
|
+
console.log('bpit error: need options.group');
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (!options.project) {
|
|
38
|
+
console.log('bpit error: need options.project');
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
if (!options.hasOwnProperty('env')) {
|
|
42
|
+
console.log('bpit error: need options.env');
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (!options.hasOwnProperty('version')) {
|
|
46
|
+
console.log('bpit error: need options.version');
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
// upload data
|
|
50
|
+
var uploadData = ['https://es.zhiyinlou.com/log.js?'];
|
|
51
|
+
uploadData.push('group=' + options.group);
|
|
52
|
+
uploadData.push('&project=' + options.project);
|
|
53
|
+
uploadData.push('&env=' + options.env);
|
|
54
|
+
uploadData.push('&version=' + options.version);
|
|
55
|
+
uploadData.push('&method=' + options.method);
|
|
56
|
+
if (options.yachid) uploadData.push('&yachid=' + options.yachid);
|
|
57
|
+
if (options.workcode) uploadData.push('&workcode=' + options.workcode);
|
|
58
|
+
if (options.timestamp) uploadData.push('×tamp=' + options.timestamp);
|
|
59
|
+
if (options.errorcode) uploadData.push('&errorcode=' + options.errorcode);
|
|
60
|
+
if (options.message) uploadData.push('&message=' + options.message);
|
|
61
|
+
// api load time
|
|
62
|
+
if (options.api && options.time) {
|
|
63
|
+
uploadData.push('&api=' + options.api);
|
|
64
|
+
uploadData.push('&load_time=' + options.time);
|
|
65
|
+
}
|
|
66
|
+
var uploadDataUrl = uploadData.join('');
|
|
67
|
+
loadScript(uploadDataUrl);
|
|
68
|
+
if (options.env != 'online') console.log(uploadDataUrl);
|
|
69
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compare [semver](https://semver.org/) version strings to find greater, equal or lesser.
|
|
3
|
+
* This library supports the full semver specification, including comparing versions with different number of digits like `1.0.0`, `1.0`, `1`, and pre-release versions like `1.0.0-alpha`.
|
|
4
|
+
* @param v1 - First version to compare
|
|
5
|
+
* @param v2 - Second version to compare
|
|
6
|
+
* @returns Numeric value compatible with the [Array.sort(fn) interface](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters).
|
|
7
|
+
*/
|
|
8
|
+
export declare const compareVersions: (v1: string, v2: string) => 0 | 1 | -1;
|
|
9
|
+
/**
|
|
10
|
+
* Validate [semver](https://semver.org/) version strings.
|
|
11
|
+
*
|
|
12
|
+
* @param version Version number to validate
|
|
13
|
+
* @returns `true` if the version number is a valid semver version number, `false` otherwise.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```
|
|
17
|
+
* validate('1.0.0-rc.1'); // return true
|
|
18
|
+
* validate('1.0-rc.1'); // return false
|
|
19
|
+
* validate('foo'); // return false
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare const validate: (version: string) => boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Allowed arithmetic operators
|
|
25
|
+
*/
|
|
26
|
+
export declare type CompareOperator = '>' | '>=' | '=' | '<' | '<=';
|
|
27
|
+
/**
|
|
28
|
+
* Compare [semver](https://semver.org/) version strings using the specified operator.
|
|
29
|
+
*
|
|
30
|
+
* @param v1 First version to compare
|
|
31
|
+
* @param v2 Second version to compare
|
|
32
|
+
* @param operator Allowed arithmetic operator to use
|
|
33
|
+
* @returns `true` if the comparison between the firstVersion and the secondVersion satisfies the operator, `false` otherwise.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```
|
|
37
|
+
* compare('10.1.8', '10.0.4', '>'); // return true
|
|
38
|
+
* compare('10.0.1', '10.0.1', '='); // return true
|
|
39
|
+
* compare('10.1.1', '10.2.2', '<'); // return true
|
|
40
|
+
* compare('10.1.1', '10.2.2', '<='); // return true
|
|
41
|
+
* compare('10.1.1', '10.2.2', '>='); // return false
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export declare const compare: (v1: string, v2: string, operator: CompareOperator) => boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Match [npm semver](https://docs.npmjs.com/cli/v6/using-npm/semver) version range.
|
|
47
|
+
*
|
|
48
|
+
* @param version Version number to match
|
|
49
|
+
* @param range Range pattern for version
|
|
50
|
+
* @returns `true` if the version number is within the range, `false` otherwise.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```
|
|
54
|
+
* satisfies('1.1.0', '^1.0.0'); // return true
|
|
55
|
+
* satisfies('1.1.0', '~1.0.0'); // return false
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export declare const satisfies: (version: string, range: string) => boolean;
|