@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.
- package/LICENSE +21 -0
- package/README.md +43 -0
- package/dist/account-select/imgs/down.svg +24 -0
- package/dist/account-select/imgs/fb-disabled.svg +27 -0
- package/dist/account-select/imgs/fb.svg +20 -0
- package/dist/account-select/imgs/up.svg +20 -0
- package/dist/account-select/index.d.ts +39 -0
- package/dist/account-select/index.js +221 -0
- package/dist/account-select/index.module.less +58 -0
- package/dist/ai-empty/index.d.ts +3 -0
- package/dist/ai-empty/index.js +51 -0
- package/dist/ai-empty/index.module.less +60 -0
- package/dist/batch-label/index.d.ts +14 -0
- package/dist/batch-label/index.js +215 -0
- package/dist/batch-label/index.module.less +96 -0
- package/dist/card-scroll/index.d.ts +6 -0
- package/dist/card-scroll/index.js +75 -0
- package/dist/components/modal/index.d.ts +16 -0
- package/dist/components/modal/index.js +70 -0
- package/dist/cover-modal/boll.gif +0 -0
- package/dist/cover-modal/delete.svg +24 -0
- package/dist/cover-modal/index.d.ts +20 -0
- package/dist/cover-modal/index.js +410 -0
- package/dist/cover-modal/index.module.less +76 -0
- package/dist/cover-modal/question.svg +1 -0
- package/dist/cover-modal/upload.png +0 -0
- package/dist/custom.d.ts +10 -0
- package/dist/drawer-task/img/back.png +0 -0
- package/dist/drawer-task/img/close.svg +18 -0
- package/dist/drawer-task/img/icon.svg +20 -0
- package/dist/drawer-task/index.d.ts +24 -0
- package/dist/drawer-task/index.js +130 -0
- package/dist/drawer-task/index.module.less +85 -0
- package/dist/dynamic-form/index.d.ts +33 -0
- package/dist/dynamic-form/index.js +154 -0
- package/dist/excel-import/excel-import.module.less +32 -0
- package/dist/excel-import/index.d.ts +10 -0
- package/dist/excel-import/index.js +76 -0
- package/dist/form-item/index.d.ts +12 -0
- package/dist/form-item/index.js +34 -0
- package/dist/form-item/index.module.less +45 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +22 -0
- package/dist/label-select/imgs/close.svg +24 -0
- package/dist/label-select/imgs/plus.svg +24 -0
- package/dist/label-select/index.d.ts +10 -0
- package/dist/label-select/index.js +173 -0
- package/dist/label-select/index.module.less +25 -0
- package/dist/layout/index.d.ts +3 -0
- package/dist/layout/index.js +10 -0
- package/dist/layout/index.module.less +6 -0
- package/dist/link-filter/index.d.ts +25 -0
- package/dist/link-filter/index.js +242 -0
- package/dist/link-filter/index.module.less +7 -0
- package/dist/media-play/close.svg +1 -0
- package/dist/media-play/index.d.ts +13 -0
- package/dist/media-play/index.js +245 -0
- package/dist/media-play/index.module.less +196 -0
- package/dist/media-play/play.svg +17 -0
- package/dist/modal-wrapper/index.d.ts +17 -0
- package/dist/modal-wrapper/index.js +66 -0
- package/dist/publish-account/imgs/close.svg +25 -0
- package/dist/publish-account/imgs/fb.svg +20 -0
- package/dist/publish-account/imgs/ins.svg +36 -0
- package/dist/publish-account/imgs/tk.svg +31 -0
- package/dist/publish-account/imgs/tt.svg +21 -0
- package/dist/publish-account/imgs/yt.svg +25 -0
- package/dist/publish-account/index.d.ts +31 -0
- package/dist/publish-account/index.js +118 -0
- package/dist/publish-account/index.module.less +70 -0
- package/dist/publish-status/imgs/fail.svg +22 -0
- package/dist/publish-status/imgs/process.svg +24 -0
- package/dist/publish-status/imgs/publish.svg +24 -0
- package/dist/publish-status/imgs/success.svg +22 -0
- package/dist/publish-status/imgs/wait.svg +22 -0
- package/dist/publish-status/index.d.ts +5 -0
- package/dist/publish-status/index.js +55 -0
- package/dist/publish-status/index.module.less +8 -0
- package/dist/release-manage/index.d.ts +6 -0
- package/dist/release-manage/index.js +5 -0
- package/dist/release-manage/release-title/index.d.ts +10 -0
- package/dist/release-manage/release-title/index.js +94 -0
- package/dist/release-manage/release-title/index.module.less +21 -0
- package/dist/release-manage/release-title/plus.svg +20 -0
- package/dist/release-video-card/imgs/detail.svg +21 -0
- package/dist/release-video-card/imgs/edit.svg +19 -0
- package/dist/release-video-card/imgs/fail.svg +22 -0
- package/dist/release-video-card/imgs/fb.svg +20 -0
- package/dist/release-video-card/imgs/ins.svg +34 -0
- package/dist/release-video-card/imgs/more.svg +18 -0
- package/dist/release-video-card/imgs/new.svg +22 -0
- package/dist/release-video-card/imgs/play.svg +17 -0
- package/dist/release-video-card/imgs/process.svg +24 -0
- package/dist/release-video-card/imgs/publish.svg +24 -0
- package/dist/release-video-card/imgs/success.svg +22 -0
- package/dist/release-video-card/imgs/tk.svg +29 -0
- package/dist/release-video-card/imgs/tw.svg +21 -0
- package/dist/release-video-card/imgs/wait.svg +22 -0
- package/dist/release-video-card/imgs/yt.svg +25 -0
- package/dist/release-video-card/imgs/ytb.svg +1 -0
- package/dist/release-video-card/index.d.ts +35 -0
- package/dist/release-video-card/index.js +221 -0
- package/dist/release-video-card/index.module.less +223 -0
- package/dist/sound-wave/index.d.ts +3 -0
- package/dist/sound-wave/index.js +22 -0
- package/dist/sound-wave/index.module.less +105 -0
- package/dist/text-ellipsis/index.d.ts +8 -0
- package/dist/text-ellipsis/index.js +57 -0
- package/dist/text-ellipsis/index.module.less +8 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.js +101 -0
- package/dist/video-list/delete.svg +26 -0
- package/dist/video-list/index.d.ts +46 -0
- package/dist/video-list/index.js +219 -0
- package/dist/video-list/index.module.less +127 -0
- package/package.json +83 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# rpa-ui
|
|
2
|
+
|
|
3
|
+
[](https://npmjs.org/package/rpa-ui)
|
|
4
|
+
[](https://npmjs.org/package/rpa-ui)
|
|
5
|
+
|
|
6
|
+
A react library developed with dumi
|
|
7
|
+
|
|
8
|
+
## Usage
|
|
9
|
+
|
|
10
|
+
TODO
|
|
11
|
+
|
|
12
|
+
## Options
|
|
13
|
+
|
|
14
|
+
TODO
|
|
15
|
+
|
|
16
|
+
## Development
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# install dependencies
|
|
20
|
+
$ pnpm install
|
|
21
|
+
|
|
22
|
+
# develop library by docs demo
|
|
23
|
+
$ pnpm start
|
|
24
|
+
|
|
25
|
+
# build library source code
|
|
26
|
+
$ pnpm run build
|
|
27
|
+
|
|
28
|
+
# build library source code in watch mode
|
|
29
|
+
$ pnpm run build:watch
|
|
30
|
+
|
|
31
|
+
# build docs
|
|
32
|
+
$ pnpm run docs:build
|
|
33
|
+
|
|
34
|
+
# Locally preview the production build.
|
|
35
|
+
$ pnpm run docs:preview
|
|
36
|
+
|
|
37
|
+
# check your project for potential problems
|
|
38
|
+
$ pnpm run doctor
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## LICENSE
|
|
42
|
+
|
|
43
|
+
MIT
|
|
@@ -0,0 +1,24 @@
|
|
|
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(-1023.000000, -713.000000)">
|
|
8
|
+
<g id="编组-16" transform="translate(420.000000, 263.000000)">
|
|
9
|
+
<g id="编组-20" transform="translate(24.000000, 387.000000)">
|
|
10
|
+
<g id="编组-11备份-4" transform="translate(372.000000, 46.000000)">
|
|
11
|
+
<g id="下拉" transform="translate(215.000000, 25.000000) rotate(-90.000000) translate(-215.000000, -25.000000) translate(207.000000, 17.000000)">
|
|
12
|
+
<g id="编组-18">
|
|
13
|
+
<rect id="矩形" fill="#D8D8D8" opacity="0" x="0" y="0" width="16" height="16"></rect>
|
|
14
|
+
<g id="编组" transform="translate(5.000000, 3.000000)" stroke="#9EA7B5" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5">
|
|
15
|
+
<polyline id="路径" points="5 10 0 5 5 0"></polyline>
|
|
16
|
+
</g>
|
|
17
|
+
</g>
|
|
18
|
+
</g>
|
|
19
|
+
</g>
|
|
20
|
+
</g>
|
|
21
|
+
</g>
|
|
22
|
+
</g>
|
|
23
|
+
</g>
|
|
24
|
+
</svg>
|
|
@@ -0,0 +1,27 @@
|
|
|
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(-1089.000000, -460.000000)" fill-rule="nonzero">
|
|
8
|
+
<g id="编组-16" transform="translate(420.000000, 30.000000)">
|
|
9
|
+
<g id="编组-20" transform="translate(24.000000, 361.000000)">
|
|
10
|
+
<g id="编组-11备份-5" transform="translate(644.000000, 68.000000)">
|
|
11
|
+
<g id="编组-9" transform="translate(1.000000, 1.000000)">
|
|
12
|
+
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="48" height="48"></rect>
|
|
13
|
+
<g id="编组" transform="translate(2.000000, 2.000000)">
|
|
14
|
+
<circle id="椭圆形" fill="#D4DBE7" cx="22" cy="22" r="22"></circle>
|
|
15
|
+
<g transform="translate(9.474074, 7.844444)" fill="#FFFFFF" id="路径">
|
|
16
|
+
<path d="M6.43111111,22.9881481 C6.4637037,23.0207407 6.4962963,23.0207407 6.4962963,23.0533333 C6.72444444,23.2162963 6.92,23.477037 7.14814815,23.6725926 C7.86518519,24.2592593 8.68,24.5851852 9.62518519,24.6177778 C11.8414815,24.7481481 13.7644444,23.0859259 14.0251852,20.9022222 C14.0251852,20.8044444 14.0251852,20.6740741 14.0251852,20.5762963 C14.0251852,13.9925926 14.0251852,7.40888889 14.0251852,0.825185185 C14.0251852,0.368888889 14.0251852,0.368888889 14.4814815,0.368888889 C15.4918519,0.368888889 16.4696296,0.368888889 17.48,0.368888889 C17.5777778,0.368888889 17.6755556,0.336296296 17.7733333,0.401481481 C17.7733333,0.401481481 17.7733333,0.401481481 17.8059259,0.401481481 C17.8385185,0.466666667 17.8711111,0.499259259 17.8711111,0.564444444 C18.2622222,2.32444444 19.1748148,3.75851852 20.6414815,4.83407407 C20.7392593,4.89925926 20.8044444,4.99703704 20.9022222,5.06222222 C20.9674074,5.12740741 21.0325926,5.16 21.0977778,5.22518519 C21.3259259,5.35555556 21.4888889,5.5837037 21.717037,5.74666667 C22.5318519,6.43111111 23.4444444,6.88740741 24.4548148,7.14814815 C24.5525926,7.18074074 24.6503704,7.18074074 24.7155556,7.24592593 C24.7155556,7.24592593 24.7155556,7.24592593 24.7481481,7.24592593 C24.8133333,7.31111111 24.8133333,7.3762963 24.8133333,7.47407407 C24.8133333,8.64740741 24.8133333,9.78814815 24.8133333,10.9614815 C24.8133333,11.2222222 24.7807407,11.2548148 24.52,11.2548148 C23.6725926,11.2548148 22.8251852,11.157037 22.0103704,10.9614815 C20.5762963,10.6355556 19.2725926,10.0488889 18.0666667,9.26666667 C18.0014815,9.23407407 17.9362963,9.1362963 17.8711111,9.16888889 C17.7733333,9.20148148 17.8385185,9.33185185 17.8385185,9.39703704 C17.8385185,12.6562963 17.8385185,15.9155556 17.8385185,19.2074074 C17.8385185,21.4888889 17.0888889,23.5422222 15.5896296,25.2696296 C13.9925926,27.1274074 11.9718519,28.202963 9.56,28.4962963 C7.70222222,28.7244444 5.90962963,28.3985185 4.24740741,27.5511111 C3.98666667,27.4207407 3.72592593,27.2577778 3.46518519,27.0622222 C3.4,26.997037 3.30222222,26.9318519 3.23703704,26.8666667 C2.65037037,26.3777778 2.25925926,25.7585185 1.86814815,25.1392593 C1.28148148,24.1614815 0.922962963,23.1185185 0.727407407,21.9777778 C0.62962963,21.3259259 0.564444444,20.6740741 0.597037037,20.0548148 C0.727407407,17.9688889 1.41185185,16.1111111 2.74814815,14.4814815 C3.88888889,13.1125926 5.29037037,12.1674074 6.95259259,11.6133333 C7.63703704,11.3851852 8.35407407,11.2222222 9.1037037,11.1896296 C9.23407407,11.1896296 9.36444444,11.157037 9.52740741,11.157037 C9.59259259,11.157037 9.65777778,11.157037 9.72296296,11.1896296 C9.72296296,11.1896296 9.72296296,11.1896296 9.75555556,11.1896296 C9.78814815,11.2548148 9.78814815,11.32 9.78814815,11.3851852 C9.78814815,12.5585185 9.78814815,13.7318519 9.78814815,14.9051852 C9.78814815,14.9377778 9.78814815,15.002963 9.78814815,15.0355556 C9.78814815,15.1659259 9.72296296,15.1985185 9.62518519,15.1659259 C9.29925926,15.0681481 8.97333333,15.0355556 8.64740741,15.002963 C8.12592593,14.9703704 7.63703704,15.0355556 7.14814815,15.2311111 C5.51851852,15.8177778 4.54074074,16.9911111 4.34518519,18.6859259 C4.14962963,20.3807407 4.80148148,21.717037 6.20296296,22.6948148 C6.20296296,22.7925926 6.33333333,22.8903704 6.43111111,22.9881481 Z"></path>
|
|
17
|
+
<path d="M3.4,27.0622222 C3.46518519,27.0296296 3.49777778,27.0948148 3.53037037,27.1274074 C4.57333333,27.7792593 5.71407407,28.202963 6.92,28.3985185 C7.53925926,28.4962963 8.15851852,28.5288889 8.77777778,28.4962963 C10.8637037,28.3985185 12.6888889,27.7140741 14.3185185,26.3777778 C15.8503704,25.1066667 16.8933333,23.477037 17.4148148,21.5540741 C17.5777778,20.9348148 17.6755556,20.3155556 17.7081481,19.6962963 C17.7407407,19.3377778 17.7407407,18.9792593 17.7407407,18.6207407 C17.7407407,15.4918519 17.7407407,12.3955556 17.7407407,9.26666667 C17.7407407,9.20148148 17.7407407,9.1362963 17.7407407,9.03851852 C17.8059259,9.00592593 17.8711111,9.07111111 17.9037037,9.1037037 C19.0118519,9.85333333 20.2177778,10.44 21.5214815,10.7659259 C22.2385185,10.9614815 22.9555556,11.0918519 23.7051852,11.157037 C23.9985185,11.1896296 24.3244444,11.1896296 24.6177778,11.1896296 C24.7481481,11.1896296 24.7481481,11.1896296 24.7481481,11.0592593 C24.7481481,10.8962963 24.7481481,10.7659259 24.7481481,10.602963 C24.7481481,9.56 24.7481481,8.48444444 24.7481481,7.44148148 C24.7481481,7.3762963 24.7481481,7.31111111 24.7481481,7.24592593 C25.0414815,7.27851852 25.3022222,7.3437037 25.562963,7.3437037 C25.7259259,7.3437037 25.9214815,7.3762963 26.0844444,7.3762963 C26.1822222,7.3762963 26.2148148,7.40888889 26.1822222,7.47407407 C26.1822222,7.50666667 26.1822222,7.53925926 26.1822222,7.57185185 C26.1822222,9.1037037 26.1822222,10.602963 26.1822222,12.1348148 C26.1822222,12.1674074 26.1822222,12.2 26.1822222,12.2325926 C26.1822222,12.362963 26.1822222,12.362963 26.0518519,12.362963 C25.562963,12.362963 25.1066667,12.3303704 24.6177778,12.2651852 C23.64,12.1348148 22.7274074,11.9066667 21.8148148,11.5481481 C20.9348148,11.2222222 20.12,10.7659259 19.3703704,10.2444444 C19.3377778,10.2118519 19.2725926,10.1792593 19.2074074,10.1466667 C19.2074074,10.2444444 19.2074074,10.3096296 19.2074074,10.3748148 C19.2074074,13.6992593 19.2074074,17.0237037 19.2074074,20.3481481 C19.2074074,22.1081481 18.7511111,23.7703704 17.8059259,25.2696296 C16.6651852,27.0948148 15.0681481,28.3659259 13.0474074,29.082963 C11.8088889,29.5392593 10.5703704,29.7022222 9.26666667,29.6044444 C7.08296296,29.4414815 5.16,28.5940741 3.56296296,27.1274074 C3.46518519,27.16 3.43259259,27.1274074 3.4,27.0622222 Z"></path>
|
|
18
|
+
<path d="M6.43111111,22.9881481 C6.07259259,22.8251852 5.74666667,22.5644444 5.45333333,22.3037037 C4.7037037,21.5866667 4.28,20.7392593 4.18222222,19.7288889 C3.95407407,17.6103704 5.29037037,15.7851852 7.14814815,15.1985185 C7.93037037,14.9703704 8.74518519,14.9377778 9.52740741,15.1659259 C9.56,15.1659259 9.62518519,15.1985185 9.65777778,15.1985185 C9.69037037,15.1333333 9.65777778,15.0681481 9.65777778,15.002963 C9.65777778,13.797037 9.65777778,12.6237037 9.65777778,11.4177778 C9.65777778,11.3525926 9.65777778,11.2874074 9.65777778,11.2222222 C10.1140741,11.1896296 10.5703704,11.2222222 11.0266667,11.2874074 C11.0918519,11.2874074 11.1244444,11.32 11.1244444,11.3851852 C11.1244444,11.4177778 11.1244444,11.4503704 11.1244444,11.482963 C11.1244444,13.0474074 11.1244444,14.6444444 11.1244444,16.2088889 C11.1244444,16.2740741 11.1244444,16.3392593 11.0918519,16.4044444 C10.8962963,16.3718519 10.6681481,16.3066667 10.4725926,16.2740741 C9.26666667,16.1111111 8.15851852,16.4044444 7.18074074,17.1540741 C6.33333333,17.8059259 5.81185185,18.6859259 5.64888889,19.7614815 C5.45333333,20.9022222 5.68148148,21.9451852 6.33333333,22.8903704 C6.39851852,22.8903704 6.39851852,22.922963 6.43111111,22.9881481 Z"></path>
|
|
19
|
+
</g>
|
|
20
|
+
</g>
|
|
21
|
+
</g>
|
|
22
|
+
</g>
|
|
23
|
+
</g>
|
|
24
|
+
</g>
|
|
25
|
+
</g>
|
|
26
|
+
</g>
|
|
27
|
+
</svg>
|
|
@@ -0,0 +1,20 @@
|
|
|
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(-545.000000, -697.000000)" fill-rule="nonzero">
|
|
8
|
+
<g id="编组-16" transform="translate(420.000000, 263.000000)">
|
|
9
|
+
<g id="编组-20" transform="translate(24.000000, 387.000000)">
|
|
10
|
+
<g id="编组-11" transform="translate(100.000000, 46.000000)">
|
|
11
|
+
<g id="facebook" transform="translate(1.000000, 1.000000)">
|
|
12
|
+
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="48" height="48"></rect>
|
|
13
|
+
<path d="M46,23.9875901 C45.9236691,12.2262215 36.7161229,2.5792736 25.037695,2.02498423 C13.3592672,1.47069485 3.28978855,10.2027036 2.11313965,21.9046052 C0.936490742,33.6065068 9.06373104,44.1902699 20.6159219,46 L20.6159219,30.6781369 L14.9806693,30.6781369 L14.9806693,23.9875901 L20.6159219,23.9875901 L20.6159219,18.0801607 C20.6954563,14.0406837 23.9120566,10.7748072 27.9265198,10.6575692 C29.8345386,10.5588618 31.7470794,10.7191972 33.6125405,11.1342494 L33.6125405,16.5309501 L29.9910869,16.5309501 C29.2429814,16.539623 28.5300436,16.8517807 28.0139155,17.3966488 C27.4977873,17.9415168 27.2221914,18.6729381 27.2496126,19.4250798 L27.2496126,23.9875901 L33.4433137,23.9875901 L32.4617982,30.6781369 L27.2496126,30.6781369 L27.2496126,46 C38.0527417,44.3404004 46.0246845,34.9815426 46,23.9875901 L46,23.9875901 Z" id="路径" fill="#1876F2"></path>
|
|
14
|
+
</g>
|
|
15
|
+
</g>
|
|
16
|
+
</g>
|
|
17
|
+
</g>
|
|
18
|
+
</g>
|
|
19
|
+
</g>
|
|
20
|
+
</svg>
|
|
@@ -0,0 +1,20 @@
|
|
|
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" stroke-linecap="round" stroke-linejoin="round">
|
|
7
|
+
<g id="发布管理-新建图片任务" transform="translate(-751.000000, -713.000000)" stroke="#9EA7B5" stroke-width="1.5">
|
|
8
|
+
<g id="编组-16" transform="translate(420.000000, 263.000000)">
|
|
9
|
+
<g id="编组-20" transform="translate(24.000000, 387.000000)">
|
|
10
|
+
<g id="编组-11" transform="translate(100.000000, 46.000000)">
|
|
11
|
+
<g id="编组" transform="translate(207.000000, 17.000000)">
|
|
12
|
+
<line x1="4" y1="4" x2="12" y2="12" id="路径"></line>
|
|
13
|
+
<line x1="4" y1="12" x2="12" y2="4" id="路径"></line>
|
|
14
|
+
</g>
|
|
15
|
+
</g>
|
|
16
|
+
</g>
|
|
17
|
+
</g>
|
|
18
|
+
</g>
|
|
19
|
+
</g>
|
|
20
|
+
</svg>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React, { FC } from "react";
|
|
2
|
+
interface AccountSelectListProps {
|
|
3
|
+
accounts: {
|
|
4
|
+
key: string;
|
|
5
|
+
icon: string | React.ReactNode;
|
|
6
|
+
disabledIcon: string | React.ReactNode;
|
|
7
|
+
list: AccountSelectProps['list'];
|
|
8
|
+
placeholder: string;
|
|
9
|
+
isValid: 'img' | 'video' | 'insVideo' | undefined;
|
|
10
|
+
multiple?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}[];
|
|
13
|
+
onChange?: (selected: {
|
|
14
|
+
[key: string]: string[];
|
|
15
|
+
}) => void;
|
|
16
|
+
value?: {
|
|
17
|
+
[key: string]: string[];
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
interface AccountSelectProps {
|
|
21
|
+
keys: string;
|
|
22
|
+
placeholder: string;
|
|
23
|
+
icon: string | React.ReactNode;
|
|
24
|
+
disabledIcon: string | React.ReactNode;
|
|
25
|
+
list: {
|
|
26
|
+
label: string;
|
|
27
|
+
desc: string;
|
|
28
|
+
isValid: boolean;
|
|
29
|
+
value: string;
|
|
30
|
+
isPersonTk: boolean;
|
|
31
|
+
}[];
|
|
32
|
+
isValid: 'img' | 'video' | 'insImg' | 'insVideo' | undefined;
|
|
33
|
+
multiple: boolean;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
onSelectionChange: (keys: string[], accountKey: string) => void;
|
|
36
|
+
selectedValues?: string[];
|
|
37
|
+
}
|
|
38
|
+
declare const AccountSelectList: FC<AccountSelectListProps>;
|
|
39
|
+
export default AccountSelectList;
|
|
@@ -0,0 +1,221 @@
|
|
|
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 _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
8
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
10
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
11
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
|
+
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."); }
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
15
|
+
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; } }
|
|
16
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
|
+
import React, { useState, useMemo, useEffect } from "react";
|
|
18
|
+
import { Dropdown, Row, Col, Popover, message } from "antd";
|
|
19
|
+
import styles from "./index.module.less";
|
|
20
|
+
import DownIcon from "./imgs/down.svg";
|
|
21
|
+
import UpIcon from "./imgs/up.svg";
|
|
22
|
+
var AccountSelect = function AccountSelect(props) {
|
|
23
|
+
var _useState = useState(false),
|
|
24
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
25
|
+
open = _useState2[0],
|
|
26
|
+
setOpen = _useState2[1];
|
|
27
|
+
var _useState3 = useState(props.selectedValues || []),
|
|
28
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
29
|
+
selectedKeys = _useState4[0],
|
|
30
|
+
setSelectedKeys = _useState4[1];
|
|
31
|
+
useEffect(function () {
|
|
32
|
+
setSelectedKeys(props.selectedValues || []);
|
|
33
|
+
}, [props.selectedValues]);
|
|
34
|
+
var handleOpenChange = function handleOpenChange(nextOpen, info) {
|
|
35
|
+
if (!props.disabled && (info.source === 'trigger' || nextOpen)) {
|
|
36
|
+
setOpen(nextOpen);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
var handleChange = function handleChange(value) {
|
|
40
|
+
var _props$list;
|
|
41
|
+
if ((_props$list = props.list) !== null && _props$list !== void 0 && (_props$list = _props$list.find(function (item) {
|
|
42
|
+
return item.value === value.key;
|
|
43
|
+
})) !== null && _props$list !== void 0 && _props$list.isPersonTk) {
|
|
44
|
+
message.error('旧版TK账号无法发布,请前往社媒管理重新绑定账号');
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (!props.disabled) {
|
|
48
|
+
setSelectedKeys(function (prevState) {
|
|
49
|
+
var newSelectedKeys;
|
|
50
|
+
if (prevState.includes(value.key)) {
|
|
51
|
+
newSelectedKeys = prevState.filter(function (item) {
|
|
52
|
+
return item !== value.key;
|
|
53
|
+
});
|
|
54
|
+
} else {
|
|
55
|
+
newSelectedKeys = props.multiple ? [].concat(_toConsumableArray(prevState), [value.key]) : [value.key];
|
|
56
|
+
}
|
|
57
|
+
props.onSelectionChange(newSelectedKeys, props.keys);
|
|
58
|
+
return newSelectedKeys;
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
var handleClearAll = function handleClearAll() {
|
|
63
|
+
setSelectedKeys([]);
|
|
64
|
+
setOpen(false);
|
|
65
|
+
props.onSelectionChange([], props.keys);
|
|
66
|
+
};
|
|
67
|
+
var list = props.list;
|
|
68
|
+
var isValid = useMemo(function () {
|
|
69
|
+
return list.every(function (item) {
|
|
70
|
+
return item.isValid;
|
|
71
|
+
});
|
|
72
|
+
}, [list]);
|
|
73
|
+
var content = useMemo(function () {
|
|
74
|
+
switch (props.isValid) {
|
|
75
|
+
case 'img':
|
|
76
|
+
return ['大小不超过8M', '尺寸需大于4:5,小于1.91:1'];
|
|
77
|
+
case 'insImg':
|
|
78
|
+
return ['图片宽高不应超过1920x1080'];
|
|
79
|
+
case 'insVideo':
|
|
80
|
+
return ['视频宽高需小于1080*1920'];
|
|
81
|
+
case 'video':
|
|
82
|
+
return ['视频宽和高需大于360px,小于4096px', '视频帧率需要大于23fps,小于60fps'];
|
|
83
|
+
default:
|
|
84
|
+
return [];
|
|
85
|
+
}
|
|
86
|
+
}, [props.isValid]);
|
|
87
|
+
return /*#__PURE__*/React.createElement(Popover, {
|
|
88
|
+
content: /*#__PURE__*/React.createElement("div", {
|
|
89
|
+
className: styles['popover_title']
|
|
90
|
+
}, content.map(function (item, index) {
|
|
91
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
92
|
+
key: index,
|
|
93
|
+
className: styles['popover_item']
|
|
94
|
+
}, item);
|
|
95
|
+
})),
|
|
96
|
+
open: !!content.length
|
|
97
|
+
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
98
|
+
trigger: ['click'],
|
|
99
|
+
onOpenChange: handleOpenChange,
|
|
100
|
+
open: open,
|
|
101
|
+
disabled: props.disabled,
|
|
102
|
+
overlayStyle: {
|
|
103
|
+
width: 296,
|
|
104
|
+
boxShadow: "0px 9px 28px 8px rgba(0,0,0,0.05), 0px 6px 16px 0px rgba(0,0,0,0.08), 0px 3px 6px -4px rgba(0,0,0,0.12)",
|
|
105
|
+
borderRadius: 8
|
|
106
|
+
},
|
|
107
|
+
menu: {
|
|
108
|
+
selectedKeys: selectedKeys,
|
|
109
|
+
onClick: handleChange,
|
|
110
|
+
items: props.isValid ? [] : list.map(function (item) {
|
|
111
|
+
return {
|
|
112
|
+
key: item.value,
|
|
113
|
+
style: {
|
|
114
|
+
background: !item.isValid ? '#FEECEC' : selectedKeys.includes(item.value) ? '#E9F1FF' : '#FFFFFF'
|
|
115
|
+
},
|
|
116
|
+
label: /*#__PURE__*/React.createElement("div", {
|
|
117
|
+
style: {
|
|
118
|
+
display: 'flex',
|
|
119
|
+
justifyContent: 'space-between',
|
|
120
|
+
alignItems: 'center'
|
|
121
|
+
}
|
|
122
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
123
|
+
className: styles['wrap_title'],
|
|
124
|
+
style: {
|
|
125
|
+
maxWidth: 110,
|
|
126
|
+
overflow: 'hidden',
|
|
127
|
+
textOverflow: 'ellipsis',
|
|
128
|
+
whiteSpace: 'nowrap'
|
|
129
|
+
}
|
|
130
|
+
}, item.label), item !== null && item !== void 0 && item.isPersonTk ? /*#__PURE__*/React.createElement("div", {
|
|
131
|
+
style: {
|
|
132
|
+
padding: '2px 8px',
|
|
133
|
+
background: 'rgba(254, 236, 236, 1)',
|
|
134
|
+
color: '#FA4441',
|
|
135
|
+
border: '1px solid rgba(250, 68, 65, 1)',
|
|
136
|
+
borderRadius: 4,
|
|
137
|
+
whiteSpace: 'nowrap'
|
|
138
|
+
}
|
|
139
|
+
}, "\u65E7\u7248\u8D26\u53F7") : null, /*#__PURE__*/React.createElement("div", {
|
|
140
|
+
className: styles['wrap_right_desc'],
|
|
141
|
+
style: {
|
|
142
|
+
width: 77,
|
|
143
|
+
overflow: 'hidden',
|
|
144
|
+
textOverflow: 'ellipsis',
|
|
145
|
+
whiteSpace: 'nowrap'
|
|
146
|
+
}
|
|
147
|
+
}, item.desc)),
|
|
148
|
+
disabled: !item.isValid
|
|
149
|
+
};
|
|
150
|
+
})
|
|
151
|
+
}
|
|
152
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
153
|
+
className: "".concat(styles['wrap'], " ").concat(props.disabled ? styles['wrap_disabled'] : ''),
|
|
154
|
+
style: {
|
|
155
|
+
border: !isValid ? '2px solid #FA4441' : selectedKeys.length > 0 ? '2px solid #004FD3' : '1px solid #D4DBE7'
|
|
156
|
+
}
|
|
157
|
+
}, typeof props.icon === 'string' && typeof props.disabledIcon === 'string' ? /*#__PURE__*/React.createElement("img", {
|
|
158
|
+
width: 48,
|
|
159
|
+
height: 48,
|
|
160
|
+
src: list.length && !props.disabled ? props.icon : props.disabledIcon,
|
|
161
|
+
alt: ""
|
|
162
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
163
|
+
style: {
|
|
164
|
+
width: 48,
|
|
165
|
+
height: 48
|
|
166
|
+
}
|
|
167
|
+
}, list.length && !props.disabled ? props.icon : props.disabledIcon), /*#__PURE__*/React.createElement("div", {
|
|
168
|
+
className: styles['wrap_desc'],
|
|
169
|
+
style: {
|
|
170
|
+
color: selectedKeys.length > 0 ? '#142A51' : '#9EA7B5',
|
|
171
|
+
fontWeight: selectedKeys.length > 0 ? 500 : 400
|
|
172
|
+
}
|
|
173
|
+
}, list.length < 1 ? "\u6682\u65E0\u7ED1\u5B9A".concat(props.placeholder) : selectedKeys.length > 0 ? "\u5DF2\u9009\u62E9".concat(selectedKeys.length, "\u4E2A").concat(props.placeholder) : "\u8BF7\u9009\u62E9".concat(props.placeholder)), selectedKeys.length > 0 ? /*#__PURE__*/React.createElement("img", {
|
|
174
|
+
src: UpIcon,
|
|
175
|
+
alt: "",
|
|
176
|
+
onClick: handleClearAll
|
|
177
|
+
}) : /*#__PURE__*/React.createElement("img", {
|
|
178
|
+
src: DownIcon,
|
|
179
|
+
alt: ""
|
|
180
|
+
}))));
|
|
181
|
+
};
|
|
182
|
+
var AccountSelectList = function AccountSelectList(_ref) {
|
|
183
|
+
var accounts = _ref.accounts,
|
|
184
|
+
onChange = _ref.onChange,
|
|
185
|
+
_ref$value = _ref.value,
|
|
186
|
+
value = _ref$value === void 0 ? {} : _ref$value;
|
|
187
|
+
var _useState5 = useState(value),
|
|
188
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
189
|
+
selectedAccounts = _useState6[0],
|
|
190
|
+
setSelectedAccounts = _useState6[1];
|
|
191
|
+
useEffect(function () {
|
|
192
|
+
setSelectedAccounts(value);
|
|
193
|
+
}, [value]);
|
|
194
|
+
var handleSelectionChange = function handleSelectionChange(keys, accountKey) {
|
|
195
|
+
setSelectedAccounts(function (prevState) {
|
|
196
|
+
var newState = _objectSpread(_objectSpread({}, prevState), {}, _defineProperty({}, accountKey, keys));
|
|
197
|
+
onChange === null || onChange === void 0 || onChange(newState);
|
|
198
|
+
return newState;
|
|
199
|
+
});
|
|
200
|
+
};
|
|
201
|
+
return /*#__PURE__*/React.createElement(Row, {
|
|
202
|
+
gutter: [32, 32]
|
|
203
|
+
}, accounts === null || accounts === void 0 ? void 0 : accounts.map(function (account, index) {
|
|
204
|
+
return /*#__PURE__*/React.createElement(Col, {
|
|
205
|
+
span: 8,
|
|
206
|
+
key: index
|
|
207
|
+
}, /*#__PURE__*/React.createElement(AccountSelect, {
|
|
208
|
+
keys: account.key,
|
|
209
|
+
list: account.list,
|
|
210
|
+
placeholder: account.placeholder,
|
|
211
|
+
icon: account.icon,
|
|
212
|
+
disabledIcon: account.disabledIcon,
|
|
213
|
+
isValid: account.isValid,
|
|
214
|
+
multiple: account.multiple || false,
|
|
215
|
+
disabled: account.disabled || false,
|
|
216
|
+
onSelectionChange: handleSelectionChange,
|
|
217
|
+
selectedValues: selectedAccounts[account.key]
|
|
218
|
+
}));
|
|
219
|
+
}));
|
|
220
|
+
};
|
|
221
|
+
export default AccountSelectList;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
.wrap {
|
|
2
|
+
padding: 2px 17px 2px 2px;
|
|
3
|
+
border-radius: 25px;
|
|
4
|
+
display: flex;
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
align-items: center;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
|
|
9
|
+
&_desc {
|
|
10
|
+
font-family: PingFangSC, PingFang SC;
|
|
11
|
+
font-weight: 400;
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
color: #9EA7B5;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&active_desc {
|
|
17
|
+
font-family: PingFangSC, PingFang SC;
|
|
18
|
+
font-weight: 500;
|
|
19
|
+
font-size: 14px;
|
|
20
|
+
color: #142A51;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&_title {
|
|
24
|
+
font-family: PingFangSC, PingFang SC;
|
|
25
|
+
font-weight: 400;
|
|
26
|
+
font-size: 14px;
|
|
27
|
+
color: #142A51;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&_right_desc {
|
|
31
|
+
font-family: PingFangSC, PingFang SC;
|
|
32
|
+
font-weight: 400;
|
|
33
|
+
font-size: 12px;
|
|
34
|
+
color: #9EA7B5;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.wrap_no_active {
|
|
39
|
+
background: #F5F7FA;
|
|
40
|
+
border-radius: 25px;
|
|
41
|
+
border: 1px solid #D4DBE7;
|
|
42
|
+
padding: 2px 17px 2px 2px;
|
|
43
|
+
display: flex;
|
|
44
|
+
justify-content: space-between;
|
|
45
|
+
align-items: center;
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
.popover_title {
|
|
51
|
+
font-family: PingFangSC, PingFang SC;
|
|
52
|
+
font-weight: 400;
|
|
53
|
+
font-size: 14px;
|
|
54
|
+
color: #FA4441;
|
|
55
|
+
line-height: 20px;
|
|
56
|
+
text-align: left;
|
|
57
|
+
font-style: normal;
|
|
58
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
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; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React, { useState, useEffect, useRef } from "react";
|
|
8
|
+
import styles from "./index.module.less";
|
|
9
|
+
var AiEmpty = function AiEmpty() {
|
|
10
|
+
var _useState = useState(0),
|
|
11
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12
|
+
textIndex = _useState2[0],
|
|
13
|
+
setTextIndex = _useState2[1];
|
|
14
|
+
var texts = ["AI努力生成中", "生成中任务无法取消", "离开页面,任务仍在进行", "任务保存在历史记录中", "刷新页面即可开启新任务"];
|
|
15
|
+
var animationFrameId = useRef(null);
|
|
16
|
+
var lastTimeRef = useRef(0);
|
|
17
|
+
var duration = 4000;
|
|
18
|
+
useEffect(function () {
|
|
19
|
+
var animate = function animate(currentTime) {
|
|
20
|
+
if (!lastTimeRef.current) {
|
|
21
|
+
lastTimeRef.current = currentTime;
|
|
22
|
+
}
|
|
23
|
+
var deltaTime = currentTime - lastTimeRef.current;
|
|
24
|
+
if (deltaTime >= duration) {
|
|
25
|
+
setTextIndex(function (prevIndex) {
|
|
26
|
+
return (prevIndex + 1) % texts.length;
|
|
27
|
+
});
|
|
28
|
+
lastTimeRef.current = currentTime;
|
|
29
|
+
}
|
|
30
|
+
animationFrameId.current = requestAnimationFrame(animate);
|
|
31
|
+
};
|
|
32
|
+
animationFrameId.current = requestAnimationFrame(animate);
|
|
33
|
+
return function () {
|
|
34
|
+
if (animationFrameId.current) {
|
|
35
|
+
cancelAnimationFrame(animationFrameId.current);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}, [texts.length]);
|
|
39
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
40
|
+
className: styles['ai-empty-wrap']
|
|
41
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
42
|
+
className: styles['ai-round-wrap']
|
|
43
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
className: "".concat(styles['round'], " ").concat(styles['round-animation'])
|
|
45
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
className: styles['inner']
|
|
47
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
className: "".concat(styles['text'], " ").concat(styles['text-animation'])
|
|
49
|
+
}, texts[textIndex]));
|
|
50
|
+
};
|
|
51
|
+
export default AiEmpty;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
.ai-empty-wrap {
|
|
2
|
+
width: 241px;
|
|
3
|
+
height: 322px;
|
|
4
|
+
background: #E9F1FF;
|
|
5
|
+
border-radius: 8px;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
align-items: center;
|
|
10
|
+
|
|
11
|
+
.ai-round-wrap {
|
|
12
|
+
position: relative;
|
|
13
|
+
.round {
|
|
14
|
+
width: 120px;
|
|
15
|
+
height: 120px;
|
|
16
|
+
border-radius: 50%;
|
|
17
|
+
background: linear-gradient(57.10870684867245deg, #E50DB0 0%, #32C5FF 51%, #6D4AFE 100%);
|
|
18
|
+
animation: rotate 4s linear infinite;
|
|
19
|
+
}
|
|
20
|
+
.inner {
|
|
21
|
+
position: absolute;
|
|
22
|
+
top: 50%;
|
|
23
|
+
left: 50%;
|
|
24
|
+
transform: translate(-50%, -50%);
|
|
25
|
+
width: 100px;
|
|
26
|
+
height: 100px;
|
|
27
|
+
background: #E9F1FF;
|
|
28
|
+
border-radius: 50%;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.text {
|
|
33
|
+
font-family: PingFangSC, PingFang SC;
|
|
34
|
+
font-weight: 400;
|
|
35
|
+
font-size: 14px;
|
|
36
|
+
color: #142A51;
|
|
37
|
+
line-height: 20px;
|
|
38
|
+
margin-top: 12px;
|
|
39
|
+
text-align: center;
|
|
40
|
+
animation: fade-in-out 4s ease-in-out infinite;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@keyframes rotate {
|
|
45
|
+
0% {
|
|
46
|
+
transform: rotate(0deg);
|
|
47
|
+
}
|
|
48
|
+
100% {
|
|
49
|
+
transform: rotate(360deg);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@keyframes fade-in-out {
|
|
54
|
+
0%, 100% {
|
|
55
|
+
opacity: 0;
|
|
56
|
+
}
|
|
57
|
+
50% {
|
|
58
|
+
opacity: 1;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
interface BatchLabelProps {
|
|
3
|
+
placeholder?: string;
|
|
4
|
+
prefix: string;
|
|
5
|
+
onChange?: (value: string[]) => any;
|
|
6
|
+
onRemove?: (value: string) => any;
|
|
7
|
+
value?: string[];
|
|
8
|
+
options: {
|
|
9
|
+
label: string;
|
|
10
|
+
value: string;
|
|
11
|
+
}[];
|
|
12
|
+
}
|
|
13
|
+
declare const BatchLabel: FC<BatchLabelProps>;
|
|
14
|
+
export default BatchLabel;
|