@ozdao/prometheus-framework 0.2.140 → 0.2.141

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. package/dist/main-BF_nMkug.js +92 -0
  2. package/dist/main-BHr0-Z3t.mjs +14510 -0
  3. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  4. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
  5. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  6. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +32 -32
  7. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -0
  8. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +36 -0
  9. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
  11. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  13. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
  15. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +3 -3
  17. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
  19. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +3 -3
  21. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
  23. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
  25. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  27. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +3 -3
  29. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
  31. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +2 -2
  33. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  35. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  37. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +2 -2
  39. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  41. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +3 -3
  43. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +3 -3
  45. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
  47. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +5 -5
  49. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  51. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
  53. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue.js +44 -41
  57. package/dist/prometheus-framework/src/modules/landing/localization/SubscribeNewsletter.json.cjs +1 -0
  58. package/dist/prometheus-framework/src/modules/landing/localization/SubscribeNewsletter.json.js +24 -0
  59. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  61. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
  63. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +5 -5
  65. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +3 -3
  69. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +2 -2
  71. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  73. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  75. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  77. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  79. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +5 -5
  81. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  83. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  85. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +5 -5
  87. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  89. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +2 -2
  91. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
  93. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
  95. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +7 -7
  97. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
  99. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  101. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  103. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  105. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  107. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +3 -3
  109. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +3 -3
  111. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  113. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +4 -4
  115. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +1 -1
  117. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  119. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
  121. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  123. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
  125. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  127. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +2 -2
  129. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +2 -2
  131. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +1 -1
  133. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
  134. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +5 -5
  135. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  136. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
  137. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  138. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  139. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  140. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
  141. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  142. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  143. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
  144. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
  145. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  146. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +2 -2
  147. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  148. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +5 -5
  149. package/dist/prometheus-framework.cjs.js +1 -1
  150. package/dist/prometheus-framework.es.js +1 -1
  151. package/dist/style.css +1 -1
  152. package/dist/web-BPUCAST-.mjs +54 -0
  153. package/dist/web-Bqpk8Mpk.js +1 -0
  154. package/package.json +1 -1
  155. package/src/components/FieldBig/FieldBig.vue +1 -1
  156. package/src/modules/landing/components/sections/SubscribeNewsletter.vue +13 -4
  157. package/src/modules/landing/localization/SubscribeNewsletter.json +20 -0
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../modules/icons/skeletons/SkeletonEvent.vue.cjs");;/* empty css */const M=require("../EmptyState/EmptyState.vue.cjs"),B=require("../Dropdown/Dropdown.vue.cjs"),N=require("../DatePicker/Calendar.vue2.cjs"),x=require("../BottomSheet/BottomSheet.vue.cjs"),S=require("../../modules/globals/components/blocks/BlockSearch.vue.cjs"),q=require("../../modules/globals/components/blocks/BlockSorting.vue.cjs"),E=require("../../modules/globals/components/blocks/BlockFilter.vue.cjs"),z=require("../../modules/globals/components/elements/ButtonSort.vue.cjs"),O=require("../../modules/globals/components/elements/ButtonDate.vue.cjs"),L=require("../../modules/icons/navigation/IconFilter.vue.cjs");;/* empty css */const F={key:0,class:"flex-nowrap flex gap-thin"},j={__name:"Feed",props:e.mergeModels({showLoadMore:{type:Boolean,default:!0},search:{type:[Boolean,Object],default:!1},states:{type:Object,default:()=>({empty:{title:String,description:String}})},store:{type:Object,default:()=>({read:Function,state:Object})},external:{type:Boolean,default:!1},options:{type:Object,default:()=>({category:null,limit:20,skip:0,owner:null,creator:null,user:null,status:null,period:null,contain:null})}},{search:{},searchModifiers:{},sort:{},sortModifiers:{},filter:{},filterModifiers:{},date:{},dateModifiers:{},items:{},itemsModifiers:{}}),emits:["update:search","update:sort","update:filter","update:date","update:items"],setup(s){const m=e.useModel(s,"search"),a=e.useModel(s,"sort"),o=e.useModel(s,"filter"),r=e.useModel(s,"date"),h=e.useModel(s,"items"),u=s,n=e.ref(h.value||[]),d=e.ref(!1);let p=e.ref(!0),b=e.ref(null),i=e.ref(u.options.skip?u.options.skip:0),v=e.ref(u.options.limit?u.options.limit:10),k=e.ref("");function C(t){k.value=t,i.value=0,v.value=10,f()}const y=async()=>{if(d.value){i.value+=v.value;const t=await u.store.read({skip:i.value,limit:v.value,search:k.value,dateStart:r.value?r.value.start:null,dateEnd:r.value?r.value.end:null,sortParam:a.value?a.value.param:null,sortOrder:a.value?a.value.order:null,...u.options});t.length===0||t.length<v.value?d.value=!1:d.value=!0,n.value=[...n.value,...t],h.value&&(h.value=n.value)}},f=async()=>{const t=await u.store.read({skip:i.value,limit:v.value,dateStart:r.value?r.value.start:null,dateEnd:r.value?r.value.end:null,sortParam:a.value?a.value.param:null,sortOrder:a.value?a.value.order:null,search:k.value,...u.options});t.length===0||t.length<v.value?d.value=!1:d.value=!0,n.value=t,h.value&&(h.value=n.value),p.value=!1};e.watch(()=>u.external,(t,l)=>{t!==l&&(i.value=0,f())},{deep:!0}),e.watch(()=>r.value,(t,l)=>{t!==l&&(i.value=0,f())},{deep:!0}),e.watch(()=>{var t;return(t=a.value)==null?void 0:t.order},(t,l)=>{t!==l&&(i.value=0,f())}),e.watch(()=>{var t;return(t=a.value)==null?void 0:t.param},(t,l)=>{t!==l&&(i.value=0,f())}),e.watch(()=>u.options,(t,l)=>{(t.organization!==l.organization||t.categories!==l.categories||t.prices!==l.prices||t.delivery!==l.delivery||t.search!==l.search||t.status!==l.status||t.hidden!==l.hidden||t.type!==l.type||t.tags!==l.tags||t.following!==l.following)&&(i.value=0,f())},{deep:!0});let g=null;return e.onMounted(async()=>{await f(),typeof window<"u"&&!u.showLoadMore&&(g=new IntersectionObserver(t=>{t.some(l=>l.isIntersecting)&&y()}),g.observe(b.value))}),e.onUnmounted(()=>{g&&g.disconnect()}),(t,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[m.value||r.value||a.value&&!a.value.hideButton?(e.openBlock(),e.createElementBlock("div",F,[m.value?(e.openBlock(),e.createBlock(S.default,{key:0,placeholder:m.value.placeholder||"Search...",class:e.normalizeClass(m.value.class||"bg-light"),onSearch:C},null,8,["placeholder","class"])):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:e.normalizeClass([o.value.class||"bg-light","flex-center flex pd-thin bg-light radius-extra aspect-1x1 h-100"])},[e.createVNode(L.default,{onClick:l[0]||(l[0]=()=>o.value.active=!o.value.active),class:"w-1r h-auto"})],2),o.value.active?(e.openBlock(),e.createBlock(x.default,{key:0,show:o.value.active,onToggle:l[2]||(l[2]=()=>o.value.active=!1),class:e.normalizeClass(["z-index-10 pos-fixed pos-t-0 pos-r-0",{"pos-t-0":o.value.active,"pos-t-100":!o.value.active}])},{default:e.withCtx(()=>[e.createVNode(E.default,{filter:o.value,"onUpdate:filter":l[1]||(l[1]=c=>o.value=c),options:o.value.options,class:"h-100 w-100 pd-small bg-light"},null,8,["filter","options"])]),_:1},8,["show","class"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createBlock(B.default,{key:2,label:{component:O.default,props:{date:r.value}},class:e.normalizeClass([r.value.class||"bg-light","flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-big"]),align:m.value?"right":"left"},{default:e.withCtx(()=>[e.createVNode(N.default,{date:r.value,"onUpdate:date":l[3]||(l[3]=c=>r.value=c),locale:t.$i18n.locale,allowRange:!0,class:"radius-semi w-100 o-hidden bg-light"},null,8,["date","locale"])]),_:1},8,["label","class","align"])):e.createCommentVNode("",!0),a.value&&!a.value.hideButton?(e.openBlock(),e.createBlock(B.default,{key:3,label:{component:z.default,props:{order:a.value.order},class:"w-1r"},class:e.normalizeClass([a.value.class||"bg-light","radius-extra aspect-1x1 h-100"]),align:m.value?"right":"left"},{default:e.withCtx(()=>[e.createVNode(q.default,{param:a.value.param,"onUpdate:param":l[4]||(l[4]=c=>a.value.param=c),order:a.value.order,"onUpdate:order":l[5]||(l[5]=c=>a.value.order=c),options:a.value.options,class:"h-100 pd-small radius-semi t-white bg-black"},null,8,["param","order","options"])]),_:1},8,["label","class","align"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.unref(p)?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:1,tag:"ul",name:"scaleTransition"},{default:e.withCtx(()=>[e.unref(p)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(v),c=>(e.openBlock(),e.createBlock(w.default,{key:"skeleton-"+c,class:"mn-b-small radius-big o-hidden d-block"}))),128)):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),!e.unref(p)&&n.value.length<1?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:2,tag:"ul",name:"feed"},{default:e.withCtx(()=>[!e.unref(p)&&n.value.length<1?(e.openBlock(),e.createBlock(M.default,{key:0,title:s.states.empty.title,description:s.states.empty.description,action:s.states.empty.action,callback:s.states.empty.callback,class:"pd-medium mn-b-thin bg-light radius-big"},null,8,["title","description","action","callback"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.TransitionGroup,{tag:"ul",name:"feed",class:e.normalizeClass(t.$attrs.class)},{default:e.withCtx(()=>[!e.unref(p)&&n.value.length>0?e.renderSlot(t.$slots,"default",{key:0,items:n.value}):e.createCommentVNode("",!0),s.showLoadMore&&d.value&&n.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:y,class:"col-w-100 w-100 bg-main button"}," Load More ")):e.createCommentVNode("",!0),e.createElementVNode("div",{key:"sentinel",ref_key:"sentinel",ref:b,class:"sentinel"},null,512)]),_:3},8,["class"])],64))}};exports.default=j;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../modules/icons/skeletons/SkeletonEvent.vue.cjs");;/* empty css */const M=require("../EmptyState/EmptyState.vue.cjs"),B=require("../Dropdown/Dropdown.vue2.cjs"),N=require("../DatePicker/Calendar.vue2.cjs"),x=require("../BottomSheet/BottomSheet.vue.cjs"),S=require("../../modules/globals/components/blocks/BlockSearch.vue.cjs"),q=require("../../modules/globals/components/blocks/BlockSorting.vue.cjs"),E=require("../../modules/globals/components/blocks/BlockFilter.vue.cjs"),z=require("../../modules/globals/components/elements/ButtonSort.vue.cjs"),O=require("../../modules/globals/components/elements/ButtonDate.vue.cjs"),L=require("../../modules/icons/navigation/IconFilter.vue.cjs");;/* empty css */const F={key:0,class:"flex-nowrap flex gap-thin"},j={__name:"Feed",props:e.mergeModels({showLoadMore:{type:Boolean,default:!0},search:{type:[Boolean,Object],default:!1},states:{type:Object,default:()=>({empty:{title:String,description:String}})},store:{type:Object,default:()=>({read:Function,state:Object})},external:{type:Boolean,default:!1},options:{type:Object,default:()=>({category:null,limit:20,skip:0,owner:null,creator:null,user:null,status:null,period:null,contain:null})}},{search:{},searchModifiers:{},sort:{},sortModifiers:{},filter:{},filterModifiers:{},date:{},dateModifiers:{},items:{},itemsModifiers:{}}),emits:["update:search","update:sort","update:filter","update:date","update:items"],setup(s){const m=e.useModel(s,"search"),a=e.useModel(s,"sort"),o=e.useModel(s,"filter"),r=e.useModel(s,"date"),h=e.useModel(s,"items"),u=s,n=e.ref(h.value||[]),d=e.ref(!1);let p=e.ref(!0),b=e.ref(null),i=e.ref(u.options.skip?u.options.skip:0),v=e.ref(u.options.limit?u.options.limit:10),k=e.ref("");function C(t){k.value=t,i.value=0,v.value=10,f()}const y=async()=>{if(d.value){i.value+=v.value;const t=await u.store.read({skip:i.value,limit:v.value,search:k.value,dateStart:r.value?r.value.start:null,dateEnd:r.value?r.value.end:null,sortParam:a.value?a.value.param:null,sortOrder:a.value?a.value.order:null,...u.options});t.length===0||t.length<v.value?d.value=!1:d.value=!0,n.value=[...n.value,...t],h.value&&(h.value=n.value)}},f=async()=>{const t=await u.store.read({skip:i.value,limit:v.value,dateStart:r.value?r.value.start:null,dateEnd:r.value?r.value.end:null,sortParam:a.value?a.value.param:null,sortOrder:a.value?a.value.order:null,search:k.value,...u.options});t.length===0||t.length<v.value?d.value=!1:d.value=!0,n.value=t,h.value&&(h.value=n.value),p.value=!1};e.watch(()=>u.external,(t,l)=>{t!==l&&(i.value=0,f())},{deep:!0}),e.watch(()=>r.value,(t,l)=>{t!==l&&(i.value=0,f())},{deep:!0}),e.watch(()=>{var t;return(t=a.value)==null?void 0:t.order},(t,l)=>{t!==l&&(i.value=0,f())}),e.watch(()=>{var t;return(t=a.value)==null?void 0:t.param},(t,l)=>{t!==l&&(i.value=0,f())}),e.watch(()=>u.options,(t,l)=>{(t.organization!==l.organization||t.categories!==l.categories||t.prices!==l.prices||t.delivery!==l.delivery||t.search!==l.search||t.status!==l.status||t.hidden!==l.hidden||t.type!==l.type||t.tags!==l.tags||t.following!==l.following)&&(i.value=0,f())},{deep:!0});let g=null;return e.onMounted(async()=>{await f(),typeof window<"u"&&!u.showLoadMore&&(g=new IntersectionObserver(t=>{t.some(l=>l.isIntersecting)&&y()}),g.observe(b.value))}),e.onUnmounted(()=>{g&&g.disconnect()}),(t,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[m.value||r.value||a.value&&!a.value.hideButton?(e.openBlock(),e.createElementBlock("div",F,[m.value?(e.openBlock(),e.createBlock(S.default,{key:0,placeholder:m.value.placeholder||"Search...",class:e.normalizeClass(m.value.class||"bg-light"),onSearch:C},null,8,["placeholder","class"])):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:e.normalizeClass([o.value.class||"bg-light","flex-center flex pd-thin bg-light radius-extra aspect-1x1 h-100"])},[e.createVNode(L.default,{onClick:l[0]||(l[0]=()=>o.value.active=!o.value.active),class:"w-1r h-auto"})],2),o.value.active?(e.openBlock(),e.createBlock(x.default,{key:0,show:o.value.active,onToggle:l[2]||(l[2]=()=>o.value.active=!1),class:e.normalizeClass(["z-index-10 pos-fixed pos-t-0 pos-r-0",{"pos-t-0":o.value.active,"pos-t-100":!o.value.active}])},{default:e.withCtx(()=>[e.createVNode(E.default,{filter:o.value,"onUpdate:filter":l[1]||(l[1]=c=>o.value=c),options:o.value.options,class:"h-100 w-100 pd-small bg-light"},null,8,["filter","options"])]),_:1},8,["show","class"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createBlock(B.default,{key:2,label:{component:O.default,props:{date:r.value}},class:e.normalizeClass([r.value.class||"bg-light","flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-big"]),align:m.value?"right":"left"},{default:e.withCtx(()=>[e.createVNode(N.default,{date:r.value,"onUpdate:date":l[3]||(l[3]=c=>r.value=c),locale:t.$i18n.locale,allowRange:!0,class:"radius-semi w-100 o-hidden bg-light"},null,8,["date","locale"])]),_:1},8,["label","class","align"])):e.createCommentVNode("",!0),a.value&&!a.value.hideButton?(e.openBlock(),e.createBlock(B.default,{key:3,label:{component:z.default,props:{order:a.value.order},class:"w-1r"},class:e.normalizeClass([a.value.class||"bg-light","radius-extra aspect-1x1 h-100"]),align:m.value?"right":"left"},{default:e.withCtx(()=>[e.createVNode(q.default,{param:a.value.param,"onUpdate:param":l[4]||(l[4]=c=>a.value.param=c),order:a.value.order,"onUpdate:order":l[5]||(l[5]=c=>a.value.order=c),options:a.value.options,class:"h-100 pd-small radius-semi t-white bg-black"},null,8,["param","order","options"])]),_:1},8,["label","class","align"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.unref(p)?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:1,tag:"ul",name:"scaleTransition"},{default:e.withCtx(()=>[e.unref(p)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(v),c=>(e.openBlock(),e.createBlock(w.default,{key:"skeleton-"+c,class:"mn-b-small radius-big o-hidden d-block"}))),128)):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),!e.unref(p)&&n.value.length<1?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:2,tag:"ul",name:"feed"},{default:e.withCtx(()=>[!e.unref(p)&&n.value.length<1?(e.openBlock(),e.createBlock(M.default,{key:0,title:s.states.empty.title,description:s.states.empty.description,action:s.states.empty.action,callback:s.states.empty.callback,class:"pd-medium mn-b-thin bg-light radius-big"},null,8,["title","description","action","callback"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.TransitionGroup,{tag:"ul",name:"feed",class:e.normalizeClass(t.$attrs.class)},{default:e.withCtx(()=>[!e.unref(p)&&n.value.length>0?e.renderSlot(t.$slots,"default",{key:0,items:n.value}):e.createCommentVNode("",!0),s.showLoadMore&&d.value&&n.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:y,class:"col-w-100 w-100 bg-main button"}," Load More ")):e.createCommentVNode("",!0),e.createElementVNode("div",{key:"sentinel",ref_key:"sentinel",ref:b,class:"sentinel"},null,512)]),_:3},8,["class"])],64))}};exports.default=j;
@@ -2,7 +2,7 @@ import { mergeModels as N, useModel as M, ref as g, watch as $, onMounted as T,
2
2
  import q from "../../modules/icons/skeletons/SkeletonEvent.vue.js";
3
3
  /* empty css */
4
4
  import A from "../EmptyState/EmptyState.vue.js";
5
- import z from "../Dropdown/Dropdown.vue.js";
5
+ import z from "../Dropdown/Dropdown.vue2.js";
6
6
  import D from "../DatePicker/Calendar.vue2.js";
7
7
  import H from "../BottomSheet/BottomSheet.vue.js";
8
8
  import J from "../../modules/globals/components/blocks/BlockSearch.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../Field/Field.vue2.cjs"),k=require("../../modules/icons/navigation/IconArrow.vue.cjs"),B=require("vue-i18n"),S={class:"pd-thin radius-extra flex-nowrap flex"},F={__name:"FieldBig",props:{input:String,placeholder:{type:String},action:{type:String,default:"Action"},placeholderTexts:{type:Object,default:()=>({en:["Lowest THC, please!","Something with banana flavors?","I'm in the mood for trippy vibes."],ru:["Я хочу самый низкий THC","Я хочу чего-нибудь бананового","Я хочу курнуть хейза"]})},typingSpeed:{type:Number,default:200},loopTyping:{type:Boolean,default:!1},enableTyping:{type:Boolean,default:!1}},emits:["update:input","action"],setup(s,{emit:y}){const t=s,{t:N,locale:c}=B.useI18n();let r=e.ref(0),a=e.ref(t.input),p=e.ref(t.placeholder),i=e.ref(t.enableTyping),d=e.ref(null),f=e.ref(""),o=e.ref(!0),v=null;const m=y;function b(){m("action")}function T(n){m("update:input",n),f.value=n}function g(){r.value=(r.value+1)%t.placeholderTexts[c.value].length}function I(){i.value=!1,clearInterval(d.value),p.value=t.placeholder,f.value||(a.value="")}function x(){!f.value&&t.enableTyping&&(i.value=!0,p.value="",h())}function h(){let n=t.placeholderTexts[c.value][r.value],l=0,u=!1;v=setInterval(()=>{o.value=!o.value},200),d.value=setInterval(()=>{i.value&&(u?(a.value=a.value.slice(0,-1),a.value=n.substring(0,l)+(o.value&&l%2?"|":""),l--):(a.value=n.substring(0,l)+(o.value&&l%2?"|":""),l++),l>n.length&&t.loopTyping&&setTimeout(()=>{u=!0,a.value=n.substring(0,l)},333),l===0&&u&&(u=!1,g(),n=t.placeholderTexts[c.value][r.value]))},t.typingSpeed)}return e.onMounted(()=>{t.enableTyping&&h()}),e.watchEffect(()=>{i.value||(clearInterval(d.value),clearInterval(v))}),(n,l)=>(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(w.default,{field:e.unref(a),"onUpdate:field":[l[0]||(l[0]=u=>e.isRef(a)?a.value=u:a=u),T],placeholder:e.unref(i)?" ":e.unref(p),onInput:g,onFocus:I,onBlur:x,class:"w-100 p-medium t-regular uppercase pd-small"},null,8,["field","placeholder"]),s.action?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:b,class:"t-nowrap t-medium radius-big uppercase cursor-pointer flex flex-v-center pd-r-small pd-l-small w-max hover-bg-fifth t-semi transition-linear transition-timing-1 t-black bg-main"},[e.createElementVNode("span",null,e.toDisplayString(s.action),1),e.createVNode(k.default,{class:"mn-l-thin radius-extra bg-white i-medium"})])):e.createCommentVNode("",!0)]))}};exports.default=F;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../Field/Field.vue.cjs"),k=require("../../modules/icons/navigation/IconArrow.vue.cjs"),B=require("vue-i18n"),S={class:"pd-thin radius-extra flex-nowrap flex"},F={__name:"FieldBig",props:{input:String,placeholder:{type:String},action:{type:String,default:"Action"},placeholderTexts:{type:Object,default:()=>({en:["Lowest THC, please!","Something with banana flavors?","I'm in the mood for trippy vibes."],ru:["Я хочу самый низкий THC","Я хочу чего-нибудь бананового","Я хочу курнуть хейза"]})},typingSpeed:{type:Number,default:200},loopTyping:{type:Boolean,default:!1},enableTyping:{type:Boolean,default:!1}},emits:["update:input","action"],setup(r,{emit:y}){const t=r,{t:N,locale:s}=B.useI18n();let o=e.ref(0),a=e.ref(t.input),f=e.ref(t.placeholder),i=e.ref(t.enableTyping),p=e.ref(null),d=e.ref(""),c=e.ref(!0),v=null;const m=y;function b(){m("action")}function T(n){m("update:input",n),d.value=n}function g(){o.value=(o.value+1)%t.placeholderTexts[s.value].length}function I(){i.value=!1,clearInterval(p.value),f.value=t.placeholder,d.value||(a.value="")}function x(){!d.value&&t.enableTyping&&(i.value=!0,f.value="",h())}function h(){let n=t.placeholderTexts[s.value][o.value],l=0,u=!1;v=setInterval(()=>{c.value=!c.value},200),p.value=setInterval(()=>{i.value&&(u?(a.value=a.value.slice(0,-1),a.value=n.substring(0,l)+(c.value&&l%2?"|":""),l--):(a.value=n.substring(0,l)+(c.value&&l%2?"|":""),l++),l>n.length&&t.loopTyping&&setTimeout(()=>{u=!0,a.value=n.substring(0,l)},333),l===0&&u&&(u=!1,g(),n=t.placeholderTexts[s.value][o.value]))},t.typingSpeed)}return e.onMounted(()=>{t.enableTyping&&h()}),e.watchEffect(()=>{i.value||(clearInterval(p.value),clearInterval(v))}),(n,l)=>(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(w.default,{field:e.unref(a),"onUpdate:field":[l[0]||(l[0]=u=>e.isRef(a)?a.value=u:a=u),T],placeholder:e.unref(i)?"":r.placeholder,onInput:g,onFocus:I,onBlur:x,class:"w-100 p-medium t-regular uppercase pd-small"},null,8,["field","placeholder"]),r.action?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:b,class:"t-nowrap t-medium radius-big uppercase cursor-pointer flex flex-v-center pd-r-small pd-l-small w-max hover-bg-fifth t-semi transition-linear transition-timing-1 t-black bg-main"},[e.createElementVNode("span",null,e.toDisplayString(r.action),1),e.createVNode(k.default,{class:"mn-l-thin radius-extra bg-white i-medium"})])):e.createCommentVNode("",!0)]))}};exports.default=F;
