@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.
Files changed (2) hide show
  1. package/dist/index.js +182 -126
  2. 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
- let instance = this.getComponentInstance(route);
3597
- this.dispatchInstanceKeyEvent(instance, keyEvent);
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
- if (componentInstance) {
3602
- if (this.isFunction(componentInstance.onDispatchKeyEvent)) {
3603
- componentInstance.onDispatchKeyEvent(keyEvent);
3604
- }
3605
- //
3606
- else {
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 if (keyEvent && keyEvent.action === 1) {
3622
- if (this.isFunction(componentInstance.onKeyUp)) {
3623
- if (ESLog.isLoggable(ESLog.DEBUG)) {
3624
- ESLog.d(TAG$6, '#-------onKeyUp---success------>>>>>');
3625
- }
3626
- componentInstance.onKeyUp(keyEvent);
3627
- } else {
3628
- if (ESLog.isLoggable(ESLog.DEBUG)) {
3629
- ESLog.d(TAG$6, '#-------onKeyUp---error------>>>>>');
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
- } else {
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
- let instance = this.getComponentInstance(route);
3644
- this.dispatchInstanceBackPressed(instance);
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
- if (this.isFunction(componentInstance.onBackPressed)) {
3650
- if (ESLog.isLoggable(ESLog.DEBUG)) {
3651
- ESLog.d(TAG$6, '#-------onBackPressed---success------>>>>>');
3652
- }
3653
- componentInstance.onBackPressed();
3654
- } else {
3655
- if (ESLog.isLoggable(ESLog.DEBUG)) {
3656
- ESLog.d(TAG$6, '#-------onBackPressed---error------>>>>>');
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
- let componentInstance = this.getComponentInstance(route);
3707
- let lifecycleChanged = this.isFunction(componentInstance.onESLifecycleChanged);
3720
+ try {
3721
+ let componentInstance = this.getComponentInstance(route);
3722
+ let lifecycleChanged = this.isFunction(componentInstance.onESLifecycleChanged);
3708
3723
 
3709
- if (componentInstance) {
3710
- if (event === 'onCreate') {
3711
- route.lifecycle.state = ES_LIFECYCLE_ON_CREATE;
3712
- if (!lifecycleChanged) {
3713
- componentInstance.onESCreate();
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
- else if (event === 'onRestart') {
3718
- route.lifecycle.state = ES_LIFECYCLE_ON_RESTART;
3719
- if (!lifecycleChanged) {
3720
- componentInstance.onESRestart();
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
- else if (event === 'onStart') {
3725
- route.lifecycle.state = ES_LIFECYCLE_ON_START;
3726
- if (!lifecycleChanged) {
3727
- componentInstance.onESStart();
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
- else if (event === 'onResume') {
3732
- route.lifecycle.state = ES_LIFECYCLE_ON_RESUME;
3733
- if (!lifecycleChanged) {
3734
- componentInstance.onESResume();
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
- else if (event === 'onPause') {
3739
- route.lifecycle.state = ES_LIFECYCLE_ON_PAUSE;
3740
- if (!lifecycleChanged) {
3741
- componentInstance.onESPause();
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
- else if (event === 'onStop') {
3746
- route.lifecycle.state = ES_LIFECYCLE_ON_STOP;
3747
- if (!lifecycleChanged) {
3748
- componentInstance.onESStop();
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
- else if (event === 'onDestroy') {
3753
- route.lifecycle.state = ES_LIFECYCLE_ON_DESTROY;
3754
- if (!lifecycleChanged) {
3755
- componentInstance.onESDestroy();
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
- if (lifecycleChanged) {
3760
- componentInstance.onESLifecycleChanged(event);
3761
- }
3762
- } else {
3763
- if (ESLog.isLoggable(ESLog.DEBUG)) {
3764
- ESLog.d(TAG$5, '#-------onESRouterLifecycleChanged-----实例对象为空------>>>>>');
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
- let componentInstance = this.getComponentInstance(route);
3776
- let lifecycleChanged = this.isFunction(componentInstance.onESNewIntent);
3777
- if (componentInstance && lifecycleChanged) {
3778
- componentInstance.onESNewIntent(params, intent);
3779
- } else {
3780
- if (ESLog.isLoggable(ESLog.DEBUG)) {
3781
- ESLog.d(TAG$5, '#-------onESRouterLifecycleNewIntent-----实例对象为空------>>>>>');
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
- let router = this.$router;
3818
- if (router && router.history && router.history.stack
3819
- && router.history.stack.length > 0) {
3820
- let route = router.currentRoute;
3821
- ESRouterKeyManager$1.dispatchBackPressed(route);
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
- let router = this.$router;
3830
- if (router && router.history && router.history.stack
3831
- && router.history.stack.length > 0) {
3832
- let route = router.currentRoute;
3833
- ESRouterKeyManager$1.dispatchKeyEvent(route, keyEvent);
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
- let router = this.$router;
3843
- if (router && router.history && router.history.stack
3844
- && router.history.stack.length > 0) {
3845
- let route = router.currentRoute;
3846
- ESRouterLifecycleManager$1.onESRouterLifecycleChanged(route, event);
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
- let router = this.$router;
3856
- if (router && router.history && router.history.stack
3857
- && router.history.stack.length > 0) {
3858
- let route = router.currentRoute;
3859
- ESRouterLifecycleManager$1.onESRouterLifecycleNewIntent(route, intent.params, intent);
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
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@extscreen/es-core",
3
- "version": "2.3.26",
3
+ "version": "2.3.28",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {