@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.
Files changed (119) hide show
  1. package/README.md +103 -0
  2. package/dist/api/client.d.ts +5 -0
  3. package/dist/features/composer/attachment-file-helpers.d.ts +22 -0
  4. package/dist/features/composer/attachments/attachment-buttons.d.ts +8 -0
  5. package/dist/features/composer/conversation-composer.d.ts +20 -0
  6. package/dist/features/composer/editor/font-size-extension.d.ts +18 -0
  7. package/dist/features/composer/editor/mention-suggestion-list.d.ts +15 -0
  8. package/dist/features/composer/editor/paste-text-style.d.ts +5 -0
  9. package/dist/features/composer/emoji/emoji-picker-button.d.ts +9 -0
  10. package/dist/features/composer/emoji/emoji-shortcode-extension.d.ts +9 -0
  11. package/dist/features/composer/emoji/emoji-shortcodes.d.ts +2 -0
  12. package/dist/features/composer/format-bar/format-bar.d.ts +14 -0
  13. package/dist/features/composer/more-menu/more-menu.d.ts +4 -0
  14. package/dist/features/composer/pending-attachment.d.ts +10 -0
  15. package/dist/features/composer/reply/composer-reply-banner.d.ts +11 -0
  16. package/dist/features/composer/reply/use-reply-target.d.ts +12 -0
  17. package/dist/features/composer/stickers.d.ts +6 -0
  18. package/dist/features/composer/toolbar/composer-toolbar.d.ts +19 -0
  19. package/dist/features/composer/typing/use-typing-notifier.d.ts +11 -0
  20. package/dist/features/composer/use-attachment-upload.d.ts +4 -0
  21. package/dist/features/composer/use-pending-attachments.d.ts +16 -0
  22. package/dist/features/create-conversation/create-conversation-panel.d.ts +9 -0
  23. package/dist/features/create-conversation/tabs/create-group-tab.d.ts +13 -0
  24. package/dist/features/create-conversation/tabs/direct-chat-tab.d.ts +12 -0
  25. package/dist/features/create-conversation/tabs/selected-members-modal.d.ts +11 -0
  26. package/dist/features/files/file-attachment.d.ts +24 -0
  27. package/dist/features/forward/forward-dialog.d.ts +11 -0
  28. package/dist/features/forward/use-forward-message.d.ts +21 -0
  29. package/dist/features/media-preview/media-preview-modal.d.ts +23 -0
  30. package/dist/features/media-preview/use-image-lightbox.d.ts +16 -0
  31. package/dist/features/message-list/bubble/message-actions/message-actions-menu.d.ts +27 -0
  32. package/dist/features/message-list/bubble/message-bubble.d.ts +53 -0
  33. package/dist/features/message-list/bubble/message-content-body.d.ts +12 -0
  34. package/dist/features/message-list/bubble/message-reactions.d.ts +18 -0
  35. package/dist/features/message-list/bubble/rich-message-content.d.ts +8 -0
  36. package/dist/features/message-list/overlays/message-details/message-details-modal.d.ts +16 -0
  37. package/dist/features/message-list/overlays/message-details/use-message-details-modal.d.ts +14 -0
  38. package/dist/features/message-list/overlays/message-menu/use-message-menu.d.ts +21 -0
  39. package/dist/features/message-list/overlays/reaction/reaction-modal.d.ts +22 -0
  40. package/dist/features/message-list/overlays/reaction/use-reaction-modal.d.ts +23 -0
  41. package/dist/features/message-list/overlays/reaction/use-reaction-picker.d.ts +8 -0
  42. package/dist/features/message-list/overlays/system-members/system-members-modal.d.ts +22 -0
  43. package/dist/features/message-list/overlays/system-members/use-system-members-modal.d.ts +18 -0
  44. package/dist/features/message-list/use-message-removal.d.ts +12 -0
  45. package/dist/features/message-list/use-message-timeline-scroll.d.ts +25 -0
  46. package/dist/features/message-window/use-message-window.d.ts +46 -0
  47. package/dist/features/pinned-messages/pinned-messages-bar.d.ts +18 -0
  48. package/dist/features/pinned-messages/use-pinned-messages.d.ts +21 -0
  49. package/dist/features/typing/use-typing-indicator.d.ts +12 -0
  50. package/dist/index.cjs +278 -0
  51. package/dist/index.d.ts +2 -0
  52. package/dist/index.js +66322 -0
  53. package/dist/module/chat-module.d.ts +3 -0
  54. package/dist/module/chat-module.types.d.ts +11 -0
  55. package/dist/module/chat-routes.d.ts +4 -0
  56. package/dist/module/chat-runtime-context.d.ts +5 -0
  57. package/dist/pages/Setting/archive/archive-attachment-preview.d.ts +13 -0
  58. package/dist/pages/Setting/archive/archive-file-list.d.ts +15 -0
  59. package/dist/pages/Setting/archive/archive-helpers.d.ts +37 -0
  60. package/dist/pages/Setting/archive/archive-media-grid.d.ts +14 -0
  61. package/dist/pages/Setting/archive/archive-view.d.ts +19 -0
  62. package/dist/pages/Setting/archive/hooks/use-conversation-archive.d.ts +22 -0
  63. package/dist/pages/Setting/conversation-settings-panel.d.ts +20 -0
  64. package/dist/pages/Setting/hooks/use-conversation-settings.d.ts +41 -0
  65. package/dist/pages/Setting/hooks/use-search-panel.d.ts +7 -0
  66. package/dist/pages/Setting/index.d.ts +39 -0
  67. package/dist/pages/Setting/members/add-member-modal.d.ts +11 -0
  68. package/dist/pages/Setting/members/group-members-modal.d.ts +21 -0
  69. package/dist/pages/Setting/members/hooks/use-rename-group-dialog.d.ts +15 -0
  70. package/dist/pages/Setting/members/member-selection-footer.d.ts +12 -0
  71. package/dist/pages/Setting/members/members-list-modal.d.ts +29 -0
  72. package/dist/pages/Setting/members/settings-modal.d.ts +36 -0
  73. package/dist/pages/Setting/members/use-member-selection.d.ts +18 -0
  74. package/dist/pages/Setting/search-panel.d.ts +13 -0
  75. package/dist/pages/conversation/conversation-detail/conversation-detail.d.ts +92 -0
  76. package/dist/pages/conversation/conversation-footer/conversation-footer.d.ts +42 -0
  77. package/dist/pages/conversation/conversation-header/conversation-header.d.ts +27 -0
  78. package/dist/pages/conversation/hooks/use-current-membership.d.ts +14 -0
  79. package/dist/pages/conversation/index.d.ts +28 -0
  80. package/dist/pages/conversations/empty-state/conversation-empty-state.d.ts +3 -0
  81. package/dist/pages/conversations/index.d.ts +4 -0
  82. package/dist/pages/sidebar/hooks/use-conversations.d.ts +17 -0
  83. package/dist/pages/sidebar/index.d.ts +4 -0
  84. package/dist/pages/sidebar/sidbar-conversation-list/sidbar-conversation-list.d.ts +13 -0
  85. package/dist/pages/sidebar/sidebar-filter/sidebar-filter.d.ts +13 -0
  86. package/dist/pages/sidebar/sidebar-header-infor/sidebar-header-infor.d.ts +4 -0
  87. package/dist/shared/components/banner-carousel.d.ts +9 -0
  88. package/dist/shared/components/conversation-avatar.d.ts +19 -0
  89. package/dist/shared/components/date-range-filter-pill.d.ts +17 -0
  90. package/dist/shared/components/download-action.d.ts +11 -0
  91. package/dist/shared/components/filter-pill.d.ts +15 -0
  92. package/dist/shared/components/image-not-available.d.ts +12 -0
  93. package/dist/shared/components/image-with-fallback.d.ts +13 -0
  94. package/dist/shared/components/load-more-sentinel.d.ts +15 -0
  95. package/dist/shared/components/quote-icon.d.ts +5 -0
  96. package/dist/shared/components/search-empty-state.d.ts +8 -0
  97. package/dist/shared/components/shared-icon.d.ts +5 -0
  98. package/dist/shared/components/user-avatar.d.ts +12 -0
  99. package/dist/shared/components/user-profile-modal.d.ts +13 -0
  100. package/dist/shared/components/verified-badge.d.ts +5 -0
  101. package/dist/shared/helper/dayjs-date-picker.d.ts +14 -0
  102. package/dist/shared/hooks/use-directory-filter.d.ts +13 -0
  103. package/dist/shared/hooks/use-user-profile-modal.d.ts +9 -0
  104. package/dist/socket/chatSocket.d.ts +6 -0
  105. package/dist/store/authStore.d.ts +34 -0
  106. package/dist/store/connectionStore.d.ts +8 -0
  107. package/dist/store/conversationsStore.d.ts +38 -0
  108. package/dist/store/forwardStore.d.ts +14 -0
  109. package/dist/store/pinnedMessagesStore.d.ts +16 -0
  110. package/dist/store/presenceStore.d.ts +11 -0
  111. package/dist/store/verifiedPermissionsStore.d.ts +20 -0
  112. package/dist/styles.css +2 -0
  113. package/dist/utils/chat-display.d.ts +44 -0
  114. package/dist/utils/chat-member-resolvers.d.ts +9 -0
  115. package/dist/utils/chat-toast.d.ts +18 -0
  116. package/dist/utils/chat.d.ts +282 -0
  117. package/dist/utils/token.d.ts +0 -0
  118. package/dist/utils/work-status.d.ts +15 -0
  119. 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
+ }