@yourgoods/ui-smart 0.34.0 → 0.36.0
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-Bwwb2zxp.js → ProfileEmailDialog-Boq0HJWN.js} +2 -2
- package/dist/{ProfilePasswordDialog-77LP4o3-.js → ProfilePasswordDialog-wYSrqxOl.js} +1 -1
- package/dist/ProfilePhoneDialog-B-blSlFk.js +832 -0
- package/dist/{index-BHTltQNr.js → index-D4v1HYhf.js} +115 -116
- package/dist/index.js +2 -2
- package/dist/{useRateLimitToast-C2ZlFdsM.js → useRateLimitToast-Brvc4aDT.js} +1 -1
- package/package.json +2 -2
- package/dist/ProfilePhoneDialog-hWwNxuRs.js +0 -814
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ref as h, shallowRef as Oe, defineComponent as Z, defineAsyncComponent as
|
|
1
|
+
import { ref as h, shallowRef as Oe, defineComponent as Z, defineAsyncComponent as q, watch as ie, createBlock as S, createCommentVNode as P, unref as u, openBlock as w, resolveDynamicComponent as ze, mergeProps as Le, computed as T, reactive as J, onMounted as Me, createElementBlock as b, Fragment as ue, createVNode as f, createElementVNode as j, withCtx as D, toDisplayString as F, createTextVNode as _, Teleport as le, Transition as Re, withDirectives as Ge, vShow as qe } from "vue";
|
|
2
2
|
import Je from "axios";
|
|
3
|
-
import { PInputFileUploader as
|
|
3
|
+
import { PInputFileUploader as je, PInput as $, IconFilledEditMd as O, PButton as se, PImageCropper as _e, PToast as Ye, PTeleportContainer as me, PToastContainer as We } from "@profeat/ui-kit";
|
|
4
4
|
function Ke(m, n = 2) {
|
|
5
5
|
if (m === 0)
|
|
6
6
|
return "0 B";
|
|
7
|
-
const r = 1024,
|
|
8
|
-
return `${Number.parseFloat((m / r ** v).toFixed(n))} ${
|
|
7
|
+
const r = 1024, s = ["B", "KB", "MB", "GB", "TB", "PB", "EB"], v = Math.floor(Math.log(m) / Math.log(r));
|
|
8
|
+
return `${Number.parseFloat((m / r ** v).toFixed(n))} ${s[v]}`;
|
|
9
9
|
}
|
|
10
10
|
const Ze = {
|
|
11
11
|
"image/jpeg": "JPEG",
|
|
@@ -21,11 +21,11 @@ function He(m) {
|
|
|
21
21
|
return Ze[n] || ((r = n.split("/")[1]) == null ? void 0 : r.toUpperCase());
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
const
|
|
24
|
+
const ya = {
|
|
25
25
|
OLD: "old",
|
|
26
26
|
NEW: "new",
|
|
27
27
|
COMPLETED: "completed"
|
|
28
|
-
},
|
|
28
|
+
}, Ea = {
|
|
29
29
|
VERIFY_EMAIL: "verify-email"
|
|
30
30
|
};
|
|
31
31
|
let W = null;
|
|
@@ -57,18 +57,18 @@ async function ea(m) {
|
|
|
57
57
|
throw new Error("Ошибка при получении профиля пользователя");
|
|
58
58
|
return n.data;
|
|
59
59
|
}
|
|
60
|
-
const
|
|
60
|
+
const z = h(null), Y = Oe(null);
|
|
61
61
|
function H() {
|
|
62
62
|
return {
|
|
63
|
-
currentDialog:
|
|
63
|
+
currentDialog: z,
|
|
64
64
|
dialogPayload: Y,
|
|
65
|
-
openDialog: (
|
|
66
|
-
|
|
65
|
+
openDialog: (s, v) => {
|
|
66
|
+
z.value = s, Y.value = v ?? null;
|
|
67
67
|
},
|
|
68
68
|
closeDialog: () => {
|
|
69
|
-
|
|
69
|
+
z.value = null, Y.value = null;
|
|
70
70
|
},
|
|
71
|
-
isDialogOpen: (
|
|
71
|
+
isDialogOpen: (s) => z.value === s
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
const aa = {
|
|
@@ -212,21 +212,21 @@ const aa = {
|
|
|
212
212
|
},
|
|
213
213
|
emits: ["clean-input-errors", "on-update-jwt", "update-phone-field", "update-email-field", "on-password-error", "on-toast"],
|
|
214
214
|
setup(m, { emit: n }) {
|
|
215
|
-
const r = n,
|
|
216
|
-
email:
|
|
217
|
-
phone:
|
|
218
|
-
password:
|
|
215
|
+
const r = n, s = h(!0), { currentDialog: v, dialogPayload: g, closeDialog: U } = H(), l = {
|
|
216
|
+
email: q(() => import("./ProfileEmailDialog-Boq0HJWN.js")),
|
|
217
|
+
phone: q(() => import("./ProfilePhoneDialog-B-blSlFk.js")),
|
|
218
|
+
password: q(() => import("./ProfilePasswordDialog-wYSrqxOl.js"))
|
|
219
219
|
}, d = ({ email: y }) => {
|
|
220
220
|
r("update-email-field", y);
|
|
221
221
|
}, p = ({ phone: y }) => {
|
|
222
222
|
r("update-phone-field", y);
|
|
223
223
|
};
|
|
224
224
|
return ie(v, (y) => {
|
|
225
|
-
|
|
226
|
-
}), (y, i) => u(v) ? (w(), S(ze(
|
|
225
|
+
s.value = !!y;
|
|
226
|
+
}), (y, i) => u(v) ? (w(), S(ze(l[u(v)]), Le({
|
|
227
227
|
key: 0,
|
|
228
|
-
modelValue:
|
|
229
|
-
"onUpdate:modelValue": i[0] || (i[0] = (c) =>
|
|
228
|
+
modelValue: s.value,
|
|
229
|
+
"onUpdate:modelValue": i[0] || (i[0] = (c) => s.value = c),
|
|
230
230
|
language: y.language,
|
|
231
231
|
provider: y.provider
|
|
232
232
|
}, u(g), {
|
|
@@ -239,22 +239,22 @@ const aa = {
|
|
|
239
239
|
onOnToast: i[4] || (i[4] = (c) => r("on-toast", c))
|
|
240
240
|
}), null, 16, ["modelValue", "language", "provider", "onClose"])) : P("", !0);
|
|
241
241
|
}
|
|
242
|
-
}), oa = { class: "base-container" }, ra = {
|
|
243
|
-
key: 0,
|
|
244
|
-
class: "input-wrapper"
|
|
245
|
-
}, ia = {
|
|
242
|
+
}), oa = { class: "base-container" }, ra = { key: 0 }, na = { key: 1 }, la = {
|
|
246
243
|
key: 1,
|
|
247
244
|
class: "input-wrapper"
|
|
248
|
-
},
|
|
245
|
+
}, sa = {
|
|
249
246
|
key: 2,
|
|
250
247
|
class: "input-wrapper"
|
|
251
|
-
},
|
|
248
|
+
}, ia = {
|
|
252
249
|
key: 3,
|
|
253
250
|
class: "input-wrapper"
|
|
254
|
-
},
|
|
251
|
+
}, ua = {
|
|
252
|
+
key: 4,
|
|
253
|
+
class: "input-wrapper"
|
|
254
|
+
}, ma = { class: "buttons-container" }, da = {
|
|
255
255
|
key: 0,
|
|
256
256
|
class: "centered-overlay"
|
|
257
|
-
},
|
|
257
|
+
}, pa = { class: "toastWrapper" }, ca = /* @__PURE__ */ Z({
|
|
258
258
|
__name: "PEditUserContact",
|
|
259
259
|
props: {
|
|
260
260
|
language: {},
|
|
@@ -268,7 +268,7 @@ const aa = {
|
|
|
268
268
|
},
|
|
269
269
|
emits: ["open-email-dialog", "open-phone-dialog", "open-password-dialog", "on-update-jwt", "on-password-error", "update-tokens"],
|
|
270
270
|
setup(m, { emit: n }) {
|
|
271
|
-
const r = m,
|
|
271
|
+
const r = m, s = n, v = T(() => r.language ?? "ru"), g = (e) => aa[v.value][e] || e, { openDialog: U } = H(), l = J({ firstName: "", lastName: "" }), d = h({ firstName: "", lastName: "" }), p = J({ firstName: !1, lastName: !1, email: !1, phone: !1 }), y = h(""), i = h(""), c = h(""), E = h(!1), o = J({
|
|
272
272
|
value: null,
|
|
273
273
|
loading: !1,
|
|
274
274
|
accept: ["image/png", "image/jpeg"],
|
|
@@ -276,7 +276,7 @@ const aa = {
|
|
|
276
276
|
// 10mb вроде
|
|
277
277
|
imageBinary: null,
|
|
278
278
|
imageContent: ""
|
|
279
|
-
}), I = h(!1), V = h(!1), A = h(!1),
|
|
279
|
+
}), I = h(!1), V = h(!1), A = h(!1), L = h(!0), M = h(!0), Q = h(void 0), X = h(""), pe = T(() => ae(l.firstName, p.firstName)), ce = T(() => ae(l.lastName, p.lastName)), fe = T(() => p.email && !i.value.trim() ? "Введите e-mail" : ""), ge = T(() => p.phone && !c.value.trim() ? "Введите номер телефона" : ""), B = (e) => r.fields.some((a) => a.key === e), ee = (e) => e && e.trim() ? "edit" : "bind", R = () => setTimeout(() => {
|
|
280
280
|
var e;
|
|
281
281
|
return (e = document.activeElement) == null ? void 0 : e.blur();
|
|
282
282
|
}, 0), ve = T(() => !!(i.value && i.value.trim() !== "")), he = T(() => o.imageContent ? g("Загрузить другое фото") : g("Загрузить фото")), ae = (e, a) => {
|
|
@@ -284,25 +284,25 @@ const aa = {
|
|
|
284
284
|
const t = e.trim();
|
|
285
285
|
return t ? t.length < 2 ? "Поле должно содержать минимум 2 символа" : "" : "Введите значение";
|
|
286
286
|
}, we = (e) => U("email", { mode: e ? "edit" : "bind", initialEmail: e }), ye = () => {
|
|
287
|
-
|
|
287
|
+
R(), p.email = !1, M.value = !1, s("open-email-dialog", i.value, ee(i.value)), we(i.value);
|
|
288
288
|
}, Ee = () => {
|
|
289
|
-
|
|
289
|
+
R(), p.phone = !1, L.value = !1, s("open-phone-dialog", c.value, ee(c.value));
|
|
290
290
|
}, Ne = async (e, a, t) => {
|
|
291
|
-
e === "email" && t && (i.value = t), e === "phone" && t && (c.value = t),
|
|
291
|
+
e === "email" && t && (i.value = t), e === "phone" && t && (c.value = t), s("on-update-jwt");
|
|
292
292
|
}, Ce = (e) => {
|
|
293
293
|
c.value = e;
|
|
294
294
|
}, Pe = (e) => {
|
|
295
295
|
console.debug("emitUpdateEmailField, цепочка такая: profileEmailDialog -> DialogManager -> PEditUserContact", e), i.value = e;
|
|
296
296
|
}, be = (e, a) => {
|
|
297
|
-
A.value = !0,
|
|
297
|
+
A.value = !0, s("on-password-error", e, a);
|
|
298
298
|
}, ke = () => {
|
|
299
|
-
|
|
300
|
-
},
|
|
299
|
+
L.value = !1, M.value = !1;
|
|
300
|
+
}, G = (e) => {
|
|
301
301
|
A.value = !0, Q.value = e.color ?? "", X.value = e.text ?? "";
|
|
302
302
|
}, x = (e) => {
|
|
303
303
|
if (p[e] = !0, e === "firstName" || e === "lastName") {
|
|
304
|
-
const a =
|
|
305
|
-
a.length > 40 && (
|
|
304
|
+
const a = l[e];
|
|
305
|
+
a.length > 40 && (l[e] = a.slice(0, 40), console.debug(`[Input Limit] Поле '${e}' достигло 40 символов. Ввод обрезан.`));
|
|
306
306
|
}
|
|
307
307
|
}, Te = (e) => {
|
|
308
308
|
var t;
|
|
@@ -344,14 +344,14 @@ const aa = {
|
|
|
344
344
|
));
|
|
345
345
|
}, re = h(!1), ne = async (e) => {
|
|
346
346
|
var t, k;
|
|
347
|
-
const a = (t =
|
|
347
|
+
const a = (t = l[e]) == null ? void 0 : t.trim();
|
|
348
348
|
if (a)
|
|
349
349
|
try {
|
|
350
350
|
re.value = !0;
|
|
351
351
|
const N = (k = (await K("/users/profile/update-name", { [e]: a })).data) == null ? void 0 : k.data;
|
|
352
|
-
N != null && N.user && (
|
|
353
|
-
firstName:
|
|
354
|
-
lastName:
|
|
352
|
+
N != null && N.user && (l.firstName = N.user.firstName ?? l.firstName, l.lastName = N.user.lastName ?? l.lastName, d.value = {
|
|
353
|
+
firstName: l.firstName,
|
|
354
|
+
lastName: l.lastName
|
|
355
355
|
});
|
|
356
356
|
} catch (C) {
|
|
357
357
|
throw C;
|
|
@@ -377,7 +377,7 @@ const aa = {
|
|
|
377
377
|
email: xe,
|
|
378
378
|
phoneNumber: $e
|
|
379
379
|
} = t;
|
|
380
|
-
y.value = k ?? "",
|
|
380
|
+
y.value = k ?? "", l.firstName = C ?? "", l.lastName = N ?? "", i.value = xe ?? "", c.value = $e ?? "", o.imageContent = await Se(), d.value = {
|
|
381
381
|
firstName: C ?? "",
|
|
382
382
|
lastName: N ?? ""
|
|
383
383
|
};
|
|
@@ -403,7 +403,7 @@ const aa = {
|
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
405
|
ie(
|
|
406
|
-
() => [
|
|
406
|
+
() => [l.firstName, l.lastName],
|
|
407
407
|
([e, a]) => {
|
|
408
408
|
const t = e.trim(), k = a.trim(), C = t !== d.value.firstName.trim() || k !== d.value.lastName.trim(), N = t.length >= 2 && k.length >= 2;
|
|
409
409
|
V.value = C && N;
|
|
@@ -413,15 +413,15 @@ const aa = {
|
|
|
413
413
|
const Ve = async () => {
|
|
414
414
|
if (V.value)
|
|
415
415
|
try {
|
|
416
|
-
await Promise.all([ne("firstName"), ne("lastName")]), V.value = !1,
|
|
416
|
+
await Promise.all([ne("firstName"), ne("lastName")]), V.value = !1, s("on-update-jwt"), G({ color: "success", text: "Изменения сохранены" });
|
|
417
417
|
} catch (e) {
|
|
418
|
-
console.error(e),
|
|
418
|
+
console.error(e), G({
|
|
419
419
|
color: "error",
|
|
420
420
|
text: g("Не удалось сохранить изменения. Попробуйте позже")
|
|
421
421
|
});
|
|
422
422
|
}
|
|
423
423
|
}, Ae = () => {
|
|
424
|
-
|
|
424
|
+
R(), s("open-password-dialog");
|
|
425
425
|
};
|
|
426
426
|
return Me(async () => {
|
|
427
427
|
if (!r.accessToken) throw new Error("Access token не передан в props");
|
|
@@ -436,60 +436,59 @@ const aa = {
|
|
|
436
436
|
onUpdatePhoneField: Ce,
|
|
437
437
|
onUpdateEmailField: Pe,
|
|
438
438
|
onOnPasswordError: be,
|
|
439
|
-
onOnToast:
|
|
439
|
+
onOnToast: G
|
|
440
440
|
}, null, 8, ["language", "provider"]),
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
]),
|
|
441
|
+
j("div", oa, [
|
|
442
|
+
B("avatar") ? (w(), S(u(je), {
|
|
443
|
+
key: 0,
|
|
444
|
+
modelValue: o.value,
|
|
445
|
+
"onUpdate:modelValue": [
|
|
446
|
+
a[0] || (a[0] = (t) => o.value = t),
|
|
447
|
+
a[1] || (a[1] = (t) => Te(t))
|
|
448
|
+
],
|
|
449
|
+
type: "img",
|
|
450
|
+
class: "avatar-input",
|
|
451
|
+
src: o.imageContent,
|
|
452
|
+
accept: o.accept,
|
|
453
|
+
loading: o.loading,
|
|
454
|
+
label: g("Загрузить фото"),
|
|
455
|
+
"upload-limit": o.uploadLimit,
|
|
456
|
+
"onChange:error": te
|
|
457
|
+
}, {
|
|
458
|
+
afterLoadLabel: D(() => [
|
|
459
|
+
_(F(he.value), 1)
|
|
460
|
+
]),
|
|
461
|
+
subtext: D(() => [
|
|
462
|
+
I.value ? (w(), b("span", ra, F("Размер фото слишком большой. Загрузите JPEG, PNG до 10 MB"))) : (w(), b("span", na, F(`${g("Формат")} ${u(He)(o.accept).join(", ")} ${g("до")} ${u(Ke)(o.uploadLimit)}`), 1))
|
|
463
|
+
]),
|
|
464
|
+
_: 1
|
|
465
|
+
}, 8, ["modelValue", "src", "accept", "loading", "label", "upload-limit"])) : P("", !0),
|
|
467
466
|
B("firstName") ? (w(), b("div", la, [
|
|
468
|
-
f(u(
|
|
469
|
-
modelValue:
|
|
470
|
-
"onUpdate:modelValue": a[2] || (a[2] = (t) =>
|
|
467
|
+
f(u($), {
|
|
468
|
+
modelValue: l.firstName,
|
|
469
|
+
"onUpdate:modelValue": a[2] || (a[2] = (t) => l.firstName = t),
|
|
471
470
|
size: "large",
|
|
472
471
|
label: g("Имя"),
|
|
473
472
|
error: pe.value,
|
|
474
473
|
onBlur: a[3] || (a[3] = (t) => p.firstName = !0),
|
|
475
474
|
onInput: a[4] || (a[4] = (t) => x("firstName"))
|
|
476
475
|
}, null, 8, ["modelValue", "label", "error"]),
|
|
477
|
-
f(u(
|
|
476
|
+
f(u(O), { class: "icon-locked" })
|
|
478
477
|
])) : P("", !0),
|
|
479
|
-
B("lastName") ? (w(), b("div",
|
|
480
|
-
f(u(
|
|
481
|
-
modelValue:
|
|
482
|
-
"onUpdate:modelValue": a[5] || (a[5] = (t) =>
|
|
478
|
+
B("lastName") ? (w(), b("div", sa, [
|
|
479
|
+
f(u($), {
|
|
480
|
+
modelValue: l.lastName,
|
|
481
|
+
"onUpdate:modelValue": a[5] || (a[5] = (t) => l.lastName = t),
|
|
483
482
|
size: "large",
|
|
484
483
|
label: g("Фамилия"),
|
|
485
484
|
error: ce.value,
|
|
486
485
|
onBlur: a[6] || (a[6] = (t) => p.lastName = !0),
|
|
487
486
|
onInput: a[7] || (a[7] = (t) => x("lastName"))
|
|
488
487
|
}, null, 8, ["modelValue", "label", "error"]),
|
|
489
|
-
f(u(
|
|
488
|
+
f(u(O), { class: "icon-locked" })
|
|
490
489
|
])) : P("", !0),
|
|
491
|
-
B("email") ? (w(), b("div",
|
|
492
|
-
f(u(
|
|
490
|
+
B("email") ? (w(), b("div", ia, [
|
|
491
|
+
f(u($), {
|
|
493
492
|
modelValue: i.value,
|
|
494
493
|
"onUpdate:modelValue": a[8] || (a[8] = (t) => i.value = t),
|
|
495
494
|
size: "large",
|
|
@@ -498,15 +497,15 @@ const aa = {
|
|
|
498
497
|
type: "email",
|
|
499
498
|
readonly: "",
|
|
500
499
|
style: { cursor: "pointer" },
|
|
501
|
-
error: fe.value &&
|
|
500
|
+
error: fe.value && M.value,
|
|
502
501
|
onBlur: a[9] || (a[9] = (t) => p.email = !0),
|
|
503
502
|
onInput: a[10] || (a[10] = (t) => x("email")),
|
|
504
503
|
onClick: ye
|
|
505
504
|
}, null, 8, ["modelValue", "error"]),
|
|
506
|
-
f(u(
|
|
505
|
+
f(u(O), { class: "icon-locked" })
|
|
507
506
|
])) : P("", !0),
|
|
508
|
-
B("phone") ? (w(), b("div",
|
|
509
|
-
f(u(
|
|
507
|
+
B("phone") ? (w(), b("div", ua, [
|
|
508
|
+
f(u($), {
|
|
510
509
|
modelValue: c.value,
|
|
511
510
|
"onUpdate:modelValue": a[11] || (a[11] = (t) => c.value = t),
|
|
512
511
|
size: "large",
|
|
@@ -515,41 +514,41 @@ const aa = {
|
|
|
515
514
|
type: "tel",
|
|
516
515
|
readonly: "",
|
|
517
516
|
style: { cursor: "pointer" },
|
|
518
|
-
error: ge.value &&
|
|
517
|
+
error: ge.value && L.value,
|
|
519
518
|
onBlur: a[12] || (a[12] = (t) => p.phone = !0),
|
|
520
519
|
onInput: a[13] || (a[13] = (t) => x("phone")),
|
|
521
520
|
onClick: Ee
|
|
522
521
|
}, null, 8, ["modelValue", "label", "error"]),
|
|
523
|
-
f(u(
|
|
522
|
+
f(u(O), { class: "icon-locked" })
|
|
524
523
|
])) : P("", !0),
|
|
525
|
-
|
|
526
|
-
ve.value ? (w(), S(u(
|
|
524
|
+
j("div", ma, [
|
|
525
|
+
ve.value ? (w(), S(u(se), {
|
|
527
526
|
key: 0,
|
|
528
527
|
color: "secondary",
|
|
529
528
|
onClick: Ae
|
|
530
529
|
}, {
|
|
531
530
|
default: D(() => [
|
|
532
|
-
|
|
531
|
+
_(F(g("Сменить пароль")), 1)
|
|
533
532
|
]),
|
|
534
533
|
_: 1
|
|
535
534
|
})) : P("", !0),
|
|
536
|
-
f(u(
|
|
535
|
+
f(u(se), {
|
|
537
536
|
disabled: !V.value,
|
|
538
537
|
onClick: Ve
|
|
539
538
|
}, {
|
|
540
539
|
default: D(() => [
|
|
541
|
-
|
|
540
|
+
_(F(g("Сохранить")), 1)
|
|
542
541
|
]),
|
|
543
542
|
_: 1
|
|
544
543
|
}, 8, ["disabled"])
|
|
545
544
|
])
|
|
546
545
|
]),
|
|
547
|
-
E.value ? (w(), S(
|
|
546
|
+
E.value ? (w(), S(le, {
|
|
548
547
|
key: 0,
|
|
549
548
|
to: "body"
|
|
550
549
|
}, [
|
|
551
|
-
E.value ? (w(), b("div",
|
|
552
|
-
f(u(
|
|
550
|
+
E.value ? (w(), b("div", da, [
|
|
551
|
+
f(u(_e), {
|
|
553
552
|
"circle-mode": !0,
|
|
554
553
|
"model-value": o.imageContent,
|
|
555
554
|
onClose: Ue,
|
|
@@ -558,8 +557,8 @@ const aa = {
|
|
|
558
557
|
}, null, 8, ["model-value"])
|
|
559
558
|
])) : P("", !0)
|
|
560
559
|
])) : P("", !0),
|
|
561
|
-
(w(), S(
|
|
562
|
-
|
|
560
|
+
(w(), S(le, { to: "#toast-root" }, [
|
|
561
|
+
j("div", pa, [
|
|
563
562
|
f(Re, { name: "list" }, {
|
|
564
563
|
default: D(() => [
|
|
565
564
|
Ge(f(u(Ye), {
|
|
@@ -578,12 +577,12 @@ const aa = {
|
|
|
578
577
|
f(u(me))
|
|
579
578
|
], 64));
|
|
580
579
|
}
|
|
581
|
-
}),
|
|
580
|
+
}), fa = (m, n) => {
|
|
582
581
|
const r = m.__vccOpts || m;
|
|
583
|
-
for (const [
|
|
584
|
-
r[
|
|
582
|
+
for (const [s, v] of n)
|
|
583
|
+
r[s] = v;
|
|
585
584
|
return r;
|
|
586
|
-
},
|
|
585
|
+
}, ga = /* @__PURE__ */ fa(ca, [["__scopeId", "data-v-42e366ae"]]), Na = /* @__PURE__ */ Z({
|
|
587
586
|
__name: "index",
|
|
588
587
|
props: {
|
|
589
588
|
throttlerPrefix: {},
|
|
@@ -597,18 +596,18 @@ const aa = {
|
|
|
597
596
|
},
|
|
598
597
|
emits: ["on-update-jwt", "update-tokens"],
|
|
599
598
|
setup(m, { emit: n }) {
|
|
600
|
-
const r = n, { openDialog:
|
|
601
|
-
|
|
599
|
+
const r = n, { openDialog: s } = H(), v = (d, p) => {
|
|
600
|
+
s("email", { initialEmail: d, mode: p });
|
|
602
601
|
}, g = (d, p) => {
|
|
603
|
-
|
|
602
|
+
s("phone", { initialPhone: d, mode: p });
|
|
604
603
|
}, U = () => {
|
|
605
|
-
|
|
606
|
-
},
|
|
604
|
+
s("password");
|
|
605
|
+
}, l = (d, p, y) => {
|
|
607
606
|
r("on-update-jwt", d, p, y);
|
|
608
607
|
};
|
|
609
608
|
return (d, p) => (w(), b(ue, null, [
|
|
610
609
|
f(u(We)),
|
|
611
|
-
f(
|
|
610
|
+
f(ga, {
|
|
612
611
|
"throttler-prefix": d.throttlerPrefix,
|
|
613
612
|
provider: d.provider,
|
|
614
613
|
"request-url": d.requestUrl,
|
|
@@ -620,17 +619,17 @@ const aa = {
|
|
|
620
619
|
onOpenEmailDialog: v,
|
|
621
620
|
onOpenPhoneDialog: g,
|
|
622
621
|
onOpenPasswordDialog: U,
|
|
623
|
-
onOnUpdateJwt:
|
|
622
|
+
onOnUpdateJwt: l
|
|
624
623
|
}, null, 8, ["throttler-prefix", "provider", "request-url", "language", "fields", "access-token", "refresh-token", "aws-storage-url"]),
|
|
625
624
|
f(u(me))
|
|
626
625
|
], 64));
|
|
627
626
|
}
|
|
628
627
|
});
|
|
629
628
|
export {
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
629
|
+
Ea as B,
|
|
630
|
+
ya as C,
|
|
631
|
+
fa as _,
|
|
632
|
+
Na as a,
|
|
634
633
|
Xe as g,
|
|
635
634
|
K as p,
|
|
636
635
|
aa as t
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var
|
|
2
|
-
import { a as o } from "./index-
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".avatar-input[data-v-42e366ae] .p-input-file .overlay{visibility:hidden}.avatar-input[data-v-42e366ae] .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-D4v1HYhf.js";
|
|
3
3
|
export {
|
|
4
4
|
o as PEditUserContact
|
|
5
5
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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";
|
|
2
2
|
import { PLoader as w } from "@profeat/ui-kit";
|
|
3
|
-
import { _ as g, g as R, p as h } from "./index-
|
|
3
|
+
import { _ as g, g as R, p as h } from "./index-D4v1HYhf.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")}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yourgoods/ui-smart",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@vue/tsconfig": "^0.5.1",
|
|
33
33
|
"axios": "^1.13.2",
|
|
34
34
|
"rollup-plugin-pure": "0.2.1",
|
|
35
|
-
"sass
|
|
35
|
+
"sass": "^1.70.0",
|
|
36
36
|
"typescript": "^5.5.4",
|
|
37
37
|
"unplugin-icons": "0.20.1",
|
|
38
38
|
"unplugin-vue-components": "0.27.4",
|