@@ -1,5 +1,5 @@
1
- import { ref as i, onMounted as _, watchEffect as C, openBlock as b, createElementBlock as x, createVNode as T, unref as v, isRef as F, createElementVNode as N, toDisplayString as V, createCommentVNode as E } from "vue";
2
- import A from "../Field/Field.vue2.js";
1
+ import { ref as i, onMounted as C, watchEffect as F, openBlock as y, createElementBlock as b, createVNode as x, unref as T, isRef as N, createElementVNode as V, toDisplayString as _, createCommentVNode as E } from "vue";
2
+ import A from "../Field/Field.vue.js";
3
3
  import H from "../../modules/icons/navigation/IconArrow.vue.js";
4
4
  import { useI18n as j } from "vue-i18n";
5
5
  const D = { class: "pd-thin radius-extra flex-nowrap flex" }, U = {
@@ -42,59 +42,59 @@ const D = { class: "pd-thin radius-extra flex-nowrap flex" }, U = {
42
42
  }
43
43
  },
44
44
  emits: ["update:input", "action"],
45
- setup(p, { emit: I }) {
46
- const l = p, { t: L, locale: s } = j();
47
- let r = i(0), t = i(l.input), c = i(l.placeholder), u = i(l.enableTyping), d = i(null), f = i(""), o = i(!0), m = null;
48
- const g = I;
45
+ setup(r, { emit: I }) {
46
+ const l = r, { t: L, locale: s } = j();
47
+ let o = i(0), t = i(l.input), f = i(l.placeholder), u = i(l.enableTyping), c = i(null), d = i(""), p = i(!0), v = null;
48
+ const m = I;
49
49
  function w() {
50
- g("action");
50
+ m("action");
51
51
  }
52
52
  function k(a) {
53
- g("update:input", a), f.value = a;
53
+ m("update:input", a), d.value = a;
54
54
  }
55
- function h() {
56
- r.value = (r.value + 1) % l.placeholderTexts[s.value].length;
55
+ function g() {
56
+ o.value = (o.value + 1) % l.placeholderTexts[s.value].length;
57
57
  }
58
58
  function B() {
59
- u.value = !1, clearInterval(d.value), c.value = l.placeholder, f.value || (t.value = "");
59
+ u.value = !1, clearInterval(c.value), f.value = l.placeholder, d.value || (t.value = "");
60
60
  }
61
61
  function S() {
62
- !f.value && l.enableTyping && (u.value = !0, c.value = "", y());
62
+ !d.value && l.enableTyping && (u.value = !0, f.value = "", h());
63
63
  }
64
- function y() {
65
- let a = l.placeholderTexts[s.value][r.value], e = 0, n = !1;
66
- m = setInterval(() => {
67
- o.value = !o.value;
68
- }, 200), d.value = setInterval(() => {
69
- u.value && (n ? (t.value = t.value.slice(0, -1), t.value = a.substring(0, e) + (o.value && e % 2 ? "|" : ""), e--) : (t.value = a.substring(0, e) + (o.value && e % 2 ? "|" : ""), e++), e > a.length && l.loopTyping && setTimeout(() => {
64
+ function h() {
65
+ let a = l.placeholderTexts[s.value][o.value], e = 0, n = !1;
66
+ v = setInterval(() => {
67
+ p.value = !p.value;
68
+ }, 200), c.value = setInterval(() => {
69
+ u.value && (n ? (t.value = t.value.slice(0, -1), t.value = a.substring(0, e) + (p.value && e % 2 ? "|" : ""), e--) : (t.value = a.substring(0, e) + (p.value && e % 2 ? "|" : ""), e++), e > a.length && l.loopTyping && setTimeout(() => {
70
70
  n = !0, t.value = a.substring(0, e);
71
- }, 333), e === 0 && n && (n = !1, h(), a = l.placeholderTexts[s.value][r.value]));
71
+ }, 333), e === 0 && n && (n = !1, g(), a = l.placeholderTexts[s.value][o.value]));
72
72
  }, l.typingSpeed);
73
73
  }
74
- return _(() => {
75
- l.enableTyping && y();
76
- }), C(() => {
77
- u.value || (clearInterval(d.value), clearInterval(m));
78
- }), (a, e) => (b(), x("div", D, [
79
- T(A, {
80
- field: v(t),
74
+ return C(() => {
75
+ l.enableTyping && h();
76
+ }), F(() => {
77
+ u.value || (clearInterval(c.value), clearInterval(v));
78
+ }), (a, e) => (y(), b("div", D, [
79
+ x(A, {
80
+ field: T(t),
81
81
  "onUpdate:field": [
82
- e[0] || (e[0] = (n) => F(t) ? t.value = n : t = n),
82
+ e[0] || (e[0] = (n) => N(t) ? t.value = n : t = n),
83
83
  k
84
84
  ],
85
- placeholder: v(u) ? " " : v(c),
86
- onInput: h,
85
+ placeholder: T(u) ? "" : r.placeholder,
86
+ onInput: g,
87
87
  onFocus: B,
88
88
  onBlur: S,
89
89
  class: "w-100 p-medium t-regular uppercase pd-small"
90
90
  }, null, 8, ["field", "placeholder"]),
91
- p.action ? (b(), x("button", {
91
+ r.action ? (y(), b("button", {
92
92
  key: 0,
93
93
  onClick: w,
94
94
  class: "t-nowrap t-medium radius-big uppercase cursor-pointer flex flex-v-center pd-r-small pd-l-small w-max hover-bg-fifth t-semi transition-linear transition-timing-1 t-black bg-main"
95
95
  }, [
96
- N("span", null, V(p.action), 1),
97
- T(H, { class: "mn-l-thin radius-extra bg-white i-medium" })
96
+ V("span", null, _(r.action), 1),
97
+ x(H, { class: "mn-l-thin radius-extra bg-white i-medium" })
98
98
  ])) : E("", !0)
99
99
  ]));
100
100
  }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const d={class:"flex-nowrap flex-v-center flex pos-relative"},m=["onClick"],b={__name:"Tab",props:{tabs:Array,selected:String,callback:Function},emits:["update:selected"],setup(s,{emit:o}){const i=o,t=s,c=e.ref(0);if(t.selected){const l=t.tabs.findIndex(a=>a.value===t.selected);l!==-1&&(c.value=l)}function u(l,a){c.value=l,i("update:selected",a.value),t.callback&&t.callback()}return(l,a)=>(e.openBlock(),e.createElementBlock("div",d,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.tabs,(r,n)=>(e.openBlock(),e.createElementBlock("div",{key:n,onClick:p=>u(n,r),class:e.normalizeClass([{"t-transp":n!==c.value,"br-solid br-b-3px br-main":n===c.value},"z-index-1 t-center pd-small w-max"])},[e.createElementVNode("label",null,e.toDisplayString(r.name),1)],10,m))),128))]))}};exports.default=b;
@@ -0,0 +1,36 @@
1
+ import { ref as m, openBlock as s, createElementBlock as n, Fragment as p, renderList as b, normalizeClass as f, createElementVNode as v, toDisplayString as k } from "vue";
2
+ /* empty css */
3
+ const _ = { class: "flex-nowrap flex-v-center flex pos-relative" }, x = ["onClick"], C = {
4
+ __name: "Tab",
5
+ props: {
6
+ tabs: Array,
7
+ selected: String,
8
+ callback: Function
9
+ },
10
+ emits: ["update:selected"],
11
+ setup(r, { emit: i }) {
12
+ const d = i, e = r, l = m(0);
13
+ if (e.selected) {
14
+ const t = e.tabs.findIndex((a) => a.value === e.selected);
15
+ t !== -1 && (l.value = t);
16
+ }
17
+ function u(t, a) {
18
+ l.value = t, d("update:selected", a.value), e.callback && e.callback();
19
+ }
20
+ return (t, a) => (s(), n("div", _, [
21
+ (s(!0), n(p, null, b(r.tabs, (o, c) => (s(), n("div", {
22
+ key: c,
23
+ onClick: (g) => u(c, o),
24
+ class: f([{
25
+ "t-transp": c !== l.value,
26
+ "br-solid br-b-3px br-main": c === l.value
27
+ }, "z-index-1 t-center pd-small w-max"])
28
+ }, [
29
+ v("label", null, k(o.name), 1)
30
+ ], 10, x))), 128))
31
+ ]));
32
+ }
33
+ };
34
+ export {
35
+ C as default
36
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css */;/* empty css */;/* empty css */require("vue-i18n");;/* empty css */const r=require("vue-router");require("../../store/auth.cjs");require("../../../middlewares/client/inputs.validation.cjs");const n={class:"cols-2-1_2 gap-small pd-small bg-white"},u=e.createElementVNode("section",{class:"w-100 desktop-only o-hidden radius-big bg-grad-main"},null,-1),s={__name:"Auth",setup(a){return e.ref(null),e.ref(null),e.ref(null),r.useRoute(),r.useRouter(),e.ref("email"),(o,c)=>{const t=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",n,[e.createVNode(t,{class:"pd-medium br-solid br-1px br-grey-transp-25 radius-big w-m-66r t-center"},{default:e.withCtx(({Component:l,route:i})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l),{ref:"page",key:i.path,localPosition:o.localPosition},null,8,["localPosition"]))]),_:2},1024)]),_:1}),u])}}};exports.default=s;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css */;/* empty css */;/* empty css */require("vue-i18n");;/* empty css */const r=require("vue-router");require("../../store/auth.cjs");require("../../../middlewares/client/inputs.validation.cjs");const n={class:"cols-2-1_2 gap-small pd-small bg-white"},u=e.createElementVNode("section",{class:"w-100 desktop-only o-hidden radius-big bg-grad-main"},null,-1),s={__name:"Auth",setup(a){return e.ref(null),e.ref(null),e.ref(null),r.useRoute(),r.useRouter(),e.ref("email"),(o,c)=>{const t=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",n,[e.createVNode(t,{class:"pd-medium br-solid br-1px br-grey-transp-25 radius-big w-m-66r t-center"},{default:e.withCtx(({Component:l,route:i})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l),{ref:"page",key:i.path,localPosition:o.localPosition},null,8,["localPosition"]))]),_:2},1024)]),_:1}),u])}}};exports.default=s;
@@ -1,8 +1,8 @@
1
1
  import { ref as e, resolveComponent as a, openBlock as o, createElementBlock as m, createVNode as t, withCtx as r, Transition as c, createBlock as p, resolveDynamicComponent as u, createElementVNode as d } from "vue";
2
- /* empty css */
3
- /* empty css */
4
- /* empty css */
2
+ /* empty css */
3
+ /* empty css */
5
4
  /* empty css */
5
+ /* empty css */
6
6
  import "vue-i18n";
7
7
  /* empty css */
8
8
  import { useRoute as _, useRouter as f } from "vue-router";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue");;/* empty css */const f=require("vue-router"),w=require("vue-i18n"),E=require("../../store/auth.cjs"),p=require("../../store/twofa.cjs"),c=require("../../../globals/store/globals.cjs"),S=require("../../localization/EnterCode.json.cjs"),q={class:"t-center pd-medium"},D={class:"mn-b-medium"},I={class:"mn-b-big t-transp"},k={class:"w-100 mn-b-big flex-nowrap flex"},C={key:1},N={__name:"EnterCode",setup(V){const g=f.useRoute(),v=f.useRouter(),{t:d}=w.useI18n({useScope:"global",...S.default}),o=n.reactive({digits:["","","",""],error:null});n.watch(()=>o.digits[0],s=>{if(s&&String(s).length>1){let e=String(s).split("");console.log(e);let t=[...o.digits];e.forEach((l,r)=>{console.log(r),console.log(t[r]),console.log(l),t[r]=l}),o.digits=t,u(3)}});const m=n.ref(null),i=n.ref(0);async function y(){try{await p.sendCode(E.state.user,g.query.method,g.query.type),i.value=30;const s=setInterval(()=>{i.value>0?i.value-=1:clearInterval(s)},1e3)}catch{c.setError({response:{data:{errorCode:"CODE_NOT_SENT"}}})}}const a=(s,e)=>{if(s.key==="Backspace"&&(o.digits[e]===null||o.digits[e]===void 0||o.digits[e]==="")){s.preventDefault();const t=document.querySelectorAll("input"),l=e>0?t[e-1]:null;l&&(l.focus(),l.setSelectionRange(l.value.length,l.value.length))}},u=s=>{const e=document.querySelectorAll("input"),t=e[s+1],l=s>0?e[s-1]:null;if(o.digits[s]!==""&&o.digits[s]!==null&&o.digits[s]!==void 0&&s<4&&(s<3?t.focus():m.value.focus()),(o.digits[s]===null||o.digits[s]===void 0||o.digits[s]==="")&&s>0&&l.focus(),o.digits.every(r=>r!=="")){const r=o.digits.join(""),b=p.state.code.code.toString();r===b?(p.state.code.isValid=!0,v.push({path:"/auth/enter-password",query:{type:p.state.code.type,method:g.query.method}})):(c.setError({response:{data:{errorCode:"WRONG_CODE"}}}),m.value.focus(),o.digits=["","","",""])}};return(s,e)=>(n.openBlock(),n.createElementBlock("section",q,[n.createElementVNode("h3",D,n.toDisplayString(n.unref(d)("verifyNumberTitle")),1),n.createElementVNode("p",I,n.toDisplayString(n.unref(d)("instructions")),1),n.createElementVNode("div",k,[n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[0]||(e[0]=t=>o.digits[0]=t),ref_key:"firstInput",ref:m,maxlength:"1",onInput:e[1]||(e[1]=t=>u(0)),onPaste:e[2]||(e[2]=t=>s.onPaste(t,0)),onKeydown:e[3]||(e[3]=t=>a(t,0)),class:"w-100 h1 pd-small t-center bg-light radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[0]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[4]||(e[4]=t=>o.digits[1]=t),maxlength:"1",onInput:e[5]||(e[5]=t=>u(1)),onPaste:e[6]||(e[6]=t=>s.onPaste(t,1)),onKeydown:e[7]||(e[7]=t=>a(t,1)),class:"w-100 h1 pd-small t-center bg-light radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[1]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[8]||(e[8]=t=>o.digits[2]=t),maxlength:"1",onInput:e[9]||(e[9]=t=>u(2)),onPaste:e[10]||(e[10]=t=>s.onPaste(t,2)),onKeydown:e[11]||(e[11]=t=>a(t,2)),class:"w-100 h1 pd-small t-center bg-light radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[2]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[12]||(e[12]=t=>o.digits[3]=t),maxlength:"1",onInput:e[13]||(e[13]=t=>u(3)),onPaste:e[14]||(e[14]=t=>s.onPaste(t,3)),onKeydown:e[15]||(e[15]=t=>a(t,3)),class:"w-100 h1 pd-small t-center bg-light radius-small"},null,544),[[n.vModelText,o.digits[3]]])]),i.value<1?(n.openBlock(),n.createElementBlock("a",{key:0,onClick:y,class:"t-blue"},n.toDisplayString(n.unref(d)("resendCode")),1)):(n.openBlock(),n.createElementBlock("span",C,n.toDisplayString(i.value)+" "+n.toDisplayString(n.unref(d)("secondsResend")),1))]))}};exports.default=N;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue");;/* empty css */const f=require("vue-router"),w=require("vue-i18n"),E=require("../../store/auth.cjs"),p=require("../../store/twofa.cjs"),c=require("../../../globals/store/globals.cjs"),S=require("../../localization/EnterCode.json.cjs"),q={class:"t-center pd-medium"},D={class:"mn-b-medium"},I={class:"mn-b-big t-transp"},k={class:"w-100 mn-b-big flex-nowrap flex"},C={key:1},N={__name:"EnterCode",setup(V){const g=f.useRoute(),v=f.useRouter(),{t:d}=w.useI18n({useScope:"global",...S.default}),o=n.reactive({digits:["","","",""],error:null});n.watch(()=>o.digits[0],s=>{if(s&&String(s).length>1){let e=String(s).split("");console.log(e);let t=[...o.digits];e.forEach((l,r)=>{console.log(r),console.log(t[r]),console.log(l),t[r]=l}),o.digits=t,u(3)}});const m=n.ref(null),i=n.ref(0);async function y(){try{await p.sendCode(E.state.user,g.query.method,g.query.type),i.value=30;const s=setInterval(()=>{i.value>0?i.value-=1:clearInterval(s)},1e3)}catch{c.setError({response:{data:{errorCode:"CODE_NOT_SENT"}}})}}const a=(s,e)=>{if(s.key==="Backspace"&&(o.digits[e]===null||o.digits[e]===void 0||o.digits[e]==="")){s.preventDefault();const t=document.querySelectorAll("input"),l=e>0?t[e-1]:null;l&&(l.focus(),l.setSelectionRange(l.value.length,l.value.length))}},u=s=>{const e=document.querySelectorAll("input"),t=e[s+1],l=s>0?e[s-1]:null;if(o.digits[s]!==""&&o.digits[s]!==null&&o.digits[s]!==void 0&&s<4&&(s<3?t.focus():m.value.focus()),(o.digits[s]===null||o.digits[s]===void 0||o.digits[s]==="")&&s>0&&l.focus(),o.digits.every(r=>r!=="")){const r=o.digits.join(""),b=p.state.code.code.toString();r===b?(p.state.code.isValid=!0,v.push({path:"/auth/enter-password",query:{type:p.state.code.type,method:g.query.method}})):(c.setError({response:{data:{errorCode:"WRONG_CODE"}}}),m.value.focus(),o.digits=["","","",""])}};return(s,e)=>(n.openBlock(),n.createElementBlock("section",q,[n.createElementVNode("h3",D,n.toDisplayString(n.unref(d)("verifyNumberTitle")),1),n.createElementVNode("p",I,n.toDisplayString(n.unref(d)("instructions")),1),n.createElementVNode("div",k,[n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[0]||(e[0]=t=>o.digits[0]=t),ref_key:"firstInput",ref:m,maxlength:"1",onInput:e[1]||(e[1]=t=>u(0)),onPaste:e[2]||(e[2]=t=>s.onPaste(t,0)),onKeydown:e[3]||(e[3]=t=>a(t,0)),class:"w-100 h1 pd-small t-center bg-light radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[0]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[4]||(e[4]=t=>o.digits[1]=t),maxlength:"1",onInput:e[5]||(e[5]=t=>u(1)),onPaste:e[6]||(e[6]=t=>s.onPaste(t,1)),onKeydown:e[7]||(e[7]=t=>a(t,1)),class:"w-100 h1 pd-small t-center bg-light radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[1]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[8]||(e[8]=t=>o.digits[2]=t),maxlength:"1",onInput:e[9]||(e[9]=t=>u(2)),onPaste:e[10]||(e[10]=t=>s.onPaste(t,2)),onKeydown:e[11]||(e[11]=t=>a(t,2)),class:"w-100 h1 pd-small t-center bg-light radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[2]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[12]||(e[12]=t=>o.digits[3]=t),maxlength:"1",onInput:e[13]||(e[13]=t=>u(3)),onPaste:e[14]||(e[14]=t=>s.onPaste(t,3)),onKeydown:e[15]||(e[15]=t=>a(t,3)),class:"w-100 h1 pd-small t-center bg-light radius-small"},null,544),[[n.vModelText,o.digits[3]]])]),i.value<1?(n.openBlock(),n.createElementBlock("a",{key:0,onClick:y,class:"t-blue"},n.toDisplayString(n.unref(d)("resendCode")),1)):(n.openBlock(),n.createElementBlock("span",C,n.toDisplayString(i.value)+" "+n.toDisplayString(n.unref(d)("secondsResend")),1))]))}};exports.default=N;
