@ozdao/prometheus-framework 0.1.77 → 0.1.79

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. package/dist/main.css +1 -1
  2. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  3. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +33 -30
  4. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  5. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +2 -44
  6. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  7. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +44 -2
  8. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  9. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +1 -1
  10. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  11. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +41 -43
  12. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  13. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +33 -35
  14. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  15. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +1 -1
  16. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  17. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +43 -45
  18. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  19. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +87 -84
  20. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  21. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +44 -46
  22. package/dist/prometheus-framework/src/modules/auth/localization/SignIn.json.cjs +1 -0
  23. package/dist/prometheus-framework/src/modules/auth/localization/SignIn.json.js +38 -0
  24. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  25. package/dist/prometheus-framework/src/modules/auth/store/auth.js +93 -75
  26. package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.js +4 -3
  28. package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.js +12 -11
  30. package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.cjs +2 -2
  31. package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.js +12 -11
  32. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +5 -4
  34. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +2 -2
  35. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +20 -19
  36. package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +15 -13
  38. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  40. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  42. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  44. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  46. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.js +1 -1
  48. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.js +1 -1
  50. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  52. package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.js +1 -1
  54. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  56. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +1 -1
  58. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  60. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.js +1 -1
  62. package/dist/prometheus-framework.cjs.js +10 -10
  63. package/dist/prometheus-framework.es.js +8 -5
  64. package/dist/style.css +1 -1
  65. package/package.json +1 -2
  66. package/src/components/Field/Field.vue +4 -1
  67. package/src/components/Status/Status.vue +5 -8
  68. package/src/modules/auth/components/layouts/Auth.vue +45 -36
  69. package/src/modules/auth/components/pages/EnterCode.vue +0 -17
  70. package/src/modules/auth/components/pages/EnterPassword.vue +0 -23
  71. package/src/modules/auth/components/pages/ResetPassword.vue +0 -27
  72. package/src/modules/auth/components/pages/SignIn.vue +17 -47
  73. package/src/modules/auth/components/pages/SignUp.vue +0 -29
  74. package/src/modules/auth/localization/EnterCode.json +14 -0
  75. package/src/modules/auth/localization/EnterPassword.json +20 -0
  76. package/src/modules/auth/localization/ResetPassword.json +24 -0
  77. package/src/modules/auth/localization/SignIn.json +34 -0
  78. package/src/modules/auth/localization/SignUp.json +26 -0
  79. package/src/modules/auth/store/auth.js +20 -20
  80. package/src/modules/constructor/components/elements/Bullets.vue +1 -0
  81. package/src/modules/constructor/components/elements/Caption.vue +1 -0
  82. package/src/modules/constructor/components/elements/H2.vue +1 -0
  83. package/src/modules/constructor/components/elements/ImageUpload.vue +1 -1
  84. package/src/modules/constructor/components/elements/Textarea.vue +1 -0
  85. package/src/modules/globals/localization/methods/get-app-locales.js +13 -0
  86. package/src/modules/globals/localization/vue-i18n.js +20 -14
  87. package/src/modules/globals/localization/vue-i18n.singleton.js +1 -1
  88. package/src/modules/globals/localization/vue-i18n-new.js +0 -70
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={en:{title:"Welcome to Weeder",subtitle:"Sign In to Continue",signup:"Don't have an account?",phone:"Phone",email:"Email",phonePlaceholder:"Enter your phone",emailPlaceholder:"Enter your email",haveAccount:"Don't have an account? Sign Up",passwordPlaceholder:"Enter your password",forgotPassword:"Forgot Password?",signin:"Sign In",signin_apple:"Sign In with Apple",soon:"SOON"},ru:{title:"Приветствуем вас,",subtitle:"Войдите для продолжения",signup:"Нет аккаунта?",phone:"Телефон",email:"Email",phonePlaceholder:"Введите ваш телефон",emailPlaceholder:"Введите ваш email",haveAccount:"Нет аккаунта? Зарегистрироваться",passwordPlaceholder:"Введите ваш пароль",forgotPassword:"Забыли пароль?",signin:"Войти",signin_apple:"Войти через Apple",soon:"СКОРО"}},o={messages:e};exports.default=o;exports.messages=e;
@@ -0,0 +1,38 @@
1
+ const e = {
2
+ en: {
3
+ title: "Welcome to Weeder",
4
+ subtitle: "Sign In to Continue",
5
+ signup: "Don't have an account?",
6
+ phone: "Phone",
7
+ email: "Email",
8
+ phonePlaceholder: "Enter your phone",
9
+ emailPlaceholder: "Enter your email",
10
+ haveAccount: "Don't have an account? Sign Up",
11
+ passwordPlaceholder: "Enter your password",
12
+ forgotPassword: "Forgot Password?",
13
+ signin: "Sign In",
14
+ signin_apple: "Sign In with Apple",
15
+ soon: "SOON"
16
+ },
17
+ ru: {
18
+ title: "Приветствуем вас,",
19
+ subtitle: "Войдите для продолжения",
20
+ signup: "Нет аккаунта?",
21
+ phone: "Телефон",
22
+ email: "Email",
23
+ phonePlaceholder: "Введите ваш телефон",
24
+ emailPlaceholder: "Введите ваш email",
25
+ haveAccount: "Нет аккаунта? Зарегистрироваться",
26
+ passwordPlaceholder: "Введите ваш пароль",
27
+ forgotPassword: "Забыли пароль?",
28
+ signin: "Войти",
29
+ signin_apple: "Войти через Apple",
30
+ soon: "СКОРО"
31
+ }
32
+ }, o = {
33
+ messages: e
34
+ };
35
+ export {
36
+ o as default,
37
+ e as messages
38
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("../../../../node_modules/axios/lib/axios.cjs"),p=require("../../../../../node_modules/js-cookie/src/js.cookie.cjs"),d=require("../../../../node_modules/@capacitor/core/dist/index.cjs"),l=require("vue"),n=require("../../globals/store/globals.cjs"),O=require("./twofa.cjs"),c=w.default.create({baseURL:process.env.API_URL,withCredentials:!0}),o=l.reactive({user:{_id:void 0,username:"",email:"",phone:"",password:"",passwordRepeat:""},access:{roles:null,token:null,status:!1}}),f={async login(s,t){try{const e=await c.post("/api/auth/signin",{...s,type:t});return u("user",e.data),Object.assign(o.user,{...e.data}),Object.assign(o.access,{token:e.data.accessToken,status:!0,roles:e.data.roles}),e.data}catch(e){return Object.assign(o.access,{token:null,status:!1,roles:null}),n.setError(e),Promise.reject(e)}},async signup(s,t,e){const{password:i,passwordRepeat:r}=o.user;if(i!==r){const a={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw n.setError(a),new Error(a.response.status)}try{s.phone=s.phone.number;const a=await c.post("/api/auth/signup",{...s,type:t,inviteCode:e});return a.data.accessToken&&u("user",a.data),Object.assign(o.user,{...a.data}),Object.assign(o.access,{token:a.data.accessToken,status:!0,roles:a.data.roles}),a.data}catch(a){throw n.setError(a),console.log("Sign up falied"),a}},logout(){h("user"),Object.assign(o.user,{email:"",phone:"",password:"",passwordRepeat:""}),Object.assign(o.access,{token:null,status:!1})},async resetPassword(s,t){try{const e=await c.post("/api/auth/reset-password",{email:s.email,phone:s.phone.number,type:t});return Object.assign(O.state.code,{...e.data,isSended:!0}),e.data}catch(e){return n.setError(e),Promise.reject(e)}},async updatePassword(s,t){const{password:e,passwordRepeat:i}=o.user;if(e!==i){const r={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw n.setError(r),new Error(r.response.status)}try{const r=await c.post("/api/auth/update-password",{email:s.email,phone:s.phone.number,password:s.password,passwordRepeat:s.passwordRepeat,type:t});return r.data.accessToken&&u("user",r.data),Object.assign(o.user,{...r.data}),Object.assign(o.access,{token:r.data.accessToken,status:!0}),r.data}catch(r){return n.setError(r),Promise.reject(r)}}},g={development:{secure:!1,expires:1},production:{expires:1,domain:process.env.API_URL,sameSite:"none",secure:!0}};function u(s,t,e=process.env.NODE_ENV){process.env.MOBILE_APP?d.CapacitorCookies.setCookie({url:process.env.API_URL,key:s,value:JSON.stringify(t)}):p.default.set(s,JSON.stringify(t),g[e])}function h(s,t=process.env.NODE_ENV){if(process.env.MOBILE_APP)d.CapacitorCookies.deleteCookie({url:process.env.API_URL,key:s});else{const e=t==="production"?{domain:process.env.API_URL}:{};p.default.remove(s,e)}}l.watch(o,(s,t)=>{});exports.actions=f;exports.state=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../../../../node_modules/axios/lib/axios.cjs"),p=require("../../../../../node_modules/js-cookie/src/js.cookie.cjs"),l=require("../../../../node_modules/@capacitor/core/dist/index.cjs"),w=require("vue"),n=require("../../globals/store/globals.cjs"),O=require("./twofa.cjs"),i=f.default.create({baseURL:process.env.API_URL,withCredentials:!0}),a=w.reactive({user:{_id:void 0,username:"",email:"",phone:"",password:"",passwordRepeat:""},access:{roles:null,token:null,status:!1}});async function k(){const e=await P("user");if(e){const{_id:t,email:s,phone:c,roles:o,accessToken:r}=e;Object.assign(a.user,{_id:t,email:s,phone:c}),Object.assign(a.access,{token:r,roles:o,status:!!r}),i.interceptors.request.use(u=>(r&&(u.headers["x-access-token"]=r),u),u=>Promise.reject(u))}}k();const g={async login(e,t){try{const s=await i.post("/api/auth/signin",{...e,type:t});return d("user",s.data),Object.assign(a.user,{...s.data}),Object.assign(a.access,{token:s.data.accessToken,status:!0,roles:s.data.roles}),s.data}catch(s){return Object.assign(a.access,{token:null,status:!1,roles:null}),n.setError(s),Promise.reject(s)}},async signup(e,t,s){const{password:c,passwordRepeat:o}=a.user;if(c!==o){const r={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw n.setError(r),new Error(r.response.status)}try{e.phone=e.phone.number;const r=await i.post("/api/auth/signup",{...e,type:t,inviteCode:s});return r.data.accessToken&&d("user",r.data),Object.assign(a.user,{...r.data}),Object.assign(a.access,{token:r.data.accessToken,status:!0,roles:r.data.roles}),r.data}catch(r){throw n.setError(r),console.log("Sign up falied"),r}},logout(){b("user"),Object.assign(a.user,{email:"",phone:"",password:"",passwordRepeat:""}),Object.assign(a.access,{token:null,status:!1})},async resetPassword(e,t){try{const s=await i.post("/api/auth/reset-password",{email:e.email,phone:e.phone.number,type:t});return Object.assign(O.state.code,{...s.data,isSended:!0}),s.data}catch(s){return n.setError(s),Promise.reject(s)}},async updatePassword(e,t){const{password:s,passwordRepeat:c}=a.user;if(s!==c){const o={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw n.setError(o),new Error(o.response.status)}try{const o=await i.post("/api/auth/update-password",{email:e.email,phone:e.phone.number,password:e.password,passwordRepeat:e.passwordRepeat,type:t});return o.data.accessToken&&d("user",o.data),Object.assign(a.user,{...o.data}),Object.assign(a.access,{token:o.data.accessToken,status:!0}),o.data}catch(o){return n.setError(o),Promise.reject(o)}}},h={development:{secure:!1,expires:1},production:{expires:1,domain:process.env.API_URL,sameSite:"none",secure:!0}};function P(e){if(process.env.MOBILE_APP){const t=p.default.get(e);return t?JSON.parse(t):null}else{const t=p.default.get(e);return t?JSON.parse(t):null}}function d(e,t,s=process.env.NODE_ENV){process.env.MOBILE_APP?l.CapacitorCookies.setCookie({url:process.env.API_URL,key:e,value:JSON.stringify(t)}):p.default.set(e,JSON.stringify(t),h[s])}function b(e,t=process.env.NODE_ENV){if(process.env.MOBILE_APP)l.CapacitorCookies.deleteCookie({url:process.env.API_URL,key:e});else{const s=t==="production"?{domain:process.env.API_URL}:{};p.default.remove(e,s)}}w.watch(a,(e,t)=>{});exports.actions=g;exports.state=a;
@@ -1,10 +1,10 @@
1
- import l from "../../../../node_modules/axios/lib/axios.js";
1
+ import m from "../../../../node_modules/axios/lib/axios.js";
2
2
  import u from "../../../../../node_modules/js-cookie/src/js.cookie.js";
3
- import { CapacitorCookies as d } from "../../../../node_modules/@capacitor/core/dist/index.js";
4
- import { reactive as m, watch as w } from "vue";
3
+ import { CapacitorCookies as l } from "../../../../node_modules/@capacitor/core/dist/index.js";
4
+ import { reactive as w, watch as f } from "vue";
5
5
  import { setError as n } from "../../globals/store/globals.js";
6
- import { state as f } from "./twofa.js";
7
- const c = l.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = m({
6
+ import { state as O } from "./twofa.js";
7
+ const i = m.create({ baseURL: process.env.API_URL, withCredentials: !0 }), a = w({
8
8
  user: {
9
9
  _id: void 0,
10
10
  username: "",
@@ -18,137 +18,155 @@ const c = l.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = m
18
18
  token: null,
19
19
  status: !1
20
20
  }
21
- }), R = {
22
- async login(s, t) {
21
+ });
22
+ async function k() {
23
+ const e = await h("user");
24
+ if (e) {
25
+ const { _id: t, email: s, phone: c, roles: r, accessToken: o } = e;
26
+ Object.assign(a.user, { _id: t, email: s, phone: c }), Object.assign(a.access, { token: o, roles: r, status: !!o }), i.interceptors.request.use((p) => (o && (p.headers["x-access-token"] = o), p), (p) => Promise.reject(p));
27
+ }
28
+ }
29
+ k();
30
+ const R = {
31
+ async login(e, t) {
23
32
  try {
24
- const e = await c.post("/api/auth/signin", {
25
- ...s,
33
+ const s = await i.post("/api/auth/signin", {
34
+ ...e,
26
35
  type: t
27
36
  });
28
- return p("user", e.data), Object.assign(r.user, {
29
- ...e.data
30
- }), Object.assign(r.access, {
31
- token: e.data.accessToken,
37
+ return d("user", s.data), Object.assign(a.user, {
38
+ ...s.data
39
+ }), Object.assign(a.access, {
40
+ token: s.data.accessToken,
32
41
  status: !0,
33
- roles: e.data.roles
34
- }), e.data;
35
- } catch (e) {
36
- return Object.assign(r.access, {
42
+ roles: s.data.roles
43
+ }), s.data;
44
+ } catch (s) {
45
+ return Object.assign(a.access, {
37
46
  token: null,
38
47
  status: !1,
39
48
  roles: null
40
- }), n(e), Promise.reject(e);
49
+ }), n(s), Promise.reject(s);
41
50
  }
42
51
  },
43
- async signup(s, t, e) {
44
- const { password: i, passwordRepeat: o } = r.user;
45
- if (i !== o) {
46
- const a = {
52
+ async signup(e, t, s) {
53
+ const { password: c, passwordRepeat: r } = a.user;
54
+ if (c !== r) {
55
+ const o = {
47
56
  response: {
48
57
  data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
49
58
  }
50
59
  };
51
- throw n(a), new Error(a.response.status);
60
+ throw n(o), new Error(o.response.status);
52
61
  }
53
62
  try {
54
- s.phone = s.phone.number;
55
- const a = await c.post("/api/auth/signup", {
56
- ...s,
63
+ e.phone = e.phone.number;
64
+ const o = await i.post("/api/auth/signup", {
65
+ ...e,
57
66
  type: t,
58
- inviteCode: e
67
+ inviteCode: s
59
68
  });
60
- return a.data.accessToken && p("user", a.data), Object.assign(r.user, {
61
- ...a.data
62
- }), Object.assign(r.access, {
63
- token: a.data.accessToken,
69
+ return o.data.accessToken && d("user", o.data), Object.assign(a.user, {
70
+ ...o.data
71
+ }), Object.assign(a.access, {
72
+ token: o.data.accessToken,
64
73
  status: !0,
65
- roles: a.data.roles
66
- }), a.data;
67
- } catch (a) {
68
- throw n(a), console.log("Sign up falied"), a;
74
+ roles: o.data.roles
75
+ }), o.data;
76
+ } catch (o) {
77
+ throw n(o), console.log("Sign up falied"), o;
69
78
  }
70
79
  },
71
80
  logout() {
72
- h("user"), Object.assign(r.user, {
81
+ P("user"), Object.assign(a.user, {
73
82
  email: "",
74
83
  phone: "",
75
84
  password: "",
76
85
  passwordRepeat: ""
77
- }), Object.assign(r.access, {
86
+ }), Object.assign(a.access, {
78
87
  token: null,
79
88
  status: !1
80
89
  });
81
90
  },
82
- async resetPassword(s, t) {
91
+ async resetPassword(e, t) {
83
92
  try {
84
- const e = await c.post("/api/auth/reset-password", {
85
- email: s.email,
86
- phone: s.phone.number,
93
+ const s = await i.post("/api/auth/reset-password", {
94
+ email: e.email,
95
+ phone: e.phone.number,
87
96
  type: t
88
97
  });
89
- return Object.assign(f.code, {
90
- ...e.data,
98
+ return Object.assign(O.code, {
99
+ ...s.data,
91
100
  isSended: !0
92
- }), e.data;
93
- } catch (e) {
94
- return n(e), Promise.reject(e);
101
+ }), s.data;
102
+ } catch (s) {
103
+ return n(s), Promise.reject(s);
95
104
  }
96
105
  },
97
- async updatePassword(s, t) {
98
- const { password: e, passwordRepeat: i } = r.user;
99
- if (e !== i) {
100
- const o = {
106
+ async updatePassword(e, t) {
107
+ const { password: s, passwordRepeat: c } = a.user;
108
+ if (s !== c) {
109
+ const r = {
101
110
  response: {
102
111
  data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
103
112
  }
104
113
  };
105
- throw n(o), new Error(o.response.status);
114
+ throw n(r), new Error(r.response.status);
106
115
  }
107
116
  try {
108
- const o = await c.post("/api/auth/update-password", {
109
- email: s.email,
110
- phone: s.phone.number,
111
- password: s.password,
112
- passwordRepeat: s.passwordRepeat,
117
+ const r = await i.post("/api/auth/update-password", {
118
+ email: e.email,
119
+ phone: e.phone.number,
120
+ password: e.password,
121
+ passwordRepeat: e.passwordRepeat,
113
122
  type: t
114
123
  });
115
- return o.data.accessToken && p("user", o.data), Object.assign(r.user, {
116
- ...o.data
117
- }), Object.assign(r.access, {
118
- token: o.data.accessToken,
124
+ return r.data.accessToken && d("user", r.data), Object.assign(a.user, {
125
+ ...r.data
126
+ }), Object.assign(a.access, {
127
+ token: r.data.accessToken,
119
128
  status: !0
120
- }), o.data;
121
- } catch (o) {
122
- return n(o), Promise.reject(o);
129
+ }), r.data;
130
+ } catch (r) {
131
+ return n(r), Promise.reject(r);
123
132
  }
124
133
  }
125
- }, O = {
134
+ }, g = {
126
135
  development: { secure: !1, expires: 1 },
127
136
  production: { expires: 1, domain: process.env.API_URL, sameSite: "none", secure: !0 }
128
137
  };
129
- function p(s, t, e = process.env.NODE_ENV) {
130
- process.env.MOBILE_APP ? d.setCookie({
138
+ function h(e) {
139
+ if (process.env.MOBILE_APP) {
140
+ const t = u.get(e);
141
+ return t ? JSON.parse(t) : null;
142
+ } else {
143
+ const t = u.get(e);
144
+ return t ? JSON.parse(t) : null;
145
+ }
146
+ }
147
+ function d(e, t, s = process.env.NODE_ENV) {
148
+ process.env.MOBILE_APP ? l.setCookie({
131
149
  url: process.env.API_URL,
132
150
  // используйте ваш API_URL
133
- key: s,
151
+ key: e,
134
152
  value: JSON.stringify(t)
135
- }) : u.set(s, JSON.stringify(t), O[e]);
153
+ }) : u.set(e, JSON.stringify(t), g[s]);
136
154
  }
137
- function h(s, t = process.env.NODE_ENV) {
155
+ function P(e, t = process.env.NODE_ENV) {
138
156
  if (process.env.MOBILE_APP)
139
- d.deleteCookie({
157
+ l.deleteCookie({
140
158
  url: process.env.API_URL,
141
159
  // используйте ваш API_URL
142
- key: s
160
+ key: e
143
161
  });
144
162
  else {
145
- const e = t === "production" ? { domain: process.env.API_URL } : {};
146
- u.remove(s, e);
163
+ const s = t === "production" ? { domain: process.env.API_URL } : {};
164
+ u.remove(e, s);
147
165
  }
148
166
  }
149
- w(r, (s, t) => {
167
+ f(a, (e, t) => {
150
168
  });
151
169
  export {
152
170
  R as actions,
153
- r as state
171
+ a as state
154
172
  };
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=["placeholder"],h={__name:"Bullets",props:["obj","label","prop","value","content","textarea","placeholder","index","ref"],emits:["deleteBlock","addBlock","focus"],setup(t,{emit:i}){const l=t;e.ref(l);const r=e.ref(null);function p(n){const o=/^\s*[-*]\s+(.*)/;let s=n.target.value.split(/\n+/).map(u=>{const d=o.exec(u);return d?d[1]:null}).filter(u=>u!==null);s.length>0?(l.prop[l.content]=s,a()):n.target.value.trim()===""&&(l.prop[l.content]=[],a())}function a(){r.value.style.height="1rem",r.value.style.height=r.value.scrollHeight+"px"}return e.onUpdated(()=>{a()}),e.onMounted(()=>{a()}),e.watch(()=>l.prop[l.content],n=>{(!n||n.length===0)&&i("deleteBlock",l.prop)}),(n,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createTextVNode(e.toDisplayString(t.prop[t.content])+" ",1),e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":o[0]||(o[0]=c=>t.prop[t.content]=c),placeholder:t.placeholder?t.placeholder:"Enter text",onInput:p,onFocus:o[1]||(o[1]=c=>i("focus",r.value)),ref_key:"textarea",ref:r,class:"text-area mn-small"},`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=["placeholder"],h={__name:"Bullets",props:["obj","label","prop","value","content","textarea","placeholder","index","ref"],emits:["deleteBlock","addBlock","focus"],setup(t,{emit:i}){const l=t;e.ref(l);const r=e.ref(null);function p(n){const o=/^\s*[-*]\s+(.*)/;let s=n.target.value.split(/\n+/).map(u=>{const d=o.exec(u);return d?d[1]:null}).filter(u=>u!==null);s.length>0?(l.prop[l.content]=s,a()):n.target.value.trim()===""&&(l.prop[l.content]=[],a())}function a(){r.value.style.height="1rem",r.value.style.height=r.value.scrollHeight+"px"}return e.onUpdated(()=>{a()}),e.onMounted(()=>{a()}),e.watch(()=>l.prop[l.content],n=>{(!n||n.length===0)&&i("deleteBlock",l.prop)}),(n,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createTextVNode(e.toDisplayString(t.prop[t.content])+" ",1),e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":o[0]||(o[0]=c=>t.prop[t.content]=c),placeholder:t.placeholder?t.placeholder:"Enter text",onInput:p,onFocus:o[1]||(o[1]=c=>i("focus",r.value)),ref_key:"textarea",ref:r,tabindex:"-1",class:"text-area mn-small"},`
2
2
  `,40,f),[[e.vModelText,t.prop[t.content]]])]))}};exports.default=h;
@@ -1,4 +1,4 @@
1
- import { ref as d, onUpdated as f, onMounted as h, watch as x, openBlock as m, createElementBlock as v, createTextVNode as g, toDisplayString as k, withDirectives as B, createElementVNode as b, vModelText as y } from "vue";
1
+ import { ref as d, onUpdated as f, onMounted as x, watch as h, openBlock as m, createElementBlock as v, createTextVNode as g, toDisplayString as k, withDirectives as B, createElementVNode as b, vModelText as y } from "vue";
2
2
  const E = ["placeholder"], I = {
3
3
  __name: "Bullets",
4
4
  props: ["obj", "label", "prop", "value", "content", "textarea", "placeholder", "index", "ref"],
@@ -20,9 +20,9 @@ const E = ["placeholder"], I = {
20
20
  }
21
21
  return f(() => {
22
22
  a();
23
- }), h(() => {
23
+ }), x(() => {
24
24
  a();
25
- }), x(() => t.prop[t.content], (l) => {
25
+ }), h(() => t.prop[t.content], (l) => {
26
26
  (!l || l.length === 0) && u("deleteBlock", t.prop);
27
27
  }), (l, n) => (m(), v("div", null, [
28
28
  g(k(e.prop[e.content]) + " ", 1),
@@ -33,6 +33,7 @@ const E = ["placeholder"], I = {
33
33
  onFocus: n[1] || (n[1] = (r) => u("focus", o.value)),
34
34
  ref_key: "textarea",
35
35
  ref: o,
36
+ tabindex: "-1",
36
37
  class: "text-area mn-small"
37
38
  }, `
38
39
  `, 40, E), [
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=["placeholder"],h={__name:"Caption",props:["obj","label","prop","value","content","textarea","placeholder","index","ref"],emits:["deleteBlock","addBlock","focus"],setup(l,{emit:s}){const t=l;e.ref(t);const r=e.ref(null);function p(n){const o=/^\s*[-*]\s+(.*)/;let i=n.target.value.split(/\n+/).map(u=>{const d=o.exec(u);return d?d[1]:null}).filter(u=>u!==null);i.length>0?(t.prop[t.content]=i,a()):n.target.value.trim()===""&&(t.prop[t.content]=[],a())}function a(){r.value.style.height="1rem",r.value.style.height=r.value.scrollHeight+"px"}return e.onUpdated(()=>{a()}),e.onMounted(()=>{a()}),e.watch(()=>t.prop[t.content],n=>{(!n||n.length===0)&&s("deleteBlock",t.prop)}),(n,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":o[0]||(o[0]=c=>l.prop[l.content]=c),placeholder:l.placeholder?l.placeholder:"Enter text",onInput:p,onFocus:o[1]||(o[1]=c=>s("focus",r.value)),ref_key:"textarea",ref:r,class:"br-l br-solid br-main pd-l-small text-area mn-small"},`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=["placeholder"],h={__name:"Caption",props:["obj","label","prop","value","content","textarea","placeholder","index","ref"],emits:["deleteBlock","addBlock","focus"],setup(l,{emit:i}){const t=l;e.ref(t);const r=e.ref(null);function p(n){const o=/^\s*[-*]\s+(.*)/;let s=n.target.value.split(/\n+/).map(u=>{const d=o.exec(u);return d?d[1]:null}).filter(u=>u!==null);s.length>0?(t.prop[t.content]=s,a()):n.target.value.trim()===""&&(t.prop[t.content]=[],a())}function a(){r.value.style.height="1rem",r.value.style.height=r.value.scrollHeight+"px"}return e.onUpdated(()=>{a()}),e.onMounted(()=>{a()}),e.watch(()=>t.prop[t.content],n=>{(!n||n.length===0)&&i("deleteBlock",t.prop)}),(n,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":o[0]||(o[0]=c=>l.prop[l.content]=c),placeholder:l.placeholder?l.placeholder:"Enter text",onInput:p,onFocus:o[1]||(o[1]=c=>i("focus",r.value)),ref_key:"textarea",ref:r,tabindex:"-1",class:"br-l br-solid br-main pd-l-small text-area mn-small"},`
2
2
  `,40,f),[[e.vModelText,l.prop[l.content]]])]))}};exports.default=h;
@@ -1,19 +1,19 @@
1
- import { ref as p, onUpdated as f, onMounted as m, watch as h, openBlock as x, createElementBlock as v, withDirectives as g, createElementVNode as b, vModelText as k } from "vue";
1
+ import { ref as d, onUpdated as f, onMounted as m, watch as h, openBlock as x, createElementBlock as v, withDirectives as b, createElementVNode as g, vModelText as k } from "vue";
2
2
  const B = ["placeholder"], E = {
3
3
  __name: "Caption",
4
4
  props: ["obj", "label", "prop", "value", "content", "textarea", "placeholder", "index", "ref"],
5
5
  emits: ["deleteBlock", "addBlock", "focus"],
6
- setup(t, { emit: s }) {
6
+ setup(t, { emit: i }) {
7
7
  const e = t;
8
- p(e);
9
- const o = p(null);
10
- function d(l) {
8
+ d(e);
9
+ const o = d(null);
10
+ function p(l) {
11
11
  const n = /^\s*[-*]\s+(.*)/;
12
- let i = l.target.value.split(/\n+/).map((c) => {
12
+ let s = l.target.value.split(/\n+/).map((c) => {
13
13
  const u = n.exec(c);
14
14
  return u ? u[1] : null;
15
15
  }).filter((c) => c !== null);
16
- i.length > 0 ? (e.prop[e.content] = i, a()) : l.target.value.trim() === "" && (e.prop[e.content] = [], a());
16
+ s.length > 0 ? (e.prop[e.content] = s, a()) : l.target.value.trim() === "" && (e.prop[e.content] = [], a());
17
17
  }
18
18
  function a() {
19
19
  o.value.style.height = "1rem", o.value.style.height = o.value.scrollHeight + "px";
@@ -23,15 +23,16 @@ const B = ["placeholder"], E = {
23
23
  }), m(() => {
24
24
  a();
25
25
  }), h(() => e.prop[e.content], (l) => {
26
- (!l || l.length === 0) && s("deleteBlock", e.prop);
26
+ (!l || l.length === 0) && i("deleteBlock", e.prop);
27
27
  }), (l, n) => (x(), v("div", null, [
28
- g(b("textarea", {
28
+ b(g("textarea", {
29
29
  "onUpdate:modelValue": n[0] || (n[0] = (r) => t.prop[t.content] = r),
30
30
  placeholder: t.placeholder ? t.placeholder : "Enter text",
31
- onInput: d,
32
- onFocus: n[1] || (n[1] = (r) => s("focus", o.value)),
31
+ onInput: p,
32
+ onFocus: n[1] || (n[1] = (r) => i("focus", o.value)),
33
33
  ref_key: "textarea",
34
34
  ref: o,
35
+ tabindex: "-1",
35
36
  class: "br-l br-solid br-main pd-l-small text-area mn-small"
36
37
  }, `
37
38
  `, 40, B), [
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./H2.vue2.cjs");const f=["placeholder"],k={__name:"H2",props:["obj","label","prop","value","content","textarea","placeholder","index","ref","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(a,{emit:c}){const t=a;e.ref(t);const o=e.ref(null);e.ref(0);function d(l){let n=l.target.value.split(/\n+/);if(n.length>1){t.prop[t.content]=n[0],e.nextTick(()=>{r()});let u=n.slice(1).map(p=>({type:"Textarea",content:p}));c("addBlock","Textarea","",t.index,{blocks:u,ref:o})}else l.target.value.trim()===""&&l.target.value.includes(`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./H2.vue2.cjs");const f=["placeholder"],k={__name:"H2",props:["obj","label","prop","value","content","textarea","placeholder","index","ref","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(a,{emit:c}){const t=a;e.ref(t);const o=e.ref(null);e.ref(0);function d(n){let l=n.target.value.split(/\n+/);if(l.length>1){t.prop[t.content]=l[0],e.nextTick(()=>{r()});let u=l.slice(1).map(p=>({type:"Textarea",content:p}));c("addBlock","Textarea","",t.index,{blocks:u,ref:o})}else n.target.value.trim()===""&&n.target.value.includes(`
2
2
 
3
- `)&&(console.log("We are adding new block:"+t.index+newBlocks+o),c("addBlock","Textarea","",t.index,{blocks:newBlocks,ref:o})),r()}function i(l){(l.keyCode===8||l.keyCode===46)&&t.prop[t.content].trim()===""&&c("deleteBlock",t.prop)}function s(){e.nextTick(()=>{o.value.focus(),c("updateBlock",t.prop,{setFocus:!1})})}function r(){o.value.style.height="1rem",o.value.style.height=o.value.scrollHeight+"px"}return e.onUpdated(()=>{t.setFocus&&e.nextTick(()=>{s()}),r()}),e.onMounted(()=>{t.setFocus&&e.nextTick(()=>{s()}),r()}),e.watch(()=>t.prop[t.content],l=>{}),(l,n)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":n[0]||(n[0]=u=>a.prop[a.content]=u),placeholder:a.placeholder?a.placeholder:"Enter text",onInput:d,onFocus:n[1]||(n[1]=u=>c("focus",o.value)),onKeyup:i,ref_key:"textarea",ref:o,class:"h3 text-area mn-thin"},`
3
+ `)&&(console.log("We are adding new block:"+t.index+newBlocks+o),c("addBlock","Textarea","",t.index,{blocks:newBlocks,ref:o})),r()}function i(n){(n.keyCode===8||n.keyCode===46)&&t.prop[t.content].trim()===""&&c("deleteBlock",t.prop)}function s(){e.nextTick(()=>{o.value.focus(),c("updateBlock",t.prop,{setFocus:!1})})}function r(){o.value.style.height="1rem",o.value.style.height=o.value.scrollHeight+"px"}return e.onUpdated(()=>{t.setFocus&&e.nextTick(()=>{s()}),r()}),e.onMounted(()=>{t.setFocus&&e.nextTick(()=>{s()}),r()}),e.watch(()=>t.prop[t.content],n=>{}),(n,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":l[0]||(l[0]=u=>a.prop[a.content]=u),placeholder:a.placeholder?a.placeholder:"Enter text",onInput:d,onFocus:l[1]||(l[1]=u=>c("focus",o.value)),onKeyup:i,ref_key:"textarea",ref:o,tabindex:"-1",class:"h3 text-area mn-thin"},`
4
4
  `,40,f),[[e.vModelText,a.prop[a.content]]])]))}};exports.default=k;
@@ -1,4 +1,4 @@
1
- import { ref as u, onUpdated as k, nextTick as s, onMounted as x, watch as h, openBlock as B, createElementBlock as g, withDirectives as m, createElementVNode as v, vModelText as y } from "vue";
1
+ import { ref as s, onUpdated as k, nextTick as d, onMounted as x, watch as h, openBlock as B, createElementBlock as g, withDirectives as m, createElementVNode as v, vModelText as y } from "vue";
2
2
  import "./H2.vue2.js";
3
3
  const w = ["placeholder"], T = {
4
4
  __name: "H2",
@@ -6,13 +6,13 @@ const w = ["placeholder"], T = {
6
6
  emits: ["deleteBlock", "updateBlock", "addBlock", "focus"],
7
7
  setup(n, { emit: a }) {
8
8
  const e = n;
9
- u(e);
10
- const t = u(null);
11
- u(0);
9
+ s(e);
10
+ const t = s(null);
11
+ s(0);
12
12
  function p(o) {
13
13
  let l = o.target.value.split(/\n+/);
14
14
  if (l.length > 1) {
15
- e.prop[e.content] = l[0], s(() => {
15
+ e.prop[e.content] = l[0], d(() => {
16
16
  c();
17
17
  });
18
18
  let r = l.slice(1).map((f) => ({ type: "Textarea", content: f }));
@@ -25,8 +25,8 @@ const w = ["placeholder"], T = {
25
25
  function i(o) {
26
26
  (o.keyCode === 8 || o.keyCode === 46) && e.prop[e.content].trim() === "" && a("deleteBlock", e.prop);
27
27
  }
28
- function d() {
29
- s(() => {
28
+ function u() {
29
+ d(() => {
30
30
  t.value.focus(), a("updateBlock", e.prop, { setFocus: !1 });
31
31
  });
32
32
  }
@@ -34,12 +34,12 @@ const w = ["placeholder"], T = {
34
34
  t.value.style.height = "1rem", t.value.style.height = t.value.scrollHeight + "px";
35
35
  }
36
36
  return k(() => {
37
- e.setFocus && s(() => {
38
- d();
37
+ e.setFocus && d(() => {
38
+ u();
39
39
  }), c();
40
40
  }), x(() => {
41
- e.setFocus && s(() => {
42
- d();
41
+ e.setFocus && d(() => {
42
+ u();
43
43
  }), c();
44
44
  }), h(() => e.prop[e.content], (o) => {
45
45
  }), (o, l) => (B(), g("div", null, [
@@ -51,6 +51,7 @@ const w = ["placeholder"], T = {
51
51
  onKeyup: i,
52
52
  ref_key: "textarea",
53
53
  ref: t,
54
+ tabindex: "-1",
54
55
  class: "h3 text-area mn-thin"
55
56
  }, `
56
57
  `, 40, w), [
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../../node_modules/axios/lib/axios.cjs"),k=["src"],v={key:1,class:"t-transp pd-extra"},h={__name:"ImageUpload",props:["label","value","prop"],emits:["input","updateBlock"],setup(n,{emit:r}){const p=n,l=e.ref(null),s=e.ref(null);function u(){s.value.click()}async function i(t){let o=t.target.files[0];console.log(o);let a=new FormData,f="unsorted";a.append("file",o),console.log(a.has("file"));try{let m=await g.default.create({baseURL:process.env.API_URL,withCredentials:!0}).post(`/api/upload/file?folderName=${encodeURIComponent(f)}`,a,{headers:{"Content-Type":"multipart/form-data"}});l.value=m.data.filepath,console.log(l.value),r("input",l.value),r("updateBlock",p.prop,{content:l.value})}catch(c){console.error(c)}}function d(t){t.preventDefault(),i({target:{files:t.dataTransfer.files}})}return(t,o)=>(e.openBlock(),e.createElementBlock("div",{onClick:u,onDrop:d,onDragover:o[0]||(o[0]=e.withModifiers(()=>{},["prevent"])),class:"w-100 radius-big bg-white image-upload-area flex-v-center flex-h-center flex t-black mn-small"},[n.prop.content?(e.openBlock(),e.createElementBlock("img",{key:0,src:(t.FILE_SERVER_URL||"")+n.prop.content,alt:"Uploaded image",class:"w-100 h-30r object-fit-contain"},null,8,k)):(e.openBlock(),e.createElementBlock("span",v,"Click or drag-and-drop your image")),e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:s,onChange:i,style:{display:"none"}},null,544)],32))}};exports.default=h;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../../node_modules/axios/lib/axios.cjs"),k=["src"],v={key:1,class:"t-transp pd-extra"},h={__name:"ImageUpload",props:["label","value","prop"],emits:["input","updateBlock"],setup(n,{emit:r}){const p=n,l=e.ref(null),i=e.ref(null);function u(){i.value.click()}async function s(t){let o=t.target.files[0];console.log(o);let a=new FormData,f="unsorted";a.append("file",o),console.log(a.has("file"));try{let m=await g.default.create({baseURL:process.env.API_URL,withCredentials:!0}).post(`/api/upload/file?folderName=${encodeURIComponent(f)}`,a,{headers:{"Content-Type":"multipart/form-data"}});l.value=m.data.filepath,console.log(l.value),r("input",l.value),r("updateBlock",p.prop,{content:l.value})}catch(c){console.error(c)}}function d(t){t.preventDefault(),s({target:{files:t.dataTransfer.files}})}return(t,o)=>(e.openBlock(),e.createElementBlock("div",{onClick:u,onDrop:d,onDragover:o[0]||(o[0]=e.withModifiers(()=>{},["prevent"])),class:"w-100 radius-big bg-white image-upload-area flex-v-center flex-h-center flex t-black mn-small"},[n.prop.content?(e.openBlock(),e.createElementBlock("img",{key:0,src:(t.FILE_SERVER_URL||"")+n.prop.content,alt:"Uploaded image",class:"w-100 h-30r object-fit-contain"},null,8,k)):(e.openBlock(),e.createElementBlock("span",v,"Click or drag-and-drop your image")),e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:i,tabindex:"-1",onChange:s,style:{display:"none"}},null,544)],32))}};exports.default=h;
@@ -1,9 +1,9 @@
1
1
  import { ref as u, openBlock as l, createElementBlock as r, withModifiers as k, createElementVNode as v } from "vue";
2
2
  import y from "../../../../../node_modules/axios/lib/axios.js";
3
- const C = ["src"], x = {
3
+ const x = ["src"], C = {
4
4
  key: 1,
5
5
  class: "t-transp pd-extra"
6
- }, _ = {
6
+ }, U = {
7
7
  __name: "ImageUpload",
8
8
  props: [
9
9
  "label",
@@ -51,11 +51,12 @@ const C = ["src"], x = {
51
51
  src: (e.FILE_SERVER_URL || "") + a.prop.content,
52
52
  alt: "Uploaded image",
53
53
  class: "w-100 h-30r object-fit-contain"
54
- }, null, 8, C)) : (l(), r("span", x, "Click or drag-and-drop your image")),
54
+ }, null, 8, x)) : (l(), r("span", C, "Click or drag-and-drop your image")),
55
55
  v("input", {
56
56
  type: "file",
57
57
  ref_key: "fileInput",
58
58
  ref: s,
59
+ tabindex: "-1",
59
60
  onChange: p,
60
61
  style: { display: "none" }
61
62
  }, null, 544)
@@ -63,5 +64,5 @@ const C = ["src"], x = {
63
64
  }
64
65
  };
65
66
  export {
66
- _ as default
67
+ U as default
67
68
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Textarea.vue.cjs");const f=["placeholder"],k={__name:"Textarea",props:["prop","value","content","placeholder","index","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(l,{emit:c}){const t=l;e.ref(t);const o=e.ref(null);e.ref(0);function d(a){let n=a.target.value.split(/\n+/);if(n.length>1){t.prop[t.content]=n[0],e.nextTick(()=>{r()});let u=n.slice(1).map(p=>({__name:"Textarea",content:p}));c("addBlock","Textarea","",t.index,{blocks:u,ref:o})}else a.target.value.trim()===""&&a.target.value.includes(`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Textarea.vue.cjs");const f=["placeholder"],k={__name:"Textarea",props:["prop","value","content","placeholder","index","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(l,{emit:c}){const t=l;e.ref(t);const n=e.ref(null);e.ref(0);function d(a){let o=a.target.value.split(/\n+/);if(o.length>1){t.prop[t.content]=o[0],e.nextTick(()=>{r()});let u=o.slice(1).map(p=>({__name:"Textarea",content:p}));c("addBlock","Textarea","",t.index,{blocks:u,ref:n})}else a.target.value.trim()===""&&a.target.value.includes(`
2
2
 
3
- `)&&(console.log("We are adding new block:"+t.index+newBlocks+o),c("addBlock","Textarea","",t.index,{blocks:newBlocks,ref:o})),r()}function i(a){(a.keyCode===8||a.keyCode===46)&&t.prop[t.content].trim()===""&&c("deleteBlock",t.prop)}function s(){e.nextTick(()=>{o.value.focus(),c("updateBlock",t.prop,{setFocus:!1})})}function r(){o.value.style.height="1rem",o.value.style.height=o.value.scrollHeight+"px"}return e.onUpdated(()=>{t.setFocus&&e.nextTick(()=>{s()}),r()}),e.onMounted(()=>{t.setFocus&&e.nextTick(()=>{s()}),r()}),(a,n)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":n[0]||(n[0]=u=>l.prop[l.content]=u),placeholder:l.placeholder?l.placeholder:"Enter text",onInput:d,onFocus:n[1]||(n[1]=u=>c("focus",o.value)),onKeyup:i,ref_key:"textarea",ref:o,class:"text-area mn-thin"},`
3
+ `)&&(console.log("We are adding new block:"+t.index+newBlocks+n),c("addBlock","Textarea","",t.index,{blocks:newBlocks,ref:n})),r()}function i(a){(a.keyCode===8||a.keyCode===46)&&t.prop[t.content].trim()===""&&c("deleteBlock",t.prop)}function s(){e.nextTick(()=>{n.value.focus(),c("updateBlock",t.prop,{setFocus:!1})})}function r(){n.value.style.height="1rem",n.value.style.height=n.value.scrollHeight+"px"}return e.onUpdated(()=>{t.setFocus&&e.nextTick(()=>{s()}),r()}),e.onMounted(()=>{t.setFocus&&e.nextTick(()=>{s()}),r()}),(a,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":o[0]||(o[0]=u=>l.prop[l.content]=u),placeholder:l.placeholder?l.placeholder:"Enter text",onInput:d,onFocus:o[1]||(o[1]=u=>c("focus",n.value)),onKeyup:i,ref_key:"textarea",ref:n,tabindex:"-1",class:"text-area mn-thin"},`
4
4
  `,40,f),[[e.vModelText,l.prop[l.content]]])]))}};exports.default=k;
@@ -1,32 +1,32 @@
1
- import { ref as d, onUpdated as k, nextTick as s, onMounted as x, openBlock as h, createElementBlock as B, withDirectives as m, createElementVNode as g, vModelText as v } from "vue";
1
+ import { ref as s, onUpdated as k, nextTick as d, onMounted as x, openBlock as h, createElementBlock as B, withDirectives as m, createElementVNode as g, vModelText as v } from "vue";
2
2
  import "./Textarea.vue.js";
3
3
  const y = ["placeholder"], F = {
4
4
  __name: "Textarea",
5
5
  props: ["prop", "value", "content", "placeholder", "index", "setFocus"],
6
6
  emits: ["deleteBlock", "updateBlock", "addBlock", "focus"],
7
- setup(l, { emit: a }) {
8
- const e = l;
9
- d(e);
10
- const t = d(null);
11
- d(0);
12
- function i(n) {
13
- let o = n.target.value.split(/\n+/);
7
+ setup(n, { emit: a }) {
8
+ const e = n;
9
+ s(e);
10
+ const t = s(null);
11
+ s(0);
12
+ function i(l) {
13
+ let o = l.target.value.split(/\n+/);
14
14
  if (o.length > 1) {
15
- e.prop[e.content] = o[0], s(() => {
15
+ e.prop[e.content] = o[0], d(() => {
16
16
  c();
17
17
  });
18
18
  let r = o.slice(1).map((f) => ({ __name: "Textarea", content: f }));
19
19
  a("addBlock", "Textarea", "", e.index, { blocks: r, ref: t });
20
20
  } else
21
- n.target.value.trim() === "" && n.target.value.includes(`
21
+ l.target.value.trim() === "" && l.target.value.includes(`
22
22
 
23
23
  `) && (console.log("We are adding new block:" + e.index + newBlocks + t), a("addBlock", "Textarea", "", e.index, { blocks: newBlocks, ref: t })), c();
24
24
  }
25
- function p(n) {
26
- (n.keyCode === 8 || n.keyCode === 46) && e.prop[e.content].trim() === "" && a("deleteBlock", e.prop);
25
+ function p(l) {
26
+ (l.keyCode === 8 || l.keyCode === 46) && e.prop[e.content].trim() === "" && a("deleteBlock", e.prop);
27
27
  }
28
28
  function u() {
29
- s(() => {
29
+ d(() => {
30
30
  t.value.focus(), a("updateBlock", e.prop, { setFocus: !1 });
31
31
  });
32
32
  }
@@ -34,26 +34,27 @@ const y = ["placeholder"], F = {
34
34
  t.value.style.height = "1rem", t.value.style.height = t.value.scrollHeight + "px";
35
35
  }
36
36
  return k(() => {
37
- e.setFocus && s(() => {
37
+ e.setFocus && d(() => {
38
38
  u();
39
39
  }), c();
40
40
  }), x(() => {
41
- e.setFocus && s(() => {
41
+ e.setFocus && d(() => {
42
42
  u();
43
43
  }), c();
44
- }), (n, o) => (h(), B("div", null, [
44
+ }), (l, o) => (h(), B("div", null, [
45
45
  m(g("textarea", {
46
- "onUpdate:modelValue": o[0] || (o[0] = (r) => l.prop[l.content] = r),
47
- placeholder: l.placeholder ? l.placeholder : "Enter text",
46
+ "onUpdate:modelValue": o[0] || (o[0] = (r) => n.prop[n.content] = r),
47
+ placeholder: n.placeholder ? n.placeholder : "Enter text",
48
48
  onInput: i,
49
49
  onFocus: o[1] || (o[1] = (r) => a("focus", t.value)),
50
50
  onKeyup: p,
51
51
  ref_key: "textarea",
52
52
  ref: t,
53
+ tabindex: "-1",
53
54
  class: "text-area mn-thin"
54
55
  }, `
55
56
  `, 40, y), [
56
- [v, l.prop[l.content]]
57
+ [v, n.prop[n.content]]
57
58
  ])
58
59
  ]));
59
60
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("vue");const e=require("vue-i18n");let a={en:{name:"🌎 EN"},ru:{name:"🇷🇺 RU"}};const l=e.createI18n({locale:"en",fallbackLocale:"en",legacy:!1,globalInjection:!0,messages:a});exports.default=l;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue-i18n"),e={en:"🌎 EN",ru:"🇷🇺 RU",zh:"🇨🇳 ZH",fr:"🇫🇷 FR",de:"🇩🇪 DE",it:"🇮🇹 IT"},l={};for(const s of Object.keys(e))l[s]={};const o=a.createI18n({locale:"en",fallbackLocale:"en",legacy:!1,globalInjection:!0,messages:l,availableLocales:Object.keys(e)});exports.default=o;