@mantine-vue/whatsapp-inbox 3.6.0 → 3.7.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/cjs/index.cjs CHANGED
@@ -7697,6 +7697,7 @@ var WhatsAppComposer_default = /* @__PURE__ */ (0, vue.defineComponent)({
7697
7697
  const showAttachments = (0, vue.computed)(() => props.withAttachments ?? capabilities.value.canSendMedia);
7698
7698
  const showTemplates = (0, vue.computed)(() => props.withTemplates ?? capabilities.value.canSendTemplates);
7699
7699
  const useCustomPicker = (0, vue.computed)(() => Boolean(slots.emojiPicker));
7700
+ const useCustomTemplateSelector = (0, vue.computed)(() => Boolean(slots.templateSelector));
7700
7701
  const useBuiltInPicker = (0, vue.computed)(() => !useCustomPicker.value && props.withEmojiPicker !== false);
7701
7702
  const showEmoji = (0, vue.computed)(() => (props.withEmoji ?? capabilities.value.canUseEmoji) && (useCustomPicker.value || useBuiltInPicker.value));
7702
7703
  const showInteractive = (0, vue.computed)(() => props.withInteractive ?? (capabilities.value.canSendInteractive && capabilities.value.interactiveTypes.length > 0));
@@ -8111,7 +8112,16 @@ var WhatsAppComposer_default = /* @__PURE__ */ (0, vue.defineComponent)({
8111
8112
  }, 16, ["data-exceeded"])]),
8112
8113
  _: 1
8113
8114
  }, 16)) : (0, vue.createCommentVNode)("", true),
