@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.
Files changed (40) hide show
  1. package/chat/chat.scss +598 -0
  2. package/chat/chatBoxActionFoundation.ts +64 -0
  3. package/chat/constants.ts +68 -0
  4. package/chat/foundation.ts +306 -0
  5. package/chat/inputboxFoundation.ts +98 -0
  6. package/chat/rtl.scss +22 -0
  7. package/chat/variables.scss +125 -0
  8. package/input/textareaFoundation.ts +5 -0
  9. package/lib/cjs/chat/chat.css +484 -0
  10. package/lib/cjs/chat/chat.scss +598 -0
  11. package/lib/cjs/chat/chatBoxActionFoundation.d.ts +24 -0
  12. package/lib/cjs/chat/chatBoxActionFoundation.js +49 -0
  13. package/lib/cjs/chat/constants.d.ts +41 -0
  14. package/lib/cjs/chat/constants.js +56 -0
  15. package/lib/cjs/chat/foundation.d.ts +76 -0
  16. package/lib/cjs/chat/foundation.js +275 -0
  17. package/lib/cjs/chat/inputboxFoundation.d.ts +20 -0
  18. package/lib/cjs/chat/inputboxFoundation.js +118 -0
  19. package/lib/cjs/chat/rtl.scss +22 -0
  20. package/lib/cjs/chat/variables.scss +125 -0
  21. package/lib/cjs/input/textareaFoundation.js +7 -0
  22. package/lib/cjs/upload/foundation.d.ts +1 -0
  23. package/lib/cjs/upload/foundation.js +3 -1
  24. package/lib/es/chat/chat.css +484 -0
  25. package/lib/es/chat/chat.scss +598 -0
  26. package/lib/es/chat/chatBoxActionFoundation.d.ts +24 -0
  27. package/lib/es/chat/chatBoxActionFoundation.js +41 -0
  28. package/lib/es/chat/constants.d.ts +41 -0
  29. package/lib/es/chat/constants.js +51 -0
  30. package/lib/es/chat/foundation.d.ts +76 -0
  31. package/lib/es/chat/foundation.js +267 -0
  32. package/lib/es/chat/inputboxFoundation.d.ts +20 -0
  33. package/lib/es/chat/inputboxFoundation.js +110 -0
  34. package/lib/es/chat/rtl.scss +22 -0
  35. package/lib/es/chat/variables.scss +125 -0
  36. package/lib/es/input/textareaFoundation.js +7 -0
  37. package/lib/es/upload/foundation.d.ts +1 -0
  38. package/lib/es/upload/foundation.js +3 -1
  39. package/package.json +3 -3
  40. 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.62.1",
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.62.1",
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": "99b473508df61ea87098d68db7d0d8a07c8c42b8",
31
+ "gitHead": "3e13ef6fd2fcc25aa56d863828a4833feaceea3c",
32
32
  "devDependencies": {
33
33
  "@babel/plugin-transform-runtime": "^7.15.8",
34
34
  "@babel/preset-env": "^7.15.8",
@@ -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);