@mobilon-dev/chotto 0.3.126 → 0.3.127

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,9 +1,9 @@
1
- import { ref as m, computed as a, watch as z, onMounted as ct, onUnmounted as dt, createElementBlock as u, openBlock as l, createCommentVNode as v, unref as n, Fragment as _, renderList as te, normalizeClass as k, createBlock as h, createVNode as ne, createElementVNode as c, withCtx as oe, resolveDynamicComponent as w, toDisplayString as F, normalizeStyle as ft, nextTick as le } from "vue";
1
+ import { ref as m, computed as a, watch as z, onMounted as ct, onUnmounted as dt, createElementBlock as u, openBlock as l, createCommentVNode as v, unref as n, Fragment as _, renderList as te, normalizeClass as k, createBlock as y, createVNode as ne, createElementVNode as c, withCtx as oe, resolveDynamicComponent as w, toDisplayString as F, normalizeStyle as ft, nextTick as le } from "vue";
2
2
  import se from "../../1_atoms/Tooltip/Tooltip.vue.js";
3
3
  import { useCommunicationChannels as pt } from "./composables/useCommunicationChannels.js";
4
4
  import { useCommunicationMenu as mt } from "./composables/useCommunicationMenu.js";
5
- import { useCommunicationAttributes as vt, isAttributeBlocked as ht, getAttributeStatusClass as Re, isAttributeConfirming as xe, getSubMenuChannelIndicatorType as yt, getSubMenuChannelIndicatorClass as Ct } from "./composables/useCommunicationAttributes.js";
6
- import { useCommunicationActions as bt } from "./composables/useCommunicationActions.js";
5
+ import { useCommunicationAttributes as vt, isAttributeBlocked as yt, getAttributeStatusClass as Re, isAttributeConfirming as xe, getSubMenuChannelIndicatorType as ht, getSubMenuChannelIndicatorClass as bt } from "./composables/useCommunicationAttributes.js";
6
+ import { useCommunicationActions as Ct } from "./composables/useCommunicationActions.js";
7
7
  import { useCommunicationSubMenu as gt } from "./composables/useCommunicationSubMenu.js";
8
8
  import { useCommunicationDialogSync as kt } from "./composables/useCommunicationDialogSync.js";
9
9
  import { useCommunicationPlaceholder as It } from "./composables/useCommunicationPlaceholder.js";
@@ -139,10 +139,10 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
139
139
  "phone-call",
140
140
  "reset-blocked-attributes"
141
141
  ],
