@mobilon-dev/chotto 0.3.75 → 0.3.77
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/2_blocks/CommunicationPanel/CommunicationPanel.vue.js +344 -295
- package/dist/components/2_blocks/CommunicationPanel/CommunicationPanelAttributeIndicator.vue.js +88 -0
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationActions.js +65 -32
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationAttributes.js +84 -28
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationChannels.js +8 -7
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationMenu.js +16 -21
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationSubMenu.js +10 -9
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelCheckIcon.vue.js +1 -1
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelConfirmSpinner.vue2.js +15 -0
- package/dist/hooks/validators/chats/chatValidator.js +13 -9
- 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/chats.d.ts +10 -0
- package/dist/types/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.d.ts +7 -1
- package/dist/types/components/2_blocks/CommunicationPanel/CommunicationPanelAttributeIndicator.vue.d.ts +15 -0
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationActions.d.ts +5 -2
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationAttributes.d.ts +41 -0
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationMenu.d.ts +2 -7
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationSubMenu.d.ts +2 -1
- package/dist/types/components/2_blocks/CommunicationPanel/icons/CommunicationPanelConfirmSpinner.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 +7 -1
- package/dist/types/components/2_blocks/CommunicationPanel/styles/types.d.ts +30 -0
- package/dist/types/hooks/validators/chats/types.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,34 +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 Ue from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
1
|
+
import { ref as m, computed as u, watch as H, onMounted as Ve, onUnmounted as He, resolveComponent as We, createElementBlock as l, openBlock as s, createElementVNode as f, createCommentVNode as h, Fragment as A, renderList as W, unref as n, normalizeClass as v, createBlock as y, createVNode as P, withCtx as U, resolveDynamicComponent as I, toDisplayString as E, normalizeStyle as Ue, nextTick as he } from "vue";
|
|
2
|
+
import G from "../../1_atoms/Tooltip/Tooltip.vue.js";
|
|
3
|
+
import { useCommunicationChannels as Ge } from "./composables/useCommunicationChannels.js";
|
|
4
|
+
import { useCommunicationMenu as Je } from "./composables/useCommunicationMenu.js";
|
|
5
|
+
import { useCommunicationAttributes as Ke, isAttributeBlocked as Qe, getAttributeStatusClass as ve, isAttributeConfirming as ye } from "./composables/useCommunicationAttributes.js";
|
|
6
|
+
import { useCommunicationActions as Xe } from "./composables/useCommunicationActions.js";
|
|
7
|
+
import { useCommunicationSubMenu as Ye } from "./composables/useCommunicationSubMenu.js";
|
|
8
|
+
import { useCommunicationDialogSync as Ze } from "./composables/useCommunicationDialogSync.js";
|
|
9
|
+
import { useCommunicationPlaceholder as et } from "./composables/useCommunicationPlaceholder.js";
|
|
10
|
+
import Ce from "./CommunicationPanelAttributeIndicator.vue.js";
|
|
12
11
|
/* empty css */
|
|
13
|
-
|
|
12
|
+
import tt from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
13
|
+
const nt = ["onClick", "onMouseenter"], ot = { class: "channel-icon" }, st = { class: "channel-icon" }, lt = {
|
|
14
14
|
key: 0,
|
|
15
|
-
class: "
|
|
16
|
-
},
|
|
15
|
+
class: "attributes-menu"
|
|
16
|
+
}, it = {
|
|
17
17
|
key: 0,
|
|
18
|
-
class: "
|
|
19
|
-
},
|
|
18
|
+
class: "empty-channels-placeholder"
|
|
19
|
+
}, at = ["data-attribute-status", "onMouseenter", "onClick"], ut = { class: "attribute-info" }, ct = { class: "attribute-value" }, rt = { class: "menu-icon" }, dt = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "menu-icon-arrow"
|
|
22
|
-
},
|
|
23
|
-
key: 0,
|
|
24
|
-
class: "selected-indicator"
|
|
25
|
-
}, ut = { class: "attribute-value" }, ct = { class: "menu-icon" }, rt = {
|
|
22
|
+
}, ft = ["data-attribute-status", "onMouseenter", "onClick"], mt = { class: "attribute-info" }, pt = { class: "attribute-value" }, ht = { class: "menu-icon" }, vt = {
|
|
26
23
|
key: 0,
|
|
27
24
|
class: "menu-icon-arrow"
|
|
28
|
-
},
|
|
25
|
+
}, yt = ["onClick"], Ct = {
|
|
29
26
|
key: 0,
|
|
30
27
|
class: "selected-indicator"
|
|
31
|
-
},
|
|
28
|
+
}, bt = { class: "sub-menu-title" }, gt = {
|
|
32
29
|
__name: "CommunicationPanel",
|
|
33
30
|
props: {
|
|
34
31
|
contactAttributes: {
|
|
@@ -56,6 +53,12 @@ const Ge = ["onClick", "onMouseenter"], Je = { class: "channel-icon" }, Ke = { c
|
|
|
56
53
|
required: !1,
|
|
57
54
|
default: () => ({})
|
|
58
55
|
},
|
|
56
|
+
/** Подсказки для галочки / спиннера: selected, confirmed, confirming, blocked */
|
|
57
|
+
attributeIndicatorTooltips: {
|
|
58
|
+
type: Object,
|
|
59
|
+
required: !1,
|
|
60
|
+
default: () => ({})
|
|
61
|
+
},
|
|
59
62
|
messages: {
|
|
60
63
|
type: Array,
|
|
61
64
|
required: !1,
|
|
@@ -80,310 +83,356 @@ const Ge = ["onClick", "onMouseenter"], Je = { class: "channel-icon" }, Ke = { c
|
|
|
80
83
|
type: Object,
|
|
81
84
|
required: !1,
|
|
82
85
|
default: () => ({})
|
|
86
|
+
},
|
|
87
|
+
/** Id атрибута в процессе подтверждения (спиннер вместо галочки). Задаёт родитель на время запроса. */
|
|
88
|
+
confirmingAttributeId: {
|
|
89
|
+
type: String,
|
|
90
|
+
required: !1,
|
|
91
|
+
default: null
|
|
92
|
+
},
|
|
93
|
+
/** Id атрибутов, заблокированных после неудачного подтверждения */
|
|
94
|
+
blockedAttributeIds: {
|
|
95
|
+
type: Array,
|
|
96
|
+
required: !1,
|
|
97
|
+
default: () => []
|
|
83
98
|
}
|
|
84
99
|
},
|
|
85
|
-
emits: [
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
100
|
+
emits: [
|
|
101
|
+
"select-attribute-channel",
|
|
102
|
+
"confirm-attribute",
|
|
103
|
+
"phone-call",
|
|
104
|
+
"reset-blocked-attributes"
|
|
105
|
+
],
|
|
106
|
+
setup(T, { emit: be }) {
|
|
107
|
+
const i = T, J = be, N = m(null), ge = m(null), O = m(null), z = m(null), _ = m(null), $ = m({}), C = m(!1), M = m(null), p = m(null), S = m(null), b = u(
|
|
108
|
+
() => i.confirmingAttributeId ?? S.value
|
|
109
|
+
), j = u(() => i.blockedAttributeIds ?? []), g = (t) => Qe(t, j.value), F = u(() => i.channels ?? []), ke = u(() => i.channelTooltips ?? {}), Ae = u(() => i.attributeTooltips ?? {}), K = u(() => i.attributeIndicatorTooltips ?? {}), Q = u(() => i.messages ?? []), Ie = u(() => i.selectedChat ?? null), X = u(() => i.isNewDialog ?? !1), Te = u(() => {
|
|
110
|
+
var t;
|
|
111
|
+
return ((t = i.selectedDialog) == null ? void 0 : t.channelId) ?? null;
|
|
112
|
+
}), Y = (t) => Te.value === t, _e = u(() => {
|
|
113
|
+
var t;
|
|
114
|
+
return ((t = i.selectedDialog) == null ? void 0 : t.attributeId) ?? null;
|
|
115
|
+
}), w = (t) => {
|
|
116
|
+
const o = _e.value;
|
|
117
|
+
if (!o || !t)
|
|
118
|
+
return !1;
|
|
119
|
+
const d = t.id ?? t.attributeId;
|
|
120
|
+
return o === d;
|
|
121
|
+
}, Z = (t) => {
|
|
122
|
+
const o = Ae.value, d = (t == null ? void 0 : t.attributeId) ?? (t == null ? void 0 : t.id);
|
|
123
|
+
if (d != null) {
|
|
124
|
+
const e = o[String(d)];
|
|
125
|
+
if (e)
|
|
126
|
+
return e;
|
|
99
127
|
}
|
|
100
|
-
return
|
|
101
|
-
},
|
|
102
|
-
channelsTypes:
|
|
103
|
-
getTooltipText:
|
|
104
|
-
getChannelTypeFromId:
|
|
105
|
-
hasMultipleChannels:
|
|
106
|
-
isChannelActive:
|
|
107
|
-
getSingleChannelForType:
|
|
108
|
-
getMenuChannelIconComponentForChannelId:
|
|
109
|
-
getSingleMenuChannelIconComponent:
|
|
110
|
-
getAvailableChannels:
|
|
111
|
-
} =
|
|
112
|
-
channels:
|
|
113
|
-
channelTooltips:
|
|
114
|
-
selectedChannelType:
|
|
128
|
+
return t != null && t.value ? o[String(t.value)] ?? "" : "";
|
|
129
|
+
}, Me = (t) => !!Z(t), {
|
|
130
|
+
channelsTypes: Se,
|
|
131
|
+
getTooltipText: we,
|
|
132
|
+
getChannelTypeFromId: De,
|
|
133
|
+
hasMultipleChannels: k,
|
|
134
|
+
isChannelActive: D,
|
|
135
|
+
getSingleChannelForType: Re,
|
|
136
|
+
getMenuChannelIconComponentForChannelId: xe,
|
|
137
|
+
getSingleMenuChannelIconComponent: ee,
|
|
138
|
+
getAvailableChannels: te
|
|
139
|
+
} = Ge({
|
|
140
|
+
channels: F,
|
|
141
|
+
channelTooltips: ke,
|
|
142
|
+
selectedChannelType: _
|
|
115
143
|
}), {
|
|
116
|
-
activeChannelType:
|
|
117
|
-
hoveredChannel:
|
|
118
|
-
showMenu:
|
|
119
|
-
showSubMenu:
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
(f) => {
|
|
136
|
-
var ue;
|
|
137
|
-
return f.chatId === s && f.dialogId === ((ue = c.selectedDialog) == null ? void 0 : ue.dialogId);
|
|
144
|
+
activeChannelType: c,
|
|
145
|
+
hoveredChannel: R,
|
|
146
|
+
showMenu: x,
|
|
147
|
+
showSubMenu: L,
|
|
148
|
+
handleChannelClick: qe,
|
|
149
|
+
closeMenu: ne,
|
|
150
|
+
handleClickOutside: oe
|
|
151
|
+
} = Je({
|
|
152
|
+
panelRef: N,
|
|
153
|
+
selectedChannelType: _,
|
|
154
|
+
frozenAttribute: z
|
|
155
|
+
}), V = u(() => i.contactAttributes ?? []), se = (t) => {
|
|
156
|
+
var a;
|
|
157
|
+
if (!t || !Q.value) return !0;
|
|
158
|
+
const o = (a = Ie.value) == null ? void 0 : a.chatId;
|
|
159
|
+
return o ? !Q.value.filter(
|
|
160
|
+
(r) => {
|
|
161
|
+
var pe;
|
|
162
|
+
return r.chatId === o && r.dialogId === ((pe = i.selectedDialog) == null ? void 0 : pe.dialogId);
|
|
138
163
|
}
|
|
139
164
|
).some(
|
|
140
|
-
(
|
|
165
|
+
(r) => r.type !== "message.system" && r.type !== "message.delimiter" && r.type !== "system" && r.type !== "system_message" && r.type !== "notification"
|
|
141
166
|
) : !0;
|
|
142
|
-
},
|
|
143
|
-
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
}),
|
|
167
|
+
}, le = () => {
|
|
168
|
+
q(), C.value = !0, he(() => {
|
|
169
|
+
const t = Array.isArray(p.value) ? p.value[0] : p.value;
|
|
170
|
+
t && typeof t.startAutoShow == "function" ? t.startAutoShow() : console.log("startAutoShow method not found on tooltipRef");
|
|
171
|
+
}), M.value = setTimeout(() => {
|
|
147
172
|
C.value = !1;
|
|
148
173
|
}, 5e3);
|
|
149
|
-
},
|
|
150
|
-
if (
|
|
151
|
-
const
|
|
152
|
-
|
|
174
|
+
}, q = () => {
|
|
175
|
+
if (M.value && (clearTimeout(M.value), M.value = null), p.value) {
|
|
176
|
+
const t = Array.isArray(p.value) ? p.value[0] : p.value;
|
|
177
|
+
t && typeof t.clearAutoTimer == "function" && t.clearAutoTimer();
|
|
153
178
|
}
|
|
154
179
|
C.value = !1;
|
|
155
180
|
}, {
|
|
156
|
-
organizedContactAttributes:
|
|
157
|
-
organizeContactAttributes:
|
|
158
|
-
isAttributeFrozen:
|
|
159
|
-
} =
|
|
160
|
-
contactAttributes:
|
|
161
|
-
frozenAttribute:
|
|
181
|
+
organizedContactAttributes: ie,
|
|
182
|
+
organizeContactAttributes: Be,
|
|
183
|
+
isAttributeFrozen: ae
|
|
184
|
+
} = Ke({
|
|
185
|
+
contactAttributes: V,
|
|
186
|
+
frozenAttribute: z
|
|
162
187
|
}), {
|
|
163
|
-
handleAttributeClick:
|
|
164
|
-
selectChannel:
|
|
165
|
-
availableChannels:
|
|
166
|
-
} =
|
|
167
|
-
activeChannelType:
|
|
168
|
-
channels:
|
|
169
|
-
selectedChannel:
|
|
170
|
-
selectedChannelType:
|
|
171
|
-
hoveredAttribute:
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
188
|
+
handleAttributeClick: Pe,
|
|
189
|
+
selectChannel: Ee,
|
|
190
|
+
availableChannels: Ne
|
|
191
|
+
} = Xe({
|
|
192
|
+
activeChannelType: c,
|
|
193
|
+
channels: F,
|
|
194
|
+
selectedChannel: $,
|
|
195
|
+
selectedChannelType: _,
|
|
196
|
+
hoveredAttribute: O,
|
|
197
|
+
confirmingAttributeId: S,
|
|
198
|
+
isAttributeBlocked: g,
|
|
199
|
+
closeMenu: ne,
|
|
200
|
+
hasMultipleChannels: k,
|
|
201
|
+
getSingleChannelForType: Re,
|
|
202
|
+
getAvailableChannels: te,
|
|
203
|
+
isChannelEmpty: se,
|
|
204
|
+
isNewDialog: X,
|
|
205
|
+
showDefaultChannelTooltipWithTimer: le,
|
|
206
|
+
clearDefaultChannelTooltip: q,
|
|
207
|
+
emit: J
|
|
181
208
|
}), {
|
|
182
|
-
subMenuTop:
|
|
183
|
-
handleAttributeMouseEnter:
|
|
184
|
-
handleAttributeMouseLeave:
|
|
185
|
-
keepSubMenuOpen:
|
|
186
|
-
closeSubMenu:
|
|
187
|
-
alignSubMenuWithTarget:
|
|
188
|
-
} =
|
|
189
|
-
activeChannelType:
|
|
190
|
-
showSubMenu:
|
|
191
|
-
frozenAttribute:
|
|
192
|
-
hoveredAttribute:
|
|
193
|
-
hasMultipleChannels:
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
209
|
+
subMenuTop: Oe,
|
|
210
|
+
handleAttributeMouseEnter: ze,
|
|
211
|
+
handleAttributeMouseLeave: B,
|
|
212
|
+
keepSubMenuOpen: ue,
|
|
213
|
+
closeSubMenu: ce,
|
|
214
|
+
alignSubMenuWithTarget: $e
|
|
215
|
+
} = Ye({
|
|
216
|
+
activeChannelType: c,
|
|
217
|
+
showSubMenu: L,
|
|
218
|
+
frozenAttribute: z,
|
|
219
|
+
hoveredAttribute: O,
|
|
220
|
+
hasMultipleChannels: k,
|
|
221
|
+
isAttributeBlocked: g
|
|
222
|
+
}), je = (t) => {
|
|
223
|
+
x.value && c.value === t || J("reset-blocked-attributes"), qe(t);
|
|
224
|
+
}, re = (t) => {
|
|
225
|
+
g(t) || Pe(t);
|
|
226
|
+
};
|
|
227
|
+
Ze({
|
|
228
|
+
selectedChannelType: _,
|
|
229
|
+
selectedChannel: $,
|
|
230
|
+
channels: F,
|
|
231
|
+
selectedDialog: u(() => i.selectedDialog ?? null),
|
|
232
|
+
isChannelEmpty: se,
|
|
233
|
+
isNewDialog: X,
|
|
234
|
+
showDefaultChannelTooltipWithTimer: le,
|
|
235
|
+
clearDefaultChannelTooltip: q
|
|
204
236
|
});
|
|
205
237
|
const {
|
|
206
|
-
emptyChannelsPlaceholderText:
|
|
207
|
-
shouldShowEmptyChannelsPlaceholder:
|
|
208
|
-
} =
|
|
209
|
-
showMenu:
|
|
210
|
-
activeChannelType:
|
|
211
|
-
emptyChannelsPlaceholder:
|
|
212
|
-
getAvailableChannels:
|
|
213
|
-
organizedContactAttributes:
|
|
214
|
-
}),
|
|
215
|
-
() =>
|
|
216
|
-
),
|
|
217
|
-
() =>
|
|
218
|
-
),
|
|
219
|
-
const
|
|
220
|
-
await
|
|
238
|
+
emptyChannelsPlaceholderText: Fe,
|
|
239
|
+
shouldShowEmptyChannelsPlaceholder: de
|
|
240
|
+
} = et({
|
|
241
|
+
showMenu: x,
|
|
242
|
+
activeChannelType: c,
|
|
243
|
+
emptyChannelsPlaceholder: u(() => i.emptyChannelsPlaceholder ?? {}),
|
|
244
|
+
getAvailableChannels: te,
|
|
245
|
+
organizedContactAttributes: ie
|
|
246
|
+
}), fe = u(
|
|
247
|
+
() => Ne()
|
|
248
|
+
), Le = u(
|
|
249
|
+
() => L.value && O.value && fe.value.length > 0 && c.value !== "phone" && k(c.value)
|
|
250
|
+
), me = async (t, o) => {
|
|
251
|
+
const d = ze(t, o.currentTarget);
|
|
252
|
+
await he(), d instanceof HTMLElement && $e(N, d);
|
|
221
253
|
};
|
|
222
|
-
return
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
},
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
254
|
+
return H(() => i.confirmingAttributeId, (t) => {
|
|
255
|
+
t || (S.value = null);
|
|
256
|
+
}), H(V, () => {
|
|
257
|
+
const t = b.value;
|
|
258
|
+
if (!t)
|
|
259
|
+
return;
|
|
260
|
+
const o = V.value.find((d) => d.id === t);
|
|
261
|
+
(o == null ? void 0 : o.status) === "confirmed" && (S.value = null, ne());
|
|
262
|
+
}, { deep: !0 }), H(() => i.selectedDialog, () => {
|
|
263
|
+
}, { deep: !0 }), Ve(() => {
|
|
264
|
+
document.addEventListener("click", oe), Be();
|
|
265
|
+
}), He(() => {
|
|
266
|
+
document.removeEventListener("click", oe), q();
|
|
267
|
+
}), (t, o) => {
|
|
268
|
+
const d = We("CommunicationPanelCheckIcon");
|
|
269
|
+
return s(), l("div", {
|
|
270
|
+
ref_key: "panelRef",
|
|
271
|
+
ref: N,
|
|
272
|
+
class: "communication-panel"
|
|
236
273
|
}, [
|
|
237
|
-
(
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
274
|
+
f("div", {
|
|
275
|
+
ref_key: "channelsPanelRef",
|
|
276
|
+
ref: ge,
|
|
277
|
+
class: "channels-panel"
|
|
278
|
+
}, [
|
|
279
|
+
(s(!0), l(A, null, W(n(Se), (e) => {
|
|
280
|
+
var a;
|
|
281
|
+
return s(), l("button", {
|
|
282
|
+
key: e.type,
|
|
283
|
+
class: v(["channel-btn", {
|
|
284
|
+
active: n(D)(e.type),
|
|
285
|
+
hover: n(R) === e.type && !n(D)(e.type) || n(R) === e.type && n(D)(e.type),
|
|
286
|
+
menuOpen: n(x) && n(c) === e.type
|
|
287
|
+
}]),
|
|
288
|
+
onClick: (r) => je(e.type),
|
|
289
|
+
onMouseenter: (r) => R.value = e.type,
|
|
290
|
+
onMouseleave: o[0] || (o[0] = (r) => R.value = null)
|
|
291
|
+
}, [
|
|
292
|
+
n(D)(e.type) ? (s(), l(A, { key: 0 }, [
|
|
293
|
+
P(G, {
|
|
294
|
+
ref_for: !0,
|
|
295
|
+
ref: (r) => {
|
|
296
|
+
r && (p.value = r);
|
|
297
|
+
},
|
|
298
|
+
text: C.value ? "Выбран канал по умолчанию, можно изменить в настройках профиля" : (a = $.value) == null ? void 0 : a.title,
|
|
299
|
+
position: "bottom-left",
|
|
300
|
+
offset: 8,
|
|
301
|
+
trigger: C.value ? "auto" : "hover",
|
|
302
|
+
"auto-show-duration": C.value ? 5e3 : 0
|
|
303
|
+
}, {
|
|
304
|
+
default: U(() => [
|
|
305
|
+
f("span", ot, [
|
|
306
|
+
(s(), y(I(e.component)))
|
|
307
|
+
])
|
|
308
|
+
]),
|
|
309
|
+
_: 2
|
|
310
|
+
}, 1032, ["text", "trigger", "auto-show-duration"]),
|
|
311
|
+
o[5] || (o[5] = f("span", { class: "active-indicator" }, null, -1))
|
|
312
|
+
], 64)) : (s(), y(G, {
|
|
313
|
+
key: 1,
|
|
314
|
+
text: n(we)(e.type),
|
|
257
315
|
position: "bottom-left",
|
|
258
|
-
offset: 8
|
|
259
|
-
trigger: C.value ? "auto" : "hover",
|
|
260
|
-
"auto-show-duration": C.value ? 5e3 : 0
|
|
316
|
+
offset: 8
|
|
261
317
|
}, {
|
|
262
|
-
default:
|
|
263
|
-
|
|
264
|
-
(
|
|
318
|
+
default: U(() => [
|
|
319
|
+
f("span", st, [
|
|
320
|
+
(s(), y(I(e.component)))
|
|
265
321
|
])
|
|
266
322
|
]),
|
|
267
323
|
_: 2
|
|
268
|
-
}, 1032, ["text"
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
324
|
+
}, 1032, ["text"]))
|
|
325
|
+
], 42, nt);
|
|
326
|
+
}), 128))
|
|
327
|
+
], 512),
|
|
328
|
+
n(x) && n(c) ? (s(), l("div", lt, [
|
|
329
|
+
n(de) ? (s(), l("div", it, E(n(Fe)), 1)) : h("", !0),
|
|
330
|
+
n(de) ? h("", !0) : (s(!0), l(A, { key: 1 }, W(n(ie)[n(c)], (e) => (s(), l(A, {
|
|
331
|
+
key: e.attributeId
|
|
332
|
+
}, [
|
|
333
|
+
Me(e) ? (s(), y(G, {
|
|
334
|
+
key: 0,
|
|
335
|
+
text: Z(e),
|
|
273
336
|
position: "bottom-left",
|
|
274
337
|
offset: 8
|
|
275
338
|
}, {
|
|
276
|
-
default:
|
|
277
|
-
|
|
278
|
-
(
|
|
279
|
-
|
|
339
|
+
default: U(() => [
|
|
340
|
+
f("div", {
|
|
341
|
+
class: v(["attribute-item", n(ve)(e), {
|
|
342
|
+
"frozen-hover": n(ae)(e),
|
|
343
|
+
selected: w(e),
|
|
344
|
+
confirming: n(ye)(e, b.value),
|
|
345
|
+
blocked: g(e)
|
|
346
|
+
}]),
|
|
347
|
+
"data-attribute-status": e.status,
|
|
348
|
+
onMouseenter: (a) => me(e, a),
|
|
349
|
+
onMouseleave: o[1] || (o[1] = (...a) => n(B) && n(B)(...a)),
|
|
350
|
+
onClick: (a) => re(e)
|
|
351
|
+
}, [
|
|
352
|
+
f("div", ut, [
|
|
353
|
+
P(Ce, {
|
|
354
|
+
attribute: e,
|
|
355
|
+
"is-selected": w(e),
|
|
356
|
+
"confirming-attribute-id": b.value,
|
|
357
|
+
"blocked-attribute-ids": j.value,
|
|
358
|
+
"indicator-tooltips": K.value
|
|
359
|
+
}, null, 8, ["attribute", "is-selected", "confirming-attribute-id", "blocked-attribute-ids", "indicator-tooltips"]),
|
|
360
|
+
f("span", ct, E(e.value), 1)
|
|
361
|
+
]),
|
|
362
|
+
f("span", rt, [
|
|
363
|
+
n(k)(n(c)) ? (s(), l("span", dt)) : T.showChannelIcons ? (s(), l("span", {
|
|
364
|
+
key: 1,
|
|
365
|
+
class: v(["channel-icon-small", { "menu-icon-grey": n(c) !== "sms" }])
|
|
366
|
+
}, [
|
|
367
|
+
(s(), y(I(n(ee)(n(c)))))
|
|
368
|
+
], 2)) : h("", !0)
|
|
369
|
+
])
|
|
370
|
+
], 42, at)
|
|
280
371
|
]),
|
|
281
372
|
_: 2
|
|
282
|
-
}, 1032, ["text"]))
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
"frozen-hover": t(te)(e),
|
|
305
|
-
selected: M(e)
|
|
306
|
-
}]),
|
|
307
|
-
onMouseenter: (a) => ie(e, a),
|
|
308
|
-
onMouseleave: s[1] || (s[1] = (...a) => t(D) && t(D)(...a)),
|
|
309
|
-
onClick: (a) => t(ne)(e)
|
|
310
|
-
}, [
|
|
311
|
-
i("div", Ye, [
|
|
312
|
-
i("span", Ze, [
|
|
313
|
-
M(e) ? (o(), l("span", et, [
|
|
314
|
-
x(t(W))
|
|
315
|
-
])) : d("", !0)
|
|
316
|
-
]),
|
|
317
|
-
i("span", tt, R(e.value), 1)
|
|
318
|
-
]),
|
|
319
|
-
i("span", nt, [
|
|
320
|
-
t(g)(t(u)) ? (o(), l("span", ot)) : b.showChannelIcons ? (o(), l("span", {
|
|
321
|
-
key: 1,
|
|
322
|
-
class: v(["channel-icon-small", { "menu-icon-grey": t(u) !== "sms" }])
|
|
323
|
-
}, [
|
|
324
|
-
(o(), y(_(t(K)(t(u)))))
|
|
325
|
-
], 2)) : d("", !0)
|
|
326
|
-
])
|
|
327
|
-
], 42, Xe)
|
|
328
|
-
]),
|
|
329
|
-
_: 2
|
|
330
|
-
}, 1032, ["text"])) : (o(), l("div", {
|
|
331
|
-
key: 1,
|
|
332
|
-
class: v(["attribute-item", {
|
|
333
|
-
"frozen-hover": t(te)(e),
|
|
334
|
-
selected: M(e)
|
|
335
|
-
}]),
|
|
336
|
-
onMouseenter: (a) => ie(e, a),
|
|
337
|
-
onMouseleave: s[2] || (s[2] = (...a) => t(D) && t(D)(...a)),
|
|
338
|
-
onClick: (a) => t(ne)(e)
|
|
339
|
-
}, [
|
|
340
|
-
i("div", lt, [
|
|
341
|
-
i("span", at, [
|
|
342
|
-
M(e) ? (o(), l("span", it, [
|
|
343
|
-
x(t(W))
|
|
344
|
-
])) : d("", !0)
|
|
373
|
+
}, 1032, ["text"])) : (s(), l("div", {
|
|
374
|
+
key: 1,
|
|
375
|
+
class: v(["attribute-item", n(ve)(e), {
|
|
376
|
+
"frozen-hover": n(ae)(e),
|
|
377
|
+
selected: w(e),
|
|
378
|
+
confirming: n(ye)(e, b.value),
|
|
379
|
+
blocked: g(e)
|
|
380
|
+
}]),
|
|
381
|
+
"data-attribute-status": e.status,
|
|
382
|
+
onMouseenter: (a) => me(e, a),
|
|
383
|
+
onMouseleave: o[2] || (o[2] = (...a) => n(B) && n(B)(...a)),
|
|
384
|
+
onClick: (a) => re(e)
|
|
385
|
+
}, [
|
|
386
|
+
f("div", mt, [
|
|
387
|
+
P(Ce, {
|
|
388
|
+
attribute: e,
|
|
389
|
+
"is-selected": w(e),
|
|
390
|
+
"confirming-attribute-id": b.value,
|
|
391
|
+
"blocked-attribute-ids": j.value,
|
|
392
|
+
"indicator-tooltips": K.value
|
|
393
|
+
}, null, 8, ["attribute", "is-selected", "confirming-attribute-id", "blocked-attribute-ids", "indicator-tooltips"]),
|
|
394
|
+
f("span", pt, E(e.value), 1)
|
|
345
395
|
]),
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
onMouseenter: s[3] || (s[3] = (...e) => t(oe) && t(oe)(...e)),
|
|
363
|
-
onMouseleave: s[4] || (s[4] = (...e) => t(se) && t(se)(...e))
|
|
364
|
-
}, [
|
|
365
|
-
s[6] || (s[6] = i("div", { class: "sub-menu-header" }, " Канал связи ", -1)),
|
|
366
|
-
(o(!0), l(k, null, $(ae.value, (e) => (o(), l("div", {
|
|
367
|
-
key: e.channelId,
|
|
368
|
-
class: v(["sub-menu-item", { selected: G(e.channelId) }]),
|
|
369
|
-
onClick: (a) => t(De)(e.channelId)
|
|
396
|
+
f("span", ht, [
|
|
397
|
+
n(k)(n(c)) ? (s(), l("span", vt)) : T.showChannelIcons ? (s(), l("span", {
|
|
398
|
+
key: 1,
|
|
399
|
+
class: v(["channel-icon-small", { "menu-icon-grey": n(c) !== "sms" }])
|
|
400
|
+
}, [
|
|
401
|
+
(s(), y(I(n(ee)(n(c)))))
|
|
402
|
+
], 2)) : h("", !0)
|
|
403
|
+
])
|
|
404
|
+
], 42, ft))
|
|
405
|
+
], 64))), 128)),
|
|
406
|
+
n(L) && Le.value ? (s(), l("div", {
|
|
407
|
+
key: 2,
|
|
408
|
+
class: "sub-menu left",
|
|
409
|
+
style: Ue({ top: n(Oe) + "px" }),
|
|
410
|
+
onMouseenter: o[3] || (o[3] = (...e) => n(ue) && n(ue)(...e)),
|
|
411
|
+
onMouseleave: o[4] || (o[4] = (...e) => n(ce) && n(ce)(...e))
|
|
370
412
|
}, [
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
key: 1,
|
|
377
|
-
class: v(["sub-menu-icon", { "menu-icon-grey": t(_e)(e.channelId) !== "sms" }])
|
|
413
|
+
o[6] || (o[6] = f("div", { class: "sub-menu-header" }, " Канал связи ", -1)),
|
|
414
|
+
(s(!0), l(A, null, W(fe.value, (e) => (s(), l("div", {
|
|
415
|
+
key: e.channelId,
|
|
416
|
+
class: v(["sub-menu-item", { selected: Y(e.channelId) }]),
|
|
417
|
+
onClick: (a) => n(Ee)(e.channelId)
|
|
378
418
|
}, [
|
|
379
|
-
(
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
419
|
+
Y(e.channelId) ? (s(), l("span", Ct, [
|
|
420
|
+
P(d)
|
|
421
|
+
])) : h("", !0),
|
|
422
|
+
f("span", bt, E(e.title || e.channelId), 1),
|
|
423
|
+
T.showChannelIcons ? (s(), l("span", {
|
|
424
|
+
key: 1,
|
|
425
|
+
class: v(["sub-menu-icon", { "menu-icon-grey": n(De)(e.channelId) !== "sms" }])
|
|
426
|
+
}, [
|
|
427
|
+
(s(), y(I(n(xe)(e.channelId))))
|
|
428
|
+
], 2)) : h("", !0)
|
|
429
|
+
], 10, yt))), 128))
|
|
430
|
+
], 36)) : h("", !0)
|
|
431
|
+
])) : h("", !0)
|
|
432
|
+
], 512);
|
|
433
|
+
};
|
|
385
434
|
}
|
|
386
|
-
},
|
|
435
|
+
}, Bt = /* @__PURE__ */ tt(gt, [["__scopeId", "data-v-2f47f482"]]);
|
|
387
436
|
export {
|
|
388
|
-
|
|
437
|
+
Bt as default
|
|
389
438
|
};
|