@yourgoods/ui-smart 0.7.0 → 0.9.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-DkfRVKNa.js → ProfileEmailDialog-Buthe7kM.js} +2 -2
- package/dist/{ProfilePasswordDialog-BdYyzINt.js → ProfilePasswordDialog-Brk_CGyv.js} +1 -1
- package/dist/{ProfilePhoneDialog-BlggQNOD.js → ProfilePhoneDialog-B-TDgEiG.js} +2 -2
- package/dist/{index-DnFZJeDG.js → index-DDRxZ_O5.js} +19 -20
- package/dist/index.js +1 -1
- package/dist/{useRateLimitToast-j3HiT6VK.js → useRateLimitToast-Ca_UAVLG.js} +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as Z, ref as M, reactive as J, watch as j, computed as V, toRefs as se, createElementBlock as k, openBlock as y, createElementVNode as S, createCommentVNode as P, toDisplayString as K, createVNode as b, unref as c, isRef as Q, withCtx as q, createTextVNode as te, Fragment as Oe, createBlock as R, resolveDynamicComponent as Ce, onMounted as Ue } from "vue";
|
|
2
|
-
import { T as de, c as Ve, _ as Ae, u as Fe, a as Re, P as ye, b as ze } from "./useRateLimitToast-
|
|
3
|
-
import { C as D, B as We, p as F, g as He } from "./index-
|
|
2
|
+
import { T as de, c as Ve, _ as Ae, u as Fe, a as Re, P as ye, b as ze } from "./useRateLimitToast-Ca_UAVLG.js";
|
|
3
|
+
import { C as D, B as We, p as F, g as He } from "./index-DDRxZ_O5.js";
|
|
4
4
|
import { PInput as _, IconMailMd as re, PButton as le, IconEyeMd as ge, IconEyeClosedMd as he, PDialog as qe, PTopBar as je, IconCrossMd as _e } from "@profeat/ui-kit";
|
|
5
5
|
const Ge = { class: "dialogDefaultContainerInsideContent" }, Ye = { class: "dialogDefaultContainerTextHint" }, Je = {
|
|
6
6
|
key: 0,
|
|
@@ -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-
|
|
2
|
+
import { C as I, p as D, g as Ve } from "./index-DDRxZ_O5.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 T, openBlock as p, createElementVNode as F, defineComponent as re, reactive as ue, watch as Y, ref as O, toRefs as me, computed as A, createCommentVNode as $, createVNode as S, toDisplayString as W, createBlock as H, createTextVNode as X, unref as r, isRef as te, withCtx as K, onMounted as Ue, Fragment as qe } from "vue";
|
|
2
|
-
import { T as fe, c as Oe, a as We, u as je, P as Ee, b as He } from "./useRateLimitToast-
|
|
2
|
+
import { T as fe, c as Oe, a as We, u as je, P as Ee, b as He } from "./useRateLimitToast-Ca_UAVLG.js";
|
|
3
3
|
import { IconTelegramSm as ge, PInput as oe, IconPhoneMd as Ge, IconMailMd as Le, PButton as De, PDialog as Je, PTopBar as Ke, IconCrossMd as Qe, PTeleportContainer as Xe } from "@profeat/ui-kit";
|
|
4
|
-
import { C as q, t as Be, p as _, g as Ie } from "./index-
|
|
4
|
+
import { C as q, t as Be, p as _, g as Ie } from "./index-DDRxZ_O5.js";
|
|
5
5
|
const Ye = {
|
|
6
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7
7
|
width: "12",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ref as v, shallowRef as Ve, defineComponent as _, defineAsyncComponent as L, watch as se, createBlock as I, createCommentVNode as E, unref as i, openBlock as h, resolveDynamicComponent as xe, mergeProps as Ae, computed as b, reactive as R, onMounted as $e, createElementBlock as P, Fragment as ie, createVNode as g, createElementVNode as G, withCtx as F, toDisplayString as D, createTextVNode as
|
|
1
|
+
import { ref as v, shallowRef as Ve, defineComponent as _, defineAsyncComponent as L, watch as se, createBlock as I, createCommentVNode as E, unref as i, openBlock as h, resolveDynamicComponent as xe, mergeProps as Ae, computed as b, reactive as R, onMounted as $e, createElementBlock as P, Fragment as ie, createVNode as g, createElementVNode as G, withCtx as F, toDisplayString as D, createTextVNode as J, Teleport as re, Transition as Se, withDirectives as Oe, vShow as Me } from "vue";
|
|
2
2
|
import ze from "axios";
|
|
3
|
-
import { PInputFileUploader as Le, PInput as $, IconFilledEditMd as S, PButton as le, PImageCropper as Re, PToast as Ge, PTeleportContainer as ue, PToastContainer as
|
|
4
|
-
function
|
|
3
|
+
import { PInputFileUploader as Le, PInput as $, IconFilledEditMd as S, PButton as le, PImageCropper as Re, PToast as Ge, PTeleportContainer as ue, PToastContainer as Je } from "@profeat/ui-kit";
|
|
4
|
+
function je(d, r = 2) {
|
|
5
5
|
if (d === 0)
|
|
6
6
|
return "0 B";
|
|
7
7
|
const n = 1024, u = ["B", "KB", "MB", "GB", "TB", "PB", "EB"], w = Math.floor(Math.log(d) / Math.log(n));
|
|
@@ -34,7 +34,7 @@ function _e(d, r) {
|
|
|
34
34
|
baseURL: r,
|
|
35
35
|
headers: {
|
|
36
36
|
Authorization: `Bearer ${d}`,
|
|
37
|
-
|
|
37
|
+
// 'Content-Type': 'application/json',
|
|
38
38
|
"x-throttler-prefix": "throttler_profile_edit"
|
|
39
39
|
},
|
|
40
40
|
validateStatus: () => !0
|
|
@@ -57,16 +57,16 @@ async function We(d) {
|
|
|
57
57
|
throw new Error("Ошибка при получении профиля пользователя");
|
|
58
58
|
return r.data;
|
|
59
59
|
}
|
|
60
|
-
const O = v(null),
|
|
60
|
+
const O = v(null), j = Ve(null);
|
|
61
61
|
function W() {
|
|
62
62
|
return {
|
|
63
63
|
currentDialog: O,
|
|
64
|
-
dialogPayload:
|
|
64
|
+
dialogPayload: j,
|
|
65
65
|
openDialog: (u, w) => {
|
|
66
|
-
O.value = u,
|
|
66
|
+
O.value = u, j.value = w ?? null;
|
|
67
67
|
},
|
|
68
68
|
closeDialog: () => {
|
|
69
|
-
O.value = null,
|
|
69
|
+
O.value = null, j.value = null;
|
|
70
70
|
},
|
|
71
71
|
isDialogOpen: (u) => O.value === u
|
|
72
72
|
};
|
|
@@ -213,9 +213,9 @@ const Ke = {
|
|
|
213
213
|
emits: ["clean-input-errors", "on-update-jwt", "update-phone-field", "update-email-field", "on-password-error", "on-toast"],
|
|
214
214
|
setup(d, { emit: r }) {
|
|
215
215
|
const n = r, u = v(!0), { currentDialog: w, dialogPayload: c, closeDialog: B } = W(), l = {
|
|
216
|
-
email: L(() => import("./ProfileEmailDialog-
|
|
217
|
-
phone: L(() => import("./ProfilePhoneDialog-
|
|
218
|
-
password: L(() => import("./ProfilePasswordDialog-
|
|
216
|
+
email: L(() => import("./ProfileEmailDialog-Buthe7kM.js")),
|
|
217
|
+
phone: L(() => import("./ProfilePhoneDialog-B-TDgEiG.js")),
|
|
218
|
+
password: L(() => import("./ProfilePasswordDialog-Brk_CGyv.js"))
|
|
219
219
|
}, m = ({ email: y }) => {
|
|
220
220
|
n("update-email-field", y);
|
|
221
221
|
}, p = ({ phone: y }) => {
|
|
@@ -326,10 +326,9 @@ const Ke = {
|
|
|
326
326
|
try {
|
|
327
327
|
o.loading = !0;
|
|
328
328
|
const t = new FormData();
|
|
329
|
-
t.append("file", a), await Y(`/users/profile/avatar/${y.value}`, {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
} catch {
|
|
329
|
+
t.append("file", a), await Y(`/users/profile/avatar/${y.value}`, t, { headers: { "Content-Type": void 0 } });
|
|
330
|
+
} catch (t) {
|
|
331
|
+
console.error(t);
|
|
333
332
|
} finally {
|
|
334
333
|
o.loading = !1;
|
|
335
334
|
}
|
|
@@ -422,10 +421,10 @@ const Ke = {
|
|
|
422
421
|
"onChange:error": ke
|
|
423
422
|
}, {
|
|
424
423
|
afterLoadLabel: F(() => [
|
|
425
|
-
|
|
424
|
+
J(D(c("Загрузить фото")), 1)
|
|
426
425
|
]),
|
|
427
426
|
subtext: F(() => [
|
|
428
|
-
K.value ? (h(), P("span", Qe, D("Размер фото слишком большой. Загрузите JPEG, PNG до 10 MB"))) : (h(), P("span", Xe, D(`${c("Формат")} ${i(Ye)(o.accept).join(", ")} ${c("до")} ${i(
|
|
427
|
+
K.value ? (h(), P("span", Qe, D("Размер фото слишком большой. Загрузите JPEG, PNG до 10 MB"))) : (h(), P("span", Xe, D(`${c("Формат")} ${i(Ye)(o.accept).join(", ")} ${c("до")} ${i(je)(o.uploadLimit)}`), 1))
|
|
429
428
|
]),
|
|
430
429
|
_: 1
|
|
431
430
|
}, 8, ["modelValue", "src", "accept", "loading", "label", "upload-limit"])) : E("", !0),
|
|
@@ -494,7 +493,7 @@ const Ke = {
|
|
|
494
493
|
onClick: Ie
|
|
495
494
|
}, {
|
|
496
495
|
default: F(() => [
|
|
497
|
-
|
|
496
|
+
J(D(c("Сменить пароль")), 1)
|
|
498
497
|
]),
|
|
499
498
|
_: 1
|
|
500
499
|
})) : E("", !0),
|
|
@@ -503,7 +502,7 @@ const Ke = {
|
|
|
503
502
|
onClick: De
|
|
504
503
|
}, {
|
|
505
504
|
default: F(() => [
|
|
506
|
-
|
|
505
|
+
J(D(c("Сохранить")), 1)
|
|
507
506
|
]),
|
|
508
507
|
_: 1
|
|
509
508
|
}, 8, ["disabled"])
|
|
@@ -566,7 +565,7 @@ const Ke = {
|
|
|
566
565
|
n("on-update-jwt", m, p, y);
|
|
567
566
|
};
|
|
568
567
|
return (m, p) => (h(), P(ie, null, [
|
|
569
|
-
g(i(
|
|
568
|
+
g(i(Je)),
|
|
570
569
|
g(sa, {
|
|
571
570
|
"throttler-prefix": m.throttlerPrefix,
|
|
572
571
|
provider: m.provider,
|
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(".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 { _ as r } from "./index-
|
|
2
|
+
import { _ as r } from "./index-DDRxZ_O5.js";
|
|
3
3
|
export {
|
|
4
4
|
r as PEditUserContact
|
|
5
5
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as r, defineComponent as L, createElementBlock as f, openBlock as v, normalizeClass as l, createVNode as E, unref as F, computed as T, renderSlot as m, 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 { g as R, p as h } from "./index-
|
|
3
|
+
import { g as R, p as h } from "./index-DDRxZ_O5.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")}`;
|