@mobilon-dev/chotto 0.3.84 → 0.3.86
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/dist/chotto.css +1 -1
- package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue2.js +3 -2
- package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue2.js +3 -2
- package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue.js +38 -0
- package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue2.js +4 -0
- package/dist/components/1_atoms/Tooltip/Tooltip.vue.js +1 -1
- package/dist/components/1_atoms/Tooltip/Tooltip.vue2.js +49 -36
- package/dist/components/1_icons/CloseIcon.vue.js +21 -0
- package/dist/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.js +174 -165
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationActions.js +21 -18
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationMenu.js +32 -27
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationSubMenu.js +44 -35
- package/dist/components/2_blocks/FeedSearch/FeedSearch.vue2.js +10 -9
- package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue2.js +8 -7
- package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.js +2 -2
- package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue2.js +48 -37
- package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue2.js +3 -2
- package/dist/components/2_chatinput_elements/ButtonWabaTemplateSelector/ButtonWabaTemplateSelector.vue.js +7 -6
- package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue2.js +3 -2
- package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue2.js +3 -2
- package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue2.js +3 -2
- package/dist/components/2_chatinput_elements/TemplateSelector/TemplateSelector.vue.js +27 -26
- package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue2.js +3 -2
- package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue2.js +3 -2
- package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +3 -2
- package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue2.js +3 -2
- package/dist/components/2_elements/ChannelSelector/ChannelSelector.vue.js +6 -5
- package/dist/components/2_elements/ThemeMode/ThemeMode.vue.js +10 -9
- package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue2.js +3 -2
- package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue.js +1 -1
- package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +169 -143
- package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue.js +4 -4
- package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue2.js +33 -32
- package/dist/components/2_feed_elements/CallMessage/CallMessage.vue2.js +8 -2
- package/dist/components/2_feed_elements/FileMessage/FileMessage.vue.js +3 -3
- package/dist/components/2_feed_elements/FileMessage/FileMessage.vue2.js +134 -108
- package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +1 -1
- package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +116 -97
- package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue2.js +3 -2
- package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue.js +2 -2
- package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue2.js +232 -113
- package/dist/components/2_feed_elements/MessageReactions/composables/usePositioning.js +77 -62
- package/dist/components/2_feed_elements/MessageReactions/composables/useReactions.js +62 -20
- package/dist/components/2_feed_elements/MessageReactions/composables/useReactionsPanel.js +91 -69
- package/dist/components/2_feed_elements/MessageReactions/composables/useReactionsState.js +46 -22
- package/dist/components/2_feed_elements/MessageReactions/icons/ExpandReactionsIcon.vue.js +21 -0
- package/dist/components/2_feed_elements/MessageReactions/icons/ReplyIcon.vue.js +21 -0
- package/dist/components/2_feed_elements/MessageReactions/utils/quickReactions.js +2 -8
- package/dist/components/2_feed_elements/MessageReactions/utils/reactionTooltip.js +39 -0
- package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue2.js +26 -20
- package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue.js +2 -2
- package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue2.js +27 -18
- package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue.js +2 -2
- package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue2.js +16 -15
- package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue.js +3 -3
- package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue2.js +27 -18
- package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue.js +1 -1
- package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue2.js +16 -12
- package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue.js +4 -4
- package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue2.js +74 -65
- package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue.js +1 -1
- package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue2.js +20 -11
- package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue.js +2 -2
- package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue2.js +13 -9
- package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue.js +4 -4
- package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue2.js +74 -55
- package/dist/components/2_feed_elements/TextMessage/TextMessage.vue.js +4 -4
- package/dist/components/2_feed_elements/TextMessage/TextMessage.vue2.js +102 -76
- package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +2 -2
- package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +74 -55
- package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +2 -2
- package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +99 -82
- package/dist/components/3_compounds/Feed/Feed.vue.js +3 -3
- package/dist/components/3_compounds/Feed/Feed.vue2.js +159 -139
- package/dist/components/3_compounds/Feed/composables/useFeedReply.js +22 -25
- package/dist/functions/renderAppleEmojis.js +92 -0
- package/dist/hooks/messages/buildReplyPayload.js +14 -0
- package/dist/hooks/messages/useMessageLinks.js +60 -50
- package/dist/hooks/messages/useStartReply.js +29 -0
- package/dist/hooks/useEmojiNative.js +19 -0
- package/dist/index.js +130 -122
- package/dist/themes/dark.css +1 -1
- package/dist/themes/default.css +1 -1
- package/dist/themes/glass.css +1 -1
- package/dist/themes/green.css +1 -1
- package/dist/themes/mobilon1.css +1 -1
- package/dist/types/apps/data/messages.d.ts +20 -18
- package/dist/types/components/1_atoms/EmojiGlyph/EmojiGlyph.vue.d.ts +12 -0
- package/dist/types/components/1_atoms/Tooltip/stories/Tooltip.stories.d.ts +3 -0
- package/dist/types/components/1_icons/CloseIcon.vue.d.ts +2 -0
- package/dist/types/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.d.ts +2 -0
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationActions.d.ts +3 -1
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationMenu.d.ts +3 -0
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationSubMenu.d.ts +4 -2
- package/dist/types/components/2_blocks/CommunicationPanel/stories/CommunicationPanel.stories.d.ts +1 -0
- package/dist/types/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.d.ts +9 -1
- package/dist/types/components/2_feed_elements/AudioMessage/AudioMessage.vue.d.ts +29 -0
- package/dist/types/components/2_feed_elements/AudioMessage/styles/types.d.ts +24 -16
- package/dist/types/components/2_feed_elements/BaseReplyMessage/styles/types.d.ts +8 -4
- package/dist/types/components/2_feed_elements/FileMessage/FileMessage.vue.d.ts +29 -0
- package/dist/types/components/2_feed_elements/FileMessage/styles/types.d.ts +20 -0
- package/dist/types/components/2_feed_elements/ImageMessage/ImageMessage.vue.d.ts +29 -0
- package/dist/types/components/2_feed_elements/ImageMessage/styles/types.d.ts +2 -0
- package/dist/types/components/2_feed_elements/MessageReactions/MessageReactions.vue.d.ts +64 -1
- package/dist/types/components/2_feed_elements/MessageReactions/composables/index.d.ts +2 -2
- package/dist/types/components/2_feed_elements/MessageReactions/composables/usePositioning.d.ts +11 -1
- package/dist/types/components/2_feed_elements/MessageReactions/composables/useReactions.d.ts +20 -12
- package/dist/types/components/2_feed_elements/MessageReactions/composables/useReactionsPanel.d.ts +3 -3
- package/dist/types/components/2_feed_elements/MessageReactions/composables/useReactionsState.d.ts +13 -22
- package/dist/types/components/2_feed_elements/MessageReactions/icons/ExpandReactionsIcon.vue.d.ts +2 -0
- package/dist/types/components/2_feed_elements/MessageReactions/icons/ReplyIcon.vue.d.ts +2 -0
- package/dist/types/components/2_feed_elements/MessageReactions/styles/types.d.ts +14 -74
- package/dist/types/components/2_feed_elements/MessageReactions/utils/quickReactions.d.ts +1 -1
- package/dist/types/components/2_feed_elements/MessageReactions/utils/reactionTooltip.d.ts +14 -0
- package/dist/types/components/2_feed_elements/ReplyAudioMessage/styles/types.d.ts +6 -0
- package/dist/types/components/2_feed_elements/ReplyCallMessage/styles/types.d.ts +6 -0
- package/dist/types/components/2_feed_elements/ReplyFileMessage/styles/types.d.ts +6 -0
- package/dist/types/components/2_feed_elements/ReplyImageMessage/styles/types.d.ts +6 -0
- package/dist/types/components/2_feed_elements/ReplyStickerMessage/styles/types.d.ts +6 -0
- package/dist/types/components/2_feed_elements/ReplyTextMessage/styles/types.d.ts +4 -0
- package/dist/types/components/2_feed_elements/ReplyVideoMessage/styles/types.d.ts +6 -0
- package/dist/types/components/2_feed_elements/StickerMessage/StickerMessage.vue.d.ts +29 -0
- package/dist/types/components/2_feed_elements/TextMessage/TextMessage.vue.d.ts +29 -0
- package/dist/types/components/2_feed_elements/TextMessage/styles/types.d.ts +22 -0
- package/dist/types/components/2_feed_elements/VideoMessage/VideoMessage.vue.d.ts +29 -0
- package/dist/types/components/2_feed_elements/types/messages.d.ts +11 -6
- package/dist/types/components/3_compounds/ChatInput/styles/types.d.ts +2 -0
- package/dist/types/components/3_compounds/Feed/Feed.vue.d.ts +33 -0
- package/dist/types/functions/renderAppleEmojis.d.ts +16 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/messages/buildReplyPayload.d.ts +11 -0
- package/dist/types/hooks/messages/index.d.ts +2 -0
- package/dist/types/hooks/messages/useStartReply.d.ts +6 -0
- package/dist/types/hooks/useEmojiNative.d.ts +9 -0
- package/package.json +1 -1
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { ref as m, computed as a, watch as
|
|
1
|
+
import { ref as m, computed as a, watch as z, onMounted as ct, onUnmounted as dt, createElementBlock as u, openBlock as l, createCommentVNode as y, unref as n, Fragment as w, renderList as te, normalizeClass as k, createBlock as v, createVNode as ne, createElementVNode as d, withCtx as oe, resolveDynamicComponent as D, toDisplayString as F, normalizeStyle as ft, nextTick as le } from "vue";
|
|
2
2
|
import se from "../../1_atoms/Tooltip/Tooltip.vue.js";
|
|
3
|
-
import { useCommunicationChannels as
|
|
4
|
-
import { useCommunicationMenu as
|
|
5
|
-
import { useCommunicationAttributes as
|
|
6
|
-
import { useCommunicationActions as
|
|
7
|
-
import { useCommunicationSubMenu as
|
|
8
|
-
import { useCommunicationDialogSync as
|
|
9
|
-
import { useCommunicationPlaceholder as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
3
|
+
import { useCommunicationChannels as pt } from "./composables/useCommunicationChannels.js";
|
|
4
|
+
import { useCommunicationMenu as mt } from "./composables/useCommunicationMenu.js";
|
|
5
|
+
import { useCommunicationAttributes as vt, isAttributeBlocked as ht, getAttributeStatusClass as Re, isAttributeConfirming as qe, getSubMenuChannelIndicatorType as yt, getSubMenuChannelIndicatorClass as Ct } from "./composables/useCommunicationAttributes.js";
|
|
6
|
+
import { useCommunicationActions as bt } from "./composables/useCommunicationActions.js";
|
|
7
|
+
import { useCommunicationSubMenu as gt } from "./composables/useCommunicationSubMenu.js";
|
|
8
|
+
import { useCommunicationDialogSync as kt } from "./composables/useCommunicationDialogSync.js";
|
|
9
|
+
import { useCommunicationPlaceholder as It } from "./composables/useCommunicationPlaceholder.js";
|
|
10
|
+
import xe from "./CommunicationPanelAttributeIndicator.vue.js";
|
|
11
|
+
import At from "./icons/CommunicationPanelCheckIcon.vue.js";
|
|
12
|
+
import Tt from "./icons/CommunicationPanelUnconfirmedIcon.vue.js";
|
|
13
|
+
import Mt from "./icons/CommunicationPanelConfirmSpinner.vue.js";
|
|
14
|
+
import St from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
15
15
|
/* empty css */
|
|
16
|
-
const
|
|
16
|
+
const wt = ["data-channel-type", "onClick", "onMouseenter"], Dt = { class: "channel-icon" }, _t = { class: "channel-icon" }, Rt = {
|
|
17
17
|
key: 1,
|
|
18
18
|
class: "attributes-menu"
|
|
19
|
-
},
|
|
19
|
+
}, qt = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "empty-channels-placeholder"
|
|
22
|
-
},
|
|
22
|
+
}, xt = ["data-attribute-status", "onMouseenter", "onClick"], Ot = { class: "attribute-info" }, Pt = { class: "attribute-value" }, Bt = { class: "menu-icon" }, Nt = {
|
|
23
23
|
key: 0,
|
|
24
24
|
class: "menu-icon-arrow"
|
|
25
|
-
},
|
|
25
|
+
}, Et = ["data-attribute-status", "onMouseenter", "onClick"], $t = { class: "attribute-info" }, jt = { class: "attribute-value" }, zt = { class: "menu-icon" }, Ft = {
|
|
26
26
|
key: 0,
|
|
27
27
|
class: "menu-icon-arrow"
|
|
28
|
-
},
|
|
28
|
+
}, Lt = ["onClick"], Ut = { class: "sub-menu-indicator-slot" }, Vt = { class: "sub-menu-title" }, Wt = {
|
|
29
29
|
__name: "CommunicationPanel",
|
|
30
30
|
props: {
|
|
31
31
|
contactAttributes: {
|
|
@@ -136,13 +136,13 @@ const At = ["data-channel-type", "onClick", "onMouseenter"], Tt = { class: "chan
|
|
|
136
136
|
"phone-call",
|
|
137
137
|
"reset-blocked-attributes"
|
|
138
138
|
],
|
|
139
|
-
setup(h, { emit:
|
|
140
|
-
const i = h, ae =
|
|
141
|
-
() => i.confirmingAttributeId ??
|
|
142
|
-
), W = a(() => i.blockedAttributeIds ?? []), M = (e) =>
|
|
139
|
+
setup(h, { expose: Oe, emit: Pe }) {
|
|
140
|
+
const i = h, ae = Pe, L = m(null), Be = m(null), _ = m(null), R = m(null), T = m(null), U = m({}), V = m(null), A = m(!1), q = m(null), C = m(null), x = m(null), b = a(
|
|
141
|
+
() => i.confirmingAttributeId ?? x.value
|
|
142
|
+
), W = a(() => i.blockedAttributeIds ?? []), M = (e) => ht(e, W.value), H = a(() => i.channels ?? []), Ne = a(() => i.channelOrder), Ee = a(() => i.visibleChannelTypes), $e = a(() => i.channelTooltips ?? {}), je = a(() => i.attributeTooltips ?? {}), ie = a(() => i.attributeIndicatorTooltips ?? {}), ue = a(() => i.recentAttributeChannels ?? {}), re = a(() => i.messages ?? []), ze = a(() => i.selectedChat ?? null), ce = a(() => i.isNewDialog ?? !1), de = a(() => {
|
|
143
143
|
var e;
|
|
144
144
|
return ((e = i.selectedDialog) == null ? void 0 : e.channelId) ?? null;
|
|
145
|
-
}),
|
|
145
|
+
}), O = (e, o) => {
|
|
146
146
|
if (!o || !e)
|
|
147
147
|
return !1;
|
|
148
148
|
const t = e.id ?? e.attributeId;
|
|
@@ -151,85 +151,88 @@ const At = ["data-channel-type", "onClick", "onMouseenter"], Tt = { class: "chan
|
|
|
151
151
|
const s = o.includes(".") ? o.split(".").pop() : o;
|
|
152
152
|
return o === t || t === s || t.endsWith(`.${s}`);
|
|
153
153
|
}, fe = (e) => {
|
|
154
|
-
const o =
|
|
154
|
+
const o = je.value, t = (e == null ? void 0 : e.attributeId) ?? (e == null ? void 0 : e.id);
|
|
155
155
|
if (t != null) {
|
|
156
156
|
const s = o[String(t)];
|
|
157
157
|
if (s)
|
|
158
158
|
return s;
|
|
159
159
|
}
|
|
160
160
|
return e != null && e.value ? o[String(e.value)] ?? "" : "";
|
|
161
|
-
},
|
|
162
|
-
panelChannelTypes:
|
|
161
|
+
}, Fe = (e) => !!fe(e), {
|
|
162
|
+
panelChannelTypes: Le,
|
|
163
163
|
channelsTypes: pe,
|
|
164
|
-
getTooltipText:
|
|
164
|
+
getTooltipText: Ue,
|
|
165
165
|
getChannelTypeFromId: Ve,
|
|
166
166
|
hasMultipleChannels: S,
|
|
167
|
-
isChannelActive:
|
|
167
|
+
isChannelActive: P,
|
|
168
168
|
getSingleChannelForType: We,
|
|
169
169
|
getMenuChannelIconComponentForChannelId: He,
|
|
170
170
|
getSingleMenuChannelIconComponent: me,
|
|
171
171
|
getAvailableChannels: ve
|
|
172
|
-
} =
|
|
172
|
+
} = pt({
|
|
173
173
|
channels: H,
|
|
174
|
-
channelTooltips:
|
|
175
|
-
channelOrder:
|
|
176
|
-
visibleChannelTypes:
|
|
174
|
+
channelTooltips: $e,
|
|
175
|
+
channelOrder: Ne,
|
|
176
|
+
visibleChannelTypes: Ee,
|
|
177
177
|
selectedChannelType: T
|
|
178
178
|
}), {
|
|
179
179
|
activeChannelType: r,
|
|
180
180
|
hoveredChannel: B,
|
|
181
|
-
showMenu:
|
|
182
|
-
showSubMenu:
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
181
|
+
showMenu: g,
|
|
182
|
+
showSubMenu: G,
|
|
183
|
+
retainOpenUntilDismiss: Ge,
|
|
184
|
+
handleChannelClick: Je,
|
|
185
|
+
openMenu: Ke,
|
|
186
|
+
closeMenu: N,
|
|
187
|
+
pinMenuOpen: Qe,
|
|
188
|
+
armOutsideClickSuppression: Xe,
|
|
186
189
|
handleClickOutside: he
|
|
187
|
-
} =
|
|
188
|
-
panelRef:
|
|
190
|
+
} = mt({
|
|
191
|
+
panelRef: L,
|
|
189
192
|
selectedChannelType: T,
|
|
190
193
|
frozenAttribute: R
|
|
191
194
|
}), J = a(() => {
|
|
192
195
|
var e;
|
|
193
196
|
return ((e = i.selectedDialog) == null ? void 0 : e.attributeId) ?? null;
|
|
194
197
|
}), ye = a(() => {
|
|
195
|
-
if (!
|
|
198
|
+
if (!g.value || !r.value)
|
|
196
199
|
return null;
|
|
197
200
|
const e = V.value;
|
|
198
201
|
return e && e.channelType === r.value ? e : null;
|
|
199
202
|
}), K = (e) => {
|
|
200
|
-
var
|
|
203
|
+
var _e;
|
|
201
204
|
const o = typeof e == "string" ? e : e == null ? void 0 : e.channelId, t = typeof e == "object" && e != null ? e.backendChannelId : void 0, s = (p, ee) => !p || !ee ? !1 : !!(p === ee || t && (p === t || ee === t)), c = ye.value;
|
|
202
205
|
if (c != null && c.channelId && s(c.channelId, o))
|
|
203
206
|
return !0;
|
|
204
207
|
const f = r.value, I = Q.value;
|
|
205
|
-
if (
|
|
206
|
-
const p = (
|
|
207
|
-
if (p != null && p.channelId && (p != null && p.attributeId) &&
|
|
208
|
+
if (g.value && f && I) {
|
|
209
|
+
const p = (_e = ue.value) == null ? void 0 : _e[f];
|
|
210
|
+
if (p != null && p.channelId && (p != null && p.attributeId) && O(I, p.attributeId) && s(p.channelId, o))
|
|
208
211
|
return !0;
|
|
209
212
|
}
|
|
210
|
-
return
|
|
211
|
-
},
|
|
213
|
+
return g.value && f && I && J.value && O(I, J.value) && s(de.value, o) ? !0 : s(de.value, o);
|
|
214
|
+
}, E = (e) => {
|
|
212
215
|
const o = ye.value;
|
|
213
|
-
return o != null && o.attributeId ?
|
|
214
|
-
}, Q = a(() =>
|
|
216
|
+
return o != null && o.attributeId ? O(e, o.attributeId) : O(e, J.value);
|
|
217
|
+
}, Q = a(() => _.value ?? R.value ?? null), Ce = (e) => {
|
|
215
218
|
const o = e == null ? void 0 : e.backendChannelId;
|
|
216
219
|
return o ? [o] : [];
|
|
217
|
-
}, X = (e) =>
|
|
220
|
+
}, X = (e) => yt(
|
|
218
221
|
Q.value,
|
|
219
222
|
e.channelId,
|
|
220
223
|
K(e),
|
|
221
|
-
|
|
224
|
+
b.value,
|
|
222
225
|
Ce(e)
|
|
223
|
-
),
|
|
226
|
+
), Ye = (e) => Ct(
|
|
224
227
|
Q.value,
|
|
225
228
|
e.channelId,
|
|
226
229
|
K(e),
|
|
227
|
-
|
|
230
|
+
b.value,
|
|
228
231
|
Ce(e)
|
|
229
232
|
) ?? "", Y = a(() => i.contactAttributes ?? []), be = (e) => {
|
|
230
233
|
var c;
|
|
231
234
|
if (!e || !re.value) return !0;
|
|
232
|
-
const o = (c =
|
|
235
|
+
const o = (c = ze.value) == null ? void 0 : c.chatId;
|
|
233
236
|
return o ? !re.value.filter(
|
|
234
237
|
(f) => {
|
|
235
238
|
var I;
|
|
@@ -239,13 +242,13 @@ const At = ["data-channel-type", "onClick", "onMouseenter"], Tt = { class: "chan
|
|
|
239
242
|
(f) => f.type !== "message.system" && f.type !== "message.delimiter" && f.type !== "system" && f.type !== "system_message" && f.type !== "notification"
|
|
240
243
|
) : !0;
|
|
241
244
|
}, ge = () => {
|
|
242
|
-
|
|
245
|
+
$(), A.value = !0, le(() => {
|
|
243
246
|
const e = Array.isArray(C.value) ? C.value[0] : C.value;
|
|
244
247
|
e && typeof e.startAutoShow == "function" ? e.startAutoShow() : console.log("startAutoShow method not found on tooltipRef");
|
|
245
248
|
}), q.value = setTimeout(() => {
|
|
246
249
|
A.value = !1;
|
|
247
250
|
}, 5e3);
|
|
248
|
-
},
|
|
251
|
+
}, $ = () => {
|
|
249
252
|
if (q.value && (clearTimeout(q.value), q.value = null), C.value) {
|
|
250
253
|
const e = Array.isArray(C.value) ? C.value[0] : C.value;
|
|
251
254
|
e && typeof e.clearAutoTimer == "function" && e.clearAutoTimer();
|
|
@@ -253,119 +256,125 @@ const At = ["data-channel-type", "onClick", "onMouseenter"], Tt = { class: "chan
|
|
|
253
256
|
A.value = !1;
|
|
254
257
|
}, {
|
|
255
258
|
organizedContactAttributes: Z,
|
|
256
|
-
organizeContactAttributes:
|
|
259
|
+
organizeContactAttributes: Ze,
|
|
257
260
|
isAttributeFrozen: ke
|
|
258
|
-
} =
|
|
261
|
+
} = vt({
|
|
259
262
|
contactAttributes: Y,
|
|
260
|
-
panelChannelTypes:
|
|
263
|
+
panelChannelTypes: Le,
|
|
261
264
|
frozenAttribute: R
|
|
262
265
|
}), {
|
|
263
|
-
handleAttributeClick:
|
|
264
|
-
selectChannel:
|
|
265
|
-
availableChannels:
|
|
266
|
-
applyRecentChannelButtonSelection:
|
|
266
|
+
handleAttributeClick: et,
|
|
267
|
+
selectChannel: tt,
|
|
268
|
+
availableChannels: nt,
|
|
269
|
+
applyRecentChannelButtonSelection: ot,
|
|
267
270
|
clearPanelPendingSelection: Ie
|
|
268
|
-
} =
|
|
271
|
+
} = bt({
|
|
269
272
|
activeChannelType: r,
|
|
270
273
|
channels: H,
|
|
271
|
-
selectedChannel:
|
|
274
|
+
selectedChannel: U,
|
|
272
275
|
selectedChannelType: T,
|
|
273
|
-
hoveredAttribute:
|
|
274
|
-
confirmingAttributeId:
|
|
276
|
+
hoveredAttribute: _,
|
|
277
|
+
confirmingAttributeId: x,
|
|
275
278
|
isAttributeBlocked: M,
|
|
276
|
-
closeMenu:
|
|
279
|
+
closeMenu: N,
|
|
280
|
+
pinMenuOpen: Qe,
|
|
277
281
|
hasMultipleChannels: S,
|
|
278
282
|
getSingleChannelForType: We,
|
|
279
283
|
getAvailableChannels: ve,
|
|
280
284
|
isChannelEmpty: be,
|
|
281
285
|
isNewDialog: ce,
|
|
282
286
|
showDefaultChannelTooltipWithTimer: ge,
|
|
283
|
-
clearDefaultChannelTooltip:
|
|
287
|
+
clearDefaultChannelTooltip: $,
|
|
284
288
|
emit: ae,
|
|
285
289
|
panelPendingSelection: V
|
|
286
290
|
}), {
|
|
287
|
-
subMenuTop:
|
|
288
|
-
handleAttributeMouseEnter:
|
|
289
|
-
handleAttributeMouseLeave:
|
|
291
|
+
subMenuTop: lt,
|
|
292
|
+
handleAttributeMouseEnter: st,
|
|
293
|
+
handleAttributeMouseLeave: j,
|
|
290
294
|
keepSubMenuOpen: Ae,
|
|
291
295
|
closeSubMenu: Te,
|
|
292
|
-
alignSubMenuWithTarget:
|
|
293
|
-
} =
|
|
296
|
+
alignSubMenuWithTarget: at
|
|
297
|
+
} = gt({
|
|
294
298
|
activeChannelType: r,
|
|
295
|
-
showSubMenu:
|
|
299
|
+
showSubMenu: G,
|
|
296
300
|
frozenAttribute: R,
|
|
297
|
-
hoveredAttribute:
|
|
301
|
+
hoveredAttribute: _,
|
|
302
|
+
confirmingAttributeId: b,
|
|
303
|
+
retainOpenUntilDismiss: Ge,
|
|
298
304
|
hasMultipleChannels: S,
|
|
299
305
|
isAttributeBlocked: M
|
|
300
|
-
}),
|
|
301
|
-
if (
|
|
302
|
-
|
|
306
|
+
}), it = async (e) => {
|
|
307
|
+
if (g.value && r.value === e) {
|
|
308
|
+
N();
|
|
303
309
|
return;
|
|
304
310
|
}
|
|
305
311
|
ae("reset-blocked-attributes");
|
|
306
312
|
const t = T.value !== e;
|
|
307
|
-
|
|
313
|
+
Je(e), t ? (ot(
|
|
308
314
|
e,
|
|
309
315
|
ue.value,
|
|
310
316
|
Z.value
|
|
311
|
-
), await le(),
|
|
317
|
+
), await le(), Ke(e)) : V.value = null;
|
|
312
318
|
};
|
|
313
|
-
|
|
319
|
+
z(g, (e) => {
|
|
314
320
|
e || Ie();
|
|
315
321
|
});
|
|
316
322
|
const Me = (e) => {
|
|
317
|
-
M(e) ||
|
|
323
|
+
M(e) || et(e);
|
|
318
324
|
};
|
|
319
|
-
|
|
325
|
+
kt({
|
|
320
326
|
selectedChannelType: T,
|
|
321
|
-
selectedChannel:
|
|
327
|
+
selectedChannel: U,
|
|
322
328
|
channels: H,
|
|
323
329
|
selectedDialog: a(() => i.selectedDialog ?? null),
|
|
324
330
|
isChannelEmpty: be,
|
|
325
331
|
isNewDialog: ce,
|
|
326
332
|
showDefaultChannelTooltipWithTimer: ge,
|
|
327
|
-
clearDefaultChannelTooltip:
|
|
333
|
+
clearDefaultChannelTooltip: $
|
|
328
334
|
});
|
|
329
335
|
const {
|
|
330
|
-
emptyChannelsPlaceholderText:
|
|
336
|
+
emptyChannelsPlaceholderText: ut,
|
|
331
337
|
shouldShowEmptyChannelsPlaceholder: Se
|
|
332
|
-
} =
|
|
333
|
-
showMenu:
|
|
338
|
+
} = It({
|
|
339
|
+
showMenu: g,
|
|
334
340
|
activeChannelType: r,
|
|
335
341
|
emptyChannelsPlaceholder: a(() => i.emptyChannelsPlaceholder ?? {}),
|
|
336
342
|
getAvailableChannels: ve,
|
|
337
343
|
organizedContactAttributes: Z
|
|
338
344
|
}), we = a(
|
|
339
|
-
() =>
|
|
340
|
-
),
|
|
341
|
-
() =>
|
|
342
|
-
),
|
|
343
|
-
const t =
|
|
344
|
-
await le(), t instanceof HTMLElement &&
|
|
345
|
+
() => nt()
|
|
346
|
+
), rt = a(
|
|
347
|
+
() => G.value && _.value && we.value.length > 0 && r.value !== "phone" && S(r.value)
|
|
348
|
+
), De = async (e, o) => {
|
|
349
|
+
const t = st(e, o.currentTarget);
|
|
350
|
+
await le(), t instanceof HTMLElement && at(L, t);
|
|
345
351
|
};
|
|
346
|
-
return
|
|
347
|
-
e || (
|
|
348
|
-
}),
|
|
349
|
-
const e =
|
|
352
|
+
return z(() => i.confirmingAttributeId, (e, o) => {
|
|
353
|
+
e || (x.value = null, o && Xe());
|
|
354
|
+
}), z(Y, () => {
|
|
355
|
+
const e = b.value;
|
|
350
356
|
if (!e)
|
|
351
357
|
return;
|
|
352
358
|
const o = Y.value.find((t) => t.id === e);
|
|
353
|
-
(o == null ? void 0 : o.status) === "confirmed" && (
|
|
354
|
-
}, { deep: !0 }),
|
|
359
|
+
(o == null ? void 0 : o.status) === "confirmed" && (x.value = null, N());
|
|
360
|
+
}, { deep: !0 }), z(() => i.selectedDialog, () => {
|
|
355
361
|
Ie();
|
|
356
|
-
}, { deep: !0 }),
|
|
357
|
-
document.addEventListener("click", he),
|
|
358
|
-
}),
|
|
359
|
-
document.removeEventListener("click", he),
|
|
362
|
+
}, { deep: !0 }), ct(() => {
|
|
363
|
+
document.addEventListener("click", he), Ze();
|
|
364
|
+
}), dt(() => {
|
|
365
|
+
document.removeEventListener("click", he), $();
|
|
366
|
+
}), Oe({
|
|
367
|
+
/** Снять pin и закрыть оба меню (вызывать с host при ОК на splash). */
|
|
368
|
+
closeMenu: N
|
|
360
369
|
}), (e, o) => (l(), u("div", {
|
|
361
370
|
ref_key: "panelRef",
|
|
362
|
-
ref:
|
|
371
|
+
ref: L,
|
|
363
372
|
class: "communication-panel"
|
|
364
373
|
}, [
|
|
365
374
|
n(pe).length ? (l(), u("div", {
|
|
366
375
|
key: 0,
|
|
367
376
|
ref_key: "channelsPanelRef",
|
|
368
|
-
ref:
|
|
377
|
+
ref: Be,
|
|
369
378
|
class: "channels-panel"
|
|
370
379
|
}, [
|
|
371
380
|
(l(!0), u(w, null, te(n(pe), (t) => {
|
|
@@ -373,22 +382,22 @@ const At = ["data-channel-type", "onClick", "onMouseenter"], Tt = { class: "chan
|
|
|
373
382
|
return l(), u("button", {
|
|
374
383
|
key: t.type,
|
|
375
384
|
"data-channel-type": t.type,
|
|
376
|
-
class:
|
|
377
|
-
active: n(
|
|
378
|
-
hover: n(B) === t.type && !n(
|
|
379
|
-
menuOpen: n(
|
|
385
|
+
class: k(["channel-btn", {
|
|
386
|
+
active: n(P)(t.type),
|
|
387
|
+
hover: n(B) === t.type && !n(P)(t.type) || n(B) === t.type && n(P)(t.type),
|
|
388
|
+
menuOpen: n(g) && n(r) === t.type
|
|
380
389
|
}]),
|
|
381
|
-
onClick: (c) =>
|
|
390
|
+
onClick: (c) => it(t.type),
|
|
382
391
|
onMouseenter: (c) => B.value = t.type,
|
|
383
392
|
onMouseleave: o[0] || (o[0] = (c) => B.value = null)
|
|
384
393
|
}, [
|
|
385
|
-
n(
|
|
394
|
+
n(P)(t.type) ? (l(), u(w, { key: 0 }, [
|
|
386
395
|
ne(se, {
|
|
387
396
|
ref_for: !0,
|
|
388
397
|
ref: (c) => {
|
|
389
398
|
c && (C.value = c);
|
|
390
399
|
},
|
|
391
|
-
text: A.value ? "Выбран канал по умолчанию, можно изменить в настройках профиля" : (s =
|
|
400
|
+
text: A.value ? "Выбран канал по умолчанию, можно изменить в настройках профиля" : (s = U.value) == null ? void 0 : s.title,
|
|
392
401
|
position: "bottom-left",
|
|
393
402
|
offset: 8,
|
|
394
403
|
delay: h.tooltipDelay,
|
|
@@ -397,8 +406,8 @@ const At = ["data-channel-type", "onClick", "onMouseenter"], Tt = { class: "chan
|
|
|
397
406
|
"auto-show-duration": A.value ? 5e3 : 0
|
|
398
407
|
}, {
|
|
399
408
|
default: oe(() => [
|
|
400
|
-
d("span",
|
|
401
|
-
(l(), v(
|
|
409
|
+
d("span", Dt, [
|
|
410
|
+
(l(), v(D(t.component)))
|
|
402
411
|
])
|
|
403
412
|
]),
|
|
404
413
|
_: 2
|
|
@@ -406,28 +415,28 @@ const At = ["data-channel-type", "onClick", "onMouseenter"], Tt = { class: "chan
|
|
|
406
415
|
o[5] || (o[5] = d("span", { class: "active-indicator" }, null, -1))
|
|
407
416
|
], 64)) : (l(), v(se, {
|
|
408
417
|
key: 1,
|
|
409
|
-
text: n(
|
|
418
|
+
text: n(Ue)(t.type),
|
|
410
419
|
position: "bottom-left",
|
|
411
420
|
offset: 8,
|
|
412
421
|
delay: h.tooltipDelay,
|
|
413
422
|
"hide-on-click": ""
|
|
414
423
|
}, {
|
|
415
424
|
default: oe(() => [
|
|
416
|
-
d("span",
|
|
417
|
-
(l(), v(
|
|
425
|
+
d("span", _t, [
|
|
426
|
+
(l(), v(D(t.component)))
|
|
418
427
|
])
|
|
419
428
|
]),
|
|
420
429
|
_: 2
|
|
421
430
|
}, 1032, ["text", "delay"]))
|
|
422
|
-
], 42,
|
|
431
|
+
], 42, wt);
|
|
423
432
|
}), 128))
|
|
424
433
|
], 512)) : y("", !0),
|
|
425
|
-
n(
|
|
426
|
-
n(Se) ? (l(), u("div",
|
|
434
|
+
n(g) && n(r) ? (l(), u("div", Rt, [
|
|
435
|
+
n(Se) ? (l(), u("div", qt, F(n(ut)), 1)) : y("", !0),
|
|
427
436
|
n(Se) ? y("", !0) : (l(!0), u(w, { key: 1 }, te(n(Z)[n(r)], (t) => (l(), u(w, {
|
|
428
437
|
key: t.attributeId
|
|
429
438
|
}, [
|
|
430
|
-
|
|
439
|
+
Fe(t) ? (l(), v(se, {
|
|
431
440
|
key: 0,
|
|
432
441
|
text: fe(t),
|
|
433
442
|
position: "bottom-left",
|
|
@@ -437,107 +446,107 @@ const At = ["data-channel-type", "onClick", "onMouseenter"], Tt = { class: "chan
|
|
|
437
446
|
}, {
|
|
438
447
|
default: oe(() => [
|
|
439
448
|
d("div", {
|
|
440
|
-
class:
|
|
449
|
+
class: k(["attribute-item", n(Re)(t), {
|
|
441
450
|
"frozen-hover": n(ke)(t),
|
|
442
|
-
selected:
|
|
443
|
-
confirming: n(qe)(t,
|
|
451
|
+
selected: E(t),
|
|
452
|
+
confirming: n(qe)(t, b.value),
|
|
444
453
|
blocked: M(t)
|
|
445
454
|
}]),
|
|
446
455
|
"data-attribute-status": t.status,
|
|
447
|
-
onMouseenter: (s) =>
|
|
448
|
-
onMouseleave: o[1] || (o[1] = (...s) => n(
|
|
456
|
+
onMouseenter: (s) => De(t, s),
|
|
457
|
+
onMouseleave: o[1] || (o[1] = (...s) => n(j) && n(j)(...s)),
|
|
449
458
|
onClick: (s) => Me(t)
|
|
450
459
|
}, [
|
|
451
|
-
d("div",
|
|
452
|
-
ne(
|
|
460
|
+
d("div", Ot, [
|
|
461
|
+
ne(xe, {
|
|
453
462
|
attribute: t,
|
|
454
|
-
"is-selected":
|
|
455
|
-
"confirming-attribute-id":
|
|
463
|
+
"is-selected": E(t),
|
|
464
|
+
"confirming-attribute-id": b.value,
|
|
456
465
|
"blocked-attribute-ids": W.value,
|
|
457
466
|
"indicator-tooltips": ie.value,
|
|
458
467
|
"tooltip-delay": h.tooltipDelay
|
|
459
468
|
}, null, 8, ["attribute", "is-selected", "confirming-attribute-id", "blocked-attribute-ids", "indicator-tooltips", "tooltip-delay"]),
|
|
460
|
-
d("span",
|
|
469
|
+
d("span", Pt, F(t.value), 1)
|
|
461
470
|
]),
|
|
462
|
-
d("span",
|
|
463
|
-
n(S)(n(r)) ? (l(), u("span",
|
|
471
|
+
d("span", Bt, [
|
|
472
|
+
n(S)(n(r)) ? (l(), u("span", Nt)) : h.showChannelIcons ? (l(), u("span", {
|
|
464
473
|
key: 1,
|
|
465
|
-
class:
|
|
474
|
+
class: k(["channel-icon-small", { "menu-icon-grey": n(r) !== "sms" }])
|
|
466
475
|
}, [
|
|
467
|
-
(l(), v(
|
|
476
|
+
(l(), v(D(n(me)(n(r)))))
|
|
468
477
|
], 2)) : y("", !0)
|
|
469
478
|
])
|
|
470
|
-
], 42,
|
|
479
|
+
], 42, xt)
|
|
471
480
|
]),
|
|
472
481
|
_: 2
|
|
473
482
|
}, 1032, ["text", "delay"])) : (l(), u("div", {
|
|
474
483
|
key: 1,
|
|
475
|
-
class:
|
|
484
|
+
class: k(["attribute-item", n(Re)(t), {
|
|
476
485
|
"frozen-hover": n(ke)(t),
|
|
477
|
-
selected:
|
|
478
|
-
confirming: n(qe)(t,
|
|
486
|
+
selected: E(t),
|
|
487
|
+
confirming: n(qe)(t, b.value),
|
|
479
488
|
blocked: M(t)
|
|
480
489
|
}]),
|
|
481
490
|
"data-attribute-status": t.status,
|
|
482
|
-
onMouseenter: (s) =>
|
|
483
|
-
onMouseleave: o[2] || (o[2] = (...s) => n(
|
|
491
|
+
onMouseenter: (s) => De(t, s),
|
|
492
|
+
onMouseleave: o[2] || (o[2] = (...s) => n(j) && n(j)(...s)),
|
|
484
493
|
onClick: (s) => Me(t)
|
|
485
494
|
}, [
|
|
486
|
-
d("div",
|
|
487
|
-
ne(
|
|
495
|
+
d("div", $t, [
|
|
496
|
+
ne(xe, {
|
|
488
497
|
attribute: t,
|
|
489
|
-
"is-selected":
|
|
490
|
-
"confirming-attribute-id":
|
|
498
|
+
"is-selected": E(t),
|
|
499
|
+
"confirming-attribute-id": b.value,
|
|
491
500
|
"blocked-attribute-ids": W.value,
|
|
492
501
|
"indicator-tooltips": ie.value,
|
|
493
502
|
"tooltip-delay": h.tooltipDelay
|
|
494
503
|
}, null, 8, ["attribute", "is-selected", "confirming-attribute-id", "blocked-attribute-ids", "indicator-tooltips", "tooltip-delay"]),
|
|
495
|
-
d("span",
|
|
504
|
+
d("span", jt, F(t.value), 1)
|
|
496
505
|
]),
|
|
497
|
-
d("span",
|
|
498
|
-
n(S)(n(r)) ? (l(), u("span",
|
|
506
|
+
d("span", zt, [
|
|
507
|
+
n(S)(n(r)) ? (l(), u("span", Ft)) : h.showChannelIcons ? (l(), u("span", {
|
|
499
508
|
key: 1,
|
|
500
|
-
class:
|
|
509
|
+
class: k(["channel-icon-small", { "menu-icon-grey": n(r) !== "sms" }])
|
|
501
510
|
}, [
|
|
502
|
-
(l(), v(
|
|
511
|
+
(l(), v(D(n(me)(n(r)))))
|
|
503
512
|
], 2)) : y("", !0)
|
|
504
513
|
])
|
|
505
|
-
], 42,
|
|
514
|
+
], 42, Et))
|
|
506
515
|
], 64))), 128)),
|
|
507
|
-
n(
|
|
516
|
+
n(G) && rt.value ? (l(), u("div", {
|
|
508
517
|
key: 2,
|
|
509
518
|
class: "sub-menu left",
|
|
510
|
-
style:
|
|
519
|
+
style: ft({ top: n(lt) + "px" }),
|
|
511
520
|
onMouseenter: o[3] || (o[3] = (...t) => n(Ae) && n(Ae)(...t)),
|
|
512
521
|
onMouseleave: o[4] || (o[4] = (...t) => n(Te) && n(Te)(...t))
|
|
513
522
|
}, [
|
|
514
523
|
o[6] || (o[6] = d("div", { class: "sub-menu-header" }, " Канал связи ", -1)),
|
|
515
524
|
(l(!0), u(w, null, te(we.value, (t) => (l(), u("div", {
|
|
516
525
|
key: t.channelId,
|
|
517
|
-
class:
|
|
518
|
-
onClick: (s) => n(
|
|
526
|
+
class: k(["sub-menu-item", { selected: K(t) }]),
|
|
527
|
+
onClick: (s) => n(tt)(t.channelId)
|
|
519
528
|
}, [
|
|
520
|
-
d("span",
|
|
529
|
+
d("span", Ut, [
|
|
521
530
|
X(t) ? (l(), u("span", {
|
|
522
531
|
key: 0,
|
|
523
|
-
class:
|
|
532
|
+
class: k(Ye(t))
|
|
524
533
|
}, [
|
|
525
|
-
X(t) === "spinner" ? (l(), v(n(
|
|
534
|
+
X(t) === "spinner" ? (l(), v(n(Mt), { key: 0 })) : X(t) === "unconfirmed" ? (l(), v(n(Tt), { key: 1 })) : (l(), v(n(At), { key: 2 }))
|
|
526
535
|
], 2)) : y("", !0)
|
|
527
536
|
]),
|
|
528
|
-
d("span",
|
|
537
|
+
d("span", Vt, F(t.title || t.channelId), 1),
|
|
529
538
|
h.showChannelIcons ? (l(), u("span", {
|
|
530
539
|
key: 0,
|
|
531
|
-
class:
|
|
540
|
+
class: k(["sub-menu-icon", { "menu-icon-grey": n(Ve)(t.channelId) !== "sms" }])
|
|
532
541
|
}, [
|
|
533
|
-
(l(), v(
|
|
542
|
+
(l(), v(D(n(He)(t.channelId))))
|
|
534
543
|
], 2)) : y("", !0)
|
|
535
|
-
], 10,
|
|
544
|
+
], 10, Lt))), 128))
|
|
536
545
|
], 36)) : y("", !0)
|
|
537
546
|
])) : y("", !0)
|
|
538
547
|
], 512));
|
|
539
548
|
}
|
|
540
|
-
},
|
|
549
|
+
}, un = /* @__PURE__ */ St(Wt, [["__scopeId", "data-v-bcd57170"]]);
|
|
541
550
|
export {
|
|
542
|
-
|
|
551
|
+
un as default
|
|
543
552
|
};
|