@medipha/chat 1.0.14
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 +103 -0
- package/dist/api/client.d.ts +5 -0
- package/dist/features/composer/attachment-file-helpers.d.ts +22 -0
- package/dist/features/composer/attachments/attachment-buttons.d.ts +8 -0
- package/dist/features/composer/conversation-composer.d.ts +20 -0
- package/dist/features/composer/editor/font-size-extension.d.ts +18 -0
- package/dist/features/composer/editor/mention-suggestion-list.d.ts +15 -0
- package/dist/features/composer/editor/paste-text-style.d.ts +5 -0
- package/dist/features/composer/emoji/emoji-picker-button.d.ts +9 -0
- package/dist/features/composer/emoji/emoji-shortcode-extension.d.ts +9 -0
- package/dist/features/composer/emoji/emoji-shortcodes.d.ts +2 -0
- package/dist/features/composer/format-bar/format-bar.d.ts +14 -0
- package/dist/features/composer/more-menu/more-menu.d.ts +4 -0
- package/dist/features/composer/pending-attachment.d.ts +10 -0
- package/dist/features/composer/reply/composer-reply-banner.d.ts +11 -0
- package/dist/features/composer/reply/use-reply-target.d.ts +12 -0
- package/dist/features/composer/stickers.d.ts +6 -0
- package/dist/features/composer/toolbar/composer-toolbar.d.ts +19 -0
- package/dist/features/composer/typing/use-typing-notifier.d.ts +11 -0
- package/dist/features/composer/use-attachment-upload.d.ts +4 -0
- package/dist/features/composer/use-pending-attachments.d.ts +16 -0
- package/dist/features/create-conversation/create-conversation-panel.d.ts +9 -0
- package/dist/features/create-conversation/tabs/create-group-tab.d.ts +13 -0
- package/dist/features/create-conversation/tabs/direct-chat-tab.d.ts +12 -0
- package/dist/features/create-conversation/tabs/selected-members-modal.d.ts +11 -0
- package/dist/features/files/file-attachment.d.ts +24 -0
- package/dist/features/forward/forward-dialog.d.ts +11 -0
- package/dist/features/forward/use-forward-message.d.ts +21 -0
- package/dist/features/media-preview/media-preview-modal.d.ts +23 -0
- package/dist/features/media-preview/use-image-lightbox.d.ts +16 -0
- package/dist/features/message-list/bubble/message-actions/message-actions-menu.d.ts +27 -0
- package/dist/features/message-list/bubble/message-bubble.d.ts +53 -0
- package/dist/features/message-list/bubble/message-content-body.d.ts +12 -0
- package/dist/features/message-list/bubble/message-reactions.d.ts +18 -0
- package/dist/features/message-list/bubble/rich-message-content.d.ts +8 -0
- package/dist/features/message-list/overlays/message-details/message-details-modal.d.ts +16 -0
- package/dist/features/message-list/overlays/message-details/use-message-details-modal.d.ts +14 -0
- package/dist/features/message-list/overlays/message-menu/use-message-menu.d.ts +21 -0
- package/dist/features/message-list/overlays/reaction/reaction-modal.d.ts +22 -0
- package/dist/features/message-list/overlays/reaction/use-reaction-modal.d.ts +23 -0
- package/dist/features/message-list/overlays/reaction/use-reaction-picker.d.ts +8 -0
- package/dist/features/message-list/overlays/system-members/system-members-modal.d.ts +22 -0
- package/dist/features/message-list/overlays/system-members/use-system-members-modal.d.ts +18 -0
- package/dist/features/message-list/use-message-removal.d.ts +12 -0
- package/dist/features/message-list/use-message-timeline-scroll.d.ts +25 -0
- package/dist/features/message-window/use-message-window.d.ts +46 -0
- package/dist/features/pinned-messages/pinned-messages-bar.d.ts +18 -0
- package/dist/features/pinned-messages/use-pinned-messages.d.ts +21 -0
- package/dist/features/typing/use-typing-indicator.d.ts +12 -0
- package/dist/index.cjs +278 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +66322 -0
- package/dist/module/chat-module.d.ts +3 -0
- package/dist/module/chat-module.types.d.ts +11 -0
- package/dist/module/chat-routes.d.ts +4 -0
- package/dist/module/chat-runtime-context.d.ts +5 -0
- package/dist/pages/Setting/archive/archive-attachment-preview.d.ts +13 -0
- package/dist/pages/Setting/archive/archive-file-list.d.ts +15 -0
- package/dist/pages/Setting/archive/archive-helpers.d.ts +37 -0
- package/dist/pages/Setting/archive/archive-media-grid.d.ts +14 -0
- package/dist/pages/Setting/archive/archive-view.d.ts +19 -0
- package/dist/pages/Setting/archive/hooks/use-conversation-archive.d.ts +22 -0
- package/dist/pages/Setting/conversation-settings-panel.d.ts +20 -0
- package/dist/pages/Setting/hooks/use-conversation-settings.d.ts +41 -0
- package/dist/pages/Setting/hooks/use-search-panel.d.ts +7 -0
- package/dist/pages/Setting/index.d.ts +39 -0
- package/dist/pages/Setting/members/add-member-modal.d.ts +11 -0
- package/dist/pages/Setting/members/group-members-modal.d.ts +21 -0
- package/dist/pages/Setting/members/hooks/use-rename-group-dialog.d.ts +15 -0
- package/dist/pages/Setting/members/member-selection-footer.d.ts +12 -0
- package/dist/pages/Setting/members/members-list-modal.d.ts +29 -0
- package/dist/pages/Setting/members/settings-modal.d.ts +36 -0
- package/dist/pages/Setting/members/use-member-selection.d.ts +18 -0
- package/dist/pages/Setting/search-panel.d.ts +13 -0
- package/dist/pages/conversation/conversation-detail/conversation-detail.d.ts +92 -0
- package/dist/pages/conversation/conversation-footer/conversation-footer.d.ts +42 -0
- package/dist/pages/conversation/conversation-header/conversation-header.d.ts +27 -0
- package/dist/pages/conversation/hooks/use-current-membership.d.ts +14 -0
- package/dist/pages/conversation/index.d.ts +28 -0
- package/dist/pages/conversations/empty-state/conversation-empty-state.d.ts +3 -0
- package/dist/pages/conversations/index.d.ts +4 -0
- package/dist/pages/sidebar/hooks/use-conversations.d.ts +17 -0
- package/dist/pages/sidebar/index.d.ts +4 -0
- package/dist/pages/sidebar/sidbar-conversation-list/sidbar-conversation-list.d.ts +13 -0
- package/dist/pages/sidebar/sidebar-filter/sidebar-filter.d.ts +13 -0
- package/dist/pages/sidebar/sidebar-header-infor/sidebar-header-infor.d.ts +4 -0
- package/dist/shared/components/banner-carousel.d.ts +9 -0
- package/dist/shared/components/conversation-avatar.d.ts +19 -0
- package/dist/shared/components/date-range-filter-pill.d.ts +17 -0
- package/dist/shared/components/download-action.d.ts +11 -0
- package/dist/shared/components/filter-pill.d.ts +15 -0
- package/dist/shared/components/image-not-available.d.ts +12 -0
- package/dist/shared/components/image-with-fallback.d.ts +13 -0
- package/dist/shared/components/load-more-sentinel.d.ts +15 -0
- package/dist/shared/components/quote-icon.d.ts +5 -0
- package/dist/shared/components/search-empty-state.d.ts +8 -0
- package/dist/shared/components/shared-icon.d.ts +5 -0
- package/dist/shared/components/user-avatar.d.ts +12 -0
- package/dist/shared/components/user-profile-modal.d.ts +13 -0
- package/dist/shared/components/verified-badge.d.ts +5 -0
- package/dist/shared/helper/dayjs-date-picker.d.ts +14 -0
- package/dist/shared/hooks/use-directory-filter.d.ts +13 -0
- package/dist/shared/hooks/use-user-profile-modal.d.ts +9 -0
- package/dist/socket/chatSocket.d.ts +6 -0
- package/dist/store/authStore.d.ts +34 -0
- package/dist/store/connectionStore.d.ts +8 -0
- package/dist/store/conversationsStore.d.ts +38 -0
- package/dist/store/forwardStore.d.ts +14 -0
- package/dist/store/pinnedMessagesStore.d.ts +16 -0
- package/dist/store/presenceStore.d.ts +11 -0
- package/dist/store/verifiedPermissionsStore.d.ts +20 -0
- package/dist/styles.css +2 -0
- package/dist/utils/chat-display.d.ts +44 -0
- package/dist/utils/chat-member-resolvers.d.ts +9 -0
- package/dist/utils/chat-toast.d.ts +18 -0
- package/dist/utils/chat.d.ts +282 -0
- package/dist/utils/token.d.ts +0 -0
- package/dist/utils/work-status.d.ts +15 -0
- package/package.json +96 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ERP work status ("Trạng thái làm việc") badge coloring.
|
|
3
|
+
*
|
|
4
|
+
* `workStatusName` arrives as free-text from the ERP directory sync — this enum is the
|
|
5
|
+
* known set of values it currently sends. An unrecognized value (a future ERP addition,
|
|
6
|
+
* a typo, ...) falls back to a neutral teal rather than breaking the badge.
|
|
7
|
+
*/
|
|
8
|
+
export declare const WORK_STATUSES: readonly ["Thử việc", "NV chính thức", "Nghỉ chế độ", "Nghỉ việc", "Công tác", "Đi học"];
|
|
9
|
+
export type WorkStatus = (typeof WORK_STATUSES)[number];
|
|
10
|
+
export interface WorkStatusColor {
|
|
11
|
+
background: string;
|
|
12
|
+
borderColor: string;
|
|
13
|
+
color: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const getWorkStatusColor: (value: string | null | undefined) => WorkStatusColor;
|
package/package.json
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@medipha/chat",
|
|
3
|
+
"version": "1.0.14",
|
|
4
|
+
"description": "Embeddable Medic-ERP chat module for React applications.",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.cjs",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"registry": "https://registry.npmjs.org/",
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"private": false,
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"import": "./dist/index.js",
|
|
23
|
+
"require": "./dist/index.cjs"
|
|
24
|
+
},
|
|
25
|
+
"./styles.css": "./dist/styles.css"
|
|
26
|
+
},
|
|
27
|
+
"sideEffects": [
|
|
28
|
+
"**/*.css"
|
|
29
|
+
],
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"antd": "4.23.6",
|
|
32
|
+
"react": "^18.2.0",
|
|
33
|
+
"react-dom": "^18.2.0",
|
|
34
|
+
"react-router-dom": ">=6.2.1 <7"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@ant-design/icons": "^6.3.2",
|
|
38
|
+
"@lottiefiles/dotlottie-react": "^0.19.14",
|
|
39
|
+
"@tiptap/core": "^3.29.2",
|
|
40
|
+
"@tiptap/extension-color": "^3.29.2",
|
|
41
|
+
"@tiptap/extension-link": "^3.29.2",
|
|
42
|
+
"@tiptap/extension-mention": "^3.29.2",
|
|
43
|
+
"@tiptap/extension-placeholder": "^3.30.1",
|
|
44
|
+
"@tiptap/extension-text-style": "^3.29.2",
|
|
45
|
+
"@tiptap/extension-underline": "^3.29.2",
|
|
46
|
+
"@tiptap/pm": "^3.29.2",
|
|
47
|
+
"@tiptap/react": "^3.29.2",
|
|
48
|
+
"@tiptap/starter-kit": "^3.29.2",
|
|
49
|
+
"@tiptap/suggestion": "^3.29.2",
|
|
50
|
+
"dayjs": "^1.11.21",
|
|
51
|
+
"emoji-picker-react": "^4.19.1",
|
|
52
|
+
"rc-picker": "^2.6.11",
|
|
53
|
+
"react-virtuoso": "^4.18.10",
|
|
54
|
+
"uuid": "^11.0.5",
|
|
55
|
+
"zustand": "^5.0.8",
|
|
56
|
+
"@medipha/chat-core": "1.0.8"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@eslint/js": "^10.0.1",
|
|
60
|
+
"@types/node": "22.15.3",
|
|
61
|
+
"@types/react": "18.2.79",
|
|
62
|
+
"@types/react-dom": "18.2.25",
|
|
63
|
+
"@vitejs/plugin-react": "latest",
|
|
64
|
+
"antd": "4.23.6",
|
|
65
|
+
"eslint": "^10.8.0",
|
|
66
|
+
"eslint-config-prettier": "^10.1.8",
|
|
67
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
68
|
+
"eslint-plugin-react-refresh": "^0.5.3",
|
|
69
|
+
"prettier": "^3.9.6",
|
|
70
|
+
"react": "18.2.0",
|
|
71
|
+
"react-dom": "18.2.0",
|
|
72
|
+
"react-router-dom": "6.2.1",
|
|
73
|
+
"rolldown": "1.2.1",
|
|
74
|
+
"typescript": "5.8.3",
|
|
75
|
+
"typescript-eslint": "^8.65.0",
|
|
76
|
+
"vite": "^8.1.0",
|
|
77
|
+
"vite-plugin-dts": "latest"
|
|
78
|
+
},
|
|
79
|
+
"engines": {
|
|
80
|
+
"node": ">=20.19.0 || >=22.12.0"
|
|
81
|
+
},
|
|
82
|
+
"scripts": {
|
|
83
|
+
"predev": "pnpm --filter @medipha/chat-core build",
|
|
84
|
+
"dev": "vite",
|
|
85
|
+
"pretypecheck": "pnpm --filter @medipha/chat-core build",
|
|
86
|
+
"typecheck": "tsc --noEmit",
|
|
87
|
+
"prebuild": "pnpm --filter @medipha/chat-core build",
|
|
88
|
+
"build": "tsc -p tsconfig.build.json && vite build",
|
|
89
|
+
"pack:check": "npm pack --dry-run",
|
|
90
|
+
"lint": "eslint .",
|
|
91
|
+
"lint:fix": "eslint . --fix",
|
|
92
|
+
"format:check": "prettier . --check",
|
|
93
|
+
"format": "prettier . --write",
|
|
94
|
+
"publish:npm": "pnpm typecheck && pnpm build && pnpm --filter @medipha/chat-core publish --dry-run && pnpm --filter @medipha/chat-core publish && pnpm publish --dry-run && pnpm publish"
|
|
95
|
+
}
|
|
96
|
+
}
|