142
- setup(y, { expose: Oe, emit: Pe }) {
143
- const i = y, ae = Pe, L = m(null), Be = m(null), D = m(null), R = m(null), T = m(null), U = m({}), V = m(null), A = m(!1), x = m(null), C = m(null), q = m(null), b = a(
142
+ setup(h, { expose: Oe, emit: Pe }) {
143
+ const i = h, ae = Pe, L = m(null), Be = m(null), D = m(null), R = m(null), T = m(null), U = m({}), V = m(null), A = m(!1), x = m(null), b = m(null), q = m(null), C = a(
144
144
  () => i.confirmingAttributeId ?? q.value
145
- ), W = a(() => i.blockedAttributeIds ?? []), M = (e) => ht(e, W.value), H = a(() => i.channels ?? []), Ne = a(() => i.channelOrder), Ee = a(() => i.visibleChannelTypes), $e = a(() => i.channelTooltips ?? {}), je = a(() => i.attributeTooltips ?? {}), ie = a(() => i.attributeIndicatorTooltips ?? {}), ue = a(() => i.recentAttributeChannels ?? {}), re = a(() => i.messages ?? []), ze = a(() => i.selectedChat ?? null), ce = a(() => i.isNewDialog ?? !1), de = a(() => {
145
+ ), W = a(() => i.blockedAttributeIds ?? []), M = (e) => yt(e, W.value), H = a(() => i.channels ?? []), Ne = a(() => i.channelOrder), Ee = a(() => i.visibleChannelTypes), $e = a(() => i.channelTooltips ?? {}), je = a(() => i.attributeTooltips ?? {}), ie = a(() => i.attributeIndicatorTooltips ?? {}), ue = a(() => i.recentAttributeChannels ?? {}), re = a(() => i.messages ?? []), ze = a(() => i.selectedChat ?? null), ce = a(() => i.isNewDialog ?? !1), de = a(() => {
146
146
  var e;
147
147
  return ((e = i.selectedDialog) == null ? void 0 : e.channelId) ?? null;
148
148
  }), O = (e, o) => {
@@ -189,7 +189,7 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
189
189
  closeMenu: N,
190
190
  pinMenuOpen: Qe,
191
191
  armOutsideClickSuppression: Xe,
192
- handleClickOutside: he
192
+ handleClickOutside: ye
193
193
  } = mt({
194
194
  panelRef: L,
195
195
  selectedChannelType: T,
@@ -197,14 +197,14 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
197
197
  }), J = a(() => {
198
198
  var e;
199
199
  return ((e = i.selectedDialog) == null ? void 0 : e.attributeId) ?? null;
200
- }), ye = a(() => {
200
+ }), he = a(() => {
201
201
  if (!g.value || !r.value)
202
202
  return null;
203
203
  const e = V.value;
204
204
  return e && e.channelType === r.value ? e : null;
205
205
  }), K = (e) => {
206
206
  var De;
207
- const o = typeof e == "string" ? e : e == null ? void 0 : e.channelId, t = typeof e == "object" && e != null ? e.backendChannelId : void 0, s = (p, ee) => !p || !ee ? !1 : !!(p === ee || t && (p === t || ee === t)), d = ye.value;
207
+ const o = typeof e == "string" ? e : e == null ? void 0 : e.channelId, t = typeof e == "object" && e != null ? e.backendChannelId : void 0, s = (p, ee) => !p || !ee ? !1 : !!(p === ee || t && (p === t || ee === t)), d = he.value;
208
208
  if (d != null && d.channelId && s(d.channelId, o))
209
209
  return !0;
210
210
  const f = r.value, I = Q.value;
@@ -215,24 +215,24 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
215
215
  }
216
216
  return g.value && f && I && J.value && O(I, J.value) && s(de.value, o) ? !0 : s(de.value, o);
217
217
  }, E = (e) => {
218
- const o = ye.value;
218
+ const o = he.value;
219
219
  return o != null && o.attributeId ? O(e, o.attributeId) : O(e, J.value);
220
- }, Q = a(() => D.value ?? R.value ?? null), Ce = (e) => {
220
+ }, Q = a(() => D.value ?? R.value ?? null), be = (e) => {
221
221
  const o = e == null ? void 0 : e.backendChannelId;
222
222
  return o ? [o] : [];
223
- }, X = (e) => yt(
223
+ }, X = (e) => ht(
224
224
  Q.value,
225
225
  e.channelId,
226
226
  K(e),
227
- b.value,
228
- Ce(e)
229
- ), Ye = (e) => Ct(
227
+ C.value,
228
+ be(e)
229
+ ), Ye = (e) => bt(
230
230
  Q.value,
231
231
  e.channelId,
232
232
  K(e),
233
- b.value,
234
- Ce(e)
235
- ) ?? "", Y = a(() => i.contactAttributes ?? []), be = (e) => {
233
+ C.value,
234
+ be(e)
235
+ ) ?? "", Y = a(() => i.contactAttributes ?? []), Ce = (e) => {
236
236
  var d;
237
237
  if (!e || !re.value) return !0;
238
238
  const o = (d = ze.value) == null ? void 0 : d.chatId;
@@ -246,14 +246,14 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
246
246
  ) : !0;
247
247
  }, ge = () => {
248
248
  $(), A.value = !0, le(() => {
249
- const e = Array.isArray(C.value) ? C.value[0] : C.value;
249
+ const e = Array.isArray(b.value) ? b.value[0] : b.value;
250
250
  e && typeof e.startAutoShow == "function" ? e.startAutoShow() : console.log("startAutoShow method not found on tooltipRef");
251
251
  }), x.value = setTimeout(() => {
252
252
  A.value = !1;
253
253
  }, 5e3);
254
254
  }, $ = () => {
255
- if (x.value && (clearTimeout(x.value), x.value = null), C.value) {
256
- const e = Array.isArray(C.value) ? C.value[0] : C.value;
255
+ if (x.value && (clearTimeout(x.value), x.value = null), b.value) {
256
+ const e = Array.isArray(b.value) ? b.value[0] : b.value;
257
257
  e && typeof e.clearAutoTimer == "function" && e.clearAutoTimer();
258
258
  }
259
259
  A.value = !1;
@@ -271,7 +271,7 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
271
271
  availableChannels: nt,
272
272
  applyRecentChannelButtonSelection: ot,
273
273
  clearPanelPendingSelection: Ie
274
- } = bt({
274
+ } = Ct({
275
275
  activeChannelType: r,
276
276
  channels: H,
277
277
  selectedChannel: U,
@@ -284,7 +284,7 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
284
284
  hasMultipleChannels: S,
285
285
  getSingleChannelForType: We,
286
286
  getAvailableChannels: ve,
287
- isChannelEmpty: be,
287
+ isChannelEmpty: Ce,
288
288
  isNewDialog: ce,
289
289
  showDefaultChannelTooltipWithTimer: ge,
290
290
  clearDefaultChannelTooltip: $,
@@ -302,7 +302,7 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
302
302
  showSubMenu: G,
303
303
  frozenAttribute: R,
304
304
  hoveredAttribute: D,
305
- confirmingAttributeId: b,
305
+ confirmingAttributeId: C,
306
306
  retainOpenUntilDismiss: Ge,
307
307
  hasMultipleChannels: S,
308
308
  isAttributeBlocked: M
@@ -330,7 +330,7 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
330
330
  selectedChannel: U,
331
331
  channels: H,
332
332
  selectedDialog: a(() => i.selectedDialog ?? null),
333
- isChannelEmpty: be,
333
+ isChannelEmpty: Ce,
334
334
  isNewDialog: ce,
335
335
  showDefaultChannelTooltipWithTimer: ge,
336
336
  clearDefaultChannelTooltip: $
@@ -347,7 +347,7 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
347
347
  }), _e = a(
348
348
  () => nt()
349
349
  ), rt = a(
350
- () => G.value && D.value && _e.value.length > 0 && r.value !== "phone" && S(r.value)
350
+ () => G.value && D.value && _e.value.length > 0 && S(r.value)
351
351
  ), we = async (e, o) => {
352
352
  const t = st(e, o.currentTarget);
353
353
  await le(), t instanceof HTMLElement && at(L, t);
@@ -355,7 +355,7 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
355
355
  return z(() => i.confirmingAttributeId, (e, o) => {
356
356
  e || (q.value = null, o && Xe());
357
357
  }), z(Y, () => {
358
- const e = b.value;
358
+ const e = C.value;
359
359
  if (!e)
360
360
  return;
361
361
  const o = Y.value.find((t) => t.id === e);
@@ -363,9 +363,9 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
363
363
  }, { deep: !0 }), z(() => i.selectedDialog, () => {
364
364
  Ie();
365
365
  }, { deep: !0 }), ct(() => {
366
- document.addEventListener("click", he), Ze();
366
+ document.addEventListener("click", ye), Ze();
367
367
  }), dt(() => {
368
- document.removeEventListener("click", he), $();
368
+ document.removeEventListener("click", ye), $();
369
369
  }), Oe({
370
370
  /** Снять pin и закрыть оба меню (вызывать с host при ОК на splash). */
371
371
  closeMenu: N
@@ -398,35 +398,35 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
398
398
  ne(se, {
399
399
  ref_for: !0,
400
400
  ref: (d) => {
401
- d && (C.value = d);
401
+ d && (b.value = d);
402
402
  },
403
403
  text: A.value ? "Выбран канал по умолчанию, можно изменить в настройках профиля" : (s = U.value) == null ? void 0 : s.title,
404
404
  position: "bottom-left",
405
405
  offset: 8,
406
- delay: y.tooltipDelay,
406
+ delay: h.tooltipDelay,
407
407
  "hide-on-click": "",
408
408
  trigger: A.value ? "auto" : "hover",
409
409
  "auto-show-duration": A.value ? 5e3 : 0
410
410
  }, {
411
411
  default: oe(() => [
412
412
  c("span", wt, [
413
- (l(), h(w(t.component)))
413
+ (l(), y(w(t.component)))
414
414
  ])
415
415
  ]),
416
416
  _: 2
417
417
  }, 1032, ["text", "delay", "trigger", "auto-show-duration"]),
418
418
  o[5] || (o[5] = c("span", { class: "active-indicator" }, null, -1))
419
- ], 64)) : (l(), h(se, {
419
+ ], 64)) : (l(), y(se, {
420
420
  key: 1,
421
421
  text: n(Ue)(t.type),
422
422
  position: "bottom-left",
423
423
  offset: 8,
424
- delay: y.tooltipDelay,
424
+ delay: h.tooltipDelay,
425
425
  "hide-on-click": ""
426
426
  }, {
427
427
  default: oe(() => [
428
428
  c("span", Dt, [
429
- (l(), h(w(t.component)))
429
+ (l(), y(w(t.component)))
430
430
  ])
431
431
  ]),
432
432
  _: 2
@@ -439,12 +439,12 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
439
439
  n(Se) ? v("", !0) : (l(!0), u(_, { key: 1 }, te(n(Z)[n(r)], (t) => (l(), u(_, {
440
440
  key: t.attributeId
441
441
  }, [
442
- Fe(t) ? (l(), h(se, {
442
+ Fe(t) ? (l(), y(se, {
443
443
  key: 0,
444
444
  text: fe(t),
445
445
  position: "bottom-left",
446
446
  offset: 8,
447
- delay: y.tooltipDelay,
447
+ delay: h.tooltipDelay,
448
448
  "hide-on-click": ""
449
449
  }, {
450
450
  default: oe(() => [
@@ -452,7 +452,7 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
452
452
  class: k(["attribute-item", n(Re)(t), {
453
453
  "frozen-hover": n(ke)(t),
454
454
  selected: E(t),
455
- confirming: n(xe)(t, b.value),
455
+ confirming: n(xe)(t, C.value),
456
456
  blocked: M(t)
457
457
  }]),
458
458
  "data-attribute-status": t.status,
@@ -464,19 +464,19 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
464
464
  ne(qe, {
465
465
  attribute: t,
466
466
  "is-selected": E(t),
467
- "confirming-attribute-id": b.value,
467
+ "confirming-attribute-id": C.value,
468
468
  "blocked-attribute-ids": W.value,
469
469
  "indicator-tooltips": ie.value,
470
- "tooltip-delay": y.tooltipDelay
470
+ "tooltip-delay": h.tooltipDelay
471
471
  }, null, 8, ["attribute", "is-selected", "confirming-attribute-id", "blocked-attribute-ids", "indicator-tooltips", "tooltip-delay"]),
472
472
  c("span", Pt, F(t.value), 1)
473
473
  ]),
474
474
  c("span", Bt, [
475
- n(S)(n(r)) ? (l(), u("span", Nt)) : y.showChannelIcons ? (l(), u("span", {
475
+ n(S)(n(r)) ? (l(), u("span", Nt)) : h.showChannelIcons ? (l(), u("span", {
476
476
  key: 1,
477
477
  class: k(["channel-icon-small", { "menu-icon-grey": n(r) !== "sms" }])
478
478
  }, [
479
- (l(), h(w(n(me)(n(r)))))
479
+ (l(), y(w(n(me)(n(r)))))
480
480
  ], 2)) : v("", !0)
481
481
  ])
482
482
  ], 42, qt)
@@ -487,7 +487,7 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
487
487
  class: k(["attribute-item", n(Re)(t), {
488
488
  "frozen-hover": n(ke)(t),
489
489
  selected: E(t),
490
- confirming: n(xe)(t, b.value),
490
+ confirming: n(xe)(t, C.value),
491
491
  blocked: M(t)
492
492
  }]),
493
493
  "data-attribute-status": t.status,
@@ -499,19 +499,19 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
499
499
  ne(qe, {
500
500
  attribute: t,
501
501
  "is-selected": E(t),
502
- "confirming-attribute-id": b.value,
502
+ "confirming-attribute-id": C.value,
503
503
  "blocked-attribute-ids": W.value,
504
504
  "indicator-tooltips": ie.value,
505
- "tooltip-delay": y.tooltipDelay
505
+ "tooltip-delay": h.tooltipDelay
506
506
  }, null, 8, ["attribute", "is-selected", "confirming-attribute-id", "blocked-attribute-ids", "indicator-tooltips", "tooltip-delay"]),
507
507
  c("span", jt, F(t.value), 1)
508
508
  ]),
509
509
  c("span", zt, [
510
- n(S)(n(r)) ? (l(), u("span", Ft)) : y.showChannelIcons ? (l(), u("span", {
510
+ n(S)(n(r)) ? (l(), u("span", Ft)) : h.showChannelIcons ? (l(), u("span", {
511
511
  key: 1,
512
512
  class: k(["channel-icon-small", { "menu-icon-grey": n(r) !== "sms" }])
513
513
  }, [
514
- (l(), h(w(n(me)(n(r)))))
514
+ (l(), y(w(n(me)(n(r)))))
515
515
  ], 2)) : v("", !0)
516
516
  ])
517
517
  ], 42, Et))
@@ -534,25 +534,25 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
534
534
  key: 0,
535
535
  class: k(Ye(t))
536
536
  }, [
537
- X(t) === "spinner" ? (l(), h(n(Mt), { key: 0 })) : X(t) === "unconfirmed" ? (l(), h(n(Tt), { key: 1 })) : (l(), h(n(At), { key: 2 }))
537
+ X(t) === "spinner" ? (l(), y(n(Mt), { key: 0 })) : X(t) === "unconfirmed" ? (l(), y(n(Tt), { key: 1 })) : (l(), y(n(At), { key: 2 }))
538
538
  ], 2)) : v("", !0)
539
539
  ]),
540
540
  c("span", Vt, [
541
541
  c("span", Wt, F(t.title || t.channelId), 1),
542
542
  t.isBot ? (l(), u("span", Ht, "бот")) : v("", !0)
543
543
  ]),
544
- y.showChannelIcons ? (l(), u("span", {
544
+ h.showChannelIcons ? (l(), u("span", {
545
545
  key: 0,
546
546
  class: k(["sub-menu-icon", { "menu-icon-grey": n(Ve)(t.channelId) !== "sms" }])
547
547
  }, [
548
- (l(), h(w(n(He)(t.channelId))))
548
+ (l(), y(w(n(He)(t.channelId))))
549
549
  ], 2)) : v("", !0)
550
550
  ], 10, Lt))), 128))
551
551
  ], 36)) : v("", !0)
552
552
  ])) : v("", !0)
553
553
  ], 512));
554
554
  }
