@ozdao/prometheus-framework 0.2.8 → 0.2.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. package/dist/community.server.js +18 -5
  2. package/dist/community.server.mjs +18 -5
  3. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  4. package/dist/prometheus-framework/src/components/Button/Button.vue.js +2 -224
  5. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  6. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +224 -2
  7. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +2 -49
  9. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +49 -2
  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 +2 -78
  15. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  16. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +78 -2
  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 +1 -1
  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/community/components/layouts/Community.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  31. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  33. package/dist/prometheus-framework/src/modules/community/store/reactions.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/community/store/reactions.js +2 -2
  35. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -4
  36. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +2 -62
  37. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +4 -1
  38. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +62 -2
  39. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  41. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  45. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  47. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +3 -3
  49. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  51. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
  53. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
  55. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  57. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  59. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  61. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  63. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +2 -2
  65. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  67. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
  69. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  71. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  73. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  75. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  77. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  79. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +1 -1
  81. package/dist/style.css +1 -1
  82. package/package.json +1 -1
  83. package/src/modules/community/controllers/reactions.controller.js +24 -2
  84. package/src/modules/community/models/reaction.model.js +4 -2
  85. package/src/modules/community/store/reactions.js +2 -2
@@ -1,4 +1,51 @@
1
- const _ = "";
1
+ import { ref as a, withDirectives as i, openBlock as d, createElementBlock as s, withModifiers as u, createTextVNode as c, toDisplayString as f, createVNode as p, Transition as m, withCtx as v, createElementVNode as g, normalizeStyle as w, renderSlot as k, vShow as S, unref as h } from "vue";
2
+ import y from "../FieldPhone/click-outside.js";
3
+ import "./Dropdown.vue.js";
4
+ import O from "../../../../_virtual/_plugin-vue_export-helper.js";
5
+ const b = {
6
+ __name: "Dropdown",
7
+ props: {
8
+ label: {
9
+ type: String,
10
+ default: "Open"
11
+ },
12
+ align: {
13
+ type: String,
14
+ default: "left"
15
+ }
16
+ },
17
+ setup(t) {
18
+ let l = y;
19
+ const e = a(!1);
20
+ function n() {
21
+ e.value = !1;
22
+ }
23
+ return (r, o) => i((d(), s("div", {
24
+ class: "dropdown pos-relative",
25
+ onClick: o[0] || (o[0] = u((x) => e.value = !e.value, ["stop"]))
26
+ }, [
27
+ c(f(t.label) + " ", 1),
28
+ p(m, {
29
+ name: "TransitionTranslateY",
30
+ mode: "out-in"
31
+ }, {
32
+ default: v(() => [
33
+ i(g("div", {
34
+ style: w({ left: t.align === "left" ? "0" : "auto", right: t.align === "right" ? "0" : "auto" }),
35
+ class: "dropdown-content w-15r radius-big"
36
+ }, [
37
+ k(r.$slots, "default", {}, void 0, !0)
38
+ ], 4), [
39
+ [S, e.value]
40
+ ])
41
+ ]),
42
+ _: 3
43
+ })
44
+ ])), [
45
+ [h(l), n]
46
+ ]);
47
+ }
48
+ }, N = /* @__PURE__ */ O(b, [["__scopeId", "data-v-2f59adb5"]]);
2
49
  export {
3
- _ as default
50
+ N as default
4
51
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../Button/Button.vue2.cjs");require("./LocationMarker.vue2.cjs");const w=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),h=r=>(e.pushScopeId("data-v-29acef04"),r=r(),e.popScopeId(),r),y={class:"pos-relative map-container"},v=h(()=>e.createElementVNode("svg",{class:"i-medium",width:"98",height:"98",viewBox:"0 0 98 98",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M50.0004 31.4995C39.7996 31.4995 31.5 39.7991 31.5 49.9999C31.5 60.2007 39.7996 68.5003 50.0004 68.5003C60.2012 68.5003 68.5008 60.2007 68.5008 49.9999C68.5008 39.7991 60.2012 31.4995 50.0004 31.4995ZM50.0004 63.7944C42.3941 63.7944 36.2059 57.6062 36.2059 49.9999C36.2059 42.3936 42.3941 36.2054 50.0004 36.2054C57.6067 36.2054 63.7949 42.3936 63.7949 49.9999C63.7949 57.6062 57.6067 63.7944 50.0004 63.7944Z",fill:"white"}),e.createElementVNode("path",{d:"M97.6471 47.6471H84.56C83.3977 30.4141 69.5859 16.6024 52.3529 15.44V2.35294C52.3529 1.05255 51.2988 0 50 0C48.6996 0 47.6471 1.05255 47.6471 2.35294V15.44C30.4141 16.6024 16.6024 30.4141 15.44 47.6471H2.35294C1.05255 47.6471 0 48.6996 0 50C0 51.2988 1.05255 52.3529 2.35294 52.3529H15.44C16.6024 69.5859 30.4141 83.3977 47.6471 84.56V97.6471C47.6471 98.9459 48.6996 100 50 100C51.2988 100 52.3529 98.9459 52.3529 97.6471V84.56C69.5859 83.3977 83.3977 69.5859 84.56 52.3529H97.6471C98.9459 52.3529 100 51.2988 100 50C100 48.6996 98.9459 47.6471 97.6471 47.6471ZM50 79.9435C33.4886 79.9435 20.0565 66.5114 20.0565 50C20.0565 33.4886 33.4886 20.0565 50 20.0565C66.5098 20.0565 79.9435 33.4886 79.9435 50C79.9435 66.5098 66.5098 79.9435 50 79.9435Z",fill:"white"})],-1)),L=[v],M={__name:"LocationMarker",props:{location:{type:Object,default:{lat:48.6900735,lng:41.1620239}},address:{type:String,default:""},apiKey:String},emits:["update:location","update:address","update:country","update:state","update:city"],setup(r,{emit:C}){const t=r,a=C,d=e.ref(null);let c,i;e.onMounted(()=>{c=new google.maps.Map(d.value,{center:t.location,zoom:15,mapTypeControl:!1,fullscreenControl:!1}),i=new google.maps.Marker({position:t.location,map:c,draggable:!0}),i.addListener("dragend",o=>{const n={lat:o.latLng.lat(),lng:o.latLng.lng()};a("update:location",n),u(n)})}),e.watchEffect(()=>{t.location&&i&&i.setPosition(new google.maps.LatLng(t.location.lat,t.location.lng))}),e.watchEffect(()=>{if(t.location&&c){const o=new google.maps.LatLng(t.location.lat,t.location.lng);c.setCenter(o)}});function u(o){new google.maps.Geocoder().geocode({location:o},(s,p)=>{if(p==="OK")if(s[0]){a("update:address",s[0].formatted_address);let g="",f="",m="";s[0].address_components.forEach(l=>{l.types.includes("country")&&(g=l.long_name),l.types.includes("administrative_area_level_1")&&(f=l.long_name),l.types.includes("locality")&&(m=l.long_name)}),a("update:country",g),a("update:state",f),a("update:city",m)}else console.error("No results found");else console.error("Geocoder failed due to: "+p)})}async function _(){navigator.geolocation?navigator.geolocation.getCurrentPosition(o=>{const n={lat:o.coords.latitude,lng:o.coords.longitude};a("update:location",n),u(n)},()=>{console.error("Error getting location")}):console.error("Geolocation is not supported by this browser.")}return(o,n)=>(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("div",{ref_key:"mapContainer",ref:d,class:"w-100 h-100"},null,512),e.createElementVNode("button",{class:"pos-absolute pos-t-regular pos-r-regular i-semi bg-second radius-extra",onClick:_},L)]))}},E=w.default(M,[["__scopeId","data-v-29acef04"]]);exports.default=E;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../Button/Button.vue.cjs");require("./LocationMarker.vue2.cjs");const w=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),h=r=>(e.pushScopeId("data-v-29acef04"),r=r(),e.popScopeId(),r),y={class:"pos-relative map-container"},v=h(()=>e.createElementVNode("svg",{class:"i-medium",width:"98",height:"98",viewBox:"0 0 98 98",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M50.0004 31.4995C39.7996 31.4995 31.5 39.7991 31.5 49.9999C31.5 60.2007 39.7996 68.5003 50.0004 68.5003C60.2012 68.5003 68.5008 60.2007 68.5008 49.9999C68.5008 39.7991 60.2012 31.4995 50.0004 31.4995ZM50.0004 63.7944C42.3941 63.7944 36.2059 57.6062 36.2059 49.9999C36.2059 42.3936 42.3941 36.2054 50.0004 36.2054C57.6067 36.2054 63.7949 42.3936 63.7949 49.9999C63.7949 57.6062 57.6067 63.7944 50.0004 63.7944Z",fill:"white"}),e.createElementVNode("path",{d:"M97.6471 47.6471H84.56C83.3977 30.4141 69.5859 16.6024 52.3529 15.44V2.35294C52.3529 1.05255 51.2988 0 50 0C48.6996 0 47.6471 1.05255 47.6471 2.35294V15.44C30.4141 16.6024 16.6024 30.4141 15.44 47.6471H2.35294C1.05255 47.6471 0 48.6996 0 50C0 51.2988 1.05255 52.3529 2.35294 52.3529H15.44C16.6024 69.5859 30.4141 83.3977 47.6471 84.56V97.6471C47.6471 98.9459 48.6996 100 50 100C51.2988 100 52.3529 98.9459 52.3529 97.6471V84.56C69.5859 83.3977 83.3977 69.5859 84.56 52.3529H97.6471C98.9459 52.3529 100 51.2988 100 50C100 48.6996 98.9459 47.6471 97.6471 47.6471ZM50 79.9435C33.4886 79.9435 20.0565 66.5114 20.0565 50C20.0565 33.4886 33.4886 20.0565 50 20.0565C66.5098 20.0565 79.9435 33.4886 79.9435 50C79.9435 66.5098 66.5098 79.9435 50 79.9435Z",fill:"white"})],-1)),L=[v],M={__name:"LocationMarker",props:{location:{type:Object,default:{lat:48.6900735,lng:41.1620239}},address:{type:String,default:""},apiKey:String},emits:["update:location","update:address","update:country","update:state","update:city"],setup(r,{emit:C}){const t=r,a=C,d=e.ref(null);let c,i;e.onMounted(()=>{c=new google.maps.Map(d.value,{center:t.location,zoom:15,mapTypeControl:!1,fullscreenControl:!1}),i=new google.maps.Marker({position:t.location,map:c,draggable:!0}),i.addListener("dragend",o=>{const n={lat:o.latLng.lat(),lng:o.latLng.lng()};a("update:location",n),u(n)})}),e.watchEffect(()=>{t.location&&i&&i.setPosition(new google.maps.LatLng(t.location.lat,t.location.lng))}),e.watchEffect(()=>{if(t.location&&c){const o=new google.maps.LatLng(t.location.lat,t.location.lng);c.setCenter(o)}});function u(o){new google.maps.Geocoder().geocode({location:o},(s,p)=>{if(p==="OK")if(s[0]){a("update:address",s[0].formatted_address);let g="",f="",m="";s[0].address_components.forEach(l=>{l.types.includes("country")&&(g=l.long_name),l.types.includes("administrative_area_level_1")&&(f=l.long_name),l.types.includes("locality")&&(m=l.long_name)}),a("update:country",g),a("update:state",f),a("update:city",m)}else console.error("No results found");else console.error("Geocoder failed due to: "+p)})}async function _(){navigator.geolocation?navigator.geolocation.getCurrentPosition(o=>{const n={lat:o.coords.latitude,lng:o.coords.longitude};a("update:location",n),u(n)},()=>{console.error("Error getting location")}):console.error("Geolocation is not supported by this browser.")}return(o,n)=>(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("div",{ref_key:"mapContainer",ref:d,class:"w-100 h-100"},null,512),e.createElementVNode("button",{class:"pos-absolute pos-t-regular pos-r-regular i-semi bg-second radius-extra",onClick:_},L)]))}},E=w.default(M,[["__scopeId","data-v-29acef04"]]);exports.default=E;
@@ -1,5 +1,5 @@
1
1
  import { ref as h, onMounted as y, watchEffect as C, openBlock as v, createElementBlock as L, createElementVNode as s, pushScopeId as M, popScopeId as k } from "vue";
