@yourgoods/ui-smart 0.32.0 → 0.33.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-BCBd_O2U.js → ProfileEmailDialog-DY4_Fue4.js} +150 -150
- package/dist/{ProfilePasswordDialog-BceSLpxy.js → ProfilePasswordDialog-BYI8OfLa.js} +1 -1
- package/dist/{ProfilePhoneDialog-6A8CraBl.js → ProfilePhoneDialog-D2jMqKZo.js} +190 -190
- package/dist/{index-D8GpZOPw.js → index-1pX0MPM8.js} +132 -127
- package/dist/index.js +2 -2
- package/dist/{useRateLimitToast-DGG5L4f3.js → useRateLimitToast-DrsfGcKN.js} +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ref as h, shallowRef as xe, defineComponent as Z, defineAsyncComponent as J, watch as
|
|
2
|
-
import
|
|
3
|
-
import { PInputFileUploader as Re, PInput as
|
|
1
|
+
import { ref as h, shallowRef as xe, defineComponent as Z, defineAsyncComponent as J, watch as ie, createBlock as I, createCommentVNode as N, unref as u, openBlock as w, resolveDynamicComponent as Se, mergeProps as Ae, computed as b, reactive as j, onMounted as $e, createElementBlock as C, Fragment as ue, createVNode as f, createElementVNode as $, withCtx as D, toDisplayString as F, createTextVNode as q, Teleport as le, Transition as Oe, withDirectives as ze, vShow as Me } from "vue";
|
|
2
|
+
import Le from "axios";
|
|
3
|
+
import { PInputFileUploader as Re, PInput as O, IconFilledEditMd as z, PButton as se, PImageCropper as Ge, PToast as _e, PTeleportContainer as me, PToastContainer as Je } from "@profeat/ui-kit";
|
|
4
4
|
function je(m, r = 2) {
|
|
5
5
|
if (m === 0)
|
|
6
6
|
return "0 B";
|
|
@@ -30,7 +30,7 @@ const va = {
|
|
|
30
30
|
};
|
|
31
31
|
let W = null;
|
|
32
32
|
function We(m, r) {
|
|
33
|
-
W =
|
|
33
|
+
W = Le.create({
|
|
34
34
|
baseURL: r,
|
|
35
35
|
headers: {
|
|
36
36
|
Authorization: `Bearer ${m}`,
|
|
@@ -40,16 +40,16 @@ function We(m, r) {
|
|
|
40
40
|
validateStatus: () => !0
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function de() {
|
|
44
44
|
if (!W)
|
|
45
45
|
throw new Error("Axios instance not initialized. Call initAxios(token, baseUrl) first.");
|
|
46
46
|
return W;
|
|
47
47
|
}
|
|
48
48
|
async function K(m, r, n) {
|
|
49
|
-
return
|
|
49
|
+
return de().post(m, r, n);
|
|
50
50
|
}
|
|
51
51
|
async function ha(m, r) {
|
|
52
|
-
return
|
|
52
|
+
return de().get(m, r);
|
|
53
53
|
}
|
|
54
54
|
async function Ke(m) {
|
|
55
55
|
const r = await K("/users/profile/me", m);
|
|
@@ -212,25 +212,25 @@ const Ze = {
|
|
|
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: r }) {
|
|
215
|
-
const n = r, s = h(!0), { currentDialog: g, dialogPayload: v, closeDialog:
|
|
216
|
-
email: J(() => import("./ProfileEmailDialog-
|
|
217
|
-
phone: J(() => import("./ProfilePhoneDialog-
|
|
218
|
-
password: J(() => import("./ProfilePasswordDialog-
|
|
215
|
+
const n = r, s = h(!0), { currentDialog: g, dialogPayload: v, closeDialog: B } = H(), l = {
|
|
216
|
+
email: J(() => import("./ProfileEmailDialog-DY4_Fue4.js")),
|
|
217
|
+
phone: J(() => import("./ProfilePhoneDialog-D2jMqKZo.js")),
|
|
218
|
+
password: J(() => import("./ProfilePasswordDialog-BYI8OfLa.js"))
|
|
219
219
|
}, d = ({ email: y }) => {
|
|
220
220
|
n("update-email-field", y);
|
|
221
221
|
}, p = ({ phone: y }) => {
|
|
222
222
|
n("update-phone-field", y);
|
|
223
223
|
};
|
|
224
|
-
return
|
|
224
|
+
return ie(g, (y) => {
|
|
225
225
|
s.value = !!y;
|
|
226
|
-
}), (y, i) => u(g) ? (w(), I(
|
|
226
|
+
}), (y, i) => u(g) ? (w(), I(Se(l[u(g)]), Ae({
|
|
227
227
|
key: 0,
|
|
228
228
|
modelValue: s.value,
|
|
229
229
|
"onUpdate:modelValue": i[0] || (i[0] = (c) => s.value = c),
|
|
230
230
|
language: y.language,
|
|
231
231
|
provider: y.provider
|
|
232
232
|
}, u(v), {
|
|
233
|
-
onClose: u(
|
|
233
|
+
onClose: u(B),
|
|
234
234
|
onCleanInputErrors: i[1] || (i[1] = (c) => n("clean-input-errors")),
|
|
235
235
|
onOnUpdateJwt: i[2] || (i[2] = (c, E, o) => n("on-update-jwt", c, E, o)),
|
|
236
236
|
onSubmitEmail: d,
|
|
@@ -267,7 +267,7 @@ const Ze = {
|
|
|
267
267
|
},
|
|
268
268
|
emits: ["open-email-dialog", "open-phone-dialog", "open-password-dialog", "on-update-jwt", "on-password-error", "update-tokens"],
|
|
269
269
|
setup(m, { emit: r }) {
|
|
270
|
-
const n = m, s = r, g = b(() => n.language ?? "ru"), v = (e) => Ze[g.value][e] || e, { openDialog:
|
|
270
|
+
const n = m, s = r, g = b(() => n.language ?? "ru"), v = (e) => Ze[g.value][e] || e, { openDialog: B } = 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({
|
|
271
271
|
value: null,
|
|
272
272
|
loading: !1,
|
|
273
273
|
accept: ["image/png", "image/jpeg"],
|
|
@@ -275,109 +275,114 @@ const Ze = {
|
|
|
275
275
|
// 10mb вроде
|
|
276
276
|
imageBinary: null,
|
|
277
277
|
imageContent: ""
|
|
278
|
-
}),
|
|
278
|
+
}), V = h(!1), x = h(!1), S = h(!1), L = h(!0), R = h(!0), Q = h(void 0), X = h(""), pe = b(() => ae(l.firstName, p.firstName)), ce = b(() => ae(l.lastName, p.lastName)), fe = b(() => p.email && !i.value.trim() ? "Введите e-mail" : ""), ve = b(() => p.phone && !c.value.trim() ? "Введите номер телефона" : ""), U = (e) => n.fields.some((t) => t.key === e), ee = (e) => e && e.trim() ? "edit" : "bind", G = () => setTimeout(() => {
|
|
279
279
|
var e;
|
|
280
280
|
return (e = document.activeElement) == null ? void 0 : e.blur();
|
|
281
|
-
}, 0),
|
|
282
|
-
if (!
|
|
283
|
-
const
|
|
284
|
-
return
|
|
285
|
-
},
|
|
286
|
-
G(), p.email = !1, R.value = !1, s("open-email-dialog", i.value, ee(i.value)),
|
|
287
|
-
},
|
|
288
|
-
G(), p.phone = !1,
|
|
289
|
-
},
|
|
290
|
-
e === "email" &&
|
|
291
|
-
},
|
|
281
|
+
}, 0), ge = b(() => !!(i.value && i.value.trim() !== "")), he = b(() => o.imageContent ? v("Загрузить другое фото") : v("Загрузить фото")), ae = (e, t) => {
|
|
282
|
+
if (!t) return "";
|
|
283
|
+
const a = e.trim();
|
|
284
|
+
return a ? a.length < 2 ? "Поле должно содержать минимум 2 символа" : "" : "Введите значение";
|
|
285
|
+
}, we = (e) => B("email", { mode: e ? "edit" : "bind", initialEmail: e }), ye = () => {
|
|
286
|
+
G(), p.email = !1, R.value = !1, s("open-email-dialog", i.value, ee(i.value)), we(i.value);
|
|
287
|
+
}, Ee = () => {
|
|
288
|
+
G(), p.phone = !1, L.value = !1, s("open-phone-dialog", c.value, ee(c.value));
|
|
289
|
+
}, Ne = async (e, t, a) => {
|
|
290
|
+
e === "email" && a && (i.value = a), e === "phone" && a && (c.value = a), s("on-update-jwt");
|
|
291
|
+
}, Ce = (e) => {
|
|
292
292
|
c.value = e;
|
|
293
293
|
}, Pe = (e) => {
|
|
294
294
|
console.debug("emitUpdateEmailField, цепочка такая: profileEmailDialog -> DialogManager -> PEditUserContact", e), i.value = e;
|
|
295
|
-
},
|
|
296
|
-
|
|
297
|
-
},
|
|
298
|
-
|
|
295
|
+
}, be = (e, t) => {
|
|
296
|
+
S.value = !0, s("on-password-error", e, t);
|
|
297
|
+
}, ke = () => {
|
|
298
|
+
L.value = !1, R.value = !1;
|
|
299
299
|
}, _ = (e) => {
|
|
300
|
-
|
|
300
|
+
S.value = !0, Q.value = e.color ?? "", X.value = e.text ?? "";
|
|
301
301
|
}, A = (e) => {
|
|
302
302
|
if (p[e] = !0, e === "firstName" || e === "lastName") {
|
|
303
|
-
const
|
|
304
|
-
|
|
303
|
+
const t = l[e];
|
|
304
|
+
t.length > 40 && (l[e] = t.slice(0, 40), console.debug(`[Input Limit] Поле '${e}' достигло 40 символов. Ввод обрезан.`));
|
|
305
305
|
}
|
|
306
|
-
},
|
|
306
|
+
}, Te = (e) => {
|
|
307
|
+
var a;
|
|
307
308
|
if (!e) {
|
|
308
309
|
o.imageContent = "", o.imageBinary = null, o.value = null;
|
|
309
310
|
return;
|
|
310
311
|
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
312
|
+
if ((((a = e.fileBinary) == null ? void 0 : a.size) ?? 0) > o.uploadLimit) {
|
|
313
|
+
te(), o.value = null;
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
V.value = !1, o.value = e, o.imageBinary = e.fileBinary ?? null, o.imageContent = e.fileContent ?? "", E.value = !0;
|
|
317
|
+
}, te = () => {
|
|
318
|
+
V.value = !0, o.value = null, o.imageBinary = null, o.imageContent = "", E.value = !1;
|
|
319
|
+
}, oe = async (e, t, a = "image/png") => {
|
|
315
320
|
if (!e) return null;
|
|
316
321
|
const T = await (await fetch(e)).blob();
|
|
317
|
-
return new File([T],
|
|
318
|
-
},
|
|
322
|
+
return new File([T], t, { type: a });
|
|
323
|
+
}, Be = () => {
|
|
319
324
|
o.value = null, o.imageBinary = null, o.imageContent = "", E.value = !1;
|
|
320
|
-
},
|
|
325
|
+
}, Ue = async (e) => {
|
|
321
326
|
if (E.value = !1, o.imageContent = e, !o.imageBinary) return;
|
|
322
|
-
const
|
|
323
|
-
if (
|
|
327
|
+
const t = await oe(e, o.imageBinary.name, o.imageBinary.type || "image/png");
|
|
328
|
+
if (t)
|
|
324
329
|
try {
|
|
325
330
|
o.loading = !0;
|
|
326
|
-
const
|
|
327
|
-
|
|
328
|
-
} catch (
|
|
329
|
-
console.error(
|
|
331
|
+
const a = new FormData();
|
|
332
|
+
a.append("file", t), await K(`/users/profile/avatar/${y.value}`, a, { headers: { "Content-Type": void 0 } });
|
|
333
|
+
} catch (a) {
|
|
334
|
+
console.error(a);
|
|
330
335
|
} finally {
|
|
331
|
-
|
|
336
|
+
V.value = !1, o.loading = !1;
|
|
332
337
|
}
|
|
333
338
|
}, De = async (e) => {
|
|
334
|
-
o.imageContent = e ?? "", o.imageBinary && (o.imageBinary = await
|
|
339
|
+
o.imageContent = e ?? "", o.imageBinary && (o.imageBinary = await oe(
|
|
335
340
|
e ?? "",
|
|
336
341
|
o.imageBinary.name,
|
|
337
342
|
o.imageBinary.type || "image/png"
|
|
338
343
|
));
|
|
339
|
-
},
|
|
340
|
-
var
|
|
341
|
-
const
|
|
342
|
-
if (
|
|
344
|
+
}, ne = h(!1), re = async (e) => {
|
|
345
|
+
var a, k;
|
|
346
|
+
const t = (a = l[e]) == null ? void 0 : a.trim();
|
|
347
|
+
if (t)
|
|
343
348
|
try {
|
|
344
|
-
|
|
345
|
-
const
|
|
346
|
-
|
|
349
|
+
ne.value = !0;
|
|
350
|
+
const P = (k = (await K("/users/profile/update-name", { [e]: t })).data) == null ? void 0 : k.data;
|
|
351
|
+
P != null && P.user && (l.firstName = P.user.firstName ?? l.firstName, l.lastName = P.user.lastName ?? l.lastName, d.value = {
|
|
347
352
|
firstName: l.firstName,
|
|
348
353
|
lastName: l.lastName
|
|
349
354
|
});
|
|
350
355
|
} catch (T) {
|
|
351
356
|
throw T;
|
|
352
357
|
} finally {
|
|
353
|
-
|
|
358
|
+
ne.value = !1;
|
|
354
359
|
}
|
|
355
360
|
}, Fe = async () => {
|
|
356
361
|
var e;
|
|
357
362
|
if (!n.accessToken) throw new Error("Access token не передан в props");
|
|
358
363
|
try {
|
|
359
|
-
const
|
|
364
|
+
const a = (e = (await Ke({
|
|
360
365
|
accessToken: n.accessToken,
|
|
361
366
|
refreshToken: n.refreshToken ?? "",
|
|
362
367
|
excludeFields: []
|
|
363
368
|
})).data) == null ? void 0 : e.user;
|
|
364
|
-
if (!
|
|
365
|
-
y.value =
|
|
369
|
+
if (!a) throw new Error("user data отсутствует в response");
|
|
370
|
+
y.value = a.userId ?? "", l.firstName = a.privateFirstName ?? "", l.lastName = a.privateLastName ?? "", i.value = a.email ?? "", c.value = a.phoneNumber ?? "", o.imageContent = a.avatar ?? "", d.value = { firstName: a.privateFirstName ?? "", lastName: a.privateLastName ?? "" };
|
|
366
371
|
} catch {
|
|
367
372
|
}
|
|
368
373
|
};
|
|
369
|
-
|
|
374
|
+
ie(
|
|
370
375
|
() => [l.firstName, l.lastName],
|
|
371
|
-
([e,
|
|
372
|
-
const
|
|
373
|
-
|
|
376
|
+
([e, t]) => {
|
|
377
|
+
const a = e.trim(), k = t.trim(), T = a !== d.value.firstName.trim() || k !== d.value.lastName.trim(), P = a.length >= 2 && k.length >= 2;
|
|
378
|
+
x.value = T && P;
|
|
374
379
|
},
|
|
375
380
|
{ immediate: !0 }
|
|
376
381
|
);
|
|
377
382
|
const Ie = async () => {
|
|
378
|
-
if (
|
|
383
|
+
if (x.value)
|
|
379
384
|
try {
|
|
380
|
-
await Promise.all([
|
|
385
|
+
await Promise.all([re("firstName"), re("lastName")]), x.value = !1, s("on-update-jwt"), _({ color: "success", text: "Изменения сохранены" });
|
|
381
386
|
} catch (e) {
|
|
382
387
|
console.error(e), _({
|
|
383
388
|
color: "error",
|
|
@@ -387,29 +392,29 @@ const Ze = {
|
|
|
387
392
|
}, Ve = () => {
|
|
388
393
|
G(), s("open-password-dialog");
|
|
389
394
|
};
|
|
390
|
-
return
|
|
395
|
+
return $e(async () => {
|
|
391
396
|
if (!n.accessToken) throw new Error("Access token не передан в props");
|
|
392
397
|
if (!n.requestUrl) throw new Error("auth-backend url не передан в props");
|
|
393
398
|
We(n.accessToken, n.requestUrl), await Fe();
|
|
394
|
-
}), (e,
|
|
399
|
+
}), (e, t) => (w(), C(ue, null, [
|
|
395
400
|
f(He, {
|
|
396
401
|
language: g.value,
|
|
397
402
|
provider: e.provider,
|
|
398
|
-
onCleanInputErrors:
|
|
399
|
-
onOnUpdateJwt:
|
|
400
|
-
onUpdatePhoneField:
|
|
403
|
+
onCleanInputErrors: ke,
|
|
404
|
+
onOnUpdateJwt: Ne,
|
|
405
|
+
onUpdatePhoneField: Ce,
|
|
401
406
|
onUpdateEmailField: Pe,
|
|
402
|
-
onOnPasswordError:
|
|
407
|
+
onOnPasswordError: be,
|
|
403
408
|
onOnToast: _
|
|
404
409
|
}, null, 8, ["language", "provider"]),
|
|
405
410
|
$("div", Qe, [
|
|
406
411
|
$("div", Xe, [
|
|
407
|
-
|
|
412
|
+
U("avatar") ? (w(), I(u(Re), {
|
|
408
413
|
key: 0,
|
|
409
414
|
modelValue: o.value,
|
|
410
415
|
"onUpdate:modelValue": [
|
|
411
|
-
|
|
412
|
-
|
|
416
|
+
t[0] || (t[0] = (a) => o.value = a),
|
|
417
|
+
t[1] || (t[1] = (a) => Te(a))
|
|
413
418
|
],
|
|
414
419
|
type: "img",
|
|
415
420
|
src: o.imageContent,
|
|
@@ -417,77 +422,77 @@ const Ze = {
|
|
|
417
422
|
loading: o.loading,
|
|
418
423
|
label: v("Загрузить фото"),
|
|
419
424
|
"upload-limit": o.uploadLimit,
|
|
420
|
-
"onChange:error":
|
|
425
|
+
"onChange:error": te
|
|
421
426
|
}, {
|
|
422
427
|
afterLoadLabel: D(() => [
|
|
423
|
-
q(F(
|
|
428
|
+
q(F(he.value), 1)
|
|
424
429
|
]),
|
|
425
430
|
subtext: D(() => [
|
|
426
|
-
|
|
431
|
+
V.value ? (w(), C("span", ea, F("Размер фото слишком большой. Загрузите JPEG, PNG до 10 MB"))) : (w(), C("span", aa, F(`${v("Формат")} ${u(Ye)(o.accept).join(", ")} ${v("до")} ${u(je)(o.uploadLimit)}`), 1))
|
|
427
432
|
]),
|
|
428
433
|
_: 1
|
|
429
434
|
}, 8, ["modelValue", "src", "accept", "loading", "label", "upload-limit"])) : N("", !0)
|
|
430
435
|
]),
|
|
431
|
-
|
|
432
|
-
f(u(
|
|
436
|
+
U("firstName") ? (w(), C("div", ta, [
|
|
437
|
+
f(u(O), {
|
|
433
438
|
modelValue: l.firstName,
|
|
434
|
-
"onUpdate:modelValue":
|
|
439
|
+
"onUpdate:modelValue": t[2] || (t[2] = (a) => l.firstName = a),
|
|
435
440
|
size: "large",
|
|
436
441
|
label: v("Имя"),
|
|
437
|
-
error:
|
|
438
|
-
onBlur:
|
|
439
|
-
onInput:
|
|
442
|
+
error: pe.value,
|
|
443
|
+
onBlur: t[3] || (t[3] = (a) => p.firstName = !0),
|
|
444
|
+
onInput: t[4] || (t[4] = (a) => A("firstName"))
|
|
440
445
|
}, null, 8, ["modelValue", "label", "error"]),
|
|
441
|
-
f(u(
|
|
446
|
+
f(u(z), { class: "icon-locked" })
|
|
442
447
|
])) : N("", !0),
|
|
443
|
-
|
|
444
|
-
f(u(
|
|
448
|
+
U("lastName") ? (w(), C("div", oa, [
|
|
449
|
+
f(u(O), {
|
|
445
450
|
modelValue: l.lastName,
|
|
446
|
-
"onUpdate:modelValue":
|
|
451
|
+
"onUpdate:modelValue": t[5] || (t[5] = (a) => l.lastName = a),
|
|
447
452
|
size: "large",
|
|
448
453
|
label: v("Фамилия"),
|
|
449
|
-
error:
|
|
450
|
-
onBlur:
|
|
451
|
-
onInput:
|
|
454
|
+
error: ce.value,
|
|
455
|
+
onBlur: t[6] || (t[6] = (a) => p.lastName = !0),
|
|
456
|
+
onInput: t[7] || (t[7] = (a) => A("lastName"))
|
|
452
457
|
}, null, 8, ["modelValue", "label", "error"]),
|
|
453
|
-
f(u(
|
|
458
|
+
f(u(z), { class: "icon-locked" })
|
|
454
459
|
])) : N("", !0),
|
|
455
|
-
|
|
456
|
-
f(u(
|
|
460
|
+
U("email") ? (w(), C("div", na, [
|
|
461
|
+
f(u(O), {
|
|
457
462
|
modelValue: i.value,
|
|
458
|
-
"onUpdate:modelValue":
|
|
463
|
+
"onUpdate:modelValue": t[8] || (t[8] = (a) => i.value = a),
|
|
459
464
|
size: "large",
|
|
460
465
|
"text-size": "medium",
|
|
461
466
|
label: "E-mail",
|
|
462
467
|
type: "email",
|
|
463
468
|
readonly: "",
|
|
464
469
|
style: { cursor: "pointer" },
|
|
465
|
-
error:
|
|
466
|
-
onBlur:
|
|
467
|
-
onInput:
|
|
468
|
-
onClick:
|
|
470
|
+
error: fe.value && R.value,
|
|
471
|
+
onBlur: t[9] || (t[9] = (a) => p.email = !0),
|
|
472
|
+
onInput: t[10] || (t[10] = (a) => A("email")),
|
|
473
|
+
onClick: ye
|
|
469
474
|
}, null, 8, ["modelValue", "error"]),
|
|
470
|
-
f(u(
|
|
475
|
+
f(u(z), { class: "icon-locked" })
|
|
471
476
|
])) : N("", !0),
|
|
472
|
-
|
|
473
|
-
f(u(
|
|
477
|
+
U("phone") ? (w(), C("div", ra, [
|
|
478
|
+
f(u(O), {
|
|
474
479
|
modelValue: c.value,
|
|
475
|
-
"onUpdate:modelValue":
|
|
480
|
+
"onUpdate:modelValue": t[11] || (t[11] = (a) => c.value = a),
|
|
476
481
|
size: "large",
|
|
477
482
|
"text-size": "medium",
|
|
478
483
|
label: v("Номер телефона"),
|
|
479
484
|
type: "tel",
|
|
480
485
|
readonly: "",
|
|
481
486
|
style: { cursor: "pointer" },
|
|
482
|
-
error:
|
|
483
|
-
onBlur:
|
|
484
|
-
onInput:
|
|
485
|
-
onClick:
|
|
487
|
+
error: ve.value && L.value,
|
|
488
|
+
onBlur: t[12] || (t[12] = (a) => p.phone = !0),
|
|
489
|
+
onInput: t[13] || (t[13] = (a) => A("phone")),
|
|
490
|
+
onClick: Ee
|
|
486
491
|
}, null, 8, ["modelValue", "label", "error"]),
|
|
487
|
-
f(u(
|
|
492
|
+
f(u(z), { class: "icon-locked" })
|
|
488
493
|
])) : N("", !0),
|
|
489
494
|
$("div", la, [
|
|
490
|
-
|
|
495
|
+
ge.value ? (w(), I(u(se), {
|
|
491
496
|
key: 0,
|
|
492
497
|
color: "secondary",
|
|
493
498
|
onClick: Ve
|
|
@@ -497,8 +502,8 @@ const Ze = {
|
|
|
497
502
|
]),
|
|
498
503
|
_: 1
|
|
499
504
|
})) : N("", !0),
|
|
500
|
-
f(u(
|
|
501
|
-
disabled: !
|
|
505
|
+
f(u(se), {
|
|
506
|
+
disabled: !x.value,
|
|
502
507
|
onClick: Ie
|
|
503
508
|
}, {
|
|
504
509
|
default: D(() => [
|
|
@@ -508,38 +513,38 @@ const Ze = {
|
|
|
508
513
|
}, 8, ["disabled"])
|
|
509
514
|
])
|
|
510
515
|
]),
|
|
511
|
-
E.value ? (w(), I(
|
|
516
|
+
E.value ? (w(), I(le, {
|
|
512
517
|
key: 0,
|
|
513
518
|
to: "body"
|
|
514
519
|
}, [
|
|
515
|
-
E.value ? (w(),
|
|
520
|
+
E.value ? (w(), C("div", sa, [
|
|
516
521
|
f(u(Ge), {
|
|
517
522
|
"circle-mode": !0,
|
|
518
523
|
"model-value": o.imageContent,
|
|
519
|
-
onClose:
|
|
520
|
-
onSave:
|
|
521
|
-
"onUpdate:modelValue":
|
|
524
|
+
onClose: Be,
|
|
525
|
+
onSave: t[14] || (t[14] = (a) => Ue(a)),
|
|
526
|
+
"onUpdate:modelValue": t[15] || (t[15] = (a) => De(a))
|
|
522
527
|
}, null, 8, ["model-value"])
|
|
523
528
|
])) : N("", !0)
|
|
524
529
|
])) : N("", !0),
|
|
525
|
-
(w(), I(
|
|
530
|
+
(w(), I(le, { to: "#toast-root" }, [
|
|
526
531
|
$("div", ia, [
|
|
527
532
|
f(Oe, { name: "list" }, {
|
|
528
533
|
default: D(() => [
|
|
529
|
-
|
|
534
|
+
ze(f(u(_e), {
|
|
530
535
|
class: "toast",
|
|
531
536
|
color: Q.value,
|
|
532
537
|
text: X.value,
|
|
533
|
-
onClose:
|
|
538
|
+
onClose: t[16] || (t[16] = (a) => S.value = !1)
|
|
534
539
|
}, null, 8, ["color", "text"]), [
|
|
535
|
-
[
|
|
540
|
+
[Me, S.value]
|
|
536
541
|
])
|
|
537
542
|
]),
|
|
538
543
|
_: 1
|
|
539
544
|
})
|
|
540
545
|
])
|
|
541
546
|
])),
|
|
542
|
-
f(u(
|
|
547
|
+
f(u(me))
|
|
543
548
|
], 64));
|
|
544
549
|
}
|
|
545
550
|
}), ma = (m, r) => {
|
|
@@ -547,7 +552,7 @@ const Ze = {
|
|
|
547
552
|
for (const [s, g] of r)
|
|
548
553
|
n[s] = g;
|
|
549
554
|
return n;
|
|
550
|
-
}, da = /* @__PURE__ */ ma(ua, [["__scopeId", "data-v-
|
|
555
|
+
}, da = /* @__PURE__ */ ma(ua, [["__scopeId", "data-v-acf50836"]]), wa = /* @__PURE__ */ Z({
|
|
551
556
|
__name: "index",
|
|
552
557
|
props: {
|
|
553
558
|
throttlerPrefix: {},
|
|
@@ -564,12 +569,12 @@ const Ze = {
|
|
|
564
569
|
s("email", { initialEmail: d, mode: p });
|
|
565
570
|
}, v = (d, p) => {
|
|
566
571
|
s("phone", { initialPhone: d, mode: p });
|
|
567
|
-
},
|
|
572
|
+
}, B = () => {
|
|
568
573
|
s("password");
|
|
569
574
|
}, l = (d, p, y) => {
|
|
570
575
|
n("on-update-jwt", d, p, y);
|
|
571
576
|
};
|
|
572
|
-
return (d, p) => (w(),
|
|
577
|
+
return (d, p) => (w(), C(ue, null, [
|
|
573
578
|
f(u(Je)),
|
|
574
579
|
f(da, {
|
|
575
580
|
"throttler-prefix": d.throttlerPrefix,
|
|
@@ -581,10 +586,10 @@ const Ze = {
|
|
|
581
586
|
"refresh-token": d.refreshToken,
|
|
582
587
|
onOpenEmailDialog: g,
|
|
583
588
|
onOpenPhoneDialog: v,
|
|
584
|
-
onOpenPasswordDialog:
|
|
589
|
+
onOpenPasswordDialog: B,
|
|
585
590
|
onOnUpdateJwt: l
|
|
586
591
|
}, null, 8, ["throttler-prefix", "provider", "request-url", "language", "fields", "access-token", "refresh-token"]),
|
|
587
|
-
f(u(
|
|
592
|
+
f(u(me))
|
|
588
593
|
], 64));
|
|
589
594
|
}
|
|
590
595
|
});
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".avatar-wrapper[data-v-
|
|
2
|
-
import { a as o } from "./index-
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".avatar-wrapper[data-v-acf50836] .p-avatar__overlay{opacity:0!important;transition:opacity .2s ease}.avatar-wrapper[data-v-acf50836]:hover .p-avatar__overlay{opacity:1!important}.avatar-wrapper[data-v-acf50836] .wide-img .overlay{opacity:0!important;transition:opacity .2s ease}.avatar-wrapper[data-v-acf50836]:hover .wide-img .overlay{opacity:1!important}.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(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import { a as o } from "./index-1pX0MPM8.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-1pX0MPM8.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")}`;
|