@ozdao/prometheus-framework 0.1.73 → 0.1.75

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. package/dist/node_modules/vue-select/dist/vue-select.es.cjs +1 -1
  2. package/dist/node_modules/vue3-carousel/dist/carousel.es.cjs +1 -1
  3. package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +1 -1
  4. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
  5. package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +1 -1
  6. package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.cjs +1 -1
  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/Field/Field.vue2.cjs +1 -1
  12. package/dist/prometheus-framework/src/components/FieldTags/FieldTags.vue.cjs +1 -1
  13. package/dist/prometheus-framework/src/components/FieldTags/tag-input.vue2.cjs +1 -1
  14. package/dist/prometheus-framework/src/components/Map/Map.vue2.cjs +1 -1
  15. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +72 -2
  17. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  18. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +2 -72
  19. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
  20. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  21. package/dist/prometheus-framework/src/components/Text/Text.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/auth/auth.client.cjs +1 -1
  23. package/dist/prometheus-framework/src/modules/auth/auth.client.js +24 -27
  24. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/modules/auth/store/twofa.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/backoffice/backoffice.client.cjs +1 -1
  29. package/dist/prometheus-framework/src/modules/backoffice/backoffice.client.js +2 -5
  30. package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.cjs +1 -1
  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/backoffice/router/backoffice.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +133 -177
  35. package/dist/prometheus-framework/src/modules/community/community.client.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/community/community.client.js +30 -33
  37. package/dist/prometheus-framework/src/modules/community/components/blocks/FooterBlogpost.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  40. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/constructor/components/elements/Image.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  50. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +2 -2
  52. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/events/events.client.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/events/events.client.js +18 -21
  55. package/dist/prometheus-framework/src/modules/events/store/events.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/gallery/gallery.client.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/gallery/gallery.client.js +4 -7
  61. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  63. package/dist/prometheus-framework/src/modules/globals/components/layouts/Empty.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/globals/components/sections/Feed.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/globals/components/sections/Title.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/globals/globals.client.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/globals/globals.client.js +6 -9
  68. package/dist/prometheus-framework/src/modules/icons/entities/IconCommunity.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/icons/entities/IconEvents.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/icons/icons.client.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/icons/icons.client.js +46 -49
  72. package/dist/prometheus-framework/src/modules/icons/navigation/IconChevronRight.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/icons/navigation/IconCross.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/icons/navigation/IconEdit.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/icons/placeholders/PlaceholderUserpic.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEventShort.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/icons/socials/dribbble.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/icons/socials/facebook.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/icons/socials/facebook.vue.js +3 -3
  80. package/dist/prometheus-framework/src/modules/icons/socials/instagram.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/icons/socials/line.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/icons/socials/linkedin.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/icons/socials/linkedin.vue.js +1 -1
  84. package/dist/prometheus-framework/src/modules/icons/socials/reddit.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/icons/socials/telegram.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/icons/socials/telegram.vue.js +3 -3
  87. package/dist/prometheus-framework/src/modules/icons/socials/twitter.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/icons/socials/twitter.vue.js +3 -3
  89. package/dist/prometheus-framework/src/modules/icons/socials/vk.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/icons/socials/youtube.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/landing/landing.client.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/landing/landing.client.js +2 -5
  93. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  95. package/dist/prometheus-framework/src/modules/legal/components/pages/legal/Cookies.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/legal/components/pages/legal/EULA.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/legal/components/pages/legal/Privacy.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/legal/components/pages/legal/Terms.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/legal/legal.client.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/legal/legal.client.js +10 -14
  101. package/dist/prometheus-framework/src/modules/middlewares/middlewares.client.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/middlewares/middlewares.client.js +1 -8
  103. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +2 -11
  105. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +11 -2
  107. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  109. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentSub.vue.cjs +1 -1
  111. package/dist/prometheus-framework/src/modules/organizations/components/blocks/EditArray.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/organizations/components/blocks/EmptyState.vue.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Rating.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.cjs +1 -1
  115. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.js +9 -9
  116. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Unit.vue.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  120. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  121. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  122. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  124. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
  126. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  128. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +10 -10
  131. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +58 -61
  134. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
  136. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  138. package/dist/prometheus-framework/src/modules/reports/reports.client.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/reports/reports.client.js +1 -7
  140. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotSub.vue.cjs +1 -1
  142. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  144. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  145. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.cjs +1 -1
  146. package/dist/prometheus-framework/src/modules/users/users.client.cjs +1 -1
  147. package/dist/prometheus-framework/src/modules/users/users.client.js +8 -11
  148. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  149. package/dist/style.css +1 -1
  150. package/package.json +1 -1
  151. package/src/modules/auth/auth.client.js +1 -1
  152. package/src/modules/backoffice/backoffice.client.js +1 -1
  153. package/src/modules/backoffice/router/backoffice.js +130 -128
  154. package/src/modules/community/community.client.js +1 -1
  155. package/src/modules/events/events.client.js +1 -1
  156. package/src/modules/gallery/gallery.client.js +1 -1
  157. package/src/modules/globals/globals.client.js +1 -1
  158. package/src/modules/icons/icons.client.js +1 -1
  159. package/src/modules/landing/landing.client.js +1 -1
  160. package/src/modules/legal/legal.client.js +1 -1
  161. package/src/modules/middlewares/middlewares.client.js +1 -1
  162. package/src/modules/organizations/organizations.client.js +1 -1
  163. package/src/modules/reports/reports.client.js +1 -1
  164. package/src/modules/users/users.client.js +1 -1
@@ -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.vue2.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"},$=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),D=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),M={key:0,class:"mn-thin"},S={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},U={__name:"CreateBlogPost",setup(A){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 h(){d.value=!0}function v(){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=>h()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(y.default,{title:"Добавить участника",onClosePopup:v,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[$,e.createVNode(B.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),D,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",M,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",S,[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=U;
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,7 +1,7 @@
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
2
  import D from "../../../constructor/components/elements/Textarea.vue2.js";
3
3
  import N from "../../../constructor/components/sections/Constructor.vue.js";
4
- import O from "../../../../components/Popup/Popup.vue2.js";
4
+ import O from "../../../../components/Popup/Popup.vue.js";
5
5
  import "../../../../components/FieldTags/tag-input.vue.js";
6
6
  import "../../../../components/FieldTags/vue-tags-input.scss.js";
