@ray-js/api 1.4.0-alpha.0 → 1.4.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/@types/P2PKit.d.ts +402 -0
- package/@types/all-kits.d.ts +1 -0
- package/lib/BaseKit-3.3.10.js +85 -83
- package/lib/BizKit-3.2.7.js +48 -47
- package/lib/DeviceKit-3.3.1.js +194 -193
- package/lib/HomeKit-3.1.4.js +2 -1
- package/lib/MapKit-3.0.7.js +4 -2
- package/lib/MiniKit-3.1.0.js +65 -64
- package/lib/P2PKit-2.0.3.d.ts +27 -0
- package/lib/P2PKit-2.0.3.js +79 -0
- package/lib/PlayNetKit-1.1.3.js +2 -1
- package/lib/all-kits.d.ts +1 -0
- package/lib/all-kits.js +1 -0
- package/lib/cloud/alarm.js +4 -7
- package/lib/cloud/core.js +2 -3
- package/lib/cloud/device.js +20 -31
- package/lib/cloud/interface.d.ts +7 -7
- package/lib/cloud/linkage.js +43 -41
- package/lib/cloud/statistic.js +21 -33
- package/lib/cloud/timer.js +31 -48
- package/lib/constants.js +1 -1
- package/lib/core/promisify/index.js +5 -9
- package/lib/getBoundingClientRect/index.js +16 -17
- package/lib/getBoundingClientRect/index.thing.js +16 -17
- package/lib/getBoundingClientRect/index.wechat.js +16 -17
- package/lib/getCdnUrl/index.d.ts +1 -0
- package/lib/getCdnUrl/index.js +4 -0
- package/lib/getCdnUrl/index.thing.d.ts +3 -1
- package/lib/getCdnUrl/index.thing.js +54 -19
- package/lib/getCdnUrl/index.wechat.d.ts +1 -0
- package/lib/getCdnUrl/index.wechat.js +4 -0
- package/lib/getElementById/index.js +1 -3
- package/lib/getElementById/index.thing.js +2 -4
- package/lib/getElementById/index.wechat.js +2 -4
- package/lib/index.d.ts +1 -1
- package/lib/index.js +4 -3
- package/lib/lifecycles/offAppEvent/index.js +2 -2
- package/lib/lifecycles/offAppHide/index.js +2 -2
- package/lib/lifecycles/offAppShow/index.js +2 -2
- package/lib/lifecycles/offError/index.js +2 -2
- package/lib/lifecycles/offThemeChange/index.js +2 -2
- package/lib/lifecycles/offWindowResize/index.js +2 -2
- package/lib/lifecycles/onAppEvent/index.js +2 -2
- package/lib/lifecycles/onAppHide/index.js +2 -2
- package/lib/lifecycles/onAppShow/index.js +2 -2
- package/lib/lifecycles/onError/index.js +2 -2
- package/lib/lifecycles/onPageNotFound/index.js +2 -2
- package/lib/lifecycles/onThemeChange/index.js +2 -2
- package/lib/lifecycles/onWindowResize/index.js +2 -2
- package/lib/navigateBack/index.js +3 -6
- package/lib/navigateTo/index.js +2 -5
- package/lib/onNavigationBarBack/index.js +1 -2
- package/lib/onNavigationBarBack/index.wechat.js +1 -2
- package/lib/panel/devInfo/index.js +84 -121
- package/lib/panel/i18n/index.d.ts +1 -1
- package/lib/panel/i18n/index.js +180 -262
- package/lib/panel/i18n/index.wechat.d.ts +1 -1
- package/lib/panel/i18n/index.wechat.js +184 -267
- package/lib/panel/normalizeNetwork.d.ts +2 -2
- package/lib/panel/normalizeNetwork.js +2 -7
- package/lib/panel/publishDps.d.ts +1 -1
- package/lib/panel/publishDps.js +13 -18
- package/lib/panel/types/devInfo.d.ts +3 -3
- package/lib/panel/types/utilities.d.ts +8 -8
- package/lib/panel/utils.js +1 -3
- package/lib/reLaunch/index.js +2 -5
- package/lib/redirectTo/index.js +2 -6
- package/lib/requestCloud/index.js +2 -2
- package/lib/requestCloud/index.wechat.js +0 -1
- package/lib/setNavigationBarBack/index.js +1 -2
- package/lib/setNavigationBarBack/index.wechat.js +1 -2
- package/lib/setNavigationBarColor/index.js +3 -6
- package/lib/setNavigationBarTitle/index.js +5 -6
- package/lib/switchTab/index.js +2 -5
- package/lib/utils.d.ts +1 -1
- package/lib/utils.js +5 -14
- package/lib/utils.wechat.d.ts +1 -1
- package/lib/utils.wechat.js +9 -21
- package/lib/viewAPI.js +13 -12
- package/package.json +25 -25
- package/LICENSE.md +0 -9
@@ -0,0 +1,402 @@
|
|
1
|
+
/**
|
2
|
+
* P2PKit
|
3
|
+
*
|
4
|
+
* @version 2.0.3
|
5
|
+
*/
|
6
|
+
declare namespace ty.p2p {
|
7
|
+
/**
|
8
|
+
* P2P SDK 初始化
|
9
|
+
*/
|
10
|
+
export function P2PSDKInit(params: {
|
11
|
+
/** 用户id */
|
12
|
+
userId: string
|
13
|
+
complete?: () => void
|
14
|
+
success?: (params: null) => void
|
15
|
+
fail?: (params: {
|
16
|
+
errorMsg: string
|
17
|
+
errorCode: string | number
|
18
|
+
innerError: {
|
19
|
+
errorCode: string | number
|
20
|
+
errorMsg: string
|
21
|
+
}
|
22
|
+
}) => void
|
23
|
+
}): void
|
24
|
+
|
25
|
+
/**
|
26
|
+
* 建立P2P连接
|
27
|
+
*/
|
28
|
+
export function connectDevice(params: {
|
29
|
+
/** 设备id */
|
30
|
+
deviceId: string
|
31
|
+
/** 连接模式,0:INTERNET 1:LAN */
|
32
|
+
mode?: number
|
33
|
+
/** 超时时长,单位:ms,设置0会设置成默认值,Internet:15000ms, Lan:3000ms */
|
34
|
+
timeout?: number
|
35
|
+
complete?: () => void
|
36
|
+
success?: (params: null) => void
|
37
|
+
fail?: (params: {
|
38
|
+
errorMsg: string
|
39
|
+
errorCode: string | number
|
40
|
+
innerError: {
|
41
|
+
errorCode: string | number
|
42
|
+
errorMsg: string
|
43
|
+
}
|
44
|
+
}) => void
|
45
|
+
}): void
|
46
|
+
|
47
|
+
/**
|
48
|
+
* 检查P2P连接
|
49
|
+
*/
|
50
|
+
export function isP2PActive(params: {
|
51
|
+
/** 设备id */
|
52
|
+
deviceId: string
|
53
|
+
/** 连接模式,0:INTERNET 1:LAN */
|
54
|
+
mode?: number
|
55
|
+
/** 超时时长,单位:ms,设置0会设置成默认值,Internet:15000ms, Lan:3000ms */
|
56
|
+
timeout?: number
|
57
|
+
complete?: () => void
|
58
|
+
success?: (params: null) => void
|
59
|
+
fail?: (params: {
|
60
|
+
errorMsg: string
|
61
|
+
errorCode: string | number
|
62
|
+
innerError: {
|
63
|
+
errorCode: string | number
|
64
|
+
errorMsg: string
|
65
|
+
}
|
66
|
+
}) => void
|
67
|
+
}): void
|
68
|
+
|
69
|
+
/**
|
70
|
+
* 检查P2P连接
|
71
|
+
*/
|
72
|
+
export function isP2PActiveSync(params?: ThingP2PConnectionParams): null
|
73
|
+
|
74
|
+
/**
|
75
|
+
* 查询设备相册文件索引列表
|
76
|
+
*/
|
77
|
+
export function queryAlbumFileIndexs(params: {
|
78
|
+
/** 设备id */
|
79
|
+
deviceId: string
|
80
|
+
/** albumName 和设备端约定字段 */
|
81
|
+
albumName: string
|
82
|
+
complete?: () => void
|
83
|
+
success?: (params: {
|
84
|
+
/** 文件个数 */
|
85
|
+
count: number
|
86
|
+
/** 文件索引 */
|
87
|
+
items: ThingP2PAlbumFileIndex[]
|
88
|
+
}) => void
|
89
|
+
fail?: (params: {
|
90
|
+
errorMsg: string
|
91
|
+
errorCode: string | number
|
92
|
+
innerError: {
|
93
|
+
errorCode: string | number
|
94
|
+
errorMsg: string
|
95
|
+
}
|
96
|
+
}) => void
|
97
|
+
}): void
|
98
|
+
|
99
|
+
/**
|
100
|
+
* P2P上传文件
|
101
|
+
*/
|
102
|
+
export function uploadFile(params: {
|
103
|
+
/** 设备id */
|
104
|
+
deviceId: string
|
105
|
+
/** albumName 和设备端约定字段 */
|
106
|
+
albumName: string
|
107
|
+
/** 文件本地路径 */
|
108
|
+
filePath: string
|
109
|
+
/** 扩展字段 */
|
110
|
+
extData?: string
|
111
|
+
/** 扩展字段长度 */
|
112
|
+
extDataLength?: number
|
113
|
+
complete?: () => void
|
114
|
+
success?: (params: null) => void
|
115
|
+
fail?: (params: {
|
116
|
+
errorMsg: string
|
117
|
+
errorCode: string | number
|
118
|
+
innerError: {
|
119
|
+
errorCode: string | number
|
120
|
+
errorMsg: string
|
121
|
+
}
|
122
|
+
}) => void
|
123
|
+
}): void
|
124
|
+
|
125
|
+
/**
|
126
|
+
* P2P下载文件
|
127
|
+
*/
|
128
|
+
export function downloadFile(params: {
|
129
|
+
/** 设备id */
|
130
|
+
deviceId: string
|
131
|
+
/** albumName 和设备端约定字段 */
|
132
|
+
albumName: string
|
133
|
+
/** 下载文件本地存储路径 */
|
134
|
+
filePath: string
|
135
|
+
/** 下载的文件名称,eg: {"files":["filesname1", "filesname2", "filesname3" ]} */
|
136
|
+
jsonfiles: string
|
137
|
+
complete?: () => void
|
138
|
+
success?: (params: null) => void
|
139
|
+
fail?: (params: {
|
140
|
+
errorMsg: string
|
141
|
+
errorCode: string | number
|
142
|
+
innerError: {
|
143
|
+
errorCode: string | number
|
144
|
+
errorMsg: string
|
145
|
+
}
|
146
|
+
}) => void
|
147
|
+
}): void
|
148
|
+
|
149
|
+
/**
|
150
|
+
* P2P下载数据流
|
151
|
+
*/
|
152
|
+
export function downloadStream(params: {
|
153
|
+
/** 设备id */
|
154
|
+
deviceId: string
|
155
|
+
/** albumName 和设备端约定字段 */
|
156
|
+
albumName: string
|
157
|
+
/** 下载的文件名称,eg: {"files":["filesname1", "filesname2", "filesname3" ]} */
|
158
|
+
jsonfiles: string
|
159
|
+
complete?: () => void
|
160
|
+
success?: (params: null) => void
|
161
|
+
fail?: (params: {
|
162
|
+
errorMsg: string
|
163
|
+
errorCode: string | number
|
164
|
+
innerError: {
|
165
|
+
errorCode: string | number
|
166
|
+
errorMsg: string
|
167
|
+
}
|
168
|
+
}) => void
|
169
|
+
}): void
|
170
|
+
|
171
|
+
/**
|
172
|
+
* 取消传输任务
|
173
|
+
*/
|
174
|
+
export function cancelUploadTask(params: {
|
175
|
+
/** 设备id */
|
176
|
+
deviceId: string
|
177
|
+
complete?: () => void
|
178
|
+
success?: (params: null) => void
|
179
|
+
fail?: (params: {
|
180
|
+
errorMsg: string
|
181
|
+
errorCode: string | number
|
182
|
+
innerError: {
|
183
|
+
errorCode: string | number
|
184
|
+
errorMsg: string
|
185
|
+
}
|
186
|
+
}) => void
|
187
|
+
}): void
|
188
|
+
|
189
|
+
/**
|
190
|
+
* 取消下载任务
|
191
|
+
*/
|
192
|
+
export function cancelDownloadTask(params: {
|
193
|
+
/** 设备id */
|
194
|
+
deviceId: string
|
195
|
+
complete?: () => void
|
196
|
+
success?: (params: null) => void
|
197
|
+
fail?: (params: {
|
198
|
+
errorMsg: string
|
199
|
+
errorCode: string | number
|
200
|
+
innerError: {
|
201
|
+
errorCode: string | number
|
202
|
+
errorMsg: string
|
203
|
+
}
|
204
|
+
}) => void
|
205
|
+
}): void
|
206
|
+
|
207
|
+
/**
|
208
|
+
* 和设备断开连接
|
209
|
+
*/
|
210
|
+
export function disconnectDevice(params: {
|
211
|
+
/** 设备id */
|
212
|
+
deviceId: string
|
213
|
+
complete?: () => void
|
214
|
+
success?: (params: null) => void
|
215
|
+
fail?: (params: {
|
216
|
+
errorMsg: string
|
217
|
+
errorCode: string | number
|
218
|
+
innerError: {
|
219
|
+
errorCode: string | number
|
220
|
+
errorMsg: string
|
221
|
+
}
|
222
|
+
}) => void
|
223
|
+
}): void
|
224
|
+
|
225
|
+
/**
|
226
|
+
* P2P SDK 反初始化
|
227
|
+
*/
|
228
|
+
export function deInitSDK(params?: {
|
229
|
+
complete?: () => void
|
230
|
+
success?: (params: null) => void
|
231
|
+
fail?: (params: {
|
232
|
+
errorMsg: string
|
233
|
+
errorCode: string | number
|
234
|
+
innerError: {
|
235
|
+
errorCode: string | number
|
236
|
+
errorMsg: string
|
237
|
+
}
|
238
|
+
}) => void
|
239
|
+
}): void
|
240
|
+
|
241
|
+
/**
|
242
|
+
* 连接状态改变回调
|
243
|
+
*/
|
244
|
+
export function onSessionStatusChange(listener: (params: ThingP2PSessionStatus) => void): void
|
245
|
+
|
246
|
+
/**
|
247
|
+
* 取消监听:连接状态改变回调
|
248
|
+
*/
|
249
|
+
export function offSessionStatusChange(listener: (params: ThingP2PSessionStatus) => void): void
|
250
|
+
|
251
|
+
/**
|
252
|
+
* 上传进度回调
|
253
|
+
*/
|
254
|
+
export function onUploadProgressUpdate(listener: (params: ProgressEvent) => void): void
|
255
|
+
|
256
|
+
/**
|
257
|
+
* 取消监听:上传进度回调
|
258
|
+
*/
|
259
|
+
export function offUploadProgressUpdate(listener: (params: ProgressEvent) => void): void
|
260
|
+
|
261
|
+
/**
|
262
|
+
* 单个文件下载进度回调
|
263
|
+
*/
|
264
|
+
export function onDownloadProgressUpdate(listener: (params: DownloadProgressEvent) => void): void
|
265
|
+
|
266
|
+
/**
|
267
|
+
* 取消监听:单个文件下载进度回调
|
268
|
+
*/
|
269
|
+
export function offDownloadProgressUpdate(listener: (params: DownloadProgressEvent) => void): void
|
270
|
+
|
271
|
+
/**
|
272
|
+
* 下载总进度回调
|
273
|
+
*/
|
274
|
+
export function onDownloadTotalProgressUpdate(
|
275
|
+
listener: (params: DownloadTotalProgressEvent) => void
|
276
|
+
): void
|
277
|
+
|
278
|
+
/**
|
279
|
+
* 取消监听:下载总进度回调
|
280
|
+
*/
|
281
|
+
export function offDownloadTotalProgressUpdate(
|
282
|
+
listener: (params: DownloadTotalProgressEvent) => void
|
283
|
+
): void
|
284
|
+
|
285
|
+
/**
|
286
|
+
* 单文件下载完成事件
|
287
|
+
*/
|
288
|
+
export function onFileDownloadComplete(
|
289
|
+
listener: (params: FileDownloadCompletionEvent) => void
|
290
|
+
): void
|
291
|
+
|
292
|
+
/**
|
293
|
+
* 取消监听:单文件下载完成事件
|
294
|
+
*/
|
295
|
+
export function offFileDownloadComplete(
|
296
|
+
listener: (params: FileDownloadCompletionEvent) => void
|
297
|
+
): void
|
298
|
+
|
299
|
+
/**
|
300
|
+
* 收到数据包事件
|
301
|
+
*/
|
302
|
+
export function onStreamPacketReceive(
|
303
|
+
listener: (params: StreamDownloadPacketReceivedEvent) => void
|
304
|
+
): void
|
305
|
+
|
306
|
+
/**
|
307
|
+
* 取消监听:收到数据包事件
|
308
|
+
*/
|
309
|
+
export function offStreamPacketReceive(
|
310
|
+
listener: (params: StreamDownloadPacketReceivedEvent) => void
|
311
|
+
): void
|
312
|
+
|
313
|
+
export type ThingP2PConnectionParams = {
|
314
|
+
/** 设备id */
|
315
|
+
deviceId: string
|
316
|
+
/** 连接模式,0:INTERNET 1:LAN */
|
317
|
+
mode?: number
|
318
|
+
/** 超时时长,单位:ms,设置0会设置成默认值,Internet:15000ms, Lan:3000ms */
|
319
|
+
timeout?: number
|
320
|
+
}
|
321
|
+
|
322
|
+
export type ThingP2PAlbumFileIndex = {
|
323
|
+
/** idx 唯一标识,设备提供 */
|
324
|
+
idx: number
|
325
|
+
/** channel 通道号 */
|
326
|
+
channel: number
|
327
|
+
/** type 文件类型,0: 图片,2: mp4, 3: 全景拼接文件 */
|
328
|
+
type: number
|
329
|
+
/** dir 0: 文件,1: 文件夹。保留字段,目前都是 0 */
|
330
|
+
dir: number
|
331
|
+
/** filename 文件名,带有文件后缀 */
|
332
|
+
filename: string
|
333
|
+
/** createTime 文件创建时间 */
|
334
|
+
createTime: number
|
335
|
+
/** duration 视频文件时长 */
|
336
|
+
duration: number
|
337
|
+
}
|
338
|
+
|
339
|
+
export type ThingP2PSessionStatus = {
|
340
|
+
/** 设备id */
|
341
|
+
deviceId: string
|
342
|
+
/** 状态值, 小于0为断开连接 */
|
343
|
+
status: number
|
344
|
+
}
|
345
|
+
|
346
|
+
export type ProgressEvent = {
|
347
|
+
/** 设备id */
|
348
|
+
deviceId: string
|
349
|
+
/** 文件本地路径 */
|
350
|
+
filePath: string
|
351
|
+
/** 上传/下载进度 */
|
352
|
+
progress: number
|
353
|
+
}
|
354
|
+
|
355
|
+
export type DownloadProgressEvent = {
|
356
|
+
/** 设备id */
|
357
|
+
deviceId: string
|
358
|
+
/** 正在下载的文件名称 */
|
359
|
+
fileName: string
|
360
|
+
/** 上传/下载进度 */
|
361
|
+
progress: number
|
362
|
+
}
|
363
|
+
|
364
|
+
export type DownloadTotalProgressEvent = {
|
365
|
+
/** 设备id */
|
366
|
+
deviceId: string
|
367
|
+
/** 上传/下载进度 */
|
368
|
+
progress: number
|
369
|
+
}
|
370
|
+
|
371
|
+
export type FileDownloadCompletionEvent = {
|
372
|
+
/** 设备id */
|
373
|
+
deviceId: string
|
374
|
+
/** 文件名 */
|
375
|
+
fileName: string
|
376
|
+
/** 索引 */
|
377
|
+
index: number
|
378
|
+
}
|
379
|
+
|
380
|
+
export type StreamDownloadPacketReceivedEvent = {
|
381
|
+
/** 设备id */
|
382
|
+
deviceId: string
|
383
|
+
/** 文件个数 */
|
384
|
+
totalFiles: number
|
385
|
+
/** 文件名 */
|
386
|
+
fileName: string
|
387
|
+
/** 索引,目前错误数据 */
|
388
|
+
fileIndex: number
|
389
|
+
/** 文件大小 */
|
390
|
+
fileLength: number
|
391
|
+
/** 数据 */
|
392
|
+
packetData: string
|
393
|
+
/** 包大小 */
|
394
|
+
packetLength: number
|
395
|
+
/** 文件序列号 */
|
396
|
+
fileSerialNumber: number
|
397
|
+
/** 包索引 */
|
398
|
+
packetIndex: number
|
399
|
+
/** 包头/包尾 0b00XY Y:包头 X:包尾 */
|
400
|
+
packetType: number
|
401
|
+
}
|
402
|
+
}
|
package/@types/all-kits.d.ts
CHANGED
package/lib/BaseKit-3.3.10.js
CHANGED
@@ -1,86 +1,88 @@
|
|
1
1
|
/// <reference path="../@types/BaseKit.d.ts" />
|
2
|
-
import { factory } from './utils';
|
3
|
-
export var stopAccelerometer = factory('stopAccelerometer');
|
4
|
-
export var startAccelerometer = factory('startAccelerometer');
|
5
|
-
export var getAudioFileDuration = factory('getAudioFileDuration');
|
6
|
-
export var authorize = factory('authorize');
|
7
|
-
export var authorizeStatus = factory('authorizeStatus');
|
8
|
-
export var navigateToMiniProgram = factory('navigateToMiniProgram');
|
9
|
-
export var startCompass = factory('startCompass');
|
10
|
-
export var stopCompass = factory('stopCompass');
|
11
|
-
export var startDeviceMotionListening = factory('startDeviceMotionListening');
|
12
|
-
export var stopDeviceMotionListening = factory('stopDeviceMotionListening');
|
13
|
-
export var startGyroscope = factory('startGyroscope');
|
14
|
-
export var stopGyroscope = factory('stopGyroscope');
|
15
|
-
export var chooseImage = factory('chooseImage');
|
16
|
-
export var chooseMedia = factory('chooseMedia');
|
17
|
-
export var chooseCropImage = factory('chooseCropImage');
|
18
|
-
export var previewImage = factory('previewImage');
|
19
|
-
export var getImageInfo = factory('getImageInfo');
|
20
|
-
export var getVideoInfo = factory('getVideoInfo');
|
21
|
-
export var saveVideoToPhotosAlbum = factory('saveVideoToPhotosAlbum');
|
22
|
-
export var showToast = factory('showToast');
|
23
|
-
export var showModal = factory('showModal');
|
24
|
-
export var showLoading = factory('showLoading');
|
25
|
-
export var showActionSheet = factory('showActionSheet');
|
26
|
-
export var hideToast = factory('hideToast');
|
27
|
-
export var hideLoading = factory('hideLoading');
|
28
|
-
export var makePhoneCall = factory('makePhoneCall');
|
29
|
-
export var setClipboardData = factory('setClipboardData');
|
30
|
-
export var getClipboardData = factory('getClipboardData');
|
31
|
-
export var updateVolume = factory('updateVolume');
|
32
|
-
export var getCurrentVolume = factory('getCurrentVolume');
|
33
|
-
export var registerSystemVolumeChange = factory('registerSystemVolumeChange');
|
34
|
-
export var unRegisterSystemVolumeChange = factory('unRegisterSystemVolumeChange');
|
35
|
-
export var getSystemSetting = factory('getSystemSetting');
|
36
|
-
export var getMobileDeviceInfo = factory('getDeviceInfo');
|
37
|
-
export var getSystemInfo = factory('getSystemInfo');
|
38
|
-
export var getSystemInfoSync = factory('getSystemInfoSync');
|
39
|
-
export var getWifiList = factory('getWifiList');
|
40
|
-
export var getConnectedWifi = factory('getConnectedWifi');
|
41
|
-
export var openSystemBluetoothSetting = factory('openSystemBluetoothSetting');
|
42
|
-
export var getNetworkType = factory('getNetworkType');
|
43
|
-
export var setScreenBrightness = factory('setScreenBrightness');
|
44
|
-
export var getScreenBrightness = factory('getScreenBrightness');
|
45
|
-
export var setKeepScreenOn = factory('setKeepScreenOn');
|
46
|
-
export var vibrateShort = factory('vibrateShort');
|
47
|
-
export var vibrateLong = factory('vibrateLong');
|
48
|
-
export var scanCode = factory('scanCode');
|
49
|
-
export var setStorage = factory('setStorage');
|
50
|
-
export var setStorageSync = factory('setStorageSync');
|
51
|
-
export var getStorage = factory('getStorage');
|
52
|
-
export var getStorageSync = factory('getStorageSync');
|
53
|
-
export var removeStorage = factory('removeStorage');
|
54
|
-
export var removeStorageSync = factory('removeStorageSync');
|
55
|
-
export var clearStorage = factory('clearStorage');
|
56
|
-
export var clearStorageSync = factory('clearStorageSync');
|
57
|
-
export var onSystemVolumeChangeEvent = factory('onSystemVolumeChangeEvent');
|
58
|
-
export var offSystemVolumeChangeEvent = factory('offSystemVolumeChangeEvent');
|
59
|
-
export var onGetWifiList = factory('onGetWifiList');
|
60
|
-
export var offGetWifiList = factory('offGetWifiList');
|
61
|
-
export var onRecordingEvent = factory('onRecordingEvent');
|
62
|
-
export var offRecordingEvent = factory('offRecordingEvent');
|
63
|
-
export var onAccelerometerChange = factory('onAccelerometerChange');
|
64
|
-
export var offAccelerometerChange = factory('offAccelerometerChange');
|
65
|
-
export var onCompassChange = factory('onCompassChange');
|
66
|
-
export var offCompassChange = factory('offCompassChange');
|
67
|
-
export var onDeviceMotionChange = factory('onDeviceMotionChange');
|
68
|
-
export var offDeviceMotionChange = factory('offDeviceMotionChange');
|
69
|
-
export var onGyroscopeChange = factory('onGyroscopeChange');
|
70
|
-
export var offGyroscopeChange = factory('offGyroscopeChange');
|
71
|
-
export var onMemoryWarning = factory('onMemoryWarning');
|
72
|
-
export var offMemoryWarning = factory('offMemoryWarning');
|
73
|
-
export var onBluetoothAdapterStateChange = factory('onBluetoothAdapterStateChange');
|
74
|
-
export var offBluetoothAdapterStateChange = factory('offBluetoothAdapterStateChange');
|
75
|
-
export var onNetworkStatusChange = factory('onNetworkStatusChange');
|
76
|
-
export var offNetworkStatusChange = factory('offNetworkStatusChange');
|
77
|
-
export var createInnerAudioContext = factory('createInnerAudioContext');
|
78
|
-
export var downloadFile = factory('downloadFile');
|
79
|
-
export var getFileSystemManager = factory('getFileSystemManager');
|
80
|
-
export var request = factory('request');
|
81
|
-
export var getRecorderManager = factory('getRecorderManager');
|
82
|
-
export var uploadFile = factory('uploadFile'); // 3.2.1 新增 - 4.7.0 容器
|
83
2
|
|
84
|
-
|
3
|
+
import { factory } from './utils';
|
4
|
+
export const stopAccelerometer = factory('stopAccelerometer');
|
5
|
+
export const startAccelerometer = factory('startAccelerometer');
|
6
|
+
export const getAudioFileDuration = factory('getAudioFileDuration');
|
7
|
+
export const authorize = factory('authorize');
|
8
|
+
export const authorizeStatus = factory('authorizeStatus');
|
9
|
+
export const navigateToMiniProgram = factory('navigateToMiniProgram');
|
10
|
+
export const startCompass = factory('startCompass');
|
11
|
+
export const stopCompass = factory('stopCompass');
|
12
|
+
export const startDeviceMotionListening = factory('startDeviceMotionListening');
|
13
|
+
export const stopDeviceMotionListening = factory('stopDeviceMotionListening');
|
14
|
+
export const startGyroscope = factory('startGyroscope');
|
15
|
+
export const stopGyroscope = factory('stopGyroscope');
|
16
|
+
export const chooseImage = factory('chooseImage');
|
17
|
+
export const chooseMedia = factory('chooseMedia');
|
18
|
+
export const chooseCropImage = factory('chooseCropImage');
|
19
|
+
export const previewImage = factory('previewImage');
|
20
|
+
export const getImageInfo = factory('getImageInfo');
|
21
|
+
export const getVideoInfo = factory('getVideoInfo');
|
22
|
+
export const saveVideoToPhotosAlbum = factory('saveVideoToPhotosAlbum');
|
23
|
+
export const showToast = factory('showToast');
|
24
|
+
export const showModal = factory('showModal');
|
25
|
+
export const showLoading = factory('showLoading');
|
26
|
+
export const showActionSheet = factory('showActionSheet');
|
27
|
+
export const hideToast = factory('hideToast');
|
28
|
+
export const hideLoading = factory('hideLoading');
|
29
|
+
export const makePhoneCall = factory('makePhoneCall');
|
30
|
+
export const setClipboardData = factory('setClipboardData');
|
31
|
+
export const getClipboardData = factory('getClipboardData');
|
32
|
+
export const updateVolume = factory('updateVolume');
|
33
|
+
export const getCurrentVolume = factory('getCurrentVolume');
|
34
|
+
export const registerSystemVolumeChange = factory('registerSystemVolumeChange');
|
35
|
+
export const unRegisterSystemVolumeChange = factory('unRegisterSystemVolumeChange');
|
36
|
+
export const getSystemSetting = factory('getSystemSetting');
|
37
|
+
export const getMobileDeviceInfo = factory('getDeviceInfo');
|
38
|
+
export const getSystemInfo = factory('getSystemInfo');
|
39
|
+
export const getSystemInfoSync = factory('getSystemInfoSync');
|
40
|
+
export const getWifiList = factory('getWifiList');
|
41
|
+
export const getConnectedWifi = factory('getConnectedWifi');
|
42
|
+
export const openSystemBluetoothSetting = factory('openSystemBluetoothSetting');
|
43
|
+
export const getNetworkType = factory('getNetworkType');
|
44
|
+
export const setScreenBrightness = factory('setScreenBrightness');
|
45
|
+
export const getScreenBrightness = factory('getScreenBrightness');
|
46
|
+
export const setKeepScreenOn = factory('setKeepScreenOn');
|
47
|
+
export const vibrateShort = factory('vibrateShort');
|
48
|
+
export const vibrateLong = factory('vibrateLong');
|
49
|
+
export const scanCode = factory('scanCode');
|
50
|
+
export const setStorage = factory('setStorage');
|
51
|
+
export const setStorageSync = factory('setStorageSync');
|
52
|
+
export const getStorage = factory('getStorage');
|
53
|
+
export const getStorageSync = factory('getStorageSync');
|
54
|
+
export const removeStorage = factory('removeStorage');
|
55
|
+
export const removeStorageSync = factory('removeStorageSync');
|
56
|
+
export const clearStorage = factory('clearStorage');
|
57
|
+
export const clearStorageSync = factory('clearStorageSync');
|
58
|
+
export const onSystemVolumeChangeEvent = factory('onSystemVolumeChangeEvent');
|
59
|
+
export const offSystemVolumeChangeEvent = factory('offSystemVolumeChangeEvent');
|
60
|
+
export const onGetWifiList = factory('onGetWifiList');
|
61
|
+
export const offGetWifiList = factory('offGetWifiList');
|
62
|
+
export const onRecordingEvent = factory('onRecordingEvent');
|
63
|
+
export const offRecordingEvent = factory('offRecordingEvent');
|
64
|
+
export const onAccelerometerChange = factory('onAccelerometerChange');
|
65
|
+
export const offAccelerometerChange = factory('offAccelerometerChange');
|
66
|
+
export const onCompassChange = factory('onCompassChange');
|
67
|
+
export const offCompassChange = factory('offCompassChange');
|
68
|
+
export const onDeviceMotionChange = factory('onDeviceMotionChange');
|
69
|
+
export const offDeviceMotionChange = factory('offDeviceMotionChange');
|
70
|
+
export const onGyroscopeChange = factory('onGyroscopeChange');
|
71
|
+
export const offGyroscopeChange = factory('offGyroscopeChange');
|
72
|
+
export const onMemoryWarning = factory('onMemoryWarning');
|
73
|
+
export const offMemoryWarning = factory('offMemoryWarning');
|
74
|
+
export const onBluetoothAdapterStateChange = factory('onBluetoothAdapterStateChange');
|
75
|
+
export const offBluetoothAdapterStateChange = factory('offBluetoothAdapterStateChange');
|
76
|
+
export const onNetworkStatusChange = factory('onNetworkStatusChange');
|
77
|
+
export const offNetworkStatusChange = factory('offNetworkStatusChange');
|
78
|
+
export const createInnerAudioContext = factory('createInnerAudioContext');
|
79
|
+
export const downloadFile = factory('downloadFile');
|
80
|
+
export const getFileSystemManager = factory('getFileSystemManager');
|
81
|
+
export const request = factory('request');
|
82
|
+
export const getRecorderManager = factory('getRecorderManager');
|
83
|
+
export const uploadFile = factory('uploadFile');
|
84
|
+
// 3.2.1 新增 - 4.7.0 容器
|
85
|
+
export const openMiniWidget = factory('openMiniWidget');
|
85
86
|
|
86
|
-
|
87
|
+
// 3.3.10 新增 - 4.8.0 容器
|
88
|
+
export const getCurrentVolumeByMode = factory('getCurrentVolumeByMode');
|
package/lib/BizKit-3.2.7.js
CHANGED
@@ -1,61 +1,62 @@
|
|
1
1
|
/// <reference path="../@types/BizKit.d.ts" />
|
2
|
+
|
2
3
|
import { factory } from './utils';
|
3
|
-
export
|
4
|
-
export
|
5
|
-
export
|
6
|
-
export
|
7
|
-
export
|
8
|
-
export
|
9
|
-
export
|
10
|
-
export
|
11
|
-
export
|
12
|
-
export
|
13
|
-
export
|
14
|
-
export
|
15
|
-
export
|
4
|
+
export const apiRequestByAtop = factory('apiRequestByAtop');
|
5
|
+
export const event = factory('event');
|
6
|
+
export const beginEvent = factory('beginEvent');
|
7
|
+
export const trackEvent = factory('trackEvent');
|
8
|
+
export const endEvent = factory('endEvent');
|
9
|
+
export const getAppInfo = factory('getAppInfo');
|
10
|
+
export const getCurrentWifiSSID = factory('getCurrentWifiSSID');
|
11
|
+
export const openCountrySelectPage = factory('openCountrySelectPage');
|
12
|
+
export const getIconfontInfo = factory('getIconfontInfo');
|
13
|
+
export const uploadImage = factory('uploadImage');
|
14
|
+
export const getLangKey = factory('getLangKey');
|
15
|
+
export const getLangContent = factory('getLangContent');
|
16
|
+
export const openRNPanel = factory('openRNPanel', {
|
16
17
|
"deprecated": true
|
17
18
|
});
|
18
|
-
export
|
19
|
-
export
|
20
|
-
export
|
21
|
-
export
|
19
|
+
export const openPanel = factory('openPanel');
|
20
|
+
export const preloadPanel = factory('preloadPanel');
|
21
|
+
export const openInnerH5 = factory('openInnerH5');
|
22
|
+
export const openAppSystemSettingPage = factory('openAppSystemSettingPage', {
|
22
23
|
"deprecated": true
|
23
24
|
});
|
24
|
-
export
|
25
|
+
export const openSystemSettingPage = factory('openSystemSettingPage', {
|
25
26
|
"deprecated": true
|
26
27
|
});
|
27
|
-
export
|
28
|
-
export
|
29
|
-
export
|
30
|
-
export
|
28
|
+
export const emitChannel = factory('emitChannel');
|
29
|
+
export const router = factory('router');
|
30
|
+
export const canIUseRouter = factory('canIUseRouter');
|
31
|
+
export const goDeviceDetail = factory('goDeviceDetail', {
|
31
32
|
"deprecated": true
|
32
33
|
});
|
33
|
-
export
|
34
|
+
export const goDeviceAlarm = factory('goDeviceAlarm', {
|
34
35
|
"deprecated": true
|
35
36
|
});
|
36
|
-
export
|
37
|
-
export
|
38
|
-
export
|
39
|
-
export
|
40
|
-
export
|
41
|
-
export
|
37
|
+
export const share = factory('share');
|
38
|
+
export const getShareChannelList = factory('getShareChannelList');
|
39
|
+
export const getUserInfo = factory('getUserInfo');
|
40
|
+
export const resizeImage = factory('resizeImage');
|
41
|
+
export const rotateImage = factory('rotateImage');
|
42
|
+
export const saveToAlbum = factory('saveToAlbum', {
|
42
43
|
"deprecated": true
|
43
44
|
});
|
44
|
-
export
|
45
|
-
export
|
46
|
-
export
|
47
|
-
export
|
48
|
-
export
|
49
|
-
export
|
50
|
-
export
|
51
|
-
export
|
52
|
-
export
|
53
|
-
export
|
54
|
-
export
|
55
|
-
|
56
|
-
export
|
57
|
-
export
|
58
|
-
export
|
59
|
-
export
|
60
|
-
|
61
|
-
export
|
45
|
+
export const onCountrySelectResult = factory('onCountrySelectResult');
|
46
|
+
export const offCountrySelectResult = factory('offCountrySelectResult');
|
47
|
+
export const onUploadProgressUpdate = factory('onUploadProgressUpdate');
|
48
|
+
export const offUploadProgressUpdate = factory('offUploadProgressUpdate');
|
49
|
+
export const onReceiveMessage = factory('onReceiveMessage');
|
50
|
+
export const offReceiveMessage = factory('offReceiveMessage');
|
51
|
+
export const onRouterEvent = factory('onRouterEvent');
|
52
|
+
export const offRouterEvent = factory('offRouterEvent');
|
53
|
+
export const onRouterResult = factory('onRouterResult');
|
54
|
+
export const offRouterResult = factory('offRouterResult');
|
55
|
+
export const registerChannel = factory('registerChannel');
|
56
|
+
// 3.1.1 新增 - 4.7.0 容器
|
57
|
+
export const getTempDirectory = factory('getTempDirectory');
|
58
|
+
export const handleShortcut = factory('handleShortcut');
|
59
|
+
export const isAssociatedShortcut = factory('isAssociatedShortcut');
|
60
|
+
export const isSupportedShortcut = factory('isSupportedShortcut');
|
61
|
+
// 3.2.7 新增 - 4.8.0 容器
|
62
|
+
export const backToHomeAndOpenPanel = factory('backToHomeAndOpenPanel');
|