assui 2.3.9 → 3.0.0-alpha.0
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/a-select/index.js +7 -22
- package/es/a-select/style/index.css +195 -743
- package/es/area-text/index.js +1 -3
- package/es/button-drawer/index.js +12 -30
- package/es/button-modal/index.js +12 -33
- package/es/color-select/index.js +10 -23
- package/es/color-select/style/index.css +195 -743
- package/es/condition-input/index.js +8 -26
- package/es/condition-input/parse2RegexOption.js +0 -11
- package/es/config-provider/index.js +1 -3
- package/es/copy-to-clipboard/index.js +11 -27
- package/es/copy-to-clipboard/style/index.css +0 -1
- package/es/highlight-textarea/HighlighedContents.js +1 -3
- package/es/highlight-textarea/extractSpansOfClasses.d.ts +1 -0
- package/es/highlight-textarea/extractSpansOfClasses.js +7 -29
- package/es/highlight-textarea/getRanges.js +3 -35
- package/es/highlight-textarea/getType.js +0 -6
- package/es/highlight-textarea/index.js +11 -30
- package/es/highlight-textarea/style/index.css +7 -21
- package/es/img-crop/EasyCrop.js +18 -34
- package/es/img-crop/getCroppedImg.js +15 -50
- package/es/img-crop/index.js +56 -145
- package/es/img-crop/style/index.css +195 -743
- package/es/json-editor/index.js +6 -20
- package/es/keep-tab/index.d.ts +7 -2
- package/es/keep-tab/index.js +34 -59
- package/es/keep-tab/style/index.css +39 -99
- package/es/label-auto-complete/index.js +14 -32
- package/es/label-auto-complete/style/index.css +195 -743
- package/es/label-condition-input/index.js +13 -29
- package/es/label-customize-range-picker/defaultRadioList.js +0 -3
- package/es/label-customize-range-picker/index.js +36 -78
- package/es/label-customize-range-picker/style/index.css +195 -743
- package/es/label-customize-range-picker/utils/index.js +5 -14
- package/es/label-date-picker/index.js +11 -28
- package/es/label-date-picker/style/index.css +195 -743
- package/es/label-input/index.js +23 -37
- package/es/label-number-input/index.js +13 -28
- package/es/label-range-picker/index.js +11 -28
- package/es/label-range-picker/style/index.css +195 -743
- package/es/label-select/index.js +11 -27
- package/es/label-select/style/index.css +195 -743
- package/es/label-text-area/index.js +13 -35
- package/es/label-tree-select/index.js +15 -32
- package/es/label-tree-select/style/index.css +195 -743
- package/es/number-format-input/index.js +1 -11
- package/es/number-input/index.js +18 -37
- package/es/number-input/utils.js +7 -15
- package/es/rc-echart/core.js +15 -27
- package/es/rc-echart/index.js +0 -6
- package/es/rc-qrcode/index.js +2 -12
- package/es/rc-qrcode/useQrcode.js +5 -12
- package/es/rich-text-editor/index.js +5 -16
- package/es/rich-text-editor/plugins/code/index.js +0 -8
- package/es/rich-text-editor/style/index.css +195 -743
- package/es/single-img-upload/index.js +36 -110
- package/es/single-img-upload/style/index.css +195 -743
- package/es/split-pane/index.js +0 -4
- package/es/step-number-input/index.js +14 -39
- package/es/step-number-input/style/index.css +195 -743
- package/es/table-col/index.js +2 -4
- package/es/text-area/index.js +8 -27
- package/es/text-input/index.js +4 -18
- package/es/text-input/style/index.css +7 -21
- package/lib/a-select/index.js +7 -27
- package/lib/a-select/style/index.css +195 -743
- package/lib/a-select/style/index.js +0 -2
- package/lib/area-text/index.js +1 -6
- package/lib/area-text/style/index.js +0 -1
- package/lib/beautiful-dnd/index.js +0 -9
- package/lib/button-drawer/index.js +12 -42
- package/lib/button-drawer/style/index.js +0 -1
- package/lib/button-modal/index.js +12 -44
- package/lib/button-modal/style/index.js +0 -1
- package/lib/color-select/index.js +10 -39
- package/lib/color-select/style/index.css +195 -743
- package/lib/color-select/style/index.js +0 -2
- package/lib/condition-input/index.js +8 -41
- package/lib/condition-input/parse2RegexOption.js +0 -16
- package/lib/condition-input/style/index.js +0 -1
- package/lib/config-provider/context.js +0 -4
- package/lib/config-provider/index.js +1 -28
- package/lib/copy-to-clipboard/index.js +11 -38
- package/lib/copy-to-clipboard/style/index.css +0 -1
- package/lib/copy-to-clipboard/style/index.js +0 -1
- package/lib/highlight-textarea/HighlighedContents.js +1 -7
- package/lib/highlight-textarea/extractSpansOfClasses.d.ts +1 -0
- package/lib/highlight-textarea/extractSpansOfClasses.js +7 -31
- package/lib/highlight-textarea/getRanges.js +3 -38
- package/lib/highlight-textarea/getType.js +0 -8
- package/lib/highlight-textarea/index.js +11 -44
- package/lib/highlight-textarea/style/index.css +7 -21
- package/lib/highlight-textarea/style/index.js +0 -1
- package/lib/highlight-words/index.js +0 -3
- package/lib/img-crop/EasyCrop.js +18 -44
- package/lib/img-crop/getCroppedImg.js +15 -51
- package/lib/img-crop/index.js +56 -159
- package/lib/img-crop/style/index.css +195 -743
- package/lib/img-crop/style/index.js +0 -3
- package/lib/index.js +0 -77
- package/lib/json-editor/index.js +6 -35
- package/lib/json-editor/style/index.js +0 -2
- package/lib/keep-tab/index.d.ts +7 -2
- package/lib/keep-tab/index.js +34 -76
- package/lib/keep-tab/style/index.css +39 -99
- package/lib/keep-tab/style/index.js +0 -2
- package/lib/label-auto-complete/index.js +14 -39
- package/lib/label-auto-complete/style/index.css +195 -743
- package/lib/label-auto-complete/style/index.js +0 -2
- package/lib/label-condition-input/index.js +13 -36
- package/lib/label-condition-input/style/index.js +0 -1
- package/lib/label-customize-range-picker/defaultRadioList.js +0 -7
- package/lib/label-customize-range-picker/index.js +36 -99
- package/lib/label-customize-range-picker/style/index.css +195 -743
- package/lib/label-customize-range-picker/style/index.js +0 -5
- package/lib/label-customize-range-picker/utils/index.js +5 -19
- package/lib/label-date-picker/index.js +11 -34
- package/lib/label-date-picker/style/index.css +195 -743
- package/lib/label-date-picker/style/index.js +0 -2
- package/lib/label-input/index.js +23 -46
- package/lib/label-input/style/index.js +0 -1
- package/lib/label-number-input/index.js +13 -36
- package/lib/label-number-input/style/index.js +0 -1
- package/lib/label-range-picker/index.js +11 -36
- package/lib/label-range-picker/style/index.css +195 -743
- package/lib/label-range-picker/style/index.js +0 -2
- package/lib/label-select/index.js +11 -36
- package/lib/label-select/style/index.css +195 -743
- package/lib/label-select/style/index.js +0 -2
- package/lib/label-text-area/index.js +13 -40
- package/lib/label-text-area/style/index.js +0 -1
- package/lib/label-tree-select/index.js +15 -38
- package/lib/label-tree-select/style/index.css +195 -743
- package/lib/label-tree-select/style/index.js +0 -2
- package/lib/messages/index.js +0 -2
- package/lib/number-format-input/index.js +1 -15
- package/lib/number-format-input/style/index.js +0 -1
- package/lib/number-input/index.js +18 -55
- package/lib/number-input/style/index.js +0 -1
- package/lib/number-input/utils.js +8 -20
- package/lib/rc-echart/core.js +15 -40
- package/lib/rc-echart/index.js +0 -17
- package/lib/rc-motion/index.js +0 -3
- package/lib/rc-qrcode/index.js +2 -25
- package/lib/rc-qrcode/useQrcode.js +5 -17
- package/lib/rc-transition-group/index.js +0 -9
- package/lib/resizable/index.js +0 -2
- package/lib/resizable/style/index.js +0 -1
- package/lib/rich-text-editor/index.js +5 -53
- package/lib/rich-text-editor/plugins/code/index.js +2 -12
- package/lib/rich-text-editor/style/index.css +195 -743
- package/lib/rich-text-editor/style/index.js +0 -1
- package/lib/single-img-upload/index.js +36 -125
- package/lib/single-img-upload/style/index.css +195 -743
- package/lib/single-img-upload/style/index.js +0 -3
- package/lib/sortable-hoc/index.js +0 -9
- package/lib/split-pane/index.js +0 -15
- package/lib/split-pane/style/index.js +0 -1
- package/lib/step-number-input/index.js +14 -55
- package/lib/step-number-input/style/index.css +195 -743
- package/lib/step-number-input/style/index.js +0 -2
- package/lib/table-col/index.js +2 -6
- package/lib/text-area/index.js +8 -38
- package/lib/text-area/style/index.js +0 -1
- package/lib/text-input/index.js +4 -23
- package/lib/text-input/style/index.css +7 -21
- package/lib/text-input/style/index.js +0 -1
- package/package.json +6 -6
|
@@ -6,7 +6,6 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, gene
|
|
|
6
6
|
resolve(value);
|
|
7
7
|
});
|
|
8
8
|
}
|
|
9
|
-
|
|
10
9
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11
10
|
function fulfilled(value) {
|
|
12
11
|
try {
|
|
@@ -15,7 +14,6 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, gene
|
|
|
15
14
|
reject(e);
|
|
16
15
|
}
|
|
17
16
|
}
|
|
18
|
-
|
|
19
17
|
function rejected(value) {
|
|
20
18
|
try {
|
|
21
19
|
step(generator["throw"](value));
|
|
@@ -23,29 +21,26 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, gene
|
|
|
23
21
|
reject(e);
|
|
24
22
|
}
|
|
25
23
|
}
|
|
26
|
-
|
|
27
24
|
function step(result) {
|
|
28
25
|
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
29
26
|
}
|
|
30
|
-
|
|
31
27
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
28
|
});
|
|
33
29
|
};
|
|
34
|
-
|
|
35
30
|
var __generator = this && this.__generator || function (thisArg, body) {
|
|
36
31
|
var _ = {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
label: 0,
|
|
33
|
+
sent: function sent() {
|
|
34
|
+
if (t[0] & 1) throw t[1];
|
|
35
|
+
return t[1];
|
|
36
|
+
},
|
|
37
|
+
trys: [],
|
|
38
|
+
ops: []
|
|
41
39
|
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
y,
|
|
47
|
-
t,
|
|
48
|
-
g;
|
|
40
|
+
f,
|
|
41
|
+
y,
|
|
42
|
+
t,
|
|
43
|
+
g;
|
|
49
44
|
return g = {
|
|
50
45
|
next: verb(0),
|
|
51
46
|
"throw": verb(1),
|
|
@@ -53,79 +48,60 @@ var __generator = this && this.__generator || function (thisArg, body) {
|
|
|
53
48
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
54
49
|
return this;
|
|
55
50
|
}), g;
|
|
56
|
-
|
|
57
51
|
function verb(n) {
|
|
58
52
|
return function (v) {
|
|
59
53
|
return step([n, v]);
|
|
60
54
|
};
|
|
61
55
|
}
|
|
62
|
-
|
|
63
56
|
function step(op) {
|
|
64
57
|
if (f) throw new TypeError("Generator is already executing.");
|
|
65
|
-
|
|
66
58
|
while (_) {
|
|
67
59
|
try {
|
|
68
60
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
69
61
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
70
|
-
|
|
71
62
|
switch (op[0]) {
|
|
72
63
|
case 0:
|
|
73
64
|
case 1:
|
|
74
65
|
t = op;
|
|
75
66
|
break;
|
|
76
|
-
|
|
77
67
|
case 4:
|
|
78
68
|
_.label++;
|
|
79
69
|
return {
|
|
80
70
|
value: op[1],
|
|
81
71
|
done: false
|
|
82
72
|
};
|
|
83
|
-
|
|
84
73
|
case 5:
|
|
85
74
|
_.label++;
|
|
86
75
|
y = op[1];
|
|
87
76
|
op = [0];
|
|
88
77
|
continue;
|
|
89
|
-
|
|
90
78
|
case 7:
|
|
91
79
|
op = _.ops.pop();
|
|
92
|
-
|
|
93
80
|
_.trys.pop();
|
|
94
|
-
|
|
95
81
|
continue;
|
|
96
|
-
|
|
97
82
|
default:
|
|
98
83
|
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
99
84
|
_ = 0;
|
|
100
85
|
continue;
|
|
101
86
|
}
|
|
102
|
-
|
|
103
87
|
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
104
88
|
_.label = op[1];
|
|
105
89
|
break;
|
|
106
90
|
}
|
|
107
|
-
|
|
108
91
|
if (op[0] === 6 && _.label < t[1]) {
|
|
109
92
|
_.label = t[1];
|
|
110
93
|
t = op;
|
|
111
94
|
break;
|
|
112
95
|
}
|
|
113
|
-
|
|
114
96
|
if (t && _.label < t[2]) {
|
|
115
97
|
_.label = t[2];
|
|
116
|
-
|
|
117
98
|
_.ops.push(op);
|
|
118
|
-
|
|
119
99
|
break;
|
|
120
100
|
}
|
|
121
|
-
|
|
122
101
|
if (t[2]) _.ops.pop();
|
|
123
|
-
|
|
124
102
|
_.trys.pop();
|
|
125
|
-
|
|
126
103
|
continue;
|
|
127
104
|
}
|
|
128
|
-
|
|
129
105
|
op = body.call(thisArg, _);
|
|
130
106
|
} catch (e) {
|
|
131
107
|
op = [6, e];
|
|
@@ -134,7 +110,6 @@ var __generator = this && this.__generator || function (thisArg, body) {
|
|
|
134
110
|
f = t = 0;
|
|
135
111
|
}
|
|
136
112
|
}
|
|
137
|
-
|
|
138
113
|
if (op[0] & 5) throw op[1];
|
|
139
114
|
return {
|
|
140
115
|
value: op[0] ? op[1] : void 0,
|
|
@@ -142,11 +117,9 @@ var __generator = this && this.__generator || function (thisArg, body) {
|
|
|
142
117
|
};
|
|
143
118
|
}
|
|
144
119
|
};
|
|
145
|
-
|
|
146
120
|
Object.defineProperty(exports, "__esModule", {
|
|
147
121
|
value: true
|
|
148
122
|
});
|
|
149
|
-
|
|
150
123
|
var createImage = function createImage(url) {
|
|
151
124
|
return new Promise(function (resolve, reject) {
|
|
152
125
|
var image = new Image();
|
|
@@ -157,23 +130,17 @@ var createImage = function createImage(url) {
|
|
|
157
130
|
return reject(error);
|
|
158
131
|
});
|
|
159
132
|
image.setAttribute('crossOrigin', 'anonymous'); // needed to avoid cross-origin issues on CodeSandbox
|
|
160
|
-
|
|
161
133
|
image.src = url;
|
|
162
134
|
});
|
|
163
135
|
};
|
|
164
|
-
|
|
165
136
|
function getCroppedImg(imageSrc, pixelCrop, name, type) {
|
|
166
137
|
return __awaiter(this, void 0, void 0, function () {
|
|
167
138
|
var _a, width, _b, height, image, bodyEl, canvas, ctx;
|
|
168
|
-
|
|
169
139
|
return __generator(this, function (_c) {
|
|
170
140
|
switch (_c.label) {
|
|
171
141
|
case 0:
|
|
172
142
|
_a = pixelCrop.width, width = _a === void 0 ? 670 : _a, _b = pixelCrop.height, height = _b === void 0 ? 280 : _b;
|
|
173
|
-
return [4
|
|
174
|
-
/*yield*/
|
|
175
|
-
, createImage(imageSrc)];
|
|
176
|
-
|
|
143
|
+
return [4 /*yield*/, createImage(imageSrc)];
|
|
177
144
|
case 1:
|
|
178
145
|
image = _c.sent();
|
|
179
146
|
bodyEl = document.querySelector('body');
|
|
@@ -183,11 +150,9 @@ function getCroppedImg(imageSrc, pixelCrop, name, type) {
|
|
|
183
150
|
canvas.width = width;
|
|
184
151
|
canvas.height = height;
|
|
185
152
|
ctx === null || ctx === void 0 ? void 0 : ctx.drawImage(image, 0, 0, width, height);
|
|
186
|
-
bodyEl.removeChild(image);
|
|
187
|
-
|
|
188
|
-
return [2
|
|
189
|
-
/*return*/
|
|
190
|
-
, new Promise(function (resolve) {
|
|
153
|
+
bodyEl.removeChild(image);
|
|
154
|
+
// As a blob
|
|
155
|
+
return [2 /*return*/, new Promise(function (resolve) {
|
|
191
156
|
canvas.toBlob(function (file) {
|
|
192
157
|
resolve({
|
|
193
158
|
url: URL.createObjectURL(file),
|
|
@@ -201,5 +166,4 @@ function getCroppedImg(imageSrc, pixelCrop, name, type) {
|
|
|
201
166
|
});
|
|
202
167
|
});
|
|
203
168
|
}
|
|
204
|
-
|
|
205
169
|
exports["default"] = getCroppedImg;
|