@ozdao/prometheus-framework 0.1.84 → 0.1.86

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.cjs +1 -1
  2. package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.js +22 -22
  3. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  4. package/dist/prometheus-framework/src/components/Button/Button.vue.js +224 -2
  5. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  6. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +2 -224
  7. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +49 -2
  9. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +2 -49
  11. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +1 -1
  13. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/components/Select/Select.vue.js +78 -2
  15. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  16. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +2 -78
  17. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +1 -1
  19. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +1 -1
  21. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +1 -1
  23. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +1 -1
  25. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +41 -42
  27. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +1 -1
  29. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/auth/store/auth.js +106 -84
  31. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  33. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  35. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  37. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +4 -1
  38. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +62 -2
  39. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -4
  40. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +2 -62
  41. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  45. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  47. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  49. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +3 -3
  51. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  53. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
  55. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
  57. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  59. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +11 -2
  61. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +2 -11
  63. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  65. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  69. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +3 -3
  71. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  73. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
  75. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  77. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  79. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  81. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  83. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
  85. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +1 -1
  87. package/dist/style.css +1 -1
  88. package/package.json +1 -1
  89. package/src/modules/auth/components/pages/SignIn.vue +0 -1
  90. package/src/modules/auth/store/auth.js +42 -42
@@ -1,74 +1,73 @@
1
- import { ref as c, onMounted as x, resolveComponent as U, openBlock as C, createElementBlock as E, createTextVNode as u, toDisplayString as d, createElementVNode as l, unref as a, createVNode as i, withCtx as m, Transition as f, withDirectives as v, vShow as g } from "vue";
1
+ import { ref as p, onMounted as U, resolveComponent as k, openBlock as C, createElementBlock as E, createElementVNode as l, createTextVNode as c, toDisplayString as d, unref as o, createVNode as i, withCtx as u, Transition as f, withDirectives as v, vShow as g } from "vue";
2
2
  import I from "../../../../components/Tab/Tab.vue2.js";
3
3
  import w from "../../../../components/Field/Field.vue2.js";
4
4
  import D from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import j from "../../../../components/Button/Button.vue2.js";
5
+ import j from "../../../../components/Button/Button.vue.js";
6
6
  import { useRoute as F, useRouter as N } from "vue-router";
7
7
  import { useI18n as O } from "vue-i18n";
8
8
  import T from "../../localization/SignIn.json.js";
9
- import { state as o, actions as q } from "../../store/auth.js";
9
+ import { state as s, actions as q } from "../../store/auth.js";
10
10
  import { validateInputs as b, validatePhone as A, validateEmail as B } from "../../../middlewares/client/inputs.validation.js";
11
11
  import "./SignIn.vue2.js";
