@titaui/pc 1.10.1 → 1.10.4-beta.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.
Files changed (106) hide show
  1. package/lib/components/communication/CommunicationRecord.js +18 -12
  2. package/lib/components/communication/index.css +48 -9
  3. package/lib/components/communication/index.js +67 -28
  4. package/lib/components/communication/style.js +7 -5
  5. package/lib/components/dialog-confirm/index.css +2 -1
  6. package/lib/components/dynamic/components/obj-status/index.css +2 -19
  7. package/lib/components/dynamic/components/obj-status/index.js +7 -8
  8. package/lib/components/dynamic/components/obj-status/utils.js +37 -0
  9. package/lib/components/dynamic/components/percent/index.css +1 -1
  10. package/lib/components/dynamic/components/title/index.css +21 -22
  11. package/lib/components/dynamic/components/title/index.js +20 -8
  12. package/lib/components/dynamic/dynamic-item/components/header/index.css +6 -6
  13. package/lib/components/dynamic/dynamic-item/components/header/index.js +12 -6
  14. package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align-kr.png +0 -0
  15. package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align-o.png +0 -0
  16. package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align.png +0 -0
  17. package/lib/components/dynamic/dynamic-item/dynamic-align/index.css +35 -24
  18. package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +35 -29
  19. package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.css +6 -34
  20. package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.js +6 -32
  21. package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.css +59 -19
  22. package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +27 -19
  23. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.css +49 -38
  24. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +49 -44
  25. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.css +41 -29
  26. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +23 -29
  27. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +33 -16
  28. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +11 -24
  29. package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.css +26 -41
  30. package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.js +10 -29
  31. package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.css +26 -41
  32. package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.js +13 -30
  33. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +16 -54
  34. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +31 -80
  35. package/lib/components/dynamic/dynamic-item/dynamic-progress/utils.js +72 -0
  36. package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +35 -28
  37. package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +10 -23
  38. package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela-kr.png +0 -0
  39. package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela-o.png +0 -0
  40. package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela-project.png +0 -0
  41. package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela-task.png +0 -0
  42. package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela.svg +23 -0
  43. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.css +45 -26
  44. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +41 -33
  45. package/lib/components/dynamic/dynamic-item/dynamic-replay/index.css +19 -6
  46. package/lib/components/dynamic/dynamic-item/dynamic-replay/index.js +11 -17
  47. package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +21 -23
  48. package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +31 -27
  49. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +4 -4
  50. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +8 -18
  51. package/lib/components/dynamic/dynamic-item/dynamic-share/index.css +6 -21
  52. package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +6 -36
  53. package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/img/dynamic-share-course.png +0 -0
  54. package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/index.css +10 -18
  55. package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/index.js +9 -25
  56. package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +34 -30
  57. package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +10 -24
  58. package/lib/components/dynamic/dynamic-item/index.css +4 -4
  59. package/lib/components/dynamic/dynamic-item/index.js +38 -8
  60. package/lib/components/dynamic/util.js +41 -81
  61. package/lib/components/file-list/components/single-file/index.css +9 -8
  62. package/lib/components/float-fixed-video-modal/img/close.png +0 -0
  63. package/lib/components/float-fixed-video-modal/img/full.svg +21 -0
  64. package/lib/components/float-fixed-video-modal/img/muted.svg +21 -0
  65. package/lib/components/float-fixed-video-modal/img/pause.svg +21 -0
  66. package/lib/components/float-fixed-video-modal/img/play.svg +22 -0
  67. package/lib/components/float-fixed-video-modal/img/small.svg +22 -0
  68. package/lib/components/float-fixed-video-modal/img/smallFaQi.png +0 -0
  69. package/lib/components/float-fixed-video-modal/img/volume.svg +21 -0
  70. package/lib/components/float-fixed-video-modal/index.css +243 -0
  71. package/lib/components/float-fixed-video-modal/index.js +334 -0
  72. package/lib/components/float-fixed-video-modal/utils.js +25 -0
  73. package/lib/components/mblog/context.js +3 -1
  74. package/lib/components/mblog/index.css +7 -0
  75. package/lib/components/mblog/index.js +31 -4
  76. package/lib/components/mblog/style.js +4 -4
  77. package/lib/components/menus/export-modules/demo-menus/menu-highlight.js +9 -3
  78. package/lib/components/menus/export-modules/demo-menus/menus.js +12 -35
  79. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-empty.js +7 -4
  80. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/index.css +1 -1
  81. package/lib/components/progress/circle-progress/index.css +1 -0
  82. package/lib/components/progress/circle-progress/index.js +7 -2
  83. package/lib/components/search-key-handle/index.js +7 -2
  84. package/lib/components/video-modal/img/bigFaqi.png +0 -0
  85. package/lib/components/video-modal/img/muted.svg +16 -0
  86. package/lib/components/video-modal/img/not-muted.svg +16 -0
  87. package/lib/components/video-modal/img/pause.svg +17 -0
  88. package/lib/components/video-modal/img/play.png +0 -0
  89. package/lib/components/video-modal/img/play.svg +16 -0
  90. package/lib/components/video-modal/img/small.svg +22 -0
  91. package/lib/components/video-modal/index.css +213 -0
  92. package/lib/components/video-modal/index.js +322 -0
  93. package/lib/components/video-modal/utils.js +25 -0
  94. package/lib/index.js +16 -0
  95. package/lib/pages/aha2021/index.js +1 -1
  96. package/lib/pages/group-management/page-view/importGroupStaff/index.js +1 -3
  97. package/package.json +1 -1
  98. package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align.svg +0 -22
  99. package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-relative.svg +0 -22
  100. package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/dynamic-milestone.png +0 -0
  101. package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/img/okrs-icon.png +0 -0
  102. package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/img/plan-icon.png +0 -0
  103. package/lib/components/dynamic/dynamic-item/dynamic-project/img/dynamic-project.png +0 -0
  104. package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-relative.svg +0 -22
  105. package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/img/guanlian.png +0 -0
  106. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-icon.png +0 -0