2
- import "../Button/Button.vue2.js";
2
+ import "../Button/Button.vue.js";
3
3
  import "./LocationMarker.vue2.js";
4
4
  import b from "../../../../_virtual/_plugin-vue_export-helper.js";
5
5
  const x = (l) => (M("data-v-29acef04"), l = l(), k(), l), E = { class: "pos-relative map-container" }, S = /* @__PURE__ */ x(() => /* @__PURE__ */ s("svg", {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Select.vue2.cjs");const p=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),k=["onClick"],v={key:0,class:"t-transp mn-r-small"},f={class:"w-100"},h=["onClick"],g={key:0,class:"w-100"},B={key:0,class:"mn-t-thin invalid-feedback"},_={__name:"Select",props:{label:String,select:[String,Object],placeholder:{type:String,default:"Please select an item"},options:{type:Array,default:()=>[]},validation:Boolean},emits:["update:select","focus","blur"],setup(l,{emit:u}){const c=u,o=l,n=e.ref(o.select),a=e.ref(!1);e.watch(()=>o.select,t=>{n.value=t});const d=e.computed(()=>o.select?o.options.filter(t=>t!==o.select):o.options),r=()=>{a.value=!a.value,c(a.value?"focus":"blur")},m=t=>{n.value=t,r(),c("update:select",n.value)};return(t,C)=>{var i;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{onClick:e.withModifiers(r,["stop"]),class:e.normalizeClass([t.$attrs.class,"cursor-pointer flex-nowrap flex"])},[l.label?(e.openBlock(),e.createElementBlock("div",v,[e.createElementVNode("span",null,e.toDisplayString(l.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("li",f,[e.createElementVNode("span",null,e.toDisplayString(((i=n.value)==null?void 0:i.name)||n.value||l.placeholder),1)]),e.createVNode(e.Transition,{mode:"out-in",name:"TransitionTranslateY"},{default:e.withCtx(()=>[a.value?(e.openBlock(),e.createElementBlock("ul",{key:0,class:e.normalizeClass([t.$attrs.class,"pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,s=>(e.openBlock(),e.createElementBlock("li",{onClick:e.withModifiers(E=>m(s),["stop"])},[s?(e.openBlock(),e.createElementBlock("span",g,e.toDisplayString(s.name||s),1)):e.createCommentVNode("",!0)],8,h))),256))],2)):e.createCommentVNode("",!0)]),_:1})],10,k),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[l.validation?(e.openBlock(),e.createElementBlock("div",B," * "+e.toDisplayString(l.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64)}}},y=p.default(_,[["__scopeId","data-v-dfe03dc2"]]);exports.default=y;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
