assui 2.3.9 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 -4
- 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 -4
- 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
|
@@ -4,10 +4,9 @@ var __read = this && this.__read || function (o, n) {
|
|
|
4
4
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
5
5
|
if (!m) return o;
|
|
6
6
|
var i = m.call(o),
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
r,
|
|
8
|
+
ar = [],
|
|
9
|
+
e;
|
|
11
10
|
try {
|
|
12
11
|
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
13
12
|
ar.push(r.value);
|
|
@@ -23,10 +22,8 @@ var __read = this && this.__read || function (o, n) {
|
|
|
23
22
|
if (e) throw e.error;
|
|
24
23
|
}
|
|
25
24
|
}
|
|
26
|
-
|
|
27
25
|
return ar;
|
|
28
26
|
};
|
|
29
|
-
|
|
30
27
|
var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
31
28
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
32
29
|
if (ar || !(i in from)) {
|
|
@@ -36,60 +33,43 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
|
36
33
|
}
|
|
37
34
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
38
35
|
};
|
|
39
|
-
|
|
40
36
|
var __importDefault = this && this.__importDefault || function (mod) {
|
|
41
37
|
return mod && mod.__esModule ? mod : {
|
|
42
38
|
"default": mod
|
|
43
39
|
};
|
|
44
40
|
};
|
|
45
|
-
|
|
46
41
|
Object.defineProperty(exports, "__esModule", {
|
|
47
42
|
value: true
|
|
48
43
|
});
|
|
49
44
|
/* eslint-disable no-param-reassign */
|
|
50
|
-
|
|
51
45
|
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
52
|
-
|
|
53
46
|
/* eslint-disable no-cond-assign */
|
|
54
|
-
|
|
55
47
|
var getType_1 = __importDefault(require("./getType"));
|
|
56
|
-
|
|
57
48
|
function getRanges(input, highlight) {
|
|
58
49
|
var type = (0, getType_1["default"])(highlight);
|
|
59
|
-
|
|
60
50
|
switch (type) {
|
|
61
51
|
case 'array':
|
|
62
52
|
return getArrayRanges(input, highlight);
|
|
63
|
-
|
|
64
53
|
case 'function':
|
|
65
54
|
return getFunctionRanges(input, highlight);
|
|
66
|
-
|
|
67
55
|
case 'regexp':
|
|
68
56
|
return getRegExpRanges(input, highlight);
|
|
69
|
-
|
|
70
57
|
case 'string':
|
|
71
58
|
return getStringRanges(input, highlight);
|
|
72
|
-
|
|
73
59
|
case 'range':
|
|
74
60
|
return getRangeRanges(highlight);
|
|
75
|
-
|
|
76
61
|
case 'custom':
|
|
77
62
|
return getCustomRanges(input, highlight);
|
|
78
|
-
|
|
79
63
|
default:
|
|
80
64
|
if (!highlight) {
|
|
81
65
|
// do nothing for falsely values
|
|
82
66
|
return [];
|
|
83
67
|
}
|
|
84
|
-
|
|
85
68
|
console.error('unrecognized highlight type');
|
|
86
69
|
}
|
|
87
|
-
|
|
88
70
|
return [];
|
|
89
71
|
}
|
|
90
|
-
|
|
91
72
|
exports["default"] = getRanges;
|
|
92
|
-
|
|
93
73
|
function getArrayRanges(input, arr) {
|
|
94
74
|
// const ranges: RangesType = arr.map(getRanges.bind(this, input));
|
|
95
75
|
var ranges = arr.map(function (highlight) {
|
|
@@ -97,64 +77,49 @@ function getArrayRanges(input, arr) {
|
|
|
97
77
|
});
|
|
98
78
|
return Array.prototype.concat.apply([], ranges);
|
|
99
79
|
}
|
|
100
|
-
|
|
101
80
|
function getFunctionRanges(input, func) {
|
|
102
81
|
return getRanges(input, func(input));
|
|
103
82
|
}
|
|
104
|
-
|
|
105
83
|
function getRegExpRanges(input, regex) {
|
|
106
84
|
var ranges = [];
|
|
107
85
|
var match;
|
|
108
|
-
|
|
109
86
|
while (match = regex.exec(input), match !== null) {
|
|
110
87
|
ranges.push([match.index, match.index + match[0].length]);
|
|
111
|
-
|
|
112
88
|
if (!regex.global) {
|
|
113
89
|
// non-global regexes do not increase lastIndex, causing an infinite loop,
|
|
114
90
|
// but we can just break manually after the first match
|
|
115
91
|
break;
|
|
116
92
|
}
|
|
117
93
|
}
|
|
118
|
-
|
|
119
94
|
return ranges;
|
|
120
95
|
}
|
|
121
|
-
|
|
122
96
|
function getStringRanges(input, str) {
|
|
123
97
|
var ranges = [];
|
|
124
98
|
var inputLower = input.toLowerCase();
|
|
125
99
|
var strLower = str.toLowerCase();
|
|
126
100
|
var index = 0;
|
|
127
|
-
|
|
128
101
|
while (index = inputLower.indexOf(strLower, index), index !== -1) {
|
|
129
102
|
ranges.push([index, index + strLower.length]);
|
|
130
103
|
index += strLower.length;
|
|
131
104
|
}
|
|
132
|
-
|
|
133
105
|
return ranges;
|
|
134
106
|
}
|
|
135
|
-
|
|
136
107
|
function getRangeRanges(range) {
|
|
137
108
|
return [range];
|
|
138
109
|
}
|
|
139
|
-
|
|
140
110
|
function getCustomRanges(input, custom) {
|
|
141
111
|
var ranges = getRanges(input, custom.highlight);
|
|
142
|
-
|
|
143
112
|
var resultRangesData = __spreadArray([], __read(ranges), false);
|
|
144
|
-
|
|
145
113
|
if (custom.className) {
|
|
146
114
|
resultRangesData.forEach(function (range) {
|
|
147
115
|
var rangeOption = range[2] || {};
|
|
148
|
-
|
|
149
116
|
if (rangeOption.className) {
|
|
150
117
|
rangeOption.className = "".concat(custom.className, " ").concat(rangeOption.className);
|
|
151
118
|
} else {
|
|
152
119
|
rangeOption.className = custom.className;
|
|
153
120
|
}
|
|
154
|
-
|
|
155
121
|
range[2] = rangeOption;
|
|
156
122
|
});
|
|
157
123
|
}
|
|
158
|
-
|
|
159
124
|
return ranges;
|
|
160
125
|
}
|
|
@@ -3,35 +3,27 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
6
|
function getType(instance) {
|
|
8
7
|
var type = typeof instance;
|
|
9
|
-
|
|
10
8
|
if (!instance) {
|
|
11
9
|
return 'falsely';
|
|
12
10
|
}
|
|
13
|
-
|
|
14
11
|
if (Array.isArray(instance)) {
|
|
15
12
|
if (instance.length === 2 && typeof instance[0] === 'number' && typeof instance[1] === 'number') {
|
|
16
13
|
return 'range';
|
|
17
14
|
}
|
|
18
|
-
|
|
19
15
|
return 'array';
|
|
20
16
|
}
|
|
21
|
-
|
|
22
17
|
if (type === 'object') {
|
|
23
18
|
if (instance instanceof RegExp) {
|
|
24
19
|
return 'regexp';
|
|
25
20
|
}
|
|
26
|
-
|
|
27
21
|
if (instance.highlight) {
|
|
28
22
|
return 'custom';
|
|
29
23
|
}
|
|
30
24
|
} else if (type === 'function' || type === 'string') {
|
|
31
25
|
return type;
|
|
32
26
|
}
|
|
33
|
-
|
|
34
27
|
return 'other';
|
|
35
28
|
}
|
|
36
|
-
|
|
37
29
|
exports["default"] = getType;
|
|
@@ -4,22 +4,17 @@ var __assign = this && this.__assign || function () {
|
|
|
4
4
|
__assign = Object.assign || function (t) {
|
|
5
5
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
6
|
s = arguments[i];
|
|
7
|
-
|
|
8
7
|
for (var p in s) {
|
|
9
8
|
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
10
9
|
}
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
return t;
|
|
14
12
|
};
|
|
15
|
-
|
|
16
13
|
return __assign.apply(this, arguments);
|
|
17
14
|
};
|
|
18
|
-
|
|
19
15
|
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
20
16
|
if (k2 === undefined) k2 = k;
|
|
21
17
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
22
|
-
|
|
23
18
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
24
19
|
desc = {
|
|
25
20
|
enumerable: true,
|
|
@@ -28,13 +23,11 @@ var __createBinding = this && this.__createBinding || (Object.create ? function
|
|
|
28
23
|
}
|
|
29
24
|
};
|
|
30
25
|
}
|
|
31
|
-
|
|
32
26
|
Object.defineProperty(o, k2, desc);
|
|
33
27
|
} : function (o, m, k, k2) {
|
|
34
28
|
if (k2 === undefined) k2 = k;
|
|
35
29
|
o[k2] = m[k];
|
|
36
30
|
});
|
|
37
|
-
|
|
38
31
|
var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {
|
|
39
32
|
Object.defineProperty(o, "default", {
|
|
40
33
|
enumerable: true,
|
|
@@ -43,40 +36,32 @@ var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? fun
|
|
|
43
36
|
} : function (o, v) {
|
|
44
37
|
o["default"] = v;
|
|
45
38
|
});
|
|
46
|
-
|
|
47
39
|
var __importStar = this && this.__importStar || function (mod) {
|
|
48
40
|
if (mod && mod.__esModule) return mod;
|
|
49
41
|
var result = {};
|
|
50
42
|
if (mod != null) for (var k in mod) {
|
|
51
43
|
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
52
44
|
}
|
|
53
|
-
|
|
54
45
|
__setModuleDefault(result, mod);
|
|
55
|
-
|
|
56
46
|
return result;
|
|
57
47
|
};
|
|
58
|
-
|
|
59
48
|
var __rest = this && this.__rest || function (s, e) {
|
|
60
49
|
var t = {};
|
|
61
|
-
|
|
62
50
|
for (var p in s) {
|
|
63
51
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
64
52
|
}
|
|
65
|
-
|
|
66
53
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
67
54
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
68
55
|
}
|
|
69
56
|
return t;
|
|
70
57
|
};
|
|
71
|
-
|
|
72
58
|
var __read = this && this.__read || function (o, n) {
|
|
73
59
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
74
60
|
if (!m) return o;
|
|
75
61
|
var i = m.call(o),
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
62
|
+
r,
|
|
63
|
+
ar = [],
|
|
64
|
+
e;
|
|
80
65
|
try {
|
|
81
66
|
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
82
67
|
ar.push(r.value);
|
|
@@ -92,73 +77,55 @@ var __read = this && this.__read || function (o, n) {
|
|
|
92
77
|
if (e) throw e.error;
|
|
93
78
|
}
|
|
94
79
|
}
|
|
95
|
-
|
|
96
80
|
return ar;
|
|
97
81
|
};
|
|
98
|
-
|
|
99
82
|
var __importDefault = this && this.__importDefault || function (mod) {
|
|
100
83
|
return mod && mod.__esModule ? mod : {
|
|
101
84
|
"default": mod
|
|
102
85
|
};
|
|
103
86
|
};
|
|
104
|
-
|
|
105
87
|
Object.defineProperty(exports, "__esModule", {
|
|
106
88
|
value: true
|
|
107
89
|
});
|
|
108
|
-
|
|
109
90
|
var React = __importStar(require("react"));
|
|
110
|
-
|
|
111
91
|
var classnames_1 = __importDefault(require("classnames"));
|
|
112
|
-
|
|
113
92
|
var trimStart_1 = __importDefault(require("lodash/trimStart"));
|
|
114
|
-
|
|
115
93
|
var useMount_1 = __importDefault(require("ahooks/lib/useMount"));
|
|
116
|
-
|
|
117
94
|
var HighlighedContents_1 = __importDefault(require("./HighlighedContents"));
|
|
118
|
-
|
|
119
95
|
var HighlightWithinTextarea = React.forwardRef(function (props, ref) {
|
|
120
96
|
var prefixCls = props.prefixCls,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
97
|
+
value = props.value,
|
|
98
|
+
onChange = props.onChange,
|
|
99
|
+
highlight = props.highlight,
|
|
100
|
+
className = props.className,
|
|
101
|
+
textAreaClassName = props.textAreaClassName,
|
|
102
|
+
textareaProps = __rest(props, ["prefixCls", "value", "onChange", "highlight", "className", "textAreaClassName"]);
|
|
128
103
|
var _a = __read(React.useState(''), 2),
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
104
|
+
textAreaValue = _a[0],
|
|
105
|
+
setTextAreaValue = _a[1];
|
|
132
106
|
var resultValue = value || textAreaValue;
|
|
133
107
|
var containerRef = React.useRef();
|
|
134
108
|
var backdropRef = React.useRef();
|
|
135
|
-
|
|
136
109
|
var handleScroll = function handleScroll() {
|
|
137
110
|
var _a;
|
|
138
|
-
|
|
139
111
|
var textareaDom = (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.querySelector('textarea');
|
|
140
|
-
|
|
141
112
|
if (backdropRef.current && textareaDom) {
|
|
142
113
|
backdropRef.current.scrollLeft = textareaDom.scrollLeft;
|
|
143
114
|
backdropRef.current.style.height = "".concat(textareaDom.clientHeight + textareaDom.scrollTop, "px");
|
|
144
115
|
backdropRef.current.style.top = "".concat(0 - textareaDom.scrollTop, "px");
|
|
145
116
|
}
|
|
146
117
|
};
|
|
147
|
-
|
|
148
118
|
(0, useMount_1["default"])(function () {
|
|
149
119
|
handleScroll();
|
|
150
120
|
});
|
|
151
|
-
|
|
152
121
|
var onTextareaChange = function onTextareaChange(e) {
|
|
153
122
|
var newValue = (0, trimStart_1["default"])(e.target.value);
|
|
154
|
-
|
|
155
123
|
if (onChange) {
|
|
156
124
|
onChange(newValue, e);
|
|
157
125
|
} else {
|
|
158
126
|
setTextAreaValue(newValue);
|
|
159
127
|
}
|
|
160
128
|
};
|
|
161
|
-
|
|
162
129
|
var textareaCls = (0, classnames_1["default"])("".concat(prefixCls, "-input"), 'highlight-textarea-input', 'highlight-content', textAreaClassName);
|
|
163
130
|
return React.createElement("div", {
|
|
164
131
|
className: (0, classnames_1["default"])('highlight-textarea', className),
|
|
@@ -23,24 +23,15 @@
|
|
|
23
23
|
-moz-user-select: none;
|
|
24
24
|
user-select: none;
|
|
25
25
|
}
|
|
26
|
-
.ant-input-affix-wrapper:-ms-input-placeholder {
|
|
27
|
-
color: #bfbfbf;
|
|
28
|
-
-ms-user-select: none;
|
|
29
|
-
user-select: none;
|
|
30
|
-
}
|
|
31
26
|
.ant-input-affix-wrapper::placeholder {
|
|
32
27
|
color: #bfbfbf;
|
|
33
28
|
-webkit-user-select: none;
|
|
34
29
|
-moz-user-select: none;
|
|
35
|
-
-ms-user-select: none;
|
|
36
30
|
user-select: none;
|
|
37
31
|
}
|
|
38
32
|
.ant-input-affix-wrapper:-moz-placeholder-shown {
|
|
39
33
|
text-overflow: ellipsis;
|
|
40
34
|
}
|
|
41
|
-
.ant-input-affix-wrapper:-ms-input-placeholder {
|
|
42
|
-
text-overflow: ellipsis;
|
|
43
|
-
}
|
|
44
35
|
.ant-input-affix-wrapper:placeholder-shown {
|
|
45
36
|
text-overflow: ellipsis;
|
|
46
37
|
}
|
|
@@ -137,6 +128,7 @@ textarea.ant-input-affix-wrapper {
|
|
|
137
128
|
}
|
|
138
129
|
.ant-input-affix-wrapper > input.ant-input {
|
|
139
130
|
padding: 0;
|
|
131
|
+
font-size: inherit;
|
|
140
132
|
border: none;
|
|
141
133
|
outline: none;
|
|
142
134
|
}
|
|
@@ -305,24 +297,15 @@ textarea.ant-input-affix-wrapper {
|
|
|
305
297
|
-moz-user-select: none;
|
|
306
298
|
user-select: none;
|
|
307
299
|
}
|
|
308
|
-
.ant-input:-ms-input-placeholder {
|
|
309
|
-
color: #bfbfbf;
|
|
310
|
-
-ms-user-select: none;
|
|
311
|
-
user-select: none;
|
|
312
|
-
}
|
|
313
300
|
.ant-input::placeholder {
|
|
314
301
|
color: #bfbfbf;
|
|
315
302
|
-webkit-user-select: none;
|
|
316
303
|
-moz-user-select: none;
|
|
317
|
-
-ms-user-select: none;
|
|
318
304
|
user-select: none;
|
|
319
305
|
}
|
|
320
306
|
.ant-input:-moz-placeholder-shown {
|
|
321
307
|
text-overflow: ellipsis;
|
|
322
308
|
}
|
|
323
|
-
.ant-input:-ms-input-placeholder {
|
|
324
|
-
text-overflow: ellipsis;
|
|
325
|
-
}
|
|
326
309
|
.ant-input:placeholder-shown {
|
|
327
310
|
text-overflow: ellipsis;
|
|
328
311
|
}
|
|
@@ -835,18 +818,21 @@ textarea.ant-input {
|
|
|
835
818
|
}
|
|
836
819
|
.ant-input-search-rtl .ant-input:hover + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary),
|
|
837
820
|
.ant-input-search-rtl .ant-input:focus + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary) {
|
|
838
|
-
border-right-color: #40a9ff;
|
|
839
821
|
border-left-color: #d9d9d9;
|
|
840
822
|
}
|
|
823
|
+
.ant-input-search-rtl .ant-input:hover + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary):hover,
|
|
824
|
+
.ant-input-search-rtl .ant-input:focus + .ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary):hover {
|
|
825
|
+
border-left-color: #40a9ff;
|
|
826
|
+
}
|
|
841
827
|
.ant-input-search-rtl > .ant-input-group > .ant-input-affix-wrapper:hover,
|
|
842
828
|
.ant-input-search-rtl > .ant-input-group > .ant-input-affix-wrapper-focused {
|
|
843
829
|
border-right-color: #40a9ff;
|
|
844
830
|
}
|
|
845
|
-
.ant-input-search-rtl > .ant-input-group > .ant-input-group-addon {
|
|
831
|
+
.ant-input-search-rtl > .ant-input-group > .ant-input-group-addon:last-child {
|
|
846
832
|
right: -1px;
|
|
847
833
|
left: auto;
|
|
848
834
|
}
|
|
849
|
-
.ant-input-search-rtl > .ant-input-group > .ant-input-group-addon .ant-input-search-button {
|
|
835
|
+
.ant-input-search-rtl > .ant-input-group > .ant-input-group-addon:last-child .ant-input-search-button {
|
|
850
836
|
border-radius: 2px 0 0 2px;
|
|
851
837
|
}
|
|
852
838
|
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
|
@@ -5,11 +5,8 @@ var __importDefault = this && this.__importDefault || function (mod) {
|
|
|
5
5
|
"default": mod
|
|
6
6
|
};
|
|
7
7
|
};
|
|
8
|
-
|
|
9
8
|
Object.defineProperty(exports, "__esModule", {
|
|
10
9
|
value: true
|
|
11
10
|
});
|
|
12
|
-
|
|
13
11
|
var react_highlight_words_1 = __importDefault(require("react-highlight-words"));
|
|
14
|
-
|
|
15
12
|
exports["default"] = react_highlight_words_1["default"];
|
package/lib/img-crop/EasyCrop.js
CHANGED
|
@@ -4,22 +4,17 @@ var __assign = this && this.__assign || function () {
|
|
|
4
4
|
__assign = Object.assign || function (t) {
|
|
5
5
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
6
|
s = arguments[i];
|
|
7
|
-
|
|
8
7
|
for (var p in s) {
|
|
9
8
|
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
10
9
|
}
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
return t;
|
|
14
12
|
};
|
|
15
|
-
|
|
16
13
|
return __assign.apply(this, arguments);
|
|
17
14
|
};
|
|
18
|
-
|
|
19
15
|
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
20
16
|
if (k2 === undefined) k2 = k;
|
|
21
17
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
22
|
-
|
|
23
18
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
24
19
|
desc = {
|
|
25
20
|
enumerable: true,
|
|
@@ -28,13 +23,11 @@ var __createBinding = this && this.__createBinding || (Object.create ? function
|
|
|
28
23
|
}
|
|
29
24
|
};
|
|
30
25
|
}
|
|
31
|
-
|
|
32
26
|
Object.defineProperty(o, k2, desc);
|
|
33
27
|
} : function (o, m, k, k2) {
|
|
34
28
|
if (k2 === undefined) k2 = k;
|
|
35
29
|
o[k2] = m[k];
|
|
36
30
|
});
|
|
37
|
-
|
|
38
31
|
var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {
|
|
39
32
|
Object.defineProperty(o, "default", {
|
|
40
33
|
enumerable: true,
|
|
@@ -43,40 +36,32 @@ var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? fun
|
|
|
43
36
|
} : function (o, v) {
|
|
44
37
|
o["default"] = v;
|
|
45
38
|
});
|
|
46
|
-
|
|
47
39
|
var __importStar = this && this.__importStar || function (mod) {
|
|
48
40
|
if (mod && mod.__esModule) return mod;
|
|
49
41
|
var result = {};
|
|
50
42
|
if (mod != null) for (var k in mod) {
|
|
51
43
|
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
52
44
|
}
|
|
53
|
-
|
|
54
45
|
__setModuleDefault(result, mod);
|
|
55
|
-
|
|
56
46
|
return result;
|
|
57
47
|
};
|
|
58
|
-
|
|
59
48
|
var __rest = this && this.__rest || function (s, e) {
|
|
60
49
|
var t = {};
|
|
61
|
-
|
|
62
50
|
for (var p in s) {
|
|
63
51
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
64
52
|
}
|
|
65
|
-
|
|
66
53
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
67
54
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
68
55
|
}
|
|
69
56
|
return t;
|
|
70
57
|
};
|
|
71
|
-
|
|
72
58
|
var __read = this && this.__read || function (o, n) {
|
|
73
59
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
74
60
|
if (!m) return o;
|
|
75
61
|
var i = m.call(o),
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
62
|
+
r,
|
|
63
|
+
ar = [],
|
|
64
|
+
e;
|
|
80
65
|
try {
|
|
81
66
|
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
82
67
|
ar.push(r.value);
|
|
@@ -92,53 +77,43 @@ var __read = this && this.__read || function (o, n) {
|
|
|
92
77
|
if (e) throw e.error;
|
|
93
78
|
}
|
|
94
79
|
}
|
|
95
|
-
|
|
96
80
|
return ar;
|
|
97
81
|
};
|
|
98
|
-
|
|
99
82
|
var __importDefault = this && this.__importDefault || function (mod) {
|
|
100
83
|
return mod && mod.__esModule ? mod : {
|
|
101
84
|
"default": mod
|
|
102
85
|
};
|
|
103
86
|
};
|
|
104
|
-
|
|
105
87
|
Object.defineProperty(exports, "__esModule", {
|
|
106
88
|
value: true
|
|
107
89
|
});
|
|
108
|
-
|
|
109
90
|
var React = __importStar(require("react"));
|
|
110
|
-
|
|
111
91
|
var react_easy_crop_1 = __importDefault(require("react-easy-crop"));
|
|
112
|
-
|
|
113
92
|
var EasyCrop = function EasyCrop(props) {
|
|
114
93
|
var aspect = props.aspect,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
94
|
+
minZoom = props.minZoom,
|
|
95
|
+
maxZoom = props.maxZoom,
|
|
96
|
+
onComplete = props.onComplete,
|
|
97
|
+
restProps = __rest(props, ["aspect", "minZoom", "maxZoom", "onComplete"]);
|
|
120
98
|
var _a = __read(React.useState({
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
99
|
+
x: 0,
|
|
100
|
+
y: 0
|
|
101
|
+
}), 2),
|
|
102
|
+
crop = _a[0],
|
|
103
|
+
setCrop = _a[1];
|
|
127
104
|
var _b = __read(React.useState({
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
105
|
+
width: 0,
|
|
106
|
+
height: 0
|
|
107
|
+
}), 2),
|
|
108
|
+
cropSize = _b[0],
|
|
109
|
+
setCropSize = _b[1];
|
|
134
110
|
var onCropComplete = React.useCallback(function (_, croppedAreaPixels) {
|
|
135
111
|
onComplete(croppedAreaPixels);
|
|
136
112
|
}, [onComplete]);
|
|
137
113
|
var onMediaLoaded = React.useCallback(function (mediaSize) {
|
|
138
114
|
var width = mediaSize.width,
|
|
139
|
-
|
|
115
|
+
height = mediaSize.height;
|
|
140
116
|
var ratioWidth = height * aspect;
|
|
141
|
-
|
|
142
117
|
if (width > ratioWidth) {
|
|
143
118
|
setCropSize({
|
|
144
119
|
width: ratioWidth,
|
|
@@ -162,5 +137,4 @@ var EasyCrop = function EasyCrop(props) {
|
|
|
162
137
|
onMediaLoaded: onMediaLoaded
|
|
163
138
|
}));
|
|
164
139
|
};
|
|
165
|
-
|
|
166
140
|
exports["default"] = EasyCrop;
|