@chlp-tech/rpa-ui 0.0.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 (116) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +43 -0
  3. package/dist/account-select/imgs/down.svg +24 -0
  4. package/dist/account-select/imgs/fb-disabled.svg +27 -0
  5. package/dist/account-select/imgs/fb.svg +20 -0
  6. package/dist/account-select/imgs/up.svg +20 -0
  7. package/dist/account-select/index.d.ts +39 -0
  8. package/dist/account-select/index.js +221 -0
  9. package/dist/account-select/index.module.less +58 -0
  10. package/dist/ai-empty/index.d.ts +3 -0
  11. package/dist/ai-empty/index.js +51 -0
  12. package/dist/ai-empty/index.module.less +60 -0
  13. package/dist/batch-label/index.d.ts +14 -0
  14. package/dist/batch-label/index.js +215 -0
  15. package/dist/batch-label/index.module.less +96 -0
  16. package/dist/card-scroll/index.d.ts +6 -0
  17. package/dist/card-scroll/index.js +75 -0
  18. package/dist/components/modal/index.d.ts +16 -0
  19. package/dist/components/modal/index.js +70 -0
  20. package/dist/cover-modal/boll.gif +0 -0
  21. package/dist/cover-modal/delete.svg +24 -0
  22. package/dist/cover-modal/index.d.ts +20 -0
  23. package/dist/cover-modal/index.js +410 -0
  24. package/dist/cover-modal/index.module.less +76 -0
  25. package/dist/cover-modal/question.svg +1 -0
  26. package/dist/cover-modal/upload.png +0 -0
  27. package/dist/custom.d.ts +10 -0
  28. package/dist/drawer-task/img/back.png +0 -0
  29. package/dist/drawer-task/img/close.svg +18 -0
  30. package/dist/drawer-task/img/icon.svg +20 -0
  31. package/dist/drawer-task/index.d.ts +24 -0
  32. package/dist/drawer-task/index.js +130 -0
  33. package/dist/drawer-task/index.module.less +85 -0
  34. package/dist/dynamic-form/index.d.ts +33 -0
  35. package/dist/dynamic-form/index.js +154 -0
  36. package/dist/excel-import/excel-import.module.less +32 -0
  37. package/dist/excel-import/index.d.ts +10 -0
  38. package/dist/excel-import/index.js +76 -0
  39. package/dist/form-item/index.d.ts +12 -0
  40. package/dist/form-item/index.js +34 -0
  41. package/dist/form-item/index.module.less +45 -0
  42. package/dist/index.d.ts +22 -0
  43. package/dist/index.js +22 -0
  44. package/dist/label-select/imgs/close.svg +24 -0
  45. package/dist/label-select/imgs/plus.svg +24 -0
  46. package/dist/label-select/index.d.ts +10 -0
  47. package/dist/label-select/index.js +173 -0
  48. package/dist/label-select/index.module.less +25 -0
  49. package/dist/layout/index.d.ts +3 -0
  50. package/dist/layout/index.js +10 -0
  51. package/dist/layout/index.module.less +6 -0
  52. package/dist/link-filter/index.d.ts +25 -0
  53. package/dist/link-filter/index.js +242 -0
  54. package/dist/link-filter/index.module.less +7 -0
  55. package/dist/media-play/close.svg +1 -0
  56. package/dist/media-play/index.d.ts +13 -0
  57. package/dist/media-play/index.js +245 -0
  58. package/dist/media-play/index.module.less +196 -0
  59. package/dist/media-play/play.svg +17 -0
  60. package/dist/modal-wrapper/index.d.ts +17 -0
  61. package/dist/modal-wrapper/index.js +66 -0
  62. package/dist/publish-account/imgs/close.svg +25 -0
  63. package/dist/publish-account/imgs/fb.svg +20 -0
  64. package/dist/publish-account/imgs/ins.svg +36 -0
  65. package/dist/publish-account/imgs/tk.svg +31 -0
  66. package/dist/publish-account/imgs/tt.svg +21 -0
  67. package/dist/publish-account/imgs/yt.svg +25 -0
  68. package/dist/publish-account/index.d.ts +31 -0
  69. package/dist/publish-account/index.js +118 -0
  70. package/dist/publish-account/index.module.less +70 -0
  71. package/dist/publish-status/imgs/fail.svg +22 -0
  72. package/dist/publish-status/imgs/process.svg +24 -0
  73. package/dist/publish-status/imgs/publish.svg +24 -0
  74. package/dist/publish-status/imgs/success.svg +22 -0
  75. package/dist/publish-status/imgs/wait.svg +22 -0
  76. package/dist/publish-status/index.d.ts +5 -0
  77. package/dist/publish-status/index.js +55 -0
  78. package/dist/publish-status/index.module.less +8 -0
  79. package/dist/release-manage/index.d.ts +6 -0
  80. package/dist/release-manage/index.js +5 -0
  81. package/dist/release-manage/release-title/index.d.ts +10 -0
  82. package/dist/release-manage/release-title/index.js +94 -0
  83. package/dist/release-manage/release-title/index.module.less +21 -0
  84. package/dist/release-manage/release-title/plus.svg +20 -0
  85. package/dist/release-video-card/imgs/detail.svg +21 -0
  86. package/dist/release-video-card/imgs/edit.svg +19 -0
  87. package/dist/release-video-card/imgs/fail.svg +22 -0
  88. package/dist/release-video-card/imgs/fb.svg +20 -0
  89. package/dist/release-video-card/imgs/ins.svg +34 -0
  90. package/dist/release-video-card/imgs/more.svg +18 -0
  91. package/dist/release-video-card/imgs/new.svg +22 -0
  92. package/dist/release-video-card/imgs/play.svg +17 -0
  93. package/dist/release-video-card/imgs/process.svg +24 -0
  94. package/dist/release-video-card/imgs/publish.svg +24 -0
  95. package/dist/release-video-card/imgs/success.svg +22 -0
  96. package/dist/release-video-card/imgs/tk.svg +29 -0
  97. package/dist/release-video-card/imgs/tw.svg +21 -0
  98. package/dist/release-video-card/imgs/wait.svg +22 -0
  99. package/dist/release-video-card/imgs/yt.svg +25 -0
  100. package/dist/release-video-card/imgs/ytb.svg +1 -0
  101. package/dist/release-video-card/index.d.ts +35 -0
  102. package/dist/release-video-card/index.js +221 -0
  103. package/dist/release-video-card/index.module.less +223 -0
  104. package/dist/sound-wave/index.d.ts +3 -0
  105. package/dist/sound-wave/index.js +22 -0
  106. package/dist/sound-wave/index.module.less +105 -0
  107. package/dist/text-ellipsis/index.d.ts +8 -0
  108. package/dist/text-ellipsis/index.js +57 -0
  109. package/dist/text-ellipsis/index.module.less +8 -0
  110. package/dist/utils/index.d.ts +8 -0
  111. package/dist/utils/index.js +101 -0
  112. package/dist/video-list/delete.svg +26 -0
  113. package/dist/video-list/index.d.ts +46 -0
  114. package/dist/video-list/index.js +219 -0
  115. package/dist/video-list/index.module.less +127 -0
  116. package/package.json +83 -0
