@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.
Files changed (29) hide show
  1. package/dist/chotto.css +1 -1
  2. package/dist/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.js +344 -295
  3. package/dist/components/2_blocks/CommunicationPanel/CommunicationPanelAttributeIndicator.vue.js +88 -0
  4. package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationActions.js +65 -32
  5. package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationAttributes.js +84 -28
  6. package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationChannels.js +8 -7
  7. package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationMenu.js +16 -21
  8. package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationSubMenu.js +10 -9
  9. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelCheckIcon.vue.js +1 -1
  10. package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelConfirmSpinner.vue2.js +15 -0
  11. package/dist/hooks/validators/chats/chatValidator.js +13 -9
  12. package/dist/themes/dark.css +1 -1
  13. package/dist/themes/default.css +1 -1
  14. package/dist/themes/glass.css +1 -1
  15. package/dist/themes/green.css +1 -1
  16. package/dist/themes/mobilon1.css +1 -1
  17. package/dist/types/apps/data/chats.d.ts +10 -0
  18. package/dist/types/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.d.ts +7 -1
  19. package/dist/types/components/2_blocks/CommunicationPanel/CommunicationPanelAttributeIndicator.vue.d.ts +15 -0
  20. package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationActions.d.ts +5 -2
  21. package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationAttributes.d.ts +41 -0
  22. package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationMenu.d.ts +2 -7
  23. package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationSubMenu.d.ts +2 -1
  24. package/dist/types/components/2_blocks/CommunicationPanel/icons/CommunicationPanelConfirmSpinner.vue.d.ts +2 -0
  25. package/dist/types/components/2_blocks/CommunicationPanel/icons/index.d.ts +1 -0
  26. package/dist/types/components/2_blocks/CommunicationPanel/stories/CommunicationPanel.stories.d.ts +7 -1
  27. package/dist/types/components/2_blocks/CommunicationPanel/styles/types.d.ts +30 -0
  28. package/dist/types/hooks/validators/chats/types.d.ts +2 -0
  29. package/package.json +1 -1