12
12
  const R = { class: "" }, $ = ["src"], L = { class: "mn-medium" }, M = /* @__PURE__ */ l("br", null, null, -1), z = { class: "t-semi" }, G = { class: "mn-big" }, H = { class: "mn-small p-small uppercase t-semi bg-grey radius-big o-hidden" }, J = { class: "pos-relative" }, K = { class: "mn-thin radius-small" }, Q = { class: "mn-thin radius-small o-hidden" }, W = { class: "w-100 mn-big" }, de = {
13
13
  __name: "SignIn",
14
14
  setup(X) {
15
- const h = c(null), y = c(null), _ = c(null);
15
+ const h = p(null), y = p(null), _ = p(null);
16
16
  F();
17
- const V = N(), { t: s } = O(T), n = c("phone"), P = (r) => new Promise((t, p) => {
17
+ const V = N(), { t: a } = O(T), n = p("phone"), x = (r) => new Promise((t, m) => {
18
18
  const e = document.createElement("script");
19
- e.type = "text/javascript", e.src = r, e.onload = t, e.onerror = p, document.head.appendChild(e);
19
+ e.type = "text/javascript", e.src = r, e.onload = t, e.onerror = m, document.head.appendChild(e);
20
20
  });
21
- x(async () => {
22
- await P("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js");
21
+ U(async () => {
22
+ await x("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js");
23
23
  });
24
- async function S() {
24
+ async function P() {
25
25
  try {
26
26
  n.value === "phone" && await b(
27
27
  h,
28
28
  A,
29
- o.user.phone,
29
+ s.user.phone,
30
30
  "Некорректный телефон"
31
31
  ), n.value === "email" && await b(
32
32
  _,
33
33
  B,
34
- o.user.email,
34
+ s.user.email,
35
35
  "Некорректный email"
36
36
  );
37
37
  } catch {
38
38
  throw new Error();
39
39
  }
40
- const r = { ...o.user };
41
- r.phone = o.user.phone.number, await q.login(r, n.value);
40
+ const r = { ...s.user };
41
+ r.phone = s.user.phone.number, await q.login(r, n.value);
42
42
  }
43
- function k() {
43
+ function S() {
44
44
  V.push({
45
45
  name: "User Profile",
46
46
  params: {
47
- _id: o.user._id
47
+ _id: s.user._id
48
48
  },
49
49
  query: { afterAuth: "true" }
50
50
  });
51
51
  }
52
52
  return (r, t) => {
53
- const p = U("router-link");
53
+ const m = k("router-link");
54
54
  return C(), E("section", R, [
55
- u(d(r.document.cookie) + " ", 1),
56
55
  l("img", {
57
56
  src: "/logo/logo_square.svg",
58
57
  class: "i-extra radius-small mn-small"
59
58
  }, null, 8, $),
60
59
  l("h3", L, [
61
- u(d(a(s)("title")) + " ", 1),
60
+ c(d(o(a)("title")) + " ", 1),
62
61
  M,
63
- l("span", z, d(a(s)("subtitle")), 1)
62
+ l("span", z, d(o(a)("subtitle")), 1)
64
63
  ]),
65
64
  l("p", G, [
66
- i(p, {
65
+ i(m, {
67
66
  to: { name: "Sign Up" },
68
67
  class: "underline t-second"
69
68
  }, {
70
- default: m(() => [
71
- u(d(a(s)("signup")), 1)
69
+ default: u(() => [
70
+ c(d(o(a)("signup")), 1)
72
71
  ]),
73
72
  _: 1
74
73
  })
@@ -78,18 +77,18 @@ const R = { class: "" }, $ = ["src"], L = { class: "mn-medium" }, M = /* @__PURE
78
77
  selected: n.value,
79
78
  "onUpdate:selected": t[0] || (t[0] = (e) => n.value = e),
80
79
  tabs: [
81
- { name: a(s)("phone"), value: "phone" },
82
- { name: a(s)("email"), value: "email" }
80
+ { name: o(a)("phone"), value: "phone" },
81
+ { name: o(a)("email"), value: "email" }
83
82
  ]
84
83
  }, null, 8, ["selected", "tabs"])
85
84
  ]),
86
85
  l("div", J, [
87
86
  i(f, { name: "slide-fade" }, {
88
- default: m(() => [
87
+ default: u(() => [
89
88
  v(l("div", K, [
90
89
  i(D, {
91
- modelValue: o.user.phone,
92
- "onUpdate:modelValue": t[1] || (t[1] = (e) => o.user.phone = e),
90
+ modelValue: s.user.phone,
91
+ "onUpdate:modelValue": t[1] || (t[1] = (e) => s.user.phone = e),
93
92
  dropdownOptions: {
94
93
  showDialCodeInSelection: !0,
95
94
  showFlags: !0,
@@ -97,7 +96,7 @@ const R = { class: "" }, $ = ["src"], L = { class: "mn-medium" }, M = /* @__PURE
97
96
  },
98
97
  validation: h.value,
99
98
  mode: "national",
100
- inputOptions: { placeholder: a(s)("phonePlaceholder") },
99
+ inputOptions: { placeholder: o(a)("phonePlaceholder") },
101
100
  class: "bg-grey pd-small radius-small mn-thin"
102
101
  }, null, 8, ["modelValue", "validation", "inputOptions"])
103
102
  ], 512), [
@@ -107,12 +106,12 @@ const R = { class: "" }, $ = ["src"], L = { class: "mn-medium" }, M = /* @__PURE
107
106
  _: 1
108
107
  }),
109
108
  i(f, { name: "slide-fade" }, {
110
- default: m(() => [
109
+ default: u(() => [
111
110
  v(l("div", Q, [
112
111
  i(w, {
113
- field: o.user.email,
114
- "onUpdate:field": t[2] || (t[2] = (e) => o.user.email = e),
115
- placeholder: a(s)("emailPlaceholder"),
112
+ field: s.user.email,
113
+ "onUpdate:field": t[2] || (t[2] = (e) => s.user.email = e),
114
+ placeholder: o(a)("emailPlaceholder"),
116
115
  validation: _.value,
117
116
  class: "bg-grey pd-medium radius-small"
118
117
  }, null, 8, ["field", "placeholder", "validation"])
@@ -124,31 +123,31 @@ const R = { class: "" }, $ = ["src"], L = { class: "mn-medium" }, M = /* @__PURE
124
123
  })
125
124
  ]),
126
125
  i(w, {
127
- field: o.user.password,
128
- "onUpdate:field": t[3] || (t[3] = (e) => o.user.password = e),
126
+ field: s.user.password,
127
+ "onUpdate:field": t[3] || (t[3] = (e) => s.user.password = e),
129
128
  type: "password",
130
129
  validation: y.value,
131
- placeholder: a(s)("passwordPlaceholder"),
130
+ placeholder: o(a)("passwordPlaceholder"),
132
131
  class: "bg-grey pd-medium radius-small mn-semi"
133
132
  }, null, 8, ["field", "validation", "placeholder"]),
134
133
  l("div", W, [
135
- i(p, {
134
+ i(m, {
136
135
  to: "/auth/reset-password",
137
136
  class: "underline d-block t-blue"
138
137
  }, {
139
- default: m(() => [
140
- u(d(a(s)("forgotPassword")), 1)
138
+ default: u(() => [
139
+ c(d(o(a)("forgotPassword")), 1)
141
140
  ]),
142
141
  _: 1
143
142
  })
144
143
  ]),
145
144
  i(j, {
146
- submit: S,
147
- callback: k,
145
+ submit: P,
146
+ callback: S,
148
147
  class: "mn-thin"
149
148
  }, {
150
- default: m(() => [
151
- u(d(a(s)("signin")), 1)
149
+ default: u(() => [
150
+ c(d(o(a)("signin")), 1)
152
151
  ]),
153
152
  _: 1
154
153
  })
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),_=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),V=require("../../../../components/Button/Button.vue2.cjs"),u=require("vue-router"),g=require("vue-i18n"),w=require("../../localization/SignUp.json.cjs"),n=require("../../store/auth.cjs"),N=require("../../store/twofa.cjs"),s=require("../../../middlewares/client/inputs.validation.cjs");require("./SignUp.vue2.cjs");const b={class:"t-left pd-medium"},E={class:"mn-small"},S={class:"mn-small t-transp"},y={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},q={class:"pos-relative"},C={class:"mn-semi radius-small"},D={class:"mn-small t-transp"},x={class:"mn-semi radius-small o-hidden"},T={class:"mn-small t-transp"},k={class:"w-100"},I={__name:"SignUp",setup(P){const{t}=g.useI18n(w.default),i=e.ref(null),r=e.ref(null);u.useRoute();const c=u.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await s.validateInputs(i,s.validatePhone,n.state.user.phone,"Некорректный телефон"),a.value==="email"&&await s.validateInputs(r,s.validateEmail,n.state.user.email,"Некорректный email")}catch{throw new Error}try{await N.sendCode(n.state.user,"signup",a.value)}catch{throw new Error}}function p(){c.push({name:"Enter Code"})}return(d,l)=>{const h=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",b,[e.createElementVNode("h3",E,e.toDisplayString(e.unref(t)("title")),1),e.createElementVNode("p",S,e.toDisplayString(e.unref(t)("description")),1),e.createElementVNode("div",y,[e.createVNode(v.default,{selected:a.value,"onUpdate:selected":l[0]||(l[0]=o=>a.value=o),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",q,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",C,[e.createElementVNode("p",D,e.toDisplayString(e.unref(t)("smsNotice")),1),e.createVNode(_.default,{modelValue:n.state.user.phone,"onUpdate:modelValue":l[1]||(l[1]=o=>n.state.user.phone=o),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:i.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])],512),[[e.vShow,a.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",x,[e.createElementVNode("p",T,e.toDisplayString(e.unref(t)("emailNotice")),1),e.createVNode(f.default,{field:n.state.user.email,"onUpdate:field":l[2]||(l[2]=o=>n.state.user.email=o),placeholder:e.unref(t)("emailPlaceholder"),validation:r.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,a.value==="email"]])]),_:1})]),e.createVNode(V.default,{submit:m,callback:p,class:"mn-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1}),e.createElementVNode("div",k,[e.createVNode(h,{to:"/auth/signin",class:"underline mn-medium d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("haveAccount")),1)]),_:1})])])}}};exports.default=I;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),_=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),V=require("../../../../components/Button/Button.vue.cjs"),u=require("vue-router"),g=require("vue-i18n"),w=require("../../localization/SignUp.json.cjs"),n=require("../../store/auth.cjs"),N=require("../../store/twofa.cjs"),s=require("../../../middlewares/client/inputs.validation.cjs");require("./SignUp.vue2.cjs");const b={class:"t-left pd-medium"},E={class:"mn-small"},S={class:"mn-small t-transp"},y={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},q={class:"pos-relative"},C={class:"mn-semi radius-small"},D={class:"mn-small t-transp"},x={class:"mn-semi radius-small o-hidden"},T={class:"mn-small t-transp"},k={class:"w-100"},I={__name:"SignUp",setup(P){const{t}=g.useI18n(w.default),i=e.ref(null),r=e.ref(null);u.useRoute();const c=u.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await s.validateInputs(i,s.validatePhone,n.state.user.phone,"Некорректный телефон"),a.value==="email"&&await s.validateInputs(r,s.validateEmail,n.state.user.email,"Некорректный email")}catch{throw new Error}try{await N.sendCode(n.state.user,"signup",a.value)}catch{throw new Error}}function p(){c.push({name:"Enter Code"})}return(d,l)=>{const h=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",b,[e.createElementVNode("h3",E,e.toDisplayString(e.unref(t)("title")),1),e.createElementVNode("p",S,e.toDisplayString(e.unref(t)("description")),1),e.createElementVNode("div",y,[e.createVNode(v.default,{selected:a.value,"onUpdate:selected":l[0]||(l[0]=o=>a.value=o),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",q,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",C,[e.createElementVNode("p",D,e.toDisplayString(e.unref(t)("smsNotice")),1),e.createVNode(_.default,{modelValue:n.state.user.phone,"onUpdate:modelValue":l[1]||(l[1]=o=>n.state.user.phone=o),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:i.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])],512),[[e.vShow,a.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",x,[e.createElementVNode("p",T,e.toDisplayString(e.unref(t)("emailNotice")),1),e.createVNode(f.default,{field:n.state.user.email,"onUpdate:field":l[2]||(l[2]=o=>n.state.user.email=o),placeholder:e.unref(t)("emailPlaceholder"),validation:r.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,a.value==="email"]])]),_:1})]),e.createVNode(V.default,{submit:m,callback:p,class:"mn-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1}),e.createElementVNode("div",k,[e.createVNode(h,{to:"/auth/signin",class:"underline mn-medium d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("haveAccount")),1)]),_:1})])])}}};exports.default=I;
@@ -2,7 +2,7 @@ import { ref as d, resolveComponent as C, openBlock as k, createElementBlock as
2
2
  import x from "../../../../components/Tab/Tab.vue2.js";
3
3
  import N from "../../../../components/Field/Field.vue2.js";
4
4
  import S from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import D from "../../../../components/Button/Button.vue2.js";
5
+ import D from "../../../../components/Button/Button.vue.js";
6
6
  import { useRoute as I, useRouter as P } from "vue-router";
7
7
  import { useI18n as U } from "vue-i18n";
8
8
  import F from "../../localization/SignUp.json.js";
@@ -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");require("../../../../node_modules/@capacitor/core/dist/index.cjs");const l=require("vue"),n=require("../../globals/store/globals.cjs"),g=require("./twofa.cjs"),i=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}}),d=f("user");if(d){const{_id:s,email:r,phone:e,roles:c,accessToken:t}=d;Object.assign(o.user,{_id:s,email:r,phone:e}),Object.assign(o.access,{token:t,roles:c,status:!!t}),i.interceptors.request.use(a=>(t&&(a.headers["x-access-token"]=t),a),a=>Promise.reject(a))}const h={async login(s,r){try{const e=await i.post("/api/auth/signin",{...s,type:r});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,r,e){const{password:c,passwordRepeat:t}=o.user;if(c!==t){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 i.post("/api/auth/signup",{...s,type:r,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(){m("user"),Object.assign(o.user,{email:"",phone:"",password:"",passwordRepeat:""}),Object.assign(o.access,{token:null,status:!1})},async resetPassword(s,r){try{const e=await i.post("/api/auth/reset-password",{email:s.email,phone:s.phone.number,type:r});return Object.assign(g.state.code,{...e.data,isSended:!0}),e.data}catch(e){return n.setError(e),Promise.reject(e)}},async updatePassword(s,r){const{password:e,passwordRepeat:c}=o.user;if(e!==c){const t={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw n.setError(t),new Error(t.response.status)}try{const t=await i.post("/api/auth/update-password",{email:s.email,phone:s.phone.number,password:s.password,passwordRepeat:s.passwordRepeat,type:r});return t.data.accessToken&&u("user",t.data),Object.assign(o.user,{...t.data}),Object.assign(o.access,{token:t.data.accessToken,status:!0}),t.data}catch(t){return n.setError(t),Promise.reject(t)}}},O={development:{secure:!1,expires:1},production:{expires:1,domain:process.env.API_URL,sameSite:"none",secure:!0}};function f(s){const r=p.default.get(s);return r?JSON.parse(r):null}function u(s,r,e=process.env.NODE_ENV){p.default.set(s,JSON.stringify(r),O[e])}function m(s,r=process.env.NODE_ENV){const e=r==="production"?{domain:process.env.API_URL}:{};p.default.remove(s,e)}l.watch(o,(s,r)=>{});exports.actions=h;exports.state=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("../../../../node_modules/axios/lib/axios.cjs"),d=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=k.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 f(){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))}}f();const g={async login(e,t){try{const s=await i.post("/api/auth/signin",{...e,type:t});return p("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&&p("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&&p("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}};async function P(e){if(process.env.MOBILE_APP){const t=await l.CapacitorCookies.getCookies();return t?JSON.parse(t[e]):null}else{const t=d.default.get(e);return t?JSON.parse(t):null}}function p(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)}):d.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}:{};d.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";
2
- import u from "../../../../../node_modules/js-cookie/src/js.cookie.js";
3
- import "../../../../node_modules/@capacitor/core/dist/index.js";
4
- import { reactive as m, watch as w } from "vue";
1
+ import m from "../../../../node_modules/axios/lib/axios.js";
2
+ import d from "../../../../../node_modules/js-cookie/src/js.cookie.js";
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 h } from "./twofa.js";
7
- const i = l.create({ baseURL: process.env.API_URL, withCredentials: !0 }), o = m({
6
+ import { state as k } 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,133 +18,155 @@ const i = l.create({ baseURL: process.env.API_URL, withCredentials: !0 }), o = m
18
18
  token: null,
19
19
  status: !1
20
20
  }
21
- }), d = f("user");
22
- if (d) {
23
- const { _id: s, email: a, phone: e, roles: c, accessToken: t } = d;
24
- Object.assign(o.user, { _id: s, email: a, phone: e }), Object.assign(o.access, { token: t, roles: c, status: !!t }), i.interceptors.request.use((r) => (t && (r.headers["x-access-token"] = t), r), (r) => Promise.reject(r));
21
+ });
22
+ async function O() {
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
+ }
25
28
  }
26
- const C = {
27
- async login(s, a) {
29
+ O();
30
+ const y = {
31
+ async login(e, t) {
28
32
  try {
29
- const e = await i.post("/api/auth/signin", {
30
- ...s,
31
- type: a
33
+ const s = await i.post("/api/auth/signin", {
34
+ ...e,
35
+ type: t
32
36
  });
33
- return p("user", e.data), Object.assign(o.user, {
34
- ...e.data
35
- }), Object.assign(o.access, {
36
- token: e.data.accessToken,
37
+ return u("user", s.data), Object.assign(a.user, {
38
+ ...s.data
39
+ }), Object.assign(a.access, {
40
+ token: s.data.accessToken,
37
41
  status: !0,
38
- roles: e.data.roles
39
- }), e.data;
40
- } catch (e) {
41
- return Object.assign(o.access, {
42
+ roles: s.data.roles
43
+ }), s.data;
44
+ } catch (s) {
45
+ return Object.assign(a.access, {
42
46
  token: null,
43
47
  status: !1,
44
48
  roles: null
45
- }), n(e), Promise.reject(e);
49
+ }), n(s), Promise.reject(s);
46
50
  }
47
51
  },
48
- async signup(s, a, e) {
49
- const { password: c, passwordRepeat: t } = o.user;
50
- if (c !== t) {
51
- const r = {
52
+ async signup(e, t, s) {
53
+ const { password: c, passwordRepeat: r } = a.user;
54
+ if (c !== r) {
55
+ const o = {
52
56
  response: {
53
57
  data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
54
58
  }
55
59
  };
56
- throw n(r), new Error(r.response.status);
60
+ throw n(o), new Error(o.response.status);
57
61
  }
58
62
  try {
59
- s.phone = s.phone.number;
60
- const r = await i.post("/api/auth/signup", {
61
- ...s,
62
- type: a,
63
- inviteCode: e
63
+ e.phone = e.phone.number;
64
+ const o = await i.post("/api/auth/signup", {
65
+ ...e,
66
+ type: t,
67
+ inviteCode: s
64
68
  });
65
- return r.data.accessToken && p("user", r.data), Object.assign(o.user, {
66
- ...r.data
67
- }), Object.assign(o.access, {
68
- token: r.data.accessToken,
69
+ return o.data.accessToken && u("user", o.data), Object.assign(a.user, {
70
+ ...o.data
71
+ }), Object.assign(a.access, {
72
+ token: o.data.accessToken,
69
73
  status: !0,
70
- roles: r.data.roles
71
- }), r.data;
72
- } catch (r) {
73
- throw n(r), console.log("Sign up falied"), r;
74
+ roles: o.data.roles
75
+ }), o.data;
76
+ } catch (o) {
77
+ throw n(o), console.log("Sign up falied"), o;
74
78
  }
75
79
  },
76
80
  logout() {
77
- g("user"), Object.assign(o.user, {
81
+ P("user"), Object.assign(a.user, {
78
82
  email: "",
79
83
  phone: "",
80
84
  password: "",
81
85
  passwordRepeat: ""
82
- }), Object.assign(o.access, {
86
+ }), Object.assign(a.access, {
83
87
  token: null,
84
88
  status: !1
85
89
  });
86
90
  },
87
- async resetPassword(s, a) {
91
+ async resetPassword(e, t) {
88
92
  try {
89
- const e = await i.post("/api/auth/reset-password", {
90
- email: s.email,
91
- phone: s.phone.number,
92
- type: a
93
+ const s = await i.post("/api/auth/reset-password", {
94
+ email: e.email,
95
+ phone: e.phone.number,
96
+ type: t
93
97
  });
94
- return Object.assign(h.code, {
95
- ...e.data,
98
+ return Object.assign(k.code, {
99
+ ...s.data,
96
100
  isSended: !0
97
- }), e.data;
98
- } catch (e) {
99
- return n(e), Promise.reject(e);
101
+ }), s.data;
102
+ } catch (s) {
103
+ return n(s), Promise.reject(s);
100
104
  }
101
105
  },
102
- async updatePassword(s, a) {
103
- const { password: e, passwordRepeat: c } = o.user;
104
- if (e !== c) {
105
- const t = {
106
+ async updatePassword(e, t) {
107
+ const { password: s, passwordRepeat: c } = a.user;
108
+ if (s !== c) {
109
+ const r = {
106
110
  response: {
107
111
  data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
108
112
  }
109
113
  };
110
- throw n(t), new Error(t.response.status);
114
+ throw n(r), new Error(r.response.status);
111
115
  }
112
116
  try {
113
- const t = await i.post("/api/auth/update-password", {
114
- email: s.email,
115
- phone: s.phone.number,
116
- password: s.password,
117
- passwordRepeat: s.passwordRepeat,
118
- type: a
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,
122
+ type: t
119
123
  });
120
- return t.data.accessToken && p("user", t.data), Object.assign(o.user, {
121
- ...t.data
122
- }), Object.assign(o.access, {
123
- token: t.data.accessToken,
124
+ return r.data.accessToken && u("user", r.data), Object.assign(a.user, {
125
+ ...r.data
126
+ }), Object.assign(a.access, {
127
+ token: r.data.accessToken,
124
128
  status: !0
125
- }), t.data;
126
- } catch (t) {
127
- return n(t), Promise.reject(t);
129
+ }), r.data;
130
+ } catch (r) {
131
+ return n(r), Promise.reject(r);
128
132
  }
129
133
  }
130
- }, O = {
134
+ }, g = {
131
135
  development: { secure: !1, expires: 1 },
132
136
  production: { expires: 1, domain: process.env.API_URL, sameSite: "none", secure: !0 }
133
137
  };
134
- function f(s) {
135
- const a = u.get(s);
136
- return a ? JSON.parse(a) : null;
138
+ async function h(e) {
139
+ if (process.env.MOBILE_APP) {
140
+ const t = await l.getCookies();
141
+ return t ? JSON.parse(t[e]) : null;
142
+ } else {
143
+ const t = d.get(e);
144
+ return t ? JSON.parse(t) : null;
145
+ }
137
146
  }
138
- function p(s, a, e = process.env.NODE_ENV) {
139
- u.set(s, JSON.stringify(a), O[e]);
147
+ function u(e, t, s = process.env.NODE_ENV) {
148
+ process.env.MOBILE_APP ? l.setCookie({
149
+ url: process.env.API_URL,
150
+ // используйте ваш API_URL
151
+ key: e,
152
+ value: JSON.stringify(t)
153
+ }) : d.set(e, JSON.stringify(t), g[s]);
140
154
  }
141
- function g(s, a = process.env.NODE_ENV) {
142
- const e = a === "production" ? { domain: process.env.API_URL } : {};
143
- u.remove(s, e);
155
+ function P(e, t = process.env.NODE_ENV) {
156
+ if (process.env.MOBILE_APP)
157
+ l.deleteCookie({
158
+ url: process.env.API_URL,
159
+ // используйте ваш API_URL
160
+ key: e
161
+ });
162
+ else {
163
+ const s = t === "production" ? { domain: process.env.API_URL } : {};
164
+ d.remove(e, s);
165
+ }
144
166
  }
145
- w(o, (s, a) => {
167
+ f(a, (e, t) => {
146
168
  });
147
169
  export {
148
- C as actions,
149
- o as state
170
+ y as actions,
171
+ a as state
150
172
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../mobile/components/Menu/Menu.vue2.cjs"),n=require("../../../mobile/components/Menu/MenuItem.vue.cjs"),o=require("vue-router"),i={class:""},l=e.createElementVNode("h1",{class:"mn-small"},"Your Backoffice",-1),d=e.createElementVNode("span",null," Organizations ",-1),f=e.createElementVNode("span",null," Events ",-1),c=e.createElementVNode("span",null," Community ",-1),p=e.createElementVNode("span",null," Products ",-1),m=e.createElementVNode("span",null," Leftovers ",-1),_=e.createElementVNode("span",null," Orders ",-1),k=e.createElementVNode("span",null," Payments ",-1),C=e.createElementVNode("span",null," Gallery ",-1),N=e.createElementVNode("span",null," Reports ",-1),V={__name:"Dashboard",props:{favorites:Array},setup(v){const r=o.useRoute(),s=o.useRouter();return(h,t)=>(e.openBlock(),e.createElementBlock("div",i,[l,e.createVNode(u.default,{class:"bg-grey"},{default:e.withCtx(()=>[e.createVNode(n.default,{onClick:t[0]||(t[0]=a=>e.unref(s).push({name:"Backoffice Organizations",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[d]),_:1}),e.createVNode(n.default,{onClick:t[1]||(t[1]=a=>e.unref(s).push({name:"Backoffice Events",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[f]),_:1}),e.createVNode(n.default,{onClick:t[2]||(t[2]=a=>e.unref(s).push({name:"Backoffice Community",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[c]),_:1}),e.createVNode(n.default,{onClick:t[3]||(t[3]=a=>e.unref(s).push({name:"Backoffice Products",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[p]),_:1}),e.createVNode(n.default,{onClick:t[4]||(t[4]=a=>e.unref(s).push({name:"Backoffice Leftovers",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[m]),_:1}),e.createVNode(n.default,{onClick:t[5]||(t[5]=a=>e.unref(s).push({name:"Backoffice Orders",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[_]),_:1}),e.createVNode(n.default,{onClick:t[6]||(t[6]=a=>e.unref(s).push({name:"Backoffice Payments",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[k]),_:1}),e.createVNode(n.default,{onClick:t[7]||(t[7]=a=>e.unref(s).push({name:"Backoffice Gallery",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[C]),_:1}),e.createVNode(n.default,{onClick:t[8]||(t[8]=a=>e.unref(s).push({name:"Backoffice Reports",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[N]),_:1})]),_:1})]))}};exports.default=V;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../mobile/components/Menu/Menu.vue.cjs"),n=require("../../../mobile/components/Menu/MenuItem.vue.cjs"),o=require("vue-router"),i={class:""},l=e.createElementVNode("h1",{class:"mn-small"},"Your Backoffice",-1),d=e.createElementVNode("span",null," Organizations ",-1),f=e.createElementVNode("span",null," Events ",-1),c=e.createElementVNode("span",null," Community ",-1),p=e.createElementVNode("span",null," Products ",-1),m=e.createElementVNode("span",null," Leftovers ",-1),_=e.createElementVNode("span",null," Orders ",-1),k=e.createElementVNode("span",null," Payments ",-1),C=e.createElementVNode("span",null," Gallery ",-1),N=e.createElementVNode("span",null," Reports ",-1),V={__name:"Dashboard",props:{favorites:Array},setup(v){const r=o.useRoute(),s=o.useRouter();return(h,t)=>(e.openBlock(),e.createElementBlock("div",i,[l,e.createVNode(u.default,{class:"bg-grey"},{default:e.withCtx(()=>[e.createVNode(n.default,{onClick:t[0]||(t[0]=a=>e.unref(s).push({name:"Backoffice Organizations",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[d]),_:1}),e.createVNode(n.default,{onClick:t[1]||(t[1]=a=>e.unref(s).push({name:"Backoffice Events",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[f]),_:1}),e.createVNode(n.default,{onClick:t[2]||(t[2]=a=>e.unref(s).push({name:"Backoffice Community",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[c]),_:1}),e.createVNode(n.default,{onClick:t[3]||(t[3]=a=>e.unref(s).push({name:"Backoffice Products",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[p]),_:1}),e.createVNode(n.default,{onClick:t[4]||(t[4]=a=>e.unref(s).push({name:"Backoffice Leftovers",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[m]),_:1}),e.createVNode(n.default,{onClick:t[5]||(t[5]=a=>e.unref(s).push({name:"Backoffice Orders",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[_]),_:1}),e.createVNode(n.default,{onClick:t[6]||(t[6]=a=>e.unref(s).push({name:"Backoffice Payments",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[k]),_:1}),e.createVNode(n.default,{onClick:t[7]||(t[7]=a=>e.unref(s).push({name:"Backoffice Gallery",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[C]),_:1}),e.createVNode(n.default,{onClick:t[8]||(t[8]=a=>e.unref(s).push({name:"Backoffice Reports",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[N]),_:1})]),_:1})]))}};exports.default=V;
@@ -1,5 +1,5 @@
1
1
  import { openBlock as p, createElementBlock as u, createVNode as e, withCtx as a, unref as o, createElementVNode as n } from "vue";
2
- import m from "../../../mobile/components/Menu/Menu.vue2.js";
2
+ import m from "../../../mobile/components/Menu/Menu.vue.js";
3
3
  import i from "../../../mobile/components/Menu/MenuItem.vue.js";
4
4
  import { useRoute as d, useRouter as _ } from "vue-router";
5
5
  const f = { class: "" }, c = /* @__PURE__ */ n("h1", { class: "mn-small" }, "Your Backoffice", -1), k = /* @__PURE__ */ n("span", null, " Organizations ", -1), v = /* @__PURE__ */ n("span", null, " Events ", -1), B = /* @__PURE__ */ n("span", null, " Community ", -1), C = /* @__PURE__ */ n("span", null, " Products ", -1), $ = /* @__PURE__ */ n("span", null, " Leftovers ", -1), y = /* @__PURE__ */ n("span", null, " Orders ", -1), h = /* @__PURE__ */ n("span", null, " Payments ", -1), g = /* @__PURE__ */ n("span", null, " Gallery ", -1), E = /* @__PURE__ */ n("span", null, " Reports ", -1), G = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router"),u=require("../../../../components/Select/Select.vue2.cjs"),a=require("../../store/blogposts.cjs"),c=require("../../../auth/store/auth.cjs"),m={class:"min-h-100vh pd-thin"},d={class:"mn-thin flex-v-center t-left flex-nowrap flex"},p={class:"flex-v-center flex-nowrap flex t-left"},f=e.createElementVNode("span",{class:""},"Topics for ",-1),g={class:"w-100 bg-grey pd-small radius-big mn-semi gap-thin flex-nowrap flex"},h={class:""},w={__name:"Community",setup(k){const l=n.useRoute(),r=n.useRouter();return(y,t)=>{const s=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",d,[e.createElementVNode("h2",p,[f,e.createVNode(u.default,{options:["today","week","month","year"],select:a.state.filter.period,"onUpdate:select":t[0]||(t[0]=o=>a.state.filter.period=o),placeholder:"Select type",class:"w-max mn-l-small bg-grey pd-thin radius-medium h2 t-center t-black"},null,8,["select"])])]),e.createElementVNode("ul",g,[e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(l).params.category==="featured"},"t-medium pd-thin radius-small"]),onClick:t[1]||(t[1]=o=>e.unref(r).push({name:"Blog"}))},"👑 Featured",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(l).params.category==="popular"},"t-medium pd-thin radius-small"]),onClick:t[2]||(t[2]=o=>e.unref(r).push({name:"Blog",params:{category:"popular"}}))},"🔥 Popular",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(l).params.category==="new"},"t-medium pd-thin radius-small"]),onClick:t[3]||(t[3]=o=>e.unref(r).push({name:"Blog",params:{category:"new"}}))},"🆕 New",2),c.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-white bg-black":e.unref(l).params.category==="following"},"t-medium pd-thin radius-small"]),onClick:t[4]||(t[4]=o=>e.unref(r).push({name:"Blog",params:{category:"following"}}))},"👥 Following",2)):e.createCommentVNode("",!0)]),e.createElementVNode("section",h,[e.createVNode(s,null,{default:e.withCtx(({Component:o,route:i})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o),{ref:"page",key:i.query}))]),_:2},1024)]),_:1})])])}}};exports.default=w;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router"),u=require("../../../../components/Select/Select.vue.cjs"),a=require("../../store/blogposts.cjs"),c=require("../../../auth/store/auth.cjs"),m={class:"min-h-100vh pd-thin"},d={class:"mn-thin flex-v-center t-left flex-nowrap flex"},p={class:"flex-v-center flex-nowrap flex t-left"},f=e.createElementVNode("span",{class:""},"Topics for ",-1),g={class:"w-100 bg-grey pd-small radius-big mn-semi gap-thin flex-nowrap flex"},h={class:""},w={__name:"Community",setup(k){const l=n.useRoute(),r=n.useRouter();return(y,t)=>{const s=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",d,[e.createElementVNode("h2",p,[f,e.createVNode(u.default,{options:["today","week","month","year"],select:a.state.filter.period,"onUpdate:select":t[0]||(t[0]=o=>a.state.filter.period=o),placeholder:"Select type",class:"w-max mn-l-small bg-grey pd-thin radius-medium h2 t-center t-black"},null,8,["select"])])]),e.createElementVNode("ul",g,[e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(l).params.category==="featured"},"t-medium pd-thin radius-small"]),onClick:t[1]||(t[1]=o=>e.unref(r).push({name:"Blog"}))},"👑 Featured",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(l).params.category==="popular"},"t-medium pd-thin radius-small"]),onClick:t[2]||(t[2]=o=>e.unref(r).push({name:"Blog",params:{category:"popular"}}))},"🔥 Popular",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(l).params.category==="new"},"t-medium pd-thin radius-small"]),onClick:t[3]||(t[3]=o=>e.unref(r).push({name:"Blog",params:{category:"new"}}))},"🆕 New",2),c.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-white bg-black":e.unref(l).params.category==="following"},"t-medium pd-thin radius-small"]),onClick:t[4]||(t[4]=o=>e.unref(r).push({name:"Blog",params:{category:"following"}}))},"👥 Following",2)):e.createCommentVNode("",!0)]),e.createElementVNode("section",h,[e.createVNode(s,null,{default:e.withCtx(({Component:o,route:i})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o),{ref:"page",key:i.query}))]),_:2},1024)]),_:1})])])}}};exports.default=w;