@@ -0,0 +1,322 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _classnames = _interopRequireDefault(require("classnames"));
13
+
14
+ var _dialog = _interopRequireDefault(require("../dialog"));
15
+
16
+ var _utils = _interopRequireDefault(require("./utils"));
17
+
18
+ var _play = _interopRequireDefault(require("./img/play.svg"));
19
+
20
+ var _pause = _interopRequireDefault(require("./img/pause.svg"));
21
+
22
+ var _muted = _interopRequireDefault(require("./img/muted.svg"));
23
+
24
+ var _notMuted = _interopRequireDefault(require("./img/not-muted.svg"));
25
+
26
+ var _small = _interopRequireDefault(require("./img/small.svg"));
27
+
28
+ var _bigFaqi = _interopRequireDefault(require("./img/bigFaqi.png"));
29
+
30
+ require("./index.css");
31
+
32
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
33
+
34
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
35
+
36
+ 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; }
37
+
38
+ 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; }
39
+
40
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
41
+
42
+ 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."); }
43
+
44
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
45
+
46
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
47
+
48
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
49
+
50
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
51
+
52
+ var preCls = "titaui-pc-video-modal";
53
+
54
+ var VideoModal = function VideoModal(props) {
55
+ var visible = props.visible,
56
+ _onClose = props.onClose,
57
+ title = props.title,
58
+ videoSrc = props.videoSrc,
59
+ _props$canMini = props.canMini,
60
+ canMini = _props$canMini === void 0 ? false : _props$canMini,
61
+ _props$showSmallVideo = props.showSmallVideo,
62
+ showSmallVideo = _props$showSmallVideo === void 0 ? function () {} : _props$showSmallVideo,
63
+ _props$onCancel = props.onCancel,
64
+ onCancel = _props$onCancel === void 0 ? function () {} : _props$onCancel;
65
+
66
+ var _useState = (0, _react.useState)(false),
67
+ _useState2 = _slicedToArray(_useState, 2),
68
+ isOverModal = _useState2[0],
69
+ setIsOverModal = _useState2[1];
70
+
71
+ var _useState3 = (0, _react.useState)(true),
72
+ _useState4 = _slicedToArray(_useState3, 2),
73
+ isPlay = _useState4[0],
74
+ setIsPlay = _useState4[1];
75
+
76
+ var _useState5 = (0, _react.useState)(true),
77
+ _useState6 = _slicedToArray(_useState5, 2),
78
+ isMuted = _useState6[0],
79
+ setIsMuted = _useState6[1];
80
+
81
+ var _useState7 = (0, _react.useState)(false),
82
+ _useState8 = _slicedToArray(_useState7, 2),
83
+ isMouseDown = _useState8[0],
84
+ setIsMouseDown = _useState8[1];
85
+
86
+ var _useState9 = (0, _react.useState)(false),
87
+ _useState10 = _slicedToArray(_useState9, 2),
88
+ showDot = _useState10[0],
89
+ setShowDot = _useState10[1];
90
+
91
+ var _useState11 = (0, _react.useState)("00:00"),
92
+ _useState12 = _slicedToArray(_useState11, 2),
93
+ totalTime = _useState12[0],
94
+ setTotalTime = _useState12[1];
95
+
96
+ var _useState13 = (0, _react.useState)("00:00"),
97
+ _useState14 = _slicedToArray(_useState13, 2),
98
+ currentTime = _useState14[0],
99
+ setCurrentTime = _useState14[1];
100
+
101
+ var videoRef = (0, _react.useRef)(document.createElement("video"));
102
+ var totalProgressRef = (0, _react.useRef)(document.createElement("div"));
103
+ var progressRef = (0, _react.useRef)(document.createElement("div"));
104
+ var boxRef = (0, _react.useRef)(document.createElement("div"));
105
+ var volumeRef = (0, _react.useRef)(document.createElement("div")); // 播放/暂停
106
+
107
+ var handlePlayVideo = function handlePlayVideo() {
108
+ setIsPlay(!isPlay);
109
+
110
+ if (isPlay) {
111
+ videoRef.current.pause();
112
+ } else {
113
+ videoRef.current.play();
114
+ }
115
+ }; // 音量
116
+
117
+
118
+ var handleChangeVolumeMuted = function handleChangeVolumeMuted() {
119
+ setIsMuted(!isMuted);
120
+ videoRef.current.muted = !videoRef.current.muted;
121
+ }; // 鼠标移入移出进度条区域
122
+
123
+
124
+ var handleMouseEnterProgress = function handleMouseEnterProgress() {
125
+ setShowDot(true);
126
+ };
127
+
128
+ var handleMouseLeaveProgress = function handleMouseLeaveProgress() {
129
+ setShowDot(false);
130
+ }; // 获得点击进度条 进度条的宽度
131
+
132
+
133
+ var getCurrentProgressWidth = function getCurrentProgressWidth(e) {
134
+ var currentWidth = e.clientX - (document.documentElement.offsetWidth - 840) / 2;
135
+ progressRef.current.style.width = "".concat(currentWidth, "px");
136
+ videoRef.current.currentTime = videoRef.current.duration * currentWidth / 840;
137
+ }; // 点击音量 音量进度条宽度
138
+
139
+
140
+ var getCurrentVolumeWidth = function getCurrentVolumeWidth(e) {
141
+ var currentWidth;
142
+
143
+ if (canMini) {
144
+ currentWidth = e.clientX - (document.documentElement.offsetWidth - 840) / 2 - 712;
145
+ } else {
146
+ currentWidth = e.clientX - (document.documentElement.offsetWidth - 840) / 2 - 742;
147
+ }
148
+
149
+ if (currentWidth <= 0) {
150
+ setIsMuted(true);
151
+ videoRef.current.muted = true;
152
+ } else if (currentWidth >= 34) {
153
+ volumeRef.current.style.width = "34px";
154
+ videoRef.current.volume = 1;
155
+ } else {
156
+ volumeRef.current.style.width = "".concat(currentWidth, "px");
157
+ videoRef.current.volume = currentWidth / 34;
158
+ }
159
+ }; // 点击进度条
160
+
161
+
162
+ var handleClickTotalProgress = function handleClickTotalProgress(e) {
163
+ getCurrentProgressWidth(e);
164
+ }; // 拖动进度条
165
+
166
+
167
+ var handleMouseDownProgress = function handleMouseDownProgress() {
168
+ setIsMouseDown(true);
169
+ };
170
+
171
+ var handleMouseMoveProgress = function handleMouseMoveProgress(e) {
172
+ if (isMouseDown) {
173
+ getCurrentProgressWidth(e);
174
+ }
175
+ };
176
+
177
+ var handleMouseUpProgress = function handleMouseUpProgress() {
178
+ setIsMouseDown(false);
179
+ }; // 点击音量进度条
180
+
181
+
182
+ var handleMouseClickVolume = function handleMouseClickVolume(e) {
183
+ getCurrentVolumeWidth(e);
184
+ }; // 鼠标移入移出视频区域
185
+
186
+
187
+ var handleMouseOverVideoModal = function handleMouseOverVideoModal() {
188
+ setIsOverModal(true);
189
+ };
190
+
191
+ var handleMouseLeaveVideoModal = function handleMouseLeaveVideoModal() {
192
+ setIsOverModal(false);
193
+ };
194
+
195
+ var handleCloseAndOpenSmallVideo = function handleCloseAndOpenSmallVideo() {
196
+ onCancel();
197
+ videoRef.current.pause();
198
+ showSmallVideo();
199
+ }; // 初始获得总时间
200
+
201
+
202
+ (0, _react.useEffect)(function () {
203
+ videoRef.current.onloadedmetadata = function () {
204
+ setTotalTime(videoRef.current.duration.toString());
205
+ };
206
+ }, [videoRef.current.onloadedmetadata]); // 实时播放时间
207
+
208
+ (0, _react.useEffect)(function () {
209
+ videoRef.current.ontimeupdate = function () {
210
+ setCurrentTime(videoRef.current.currentTime.toString());
211
+ progressRef.current.style.width = "".concat(840 * videoRef.current.currentTime / videoRef.current.duration, "px");
212
+ };
213
+ }, [videoRef.current.ontimeupdate]); // 初始获得音量宽度
214
+
215
+ (0, _react.useEffect)(function () {
216
+ volumeRef.current.style.width = "".concat(34 * videoRef.current.volume, "px");
217
+ }, [videoRef.current.onloadedmetadata]);
218
+ (0, _react.useEffect)(function () {
219
+ if (visible) {
220
+ videoRef.current.play();
221
+ videoRef.current.muted = true;
222
+ setIsMuted(true);
223
+ setIsPlay(true);
224
+ } else {
225
+ videoRef.current.pause();
226
+ videoRef.current.muted = true;
227
+ setIsMuted(true);
228
+ setIsPlay(false);
229
+ }
230
+ }, [visible]);
231
+ return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
232
+ visible: visible,
233
+ title: title,
234
+ onClose: function onClose() {
235
+ _onClose();
236
+
237
+ videoRef.current.pause();
238
+ videoRef.current.muted = true;
239
+ setIsMuted(true);
240
+ setIsPlay(false);
241
+ },
242
+ style: {
243
+ width: "840px",
244
+ borderRadius: "24px"
245
+ },
246
+ noHeadLine: true,
247
+ noFooterLine: true,
248
+ noFooter: true,
249
+ ref: boxRef
250
+ }, /*#__PURE__*/_react["default"].createElement("div", {
251
+ className: "".concat(preCls, "__box"),
252
+ onMouseOver: handleMouseOverVideoModal,
253
+ onMouseLeave: handleMouseLeaveVideoModal,
254
+ onFocus: handleMouseOverVideoModal
255
+ }, /*#__PURE__*/_react["default"].createElement("video", {
256
+ ref: videoRef,
257
+ src: videoSrc,
258
+ loop: true,
259
+ autoPlay: true,
260
+ muted: true,
261
+ poster: _bigFaqi["default"],
262
+ className: "".concat(preCls, "__video")
263
+ }), /*#__PURE__*/_react["default"].createElement("div", {
264
+ className: (0, _classnames["default"])("".concat(preCls, "__progress"), _defineProperty({}, "".concat(preCls, "__progress--show"), isOverModal)),
265
+ onMouseEnter: handleMouseEnterProgress,
266
+ onMouseLeave: handleMouseLeaveProgress,
267
+ ref: totalProgressRef,
268
+ onClick: handleClickTotalProgress,
269
+ onMouseDown: handleMouseDownProgress,
270
+ onMouseMove: handleMouseMoveProgress,
271
+ onMouseUp: handleMouseUpProgress
272
+ }, /*#__PURE__*/_react["default"].createElement("div", {
273
+ className: "".concat(preCls, "__progress-current"),
274
+ ref: progressRef
275
+ }, /*#__PURE__*/_react["default"].createElement("div", {
276
+ className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__progress-current-dot"), showDot))
277
+ }))), /*#__PURE__*/_react["default"].createElement("div", {
278
+ className: (0, _classnames["default"])("".concat(preCls, "__controls"), _defineProperty({}, "".concat(preCls, "__controls--show"), isOverModal))
279
+ }, /*#__PURE__*/_react["default"].createElement("div", {
280
+ className: "".concat(preCls, "__controls-left")
281
+ }, /*#__PURE__*/_react["default"].createElement("div", {
282
+ className: "".concat(preCls, "__controls-button"),
283
+ onClick: handlePlayVideo
284
+ }, /*#__PURE__*/_react["default"].createElement("img", {
285
+ src: isPlay ? _pause["default"] : _play["default"],
286
+ className: "".concat(preCls, "__controls-play"),
287
+ alt: "\u64AD\u653E/\u6682\u505C"
288
+ })), /*#__PURE__*/_react["default"].createElement("span", {
289
+ className: "".concat(preCls, "__controls-time")
290
+ }, (0, _utils["default"])(currentTime)), /*#__PURE__*/_react["default"].createElement("span", {
291
+ className: "".concat(preCls, "__controls-time")
292
+ }, " / ".concat((0, _utils["default"])(totalTime)))), /*#__PURE__*/_react["default"].createElement("div", {
293
+ className: "".concat(preCls, "__controls-right")
294
+ }, /*#__PURE__*/_react["default"].createElement("div", {
295
+ className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__controls-button"), isMuted), _defineProperty({}, "".concat(preCls, "__controls-volume"), !isMuted))
296
+ }, /*#__PURE__*/_react["default"].createElement("div", {
297
+ className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__controls-volume-progress--hidden"), isMuted), "".concat(preCls, "__controls-volume-progress")),
298
+ onClick: handleMouseClickVolume
299
+ }, /*#__PURE__*/_react["default"].createElement("div", {
300
+ className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__controls-volume-current--hidden"), isMuted), "".concat(preCls, "__controls-volume-current")),
301
+ ref: volumeRef
302
+ })), /*#__PURE__*/_react["default"].createElement("div", {
303
+ onClick: handleChangeVolumeMuted
304
+ }, /*#__PURE__*/_react["default"].createElement("img", {
305
+ src: isMuted ? _muted["default"] : _notMuted["default"],
306
+ className: "".concat(preCls, "__controls-play"),
307
+ alt: "\u97F3\u91CF"
308
+ }))), canMini && /*#__PURE__*/_react["default"].createElement("div", {
309
+ className: "".concat(preCls, "__controls-right-shrink"),
310
+ onClick: handleCloseAndOpenSmallVideo
311
+ }, /*#__PURE__*/_react["default"].createElement("img", {
312
+ src: _small["default"],
313
+ alt: "small"
314
+ })))), /*#__PURE__*/_react["default"].createElement("div", {
315
+ className: (0, _classnames["default"])("".concat(preCls, "__mask1"), _defineProperty({}, "".concat(preCls, "__mask1--show"), isOverModal))
316
+ }), /*#__PURE__*/_react["default"].createElement("div", {
317
+ className: (0, _classnames["default"])("".concat(preCls, "__mask2"), _defineProperty({}, "".concat(preCls, "__mask2--show"), isOverModal))
318
+ }))));
319
+ };
320
+
321
+ var _default = VideoModal;
322
+ exports["default"] = _default;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var formatSecToDate = function formatSecToDate(value) {
9
+ var result = parseInt(value, 10);
10
+ var m = Math.floor(result / 60 % 60) < 10 ? "0".concat(Math.floor(result / 60 % 60)) : Math.floor(result / 60 % 60);
11
+ var s = Math.floor(result % 60) < 10 ? "0".concat(Math.floor(result % 60)) : Math.floor(result % 60);
12
+ var res = "";
13
+
14
+ if (m !== "00") {
15
+ res += "".concat(m, ":");
16
+ } else {
17
+ res += "00:";
18
+ }
19
+
20
+ res += "".concat(s);
21
+ return res;
22
+ };
23
+
24
+ var _default = formatSecToDate;
25
+ exports["default"] = _default;
package/lib/index.js CHANGED
@@ -141,6 +141,12 @@ Object.defineProperty(exports, "FileList", {
141
141
  return _fileList["default"];
142
142
  }
143
143
  });
