@extscreen/es-core 1.0.0
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/index.js +1999 -0
- package/package.json +15 -0
package/dist/index.js
ADDED
@@ -0,0 +1,1999 @@
|
|
1
|
+
import Vue from 'vue';
|
2
|
+
import { getEventRedirector as getEventRedirector$1 } from '@/utils';
|
3
|
+
|
4
|
+
/**
|
5
|
+
*
|
6
|
+
*/
|
7
|
+
class ESDevelopModule {
|
8
|
+
|
9
|
+
getDevelop() {
|
10
|
+
return Vue.Native.callNativeWithPromise('AndroidDevelopModule', 'getDevelop');
|
11
|
+
}
|
12
|
+
|
13
|
+
getAppKey() {
|
14
|
+
return Vue.Native.callNativeWithPromise('AndroidDevelopModule', 'getAppKey');
|
15
|
+
}
|
16
|
+
|
17
|
+
getPackageName() {
|
18
|
+
return Vue.Native.callNativeWithPromise('AndroidDevelopModule', 'getPackageName');
|
19
|
+
}
|
20
|
+
|
21
|
+
getVersionName() {
|
22
|
+
return Vue.Native.callNativeWithPromise('AndroidDevelopModule', 'getVersionName');
|
23
|
+
}
|
24
|
+
|
25
|
+
getVersionCode() {
|
26
|
+
return Vue.Native.callNativeWithPromise('AndroidDevelopModule', 'getVersionCode');
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
var ESDevelopModule$1 = new ESDevelopModule();
|
31
|
+
|
32
|
+
/**
|
33
|
+
* {
|
34
|
+
"versionName": "1.0",
|
35
|
+
"versionCode": 1,
|
36
|
+
"packageName": "tv.huan.spark"
|
37
|
+
}
|
38
|
+
*
|
39
|
+
*/
|
40
|
+
|
41
|
+
class ESDevelopManager {
|
42
|
+
|
43
|
+
//
|
44
|
+
_appKey = '2V29G3SD';
|
45
|
+
_appSecretKey = '5faa1c397ed64d09a17ab89b6b19d373';
|
46
|
+
|
47
|
+
_develop = null;
|
48
|
+
_versionName = '';
|
49
|
+
_versionCode = -1;
|
50
|
+
_packageName = '';
|
51
|
+
_channel = '';
|
52
|
+
|
53
|
+
init() {
|
54
|
+
return new Promise((resolve, reject) => {
|
55
|
+
ESDevelopModule$1.getDevelop()
|
56
|
+
.then(
|
57
|
+
(result) => {
|
58
|
+
this._develop = result;
|
59
|
+
if (result) {
|
60
|
+
this._versionName = result.versionName;
|
61
|
+
this._versionCode = result.versionCode;
|
62
|
+
this._packageName = result.packageName;
|
63
|
+
this._channel = result.channel;
|
64
|
+
}
|
65
|
+
resolve(result);
|
66
|
+
},
|
67
|
+
//
|
68
|
+
error => {
|
69
|
+
resolve(error);
|
70
|
+
}
|
71
|
+
);
|
72
|
+
});
|
73
|
+
}
|
74
|
+
|
75
|
+
getDevelop() {
|
76
|
+
return this._develop;
|
77
|
+
}
|
78
|
+
|
79
|
+
getAppKey() {
|
80
|
+
return this._appKey;
|
81
|
+
}
|
82
|
+
|
83
|
+
getPackageName() {
|
84
|
+
return this._packageName;
|
85
|
+
}
|
86
|
+
|
87
|
+
getVersionName() {
|
88
|
+
return this._versionName;
|
89
|
+
}
|
90
|
+
|
91
|
+
getVersionCode() {
|
92
|
+
return this._versionCode;
|
93
|
+
}
|
94
|
+
|
95
|
+
getChannel() {
|
96
|
+
return this._channel;
|
97
|
+
}
|
98
|
+
|
99
|
+
getAppKey() {
|
100
|
+
return this._appKey;
|
101
|
+
}
|
102
|
+
|
103
|
+
getAppSecretKey() {
|
104
|
+
return this._appSecretKey;
|
105
|
+
}
|
106
|
+
}
|
107
|
+
|
108
|
+
var ESDevelopManager$1 = new ESDevelopManager();
|
109
|
+
|
110
|
+
/**
|
111
|
+
*
|
112
|
+
*/
|
113
|
+
class ESDeviceModule {
|
114
|
+
|
115
|
+
getAndroidDevice() {
|
116
|
+
return Vue.Native.callNativeWithPromise('AndroidDeviceModule', 'getAndroidDevice');
|
117
|
+
}
|
118
|
+
|
119
|
+
getWifiMac() {
|
120
|
+
return Vue.Native.callNativeWithPromise('AndroidDeviceModule', 'getWifiMac');
|
121
|
+
}
|
122
|
+
|
123
|
+
getEthMac() {
|
124
|
+
return Vue.Native.callNativeWithPromise('AndroidDeviceModule', 'getEthMac');
|
125
|
+
}
|
126
|
+
|
127
|
+
getUuid() {
|
128
|
+
return Vue.Native.callNativeWithPromise('AndroidDeviceModule', 'getUuid');
|
129
|
+
}
|
130
|
+
|
131
|
+
getClientType() {
|
132
|
+
return Vue.Native.callNativeWithPromise('AndroidDeviceModule', 'getClientType');
|
133
|
+
}
|
134
|
+
|
135
|
+
getTotalMemory() {
|
136
|
+
return Vue.Native.callNativeWithPromise('AndroidDeviceModule', 'getTotalMemory');
|
137
|
+
}
|
138
|
+
|
139
|
+
getAvailableMemory() {
|
140
|
+
return Vue.Native.callNativeWithPromise('AndroidDeviceModule', 'getAvailableMemory');
|
141
|
+
}
|
142
|
+
|
143
|
+
getScreenWidth() {
|
144
|
+
return Vue.Native.callNativeWithPromise('AndroidDeviceModule', 'getScreenWidth');
|
145
|
+
}
|
146
|
+
|
147
|
+
getScreenHeight() {
|
148
|
+
return Vue.Native.callNativeWithPromise('AndroidDeviceModule', 'getScreenHeight');
|
149
|
+
}
|
150
|
+
|
151
|
+
getWindowWidth() {
|
152
|
+
return Vue.Native.callNativeWithPromise('AndroidDeviceModule', 'getWindowWidth');
|
153
|
+
}
|
154
|
+
|
155
|
+
getWindowHeight() {
|
156
|
+
return Vue.Native.callNativeWithPromise('AndroidDeviceModule', 'getWindowHeight');
|
157
|
+
}
|
158
|
+
|
159
|
+
getResolution() {
|
160
|
+
return Vue.Native.callNativeWithPromise('AndroidDeviceModule', 'getResolution');
|
161
|
+
}
|
162
|
+
|
163
|
+
getDensity() {
|
164
|
+
return Vue.Native.callNativeWithPromise('AndroidDeviceModule', 'getDensity');
|
165
|
+
}
|
166
|
+
|
167
|
+
getDensityDpi() {
|
168
|
+
return Vue.Native.callNativeWithPromise('AndroidDeviceModule', 'getDensityDpi');
|
169
|
+
}
|
170
|
+
|
171
|
+
getScaledDensity() {
|
172
|
+
return Vue.Native.callNativeWithPromise('AndroidDeviceModule', 'getScaledDensity');
|
173
|
+
}
|
174
|
+
|
175
|
+
getBuildVersionRelease() {
|
176
|
+
return Vue.Native.callNativeWithPromise('AndroidDeviceModule', 'getBuildVersionRelease');
|
177
|
+
}
|
178
|
+
|
179
|
+
getBuildModel() {
|
180
|
+
return Vue.Native.callNativeWithPromise('AndroidDeviceModule', 'getBuildModel');
|
181
|
+
}
|
182
|
+
|
183
|
+
getBuildBrand() {
|
184
|
+
return Vue.Native.callNativeWithPromise('AndroidDeviceModule', 'getBuildBrand');
|
185
|
+
}
|
186
|
+
|
187
|
+
|
188
|
+
getBuildDevice() {
|
189
|
+
return Vue.Native.callNativeWithPromise('AndroidDeviceModule', 'getBuildDevice');
|
190
|
+
}
|
191
|
+
|
192
|
+
getBuildBoard() {
|
193
|
+
return Vue.Native.callNativeWithPromise('AndroidDeviceModule', 'getBuildBoard');
|
194
|
+
}
|
195
|
+
|
196
|
+
getBuildProduct() {
|
197
|
+
return Vue.Native.callNativeWithPromise('AndroidDeviceModule', 'getBuildProduct');
|
198
|
+
}
|
199
|
+
|
200
|
+
getBuildHardware() {
|
201
|
+
return Vue.Native.callNativeWithPromise('AndroidDeviceModule', 'getBuildHardware');
|
202
|
+
}
|
203
|
+
|
204
|
+
getBuildManufacturer() {
|
205
|
+
return Vue.Native.callNativeWithPromise('AndroidDeviceModule', 'getBuildManufacturer');
|
206
|
+
}
|
207
|
+
|
208
|
+
}
|
209
|
+
|
210
|
+
var ESDeviceModule$1 = new ESDeviceModule();
|
211
|
+
|
212
|
+
/**
|
213
|
+
* 设备信息管理
|
214
|
+
*
|
215
|
+
* {
|
216
|
+
"screenWidth": 1920,
|
217
|
+
"clientType": "MiBOX4",
|
218
|
+
"buildBoard": "transformers",
|
219
|
+
"scaledDensity": "1.0",
|
220
|
+
"mac": null,
|
221
|
+
"uuid": null,
|
222
|
+
"buildVersionRelease": "6.0.1",
|
223
|
+
"buildManufacturer": "Xiaomi",
|
224
|
+
"windowWidth": 0,
|
225
|
+
"density": "1.0",
|
226
|
+
"buildDevice": "transformers",
|
227
|
+
"availableMemory": 0,
|
228
|
+
"buildHardware": "amlogic",
|
229
|
+
"screenHeight": 1080,
|
230
|
+
"buildModel": "MiBOX4",
|
231
|
+
"buildBrand": null,
|
232
|
+
"densityDpi": "160.0",
|
233
|
+
"resolution": "1920*1080",
|
234
|
+
"totalMemory": 0,
|
235
|
+
"buildProduct": "transformers"
|
236
|
+
}
|
237
|
+
|
238
|
+
*/
|
239
|
+
|
240
|
+
|
241
|
+
class ESDeviceManager {
|
242
|
+
|
243
|
+
//内存
|
244
|
+
_totalMemory = 0;
|
245
|
+
_availMemory = 0;
|
246
|
+
|
247
|
+
//屏幕宽高
|
248
|
+
_screenWidth = 1920;
|
249
|
+
_screenHeight = 1080;
|
250
|
+
|
251
|
+
_windowWidth = 1920;
|
252
|
+
_windowHeight = 1080;
|
253
|
+
|
254
|
+
_androidAPILevel = 14;
|
255
|
+
|
256
|
+
_buildVersionRelease = '';
|
257
|
+
_buildManufacturer = '';
|
258
|
+
_deviceEthMac = '';
|
259
|
+
_deviceWifiMac = '';
|
260
|
+
|
261
|
+
_deviceId = '';
|
262
|
+
_deviceType = '';
|
263
|
+
|
264
|
+
_resolution = '';
|
265
|
+
_ipAddress = '';
|
266
|
+
_totalStore = '';
|
267
|
+
_freeStore = '';
|
268
|
+
_deviceTotalMemory = '';
|
269
|
+
_buildSerial = '';
|
270
|
+
_blueToothName = '';
|
271
|
+
|
272
|
+
_device = null;
|
273
|
+
|
274
|
+
_density = '';
|
275
|
+
_densityDpi = '';
|
276
|
+
_scaledDensity = '';
|
277
|
+
_buildModel = '';
|
278
|
+
_buildBrand = '';
|
279
|
+
_buildDevice = '';
|
280
|
+
_buildProduct = '';
|
281
|
+
_buildHardware = '';
|
282
|
+
_buildSDKVersion = 1;
|
283
|
+
|
284
|
+
init() {
|
285
|
+
return new Promise((resolve, reject) => {
|
286
|
+
this.initAndroidDevice();
|
287
|
+
ESDeviceModule$1.getAndroidDevice().then(
|
288
|
+
(device) => {
|
289
|
+
this._device = device;
|
290
|
+
|
291
|
+
try {
|
292
|
+
if (device) {
|
293
|
+
this._buildSDKVersion = device.buildSDKVersion;
|
294
|
+
|
295
|
+
this._deviceId = device.deviceId;
|
296
|
+
this._deviceType = device._deviceType;
|
297
|
+
|
298
|
+
this._deviceEthMac = device.ethMac;
|
299
|
+
this._deviceWifiMac = device.wifiMac;
|
300
|
+
|
301
|
+
this._totalMemory = device.totalMemory;
|
302
|
+
this._availMemory = device.availableMemory;
|
303
|
+
|
304
|
+
this._screenWidth = device.screenWidth;
|
305
|
+
this._screenHeight = device.screenHeight;
|
306
|
+
this._windowWidth = device.windowWidth;
|
307
|
+
this._windowHeight = device.windowHeight;
|
308
|
+
|
309
|
+
this._resolution = device.resolution;
|
310
|
+
this._density = device.density;
|
311
|
+
this._densityDpi = device.densityDpi;
|
312
|
+
this._scaledDensity = device.scaledDensity;
|
313
|
+
|
314
|
+
this._buildVersionRelease = device.buildVersionRelease;
|
315
|
+
this._buildModel = device.buildModel;
|
316
|
+
this._buildBrand = device.buildBrand;
|
317
|
+
this._buildDevice = device.buildDevice;
|
318
|
+
this._buildProduct = device.buildProduct;
|
319
|
+
this._buildHardware = device.buildHardware;
|
320
|
+
this._buildManufacturer = device.buildManufacturer;
|
321
|
+
this._buildSerial = device.buildSerial;
|
322
|
+
|
323
|
+
this._ipAddress = device.ipAddress;
|
324
|
+
this._totalStore = device.totalStore;
|
325
|
+
this._freeStore = device.freeStore;
|
326
|
+
this._deviceTotalMemory = device.deviceTotalMemory;
|
327
|
+
this._blueToothName = device.blueToothName;
|
328
|
+
|
329
|
+
}
|
330
|
+
} catch (e) {
|
331
|
+
}
|
332
|
+
|
333
|
+
resolve(device);
|
334
|
+
},
|
335
|
+
//
|
336
|
+
error => {
|
337
|
+
resolve(error);
|
338
|
+
}
|
339
|
+
);
|
340
|
+
})
|
341
|
+
}
|
342
|
+
|
343
|
+
initAndroidDevice() {
|
344
|
+
this._androidAPILevel = Vue.Native.APILevel;
|
345
|
+
}
|
346
|
+
|
347
|
+
|
348
|
+
is720PDevice() {
|
349
|
+
return this._screenWidth === 1280 && this._screenHeight === 720;
|
350
|
+
}
|
351
|
+
|
352
|
+
getAndroidAPILevel() {
|
353
|
+
return this._androidAPILevel;
|
354
|
+
}
|
355
|
+
|
356
|
+
getDeviceTotalMemory() {
|
357
|
+
return this._totalMemory;
|
358
|
+
}
|
359
|
+
|
360
|
+
getDeviceAvailMemory() {
|
361
|
+
return this._availMemory;
|
362
|
+
}
|
363
|
+
|
364
|
+
getDevice() {
|
365
|
+
return this._device;
|
366
|
+
}
|
367
|
+
|
368
|
+
|
369
|
+
getBuildVersionRelease() {
|
370
|
+
return this._buildVersionRelease;
|
371
|
+
}
|
372
|
+
|
373
|
+
getBuildManufacturer() {
|
374
|
+
return this._buildManufacturer;
|
375
|
+
}
|
376
|
+
|
377
|
+
getDeviceEthMac() {
|
378
|
+
return this._deviceEthMac;
|
379
|
+
}
|
380
|
+
|
381
|
+
getDeviceWifiMac() {
|
382
|
+
return this._deviceWifiMac;
|
383
|
+
}
|
384
|
+
|
385
|
+
getDeviceId() {
|
386
|
+
return this._deviceId;
|
387
|
+
}
|
388
|
+
|
389
|
+
getDeviceType() {
|
390
|
+
return this._deviceType;
|
391
|
+
}
|
392
|
+
|
393
|
+
getResolution() {
|
394
|
+
return this._resolution;
|
395
|
+
}
|
396
|
+
|
397
|
+
getIpAddress() {
|
398
|
+
return this._ipAddress;
|
399
|
+
}
|
400
|
+
|
401
|
+
getTotalStore() {
|
402
|
+
return this._totalStore;
|
403
|
+
}
|
404
|
+
|
405
|
+
getFreeStore() {
|
406
|
+
return this._freeStore;
|
407
|
+
}
|
408
|
+
|
409
|
+
getDeviceTotalMemoryNew() {
|
410
|
+
return this._deviceTotalMemory;
|
411
|
+
}
|
412
|
+
|
413
|
+
getBuildSerial() {
|
414
|
+
return this._buildSerial;
|
415
|
+
}
|
416
|
+
|
417
|
+
getBlueToothName() {
|
418
|
+
return this._blueToothName;
|
419
|
+
}
|
420
|
+
|
421
|
+
getBrand() {
|
422
|
+
return this._buildBrand;
|
423
|
+
}
|
424
|
+
|
425
|
+
getModel() {
|
426
|
+
return this._buildModel;
|
427
|
+
}
|
428
|
+
|
429
|
+
getScreenWidth() {
|
430
|
+
return this._screenWidth;
|
431
|
+
}
|
432
|
+
|
433
|
+
getScreenHeight() {
|
434
|
+
return this._screenHeight
|
435
|
+
}
|
436
|
+
|
437
|
+
getBuildSDKVersion() {
|
438
|
+
return this._buildSDKVersion;
|
439
|
+
}
|
440
|
+
}
|
441
|
+
|
442
|
+
var ESDeviceManager$1 = new ESDeviceManager();
|
443
|
+
|
444
|
+
/**
|
445
|
+
*
|
446
|
+
*/
|
447
|
+
class ESNetworkModule {
|
448
|
+
|
449
|
+
getActiveNetworkInfo() {
|
450
|
+
return Vue.Native.callNativeWithPromise('AndroidNetworkModule',
|
451
|
+
'getActiveNetworkInfo');
|
452
|
+
}
|
453
|
+
}
|
454
|
+
|
455
|
+
var ESNetworkModule$1 = new ESNetworkModule();
|
456
|
+
|
457
|
+
/**
|
458
|
+
*
|
459
|
+
*/
|
460
|
+
class ESNetworkManager {
|
461
|
+
|
462
|
+
_networkInfo = null;
|
463
|
+
|
464
|
+
init() {
|
465
|
+
return new Promise((resolve, reject) => {
|
466
|
+
ESNetworkModule$1.getActiveNetworkInfo().then(
|
467
|
+
//
|
468
|
+
(result) => {
|
469
|
+
this._networkInfo = result;
|
470
|
+
resolve(this._networkInfo);
|
471
|
+
},
|
472
|
+
//
|
473
|
+
error => {
|
474
|
+
this._networkInfo = null;
|
475
|
+
resolve(this._networkInfo);
|
476
|
+
}
|
477
|
+
);
|
478
|
+
});
|
479
|
+
}
|
480
|
+
|
481
|
+
initNetworkInfo() {
|
482
|
+
|
483
|
+
}
|
484
|
+
|
485
|
+
getActiveNetworkInfo() {
|
486
|
+
return this._networkInfo;
|
487
|
+
}
|
488
|
+
|
489
|
+
isNetworkConnected() {
|
490
|
+
return this._networkInfo && this._networkInfo.isConnected;
|
491
|
+
}
|
492
|
+
|
493
|
+
isNetworkInfoConnected(networkInfo) {
|
494
|
+
return networkInfo && networkInfo.isConnected;
|
495
|
+
}
|
496
|
+
|
497
|
+
onConnectivityChanged(networkInfo) {
|
498
|
+
this._networkInfo = networkInfo;
|
499
|
+
}
|
500
|
+
|
501
|
+
getNetworkType() {
|
502
|
+
return this._networkInfo.type;
|
503
|
+
}
|
504
|
+
}
|
505
|
+
|
506
|
+
var ESNetworkManager$1 = new ESNetworkManager();
|
507
|
+
|
508
|
+
class ESToastModule {
|
509
|
+
|
510
|
+
showToast(message) {
|
511
|
+
Vue.Native.callNative('ToastModule', "showToast", message);
|
512
|
+
}
|
513
|
+
|
514
|
+
showLongToast(message) {
|
515
|
+
Vue.Native.callNative('ToastModule', "showLongToast", message);
|
516
|
+
}
|
517
|
+
|
518
|
+
showShortToast(message) {
|
519
|
+
Vue.Native.callNative('ToastModule', "showShortToast", message);
|
520
|
+
}
|
521
|
+
}
|
522
|
+
|
523
|
+
var ToastModule = new ESToastModule();
|
524
|
+
|
525
|
+
/**
|
526
|
+
*
|
527
|
+
*/
|
528
|
+
|
529
|
+
class ESToast {
|
530
|
+
showToast(message) {
|
531
|
+
ToastModule.showToast(message);
|
532
|
+
}
|
533
|
+
|
534
|
+
showLongToast(message) {
|
535
|
+
ToastModule.showLongToast(message);
|
536
|
+
}
|
537
|
+
|
538
|
+
showShortToast(message) {
|
539
|
+
ToastModule.showShortToast(message);
|
540
|
+
}
|
541
|
+
}
|
542
|
+
|
543
|
+
var ESToast$1 = new ESToast();
|
544
|
+
|
545
|
+
/**
|
546
|
+
*
|
547
|
+
*/
|
548
|
+
class ESAppModule {
|
549
|
+
|
550
|
+
isAppInstalled(packageName) {
|
551
|
+
return Vue.Native.callNativeWithPromise('EsNativeModule',
|
552
|
+
'isAppInstalled', packageName);
|
553
|
+
}
|
554
|
+
|
555
|
+
isSystemApp(packageName) {
|
556
|
+
return Vue.Native.callNativeWithPromise('EsNativeModule',
|
557
|
+
'isAppSystem', packageName);
|
558
|
+
}
|
559
|
+
|
560
|
+
getAppList() {
|
561
|
+
return Vue.Native.callNativeWithPromise('EsNativeModule',
|
562
|
+
'getAppList');
|
563
|
+
}
|
564
|
+
|
565
|
+
getAutoStartAppList() {
|
566
|
+
return Vue.Native.callNativeWithPromise('EsNativeModule',
|
567
|
+
'getAutoStartAppList');
|
568
|
+
}
|
569
|
+
|
570
|
+
}
|
571
|
+
|
572
|
+
var ESAppModule$1 = new ESAppModule();
|
573
|
+
|
574
|
+
/**
|
575
|
+
*
|
576
|
+
*/
|
577
|
+
class ESAudioModule {
|
578
|
+
//------------------------通话音量------------------------
|
579
|
+
getStreamVoiceCallMaxVolume() {
|
580
|
+
return Vue.Native.callNativeWithPromise('AndroidAudioModule',
|
581
|
+
'getStreamVoiceCallMaxVolume');
|
582
|
+
}
|
583
|
+
|
584
|
+
getStreamVoiceCallVolume() {
|
585
|
+
return Vue.Native.callNativeWithPromise('AndroidAudioModule',
|
586
|
+
'getStreamVoiceCallVolume');
|
587
|
+
}
|
588
|
+
|
589
|
+
//------------------------系统音量------------------------
|
590
|
+
getStreamSystemMaxVolume() {
|
591
|
+
return Vue.Native.callNativeWithPromise('AndroidAudioModule',
|
592
|
+
'getStreamSystemMaxVolume');
|
593
|
+
}
|
594
|
+
|
595
|
+
getStreamSystemVolume() {
|
596
|
+
return Vue.Native.callNativeWithPromise('AndroidAudioModule',
|
597
|
+
'getStreamSystemVolume');
|
598
|
+
}
|
599
|
+
|
600
|
+
//------------------------铃声音量------------------------
|
601
|
+
getStreamRingMaxVolume() {
|
602
|
+
return Vue.Native.callNativeWithPromise('AndroidAudioModule',
|
603
|
+
'getStreamRingMaxVolume');
|
604
|
+
}
|
605
|
+
|
606
|
+
getStreamRingVolume() {
|
607
|
+
return Vue.Native.callNativeWithPromise('AndroidAudioModule',
|
608
|
+
'getStreamRingVolume');
|
609
|
+
}
|
610
|
+
|
611
|
+
//------------------------音乐音量------------------------
|
612
|
+
getStreamMusicMaxVolume() {
|
613
|
+
return Vue.Native.callNativeWithPromise('AndroidAudioModule',
|
614
|
+
'getStreamMusicMaxVolume');
|
615
|
+
}
|
616
|
+
|
617
|
+
getStreamMusicVolume() {
|
618
|
+
return Vue.Native.callNativeWithPromise('AndroidAudioModule',
|
619
|
+
'getStreamMusicVolume');
|
620
|
+
}
|
621
|
+
|
622
|
+
//------------------------提示音音量------------------------
|
623
|
+
getStreamAlarmMaxVolume() {
|
624
|
+
return Vue.Native.callNativeWithPromise('AndroidAudioModule',
|
625
|
+
'getStreamAlarmMaxVolume');
|
626
|
+
}
|
627
|
+
|
628
|
+
getStreamAlarmVolume() {
|
629
|
+
return Vue.Native.callNativeWithPromise('AndroidAudioModule',
|
630
|
+
'getStreamAlarmVolume');
|
631
|
+
}
|
632
|
+
|
633
|
+
//------------------------音量------------------------
|
634
|
+
getStreamMaxVolume() {
|
635
|
+
return Vue.Native.callNativeWithPromise('AndroidAudioModule',
|
636
|
+
'getStreamMaxVolume');
|
637
|
+
}
|
638
|
+
|
639
|
+
getStreamVolume() {
|
640
|
+
return Vue.Native.callNativeWithPromise('AndroidAudioModule',
|
641
|
+
'getStreamMaxVolume');
|
642
|
+
}
|
643
|
+
|
644
|
+
//------------------------调整音量------------------------
|
645
|
+
adjustStreamVolume(streamType, adjust, flags) {
|
646
|
+
return Vue.Native.callNativeWithPromise('AndroidAudioModule',
|
647
|
+
'adjustStreamVolume', [streamType, adjust, flags]);
|
648
|
+
}
|
649
|
+
|
650
|
+
setStreamVolume(streamType, index, flags) {
|
651
|
+
return Vue.Native.callNativeWithPromise('AndroidAudioModule',
|
652
|
+
'setStreamVolume', [streamType, index, flags]);
|
653
|
+
}
|
654
|
+
|
655
|
+
setStreamMute(streamType, state) {
|
656
|
+
return Vue.Native.callNativeWithPromise('AndroidAudioModule',
|
657
|
+
'setStreamMute', [streamType, state]);
|
658
|
+
}
|
659
|
+
}
|
660
|
+
|
661
|
+
var ESAudioModule$1 = new ESAudioModule();
|
662
|
+
|
663
|
+
/**
|
664
|
+
*
|
665
|
+
*/
|
666
|
+
class ESModule {
|
667
|
+
|
668
|
+
getSupportSchemes() {
|
669
|
+
return Vue.Native.callNativeWithPromise('EsNativeModule',
|
670
|
+
'getSupportSchemes',);
|
671
|
+
}
|
672
|
+
|
673
|
+
launchEsPage(params) {
|
674
|
+
return Vue.Native.callNativeWithPromise('EsNativeModule',
|
675
|
+
'launchEsPage', {
|
676
|
+
pkg: params.pkg,
|
677
|
+
args: params.args,
|
678
|
+
flags: params.flags,
|
679
|
+
pageTag: params.pageTag,
|
680
|
+
pageLimit: params.pageLimit,
|
681
|
+
backgroundColor: params.backgroundColor,
|
682
|
+
});
|
683
|
+
}
|
684
|
+
|
685
|
+
launchNativeApp(paramsArray) {
|
686
|
+
return Vue.Native.callNativeWithPromise('EsNativeModule',
|
687
|
+
'launchNativeApp', paramsArray);
|
688
|
+
}
|
689
|
+
|
690
|
+
launchNativeAppWithPackage(pkg) {
|
691
|
+
return Vue.Native.callNativeWithPromise('EsNativeModule',
|
692
|
+
'launchNativeAppWithPackage', pkg);
|
693
|
+
}
|
694
|
+
|
695
|
+
sendBroadcast(paramsArray) {
|
696
|
+
return Vue.Native.callNativeWithPromise('EsNativeModule',
|
697
|
+
'sendBroadcast', paramsArray);
|
698
|
+
}
|
699
|
+
|
700
|
+
startService(paramsArray) {
|
701
|
+
return Vue.Native.callNativeWithPromise('EsNativeModule',
|
702
|
+
'startService', paramsArray);
|
703
|
+
}
|
704
|
+
|
705
|
+
finish() {
|
706
|
+
return Vue.Native.callNativeWithPromise('EsNativeModule',
|
707
|
+
'finish');
|
708
|
+
}
|
709
|
+
|
710
|
+
finishAll() {
|
711
|
+
return Vue.Native.callNativeWithPromise('EsNativeModule',
|
712
|
+
'finishAll');
|
713
|
+
}
|
714
|
+
}
|
715
|
+
|
716
|
+
var ESModule$1 = new ESModule();
|
717
|
+
|
718
|
+
/**
|
719
|
+
*
|
720
|
+
*/
|
721
|
+
class ESFileModule {
|
722
|
+
|
723
|
+
newFile(pathname) {
|
724
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
725
|
+
'newFile', {pathname: pathname}
|
726
|
+
);
|
727
|
+
}
|
728
|
+
|
729
|
+
getName(fileId) {
|
730
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
731
|
+
'getName', {id: fileId}
|
732
|
+
);
|
733
|
+
}
|
734
|
+
|
735
|
+
getParent(fileId) {
|
736
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
737
|
+
'getParent', {id: fileId}
|
738
|
+
);
|
739
|
+
}
|
740
|
+
|
741
|
+
getPath(fileId) {
|
742
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
743
|
+
'getPath', {id: fileId}
|
744
|
+
);
|
745
|
+
}
|
746
|
+
|
747
|
+
isAbsolute(fileId) {
|
748
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
749
|
+
'isAbsolute', {id: fileId}
|
750
|
+
);
|
751
|
+
}
|
752
|
+
|
753
|
+
getAbsolutePath(fileId) {
|
754
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
755
|
+
'getAbsolutePath', {id: fileId}
|
756
|
+
);
|
757
|
+
}
|
758
|
+
|
759
|
+
getCanonicalPath(fileId) {
|
760
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
761
|
+
'getCanonicalPath', {id: fileId}
|
762
|
+
);
|
763
|
+
}
|
764
|
+
|
765
|
+
canRead(fileId) {
|
766
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
767
|
+
'canRead', {id: fileId}
|
768
|
+
);
|
769
|
+
}
|
770
|
+
|
771
|
+
canWrite(fileId) {
|
772
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
773
|
+
'canWrite', {id: fileId}
|
774
|
+
);
|
775
|
+
}
|
776
|
+
|
777
|
+
exists(fileId) {
|
778
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
779
|
+
'exists', {id: fileId}
|
780
|
+
);
|
781
|
+
}
|
782
|
+
|
783
|
+
isDirectory(fileId) {
|
784
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
785
|
+
'isDirectory', {id: fileId}
|
786
|
+
);
|
787
|
+
}
|
788
|
+
|
789
|
+
isFile(fileId) {
|
790
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
791
|
+
'isFile', {id: fileId}
|
792
|
+
);
|
793
|
+
}
|
794
|
+
|
795
|
+
isHidden(fileId) {
|
796
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
797
|
+
'isHidden', {id: fileId}
|
798
|
+
);
|
799
|
+
}
|
800
|
+
|
801
|
+
lastModified(fileId) {
|
802
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
803
|
+
'lastModified', {id: fileId}
|
804
|
+
);
|
805
|
+
}
|
806
|
+
|
807
|
+
length(fileId) {
|
808
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
809
|
+
'length', {id: fileId}
|
810
|
+
);
|
811
|
+
}
|
812
|
+
|
813
|
+
createNewFile(fileId) {
|
814
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
815
|
+
'createNewFile', {id: fileId}
|
816
|
+
);
|
817
|
+
}
|
818
|
+
|
819
|
+
deleteOnExit(fileId) {
|
820
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
821
|
+
'deleteOnExit', {id: fileId}
|
822
|
+
);
|
823
|
+
}
|
824
|
+
|
825
|
+
list(fileId) {
|
826
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
827
|
+
'list', {id: fileId}
|
828
|
+
);
|
829
|
+
}
|
830
|
+
|
831
|
+
mkdir(fileId) {
|
832
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
833
|
+
'mkdir', {id: fileId}
|
834
|
+
);
|
835
|
+
}
|
836
|
+
|
837
|
+
mkdirs(fileId) {
|
838
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
839
|
+
'mkdirs', {id: fileId}
|
840
|
+
);
|
841
|
+
}
|
842
|
+
|
843
|
+
setLastModified(fileId, time) {
|
844
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
845
|
+
'setLastModified', {id: fileId, time: time}
|
846
|
+
);
|
847
|
+
}
|
848
|
+
|
849
|
+
getTotalSpace(fileId) {
|
850
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
851
|
+
'getTotalSpace', {id: fileId}
|
852
|
+
);
|
853
|
+
}
|
854
|
+
|
855
|
+
getFreeSpace(fileId) {
|
856
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
857
|
+
'getFreeSpace', {id: fileId}
|
858
|
+
);
|
859
|
+
}
|
860
|
+
|
861
|
+
getUsableSpace(fileId) {
|
862
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
863
|
+
'getUsableSpace', {id: fileId}
|
864
|
+
);
|
865
|
+
}
|
866
|
+
|
867
|
+
delete(fileId) {
|
868
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
869
|
+
'delete', {id: fileId}
|
870
|
+
);
|
871
|
+
}
|
872
|
+
|
873
|
+
setReadOnly(fileId) {
|
874
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
875
|
+
'setReadOnly', {id: fileId}
|
876
|
+
);
|
877
|
+
}
|
878
|
+
|
879
|
+
setWritableOwnerOnly(fileId, writable, ownerOnly) {
|
880
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
881
|
+
'setReadOnly', {
|
882
|
+
id: fileId,
|
883
|
+
writable: writable,
|
884
|
+
ownerOnly: ownerOnly,
|
885
|
+
}
|
886
|
+
);
|
887
|
+
}
|
888
|
+
|
889
|
+
setWritable(fileId, writable) {
|
890
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
891
|
+
'setWritable', {
|
892
|
+
id: fileId,
|
893
|
+
writable: writable,
|
894
|
+
}
|
895
|
+
);
|
896
|
+
}
|
897
|
+
|
898
|
+
setReadableOwnerOnly(fileId, readable, ownerOnly) {
|
899
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
900
|
+
'setReadableOwnerOnly', {
|
901
|
+
id: fileId,
|
902
|
+
readable: readable,
|
903
|
+
ownerOnly: ownerOnly,
|
904
|
+
}
|
905
|
+
);
|
906
|
+
}
|
907
|
+
|
908
|
+
|
909
|
+
setReadable(fileId, readable) {
|
910
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
911
|
+
'setReadable', {
|
912
|
+
id: fileId,
|
913
|
+
readable: readable,
|
914
|
+
}
|
915
|
+
);
|
916
|
+
}
|
917
|
+
|
918
|
+
setExecutableOwnerOnly(fileId, executable, ownerOnly) {
|
919
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
920
|
+
'setExecutableOwnerOnly', {
|
921
|
+
id: fileId,
|
922
|
+
executable: executable,
|
923
|
+
ownerOnly: ownerOnly,
|
924
|
+
}
|
925
|
+
);
|
926
|
+
}
|
927
|
+
|
928
|
+
setExecutable(fileId, executable) {
|
929
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
930
|
+
'setExecutable', {
|
931
|
+
id: fileId,
|
932
|
+
executable: executable
|
933
|
+
}
|
934
|
+
);
|
935
|
+
}
|
936
|
+
|
937
|
+
canExecute(fileId) {
|
938
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
939
|
+
'canExecute', {id: fileId}
|
940
|
+
);
|
941
|
+
}
|
942
|
+
|
943
|
+
renameTo(fileId, renameFileId) {
|
944
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
945
|
+
'canExecute', {id: fileId, renameFileId: renameFileId}
|
946
|
+
);
|
947
|
+
}
|
948
|
+
|
949
|
+
close(fileId) {
|
950
|
+
return Vue.Native.callNativeWithPromise('AndroidFileModule',
|
951
|
+
'close', {id: fileId}
|
952
|
+
);
|
953
|
+
}
|
954
|
+
}
|
955
|
+
|
956
|
+
var ESFileModule$1 = new ESFileModule();
|
957
|
+
|
958
|
+
/**
|
959
|
+
*
|
960
|
+
*/
|
961
|
+
|
962
|
+
class ESFile {
|
963
|
+
|
964
|
+
_fileId = -1;
|
965
|
+
|
966
|
+
newFile(pathname) {
|
967
|
+
return ESFileModule$1.newFile(pathname)
|
968
|
+
.then((fileId) => {
|
969
|
+
this._fileId = fileId;
|
970
|
+
return Promise.resolve(fileId);
|
971
|
+
});
|
972
|
+
}
|
973
|
+
|
974
|
+
getFileId() {
|
975
|
+
return this._fileId;
|
976
|
+
}
|
977
|
+
|
978
|
+
getName() {
|
979
|
+
return ESFileModule$1.getName(this.getFileId());
|
980
|
+
}
|
981
|
+
|
982
|
+
getParent() {
|
983
|
+
return ESFileModule$1.getParent(this.getFileId());
|
984
|
+
}
|
985
|
+
|
986
|
+
getPath() {
|
987
|
+
return ESFileModule$1.getPath(this.getFileId());
|
988
|
+
}
|
989
|
+
|
990
|
+
isAbsolute() {
|
991
|
+
return ESFileModule$1.isAbsolute(this.getFileId());
|
992
|
+
}
|
993
|
+
|
994
|
+
getAbsolutePath() {
|
995
|
+
return ESFileModule$1.getAbsolutePath(this.getFileId());
|
996
|
+
}
|
997
|
+
|
998
|
+
getCanonicalPath() {
|
999
|
+
return ESFileModule$1.getCanonicalPath(this.getFileId());
|
1000
|
+
}
|
1001
|
+
|
1002
|
+
canRead() {
|
1003
|
+
return ESFileModule$1.canRead(this.getFileId());
|
1004
|
+
}
|
1005
|
+
|
1006
|
+
canWrite() {
|
1007
|
+
return ESFileModule$1.canWrite(this.getFileId());
|
1008
|
+
}
|
1009
|
+
|
1010
|
+
exists() {
|
1011
|
+
return ESFileModule$1.exists(this.getFileId());
|
1012
|
+
}
|
1013
|
+
|
1014
|
+
isDirectory() {
|
1015
|
+
return ESFileModule$1.isDirectory(this.getFileId());
|
1016
|
+
}
|
1017
|
+
|
1018
|
+
isFile() {
|
1019
|
+
return ESFileModule$1.isFile(this.getFileId());
|
1020
|
+
}
|
1021
|
+
|
1022
|
+
isHidden() {
|
1023
|
+
return ESFileModule$1.isHidden(this.getFileId());
|
1024
|
+
}
|
1025
|
+
|
1026
|
+
lastModified() {
|
1027
|
+
return ESFileModule$1.lastModified(this.getFileId());
|
1028
|
+
}
|
1029
|
+
|
1030
|
+
length() {
|
1031
|
+
return ESFileModule$1.length(this.getFileId());
|
1032
|
+
}
|
1033
|
+
|
1034
|
+
createNewFile() {
|
1035
|
+
return ESFileModule$1.createNewFile(this.getFileId());
|
1036
|
+
}
|
1037
|
+
|
1038
|
+
deleteOnExit() {
|
1039
|
+
return ESFileModule$1.deleteOnExit(this.getFileId());
|
1040
|
+
}
|
1041
|
+
|
1042
|
+
list() {
|
1043
|
+
return ESFileModule$1.list(this.getFileId());
|
1044
|
+
}
|
1045
|
+
|
1046
|
+
mkdir() {
|
1047
|
+
return ESFileModule$1.mkdir(this.getFileId());
|
1048
|
+
}
|
1049
|
+
|
1050
|
+
mkdirs() {
|
1051
|
+
return ESFileModule$1.mkdirs(this.getFileId());
|
1052
|
+
}
|
1053
|
+
|
1054
|
+
setLastModified(time) {
|
1055
|
+
return ESFileModule$1.setLastModified(this.getFileId(), time);
|
1056
|
+
}
|
1057
|
+
|
1058
|
+
getTotalSpace() {
|
1059
|
+
return ESFileModule$1.getTotalSpace(this.getFileId());
|
1060
|
+
}
|
1061
|
+
|
1062
|
+
getFreeSpace() {
|
1063
|
+
return ESFileModule$1.getFreeSpace(this.getFileId());
|
1064
|
+
}
|
1065
|
+
|
1066
|
+
getUsableSpace() {
|
1067
|
+
return ESFileModule$1.getUsableSpace(this.getFileId());
|
1068
|
+
}
|
1069
|
+
|
1070
|
+
delete() {
|
1071
|
+
return ESFileModule$1.delete(this.getFileId());
|
1072
|
+
}
|
1073
|
+
|
1074
|
+
setReadOnly() {
|
1075
|
+
return ESFileModule$1.setReadOnly(this.getFileId());
|
1076
|
+
}
|
1077
|
+
|
1078
|
+
setWritableOwnerOnly(writable, ownerOnly) {
|
1079
|
+
return ESFileModule$1.setWritableOwnerOnly(this.getFileId(), writable, ownerOnly);
|
1080
|
+
}
|
1081
|
+
|
1082
|
+
setWritable(writable) {
|
1083
|
+
return ESFileModule$1.setWritable(this.getFileId(), writable);
|
1084
|
+
}
|
1085
|
+
|
1086
|
+
setReadableOwnerOnly(readable, ownerOnly) {
|
1087
|
+
return ESFileModule$1.setReadableOwnerOnly(this.getFileId(), readable, ownerOnly);
|
1088
|
+
}
|
1089
|
+
|
1090
|
+
setReadable(readable) {
|
1091
|
+
return ESFileModule$1.setReadable(this.getFileId(), readable);
|
1092
|
+
}
|
1093
|
+
|
1094
|
+
setExecutableOwnerOnly(executable, ownerOnly) {
|
1095
|
+
return ESFileModule$1.setExecutableOwnerOnly(this.getFileId(), executable, ownerOnly);
|
1096
|
+
}
|
1097
|
+
|
1098
|
+
setExecutable(executable) {
|
1099
|
+
return ESFileModule$1.setExecutable(this.getFileId(), executable);
|
1100
|
+
}
|
1101
|
+
|
1102
|
+
canExecute() {
|
1103
|
+
return ESFileModule$1.canExecute(this.getFileId());
|
1104
|
+
}
|
1105
|
+
|
1106
|
+
renameTo(renameFileId) {
|
1107
|
+
return ESFileModule$1.renameTo(this.getFileId(), renameFileId);
|
1108
|
+
}
|
1109
|
+
|
1110
|
+
close() {
|
1111
|
+
return ESFileModule$1.close(this.getFileId());
|
1112
|
+
}
|
1113
|
+
}
|
1114
|
+
|
1115
|
+
/**
|
1116
|
+
*
|
1117
|
+
*/
|
1118
|
+
|
1119
|
+
class ESPermissionModule {
|
1120
|
+
|
1121
|
+
isPermissionsGranted(permissionList) {
|
1122
|
+
return Vue.Native.callNativeWithPromise('AndroidPermissionModule',
|
1123
|
+
'isPermissionsGranted', permissionList);
|
1124
|
+
}
|
1125
|
+
|
1126
|
+
|
1127
|
+
isPermissionsGrantedReverse(permissionList) {
|
1128
|
+
return Vue.Native.callNativeWithPromise('AndroidPermissionModule',
|
1129
|
+
'isPermissionsGrantedReverse', permissionList);
|
1130
|
+
}
|
1131
|
+
|
1132
|
+
|
1133
|
+
requestPermissions(permissionList) {
|
1134
|
+
return Vue.Native.callNativeWithPromise('AndroidPermissionModule',
|
1135
|
+
'requestPermissions', permissionList);
|
1136
|
+
}
|
1137
|
+
|
1138
|
+
requestPermissionsReverse(permissionList) {
|
1139
|
+
return Vue.Native.callNativeWithPromise('AndroidPermissionModule',
|
1140
|
+
'requestPermissionsReverse', permissionList);
|
1141
|
+
}
|
1142
|
+
|
1143
|
+
requestPermissionListPromise(permissionList) {
|
1144
|
+
return Vue.Native.callNativeWithPromise('AndroidPermissionModule',
|
1145
|
+
'requestPermissionListPromise', permissionList);
|
1146
|
+
}
|
1147
|
+
}
|
1148
|
+
|
1149
|
+
var ESPermissionModule$1 = new ESPermissionModule();
|
1150
|
+
|
1151
|
+
/**
|
1152
|
+
*
|
1153
|
+
*/
|
1154
|
+
|
1155
|
+
class ESPowerModule {
|
1156
|
+
|
1157
|
+
wakeLockAcquire() {
|
1158
|
+
return Vue.Native.callNativeWithPromise('AndroidPowerModule',
|
1159
|
+
'wakeLockAcquire',);
|
1160
|
+
}
|
1161
|
+
|
1162
|
+
wakeLockRelease() {
|
1163
|
+
return Vue.Native.callNativeWithPromise('AndroidPowerModule',
|
1164
|
+
'wakeLockRelease',);
|
1165
|
+
}
|
1166
|
+
}
|
1167
|
+
|
1168
|
+
var ESPowerModule$1 = new ESPowerModule();
|
1169
|
+
|
1170
|
+
/**
|
1171
|
+
*
|
1172
|
+
*/
|
1173
|
+
|
1174
|
+
class ESSharedPreferencesModule {
|
1175
|
+
|
1176
|
+
initSharedPreferences(name) {
|
1177
|
+
return Vue.Native.callNativeWithPromise('AndroidSharedPreferencesModule',
|
1178
|
+
'initSharedPreferences', name);
|
1179
|
+
}
|
1180
|
+
|
1181
|
+
//----------------------------------------------------
|
1182
|
+
getBoolean(key, defValue) {
|
1183
|
+
return Vue.Native.callNativeWithPromise('AndroidSharedPreferencesModule',
|
1184
|
+
'getBoolean', key, defValue);
|
1185
|
+
}
|
1186
|
+
|
1187
|
+
putBoolean(key, value) {
|
1188
|
+
return Vue.Native.callNativeWithPromise('AndroidSharedPreferencesModule',
|
1189
|
+
'putBoolean', key, value);
|
1190
|
+
}
|
1191
|
+
|
1192
|
+
//----------------------------------------------------
|
1193
|
+
|
1194
|
+
getInt(key, defValue) {
|
1195
|
+
return Vue.Native.callNativeWithPromise('AndroidSharedPreferencesModule',
|
1196
|
+
'getInt', key, defValue);
|
1197
|
+
}
|
1198
|
+
|
1199
|
+
putInt(key, value) {
|
1200
|
+
return Vue.Native.callNativeWithPromise('AndroidSharedPreferencesModule',
|
1201
|
+
'putInt', key, value);
|
1202
|
+
}
|
1203
|
+
|
1204
|
+
//----------------------------------------------------
|
1205
|
+
|
1206
|
+
getLong(key, defValue) {
|
1207
|
+
return Vue.Native.callNativeWithPromise('AndroidSharedPreferencesModule',
|
1208
|
+
'getLong', key, defValue);
|
1209
|
+
}
|
1210
|
+
|
1211
|
+
putLong(key, value) {
|
1212
|
+
return Vue.Native.callNativeWithPromise('AndroidSharedPreferencesModule',
|
1213
|
+
'putLong', key, value);
|
1214
|
+
}
|
1215
|
+
|
1216
|
+
//----------------------------------------------------
|
1217
|
+
getString(key, defValue) {
|
1218
|
+
return Vue.Native.callNativeWithPromise('AndroidSharedPreferencesModule',
|
1219
|
+
'getString', key, defValue);
|
1220
|
+
}
|
1221
|
+
|
1222
|
+
putString(key, value) {
|
1223
|
+
return Vue.Native.callNativeWithPromise('AndroidSharedPreferencesModule',
|
1224
|
+
'putString', key, value);
|
1225
|
+
}
|
1226
|
+
|
1227
|
+
//----------------------------------------------------
|
1228
|
+
}
|
1229
|
+
|
1230
|
+
var ESSharedPreferencesModule$1 = new ESSharedPreferencesModule();
|
1231
|
+
|
1232
|
+
/**
|
1233
|
+
*
|
1234
|
+
*/
|
1235
|
+
|
1236
|
+
class ESStorageModule {
|
1237
|
+
|
1238
|
+
getCacheDir() {
|
1239
|
+
return Vue.Native.callNativeWithPromise('AndroidStorageModule',
|
1240
|
+
'getCacheDir',);
|
1241
|
+
}
|
1242
|
+
|
1243
|
+
getFilesDir() {
|
1244
|
+
return Vue.Native.callNativeWithPromise('AndroidStorageModule',
|
1245
|
+
'getFilesDir',);
|
1246
|
+
}
|
1247
|
+
|
1248
|
+
getExternalCacheDir() {
|
1249
|
+
return Vue.Native.callNativeWithPromise('AndroidStorageModule',
|
1250
|
+
'getExternalCacheDir',);
|
1251
|
+
}
|
1252
|
+
|
1253
|
+
getExternalStorageState() {
|
1254
|
+
return Vue.Native.callNativeWithPromise('AndroidStorageModule',
|
1255
|
+
'getExternalStorageState',);
|
1256
|
+
}
|
1257
|
+
|
1258
|
+
hasExternalStoragePermission() {
|
1259
|
+
return Vue.Native.callNativeWithPromise('AndroidStorageModule',
|
1260
|
+
'hasExternalStoragePermission',);
|
1261
|
+
}
|
1262
|
+
}
|
1263
|
+
|
1264
|
+
var ESStorageModule$1 = new ESStorageModule();
|
1265
|
+
|
1266
|
+
/**
|
1267
|
+
*
|
1268
|
+
*/
|
1269
|
+
class ESUsbDeviceModule {
|
1270
|
+
|
1271
|
+
isUsbDevicePermissionsGranted(vendorId, productId) {
|
1272
|
+
return Vue.Native.callNativeWithPromise('AndroidUsbDeviceModule',
|
1273
|
+
'isUsbDevicePermissionsGranted', vendorId, productId);
|
1274
|
+
}
|
1275
|
+
|
1276
|
+
requestUsbDevicePermission(permission, vendorId, productId) {
|
1277
|
+
return Vue.Native.callNativeWithPromise('AndroidUsbDeviceModule',
|
1278
|
+
'requestUsbDevicePermission', permission, vendorId, productId);
|
1279
|
+
}
|
1280
|
+
|
1281
|
+
getUsbDeviceList() {
|
1282
|
+
return Vue.Native.callNativeWithPromise('AndroidUsbDeviceModule',
|
1283
|
+
'getUsbDeviceList');
|
1284
|
+
}
|
1285
|
+
|
1286
|
+
getUsbDevice(vendorId, productId) {
|
1287
|
+
return Vue.Native.callNativeWithPromise('AndroidUsbDeviceModule',
|
1288
|
+
'getUsbDevice', [vendorId, productId]);
|
1289
|
+
}
|
1290
|
+
|
1291
|
+
getUsbDeviceListByArray(array) {
|
1292
|
+
return Vue.Native.callNativeWithPromise('AndroidUsbDeviceModule',
|
1293
|
+
'getUsbDeviceListByArray', array);
|
1294
|
+
}
|
1295
|
+
}
|
1296
|
+
|
1297
|
+
var ESUsbDeviceModule$1 = new ESUsbDeviceModule();
|
1298
|
+
|
1299
|
+
//
|
1300
|
+
|
1301
|
+
const ES_ANIMATION_TYPE_NONE = "none";
|
1302
|
+
|
1303
|
+
const ES_ANIMATION_TYPE_PLAY = "play";
|
1304
|
+
const ES_ANIMATION_TYPE_PLAY_SEQUENTIALLY = "playSequentially";
|
1305
|
+
const ES_ANIMATION_TYPE_PLAY_TOGETHER = "playTogether";
|
1306
|
+
|
1307
|
+
const ES_ANIMATION_TYPE_WITH = "with";
|
1308
|
+
const ES_ANIMATION_TYPE_BEFORE = "before";
|
1309
|
+
const ES_ANIMATION_TYPE_AFTER = "after";
|
1310
|
+
const ES_ANIMATION_TYPE_AFTER_DELAY = "afterDelay";
|
1311
|
+
|
1312
|
+
//
|
1313
|
+
const ES_ANIMATION_VALUE_TYPE_INT = 'ofInt';
|
1314
|
+
const ES_ANIMATION_VALUE_TYPE_FLOAT = 'ofFloat';
|
1315
|
+
|
1316
|
+
//
|
1317
|
+
const ES_ANIMATION_PROPERTY_NAME_ALPHA = 'alpha';
|
1318
|
+
const ES_ANIMATION_PROPERTY_NAME_ROTATION = 'rotation';
|
1319
|
+
|
1320
|
+
const ES_ANIMATION_PROPERTY_NAME_SCALE_X = 'scaleX';
|
1321
|
+
const ES_ANIMATION_PROPERTY_NAME_SCALE_Y = 'scaleY';
|
1322
|
+
|
1323
|
+
const ES_ANIMATION_PROPERTY_NAME_TRANSLATION_X = 'translationX';
|
1324
|
+
const ES_ANIMATION_PROPERTY_NAME_TRANSLATION_Y = 'translationY';
|
1325
|
+
|
1326
|
+
/**
|
1327
|
+
* Capitalize a word
|
1328
|
+
*
|
1329
|
+
* @param {string} s The word input
|
1330
|
+
* @returns string
|
1331
|
+
*/
|
1332
|
+
function capitalize(str) {
|
1333
|
+
if (typeof str !== 'string') {
|
1334
|
+
return '';
|
1335
|
+
}
|
1336
|
+
return `${str.charAt(0).toUpperCase()}${str.slice(1)}`;
|
1337
|
+
}
|
1338
|
+
|
1339
|
+
/**
|
1340
|
+
* Get binding events redirector
|
1341
|
+
*
|
1342
|
+
* The function should be calld with `getEventRedirector.call(this, [])`
|
1343
|
+
* for binding this.
|
1344
|
+
*
|
1345
|
+
* @param {string[] | string[][]} events events will be redirect
|
1346
|
+
* @returns Object
|
1347
|
+
*/
|
1348
|
+
function getEventRedirector(events) {
|
1349
|
+
const on = {};
|
1350
|
+
events.forEach((event) => {
|
1351
|
+
if (Array.isArray(event)) {
|
1352
|
+
const [exposedEventName, nativeEventName] = event;
|
1353
|
+
if (Object.prototype.hasOwnProperty.call(this.$listeners, exposedEventName)) {
|
1354
|
+
on[event] = this[`on${capitalize(nativeEventName)}`];
|
1355
|
+
}
|
1356
|
+
} else if (Object.prototype.hasOwnProperty.call(this.$listeners, event)) {
|
1357
|
+
on[event] = this[`on${capitalize(event)}`];
|
1358
|
+
}
|
1359
|
+
});
|
1360
|
+
return on;
|
1361
|
+
}
|
1362
|
+
|
1363
|
+
function ESAnimationViewComponent() {
|
1364
|
+
Vue.registerElement('AnimationViewComponent', {
|
1365
|
+
component: {
|
1366
|
+
name: 'AnimationViewComponent',
|
1367
|
+
processEventData(event, nativeEventName, nativeEventParams) {
|
1368
|
+
switch (nativeEventName) {
|
1369
|
+
case 'onAnimationCancel':
|
1370
|
+
event.animationId = nativeEventParams.animationId;
|
1371
|
+
break;
|
1372
|
+
case 'onAnimationEnd':
|
1373
|
+
event.animationId = nativeEventParams.animationId;
|
1374
|
+
event.isReverse = nativeEventParams.isReverse;
|
1375
|
+
break;
|
1376
|
+
case 'onAnimationRepeat':
|
1377
|
+
event.animationId = nativeEventParams.animationId;
|
1378
|
+
break;
|
1379
|
+
case 'onAnimationStart':
|
1380
|
+
event.animationId = nativeEventParams.animationId;
|
1381
|
+
event.isReverse = nativeEventParams.isReverse;
|
1382
|
+
break;
|
1383
|
+
case 'onAnimationPause':
|
1384
|
+
event.animationId = nativeEventParams.animationId;
|
1385
|
+
break;
|
1386
|
+
case 'onAnimationResume':
|
1387
|
+
event.animationId = nativeEventParams.animationId;
|
1388
|
+
break;
|
1389
|
+
case 'onAnimationUpdate':
|
1390
|
+
event.animationId = nativeEventParams.animationId;
|
1391
|
+
event.animatedValue = nativeEventParams.animatedValue;
|
1392
|
+
break;
|
1393
|
+
}
|
1394
|
+
return event;
|
1395
|
+
},
|
1396
|
+
},
|
1397
|
+
});
|
1398
|
+
|
1399
|
+
Vue.component('es-animation-view-component', {
|
1400
|
+
methods: {
|
1401
|
+
resetAnimators() {
|
1402
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1403
|
+
'resetAnimators', [], (res) => {
|
1404
|
+
});
|
1405
|
+
},
|
1406
|
+
animatorSet(animatorId, duration, listenAnimator) {
|
1407
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1408
|
+
'animatorSet', [animatorId, duration, listenAnimator], (res) => {
|
1409
|
+
});
|
1410
|
+
},
|
1411
|
+
//--------------------------------------------------
|
1412
|
+
startAnimator(animatorId) {
|
1413
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1414
|
+
'startAnimator', [animatorId], (res) => {
|
1415
|
+
});
|
1416
|
+
},
|
1417
|
+
startAnimatorDelay(animatorId, delay) {
|
1418
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1419
|
+
'startAnimatorDelay', [animatorId, delay], (res) => {
|
1420
|
+
});
|
1421
|
+
},
|
1422
|
+
pauseAnimator(animatorId) {
|
1423
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1424
|
+
'pauseAnimator', [animatorId], (res) => {
|
1425
|
+
});
|
1426
|
+
},
|
1427
|
+
resumeAnimator(animatorId) {
|
1428
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1429
|
+
'resumeAnimator', [animatorId], (res) => {
|
1430
|
+
});
|
1431
|
+
},
|
1432
|
+
cancelAnimator(animatorId) {
|
1433
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1434
|
+
'cancelAnimator', [animatorId], (res) => {
|
1435
|
+
});
|
1436
|
+
},
|
1437
|
+
reverseAnimator(animatorId) {
|
1438
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1439
|
+
'reverseAnimator', [animatorId], (res) => {
|
1440
|
+
});
|
1441
|
+
},
|
1442
|
+
//-----------------------------------------------------------------
|
1443
|
+
play(animatorSetId, animatorId) {
|
1444
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1445
|
+
'play', [animatorSetId, animatorId], (res) => {
|
1446
|
+
});
|
1447
|
+
},
|
1448
|
+
with(animatorSetId, animatorId) {
|
1449
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1450
|
+
'with', [animatorSetId, animatorId], (res) => {
|
1451
|
+
});
|
1452
|
+
},
|
1453
|
+
before(animatorSetId, animatorId) {
|
1454
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1455
|
+
'before', [animatorSetId, animatorId], (res) => {
|
1456
|
+
});
|
1457
|
+
},
|
1458
|
+
after(animatorSetId, animatorId) {
|
1459
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1460
|
+
'after', [animatorSetId, animatorId], (res) => {
|
1461
|
+
});
|
1462
|
+
},
|
1463
|
+
//-----------------------------------------------------------------
|
1464
|
+
playSequentially1(animatorSetId, animatorId1) {
|
1465
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1466
|
+
'playSequentially1', [animatorSetId, animatorId1], (res) => {
|
1467
|
+
});
|
1468
|
+
},
|
1469
|
+
playSequentially2(animatorSetId, animatorId1, animatorId2) {
|
1470
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1471
|
+
'playSequentially2', [animatorSetId, animatorId1, animatorId2], (res) => {
|
1472
|
+
});
|
1473
|
+
},
|
1474
|
+
playSequentially3(animatorSetId, animatorId1, animatorId2, animatorId3) {
|
1475
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1476
|
+
'playSequentially3', [animatorSetId, animatorId1, animatorId2, animatorId3], (res) => {
|
1477
|
+
});
|
1478
|
+
},
|
1479
|
+
playSequentially4(animatorSetId, animatorId1, animatorId2, animatorId3, animatorId4) {
|
1480
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1481
|
+
'playSequentially4', [animatorSetId, animatorId1, animatorId2, animatorId3, animatorId4], (res) => {
|
1482
|
+
});
|
1483
|
+
},
|
1484
|
+
playSequentially5(animatorSetId, animatorId1, animatorId2, animatorId3, animatorId4, animatorId5) {
|
1485
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1486
|
+
'playSequentially5', [animatorSetId, animatorId1, animatorId2, animatorId3, animatorId4, animatorId5], (res) => {
|
1487
|
+
});
|
1488
|
+
},
|
1489
|
+
//-----------------------------------------------------------------
|
1490
|
+
|
1491
|
+
//-----------------------------------------------------------------
|
1492
|
+
playTogether1(animatorSetId, animatorId1) {
|
1493
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1494
|
+
'playTogether1', [animatorSetId, animatorId1], (res) => {
|
1495
|
+
});
|
1496
|
+
},
|
1497
|
+
playTogether2(animatorSetId, animatorId1, animatorId2) {
|
1498
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1499
|
+
'playTogether2', [animatorSetId, animatorId1, animatorId2], (res) => {
|
1500
|
+
});
|
1501
|
+
},
|
1502
|
+
playTogether3(animatorSetId, animatorId1, animatorId2, animatorId3) {
|
1503
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1504
|
+
'playTogether3', [animatorSetId, animatorId1, animatorId2, animatorId3], (res) => {
|
1505
|
+
});
|
1506
|
+
},
|
1507
|
+
playTogether4(animatorSetId, animatorId1, animatorId2, animatorId3, animatorId4) {
|
1508
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1509
|
+
'playTogether4', [animatorSetId, animatorId1, animatorId2, animatorId3, animatorId4], (res) => {
|
1510
|
+
});
|
1511
|
+
},
|
1512
|
+
playTogether5(animatorSetId, animatorId1, animatorId2, animatorId3, animatorId4, animatorId5) {
|
1513
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1514
|
+
'playTogether5', [animatorSetId, animatorId1, animatorId2, animatorId3, animatorId4, animatorId5], (res) => {
|
1515
|
+
});
|
1516
|
+
},
|
1517
|
+
//-----------------------------------------------------------------
|
1518
|
+
objectAnimator(
|
1519
|
+
id,
|
1520
|
+
valueType, propertyName,
|
1521
|
+
duration, repeatMode, repeatCount,
|
1522
|
+
listenAnimator, listenAnimatorValue) {
|
1523
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1524
|
+
'objectAnimator', [
|
1525
|
+
id,
|
1526
|
+
valueType, propertyName,
|
1527
|
+
duration, repeatMode, repeatCount,
|
1528
|
+
listenAnimator, listenAnimatorValue],
|
1529
|
+
(res) => {
|
1530
|
+
});
|
1531
|
+
},
|
1532
|
+
|
1533
|
+
objectAnimator1(id,
|
1534
|
+
valueType, propertyName,
|
1535
|
+
value1,
|
1536
|
+
duration, repeatMode, repeatCount,
|
1537
|
+
listenAnimator, listenAnimatorValue) {
|
1538
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1539
|
+
'objectAnimator1', [
|
1540
|
+
id,
|
1541
|
+
valueType, propertyName,
|
1542
|
+
value1,
|
1543
|
+
duration, repeatMode, repeatCount,
|
1544
|
+
listenAnimator, listenAnimatorValue], (res) => {
|
1545
|
+
});
|
1546
|
+
},
|
1547
|
+
|
1548
|
+
objectAnimator2(
|
1549
|
+
id,
|
1550
|
+
valueType, propertyName,
|
1551
|
+
value1, value2,
|
1552
|
+
duration, repeatMode, repeatCount,
|
1553
|
+
listenAnimator, listenAnimatorValue) {
|
1554
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1555
|
+
'objectAnimator2', [
|
1556
|
+
id,
|
1557
|
+
valueType, propertyName,
|
1558
|
+
value1, value2,
|
1559
|
+
duration, repeatMode, repeatCount,
|
1560
|
+
listenAnimator, listenAnimatorValue], (res) => {
|
1561
|
+
});
|
1562
|
+
},
|
1563
|
+
|
1564
|
+
objectAnimator3(
|
1565
|
+
id,
|
1566
|
+
valueType, propertyName,
|
1567
|
+
value1, value2, value3,
|
1568
|
+
duration, repeatMode, repeatCount,
|
1569
|
+
listenAnimator, listenAnimatorValue) {
|
1570
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1571
|
+
'objectAnimator3', [
|
1572
|
+
id,
|
1573
|
+
valueType, propertyName,
|
1574
|
+
value1, value2, value3,
|
1575
|
+
duration, repeatMode, repeatCount,
|
1576
|
+
listenAnimator, listenAnimatorValue], (res) => {
|
1577
|
+
});
|
1578
|
+
},
|
1579
|
+
|
1580
|
+
objectAnimator4(
|
1581
|
+
id,
|
1582
|
+
valueType, propertyName,
|
1583
|
+
value1, value2, value3, value4,
|
1584
|
+
duration, repeatMode, repeatCount,
|
1585
|
+
listenAnimator, listenAnimatorValue) {
|
1586
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1587
|
+
'objectAnimator4', [
|
1588
|
+
id,
|
1589
|
+
valueType, propertyName,
|
1590
|
+
value1, value2, value3, value4,
|
1591
|
+
duration, repeatMode, repeatCount,
|
1592
|
+
listenAnimator, listenAnimatorValue], (res) => {
|
1593
|
+
});
|
1594
|
+
},
|
1595
|
+
|
1596
|
+
objectAnimator5(
|
1597
|
+
id,
|
1598
|
+
valueType, propertyName,
|
1599
|
+
value1, value2, value3, value4, value5,
|
1600
|
+
duration, repeatMode, repeatCount,
|
1601
|
+
listenAnimator, listenAnimatorValue) {
|
1602
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1603
|
+
'objectAnimator5', [
|
1604
|
+
id,
|
1605
|
+
valueType, propertyName,
|
1606
|
+
value1, value2, value3, value4, value5,
|
1607
|
+
duration, repeatMode, repeatCount,
|
1608
|
+
listenAnimator, listenAnimatorValue], (res) => {
|
1609
|
+
});
|
1610
|
+
},
|
1611
|
+
|
1612
|
+
objectAnimator6(
|
1613
|
+
id,
|
1614
|
+
valueType, propertyName,
|
1615
|
+
value1, value2, value3, value4, value5, value6,
|
1616
|
+
duration, repeatMode, repeatCount,
|
1617
|
+
listenAnimator, listenAnimatorValue) {
|
1618
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1619
|
+
'objectAnimator6', [
|
1620
|
+
id,
|
1621
|
+
valueType, propertyName,
|
1622
|
+
value1, value2, value3, value4, value5, value6,
|
1623
|
+
duration, repeatMode, repeatCount,
|
1624
|
+
listenAnimator, listenAnimatorValue], (res) => {
|
1625
|
+
});
|
1626
|
+
},
|
1627
|
+
|
1628
|
+
objectAnimator7(
|
1629
|
+
id,
|
1630
|
+
valueType, propertyName,
|
1631
|
+
value1, value2, value3, value4, value5, value6, value7,
|
1632
|
+
duration, repeatMode, repeatCount,
|
1633
|
+
listenAnimator, listenAnimatorValue) {
|
1634
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1635
|
+
'objectAnimator7', [
|
1636
|
+
id,
|
1637
|
+
valueType, propertyName,
|
1638
|
+
value1, value2, value3, value4, value5, value6, value7,
|
1639
|
+
duration, repeatMode, repeatCount,
|
1640
|
+
listenAnimator, listenAnimatorValue], (res) => {
|
1641
|
+
});
|
1642
|
+
},
|
1643
|
+
|
1644
|
+
objectAnimator8(
|
1645
|
+
id,
|
1646
|
+
valueType, propertyName,
|
1647
|
+
value1, value2, value3, value4, value5, value6, value7, value8,
|
1648
|
+
duration, repeatMode, repeatCount,
|
1649
|
+
listenAnimator, listenAnimatorValue) {
|
1650
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1651
|
+
'objectAnimator8', [
|
1652
|
+
id,
|
1653
|
+
valueType, propertyName,
|
1654
|
+
value1, value2, value3, value4, value5, value6, value7, value8,
|
1655
|
+
duration, repeatMode, repeatCount,
|
1656
|
+
listenAnimator, listenAnimatorValue], (res) => {
|
1657
|
+
});
|
1658
|
+
},
|
1659
|
+
|
1660
|
+
objectAnimator9(
|
1661
|
+
id,
|
1662
|
+
valueType, propertyName,
|
1663
|
+
value1, value2, value3, value4, value5, value6, value7, value8, value9,
|
1664
|
+
duration, repeatMode, repeatCount,
|
1665
|
+
listenAnimator, listenAnimatorValue) {
|
1666
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1667
|
+
'objectAnimator9', [
|
1668
|
+
id,
|
1669
|
+
valueType, propertyName,
|
1670
|
+
value1, value2, value3, value4, value5, value6, value7, value8, value9,
|
1671
|
+
duration, repeatMode, repeatCount,
|
1672
|
+
listenAnimator, listenAnimatorValue], (res) => {
|
1673
|
+
});
|
1674
|
+
},
|
1675
|
+
|
1676
|
+
objectAnimator10(
|
1677
|
+
id,
|
1678
|
+
valueType, propertyName,
|
1679
|
+
value1, value2, value3, value4, value5, value6, value7, value8, value9, value10,
|
1680
|
+
duration, repeatMode, repeatCount,
|
1681
|
+
listenAnimator, listenAnimatorValue) {
|
1682
|
+
Vue.Native.callUIFunction(this.$refs.animationView,
|
1683
|
+
'objectAnimator10', [
|
1684
|
+
id,
|
1685
|
+
valueType, propertyName,
|
1686
|
+
value1, value2, value3, value4, value5, value6, value7, value8, value9, value10,
|
1687
|
+
duration, repeatMode, repeatCount,
|
1688
|
+
listenAnimator, listenAnimatorValue], (res) => {
|
1689
|
+
});
|
1690
|
+
},
|
1691
|
+
|
1692
|
+
|
1693
|
+
//---------------------------------------
|
1694
|
+
onAnimationCancel(evt) {
|
1695
|
+
let id = evt.animationId;
|
1696
|
+
this.$emit('on-animation-cancel', id);
|
1697
|
+
},
|
1698
|
+
onAnimationEnd(evt) {
|
1699
|
+
let id = evt.animationId;
|
1700
|
+
let isReverse = evt.isReverse;
|
1701
|
+
this.$emit('on-animation-end', id, isReverse);
|
1702
|
+
},
|
1703
|
+
onAnimationRepeat(evt) {
|
1704
|
+
let id = evt.animationId;
|
1705
|
+
this.$emit('on-animation-repeat', id);
|
1706
|
+
},
|
1707
|
+
onAnimationStart(evt) {
|
1708
|
+
let id = evt.animationId;
|
1709
|
+
let isReverse = evt.isReverse;
|
1710
|
+
this.$emit('on-animation-start', id, isReverse);
|
1711
|
+
},
|
1712
|
+
onAnimationPause(evt) {
|
1713
|
+
let id = evt.animationId;
|
1714
|
+
this.$emit('on-animation-pause', id);
|
1715
|
+
},
|
1716
|
+
onAnimationResume(evt) {
|
1717
|
+
let id = evt.animationId;
|
1718
|
+
this.$emit('on-animation-resume', id);
|
1719
|
+
},
|
1720
|
+
onAnimationUpdate(evt) {
|
1721
|
+
let id = evt.animationId;
|
1722
|
+
let value = evt.animatedValue;
|
1723
|
+
this.$emit('on-animation-update', id, value);
|
1724
|
+
}
|
1725
|
+
},
|
1726
|
+
|
1727
|
+
render(h) {
|
1728
|
+
const on = getEventRedirector.call(this, [
|
1729
|
+
['on-animation-end', 'animationEnd'],
|
1730
|
+
['on-animation-cancel', 'animationCancel'],
|
1731
|
+
['on-animation-start', 'animationStart'],
|
1732
|
+
['on-animation-repeat', 'animationRepeat'],
|
1733
|
+
['on-animation-pause', 'aAnimationPause'],
|
1734
|
+
['on-animation-resume', 'animationResume'],
|
1735
|
+
['on-animation-update', 'animationUpdate'],
|
1736
|
+
]);
|
1737
|
+
return h('AnimationViewComponent',
|
1738
|
+
{
|
1739
|
+
on,
|
1740
|
+
ref: 'animationView',
|
1741
|
+
}, this.$slots.default);
|
1742
|
+
},
|
1743
|
+
});
|
1744
|
+
}
|
1745
|
+
|
1746
|
+
function ESSeekBarViewComponent() {
|
1747
|
+
Vue.registerElement('TVSeekBarViewComponent', {
|
1748
|
+
component: {
|
1749
|
+
name: 'TVSeekBarViewComponent',
|
1750
|
+
processEventData(event, nativeEventName, nativeEventParams) {
|
1751
|
+
switch (nativeEventName) {
|
1752
|
+
case 'onFocus':
|
1753
|
+
event.isFocused = nativeEventParams.isFocused;
|
1754
|
+
break;
|
1755
|
+
case 'onSeekBarChange':
|
1756
|
+
event.fromUser = nativeEventParams.fromUser;
|
1757
|
+
event.progress = nativeEventParams.progress;
|
1758
|
+
break;
|
1759
|
+
}
|
1760
|
+
return event;
|
1761
|
+
},
|
1762
|
+
},
|
1763
|
+
});
|
1764
|
+
|
1765
|
+
Vue.component('es-seek-bar-view-component', {
|
1766
|
+
|
1767
|
+
methods: {
|
1768
|
+
setMaxProgress(progress) {
|
1769
|
+
Vue.Native.callUIFunction(this.$refs.TVSeekBar,
|
1770
|
+
'setMaxProgress', [progress], (res) => {
|
1771
|
+
});
|
1772
|
+
},
|
1773
|
+
setProgress(progress) {
|
1774
|
+
Vue.Native.callUIFunction(this.$refs.TVSeekBar,
|
1775
|
+
'setProgress', [progress], (res) => {
|
1776
|
+
});
|
1777
|
+
},
|
1778
|
+
setSecondProgress(progress) {
|
1779
|
+
Vue.Native.callUIFunction(this.$refs.TVSeekBar,
|
1780
|
+
'setSecondProgress', [progress], (res) => {
|
1781
|
+
});
|
1782
|
+
},
|
1783
|
+
show(value) {
|
1784
|
+
Vue.Native.callUIFunction(this.$refs.TVSeekBar,
|
1785
|
+
'show', [value], (res) => {
|
1786
|
+
});
|
1787
|
+
},
|
1788
|
+
onFocusChange(evt) {
|
1789
|
+
this.$emit('focus', evt);
|
1790
|
+
},
|
1791
|
+
onSeekBarChange(evt) {
|
1792
|
+
this.$emit('seek-change', evt);
|
1793
|
+
},
|
1794
|
+
|
1795
|
+
},
|
1796
|
+
|
1797
|
+
render(h) {
|
1798
|
+
const on = getEventRedirector$1.call(this, [
|
1799
|
+
['focus', 'focusChange'],
|
1800
|
+
['seek-change', 'seekBarChange'],
|
1801
|
+
]);
|
1802
|
+
return h('TVSeekBarViewComponent',
|
1803
|
+
{
|
1804
|
+
on,
|
1805
|
+
ref: 'ESSeekBarView',
|
1806
|
+
}, this.$slots.default);
|
1807
|
+
},
|
1808
|
+
});
|
1809
|
+
}
|
1810
|
+
|
1811
|
+
function ESProgressBarViewComponent() {
|
1812
|
+
Vue.registerElement('TVProgressBarViewComponent', {
|
1813
|
+
component: {
|
1814
|
+
name: 'TVProgressBarViewComponent',
|
1815
|
+
},
|
1816
|
+
});
|
1817
|
+
|
1818
|
+
Vue.component('es-progress-bar-view-component', {
|
1819
|
+
methods: {
|
1820
|
+
setMaxProgress(progress) {
|
1821
|
+
Vue.Native.callUIFunction(this.$refs.TVProgressBar,
|
1822
|
+
'setMaxProgress', [progress], (res) => {
|
1823
|
+
});
|
1824
|
+
},
|
1825
|
+
setProgress(progress) {
|
1826
|
+
Vue.Native.callUIFunction(this.$refs.TVProgressBar,
|
1827
|
+
'setProgress', [progress], (res) => {
|
1828
|
+
});
|
1829
|
+
},
|
1830
|
+
setSecondProgress(progress) {
|
1831
|
+
Vue.Native.callUIFunction(this.$refs.TVProgressBar,
|
1832
|
+
'setSecondProgress', [progress], (res) => {
|
1833
|
+
});
|
1834
|
+
},
|
1835
|
+
show(value) {
|
1836
|
+
Vue.Native.callUIFunction(this.$refs.TVSeekBar,
|
1837
|
+
'show', [value], (res) => {
|
1838
|
+
});
|
1839
|
+
},
|
1840
|
+
},
|
1841
|
+
render(h) {
|
1842
|
+
return h('TVProgressBarViewComponent',
|
1843
|
+
{
|
1844
|
+
ref: 'ESProgressBarView'
|
1845
|
+
}, this.$slots.default
|
1846
|
+
);
|
1847
|
+
}
|
1848
|
+
});
|
1849
|
+
}
|
1850
|
+
|
1851
|
+
function ESLoadingViewComponent() {
|
1852
|
+
Vue.registerElement('LoadingViewComponent', {
|
1853
|
+
component: {
|
1854
|
+
name: 'LoadingViewComponent'
|
1855
|
+
},
|
1856
|
+
});
|
1857
|
+
|
1858
|
+
Vue.component('es-loading-view-component', {
|
1859
|
+
|
1860
|
+
render(h) {
|
1861
|
+
return h('LoadingViewComponent',
|
1862
|
+
{
|
1863
|
+
ref: 'LoadingView'
|
1864
|
+
}, this.$slots.default
|
1865
|
+
);
|
1866
|
+
}
|
1867
|
+
});
|
1868
|
+
}
|
1869
|
+
|
1870
|
+
function ESTransitionImageViewComponent() {
|
1871
|
+
Vue.registerElement('TransitionImageComponent', {
|
1872
|
+
component: {
|
1873
|
+
name: 'TransitionImageComponent'
|
1874
|
+
},
|
1875
|
+
});
|
1876
|
+
|
1877
|
+
Vue.component('es-transition-image-view-component', {
|
1878
|
+
methods: {
|
1879
|
+
setNextColor(color) {
|
1880
|
+
Vue.Native.callUIFunction(this.$refs.transitionImageComponent,
|
1881
|
+
'setNextColor', [color], (res) => {
|
1882
|
+
});
|
1883
|
+
},
|
1884
|
+
setNextImage(url) {
|
1885
|
+
Vue.Native.callUIFunction(this.$refs.transitionImageComponent,
|
1886
|
+
'setNextImage', [url], (res) => {
|
1887
|
+
});
|
1888
|
+
},
|
1889
|
+
setTransitionTime(duration) {
|
1890
|
+
Vue.Native.callUIFunction(this.$refs.transitionImageComponent,
|
1891
|
+
'setTransitionTime', [duration], (res) => {
|
1892
|
+
});
|
1893
|
+
},
|
1894
|
+
},
|
1895
|
+
render(h) {
|
1896
|
+
return h('TransitionImageComponent',
|
1897
|
+
{
|
1898
|
+
ref: 'transitionImageComponent'
|
1899
|
+
}, this.$slots.default
|
1900
|
+
);
|
1901
|
+
}
|
1902
|
+
});
|
1903
|
+
}
|
1904
|
+
|
1905
|
+
function ESQRCodeViewComponent() {
|
1906
|
+
Vue.registerElement('QrCodeComponent', {
|
1907
|
+
component: {
|
1908
|
+
name: 'QrCodeComponent'
|
1909
|
+
},
|
1910
|
+
});
|
1911
|
+
|
1912
|
+
Vue.component('es-qr-code-view-component', {
|
1913
|
+
|
1914
|
+
render(h) {
|
1915
|
+
return h('QrCodeComponent',
|
1916
|
+
{
|
1917
|
+
ref: 'qrCode'
|
1918
|
+
}, this.$slots.default
|
1919
|
+
);
|
1920
|
+
}
|
1921
|
+
});
|
1922
|
+
}
|
1923
|
+
|
1924
|
+
//
|
1925
|
+
const ES_NETWORK_INFO_STATE_CONNECTING = 0;
|
1926
|
+
const ES_NETWORK_INFO_STATE_CONNECTED = 1;
|
1927
|
+
const ES_NETWORK_INFO_STATE_SUSPENDED = 2;
|
1928
|
+
const ES_NETWORK_INFO_STATE_DISCONNECTING = 3;
|
1929
|
+
const ES_NETWORK_INFO_STATE_DISCONNECTED = 4;
|
1930
|
+
const ES_NETWORK_INFO_STATE_UNKNOWN = 5;
|
1931
|
+
|
1932
|
+
//
|
1933
|
+
const ES_NETWORK_INFO_TYPE_NONE = -1;
|
1934
|
+
const ES_NETWORK_INFO_TYPE_MOBILE = 0;
|
1935
|
+
const ES_NETWORK_INFO_TYPE_WIFI = 1;
|
1936
|
+
const ES_NETWORK_INFO_TYPE_ETHERNET = 9;
|
1937
|
+
|
1938
|
+
let ESApp;
|
1939
|
+
|
1940
|
+
function setESApp(app) {
|
1941
|
+
ESApp = app;
|
1942
|
+
}
|
1943
|
+
|
1944
|
+
function getESApp() {
|
1945
|
+
return ESApp;
|
1946
|
+
}
|
1947
|
+
|
1948
|
+
var ESNetworkMixin = {
|
1949
|
+
mounted() {
|
1950
|
+
ESApp.$on('onConnectivityChanged', this.onConnectivityChanged);
|
1951
|
+
},
|
1952
|
+
|
1953
|
+
methods: {
|
1954
|
+
onConnectivityChanged(networkInfo) {
|
1955
|
+
ESNetworkManager$1.onConnectivityChanged(networkInfo);
|
1956
|
+
this.onESConnectivityChanged(networkInfo);
|
1957
|
+
},
|
1958
|
+
|
1959
|
+
onESConnectivityChanged(networkInfo) {
|
1960
|
+
|
1961
|
+
}
|
1962
|
+
},
|
1963
|
+
|
1964
|
+
beforeDestroy() {
|
1965
|
+
ESApp.$off('onConnectivityChanged', this.onConnectivityChanged);
|
1966
|
+
},
|
1967
|
+
};
|
1968
|
+
|
1969
|
+
var ESUsbDeviceMixin = {
|
1970
|
+
mounted() {
|
1971
|
+
ESApp.$on('onUsbDeviceAttached', this.onUsbDeviceAttached);
|
1972
|
+
ESApp.$on('onUsbDeviceDetached', this.onUsbDeviceDetached);
|
1973
|
+
},
|
1974
|
+
|
1975
|
+
methods: {
|
1976
|
+
onUsbDeviceAttached(usbDevice) {
|
1977
|
+
this.onESUsbDeviceAttached(usbDevice);
|
1978
|
+
},
|
1979
|
+
|
1980
|
+
onUsbDeviceDetached(usbDevice) {
|
1981
|
+
this.onESUsbDeviceDetached(usbDevice);
|
1982
|
+
},
|
1983
|
+
|
1984
|
+
//--------------------------------------
|
1985
|
+
onESUsbDeviceAttached(usbDevice) {
|
1986
|
+
|
1987
|
+
},
|
1988
|
+
onESUsbDeviceDetached(usbDevice) {
|
1989
|
+
|
1990
|
+
},
|
1991
|
+
},
|
1992
|
+
|
1993
|
+
beforeDestroy() {
|
1994
|
+
ESApp.$off('onUsbDeviceAttached', this.onUsbDeviceAttached);
|
1995
|
+
ESApp.$off('onUsbDeviceDetached', this.onUsbDeviceDetached);
|
1996
|
+
},
|
1997
|
+
};
|
1998
|
+
|
1999
|
+
export { ESAnimationViewComponent, ESApp, ESAppModule$1 as ESAppModule, ESAudioModule$1 as ESAudioModule, ESDevelopManager$1 as ESDevelopManager, ESDevelopModule$1 as ESDevelopModule, ESDeviceManager$1 as ESDeviceManager, ESDeviceModule$1 as ESDeviceModule, ESFile, ESFileModule$1 as ESFileModule, ESLoadingViewComponent, ESModule$1 as ESModule, ESNetworkManager$1 as ESNetworkManager, ESNetworkMixin, ESNetworkModule$1 as ESNetworkModule, ESPermissionModule$1 as ESPermissionModule, ESPowerModule$1 as ESPowerModule, ESProgressBarViewComponent, ESQRCodeViewComponent, ESSeekBarViewComponent, ESSharedPreferencesModule$1 as ESSharedPreferencesModule, ESStorageModule$1 as ESStorageModule, ESToast$1 as ESToast, ToastModule as ESToastModule, ESTransitionImageViewComponent, ESUsbDeviceMixin, ESUsbDeviceModule$1 as ESUsbDeviceModule, ES_ANIMATION_PROPERTY_NAME_ALPHA, ES_ANIMATION_PROPERTY_NAME_ROTATION, ES_ANIMATION_PROPERTY_NAME_SCALE_X, ES_ANIMATION_PROPERTY_NAME_SCALE_Y, ES_ANIMATION_PROPERTY_NAME_TRANSLATION_X, ES_ANIMATION_PROPERTY_NAME_TRANSLATION_Y, ES_ANIMATION_TYPE_AFTER, ES_ANIMATION_TYPE_AFTER_DELAY, ES_ANIMATION_TYPE_BEFORE, ES_ANIMATION_TYPE_NONE, ES_ANIMATION_TYPE_PLAY, ES_ANIMATION_TYPE_PLAY_SEQUENTIALLY, ES_ANIMATION_TYPE_PLAY_TOGETHER, ES_ANIMATION_TYPE_WITH, ES_ANIMATION_VALUE_TYPE_FLOAT, ES_ANIMATION_VALUE_TYPE_INT, ES_NETWORK_INFO_STATE_CONNECTED, ES_NETWORK_INFO_STATE_CONNECTING, ES_NETWORK_INFO_STATE_DISCONNECTED, ES_NETWORK_INFO_STATE_DISCONNECTING, ES_NETWORK_INFO_STATE_SUSPENDED, ES_NETWORK_INFO_STATE_UNKNOWN, ES_NETWORK_INFO_TYPE_ETHERNET, ES_NETWORK_INFO_TYPE_MOBILE, ES_NETWORK_INFO_TYPE_NONE, ES_NETWORK_INFO_TYPE_WIFI, getESApp, setESApp };
|