@@ -1,80 +1,4 @@
1
- import { ref as f, watch as S, computed as x, openBlock as t, createElementBlock as l, Fragment as v, createElementVNode as i, withModifiers as h, normalizeClass as _, toDisplayString as r, createCommentVNode as u, createVNode as k, Transition as b, withCtx as g, renderList as B } from "vue";
2
- import "./Select.vue2.js";
3
- import M from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const N = ["onClick"], O = {
5
- key: 0,
6
- class: "t-transp mn-r-small"
7
- }, T = { class: "w-100" }, V = ["onClick"], $ = {
8
- key: 0,
9
- class: "w-100"
10
- }, z = {
11
- key: 0,
12
- class: "mn-t-thin invalid-feedback"
13
- }, E = {
14
- __name: "Select",
15
- props: {
16
- label: String,
17
- select: [String, Object],
18
- placeholder: { type: String, default: "Please select an item" },
19
- options: { type: Array, default: () => [] },
20
- validation: Boolean
21
- },
22
- emits: ["update:select", "focus", "blur"],
23
- setup(s, { emit: w }) {
24
- const d = w, a = s, n = f(a.select), o = f(!1);
25
- S(() => a.select, (e) => {
26
- n.value = e;
27
- });
28
- const y = x(() => a.select ? a.options.filter((e) => e !== a.select) : a.options), m = () => {
29
- o.value = !o.value, d(o.value ? "focus" : "blur");
30
- }, C = (e) => {
31
- n.value = e, m(), d("update:select", n.value);
32
- };
33
- return (e, L) => {
34
- var p;
35
- return t(), l(v, null, [
36
- i("div", {
37
- onClick: h(m, ["stop"]),
38
- class: _([e.$attrs.class, "cursor-pointer flex-nowrap flex"])
39
- }, [
40
- s.label ? (t(), l("div", O, [
41
- i("span", null, r(s.label), 1)
42
- ])) : u("", !0),
43
- i("li", T, [
44
- i("span", null, r(((p = n.value) == null ? void 0 : p.name) || n.value || s.placeholder), 1)
45
- ]),
46
- k(b, {
47
- mode: "out-in",
48
- name: "TransitionTranslateY"
49
- }, {
50
- default: g(() => [
51
- o.value ? (t(), l("ul", {
52
- key: 0,
53
- class: _([e.$attrs.class, "pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"])
54
- }, [
55
- (t(!0), l(v, null, B(y.value, (c) => (t(), l("li", {
56
- onClick: h((j) => C(c), ["stop"])
57
- }, [
58
- c ? (t(), l("span", $, r(c.name || c), 1)) : u("", !0)
59
- ], 8, V))), 256))
60
- ], 2)) : u("", !0)
61
- ]),
62
- _: 1
63
- })
64
- ], 10, N),
65
- k(b, {
66
- mode: "out-in",
67
- name: "fade"
68
- }, {
69
- default: g(() => [
70
- s.validation ? (t(), l("div", z, " * " + r(s.validation.message), 1)) : u("", !0)
71
- ]),
72
- _: 1
73
- })
74
- ], 64);
75
- };
76
- }
77
- }, I = /* @__PURE__ */ M(E, [["__scopeId", "data-v-dfe03dc2"]]);
1
+ const e = "";
78
2
  export {
79
- I as default
3
+ e as default
80
4
  };
