@titaui/pc 1.10.4 → 1.10.7

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 (104) hide show
  1. package/lib/components/change-okr-modal/index.js +108 -88
  2. package/lib/components/communication/CommunicationRecord.js +18 -12
  3. package/lib/components/communication/index.css +48 -9
  4. package/lib/components/communication/index.js +67 -28
  5. package/lib/components/communication/style.js +7 -5
  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/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +21 -12
  78. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-empty.js +7 -4
  79. package/lib/components/progress/circle-progress/index.css +1 -0
  80. package/lib/components/progress/circle-progress/index.js +7 -2
  81. package/lib/components/search-key-handle/index.js +7 -2
  82. package/lib/components/video-modal/img/bigFaqi.png +0 -0
  83. package/lib/components/video-modal/img/muted.svg +16 -0
  84. package/lib/components/video-modal/img/not-muted.svg +16 -0
  85. package/lib/components/video-modal/img/pause.svg +17 -0
  86. package/lib/components/video-modal/img/play.png +0 -0
  87. package/lib/components/video-modal/img/play.svg +16 -0
  88. package/lib/components/video-modal/img/small.svg +22 -0
  89. package/lib/components/video-modal/index.css +213 -0
  90. package/lib/components/video-modal/index.js +322 -0
  91. package/lib/components/video-modal/utils.js +25 -0
  92. package/lib/index.js +16 -0
  93. package/lib/utils/bs-global.js +8 -4
  94. package/lib/utils/tools.js +11 -2
  95. package/package.json +1 -1
  96. package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align.svg +0 -22
  97. package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-relative.svg +0 -22
  98. package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/dynamic-milestone.png +0 -0
  99. package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/img/okrs-icon.png +0 -0
  100. package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/img/plan-icon.png +0 -0
  101. package/lib/components/dynamic/dynamic-item/dynamic-project/img/dynamic-project.png +0 -0
  102. package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-relative.svg +0 -22
  103. package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/img/guanlian.png +0 -0
  104. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-icon.png +0 -0
@@ -0,0 +1,213 @@
1
+ .titaui-pc-video-modal__box {
2
+ position: relative;
3
+ height: 471px;
4
+ border-bottom-left-radius: 24px;
5
+ border-bottom-right-radius: 24px;
6
+ overflow: hidden;
7
+ cursor: pointer;
8
+ }
9
+
10
+ .titaui-pc-video-modal__mask1 {
11
+ opacity: 0;
12
+ transition: 0.5s;
13
+ position: absolute;
14
+ top: 0;
15
+ width: 840px;
16
+ height: 62px;
17
+ background: linear-gradient(0deg, rgba(20, 28, 40, 0) 0%, #5a6068 100%);
18
+ }
19
+
20
+ .titaui-pc-video-modal__mask1--show {
21
+ opacity: 1;
22
+ transition: 0.5s;
23
+ }
24
+
25
+ .titaui-pc-video-modal__mask2 {
26
+ opacity: 0;
27
+ transition: 0.5s;
28
+ position: absolute;
29
+ bottom: 0;
30
+ width: 840px;
31
+ height: 62px;
32
+ background: linear-gradient(180deg, rgba(20, 28, 40, 0) 0%, #5a6068 100%);
33
+ }
34
+
35
+ .titaui-pc-video-modal__mask2--show {
36
+ opacity: 1;
37
+ transition: 0.5s;
38
+ }
39
+
40
+ .titaui-pc-video-modal__video {
41
+ width: 840px;
42
+ height: 471px;
43
+ }
44
+
45
+ .titaui-pc-video-modal__controls {
46
+ opacity: 0;
47
+ transition: 0.5s;
48
+ width: 100%;
49
+ display: flex;
50
+ align-items: center;
51
+ justify-content: space-between;
52
+ padding: 16px 32px 16px 32px;
53
+ box-sizing: border-box;
54
+ position: absolute;
55
+ bottom: 0;
56
+ z-index: 2;
57
+ }
58
+
59
+ .titaui-pc-video-modal__controls--show {
60
+ opacity: 1;
61
+ transition: 0.5s;
62
+ }
63
+
64
+ .titaui-pc-video-modal__controls-left {
65
+ display: inline-flex;
66
+ align-items: center;
67
+ justify-content: center;
68
+ }
69
+
70
+ .titaui-pc-video-modal__controls-button {
71
+ width: 24px;
72
+ height: 24px;
73
+ border-radius: 12px;
74
+ display: inline-flex;
75
+ align-items: center;
76
+ justify-content: center;
77
+ }
78
+
79
+ .titaui-pc-video-modal__controls-button:hover {
80
+ background: rgba(20, 28, 40, 0.6);
81
+ }
82
+
83
+ .titaui-pc-video-modal__controls-play {
84
+ width: 16px;
85
+ height: 16px;
86
+ cursor: pointer;
87
+ }
88
+
89
+ .titaui-pc-video-modal__controls-time {
90
+ font-size: 12px;
91
+ color: #ffffff;
92
+ line-height: 18px;
93
+ }
94
+
95
+ .titaui-pc-video-modal__controls-time:nth-of-type(1) {
96
+ margin-left: 6px;
97
+ }
98
+
99
+ .titaui-pc-video-modal__controls-muted {
100
+ width: 16px;
101
+ height: 16px;
102
+ }
103
+
104
+ .titaui-pc-video-modal__controls-volume {
105
+ display: inline-flex;
106
+ align-items: center;
107
+ justify-content: space-between;
108
+ padding: 0 8px;
109
+ box-sizing: border-box;
110
+ width: 72px;
111
+ height: 22px;
112
+ background: rgba(20, 28, 40, 0.6);
113
+ border-radius: 12px;
114
+ }
115
+
116
+ .titaui-pc-video-modal__controls-volume-progress {
117
+ position: relative;
118
+ width: 34px;
119
+ height: 2px;
120
+ background: rgba(255, 255, 255, 0.4);
121
+ border-radius: 1px;
122
+ }
123
+
124
+ .titaui-pc-video-modal__controls-volume-progress--hidden {
125
+ display: none;
126
+ }
127
+
128
+ .titaui-pc-video-modal__controls-volume-current {
129
+ position: absolute;
130
+ bottom: 0;
131
+ left: 0;
132
+ height: 2px;
133
+ background: rgba(255, 255, 255, 0.6);
134
+ border-radius: 1px;
135
+ }
136
+
137
+ .titaui-pc-video-modal__controls-volume-current::after {
138
+ content: '';
139
+ position: absolute;
140
+ right: 0;
141
+ bottom: -1px;
142
+ width: 4px;
143
+ height: 4px;
144
+ border-radius: 50%;
145
+ background: #ffffff;
146
+ }
147
+
148
+ .titaui-pc-video-modal__controls-volume-current--hidden {
149
+ display: none;
150
+ }
151
+
152
+ .titaui-pc-video-modal__controls-right {
153
+ display: inline-flex;
154
+ align-items: center;
155
+ }
156
+
157
+ .titaui-pc-video-modal__controls-right-shrink {
158
+ margin-left: 6px;
159
+ width: 24px;
160
+ height: 24px;
161
+ border-radius: 12px;
162
+ display: inline-flex;
163
+ align-items: center;
164
+ justify-content: center;
165
+ }
166
+
167
+ .titaui-pc-video-modal__controls-right-shrink:hover {
168
+ background: rgba(20, 28, 40, 0.6);
169
+ }
170
+
171
+ .titaui-pc-video-modal__controls-right-shrink > img {
172
+ width: 16px;
173
+ height: 16px;
174
+ }
175
+
176
+ .titaui-pc-video-modal__progress {
177
+ opacity: 0;
178
+ transition: 0.5s;
179
+ position: absolute;
180
+ bottom: 56px;
181
+ width: 100%;
182
+ height: 2px;
183
+ background: #ffffff;
184
+ z-index: 2;
185
+ }
186
+
187
+ .titaui-pc-video-modal__progress:hover {
188
+ height: 4px;
189
+ }
190
+
191
+ .titaui-pc-video-modal__progress--show {
192
+ opacity: 1;
193
+ transition: 0.5s;
194
+ }
195
+
196
+ .titaui-pc-video-modal__progress-current {
197
+ position: absolute;
198
+ left: 0;
199
+ bottom: 0;
200
+ background: #77be16;
201
+ height: 100%;
202
+ z-index: 3;
203
+ }
204
+
205
+ .titaui-pc-video-modal__progress-current-dot {
206
+ position: absolute;
207
+ right: 0;
208
+ bottom: -2px;
209
+ width: 8px;
210
+ height: 8px;
211
+ border-radius: 50%;
212
+ background: #77be16;
213
+ }
@@ -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 }; }
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.hasWebHead = exports.getVersion = exports.getUserInfo = exports.getUploadMaxSize = exports.getTenantInfo = exports.getSource = exports.getOkrAdvancedSetting = exports.getBSGlobal = exports.getAppHead = exports.formatNum = void 0;
6
+ exports.hasWebHead = exports.getVersion = exports.getUserInfo = exports.getUploadMaxSize = exports.getTenantInfo = exports.getSource = exports.getOkrAdvancedSetting = exports.getBSGlobal = exports.getAppHead = exports.formatNum = exports["default"] = void 0;
7
7
  exports.isWx = isWx;
