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,75 @@
|
|
|
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 __importDefault = this && this.__importDefault || function (mod) {
|
|
54
|
+
return mod && mod.__esModule ? mod : {
|
|
55
|
+
"default": mod
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
Object.defineProperty(exports, "__esModule", {
|
|
60
|
+
value: true
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
var react_1 = __importDefault(require("react"));
|
|
64
|
+
|
|
65
|
+
var echarts = __importStar(require("echarts"));
|
|
66
|
+
|
|
67
|
+
var core_1 = __importDefault(require("./core"));
|
|
68
|
+
|
|
69
|
+
var RcEcharts = function RcEcharts(props) {
|
|
70
|
+
return react_1["default"].createElement(core_1["default"], __assign({
|
|
71
|
+
echarts: echarts
|
|
72
|
+
}, props));
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
exports["default"] = RcEcharts;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
File without changes
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
.grid {
|
|
2
|
+
display: table;
|
|
3
|
+
|
|
4
|
+
> div {
|
|
5
|
+
display: table-cell;
|
|
6
|
+
min-width: 350px;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.demo-block {
|
|
11
|
+
display: block;
|
|
12
|
+
height: 300px;
|
|
13
|
+
width: 300px;
|
|
14
|
+
background: red;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.transition {
|
|
19
|
+
transition: height 1.3s, opacity 1.3s;
|
|
20
|
+
// transition: all 5s!important;
|
|
21
|
+
|
|
22
|
+
&.transition-appear,
|
|
23
|
+
&.transition-enter {
|
|
24
|
+
opacity: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.transition-appear.transition-appear-active,
|
|
28
|
+
&.transition-enter.transition-enter-active {
|
|
29
|
+
opacity: 1;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&.transition-leave-active {
|
|
33
|
+
opacity: 0;
|
|
34
|
+
background: green;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.animation {
|
|
39
|
+
animation-duration: 1.3s;
|
|
40
|
+
animation-fill-mode: both;
|
|
41
|
+
|
|
42
|
+
&.animation-appear,
|
|
43
|
+
&.animation-enter {
|
|
44
|
+
animation-name: enter;
|
|
45
|
+
animation-fill-mode: both;
|
|
46
|
+
animation-play-state: paused;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.animation-appear.animation-appear-active,
|
|
50
|
+
&.animation-enter.animation-enter-active {
|
|
51
|
+
animation-name: enter;
|
|
52
|
+
animation-play-state: running;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&.animation-leave {
|
|
56
|
+
animation-name: leave;
|
|
57
|
+
animation-fill-mode: both;
|
|
58
|
+
animation-play-state: paused;
|
|
59
|
+
|
|
60
|
+
&.animation-leave-active {
|
|
61
|
+
animation-name: leave;
|
|
62
|
+
animation-play-state: running;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.hidden {
|
|
68
|
+
display: none !important;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@keyframes enter {
|
|
72
|
+
from {
|
|
73
|
+
transform: scale(0);
|
|
74
|
+
opacity: 0;
|
|
75
|
+
}
|
|
76
|
+
to {
|
|
77
|
+
transform: scale(1);
|
|
78
|
+
opacity: 1;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@keyframes leave {
|
|
83
|
+
from {
|
|
84
|
+
transform: scale(1);
|
|
85
|
+
opacity: 1;
|
|
86
|
+
}
|
|
87
|
+
to {
|
|
88
|
+
transform: scale(0);
|
|
89
|
+
opacity: 0;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
Object.defineProperty(o, k2, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function get() {
|
|
8
|
+
return m[k];
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
} : function (o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
value: v
|
|
20
|
+
});
|
|
21
|
+
} : function (o, v) {
|
|
22
|
+
o["default"] = v;
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
var __importStar = this && this.__importStar || function (mod) {
|
|
26
|
+
if (mod && mod.__esModule) return mod;
|
|
27
|
+
var result = {};
|
|
28
|
+
if (mod != null) for (var k in mod) {
|
|
29
|
+
if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
Object.defineProperty(exports, "__esModule", {
|
|
38
|
+
value: true
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
var RcMotion = __importStar(require("rc-motion"));
|
|
42
|
+
|
|
43
|
+
exports["default"] = RcMotion;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
File without changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import QRCode, { QRCodeRenderersOptions, QRCodeSegment } from 'qrcode';
|
|
2
|
+
import useQrcode from './useQrcode';
|
|
3
|
+
export interface RcQRcodeProps {
|
|
4
|
+
/** 生成二维码的值 */
|
|
5
|
+
value: QRCodeSegment[];
|
|
6
|
+
/** qrcode的QRCodeRenderersOptions */
|
|
7
|
+
options: QRCodeRenderersOptions;
|
|
8
|
+
/** 获取HTMLCanvasElement */
|
|
9
|
+
getCanvasInstance: (result: HTMLCanvasElement) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const RcQRcode: {
|
|
12
|
+
(props: RcQRcodeProps): JSX.Element;
|
|
13
|
+
defaultProps: {
|
|
14
|
+
value: string;
|
|
15
|
+
options: {};
|
|
16
|
+
};
|
|
17
|
+
useQrcode: (value: string | QRCode.QRCodeSegment[], options: QRCode.QRCodeToDataURLOptions) => string;
|
|
18
|
+
};
|
|
19
|
+
export default RcQRcode;
|
|
20
|
+
export { useQrcode };
|
|
@@ -0,0 +1,108 @@
|
|
|
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 __importDefault = this && this.__importDefault || function (mod) {
|
|
54
|
+
return mod && mod.__esModule ? mod : {
|
|
55
|
+
"default": mod
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
Object.defineProperty(exports, "__esModule", {
|
|
60
|
+
value: true
|
|
61
|
+
});
|
|
62
|
+
exports.useQrcode = void 0;
|
|
63
|
+
|
|
64
|
+
var React = __importStar(require("react"));
|
|
65
|
+
|
|
66
|
+
var qrcode_1 = __importDefault(require("qrcode"));
|
|
67
|
+
|
|
68
|
+
var useMount_1 = __importDefault(require("ahooks/lib/useMount"));
|
|
69
|
+
|
|
70
|
+
var useQrcode_1 = __importDefault(require("./useQrcode"));
|
|
71
|
+
|
|
72
|
+
exports.useQrcode = useQrcode_1["default"];
|
|
73
|
+
|
|
74
|
+
var RcQRcode = function RcQRcode(props) {
|
|
75
|
+
var value = props.value,
|
|
76
|
+
options = props.options;
|
|
77
|
+
var domElRef = React.useRef(null);
|
|
78
|
+
var defaultOptions = {
|
|
79
|
+
errorCorrectionLevel: 'H',
|
|
80
|
+
margin: 0,
|
|
81
|
+
width: 134
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
var finallyOptions = __assign(__assign({}, defaultOptions), options);
|
|
85
|
+
|
|
86
|
+
useMount_1["default"](function () {
|
|
87
|
+
qrcode_1["default"].toCanvas(value, finallyOptions, function (err, result) {
|
|
88
|
+
var _a;
|
|
89
|
+
|
|
90
|
+
if (err) {
|
|
91
|
+
throw err;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
props === null || props === void 0 ? void 0 : props.getCanvasInstance(result);
|
|
95
|
+
(_a = domElRef.current) === null || _a === void 0 ? void 0 : _a.appendChild(result);
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
return React.createElement("div", {
|
|
99
|
+
ref: domElRef
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
RcQRcode.defaultProps = {
|
|
104
|
+
value: '',
|
|
105
|
+
options: {}
|
|
106
|
+
};
|
|
107
|
+
RcQRcode.useQrcode = useQrcode_1["default"];
|
|
108
|
+
exports["default"] = RcQRcode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
File without changes
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __read = this && this.__read || function (o, n) {
|
|
4
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
5
|
+
if (!m) return o;
|
|
6
|
+
var i = m.call(o),
|
|
7
|
+
r,
|
|
8
|
+
ar = [],
|
|
9
|
+
e;
|
|
10
|
+
|
|
11
|
+
try {
|
|
12
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
13
|
+
ar.push(r.value);
|
|
14
|
+
}
|
|
15
|
+
} catch (error) {
|
|
16
|
+
e = {
|
|
17
|
+
error: error
|
|
18
|
+
};
|
|
19
|
+
} finally {
|
|
20
|
+
try {
|
|
21
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
22
|
+
} finally {
|
|
23
|
+
if (e) throw e.error;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return ar;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var __importDefault = this && this.__importDefault || function (mod) {
|
|
31
|
+
return mod && mod.__esModule ? mod : {
|
|
32
|
+
"default": mod
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
Object.defineProperty(exports, "__esModule", {
|
|
37
|
+
value: true
|
|
38
|
+
});
|
|
39
|
+
exports.useQRCode = void 0;
|
|
40
|
+
|
|
41
|
+
var qrcode_1 = __importDefault(require("qrcode"));
|
|
42
|
+
|
|
43
|
+
var react_1 = require("react");
|
|
44
|
+
|
|
45
|
+
exports.useQRCode = function (value, options) {
|
|
46
|
+
var _a = __read(react_1.useState(''), 2),
|
|
47
|
+
dataURL = _a[0],
|
|
48
|
+
setDataURL = _a[1];
|
|
49
|
+
|
|
50
|
+
react_1.useEffect(function () {
|
|
51
|
+
if (!value) {
|
|
52
|
+
return setDataURL('');
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
qrcode_1["default"].toDataURL(value, options, function (err, url) {
|
|
56
|
+
if (err) {
|
|
57
|
+
throw err;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
setDataURL(url);
|
|
61
|
+
});
|
|
62
|
+
}, [value, options]);
|
|
63
|
+
return dataURL;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
exports["default"] = exports.useQRCode;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
Object.defineProperty(o, k2, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function get() {
|
|
8
|
+
return m[k];
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
} : function (o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
value: v
|
|
20
|
+
});
|
|
21
|
+
} : function (o, v) {
|
|
22
|
+
o["default"] = v;
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
var __importStar = this && this.__importStar || function (mod) {
|
|
26
|
+
if (mod && mod.__esModule) return mod;
|
|
27
|
+
var result = {};
|
|
28
|
+
if (mod != null) for (var k in mod) {
|
|
29
|
+
if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
Object.defineProperty(exports, "__esModule", {
|
|
38
|
+
value: true
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
var RcTransitionGroup = __importStar(require("react-transition-group"));
|
|
42
|
+
|
|
43
|
+
exports["default"] = RcTransitionGroup;
|