@@ -1,5 +1,5 @@
1
1
  import { reactive as P, watch as D, ref as c, openBlock as b, createElementBlock as w, createElementVNode as r, toDisplayString as d, unref as m, withDirectives as g, vModelText as f } from "vue";
2
- /* empty css */
2
+ /* empty css */
3
3
  import { useRoute as q, useRouter as $ } from "vue-router";
4
4
  import { useI18n as K } from "vue-i18n";
5
5
  import { state as N } from "../../store/auth.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const l=require("../../../../components/Field/Field.vue2.cjs"),f=require("../../../../components/Button/Button.vue2.cjs"),i=require("vue-router"),h=require("vue-i18n"),t=require("../../store/auth.cjs"),d=require("../../../middlewares/client/inputs.validation.cjs"),w=require("../../localization/EnterPassword.json.cjs");;/* empty css */const _={class:"t-left pd-medium"},y={class:"mn-b-small"},g={key:0,class:"mn-b-semi t-transp"},b={key:1,class:"mn-b-semi t-transp"},k={class:"mn-b-semi radius-small o-hidden"},q={key:2,class:"p-medium t-semi mn-b-semi"},B=e.createElementVNode("a",{class:"t-second",href:"/legal/eula",target:"_blank",rel:"noopener noreferrer"},"End User License Agreement (EULA)",-1),E={key:0},P={key:1},v={__name:"EnterPassword",setup(S){const n=e.ref(null),{t:s}=h.useI18n({useScope:"global",...w.default}),r=i.useRoute(),u=i.useRouter();e.ref("phone");async function c(){try{await d.validateInputs(n,d.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}r.query.method==="reset-password"&&await t.actions.updatePassword(t.state.user,r.query.type),r.query.method!=="reset-password"&&await t.actions.signup(t.state.user,r.query.type)}function p(){u.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(m,o)=>(e.openBlock(),e.createElementBlock("section",_,[e.createElementVNode("h3",y,e.toDisplayString(e.unref(s)("almostDone")),1),e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("p",g,e.toDisplayString(e.unref(s)("newPasswordPrompt")),1)):(e.openBlock(),e.createElementBlock("p",b,e.toDisplayString(e.unref(s)("registrationPasswordPrompt")),1)),e.createElementVNode("div",k,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":o[0]||(o[0]=a=>t.state.user.password=a),type:"password",validation:n.value,placeholder:e.unref(s)("passwordPlaceholder"),class:"bg-light pd-small radius-small mn-b-thin"},null,8,["field","validation","placeholder"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":o[1]||(o[1]=a=>t.state.user.passwordRepeat=a),type:"password",placeholder:e.unref(s)("repeatPasswordPlaceholder"),class:"bg-light pd-small radius-small mn-b-thin"},null,8,["field","placeholder"])]),e.unref(r).query.method!=="reset-password"?(e.openBlock(),e.createElementBlock("div",q,[e.createTextVNode(" By registering, you agree to our "),B])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:c,callback:p,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",E,e.toDisplayString(e.unref(s)("changePasswordBtn")),1)):(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(e.unref(s)("registerBtn")),1))]),_:1})]))}};exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const l=require("../../../../components/Field/Field.vue.cjs"),f=require("../../../../components/Button/Button.vue.cjs"),i=require("vue-router"),h=require("vue-i18n"),t=require("../../store/auth.cjs"),d=require("../../../middlewares/client/inputs.validation.cjs"),w=require("../../localization/EnterPassword.json.cjs");;/* empty css */const _={class:"t-left pd-medium"},y={class:"mn-b-small"},g={key:0,class:"mn-b-semi t-transp"},b={key:1,class:"mn-b-semi t-transp"},k={class:"mn-b-semi radius-small o-hidden"},q={key:2,class:"p-medium t-semi mn-b-semi"},B=e.createElementVNode("a",{class:"t-second",href:"/legal/eula",target:"_blank",rel:"noopener noreferrer"},"End User License Agreement (EULA)",-1),E={key:0},P={key:1},v={__name:"EnterPassword",setup(S){const n=e.ref(null),{t:s}=h.useI18n({useScope:"global",...w.default}),r=i.useRoute(),u=i.useRouter();e.ref("phone");async function c(){try{await d.validateInputs(n,d.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}r.query.method==="reset-password"&&await t.actions.updatePassword(t.state.user,r.query.type),r.query.method!=="reset-password"&&await t.actions.signup(t.state.user,r.query.type)}function p(){u.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(m,o)=>(e.openBlock(),e.createElementBlock("section",_,[e.createElementVNode("h3",y,e.toDisplayString(e.unref(s)("almostDone")),1),e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("p",g,e.toDisplayString(e.unref(s)("newPasswordPrompt")),1)):(e.openBlock(),e.createElementBlock("p",b,e.toDisplayString(e.unref(s)("registrationPasswordPrompt")),1)),e.createElementVNode("div",k,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":o[0]||(o[0]=a=>t.state.user.password=a),type:"password",validation:n.value,placeholder:e.unref(s)("passwordPlaceholder"),class:"bg-light pd-small radius-small mn-b-thin"},null,8,["field","validation","placeholder"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":o[1]||(o[1]=a=>t.state.user.passwordRepeat=a),type:"password",placeholder:e.unref(s)("repeatPasswordPlaceholder"),class:"bg-light pd-small radius-small mn-b-thin"},null,8,["field","placeholder"])]),e.unref(r).query.method!=="reset-password"?(e.openBlock(),e.createElementBlock("div",q,[e.createTextVNode(" By registering, you agree to our "),B])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:c,callback:p,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",E,e.toDisplayString(e.unref(s)("changePasswordBtn")),1)):(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(e.unref(s)("registerBtn")),1))]),_:1})]))}};exports.default=v;
@@ -1,7 +1,7 @@
1
1
  import { ref as u, openBlock as o, createElementBlock as a, createElementVNode as m, toDisplayString as i, unref as e, createVNode as l, createTextVNode as g, createCommentVNode as b, withCtx as P } from "vue";
2
- /* empty css */
3
- import c from "../../../../components/Field/Field.vue2.js";
4
- import k from "../../../../components/Button/Button.vue2.js";
2
+ /* empty css */
3
+ import c from "../../../../components/Field/Field.vue.js";
4
+ import k from "../../../../components/Button/Button.vue.js";
5
5
  import { useRoute as q, useRouter as v } from "vue-router";
6
6
  import { useI18n as E } from "vue-i18n";
7
7
  import { state as s, actions as h } from "../../store/auth.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const n=require("../../../../components/Field/Field.vue2.cjs"),m=require("../../../../components/Button/Button.vue2.cjs"),l=require("vue-router"),t=require("../../store/auth.cjs"),_=require("../../../organizations/store/invites.cjs"),d=require("../../../middlewares/client/inputs.validation.cjs");;/* empty css */const f={class:"t-left pd-medium"},h=e.createElementVNode("h3",{class:"mn-b-small"},"You have been invited to the organization",-1),w=e.createElementVNode("p",{class:"mn-b-semi t-transp"},"Please provide a password to complete the registration.",-1),v={class:"mn-b-semi radius-small o-hidden"},b=e.createElementVNode("span",null,"Join",-1),q={__name:"Invite",setup(g){const i=e.ref(null),a=l.useRoute(),u=l.useRouter();e.onMounted(async()=>{await _.actions.readOne(a.query.inviteCode)});async function c(){try{await d.validateInputs(i,d.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}try{await t.actions.signup(t.state.user,a.query.type,a.query.inviteCode)}catch(r){console.log(r)}}function p(){u.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(r,s)=>(e.openBlock(),e.createElementBlock("section",f,[h,w,e.createElementVNode("div",v,[e.createVNode(n.default,{field:t.state.user.password,"onUpdate:field":s[0]||(s[0]=o=>t.state.user.password=o),type:"password",validation:i.value,label:"Password",placeholder:"******",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field","validation"]),e.createVNode(n.default,{field:t.state.user.passwordRepeat,"onUpdate:field":s[1]||(s[1]=o=>t.state.user.passwordRepeat=o),type:"password",label:"Repeat Password",placeholder:"******",class:"bg-light pd-medium radius-small"},null,8,["field"])]),e.createVNode(m.default,{submit:c,callback:p,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[b]),_:1})]))}};exports.default=q;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const n=require("../../../../components/Field/Field.vue.cjs"),m=require("../../../../components/Button/Button.vue.cjs"),l=require("vue-router"),t=require("../../store/auth.cjs"),_=require("../../../organizations/store/invites.cjs"),d=require("../../../middlewares/client/inputs.validation.cjs");;/* empty css */const f={class:"t-left pd-medium"},h=e.createElementVNode("h3",{class:"mn-b-small"},"You have been invited to the organization",-1),w=e.createElementVNode("p",{class:"mn-b-semi t-transp"},"Please provide a password to complete the registration.",-1),v={class:"mn-b-semi radius-small o-hidden"},b=e.createElementVNode("span",null,"Join",-1),q={__name:"Invite",setup(g){const i=e.ref(null),a=l.useRoute(),u=l.useRouter();e.onMounted(async()=>{await _.actions.readOne(a.query.inviteCode)});async function c(){try{await d.validateInputs(i,d.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}try{await t.actions.signup(t.state.user,a.query.type,a.query.inviteCode)}catch(r){console.log(r)}}function p(){u.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(r,s)=>(e.openBlock(),e.createElementBlock("section",f,[h,w,e.createElementVNode("div",v,[e.createVNode(n.default,{field:t.state.user.password,"onUpdate:field":s[0]||(s[0]=o=>t.state.user.password=o),type:"password",validation:i.value,label:"Password",placeholder:"******",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field","validation"]),e.createVNode(n.default,{field:t.state.user.passwordRepeat,"onUpdate:field":s[1]||(s[1]=o=>t.state.user.passwordRepeat=o),type:"password",label:"Repeat Password",placeholder:"******",class:"bg-light pd-medium radius-small"},null,8,["field"])]),e.createVNode(m.default,{submit:c,callback:p,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[b]),_:1})]))}};exports.default=q;
@@ -1,7 +1,7 @@
1
1
  import { ref as u, onMounted as c, openBlock as f, createElementBlock as _, createElementVNode as s, createVNode as i, withCtx as w } from "vue";
2
- /* empty css */
3
- import l from "../../../../components/Field/Field.vue2.js";
4
- import h from "../../../../components/Button/Button.vue2.js";
2
+ /* empty css */
3
+ import l from "../../../../components/Field/Field.vue.js";
4
+ import h from "../../../../components/Button/Button.vue.js";
5
5
  import { useRoute as b, useRouter as v } from "vue-router";
6
6
  import { state as e, actions as y } from "../../store/auth.js";
7
7
  import { actions as g } from "../../../organizations/store/invites.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),v=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),_=require("../../../../components/Button/Button.vue2.cjs"),u=require("vue-router"),b=require("vue-i18n"),g=require("../../localization/ResetPassword.json.cjs"),s=require("../../store/auth.cjs");require("../../store/twofa.cjs");const n=require("../../../middlewares/client/inputs.validation.cjs");;/* empty css */const w={class:"t-left pd-medium"},V={class:"mn-b-small"},N={class:"mn-b-small t-transp"},q={class:"mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden"},y={class:"pos-relative"},E={key:0,class:"mn-b-semi radius-small o-hidden"},C={class:"mn-b-small t-transp"},S={key:0,class:"mn-b-semi radius-small o-hidden"},k={class:"mn-b-small t-transp"},P={__name:"ResetPassword",setup(I){const{t}=b.useI18n({useScope:"global",...g.default}),i=e.ref(null),d=e.ref(null);u.useRoute();const c=u.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await n.validateInputs(i,n.validatePhone,s.state.user.phone,"Некорректный телефон"),a.value==="email"&&await n.validateInputs(d,n.validateEmail,s.state.user.email,"Некорректный email")}catch{throw new Error}try{await s.actions.resetPassword(s.state.user,a.value,"reset-password")}catch(r){throw console.log(r),new Error}}function p(){c.push({name:"Enter Code",query:{type:a.value,method:"reset-password"}})}return(r,o)=>(e.openBlock(),e.createElementBlock("section",w,[e.createElementVNode("h3",V,e.toDisplayString(e.unref(t)("forgotPasswordTitle")),1),e.createElementVNode("p",N,e.toDisplayString(e.unref(t)("instructions")),1),e.createElementVNode("div",q,[e.createVNode(h.default,{selected:a.value,"onUpdate:selected":o[0]||(o[0]=l=>a.value=l),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",y,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="phone"?(e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("p",C,e.toDisplayString(e.unref(t)("smsInfo")),1),e.createVNode(v.default,{onChange:o[1]||(o[1]=l=>s.state.user.phone=l),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:i.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-light pd-small radius-small mn-b-thin"},null,8,["validation","inputOptions"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="email"?(e.openBlock(),e.createElementBlock("div",S,[e.createElementVNode("p",k,e.toDisplayString(e.unref(t)("emailInfo")),1),e.createVNode(f.default,{field:s.state.user.email,"onUpdate:field":o[2]||(o[2]=l=>s.state.user.email=l),placeholder:e.unref(t)("emailPlaceholder"),validation:d.value,class:"bg-light pd-medium radius-small"},null,8,["field","placeholder","validation"])])):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(_.default,{submit:m,callback:p,class:"mn-b-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1})]))}};exports.default=P;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Tab/Tab.vue.cjs"),f=require("../../../../components/Field/Field.vue.cjs"),v=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),_=require("../../../../components/Button/Button.vue.cjs"),u=require("vue-router"),b=require("vue-i18n"),g=require("../../localization/ResetPassword.json.cjs"),s=require("../../store/auth.cjs");require("../../store/twofa.cjs");const n=require("../../../middlewares/client/inputs.validation.cjs");;/* empty css */const w={class:"t-left pd-medium"},V={class:"mn-b-small"},N={class:"mn-b-small t-transp"},q={class:"mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden"},y={class:"pos-relative"},E={key:0,class:"mn-b-semi radius-small o-hidden"},C={class:"mn-b-small t-transp"},S={key:0,class:"mn-b-semi radius-small o-hidden"},k={class:"mn-b-small t-transp"},P={__name:"ResetPassword",setup(I){const{t}=b.useI18n({useScope:"global",...g.default}),i=e.ref(null),d=e.ref(null);u.useRoute();const c=u.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await n.validateInputs(i,n.validatePhone,s.state.user.phone,"Некорректный телефон"),a.value==="email"&&await n.validateInputs(d,n.validateEmail,s.state.user.email,"Некорректный email")}catch{throw new Error}try{await s.actions.resetPassword(s.state.user,a.value,"reset-password")}catch(r){throw console.log(r),new Error}}function p(){c.push({name:"Enter Code",query:{type:a.value,method:"reset-password"}})}return(r,o)=>(e.openBlock(),e.createElementBlock("section",w,[e.createElementVNode("h3",V,e.toDisplayString(e.unref(t)("forgotPasswordTitle")),1),e.createElementVNode("p",N,e.toDisplayString(e.unref(t)("instructions")),1),e.createElementVNode("div",q,[e.createVNode(h.default,{selected:a.value,"onUpdate:selected":o[0]||(o[0]=l=>a.value=l),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",y,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="phone"?(e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("p",C,e.toDisplayString(e.unref(t)("smsInfo")),1),e.createVNode(v.default,{onChange:o[1]||(o[1]=l=>s.state.user.phone=l),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:i.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-light pd-small radius-small mn-b-thin"},null,8,["validation","inputOptions"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="email"?(e.openBlock(),e.createElementBlock("div",S,[e.createElementVNode("p",k,e.toDisplayString(e.unref(t)("emailInfo")),1),e.createVNode(f.default,{field:s.state.user.email,"onUpdate:field":o[2]||(o[2]=l=>s.state.user.email=l),placeholder:e.unref(t)("emailPlaceholder"),validation:d.value,class:"bg-light pd-medium radius-small"},null,8,["field","placeholder","validation"])])):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(_.default,{submit:m,callback:p,class:"mn-b-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1})]))}};exports.default=P;
@@ -1,8 +1,8 @@
1
1
  import { ref as d, openBlock as u, createElementBlock as p, createElementVNode as a, toDisplayString as r, unref as t, createVNode as l, Transition as _, withCtx as c, createCommentVNode as v, createTextVNode as C } from "vue";
2
- import E from "../../../../components/Tab/Tab.vue2.js";
3
- import I from "../../../../components/Field/Field.vue2.js";
2
+ import E from "../../../../components/Tab/Tab.vue.js";
3
+ import I from "../../../../components/Field/Field.vue.js";
4
4
  import P from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import V from "../../../../components/Button/Button.vue2.js";
5
+ import V from "../../../../components/Button/Button.vue.js";
6
6
  import { useRoute as k, useRouter as x } from "vue-router";
7
7
  import { useI18n as N } from "vue-i18n";
8
8
  import S from "../../localization/ResetPassword.json.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("../../../../components/Tab/Tab.vue2.cjs"),m=require("../../../../components/Field/Field.vue2.cjs"),w=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),V=require("../../../../components/Button/Button.vue2.cjs"),h=require("vue-router"),N=require("vue-i18n"),y=require("../../localization/SignIn.json.cjs"),s=require("../../store/auth.cjs"),r=require("../../../middlewares/client/inputs.validation.cjs");;/* empty css */const S={class:""},q=e.createElementVNode("img",{src:"/logo/logo.svg",class:"i-extra radius-small mn-b-small"},null,-1),E={class:"mn-b-medium"},x=e.createElementVNode("br",null,null,-1),C={class:"t-semi"},D={class:"mn-b-big"},P={class:"mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden"},T={class:"pos-relative"},I={class:"mn-b-thin radius-small"},U={class:"mn-b-thin radius-small o-hidden"},k={class:"w-100 mn-b-big"},O={__name:"SignIn",setup(j){const d=e.ref(null),f=e.ref(null),u=e.ref(null),c=h.useRoute(),p=h.useRouter(),{t:l}=N.useI18n({useScope:"global",...y.default}),n=e.ref("phone"),v=o=>new Promise((a,i)=>{const t=document.createElement("script");t.type="text/javascript",t.src=o,t.onload=a,t.onerror=i,document.head.appendChild(t)});e.onMounted(async()=>{await v("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js")});async function _(){try{n.value==="phone"&&await r.validateInputs(d,r.validatePhone,s.state.user.phone,"Некорректный телефон"),n.value==="email"&&await r.validateInputs(u,r.validateEmail,s.state.user.email,"Некорректный email")}catch{throw new Error}const o={...s.state.user};await s.actions.login(o,n.value)}function g(){c.query.returnUrl?p.push({path:c.query.returnUrl,query:{afterAuth:"true"}}):p.push({name:"User Profile",params:{_id:s.state.user._id},query:{afterAuth:"true"}})}return(o,a)=>{const i=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",S,[q,e.createElementVNode("h3",E,[e.createTextVNode(e.toDisplayString(e.unref(l)("title"))+" ",1),x,e.createElementVNode("span",C,e.toDisplayString(e.unref(l)("subtitle")),1)]),e.createElementVNode("p",D,[e.createVNode(i,{to:{name:"Sign Up"},class:"underline t-second"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signup")),1)]),_:1})]),e.createElementVNode("div",P,[e.createVNode(b.default,{selected:n.value,"onUpdate:selected":a[0]||(a[0]=t=>n.value=t),tabs:[{name:e.unref(l)("phone"),value:"phone"},{name:e.unref(l)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",T,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",I,[e.createVNode(w.default,{onChange:a[1]||(a[1]=t=>s.state.user.phone=t),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validCharactersOnly:!0,validation:d.value,mode:"national",inputOptions:{placeholder:e.unref(l)("phonePlaceholder"),type:"tel"},class:"bg-light pd-small radius-small mn-b-thin"},null,8,["validation","inputOptions"])],512),[[e.vShow,n.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",U,[e.createVNode(m.default,{field:s.state.user.email,"onUpdate:field":a[2]||(a[2]=t=>s.state.user.email=t),placeholder:e.unref(l)("emailPlaceholder"),validation:u.value,class:"bg-light pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,n.value==="email"]])]),_:1})]),e.createVNode(m.default,{field:s.state.user.password,"onUpdate:field":a[3]||(a[3]=t=>s.state.user.password=t),type:"password",validation:f.value,placeholder:e.unref(l)("passwordPlaceholder"),class:"bg-light pd-medium radius-small mn-b-semi"},null,8,["field","validation","placeholder"]),e.createElementVNode("div",k,[e.createVNode(i,{to:"/auth/reset-password",class:"underline d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("forgotPassword")),1)]),_:1})]),e.createVNode(V.default,{submit:_,callback:g,class:"w-100 bg-main mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signin")),1)]),_:1})])}}};exports.default=O;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("../../../../components/Tab/Tab.vue.cjs"),m=require("../../../../components/Field/Field.vue.cjs"),w=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),V=require("../../../../components/Button/Button.vue.cjs"),h=require("vue-router"),N=require("vue-i18n"),y=require("../../localization/SignIn.json.cjs"),s=require("../../store/auth.cjs"),r=require("../../../middlewares/client/inputs.validation.cjs");;/* empty css */const S={class:""},q=e.createElementVNode("img",{src:"/logo/logo.svg",class:"i-extra radius-small mn-b-small"},null,-1),E={class:"mn-b-medium"},x=e.createElementVNode("br",null,null,-1),C={class:"t-semi"},D={class:"mn-b-big"},P={class:"mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden"},T={class:"pos-relative"},I={class:"mn-b-thin radius-small"},U={class:"mn-b-thin radius-small o-hidden"},k={class:"w-100 mn-b-big"},O={__name:"SignIn",setup(j){const d=e.ref(null),f=e.ref(null),u=e.ref(null),c=h.useRoute(),p=h.useRouter(),{t:l}=N.useI18n({useScope:"global",...y.default}),n=e.ref("phone"),v=o=>new Promise((a,i)=>{const t=document.createElement("script");t.type="text/javascript",t.src=o,t.onload=a,t.onerror=i,document.head.appendChild(t)});e.onMounted(async()=>{await v("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js")});async function _(){try{n.value==="phone"&&await r.validateInputs(d,r.validatePhone,s.state.user.phone,"Некорректный телефон"),n.value==="email"&&await r.validateInputs(u,r.validateEmail,s.state.user.email,"Некорректный email")}catch{throw new Error}const o={...s.state.user};await s.actions.login(o,n.value)}function g(){c.query.returnUrl?p.push({path:c.query.returnUrl,query:{afterAuth:"true"}}):p.push({name:"User Profile",params:{_id:s.state.user._id},query:{afterAuth:"true"}})}return(o,a)=>{const i=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",S,[q,e.createElementVNode("h3",E,[e.createTextVNode(e.toDisplayString(e.unref(l)("title"))+" ",1),x,e.createElementVNode("span",C,e.toDisplayString(e.unref(l)("subtitle")),1)]),e.createElementVNode("p",D,[e.createVNode(i,{to:{name:"Sign Up"},class:"underline t-second"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signup")),1)]),_:1})]),e.createElementVNode("div",P,[e.createVNode(b.default,{selected:n.value,"onUpdate:selected":a[0]||(a[0]=t=>n.value=t),tabs:[{name:e.unref(l)("phone"),value:"phone"},{name:e.unref(l)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",T,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",I,[e.createVNode(w.default,{onChange:a[1]||(a[1]=t=>s.state.user.phone=t),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validCharactersOnly:!0,validation:d.value,mode:"national",inputOptions:{placeholder:e.unref(l)("phonePlaceholder"),type:"tel"},class:"bg-light pd-small radius-small mn-b-thin"},null,8,["validation","inputOptions"])],512),[[e.vShow,n.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",U,[e.createVNode(m.default,{field:s.state.user.email,"onUpdate:field":a[2]||(a[2]=t=>s.state.user.email=t),placeholder:e.unref(l)("emailPlaceholder"),validation:u.value,class:"bg-light pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,n.value==="email"]])]),_:1})]),e.createVNode(m.default,{field:s.state.user.password,"onUpdate:field":a[3]||(a[3]=t=>s.state.user.password=t),type:"password",validation:f.value,placeholder:e.unref(l)("passwordPlaceholder"),class:"bg-light pd-medium radius-small mn-b-semi"},null,8,["field","validation","placeholder"]),e.createElementVNode("div",k,[e.createVNode(i,{to:"/auth/reset-password",class:"underline d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("forgotPassword")),1)]),_:1})]),e.createVNode(V.default,{submit:_,callback:g,class:"w-100 bg-main mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signin")),1)]),_:1})])}}};exports.default=O;
@@ -1,8 +1,8 @@
1
1
  import { ref as p, onMounted as k, resolveComponent as E, openBlock as V, createElementBlock as I, createElementVNode as l, createTextVNode as c, toDisplayString as r, unref as s, createVNode as o, withCtx as d, Transition as b, withDirectives as g, vShow as w } from "vue";
2
- import q from "../../../../components/Tab/Tab.vue2.js";
3
- import y from "../../../../components/Field/Field.vue2.js";
2
+ import q from "../../../../components/Tab/Tab.vue.js";
3
+ import y from "../../../../components/Field/Field.vue.js";
4
4
  import D from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import O from "../../../../components/Button/Button.vue2.js";
5
+ import O from "../../../../components/Button/Button.vue.js";
6
6
  import { useRoute as $, useRouter as j } from "vue-router";
7
7
  import { useI18n as A } from "vue-i18n";
8
8
  import N from "../../localization/SignIn.json.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),_=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),b=require("../../../../components/Button/Button.vue2.cjs"),d=require("vue-router"),g=require("vue-i18n"),w=require("../../localization/SignUp.json.cjs"),l=require("../../store/auth.cjs"),N=require("../../store/twofa.cjs"),i=require("../../../middlewares/client/inputs.validation.cjs");;/* empty css */const V={class:"t-left pd-medium"},S={class:"mn-b-small"},E={class:"mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden"},q={class:"pos-relative"},C={class:"mn-b-semi radius-small"},y={class:"mn-b-small t-transp"},D={class:"mn-b-semi radius-small o-hidden"},x={class:"mn-b-small t-transp"},T={class:"w-100"},k={__name:"SignUp",setup(I){const{t}=g.useI18n({useScope:"global",...w.default}),s=e.ref(null),r=e.ref(null);d.useRoute();const c=d.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await i.validateInputs(s,i.validatePhone,l.state.user.phone,"Некорректный телефон"),a.value==="email"&&await i.validateInputs(r,i.validateEmail,l.state.user.email,"Некорректный email")}catch{throw new Error}try{await N.sendCode(l.state.user,"signup",a.value)}catch{throw new Error}}function p(){c.push({name:"Enter Code"})}return(u,n)=>{const h=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",V,[e.createElementVNode("h3",S,e.toDisplayString(e.unref(t)("title")),1),e.createElementVNode("div",E,[e.createVNode(v.default,{selected:a.value,"onUpdate:selected":n[0]||(n[0]=o=>a.value=o),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",q,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",C,[e.createElementVNode("p",y,e.toDisplayString(e.unref(t)("smsNotice")),1),e.createVNode(_.default,{onChange:n[1]||(n[1]=o=>l.state.user.phone=o),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:s.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-light pd-small radius-small mn-b-thin"},null,8,["validation","inputOptions"])],512),[[e.vShow,a.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",D,[e.createElementVNode("p",x,e.toDisplayString(e.unref(t)("emailNotice")),1),e.createVNode(f.default,{field:l.state.user.email,"onUpdate:field":n[2]||(n[2]=o=>l.state.user.email=o),placeholder:e.unref(t)("emailPlaceholder"),validation:r.value,class:"bg-light pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,a.value==="email"]])]),_:1})]),e.createVNode(b.default,{submit:m,callback:p,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1}),e.createElementVNode("div",T,[e.createVNode(h,{to:"/auth/signin",class:"underline mn-b-medium d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("haveAccount")),1)]),_:1})])])}}};exports.default=k;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Tab/Tab.vue.cjs"),f=require("../../../../components/Field/Field.vue.cjs"),_=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),b=require("../../../../components/Button/Button.vue.cjs"),d=require("vue-router"),g=require("vue-i18n"),w=require("../../localization/SignUp.json.cjs"),l=require("../../store/auth.cjs"),N=require("../../store/twofa.cjs"),i=require("../../../middlewares/client/inputs.validation.cjs");;/* empty css */const V={class:"t-left pd-medium"},S={class:"mn-b-small"},E={class:"mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden"},q={class:"pos-relative"},C={class:"mn-b-semi radius-small"},y={class:"mn-b-small t-transp"},D={class:"mn-b-semi radius-small o-hidden"},x={class:"mn-b-small t-transp"},T={class:"w-100"},k={__name:"SignUp",setup(I){const{t}=g.useI18n({useScope:"global",...w.default}),s=e.ref(null),r=e.ref(null);d.useRoute();const c=d.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await i.validateInputs(s,i.validatePhone,l.state.user.phone,"Некорректный телефон"),a.value==="email"&&await i.validateInputs(r,i.validateEmail,l.state.user.email,"Некорректный email")}catch{throw new Error}try{await N.sendCode(l.state.user,"signup",a.value)}catch{throw new Error}}function p(){c.push({name:"Enter Code"})}return(u,n)=>{const h=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",V,[e.createElementVNode("h3",S,e.toDisplayString(e.unref(t)("title")),1),e.createElementVNode("div",E,[e.createVNode(v.default,{selected:a.value,"onUpdate:selected":n[0]||(n[0]=o=>a.value=o),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",q,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",C,[e.createElementVNode("p",y,e.toDisplayString(e.unref(t)("smsNotice")),1),e.createVNode(_.default,{onChange:n[1]||(n[1]=o=>l.state.user.phone=o),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:s.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-light pd-small radius-small mn-b-thin"},null,8,["validation","inputOptions"])],512),[[e.vShow,a.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",D,[e.createElementVNode("p",x,e.toDisplayString(e.unref(t)("emailNotice")),1),e.createVNode(f.default,{field:l.state.user.email,"onUpdate:field":n[2]||(n[2]=o=>l.state.user.email=o),placeholder:e.unref(t)("emailPlaceholder"),validation:r.value,class:"bg-light pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,a.value==="email"]])]),_:1})]),e.createVNode(b.default,{submit:m,callback:p,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1}),e.createElementVNode("div",T,[e.createVNode(h,{to:"/auth/signin",class:"underline mn-b-medium d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("haveAccount")),1)]),_:1})])])}}};exports.default=k;
