@ozdao/prometheus-framework 0.2.189 → 0.2.190
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/components/LocationSelection/LocationSelection.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/LocationSelection/LocationSelection.vue.js +96 -0
- package/dist/prometheus-framework/src/components/Sidebar/Sidebar.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Sidebar/Sidebar.vue.js +74 -0
- package/dist/prometheus-framework/src/components/Status/Status.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Status/Status.vue.js +29 -0
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/globals/globals.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/globals.client.js +21 -18
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js +68 -42
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +197 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/pages/401.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/pages/401.vue.js +10 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/pages/404.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/pages/404.vue.js +10 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/BottomNavigation.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/BottomNavigation.vue.js +157 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Navigation.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Navigation.vue.js +95 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/sections/Walkthrough.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/sections/Walkthrough.vue.js +126 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/LocationSelection/LocationSelection.vue +5 -6
- package/src/modules/globals/globals.client.js +9 -4
- package/src/modules/globals/views/components/layouts/App.vue +21 -0
- package/src/modules/globals/views/components/layouts/Client.vue +25 -47
- package/src/modules/globals/views/components/partials/BottomNavigation.vue +0 -2
- package/src/modules/globals/views/components/partials/Header.vue +14 -10
- package/src/modules/globals/views/components/partials/Navigation.vue +4 -4
- package/src/modules/globals/views/components/sections/Walkthrough.vue +1 -1
@@ -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.
|
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/views/components/blocks/BlockSearch.vue.cjs"),q=require("../../modules/globals/views/components/blocks/BlockSorting.vue.cjs"),E=require("../../modules/globals/views/components/blocks/BlockFilter.vue.cjs"),z=require("../../modules/globals/views/components/elements/ButtonSort.vue.cjs"),O=require("../../modules/globals/views/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.
|
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/views/components/blocks/BlockSearch.vue.js";
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("vue"),d=require("../Address/Address.vue.cjs"),p=require("../LocationMarker/LocationMarker.vue.cjs"),i=require("vue-router"),c=require("vue-i18n"),l=require("../../modules/globals/views/store/globals.cjs"),m={class:"t-center flex-center"},v=s.createElementVNode("p",{class:"h1 mn-b-medium"},"🌍",-1),y={class:"mn-b-semi"},b={class:"mn-b-small t-transp p-medium"},f={__name:"LocationSelection",setup(g){i.useRoute(),i.useRouter();const o=s.ref({country:null,state:null,city:null,address:null,location:null});function r(){l.state.position={...o.value},l.state.isOpenLocationPopup=!1,localStorage.setItem("position",JSON.stringify(l.state.position))}s.onMounted(()=>{o.value={...l.state.position}});const u={messages:{en:{title:"Choose Your Location",description:"Enter your address or select it on the map to see the nearest offers to you."},ru:{title:"Выбор Локации",description:"Пожалуйста, выберите вашу страну из списка ниже, чтобы увидеть варианты доставки и другую актуальную информацию:"}}},{t:a}=c.useI18n(u);return(n,e)=>(s.openBlock(),s.createElementBlock("div",m,[v,s.createElementVNode("h3",y,s.toDisplayString(s.unref(a)("title")),1),s.createElementVNode("p",b,s.toDisplayString(s.unref(a)("description")),1),(s.openBlock(),s.createBlock(d.default,{key:n.$i18n.locale,apiKey:n.GOOGLE_MAPS_API_KEY,locale:n.$i18n.locale,address:o.value.address,location:o.value.location,placeholder:"Enter your address",class:"bg-white radius-tl-medium radius-tr-medium t-black br-grey-transp-25 br-solid br-2px pd-medium","onUpdate:country":e[0]||(e[0]=t=>{o.value.country=t}),"onUpdate:state":e[1]||(e[1]=t=>{o.value.state=t}),"onUpdate:city":e[2]||(e[2]=t=>{o.value.city=t}),"onUpdate:location":e[3]||(e[3]=t=>{o.value.location=t}),"onUpdate:address":e[4]||(e[4]=t=>{o.value.address=t})},null,8,["apiKey","locale","address","location"])),(s.openBlock(),s.createBlock(p.default,{key:n.$i18n.locale,apiKey:n.GOOGLE_MAPS_API_KEY,locale:n.$i18n.locale,address:o.value.address,location:o.value.location,class:"bg-light radius-bl-medium radius-br-medium h-15r o-hidden","onUpdate:country":e[5]||(e[5]=t=>{o.value.country=t}),"onUpdate:state":e[6]||(e[6]=t=>{o.value.state=t}),"onUpdate:city":e[7]||(e[7]=t=>{o.value.city=t}),"onUpdate:location":e[8]||(e[8]=t=>{o.value.location=t}),"onUpdate:address":e[9]||(e[9]=t=>{o.value.address=t})},null,8,["apiKey","locale","address","location"])),s.createElementVNode("button",{onClick:e[10]||(e[10]=t=>r()),class:"w-100 mn-t-medium bg-main radius-extra button"},"Save Position")]))}};exports.default=f;
|
@@ -0,0 +1,96 @@
|
|
1
|
+
import { ref as y, onMounted as c, openBlock as l, createElementBlock as v, createElementVNode as i, toDisplayString as r, unref as d, createBlock as u } from "vue";
|
2
|
+
import f from "../Address/Address.vue.js";
|
3
|
+
import b from "../LocationMarker/LocationMarker.vue.js";
|
4
|
+
import { useRoute as U, useRouter as g } from "vue-router";
|
5
|
+
import { useI18n as E } from "vue-i18n";
|
6
|
+
import { state as n } from "../../modules/globals/views/store/globals.js";
|
7
|
+
const k = { class: "t-center flex-center" }, P = /* @__PURE__ */ i("p", { class: "h1 mn-b-medium" }, "🌍", -1), S = { class: "mn-b-semi" }, $ = { class: "mn-b-small t-transp p-medium" }, M = {
|
8
|
+
__name: "LocationSelection",
|
9
|
+
setup(K) {
|
10
|
+
U(), g();
|
11
|
+
const e = y({
|
12
|
+
country: null,
|
13
|
+
state: null,
|
14
|
+
city: null,
|
15
|
+
address: null,
|
16
|
+
location: null
|
17
|
+
});
|
18
|
+
function p() {
|
19
|
+
n.position = { ...e.value }, n.isOpenLocationPopup = !1, localStorage.setItem("position", JSON.stringify(n.position));
|
20
|
+
}
|
21
|
+
c(() => {
|
22
|
+
e.value = { ...n.position };
|
23
|
+
});
|
24
|
+
const m = {
|
25
|
+
messages: {
|
26
|
+
en: {
|
27
|
+
title: "Choose Your Location",
|
28
|
+
description: "Enter your address or select it on the map to see the nearest offers to you."
|
29
|
+
},
|
30
|
+
ru: {
|
31
|
+
title: "Выбор Локации",
|
32
|
+
description: "Пожалуйста, выберите вашу страну из списка ниже, чтобы увидеть варианты доставки и другую актуальную информацию:"
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}, { t: a } = E(m);
|
36
|
+
return (s, o) => (l(), v("div", k, [
|
37
|
+
P,
|
38
|
+
i("h3", S, r(d(a)("title")), 1),
|
39
|
+
i("p", $, r(d(a)("description")), 1),
|
40
|
+
(l(), u(f, {
|
41
|
+
key: s.$i18n.locale,
|
42
|
+
apiKey: s.GOOGLE_MAPS_API_KEY,
|
43
|
+
locale: s.$i18n.locale,
|
44
|
+
address: e.value.address,
|
45
|
+
location: e.value.location,
|
46
|
+
placeholder: "Enter your address",
|
47
|
+
class: "bg-white radius-tl-medium radius-tr-medium t-black br-grey-transp-25 br-solid br-2px pd-medium",
|
48
|
+
"onUpdate:country": o[0] || (o[0] = (t) => {
|
49
|
+
e.value.country = t;
|
50
|
+
}),
|
51
|
+
"onUpdate:state": o[1] || (o[1] = (t) => {
|
52
|
+
e.value.state = t;
|
53
|
+
}),
|
54
|
+
"onUpdate:city": o[2] || (o[2] = (t) => {
|
55
|
+
e.value.city = t;
|
56
|
+
}),
|
57
|
+
"onUpdate:location": o[3] || (o[3] = (t) => {
|
58
|
+
e.value.location = t;
|
59
|
+
}),
|
60
|
+
"onUpdate:address": o[4] || (o[4] = (t) => {
|
61
|
+
e.value.address = t;
|
62
|
+
})
|
63
|
+
}, null, 8, ["apiKey", "locale", "address", "location"])),
|
64
|
+
(l(), u(b, {
|
65
|
+
key: s.$i18n.locale,
|
66
|
+
apiKey: s.GOOGLE_MAPS_API_KEY,
|
67
|
+
locale: s.$i18n.locale,
|
68
|
+
address: e.value.address,
|
69
|
+
location: e.value.location,
|
70
|
+
class: "bg-light radius-bl-medium radius-br-medium h-15r o-hidden",
|
71
|
+
"onUpdate:country": o[5] || (o[5] = (t) => {
|
72
|
+
e.value.country = t;
|
73
|
+
}),
|
74
|
+
"onUpdate:state": o[6] || (o[6] = (t) => {
|
75
|
+
e.value.state = t;
|
76
|
+
}),
|
77
|
+
"onUpdate:city": o[7] || (o[7] = (t) => {
|
78
|
+
e.value.city = t;
|
79
|
+
}),
|
80
|
+
"onUpdate:location": o[8] || (o[8] = (t) => {
|
81
|
+
e.value.location = t;
|
82
|
+
}),
|
83
|
+
"onUpdate:address": o[9] || (o[9] = (t) => {
|
84
|
+
e.value.address = t;
|
85
|
+
})
|
86
|
+
}, null, 8, ["apiKey", "locale", "address", "location"])),
|
87
|
+
i("button", {
|
88
|
+
onClick: o[10] || (o[10] = (t) => p()),
|
89
|
+
class: "w-100 mn-t-medium bg-main radius-extra button"
|
90
|
+
}, "Save Position")
|
91
|
+
]));
|
92
|
+
}
|
93
|
+
};
|
94
|
+
export {
|
95
|
+
M as default
|
96
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("../Menu/Menu.vue.cjs"),k=require("../Menu/MenuItem.vue.cjs"),h=require("../FieldPhone/click-outside.cjs"),l=require("vue-router"),r=require("../../modules/auth/views/store/auth.cjs"),n=require("../../modules/globals/views/store/globals.cjs"),_=require("../Checkbox/Checkbox.vue.cjs");;/* empty css */const g={id:"sidebar",class:"o-hidden"},v={class:"pd-medium pos-sticky pos-t-0 h-100vh flex-column flex flex-justify-content"},S=e.createElementVNode("span",null," Backoffice ",-1),q={__name:"Sidebar",props:["stateSidebar"],emits:["closeSidebar"],setup(c,{emit:u}){const d=l.useRouter(),o=l.useRoute();e.ref(!1);const a=c,i=u;e.watch(()=>o.path,()=>{a.stateSidebar===!0&&i("closeSidebar")});let m=h.default;function f(s){const t=s.target.classList.contains("menu-btn");if(console.log(s.target.classList.contains("menu-btn")),t)return null;a.stateSidebar===!0&&i("closeSidebar")}return(s,t)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",g,[e.createElementVNode("div",v,[e.createElementVNode("div",null,[e.renderSlot(s.$slots,"default")]),e.createVNode(_.default,{label:"Darkmode",radio:n.state.theme.darkmode,"onUpdate:radio":t[0]||(t[0]=b=>n.actions.toggleTheme()),name:"prices",class:"t-semi pd-small p-big mn-b-small br-2px br-solid radius-extra br-black-transp-5"},null,8,["radio"]),r.state.access.roles&&(r.state.access.roles.includes("ROLE_MODERATOR")||r.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createBlock(p.default,{key:0,class:"mn-b-regular bg-black t-white"},{default:e.withCtx(()=>[e.createVNode(k.default,{onClick:t[1]||(t[1]=b=>e.unref(d).push({name:"Backoffice",params:{_id:e.unref(o).params._id}})),class:"cursor-pointer",theme:"white"},{default:e.withCtx(()=>[S]),_:1})]),_:1})):e.createCommentVNode("",!0)])])),[[e.unref(m),f]])}};exports.default=q;
|
@@ -0,0 +1,74 @@
|
|
1
|
+
import { ref as k, watch as h, withDirectives as g, openBlock as c, createElementBlock as S, createElementVNode as r, renderSlot as v, createVNode as n, createBlock as x, withCtx as m, unref as s, createCommentVNode as O } from "vue";
|
2
|
+
import B from "../Menu/Menu.vue.js";
|
3
|
+
import R from "../Menu/MenuItem.vue.js";
|
4
|
+
import $ from "../FieldPhone/click-outside.js";
|
5
|
+
import { useRouter as w, useRoute as E } from "vue-router";
|
6
|
+
import { state as o } from "../../modules/auth/views/store/auth.js";
|
7
|
+
import { state as C, actions as D } from "../../modules/globals/views/store/globals.js";
|
8
|
+
import L from "../Checkbox/Checkbox.vue.js";
|
9
|
+
/* empty css */
|
10
|
+
const N = {
|
11
|
+
id: "sidebar",
|
12
|
+
class: "o-hidden"
|
13
|
+
}, y = { class: "pd-medium pos-sticky pos-t-0 h-100vh flex-column flex flex-justify-content" }, M = /* @__PURE__ */ r("span", null, " Backoffice ", -1), G = {
|
14
|
+
__name: "Sidebar",
|
15
|
+
props: ["stateSidebar"],
|
16
|
+
emits: ["closeSidebar"],
|
17
|
+
setup(d, { emit: u }) {
|
18
|
+
const f = w(), i = E();
|
19
|
+
k(!1);
|
20
|
+
const a = d, l = u;
|
21
|
+
h(() => i.path, () => {
|
22
|
+
a.stateSidebar === !0 && l("closeSidebar");
|
23
|
+
});
|
24
|
+
let p = $;
|
25
|
+
function b(t) {
|
26
|
+
const e = t.target.classList.contains("menu-btn");
|
27
|
+
if (console.log(t.target.classList.contains("menu-btn")), e)
|
28
|
+
return null;
|
29
|
+
a.stateSidebar === !0 && l("closeSidebar");
|
30
|
+
}
|
31
|
+
return (t, e) => g((c(), S("div", N, [
|
32
|
+
r("div", y, [
|
33
|
+
r("div", null, [
|
34
|
+
v(t.$slots, "default")
|
35
|
+
]),
|
36
|
+
n(L, {
|
37
|
+
label: "Darkmode",
|
38
|
+
radio: C.theme.darkmode,
|
39
|
+
"onUpdate:radio": e[0] || (e[0] = (_) => D.toggleTheme()),
|
40
|
+
name: "prices",
|
41
|
+
class: "t-semi pd-small p-big mn-b-small br-2px br-solid radius-extra br-black-transp-5"
|
42
|
+
}, null, 8, ["radio"]),
|
43
|
+
o.access.roles && (o.access.roles.includes("ROLE_MODERATOR") || o.access.roles.includes("ROLE_ADMIN")) ? (c(), x(B, {
|
44
|
+
key: 0,
|
45
|
+
class: "mn-b-regular bg-black t-white"
|
46
|
+
}, {
|
47
|
+
default: m(() => [
|
48
|
+
n(R, {
|
49
|
+
onClick: e[1] || (e[1] = (_) => s(f).push({
|
50
|
+
name: "Backoffice",
|
51
|
+
params: {
|
52
|
+
_id: s(i).params._id
|
53
|
+
}
|
54
|
+
})),
|
55
|
+
class: "cursor-pointer",
|
56
|
+
theme: "white"
|
57
|
+
}, {
|
58
|
+
default: m(() => [
|
59
|
+
M
|
60
|
+
]),
|
61
|
+
_: 1
|
62
|
+
})
|
63
|
+
]),
|
64
|
+
_: 1
|
65
|
+
})) : O("", !0)
|
66
|
+
])
|
67
|
+
])), [
|
68
|
+
[s(p), b]
|
69
|
+
]);
|
70
|
+
}
|
71
|
+
};
|
72
|
+
export {
|
73
|
+
G as default
|
74
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("../../modules/icons/navigation/IconCross.vue.cjs");;/* empty css */const l={class:"pd-small error-wrapper"},a={class:"flex-nowrap flex radius-small pd-small t-white bg-fourth"},n={class:"w-100"},c=e.createElementVNode("br",null,null,-1),i={__name:"Status",props:{status:String,message:String,show:Boolean,data:Object},setup(s){return(r,t)=>(e.openBlock(),e.createElementBlock("div",l,[e.createElementVNode("div",a,[e.createElementVNode("p",n,[e.createTextVNode(e.toDisplayString(s.data.message)+" ",1),c]),e.createVNode(o.default,{onClick:t[0]||(t[0]=u=>r.closePopup()),class:"cursor-pointer hover-scale-1 i-regular z-index-5"})])]))}};exports.default=i;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { openBlock as r, createElementBlock as a, createElementVNode as e, createTextVNode as l, toDisplayString as n, createVNode as i } from "vue";
|
2
|
+
import c from "../../modules/icons/navigation/IconCross.vue.js";
|
3
|
+
/* empty css */
|
4
|
+
const p = { class: "pd-small error-wrapper" }, d = { class: "flex-nowrap flex radius-small pd-small t-white bg-fourth" }, m = { class: "w-100" }, u = /* @__PURE__ */ e("br", null, null, -1), w = {
|
5
|
+
__name: "Status",
|
6
|
+
props: {
|
7
|
+
status: String,
|
8
|
+
message: String,
|
9
|
+
show: Boolean,
|
10
|
+
data: Object
|
11
|
+
},
|
12
|
+
setup(s) {
|
13
|
+
return (o, t) => (r(), a("div", p, [
|
14
|
+
e("div", d, [
|
15
|
+
e("p", m, [
|
16
|
+
l(n(s.data.message) + " ", 1),
|
17
|
+
u
|
18
|
+
]),
|
19
|
+
i(c, {
|
20
|
+
onClick: t[0] || (t[0] = (_) => o.closePopup()),
|
21
|
+
class: "cursor-pointer hover-scale-1 i-regular z-index-5"
|
22
|
+
})
|
23
|
+
])
|
24
|
+
]));
|
25
|
+
}
|
26
|
+
};
|
27
|
+
export {
|
28
|
+
w as default
|
29
|
+
};
|
package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../globals/views/components/blocks/CardHeader.vue.cjs"),d=require("./FooterBlogpost.vue.cjs"),m=require("../../../../components/Text/Text.vue.cjs");;/* empty css
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../globals/views/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:1,class:"pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra"},h={key:1,class:"mn-b-small t-transp p-big"},k={key:2,class:"mn-b-small h2"},v=["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},hideTitle:{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")),a=e.computed(()=>n.blogpost.content.find(o=>o.type==="Textarea"));return(o,r)=>{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,[t.hideTitle?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(m.default,{key:0,text:t.blogpost.name||"",maxLen:80,class:"h3 d-block",onClick:r[0]||(r[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),a.value&&a.value.content&&t.type!=="blogpostPage"&&!t.hideDescription?(e.openBlock(),e.createElementBlock("p",h,e.toDisplayString(a.value.content.slice(0,120))+"... ",1)):e.createCommentVNode("",!0),t.type==="blogpostPage"&&!t.hideTitle?(e.openBlock(),e.createElementBlock("h3",k,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,v)):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;
|
package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js
CHANGED
@@ -2,7 +2,7 @@ import { computed as c, openBlock as o, createElementBlock as l, createVNode as
|
|
2
2
|
import k from "../../../globals/views/components/blocks/CardHeader.vue.js";
|
3
3
|
import w from "./FooterBlogpost.vue.js";
|
4
4
|
import B from "../../../../components/Text/Text.vue.js";
|
5
|
-
/* empty css
|
5
|
+
/* empty css */
|
6
6
|
import { useRouter as E } from "vue-router";
|
7
7
|
const P = { class: "pos-relative bg-light radius-big flex-column flex" }, T = { class: "pd-t-zero pd-b-zero pd-medium" }, V = {
|
8
8
|
key: 0,
|
package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs
CHANGED
@@ -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.
|
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/views/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.
|
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 */const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");;/* empty css
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");;/* empty css */;/* empty css */;/* empty css */require("axios");;/* empty css */const _=require("../blocks/CardBlogpost.vue.cjs"),n=require("../../store/blogposts.cjs"),f=require("../../../auth/views/store/auth.cjs"),b=require("vue-router");;/* empty css */const v=l=>(e.pushScopeId("data-v-2fc13a78"),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,c;const i=b.useRouter();[s,c]=e.withAsyncContext(()=>n.read()),await s,c(),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 u=e.ref("all");const a=e.computed(()=>u.value==="all"?n.state.all:n.state.all.filter(t=>t.categories.includes(u.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-2fc13a78"]]);exports.default=B;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { withAsyncContext as b, 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
2
|
/* empty css */
|
3
3
|
import B from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
4
|
-
/* empty css
|
4
|
+
/* empty css */
|
5
5
|
/* empty css */
|
6
6
|
/* empty css */
|
7
7
|
import "axios";
|
package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("isomorphic-dompurify");;/* empty css */const w=require("../../../constructor/components/sections/Constructor.vue.cjs"),V=require("../../../../components/Popup/Popup.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("isomorphic-dompurify");;/* empty css */const w=require("../../../constructor/components/sections/Constructor.vue.cjs"),V=require("../../../../components/Popup/Popup.vue.cjs");;/* empty css */;/* empty css */const N=require("../../../../components/FieldTags/BlockTags.vue.cjs"),B=require("../../../../components/Checkbox/Checkbox.vue.cjs"),y=require("../../../../components/Field/Field.vue2.cjs"),P=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),C=require("../../../../components/Button/Button.vue2.cjs"),f=require("vue-router"),n=require("../../store/blogposts.cjs"),i=require("../../../auth/views/store/auth.cjs"),x=require("../../../organizations/store/organizations.cjs"),q={class:"pd-thin"},E={style:{"min-height":"100%"},class:"w-100 bg-light pd-big radius-big"},T=e.createElementVNode("div",{class:"w-full h-full"},null,-1),z={key:0,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},A={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},O=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),U=e.createElementVNode("h5",{class:"mn-b-thin"},"Add source:",-1),D=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),M={key:0,class:"mn-b-thin"},S={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},R={__name:"CreateBlogPost",setup($){const s=f.useRoute(),u=f.useRouter();let t=e.ref(null),p=e.ref(null);const c=e.ref([]),r=e.ref(null);e.onMounted(async()=>{const o=await x.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});if(p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo})),s.params.url){const a=await n.read({user:i.state.user._id,url:s.params.url});t.value=a.pop()}else n.clean(),t.value=n.state.current;t.value.owner||(t.value.owner={target:i.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:i.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(r.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo})});const g=e.ref(""),m=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>m.value.filter(o=>o.text.toLowerCase().includes(g.value.toLowerCase()))),e.computed(()=>m.value.filter(o=>!c.value.some(a=>a.text===o.text)));const d=e.ref(!1);function h(){d.value=!0}function v(){d.value=!1}function b(){c.value.length>0&&c.value.map(o=>o.text),t.value.status="draft",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function k(){r.value&&(t.value.owner={target:r.value._id,type:"organization"}),r.value||(t.value.creator.hidden=!1),r.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{console.log(t.value),u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,a)=>(e.openBlock(),e.createElementBlock("article",q,[e.createElementVNode("section",E,[T,e.unref(t)?(e.openBlock(),e.createBlock(w.default,{key:0,content:e.unref(t).content,onUpdate:a[0]||(a[0]=l=>e.unref(t).content=l)},null,8,["content"])):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"scaleIn"},{default:e.withCtx(()=>[e.unref(t)?(e.openBlock(),e.createElementBlock("section",z,[e.createElementVNode("div",A,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[1]||(a[1]=l=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[2]||(a[2]=l=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[3]||(a[3]=l=>h()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(V.default,{onClosePopup:v,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[O,e.createVNode(N.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags,class:"mn-b-small"},null,8,["tags"]),U,e.createVNode(y.default,{field:e.unref(t).source,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).source=l),placeholder:"Add full link to the source",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["field"]),D,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":a[6]||(a[6]=l=>r.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["modelValue","options"]),r.value?(e.openBlock(),e.createElementBlock("h5",M,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(B.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[7]||(a[7]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(C.default,{submit:k,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}};exports.default=R;
|
package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js
CHANGED
@@ -2,7 +2,7 @@ import { ref as n, onMounted as V, computed as w, openBlock as u, createElementB
|
|
2
2
|
import "isomorphic-dompurify";
|
3
3
|
/* empty css */
|
4
4
|
import D from "../../../constructor/components/sections/Constructor.vue.js";
|
5
|
-
import N from "../../../../components/Popup/Popup.
|
5
|
+
import N from "../../../../components/Popup/Popup.vue.js";
|
6
6
|
/* empty css */
|
7
7
|
/* empty css */
|
8
8
|
import O from "../../../../components/FieldTags/BlockTags.vue.js";
|
package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css
|
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 */;/* empty css */;/* empty css */const s=require("../../../../components/Slider/Slider.vue.cjs"),i=require("../blocks/CardBlogpost.vue.cjs"),l=require("../../store/blogposts.cjs"),r=require("../../../auth/views/store/auth.cjs");;/* empty css */const n={class:"pd-thin"},a={class:"bg-light radius-big pd-t-big pd-b-big"},c={class:"w-100 pd-b-small t-center flex-center flex"},u=e.createElementVNode("b",null,"Community",-1),d={__name:"HotPosts",setup(p){return(_,h)=>{const o=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",n,[e.createElementVNode("div",a,[e.createElementVNode("h2",c,[e.createTextVNode(" Discover Our "),e.createVNode(o,{to:{name:"Blog"},class:"transition-ease-in hover-bg-black hover-t-white transition-timing-1 hover-scale-0 bg-main cursor-pointer pd-thin pd-r-small pd-l-small mn-l-thin radius-extra flex flex-v-center"},{default:e.withCtx(()=>[u]),_:1})]),e.createVNode(s.default,{store:{read:t=>l.read(t)},options:{skip:0,limit:8,user:r.state.user._id,period:"year",category:"featured"},text:{messages:{en:{title:"No Blogposts Found",description:"Currently, there are no blogposts available."}}},class:"slider-hotpost"},{default:e.withCtx(({item:t})=>[(e.openBlock(),e.createBlock(i.default,{key:t._id,blogpost:t,user:r.state.user._id,hideDescription:!0,class:"bg-white flex flex-column h-35r"},null,8,["blogpost","user"]))]),_:1},8,["store","options"])])])}}};exports.default=d;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { resolveComponent as n, openBlock as o, createElementBlock as a, createElementVNode as t, createTextVNode as c, createVNode as r, withCtx as s, createBlock as p } from "vue";
|
2
2
|
/* empty css */
|
3
|
-
/* empty css
|
3
|
+
/* empty css */
|
4
4
|
/* empty css */
|
5
5
|
/* empty css */
|
6
6
|
/* empty css */
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../components/Chips/Chips.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../components/Chips/Chips.vue2.cjs"),y=require("../../../icons/navigation/IconEdit.vue.cjs"),C=require("../../../globals/views/components/blocks/CardHeader.vue.cjs");require("../../../community/store/reactions.cjs");const k=require("vue-router"),p={key:0,class:"o-hidden pos-relative bg-light mn-b-small w-100"},E=["src"],T=["src"],w={class:"w-max mn-r-thin pd-thin radius-small t-semi bg-main"},b={class:"t-semi"},B={key:0,class:"t-semi"},D={key:0,class:"t-semi uppercase"},U={key:1,class:"cursor-pointer mn-b-thin flex-nowrap flex w-100"},N={key:0,class:""},V={key:1,class:"pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra"},S={key:2,class:"mn-b-small p-big"},x={__name:"CardEvent",props:["event","user","short","type"],setup(t){e.ref(new Date),k.useRouter();const o=t;e.computed(()=>o.event.content.find(n=>n.type.name==="ImageUpload")),e.computed(()=>o.event.content.find(n=>n.type.name==="Textarea"));const u=e.computed(()=>{const n=new Date,s=Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds()),r=new Date(o.event.date.start),a=Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds())-s;if(a<0)return"Finished";if(a===0)return"Starting Now";{const d=Math.floor(a/1e3),l=Math.floor(d/60),i=Math.floor(l/60),m=Math.floor(i/24);return m>0?`${m} days until event`:i>0?`${i} hours until event`:l>0?`${l} minutes until event`:`${d} seconds until event`}}),v=e.computed(()=>{const n=new Date(o.event.date.start),s={day:"2-digit",month:"2-digit"};return n.toLocaleDateString(void 0,s)}),h=e.computed(()=>{console.log(o.event.date.start),console.log(o.event.date.end);const n=new Date(o.event.date.start),s=new Date(o.event.date.end),r=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(n),c=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(s);return`${r}-${c}`}),f=e.computed(()=>{const n=o.event.name;return n.length>26?`${n.substring(0,22)}…`:n});return(n,s)=>(e.openBlock(),e.createElementBlock("article",{class:e.normalizeClass([{"flex-nowrap flex-v-center flex":t.type==="short"},"pos-relative"])},[e.createVNode(C.default,{class:e.normalizeClass({"mn-b-small pd-medium":t.type!=="short","flex-child-order-last flex-child mn-l-small":t.type==="short"}),entity:t.event,entityType:"event",user:t.user,owner:t.event.owner,creator:t.event.creator,members:t.event.numberOfTickets,membersPhotos:t.event.participantsPhotos,type:t.type,dateFormatted:u.value},null,8,["class","entity","user","owner","creator","members","membersPhotos","type","dateFormatted"]),t.event.cover&&t.type!=="short"?(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("img",{src:(n.FILE_SERVER_URL||"")+t.event.cover,alt:"Event image",class:"pos-relative z-index-1 d-block mn-auto h-20r"},null,8,E),e.createElementVNode("img",{src:(n.FILE_SERVER_URL||"")+t.event.cover,alt:"Event Background",class:"z-index-0 pos-absolute w-100 h-100 pos-t-0 pos-r-0",style:{transform:"scale(1.5)",filter:"blur(2rem)","-webkit-filter":"blur(2rem)"}},null,8,T)])):e.createCommentVNode("",!0),e.createElementVNode("section",{class:e.normalizeClass(["pos-relative w-100",{"pd-t-zero pd-medium":t.type!=="short"}])},[t.user===t.event.creator.target._id?(e.openBlock(),e.createBlock(y.default,{key:0,onClick:s[0]||(s[0]=e.withModifiers(r=>n.$router.push({name:"Edit Event",params:{url:t.event.url}}),["stop"])),class:"z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([{"mn-b-small":t.type!=="short"},"flex-v-center flex-nowrap flex"])},[e.createElementVNode("div",w,[e.createElementVNode("span",b,e.toDisplayString(v.value),1),t.type!=="short"?(e.openBlock(),e.createElementBlock("span",B," | "+e.toDisplayString(h.value),1)):e.createCommentVNode("",!0)]),t.type==="short"?(e.openBlock(),e.createElementBlock("span",D,e.toDisplayString(f.value),1)):e.createCommentVNode("",!0)],2),t.type!=="short"?(e.openBlock(),e.createElementBlock("div",U,[t.type!=="short"?(e.openBlock(),e.createElementBlock("h3",N,e.toDisplayString(t.event.name),1)):e.createCommentVNode("",!0),t.event.status==="draft"?(e.openBlock(),e.createElementBlock("div",V,e.toDisplayString(t.event.status),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("p",S,e.toDisplayString(t.event.description),1)):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default"),t.type!=="short"&&t.event.tags.length>0?(e.openBlock(),e.createBlock(g.default,{key:3,chips:t.event.tags},null,8,["chips"])):e.createCommentVNode("",!0)],2)],2))}};exports.default=x;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref as k, computed as l, openBlock as n, createElementBlock as i, normalizeClass as m, createVNode as x, createElementVNode as c, createCommentVNode as a, createBlock as w, withModifiers as D, toDisplayString as d, renderSlot as E } from "vue";
|
2
|
-
import p from "../../../../components/Chips/Chips.
|
2
|
+
import p from "../../../../components/Chips/Chips.vue2.js";
|
3
3
|
import $ from "../../../icons/navigation/IconEdit.vue.js";
|
4
4
|
import I from "../../../globals/views/components/blocks/CardHeader.vue.js";
|
5
5
|
import "../../../community/store/reactions.js";
|
package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("../../../../../../node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.cjs"),P=require("../../../../components/Popup/Popup.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("../../../../../../node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.cjs"),P=require("../../../../components/Popup/Popup.vue.cjs"),g=require("../../../../components/Button/Button.vue2.cjs"),S=require("../../store/tickets.cjs");;/* empty css */const w=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),x=r=>(e.pushScopeId("data-v-20750f79"),r=r(),e.popScopeId(),r),E=x(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Scan QR Code",-1)),q={class:"h-max"},T={__name:"ButtonCheck",emits:"qrcodecheck",setup(r,{emit:i}){const u=i,n=e.ref(!1),a=e.ref("");function l(){n.value=!0}function d(){n.value=!1}const s=e.ref(null);async function p(t){s.value=t.map(o=>o.rawValue);try{const o=s.value[0]||"";if(!o)throw new Error("Troubles with qrcode reading");const c=await S.actions.update({_id:o,status:"used",check:!0});alert("Ticket checked. And it's all right!")}catch{alert("Ticket is not found, already used or deactivated!")}u("qrcodecheck")}function m(t){a.value=`[${t.name}]: `,t.name==="NotAllowedError"?a.value+="you need to grant camera access permission":t.name==="NotFoundError"?a.value+="no camera on this device":t.name==="NotSupportedError"?a.value+="secure context required (HTTPS, localhost)":t.name==="NotReadableError"?a.value+="is the camera already in use?":t.name==="OverconstrainedError"?a.value+="installed cameras are not suitable":t.name==="StreamApiNotSupportedError"?a.value+="Stream API is not supported in this browser":t.name==="InsecureContextError"?a.value+="Camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.":a.value+=t.message}function f(t,o){for(const c of t){const{boundingBox:{x:h,y:v,width:_,height:b}}=c;o.lineWidth=2,o.strokeStyle="#007bff",o.strokeRect(h,v,_,b)}}return(t,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(g.default,{submit:l,class:"bg-main button-small radius-extra button"},{default:e.withCtx(()=>[e.createTextVNode(" Check Tickets ")]),_:1}),e.createVNode(P.default,{title:"Добавить участника",onClosePopup:d,isPopupOpen:n.value,class:"w-max-30r h-max-30r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[E,e.createElementVNode("div",q,[e.createVNode(e.unref(k.QrcodeStream),{track:f,onDetect:p,onError:m})])]),_:1},8,["isPopupOpen"])]))}},N=w.default(T,[["__scopeId","data-v-20750f79"]]);exports.default=N;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref as s, openBlock as w, createElementBlock as E, createVNode as n, withCtx as l, createTextVNode as S, createElementVNode as u, unref as g, pushScopeId as T, popScopeId as C } from "vue";
|
2
2
|
import { QrcodeStream as y } from "../../../../../../node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.js";
|
3
|
-
import N from "../../../../components/Popup/Popup.
|
3
|
+
import N from "../../../../components/Popup/Popup.vue.js";
|
4
4
|
import B from "../../../../components/Button/Button.vue2.js";
|
5
5
|
import { actions as I } from "../../store/tickets.js";
|
6
6
|
/* empty css */
|