@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.
@@ -1,6 +1,6 @@
1
- import { ref as h, shallowRef as xe, defineComponent as Z, defineAsyncComponent as J, watch as se, createBlock as I, createCommentVNode as N, unref as u, openBlock as w, resolveDynamicComponent as Ae, mergeProps as $e, computed as b, reactive as j, onMounted as Se, createElementBlock as P, Fragment as ie, createVNode as f, createElementVNode as $, withCtx as D, toDisplayString as F, createTextVNode as q, Teleport as re, Transition as Oe, withDirectives as Me, vShow as Le } from "vue";
2
- import ze from "axios";
3
- import { PInputFileUploader as Re, PInput as S, IconFilledEditMd as O, PButton as le, PImageCropper as Ge, PToast as _e, PTeleportContainer as ue, PToastContainer as Je } from "@profeat/ui-kit";
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 = ze.create({
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 me() {
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 me().post(m, r, n);
49
+ return de().post(m, r, n);
50
50
  }
51
51
  async function ha(m, r) {
52
- return me().get(m, r);
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: U } = H(), l = {
216
- email: J(() => import("./ProfileEmailDialog-BCBd_O2U.js")),
217
- phone: J(() => import("./ProfilePhoneDialog-6A8CraBl.js")),
218
- password: J(() => import("./ProfilePasswordDialog-BceSLpxy.js"))
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 se(g, (y) => {
224
+ return ie(g, (y) => {
225
225
  s.value = !!y;
226
- }), (y, i) => u(g) ? (w(), I(Ae(l[u(g)]), $e({
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(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: 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({
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
- }), L = h(!1), V = h(!1), x = h(!1), z = h(!0), R = h(!0), Q = h(void 0), X = h(""), de = b(() => ae(l.firstName, p.firstName)), pe = b(() => ae(l.lastName, p.lastName)), ce = b(() => p.email && !i.value.trim() ? "Введите e-mail" : ""), fe = b(() => p.phone && !c.value.trim() ? "Введите номер телефона" : ""), B = (e) => n.fields.some((a) => a.key === e), ee = (e) => e && e.trim() ? "edit" : "bind", G = () => setTimeout(() => {
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), ve = b(() => !!(i.value && i.value.trim() !== "")), ge = b(() => o.imageContent ? v("Загрузить другое фото") : v("Загрузить фото")), ae = (e, a) => {
282
- if (!a) return "";
283
- const t = e.trim();
284
- return t ? t.length < 2 ? "Поле должно содержать минимум 2 символа" : "" : "Введите значение";
285
- }, he = (e) => U("email", { mode: e ? "edit" : "bind", initialEmail: e }), we = () => {
286
- G(), p.email = !1, R.value = !1, s("open-email-dialog", i.value, ee(i.value)), he(i.value);
287
- }, ye = () => {
288
- G(), p.phone = !1, z.value = !1, s("open-phone-dialog", c.value, ee(c.value));
289
- }, Ee = async (e, a, t) => {
290
- e === "email" && t && (i.value = t), e === "phone" && t && (c.value = t), s("on-update-jwt");
291
- }, Ne = (e) => {
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
- }, Ce = (e, a) => {
296
- x.value = !0, s("on-password-error", e, a);
297
- }, be = () => {
298
- z.value = !1, R.value = !1;
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
- x.value = !0, Q.value = e.color ?? "", X.value = e.text ?? "";
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 a = l[e];
304
- a.length > 40 && (l[e] = a.slice(0, 40), console.debug(`[Input Limit] Поле '${e}' достигло 40 символов. Ввод обрезан.`));
303
+ const t = l[e];
304
+ t.length > 40 && (l[e] = t.slice(0, 40), console.debug(`[Input Limit] Поле '${e}' достигло 40 символов. Ввод обрезан.`));
305
305
  }
306
- }, ke = (e) => {
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
- o.value = e, o.imageBinary = e.fileBinary ?? null, o.imageContent = e.fileContent ?? "", E.value = !0;
312
- }, Te = () => {
313
- L.value = !0;
314
- }, te = async (e, a, t = "image/png") => {
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], a, { type: t });
318
- }, Ue = () => {
322
+ return new File([T], t, { type: a });
323
+ }, Be = () => {
319
324
  o.value = null, o.imageBinary = null, o.imageContent = "", E.value = !1;
320
- }, Be = async (e) => {
325
+ }, Ue = async (e) => {
321
326
  if (E.value = !1, o.imageContent = e, !o.imageBinary) return;
322
- const a = await te(e, o.imageBinary.name, o.imageBinary.type || "image/png");
323
- if (a)
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 t = new FormData();
327
- t.append("file", a), await K(`/users/profile/avatar/${y.value}`, t, { headers: { "Content-Type": void 0 } });
328
- } catch (t) {
329
- console.error(t);
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
- L.value = !1, o.loading = !1;
336
+ V.value = !1, o.loading = !1;
332
337
  }
333
338
  }, De = async (e) => {
334
- o.imageContent = e ?? "", o.imageBinary && (o.imageBinary = await te(
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
- }, oe = h(!1), ne = async (e) => {
340
- var t, k;
341
- const a = (t = l[e]) == null ? void 0 : t.trim();
342
- if (a)
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
- oe.value = !0;
345
- const C = (k = (await K("/users/profile/update-name", { [e]: a })).data) == null ? void 0 : k.data;
346
- C != null && C.user && (l.firstName = C.user.firstName ?? l.firstName, l.lastName = C.user.lastName ?? l.lastName, d.value = {
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
- oe.value = !1;
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 t = (e = (await Ke({
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 (!t) throw new Error("user data отсутствует в response");
365
- y.value = t.userId ?? "", l.firstName = t.privateFirstName ?? "", l.lastName = t.privateLastName ?? "", i.value = t.email ?? "", c.value = t.phoneNumber ?? "", o.imageContent = t.avatar ?? "", d.value = { firstName: t.privateFirstName ?? "", lastName: t.privateLastName ?? "" };
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
- se(
374
+ ie(
370
375
  () => [l.firstName, l.lastName],
371
- ([e, a]) => {
372
- const t = e.trim(), k = a.trim(), T = t !== d.value.firstName.trim() || k !== d.value.lastName.trim(), C = t.length >= 2 && k.length >= 2;
373
- V.value = T && C;
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 (V.value)
383
+ if (x.value)
379
384
  try {
380
- await Promise.all([ne("firstName"), ne("lastName")]), V.value = !1, s("on-update-jwt"), _({ color: "success", text: "Изменения сохранены" });
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 Se(async () => {
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, a) => (w(), P(ie, null, [
399
+ }), (e, t) => (w(), C(ue, null, [
395
400
  f(He, {
396
401
  language: g.value,
397
402
  provider: e.provider,
398
- onCleanInputErrors: be,
399
- onOnUpdateJwt: Ee,
400
- onUpdatePhoneField: Ne,
403
+ onCleanInputErrors: ke,
404
+ onOnUpdateJwt: Ne,
405
+ onUpdatePhoneField: Ce,
401
406
  onUpdateEmailField: Pe,
402
- onOnPasswordError: Ce,
407
+ onOnPasswordError: be,
403
408
  onOnToast: _
404
409
  }, null, 8, ["language", "provider"]),
405
410
  $("div", Qe, [
406
411
  $("div", Xe, [
407
- B("avatar") ? (w(), I(u(Re), {
412
+ U("avatar") ? (w(), I(u(Re), {
408
413
  key: 0,
409
414
  modelValue: o.value,
410
415
  "onUpdate:modelValue": [
411
- a[0] || (a[0] = (t) => o.value = t),
412
- a[1] || (a[1] = (t) => ke(t))
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": Te
425
+ "onChange:error": te
421
426
  }, {
422
427
  afterLoadLabel: D(() => [
423
- q(F(ge.value), 1)
428
+ q(F(he.value), 1)
424
429
  ]),
425
430
  subtext: D(() => [
426
- L.value ? (w(), P("span", ea, F("Размер фото слишком большой. Загрузите JPEG, PNG до 10 MB"))) : (w(), P("span", aa, F(`${v("Формат")} ${u(Ye)(o.accept).join(", ")} ${v("до")} ${u(je)(o.uploadLimit)}`), 1))
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
- B("firstName") ? (w(), P("div", ta, [
432
- f(u(S), {
436
+ U("firstName") ? (w(), C("div", ta, [
437
+ f(u(O), {
433
438
  modelValue: l.firstName,
434
- "onUpdate:modelValue": a[2] || (a[2] = (t) => l.firstName = t),
439
+ "onUpdate:modelValue": t[2] || (t[2] = (a) => l.firstName = a),
435
440
  size: "large",
436
441
  label: v("Имя"),
437
- error: de.value,
438
- onBlur: a[3] || (a[3] = (t) => p.firstName = !0),
439
- onInput: a[4] || (a[4] = (t) => A("firstName"))
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(O), { class: "icon-locked" })
446
+ f(u(z), { class: "icon-locked" })
442
447
  ])) : N("", !0),
443
- B("lastName") ? (w(), P("div", oa, [
444
- f(u(S), {
448
+ U("lastName") ? (w(), C("div", oa, [
449
+ f(u(O), {
445
450
  modelValue: l.lastName,
446
- "onUpdate:modelValue": a[5] || (a[5] = (t) => l.lastName = t),
451
+ "onUpdate:modelValue": t[5] || (t[5] = (a) => l.lastName = a),
447
452
  size: "large",
448
453
  label: v("Фамилия"),
449
- error: pe.value,
450
- onBlur: a[6] || (a[6] = (t) => p.lastName = !0),
451
- onInput: a[7] || (a[7] = (t) => A("lastName"))
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(O), { class: "icon-locked" })
458
+ f(u(z), { class: "icon-locked" })
454
459
  ])) : N("", !0),
455
- B("email") ? (w(), P("div", na, [
456
- f(u(S), {
460
+ U("email") ? (w(), C("div", na, [
461
+ f(u(O), {
457
462
  modelValue: i.value,
458
- "onUpdate:modelValue": a[8] || (a[8] = (t) => i.value = t),
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: ce.value && R.value,
466
- onBlur: a[9] || (a[9] = (t) => p.email = !0),
467
- onInput: a[10] || (a[10] = (t) => A("email")),
468
- onClick: we
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(O), { class: "icon-locked" })
475
+ f(u(z), { class: "icon-locked" })
471
476
  ])) : N("", !0),
472
- B("phone") ? (w(), P("div", ra, [
473
- f(u(S), {
477
+ U("phone") ? (w(), C("div", ra, [
478
+ f(u(O), {
474
479
  modelValue: c.value,
475
- "onUpdate:modelValue": a[11] || (a[11] = (t) => c.value = t),
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: fe.value && z.value,
483
- onBlur: a[12] || (a[12] = (t) => p.phone = !0),
484
- onInput: a[13] || (a[13] = (t) => A("phone")),
485
- onClick: ye
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(O), { class: "icon-locked" })
492
+ f(u(z), { class: "icon-locked" })
488
493
  ])) : N("", !0),
489
494
  $("div", la, [
490
- ve.value ? (w(), I(u(le), {
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(le), {
501
- disabled: !V.value,
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(re, {
516
+ E.value ? (w(), I(le, {
512
517
  key: 0,
513
518
  to: "body"
514
519
  }, [
515
- E.value ? (w(), P("div", sa, [
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: Ue,
520
- onSave: a[14] || (a[14] = (t) => Be(t)),
521
- "onUpdate:modelValue": a[15] || (a[15] = (t) => De(t))
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(re, { to: "#toast-root" }, [
530
+ (w(), I(le, { to: "#toast-root" }, [
526
531
  $("div", ia, [
527
532
  f(Oe, { name: "list" }, {
528
533
  default: D(() => [
529
- Me(f(u(_e), {
534
+ ze(f(u(_e), {
530
535
  class: "toast",
531
536
  color: Q.value,
532
537
  text: X.value,
533
- onClose: a[16] || (a[16] = (t) => x.value = !1)
538
+ onClose: t[16] || (t[16] = (a) => S.value = !1)
534
539
  }, null, 8, ["color", "text"]), [
535
- [Le, x.value]
540
+ [Me, S.value]
536
541
  ])
537
542
  ]),
538
543
  _: 1
539
544
  })
540
545
  ])
541
546
  ])),
542
- f(u(ue))
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-c43c8b01"]]), wa = /* @__PURE__ */ Z({
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
- }, U = () => {
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(), P(ie, null, [
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: U,
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(ue))
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-c43c8b01] .p-avatar__overlay{opacity:0!important;transition:opacity .2s ease}.avatar-wrapper[data-v-c43c8b01]:hover .p-avatar__overlay{opacity:1!important}.avatar-wrapper[data-v-c43c8b01] .wide-img .overlay{opacity:0!important;transition:opacity .2s ease}.avatar-wrapper[data-v-c43c8b01]: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-D8GpZOPw.js";
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-D8GpZOPw.js";
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")}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yourgoods/ui-smart",
3
- "version": "0.32.0",
3
+ "version": "0.33.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",