@@ -1,8 +1,8 @@
1
1
  import { ref as d, resolveComponent as E, openBlock as S, createElementBlock as x, createElementVNode as o, toDisplayString as r, unref as t, createVNode as l, Transition as h, withCtx as m, withDirectives as _, vShow as f, createTextVNode as v } from "vue";
2
- import N from "../../../../components/Tab/Tab.vue2.js";
3
- import V from "../../../../components/Field/Field.vue2.js";
2
+ import N from "../../../../components/Tab/Tab.vue.js";
3
+ import V from "../../../../components/Field/Field.vue.js";
4
4
  import y from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
- import D from "../../../../components/Button/Button.vue2.js";
5
+ import D from "../../../../components/Button/Button.vue.js";
6
6
  import { useRoute as I, useRouter as $ } from "vue-router";
7
7
  import { useI18n as O } from "vue-i18n";
8
8
  import P from "../../localization/SignUp.json.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../globals/components/blocks/CardHeader.vue.cjs"),d=require("./FooterBlogpost.vue.cjs"),m=require("../../../../components/Text/Text.vue.cjs");;/* empty css */const g=require("vue-router"),b={class:"pos-relative bg-light radius-big flex-column flex"},p={class:"pd-t-zero pd-b-zero pd-medium"},y={key:0,class:"cursor-pointer mn-b-thin flex-nowrap flex w-100"},f={key:0,class:"pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra"},h={key:1,class:"mn-b-small t-transp p-big"},v={key:2,class:"mn-b-small h2"},k=["src"],B={key:1,controls:"",class:"mn-b-medium object-fit-cover w-100 h-max-20r"},x=["src"],V={__name:"CardBlogpost",props:{blogpost:{type:Object},user:{type:String},type:{type:String},hideDescription:{type:Boolean,default:!1}},setup(t){const i=g.useRouter(),n=t,l=e.computed(()=>n.blogpost.content.find(o=>o.type==="ImageUpload")),s=e.computed(()=>n.blogpost.content.find(o=>o.type==="Video")),r=e.computed(()=>n.blogpost.content.find(o=>o.type==="Textarea"));return(o,a)=>{var c;return e.openBlock(),e.createElementBlock("article",b,[e.createVNode(u.default,{class:e.normalizeClass({"mn-b-small pd-medium":t.type!=="short","flex-child-order-last flex-child mn-l-small":t.type==="short"}),entity:t.blogpost,entityType:"blogpost",user:t.user,owner:t.blogpost.owner,creator:t.blogpost.creator,date:t.blogpost.createdAt,actions:t.user&&t.user===t.blogpost.creator.target._id?[{to:{name:"Edit BlogPost",params:{url:t.blogpost.url}},label:"Edit"}]:null},null,8,["class","entity","user","owner","creator","date","actions"]),e.createElementVNode("section",p,[t.type!=="blogpostPage"?(e.openBlock(),e.createElementBlock("div",y,[e.createVNode(m.default,{text:t.blogpost.name||"",maxLen:80,class:"h3 d-block",onClick:a[0]||(a[0]=E=>e.unref(i).push({name:"BlogPost",params:{url:t.blogpost.url}}))},null,8,["text"]),t.blogpost.status==="draft"?(e.openBlock(),e.createElementBlock("div",f,e.toDisplayString(t.blogpost.status),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),r.value&&r.value.content&&t.type!=="blogpostPage"&&!t.hideDescription?(e.openBlock(),e.createElementBlock("p",h,e.toDisplayString(r.value.content.slice(0,120))+"... ",1)):e.createCommentVNode("",!0),t.type==="blogpostPage"?(e.openBlock(),e.createElementBlock("h3",v,e.toDisplayString(t.blogpost.name),1)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default")]),l.value&&l.value.content&&t.type!=="blogpostPage"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(o.FILE_SERVER_URL||"")+l.value.content,alt:"Blog post image",class:"mn-b-medium object-fit-cover w-100 h-min-10r h-100"},null,8,k)):e.createCommentVNode("",!0),!((c=l.value)!=null&&c.content)&&s.value&&s.value.content&&t.type!=="blogpostPage"?(e.openBlock(),e.createElementBlock("video",B,[e.createElementVNode("source",{src:s.value.content,type:"video/mp4"},null,8,x),e.createTextVNode(" Your browser does not support the video tag. ")])):e.createCommentVNode("",!0),e.createVNode(d.default,{class:"pd-t-zero pd-medium",blogpost:t.blogpost,user:t.user},null,8,["blogpost","user"])])}}};exports.default=V;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../globals/components/blocks/CardHeader.vue.cjs"),d=require("./FooterBlogpost.vue.cjs"),m=require("../../../../components/Text/Text.vue.cjs");;/* empty css */const g=require("vue-router"),b={class:"pos-relative bg-light radius-big flex-column flex"},p={class:"pd-t-zero pd-b-zero pd-medium"},y={key:0,class:"cursor-pointer mn-b-thin flex-nowrap flex w-100"},f={key:0,class:"pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra"},h={key:1,class:"mn-b-small t-transp p-big"},v={key:2,class:"mn-b-small h2"},k=["src"],B={key:1,controls:"",class:"mn-b-medium object-fit-cover w-100 h-max-20r"},x=["src"],V={__name:"CardBlogpost",props:{blogpost:{type:Object},user:{type:String},type:{type:String},hideDescription:{type:Boolean,default:!1}},setup(t){const i=g.useRouter(),n=t,l=e.computed(()=>n.blogpost.content.find(o=>o.type==="ImageUpload")),s=e.computed(()=>n.blogpost.content.find(o=>o.type==="Video")),r=e.computed(()=>n.blogpost.content.find(o=>o.type==="Textarea"));return(o,a)=>{var c;return e.openBlock(),e.createElementBlock("article",b,[e.createVNode(u.default,{class:e.normalizeClass({"mn-b-small pd-medium":t.type!=="short","flex-child-order-last flex-child mn-l-small":t.type==="short"}),entity:t.blogpost,entityType:"blogpost",user:t.user,owner:t.blogpost.owner,creator:t.blogpost.creator,date:t.blogpost.createdAt,actions:t.user&&t.user===t.blogpost.creator.target._id?[{to:{name:"Edit BlogPost",params:{url:t.blogpost.url}},label:"Edit"}]:null},null,8,["class","entity","user","owner","creator","date","actions"]),e.createElementVNode("section",p,[t.type!=="blogpostPage"?(e.openBlock(),e.createElementBlock("div",y,[e.createVNode(m.default,{text:t.blogpost.name||"",maxLen:80,class:"h3 d-block",onClick:a[0]||(a[0]=E=>e.unref(i).push({name:"BlogPost",params:{url:t.blogpost.url}}))},null,8,["text"]),t.blogpost.status==="draft"?(e.openBlock(),e.createElementBlock("div",f,e.toDisplayString(t.blogpost.status),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),r.value&&r.value.content&&t.type!=="blogpostPage"&&!t.hideDescription?(e.openBlock(),e.createElementBlock("p",h,e.toDisplayString(r.value.content.slice(0,120))+"... ",1)):e.createCommentVNode("",!0),t.type==="blogpostPage"?(e.openBlock(),e.createElementBlock("h3",v,e.toDisplayString(t.blogpost.name),1)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default")]),l.value&&l.value.content&&t.type!=="blogpostPage"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(o.FILE_SERVER_URL||"")+l.value.content,alt:"Blog post image",class:"mn-b-medium object-fit-cover w-100 h-min-10r h-100"},null,8,k)):e.createCommentVNode("",!0),!((c=l.value)!=null&&c.content)&&s.value&&s.value.content&&t.type!=="blogpostPage"?(e.openBlock(),e.createElementBlock("video",B,[e.createElementVNode("source",{src:s.value.content,type:"video/mp4"},null,8,x),e.createTextVNode(" Your browser does not support the video tag. ")])):e.createCommentVNode("",!0),e.createVNode(d.default,{class:"pd-t-zero pd-medium",blogpost:t.blogpost,user:t.user},null,8,["blogpost","user"])])}}};exports.default=V;
@@ -2,7 +2,7 @@ import { computed as c, openBlock as o, createElementBlock as l, createVNode as
2
2
  import x from "../../../globals/components/blocks/CardHeader.vue.js";
3
3
  import k from "./FooterBlogpost.vue.js";
4
4
  import w from "../../../../components/Text/Text.vue.js";
5
- /* empty css */
5
+ /* empty css */
6
6
  import { useRouter as B } from "vue-router";
7
7
  const E = { class: "pos-relative bg-light radius-big flex-column flex" }, P = { class: "pd-t-zero pd-b-zero pd-medium" }, V = {
8
8
  key: 0,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router"),f=require("../../../../components/Select/Select.vue2.cjs"),g=require("../../../../components/Feed/Feed.vue.cjs"),h=require("../../../organizations/components/blocks/CardOrganization.vue.cjs"),x=require("../../../icons/entities/IconFeatured.vue.cjs"),b=require("../../../icons/entities/IconPopular.vue.cjs"),w=require("../../../icons/entities/IconRecent.vue.cjs"),_=require("../../../icons/entities/IconFollowing.vue.cjs"),a=require("../../store/blogposts.cjs"),i=require("../../../auth/store/auth.cjs"),d=require("../../../organizations/store/organizations.cjs"),k=require("../../../organizations/store/memberships.cjs"),N={style:{"grid-template-columns":"2fr 4fr 2fr"},class:"cols-3 gap-thin pd-thin"},V={class:"align-self-start pos-sticky pos-t-0 w-100 bg-light radius-big pd-medium p-medium gap-thin flex-column flex-nowrap flex"},v={class:"pos-relative"},C={class:"bg-main t-black radius-big pd-medium pos-relative mn-b-thin flex-v-center t-left flex-nowrap flex"},y={class:"pos-relative flex-v-center flex-nowrap flex"},B=e.createElementVNode("span",{class:"mn-r-thin"},"Topics for ",-1),q={class:"align-self-start bg-light radius-big pd-medium"},E={class:"gap-thin flex-nowrap flex"},z=e.createElementVNode("p",{class:"t-medium mn-b-small"},"Popular Communities",-1),T={__name:"Community",setup(F){const o=m.useRoute(),s=m.useRouter();o.params.category==="popular"&&(a.state.sort.param="views"),o.params.category==="new"&&(a.state.sort.param="createdAt");const p=({membership:u,status:t,target:n},c,r)=>{k.mutations.handleMembershipUpdate(d.state.current,u,t,n,c,r)};return(u,t)=>{const n=e.resolveComponent("router-link"),c=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("ul",V,[e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="featured"},"cursor-pointer flex-v-center flex t-medium pd-thin radius-extra"]),onClick:t[0]||(t[0]=()=>{a.state.sort.param="createdAt",e.unref(s).push({name:"Blog",params:{category:"featured"}})})},[e.createVNode(x.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Featured ")],2),e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="popular"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:t[1]||(t[1]=()=>{a.state.sort.param="views",e.unref(s).push({name:"Blog",params:{category:"popular"}})})},[e.createVNode(b.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Popular ")],2),e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="new"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:t[2]||(t[2]=()=>{a.state.sort.param="createdAt",e.unref(s).push({name:"Blog",params:{category:"new"}})})},[e.createVNode(w.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Recent ")],2),i.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="following"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:t[3]||(t[3]=()=>{a.state.sort.param="createdAt",e.unref(s).push({name:"Blog",params:{category:"following"}})})},[e.createVNode(_.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Following ")],2)):e.createCommentVNode("",!0),e.createVNode(n,{to:{name:"Create BlogPost"},class:"button t-medium mn-t-small bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(" Create Post ")]),_:1})]),e.createElementVNode("section",v,[e.createElementVNode("header",C,[e.createElementVNode("h3",y,[B,e.createVNode(f.default,{options:["today","week","month","year","all time"],select:a.state.filter.period,"onUpdate:select":t[4]||(t[4]=r=>a.state.filter.period=r),placeholder:"all time",class:"t-semi pos-relative w-max bg-main t-black pd-thin radius-medium h3 t-center br-solid br-2px br-black-transp-10"},null,8,["select"])])]),e.createVNode(c,null,{default:e.withCtx(({Component:r,route:l})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r),{ref:"page",key:l.query}))]),_:2},1024)]),_:1})]),e.createElementVNode("div",q,[e.createElementVNode("div",E,[z,i.state.user._id?(e.openBlock(),e.createBlock(n,{key:0,to:{name:"Create Organization"},class:"t-medium cursor-pointer hover-scale-1 radius-extra flex-center flex i-medium bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" + ")]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createVNode(g.default,{states:{empty:{title:"No Organization Found",description:"Currently, there are no organization available."}},store:{read:r=>d.actions.read(r),state:d.state},options:{user:i.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,l=>(e.openBlock(),e.createBlock(h.default,{key:l._id,organization:l,user:i.state.user,showProducts:!1,showRating:!1,showFeatured:!1,showFollowers:!1,onUpdateMembership:p,class:"mn-b-thin w-100 pd-0 bg-white radius-big o-hidden"},null,8,["organization","user"]))),128))]),_:1},8,["store","options"])]),_:1})])])}}};exports.default=T;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router"),f=require("../../../../components/Select/Select.vue.cjs"),g=require("../../../../components/Feed/Feed.vue.cjs"),h=require("../../../organizations/components/blocks/CardOrganization.vue.cjs"),x=require("../../../icons/entities/IconFeatured.vue.cjs"),b=require("../../../icons/entities/IconPopular.vue.cjs"),w=require("../../../icons/entities/IconRecent.vue.cjs"),_=require("../../../icons/entities/IconFollowing.vue.cjs"),a=require("../../store/blogposts.cjs"),i=require("../../../auth/store/auth.cjs"),d=require("../../../organizations/store/organizations.cjs"),k=require("../../../organizations/store/memberships.cjs"),N={style:{"grid-template-columns":"2fr 4fr 2fr"},class:"cols-3 gap-thin pd-thin"},V={class:"align-self-start pos-sticky pos-t-0 w-100 bg-light radius-big pd-medium p-medium gap-thin flex-column flex-nowrap flex"},v={class:"pos-relative"},C={class:"bg-main t-black radius-big pd-medium pos-relative mn-b-thin flex-v-center t-left flex-nowrap flex"},y={class:"pos-relative flex-v-center flex-nowrap flex"},B=e.createElementVNode("span",{class:"mn-r-thin"},"Topics for ",-1),q={class:"align-self-start bg-light radius-big pd-medium"},E={class:"gap-thin flex-nowrap flex"},z=e.createElementVNode("p",{class:"t-medium mn-b-small"},"Popular Communities",-1),T={__name:"Community",setup(F){const o=m.useRoute(),s=m.useRouter();o.params.category==="popular"&&(a.state.sort.param="views"),o.params.category==="new"&&(a.state.sort.param="createdAt");const p=({membership:u,status:t,target:n},c,r)=>{k.mutations.handleMembershipUpdate(d.state.current,u,t,n,c,r)};return(u,t)=>{const n=e.resolveComponent("router-link"),c=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("ul",V,[e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="featured"},"cursor-pointer flex-v-center flex t-medium pd-thin radius-extra"]),onClick:t[0]||(t[0]=()=>{a.state.sort.param="createdAt",e.unref(s).push({name:"Blog",params:{category:"featured"}})})},[e.createVNode(x.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Featured ")],2),e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="popular"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:t[1]||(t[1]=()=>{a.state.sort.param="views",e.unref(s).push({name:"Blog",params:{category:"popular"}})})},[e.createVNode(b.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Popular ")],2),e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="new"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:t[2]||(t[2]=()=>{a.state.sort.param="createdAt",e.unref(s).push({name:"Blog",params:{category:"new"}})})},[e.createVNode(w.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Recent ")],2),i.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="following"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:t[3]||(t[3]=()=>{a.state.sort.param="createdAt",e.unref(s).push({name:"Blog",params:{category:"following"}})})},[e.createVNode(_.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Following ")],2)):e.createCommentVNode("",!0),e.createVNode(n,{to:{name:"Create BlogPost"},class:"button t-medium mn-t-small bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(" Create Post ")]),_:1})]),e.createElementVNode("section",v,[e.createElementVNode("header",C,[e.createElementVNode("h3",y,[B,e.createVNode(f.default,{options:["today","week","month","year","all time"],select:a.state.filter.period,"onUpdate:select":t[4]||(t[4]=r=>a.state.filter.period=r),placeholder:"all time",class:"t-semi pos-relative w-max bg-main t-black pd-thin radius-medium h3 t-center br-solid br-2px br-black-transp-10"},null,8,["select"])])]),e.createVNode(c,null,{default:e.withCtx(({Component:r,route:l})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r),{ref:"page",key:l.query}))]),_:2},1024)]),_:1})]),e.createElementVNode("div",q,[e.createElementVNode("div",E,[z,i.state.user._id?(e.openBlock(),e.createBlock(n,{key:0,to:{name:"Create Organization"},class:"t-medium cursor-pointer hover-scale-1 radius-extra flex-center flex i-medium bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" + ")]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createVNode(g.default,{states:{empty:{title:"No Organization Found",description:"Currently, there are no organization available."}},store:{read:r=>d.actions.read(r),state:d.state},options:{user:i.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,l=>(e.openBlock(),e.createBlock(h.default,{key:l._id,organization:l,user:i.state.user,showProducts:!1,showRating:!1,showFeatured:!1,showFollowers:!1,onUpdateMembership:p,class:"mn-b-thin w-100 pd-0 bg-white radius-big o-hidden"},null,8,["organization","user"]))),128))]),_:1},8,["store","options"])]),_:1})])])}}};exports.default=T;
