@douyinfe/semi-ui 2.26.0-beta.0 → 2.26.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/dist/umd/semi-ui.js +78 -3
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/tagInput/index.d.ts +3 -0
- package/lib/cjs/tagInput/index.js +18 -2
- package/lib/es/tagInput/index.d.ts +3 -0
- package/lib/es/tagInput/index.js +18 -2
- package/package.json +8 -8
|
@@ -56,6 +56,7 @@ export interface TagInputState {
|
|
|
56
56
|
focusing?: boolean;
|
|
57
57
|
hovering?: boolean;
|
|
58
58
|
active?: boolean;
|
|
59
|
+
entering?: boolean;
|
|
59
60
|
}
|
|
60
61
|
declare class TagInput extends BaseComponent<TagInputProps, TagInputState> {
|
|
61
62
|
static propTypes: {
|
|
@@ -151,6 +152,8 @@ declare class TagInput extends BaseComponent<TagInputProps, TagInputState> {
|
|
|
151
152
|
renderTags(): JSX.Element;
|
|
152
153
|
blur(): void;
|
|
153
154
|
focus(): void;
|
|
155
|
+
handleInputCompositionStart: (e: any) => void;
|
|
156
|
+
handleInputCompositionEnd: (e: any) => void;
|
|
154
157
|
render(): JSX.Element;
|
|
155
158
|
}
|
|
156
159
|
export default TagInput;
|
|
@@ -186,13 +186,22 @@ class TagInput extends _baseComponent.default {
|
|
|
186
186
|
this.foundation.handleSortEnd(callbackProps);
|
|
187
187
|
};
|
|
188
188
|
|
|
189
|
+
this.handleInputCompositionStart = e => {
|
|
190
|
+
this.foundation.handleInputCompositionStart(e);
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
this.handleInputCompositionEnd = e => {
|
|
194
|
+
this.foundation.handleInputCompositionEnd(e);
|
|
195
|
+
};
|
|
196
|
+
|
|
189
197
|
this.foundation = new _foundation.default(this.adapter);
|
|
190
198
|
this.state = {
|
|
191
199
|
tagsArray: props.defaultValue || [],
|
|
192
200
|
inputValue: '',
|
|
193
201
|
focusing: false,
|
|
194
202
|
hovering: false,
|
|
195
|
-
active: false
|
|
203
|
+
active: false,
|
|
204
|
+
entering: false
|
|
196
205
|
};
|
|
197
206
|
this.inputRef = /*#__PURE__*/_react.default.createRef();
|
|
198
207
|
this.tagInputRef = /*#__PURE__*/_react.default.createRef();
|
|
@@ -268,6 +277,11 @@ class TagInput extends _baseComponent.default {
|
|
|
268
277
|
active
|
|
269
278
|
});
|
|
270
279
|
},
|
|
280
|
+
setEntering: entering => {
|
|
281
|
+
this.setState({
|
|
282
|
+
entering
|
|
283
|
+
});
|
|
284
|
+
},
|
|
271
285
|
getClickOutsideHandler: () => {
|
|
272
286
|
return this.clickOutsideHandler;
|
|
273
287
|
},
|
|
@@ -558,7 +572,9 @@ class TagInput extends _baseComponent.default {
|
|
|
558
572
|
},
|
|
559
573
|
onFocus: e => {
|
|
560
574
|
this.handleInputFocus(e);
|
|
561
|
-
}
|
|
575
|
+
},
|
|
576
|
+
onCompositionStart: this.handleInputCompositionStart,
|
|
577
|
+
onCompositionEnd: this.handleInputCompositionEnd
|
|
562
578
|
})), this.renderClearBtn(), this.renderSuffix())
|
|
563
579
|
);
|
|
564
580
|
}
|
|
@@ -56,6 +56,7 @@ export interface TagInputState {
|
|
|
56
56
|
focusing?: boolean;
|
|
57
57
|
hovering?: boolean;
|
|
58
58
|
active?: boolean;
|
|
59
|
+
entering?: boolean;
|
|
59
60
|
}
|
|
60
61
|
declare class TagInput extends BaseComponent<TagInputProps, TagInputState> {
|
|
61
62
|
static propTypes: {
|
|
@@ -151,6 +152,8 @@ declare class TagInput extends BaseComponent<TagInputProps, TagInputState> {
|
|
|
151
152
|
renderTags(): JSX.Element;
|
|
152
153
|
blur(): void;
|
|
153
154
|
focus(): void;
|
|
155
|
+
handleInputCompositionStart: (e: any) => void;
|
|
156
|
+
handleInputCompositionEnd: (e: any) => void;
|
|
154
157
|
render(): JSX.Element;
|
|
155
158
|
}
|
|
156
159
|
export default TagInput;
|
package/lib/es/tagInput/index.js
CHANGED
|
@@ -157,13 +157,22 @@ class TagInput extends BaseComponent {
|
|
|
157
157
|
this.foundation.handleSortEnd(callbackProps);
|
|
158
158
|
};
|
|
159
159
|
|
|
160
|
+
this.handleInputCompositionStart = e => {
|
|
161
|
+
this.foundation.handleInputCompositionStart(e);
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
this.handleInputCompositionEnd = e => {
|
|
165
|
+
this.foundation.handleInputCompositionEnd(e);
|
|
166
|
+
};
|
|
167
|
+
|
|
160
168
|
this.foundation = new TagInputFoundation(this.adapter);
|
|
161
169
|
this.state = {
|
|
162
170
|
tagsArray: props.defaultValue || [],
|
|
163
171
|
inputValue: '',
|
|
164
172
|
focusing: false,
|
|
165
173
|
hovering: false,
|
|
166
|
-
active: false
|
|
174
|
+
active: false,
|
|
175
|
+
entering: false
|
|
167
176
|
};
|
|
168
177
|
this.inputRef = /*#__PURE__*/React.createRef();
|
|
169
178
|
this.tagInputRef = /*#__PURE__*/React.createRef();
|
|
@@ -239,6 +248,11 @@ class TagInput extends BaseComponent {
|
|
|
239
248
|
active
|
|
240
249
|
});
|
|
241
250
|
},
|
|
251
|
+
setEntering: entering => {
|
|
252
|
+
this.setState({
|
|
253
|
+
entering
|
|
254
|
+
});
|
|
255
|
+
},
|
|
242
256
|
getClickOutsideHandler: () => {
|
|
243
257
|
return this.clickOutsideHandler;
|
|
244
258
|
},
|
|
@@ -528,7 +542,9 @@ class TagInput extends BaseComponent {
|
|
|
528
542
|
},
|
|
529
543
|
onFocus: e => {
|
|
530
544
|
this.handleInputFocus(e);
|
|
531
|
-
}
|
|
545
|
+
},
|
|
546
|
+
onCompositionStart: this.handleInputCompositionStart,
|
|
547
|
+
onCompositionEnd: this.handleInputCompositionEnd
|
|
532
548
|
})), this.renderClearBtn(), this.renderSuffix())
|
|
533
549
|
);
|
|
534
550
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-ui",
|
|
3
|
-
"version": "2.26.0
|
|
3
|
+
"version": "2.26.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es/index.js",
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"lib/*"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@douyinfe/semi-animation": "2.26.0
|
|
21
|
-
"@douyinfe/semi-animation-react": "2.26.0
|
|
22
|
-
"@douyinfe/semi-foundation": "2.26.0
|
|
23
|
-
"@douyinfe/semi-icons": "2.26.0
|
|
24
|
-
"@douyinfe/semi-illustrations": "2.26.0
|
|
25
|
-
"@douyinfe/semi-theme-default": "2.26.0
|
|
20
|
+
"@douyinfe/semi-animation": "2.26.0",
|
|
21
|
+
"@douyinfe/semi-animation-react": "2.26.0",
|
|
22
|
+
"@douyinfe/semi-foundation": "2.26.0",
|
|
23
|
+
"@douyinfe/semi-icons": "2.26.0",
|
|
24
|
+
"@douyinfe/semi-illustrations": "2.26.0",
|
|
25
|
+
"@douyinfe/semi-theme-default": "2.26.0",
|
|
26
26
|
"async-validator": "^3.5.0",
|
|
27
27
|
"classnames": "^2.2.6",
|
|
28
28
|
"copy-text-to-clipboard": "^2.1.1",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
],
|
|
70
70
|
"author": "",
|
|
71
71
|
"license": "MIT",
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "7fed74a6b19a9bf9d45f56eb36c97fce0ac9de76",
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
75
75
|
"@babel/plugin-transform-runtime": "^7.15.8",
|