@douyinfe/semi-foundation 2.62.1 → 2.63.0-beta.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/chat/chat.scss +598 -0
- package/chat/chatBoxActionFoundation.ts +64 -0
- package/chat/constants.ts +68 -0
- package/chat/foundation.ts +306 -0
- package/chat/inputboxFoundation.ts +98 -0
- package/chat/rtl.scss +22 -0
- package/chat/variables.scss +125 -0
- package/input/textareaFoundation.ts +5 -0
- package/lib/cjs/chat/chat.css +484 -0
- package/lib/cjs/chat/chat.scss +598 -0
- package/lib/cjs/chat/chatBoxActionFoundation.d.ts +24 -0
- package/lib/cjs/chat/chatBoxActionFoundation.js +49 -0
- package/lib/cjs/chat/constants.d.ts +41 -0
- package/lib/cjs/chat/constants.js +56 -0
- package/lib/cjs/chat/foundation.d.ts +76 -0
- package/lib/cjs/chat/foundation.js +275 -0
- package/lib/cjs/chat/inputboxFoundation.d.ts +20 -0
- package/lib/cjs/chat/inputboxFoundation.js +118 -0
- package/lib/cjs/chat/rtl.scss +22 -0
- package/lib/cjs/chat/variables.scss +125 -0
- package/lib/cjs/input/textareaFoundation.js +7 -0
- package/lib/cjs/upload/foundation.d.ts +1 -0
- package/lib/cjs/upload/foundation.js +3 -1
- package/lib/es/chat/chat.css +484 -0
- package/lib/es/chat/chat.scss +598 -0
- package/lib/es/chat/chatBoxActionFoundation.d.ts +24 -0
- package/lib/es/chat/chatBoxActionFoundation.js +41 -0
- package/lib/es/chat/constants.d.ts +41 -0
- package/lib/es/chat/constants.js +51 -0
- package/lib/es/chat/foundation.d.ts +76 -0
- package/lib/es/chat/foundation.js +267 -0
- package/lib/es/chat/inputboxFoundation.d.ts +20 -0
- package/lib/es/chat/inputboxFoundation.js +110 -0
- package/lib/es/chat/rtl.scss +22 -0
- package/lib/es/chat/variables.scss +125 -0
- package/lib/es/input/textareaFoundation.js +7 -0
- package/lib/es/upload/foundation.d.ts +1 -0
- package/lib/es/upload/foundation.js +3 -1
- package/package.json +3 -3
- package/upload/foundation.ts +4 -2
|
@@ -40,6 +40,7 @@ export interface AfterUploadResult {
|
|
|
40
40
|
status?: string;
|
|
41
41
|
validateMessage?: unknown;
|
|
42
42
|
name?: string;
|
|
43
|
+
url?: string;
|
|
43
44
|
}
|
|
44
45
|
export interface UploadAdapter<P = Record<string, any>, S = Record<string, any>> extends DefaultAdapter<P, S> {
|
|
45
46
|
notifyFileSelect: (files: Array<CustomFile>) => void;
|
|
@@ -688,7 +688,8 @@ class UploadFoundation extends BaseFoundation {
|
|
|
688
688
|
autoRemove,
|
|
689
689
|
status,
|
|
690
690
|
validateMessage,
|
|
691
|
-
name
|
|
691
|
+
name,
|
|
692
|
+
url
|
|
692
693
|
} = this._adapter.notifyAfterUpload({
|
|
693
694
|
response: body,
|
|
694
695
|
file: newFileList[index],
|
|
@@ -697,6 +698,7 @@ class UploadFoundation extends BaseFoundation {
|
|
|
697
698
|
status ? newFileList[index].status = status : null;
|
|
698
699
|
validateMessage ? newFileList[index].validateMessage = validateMessage : null;
|
|
699
700
|
name ? newFileList[index].name = name : null;
|
|
701
|
+
url ? newFileList[index].url = url : null;
|
|
700
702
|
autoRemove ? newFileList.splice(index, 1) : null;
|
|
701
703
|
}
|
|
702
704
|
this._adapter.notifySuccess(body, fileInstance, newFileList);
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.63.0-beta.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build:lib": "node ./scripts/compileLib.js",
|
|
7
7
|
"prepublishOnly": "npm run build:lib"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@douyinfe/semi-animation": "2.
|
|
10
|
+
"@douyinfe/semi-animation": "2.63.0-beta.0",
|
|
11
11
|
"@mdx-js/mdx": "^3.0.1",
|
|
12
12
|
"async-validator": "^3.5.0",
|
|
13
13
|
"classnames": "^2.2.6",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"*.scss",
|
|
29
29
|
"*.css"
|
|
30
30
|
],
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "3e13ef6fd2fcc25aa56d863828a4833feaceea3c",
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
34
34
|
"@babel/preset-env": "^7.15.8",
|
package/upload/foundation.ts
CHANGED
|
@@ -60,7 +60,8 @@ export interface AfterUploadResult {
|
|
|
60
60
|
autoRemove?: boolean;
|
|
61
61
|
status?: string;
|
|
62
62
|
validateMessage?: unknown;
|
|
63
|
-
name?: string
|
|
63
|
+
name?: string;
|
|
64
|
+
url?: string
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
export interface UploadAdapter<P = Record<string, any>, S = Record<string, any>> extends DefaultAdapter<P, S> {
|
|
@@ -646,7 +647,7 @@ class UploadFoundation<P = Record<string, any>, S = Record<string, any>> extends
|
|
|
646
647
|
e ? (newFileList[index].event = e) : null;
|
|
647
648
|
|
|
648
649
|
if (afterUpload && typeof afterUpload === 'function') {
|
|
649
|
-
const { autoRemove, status, validateMessage, name } =
|
|
650
|
+
const { autoRemove, status, validateMessage, name, url } =
|
|
650
651
|
this._adapter.notifyAfterUpload({
|
|
651
652
|
response: body,
|
|
652
653
|
file: newFileList[index],
|
|
@@ -655,6 +656,7 @@ class UploadFoundation<P = Record<string, any>, S = Record<string, any>> extends
|
|
|
655
656
|
status ? (newFileList[index].status = status) : null;
|
|
656
657
|
validateMessage ? (newFileList[index].validateMessage = validateMessage) : null;
|
|
657
658
|
name ? (newFileList[index].name = name) : null;
|
|
659
|
+
url ? (newFileList[index].url = url) : null;
|
|
658
660
|
autoRemove ? newFileList.splice(index, 1) : null;
|
|
659
661
|
}
|
|
660
662
|
this._adapter.notifySuccess(body, fileInstance, newFileList);
|