@94ai/nf-microphone 6.1.30 → 8.0.1

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.
@@ -15423,6 +15423,18 @@ __sfc_main.props = {
15423
15423
  required: false,
15424
15424
  type: String
15425
15425
  },
15426
+ timestamp: {
15427
+ key: "timestamp",
15428
+ required: false,
15429
+ type: [String, Number],
15430
+ default: void 0
15431
+ },
15432
+ sign: {
15433
+ key: "sign",
15434
+ required: false,
15435
+ type: String,
15436
+ default: void 0
15437
+ },
15426
15438
  extStatus: {
15427
15439
  key: "extStatus",
15428
15440
  required: false,
@@ -15564,7 +15576,8 @@ __sfc_main.props = {
15564
15576
  sgGateway: {
15565
15577
  key: "sgGateway",
15566
15578
  required: false,
15567
- type: String
15579
+ type: String,
15580
+ default: void 0
15568
15581
  },
15569
15582
  open: {
15570
15583
  key: "open",
@@ -15576,17 +15589,19 @@ __sfc_main.props = {
15576
15589
  key: "sgOpen",
15577
15590
  required: false,
15578
15591
  type: String,
15579
- default: "1"
15592
+ default: void 0
15580
15593
  },
15581
15594
  sgDomain: {
15582
15595
  key: "sgDomain",
15583
15596
  required: false,
15584
- type: String
15597
+ type: String,
15598
+ default: void 0
15585
15599
  },
15586
15600
  sgBase: {
15587
15601
  key: "sgBase",
15588
15602
  required: false,
15589
- type: String
15603
+ type: String,
15604
+ default: void 0
15590
15605
  },
15591
15606
  token: {
15592
15607
  key: "token",
@@ -15775,31 +15790,55 @@ __sfc_main.setup = (__props, __ctx) => {
15775
15790
  return props.isOem;
15776
15791
  }
15777
15792
  getSoftPhoneShowCall() {
15778
- return props.callShow;
15793
+ if (props.callShow === "0") {
15794
+ return false;
15795
+ }
15796
+ return true;
15779
15797
  }
15780
15798
  getSoftPhoneShowTransferToLabor() {
15781
- return props.transferToLaborShow;
15799
+ if (props.transferToLaborShow === "0") {
15800
+ return false;
15801
+ }
15802
+ return true;
15782
15803
  }
15783
15804
  getSoftPhoneShowRest() {
15784
- return props.restShow;
15805
+ if (props.restShow === "0") {
15806
+ return false;
15807
+ }
15808
+ return true;
15785
15809
  }
15786
15810
  getSoftPhoneShowNetworkDetect() {
15787
- return props.networkDetectShow;
15811
+ if (props.networkDetectShow === "0") {
15812
+ return false;
15813
+ }
15814
+ return true;
15788
15815
  }
15789
15816
  getSoftPhoneShowMute() {
15790
- return props.muteShow;
15817
+ if (props.muteShow === "0") {
15818
+ return false;
15819
+ }
15820
+ return true;
15791
15821
  }
15792
15822
  /**
15793
15823
  * 是否展示对话记录功能
15794
15824
  */
15795
15825
  getSoftPhoneShowLog() {
15796
- return props.logShow;
15826
+ if (props.logShow === "0") {
15827
+ return false;
15828
+ }
15829
+ return true;
15797
15830
  }
15798
15831
  getSoftPhoneShowTiming() {
15799
- return props.timingShow;
15832
+ if (props.timingShow === "0") {
15833
+ return false;
15834
+ }
15835
+ return true;
15800
15836
  }
15801
15837
  getSoftPhoneShowSign() {
15802
- return props.signShow;
15838
+ if (props.signShow === "0") {
15839
+ return false;
15840
+ }
15841
+ return true;
15803
15842
  }
15804
15843
  /**
15805
15844
  * 使用按键拨号
@@ -15831,62 +15870,6 @@ __sfc_main.setup = (__props, __ctx) => {
15831
15870
  return 3;
15832
15871
  }
15833
15872
  }
15834
- class SoftphoneNotity {
15835
- constructor() {
15836
- this.communicationList = {
15837
- "softphone-connect-registered": (data) => {
15838
- emit("softphone-connect-registered", data);
15839
- },
15840
- "softphone-session-state-change": (data) => {
15841
- emit("softphone-session-state-change", data);
15842
- },
15843
- "softphone-call-refresh": (data) => {
15844
- emit("softphone-call-refresh", data);
15845
- },
15846
- "softphone-connect": (data) => {
15847
- emit("softphone-connect", data);
15848
- },
15849
- "softphone-accept": (data) => {
15850
- emit("softphone-accept", data);
15851
- },
15852
- "softphone-seats-status-change": (data) => {
15853
- emit("softphone-seats-status-change", data);
15854
- },
15855
- "softphone-ignore": (data) => {
15856
- emit("softphone-ignore", data);
15857
- },
15858
- "softphone-hangup": (data) => {
15859
- emit("softphone-hangup", data);
15860
- },
15861
- "softphone-incoming": (data) => {
15862
- emit("softphone-incoming", data);
15863
- },
15864
- "softphone-send-dtmf": (data) => {
15865
- emit("softphone-send-dtmf", data);
15866
- }
15867
- };
15868
- this.useQinkunSoftphoneNotity = (state) => {
15869
- var _a, _b;
15870
- if (state.ancestorOrigin === props.ancestorOrigin && state.origin !== props.ancestorOrigin || state.ancestorOrigin === props.origin && state.origin === props.origin) {
15871
- if (state.destinationOrigin === "*" || state.destinationOrigin === props.destinationOrigin) {
15872
- (_b = (_a = this.communicationList)[state.type]) == null ? void 0 : _b.call(_a, state.data);
15873
- }
15874
- }
15875
- };
15876
- }
15877
- useWujieSoftphoneNotity() {
15878
- Object.keys(this.communicationList).forEach((key) => {
15879
- bus.$on(key, (state) => {
15880
- var _a, _b;
15881
- if (state.ancestorOrigin === props.ancestorOrigin && state.origin !== props.ancestorOrigin || state.ancestorOrigin === props.origin && state.origin === props.origin) {
15882
- if (state.destinationOrigin === "*" || state.destinationOrigin === props.destinationOrigin) {
15883
- (_b = (_a = this.communicationList)[key]) == null ? void 0 : _b.call(_a, state.data);
15884
- }
15885
- }
15886
- });
15887
- });
15888
- }
15889
- }
15890
15873
  class MicroManager {
15891
15874
  constructor() {
15892
15875
  __privateAdd(this, _qiankunActions, void 0);
@@ -15898,15 +15881,15 @@ __sfc_main.setup = (__props, __ctx) => {
15898
15881
  getWejieActions() {
15899
15882
  return bus;
15900
15883
  }
15901
- microCommunicat(type, status) {
15884
+ microCommunicat(type, data = {}, operationType = "manual", ancestorOrigin = props.ancestorOrigin, destinationOrigin = props.destinationOrigin) {
15902
15885
  const state = {
15903
15886
  origin: "nf-softphone",
15904
- ancestorOrigin: props.ancestorOrigin,
15905
- destinationOrigin: props.destinationOrigin,
15887
+ ancestorOrigin: ancestorOrigin || props.ancestorOrigin,
15888
+ destinationOrigin: destinationOrigin || props.destinationOrigin,
15906
15889
  type,
15907
15890
  data: {
15908
- status,
15909
- type: "manual"
15891
+ ...data,
15892
+ type: operationType
15910
15893
  }
15911
15894
  };
15912
15895
  if (this.mode === "qiankun") {
@@ -15915,15 +15898,24 @@ __sfc_main.setup = (__props, __ctx) => {
15915
15898
  this.getWejieActions().$emit("ai-softphone", state);
15916
15899
  }
15917
15900
  }
15901
+ signOverdued(data) {
15902
+ this.microCommunicat("softphone-sign-overdued", data, "auto", props.ancestorOrigin, "ai-softphone");
15903
+ }
15918
15904
  // 签入
15919
15905
  connect() {
15920
- this.microCommunicat("softphone-connect", true);
15906
+ this.microCommunicat("softphone-connect", {
15907
+ status: true
15908
+ });
15921
15909
  }
15922
15910
  disconnect() {
15923
- this.microCommunicat("softphone-connect", false);
15911
+ this.microCommunicat("softphone-connect", {
15912
+ status: false
15913
+ });
15924
15914
  }
15925
15915
  seatsStatusChange(status) {
15926
- this.microCommunicat("softphone-connect", status);
15916
+ this.microCommunicat("softphone-connect", {
15917
+ status
15918
+ });
15927
15919
  }
15928
15920
  accept() {
15929
15921
  this.microCommunicat("softphone-connect");
@@ -16018,8 +16010,7 @@ __sfc_main.setup = (__props, __ctx) => {
16018
16010
  loadQiankunMicroApps() {
16019
16011
  const appConfig = this.getMicroAppConfig()[0];
16020
16012
  appConfig.props.shared.getUserInfo = getUserInfo;
16021
- appConfig.props.shared.setUserInfo = () => {
16022
- };
16013
+ appConfig.props.shared.setUserInfo = setUserInfo;
16023
16014
  this.initState();
16024
16015
  this.app = loadMicroApp(appConfig, {
16025
16016
  sandbox: {
@@ -16044,8 +16035,7 @@ __sfc_main.setup = (__props, __ctx) => {
16044
16035
  const appConfig = this.getMicroAppConfig()[0];
16045
16036
  const url = appConfig.entry;
16046
16037
  appConfig.props.shared.getUserInfo = getUserInfo;
16047
- appConfig.props.shared.setUserInfo = () => {
16048
- };
16038
+ appConfig.props.shared.setUserInfo = setUserInfo;
16049
16039
  setupApp({
16050
16040
  name: props.name,
16051
16041
  plugins: [{
@@ -16086,8 +16076,7 @@ __sfc_main.setup = (__props, __ctx) => {
16086
16076
  registerQiankunMicroApps() {
16087
16077
  const appConfig = this.getMicroAppConfig()[0];
16088
16078
  appConfig.props.shared.getUserInfo = getUserInfo;
16089
- appConfig.props.shared.setUserInfo = () => {
16090
- };
16079
+ appConfig.props.shared.setUserInfo = setUserInfo;
16091
16080
  registerMicroApps([appConfig], {
16092
16081
  // qiankun 生命周期钩子 - 加载前
16093
16082
  beforeLoad: [(app) => {
@@ -16131,6 +16120,75 @@ __sfc_main.setup = (__props, __ctx) => {
16131
16120
  }
16132
16121
  _qiankunActions = new WeakMap();
16133
16122
  const nfMicrophoneInstance = new MicroManager();
16123
+ class SoftphoneNotity {
16124
+ constructor() {
16125
+ this.communicationList = {
16126
+ "softphone-connect-registered": (data) => {
16127
+ emit("softphone-connect-registered", data);
16128
+ },
16129
+ "softphone-session-state-change": (data) => {
16130
+ emit("softphone-session-state-change", data);
16131
+ },
16132
+ "softphone-call-refresh": (data) => {
16133
+ emit("softphone-call-refresh", data);
16134
+ },
16135
+ "softphone-connect": (data) => {
16136
+ emit("softphone-connect", data);
16137
+ },
16138
+ "softphone-accept": (data) => {
16139
+ emit("softphone-accept", data);
16140
+ },
16141
+ "softphone-seats-status-change": (data) => {
16142
+ emit("softphone-seats-status-change", data);
16143
+ },
16144
+ "softphone-ignore": (data) => {
16145
+ emit("softphone-ignore", data);
16146
+ },
16147
+ "softphone-hangup": (data) => {
16148
+ emit("softphone-hangup", data);
16149
+ },
16150
+ "softphone-incoming": (data) => {
16151
+ emit("softphone-incoming", data);
16152
+ },
16153
+ "softphone-send-dtmf": (data) => {
16154
+ emit("softphone-send-dtmf", data);
16155
+ },
16156
+ "softphone-sign-overdued": (data) => {
16157
+ const done = (data2) => {
16158
+ const {
16159
+ sign,
16160
+ timestamp
16161
+ } = data2;
16162
+ nfMicrophoneInstance.signOverdued({
16163
+ sign,
16164
+ timestamp
16165
+ });
16166
+ };
16167
+ emit("softphone-sign-overdued", done);
16168
+ }
16169
+ };
16170
+ this.useQinkunSoftphoneNotity = (state) => {
16171
+ var _a, _b;
16172
+ if (state.ancestorOrigin === props.ancestorOrigin && state.origin !== props.ancestorOrigin || state.ancestorOrigin === props.origin && state.origin === props.origin) {
16173
+ if (state.destinationOrigin === "*" || state.destinationOrigin === props.destinationOrigin) {
16174
+ (_b = (_a = this.communicationList)[state.type]) == null ? void 0 : _b.call(_a, state.data);
16175
+ }
16176
+ }
16177
+ };
16178
+ }
16179
+ useWujieSoftphoneNotity() {
16180
+ Object.keys(this.communicationList).forEach((key) => {
16181
+ bus.$on(key, (state) => {
16182
+ var _a, _b;
16183
+ if (state.ancestorOrigin === props.ancestorOrigin && state.origin !== props.ancestorOrigin || state.ancestorOrigin === props.origin && state.origin === props.origin) {
16184
+ if (state.destinationOrigin === "*" || state.destinationOrigin === props.destinationOrigin) {
16185
+ (_b = (_a = this.communicationList)[key]) == null ? void 0 : _b.call(_a, state.data);
16186
+ }
16187
+ }
16188
+ });
16189
+ });
16190
+ }
16191
+ }
16134
16192
  const getUserInfo = () => {
16135
16193
  const {
16136
16194
  agentId,
@@ -16185,13 +16243,17 @@ __sfc_main.setup = (__props, __ctx) => {
16185
16243
  authUserType,
16186
16244
  userType,
16187
16245
  recordPath,
16188
- constMap
16246
+ constMap,
16247
+ timestamp,
16248
+ sign
16189
16249
  } = props;
16190
16250
  return {
16191
16251
  agentId,
16192
16252
  agentTag,
16193
16253
  appKey,
16194
16254
  appSecret,
16255
+ timestamp,
16256
+ sign,
16195
16257
  extStatus,
16196
16258
  origin,
16197
16259
  ancestorOrigin,
@@ -16244,6 +16306,12 @@ __sfc_main.setup = (__props, __ctx) => {
16244
16306
  seats: true
16245
16307
  };
16246
16308
  };
16309
+ const setUserInfo = (userInfo) => {
16310
+ if (userInfo.sign && props.sign && userInfo.sign !== props.sign) {
16311
+ emit("update:sign", userInfo.sign);
16312
+ emit("update:timestamp", userInfo.timestamp);
16313
+ }
16314
+ };
16247
16315
  onMounted(() => {
16248
16316
  if (props.mode === "qiankun") {
16249
16317
  nfMicrophoneInstance.loadQiankunMicroApps();
@@ -16316,7 +16384,12 @@ class SoftphoneManager {
16316
16384
  isOem: true,
16317
16385
  accessMode: "pc",
16318
16386
  numberKeyBoard: true,
16319
- sgOpen: "1",
16387
+ sgGateway: void 0,
16388
+ sgBase: void 0,
16389
+ sgOpen: void 0,
16390
+ sgDomain: void 0,
16391
+ timestamp: void 0,
16392
+ sign: void 0,
16320
16393
  open: "1",
16321
16394
  envMap: {
16322
16395
  dev: {
@@ -16389,6 +16462,12 @@ class SoftphoneManager {
16389
16462
  },
16390
16463
  softphoneConnectRegisteredCallBack: () => {
16391
16464
  console.log("softphone-connect-registered");
16465
+ },
16466
+ softphoneSignOverduedCallBack: (done) => {
16467
+ done({
16468
+ timestamp: void 0,
16469
+ sign: void 0
16470
+ });
16392
16471
  }
16393
16472
  };
16394
16473
  this.initSoftphone = (option) => {
@@ -16397,12 +16476,20 @@ class SoftphoneManager {
16397
16476
  return;
16398
16477
  }
16399
16478
  const props = this.option = option ? { ...this.option, ...option } : this.option;
16479
+ const setUserInfo = (userInfo) => {
16480
+ if (userInfo.sign && props.sign && userInfo.sign !== props.sign) {
16481
+ this.option.sign = userInfo.sign;
16482
+ this.option.timestamp = userInfo.timestamp;
16483
+ }
16484
+ };
16400
16485
  const getUserInfo = () => {
16401
16486
  const {
16402
16487
  agentId,
16403
16488
  agentTag,
16404
16489
  appKey,
16405
16490
  appSecret,
16491
+ timestamp,
16492
+ sign,
16406
16493
  extStatus,
16407
16494
  origin,
16408
16495
  ancestorOrigin,
@@ -16458,6 +16545,8 @@ class SoftphoneManager {
16458
16545
  agentTag,
16459
16546
  appKey,
16460
16547
  appSecret,
16548
+ timestamp,
16549
+ sign,
16461
16550
  extStatus,
16462
16551
  origin,
16463
16552
  ancestorOrigin,
@@ -16589,31 +16678,55 @@ class SoftphoneManager {
16589
16678
  return props.isOem;
16590
16679
  }
16591
16680
  getSoftPhoneShowCall() {
16592
- return props.callShow;
16681
+ if (props.callShow === "0") {
16682
+ return false;
16683
+ }
16684
+ return true;
16593
16685
  }
16594
16686
  getSoftPhoneShowTransferToLabor() {
16595
- return props.transferToLaborShow;
16687
+ if (props.transferToLaborShow === "0") {
16688
+ return false;
16689
+ }
16690
+ return true;
16596
16691
  }
16597
16692
  getSoftPhoneShowRest() {
16598
- return props.restShow;
16693
+ if (props.restShow === "0") {
16694
+ return false;
16695
+ }
16696
+ return true;
16599
16697
  }
16600
16698
  getSoftPhoneShowNetworkDetect() {
16601
- return props.networkDetectShow;
16699
+ if (props.networkDetectShow === "0") {
16700
+ return false;
16701
+ }
16702
+ return true;
16602
16703
  }
16603
16704
  getSoftPhoneShowMute() {
16604
- return props.muteShow;
16705
+ if (props.muteShow === "0") {
16706
+ return false;
16707
+ }
16708
+ return true;
16605
16709
  }
16606
16710
  /**
16607
16711
  * 是否展示对话记录功能
16608
16712
  */
16609
16713
  getSoftPhoneShowLog() {
16610
- return props.logShow;
16714
+ if (props.logShow === "0") {
16715
+ return false;
16716
+ }
16717
+ return true;
16611
16718
  }
16612
16719
  getSoftPhoneShowTiming() {
16613
- return props.timingShow;
16720
+ if (props.timingShow === "0") {
16721
+ return false;
16722
+ }
16723
+ return true;
16614
16724
  }
16615
16725
  getSoftPhoneShowSign() {
16616
- return props.signShow;
16726
+ if (props.signShow === "0") {
16727
+ return false;
16728
+ }
16729
+ return true;
16617
16730
  }
16618
16731
  /**
16619
16732
  * 使用按键拨号
@@ -16645,72 +16758,6 @@ class SoftphoneManager {
16645
16758
  return 3;
16646
16759
  }
16647
16760
  }
16648
- class SoftphoneNotity {
16649
- constructor() {
16650
- this.communicationList = {
16651
- "softphone-connect-registered": (data) => {
16652
- var _a;
16653
- (_a = props.softphoneConnectRegisteredCallBack) == null ? void 0 : _a.call(props, data);
16654
- },
16655
- "softphone-session-state-change": (data) => {
16656
- var _a;
16657
- (_a = props.softphoneSessionStateChangeCallBack) == null ? void 0 : _a.call(props, data);
16658
- },
16659
- "softphone-call-refresh": (data) => {
16660
- var _a;
16661
- (_a = props.softphoneCallRefreshCallBack) == null ? void 0 : _a.call(props, data);
16662
- },
16663
- "softphone-connect": (data) => {
16664
- var _a;
16665
- (_a = props.softphoneConnectCallBack) == null ? void 0 : _a.call(props, data);
16666
- },
16667
- "softphone-accept": (data) => {
16668
- var _a;
16669
- (_a = props.softphoneAcceptCallBack) == null ? void 0 : _a.call(props, data);
16670
- },
16671
- "softphone-seats-status-change": (data) => {
16672
- var _a;
16673
- (_a = props.softphoneSeatStatusChangeCallBack) == null ? void 0 : _a.call(props, data);
16674
- },
16675
- "softphone-ignore": (data) => {
16676
- var _a;
16677
- (_a = props.softphoneIgnoreCallBack) == null ? void 0 : _a.call(props, data);
16678
- },
16679
- "softphone-hangup": (data) => {
16680
- var _a;
16681
- (_a = props.softphoneHangupCallBack) == null ? void 0 : _a.call(props, data);
16682
- },
16683
- "softphone-incoming": (data) => {
16684
- var _a;
16685
- (_a = props.softphoneIncomingCallBack) == null ? void 0 : _a.call(props, data);
16686
- },
16687
- "softphone-send-dtmf": (data) => {
16688
- var _a;
16689
- (_a = props.softphoneSendDtmfCallBack) == null ? void 0 : _a.call(props, data);
16690
- }
16691
- };
16692
- this.useQinkunSoftphoneNotity = (state) => {
16693
- var _a, _b;
16694
- if (state.ancestorOrigin === props.ancestorOrigin && state.origin !== props.ancestorOrigin || state.ancestorOrigin === props.origin && state.origin === props.origin) {
16695
- if (state.destinationOrigin === "*" || state.destinationOrigin === props.destinationOrigin) {
16696
- (_b = (_a = this.communicationList)[state.type]) == null ? void 0 : _b.call(_a, state.data);
16697
- }
16698
- }
16699
- };
16700
- }
16701
- useWujieSoftphoneNotity() {
16702
- Object.keys(this.communicationList).forEach((key) => {
16703
- bus.$on(key, (state) => {
16704
- var _a, _b;
16705
- if (state.ancestorOrigin === props.ancestorOrigin && state.origin !== props.ancestorOrigin || state.ancestorOrigin === props.origin && state.origin === props.origin) {
16706
- if (state.destinationOrigin === "*" || state.destinationOrigin === props.destinationOrigin) {
16707
- (_b = (_a = this.communicationList)[key]) == null ? void 0 : _b.call(_a, state.data);
16708
- }
16709
- }
16710
- });
16711
- });
16712
- }
16713
- }
16714
16761
  class MicroManager {
16715
16762
  constructor() {
16716
16763
  __privateAdd(this, _qiankunActions, void 0);
@@ -16723,15 +16770,15 @@ class SoftphoneManager {
16723
16770
  getWejieActions() {
16724
16771
  return bus;
16725
16772
  }
16726
- microCommunicat(type, status) {
16773
+ microCommunicat(type, data = {}, operationType = "manual", ancestorOrigin = props.ancestorOrigin, destinationOrigin = props.destinationOrigin) {
16727
16774
  const state = {
16728
16775
  origin: "nf-softphone",
16729
- ancestorOrigin: props.ancestorOrigin,
16730
- destinationOrigin: props.destinationOrigin,
16776
+ ancestorOrigin: ancestorOrigin || props.ancestorOrigin,
16777
+ destinationOrigin: destinationOrigin || props.destinationOrigin,
16731
16778
  type,
16732
16779
  data: {
16733
- status,
16734
- type: "manual"
16780
+ ...data,
16781
+ type: operationType
16735
16782
  }
16736
16783
  };
16737
16784
  if (this.mode === "qiankun") {
@@ -16742,13 +16789,19 @@ class SoftphoneManager {
16742
16789
  }
16743
16790
  // 签入
16744
16791
  connect() {
16745
- this.microCommunicat("softphone-connect", true);
16792
+ this.microCommunicat("softphone-connect", {
16793
+ status: true
16794
+ });
16746
16795
  }
16747
16796
  disconnect() {
16748
- this.microCommunicat("softphone-connect", false);
16797
+ this.microCommunicat("softphone-connect", {
16798
+ status: false
16799
+ });
16749
16800
  }
16750
16801
  seatsStatusChange(status) {
16751
- this.microCommunicat("softphone-connect", status);
16802
+ this.microCommunicat("softphone-connect", {
16803
+ status
16804
+ });
16752
16805
  }
16753
16806
  accept() {
16754
16807
  this.microCommunicat("softphone-connect");
@@ -16762,6 +16815,9 @@ class SoftphoneManager {
16762
16815
  sendDtmf() {
16763
16816
  this.microCommunicat("softphone-send-dtmf");
16764
16817
  }
16818
+ signOverdued(data) {
16819
+ this.microCommunicat("softphone-sign-overdued", data, "auto", props.ancestorOrigin, "ai-softphone");
16820
+ }
16765
16821
  changeServerToRegister() {
16766
16822
  this.microCommunicat("softphone-change-server-to-register");
16767
16823
  }
@@ -16840,8 +16896,7 @@ class SoftphoneManager {
16840
16896
  loadQiankunMicroApps() {
16841
16897
  const appConfig = this.getMicroAppConfig()[0];
16842
16898
  appConfig.props.shared.getUserInfo = getUserInfo;
16843
- appConfig.props.shared.setUserInfo = () => {
16844
- };
16899
+ appConfig.props.shared.setUserInfo = setUserInfo;
16845
16900
  this.initState();
16846
16901
  this.app = loadMicroApp(appConfig, {
16847
16902
  sandbox: {
@@ -16866,8 +16921,7 @@ class SoftphoneManager {
16866
16921
  const appConfig = this.getMicroAppConfig()[0];
16867
16922
  const url = appConfig.entry;
16868
16923
  appConfig.props.shared.getUserInfo = getUserInfo;
16869
- appConfig.props.shared.setUserInfo = () => {
16870
- };
16924
+ appConfig.props.shared.setUserInfo = setUserInfo;
16871
16925
  setupApp({
16872
16926
  name: props.name,
16873
16927
  plugins: [
@@ -16905,8 +16959,7 @@ class SoftphoneManager {
16905
16959
  registerQiankunMicroApps() {
16906
16960
  const appConfig = this.getMicroAppConfig()[0];
16907
16961
  appConfig.props.shared.getUserInfo = getUserInfo;
16908
- appConfig.props.shared.setUserInfo = () => {
16909
- };
16962
+ appConfig.props.shared.setUserInfo = setUserInfo;
16910
16963
  registerMicroApps([appConfig], {
16911
16964
  // qiankun 生命周期钩子 - 加载前
16912
16965
  beforeLoad: [() => {
@@ -16949,7 +17002,87 @@ class SoftphoneManager {
16949
17002
  }
16950
17003
  }
16951
17004
  _qiankunActions = new WeakMap();
16952
- this.nfMicrophoneInstance = new MicroManager();
17005
+ const nfMicrophoneInstance = this.nfMicrophoneInstance = new MicroManager();
17006
+ class SoftphoneNotity {
17007
+ constructor() {
17008
+ this.communicationList = {
17009
+ "softphone-connect-registered": (data) => {
17010
+ var _a;
17011
+ (_a = props.softphoneConnectRegisteredCallBack) == null ? void 0 : _a.call(props, data);
17012
+ },
17013
+ "softphone-session-state-change": (data) => {
17014
+ var _a;
17015
+ (_a = props.softphoneSessionStateChangeCallBack) == null ? void 0 : _a.call(props, data);
17016
+ },
17017
+ "softphone-call-refresh": (data) => {
17018
+ var _a;
17019
+ (_a = props.softphoneCallRefreshCallBack) == null ? void 0 : _a.call(props, data);
17020
+ },
17021
+ "softphone-connect": (data) => {
17022
+ var _a;
17023
+ (_a = props.softphoneConnectCallBack) == null ? void 0 : _a.call(props, data);
17024
+ },
17025
+ "softphone-accept": (data) => {
17026
+ var _a;
17027
+ (_a = props.softphoneAcceptCallBack) == null ? void 0 : _a.call(props, data);
17028
+ },
17029
+ "softphone-seats-status-change": (data) => {
17030
+ var _a;
17031
+ (_a = props.softphoneSeatStatusChangeCallBack) == null ? void 0 : _a.call(props, data);
17032
+ },
17033
+ "softphone-ignore": (data) => {
17034
+ var _a;
17035
+ (_a = props.softphoneIgnoreCallBack) == null ? void 0 : _a.call(props, data);
17036
+ },
17037
+ "softphone-hangup": (data) => {
17038
+ var _a;
17039
+ (_a = props.softphoneHangupCallBack) == null ? void 0 : _a.call(props, data);
17040
+ },
17041
+ "softphone-incoming": (data) => {
17042
+ var _a;
17043
+ (_a = props.softphoneIncomingCallBack) == null ? void 0 : _a.call(props, data);
17044
+ },
17045
+ "softphone-send-dtmf": (data) => {
17046
+ var _a;
17047
+ (_a = props.softphoneSendDtmfCallBack) == null ? void 0 : _a.call(props, data);
17048
+ },
17049
+ "softphone-sign-overdued": () => {
17050
+ var _a;
17051
+ const done = (data) => {
17052
+ const {
17053
+ sign,
17054
+ timestamp
17055
+ } = data;
17056
+ nfMicrophoneInstance.signOverdued({
17057
+ sign,
17058
+ timestamp
17059
+ });
17060
+ };
17061
+ (_a = props.softphoneSignOverduedCallBack) == null ? void 0 : _a.call(props, done);
17062
+ }
17063
+ };
17064
+ this.useQinkunSoftphoneNotity = (state) => {
17065
+ var _a, _b;
17066
+ if (state.ancestorOrigin === props.ancestorOrigin && state.origin !== props.ancestorOrigin || state.ancestorOrigin === props.origin && state.origin === props.origin) {
17067
+ if (state.destinationOrigin === "*" || state.destinationOrigin === props.destinationOrigin) {
17068
+ (_b = (_a = this.communicationList)[state.type]) == null ? void 0 : _b.call(_a, state.data);
17069
+ }
17070
+ }
17071
+ };
17072
+ }
17073
+ useWujieSoftphoneNotity() {
17074
+ Object.keys(this.communicationList).forEach((key) => {
17075
+ bus.$on(key, (state) => {
17076
+ var _a, _b;
17077
+ if (state.ancestorOrigin === props.ancestorOrigin && state.origin !== props.ancestorOrigin || state.ancestorOrigin === props.origin && state.origin === props.origin) {
17078
+ if (state.destinationOrigin === "*" || state.destinationOrigin === props.destinationOrigin) {
17079
+ (_b = (_a = this.communicationList)[key]) == null ? void 0 : _b.call(_a, state.data);
17080
+ }
17081
+ }
17082
+ });
17083
+ });
17084
+ }
17085
+ }
16953
17086
  if (this.option.mode === "qiankun") {
16954
17087
  this.nfMicrophoneInstance.loadQiankunMicroApps();
16955
17088
  } else {