@@ -1,6 +1,6 @@
1
1
  import { resolveComponent as f, openBlock as n, createElementBlock as m, createElementVNode as o, createVNode as i, normalizeClass as r, unref as t, createCommentVNode as g, withCtx as p, Transition as h, createBlock as w, resolveDynamicComponent as y } from "vue";
2
2
  import { useRoute as _, useRouter as k } from "vue-router";
3
- import b from "../../../../components/Select/Select.vue2.js";
3
+ import b from "../../../../components/Select/Select.vue.js";
4
4
  import { state as c } from "../../store/blogposts.js";
5
5
  import { state as v } from "../../../auth/store/auth.js";
6
6
  const x = { class: "min-h-100vh pd-thin" }, C = { class: "mn-thin flex-v-center t-left flex-nowrap flex" }, B = { class: "flex-v-center flex-nowrap flex t-left" }, $ = /* @__PURE__ */ o("span", { class: "" }, "Topics for ", -1), N = { class: "w-100 bg-grey pd-small radius-big mn-semi gap-thin flex-nowrap flex" }, V = { class: "" }, D = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../../constructor/components/elements/Textarea.vue2.cjs"),V=require("../../../constructor/components/sections/Constructor.vue.cjs"),y=require("../../../../components/Popup/Popup.vue.cjs");require("../../../../components/FieldTags/tag-input.vue.cjs");require("../../../../components/FieldTags/vue-tags-input.scss.cjs");const B=require("../../../../components/FieldTags/BlockTags.vue.cjs"),N=require("../../../../components/Checkbox/Checkbox.vue.cjs"),P=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),x=require("../../../../components/Button/Button.vue2.cjs"),f=require("vue-router"),n=require("../../store/blogposts.cjs"),i=require("../../../auth/store/auth.cjs"),C=require("../../../organizations/store/organizations.cjs"),q={class:"pd-thin"},E={key:0,class:"h-100 w-100 bg-grey pd-big radius-big"},T={class:"w-full h-full"},z={key:1,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},O={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},D=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),M=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),S={key:0,class:"mn-thin"},U={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},A={__name:"CreateBlogPost",setup(R){const s=f.useRoute(),u=f.useRouter();let t=e.ref(null),p=e.ref(null);const c=e.ref([]),r=e.ref(null);e.onMounted(async()=>{if(s.params.url){const a=await n.read({user:i.state.user._id,url:s.params.url});t.value=a.pop()}else n.clean(),t.value=n.state.current;t.value.owner||(t.value.owner={target:i.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:i.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(r.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const o=await C.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});console.log(o),p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const g=e.ref(""),m=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>m.value.filter(o=>o.text.toLowerCase().includes(g.value.toLowerCase()))),e.computed(()=>m.value.filter(o=>!c.value.some(a=>a.text===o.text)));const d=e.ref(!1);function v(){d.value=!0}function h(){d.value=!1}function b(){c.value.length>0&&c.value.map(o=>o.text),t.value.status="draft",s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function k(){r.value&&(t.value.owner={target:r.value._id,type:"organization"}),r.value||(t.value.creator.hidden=!1),r.value||(t.value.organization=t.value.creator),t.value.status="published",console.log(t.value),s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,a)=>(e.openBlock(),e.createElementBlock("article",q,[e.unref(t)?(e.openBlock(),e.createElementBlock("section",E,[e.createElementVNode("div",T,[e.createVNode(w.default,{prop:e.unref(t),content:"name",placeholder:"Enter post title",class:"h2"},null,8,["prop"])]),e.createVNode(V.default,{content:e.unref(t).content,onUpdate:a[0]||(a[0]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",z,[e.createElementVNode("div",O,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[1]||(a[1]=l=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[2]||(a[2]=l=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[3]||(a[3]=l=>v()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(y.default,{title:"Добавить участника",onClosePopup:h,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[D,e.createVNode(B.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),M,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":a[5]||(a[5]=l=>r.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-medium bg-grey radius-medium pd-small"},null,8,["modelValue","options"]),r.value?(e.openBlock(),e.createElementBlock("h5",S,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(N.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[6]||(a[6]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(x.default,{submit:k,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}};exports.default=A;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../../constructor/components/elements/Textarea.vue.cjs"),V=require("../../../constructor/components/sections/Constructor.vue.cjs"),y=require("../../../../components/Popup/Popup.vue.cjs");require("../../../../components/FieldTags/tag-input.vue.cjs");require("../../../../components/FieldTags/vue-tags-input.scss.cjs");const B=require("../../../../components/FieldTags/BlockTags.vue.cjs"),N=require("../../../../components/Checkbox/Checkbox.vue.cjs"),P=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),x=require("../../../../components/Button/Button.vue.cjs"),f=require("vue-router"),n=require("../../store/blogposts.cjs"),i=require("../../../auth/store/auth.cjs"),C=require("../../../organizations/store/organizations.cjs"),q={class:"pd-thin"},E={key:0,class:"h-100 w-100 bg-grey pd-big radius-big"},T={class:"w-full h-full"},z={key:1,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},O={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},D=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),M=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),S={key:0,class:"mn-thin"},U={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},A={__name:"CreateBlogPost",setup(R){const s=f.useRoute(),u=f.useRouter();let t=e.ref(null),p=e.ref(null);const c=e.ref([]),r=e.ref(null);e.onMounted(async()=>{if(s.params.url){const a=await n.read({user:i.state.user._id,url:s.params.url});t.value=a.pop()}else n.clean(),t.value=n.state.current;t.value.owner||(t.value.owner={target:i.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:i.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(r.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const o=await C.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});console.log(o),p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const g=e.ref(""),m=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>m.value.filter(o=>o.text.toLowerCase().includes(g.value.toLowerCase()))),e.computed(()=>m.value.filter(o=>!c.value.some(a=>a.text===o.text)));const d=e.ref(!1);function v(){d.value=!0}function h(){d.value=!1}function b(){c.value.length>0&&c.value.map(o=>o.text),t.value.status="draft",s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function k(){r.value&&(t.value.owner={target:r.value._id,type:"organization"}),r.value||(t.value.creator.hidden=!1),r.value||(t.value.organization=t.value.creator),t.value.status="published",console.log(t.value),s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,a)=>(e.openBlock(),e.createElementBlock("article",q,[e.unref(t)?(e.openBlock(),e.createElementBlock("section",E,[e.createElementVNode("div",T,[e.createVNode(w.default,{prop:e.unref(t),content:"name",placeholder:"Enter post title",class:"h2"},null,8,["prop"])]),e.createVNode(V.default,{content:e.unref(t).content,onUpdate:a[0]||(a[0]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",z,[e.createElementVNode("div",O,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[1]||(a[1]=l=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[2]||(a[2]=l=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[3]||(a[3]=l=>v()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(y.default,{title:"Добавить участника",onClosePopup:h,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[D,e.createVNode(B.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),M,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":a[5]||(a[5]=l=>r.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-medium bg-grey radius-medium pd-small"},null,8,["modelValue","options"]),r.value?(e.openBlock(),e.createElementBlock("h5",S,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(N.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[6]||(a[6]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(x.default,{submit:k,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}};exports.default=A;
@@ -1,5 +1,5 @@
1
1
  import { ref as r, onMounted as V, computed as _, openBlock as u, createElementBlock as i, unref as a, createElementVNode as p, createVNode as n, createCommentVNode as m, withCtx as w, createTextVNode as z } from "vue";
2
- import D from "../../../constructor/components/elements/Textarea.vue2.js";
2
+ import D from "../../../constructor/components/elements/Textarea.vue.js";
3
3
  import N from "../../../constructor/components/sections/Constructor.vue.js";
4
4
  import O from "../../../../components/Popup/Popup.vue.js";
5
5
  import "../../../../components/FieldTags/tag-input.vue.js";
@@ -7,7 +7,7 @@ import "../../../../components/FieldTags/vue-tags-input.scss.js";
7
7
  import U from "../../../../components/FieldTags/BlockTags.vue.js";
8
8
  import A from "../../../../components/Checkbox/Checkbox.vue.js";
9
9
  import E from "../../../../components/SelectMulti/SelectMulti.vue.js";
10
- import L from "../../../../components/Button/Button.vue2.js";
10
+ import L from "../../../../components/Button/Button.vue.js";
11
11
  import { useRoute as M, useRouter as R } from "vue-router";
12
12
  import { read as S, clean as F, state as H, update as k, create as y, remove as j } from "../../store/blogposts.js";
13
13
  import { state as f } from "../../../auth/store/auth.js";
@@ -1 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Textarea.vue2.cjs");const k=["placeholder"],x={__name:"Textarea",props:["prop","value","content","placeholder","index","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(l,{emit:s}){const t=l,c=s;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(f=>({__name:"Textarea",content:f}));c("addBlock","Textarea","",t.index,{blocks:u,ref:n})}else a.target.value.trim()===""&&a.target.value.includes(`
2
+
3
+ `)&&(console.log("We are adding new block:"+t.index+newBlocks+n),c("addBlock","Textarea","",t.index,{blocks:newBlocks,ref:n})),r()}function p(a){(a.keyCode===8||a.keyCode===46)&&t.prop[t.content].trim()===""&&c("deleteBlock",t.prop)}function i(){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(()=>{i()}),r()}),e.onMounted(()=>{t.setFocus&&e.nextTick(()=>{i()}),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:p,ref_key:"textarea",ref:n,tabindex:"-1",class:"text-area mn-thin"},`
4
+ `,40,k),[[e.vModelText,l.prop[l.content]]])]))}};exports.default=x;