@ozdao/prometheus-framework 0.2.116 → 0.2.118

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  2. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +1 -58
  3. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
  4. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +58 -1
  5. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  6. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
  7. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +73 -1
  9. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +1 -73
  11. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/components/Select/Select.vue.js +103 -1
  13. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  14. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +1 -103
  15. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  17. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  19. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  21. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  23. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
  24. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +66 -0
  25. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
  26. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +0 -66
  27. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  29. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  31. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  33. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  35. package/dist/prometheus-framework/src/modules/events/components/sections/FeaturedEvents.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/events/components/sections/FeaturedEvents.vue.js +1 -1
  37. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  39. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  41. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/icons/navigation/IconChevronBottom.vue.cjs +1 -0
  44. package/dist/prometheus-framework/src/modules/icons/navigation/IconChevronBottom.vue.js +30 -0
  45. package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.cjs +1 -0
  46. package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.js +98 -0
  47. package/dist/prometheus-framework/src/modules/landing/landing.client.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/landing/landing.client.js +6 -4
  49. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  51. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
  53. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  57. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  59. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  61. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  63. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  65. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  69. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  71. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  73. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  75. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  77. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  79. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
  81. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  85. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  87. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  89. package/dist/prometheus-framework/src/modules/users/components/sections/FeaturedUsers.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/users/components/sections/FeaturedUsers.vue.js +20 -20
  91. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
  93. package/dist/style.css +1 -1
  94. package/package.json +1 -1
  95. package/src/modules/events/components/sections/FeaturedEvents.vue +2 -2
  96. package/src/modules/landing/landing.client.js +2 -0
  97. package/src/modules/users/components/sections/FeaturedUsers.vue +1 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../FieldPhone/click-outside.cjs");require("./Dropdown.vue2.cjs");const u=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),d={key:0,class:"w-100 h-100 flex-center flex"},f={key:1},p={__name:"Dropdown",props:{label:{type:[String,Object],default:"Open"},align:{type:String,default:"left"}},setup(t){let n=c.default;const i=t,l=e.ref(!1),a=e.computed(()=>typeof i.label=="object");function s(){l.value=!1}return(r,o)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"dropdown pos-relative",onClick:o[0]||(o[0]=e.withModifiers(m=>l.value=!l.value,["stop"]))},[a.value?(e.openBlock(),e.createElementBlock("div",d,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.label.component),e.mergeProps(t.label.props,{class:t.label.class}),null,16,["class"]))])):(e.openBlock(),e.createElementBlock("div",f,e.toDisplayString(t.label),1)),e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{style:e.normalizeStyle({left:t.align==="left"?"0":"auto",right:t.align==="right"?"0":"auto"}),class:"dropdown-content radius-big"},[e.renderSlot(r.$slots,"default",{},void 0,!0)],4),[[e.vShow,l.value]])]),_:3})])),[[e.unref(n),s]])}},v=u.default(p,[["__scopeId","data-v-96fe1329"]]);exports.default=v;
