@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.
Files changed (111) hide show
  1. package/README.md +88 -0
  2. package/cjs/index.cjs +11842 -0
  3. package/cjs/index.cjs.map +1 -0
  4. package/esm/index.mjs +11704 -0
  5. package/esm/index.mjs.map +1 -0
  6. package/lib/WhatsAppInbox.context.d.ts +70 -0
  7. package/lib/component-props.d.ts +138 -0
  8. package/lib/components/WhatsAppAttachmentPreview/WhatsAppAttachmentPreview.d.ts +8 -0
  9. package/lib/components/WhatsAppAttachmentPreview/WhatsAppAttachmentPreview.types.d.ts +33 -0
  10. package/lib/components/WhatsAppAttachmentPreview/WhatsAppAttachmentPreview.vue.d.ts +19 -0
  11. package/lib/components/WhatsAppAttachmentPreview/index.d.ts +1 -0
  12. package/lib/components/WhatsAppComposer/WhatsAppComposer.d.ts +10 -0
  13. package/lib/components/WhatsAppComposer/WhatsAppComposer.types.d.ts +173 -0
  14. package/lib/components/WhatsAppComposer/WhatsAppComposer.vue.d.ts +52 -0
  15. package/lib/components/WhatsAppComposer/index.d.ts +1 -0
  16. package/lib/components/WhatsAppContactPanel/WhatsAppContactPanel.d.ts +9 -0
  17. package/lib/components/WhatsAppContactPanel/WhatsAppContactPanel.types.d.ts +40 -0
  18. package/lib/components/WhatsAppContactPanel/WhatsAppContactPanel.vue.d.ts +19 -0
  19. package/lib/components/WhatsAppContactPanel/index.d.ts +1 -0
  20. package/lib/components/WhatsAppConversation/WhatsAppConversation.d.ts +10 -0
  21. package/lib/components/WhatsAppConversation/WhatsAppConversation.types.d.ts +163 -0
  22. package/lib/components/WhatsAppConversation/WhatsAppConversation.vue.d.ts +69 -0
  23. package/lib/components/WhatsAppConversation/index.d.ts +1 -0
  24. package/lib/components/WhatsAppConversationHeader/WhatsAppConversationHeader.d.ts +9 -0
  25. package/lib/components/WhatsAppConversationHeader/WhatsAppConversationHeader.types.d.ts +57 -0
  26. package/lib/components/WhatsAppConversationHeader/WhatsAppConversationHeader.vue.d.ts +23 -0
  27. package/lib/components/WhatsAppConversationHeader/index.d.ts +1 -0
  28. package/lib/components/WhatsAppConversationList/WhatsAppConversationList.d.ts +9 -0
  29. package/lib/components/WhatsAppConversationList/WhatsAppConversationList.types.d.ts +113 -0
  30. package/lib/components/WhatsAppConversationList/WhatsAppConversationList.vue.d.ts +35 -0
  31. package/lib/components/WhatsAppConversationList/index.d.ts +1 -0
  32. package/lib/components/WhatsAppConversationListItem/WhatsAppConversationListItem.d.ts +9 -0
  33. package/lib/components/WhatsAppConversationListItem/WhatsAppConversationListItem.types.d.ts +56 -0
  34. package/lib/components/WhatsAppConversationListItem/WhatsAppConversationListItem.vue.d.ts +21 -0
  35. package/lib/components/WhatsAppConversationListItem/index.d.ts +1 -0
  36. package/lib/components/WhatsAppEmojiPicker/WhatsAppEmojiPicker.d.ts +9 -0
  37. package/lib/components/WhatsAppEmojiPicker/WhatsAppEmojiPicker.types.d.ts +91 -0
  38. package/lib/components/WhatsAppEmojiPicker/WhatsAppEmojiPicker.vue.d.ts +31 -0
  39. package/lib/components/WhatsAppEmojiPicker/index.d.ts +1 -0
  40. package/lib/components/WhatsAppInbox/WhatsAppInbox.d.ts +10 -0
  41. package/lib/components/WhatsAppInbox/WhatsAppInbox.types.d.ts +135 -0
  42. package/lib/components/WhatsAppInbox/WhatsAppInbox.vue.d.ts +84 -0
  43. package/lib/components/WhatsAppInbox/index.d.ts +1 -0
  44. package/lib/components/WhatsAppInboxDrawer/WhatsAppInboxDrawer.d.ts +9 -0
  45. package/lib/components/WhatsAppInboxDrawer/WhatsAppInboxDrawer.types.d.ts +52 -0
  46. package/lib/components/WhatsAppInboxDrawer/WhatsAppInboxDrawer.vue.d.ts +24 -0
  47. package/lib/components/WhatsAppInboxDrawer/index.d.ts +1 -0
  48. package/lib/components/WhatsAppInboxModal/WhatsAppInboxModal.d.ts +9 -0
  49. package/lib/components/WhatsAppInboxModal/WhatsAppInboxModal.types.d.ts +52 -0
  50. package/lib/components/WhatsAppInboxModal/WhatsAppInboxModal.vue.d.ts +28 -0
  51. package/lib/components/WhatsAppInboxModal/index.d.ts +1 -0
  52. package/lib/components/WhatsAppInboxProvider/WhatsAppInboxProvider.d.ts +16 -0
  53. package/lib/components/WhatsAppInboxProvider/WhatsAppInboxProvider.types.d.ts +16 -0
  54. package/lib/components/WhatsAppInboxProvider/WhatsAppInboxProvider.vue.d.ts +11 -0
  55. package/lib/components/WhatsAppInboxProvider/index.d.ts +1 -0
  56. package/lib/components/WhatsAppInteractiveMessageEditor/WhatsAppInteractiveMessageEditor.d.ts +8 -0
  57. package/lib/components/WhatsAppInteractiveMessageEditor/WhatsAppInteractiveMessageEditor.types.d.ts +49 -0
  58. package/lib/components/WhatsAppInteractiveMessageEditor/WhatsAppInteractiveMessageEditor.vue.d.ts +27 -0
  59. package/lib/components/WhatsAppInteractiveMessageEditor/index.d.ts +1 -0
  60. package/lib/components/WhatsAppMediaAttachment/WhatsAppMediaAttachment.d.ts +8 -0
  61. package/lib/components/WhatsAppMediaAttachment/WhatsAppMediaAttachment.types.d.ts +41 -0
  62. package/lib/components/WhatsAppMediaAttachment/WhatsAppMediaAttachment.vue.d.ts +19 -0
  63. package/lib/components/WhatsAppMediaAttachment/index.d.ts +1 -0
  64. package/lib/components/WhatsAppMessage/WhatsAppMessage.d.ts +9 -0
  65. package/lib/components/WhatsAppMessage/WhatsAppMessage.types.d.ts +46 -0
  66. package/lib/components/WhatsAppMessage/WhatsAppMessage.vue.d.ts +25 -0
  67. package/lib/components/WhatsAppMessage/index.d.ts +1 -0
  68. package/lib/components/WhatsAppMessageBubble/WhatsAppMessageBubble.d.ts +9 -0
  69. package/lib/components/WhatsAppMessageBubble/WhatsAppMessageBubble.types.d.ts +77 -0
  70. package/lib/components/WhatsAppMessageBubble/WhatsAppMessageBubble.vue.d.ts +22 -0
  71. package/lib/components/WhatsAppMessageBubble/index.d.ts +1 -0
  72. package/lib/components/WhatsAppMessageList/WhatsAppMessageList.d.ts +10 -0
  73. package/lib/components/WhatsAppMessageList/WhatsAppMessageList.types.d.ts +94 -0
  74. package/lib/components/WhatsAppMessageList/WhatsAppMessageList.vue.d.ts +39 -0
  75. package/lib/components/WhatsAppMessageList/index.d.ts +1 -0
  76. package/lib/components/WhatsAppMessageStatus/WhatsAppMessageStatus.d.ts +7 -0
  77. package/lib/components/WhatsAppMessageStatus/WhatsAppMessageStatus.types.d.ts +30 -0
  78. package/lib/components/WhatsAppMessageStatus/WhatsAppMessageStatus.vue.d.ts +24 -0
  79. package/lib/components/WhatsAppMessageStatus/index.d.ts +1 -0
  80. package/lib/components/WhatsAppMessagingWindowNotice/WhatsAppMessagingWindowNotice.d.ts +9 -0
  81. package/lib/components/WhatsAppMessagingWindowNotice/WhatsAppMessagingWindowNotice.types.d.ts +55 -0
  82. package/lib/components/WhatsAppMessagingWindowNotice/WhatsAppMessagingWindowNotice.vue.d.ts +18 -0
  83. package/lib/components/WhatsAppMessagingWindowNotice/index.d.ts +1 -0
  84. package/lib/components/WhatsAppTemplatePreview/WhatsAppTemplatePreview.d.ts +7 -0
  85. package/lib/components/WhatsAppTemplatePreview/WhatsAppTemplatePreview.types.d.ts +36 -0
  86. package/lib/components/WhatsAppTemplatePreview/WhatsAppTemplatePreview.vue.d.ts +12 -0
  87. package/lib/components/WhatsAppTemplatePreview/index.d.ts +1 -0
  88. package/lib/components/WhatsAppTemplateSelector/WhatsAppTemplateSelector.d.ts +9 -0
  89. package/lib/components/WhatsAppTemplateSelector/WhatsAppTemplateSelector.types.d.ts +106 -0
  90. package/lib/components/WhatsAppTemplateSelector/WhatsAppTemplateSelector.vue.d.ts +33 -0
  91. package/lib/components/WhatsAppTemplateSelector/index.d.ts +1 -0
  92. package/lib/emoji/emoji-data.d.ts +27 -0
  93. package/lib/emoji/emoji-filter.d.ts +49 -0
  94. package/lib/emoji/index.d.ts +4 -0
  95. package/lib/icons/WhatsAppIcon.vue.d.ts +14 -0
  96. package/lib/icons/icon-paths.d.ts +43 -0
  97. package/lib/icons/index.d.ts +3 -0
  98. package/lib/index.d.mts +29 -0
  99. package/lib/index.d.ts +29 -0
  100. package/lib/labels.d.ts +184 -0
  101. package/lib/types.d.ts +777 -0
  102. package/lib/utils/capabilities.d.ts +14 -0
  103. package/lib/utils/format.d.ts +27 -0
  104. package/lib/utils/index.d.ts +9 -0
  105. package/lib/utils/media.d.ts +45 -0
  106. package/lib/utils/messages.d.ts +48 -0
  107. package/lib/utils/phone.d.ts +18 -0
  108. package/lib/utils/templates.d.ts +65 -0
  109. package/package.json +46 -0
  110. package/styles.css +1504 -0
  111. 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