@para-ui/core 3.0.41 → 3.0.42
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/DragVerify/index.d.ts +9 -23
- package/DragVerify/index.js +158 -38
- package/Drawer/index.js +21 -6
- package/README.md +7 -0
- package/package.json +1 -1
- package/umd/DragVerify.js +15 -16
- package/umd/Drawer.js +4 -4
package/DragVerify/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export interface DragVerifyImgProps {
|
|
|
11
11
|
/** 移动图 */
|
|
12
12
|
newImage?: string;
|
|
13
13
|
/** Y轴位置 */
|
|
14
|
-
|
|
14
|
+
y?: number;
|
|
15
15
|
[name: string]: any;
|
|
16
16
|
}
|
|
17
17
|
export interface DragVerifyProps {
|
|
@@ -19,32 +19,18 @@ export interface DragVerifyProps {
|
|
|
19
19
|
className?: string;
|
|
20
20
|
/** 样式 */
|
|
21
21
|
style?: React.CSSProperties;
|
|
22
|
+
width?: number | string;
|
|
23
|
+
/** 图片高 */
|
|
24
|
+
height?: number | string;
|
|
22
25
|
/** 刷新 */
|
|
23
26
|
refresh?: any;
|
|
24
27
|
/** 获取图片接口 */
|
|
25
|
-
getImgInfo: () => (Promise<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
data?: DragVerifyImgProps;
|
|
30
|
-
err?: any;
|
|
31
|
-
});
|
|
32
|
-
/** 提交校验接口 xPos: x轴坐标,imgInfo:图片信息 */
|
|
33
|
-
verifyData: (xPos: number, imgInfo: DragVerifyImgProps) => (Promise<{
|
|
34
|
-
err?: any;
|
|
35
|
-
data?: any;
|
|
36
|
-
}> | {
|
|
37
|
-
err?: any;
|
|
38
|
-
data?: any;
|
|
39
|
-
});
|
|
40
|
-
/** 完成校验事件
|
|
41
|
-
* bol: true通过
|
|
42
|
-
* result: 提交校验事件返回值
|
|
28
|
+
getImgInfo: () => (Promise<DragVerifyImgProps> | DragVerifyImgProps);
|
|
29
|
+
/** 提交校验接口 xPos: x轴坐标,imgInfo:图片信息
|
|
30
|
+
* true 通过
|
|
31
|
+
* false 不通过
|
|
43
32
|
* */
|
|
44
|
-
|
|
45
|
-
err?: any;
|
|
46
|
-
data?: any;
|
|
47
|
-
}) => void;
|
|
33
|
+
verify: (xPos: number, imgInfo: DragVerifyImgProps) => Promise<boolean> | boolean;
|
|
48
34
|
}
|
|
49
35
|
export declare const DragVerify: FunctionComponent<DragVerifyProps>;
|
|
50
36
|
export default DragVerify;
|
package/DragVerify/index.js
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-708dbb18.js';
|
|
1
2
|
import { r as regenerator } from '../_verture/index-beef914f.js';
|
|
2
3
|
import { a as __awaiter } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
3
4
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
-
import { useRef, useEffect } from 'react';
|
|
5
|
+
import { useState, useRef, useEffect } from 'react';
|
|
5
6
|
import clsx from 'clsx';
|
|
6
7
|
import DoubleRight from '@para-ui/icons/DoubleRight';
|
|
7
8
|
import CloseIcon from '@para-ui/icons/Close';
|
|
8
9
|
import Check from '@para-ui/icons/Check';
|
|
9
10
|
import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
10
11
|
import { u as useFormatMessage } from '../_verture/useFormatMessage-703f8b20.js';
|
|
12
|
+
import { Loading } from '../Loading/index.js';
|
|
11
13
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
12
14
|
import '@para-ui/core/GlobalContext';
|
|
15
|
+
import '@para-ui/icons/LoadingF';
|
|
13
16
|
|
|
14
17
|
var en = {
|
|
15
18
|
tryAgain: 'Try again',
|
|
@@ -26,7 +29,7 @@ var localeJson = {
|
|
|
26
29
|
en: en
|
|
27
30
|
};
|
|
28
31
|
|
|
29
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-drag-verify {\n width: 100%;\n position: relative;\n}\n.paraui-v3-drag-verify > .slider-img {\n position: relative;\n border-radius: 4px;\n overflow: hidden;\n line-height: 0;\n}\n.paraui-v3-drag-verify > .slider-img .slider-img-bg {\n width: 100%;\n height: auto;\n}\n.paraui-v3-drag-verify > .slider-img .slider-img-move {\n position: absolute;\n left: 0;\n height: auto;\n}\n.paraui-v3-drag-verify > .slider-move {\n position: relative;\n text-align: center;\n line-height: 32px;\n height: 32px;\n margin-top: 12px;\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-bg {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n background-color: rgba(171, 176, 185, 0.12);\n height: 32px;\n border-radius: 4px;\n border: 1px solid rgba(171, 176, 185, 0.2);\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-mask {\n position: absolute;\n left: 0;\n top: 0;\n height: 32px;\n width: 2px;\n border-bottom-left-radius: 4px;\n border-top-left-radius: 4px;\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-mask > .slider-move-box {\n position: absolute;\n top: 0;\n left: -1px;\n width: 32px;\n height: 32px;\n background: #fff;\n cursor: pointer;\n border-radius: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid rgba(171, 176, 185, 0.2);\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-mask > .slider-move-box:hover .svg-right {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-mask > .slider-move-box .svg-right {\n display: inline-block;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-mask > .slider-move-box .svg-close {\n display: none;\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-mask > .slider-move-box .svg-check {\n display: none;\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-text {\n color: rgba(46, 55, 67, 0.4);\n font-size: 14px;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-move > .slider-move > .slider-move-mask {\n border: 1px solid rgb(54, 102, 214);\n border-width: 1px 0 1px 1px;\n background-color: rgba(54, 102, 214, 0.05);\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-move > .slider-move > .slider-move-mask > .slider-move-box {\n background-color: rgb(54, 102, 214);\n border-top: 1px solid rgb(54, 102, 214);\n border-bottom: 1px solid rgb(54, 102, 214);\n top: -1px;\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-move > .slider-move > .slider-move-mask > .slider-move-box > .svg-right {\n color: #fff;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-error > .slider-move > .slider-move-mask {\n border: 1px solid rgb(235, 96, 84);\n border-width: 1px 0 1px 1px;\n background-color: rgba(54, 102, 214, 0.05);\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-error > .slider-move > .slider-move-mask > .slider-move-box {\n background-color: rgb(235, 96, 84);\n border-top: 1px solid rgb(235, 96, 84);\n border-bottom: 1px solid rgb(235, 96, 84);\n top: -1px;\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-error > .slider-move > .slider-move-mask > .slider-move-box > .svg-close {\n display: inline-block;\n color: #fff;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-error > .slider-move > .slider-move-mask > .slider-move-box > .svg-right {\n display: none;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-error > .slider-move > .slider-move-mask > .slider-move-box > .svg-check {\n display: none;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-success > .slider-move > .slider-move-mask {\n border: 1px solid rgb(83, 195, 27);\n border-width: 1px 0 1px 1px;\n background-color: rgba(83, 195, 27, 0.05);\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-success > .slider-move > .slider-move-mask > .slider-move-box {\n background-color: rgb(83, 195, 27);\n border-top: 1px solid rgb(83, 195, 27);\n border-bottom: 1px solid rgb(83, 195, 27);\n top: -1px;\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-success > .slider-move > .slider-move-mask > .slider-move-box .svg-close {\n display: none;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-success > .slider-move > .slider-move-mask > .slider-move-box .svg-right {\n display: none;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-success > .slider-move > .slider-move-mask > .slider-move-box .svg-check {\n display: inline-block;\n color: #fff;\n}";
|
|
32
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-drag-verify {\n width: 100%;\n position: relative;\n}\n.paraui-v3-drag-verify > svg {\n position: absolute;\n right: 4px;\n top: 4px;\n z-index: 10;\n cursor: pointer;\n display: none;\n}\n.paraui-v3-drag-verify > .slider-img {\n position: relative;\n border-radius: 4px;\n overflow: hidden;\n line-height: 0;\n min-height: 60px;\n}\n.paraui-v3-drag-verify > .slider-img .slider-img-bg {\n width: 100%;\n height: auto;\n border-radius: 4px;\n}\n.paraui-v3-drag-verify > .slider-img .slider-img-move {\n position: absolute;\n left: 0;\n height: auto;\n}\n.paraui-v3-drag-verify > .slider-move {\n position: relative;\n text-align: center;\n line-height: 32px;\n height: 32px;\n margin-top: 12px;\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-bg {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n background-color: rgba(171, 176, 185, 0.12);\n height: 32px;\n border-radius: 4px;\n border: 1px solid rgba(171, 176, 185, 0.2);\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-mask {\n position: absolute;\n left: 0;\n top: 0;\n height: 32px;\n width: 2px;\n border-bottom-left-radius: 4px;\n border-top-left-radius: 4px;\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-mask > .slider-move-box {\n position: absolute;\n top: 0;\n left: -1px;\n width: 32px;\n height: 32px;\n background: #fff;\n cursor: pointer;\n border-radius: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid rgba(171, 176, 185, 0.2);\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-mask > .slider-move-box:hover .svg-right {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-mask > .slider-move-box .svg-right {\n display: inline-block;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-mask > .slider-move-box .svg-close {\n display: none;\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-mask > .slider-move-box .svg-check {\n display: none;\n}\n.paraui-v3-drag-verify > .slider-move > .slider-move-text {\n color: rgba(46, 55, 67, 0.4);\n font-size: 14px;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-move > .slider-move > .slider-move-mask {\n border: 1px solid rgb(54, 102, 214);\n border-width: 1px 0 1px 1px;\n background-color: rgba(54, 102, 214, 0.05);\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-move > .slider-move > .slider-move-mask > .slider-move-box {\n background-color: rgb(54, 102, 214);\n border-top: 1px solid rgb(54, 102, 214);\n border-bottom: 1px solid rgb(54, 102, 214);\n top: -1px;\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-move > .slider-move > .slider-move-mask > .slider-move-box > .svg-right {\n color: #fff;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-error > .slider-move > .slider-move-mask {\n border: 1px solid rgb(235, 96, 84);\n border-width: 1px 0 1px 1px;\n background-color: rgba(54, 102, 214, 0.05);\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-error > .slider-move > .slider-move-mask > .slider-move-box {\n background-color: rgb(235, 96, 84);\n border-top: 1px solid rgb(235, 96, 84);\n border-bottom: 1px solid rgb(235, 96, 84);\n top: -1px;\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-error > .slider-move > .slider-move-mask > .slider-move-box > .svg-close {\n display: inline-block;\n color: #fff;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-error > .slider-move > .slider-move-mask > .slider-move-box > .svg-right {\n display: none;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-error > .slider-move > .slider-move-mask > .slider-move-box > .svg-check {\n display: none;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-success > .slider-move > .slider-move-mask {\n border: 1px solid rgb(83, 195, 27);\n border-width: 1px 0 1px 1px;\n background-color: rgba(83, 195, 27, 0.05);\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-success > .slider-move > .slider-move-mask > .slider-move-box {\n background-color: rgb(83, 195, 27);\n border-top: 1px solid rgb(83, 195, 27);\n border-bottom: 1px solid rgb(83, 195, 27);\n top: -1px;\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-success > .slider-move > .slider-move-mask > .slider-move-box .svg-close {\n display: none;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-success > .slider-move > .slider-move-mask > .slider-move-box .svg-right {\n display: none;\n}\n.paraui-v3-drag-verify.paraui-v3-drag-verify-success > .slider-move > .slider-move-mask > .slider-move-box .svg-check {\n display: inline-block;\n color: #fff;\n}";
|
|
30
33
|
styleInject(css_248z);
|
|
31
34
|
|
|
32
35
|
var DragVerify = function DragVerify(props) {
|
|
@@ -34,19 +37,26 @@ var DragVerify = function DragVerify(props) {
|
|
|
34
37
|
style = props.style,
|
|
35
38
|
refresh = props.refresh,
|
|
36
39
|
getImgInfo = props.getImgInfo,
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
verify = props.verify,
|
|
41
|
+
width = props.width,
|
|
42
|
+
height = props.height;
|
|
39
43
|
var intl = useFormatMessage('DragVerify', localeJson);
|
|
44
|
+
var _useState = useState(),
|
|
45
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
46
|
+
refreshCom = _useState2[0],
|
|
47
|
+
setRefreshCom = _useState2[1];
|
|
48
|
+
var _useState3 = useState(false),
|
|
49
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
50
|
+
loading = _useState4[0],
|
|
51
|
+
setLoading = _useState4[1];
|
|
40
52
|
var refDom = useRef(null);
|
|
41
53
|
var constData = useRef({
|
|
42
54
|
getImgInfo: getImgInfo,
|
|
43
|
-
|
|
44
|
-
finishVerify: finishVerify
|
|
55
|
+
verify: verify
|
|
45
56
|
});
|
|
46
57
|
var prefixCls = $prefixCls + '-drag-verify';
|
|
47
58
|
constData.current.getImgInfo = getImgInfo;
|
|
48
|
-
constData.current.
|
|
49
|
-
constData.current.finishVerify = finishVerify;
|
|
59
|
+
constData.current.verify = verify;
|
|
50
60
|
useEffect(function () {
|
|
51
61
|
reset();
|
|
52
62
|
getImgInfoReq();
|
|
@@ -54,30 +64,23 @@ var DragVerify = function DragVerify(props) {
|
|
|
54
64
|
clearTimeout(constData.current.timerError);
|
|
55
65
|
clearTimeout(constData.current.timerSuccess);
|
|
56
66
|
};
|
|
57
|
-
}, [refresh]);
|
|
67
|
+
}, [refresh, refreshCom]);
|
|
58
68
|
/** 获取图片信息 */
|
|
59
69
|
var getImgInfoReq = function getImgInfoReq() {
|
|
60
70
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/regenerator.mark(function _callee() {
|
|
61
|
-
var
|
|
71
|
+
var result;
|
|
62
72
|
return regenerator.wrap(function _callee$(_context) {
|
|
63
73
|
while (1) switch (_context.prev = _context.next) {
|
|
64
74
|
case 0:
|
|
65
75
|
constData.current.padding = true;
|
|
66
|
-
|
|
76
|
+
setLoading(true);
|
|
77
|
+
_context.next = 4;
|
|
67
78
|
return constData.current.getImgInfo();
|
|
68
|
-
case
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
err = _yield$constData$curr.err;
|
|
72
|
-
if (!err) {
|
|
73
|
-
_context.next = 8;
|
|
74
|
-
break;
|
|
75
|
-
}
|
|
76
|
-
return _context.abrupt("return", constData.current.padding = false);
|
|
77
|
-
case 8:
|
|
78
|
-
constData.current.imgInfo = (data === null || data === void 0 ? void 0 : data.data) || {};
|
|
79
|
+
case 4:
|
|
80
|
+
result = _context.sent;
|
|
81
|
+
constData.current.imgInfo = result;
|
|
79
82
|
initImg();
|
|
80
|
-
case
|
|
83
|
+
case 7:
|
|
81
84
|
case "end":
|
|
82
85
|
return _context.stop();
|
|
83
86
|
}
|
|
@@ -92,10 +95,10 @@ var DragVerify = function DragVerify(props) {
|
|
|
92
95
|
while (1) switch (_context2.prev = _context2.next) {
|
|
93
96
|
case 0:
|
|
94
97
|
_context2.next = 2;
|
|
95
|
-
return constData.current.
|
|
98
|
+
return constData.current.verify(x, constData.current.verify);
|
|
96
99
|
case 2:
|
|
97
100
|
result = _context2.sent;
|
|
98
|
-
callback(result
|
|
101
|
+
callback(result);
|
|
99
102
|
case 4:
|
|
100
103
|
case "end":
|
|
101
104
|
return _context2.stop();
|
|
@@ -117,7 +120,9 @@ var DragVerify = function DragVerify(props) {
|
|
|
117
120
|
imgMove.className = 'slider-img-move';
|
|
118
121
|
imgMove.style.display = 'none';
|
|
119
122
|
var sliderImgEle = refDom.current.querySelector('.slider-img');
|
|
120
|
-
|
|
123
|
+
var refreshEle = refDom.current.querySelector('.refresh');
|
|
124
|
+
if (!sliderImgEle || !refreshEle) return;
|
|
125
|
+
refreshEle.style.display = 'none';
|
|
121
126
|
sliderImgEle.innerHTML = '';
|
|
122
127
|
sliderImgEle.append(imgBg);
|
|
123
128
|
imgBg.onload = function () {
|
|
@@ -137,8 +142,10 @@ var DragVerify = function DragVerify(props) {
|
|
|
137
142
|
var _a;
|
|
138
143
|
constData.current.padding = false;
|
|
139
144
|
imgMove.style.display = 'inline-block'; // 必须先显示图片,要不然ie10获取不到图片
|
|
145
|
+
refreshEle.style.display = 'inline-block';
|
|
140
146
|
imgMove.width = imgMove.width / constData.current.imgScale;
|
|
141
|
-
imgMove.style.top = ((_a = constData.current.imgInfo) === null || _a === void 0 ? void 0 : _a.
|
|
147
|
+
imgMove.style.top = ((_a = constData.current.imgInfo) === null || _a === void 0 ? void 0 : _a.y) / constData.current.imgScale + 'px';
|
|
148
|
+
setLoading(false);
|
|
142
149
|
};
|
|
143
150
|
};
|
|
144
151
|
registerEvents(imgBg, imgMove);
|
|
@@ -180,8 +187,7 @@ var DragVerify = function DragVerify(props) {
|
|
|
180
187
|
var X = parseFloat(imgMove.style.left);
|
|
181
188
|
var handX = X * constData.current.imgScale;
|
|
182
189
|
sliderPosiCheck(handX, function (result) {
|
|
183
|
-
|
|
184
|
-
if (err) {
|
|
190
|
+
if (!result) {
|
|
185
191
|
// 错误
|
|
186
192
|
sliderBox.classList.add(prefixCls + '-error');
|
|
187
193
|
constData.current.timerError = setTimeout(function () {
|
|
@@ -190,17 +196,15 @@ var DragVerify = function DragVerify(props) {
|
|
|
190
196
|
sliderText.innerHTML = intl({
|
|
191
197
|
id: 'tryAgain'
|
|
192
198
|
}); // 再试一次
|
|
193
|
-
constData.current.finishVerify(false, result);
|
|
194
199
|
getImgInfoReq();
|
|
195
200
|
}, 1000);
|
|
196
201
|
return;
|
|
197
202
|
}
|
|
198
203
|
sliderBox.classList.add(prefixCls + '-success');
|
|
199
|
-
constData.current.timerSuccess = setTimeout(
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
}, 1000);
|
|
204
|
+
/*constData.current.timerSuccess = setTimeout(() => {
|
|
205
|
+
//constData.current.padding = false;
|
|
206
|
+
//sliderBox.classList.remove(prefixCls + '-success');
|
|
207
|
+
}, 1000);*/
|
|
204
208
|
});
|
|
205
209
|
};
|
|
206
210
|
};
|
|
@@ -221,6 +225,25 @@ var DragVerify = function DragVerify(props) {
|
|
|
221
225
|
moveProgress.style.width = '0px';
|
|
222
226
|
if (constData.current.imgMove) constData.current.imgMove.style.left = '0px';
|
|
223
227
|
};
|
|
228
|
+
/* 刷新 */
|
|
229
|
+
var clickRefresh = function clickRefresh() {
|
|
230
|
+
setRefreshCom(Math.random());
|
|
231
|
+
};
|
|
232
|
+
/* 处理标签内容 */
|
|
233
|
+
var handStyle = function handStyle() {
|
|
234
|
+
var obj = {};
|
|
235
|
+
if (width) {
|
|
236
|
+
var widthHand = width;
|
|
237
|
+
if (typeof width === 'number') widthHand = width + 'px';
|
|
238
|
+
obj.width = widthHand;
|
|
239
|
+
}
|
|
240
|
+
if (height) {
|
|
241
|
+
var heightHand = height;
|
|
242
|
+
if (typeof height === 'number') heightHand = height + 'px';
|
|
243
|
+
obj.height = heightHand;
|
|
244
|
+
}
|
|
245
|
+
return obj;
|
|
246
|
+
};
|
|
224
247
|
var makeCls = function makeCls() {
|
|
225
248
|
return clsx(prefixCls, className);
|
|
226
249
|
};
|
|
@@ -229,8 +252,105 @@ var DragVerify = function DragVerify(props) {
|
|
|
229
252
|
style: style,
|
|
230
253
|
ref: refDom
|
|
231
254
|
}, {
|
|
232
|
-
children: [
|
|
233
|
-
|
|
255
|
+
children: [jsxs("svg", Object.assign({
|
|
256
|
+
onClick: clickRefresh,
|
|
257
|
+
className: 'refresh',
|
|
258
|
+
width: "26.529",
|
|
259
|
+
height: "26.017",
|
|
260
|
+
viewBox: "0 0 26.529 26.017"
|
|
261
|
+
}, {
|
|
262
|
+
children: [jsxs("defs", {
|
|
263
|
+
children: [jsxs("filter", Object.assign({
|
|
264
|
+
id: "a",
|
|
265
|
+
x: "0",
|
|
266
|
+
y: "0",
|
|
267
|
+
width: "26.529",
|
|
268
|
+
height: "17",
|
|
269
|
+
filterUnits: "userSpaceOnUse"
|
|
270
|
+
}, {
|
|
271
|
+
children: [jsx("feOffset", {
|
|
272
|
+
dy: "1"
|
|
273
|
+
}), jsx("feGaussianBlur", {
|
|
274
|
+
stdDeviation: "1",
|
|
275
|
+
result: "b"
|
|
276
|
+
}), jsx("feFlood", {}), jsx("feComposite", {
|
|
277
|
+
operator: "in",
|
|
278
|
+
in2: "b"
|
|
279
|
+
}), jsx("feComposite", {
|
|
280
|
+
in: "SourceGraphic"
|
|
281
|
+
})]
|
|
282
|
+
})), jsxs("filter", Object.assign({
|
|
283
|
+
id: "c",
|
|
284
|
+
x: "0",
|
|
285
|
+
y: "9.017",
|
|
286
|
+
width: "26.529",
|
|
287
|
+
height: "17",
|
|
288
|
+
filterUnits: "userSpaceOnUse"
|
|
289
|
+
}, {
|
|
290
|
+
children: [jsx("feOffset", {
|
|
291
|
+
dy: "1"
|
|
292
|
+
}), jsx("feGaussianBlur", {
|
|
293
|
+
stdDeviation: "1",
|
|
294
|
+
result: "d"
|
|
295
|
+
}), jsx("feFlood", {}), jsx("feComposite", {
|
|
296
|
+
operator: "in",
|
|
297
|
+
in2: "d"
|
|
298
|
+
}), jsx("feComposite", {
|
|
299
|
+
in: "SourceGraphic"
|
|
300
|
+
})]
|
|
301
|
+
}))]
|
|
302
|
+
}), jsxs("g", Object.assign({
|
|
303
|
+
style: {
|
|
304
|
+
opacity: 0.7,
|
|
305
|
+
isolation: 'isolate'
|
|
306
|
+
},
|
|
307
|
+
transform: "translate(-286.735 -95.991)"
|
|
308
|
+
}, {
|
|
309
|
+
children: [jsx("g", Object.assign({
|
|
310
|
+
transform: "translate(288 96)"
|
|
311
|
+
}, {
|
|
312
|
+
children: jsx("rect", {
|
|
313
|
+
style: {
|
|
314
|
+
fill: 'none'
|
|
315
|
+
},
|
|
316
|
+
width: "24",
|
|
317
|
+
height: "24"
|
|
318
|
+
})
|
|
319
|
+
})), jsxs("g", Object.assign({
|
|
320
|
+
transform: "translate(289.735 97.991)"
|
|
321
|
+
}, {
|
|
322
|
+
children: [jsx("g", Object.assign({
|
|
323
|
+
style: {
|
|
324
|
+
filter: 'url(#a)'
|
|
325
|
+
},
|
|
326
|
+
transform: "matrix(1, 0, 0, 1, -3, -2)"
|
|
327
|
+
}, {
|
|
328
|
+
children: jsx("path", {
|
|
329
|
+
style: {
|
|
330
|
+
fill: '#FFFFFF'
|
|
331
|
+
},
|
|
332
|
+
d: "M577.409,536.791a1,1,0,0,0,1-1A8,8,0,0,1,592.817,531h0c.077.1.149.207.22.312l-1.911-.765a1,1,0,1,0-.743,1.856l3.7,1.483a1,1,0,0,0,1.3-.557l1.482-3.7a1,1,0,1,0-1.857-.744l-.448,1.12c-.048-.067-.093-.137-.143-.2h0a10,10,0,0,0-18.009,5.989A1,1,0,0,0,577.409,536.791Z",
|
|
333
|
+
transform: "translate(-573.41 -523.79)"
|
|
334
|
+
})
|
|
335
|
+
})), jsx("g", Object.assign({
|
|
336
|
+
style: {
|
|
337
|
+
filter: 'url(#c)'
|
|
338
|
+
},
|
|
339
|
+
transform: "matrix(1, 0, 0, 1, -3, -2)"
|
|
340
|
+
}, {
|
|
341
|
+
children: jsx("path", {
|
|
342
|
+
style: {
|
|
343
|
+
fill: '#FFFFFF'
|
|
344
|
+
},
|
|
345
|
+
d: "M595.938,534.808a1,1,0,0,0-1,1,8,8,0,0,1-14.409,4.79h0c-.076-.1-.148-.206-.219-.312l1.911.765a1,1,0,0,0,.743-1.857l-3.7-1.482a1,1,0,0,0-1.3.557l-1.482,3.7a1,1,0,0,0,1.856.743l.449-1.12c.047.067.093.136.142.2h0a10,10,0,0,0,18.009-5.989A1,1,0,0,0,595.938,534.808Z",
|
|
346
|
+
transform: "translate(-573.41 -523.79)"
|
|
347
|
+
})
|
|
348
|
+
}))]
|
|
349
|
+
}))]
|
|
350
|
+
}))]
|
|
351
|
+
})), jsx("div", {
|
|
352
|
+
className: "slider-img",
|
|
353
|
+
style: handStyle()
|
|
234
354
|
}), jsxs("div", Object.assign({
|
|
235
355
|
className: "slider-move"
|
|
236
356
|
}, {
|
|
@@ -257,7 +377,7 @@ var DragVerify = function DragVerify(props) {
|
|
|
257
377
|
id: 'swipe'
|
|
258
378
|
})
|
|
259
379
|
}))]
|
|
260
|
-
}))]
|
|
380
|
+
})), loading && jsx(Loading, {})]
|
|
261
381
|
}));
|
|
262
382
|
};
|
|
263
383
|
|
package/Drawer/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import RcDrawer from 'rc-drawer';
|
|
|
6
6
|
import { Button } from '../Button/index.js';
|
|
7
7
|
import { u as useFormatMessage } from '../_verture/useFormatMessage-703f8b20.js';
|
|
8
8
|
import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
9
|
+
import AutoTips from '../AutoTips/index.js';
|
|
9
10
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
10
11
|
import '../_verture/typeof-498dd2b1.js';
|
|
11
12
|
import 'clsx';
|
|
@@ -37,7 +38,7 @@ var localeJson = {
|
|
|
37
38
|
en: en
|
|
38
39
|
};
|
|
39
40
|
|
|
40
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/8 下午2:51\n* @description drawer样式\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-drawer {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1000;\n pointer-events: none;\n}\n\n.paraui-v3-drawer-inline {\n position: absolute;\n}\n\n.paraui-v3-drawer-mask {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1000;\n background: rgba(0, 0, 0, 0.45);\n pointer-events: auto;\n}\n\n.paraui-v3-drawer-content-wrapper {\n position: absolute;\n z-index: 1000;\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-content-wrapper-hidden {\n display: none;\n}\n\n.paraui-v3-drawer-left > .paraui-v3-drawer-content-wrapper {\n top: 0;\n bottom: 0;\n left: 0;\n box-shadow: 6px 0 16px -8px rgba(0, 0, 0, 0.08), 9px 0 28px 0 rgba(0, 0, 0, 0.05), 12px 0 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v3-drawer-right > .paraui-v3-drawer-content-wrapper {\n top: 0;\n right: 0;\n bottom: 0;\n box-shadow: -6px 0 16px -8px rgba(0, 0, 0, 0.08), -9px 0 28px 0 rgba(0, 0, 0, 0.05), -12px 0 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v3-drawer-top > .paraui-v3-drawer-content-wrapper {\n top: 0;\n right: 0;\n left: 0;\n box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.08), 0 9px 28px 0 rgba(0, 0, 0, 0.05), 0 12px 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v3-drawer-bottom > .paraui-v3-drawer-content-wrapper {\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 0 -6px 16px -8px rgba(0, 0, 0, 0.08), 0 -9px 28px 0 rgba(0, 0, 0, 0.05), 0 -12px 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v3-drawer-content {\n width: 100%;\n height: 100%;\n overflow: auto;\n background: rgb(255, 255, 255);\n pointer-events: auto;\n}\n.paraui-v3-drawer-content .drawer-content-body {\n display: flex;\n flex-flow: column nowrap;\n width: 100%;\n height: 100%;\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-header {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex: none;\n height: 60px;\n padding: 0 24px;\n font-size: 16px;\n font-weight: 700;\n color: rgb(46, 55, 67);\n border-bottom: 1px solid rgba(171, 176, 185, 0.2);\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-header .drawer-header-title {\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: space-between;\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-header .drawer-header-extra button + button {\n margin-left: 16px;\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-content {\n flex: 1;\n padding: 24px;\n overflow: auto;\n word-wrap: break-word;\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-footer {\n display: flex;\n align-items: center;\n flex: none;\n padding: 16px 24px;\n font-size: 16px;\n color: rgb(46, 55, 67);\n border-top: 1px solid rgba(171, 176, 185, 0.2);\n}\n\n.panel-motion-enter-start,\n.panel-motion-appear-start,\n.panel-motion-leave-start {\n transition: none;\n}\n\n.panel-motion-enter-active,\n.panel-motion-appear-active,\n.panel-motion-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-mask-motion-enter-active,\n.paraui-v3-drawer-mask-motion-appear-active,\n.paraui-v3-drawer-mask-motion-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-mask-motion-enter,\n.paraui-v3-drawer-mask-motion-appear {\n opacity: 0;\n}\n\n.paraui-v3-drawer-mask-motion-enter-active,\n.paraui-v3-drawer-mask-motion-appear-active {\n opacity: 1;\n}\n\n.paraui-v3-drawer-mask-motion-leave {\n opacity: 1;\n}\n\n.paraui-v3-drawer-mask-motion-leave-active {\n opacity: 0;\n}\n\n.paraui-v3-drawer-panel-motion-left-enter-start,\n.paraui-v3-drawer-panel-motion-left-appear-start,\n.paraui-v3-drawer-panel-motion-left-leave-start {\n transition: none;\n}\n\n.paraui-v3-drawer-panel-motion-left-enter-active,\n.paraui-v3-drawer-panel-motion-left-appear-active,\n.paraui-v3-drawer-panel-motion-left-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-panel-motion-left-enter-start,\n.paraui-v3-drawer-panel-motion-left-appear-start {\n transform: translateX(-100%) !important;\n}\n\n.paraui-v3-drawer-panel-motion-left-enter-active,\n.paraui-v3-drawer-panel-motion-left-appear-active {\n transform: translateX(0);\n}\n\n.paraui-v3-drawer-panel-motion-left-leave {\n transform: translateX(0);\n}\n\n.paraui-v3-drawer-panel-motion-left-leave-active {\n transform: translateX(-100%);\n}\n\n.paraui-v3-drawer-panel-motion-right-enter-start,\n.paraui-v3-drawer-panel-motion-right-appear-start,\n.paraui-v3-drawer-panel-motion-right-leave-start {\n transition: none;\n}\n\n.paraui-v3-drawer-panel-motion-right-enter-active,\n.paraui-v3-drawer-panel-motion-right-appear-active,\n.paraui-v3-drawer-panel-motion-right-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-panel-motion-right-enter-start,\n.paraui-v3-drawer-panel-motion-right-appear-start {\n transform: translateX(100%) !important;\n}\n\n.paraui-v3-drawer-panel-motion-right-enter-active,\n.paraui-v3-drawer-panel-motion-right-appear-active {\n transform: translateX(0);\n}\n\n.paraui-v3-drawer-panel-motion-right-leave {\n transform: translateX(0);\n}\n\n.paraui-v3-drawer-panel-motion-right-leave-active {\n transform: translateX(100%);\n}\n\n.paraui-v3-drawer-panel-motion-top-enter-start,\n.paraui-v3-drawer-panel-motion-top-appear-start,\n.paraui-v3-drawer-panel-motion-top-leave-start {\n transition: none;\n}\n\n.paraui-v3-drawer-panel-motion-top-enter-active,\n.paraui-v3-drawer-panel-motion-top-appear-active,\n.paraui-v3-drawer-panel-motion-top-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-panel-motion-top-enter-start,\n.paraui-v3-drawer-panel-motion-top-appear-start {\n transform: translateY(-100%) !important;\n}\n\n.paraui-v3-drawer-panel-motion-top-enter-active,\n.paraui-v3-drawer-panel-motion-top-appear-active {\n transform: translateY(0);\n}\n\n.paraui-v3-drawer-panel-motion-top-leave {\n transform: translateY(0);\n}\n\n.paraui-v3-drawer-panel-motion-top-leave-active {\n transform: translateY(-100%);\n}\n\n.paraui-v3-drawer-panel-motion-bottom-enter-start,\n.paraui-v3-drawer-panel-motion-bottom-appear-start,\n.paraui-v3-drawer-panel-motion-bottom-leave-start {\n transition: none;\n}\n\n.paraui-v3-drawer-panel-motion-bottom-enter-active,\n.paraui-v3-drawer-panel-motion-bottom-appear-active,\n.paraui-v3-drawer-panel-motion-bottom-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-panel-motion-bottom-enter-start,\n.paraui-v3-drawer-panel-motion-bottom-appear-start {\n transform: translateY(100%) !important;\n}\n\n.paraui-v3-drawer-panel-motion-bottom-enter-active,\n.paraui-v3-drawer-panel-motion-bottom-appear-active {\n transform: translateY(0);\n}\n\n.paraui-v3-drawer-panel-motion-bottom-leave {\n transform: translateY(0);\n}\n\n.paraui-v3-drawer-panel-motion-bottom-leave-active {\n transform: translateY(100%);\n}";
|
|
41
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/8 下午2:51\n* @description drawer样式\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-drawer {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1000;\n pointer-events: none;\n}\n\n.paraui-v3-drawer-inline {\n position: absolute;\n}\n\n.paraui-v3-drawer-mask {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1000;\n background: rgba(0, 0, 0, 0.45);\n pointer-events: auto;\n}\n\n.paraui-v3-drawer-content-wrapper {\n position: absolute;\n z-index: 1000;\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-content-wrapper-hidden {\n display: none;\n}\n\n.paraui-v3-drawer-left > .paraui-v3-drawer-content-wrapper {\n top: 0;\n bottom: 0;\n left: 0;\n box-shadow: 6px 0 16px -8px rgba(0, 0, 0, 0.08), 9px 0 28px 0 rgba(0, 0, 0, 0.05), 12px 0 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v3-drawer-right > .paraui-v3-drawer-content-wrapper {\n top: 0;\n right: 0;\n bottom: 0;\n box-shadow: -6px 0 16px -8px rgba(0, 0, 0, 0.08), -9px 0 28px 0 rgba(0, 0, 0, 0.05), -12px 0 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v3-drawer-top > .paraui-v3-drawer-content-wrapper {\n top: 0;\n right: 0;\n left: 0;\n box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.08), 0 9px 28px 0 rgba(0, 0, 0, 0.05), 0 12px 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v3-drawer-bottom > .paraui-v3-drawer-content-wrapper {\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 0 -6px 16px -8px rgba(0, 0, 0, 0.08), 0 -9px 28px 0 rgba(0, 0, 0, 0.05), 0 -12px 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v3-drawer-content {\n width: 100%;\n height: 100%;\n overflow: auto;\n background: rgb(255, 255, 255);\n pointer-events: auto;\n}\n.paraui-v3-drawer-content .drawer-content-body {\n display: flex;\n flex-flow: column nowrap;\n width: 100%;\n height: 100%;\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-header {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex: none;\n height: 60px;\n padding: 0 24px;\n font-size: 16px;\n font-weight: 700;\n color: rgb(46, 55, 67);\n border-bottom: 1px solid rgba(171, 176, 185, 0.2);\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-header .drawer-header-title {\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: space-between;\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-header .drawer-header-title-ellipsis {\n overflow: hidden;\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-header .drawer-header-extra {\n margin-left: 30px;\n flex-shrink: 0;\n white-space: nowrap;\n text-align: right;\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-header .drawer-header-extra button + button {\n margin-left: 16px;\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-content {\n flex: 1;\n padding: 24px;\n overflow: auto;\n word-wrap: break-word;\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-footer {\n display: flex;\n align-items: center;\n flex: none;\n padding: 16px 24px;\n font-size: 16px;\n color: rgb(46, 55, 67);\n border-top: 1px solid rgba(171, 176, 185, 0.2);\n}\n\n.panel-motion-enter-start,\n.panel-motion-appear-start,\n.panel-motion-leave-start {\n transition: none;\n}\n\n.panel-motion-enter-active,\n.panel-motion-appear-active,\n.panel-motion-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-mask-motion-enter-active,\n.paraui-v3-drawer-mask-motion-appear-active,\n.paraui-v3-drawer-mask-motion-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-mask-motion-enter,\n.paraui-v3-drawer-mask-motion-appear {\n opacity: 0;\n}\n\n.paraui-v3-drawer-mask-motion-enter-active,\n.paraui-v3-drawer-mask-motion-appear-active {\n opacity: 1;\n}\n\n.paraui-v3-drawer-mask-motion-leave {\n opacity: 1;\n}\n\n.paraui-v3-drawer-mask-motion-leave-active {\n opacity: 0;\n}\n\n.paraui-v3-drawer-panel-motion-left-enter-start,\n.paraui-v3-drawer-panel-motion-left-appear-start,\n.paraui-v3-drawer-panel-motion-left-leave-start {\n transition: none;\n}\n\n.paraui-v3-drawer-panel-motion-left-enter-active,\n.paraui-v3-drawer-panel-motion-left-appear-active,\n.paraui-v3-drawer-panel-motion-left-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-panel-motion-left-enter-start,\n.paraui-v3-drawer-panel-motion-left-appear-start {\n transform: translateX(-100%) !important;\n}\n\n.paraui-v3-drawer-panel-motion-left-enter-active,\n.paraui-v3-drawer-panel-motion-left-appear-active {\n transform: translateX(0);\n}\n\n.paraui-v3-drawer-panel-motion-left-leave {\n transform: translateX(0);\n}\n\n.paraui-v3-drawer-panel-motion-left-leave-active {\n transform: translateX(-100%);\n}\n\n.paraui-v3-drawer-panel-motion-right-enter-start,\n.paraui-v3-drawer-panel-motion-right-appear-start,\n.paraui-v3-drawer-panel-motion-right-leave-start {\n transition: none;\n}\n\n.paraui-v3-drawer-panel-motion-right-enter-active,\n.paraui-v3-drawer-panel-motion-right-appear-active,\n.paraui-v3-drawer-panel-motion-right-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-panel-motion-right-enter-start,\n.paraui-v3-drawer-panel-motion-right-appear-start {\n transform: translateX(100%) !important;\n}\n\n.paraui-v3-drawer-panel-motion-right-enter-active,\n.paraui-v3-drawer-panel-motion-right-appear-active {\n transform: translateX(0);\n}\n\n.paraui-v3-drawer-panel-motion-right-leave {\n transform: translateX(0);\n}\n\n.paraui-v3-drawer-panel-motion-right-leave-active {\n transform: translateX(100%);\n}\n\n.paraui-v3-drawer-panel-motion-top-enter-start,\n.paraui-v3-drawer-panel-motion-top-appear-start,\n.paraui-v3-drawer-panel-motion-top-leave-start {\n transition: none;\n}\n\n.paraui-v3-drawer-panel-motion-top-enter-active,\n.paraui-v3-drawer-panel-motion-top-appear-active,\n.paraui-v3-drawer-panel-motion-top-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-panel-motion-top-enter-start,\n.paraui-v3-drawer-panel-motion-top-appear-start {\n transform: translateY(-100%) !important;\n}\n\n.paraui-v3-drawer-panel-motion-top-enter-active,\n.paraui-v3-drawer-panel-motion-top-appear-active {\n transform: translateY(0);\n}\n\n.paraui-v3-drawer-panel-motion-top-leave {\n transform: translateY(0);\n}\n\n.paraui-v3-drawer-panel-motion-top-leave-active {\n transform: translateY(-100%);\n}\n\n.paraui-v3-drawer-panel-motion-bottom-enter-start,\n.paraui-v3-drawer-panel-motion-bottom-appear-start,\n.paraui-v3-drawer-panel-motion-bottom-leave-start {\n transition: none;\n}\n\n.paraui-v3-drawer-panel-motion-bottom-enter-active,\n.paraui-v3-drawer-panel-motion-bottom-appear-active,\n.paraui-v3-drawer-panel-motion-bottom-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-panel-motion-bottom-enter-start,\n.paraui-v3-drawer-panel-motion-bottom-appear-start {\n transform: translateY(100%) !important;\n}\n\n.paraui-v3-drawer-panel-motion-bottom-enter-active,\n.paraui-v3-drawer-panel-motion-bottom-appear-active {\n transform: translateY(0);\n}\n\n.paraui-v3-drawer-panel-motion-bottom-leave {\n transform: translateY(0);\n}\n\n.paraui-v3-drawer-panel-motion-bottom-leave-active {\n transform: translateY(100%);\n}";
|
|
41
42
|
styleInject(css_248z);
|
|
42
43
|
|
|
43
44
|
//drawer 抽屉
|
|
@@ -115,15 +116,29 @@ var Drawer = function Drawer(props) {
|
|
|
115
116
|
var handleCancel = function handleCancel() {
|
|
116
117
|
onCancel === null || onCancel === void 0 ? void 0 : onCancel();
|
|
117
118
|
};
|
|
119
|
+
var handleTitle = function handleTitle(title) {
|
|
120
|
+
if (typeof title === 'string') {
|
|
121
|
+
return jsx("div", Object.assign({
|
|
122
|
+
className: 'drawer-header-title drawer-header-title-ellipsis'
|
|
123
|
+
}, {
|
|
124
|
+
children: jsx(AutoTips, {
|
|
125
|
+
children: title
|
|
126
|
+
})
|
|
127
|
+
}));
|
|
128
|
+
}
|
|
129
|
+
return jsx("div", Object.assign({
|
|
130
|
+
className: 'drawer-header-title'
|
|
131
|
+
}, {
|
|
132
|
+
children: title
|
|
133
|
+
}));
|
|
134
|
+
};
|
|
118
135
|
//标题节点
|
|
119
136
|
var titleNode = jsxs("div", Object.assign({
|
|
120
137
|
className: 'drawer-body-header'
|
|
121
138
|
}, {
|
|
122
|
-
children: [jsx(
|
|
123
|
-
|
|
124
|
-
}, {
|
|
125
|
-
children: title
|
|
126
|
-
})), showExtra && jsx(Fragment, {
|
|
139
|
+
children: [jsx(Fragment, {
|
|
140
|
+
children: handleTitle(title)
|
|
141
|
+
}), showExtra && jsx(Fragment, {
|
|
127
142
|
children: jsx("div", Object.assign({
|
|
128
143
|
className: 'drawer-header-extra'
|
|
129
144
|
}, {
|
package/README.md
CHANGED
package/package.json
CHANGED
package/umd/DragVerify.js
CHANGED
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("@paraview/lib")):"function"==typeof define&&define.amd?define(["react","@paraview/lib"],r):"object"==typeof exports?exports.ParaUI=r(require("react"),require("@paraview/lib")):e.ParaUI=r(e.react,e["@paraview/lib"])}(self,(function(e,r){return function(){var t={
|
|
2
|
-
/*
|
|
3
|
-
object-assign
|
|
4
|
-
(c) Sindre Sorhus
|
|
5
|
-
@license MIT
|
|
6
|
-
*/var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var o,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c<arguments.length;c++){for(var l in o=Object(arguments[c]))t.call(o,l)&&(s[l]=o[l]);if(r){a=r(o);for(var u=0;u<a.length;u++)n.call(o,a[u])&&(s[a[u]]=o[a[u]])}}return s}},75251:function(e,r,t){"use strict";
|
|
7
|
-
/** @license React v17.0.2
|
|
8
|
-
* react-jsx-runtime.production.min.js
|
|
9
|
-
*
|
|
10
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
11
|
-
*
|
|
12
|
-
* This source code is licensed under the MIT license found in the
|
|
13
|
-
* LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/t(27418);var n=t(8156),i=60103;if(r.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),r.Fragment=o("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function l(e,r,t){var n,o={},l=null,u=null;for(n in void 0!==t&&(l=""+t),void 0!==r.key&&(l=""+r.key),void 0!==r.ref&&(u=r.ref),r)s.call(r,n)&&!c.hasOwnProperty(n)&&(o[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===o[n]&&(o[n]=r[n]);return{$$typeof:i,type:e,key:l,ref:u,props:o,_owner:a.current}}r.jsx=l,r.jsxs=l},85893:function(e,r,t){"use strict";e.exports=t(75251)},75875:function(e,r,t){var n=t(93379),i=t(38271);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};n(i,o);e.exports=i.locals||{}},93379:function(e,r,t){"use strict";var n,i=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},o=function(){var e={};return function(r){if(void 0===e[r]){var t=document.querySelector(r);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}e[r]=t}return e[r]}}(),a=[];function s(e){for(var r=-1,t=0;t<a.length;t++)if(a[t].identifier===e){r=t;break}return r}function c(e,r){for(var t={},n=[],i=0;i<e.length;i++){var o=e[i],c=r.base?o[0]+r.base:o[0],l=t[c]||0,u="".concat(c," ").concat(l);t[c]=l+1;var d=s(u),f={css:o[1],media:o[2],sourceMap:o[3]};-1!==d?(a[d].references++,a[d].updater(f)):a.push({identifier:u,updater:g(f,r),references:1}),n.push(u)}return n}function l(e){var r=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var i=t.nc;i&&(n.nonce=i)}if(Object.keys(n).forEach((function(e){r.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(r);else{var a=o(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(r)}return r}var u,d=(u=[],function(e,r){return u[e]=r,u.filter(Boolean).join("\n")});function f(e,r,t,n){var i=t?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=d(r,i);else{var o=document.createTextNode(i),a=e.childNodes;a[r]&&e.removeChild(a[r]),a.length?e.insertBefore(o,a[r]):e.appendChild(o)}}function v(e,r,t){var n=t.css,i=t.media,o=t.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var p=null,m=0;function g(e,r){var t,n,i;if(r.singleton){var o=m++;t=p||(p=l(r)),n=f.bind(null,t,o,!1),i=f.bind(null,t,o,!0)}else t=l(r),n=v.bind(null,t,r),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)};return n(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;n(e=r)}else i()}}e.exports=function(e,r){(r=r||{}).singleton||"boolean"==typeof r.singleton||(r.singleton=i());var t=c(e=e||[],r);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<t.length;n++){var i=s(t[n]);a[i].references--}for(var o=c(e,r),l=0;l<t.length;l++){var u=s(t[l]);0===a[u].references&&(a[u].updater(),a.splice(u,1))}t=o}}}},58543:function(e){"use strict";e.exports=r},8156:function(r){"use strict";r.exports=e}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={id:e,exports:{}};return t[e](o,o.exports,i),o.exports}i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,{a:r}),r},i.d=function(e,r){for(var t in r)i.o(r,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nc=void 0;var o={};return function(){"use strict";i.r(o),i.d(o,{DragVerify:function(){return x},default:function(){return w}});var e=i(8156),r=i.n(e);function t(e){var r,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(r=0;r<e.length;r++)e[r]&&(n=t(e[r]))&&(i&&(i+=" "),i+=n);else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}var n=i(85893);!function(e,r){void 0===r&&(r={});var t=r.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===t&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}('@charset "UTF-8";\n/**\n* @author Hanz\n* @date 2021/8/25 下午3:16\n* @description icons scss\n*/\n.paraui-icon {\n width: 1em;\n height: 1em;\n fill: currentColor;\n display: inline-block;\n user-select: none;\n flex-shrink: 0;\n}\n.paraui-icon-primary {\n color: #3666d6;\n}\n.paraui-icon-secondary {\n color: #3666d6;\n}\n.paraui-icon-thirdary {\n color: #3666d6;\n}\n.paraui-icon-small {\n font-size: 16px;\n}\n.paraui-icon-medium {\n font-size: 18px;\n}\n.paraui-icon-large {\n font-size: 20px;\n}');var a=function(e){var r,t,i=e.path,o=e.className,a=e.color,s=void 0===a?"primary":a,c=e.size,l=void 0===c?"small":c,u=e.dataName,d=void 0===u?"":u,f=e.style,v=
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("@paraview/lib")):"function"==typeof define&&define.amd?define(["react","@paraview/lib"],r):"object"==typeof exports?exports.ParaUI=r(require("react"),require("@paraview/lib")):e.ParaUI=r(e.react,e["@paraview/lib"])}(self,(function(e,r){return function(){var t={61217:function(e,r,t){"use strict";t.d(r,{Z:function(){return o}});var n=t(85893),i=t(97435),o=function(e){return(0,n.jsx)(i.l,Object.assign({dataName:"LoadingF",path:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("path",{d:"M512 0a512 512 0 0 1 512 512h-64A448 448 0 0 0 512 64V0z","p-id":"11109"})})},e))}},97435:function(e,r,t){"use strict";t.d(r,{l:function(){return i}});var n=t(85893);
|
|
15
2
|
/*! *****************************************************************************
|
|
16
3
|
Copyright (c) Microsoft Corporation.
|
|
17
4
|
|
|
@@ -25,5 +12,17 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
25
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
26
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
27
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
28
|
-
***************************************************************************** */
|
|
29
|
-
|
|
15
|
+
***************************************************************************** */!function(e,r){void 0===r&&(r={});var t=r.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===t&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}('@charset "UTF-8";\n/**\n* @author Hanz\n* @date 2021/8/25 下午3:16\n* @description icons scss\n*/\n.paraui-icon {\n width: 1em;\n height: 1em;\n fill: currentColor;\n display: inline-block;\n user-select: none;\n flex-shrink: 0;\n}\n.paraui-icon-primary {\n color: #3666d6;\n}\n.paraui-icon-secondary {\n color: #3666d6;\n}\n.paraui-icon-thirdary {\n color: #3666d6;\n}\n.paraui-icon-small {\n font-size: 16px;\n}\n.paraui-icon-medium {\n font-size: 18px;\n}\n.paraui-icon-large {\n font-size: 20px;\n}');var i=function(e){var r,t,i=e.path,o=e.className,a=e.color,s=void 0===a?"primary":a,l=e.size,c=void 0===l?"small":l,u=e.dataName,d=void 0===u?"":u,f=e.style,p=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]])}return t}(e,["path","className","color","size","dataName","style"]);return(0,n.jsx)("svg",Object.assign({className:(t="paraui-icon",t+=" svg-icon",o&&(t+=" "+o),"primary"!==s&&"secondary"!==s&&"thirdary"!==s||(t+=" paraui-icon-"+s),c&&(t+=" paraui-icon-"+c),t),viewBox:"0 0 1024 1024","data-name":d,style:(r=Object.assign({},f),s&&"primary"!==s&&"secondary"!==s&&"thirdary"!==s&&(r.color=s),r)},p,{children:i}))}},38271:function(e,r,t){(r=t(23645)(!1)).push([e.id,".paraui-v3-drag-verify{width:100%;position:relative}.paraui-v3-drag-verify>svg{position:absolute;right:4px;top:4px;z-index:10;cursor:pointer;display:none}.paraui-v3-drag-verify>.slider-img{position:relative;border-radius:4px;overflow:hidden;line-height:0;min-height:60px}.paraui-v3-drag-verify>.slider-img .slider-img-bg{width:100%;height:auto;border-radius:4px}.paraui-v3-drag-verify>.slider-img .slider-img-move{position:absolute;left:0;height:auto}.paraui-v3-drag-verify>.slider-move{position:relative;text-align:center;line-height:32px;height:32px;margin-top:12px}.paraui-v3-drag-verify>.slider-move>.slider-move-bg{position:absolute;left:0;right:0;top:0;background-color:rgba(171,176,185,.12);height:32px;border-radius:4px;border:1px solid rgba(171,176,185,.2)}.paraui-v3-drag-verify>.slider-move>.slider-move-mask{position:absolute;left:0;top:0;height:32px;width:2px;border-bottom-left-radius:4px;border-top-left-radius:4px}.paraui-v3-drag-verify>.slider-move>.slider-move-mask>.slider-move-box{position:absolute;top:0;left:-1px;width:32px;height:32px;background:#fff;cursor:pointer;border-radius:4px;display:flex;align-items:center;justify-content:center;border:1px solid rgba(171,176,185,.2)}.paraui-v3-drag-verify>.slider-move>.slider-move-mask>.slider-move-box:hover .svg-right{color:#3666d6}.paraui-v3-drag-verify>.slider-move>.slider-move-mask>.slider-move-box .svg-right{display:inline-block;color:rgba(46,55,67,.7)}.paraui-v3-drag-verify>.slider-move>.slider-move-mask>.slider-move-box .svg-close{display:none}.paraui-v3-drag-verify>.slider-move>.slider-move-mask>.slider-move-box .svg-check{display:none}.paraui-v3-drag-verify>.slider-move>.slider-move-text{color:rgba(46,55,67,.4);font-size:14px}.paraui-v3-drag-verify.paraui-v3-drag-verify-move>.slider-move>.slider-move-mask{border:1px solid #3666d6;border-width:1px 0 1px 1px;background-color:rgba(54,102,214,.05)}.paraui-v3-drag-verify.paraui-v3-drag-verify-move>.slider-move>.slider-move-mask>.slider-move-box{background-color:#3666d6;border-top:1px solid #3666d6;border-bottom:1px solid #3666d6;top:-1px;border-bottom-left-radius:0;border-top-left-radius:0}.paraui-v3-drag-verify.paraui-v3-drag-verify-move>.slider-move>.slider-move-mask>.slider-move-box>.svg-right{color:#fff}.paraui-v3-drag-verify.paraui-v3-drag-verify-error>.slider-move>.slider-move-mask{border:1px solid #eb6054;border-width:1px 0 1px 1px;background-color:rgba(54,102,214,.05)}.paraui-v3-drag-verify.paraui-v3-drag-verify-error>.slider-move>.slider-move-mask>.slider-move-box{background-color:#eb6054;border-top:1px solid #eb6054;border-bottom:1px solid #eb6054;top:-1px;border-bottom-left-radius:0;border-top-left-radius:0}.paraui-v3-drag-verify.paraui-v3-drag-verify-error>.slider-move>.slider-move-mask>.slider-move-box>.svg-close{display:inline-block;color:#fff}.paraui-v3-drag-verify.paraui-v3-drag-verify-error>.slider-move>.slider-move-mask>.slider-move-box>.svg-right{display:none}.paraui-v3-drag-verify.paraui-v3-drag-verify-error>.slider-move>.slider-move-mask>.slider-move-box>.svg-check{display:none}.paraui-v3-drag-verify.paraui-v3-drag-verify-success>.slider-move>.slider-move-mask{border:1px solid #53c31b;border-width:1px 0 1px 1px;background-color:rgba(83,195,27,.05)}.paraui-v3-drag-verify.paraui-v3-drag-verify-success>.slider-move>.slider-move-mask>.slider-move-box{background-color:#53c31b;border-top:1px solid #53c31b;border-bottom:1px solid #53c31b;top:-1px;border-bottom-left-radius:0;border-top-left-radius:0}.paraui-v3-drag-verify.paraui-v3-drag-verify-success>.slider-move>.slider-move-mask>.slider-move-box .svg-close{display:none}.paraui-v3-drag-verify.paraui-v3-drag-verify-success>.slider-move>.slider-move-mask>.slider-move-box .svg-right{display:none}.paraui-v3-drag-verify.paraui-v3-drag-verify-success>.slider-move>.slider-move-mask>.slider-move-box .svg-check{display:inline-block;color:#fff}",""]),e.exports=r},5714:function(e,r,t){(r=t(23645)(!1)).push([e.id,".paraui-v3-loading{position:absolute;left:0;top:0;width:100%;height:100%}@keyframes rotateLoading{0%{transformOrigin:50% 50%}100%{transform:rotate(360deg)}}.paraui-v3-loading .loading-mask{position:absolute;width:100%;height:100%;background-color:#fff;z-index:100}.paraui-v3-loading .loading-box{position:absolute;width:100%;height:100%;display:flex;justify-content:center;align-items:center;z-index:101}.paraui-v3-loading .loading-box>svg{transition:all .3s ease-in-out;animation:rotateLoading 1s infinite linear;font-size:20px}",""]),e.exports=r},23645:function(e){"use strict";e.exports=function(e){var r=[];return r.toString=function(){return this.map((function(r){var t=function(e,r){var t=e[1]||"",n=e[3];if(!n)return t;if(r&&"function"==typeof btoa){var i=(a=n,s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),o=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[t].concat(o).concat([i]).join("\n")}var a,s,l;return[t].join("\n")}(r,e);return r[2]?"@media ".concat(r[2]," {").concat(t,"}"):t})).join("")},r.i=function(e,t,n){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(n)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(i[a]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);n&&i[l[0]]||(t&&(l[2]?l[2]="".concat(t," and ").concat(l[2]):l[2]=t),r.push(l))}},r}},27418:function(e){"use strict";
|
|
16
|
+
/*
|
|
17
|
+
object-assign
|
|
18
|
+
(c) Sindre Sorhus
|
|
19
|
+
@license MIT
|
|
20
|
+
*/var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var o,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l<arguments.length;l++){for(var c in o=Object(arguments[l]))t.call(o,c)&&(s[c]=o[c]);if(r){a=r(o);for(var u=0;u<a.length;u++)n.call(o,a[u])&&(s[a[u]]=o[a[u]])}}return s}},75251:function(e,r,t){"use strict";
|
|
21
|
+
/** @license React v17.0.2
|
|
22
|
+
* react-jsx-runtime.production.min.js
|
|
23
|
+
*
|
|
24
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
25
|
+
*
|
|
26
|
+
* This source code is licensed under the MIT license found in the
|
|
27
|
+
* LICENSE file in the root directory of this source tree.
|
|
28
|
+
*/t(27418);var n=t(8156),i=60103;if(r.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),r.Fragment=o("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,r,t){var n,o={},c=null,u=null;for(n in void 0!==t&&(c=""+t),void 0!==r.key&&(c=""+r.key),void 0!==r.ref&&(u=r.ref),r)s.call(r,n)&&!l.hasOwnProperty(n)&&(o[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===o[n]&&(o[n]=r[n]);return{$$typeof:i,type:e,key:c,ref:u,props:o,_owner:a.current}}r.jsx=c,r.jsxs=c},85893:function(e,r,t){"use strict";e.exports=t(75251)},75875:function(e,r,t){var n=t(93379),i=t(38271);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};n(i,o);e.exports=i.locals||{}},13267:function(e,r,t){var n=t(93379),i=t(5714);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:"head",singleton:!1};n(i,o);e.exports=i.locals||{}},93379:function(e,r,t){"use strict";var n,i=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},o=function(){var e={};return function(r){if(void 0===e[r]){var t=document.querySelector(r);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}e[r]=t}return e[r]}}(),a=[];function s(e){for(var r=-1,t=0;t<a.length;t++)if(a[t].identifier===e){r=t;break}return r}function l(e,r){for(var t={},n=[],i=0;i<e.length;i++){var o=e[i],l=r.base?o[0]+r.base:o[0],c=t[l]||0,u="".concat(l," ").concat(c);t[l]=c+1;var d=s(u),f={css:o[1],media:o[2],sourceMap:o[3]};-1!==d?(a[d].references++,a[d].updater(f)):a.push({identifier:u,updater:g(f,r),references:1}),n.push(u)}return n}function c(e){var r=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var i=t.nc;i&&(n.nonce=i)}if(Object.keys(n).forEach((function(e){r.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(r);else{var a=o(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(r)}return r}var u,d=(u=[],function(e,r){return u[e]=r,u.filter(Boolean).join("\n")});function f(e,r,t,n){var i=t?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=d(r,i);else{var o=document.createTextNode(i),a=e.childNodes;a[r]&&e.removeChild(a[r]),a.length?e.insertBefore(o,a[r]):e.appendChild(o)}}function p(e,r,t){var n=t.css,i=t.media,o=t.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var v=null,m=0;function g(e,r){var t,n,i;if(r.singleton){var o=m++;t=v||(v=c(r)),n=f.bind(null,t,o,!1),i=f.bind(null,t,o,!0)}else t=c(r),n=p.bind(null,t,r),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)};return n(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;n(e=r)}else i()}}e.exports=function(e,r){(r=r||{}).singleton||"boolean"==typeof r.singleton||(r.singleton=i());var t=l(e=e||[],r);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<t.length;n++){var i=s(t[n]);a[i].references--}for(var o=l(e,r),c=0;c<t.length;c++){var u=s(t[c]);0===a[u].references&&(a[u].updater(),a.splice(u,1))}t=o}}}},37464:function(e,r,t){"use strict";t.d(r,{W:function(){return n}});var n="paraui-v3"},5927:function(e,r,t){"use strict";var n=t(8156),i=t.n(n),o=t(61217),a=t(37464);t(13267);r.default=function(e){var r=e.className,t=e.style,s=e.opacity,l=void 0===s?.7:s,c=(0,n.useRef)(null);(0,n.useEffect)((function(){c&&c.current&&c.current.parentNode&&(c.current.parentNode.style.position||(c.current.parentNode.style.position="relative"))}),[]);var u;return i().createElement("div",{className:(u="".concat(a.W,"-loading"),r&&(u+=" "+r),u),style:t,ref:c},i().createElement("div",{className:"loading-box"},i().createElement(o.Z,null)),i().createElement("div",{className:"loading-mask",style:{opacity:l}}))}},58543:function(e){"use strict";e.exports=r},8156:function(r){"use strict";r.exports=e}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={id:e,exports:{}};return t[e](o,o.exports,i),o.exports}i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,{a:r}),r},i.d=function(e,r){for(var t in r)i.o(r,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nc=void 0;var o={};return function(){"use strict";i.r(o),i.d(o,{DragVerify:function(){return S},default:function(){return E}});var e=i(8156),r=i.n(e);function t(e){var r,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(r=0;r<e.length;r++)e[r]&&(n=t(e[r]))&&(i&&(i+=" "),i+=n);else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}var n=i(85893),a=i(97435),s=function(e){return(0,n.jsx)(a.l,Object.assign({dataName:"DoubleRight",path:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("path",{d:"M476.757333 813.696a42.666667 42.666667 0 0 1 12.501334-30.165333l271.530666-271.573334-271.530666-271.488a42.666667 42.666667 0 0 1 60.330666-60.330666l301.696 301.653333a42.666667 42.666667 0 0 1 0 60.373333l-301.696 301.696a42.666667 42.666667 0 0 1-72.832-30.165333z"}),(0,n.jsx)("path",{d:"M160.256 813.696a42.666667 42.666667 0 0 1 12.501333-30.165333l271.530667-271.573334-271.530667-271.488a42.666667 42.666667 0 0 1 60.330667-60.330666l301.696 301.653333a42.666667 42.666667 0 0 1 0 60.373333l-301.696 301.696a42.666667 42.666667 0 0 1-72.832-30.165333z"})]})},e))},l=function(e){return(0,n.jsx)(a.l,Object.assign({dataName:"Close",path:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("path",{d:"M572.330667 512l183.168-183.168a42.666667 42.666667 0 0 0-60.330667-60.330667L512 451.669333 328.832 268.501333a42.666667 42.666667 0 0 0-60.330667 60.330667L451.669333 512l-183.168 183.168a42.666667 42.666667 0 1 0 60.330667 60.330667L512 572.330667l183.168 183.168a42.666667 42.666667 0 0 0 60.330667-60.330667z"})})},e))},c=function(e){return(0,n.jsx)(a.l,Object.assign({dataName:"Check",path:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("path",{d:"M854.528 283.221333a46.933333 46.933333 0 0 0-66.389333 0l-357.930667 357.973334-194.346667-194.304a46.933333 46.933333 0 0 0-66.389333 66.389333l227.541333 227.498667a46.933333 46.933333 0 0 0 66.389334 0c0.512-0.554667 0.682667-1.237333 1.194666-1.792s1.28-0.682667 1.792-1.194667l388.266667-388.266667a46.933333 46.933333 0 0 0-0.128-66.304z"})})},e))},u=i(37464);function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}var f=function(e){var t,i,o,a,s=e.ops,l=e.i18nData,c=e.lang,u=e.params,f=e.defI18nData;if("string"==typeof s)a=s;else if("object"===d(s)){if("string"!=typeof s.id)return'i18n intl object "id" is missing';a=s.id}return void 0!==a&&void 0===(o=null===(t=l[c])||void 0===t?void 0:t[a])&&f&&(o=null===(i=f[c])||void 0===i?void 0:i[a]),"string"!=typeof o?"{".concat(a,"}"):function(e,t){if(!t)return e;var i=!1,o=(e=e.replace(/\"/g,'\\"')).replace(/\{(.*?)\}/gi,(function(e,r){return"object"===d(t[r])&&(i=!0),'",vars.'.concat(r,',"')}));return i?new Function("vars",'return ["'.concat(o,'"];'))(t).map((function(e){return(0,n.jsx)(r().Fragment,{children:e},Math.random())})):new Function("vars",'return ["'.concat(o,"\"].join('');"))(t)}(o,u)},p=i(58543),v={cancel:"取消",ok:"确定"},m=(Object.assign({},v),r().createContext({language:(0,p.GetLanguage)(),intlFormat:function(e,r){return function(e,t){var n=(0,p.GetLanguage)();return f({ops:e,i18nData:{},lang:n,params:t,defI18nData:r})}},componentsProps:{}})),g=function(e,t){var n=r().useContext(m).intlFormat;return t.zh_CN=t.zh,t["zh-CN"]=t.zh,t.en_US=t.en,t["en-US"]=t.en,n&&n(e,t)},y={zh:{tryAgain:"再试一次",swipe:"向右滑动填充拼图"},en:{tryAgain:"Try again",swipe:"Swipe right to fill puzzle"}},h=i(5927);i(75875);function b(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function x(e,r,t,n,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void t(e)}s.done?r(l):Promise.resolve(l).then(n,i)}function w(e){return function(){var r=this,t=arguments;return new Promise((function(n,i){var o=e.apply(r,t);function a(e){x(o,n,i,a,s,"next",e)}function s(e){x(o,n,i,a,s,"throw",e)}a(void 0)}))}}function j(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,i,o=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(n=t.next()).done)&&(o.push(n.value),!r||o.length!==r);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw i}}return o}}(e,r)||function(e,r){if(!e)return;if("string"==typeof e)return b(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return b(e,r)}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var k=function(e,r){var t,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=r.call(e,a)}catch(e){o=[6,e],n=0}finally{t=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},S=function(n){var i=n.className,o=n.style,a=n.refresh,d=n.getImgInfo,f=n.verify,p=n.width,v=n.height,m=g("DragVerify",y),b=j((0,e.useState)(),2),x=b[0],S=b[1],E=j((0,e.useState)(!1),2),O=E[0],N=E[1],C=(0,e.useRef)(null),F=(0,e.useRef)({getImgInfo:d,verify:f}),I=u.W+"-drag-verify";F.current.getImgInfo=d,F.current.verify=f,(0,e.useEffect)((function(){return A(),T(),function(){clearTimeout(F.current.timerError),clearTimeout(F.current.timerSuccess)}}),[a,x]);var M,T=(M=w((function(){var e;return k(this,(function(r){switch(r.label){case 0:return F.current.padding=!0,N(!0),[4,F.current.getImgInfo()];case 1:return e=r.sent(),F.current.imgInfo=e,L(),[2]}}))})),function(){return M.apply(this,arguments)}),_=function(){var e=w((function(e,r){var t;return k(this,(function(n){switch(n.label){case 0:return[4,F.current.verify(e,F.current.verify)];case 1:return t=n.sent(),r(t),[2]}}))}));return function(r,t){return e.apply(this,arguments)}}(),L=function(){var e;if(C.current){var r=document.createElement("img");r.setAttribute("src",null===(e=F.current.imgInfo)||void 0===e?void 0:e.sourceImage),r.style.display="none";var t=document.createElement("img");F.current.imgMove=t,t.className="slider-img-move",t.style.display="none";var n=C.current.querySelector(".slider-img"),i=C.current.querySelector(".refresh");n&&i&&(i.style.display="none",n.innerHTML="",n.append(r),r.onload=function(){var e;r.style.display="inline-block",t.setAttribute("src",null===(e=F.current.imgInfo)||void 0===e?void 0:e.newImage);var n=r.width;if(r.className="slider-img-bg",r.style.display="inline-block",C.current){var o=C.current.querySelector(".slider-img"),a=(null==o?void 0:o.getBoundingClientRect()).width;F.current.imgScale=n/a,null==o||o.append(t),t.onload=function(){var e;F.current.padding=!1,t.style.display="inline-block",i.style.display="inline-block",t.width=t.width/F.current.imgScale,t.style.top=(null===(e=F.current.imgInfo)||void 0===e?void 0:e.y)/F.current.imgScale+"px",N(!1)}}},z(r,t))}},z=function(e,r){var t=C.current;if(t){var n=t.querySelector(".slider-move-box"),i=t.querySelector(".slider-move-mask"),o=t.querySelector(".slider-move"),a=t.querySelector(".slider-move-text"),s=o.getBoundingClientRect(),l=n.getBoundingClientRect().width,c=s.width;n.onmousedown=function(o){F.current.padding||(t.classList.add(I+"-move"),document.onmousemove=function(t){var s=t.pageX-o.pageX;s<0&&(s=0),s+l>e.width&&(s=e.width-l),n.style.left=s-1+"px",i.style.width=(s<2?2:s)+"px";var u=s/(c-l),d=(e.width-r.width)*u;r.style.left=d+"px",a.innerHTML=""},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null,t.classList.remove(I+"-move"),F.current.padding=!0;var e=parseFloat(r.style.left)*F.current.imgScale;_(e,(function(e){if(!e)return t.classList.add(I+"-error"),void(F.current.timerError=setTimeout((function(){F.current.padding=!1,A(),a.innerHTML=m({id:"tryAgain"}),T()}),1e3));t.classList.add(I+"-success")}))})}}},A=function(){var e=C.current;if(e){e.classList.remove(I+"-success"),e.classList.remove(I+"-error");var r=e.querySelector(".slider-move-box"),t=e.querySelector(".slider-move-mask");e.querySelector(".slider-move-text").innerHTML=m({id:"swipe"}),r.style.left="-1px",t.style.width="0px",F.current.imgMove&&(F.current.imgMove.style.left="0px")}};return r().createElement("div",{className:function(){for(var e,r,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(r=t(e))&&(i&&(i+=" "),i+=r);return i}(I,i),style:o,ref:C},r().createElement("svg",{onClick:function(){S(Math.random())},className:"refresh",width:"26.529",height:"26.017",viewBox:"0 0 26.529 26.017"},r().createElement("defs",null,r().createElement("filter",{id:"a",x:"0",y:"0",width:"26.529",height:"17",filterUnits:"userSpaceOnUse"},r().createElement("feOffset",{dy:"1"}),r().createElement("feGaussianBlur",{stdDeviation:"1",result:"b"}),r().createElement("feFlood",null),r().createElement("feComposite",{operator:"in",in2:"b"}),r().createElement("feComposite",{in:"SourceGraphic"})),r().createElement("filter",{id:"c",x:"0",y:"9.017",width:"26.529",height:"17",filterUnits:"userSpaceOnUse"},r().createElement("feOffset",{dy:"1"}),r().createElement("feGaussianBlur",{stdDeviation:"1",result:"d"}),r().createElement("feFlood",null),r().createElement("feComposite",{operator:"in",in2:"d"}),r().createElement("feComposite",{in:"SourceGraphic"}))),r().createElement("g",{style:{opacity:.7,isolation:"isolate"},transform:"translate(-286.735 -95.991)"},r().createElement("g",{transform:"translate(288 96)"},r().createElement("rect",{style:{fill:"none"},width:"24",height:"24"})),r().createElement("g",{transform:"translate(289.735 97.991)"},r().createElement("g",{style:{filter:"url(#a)"},transform:"matrix(1, 0, 0, 1, -3, -2)"},r().createElement("path",{style:{fill:"#FFFFFF"},d:"M577.409,536.791a1,1,0,0,0,1-1A8,8,0,0,1,592.817,531h0c.077.1.149.207.22.312l-1.911-.765a1,1,0,1,0-.743,1.856l3.7,1.483a1,1,0,0,0,1.3-.557l1.482-3.7a1,1,0,1,0-1.857-.744l-.448,1.12c-.048-.067-.093-.137-.143-.2h0a10,10,0,0,0-18.009,5.989A1,1,0,0,0,577.409,536.791Z",transform:"translate(-573.41 -523.79)"})),r().createElement("g",{style:{filter:"url(#c)"},transform:"matrix(1, 0, 0, 1, -3, -2)"},r().createElement("path",{style:{fill:"#FFFFFF"},d:"M595.938,534.808a1,1,0,0,0-1,1,8,8,0,0,1-14.409,4.79h0c-.076-.1-.148-.206-.219-.312l1.911.765a1,1,0,0,0,.743-1.857l-3.7-1.482a1,1,0,0,0-1.3.557l-1.482,3.7a1,1,0,0,0,1.856.743l.449-1.12c.047.067.093.136.142.2h0a10,10,0,0,0,18.009-5.989A1,1,0,0,0,595.938,534.808Z",transform:"translate(-573.41 -523.79)"}))))),r().createElement("div",{className:"slider-img",style:function(){var e={};if(p){var r=p;"number"==typeof p&&(r=p+"px"),e.width=r}if(v){var t=v;"number"==typeof v&&(t=v+"px"),e.height=t}return e}()}),r().createElement("div",{className:"slider-move"},r().createElement("div",{className:"slider-move-bg"}),r().createElement("div",{className:"slider-move-mask"},r().createElement("div",{className:"slider-move-box"},r().createElement(s,{className:"svg-right"}),r().createElement(l,{className:"svg-close"}),r().createElement(c,{className:"svg-check"}))),r().createElement("span",{className:"slider-move-text"},m({id:"swipe"}))),O&&r().createElement(h.default,null))},E=S}(),o}()}));
|