@yourgoods/ui-smart 0.49.0 → 0.50.1

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
- import { ref as h, shallowRef as Oe, defineComponent as H, defineAsyncComponent as J, watch as ze, createBlock as S, createCommentVNode as b, unref as d, openBlock as w, resolveDynamicComponent as Me, mergeProps as Re, computed as T, reactive as q, onMounted as Ge, createElementBlock as k, Fragment as de, createVNode as f, createElementVNode as _, withCtx as D, toDisplayString as I, createTextVNode as Y, Teleport as ue, Transition as je, withDirectives as Je, vShow as qe } from "vue";
1
+ import { ref as h, shallowRef as Le, defineComponent as H, defineAsyncComponent as J, watch as ze, createBlock as S, createCommentVNode as b, unref as d, openBlock as w, resolveDynamicComponent as Me, mergeProps as Re, computed as T, reactive as q, onMounted as Ge, createElementBlock as k, Fragment as de, createVNode as g, createElementVNode as _, withCtx as D, toDisplayString as I, createTextVNode as Y, Teleport as ue, Transition as je, withDirectives as Je, vShow as qe } from "vue";
2
2
  import _e from "axios";
3
- import { PInputFileUploader as Ye, PInput as O, IconFilledEditMd as z, PButton as me, PImageCropper as We, PToast as Ke, PTeleportContainer as pe, PToastContainer as Ze } from "@profeat/ui-kit";
3
+ import { PInputFileUploader as Ye, PInput as L, IconFilledEditMd as z, PButton as me, PImageCropper as We, PToast as Ke, PTeleportContainer as pe, PToastContainer as Ze } from "@profeat/ui-kit";
4
4
  function He(s, n = 2) {
5
5
  if (s === 0)
6
6
  return "0 B";
@@ -56,11 +56,11 @@ async function ta(s, n) {
56
56
  }
57
57
  async function oa(s) {
58
58
  const n = await Z("/users/profile/me", s);
59
- if (console.log("---res: ", n), n.status !== 200 && n.status !== 201 || !n.data)
59
+ if (n.status !== 200 && n.status !== 201 || !n.data)
60
60
  throw new Error("Ошибка при получении профиля пользователя");
61
61
  return n.data;
62
62
  }
63
- const M = h(null), W = Oe(null);
63
+ const M = h(null), W = Le(null);
64
64
  function X() {
65
65
  return {
66
66
  currentDialog: M,
@@ -216,9 +216,9 @@ const ra = {
216
216
  emits: ["clean-input-errors", "on-update-jwt", "update-phone-field", "update-email-field", "on-password-error", "on-toast"],
217
217
  setup(s, { emit: n }) {
218
218
  const r = n, u = h(!0), { currentDialog: v, dialogPayload: c, closeDialog: U } = X(), l = {
219
- email: J(() => import("./ProfileEmailDialog-sZkCbkOn.js")),
220
- phone: J(() => import("./ProfilePhoneDialog-BF5sey9V.js")),
221
- password: J(() => import("./ProfilePasswordDialog-LdM_8zVG.js"))
219
+ email: J(() => import("./ProfileEmailDialog-_xFNmM53.js")),
220
+ phone: J(() => import("./ProfilePhoneDialog-DJzWkfsA.js")),
221
+ password: J(() => import("./ProfilePasswordDialog-BRL-NxyC.js"))
222
222
  }, i = ({ email: y }) => {
223
223
  r("update-email-field", y);
224
224
  }, p = ({ phone: y }) => {
@@ -229,17 +229,17 @@ const ra = {
229
229
  }), (y, m) => d(v) ? (w(), S(Me(l[d(v)]), Re({
230
230
  key: 0,
231
231
  modelValue: u.value,
232
- "onUpdate:modelValue": m[0] || (m[0] = (g) => u.value = g),
232
+ "onUpdate:modelValue": m[0] || (m[0] = (f) => u.value = f),
233
233
  language: y.language,
234
234
  provider: y.provider
235
235
  }, d(c), {
236
236
  onClose: d(U),
237
- onCleanInputErrors: m[1] || (m[1] = (g) => r("clean-input-errors")),
238
- onOnUpdateJwt: m[2] || (m[2] = (g, C, o) => r("on-update-jwt", g, C, o)),
237
+ onCleanInputErrors: m[1] || (m[1] = (f) => r("clean-input-errors")),
238
+ onOnUpdateJwt: m[2] || (m[2] = (f, C, o) => r("on-update-jwt", f, C, o)),
239
239
  onSubmitEmail: i,
240
240
  onSubmitPhone: p,
241
- onOnPasswordError: m[3] || (m[3] = (g, C) => r("on-password-error", g, C)),
242
- onOnToast: m[4] || (m[4] = (g) => r("on-toast", g))
241
+ onOnPasswordError: m[3] || (m[3] = (f, C) => r("on-password-error", f, C)),
242
+ onOnToast: m[4] || (m[4] = (f) => r("on-toast", f))
243
243
  }), null, 16, ["modelValue", "language", "provider", "onClose"])) : b("", !0);
244
244
  }
245
245
  }), sa = { class: "base-container" }, la = {
@@ -257,10 +257,10 @@ const ra = {
257
257
  }, pa = {
258
258
  key: 4,
259
259
  class: "input-wrapper"
260
- }, ca = { class: "buttons-container" }, ga = {
260
+ }, ca = { class: "buttons-container" }, fa = {
261
261
  key: 0,
262
262
  class: "centered-overlay"
263
- }, fa = { class: "toastWrapper" }, va = /* @__PURE__ */ H({
263
+ }, ga = { class: "toastWrapper" }, va = /* @__PURE__ */ H({
264
264
  __name: "PEditUserContact",
265
265
  props: {
266
266
  language: {},
@@ -274,7 +274,7 @@ const ra = {
274
274
  },
275
275
  emits: ["open-email-dialog", "open-phone-dialog", "open-password-dialog", "on-update-jwt", "on-password-error", "update-tokens"],
276
276
  setup(s, { emit: n }) {
277
- const r = s, u = n, v = T(() => r.language ?? "ru"), c = (e) => ra[v.value][e] || e, { openDialog: U } = X(), l = q({ firstName: "", lastName: "" }), i = h({ firstName: "", lastName: "" }), p = q({ firstName: !1, lastName: !1, email: !1, phone: !1 }), y = h(""), m = h(""), g = h(""), C = h(!1), o = q({
277
+ const r = s, u = n, v = T(() => r.language ?? "ru"), c = (e) => ra[v.value][e] || e, { openDialog: U } = X(), l = q({ firstName: "", lastName: "" }), i = h({ firstName: "", lastName: "" }), p = q({ firstName: !1, lastName: !1, email: !1, phone: !1 }), y = h(""), m = h(""), f = h(""), C = h(!1), o = q({
278
278
  value: null,
279
279
  loading: !1,
280
280
  accept: ["image/png", "image/jpeg"],
@@ -282,7 +282,7 @@ const ra = {
282
282
  // 10 MB
283
283
  imageBinary: null,
284
284
  imageContent: ""
285
- }), B = h(""), A = h(!1), R = h(!0), G = h(!0), ee = h(void 0), ae = h(""), ce = T(() => oe(l.firstName, p.firstName)), ge = T(() => oe(l.lastName, p.lastName)), fe = T(() => p.email && !m.value.trim() ? "Введите e-mail" : ""), ve = T(() => p.phone && !g.value.trim() ? "Введите номер телефона" : ""), F = (e) => r.fields.some((a) => a.key === e), te = (e) => e && e.trim() ? "edit" : "bind", j = () => setTimeout(() => {
285
+ }), B = h(""), A = h(!1), R = h(!0), G = h(!0), ee = h(void 0), ae = h(""), ce = T(() => oe(l.firstName, p.firstName)), fe = T(() => oe(l.lastName, p.lastName)), ge = T(() => p.email && !m.value.trim() ? "Введите e-mail" : ""), ve = T(() => p.phone && !f.value.trim() ? "Введите номер телефона" : ""), F = (e) => r.fields.some((a) => a.key === e), te = (e) => e && e.trim() ? "edit" : "bind", j = () => setTimeout(() => {
286
286
  var e;
287
287
  return (e = document.activeElement) == null ? void 0 : e.blur();
288
288
  }, 0), he = T(() => !!(m.value && m.value.trim() !== "")), we = T(() => o.imageContent ? c("Загрузить другое фото") : c("Загрузить фото")), oe = (e, a) => {
@@ -292,13 +292,13 @@ const ra = {
292
292
  }, ye = (e) => U("email", { mode: e ? "edit" : "bind", initialEmail: e }), Ee = () => {
293
293
  j(), p.email = !1, G.value = !1, u("open-email-dialog", m.value, te(m.value)), ye(m.value);
294
294
  }, Ne = () => {
295
- j(), p.phone = !1, R.value = !1, u("open-phone-dialog", g.value, te(g.value));
295
+ j(), p.phone = !1, R.value = !1, u("open-phone-dialog", f.value, te(f.value));
296
296
  }, Ce = async (e, a, t) => {
297
- e === "email" && t && (m.value = t), e === "phone" && t && (g.value = t), u("on-update-jwt");
297
+ e === "email" && t && (m.value = t), e === "phone" && t && (f.value = t), u("on-update-jwt");
298
298
  }, Pe = (e) => {
299
- g.value = e;
299
+ f.value = e;
300
300
  }, be = (e) => {
301
- console.debug("emitUpdateEmailField, цепочка такая: profileEmailDialog -> DialogManager -> PEditUserContact", e), m.value = e;
301
+ m.value = e;
302
302
  }, ke = (e, a) => {
303
303
  A.value = !0, u("on-password-error", e, a);
304
304
  }, Te = () => {
@@ -308,15 +308,15 @@ const ra = {
308
308
  }, x = (e) => {
309
309
  if (p[e] = !0, e === "firstName" || e === "lastName") {
310
310
  const a = l[e];
311
- a.length > 40 && (l[e] = a.slice(0, 40), console.debug(`[Input Limit] Поле '${e}' достигло 40 символов. Ввод обрезан.`));
311
+ a.length > 40 && (l[e] = a.slice(0, 40));
312
312
  }
313
313
  }, Ue = (e) => {
314
- var $, L;
314
+ var $, O;
315
315
  if (B.value = "", !e) {
316
316
  re();
317
317
  return;
318
318
  }
319
- const a = (($ = e.fileBinary) == null ? void 0 : $.type) ?? "", t = ((L = e.fileBinary) == null ? void 0 : L.size) ?? 0, P = !["image/png", "image/jpeg"].includes(a), N = t > o.uploadLimit;
319
+ const a = (($ = e.fileBinary) == null ? void 0 : $.type) ?? "", t = ((O = e.fileBinary) == null ? void 0 : O.size) ?? 0, P = !["image/png", "image/jpeg"].includes(a), N = t > o.uploadLimit;
320
320
  if (P || N) {
321
321
  B.value = "Файл не подходит. Пожалуйста, загрузите PNG или JPEG размером до 10 МБ", re();
322
322
  return;
@@ -327,7 +327,7 @@ const ra = {
327
327
  }, Be = async () => {
328
328
  try {
329
329
  const a = (await ta("/users/profile/delete/avatar")).data;
330
- return (a == null ? void 0 : a.success) !== !0 ? (console.warn("Сервер не подтвердил успешное удаление аватара."), console.warn("Ответ сервера:", a), !1) : !0;
330
+ return (a == null ? void 0 : a.success) === !0;
331
331
  } catch (e) {
332
332
  return console.error("Ошибка при удалении аватара:", e), !1;
333
333
  }
@@ -403,9 +403,9 @@ const ra = {
403
403
  privateFirstName: P,
404
404
  privateLastName: N,
405
405
  email: $,
406
- phoneNumber: L
406
+ phoneNumber: O
407
407
  } = t;
408
- y.value = E ?? "", l.firstName = P ?? "", l.lastName = N ?? "", m.value = $ ?? "", g.value = L ?? "", o.imageContent = await Ve(), i.value = {
408
+ y.value = E ?? "", l.firstName = P ?? "", l.lastName = N ?? "", m.value = $ ?? "", f.value = O ?? "", o.imageContent = await Ve(), i.value = {
409
409
  firstName: P ?? "",
410
410
  lastName: N ?? ""
411
411
  };
@@ -416,7 +416,7 @@ const ra = {
416
416
  var e;
417
417
  try {
418
418
  const t = (e = (await aa("/users/profile/avatar")).data) == null ? void 0 : e.data;
419
- return t ? xe(t) : (console.warn("Метаданные аватара отсутствуют в ответе."), "");
419
+ return t ? xe(t) : "";
420
420
  } catch (a) {
421
421
  return console.error("Ошибка при загрузке метаданных аватара:", a), "";
422
422
  }
@@ -445,7 +445,7 @@ const ra = {
445
445
  text: c("Не удалось сохранить изменения. Попробуйте позже")
446
446
  });
447
447
  }
448
- }, Le = () => {
448
+ }, Oe = () => {
449
449
  j(), u("open-password-dialog");
450
450
  };
451
451
  return Ge(async () => {
@@ -453,7 +453,7 @@ const ra = {
453
453
  if (!r.requestUrl) throw new Error("auth-backend url не передан в props");
454
454
  ea(r.accessToken, r.requestUrl), await Ae();
455
455
  }), (e, a) => (w(), k(de, null, [
456
- f(na, {
456
+ g(na, {
457
457
  language: v.value,
458
458
  provider: e.provider,
459
459
  onCleanInputErrors: Te,
@@ -490,7 +490,7 @@ const ra = {
490
490
  _: 1
491
491
  }, 8, ["modelValue", "src", "loading", "label", "upload-limit"])) : b("", !0),
492
492
  F("firstName") ? (w(), k("div", ua, [
493
- f(d(O), {
493
+ g(d(L), {
494
494
  modelValue: l.firstName,
495
495
  "onUpdate:modelValue": a[2] || (a[2] = (t) => l.firstName = t),
496
496
  size: "large",
@@ -499,22 +499,22 @@ const ra = {
499
499
  onBlur: a[3] || (a[3] = (t) => p.firstName = !0),
500
500
  onInput: a[4] || (a[4] = (t) => x("firstName"))
501
501
  }, null, 8, ["modelValue", "label", "error"]),
502
- f(d(z), { class: "icon-locked" })
502
+ g(d(z), { class: "icon-locked" })
503
503
  ])) : b("", !0),
504
504
  F("lastName") ? (w(), k("div", ma, [
505
- f(d(O), {
505
+ g(d(L), {
506
506
  modelValue: l.lastName,
507
507
  "onUpdate:modelValue": a[5] || (a[5] = (t) => l.lastName = t),
508
508
  size: "large",
509
509
  label: c("Фамилия"),
510
- error: ge.value,
510
+ error: fe.value,
511
511
  onBlur: a[6] || (a[6] = (t) => p.lastName = !0),
512
512
  onInput: a[7] || (a[7] = (t) => x("lastName"))
513
513
  }, null, 8, ["modelValue", "label", "error"]),
514
- f(d(z), { class: "icon-locked" })
514
+ g(d(z), { class: "icon-locked" })
515
515
  ])) : b("", !0),
516
516
  F("email") ? (w(), k("div", da, [
517
- f(d(O), {
517
+ g(d(L), {
518
518
  modelValue: m.value,
519
519
  "onUpdate:modelValue": a[8] || (a[8] = (t) => m.value = t),
520
520
  size: "large",
@@ -523,17 +523,17 @@ const ra = {
523
523
  type: "email",
524
524
  readonly: "",
525
525
  style: { cursor: "pointer" },
526
- error: fe.value && G.value,
526
+ error: ge.value && G.value,
527
527
  onBlur: a[9] || (a[9] = (t) => p.email = !0),
528
528
  onInput: a[10] || (a[10] = (t) => x("email")),
529
529
  onClick: Ee
530
530
  }, null, 8, ["modelValue", "error"]),
531
- f(d(z), { class: "icon-locked" })
531
+ g(d(z), { class: "icon-locked" })
532
532
  ])) : b("", !0),
533
533
  F("phone") ? (w(), k("div", pa, [
534
- f(d(O), {
535
- modelValue: g.value,
536
- "onUpdate:modelValue": a[11] || (a[11] = (t) => g.value = t),
534
+ g(d(L), {
535
+ modelValue: f.value,
536
+ "onUpdate:modelValue": a[11] || (a[11] = (t) => f.value = t),
537
537
  size: "large",
538
538
  "text-size": "medium",
539
539
  label: c("Номер телефона"),
@@ -545,20 +545,20 @@ const ra = {
545
545
  onInput: a[13] || (a[13] = (t) => x("phone")),
546
546
  onClick: Ne
547
547
  }, null, 8, ["modelValue", "label", "error"]),
548
- f(d(z), { class: "icon-locked" })
548
+ g(d(z), { class: "icon-locked" })
549
549
  ])) : b("", !0),
550
550
  _("div", ca, [
551
551
  he.value ? (w(), S(d(me), {
552
552
  key: 0,
553
553
  color: "secondary",
554
- onClick: Le
554
+ onClick: Oe
555
555
  }, {
556
556
  default: D(() => [
557
557
  Y(I(c("Сменить пароль")), 1)
558
558
  ]),
559
559
  _: 1
560
560
  })) : b("", !0),
561
- f(d(me), {
561
+ g(d(me), {
562
562
  disabled: !ie.value,
563
563
  onClick: $e
564
564
  }, {
@@ -573,8 +573,8 @@ const ra = {
573
573
  key: 0,
574
574
  to: "body"
575
575
  }, [
576
- C.value ? (w(), k("div", ga, [
577
- f(d(We), {
576
+ C.value ? (w(), k("div", fa, [
577
+ g(d(We), {
578
578
  "circle-mode": !0,
579
579
  "model-value": o.imageContent,
580
580
  onClose: De,
@@ -584,10 +584,10 @@ const ra = {
584
584
  ])) : b("", !0)
585
585
  ])) : b("", !0),
586
586
  (w(), S(ue, { to: "#toast-root" }, [
587
- _("div", fa, [
588
- f(je, { name: "list" }, {
587
+ _("div", ga, [
588
+ g(je, { name: "list" }, {
589
589
  default: D(() => [
590
- Je(f(d(Ke), {
590
+ Je(g(d(Ke), {
591
591
  class: "toast",
592
592
  color: ee.value,
593
593
  text: ae.value,
@@ -600,7 +600,7 @@ const ra = {
600
600
  })
601
601
  ])
602
602
  ])),
603
- f(d(pe))
603
+ g(d(pe))
604
604
  ], 64));
605
605
  }
606
606
  }), ha = (s, n) => {
@@ -608,7 +608,7 @@ const ra = {
608
608
  for (const [u, v] of n)
609
609
  r[u] = v;
610
610
  return r;
611
- }, wa = /* @__PURE__ */ ha(va, [["__scopeId", "data-v-7d90f646"]]), ba = /* @__PURE__ */ H({
611
+ }, wa = /* @__PURE__ */ ha(va, [["__scopeId", "data-v-99f62cbb"]]), ba = /* @__PURE__ */ H({
612
612
  __name: "index",
613
613
  props: {
614
614
  throttlerPrefix: {},
@@ -632,8 +632,8 @@ const ra = {
632
632
  r("on-update-jwt", i, p, y);
633
633
  };
634
634
  return (i, p) => (w(), k(de, null, [
635
- f(d(Ze)),
636
- f(wa, {
635
+ g(d(Ze)),
636
+ g(wa, {
637
637
  "throttler-prefix": i.throttlerPrefix,
638
638
  provider: i.provider,
639
639
  "request-url": i.requestUrl,
@@ -647,7 +647,7 @@ const ra = {
647
647
  onOpenPasswordDialog: U,
648
648
  onOnUpdateJwt: l
649
649
  }, null, 8, ["throttler-prefix", "provider", "request-url", "language", "fields", "access-token", "refresh-token", "aws-storage-url"]),
650
- f(d(pe))
650
+ g(d(pe))
651
651
  ], 64));
652
652
  }
653
653
  });
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-7d90f646] .p-input-file .overlay{visibility:hidden}.avatar-input[data-v-7d90f646] .p-input-file:hover .overlay{visibility:visible}.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:440px;min-height:94px;background:#e4606026;border-radius:8px}.finalLimitText{text-align:center;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 } from "./index-3V186vCD.js";
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".avatar-input[data-v-99f62cbb] .p-input-file .overlay{visibility:hidden}.avatar-input[data-v-99f62cbb] .p-input-file:hover .overlay{visibility:visible}.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:440px;min-height:94px;background:#e4606026;border-radius:8px}.finalLimitText{text-align:center;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 } from "./index-Dt-xD4lU.js";
3
3
  export {
4
4
  o as PEditUserContact
5
5
  };
@@ -1,13 +1,13 @@
1
- import { ref as l, defineComponent as L, createElementBlock as f, openBlock as v, normalizeClass as r, createVNode as E, unref as F, computed as T, renderSlot as d, createCommentVNode as $, createElementVNode as o, toDisplayString as y, createTextVNode as p } from "vue";
1
+ import { ref as r, defineComponent as L, createElementBlock as f, openBlock as v, normalizeClass as l, createVNode as E, unref as F, computed as T, renderSlot as d, createCommentVNode as $, createElementVNode as o, toDisplayString as y, createTextVNode as p } from "vue";
2
2
  import { PLoader as w } from "@profeat/ui-kit";
3
- import { _ as g, g as R, p as h } from "./index-3V186vCD.js";
3
+ import { _ as g, g as R, p as h } from "./index-Dt-xD4lU.js";
4
4
  function C(e) {
5
5
  const t = Math.floor(e / 60), a = e % 60;
6
6
  return `${String(t).padStart(2, "0")}:${String(a).padStart(2, "0")}`;
7
7
  }
8
8
  function x() {
9
9
  let e = null;
10
- const t = l(0), a = l(!1), s = l("00:00"), u = l(0), n = l(0), i = l(!1);
10
+ const t = r(0), a = r(!1), s = r("00:00"), u = r(0), n = r(0), i = r(!1);
11
11
  return {
12
12
  startTimer: (c, m) => {
13
13
  e && clearInterval(e), i.value = !1, t.value = c, a.value = c > 0, s.value = C(c);
@@ -27,7 +27,7 @@ const S = /* @__PURE__ */ L({
27
27
  __name: "ProfileOverlayLoading",
28
28
  setup(e) {
29
29
  return (t, a) => (v(), f("div", {
30
- class: r(t.$style.loaderOverlay)
30
+ class: l(t.$style.loaderOverlay)
31
31
  }, [
32
32
  E(F(w), {
33
33
  class: "relative m-auto",
@@ -41,7 +41,7 @@ const S = /* @__PURE__ */ L({
41
41
  $style: b
42
42
  }, z = /* @__PURE__ */ g(S, [["__cssModules", A], ["__scopeId", "data-v-9e697525"]]);
43
43
  function j(e) {
44
- const t = l("edit"), a = T(() => e.value === "edit" && t.value === "edit");
44
+ const t = r("edit"), a = T(() => e.value === "edit" && t.value === "edit");
45
45
  return {
46
46
  modeFlowFromBack: t,
47
47
  isEditFlow: a,
@@ -71,10 +71,10 @@ function N(e, t, a, s, u, n) {
71
71
  return e.loading ? (v(), f("div", D)) : (v(), f("div", O, [
72
72
  e.isFinalLimit ? e.isFinalLimit && e.rateLimitText !== "Повторить" ? d(e.$slots, "final", { key: 1 }, () => [
73
73
  o("div", {
74
- class: r(e.finalWrapperClass)
74
+ class: l(e.finalWrapperClass)
75
75
  }, [
76
76
  o("div", {
77
- class: r(e.finalTextClass)
77
+ class: l(e.finalTextClass)
78
78
  }, [
79
79
  t[1] || (t[1] = p(" Вы слишком часто запрашивали код. ")),
80
80
  t[2] || (t[2] = o("br", null, null, -1)),
@@ -83,7 +83,7 @@ function N(e, t, a, s, u, n) {
83
83
  o("span", I, [
84
84
  t[3] || (t[3] = p(" Если есть вопросы — ")),
85
85
  o("a", {
86
- class: r(e.finalLinkClass),
86
+ class: l(e.finalLinkClass),
87
87
  href: "https://t.me/yourSupportLink",
88
88
  target: "_blank"
89
89
  }, "пишите в Telegram.", 2)
@@ -92,7 +92,7 @@ function N(e, t, a, s, u, n) {
92
92
  ]) : $("", !0) : d(e.$slots, "active", { key: 0 }, () => [
93
93
  o("div", _, [
94
94
  o("span", {
95
- class: r([e.defaultClass, { [e.activeClass]: e.isRepeat }]),
95
+ class: l([e.defaultClass, { [e.activeClass]: e.isRepeat }]),
96
96
  onClick: t[0] || (t[0] = (i) => e.isRepeat && e.onSendAgain())
97
97
  }, y(e.isRepeat ? "Повторить" : `Повторить через ${e.rateLimitText}`), 3),
98
98
  d(e.$slots, "extra")
@@ -102,11 +102,10 @@ function N(e, t, a, s, u, n) {
102
102
  }
103
103
  const G = /* @__PURE__ */ g(M, [["render", N]]), H = async (e, t) => {
104
104
  try {
105
- const a = await h("/users/profile/contact/check-availability", {
105
+ return await h("/users/profile/contact/check-availability", {
106
106
  email: e,
107
107
  phone: t
108
108
  });
109
- return console.log(a.data), a;
110
109
  } catch (a) {
111
110
  throw console.error("Ошибка проверки доступности", a), a;
112
111
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yourgoods/ui-smart",
3
- "version": "0.49.0",
3
+ "version": "0.50.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",