@@ -1 +1 @@
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("./Select.vue.cjs");const p=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),k=["onClick"],v={key:0,class:"t-transp mn-r-small"},f={class:"w-100"},h=["onClick"],g={key:0,class:"w-100"},B={key:0,class:"mn-t-thin invalid-feedback"},_={__name:"Select",props:{label:String,select:[String,Object],placeholder:{type:String,default:"Please select an item"},options:{type:Array,default:()=>[]},validation:Boolean},emits:["update:select","focus","blur"],setup(l,{emit:u}){const c=u,o=l,n=e.ref(o.select),a=e.ref(!1);e.watch(()=>o.select,t=>{n.value=t});const d=e.computed(()=>o.select?o.options.filter(t=>t!==o.select):o.options),r=()=>{a.value=!a.value,c(a.value?"focus":"blur")},m=t=>{n.value=t,r(),c("update:select",n.value)};return(t,C)=>{var i;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{onClick:e.withModifiers(r,["stop"]),class:e.normalizeClass([t.$attrs.class,"cursor-pointer flex-nowrap flex"])},[l.label?(e.openBlock(),e.createElementBlock("div",v,[e.createElementVNode("span",null,e.toDisplayString(l.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("li",f,[e.createElementVNode("span",null,e.toDisplayString(((i=n.value)==null?void 0:i.name)||n.value||l.placeholder),1)]),e.createVNode(e.Transition,{mode:"out-in",name:"TransitionTranslateY"},{default:e.withCtx(()=>[a.value?(e.openBlock(),e.createElementBlock("ul",{key:0,class:e.normalizeClass([t.$attrs.class,"pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,s=>(e.openBlock(),e.createElementBlock("li",{onClick:e.withModifiers(E=>m(s),["stop"])},[s?(e.openBlock(),e.createElementBlock("span",g,e.toDisplayString(s.name||s),1)):e.createCommentVNode("",!0)],8,h))),256))],2)):e.createCommentVNode("",!0)]),_:1})],10,k),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[l.validation?(e.openBlock(),e.createElementBlock("div",B," * "+e.toDisplayString(l.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64)}}},y=p.default(_,[["__scopeId","data-v-dfe03dc2"]]);exports.default=y;
@@ -1,4 +1,80 @@
1
- const e = "";
1
+ import { ref as f, watch as S, computed as x, openBlock as t, createElementBlock as l, Fragment as v, createElementVNode as i, withModifiers as h, normalizeClass as _, toDisplayString as r, createCommentVNode as u, createVNode as k, Transition as b, withCtx as g, renderList as B } from "vue";
2
+ import "./Select.vue.js";
3
+ import M from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const N = ["onClick"], O = {
5
+ key: 0,
6
+ class: "t-transp mn-r-small"
7
+ }, T = { class: "w-100" }, V = ["onClick"], $ = {
8
+ key: 0,
9
+ class: "w-100"
10
+ }, z = {
11
+ key: 0,
12
+ class: "mn-t-thin invalid-feedback"
13
+ }, E = {
14
+ __name: "Select",
15
+ props: {
16
+ label: String,
17
+ select: [String, Object],
18
+ placeholder: { type: String, default: "Please select an item" },
19
+ options: { type: Array, default: () => [] },
20
+ validation: Boolean
21
+ },
22
+ emits: ["update:select", "focus", "blur"],
23
+ setup(s, { emit: w }) {
24
+ const d = w, a = s, n = f(a.select), o = f(!1);
25
+ S(() => a.select, (e) => {
26
+ n.value = e;
27
+ });
28
+ const y = x(() => a.select ? a.options.filter((e) => e !== a.select) : a.options), m = () => {
29
+ o.value = !o.value, d(o.value ? "focus" : "blur");
30
+ }, C = (e) => {
31
+ n.value = e, m(), d("update:select", n.value);
32
+ };
33
+ return (e, L) => {
34
+ var p;
35
+ return t(), l(v, null, [
36
+ i("div", {
37
+ onClick: h(m, ["stop"]),
38
+ class: _([e.$attrs.class, "cursor-pointer flex-nowrap flex"])
39
+ }, [
40
+ s.label ? (t(), l("div", O, [
41
+ i("span", null, r(s.label), 1)
42
+ ])) : u("", !0),
43
+ i("li", T, [
44
+ i("span", null, r(((p = n.value) == null ? void 0 : p.name) || n.value || s.placeholder), 1)
45
+ ]),
46
+ k(b, {
47
+ mode: "out-in",
48
+ name: "TransitionTranslateY"
49
+ }, {
50
+ default: g(() => [
51
+ o.value ? (t(), l("ul", {
52
+ key: 0,
53
+ class: _([e.$attrs.class, "pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"])
54
+ }, [
55
+ (t(!0), l(v, null, B(y.value, (c) => (t(), l("li", {
56
+ onClick: h((j) => C(c), ["stop"])
57
+ }, [
58
+ c ? (t(), l("span", $, r(c.name || c), 1)) : u("", !0)
59
+ ], 8, V))), 256))
60
+ ], 2)) : u("", !0)
61
+ ]),
62
+ _: 1
63
+ })
64
+ ], 10, N),
65
+ k(b, {
66
+ mode: "out-in",
67
+ name: "fade"
68
+ }, {
69
+ default: g(() => [
70
+ s.validation ? (t(), l("div", z, " * " + r(s.validation.message), 1)) : u("", !0)
71
+ ]),
72
+ _: 1
73
+ })
74
+ ], 64);
75
+ };
76
+ }
77
+ }, I = /* @__PURE__ */ M(E, [["__scopeId", "data-v-dfe03dc2"]]);
2
78
  export {
3
- e as default
79
+ I as default
4
80
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Button/Button.vue2.cjs");require("../../../../../../node_modules/vue3-carousel/dist/carousel.css.cjs");require("vue-i18n");require("../../../../../../node_modules/vue3-carousel/dist/carousel.es.cjs");require("../sections/SliderFeatures.vue2.cjs");const r=require("vue-router");require("../../store/auth.cjs");require("../../../middlewares/client/inputs.validation.cjs");const u={class:"cols-2-1_2 gap-small pd-small bg-white"},n=e.createElementVNode("section",{class:"w-100 desktop-only o-hidden radius-big bg-grad-main"},null,-1),s={__name:"Auth",setup(a){return e.ref(null),e.ref(null),e.ref(null),r.useRoute(),r.useRouter(),e.ref("email"),(o,c)=>{const t=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",u,[e.createVNode(t,{class:"pd-medium br-solid br-1px br-grey radius-big w-m-66r t-center"},{default:e.withCtx(({Component:i,route:l})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i),{ref:"page",key:l.path,localPosition:o.localPosition},null,8,["localPosition"]))]),_:2},1024)]),_:1}),n])}}};exports.default=s;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../../../node_modules/vue3-carousel/dist/carousel.css.cjs");require("vue-i18n");require("../../../../../../node_modules/vue3-carousel/dist/carousel.es.cjs");require("../sections/SliderFeatures.vue2.cjs");const r=require("vue-router");require("../../store/auth.cjs");require("../../../middlewares/client/inputs.validation.cjs");const u={class:"cols-2-1_2 gap-small pd-small bg-white"},n=e.createElementVNode("section",{class:"w-100 desktop-only o-hidden radius-big bg-grad-main"},null,-1),s={__name:"Auth",setup(a){return e.ref(null),e.ref(null),e.ref(null),r.useRoute(),r.useRouter(),e.ref("email"),(o,c)=>{const t=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",u,[e.createVNode(t,{class:"pd-medium br-solid br-1px br-grey radius-big w-m-66r t-center"},{default:e.withCtx(({Component:i,route:l})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i),{ref:"page",key:l.path,localPosition:o.localPosition},null,8,["localPosition"]))]),_:2},1024)]),_:1}),n])}}};exports.default=s;
@@ -1,7 +1,7 @@
1
1
  import { ref as e, resolveComponent as a, openBlock as o, createElementBlock as m, createVNode as t, withCtx as r, Transition as c, createBlock as p, resolveDynamicComponent as u, createElementVNode as d } from "vue";
2
2
  import "../../../../components/Tab/Tab.vue.js";
3
3
  import "../../../../components/Field/Field.vue.js";
4
- import "../../../../components/Button/Button.vue2.js";
4
+ import "../../../../components/Button/Button.vue.js";
5
5
  import "../../../../../../node_modules/vue3-carousel/dist/carousel.css.js";
6
6
  import "vue-i18n";
