@mantine-vue/whatsapp-inbox 3.2.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/README.md +88 -0
- package/cjs/index.cjs +11842 -0
- package/cjs/index.cjs.map +1 -0
- package/esm/index.mjs +11704 -0
- package/esm/index.mjs.map +1 -0
- package/lib/WhatsAppInbox.context.d.ts +70 -0
- package/lib/component-props.d.ts +138 -0
- package/lib/components/WhatsAppAttachmentPreview/WhatsAppAttachmentPreview.d.ts +8 -0
- package/lib/components/WhatsAppAttachmentPreview/WhatsAppAttachmentPreview.types.d.ts +33 -0
- package/lib/components/WhatsAppAttachmentPreview/WhatsAppAttachmentPreview.vue.d.ts +19 -0
- package/lib/components/WhatsAppAttachmentPreview/index.d.ts +1 -0
- package/lib/components/WhatsAppComposer/WhatsAppComposer.d.ts +10 -0
- package/lib/components/WhatsAppComposer/WhatsAppComposer.types.d.ts +173 -0
- package/lib/components/WhatsAppComposer/WhatsAppComposer.vue.d.ts +52 -0
- package/lib/components/WhatsAppComposer/index.d.ts +1 -0
- package/lib/components/WhatsAppContactPanel/WhatsAppContactPanel.d.ts +9 -0
- package/lib/components/WhatsAppContactPanel/WhatsAppContactPanel.types.d.ts +40 -0
- package/lib/components/WhatsAppContactPanel/WhatsAppContactPanel.vue.d.ts +19 -0
- package/lib/components/WhatsAppContactPanel/index.d.ts +1 -0
- package/lib/components/WhatsAppConversation/WhatsAppConversation.d.ts +10 -0
- package/lib/components/WhatsAppConversation/WhatsAppConversation.types.d.ts +163 -0
- package/lib/components/WhatsAppConversation/WhatsAppConversation.vue.d.ts +69 -0
- package/lib/components/WhatsAppConversation/index.d.ts +1 -0
- package/lib/components/WhatsAppConversationHeader/WhatsAppConversationHeader.d.ts +9 -0
- package/lib/components/WhatsAppConversationHeader/WhatsAppConversationHeader.types.d.ts +57 -0
- package/lib/components/WhatsAppConversationHeader/WhatsAppConversationHeader.vue.d.ts +23 -0
- package/lib/components/WhatsAppConversationHeader/index.d.ts +1 -0
- package/lib/components/WhatsAppConversationList/WhatsAppConversationList.d.ts +9 -0
- package/lib/components/WhatsAppConversationList/WhatsAppConversationList.types.d.ts +113 -0
- package/lib/components/WhatsAppConversationList/WhatsAppConversationList.vue.d.ts +35 -0
- package/lib/components/WhatsAppConversationList/index.d.ts +1 -0
- package/lib/components/WhatsAppConversationListItem/WhatsAppConversationListItem.d.ts +9 -0
- package/lib/components/WhatsAppConversationListItem/WhatsAppConversationListItem.types.d.ts +56 -0
- package/lib/components/WhatsAppConversationListItem/WhatsAppConversationListItem.vue.d.ts +21 -0
- package/lib/components/WhatsAppConversationListItem/index.d.ts +1 -0
- package/lib/components/WhatsAppEmojiPicker/WhatsAppEmojiPicker.d.ts +9 -0
- package/lib/components/WhatsAppEmojiPicker/WhatsAppEmojiPicker.types.d.ts +91 -0
- package/lib/components/WhatsAppEmojiPicker/WhatsAppEmojiPicker.vue.d.ts +31 -0
- package/lib/components/WhatsAppEmojiPicker/index.d.ts +1 -0
- package/lib/components/WhatsAppInbox/WhatsAppInbox.d.ts +10 -0
- package/lib/components/WhatsAppInbox/WhatsAppInbox.types.d.ts +135 -0
- package/lib/components/WhatsAppInbox/WhatsAppInbox.vue.d.ts +84 -0
- package/lib/components/WhatsAppInbox/index.d.ts +1 -0
- package/lib/components/WhatsAppInboxDrawer/WhatsAppInboxDrawer.d.ts +9 -0
- package/lib/components/WhatsAppInboxDrawer/WhatsAppInboxDrawer.types.d.ts +52 -0
- package/lib/components/WhatsAppInboxDrawer/WhatsAppInboxDrawer.vue.d.ts +24 -0
- package/lib/components/WhatsAppInboxDrawer/index.d.ts +1 -0
- package/lib/components/WhatsAppInboxModal/WhatsAppInboxModal.d.ts +9 -0
- package/lib/components/WhatsAppInboxModal/WhatsAppInboxModal.types.d.ts +52 -0
- package/lib/components/WhatsAppInboxModal/WhatsAppInboxModal.vue.d.ts +28 -0
- package/lib/components/WhatsAppInboxModal/index.d.ts +1 -0
- package/lib/components/WhatsAppInboxProvider/WhatsAppInboxProvider.d.ts +16 -0
- package/lib/components/WhatsAppInboxProvider/WhatsAppInboxProvider.types.d.ts +16 -0
- package/lib/components/WhatsAppInboxProvider/WhatsAppInboxProvider.vue.d.ts +11 -0
- package/lib/components/WhatsAppInboxProvider/index.d.ts +1 -0
- package/lib/components/WhatsAppInteractiveMessageEditor/WhatsAppInteractiveMessageEditor.d.ts +8 -0
- package/lib/components/WhatsAppInteractiveMessageEditor/WhatsAppInteractiveMessageEditor.types.d.ts +49 -0
- package/lib/components/WhatsAppInteractiveMessageEditor/WhatsAppInteractiveMessageEditor.vue.d.ts +27 -0
- package/lib/components/WhatsAppInteractiveMessageEditor/index.d.ts +1 -0
- package/lib/components/WhatsAppMediaAttachment/WhatsAppMediaAttachment.d.ts +8 -0
- package/lib/components/WhatsAppMediaAttachment/WhatsAppMediaAttachment.types.d.ts +41 -0
- package/lib/components/WhatsAppMediaAttachment/WhatsAppMediaAttachment.vue.d.ts +19 -0
- package/lib/components/WhatsAppMediaAttachment/index.d.ts +1 -0
- package/lib/components/WhatsAppMessage/WhatsAppMessage.d.ts +9 -0
- package/lib/components/WhatsAppMessage/WhatsAppMessage.types.d.ts +46 -0
- package/lib/components/WhatsAppMessage/WhatsAppMessage.vue.d.ts +25 -0
- package/lib/components/WhatsAppMessage/index.d.ts +1 -0
- package/lib/components/WhatsAppMessageBubble/WhatsAppMessageBubble.d.ts +9 -0
- package/lib/components/WhatsAppMessageBubble/WhatsAppMessageBubble.types.d.ts +77 -0
- package/lib/components/WhatsAppMessageBubble/WhatsAppMessageBubble.vue.d.ts +22 -0
- package/lib/components/WhatsAppMessageBubble/index.d.ts +1 -0
- package/lib/components/WhatsAppMessageList/WhatsAppMessageList.d.ts +10 -0
- package/lib/components/WhatsAppMessageList/WhatsAppMessageList.types.d.ts +94 -0
- package/lib/components/WhatsAppMessageList/WhatsAppMessageList.vue.d.ts +39 -0
- package/lib/components/WhatsAppMessageList/index.d.ts +1 -0
- package/lib/components/WhatsAppMessageStatus/WhatsAppMessageStatus.d.ts +7 -0
- package/lib/components/WhatsAppMessageStatus/WhatsAppMessageStatus.types.d.ts +30 -0
- package/lib/components/WhatsAppMessageStatus/WhatsAppMessageStatus.vue.d.ts +24 -0
- package/lib/components/WhatsAppMessageStatus/index.d.ts +1 -0
- package/lib/components/WhatsAppMessagingWindowNotice/WhatsAppMessagingWindowNotice.d.ts +9 -0
- package/lib/components/WhatsAppMessagingWindowNotice/WhatsAppMessagingWindowNotice.types.d.ts +55 -0
- package/lib/components/WhatsAppMessagingWindowNotice/WhatsAppMessagingWindowNotice.vue.d.ts +18 -0
- package/lib/components/WhatsAppMessagingWindowNotice/index.d.ts +1 -0
- package/lib/components/WhatsAppTemplatePreview/WhatsAppTemplatePreview.d.ts +7 -0
- package/lib/components/WhatsAppTemplatePreview/WhatsAppTemplatePreview.types.d.ts +36 -0
- package/lib/components/WhatsAppTemplatePreview/WhatsAppTemplatePreview.vue.d.ts +12 -0
- package/lib/components/WhatsAppTemplatePreview/index.d.ts +1 -0
- package/lib/components/WhatsAppTemplateSelector/WhatsAppTemplateSelector.d.ts +9 -0
- package/lib/components/WhatsAppTemplateSelector/WhatsAppTemplateSelector.types.d.ts +106 -0
- package/lib/components/WhatsAppTemplateSelector/WhatsAppTemplateSelector.vue.d.ts +33 -0
- package/lib/components/WhatsAppTemplateSelector/index.d.ts +1 -0
- package/lib/emoji/emoji-data.d.ts +27 -0
- package/lib/emoji/emoji-filter.d.ts +49 -0
- package/lib/emoji/index.d.ts +4 -0
- package/lib/icons/WhatsAppIcon.vue.d.ts +14 -0
- package/lib/icons/icon-paths.d.ts +43 -0
- package/lib/icons/index.d.ts +3 -0
- package/lib/index.d.mts +29 -0
- package/lib/index.d.ts +29 -0
- package/lib/labels.d.ts +184 -0
- package/lib/types.d.ts +777 -0
- package/lib/utils/capabilities.d.ts +14 -0
- package/lib/utils/format.d.ts +27 -0
- package/lib/utils/index.d.ts +9 -0
- package/lib/utils/media.d.ts +45 -0
- package/lib/utils/messages.d.ts +48 -0
- package/lib/utils/phone.d.ts +18 -0
- package/lib/utils/templates.d.ts +65 -0
- package/package.json +46 -0
- package/styles.css +1504 -0
- package/styles.layer.css +1506 -0
package/README.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# @mantine-vue/whatsapp-inbox
|
|
2
|
+
|
|
3
|
+
Backend-agnostic WhatsApp inbox components for Mantine Vue. The package includes conversation
|
|
4
|
+
lists, message history, templates, interactive messages, media previews, and a capability-driven
|
|
5
|
+
composer in full-page, modal, and drawer layouts.
|
|
6
|
+
|
|
7
|
+
> Mantine Vue is an independent community port of [Mantine](https://mantine.dev/) for Vue 3. It is
|
|
8
|
+
> not affiliated with or endorsed by the Mantine team.
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
yarn add @mantine-vue/whatsapp-inbox @mantine-vue/core @mantine-vue/hooks
|
|
14
|
+
|
|
15
|
+
# or with npm
|
|
16
|
+
npm i @mantine-vue/whatsapp-inbox @mantine-vue/core @mantine-vue/hooks
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Import the extension styles after the core styles:
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import '@mantine-vue/core/styles.css'
|
|
23
|
+
import '@mantine-vue/whatsapp-inbox/styles.css'
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
```vue
|
|
29
|
+
<script setup lang="ts">
|
|
30
|
+
import { ref } from 'vue'
|
|
31
|
+
import { WhatsAppInbox } from '@mantine-vue/whatsapp-inbox'
|
|
32
|
+
import type {
|
|
33
|
+
WhatsAppConversationSummary,
|
|
34
|
+
WhatsAppMessageData,
|
|
35
|
+
WhatsAppOutgoingMessage,
|
|
36
|
+
} from '@mantine-vue/whatsapp-inbox'
|
|
37
|
+
|
|
38
|
+
const conversations = ref<WhatsAppConversationSummary[]>([])
|
|
39
|
+
const messages = ref<WhatsAppMessageData[]>([])
|
|
40
|
+
const selectedConversationId = ref<string | null>(null)
|
|
41
|
+
|
|
42
|
+
function handleSend(payload: WhatsAppOutgoingMessage) {
|
|
43
|
+
api.send(payload)
|
|
44
|
+
}
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<template>
|
|
48
|
+
<WhatsAppInbox
|
|
49
|
+
v-model:selected-conversation-id="selectedConversationId"
|
|
50
|
+
:conversations="conversations"
|
|
51
|
+
:messages="messages"
|
|
52
|
+
style="height: 100dvh"
|
|
53
|
+
@send="handleSend"
|
|
54
|
+
/>
|
|
55
|
+
</template>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
`WhatsAppInbox` fills its container, so the container must have an explicit height.
|
|
59
|
+
|
|
60
|
+
## Integration model
|
|
61
|
+
|
|
62
|
+
The package provides UI only. It does not call the WhatsApp API, fetch conversations, upload
|
|
63
|
+
files, open sockets, or persist data. Your application maps backend data to the exported types,
|
|
64
|
+
passes it through props, handles emitted events, and supplies updated props.
|
|
65
|
+
|
|
66
|
+
Conversation capabilities control which composer actions are available. The backend should report
|
|
67
|
+
the messaging-window state; the package does not infer it from timestamps. File selection and
|
|
68
|
+
validation happen in the composer, while uploads remain the application's responsibility.
|
|
69
|
+
|
|
70
|
+
Selection, filters, drafts, and overlay state support Vue `v-model` bindings. Components also
|
|
71
|
+
provide uncontrolled `default*` props where applicable. All primitives are exported for custom
|
|
72
|
+
layouts, and user-facing labels and date formatters can be configured with
|
|
73
|
+
`WhatsAppInboxProvider`.
|
|
74
|
+
|
|
75
|
+
## Documentation
|
|
76
|
+
|
|
77
|
+
Full API documentation and examples:
|
|
78
|
+
[mantine-vue.dev/whatsapp-inbox/getting-started](https://mantine-vue.dev/whatsapp-inbox/getting-started/)
|
|
79
|
+
|
|
80
|
+
## Peer dependencies
|
|
81
|
+
|
|
82
|
+
- `vue` ^3.5.0
|
|
83
|
+
- `@mantine-vue/core` 3.1.0
|
|
84
|
+
- `@mantine-vue/hooks` 3.1.0
|
|
85
|
+
|
|
86
|
+
## License
|
|
87
|
+
|
|
88
|
+
MIT
|