inl-ui 0.1.76 → 0.1.78

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.
package/dist/index.cjs CHANGED
@@ -43,7 +43,7 @@ var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios$2);
43
43
  var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
44
44
  var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
45
45
 
46
- var version = "0.1.75";
46
+ var version = "0.1.78";
47
47
 
48
48
  const setTheme = theme => {
49
49
  if (theme === "dark") {
@@ -940,6 +940,8 @@ const Events$1 = {
940
940
  WEBRTC_ON_DATA_CHANNEL_MSG: "WEBRTC_ON_DATA_CHANNEL_MSG",
941
941
  CAPTURE_STREAM_FAILED: "CAPTURE_STREAM_FAILED"
942
942
  };
943
+ const VERSION$1 = "1.0.1";
944
+ const BUILD_DATE = "Sat Mar 30 2024 13:57:14 GMT+0800 (\u4E2D\u56FD\u6807\u51C6\u65F6\u95F4)";
943
945
  function isFirefox() {
944
946
  return window.navigator.userAgent.match("Firefox") !== null;
945
947
  }
@@ -969,6 +971,7 @@ class Resolution {
969
971
  }
970
972
  }
971
973
  let logDisabled_ = true;
974
+ let deprecationWarnings_ = true;
972
975
  function extractVersion(uastring, expr, pos) {
973
976
  const match = uastring.match(expr);
974
977
  return match && match.length >= pos && parseInt(match[pos], 10);
@@ -1046,6 +1049,7 @@ function disableWarnings(bool) {
1046
1049
  if (typeof bool !== "boolean") {
1047
1050
  return new Error("Argument type: " + typeof bool + ". Please use a boolean.");
1048
1051
  }
1052
+ deprecationWarnings_ = !bool;
1049
1053
  return "adapter.js deprecation warnings " + (bool ? "disabled" : "enabled");
1050
1054
  }
1051
1055
  function log$1() {
@@ -1053,8 +1057,17 @@ function log$1() {
1053
1057
  if (logDisabled_) {
1054
1058
  return;
1055
1059
  }
1060
+ if (typeof console !== "undefined" && typeof console.log === "function") {
1061
+ console.log.apply(console, arguments);
1062
+ }
1056
1063
  }
1057
1064
  }
1065
+ function deprecated(oldMethod, newMethod) {
1066
+ if (!deprecationWarnings_) {
1067
+ return;
1068
+ }
1069
+ console.warn(oldMethod + " is deprecated, please use " + newMethod + " instead.");
1070
+ }
1058
1071
  function detectBrowser(window2) {
1059
1072
  const result = {
1060
1073
  browser: null,
@@ -1313,6 +1326,7 @@ function shimGetDisplayMedia$2(window2, getSourceId) {
1313
1326
  return;
1314
1327
  }
1315
1328
  if (typeof getSourceId !== "function") {
1329
+ console.error("shimGetDisplayMedia: getSourceId argument is not a function");
1316
1330
  return;
1317
1331
  }
1318
1332
  window2.navigator.mediaDevices.getDisplayMedia = function getDisplayMedia(constraints) {
@@ -1898,7 +1912,9 @@ function filterIceServers$1(iceServers, edgeVersion) {
1898
1912
  return iceServers.filter(server => {
1899
1913
  if (server && (server.urls || server.url)) {
1900
1914
  let urls = server.urls || server.url;
1901
- if (server.url && !server.urls) ;
1915
+ if (server.url && !server.urls) {
1916
+ deprecated("RTCIceServer.url", "RTCIceServer.urls");
1917
+ }
1902
1918
  const isString2 = typeof urls === "string";
1903
1919
  if (isString2) {
1904
1920
  urls = [urls];
@@ -2570,7 +2586,9 @@ function filterIceServers(iceServers, edgeVersion) {
2570
2586
  return iceServers.filter(function (server) {
2571
2587
  if (server && (server.urls || server.url)) {
2572
2588
  var urls = server.urls || server.url;
2573
- if (server.url && !server.urls) ;
2589
+ if (server.url && !server.urls) {
2590
+ console.warn("RTCIceServer.url is deprecated! Use urls instead.");
2591
+ }
2574
2592
  var isString2 = typeof urls === "string";
2575
2593
  if (isString2) {
2576
2594
  urls = [urls];
@@ -3429,6 +3447,7 @@ var rtcpeerconnection = function (window2, edgeVersion) {
3429
3447
  }
3430
3448
  pc.transceivers.forEach(function (transceiver) {
3431
3449
  if (transceiver.iceTransport && transceiver.iceTransport.state === "new" && transceiver.iceTransport.getRemoteCandidates().length > 0) {
3450
+ console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification");
3432
3451
  transceiver.iceTransport.addRemoteCandidate({});
3433
3452
  }
3434
3453
  });
@@ -4011,6 +4030,7 @@ function shimGetUserMedia$1(window2, browserDetails) {
4011
4030
  const navigator2 = window2 && window2.navigator;
4012
4031
  const MediaStreamTrack = window2 && window2.MediaStreamTrack;
4013
4032
  navigator2.getUserMedia = function (constraints, onSuccess, onError) {
4033
+ deprecated("navigator.getUserMedia", "navigator.mediaDevices.getUserMedia");
4014
4034
  navigator2.mediaDevices.getUserMedia(constraints).then(onSuccess, onError);
4015
4035
  };
4016
4036
  if (!(browserDetails.version > 55 && "autoGainControl" in navigator2.mediaDevices.getSupportedConstraints())) {
@@ -4191,6 +4211,7 @@ function shimRemoveStream(window2) {
4191
4211
  return;
4192
4212
  }
4193
4213
  window2.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
4214
+ deprecated("removeStream", "removeTrack");
4194
4215
  this.getSenders().forEach(sender => {
4195
4216
  if (sender.track && stream.getTracks().includes(sender.track)) {
4196
4217
  this.removeTrack(sender);
@@ -4522,6 +4543,7 @@ function shimRTCIceServerUrls(window2) {
4522
4543
  for (let i = 0; i < pcConfig.iceServers.length; i++) {
4523
4544
  let server = pcConfig.iceServers[i];
4524
4545
  if (!server.hasOwnProperty("urls") && server.hasOwnProperty("url")) {
4546
+ deprecated("RTCIceServer.url", "RTCIceServer.urls");
4525
4547
  server = JSON.parse(JSON.stringify(server));
4526
4548
  server.urls = server.url;
4527
4549
  delete server.url;
@@ -4901,6 +4923,7 @@ function adapterFactory({
4901
4923
  shimEdge: true,
4902
4924
  shimSafari: true
4903
4925
  }) {
4926
+ const logging2 = log$1;
4904
4927
  const browserDetails = detectBrowser(window2);
4905
4928
  const adapter = {
4906
4929
  browserDetails,
@@ -4912,11 +4935,14 @@ function adapterFactory({
4912
4935
  switch (browserDetails.browser) {
4913
4936
  case "chrome":
4914
4937
  if (!chromeShim || !shimPeerConnection$2 || !options.shimChrome) {
4938
+ logging2("Chrome shim is not included in this adapter release.");
4915
4939
  return adapter;
4916
4940
  }
4917
4941
  if (browserDetails.version === null) {
4942
+ logging2("Chrome shim can not determine version, not shimming.");
4918
4943
  return adapter;
4919
4944
  }
4945
+ logging2("adapter.js shimming chrome.");
4920
4946
  adapter.browserShim = chromeShim;
4921
4947
  shimAddIceCandidateNullOrEmpty(window2, browserDetails);
4922
4948
  shimGetUserMedia$3(window2, browserDetails);
@@ -4936,8 +4962,10 @@ function adapterFactory({
4936
4962
  break;
4937
4963
  case "firefox":
4938
4964
  if (!firefoxShim || !shimPeerConnection || !options.shimFirefox) {
4965
+ logging2("Firefox shim is not included in this adapter release.");
4939
4966
  return adapter;
4940
4967
  }
4968
+ logging2("adapter.js shimming firefox.");
4941
4969
  adapter.browserShim = firefoxShim;
4942
4970
  shimAddIceCandidateNullOrEmpty(window2, browserDetails);
4943
4971
  shimGetUserMedia$1(window2, browserDetails);
@@ -4958,8 +4986,10 @@ function adapterFactory({
4958
4986
  break;
4959
4987
  case "edge":
4960
4988
  if (!edgeShim || !shimPeerConnection$1 || !options.shimEdge) {
4989
+ logging2("MS edge shim is not included in this adapter release.");
4961
4990
  return adapter;
4962
4991
  }
4992
+ logging2("adapter.js shimming edge.");
4963
4993
  adapter.browserShim = edgeShim;
4964
4994
  shimGetUserMedia$2(window2);
4965
4995
  shimGetDisplayMedia$1(window2);
@@ -4970,8 +5000,10 @@ function adapterFactory({
4970
5000
  break;
4971
5001
  case "safari":
4972
5002
  if (!safariShim || !options.shimSafari) {
5003
+ logging2("Safari shim is not included in this adapter release.");
4973
5004
  return adapter;
4974
5005
  }
5006
+ logging2("adapter.js shimming safari.");
4975
5007
  adapter.browserShim = safariShim;
4976
5008
  shimAddIceCandidateNullOrEmpty(window2, browserDetails);
4977
5009
  shimRTCIceServerUrls(window2);
@@ -4987,6 +5019,9 @@ function adapterFactory({
4987
5019
  shimSendThrowTypeError(window2);
4988
5020
  removeExtmapAllowMixed(window2, browserDetails);
4989
5021
  break;
5022
+ default:
5023
+ logging2("Unsupported browser!");
5024
+ break;
4990
5025
  }
4991
5026
  return adapter;
4992
5027
  }
@@ -6065,6 +6100,7 @@ validators$1.transitional = function transitional2(validator2, version, message)
6065
6100
  }
6066
6101
  if (version && !deprecatedWarnings[opt]) {
6067
6102
  deprecatedWarnings[opt] = true;
6103
+ console.warn(formatMessage(opt, " has been deprecated since v" + version + " and will be removed in the near future"));
6068
6104
  }
6069
6105
  return validator2 ? validator2(value, opt, opts) : true;
6070
6106
  };
@@ -6596,6 +6632,8 @@ class RTCEndpoint extends Event$1 {
6596
6632
  return this._localStream;
6597
6633
  }
6598
6634
  }
6635
+ console.log("build date:", BUILD_DATE);
6636
+ console.log("version:", VERSION$1);
6599
6637
  const Events = Events$1;
6600
6638
  const Endpoint = RTCEndpoint;
6601
6639
 
@@ -6703,6 +6741,7 @@ class WebRtcMt$1 {
6703
6741
  if (res.code === 0) {
6704
6742
  this.startPlay(plays);
6705
6743
  } else {
6744
+ console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
6706
6745
  setTimeout(() => {
6707
6746
  this.rePlay();
6708
6747
  }, 3 * 60 * 1e3);
@@ -6710,6 +6749,7 @@ class WebRtcMt$1 {
6710
6749
  resolve(res);
6711
6750
  });
6712
6751
  }).catch(err => {
6752
+ console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
6713
6753
  setTimeout(() => {
6714
6754
  this.rePlay();
6715
6755
  }, 3 * 60 * 1e3);
@@ -6720,6 +6760,11 @@ class WebRtcMt$1 {
6720
6760
  switch (type) {
6721
6761
  case "err":
6722
6762
  throw new Error(text);
6763
+ case "warn":
6764
+ console.log(text);
6765
+ break;
6766
+ default:
6767
+ console.log(text);
6723
6768
  }
6724
6769
  }
6725
6770
  // 停止播放0
@@ -6763,6 +6808,7 @@ class WebRtcMt$1 {
6763
6808
  this.rePlay(videoElm);
6764
6809
  });
6765
6810
  player.on(Events.WEBRTC_ON_CONNECTION_STATE_CHANGE, state => {
6811
+ console.log("webrtc:" + state);
6766
6812
  if (state === "disconnected" || state === "failed") {
6767
6813
  this.rePlay(videoElm);
6768
6814
  }
@@ -6770,8 +6816,10 @@ class WebRtcMt$1 {
6770
6816
  }
6771
6817
  // 重播
6772
6818
  rePlay(videoElm) {
6819
+ console.log("\u5E95\u90E8\u505C\u6B62\u64AD\u653E");
6773
6820
  this.stopPlay();
6774
6821
  setTimeout(() => {
6822
+ console.log("\u5E95\u90E8\u91CD\u64AD");
6775
6823
  this.init(this.opt);
6776
6824
  }, 5 * 1e3);
6777
6825
  }
@@ -7619,29 +7667,27 @@ function useMicroApp(appList) {
7619
7667
  id: domId
7620
7668
  });
7621
7669
  }
7622
- setTimeout(async () => {
7623
- const loadApp = loadedApp.get(microAppName);
7624
- if (loadApp) {
7625
- if (!loadApp.mounted) {
7626
- loadApp.app.mount();
7627
- }
7628
- return;
7670
+ const loadApp = loadedApp.get(microAppName);
7671
+ if (loadApp) {
7672
+ if (!loadApp.mounted) {
7673
+ loadApp.app.mount();
7629
7674
  }
7630
- const app = qiankun$1.loadMicroApp({
7631
- name: microAppDefine ? microAppDefine.name : microAppName,
7632
- entry: microAppDefine ? microAppDefine.entry : `/${microAppName}/`,
7633
- container: `#${domId}`
7634
- });
7635
- const microApp = {
7636
- name: microAppName,
7637
- domId,
7638
- app,
7639
- mounted: true
7640
- };
7641
- loadAppList.value.push(microApp);
7642
- loadedApp.set(microAppName, microApp);
7643
- await app.mountPromise;
7644
- }, 10);
7675
+ return;
7676
+ }
7677
+ const app = qiankun$1.loadMicroApp({
7678
+ name: microAppDefine ? microAppDefine.name : microAppName,
7679
+ entry: microAppDefine ? microAppDefine.entry : `/${microAppName}/`,
7680
+ container: `#${domId}`
7681
+ });
7682
+ const microApp = {
7683
+ name: microAppName,
7684
+ domId,
7685
+ app,
7686
+ mounted: true
7687
+ };
7688
+ loadAppList.value.push(microApp);
7689
+ loadedApp.set(microAppName, microApp);
7690
+ await app.mountPromise;
7645
7691
  }, 100);
7646
7692
  vue.watch(route, handleRouteChange, {
7647
7693
  immediate: true
@@ -8410,13 +8456,13 @@ const PageContent = vue.defineComponent({
8410
8456
  "alt": ""
8411
8457
  }, null)]), [[vue.vShow, show]]);
8412
8458
  };
8413
- const childTypes = [];
8414
- childTypes.push(vue.createVNode(vue.Fragment, null, [appDomList.value.map(item => vue.withDirectives(vue.createVNode("div", {
8459
+ const childTypes = vue.ref([]);
8460
+ childTypes.value.push(vue.createVNode(vue.Fragment, null, [appDomList.value.map(item => vue.withDirectives(vue.createVNode("div", {
8415
8461
  "key": item.id,
8416
8462
  "id": item.id
8417
8463
  }, null), [[vue.vShow, item.name === activeAppName.value]]))]));
8418
- childTypes.push(vue.createVNode(vue.Fragment, null, [iframeList.value.map(iframeRender)]));
8419
- childTypes.push(vue.createVNode(vue.Fragment, null, [extraPageList.value.map(item => {
8464
+ childTypes.value.push(vue.createVNode(vue.Fragment, null, [iframeList.value.map(iframeRender)]));
8465
+ childTypes.value.push(vue.createVNode(vue.Fragment, null, [extraPageList.value.map(item => {
8420
8466
  const extraPageShoe = getTabUniqueKey(item) === activeKey.value;
8421
8467
  return vue.withDirectives(vue.createVNode("div", {
8422
8468
  "key": item.key + item.refreshKey,
@@ -8433,7 +8479,7 @@ const PageContent = vue.defineComponent({
8433
8479
  }, [props.showTabList && tabs, vue.createVNode("div", {
8434
8480
  "class": ["page-container", containerCns],
8435
8481
  "ref": props.pageContainerRef
8436
- }, [childTypes])]);
8482
+ }, [childTypes.value])]);
8437
8483
  };
8438
8484
  }
8439
8485
  });
@@ -11547,6 +11593,7 @@ const CloudVideo = vue.defineComponent({
11547
11593
  initVideo();
11548
11594
  });
11549
11595
  vue.onBeforeUnmount(() => {
11596
+ console.log("\u9500\u6BC1");
11550
11597
  player?.stop();
11551
11598
  });
11552
11599
  return () => vue.createVNode("div", {
@@ -11636,6 +11683,11 @@ class WebRtcMt {
11636
11683
  switch (type) {
11637
11684
  case "err":
11638
11685
  throw new Error(text);
11686
+ case "warn":
11687
+ console.warn(text);
11688
+ break;
11689
+ default:
11690
+ console.info(text);
11639
11691
  }
11640
11692
  }
11641
11693
  // 停止播放0
@@ -14105,6 +14157,7 @@ const SszComment = vue.defineComponent({
14105
14157
  token,
14106
14158
  corpUser
14107
14159
  } = await getZxUser(props.zxIp);
14160
+ console.log("corpUser", corpUser);
14108
14161
  currentUserId.value = corpUser.id;
14109
14162
  mobile.setAxiosOption({
14110
14163
  baseURL: props.baseUrl,
@@ -14122,6 +14175,7 @@ const SszComment = vue.defineComponent({
14122
14175
  }
14123
14176
  });
14124
14177
  } catch (e) {
14178
+ console.log(e);
14125
14179
  mobile.setAxiosOption({
14126
14180
  baseURL: props.baseUrl,
14127
14181
  headers: {
@@ -14778,6 +14832,7 @@ const QaContext = vue.defineComponent({
14778
14832
  }) {
14779
14833
  const containerRef = vue.ref();
14780
14834
  const onAnswerRender = text => {
14835
+ console.log("%c%s", "color: #bd08b7;", text);
14781
14836
  containerRef.value.scrollTo({
14782
14837
  top: containerRef.value.scrollHeight,
14783
14838
  behavior: "smooth"
package/dist/index.d.ts CHANGED
@@ -11,7 +11,7 @@ import { Key } from 'ant-design-vue/lib/table/interface';
11
11
  import * as vue_jsx_runtime from 'vue/jsx-runtime';
12
12
  import * as _ant_design_icons_vue_lib_components_IconFont from '@ant-design/icons-vue/lib/components/IconFont';
13
13
 
14
- var version = "0.1.75";
14
+ var version = "0.1.77";
15
15
 
16
16
  declare const _default$p: {
17
17
  set(theme: string): void;