assui 2.0.2 → 2.0.6
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/es/button-drawer/index.d.ts +10 -0
- package/es/button-drawer/index.js +116 -0
- package/es/button-drawer/style/index.d.ts +1 -0
- package/es/button-drawer/style/index.js +1 -0
- package/es/button-modal/index.d.ts +14 -0
- package/es/button-modal/index.js +131 -0
- package/es/button-modal/style/index.d.ts +1 -0
- package/es/button-modal/style/index.js +1 -0
- package/es/condition-input/index.d.ts +15 -0
- package/es/condition-input/index.js +108 -0
- package/es/condition-input/parse2RegexOption.d.ts +13 -0
- package/es/condition-input/parse2RegexOption.js +57 -0
- package/es/condition-input/style/index.d.ts +1 -0
- package/es/condition-input/style/index.js +1 -0
- package/es/copy-to-clipboard/index.d.ts +22 -0
- package/es/copy-to-clipboard/index.js +95 -0
- package/es/copy-to-clipboard/style/index.css +249 -0
- package/es/copy-to-clipboard/style/index.d.ts +1 -0
- package/es/copy-to-clipboard/style/index.js +1 -0
- package/es/copy-to-clipboard/style/index.less +1 -0
- package/es/highlight-textarea/HighlighedContents.d.ts +7 -0
- package/es/highlight-textarea/HighlighedContents.js +15 -0
- package/es/highlight-textarea/extractSpansOfClasses.d.ts +15 -0
- package/es/highlight-textarea/extractSpansOfClasses.js +159 -0
- package/es/highlight-textarea/getRanges.d.ts +2 -0
- package/es/highlight-textarea/getRanges.js +142 -0
- package/es/highlight-textarea/getType.d.ts +2 -0
- package/es/highlight-textarea/getType.js +29 -0
- package/es/highlight-textarea/index.d.ts +12 -0
- package/es/highlight-textarea/index.js +132 -0
- package/es/highlight-textarea/style/index.css +38 -0
- package/es/highlight-textarea/style/index.d.ts +2 -0
- package/es/highlight-textarea/style/index.js +2 -0
- package/es/highlight-textarea/style/index.less +42 -0
- package/es/highlight-textarea/types.d.ts +16 -0
- package/es/highlight-textarea/types.js +0 -0
- package/es/highlight-words/index.d.ts +3 -0
- package/es/highlight-words/index.js +2 -0
- package/es/highlight-words/style/index.d.ts +1 -0
- package/es/highlight-words/style/index.js +0 -0
- package/es/icon/demo/svg/check-circle-filled.svg +6 -0
- package/es/icon/demo/svg/coin-circle.svg +9 -0
- package/es/icon/index.d.ts +27 -0
- package/es/icon/index.js +95 -0
- package/es/icon/style/index.d.ts +1 -0
- package/es/icon/style/index.js +0 -0
- package/es/icon/utils.d.ts +6 -0
- package/es/icon/utils.js +22 -0
- package/es/img-crop/EasyCrop.d.ts +6 -0
- package/es/img-crop/EasyCrop.js +113 -0
- package/es/img-crop/getCroppedImg.d.ts +6 -0
- package/es/img-crop/getCroppedImg.js +199 -0
- package/es/img-crop/index.d.ts +53 -0
- package/es/img-crop/index.js +531 -0
- package/es/img-crop/style/index.css +52 -0
- package/es/img-crop/style/index.d.ts +3 -0
- package/es/img-crop/style/index.js +3 -0
- package/es/img-crop/style/index.less +54 -0
- package/es/index.d.ts +34 -2
- package/es/index.js +18 -2
- package/es/keep-tab/demo/index.modules.less +66 -0
- package/es/keep-tab/index.d.ts +29 -0
- package/es/keep-tab/index.js +129 -0
- package/es/keep-tab/style/index.css +1129 -0
- package/es/keep-tab/style/index.d.ts +2 -0
- package/es/keep-tab/style/index.js +2 -0
- package/es/keep-tab/style/index.less +2 -0
- package/es/number-input/index.d.ts +22 -7
- package/es/number-input/index.js +22 -11
- package/es/number-input/style/index.d.ts +1 -1
- package/es/number-input/style/index.js +1 -1
- package/es/number-input/utils.d.ts +10 -11
- package/es/number-input/utils.js +7 -7
- package/es/rc-echart/core.d.ts +32 -0
- package/es/rc-echart/core.js +136 -0
- package/es/rc-echart/index.d.ts +21 -0
- package/es/rc-echart/index.js +27 -0
- package/es/rc-echart/style/index.d.ts +1 -0
- package/es/rc-echart/style/index.js +0 -0
- package/es/rc-motion/demo/CSSMotion.less +91 -0
- package/es/rc-motion/index.d.ts +2 -0
- package/es/rc-motion/index.js +2 -0
- package/es/rc-motion/style/index.d.ts +1 -0
- package/es/rc-motion/style/index.js +0 -0
- package/es/rc-qrcode/index.d.ts +20 -0
- package/es/rc-qrcode/index.js +57 -0
- package/es/rc-qrcode/style/index.d.ts +1 -0
- package/es/rc-qrcode/style/index.js +0 -0
- package/es/rc-qrcode/useQrcode.d.ts +4 -0
- package/es/rc-qrcode/useQrcode.js +50 -0
- package/es/rc-transition-group/index.d.ts +2 -0
- package/es/rc-transition-group/index.js +2 -0
- package/es/rc-transition-group/style/index.d.ts +1 -0
- package/es/rc-transition-group/style/index.js +0 -0
- package/es/single-img-upload/index.d.ts +19 -0
- package/es/single-img-upload/index.js +199 -0
- package/es/single-img-upload/style/index.css +74 -0
- package/es/single-img-upload/style/index.d.ts +3 -0
- package/es/single-img-upload/style/index.js +3 -0
- package/es/single-img-upload/style/index.less +85 -0
- package/es/sortable-hoc/demo/VerticalListBase/index.modules.less +63 -0
- package/es/sortable-hoc/demo/index.modules.less +248 -0
- package/es/sortable-hoc/index.d.ts +2 -0
- package/es/sortable-hoc/index.js +2 -0
- package/es/sortable-hoc/style/index.d.ts +1 -0
- package/es/sortable-hoc/style/index.js +0 -0
- package/es/split-pane/index.d.ts +59 -0
- package/es/split-pane/index.js +21 -0
- package/es/split-pane/style/index.css +41 -0
- package/es/split-pane/style/index.d.ts +1 -0
- package/es/split-pane/style/index.js +1 -0
- package/es/split-pane/style/index.less +49 -0
- package/es/text-area/index.d.ts +12 -0
- package/es/text-area/index.js +96 -0
- package/es/text-area/style/index.d.ts +1 -0
- package/es/text-area/style/index.js +1 -0
- package/es/text-input/index.d.ts +5 -0
- package/es/text-input/index.js +85 -0
- package/es/{number-input → text-input}/style/index.css +0 -3
- package/es/text-input/style/index.d.ts +1 -0
- package/es/text-input/style/index.js +1 -0
- package/es/{number-input → text-input}/style/index.less +0 -4
- package/lib/button-drawer/index.d.ts +10 -0
- package/lib/button-drawer/index.js +164 -0
- package/lib/button-drawer/style/index.d.ts +1 -0
- package/lib/button-drawer/style/index.js +7 -0
- package/lib/button-modal/index.d.ts +14 -0
- package/lib/button-modal/index.js +178 -0
- package/lib/button-modal/style/index.d.ts +1 -0
- package/lib/button-modal/style/index.js +7 -0
- package/lib/condition-input/index.d.ts +15 -0
- package/lib/condition-input/index.js +158 -0
- package/lib/condition-input/parse2RegexOption.d.ts +13 -0
- package/lib/condition-input/parse2RegexOption.js +72 -0
- package/lib/condition-input/style/index.d.ts +1 -0
- package/lib/condition-input/style/index.js +7 -0
- package/lib/copy-to-clipboard/index.d.ts +22 -0
- package/lib/copy-to-clipboard/index.js +143 -0
- package/lib/copy-to-clipboard/style/index.css +249 -0
- package/lib/copy-to-clipboard/style/index.d.ts +1 -0
- package/lib/copy-to-clipboard/style/index.js +7 -0
- package/lib/copy-to-clipboard/style/index.less +1 -0
- package/lib/highlight-textarea/HighlighedContents.d.ts +7 -0
- package/lib/highlight-textarea/HighlighedContents.js +29 -0
- package/lib/highlight-textarea/extractSpansOfClasses.d.ts +15 -0
- package/lib/highlight-textarea/extractSpansOfClasses.js +173 -0
- package/lib/highlight-textarea/getRanges.d.ts +2 -0
- package/lib/highlight-textarea/getRanges.js +156 -0
- package/lib/highlight-textarea/getType.d.ts +2 -0
- package/lib/highlight-textarea/getType.js +37 -0
- package/lib/highlight-textarea/index.d.ts +12 -0
- package/lib/highlight-textarea/index.js +183 -0
- package/lib/highlight-textarea/style/index.css +38 -0
- package/lib/highlight-textarea/style/index.d.ts +2 -0
- package/lib/highlight-textarea/style/index.js +9 -0
- package/lib/highlight-textarea/style/index.less +42 -0
- package/lib/highlight-textarea/types.d.ts +16 -0
- package/lib/highlight-textarea/types.js +5 -0
- package/lib/highlight-words/index.d.ts +3 -0
- package/lib/highlight-words/index.js +15 -0
- package/lib/highlight-words/style/index.d.ts +1 -0
- package/lib/highlight-words/style/index.js +0 -0
- package/lib/icon/demo/svg/check-circle-filled.svg +6 -0
- package/lib/icon/demo/svg/coin-circle.svg +9 -0
- package/lib/icon/index.d.ts +27 -0
- package/lib/icon/index.js +143 -0
- package/lib/icon/style/index.d.ts +1 -0
- package/lib/icon/style/index.js +0 -0
- package/lib/icon/utils.d.ts +6 -0
- package/lib/icon/utils.js +32 -0
- package/lib/img-crop/EasyCrop.d.ts +6 -0
- package/lib/img-crop/EasyCrop.js +160 -0
- package/lib/img-crop/getCroppedImg.d.ts +6 -0
- package/lib/img-crop/getCroppedImg.js +205 -0
- package/lib/img-crop/index.d.ts +53 -0
- package/lib/img-crop/index.js +582 -0
- package/lib/img-crop/style/index.css +52 -0
- package/lib/img-crop/style/index.d.ts +3 -0
- package/lib/img-crop/style/index.js +11 -0
- package/lib/img-crop/style/index.less +54 -0
- package/lib/index.d.ts +34 -2
- package/lib/index.js +160 -9
- package/lib/keep-tab/demo/index.modules.less +66 -0
- package/lib/keep-tab/index.d.ts +29 -0
- package/lib/keep-tab/index.js +181 -0
- package/lib/keep-tab/style/index.css +1129 -0
- package/lib/keep-tab/style/index.d.ts +2 -0
- package/lib/keep-tab/style/index.js +9 -0
- package/lib/keep-tab/style/index.less +2 -0
- package/lib/number-input/index.d.ts +22 -7
- package/lib/number-input/index.js +22 -11
- package/lib/number-input/style/index.d.ts +1 -1
- package/lib/number-input/style/index.js +1 -1
- package/lib/number-input/utils.d.ts +10 -11
- package/lib/number-input/utils.js +8 -8
- package/lib/rc-echart/core.d.ts +32 -0
- package/lib/rc-echart/core.js +185 -0
- package/lib/rc-echart/index.d.ts +21 -0
- package/lib/rc-echart/index.js +75 -0
- package/lib/rc-echart/style/index.d.ts +1 -0
- package/lib/rc-echart/style/index.js +0 -0
- package/lib/rc-motion/demo/CSSMotion.less +91 -0
- package/lib/rc-motion/index.d.ts +2 -0
- package/lib/rc-motion/index.js +43 -0
- package/lib/rc-motion/style/index.d.ts +1 -0
- package/lib/rc-motion/style/index.js +0 -0
- package/lib/rc-qrcode/index.d.ts +20 -0
- package/lib/rc-qrcode/index.js +108 -0
- package/lib/rc-qrcode/style/index.d.ts +1 -0
- package/lib/rc-qrcode/style/index.js +0 -0
- package/lib/rc-qrcode/useQrcode.d.ts +4 -0
- package/lib/rc-qrcode/useQrcode.js +66 -0
- package/lib/rc-transition-group/index.d.ts +2 -0
- package/lib/rc-transition-group/index.js +43 -0
- package/lib/rc-transition-group/style/index.d.ts +1 -0
- package/lib/rc-transition-group/style/index.js +0 -0
- package/lib/single-img-upload/index.d.ts +19 -0
- package/lib/single-img-upload/index.js +250 -0
- package/lib/single-img-upload/style/index.css +74 -0
- package/lib/single-img-upload/style/index.d.ts +3 -0
- package/lib/single-img-upload/style/index.js +11 -0
- package/lib/single-img-upload/style/index.less +85 -0
- package/lib/sortable-hoc/demo/VerticalListBase/index.modules.less +63 -0
- package/lib/sortable-hoc/demo/index.modules.less +248 -0
- package/lib/sortable-hoc/index.d.ts +2 -0
- package/lib/sortable-hoc/index.js +43 -0
- package/lib/sortable-hoc/style/index.d.ts +1 -0
- package/lib/sortable-hoc/style/index.js +0 -0
- package/lib/split-pane/index.d.ts +59 -0
- package/lib/split-pane/index.js +69 -0
- package/lib/split-pane/style/index.css +41 -0
- package/lib/split-pane/style/index.d.ts +1 -0
- package/lib/split-pane/style/index.js +7 -0
- package/lib/split-pane/style/index.less +49 -0
- package/lib/text-area/index.d.ts +12 -0
- package/lib/text-area/index.js +144 -0
- package/lib/text-area/style/index.d.ts +1 -0
- package/lib/text-area/style/index.js +7 -0
- package/lib/text-input/index.d.ts +5 -0
- package/lib/text-input/index.js +99 -0
- package/lib/{number-input → text-input}/style/index.css +0 -3
- package/lib/text-input/style/index.d.ts +1 -0
- package/lib/text-input/style/index.js +7 -0
- package/lib/{number-input → text-input}/style/index.less +0 -4
- package/package.json +20 -3
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var __assign = this && this.__assign || function () {
|
|
2
|
+
__assign = Object.assign || function (t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
|
|
6
|
+
for (var p in s) {
|
|
7
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
import * as React from 'react';
|
|
18
|
+
import SplitPane from 'react-split-pane';
|
|
19
|
+
export default (function (props) {
|
|
20
|
+
return /*#__PURE__*/React.createElement(SplitPane, __assign({}, props));
|
|
21
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
.Resizer {
|
|
2
|
+
z-index: 1;
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
background: #000;
|
|
5
|
+
-moz-background-clip: padding;
|
|
6
|
+
-webkit-background-clip: padding;
|
|
7
|
+
background-clip: padding-box;
|
|
8
|
+
opacity: 0.2;
|
|
9
|
+
}
|
|
10
|
+
.Resizer:hover {
|
|
11
|
+
transition: all 2s ease;
|
|
12
|
+
}
|
|
13
|
+
.Resizer.horizontal {
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 11px;
|
|
16
|
+
margin: -5px 0;
|
|
17
|
+
border-top: 5px solid rgba(255, 255, 255, 0);
|
|
18
|
+
border-bottom: 5px solid rgba(255, 255, 255, 0);
|
|
19
|
+
cursor: row-resize;
|
|
20
|
+
}
|
|
21
|
+
.Resizer.horizontal:hover {
|
|
22
|
+
border-top: 5px solid rgba(0, 0, 0, 0.5);
|
|
23
|
+
border-bottom: 5px solid rgba(0, 0, 0, 0.5);
|
|
24
|
+
}
|
|
25
|
+
.Resizer.vertical {
|
|
26
|
+
width: 11px;
|
|
27
|
+
margin: 0 -5px;
|
|
28
|
+
border-right: 5px solid rgba(255, 255, 255, 0);
|
|
29
|
+
border-left: 5px solid rgba(255, 255, 255, 0);
|
|
30
|
+
cursor: col-resize;
|
|
31
|
+
}
|
|
32
|
+
.Resizer.vertical:hover {
|
|
33
|
+
border-right: 5px solid rgba(0, 0, 0, 0.5);
|
|
34
|
+
border-left: 5px solid rgba(0, 0, 0, 0.5);
|
|
35
|
+
}
|
|
36
|
+
.Resizer.disabled {
|
|
37
|
+
cursor: not-allowed;
|
|
38
|
+
}
|
|
39
|
+
.Resizer.disabled:hover {
|
|
40
|
+
border-color: transparent;
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.less';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.less';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
.Resizer {
|
|
2
|
+
z-index: 1;
|
|
3
|
+
-moz-box-sizing: border-box;
|
|
4
|
+
-webkit-box-sizing: border-box;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
background: #000;
|
|
7
|
+
-moz-background-clip: padding;
|
|
8
|
+
-webkit-background-clip: padding;
|
|
9
|
+
background-clip: padding-box;
|
|
10
|
+
opacity: 0.2;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.Resizer:hover {
|
|
14
|
+
-webkit-transition: all 2s ease;
|
|
15
|
+
transition: all 2s ease;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.Resizer.horizontal {
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 11px;
|
|
21
|
+
margin: -5px 0;
|
|
22
|
+
border-top: 5px solid rgba(255, 255, 255, 0);
|
|
23
|
+
border-bottom: 5px solid rgba(255, 255, 255, 0);
|
|
24
|
+
cursor: row-resize;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.Resizer.horizontal:hover {
|
|
28
|
+
border-top: 5px solid rgba(0, 0, 0, 0.5);
|
|
29
|
+
border-bottom: 5px solid rgba(0, 0, 0, 0.5);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.Resizer.vertical {
|
|
33
|
+
width: 11px;
|
|
34
|
+
margin: 0 -5px;
|
|
35
|
+
border-right: 5px solid rgba(255, 255, 255, 0);
|
|
36
|
+
border-left: 5px solid rgba(255, 255, 255, 0);
|
|
37
|
+
cursor: col-resize;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.Resizer.vertical:hover {
|
|
41
|
+
border-right: 5px solid rgba(0, 0, 0, 0.5);
|
|
42
|
+
border-left: 5px solid rgba(0, 0, 0, 0.5);
|
|
43
|
+
}
|
|
44
|
+
.Resizer.disabled {
|
|
45
|
+
cursor: not-allowed;
|
|
46
|
+
}
|
|
47
|
+
.Resizer.disabled:hover {
|
|
48
|
+
border-color: transparent;
|
|
49
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TextAreaProps } from 'antd/lib/input';
|
|
3
|
+
export interface TAreaProps extends Omit<TextAreaProps, 'onChange'> {
|
|
4
|
+
/** 输入框内容 */
|
|
5
|
+
value: any;
|
|
6
|
+
/** 指定输入框展示值的格式 */
|
|
7
|
+
formatter?: (value: string) => string;
|
|
8
|
+
/** 变化回调 */
|
|
9
|
+
onChange?: (value: string, e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const TextArea: ({ value, onChange, formatter, ...restProps }: TAreaProps) => JSX.Element;
|
|
12
|
+
export default TextArea;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
var __assign = this && this.__assign || function () {
|
|
2
|
+
__assign = Object.assign || function (t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
|
|
6
|
+
for (var p in s) {
|
|
7
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
18
|
+
var t = {};
|
|
19
|
+
|
|
20
|
+
for (var p in s) {
|
|
21
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
25
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
26
|
+
}
|
|
27
|
+
return t;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var __read = this && this.__read || function (o, n) {
|
|
31
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
32
|
+
if (!m) return o;
|
|
33
|
+
var i = m.call(o),
|
|
34
|
+
r,
|
|
35
|
+
ar = [],
|
|
36
|
+
e;
|
|
37
|
+
|
|
38
|
+
try {
|
|
39
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
40
|
+
ar.push(r.value);
|
|
41
|
+
}
|
|
42
|
+
} catch (error) {
|
|
43
|
+
e = {
|
|
44
|
+
error: error
|
|
45
|
+
};
|
|
46
|
+
} finally {
|
|
47
|
+
try {
|
|
48
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
49
|
+
} finally {
|
|
50
|
+
if (e) throw e.error;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return ar;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
import * as React from 'react';
|
|
58
|
+
import Input from 'antd/lib/input';
|
|
59
|
+
import trimStart from 'lodash/trimStart';
|
|
60
|
+
|
|
61
|
+
var TextArea = function TextArea(_a) {
|
|
62
|
+
var value = _a.value,
|
|
63
|
+
onChange = _a.onChange,
|
|
64
|
+
formatter = _a.formatter,
|
|
65
|
+
restProps = __rest(_a, ["value", "onChange", "formatter"]);
|
|
66
|
+
|
|
67
|
+
var _b = __read(React.useState(''), 2),
|
|
68
|
+
textValue = _b[0],
|
|
69
|
+
setTextValue = _b[1];
|
|
70
|
+
|
|
71
|
+
var isControl = value !== undefined;
|
|
72
|
+
var resultValue = isControl ? value : textValue;
|
|
73
|
+
|
|
74
|
+
var handleChange = function handleChange(e) {
|
|
75
|
+
var finallyValue = trimStart(e.target.value);
|
|
76
|
+
|
|
77
|
+
if (formatter) {
|
|
78
|
+
finallyValue = formatter(finallyValue);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (!isControl) {
|
|
82
|
+
setTextValue(finallyValue);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (onChange) {
|
|
86
|
+
onChange(finallyValue, e);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
return /*#__PURE__*/React.createElement(Input.TextArea, __assign({
|
|
91
|
+
value: resultValue,
|
|
92
|
+
onChange: handleChange
|
|
93
|
+
}, restProps));
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export default TextArea;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'antd/es/input/style';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'antd/es/input/style';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { InputProps } from 'antd/lib/input';
|
|
2
|
+
import { ConditionInputProps } from '../condition-input';
|
|
3
|
+
export declare type TextInputProps = ConditionInputProps & InputProps;
|
|
4
|
+
declare const TextInput: (props: TextInputProps) => JSX.Element;
|
|
5
|
+
export default TextInput;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
var __assign = this && this.__assign || function () {
|
|
2
|
+
__assign = Object.assign || function (t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
|
|
6
|
+
for (var p in s) {
|
|
7
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
18
|
+
var t = {};
|
|
19
|
+
|
|
20
|
+
for (var p in s) {
|
|
21
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
25
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
26
|
+
}
|
|
27
|
+
return t;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var __read = this && this.__read || function (o, n) {
|
|
31
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
32
|
+
if (!m) return o;
|
|
33
|
+
var i = m.call(o),
|
|
34
|
+
r,
|
|
35
|
+
ar = [],
|
|
36
|
+
e;
|
|
37
|
+
|
|
38
|
+
try {
|
|
39
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
40
|
+
ar.push(r.value);
|
|
41
|
+
}
|
|
42
|
+
} catch (error) {
|
|
43
|
+
e = {
|
|
44
|
+
error: error
|
|
45
|
+
};
|
|
46
|
+
} finally {
|
|
47
|
+
try {
|
|
48
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
49
|
+
} finally {
|
|
50
|
+
if (e) throw e.error;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return ar;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
var __spread = this && this.__spread || function () {
|
|
58
|
+
for (var ar = [], i = 0; i < arguments.length; i++) {
|
|
59
|
+
ar = ar.concat(__read(arguments[i]));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return ar;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
import React from 'react';
|
|
66
|
+
import isArray from 'lodash/isArray';
|
|
67
|
+
import ConditionInput from '../condition-input';
|
|
68
|
+
|
|
69
|
+
var TextInput = function TextInput(props) {
|
|
70
|
+
var regexp = props.regexp,
|
|
71
|
+
restProps = __rest(props, ["regexp"]);
|
|
72
|
+
|
|
73
|
+
var trimStartReg = /(^\s+)/g;
|
|
74
|
+
var resultRegexp = trimStartReg;
|
|
75
|
+
|
|
76
|
+
if (regexp) {
|
|
77
|
+
resultRegexp = isArray(regexp) ? __spread([trimStartReg], regexp) : [trimStartReg, regexp];
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return /*#__PURE__*/React.createElement(ConditionInput, __assign({}, restProps, {
|
|
81
|
+
regexp: resultRegexp
|
|
82
|
+
}));
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export default TextInput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.less';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.less';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DrawerProps } from 'antd/lib/drawer';
|
|
3
|
+
export interface ButtonDrawerProps extends DrawerProps {
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onOpen: () => void;
|
|
6
|
+
content: React.ReactElement;
|
|
7
|
+
children: React.ReactElement;
|
|
8
|
+
}
|
|
9
|
+
declare const ForwardRefButtonDrawer: React.ForwardRefExoticComponent<ButtonDrawerProps & React.RefAttributes<unknown>>;
|
|
10
|
+
export default ForwardRefButtonDrawer;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __assign = this && this.__assign || function () {
|
|
4
|
+
__assign = Object.assign || function (t) {
|
|
5
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
+
s = arguments[i];
|
|
7
|
+
|
|
8
|
+
for (var p in s) {
|
|
9
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
return __assign.apply(this, arguments);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
20
|
+
if (k2 === undefined) k2 = k;
|
|
21
|
+
Object.defineProperty(o, k2, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function get() {
|
|
24
|
+
return m[k];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
} : function (o, m, k, k2) {
|
|
28
|
+
if (k2 === undefined) k2 = k;
|
|
29
|
+
o[k2] = m[k];
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {
|
|
33
|
+
Object.defineProperty(o, "default", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
value: v
|
|
36
|
+
});
|
|
37
|
+
} : function (o, v) {
|
|
38
|
+
o["default"] = v;
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
var __importStar = this && this.__importStar || function (mod) {
|
|
42
|
+
if (mod && mod.__esModule) return mod;
|
|
43
|
+
var result = {};
|
|
44
|
+
if (mod != null) for (var k in mod) {
|
|
45
|
+
if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
__setModuleDefault(result, mod);
|
|
49
|
+
|
|
50
|
+
return result;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
54
|
+
var t = {};
|
|
55
|
+
|
|
56
|
+
for (var p in s) {
|
|
57
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
61
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
62
|
+
}
|
|
63
|
+
return t;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
var __read = this && this.__read || function (o, n) {
|
|
67
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
68
|
+
if (!m) return o;
|
|
69
|
+
var i = m.call(o),
|
|
70
|
+
r,
|
|
71
|
+
ar = [],
|
|
72
|
+
e;
|
|
73
|
+
|
|
74
|
+
try {
|
|
75
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
76
|
+
ar.push(r.value);
|
|
77
|
+
}
|
|
78
|
+
} catch (error) {
|
|
79
|
+
e = {
|
|
80
|
+
error: error
|
|
81
|
+
};
|
|
82
|
+
} finally {
|
|
83
|
+
try {
|
|
84
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
85
|
+
} finally {
|
|
86
|
+
if (e) throw e.error;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return ar;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
var __importDefault = this && this.__importDefault || function (mod) {
|
|
94
|
+
return mod && mod.__esModule ? mod : {
|
|
95
|
+
"default": mod
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
Object.defineProperty(exports, "__esModule", {
|
|
100
|
+
value: true
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
var react_1 = __importStar(require("react"));
|
|
104
|
+
|
|
105
|
+
var drawer_1 = __importDefault(require("antd/lib/drawer"));
|
|
106
|
+
|
|
107
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
108
|
+
|
|
109
|
+
var ButtonDrawer = function ButtonDrawer(props, ref) {
|
|
110
|
+
var _a = __read(react_1.useState(false), 2),
|
|
111
|
+
drawerVisible = _a[0],
|
|
112
|
+
setDrawerVisible = _a[1];
|
|
113
|
+
|
|
114
|
+
var children = props.children,
|
|
115
|
+
onOpen = props.onOpen,
|
|
116
|
+
onClose = props.onClose,
|
|
117
|
+
content = props.content,
|
|
118
|
+
title = props.title,
|
|
119
|
+
className = props.className,
|
|
120
|
+
restProps = __rest(props, ["children", "onOpen", "onClose", "content", "title", "className"]);
|
|
121
|
+
|
|
122
|
+
var closeDrawer = function closeDrawer() {
|
|
123
|
+
if (onClose) {
|
|
124
|
+
onClose();
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
setDrawerVisible(false);
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
var openDrawer = function openDrawer() {
|
|
131
|
+
if (onOpen) {
|
|
132
|
+
onOpen();
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
setDrawerVisible(true);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
var actionRef = react_1.useRef({
|
|
139
|
+
close: function close() {
|
|
140
|
+
closeDrawer();
|
|
141
|
+
},
|
|
142
|
+
open: function open() {
|
|
143
|
+
openDrawer();
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
react_1.useImperativeHandle(ref, function () {
|
|
147
|
+
return actionRef.current;
|
|
148
|
+
}, [actionRef.current]);
|
|
149
|
+
var buttonNode = children && react_1["default"].cloneElement(children, {
|
|
150
|
+
onClick: openDrawer
|
|
151
|
+
});
|
|
152
|
+
return react_1["default"].createElement(react_1["default"].Fragment, null, buttonNode, react_1["default"].createElement(drawer_1["default"], __assign({
|
|
153
|
+
maskClosable: false,
|
|
154
|
+
className: classnames_1["default"]('button-drawer', className),
|
|
155
|
+
title: title,
|
|
156
|
+
onClose: closeDrawer,
|
|
157
|
+
visible: drawerVisible
|
|
158
|
+
}, restProps), react_1["default"].cloneElement(content, {
|
|
159
|
+
drawerAction: actionRef.current
|
|
160
|
+
})));
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
var ForwardRefButtonDrawer = react_1["default"].forwardRef(ButtonDrawer);
|
|
164
|
+
exports["default"] = ForwardRefButtonDrawer; // export default React.memo(ButtonDrawer);
|