@tarojs/plugin-platform-harmony-ets 3.7.0-alpha.27 → 4.0.0-alpha.10
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/apis/apis.ts +6 -2
- package/dist/apis/base/crypto.ts +4 -0
- package/dist/apis/base/debug.ts +5 -0
- package/dist/apis/base/index.ts +9 -1
- package/dist/apis/base/performance.ts +8 -0
- package/dist/apis/base/system.ts +74 -21
- package/dist/apis/base/update.ts +5 -0
- package/dist/apis/base/weapp/app-event.ts +75 -0
- package/dist/apis/base/weapp/life-cycle.ts +21 -0
- package/dist/apis/canvas/index.ts +27 -0
- package/dist/apis/data-analysis/index.ts +6 -0
- package/dist/apis/device/accelerometer.ts +2 -1
- package/dist/apis/device/accessibility.ts +4 -0
- package/dist/apis/device/battery.ts +2 -2
- package/dist/apis/device/bluetooth-ble.ts +19 -0
- package/dist/apis/device/bluetooth-peripheral.ts +6 -0
- package/dist/apis/device/bluetooth.ts +16 -0
- package/dist/apis/device/calendar.ts +5 -0
- package/dist/apis/device/clipboard.ts +17 -9
- package/dist/apis/device/compass.ts +21 -0
- package/dist/apis/device/contact.ts +5 -0
- package/dist/apis/device/crypto.ts +4 -0
- package/dist/apis/device/gyroscope.ts +7 -0
- package/dist/apis/device/iBeacon.ts +10 -0
- package/dist/apis/device/index.ts +15 -0
- package/dist/apis/device/keyboard.ts +2 -1
- package/dist/apis/device/memory.ts +10 -3
- package/dist/apis/device/motion.ts +6 -0
- package/dist/apis/device/network.ts +26 -9
- package/dist/apis/device/nfc.ts +10 -0
- package/dist/apis/device/phone.ts +2 -1
- package/dist/apis/device/scan.ts +4 -0
- package/dist/apis/device/screen.ts +2 -1
- package/dist/apis/device/sms.ts +4 -0
- package/dist/apis/device/vibrate.ts +19 -11
- package/dist/apis/device/wifi.ts +15 -0
- package/dist/apis/ext/index.ts +5 -0
- package/dist/apis/files/index.ts +2 -1
- package/dist/apis/files/manager.ts +2 -1
- package/dist/apis/framework/index.ts +3 -8
- package/dist/apis/index.ts +27 -17
- package/dist/apis/location/index.ts +61 -68
- package/dist/apis/media/EditorContext.ts +32 -0
- package/dist/apis/media/audio/index.ts +18 -0
- package/dist/apis/media/background-audio/index.ts +16 -0
- package/dist/apis/media/camera.ts +16 -0
- package/dist/apis/media/common.ts +2 -1
- package/dist/apis/media/{image.ts → image/index.ts} +4 -3
- package/dist/apis/media/index.ts +10 -0
- package/dist/apis/media/live.ts +5 -0
- package/dist/apis/media/map.ts +4 -0
- package/dist/apis/media/media-recorder.ts +4 -0
- package/dist/apis/media/recorder.ts +6 -0
- package/dist/apis/media/video/VideoContext.ts +68 -0
- package/dist/apis/media/{video.ts → video/index.ts} +13 -2
- package/dist/apis/media/video-decoder.ts +4 -0
- package/dist/apis/media/video-processing.ts +4 -0
- package/dist/apis/media/voip.ts +19 -0
- package/dist/apis/network/index.ts +3 -0
- package/dist/apis/network/mdns.ts +13 -0
- package/dist/apis/network/request.ts +7 -6
- package/dist/apis/network/tcp.ts +4 -0
- package/dist/apis/network/udp.ts +4 -0
- package/dist/apis/network/webSocket.ts +2 -6
- package/dist/apis/open-api/account.ts +4 -0
- package/dist/apis/open-api/address.ts +4 -0
- package/dist/apis/open-api/authorize.ts +5 -0
- package/dist/apis/open-api/card.ts +5 -0
- package/dist/apis/open-api/channels-live.ts +11 -0
- package/dist/apis/open-api/customer-service.ts +4 -0
- package/dist/apis/open-api/device-voip.ts +5 -0
- package/dist/apis/open-api/facial.ts +7 -0
- package/dist/apis/open-api/favorites.ts +5 -0
- package/dist/apis/open-api/group.ts +4 -0
- package/dist/apis/open-api/index.ts +20 -6
- package/dist/apis/open-api/invoice.ts +5 -0
- package/dist/apis/open-api/license-plate.ts +4 -0
- package/dist/apis/open-api/login.ts +6 -0
- package/dist/apis/open-api/my-miniprogram.ts +4 -0
- package/dist/apis/open-api/privacy.ts +7 -0
- package/dist/apis/open-api/red-package.ts +4 -0
- package/dist/apis/open-api/settings.ts +5 -0
- package/dist/apis/open-api/soter.ts +6 -0
- package/dist/apis/open-api/subscribe-message.ts +6 -0
- package/dist/apis/open-api/{user-info/index.ts → user-info.ts} +1 -16
- package/dist/apis/open-api/werun.ts +5 -0
- package/dist/apis/payment/index.ts +6 -0
- package/dist/apis/route/index.ts +19 -28
- package/dist/apis/share/index.ts +33 -0
- package/dist/apis/storage/background-fetch.ts +7 -0
- package/dist/apis/storage/cache-manager.ts +4 -0
- package/dist/apis/storage/index.ts +158 -88
- package/dist/apis/ui/{animation.ts → animation/animation.ts} +73 -31
- package/dist/apis/ui/animation/index.ts +7 -0
- package/dist/apis/ui/background.ts +4 -19
- package/dist/apis/ui/custom-component.ts +8 -0
- package/dist/apis/ui/fonts.ts +4 -0
- package/dist/apis/ui/index.ts +8 -10
- package/dist/apis/ui/interaction/index.ts +45 -59
- package/dist/apis/ui/menu.ts +4 -0
- package/dist/apis/ui/navigation-bar/index.ts +60 -21
- package/dist/apis/ui/pull-down-refresh.ts +10 -4
- package/dist/apis/{page → ui/scroll}/index.ts +32 -27
- package/dist/apis/ui/sticky.ts +4 -0
- package/dist/apis/{tabbar/index.ts → ui/tab-bar.ts} +6 -8
- package/dist/apis/ui/window.ts +20 -0
- package/dist/apis/utils/handler.ts +4 -4
- package/dist/apis/utils/index.ts +1 -1
- package/dist/apis/worker/index.ts +4 -0
- package/dist/apis/wxml/IntersectionObserver.ts +24 -25
- package/dist/apis/wxml/index.ts +7 -2
- package/dist/apis/wxml/nodesRef.ts +2 -2
- package/dist/apis/wxml/selectorQuery.ts +29 -17
- package/dist/components-harmony-ets/button.ets +106 -80
- package/dist/components-harmony-ets/canvas.ets +51 -0
- package/dist/components-harmony-ets/checkbox.ets +82 -148
- package/dist/components-harmony-ets/form.ets +45 -132
- package/dist/components-harmony-ets/icon.ets +66 -69
- package/dist/components-harmony-ets/image.ets +26 -61
- package/dist/components-harmony-ets/index.ets +92 -0
- package/dist/components-harmony-ets/innerHtml.ets +7 -70
- package/dist/components-harmony-ets/input.ets +60 -146
- package/dist/components-harmony-ets/label.ets +86 -92
- package/dist/components-harmony-ets/listView.ets +26 -0
- package/dist/components-harmony-ets/movableArea.ets +124 -0
- package/dist/components-harmony-ets/movableView.ets +93 -0
- package/dist/components-harmony-ets/navigationBar.ets +65 -0
- package/dist/components-harmony-ets/pageMeta.ets +94 -0
- package/dist/components-harmony-ets/picker.ets +172 -198
- package/dist/components-harmony-ets/progress.ets +52 -0
- package/dist/components-harmony-ets/pseudo.ets +80 -0
- package/dist/components-harmony-ets/radio.ets +85 -155
- package/dist/components-harmony-ets/richText.ets +15 -87
- package/dist/components-harmony-ets/scrollList.ets +94 -0
- package/dist/components-harmony-ets/scrollView.ets +81 -149
- package/dist/components-harmony-ets/slider.ets +47 -94
- package/dist/components-harmony-ets/stickySection.ets +42 -0
- package/dist/components-harmony-ets/style.ets +396 -0
- package/dist/components-harmony-ets/swiper.ets +51 -151
- package/dist/components-harmony-ets/switch.ets +35 -76
- package/dist/components-harmony-ets/{index.ts → tag.ts} +6 -0
- package/dist/components-harmony-ets/text.ets +131 -76
- package/dist/components-harmony-ets/textArea.ets +64 -140
- package/dist/components-harmony-ets/utils/AttributeManager.ets +1 -1
- package/dist/components-harmony-ets/utils/DynamicCenter.ts +4 -13
- package/dist/components-harmony-ets/utils/constant/style.ets +9 -6
- package/dist/components-harmony-ets/utils/flexManager.ets +68 -85
- package/dist/components-harmony-ets/utils/helper.ets +18 -65
- package/dist/components-harmony-ets/utils/htmlParser/HarmonyHTMLParser.ts +1 -2
- package/dist/components-harmony-ets/utils/htmlParser/index.ts +1 -1
- package/dist/components-harmony-ets/utils/index.ts +55 -51
- package/dist/components-harmony-ets/utils/styles.ets +177 -65
- package/dist/components-harmony-ets/video.ets +70 -116
- package/dist/components-harmony-ets/view.ets +58 -64
- package/dist/components-harmony-ets/webView.ets +56 -0
- package/dist/index.d.ts +152 -0
- package/dist/index.js +230 -60
- package/dist/index.js.map +1 -1
- package/dist/runtime-ets/bom/document.ts +6 -4
- package/dist/runtime-ets/bom/getComputedStyle.ts +2 -2
- package/dist/runtime-ets/bom/window.ts +9 -2
- package/dist/runtime-ets/current.ts +3 -0
- package/dist/runtime-ets/dom/bind.ts +96 -0
- package/dist/runtime-ets/dom/class-list.ts +4 -6
- package/dist/runtime-ets/dom/comment.ts +1 -2
- package/dist/runtime-ets/dom/cssNesting.ts +409 -0
- package/dist/runtime-ets/dom/cssStyleDeclaration.ts +30 -20
- package/dist/runtime-ets/dom/dataSource.ts +64 -0
- package/dist/runtime-ets/dom/document.ts +36 -51
- package/dist/runtime-ets/dom/element/canvas.ts +136 -0
- package/dist/runtime-ets/dom/element/element.ts +439 -0
- package/dist/runtime-ets/dom/element/form.ts +403 -0
- package/dist/runtime-ets/dom/element/index.ts +120 -0
- package/dist/runtime-ets/dom/element/movableArea.ts +11 -0
- package/dist/runtime-ets/dom/element/movableView.ts +242 -0
- package/dist/runtime-ets/dom/element/normal.ts +103 -0
- package/dist/runtime-ets/dom/element/progress.ts +11 -0
- package/dist/runtime-ets/dom/element/scrollView.ts +15 -0
- package/dist/runtime-ets/dom/element/text.ts +10 -0
- package/dist/runtime-ets/dom/element/video.ts +50 -0
- package/dist/runtime-ets/dom/element/webView.ts +68 -0
- package/dist/runtime-ets/dom/event.ts +26 -5
- package/dist/runtime-ets/dom/eventTarget.ts +3 -3
- package/dist/runtime-ets/dom/node.ts +114 -49
- package/dist/runtime-ets/dom/stylesheet/covertWeb2Hm.ts +805 -0
- package/dist/runtime-ets/dom/stylesheet/index.ts +122 -429
- package/dist/runtime-ets/dom/stylesheet/type.ts +93 -17
- package/dist/runtime-ets/dom/stylesheet/util.ts +145 -17
- package/dist/runtime-ets/index.ts +2 -3
- package/dist/runtime-ets/interface/event.ts +3 -2
- package/dist/runtime-ets/utils/index.ts +87 -17
- package/dist/runtime-ets/utils/info.ts +21 -47
- package/dist/runtime-framework/react/app.ts +20 -28
- package/dist/runtime-framework/react/hooks.ts +3 -4
- package/dist/runtime-framework/react/index.ts +1 -2
- package/dist/runtime-framework/react/native-page.ts +421 -0
- package/dist/runtime-framework/react/page.ts +5 -17
- package/dist/runtime-framework/solid/app.ts +25 -45
- package/dist/runtime-framework/solid/connect.ts +21 -3
- package/dist/runtime-framework/solid/hooks.ts +17 -12
- package/dist/runtime-framework/solid/index.ts +6 -2
- package/dist/runtime-framework/solid/page.ts +84 -36
- package/dist/runtime-framework/solid/reconciler/props.ts +70 -25
- package/dist/runtime-framework/solid/reconciler/render.ts +16 -6
- package/dist/runtime-framework/solid/reconciler/use.ts +0 -1
- package/dist/runtime-framework/solid/utils/index.ts +0 -2
- package/dist/runtime-utils.d.ts +827 -0
- package/dist/runtime-utils.js +1633 -549
- package/dist/runtime-utils.js.map +1 -1
- package/dist/runtime.d.ts +1 -0
- package/dist/runtime.js +1633 -549
- package/dist/runtime.js.map +1 -1
- package/index.js +3 -1
- package/package.json +14 -15
- package/static/media/cancel.svg +1 -0
- package/static/media/circle.svg +1 -0
- package/static/media/clear.svg +1 -0
- package/static/media/download.svg +1 -0
- package/static/media/info.svg +1 -0
- package/static/media/info_circle.svg +1 -0
- package/static/media/search.svg +1 -0
- package/static/media/success.svg +1 -0
- package/static/media/success_no_circle.svg +1 -0
- package/static/media/taro_arrow_left.svg +1 -0
- package/static/media/taro_home.svg +1 -0
- package/static/media/waiting.svg +1 -0
- package/static/media/warn.svg +1 -0
- package/types/harmony.d.ts +4 -0
- package/types/index.d.ts +4 -0
- package/types/runtime.d.ts +7 -1
- package/LICENSE +0 -160
- package/dist/components-harmony-ets/base.ets +0 -63
- package/dist/components-harmony-ets/element.ets +0 -223
- package/dist/components-harmony-ets/utils/constant/icon.ts +0 -19
- package/dist/runtime-ets/dom/element.ts +0 -457
- package/dist/runtime-ets/dom/text.ts +0 -19
- package/dist/runtime-ets/utils/bind.ts +0 -35
- package/types/api.d.ts +0 -4
- /package/dist/runtime-framework/solid/{contant.ts → constant.ts} +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { temporarilyNotSupport } from '../utils'
|
|
2
|
+
|
|
3
|
+
// 录音
|
|
4
|
+
export const stopRecord = /* @__PURE__ */ temporarilyNotSupport('stopRecord')
|
|
5
|
+
export const startRecord = /* @__PURE__ */ temporarilyNotSupport('startRecord')
|
|
6
|
+
export const getRecorderManager = /* @__PURE__ */ temporarilyNotSupport('getRecorderManager')
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { document } from '@tarojs/runtime'
|
|
3
|
+
|
|
4
|
+
import { temporarilyNotSupport } from '../../utils'
|
|
5
|
+
|
|
6
|
+
import type { TaroVideoElement } from '@tarojs/runtime'
|
|
7
|
+
import type Taro from '@tarojs/taro/types'
|
|
8
|
+
|
|
9
|
+
export class VideoContext implements Taro.VideoContext {
|
|
10
|
+
id: string
|
|
11
|
+
|
|
12
|
+
video: TaroVideoElement
|
|
13
|
+
|
|
14
|
+
controller: VideoController
|
|
15
|
+
|
|
16
|
+
constructor (id: string) {
|
|
17
|
+
this.id = id
|
|
18
|
+
this.video = document.getElementById(id)
|
|
19
|
+
|
|
20
|
+
if (this.video) {
|
|
21
|
+
this.controller = this.video.controller
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
play () {
|
|
26
|
+
if (!this.controller) return
|
|
27
|
+
|
|
28
|
+
this.controller.play()
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
pause () {
|
|
32
|
+
if (!this.controller) return
|
|
33
|
+
|
|
34
|
+
this.controller.pause()
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
stop () {
|
|
38
|
+
if (!this.controller) return
|
|
39
|
+
|
|
40
|
+
this.controller.stop()
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
seek (position: number) {
|
|
44
|
+
if (!this.controller) return
|
|
45
|
+
|
|
46
|
+
this.controller.setCurrentTime(position)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
requestFullScreen () {
|
|
50
|
+
if (!this.controller) return
|
|
51
|
+
|
|
52
|
+
this.controller.requestFullscreen(true)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
exitFullScreen () {
|
|
56
|
+
if (!this.controller) return
|
|
57
|
+
|
|
58
|
+
this.controller.exitFullscreen()
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
requestBackgroundPlayback = temporarilyNotSupport('VideoContext.requestBackgroundPlayback')
|
|
62
|
+
exitBackgroundPlayback = temporarilyNotSupport('VideoContext.exitBackgroundPlayback')
|
|
63
|
+
exitPictureInPicture = temporarilyNotSupport('VideoContext.exitPictureInPicture')
|
|
64
|
+
hideStatusBar = temporarilyNotSupport('VideoContext.hideStatusBar')
|
|
65
|
+
playbackRate = temporarilyNotSupport('VideoContext.playbackRate')
|
|
66
|
+
sendDanmu = temporarilyNotSupport('VideoContext.sendDanmu')
|
|
67
|
+
showStatusBar = temporarilyNotSupport('VideoContext.showStatusBar')
|
|
68
|
+
}
|
|
@@ -22,9 +22,12 @@
|
|
|
22
22
|
// ❌ VideoContext.stop
|
|
23
23
|
|
|
24
24
|
import mediaLibrary from '@ohos.multimedia.mediaLibrary'
|
|
25
|
-
import Taro from '@tarojs/taro'
|
|
26
25
|
|
|
27
|
-
import { callAsyncFail, callAsyncSuccess, validateParams } from '
|
|
26
|
+
import { callAsyncFail, callAsyncSuccess, temporarilyNotSupport, validateParams } from '../../utils'
|
|
27
|
+
import { VideoContext } from './VideoContext'
|
|
28
|
+
|
|
29
|
+
import type { TaroAny } from '@tarojs/runtime'
|
|
30
|
+
import type Taro from '@tarojs/taro/types'
|
|
28
31
|
|
|
29
32
|
interface IChooseVideoOptionOHOS {
|
|
30
33
|
type: string
|
|
@@ -41,6 +44,10 @@ const saveVideoToPhotosAlbumSchema = {
|
|
|
41
44
|
filePath: 'String'
|
|
42
45
|
}
|
|
43
46
|
|
|
47
|
+
export const createVideoContext: typeof Taro.createVideoContext = (id: string, _: TaroAny) => {
|
|
48
|
+
return new VideoContext(id)
|
|
49
|
+
}
|
|
50
|
+
|
|
44
51
|
// TODO: 1.返回属性补全
|
|
45
52
|
// TODO: 2.只支持从相册选择,补充摄像头拍摄功能,需要HarmonyOS提供选择组件
|
|
46
53
|
export const chooseVideo: typeof Taro.chooseVideo = function (options = {}) {
|
|
@@ -63,6 +70,10 @@ export const chooseVideo: typeof Taro.chooseVideo = function (options = {}) {
|
|
|
63
70
|
})
|
|
64
71
|
}
|
|
65
72
|
|
|
73
|
+
export const compressVideo = /* @__PURE__ */ temporarilyNotSupport('compressVideo')
|
|
74
|
+
export const getVideoInfo = /* @__PURE__ */ temporarilyNotSupport('getVideoInfo')
|
|
75
|
+
export const openVideoEditor = /* @__PURE__ */ temporarilyNotSupport('openVideoEditor')
|
|
76
|
+
|
|
66
77
|
export const saveVideoToPhotosAlbum: typeof Taro.saveVideoToPhotosAlbum = function (options) {
|
|
67
78
|
return new Promise((resolve, reject) => {
|
|
68
79
|
try {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { temporarilyNotSupport } from '../utils'
|
|
2
|
+
|
|
3
|
+
// 实时语音
|
|
4
|
+
export const updateVoIPChatMuteConfig = /* @__PURE__ */ temporarilyNotSupport('updateVoIPChatMuteConfig')
|
|
5
|
+
export const subscribeVoIPVideoMembers = /* @__PURE__ */ temporarilyNotSupport('subscribeVoIPVideoMembers')
|
|
6
|
+
export const setEnable1v1Chat = /* @__PURE__ */ temporarilyNotSupport('setEnable1v1Chat')
|
|
7
|
+
export const onVoIPVideoMembersChanged = /* @__PURE__ */ temporarilyNotSupport('onVoIPVideoMembersChanged')
|
|
8
|
+
export const onVoIPChatStateChanged = /* @__PURE__ */ temporarilyNotSupport('onVoIPChatStateChanged')
|
|
9
|
+
export const onVoIPChatSpeakersChanged = /* @__PURE__ */ temporarilyNotSupport('onVoIPChatSpeakersChanged')
|
|
10
|
+
export const onVoIPChatMembersChanged = /* @__PURE__ */ temporarilyNotSupport('onVoIPChatMembersChanged')
|
|
11
|
+
export const onVoIPChatInterrupted = /* @__PURE__ */ temporarilyNotSupport('onVoIPChatInterrupted')
|
|
12
|
+
export const offVoIPChatSpeakersChanged = /* @__PURE__ */ temporarilyNotSupport('offVoIPChatSpeakersChanged')
|
|
13
|
+
export const offVoIPVideoMembersChanged = /* @__PURE__ */ temporarilyNotSupport('offVoIPVideoMembersChanged')
|
|
14
|
+
export const offVoIPChatStateChanged = /* @__PURE__ */ temporarilyNotSupport('offVoIPChatStateChanged')
|
|
15
|
+
export const offVoIPChatMembersChanged = /* @__PURE__ */ temporarilyNotSupport('offVoIPChatMembersChanged')
|
|
16
|
+
export const offVoIPChatInterrupted = /* @__PURE__ */ temporarilyNotSupport('offVoIPChatInterrupted')
|
|
17
|
+
export const joinVoIPChat = /* @__PURE__ */ temporarilyNotSupport('joinVoIPChat')
|
|
18
|
+
export const join1v1Chat = /* @__PURE__ */ temporarilyNotSupport('join1v1Chat')
|
|
19
|
+
export const exitVoIPChat = /* @__PURE__ */ temporarilyNotSupport('exitVoIPChat')
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { temporarilyNotSupport } from '../utils'
|
|
2
|
+
|
|
3
|
+
// mDNS
|
|
4
|
+
export const stopLocalServiceDiscovery = /* @__PURE__ */ temporarilyNotSupport('stopLocalServiceDiscovery')
|
|
5
|
+
export const startLocalServiceDiscovery = /* @__PURE__ */ temporarilyNotSupport('startLocalServiceDiscovery')
|
|
6
|
+
export const onLocalServiceResolveFail = /* @__PURE__ */ temporarilyNotSupport('onLocalServiceResolveFail')
|
|
7
|
+
export const onLocalServiceLost = /* @__PURE__ */ temporarilyNotSupport('onLocalServiceLost')
|
|
8
|
+
export const onLocalServiceFound = /* @__PURE__ */ temporarilyNotSupport('onLocalServiceFound')
|
|
9
|
+
export const onLocalServiceDiscoveryStop = /* @__PURE__ */ temporarilyNotSupport('onLocalServiceDiscoveryStop')
|
|
10
|
+
export const offLocalServiceResolveFail = /* @__PURE__ */ temporarilyNotSupport('offLocalServiceResolveFail')
|
|
11
|
+
export const offLocalServiceLost = /* @__PURE__ */ temporarilyNotSupport('offLocalServiceLost')
|
|
12
|
+
export const offLocalServiceFound = /* @__PURE__ */ temporarilyNotSupport('offLocalServiceFound')
|
|
13
|
+
export const offLocalServiceDiscoveryStop = /* @__PURE__ */ temporarilyNotSupport('offLocalServiceDiscoveryStop')
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
// ✅ RequestTask.onHeadersReceived
|
|
7
7
|
|
|
8
8
|
import http from '@ohos.net.http'
|
|
9
|
-
import { isString
|
|
10
|
-
import Taro from '@tarojs/taro'
|
|
9
|
+
import { isString } from '@tarojs/shared'
|
|
11
10
|
|
|
12
11
|
import { callAsyncFail, callAsyncSuccess, validateParams } from '../utils'
|
|
13
12
|
|
|
13
|
+
import type Taro from '@tarojs/taro/types'
|
|
14
|
+
|
|
14
15
|
const METHOD: string [] = ['OPTIONS', 'GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'TRACE', 'CONNECT']
|
|
15
16
|
|
|
16
17
|
interface IRequestResultOHOS {
|
|
@@ -58,10 +59,10 @@ export const request: typeof Taro.request = function (options) {
|
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
// 检查 Header 是否有 Referer
|
|
61
|
-
if (isUndefined(header.Referer)) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
62
|
+
// if (isUndefined(header.Referer)) {
|
|
63
|
+
// const error = { errMsg: 'request fail parameter error: the header doesn‘t support Referer property' }
|
|
64
|
+
// callAsyncFail(reject, error, options)
|
|
65
|
+
// }
|
|
65
66
|
|
|
66
67
|
// 检查 method 是否正确
|
|
67
68
|
if (method) {
|
|
@@ -18,14 +18,10 @@
|
|
|
18
18
|
// ❌ wx.closeSocket
|
|
19
19
|
|
|
20
20
|
import webSocket from '@ohos.net.webSocket'
|
|
21
|
-
import Taro from '@tarojs/taro'
|
|
22
21
|
|
|
23
22
|
import { callAsyncFail, callAsyncSuccess, validateParams } from '../utils'
|
|
24
|
-
import { IAsyncParams } from '../utils/types'
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
data: string
|
|
28
|
-
}
|
|
24
|
+
import type Taro from '@tarojs/taro/types'
|
|
29
25
|
|
|
30
26
|
const connectSocketSchema = {
|
|
31
27
|
url: 'String'
|
|
@@ -108,7 +104,7 @@ export const connectSocket: typeof Taro.connectSocket = function (options) {
|
|
|
108
104
|
onOpenCallback(!err ? value : err)
|
|
109
105
|
})
|
|
110
106
|
}
|
|
111
|
-
SocketTaskWX.send = function (sendOptions:
|
|
107
|
+
SocketTaskWX.send = function (sendOptions: Taro.SocketTask.SendOption) {
|
|
112
108
|
return new Promise((resolve, reject) => {
|
|
113
109
|
const { data } = sendOptions
|
|
114
110
|
try {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { temporarilyNotSupport } from '../utils'
|
|
2
|
+
|
|
3
|
+
// 视频号
|
|
4
|
+
export const reserveChannelsLive = /* @__PURE__ */ temporarilyNotSupport('reserveChannelsLive')
|
|
5
|
+
export const openChannelsUserProfile = /* @__PURE__ */ temporarilyNotSupport('openChannelsUserProfile')
|
|
6
|
+
export const openChannelsLive = /* @__PURE__ */ temporarilyNotSupport('openChannelsLive')
|
|
7
|
+
export const openChannelsEvent = /* @__PURE__ */ temporarilyNotSupport('openChannelsEvent')
|
|
8
|
+
export const openChannelsActivity = /* @__PURE__ */ temporarilyNotSupport('openChannelsActivity')
|
|
9
|
+
export const getChannelsShareKey = /* @__PURE__ */ temporarilyNotSupport('getChannelsShareKey')
|
|
10
|
+
export const getChannelsLiveNoticeInfo = /* @__PURE__ */ temporarilyNotSupport('getChannelsLiveNoticeInfo')
|
|
11
|
+
export const getChannelsLiveInfo = /* @__PURE__ */ temporarilyNotSupport('getChannelsLiveInfo')
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { temporarilyNotSupport } from '../utils'
|
|
2
|
+
|
|
3
|
+
// 过往接口
|
|
4
|
+
export const checkIsSupportFacialRecognition = /* @__PURE__ */ temporarilyNotSupport('checkIsSupportFacialRecognition')
|
|
5
|
+
export const startFacialRecognitionVerify = /* @__PURE__ */ temporarilyNotSupport('startFacialRecognitionVerify')
|
|
6
|
+
export const startFacialRecognitionVerifyAndUploadVideo = /* @__PURE__ */ temporarilyNotSupport('startFacialRecognitionVerifyAndUploadVideo')
|
|
7
|
+
export const faceVerifyForPay = /* @__PURE__ */ temporarilyNotSupport('faceVerifyForPay')
|
|
@@ -1,7 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
|
|
1
|
+
export * from './account'
|
|
2
|
+
export * from './address'
|
|
3
|
+
export * from './authorize'
|
|
4
|
+
export * from './card'
|
|
5
|
+
export * from './channels-live'
|
|
6
|
+
export * from './customer-service'
|
|
7
|
+
export * from './device-voip'
|
|
8
|
+
export * from './facial'
|
|
9
|
+
export * from './favorites'
|
|
10
|
+
export * from './group'
|
|
11
|
+
export * from './invoice'
|
|
12
|
+
export * from './license-plate'
|
|
13
|
+
export * from './login'
|
|
14
|
+
export * from './my-miniprogram'
|
|
15
|
+
export * from './privacy'
|
|
16
|
+
export * from './red-package'
|
|
17
|
+
export * from './settings'
|
|
18
|
+
export * from './soter'
|
|
19
|
+
export * from './subscribe-message'
|
|
7
20
|
export * from './user-info'
|
|
21
|
+
export * from './werun'
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { temporarilyNotSupport } from '../utils'
|
|
2
|
+
|
|
3
|
+
// 帐号信息
|
|
4
|
+
export const pluginLogin = /* @__PURE__ */ temporarilyNotSupport('pluginLogin')
|
|
5
|
+
export const login = /* @__PURE__ */ temporarilyNotSupport('login')
|
|
6
|
+
export const checkSession = /* @__PURE__ */ temporarilyNotSupport('checkSession')
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { temporarilyNotSupport } from '../utils'
|
|
2
|
+
|
|
3
|
+
// 隐私信息授权
|
|
4
|
+
export const requirePrivacyAuthorize = /* @__PURE__ */ temporarilyNotSupport('requirePrivacyAuthorize')
|
|
5
|
+
export const openPrivacyContract = /* @__PURE__ */ temporarilyNotSupport('openPrivacyContract')
|
|
6
|
+
export const onNeedPrivacyAuthorization = /* @__PURE__ */ temporarilyNotSupport('onNeedPrivacyAuthorization')
|
|
7
|
+
export const getPrivacySetting = /* @__PURE__ */ temporarilyNotSupport('getPrivacySetting')
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { temporarilyNotSupport } from '../utils'
|
|
2
|
+
|
|
3
|
+
// 生物认证
|
|
4
|
+
export const startSoterAuthentication = /* @__PURE__ */ temporarilyNotSupport('startSoterAuthentication')
|
|
5
|
+
export const checkIsSupportSoterAuthentication = /* @__PURE__ */ temporarilyNotSupport('checkIsSupportSoterAuthentication')
|
|
6
|
+
export const checkIsSoterEnrolledInDevice = /* @__PURE__ */ temporarilyNotSupport('checkIsSoterEnrolledInDevice')
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { temporarilyNotSupport } from '../utils'
|
|
2
|
+
|
|
3
|
+
// 订阅消息
|
|
4
|
+
export const requestSubscribeMessage = /* @__PURE__ */ temporarilyNotSupport('requestSubscribeMessage')
|
|
5
|
+
// 订阅设备消息
|
|
6
|
+
export const requestSubscribeDeviceMessage = /* @__PURE__ */ temporarilyNotSupport('requestSubscribeDeviceMessage')
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
// import hmsJSAccount from '@hmscore/hms-jsb-account'
|
|
9
|
-
import { temporarilyNotSupport } from '
|
|
9
|
+
import { temporarilyNotSupport } from '../utils'
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* 通过Scope数组获取已登录的对应帐号信息(依赖login行为)
|
|
@@ -53,21 +53,6 @@ export const getUserProfile = temporarilyNotSupport('getUserProfile')
|
|
|
53
53
|
// })
|
|
54
54
|
// }
|
|
55
55
|
|
|
56
|
-
/**
|
|
57
|
-
* 提前向用户发起授权请求
|
|
58
|
-
*/
|
|
59
|
-
export const authorize = temporarilyNotSupport('authorize')
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* 获取用户的当前设置
|
|
63
|
-
*/
|
|
64
|
-
export const getSetting = temporarilyNotSupport('getSetting')
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* 调起客户端小程序设置界面
|
|
68
|
-
*/
|
|
69
|
-
export const openSetting = temporarilyNotSupport('openSetting')
|
|
70
|
-
|
|
71
56
|
// function generateUserInfo (hmsAuthInfo) {
|
|
72
57
|
// const userInfo = {
|
|
73
58
|
// nickName: String,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { temporarilyNotSupport } from '../utils'
|
|
2
|
+
|
|
3
|
+
// 支付
|
|
4
|
+
export const requestPayment = /* @__PURE__ */ temporarilyNotSupport('requestPayment')
|
|
5
|
+
export const requestPluginPayment = /* @__PURE__ */ temporarilyNotSupport('requestPluginPayment')
|
|
6
|
+
export const requestOrderPayment = /* @__PURE__ */ temporarilyNotSupport('requestOrderPayment')
|
package/dist/apis/route/index.ts
CHANGED
|
@@ -1,28 +1,11 @@
|
|
|
1
1
|
import router from '@ohos.router'
|
|
2
|
-
// eslint-disable-
|
|
3
|
-
import {
|
|
4
|
-
// eslint-disable-next-line import/no-duplicates
|
|
5
|
-
import { eventCenter } from '@tarojs/runtime/dist/runtime.esm'
|
|
2
|
+
import { window } from '@tarojs/runtime' // eslint-disable-line import/no-duplicates
|
|
3
|
+
import { eventCenter } from '@tarojs/runtime/dist/runtime.esm' // eslint-disable-line import/no-duplicates
|
|
6
4
|
import { queryToJson } from '@tarojs/shared'
|
|
7
5
|
|
|
8
6
|
import { callAsyncFail, callAsyncSuccess } from '../utils'
|
|
9
|
-
import { IAsyncParams } from '../utils/types'
|
|
10
7
|
|
|
11
|
-
import type Taro from '@tarojs/
|
|
12
|
-
|
|
13
|
-
const launchOptions: Taro.getLaunchOptionsSync.LaunchOptions = {
|
|
14
|
-
path: '',
|
|
15
|
-
query: {},
|
|
16
|
-
scene: 0,
|
|
17
|
-
shareTicket: '',
|
|
18
|
-
referrerInfo: {}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function initLaunchOptions (options = {}) {
|
|
22
|
-
Object.assign(launchOptions, options)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
eventCenter.once('__taroRouterLaunch', initLaunchOptions)
|
|
8
|
+
import type Taro from '@tarojs/taro/types'
|
|
26
9
|
|
|
27
10
|
const TARO_TABBAR_PAGE_PATH = 'taro_tabbar'
|
|
28
11
|
function isTabPage (url: string): boolean {
|
|
@@ -33,6 +16,21 @@ function parseURL (raw = ''): [string, Record<string, unknown>] {
|
|
|
33
16
|
const [urlStr, queryStr = ''] = raw.split('?')
|
|
34
17
|
const query: Record<string, unknown> = queryToJson(queryStr)
|
|
35
18
|
let url = urlStr.replace(/^\//, '')
|
|
19
|
+
|
|
20
|
+
// 处理相对路径
|
|
21
|
+
if (url.indexOf('.') === 0) {
|
|
22
|
+
const page = router.getState()
|
|
23
|
+
const parts = page.path.split('/')
|
|
24
|
+
parts.pop()
|
|
25
|
+
url.split('/').forEach((item) => {
|
|
26
|
+
if (item === '.') {
|
|
27
|
+
return
|
|
28
|
+
}
|
|
29
|
+
item === '..' ? parts.pop() : parts.push(item)
|
|
30
|
+
})
|
|
31
|
+
url = parts.join('/')
|
|
32
|
+
}
|
|
33
|
+
|
|
36
34
|
if (isTabPage(url)) {
|
|
37
35
|
query.$page = url
|
|
38
36
|
url = TARO_TABBAR_PAGE_PATH
|
|
@@ -40,10 +38,6 @@ function parseURL (raw = ''): [string, Record<string, unknown>] {
|
|
|
40
38
|
return [url, query]
|
|
41
39
|
}
|
|
42
40
|
|
|
43
|
-
// 生命周期
|
|
44
|
-
export const getLaunchOptionsSync = () => launchOptions
|
|
45
|
-
export const getEnterOptionsSync = () => launchOptions
|
|
46
|
-
|
|
47
41
|
const getRouterFunc = (method): typeof Taro.navigateTo => {
|
|
48
42
|
const methodName = method === 'navigateTo' ? 'pushUrl' : 'replaceUrl'
|
|
49
43
|
|
|
@@ -74,10 +68,7 @@ const getRouterFunc = (method): typeof Taro.navigateTo => {
|
|
|
74
68
|
export const navigateTo = getRouterFunc('navigateTo')
|
|
75
69
|
export const redirectTo = getRouterFunc('redirectTo')
|
|
76
70
|
|
|
77
|
-
|
|
78
|
-
url?: string
|
|
79
|
-
}
|
|
80
|
-
export function navigateBack (options: INavigateBackParams): Promise<any> {
|
|
71
|
+
export function navigateBack (options: Taro.navigateBack.Option & { url?: string }): Promise<any> {
|
|
81
72
|
return new Promise(resolve => {
|
|
82
73
|
if (!options?.url) {
|
|
83
74
|
router.back()
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { permanentlyNotSupport, temporarilyNotSupport } from '../utils'
|
|
2
|
+
|
|
3
|
+
// 转发
|
|
4
|
+
|
|
5
|
+
/** 更新转发属性 */
|
|
6
|
+
export const updateShareMenu = /* @__PURE__ */ temporarilyNotSupport('updateShareMenu')
|
|
7
|
+
|
|
8
|
+
/** 显示当前页面的转发按钮 */
|
|
9
|
+
export const showShareMenu = /* @__PURE__ */ temporarilyNotSupport('showShareMenu')
|
|
10
|
+
|
|
11
|
+
/** 打开分享图片弹窗,可以将图片发送给朋友、收藏或下载 */
|
|
12
|
+
export const showShareImageMenu = /* @__PURE__ */ temporarilyNotSupport('showShareImageMenu')
|
|
13
|
+
|
|
14
|
+
/** 转发视频到聊天 */
|
|
15
|
+
export const shareVideoMessage = /* @__PURE__ */ temporarilyNotSupport('shareVideoMessage')
|
|
16
|
+
|
|
17
|
+
/** 转发文件到聊天 */
|
|
18
|
+
export const shareFileMessage = /* @__PURE__ */ temporarilyNotSupport('shareFileMessage')
|
|
19
|
+
|
|
20
|
+
/** 监听用户点击右上角菜单的「复制链接」按钮时触发的事件 */
|
|
21
|
+
export const onCopyUrl = /* @__PURE__ */ temporarilyNotSupport('onCopyUrl')
|
|
22
|
+
|
|
23
|
+
/** 移除用户点击右上角菜单的「复制链接」按钮时触发的事件的监听函数 */
|
|
24
|
+
export const offCopyUrl = /* @__PURE__ */ temporarilyNotSupport('offCopyUrl')
|
|
25
|
+
|
|
26
|
+
/** 隐藏当前页面的转发按钮 */
|
|
27
|
+
export const hideShareMenu = /* @__PURE__ */ temporarilyNotSupport('hideShareMenu')
|
|
28
|
+
|
|
29
|
+
/** 获取转发详细信息 */
|
|
30
|
+
export const getShareInfo = /* @__PURE__ */ temporarilyNotSupport('getShareInfo')
|
|
31
|
+
|
|
32
|
+
/** 验证私密消息。 */
|
|
33
|
+
export const authPrivateMessage = /* @__PURE__ */ permanentlyNotSupport('authPrivateMessage')
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { temporarilyNotSupport } from '../utils'
|
|
2
|
+
|
|
3
|
+
// 周期性更新
|
|
4
|
+
export const setBackgroundFetchToken = /* @__PURE__ */ temporarilyNotSupport('setBackgroundFetchToken')
|
|
5
|
+
export const onBackgroundFetchData = /* @__PURE__ */ temporarilyNotSupport('onBackgroundFetchData')
|
|
6
|
+
export const getBackgroundFetchToken = /* @__PURE__ */ temporarilyNotSupport('getBackgroundFetchToken')
|
|
7
|
+
export const getBackgroundFetchData = /* @__PURE__ */ temporarilyNotSupport('getBackgroundFetchData')
|