@extscreen/es-core 10000.0.3 → 10000.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/dist/index.js +35 -21
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1776,20 +1776,27 @@ class ESLaunchManager {
1776
1776
  }
1777
1777
 
1778
1778
  isESRouterEnabled() {
1779
- return this._ESRouterEnabled;
1779
+ return this._ESRouterEnabled && this.isESRouterSupported();
1780
1780
  }
1781
1781
 
1782
1782
  isESRouterSupported() {
1783
1783
  return ESManager$1.getESSDKVersionCode() > 800;
1784
1784
  }
1785
1785
 
1786
- launchNativePage(paramsArray) {
1786
+ launchNativeApp(paramsArray) {
1787
1787
  ESModule$1.launchNativeApp(paramsArray);
1788
1788
  }
1789
1789
 
1790
+ launchNativePage(intent) {
1791
+ ESModule$1.launchESPage({
1792
+ args: intent
1793
+ });
1794
+ }
1795
+
1790
1796
  launchESPage(intent) {
1791
1797
  //
1792
- if (this.isESRouterEnabled() && this._ESRouter) {
1798
+ if (this.isESRouterEnabled() && this._ESRouter
1799
+ && this.isESRouterSupported()) {
1793
1800
  this._ESRouter.push({
1794
1801
  name: intent.url,
1795
1802
  params: intent.params,
@@ -1797,9 +1804,7 @@ class ESLaunchManager {
1797
1804
  }
1798
1805
  //
1799
1806
  else {
1800
- ESModule$1.launchESPage({
1801
- args: intent
1802
- });
1807
+ this.launchNativePage(intent);
1803
1808
  }
1804
1809
  }
1805
1810
 
@@ -2643,22 +2648,23 @@ var ESBackPressMixin = {
2643
2648
 
2644
2649
  mounted() {
2645
2650
  Vue.Native.callNative('DeviceEventModule', 'setListenBackPress', true);
2646
- ESApp.$on('hardwareBackPress', this.onAndroidBackPressed);
2651
+ if (!ESLaunchManager$1.isESRouterEnabled()) {
2652
+ ESApp.$on('hardwareBackPress', this.onESBackPressed);
2653
+ }
2647
2654
  },
2648
2655
  beforeDestroy() {
2649
- ESApp.$off('hardwareBackPress', this.onAndroidBackPressed);
2656
+ if (!ESLaunchManager$1.isESRouterEnabled()) {
2657
+ ESApp.$off('hardwareBackPress', this.onESBackPressed);
2658
+ }
2650
2659
  },
2651
2660
 
2652
2661
  methods: {
2653
- onAndroidBackPressed() {
2662
+ onESBackPressed() {
2654
2663
  this.onBackPressed();
2655
2664
  },
2656
2665
  onBackPressed() {
2657
2666
 
2658
2667
  },
2659
- invokeAndroidBackPress() {
2660
- Vue.Native.callNative('DeviceEventModule', 'invokeDefaultBackPressHandler');
2661
- }
2662
2668
  },
2663
2669
  };
2664
2670
 
@@ -2673,14 +2679,18 @@ const KEY_ACTION_UP = 1;
2673
2679
  var ESKeyEventMixin = {
2674
2680
 
2675
2681
  mounted() {
2676
- ESApp.$on('DispatchKeyEvent', this.onAndroidKeyEvent);
2682
+ if (!ESLaunchManager$1.isESRouterEnabled()) {
2683
+ ESApp.$on('DispatchKeyEvent', this.onDispatchKeyEvent);
2684
+ }
2677
2685
  },
2678
2686
  beforeDestroy() {
2679
- ESApp.$off('DispatchKeyEvent', this.onAndroidKeyEvent);
2687
+ if (!ESLaunchManager$1.isESRouterEnabled()) {
2688
+ ESApp.$off('DispatchKeyEvent', this.onDispatchKeyEvent);
2689
+ }
2680
2690
  },
2681
2691
 
2682
2692
  methods: {
2683
- onAndroidKeyEvent(keyEvent) {
2693
+ onDispatchKeyEvent(keyEvent) {
2684
2694
  if (keyEvent.action === KEY_ACTION_DOWN) {
2685
2695
  this.onKeyDown(keyEvent);
2686
2696
  }
@@ -2705,16 +2715,20 @@ var ESKeyEventMixin = {
2705
2715
  */
2706
2716
  var ESLifecycleMixin = {
2707
2717
  mounted() {
2708
- ESApp.$on('OnNewIntent', this.onActivityNewIntent);
2709
- ESApp.$on('LifecycleChange', this.onActivityLifecycle);
2718
+ if (!ESLaunchManager$1.isESRouterEnabled()) {
2719
+ ESApp.$on('OnNewIntent', this.onESLifecycleNewIntent);
2720
+ ESApp.$on('LifecycleChange', this.onESLifecycleChanged);
2721
+ }
2710
2722
  },
2711
2723
  beforeDestroy() {
2712
- ESApp.$off('OnNewIntent', this.onActivityNewIntent);
2713
- ESApp.$off('LifecycleChange', this.onActivityLifecycle);
2724
+ if (!ESLaunchManager$1.isESRouterEnabled()) {
2725
+ ESApp.$off('OnNewIntent', this.onESLifecycleNewIntent);
2726
+ ESApp.$off('LifecycleChange', this.onESLifecycleChanged);
2727
+ }
2714
2728
  },
2715
2729
 
2716
2730
  methods: {
2717
- onActivityLifecycle(event) {
2731
+ onESLifecycleChanged(event) {
2718
2732
  if (event === 'onResume') {
2719
2733
  this.onESResume();
2720
2734
  }
@@ -2731,7 +2745,7 @@ var ESLifecycleMixin = {
2731
2745
  this.onESDestroy();
2732
2746
  }
2733
2747
  },
2734
- onActivityNewIntent(intent) {
2748
+ onESLifecycleNewIntent(intent) {
2735
2749
  this.onESNewIntent(intent);
2736
2750
  },
2737
2751
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@extscreen/es-core",
3
- "version": "10000.0.3",
3
+ "version": "10000.0.4",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {