@titaui/pc 1.13.2-beta.19 → 1.13.2-beta.21
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/lib/components/checkbox-list/index.css +31 -0
- package/lib/components/checkbox-list/index.js +68 -0
- package/lib/components/create-okr-modal/index.js +4 -1
- package/lib/components/dialog-qq-docs/index.css +106 -0
- package/lib/components/dialog-qq-docs/index.js +501 -0
- package/lib/components/dialog-qq-docs/request-apis.js +16 -0
- package/lib/components/dialog-qq-docs/utils.js +83 -0
- package/lib/components/dialog-select/index.css +9 -0
- package/lib/components/dialog-select/index.js +48 -0
- package/lib/components/dialog-upload/img/folder.svg +40 -0
- package/lib/components/dialog-upload/img/form.svg +38 -0
- package/lib/components/dialog-upload/img/mind.svg +39 -0
- package/lib/components/dialog-upload/util.js +20 -2
- package/lib/components/dialog-upload-type/assets/folder.svg +20 -0
- package/lib/components/dialog-upload-type/assets/qq-docs.svg +20 -0
- package/lib/components/dialog-upload-type/components/upload-type-item/index.css +14 -0
- package/lib/components/dialog-upload-type/components/upload-type-item/index.js +36 -0
- package/lib/components/dialog-upload-type/index.css +7 -0
- package/lib/components/dialog-upload-type/index.js +68 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +2 -3
- package/lib/components/dynamic/dynamic-item/components/schedule/index.js +1 -5
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.css +0 -12
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.js +2 -13
- package/lib/components/dynamic/dynamic-item/components/task-progress/render-row.js +2 -2
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.css +1 -16
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.js +9 -51
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +10 -27
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +4 -6
- package/lib/components/dynamic/dynamic-item/index.js +3 -23
- package/lib/components/dynamic/request-api.js +2 -9
- package/lib/components/file-list/components/single-file/index.css +29 -0
- package/lib/components/file-list/components/single-file/index.js +19 -28
- package/lib/components/file-list/img/folder.svg +40 -0
- package/lib/components/file-list/img/form.svg +38 -0
- package/lib/components/file-list/img/mind.svg +39 -0
- package/lib/components/file-list/index.js +2 -1
- package/lib/components/file-list/util.js +20 -2
- package/lib/components/file-preview/index.css +44 -0
- package/lib/components/file-preview/index.js +68 -0
- package/lib/components/loading/assets/loading.gif +0 -0
- package/lib/components/loading/index.css +28 -0
- package/lib/components/loading/index.js +64 -0
- package/lib/components/nav/index.css +37 -0
- package/lib/components/nav/index.js +31 -0
- package/lib/components/nav-top/components/app-center/index.js +6 -1
- package/lib/components/nav-top/components/menu/index.js +44 -14
- package/lib/components/nav-top/index.css +6 -0
- package/lib/components/nav-top/index.js +138 -2
- package/lib/components/nav-top/request.apis.js +10 -2
- package/lib/components/okr-detail/schedule/components/kr-progress/index.js +4 -1
- package/lib/components/okr-guide/constant.js +23 -0
- package/lib/components/okr-guide/img/left-img.jpg +0 -0
- package/lib/components/okr-guide/index.css +148 -0
- package/lib/components/okr-guide/index.js +242 -0
- package/lib/components/okr-guide/request-api.js +57 -0
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +1 -1
- package/lib/components/rich-editor/plugins/inline/color/commond.js +3 -3
- package/lib/components/rich-editor-at/index.js +13 -85
- package/lib/components/scroll-container/index.js +27 -6
- package/lib/components/search-input/index.css +2 -2
- package/lib/components/search-input/index.js +4 -0
- package/lib/components/upload/img/folder.svg +40 -0
- package/lib/components/upload/img/form.svg +38 -0
- package/lib/components/upload/img/mind.svg +39 -0
- package/lib/components/upload/index.js +193 -25
- package/lib/components/upload/index2.js +381 -0
- package/lib/components/upload/util.js +20 -2
- package/lib/components/user-selector/request-apis.js +3 -3
- package/lib/components/version-change-modal/index.js +1 -3
- package/lib/index.js +8 -0
- package/lib/utils/open-data.js +77 -68
- package/lib/utils/tools.js +11 -1
- package/package.json +2 -3
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/utils.js +0 -56
- package/lib/utils/mock-bsglobal.js +0 -1837
|
@@ -98,7 +98,6 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
98
98
|
attachments = data.attachments,
|
|
99
99
|
evaluates = data.evaluates,
|
|
100
100
|
canEvaluate = data.canEvaluate;
|
|
101
|
-
var curAtUser = restProps.curAtUser;
|
|
102
101
|
var files = (0, _util.formatAttachments)(attachments);
|
|
103
102
|
|
|
104
103
|
var _useState = (0, _react.useState)(),
|
|
@@ -106,20 +105,15 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
106
105
|
motionValue = _useState2[0],
|
|
107
106
|
setMotionValue = _useState2[1];
|
|
108
107
|
|
|
109
|
-
var _useState3 = (0, _react.useState)(
|
|
108
|
+
var _useState3 = (0, _react.useState)(false),
|
|
110
109
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
showDelete = _useState4[0],
|
|
111
|
+
setShowDelete = _useState4[1];
|
|
113
112
|
|
|
114
113
|
var _useState5 = (0, _react.useState)(false),
|
|
115
114
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
var _useState7 = (0, _react.useState)(false),
|
|
120
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
121
|
-
showEdit = _useState8[0],
|
|
122
|
-
setShowEdit = _useState8[1];
|
|
115
|
+
showEdit = _useState6[0],
|
|
116
|
+
setShowEdit = _useState6[1];
|
|
123
117
|
|
|
124
118
|
var contentRichTextRef = (0, _react.useRef)();
|
|
125
119
|
var workPlanRichTextRef = (0, _react.useRef)();
|
|
@@ -127,10 +121,10 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
127
121
|
var _useContext = (0, _react.useContext)(_context.SearchKeyContext),
|
|
128
122
|
searchKeyWord = _useContext.searchKeyWord;
|
|
129
123
|
|
|
130
|
-
var
|
|
131
|
-
|
|
132
|
-
currentEvalutes =
|
|
133
|
-
setCurrentEvalutes =
|
|
124
|
+
var _useState7 = (0, _react.useState)(evaluates || []),
|
|
125
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
126
|
+
currentEvalutes = _useState8[0],
|
|
127
|
+
setCurrentEvalutes = _useState8[1];
|
|
134
128
|
|
|
135
129
|
var renderSuffix = /*#__PURE__*/_react["default"].createElement("span", {
|
|
136
130
|
className: (0, _classnames["default"])("".concat(prefix, "__complete-type"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "__complete-type--normal"), submitState === 1), _defineProperty(_classNames, "".concat(prefix, "__complete-type--delay"), submitState === 2), _classNames))
|
|
@@ -175,16 +169,6 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
175
169
|
setMotionValue(motion);
|
|
176
170
|
}
|
|
177
171
|
}, [dailyContent]);
|
|
178
|
-
(0, _react.useEffect)(function () {
|
|
179
|
-
if (dailyContent) {
|
|
180
|
-
var atData = dailyContent.find(function (item) {
|
|
181
|
-
return item.contentType === 5;
|
|
182
|
-
});
|
|
183
|
-
if (!(atData !== null && atData !== void 0 && atData.content)) return;
|
|
184
|
-
var atMotion = JSON.parse(atData.content || "{}");
|
|
185
|
-
setAtValue(atMotion);
|
|
186
|
-
}
|
|
187
|
-
}, [dailyContent]);
|
|
188
172
|
(0, _react.useEffect)(function () {
|
|
189
173
|
if (loginUserId === publishUser.userId) {
|
|
190
174
|
setShowDelete(true);
|
|
@@ -266,8 +250,7 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
266
250
|
editable: false,
|
|
267
251
|
enableDelete: false
|
|
268
252
|
})), /*#__PURE__*/_react["default"].createElement(_remindUserView["default"], {
|
|
269
|
-
data:
|
|
270
|
-
curAtUser: curAtUser
|
|
253
|
+
data: atUsers
|
|
271
254
|
}), currentEvalutes && currentEvalutes.length !== 0 && /*#__PURE__*/_react["default"].createElement(_evalute["default"], {
|
|
272
255
|
evaluation: currentEvalutes[0],
|
|
273
256
|
feedId: feedId,
|
|
@@ -59,7 +59,6 @@ var DynamicProgress = function DynamicProgress(_ref) {
|
|
|
59
59
|
|
|
60
60
|
var progress = data.progress,
|
|
61
61
|
progressDescription = data.progressDescription,
|
|
62
|
-
progressDescriptionRichText = data.progressDescriptionRichText,
|
|
63
62
|
progressGrow = data.progressGrow,
|
|
64
63
|
riskLevel = data.riskLevel,
|
|
65
64
|
obj = data.obj,
|
|
@@ -159,14 +158,13 @@ var DynamicProgress = function DynamicProgress(_ref) {
|
|
|
159
158
|
percent: progress,
|
|
160
159
|
growPercent: progressGrow,
|
|
161
160
|
extraClass: "".concat(prefix, "__status-percent")
|
|
162
|
-
})),
|
|
161
|
+
})), progressDescription && /*#__PURE__*/_react["default"].createElement("div", {
|
|
163
162
|
className: "".concat(prefix, "__description")
|
|
164
163
|
}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
165
164
|
className: "".concat(prefix, "__description-text")
|
|
166
|
-
}, /*#__PURE__*/_react["default"].createElement("
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}
|
|
165
|
+
}, /*#__PURE__*/_react["default"].createElement(_searchKeyHandle["default"], {
|
|
166
|
+
str: progressDescription,
|
|
167
|
+
keyWord: searchKeyWord
|
|
170
168
|
}))))));
|
|
171
169
|
};
|
|
172
170
|
|
|
@@ -79,9 +79,7 @@ var _dynamicNewReport = _interopRequireDefault(require("./dynamic-new-report"));
|
|
|
79
79
|
|
|
80
80
|
var _dynamicDiscovery = _interopRequireDefault(require("./dynamic-discovery"));
|
|
81
81
|
|
|
82
|
-
var
|
|
83
|
-
|
|
84
|
-
var _excluded = ["data", "onDeleteFeed", "dynamicShareIsShowToping", "detailCurAtUser"];
|
|
82
|
+
var _excluded = ["data", "onDeleteFeed", "dynamicShareIsShowToping"];
|
|
85
83
|
|
|
86
84
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
87
85
|
|
|
@@ -122,7 +120,6 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
122
120
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
123
121
|
|
|
124
122
|
var prefix = "titaui-dynamic-item";
|
|
125
|
-
var loginUserId = (0, _bsGlobal.getUserInfo)().Id;
|
|
126
123
|
|
|
127
124
|
var DynamicItem = function DynamicItem(_ref) {
|
|
128
125
|
var _getBSGlobal, _JSON$parse;
|
|
@@ -130,7 +127,6 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
130
127
|
var data = _ref.data,
|
|
131
128
|
onDeleteFeed = _ref.onDeleteFeed,
|
|
132
129
|
dynamicShareIsShowToping = _ref.dynamicShareIsShowToping,
|
|
133
|
-
detailCurAtUser = _ref.detailCurAtUser,
|
|
134
130
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
135
131
|
|
|
136
132
|
var feedId = data.feedId,
|
|
@@ -171,11 +167,6 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
171
167
|
upvoteModalVisible = _useState12[0],
|
|
172
168
|
setUpvoteModalVisible = _useState12[1];
|
|
173
169
|
|
|
174
|
-
var _useState13 = (0, _react.useState)(detailCurAtUser),
|
|
175
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
176
|
-
curAtUser = _useState14[0],
|
|
177
|
-
setCurAtUser = _useState14[1];
|
|
178
|
-
|
|
179
170
|
var _useContext = (0, _react.useContext)(_context.SearchKeyContext),
|
|
180
171
|
searchKeyWord = _useContext.searchKeyWord,
|
|
181
172
|
atAllText = _useContext.atAllText,
|
|
@@ -214,16 +205,6 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
214
205
|
});
|
|
215
206
|
}
|
|
216
207
|
|
|
217
|
-
if (data.feedType === _constant.EFeedType.Report && data.newSummary) {
|
|
218
|
-
(0, _requestApi.setSummaryAlreadyRead)({
|
|
219
|
-
feedId: feedId
|
|
220
|
-
}).then(function (res) {
|
|
221
|
-
if (res.Code === 1) {
|
|
222
|
-
setCurAtUser(+loginUserId);
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
|
|
227
208
|
setIsFold(false);
|
|
228
209
|
};
|
|
229
210
|
|
|
@@ -313,8 +294,7 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
313
294
|
if (data.newSummary) {
|
|
314
295
|
return /*#__PURE__*/_react["default"].createElement(_dynamicNewReport["default"], _extends({
|
|
315
296
|
data: data,
|
|
316
|
-
onDeleteFeed: onDeleteFeed
|
|
317
|
-
curAtUser: curAtUser
|
|
297
|
+
onDeleteFeed: onDeleteFeed
|
|
318
298
|
}, restProps));
|
|
319
299
|
}
|
|
320
300
|
|
|
@@ -400,7 +380,7 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
400
380
|
default:
|
|
401
381
|
return null;
|
|
402
382
|
}
|
|
403
|
-
}, [data
|
|
383
|
+
}, [data]);
|
|
404
384
|
|
|
405
385
|
var renderUpvoteCount = function renderUpvoteCount(type, count) {
|
|
406
386
|
if (count === 0) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.topDynamic = exports.
|
|
6
|
+
exports.topDynamic = exports.deleteDynamic = exports.collectDynamic = exports.cancelTopDynamic = exports.cancelCollectDynamic = void 0;
|
|
7
7
|
|
|
8
8
|
var _request = require("../../utils/request");
|
|
9
9
|
|
|
@@ -43,11 +43,4 @@ var deleteDynamic = function deleteDynamic(_ref5) {
|
|
|
43
43
|
return (0, _request.rdelete)('v2')("user/feed/Delete?feed_id=".concat(feedId));
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
exports.deleteDynamic = deleteDynamic;
|
|
47
|
-
|
|
48
|
-
var setSummaryAlreadyRead = function setSummaryAlreadyRead(_ref6) {
|
|
49
|
-
var feedId = _ref6.feedId;
|
|
50
|
-
return (0, _request.rpost)('v1')("summary/remind/read/".concat(feedId));
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
exports.setSummaryAlreadyRead = setSummaryAlreadyRead;
|
|
46
|
+
exports.deleteDynamic = deleteDynamic;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.titaui-new-file-list-single-file__file-preview {
|
|
7
|
+
position: relative;
|
|
7
8
|
width: 120px;
|
|
8
9
|
height: 120px;
|
|
9
10
|
border-radius: 12px;
|
|
@@ -12,6 +13,7 @@
|
|
|
12
13
|
justify-content: center;
|
|
13
14
|
margin-right: 10px;
|
|
14
15
|
background: #f0f2f5;
|
|
16
|
+
cursor: pointer;
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
.titaui-new-file-list-single-file__file-preview-img {
|
|
@@ -32,6 +34,33 @@
|
|
|
32
34
|
margin-right: 10px;
|
|
33
35
|
}
|
|
34
36
|
|
|
37
|
+
.titaui-new-file-list-single-file__file-preview:hover .titaui-new-file-list-single-file__download-line {
|
|
38
|
+
height: 30px;
|
|
39
|
+
opacity: 1;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.titaui-new-file-list-single-file__download-line {
|
|
43
|
+
position: absolute;
|
|
44
|
+
width: 100%;
|
|
45
|
+
bottom: 0;
|
|
46
|
+
color: #fff;
|
|
47
|
+
background: rgba(20, 28, 40, 0.2);
|
|
48
|
+
backdrop-filter: blur(2px);
|
|
49
|
+
line-height: 30px;
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
border-radius: 0px 0px 10px 10px;
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
height: 0;
|
|
56
|
+
opacity: 0;
|
|
57
|
+
transition: height .2s, opacity .3s;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.titaui-new-file-list-single-file__download-line__icon {
|
|
61
|
+
font-size: 16px;
|
|
62
|
+
}
|
|
63
|
+
|
|
35
64
|
.titaui-new-file-list-single-file__operate {
|
|
36
65
|
position: absolute;
|
|
37
66
|
top: 0;
|
|
@@ -25,8 +25,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
27
|
|
|
28
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
29
|
-
|
|
30
28
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
31
29
|
|
|
32
30
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -44,6 +42,8 @@ var prefix = 'titaui-new-file-list-single-file';
|
|
|
44
42
|
var SingleFile = function SingleFile(_ref) {
|
|
45
43
|
var data = _ref.data,
|
|
46
44
|
index = _ref.index,
|
|
45
|
+
_ref$link = _ref.link,
|
|
46
|
+
link = _ref$link === void 0 ? false : _ref$link,
|
|
47
47
|
onPreview = _ref.onPreview,
|
|
48
48
|
showDownload = _ref.showDownload;
|
|
49
49
|
|
|
@@ -72,40 +72,31 @@ var SingleFile = function SingleFile(_ref) {
|
|
|
72
72
|
|
|
73
73
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
74
74
|
className: prefix
|
|
75
|
-
},
|
|
76
|
-
className: "".concat(prefix, "__operate"),
|
|
77
|
-
onMouseLeave: handleMouseLeave
|
|
78
|
-
}, showDownload && /*#__PURE__*/_react["default"].createElement("a", {
|
|
79
|
-
className: (0, _classnames["default"])("".concat(prefix, "__operate-item"), _defineProperty({}, "".concat(prefix, "__not-preview"), !canPreview || !data.previewUrl)),
|
|
80
|
-
href: data.downloadUrl
|
|
81
|
-
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
82
|
-
className: (0, _classnames["default"])('tu-icon-APP-xiazai', "".concat(prefix, "__operate-item-icon"))
|
|
83
|
-
}), (0, _getLocale.getLocale)('Mod_Download')), !isImg && canPreview && data.previewUrl && /*#__PURE__*/_react["default"].createElement("a", {
|
|
84
|
-
className: (0, _classnames["default"])("".concat(prefix, "__operate-item"), _defineProperty({}, "".concat(prefix, "__operate-item--only"), !showDownload)),
|
|
85
|
-
href: data.previewUrl,
|
|
86
|
-
target: "_blank",
|
|
87
|
-
rel: "noreferrer"
|
|
88
|
-
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
89
|
-
className: (0, _classnames["default"])('tu-icon-yulan', "".concat(prefix, "__operate-item-icon"))
|
|
90
|
-
}), (0, _getLocale.getLocale)('Mod_Preview')), isImg && data.previewUrl && /*#__PURE__*/_react["default"].createElement("a", {
|
|
91
|
-
className: (0, _classnames["default"])("".concat(prefix, "__operate-item"), _defineProperty({}, "".concat(prefix, "__operate-item--only"), !showDownload)),
|
|
92
|
-
onClick: handlePreviewImg
|
|
93
|
-
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
94
|
-
className: (0, _classnames["default"])('tu-icon-yulan', "".concat(prefix, "__operate-item-icon"))
|
|
95
|
-
}), (0, _getLocale.getLocale)('Mod_Preview'))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
75
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
96
76
|
className: (0, _classnames["default"])("".concat(prefix, "__file-preview")),
|
|
97
77
|
onMouseEnter: handleMouseEnter,
|
|
98
78
|
style: {
|
|
99
79
|
backgroundColor: backGroundColor
|
|
100
80
|
}
|
|
101
|
-
},
|
|
81
|
+
}, showDownload && /*#__PURE__*/_react["default"].createElement("a", {
|
|
82
|
+
className: "".concat(prefix, "__download-line"),
|
|
83
|
+
href: data.downloadUrl
|
|
84
|
+
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
85
|
+
className: (0, _classnames["default"])('tu-icon-APP-xiazai', "".concat(prefix, "__download-line__icon"))
|
|
86
|
+
}), (0, _getLocale.getLocale)('Mod_Download')), isImg && /*#__PURE__*/_react["default"].createElement("img", {
|
|
102
87
|
className: "".concat(prefix, "__file-preview-img"),
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
88
|
+
onClick: handlePreviewImg,
|
|
89
|
+
src: data.previewUrl || data.bigImageUrl,
|
|
90
|
+
alt: ""
|
|
91
|
+
}), (!isImg && canPreview && data.previewUrl || link) && /*#__PURE__*/_react["default"].createElement("a", {
|
|
92
|
+
className: "".concat(prefix, "__file-preview-other"),
|
|
93
|
+
href: data.previewUrl,
|
|
94
|
+
target: "_blank",
|
|
95
|
+
rel: "noreferrer"
|
|
106
96
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
107
97
|
className: "".concat(prefix, "__file-preview-other-img"),
|
|
108
|
-
src: fileImg
|
|
98
|
+
src: fileImg,
|
|
99
|
+
alt: ""
|
|
109
100
|
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
110
101
|
className: "".concat(prefix, "__file-name")
|
|
111
102
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Text, {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="28px" height="28px" viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>文件夹-icon</title>
|
|
4
|
+
<defs>
|
|
5
|
+
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
|
|
6
|
+
<stop stop-color="#FFC03F" offset="0%"></stop>
|
|
7
|
+
<stop stop-color="#E69F00" offset="100%"></stop>
|
|
8
|
+
</linearGradient>
|
|
9
|
+
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-2">
|
|
10
|
+
<stop stop-color="#FFDCA4" offset="0%"></stop>
|
|
11
|
+
<stop stop-color="#FFB112" offset="100%"></stop>
|
|
12
|
+
</linearGradient>
|
|
13
|
+
<filter x="-34.5%" y="-70.4%" width="169.1%" height="240.7%" filterUnits="objectBoundingBox" id="filter-3">
|
|
14
|
+
<feOffset dx="0" dy="0.8" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
|
|
15
|
+
<feGaussianBlur stdDeviation="0.4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
|
|
16
|
+
<feColorMatrix values="0 0 0 0 0.839215686 0 0 0 0 0.521568627 0 0 0 0 0 0 0 0 0.8 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
|
|
17
|
+
<feMerge>
|
|
18
|
+
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
|
|
19
|
+
<feMergeNode in="SourceGraphic"></feMergeNode>
|
|
20
|
+
</feMerge>
|
|
21
|
+
</filter>
|
|
22
|
+
</defs>
|
|
23
|
+
<g id="老图标" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
24
|
+
<g id="附件图标" transform="translate(-121.000000, -2257.000000)">
|
|
25
|
+
<g id="caret-left" transform="translate(100.000000, 2236.000000)">
|
|
26
|
+
<g id="文件夹-icon" transform="translate(21.000000, 21.451613)">
|
|
27
|
+
<rect id="矩形" x="0" y="0" width="28" height="27.0967742"></rect>
|
|
28
|
+
<g id="编组-2" transform="translate(3.000000, 4.000000)">
|
|
29
|
+
<path d="M15.9650836,2 L6,2 L8.77205113,6.06216846 C9.14163521,6.6037576 9.75321174,6.92979558 10.408869,6.93477353 L19,7 L19,7 L19,5.05359586 C19,3.3506359 17.6240805,2 15.9650836,2 Z" id="路径" fill="url(#linearGradient-1)" fill-rule="nonzero"></path>
|
|
30
|
+
<path d="M6.04598201,0 L2.57236384,0 C1.15168652,0 0,1.16658056 0,2.60563061 L0,16.3943694 C0,17.8334194 1.15168652,19 2.57236384,19 L19.4259356,19 C20.1081689,19 20.7624597,18.725479 21.2448715,18.2368285 C21.7272833,17.7481779 21.9982995,17.0854256 21.9982995,16.3943694 L22,7.44078957 L21.9889926,7.20659221 C21.8694704,5.89527292 20.7924377,4.86679244 19.4711935,4.84814641 L10.8954901,4.77831357 L8.46091772,1.49939662 C7.94002451,0.624382478 7.06938277,0 6.04598201,0 Z" id="路径" fill="url(#linearGradient-2)" fill-rule="nonzero"></path>
|
|
31
|
+
<g id="编组-22" filter="url(#filter-3)" transform="translate(5.439785, 9.493548)">
|
|
32
|
+
<path d="M0.7,4 L6.3,4 C6.68659932,4 7,4.31340068 7,4.7 C7,5.08659932 6.68659932,5.4 6.3,5.4 L0.7,5.4 C0.313400675,5.4 4.73447626e-17,5.08659932 0,4.7 C-4.73447626e-17,4.31340068 0.313400675,4 0.7,4 Z" id="path-5" fill="#FFDA9E" transform="translate(3.500000, 4.700000) rotate(-180.000000) translate(-3.500000, -4.700000) "></path>
|
|
33
|
+
<path d="M0.7,0 L10.3,0 C10.6865993,-1.82039446e-16 11,0.313400675 11,0.7 C11,1.08659932 10.6865993,1.4 10.3,1.4 L0.7,1.4 C0.313400675,1.4 4.73447626e-17,1.08659932 0,0.7 C-4.73447626e-17,0.313400675 0.313400675,7.10171439e-17 0.7,0 Z" id="path-5" fill="#FFFFFF" transform="translate(5.500000, 0.700000) rotate(-180.000000) translate(-5.500000, -0.700000) "></path>
|
|
34
|
+
</g>
|
|
35
|
+
</g>
|
|
36
|
+
</g>
|
|
37
|
+
</g>
|
|
38
|
+
</g>
|
|
39
|
+
</g>
|
|
40
|
+
</svg>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="28px" height="28px" viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>PPT-icon</title>
|
|
4
|
+
<defs>
|
|
5
|
+
<linearGradient x1="100%" y1="29.7818714%" x2="83.6208606%" y2="29.7818714%" id="linearGradient-1">
|
|
6
|
+
<stop stop-color="#F0A326" offset="0%"></stop>
|
|
7
|
+
<stop stop-color="#D68500" offset="100%"></stop>
|
|
8
|
+
</linearGradient>
|
|
9
|
+
<linearGradient x1="50%" y1="99.3480785%" x2="50%" y2="-1.36175793e-14%" id="linearGradient-2">
|
|
10
|
+
<stop stop-color="#F0A326" offset="0%"></stop>
|
|
11
|
+
<stop stop-color="#FFDA9E" offset="100%"></stop>
|
|
12
|
+
</linearGradient>
|
|
13
|
+
<filter x="-31.6%" y="-43.3%" width="163.2%" height="186.7%" filterUnits="objectBoundingBox" id="filter-3">
|
|
14
|
+
<feOffset dx="0" dy="0.8" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
|
|
15
|
+
<feGaussianBlur stdDeviation="0.4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
|
|
16
|
+
<feColorMatrix values="0 0 0 0 0.839215686 0 0 0 0 0.521568627 0 0 0 0 0 0 0 0 1 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
|
|
17
|
+
<feMerge>
|
|
18
|
+
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
|
|
19
|
+
<feMergeNode in="SourceGraphic"></feMergeNode>
|
|
20
|
+
</feMerge>
|
|
21
|
+
</filter>
|
|
22
|
+
</defs>
|
|
23
|
+
<g id="老图标" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
24
|
+
<g id="附件图标" transform="translate(-121.000000, -2469.000000)">
|
|
25
|
+
<g id="caret-left" transform="translate(100.000000, 2448.000000)">
|
|
26
|
+
<g id="PPT-icon" transform="translate(21.000000, 21.000000)">
|
|
27
|
+
<rect id="矩形" x="0" y="0" width="28" height="27.0967742"></rect>
|
|
28
|
+
<path d="M8.08888889,7.67741935 L23.6444445,7.67741935 C24.503554,7.67741935 25.2,8.3455386 25.2,9.16970547 L25.2,23.3464236 C25.2,24.1705905 24.503554,24.8387097 23.6444445,24.8387097 L8.08888889,24.8387097 C7.22977928,24.8387097 6.53333333,24.1705905 6.53333333,23.3464236 L6.53333333,9.16970547 C6.53333333,8.3455386 7.22977928,7.67741935 8.08888889,7.67741935 Z" id="蒙版备份" fill="url(#linearGradient-1)" fill-rule="nonzero"></path>
|
|
29
|
+
<path d="M20.291358,2.25806452 C21.1313763,2.25806452 21.8123456,2.93204446 21.8123456,3.76344086 L21.8123456,23.3333334 C21.8123456,24.1647298 22.493315,24.8387097 23.3333333,24.8387097 L4.32098765,24.8387097 C3.48096937,24.8387097 2.8,24.1647298 2.8,23.3333334 L2.8,3.76344086 C2.8,2.93204446 3.48096937,2.25806452 4.32098765,2.25806452 L20.291358,2.25806452 Z" id="path-3" fill="url(#linearGradient-2)" fill-rule="nonzero"></path>
|
|
30
|
+
<g id="编组-22" filter="url(#filter-3)" transform="translate(6.747309, 8.548387)">
|
|
31
|
+
<path d="M0.31629509,5.451829 L4.91629509,5.451829 C5.30289442,5.451829 5.61629509,5.76522967 5.61629509,6.151829 C5.61629509,6.53842832 5.30289442,6.851829 4.91629509,6.851829 L0.31629509,6.851829 C-0.0703042345,6.851829 -0.38370491,6.53842832 -0.38370491,6.151829 C-0.38370491,5.76522967 -0.0703042345,5.451829 0.31629509,5.451829 Z" id="path-5" fill="#FFDA9E" transform="translate(2.616295, 6.151829) rotate(-135.000000) translate(-2.616295, -6.151829) "></path>
|
|
32
|
+
<path d="M2.83675324,3.68406204 L12.4367532,3.68406204 C12.8233526,3.68406204 13.1367532,3.99746272 13.1367532,4.38406204 C13.1367532,4.77066137 12.8233526,5.08406204 12.4367532,5.08406204 L2.83675324,5.08406204 C2.45015391,5.08406204 2.13675324,4.77066137 2.13675324,4.38406204 C2.13675324,3.99746272 2.45015391,3.68406204 2.83675324,3.68406204 Z" id="path-5" fill="#FFFFFF" transform="translate(7.636753, 4.384062) rotate(-225.000000) translate(-7.636753, -4.384062) "></path>
|
|
33
|
+
</g>
|
|
34
|
+
</g>
|
|
35
|
+
</g>
|
|
36
|
+
</g>
|
|
37
|
+
</g>
|
|
38
|
+
</svg>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="28px" height="28px" viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>pdf-icon</title>
|
|
4
|
+
<defs>
|
|
5
|
+
<linearGradient x1="100%" y1="29.7818714%" x2="83.6208606%" y2="29.7818714%" id="linearGradient-1">
|
|
6
|
+
<stop stop-color="#33C7FF" offset="0%"></stop>
|
|
7
|
+
<stop stop-color="#009FDB" offset="100%"></stop>
|
|
8
|
+
</linearGradient>
|
|
9
|
+
<linearGradient x1="50%" y1="100%" x2="50%" y2="-2.48949813e-15%" id="linearGradient-2">
|
|
10
|
+
<stop stop-color="#12AFEA" offset="0%"></stop>
|
|
11
|
+
<stop stop-color="#94E2FF" offset="100%"></stop>
|
|
12
|
+
</linearGradient>
|
|
13
|
+
<filter x="-33.2%" y="-40.4%" width="166.4%" height="180.9%" filterUnits="objectBoundingBox" id="filter-3">
|
|
14
|
+
<feOffset dx="0" dy="0.8" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
|
|
15
|
+
<feGaussianBlur stdDeviation="0.4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
|
|
16
|
+
<feColorMatrix values="0 0 0 0 0.0705882353 0 0 0 0 0.68627451 0 0 0 0 0.917647059 0 0 0 0.8 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
|
|
17
|
+
<feMerge>
|
|
18
|
+
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
|
|
19
|
+
<feMergeNode in="SourceGraphic"></feMergeNode>
|
|
20
|
+
</feMerge>
|
|
21
|
+
</filter>
|
|
22
|
+
</defs>
|
|
23
|
+
<g id="老图标" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
24
|
+
<g id="附件图标" transform="translate(-121.000000, -2045.000000)">
|
|
25
|
+
<g id="caret-left" transform="translate(100.000000, 2024.000000)">
|
|
26
|
+
<g id="pdf-icon" transform="translate(21.000000, 21.451613)">
|
|
27
|
+
<rect id="矩形" x="0" y="0" width="28" height="27.0967742"></rect>
|
|
28
|
+
<path d="M8.08888889,7.67741935 L23.6444445,7.67741935 C24.503554,7.67741935 25.2,8.3455386 25.2,9.16970547 L25.2,23.3464236 C25.2,24.1705905 24.503554,24.8387097 23.6444445,24.8387097 L8.08888889,24.8387097 C7.22977928,24.8387097 6.53333333,24.1705905 6.53333333,23.3464236 L6.53333333,9.16970547 C6.53333333,8.3455386 7.22977928,7.67741935 8.08888889,7.67741935 Z" id="蒙版备份" fill="url(#linearGradient-1)" fill-rule="nonzero"></path>
|
|
29
|
+
<path d="M20.291358,2.25806452 C21.1313763,2.25806452 21.8123456,2.93204446 21.8123456,3.76344086 L21.8123456,23.3333334 C21.8123456,24.1647298 22.493315,24.8387097 23.3333333,24.8387097 L4.32098765,24.8387097 C3.48096937,24.8387097 2.8,24.1647298 2.8,23.3333334 L2.8,3.76344086 C2.8,2.93204446 3.48096937,2.25806452 4.32098765,2.25806452 L20.291358,2.25806452 Z" id="path-3" fill="url(#linearGradient-2)" fill-rule="nonzero"></path>
|
|
30
|
+
<g id="编组-22" filter="url(#filter-3)" transform="translate(6.000000, 8.798387)">
|
|
31
|
+
<path d="M7.13978495,4 L10.7397849,4 C11.1263843,4 11.4397849,4.31340068 11.4397849,4.7 C11.4397849,5.08659932 11.1263843,5.4 10.7397849,5.4 L7.13978495,5.4 C6.75318562,5.4 6.43978495,5.08659932 6.43978495,4.7 C6.43978495,4.31340068 6.75318562,4 7.13978495,4 Z" id="path-5" fill="#88DFFF" transform="translate(8.939785, 4.700000) rotate(-180.000000) translate(-8.939785, -4.700000) "></path>
|
|
32
|
+
<path d="M2.80326654,4 C3.08544089,4 3.34002538,4.16942267 3.44897952,4.42971358 C4.42734177,6.76701638 5.41282979,7.91043659 6.29653021,7.99493445 L6.40207871,8 L10.7,8 C11.0865993,8 11.4,8.31340068 11.4,8.7 C11.4,9.05438271 11.1366564,9.34725823 10.7949859,9.39360983 L10.7,9.4 L6.40207871,9.4 C4.9177844,9.4 3.65980532,8.17244898 2.53985234,5.8267506 L2.343,5.4 L0.7,5.4 C0.345617286,5.4 0.0527417698,5.13665638 0.00639017493,4.79498585 L0,4.7 C0,4.34561729 0.263343623,4.05274177 0.605014146,4.00639017 L0.7,4 L2.80326654,4 Z" id="路径-2" fill="#FFFFFF" fill-rule="nonzero"></path>
|
|
33
|
+
<path d="M2.80326654,0 C3.08544089,0 3.34002538,0.169422665 3.44897952,0.429713581 C4.42734177,2.76701638 5.41282979,3.91043659 6.29653021,3.99493445 L6.40207871,4 L10.7,4 C11.0865993,4 11.4,4.31340068 11.4,4.7 C11.4,5.05438271 11.1366564,5.34725823 10.7949859,5.39360983 L10.7,5.4 L6.40207871,5.4 C4.9177844,5.4 3.65980532,4.17244898 2.53985234,1.8267506 L2.343,1.4 L0.7,1.4 C0.345617286,1.4 0.0527417698,1.13665638 0.00639017493,0.794985854 L0,0.7 C0,0.345617286 0.263343623,0.0527417698 0.605014146,0.00639017493 L0.7,0 L2.80326654,0 Z" id="路径-2" fill="#FFFFFF" fill-rule="nonzero" transform="translate(5.700000, 2.700000) scale(1, -1) translate(-5.700000, -2.700000) "></path>
|
|
34
|
+
</g>
|
|
35
|
+
</g>
|
|
36
|
+
</g>
|
|
37
|
+
</g>
|
|
38
|
+
</g>
|
|
39
|
+
</svg>
|
|
@@ -55,7 +55,8 @@ var FileList = function FileList(_ref) {
|
|
|
55
55
|
key: file.documentId + index,
|
|
56
56
|
data: file,
|
|
57
57
|
index: index,
|
|
58
|
-
showDownload: showDownload,
|
|
58
|
+
showDownload: showDownload && file.documentSource !== 5,
|
|
59
|
+
link: file.documentSource === 5,
|
|
59
60
|
onPreview: handleImgPreview
|
|
60
61
|
});
|
|
61
62
|
}), /*#__PURE__*/_react["default"].createElement(_imgViewer["default"], {
|
|
@@ -19,6 +19,12 @@ var _newFileListVideo = _interopRequireDefault(require("./img/new-file-list-vide
|
|
|
19
19
|
|
|
20
20
|
var _newFileListXls = _interopRequireDefault(require("./img/new-file-list-xls.svg"));
|
|
21
21
|
|
|
22
|
+
var _folder = _interopRequireDefault(require("./img/folder.svg"));
|
|
23
|
+
|
|
24
|
+
var _form = _interopRequireDefault(require("./img/form.svg"));
|
|
25
|
+
|
|
26
|
+
var _mind = _interopRequireDefault(require("./img/mind.svg"));
|
|
27
|
+
|
|
22
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
29
|
|
|
24
30
|
var getFileTypeMapIcon = function getFileTypeMapIcon(fileType) {
|
|
@@ -36,7 +42,7 @@ var getFileTypeMapIcon = function getFileTypeMapIcon(fileType) {
|
|
|
36
42
|
} else if (/^(avi|wmv|mov|mp4|rmvb)$/.test(fileType.toLowerCase())) {
|
|
37
43
|
fileImg = _newFileListVideo["default"];
|
|
38
44
|
backGroundColor = "#F5E6FF";
|
|
39
|
-
} else if (/^(pptx|ppt)$/.test(fileType.toLowerCase())) {
|
|
45
|
+
} else if (/^(pptx|ppt|slide)$/.test(fileType.toLowerCase())) {
|
|
40
46
|
fileImg = _newFileListPpt["default"];
|
|
41
47
|
backGroundColor = "#FFF5E6";
|
|
42
48
|
canPreview = true;
|
|
@@ -44,7 +50,7 @@ var getFileTypeMapIcon = function getFileTypeMapIcon(fileType) {
|
|
|
44
50
|
fileImg = _newFileListDoc["default"];
|
|
45
51
|
backGroundColor = "#E6F0FF";
|
|
46
52
|
canPreview = true;
|
|
47
|
-
} else if (/^(xls|xlsx)$/.test(fileType.toLowerCase())) {
|
|
53
|
+
} else if (/^(xls|xlsx|sheet)$/.test(fileType.toLowerCase())) {
|
|
48
54
|
fileImg = _newFileListXls["default"];
|
|
49
55
|
backGroundColor = "#E6FFF5";
|
|
50
56
|
canPreview = true;
|
|
@@ -52,6 +58,18 @@ var getFileTypeMapIcon = function getFileTypeMapIcon(fileType) {
|
|
|
52
58
|
fileImg = _newFileListPdf["default"];
|
|
53
59
|
backGroundColor = "#FFE7E6";
|
|
54
60
|
canPreview = true;
|
|
61
|
+
} else if (/^(folder)$/.test(fileType.toLowerCase())) {
|
|
62
|
+
fileImg = _folder["default"];
|
|
63
|
+
backGroundColor = "#FFF5E6";
|
|
64
|
+
canPreview = true;
|
|
65
|
+
} else if (/^(form)$/.test(fileType.toLowerCase())) {
|
|
66
|
+
fileImg = _form["default"];
|
|
67
|
+
backGroundColor = "#FFF5E6";
|
|
68
|
+
canPreview = true;
|
|
69
|
+
} else if (/^(mind)$/.test(fileType.toLowerCase())) {
|
|
70
|
+
fileImg = _mind["default"];
|
|
71
|
+
backGroundColor = "#E6F8FF";
|
|
72
|
+
canPreview = true;
|
|
55
73
|
} else {
|
|
56
74
|
fileImg = _newFileListOther["default"];
|
|
57
75
|
backGroundColor = "#E6FCFF";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
.file-preview {
|
|
2
|
+
display: flex;
|
|
3
|
+
position: relative;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.file-preview > * + * {
|
|
7
|
+
margin-left: 10px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.file-preview__cover {
|
|
11
|
+
width: 36px;
|
|
12
|
+
height: 36px;
|
|
13
|
+
flex-shrink: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.file-preview__cover__img {
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 100%;
|
|
19
|
+
object-fit: cover;
|
|
20
|
+
object-position: center;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.file-preview__content {
|
|
24
|
+
display: flex;
|
|
25
|
+
width: calc(100% - 36px);
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.file-preview__title {
|
|
30
|
+
max-width: 100%;
|
|
31
|
+
font-size: 14px;
|
|
32
|
+
font-weight: 400;
|
|
33
|
+
line-height: 22px;
|
|
34
|
+
text-overflow: ellipsis;
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
width: max-content;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.file-preview__secondTitle {
|
|
41
|
+
font-size: 12px;
|
|
42
|
+
font-weight: 400;
|
|
43
|
+
color: #89919F;
|
|
44
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = exports.DocType = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _titaUi = require("tita-ui");
|
|
11
|
+
|
|
12
|
+
var _util = require("../dialog-upload/util");
|
|
13
|
+
|
|
14
|
+
require("./index.css");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
18
|
+
var DocType;
|
|
19
|
+
exports.DocType = DocType;
|
|
20
|
+
|
|
21
|
+
(function (DocType) {
|
|
22
|
+
DocType["DOC"] = "doc";
|
|
23
|
+
DocType["SLIDE"] = "slide";
|
|
24
|
+
DocType["SHEET"] = "sheet";
|
|
25
|
+
DocType["FORM"] = "form";
|
|
26
|
+
DocType["PDF"] = "pdf";
|
|
27
|
+
DocType["MIND"] = "mind";
|
|
28
|
+
DocType["FLOWCHART"] = "flowchart";
|
|
29
|
+
DocType["FOLDER"] = "folder";
|
|
30
|
+
})(DocType || (exports.DocType = DocType = {}));
|
|
31
|
+
|
|
32
|
+
var preCls = 'file-preview';
|
|
33
|
+
|
|
34
|
+
var FilePreview = function FilePreview(_ref) {
|
|
35
|
+
var title = _ref.title,
|
|
36
|
+
secondTitle = _ref.secondTitle,
|
|
37
|
+
_ref$type = _ref.type,
|
|
38
|
+
type = _ref$type === void 0 ? '' : _ref$type,
|
|
39
|
+
_ref$className = _ref.className,
|
|
40
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
41
|
+
onClickTitle = _ref.onClickTitle;
|
|
42
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
43
|
+
className: "".concat(preCls, " ").concat(className)
|
|
44
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
45
|
+
className: "".concat(preCls, "__cover")
|
|
46
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
47
|
+
src: (0, _util.getFileTypeMapIcon)(type),
|
|
48
|
+
className: "".concat(preCls, "__cover__img"),
|
|
49
|
+
alt: ""
|
|
50
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
51
|
+
className: "".concat(preCls, "__content")
|
|
52
|
+
}, /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
53
|
+
container: document.body,
|
|
54
|
+
content: /*#__PURE__*/_react["default"].createElement("p", {
|
|
55
|
+
dangerouslySetInnerHTML: {
|
|
56
|
+
__html: title
|
|
57
|
+
}
|
|
58
|
+
})
|
|
59
|
+
}, /*#__PURE__*/_react["default"].createElement("p", {
|
|
60
|
+
onClick: onClickTitle,
|
|
61
|
+
className: "".concat(preCls, "__title")
|
|
62
|
+
}, title)), /*#__PURE__*/_react["default"].createElement("p", {
|
|
63
|
+
className: "".concat(preCls, "__secondTitle")
|
|
64
|
+
}, secondTitle)));
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
var _default = FilePreview;
|
|
68
|
+
exports["default"] = _default;
|
|
Binary file
|