@yourgoods/ui-smart 0.53.44 → 0.53.45
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/{ProfileEmailDialog-CC2QNPDk.js → ProfileEmailDialog-1PdklFjX.js} +2 -2
- package/dist/{ProfilePasswordDialog-DrqdHb9p.js → ProfilePasswordDialog-Cf5_HAyj.js} +1 -1
- package/dist/{ProfilePhoneDialog-CrbV9UiL.js → ProfilePhoneDialog-B6_z4IOU.js} +2 -2
- package/dist/{index-J0da7yS8.js → index-JgKD-0yi.js} +61 -58
- package/dist/index.js +2 -2
- package/dist/{useRateLimitToast-DHk1w66B.js → useRateLimitToast-CfKIVWV2.js} +1 -1
- package/package.json +1 -1
|
@@ -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-
|
|
3
|
-
import { C as F, _ as He, B as qe, p as W, g as je } from "./index-
|
|
2
|
+
import { _ as ve, c as ke, u as Re, a as ze, P as Me, b as We } from "./useRateLimitToast-CfKIVWV2.js";
|
|
3
|
+
import { C as F, _ as He, B as qe, p as W, g as je } from "./index-JgKD-0yi.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-
|
|
2
|
+
import { C as I, p as D, g as Ve } from "./index-JgKD-0yi.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-
|
|
2
|
+
import { _ as we, c as Ne, a as He, u as Ge, P as Oe, b as Je } from "./useRateLimitToast-CfKIVWV2.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-
|
|
4
|
+
import { C as j, t as De, p as te, g as Ae } from "./index-JgKD-0yi.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 E, shallowRef as Ye, defineComponent as te, defineAsyncComponent as ne, watch as Te, createBlock as $, createCommentVNode as V, unref as p, openBlock as P, resolveDynamicComponent as Ke, mergeProps as Xe, computed as k, reactive as oe, onMounted as He, createElementBlock as F, Fragment as Ie, createVNode as b, createElementVNode as re, withCtx as O, toDisplayString as G, createTextVNode as le, Teleport as
|
|
1
|
+
import { ref as E, shallowRef as Ye, defineComponent as te, defineAsyncComponent as ne, watch as Te, createBlock as $, createCommentVNode as V, unref as p, openBlock as P, resolveDynamicComponent as Ke, mergeProps as Xe, computed as k, reactive as oe, onMounted as He, createElementBlock as F, Fragment as Ie, createVNode as b, createElementVNode as re, withCtx as O, toDisplayString as G, createTextVNode as le, Teleport as we, Transition as Ze, withDirectives as Qe, vShow as et } from "vue";
|
|
2
2
|
import tt from "axios";
|
|
3
|
-
import { PInputFileUploader as at, PInput as j, IconFilledEditMd as Q, PButton as
|
|
3
|
+
import { PInputFileUploader as at, PInput as j, IconFilledEditMd as Q, PButton as Ee, PImageCropper as nt, PToast as ot, PTeleportContainer as Be, PToastContainer as rt, IconPhoneMd as lt, IconMailMd as st } from "@profeat/ui-kit";
|
|
4
4
|
function it(l, s = 2) {
|
|
5
5
|
if (l === 0)
|
|
6
6
|
return "0 B";
|
|
@@ -28,9 +28,9 @@ const Lt = {
|
|
|
28
28
|
}, _t = {
|
|
29
29
|
VERIFY_EMAIL: "verify-email"
|
|
30
30
|
};
|
|
31
|
-
let
|
|
31
|
+
let ue = null;
|
|
32
32
|
function ct(l, s, a) {
|
|
33
|
-
|
|
33
|
+
ue = tt.create({
|
|
34
34
|
baseURL: s,
|
|
35
35
|
headers: {
|
|
36
36
|
Authorization: `Bearer ${l}`,
|
|
@@ -41,28 +41,28 @@ function ct(l, s, a) {
|
|
|
41
41
|
validateStatus: (n) => n >= 200 && n < 300
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
if (!
|
|
44
|
+
function me() {
|
|
45
|
+
if (!ue)
|
|
46
46
|
throw new Error("Axios instance not initialized. Call initAxios(token, baseUrl) first.");
|
|
47
|
-
return
|
|
47
|
+
return ue;
|
|
48
48
|
}
|
|
49
|
-
async function
|
|
50
|
-
return
|
|
49
|
+
async function de(l, s, a) {
|
|
50
|
+
return me().post(l, s, a);
|
|
51
51
|
}
|
|
52
52
|
async function mt(l, s) {
|
|
53
|
-
return
|
|
53
|
+
return me().get(l, s);
|
|
54
54
|
}
|
|
55
55
|
async function pt(l, s) {
|
|
56
|
-
return
|
|
56
|
+
return me().delete(l, s);
|
|
57
57
|
}
|
|
58
58
|
async function ft(l) {
|
|
59
|
-
const s = await
|
|
59
|
+
const s = await de("/users/profile/me", l);
|
|
60
60
|
if (s.status !== 200 && s.status !== 201 || !s.data)
|
|
61
61
|
throw new Error("Ошибка при получении профиля пользователя");
|
|
62
62
|
return s.data;
|
|
63
63
|
}
|
|
64
64
|
const ee = E(null), se = Ye(null);
|
|
65
|
-
function
|
|
65
|
+
function pe() {
|
|
66
66
|
return {
|
|
67
67
|
currentDialog: ee,
|
|
68
68
|
dialogPayload: se,
|
|
@@ -75,7 +75,7 @@ function fe() {
|
|
|
75
75
|
isDialogOpen: (n) => ee.value === n
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
-
const
|
|
78
|
+
const ce = {
|
|
79
79
|
ru: {
|
|
80
80
|
Имя: "Имя",
|
|
81
81
|
Фамилия: "Фамилия",
|
|
@@ -225,10 +225,10 @@ const me = {
|
|
|
225
225
|
},
|
|
226
226
|
emits: ["clean-input-errors", "on-update-jwt", "update-phone-field", "update-email-field", "on-password-error", "on-toast"],
|
|
227
227
|
setup(l, { emit: s }) {
|
|
228
|
-
const a = s, n = E(!0), { currentDialog: f, dialogPayload: v, closeDialog: A } =
|
|
229
|
-
email: ne(() => import("./ProfileEmailDialog-
|
|
230
|
-
phone: ne(() => import("./ProfilePhoneDialog-
|
|
231
|
-
password: ne(() => import("./ProfilePasswordDialog-
|
|
228
|
+
const a = s, n = E(!0), { currentDialog: f, dialogPayload: v, closeDialog: A } = pe(), u = {
|
|
229
|
+
email: ne(() => import("./ProfileEmailDialog-1PdklFjX.js")),
|
|
230
|
+
phone: ne(() => import("./ProfilePhoneDialog-B6_z4IOU.js")),
|
|
231
|
+
password: ne(() => import("./ProfilePasswordDialog-Cf5_HAyj.js"))
|
|
232
232
|
}, d = ({ email: c }) => {
|
|
233
233
|
a("update-email-field", c);
|
|
234
234
|
}, h = ({ phone: c }) => {
|
|
@@ -286,7 +286,7 @@ const me = {
|
|
|
286
286
|
},
|
|
287
287
|
emits: ["open-email-dialog", "open-phone-dialog", "open-password-dialog", "on-update-jwt", "on-password-error", "update-tokens"],
|
|
288
288
|
setup(l, { emit: s }) {
|
|
289
|
-
const a = l, n = s, f = k(() => a.language ?? "ru"), v = (e) =>
|
|
289
|
+
const a = l, n = s, f = k(() => a.language ?? "ru"), v = (e) => ce[f.value][e] || e, { openDialog: A } = pe(), u = oe({ firstName: "", lastName: "" }), d = E({ firstName: "", lastName: "" }), h = oe({ firstName: !1, lastName: !1, email: !1, phone: !1 }), c = E(""), g = E(""), y = E(""), C = E(!1), o = oe({
|
|
290
290
|
value: null,
|
|
291
291
|
loading: !1,
|
|
292
292
|
accept: ["image/png", "image/jpeg"],
|
|
@@ -325,16 +325,16 @@ const me = {
|
|
|
325
325
|
}, $e = (e) => {
|
|
326
326
|
var H, Z;
|
|
327
327
|
if (S.value = "", !e) {
|
|
328
|
-
|
|
328
|
+
fe();
|
|
329
329
|
return;
|
|
330
330
|
}
|
|
331
331
|
const t = ((H = e.fileBinary) == null ? void 0 : H.type) ?? "", r = ((Z = e.fileBinary) == null ? void 0 : Z.size) ?? 0, U = !["image/png", "image/jpeg"].includes(t), D = r > o.uploadLimit;
|
|
332
332
|
if (U || D) {
|
|
333
|
-
S.value = "Файл не подходит. Пожалуйста, загрузите PNG или JPEG размером до 10 МБ",
|
|
333
|
+
S.value = "Файл не подходит. Пожалуйста, загрузите PNG или JPEG размером до 10 МБ", fe();
|
|
334
334
|
return;
|
|
335
335
|
}
|
|
336
336
|
o.value = e, o.imageBinary = e.fileBinary ?? null, o.imageContent = e.fileContent ?? "", C.value = !0;
|
|
337
|
-
},
|
|
337
|
+
}, fe = () => {
|
|
338
338
|
o.value = null, o.imageBinary = null, o.imageContent = "", C.value = !1;
|
|
339
339
|
}, ze = async () => {
|
|
340
340
|
try {
|
|
@@ -345,7 +345,7 @@ const me = {
|
|
|
345
345
|
}
|
|
346
346
|
}, Le = () => {
|
|
347
347
|
S.value = "Файл не подходит. Пожалуйста, загрузите PNG или JPEG размером до 10 МБ", o.value = null, o.imageBinary = null, o.imageContent = "", C.value = !1;
|
|
348
|
-
},
|
|
348
|
+
}, ve = async (e, t, r = "image/png") => {
|
|
349
349
|
if (!e) return null;
|
|
350
350
|
const U = await (await fetch(e)).blob();
|
|
351
351
|
return new File([U], t, { type: r });
|
|
@@ -355,7 +355,7 @@ const me = {
|
|
|
355
355
|
C.value = !1;
|
|
356
356
|
const t = o.imageContent;
|
|
357
357
|
if (o.imageContent = e, !o.imageBinary) return;
|
|
358
|
-
const r = await
|
|
358
|
+
const r = await ve(
|
|
359
359
|
e,
|
|
360
360
|
o.imageBinary.name,
|
|
361
361
|
o.imageBinary.type || "image/png"
|
|
@@ -367,7 +367,7 @@ const me = {
|
|
|
367
367
|
try {
|
|
368
368
|
o.loading = !0;
|
|
369
369
|
const B = new FormData();
|
|
370
|
-
B.append("file", r), await
|
|
370
|
+
B.append("file", r), await de(`/users/profile/avatar/${c.value}`, B, { headers: { "Content-Type": void 0 } });
|
|
371
371
|
} catch (B) {
|
|
372
372
|
console.error(B), K({
|
|
373
373
|
color: "error",
|
|
@@ -377,18 +377,18 @@ const me = {
|
|
|
377
377
|
o.loading = !1;
|
|
378
378
|
}
|
|
379
379
|
}, Oe = async (e) => {
|
|
380
|
-
o.imageContent = e ?? "", o.imageBinary && (o.imageBinary = await
|
|
380
|
+
o.imageContent = e ?? "", o.imageBinary && (o.imageBinary = await ve(
|
|
381
381
|
e ?? "",
|
|
382
382
|
o.imageBinary.name,
|
|
383
383
|
o.imageBinary.type || "image/png"
|
|
384
384
|
));
|
|
385
|
-
},
|
|
385
|
+
}, ge = E(!1), he = async (e) => {
|
|
386
386
|
var r, B;
|
|
387
387
|
const t = (r = u[e]) == null ? void 0 : r.trim();
|
|
388
388
|
if (t)
|
|
389
389
|
try {
|
|
390
|
-
|
|
391
|
-
const D = (B = (await
|
|
390
|
+
ge.value = !0;
|
|
391
|
+
const D = (B = (await de("/users/profile/update-name", { [e]: t })).data) == null ? void 0 : B.data;
|
|
392
392
|
D != null && D.user && (u.firstName = D.user.firstName ?? u.firstName, u.lastName = D.user.lastName ?? u.lastName, d.value = {
|
|
393
393
|
firstName: u.firstName,
|
|
394
394
|
lastName: u.lastName
|
|
@@ -396,7 +396,7 @@ const me = {
|
|
|
396
396
|
} catch (U) {
|
|
397
397
|
throw U;
|
|
398
398
|
} finally {
|
|
399
|
-
|
|
399
|
+
ge.value = !1;
|
|
400
400
|
}
|
|
401
401
|
}, Ge = async () => {
|
|
402
402
|
var e;
|
|
@@ -442,15 +442,15 @@ const me = {
|
|
|
442
442
|
return console.error("Ошибка при составлении URL аватара:", t), "";
|
|
443
443
|
}
|
|
444
444
|
}
|
|
445
|
-
const
|
|
445
|
+
const ye = k(() => {
|
|
446
446
|
if (!d.value.firstName && !d.value.lastName)
|
|
447
447
|
return !1;
|
|
448
448
|
const e = u.firstName.trim(), t = u.lastName.trim(), r = d.value.firstName.trim(), B = d.value.lastName.trim(), U = e !== r || t !== B, D = e.length >= 2 && t.length >= 2;
|
|
449
449
|
return U && D;
|
|
450
450
|
}), Je = async () => {
|
|
451
|
-
if (
|
|
451
|
+
if (ye.value)
|
|
452
452
|
try {
|
|
453
|
-
await Promise.all([
|
|
453
|
+
await Promise.all([he("firstName"), he("lastName")]), n("on-update-jwt"), K({ color: "success", text: "Изменения сохранены" });
|
|
454
454
|
} catch (e) {
|
|
455
455
|
console.error(e), K({
|
|
456
456
|
color: "error",
|
|
@@ -561,7 +561,7 @@ const me = {
|
|
|
561
561
|
b(p(Q), { class: "icon-locked" })
|
|
562
562
|
])) : V("", !0),
|
|
563
563
|
re("div", Nt, [
|
|
564
|
-
z.value ? (P(), $(p(
|
|
564
|
+
z.value ? (P(), $(p(Ee), {
|
|
565
565
|
key: 0,
|
|
566
566
|
color: "secondary",
|
|
567
567
|
onClick: We
|
|
@@ -571,8 +571,8 @@ const me = {
|
|
|
571
571
|
]),
|
|
572
572
|
_: 1
|
|
573
573
|
})) : V("", !0),
|
|
574
|
-
b(p(
|
|
575
|
-
disabled: !
|
|
574
|
+
b(p(Ee), {
|
|
575
|
+
disabled: !ye.value,
|
|
576
576
|
onClick: Je
|
|
577
577
|
}, {
|
|
578
578
|
default: O(() => [
|
|
@@ -582,7 +582,7 @@ const me = {
|
|
|
582
582
|
}, 8, ["disabled"])
|
|
583
583
|
])
|
|
584
584
|
]),
|
|
585
|
-
C.value ? (P(), $(
|
|
585
|
+
C.value ? (P(), $(we, {
|
|
586
586
|
key: 0,
|
|
587
587
|
to: "body"
|
|
588
588
|
}, [
|
|
@@ -596,7 +596,7 @@ const me = {
|
|
|
596
596
|
}, null, 8, ["model-value"])
|
|
597
597
|
])) : V("", !0)
|
|
598
598
|
])) : V("", !0),
|
|
599
|
-
(P(), $(
|
|
599
|
+
(P(), $(we, { to: "#toast-root" }, [
|
|
600
600
|
re("div", kt, [
|
|
601
601
|
b(Ze, { name: "list" }, {
|
|
602
602
|
default: O(() => [
|
|
@@ -636,7 +636,7 @@ const me = {
|
|
|
636
636
|
},
|
|
637
637
|
emits: ["on-update-jwt", "update-tokens"],
|
|
638
638
|
setup(l, { emit: s }) {
|
|
639
|
-
const a = s, { openDialog: n } =
|
|
639
|
+
const a = s, { openDialog: n } = pe(), f = (d, h) => {
|
|
640
640
|
n("email", { initialEmail: d, mode: h });
|
|
641
641
|
}, v = (d, h) => {
|
|
642
642
|
n("phone", { initialPhone: d, mode: h });
|
|
@@ -666,14 +666,14 @@ const me = {
|
|
|
666
666
|
], 64));
|
|
667
667
|
}
|
|
668
668
|
}), Bt = 10, Dt = 10, Ut = 15;
|
|
669
|
-
function
|
|
669
|
+
function be(l, s, a) {
|
|
670
670
|
let n = l.replace(/[^\d+]/g, "").replace(/(?!^)\+/g, "");
|
|
671
671
|
return a != null && a.startsWith("ru") && n.startsWith("8") ? n = `+7${n.slice(1)}` : s && n && !n.startsWith("+") && (n = `+${n}`), n;
|
|
672
672
|
}
|
|
673
|
-
function
|
|
673
|
+
function Pe(l) {
|
|
674
674
|
return l.startsWith("+") ? l.slice(1).replace(/\D/g, "") : l.replace(/\D/g, "");
|
|
675
675
|
}
|
|
676
|
-
function
|
|
676
|
+
function Ne(l, s = Bt, a = Ut) {
|
|
677
677
|
if (!l.startsWith("+"))
|
|
678
678
|
return !1;
|
|
679
679
|
const n = l.slice(1);
|
|
@@ -686,11 +686,11 @@ function Vt(l, s) {
|
|
|
686
686
|
let a = 0, n = !1;
|
|
687
687
|
return l.split("").filter((f, v) => f === "+" ? v !== 0 || n ? !1 : (n = !0, !0) : /\d/.test(f) ? (a++, a <= s) : !1).join("");
|
|
688
688
|
}
|
|
689
|
-
function
|
|
689
|
+
function Ce(l) {
|
|
690
690
|
return l.startsWith("+") || /^\d/.test(l);
|
|
691
691
|
}
|
|
692
692
|
const At = /^[\w.%+-]+@[a-z0-9.-]+\.[a-z]{2,}$/i;
|
|
693
|
-
function
|
|
693
|
+
function ke(l) {
|
|
694
694
|
return At.test(l);
|
|
695
695
|
}
|
|
696
696
|
const Ue = /^[\d\s()+]+$/;
|
|
@@ -713,9 +713,12 @@ const St = { class: "smart-input" }, xt = /* @__PURE__ */ te({
|
|
|
713
713
|
},
|
|
714
714
|
emits: ["update:modelValue", "validity-change", "type-change"],
|
|
715
715
|
setup(l, { emit: s }) {
|
|
716
|
-
const a = l, n = s, f = k(() => a.locale ?? "ru"), v = (i) =>
|
|
716
|
+
const a = l, n = s, f = k(() => a.locale ?? "ru"), v = (i) => ce[f.value][i] || i, A = k(() => {
|
|
717
|
+
const i = o.value;
|
|
718
|
+
return i ? Ce(i) ? "phone" : /[^\d+]/.test(i) ? "email" : null : null;
|
|
719
|
+
}), u = k(() => A.value), d = k(() => a.label ? v(a.label) : v("Email или телефон"));
|
|
717
720
|
function h(i, w) {
|
|
718
|
-
return w ? w in
|
|
721
|
+
return w ? w in ce[f.value] ? v(w) : w : v(i);
|
|
719
722
|
}
|
|
720
723
|
const c = k(() => {
|
|
721
724
|
var i, w, m, T, I, M, z, x, R, W, Y;
|
|
@@ -758,22 +761,22 @@ const St = { class: "smart-input" }, xt = /* @__PURE__ */ te({
|
|
|
758
761
|
return;
|
|
759
762
|
}
|
|
760
763
|
const T = c.value.mode === "auto" ? Ft(m, c.value) : c.value.mode;
|
|
761
|
-
if (S.value = T, n("type-change", T), ie(m) &&
|
|
764
|
+
if (S.value = T, n("type-change", T), ie(m) && Ce(m)) {
|
|
762
765
|
o.value = m, n("update:modelValue", m), N.value = "Допустимы только цифры и знак + в начале", n("validity-change", !1);
|
|
763
766
|
return;
|
|
764
767
|
}
|
|
765
768
|
if (T === "email") {
|
|
766
|
-
const I =
|
|
769
|
+
const I = ke(m);
|
|
767
770
|
o.value = m, C.value = m, n("update:modelValue", m), n("validity-change", I);
|
|
768
771
|
return;
|
|
769
772
|
}
|
|
770
773
|
if (T === "phone") {
|
|
771
|
-
const I =
|
|
774
|
+
const I = be(
|
|
772
775
|
m,
|
|
773
776
|
c.value.phone.autoPlus,
|
|
774
777
|
a.locale
|
|
775
778
|
);
|
|
776
|
-
if (
|
|
779
|
+
if (Pe(I).length > c.value.phone.maxDigits) {
|
|
777
780
|
const x = Vt(m, c.value.phone.maxDigits);
|
|
778
781
|
o.value = x, n("update:modelValue", x), ae(x);
|
|
779
782
|
return;
|
|
@@ -783,7 +786,7 @@ const St = { class: "smart-input" }, xt = /* @__PURE__ */ te({
|
|
|
783
786
|
return;
|
|
784
787
|
}
|
|
785
788
|
o.value = I, n("update:modelValue", I), C.value = I;
|
|
786
|
-
const z =
|
|
789
|
+
const z = Ne(
|
|
787
790
|
I,
|
|
788
791
|
c.value.phone.minDigits,
|
|
789
792
|
c.value.phone.maxDigits
|
|
@@ -798,16 +801,16 @@ const St = { class: "smart-input" }, xt = /* @__PURE__ */ te({
|
|
|
798
801
|
N.value = "Допустимы только цифры и знак + в начале", n("validity-change", !1);
|
|
799
802
|
return;
|
|
800
803
|
}
|
|
801
|
-
const i =
|
|
804
|
+
const i = be(
|
|
802
805
|
o.value,
|
|
803
806
|
c.value.phone.autoPlus,
|
|
804
807
|
a.locale
|
|
805
808
|
);
|
|
806
|
-
if (
|
|
809
|
+
if (Pe(i).length < Dt) {
|
|
807
810
|
N.value = "Это не похоже на номер телефона", n("validity-change", !1);
|
|
808
811
|
return;
|
|
809
812
|
}
|
|
810
|
-
const m =
|
|
813
|
+
const m = Ne(
|
|
811
814
|
i,
|
|
812
815
|
c.value.phone.minDigits,
|
|
813
816
|
c.value.phone.maxDigits
|
|
@@ -816,7 +819,7 @@ const St = { class: "smart-input" }, xt = /* @__PURE__ */ te({
|
|
|
816
819
|
return;
|
|
817
820
|
}
|
|
818
821
|
if (A.value === "email") {
|
|
819
|
-
const i =
|
|
822
|
+
const i = ke(o.value);
|
|
820
823
|
N.value = i ? null : "Это не похоже на email", n("validity-change", i);
|
|
821
824
|
}
|
|
822
825
|
}
|
|
@@ -857,7 +860,7 @@ const St = { class: "smart-input" }, xt = /* @__PURE__ */ te({
|
|
|
857
860
|
})) : V("", !0)
|
|
858
861
|
]));
|
|
859
862
|
}
|
|
860
|
-
}), Ot = /* @__PURE__ */ De(xt, [["__scopeId", "data-v-
|
|
863
|
+
}), Ot = /* @__PURE__ */ De(xt, [["__scopeId", "data-v-2e693238"]]);
|
|
861
864
|
export {
|
|
862
865
|
_t as B,
|
|
863
866
|
Lt as C,
|
|
@@ -865,6 +868,6 @@ export {
|
|
|
865
868
|
Rt as a,
|
|
866
869
|
mt as g,
|
|
867
870
|
Ot as i,
|
|
868
|
-
|
|
869
|
-
|
|
871
|
+
de as p,
|
|
872
|
+
ce as t
|
|
870
873
|
};
|
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-4e8a6f81] .p-input-file .overlay{visibility:hidden}.avatar-input[data-v-4e8a6f81] .p-input-file:hover .overlay{visibility:visible}.smart-input[data-v-
|
|
2
|
-
import { a as o, i as r } from "./index-
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".avatar-input[data-v-4e8a6f81] .p-input-file .overlay{visibility:hidden}.avatar-input[data-v-4e8a6f81] .p-input-file:hover .overlay{visibility:visible}.smart-input[data-v-2e693238]{position:relative;width:100%}.smart-input__icon[data-v-2e693238]{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-JgKD-0yi.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-
|
|
3
|
+
import { _ as b, g as C, p as R } from "./index-JgKD-0yi.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")}`;
|