@yourgoods/ui-smart 0.53.16 → 0.53.17
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-CSkBhFZg.js → ProfileEmailDialog-CWV7K-vm.js} +2 -2
- package/dist/{ProfilePasswordDialog-33HFcbos.js → ProfilePasswordDialog-CW0qxuOc.js} +1 -1
- package/dist/{ProfilePhoneDialog-C38K6-Gg.js → ProfilePhoneDialog-DBJ5vZjO.js} +2 -2
- package/dist/{index-DYfxtE--.js → index-c6MPGIpb.js} +79 -79
- package/dist/index.js +2 -2
- package/dist/{useRateLimitToast-BAK-6nD5.js → useRateLimitToast-C-tVXGQR.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-C-tVXGQR.js";
|
|
3
|
+
import { C as F, _ as He, B as qe, p as W, g as je } from "./index-c6MPGIpb.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-c6MPGIpb.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-C-tVXGQR.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-c6MPGIpb.js";
|
|
5
5
|
const _e = {
|
|
6
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7
7
|
width: "12",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as h, shallowRef as _e, defineComponent as q, defineAsyncComponent as Y, watch as pe, createBlock as x, createCommentVNode as T, unref as
|
|
1
|
+
import { ref as h, shallowRef as _e, defineComponent as q, defineAsyncComponent as Y, watch as pe, createBlock as x, createCommentVNode as T, unref as c, openBlock as b, resolveDynamicComponent as Oe, mergeProps as Re, computed as V, reactive as X, onMounted as Ge, createElementBlock as I, Fragment as ce, createVNode as y, createElementVNode as K, withCtx as $, toDisplayString as z, createTextVNode as Z, Teleport as de, Transition as je, withDirectives as Je, vShow as qe } from "vue";
|
|
2
2
|
import We from "axios";
|
|
3
3
|
import { PInputFileUploader as Ye, PInput as L, IconFilledEditMd as j, PButton as me, PImageCropper as Xe, PToast as Ke, PTeleportContainer as fe, PToastContainer as Ze, IconPhoneMd as He, IconMailMd as Qe } from "@profeat/ui-kit";
|
|
4
4
|
function ea(l, i = 2) {
|
|
@@ -218,30 +218,30 @@ const sa = {
|
|
|
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
220
|
const t = i, o = h(!0), { currentDialog: m, dialogPayload: v, closeDialog: U } = te(), u = {
|
|
221
|
-
email: Y(() => import("./ProfileEmailDialog-
|
|
222
|
-
phone: Y(() => import("./ProfilePhoneDialog-
|
|
223
|
-
password: Y(() => import("./ProfilePasswordDialog-
|
|
224
|
-
}, d = ({ email:
|
|
225
|
-
t("update-email-field",
|
|
226
|
-
}, p = ({ phone:
|
|
227
|
-
t("update-phone-field",
|
|
221
|
+
email: Y(() => import("./ProfileEmailDialog-CWV7K-vm.js")),
|
|
222
|
+
phone: Y(() => import("./ProfilePhoneDialog-DBJ5vZjO.js")),
|
|
223
|
+
password: Y(() => import("./ProfilePasswordDialog-CW0qxuOc.js"))
|
|
224
|
+
}, d = ({ email: E }) => {
|
|
225
|
+
t("update-email-field", E);
|
|
226
|
+
}, p = ({ phone: E }) => {
|
|
227
|
+
t("update-phone-field", E);
|
|
228
228
|
};
|
|
229
|
-
return pe(m, (
|
|
230
|
-
o.value = !!
|
|
231
|
-
}), (
|
|
229
|
+
return pe(m, (E) => {
|
|
230
|
+
o.value = !!E;
|
|
231
|
+
}), (E, s) => c(m) ? (b(), x(Oe(u[c(m)]), Re({
|
|
232
232
|
key: 0,
|
|
233
233
|
modelValue: o.value,
|
|
234
234
|
"onUpdate:modelValue": s[0] || (s[0] = (g) => o.value = g),
|
|
235
|
-
language:
|
|
236
|
-
provider:
|
|
237
|
-
"disable-add-phone":
|
|
238
|
-
},
|
|
239
|
-
onClose:
|
|
235
|
+
language: E.language,
|
|
236
|
+
provider: E.provider,
|
|
237
|
+
"disable-add-phone": E.disableAddPhone
|
|
238
|
+
}, c(v), {
|
|
239
|
+
onClose: c(U),
|
|
240
240
|
onCleanInputErrors: s[1] || (s[1] = (g) => t("clean-input-errors")),
|
|
241
|
-
onOnUpdateJwt: s[2] || (s[2] = (g,
|
|
241
|
+
onOnUpdateJwt: s[2] || (s[2] = (g, f, r) => t("on-update-jwt", g, f, r)),
|
|
242
242
|
onSubmitEmail: d,
|
|
243
243
|
onSubmitPhone: p,
|
|
244
|
-
onOnPasswordError: s[3] || (s[3] = (g,
|
|
244
|
+
onOnPasswordError: s[3] || (s[3] = (g, f) => t("on-password-error", g, f)),
|
|
245
245
|
onOnToast: s[4] || (s[4] = (g) => t("on-toast", g))
|
|
246
246
|
}), null, 16, ["modelValue", "language", "provider", "disable-add-phone", "onClose"])) : T("", !0);
|
|
247
247
|
}
|
|
@@ -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, o = i, m = V(() => t.language ?? "ru"), v = (e) => sa[m.value][e] || e, { openDialog: U } = te(), u = X({ firstName: "", lastName: "" }), d = h({ firstName: "", lastName: "" }), p = X({ firstName: !1, lastName: !1, email: !1, phone: !1 }),
|
|
281
|
+
const t = l, o = i, m = V(() => t.language ?? "ru"), v = (e) => sa[m.value][e] || e, { openDialog: U } = te(), u = X({ firstName: "", lastName: "" }), d = h({ firstName: "", lastName: "" }), p = X({ firstName: !1, lastName: !1, email: !1, phone: !1 }), E = h(""), s = h(""), g = h(""), f = h(!1), r = X({
|
|
282
282
|
value: null,
|
|
283
283
|
loading: !1,
|
|
284
284
|
accept: ["image/png", "image/jpeg"],
|
|
@@ -286,7 +286,7 @@ const sa = {
|
|
|
286
286
|
// 10 MB
|
|
287
287
|
imageBinary: null,
|
|
288
288
|
imageContent: ""
|
|
289
|
-
}), C = h(""), D = h(!1), B = h(!0),
|
|
289
|
+
}), C = h(""), D = h(!1), B = h(!0), w = h(!0), A = h(void 0), F = h(""), S = V(() => ne(u.firstName, p.firstName)), ve = V(() => ne(u.lastName, p.lastName)), he = V(() => p.email && !s.value.trim() ? "Введите e-mail" : ""), ye = V(() => p.phone && !g.value.trim() ? "Введите номер телефона" : ""), M = (e) => t.fields.some((a) => a.key === e), oe = (e) => e && e.trim() ? "edit" : "bind", W = () => setTimeout(() => {
|
|
290
290
|
var e;
|
|
291
291
|
return (e = document.activeElement) == null ? void 0 : e.blur();
|
|
292
292
|
}, 0), we = V(() => !!(s.value && s.value.trim() !== "")), be = V(() => r.imageContent ? v("Загрузить другое фото") : v("Загрузить фото")), ne = (e, a) => {
|
|
@@ -294,7 +294,7 @@ const sa = {
|
|
|
294
294
|
const n = e.trim();
|
|
295
295
|
return n ? n.length < 2 ? "Поле должно содержать минимум 2 символа" : "" : "Введите значение";
|
|
296
296
|
}, Ee = (e) => U("email", { mode: e ? "edit" : "bind", initialEmail: e }), Pe = () => {
|
|
297
|
-
W(), p.email = !1,
|
|
297
|
+
W(), p.email = !1, w.value = !1, o("open-email-dialog", s.value, oe(s.value)), Ee(s.value);
|
|
298
298
|
}, Ne = () => {
|
|
299
299
|
W(), p.phone = !1, B.value = !1, o("open-phone-dialog", g.value, oe(g.value));
|
|
300
300
|
}, Ce = async (e, a, n) => {
|
|
@@ -306,7 +306,7 @@ const sa = {
|
|
|
306
306
|
}, Ue = (e, a) => {
|
|
307
307
|
D.value = !0, o("on-password-error", e, a);
|
|
308
308
|
}, De = () => {
|
|
309
|
-
B.value = !1,
|
|
309
|
+
B.value = !1, w.value = !1;
|
|
310
310
|
}, _ = (e) => {
|
|
311
311
|
D.value = !0, A.value = e.color ?? "", F.value = e.text ?? "";
|
|
312
312
|
}, O = (e) => {
|
|
@@ -325,9 +325,9 @@ const sa = {
|
|
|
325
325
|
C.value = "Файл не подходит. Пожалуйста, загрузите PNG или JPEG размером до 10 МБ", re();
|
|
326
326
|
return;
|
|
327
327
|
}
|
|
328
|
-
r.value = e, r.imageBinary = e.fileBinary ?? null, r.imageContent = e.fileContent ?? "",
|
|
328
|
+
r.value = e, r.imageBinary = e.fileBinary ?? null, r.imageContent = e.fileContent ?? "", f.value = !0;
|
|
329
329
|
}, re = () => {
|
|
330
|
-
r.value = null, r.imageBinary = null, r.imageContent = "",
|
|
330
|
+
r.value = null, r.imageBinary = null, r.imageContent = "", f.value = !1;
|
|
331
331
|
}, Be = async () => {
|
|
332
332
|
try {
|
|
333
333
|
const a = (await ra("/users/profile/delete/avatar")).data;
|
|
@@ -336,15 +336,15 @@ const sa = {
|
|
|
336
336
|
return console.error("Ошибка при удалении аватара:", e), !1;
|
|
337
337
|
}
|
|
338
338
|
}, Ve = () => {
|
|
339
|
-
C.value = "Файл не подходит. Пожалуйста, загрузите PNG или JPEG размером до 10 МБ", r.value = null, r.imageBinary = null, r.imageContent = "",
|
|
339
|
+
C.value = "Файл не подходит. Пожалуйста, загрузите PNG или JPEG размером до 10 МБ", r.value = null, r.imageBinary = null, r.imageContent = "", f.value = !1;
|
|
340
340
|
}, le = async (e, a, n = "image/png") => {
|
|
341
341
|
if (!e) return null;
|
|
342
342
|
const k = await (await fetch(e)).blob();
|
|
343
343
|
return new File([k], a, { type: n });
|
|
344
344
|
}, Ae = () => {
|
|
345
|
-
r.value = null, r.imageBinary = null, r.imageContent = "",
|
|
345
|
+
r.value = null, r.imageBinary = null, r.imageContent = "", f.value = !1;
|
|
346
346
|
}, Fe = async (e) => {
|
|
347
|
-
|
|
347
|
+
f.value = !1;
|
|
348
348
|
const a = r.imageContent;
|
|
349
349
|
if (r.imageContent = e, !r.imageBinary) return;
|
|
350
350
|
const n = await le(
|
|
@@ -359,7 +359,7 @@ const sa = {
|
|
|
359
359
|
try {
|
|
360
360
|
r.loading = !0;
|
|
361
361
|
const P = new FormData();
|
|
362
|
-
P.append("file", n), await ee(`/users/profile/avatar/${
|
|
362
|
+
P.append("file", n), await ee(`/users/profile/avatar/${E.value}`, P, { headers: { "Content-Type": void 0 } });
|
|
363
363
|
} catch (P) {
|
|
364
364
|
console.error(P), _({
|
|
365
365
|
color: "error",
|
|
@@ -409,7 +409,7 @@ const sa = {
|
|
|
409
409
|
email: R,
|
|
410
410
|
phoneNumber: G
|
|
411
411
|
} = n;
|
|
412
|
-
|
|
412
|
+
E.value = P ?? "", u.firstName = k ?? "", u.lastName = N ?? "", s.value = R ?? "", g.value = G ?? "", r.imageContent = await Me(), d.value = {
|
|
413
413
|
firstName: k ?? "",
|
|
414
414
|
lastName: N ?? ""
|
|
415
415
|
};
|
|
@@ -456,7 +456,7 @@ const sa = {
|
|
|
456
456
|
if (!t.accessToken) throw new Error("Access token не передан в props");
|
|
457
457
|
if (!t.requestUrl) throw new Error("auth-backend url не передан в props");
|
|
458
458
|
oa(t.accessToken, t.requestUrl, t.throttlerPrefix), await xe();
|
|
459
|
-
}), (e, a) => (
|
|
459
|
+
}), (e, a) => (b(), I(ce, null, [
|
|
460
460
|
y(ia, {
|
|
461
461
|
language: m.value,
|
|
462
462
|
provider: e.provider,
|
|
@@ -469,7 +469,7 @@ const sa = {
|
|
|
469
469
|
onOnToast: _
|
|
470
470
|
}, null, 8, ["language", "provider", "disable-add-phone"]),
|
|
471
471
|
K("div", ua, [
|
|
472
|
-
M("avatar") ? (
|
|
472
|
+
M("avatar") ? (b(), x(c(Ye), {
|
|
473
473
|
key: 0,
|
|
474
474
|
modelValue: r.value,
|
|
475
475
|
"onUpdate:modelValue": [
|
|
@@ -490,12 +490,12 @@ const sa = {
|
|
|
490
490
|
Z(z(be.value), 1)
|
|
491
491
|
]),
|
|
492
492
|
subtext: $(() => [
|
|
493
|
-
C.value ? (
|
|
493
|
+
C.value ? (b(), I("span", da, z(C.value), 1)) : (b(), I("span", ma, z(`${v("Формат")} ${c(ta)(r.accept).join(", ")} ${v("до")} ${c(ea)(r.uploadLimit)}`), 1))
|
|
494
494
|
]),
|
|
495
495
|
_: 1
|
|
496
496
|
}, 8, ["modelValue", "src", "loading", "label", "upload-limit"])) : T("", !0),
|
|
497
|
-
M("firstName") ? (
|
|
498
|
-
y(
|
|
497
|
+
M("firstName") ? (b(), I("div", pa, [
|
|
498
|
+
y(c(L), {
|
|
499
499
|
modelValue: u.firstName,
|
|
500
500
|
"onUpdate:modelValue": a[2] || (a[2] = (n) => u.firstName = n),
|
|
501
501
|
size: "large",
|
|
@@ -504,10 +504,10 @@ const sa = {
|
|
|
504
504
|
onBlur: a[3] || (a[3] = (n) => p.firstName = !0),
|
|
505
505
|
onInput: a[4] || (a[4] = (n) => O("firstName"))
|
|
506
506
|
}, null, 8, ["modelValue", "label", "error"]),
|
|
507
|
-
y(
|
|
507
|
+
y(c(j), { class: "icon-locked" })
|
|
508
508
|
])) : T("", !0),
|
|
509
|
-
M("lastName") ? (
|
|
510
|
-
y(
|
|
509
|
+
M("lastName") ? (b(), I("div", ca, [
|
|
510
|
+
y(c(L), {
|
|
511
511
|
modelValue: u.lastName,
|
|
512
512
|
"onUpdate:modelValue": a[5] || (a[5] = (n) => u.lastName = n),
|
|
513
513
|
size: "large",
|
|
@@ -516,10 +516,10 @@ const sa = {
|
|
|
516
516
|
onBlur: a[6] || (a[6] = (n) => p.lastName = !0),
|
|
517
517
|
onInput: a[7] || (a[7] = (n) => O("lastName"))
|
|
518
518
|
}, null, 8, ["modelValue", "label", "error"]),
|
|
519
|
-
y(
|
|
519
|
+
y(c(j), { class: "icon-locked" })
|
|
520
520
|
])) : T("", !0),
|
|
521
|
-
M("email") ? (
|
|
522
|
-
y(
|
|
521
|
+
M("email") ? (b(), I("div", fa, [
|
|
522
|
+
y(c(L), {
|
|
523
523
|
modelValue: s.value,
|
|
524
524
|
"onUpdate:modelValue": a[8] || (a[8] = (n) => s.value = n),
|
|
525
525
|
size: "large",
|
|
@@ -528,15 +528,15 @@ const sa = {
|
|
|
528
528
|
type: "email",
|
|
529
529
|
readonly: "",
|
|
530
530
|
style: { cursor: "pointer" },
|
|
531
|
-
error: he.value &&
|
|
531
|
+
error: he.value && w.value,
|
|
532
532
|
onBlur: a[9] || (a[9] = (n) => p.email = !0),
|
|
533
533
|
onInput: a[10] || (a[10] = (n) => O("email")),
|
|
534
534
|
onClick: Pe
|
|
535
535
|
}, null, 8, ["modelValue", "error"]),
|
|
536
|
-
y(
|
|
536
|
+
y(c(j), { class: "icon-locked" })
|
|
537
537
|
])) : T("", !0),
|
|
538
|
-
M("phone") ? (
|
|
539
|
-
y(
|
|
538
|
+
M("phone") ? (b(), I("div", ga, [
|
|
539
|
+
y(c(L), {
|
|
540
540
|
modelValue: g.value,
|
|
541
541
|
"onUpdate:modelValue": a[11] || (a[11] = (n) => g.value = n),
|
|
542
542
|
size: "large",
|
|
@@ -550,10 +550,10 @@ const sa = {
|
|
|
550
550
|
onInput: a[13] || (a[13] = (n) => O("phone")),
|
|
551
551
|
onClick: Ne
|
|
552
552
|
}, null, 8, ["modelValue", "label", "error"]),
|
|
553
|
-
y(
|
|
553
|
+
y(c(j), { class: "icon-locked" })
|
|
554
554
|
])) : T("", !0),
|
|
555
555
|
K("div", va, [
|
|
556
|
-
we.value ? (
|
|
556
|
+
we.value ? (b(), x(c(me), {
|
|
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
|
-
y(
|
|
566
|
+
y(c(me), {
|
|
567
567
|
disabled: !ue.value,
|
|
568
568
|
onClick: ze
|
|
569
569
|
}, {
|
|
@@ -574,12 +574,12 @@ const sa = {
|
|
|
574
574
|
}, 8, ["disabled"])
|
|
575
575
|
])
|
|
576
576
|
]),
|
|
577
|
-
|
|
577
|
+
f.value ? (b(), x(de, {
|
|
578
578
|
key: 0,
|
|
579
579
|
to: "body"
|
|
580
580
|
}, [
|
|
581
|
-
|
|
582
|
-
y(
|
|
581
|
+
f.value ? (b(), I("div", ha, [
|
|
582
|
+
y(c(Xe), {
|
|
583
583
|
"circle-mode": !0,
|
|
584
584
|
"model-value": r.imageContent,
|
|
585
585
|
onClose: Ae,
|
|
@@ -588,11 +588,11 @@ const sa = {
|
|
|
588
588
|
}, null, 8, ["model-value"])
|
|
589
589
|
])) : T("", !0)
|
|
590
590
|
])) : T("", !0),
|
|
591
|
-
(
|
|
591
|
+
(b(), x(de, { to: "#toast-root" }, [
|
|
592
592
|
K("div", ya, [
|
|
593
593
|
y(je, { name: "list" }, {
|
|
594
594
|
default: $(() => [
|
|
595
|
-
Je(y(
|
|
595
|
+
Je(y(c(Ke), {
|
|
596
596
|
class: "toast",
|
|
597
597
|
color: A.value,
|
|
598
598
|
text: F.value,
|
|
@@ -605,7 +605,7 @@ const sa = {
|
|
|
605
605
|
})
|
|
606
606
|
])
|
|
607
607
|
])),
|
|
608
|
-
y(
|
|
608
|
+
y(c(fe))
|
|
609
609
|
], 64));
|
|
610
610
|
}
|
|
611
611
|
}), ge = (l, i) => {
|
|
@@ -634,11 +634,11 @@ const sa = {
|
|
|
634
634
|
o("phone", { initialPhone: d, mode: p });
|
|
635
635
|
}, U = () => {
|
|
636
636
|
o("password");
|
|
637
|
-
}, u = (d, p,
|
|
638
|
-
t("on-update-jwt", d, p,
|
|
637
|
+
}, u = (d, p, E) => {
|
|
638
|
+
t("on-update-jwt", d, p, E);
|
|
639
639
|
};
|
|
640
|
-
return (d, p) => (
|
|
641
|
-
y(
|
|
640
|
+
return (d, p) => (b(), I(ce, null, [
|
|
641
|
+
y(c(Ze)),
|
|
642
642
|
y(ba, {
|
|
643
643
|
"throttler-prefix": d.throttlerPrefix,
|
|
644
644
|
provider: d.provider,
|
|
@@ -654,7 +654,7 @@ const sa = {
|
|
|
654
654
|
onOpenPasswordDialog: U,
|
|
655
655
|
onOnUpdateJwt: u
|
|
656
656
|
}, null, 8, ["throttler-prefix", "provider", "request-url", "language", "fields", "access-token", "refresh-token", "aws-storage-url", "disable-add-phone"]),
|
|
657
|
-
y(
|
|
657
|
+
y(c(fe))
|
|
658
658
|
], 64));
|
|
659
659
|
}
|
|
660
660
|
}), Ea = 10, Pa = 10, Na = 15;
|
|
@@ -698,14 +698,14 @@ const Va = { class: "smart-input" }, Aa = /* @__PURE__ */ q({
|
|
|
698
698
|
emits: ["update:modelValue", "validity-change", "type-change"],
|
|
699
699
|
setup(l, { emit: i }) {
|
|
700
700
|
const t = l, o = i, m = V(() => {
|
|
701
|
-
var s, g,
|
|
701
|
+
var s, g, f, r, C, D, B, w, A, F, S;
|
|
702
702
|
return {
|
|
703
703
|
mode: ((s = t.config) == null ? void 0 : s.mode) ?? "auto",
|
|
704
704
|
phone: {
|
|
705
|
-
enabled: ((
|
|
705
|
+
enabled: ((f = (g = t.config) == null ? void 0 : g.phone) == null ? void 0 : f.enabled) ?? !0,
|
|
706
706
|
minDigits: ((C = (r = t.config) == null ? void 0 : r.phone) == null ? void 0 : C.minDigits) ?? 10,
|
|
707
707
|
maxDigits: ((B = (D = t.config) == null ? void 0 : D.phone) == null ? void 0 : B.maxDigits) ?? 15,
|
|
708
|
-
autoPlus: ((A = (
|
|
708
|
+
autoPlus: ((A = (w = t.config) == null ? void 0 : w.phone) == null ? void 0 : A.autoPlus) ?? !0
|
|
709
709
|
},
|
|
710
710
|
email: {
|
|
711
711
|
enabled: ((S = (F = t.config) == null ? void 0 : F.email) == null ? void 0 : S.enabled) ?? !0
|
|
@@ -715,50 +715,50 @@ const Va = { class: "smart-input" }, Aa = /* @__PURE__ */ q({
|
|
|
715
715
|
pe(() => t.modelValue, (s) => {
|
|
716
716
|
s !== void 0 && (u.value = s, U.value = s);
|
|
717
717
|
});
|
|
718
|
-
function
|
|
718
|
+
function E(s) {
|
|
719
719
|
var C, D, B;
|
|
720
720
|
if (u.value.trim() === "") {
|
|
721
721
|
d.value = null, o("type-change", null);
|
|
722
722
|
return;
|
|
723
723
|
}
|
|
724
|
-
const
|
|
724
|
+
const f = s.target.value, r = m.value.mode === "auto" ? Ba(f, m.value) : m.value.mode;
|
|
725
725
|
if (d.value = r, o("type-change", r), r === "email") {
|
|
726
|
-
const
|
|
727
|
-
p.value =
|
|
726
|
+
const w = Ia(f);
|
|
727
|
+
p.value = f.length === 0 || w ? "" : ((C = t.errorMessages) == null ? void 0 : C.invalidEmail) ?? "Это не похоже на email", u.value = f, U.value = f, o("update:modelValue", f), o("validity-change", w);
|
|
728
728
|
return;
|
|
729
729
|
}
|
|
730
730
|
if (r === "phone") {
|
|
731
|
-
const
|
|
732
|
-
|
|
731
|
+
const w = Ca(
|
|
732
|
+
f,
|
|
733
733
|
m.value.phone.autoPlus,
|
|
734
734
|
t.locale
|
|
735
|
-
), A = ka(
|
|
736
|
-
if (u.value =
|
|
735
|
+
), A = ka(w);
|
|
736
|
+
if (u.value = w, o("update:modelValue", w), Ua(f)) {
|
|
737
737
|
p.value = ((D = t.errorMessages) == null ? void 0 : D.invalidPhoneChars) ?? "Допустимы только цифры и знак +", o("validity-change", !1);
|
|
738
738
|
return;
|
|
739
739
|
}
|
|
740
740
|
if (A.length > m.value.phone.maxDigits) {
|
|
741
|
-
const S =
|
|
741
|
+
const S = w.slice(
|
|
742
742
|
0,
|
|
743
|
-
|
|
743
|
+
w.startsWith("+") ? m.value.phone.maxDigits + 1 : m.value.phone.maxDigits
|
|
744
744
|
);
|
|
745
745
|
u.value = S, U.value = S, o("update:modelValue", S);
|
|
746
746
|
return;
|
|
747
747
|
}
|
|
748
|
-
if (
|
|
748
|
+
if (U.value = w, A.length < Pa) {
|
|
749
749
|
p.value = "", o("validity-change", !1);
|
|
750
750
|
return;
|
|
751
751
|
}
|
|
752
752
|
const F = Ta(
|
|
753
|
-
|
|
753
|
+
w,
|
|
754
754
|
m.value.phone.minDigits,
|
|
755
755
|
m.value.phone.maxDigits
|
|
756
756
|
);
|
|
757
757
|
p.value = F ? "" : ((B = t.errorMessages) == null ? void 0 : B.invalidPhoneLength) ?? "Это не похоже на номер телефона", o("validity-change", F);
|
|
758
758
|
}
|
|
759
759
|
}
|
|
760
|
-
return (s, g) => (
|
|
761
|
-
y(
|
|
760
|
+
return (s, g) => (b(), I("div", Va, [
|
|
761
|
+
y(c(L), {
|
|
762
762
|
ref_key: "inputRef",
|
|
763
763
|
ref: v,
|
|
764
764
|
"model-value": u.value,
|
|
@@ -767,19 +767,19 @@ const Va = { class: "smart-input" }, Aa = /* @__PURE__ */ q({
|
|
|
767
767
|
type: s.type ?? "text",
|
|
768
768
|
size: s.size ?? "large",
|
|
769
769
|
label: s.label ?? "Email или телефон",
|
|
770
|
-
onInput:
|
|
770
|
+
onInput: E
|
|
771
771
|
}, null, 8, ["model-value", "readonly", "error", "type", "size", "label"]),
|
|
772
|
-
d.value === "phone" ? (
|
|
772
|
+
d.value === "phone" ? (b(), x(c(He), {
|
|
773
773
|
key: 0,
|
|
774
774
|
class: "smart-input__icon"
|
|
775
775
|
})) : T("", !0),
|
|
776
|
-
d.value === "email" ? (
|
|
776
|
+
d.value === "email" ? (b(), x(c(Qe), {
|
|
777
777
|
key: 1,
|
|
778
778
|
class: "smart-input__icon"
|
|
779
779
|
})) : T("", !0)
|
|
780
780
|
]));
|
|
781
781
|
}
|
|
782
|
-
}), La = /* @__PURE__ */ ge(Aa, [["__scopeId", "data-v-
|
|
782
|
+
}), La = /* @__PURE__ */ ge(Aa, [["__scopeId", "data-v-5a9c05d1"]]);
|
|
783
783
|
export {
|
|
784
784
|
$a as B,
|
|
785
785
|
Ma as C,
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var
|
|
2
|
-
import { a as o, i as r } from "./index-
|
|
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-5a9c05d1]{position:relative;width:100%}.smart-input__icon[data-v-5a9c05d1]{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-c6MPGIpb.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-c6MPGIpb.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")}`;
|