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