@@ -1,6 +1,6 @@
1
1
  import { resolveComponent as x, openBlock as n, createElementBlock as h, createElementVNode as t, normalizeClass as u, unref as s, createVNode as r, createTextVNode as l, createCommentVNode as w, withCtx as m, Transition as y, createBlock as _, resolveDynamicComponent as C, Fragment as B, renderList as $ } from "vue";
2
2
  import { useRoute as F, useRouter as z } from "vue-router";
3
- import N from "../../../../components/Select/Select.vue2.js";
3
+ import N from "../../../../components/Select/Select.vue.js";
4
4
  import P from "../../../../components/Feed/Feed.vue.js";
5
5
  import A from "../../../organizations/components/blocks/CardOrganization.vue.js";
6
6
  import M from "../../../icons/entities/IconFeatured.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css */const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");;/* empty css */;/* empty css */require("axios");;/* empty css */const _=require("../blocks/CardBlogpost.vue.cjs"),n=require("../../store/blogposts.cjs"),f=require("../../../auth/store/auth.cjs"),b=require("vue-router");;/* empty css */const v=l=>(e.pushScopeId("data-v-bdf0e48a"),l=l(),e.popScopeId(),l),g={class:"flex-v-center flex-nowrap flex mn-b-medium"},h=v(()=>e.createElementVNode("h3",{class:"mn-r-medium"},"Blog",-1)),k={class:""},w={class:"flex-nowrap flex pd-t-zero pd-b-zero pd-big"},q=["onClick"],y=["onClick"],C={__name:"Community",async setup(l){let s,u;const i=b.useRouter();[s,u]=e.withAsyncContext(()=>n.read()),await s,u(),console.log(n.state),e.ref({title:"",content:"",categories:[]});const d=async t=>{window.confirm("Are you sure you want to delete this post?")&&(console.log(t),await n.remove(t))};let c=e.ref("all");const a=e.computed(()=>c.value==="all"?n.state.all:n.state.all.filter(t=>t.categories.includes(c.value)));return e.computed(()=>{for(let t of a.value)if(t.blocks&&t.blocks.length>0){const r=t.blocks.find(o=>o.type.name==="ImageUpload");if(r)return r.content}return null}),(t,r)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",g,[h,e.createElementVNode("button",{onClick:r[0]||(r[0]=o=>e.unref(i).push({name:"Create BlogPost"})),class:"t-white bg-second button-small button"},"+")]),e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,o=>(e.openBlock(),e.createBlock(_.default,{key:o._id,blogpost:o,owner:f.state.user._id,class:"mn-b-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",w,[e.createElementVNode("button",{class:"mn-r-thin button-small w-100 button",onClick:m=>t.$router.push({path:"/community/posts/"+o.url+"/edit"})},"Edit",8,q),e.createElementVNode("button",{class:"button-small w-100 button",onClick:m=>d(o._id)},"Delete",8,y)])]),_:2},1032,["blogpost","owner"]))),128))])]))}},B=p.default(C,[["__scopeId","data-v-bdf0e48a"]]);exports.default=B;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css */const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");;/* empty css */;/* empty css */require("axios");;/* empty css */const _=require("../blocks/CardBlogpost.vue.cjs"),n=require("../../store/blogposts.cjs"),f=require("../../../auth/store/auth.cjs"),b=require("vue-router");;/* empty css */const v=l=>(e.pushScopeId("data-v-bdf0e48a"),l=l(),e.popScopeId(),l),g={class:"flex-v-center flex-nowrap flex mn-b-medium"},h=v(()=>e.createElementVNode("h3",{class:"mn-r-medium"},"Blog",-1)),k={class:""},w={class:"flex-nowrap flex pd-t-zero pd-b-zero pd-big"},q=["onClick"],y=["onClick"],C={__name:"Community",async setup(l){let s,u;const i=b.useRouter();[s,u]=e.withAsyncContext(()=>n.read()),await s,u(),console.log(n.state),e.ref({title:"",content:"",categories:[]});const d=async t=>{window.confirm("Are you sure you want to delete this post?")&&(console.log(t),await n.remove(t))};let c=e.ref("all");const a=e.computed(()=>c.value==="all"?n.state.all:n.state.all.filter(t=>t.categories.includes(c.value)));return e.computed(()=>{for(let t of a.value)if(t.blocks&&t.blocks.length>0){const r=t.blocks.find(o=>o.type.name==="ImageUpload");if(r)return r.content}return null}),(t,r)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",g,[h,e.createElementVNode("button",{onClick:r[0]||(r[0]=o=>e.unref(i).push({name:"Create BlogPost"})),class:"t-white bg-second button-small button"},"+")]),e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,o=>(e.openBlock(),e.createBlock(_.default,{key:o._id,blogpost:o,owner:f.state.user._id,class:"mn-b-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",w,[e.createElementVNode("button",{class:"mn-r-thin button-small w-100 button",onClick:m=>t.$router.push({path:"/community/posts/"+o.url+"/edit"})},"Edit",8,q),e.createElementVNode("button",{class:"button-small w-100 button",onClick:m=>d(o._id)},"Delete",8,y)])]),_:2},1032,["blogpost","owner"]))),128))])]))}},B=p.default(C,[["__scopeId","data-v-bdf0e48a"]]);exports.default=B;
@@ -1,9 +1,9 @@
1
1
  import { withAsyncContext as h, ref as u, computed as d, openBlock as r, createElementBlock as p, createElementVNode as o, unref as v, Fragment as w, renderList as g, createBlock as k, withCtx as y, pushScopeId as C, popScopeId as x } from "vue";
2
- /* empty css */
3
- /* empty css */
2
+ /* empty css */
3
+ /* empty css */
4
4
  import B from "../../../../../../_virtual/_plugin-vue_export-helper.js";
5
5
  /* empty css */
6
- /* empty css */
6
+ /* empty css */
7
7
  import "axios";
8
8
  /* empty css */
9
9
  import $ from "../blocks/CardBlogpost.vue.js";