7
7
  import "../../../../../../node_modules/vue3-carousel/dist/carousel.es.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.vue2.cjs"),f=require("../../../../components/Button/Button.vue.cjs"),d=require("vue-router"),h=require("vue-i18n"),t=require("../../store/auth.cjs"),i=require("../../../middlewares/client/inputs.validation.cjs"),w=require("../../localization/EnterPassword.json.cjs");require("./EnterPassword.vue2.cjs");const y={class:"t-left pd-medium"},_={class:"mn-b-small"},g={key:0,class:"mn-b-semi t-transp"},k={key:1,class:"mn-b-semi t-transp"},q={class:"mn-b-semi radius-small o-hidden"},b={key:2,class:"p-medium t-semi mn-b-semi"},B=e.createElementVNode("a",{class:"t-second",href:"https://thecommunephuket.com/legal/eula",target:"_blank",rel:"noopener noreferrer"},"End User License Agreement (EULA)",-1),E={key:0},P={key:1},v={__name:"EnterPassword",setup(V){const n=e.ref(null),{t:s}=h.useI18n(w.default),r=d.useRoute(),u=d.useRouter();e.ref("phone");async function c(){try{await i.validateInputs(n,i.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}r.query.method==="reset-password"&&await t.actions.updatePassword(t.state.user,r.query.type),r.query.method!=="reset-password"&&await t.actions.signup(t.state.user,r.query.type)}function p(){u.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(m,o)=>(e.openBlock(),e.createElementBlock("section",y,[e.createElementVNode("h3",_,e.toDisplayString(e.unref(s)("almostDone")),1),e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("p",g,e.toDisplayString(e.unref(s)("newPasswordPrompt")),1)):(e.openBlock(),e.createElementBlock("p",k,e.toDisplayString(e.unref(s)("registrationPasswordPrompt")),1)),e.createElementVNode("div",q,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":o[0]||(o[0]=a=>t.state.user.password=a),type:"password",validation:n.value,placeholder:e.unref(s)("passwordPlaceholder"),class:"bg-grey pd-small radius-small mn-b-thin"},null,8,["field","validation","placeholder"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":o[1]||(o[1]=a=>t.state.user.passwordRepeat=a),type:"password",placeholder:e.unref(s)("repeatPasswordPlaceholder"),class:"bg-grey pd-small radius-small mn-b-thin"},null,8,["field","placeholder"])]),e.unref(r).query.method!=="reset-password"?(e.openBlock(),e.createElementBlock("div",b,[e.createTextVNode(" By registering, you agree to our "),B])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:c,callback:p,class:"mn-b-big"},{default:e.withCtx(()=>[e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",E,e.toDisplayString(e.unref(s)("changePasswordBtn")),1)):(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(e.unref(s)("registerBtn")),1))]),_:1})]))}};exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.vue2.cjs"),f=require("../../../../components/Button/Button.vue2.cjs"),d=require("vue-router"),h=require("vue-i18n"),t=require("../../store/auth.cjs"),i=require("../../../middlewares/client/inputs.validation.cjs"),w=require("../../localization/EnterPassword.json.cjs");require("./EnterPassword.vue2.cjs");const y={class:"t-left pd-medium"},_={class:"mn-b-small"},g={key:0,class:"mn-b-semi t-transp"},k={key:1,class:"mn-b-semi t-transp"},q={class:"mn-b-semi radius-small o-hidden"},b={key:2,class:"p-medium t-semi mn-b-semi"},B=e.createElementVNode("a",{class:"t-second",href:"https://thecommunephuket.com/legal/eula",target:"_blank",rel:"noopener noreferrer"},"End User License Agreement (EULA)",-1),E={key:0},P={key:1},v={__name:"EnterPassword",setup(V){const n=e.ref(null),{t:s}=h.useI18n(w.default),r=d.useRoute(),u=d.useRouter();e.ref("phone");async function c(){try{await i.validateInputs(n,i.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}r.query.method==="reset-password"&&await t.actions.updatePassword(t.state.user,r.query.type),r.query.method!=="reset-password"&&await t.actions.signup(t.state.user,r.query.type)}function p(){u.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(m,o)=>(e.openBlock(),e.createElementBlock("section",y,[e.createElementVNode("h3",_,e.toDisplayString(e.unref(s)("almostDone")),1),e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("p",g,e.toDisplayString(e.unref(s)("newPasswordPrompt")),1)):(e.openBlock(),e.createElementBlock("p",k,e.toDisplayString(e.unref(s)("registrationPasswordPrompt")),1)),e.createElementVNode("div",q,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":o[0]||(o[0]=a=>t.state.user.password=a),type:"password",validation:n.value,placeholder:e.unref(s)("passwordPlaceholder"),class:"bg-grey pd-small radius-small mn-b-thin"},null,8,["field","validation","placeholder"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":o[1]||(o[1]=a=>t.state.user.passwordRepeat=a),type:"password",placeholder:e.unref(s)("repeatPasswordPlaceholder"),class:"bg-grey pd-small radius-small mn-b-thin"},null,8,["field","placeholder"])]),e.unref(r).query.method!=="reset-password"?(e.openBlock(),e.createElementBlock("div",b,[e.createTextVNode(" By registering, you agree to our "),B])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:c,callback:p,class:"mn-b-big"},{default:e.withCtx(()=>[e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",E,e.toDisplayString(e.unref(s)("changePasswordBtn")),1)):(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(e.unref(s)("registerBtn")),1))]),_:1})]))}};exports.default=v;
@@ -1,7 +1,7 @@
1
1
  import { ref as u, openBlock as o, createElementBlock as a, createElementVNode as m, toDisplayString as d, unref as e, createVNode as l, createTextVNode as g, createCommentVNode as b, withCtx as P } from "vue";
2
2
  import "../../../../components/Tab/Tab.vue.js";
3
3
  import c from "../../../../components/Field/Field.vue2.js";
4
- import k from "../../../../components/Button/Button.vue.js";
4
+ import k from "../../../../components/Button/Button.vue2.js";
5
5
  import { useRoute as q, useRouter as v } from "vue-router";
6
6
  import { useI18n as E } from "vue-i18n";
7
7
  import { state as s, actions as h } from "../../store/auth.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.vue2.cjs"),w=require("../../../../components/Button/Button.vue.cjs"),d=require("vue-router"),t=require("../../store/auth.cjs"),u=require("../../store/invites.cjs"),c=require("../../../middlewares/client/inputs.validation.cjs");require("./Invite.vue2.cjs");const f={class:"t-left pd-medium"},h=e.createElementVNode("h3",{class:"mn-b-small"},"Вы были пригилашены в организацию",-1),v=e.createElementVNode("p",{class:"mn-b-semi t-transp"},"Пожалуйста, укажите пароль, на этом регистрация будет закочена.",-1),y={class:"mn-b-semi radius-small o-hidden"},q={key:0},k={key:1},B={__name:"Invite",async setup(E){let r,n;const i=e.ref(null),s=d.useRoute(),p=d.useRouter();[r,n]=e.withAsyncContext(()=>u.actions.readOne(s.query.inviteCode)),await r,n();async function m(){try{await c.validateInputs(i,c.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}await t.actions.signup(t.state.user,s.query.type,s.query.inviteCode)}function _(){p.push({name:"Dashboard"})}return(b,a)=>(e.openBlock(),e.createElementBlock("section",f,[h,v,e.createElementVNode("div",y,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":a[0]||(a[0]=o=>t.state.user.password=o),type:"password",validation:i.value,label:"Пароль",placeholder:"******",class:"bg-white radius-small mn-b-small"},null,8,["field","validation"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":a[1]||(a[1]=o=>t.state.user.passwordRepeat=o),type:"password",label:"Повторите пароль",placeholder:"******",class:"bg-white radius-small mn-b-semi"},null,8,["field"])]),e.createVNode(w.default,{disabled:u.state.invite===null,submit:m,callback:_,class:"mn-b-big"},{default:e.withCtx(()=>[e.unref(s).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",q,"Поменять пароль")):(e.openBlock(),e.createElementBlock("span",k,"Зарегистрироваться"))]),_:1},8,["disabled"])]))}};exports.default=B;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.vue2.cjs"),w=require("../../../../components/Button/Button.vue2.cjs"),d=require("vue-router"),t=require("../../store/auth.cjs"),u=require("../../store/invites.cjs"),c=require("../../../middlewares/client/inputs.validation.cjs");require("./Invite.vue2.cjs");const f={class:"t-left pd-medium"},h=e.createElementVNode("h3",{class:"mn-b-small"},"Вы были пригилашены в организацию",-1),v=e.createElementVNode("p",{class:"mn-b-semi t-transp"},"Пожалуйста, укажите пароль, на этом регистрация будет закочена.",-1),y={class:"mn-b-semi radius-small o-hidden"},q={key:0},k={key:1},B={__name:"Invite",async setup(E){let r,n;const i=e.ref(null),s=d.useRoute(),p=d.useRouter();[r,n]=e.withAsyncContext(()=>u.actions.readOne(s.query.inviteCode)),await r,n();async function m(){try{await c.validateInputs(i,c.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}await t.actions.signup(t.state.user,s.query.type,s.query.inviteCode)}function _(){p.push({name:"Dashboard"})}return(b,a)=>(e.openBlock(),e.createElementBlock("section",f,[h,v,e.createElementVNode("div",y,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":a[0]||(a[0]=o=>t.state.user.password=o),type:"password",validation:i.value,label:"Пароль",placeholder:"******",class:"bg-white radius-small mn-b-small"},null,8,["field","validation"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":a[1]||(a[1]=o=>t.state.user.passwordRepeat=o),type:"password",label:"Повторите пароль",placeholder:"******",class:"bg-white radius-small mn-b-semi"},null,8,["field"])]),e.createVNode(w.default,{disabled:u.state.invite===null,submit:m,callback:_,class:"mn-b-big"},{default:e.withCtx(()=>[e.unref(s).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",q,"Поменять пароль")):(e.openBlock(),e.createElementBlock("span",k,"Зарегистрироваться"))]),_:1},8,["disabled"])]))}};exports.default=B;
@@ -1,7 +1,7 @@
1
1
  import { ref as w, withAsyncContext as b, openBlock as o, createElementBlock as r, createElementVNode as n, createVNode as i, withCtx as h, unref as y } from "vue";
2
2
  import "../../../../components/Tab/Tab.vue.js";
3
3
  import p from "../../../../components/Field/Field.vue2.js";
4
- import v from "../../../../components/Button/Button.vue.js";
4
+ import v from "../../../../components/Button/Button.vue2.js";
5
5
  import { useRoute as k, useRouter as g } from "vue-router";
6
6
  import { state as e, actions as q } from "../../store/auth.js";
7
7
  import { actions as x, state as C } from "../../store/invites.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),v=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),_=require("../../../../components/Button/Button.vue.cjs"),u=require("vue-router"),b=require("vue-i18n"),w=require("../../localization/ResetPassword.json.cjs"),s=require("../../store/auth.cjs");require("../../store/twofa.cjs");const n=require("../../../middlewares/client/inputs.validation.cjs");require("./ResetPassword.vue2.cjs");const V={class:"t-left pd-medium"},g={class:"mn-b-small"},y={class:"mn-b-small t-transp"},N={class:"mn-b-small p-small uppercase t-semi bg-grey radius-big o-hidden"},q={class:"pos-relative"},E={key:0,class:"mn-b-semi radius-small o-hidden"},k={class:"mn-b-small t-transp"},C={key:0,class:"mn-b-semi radius-small o-hidden"},P={class:"mn-b-small t-transp"},S={__name:"ResetPassword",setup(I){const{t}=b.useI18n(w.default),i=e.ref(null),d=e.ref(null);u.useRoute();const c=u.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await n.validateInputs(i,n.validatePhone,s.state.user.phone,"Некорректный телефон"),a.value==="email"&&await n.validateInputs(d,n.validateEmail,s.state.user.email,"Некорректный email")}catch{throw new Error}try{await s.actions.resetPassword(s.state.user,a.value,"reset-password")}catch(r){throw console.log(r),new Error}}function p(){c.push({name:"Enter Code",query:{type:a.value,method:"reset-password"}})}return(r,o)=>(e.openBlock(),e.createElementBlock("section",V,[e.createElementVNode("h3",g,e.toDisplayString(e.unref(t)("forgotPasswordTitle")),1),e.createElementVNode("p",y,e.toDisplayString(e.unref(t)("instructions")),1),e.createElementVNode("div",N,[e.createVNode(h.default,{selected:a.value,"onUpdate:selected":o[0]||(o[0]=l=>a.value=l),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(()=>[a.value==="phone"?(e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("p",k,e.toDisplayString(e.unref(t)("smsInfo")),1),e.createVNode(v.default,{modelValue:s.state.user.phone,"onUpdate:modelValue":o[1]||(o[1]=l=>s.state.user.phone=l),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-b-thin"},null,8,["modelValue","validation","inputOptions"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="email"?(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("p",P,e.toDisplayString(e.unref(t)("emailInfo")),1),e.createVNode(f.default,{field:s.state.user.email,"onUpdate:field":o[2]||(o[2]=l=>s.state.user.email=l),placeholder:e.unref(t)("emailPlaceholder"),validation:d.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])])):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(_.default,{submit:m,callback:p,class:"mn-b-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1})]))}};exports.default=S;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),v=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),_=require("../../../../components/Button/Button.vue2.cjs"),u=require("vue-router"),b=require("vue-i18n"),w=require("../../localization/ResetPassword.json.cjs"),s=require("../../store/auth.cjs");require("../../store/twofa.cjs");const n=require("../../../middlewares/client/inputs.validation.cjs");require("./ResetPassword.vue2.cjs");const V={class:"t-left pd-medium"},g={class:"mn-b-small"},y={class:"mn-b-small t-transp"},N={class:"mn-b-small p-small uppercase t-semi bg-grey radius-big o-hidden"},q={class:"pos-relative"},E={key:0,class:"mn-b-semi radius-small o-hidden"},k={class:"mn-b-small t-transp"},C={key:0,class:"mn-b-semi radius-small o-hidden"},P={class:"mn-b-small t-transp"},S={__name:"ResetPassword",setup(I){const{t}=b.useI18n(w.default),i=e.ref(null),d=e.ref(null);u.useRoute();const c=u.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await n.validateInputs(i,n.validatePhone,s.state.user.phone,"Некорректный телефон"),a.value==="email"&&await n.validateInputs(d,n.validateEmail,s.state.user.email,"Некорректный email")}catch{throw new Error}try{await s.actions.resetPassword(s.state.user,a.value,"reset-password")}catch(r){throw console.log(r),new Error}}function p(){c.push({name:"Enter Code",query:{type:a.value,method:"reset-password"}})}return(r,o)=>(e.openBlock(),e.createElementBlock("section",V,[e.createElementVNode("h3",g,e.toDisplayString(e.unref(t)("forgotPasswordTitle")),1),e.createElementVNode("p",y,e.toDisplayString(e.unref(t)("instructions")),1),e.createElementVNode("div",N,[e.createVNode(h.default,{selected:a.value,"onUpdate:selected":o[0]||(o[0]=l=>a.value=l),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(()=>[a.value==="phone"?(e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("p",k,e.toDisplayString(e.unref(t)("smsInfo")),1),e.createVNode(v.default,{modelValue:s.state.user.phone,"onUpdate:modelValue":o[1]||(o[1]=l=>s.state.user.phone=l),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-b-thin"},null,8,["modelValue","validation","inputOptions"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="email"?(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("p",P,e.toDisplayString(e.unref(t)("emailInfo")),1),e.createVNode(f.default,{field:s.state.user.email,"onUpdate:field":o[2]||(o[2]=l=>s.state.user.email=l),placeholder:e.unref(t)("emailPlaceholder"),validation:d.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])])):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(_.default,{submit:m,callback:p,class:"mn-b-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1})]))}};exports.default=S;
@@ -2,7 +2,7 @@ import { ref as m, openBlock as u, createElementBlock as p, createElementVNode a
2
2
  import P from "../../../../components/Tab/Tab.vue2.js";
3
3
  import C from "../../../../components/Field/Field.vue2.js";
4
4
  import E from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import I from "../../../../components/Button/Button.vue.js";
5
+ import I from "../../../../components/Button/Button.vue2.js";
6
6
  import { useRoute as k, useRouter as x } from "vue-router";
7
7
  import { useI18n as N } from "vue-i18n";
8
8
  import T from "../../localization/ResetPassword.json.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("../../../../components/Tab/Tab.vue2.cjs"),c=require("../../../../components/Field/Field.vue2.cjs"),g=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),V=require("../../../../components/Button/Button.vue.cjs"),p=require("vue-router"),w=require("vue-i18n"),N=require("../../localization/SignIn.json.cjs"),a=require("../../store/auth.cjs"),r=require("../../../middlewares/client/inputs.validation.cjs");require("./SignIn.vue2.cjs");const y={class:""},S=["src"],E={class:"mn-b-medium"},q=e.createElementVNode("br",null,null,-1),x={class:"t-semi"},C={class:"mn-b-big"},D={class:"mn-b-small p-small uppercase t-semi bg-grey radius-big o-hidden"},P={class:"pos-relative"},T={class:"mn-b-thin radius-small"},I={class:"mn-b-thin radius-small o-hidden"},U={class:"w-100 mn-b-big"},k={__name:"SignIn",setup(j){const d=e.ref(null),m=e.ref(null),u=e.ref(null);p.useRoute();const h=p.useRouter(),{t:l}=w.useI18n(N.default),n=e.ref("phone"),f=o=>new Promise((s,i)=>{const t=document.createElement("script");t.type="text/javascript",t.src=o,t.onload=s,t.onerror=i,document.head.appendChild(t)});e.onMounted(async()=>{await f("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js")});async function v(){try{n.value==="phone"&&await r.validateInputs(d,r.validatePhone,a.state.user.phone,"Некорректный телефон"),n.value==="email"&&await r.validateInputs(u,r.validateEmail,a.state.user.email,"Некорректный email")}catch{throw new Error}const o={...a.state.user};o.phone=a.state.user.phone.number,await a.actions.login(o,n.value)}function _(){h.push({name:"User Profile",params:{_id:a.state.user._id},query:{afterAuth:"true"}})}return(o,s)=>{const i=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",y,[e.createElementVNode("img",{src:"/logo/logo_square.svg",class:"i-extra radius-small mn-b-small"},null,8,S),e.createElementVNode("h3",E,[e.createTextVNode(e.toDisplayString(e.unref(l)("title"))+" ",1),q,e.createElementVNode("span",x,e.toDisplayString(e.unref(l)("subtitle")),1)]),e.createElementVNode("p",C,[e.createVNode(i,{to:{name:"Sign Up"},class:"underline t-second"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signup")),1)]),_:1})]),e.createElementVNode("div",D,[e.createVNode(b.default,{selected:n.value,"onUpdate:selected":s[0]||(s[0]=t=>n.value=t),tabs:[{name:e.unref(l)("phone"),value:"phone"},{name:e.unref(l)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",P,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",T,[e.createVNode(g.default,{modelValue:a.state.user.phone,"onUpdate:modelValue":s[1]||(s[1]=t=>a.state.user.phone=t),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:d.value,mode:"national",inputOptions:{placeholder:e.unref(l)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-b-thin"},null,8,["modelValue","validation","inputOptions"])],512),[[e.vShow,n.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",I,[e.createVNode(c.default,{field:a.state.user.email,"onUpdate:field":s[2]||(s[2]=t=>a.state.user.email=t),placeholder:e.unref(l)("emailPlaceholder"),validation:u.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,n.value==="email"]])]),_:1})]),e.createVNode(c.default,{field:a.state.user.password,"onUpdate:field":s[3]||(s[3]=t=>a.state.user.password=t),type:"password",validation:m.value,placeholder:e.unref(l)("passwordPlaceholder"),class:"bg-grey pd-medium radius-small mn-b-semi"},null,8,["field","validation","placeholder"]),e.createElementVNode("div",U,[e.createVNode(i,{to:"/auth/reset-password",class:"underline d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("forgotPassword")),1)]),_:1})]),e.createVNode(V.default,{submit:v,callback:_,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signin")),1)]),_:1})])}}};exports.default=k;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("../../../../components/Tab/Tab.vue2.cjs"),c=require("../../../../components/Field/Field.vue2.cjs"),g=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),V=require("../../../../components/Button/Button.vue2.cjs"),p=require("vue-router"),w=require("vue-i18n"),N=require("../../localization/SignIn.json.cjs"),a=require("../../store/auth.cjs"),r=require("../../../middlewares/client/inputs.validation.cjs");require("./SignIn.vue2.cjs");const y={class:""},S=["src"],E={class:"mn-b-medium"},q=e.createElementVNode("br",null,null,-1),x={class:"t-semi"},C={class:"mn-b-big"},D={class:"mn-b-small p-small uppercase t-semi bg-grey radius-big o-hidden"},P={class:"pos-relative"},T={class:"mn-b-thin radius-small"},I={class:"mn-b-thin radius-small o-hidden"},U={class:"w-100 mn-b-big"},k={__name:"SignIn",setup(j){const d=e.ref(null),m=e.ref(null),u=e.ref(null);p.useRoute();const h=p.useRouter(),{t:l}=w.useI18n(N.default),n=e.ref("phone"),f=o=>new Promise((s,i)=>{const t=document.createElement("script");t.type="text/javascript",t.src=o,t.onload=s,t.onerror=i,document.head.appendChild(t)});e.onMounted(async()=>{await f("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js")});async function v(){try{n.value==="phone"&&await r.validateInputs(d,r.validatePhone,a.state.user.phone,"Некорректный телефон"),n.value==="email"&&await r.validateInputs(u,r.validateEmail,a.state.user.email,"Некорректный email")}catch{throw new Error}const o={...a.state.user};o.phone=a.state.user.phone.number,await a.actions.login(o,n.value)}function _(){h.push({name:"User Profile",params:{_id:a.state.user._id},query:{afterAuth:"true"}})}return(o,s)=>{const i=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",y,[e.createElementVNode("img",{src:"/logo/logo_square.svg",class:"i-extra radius-small mn-b-small"},null,8,S),e.createElementVNode("h3",E,[e.createTextVNode(e.toDisplayString(e.unref(l)("title"))+" ",1),q,e.createElementVNode("span",x,e.toDisplayString(e.unref(l)("subtitle")),1)]),e.createElementVNode("p",C,[e.createVNode(i,{to:{name:"Sign Up"},class:"underline t-second"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signup")),1)]),_:1})]),e.createElementVNode("div",D,[e.createVNode(b.default,{selected:n.value,"onUpdate:selected":s[0]||(s[0]=t=>n.value=t),tabs:[{name:e.unref(l)("phone"),value:"phone"},{name:e.unref(l)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",P,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",T,[e.createVNode(g.default,{modelValue:a.state.user.phone,"onUpdate:modelValue":s[1]||(s[1]=t=>a.state.user.phone=t),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:d.value,mode:"national",inputOptions:{placeholder:e.unref(l)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-b-thin"},null,8,["modelValue","validation","inputOptions"])],512),[[e.vShow,n.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",I,[e.createVNode(c.default,{field:a.state.user.email,"onUpdate:field":s[2]||(s[2]=t=>a.state.user.email=t),placeholder:e.unref(l)("emailPlaceholder"),validation:u.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,n.value==="email"]])]),_:1})]),e.createVNode(c.default,{field:a.state.user.password,"onUpdate:field":s[3]||(s[3]=t=>a.state.user.password=t),type:"password",validation:m.value,placeholder:e.unref(l)("passwordPlaceholder"),class:"bg-grey pd-medium radius-small mn-b-semi"},null,8,["field","validation","placeholder"]),e.createElementVNode("div",U,[e.createVNode(i,{to:"/auth/reset-password",class:"underline d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("forgotPassword")),1)]),_:1})]),e.createVNode(V.default,{submit:v,callback:_,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signin")),1)]),_:1})])}}};exports.default=k;
@@ -2,7 +2,7 @@ import { ref as p, onMounted as U, resolveComponent as k, openBlock as C, create
2
2
  import I from "../../../../components/Tab/Tab.vue2.js";
3
3
  import g from "../../../../components/Field/Field.vue2.js";
4
4
  import D from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import j from "../../../../components/Button/Button.vue.js";
5
+ import j from "../../../../components/Button/Button.vue2.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";
@@ -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"),b=require("../../../../components/Button/Button.vue.cjs"),u=require("vue-router"),V=require("vue-i18n"),g=require("../../localization/SignUp.json.cjs"),n=require("../../store/auth.cjs"),w=require("../../store/twofa.cjs"),s=require("../../../middlewares/client/inputs.validation.cjs");require("./SignUp.vue2.cjs");const N={class:"t-left pd-medium"},E={class:"mn-b-small"},S={class:"mn-b-small t-transp"},y={class:"mn-b-small p-small uppercase t-semi bg-grey radius-big o-hidden"},q={class:"pos-relative"},C={class:"mn-b-semi radius-small"},D={class:"mn-b-small t-transp"},x={class:"mn-b-semi radius-small o-hidden"},T={class:"mn-b-small t-transp"},k={class:"w-100"},I={__name:"SignUp",setup(P){const{t}=V.useI18n(g.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 w.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",N,[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-b-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(b.default,{submit:m,callback:p,class:"mn-b-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-b-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"),b=require("../../../../components/Button/Button.vue2.cjs"),u=require("vue-router"),V=require("vue-i18n"),g=require("../../localization/SignUp.json.cjs"),n=require("../../store/auth.cjs"),w=require("../../store/twofa.cjs"),s=require("../../../middlewares/client/inputs.validation.cjs");require("./SignUp.vue2.cjs");const N={class:"t-left pd-medium"},E={class:"mn-b-small"},S={class:"mn-b-small t-transp"},y={class:"mn-b-small p-small uppercase t-semi bg-grey radius-big o-hidden"},q={class:"pos-relative"},C={class:"mn-b-semi radius-small"},D={class:"mn-b-small t-transp"},x={class:"mn-b-semi radius-small o-hidden"},T={class:"mn-b-small t-transp"},k={class:"w-100"},I={__name:"SignUp",setup(P){const{t}=V.useI18n(g.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 w.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",N,[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-b-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(b.default,{submit:m,callback:p,class:"mn-b-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-b-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.vue.js";
5
+ import D from "../../../../components/Button/Button.vue2.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.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-b-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-b-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.vue2.cjs"),a=require("../../store/blogposts.cjs"),c=require("../../../auth/store/auth.cjs"),m={class:"min-h-100vh pd-thin"},d={class:"mn-b-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-b-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.vue.js";
3
+ import b from "../../../../components/Select/Select.vue2.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-b-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-b-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.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-b-small"},"Final Touches",-1),M=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),S={key:0,class:"mn-b-thin"},U={key:1,class:"mn-b-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.error(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(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-b-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.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-b-small"},"Final Touches",-1),M=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),S={key:0,class:"mn-b-thin"},U={key:1,class:"mn-b-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.error(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(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-b-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.vue.js";
2
+ import D from "../../../constructor/components/elements/Textarea.vue2.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.vue.js";
10
+ import L from "../../../../components/Button/Button.vue2.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 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../../../../node_modules/axios/lib/axios.cjs"),c=require("vue"),n=require("../../globals/store/globals.cjs"),i=u.default.create({baseURL:process.env.API_URL,withCredentials:!0}),o=c.reactive({reactions:[],error:null}),d={async read({user:r,type:e,target:a,role:t}){try{const s=await i.get("/api/reactions",{params:{user:r,type:e,target:a,role:t}});return o.error=null,o.reactions=s.data,Promise.resolve(s.data)}catch(s){return n.setError(s),Promise.reject(s)}},async create(r){try{const e=await i.post("/api/reactions/create",r);return o.error=null,Promise.resolve(e.data)}catch(e){return console.log(e),n.setError(e),Promise.reject(e)}},async update(r){try{const e=await i.post("/api/reactions/update",r);return o.error=null,Promise.resolve(e.data)}catch(e){return n.setError(e),Promise.reject(e)}},async delete(r){try{const e=await i.post("/api/reactions/delete",r);return o.error=null,Promise.resolve(e.data)}catch(e){return n.setError(e),Promise.reject(e)}}},p={handleReactionUpdate(r,e,a){let t;if(Array.isArray(r)?t=r.find(s=>s._id===e.target):typeof r=="object"&&r._id===e.target&&(t=r),t)if(t.hasReaction=a,a)t.reactions.push(e),t.numberOfReactions+=1;else{const s=t.reactions.findIndex(l=>l._id===e._id);s!==-1&&(t.reactions.splice(s,1),t.numberOfReactions-=1)}}};c.watch(o,r=>{});exports.actions=d;exports.mutations=p;exports.state=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../../../../node_modules/axios/lib/axios.cjs"),c=require("vue"),n=require("../../globals/store/globals.cjs"),i=u.default.create({baseURL:process.env.API_URL,withCredentials:!0}),o=c.reactive({reactions:[],error:null}),d={async read({user:r,type:e,target:a,targetString:t}){try{const s=await i.get("/api/reactions/read",{params:{user:r,type:e,target:a,targetString:t}});return o.error=null,o.reactions=s.data,Promise.resolve(s.data)}catch(s){return n.setError(s),Promise.reject(s)}},async create(r){try{const e=await i.post("/api/reactions/create",r);return o.error=null,Promise.resolve(e.data)}catch(e){return console.log(e),n.setError(e),Promise.reject(e)}},async update(r){try{const e=await i.post("/api/reactions/update",r);return o.error=null,Promise.resolve(e.data)}catch(e){return n.setError(e),Promise.reject(e)}},async delete(r){try{const e=await i.post("/api/reactions/delete",r);return o.error=null,Promise.resolve(e.data)}catch(e){return n.setError(e),Promise.reject(e)}}},p={handleReactionUpdate(r,e,a){let t;if(Array.isArray(r)?t=r.find(s=>s._id===e.target):typeof r=="object"&&r._id===e.target&&(t=r),t)if(t.hasReaction=a,a)t.reactions.push(e),t.numberOfReactions+=1;else{const s=t.reactions.findIndex(l=>l._id===e._id);s!==-1&&(t.reactions.splice(s,1),t.numberOfReactions-=1)}}};c.watch(o,r=>{});exports.actions=d;exports.mutations=p;exports.state=o;
@@ -8,9 +8,9 @@ const i = l.create({
8
8
  reactions: [],
9
9
  error: null
10
10
  }), y = {
11
- async read({ user: r, type: e, target: a, role: t }) {
11
+ async read({ user: r, type: e, target: a, targetString: t }) {
12
12
  try {
13
- const o = await i.get("/api/reactions", { params: { user: r, type: e, target: a, role: t } });
13
+ const o = await i.get("/api/reactions/read", { params: { user: r, type: e, target: a, targetString: t } });
14
14
  return s.error = null, s.reactions = o.data, Promise.resolve(o.data);
15
15
  } catch (o) {
16
16
  return n(o), Promise.reject(o);
@@ -1,4 +1 @@
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-b-thin"},`
4
- `,40,k),[[e.vModelText,l.prop[l.content]]])]))}};exports.default=x;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;