7
7
  import U from "../../../../components/FieldTags/BlockTags.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("./Feed.vue.cjs");require("../../store/blogposts.cjs");const r=require("../../../auth/store/auth.cjs");require("./HotPosts.vue2.cjs");const s=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),c=t=>(e.pushScopeId("data-v-2591cab6"),t=t(),e.popScopeId(),t),u={class:"community-feed"},i=c(()=>e.createElementVNode("h2",{class:"w-m-75r mn-auto pd-t-big pd-b-big t-center"},"Discover the Vibrant Community",-1)),a={__name:"HotPosts",setup(t){return(d,l)=>(e.openBlock(),e.createElementBlock("section",u,[i,e.createVNode(o.default,{skip:0,limit:3,user:r.state.user._id,period:"year",class:"cols-2 gap-thin"},null,8,["user"])]))}},n=s.default(a,[["__scopeId","data-v-2591cab6"]]);exports.default=n;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("./Feed.vue.cjs");require("../../store/blogposts.cjs");const s=require("../../../auth/store/auth.cjs");require("./HotPosts.vue2.cjs");const r=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),c=t=>(e.pushScopeId("data-v-2591cab6"),t=t(),e.popScopeId(),t),u={class:"community-feed"},i=c(()=>e.createElementVNode("h2",{class:"w-m-75r mn-auto pd-t-big pd-b-big t-center"},"Discover the Vibrant Community",-1)),a={__name:"HotPosts",setup(t){return(d,l)=>(e.openBlock(),e.createElementBlock("section",u,[i,e.createVNode(o.default,{skip:0,limit:3,user:s.state.user._id,period:"year",class:"cols-2 gap-thin"},null,8,["user"])]))}},n=r.default(a,[["__scopeId","data-v-2591cab6"]]);exports.default=n;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("../../../../components/Upload/Upload.vue.cjs"),i={class:"mn-thin w-100 pd-medium bg-white radius-medium"},m=["innerHTML"],p={key:1,class:""},b={__name:"Audio",props:["label","value","prop"],emits:["input","updateBlock"],setup(t,{emit:u}){const a=t,o=e.ref(null);function r(l){return[/youtube\.com/,/soundcloud\.com/,/vimeo\.com/].some(c=>c.test(l))}function d(l){o.value=l,o.value&&r(o.value)?(u("input",o.value),u("updateBlock",a.prop,{content:o.value})):alert("Invalid embed code or source not allowed.")}return(l,n)=>(e.openBlock(),e.createElementBlock("div",i,[t.prop.content?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:t.prop.content,class:"flex-center flex"},null,8,m)):(e.openBlock(),e.createElementBlock("div",p,[e.createVNode(s.default,{field:o.value,"onUpdate:field":n[0]||(n[0]=c=>o.value=c),onFileChange:d,type:"file",placeholder:"Enter embed code",class:"w-100 br-solid br-1px br-black-transp-10 pd-medium radius-small mn-thin"},null,8,["field"]),e.createElementVNode("button",{onClick:d,class:"button-small button"}," Save ")]))]))}};exports.default=b;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("../../../../components/Upload/Upload.vue.cjs"),r={class:"mn-thin w-100 pd-medium bg-white radius-medium"},m=["innerHTML"],p={key:1,class:""},v={__name:"Audio",props:["label","value","prop"],emits:["input","updateBlock"],setup(t,{emit:u}){const a=t,o=e.ref(null);function s(l){return[/youtube\.com/,/soundcloud\.com/,/vimeo\.com/].some(c=>c.test(l))}function d(l){o.value=l,o.value&&s(o.value)?(u("input",o.value),u("updateBlock",a.prop,{content:o.value})):alert("Invalid embed code or source not allowed.")}return(l,n)=>(e.openBlock(),e.createElementBlock("div",r,[t.prop.content?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:t.prop.content,class:"flex-center flex"},null,8,m)):(e.openBlock(),e.createElementBlock("div",p,[e.createVNode(i.default,{field:o.value,"onUpdate:field":n[0]||(n[0]=c=>o.value=c),onFileChange:d,type:"file",placeholder:"Enter embed code",class:"w-100 br-solid br-1px br-black-transp-10 pd-medium radius-small mn-thin"},null,8,["field"]),e.createElementVNode("button",{onClick:d,class:"button-small button"}," Save ")]))]))}};exports.default=v;
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=["placeholder"],h={__name:"Caption",props:["obj","label","prop","value","content","textarea","placeholder","index","ref"],emits:["deleteBlock","addBlock","focus"],setup(l,{emit:i}){const t=l;e.ref(t);const r=e.ref(null);function p(n){const o=/^\s*[-*]\s+(.*)/;let s=n.target.value.split(/\n+/).map(u=>{const d=o.exec(u);return d?d[1]:null}).filter(u=>u!==null);s.length>0?(t.prop[t.content]=s,a()):n.target.value.trim()===""&&(t.prop[t.content]=[],a())}function a(){r.value.style.height="1rem",r.value.style.height=r.value.scrollHeight+"px"}return e.onUpdated(()=>{a()}),e.onMounted(()=>{a()}),e.watch(()=>t.prop[t.content],n=>{(!n||n.length===0)&&i("deleteBlock",t.prop)}),(n,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":o[0]||(o[0]=c=>l.prop[l.content]=c),placeholder:l.placeholder?l.placeholder:"Enter text",onInput:p,onFocus:o[1]||(o[1]=c=>i("focus",r.value)),ref_key:"textarea",ref:r,class:"br-l br-solid br-main pd-l-small text-area mn-small"},`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=["placeholder"],h={__name:"Caption",props:["obj","label","prop","value","content","textarea","placeholder","index","ref"],emits:["deleteBlock","addBlock","focus"],setup(l,{emit:s}){const t=l;e.ref(t);const r=e.ref(null);function p(n){const o=/^\s*[-*]\s+(.*)/;let i=n.target.value.split(/\n+/).map(u=>{const d=o.exec(u);return d?d[1]:null}).filter(u=>u!==null);i.length>0?(t.prop[t.content]=i,a()):n.target.value.trim()===""&&(t.prop[t.content]=[],a())}function a(){r.value.style.height="1rem",r.value.style.height=r.value.scrollHeight+"px"}return e.onUpdated(()=>{a()}),e.onMounted(()=>{a()}),e.watch(()=>t.prop[t.content],n=>{(!n||n.length===0)&&s("deleteBlock",t.prop)}),(n,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":o[0]||(o[0]=c=>l.prop[l.content]=c),placeholder:l.placeholder?l.placeholder:"Enter text",onInput:p,onFocus:o[1]||(o[1]=c=>s("focus",r.value)),ref_key:"textarea",ref:r,class:"br-l br-solid br-main pd-l-small text-area mn-small"},`
2
2
  `,40,f),[[e.vModelText,l.prop[l.content]]])]))}};exports.default=h;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Field/Field.vue2.cjs"),i={class:"mn-thin w-100 pd-medium bg-white radius-medium"},m=["innerHTML"],p={key:1,class:""},b=e.createElementVNode("p",{class:"t-center"},"Embeds from youtube.com, vimeo.com, soundcloud.com are allowed",-1),v={__name:"Embed",props:["label","value","prop"],emits:["input","updateBlock"],setup(t,{emit:c}){const d=t,o=e.ref(null);function s(a){return[/youtube\.com/,/soundcloud\.com/,/vimeo\.com/].some(n=>n.test(a))}function r(){o.value&&s(o.value)?(c("input",o.value),c("updateBlock",d.prop,{content:o.value})):alert("Invalid embed code or source not allowed.")}return(a,l)=>(e.openBlock(),e.createElementBlock("div",i,[t.prop.content?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:t.prop.content,class:"flex-center flex"},null,8,m)):(e.openBlock(),e.createElementBlock("div",p,[e.createVNode(u.default,{field:o.value,"onUpdate:field":l[0]||(l[0]=n=>o.value=n),type:"textarea",placeholder:"Paste your embed code here",class:"w-100 br-solid br-1px br-black-transp-10 pd-medium radius-small mn-thin"},null,8,["field"]),e.createElementVNode("div",{class:"flex-v-center flex-nowrap flex gap-small"},[b,e.createElementVNode("button",{onClick:r,class:"button-small button"}," Save ")])]))]))}};exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../../components/Field/Field.vue2.cjs"),i={class:"mn-thin w-100 pd-medium bg-white radius-medium"},m=["innerHTML"],p={key:1,class:""},b=e.createElementVNode("p",{class:"t-center"},"Embeds from youtube.com, vimeo.com, soundcloud.com are allowed",-1),v={__name:"Embed",props:["label","value","prop"],emits:["input","updateBlock"],setup(t,{emit:c}){const d=t,o=e.ref(null);function s(a){return[/youtube\.com/,/soundcloud\.com/,/vimeo\.com/].some(n=>n.test(a))}function u(){o.value&&s(o.value)?(c("input",o.value),c("updateBlock",d.prop,{content:o.value})):alert("Invalid embed code or source not allowed.")}return(a,l)=>(e.openBlock(),e.createElementBlock("div",i,[t.prop.content?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:t.prop.content,class:"flex-center flex"},null,8,m)):(e.openBlock(),e.createElementBlock("div",p,[e.createVNode(r.default,{field:o.value,"onUpdate:field":l[0]||(l[0]=n=>o.value=n),type:"textarea",placeholder:"Paste your embed code here",class:"w-100 br-solid br-1px br-black-transp-10 pd-medium radius-small mn-thin"},null,8,["field"]),e.createElementVNode("div",{class:"flex-v-center flex-nowrap flex gap-small"},[b,e.createElementVNode("button",{onClick:u,class:"button-small button"}," Save ")])]))]))}};exports.default=v;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o={class:"w-100 bg-white radius-big image-upload-area flex-v-center flex-h-center flex t-black mn-small"},r=["src"],c={__name:"Image",props:["label","value","prop"],setup(t){return e.ref(null),(l,a)=>(e.openBlock(),e.createElementBlock("div",o,[t.prop.content?(e.openBlock(),e.createElementBlock("img",{key:0,src:(l.FILE_SERVER_URL||"")+t.prop.content,alt:"Uploaded image",class:"w-100 h-30r object-fit-contain"},null,8,r)):e.createCommentVNode("",!0)]))}};exports.default=c;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o={class:"w-100 bg-white radius-big image-upload-area flex-v-center flex-h-center flex t-black mn-small"},c=["src"],a={__name:"Image",props:["label","value","prop"],setup(t){return e.ref(null),(l,n)=>(e.openBlock(),e.createElementBlock("div",o,[t.prop.content?(e.openBlock(),e.createElementBlock("img",{key:0,src:(l.FILE_SERVER_URL||"")+t.prop.content,alt:"Uploaded image",class:"w-100 h-30r object-fit-contain"},null,8,c)):e.createCommentVNode("",!0)]))}};exports.default=a;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../../node_modules/axios/lib/axios.cjs"),k=["src"],v={key:1,class:"t-transp pd-extra"},h={__name:"ImageUpload",props:["label","value","prop"],emits:["input","updateBlock"],setup(n,{emit:r}){const p=n,l=e.ref(null),i=e.ref(null);function u(){i.value.click()}async function s(t){let o=t.target.files[0];console.log(o);let a=new FormData,f="unsorted";a.append("file",o),console.log(a.has("file"));try{let m=await g.default.create({baseURL:process.env.API_URL,withCredentials:!0}).post(`/api/upload/file?folderName=${encodeURIComponent(f)}`,a,{headers:{"Content-Type":"multipart/form-data"}});l.value=m.data.filepath,console.log(l.value),r("input",l.value),r("updateBlock",p.prop,{content:l.value})}catch(c){console.error(c)}}function d(t){t.preventDefault(),s({target:{files:t.dataTransfer.files}})}return(t,o)=>(e.openBlock(),e.createElementBlock("div",{onClick:u,onDrop:d,onDragover:o[0]||(o[0]=e.withModifiers(()=>{},["prevent"])),class:"w-100 radius-big bg-white image-upload-area flex-v-center flex-h-center flex t-black mn-small"},[n.prop.content?(e.openBlock(),e.createElementBlock("img",{key:0,src:(t.FILE_SERVER_URL||"")+n.prop.content,alt:"Uploaded image",class:"w-100 h-30r object-fit-contain"},null,8,k)):(e.openBlock(),e.createElementBlock("span",v,"Click or drag-and-drop your image")),e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:i,onChange:s,style:{display:"none"}},null,544)],32))}};exports.default=h;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../../node_modules/axios/lib/axios.cjs"),k=["src"],v={key:1,class:"t-transp pd-extra"},h={__name:"ImageUpload",props:["label","value","prop"],emits:["input","updateBlock"],setup(n,{emit:r}){const p=n,l=e.ref(null),s=e.ref(null);function u(){s.value.click()}async function i(t){let o=t.target.files[0];console.log(o);let a=new FormData,f="unsorted";a.append("file",o),console.log(a.has("file"));try{let m=await g.default.create({baseURL:process.env.API_URL,withCredentials:!0}).post(`/api/upload/file?folderName=${encodeURIComponent(f)}`,a,{headers:{"Content-Type":"multipart/form-data"}});l.value=m.data.filepath,console.log(l.value),r("input",l.value),r("updateBlock",p.prop,{content:l.value})}catch(c){console.error(c)}}function d(t){t.preventDefault(),i({target:{files:t.dataTransfer.files}})}return(t,o)=>(e.openBlock(),e.createElementBlock("div",{onClick:u,onDrop:d,onDragover:o[0]||(o[0]=e.withModifiers(()=>{},["prevent"])),class:"w-100 radius-big bg-white image-upload-area flex-v-center flex-h-center flex t-black mn-small"},[n.prop.content?(e.openBlock(),e.createElementBlock("img",{key:0,src:(t.FILE_SERVER_URL||"")+n.prop.content,alt:"Uploaded image",class:"w-100 h-30r object-fit-contain"},null,8,k)):(e.openBlock(),e.createElementBlock("span",v,"Click or drag-and-drop your image")),e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:s,onChange:i,style:{display:"none"}},null,544)],32))}};exports.default=h;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("../elements/Textarea.vue2.cjs"),E=require("../elements/H2.vue.cjs"),x=require("../elements/Caption.vue.cjs"),N=require("../elements/Bullets.vue.cjs"),y=require("../elements/ImageUpload.vue.cjs"),A=require("../elements/Embed.vue.cjs"),V=require("../elements/Audio.vue.cjs"),q=require("../../../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs"),D=["onMouseover"],$={key:0,class:"z-index-5 radius-thin pd-thin bg-white w-max mn-small flex-nowrap flex-column flex"},M=["onClick"],T=["onClick"],F=["onClick"],I=["onClick"],S={__name:"Constructor",props:["content"],emits:["update"],setup(f,{emit:u}){const v=f;let t=e.ref(null);e.ref(null),t.value={content:v.content};const k={Textarea:_.default,H2:E.default,Bullets:N.default,Caption:x.default,ImageUpload:y.default,Embed:A.default,Audio:V.default};function s(c="Textarea",l="",n,o){console.log("We are adding new block (functuin HandleAddBlock):"+c+l+n+o);let a={order:t.value.content.length+1,type:c,style:"",class:"",content:l,blocks:[],setFocus:!0};if(o&&o.blocks&&Array.isArray(o.blocks)){let m=o.blocks.map(C=>({...a,content:C.content})),w=[(o.index||n)+1,0].concat(m);t.value.content.splice.apply(t.value.content,w);const B=m[m.length-1];console.log("New block is"+B)}else n!==void 0?(t.value.content.splice(n+1,0,a),console.log("Latest block is"+a)):(console.log("Another block is"+a),t.value.content.push(a));i.value=null,u("update",t.value.content)}function g(c,l){const n=t.value.content.findIndex(o=>o===c);n!==-1&&(t.value.content[n]={...t.value.content[n],...l}),u("update",t.value.content)}function p(c){let l=t.value.content.findIndex(n=>n===c);l!==-1&&t.value.content.splice(l,1),t.value.content[l-1].setFocus=!0,u("update",t.value.content)}const i=e.ref(null),d=e.ref(!1),r=e.ref(!1);function h(){d.value=!0}function b(){d.value=!1}return e.watchEffect(()=>{t.value&&t.value.content.length===0&&s("Textarea",""),u("update",t.value.content)}),(c,l)=>(e.openBlock(),e.createElementBlock("section",null,[e.unref(t).content?(e.openBlock(),e.createBlock(e.unref(q.VueDraggableNext),{key:0,class:"w-full",list:e.unref(t).content,onStart:h,onEnd:b},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).content,(n,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:"pos-relative"},[e.createElementVNode("div",{onMouseover:a=>(i.value=o,r.value=!1),class:"pos-relative w-full h-full"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k[n.type]),{index:o,component:n,prop:n,class:e.normalizeClass(n.class),setFocus:n.setFocus,content:"content",onDeleteBlock:p,onAddBlock:s,onUpdateBlock:g},null,40,["index","component","prop","class","setFocus"]))],40,D),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value===o?(e.openBlock(),e.createElementBlock("div",{key:0,class:"pos-absolute z-index-4 i-semi",style:{right:"calc(100% + 0.5rem)",top:"calc(50% - 1.125rem)"},onMousedown:l[1]||(l[1]=e.withModifiers(a=>d.value=!0,["prevent"]))},[e.createElementVNode("button",{onClick:l[0]||(l[0]=a=>r.value=!r.value),class:"mn-small cursor-pointer w-100 i-semi bg-white radius-thin"},e.toDisplayString(n.content?"...":"+"),1),r.value?(e.openBlock(),e.createElementBlock("div",$,[e.createElementVNode("span",{onClick:a=>p(n),class:"mn-thin w-max t-red bg-white button-small button"}," Remove ",8,M),e.createElementVNode("span",{onClick:a=>s("ImageUpload","",o),class:"mn-thin w-max t-black bg-white button-small button"}," Add Image ",8,T),e.createElementVNode("span",{onClick:a=>s("H2","",o),class:"w-max button-small t-black bg-white button"}," Add Title ",8,F),e.createElementVNode("span",{onClick:a=>s("Embed","",o),class:"w-max button-small t-black bg-white button"}," Add Embed ",8,I)])):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1},8,["list"])):e.createCommentVNode("",!0)]))}};exports.default=S;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("../elements/Textarea.vue2.cjs"),E=require("../elements/H2.vue.cjs"),x=require("../elements/Caption.vue.cjs"),N=require("../elements/Bullets.vue.cjs"),y=require("../elements/ImageUpload.vue.cjs"),A=require("../elements/Embed.vue.cjs"),V=require("../elements/Audio.vue.cjs"),q=require("../../../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs"),D=["onMouseover"],M={key:0,class:"z-index-5 radius-thin pd-thin bg-white w-max mn-small flex-nowrap flex-column flex"},T=["onClick"],$=["onClick"],F=["onClick"],I=["onClick"],S={__name:"Constructor",props:["content"],emits:["update"],setup(v,{emit:u}){const f=v;let t=e.ref(null);e.ref(null),t.value={content:f.content};const k={Textarea:_.default,H2:E.default,Bullets:N.default,Caption:x.default,ImageUpload:y.default,Embed:A.default,Audio:V.default};function s(c="Textarea",l="",n,o){console.log("We are adding new block (functuin HandleAddBlock):"+c+l+n+o);let a={order:t.value.content.length+1,type:c,style:"",class:"",content:l,blocks:[],setFocus:!0};if(o&&o.blocks&&Array.isArray(o.blocks)){let m=o.blocks.map(C=>({...a,content:C.content})),w=[(o.index||n)+1,0].concat(m);t.value.content.splice.apply(t.value.content,w);const B=m[m.length-1];console.log("New block is"+B)}else n!==void 0?(t.value.content.splice(n+1,0,a),console.log("Latest block is"+a)):(console.log("Another block is"+a),t.value.content.push(a));i.value=null,u("update",t.value.content)}function g(c,l){const n=t.value.content.findIndex(o=>o===c);n!==-1&&(t.value.content[n]={...t.value.content[n],...l}),u("update",t.value.content)}function p(c){let l=t.value.content.findIndex(n=>n===c);l!==-1&&t.value.content.splice(l,1),t.value.content[l-1].setFocus=!0,u("update",t.value.content)}const i=e.ref(null),d=e.ref(!1),r=e.ref(!1);function h(){d.value=!0}function b(){d.value=!1}return e.watchEffect(()=>{t.value&&t.value.content.length===0&&s("Textarea",""),u("update",t.value.content)}),(c,l)=>(e.openBlock(),e.createElementBlock("section",null,[e.unref(t).content?(e.openBlock(),e.createBlock(e.unref(q.VueDraggableNext),{key:0,class:"w-full",list:e.unref(t).content,onStart:h,onEnd:b},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).content,(n,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:"pos-relative"},[e.createElementVNode("div",{onMouseover:a=>(i.value=o,r.value=!1),class:"pos-relative w-full h-full"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k[n.type]),{index:o,component:n,prop:n,class:e.normalizeClass(n.class),setFocus:n.setFocus,content:"content",onDeleteBlock:p,onAddBlock:s,onUpdateBlock:g},null,40,["index","component","prop","class","setFocus"]))],40,D),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value===o?(e.openBlock(),e.createElementBlock("div",{key:0,class:"pos-absolute z-index-4 i-semi",style:{right:"calc(100% + 0.5rem)",top:"calc(50% - 1.125rem)"},onMousedown:l[1]||(l[1]=e.withModifiers(a=>d.value=!0,["prevent"]))},[e.createElementVNode("button",{onClick:l[0]||(l[0]=a=>r.value=!r.value),class:"mn-small cursor-pointer w-100 i-semi bg-white radius-thin"},e.toDisplayString(n.content?"...":"+"),1),r.value?(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("span",{onClick:a=>p(n),class:"mn-thin w-max t-red bg-white button-small button"}," Remove ",8,T),e.createElementVNode("span",{onClick:a=>s("ImageUpload","",o),class:"mn-thin w-max t-black bg-white button-small button"}," Add Image ",8,$),e.createElementVNode("span",{onClick:a=>s("H2","",o),class:"w-max button-small t-black bg-white button"}," Add Title ",8,F),e.createElementVNode("span",{onClick:a=>s("Embed","",o),class:"w-max button-small t-black bg-white button"}," Add Embed ",8,I)])):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1},8,["list"])):e.createCommentVNode("",!0)]))}};exports.default=S;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../components/Chips/Chips.vue.cjs"),y=require("../../../icons/navigation/IconEdit.vue.cjs"),C=require("../../../globals/components/blocks/CardHeader.vue.cjs");require("../../../community/store/reactions.cjs");const k=require("vue-router"),p={key:0,class:"o-hidden pos-relative bg-grey mn-small w-100"},E=["src"],T=["src"],w={class:"w-max mn-r-thin pd-thin radius-small t-semi bg-main"},B={key:0,class:"t-semi"},D={class:"t-semi"},U={key:0,class:"t-semi uppercase"},N={key:1,class:"cursor-pointer mn-thin flex-nowrap flex w-100"},b={key:0,class:""},V={key:1,class:"pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra"},S={key:2,class:"mn-small p-big"},x={__name:"CardEvent",props:["event","user","short","type"],setup(t){const o=t;e.ref(new Date),k.useRouter(),e.computed(()=>o.event.content.find(n=>n.type.name==="ImageUpload")),e.computed(()=>o.event.content.find(n=>n.type.name==="Textarea"));const u=e.computed(()=>{const n=new Date,s=Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds()),r=new Date(o.event.date.start),a=Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds())-s;if(a<0)return"Finished";if(a===0)return"Starting Now";{const d=Math.floor(a/1e3),l=Math.floor(d/60),i=Math.floor(l/60),m=Math.floor(i/24);return m>0?`${m} days until event`:i>0?`${i} hours until event`:l>0?`${l} minutes until event`:`${d} seconds until event`}}),f=e.computed(()=>{const n=new Date(o.event.date.start),s={day:"2-digit",month:"2-digit"};return n.toLocaleDateString(void 0,s)}),h=e.computed(()=>{console.log(o.event.date.start),console.log(o.event.date.end);const n=new Date(o.event.date.start),s=new Date(o.event.date.end),r=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(n),c=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(s);return`${r}-${c}`}),v=e.computed(()=>{const n=o.event.name;return n.length>26?`${n.substring(0,22)}…`:n});return(n,s)=>(e.openBlock(),e.createElementBlock("article",{class:e.normalizeClass([{"flex-nowrap flex-v-center flex":t.type==="short"},"pos-relative"])},[e.createVNode(C.default,{class:e.normalizeClass({"mn-small pd-medium":t.type!=="short","flex-child-order-last flex-child mn-l-small":t.type==="short"}),entity:t.event,entityType:"event",user:t.user,owner:t.event.owner,creator:t.event.creator,members:t.event.numberOfTickets,membersPhotos:t.event.participantsPhotos,type:t.type,dateFormatted:e.unref(u)},null,8,["class","entity","user","owner","creator","members","membersPhotos","type","dateFormatted"]),t.event.cover&&t.type!=="short"?(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("img",{src:(n.FILE_SERVER_URL||"")+t.event.cover,alt:"Event image",class:"pos-relative z-index-1 d-block mn-auto h-20r"},null,8,E),e.createElementVNode("img",{src:(n.FILE_SERVER_URL||"")+t.event.cover,alt:"Event Background",class:"z-index-0 pos-absolute w-100 h-100 pos-t-0 pos-r-0",style:{transform:"scale(1.5)",filter:"blur(2rem)","-webkit-filter":"blur(2rem)"}},null,8,T)])):e.createCommentVNode("",!0),e.createElementVNode("section",{class:e.normalizeClass(["pos-relative w-100",{"pd-t-zero pd-medium":t.type!=="short"}])},[t.user===t.event.creator.target._id?(e.openBlock(),e.createBlock(y.default,{key:0,onClick:s[0]||(s[0]=e.withModifiers(r=>n.$router.push({name:"Edit Event",params:{url:t.event.url}}),["stop"])),class:"z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([{"mn-small":t.type!=="short"},"flex-v-center flex-nowrap flex"])},[e.createElementVNode("div",w,[t.type!=="short"?(e.openBlock(),e.createElementBlock("span",B,e.toDisplayString(e.unref(f))+" | ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",D,e.toDisplayString(e.unref(h)),1)]),t.type==="short"?(e.openBlock(),e.createElementBlock("span",U,e.toDisplayString(e.unref(v)),1)):e.createCommentVNode("",!0)],2),t.type!=="short"?(e.openBlock(),e.createElementBlock("div",N,[t.type!=="short"?(e.openBlock(),e.createElementBlock("h3",b,e.toDisplayString(t.event.name),1)):e.createCommentVNode("",!0),t.event.status==="draft"?(e.openBlock(),e.createElementBlock("div",V,e.toDisplayString(t.event.status),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("p",S,e.toDisplayString(t.event.description),1)):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default"),t.type!=="short"&&t.event.tags.length>0?(e.openBlock(),e.createBlock(g.default,{key:3,chips:t.event.tags},null,8,["chips"])):e.createCommentVNode("",!0)],2)],2))}};exports.default=x;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../components/Chips/Chips.vue.cjs"),y=require("../../../icons/navigation/IconEdit.vue.cjs"),C=require("../../../globals/components/blocks/CardHeader.vue.cjs");require("../../../community/store/reactions.cjs");const k=require("vue-router"),p={key:0,class:"o-hidden pos-relative bg-grey mn-small w-100"},E=["src"],T=["src"],w={class:"w-max mn-r-thin pd-thin radius-small t-semi bg-main"},B={key:0,class:"t-semi"},D={class:"t-semi"},U={key:0,class:"t-semi uppercase"},N={key:1,class:"cursor-pointer mn-thin flex-nowrap flex w-100"},b={key:0,class:""},V={key:1,class:"pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra"},S={key:2,class:"mn-small p-big"},x={__name:"CardEvent",props:["event","user","short","type"],setup(t){const o=t;e.ref(new Date),k.useRouter(),e.computed(()=>o.event.content.find(n=>n.type.name==="ImageUpload")),e.computed(()=>o.event.content.find(n=>n.type.name==="Textarea"));const u=e.computed(()=>{const n=new Date,s=Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds()),r=new Date(o.event.date.start),a=Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds())-s;if(a<0)return"Finished";if(a===0)return"Starting Now";{const d=Math.floor(a/1e3),l=Math.floor(d/60),c=Math.floor(l/60),m=Math.floor(c/24);return m>0?`${m} days until event`:c>0?`${c} hours until event`:l>0?`${l} minutes until event`:`${d} seconds until event`}}),f=e.computed(()=>{const n=new Date(o.event.date.start),s={day:"2-digit",month:"2-digit"};return n.toLocaleDateString(void 0,s)}),h=e.computed(()=>{console.log(o.event.date.start),console.log(o.event.date.end);const n=new Date(o.event.date.start),s=new Date(o.event.date.end),r=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(n),i=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(s);return`${r}-${i}`}),v=e.computed(()=>{const n=o.event.name;return n.length>26?`${n.substring(0,22)}…`:n});return(n,s)=>(e.openBlock(),e.createElementBlock("article",{class:e.normalizeClass([{"flex-nowrap flex-v-center flex":t.type==="short"},"pos-relative"])},[e.createVNode(C.default,{class:e.normalizeClass({"mn-small pd-medium":t.type!=="short","flex-child-order-last flex-child mn-l-small":t.type==="short"}),entity:t.event,entityType:"event",user:t.user,owner:t.event.owner,creator:t.event.creator,members:t.event.numberOfTickets,membersPhotos:t.event.participantsPhotos,type:t.type,dateFormatted:e.unref(u)},null,8,["class","entity","user","owner","creator","members","membersPhotos","type","dateFormatted"]),t.event.cover&&t.type!=="short"?(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("img",{src:(n.FILE_SERVER_URL||"")+t.event.cover,alt:"Event image",class:"pos-relative z-index-1 d-block mn-auto h-20r"},null,8,E),e.createElementVNode("img",{src:(n.FILE_SERVER_URL||"")+t.event.cover,alt:"Event Background",class:"z-index-0 pos-absolute w-100 h-100 pos-t-0 pos-r-0",style:{transform:"scale(1.5)",filter:"blur(2rem)","-webkit-filter":"blur(2rem)"}},null,8,T)])):e.createCommentVNode("",!0),e.createElementVNode("section",{class:e.normalizeClass(["pos-relative w-100",{"pd-t-zero pd-medium":t.type!=="short"}])},[t.user===t.event.creator.target._id?(e.openBlock(),e.createBlock(y.default,{key:0,onClick:s[0]||(s[0]=e.withModifiers(r=>n.$router.push({name:"Edit Event",params:{url:t.event.url}}),["stop"])),class:"z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([{"mn-small":t.type!=="short"},"flex-v-center flex-nowrap flex"])},[e.createElementVNode("div",w,[t.type!=="short"?(e.openBlock(),e.createElementBlock("span",B,e.toDisplayString(e.unref(f))+" | ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",D,e.toDisplayString(e.unref(h)),1)]),t.type==="short"?(e.openBlock(),e.createElementBlock("span",U,e.toDisplayString(e.unref(v)),1)):e.createCommentVNode("",!0)],2),t.type!=="short"?(e.openBlock(),e.createElementBlock("div",N,[t.type!=="short"?(e.openBlock(),e.createElementBlock("h3",b,e.toDisplayString(t.event.name),1)):e.createCommentVNode("",!0),t.event.status==="draft"?(e.openBlock(),e.createElementBlock("div",V,e.toDisplayString(t.event.status),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("p",S,e.toDisplayString(t.event.description),1)):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default"),t.type!=="short"&&t.event.tags.length>0?(e.openBlock(),e.createBlock(g.default,{key:3,chips:t.event.tags},null,8,["chips"])):e.createCommentVNode("",!0)],2)],2))}};exports.default=x;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../constructor/components/elements/Textarea.vue.cjs");const N=require("../../../constructor/components/sections/Constructor.vue.cjs"),E=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.cjs");const y=require("../../../../components/Popup/Popup.vue2.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),q=require("../../../../components/FieldTags/BlockTags.vue.cjs"),P=require("../../../../components/Checkbox/Checkbox.vue.cjs"),C=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),x=require("../../../../components/UploadImage/UploadImage.vue.cjs"),B=require("../../../../components/Button/Button.vue2.cjs"),v=require("vue-router"),s=require("../../store/events.cjs"),u=require("../../../auth/store/auth.cjs"),D=require("../../../organizations/store/organizations.cjs");require("./EditEvent.vue2.cjs");const U={key:0,class:"h-100 pd-thin"},T={class:"mn-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},z=e.createElementVNode("h4",null,"Upload Event Cover",-1),O=e.createElementVNode("h3",{class:"mn-small"},"Date",-1),$=e.createElementVNode("h3",{class:"mn-small"},"Description",-1),M={key:0,class:"pd-b-extra w-100 bg-grey pd-big radius-big"},S={key:1,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},A={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},R=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),F=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),j={key:0,class:"mn-thin"},H={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},G={__name:"EditEvent",setup(J){const i=v.useRoute(),d=v.useRouter();let t=e.ref(null),p=e.ref(null);const m=e.ref([]),r=e.ref(null),n=e.ref(),h=()=>({top:0,left:0});e.onMounted(async()=>{if(i.params.url){const a=await s.read({user:u.state.user._id,url:i.params.url});t.value=a.pop();const l=t.value.date.start,_=t.value.date.end;n.value=[l,_]}else{s.clean(),t.value=s.state.current;const a=new Date,l=new Date;n.value=[a,l]}t.value.owner||(t.value.owner={target:u.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:u.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 D.actions.read({user:u.state.user._id,postable:u.state.user._id,limit:100});p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const c=e.ref(!1);function g(){c.value=!0}function b(){c.value=!1}function k(){m.value.length>0&&m.value.map(o=>o.text),t.value.status="draft",t.value.date={start:n.value[0],end:n.value[1]},i.params.url?s.update(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.error(o)}):s.create(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.error(o)})}function V(){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",t.value.date={start:n.value[0],end:n.value[1]},console.log(n.value),i.params.url?s.update(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.log(o)}):s.create(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.log(o)})}function w(){confirm("Are you sure you want to delete this event?")&&s.remove(t.value._id).then(o=>{d.push({name:"User Events",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.error(o)})}return(o,a)=>e.unref(t)?(e.openBlock(),e.createElementBlock("article",U,[e.createElementVNode("div",T,[e.createVNode(x.default,{photo:e.unref(t).cover,"onUpdate:photo":a[0]||(a[0]=l=>e.unref(t).cover=l),uploadPath:"users/"+u.state.user._id+"/events",class:"h-4r w-4r aspect-1x1 o-hidden mn-thin radius-extra"},null,8,["photo","uploadPath"]),z]),e.createVNode(f.default,{field:e.unref(t).name,"onUpdate:field":a[1]||(a[1]=l=>e.unref(t).name=l),placeholder:"Event name",class:"mn-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(f.default,{field:e.unref(t).description,"onUpdate:field":a[2]||(a[2]=l=>e.unref(t).description=l),type:"textfield",placeholder:"Enter short description",class:"mn-semi w-100 bg-grey pd-medium radius-small"},null,8,["field"]),O,e.createVNode(e.unref(E.default),{modelValue:n.value,"onUpdate:modelValue":a[3]||(a[3]=l=>n.value=l),"alt-position":h,range:"",class:"mn-semi"},null,8,["modelValue"]),$,e.unref(t)?(e.openBlock(),e.createElementBlock("section",M,[e.createVNode(N.default,{content:e.unref(t).content,onUpdate:a[4]||(a[4]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",S,[e.createElementVNode("div",A,[e.unref(i).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[5]||(a[5]=l=>w()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[6]||(a[6]=l=>k()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[7]||(a[7]=l=>g()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(y.default,{title:"Добавить участника",onClosePopup:b,isPopupOpen:c.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[R,e.createVNode(q.default,{onTagsChanged:a[8]||(a[8]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),F,e.createVNode(C.default,{modelValue:r.value,"onUpdate:modelValue":a[9]||(a[9]=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",j,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",H,[e.createVNode(P.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[10]||(a[10]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(B.default,{submit:V,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])])):e.createCommentVNode("",!0)}};exports.default=G;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../constructor/components/elements/Textarea.vue.cjs");const N=require("../../../constructor/components/sections/Constructor.vue.cjs"),E=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.cjs");const y=require("../../../../components/Popup/Popup.vue.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),q=require("../../../../components/FieldTags/BlockTags.vue.cjs"),P=require("../../../../components/Checkbox/Checkbox.vue.cjs"),C=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),x=require("../../../../components/UploadImage/UploadImage.vue.cjs"),B=require("../../../../components/Button/Button.vue2.cjs"),v=require("vue-router"),s=require("../../store/events.cjs"),u=require("../../../auth/store/auth.cjs"),D=require("../../../organizations/store/organizations.cjs");require("./EditEvent.vue2.cjs");const U={key:0,class:"h-100 pd-thin"},T={class:"mn-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},z=e.createElementVNode("h4",null,"Upload Event Cover",-1),O=e.createElementVNode("h3",{class:"mn-small"},"Date",-1),M=e.createElementVNode("h3",{class:"mn-small"},"Description",-1),S={key:0,class:"pd-b-extra w-100 bg-grey pd-big radius-big"},A={key:1,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},R={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},$=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),F=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),j={key:0,class:"mn-thin"},H={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},G={__name:"EditEvent",setup(J){const i=v.useRoute(),d=v.useRouter();let t=e.ref(null),p=e.ref(null);const m=e.ref([]),n=e.ref(null),r=e.ref(),h=()=>({top:0,left:0});e.onMounted(async()=>{if(i.params.url){const a=await s.read({user:u.state.user._id,url:i.params.url});t.value=a.pop();const l=t.value.date.start,_=t.value.date.end;r.value=[l,_]}else{s.clean(),t.value=s.state.current;const a=new Date,l=new Date;r.value=[a,l]}t.value.owner||(t.value.owner={target:u.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:u.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(n.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const o=await D.actions.read({user:u.state.user._id,postable:u.state.user._id,limit:100});p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const c=e.ref(!1);function g(){c.value=!0}function b(){c.value=!1}function k(){m.value.length>0&&m.value.map(o=>o.text),t.value.status="draft",t.value.date={start:r.value[0],end:r.value[1]},i.params.url?s.update(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.error(o)}):s.create(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.error(o)})}function V(){n.value&&(t.value.owner={target:n.value._id,type:"organization"}),n.value||(t.value.creator.hidden=!1),n.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.date={start:r.value[0],end:r.value[1]},console.log(r.value),i.params.url?s.update(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.log(o)}):s.create(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.log(o)})}function w(){confirm("Are you sure you want to delete this event?")&&s.remove(t.value._id).then(o=>{d.push({name:"User Events",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.error(o)})}return(o,a)=>e.unref(t)?(e.openBlock(),e.createElementBlock("article",U,[e.createElementVNode("div",T,[e.createVNode(x.default,{photo:e.unref(t).cover,"onUpdate:photo":a[0]||(a[0]=l=>e.unref(t).cover=l),uploadPath:"users/"+u.state.user._id+"/events",class:"h-4r w-4r aspect-1x1 o-hidden mn-thin radius-extra"},null,8,["photo","uploadPath"]),z]),e.createVNode(f.default,{field:e.unref(t).name,"onUpdate:field":a[1]||(a[1]=l=>e.unref(t).name=l),placeholder:"Event name",class:"mn-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(f.default,{field:e.unref(t).description,"onUpdate:field":a[2]||(a[2]=l=>e.unref(t).description=l),type:"textfield",placeholder:"Enter short description",class:"mn-semi w-100 bg-grey pd-medium radius-small"},null,8,["field"]),O,e.createVNode(e.unref(E.default),{modelValue:r.value,"onUpdate:modelValue":a[3]||(a[3]=l=>r.value=l),"alt-position":h,range:"",class:"mn-semi"},null,8,["modelValue"]),M,e.unref(t)?(e.openBlock(),e.createElementBlock("section",S,[e.createVNode(N.default,{content:e.unref(t).content,onUpdate:a[4]||(a[4]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",A,[e.createElementVNode("div",R,[e.unref(i).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[5]||(a[5]=l=>w()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[6]||(a[6]=l=>k()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[7]||(a[7]=l=>g()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(y.default,{title:"Добавить участника",onClosePopup:b,isPopupOpen:c.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[$,e.createVNode(q.default,{onTagsChanged:a[8]||(a[8]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),F,e.createVNode(C.default,{modelValue:n.value,"onUpdate:modelValue":a[9]||(a[9]=l=>n.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"]),n.value?(e.openBlock(),e.createElementBlock("h5",j,"Options:")):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createElementBlock("div",H,[e.createVNode(P.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[10]||(a[10]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(B.default,{submit:V,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])])):e.createCommentVNode("",!0)}};exports.default=G;
@@ -3,7 +3,7 @@ import "../../../constructor/components/elements/Textarea.vue.js";
3
3
  import z from "../../../constructor/components/sections/Constructor.vue.js";
4
4
  import N from "../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js";
5
5
  import "../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.js";
6
- import O from "../../../../components/Popup/Popup.vue2.js";
6
+ import O from "../../../../components/Popup/Popup.vue.js";
7
7
  import w from "../../../../components/Field/Field.vue2.js";
8
8
  import A from "../../../../components/FieldTags/BlockTags.vue.js";
9
9
  import B from "../../../../components/Checkbox/Checkbox.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const t=require("../sections/Feed.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Popup/Popup.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../reports/store/reports.cjs");require("../../../../components/Dropdown/Dropdown.vue2.cjs");const i=require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");require("../../../community/store/reactions.cjs");const o=require("../../store/events.cjs");require("../sections/List.vue2.cjs");const s={__name:"Events",setup(c){const r=u.useRoute();return u.useRouter(),(n,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(t.default,{category:e.unref(r).params.category,user:i.state.user._id,period:e.unref(r).query.period,selectedDate:o.state.filter.date},null,8,["category","user","period","selectedDate"])]))}};exports.default=s;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const t=require("../sections/Feed.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../reports/store/reports.cjs");require("../../../../components/Dropdown/Dropdown.vue.cjs");const i=require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");require("../../../community/store/reactions.cjs");const o=require("../../store/events.cjs");require("../sections/List.vue2.cjs");const s={__name:"Events",setup(c){const r=u.useRoute();return u.useRouter(),(n,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(t.default,{category:e.unref(r).params.category,user:i.state.user._id,period:e.unref(r).query.period,selectedDate:o.state.filter.date},null,8,["category","user","period","selectedDate"])]))}};exports.default=s;
@@ -5,11 +5,11 @@ import "../../../globals/localization/vue-i18n.js";
5
5
  import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
6
6
  import s from "../sections/Feed.vue.js";
7
7
  import "../../../../components/Loader/Loader.vue.js";
8
- import "../../../../components/Popup/Popup.vue.js";
8
+ import "../../../../components/Popup/Popup.vue2.js";
9
9
  import "../../../../components/Button/Button.vue.js";
10
10
  import "../../../../components/Select/Select.vue.js";
11
11
  import "../../../reports/store/reports.js";
12
- import "../../../../components/Dropdown/Dropdown.vue2.js";
12
+ import "../../../../components/Dropdown/Dropdown.vue.js";
13
13
  import { state as a } from "../../../auth/store/auth.js";
14
14
  import "../../../organizations/store/memberships.js";
15
15
  import "../../../community/store/reactions.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Loader/Loader.vue.cjs");const g=require("../../../../components/EmptyState/EmptyState.vue.cjs"),v=require("../blocks/CardEvent.vue.cjs"),m=require("../../../icons/skeletons/SkeletonEvent.vue.cjs"),c=require("../../store/events.cjs"),f={class:"feed"},k={__name:"Feed",props:{category:{type:String,default:null},selectedDate:{type:String,default:null},organization:{type:String,default:null},owner:{type:String,default:null},creator:{type:String,default:null},user:{type:[String,Number],default:null},sortOrder:{type:String,default:"desc"},participant:{type:String,default:null},period:{type:String,default:null},phase:{type:String,default:null}},setup(s){const t=s,r=e.ref([]),n=e.ref(!1),l=e.ref(!0),i=e.ref(0),u=e.ref(20),d=async()=>{if(n.value){i.value+=u.value;const a=await c.read({skip:i.value,limit:u.value,category:t.category,sortOrder:t.sortOrder,participant:t.participant,creator:t.creator,user:t.user,date:t.selectedDate,owner:t.owner,organization:t.organization,period:t.period,phase:t.phase});a.length===0?n.value=!1:n.value=!0,r.value=[...r.value,...a]}};return e.onMounted(async()=>{l.value=!0,console.log(t.selectedDate);const a=await c.read({skip:i.value,limit:u.value,category:t.category,participant:t.participant,sortOrder:t.sortOrder,user:t.user,owner:t.owner,creator:t.creator,date:t.selectedDate,organization:t.organization,period:t.period,phase:t.phase});a.length===0?n.value=!1:n.value=!0,r.value=a,l.value=!1}),(a,y)=>(e.openBlock(),e.createElementBlock("section",f,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"scaleTransition",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[l.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(u.value,o=>(e.openBlock(),e.createBlock(m.default,{key:o}))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"scaleTransition"},{default:e.withCtx(()=>[!l.value&&r.value.length<1?(e.openBlock(),e.createBlock(g.default,{key:0,title:"No Events Found",description:"Currently, there are no events available. Please check back later.",class:"pd-medium mn-thin bg-grey radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"scaleTransition",class:"container"},{default:e.withCtx(()=>[!l.value&&r.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.value,(o,p)=>(e.openBlock(),e.createBlock(v.default,{onClick:h=>a.$router.push({name:"Event",params:{url:o.url}}),key:o._id,event:o,user:s.user,type:"normal",class:e.normalizeClass(["bg-grey radius-big mn-medium",{"br-b br-solid br-black-transp-10":p!==r.value.length-1}])},null,8,["onClick","event","user","class"]))),128)):e.createCommentVNode("",!0),n.value&&r.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:d,class:"w-100 bg-main button"},"Load more")):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=k;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Loader/Loader.vue.cjs");const g=require("../../../../components/EmptyState/EmptyState.vue.cjs"),v=require("../blocks/CardEvent.vue.cjs"),m=require("../../../icons/skeletons/SkeletonEvent.vue.cjs"),c=require("../../store/events.cjs"),f={class:"feed"},k={__name:"Feed",props:{category:{type:String,default:null},selectedDate:{type:String,default:null},organization:{type:String,default:null},owner:{type:String,default:null},creator:{type:String,default:null},user:{type:[String,Number],default:null},sortOrder:{type:String,default:"desc"},participant:{type:String,default:null},period:{type:String,default:null},phase:{type:String,default:null}},setup(i){const t=i,a=e.ref([]),n=e.ref(!1),l=e.ref(!0),s=e.ref(0),u=e.ref(20),d=async()=>{if(n.value){s.value+=u.value;const r=await c.read({skip:s.value,limit:u.value,category:t.category,sortOrder:t.sortOrder,participant:t.participant,creator:t.creator,user:t.user,date:t.selectedDate,owner:t.owner,organization:t.organization,period:t.period,phase:t.phase});r.length===0?n.value=!1:n.value=!0,a.value=[...a.value,...r]}};return e.onMounted(async()=>{l.value=!0,console.log(t.selectedDate);const r=await c.read({skip:s.value,limit:u.value,category:t.category,participant:t.participant,sortOrder:t.sortOrder,user:t.user,owner:t.owner,creator:t.creator,date:t.selectedDate,organization:t.organization,period:t.period,phase:t.phase});r.length===0?n.value=!1:n.value=!0,a.value=r,l.value=!1}),(r,y)=>(e.openBlock(),e.createElementBlock("section",f,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"scaleTransition",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[l.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(u.value,o=>(e.openBlock(),e.createBlock(m.default,{key:o}))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"scaleTransition"},{default:e.withCtx(()=>[!l.value&&a.value.length<1?(e.openBlock(),e.createBlock(g.default,{key:0,title:"No Events Found",description:"Currently, there are no events available. Please check back later.",class:"pd-medium mn-thin bg-grey radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"scaleTransition",class:"container"},{default:e.withCtx(()=>[!l.value&&a.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.value,(o,p)=>(e.openBlock(),e.createBlock(v.default,{onClick:h=>r.$router.push({name:"Event",params:{url:o.url}}),key:o._id,event:o,user:i.user,type:"normal",class:e.normalizeClass(["bg-grey radius-big mn-medium",{"br-b br-solid br-black-transp-10":p!==a.value.length-1}])},null,8,["onClick","event","user","class"]))),128)):e.createCommentVNode("",!0),n.value&&a.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:d,class:"w-100 bg-main button"},"Load more")):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=k;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./components/blocks/CardEvent.vue.cjs"),t=require("./components/sections/Feed.vue.cjs"),n=require("./components/sections/List.vue.cjs"),u=require("./components/layouts/layoutEvents.vue.cjs"),r=require("./components/pages/EditEvent.vue.cjs"),s=require("./components/pages/Event.vue.cjs"),o=require("./components/pages/Events.vue.cjs"),a=require("./store/events.cjs"),d=require("./router/events.cjs"),i={CardEvent:e.default,Feed:t.default,List:n.default,EventsLayout:u.default,EditEvent:r.default,EventPage:s.default,EventsPage:o.default,eventsStore:a,eventsRoutes:d.default};exports.default=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./components/blocks/CardEvent.vue.cjs"),t=require("./components/sections/Feed.vue.cjs"),n=require("./components/sections/List.vue.cjs"),r=require("./components/layouts/layoutEvents.vue.cjs"),u=require("./components/pages/EditEvent.vue.cjs"),s=require("./components/pages/Event.vue.cjs"),o=require("./components/pages/Events.vue.cjs"),a=require("./store/events.cjs"),d=require("./router/events.cjs");exports.CardEvent=e.default;exports.Feed=t.default;exports.List=n.default;exports.EventsLayout=r.default;exports.EditEvent=u.default;exports.EventPage=s.default;exports.EventsPage=o.default;exports.eventsStore=a;exports.eventsRoutes=d.default;
@@ -1,23 +1,20 @@
1
- import t from "./components/blocks/CardEvent.vue.js";
2
- import m from "./components/sections/Feed.vue.js";
3
- import o from "./components/sections/List.vue.js";
4
- import e from "./components/layouts/layoutEvents.vue.js";
5
- import r from "./components/pages/EditEvent.vue.js";
6
- import i from "./components/pages/Event.vue.js";
7
- import n from "./components/pages/Events.vue.js";
8
- import * as s from "./store/events.js";
9
- import f from "./router/events.js";
10
- const u = {
11
- CardEvent: t,
12
- Feed: m,
13
- List: o,
14
- EventsLayout: e,
15
- EditEvent: r,
16
- EventPage: i,
17
- EventsPage: n,
18
- eventsStore: s,
19
- eventsRoutes: f
20
- };
1
+ import { default as o } from "./components/blocks/CardEvent.vue.js";
2
+ import { default as f } from "./components/sections/Feed.vue.js";
3
+ import { default as d } from "./components/sections/List.vue.js";
4
+ import { default as p } from "./components/layouts/layoutEvents.vue.js";
5
+ import { default as x } from "./components/pages/EditEvent.vue.js";
6
+ import { default as n } from "./components/pages/Event.vue.js";
7
+ import { default as E } from "./components/pages/Events.vue.js";
8
+ import * as e from "./store/events.js";
9
+ import { default as g } from "./router/events.js";
21
10
  export {
22
- u as default
11
+ o as CardEvent,
12
+ x as EditEvent,
13
+ n as EventPage,
14
+ p as EventsLayout,
15
+ E as EventsPage,
16
+ f as Feed,
17
+ d as List,
18
+ g as eventsRoutes,
19
+ e as eventsStore
23
20
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../../../../node_modules/axios/lib/axios.cjs"),u=require("vue"),c=require("../../globals/store/globals.cjs"),s=d.default.create({baseURL:process.env.API_URL,withCredentials:!0}),r=u.reactive({all:[],filter:{tags:[],period:"",date:null},pagination:{page:1,perPage:18},sort:{current:"popularity",ascending:!1},current:{_id:"",cover:"",url:"",status:"",name:"",tags:[],date:{start:null,false:null},views:0,content:[]}});async function i(e={}){e.params=e.params||{},e.params.skip=e.skip||0,e.params.limit=e.limit||9,e.params.tags=e.tags||[],e.phase&&(e.params={phase:e.phase}),e.url&&(e.params={url:e.url}),e.period&&(e.params.period=e.period),e.category&&(e.params.category=e.category),e.organization&&(e.params.organization=e.organization),e.date&&(e.params.date=e.date),e.participant&&(e.params.participant=e.participant),e.owner&&(e.params.owner=e.owner),e.creator&&(e.params.creator=e.creator),e.user&&(e.params.user=e.user),e.sortOrder&&(e.params.sortOrder=e.sortOrder),e.sortParam&&(e.params.sortParam=e.sortParam),e.params.skip=e.skip||0,e.params.limit=e.limit||10;try{console.log("Request params:"+e.params);const a=await s.get("/api/events/read",{params:e.params});return console.log(e.params),e.url?t(a.data,"current"):t(a.data,"all"),Promise.resolve(a.data)}catch(a){return c.setError(a),Promise.reject(a)}}async function n(e){return s.post("/api/events/create",e).then(a=>(t(a.data,"current"),Promise.resolve(a.data)),a=>(c.setError(a),Promise.reject(a)))}async function f(e){return s.post("/api/events/update",e).then(a=>(t(a.data,"current"),Promise.resolve(a.data)),a=>(c.setError(a),Promise.reject(a)))}async function g(e){return await s.post("/api/events/delete",{_id:e}).then(a=>{const l=r.all.findIndex(m=>m._id===e);return l!==-1&&r.all.splice(l,1),Promise.resolve(a.data)},a=>(c.setError(a),Promise.reject(a)))}function t(e,a){r[a]=e}function v(){r.current={_id:"",cover:"",url:"",phase:"",name:"",tags:[],date:{start:null,false:null},views:0,content:[]}}u.watch(r,(e,a)=>{});exports.clean=v;exports.create=n;exports.read=i;exports.remove=g;exports.set=t;exports.state=r;exports.update=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../../../../node_modules/axios/lib/axios.cjs"),u=require("vue"),c=require("../../globals/store/globals.cjs"),s=d.default.create({baseURL:process.env.API_URL,withCredentials:!0}),r=u.reactive({all:[],filter:{tags:[],period:"",date:null},pagination:{page:1,perPage:18},sort:{current:"popularity",ascending:!1},current:{_id:"",cover:"",url:"",status:"",name:"",tags:[],date:{start:null,false:null},views:0,content:[]}});async function i(a={}){a.params=a.params||{},a.params.skip=a.skip||0,a.params.limit=a.limit||9,a.params.tags=a.tags||[],a.phase&&(a.params={phase:a.phase}),a.url&&(a.params={url:a.url}),a.period&&(a.params.period=a.period),a.category&&(a.params.category=a.category),a.organization&&(a.params.organization=a.organization),a.date&&(a.params.date=a.date),a.participant&&(a.params.participant=a.participant),a.owner&&(a.params.owner=a.owner),a.creator&&(a.params.creator=a.creator),a.user&&(a.params.user=a.user),a.sortOrder&&(a.params.sortOrder=a.sortOrder),a.sortParam&&(a.params.sortParam=a.sortParam),a.params.skip=a.skip||0,a.params.limit=a.limit||10;try{console.log("Request params:"+a.params);const e=await s.get("/api/events/read",{params:a.params});return console.log(a.params),a.url?t(e.data,"current"):t(e.data,"all"),Promise.resolve(e.data)}catch(e){return c.setError(e),Promise.reject(e)}}async function n(a){return s.post("/api/events/create",a).then(e=>(t(e.data,"current"),Promise.resolve(e.data)),e=>(c.setError(e),Promise.reject(e)))}async function f(a){return s.post("/api/events/update",a).then(e=>(t(e.data,"current"),Promise.resolve(e.data)),e=>(c.setError(e),Promise.reject(e)))}async function g(a){return await s.post("/api/events/delete",{_id:a}).then(e=>{const l=r.all.findIndex(m=>m._id===a);return l!==-1&&r.all.splice(l,1),Promise.resolve(e.data)},e=>(c.setError(e),Promise.reject(e)))}function t(a,e){r[e]=a}function v(){r.current={_id:"",cover:"",url:"",phase:"",name:"",tags:[],date:{start:null,false:null},views:0,content:[]}}u.watch(r,(a,e)=>{});exports.clean=v;exports.create=n;exports.read=i;exports.remove=g;exports.set=t;exports.state=r;exports.update=f;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../globals/components/sections/Title.vue.cjs"),l=require("../sections/GalleryWithCategories.vue.cjs"),o={class:"wrapper"},s={style:{"min-height":"100vh"}},a={__name:"Gallery",setup(i){return(t,c)=>(e.openBlock(),e.createElementBlock("div",o,[e.createVNode(r.default,{text:t.$t("gallery.title"),class:"pd-medium"},null,8,["text"]),e.createElementVNode("div",s,[e.createVNode(l.default)])]))}};exports.default=a;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../globals/components/sections/Title.vue.cjs"),l=require("../sections/GalleryWithCategories.vue.cjs"),o={class:"wrapper"},s={style:{"min-height":"100vh"}},a={__name:"Gallery",setup(c){return(t,i)=>(e.openBlock(),e.createElementBlock("div",o,[e.createVNode(r.default,{text:t.$t("gallery.title"),class:"pd-medium"},null,8,["text"]),e.createElementVNode("div",s,[e.createVNode(l.default)])]))}};exports.default=a;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),I=require("../../../../components/Field/Field.vue2.cjs"),q=require("../../../../components/Button/Button.vue2.cjs"),M=require("../../../../components/Select/Select.vue2.cjs"),s=require("../../store/gallery.cjs"),P=require("../../../../components/EditImages/EditImages.vue.cjs");require("./BackofficeGallery.vue2.cjs");const j=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),c=i=>(e.pushScopeId("data-v-d6a1c805"),i=i(),e.popScopeId(),i),G={class:"pos-relative w-100"},$={class:"mn-semi flex-v-center flex-nowrap flex"},D=c(()=>e.createElementVNode("h1",{class:"mn-r-small"},"Manage Gallery",-1)),T=["data-id"],U=["src","onClick"],F={key:1,class:"radius-small bg-white"},O=["src","onClick"],L={class:"t-black p-small mn-thin"},A=c(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Size",-1)),H=c(()=>e.createElementVNode("br",null,null,-1)),R={class:"pd-2px radius-big d-inline-block bg-grey"},J={class:"t-black p-small mn-small uppe"},K=c(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Categories",-1)),Q=c(()=>e.createElementVNode("br",null,null,-1)),W={class:"pd-2px radius-big d-inline-block bg-grey t-semi"},X={class:"flex-nowrap flex"},Y=["onClick"],Z={class:"modal pd-thin"},ee={class:"modal-content radius-big"},te={class:""},le=["src"],oe={key:0,class:"flex-v-center flex m modal pd-big"},ae={class:"modal-content radius-small pd-medium bg-white"},se=["src"],ne=["src"],ce={__name:"BackofficeGallery",setup(i){const r=e.ref(!0),h=e.ref(null);let g=1;const f=10;let _=e.ref(null),k=e.ref(!1);const d=e.ref([]),E=o=>{d.value=o},w=e.computed(()=>y.value==="all"?s.state.gallery:s.state.gallery.filter(o=>o.categories.includes(y.value))),V=async()=>{k.value=!0,await s.actions.fetchGallery(g,f),k.value=!1},u=e.ref(null),t=e.ref({categories:"",size:"",image:!1}),m=e.ref(null),v=o=>{console.log(r.value),r.value?N(o):(u.value="modal",t.value.image=o,b())},N=o=>{u.value="edit-modal",t.value=o||{categories:"",size:"",image:null},b()},n=()=>{t.value={categories:"",size:"",image:!1},m.value=null,B()},b=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},B=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""},C=[{name:"Small",value:""},{name:"Regular",value:"grid-item--width1 grid-item--height1"},{name:"Medium",value:"grid-item--width2 grid-item--height2"},{name:"Big",value:"grid-item--width3 grid-item--height3"}],x=async o=>{await s.actions.deletePhoto(o)},S=async()=>{await s.actions.updatePhoto(t.value),n()},z=async o=>{if(d.length<1||!t.value.categories||!t.value.size){console.error("All fields are required.");return}await s.actions.createPhoto({images:d.value,size:t.value.size,categories:typeof t.value.categories=="string"?t.value.categories.split(",").map(a=>a.trim()):t.value.categories}),n()};let y=e.ref("all");return e.onMounted(async()=>{await s.actions.fetchGallery(g,f),typeof window<"u"&&new IntersectionObserver(a=>{a.some(l=>l.isIntersecting)&&(g+=1,V())}).observe(_.value)}),(o,a)=>(e.openBlock(),e.createElementBlock("div",G,[e.createElementVNode("div",$,[D,r.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:a[0]||(a[0]=l=>v(null)),class:"t-white t-black bg-second i-big radius-extra"},"+")):e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:h,class:"cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(w),(l,re)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,"data-id":l.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[!r.value&&h.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 h-100 o-hidden radius-medium object-fit-cover",onClick:p=>v(l.image)},null,8,U)):(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 radius-small mn-small h-10r object-fit-cover",onClick:p=>v(l)},null,8,O),e.createElementVNode("p",L,[A,H,e.createElementVNode("span",R,e.toDisplayString(l.size.name),1)]),e.createElementVNode("p",J,[K,Q,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.categories,p=>(e.openBlock(),e.createElementBlock("span",W,e.toDisplayString(p),1))),256))]),e.createElementVNode("div",X,[e.createElementVNode("button",{class:"button-small w-100 button",onClick:p=>x(l._id)},"Delete",8,Y)])]))]),_:2},1024)],8,T))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:_,class:"sentinel"},null,512),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",Z,[e.createElementVNode("div",ee,[e.createElementVNode("div",te,[e.createElementVNode("span",{class:"close",onClick:n},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+t.value.image},null,8,le)])])],512),[[e.vShow,t.value.image!==!1&&u.value==="modal"]])]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.value.image!==!1&&u.value==="edit-modal"?(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",ae,[e.createElementVNode("span",{class:"close",onClick:n},"×"),typeof m.value=="string"?(e.openBlock(),e.createElementBlock("img",{key:0,src:m.value,class:"radius-small w-100 mn-small h-20r object-fit-cover"},null,8,se)):e.createCommentVNode("",!0),typeof m.value=="object"&&t.value.image!==null?(e.openBlock(),e.createElementBlock("img",{key:1,class:"radius-small w-100 mn-small h-20r object-fit-cover",src:"/photos/"+t.value.cover},null,8,ne)):e.createCommentVNode("",!0),e.createVNode(M.default,{options:C,label:"Size",select:t.value.size,"onUpdate:select":a[1]||(a[1]=l=>t.value.size=l),placeholder:"Select Size",class:"bg-grey pd-thin radius-small mn-thin t-black"},null,8,["select"]),e.createVNode(I.default,{field:t.value.categories,"onUpdate:field":a[2]||(a[2]=l=>t.value.categories=l),type:"text",label:"Categories",placeholder:"Enter categories for image (comma separated)",class:"bg-grey pd-thin radius-small mn-medium t-black"},null,8,["field"]),e.createVNode(P.default,{images:d.value,"onUpdate:images":E,uploadPath:"photos",class:"mn-semi"},null,8,["images"]),e.createVNode(q.default,{submit:t.value._id?S:z,callback:n,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value._id?"Update":"Create"),1)]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)]),_:1})],512)]))}},ie=j.default(ce,[["__scopeId","data-v-d6a1c805"]]);exports.default=ie;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),I=require("../../../../components/Field/Field.vue2.cjs"),q=require("../../../../components/Button/Button.vue2.cjs"),M=require("../../../../components/Select/Select.vue2.cjs"),s=require("../../store/gallery.cjs"),P=require("../../../../components/EditImages/EditImages.vue.cjs");require("./BackofficeGallery.vue2.cjs");const j=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),c=i=>(e.pushScopeId("data-v-d6a1c805"),i=i(),e.popScopeId(),i),G={class:"pos-relative w-100"},D={class:"mn-semi flex-v-center flex-nowrap flex"},T=c(()=>e.createElementVNode("h1",{class:"mn-r-small"},"Manage Gallery",-1)),U=["data-id"],$=["src","onClick"],F={key:1,class:"radius-small bg-white"},O=["src","onClick"],L={class:"t-black p-small mn-thin"},A=c(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Size",-1)),H=c(()=>e.createElementVNode("br",null,null,-1)),R={class:"pd-2px radius-big d-inline-block bg-grey"},J={class:"t-black p-small mn-small uppe"},K=c(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Categories",-1)),Q=c(()=>e.createElementVNode("br",null,null,-1)),W={class:"pd-2px radius-big d-inline-block bg-grey t-semi"},X={class:"flex-nowrap flex"},Y=["onClick"],Z={class:"modal pd-thin"},ee={class:"modal-content radius-big"},te={class:""},le=["src"],oe={key:0,class:"flex-v-center flex m modal pd-big"},ae={class:"modal-content radius-small pd-medium bg-white"},se=["src"],ne=["src"],ce={__name:"BackofficeGallery",setup(i){const r=e.ref(!0),h=e.ref(null);let g=1;const f=10;let _=e.ref(null),k=e.ref(!1);const d=e.ref([]),E=o=>{d.value=o},w=e.computed(()=>y.value==="all"?s.state.gallery:s.state.gallery.filter(o=>o.categories.includes(y.value))),V=async()=>{k.value=!0,await s.actions.fetchGallery(g,f),k.value=!1},u=e.ref(null),t=e.ref({categories:"",size:"",image:!1}),m=e.ref(null),v=o=>{console.log(r.value),r.value?N(o):(u.value="modal",t.value.image=o,b())},N=o=>{u.value="edit-modal",t.value=o||{categories:"",size:"",image:null},b()},n=()=>{t.value={categories:"",size:"",image:!1},m.value=null,B()},b=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},B=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""},C=[{name:"Small",value:""},{name:"Regular",value:"grid-item--width1 grid-item--height1"},{name:"Medium",value:"grid-item--width2 grid-item--height2"},{name:"Big",value:"grid-item--width3 grid-item--height3"}],x=async o=>{await s.actions.deletePhoto(o)},S=async()=>{await s.actions.updatePhoto(t.value),n()},z=async o=>{if(d.length<1||!t.value.categories||!t.value.size){console.error("All fields are required.");return}await s.actions.createPhoto({images:d.value,size:t.value.size,categories:typeof t.value.categories=="string"?t.value.categories.split(",").map(a=>a.trim()):t.value.categories}),n()};let y=e.ref("all");return e.onMounted(async()=>{await s.actions.fetchGallery(g,f),typeof window<"u"&&new IntersectionObserver(a=>{a.some(l=>l.isIntersecting)&&(g+=1,V())}).observe(_.value)}),(o,a)=>(e.openBlock(),e.createElementBlock("div",G,[e.createElementVNode("div",D,[T,r.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:a[0]||(a[0]=l=>v(null)),class:"t-white t-black bg-second i-big radius-extra"},"+")):e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:h,class:"cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(w),(l,re)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,"data-id":l.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[!r.value&&h.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 h-100 o-hidden radius-medium object-fit-cover",onClick:p=>v(l.image)},null,8,$)):(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 radius-small mn-small h-10r object-fit-cover",onClick:p=>v(l)},null,8,O),e.createElementVNode("p",L,[A,H,e.createElementVNode("span",R,e.toDisplayString(l.size.name),1)]),e.createElementVNode("p",J,[K,Q,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.categories,p=>(e.openBlock(),e.createElementBlock("span",W,e.toDisplayString(p),1))),256))]),e.createElementVNode("div",X,[e.createElementVNode("button",{class:"button-small w-100 button",onClick:p=>x(l._id)},"Delete",8,Y)])]))]),_:2},1024)],8,U))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:_,class:"sentinel"},null,512),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",Z,[e.createElementVNode("div",ee,[e.createElementVNode("div",te,[e.createElementVNode("span",{class:"close",onClick:n},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+t.value.image},null,8,le)])])],512),[[e.vShow,t.value.image!==!1&&u.value==="modal"]])]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.value.image!==!1&&u.value==="edit-modal"?(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",ae,[e.createElementVNode("span",{class:"close",onClick:n},"×"),typeof m.value=="string"?(e.openBlock(),e.createElementBlock("img",{key:0,src:m.value,class:"radius-small w-100 mn-small h-20r object-fit-cover"},null,8,se)):e.createCommentVNode("",!0),typeof m.value=="object"&&t.value.image!==null?(e.openBlock(),e.createElementBlock("img",{key:1,class:"radius-small w-100 mn-small h-20r object-fit-cover",src:"/photos/"+t.value.cover},null,8,ne)):e.createCommentVNode("",!0),e.createVNode(M.default,{options:C,label:"Size",select:t.value.size,"onUpdate:select":a[1]||(a[1]=l=>t.value.size=l),placeholder:"Select Size",class:"bg-grey pd-thin radius-small mn-thin t-black"},null,8,["select"]),e.createVNode(I.default,{field:t.value.categories,"onUpdate:field":a[2]||(a[2]=l=>t.value.categories=l),type:"text",label:"Categories",placeholder:"Enter categories for image (comma separated)",class:"bg-grey pd-thin radius-small mn-medium t-black"},null,8,["field"]),e.createVNode(P.default,{images:d.value,"onUpdate:images":E,uploadPath:"photos",class:"mn-semi"},null,8,["images"]),e.createVNode(q.default,{submit:t.value._id?S:z,callback:n,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value._id?"Update":"Create"),1)]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)]),_:1})],512)]))}},ie=j.default(ce,[["__scopeId","data-v-d6a1c805"]]);exports.default=ie;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),z=require("vue-router"),S=require("../../../../components/Field/Field.vue2.cjs"),q=require("../../../../components/Button/Button.vue2.cjs"),M=require("../../../../components/Select/Select.vue2.cjs"),F=require("../../../../components/Upload/Upload.vue.cjs"),s=require("../../store/gallery.cjs");require("./GalleryWithCategories.vue2.cjs");const I=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),P={class:"pd-medium flex-nowrap flex pd-t-thin pd-b-thin o-scroll"},j=["onClick"],G=["data-id"],R=["src","onClick"],T={class:"modal pd-thin"},U={class:"modal-content radius-big"},$={class:""},D=["src"],L={key:0,class:"flex-v-center flex m modal pd-big"},O={class:"modal-content radius-small pd-medium bg-white"},A=["src"],W=["src"],H={__name:"GalleryWithCategories",setup(K){z.useRoute();const h=!1,m=e.ref(null),_=["all","place","drinks","people","events"];let d=1;const v=10;let g=e.ref(null),p=e.ref(!1);const k=e.computed(()=>c.value==="all"?s.state.gallery:s.state.gallery.filter(a=>a.categories.includes(c.value))),y=async()=>{p.value=!0,await s.actions.fetchGallery(d,v),p.value=!1},r=e.ref(null),t=e.ref({categories:"",size:"",image:!1}),i=e.ref(null),b=a=>{h.value?w(a):(r.value="modal",t.value.image=a,f())},w=a=>{r.value="edit-modal",t.value=a||{categories:"",size:"",image:null},f()},n=()=>{t.value={categories:"",size:"",image:!1},i.value=null,V()},f=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},V=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""},C=[{name:"Small",value:""},{name:"Regular",value:"grid-item--width1 grid-item--height1"},{name:"Medium",value:"grid-item--width2 grid-item--height2"},{name:"Big",value:"grid-item--width3 grid-item--height3"}],E=async()=>{await s.actions.updatePhoto(t.value),n()},N=a=>{const o=a.files;if(t.value.image=o,o&&o.length>0){const l=new FileReader;l.onload=u=>{i.value=u.target.result},l.readAsDataURL(o[0])}},B=async a=>{if(!t.value.image||!t.value.categories||!t.value.size){console.error("All fields are required.");return}await s.actions.createPhoto({...t.value,size:t.value.size,categories:typeof t.value.categories=="string"?t.value.categories.split(",").map(o=>o.trim()):t.value.categories}),n()};let c=e.ref("all");const x=a=>{c.value=a};return e.onMounted(async()=>{await s.actions.fetchGallery(d,v),typeof window<"u"&&new IntersectionObserver(o=>{o.some(l=>l.isIntersecting)&&(d+=1,y())}).observe(g.value)}),(a,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",P,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(_,l=>e.createElementVNode("a",{key:l,onClick:u=>x(l),class:e.normalizeClass(["h3 uppercase mn-r-big",{"t-transp":e.unref(c)!==l}])},e.toDisplayString(a.$t("gallery.categories."+l)),11,j)),64)),e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:m,class:"pd-medium cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(k),(l,u)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,"data-id":l.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[m.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 h-100 o-hidden radius-medium object-fit-cover",onClick:Q=>b(l.image)},null,8,R)):e.createCommentVNode("",!0)]),_:2},1024)],8,G))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:g,class:"sentinel"},null,512),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",T,[e.createElementVNode("div",U,[e.createElementVNode("div",$,[e.createElementVNode("span",{class:"close",onClick:n},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+t.value.image},null,8,D)])])],512),[[e.vShow,t.value.image!==!1&&r.value==="modal"]])]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.value.image!==!1&&r.value==="edit-modal"?(e.openBlock(),e.createElementBlock("div",L,[e.createElementVNode("div",O,[e.createElementVNode("span",{class:"close",onClick:n},"×"),typeof i.value=="string"?(e.openBlock(),e.createElementBlock("img",{key:0,src:i.value,class:"radius-small w-100 mn-small h-20r object-fit-cover"},null,8,A)):e.createCommentVNode("",!0),typeof i.value=="object"&&t.value.image!==null?(e.openBlock(),e.createElementBlock("img",{key:1,class:"radius-small w-100 mn-small h-20r object-fit-cover",src:"/photos/"+t.value.cover},null,8,W)):e.createCommentVNode("",!0),t.value._id?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(F.default,{key:2,id:"photo",name:"photo",type:"file",class:"t-black bg-grey pd-thin radius-small mn-thin",onFileChange:N,multiple:"true"})),e.createVNode(M.default,{options:C,label:"Size",select:t.value.size,"onUpdate:select":o[1]||(o[1]=l=>t.value.size=l),placeholder:"Select Size",class:"bg-grey pd-thin radius-small mn-thin t-black"},null,8,["select"]),e.createVNode(S.default,{field:t.value.categories,"onUpdate:field":o[2]||(o[2]=l=>t.value.categories=l),type:"text",label:"Categories",placeholder:"Enter categories for image (comma separated)",class:"bg-grey pd-thin radius-small mn-medium t-black"},null,8,["field"]),e.createVNode(q.default,{submit:t.value._id?E:B,callback:n,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value._id?"Update":"Create"),1)]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)]),_:1})],512)]))}},J=I.default(H,[["__scopeId","data-v-34379ac8"]]);exports.default=J;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),z=require("vue-router"),S=require("../../../../components/Field/Field.vue2.cjs"),q=require("../../../../components/Button/Button.vue2.cjs"),M=require("../../../../components/Select/Select.vue2.cjs"),F=require("../../../../components/Upload/Upload.vue.cjs"),s=require("../../store/gallery.cjs");require("./GalleryWithCategories.vue2.cjs");const I=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),P={class:"pd-medium flex-nowrap flex pd-t-thin pd-b-thin o-scroll"},j=["onClick"],G=["data-id"],R=["src","onClick"],T={class:"modal pd-thin"},U={class:"modal-content radius-big"},D={class:""},L=["src"],O={key:0,class:"flex-v-center flex m modal pd-big"},$={class:"modal-content radius-small pd-medium bg-white"},A=["src"],W=["src"],H={__name:"GalleryWithCategories",setup(K){z.useRoute();const h=!1,m=e.ref(null),_=["all","place","drinks","people","events"];let d=1;const v=10;let g=e.ref(null),p=e.ref(!1);const k=e.computed(()=>c.value==="all"?s.state.gallery:s.state.gallery.filter(a=>a.categories.includes(c.value))),y=async()=>{p.value=!0,await s.actions.fetchGallery(d,v),p.value=!1},r=e.ref(null),t=e.ref({categories:"",size:"",image:!1}),i=e.ref(null),b=a=>{h.value?w(a):(r.value="modal",t.value.image=a,f())},w=a=>{r.value="edit-modal",t.value=a||{categories:"",size:"",image:null},f()},n=()=>{t.value={categories:"",size:"",image:!1},i.value=null,V()},f=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},V=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""},C=[{name:"Small",value:""},{name:"Regular",value:"grid-item--width1 grid-item--height1"},{name:"Medium",value:"grid-item--width2 grid-item--height2"},{name:"Big",value:"grid-item--width3 grid-item--height3"}],E=async()=>{await s.actions.updatePhoto(t.value),n()},N=a=>{const o=a.files;if(t.value.image=o,o&&o.length>0){const l=new FileReader;l.onload=u=>{i.value=u.target.result},l.readAsDataURL(o[0])}},B=async a=>{if(!t.value.image||!t.value.categories||!t.value.size){console.error("All fields are required.");return}await s.actions.createPhoto({...t.value,size:t.value.size,categories:typeof t.value.categories=="string"?t.value.categories.split(",").map(o=>o.trim()):t.value.categories}),n()};let c=e.ref("all");const x=a=>{c.value=a};return e.onMounted(async()=>{await s.actions.fetchGallery(d,v),typeof window<"u"&&new IntersectionObserver(o=>{o.some(l=>l.isIntersecting)&&(d+=1,y())}).observe(g.value)}),(a,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",P,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(_,l=>e.createElementVNode("a",{key:l,onClick:u=>x(l),class:e.normalizeClass(["h3 uppercase mn-r-big",{"t-transp":e.unref(c)!==l}])},e.toDisplayString(a.$t("gallery.categories."+l)),11,j)),64)),e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:m,class:"pd-medium cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(k),(l,u)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,"data-id":l.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[m.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 h-100 o-hidden radius-medium object-fit-cover",onClick:Q=>b(l.image)},null,8,R)):e.createCommentVNode("",!0)]),_:2},1024)],8,G))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:g,class:"sentinel"},null,512),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",T,[e.createElementVNode("div",U,[e.createElementVNode("div",D,[e.createElementVNode("span",{class:"close",onClick:n},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+t.value.image},null,8,L)])])],512),[[e.vShow,t.value.image!==!1&&r.value==="modal"]])]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.value.image!==!1&&r.value==="edit-modal"?(e.openBlock(),e.createElementBlock("div",O,[e.createElementVNode("div",$,[e.createElementVNode("span",{class:"close",onClick:n},"×"),typeof i.value=="string"?(e.openBlock(),e.createElementBlock("img",{key:0,src:i.value,class:"radius-small w-100 mn-small h-20r object-fit-cover"},null,8,A)):e.createCommentVNode("",!0),typeof i.value=="object"&&t.value.image!==null?(e.openBlock(),e.createElementBlock("img",{key:1,class:"radius-small w-100 mn-small h-20r object-fit-cover",src:"/photos/"+t.value.cover},null,8,W)):e.createCommentVNode("",!0),t.value._id?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(F.default,{key:2,id:"photo",name:"photo",type:"file",class:"t-black bg-grey pd-thin radius-small mn-thin",onFileChange:N,multiple:"true"})),e.createVNode(M.default,{options:C,label:"Size",select:t.value.size,"onUpdate:select":o[1]||(o[1]=l=>t.value.size=l),placeholder:"Select Size",class:"bg-grey pd-thin radius-small mn-thin t-black"},null,8,["select"]),e.createVNode(S.default,{field:t.value.categories,"onUpdate:field":o[2]||(o[2]=l=>t.value.categories=l),type:"text",label:"Categories",placeholder:"Enter categories for image (comma separated)",class:"bg-grey pd-thin radius-small mn-medium t-black"},null,8,["field"]),e.createVNode(q.default,{submit:t.value._id?E:B,callback:n,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value._id?"Update":"Create"),1)]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)]),_:1})],512)]))}},J=I.default(H,[["__scopeId","data-v-34379ac8"]]);exports.default=J;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./store/gallery.cjs"),l=require("./router/gallery.router.cjs"),r={galleryStore:e,galleryRouter:l.default};exports.default=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./store/gallery.cjs"),r=require("./router/gallery.router.cjs");exports.galleryStore=e;exports.galleryRouter=r.default;
@@ -1,9 +1,6 @@
1
- import * as l from "./store/gallery.js";
2
- import r from "./router/gallery.router.js";
3
- const a = {
4
- galleryStore: l,
5
- galleryRouter: r
6
- };
1
+ import * as r from "./store/gallery.js";
2
+ import { default as l } from "./router/gallery.router.js";
7
3
  export {
8
- a as default
4
+ l as galleryRouter,
5
+ r as galleryStore
9
6
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router"),h=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),f=require("../../../reports/components/sections/FormReport.vue.cjs"),g=require("../../../../components/Dropdown/Dropdown.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");const k={key:0,class:"pd-b-zero"},y={class:"w-100 flex-v-center flex-nojustify flex"},w={class:"w-100 flex-nowrap flex-v-center flex"},b=["src"],B={key:2,class:"t-semi"},E={key:1},V={key:2},$={class:"d-block mn-l-auto flex-nowrap flex flex-v-center"},p={key:0,class:"w-4r i-thin"},x={style:{position:"absolute",top:"0px",right:"0px"},class:"br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"},C=["src"],N={class:"bg-black pd-thin radius-small"},v=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),M={__name:"CardHeader",props:["user","entity","entityType","date","dateFormatted","owner","creator","members","membersPhotos","type"],setup(t){m.useRouter();function u(o){const r=new Date,i=new Date(o),s=Math.abs(r-i),a=Math.floor(s/1e3),n=Math.floor(a/60),l=Math.floor(n/60),c=Math.floor(l/24),d=Math.floor(c/7);return d>0?`${d} week${d>1?"s":""} ago`:c>0?`${c} day${c>1?"s":""} ago`:l>0?`${l} hour${l>1?"s":""} ago`:n>0?`${n} minute${n>1?"s":""} ago`:"Just now"}return(o,r)=>{var i,s;return t.owner?(e.openBlock(),e.createElementBlock("header",k,[e.createElementVNode("div",y,[e.createElementVNode("div",w,[t.owner.target.profile.photo.length>0&&t.type!=="short"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(o.FILE_SERVER_URL||"")+t.owner.target.profile.photo,class:"radius-medium mn-r-thin i-thin",onClick:r[0]||(r[0]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},null,8,b)):e.createCommentVNode("",!0),!t.owner.target.profile.photo&&t.type!=="short"?(e.openBlock(),e.createBlock(h.default,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:r[1]||(r[1]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))})):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("span",B,[e.createElementVNode("span",{onClick:r[2]||(r[2]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},e.toDisplayString(t.owner.target.profile.name),1),!t.creator.hidden&&t.owner.target.profile.name!==((i=t.creator.target.profile)==null?void 0:i.name)?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:r[3]||(r[3]=e.withModifiers(a=>o.$router.push({name:"User Profile",params:{_id:t.creator.target._id}}),["stop"]))}," · by "+e.toDisplayString((s=t.creator.target.profile)==null?void 0:s.name),1)):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",E," · "+e.toDisplayString(u(t.date)),1)):e.createCommentVNode("",!0),t.dateFormatted?(e.openBlock(),e.createElementBlock("span",V," · "+e.toDisplayString(t.dateFormatted),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",$,[t.members?(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("span",x,e.toDisplayString(t.members),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.membersPhotos.slice(0,2),(a,n)=>(e.openBlock(),e.createElementBlock("img",{key:n,src:(o.FILE_SERVER_URL||"")+a,style:e.normalizeStyle({position:"absolute",top:"0px",right:n*20+20+"%",zIndex:1-n}),class:"br-solid br-2px br-white i-thin bg-grey radius-big"},null,12,C))),128))])):e.createCommentVNode("",!0)]),t.type!=="short"&&t.user&&t.user!=t.creator.target._id?(e.openBlock(),e.createBlock(g.default,{key:3,label:"...",align:"right",class:"cursor-pointer z-index-2 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",N,[t.user!==t.creator.target._id?(e.openBlock(),e.createBlock(f.default,{key:0,user:t.user,type:t.entityType,target:t.entity._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[v]),_:1},8,["user","type","target"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)}}};exports.default=M;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router"),h=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),f=require("../../../reports/components/sections/FormReport.vue.cjs"),g=require("../../../../components/Dropdown/Dropdown.vue2.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");const k={key:0,class:"pd-b-zero"},y={class:"w-100 flex-v-center flex-nojustify flex"},w={class:"w-100 flex-nowrap flex-v-center flex"},b=["src"],B={key:2,class:"t-semi"},E={key:1},V={key:2},p={class:"d-block mn-l-auto flex-nowrap flex flex-v-center"},x={key:0,class:"w-4r i-thin"},C={style:{position:"absolute",top:"0px",right:"0px"},class:"br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"},N=["src"],$={class:"bg-black pd-thin radius-small"},v=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),M={__name:"CardHeader",props:["user","entity","entityType","date","dateFormatted","owner","creator","members","membersPhotos","type"],setup(t){m.useRouter();function u(o){const r=new Date,i=new Date(o),s=Math.abs(r-i),a=Math.floor(s/1e3),n=Math.floor(a/60),l=Math.floor(n/60),c=Math.floor(l/24),d=Math.floor(c/7);return d>0?`${d} week${d>1?"s":""} ago`:c>0?`${c} day${c>1?"s":""} ago`:l>0?`${l} hour${l>1?"s":""} ago`:n>0?`${n} minute${n>1?"s":""} ago`:"Just now"}return(o,r)=>{var i,s;return t.owner?(e.openBlock(),e.createElementBlock("header",k,[e.createElementVNode("div",y,[e.createElementVNode("div",w,[t.owner.target.profile.photo.length>0&&t.type!=="short"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(o.FILE_SERVER_URL||"")+t.owner.target.profile.photo,class:"radius-medium mn-r-thin i-thin",onClick:r[0]||(r[0]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},null,8,b)):e.createCommentVNode("",!0),!t.owner.target.profile.photo&&t.type!=="short"?(e.openBlock(),e.createBlock(h.default,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:r[1]||(r[1]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))})):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("span",B,[e.createElementVNode("span",{onClick:r[2]||(r[2]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},e.toDisplayString(t.owner.target.profile.name),1),!t.creator.hidden&&t.owner.target.profile.name!==((i=t.creator.target.profile)==null?void 0:i.name)?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:r[3]||(r[3]=e.withModifiers(a=>o.$router.push({name:"User Profile",params:{_id:t.creator.target._id}}),["stop"]))}," · by "+e.toDisplayString((s=t.creator.target.profile)==null?void 0:s.name),1)):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",E," · "+e.toDisplayString(u(t.date)),1)):e.createCommentVNode("",!0),t.dateFormatted?(e.openBlock(),e.createElementBlock("span",V," · "+e.toDisplayString(t.dateFormatted),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",p,[t.members?(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("span",C,e.toDisplayString(t.members),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.membersPhotos.slice(0,2),(a,n)=>(e.openBlock(),e.createElementBlock("img",{key:n,src:(o.FILE_SERVER_URL||"")+a,style:e.normalizeStyle({position:"absolute",top:"0px",right:n*20+20+"%",zIndex:1-n}),class:"br-solid br-2px br-white i-thin bg-grey radius-big"},null,12,N))),128))])):e.createCommentVNode("",!0)]),t.type!=="short"&&t.user&&t.user!=t.creator.target._id?(e.openBlock(),e.createBlock(g.default,{key:3,label:"...",align:"right",class:"cursor-pointer z-index-2 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",$,[t.user!==t.creator.target._id?(e.openBlock(),e.createBlock(f.default,{key:0,user:t.user,type:t.entityType,target:t.entity._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[v]),_:1},8,["user","type","target"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)}}};exports.default=M;
@@ -2,7 +2,7 @@ import { openBlock as t, createElementBlock as i, createElementVNode as l, withM
2
2
  import { useRouter as v } from "vue-router";
3
3
  import p from "../../../icons/placeholders/PlaceholderUserpic.vue.js";
4
4
  import E from "../../../reports/components/sections/FormReport.vue.js";
5
- import R from "../../../../components/Dropdown/Dropdown.vue.js";
5
+ import R from "../../../../components/Dropdown/Dropdown.vue2.js";
6
6
  import "../../../../components/Button/Button.vue.js";
7
7
  import "../../../auth/store/auth.js";
8
8
  import "../../../organizations/store/memberships.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),n={};function c(l,i){const t=e.resolveComponent("router-view");return e.openBlock(),e.createBlock(t,null,{default:e.withCtx(({Component:o,route:_})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o)))]),_:1})}const u=r.default(n,[["render",c]]);exports.default=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),n={};function c(l,_){const t=e.resolveComponent("router-view");return e.openBlock(),e.createBlock(t,null,{default:e.withCtx(({Component:o,route:i})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o)))]),_:1})}const u=r.default(n,[["render",c]]);exports.default=u;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("../../../icons/skeletons/SkeletonEvent.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");const p=require("../../../../components/EmptyState/EmptyState.vue.cjs");require("vue-i18n");const m={class:"feed"},f={__name:"Feed",props:{states:{type:Object,default:()=>({empty:{title:String,description:String}})},store:{type:Object,default:()=>({read:Function,state:Object})},options:{type:Object,default:()=>({category:null,limit:20,skip:0,owner:null,creator:null,user:null,status:null,period:null})}},setup(s){const t=s,o=e.ref([]),a=e.ref(!0);let r=e.ref(!0),i=e.ref(t.options.skip?t.options.skip:0),n=e.ref(t.options.limit?t.options.limit:10);e.computed(()=>({skip:i.value,limit:n.value,...t.options}));const u=async()=>{if(a.value){i.value+=n.value;const l=await t.store.read({skip:i.value,limit:n.value,...t.options});l.length===0&&(a.value=!1),o.value=[...o.value,...l]}};return e.onMounted(async()=>{console.log(t.options);const l=await t.store.read({skip:i.value,limit:n.value,...t.options});l.length===0?a.value=!1:a.value=!0,o.value=l,r.value=!1}),(l,k)=>(e.openBlock(),e.createElementBlock("section",m,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"scaleTransition",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[e.unref(r)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(n),c=>(e.openBlock(),e.createBlock(d.default,{key:c}))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"scaleTransition"},{default:e.withCtx(()=>[!e.unref(r)&&o.value.length<1?(e.openBlock(),e.createBlock(p.default,{key:0,title:s.states.empty.title,description:s.states.empty.description,class:"pd-medium mn-thin bg-grey radius-big"},null,8,["title","description"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"scaleTransition",class:"cols-1 gap-thin"},{default:e.withCtx(()=>[!e.unref(r)&&o.value.length>0?e.renderSlot(l.$slots,"default",{key:0,items:o.value,user:l.user}):e.createCommentVNode("",!0),a.value&&o.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:u,class:"w-100 bg-main button"}," Load more ")):e.createCommentVNode("",!0)]),_:3})]))}};exports.default=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("../../../icons/skeletons/SkeletonEvent.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");const p=require("../../../../components/EmptyState/EmptyState.vue.cjs");require("vue-i18n");const m={class:"feed"},f={__name:"Feed",props:{states:{type:Object,default:()=>({empty:{title:String,description:String}})},store:{type:Object,default:()=>({read:Function,state:Object})},options:{type:Object,default:()=>({category:null,limit:20,skip:0,owner:null,creator:null,user:null,status:null,period:null})}},setup(s){const t=s,o=e.ref([]),a=e.ref(!0);let i=e.ref(!0),r=e.ref(t.options.skip?t.options.skip:0),n=e.ref(t.options.limit?t.options.limit:10);e.computed(()=>({skip:r.value,limit:n.value,...t.options}));const u=async()=>{if(a.value){r.value+=n.value;const l=await t.store.read({skip:r.value,limit:n.value,...t.options});l.length===0&&(a.value=!1),o.value=[...o.value,...l]}};return e.onMounted(async()=>{console.log(t.options);const l=await t.store.read({skip:r.value,limit:n.value,...t.options});l.length===0?a.value=!1:a.value=!0,o.value=l,i.value=!1}),(l,v)=>(e.openBlock(),e.createElementBlock("section",m,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"scaleTransition",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[e.unref(i)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(n),c=>(e.openBlock(),e.createBlock(d.default,{key:c}))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"scaleTransition"},{default:e.withCtx(()=>[!e.unref(i)&&o.value.length<1?(e.openBlock(),e.createBlock(p.default,{key:0,title:s.states.empty.title,description:s.states.empty.description,class:"pd-medium mn-thin bg-grey radius-big"},null,8,["title","description"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"scaleTransition",class:"cols-1 gap-thin"},{default:e.withCtx(()=>[!e.unref(i)&&o.value.length>0?e.renderSlot(l.$slots,"default",{key:0,items:o.value,user:l.user}):e.createCommentVNode("",!0),a.value&&o.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:u,class:"w-100 bg-main button"}," Load more ")):e.createCommentVNode("",!0)]),_:3})]))}};exports.default=f;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n={class:"w-100",itemprop:"name"},r={class:"h1",itemprop:"headline"},a={class:"text-fade-in"},c={class:"text-splitted"},l={__name:"Title",props:{text:{type:String,default:"Dreamy Moments Captured"}},setup(t){const s=t,{text:o}=e.toRefs(s);return(i,d)=>(e.openBlock(),e.createElementBlock("header",n,[e.createElementVNode("h2",r,[e.createElementVNode("span",a,[e.createElementVNode("span",c,e.toDisplayString(e.unref(o)),1)])])]))}};exports.default=l;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n={class:"w-100",itemprop:"name"},a={class:"h1",itemprop:"headline"},r={class:"text-fade-in"},c={class:"text-splitted"},l={__name:"Title",props:{text:{type:String,default:"Dreamy Moments Captured"}},setup(t){const s=t,{text:o}=e.toRefs(s);return(i,d)=>(e.openBlock(),e.createElementBlock("header",n,[e.createElementVNode("h2",a,[e.createElementVNode("span",r,[e.createElementVNode("span",c,e.toDisplayString(e.unref(o)),1)])])]))}};exports.default=l;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./localization/methods/get-browser-locale.cjs"),t=require("./localization/vue-i18n.cjs"),l=require("./store/globals.cjs"),o={getBrowserLocale:e.default,VueI18n:t.default,globalStore:l};exports.default=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./localization/methods/get-browser-locale.cjs"),r=require("./localization/vue-i18n.cjs"),o=require("./store/globals.cjs");exports.getBrowserLocale=e.default;exports.VueI18n=r.default;exports.globalStore=o;
@@ -1,11 +1,8 @@
1
- import o from "./localization/methods/get-browser-locale.js";
2
- import r from "./localization/vue-i18n.js";
3
- import * as l from "./store/globals.js";
4
- const a = {
5
- getBrowserLocale: o,
6
- VueI18n: r,
7
- globalStore: l
8
- };
1
+ import { default as a } from "./localization/methods/get-browser-locale.js";
2
+ import { default as l } from "./localization/vue-i18n.js";
3
+ import * as o from "./store/globals.js";
9
4
  export {
10
- a as default
5
+ l as VueI18n,
6
+ a as getBrowserLocale,
7
+ o as globalStore
11
8
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("../../../../../_virtual/_plugin-vue_export-helper.cjs"),t={},l={width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o=e.createElementVNode("path",{d:"M28.2899 50C24.4282 50.007 20.6332 48.9927 17.2899 47.06L12.5299 49.17C11.6317 49.567 10.6307 49.6695 9.67068 49.4627C8.71061 49.2558 7.84068 48.7503 7.1856 48.0186C6.53051 47.2869 6.12391 46.3666 6.02409 45.3896C5.92426 44.4126 6.13634 43.4291 6.62991 42.58L8.96991 38.58C6.65145 34.3531 5.78562 29.4816 6.50556 24.7147C7.22549 19.9478 9.49132 15.5493 12.9546 12.1956C16.418 8.84187 20.887 6.71863 25.6747 6.15233C30.4623 5.58604 35.3034 6.60805 39.4536 9.06121C43.6037 11.5144 46.8332 15.2629 48.6454 19.7303C50.4576 24.1977 50.7522 29.1367 49.4839 33.7879C48.2155 38.4391 45.4545 42.5448 41.6254 45.4739C37.7962 48.403 33.1109 49.9932 28.2899 50ZM17.4799 42.81C17.8631 42.811 18.238 42.9221 18.5599 43.13C22.2995 45.5441 26.7982 46.4939 31.1945 45.7975C35.5908 45.1011 39.5757 42.8075 42.3861 39.3558C45.1966 35.9041 46.6349 31.537 46.4258 27.0908C46.2167 22.6446 44.3748 18.4318 41.2529 15.2591C38.1309 12.0864 33.9483 10.1769 29.5061 9.89616C25.0638 9.61544 20.6741 10.9833 17.1776 13.7377C13.6811 16.4921 11.3235 20.4396 10.5563 24.8241C9.78918 29.2086 10.6664 33.722 13.0199 37.5C13.2068 37.8111 13.3055 38.1671 13.3055 38.53C13.3055 38.8929 13.2068 39.2489 13.0199 39.56L10.0899 44.56C10.0202 44.6791 9.99023 44.8174 10.0043 44.9547C10.0184 45.0919 10.0759 45.2212 10.1683 45.3237C10.2608 45.4262 10.3834 45.4966 10.5186 45.5247C10.6537 45.5528 10.7943 45.5371 10.9199 45.48L16.6699 43C16.9236 42.8806 17.1996 42.8159 17.4799 42.81Z",fill:"white"},null,-1),n=e.createElementVNode("path",{d:"M28.2898 30C27.7594 30 27.2507 29.7893 26.8756 29.4142C26.5005 29.0391 26.2898 28.5304 26.2898 28C26.2898 27.4696 26.5005 26.9609 26.8756 26.5858C27.2507 26.2107 27.7594 26 28.2898 26C28.8202 26 29.3289 26.2107 29.704 26.5858C30.0791 26.9609 30.2898 27.4696 30.2898 28C30.2898 28.5304 30.0791 29.0391 29.704 29.4142C29.3289 29.7893 28.8202 30 28.2898 30Z",fill:"white"},null,-1),i=e.createElementVNode("path",{d:"M20.2898 30C19.7594 30 19.2507 29.7893 18.8756 29.4142C18.5005 29.0391 18.2898 28.5304 18.2898 28C18.2898 27.4696 18.5005 26.9609 18.8756 26.5858C19.2507 26.2107 19.7594 26 20.2898 26C20.8202 26 21.3289 26.2107 21.704 26.5858C22.0791 26.9609 22.2898 27.4696 22.2898 28C22.2898 28.5304 22.0791 29.0391 21.704 29.4142C21.3289 29.7893 20.8202 30 20.2898 30Z",fill:"white"},null,-1),c=e.createElementVNode("path",{d:"M36.2898 30C35.7594 30 35.2507 29.7893 34.8756 29.4142C34.5005 29.0391 34.2898 28.5304 34.2898 28C34.2898 27.4696 34.5005 26.9609 34.8756 26.5858C35.2507 26.2107 35.7594 26 36.2898 26C36.8202 26 37.3289 26.2107 37.704 26.5858C38.0791 26.9609 38.2898 27.4696 38.2898 28C38.2898 28.5304 38.0791 29.0391 37.704 29.4142C37.3289 29.7893 36.8202 30 36.2898 30Z",fill:"white"},null,-1),r=[o,n,i,c];function s(_,u){return e.openBlock(),e.createElementBlock("svg",l,r)}const d=C.default(t,[["render",s]]);exports.default=d;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("../../../../../_virtual/_plugin-vue_export-helper.cjs"),t={},l={width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o=e.createElementVNode("path",{d:"M28.2899 50C24.4282 50.007 20.6332 48.9927 17.2899 47.06L12.5299 49.17C11.6317 49.567 10.6307 49.6695 9.67068 49.4627C8.71061 49.2558 7.84068 48.7503 7.1856 48.0186C6.53051 47.2869 6.12391 46.3666 6.02409 45.3896C5.92426 44.4126 6.13634 43.4291 6.62991 42.58L8.96991 38.58C6.65145 34.3531 5.78562 29.4816 6.50556 24.7147C7.22549 19.9478 9.49132 15.5493 12.9546 12.1956C16.418 8.84187 20.887 6.71863 25.6747 6.15233C30.4623 5.58604 35.3034 6.60805 39.4536 9.06121C43.6037 11.5144 46.8332 15.2629 48.6454 19.7303C50.4576 24.1977 50.7522 29.1367 49.4839 33.7879C48.2155 38.4391 45.4545 42.5448 41.6254 45.4739C37.7962 48.403 33.1109 49.9932 28.2899 50ZM17.4799 42.81C17.8631 42.811 18.238 42.9221 18.5599 43.13C22.2995 45.5441 26.7982 46.4939 31.1945 45.7975C35.5908 45.1011 39.5757 42.8075 42.3861 39.3558C45.1966 35.9041 46.6349 31.537 46.4258 27.0908C46.2167 22.6446 44.3748 18.4318 41.2529 15.2591C38.1309 12.0864 33.9483 10.1769 29.5061 9.89616C25.0638 9.61544 20.6741 10.9833 17.1776 13.7377C13.6811 16.4921 11.3235 20.4396 10.5563 24.8241C9.78918 29.2086 10.6664 33.722 13.0199 37.5C13.2068 37.8111 13.3055 38.1671 13.3055 38.53C13.3055 38.8929 13.2068 39.2489 13.0199 39.56L10.0899 44.56C10.0202 44.6791 9.99023 44.8174 10.0043 44.9547C10.0184 45.0919 10.0759 45.2212 10.1683 45.3237C10.2608 45.4262 10.3834 45.4966 10.5186 45.5247C10.6537 45.5528 10.7943 45.5371 10.9199 45.48L16.6699 43C16.9236 42.8806 17.1996 42.8159 17.4799 42.81Z",fill:"white"},null,-1),n=e.createElementVNode("path",{d:"M28.2898 30C27.7594 30 27.2507 29.7893 26.8756 29.4142C26.5005 29.0391 26.2898 28.5304 26.2898 28C26.2898 27.4696 26.5005 26.9609 26.8756 26.5858C27.2507 26.2107 27.7594 26 28.2898 26C28.8202 26 29.3289 26.2107 29.704 26.5858C30.0791 26.9609 30.2898 27.4696 30.2898 28C30.2898 28.5304 30.0791 29.0391 29.704 29.4142C29.3289 29.7893 28.8202 30 28.2898 30Z",fill:"white"},null,-1),i=e.createElementVNode("path",{d:"M20.2898 30C19.7594 30 19.2507 29.7893 18.8756 29.4142C18.5005 29.0391 18.2898 28.5304 18.2898 28C18.2898 27.4696 18.5005 26.9609 18.8756 26.5858C19.2507 26.2107 19.7594 26 20.2898 26C20.8202 26 21.3289 26.2107 21.704 26.5858C22.0791 26.9609 22.2898 27.4696 22.2898 28C22.2898 28.5304 22.0791 29.0391 21.704 29.4142C21.3289 29.7893 20.8202 30 20.2898 30Z",fill:"white"},null,-1),c=e.createElementVNode("path",{d:"M36.2898 30C35.7594 30 35.2507 29.7893 34.8756 29.4142C34.5005 29.0391 34.2898 28.5304 34.2898 28C34.2898 27.4696 34.5005 26.9609 34.8756 26.5858C35.2507 26.2107 35.7594 26 36.2898 26C36.8202 26 37.3289 26.2107 37.704 26.5858C38.0791 26.9609 38.2898 27.4696 38.2898 28C38.2898 28.5304 38.0791 29.0391 37.704 29.4142C37.3289 29.7893 36.8202 30 36.2898 30Z",fill:"white"},null,-1),s=[o,n,i,c];function r(_,u){return e.openBlock(),e.createElementBlock("svg",l,s)}const d=C.default(t,[["render",r]]);exports.default=d;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("../../../../../_virtual/_plugin-vue_export-helper.cjs"),C={},n={width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o=e.createElementVNode("path",{d:"M12 66V32H68V66C68 69.25 65.25 72 62 72H18C14.75 72 12 69.25 12 66ZM52 42V46C52 47.125 52.875 48 54 48H58C59.125 48 60 47.125 60 46V42C60 40.875 59.125 40 58 40H54C52.875 40 52 40.875 52 42ZM52 58V62C52 63.125 52.875 64 54 64H58C59.125 64 60 63.125 60 62V58C60 56.875 59.125 56 58 56H54C52.875 56 52 56.875 52 58ZM36 42V46C36 47.125 36.875 48 38 48H42C43.125 48 44 47.125 44 46V42C44 40.875 43.125 40 42 40H38C36.875 40 36 40.875 36 42ZM36 58V62C36 63.125 36.875 64 38 64H42C43.125 64 44 63.125 44 62V58C44 56.875 43.125 56 42 56H38C36.875 56 36 56.875 36 58ZM20 42V46C20 47.125 20.875 48 22 48H26C27.125 48 28 47.125 28 46V42C28 40.875 27.125 40 26 40H22C20.875 40 20 40.875 20 42ZM20 58V62C20 63.125 20.875 64 22 64H26C27.125 64 28 63.125 28 62V58C28 56.875 27.125 56 26 56H22C20.875 56 20 56.875 20 58ZM62 16C65.25 16 68 18.75 68 22V28H12V22C12 18.75 14.75 16 18 16H24V10C24 8.875 24.875 8 26 8H30C31.125 8 32 8.875 32 10V16H48V10C48 8.875 48.875 8 50 8H54C55.125 8 56 8.875 56 10V16H62Z",fill:"white"},null,-1),r=[o];function V(c,l){return e.openBlock(),e.createElementBlock("svg",n,r)}const H=t.default(C,[["render",V]]);exports.default=H;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("../../../../../_virtual/_plugin-vue_export-helper.cjs"),C={},n={width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o=e.createElementVNode("path",{d:"M12 66V32H68V66C68 69.25 65.25 72 62 72H18C14.75 72 12 69.25 12 66ZM52 42V46C52 47.125 52.875 48 54 48H58C59.125 48 60 47.125 60 46V42C60 40.875 59.125 40 58 40H54C52.875 40 52 40.875 52 42ZM52 58V62C52 63.125 52.875 64 54 64H58C59.125 64 60 63.125 60 62V58C60 56.875 59.125 56 58 56H54C52.875 56 52 56.875 52 58ZM36 42V46C36 47.125 36.875 48 38 48H42C43.125 48 44 47.125 44 46V42C44 40.875 43.125 40 42 40H38C36.875 40 36 40.875 36 42ZM36 58V62C36 63.125 36.875 64 38 64H42C43.125 64 44 63.125 44 62V58C44 56.875 43.125 56 42 56H38C36.875 56 36 56.875 36 58ZM20 42V46C20 47.125 20.875 48 22 48H26C27.125 48 28 47.125 28 46V42C28 40.875 27.125 40 26 40H22C20.875 40 20 40.875 20 42ZM20 58V62C20 63.125 20.875 64 22 64H26C27.125 64 28 63.125 28 62V58C28 56.875 27.125 56 26 56H22C20.875 56 20 56.875 20 58ZM62 16C65.25 16 68 18.75 68 22V28H12V22C12 18.75 14.75 16 18 16H24V10C24 8.875 24.875 8 26 8H30C31.125 8 32 8.875 32 10V16H48V10C48 8.875 48.875 8 50 8H54C55.125 8 56 8.875 56 10V16H62Z",fill:"white"},null,-1),V=[o];function H(l,r){return e.openBlock(),e.createElementBlock("svg",n,V)}const c=t.default(C,[["render",H]]);exports.default=c;