@ozdao/prometheus-framework 0.1.61 โ 0.1.63
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/BackofficeGallery-30022293.js +1 -0
- package/dist/BackofficeGallery-f64daa0d.mjs +264 -0
- package/dist/BackofficeReports-cb4b180d.mjs +44 -0
- package/dist/BackofficeReports-d021871f.js +1 -0
- package/dist/BlockTags-8cddaef7.js +1 -0
- package/dist/BlockTags-ee310572.mjs +853 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
- package/dist/Button-7643c9aa.js +1 -0
- package/dist/Button-9e1a9284.mjs +226 -0
- package/dist/Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
- package/dist/Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
- package/dist/ButtonToggleMembership-7ee4dc8e.mjs +90 -0
- package/dist/ButtonToggleMembership-b9352cec.js +1 -0
- package/dist/CardBlogpost-3c92fbc9.mjs +246 -0
- package/dist/CardBlogpost-c7364b1e.js +1 -0
- package/dist/CardOrganization-647cb571.js +1 -0
- package/dist/CardOrganization-facb77f7.mjs +234 -0
- package/dist/CardProduct-92affca1.js +1 -0
- package/dist/CardProduct-fca53299.mjs +193 -0
- package/dist/Checkbox-5dbe7b23.mjs +62 -0
- package/dist/Checkbox-76f09248.js +1 -0
- package/dist/Chips-0fdb31c9.js +1 -0
- package/dist/Chips-f1a0d085.mjs +214 -0
- package/dist/Community-534d473c.mjs +132 -0
- package/dist/Community-e9aff969.js +1 -0
- package/dist/Dashboard-91d73bc5.js +1 -0
- package/dist/Dashboard-ea9035bc.mjs +152 -0
- package/dist/Dropdown-31115457.js +1 -0
- package/dist/Dropdown-cab3605b.mjs +146 -0
- package/dist/EULA-aba6a807.js +1 -0
- package/dist/EULA-e05236af.mjs +4210 -0
- package/dist/EditOrder-94bbebff.mjs +221 -0
- package/dist/EditOrder-c070d474.js +1 -0
- package/dist/EmptyState-d65bab5b.js +1 -0
- package/dist/EmptyState-e404b05d.mjs +36 -0
- package/dist/Events-46ae8fc6.mjs +123 -0
- package/dist/Events-813c8c7b.js +1 -0
- package/dist/Feed-2d443ad2.mjs +146 -0
- package/dist/Feed-3a4e7a9c.js +1 -0
- package/dist/Feed-8b554fc1.js +1 -0
- package/dist/Feed-98b47c6f.js +1 -0
- package/dist/Feed-a21d6007.mjs +124 -0
- package/dist/Feed-b39138c8.js +1 -0
- package/dist/Feed-c41ef736.mjs +361 -0
- package/dist/Feed-d114330c.mjs +112 -0
- package/dist/Field-e2a43424.js +1 -0
- package/dist/Field-e5ad88d3.mjs +75 -0
- package/dist/Field.vue_vue_type_style_index_0_scoped_f4a29b0d_lang-0ea8fbf8.js +1 -0
- package/dist/Field.vue_vue_type_style_index_0_scoped_f4a29b0d_lang-4ed993c7.mjs +1 -0
- package/dist/Gallery-46b5f939.js +1 -0
- package/dist/Gallery-762a9c2d.mjs +241 -0
- package/dist/IconChevronRight-a55f838e.js +1 -0
- package/dist/IconChevronRight-fae9d012.mjs +28 -0
- package/dist/IconCommunity-468dc457.mjs +65 -0
- package/dist/IconCommunity-b339e806.js +1 -0
- package/dist/IconCross-5bf93179.js +1 -0
- package/dist/IconCross-84cb1292.mjs +28 -0
- package/dist/IconEdit-9edfd74d.mjs +21 -0
- package/dist/IconEdit-c0469b45.js +1 -0
- package/dist/Image-4dcfddb8.js +9 -0
- package/dist/Image-e0da17ac.mjs +571 -0
- package/dist/LabelGooglePlay-24feb437.mjs +31 -0
- package/dist/LabelGooglePlay-f80e5ff0.js +1 -0
- package/dist/LeftoverAdd-5a8988d9.js +1 -0
- package/dist/LeftoverAdd-c4f37f47.mjs +227 -0
- package/dist/Leftovers-470a1689.js +1 -0
- package/dist/Leftovers-69c7dcd9.mjs +136 -0
- package/dist/Loader-21f016da.js +1 -0
- package/dist/Loader-cd422786.mjs +41 -0
- package/dist/Loader.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
- package/dist/Loader.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
- package/dist/Members-04273cd4.mjs +114 -0
- package/dist/Members-0685a15f.js +1 -0
- package/dist/Menu-b5d6a0c7.js +1 -0
- package/dist/Menu-dd7645c1.mjs +13 -0
- package/dist/MenuItem-56ae7f94.js +1 -0
- package/dist/MenuItem-6296d02f.mjs +63 -0
- package/dist/Orders-b64e8cb9.js +1 -0
- package/dist/Orders-ff30db05.mjs +75 -0
- package/dist/Organizations-46aab2c8.mjs +73 -0
- package/dist/Organizations-a8627bc5.js +1 -0
- package/dist/Payments-53e5fecf.js +1 -0
- package/dist/Payments-82e545e1.mjs +87 -0
- package/dist/PlaceholderUserpic-14c6ea7e.mjs +28 -0
- package/dist/PlaceholderUserpic-47f6f319.js +1 -0
- package/dist/Popup-0915427c.mjs +74 -0
- package/dist/Popup-795f5c88.js +1 -0
- package/dist/Popup.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
- package/dist/Popup.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
- package/dist/Product-7e001b81.js +7 -0
- package/dist/Product-f3f42158.mjs +653 -0
- package/dist/ProductEdit-959b3cd3.mjs +295 -0
- package/dist/ProductEdit-bae5e898.js +1 -0
- package/dist/ProductsBackoffice-0716123f.js +1 -0
- package/dist/ProductsBackoffice-a36ecbc6.mjs +85 -0
- package/dist/ProfileBlogposts-c790d1b2.js +1 -0
- package/dist/ProfileBlogposts-f43cf32e.mjs +79 -0
- package/dist/ProfileEvents-12f80fff.mjs +70 -0
- package/dist/ProfileEvents-585570a3.js +1 -0
- package/dist/ProfileOrganizations-bbc2cf40.mjs +73 -0
- package/dist/ProfileOrganizations-d7103514.js +1 -0
- package/dist/Publics-094f3c2c.mjs +45 -0
- package/dist/Publics-1032c0f4.js +1 -0
- package/dist/Select-11ddabf5.mjs +79 -0
- package/dist/Select-3ca5ab39.js +1 -0
- package/dist/SelectMulti-58704d69.mjs +1038 -0
- package/dist/SelectMulti-c25765cf.js +1 -0
- package/dist/SkeletonBlogpost-95db0fa9.js +1 -0
- package/dist/SkeletonBlogpost-e0621af7.mjs +16 -0
- package/dist/SkeletonEvent-8690422d.mjs +16 -0
- package/dist/SkeletonEvent-eb284de8.js +1 -0
- package/dist/SkeletonEventShort-6c9e3940.js +1 -0
- package/dist/SkeletonEventShort-f030e56f.mjs +16 -0
- package/dist/SkeletonOrganization-5c09cfc5.js +1 -0
- package/dist/SkeletonOrganization-8690422d.mjs +16 -0
- package/dist/Socials-31c06635.mjs +74 -0
- package/dist/Socials-cceaeaf2.js +1 -0
- package/dist/Tab-054b61f7.mjs +46 -0
- package/dist/Tab-2c1e4224.js +1 -0
- package/dist/Tab.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
- package/dist/Tab.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
- package/dist/Upload-06d93178.js +1 -0
- package/dist/Upload-23212d9d.mjs +74 -0
- package/dist/UploadImage-0f488170.js +1 -0
- package/dist/UploadImage-3c627d89.mjs +83 -0
- package/dist/UploadImageMultiple-cb6c7188.mjs +58 -0
- package/dist/UploadImageMultiple-eddaac87.js +1 -0
- package/dist/Wallet-2043b611.mjs +24682 -0
- package/dist/Wallet-8fa7386a.js +55 -0
- package/dist/_plugin-vue_export-helper-dad06003.mjs +9 -0
- package/dist/_plugin-vue_export-helper-f246444f.js +1 -0
- package/dist/auth-56dc2ba7.mjs +607 -0
- package/dist/auth-f018f5b3.js +7 -0
- package/dist/auth.client.cjs +7 -0
- package/dist/auth.client.js +3874 -0
- package/dist/auth.validation-c31a60e7.mjs +24 -0
- package/dist/auth.validation-d049b341.js +1 -0
- package/dist/backoffice.client.cjs +1 -0
- package/dist/backoffice.client.js +265 -0
- package/dist/carousel.es-44c501bc.mjs +383 -0
- package/dist/carousel.es-cdfb392c.js +5 -0
- package/dist/categories-5b08da53.mjs +121 -0
- package/dist/categories-7ccd6be9.js +1 -0
- package/dist/click-outside-0b0727d1.js +2 -0
- package/dist/click-outside-6101836c.mjs +19 -0
- package/dist/community.client.cjs +1 -0
- package/dist/community.client.js +692 -0
- package/dist/dribbble-8e8e169b.js +1 -0
- package/dist/dribbble-ae37c2ac.mjs +127 -0
- package/dist/events.client.cjs +2 -0
- package/dist/events.client.js +8885 -0
- package/dist/files.client.cjs +1 -0
- package/dist/files.client.js +1 -0
- package/dist/gallery-d4297191.mjs +54 -0
- package/dist/gallery-f92912df.js +1 -0
- package/dist/gallery.client.cjs +1 -0
- package/dist/gallery.client.js +18 -0
- package/dist/globals-928eb13c.js +1 -0
- package/dist/globals-96ba60e4.mjs +91 -0
- package/dist/globals.client.cjs +1 -0
- package/dist/globals.client.js +12 -0
- package/dist/icons.client.cjs +1 -0
- package/dist/icons.client.js +84 -0
- package/dist/index-a661083c.mjs +934 -0
- package/dist/index-b41aac19.js +2 -0
- package/dist/inputs.validation-d7cef32b.js +1 -0
- package/dist/inputs.validation-db65277a.mjs +83 -0
- package/dist/landing.client.cjs +1 -0
- package/dist/landing.client.js +111 -0
- package/dist/leftovers-5d1ff88b.mjs +67 -0
- package/dist/leftovers-b60180cf.js +1 -0
- package/dist/legal.client.cjs +1 -0
- package/dist/legal.client.js +8512 -0
- package/dist/memberships-12210953.mjs +68 -0
- package/dist/memberships-393765d8.js +1 -0
- package/dist/middlewares.client.cjs +1 -0
- package/dist/middlewares.client.js +1 -0
- package/dist/orders-13c10d49.mjs +85 -0
- package/dist/orders-37f041aa.js +1 -0
- package/dist/organizations-587d5a4d.mjs +122 -0
- package/dist/organizations-b4d902a2.js +1 -0
- package/dist/organizations.client-35b74e44.mjs +2997 -0
- package/dist/organizations.client-f982f55a.js +3 -0
- package/dist/organizations.client.cjs +1 -0
- package/dist/organizations.client.js +86 -0
- package/dist/products-3c43eb18.js +1 -0
- package/dist/products-943fb95e.mjs +107 -0
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +72 -2
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +2 -72
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +78 -2
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +2 -78
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +75 -93
- 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/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +4 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +61 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -4
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +2 -61
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.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 +2 -2
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.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 +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.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/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 +2 -2
- 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/LeftoverAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/LeftoverAdd.vue.js +1 -1
- 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 +2 -2
- 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.cjs.js +19 -19
- package/dist/prometheus-framework.es.js +2208 -2198
- package/dist/reports-270f69df.js +1 -0
- package/dist/reports-79cd9459.mjs +91 -0
- package/dist/reports.client.cjs +1 -0
- package/dist/reports.client.js +8 -0
- package/dist/states.validation-3b70f83a.js +1 -0
- package/dist/states.validation-944e334c.mjs +13 -0
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -0
- package/dist/users.client.js +632 -0
- package/dist/vue-draggable-next.esm-bundler-21a209c6.js +10 -0
- package/dist/vue-draggable-next.esm-bundler-ff6e3f52.mjs +1557 -0
- package/dist/vuex.esm-bundler-57d8b6ba.mjs +750 -0
- package/dist/vuex.esm-bundler-685cf29f.js +5 -0
- package/package.json +1 -1
- package/src/modules/auth/store/auth.js +20 -20
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue");require("./Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js");const u=["onClick","disabled"],d={key:0},m={key:0,class:"loading"},h=e.createElementVNode("svg",{class:"i-regular",width:"135",height:"140",viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:"#fff"},[e.createElementVNode("rect",{y:"10",width:"15",height:"120",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),e.createElementVNode("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),e.createElementVNode("rect",{x:"60",width:"15",height:"140",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),e.createElementVNode("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),e.createElementVNode("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})])],-1),f=[h],b={key:0,class:"loading t-white"},g={key:0,class:"error"},v={__name:"Button",props:{submit:{type:Function,default:async()=>{console.log("Button click.")}},callback:{type:Function,default:async()=>{console.log("Button callback.")}},callbackDelay:{type:Number,default:750},showSucces:{type:Boolean,default:!0},validation:{type:Boolean,default:!1}},setup(r){const n=r,t=e.ref(null),a=e.ref(null),l=e.ref(!1),o=e.ref(!1);async function s(){t.value.style["pointer-events"]="none",a.value=null,l.value=!0;const i=()=>{t.value&&(t.value.classList.replace("bg-light-main","bg-main"),t.value.style.pointerEvents="auto",l.value=!1,o.value=!1,a.value=null)};try{await n.submit(),t.value.classList.replace("bg-main","bg-light-main"),l.value=!1,n.showSucces?(o.value=!0,setTimeout(i,500)):i(),n.callback&&setTimeout(()=>n.callback(),n.callbackDelay)}catch{t.value.classList.replace("bg-main","bg-fourth-nano"),a.value="โ",setTimeout(()=>{i(),t.value.classList.replace("bg-fourth-nano","bg-main")},1330)}}return(i,c)=>(e.openBlock(),e.createElementBlock("button",{onClick:e.withModifiers(s,["stop"]),disabled:r.validation,ref_key:"button",ref:t,class:"w-100 bg-main button"},[e.createVNode(e.Transition,{name:"TransitionTranslateY-small"},{default:e.withCtx(()=>[!l.value&&!a.value&&!o.value?(e.openBlock(),e.createElementBlock("span",d,[e.renderSlot(i.$slots,"default")])):e.createCommentVNode("",!0)]),_:3}),e.createVNode(e.Transition,{name:"TransitionTranslateY-small"},{default:e.withCtx(()=>[l.value&&!a.value?(e.openBlock(),e.createElementBlock("span",m,f)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"TransitionTranslateY-small"},{default:e.withCtx(()=>[o.value&&r.showSucces?(e.openBlock(),e.createElementBlock("span",b,"โ")):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"TransitionTranslateY-small"},{default:e.withCtx(()=>[a.value?(e.openBlock(),e.createElementBlock("span",g,e.toDisplayString(a.value),1)):e.createCommentVNode("",!0)]),_:1})],8,u))}};exports._sfc_main=v;
|
@@ -0,0 +1,226 @@
|
|
1
|
+
import { ref as c, openBlock as s, createElementBlock as u, withModifiers as p, createVNode as d, Transition as m, withCtx as h, renderSlot as y, createCommentVNode as b, toDisplayString as _, createElementVNode as e, createTextVNode as o } from "vue";
|
2
|
+
import "./Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
3
|
+
const w = ["onClick", "disabled"], k = { key: 0 }, N = {
|
4
|
+
key: 0,
|
5
|
+
class: "loading"
|
6
|
+
}, x = /* @__PURE__ */ e("svg", {
|
7
|
+
class: "i-regular",
|
8
|
+
width: "135",
|
9
|
+
height: "140",
|
10
|
+
viewBox: "0 0 135 140",
|
11
|
+
xmlns: "http://www.w3.org/2000/svg",
|
12
|
+
fill: "#fff"
|
13
|
+
}, [
|
14
|
+
/* @__PURE__ */ e("rect", {
|
15
|
+
y: "10",
|
16
|
+
width: "15",
|
17
|
+
height: "120",
|
18
|
+
rx: "6"
|
19
|
+
}, [
|
20
|
+
/* @__PURE__ */ e("animate", {
|
21
|
+
attributeName: "height",
|
22
|
+
begin: "0.5s",
|
23
|
+
dur: "1s",
|
24
|
+
values: "120;110;100;90;80;70;60;50;40;140;120",
|
25
|
+
calcMode: "linear",
|
26
|
+
repeatCount: "indefinite"
|
27
|
+
}),
|
28
|
+
/* @__PURE__ */ o(),
|
29
|
+
/* @__PURE__ */ e("animate", {
|
30
|
+
attributeName: "y",
|
31
|
+
begin: "0.5s",
|
32
|
+
dur: "1s",
|
33
|
+
values: "10;15;20;25;30;35;40;45;50;0;10",
|
34
|
+
calcMode: "linear",
|
35
|
+
repeatCount: "indefinite"
|
36
|
+
})
|
37
|
+
]),
|
38
|
+
/* @__PURE__ */ e("rect", {
|
39
|
+
x: "30",
|
40
|
+
y: "10",
|
41
|
+
width: "15",
|
42
|
+
height: "120",
|
43
|
+
rx: "6"
|
44
|
+
}, [
|
45
|
+
/* @__PURE__ */ e("animate", {
|
46
|
+
attributeName: "height",
|
47
|
+
begin: "0.25s",
|
48
|
+
dur: "1s",
|
49
|
+
values: "120;110;100;90;80;70;60;50;40;140;120",
|
50
|
+
calcMode: "linear",
|
51
|
+
repeatCount: "indefinite"
|
52
|
+
}),
|
53
|
+
/* @__PURE__ */ o(),
|
54
|
+
/* @__PURE__ */ e("animate", {
|
55
|
+
attributeName: "y",
|
56
|
+
begin: "0.25s",
|
57
|
+
dur: "1s",
|
58
|
+
values: "10;15;20;25;30;35;40;45;50;0;10",
|
59
|
+
calcMode: "linear",
|
60
|
+
repeatCount: "indefinite"
|
61
|
+
})
|
62
|
+
]),
|
63
|
+
/* @__PURE__ */ e("rect", {
|
64
|
+
x: "60",
|
65
|
+
width: "15",
|
66
|
+
height: "140",
|
67
|
+
rx: "6"
|
68
|
+
}, [
|
69
|
+
/* @__PURE__ */ e("animate", {
|
70
|
+
attributeName: "height",
|
71
|
+
begin: "0s",
|
72
|
+
dur: "1s",
|
73
|
+
values: "120;110;100;90;80;70;60;50;40;140;120",
|
74
|
+
calcMode: "linear",
|
75
|
+
repeatCount: "indefinite"
|
76
|
+
}),
|
77
|
+
/* @__PURE__ */ o(),
|
78
|
+
/* @__PURE__ */ e("animate", {
|
79
|
+
attributeName: "y",
|
80
|
+
begin: "0s",
|
81
|
+
dur: "1s",
|
82
|
+
values: "10;15;20;25;30;35;40;45;50;0;10",
|
83
|
+
calcMode: "linear",
|
84
|
+
repeatCount: "indefinite"
|
85
|
+
})
|
86
|
+
]),
|
87
|
+
/* @__PURE__ */ e("rect", {
|
88
|
+
x: "90",
|
89
|
+
y: "10",
|
90
|
+
width: "15",
|
91
|
+
height: "120",
|
92
|
+
rx: "6"
|
93
|
+
}, [
|
94
|
+
/* @__PURE__ */ e("animate", {
|
95
|
+
attributeName: "height",
|
96
|
+
begin: "0.25s",
|
97
|
+
dur: "1s",
|
98
|
+
values: "120;110;100;90;80;70;60;50;40;140;120",
|
99
|
+
calcMode: "linear",
|
100
|
+
repeatCount: "indefinite"
|
101
|
+
}),
|
102
|
+
/* @__PURE__ */ o(),
|
103
|
+
/* @__PURE__ */ e("animate", {
|
104
|
+
attributeName: "y",
|
105
|
+
begin: "0.25s",
|
106
|
+
dur: "1s",
|
107
|
+
values: "10;15;20;25;30;35;40;45;50;0;10",
|
108
|
+
calcMode: "linear",
|
109
|
+
repeatCount: "indefinite"
|
110
|
+
})
|
111
|
+
]),
|
112
|
+
/* @__PURE__ */ e("rect", {
|
113
|
+
x: "120",
|
114
|
+
y: "10",
|
115
|
+
width: "15",
|
116
|
+
height: "120",
|
117
|
+
rx: "6"
|
118
|
+
}, [
|
119
|
+
/* @__PURE__ */ e("animate", {
|
120
|
+
attributeName: "height",
|
121
|
+
begin: "0.5s",
|
122
|
+
dur: "1s",
|
123
|
+
values: "120;110;100;90;80;70;60;50;40;140;120",
|
124
|
+
calcMode: "linear",
|
125
|
+
repeatCount: "indefinite"
|
126
|
+
}),
|
127
|
+
/* @__PURE__ */ o(),
|
128
|
+
/* @__PURE__ */ e("animate", {
|
129
|
+
attributeName: "y",
|
130
|
+
begin: "0.5s",
|
131
|
+
dur: "1s",
|
132
|
+
values: "10;15;20;25;30;35;40;45;50;0;10",
|
133
|
+
calcMode: "linear",
|
134
|
+
repeatCount: "indefinite"
|
135
|
+
})
|
136
|
+
])
|
137
|
+
], -1), C = [
|
138
|
+
x
|
139
|
+
], T = {
|
140
|
+
key: 0,
|
141
|
+
class: "loading t-white"
|
142
|
+
}, M = {
|
143
|
+
key: 0,
|
144
|
+
class: "error"
|
145
|
+
}, L = {
|
146
|
+
__name: "Button",
|
147
|
+
props: {
|
148
|
+
submit: {
|
149
|
+
type: Function,
|
150
|
+
default: async () => {
|
151
|
+
console.log("Button click.");
|
152
|
+
}
|
153
|
+
},
|
154
|
+
callback: {
|
155
|
+
type: Function,
|
156
|
+
default: async () => {
|
157
|
+
console.log("Button callback.");
|
158
|
+
}
|
159
|
+
},
|
160
|
+
callbackDelay: {
|
161
|
+
type: Number,
|
162
|
+
default: 750
|
163
|
+
},
|
164
|
+
showSucces: {
|
165
|
+
type: Boolean,
|
166
|
+
default: !0
|
167
|
+
},
|
168
|
+
validation: {
|
169
|
+
type: Boolean,
|
170
|
+
default: !1
|
171
|
+
}
|
172
|
+
},
|
173
|
+
setup(f) {
|
174
|
+
const i = f, t = c(null), a = c(null), n = c(!1), r = c(!1);
|
175
|
+
async function g() {
|
176
|
+
t.value.style["pointer-events"] = "none", a.value = null, n.value = !0;
|
177
|
+
const l = () => {
|
178
|
+
t.value && (t.value.classList.replace("bg-light-main", "bg-main"), t.value.style.pointerEvents = "auto", n.value = !1, r.value = !1, a.value = null);
|
179
|
+
};
|
180
|
+
try {
|
181
|
+
await i.submit(), t.value.classList.replace("bg-main", "bg-light-main"), n.value = !1, i.showSucces ? (r.value = !0, setTimeout(l, 500)) : l(), i.callback && setTimeout(() => i.callback(), i.callbackDelay);
|
182
|
+
} catch {
|
183
|
+
t.value.classList.replace("bg-main", "bg-fourth-nano"), a.value = "โ", setTimeout(() => {
|
184
|
+
l(), t.value.classList.replace("bg-fourth-nano", "bg-main");
|
185
|
+
}, 1330);
|
186
|
+
}
|
187
|
+
}
|
188
|
+
return (l, v) => (s(), u("button", {
|
189
|
+
onClick: p(g, ["stop"]),
|
190
|
+
disabled: f.validation,
|
191
|
+
ref_key: "button",
|
192
|
+
ref: t,
|
193
|
+
class: "w-100 bg-main button"
|
194
|
+
}, [
|
195
|
+
d(m, { name: "TransitionTranslateY-small" }, {
|
196
|
+
default: h(() => [
|
197
|
+
!n.value && !a.value && !r.value ? (s(), u("span", k, [
|
198
|
+
y(l.$slots, "default")
|
199
|
+
])) : b("", !0)
|
200
|
+
]),
|
201
|
+
_: 3
|
202
|
+
}),
|
203
|
+
d(m, { name: "TransitionTranslateY-small" }, {
|
204
|
+
default: h(() => [
|
205
|
+
n.value && !a.value ? (s(), u("span", N, C)) : b("", !0)
|
206
|
+
]),
|
207
|
+
_: 1
|
208
|
+
}),
|
209
|
+
d(m, { name: "TransitionTranslateY-small" }, {
|
210
|
+
default: h(() => [
|
211
|
+
r.value && f.showSucces ? (s(), u("span", T, "โ")) : b("", !0)
|
212
|
+
]),
|
213
|
+
_: 1
|
214
|
+
}),
|
215
|
+
d(m, { name: "TransitionTranslateY-small" }, {
|
216
|
+
default: h(() => [
|
217
|
+
a.value ? (s(), u("span", M, _(a.value), 1)) : b("", !0)
|
218
|
+
]),
|
219
|
+
_: 1
|
220
|
+
})
|
221
|
+
], 8, w));
|
222
|
+
}
|
223
|
+
};
|
224
|
+
export {
|
225
|
+
L as _
|
226
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1,90 @@
|
|
1
|
+
import { openBlock as u, createBlock as m, withCtx as l, createTextVNode as g, toDisplayString as h } from "vue";
|
2
|
+
import { _ as y } from "./Button-9e1a9284.mjs";
|
3
|
+
import "./auth-56dc2ba7.mjs";
|
4
|
+
import { a as i } from "./memberships-12210953.mjs";
|
5
|
+
const w = {
|
6
|
+
__name: "ButtonToggleMembership",
|
7
|
+
props: {
|
8
|
+
user: {
|
9
|
+
type: String,
|
10
|
+
required: !0
|
11
|
+
},
|
12
|
+
type: {
|
13
|
+
type: String,
|
14
|
+
required: !0
|
15
|
+
},
|
16
|
+
role: {
|
17
|
+
type: String,
|
18
|
+
required: !1
|
19
|
+
},
|
20
|
+
target: {
|
21
|
+
type: String,
|
22
|
+
required: !0
|
23
|
+
},
|
24
|
+
text: {
|
25
|
+
type: Object,
|
26
|
+
default: {
|
27
|
+
create: "join",
|
28
|
+
remove: "leave"
|
29
|
+
}
|
30
|
+
},
|
31
|
+
status: {
|
32
|
+
type: Boolean,
|
33
|
+
required: !0
|
34
|
+
}
|
35
|
+
},
|
36
|
+
emits: ["updateMembership"],
|
37
|
+
setup(a, { emit: o }) {
|
38
|
+
const e = a, p = async () => {
|
39
|
+
e.status ? await n() : await c();
|
40
|
+
};
|
41
|
+
async function c() {
|
42
|
+
try {
|
43
|
+
const t = {
|
44
|
+
user: e.user,
|
45
|
+
type: e.type,
|
46
|
+
role: e.role,
|
47
|
+
target: e.target
|
48
|
+
}, r = await i.create(t);
|
49
|
+
o("updateMembership", {
|
50
|
+
membership: r,
|
51
|
+
target: e.target,
|
52
|
+
status: !0
|
53
|
+
});
|
54
|
+
} catch (t) {
|
55
|
+
throw console.log(t), t;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
async function n(t) {
|
59
|
+
const r = {
|
60
|
+
user: e.user,
|
61
|
+
type: e.type,
|
62
|
+
role: e.role,
|
63
|
+
target: e.target
|
64
|
+
};
|
65
|
+
try {
|
66
|
+
const s = await i.delete(r);
|
67
|
+
o("updateMembership", {
|
68
|
+
membership: s,
|
69
|
+
target: e.target,
|
70
|
+
status: !1
|
71
|
+
});
|
72
|
+
} catch (s) {
|
73
|
+
throw console.log(s), s;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
return (t, r) => (u(), m(y, {
|
77
|
+
submit: p,
|
78
|
+
showSucces: !1,
|
79
|
+
class: "button-small button"
|
80
|
+
}, {
|
81
|
+
default: l(() => [
|
82
|
+
g(h(a.status ? e.text.remove : e.text.create), 1)
|
83
|
+
]),
|
84
|
+
_: 1
|
85
|
+
}));
|
86
|
+
}
|
87
|
+
};
|
88
|
+
export {
|
89
|
+
w as _
|
90
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const r=require("vue"),m=require("./Button-7643c9aa.js");require("./auth-f018f5b3.js");const c=require("./memberships-393765d8.js"),l={__name:"ButtonToggleMembership",props:{user:{type:String,required:!0},type:{type:String,required:!0},role:{type:String,required:!1},target:{type:String,required:!0},text:{type:Object,default:{create:"join",remove:"leave"}},status:{type:Boolean,required:!0}},emits:["updateMembership"],setup(o,{emit:i}){const e=o,u=async()=>{e.status?await p():await n()};async function n(){try{const t={user:e.user,type:e.type,role:e.role,target:e.target},s=await c.actions.create(t);i("updateMembership",{membership:s,target:e.target,status:!0})}catch(t){throw console.log(t),t}}async function p(t){const s={user:e.user,type:e.type,role:e.role,target:e.target};try{const a=await c.actions.delete(s);i("updateMembership",{membership:a,target:e.target,status:!1})}catch(a){throw console.log(a),a}}return(t,s)=>(r.openBlock(),r.createBlock(m._sfc_main,{submit:u,showSucces:!1,class:"button-small button"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(o.status?e.text.remove:e.text.create),1)]),_:1}))}};exports._sfc_main=l;
|
@@ -0,0 +1,246 @@
|
|
1
|
+
import { a as C } from "./index-a661083c.mjs";
|
2
|
+
import { reactive as j, watch as E, ref as w, openBlock as r, createElementBlock as c, createTextVNode as k, toDisplayString as i, createElementVNode as f, createCommentVNode as n, computed as P, createBlock as x, withModifiers as I, createVNode as $, normalizeClass as B, unref as m, renderSlot as S } from "vue";
|
3
|
+
import { s as v } from "./globals-96ba60e4.mjs";
|
4
|
+
import { a as R, _ as z, b as N } from "./Chips-f1a0d085.mjs";
|
5
|
+
import { useRouter as T } from "vue-router";
|
6
|
+
import { I as V } from "./IconEdit-9edfd74d.mjs";
|
7
|
+
const b = C.create({ baseURL: process.env.API_URL, withCredentials: !0 });
|
8
|
+
b.defaults.withCredentials = !0;
|
9
|
+
const u = j({
|
10
|
+
all: [],
|
11
|
+
filter: {
|
12
|
+
// query
|
13
|
+
tags: [],
|
14
|
+
period: ""
|
15
|
+
// pagination
|
16
|
+
},
|
17
|
+
pagination: {
|
18
|
+
page: 1,
|
19
|
+
perPage: 18
|
20
|
+
},
|
21
|
+
// Sort
|
22
|
+
sort: {
|
23
|
+
current: "popularity",
|
24
|
+
ascending: !1
|
25
|
+
},
|
26
|
+
current: {
|
27
|
+
_id: "",
|
28
|
+
url: "",
|
29
|
+
status: "",
|
30
|
+
name: "",
|
31
|
+
tags: [],
|
32
|
+
owner: {},
|
33
|
+
date: "",
|
34
|
+
views: 0,
|
35
|
+
content: []
|
36
|
+
}
|
37
|
+
});
|
38
|
+
async function L(e = {}) {
|
39
|
+
e.params = e.params || {}, e.params.skip = e.skip || 0, e.params.limit = e.limit || 9, e.params.tags = e.tags || [], e.period && (e.params.period = e.period), e.url && (e.params = { url: e.url }), e.category && (e.params.category = e.category), e.owner && (e.params.owner = e.owner), e.following && (e.params.following = e.following), e.creator && (e.params.creator = e.creator), e.status && (e.params.status = e.status), e.user && (e.params.user = e.user), e.params.skip = e.skip || 0, e.params.limit = e.limit || 10;
|
40
|
+
try {
|
41
|
+
console.log("Request params:" + e.params);
|
42
|
+
const t = await b.get("/api/blog/read", { params: e.params });
|
43
|
+
return e.url ? p(t.data, "current") : p(t.data, "all"), Promise.resolve(t.data);
|
44
|
+
} catch (t) {
|
45
|
+
return v(t), Promise.reject(t);
|
46
|
+
}
|
47
|
+
}
|
48
|
+
async function O(e) {
|
49
|
+
return b.post("/api/blog/create", e).then(
|
50
|
+
(t) => (p(t.data, "current"), Promise.resolve(t.data)),
|
51
|
+
(t) => (v(t), Promise.reject(t))
|
52
|
+
);
|
53
|
+
}
|
54
|
+
async function U(e) {
|
55
|
+
return b.post("/api/blog/update", e).then(
|
56
|
+
(t) => (p(t.data, "current"), Promise.resolve(t.data)),
|
57
|
+
(t) => (v(t), Promise.reject(t))
|
58
|
+
);
|
59
|
+
}
|
60
|
+
async function A(e) {
|
61
|
+
return await b.delete(`/api/blog/delete/${e}`).then(
|
62
|
+
(t) => {
|
63
|
+
const l = u.all.findIndex((s) => s._id === e);
|
64
|
+
return l !== -1 && u.all.splice(l, 1), Promise.resolve(t.data);
|
65
|
+
},
|
66
|
+
(t) => (v(t), Promise.reject(t))
|
67
|
+
);
|
68
|
+
}
|
69
|
+
function p(e, t) {
|
70
|
+
u[t] = e;
|
71
|
+
}
|
72
|
+
function F() {
|
73
|
+
u.current = {
|
74
|
+
_id: "",
|
75
|
+
url: "",
|
76
|
+
status: "",
|
77
|
+
name: "",
|
78
|
+
tags: [],
|
79
|
+
author: "",
|
80
|
+
owner: "",
|
81
|
+
date: "",
|
82
|
+
views: 0,
|
83
|
+
content: []
|
84
|
+
};
|
85
|
+
}
|
86
|
+
function M(e) {
|
87
|
+
const t = {
|
88
|
+
order: u.project.content.length + 1,
|
89
|
+
type: e.type,
|
90
|
+
data: e.data,
|
91
|
+
class: e.class,
|
92
|
+
content: e.content
|
93
|
+
};
|
94
|
+
u.project.content.push(t);
|
95
|
+
}
|
96
|
+
E(u, (e, t) => {
|
97
|
+
});
|
98
|
+
const oe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
99
|
+
__proto__: null,
|
100
|
+
blockAdd: M,
|
101
|
+
clean: F,
|
102
|
+
create: O,
|
103
|
+
read: L,
|
104
|
+
remove: A,
|
105
|
+
set: p,
|
106
|
+
state: u,
|
107
|
+
update: U
|
108
|
+
}, Symbol.toStringTag, { value: "Module" })), q = { class: "t-semi br-top-dark flex-nowrap flex-nojustify flex" }, D = /* @__PURE__ */ f("span", { class: "mn-r-small mn-l-small d-block" }, "ยท", -1), G = { class: "cursor-pointer" }, H = /* @__PURE__ */ f("span", { class: "mn-r-small mn-l-small d-block" }, "ยท", -1), J = {
|
109
|
+
__name: "FooterBlogpost",
|
110
|
+
props: ["blogpost", "owner", "user"],
|
111
|
+
setup(e) {
|
112
|
+
const t = e, l = w(t.blogpost.numberOfReactions), s = w(t.blogpost.isReacted), d = w(t.blogpost.reactionId);
|
113
|
+
async function o(y) {
|
114
|
+
if (!t.user) {
|
115
|
+
alert("Please login to add a reaction");
|
116
|
+
return;
|
117
|
+
}
|
118
|
+
try {
|
119
|
+
const a = {
|
120
|
+
target: t.blogpost._id,
|
121
|
+
type: "blogpost",
|
122
|
+
user: t.user,
|
123
|
+
class: "like"
|
124
|
+
}, h = await R.create(a);
|
125
|
+
h.reaction.class === "like" && (l.value += 1, s.value = !0, d.value = h.reaction._id);
|
126
|
+
} catch (a) {
|
127
|
+
console.error(a), alert("Error adding reaction. Please try again later.");
|
128
|
+
}
|
129
|
+
}
|
130
|
+
async function g(y) {
|
131
|
+
if (!t.user) {
|
132
|
+
alert("Please login to add a reaction");
|
133
|
+
return;
|
134
|
+
}
|
135
|
+
try {
|
136
|
+
const a = { _id: d.value };
|
137
|
+
await R.delete(a), l.value -= 1, s.value = !1, d.value = null;
|
138
|
+
} catch {
|
139
|
+
alert("Error adding reaction. Please try again later.");
|
140
|
+
}
|
141
|
+
}
|
142
|
+
return (y, a) => (r(), c("footer", q, [
|
143
|
+
k(" ๐๏ธ " + i(e.blogpost.views) + " ", 1),
|
144
|
+
D,
|
145
|
+
f("div", G, [
|
146
|
+
s.value ? n("", !0) : (r(), c("div", {
|
147
|
+
key: 0,
|
148
|
+
class: "cursor-pointer",
|
149
|
+
onClick: a[0] || (a[0] = (h) => o())
|
150
|
+
}, " ๐ " + i(l.value), 1)),
|
151
|
+
s.value ? (r(), c("div", {
|
152
|
+
key: 1,
|
153
|
+
class: "cursor-pointer",
|
154
|
+
onClick: a[1] || (a[1] = (h) => g())
|
155
|
+
}, " ๐ " + i(l.value), 1)) : n("", !0)
|
156
|
+
]),
|
157
|
+
H,
|
158
|
+
k(" ๐ฌ " + i(e.blogpost.numberOfComments), 1)
|
159
|
+
]));
|
160
|
+
}
|
161
|
+
}, K = { class: "pos-relative bg-grey radius-big" }, Q = ["src"], W = { class: "pd-t-zero pd-medium" }, X = {
|
162
|
+
key: 0,
|
163
|
+
class: "cursor-pointer mn-thin flex-nowrap flex w-100"
|
164
|
+
}, Y = {
|
165
|
+
key: 0,
|
166
|
+
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"
|
167
|
+
}, Z = {
|
168
|
+
key: 1,
|
169
|
+
class: "mn-small t-transp p-big"
|
170
|
+
}, _ = {
|
171
|
+
key: 2,
|
172
|
+
class: "mn-small h2"
|
173
|
+
}, ne = {
|
174
|
+
__name: "CardBlogpost",
|
175
|
+
props: ["blogpost", "user", "type"],
|
176
|
+
setup(e) {
|
177
|
+
const t = e, l = T(), s = P(() => t.blogpost.content.find((o) => o.type === "ImageUpload")), d = P(() => t.blogpost.content.find((o) => o.type === "Textarea"));
|
178
|
+
return (o, g) => (r(), c("article", K, [
|
179
|
+
e.user && e.user === e.blogpost.creator.target._id ? (r(), x(V, {
|
180
|
+
key: 0,
|
181
|
+
onClick: g[0] || (g[0] = I((y) => o.$router.push({
|
182
|
+
name: "Edit BlogPost",
|
183
|
+
params: {
|
184
|
+
url: e.blogpost.url
|
185
|
+
}
|
186
|
+
}), ["stop"])),
|
187
|
+
class: "z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"
|
188
|
+
})) : n("", !0),
|
189
|
+
$(z, {
|
190
|
+
class: B({
|
191
|
+
"mn-small pd-medium": e.type !== "short",
|
192
|
+
"flex-child-order-last flex-child mn-l-small": e.type === "short"
|
193
|
+
}),
|
194
|
+
entity: e.blogpost,
|
195
|
+
entityType: "blogpost",
|
196
|
+
user: e.user,
|
197
|
+
owner: e.blogpost.owner,
|
198
|
+
creator: e.blogpost.creator,
|
199
|
+
date: e.blogpost.createdAt
|
200
|
+
}, null, 8, ["class", "entity", "user", "owner", "creator", "date"]),
|
201
|
+
m(s) && m(s).content && e.type !== "blogpostPage" ? (r(), c("img", {
|
202
|
+
key: 1,
|
203
|
+
src: (o.FILE_SERVER_URL || "") + m(s).content,
|
204
|
+
alt: "Blog post image",
|
205
|
+
class: "mn-medium object-fit-cover w-100 h-20r"
|
206
|
+
}, null, 8, Q)) : n("", !0),
|
207
|
+
f("section", W, [
|
208
|
+
e.type !== "blogpostPage" ? (r(), c("div", X, [
|
209
|
+
f("h3", {
|
210
|
+
onClick: g[1] || (g[1] = (y) => m(l).push({
|
211
|
+
name: "BlogPost",
|
212
|
+
params: {
|
213
|
+
url: e.blogpost.url
|
214
|
+
}
|
215
|
+
})),
|
216
|
+
class: ""
|
217
|
+
}, i(e.blogpost.name), 1),
|
218
|
+
e.blogpost.status === "draft" ? (r(), c("div", Y, i(e.blogpost.status), 1)) : n("", !0)
|
219
|
+
])) : n("", !0),
|
220
|
+
m(d) && m(d).content && e.type !== "blogpostPage" ? (r(), c("p", Z, i(m(d).content.slice(0, 120)) + "... ", 1)) : n("", !0),
|
221
|
+
e.type === "blogpostPage" ? (r(), c("h3", _, i(e.blogpost.name), 1)) : n("", !0),
|
222
|
+
S(o.$slots, "default"),
|
223
|
+
e.type !== "short" && e.blogpost.tags.length > 0 ? (r(), x(N, {
|
224
|
+
key: 3,
|
225
|
+
chips: e.blogpost.tags
|
226
|
+
}, null, 8, ["chips"])) : n("", !0)
|
227
|
+
]),
|
228
|
+
$(J, {
|
229
|
+
class: "pd-t-zero pd-medium",
|
230
|
+
blogpost: e.blogpost,
|
231
|
+
user: e.user
|
232
|
+
}, null, 8, ["blogpost", "user"])
|
233
|
+
]));
|
234
|
+
}
|
235
|
+
};
|
236
|
+
export {
|
237
|
+
ne as _,
|
238
|
+
A as a,
|
239
|
+
O as b,
|
240
|
+
F as c,
|
241
|
+
J as d,
|
242
|
+
oe as e,
|
243
|
+
L as r,
|
244
|
+
u as s,
|
245
|
+
U as u
|
246
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const B=require("./index-b41aac19.js"),t=require("vue"),f=require("./globals-928eb13c.js"),p=require("./Chips-0fdb31c9.js"),E=require("vue-router"),P=require("./IconEdit-c0469b45.js"),d=B.axios.create({baseURL:process.env.API_URL,withCredentials:!0});d.defaults.withCredentials=!0;const n=t.reactive({all:[],filter:{tags:[],period:""},pagination:{page:1,perPage:18},sort:{current:"popularity",ascending:!1},current:{_id:"",url:"",status:"",name:"",tags:[],owner:{},date:"",views:0,content:[]}});async function y(e={}){e.params=e.params||{},e.params.skip=e.skip||0,e.params.limit=e.limit||9,e.params.tags=e.tags||[],e.period&&(e.params.period=e.period),e.url&&(e.params={url:e.url}),e.category&&(e.params.category=e.category),e.owner&&(e.params.owner=e.owner),e.following&&(e.params.following=e.following),e.creator&&(e.params.creator=e.creator),e.status&&(e.params.status=e.status),e.user&&(e.params.user=e.user),e.params.skip=e.skip||0,e.params.limit=e.limit||10;try{console.log("Request params:"+e.params);const r=await d.get("/api/blog/read",{params:e.params});return e.url?u(r.data,"current"):u(r.data,"all"),Promise.resolve(r.data)}catch(r){return f.setError(r),Promise.reject(r)}}async function b(e){return d.post("/api/blog/create",e).then(r=>(u(r.data,"current"),Promise.resolve(r.data)),r=>(f.setError(r),Promise.reject(r)))}async function k(e){return d.post("/api/blog/update",e).then(r=>(u(r.data,"current"),Promise.resolve(r.data)),r=>(f.setError(r),Promise.reject(r)))}async function h(e){return await d.delete(`/api/blog/delete/${e}`).then(r=>{const o=n.all.findIndex(s=>s._id===e);return o!==-1&&n.all.splice(o,1),Promise.resolve(r.data)},r=>(f.setError(r),Promise.reject(r)))}function u(e,r){n[r]=e}function v(){n.current={_id:"",url:"",status:"",name:"",tags:[],author:"",owner:"",date:"",views:0,content:[]}}function C(e){const r={order:n.project.content.length+1,type:e.type,data:e.data,class:e.class,content:e.content};n.project.content.push(r)}t.watch(n,(e,r)=>{});const x=Object.freeze(Object.defineProperty({__proto__:null,blockAdd:C,clean:v,create:b,read:y,remove:h,set:u,state:n,update:k},Symbol.toStringTag,{value:"Module"})),N={class:"t-semi br-top-dark flex-nowrap flex-nojustify flex"},V=t.createElementVNode("span",{class:"mn-r-small mn-l-small d-block"},"ยท",-1),$={class:"cursor-pointer"},S=t.createElementVNode("span",{class:"mn-r-small mn-l-small d-block"},"ยท",-1),w={__name:"FooterBlogpost",props:["blogpost","owner","user"],setup(e){const r=e,o=t.ref(r.blogpost.numberOfReactions),s=t.ref(r.blogpost.isReacted),c=t.ref(r.blogpost.reactionId);async function l(m){if(!r.user){alert("Please login to add a reaction");return}try{const a={target:r.blogpost._id,type:"blogpost",user:r.user,class:"like"},g=await p.actions.create(a);g.reaction.class==="like"&&(o.value+=1,s.value=!0,c.value=g.reaction._id)}catch(a){console.error(a),alert("Error adding reaction. Please try again later.")}}async function i(m){if(!r.user){alert("Please login to add a reaction");return}try{const a={_id:c.value};await p.actions.delete(a),o.value-=1,s.value=!1,c.value=null}catch{alert("Error adding reaction. Please try again later.")}}return(m,a)=>(t.openBlock(),t.createElementBlock("footer",N,[t.createTextVNode(" ๐๏ธ "+t.toDisplayString(e.blogpost.views)+" ",1),V,t.createElementVNode("div",$,[s.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:"cursor-pointer",onClick:a[0]||(a[0]=g=>l())}," ๐ "+t.toDisplayString(o.value),1)),s.value?(t.openBlock(),t.createElementBlock("div",{key:1,class:"cursor-pointer",onClick:a[1]||(a[1]=g=>i())}," ๐ "+t.toDisplayString(o.value),1)):t.createCommentVNode("",!0)]),S,t.createTextVNode(" ๐ฌ "+t.toDisplayString(e.blogpost.numberOfComments),1)]))}},R={class:"pos-relative bg-grey radius-big"},j=["src"],I={class:"pd-t-zero pd-medium"},q={key:0,class:"cursor-pointer mn-thin flex-nowrap flex w-100"},D={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"},T={key:1,class:"mn-small t-transp p-big"},z={key:2,class:"mn-small h2"},L={__name:"CardBlogpost",props:["blogpost","user","type"],setup(e){const r=e,o=E.useRouter(),s=t.computed(()=>r.blogpost.content.find(l=>l.type==="ImageUpload")),c=t.computed(()=>r.blogpost.content.find(l=>l.type==="Textarea"));return(l,i)=>(t.openBlock(),t.createElementBlock("article",R,[e.user&&e.user===e.blogpost.creator.target._id?(t.openBlock(),t.createBlock(P.IconEdit,{key:0,onClick:i[0]||(i[0]=t.withModifiers(m=>l.$router.push({name:"Edit BlogPost",params:{url:e.blogpost.url}}),["stop"])),class:"z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):t.createCommentVNode("",!0),t.createVNode(p._sfc_main,{class:t.normalizeClass({"mn-small pd-medium":e.type!=="short","flex-child-order-last flex-child mn-l-small":e.type==="short"}),entity:e.blogpost,entityType:"blogpost",user:e.user,owner:e.blogpost.owner,creator:e.blogpost.creator,date:e.blogpost.createdAt},null,8,["class","entity","user","owner","creator","date"]),t.unref(s)&&t.unref(s).content&&e.type!=="blogpostPage"?(t.openBlock(),t.createElementBlock("img",{key:1,src:(l.FILE_SERVER_URL||"")+t.unref(s).content,alt:"Blog post image",class:"mn-medium object-fit-cover w-100 h-20r"},null,8,j)):t.createCommentVNode("",!0),t.createElementVNode("section",I,[e.type!=="blogpostPage"?(t.openBlock(),t.createElementBlock("div",q,[t.createElementVNode("h3",{onClick:i[1]||(i[1]=m=>t.unref(o).push({name:"BlogPost",params:{url:e.blogpost.url}})),class:""},t.toDisplayString(e.blogpost.name),1),e.blogpost.status==="draft"?(t.openBlock(),t.createElementBlock("div",D,t.toDisplayString(e.blogpost.status),1)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.unref(c)&&t.unref(c).content&&e.type!=="blogpostPage"?(t.openBlock(),t.createElementBlock("p",T,t.toDisplayString(t.unref(c).content.slice(0,120))+"... ",1)):t.createCommentVNode("",!0),e.type==="blogpostPage"?(t.openBlock(),t.createElementBlock("h3",z,t.toDisplayString(e.blogpost.name),1)):t.createCommentVNode("",!0),t.renderSlot(l.$slots,"default"),e.type!=="short"&&e.blogpost.tags.length>0?(t.openBlock(),t.createBlock(p._sfc_main$1,{key:3,chips:e.blogpost.tags},null,8,["chips"])):t.createCommentVNode("",!0)]),t.createVNode(w,{class:"pd-t-zero pd-medium",blogpost:e.blogpost,user:e.user},null,8,["blogpost","user"])]))}};exports._sfc_main=L;exports._sfc_main$1=w;exports.blogposts=x;exports.clean=v;exports.create=b;exports.read=y;exports.remove=h;exports.state=n;exports.update=k;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue"),a=require("vue-router"),u=require("./ButtonToggleMembership-b9352cec.js");const h={class:"flex-stretch flex-nojustify flex-nowrap flex shop-cart-item"},g=["src"],p={key:1,width:"524",height:"345",viewBox:"0 0 524 345",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"i-extra"},f=e.createElementVNode("rect",{width:"524",height:"345",fill:"white"},null,-1),k=e.createElementVNode("rect",{width:"524",height:"345",fill:"white"},null,-1),x=e.createElementVNode("circle",{cx:"262",cy:"172",r:"56",fill:"#00ff88","fill-opacity":"0.1"},null,-1),v=e.createElementVNode("path",{fill:"#00ff88",d:"M229.348 186.819C230.243 191.884 233.393 194.231 238.458 193.273V193.644C238.458 198.832 241.206 201.581 246.364 201.581H291.545C296.733 201.581 299.481 198.74 299.481 193.644V162.576C299.481 157.481 296.733 154.64 291.545 154.64H285.677L284.071 145.653C283.175 140.619 279.995 138.303 274.899 139.198L230.398 147.043C225.302 147.969 223.048 151.15 223.943 156.246L229.348 186.819ZM230.83 186.479L225.456 156.06C224.715 151.86 226.537 149.266 230.737 148.525L275.084 140.712C279.13 140.001 281.848 141.762 282.62 145.993L284.102 154.64H246.364C241.206 154.64 238.458 157.419 238.458 162.576V191.729L238.365 191.76C234.165 192.532 231.571 190.679 230.83 186.479ZM239.971 162.669C239.971 158.376 242.164 156.153 246.456 156.153H291.483C295.59 156.153 297.968 158.376 297.968 162.669V190.093L284.565 177.894C283.145 176.597 281.662 175.856 279.809 175.856C277.987 175.856 276.628 176.566 275.146 177.863L262.052 189.073L257.142 184.565C255.875 183.36 254.764 182.743 253.158 182.743C251.675 182.743 250.656 183.36 249.39 184.503L239.971 193.212V162.669ZM257.636 178.419C261.373 178.419 264.43 175.3 264.43 171.471C264.43 167.734 261.373 164.584 257.636 164.584C253.806 164.584 250.718 167.734 250.718 171.471C250.718 175.3 253.806 178.419 257.636 178.419Z"},null,-1),b=[f,k,x,v],E={class:"text-left"},V={class:"name"},w={key:0,class:"t-transp"},C={key:1,class:"t-transp"},y={key:2,class:"t-transp"},N={class:"t-main t-demi price mn-small"},B={key:0},$={key:0,class:"flex-nojustify flex"},z={class:"flex-nowrap flex"},_=e.createElementVNode("svg",{fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"clip-rule":"evenodd",d:"m7.27124 0h5.45456c1.0041 0 1.8182.814027 1.8182 1.81818v.90899h2.7278c1.0042 0 1.8182.81402 1.8182 1.81818v1.81818c0 1.00415-.814 1.81818-1.8182 1.81818h-.0735l-.8363 10.00009c0 1.0042-.814 1.8182-1.8182 1.8182h-9.09087c-1.00416 0-1.81818-.814-1.81504-1.7427l-.83964-10.07559h-.07187c-1.00415 0-1.818177-.81403-1.818177-1.81818v-1.81818c0-1.00416.814027-1.81818 1.818177-1.81818h2.72668v-.90899c0-1.004153.81402-1.81818 1.81818-1.81818zm-1.81889 18.1819-.83047-10h10.75152l-.827 9.9245-.0031.0755zm-2.72612-11.81799v-1.81818h14.54547v1.81818zm10.00137-4.54571v.90909h-5.45456v-.90909z",fill:"#8a8a8a","fill-rule":"evenodd"})],-1),S=[_],L={__name:"CardOrderItem",props:{product:Object,editable:String,increase:Function,decrease:Function,remove:Function},setup(t){return a.useRouter(),(o,n)=>(e.openBlock(),e.createElementBlock("div",h,[t.product.images[0]?(e.openBlock(),e.createElementBlock("img",{key:0,class:"bg-grey aspect-1x1",src:(o.FILE_SERVER_URL||"")+t.product.images[0]},null,8,g)):e.createCommentVNode("",!0),t.product.images[0]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("svg",p,b)),e.createElementVNode("div",E,[e.createElementVNode("p",V,[e.createTextVNode(e.toDisplayString(t.product.name)+" ",1),t.product.size?(e.openBlock(),e.createElementBlock("span",w,", "+e.toDisplayString(t.product.size),1)):e.createCommentVNode("",!0),typeof t.product.color=="string"&&t.product.size?(e.openBlock(),e.createElementBlock("span",C,", ")):e.createCommentVNode("",!0),typeof t.product.color=="string"?(e.openBlock(),e.createElementBlock("span",y,e.toDisplayString(t.product.color),1)):e.createCommentVNode("",!0)]),e.createElementVNode("p",N,[t.editable?(e.openBlock(),e.createElementBlock("span",B,e.toDisplayString(t.product.quantity)+" x ",1)):e.createCommentVNode("",!0),e.createTextVNode(e.toDisplayString(t.product.price)+" "+e.toDisplayString(o.returnCurrency()),1)]),t.editable?(e.openBlock(),e.createElementBlock("div",$,[e.createElementVNode("div",z,[e.createElementVNode("button",{onClick:n[0]||(n[0]=r=>t.decrease(t.product)),class:"mn-r-thin bg-grey button-square button"},"-"),e.createElementVNode("button",{onClick:n[1]||(n[1]=r=>t.increase(t.product)),class:"mn-r-thin bg-grey button-square button"},"+")]),e.createElementVNode("button",{onClick:n[2]||(n[2]=r=>t.remove(t.product)),class:"hover_br-transp hover_br-l-dark bg-transp button-square button"},S)])):e.createCommentVNode("",!0)])]))}},T={key:0,class:"cursor-pointer t-second"},c={__name:"Text",props:{maxLen:{type:Number,required:!0},text:{type:String,required:!0},showToggleText:{type:Boolean,default:!1}},setup(t){const o=t,n=e.ref(!1),r=e.computed(()=>o.text.length>o.maxLen?o.text.slice(0,o.maxLen)+"...":o.text),i=e.computed(()=>o.text),l=()=>{n.value=!n.value},s=e.computed(()=>n.value?i.value:r.value),d=e.computed(()=>o.text.length>o.maxLen),m=e.computed(()=>n.value?"Hide":"Show more");return(ne,oe)=>(e.openBlock(),e.createElementBlock("span",{onClick:l,class:""},[e.createTextVNode(e.toDisplayString(e.unref(s))+" ",1),e.unref(d)&&t.showToggleText?(e.openBlock(),e.createElementBlock("span",T,e.toDisplayString(e.unref(m)),1)):e.createCommentVNode("",!0)]))}},D={class:"pd-medium flex-v-center flex-nowrap flex"},M=["src"],q={key:1,class:"h-4r w-4r radius-extra",width:"42",height:"42",viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F=e.createElementVNode("circle",{fill:"rgb(var(--main))",cx:"21",cy:"21",r:"21"},null,-1),O=e.createElementVNode("path",{fill:"#242424","fill-opacity":"0.1","fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00233 37.4954C8.00078 37.4458 8 37.3961 8 37.3462C8 32.9066 11.5673 29.3077 15.9677 29.3077H26.0323C30.4328 29.3077 34 32.9066 34 37.3462C34 37.3961 33.9992 37.4458 33.9977 37.4954C30.4223 40.3165 25.9078 42 21 42C16.0922 42 11.5777 40.3164 8.00233 37.4954ZM21 9C16.5995 9 13.0323 12.5989 13.0323 17.0385C13.0323 21.478 16.5995 25.0769 21 25.0769C25.4005 25.0769 28.9677 21.478 28.9677 17.0385C28.9677 12.5989 25.4005 9 21 9Z"},null,-1),R=[F,O],H={class:"flex-child-1 flex-child mn-l-small w-100"},Z={class:"h3 mn-r-semi mn-thin"},U={key:0,class:"w-max star-container flex-v-center flex"},j={class:"mn-r-thin pd-r-thin pd-l-thin pd-micro radius-small t-semi uppercase bg-main p-small"},I=["src"],P={class:"p-small t-semi mn-r-thin"},A={class:"p-small"},G={class:"mn-thin"},J={key:0,class:"pd-medium"},K={class:"mn-small w-100 flex-nowrap flex flex-v-center pd-small bg-white radius-medium"},Q={class:"t-black p-medium t-semi"},W=e.createElementVNode("span",{class:"mn-r-small"},"30-60min",-1),X=e.createElementVNode("span",{class:"mn-r-auto"},"$50 min",-1),Y={class:"d-block o-scroll flex-nowrap flex"},ee=e.createElementVNode("button",{class:"flex-center flex-nowrap flex shop-cart-item pd-thin radius-medium w-15r bg-main button"},"View menu",-1),te={__name:"CardOrganization",props:{user:String,organization:Object},emits:["updateMembership"],setup(t,{emit:o}){return a.useRouter(),(n,r)=>{var i;return e.openBlock(),e.createElementBlock("div",{class:"bg-grey radius-big o-hidden",onClick:r[1]||(r[1]=l=>n.$router.push({name:"Organization",params:{_id:t.organization._id}}))},[e.createElementVNode("div",D,[t.organization.profile.photo&&t.organization.profile.photo.length>0?(e.openBlock(),e.createElementBlock("img",{key:0,src:(n.FILE_SERVER_URL||"")+t.organization.profile.photo,class:"h-4r w-4r radius-extra bg-white"},null,8,M)):(e.openBlock(),e.createElementBlock("svg",q,R)),e.createElementVNode("div",H,[e.createElementVNode("p",Z,[e.createVNode(c,{text:t.organization.profile.name?t.organization.profile.name:"",maxLen:16},null,8,["text"])]),t.organization.ratingS?(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("span",j,e.toDisplayString(t.organization.types[0]),1),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(5,l=>e.createElementVNode("img",{class:"i-small mn-r-thin",src:l<=t.organization.rating.median?"/icons/star.svg":"/icons/star-stroke.svg"},null,8,I)),64)),e.createElementVNode("span",P,e.toDisplayString(t.organization.rating.median),1),e.createElementVNode("span",A,"("+e.toDisplayString(t.organization.rating.amount)+")",1)])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createElementVNode("p",G,e.toDisplayString(t.organization.numberOfSubscribers)+" followers",1),(i=t.user)!=null&&i._id&&t.organization.owner!==t.user._id?(e.openBlock(),e.createBlock(u._sfc_main,{key:0,user:t.user._id,type:"organization",role:"subscriber",target:t.organization._id,status:t.organization.isSubscriber,text:{create:"Follow",remove:"Unfollow"},onUpdateMembership:r[0]||(r[0]=l=>n.handleMembershipUpdate(l,"isSubscriber","numberOfSubscribers")),class:"w-min"},null,8,["user","target","status"])):e.createCommentVNode("",!0)])])]),t.organization.products.length>0?(e.openBlock(),e.createElementBlock("div",J,[e.createElementVNode("div",K,[e.createElementVNode("p",Q,e.toDisplayString(t.organization.products.length)+" items: ",1),W,X]),e.createElementVNode("div",Y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.organization.products,l=>(e.openBlock(),e.createBlock(L,{onClick:e.withModifiers(s=>n.$router.push({name:"Product Organization",params:{_id:t.organization._id,product:l._id}}),["stop"]),key:l._id,editable:!1,product:l,class:"pd-thin radius-medium w-15r br-solid br-grey br-1px bg-white mn-r-thin"},null,8,["onClick","product"]))),128)),ee])])):e.createCommentVNode("",!0)])}}};exports._sfc_main=te;exports._sfc_main$1=c;
|