@yourgoods/ui-smart 0.53.6 → 0.53.7

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,6 +1,6 @@
1
1
  import { defineComponent as oe, ref as T, reactive as Z, watch as Y, computed as b, toRefs as ce, createElementBlock as I, openBlock as y, createElementVNode as x, createCommentVNode as D, toDisplayString as _, createVNode as $, unref as u, isRef as ee, withCtx as G, createTextVNode as ie, Fragment as Ae, createBlock as H, resolveDynamicComponent as he, onMounted as Fe } from "vue";
2
- import { _ as ve, c as ke, u as Re, a as ze, P as Me, b as We } from "./useRateLimitToast-DCoAsFEo.js";
3
- import { C as F, _ as He, B as qe, p as W, g as je } from "./index-CfmFrMSL.js";
2
+ import { _ as ve, c as ke, u as Re, a as ze, P as Me, b as We } from "./useRateLimitToast-Bfna_sAM.js";
3
+ import { C as F, _ as He, B as qe, p as W, g as je } from "./index-CEiwFzrU.js";
4
4
  import { PInput as J, IconMailMd as pe, PButton as ne, IconEyeMd as Ve, IconEyeClosedMd as be, PDialog as Ge, PTopBar as Ye, IconCrossMd as Je } from "@profeat/ui-kit";
5
5
  const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dialogDefaultContainerTextHint" }, Xe = {
6
6
  key: 0,
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as ye, ref as a, reactive as _, computed as u, watch as Z, onMounted as Ce, createElementBlock as S, openBlock as g, Fragment as ge, createVNode as n, unref as o, withCtx as m, createCommentVNode as ee, createElementVNode as r, toDisplayString as V, createBlock as B, resolveDynamicComponent as $, createTextVNode as z } from "vue";
2
- import { C as I, p as D, g as Ve } from "./index-CfmFrMSL.js";
2
+ import { C as I, p as D, g as Ve } from "./index-CEiwFzrU.js";
3
3
  import { PDialog as be, PInput as M, IconEyeMd as O, IconEyeClosedMd as U, PButton as F, PTopBar as Te, IconCrossMd as Ie, PTeleportContainer as xe } from "@profeat/ui-kit";
