@extscreen/es-core 2.3.26 → 2.3.28
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 +182 -126
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -3593,69 +3593,83 @@ class ESRouterKeyManager {
|
|
3593
3593
|
}
|
3594
3594
|
|
3595
3595
|
dispatchKeyEvent(route, keyEvent) {
|
3596
|
-
|
3597
|
-
|
3596
|
+
try {
|
3597
|
+
let instance = this.getComponentInstance(route);
|
3598
|
+
this.dispatchInstanceKeyEvent(instance, keyEvent);
|
3599
|
+
}catch (e){}
|
3598
3600
|
}
|
3599
3601
|
|
3600
3602
|
dispatchInstanceKeyEvent(componentInstance, keyEvent) {
|
3601
|
-
|
3602
|
-
if (
|
3603
|
-
componentInstance.onDispatchKeyEvent
|
3604
|
-
|
3605
|
-
|
3606
|
-
|
3607
|
-
//
|
3608
|
-
if (keyEvent && keyEvent.action === 0) {
|
3609
|
-
if (this.isFunction(componentInstance.onKeyDown)) {
|
3610
|
-
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
3611
|
-
ESLog.d(TAG$6, '#-------onKeyDown---success------>>>>>');
|
3612
|
-
}
|
3613
|
-
componentInstance.onKeyDown(keyEvent);
|
3614
|
-
} else {
|
3615
|
-
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
3616
|
-
ESLog.d(TAG$6, '#-------onKeyDown---error------>>>>>');
|
3617
|
-
}
|
3618
|
-
}
|
3603
|
+
try {
|
3604
|
+
if (componentInstance) {
|
3605
|
+
if (this.isFunction(componentInstance.onDispatchKeyEvent)) {
|
3606
|
+
try{
|
3607
|
+
componentInstance.onDispatchKeyEvent(keyEvent);
|
3608
|
+
}catch (e){}
|
3619
3609
|
}
|
3620
3610
|
//
|
3621
|
-
else
|
3622
|
-
|
3623
|
-
|
3624
|
-
|
3625
|
-
|
3626
|
-
|
3627
|
-
|
3628
|
-
|
3629
|
-
|
3630
|
-
|
3611
|
+
else {
|
3612
|
+
//
|
3613
|
+
if (keyEvent && keyEvent.action === 0) {
|
3614
|
+
try{
|
3615
|
+
if (this.isFunction(componentInstance.onKeyDown)) {
|
3616
|
+
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
3617
|
+
ESLog.d(TAG$6, '#-------onKeyDown---success------>>>>>');
|
3618
|
+
}
|
3619
|
+
componentInstance.onKeyDown(keyEvent);
|
3620
|
+
} else {
|
3621
|
+
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
3622
|
+
ESLog.d(TAG$6, '#-------onKeyDown---error------>>>>>');
|
3623
|
+
}
|
3624
|
+
}
|
3625
|
+
}catch (e){}
|
3626
|
+
}
|
3627
|
+
//
|
3628
|
+
else if (keyEvent && keyEvent.action === 1) {
|
3629
|
+
try{
|
3630
|
+
if (this.isFunction(componentInstance.onKeyUp)) {
|
3631
|
+
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
3632
|
+
ESLog.d(TAG$6, '#-------onKeyUp---success------>>>>>');
|
3633
|
+
}
|
3634
|
+
componentInstance.onKeyUp(keyEvent);
|
3635
|
+
} else {
|
3636
|
+
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
3637
|
+
ESLog.d(TAG$6, '#-------onKeyUp---error------>>>>>');
|
3638
|
+
}
|
3639
|
+
}
|
3640
|
+
}catch (e){}
|
3631
3641
|
}
|
3632
3642
|
}
|
3643
|
+
} else {
|
3644
|
+
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
3645
|
+
ESLog.d(TAG$6, '#-------dispatchInstanceKeyEvent-----实例对象为空------>>>>>');
|
3646
|
+
}
|
3633
3647
|
}
|
3634
|
-
}
|
3635
|
-
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
3636
|
-
ESLog.d(TAG$6, '#-------dispatchInstanceKeyEvent-----实例对象为空------>>>>>');
|
3637
|
-
}
|
3638
|
-
}
|
3648
|
+
}catch (e){}
|
3639
3649
|
}
|
3640
3650
|
|
3641
3651
|
|
3642
3652
|
dispatchBackPressed(route) {
|
3643
|
-
|
3644
|
-
|
3653
|
+
try {
|
3654
|
+
let instance = this.getComponentInstance(route);
|
3655
|
+
this.dispatchInstanceBackPressed(instance);
|
3656
|
+
}catch (e){}
|
3645
3657
|
}
|
3646
3658
|
|
3647
3659
|
dispatchInstanceBackPressed(componentInstance) {
|
3648
3660
|
if (componentInstance) {
|
3649
|
-
|
3650
|
-
if (
|
3651
|
-
ESLog.
|
3652
|
-
|
3653
|
-
|
3654
|
-
|
3655
|
-
|
3656
|
-
ESLog.
|
3661
|
+
try{
|
3662
|
+
if (this.isFunction(componentInstance.onBackPressed)) {
|
3663
|
+
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
3664
|
+
ESLog.d(TAG$6, '#-------onBackPressed---success------>>>>>');
|
3665
|
+
}
|
3666
|
+
componentInstance.onBackPressed();
|
3667
|
+
} else {
|
3668
|
+
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
3669
|
+
ESLog.d(TAG$6, '#-------onBackPressed---error------>>>>>');
|
3670
|
+
}
|
3657
3671
|
}
|
3658
|
-
}
|
3672
|
+
}catch (e){}
|
3659
3673
|
} else {
|
3660
3674
|
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
3661
3675
|
ESLog.d(TAG$6, '#-------dispatchInstanceBackPressed-----实例对象为空------>>>>>');
|
@@ -3703,66 +3717,85 @@ class ESRouterLifecycleManager {
|
|
3703
3717
|
* @param event
|
3704
3718
|
*/
|
3705
3719
|
onESRouterLifecycleChanged(route, event) {
|
3706
|
-
|
3707
|
-
|
3720
|
+
try {
|
3721
|
+
let componentInstance = this.getComponentInstance(route);
|
3722
|
+
let lifecycleChanged = this.isFunction(componentInstance.onESLifecycleChanged);
|
3708
3723
|
|
3709
|
-
|
3710
|
-
|
3711
|
-
|
3712
|
-
|
3713
|
-
|
3724
|
+
if (componentInstance) {
|
3725
|
+
if (event === 'onCreate') {
|
3726
|
+
try {
|
3727
|
+
route.lifecycle.state = ES_LIFECYCLE_ON_CREATE;
|
3728
|
+
if (!lifecycleChanged) {
|
3729
|
+
componentInstance.onESCreate();
|
3730
|
+
}
|
3731
|
+
}catch (e){}
|
3714
3732
|
}
|
3715
|
-
|
3716
|
-
|
3717
|
-
|
3718
|
-
|
3719
|
-
|
3720
|
-
|
3733
|
+
//
|
3734
|
+
else if (event === 'onRestart') {
|
3735
|
+
try {
|
3736
|
+
route.lifecycle.state = ES_LIFECYCLE_ON_RESTART;
|
3737
|
+
if (!lifecycleChanged) {
|
3738
|
+
componentInstance.onESRestart();
|
3739
|
+
}
|
3740
|
+
}catch (e){}
|
3721
3741
|
}
|
3722
|
-
|
3723
|
-
|
3724
|
-
|
3725
|
-
|
3726
|
-
|
3727
|
-
|
3742
|
+
//
|
3743
|
+
else if (event === 'onStart') {
|
3744
|
+
try {
|
3745
|
+
route.lifecycle.state = ES_LIFECYCLE_ON_START;
|
3746
|
+
if (!lifecycleChanged) {
|
3747
|
+
componentInstance.onESStart();
|
3748
|
+
}
|
3749
|
+
}catch (e){}
|
3728
3750
|
}
|
3729
|
-
|
3730
|
-
|
3731
|
-
|
3732
|
-
|
3733
|
-
|
3734
|
-
|
3751
|
+
//
|
3752
|
+
else if (event === 'onResume') {
|
3753
|
+
try {
|
3754
|
+
route.lifecycle.state = ES_LIFECYCLE_ON_RESUME;
|
3755
|
+
if (!lifecycleChanged) {
|
3756
|
+
componentInstance.onESResume();
|
3757
|
+
}
|
3758
|
+
}catch (e){}
|
3735
3759
|
}
|
3736
|
-
|
3737
|
-
|
3738
|
-
|
3739
|
-
|
3740
|
-
|
3741
|
-
|
3760
|
+
//
|
3761
|
+
else if (event === 'onPause') {
|
3762
|
+
try {
|
3763
|
+
route.lifecycle.state = ES_LIFECYCLE_ON_PAUSE;
|
3764
|
+
if (!lifecycleChanged) {
|
3765
|
+
componentInstance.onESPause();
|
3766
|
+
}
|
3767
|
+
}catch (e){}
|
3742
3768
|
}
|
3743
|
-
|
3744
|
-
|
3745
|
-
|
3746
|
-
|
3747
|
-
|
3748
|
-
|
3769
|
+
//
|
3770
|
+
else if (event === 'onStop') {
|
3771
|
+
try {
|
3772
|
+
route.lifecycle.state = ES_LIFECYCLE_ON_STOP;
|
3773
|
+
if (!lifecycleChanged) {
|
3774
|
+
componentInstance.onESStop();
|
3775
|
+
}
|
3776
|
+
}catch (e){}
|
3749
3777
|
}
|
3750
|
-
|
3751
|
-
|
3752
|
-
|
3753
|
-
|
3754
|
-
|
3755
|
-
|
3778
|
+
//
|
3779
|
+
else if (event === 'onDestroy') {
|
3780
|
+
try {
|
3781
|
+
route.lifecycle.state = ES_LIFECYCLE_ON_DESTROY;
|
3782
|
+
if (!lifecycleChanged) {
|
3783
|
+
componentInstance.onESDestroy();
|
3784
|
+
}
|
3785
|
+
}catch (e){}
|
3756
3786
|
}
|
3757
|
-
}
|
3758
3787
|
|
3759
|
-
|
3760
|
-
|
3761
|
-
|
3762
|
-
|
3763
|
-
|
3764
|
-
|
3788
|
+
try {
|
3789
|
+
if (lifecycleChanged) {
|
3790
|
+
componentInstance.onESLifecycleChanged(event);
|
3791
|
+
}
|
3792
|
+
}catch (e){}
|
3793
|
+
} else {
|
3794
|
+
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
3795
|
+
ESLog.d(TAG$5, '#-------onESRouterLifecycleChanged-----实例对象为空------>>>>>');
|
3796
|
+
}
|
3765
3797
|
}
|
3798
|
+
}catch (e){
|
3766
3799
|
}
|
3767
3800
|
}
|
3768
3801
|
|
@@ -3772,15 +3805,17 @@ class ESRouterLifecycleManager {
|
|
3772
3805
|
* @param params
|
3773
3806
|
*/
|
3774
3807
|
onESRouterLifecycleNewIntent(route, params, intent) {
|
3775
|
-
|
3776
|
-
|
3777
|
-
|
3778
|
-
componentInstance
|
3779
|
-
|
3780
|
-
|
3781
|
-
ESLog.
|
3808
|
+
try {
|
3809
|
+
let componentInstance = this.getComponentInstance(route);
|
3810
|
+
let lifecycleChanged = this.isFunction(componentInstance.onESNewIntent);
|
3811
|
+
if (componentInstance && lifecycleChanged) {
|
3812
|
+
componentInstance.onESNewIntent(params, intent);
|
3813
|
+
} else {
|
3814
|
+
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
3815
|
+
ESLog.d(TAG$5, '#-------onESRouterLifecycleNewIntent-----实例对象为空------>>>>>');
|
3816
|
+
}
|
3782
3817
|
}
|
3783
|
-
}
|
3818
|
+
}catch (e){}
|
3784
3819
|
}
|
3785
3820
|
|
3786
3821
|
isFunction(func) {
|
@@ -3814,11 +3849,14 @@ var ESRouter = {
|
|
3814
3849
|
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
3815
3850
|
ESLog.d(TAG$4, '#-------onESRouterBackPressed----->>>>>');
|
3816
3851
|
}
|
3817
|
-
|
3818
|
-
|
3819
|
-
&& router.history.stack
|
3820
|
-
|
3821
|
-
|
3852
|
+
try{
|
3853
|
+
let router = this.$router;
|
3854
|
+
if (router && router.history && router.history.stack
|
3855
|
+
&& router.history.stack.length > 0) {
|
3856
|
+
let route = router.currentRoute;
|
3857
|
+
ESRouterKeyManager$1.dispatchBackPressed(route);
|
3858
|
+
}
|
3859
|
+
}catch (e){
|
3822
3860
|
}
|
3823
3861
|
},
|
3824
3862
|
//----------------------------按键-------------------------------
|
@@ -3826,11 +3864,14 @@ var ESRouter = {
|
|
3826
3864
|
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
3827
3865
|
ESLog.d(TAG$4, '#-------onESRouterDispatchKeyEvent----->>>>>' + keyEvent);
|
3828
3866
|
}
|
3829
|
-
|
3830
|
-
|
3831
|
-
&& router.history.stack
|
3832
|
-
|
3833
|
-
|
3867
|
+
try{
|
3868
|
+
let router = this.$router;
|
3869
|
+
if (router && router.history && router.history.stack
|
3870
|
+
&& router.history.stack.length > 0) {
|
3871
|
+
let route = router.currentRoute;
|
3872
|
+
ESRouterKeyManager$1.dispatchKeyEvent(route, keyEvent);
|
3873
|
+
}
|
3874
|
+
}catch (e){
|
3834
3875
|
}
|
3835
3876
|
},
|
3836
3877
|
|
@@ -3839,11 +3880,14 @@ var ESRouter = {
|
|
3839
3880
|
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
3840
3881
|
ESLog.d(TAG$4, '#-------onESRouterLifecycleChanged----->>>>>' + event);
|
3841
3882
|
}
|
3842
|
-
|
3843
|
-
|
3844
|
-
&& router.history.stack
|
3845
|
-
|
3846
|
-
|
3883
|
+
try{
|
3884
|
+
let router = this.$router;
|
3885
|
+
if (router && router.history && router.history.stack
|
3886
|
+
&& router.history.stack.length > 0) {
|
3887
|
+
let route = router.currentRoute;
|
3888
|
+
ESRouterLifecycleManager$1.onESRouterLifecycleChanged(route, event);
|
3889
|
+
}
|
3890
|
+
}catch (e){
|
3847
3891
|
}
|
3848
3892
|
},
|
3849
3893
|
|
@@ -3852,11 +3896,14 @@ var ESRouter = {
|
|
3852
3896
|
if (ESLog.isLoggable(ESLog.DEBUG)) {
|
3853
3897
|
ESLog.d(TAG$4, '#-------onESRouterLifecycleNewIntent----->>>>>' + intent);
|
3854
3898
|
}
|
3855
|
-
|
3856
|
-
|
3857
|
-
&& router.history.stack
|
3858
|
-
|
3859
|
-
|
3899
|
+
try{
|
3900
|
+
let router = this.$router;
|
3901
|
+
if (router && router.history && router.history.stack
|
3902
|
+
&& router.history.stack.length > 0) {
|
3903
|
+
let route = router.currentRoute;
|
3904
|
+
ESRouterLifecycleManager$1.onESRouterLifecycleNewIntent(route, intent.params, intent);
|
3905
|
+
}
|
3906
|
+
}catch (e){
|
3860
3907
|
}
|
3861
3908
|
}
|
3862
3909
|
},
|
@@ -4322,6 +4369,7 @@ class ES {
|
|
4322
4369
|
.then(() => ESNetworkManager$1.init())
|
4323
4370
|
.then(() => ESPluginManager$1.init())
|
4324
4371
|
.then(() => ESLaunchManager$1.init(configuration.router))
|
4372
|
+
.then(() => ESSharedDataManager$1.init())
|
4325
4373
|
.then(() => Promise.all([
|
4326
4374
|
ESUsbDeviceManager$1.init(),
|
4327
4375
|
ESStorageManager$1.init(),
|
@@ -4334,7 +4382,8 @@ class ES {
|
|
4334
4382
|
ESEventBus$1.init(),
|
4335
4383
|
ESBroadcastManager$1.init(),
|
4336
4384
|
ESLocalStorage$1.init(),
|
4337
|
-
AndroidVersions$1.init()
|
4385
|
+
AndroidVersions$1.init(),
|
4386
|
+
ESLocationManager$1.init()
|
4338
4387
|
]))
|
4339
4388
|
}
|
4340
4389
|
//
|
@@ -6243,13 +6292,20 @@ function ESSeekBarViewComponent() {
|
|
6243
6292
|
onSeekBarChange(evt) {
|
6244
6293
|
this.$emit('seek-change', evt);
|
6245
6294
|
},
|
6246
|
-
|
6295
|
+
onStartTrackingTouch(evt) {
|
6296
|
+
this.$emit('start-tracking-touch', evt);
|
6297
|
+
},
|
6298
|
+
onStopTrackingTouch(evt) {
|
6299
|
+
this.$emit('stop-tracking-touch', evt);
|
6300
|
+
},
|
6247
6301
|
},
|
6248
6302
|
|
6249
6303
|
render(h) {
|
6250
6304
|
const on = getEventRedirector.call(this, [
|
6251
6305
|
['focus', 'focusChange'],
|
6252
6306
|
['seek-change', 'seekBarChange'],
|
6307
|
+
['start-tracking-touch', 'onStartTrackingTouch'],
|
6308
|
+
['stop-tracking-touch', 'onStopTrackingTouch'],
|
6253
6309
|
]);
|
6254
6310
|
return h('TVSeekBarViewComponent',
|
6255
6311
|
{
|