@ozdao/prometheus-framework 0.2.116 → 0.2.118

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  2. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +1 -58
  3. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
  4. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +58 -1
  5. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  6. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
  7. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +73 -1
  9. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +1 -73
  11. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/components/Select/Select.vue.js +103 -1
  13. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  14. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +1 -103
  15. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  17. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  19. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  21. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  23. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
  24. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +66 -0
  25. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
  26. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +0 -66
  27. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  29. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  31. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  33. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  35. package/dist/prometheus-framework/src/modules/events/components/sections/FeaturedEvents.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/events/components/sections/FeaturedEvents.vue.js +1 -1
  37. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  39. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  41. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/icons/navigation/IconChevronBottom.vue.cjs +1 -0
  44. package/dist/prometheus-framework/src/modules/icons/navigation/IconChevronBottom.vue.js +30 -0
  45. package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.cjs +1 -0
  46. package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.js +98 -0
  47. package/dist/prometheus-framework/src/modules/landing/landing.client.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/landing/landing.client.js +6 -4
  49. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  51. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
  53. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  57. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  59. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  61. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  63. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  65. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  69. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  71. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  73. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  75. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  77. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  79. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
  81. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  85. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  87. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  89. package/dist/prometheus-framework/src/modules/users/components/sections/FeaturedUsers.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/users/components/sections/FeaturedUsers.vue.js +20 -20
  91. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
  93. package/dist/style.css +1 -1
  94. package/package.json +1 -1
  95. package/src/modules/events/components/sections/FeaturedEvents.vue +2 -2
  96. package/src/modules/landing/landing.client.js +2 -0
  97. package/src/modules/users/components/sections/FeaturedUsers.vue +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"),B=require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../components/FieldTags/tag-input.vue.cjs");require("../../../../components/FieldTags/vue-tags-input.scss.cjs");const N=require("../../../../components/FieldTags/BlockTags.vue.cjs"),y=require("../../../../components/Checkbox/Checkbox.vue.cjs"),C=require("../../../../components/Field/Field.vue2.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"),q=require("../../../organizations/store/organizations.cjs"),E={class:"pd-thin"},T={style:{"min-height":"100%"},class:"w-100 bg-light pd-big radius-big"},z={class:"w-full h-full"},A={key:0,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"},U=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),D=e.createElementVNode("h5",{class:"mn-b-thin"},"Add source:",-1),M=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),S={key:0,class:"mn-b-thin"},F={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},R={__name:"CreateBlogPost",setup($){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()=>{const o=await q.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});if(p.value=o.map(l=>({name:l.profile.name,_id:l._id,photo:l.profile.photo})),s.params.url){const l=await n.read({user:i.state.user._id,url:s.params.url});t.value=l.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}),console.log(o)});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(l=>l.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=>{console.log(t.value),u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,l)=>(e.openBlock(),e.createElementBlock("article",E,[e.createElementVNode("section",T,[e.createElementVNode("div",z,[e.unref(t)?(e.openBlock(),e.createBlock(w.default,{key:0,prop:e.unref(t),setFocus:!0,content:"name",placeholder:"Enter post title",class:"h2"},null,8,["prop"])):e.createCommentVNode("",!0)]),e.unref(t)?(e.openBlock(),e.createBlock(V.default,{key:0,content:e.unref(t).content,onUpdate:l[0]||(l[0]=a=>e.unref(t).content=a)},null,8,["content"])):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"scaleIn"},{default:e.withCtx(()=>[e.unref(t)?(e.openBlock(),e.createElementBlock("section",A,[e.createElementVNode("div",O,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:l[1]||(l[1]=a=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:l[2]||(l[2]=a=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:l[3]||(l[3]=a=>h()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(B.default,{title:"Добавить участника",onClosePopup:v,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[U,e.createVNode(N.default,{onTagsChanged:l[4]||(l[4]=a=>e.unref(t).tags=a),tags:e.unref(t).tags},null,8,["tags"]),D,e.createVNode(C.default,{field:e.unref(t).source,"onUpdate:field":l[5]||(l[5]=a=>e.unref(t).source=a),placeholder:"Add full link to the source",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["field"]),M,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":l[6]||(l[6]=a=>r.value=a),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-light 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",F,[e.createVNode(y.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":l[7]||(l[7]=a=>e.unref(t).creator.hidden=a),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=R;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../../constructor/components/elements/Textarea.vue.cjs"),V=require("../../../constructor/components/sections/Constructor.vue.cjs"),B=require("../../../../components/Popup/Popup.vue.cjs");require("../../../../components/FieldTags/tag-input.vue.cjs");require("../../../../components/FieldTags/vue-tags-input.scss.cjs");const N=require("../../../../components/FieldTags/BlockTags.vue.cjs"),y=require("../../../../components/Checkbox/Checkbox.vue.cjs"),C=require("../../../../components/Field/Field.vue2.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"),q=require("../../../organizations/store/organizations.cjs"),E={class:"pd-thin"},T={style:{"min-height":"100%"},class:"w-100 bg-light pd-big radius-big"},z={class:"w-full h-full"},A={key:0,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"},U=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),D=e.createElementVNode("h5",{class:"mn-b-thin"},"Add source:",-1),M=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),S={key:0,class:"mn-b-thin"},F={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},R={__name:"CreateBlogPost",setup($){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()=>{const o=await q.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});if(p.value=o.map(l=>({name:l.profile.name,_id:l._id,photo:l.profile.photo})),s.params.url){const l=await n.read({user:i.state.user._id,url:s.params.url});t.value=l.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}),console.log(o)});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(l=>l.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=>{console.log(t.value),u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,l)=>(e.openBlock(),e.createElementBlock("article",E,[e.createElementVNode("section",T,[e.createElementVNode("div",z,[e.unref(t)?(e.openBlock(),e.createBlock(w.default,{key:0,prop:e.unref(t),setFocus:!0,content:"name",placeholder:"Enter post title",class:"h2"},null,8,["prop"])):e.createCommentVNode("",!0)]),e.unref(t)?(e.openBlock(),e.createBlock(V.default,{key:0,content:e.unref(t).content,onUpdate:l[0]||(l[0]=a=>e.unref(t).content=a)},null,8,["content"])):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"scaleIn"},{default:e.withCtx(()=>[e.unref(t)?(e.openBlock(),e.createElementBlock("section",A,[e.createElementVNode("div",O,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:l[1]||(l[1]=a=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:l[2]||(l[2]=a=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:l[3]||(l[3]=a=>h()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(B.default,{title:"Добавить участника",onClosePopup:v,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[U,e.createVNode(N.default,{onTagsChanged:l[4]||(l[4]=a=>e.unref(t).tags=a),tags:e.unref(t).tags},null,8,["tags"]),D,e.createVNode(C.default,{field:e.unref(t).source,"onUpdate:field":l[5]||(l[5]=a=>e.unref(t).source=a),placeholder:"Add full link to the source",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["field"]),M,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":l[6]||(l[6]=a=>r.value=a),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-light 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",F,[e.createVNode(y.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":l[7]||(l[7]=a=>e.unref(t).creator.hidden=a),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=R;
@@ -1,7 +1,7 @@
1
1
  import { ref as n, onMounted as A, computed as w, openBlock as i, createElementBlock as m, createElementVNode as r, unref as l, createBlock as k, createCommentVNode as p, createVNode as u, Transition as U, withCtx as v, createTextVNode as z } from "vue";
2
- import D from "../../../constructor/components/elements/Textarea.vue2.js";
2
+ import D from "../../../constructor/components/elements/Textarea.vue.js";
3
3
  import N from "../../../constructor/components/sections/Constructor.vue.js";
4
- 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 E 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");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Dropdown/Dropdown.vue2.cjs");require("../../../../components/DatePicker/Calendar.vue.cjs");require("../../../../components/Field/Field.vue.cjs");require("../../../globals/components/elements/ButtonDate.vue.cjs");require("../../../../components/Feed/Feed.vue2.cjs");const s=require("../../../../components/Slider/Slider.vue.cjs"),i=require("../../../icons/navigation/IconArrow.vue.cjs"),n=require("../blocks/CardBlogpost.vue.cjs"),l=require("../../store/blogposts.cjs"),r=require("../../../auth/store/auth.cjs");require("./HotPosts.vue2.cjs");const a={class:"pd-thin"},c={class:"bg-light radius-big pd-t-big pd-b-big"},u={class:"w-100 pd-b-small t-center flex-center flex"},d=e.createElementVNode("b",null,"Community",-1),p={__name:"HotPosts",setup(_){return(h,g)=>{const o=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",a,[e.createElementVNode("div",c,[e.createElementVNode("h2",u,[e.createTextVNode(" Discover Our "),e.createVNode(o,{to:{name:"Blog"},class:"transition-ease-in hover-bg-black hover-t-white transition-timing-1 hover-scale-0 bg-main cursor-pointer pd-thin mn-l-thin radius-extra flex flex-v-center"},{default:e.withCtx(()=>[d,e.createVNode(i.default,{class:"mn-l-thin radius-extra bg-white i-big"})]),_:1})]),e.createVNode(s.default,{store:{read:t=>l.read(t)},options:{skip:0,limit:8,user:r.state.user._id,period:"year"},text:{messages:{en:{title:"No Blogposts Found",description:"Currently, there are no blogposts available."}}},class:"slider-hotpost"},{default:e.withCtx(({item:t})=>[(e.openBlock(),e.createBlock(n.default,{key:t._id,blogpost:t,user:r.state.user._id,hideDescription:!0,class:"bg-white flex flex-column h-35r"},null,8,["blogpost","user"]))]),_:1},8,["store","options"])])])}}};exports.default=p;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Dropdown/Dropdown.vue.cjs");require("../../../../components/DatePicker/Calendar.vue.cjs");require("../../../../components/Field/Field.vue.cjs");require("../../../globals/components/elements/ButtonDate.vue.cjs");require("../../../../components/Feed/Feed.vue2.cjs");const s=require("../../../../components/Slider/Slider.vue.cjs"),i=require("../../../icons/navigation/IconArrow.vue.cjs"),n=require("../blocks/CardBlogpost.vue.cjs"),l=require("../../store/blogposts.cjs"),r=require("../../../auth/store/auth.cjs");require("./HotPosts.vue2.cjs");const a={class:"pd-thin"},c={class:"bg-light radius-big pd-t-big pd-b-big"},u={class:"w-100 pd-b-small t-center flex-center flex"},d=e.createElementVNode("b",null,"Community",-1),p={__name:"HotPosts",setup(_){return(h,g)=>{const o=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",a,[e.createElementVNode("div",c,[e.createElementVNode("h2",u,[e.createTextVNode(" Discover Our "),e.createVNode(o,{to:{name:"Blog"},class:"transition-ease-in hover-bg-black hover-t-white transition-timing-1 hover-scale-0 bg-main cursor-pointer pd-thin mn-l-thin radius-extra flex flex-v-center"},{default:e.withCtx(()=>[d,e.createVNode(i.default,{class:"mn-l-thin radius-extra bg-white i-big"})]),_:1})]),e.createVNode(s.default,{store:{read:t=>l.read(t)},options:{skip:0,limit:8,user:r.state.user._id,period:"year"},text:{messages:{en:{title:"No Blogposts Found",description:"Currently, there are no blogposts available."}}},class:"slider-hotpost"},{default:e.withCtx(({item:t})=>[(e.openBlock(),e.createBlock(n.default,{key:t._id,blogpost:t,user:r.state.user._id,hideDescription:!0,class:"bg-white flex flex-column h-35r"},null,8,["blogpost","user"]))]),_:1},8,["store","options"])])])}}};exports.default=p;
@@ -1,6 +1,6 @@
1
1
  import { resolveComponent as l, openBlock as r, createElementBlock as a, createElementVNode as o, createTextVNode as c, createVNode as e, withCtx as i, createBlock as m } from "vue";
2
2
  import "../../../../components/Loader/Loader.vue.js";
3
- import "../../../../components/Dropdown/Dropdown.vue2.js";
3
+ import "../../../../components/Dropdown/Dropdown.vue.js";
4
4
  import "../../../../components/DatePicker/Calendar.vue.js";
5
5
  import "../../../../components/Field/Field.vue.js";
6
6
  import "../../../globals/components/elements/ButtonDate.vue.js";
@@ -1 +1,5 @@
1
- "use strict";
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Textarea.vue2.cjs");const k=["placeholder"],x={__name:"Textarea",props:["prop","value","content","placeholder","index","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(o,{emit:s}){const t=o,c=s;e.ref(t);const n=e.ref(null);e.ref(0);function d(a){let l=a.target.value.split(/\n+/);if(l.length>1){t.prop[t.content]=l[0],e.nextTick(()=>{r()});let i=l.slice(1).map(f=>({__name:"Textarea",content:f}));c("addBlock","Textarea","",t.index,{blocks:i,ref:n})}else a.target.value.trim()===""&&a.target.value.includes(`
2
+
3
+ `)&&(console.log("We are adding new block:"+t.index+newBlocks+n),c("addBlock","Textarea","",t.index,{blocks:newBlocks,ref:n})),r()}function p(a){(a.keyCode===8||a.keyCode===46)&&t.prop[t.content].trim()===""&&c("deleteBlock",t.prop)}function u(){e.nextTick(()=>{n.value.focus(),c("updateBlock",t.prop,{setFocus:!1})})}function r(){n.value.style.height="1rem",n.value.style.height=n.value.scrollHeight+"px"}return e.onUpdated(()=>{t.setFocus&&e.nextTick(()=>{u()}),r()}),e.onMounted(()=>{t.setFocus&&e.nextTick(()=>{u()}),r()}),(a,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":l[0]||(l[0]=i=>o.prop[o.content]=i),placeholder:o.placeholder?o.placeholder:"",onInput:d,onFocus:l[1]||(l[1]=i=>c("focus",n.value)),onKeyup:p,ref_key:"textarea",ref:n,tabindex:"-1",class:e.normalizeClass(["text-area mn-b-thin",{"t-main t-semi":o.prop.type==="Link"}])},`
4
+
5
+ `,42,k),[[e.vModelText,o.prop[o.content]]])]))}};exports.default=x;
@@ -1 +1,67 @@
1
+ import { ref as s, onUpdated as m, nextTick as i, onMounted as x, openBlock as h, createElementBlock as B, withDirectives as g, createElementVNode as v, normalizeClass as y, vModelText as T } from "vue";
2
+ import "./Textarea.vue2.js";
3
+ const b = ["placeholder"], C = {
4
+ __name: "Textarea",
5
+ props: ["prop", "value", "content", "placeholder", "index", "setFocus"],
6
+ emits: ["deleteBlock", "updateBlock", "addBlock", "focus"],
7
+ setup(o, { emit: u }) {
8
+ const e = o, a = u;
9
+ s(e);
10
+ const t = s(null);
11
+ s(0);
12
+ function p(l) {
13
+ let n = l.target.value.split(/\n+/);
14
+ if (n.length > 1) {
15
+ e.prop[e.content] = n[0], i(() => {
16
+ c();
17
+ });
18
+ let r = n.slice(1).map((k) => ({ __name: "Textarea", content: k }));
19
+ a("addBlock", "Textarea", "", e.index, { blocks: r, ref: t });
20
+ } else
21
+ l.target.value.trim() === "" && l.target.value.includes(`
1
22
 
23
+ `) && (console.log("We are adding new block:" + e.index + newBlocks + t), a("addBlock", "Textarea", "", e.index, { blocks: newBlocks, ref: t })), c();
24
+ }
25
+ function f(l) {
26
+ (l.keyCode === 8 || l.keyCode === 46) && e.prop[e.content].trim() === "" && a("deleteBlock", e.prop);
27
+ }
28
+ function d() {
29
+ i(() => {
30
+ t.value.focus(), a("updateBlock", e.prop, { setFocus: !1 });
31
+ });
32
+ }
33
+ function c() {
34
+ t.value.style.height = "1rem", t.value.style.height = t.value.scrollHeight + "px";
35
+ }
36
+ return m(() => {
37
+ e.setFocus && i(() => {
38
+ d();
39
+ }), c();
40
+ }), x(() => {
41
+ e.setFocus && i(() => {
42
+ d();
43
+ }), c();
44
+ }), (l, n) => (h(), B("div", null, [
45
+ g(v("textarea", {
46
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => o.prop[o.content] = r),
47
+ placeholder: o.placeholder ? o.placeholder : "",
48
+ onInput: p,
49
+ onFocus: n[1] || (n[1] = (r) => a("focus", t.value)),
50
+ onKeyup: f,
51
+ ref_key: "textarea",
52
+ ref: t,
53
+ tabindex: "-1",
54
+ class: y(["text-area mn-b-thin", {
55
+ "t-main t-semi": o.prop.type === "Link"
56
+ }])
57
+ }, `
58
+
59
+ `, 42, b), [
60
+ [T, o.prop[o.content]]
61
+ ])
62
+ ]));
63
+ }
64
+ };
65
+ export {
66
+ C as default
67
+ };
@@ -1,5 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Textarea.vue.cjs");const k=["placeholder"],x={__name:"Textarea",props:["prop","value","content","placeholder","index","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(o,{emit:s}){const t=o,c=s;e.ref(t);const n=e.ref(null);e.ref(0);function d(a){let l=a.target.value.split(/\n+/);if(l.length>1){t.prop[t.content]=l[0],e.nextTick(()=>{r()});let i=l.slice(1).map(f=>({__name:"Textarea",content:f}));c("addBlock","Textarea","",t.index,{blocks:i,ref:n})}else a.target.value.trim()===""&&a.target.value.includes(`
2
-
3
- `)&&(console.log("We are adding new block:"+t.index+newBlocks+n),c("addBlock","Textarea","",t.index,{blocks:newBlocks,ref:n})),r()}function p(a){(a.keyCode===8||a.keyCode===46)&&t.prop[t.content].trim()===""&&c("deleteBlock",t.prop)}function u(){e.nextTick(()=>{n.value.focus(),c("updateBlock",t.prop,{setFocus:!1})})}function r(){n.value.style.height="1rem",n.value.style.height=n.value.scrollHeight+"px"}return e.onUpdated(()=>{t.setFocus&&e.nextTick(()=>{u()}),r()}),e.onMounted(()=>{t.setFocus&&e.nextTick(()=>{u()}),r()}),(a,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":l[0]||(l[0]=i=>o.prop[o.content]=i),placeholder:o.placeholder?o.placeholder:"",onInput:d,onFocus:l[1]||(l[1]=i=>c("focus",n.value)),onKeyup:p,ref_key:"textarea",ref:n,tabindex:"-1",class:e.normalizeClass(["text-area mn-b-thin",{"t-main t-semi":o.prop.type==="Link"}])},`
4
-
5
- `,42,k),[[e.vModelText,o.prop[o.content]]])]))}};exports.default=x;
1
+ "use strict";
@@ -1,67 +1 @@
1
- import { ref as s, onUpdated as m, nextTick as i, onMounted as x, openBlock as h, createElementBlock as B, withDirectives as g, createElementVNode as v, normalizeClass as y, vModelText as T } from "vue";
2
- import "./Textarea.vue.js";
3
- const b = ["placeholder"], C = {
4
- __name: "Textarea",
5
- props: ["prop", "value", "content", "placeholder", "index", "setFocus"],
6
- emits: ["deleteBlock", "updateBlock", "addBlock", "focus"],
7
- setup(o, { emit: u }) {
8
- const e = o, a = u;
9
- s(e);
10
- const t = s(null);
11
- s(0);
12
- function p(l) {
13
- let n = l.target.value.split(/\n+/);
14
- if (n.length > 1) {
15
- e.prop[e.content] = n[0], i(() => {
16
- c();
17
- });
18
- let r = n.slice(1).map((k) => ({ __name: "Textarea", content: k }));
19
- a("addBlock", "Textarea", "", e.index, { blocks: r, ref: t });
20
- } else
21
- l.target.value.trim() === "" && l.target.value.includes(`
22
1
 
23
- `) && (console.log("We are adding new block:" + e.index + newBlocks + t), a("addBlock", "Textarea", "", e.index, { blocks: newBlocks, ref: t })), c();
24
- }
25
- function f(l) {
26
- (l.keyCode === 8 || l.keyCode === 46) && e.prop[e.content].trim() === "" && a("deleteBlock", e.prop);
27
- }
28
- function d() {
29
- i(() => {
30
- t.value.focus(), a("updateBlock", e.prop, { setFocus: !1 });
31
- });
32
- }
33
- function c() {
34
- t.value.style.height = "1rem", t.value.style.height = t.value.scrollHeight + "px";
35
- }
36
- return m(() => {
37
- e.setFocus && i(() => {
38
- d();
39
- }), c();
40
- }), x(() => {
41
- e.setFocus && i(() => {
42
- d();
43
- }), c();
44
- }), (l, n) => (h(), B("div", null, [
45
- g(v("textarea", {
46
- "onUpdate:modelValue": n[0] || (n[0] = (r) => o.prop[o.content] = r),
47
- placeholder: o.placeholder ? o.placeholder : "",
48
- onInput: p,
49
- onFocus: n[1] || (n[1] = (r) => a("focus", t.value)),
50
- onKeyup: f,
51
- ref_key: "textarea",
52
- ref: t,
53
- tabindex: "-1",
54
- class: y(["text-area mn-b-thin", {
55
- "t-main t-semi": o.prop.type === "Link"
56
- }])
57
- }, `
58
-
59
- `, 42, b), [
60
- [T, o.prop[o.content]]
61
- ])
62
- ]));
63
- }
64
- };
65
- export {
66
- C as default
67
- };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("../elements/Textarea.vue2.cjs"),V=require("../elements/H2.vue.cjs"),x=require("../elements/Caption.vue.cjs"),N=require("../elements/Bullets.vue.cjs"),A=require("../elements/ImageUpload.vue.cjs"),y=require("../elements/Embed.vue.cjs"),q=require("../elements/Audio.vue.cjs"),$=require("../elements/Video.vue.cjs"),D=require("../../../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs"),M=["onMouseover"],T={key:0,class:"z-index-5 radius-thin pd-thin bg-white w-max mn-b-small flex-nowrap flex-column flex"},F=["onClick"],I=["onClick"],L=["onClick"],S=["onClick"],U=["onClick"],H=["onClick"],z=["onClick"],j={__name:"Constructor",props:["content"],emits:["update"],setup(v,{emit:f}){const b=v,u=f;let t=e.ref(null);e.ref(null),t.value={content:b.content};const h={Textarea:k.default,H2:V.default,Link:k.default,Bullets:N.default,Caption:x.default,ImageUpload:A.default,Embed:y.default,Audio:q.default,Video:$.default};function c(s="Textarea",a="",o,n){console.log("We are adding new block (functuin HandleAddBlock):"+s+a+o+n);let l={order:t.value.content.length+1,type:s,style:"",class:"",content:a,blocks:[],setFocus:!1};if(n&&n.blocks&&Array.isArray(n.blocks)){let m=n.blocks.map(E=>({...l,content:E.content})),B=[(n.index||o)+1,0].concat(m);t.value.content.splice.apply(t.value.content,B);const _=m[m.length-1];console.log("New block is"+_)}else o!==void 0?(t.value.content.splice(o+1,0,l),console.log("Latest block is"+l)):(console.log("Another block is"+l),t.value.content.push(l));i.value=null,u("update",t.value.content)}function g(s,a){const o=t.value.content.findIndex(n=>n===s);o!==-1&&(t.value.content[o]={...t.value.content[o],...a}),u("update",t.value.content)}function p(s){let a=t.value.content.findIndex(o=>o===s);a!==-1&&t.value.content.splice(a,1),t.value.content[a-1].setFocus=!0,u("update",t.value.content)}const i=e.ref(null),d=e.ref(!1),r=e.ref(!1);function w(){d.value=!0}function C(){d.value=!1}return e.watchEffect(()=>{t.value&&t.value.content.length===0&&c("Textarea",""),u("update",t.value.content)}),(s,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.unref(t).content?(e.openBlock(),e.createBlock(e.unref(D.VueDraggableNext),{key:0,class:"w-full",list:e.unref(t).content,onStart:w,onEnd:C},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).content,(o,n)=>(e.openBlock(),e.createElementBlock("div",{key:n,class:"pos-relative"},[e.createElementVNode("div",{onMouseover:l=>(i.value=n,r.value=!1),class:"pos-relative w-full h-full"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h[o.type]),{index:n,component:o,prop:o,class:e.normalizeClass(o.class),setFocus:o.setFocus,content:"content",onDeleteBlock:p,onAddBlock:c,onUpdateBlock:g},null,40,["index","component","prop","class","setFocus"]))],40,M),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value===n?(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:a[1]||(a[1]=e.withModifiers(l=>d.value=!0,["prevent"]))},[e.createElementVNode("button",{onClick:a[0]||(a[0]=l=>r.value=!r.value),class:"mn-b-small cursor-pointer w-100 i-semi bg-white radius-thin"},e.toDisplayString(o.content?"...":"+"),1),r.value?(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("span",{onClick:l=>p(o),class:"mn-b-thin w-max t-red bg-white button-small button"}," Remove ",8,F),e.createElementVNode("span",{onClick:l=>c("ImageUpload","",n),class:"mn-b-thin w-max t-black bg-white button-small button"}," Add Image ",8,I),e.createElementVNode("span",{onClick:l=>c("H2","",n),class:"w-max button-small t-black bg-white button"}," Add Title ",8,L),e.createElementVNode("span",{onClick:l=>c("Embed","",n),class:"w-max button-small t-black bg-white button"}," Add Embed ",8,S),e.createElementVNode("span",{onClick:l=>c("Audio","",n),class:"w-max button-small t-black bg-white button"}," Add Audio ",8,U),e.createElementVNode("span",{onClick:l=>c("Video","",n),class:"w-max button-small t-black bg-white button"}," Add Video ",8,H),e.createElementVNode("span",{onClick:l=>c("Link","",n),class:"w-max button-small t-black bg-white button"}," Add Link ",8,z)])):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1},8,["list"])):e.createCommentVNode("",!0)]))}};exports.default=j;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("../elements/Textarea.vue.cjs"),V=require("../elements/H2.vue.cjs"),x=require("../elements/Caption.vue.cjs"),N=require("../elements/Bullets.vue.cjs"),A=require("../elements/ImageUpload.vue.cjs"),y=require("../elements/Embed.vue.cjs"),q=require("../elements/Audio.vue.cjs"),$=require("../elements/Video.vue.cjs"),D=require("../../../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs"),M=["onMouseover"],T={key:0,class:"z-index-5 radius-thin pd-thin bg-white w-max mn-b-small flex-nowrap flex-column flex"},F=["onClick"],I=["onClick"],L=["onClick"],S=["onClick"],U=["onClick"],H=["onClick"],z=["onClick"],j={__name:"Constructor",props:["content"],emits:["update"],setup(v,{emit:f}){const b=v,u=f;let t=e.ref(null);e.ref(null),t.value={content:b.content};const h={Textarea:k.default,H2:V.default,Link:k.default,Bullets:N.default,Caption:x.default,ImageUpload:A.default,Embed:y.default,Audio:q.default,Video:$.default};function c(s="Textarea",a="",o,n){console.log("We are adding new block (functuin HandleAddBlock):"+s+a+o+n);let l={order:t.value.content.length+1,type:s,style:"",class:"",content:a,blocks:[],setFocus:!1};if(n&&n.blocks&&Array.isArray(n.blocks)){let m=n.blocks.map(E=>({...l,content:E.content})),B=[(n.index||o)+1,0].concat(m);t.value.content.splice.apply(t.value.content,B);const _=m[m.length-1];console.log("New block is"+_)}else o!==void 0?(t.value.content.splice(o+1,0,l),console.log("Latest block is"+l)):(console.log("Another block is"+l),t.value.content.push(l));i.value=null,u("update",t.value.content)}function g(s,a){const o=t.value.content.findIndex(n=>n===s);o!==-1&&(t.value.content[o]={...t.value.content[o],...a}),u("update",t.value.content)}function p(s){let a=t.value.content.findIndex(o=>o===s);a!==-1&&t.value.content.splice(a,1),t.value.content[a-1].setFocus=!0,u("update",t.value.content)}const i=e.ref(null),d=e.ref(!1),r=e.ref(!1);function w(){d.value=!0}function C(){d.value=!1}return e.watchEffect(()=>{t.value&&t.value.content.length===0&&c("Textarea",""),u("update",t.value.content)}),(s,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.unref(t).content?(e.openBlock(),e.createBlock(e.unref(D.VueDraggableNext),{key:0,class:"w-full",list:e.unref(t).content,onStart:w,onEnd:C},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).content,(o,n)=>(e.openBlock(),e.createElementBlock("div",{key:n,class:"pos-relative"},[e.createElementVNode("div",{onMouseover:l=>(i.value=n,r.value=!1),class:"pos-relative w-full h-full"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h[o.type]),{index:n,component:o,prop:o,class:e.normalizeClass(o.class),setFocus:o.setFocus,content:"content",onDeleteBlock:p,onAddBlock:c,onUpdateBlock:g},null,40,["index","component","prop","class","setFocus"]))],40,M),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value===n?(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:a[1]||(a[1]=e.withModifiers(l=>d.value=!0,["prevent"]))},[e.createElementVNode("button",{onClick:a[0]||(a[0]=l=>r.value=!r.value),class:"mn-b-small cursor-pointer w-100 i-semi bg-white radius-thin"},e.toDisplayString(o.content?"...":"+"),1),r.value?(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("span",{onClick:l=>p(o),class:"mn-b-thin w-max t-red bg-white button-small button"}," Remove ",8,F),e.createElementVNode("span",{onClick:l=>c("ImageUpload","",n),class:"mn-b-thin w-max t-black bg-white button-small button"}," Add Image ",8,I),e.createElementVNode("span",{onClick:l=>c("H2","",n),class:"w-max button-small t-black bg-white button"}," Add Title ",8,L),e.createElementVNode("span",{onClick:l=>c("Embed","",n),class:"w-max button-small t-black bg-white button"}," Add Embed ",8,S),e.createElementVNode("span",{onClick:l=>c("Audio","",n),class:"w-max button-small t-black bg-white button"}," Add Audio ",8,U),e.createElementVNode("span",{onClick:l=>c("Video","",n),class:"w-max button-small t-black bg-white button"}," Add Video ",8,H),e.createElementVNode("span",{onClick:l=>c("Link","",n),class:"w-max button-small t-black bg-white button"}," Add Link ",8,z)])):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1},8,["list"])):e.createCommentVNode("",!0)]))}};exports.default=j;
@@ -1,5 +1,5 @@
1
1
  import { ref as u, watchEffect as M, openBlock as i, createElementBlock as r, unref as p, createBlock as h, withCtx as g, Fragment as N, renderList as I, createElementVNode as s, resolveDynamicComponent as L, normalizeClass as T, createVNode as U, Transition as z, withModifiers as H, toDisplayString as S, createCommentVNode as b } from "vue";
2
- import w from "../elements/Textarea.vue2.js";
2
+ import w from "../elements/Textarea.vue.js";
3
3
  import R from "../elements/H2.vue.js";
4
4
  import W from "../elements/Caption.vue.js";
5
5
  import j from "../elements/Bullets.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("../../../../../../node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.cjs"),P=require("../../../../components/Popup/Popup.vue2.cjs"),g=require("../../../../components/Button/Button.vue2.cjs"),S=require("../../store/tickets.cjs");require("./ButtonCheck.vue2.cjs");const w=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),x=r=>(e.pushScopeId("data-v-20750f79"),r=r(),e.popScopeId(),r),E=x(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Scan QR Code",-1)),q={class:"h-max"},T={__name:"ButtonCheck",emits:"qrcodecheck",setup(r,{emit:i}){const u=i,n=e.ref(!1),a=e.ref("");function l(){n.value=!0}function d(){n.value=!1}const s=e.ref(null);async function p(t){s.value=t.map(o=>o.rawValue);try{const o=s.value[0]||"";if(!o)throw new Error("Troubles with qrcode reading");const c=await S.actions.update({_id:o,status:"used",check:!0});alert("Ticket checked. And it's all right!")}catch{alert("Ticket is not found, already used or deactivated!")}u("qrcodecheck")}function m(t){a.value=`[${t.name}]: `,t.name==="NotAllowedError"?a.value+="you need to grant camera access permission":t.name==="NotFoundError"?a.value+="no camera on this device":t.name==="NotSupportedError"?a.value+="secure context required (HTTPS, localhost)":t.name==="NotReadableError"?a.value+="is the camera already in use?":t.name==="OverconstrainedError"?a.value+="installed cameras are not suitable":t.name==="StreamApiNotSupportedError"?a.value+="Stream API is not supported in this browser":t.name==="InsecureContextError"?a.value+="Camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.":a.value+=t.message}function f(t,o){for(const c of t){const{boundingBox:{x:h,y:v,width:_,height:b}}=c;o.lineWidth=2,o.strokeStyle="#007bff",o.strokeRect(h,v,_,b)}}return(t,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(g.default,{submit:l,class:"bg-main button-small radius-extra button"},{default:e.withCtx(()=>[e.createTextVNode(" Check Tickets ")]),_:1}),e.createVNode(P.default,{title:"Добавить участника",onClosePopup:d,isPopupOpen:n.value,class:"w-max-30r h-max-30r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[E,e.createElementVNode("div",q,[e.createVNode(e.unref(k.QrcodeStream),{track:f,onDetect:p,onError:m})])]),_:1},8,["isPopupOpen"])]))}},N=w.default(T,[["__scopeId","data-v-20750f79"]]);exports.default=N;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("../../../../../../node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.cjs"),P=require("../../../../components/Popup/Popup.vue.cjs"),g=require("../../../../components/Button/Button.vue2.cjs"),S=require("../../store/tickets.cjs");require("./ButtonCheck.vue2.cjs");const w=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),x=r=>(e.pushScopeId("data-v-20750f79"),r=r(),e.popScopeId(),r),E=x(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Scan QR Code",-1)),q={class:"h-max"},T={__name:"ButtonCheck",emits:"qrcodecheck",setup(r,{emit:i}){const u=i,n=e.ref(!1),a=e.ref("");function l(){n.value=!0}function d(){n.value=!1}const s=e.ref(null);async function p(t){s.value=t.map(o=>o.rawValue);try{const o=s.value[0]||"";if(!o)throw new Error("Troubles with qrcode reading");const c=await S.actions.update({_id:o,status:"used",check:!0});alert("Ticket checked. And it's all right!")}catch{alert("Ticket is not found, already used or deactivated!")}u("qrcodecheck")}function m(t){a.value=`[${t.name}]: `,t.name==="NotAllowedError"?a.value+="you need to grant camera access permission":t.name==="NotFoundError"?a.value+="no camera on this device":t.name==="NotSupportedError"?a.value+="secure context required (HTTPS, localhost)":t.name==="NotReadableError"?a.value+="is the camera already in use?":t.name==="OverconstrainedError"?a.value+="installed cameras are not suitable":t.name==="StreamApiNotSupportedError"?a.value+="Stream API is not supported in this browser":t.name==="InsecureContextError"?a.value+="Camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.":a.value+=t.message}function f(t,o){for(const c of t){const{boundingBox:{x:h,y:v,width:_,height:b}}=c;o.lineWidth=2,o.strokeStyle="#007bff",o.strokeRect(h,v,_,b)}}return(t,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(g.default,{submit:l,class:"bg-main button-small radius-extra button"},{default:e.withCtx(()=>[e.createTextVNode(" Check Tickets ")]),_:1}),e.createVNode(P.default,{title:"Добавить участника",onClosePopup:d,isPopupOpen:n.value,class:"w-max-30r h-max-30r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[E,e.createElementVNode("div",q,[e.createVNode(e.unref(k.QrcodeStream),{track:f,onDetect:p,onError:m})])]),_:1},8,["isPopupOpen"])]))}},N=w.default(T,[["__scopeId","data-v-20750f79"]]);exports.default=N;
@@ -1,6 +1,6 @@
1
1
  import { ref as s, openBlock as w, createElementBlock as E, createVNode as n, withCtx as l, createTextVNode as S, createElementVNode as u, unref as g, pushScopeId as T, popScopeId as C } from "vue";
2
2
  import { QrcodeStream as y } from "../../../../../../node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.js";
3
- import N from "../../../../components/Popup/Popup.vue2.js";
3
+ import N from "../../../../components/Popup/Popup.vue.js";
4
4
  import B from "../../../../components/Button/Button.vue2.js";
5
5
  import { actions as I } from "../../store/tickets.js";
6
6
  import "./ButtonCheck.vue2.js";
@@ -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 B=require("../../../constructor/components/sections/Constructor.vue.cjs"),T=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.cjs");const k=require("../../../../components/Block/Block.vue.cjs"),C=require("../../../../components/Popup/Popup.vue2.cjs"),i=require("../../../../components/Field/Field.vue2.cjs"),P=require("../../../../components/FieldTags/BlockTags.vue.cjs"),V=require("../../../../components/Checkbox/Checkbox.vue.cjs"),_=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),f=require("../../../../components/Upload/Upload.vue.cjs"),h=require("../../../../components/UploadImage/UploadImage.vue.cjs"),L=require("../../../../components/EditImages/EditImages.vue.cjs"),q=require("../../../../components/Button/Button.vue2.cjs"),N=require("../../../icons/navigation/IconDelete.vue.cjs"),D=require("vue-router"),u=require("../../store/events.cjs"),n=require("../../../auth/store/auth.cjs"),M=require("../../../organizations/store/organizations.cjs");require("./EditEvent.vue2.cjs");const O={key:0,class:"h-100 pd-thin"},R={class:"mn-b-thin radius-small w-100 h-10r bg-light flex-center flex-column flex"},S=e.createElementVNode("h4",null,"Upload Event Cover",-1),F={key:0,class:"mn-b-small"},G={key:2,class:"mn-b-small"},I={key:4,class:"mn-b-semi"},A=e.createElementVNode("h4",{class:"mn-b-thin"}," Hero Section ",-1),z=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Hero Section ",-1),H=e.createElementVNode("p",null,"Need to upload in webm format because of needs of optimization",-1),$=e.createElementVNode("h5",{class:"mn-b-thin"}," Ticket ",-1),Y={class:"mn-b-small gap-small cols-2-fit-content"},j={class:"gap-thin flex-nowrap flex w-100"},J=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),K=e.createElementVNode("h4",{class:"mn-b-thin"}," Guest Section ",-1),Q={class:"gap-thin cols-3"},W=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Guests Section ",-1),X={class:"gap-thin flex-nowrap flex w-100"},Z={class:"w-100"},ee={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},te=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),le=e.createElementVNode("h4",{class:"mn-b-thin"}," Lineup Section ",-1),ae={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},se=e.createElementVNode("h5",{class:"mn-b-thin"}," Background in Lineup Section ",-1),ie=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),ne=e.createElementVNode("h4",{class:"mn-b-thin"}," Previous Party Section ",-1),oe=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Previous Partys Section ",-1),de=e.createElementVNode("h3",{class:"mn-b-small"},"Date",-1),re=e.createElementVNode("h3",{class:"mn-b-small"},"Description",-1),ue={key:5,class:"pd-b-extra w-100 bg-light pd-big radius-big"},ce={key:6,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},pe={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},me=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),fe=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),ge={key:0,class:"mn-b-thin"},he={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},be={__name:"EditEvent",setup(ve){const p=D.useRoute(),m=D.useRouter();let t=e.ref(null),b=e.ref(null);const v=e.ref([]),o=e.ref(null),d=e.ref(new Date);e.onMounted(async()=>{if(p.params.url){const a=await u.read({user:n.state.user._id,url:p.params.url});t.value=a.pop(),console.log(t.value);const l=t.value.date.start,c=t.value.date.end;d.value=[l,c]}else{u.clean(),t.value=u.state.current;const a=new Date,l=new Date;d.value=[a,l]}t.value.owner||(t.value.owner={target:n.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:n.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(o.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const s=await M.actions.read({user:n.state.user._id,postable:n.state.user._id,limit:100});b.value=s.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const g=e.ref(!1);function w(){g.value=!0}function E(){g.value=!1}function U(){v.value.length>0&&v.value.map(s=>s.text),t.value.status="draft",t.value.date={start:d.value[0],end:d.value[1]},p.params.url?u.update(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)}):u.create(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)})}function x(){o.value&&(t.value.owner={target:o.value._id,type:"organization"}),o.value||(t.value.creator.hidden=!1),o.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.date={start:d.value[0],end:d.value[1]},console.log(d.value),p.params.url?(console.log(t.value),u.update(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})):u.create(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})}function y(){confirm("Are you sure you want to delete this event?")&&u.remove(t.value._id).then(s=>{m.push({name:"User Events",params:{_id:t.value.creator.target._id}})}).catch(s=>{console.error(s)})}return(s,a)=>e.unref(t)?(e.openBlock(),e.createElementBlock("article",O,[e.createElementVNode("div",R,[e.createVNode(h.default,{photo:e.unref(t).cover,"onUpdate:photo":a[0]||(a[0]=l=>e.unref(t).cover=l),uploadPath:"specials",class:"h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"},null,8,["photo"]),S]),e.createVNode(i.default,{field:e.unref(t).name,"onUpdate:field":a[1]||(a[1]=l=>e.unref(t).name=l),placeholder:"Event name",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.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-b-semi w-100 bg-light pd-medium radius-small"},null,8,["field"]),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("h3",F," Tickets ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("div",{key:1,class:"mn-b-semi w-100 bg-light pd-medium radius-small",onClick:a[3]||(a[3]=l=>e.unref(m).push({name:"Edit Event Tickets",params:{url:e.unref(p).params.url}}))}," Edit tickets ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("h3",G," Special Details ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createBlock(V.default,{key:3,label:"Special",radio:e.unref(t).special,"onUpdate:radio":a[4]||(a[4]=l=>e.unref(t).special=!e.unref(t).special),class:"mn-b-semi w-100 bg-black t-white pd-medium radius-small"},null,8,["radio"])):e.createCommentVNode("",!0),e.unref(t).special?(e.openBlock(),e.createElementBlock("div",I,[A,e.createVNode(i.default,{field:e.unref(t).specialData.subtitle,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).specialData.subtitle=l),placeholder:"Event subtitle",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(L.default,{images:e.unref(t).specialData.logos,uploadPath:"/specials",text:{title:"Drag & Drop Your Logos Here",subtitle:"Files supported: JPG, PNG, GIF"},options:{showTitle:!0,showText:!1},"onUpdate:images":a[6]||(a[6]=l=>e.unref(t).specialData.logos=l),class:"mn-b-thin bg-light radius-small"},null,8,["images"]),z,H,e.createVNode(f.default,{field:e.unref(t).specialData.video,"onUpdate:field":a[7]||(a[7]=l=>e.unref(t).specialData.video=l),placeholder:"Upload video",onFileChange:a[8]||(a[8]=l=>e.unref(t).specialData.video=l),uploadPath:"specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),$,e.createElementVNode("div",Y,[e.createVNode(h.default,{photo:e.unref(t).specialData.ticketImage,"onUpdate:photo":a[9]||(a[9]=l=>e.unref(t).specialData.ticketImage=l),uploadPath:"/specials",class:"aspect-1x1 w-4r o-hidden radius-extra"},null,8,["photo"]),e.createElementVNode("div",j,[e.createVNode(i.default,{field:e.unref(t).specialData.ticketPrice,"onUpdate:field":a[10]||(a[10]=l=>e.unref(t).specialData.ticketPrice=l),type:"number",placeholder:"Ticket price in baht",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.ticketText,"onUpdate:field":a[11]||(a[11]=l=>e.unref(t).specialData.ticketText=l),placeholder:"Promotion text for ticket in hero ",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.ticketTextButton,"onUpdate:field":a[12]||(a[12]=l=>e.unref(t).specialData.ticketTextButton=l),placeholder:"Text on 'Buy Ticket' button ",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"])])]),J,K,e.createVNode(i.default,{field:e.unref(t).specialData.guestTitle,"onUpdate:field":a[13]||(a[13]=l=>e.unref(t).specialData.guestTitle=l),placeholder:"Title for Main Guest section",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestDescription,"onUpdate:field":a[14]||(a[14]=l=>e.unref(t).specialData.guestDescription=l),placeholder:"Description for Main Guest section",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createElementVNode("div",Q,[e.createVNode(i.default,{field:e.unref(t).specialData.guestFacebook,"onUpdate:field":a[15]||(a[15]=l=>e.unref(t).specialData.guestFacebook=l),placeholder:"Facebook of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestInstagram,"onUpdate:field":a[16]||(a[16]=l=>e.unref(t).specialData.guestInstagram=l),placeholder:"Instagram of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestTwitter,"onUpdate:field":a[17]||(a[17]=l=>e.unref(t).specialData.guestTwitter=l),placeholder:"Twitter of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestTelegram,"onUpdate:field":a[18]||(a[18]=l=>e.unref(t).specialData.guestTelegram=l),placeholder:"Telegram of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestSoundcloud,"onUpdate:field":a[19]||(a[19]=l=>e.unref(t).specialData.guestSoundcloud=l),placeholder:"Link to Main Guest soundcloud track",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestSpotify,"onUpdate:field":a[20]||(a[20]=l=>e.unref(t).specialData.guestSpotify=l),placeholder:"Link to Main guest spotify track",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestYoutube,"onUpdate:field":a[21]||(a[21]=l=>e.unref(t).specialData.guestYoutube=l),placeholder:"Link to Main guest youtube video",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"])]),W,e.createVNode(f.default,{field:e.unref(t).specialData.guestVideo,"onUpdate:field":a[22]||(a[22]=l=>e.unref(t).specialData.guestVideo=l),placeholder:"Upload video",onFileChange:a[23]||(a[23]=l=>e.unref(t).specialData.guestVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),e.createVNode(k.default,{title:"Guests",placeholder:"No guests added yet",actions:[{label:"+",function:()=>e.unref(t).specialData.guests.push({name:null,description:null,photo:null,main:!1})}],class:"cols-1 mn-b-thin t-black gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).specialData.guests,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-small gap-small cols-2-fit-content",key:c},[e.createVNode(h.default,{photo:l.photo,"onUpdate:photo":r=>l.photo=r,uploadPath:"/specials",class:"aspect-1x1 w-8r o-hidden radius-extra"},null,8,["photo","onUpdate:photo"]),e.createElementVNode("div",X,[e.createElementVNode("div",Z,[e.createVNode(i.default,{field:l.name,"onUpdate:field":r=>l.name=r,placeholder:"Name",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:l.description,"onUpdate:field":r=>l.description=r,placeholder:"Description",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"])]),e.createElementVNode("div",ee,[e.createVNode(N.default,{onClick:()=>e.unref(t).specialData.guests.splice(c,1),class:"i-medium"},null,8,["onClick"])])])]))),128))]),_:1},8,["actions"]),te,le,e.createVNode(k.default,{title:"Line Up",placeholder:"No line ups added yet",actions:[{label:"+",function:()=>e.unref(t).specialData.lineup.push({name:null,description:null,photo:null,main:!1})}],class:"cols-1 t-black gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).specialData.lineup,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-thin gap-small flex-nowrap flex",key:c},[e.createVNode(i.default,{field:l.name,"onUpdate:field":r=>l.name=r,placeholder:"Name",class:"w-100 bg-light radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:l.time,"onUpdate:field":r=>l.time=r,placeholder:"Time",class:"w-100 bg-light radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",ae,[e.createVNode(N.default,{onClick:()=>e.unref(t).specialData.lineup.splice(c,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),se,e.createVNode(f.default,{field:e.unref(t).specialData.lineupBackground,"onUpdate:field":a[24]||(a[24]=l=>e.unref(t).specialData.lineupBackground=l),placeholder:"Upload image",onFileChange:a[25]||(a[25]=l=>e.unref(t).specialData.lineupBackground=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),ie,ne,oe,e.createVNode(i.default,{field:e.unref(t).specialData.previousTitle,"onUpdate:field":a[26]||(a[26]=l=>e.unref(t).specialData.previousTitle=l),placeholder:"Title",value:"Explore our exclusive party archive",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousDescription,"onUpdate:field":a[27]||(a[27]=l=>e.unref(t).specialData.previousDescription=l),label:"Description",value:"Experience the ultimate party vibe at The Commune! Elevate your evening with distinctive and exhilarating activities, ensuring an unforgettable time. Dive into the excitement and make every moment special.",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousLinkText,"onUpdate:field":a[28]||(a[28]=l=>e.unref(t).specialData.previousLinkText=l),label:"Button",value:"Check In Instagram",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousLink,"onUpdate:field":a[29]||(a[29]=l=>e.unref(t).specialData.previousLink=l),label:"Link",value:"https://www.instagram.com/thecommune.phuket/",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(f.default,{field:e.unref(t).specialData.previousVideo,"onUpdate:field":a[30]||(a[30]=l=>e.unref(t).specialData.previousVideo=l),placeholder:"Upload image",onFileChange:a[31]||(a[31]=l=>e.unref(t).specialData.previousVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"])])):e.createCommentVNode("",!0),de,e.createVNode(e.unref(T.default),{modelValue:d.value,"onUpdate:modelValue":a[32]||(a[32]=l=>d.value=l),range:"",class:"z-index-3 mn-b-semi"},null,8,["modelValue"]),re,e.unref(t)?(e.openBlock(),e.createElementBlock("section",ue,[e.createVNode(B.default,{content:e.unref(t).content,onUpdate:a[33]||(a[33]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",ce,[e.createElementVNode("div",pe,[e.unref(p).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[34]||(a[34]=l=>y()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[35]||(a[35]=l=>U()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[36]||(a[36]=l=>w()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(C.default,{title:"Publish",onClosePopup:E,isPopupOpen:g.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[me,e.createVNode(P.default,{onTagsChanged:a[37]||(a[37]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),fe,e.createVNode(_.default,{modelValue:o.value,"onUpdate:modelValue":a[38]||(a[38]=l=>o.value=l),options:e.unref(b),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["modelValue","options"]),o.value?(e.openBlock(),e.createElementBlock("h5",ge,"Options:")):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",he,[e.createVNode(V.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[39]||(a[39]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(q.default,{submit:x,callback:s.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=be;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../constructor/components/elements/Textarea.vue2.cjs");const B=require("../../../constructor/components/sections/Constructor.vue.cjs"),T=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.cjs");const k=require("../../../../components/Block/Block.vue.cjs"),C=require("../../../../components/Popup/Popup.vue.cjs"),i=require("../../../../components/Field/Field.vue2.cjs"),P=require("../../../../components/FieldTags/BlockTags.vue.cjs"),V=require("../../../../components/Checkbox/Checkbox.vue.cjs"),_=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),f=require("../../../../components/Upload/Upload.vue.cjs"),h=require("../../../../components/UploadImage/UploadImage.vue.cjs"),L=require("../../../../components/EditImages/EditImages.vue.cjs"),q=require("../../../../components/Button/Button.vue2.cjs"),N=require("../../../icons/navigation/IconDelete.vue.cjs"),D=require("vue-router"),u=require("../../store/events.cjs"),n=require("../../../auth/store/auth.cjs"),M=require("../../../organizations/store/organizations.cjs");require("./EditEvent.vue2.cjs");const O={key:0,class:"h-100 pd-thin"},R={class:"mn-b-thin radius-small w-100 h-10r bg-light flex-center flex-column flex"},S=e.createElementVNode("h4",null,"Upload Event Cover",-1),F={key:0,class:"mn-b-small"},G={key:2,class:"mn-b-small"},I={key:4,class:"mn-b-semi"},A=e.createElementVNode("h4",{class:"mn-b-thin"}," Hero Section ",-1),z=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Hero Section ",-1),H=e.createElementVNode("p",null,"Need to upload in webm format because of needs of optimization",-1),$=e.createElementVNode("h5",{class:"mn-b-thin"}," Ticket ",-1),Y={class:"mn-b-small gap-small cols-2-fit-content"},j={class:"gap-thin flex-nowrap flex w-100"},J=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),K=e.createElementVNode("h4",{class:"mn-b-thin"}," Guest Section ",-1),Q={class:"gap-thin cols-3"},W=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Guests Section ",-1),X={class:"gap-thin flex-nowrap flex w-100"},Z={class:"w-100"},ee={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},te=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),le=e.createElementVNode("h4",{class:"mn-b-thin"}," Lineup Section ",-1),ae={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},se=e.createElementVNode("h5",{class:"mn-b-thin"}," Background in Lineup Section ",-1),ie=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),ne=e.createElementVNode("h4",{class:"mn-b-thin"}," Previous Party Section ",-1),oe=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Previous Partys Section ",-1),de=e.createElementVNode("h3",{class:"mn-b-small"},"Date",-1),re=e.createElementVNode("h3",{class:"mn-b-small"},"Description",-1),ue={key:5,class:"pd-b-extra w-100 bg-light pd-big radius-big"},ce={key:6,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},pe={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},me=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),fe=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),ge={key:0,class:"mn-b-thin"},he={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},be={__name:"EditEvent",setup(ve){const p=D.useRoute(),m=D.useRouter();let t=e.ref(null),b=e.ref(null);const v=e.ref([]),o=e.ref(null),d=e.ref(new Date);e.onMounted(async()=>{if(p.params.url){const a=await u.read({user:n.state.user._id,url:p.params.url});t.value=a.pop(),console.log(t.value);const l=t.value.date.start,c=t.value.date.end;d.value=[l,c]}else{u.clean(),t.value=u.state.current;const a=new Date,l=new Date;d.value=[a,l]}t.value.owner||(t.value.owner={target:n.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:n.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(o.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const s=await M.actions.read({user:n.state.user._id,postable:n.state.user._id,limit:100});b.value=s.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const g=e.ref(!1);function w(){g.value=!0}function E(){g.value=!1}function U(){v.value.length>0&&v.value.map(s=>s.text),t.value.status="draft",t.value.date={start:d.value[0],end:d.value[1]},p.params.url?u.update(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)}):u.create(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)})}function x(){o.value&&(t.value.owner={target:o.value._id,type:"organization"}),o.value||(t.value.creator.hidden=!1),o.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.date={start:d.value[0],end:d.value[1]},console.log(d.value),p.params.url?(console.log(t.value),u.update(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})):u.create(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})}function y(){confirm("Are you sure you want to delete this event?")&&u.remove(t.value._id).then(s=>{m.push({name:"User Events",params:{_id:t.value.creator.target._id}})}).catch(s=>{console.error(s)})}return(s,a)=>e.unref(t)?(e.openBlock(),e.createElementBlock("article",O,[e.createElementVNode("div",R,[e.createVNode(h.default,{photo:e.unref(t).cover,"onUpdate:photo":a[0]||(a[0]=l=>e.unref(t).cover=l),uploadPath:"specials",class:"h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"},null,8,["photo"]),S]),e.createVNode(i.default,{field:e.unref(t).name,"onUpdate:field":a[1]||(a[1]=l=>e.unref(t).name=l),placeholder:"Event name",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.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-b-semi w-100 bg-light pd-medium radius-small"},null,8,["field"]),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("h3",F," Tickets ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("div",{key:1,class:"mn-b-semi w-100 bg-light pd-medium radius-small",onClick:a[3]||(a[3]=l=>e.unref(m).push({name:"Edit Event Tickets",params:{url:e.unref(p).params.url}}))}," Edit tickets ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("h3",G," Special Details ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createBlock(V.default,{key:3,label:"Special",radio:e.unref(t).special,"onUpdate:radio":a[4]||(a[4]=l=>e.unref(t).special=!e.unref(t).special),class:"mn-b-semi w-100 bg-black t-white pd-medium radius-small"},null,8,["radio"])):e.createCommentVNode("",!0),e.unref(t).special?(e.openBlock(),e.createElementBlock("div",I,[A,e.createVNode(i.default,{field:e.unref(t).specialData.subtitle,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).specialData.subtitle=l),placeholder:"Event subtitle",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(L.default,{images:e.unref(t).specialData.logos,uploadPath:"/specials",text:{title:"Drag & Drop Your Logos Here",subtitle:"Files supported: JPG, PNG, GIF"},options:{showTitle:!0,showText:!1},"onUpdate:images":a[6]||(a[6]=l=>e.unref(t).specialData.logos=l),class:"mn-b-thin bg-light radius-small"},null,8,["images"]),z,H,e.createVNode(f.default,{field:e.unref(t).specialData.video,"onUpdate:field":a[7]||(a[7]=l=>e.unref(t).specialData.video=l),placeholder:"Upload video",onFileChange:a[8]||(a[8]=l=>e.unref(t).specialData.video=l),uploadPath:"specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),$,e.createElementVNode("div",Y,[e.createVNode(h.default,{photo:e.unref(t).specialData.ticketImage,"onUpdate:photo":a[9]||(a[9]=l=>e.unref(t).specialData.ticketImage=l),uploadPath:"/specials",class:"aspect-1x1 w-4r o-hidden radius-extra"},null,8,["photo"]),e.createElementVNode("div",j,[e.createVNode(i.default,{field:e.unref(t).specialData.ticketPrice,"onUpdate:field":a[10]||(a[10]=l=>e.unref(t).specialData.ticketPrice=l),type:"number",placeholder:"Ticket price in baht",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.ticketText,"onUpdate:field":a[11]||(a[11]=l=>e.unref(t).specialData.ticketText=l),placeholder:"Promotion text for ticket in hero ",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.ticketTextButton,"onUpdate:field":a[12]||(a[12]=l=>e.unref(t).specialData.ticketTextButton=l),placeholder:"Text on 'Buy Ticket' button ",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"])])]),J,K,e.createVNode(i.default,{field:e.unref(t).specialData.guestTitle,"onUpdate:field":a[13]||(a[13]=l=>e.unref(t).specialData.guestTitle=l),placeholder:"Title for Main Guest section",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestDescription,"onUpdate:field":a[14]||(a[14]=l=>e.unref(t).specialData.guestDescription=l),placeholder:"Description for Main Guest section",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createElementVNode("div",Q,[e.createVNode(i.default,{field:e.unref(t).specialData.guestFacebook,"onUpdate:field":a[15]||(a[15]=l=>e.unref(t).specialData.guestFacebook=l),placeholder:"Facebook of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestInstagram,"onUpdate:field":a[16]||(a[16]=l=>e.unref(t).specialData.guestInstagram=l),placeholder:"Instagram of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestTwitter,"onUpdate:field":a[17]||(a[17]=l=>e.unref(t).specialData.guestTwitter=l),placeholder:"Twitter of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestTelegram,"onUpdate:field":a[18]||(a[18]=l=>e.unref(t).specialData.guestTelegram=l),placeholder:"Telegram of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestSoundcloud,"onUpdate:field":a[19]||(a[19]=l=>e.unref(t).specialData.guestSoundcloud=l),placeholder:"Link to Main Guest soundcloud track",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestSpotify,"onUpdate:field":a[20]||(a[20]=l=>e.unref(t).specialData.guestSpotify=l),placeholder:"Link to Main guest spotify track",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestYoutube,"onUpdate:field":a[21]||(a[21]=l=>e.unref(t).specialData.guestYoutube=l),placeholder:"Link to Main guest youtube video",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"])]),W,e.createVNode(f.default,{field:e.unref(t).specialData.guestVideo,"onUpdate:field":a[22]||(a[22]=l=>e.unref(t).specialData.guestVideo=l),placeholder:"Upload video",onFileChange:a[23]||(a[23]=l=>e.unref(t).specialData.guestVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),e.createVNode(k.default,{title:"Guests",placeholder:"No guests added yet",actions:[{label:"+",function:()=>e.unref(t).specialData.guests.push({name:null,description:null,photo:null,main:!1})}],class:"cols-1 mn-b-thin t-black gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).specialData.guests,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-small gap-small cols-2-fit-content",key:c},[e.createVNode(h.default,{photo:l.photo,"onUpdate:photo":r=>l.photo=r,uploadPath:"/specials",class:"aspect-1x1 w-8r o-hidden radius-extra"},null,8,["photo","onUpdate:photo"]),e.createElementVNode("div",X,[e.createElementVNode("div",Z,[e.createVNode(i.default,{field:l.name,"onUpdate:field":r=>l.name=r,placeholder:"Name",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:l.description,"onUpdate:field":r=>l.description=r,placeholder:"Description",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"])]),e.createElementVNode("div",ee,[e.createVNode(N.default,{onClick:()=>e.unref(t).specialData.guests.splice(c,1),class:"i-medium"},null,8,["onClick"])])])]))),128))]),_:1},8,["actions"]),te,le,e.createVNode(k.default,{title:"Line Up",placeholder:"No line ups added yet",actions:[{label:"+",function:()=>e.unref(t).specialData.lineup.push({name:null,description:null,photo:null,main:!1})}],class:"cols-1 t-black gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).specialData.lineup,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-thin gap-small flex-nowrap flex",key:c},[e.createVNode(i.default,{field:l.name,"onUpdate:field":r=>l.name=r,placeholder:"Name",class:"w-100 bg-light radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:l.time,"onUpdate:field":r=>l.time=r,placeholder:"Time",class:"w-100 bg-light radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",ae,[e.createVNode(N.default,{onClick:()=>e.unref(t).specialData.lineup.splice(c,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),se,e.createVNode(f.default,{field:e.unref(t).specialData.lineupBackground,"onUpdate:field":a[24]||(a[24]=l=>e.unref(t).specialData.lineupBackground=l),placeholder:"Upload image",onFileChange:a[25]||(a[25]=l=>e.unref(t).specialData.lineupBackground=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),ie,ne,oe,e.createVNode(i.default,{field:e.unref(t).specialData.previousTitle,"onUpdate:field":a[26]||(a[26]=l=>e.unref(t).specialData.previousTitle=l),placeholder:"Title",value:"Explore our exclusive party archive",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousDescription,"onUpdate:field":a[27]||(a[27]=l=>e.unref(t).specialData.previousDescription=l),label:"Description",value:"Experience the ultimate party vibe at The Commune! Elevate your evening with distinctive and exhilarating activities, ensuring an unforgettable time. Dive into the excitement and make every moment special.",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousLinkText,"onUpdate:field":a[28]||(a[28]=l=>e.unref(t).specialData.previousLinkText=l),label:"Button",value:"Check In Instagram",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousLink,"onUpdate:field":a[29]||(a[29]=l=>e.unref(t).specialData.previousLink=l),label:"Link",value:"https://www.instagram.com/thecommune.phuket/",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(f.default,{field:e.unref(t).specialData.previousVideo,"onUpdate:field":a[30]||(a[30]=l=>e.unref(t).specialData.previousVideo=l),placeholder:"Upload image",onFileChange:a[31]||(a[31]=l=>e.unref(t).specialData.previousVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"])])):e.createCommentVNode("",!0),de,e.createVNode(e.unref(T.default),{modelValue:d.value,"onUpdate:modelValue":a[32]||(a[32]=l=>d.value=l),range:"",class:"z-index-3 mn-b-semi"},null,8,["modelValue"]),re,e.unref(t)?(e.openBlock(),e.createElementBlock("section",ue,[e.createVNode(B.default,{content:e.unref(t).content,onUpdate:a[33]||(a[33]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",ce,[e.createElementVNode("div",pe,[e.unref(p).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[34]||(a[34]=l=>y()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[35]||(a[35]=l=>U()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[36]||(a[36]=l=>w()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(C.default,{title:"Publish",onClosePopup:E,isPopupOpen:g.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[me,e.createVNode(P.default,{onTagsChanged:a[37]||(a[37]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),fe,e.createVNode(_.default,{modelValue:o.value,"onUpdate:modelValue":a[38]||(a[38]=l=>o.value=l),options:e.unref(b),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["modelValue","options"]),o.value?(e.openBlock(),e.createElementBlock("h5",ge,"Options:")):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",he,[e.createVNode(V.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[39]||(a[39]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(q.default,{submit:x,callback:s.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=be;
@@ -1,10 +1,10 @@
1
1
  import { ref as v, onMounted as $, unref as a, openBlock as u, createElementBlock as r, createElementVNode as s, createVNode as i, createCommentVNode as p, createBlock as G, withCtx as D, Fragment as _, renderList as T, createTextVNode as F } from "vue";
2
- import "../../../constructor/components/elements/Textarea.vue.js";
2
+ import "../../../constructor/components/elements/Textarea.vue2.js";
3
3
  import A from "../../../constructor/components/sections/Constructor.vue.js";
4
4
  import B from "../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js";
5
5
  import "../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.js";
6
6
  import E from "../../../../components/Block/Block.vue.js";
7
- import I from "../../../../components/Popup/Popup.vue2.js";
7
+ import I from "../../../../components/Popup/Popup.vue.js";
8
8
  import n from "../../../../components/Field/Field.vue2.js";
9
9
  import z from "../../../../components/FieldTags/BlockTags.vue.js";
10
10
  import P 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"),y=require("../../../../components/Feed/Feed.vue.cjs"),N=require("../../../../components/Block/Block.vue.cjs"),x=require("../../../../components/Popup/Popup.vue2.cjs"),u=require("../../../../components/Field/Field.vue2.cjs"),d=require("../../../../components/Button/Button.vue2.cjs"),V=require("../elements/ButtonCheck.vue.cjs"),q=require("../../../icons/navigation/IconDelete.vue.cjs"),B=require("../../../icons/navigation/IconAdd.vue.cjs"),b=require("vue-router"),E=require("../../store/events.cjs"),C=require("../../../auth/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const m=require("../../store/tickets.cjs");require("./EditEventTickets.vue2.cjs");const T={key:0,class:"h-100 pd-thin"},P={class:"mn-b-medium flex-v-center flex-nowrap flex"},S=e.createElementVNode("h2",{class:"mn-r-medium"},"Tickets",-1),D=["onClick"],U={class:"radius-big bg-light gap-small pd-medium flex-v-center flex-nowrap flex pos-relative mn-b-thin"},A=["href"],F=["src"],O={class:"mn-r-auto"},M={class:"h4"},R={class:"h5 t-transp mn-b-thin"},I={class:"pd-r-thin pd-l-thin pd-b-nano pd-t-nano bg-second radius-extra t-white t-medium d-block w-max uppercase"},L={__name:"EditEventTickets",setup(Q){var h;const g=b.useRoute();b.useRouter();let n=e.ref(null);const c=e.ref([{name:"",email:"",target:(h=n.value)==null?void 0:h._id,type:"event",quantity:1}]),i=e.ref(!1);function _(r){var l;i.value=!0,c.value=[{name:"",email:"",target:(l=n.value)==null?void 0:l._id,type:"event",quantity:1}]}function p(){i.value=!1}const s=e.ref(!1);e.onMounted(async()=>{const r=await E.read({user:C.state.user._id,url:g.params.url});n.value=r.pop()});async function w(){try{const r=await m.actions.create(c.value);s.value=!s.value}catch(r){console.log(r)}}async function f(r,l){if(confirm("Are you sure you want to deactivate this event?"))try{const t=await m.actions.update({...r,status:l});s.value=!s.value}catch(t){console.error(t)}}return(r,l)=>e.unref(n)?(e.openBlock(),e.createElementBlock("article",T,[e.createElementVNode("header",P,[S,e.createElementVNode("button",{onClick:l[0]||(l[0]=t=>_()),class:"radius-extra uppercase button-small flex-child flex-child-shrink-0 hover-scale-1 cursor-pointer t-white bg-second"}," Add Tickets "),e.createVNode(V.default,{onQrcodecheck:l[1]||(l[1]=t=>s.value=!s.value),class:"w-100 pd-medium mn-auto"})]),e.createVNode(x.default,{title:"Добавить участника",onClosePopup:p,isPopupOpen:i.value,class:"w-max-40r"},{default:e.withCtx(()=>[e.createVNode(N.default,{title:"Add tickets",placeholder:"No parameters added yet",class:"cols-1 mn-b-thin gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:a},[e.createVNode(u.default,{field:t.name,"onUpdate:field":o=>t.name=o,placeholder:"Name",class:"w-50 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(u.default,{field:t.email,"onUpdate:field":o=>t.email=o,placeholder:"Email",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(u.default,{field:t.quantity,"onUpdate:field":o=>t.quantity=o,placeholder:"Quantity",type:"number",class:"w-25 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),a<1?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:l[2]||(l[2]=()=>c.value.push({name:"",value:"",target:e.unref(n)._id,type:"event",quantity:1})),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-green"},[e.createVNode(B.default,{class:"i-medium",fill:"rgb(var(--white)"})])):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:()=>c.value.splice(a,1),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},[e.createVNode(q.default,{class:"i-medium",fill:"rgb(var(--white)"})],8,D))]))),128)),e.createVNode(d.default,{submit:w,callback:p,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Create Tickets ")]),_:1})]),_:1})]),_:1},8,["isPopupOpen"]),e.createVNode(y.default,{search:!0,states:{empty:{title:"No Tickets Found",description:"Currently, there are no tickets."}},store:{read:t=>m.actions.read(t),state:null},options:{target:e.unref(n)._id},external:s.value},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,(a,o)=>{var v,k;return e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("a",{href:a.image,target:"_blank"},[e.createElementVNode("img",{src:a.qrcode,class:"radius-small h-5r w-5r"},null,8,F)],8,A),e.createElementVNode("div",O,[e.createElementVNode("p",M,e.toDisplayString(((v=a.client_refactor)==null?void 0:v.name)||"No name")+", "+e.toDisplayString(a.role),1),e.createElementVNode("p",R,e.toDisplayString(((k=a.client_refactor)==null?void 0:k.email)||"No email"),1),e.createElementVNode("span",I,e.toDisplayString(a.status),1)]),a.status!=="deactivated"?(e.openBlock(),e.createBlock(d.default,{key:0,submit:()=>f(a,"deactivated"),callback:r.redirectTo,class:"w-min h-min pd-small bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Deactivate ")]),_:2},1032,["submit","callback"])):e.createCommentVNode("",!0),a.status==="deactivated"||a.status==="used"?(e.openBlock(),e.createBlock(d.default,{key:1,submit:()=>f(a,"unused"),callback:r.redirectTo,class:"w-min h-min pd-small bg-green t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Activate ")]),_:2},1032,["submit","callback"])):e.createCommentVNode("",!0)])}),256))]),_:1},8,["store","options","external"])])):e.createCommentVNode("",!0)}};exports.default=L;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("../../../../components/Feed/Feed.vue.cjs"),N=require("../../../../components/Block/Block.vue.cjs"),x=require("../../../../components/Popup/Popup.vue.cjs"),u=require("../../../../components/Field/Field.vue2.cjs"),d=require("../../../../components/Button/Button.vue2.cjs"),V=require("../elements/ButtonCheck.vue.cjs"),q=require("../../../icons/navigation/IconDelete.vue.cjs"),B=require("../../../icons/navigation/IconAdd.vue.cjs"),b=require("vue-router"),E=require("../../store/events.cjs"),C=require("../../../auth/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const m=require("../../store/tickets.cjs");require("./EditEventTickets.vue2.cjs");const T={key:0,class:"h-100 pd-thin"},P={class:"mn-b-medium flex-v-center flex-nowrap flex"},S=e.createElementVNode("h2",{class:"mn-r-medium"},"Tickets",-1),D=["onClick"],U={class:"radius-big bg-light gap-small pd-medium flex-v-center flex-nowrap flex pos-relative mn-b-thin"},A=["href"],F=["src"],O={class:"mn-r-auto"},M={class:"h4"},R={class:"h5 t-transp mn-b-thin"},I={class:"pd-r-thin pd-l-thin pd-b-nano pd-t-nano bg-second radius-extra t-white t-medium d-block w-max uppercase"},L={__name:"EditEventTickets",setup(Q){var h;const g=b.useRoute();b.useRouter();let n=e.ref(null);const c=e.ref([{name:"",email:"",target:(h=n.value)==null?void 0:h._id,type:"event",quantity:1}]),i=e.ref(!1);function _(r){var l;i.value=!0,c.value=[{name:"",email:"",target:(l=n.value)==null?void 0:l._id,type:"event",quantity:1}]}function p(){i.value=!1}const s=e.ref(!1);e.onMounted(async()=>{const r=await E.read({user:C.state.user._id,url:g.params.url});n.value=r.pop()});async function w(){try{const r=await m.actions.create(c.value);s.value=!s.value}catch(r){console.log(r)}}async function f(r,l){if(confirm("Are you sure you want to deactivate this event?"))try{const t=await m.actions.update({...r,status:l});s.value=!s.value}catch(t){console.error(t)}}return(r,l)=>e.unref(n)?(e.openBlock(),e.createElementBlock("article",T,[e.createElementVNode("header",P,[S,e.createElementVNode("button",{onClick:l[0]||(l[0]=t=>_()),class:"radius-extra uppercase button-small flex-child flex-child-shrink-0 hover-scale-1 cursor-pointer t-white bg-second"}," Add Tickets "),e.createVNode(V.default,{onQrcodecheck:l[1]||(l[1]=t=>s.value=!s.value),class:"w-100 pd-medium mn-auto"})]),e.createVNode(x.default,{title:"Добавить участника",onClosePopup:p,isPopupOpen:i.value,class:"w-max-40r"},{default:e.withCtx(()=>[e.createVNode(N.default,{title:"Add tickets",placeholder:"No parameters added yet",class:"cols-1 mn-b-thin gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:a},[e.createVNode(u.default,{field:t.name,"onUpdate:field":o=>t.name=o,placeholder:"Name",class:"w-50 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(u.default,{field:t.email,"onUpdate:field":o=>t.email=o,placeholder:"Email",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(u.default,{field:t.quantity,"onUpdate:field":o=>t.quantity=o,placeholder:"Quantity",type:"number",class:"w-25 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),a<1?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:l[2]||(l[2]=()=>c.value.push({name:"",value:"",target:e.unref(n)._id,type:"event",quantity:1})),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-green"},[e.createVNode(B.default,{class:"i-medium",fill:"rgb(var(--white)"})])):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:()=>c.value.splice(a,1),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},[e.createVNode(q.default,{class:"i-medium",fill:"rgb(var(--white)"})],8,D))]))),128)),e.createVNode(d.default,{submit:w,callback:p,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Create Tickets ")]),_:1})]),_:1})]),_:1},8,["isPopupOpen"]),e.createVNode(y.default,{search:!0,states:{empty:{title:"No Tickets Found",description:"Currently, there are no tickets."}},store:{read:t=>m.actions.read(t),state:null},options:{target:e.unref(n)._id},external:s.value},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,(a,o)=>{var v,k;return e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("a",{href:a.image,target:"_blank"},[e.createElementVNode("img",{src:a.qrcode,class:"radius-small h-5r w-5r"},null,8,F)],8,A),e.createElementVNode("div",O,[e.createElementVNode("p",M,e.toDisplayString(((v=a.client_refactor)==null?void 0:v.name)||"No name")+", "+e.toDisplayString(a.role),1),e.createElementVNode("p",R,e.toDisplayString(((k=a.client_refactor)==null?void 0:k.email)||"No email"),1),e.createElementVNode("span",I,e.toDisplayString(a.status),1)]),a.status!=="deactivated"?(e.openBlock(),e.createBlock(d.default,{key:0,submit:()=>f(a,"deactivated"),callback:r.redirectTo,class:"w-min h-min pd-small bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Deactivate ")]),_:2},1032,["submit","callback"])):e.createCommentVNode("",!0),a.status==="deactivated"||a.status==="used"?(e.openBlock(),e.createBlock(d.default,{key:1,submit:()=>f(a,"unused"),callback:r.redirectTo,class:"w-min h-min pd-small bg-green t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Activate ")]),_:2},1032,["submit","callback"])):e.createCommentVNode("",!0)])}),256))]),_:1},8,["store","options","external"])])):e.createCommentVNode("",!0)}};exports.default=L;
@@ -1,7 +1,7 @@
1
1
  import { ref as p, onMounted as B, unref as _, openBlock as i, createElementBlock as o, createElementVNode as r, createVNode as l, withCtx as u, Fragment as $, renderList as q, createTextVNode as v, toDisplayString as f, createBlock as P, createCommentVNode as b } from "vue";
2
2
  import V from "../../../../components/Feed/Feed.vue.js";
3
3
  import F from "../../../../components/Block/Block.vue.js";
4
- import O from "../../../../components/Popup/Popup.vue2.js";
4
+ import O from "../../../../components/Popup/Popup.vue.js";
5
5
  import g from "../../../../components/Field/Field.vue2.js";
6
6
  import w from "../../../../components/Button/Button.vue2.js";
7
7
  import S from "../elements/ButtonCheck.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router"),t=require("./List.vue.cjs");require("../../store/events.cjs");const u=require("../../../auth/store/auth.cjs"),i={class:"cols-2 gap-medium pd-medium bg-light radius-big"},r={class:""},d=e.createElementVNode("h3",{class:"mn-b-medium"}," Finished Events ",-1),n={class:""},a=e.createElementVNode("h2",{class:"mn-b-medium"}," Planned ",-1),o={__name:"FeaturedEvents",setup(c){return s.useRoute(),s.useRouter(),(l,m)=>(e.openBlock(),e.createElementBlock("div",i,[e.createElementVNode("div",r,[d,e.createVNode(t.default,{user:u.state.user._id,class:"bg-white mn-b-medium radius-big",phase:"finished"},null,8,["user"])]),e.createElementVNode("div",n,[a,e.createVNode(t.default,{user:u.state.user._id,class:"bg-white mn-b-medium radius-big",phase:"planned"},null,8,["user"])])]))}};exports.default=o;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router"),t=require("./List.vue.cjs");require("../../store/events.cjs");const u=require("../../../auth/store/auth.cjs"),i={class:"cols-2 gap-medium pd-medium bg-light radius-big"},r={class:""},d=e.createElementVNode("h3",{class:"mn-b-medium"}," Finished Events ",-1),n={class:""},a=e.createElementVNode("h3",{class:"mn-b-medium"}," Planned ",-1),o={__name:"FeaturedEvents",setup(c){return s.useRoute(),s.useRouter(),(l,m)=>(e.openBlock(),e.createElementBlock("div",i,[e.createElementVNode("div",r,[d,e.createVNode(t.default,{user:u.state.user._id,class:"bg-white mn-b-medium radius-big",phase:"finished"},null,8,["user"])]),e.createElementVNode("div",n,[a,e.createVNode(t.default,{user:u.state.user._id,class:"bg-white mn-b-medium radius-big",phase:"planned"},null,8,["user"])])]))}};exports.default=o;
@@ -3,7 +3,7 @@ import { useRoute as r, useRouter as d } from "vue-router";
3
3
  import t from "./List.vue.js";
4
4
  import "../../store/events.js";
5
5
  import { state as i } from "../../../auth/store/auth.js";
6
- const n = { class: "cols-2 gap-medium pd-medium bg-light radius-big" }, a = { class: "" }, u = /* @__PURE__ */ e("h3", { class: "mn-b-medium" }, " Finished Events ", -1), c = { class: "" }, _ = /* @__PURE__ */ e("h2", { class: "mn-b-medium" }, " Planned ", -1), k = {
6
+ const n = { class: "cols-2 gap-medium pd-medium bg-light radius-big" }, a = { class: "" }, u = /* @__PURE__ */ e("h3", { class: "mn-b-medium" }, " Finished Events ", -1), c = { class: "" }, _ = /* @__PURE__ */ e("h3", { class: "mn-b-medium" }, " Planned ", -1), k = {
7
7
  __name: "FeaturedEvents",
8
8
  setup(l) {
9
9
  return r(), d(), (h, p) => (m(), o("div", n, [
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("vue-router");require("../../../../components/Field/Field.vue.cjs");const k=require("../../../../components/Button/Button.vue2.cjs");require("../../../../components/Select/Select.vue.cjs");const q=require("../../../../components/Chips/Chips.vue.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const w=require("../../../../components/Popup/Popup.vue2.cjs"),B=require("../../../../components/Feed/Feed.vue.cjs"),h=require("../../../auth/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const s=require("../../store/gallery.cjs"),N=require("../../../globals/components/blocks/CardHeader.vue.cjs"),V=require("../../../globals/components/sections/SectionPageTitle.vue.cjs"),C=require("../../../../components/EditImages/EditImages.vue.cjs"),E=require("../../../../components/FieldTags/BlockTags.vue.cjs"),U={class:"cols-1 gap-thin pd-thin"},x=["src"],I={class:"pd-small"},T=["src"],A={__name:"BackofficeGallery",setup(F){const p=y.useRoute(),u=e.ref("all"),i=e.ref(!1);function g(l){i.value=!0,m.value=l}function d(){i.value=!1,m.value=null}const m=e.ref(null);e.ref("all");const r=e.ref({tags:null,image:null}),n=e.ref([]),v=l=>{n.value=l};e.ref(null);const c=e.ref([]),b=async l=>{await s.default.delete(l)},P=async()=>{await s.default.update(r.value),d()},_=async()=>{if(n.length<1){alert("Upload at least 1 image");return}let l=await s.default.create({images:n.value,tags:r.value.tags,owner:{type:"Organization",target:p.params._id},creator:{type:"User",target:h.state.user._id}});for(let t of l)s.default.addItem(t,c.value)};return e.onMounted(async()=>{}),(l,t)=>(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(V.default,{title:"Manage Gallery","onUpdate:tabs_current":t[0]||(t[0]=a=>u.value=a),tabs_current:u.value,tabs:[{name:"All",value:"all"},{name:"Featured",value:"featured"},{name:"Published",value:"published"},{name:"Draft",value:"draft"},{name:"Archived",value:"archived"}],actions:[{method:()=>g(null),label:"Add Photo"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["tabs_current","actions"]),e.createVNode(B.default,{items:c.value,"onUpdate:items":t[2]||(t[2]=a=>c.value=a),sort:e.unref(s.default).state.sort,"onUpdate:sort":t[3]||(t[3]=a=>e.unref(s.default).state.sort=a),search:!0,states:{empty:{title:"No Photos Found",description:"Currently, there are no photos in gallery."}},store:{read:a=>e.unref(s.default).read(a)},options:{limit:15,owner:e.unref(p).params._id,...u.value!=="all"&&{status:u.value}},class:"cols-3 gap-thin"},{default:e.withCtx(({items:a})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,o=>{var f;return e.openBlock(),e.createElementBlock("div",{key:o._id,class:"bg-light radius-small flex-column pos-relative flex-wrap"},[e.createVNode(N.default,{entity:o,entityType:"photo",user:h.state.user._id,owner:o.creator,creator:o.creator,date:o.createdAt,actions:[{method:()=>b(o._id),label:"Delete"}],class:"pd-small mn-b-small"},null,8,["entity","user","owner","creator","date","actions"]),e.createElementVNode("img",{src:(l.FILE_SERVER_URL||"")+o.cover,class:"w-100 h-20r object-fit-contain bg-black",onClick:t[1]||(t[1]=O=>g(l.photo))},null,8,x),e.createElementVNode("div",I,[((f=o.tags)==null?void 0:f.length)>0?(e.openBlock(),e.createBlock(q.default,{key:0,chips:o.tags},null,8,["chips"])):e.createCommentVNode("",!0)])])}),128))]),_:1},8,["items","sort","store","options"]),e.createVNode(w.default,{title:"Add photo",onClosePopup:d,isPopupOpen:i.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[r.value.cover?(e.openBlock(),e.createElementBlock("img",{key:0,src:r.value.cover,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,T)):e.createCommentVNode("",!0),e.createVNode(C.default,{images:n.value,uploadPath:"/photos","onUpdate:images":v,class:"mn-b-semi bg-light radius-medium"},null,8,["images"]),e.createVNode(E.default,{onTagsChanged:t[4]||(t[4]=a=>r.value.tags=a),tags:r.value.tags},null,8,["tags"]),e.createVNode(k.default,{submit:r.value._id?P:_,callback:d,class:"mn-b-thin bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value._id?"Update":"Publish"),1)]),_:1},8,["submit"])]),_:1},8,["isPopupOpen"])]))}};exports.default=A;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("vue-router");require("../../../../components/Field/Field.vue.cjs");const k=require("../../../../components/Button/Button.vue2.cjs");require("../../../../components/Select/Select.vue2.cjs");const q=require("../../../../components/Chips/Chips.vue.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const w=require("../../../../components/Popup/Popup.vue.cjs"),B=require("../../../../components/Feed/Feed.vue.cjs"),h=require("../../../auth/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const s=require("../../store/gallery.cjs"),N=require("../../../globals/components/blocks/CardHeader.vue.cjs"),V=require("../../../globals/components/sections/SectionPageTitle.vue.cjs"),C=require("../../../../components/EditImages/EditImages.vue.cjs"),E=require("../../../../components/FieldTags/BlockTags.vue.cjs"),U={class:"cols-1 gap-thin pd-thin"},x=["src"],I={class:"pd-small"},T=["src"],A={__name:"BackofficeGallery",setup(F){const p=y.useRoute(),u=e.ref("all"),i=e.ref(!1);function g(l){i.value=!0,m.value=l}function d(){i.value=!1,m.value=null}const m=e.ref(null);e.ref("all");const r=e.ref({tags:null,image:null}),n=e.ref([]),v=l=>{n.value=l};e.ref(null);const c=e.ref([]),b=async l=>{await s.default.delete(l)},P=async()=>{await s.default.update(r.value),d()},_=async()=>{if(n.length<1){alert("Upload at least 1 image");return}let l=await s.default.create({images:n.value,tags:r.value.tags,owner:{type:"Organization",target:p.params._id},creator:{type:"User",target:h.state.user._id}});for(let t of l)s.default.addItem(t,c.value)};return e.onMounted(async()=>{}),(l,t)=>(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(V.default,{title:"Manage Gallery","onUpdate:tabs_current":t[0]||(t[0]=a=>u.value=a),tabs_current:u.value,tabs:[{name:"All",value:"all"},{name:"Featured",value:"featured"},{name:"Published",value:"published"},{name:"Draft",value:"draft"},{name:"Archived",value:"archived"}],actions:[{method:()=>g(null),label:"Add Photo"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["tabs_current","actions"]),e.createVNode(B.default,{items:c.value,"onUpdate:items":t[2]||(t[2]=a=>c.value=a),sort:e.unref(s.default).state.sort,"onUpdate:sort":t[3]||(t[3]=a=>e.unref(s.default).state.sort=a),search:!0,states:{empty:{title:"No Photos Found",description:"Currently, there are no photos in gallery."}},store:{read:a=>e.unref(s.default).read(a)},options:{limit:15,owner:e.unref(p).params._id,...u.value!=="all"&&{status:u.value}},class:"cols-3 gap-thin"},{default:e.withCtx(({items:a})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,o=>{var f;return e.openBlock(),e.createElementBlock("div",{key:o._id,class:"bg-light radius-small flex-column pos-relative flex-wrap"},[e.createVNode(N.default,{entity:o,entityType:"photo",user:h.state.user._id,owner:o.creator,creator:o.creator,date:o.createdAt,actions:[{method:()=>b(o._id),label:"Delete"}],class:"pd-small mn-b-small"},null,8,["entity","user","owner","creator","date","actions"]),e.createElementVNode("img",{src:(l.FILE_SERVER_URL||"")+o.cover,class:"w-100 h-20r object-fit-contain bg-black",onClick:t[1]||(t[1]=O=>g(l.photo))},null,8,x),e.createElementVNode("div",I,[((f=o.tags)==null?void 0:f.length)>0?(e.openBlock(),e.createBlock(q.default,{key:0,chips:o.tags},null,8,["chips"])):e.createCommentVNode("",!0)])])}),128))]),_:1},8,["items","sort","store","options"]),e.createVNode(w.default,{title:"Add photo",onClosePopup:d,isPopupOpen:i.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[r.value.cover?(e.openBlock(),e.createElementBlock("img",{key:0,src:r.value.cover,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,T)):e.createCommentVNode("",!0),e.createVNode(C.default,{images:n.value,uploadPath:"/photos","onUpdate:images":v,class:"mn-b-semi bg-light radius-medium"},null,8,["images"]),e.createVNode(E.default,{onTagsChanged:t[4]||(t[4]=a=>r.value.tags=a),tags:r.value.tags},null,8,["tags"]),e.createVNode(k.default,{submit:r.value._id?P:_,callback:d,class:"mn-b-thin bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value._id?"Update":"Publish"),1)]),_:1},8,["submit"])]),_:1},8,["isPopupOpen"])]))}};exports.default=A;
@@ -2,10 +2,10 @@ import { ref as l, onMounted as A, openBlock as i, createElementBlock as c, crea
2
2
  import { useRoute as F } from "vue-router";
3
3
  import "../../../../components/Field/Field.vue.js";
4
4
  import O from "../../../../components/Button/Button.vue2.js";
5
- import "../../../../components/Select/Select.vue.js";
5
+ import "../../../../components/Select/Select.vue2.js";
6
6
  import R from "../../../../components/Chips/Chips.vue.js";
7
7
  import "../../../../components/SelectMulti/SelectMulti.vue2.js";
8
- import D from "../../../../components/Popup/Popup.vue2.js";
8
+ import D from "../../../../components/Popup/Popup.vue.js";
9
9
  import L from "../../../../components/Feed/Feed.vue.js";
10
10
  import { state as k } from "../../../auth/store/auth.js";
11
11
  import "../../../organizations/store/organizations.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("vue-router");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../../components/Upload/Upload.vue2.cjs");require("../../store/gallery.cjs");const N={class:"pd-medium flex-v-center gap-big flex-nowrap flex pd-t-thin pd-b-thin o-scroll"},V=["onClick"],C=["data-id"],B=["src","onClick"],q={class:"modal pd-thin"},M={class:"modal-content radius-big"},S={class:""},x=["src"],I=!1,m=10,z={__name:"GalleryWithCategories",setup(G){w.useRoute();const r=e.ref(null),v=["all","place","drinks","people","events"];let s=1,i=e.ref(null),c=e.ref(!1);const f=e.computed(()=>n.value==="all"?state.gallery:state.gallery.filter(l=>l.categories.includes(n.value))),p=async()=>{c.value=!0,await actions.fetchGallery(s,m),c.value=!1},a=e.ref(null),o=e.ref({categories:"",size:"",image:!1}),h=e.ref(null),g=l=>{I.value?_(l):(a.value="modal",o.value.image=l,d())},_=l=>{a.value="edit-modal",o.value=l||{categories:"",size:"",image:null},d()},k=()=>{o.value={categories:"",size:"",image:!1},h.value=null,y()},d=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},y=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""};let n=e.ref("all");const E=l=>{n.value=l};return e.onMounted(async()=>{await actions.fetchGallery(s,m),typeof window<"u"&&new IntersectionObserver(u=>{u.some(t=>t.isIntersecting)&&(s+=1,p())}).observe(i.value)}),(l,u)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",N,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(v,t=>e.createElementVNode("a",{key:t,onClick:b=>E(t),class:e.normalizeClass(["h3 uppercase",{"t-transp":e.unref(n)!==t,"pd-thin bg-main radius-small":e.unref(n)===t}])},e.toDisplayString(l.$t("gallery.categories."+t)),11,V)),64)),e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:r,class:"pd-medium cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(t,b)=>(e.openBlock(),e.createElementBlock("div",{key:t.id,"data-id":t.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+t.cover,class:"w-100 h-100 o-hidden radius-big object-fit-cover",onClick:$=>g(t.image)},null,8,B)):e.createCommentVNode("",!0)]),_:2},1024)],8,C))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:i,class:"sentinel"},null,512),e.withDirectives(e.createElementVNode("div",q,[e.createElementVNode("div",M,[e.createElementVNode("div",S,[e.createElementVNode("span",{class:"close",onClick:k},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+o.value.image},null,8,x)])])],512),[[e.vShow,o.value.image!==!1&&a.value==="modal"]])],512)]))}};exports.default=z;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("vue-router");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Select/Select.vue2.cjs");require("../../../../components/Upload/Upload.vue2.cjs");require("../../store/gallery.cjs");const N={class:"pd-medium flex-v-center gap-big flex-nowrap flex pd-t-thin pd-b-thin o-scroll"},V=["onClick"],C=["data-id"],B=["src","onClick"],q={class:"modal pd-thin"},M={class:"modal-content radius-big"},S={class:""},x=["src"],I=!1,m=10,z={__name:"GalleryWithCategories",setup(G){w.useRoute();const r=e.ref(null),v=["all","place","drinks","people","events"];let s=1,i=e.ref(null),c=e.ref(!1);const f=e.computed(()=>n.value==="all"?state.gallery:state.gallery.filter(l=>l.categories.includes(n.value))),p=async()=>{c.value=!0,await actions.fetchGallery(s,m),c.value=!1},a=e.ref(null),o=e.ref({categories:"",size:"",image:!1}),h=e.ref(null),g=l=>{I.value?_(l):(a.value="modal",o.value.image=l,d())},_=l=>{a.value="edit-modal",o.value=l||{categories:"",size:"",image:null},d()},k=()=>{o.value={categories:"",size:"",image:!1},h.value=null,y()},d=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},y=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""};let n=e.ref("all");const E=l=>{n.value=l};return e.onMounted(async()=>{await actions.fetchGallery(s,m),typeof window<"u"&&new IntersectionObserver(u=>{u.some(t=>t.isIntersecting)&&(s+=1,p())}).observe(i.value)}),(l,u)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",N,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(v,t=>e.createElementVNode("a",{key:t,onClick:b=>E(t),class:e.normalizeClass(["h3 uppercase",{"t-transp":e.unref(n)!==t,"pd-thin bg-main radius-small":e.unref(n)===t}])},e.toDisplayString(l.$t("gallery.categories."+t)),11,V)),64)),e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:r,class:"pd-medium cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(t,b)=>(e.openBlock(),e.createElementBlock("div",{key:t.id,"data-id":t.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+t.cover,class:"w-100 h-100 o-hidden radius-big object-fit-cover",onClick:$=>g(t.image)},null,8,B)):e.createCommentVNode("",!0)]),_:2},1024)],8,C))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:i,class:"sentinel"},null,512),e.withDirectives(e.createElementVNode("div",q,[e.createElementVNode("div",M,[e.createElementVNode("div",S,[e.createElementVNode("span",{class:"close",onClick:k},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+o.value.image},null,8,x)])])],512),[[e.vShow,o.value.image!==!1&&a.value==="modal"]])],512)]))}};exports.default=z;
@@ -3,7 +3,7 @@ import { useRoute as O } from "vue-router";
3
3
  import "../../../../components/Field/Field.vue.js";
4
4
  import "../../../../components/Loader/Loader.vue.js";
5
5
  import "../../../../components/Button/Button.vue.js";
6
- import "../../../../components/Select/Select.vue.js";
6
+ import "../../../../components/Select/Select.vue2.js";
7
7
  import "../../../../components/Upload/Upload.vue2.js";
8
8
  import "../../store/gallery.js";
9
9
  const P = { class: "pd-medium flex-v-center gap-big flex-nowrap flex pd-t-thin pd-b-thin o-scroll" }, R = ["onClick"], T = ["data-id"], W = ["src", "onClick"], q = { class: "modal pd-thin" }, A = { class: "modal-content radius-big" }, H = { class: "" }, J = ["src"], K = !1, y = 10, ne = {