4
4
  function ke(b) {
5
5
  return { showPasswordRateLimitToast: (P) => {
@@ -1,7 +1,7 @@
1
1
  import { createElementBlock as S, openBlock as v, createElementVNode as H, defineComponent as he, reactive as ve, watch as _, ref as O, toRefs as Ce, computed as I, createCommentVNode as B, createVNode as b, toDisplayString as G, createBlock as J, createTextVNode as Z, unref as r, isRef as le, withCtx as X, onMounted as We, Fragment as je } from "vue";
2
- import { _ as we, c as Ne, a as He, u as Ge, P as Oe, b as Je } from "./useRateLimitToast-DCoAsFEo.js";
2
+ import { _ as we, c as Ne, a as He, u as Ge, P as Oe, b as Je } from "./useRateLimitToast-Bfna_sAM.js";
3
3
  import { IconTelegramSm as Pe, PInput as se, IconPhoneMd as Re, IconMailMd as Ke, PButton as ze, PDialog as Qe, PTopBar as Xe, IconCrossMd as Ye, PTeleportContainer as Ze } from "@profeat/ui-kit";
4
- import { C as j, t as De, p as te, g as Ae } from "./index-CfmFrMSL.js";
4
+ import { C as j, t as De, p as te, g as Ae } from "./index-CEiwFzrU.js";
5
5
  const _e = {
6
6
  xmlns: "http://www.w3.org/2000/svg",
7
7
  width: "12",
@@ -1,6 +1,6 @@
1
- import { ref as w, shallowRef as Oe, defineComponent as j, defineAsyncComponent as q, watch as me, createBlock as A, createCommentVNode as T, unref as f, openBlock as b, resolveDynamicComponent as _e, mergeProps as Re, computed as D, reactive as W, onMounted as Ge, createElementBlock as U, Fragment as pe, createVNode as h, createElementVNode as Y, withCtx as x, toDisplayString as $, createTextVNode as X, Teleport as ue, Transition as je, withDirectives as Je, vShow as qe } from "vue";
1
+ import { ref as w, shallowRef as Oe, defineComponent as j, defineAsyncComponent as q, watch as me, createBlock as A, createCommentVNode as T, unref as g, openBlock as b, resolveDynamicComponent as Re, mergeProps as _e, computed as D, reactive as W, onMounted as Ge, createElementBlock as U, Fragment as pe, createVNode as h, createElementVNode as Y, withCtx as x, toDisplayString as $, createTextVNode as X, Teleport as ue, Transition as je, withDirectives as Je, vShow as qe } from "vue";
2
2
  import We from "axios";
3
- import { PInputFileUploader as Ye, PInput as M, IconFilledEditMd as R, PButton as de, PImageCropper as Xe, PToast as Ke, PTeleportContainer as ce, PToastContainer as Ze, IconPhoneMd as He, IconMailMd as Qe } from "@profeat/ui-kit";
3
+ import { PInputFileUploader as Ye, PInput as M, IconFilledEditMd as _, PButton as de, PImageCropper as Xe, PToast as Ke, PTeleportContainer as ce, PToastContainer as Ze, IconPhoneMd as He, IconMailMd as Qe } from "@profeat/ui-kit";
4
4
  function ea(l, i = 2) {
5
5
  if (l === 0)
6
6
  return "0 B";
@@ -217,32 +217,32 @@ const sa = {
217
217
  },
218
218
  emits: ["clean-input-errors", "on-update-jwt", "update-phone-field", "update-email-field", "on-password-error", "on-toast"],
219
219
  setup(l, { emit: i }) {
220
- const t = i, n = w(!0), { currentDialog: p, dialogPayload: v, closeDialog: B } = ee(), u = {
221
- email: q(() => import("./ProfileEmailDialog-DNqCaOPA.js")),
222
- phone: q(() => import("./ProfilePhoneDialog-tKedDfS4.js")),
223
- password: q(() => import("./ProfilePasswordDialog-CdZ5dWF0.js"))
224
- }, c = ({ email: g }) => {
225
- t("update-email-field", g);
226
- }, s = ({ phone: g }) => {
227
- t("update-phone-field", g);
220
+ const t = i, n = w(!0), { currentDialog: p, dialogPayload: v, closeDialog: B } = ee(), d = {
221
+ email: q(() => import("./ProfileEmailDialog-fkiqQ4WV.js")),
222
+ phone: q(() => import("./ProfilePhoneDialog-C2iDBDNA.js")),
223
+ password: q(() => import("./ProfilePasswordDialog-DYK3bH4Y.js"))
224
+ }, c = ({ email: f }) => {
225
+ t("update-email-field", f);
226
+ }, s = ({ phone: f }) => {
227
+ t("update-phone-field", f);
228
228
  };
229
- return me(p, (g) => {
230
- n.value = !!g;
231
- }), (g, d) => f(p) ? (b(), A(_e(u[f(p)]), Re({
229
+ return me(p, (f) => {
230
+ n.value = !!f;
231
+ }), (f, u) => g(p) ? (b(), A(Re(d[g(p)]), _e({
232
232
  key: 0,
233
233
  modelValue: n.value,
234
- "onUpdate:modelValue": d[0] || (d[0] = (m) => n.value = m),
235
- language: g.language,
236
- provider: g.provider,
237
- "disable-add-phone": g.disableAddPhone
238
- }, f(v), {
239
- onClose: f(B),
240
- onCleanInputErrors: d[1] || (d[1] = (m) => t("clean-input-errors")),
241
- onOnUpdateJwt: d[2] || (d[2] = (m, y, r) => t("on-update-jwt", m, y, r)),
234
+ "onUpdate:modelValue": u[0] || (u[0] = (m) => n.value = m),
235
+ language: f.language,
236
+ provider: f.provider,
237
+ "disable-add-phone": f.disableAddPhone
238
+ }, g(v), {
239
+ onClose: g(B),
240
+ onCleanInputErrors: u[1] || (u[1] = (m) => t("clean-input-errors")),
241
+ onOnUpdateJwt: u[2] || (u[2] = (m, y, r) => t("on-update-jwt", m, y, r)),
242
242
  onSubmitEmail: c,
243
243
  onSubmitPhone: s,
244
- onOnPasswordError: d[3] || (d[3] = (m, y) => t("on-password-error", m, y)),
245
- onOnToast: d[4] || (d[4] = (m) => t("on-toast", m))
244
+ onOnPasswordError: u[3] || (u[3] = (m, y) => t("on-password-error", m, y)),
245
+ onOnToast: u[4] || (u[4] = (m) => t("on-toast", m))
246
246
  }), null, 16, ["modelValue", "language", "provider", "disable-add-phone", "onClose"])) : T("", !0);
247
247
  }
248
248
  }), ua = { class: "base-container" }, da = {
@@ -278,7 +278,7 @@ const sa = {
278
278
  },
279
279
  emits: ["open-email-dialog", "open-phone-dialog", "open-password-dialog", "on-update-jwt", "on-password-error", "update-tokens"],
280
280
  setup(l, { emit: i }) {
281
- const t = l, n = i, p = D(() => t.language ?? "ru"), v = (e) => sa[p.value][e] || e, { openDialog: B } = ee(), u = W({ firstName: "", lastName: "" }), c = w({ firstName: "", lastName: "" }), s = W({ firstName: !1, lastName: !1, email: !1, phone: !1 }), g = w(""), d = w(""), m = w(""), y = w(!1), r = W({
281
+ const t = l, n = i, p = D(() => t.language ?? "ru"), v = (e) => sa[p.value][e] || e, { openDialog: B } = ee(), d = W({ firstName: "", lastName: "" }), c = w({ firstName: "", lastName: "" }), s = W({ firstName: !1, lastName: !1, email: !1, phone: !1 }), f = w(""), u = w(""), m = w(""), y = w(!1), r = W({
282
282
  value: null,
283
283
  loading: !1,
284
284
  accept: ["image/png", "image/jpeg"],
@@ -286,23 +286,23 @@ const sa = {
286
286
  // 10 MB
287
287
  imageBinary: null,
288
288
  imageContent: ""
289
- }), N = w(""), C = w(!1), I = w(!0), F = w(!0), V = w(void 0), ae = w(""), ge = D(() => oe(u.firstName, s.firstName)), ve = D(() => oe(u.lastName, s.lastName)), he = D(() => s.email && !d.value.trim() ? "Введите e-mail" : ""), ye = D(() => s.phone && !m.value.trim() ? "Введите номер телефона" : ""), S = (e) => t.fields.some((a) => a.key === e), te = (e) => e && e.trim() ? "edit" : "bind", J = () => setTimeout(() => {
289
+ }), N = w(""), C = w(!1), I = w(!0), F = w(!0), V = w(void 0), ae = w(""), ge = D(() => oe(d.firstName, s.firstName)), ve = D(() => oe(d.lastName, s.lastName)), he = D(() => s.email && !u.value.trim() ? "Введите e-mail" : ""), ye = D(() => s.phone && !m.value.trim() ? "Введите номер телефона" : ""), S = (e) => t.fields.some((a) => a.key === e), te = (e) => e && e.trim() ? "edit" : "bind", J = () => setTimeout(() => {
290
290
  var e;
291
291
  return (e = document.activeElement) == null ? void 0 : e.blur();
292
- }, 0), we = D(() => !!(d.value && d.value.trim() !== "")), be = D(() => r.imageContent ? v("Загрузить другое фото") : v("Загрузить фото")), oe = (e, a) => {
292
+ }, 0), we = D(() => !!(u.value && u.value.trim() !== "")), be = D(() => r.imageContent ? v("Загрузить другое фото") : v("Загрузить фото")), oe = (e, a) => {
293
293
  if (!a) return "";
294
294
  const o = e.trim();
295
295
  return o ? o.length < 2 ? "Поле должно содержать минимум 2 символа" : "" : "Введите значение";
296
296
  }, Ee = (e) => B("email", { mode: e ? "edit" : "bind", initialEmail: e }), Pe = () => {
297
- J(), s.email = !1, F.value = !1, n("open-email-dialog", d.value, te(d.value)), Ee(d.value);
297
+ J(), s.email = !1, F.value = !1, n("open-email-dialog", u.value, te(u.value)), Ee(u.value);
298
298
  }, Ne = () => {
299
299
  J(), s.phone = !1, I.value = !1, n("open-phone-dialog", m.value, te(m.value));
300
300
  }, Ce = async (e, a, o) => {
301
- e === "email" && o && (d.value = o), e === "phone" && o && (m.value = o), n("on-update-jwt");
301
+ e === "email" && o && (u.value = o), e === "phone" && o && (m.value = o), n("on-update-jwt");
302
302
  }, ke = (e) => {
303
303
  m.value = e;
304
304
  }, Te = (e) => {
305
- d.value = e;
305
+ u.value = e;
306
306
  }, Ue = (e, a) => {
307
307
  C.value = !0, n("on-password-error", e, a);
308
308
  }, Be = () => {
@@ -311,16 +311,16 @@ const sa = {
311
311
  C.value = !0, V.value = e.color ?? "", ae.value = e.text ?? "";
312
312
  }, L = (e) => {
313
313
  if (s[e] = !0, e === "firstName" || e === "lastName") {
314
- const a = u[e];
315
- a.length > 40 && (u[e] = a.slice(0, 40));
314
+ const a = d[e];
315
+ a.length > 40 && (d[e] = a.slice(0, 40));
316
316
  }
317
317
  }, De = (e) => {
318
- var O, _;
318
+ var O, R;
319
319
  if (N.value = "", !e) {
320
320
  ne();
321
321
  return;
322
322
  }
323
- const a = ((O = e.fileBinary) == null ? void 0 : O.type) ?? "", o = ((_ = e.fileBinary) == null ? void 0 : _.size) ?? 0, k = !["image/png", "image/jpeg"].includes(a), P = o > r.uploadLimit;
323
+ const a = ((O = e.fileBinary) == null ? void 0 : O.type) ?? "", o = ((R = e.fileBinary) == null ? void 0 : R.size) ?? 0, k = !["image/png", "image/jpeg"].includes(a), P = o > r.uploadLimit;
324
324
  if (k || P) {
325
325
  N.value = "Файл не подходит. Пожалуйста, загрузите PNG или JPEG размером до 10 МБ", ne();
326
326
  return;
@@ -359,7 +359,7 @@ const sa = {
359
359
  try {
360
360
  r.loading = !0;
361
361
  const E = new FormData();
362
- E.append("file", o), await H(`/users/profile/avatar/${g.value}`, E, { headers: { "Content-Type": void 0 } });
362
+ E.append("file", o), await H(`/users/profile/avatar/${f.value}`, E, { headers: { "Content-Type": void 0 } });
363
363
  } catch (E) {
364
364
  console.error(E), z({
365
365
  color: "error",
@@ -376,14 +376,14 @@ const sa = {
376
376
  ));
377
377
  }, le = w(!1), se = async (e) => {
378
378
  var o, E;
379
- const a = (o = u[e]) == null ? void 0 : o.trim();
379
+ const a = (o = d[e]) == null ? void 0 : o.trim();
380
380
  if (a)
381
381
  try {
382
382
  le.value = !0;
383
383
  const P = (E = (await H("/users/profile/update-name", { [e]: a })).data) == null ? void 0 : E.data;
384
- P != null && P.user && (u.firstName = P.user.firstName ?? u.firstName, u.lastName = P.user.lastName ?? u.lastName, c.value = {
385
- firstName: u.firstName,
386
- lastName: u.lastName
384
+ P != null && P.user && (d.firstName = P.user.firstName ?? d.firstName, d.lastName = P.user.lastName ?? d.lastName, c.value = {
385
+ firstName: d.firstName,
386
+ lastName: d.lastName
387
387
  });
388
388
  } catch (k) {
389
389
  throw k;
@@ -407,9 +407,9 @@ const sa = {
407
407
  privateFirstName: k,
408
408
  privateLastName: P,
409
409
  email: O,
410
- phoneNumber: _
410
+ phoneNumber: R
411
411
  } = o;
412
- g.value = E ?? "", u.firstName = k ?? "", u.lastName = P ?? "", d.value = O ?? "", m.value = _ ?? "", r.imageContent = await $e(), c.value = {
412
+ f.value = E ?? "", d.firstName = k ?? "", d.lastName = P ?? "", u.value = O ?? "", m.value = R ?? "", r.imageContent = await $e(), c.value = {
413
413
  firstName: k ?? "",
414
414
  lastName: P ?? ""
415
415
  };
@@ -437,7 +437,7 @@ const sa = {
437
437
  const ie = D(() => {
438
438
  if (!c.value.firstName && !c.value.lastName)
439
439
  return !1;
440
- const e = u.firstName.trim(), a = u.lastName.trim(), o = c.value.firstName.trim(), E = c.value.lastName.trim(), k = e !== o || a !== E, P = e.length >= 2 && a.length >= 2;
440
+ const e = d.firstName.trim(), a = d.lastName.trim(), o = c.value.firstName.trim(), E = c.value.lastName.trim(), k = e !== o || a !== E, P = e.length >= 2 && a.length >= 2;
441
441
  return k && P;
442
442
  }), ze = async () => {
443
443
  if (ie.value)
@@ -469,7 +469,7 @@ const sa = {
469
469
  onOnToast: z
470
470
  }, null, 8, ["language", "provider", "disable-add-phone"]),
471
471
  Y("div", ua, [
472
- S("avatar") ? (b(), A(f(Ye), {
472
+ S("avatar") ? (b(), A(g(Ye), {
473
473
  key: 0,
474
474
  modelValue: r.value,
475
475
  "onUpdate:modelValue": [
@@ -490,38 +490,38 @@ const sa = {
490
490
  X($(be.value), 1)
491
491
  ]),
492
492
  subtext: x(() => [
493
- N.value ? (b(), U("span", da, $(N.value), 1)) : (b(), U("span", ma, $(`${v("Формат")} ${f(ta)(r.accept).join(", ")} ${v("до")} ${f(ea)(r.uploadLimit)}`), 1))
493
+ N.value ? (b(), U("span", da, $(N.value), 1)) : (b(), U("span", ma, $(`${v("Формат")} ${g(ta)(r.accept).join(", ")} ${v("до")} ${g(ea)(r.uploadLimit)}`), 1))
494
494
  ]),
495
495
  _: 1
496
496
  }, 8, ["modelValue", "src", "loading", "label", "upload-limit"])) : T("", !0),
497
497
  S("firstName") ? (b(), U("div", pa, [
498
- h(f(M), {
499
- modelValue: u.firstName,
500
- "onUpdate:modelValue": a[2] || (a[2] = (o) => u.firstName = o),
498
+ h(g(M), {
499
+ modelValue: d.firstName,
500
+ "onUpdate:modelValue": a[2] || (a[2] = (o) => d.firstName = o),
501
501
  size: "large",
502
502
  label: v("Имя"),
503
503
  error: ge.value,
504
504
  onBlur: a[3] || (a[3] = (o) => s.firstName = !0),
505
505
  onInput: a[4] || (a[4] = (o) => L("firstName"))
506
506
  }, null, 8, ["modelValue", "label", "error"]),
507
- h(f(R), { class: "icon-locked" })
507
+ h(g(_), { class: "icon-locked" })
508
508
  ])) : T("", !0),
509
509
  S("lastName") ? (b(), U("div", ca, [
510
- h(f(M), {
511
- modelValue: u.lastName,
512
- "onUpdate:modelValue": a[5] || (a[5] = (o) => u.lastName = o),
510
+ h(g(M), {
511
+ modelValue: d.lastName,
512
+ "onUpdate:modelValue": a[5] || (a[5] = (o) => d.lastName = o),
513
513
  size: "large",
514
514
  label: v("Фамилия"),
515
515
  error: ve.value,
516
516
  onBlur: a[6] || (a[6] = (o) => s.lastName = !0),
517
517
  onInput: a[7] || (a[7] = (o) => L("lastName"))
518
518
  }, null, 8, ["modelValue", "label", "error"]),
519
- h(f(R), { class: "icon-locked" })
519
+ h(g(_), { class: "icon-locked" })
520
520
  ])) : T("", !0),
521
521
  S("email") ? (b(), U("div", fa, [
522
- h(f(M), {
523
- modelValue: d.value,
524
- "onUpdate:modelValue": a[8] || (a[8] = (o) => d.value = o),
522
+ h(g(M), {
523
+ modelValue: u.value,
524
+ "onUpdate:modelValue": a[8] || (a[8] = (o) => u.value = o),
525
525
  size: "large",
526
526
  "text-size": "medium",
527
527
  label: "E-mail",
@@ -533,10 +533,10 @@ const sa = {
533
533
  onInput: a[10] || (a[10] = (o) => L("email")),
534
534
  onClick: Pe
535
535
  }, null, 8, ["modelValue", "error"]),
536
- h(f(R), { class: "icon-locked" })
536
+ h(g(_), { class: "icon-locked" })
537
537
  ])) : T("", !0),
538
538
  S("phone") ? (b(), U("div", ga, [
539
- h(f(M), {
539
+ h(g(M), {
540
540
  modelValue: m.value,
541
541
  "onUpdate:modelValue": a[11] || (a[11] = (o) => m.value = o),
542
542
  size: "large",
@@ -550,10 +550,10 @@ const sa = {
550
550
  onInput: a[13] || (a[13] = (o) => L("phone")),
551
551
  onClick: Ne
552
552
  }, null, 8, ["modelValue", "label", "error"]),
553
- h(f(R), { class: "icon-locked" })
553
+ h(g(_), { class: "icon-locked" })
554
554
  ])) : T("", !0),
555
555
  Y("div", va, [
556
- we.value ? (b(), A(f(de), {
556
+ we.value ? (b(), A(g(de), {
557
557
  key: 0,
558
558
  color: "secondary",
559
559
  onClick: Le
@@ -563,7 +563,7 @@ const sa = {
563
563
  ]),
564
564
  _: 1
565
565
  })) : T("", !0),
566
- h(f(de), {
566
+ h(g(de), {
567
567
  disabled: !ie.value,
568
568
  onClick: ze
569
569
  }, {
@@ -579,7 +579,7 @@ const sa = {
579
579
  to: "body"
580
580
  }, [
581
581
  y.value ? (b(), U("div", ha, [
582
- h(f(Xe), {
582
+ h(g(Xe), {
583
583
  "circle-mode": !0,
584
584
  "model-value": r.imageContent,
585
585
  onClose: Fe,
@@ -592,7 +592,7 @@ const sa = {
592
592
  Y("div", ya, [
593
593
  h(je, { name: "list" }, {
594
594
  default: x(() => [
595
- Je(h(f(Ke), {
595
+ Je(h(g(Ke), {
596
596
  class: "toast",
597
597
  color: V.value,
598
598
  text: ae.value,
@@ -605,7 +605,7 @@ const sa = {
605
605
  })
606
606
  ])
607
607
  ])),
608
- h(f(ce))
608
+ h(g(ce))
609
609
  ], 64));
610
610
  }
611
611
  }), fe = (l, i) => {
@@ -634,11 +634,11 @@ const sa = {
634
634
  n("phone", { initialPhone: c, mode: s });
635
635
  }, B = () => {
636
636
  n("password");
637
- }, u = (c, s, g) => {
638
- t("on-update-jwt", c, s, g);
637
+ }, d = (c, s, f) => {
638
+ t("on-update-jwt", c, s, f);
639
639
  };
640
640
  return (c, s) => (b(), U(pe, null, [
641
- h(f(Ze)),
641
+ h(g(Ze)),
642
642
  h(ba, {
643
643
  "throttler-prefix": c.throttlerPrefix,
644
644
  provider: c.provider,
@@ -652,9 +652,9 @@ const sa = {
652
652
  onOpenEmailDialog: p,
653
653
  onOpenPhoneDialog: v,
654
654
  onOpenPasswordDialog: B,
655
- onOnUpdateJwt: u
655
+ onOnUpdateJwt: d
656
656
  }, null, 8, ["throttler-prefix", "provider", "request-url", "language", "fields", "access-token", "refresh-token", "aws-storage-url", "disable-add-phone"]),
657
- h(f(ce))
657
+ h(g(ce))
658
658
  ], 64));
659
659
  }
660
660
  }), Ea = 10, Pa = 15;
@@ -698,11 +698,11 @@ const Ia = { class: "smart-input" }, Aa = /* @__PURE__ */ j({
698
698
  emits: ["update:modelValue", "validity-change", "type-change"],
699
699
  setup(l, { emit: i }) {
700
700
  const t = l, n = i, p = D(() => {
701
- var s, g, d, m, y, r, N, C, I, F, V;
701
+ var s, f, u, m, y, r, N, C, I, F, V;
702
702
  return {
703
703
  mode: ((s = t.config) == null ? void 0 : s.mode) ?? "auto",
704
704
  phone: {
705
- enabled: ((d = (g = t.config) == null ? void 0 : g.phone) == null ? void 0 : d.enabled) ?? !0,
705
+ enabled: ((u = (f = t.config) == null ? void 0 : f.phone) == null ? void 0 : u.enabled) ?? !0,
706
706
  minDigits: ((y = (m = t.config) == null ? void 0 : m.phone) == null ? void 0 : y.minDigits) ?? 10,
707
707
  maxDigits: ((N = (r = t.config) == null ? void 0 : r.phone) == null ? void 0 : N.maxDigits) ?? 15,
708
708
  autoPlus: ((I = (C = t.config) == null ? void 0 : C.phone) == null ? void 0 : I.autoPlus) ?? !0
@@ -711,53 +711,56 @@ const Ia = { class: "smart-input" }, Aa = /* @__PURE__ */ j({
711
711
  enabled: ((V = (F = t.config) == null ? void 0 : F.email) == null ? void 0 : V.enabled) ?? !0
712
712
  }
713
713
  };
714
- }), v = w(t.modelValue ?? ""), B = w(null), u = w("");
714
+ }), v = w(t.modelValue ?? ""), B = w(null), d = w("");
715
715
  me(() => t.modelValue, (s) => {
716
716
  s !== void 0 && (v.value = s);
717
717
  });
718
718
  function c(s) {
719
719
  var y, r, N;
720
- if (u.value = "", typeof s != "string") return;
721
- const g = p.value.mode === "auto" ? Da(s, p.value) : p.value.mode;
722
- B.value = g, n("type-change", g);
723
- let d = s, m = !0;
724
- if (g === "phone") {
720
+ if (d.value = "", typeof s != "string") return;
721
+ const f = p.value.mode === "auto" ? Da(s, p.value) : p.value.mode;
722
+ B.value = f, n("type-change", f);
723
+ let u = s, m = !0;
724
+ if (f === "phone") {
725
725
  const C = Na(
726
726
  s,
727
727
  p.value.phone.autoPlus,
728
728
  t.locale
729
729
  );
730
- if (Ca(C).length > p.value.phone.maxDigits)
730
+ if (Ca(C).length > p.value.phone.maxDigits) {
731
+ n("validity-change", !1);
731
732
  return;
732
- Ta(s) && (u.value = ((y = t.errorMessages) == null ? void 0 : y.invalidPhoneChars) ?? "Допустимы только цифры и знак +", m = !1), ka(
733
+ }
734
+ Ta(s) && (d.value = ((y = t.errorMessages) == null ? void 0 : y.invalidPhoneChars) ?? "Допустимы только цифры и знак +", m = !1), ka(
733
735
  C,
734
736
  p.value.phone.minDigits,
735
737
  p.value.phone.maxDigits
736
- ) || (u.value || (u.value = ((r = t.errorMessages) == null ? void 0 : r.invalidPhoneLength) ?? "Это не похоже на номер телефона"), m = !1), d = C, n("validity-change", m);
738
+ ) || (d.value || (d.value = ((r = t.errorMessages) == null ? void 0 : r.invalidPhoneLength) ?? "Это не похоже на номер телефона"), m = !1), u = C, n("validity-change", m);
737
739
  }
738
- g === "email" && (m = Ba(s), m || (u.value = ((N = t.errorMessages) == null ? void 0 : N.invalidEmail) ?? "Это не похоже на email"), n("validity-change", m)), v.value = d, n("update:modelValue", d);
740
+ f === "email" && (m = Ba(s), m || (d.value = ((N = t.errorMessages) == null ? void 0 : N.invalidEmail) ?? "Это не похоже на email"), n("validity-change", m)), v.value = u, n("update:modelValue", u);
739
741
  }
740
- return (s, g) => (b(), U("div", Ia, [
741
- h(f(M), {
742
+ return (s, f) => (b(), U("div", Ia, [
743
+ h(g(M), {
742
744
  "model-value": v.value,
743
745
  readonly: s.disabled,
744
- error: u.value,
746
+ error: d.value,
745
747
  type: s.type ?? "text",
746
748
  size: s.size ?? "large",
747
749
  label: s.label ?? "Email или телефон",
750
+ onBeforeInput: f[0] || (f[0] = (u) => console.log("beforeinput", u)),
748
751
  "onUpdate:modelValue": c
749
752
  }, null, 8, ["model-value", "readonly", "error", "type", "size", "label"]),
750
- B.value === "phone" ? (b(), A(f(He), {
753
+ B.value === "phone" ? (b(), A(g(He), {
751
754
  key: 0,
752
755
  class: "smart-input__icon"
753
756
  })) : T("", !0),
754
- B.value === "email" ? (b(), A(f(Qe), {
757
+ B.value === "email" ? (b(), A(g(Qe), {
755
758
  key: 1,
756
759
  class: "smart-input__icon"
757
760
  })) : T("", !0)
758
761
  ]));
759
762
  }
760
- }), za = /* @__PURE__ */ fe(Aa, [["__scopeId", "data-v-5b8be878"]]);
763
+ }), za = /* @__PURE__ */ fe(Aa, [["__scopeId", "data-v-01dc0d3f"]]);
761
764
  export {
762
765
  $a as B,
763
766
  xa as C,
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".avatar-input[data-v-a56fcdbb] .p-input-file .overlay{visibility:hidden}.avatar-input[data-v-a56fcdbb] .p-input-file:hover .overlay{visibility:visible}.smart-input[data-v-5b8be878]{position:relative;width:100%}.smart-input__icon[data-v-5b8be878]{position:absolute;top:16px;right:16px;pointer-events:none;opacity:.5}.icon-locked{pointer-events:auto;position:absolute;right:1rem;top:1rem;color:#b6c7d6}.input-wrapper{position:relative;width:100%}.dialogTitle{z-index:10;width:100%;font-size:16px;font-weight:600;line-height:24px;text-align:center;color:#2b3238}.dialogDefaultContainer{display:flex;align-items:flex-start;flex-direction:column;width:100%;gap:32px;margin-top:16px;padding:10px 16px}.dialogDefaultContainerTextHint{font-weight:400;font-size:14px;line-height:20px;text-align:center;color:#1b1b1b}.dialogDefaultContainerRateLimitText{font-weight:600;font-size:14px;line-height:20px;color:#d0dbe4}.dialogDefaultContainerInsideContent{width:100%;display:flex;flex-direction:column;gap:24px}.dialogDefaultContainerRateLimitTextActive{color:#1c7ef1;cursor:pointer}.dialogDefaultContainerSendCodeBySmsText{color:#1c7ef1;cursor:pointer;font-size:14px;font-weight:600;display:flex;align-items:center;text-align:center}.chip{display:flex;align-items:center;justify-content:center;flex-direction:row;gap:4px;height:24px;font-size:12px;font-weight:600;color:#1b1b1b;padding:4px;line-height:16px;background-color:#b6d7ff4d;border-radius:4px;text-align:center;margin-left:5px}.cross{cursor:pointer;text-align:end}.finalLimitWrapper{display:flex;flex-direction:column;align-items:center;padding:12px 0;gap:12px;width:100%;min-height:94px;background:#e4606026;border-radius:8px}.finalLimitText{text-align:center;max-width:100%;word-wrap:break-word;font-family:Inter,sans-serif;font-size:14px;line-height:20px;color:#5d7285}.finalLimitLink{font-family:Inter,sans-serif;font-weight:600;font-size:14px;line-height:20px;color:#1c7ef1;text-align:center;cursor:pointer;text-decoration:none}.finalLimitLink:hover{text-decoration:underline}.toastWrapper{position:fixed;bottom:1rem;right:1rem;z-index:9999}.toast{width:100%}.base-container{margin-top:1.5rem;display:flex;flex-direction:column;gap:1.25rem;width:490px;height:428px}.icon-disabled{pointer-events:none;position:absolute;right:1rem;top:1rem;color:#b6c7d6}.centered-overlay{position:absolute;left:50%;top:50%;z-index:1000;height:100%;width:100%;transform:translate(-50%,-50%)}.buttons-container{display:flex;flex-wrap:wrap;gap:12px;justify-content:flex-start}.buttons-container PButton{flex:1 1 100%}._loaderOverlay_cpu73_1[data-v-9e697525]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;background:#ffffffb3;border-radius:16px;z-index:99}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- import { a as o, i as r } from "./index-CfmFrMSL.js";
1
+ (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".avatar-input[data-v-a56fcdbb] .p-input-file .overlay{visibility:hidden}.avatar-input[data-v-a56fcdbb] .p-input-file:hover .overlay{visibility:visible}.smart-input[data-v-01dc0d3f]{position:relative;width:100%}.smart-input__icon[data-v-01dc0d3f]{position:absolute;top:16px;right:16px;pointer-events:none;opacity:.5}.icon-locked{pointer-events:auto;position:absolute;right:1rem;top:1rem;color:#b6c7d6}.input-wrapper{position:relative;width:100%}.dialogTitle{z-index:10;width:100%;font-size:16px;font-weight:600;line-height:24px;text-align:center;color:#2b3238}.dialogDefaultContainer{display:flex;align-items:flex-start;flex-direction:column;width:100%;gap:32px;margin-top:16px;padding:10px 16px}.dialogDefaultContainerTextHint{font-weight:400;font-size:14px;line-height:20px;text-align:center;color:#1b1b1b}.dialogDefaultContainerRateLimitText{font-weight:600;font-size:14px;line-height:20px;color:#d0dbe4}.dialogDefaultContainerInsideContent{width:100%;display:flex;flex-direction:column;gap:24px}.dialogDefaultContainerRateLimitTextActive{color:#1c7ef1;cursor:pointer}.dialogDefaultContainerSendCodeBySmsText{color:#1c7ef1;cursor:pointer;font-size:14px;font-weight:600;display:flex;align-items:center;text-align:center}.chip{display:flex;align-items:center;justify-content:center;flex-direction:row;gap:4px;height:24px;font-size:12px;font-weight:600;color:#1b1b1b;padding:4px;line-height:16px;background-color:#b6d7ff4d;border-radius:4px;text-align:center;margin-left:5px}.cross{cursor:pointer;text-align:end}.finalLimitWrapper{display:flex;flex-direction:column;align-items:center;padding:12px 0;gap:12px;width:100%;min-height:94px;background:#e4606026;border-radius:8px}.finalLimitText{text-align:center;max-width:100%;word-wrap:break-word;font-family:Inter,sans-serif;font-size:14px;line-height:20px;color:#5d7285}.finalLimitLink{font-family:Inter,sans-serif;font-weight:600;font-size:14px;line-height:20px;color:#1c7ef1;text-align:center;cursor:pointer;text-decoration:none}.finalLimitLink:hover{text-decoration:underline}.toastWrapper{position:fixed;bottom:1rem;right:1rem;z-index:9999}.toast{width:100%}.base-container{margin-top:1.5rem;display:flex;flex-direction:column;gap:1.25rem;width:490px;height:428px}.icon-disabled{pointer-events:none;position:absolute;right:1rem;top:1rem;color:#b6c7d6}.centered-overlay{position:absolute;left:50%;top:50%;z-index:1000;height:100%;width:100%;transform:translate(-50%,-50%)}.buttons-container{display:flex;flex-wrap:wrap;gap:12px;justify-content:flex-start}.buttons-container PButton{flex:1 1 100%}._loaderOverlay_cpu73_1[data-v-9e697525]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;background:#ffffffb3;border-radius:16px;z-index:99}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ import { a as o, i as r } from "./index-CEiwFzrU.js";
3
3
  export {
4
4
  o as PEditUserContact,
5
5
  r as PEmailOrPhoneInput
@@ -1,6 +1,6 @@
1
1
  import { ref as n, defineComponent as L, createElementBlock as p, openBlock as v, normalizeClass as c, createVNode as w, unref as _, computed as T, renderSlot as d, createCommentVNode as h, createElementVNode as i, toDisplayString as y, createTextVNode as f } from "vue";
2
2
  import { PLoader as $ } from "@profeat/ui-kit";
3
- import { _ as b, g as C, p as R } from "./index-CfmFrMSL.js";
3
+ import { _ as b, g as C, p as R } from "./index-CEiwFzrU.js";
4
4
  function g(s) {
5
5
  const e = Math.floor(s / 60), a = s % 60;
6
6
  return `${String(e).padStart(2, "0")}:${String(a).padStart(2, "0")}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yourgoods/ui-smart",
3
- "version": "0.53.6",
3
+ "version": "0.53.7",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",