@mobilon-dev/chotto 0.3.77 → 0.3.79

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