@extscreen/es-core 2.2.48 → 2.2.52

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 +67 -43
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -200,7 +200,7 @@ var ESDeviceModule$1 = new ESDeviceModule();
200
200
  *
201
201
  */
202
202
 
203
- const TAG$8 = 'ESDeviceManager';
203
+ const TAG$9 = 'ESDeviceManager';
204
204
 
205
205
  class ESDeviceManager {
206
206
 
@@ -259,7 +259,7 @@ class ESDeviceManager {
259
259
  ESDeviceModule$1.getDevice().then(
260
260
  (device) => {
261
261
  if (ESLog.isLoggable(ESLog.DEBUG)) {
262
- ESLog.d(TAG$8, '#----------init---------->>>>>' + JSON.stringify(device));
262
+ ESLog.d(TAG$9, '#----------init---------->>>>>' + JSON.stringify(device));
263
263
  }
264
264
  this._device = device;
265
265
 
@@ -312,7 +312,7 @@ class ESDeviceManager {
312
312
  }
313
313
  } catch (e) {
314
314
  if (ESLog.isLoggable(ESLog.DEBUG)) {
315
- ESLog.d(TAG$8, '#----------init---解析--error----->>>>>' + e);
315
+ ESLog.d(TAG$9, '#----------init---解析--error----->>>>>' + e);
316
316
  }
317
317
  }
318
318
  resolve(device);
@@ -320,7 +320,7 @@ class ESDeviceManager {
320
320
  //
321
321
  error => {
322
322
  if (ESLog.isLoggable(ESLog.DEBUG)) {
323
- ESLog.d(TAG$8, '#----------init-----error----->>>>>' + error);
323
+ ESLog.d(TAG$9, '#----------init-----error----->>>>>' + error);
324
324
  }
325
325
  resolve(error);
326
326
  }
@@ -822,7 +822,7 @@ var ESAudioModule$1 = new ESAudioModule();
822
822
  *
823
823
  */
824
824
 
825
- const TAG$7 = 'ESAudioManager';
825
+ const TAG$8 = 'ESAudioManager';
826
826
 
827
827
  class ESAudioManager {
828
828
 
@@ -848,7 +848,7 @@ class ESAudioManager {
848
848
  initPromise() {
849
849
  return new Promise((resolve, reject) => {
850
850
  if (ESLog.isLoggable(ESLog.DEBUG)) {
851
- ESLog.d(TAG$7, '------------init----start----->>>>');
851
+ ESLog.d(TAG$8, '------------init----start----->>>>');
852
852
  }
853
853
  this.getStreamSystemMaxVolume();
854
854
  this.getStreamSystemVolume();
@@ -863,7 +863,7 @@ class ESAudioManager {
863
863
  ESAudioModule$1.getStreamVoiceCallMaxVolume()
864
864
  .then((volume) => {
865
865
  if (ESLog.isLoggable(ESLog.DEBUG)) {
866
- ESLog.d(TAG$7, '-----getStreamVoiceCallMaxVolume--->>>>' + volume);
866
+ ESLog.d(TAG$8, '-----getStreamVoiceCallMaxVolume--->>>>' + volume);
867
867
  }
868
868
  this._voiceCallMaxVolume = volume;
869
869
  });
@@ -877,7 +877,7 @@ class ESAudioManager {
877
877
  ESAudioModule$1.getStreamVoiceCallVolume()
878
878
  .then((volume) => {
879
879
  if (ESLog.isLoggable(ESLog.DEBUG)) {
880
- ESLog.d(TAG$7, '-----getStreamVoiceCallVolume--->>>>' + volume);
880
+ ESLog.d(TAG$8, '-----getStreamVoiceCallVolume--->>>>' + volume);
881
881
  }
882
882
  this._voiceCallVolume = volume;
883
883
  });
@@ -892,7 +892,7 @@ class ESAudioManager {
892
892
  ESAudioModule$1.getStreamSystemMaxVolume()
893
893
  .then((volume) => {
894
894
  if (ESLog.isLoggable(ESLog.DEBUG)) {
895
- ESLog.d(TAG$7, '-----getStreamSystemMaxVolume--->>>>' + volume);
895
+ ESLog.d(TAG$8, '-----getStreamSystemMaxVolume--->>>>' + volume);
896
896
  }
897
897
  this._systemMaxVolume = volume;
898
898
  });
@@ -906,7 +906,7 @@ class ESAudioManager {
906
906
  ESAudioModule$1.getStreamSystemVolume()
907
907
  .then((volume) => {
908
908
  if (ESLog.isLoggable(ESLog.DEBUG)) {
909
- ESLog.d(TAG$7, '-----getStreamSystemVolume--->>>>' + volume);
909
+ ESLog.d(TAG$8, '-----getStreamSystemVolume--->>>>' + volume);
910
910
  }
911
911
  this._systemVolume = volume;
912
912
  });
@@ -921,7 +921,7 @@ class ESAudioManager {
921
921
  ESAudioModule$1.getStreamRingMaxVolume()
922
922
  .then((volume) => {
923
923
  if (ESLog.isLoggable(ESLog.DEBUG)) {
924
- ESLog.d(TAG$7, '-----getStreamRingMaxVolume--->>>>' + volume);
924
+ ESLog.d(TAG$8, '-----getStreamRingMaxVolume--->>>>' + volume);
925
925
  }
926
926
  this._ringMaxVolume = volume;
927
927
  });
@@ -935,7 +935,7 @@ class ESAudioManager {
935
935
  ESAudioModule$1.getStreamRingVolume()
936
936
  .then((volume) => {
937
937
  if (ESLog.isLoggable(ESLog.DEBUG)) {
938
- ESLog.d(TAG$7, '-----getStreamRingVolume--->>>>' + volume);
938
+ ESLog.d(TAG$8, '-----getStreamRingVolume--->>>>' + volume);
939
939
  }
940
940
  this._ringVolume = volume;
941
941
  });
@@ -950,7 +950,7 @@ class ESAudioManager {
950
950
  ESAudioModule$1.getStreamMusicMaxVolume()
951
951
  .then((volume) => {
952
952
  if (ESLog.isLoggable(ESLog.DEBUG)) {
953
- ESLog.d(TAG$7, '-----getStreamMusicMaxVolume--->>>>' + volume);
953
+ ESLog.d(TAG$8, '-----getStreamMusicMaxVolume--->>>>' + volume);
954
954
  }
955
955
  this._musicMaxVolume = volume;
956
956
  });
@@ -964,7 +964,7 @@ class ESAudioManager {
964
964
  ESAudioModule$1.getStreamMusicVolume()
965
965
  .then((volume) => {
966
966
  if (ESLog.isLoggable(ESLog.DEBUG)) {
967
- ESLog.d(TAG$7, '-----getStreamMusicVolume--->>>>' + volume);
967
+ ESLog.d(TAG$8, '-----getStreamMusicVolume--->>>>' + volume);
968
968
  }
969
969
  this._musicVolume = volume;
970
970
  });
@@ -979,7 +979,7 @@ class ESAudioManager {
979
979
  ESAudioModule$1.getStreamAlarmMaxVolume()
980
980
  .then((volume) => {
981
981
  if (ESLog.isLoggable(ESLog.DEBUG)) {
982
- ESLog.d(TAG$7, '-----getStreamAlarmMaxVolume--->>>>' + volume);
982
+ ESLog.d(TAG$8, '-----getStreamAlarmMaxVolume--->>>>' + volume);
983
983
  }
984
984
  this._alarmMaxVolume = volume;
985
985
  });
@@ -993,7 +993,7 @@ class ESAudioManager {
993
993
  ESAudioModule$1.getStreamAlarmVolume()
994
994
  .then((volume) => {
995
995
  if (ESLog.isLoggable(ESLog.DEBUG)) {
996
- ESLog.d(TAG$7, '-----getStreamAlarmVolume--->>>>' + volume);
996
+ ESLog.d(TAG$8, '-----getStreamAlarmVolume--->>>>' + volume);
997
997
  }
998
998
  this._alarmVolume = volume;
999
999
  });
@@ -1008,7 +1008,7 @@ class ESAudioManager {
1008
1008
  ESAudioModule$1.getStreamMaxVolume(streamType)
1009
1009
  .then((volume) => {
1010
1010
  if (ESLog.isLoggable(ESLog.DEBUG)) {
1011
- ESLog.d(TAG$7, streamType + '-----getStreamMaxVolume--->>>>' + volume);
1011
+ ESLog.d(TAG$8, streamType + '-----getStreamMaxVolume--->>>>' + volume);
1012
1012
  }
1013
1013
  });
1014
1014
  }
@@ -1017,7 +1017,7 @@ class ESAudioManager {
1017
1017
  ESAudioModule$1.getStreamVolume(streamType)
1018
1018
  .then((volume) => {
1019
1019
  if (ESLog.isLoggable(ESLog.DEBUG)) {
1020
- ESLog.d(TAG$7, streamType + '-----getStreamVolume--->>>>' + volume);
1020
+ ESLog.d(TAG$8, streamType + '-----getStreamVolume--->>>>' + volume);
1021
1021
  }
1022
1022
  });
1023
1023
  }
@@ -2560,6 +2560,19 @@ class ESLaunchManager {
2560
2560
  ESModule$1.finish();
2561
2561
  }
2562
2562
  }
2563
+
2564
+ /**
2565
+ * 获取当前页面的路由
2566
+ */
2567
+ getCurrentESPage() {
2568
+ if (this._ESRouter && this._ESRouter.currentRoute) {
2569
+ return {
2570
+ url: this._ESRouter.currentRoute.name,
2571
+ params: this._ESRouter.currentRoute.params,
2572
+ };
2573
+ }
2574
+ return null;
2575
+ }
2563
2576
  }
2564
2577
 
2565
2578
  var ESLaunchManager$1 = new ESLaunchManager();
@@ -2639,7 +2652,7 @@ class ESBroadcastManager {
2639
2652
 
2640
2653
  var ESBroadcastManager$1 = new ESBroadcastManager();
2641
2654
 
2642
- const TAG$6 = "ESBroadcast";
2655
+ const TAG$7 = "ESBroadcast";
2643
2656
 
2644
2657
  var ESBroadcast = {
2645
2658
  mounted() {
@@ -2666,25 +2679,25 @@ var ESBroadcast = {
2666
2679
  if (this.broadcastReceiverSet) {
2667
2680
  this.broadcastReceiverSet.forEach(function (value, key) {
2668
2681
  if (ESLog.isLoggable(ESLog.DEBUG)) {
2669
- ESLog.d(TAG$6, key + '#-------TraceAction--->>>>>' + value);
2682
+ ESLog.d(TAG$7, key + '#-------TraceAction--->>>>>' + value);
2670
2683
  }
2671
2684
  });
2672
2685
  }
2673
2686
  },
2674
2687
  __onBroadcastReceive(intent) {
2675
2688
  if (ESLog.isLoggable(ESLog.DEBUG)) {
2676
- ESLog.d(TAG$6, '#-------onBroadcastReceive----->>>>>' + JSON.stringify(intent));
2689
+ ESLog.d(TAG$7, '#-------onBroadcastReceive----->>>>>' + JSON.stringify(intent));
2677
2690
  }
2678
2691
  if (!this.broadcastReceiverSet || this.broadcastReceiverSet.size <= 0) {
2679
2692
  if (ESLog.isLoggable(ESLog.DEBUG)) {
2680
- ESLog.d(TAG$6, '#-------onBroadcastReceive---broadcastReceiverSet为空-->>>>>');
2693
+ ESLog.d(TAG$7, '#-------onBroadcastReceive---broadcastReceiverSet为空-->>>>>');
2681
2694
  }
2682
2695
  return;
2683
2696
  }
2684
2697
  //
2685
2698
  else {
2686
2699
  if (ESLog.isLoggable(ESLog.DEBUG)) {
2687
- ESLog.d(TAG$6, '#-------onBroadcastReceive---broadcastReceiverSet不为空-->>>>>');
2700
+ ESLog.d(TAG$7, '#-------onBroadcastReceive---broadcastReceiverSet不为空-->>>>>');
2688
2701
  }
2689
2702
  }
2690
2703
  let action = intent.action;
@@ -2703,7 +2716,7 @@ var ESBroadcast = {
2703
2716
 
2704
2717
  if (!enable) {
2705
2718
  if (ESLog.isLoggable(ESLog.DEBUG)) {
2706
- ESLog.d(TAG$6, '#-------onBroadcastReceive---disable-->>>>>');
2719
+ ESLog.d(TAG$7, '#-------onBroadcastReceive---disable-->>>>>');
2707
2720
  }
2708
2721
  return;
2709
2722
  }
@@ -2716,7 +2729,7 @@ var ESBroadcast = {
2716
2729
  },
2717
2730
  };
2718
2731
 
2719
- const TAG$5 = "ESRouter";
2732
+ const TAG$6 = "ESRouter";
2720
2733
 
2721
2734
  /**
2722
2735
  * router按键管理
@@ -2746,12 +2759,12 @@ class ESRouterKeyManager {
2746
2759
  if (keyEvent && keyEvent.action === 0) {
2747
2760
  if (this.isFunction(componentInstance.onKeyDown)) {
2748
2761
  if (ESLog.isLoggable(ESLog.DEBUG)) {
2749
- ESLog.d(TAG$5, '#-------onKeyDown---success------>>>>>');
2762
+ ESLog.d(TAG$6, '#-------onKeyDown---success------>>>>>');
2750
2763
  }
2751
2764
  componentInstance.onKeyDown(keyEvent);
2752
2765
  } else {
2753
2766
  if (ESLog.isLoggable(ESLog.DEBUG)) {
2754
- ESLog.d(TAG$5, '#-------onKeyDown---error------>>>>>');
2767
+ ESLog.d(TAG$6, '#-------onKeyDown---error------>>>>>');
2755
2768
  }
2756
2769
  }
2757
2770
  }
@@ -2759,19 +2772,19 @@ class ESRouterKeyManager {
2759
2772
  else if (keyEvent && keyEvent.action === 1) {
2760
2773
  if (this.isFunction(componentInstance.onKeyUp)) {
2761
2774
  if (ESLog.isLoggable(ESLog.DEBUG)) {
2762
- ESLog.d(TAG$5, '#-------onKeyUp---success------>>>>>');
2775
+ ESLog.d(TAG$6, '#-------onKeyUp---success------>>>>>');
2763
2776
  }
2764
2777
  componentInstance.onKeyUp(keyEvent);
2765
2778
  } else {
2766
2779
  if (ESLog.isLoggable(ESLog.DEBUG)) {
2767
- ESLog.d(TAG$5, '#-------onKeyUp---error------>>>>>');
2780
+ ESLog.d(TAG$6, '#-------onKeyUp---error------>>>>>');
2768
2781
  }
2769
2782
  }
2770
2783
  }
2771
2784
  }
2772
2785
  } else {
2773
2786
  if (ESLog.isLoggable(ESLog.DEBUG)) {
2774
- ESLog.d(TAG$5, '#-------dispatchInstanceKeyEvent-----实例对象为空------>>>>>');
2787
+ ESLog.d(TAG$6, '#-------dispatchInstanceKeyEvent-----实例对象为空------>>>>>');
2775
2788
  }
2776
2789
  }
2777
2790
  }
@@ -2786,17 +2799,17 @@ class ESRouterKeyManager {
2786
2799
  if (componentInstance) {
2787
2800
  if (this.isFunction(componentInstance.onBackPressed)) {
2788
2801
  if (ESLog.isLoggable(ESLog.DEBUG)) {
2789
- ESLog.d(TAG$5, '#-------onBackPressed---success------>>>>>');
2802
+ ESLog.d(TAG$6, '#-------onBackPressed---success------>>>>>');
2790
2803
  }
2791
2804
  componentInstance.onBackPressed();
2792
2805
  } else {
2793
2806
  if (ESLog.isLoggable(ESLog.DEBUG)) {
2794
- ESLog.d(TAG$5, '#-------onBackPressed---error------>>>>>');
2807
+ ESLog.d(TAG$6, '#-------onBackPressed---error------>>>>>');
2795
2808
  }
2796
2809
  }
2797
2810
  } else {
2798
2811
  if (ESLog.isLoggable(ESLog.DEBUG)) {
2799
- ESLog.d(TAG$5, '#-------dispatchInstanceBackPressed-----实例对象为空------>>>>>');
2812
+ ESLog.d(TAG$6, '#-------dispatchInstanceBackPressed-----实例对象为空------>>>>>');
2800
2813
  }
2801
2814
  }
2802
2815
  }
@@ -2821,7 +2834,7 @@ const ES_LIFECYCLE_ON_STOP = 7;
2821
2834
  const ES_LIFECYCLE_ON_SAVE_INSTANCE_SATE = 8;
2822
2835
  const ES_LIFECYCLE_ON_DESTROY = 9;
2823
2836
 
2824
- const TAG$4 = "ESRouter";
2837
+ const TAG$5 = "ESRouter";
2825
2838
 
2826
2839
  /**
2827
2840
  * router生命周期管理
@@ -2899,7 +2912,7 @@ class ESRouterLifecycleManager {
2899
2912
  }
2900
2913
  } else {
2901
2914
  if (ESLog.isLoggable(ESLog.DEBUG)) {
2902
- ESLog.d(TAG$4, '#-------onESRouterLifecycleChanged-----实例对象为空------>>>>>');
2915
+ ESLog.d(TAG$5, '#-------onESRouterLifecycleChanged-----实例对象为空------>>>>>');
2903
2916
  }
2904
2917
  }
2905
2918
  }
@@ -2916,7 +2929,7 @@ class ESRouterLifecycleManager {
2916
2929
  componentInstance.onESNewIntent(params);
2917
2930
  } else {
2918
2931
  if (ESLog.isLoggable(ESLog.DEBUG)) {
2919
- ESLog.d(TAG$4, '#-------onESRouterLifecycleNewIntent-----实例对象为空------>>>>>');
2932
+ ESLog.d(TAG$5, '#-------onESRouterLifecycleNewIntent-----实例对象为空------>>>>>');
2920
2933
  }
2921
2934
  }
2922
2935
  }
@@ -2928,7 +2941,7 @@ class ESRouterLifecycleManager {
2928
2941
 
2929
2942
  var ESRouterLifecycleManager$1 = new ESRouterLifecycleManager();
2930
2943
 
2931
- const TAG$3 = "ESRouter";
2944
+ const TAG$4 = "ESRouter";
2932
2945
 
2933
2946
  var ESRouter = {
2934
2947
 
@@ -2950,7 +2963,7 @@ var ESRouter = {
2950
2963
  //---------------------------返回键--------------------------------
2951
2964
  onESRouterBackPressed() {
2952
2965
  if (ESLog.isLoggable(ESLog.DEBUG)) {
2953
- ESLog.d(TAG$3, '#-------onESRouterBackPressed----->>>>>');
2966
+ ESLog.d(TAG$4, '#-------onESRouterBackPressed----->>>>>');
2954
2967
  }
2955
2968
  let router = this.$router;
2956
2969
  if (router) {
@@ -2961,7 +2974,7 @@ var ESRouter = {
2961
2974
  //----------------------------按键-------------------------------
2962
2975
  onESRouterDispatchKeyEvent(keyEvent) {
2963
2976
  if (ESLog.isLoggable(ESLog.DEBUG)) {
2964
- ESLog.d(TAG$3, '#-------onESRouterDispatchKeyEvent----->>>>>' + keyEvent);
2977
+ ESLog.d(TAG$4, '#-------onESRouterDispatchKeyEvent----->>>>>' + keyEvent);
2965
2978
  }
2966
2979
  let router = this.$router;
2967
2980
  if (router) {
@@ -2973,7 +2986,7 @@ var ESRouter = {
2973
2986
  //---------------------------生命周期--------------------------------
2974
2987
  onESRouterLifecycleChanged(event) {
2975
2988
  if (ESLog.isLoggable(ESLog.DEBUG)) {
2976
- ESLog.d(TAG$3, '#-------onESRouterLifecycleChanged----->>>>>' + event);
2989
+ ESLog.d(TAG$4, '#-------onESRouterLifecycleChanged----->>>>>' + event);
2977
2990
  }
2978
2991
  let router = this.$router;
2979
2992
  if (router) {
@@ -2985,7 +2998,7 @@ var ESRouter = {
2985
2998
  //---------------------------onNewIntent--------------------------------
2986
2999
  onESRouterLifecycleNewIntent(intent) {
2987
3000
  if (ESLog.isLoggable(ESLog.DEBUG)) {
2988
- ESLog.d(TAG$3, '#-------onESRouterLifecycleNewIntent----->>>>>' + intent);
3001
+ ESLog.d(TAG$4, '#-------onESRouterLifecycleNewIntent----->>>>>' + intent);
2989
3002
  }
2990
3003
  let router = this.$router;
2991
3004
  if (router) {
@@ -3342,13 +3355,24 @@ class ES {
3342
3355
 
3343
3356
  var ES$1 = new ES();
3344
3357
 
3358
+ const TAG$3 = "ESPlugin";
3359
+
3345
3360
  var ESPlugin = {
3346
3361
  mounted() {
3347
- ESApp.$on('onESPluginStateChanged', this.onESPluginStateChanged);
3362
+ this.onESEventPlugin();
3348
3363
  },
3349
3364
 
3350
3365
  methods: {
3366
+ onESEventPlugin() {
3367
+ ESApp.$on('onESPluginStateChanged', this.onESPluginStateChanged);
3368
+ },
3369
+ offESEventPlugin() {
3370
+ ESApp.$off('onESPluginStateChanged', this.onESPluginStateChanged);
3371
+ },
3351
3372
  onESPluginStateChanged(status) {
3373
+ if (ESLog.isLoggable(ESLog.DEBUG)) {
3374
+ ESLog.d(TAG$3, "--------onESPluginStateChanged------>>>>>" + JSON.stringify(status));
3375
+ }
3352
3376
  if (status.success) {
3353
3377
  if (status.status === 1002) {
3354
3378
  this.onESPluginInstallProgress(status.pkg, status.status, status.current, status.total);
@@ -3370,7 +3394,7 @@ var ESPlugin = {
3370
3394
  },
3371
3395
 
3372
3396
  beforeDestroy() {
3373
- ESApp.$off('onESPluginStateChanged', this.onESPluginStateChanged);
3397
+ this.offESEventPlugin();
3374
3398
  },
3375
3399
  };
3376
3400
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@extscreen/es-core",
3
- "version": "2.2.48",
3
+ "version": "2.2.52",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {