@satek-team-intern/chatbot-widget 0.8.10 → 0.10.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/README.md +927 -65
- package/dist/chatbot-widget.es.js +4842 -2898
- package/dist/chatbot-widget.umd.js +16 -12
- package/dist/locales/en.json.d.ts +130 -5
- package/dist/locales/vi.json.d.ts +131 -5
- package/dist/src/assets/Icons.d.ts +45 -0
- package/dist/src/assets/createIcon.d.ts +19 -0
- package/dist/src/assets/index.d.ts +1 -0
- package/dist/src/components/ChatWidget.d.ts +3 -3
- package/dist/src/components/ChatWindow.d.ts +19 -3
- package/dist/src/components/FloatingButton.d.ts +3 -3
- package/dist/src/components/index.d.ts +4 -0
- package/dist/src/components/modals/AddChat.d.ts +3 -3
- package/dist/src/components/modals/AddGroup.d.ts +6 -0
- package/dist/src/components/modals/AddMember.d.ts +3 -3
- package/dist/src/components/modals/FileViewer.d.ts +3 -3
- package/dist/src/components/modals/ThemeModal.d.ts +2 -2
- package/dist/src/components/modals/UpdateGroup.d.ts +4 -4
- package/dist/src/components/modals/UserProfileModal.d.ts +10 -0
- package/dist/src/components/modals/index.d.ts +2 -1
- package/dist/src/components/shared/ChatAvatar.d.ts +1 -1
- package/dist/src/components/shared/MemberAvatarFallBack.d.ts +5 -0
- package/dist/src/components/shared/ToastContainer.d.ts +2 -0
- package/dist/src/components/shared/index.d.ts +3 -0
- package/dist/src/components/sidebar/AppSideBar.d.ts +7 -0
- package/dist/src/components/sidebar/ChatInfoPanel.d.ts +11 -0
- package/dist/src/components/sidebar/ChatList.d.ts +4 -5
- package/dist/src/components/sidebar/ChatSearchBar.d.ts +3 -2
- package/dist/src/components/sidebar/SideBarInfoChat.d.ts +11 -0
- package/dist/src/components/sidebar/index.d.ts +2 -0
- package/dist/src/components/view/ChatHeader.d.ts +4 -3
- package/dist/src/components/view/ChatInput.d.ts +1 -2
- package/dist/src/components/view/ContactList.d.ts +8 -0
- package/dist/src/components/view/GroupList.d.ts +9 -0
- package/dist/src/components/view/MessageFiles.d.ts +3 -3
- package/dist/src/components/view/MessageItem.d.ts +3 -3
- package/dist/src/components/view/MessageList.d.ts +2 -2
- package/dist/src/components/view/index.d.ts +4 -1
- package/dist/src/constants/common.d.ts +1 -0
- package/dist/src/constants/file.d.ts +2 -0
- package/dist/src/constants/index.d.ts +2 -0
- package/dist/src/contexts/FileViewerContext.d.ts +5 -5
- package/dist/src/contexts/ToastContext.d.ts +4 -0
- package/dist/src/contexts/index.d.ts +2 -1
- package/dist/src/contexts/toast-context.d.ts +16 -0
- package/dist/src/hooks/index.d.ts +3 -0
- package/dist/src/hooks/useChat.d.ts +2 -2
- package/dist/src/hooks/useDragDropFiles.d.ts +5 -4
- package/dist/src/hooks/useFileViewer.d.ts +1 -1
- package/dist/src/hooks/useSetting.d.ts +2 -2
- package/dist/src/hooks/useToast.d.ts +1 -0
- package/dist/src/hooks/useTranslation.d.ts +4 -0
- package/dist/src/locales/index.d.ts +3 -0
- package/dist/src/services/chat.service.d.ts +5 -5
- package/dist/src/services/index.d.ts +2 -0
- package/dist/src/services/language.service.d.ts +2 -2
- package/dist/src/store/index.d.ts +2 -0
- package/dist/src/store/selectors/index.d.ts +1 -0
- package/dist/src/store/selectors/setting.d.ts +17 -47
- package/dist/src/store/slices/chatSlice.d.ts +7 -5
- package/dist/src/store/slices/index.d.ts +2 -0
- package/dist/src/store/slices/settingSlice.d.ts +5 -6
- package/dist/src/store/store.d.ts +2 -2
- package/dist/src/styles/index.d.ts +1 -0
- package/dist/src/types/chat.type.d.ts +35 -6
- package/dist/src/types/types.d.ts +34 -14
- package/dist/src/utils/chat.utils.d.ts +13 -7
- package/dist/src/utils/file.utils.d.ts +16 -0
- package/dist/src/utils/format.utils.d.ts +2 -0
- package/dist/src/utils/formatDateLabel.d.ts +1 -0
- package/dist/src/utils/index.d.ts +4 -0
- package/package.json +2 -2
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lấy icon dựa trên tên file hoặc extension
|
|
3
|
+
* @param fileNameOrExt Có thể là "image.png" hoặc chỉ "png"
|
|
4
|
+
*/
|
|
5
|
+
export declare const getFileIcon: (fileNameOrExt: string) => string;
|
|
6
|
+
export declare const getFileKey: (file: File) => string | undefined;
|
|
7
|
+
export declare const formatFileSize: (bytes: number) => string;
|
|
8
|
+
export declare const getFileType: (fileName: string) => "image" | "video" | "audio" | "pdf" | "other";
|
|
9
|
+
export declare const getImagePreview: (file: File) => string;
|
|
10
|
+
export declare const isImageFile: (file: File) => boolean;
|
|
11
|
+
export declare const sortFilesByType: (files: File[]) => File[];
|
|
12
|
+
export declare const sanitizeImage: (file: File) => Promise<File>;
|
|
13
|
+
export declare const getFilesValidationError: (files: File[], hasMultipleAttachments: boolean, isFileTypeAllowed: (file: File) => boolean) => {
|
|
14
|
+
message: string;
|
|
15
|
+
type: 'warning' | 'error';
|
|
16
|
+
} | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatDateLabel: (dateStr: string | Date) => string;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@satek-team-intern/chatbot-widget",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "A widget chatbot can be integrated into any website, providing a seamless and interactive user experience. It is designed to be easily embedded and customizable, allowing businesses to engage with their customers effectively.",
|
|
5
|
-
"author": "Satek Team
|
|
5
|
+
"author": "Satek Team",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./dist/chatbot-widget.umd.js",
|