144
+ Object.defineProperty(exports, "FloatFixedVideoModal", {
145
+ enumerable: true,
146
+ get: function get() {
147
+ return _floatFixedVideoModal["default"];
148
+ }
149
+ });
144
150
  Object.defineProperty(exports, "FollowerVisitor", {
145
151
  enumerable: true,
146
152
  get: function get() {
@@ -501,6 +507,12 @@ Object.defineProperty(exports, "VersionChangeModal", {
501
507
  return _versionChangeModal["default"];
502
508
  }
503
509
  });
510
+ Object.defineProperty(exports, "VideoModal", {
511
+ enumerable: true,
512
+ get: function get() {
513
+ return _videoModal["default"];
514
+ }
515
+ });
504
516
  Object.defineProperty(exports, "WeeklyReport", {
505
517
  enumerable: true,
506
518
  get: function get() {
@@ -726,4 +738,8 @@ var _uploadPhotoModal = _interopRequireDefault(require("./components/upload-phot
726
738
 
727
739
  var _bookDemo = _interopRequireDefault(require("./components/book-demo"));
728
740
 
741
+ var _videoModal = _interopRequireDefault(require("./components/video-modal"));
742
+
743
+ var _floatFixedVideoModal = _interopRequireDefault(require("./components/float-fixed-video-modal"));
744
+
729
745
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -110,7 +110,7 @@ function PageLayout(props) {
110
110
  }
111
111
  }, children), !isTencentHr && /*#__PURE__*/_react["default"].createElement("div", {
112
112
  className: (0, _classnames["default"])("".concat(preCls, "__help"))
113
- }, /*#__PURE__*/_react["default"].createElement(_helpCard["default"], null)), !isTrial && !isTencentHr && /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
113
+ }, /*#__PURE__*/_react["default"].createElement(_helpCard["default"], null)), !isTrial && !isTencentHr && !(0, _helpers.isDingDing)() && /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
114
114
  overlay: "\u8054\u7CFB\u5BA2\u670D",
115
115
  placement: "left",
116
116
  align: {
@@ -181,9 +181,7 @@ function _default(props) {
181
181
  className: "user-group-page__import-download-template"
182
182
  }, /*#__PURE__*/_react["default"].createElement("p", null, "1\u3001\u8BF7\u5148\u4E0B\u8F7D\u5BFC\u5165\u6A21\u677F\uFF0C\u6279\u91CF\u586B\u5199\u5458\u5DE5\u4FE1\u606F"), /*#__PURE__*/_react["default"].createElement("a", {
183
183
  href: url,
184
- onClick: function onClick() {
185
- return console.log(url, "type".concat(type));
186
- },
184
+ target: "_blank",
187
185
  className: "user-group-page__import-download-template-button"
188
186
  }, "\u4E0B\u8F7D\u6A21\u677F")), /*#__PURE__*/_react["default"].createElement("div", {
189
187
  className: "user-group-page__import-download-template"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.10.1",
3
+ "version": "1.10.4-beta.1",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
@@ -1,22 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <title>切片</title>
4
- <defs>
5
- <linearGradient x1="50%" y1="-2.48949813e-15%" x2="50%" y2="100%" id="linearGradient-1">
6
- <stop stop-color="#2879FF" offset="0%"></stop>
7
- <stop stop-color="#FFFFFF" offset="100%"></stop>
8
- </linearGradient>
9
- </defs>
10
- <g id="页面-2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
11
- <g id="目标" transform="translate(-270.000000, -1746.000000)">
12
- <g id="新建目标-负责目标" transform="translate(202.000000, 1635.000000)">
13
- <g id="编组-11" transform="translate(68.000000, 78.000000)">
14
- <g id="pull-up" transform="translate(0.000000, 33.000000)">
15
- <rect id="Rectangle-5" x="0" y="0" width="18" height="18"></rect>
16
- <path d="M9.6984127,1.47921007 L14.2380952,6.34609616 C14.5873016,6.73544705 14.5873016,7.31947338 14.2380952,7.70882427 C13.8888889,8.09817515 13.3650794,8.09817515 13.015873,7.70882427 L9.87301587,4.39934172 L9.87301587,16.0266228 C9.87301587,16.6106491 9.52380952,17 9,17 C8.47619048,17 8.12698413,16.6106491 8.12698413,16.0266228 L8.12698413,4.39934172 L4.98412698,7.90349971 C4.63492063,8.09817515 4.11111111,8.09817515 3.76190476,7.70882427 C3.41269841,7.31947338 3.41269841,6.73544705 3.76190476,6.34609616 L8.12698413,1.47921007 C8.3015873,1.28453463 9,0.505832851 9.6984127,1.47921007 Z" id="箭头" fill="url(#linearGradient-1)" fill-rule="nonzero"></path>
17
- </g>
18
- </g>
19
- </g>
20
- </g>
21
- </g>
22
- </svg>
@@ -1,22 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="18px" height="18px" viewBox="0 0 18 18" 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="50%" x2="50%" y2="100%" id="linearGradient-1">
6
- <stop stop-color="#2879FF" offset="0%"></stop>
7
- <stop stop-color="#FFFFFF" offset="100%"></stop>
8
- </linearGradient>
9
- </defs>
10
- <g id="页面-2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
11
- <g id="目标" transform="translate(-270.000000, -2013.000000)">
12
- <g id="新建目标-负责目标" transform="translate(202.000000, 1901.000000)">
13
- <g id="编组-19" transform="translate(68.000000, 78.000000)">
14
- <g id="pull-up" transform="translate(0.000000, 34.000000)">
15
- <rect id="Rectangle-5" x="0" y="0" width="18" height="18"></rect>
16
- <path d="M6.05737522,9.80294126 C6.34805303,9.80193178 6.58393921,10.0378179 6.58397526,10.3295413 L6.58397526,10.3295413 L6.58430875,14.0309019 C6.58333532,14.5429815 6.78303323,15.0240195 7.14513215,15.3861184 C7.50723108,15.7482174 7.98932361,15.9448057 8.50139427,15.9458963 C9.01344689,15.9469869 9.49446685,15.7473611 9.85649367,15.3853343 C10.2185205,15.0233075 10.4171098,14.541251 10.4170557,14.0302169 L10.4170557,14.0302169 L10.4156676,10.3298748 C10.4166591,10.039197 10.6514727,9.80438339 10.9421685,9.8033739 C11.2328464,9.80238244 11.4687235,10.0382596 11.4687686,10.3299739 L11.4687686,10.3299739 L11.4691021,14.0313345 C11.4702197,14.8496128 11.1371886,15.5923329 10.5993129,16.1302086 C10.0624738,16.6670477 9.31973568,17.0000788 8.50043886,16.9999977 C7.7070011,17.0009711 6.96111733,16.6915998 6.40037504,16.1308575 C5.83965078,15.5701333 5.53025242,14.8242225 5.5301713,14.0297662 L5.5301713,14.0297662 L5.53087433,10.3294422 C5.52980175,10.0387553 5.76564286,9.80291422 6.05737522,9.80294126 Z M8.52047535,7.44504397 C8.81215364,7.44406152 9.04887804,7.68078593 9.04892311,7.97349172 L9.04892311,7.97349172 L9.04935574,10.0910323 C9.04836428,10.2373897 8.99129229,10.3671266 8.89477824,10.4636407 C8.79826419,10.5601547 8.66644519,10.6192727 8.52113332,10.6192547 C8.22944602,10.6202281 7.99273964,10.3835217 7.99267655,10.0907979 L7.99267655,10.0907979 L7.99225293,7.97326639 C7.99113528,7.68159712 8.22775153,7.44498088 8.52047535,7.44504397 Z M8.49961865,1.00000031 C10.137302,0.999252214 11.4700124,2.33196266 11.4703008,3.96860944 L11.4703008,3.96860944 L11.4709318,7.67019534 C11.4699313,7.81605702 11.412012,7.94640686 11.3158135,8.04260544 C11.2196329,8.138786 11.0882555,8.19773276 10.9434214,8.19770572 C10.6527165,8.19870619 10.4167943,7.96278397 10.4167492,7.67103357 L10.4167492,7.67103357 L10.4160913,3.96945669 C10.4170377,3.45736801 10.2172947,2.97626693 9.85514168,2.61411393 C9.49298867,2.25196092 9.01086009,2.05326348 8.49979892,2.05316434 C7.44249781,2.05299308 6.58295676,2.91253413 6.58313702,3.96982623 L6.58313702,3.96982623 L6.58378598,7.6713941 C6.58486757,7.96210797 6.34903548,8.19794006 6.05730312,8.19787697 C5.76659826,8.19887744 5.53067604,7.96295522 5.53063097,7.67120483 L5.53063097,7.67120483 L5.53000004,3.96965498 C5.52972063,2.33096219 6.86093488,0.999747943 8.49962767,1.00002735 Z" id="形状结合" fill="url(#linearGradient-1)" fill-rule="nonzero"></path>
17
- </g>
18
- </g>
19
- </g>
20
- </g>
21
- </g>
22
- </svg>
@@ -1,22 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="18px" height="18px" viewBox="0 0 18 18" 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="50%" x2="50%" y2="100%" id="linearGradient-1">
6
- <stop stop-color="#2879FF" offset="0%"></stop>
7
- <stop stop-color="#FFFFFF" offset="100%"></stop>
8
- </linearGradient>
9
- </defs>
10
- <g id="页面-2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
11
- <g id="目标" transform="translate(-270.000000, -2013.000000)">
12
- <g id="新建目标-负责目标" transform="translate(202.000000, 1901.000000)">
13
- <g id="编组-19" transform="translate(68.000000, 78.000000)">
14
- <g id="pull-up" transform="translate(0.000000, 34.000000)">
15
- <rect id="Rectangle-5" x="0" y="0" width="18" height="18"></rect>
16
- <path d="M6.05737522,9.80294126 C6.34805303,9.80193178 6.58393921,10.0378179 6.58397526,10.3295413 L6.58397526,10.3295413 L6.58430875,14.0309019 C6.58333532,14.5429815 6.78303323,15.0240195 7.14513215,15.3861184 C7.50723108,15.7482174 7.98932361,15.9448057 8.50139427,15.9458963 C9.01344689,15.9469869 9.49446685,15.7473611 9.85649367,15.3853343 C10.2185205,15.0233075 10.4171098,14.541251 10.4170557,14.0302169 L10.4170557,14.0302169 L10.4156676,10.3298748 C10.4166591,10.039197 10.6514727,9.80438339 10.9421685,9.8033739 C11.2328464,9.80238244 11.4687235,10.0382596 11.4687686,10.3299739 L11.4687686,10.3299739 L11.4691021,14.0313345 C11.4702197,14.8496128 11.1371886,15.5923329 10.5993129,16.1302086 C10.0624738,16.6670477 9.31973568,17.0000788 8.50043886,16.9999977 C7.7070011,17.0009711 6.96111733,16.6915998 6.40037504,16.1308575 C5.83965078,15.5701333 5.53025242,14.8242225 5.5301713,14.0297662 L5.5301713,14.0297662 L5.53087433,10.3294422 C5.52980175,10.0387553 5.76564286,9.80291422 6.05737522,9.80294126 Z M8.52047535,7.44504397 C8.81215364,7.44406152 9.04887804,7.68078593 9.04892311,7.97349172 L9.04892311,7.97349172 L9.04935574,10.0910323 C9.04836428,10.2373897 8.99129229,10.3671266 8.89477824,10.4636407 C8.79826419,10.5601547 8.66644519,10.6192727 8.52113332,10.6192547 C8.22944602,10.6202281 7.99273964,10.3835217 7.99267655,10.0907979 L7.99267655,10.0907979 L7.99225293,7.97326639 C7.99113528,7.68159712 8.22775153,7.44498088 8.52047535,7.44504397 Z M8.49961865,1.00000031 C10.137302,0.999252214 11.4700124,2.33196266 11.4703008,3.96860944 L11.4703008,3.96860944 L11.4709318,7.67019534 C11.4699313,7.81605702 11.412012,7.94640686 11.3158135,8.04260544 C11.2196329,8.138786 11.0882555,8.19773276 10.9434214,8.19770572 C10.6527165,8.19870619 10.4167943,7.96278397 10.4167492,7.67103357 L10.4167492,7.67103357 L10.4160913,3.96945669 C10.4170377,3.45736801 10.2172947,2.97626693 9.85514168,2.61411393 C9.49298867,2.25196092 9.01086009,2.05326348 8.49979892,2.05316434 C7.44249781,2.05299308 6.58295676,2.91253413 6.58313702,3.96982623 L6.58313702,3.96982623 L6.58378598,7.6713941 C6.58486757,7.96210797 6.34903548,8.19794006 6.05730312,8.19787697 C5.76659826,8.19887744 5.53067604,7.96295522 5.53063097,7.67120483 L5.53063097,7.67120483 L5.53000004,3.96965498 C5.52972063,2.33096219 6.86093488,0.999747943 8.49962767,1.00002735 Z" id="形状结合" fill="url(#linearGradient-1)" fill-rule="nonzero"></path>
17
- </g>
18
- </g>
19
- </g>
20
- </g>
21
- </g>
22
- </svg>