1
+ "use strict";
@@ -1,58 +1 @@
1
- import { ref as u, computed as f, withDirectives as a, openBlock as l, createElementBlock as o, withModifiers as m, createBlock as p, resolveDynamicComponent as v, mergeProps as b, toDisplayString as g, createVNode as k, Transition as w, withCtx as y, createElementVNode as h, normalizeStyle as O, renderSlot as S, vShow as x, unref as C } from "vue";
2
- import D from "../FieldPhone/click-outside.js";
3
- import "./Dropdown.vue2.js";
4
- import B from "../../../../_virtual/_plugin-vue_export-helper.js";
5
- const T = {
6
- key: 0,
7
- class: "w-100 h-100 flex-center flex"
8
- }, j = { key: 1 }, E = {
9
- __name: "Dropdown",
10
- props: {
11
- label: {
12
- type: [String, Object],
13
- default: "Open"
14
- },
15
- align: {
16
- type: String,
17
- default: "left"
18
- }
19
- },
20
- setup(e) {
21
- let i = D;
22
- const s = e, t = u(!1), r = f(() => typeof s.label == "object");
23
- function c() {
24
- t.value = !1;
25
- }
26
- return (d, n) => a((l(), o("div", {
27
- class: "dropdown pos-relative",
28
- onClick: n[0] || (n[0] = m((N) => t.value = !t.value, ["stop"]))
29
- }, [
30
- r.value ? (l(), o("div", T, [
31
- (l(), p(v(e.label.component), b(e.label.props, {
32
- class: e.label.class
33
- }), null, 16, ["class"]))
34
- ])) : (l(), o("div", j, g(e.label), 1)),
35
- k(w, {
36
- name: "TransitionTranslateY",
37
- mode: "out-in"
38
- }, {
39
- default: y(() => [
40
- a(h("div", {
41
- style: O({ left: e.align === "left" ? "0" : "auto", right: e.align === "right" ? "0" : "auto" }),
42
- class: "dropdown-content radius-big"
43
- }, [
44
- S(d.$slots, "default", {}, void 0, !0)
45
- ], 4), [
46
- [x, t.value]
47
- ])
48
- ]),
49
- _: 3
50
- })
51
- ])), [
52
- [C(i), c]
53
- ]);
54
- }
55
- }, L = /* @__PURE__ */ B(E, [["__scopeId", "data-v-96fe1329"]]);
56
- export {
57
- L as default
58
- };
1
+
@@ -1 +1 @@
1
- "use strict";
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../FieldPhone/click-outside.cjs");require("./Dropdown.vue.cjs");const u=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),d={key:0,class:"w-100 h-100 flex-center flex"},f={key:1},p={__name:"Dropdown",props:{label:{type:[String,Object],default:"Open"},align:{type:String,default:"left"}},setup(t){let n=c.default;const i=t,l=e.ref(!1),a=e.computed(()=>typeof i.label=="object");function s(){l.value=!1}return(r,o)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"dropdown pos-relative",onClick:o[0]||(o[0]=e.withModifiers(m=>l.value=!l.value,["stop"]))},[a.value?(e.openBlock(),e.createElementBlock("div",d,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.label.component),e.mergeProps(t.label.props,{class:t.label.class}),null,16,["class"]))])):(e.openBlock(),e.createElementBlock("div",f,e.toDisplayString(t.label),1)),e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{style:e.normalizeStyle({left:t.align==="left"?"0":"auto",right:t.align==="right"?"0":"auto"}),class:"dropdown-content radius-big"},[e.renderSlot(r.$slots,"default",{},void 0,!0)],4),[[e.vShow,l.value]])]),_:3})])),[[e.unref(n),s]])}},v=u.default(p,[["__scopeId","data-v-96fe1329"]]);exports.default=v;
@@ -1 +1,58 @@
1
-
1
+ import { ref as u, computed as f, withDirectives as a, openBlock as l, createElementBlock as o, withModifiers as m, createBlock as p, resolveDynamicComponent as v, mergeProps as b, toDisplayString as g, createVNode as k, Transition as w, withCtx as y, createElementVNode as h, normalizeStyle as O, renderSlot as S, vShow as x, unref as C } from "vue";
2
+ import D from "../FieldPhone/click-outside.js";
3
+ import "./Dropdown.vue.js";
4
+ import B from "../../../../_virtual/_plugin-vue_export-helper.js";
5
+ const T = {
6
+ key: 0,
7
+ class: "w-100 h-100 flex-center flex"
8
+ }, j = { key: 1 }, E = {
9
+ __name: "Dropdown",
10
+ props: {
11
+ label: {
12
+ type: [String, Object],
13
+ default: "Open"
14
+ },
15
+ align: {
16
+ type: String,
17
+ default: "left"
18
+ }
19
+ },
20
+ setup(e) {
21
+ let i = D;
22
+ const s = e, t = u(!1), r = f(() => typeof s.label == "object");
23
+ function c() {
24
+ t.value = !1;
25
+ }
26
+ return (d, n) => a((l(), o("div", {
27
+ class: "dropdown pos-relative",
28
+ onClick: n[0] || (n[0] = m((N) => t.value = !t.value, ["stop"]))
29
+ }, [
30
+ r.value ? (l(), o("div", T, [
31
+ (l(), p(v(e.label.component), b(e.label.props, {
32
+ class: e.label.class
33
+ }), null, 16, ["class"]))
34
+ ])) : (l(), o("div", j, g(e.label), 1)),
35
+ k(w, {
36
+ name: "TransitionTranslateY",
37
+ mode: "out-in"
38
+ }, {
39
+ default: y(() => [
40
+ a(h("div", {
41
+ style: O({ left: e.align === "left" ? "0" : "auto", right: e.align === "right" ? "0" : "auto" }),
42
+ class: "dropdown-content radius-big"
43
+ }, [
44
+ S(d.$slots, "default", {}, void 0, !0)
45
+ ], 4), [
46
+ [x, t.value]
47
+ ])
48
+ ]),
49
+ _: 3
50
+ })
51
+ ])), [
52
+ [C(i), c]
53
+ ]);
54
+ }
55
+ }, L = /* @__PURE__ */ B(E, [["__scopeId", "data-v-96fe1329"]]);
56
+ export {
57
+ L as default
58
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),x=require("../../modules/icons/skeletons/SkeletonEvent.vue.cjs");require("../Loader/Loader.vue.cjs");const S=require("../EmptyState/EmptyState.vue.cjs"),M=require("../Dropdown/Dropdown.vue.cjs"),q=require("../DatePicker/Calendar.vue2.cjs"),O=require("../../modules/globals/components/blocks/BlockSearch.vue.cjs"),E=require("../../modules/globals/components/blocks/BlockSorting.vue.cjs"),L=require("../../modules/globals/components/elements/ButtonSort.vue.cjs"),z=require("../../modules/globals/components/elements/ButtonDate.vue2.cjs"),j=require("../../modules/icons/navigation/IconFilter.vue.cjs");require("./Feed.vue2.cjs");const I={key:0,class:"flex-nowrap flex gap-thin mn-b-thin"},T={class:"flex-center flex pd-thin bg-light radius-extra aspect-1x1 h-100"},v=null,F={__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:{},date:{},dateModifiers:{},items:{},itemsModifiers:{}}),emits:["update:search","update:sort","update:date","update:items"],setup(r){var w,C;const c=e.useModel(r,"search"),s=e.useModel(r,"sort"),g=e.useModel(r,"date"),d=e.useModel(r,"items"),l=r,o=e.ref(d.value||[]),n=e.ref(!1);let m=e.ref(!0),k=e.ref(null),f=e.ref(l.options.skip?l.options.skip:0),i=e.ref(l.options.limit?l.options.limit:10),b=e.ref(((w=s.value)==null?void 0:w.param)||"createdAt"),y=e.ref(((C=s.value)==null?void 0:C.order)||"asc"),h=e.ref("");function N(t){h.value=t,f.value=0,i.value=10,p()}const B=async()=>{if(n.value){f.value+=i.value;const t=await l.store.read({skip:f.value,limit:i.value,search:h.value,sortParam:b.value,sortOrder:y.value,...l.options});t.length===0||t.length<i.value?n.value=!1:n.value=!0,o.value=[...o.value,...t],d.value&&(d.value=o.value)}},p=async()=>{const t=await l.store.read({skip:f.value,limit:i.value,sortParam:b.value,sortOrder:y.value,search:h.value,...l.options});t.length===0||t.length<i.value?n.value=!1:n.value=!0,o.value=t,d.value&&(d.value=o.value),m.value=!1};return e.watch(()=>l.external,(t,a)=>{t!==a&&p()},{deep:!0}),e.watch(()=>l.options,(t,a)=>{(t.organization!==a.organization||t.categories!==a.categories||t.prices!==a.prices||t.delivery!==a.delivery||t.search!==a.search||t.status!==a.status||t.hidden!==a.hidden||t.type!==a.type)&&p()},{deep:!0}),e.onMounted(async()=>{await p(),typeof window<"u"&&!l.showLoadMore&&(v=new IntersectionObserver(t=>{t.some(a=>a.isIntersecting)&&B()}),v.observe(k.value))}),e.onUnmounted(()=>{v&&v.disconnect()}),(t,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[c.value?(e.openBlock(),e.createElementBlock("div",I,[c.value?(e.openBlock(),e.createBlock(O.default,{key:0,placeholder:c.value.placeholder||"Search...",class:e.normalizeClass(c.value.class||"bg-light"),onSearch:N},null,8,["placeholder","class"])):e.createCommentVNode("",!0),e.createElementVNode("div",T,[e.createVNode(j.default,{class:"w-1r h-auto"})]),e.createVNode(M.default,{label:{component:z.default},class:e.normalizeClass([c.value.class||"bg-light","flex-child flex-child-grow-1 flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-big"]),align:"right"},{default:e.withCtx(()=>[e.createVNode(q.default,{date:g.value,"onUpdate:date":a[0]||(a[0]=u=>g.value=u),locale:t.$i18n.locale,allowRange:!0,class:"radius-semi w-100 o-hidden bg-light"},null,8,["date","locale"])]),_:1},8,["label","class"]),s.value?(e.openBlock(),e.createBlock(M.default,{key:1,label:{component:L.default,props:{order:s.value.order},class:"w-1r"},class:e.normalizeClass([c.value.class||"bg-light","radius-extra aspect-1x1 h-100"]),align:"right"},{default:e.withCtx(()=>[e.createVNode(E.default,{param:s.value.param,"onUpdate:param":a[1]||(a[1]=u=>s.value.param=u),order:s.value.order,"onUpdate:order":a[2]||(a[2]=u=>s.value.order=u),options:s.value.options,class:"h-100 pd-small radius-semi t-white bg-black"},null,8,["param","order","options"])]),_:1},8,["label","class"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.unref(m)?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:1,tag:"ul",name:"scaleTransition",class:e.normalizeClass(["o-hidden bg-light radius-big",t.$attrs.class])},{default:e.withCtx(()=>[e.unref(m)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(i),u=>(e.openBlock(),e.createBlock(x.default,{key:"skeleton-"+u}))),128)):e.createCommentVNode("",!0)]),_:1},8,["class"])):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"scaleTransition"},{default:e.withCtx(()=>[!e.unref(m)&&o.value.length<1?(e.openBlock(),e.createBlock(S.default,{key:0,title:r.states.empty.title,description:r.states.empty.description,action:r.states.empty.action,callback:r.states.empty.callback,class:"pd-medium mn-b-thin bg-light radius-big"},null,8,["title","description","action","callback"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"feed",class:e.normalizeClass(t.$attrs.class)},{default:e.withCtx(()=>[!e.unref(m)&&o.value.length>0?e.renderSlot(t.$slots,"default",{key:0,items:o.value}):e.createCommentVNode("",!0),r.showLoadMore&&n.value&&o.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:B,class:"col-w-100 w-100 bg-main button"}," Load More ")):e.createCommentVNode("",!0),e.createElementVNode("div",{key:"sentinel",ref_key:"sentinel",ref:k,class:"sentinel"},null,512)]),_:3},8,["class"])],64))}};exports.default=F;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),x=require("../../modules/icons/skeletons/SkeletonEvent.vue.cjs");require("../Loader/Loader.vue.cjs");const S=require("../EmptyState/EmptyState.vue.cjs"),M=require("../Dropdown/Dropdown.vue2.cjs"),q=require("../DatePicker/Calendar.vue2.cjs"),O=require("../../modules/globals/components/blocks/BlockSearch.vue.cjs"),E=require("../../modules/globals/components/blocks/BlockSorting.vue.cjs"),L=require("../../modules/globals/components/elements/ButtonSort.vue.cjs"),z=require("../../modules/globals/components/elements/ButtonDate.vue2.cjs"),j=require("../../modules/icons/navigation/IconFilter.vue.cjs");require("./Feed.vue2.cjs");const I={key:0,class:"flex-nowrap flex gap-thin mn-b-thin"},T={class:"flex-center flex pd-thin bg-light radius-extra aspect-1x1 h-100"},v=null,F={__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:{},date:{},dateModifiers:{},items:{},itemsModifiers:{}}),emits:["update:search","update:sort","update:date","update:items"],setup(r){var w,C;const c=e.useModel(r,"search"),s=e.useModel(r,"sort"),g=e.useModel(r,"date"),d=e.useModel(r,"items"),l=r,o=e.ref(d.value||[]),n=e.ref(!1);let m=e.ref(!0),k=e.ref(null),f=e.ref(l.options.skip?l.options.skip:0),i=e.ref(l.options.limit?l.options.limit:10),b=e.ref(((w=s.value)==null?void 0:w.param)||"createdAt"),y=e.ref(((C=s.value)==null?void 0:C.order)||"asc"),h=e.ref("");function N(t){h.value=t,f.value=0,i.value=10,p()}const B=async()=>{if(n.value){f.value+=i.value;const t=await l.store.read({skip:f.value,limit:i.value,search:h.value,sortParam:b.value,sortOrder:y.value,...l.options});t.length===0||t.length<i.value?n.value=!1:n.value=!0,o.value=[...o.value,...t],d.value&&(d.value=o.value)}},p=async()=>{const t=await l.store.read({skip:f.value,limit:i.value,sortParam:b.value,sortOrder:y.value,search:h.value,...l.options});t.length===0||t.length<i.value?n.value=!1:n.value=!0,o.value=t,d.value&&(d.value=o.value),m.value=!1};return e.watch(()=>l.external,(t,a)=>{t!==a&&p()},{deep:!0}),e.watch(()=>l.options,(t,a)=>{(t.organization!==a.organization||t.categories!==a.categories||t.prices!==a.prices||t.delivery!==a.delivery||t.search!==a.search||t.status!==a.status||t.hidden!==a.hidden||t.type!==a.type)&&p()},{deep:!0}),e.onMounted(async()=>{await p(),typeof window<"u"&&!l.showLoadMore&&(v=new IntersectionObserver(t=>{t.some(a=>a.isIntersecting)&&B()}),v.observe(k.value))}),e.onUnmounted(()=>{v&&v.disconnect()}),(t,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[c.value?(e.openBlock(),e.createElementBlock("div",I,[c.value?(e.openBlock(),e.createBlock(O.default,{key:0,placeholder:c.value.placeholder||"Search...",class:e.normalizeClass(c.value.class||"bg-light"),onSearch:N},null,8,["placeholder","class"])):e.createCommentVNode("",!0),e.createElementVNode("div",T,[e.createVNode(j.default,{class:"w-1r h-auto"})]),e.createVNode(M.default,{label:{component:z.default},class:e.normalizeClass([c.value.class||"bg-light","flex-child flex-child-grow-1 flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-big"]),align:"right"},{default:e.withCtx(()=>[e.createVNode(q.default,{date:g.value,"onUpdate:date":a[0]||(a[0]=u=>g.value=u),locale:t.$i18n.locale,allowRange:!0,class:"radius-semi w-100 o-hidden bg-light"},null,8,["date","locale"])]),_:1},8,["label","class"]),s.value?(e.openBlock(),e.createBlock(M.default,{key:1,label:{component:L.default,props:{order:s.value.order},class:"w-1r"},class:e.normalizeClass([c.value.class||"bg-light","radius-extra aspect-1x1 h-100"]),align:"right"},{default:e.withCtx(()=>[e.createVNode(E.default,{param:s.value.param,"onUpdate:param":a[1]||(a[1]=u=>s.value.param=u),order:s.value.order,"onUpdate:order":a[2]||(a[2]=u=>s.value.order=u),options:s.value.options,class:"h-100 pd-small radius-semi t-white bg-black"},null,8,["param","order","options"])]),_:1},8,["label","class"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.unref(m)?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:1,tag:"ul",name:"scaleTransition",class:e.normalizeClass(["o-hidden bg-light radius-big",t.$attrs.class])},{default:e.withCtx(()=>[e.unref(m)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(i),u=>(e.openBlock(),e.createBlock(x.default,{key:"skeleton-"+u}))),128)):e.createCommentVNode("",!0)]),_:1},8,["class"])):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"scaleTransition"},{default:e.withCtx(()=>[!e.unref(m)&&o.value.length<1?(e.openBlock(),e.createBlock(S.default,{key:0,title:r.states.empty.title,description:r.states.empty.description,action:r.states.empty.action,callback:r.states.empty.callback,class:"pd-medium mn-b-thin bg-light radius-big"},null,8,["title","description","action","callback"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"feed",class:e.normalizeClass(t.$attrs.class)},{default:e.withCtx(()=>[!e.unref(m)&&o.value.length>0?e.renderSlot(t.$slots,"default",{key:0,items:o.value}):e.createCommentVNode("",!0),r.showLoadMore&&n.value&&o.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:B,class:"col-w-100 w-100 bg-main button"}," Load More ")):e.createCommentVNode("",!0),e.createElementVNode("div",{key:"sentinel",ref_key:"sentinel",ref:k,class:"sentinel"},null,512)]),_:3},8,["class"])],64))}};exports.default=F;
@@ -2,7 +2,7 @@ import { mergeModels as D, useModel as M, ref as i, watch as U, onMounted as A,
2
2
  import J from "../../modules/icons/skeletons/SkeletonEvent.vue.js";
3
3
  import "../Loader/Loader.vue.js";
4
4
  import K from "../EmptyState/EmptyState.vue.js";
5
- import N from "../Dropdown/Dropdown.vue.js";
5
+ import N from "../Dropdown/Dropdown.vue2.js";
6
6
  import Q from "../DatePicker/Calendar.vue2.js";
7
7
  import W from "../../modules/globals/components/blocks/BlockSearch.vue.js";
8
8
  import X from "../../modules/globals/components/blocks/BlockSorting.vue.js";
@@ -1 +1 @@
1
- "use strict";
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),p=require("vue-i18n"),d=require("../../modules/icons/navigation/IconCross.vue.cjs");require("./Popup.vue2.cjs");const m={key:"popup-content",class:"pd-small popup-wrapper"},v={class:"mn-b-small"},f={__name:"Popup",props:{isPopupOpen:{type:Boolean,default:!1},style:String,title:String},emits:["close-popup"],setup(t,{emit:l}){const a=t,i=l;function n(){i("close-popup")}e.watch(()=>a.isPopupOpen,o=>{o?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll")}),r.useRoute(),r.useRouter();const u={messages:{en:{},ru:{}}};return p.useI18n(u),(o,s)=>(e.openBlock(),e.createBlock(e.Transition,{name:"TransitionTranslateY",appear:""},{default:e.withCtx(()=>[t.isPopupOpen?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[t.isPopupOpen?(e.openBlock(),e.createElementBlock("div",m,[e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[e.createElementVNode("section",e.mergeProps({class:"pos-relative z-index-4"},o.$attrs,{class:o.$attrs.class}),[e.createElementVNode("h4",v,e.toDisplayString(t.title),1),e.createVNode(d.default,{onClick:s[0]||(s[0]=c=>n()),class:"cursor-pointer pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-regular z-index-5"}),e.renderSlot(o.$slots,"default")],16)]),_:3}),e.createElementVNode("div",{onClick:s[1]||(s[1]=c=>n()),class:e.normalizeClass([{active:t.isPopupOpen===!0},"color-overlay z-index-3"])},null,2)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:3}))}};exports.default=f;
@@ -1 +1,73 @@
1
-
1
+ import { watch as v, openBlock as s, createBlock as l, Transition as a, withCtx as i, Teleport as y, createElementBlock as P, createVNode as p, createElementVNode as n, mergeProps as k, toDisplayString as g, renderSlot as T, normalizeClass as $, createCommentVNode as u } from "vue";
2
+ import { useRoute as b, useRouter as x } from "vue-router";
3
+ import { useI18n as C } from "vue-i18n";
4
+ import O from "../../modules/icons/navigation/IconCross.vue.js";
5
+ import "./Popup.vue2.js";
6
+ const z = {
7
+ key: "popup-content",
8
+ class: "pd-small popup-wrapper"
9
+ }, B = { class: "mn-b-small" }, L = {
10
+ __name: "Popup",
11
+ props: {
12
+ isPopupOpen: {
13
+ type: Boolean,
14
+ default: !1
15
+ },
16
+ style: String,
17
+ title: String
18
+ },
19
+ emits: ["close-popup"],
20
+ setup(e, { emit: m }) {
21
+ const c = e, d = m;
22
+ function r() {
23
+ d("close-popup");
24
+ }
25
+ return v(() => c.isPopupOpen, (t) => {
26
+ t ? document.body.classList.add("no-scroll") : document.body.classList.remove("no-scroll");
27
+ }), b(), x(), C({
28
+ messages: {
29
+ en: {},
30
+ ru: {}
31
+ }
32
+ }), (t, o) => (s(), l(a, {
33
+ name: "TransitionTranslateY",
34
+ appear: ""
35
+ }, {
36
+ default: i(() => [
37
+ e.isPopupOpen ? (s(), l(y, {
38
+ key: 0,
39
+ to: "body"
40
+ }, [
41
+ e.isPopupOpen ? (s(), P("div", z, [
42
+ p(a, {
43
+ name: "TransitionTranslateY",
44
+ mode: "out-in"
45
+ }, {
46
+ default: i(() => [
47
+ n("section", k({ class: "pos-relative z-index-4" }, t.$attrs, {
48
+ class: t.$attrs.class
49
+ }), [
50
+ n("h4", B, g(e.title), 1),
51
+ p(O, {
52
+ onClick: o[0] || (o[0] = (f) => r()),
53
+ class: "cursor-pointer pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-regular z-index-5"
54
+ }),
55
+ T(t.$slots, "default")
56
+ ], 16)
57
+ ]),
58
+ _: 3
59
+ }),
60
+ n("div", {
61
+ onClick: o[1] || (o[1] = (f) => r()),
62
+ class: $([{ active: e.isPopupOpen === !0 }, "color-overlay z-index-3"])
63
+ }, null, 2)
64
+ ])) : u("", !0)
65
+ ])) : u("", !0)
66
+ ]),
67
+ _: 3
68
+ }));
69
+ }
70
+ };
71
+ export {
72
+ L as default
73
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),p=require("vue-i18n"),d=require("../../modules/icons/navigation/IconCross.vue.cjs");require("./Popup.vue.cjs");const m={key:"popup-content",class:"pd-small popup-wrapper"},v={class:"mn-b-small"},f={__name:"Popup",props:{isPopupOpen:{type:Boolean,default:!1},style:String,title:String},emits:["close-popup"],setup(t,{emit:l}){const a=t,i=l;function n(){i("close-popup")}e.watch(()=>a.isPopupOpen,o=>{o?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll")}),r.useRoute(),r.useRouter();const u={messages:{en:{},ru:{}}};return p.useI18n(u),(o,s)=>(e.openBlock(),e.createBlock(e.Transition,{name:"TransitionTranslateY",appear:""},{default:e.withCtx(()=>[t.isPopupOpen?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[t.isPopupOpen?(e.openBlock(),e.createElementBlock("div",m,[e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[e.createElementVNode("section",e.mergeProps({class:"pos-relative z-index-4"},o.$attrs,{class:o.$attrs.class}),[e.createElementVNode("h4",v,e.toDisplayString(t.title),1),e.createVNode(d.default,{onClick:s[0]||(s[0]=c=>n()),class:"cursor-pointer pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-regular z-index-5"}),e.renderSlot(o.$slots,"default")],16)]),_:3}),e.createElementVNode("div",{onClick:s[1]||(s[1]=c=>n()),class:e.normalizeClass([{active:t.isPopupOpen===!0},"color-overlay z-index-3"])},null,2)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:3}))}};exports.default=f;
1
+ "use strict";
@@ -1,73 +1 @@
1
- import { watch as v, openBlock as s, createBlock as l, Transition as a, withCtx as i, Teleport as y, createElementBlock as P, createVNode as p, createElementVNode as n, mergeProps as k, toDisplayString as g, renderSlot as T, normalizeClass as $, createCommentVNode as u } from "vue";
2
- import { useRoute as b, useRouter as x } from "vue-router";
3
- import { useI18n as C } from "vue-i18n";
4
- import O from "../../modules/icons/navigation/IconCross.vue.js";
5
- import "./Popup.vue.js";
6
- const z = {
7
- key: "popup-content",
8
- class: "pd-small popup-wrapper"
9
- }, B = { class: "mn-b-small" }, L = {
10
- __name: "Popup",
11
- props: {
12
- isPopupOpen: {
13
- type: Boolean,
14
- default: !1
15
- },
16
- style: String,
17
- title: String
18
- },
19
- emits: ["close-popup"],
20
- setup(e, { emit: m }) {
21
- const c = e, d = m;
22
- function r() {
23
- d("close-popup");
24
- }
25
- return v(() => c.isPopupOpen, (t) => {
26
- t ? document.body.classList.add("no-scroll") : document.body.classList.remove("no-scroll");
27
- }), b(), x(), C({
28
- messages: {
29
- en: {},
30
- ru: {}
31
- }
32
- }), (t, o) => (s(), l(a, {
33
- name: "TransitionTranslateY",
34
- appear: ""
35
- }, {
36
- default: i(() => [
37
- e.isPopupOpen ? (s(), l(y, {
38
- key: 0,
39
- to: "body"
40
- }, [
41
- e.isPopupOpen ? (s(), P("div", z, [
42
- p(a, {
43
- name: "TransitionTranslateY",
44
- mode: "out-in"
45
- }, {
46
- default: i(() => [
47
- n("section", k({ class: "pos-relative z-index-4" }, t.$attrs, {
48
- class: t.$attrs.class
49
- }), [
50
- n("h4", B, g(e.title), 1),
51
- p(O, {
52
- onClick: o[0] || (o[0] = (f) => r()),
53
- class: "cursor-pointer pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-regular z-index-5"
54
- }),
55
- T(t.$slots, "default")
56
- ], 16)
57
- ]),
58
- _: 3
59
- }),
60
- n("div", {
61
- onClick: o[1] || (o[1] = (f) => r()),
62
- class: $([{ active: e.isPopupOpen === !0 }, "color-overlay z-index-3"])
63
- }, null, 2)
64
- ])) : u("", !0)
65
- ])) : u("", !0)
66
- ]),
67
- _: 3
68
- }));
69
- }
70
- };
71
- export {
72
- L as default
73
- };
1
+
@@ -1 +1 @@
1
- "use strict";
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("../FieldPhone/click-outside.cjs");require("./Select.vue2.cjs");const g=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),B={key:0,class:"t-transp mn-r-small"},b={class:"w-100"},w=["onClick"],S={key:0,class:"w-100"},_={key:0,class:"mn-t-thin invalid-feedback"},C={__name:"Select",props:{label:String,placeholder:{type:String,default:"Please select an item"},select:[String,Object],property:String,options:{type:Array,default:()=>[]},validation:Boolean},emits:["update:select","focus","blur"],setup(n,{emit:m}){let f=y.default;const i=m,t=n,a=e.ref(!1),o=e.ref(t.property?d(t.select,t.property,t.options):t.select),v=e.computed(()=>t.select?t.options.filter(l=>l!==t.select):t.options);e.watch(()=>t.select,l=>{o.value=t.property?d(t.select,t.property,t.options):t.select});const u=()=>{a.value=!a.value,i(a.value?"focus":"blur")};function k(){a.value=!1}const h=l=>{o.value=l,u(),t.property?i("update:select",o.value[t.property]):i("update:select",o.value)};function d(l,p,c){for(const s of c)if(s[p]===l||s===l)return s;return null}return(l,p)=>{var c,s;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives((e.openBlock(),e.createElementBlock("div",{onClick:e.withModifiers(u,["stop"]),class:e.normalizeClass([l.$attrs.class,"cursor-pointer flex-v-center flex-nowrap flex pos-relative"])},[n.label?(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("span",null,e.toDisplayString(n.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("li",b,[e.createElementVNode("span",null,e.toDisplayString((c=o.value)!=null&&c.name?(s=o.value)==null?void 0:s.name:o.value||n.placeholder),1)]),e.createVNode(e.Transition,{mode:"out-in",name:"TransitionTranslateY"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("ul",{class:e.normalizeClass([l.$attrs.class,"bs-black pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"]),style:{"min-width":"max-content"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,r=>(e.openBlock(),e.createElementBlock("li",{onClick:e.withModifiers(V=>h(r),["stop"])},[r?(e.openBlock(),e.createElementBlock("span",S,e.toDisplayString(r.name||r),1)):e.createCommentVNode("",!0)],8,w))),256))],2),[[e.vShow,a.value]])]),_:1})],2)),[[e.unref(f),k]]),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[n.validation?(e.openBlock(),e.createElementBlock("div",_," * "+e.toDisplayString(n.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64)}}},E=g.default(C,[["__scopeId","data-v-bf25c24d"]]);exports.default=E;
@@ -1 +1,103 @@
1
-
1
+ import { ref as y, computed as M, watch as N, openBlock as s, createElementBlock as n, Fragment as b, withDirectives as k, withModifiers as w, normalizeClass as S, createElementVNode as u, toDisplayString as d, createCommentVNode as m, createVNode as _, Transition as g, withCtx as x, renderList as T, vShow as $, unref as z } from "vue";
2
+ import D from "../FieldPhone/click-outside.js";
3
+ import "./Select.vue2.js";
4
+ import E from "../../../../_virtual/_plugin-vue_export-helper.js";
5
+ const L = {
6
+ key: 0,
7
+ class: "t-transp mn-r-small"
8
+ }, A = { class: "w-100" }, F = ["onClick"], I = {
9
+ key: 0,
10
+ class: "w-100"
11
+ }, P = {
12
+ key: 0,
13
+ class: "mn-t-thin invalid-feedback"
14
+ }, Y = {
15
+ __name: "Select",
16
+ props: {
17
+ label: String,
18
+ placeholder: { type: String, default: "Please select an item" },
19
+ select: [String, Object],
20
+ property: String,
21
+ options: { type: Array, default: () => [] },
22
+ validation: Boolean
23
+ },
24
+ emits: [
25
+ "update:select",
26
+ "focus",
27
+ "blur"
28
+ ],
29
+ setup(o, { emit: C }) {
30
+ let O = D;
31
+ const p = C, e = o, c = y(!1), l = y(
32
+ e.property ? v(e.select, e.property, e.options) : e.select
33
+ ), B = M(() => e.select ? e.options.filter((t) => t !== e.select) : e.options);
34
+ N(() => e.select, (t) => {
35
+ l.value = e.property ? v(e.select, e.property, e.options) : e.select;
36
+ });
37
+ const f = () => {
38
+ c.value = !c.value, p(c.value ? "focus" : "blur");
39
+ };
40
+ function V() {
41
+ c.value = !1;
42
+ }
43
+ const j = (t) => {
44
+ l.value = t, f(), e.property ? p("update:select", l.value[e.property]) : p("update:select", l.value);
45
+ };
46
+ function v(t, h, i) {
47
+ for (const a of i)
48
+ if (a[h] === t || a === t)
49
+ return a;
50
+ return null;
51
+ }
52
+ return (t, h) => {
53
+ var i, a;
54
+ return s(), n(b, null, [
55
+ k((s(), n("div", {
56
+ onClick: w(f, ["stop"]),
57
+ class: S([t.$attrs.class, "cursor-pointer flex-v-center flex-nowrap flex pos-relative"])
58
+ }, [
59
+ o.label ? (s(), n("div", L, [
60
+ u("span", null, d(o.label), 1)
61
+ ])) : m("", !0),
62
+ u("li", A, [
63
+ u("span", null, d((i = l.value) != null && i.name ? (a = l.value) == null ? void 0 : a.name : l.value || o.placeholder), 1)
64
+ ]),
65
+ _(g, {
66
+ mode: "out-in",
67
+ name: "TransitionTranslateY"
68
+ }, {
69
+ default: x(() => [
70
+ k(u("ul", {
71
+ class: S([t.$attrs.class, "bs-black pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"]),
72
+ style: { "min-width": "max-content" }
73
+ }, [
74
+ (s(!0), n(b, null, T(B.value, (r) => (s(), n("li", {
75
+ onClick: w((q) => j(r), ["stop"])
76
+ }, [
77
+ r ? (s(), n("span", I, d(r.name || r), 1)) : m("", !0)
78
+ ], 8, F))), 256))
79
+ ], 2), [
80
+ [$, c.value]
81
+ ])
82
+ ]),
83
+ _: 1
84
+ })
85
+ ], 2)), [
86
+ [z(O), V]
87
+ ]),
88
+ _(g, {
89
+ mode: "out-in",
90
+ name: "fade"
91
+ }, {
92
+ default: x(() => [
93
+ o.validation ? (s(), n("div", P, " * " + d(o.validation.message), 1)) : m("", !0)
94
+ ]),
95
+ _: 1
96
+ })
97
+ ], 64);
98
+ };
99
+ }
100
+ }, Q = /* @__PURE__ */ E(Y, [["__scopeId", "data-v-bf25c24d"]]);
101
+ export {
102
+ Q as default
103
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("../FieldPhone/click-outside.cjs");require("./Select.vue.cjs");const g=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),B={key:0,class:"t-transp mn-r-small"},b={class:"w-100"},w=["onClick"],S={key:0,class:"w-100"},_={key:0,class:"mn-t-thin invalid-feedback"},C={__name:"Select",props:{label:String,placeholder:{type:String,default:"Please select an item"},select:[String,Object],property:String,options:{type:Array,default:()=>[]},validation:Boolean},emits:["update:select","focus","blur"],setup(n,{emit:m}){let f=y.default;const i=m,t=n,a=e.ref(!1),o=e.ref(t.property?d(t.select,t.property,t.options):t.select),v=e.computed(()=>t.select?t.options.filter(l=>l!==t.select):t.options);e.watch(()=>t.select,l=>{o.value=t.property?d(t.select,t.property,t.options):t.select});const u=()=>{a.value=!a.value,i(a.value?"focus":"blur")};function k(){a.value=!1}const h=l=>{o.value=l,u(),t.property?i("update:select",o.value[t.property]):i("update:select",o.value)};function d(l,p,c){for(const s of c)if(s[p]===l||s===l)return s;return null}return(l,p)=>{var c,s;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives((e.openBlock(),e.createElementBlock("div",{onClick:e.withModifiers(u,["stop"]),class:e.normalizeClass([l.$attrs.class,"cursor-pointer flex-v-center flex-nowrap flex pos-relative"])},[n.label?(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("span",null,e.toDisplayString(n.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("li",b,[e.createElementVNode("span",null,e.toDisplayString((c=o.value)!=null&&c.name?(s=o.value)==null?void 0:s.name:o.value||n.placeholder),1)]),e.createVNode(e.Transition,{mode:"out-in",name:"TransitionTranslateY"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("ul",{class:e.normalizeClass([l.$attrs.class,"bs-black pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"]),style:{"min-width":"max-content"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,r=>(e.openBlock(),e.createElementBlock("li",{onClick:e.withModifiers(V=>h(r),["stop"])},[r?(e.openBlock(),e.createElementBlock("span",S,e.toDisplayString(r.name||r),1)):e.createCommentVNode("",!0)],8,w))),256))],2),[[e.vShow,a.value]])]),_:1})],2)),[[e.unref(f),k]]),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[n.validation?(e.openBlock(),e.createElementBlock("div",_," * "+e.toDisplayString(n.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64)}}},E=g.default(C,[["__scopeId","data-v-bf25c24d"]]);exports.default=E;
1
+ "use strict";
@@ -1,103 +1 @@
1
- import { ref as y, computed as M, watch as N, openBlock as s, createElementBlock as n, Fragment as b, withDirectives as k, withModifiers as w, normalizeClass as S, createElementVNode as u, toDisplayString as d, createCommentVNode as m, createVNode as _, Transition as g, withCtx as x, renderList as T, vShow as $, unref as z } from "vue";
2
- import D from "../FieldPhone/click-outside.js";
3
- import "./Select.vue.js";
4
- import E from "../../../../_virtual/_plugin-vue_export-helper.js";
5
- const L = {
6
- key: 0,
7
- class: "t-transp mn-r-small"
8
- }, A = { class: "w-100" }, F = ["onClick"], I = {
9
- key: 0,
10
- class: "w-100"
11
- }, P = {
12
- key: 0,
13
- class: "mn-t-thin invalid-feedback"
14
- }, Y = {
15
- __name: "Select",
16
- props: {
17
- label: String,
18
- placeholder: { type: String, default: "Please select an item" },
19
- select: [String, Object],
20
- property: String,
21
- options: { type: Array, default: () => [] },
22
- validation: Boolean
23
- },
24
- emits: [
25
- "update:select",
26
- "focus",
27
- "blur"
28
- ],
29
- setup(o, { emit: C }) {
30
- let O = D;
31
- const p = C, e = o, c = y(!1), l = y(
32
- e.property ? v(e.select, e.property, e.options) : e.select
33
- ), B = M(() => e.select ? e.options.filter((t) => t !== e.select) : e.options);
34
- N(() => e.select, (t) => {
35
- l.value = e.property ? v(e.select, e.property, e.options) : e.select;
36
- });
37
- const f = () => {
38
- c.value = !c.value, p(c.value ? "focus" : "blur");
39
- };
40
- function V() {
41
- c.value = !1;
42
- }
43
- const j = (t) => {
44
- l.value = t, f(), e.property ? p("update:select", l.value[e.property]) : p("update:select", l.value);
45
- };
46
- function v(t, h, i) {
47
- for (const a of i)
48
- if (a[h] === t || a === t)
49
- return a;
50
- return null;
51
- }
52
- return (t, h) => {
53
- var i, a;
54
- return s(), n(b, null, [
55
- k((s(), n("div", {
56
- onClick: w(f, ["stop"]),
57
- class: S([t.$attrs.class, "cursor-pointer flex-v-center flex-nowrap flex pos-relative"])
58
- }, [
59
- o.label ? (s(), n("div", L, [
60
- u("span", null, d(o.label), 1)
61
- ])) : m("", !0),
62
- u("li", A, [
63
- u("span", null, d((i = l.value) != null && i.name ? (a = l.value) == null ? void 0 : a.name : l.value || o.placeholder), 1)
64
- ]),
65
- _(g, {
66
- mode: "out-in",
67
- name: "TransitionTranslateY"
68
- }, {
69
- default: x(() => [
70
- k(u("ul", {
71
- class: S([t.$attrs.class, "bs-black pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"]),
72
- style: { "min-width": "max-content" }
73
- }, [
74
- (s(!0), n(b, null, T(B.value, (r) => (s(), n("li", {
75
- onClick: w((q) => j(r), ["stop"])
76
- }, [
77
- r ? (s(), n("span", I, d(r.name || r), 1)) : m("", !0)
78
- ], 8, F))), 256))
79
- ], 2), [
80
- [$, c.value]
81
- ])
82
- ]),
83
- _: 1
84
- })
85
- ], 2)), [
86
- [z(O), V]
87
- ]),
88
- _(g, {
89
- mode: "out-in",
90
- name: "fade"
91
- }, {
92
- default: x(() => [
93
- o.validation ? (s(), n("div", P, " * " + d(o.validation.message), 1)) : m("", !0)
94
- ]),
95
- _: 1
96
- })
97
- ], 64);
98
- };
99
- }
100
- }, Q = /* @__PURE__ */ E(Y, [["__scopeId", "data-v-bf25c24d"]]);
101
- export {
102
- Q as default
103
- };
1
+
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("vue-router"),f=require("../../../../components/Select/Select.vue2.cjs"),g=require("../../../../components/Feed/Feed.vue.cjs"),h=require("../../../organizations/components/blocks/CardOrganization.vue.cjs"),x=require("../../../icons/entities/IconFeatured.vue.cjs"),b=require("../../../icons/entities/IconPopular.vue.cjs"),_=require("../../../icons/entities/IconRecent.vue.cjs"),w=require("../../../icons/entities/IconFollowing.vue.cjs"),m=require("../../store/blogposts.cjs"),l=require("../../../auth/store/auth.cjs"),c=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-small"},"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=d.useRoute(),a=d.useRouter(),p=({membership:u,status:r,target:s},i,t)=>{k.mutations.handleMembershipUpdate(c.state.current,u,r,s,i,t)};return(u,r)=>{const s=e.resolveComponent("router-link"),i=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:r[0]||(r[0]=t=>e.unref(a).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:r[1]||(r[1]=t=>e.unref(a).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:r[2]||(r[2]=t=>e.unref(a).push({name:"Blog",params:{category:"new"}}))},[e.createVNode(_.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Recent ")],2),l.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-white bg-black":e.unref(o).params.category==="following"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:r[3]||(r[3]=t=>e.unref(a).push({name:"Blog",params:{category:"following"}}))},[e.createVNode(w.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Following ")],2)):e.createCommentVNode("",!0),e.createVNode(s,{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("h2",y,[B,e.createVNode(f.default,{options:["today","week","month","year"],select:m.state.filter.period,"onUpdate:select":r[4]||(r[4]=t=>m.state.filter.period=t),placeholder:"Select type",class:"t-semi pos-relative w-max bg-main t-black pd-thin radius-medium h2 t-center br-solid br-2px br-black-transp-10"},null,8,["select"])])]),e.createVNode(i,null,{default:e.withCtx(({Component:t,route:n})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t),{ref:"page",key:n.query}))]),_:2},1024)]),_:1})]),e.createElementVNode("div",q,[e.createElementVNode("div",E,[z,l.state.user._id?(e.openBlock(),e.createBlock(s,{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:t=>c.actions.read(t),state:c.state},options:{user:l.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,n=>(e.openBlock(),e.createBlock(h.default,{key:n._id,organization:n,user:l.state.user,showProducts:!1,showRating:!1,showFeatured:!1,showFollowers:!1,onUpdateMembership:p,class:"mn-b-thin w-100 pd-0 bg-white radius-big o-hidden"},null,8,["organization","user"]))),128))]),_:1},8,["store","options"])]),_:1})])])}}};exports.default=T;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=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"),_=require("../../../icons/entities/IconRecent.vue.cjs"),w=require("../../../icons/entities/IconFollowing.vue.cjs"),m=require("../../store/blogposts.cjs"),l=require("../../../auth/store/auth.cjs"),c=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-small"},"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=d.useRoute(),a=d.useRouter(),p=({membership:u,status:r,target:s},i,t)=>{k.mutations.handleMembershipUpdate(c.state.current,u,r,s,i,t)};return(u,r)=>{const s=e.resolveComponent("router-link"),i=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:r[0]||(r[0]=t=>e.unref(a).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:r[1]||(r[1]=t=>e.unref(a).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:r[2]||(r[2]=t=>e.unref(a).push({name:"Blog",params:{category:"new"}}))},[e.createVNode(_.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Recent ")],2),l.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-white bg-black":e.unref(o).params.category==="following"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:r[3]||(r[3]=t=>e.unref(a).push({name:"Blog",params:{category:"following"}}))},[e.createVNode(w.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Following ")],2)):e.createCommentVNode("",!0),e.createVNode(s,{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("h2",y,[B,e.createVNode(f.default,{options:["today","week","month","year"],select:m.state.filter.period,"onUpdate:select":r[4]||(r[4]=t=>m.state.filter.period=t),placeholder:"Select type",class:"t-semi pos-relative w-max bg-main t-black pd-thin radius-medium h2 t-center br-solid br-2px br-black-transp-10"},null,8,["select"])])]),e.createVNode(i,null,{default:e.withCtx(({Component:t,route:n})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t),{ref:"page",key:n.query}))]),_:2},1024)]),_:1})]),e.createElementVNode("div",q,[e.createElementVNode("div",E,[z,l.state.user._id?(e.openBlock(),e.createBlock(s,{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:t=>c.actions.read(t),state:c.state},options:{user:l.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,n=>(e.openBlock(),e.createBlock(h.default,{key:n._id,organization:n,user:l.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 b, openBlock as a, createElementBlock as g, createElementVNode as r, normalizeClass as d, unref as o, createVNode as s, createTextVNode as i, createCommentVNode as x, withCtx as n, Transition as w, createBlock as h, resolveDynamicComponent as C, Fragment as $, renderList as B } from "vue";
2
2
  import { useRoute as F, useRouter as z } from "vue-router";
3
- import N from "../../../../components/Select/Select.vue2.js";
3
+ import N from "../../../../components/Select/Select.vue.js";
4
4
  import P from "../../../../components/Feed/Feed.vue.js";
5
5
  import M from "../../../organizations/components/blocks/CardOrganization.vue.js";
6
6
  import R 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");require("../../../../components/Field/Field.vue.cjs");const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Upload/Upload.vue2.cjs");const _=require("../blocks/CardBlogpost.vue.cjs"),r=require("../../store/blogposts.cjs"),f=require("../../../auth/store/auth.cjs"),b=require("vue-router");require("./Community.vue2.cjs");const v=l=>(e.pushScopeId("data-v-bdf0e48a"),l=l(),e.popScopeId(),l),g={class:"flex-v-center flex-nowrap flex mn-b-medium"},h=v(()=>e.createElementVNode("h3",{class:"mn-r-medium"},"Blog",-1)),k={class:""},w={class:"flex-nowrap flex pd-t-zero pd-b-zero pd-big"},q=["onClick"],y=["onClick"],C={__name:"Community",async setup(l){let s,u;const i=b.useRouter();[s,u]=e.withAsyncContext(()=>r.read()),await s,u(),console.log(r.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 r.remove(t))};let c=e.ref("all");const a=e.computed(()=>c.value==="all"?r.state.all:r.state.all.filter(t=>t.categories.includes(c.value)));return e.computed(()=>{for(let t of a.value)if(t.blocks&&t.blocks.length>0){const n=t.blocks.find(o=>o.type.name==="ImageUpload");if(n)return n.content}return null}),(t,n)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",g,[h,e.createElementVNode("button",{onClick:n[0]||(n[0]=o=>e.unref(i).push({name:"Create BlogPost"})),class:"t-white bg-second button-small button"},"+")]),e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,o=>(e.openBlock(),e.createBlock(_.default,{key:o._id,blogpost:o,owner:f.state.user._id,class:"mn-b-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",w,[e.createElementVNode("button",{class:"mn-r-thin button-small w-100 button",onClick:m=>t.$router.push({path:"/community/posts/"+o.url+"/edit"})},"Edit",8,q),e.createElementVNode("button",{class:"button-small w-100 button",onClick:m=>d(o._id)},"Delete",8,y)])]),_:2},1032,["blogpost","owner"]))),128))])]))}},B=p.default(C,[["__scopeId","data-v-bdf0e48a"]]);exports.default=B;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Field/Field.vue.cjs");const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Select/Select.vue2.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Upload/Upload.vue2.cjs");const _=require("../blocks/CardBlogpost.vue.cjs"),r=require("../../store/blogposts.cjs"),f=require("../../../auth/store/auth.cjs"),b=require("vue-router");require("./Community.vue2.cjs");const v=l=>(e.pushScopeId("data-v-bdf0e48a"),l=l(),e.popScopeId(),l),g={class:"flex-v-center flex-nowrap flex mn-b-medium"},h=v(()=>e.createElementVNode("h3",{class:"mn-r-medium"},"Blog",-1)),k={class:""},w={class:"flex-nowrap flex pd-t-zero pd-b-zero pd-big"},q=["onClick"],y=["onClick"],C={__name:"Community",async setup(l){let s,u;const i=b.useRouter();[s,u]=e.withAsyncContext(()=>r.read()),await s,u(),console.log(r.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 r.remove(t))};let c=e.ref("all");const a=e.computed(()=>c.value==="all"?r.state.all:r.state.all.filter(t=>t.categories.includes(c.value)));return e.computed(()=>{for(let t of a.value)if(t.blocks&&t.blocks.length>0){const n=t.blocks.find(o=>o.type.name==="ImageUpload");if(n)return n.content}return null}),(t,n)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",g,[h,e.createElementVNode("button",{onClick:n[0]||(n[0]=o=>e.unref(i).push({name:"Create BlogPost"})),class:"t-white bg-second button-small button"},"+")]),e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,o=>(e.openBlock(),e.createBlock(_.default,{key:o._id,blogpost:o,owner:f.state.user._id,class:"mn-b-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",w,[e.createElementVNode("button",{class:"mn-r-thin button-small w-100 button",onClick:m=>t.$router.push({path:"/community/posts/"+o.url+"/edit"})},"Edit",8,q),e.createElementVNode("button",{class:"button-small w-100 button",onClick:m=>d(o._id)},"Delete",8,y)])]),_:2},1032,["blogpost","owner"]))),128))])]))}},B=p.default(C,[["__scopeId","data-v-bdf0e48a"]]);exports.default=B;
@@ -1,7 +1,7 @@
1
1
  import { withAsyncContext as h, ref as u, computed as d, openBlock as r, createElementBlock as p, createElementVNode as o, unref as v, Fragment as w, renderList as g, createBlock as k, withCtx as y, pushScopeId as C, popScopeId as x } from "vue";
2
2
  import "../../../../components/Field/Field.vue.js";
3
3
  import B from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
- import "../../../../components/Select/Select.vue.js";
4
+ import "../../../../components/Select/Select.vue2.js";
5
5
  import "../../../../components/Loader/Loader.vue.js";
6
6
  import "../../../../components/Button/Button.vue.js";
7
7
  import "../../../../components/Upload/Upload.vue2.js";