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