@yourgoods/ui-smart 0.46.7 → 0.46.8

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
1
  import { defineComponent as ie, ref as x, reactive as Z, watch as Y, computed as V, toRefs as ce, createElementBlock as I, openBlock as w, createElementVNode as B, createCommentVNode as D, toDisplayString as ee, createVNode as $, unref as u, isRef as te, withCtx as G, createTextVNode as ne, Fragment as Ae, createBlock as _, resolveDynamicComponent as he, onMounted as Fe } from "vue";
2
- import { T as ve, c as $e, u as Re, a as ze, P as Te, b as We } from "./useRateLimitToast-D6JDxDzB.js";
3
- import { C as R, _ as He, B as _e, p as H, g as qe } from "./index-BSr7kEC4.js";
2
+ import { T as ve, c as $e, u as Re, a as ze, P as Te, b as We } from "./useRateLimitToast-gpF7vjbF.js";
3
+ import { C as R, _ as He, B as _e, p as H, g as qe } from "./index-DgXqm9qe.js";
4
4
  import { PInput as J, IconMailMd as pe, PButton as se, IconEyeMd as Me, IconEyeClosedMd as be, PDialog as je, PTopBar as Ge, IconCrossMd as Ye } from "@profeat/ui-kit";
5
5
  const Je = { class: "dialogDefaultContainerInsideContent" }, Ke = { class: "dialogDefaultContainerTextHint" }, Qe = {
6
6
  key: 0,
@@ -68,10 +68,9 @@ const Je = { class: "dialogDefaultContainerInsideContent" }, Ke = { class: "dial
68
68
  };
69
69
  let U = "";
70
70
  const C = (p) => {
71
- s("on-clear-code-error");
72
71
  const a = p.target;
73
72
  let i = a.value.replace(/\D/g, "");
74
- i.length > 4 && (i = i.slice(0, 4)), a.value = i, n.codeModel = i, i.length === 4 && i !== U && (U = i, s("on-match-code", { email: n.emailModel, code: i }));
73
+ i.length <= 4 && s("on-clear-code-error"), i.length > 4 && (i = i.slice(0, 4)), a.value = i, n.codeModel = i, i.length === 4 && i !== U && (U = i, s("on-match-code", { email: n.emailModel, code: i }));
75
74
  }, c = () => {
76
75
  s("on-send-code-again", { email: n.emailModel });
77
76
  }, b = V(() => {
@@ -505,12 +504,12 @@ const Je = { class: "dialogDefaultContainerInsideContent" }, Ke = { class: "dial
505
504
  }
506
505
  async function ue(l = "email") {
507
506
  var o;
508
- return ((o = (await qe("/users/profile/session/get-edit-session", { params: { field: l } })).data) == null ? void 0 : o.data) ?? null;
507
+ return (o = (await qe("/users/profile/session/get-edit-session", { params: { field: l } })).data) == null ? void 0 : o.data;
509
508
  }
510
509
  async function Se(l = "email") {
511
510
  try {
512
511
  const t = await ue(l);
513
- d.value = (t == null ? void 0 : t.sessionId) ?? d.value, h.value = (t == null ? void 0 : t.step) ?? h.value, e.oldEmail = (t == null ? void 0 : t.oldValue) ?? e.oldEmail, t != null && t.sessionId || await we(l);
512
+ return d.value = (t == null ? void 0 : t.sessionId) ?? d.value, h.value = (t == null ? void 0 : t.step) ?? h.value, e.oldEmail = (t == null ? void 0 : t.oldValue) ?? e.oldEmail, t != null && t.sessionId || await we(l), t;
514
513
  } catch {
515
514
  await we(l);
516
515
  }
@@ -519,7 +518,7 @@ const Je = { class: "dialogDefaultContainerInsideContent" }, Ke = { class: "dial
519
518
  var t;
520
519
  try {
521
520
  const o = await H("/users/profile/session/create-if-not-exists", { field: l, oldValue: v.initialEmail }), f = ((t = o.data) == null ? void 0 : t.data) ?? o.data;
522
- d.value = (f == null ? void 0 : f.sessionId) ?? d.value, h.value = (f == null ? void 0 : f.step) ?? h.value, e.oldEmail = (f == null ? void 0 : f.oldValue) ?? e.oldEmail, e.newEmail = (f == null ? void 0 : f.newValue) ?? e.newEmail;
521
+ return d.value = (f == null ? void 0 : f.sessionId) ?? d.value, h.value = (f == null ? void 0 : f.step) ?? h.value, e.oldEmail = (f == null ? void 0 : f.oldValue) ?? e.oldEmail, e.newEmail = (f == null ? void 0 : f.newValue) ?? e.newEmail, f;
523
522
  } catch {
524
523
  }
525
524
  }
@@ -681,7 +680,7 @@ const Je = { class: "dialogDefaultContainerInsideContent" }, Ke = { class: "dial
681
680
  await me(), r.value = !1;
682
681
  return;
683
682
  }
684
- await Se(), e.oldEmail && await ae({ value: e.oldEmail }), r.value = !1;
683
+ (await Se()).step === "old" && e.oldEmail && await ae({ value: e.oldEmail }), r.value = !1;
685
684
  }), (l, t) => (w(), _(u(je), {
686
685
  modelValue: m.value,
687
686
  "onUpdate:modelValue": [
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as ye, ref as a, reactive as _, computed as u, watch as Z, onMounted as Ce, createElementBlock as S, openBlock as g, Fragment as ge, createVNode as n, unref as o, withCtx as m, createCommentVNode as ee, createElementVNode as r, toDisplayString as V, createBlock as B, resolveDynamicComponent as $, createTextVNode as z } from "vue";
2
- import { C as I, p as D, g as Ve } from "./index-BSr7kEC4.js";
2
+ import { C as I, p as D, g as Ve } from "./index-DgXqm9qe.js";
3
3
  import { PDialog as be, PInput as M, IconEyeMd as O, IconEyeClosedMd as U, PButton as F, PTopBar as Te, IconCrossMd as Ie, PTeleportContainer as xe } from "@profeat/ui-kit";
4
4
  function ke(b) {
5
5
  return { showPasswordRateLimitToast: (P) => {
@@ -1,7 +1,7 @@
1
1
  import { createElementBlock as P, openBlock as p, createElementVNode as q, defineComponent as he, reactive as ve, watch as Z, ref as L, toRefs as Ce, computed as E, createCommentVNode as $, createVNode as T, toDisplayString as H, createBlock as G, createTextVNode as Y, unref as d, isRef as ne, withCtx as Q, onMounted as je, Fragment as qe } from "vue";
2
- import { T as we, c as Ne, a as He, u as Ge, P as Oe, b as Je } from "./useRateLimitToast-D6JDxDzB.js";
2
+ import { T as we, c as Ne, a as He, u as Ge, P as Oe, b as Je } from "./useRateLimitToast-gpF7vjbF.js";
3
3
  import { IconTelegramSm as Pe, PInput as ae, IconPhoneMd as Ke, IconMailMd as ze, PButton as Fe, PDialog as Qe, PTopBar as Xe, IconCrossMd as Ye, PTeleportContainer as Ze } from "@profeat/ui-kit";
4
- import { C as j, t as De, p as te, g as Ae } from "./index-BSr7kEC4.js";
4
+ import { C as j, t as De, p as te, g as Ae } from "./index-DgXqm9qe.js";
5
5
  const _e = {
6
6
  xmlns: "http://www.w3.org/2000/svg",
7
7
  width: "12",
@@ -502,14 +502,14 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
502
502
  field: a,
503
503
  oldValue: U(i.initialPhone)
504
504
  })).data) == null ? void 0 : b.data;
505
- C.value = (t == null ? void 0 : t.sessionId) ?? null, M.value = (t == null ? void 0 : t.step) ?? j.OLD, e.oldPhone = (t == null ? void 0 : t.oldValue) ?? "", e.newPhone = (t == null ? void 0 : t.newValue) ?? "";
505
+ return C.value = (t == null ? void 0 : t.sessionId) ?? null, M.value = (t == null ? void 0 : t.step) ?? j.OLD, e.oldPhone = (t == null ? void 0 : t.oldValue) ?? "", e.newPhone = (t == null ? void 0 : t.newValue) ?? "", t;
506
506
  }
507
507
  async function Re() {
508
508
  try {
509
509
  const a = await fe("phone");
510
- C.value = a.sessionId, M.value = a.step, e.oldPhone = a.oldValue ?? "", a.sessionId || await Te("phone");
510
+ return C.value = a.sessionId, M.value = a.step, e.oldPhone = a.oldValue ?? "", a.sessionId ? a : await Te("phone");
511
511
  } catch {
512
- await Te("phone");
512
+ return await Te("phone");
513
513
  }
514
514
  }
515
515
  async function Se(a, l = !1) {
@@ -716,7 +716,7 @@ const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }
716
716
  await We(), f.value = !1;
717
717
  return;
718
718
  }
719
- await Re(), await ee({});
719
+ (await Re()).step === "old" && await ee({}), f.value = !1;
720
720
  }), x({
721
721
  localVisible: h,
722
722
  form: e,
@@ -216,9 +216,9 @@ const ra = {
216
216
  emits: ["clean-input-errors", "on-update-jwt", "update-phone-field", "update-email-field", "on-password-error", "on-toast"],
217
217
  setup(s, { emit: n }) {
218
218
  const r = n, u = h(!0), { currentDialog: v, dialogPayload: p, closeDialog: U } = X(), l = {
219
- email: q(() => import("./ProfileEmailDialog-DlGErflr.js")),
220
- phone: q(() => import("./ProfilePhoneDialog-C8_OQsEV.js")),
221
- password: q(() => import("./ProfilePasswordDialog-DLrepGiM.js"))
219
+ email: q(() => import("./ProfileEmailDialog-D7OoILE6.js")),
220
+ phone: q(() => import("./ProfilePhoneDialog-Cm_s-YCX.js")),
221
+ password: q(() => import("./ProfilePasswordDialog-Hibce_6h.js"))
222
222
  }, i = ({ email: y }) => {
223
223
  r("update-email-field", y);
224
224
  }, c = ({ phone: y }) => {
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".avatar-input[data-v-965c8738] .p-input-file .overlay{visibility:hidden}.avatar-input[data-v-965c8738] .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-BSr7kEC4.js";
2
+ import { a as o } from "./index-DgXqm9qe.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-BSr7kEC4.js";
3
+ import { _ as g, g as R, p as h } from "./index-DgXqm9qe.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.46.7",
3
+ "version": "0.46.8",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",