@@ -0,0 +1,245 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
+ 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."); }
9
+ 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); }
10
+ 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; }
11
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
12
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
+ import React, { useEffect, useMemo, useState } from "react";
14
+ import { Image } from "antd";
15
+ import ReactDOM from "react-dom";
16
+
17
+ // @ts-ignore
18
+ import Close from "./close.svg";
19
+ // @ts-ignore
20
+ import Play from "./play.svg";
21
+ // @ts-ignore
22
+ import styles from "./index.module.less";
23
+ var VideoPlay = function VideoPlay(_ref) {
24
+ var url = _ref.url,
25
+ type = _ref.type,
26
+ previewUrl = _ref.previewUrl,
27
+ onPlayClick = _ref.onPlayClick,
28
+ renderContent = _ref.renderContent,
29
+ disabled = _ref.disabled;
30
+ var _useState = useState(false),
31
+ _useState2 = _slicedToArray(_useState, 2),
32
+ isPlaying = _useState2[0],
33
+ setIsPlaying = _useState2[1];
34
+ var _useState3 = useState(false),
35
+ _useState4 = _slicedToArray(_useState3, 2),
36
+ isPreviewVisible = _useState4[0],
37
+ setIsPreviewVisible = _useState4[1];
38
+ var _useState5 = useState(0),
39
+ _useState6 = _slicedToArray(_useState5, 2),
40
+ currentImageIndex = _useState6[0],
41
+ setCurrentImageIndex = _useState6[1];
42
+ var mediaInfo = useMemo(function () {
43
+ if (type === 'video') {
44
+ return {
45
+ url: url === null || url === void 0 ? void 0 : url[0],
46
+ previewUrl: previewUrl === null || previewUrl === void 0 ? void 0 : previewUrl[0]
47
+ };
48
+ } else {
49
+ return {
50
+ url: url,
51
+ previewUrl: previewUrl
52
+ };
53
+ }
54
+ }, [type, url, previewUrl]);
55
+ useEffect(function () {
56
+ if (isPlaying) {
57
+ document.body.style.overflow = 'hidden';
58
+ document.body.style.touchAction = 'none';
59
+ } else {
60
+ document.body.style.overflow = '';
61
+ document.body.style.touchAction = '';
62
+ }
63
+ return function () {
64
+ document.body.style.overflow = '';
65
+ document.body.style.touchAction = '';
66
+ };
67
+ }, [isPlaying]);
68
+ var handleOverlayHover = function handleOverlayHover() {};
69
+ var handlePreviewVisibleChange = function handlePreviewVisibleChange(visible) {
70
+ setIsPreviewVisible(visible);
71
+ };
72
+ var handleOverlayClick = function handleOverlayClick() {
73
+ setIsPreviewVisible(true);
74
+ };
75
+ var handlePlayClick = function handlePlayClick() {
76
+ if (onPlayClick) {
77
+ return onPlayClick();
78
+ }
79
+ setIsPlaying(true);
80
+ };
81
+ var handleClose = function handleClose() {
82
+ setIsPlaying(false);
83
+ };
84
+ var renderVideoOverlay = function renderVideoOverlay() {
85
+ if (!isPlaying) return null;
86
+ return /*#__PURE__*/React.createElement("div", {
87
+ className: styles['video-overlay'],
88
+ onClick: handleClose
89
+ }, /*#__PURE__*/React.createElement("video", {
90
+ className: "".concat(styles['video-player'], " ").concat(styles['fade-in']),
91
+ src: mediaInfo.previewUrl,
92
+ controls: true,
93
+ autoPlay: true,
94
+ onClick: function onClick(e) {
95
+ return e.stopPropagation();
96
+ },
97
+ crossOrigin: "anonymous"
98
+ }, /*#__PURE__*/React.createElement("source", {
99
+ src: mediaInfo.url,
100
+ type: "video/mp4"
101
+ }), /*#__PURE__*/React.createElement("source", {
102
+ src: mediaInfo.url,
103
+ type: "video/webm"
104
+ }), /*#__PURE__*/React.createElement("source", {
105
+ src: mediaInfo.url,
106
+ type: "video/ogg"
107
+ }), /*#__PURE__*/React.createElement("source", {
108
+ src: mediaInfo.url,
109
+ type: "video/avi"
110
+ })), /*#__PURE__*/React.createElement("img", {
111
+ src: Close,
112
+ alt: "Close",
113
+ className: styles['close-icon'],
114
+ onClick: handleClose
115
+ }));
116
+ };
117
+ var renderVideo = function renderVideo() {
118
+ return /*#__PURE__*/React.createElement("div", {
119
+ className: styles['wrap']
120
+ }, /*#__PURE__*/React.createElement("div", {
121
+ className: styles['full-image']
122
+ }, /*#__PURE__*/React.createElement(Image, {
123
+ src: mediaInfo.url,
124
+ preview: false,
125
+ width: '100%',
126
+ height: '100%'
127
+ }), disabled && /*#__PURE__*/React.createElement("div", {
128
+ className: styles['disabled-overlay']
129
+ }), renderContent && /*#__PURE__*/React.createElement("div", {
130
+ className: styles['content-wrap']
131
+ }, renderContent()), /*#__PURE__*/React.createElement("div", {
132
+ className: styles['play'],
133
+ onClick: handlePlayClick
134
+ }, /*#__PURE__*/React.createElement("img", {
135
+ src: Play,
136
+ alt: "Play"
137
+ }))), /*#__PURE__*/ReactDOM.createPortal(renderVideoOverlay(), document.body));
138
+ };
139
+ var renderImages = function renderImages() {
140
+ var _mediaInfo$previewUrl, _mediaInfo$previewUrl2, _mediaInfo$url, _mediaInfo$previewUrl3, _mediaInfo$url2, _mediaInfo$url3, _mediaInfo$previewUrl5, _mediaInfo$url4;
141
+ return /*#__PURE__*/React.createElement("div", {
142
+ className: styles['wrap']
143
+ }, disabled && /*#__PURE__*/React.createElement("div", {
144
+ className: styles['disabled-overlay'],
145
+ onMouseEnter: handleOverlayHover
146
+ }, /*#__PURE__*/React.createElement("div", {
147
+ className: styles['preview-text'],
148
+ onClick: handleOverlayClick
149
+ }, "\u9884\u89C8")), renderContent && /*#__PURE__*/React.createElement("div", {
150
+ className: styles['content-wrap']
151
+ }, renderContent()), mediaInfo.url.length === 1 && /*#__PURE__*/React.createElement(Image, {
152
+ src: mediaInfo.url[0],
153
+ className: styles['full-image'],
154
+ wrapperClassName: styles['image-wrapper'],
155
+ width: '100%',
156
+ height: '100%',
157
+ preview: onPlayClick ? false : {
158
+ visible: isPreviewVisible,
159
+ src: (_mediaInfo$previewUrl = (_mediaInfo$previewUrl2 = mediaInfo.previewUrl) === null || _mediaInfo$previewUrl2 === void 0 ? void 0 : _mediaInfo$previewUrl2[0]) !== null && _mediaInfo$previewUrl !== void 0 ? _mediaInfo$previewUrl : (_mediaInfo$url = mediaInfo.url) === null || _mediaInfo$url === void 0 ? void 0 : _mediaInfo$url[0],
160
+ onVisibleChange: handlePreviewVisibleChange
161
+ }
162
+ }), mediaInfo.url.length === 2 && /*#__PURE__*/React.createElement("div", {
163
+ className: styles['two-images']
164
+ }, /*#__PURE__*/React.createElement(Image.PreviewGroup, {
165
+ preview: onPlayClick ? false : _objectSpread(_objectSpread({
166
+ visible: isPreviewVisible
167
+ }, disabled ? {} : {
168
+ src: (_mediaInfo$previewUrl3 = mediaInfo.previewUrl) !== null && _mediaInfo$previewUrl3 !== void 0 && _mediaInfo$previewUrl3.length ? mediaInfo.previewUrl[currentImageIndex] : (_mediaInfo$url2 = mediaInfo.url) === null || _mediaInfo$url2 === void 0 ? void 0 : _mediaInfo$url2[currentImageIndex],
169
+ current: currentImageIndex
170
+ }), {}, {
171
+ onVisibleChange: handlePreviewVisibleChange,
172
+ onChange: function onChange(current) {
173
+ return setCurrentImageIndex(current);
174
+ }
175
+ })
176
+ }, (_mediaInfo$url3 = mediaInfo.url) === null || _mediaInfo$url3 === void 0 ? void 0 : _mediaInfo$url3.map(function (image, index) {
177
+ return /*#__PURE__*/React.createElement(Image, {
178
+ key: index,
179
+ src: image,
180
+ width: '100%',
181
+ height: '100%',
182
+ onClick: function onClick() {
183
+ var _mediaInfo$previewUrl4;
184
+ setCurrentImageIndex(index);
185
+ console.log((_mediaInfo$previewUrl4 = mediaInfo.previewUrl) === null || _mediaInfo$previewUrl4 === void 0 ? void 0 : _mediaInfo$previewUrl4[currentImageIndex]);
186
+ }
187
+ });
188
+ }))), mediaInfo.url.length === 3 && /*#__PURE__*/React.createElement("div", {
189
+ className: styles['three-images']
190
+ }, /*#__PURE__*/React.createElement(Image.PreviewGroup, {
191
+ preview: onPlayClick ? false : _objectSpread(_objectSpread({
192
+ visible: isPreviewVisible
193
+ }, disabled ? {} : {
194
+ src: (_mediaInfo$previewUrl5 = mediaInfo.previewUrl) !== null && _mediaInfo$previewUrl5 !== void 0 && _mediaInfo$previewUrl5.length ? mediaInfo.previewUrl[currentImageIndex] : (_mediaInfo$url4 = mediaInfo.url) === null || _mediaInfo$url4 === void 0 ? void 0 : _mediaInfo$url4[currentImageIndex],
195
+ current: currentImageIndex
196
+ }), {}, {
197
+ onVisibleChange: handlePreviewVisibleChange,
198
+ onChange: function onChange(current) {
199
+ return setCurrentImageIndex(current);
200
+ }
201
+ })
202
+ }, /*#__PURE__*/React.createElement("div", {
203
+ style: {
204
+ flex: 1
205
+ }
206
+ }, /*#__PURE__*/React.createElement(Image, {
207
+ src: mediaInfo.url[0],
208
+ width: '100%',
209
+ height: '100%',
210
+ onClick: function onClick() {
211
+ return setCurrentImageIndex(0);
212
+ }
213
+ })), /*#__PURE__*/React.createElement("div", {
214
+ style: {
215
+ flex: 1
216
+ }
217
+ }, /*#__PURE__*/React.createElement("div", {
218
+ style: {
219
+ width: '100%',
220
+ height: '50%'
221
+ }
222
+ }, /*#__PURE__*/React.createElement(Image, {
223
+ src: mediaInfo.url[1],
224
+ width: '100%',
225
+ height: '100%',
226
+ onClick: function onClick() {
227
+ return setCurrentImageIndex(1);
228
+ }
229
+ })), /*#__PURE__*/React.createElement("div", {
230
+ style: {
231
+ width: '100%',
232
+ height: '50%'
233
+ }
234
+ }, /*#__PURE__*/React.createElement(Image, {
235
+ src: mediaInfo.url[2],
236
+ width: '100%',
237
+ height: '100%',
238
+ onClick: function onClick() {
239
+ return setCurrentImageIndex(2);
240
+ }
241
+ }))))));
242
+ };
243
+ return type === 'video' ? renderVideo() : renderImages();
244
+ };
245
+ export default VideoPlay;
@@ -0,0 +1,196 @@
1
+ .wrap {
2
+ position: relative;
3
+ height: 100%;
4
+ width: 100%;
5
+ }
6
+
7
+ .full-image {
8
+ width: 100%;
9
+ height: 100%;
10
+ object-fit: cover;
11
+ position: relative;
12
+ }
13
+
14
+ .play {
15
+ position: absolute;
16
+ top: 50%;
17
+ left: 50%;
18
+ transform: translate(-50%, -50%);
19
+ cursor: pointer;
20
+ z-index: 20;
21
+ }
22
+
23
+ .video-overlay {
24
+ position: fixed;
25
+ top: 0;
26
+ left: 0;
27
+ width: 100vw;
28
+ height: 100vh;
29
+ background-color: rgba(0, 0, 0, 0.45);
30
+ display: flex;
31
+ justify-content: center;
32
+ align-items: center;
33
+ opacity: 0;
34
+ animation: fadeIn 1s forwards;
35
+ z-index: 9999;
36
+ }
37
+
38
+ @keyframes fadeIn {
39
+ to {
40
+ opacity: 1;
41
+ }
42
+ }
43
+
44
+ .fade-in {
45
+ opacity: 0;
46
+ animation: videoFadeIn 1s forwards;
47
+ }
48
+
49
+ @keyframes videoFadeIn {
50
+ to {
51
+ opacity: 1;
52
+ }
53
+ }
54
+
55
+ .video-player {
56
+ height: auto;
57
+ max-height: 80%;
58
+ ::cue {
59
+ white-space: pre-wrap;
60
+ background: transparent;
61
+ }
62
+ }
63
+
64
+ .close-icon {
65
+ position: absolute;
66
+ top: 20px;
67
+ right: 50px;
68
+ width: 32px;
69
+ height: 32px;
70
+ cursor: pointer;
71
+ }
72
+
73
+
74
+ .two-images {
75
+ display: flex;
76
+ width: 100%;
77
+ height: 100%;
78
+ }
79
+
80
+ .half-image {
81
+ width: 50%;
82
+ height: auto;
83
+ }
84
+
85
+ .left-img {
86
+ width: 100%;
87
+ height: 100%;
88
+ }
89
+
90
+ .three-images {
91
+ display: flex;
92
+ width: 100%;
93
+ height: 100%;
94
+ }
95
+
96
+ .disabled-overlay {
97
+ position: absolute;
98
+ top: 50%;
99
+ left: 50%;
100
+ transform: translate(-50%, -50%);
101
+ cursor: pointer;
102
+ z-index: 10;
103
+ width: 100%;
104
+ height: 100%;
105
+ background: rgba(255,255,255,0.6);
106
+ }
107
+
108
+ .preview-overlay {
109
+ background: rgba(255,255,255,0.6);
110
+ width: 100%;
111
+ height: 100%;
112
+ }
113
+
114
+
115
+ .with-bg {
116
+ position: relative;
117
+ }
118
+
119
+ .with-bg::after {
120
+ content: "";
121
+ position: absolute;
122
+ top: 0;
123
+ left: 0;
124
+ right: 0;
125
+ bottom: 0;
126
+ background: rgba(255, 255, 255, 0.6);
127
+ z-index: 1;
128
+ }
129
+
130
+ .with-bg {
131
+ position: relative;
132
+ z-index: 2;
133
+ }
134
+
135
+ .image-wrapper {
136
+ background: rgba(255, 255, 255, 0.6);
137
+ display: inline-block;
138
+ }
139
+
140
+ .mask {
141
+ position: absolute;
142
+ inset: 0;
143
+ width: 100%;
144
+ height: 100%;
145
+ display: flex;
146
+ align-items: center;
147
+ justify-content: center;
148
+ color: #fff;
149
+ background: rgba(0, 0, 0, 0.5);
150
+ cursor: pointer;
151
+ opacity: 0;
152
+ transition: opacity 0.3s;
153
+ }
154
+
155
+ .mask_info{
156
+ overflow: hidden;
157
+ white-space: nowrap;
158
+ text-overflow: ellipsis;
159
+ padding: 0 4px;
160
+ width: 100%;
161
+ height: 100%;
162
+ }
163
+
164
+ .disabled-overlay {
165
+ width: 100%;
166
+ height: 100%;
167
+ cursor: pointer;
168
+ display: flex;
169
+ justify-content: center;
170
+ align-items: center;
171
+ z-index: 15;
172
+ }
173
+
174
+ .content-wrap {
175
+ position: absolute;
176
+ top: 0;
177
+ left: 0;
178
+ z-index: 12;
179
+ }
180
+
181
+ .preview-text {
182
+ font-size: 16px;
183
+ color: #FFFFFF;
184
+ border-radius: 4px;
185
+ cursor: pointer;
186
+ display: none;
187
+ }
188
+
189
+ .disabled-overlay:hover .preview-text {
190
+ display: block;
191
+ }
192
+
193
+ .full-image {
194
+ position: relative;
195
+ //z-index: 10;
196
+ }
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="48px" height="48px" viewBox="0 0 48 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 62 (91390) - https://sketch.com -->
4
+ <title>矩形</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <g id="发布管理" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
+ <g id="发布管理-列表模式-选择账号" transform="translate(-862.000000, -560.000000)">
8
+ <g id="编组-15备份-4" transform="translate(810.000000, 488.000000)">
9
+ <g id="编组备份-5" transform="translate(52.000000, 72.000000)">
10
+ <rect id="矩形" fill="#D8D8D8" opacity="0" x="0" y="0" width="48" height="48"></rect>
11
+ <circle id="椭圆形" stroke="#FFFFFF" stroke-width="3" fill-opacity="0.25" fill="#000000" cx="24" cy="24" r="18.5"></circle>
12
+ <path d="M21.1138257,18.2134066 C20.2233117,17.7007919 19.5,18.1429341 19.5,19.2048477 L19.5,30.2960524 C19.5,31.3502429 20.2223879,31.8010735 21.1138257,31.2874935 L30.8328071,25.6815552 C31.7214736,25.1679751 31.7233211,24.3338903 30.8328071,23.8193449 L21.1138257,18.2134066 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero"></path>
13
+ </g>
14
+ </g>
15
+ </g>
16
+ </g>
17
+ </svg>
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ import { ModalProps } from 'antd';
3
+ interface ModalWrapperProps {
4
+ title: string | React.ReactNode;
5
+ content: React.ReactNode;
6
+ width?: number;
7
+ footer?: React.ReactNode;
8
+ children: React.ReactNode;
9
+ modalProps?: ModalProps;
10
+ onSuccess?: () => void;
11
+ btnClassName?: string;
12
+ onOpen?: () => void;
13
+ }
14
+ declare const ModalWrapper: React.FC<ModalWrapperProps & {
15
+ ref?: React.Ref<any>;
16
+ }>;
17
+ export default ModalWrapper;
@@ -0,0 +1,66 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
+ 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."); }
4
+ 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); }
5
+ 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; }
6
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
7
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
+ import React, { useState, useImperativeHandle, forwardRef } from "react";
9
+ import { Modal } from 'antd';
10
+ //@ts-ignore
11
+ var ModalWrapper = /*#__PURE__*/forwardRef(function (props, ref) {
12
+ // eslint-disable-next-line react/prop-types
13
+ var children = props.children,
14
+ title = props.title,
15
+ content = props.content,
16
+ onSuccess = props.onSuccess,
17
+ btnClassName = props.btnClassName,
18
+ onOpen = props.onOpen;
19
+ var _useState = useState(false),
20
+ _useState2 = _slicedToArray(_useState, 2),
21
+ isModalVisible = _useState2[0],
22
+ setIsModalVisible = _useState2[1];
23
+ var _useState3 = useState(false),
24
+ _useState4 = _slicedToArray(_useState3, 2),
25
+ confirmLoading = _useState4[0],
26
+ setConfirmLoading = _useState4[1];
27
+ var showModal = function showModal() {
28
+ setIsModalVisible(true);
29
+ onOpen === null || onOpen === void 0 || onOpen();
30
+ };
31
+ var closeModal = function closeModal() {
32
+ setIsModalVisible(false);
33
+ };
34
+ var handleOk = function handleOk() {
35
+ setConfirmLoading(true);
36
+ Promise.resolve(onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess()).then(function () {
37
+ setConfirmLoading(false);
38
+ closeModal();
39
+ }).catch(function () {
40
+ setConfirmLoading(false);
41
+ });
42
+ };
43
+ var handleCancel = function handleCancel() {
44
+ closeModal();
45
+ };
46
+ useImperativeHandle(ref, function () {
47
+ return {
48
+ closeModal: closeModal
49
+ };
50
+ });
51
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
52
+ onClick: showModal,
53
+ className: btnClassName
54
+ }, children), /*#__PURE__*/React.createElement(Modal, _extends({
55
+ title: title,
56
+ width: props.width || 900,
57
+ open: isModalVisible,
58
+ onOk: handleOk,
59
+ onCancel: handleCancel,
60
+ confirmLoading: confirmLoading,
61
+ cancelText: "\u53D6\u6D88",
62
+ okText: "\u786E\u5B9A"
63
+ }, props.modalProps), content));
64
+ });
65
+ ModalWrapper.displayName = 'ModalWrapper';
66
+ export default ModalWrapper;
@@ -0,0 +1,25 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 62 (91390) - https://sketch.com -->
4
+ <title>矩形</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <g id="发布管理" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
+ <g id="发布管理-任务详情--文本任务-异常情况" transform="translate(-1568.000000, -507.000000)">
8
+ <g id="编组-16" transform="translate(1040.000000, 56.000000)">
9
+ <g id="编组-17" transform="translate(104.000000, 81.000000)">
10
+ <g id="编组-33" transform="translate(0.000000, 360.000000)">
11
+ <g id="编组-31备份" transform="translate(252.000000, 0.000000)">
12
+ <g id="编组-33" transform="translate(172.000000, 10.000000)">
13
+ <rect id="矩形" fill="#D8D8D8" opacity="0" x="0" y="0" width="16" height="16"></rect>
14
+ <g id="编组" transform="translate(3.000000, 3.000000)" stroke="#142A51" stroke-linecap="round" stroke-linejoin="round">
15
+ <line x1="0" y1="0" x2="10" y2="10" id="路径"></line>
16
+ <line x1="0" y1="10" x2="10" y2="0" id="路径"></line>
17
+ </g>
18
+ </g>
19
+ </g>
20
+ </g>
21
+ </g>
22
+ </g>
23
+ </g>
24
+ </g>
25
+ </svg>
@@ -0,0 +1,20 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 62 (91390) - https://sketch.com -->
4
+ <title>矩形</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <g id="发布管理" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
+ <g id="发布管理-任务详情--视频任务" transform="translate(-1144.000000, -502.000000)" fill-rule="nonzero">
8
+ <g id="编组-16" transform="translate(1040.000000, 56.000000)">
9
+ <g id="编组-17" transform="translate(104.000000, 81.000000)">
10
+ <g id="编组-33" transform="translate(0.000000, 364.000000)">
11
+ <g id="facebook" transform="translate(0.000000, 1.000000)">
12
+ <rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="32" height="32"></rect>
13
+ <path d="M30.6666667,15.9917267 C30.6157794,8.15081431 24.4774152,1.71951574 16.6917967,1.34998948 C8.90617812,0.980463233 2.19319237,6.80180241 1.40875977,14.6030701 C0.624327162,22.4043379 6.04248736,29.4601799 13.7439479,30.6666667 L13.7439479,20.4520913 L9.98711285,20.4520913 L9.98711285,15.9917267 L13.7439479,15.9917267 L13.7439479,12.0534404 C13.7969709,9.36045579 15.9413711,7.18320482 18.6176799,7.10504615 C19.8896924,7.03924118 21.1647196,7.14613144 22.4083603,7.42283294 L22.4083603,11.0206334 L19.9940579,11.0206334 C19.4953209,11.0264153 19.0200291,11.2345205 18.6759437,11.5977659 C18.3318582,11.9610112 18.1481276,12.4486254 18.1664084,12.9500532 L18.1664084,15.9917267 L22.2955424,15.9917267 L21.6411988,20.4520913 L18.1664084,20.4520913 L18.1664084,30.6666667 C25.3684945,29.560267 30.683123,23.3210284 30.6666667,15.9917267 L30.6666667,15.9917267 Z" id="路径" fill="#1876F2"></path>
14
+ </g>
15
+ </g>
16
+ </g>
17
+ </g>
18
+ </g>
19
+ </g>
20
+ </svg>
@@ -0,0 +1,36 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 62 (91390) - https://sketch.com -->
4
+ <title>矩形</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs>
7
+ <linearGradient x1="14.6140845%" y1="85.3314554%" x2="85.2446009%" y2="14.7007042%" id="linearGradient-1">
8
+ <stop stop-color="#F9ED41" offset="0%"></stop>
9
+ <stop stop-color="#FF833D" offset="24.12%"></stop>
10
+ <stop stop-color="#EE5568" offset="40.1%"></stop>
11
+ <stop stop-color="#E7407B" offset="48.88%"></stop>
12
+ <stop stop-color="#0028FF" offset="100%"></stop>
13
+ </linearGradient>
14
+ </defs>
15
+ <g id="发布管理" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
16
+ <g id="发布管理-任务详情--视频任务" transform="translate(-1144.000000, -599.000000)" fill-rule="nonzero">
17
+ <g id="编组-16" transform="translate(1040.000000, 56.000000)">
18
+ <g id="编组-17" transform="translate(104.000000, 81.000000)">
19
+ <g id="编组-33" transform="translate(0.000000, 364.000000)">
20
+ <g id="instagram-fill" transform="translate(0.000000, 98.000000)">
21
+ <rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="32" height="32"></rect>
22
+ <g id="编组" transform="translate(1.333333, 1.333333)">
23
+ <circle id="椭圆形" fill="url(#linearGradient-1)" cx="14.5302326" cy="14.5984496" r="14.5302326"></circle>
24
+ <g transform="translate(5.457364, 5.457364)" fill="#FFFFFF">
25
+ <path d="M12.8930233,0.272868217 L5.18449612,0.272868217 C2.45581395,0.272868217 0.204651163,2.52403101 0.204651163,5.25271318 L0.204651163,12.9612403 C0.204651163,15.6899225 2.45581395,17.9410853 5.18449612,17.9410853 L12.8930233,17.9410853 C15.6217054,17.9410853 17.8728682,15.6899225 17.8728682,12.9612403 L17.8728682,5.25271318 C17.8728682,2.52403101 15.6217054,0.272868217 12.8930233,0.272868217 Z M16.303876,12.8248062 C16.303876,14.7348837 14.7348837,16.303876 12.8248062,16.303876 L5.32093023,16.303876 C3.41085271,16.303876 1.84186047,14.7348837 1.84186047,12.8248062 L1.84186047,5.32093023 C1.84186047,3.41085271 3.41085271,1.84186047 5.32093023,1.84186047 L12.8248062,1.84186047 C14.7348837,1.84186047 16.303876,3.41085271 16.303876,5.32093023 L16.303876,12.8248062 Z" id="形状"></path>
26
+ <path d="M9.07286822,4.57054264 C6.54883721,4.57054264 4.57054264,6.61705426 4.57054264,9.07286822 C4.57054264,11.5286822 6.61705426,13.5751938 9.07286822,13.5751938 C11.5968992,13.5751938 13.5751938,11.5286822 13.5751938,9.07286822 C13.5751938,6.61705426 11.5286822,4.57054264 9.07286822,4.57054264 Z M9.07286822,11.9379845 C7.50387597,11.9379845 6.20775194,10.6418605 6.20775194,9.07286822 C6.20775194,7.50387597 7.50387597,6.20775194 9.07286822,6.20775194 C10.6418605,6.20775194 11.9379845,7.50387597 11.9379845,9.07286822 C11.9379845,10.7100775 10.6418605,11.9379845 9.07286822,11.9379845 Z" id="形状"></path>
27
+ <path d="M14.8031008,4.36589147 C14.8031008,4.97984496 14.3255814,5.45736434 13.7116279,5.45736434 C13.0976744,5.45736434 12.620155,4.97984496 12.620155,4.36589147 C12.620155,3.75193798 13.0976744,3.2744186 13.7116279,3.2744186 C14.3255814,3.2744186 14.8031008,3.82015504 14.8031008,4.36589147 Z" id="路径"></path>
28
+ </g>
29
+ </g>
30
+ </g>
31
+ </g>
32
+ </g>
33
+ </g>
34
+ </g>
35
+ </g>
36
+ </svg>