@@ -1,34 +1,31 @@
1
- import { ref as p, computed as r, watch as Ne, onMounted as Oe, onUnmounted as Be, createElementBlock as l, openBlock as o, createElementVNode as i, createCommentVNode as d, Fragment as k, renderList as $, unref as t, normalizeClass as v, createBlock as y, createVNode as x, withCtx as j, resolveDynamicComponent as _, normalizeStyle as ce, toDisplayString as R, nextTick as re } from "vue";
2
- import F from "../../1_atoms/Tooltip/Tooltip.vue.js";
3
- import { useCommunicationChannels as Le } from "./composables/useCommunicationChannels.js";
4
- import { useCommunicationMenu as $e } from "./composables/useCommunicationMenu.js";
5
- import { useCommunicationAttributes as je } from "./composables/useCommunicationAttributes.js";
6
- import { useCommunicationActions as Fe } from "./composables/useCommunicationActions.js";
7
- import { useCommunicationSubMenu as We } from "./composables/useCommunicationSubMenu.js";
8
- import { useCommunicationDialogSync as Ve } from "./composables/useCommunicationDialogSync.js";
9
- import { useCommunicationPlaceholder as He } from "./composables/useCommunicationPlaceholder.js";
10
- import W from "./icons/CommunicationPanelCheckIcon.vue.js";
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
- const Ge = ["onClick", "onMouseenter"], Je = { class: "channel-icon" }, Ke = { class: "channel-icon" }, Qe = {
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: "empty-channels-placeholder"
16
- }, Xe = ["onMouseenter", "onClick"], Ye = { class: "attribute-info" }, Ze = { class: "attribute-indicator-slot" }, et = {
15
+ class: "attributes-menu"
16
+ }, it = {
17
17
  key: 0,
18
- class: "selected-indicator"
19
- }, tt = { class: "attribute-value" }, nt = { class: "menu-icon" }, ot = {
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
- }, st = ["onMouseenter", "onClick"], lt = { class: "attribute-info" }, at = { class: "attribute-indicator-slot" }, it = {
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
- }, dt = ["onClick"], pt = {
25
+ }, yt = ["onClick"], Ct = {
29
26
  key: 0,
30
27
  class: "selected-indicator"
31
- }, mt = { class: "sub-menu-title" }, ht = {
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: ["select-attribute-channel", "phone-call"],
86
- setup(b, { emit: de }) {
87
- const c = b, pe = de, E = p(null), V = p(null), P = p(null), q = p(null), T = p(null), z = p({}), C = p(!1), A = p(null), m = p(null), N = r(() => c.channels ?? []), me = r(() => c.channelTooltips ?? {}), he = r(() => c.attributeTooltips ?? {}), H = r(() => c.messages ?? []), fe = r(() => c.selectedChat ?? null), U = r(() => c.isNewDialog ?? !1), ve = r(() => {
88
- var n;
89
- return ((n = c.selectedDialog) == null ? void 0 : n.channelId) ?? null;
90
- }), G = (n) => ve.value === n, ye = r(() => {
91
- var n;
92
- return ((n = c.selectedDialog) == null ? void 0 : n.attributeId) ?? null;
93
- }), M = (n) => ye.value === n.id, J = (n) => {
94
- const s = he.value, e = (n == null ? void 0 : n.attributeId) ?? (n == null ? void 0 : n.id);
95
- if (e != null) {
96
- const a = s[String(e)];
97
- if (a)
98
- return a;
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 n != null && n.value ? s[String(n.value)] ?? "" : "";
101
- }, Ce = (n) => !!J(n), {
102
- channelsTypes: ge,
103
- getTooltipText: ke,
104
- getChannelTypeFromId: _e,
105
- hasMultipleChannels: g,
106
- isChannelActive: w,
107
- getSingleChannelForType: be,
108
- getMenuChannelIconComponentForChannelId: Te,
109
- getSingleMenuChannelIconComponent: K,
110
- getAvailableChannels: Q
111
- } = Le({
112
- channels: N,
113
- channelTooltips: me,
114
- selectedChannelType: T
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: u,
117
- hoveredChannel: I,
118
- showMenu: O,
119
- showSubMenu: B,
120
- menuWidth: Ae,
121
- updateMenuWidth: L,
122
- handleChannelClick: Me,
123
- closeMenu: we,
124
- handleClickOutside: X
125
- } = $e({
126
- panelRef: E,
127
- channelsPanelRef: V,
128
- selectedChannelType: T,
129
- frozenAttribute: q
130
- }), Ie = r(() => c.contactAttributes ?? []), Y = (n) => {
131
- var h;
132
- if (!n || !H.value) return !0;
133
- const s = (h = fe.value) == null ? void 0 : h.chatId;
134
- return s ? !H.value.filter(
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
- (f) => f.type !== "message.system" && f.type !== "message.delimiter" && f.type !== "system" && f.type !== "system_message" && f.type !== "notification"
165
+ (r) => r.type !== "message.system" && r.type !== "message.delimiter" && r.type !== "system" && r.type !== "system_message" && r.type !== "notification"
141
166
  ) : !0;
142
- }, Z = () => {
143
- S(), C.value = !0, re(() => {
144
- const n = Array.isArray(m.value) ? m.value[0] : m.value;
145
- n && typeof n.startAutoShow == "function" ? n.startAutoShow() : console.log("startAutoShow method not found on tooltipRef");
146
- }), A.value = setTimeout(() => {
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
- }, S = () => {
150
- if (A.value && (clearTimeout(A.value), A.value = null), m.value) {
151
- const n = Array.isArray(m.value) ? m.value[0] : m.value;
152
- n && typeof n.clearAutoTimer == "function" && n.clearAutoTimer();
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: ee,
157
- organizeContactAttributes: Se,
158
- isAttributeFrozen: te
159
- } = je({
160
- contactAttributes: Ie,
161
- frozenAttribute: q
181
+ organizedContactAttributes: ie,
182
+ organizeContactAttributes: Be,
183
+ isAttributeFrozen: ae
184
+ } = Ke({
185
+ contactAttributes: V,
186
+ frozenAttribute: z
162
187
  }), {
163
- handleAttributeClick: ne,
164
- selectChannel: De,
165
- availableChannels: xe
166
- } = Fe({
167
- activeChannelType: u,
168
- channels: N,
169
- selectedChannel: z,
170
- selectedChannelType: T,
171
- hoveredAttribute: P,
172
- closeMenu: we,
173
- hasMultipleChannels: g,
174
- getSingleChannelForType: be,
175
- getAvailableChannels: Q,
176
- isChannelEmpty: Y,
177
- isNewDialog: U,
178
- showDefaultChannelTooltipWithTimer: Z,
179
- clearDefaultChannelTooltip: S,
180
- emit: pe
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: Re,
183
- handleAttributeMouseEnter: Ee,
184
- handleAttributeMouseLeave: D,
185
- keepSubMenuOpen: oe,
186
- closeSubMenu: se,
187
- alignSubMenuWithTarget: Pe
188
- } = We({
189
- activeChannelType: u,
190
- showSubMenu: B,
191
- frozenAttribute: q,
192
- hoveredAttribute: P,
193
- hasMultipleChannels: g
194
- });
195
- Ve({
196
- selectedChannelType: T,
197
- selectedChannel: z,
198
- channels: N,
199
- selectedDialog: r(() => c.selectedDialog ?? null),
200
- isChannelEmpty: Y,
201
- isNewDialog: U,
202
- showDefaultChannelTooltipWithTimer: Z,
203
- clearDefaultChannelTooltip: S
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: qe,
207
- shouldShowEmptyChannelsPlaceholder: le
208
- } = He({
209
- showMenu: O,
210
- activeChannelType: u,
211
- emptyChannelsPlaceholder: r(() => c.emptyChannelsPlaceholder ?? {}),
212
- getAvailableChannels: Q,
213
- organizedContactAttributes: ee
214
- }), ae = r(
215
- () => xe()
216
- ), ze = r(
217
- () => B.value && P.value && ae.value.length > 0 && u.value !== "phone" && g(u.value)
218
- ), ie = async (n, s) => {
219
- const e = Ee(n, s.currentTarget);
220
- await re(), e instanceof HTMLElement && Pe(E, e);
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 Ne(() => c.selectedDialog, () => {
223
- }, { deep: !0 }), Oe(() => {
224
- L(), window.addEventListener("resize", L), document.addEventListener("click", X), Se();
225
- }), Be(() => {
226
- window.removeEventListener("resize", L), document.removeEventListener("click", X), S();
227
- }), (n, s) => (o(), l("div", {
228
- ref_key: "panelRef",
229
- ref: E,
230
- class: "communication-panel"
231
- }, [
232
- i("div", {
233
- ref_key: "channelsPanelRef",
234
- ref: V,
235
- class: "channels-panel"
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
- (o(!0), l(k, null, $(t(ge), (e) => {
238
- var a;
239
- return o(), l("button", {
240
- key: e.type,
241
- class: v(["channel-btn", {
242
- active: t(w)(e.type),
243
- hover: t(I) === e.type && !t(w)(e.type) || t(I) === e.type && t(w)(e.type),
244
- menuOpen: t(O) && t(u) === e.type
245
- }]),
246
- onClick: (h) => t(Me)(e.type),
247
- onMouseenter: (h) => I.value = e.type,
248
- onMouseleave: s[0] || (s[0] = (h) => I.value = null)
249
- }, [
250
- t(w)(e.type) ? (o(), l(k, { key: 0 }, [
251
- x(F, {
252
- ref_for: !0,
253
- ref: (h) => {
254
- h && (m.value = h);
255
- },
256
- text: C.value ? "Выбран канал по умолчанию, можно изменить в настройках профиля" : (a = z.value) == null ? void 0 : a.title,
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: j(() => [
263
- i("span", Je, [
264
- (o(), y(_(e.component)))
318
+ default: U(() => [
319
+ f("span", st, [
320
+ (s(), y(I(e.component)))
265
321
  ])
266
322
  ]),
267
323
  _: 2
268
- }, 1032, ["text", "trigger", "auto-show-duration"]),
269
- s[5] || (s[5] = i("span", { class: "active-indicator" }, null, -1))
270
- ], 64)) : (o(), y(F, {
271
- key: 1,
272
- text: t(ke)(e.type),
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: j(() => [
277
- i("span", Ke, [
278
- (o(), y(_(e.component)))
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
- ], 42, Ge);
284
- }), 128))
285
- ], 512),
286
- t(O) && t(u) ? (o(), l("div", {
287
- key: 0,
288
- class: "attributes-menu",
289
- style: ce({ width: t(Ae) })
290
- }, [
291
- t(le) ? (o(), l("div", Qe, R(t(qe)), 1)) : d("", !0),
292
- t(le) ? d("", !0) : (o(!0), l(k, { key: 1 }, $(t(ee)[t(u)], (e) => (o(), l(k, {
293
- key: e.attributeId
294
- }, [
295
- Ce(e) ? (o(), y(F, {
296
- key: 0,
297
- text: J(e),
298
- position: "bottom-left",
299
- offset: 8
300
- }, {
301
- default: j(() => [
302
- i("div", {
303
- class: v(["attribute-item", {
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
- i("span", ut, R(e.value), 1)
347
- ]),
348
- i("span", ct, [
349
- t(g)(t(u)) ? (o(), l("span", rt)) : b.showChannelIcons ? (o(), l("span", {
350
- key: 1,
351
- class: v(["channel-icon-small", { "menu-icon-grey": t(u) !== "sms" }])
352
- }, [
353
- (o(), y(_(t(K)(t(u)))))
354
- ], 2)) : d("", !0)
355
- ])
356
- ], 42, st))
357
- ], 64))), 128)),
358
- t(B) && ze.value ? (o(), l("div", {
359
- key: 2,
360
- class: "sub-menu left",
361
- style: ce({ top: t(Re) + "px" }),
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
- G(e.channelId) ? (o(), l("span", pt, [
372
- x(t(W))
373
- ])) : d("", !0),
374
- i("span", mt, R(e.title || e.channelId), 1),
375
- b.showChannelIcons ? (o(), l("span", {
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
- (o(), y(_(t(Te)(e.channelId))))
380
- ], 2)) : d("", !0)
381
- ], 10, dt))), 128))
382
- ], 36)) : d("", !0)
383
- ], 4)) : d("", !0)
384
- ], 512));
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
- }, It = /* @__PURE__ */ Ue(ht, [["__scopeId", "data-v-6376eb29"]]);
435
+ }, Bt = /* @__PURE__ */ tt(gt, [["__scopeId", "data-v-2f47f482"]]);
387
436
  export {
388
- It as default
437
+ Bt as default
389
438
  };