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