@myun/gimi-chat 0.9.37 → 0.9.38

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.
@@ -223,7 +223,9 @@ var useApi = function useApi(baseUrl, authToken) {
223
223
  return _regeneratorRuntime().wrap(function _callee11$(_context11) {
224
224
  while (1) switch (_context11.prev = _context11.next) {
225
225
  case 0:
226
- return _context11.abrupt("return", fetchService.post('/mcourse/web/trace/resource', params));
226
+ return _context11.abrupt("return", fetchService.post('/mcourse/web/trace/resource', params, {
227
+ timeout: 60000
228
+ }));
227
229
  case 1:
228
230
  case "end":
229
231
  return _context11.stop();
@@ -86,7 +86,7 @@ export var KnowledgeIconComponent = function KnowledgeIconComponent(_ref2) {
86
86
  informationList = _useKnowledgeService.informationList,
87
87
  isLoading = _useKnowledgeService.isLoading;
88
88
  var handleCurrentTrace = React.useCallback(function (trace) {
89
- if (trace.isDelete === 1) return;
89
+ if (trace.isDelete === 1 || trace.isDeleted === 1) return;
90
90
  setShowPanel(false);
91
91
  setCurTrace(trace);
92
92
  setTryWatchVisible(true);
@@ -474,6 +474,7 @@
474
474
  justify-content: center;
475
475
  border-radius: 4px;
476
476
  gap: 5px;
477
+ margin-right: 4px;
477
478
  border: 1px solid var(--theme-softNeutral, #D9DCE5);
478
479
  background-color: var(--theme-subtleNeutral, #F5F7FA);
479
480
  cursor: pointer;
@@ -1,25 +1,33 @@
1
1
  import React from 'react';
2
2
  import styles from "./index.module.css";
3
3
  import { knowledgeConstants } from "../../constants";
4
+ // import { Tooltip } from '@douyinfe/semi-ui';
5
+
6
+ import { useTranslation } from 'react-i18next';
7
+ import classNames from 'classnames';
4
8
  var InformationList = function InformationList(_ref) {
5
9
  var list = _ref.list,
6
10
  handleCurrentTrace = _ref.handleCurrentTrace;
11
+ var _useTranslation = useTranslation(),
12
+ t = _useTranslation.t;
7
13
  return /*#__PURE__*/React.createElement("div", {
8
14
  className: styles.knowledgeList
9
15
  }, list.map(function (item) {
10
16
  return /*#__PURE__*/React.createElement("div", {
11
- className: styles.knowledge,
17
+ className: classNames(styles.knowledge, item.isDelete === 1 ? styles.resource_deactive : ''),
12
18
  onClick: function onClick() {
13
19
  return handleCurrentTrace === null || handleCurrentTrace === void 0 ? void 0 : handleCurrentTrace(item);
14
20
  }
15
21
  }, /*#__PURE__*/React.createElement("img", {
16
22
  className: styles.img,
17
- src: knowledgeConstants.INFORMATION_ICON_ADRESS
23
+ src: knowledgeConstants.INFORMATION_ICON_COVER_ADDRESS
18
24
  }), /*#__PURE__*/React.createElement("div", {
19
25
  className: styles.description
20
26
  }, /*#__PURE__*/React.createElement("div", {
21
27
  className: styles.text
22
- }, item.title)));
28
+ }, item.title), item.isDelete === 1 && /*#__PURE__*/React.createElement("div", {
29
+ className: styles.knowledge_trace_deactive
30
+ }, t('trace.information.invalid'))));
23
31
  }));
24
32
  };
25
33
  export default InformationList;
@@ -88,7 +88,7 @@ var VideoPlayer = function VideoPlayer(_ref2) {
88
88
  // @ts-ignore
89
89
  window.Hls = null; // 重置hls,g1和g2会冲突
90
90
  playerRef.current = new GdPlayer({
91
- container: document.getElementById('player-box'),
91
+ container: document.getElementById('player-box1'),
92
92
  protype: 'b',
93
93
  video: {},
94
94
  env: 't-',
@@ -136,14 +136,14 @@ var VideoPlayer = function VideoPlayer(_ref2) {
136
136
  });
137
137
  }
138
138
  return /*#__PURE__*/React.createElement("div", {
139
- id: "player-box-wrap",
139
+ id: "player-box-wrap1",
140
140
  className: styles.playerWrap
141
141
  }, /*#__PURE__*/React.createElement(Spin, {
142
142
  spinning: loading,
143
143
  size: "large",
144
144
  wrapperClassName: styles.spinWrap
145
145
  }), /*#__PURE__*/React.createElement("div", {
146
- id: "player-box",
146
+ id: "player-box1",
147
147
  className: styles.playerBox
148
148
  }));
149
149
  };
@@ -154,7 +154,8 @@ var DocumentPlayer = function DocumentPlayer(_ref5) {
154
154
  t = _useTranslation2.t;
155
155
 
156
156
  // Office 文档与 Web 可预览类型(pdf/svg/图片)支持试看
157
- var canPreview = SUPPORT_PREVIEW_FILE_TYPE.includes(item.suffix) || SUPPORT_WEB_PREVIEW.includes(item.suffix);
157
+ // const canPreview = SUPPORT_PREVIEW_FILE_TYPE.includes(item.suffix) || SUPPORT_WEB_PREVIEW.includes(item.suffix);
158
+ var canPreview = SUPPORT_WEB_PREVIEW.includes(item.suffix);
158
159
 
159
160
  // 不支持预览的类型:直接提示并下载
160
161
  if (!canPreview) {
@@ -245,7 +246,7 @@ var TryWatch = function TryWatch(_ref7) {
245
246
  var _useTranslation4 = useTranslation(),
246
247
  t = _useTranslation4.t;
247
248
  var handleFull = function handleFull() {
248
- if (item.isDelete === 1) return;
249
+ if (item.isDelete === 1 || item.isDeleted === 1) return;
249
250
  if (platform !== 'myun') return Toast.warning(t('trace.jumpUnsupported'));
250
251
  if (type === 'information') {
251
252
  handleInformation();
@@ -10,6 +10,7 @@ export declare const knowledgeConstants: {
10
10
  VIDEO_PLAY_ICON_ADDRESS: string;
11
11
  VIDEO_DEFAULT_COVER_ADDRESS: string;
12
12
  INFORMATION_ICON_ADRESS: string;
13
+ INFORMATION_ICON_COVER_ADDRESS: string;
13
14
  };
14
15
  export declare const documentConstants: {
15
16
  txt: string;
package/dist/constants.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export var knowledgeConstants = {
2
2
  VIDEO_ICON_ADDRESS: 'https://simg01.gaodunwangxiao.com/uploadimgs/tmp/upload/202511/28/19116_20251128152844.png',
3
3
  VIDEO_ICON_KNOWLADGE_TRACE_ADDRESS: 'https://simg01.gaodunwangxiao.com/uploadimgs/tmp/upload/202512/05/5dda1_20251205145434.png',
4
- DOCUMENT_ICON_ADDRESS: 'https://simg01.gaodunwangxiao.com/uploadimgs/tmp/upload/202511/10/1c1a5_20251110100244.png',
4
+ DOCUMENT_ICON_ADDRESS: 'https://simg01.gaodunwangxiao.com/uploadfiles/tmp/upload/202607/24/86526_20260724172428.png',
5
5
  CLASS_ICON_ADDRESS: 'https://simg01.gaodunwangxiao.com/uploadimgs/tmp/upload/202511/10/3c093_20251110102706.png',
6
6
  CLASS_ICON_BIG_ADDRESS: 'https://simg01.gaodunwangxiao.com/uploadimgs/tmp/upload/202511/28/7c759_20251128153111.png',
7
7
  VIDEO_ICON_WHITE_ADDRESS: 'https://simg01.gaodunwangxiao.com/uploadimgs/tmp/upload/202511/10/77cdc_20251110132223.png',
@@ -9,7 +9,8 @@ export var knowledgeConstants = {
9
9
  CLASS_ICON_WHITE_ADDRESS: 'https://simg01.gaodunwangxiao.com/uploadimgs/tmp/upload/202511/10/61fdf_20251110132334.png',
10
10
  VIDEO_PLAY_ICON_ADDRESS: 'https://simg01.gaodunwangxiao.com/uploadimgs/tmp/upload/202511/19/1f688_20251119160747.png',
11
11
  VIDEO_DEFAULT_COVER_ADDRESS: 'https://simg01.gaodunwangxiao.com/uploadimgs/tmp/upload/202511/19/7a643_20251119160927.png',
12
- INFORMATION_ICON_ADRESS: "https://simg01.gaodunwangxiao.com/uploadfiles/tmp/upload/202607/22/b834d_20260722090057.png"
12
+ INFORMATION_ICON_ADRESS: "https://simg01.gaodunwangxiao.com/uploadfiles/tmp/upload/202607/22/b834d_20260722090057.png",
13
+ INFORMATION_ICON_COVER_ADDRESS: "https://simg01.gaodunwangxiao.com/uploadfiles/tmp/upload/202607/24/ecafd_20260724172758.png"
13
14
  };
14
15
  export var documentConstants = {
15
16
  txt: 'https://simg01.gaodunwangxiao.com/uploadimgs/tmp/upload/202509/17/b46c7_20250917144926.png',
@@ -40,6 +40,7 @@ declare const enUS: {
40
40
  'trace.course.total': string;
41
41
  'trace.document.coverAlt': string;
42
42
  'trace.document.invalid': string;
43
+ 'trace.information.invalid': string;
43
44
  'trace.document.total': string;
44
45
  'trace.document.unsupported': string;
45
46
  'trace.document.unsupportedTips': string;
@@ -40,6 +40,7 @@ var enUS = {
40
40
  'trace.course.total': '{{count}} courses in this conversation',
41
41
  'trace.document.coverAlt': 'Document image',
42
42
  'trace.document.invalid': 'Document invalid',
43
+ 'trace.information.invalid': 'Information invalid',
43
44
  'trace.document.total': '{{count}} documents in this conversation',
44
45
  'trace.document.unsupported': 'This file type cannot be previewed',
45
46
  'trace.document.unsupportedTips': 'This file format does not support trial preview. You can download it and view it with other software.\nTo view the full document, click the "View" button.',
@@ -40,6 +40,7 @@ declare const zhCN: {
40
40
  'trace.course.total': string;
41
41
  'trace.document.coverAlt': string;
42
42
  'trace.document.invalid': string;
43
+ 'trace.information.invalid': string;
43
44
  'trace.document.total': string;
44
45
  'trace.document.unsupported': string;
45
46
  'trace.document.unsupportedTips': string;
@@ -40,9 +40,10 @@ var zhCN = {
40
40
  'trace.course.total': '本对话共{{count}}个课程',
41
41
  'trace.document.coverAlt': '文档图片',
42
42
  'trace.document.invalid': '文档失效',
43
+ 'trace.information.invalid': '资讯失效',
43
44
  'trace.document.total': '本对话共{{count}}个文档',
44
45
  'trace.document.unsupported': '当前文件不支持预览',
45
- 'trace.document.unsupportedTips': '文件格式不支持试看,您可以下载后用其他软件查看。\n如需查看完整文档,请点击“去查看”按钮。',
46
+ 'trace.document.unsupportedTips': '文件格式不支持在线试看,您可以下载后用其他软件查看。\n如需查看完整文档,请点击“去查看”按钮。',
46
47
  'trace.video.unsupportedTips': '该视频暂不支持试看,\n如需查看完整视频,请点击“去查看”按钮。',
47
48
  'trace.information.unsupportedTips': '以下内容暂不可试看',
48
49
  'trace.notPermission': '暂无权益',
@@ -243,5 +243,6 @@ export interface IInformation {
243
243
 
244
244
  isActive?: boolean; // 是否高亮
245
245
  packageId?: number; // 资源包ID
246
+ isDelete?: number; // 资源是否已删除 (1:删除 0 :未删除)
246
247
 
247
248
  }