8
8
 
9
9
  var getUserInfo = function getUserInfo() {
@@ -101,10 +101,14 @@ var hasWebHead = function hasWebHead(webHeadName) {
101
101
  apply: 907,
102
102
  kaohe: 403
103
103
  };
104
- var webHead = window.BSGlobal.WebHead.AppHead;
104
+ var webHead = window.BSGlobal.newNavigation;
105
105
  return webHead.findIndex(function (v) {
106
- return v.AppId === webHeadMap[webHeadName];
106
+ return v.appId === webHeadMap[webHeadName];
107
107
  }) !== -1;
108
108
  };
109
109
 
110
- exports.hasWebHead = hasWebHead;
110
+ exports.hasWebHead = hasWebHead;
111
+ var _default = {
112
+ hasWebHead: hasWebHead
113
+ };
114
+ exports["default"] = _default;
@@ -10,7 +10,7 @@ exports.htmlDecodeByHtmlRegExp = htmlDecodeByHtmlRegExp;
10
10
  exports.htmlDecodeByRegExp = htmlDecodeByRegExp;
11
11
  exports.htmlEncodeByRegExp = htmlEncodeByRegExp;
12
12
  exports.htmlEncodeToHtmlByRegExp = htmlEncodeToHtmlByRegExp;
13
- exports.unHighLight = exports.openPage = void 0;
13
+ exports.unHighLight = exports.openPage = exports.htmlToText = void 0;
14
14
 
15
15
  var _platform = require("./platform");
16
16
 
@@ -274,4 +274,13 @@ function htmlDecodeByHtmlRegExp(str) {
274
274
  temp = temp.replace(/&quot;/g, "\"");
275
275
  temp = temp.replace(/<br\/>/g, "\n");
276
276
  return temp;
277
- }
277
+ }
278
+
279
+ var htmlToText = function htmlToText(text) {
280
+ var div = document.createElement("div");
281
+ div.innerHTML = text;
282
+ var newtext = div.innerText || div.textContent;
283
+ return newtext;
284
+ };
285
+
286
+ exports.htmlToText = htmlToText;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.10.4",
3
+ "version": "1.10.7",
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>