555
- }, cn = /* @__PURE__ */ St(Gt, [["__scopeId", "data-v-38881acf"]]);
555
+ }, cn = /* @__PURE__ */ St(Gt, [["__scopeId", "data-v-50d20b1d"]]);
556
556
  export {
557
557
  cn as default
558
558
  };
@@ -1,39 +1,39 @@
1
1
  import { needsAttributeConfirmation as m } from "./useCommunicationAttributes.js";
2
- import { resolveRecentChannelSelection as K } from "./useCommunicationRecentSelection.js";
3
- function Z({
4
- activeChannelType: l,
2
+ import { resolveRecentChannelSelection as L } from "./useCommunicationRecentSelection.js";
3
+ function _({
4
+ activeChannelType: f,
5
5
  channels: v,
6
6
  selectedChannel: i,
7
7
  selectedChannelType: s,
8
- hoveredAttribute: z,
8
+ hoveredAttribute: G,
9
9
  confirmingAttributeId: q,
10
10
  isAttributeBlocked: u,
11
- closeMenu: a,
12
- pinMenuOpen: A,
13
- hasMultipleChannels: G,
14
- getSingleChannelForType: x,
15
- getAvailableChannels: C,
11
+ closeMenu: l,
12
+ pinMenuOpen: H,
13
+ hasMultipleChannels: x,
14
+ getSingleChannelForType: j,
15
+ getAvailableChannels: z,
16
16
  isChannelEmpty: d,
17
17
  isNewDialog: I,
18
18
  showDefaultChannelTooltipWithTimer: R,
19
19
  clearDefaultChannelTooltip: S,
20
20
  emit: t,
21
- panelPendingSelection: f
21
+ panelPendingSelection: a
22
22
  }) {
23
- const b = (n, e, r) => {
24
- u(n) || (A(), q.value = n.id, t("confirm-attribute", {
23
+ const b = (n, r, e) => {
24
+ u(n) || (H(), q.value = n.id, t("confirm-attribute", {
25
25
  attributeId: n.id,
26
- channelId: e,
27
- channelType: r,
26
+ channelId: r,
27
+ channelType: e,
28
28
  attribute: n
29
29
  }));
30
- }, H = (n, e, r) => {
30
+ }, J = (n, r, e) => {
31
31
  if (m(n)) {
32
- b(n, e, r);
32
+ b(n, r, e);
33
33
  return;
34
34
  }
35
- j(n, e);
36
- }, h = (n) => {
35
+ C(n, r);
36
+ }, A = (n) => {
37
37
  if (!(!n || u(n))) {
38
38
  if (m(n)) {
39
39
  b(n, "", "phone");
@@ -42,78 +42,80 @@ function Z({
42
42
  t("phone-call", {
43
43
  attributeId: n.id,
44
44
  phoneNumber: n.data
45
- }), a();
45
+ }), l();
46
46
  }
47
- }, j = (n, e) => {
47
+ }, C = (n, r) => {
48
48
  t("select-attribute-channel", {
49
49
  attributeId: n.id,
50
- channelId: e
51
- }), s.value = l.value, i.value = v.value.find((r) => r.channelId === e) ?? {}, d(e) && I.value ? R() : S(), a();
50
+ channelId: r
51
+ }), s.value = f.value, i.value = v.value.find((e) => e.channelId === r) ?? {}, d(r) && I.value ? R() : S(), l();
52
52
  };
53
53
  return {
54
- handlePhoneCall: h,
54
+ handlePhoneCall: A,
55
55
  handleAttributeClick: (n) => {
56
56
  if (q.value || u(n))
57
57
  return;
58
- const e = l.value;
59
- if (e) {
60
- if (e === "phone") {
61
- h(n);
58
+ const r = f.value;
59
+ if (r) {
60
+ if (r === "phone") {
61
+ if (x(r))
62
+ return;
63
+ A(n);
62
64
  return;
63
65
  }
64
- if (!G(e)) {
65
- const r = x(e);
66
- r && H(n, r.channelId, e);
66
+ if (!x(r)) {
67
+ const e = j(r);
68
+ e && J(n, e.channelId, r);
67
69
  }
68
70
  }
69
71
  },
70
- selectSingleChannel: j,
72
+ selectSingleChannel: C,
71
73
  selectChannel: (n) => {
72
- const e = z.value, r = l.value;
73
- if (!e || !r) {
74
- a();
74
+ const r = G.value, e = f.value;
75
+ if (!r || !e) {
76
+ l();
75
77
  return;
76
78
  }
77
- if (!u(e)) {
78
- if (m(e)) {
79
- b(e, n, r);
79
+ if (!u(r)) {
80
+ if (m(r)) {
81
+ b(r, n, e);
80
82
  return;
81
83
  }
82
84
  t("select-attribute-channel", {
83
- attributeId: e.id,
85
+ attributeId: r.id,
84
86
  channelId: n
85
- }), s.value = r, i.value = v.value.find((c) => c.channelId === n) ?? {}, d(n) && I.value ? R() : S(), a();
87
+ }), s.value = e, i.value = v.value.find((c) => c.channelId === n) ?? {}, d(n) && I.value ? R() : S(), l();
86
88
  }
87
89
  },
88
90
  availableChannels: () => {
89
- const n = l.value;
90
- return n ? C(n) : [];
91
+ const n = f.value;
92
+ return n ? z(n) : [];
91
93
  },
92
- applyRecentChannelButtonSelection: (n, e, r) => {
93
- const c = K(
94
+ applyRecentChannelButtonSelection: (n, r, e) => {
95
+ const c = L(
94
96
  n,
95
- e,
96
97
  r,
97
- x,
98
- C
98
+ e,
99
+ j,
100
+ z
99
101
  );
100
102
  if (!c)
101
103
  return !1;
102
104
  const { attribute: P, channelId: o } = c;
103
- return u(P) ? !1 : (f && (f.value = {
105
+ return u(P) ? !1 : (a && (a.value = {
104
106
  channelType: n,
105
107
  attributeId: P.id,
106
108
  channelId: o
107
109
  }), t("select-attribute-channel", {
108
110
  attributeId: P.id,
109
111
  channelId: o
110
- }), s.value = n, i.value = v.value.find((J) => J.channelId === o) ?? {}, d(o) && I.value ? R() : S(), !0);
112
+ }), s.value = n, i.value = v.value.find((K) => K.channelId === o) ?? {}, d(o) && I.value ? R() : S(), !0);
111
113
  },
112
114
  clearPanelPendingSelection: () => {
113
- f && (f.value = null);
115
+ a && (a.value = null);
114
116
  }
115
117
  };
116
118
  }
117
119
  export {
118
- Z as useCommunicationActions
120
+ _ as useCommunicationActions
119
121
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mobilon-dev/chotto",
3
- "version": "0.3.126",
3
+ "version": "0.3.127",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",