@yourgoods/ui-smart 0.2.0 → 0.3.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-QyJL9xJa.js → ProfileEmailDialog-rL4YTLa1.js} +2 -2
- package/dist/{ProfilePasswordDialog-XLfFIviS.js → ProfilePasswordDialog-DmfK_fyQ.js} +1 -1
- package/dist/ProfilePhoneDialog-Df3-2osj.js +778 -0
- package/dist/components/PEditUserContact/ProfileDialogs/DialogSegments/AddNewPhoneContent.vue.d.ts +6 -0
- package/dist/components/PEditUserContact/ProfileDialogs/DialogSegments/NewPhoneContent.vue.d.ts +6 -0
- package/dist/components/PEditUserContact/ProfileDialogs/DialogSegments/OldPhoneContent.vue.d.ts +6 -0
- package/dist/components/PEditUserContact/ProfileDialogs/ProfilePhoneDialog.vue.d.ts +5 -3
- package/dist/{index-D9_chX1D.js → index-rDbP74yn.js} +216 -217
- package/dist/index.js +1 -1
- package/dist/{useRateLimitToast-DGwU_bUG.js → useRateLimitToast-D3SdHQJl.js} +1 -1
- package/package.json +2 -2
- package/dist/ProfilePhoneDialog-D6YONYeR.js +0 -734
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as g, shallowRef as De, defineComponent as G, defineAsyncComponent as z, watch as re, createBlock as U, createCommentVNode as N, unref as s, openBlock as y, resolveDynamicComponent as Fe, mergeProps as Ie, computed as C, reactive as L, onMounted as Ve, createElementBlock as b, Fragment as le, createVNode as f, createElementVNode as j, withCtx as B, createTextVNode as V, toDisplayString as x, Teleport as oe, Transition as xe, withDirectives as Se, vShow as $e } from "vue";
|
|
2
2
|
import Ae from "axios";
|
|
3
|
-
import { PInputFileUploader as
|
|
4
|
-
function
|
|
5
|
-
if (
|
|
3
|
+
import { PInputFileUploader as Oe, PInput as S, IconFilledEditMd as $, PButton as ne, PImageCropper as Me, PToast as Re, PTeleportContainer as se, PToastContainer as ze } from "@profeat/ui-kit";
|
|
4
|
+
function Le(d, r = 2) {
|
|
5
|
+
if (d === 0)
|
|
6
6
|
return "0 B";
|
|
7
|
-
const n = 1024,
|
|
8
|
-
return `${Number.parseFloat((
|
|
7
|
+
const n = 1024, u = ["B", "KB", "MB", "GB", "TB", "PB", "EB"], h = Math.floor(Math.log(d) / Math.log(n));
|
|
8
|
+
return `${Number.parseFloat((d / n ** h).toFixed(r))} ${u[h]}`;
|
|
9
9
|
}
|
|
10
|
-
const
|
|
10
|
+
const je = {
|
|
11
11
|
"image/jpeg": "JPEG",
|
|
12
12
|
"image/png": "PNG",
|
|
13
13
|
"application/pdf": "PDF",
|
|
@@ -15,63 +15,63 @@ const Le = {
|
|
|
15
15
|
"application/zip": "ZIP Archive"
|
|
16
16
|
// ...
|
|
17
17
|
};
|
|
18
|
-
function
|
|
19
|
-
return
|
|
18
|
+
function qe(d) {
|
|
19
|
+
return d.map((r) => {
|
|
20
20
|
var n;
|
|
21
|
-
return
|
|
21
|
+
return je[r] || ((n = r.split("/")[1]) == null ? void 0 : n.toUpperCase());
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
const
|
|
24
|
+
const la = {
|
|
25
25
|
OLD: "old",
|
|
26
26
|
NEW: "new",
|
|
27
27
|
COMPLETED: "completed"
|
|
28
|
-
},
|
|
28
|
+
}, sa = {
|
|
29
29
|
VERIFY_EMAIL: "verify-email"
|
|
30
30
|
};
|
|
31
|
-
let
|
|
32
|
-
function
|
|
33
|
-
|
|
31
|
+
let J = null;
|
|
32
|
+
function Je(d, r) {
|
|
33
|
+
J = Ae.create({
|
|
34
34
|
baseURL: r,
|
|
35
35
|
headers: {
|
|
36
|
-
Authorization: `Bearer ${
|
|
36
|
+
Authorization: `Bearer ${d}`,
|
|
37
37
|
"Content-Type": "application/json",
|
|
38
38
|
"x-throttler-prefix": "throttler_profile_edit"
|
|
39
39
|
},
|
|
40
40
|
validateStatus: () => !0
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
if (!
|
|
43
|
+
function ie() {
|
|
44
|
+
if (!J)
|
|
45
45
|
throw new Error("Axios instance not initialized. Call initAxios(token, baseUrl) first.");
|
|
46
|
-
return
|
|
46
|
+
return J;
|
|
47
47
|
}
|
|
48
|
-
async function
|
|
49
|
-
return
|
|
48
|
+
async function Y(d, r, n) {
|
|
49
|
+
return ie().post(d, r, n);
|
|
50
50
|
}
|
|
51
|
-
async function
|
|
52
|
-
return
|
|
51
|
+
async function ia(d, r) {
|
|
52
|
+
return ie().get(d, r);
|
|
53
53
|
}
|
|
54
|
-
async function
|
|
55
|
-
const r = await
|
|
54
|
+
async function Ye(d) {
|
|
55
|
+
const r = await Y("/users/profile/me", d);
|
|
56
56
|
if (console.log("---res: ", r), r.status !== 200 && r.status !== 201 || !r.data)
|
|
57
57
|
throw new Error("Ошибка при получении профиля пользователя");
|
|
58
58
|
return r.data;
|
|
59
59
|
}
|
|
60
|
-
const
|
|
61
|
-
function
|
|
60
|
+
const A = g(null), q = De(null);
|
|
61
|
+
function W() {
|
|
62
62
|
return {
|
|
63
|
-
currentDialog:
|
|
64
|
-
dialogPayload:
|
|
65
|
-
openDialog: (
|
|
66
|
-
|
|
63
|
+
currentDialog: A,
|
|
64
|
+
dialogPayload: q,
|
|
65
|
+
openDialog: (u, h) => {
|
|
66
|
+
A.value = u, q.value = h ?? null;
|
|
67
67
|
},
|
|
68
68
|
closeDialog: () => {
|
|
69
|
-
|
|
69
|
+
A.value = null, q.value = null;
|
|
70
70
|
},
|
|
71
|
-
isDialogOpen: (
|
|
71
|
+
isDialogOpen: (u) => A.value === u
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
-
const
|
|
74
|
+
const Ge = {
|
|
75
75
|
ru: {
|
|
76
76
|
Имя: "Имя",
|
|
77
77
|
Фамилия: "Фамилия",
|
|
@@ -200,57 +200,57 @@ const Ye = {
|
|
|
200
200
|
"Введите новый номер телефона": "Enter a new phone number",
|
|
201
201
|
"Телефон успешно изменен": "Phone number successfully changed"
|
|
202
202
|
}
|
|
203
|
-
},
|
|
203
|
+
}, We = /* @__PURE__ */ G({
|
|
204
204
|
__name: "DialogManager",
|
|
205
205
|
props: {
|
|
206
206
|
language: {},
|
|
207
207
|
provider: {}
|
|
208
208
|
},
|
|
209
209
|
emits: ["clean-input-errors", "on-update-jwt", "update-phone-field", "update-email-field", "on-password-error", "on-toast"],
|
|
210
|
-
setup(
|
|
211
|
-
const n = r,
|
|
212
|
-
email:
|
|
213
|
-
phone:
|
|
214
|
-
password:
|
|
215
|
-
},
|
|
216
|
-
n("update-email-field",
|
|
217
|
-
},
|
|
218
|
-
n("update-phone-field",
|
|
210
|
+
setup(d, { emit: r }) {
|
|
211
|
+
const n = r, u = g(!0), { currentDialog: h, dialogPayload: v, closeDialog: k } = W(), i = {
|
|
212
|
+
email: z(() => import("./ProfileEmailDialog-rL4YTLa1.js")),
|
|
213
|
+
phone: z(() => import("./ProfilePhoneDialog-Df3-2osj.js")),
|
|
214
|
+
password: z(() => import("./ProfilePasswordDialog-DmfK_fyQ.js"))
|
|
215
|
+
}, m = ({ email: w }) => {
|
|
216
|
+
n("update-email-field", w);
|
|
217
|
+
}, p = ({ phone: w }) => {
|
|
218
|
+
n("update-phone-field", w);
|
|
219
219
|
};
|
|
220
|
-
return
|
|
221
|
-
|
|
222
|
-
}), (
|
|
220
|
+
return re(h, (w) => {
|
|
221
|
+
u.value = !!w;
|
|
222
|
+
}), (w, l) => s(h) ? (y(), U(Fe(i[s(h)]), Ie({
|
|
223
223
|
key: 0,
|
|
224
|
-
modelValue:
|
|
225
|
-
"onUpdate:modelValue":
|
|
226
|
-
language:
|
|
227
|
-
provider:
|
|
228
|
-
}, s(
|
|
229
|
-
onClose: s(
|
|
230
|
-
onCleanInputErrors:
|
|
231
|
-
onOnUpdateJwt:
|
|
232
|
-
onSubmitEmail:
|
|
233
|
-
onSubmitPhone:
|
|
234
|
-
onOnPasswordError:
|
|
235
|
-
onOnToast:
|
|
236
|
-
}), null, 16, ["modelValue", "language", "provider", "onClose"])) :
|
|
224
|
+
modelValue: u.value,
|
|
225
|
+
"onUpdate:modelValue": l[0] || (l[0] = (c) => u.value = c),
|
|
226
|
+
language: w.language,
|
|
227
|
+
provider: w.provider
|
|
228
|
+
}, s(v), {
|
|
229
|
+
onClose: s(k),
|
|
230
|
+
onCleanInputErrors: l[1] || (l[1] = (c) => n("clean-input-errors")),
|
|
231
|
+
onOnUpdateJwt: l[2] || (l[2] = (c, E, o) => n("on-update-jwt", c, E, o)),
|
|
232
|
+
onSubmitEmail: m,
|
|
233
|
+
onSubmitPhone: p,
|
|
234
|
+
onOnPasswordError: l[3] || (l[3] = (c, E) => n("on-password-error", c, E)),
|
|
235
|
+
onOnToast: l[4] || (l[4] = (c) => n("on-toast", c))
|
|
236
|
+
}), null, 16, ["modelValue", "language", "provider", "onClose"])) : N("", !0);
|
|
237
237
|
}
|
|
238
|
-
}),
|
|
238
|
+
}), Ke = { class: "base-container" }, Ze = {
|
|
239
239
|
key: 1,
|
|
240
240
|
class: "input-wrapper"
|
|
241
|
-
},
|
|
241
|
+
}, He = {
|
|
242
242
|
key: 2,
|
|
243
243
|
class: "input-wrapper"
|
|
244
|
-
},
|
|
244
|
+
}, Qe = {
|
|
245
245
|
key: 3,
|
|
246
246
|
class: "input-wrapper"
|
|
247
|
-
},
|
|
247
|
+
}, Xe = {
|
|
248
248
|
key: 4,
|
|
249
249
|
class: "input-wrapper"
|
|
250
|
-
},
|
|
250
|
+
}, _e = { class: "buttons-container" }, ea = {
|
|
251
251
|
key: 0,
|
|
252
252
|
class: "centered-overlay"
|
|
253
|
-
},
|
|
253
|
+
}, aa = { class: "toastWrapper" }, ta = /* @__PURE__ */ G({
|
|
254
254
|
__name: "PEditUserContact",
|
|
255
255
|
props: {
|
|
256
256
|
language: {},
|
|
@@ -262,8 +262,8 @@ const Ye = {
|
|
|
262
262
|
fields: {}
|
|
263
263
|
},
|
|
264
264
|
emits: ["open-email-dialog", "open-phone-dialog", "open-password-dialog", "on-update-jwt", "on-password-error", "update-tokens"],
|
|
265
|
-
setup(
|
|
266
|
-
const n =
|
|
265
|
+
setup(d, { emit: r }) {
|
|
266
|
+
const n = d, u = r, h = C(() => n.language ?? "ru"), v = (e) => Ge[h.value][e] || e, { openDialog: k } = W(), i = L({ firstName: "", lastName: "" }), m = g({ firstName: "", lastName: "" }), p = L({ firstName: !1, lastName: !1, email: !1, phone: !1 }), w = g(""), l = g(""), c = g(""), E = g(!1), o = L({
|
|
267
267
|
value: null,
|
|
268
268
|
loading: !1,
|
|
269
269
|
accept: ["image/png", "image/jpeg"],
|
|
@@ -271,165 +271,164 @@ const Ye = {
|
|
|
271
271
|
// 10mb вроде
|
|
272
272
|
imageBinary: null,
|
|
273
273
|
imageContent: ""
|
|
274
|
-
}),
|
|
274
|
+
}), D = g(!1), F = g(!1), K = g(!0), Z = g(!0), H = g(void 0), Q = g(""), ue = C(() => p.firstName && !i.firstName.trim() ? "Введите имя" : ""), me = C(() => p.lastName && !i.lastName.trim() ? "Введите фамилию" : ""), de = C(() => p.email && !l.value.trim() ? "Введите e-mail" : ""), pe = C(() => p.phone && !c.value.trim() ? "Введите номер телефона" : ""), P = (e) => n.fields.some((a) => a.key === e), X = (e) => e && e.trim() ? "edit" : "bind", O = () => setTimeout(() => {
|
|
275
275
|
var e;
|
|
276
276
|
return (e = document.activeElement) == null ? void 0 : e.blur();
|
|
277
|
-
}, 0),
|
|
278
|
-
O(),
|
|
277
|
+
}, 0), ce = C(() => !!(l.value && l.value.trim() !== "")), fe = (e) => k("email", { mode: e ? "edit" : "bind", initialEmail: e }), ve = () => {
|
|
278
|
+
O(), u("open-email-dialog", l.value, X(l.value)), fe(l.value);
|
|
279
279
|
}, ge = () => {
|
|
280
|
-
O(),
|
|
281
|
-
},
|
|
282
|
-
e === "email" && t && (l.value = t), e === "phone" && t && (
|
|
283
|
-
}, he = (e) => {
|
|
284
|
-
d.value = e;
|
|
280
|
+
O(), u("open-phone-dialog", c.value, X(c.value));
|
|
281
|
+
}, he = async (e, a, t) => {
|
|
282
|
+
e === "email" && t && (l.value = t), e === "phone" && t && (c.value = t), u("on-update-jwt");
|
|
285
283
|
}, we = (e) => {
|
|
284
|
+
c.value = e;
|
|
285
|
+
}, ye = (e) => {
|
|
286
286
|
l.value = e;
|
|
287
|
-
},
|
|
288
|
-
F.value = !0,
|
|
289
|
-
},
|
|
290
|
-
|
|
291
|
-
},
|
|
292
|
-
F.value = !0,
|
|
287
|
+
}, Ee = (e, a) => {
|
|
288
|
+
F.value = !0, u("on-password-error", e, a);
|
|
289
|
+
}, Ne = () => {
|
|
290
|
+
K.value = !1, Z.value = !1;
|
|
291
|
+
}, _ = (e) => {
|
|
292
|
+
F.value = !0, H.value = e.color ?? "", Q.value = e.text ?? "";
|
|
293
293
|
}, I = (e) => {
|
|
294
|
-
|
|
295
|
-
},
|
|
294
|
+
p[e] = !0;
|
|
295
|
+
}, be = (e) => {
|
|
296
296
|
if (!e) {
|
|
297
297
|
o.imageContent = "", o.imageBinary = null, o.value = null;
|
|
298
298
|
return;
|
|
299
299
|
}
|
|
300
|
-
o.value = e, o.imageBinary = e.fileBinary ?? null, o.imageContent = e.fileContent ?? "",
|
|
301
|
-
},
|
|
300
|
+
o.value = e, o.imageBinary = e.fileBinary ?? null, o.imageContent = e.fileContent ?? "", E.value = !0;
|
|
301
|
+
}, ee = async (e, a, t = "image/png") => {
|
|
302
302
|
if (!e) return null;
|
|
303
|
-
const
|
|
304
|
-
return new File([
|
|
305
|
-
},
|
|
306
|
-
o.value = null, o.imageBinary = null, o.imageContent = "",
|
|
307
|
-
},
|
|
308
|
-
if (
|
|
309
|
-
const a = await
|
|
303
|
+
const R = await (await fetch(e)).blob();
|
|
304
|
+
return new File([R], a, { type: t });
|
|
305
|
+
}, Ce = () => {
|
|
306
|
+
o.value = null, o.imageBinary = null, o.imageContent = "", E.value = !1;
|
|
307
|
+
}, ke = async (e) => {
|
|
308
|
+
if (E.value = !1, o.imageContent = e, !o.imageBinary) return;
|
|
309
|
+
const a = await ee(e, o.imageBinary.name, o.imageBinary.type || "image/png");
|
|
310
310
|
if (a)
|
|
311
311
|
try {
|
|
312
312
|
o.loading = !0;
|
|
313
|
-
const t =
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
body: C
|
|
313
|
+
const t = new FormData();
|
|
314
|
+
t.append("file", a), await Y(`/users/profile/avatar/${w.value}`, {
|
|
315
|
+
body: t
|
|
317
316
|
});
|
|
318
317
|
} catch {
|
|
319
318
|
} finally {
|
|
320
319
|
o.loading = !1;
|
|
321
320
|
}
|
|
322
|
-
},
|
|
323
|
-
o.imageContent = e ?? "", o.imageBinary && (o.imageBinary = await
|
|
321
|
+
}, Pe = async (e) => {
|
|
322
|
+
o.imageContent = e ?? "", o.imageBinary && (o.imageBinary = await ee(
|
|
324
323
|
e ?? "",
|
|
325
324
|
o.imageBinary.name,
|
|
326
325
|
o.imageBinary.type || "image/png"
|
|
327
326
|
));
|
|
328
|
-
},
|
|
329
|
-
var t,
|
|
327
|
+
}, ae = g(!1), te = async (e) => {
|
|
328
|
+
var t, M;
|
|
330
329
|
const a = (t = i[e]) == null ? void 0 : t.trim();
|
|
331
330
|
if (a)
|
|
332
331
|
try {
|
|
333
|
-
|
|
334
|
-
const
|
|
335
|
-
|
|
332
|
+
ae.value = !0;
|
|
333
|
+
const T = (M = (await Y("/users/profile/update-name", { [e]: a })).data) == null ? void 0 : M.data;
|
|
334
|
+
T != null && T.user && (i.firstName = T.user.firstName ?? i.firstName, i.lastName = T.user.lastName ?? i.lastName, m.value = {
|
|
336
335
|
firstName: i.firstName,
|
|
337
336
|
lastName: i.lastName
|
|
338
337
|
});
|
|
339
338
|
} catch {
|
|
340
339
|
} finally {
|
|
341
|
-
|
|
340
|
+
ae.value = !1;
|
|
342
341
|
}
|
|
343
|
-
},
|
|
342
|
+
}, Te = async () => {
|
|
344
343
|
var e;
|
|
345
344
|
if (!n.accessToken) throw new Error("Access token не передан в props");
|
|
346
345
|
try {
|
|
347
|
-
const t = (e = (await
|
|
346
|
+
const t = (e = (await Ye({
|
|
348
347
|
accessToken: n.accessToken,
|
|
349
348
|
refreshToken: n.refreshToken ?? "",
|
|
350
349
|
excludeFields: []
|
|
351
350
|
})).data) == null ? void 0 : e.user;
|
|
352
351
|
if (!t) throw new Error("user data отсутствует в response");
|
|
353
|
-
i.firstName = t.privateFirstName ?? "", i.lastName = t.privateLastName ?? "", l.value = t.email ?? "",
|
|
352
|
+
w.value = t.userId ?? "", i.firstName = t.privateFirstName ?? "", i.lastName = t.privateLastName ?? "", l.value = t.email ?? "", c.value = t.phoneNumber ?? "", o.imageContent = t.avatar ?? "", m.value = { firstName: t.privateFirstName ?? "", lastName: t.privateLastName ?? "" };
|
|
354
353
|
} catch {
|
|
355
354
|
}
|
|
356
355
|
};
|
|
357
|
-
|
|
356
|
+
re(
|
|
358
357
|
() => [i.firstName, i.lastName],
|
|
359
358
|
([e, a]) => {
|
|
360
|
-
const t = e.trim() !==
|
|
361
|
-
|
|
359
|
+
const t = e.trim() !== m.value.firstName.trim() || a.trim() !== m.value.lastName.trim();
|
|
360
|
+
D.value = t;
|
|
362
361
|
},
|
|
363
362
|
{ immediate: !0 }
|
|
364
363
|
);
|
|
365
|
-
const
|
|
366
|
-
|
|
367
|
-
},
|
|
368
|
-
O(),
|
|
364
|
+
const Be = async () => {
|
|
365
|
+
D.value && (await Promise.all([te("firstName"), te("lastName")]), D.value = !1, u("on-update-jwt"), _({ color: "success", text: "Изменения сохранены" }));
|
|
366
|
+
}, Ue = () => {
|
|
367
|
+
O(), u("open-password-dialog");
|
|
369
368
|
};
|
|
370
|
-
return
|
|
369
|
+
return Ve(async () => {
|
|
371
370
|
if (!n.accessToken) throw new Error("Access token не передан в props");
|
|
372
371
|
if (!n.requestUrl) throw new Error("auth-backend url не передан в props");
|
|
373
|
-
|
|
374
|
-
}), (e, a) => (y(),
|
|
375
|
-
f(
|
|
372
|
+
Je(n.accessToken, n.requestUrl), await Te();
|
|
373
|
+
}), (e, a) => (y(), b(le, null, [
|
|
374
|
+
f(We, {
|
|
376
375
|
language: h.value,
|
|
377
376
|
provider: e.provider,
|
|
378
|
-
onCleanInputErrors:
|
|
379
|
-
onOnUpdateJwt:
|
|
380
|
-
onUpdatePhoneField:
|
|
381
|
-
onUpdateEmailField:
|
|
382
|
-
onOnPasswordError:
|
|
383
|
-
onOnToast:
|
|
377
|
+
onCleanInputErrors: Ne,
|
|
378
|
+
onOnUpdateJwt: he,
|
|
379
|
+
onUpdatePhoneField: we,
|
|
380
|
+
onUpdateEmailField: ye,
|
|
381
|
+
onOnPasswordError: Ee,
|
|
382
|
+
onOnToast: _
|
|
384
383
|
}, null, 8, ["language", "provider"]),
|
|
385
|
-
|
|
386
|
-
|
|
384
|
+
j("div", Ke, [
|
|
385
|
+
P("avatar") ? (y(), U(s(Oe), {
|
|
387
386
|
key: 0,
|
|
388
387
|
modelValue: o.value,
|
|
389
388
|
"onUpdate:modelValue": [
|
|
390
389
|
a[0] || (a[0] = (t) => o.value = t),
|
|
391
|
-
a[1] || (a[1] = (t) =>
|
|
390
|
+
a[1] || (a[1] = (t) => be(t))
|
|
392
391
|
],
|
|
393
392
|
type: "img",
|
|
394
393
|
src: o.imageContent,
|
|
395
394
|
accept: o.accept,
|
|
396
395
|
loading: o.loading,
|
|
397
|
-
label:
|
|
396
|
+
label: v("Загрузить обложку"),
|
|
398
397
|
"upload-limit": o.uploadLimit
|
|
399
398
|
}, {
|
|
400
|
-
afterLoadLabel:
|
|
401
|
-
V(x(
|
|
399
|
+
afterLoadLabel: B(() => [
|
|
400
|
+
V(x(v("Загрузить обложку")), 1)
|
|
402
401
|
]),
|
|
403
|
-
subtext:
|
|
404
|
-
V(x(`${
|
|
402
|
+
subtext: B(() => [
|
|
403
|
+
V(x(`${v("Формат")} ${s(qe)(o.accept).join(", ")} ${v("до")} ${s(Le)(o.uploadLimit)}`), 1)
|
|
405
404
|
]),
|
|
406
405
|
_: 1
|
|
407
|
-
}, 8, ["modelValue", "src", "accept", "loading", "label", "upload-limit"])) :
|
|
408
|
-
|
|
406
|
+
}, 8, ["modelValue", "src", "accept", "loading", "label", "upload-limit"])) : N("", !0),
|
|
407
|
+
P("firstName") ? (y(), b("div", Ze, [
|
|
409
408
|
f(s(S), {
|
|
410
409
|
modelValue: i.firstName,
|
|
411
410
|
"onUpdate:modelValue": a[2] || (a[2] = (t) => i.firstName = t),
|
|
412
411
|
size: "large",
|
|
413
|
-
label:
|
|
414
|
-
error:
|
|
415
|
-
onBlur: a[3] || (a[3] = (t) =>
|
|
412
|
+
label: v("Имя"),
|
|
413
|
+
error: ue.value,
|
|
414
|
+
onBlur: a[3] || (a[3] = (t) => p.firstName = !0),
|
|
416
415
|
onInput: a[4] || (a[4] = (t) => I("firstName"))
|
|
417
416
|
}, null, 8, ["modelValue", "label", "error"]),
|
|
418
|
-
f(s(
|
|
419
|
-
])) :
|
|
420
|
-
|
|
417
|
+
f(s($), { class: "icon-locked" })
|
|
418
|
+
])) : N("", !0),
|
|
419
|
+
P("lastName") ? (y(), b("div", He, [
|
|
421
420
|
f(s(S), {
|
|
422
421
|
modelValue: i.lastName,
|
|
423
422
|
"onUpdate:modelValue": a[5] || (a[5] = (t) => i.lastName = t),
|
|
424
423
|
size: "large",
|
|
425
|
-
label:
|
|
426
|
-
error:
|
|
427
|
-
onBlur: a[6] || (a[6] = (t) =>
|
|
424
|
+
label: v("Фамилия"),
|
|
425
|
+
error: me.value,
|
|
426
|
+
onBlur: a[6] || (a[6] = (t) => p.lastName = !0),
|
|
428
427
|
onInput: a[7] || (a[7] = (t) => I("lastName"))
|
|
429
428
|
}, null, 8, ["modelValue", "label", "error"]),
|
|
430
|
-
f(s(
|
|
431
|
-
])) :
|
|
432
|
-
|
|
429
|
+
f(s($), { class: "icon-locked" })
|
|
430
|
+
])) : N("", !0),
|
|
431
|
+
P("email") ? (y(), b("div", Qe, [
|
|
433
432
|
f(s(S), {
|
|
434
433
|
modelValue: l.value,
|
|
435
434
|
"onUpdate:modelValue": a[8] || (a[8] = (t) => l.value = t),
|
|
@@ -439,87 +438,87 @@ const Ye = {
|
|
|
439
438
|
type: "email",
|
|
440
439
|
readonly: "",
|
|
441
440
|
style: { cursor: "pointer" },
|
|
442
|
-
error:
|
|
443
|
-
onBlur: a[9] || (a[9] = (t) =>
|
|
441
|
+
error: de.value && Z.value,
|
|
442
|
+
onBlur: a[9] || (a[9] = (t) => p.email = !0),
|
|
444
443
|
onInput: a[10] || (a[10] = (t) => I("email")),
|
|
445
|
-
onClick:
|
|
444
|
+
onClick: ve
|
|
446
445
|
}, null, 8, ["modelValue", "error"]),
|
|
447
|
-
f(s(
|
|
448
|
-
])) :
|
|
449
|
-
|
|
446
|
+
f(s($), { class: "icon-locked" })
|
|
447
|
+
])) : N("", !0),
|
|
448
|
+
P("phone") ? (y(), b("div", Xe, [
|
|
450
449
|
f(s(S), {
|
|
451
|
-
modelValue:
|
|
452
|
-
"onUpdate:modelValue": a[11] || (a[11] = (t) =>
|
|
450
|
+
modelValue: c.value,
|
|
451
|
+
"onUpdate:modelValue": a[11] || (a[11] = (t) => c.value = t),
|
|
453
452
|
size: "large",
|
|
454
453
|
"text-size": "medium",
|
|
455
|
-
label:
|
|
454
|
+
label: v("Номер телефона"),
|
|
456
455
|
type: "tel",
|
|
457
456
|
readonly: "",
|
|
458
457
|
style: { cursor: "pointer" },
|
|
459
|
-
error:
|
|
460
|
-
onBlur: a[12] || (a[12] = (t) =>
|
|
458
|
+
error: pe.value && K.value,
|
|
459
|
+
onBlur: a[12] || (a[12] = (t) => p.phone = !0),
|
|
461
460
|
onInput: a[13] || (a[13] = (t) => I("phone")),
|
|
462
461
|
onClick: ge
|
|
463
462
|
}, null, 8, ["modelValue", "label", "error"]),
|
|
464
|
-
f(s(
|
|
465
|
-
])) :
|
|
466
|
-
|
|
467
|
-
|
|
463
|
+
f(s($), { class: "icon-locked" })
|
|
464
|
+
])) : N("", !0),
|
|
465
|
+
j("div", _e, [
|
|
466
|
+
ce.value ? (y(), U(s(ne), {
|
|
468
467
|
key: 0,
|
|
469
468
|
color: "secondary",
|
|
470
|
-
onClick:
|
|
469
|
+
onClick: Ue
|
|
471
470
|
}, {
|
|
472
|
-
default:
|
|
473
|
-
V(x(
|
|
471
|
+
default: B(() => [
|
|
472
|
+
V(x(v("Сменить пароль")), 1)
|
|
474
473
|
]),
|
|
475
474
|
_: 1
|
|
476
|
-
})) :
|
|
477
|
-
f(s(
|
|
478
|
-
disabled: !
|
|
479
|
-
onClick:
|
|
475
|
+
})) : N("", !0),
|
|
476
|
+
f(s(ne), {
|
|
477
|
+
disabled: !D.value,
|
|
478
|
+
onClick: Be
|
|
480
479
|
}, {
|
|
481
|
-
default:
|
|
482
|
-
V(x(
|
|
480
|
+
default: B(() => [
|
|
481
|
+
V(x(v("Сохранить")), 1)
|
|
483
482
|
]),
|
|
484
483
|
_: 1
|
|
485
484
|
}, 8, ["disabled"])
|
|
486
485
|
])
|
|
487
486
|
]),
|
|
488
|
-
|
|
487
|
+
E.value ? (y(), U(oe, {
|
|
489
488
|
key: 0,
|
|
490
489
|
to: "body"
|
|
491
490
|
}, [
|
|
492
|
-
|
|
493
|
-
f(s(
|
|
491
|
+
E.value ? (y(), b("div", ea, [
|
|
492
|
+
f(s(Me), {
|
|
494
493
|
"circle-mode": !0,
|
|
495
494
|
"model-value": o.imageContent,
|
|
496
|
-
onClose:
|
|
497
|
-
onSave: a[14] || (a[14] = (t) =>
|
|
498
|
-
"onUpdate:modelValue": a[15] || (a[15] = (t) =>
|
|
495
|
+
onClose: Ce,
|
|
496
|
+
onSave: a[14] || (a[14] = (t) => ke(t)),
|
|
497
|
+
"onUpdate:modelValue": a[15] || (a[15] = (t) => Pe(t))
|
|
499
498
|
}, null, 8, ["model-value"])
|
|
500
|
-
])) :
|
|
501
|
-
])) :
|
|
502
|
-
(y(),
|
|
503
|
-
|
|
504
|
-
f(
|
|
505
|
-
default:
|
|
506
|
-
|
|
499
|
+
])) : N("", !0)
|
|
500
|
+
])) : N("", !0),
|
|
501
|
+
(y(), U(oe, { to: "#toast-root" }, [
|
|
502
|
+
j("div", aa, [
|
|
503
|
+
f(xe, { name: "list" }, {
|
|
504
|
+
default: B(() => [
|
|
505
|
+
Se(f(s(Re), {
|
|
507
506
|
class: "toast",
|
|
508
|
-
color:
|
|
509
|
-
text:
|
|
507
|
+
color: H.value,
|
|
508
|
+
text: Q.value,
|
|
510
509
|
onClose: a[16] || (a[16] = (t) => F.value = !1)
|
|
511
510
|
}, null, 8, ["color", "text"]), [
|
|
512
|
-
[
|
|
511
|
+
[$e, F.value]
|
|
513
512
|
])
|
|
514
513
|
]),
|
|
515
514
|
_: 1
|
|
516
515
|
})
|
|
517
516
|
])
|
|
518
517
|
])),
|
|
519
|
-
f(s(
|
|
518
|
+
f(s(se))
|
|
520
519
|
], 64));
|
|
521
520
|
}
|
|
522
|
-
}),
|
|
521
|
+
}), ua = /* @__PURE__ */ G({
|
|
523
522
|
__name: "index",
|
|
524
523
|
props: {
|
|
525
524
|
throttlerPrefix: {},
|
|
@@ -531,40 +530,40 @@ const Ye = {
|
|
|
531
530
|
fields: {}
|
|
532
531
|
},
|
|
533
532
|
emits: ["on-update-jwt", "update-tokens"],
|
|
534
|
-
setup(
|
|
535
|
-
const n = r, { openDialog:
|
|
536
|
-
|
|
537
|
-
},
|
|
538
|
-
|
|
539
|
-
},
|
|
540
|
-
|
|
541
|
-
}, i = (
|
|
542
|
-
n("on-update-jwt",
|
|
533
|
+
setup(d, { emit: r }) {
|
|
534
|
+
const n = r, { openDialog: u } = W(), h = (m, p) => {
|
|
535
|
+
u("email", { initialEmail: m, mode: p });
|
|
536
|
+
}, v = (m, p) => {
|
|
537
|
+
u("phone", { initialPhone: m, mode: p });
|
|
538
|
+
}, k = () => {
|
|
539
|
+
u("password");
|
|
540
|
+
}, i = (m, p, w) => {
|
|
541
|
+
n("on-update-jwt", m, p, w);
|
|
543
542
|
};
|
|
544
|
-
return (
|
|
545
|
-
f(s(
|
|
546
|
-
f(
|
|
547
|
-
"throttler-prefix":
|
|
548
|
-
provider:
|
|
549
|
-
"request-url":
|
|
550
|
-
language:
|
|
551
|
-
fields:
|
|
552
|
-
"access-token":
|
|
553
|
-
"refresh-token":
|
|
543
|
+
return (m, p) => (y(), b(le, null, [
|
|
544
|
+
f(s(ze)),
|
|
545
|
+
f(ta, {
|
|
546
|
+
"throttler-prefix": m.throttlerPrefix,
|
|
547
|
+
provider: m.provider,
|
|
548
|
+
"request-url": m.requestUrl,
|
|
549
|
+
language: m.language,
|
|
550
|
+
fields: m.fields,
|
|
551
|
+
"access-token": m.accessToken,
|
|
552
|
+
"refresh-token": m.refreshToken,
|
|
554
553
|
onOpenEmailDialog: h,
|
|
555
|
-
onOpenPhoneDialog:
|
|
556
|
-
onOpenPasswordDialog:
|
|
554
|
+
onOpenPhoneDialog: v,
|
|
555
|
+
onOpenPasswordDialog: k,
|
|
557
556
|
onOnUpdateJwt: i
|
|
558
557
|
}, null, 8, ["throttler-prefix", "provider", "request-url", "language", "fields", "access-token", "refresh-token"]),
|
|
559
|
-
f(s(
|
|
558
|
+
f(s(se))
|
|
560
559
|
], 64));
|
|
561
560
|
}
|
|
562
561
|
});
|
|
563
562
|
export {
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
563
|
+
sa as B,
|
|
564
|
+
la as C,
|
|
565
|
+
ua as _,
|
|
566
|
+
ia as g,
|
|
567
|
+
Y as p,
|
|
568
|
+
Ge as t
|
|
570
569
|
};
|