8114
- (0, vue.createVNode)((0, vue.unref)(_mantine_vue_core.Modal), (0, vue.mergeProps)((0, vue.unref)(props).templateModalProps, {
8115
+ useCustomTemplateSelector.value ? (0, vue.renderSlot)(_ctx.$slots, "templateSelector", {
8116
+ key: 5,
8117
+ opened: Boolean((0, vue.unref)(templatesOpened)),
8118
+ close: () => (0, vue.unref)(setTemplatesOpened)(false),
8119
+ submit: submitTemplate,
8120
+ templates: (0, vue.unref)(props).templates ?? [],
8121
+ loading: Boolean((0, vue.unref)(props).templatesLoading),
8122
+ error: (0, vue.unref)(props).templatesError,
8123
+ retryLoad: () => emit("templatesRetryLoad")
8124
+ }) : ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_mantine_vue_core.Modal), (0, vue.mergeProps)({ key: 6 }, (0, vue.unref)(props).templateModalProps, {
8115
8125
  opened: (0, vue.unref)(templatesOpened),
8116
8126
  title: (0, vue.unref)(config).labels.templateSelectorTitle,
8117
8127
  size: "lg",
@@ -8141,7 +8151,7 @@ var WhatsAppComposer_default = /* @__PURE__ */ (0, vue.defineComponent)({
8141
8151
  "unstyled"
8142
8152
  ])]),
8143
8153
  _: 3
8144
- }, 16, ["opened", "title"]),
8154
+ }, 16, ["opened", "title"])),
8145
8155
  (0, vue.createVNode)((0, vue.unref)(_mantine_vue_core.Modal), (0, vue.mergeProps)((0, vue.unref)(props).interactiveModalProps, {
8146
8156
  opened: (0, vue.unref)(interactiveOpened),
8147
8157
  title: (0, vue.unref)(config).labels.interactiveTitle,
@@ -9189,18 +9199,18 @@ var WhatsAppMessage_default = /* @__PURE__ */ (0, vue.defineComponent)({
9189
9199
  //#region src/components/WhatsAppMessage/WhatsAppMessage.ts
9190
9200
  var WhatsAppMessage = (0, _mantine_vue_core.factory)(WhatsAppMessage_default, { classes: WhatsAppMessage_module_default });
9191
9201
  var WhatsAppMessageList_module_default = {
9192
- messageListRoot: "_messageListRoot_1efgx_1",
9193
- messageListScrollArea: "_messageListScrollArea_1efgx_10",
9194
- messageListContent: "_messageListContent_1efgx_15",
9195
- messageListItems: "_messageListItems_1efgx_24",
9196
- messageListGroup: "_messageListGroup_1efgx_37",
9197
- messageListGroupItems: "_messageListGroupItems_1efgx_42",
9198
- messageListItem: "_messageListItem_1efgx_24",
9199
- messageListDayDivider: "_messageListDayDivider_1efgx_60",
9200
- messageListDayLabel: "_messageListDayLabel_1efgx_69",
9201
- messageListLoadOlder: "_messageListLoadOlder_1efgx_78",
9202
- messageListState: "_messageListState_1efgx_84",
9203
- messageListScrollToBottom: "_messageListScrollToBottom_1efgx_95"
9202
+ messageListRoot: "_messageListRoot_1xgoq_1",
9203
+ messageListScrollArea: "_messageListScrollArea_1xgoq_10",
9204
+ messageListContent: "_messageListContent_1xgoq_15",
9205
+ messageListItems: "_messageListItems_1xgoq_24",
9206
+ messageListGroup: "_messageListGroup_1xgoq_37",
9207
+ messageListGroupItems: "_messageListGroupItems_1xgoq_42",
9208
+ messageListItem: "_messageListItem_1xgoq_24",
9209
+ messageListDayDivider: "_messageListDayDivider_1xgoq_60",
9210
+ messageListDayLabel: "_messageListDayLabel_1xgoq_69",
9211
+ messageListLoadOlder: "_messageListLoadOlder_1xgoq_78",
9212
+ messageListState: "_messageListState_1xgoq_84",
9213
+ messageListScrollToBottom: "_messageListScrollToBottom_1xgoq_95"
9204
9214
  };
9205
9215
  //#endregion
9206
9216
  //#region src/components/WhatsAppMessageList/WhatsAppMessageList.vue?vue&type=script&setup=true&lang.ts
@@ -9986,6 +9996,11 @@ var WhatsAppConversation_default = /* @__PURE__ */ (0, vue.defineComponent)({
9986
9996
  name: "templatePreview",
9987
9997
  fn: (0, vue.withCtx)((templateProps) => [(0, vue.renderSlot)(_ctx.$slots, "templatePreview", (0, vue.normalizeProps)((0, vue.guardReactiveProps)(templateProps)))]),
9988
9998
  key: "5"
9999
+ } : void 0,
10000
+ (0, vue.unref)(slots).templateSelector ? {
10001
+ name: "templateSelector",
10002
+ fn: (0, vue.withCtx)((selectorProps) => [(0, vue.renderSlot)(_ctx.$slots, "templateSelector", (0, vue.normalizeProps)((0, vue.guardReactiveProps)(selectorProps)))]),
10003
+ key: "6"
9989
10004
  } : void 0
9990
10005
  ]), 1040, [
9991
10006
  "conversation-id",
@@ -11223,6 +11238,11 @@ var WhatsAppInbox_default = /* @__PURE__ */ (0, vue.defineComponent)({
11223
11238
  name: "templatePreview",
11224
11239
  fn: (0, vue.withCtx)((templateProps) => [(0, vue.renderSlot)(_ctx.$slots, "templatePreview", (0, vue.normalizeProps)((0, vue.guardReactiveProps)(templateProps)))]),
11225
11240
  key: "14"
11241
+ } : void 0,
11242
+ (0, vue.unref)(slots).templateSelector ? {
11243
+ name: "templateSelector",
11244
+ fn: (0, vue.withCtx)((selectorProps) => [(0, vue.renderSlot)(_ctx.$slots, "templateSelector", (0, vue.normalizeProps)((0, vue.guardReactiveProps)(selectorProps)))]),
11245
+ key: "15"
11226
11246
  } : void 0
11227
11247
  ]), 1032, [
11228
11248
  "conversation",
@@ -11311,9 +11331,9 @@ var WhatsAppInbox_default = /* @__PURE__ */ (0, vue.defineComponent)({
11311
11331
  //#region src/components/WhatsAppInbox/WhatsAppInbox.ts
11312
11332
  var WhatsAppInbox = (0, _mantine_vue_core.factory)(WhatsAppInbox_default, { classes: WhatsAppInbox_module_default });
11313
11333
  var WhatsAppInboxModal_module_default = {
11314
- modalRoot: "_modalRoot_1mb1l_1",
11315
- modalContent: "_modalContent_1mb1l_9",
11316
- modalBody: "_modalBody_1mb1l_14"
11334
+ modalRoot: "_modalRoot_1xrov_1",
11335
+ modalContent: "_modalContent_1xrov_9",
11336
+ modalBody: "_modalBody_1xrov_14"
11317
11337
  };
11318
11338
  //#endregion
11319
11339
  //#region src/components/WhatsAppInboxModal/WhatsAppInboxModal.vue?vue&type=script&setup=true&lang.ts
@@ -11484,7 +11504,7 @@ var WhatsAppInboxModal_default = /* @__PURE__ */ (0, vue.defineComponent)({
11484
11504
  return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_mantine_vue_core.Modal), (0, vue.mergeProps)((0, vue.unref)(props).modalProps, {
11485
11505
  opened: Boolean((0, vue.unref)(props).opened),
11486
11506
  title: title.value,
11487
- size: "lg",
11507
+ size: (0, vue.unref)(props).modalProps?.size ?? "lg",
11488
11508
  class: (0, vue.unref)(getStyles)("modalRoot").class,
11489
11509
  style: (0, vue.unref)(getStyles)("modalRoot").style,
11490
11510
  "class-names": {
@@ -11522,6 +11542,7 @@ var WhatsAppInboxModal_default = /* @__PURE__ */ (0, vue.defineComponent)({
11522
11542
  }, 16, [
11523
11543
  "opened",
11524
11544
  "title",
11545
+ "size",
11525
11546
  "class",
11526
11547
  "style",
11527
11548
  "class-names",