@ozdao/prometheus-framework 0.2.118 → 0.2.119

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. package/dist/community.server.js +1 -1
  2. package/dist/community.server.mjs +1 -1
  3. package/dist/events.server.js +1 -1
  4. package/dist/events.server.mjs +1 -1
  5. package/dist/gallery.server.js +9 -3
  6. package/dist/gallery.server.mjs +9 -3
  7. package/dist/main-DL3vRQCi.js +92 -0
  8. package/dist/main-Ds3Z5x5d.mjs +14206 -0
  9. package/dist/main.css +1 -1
  10. package/dist/orders.server.js +1 -1
  11. package/dist/orders.server.mjs +1 -1
  12. package/dist/organizations.server.js +1 -1
  13. package/dist/organizations.server.mjs +1 -1
  14. package/dist/products.server.js +1 -1
  15. package/dist/products.server.mjs +1 -1
  16. package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
  17. package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
  18. package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.cjs +1 -1
  19. package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.js +116 -117
  20. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  21. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +58 -1
  22. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
  23. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +1 -58
  24. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +123 -109
  26. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js +32 -26
  28. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -73
  30. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  31. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +77 -1
  32. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -103
  34. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  35. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +103 -1
  36. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +1 -45
  38. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
  39. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +45 -1
  40. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  42. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  44. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  46. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  48. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +16 -17
  50. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
  51. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
  52. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
  53. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
  54. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  56. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  58. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  60. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  62. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +44 -69
  64. package/dist/prometheus-framework/src/modules/gallery/components/blocks/PhotoViewer.vue.cjs +1 -0
  65. package/dist/prometheus-framework/src/modules/gallery/components/blocks/PhotoViewer.vue.js +64 -0
  66. package/dist/prometheus-framework/src/modules/gallery/components/blocks/PhotoViewer.vue2.cjs +1 -0
  67. package/dist/prometheus-framework/src/modules/gallery/components/blocks/PhotoViewer.vue2.js +1 -0
  68. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +101 -14
  70. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +165 -102
  72. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +3 -3
  74. package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue.js +38 -1
  76. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.js +3 -3
  78. package/dist/prometheus-framework/src/modules/globals/services/globals.store.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/globals/services/globals.store.js +21 -21
  80. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonBlogpost.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonBlogpost.vue.js +3 -3
  82. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEvent.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEvent.vue.js +1 -1
  84. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEventShort.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEventShort.vue.js +5 -5
  86. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonOrganization.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonOrganization.vue.js +1 -1
  88. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  90. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +13 -1
  92. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +1 -13
  94. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  96. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
  98. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  100. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  102. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  104. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  106. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  107. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +3 -3
  108. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  109. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  110. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  111. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  112. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
  114. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  115. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  116. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  118. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  120. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  121. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  122. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  124. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  126. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
  128. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  130. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  132. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +31 -32
  134. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  136. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  138. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +4 -4
  140. package/dist/prometheus-framework.cjs.js +1 -1
  141. package/dist/prometheus-framework.es.js +1 -1
  142. package/dist/queryProcessor-g8208K6g.mjs +178 -0
  143. package/dist/queryProcessor-haY_gPGg.js +177 -0
  144. package/dist/style.css +1 -1
  145. package/dist/wallet.server.js +1 -1
  146. package/dist/wallet.server.mjs +1 -1
  147. package/dist/web-B8tq3Fda.mjs +54 -0
  148. package/dist/web-ByJkgGrt.js +1 -0
  149. package/package.json +1 -1
  150. package/src/components/DatePicker/Calendar.vue +82 -55
  151. package/src/components/Feed/Feed.vue +45 -16
  152. package/src/components/FieldTags/BlockTags.vue +30 -23
  153. package/src/components/Popup/Popup.vue +2 -2
  154. package/src/modules/events/components/pages/Events.vue +2 -48
  155. package/src/modules/gallery/components/blocks/PhotoViewer.vue +115 -0
  156. package/src/modules/gallery/components/pages/Gallery.vue +103 -6
  157. package/src/modules/gallery/components/sections/BackofficeGallery.vue +100 -32
  158. package/src/modules/gallery/controllers/gallery.controller.js +45 -38
  159. package/src/modules/globals/components/blocks/CardHeader.vue +1 -1
  160. package/src/modules/globals/components/elements/ButtonDate.vue +37 -43
  161. package/src/modules/globals/components/layouts/Client.vue +1 -1
  162. package/src/modules/globals/components/sections/SectionPageTitle.vue +1 -1
  163. package/src/modules/globals/controllers/utils/queryProcessor.js +21 -2
  164. package/src/modules/globals/services/globals.store.js +13 -17
  165. package/src/modules/icons/skeletons/SkeletonBlogpost.vue +1 -1
  166. package/src/modules/icons/skeletons/SkeletonEvent.vue +1 -1
  167. package/src/modules/icons/skeletons/SkeletonEventShort.vue +1 -1
  168. package/src/modules/icons/skeletons/SkeletonOrganization.vue +1 -1
  169. package/src/modules/products/components/sections/FilterProducts.vue +2 -1
  170. package/src/modules/gallery/components/sections/GalleryWithCategories.vue +0 -176
@@ -0,0 +1,64 @@
1
+ import { ref as l, reactive as p, computed as X, openBlock as L, createElementBlock as w, createElementVNode as D, normalizeStyle as E } from "vue";
2
+ import "./PhotoViewer.vue2.js";
3
+ import T from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const b = ["src"], S = {
5
+ __name: "PhotoViewer",
6
+ props: {
7
+ photoUrl: String,
8
+ show: Boolean
9
+ },
10
+ setup(v) {
11
+ const n = l(1), s = p({ x: 0, y: 0 }), i = l(!1), a = p({ x: 0, y: 0 }), d = l(1), r = l(0), f = X(() => ({
12
+ transform: `scale(${n.value}) translate(${s.x}px, ${s.y}px)`
13
+ })), x = (t) => {
14
+ t.preventDefault();
15
+ const e = t.deltaY > 0 ? -0.1 : 0.1;
16
+ n.value = Math.min(Math.max(1, n.value + e), 3);
17
+ }, m = (t) => {
18
+ t.preventDefault(), i.value = !0, a.x = t.type === "mousedown" ? t.clientX : t.touches[0].clientX, a.y = t.type === "mousedown" ? t.clientY : t.touches[0].clientY;
19
+ const e = (c) => {
20
+ if (i.value) {
21
+ const u = c.type === "mousemove" ? c.clientX : c.touches[0].clientX, h = c.type === "mousemove" ? c.clientY : c.touches[0].clientY;
22
+ s.x += (u - a.x) / n.value, s.y += (h - a.y) / n.value, a.x = u, a.y = h;
23
+ }
24
+ }, o = () => {
25
+ i.value = !1, document.removeEventListener("mousemove", e), document.removeEventListener("mouseup", o), document.removeEventListener("touchmove", e), document.removeEventListener("touchend", o);
26
+ };
27
+ document.addEventListener("mousemove", e), document.addEventListener("mouseup", o), document.addEventListener("touchmove", e), document.addEventListener("touchend", o);
28
+ }, y = (t) => {
29
+ if (t.touches.length === 2) {
30
+ const e = t.touches[0], o = t.touches[1], c = Math.abs(e.clientX - o.clientX), u = Math.abs(e.clientY - o.clientY);
31
+ r.value = Math.sqrt(c ** 2 + u ** 2), d.value = n.value;
32
+ } else
33
+ m(t);
34
+ }, g = (t) => {
35
+ if (t.touches.length === 2) {
36
+ t.preventDefault();
37
+ const e = t.touches[0], o = t.touches[1], c = Math.abs(e.clientX - o.clientX), u = Math.abs(e.clientY - o.clientY), _ = Math.sqrt(c ** 2 + u ** 2) / r.value;
38
+ n.value = Math.min(Math.max(1, d.value * _), 3);
39
+ }
40
+ }, M = (t) => {
41
+ t.touches.length === 0 && (r.value = 0);
42
+ }, Y = () => {
43
+ n.value = 1, s.x = 0, s.y = 0;
44
+ };
45
+ return (t, e) => (L(), w("div", {
46
+ class: "photo-container",
47
+ onWheel: x,
48
+ onMousedown: m,
49
+ onTouchstart: y,
50
+ onTouchmove: g,
51
+ onTouchend: M
52
+ }, [
53
+ D("img", {
54
+ src: v.photoUrl,
55
+ style: E(f.value),
56
+ ref: "image",
57
+ onLoad: Y
58
+ }, null, 44, b)
59
+ ], 32));
60
+ }
61
+ }, $ = /* @__PURE__ */ T(S, [["__scopeId", "data-v-b2af8556"]]);
62
+ export {
63
+ $ as default
64
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../globals/components/sections/Title.vue.cjs"),l=require("../sections/GalleryWithCategories.vue.cjs"),o={class:"wrapper"},s={style:{"min-height":"100vh"}},a={__name:"Gallery",setup(c){return(t,i)=>(e.openBlock(),e.createElementBlock("div",o,[e.createVNode(r.default,{text:t.$t("gallery.title"),class:"pd-medium"},null,8,["text"]),e.createElementVNode("div",s,[e.createVNode(l.default)])]))}};exports.default=a;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Feed/Feed.vue.cjs"),f=require("../../../../components/Popup/Popup.vue2.cjs"),m=require("../../../globals/components/sections/SectionPageTitle.vue.cjs"),b=require("../blocks/PhotoViewer.vue.cjs"),g=require("../../store/gallery.cjs"),h={class:"cols-1 gap-thin pd-thin"},P={class:"w-100 h-100 pos-relative"},_=["src","onClick"],k={__name:"Gallery",setup(w){const d=e.ref([]),a=e.ref("all");let o=e.ref({param:"createdAt",order:"desc",options:[{label:"Date",value:"createdAt"},{label:"Popularity",value:"views"},{label:"Creator",value:"creator"}]}),r=e.ref({start:null,end:null});const n=e.ref(null),u=e.ref(!1);function c(s){u.value=!0,n.value=s}function p(){u.value=!1,n.value=null}return(s,l)=>(e.openBlock(),e.createElementBlock("div",h,[e.createVNode(m.default,{title:s.$t("gallery.title"),"onUpdate:tabs_current":l[0]||(l[0]=t=>a.value=t),tabs_current:a.value,tabs:[{name:"All",value:"all"},{name:"Place",value:"place"},{name:"Drinks",value:"drinks"},{name:"People",value:"people"},{name:"Events",value:"events"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["title","tabs_current"]),e.createVNode(f.default,{onClosePopup:p,isPopupOpen:u.value,class:"bg-black o-hidden w-100 h-100 radius-big"},{default:e.withCtx(()=>[e.createVNode(b.default,{photoUrl:n.value.image},null,8,["photoUrl"])]),_:1},8,["isPopupOpen"]),e.createVNode(v.default,{items:d.value,"onUpdate:items":l[1]||(l[1]=t=>d.value=t),sort:e.unref(o),"onUpdate:sort":l[2]||(l[2]=t=>e.isRef(o)?o.value=t:o=t),date:e.unref(r),"onUpdate:date":l[3]||(l[3]=t=>e.isRef(r)?r.value=t:r=t),states:{empty:{title:"No Photos Found",description:"Currently, there are no photos in gallery."}},store:{read:t=>e.unref(g.default).read(t)},options:{limit:15,status:"published",...a.value!=="all"&&{tags:a.value}},class:"cols-3 gap-thin"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,i=>(e.openBlock(),e.createElementBlock("div",{key:i._id,class:"bg-light radius-medium o-hidden flex-column pos-relative flex-wrap"},[e.createElementVNode("div",P,[e.createElementVNode("img",{src:(s.FILE_SERVER_URL||"")+i.cover,class:"w-100 h-100 object-fit-cover bg-black",onClick:y=>c(i)},null,8,_)])]))),128))]),_:1},8,["items","sort","date","store","options"])]))}};exports.default=k;
@@ -1,20 +1,107 @@
1
- import { openBlock as r, createElementBlock as o, createVNode as e, createElementVNode as s } from "vue";
2
- import a from "../../../globals/components/sections/Title.vue.js";
3
- import c from "../sections/GalleryWithCategories.vue.js";
4
- const l = { class: "wrapper" }, m = { style: { "min-height": "100vh" } }, f = {
1
+ import { ref as l, openBlock as d, createElementBlock as m, createVNode as n, withCtx as f, unref as c, isRef as b, Fragment as P, renderList as w, createElementVNode as g } from "vue";
2
+ import k from "../../../../components/Feed/Feed.vue.js";
3
+ import y from "../../../../components/Popup/Popup.vue2.js";
4
+ import U from "../../../globals/components/sections/SectionPageTitle.vue.js";
5
+ import C from "../blocks/PhotoViewer.vue.js";
6
+ import E from "../../store/gallery.js";
7
+ const R = { class: "cols-1 gap-thin pd-thin" }, V = { class: "w-100 h-100 pos-relative" }, x = ["src", "onClick"], j = {
5
8
  __name: "Gallery",
6
- setup(_) {
7
- return (t, i) => (r(), o("div", l, [
8
- e(a, {
9
- text: t.$t("gallery.title"),
10
- class: "pd-medium"
11
- }, null, 8, ["text"]),
12
- s("div", m, [
13
- e(c)
14
- ])
9
+ setup(A) {
10
+ const v = l([]), a = l("all");
11
+ let o = l({
12
+ param: "createdAt",
13
+ order: "desc",
14
+ options: [{
15
+ label: "Date",
16
+ value: "createdAt"
17
+ }, {
18
+ label: "Popularity",
19
+ value: "views"
20
+ }, {
21
+ label: "Creator",
22
+ value: "creator"
23
+ }]
24
+ }), s = l({
25
+ start: null,
26
+ end: null
27
+ });
28
+ const i = l(null), u = l(!1);
29
+ function _(r) {
30
+ u.value = !0, i.value = r;
31
+ }
32
+ function h() {
33
+ u.value = !1, i.value = null;
34
+ }
35
+ return (r, t) => (d(), m("div", R, [
36
+ n(U, {
37
+ title: r.$t("gallery.title"),
38
+ "onUpdate:tabs_current": t[0] || (t[0] = (e) => a.value = e),
39
+ tabs_current: a.value,
40
+ tabs: [
41
+ { name: "All", value: "all" },
42
+ { name: "Place", value: "place" },
43
+ { name: "Drinks", value: "drinks" },
44
+ { name: "People", value: "people" },
45
+ { name: "Events", value: "events" }
46
+ ],
47
+ class: "mn-b-small bg-light bg-light radius-big"
48
+ }, null, 8, ["title", "tabs_current"]),
49
+ n(y, {
50
+ onClosePopup: h,
51
+ isPopupOpen: u.value,
52
+ class: "bg-black o-hidden w-100 h-100 radius-big"
53
+ }, {
54
+ default: f(() => [
55
+ n(C, {
56
+ photoUrl: i.value.image
57
+ }, null, 8, ["photoUrl"])
58
+ ]),
59
+ _: 1
60
+ }, 8, ["isPopupOpen"]),
61
+ n(k, {
62
+ items: v.value,
63
+ "onUpdate:items": t[1] || (t[1] = (e) => v.value = e),
64
+ sort: c(o),
65
+ "onUpdate:sort": t[2] || (t[2] = (e) => b(o) ? o.value = e : o = e),
66
+ date: c(s),
67
+ "onUpdate:date": t[3] || (t[3] = (e) => b(s) ? s.value = e : s = e),
68
+ states: {
69
+ empty: {
70
+ title: "No Photos Found",
71
+ description: "Currently, there are no photos in gallery."
72
+ }
73
+ },
74
+ store: {
75
+ read: (e) => c(E).read(e)
76
+ },
77
+ options: {
78
+ limit: 15,
79
+ status: "published",
80
+ ...a.value !== "all" && { tags: a.value }
81
+ },
82
+ class: "cols-3 gap-thin"
83
+ }, {
84
+ default: f(({
85
+ items: e
86
+ }) => [
87
+ (d(!0), m(P, null, w(e, (p) => (d(), m("div", {
88
+ key: p._id,
89
+ class: "bg-light radius-medium o-hidden flex-column pos-relative flex-wrap"
90
+ }, [
91
+ g("div", V, [
92
+ g("img", {
93
+ src: (r.FILE_SERVER_URL || "") + p.cover,
94
+ class: "w-100 h-100 object-fit-cover bg-black",
95
+ onClick: (F) => _(p)
96
+ }, null, 8, x)
97
+ ])
98
+ ]))), 128))
99
+ ]),
100
+ _: 1
101
+ }, 8, ["items", "sort", "date", "store", "options"])
15
102
  ]));
16
103
  }
17
104
  };
18
105
  export {
19
- f as default
106
+ j as default
20
107
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("vue-router");require("../../../../components/Field/Field.vue.cjs");const k=require("../../../../components/Button/Button.vue2.cjs");require("../../../../components/Select/Select.vue2.cjs");const q=require("../../../../components/Chips/Chips.vue.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const w=require("../../../../components/Popup/Popup.vue.cjs"),B=require("../../../../components/Feed/Feed.vue.cjs"),h=require("../../../auth/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const s=require("../../store/gallery.cjs"),N=require("../../../globals/components/blocks/CardHeader.vue.cjs"),V=require("../../../globals/components/sections/SectionPageTitle.vue.cjs"),C=require("../../../../components/EditImages/EditImages.vue.cjs"),E=require("../../../../components/FieldTags/BlockTags.vue.cjs"),U={class:"cols-1 gap-thin pd-thin"},x=["src"],I={class:"pd-small"},T=["src"],A={__name:"BackofficeGallery",setup(F){const p=y.useRoute(),u=e.ref("all"),i=e.ref(!1);function g(l){i.value=!0,m.value=l}function d(){i.value=!1,m.value=null}const m=e.ref(null);e.ref("all");const r=e.ref({tags:null,image:null}),n=e.ref([]),v=l=>{n.value=l};e.ref(null);const c=e.ref([]),b=async l=>{await s.default.delete(l)},P=async()=>{await s.default.update(r.value),d()},_=async()=>{if(n.length<1){alert("Upload at least 1 image");return}let l=await s.default.create({images:n.value,tags:r.value.tags,owner:{type:"Organization",target:p.params._id},creator:{type:"User",target:h.state.user._id}});for(let t of l)s.default.addItem(t,c.value)};return e.onMounted(async()=>{}),(l,t)=>(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(V.default,{title:"Manage Gallery","onUpdate:tabs_current":t[0]||(t[0]=a=>u.value=a),tabs_current:u.value,tabs:[{name:"All",value:"all"},{name:"Featured",value:"featured"},{name:"Published",value:"published"},{name:"Draft",value:"draft"},{name:"Archived",value:"archived"}],actions:[{method:()=>g(null),label:"Add Photo"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["tabs_current","actions"]),e.createVNode(B.default,{items:c.value,"onUpdate:items":t[2]||(t[2]=a=>c.value=a),sort:e.unref(s.default).state.sort,"onUpdate:sort":t[3]||(t[3]=a=>e.unref(s.default).state.sort=a),search:!0,states:{empty:{title:"No Photos Found",description:"Currently, there are no photos in gallery."}},store:{read:a=>e.unref(s.default).read(a)},options:{limit:15,owner:e.unref(p).params._id,...u.value!=="all"&&{status:u.value}},class:"cols-3 gap-thin"},{default:e.withCtx(({items:a})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,o=>{var f;return e.openBlock(),e.createElementBlock("div",{key:o._id,class:"bg-light radius-small flex-column pos-relative flex-wrap"},[e.createVNode(N.default,{entity:o,entityType:"photo",user:h.state.user._id,owner:o.creator,creator:o.creator,date:o.createdAt,actions:[{method:()=>b(o._id),label:"Delete"}],class:"pd-small mn-b-small"},null,8,["entity","user","owner","creator","date","actions"]),e.createElementVNode("img",{src:(l.FILE_SERVER_URL||"")+o.cover,class:"w-100 h-20r object-fit-contain bg-black",onClick:t[1]||(t[1]=O=>g(l.photo))},null,8,x),e.createElementVNode("div",I,[((f=o.tags)==null?void 0:f.length)>0?(e.openBlock(),e.createBlock(q.default,{key:0,chips:o.tags},null,8,["chips"])):e.createCommentVNode("",!0)])])}),128))]),_:1},8,["items","sort","store","options"]),e.createVNode(w.default,{title:"Add photo",onClosePopup:d,isPopupOpen:i.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[r.value.cover?(e.openBlock(),e.createElementBlock("img",{key:0,src:r.value.cover,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,T)):e.createCommentVNode("",!0),e.createVNode(C.default,{images:n.value,uploadPath:"/photos","onUpdate:images":v,class:"mn-b-semi bg-light radius-medium"},null,8,["images"]),e.createVNode(E.default,{onTagsChanged:t[4]||(t[4]=a=>r.value.tags=a),tags:r.value.tags},null,8,["tags"]),e.createVNode(k.default,{submit:r.value._id?P:_,callback:d,class:"mn-b-thin bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value._id?"Update":"Publish"),1)]),_:1},8,["submit"])]),_:1},8,["isPopupOpen"])]))}};exports.default=A;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("vue-router");require("../../../../components/Field/Field.vue.cjs");const w=require("../../../../components/Button/Button.vue2.cjs");require("../../../../components/Select/Select.vue.cjs");const B=require("../../../../components/Chips/Chips.vue.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const _=require("../../../../components/Popup/Popup.vue2.cjs"),E=require("../../../../components/Feed/Feed.vue.cjs"),k=require("../../../auth/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const o=require("../../store/gallery.cjs"),U=require("../../../globals/components/blocks/CardHeader.vue.cjs"),A=require("../../../globals/components/sections/SectionPageTitle.vue.cjs"),I=require("../blocks/PhotoViewer.vue.cjs"),O=require("../../../../components/EditImages/EditImages.vue.cjs"),T=require("../../../../components/FieldTags/BlockTags.vue.cjs"),R={class:"cols-1 gap-thin pd-thin"},S={class:"pos-relative"},D=["src","onClick"],F={class:"pos-absolute pos-t-0 pos-r-0 pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-r-small mn-t-small w-min bg-second radius-extra"},j={class:"pd-small"},L=["src"],G={class:"flex-nowrap flex gap-thin"},M={__name:"BackofficeGallery",setup(z){const h=C.useRoute(),i=e.ref("all");let c=e.ref({param:"createdAt",order:"desc",options:[{label:"Date",value:"createdAt"},{label:"Popularity",value:"views"},{label:"Creator",value:"creator"}]}),p=e.ref({start:null,end:null});const f=e.ref(!1);function x(a){f.value=!0,u.value=a}function y(){f.value=!1,u.value=null}const m=e.ref(!1);function V(a){m.value=!0,u.value=a}function v(){m.value=!1,u.value=null,n.value=[],r.value={tags:null,image:null}}const u=e.ref(null);e.ref("all");const r=e.ref({tags:null,image:null}),n=e.ref([]),N=a=>{n.value=a},d=e.ref([]),q=async a=>{await o.default.delete(a._id),o.default.removeItem(a,d.value)},g=async(a,s)=>{a.status=s,await o.default.update(a),o.default.updateItem(a,d.value)},b=async a=>{if(n.length<1){alert("Upload at least 1 image");return}let s=await o.default.create({images:n.value,tags:r.value.tags,status:a,owner:{type:"Organization",target:h.params._id},creator:{type:"User",target:k.state.user._id}});for(let t of s)o.default.addItem(t,d.value)};return(a,s)=>(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(A.default,{title:"Gallery","onUpdate:tabs_current":s[0]||(s[0]=t=>i.value=t),tabs_current:i.value,tabs:[{name:"All",value:"all"},{name:"Featured",value:"featured"},{name:"Published",value:"published"},{name:"Draft",value:"draft"},{name:"Archived",value:"archived"}],actions:[{method:()=>V(null),label:"Add Photo"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["tabs_current","actions"]),e.createVNode(E.default,{items:d.value,"onUpdate:items":s[1]||(s[1]=t=>d.value=t),sort:e.unref(c),"onUpdate:sort":s[2]||(s[2]=t=>e.isRef(c)?c.value=t:c=t),date:e.unref(p),"onUpdate:date":s[3]||(s[3]=t=>e.isRef(p)?p.value=t:p=t),states:{empty:{title:"No Photos Found",description:"Currently, there are no photos in gallery."}},store:{read:t=>e.unref(o.default).read(t)},options:{limit:15,owner:e.unref(h).params._id,...i.value!=="all"&&{status:i.value}},class:"cols-3 gap-thin"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,l=>{var P;return e.openBlock(),e.createElementBlock("div",{key:l._id,class:"bg-light radius-small flex-column pos-relative flex-wrap"},[e.createVNode(U.default,{entity:l,entityType:"photo",user:k.state.user._id,owner:l.creator,creator:l.creator,date:l.createdAt,actions:[{method:()=>q(l),label:"Delete"},{method:()=>g(l,"archived"),label:"Archive"},l.status==="draft"?{method:()=>g(l,"published"),label:"Publish"}:{method:()=>g(l,"draft"),label:"Draft"}],class:"pd-small mn-b-small"},null,8,["entity","user","owner","creator","date","actions"]),e.createElementVNode("div",S,[e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+l.cover,class:"w-100 h-20r object-fit-contain bg-black",onClick:H=>x(l)},null,8,D),e.createElementVNode("div",F,e.toDisplayString(l.status),1)]),e.createElementVNode("div",j,[((P=l.tags)==null?void 0:P.length)>0?(e.openBlock(),e.createBlock(B.default,{key:0,chips:l.tags},null,8,["chips"])):e.createCommentVNode("",!0)])])}),128))]),_:1},8,["items","sort","date","store","options"]),e.createVNode(_.default,{onClosePopup:y,isPopupOpen:f.value,class:"bg-black o-hidden w-100 h-100 radius-big"},{default:e.withCtx(()=>[e.createVNode(I.default,{photoUrl:u.value.image},null,8,["photoUrl"])]),_:1},8,["isPopupOpen"]),e.createVNode(_.default,{title:"Add Photo",onClosePopup:v,isPopupOpen:m.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[r.value.cover?(e.openBlock(),e.createElementBlock("img",{key:0,src:r.value.cover,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,L)):e.createCommentVNode("",!0),e.createVNode(O.default,{images:n.value,uploadPath:"/photos","onUpdate:images":N,class:"mn-b-semi bg-light radius-medium"},null,8,["images"]),e.createVNode(T.default,{onTagsChanged:s[4]||(s[4]=t=>r.value.tags=t),tags:r.value.tags,tagsSuggested:[{text:"people"},{text:"events"},{text:"place"},{text:"food"},{text:"drinks"},{text:"special"}],class:"mn-b-semi"},null,8,["tags"]),e.createElementVNode("div",G,[e.createVNode(w.default,{submit:()=>b("draft"),callback:v,class:"t-nowrap bg-second w-100"},{default:e.withCtx(()=>[e.createTextVNode(" To drafts ")]),_:1},8,["submit"]),e.createVNode(w.default,{submit:()=>b("published"),callback:v,class:"bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(" Publish ")]),_:1},8,["submit"])])]),_:1},8,["isPopupOpen"])]))}};exports.default=M;
@@ -1,68 +1,92 @@
1
- import { ref as l, onMounted as A, openBlock as i, createElementBlock as c, createVNode as r, unref as d, withCtx as h, Fragment as E, renderList as I, createElementVNode as P, createBlock as N, createCommentVNode as w, createTextVNode as V, toDisplayString as B } from "vue";
2
- import { useRoute as F } from "vue-router";
1
+ import { ref as s, openBlock as d, createElementBlock as h, createVNode as o, unref as b, isRef as C, withCtx as c, Fragment as F, renderList as S, createElementVNode as m, toDisplayString as T, createBlock as L, createCommentVNode as A, createTextVNode as I } from "vue";
2
+ import { useRoute as j } from "vue-router";
3
3
  import "../../../../components/Field/Field.vue.js";
4
4
  import O from "../../../../components/Button/Button.vue2.js";
5
- import "../../../../components/Select/Select.vue2.js";
6
- import R from "../../../../components/Chips/Chips.vue.js";
5
+ import "../../../../components/Select/Select.vue.js";
6
+ import G from "../../../../components/Chips/Chips.vue.js";
7
7
  import "../../../../components/SelectMulti/SelectMulti.vue2.js";
8
- import D from "../../../../components/Popup/Popup.vue.js";
9
- import L from "../../../../components/Feed/Feed.vue.js";
10
- import { state as k } from "../../../auth/store/auth.js";
8
+ import V from "../../../../components/Popup/Popup.vue2.js";
9
+ import z from "../../../../components/Feed/Feed.vue.js";
10
+ import { state as $ } from "../../../auth/store/auth.js";
11
11
  import "../../../organizations/store/organizations.js";
12
- import n from "../../store/gallery.js";
13
- import T from "../../../globals/components/blocks/CardHeader.vue.js";
14
- import j from "../../../globals/components/sections/SectionPageTitle.vue.js";
15
- import G from "../../../../components/EditImages/EditImages.vue.js";
12
+ import r from "../../store/gallery.js";
13
+ import q from "../../../globals/components/blocks/CardHeader.vue.js";
14
+ import H from "../../../globals/components/sections/SectionPageTitle.vue.js";
15
+ import J from "../blocks/PhotoViewer.vue.js";
16
+ import K from "../../../../components/EditImages/EditImages.vue.js";
16
17
  import M from "../../../../components/FieldTags/BlockTags.vue.js";
17
- const S = { class: "cols-1 gap-thin pd-thin" }, z = ["src"], q = { class: "pd-small" }, H = ["src"], ce = {
18
+ const Q = { class: "cols-1 gap-thin pd-thin" }, W = { class: "pos-relative" }, X = ["src", "onClick"], Y = { class: "pos-absolute pos-t-0 pos-r-0 pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-r-small mn-t-small w-min bg-second radius-extra" }, Z = { class: "pd-small" }, ee = ["src"], te = { class: "flex-nowrap flex gap-thin" }, we = {
18
19
  __name: "BackofficeGallery",
19
- setup(J) {
20
- const v = F(), u = l("all"), p = l(!1);
21
- function _(a) {
22
- p.value = !0, b.value = a;
20
+ setup(ae) {
21
+ const x = j(), v = s("all");
22
+ let f = s({
23
+ param: "createdAt",
24
+ order: "desc",
25
+ options: [{
26
+ label: "Date",
27
+ value: "createdAt"
28
+ }, {
29
+ label: "Popularity",
30
+ value: "views"
31
+ }, {
32
+ label: "Creator",
33
+ value: "creator"
34
+ }]
35
+ }), g = s({
36
+ start: null,
37
+ end: null
38
+ });
39
+ const _ = s(!1);
40
+ function D(t) {
41
+ _.value = !0, i.value = t;
42
+ }
43
+ function E() {
44
+ _.value = !1, i.value = null;
45
+ }
46
+ const P = s(!1);
47
+ function N(t) {
48
+ P.value = !0, i.value = t;
23
49
  }
24
- function g() {
25
- p.value = !1, b.value = null;
50
+ function w() {
51
+ P.value = !1, i.value = null, u.value = [], n.value = { tags: null, image: null };
26
52
  }
27
- const b = l(null);
28
- l("all");
29
- const s = l({
53
+ const i = s(null);
54
+ s("all");
55
+ const n = s({
30
56
  tags: null,
31
57
  image: null
32
- }), m = l([]), U = (a) => {
33
- m.value = a;
34
- };
35
- l(null);
36
- const f = l([]), $ = async (a) => {
37
- await n.delete(a);
38
- }, C = async () => {
39
- await n.update(s.value), g();
40
- }, x = async () => {
41
- if (m.length < 1) {
58
+ }), u = s([]), R = (t) => {
59
+ u.value = t;
60
+ }, p = s([]), B = async (t) => {
61
+ await r.delete(t._id), r.removeItem(t, p.value);
62
+ }, y = async (t, l) => {
63
+ t.status = l, await r.update(t), r.updateItem(t, p.value);
64
+ }, k = async (t) => {
65
+ if (u.length < 1) {
42
66
  alert("Upload at least 1 image");
43
67
  return;
44
68
  }
45
- let a = await n.create({
46
- images: m.value,
47
- tags: s.value.tags,
69
+ let l = await r.create({
70
+ images: u.value,
71
+ tags: n.value.tags,
72
+ status: t,
48
73
  owner: {
49
74
  type: "Organization",
50
- target: v.params._id
75
+ target: x.params._id
51
76
  },
52
77
  creator: {
53
78
  type: "User",
54
- target: k.user._id
79
+ target: $.user._id
55
80
  }
56
81
  });
57
- for (let e of a)
58
- n.addItem(e, f.value);
82
+ for (let e of l)
83
+ r.addItem(e, p.value);
59
84
  };
60
- return A(async () => {
61
- }), (a, e) => (i(), c("div", S, [
62
- r(j, {
63
- title: "Manage Gallery",
64
- "onUpdate:tabs_current": e[0] || (e[0] = (t) => u.value = t),
65
- tabs_current: u.value,
85
+ return (t, l) => (d(), h("div", Q, [
86
+ o(H, {
87
+ title: "Gallery",
88
+ "onUpdate:tabs_current": l[0] || (l[0] = (e) => v.value = e),
89
+ tabs_current: v.value,
66
90
  tabs: [
67
91
  { name: "All", value: "all" },
68
92
  { name: "Featured", value: "featured" },
@@ -71,16 +95,17 @@ const S = { class: "cols-1 gap-thin pd-thin" }, z = ["src"], q = { class: "pd-sm
71
95
  { name: "Archived", value: "archived" }
72
96
  ],
73
97
  actions: [
74
- { method: () => _(null), label: "Add Photo" }
98
+ { method: () => N(null), label: "Add Photo" }
75
99
  ],
76
100
  class: "mn-b-small bg-light bg-light radius-big"
77
101
  }, null, 8, ["tabs_current", "actions"]),
78
- r(L, {
79
- items: f.value,
80
- "onUpdate:items": e[2] || (e[2] = (t) => f.value = t),
81
- sort: d(n).state.sort,
82
- "onUpdate:sort": e[3] || (e[3] = (t) => d(n).state.sort = t),
83
- search: !0,
102
+ o(z, {
103
+ items: p.value,
104
+ "onUpdate:items": l[1] || (l[1] = (e) => p.value = e),
105
+ sort: b(f),
106
+ "onUpdate:sort": l[2] || (l[2] = (e) => C(f) ? f.value = e : f = e),
107
+ date: b(g),
108
+ "onUpdate:date": l[3] || (l[3] = (e) => C(g) ? g.value = e : g = e),
84
109
  states: {
85
110
  empty: {
86
111
  title: "No Photos Found",
@@ -88,84 +113,122 @@ const S = { class: "cols-1 gap-thin pd-thin" }, z = ["src"], q = { class: "pd-sm
88
113
  }
89
114
  },
90
115
  store: {
91
- read: (t) => d(n).read(t)
116
+ read: (e) => b(r).read(e)
92
117
  },
93
118
  options: {
94
119
  limit: 15,
95
- owner: d(v).params._id,
96
- ...u.value !== "all" && { status: u.value }
120
+ owner: b(x).params._id,
121
+ ...v.value !== "all" && { status: v.value }
97
122
  },
98
123
  class: "cols-3 gap-thin"
99
124
  }, {
100
- default: h(({
101
- items: t
125
+ default: c(({
126
+ items: e
102
127
  }) => [
103
- (i(!0), c(E, null, I(t, (o) => {
104
- var y;
105
- return i(), c("div", {
106
- key: o._id,
128
+ (d(!0), h(F, null, S(e, (a) => {
129
+ var U;
130
+ return d(), h("div", {
131
+ key: a._id,
107
132
  class: "bg-light radius-small flex-column pos-relative flex-wrap"
108
133
  }, [
109
- r(T, {
110
- entity: o,
134
+ o(q, {
135
+ entity: a,
111
136
  entityType: "photo",
112
- user: k.user._id,
113
- owner: o.creator,
114
- creator: o.creator,
115
- date: o.createdAt,
137
+ user: $.user._id,
138
+ owner: a.creator,
139
+ creator: a.creator,
140
+ date: a.createdAt,
116
141
  actions: [
117
- { method: () => $(o._id), label: "Delete" }
142
+ { method: () => B(a), label: "Delete" },
143
+ { method: () => y(a, "archived"), label: "Archive" },
144
+ a.status === "draft" ? { method: () => y(a, "published"), label: "Publish" } : { method: () => y(a, "draft"), label: "Draft" }
118
145
  ],
119
146
  class: "pd-small mn-b-small"
120
147
  }, null, 8, ["entity", "user", "owner", "creator", "date", "actions"]),
121
- P("img", {
122
- src: (a.FILE_SERVER_URL || "") + o.cover,
123
- class: "w-100 h-20r object-fit-contain bg-black",
124
- onClick: e[1] || (e[1] = (K) => _(a.photo))
125
- }, null, 8, z),
126
- P("div", q, [
127
- ((y = o.tags) == null ? void 0 : y.length) > 0 ? (i(), N(R, {
148
+ m("div", W, [
149
+ m("img", {
150
+ src: (t.FILE_SERVER_URL || "") + a.cover,
151
+ class: "w-100 h-20r object-fit-contain bg-black",
152
+ onClick: (le) => D(a)
153
+ }, null, 8, X),
154
+ m("div", Y, T(a.status), 1)
155
+ ]),
156
+ m("div", Z, [
157
+ ((U = a.tags) == null ? void 0 : U.length) > 0 ? (d(), L(G, {
128
158
  key: 0,
129
- chips: o.tags
130
- }, null, 8, ["chips"])) : w("", !0)
159
+ chips: a.tags
160
+ }, null, 8, ["chips"])) : A("", !0)
131
161
  ])
132
162
  ]);
133
163
  }), 128))
134
164
  ]),
135
165
  _: 1
136
- }, 8, ["items", "sort", "store", "options"]),
137
- r(D, {
138
- title: "Add photo",
139
- onClosePopup: g,
140
- isPopupOpen: p.value,
166
+ }, 8, ["items", "sort", "date", "store", "options"]),
167
+ o(V, {
168
+ onClosePopup: E,
169
+ isPopupOpen: _.value,
170
+ class: "bg-black o-hidden w-100 h-100 radius-big"
171
+ }, {
172
+ default: c(() => [
173
+ o(J, {
174
+ photoUrl: i.value.image
175
+ }, null, 8, ["photoUrl"])
176
+ ]),
177
+ _: 1
178
+ }, 8, ["isPopupOpen"]),
179
+ o(V, {
180
+ title: "Add Photo",
181
+ onClosePopup: w,
182
+ isPopupOpen: P.value,
141
183
  class: "bg-white w-max-30r radius-big pd-big"
142
184
  }, {
143
- default: h(() => [
144
- s.value.cover ? (i(), c("img", {
185
+ default: c(() => [
186
+ n.value.cover ? (d(), h("img", {
145
187
  key: 0,
146
- src: s.value.cover,
188
+ src: n.value.cover,
147
189
  class: "radius-small w-100 mn-b-small h-20r object-fit-cover"
148
- }, null, 8, H)) : w("", !0),
149
- r(G, {
150
- images: m.value,
190
+ }, null, 8, ee)) : A("", !0),
191
+ o(K, {
192
+ images: u.value,
151
193
  uploadPath: "/photos",
152
- "onUpdate:images": U,
194
+ "onUpdate:images": R,
153
195
  class: "mn-b-semi bg-light radius-medium"
154
196
  }, null, 8, ["images"]),
155
- r(M, {
156
- onTagsChanged: e[4] || (e[4] = (t) => s.value.tags = t),
157
- tags: s.value.tags
197
+ o(M, {
198
+ onTagsChanged: l[4] || (l[4] = (e) => n.value.tags = e),
199
+ tags: n.value.tags,
200
+ tagsSuggested: [
201
+ { text: "people" },
202
+ { text: "events" },
203
+ { text: "place" },
204
+ { text: "food" },
205
+ { text: "drinks" },
206
+ { text: "special" }
207
+ ],
208
+ class: "mn-b-semi"
158
209
  }, null, 8, ["tags"]),
159
- r(O, {
160
- submit: s.value._id ? C : x,
161
- callback: g,
162
- class: "mn-b-thin bg-main w-100"
163
- }, {
164
- default: h(() => [
165
- V(B(s.value._id ? "Update" : "Publish"), 1)
166
- ]),
167
- _: 1
168
- }, 8, ["submit"])
210
+ m("div", te, [
211
+ o(O, {
212
+ submit: () => k("draft"),
213
+ callback: w,
214
+ class: "t-nowrap bg-second w-100"
215
+ }, {
216
+ default: c(() => [
217
+ I(" To drafts ")
218
+ ]),
219
+ _: 1
220
+ }, 8, ["submit"]),
221
+ o(O, {
222
+ submit: () => k("published"),
223
+ callback: w,
224
+ class: "bg-main w-100"
225
+ }, {
226
+ default: c(() => [
227
+ I(" Publish ")
228
+ ]),
229
+ _: 1
230
+ }, 8, ["submit"])
231
+ ])
169
232
  ]),
170
233
  _: 1
171
234
  }, 8, ["isPopupOpen"])
@@ -173,5 +236,5 @@ const S = { class: "cols-1 gap-thin pd-thin" }, z = ["src"], q = { class: "pd-sm
173
236
  }
174
237
  };
175
238
  export {
176
- ce as default
239
+ we as default
177
240
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),V=require("vue-router"),C=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),x=require("../../../reports/components/sections/FormReport.vue.cjs"),N=require("../../../../components/Tooltip/Tooltip.vue.cjs"),v=require("../../../../components/Dropdown/Dropdown.vue2.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");const $=require("../../../icons/navigation/IconEllipsis.vue.cjs"),S={key:0,class:"pd-b-zero"},z={class:"w-100 flex-v-center flex-nojustify flex"},D={class:"w-100 flex-nowrap flex-v-center flex"},M=["src"],q={key:2,class:"t-semi"},R={key:1,class:"pos-relative"},F={key:2},P={class:"d-block mn-l-auto flex-nowrap flex flex-v-center"},T={key:0,class:"w-4r pos-relative i-thin"},U={style:{position:"absolute",top:"0px",right:"0px"},class:"br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"},L=["src"],I={class:"bg-black pd-thin radius-small"},O=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),j=["onClick"],A={__name:"CardHeader",props:["user","entity","entityType","date","dateFormatted","owner","creator","members","membersPhotos","type","actions"],setup(t){V.useRouter();function E(n){const r=new Date,d=new Date(n),u=Math.abs(r-d),m=Math.floor(u/1e3),a=Math.floor(m/60),s=Math.floor(a/60),i=Math.floor(s/24),c=Math.floor(i/7);return c>0?`${c} week${c>1?"s":""} ago`:i>0?`${i} day${i>1?"s":""} ago`:s>0?`${s} hour${s>1?"s":""} ago`:a>0?`${a} minute${a>1?"s":""} ago`:"Just now"}return(n,r)=>{var u,m,a,s,i,c,k,h,b,g,f,y,w,B,p;const d=e.resolveComponent("router-link");return t.owner?(e.openBlock(),e.createElementBlock("header",S,[e.createElementVNode("div",z,[e.createElementVNode("div",D,[((a=(m=(u=t.owner.target)==null?void 0:u.profile)==null?void 0:m.photo)==null?void 0:a.length)>0&&t.type!=="short"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(n.FILE_SERVER_URL||"")+t.owner.target.profile.photo,class:"radius-medium object-fit-cover mn-r-thin i-thin",onClick:r[0]||(r[0]=e.withModifiers(o=>n.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},null,8,M)):e.createCommentVNode("",!0),!((i=(s=t.owner.target)==null?void 0:s.profile)!=null&&i.photo)&&t.type!=="short"?(e.openBlock(),e.createBlock(C.default,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:r[1]||(r[1]=e.withModifiers(o=>n.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))})):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("span",q,[e.createElementVNode("span",{onClick:r[2]||(r[2]=e.withModifiers(o=>n.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},e.toDisplayString(((k=(c=t.owner.target)==null?void 0:c.profile)==null?void 0:k.name)||((h=t.creator.target)==null?void 0:h.username)||"Anonymous"),1),!t.creator.hidden&&((g=(b=t.owner.target)==null?void 0:b.profile)==null?void 0:g.name)!==((y=(f=t.creator.target)==null?void 0:f.profile)==null?void 0:y.name)?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:r[3]||(r[3]=e.withModifiers(o=>{var l;return n.$router.push({name:"User Profile",params:{_id:(l=t.creator.target)==null?void 0:l._id}})},["stop"]))}," · by "+e.toDisplayString(((B=(w=t.creator.target)==null?void 0:w.profile)==null?void 0:B.name)||((p=t.creator.target)==null?void 0:p.username)||"Anonymous"),1)):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",R,[t.date?(e.openBlock(),e.createBlock(N.default,{key:0,text:n.formatDate(t.date)},{default:e.withCtx(()=>[e.createTextVNode(" · "+e.toDisplayString(E(t.date)),1)]),_:1},8,["text"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.dateFormatted?(e.openBlock(),e.createElementBlock("span",F," · "+e.toDisplayString(t.dateFormatted),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",P,[t.members?(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("span",U,e.toDisplayString(t.members),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.membersPhotos.slice(0,2),(o,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o?(e.openBlock(),e.createElementBlock("img",{key:l,src:(n.FILE_SERVER_URL||"")+o,style:e.normalizeStyle({position:"absolute",top:"0px",right:l*20+20+"%",zIndex:1-l}),class:"br-solid br-2px br-white i-thin bg-light radius-big"},null,12,L)):(e.openBlock(),e.createBlock(C.default,{key:1,style:e.normalizeStyle({position:"absolute",top:"0px",right:l*20+20+"%",zIndex:1-l}),class:"br-solid br-2px br-white i-thin bg-light radius-big"},null,8,["style"]))],64))),256))])):e.createCommentVNode("",!0)]),t.type!=="short"&&t.user?(e.openBlock(),e.createBlock(v.default,{key:3,label:{component:$.default,class:"t-transp i-regular"},align:"right",class:"cursor-pointer z-index-2"},{default:e.withCtx(()=>[e.createElementVNode("section",I,[t.user!==t.creator.target._id?(e.openBlock(),e.createBlock(x.default,{key:0,user:t.user,type:t.entityType,target:t.entity._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[O]),_:1},8,["user","type","target"])):e.createCommentVNode("",!0),t.actions&&t.actions.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.actions,o=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o.to?(e.openBlock(),e.createBlock(d,{key:o.to,to:o.to,class:e.normalizeClass(o.class||"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["to","class"])):e.createCommentVNode("",!0),o.method?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:o.method,class:e.normalizeClass(o.class||"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button")},e.toDisplayString(o.label),11,j)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)}}};exports.default=A;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),x=require("vue-router"),C=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),V=require("../../../reports/components/sections/FormReport.vue.cjs"),N=require("../../../../components/Tooltip/Tooltip.vue2.cjs"),v=require("../../../../components/Dropdown/Dropdown.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");const $=require("../../../icons/navigation/IconEllipsis.vue.cjs"),S={key:0,class:"pd-b-zero"},z={class:"w-100 flex-v-center flex-nojustify flex"},D={class:"w-100 flex-nowrap flex-v-center flex"},M=["src"],q={key:2,class:"t-semi"},R={key:1,class:"pos-relative"},F={key:2},P={class:"d-block mn-l-auto flex-nowrap flex flex-v-center"},T={key:0,class:"w-4r pos-relative i-thin"},U={style:{position:"absolute",top:"0px",right:"0px"},class:"br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"},L=["src"],I={class:"bg-black flex-column flex gap-thin pd-thin radius-small"},O=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),j=["onClick"],A={__name:"CardHeader",props:["user","entity","entityType","date","dateFormatted","owner","creator","members","membersPhotos","type","actions"],setup(t){x.useRouter();function E(n){const r=new Date,d=new Date(n),u=Math.abs(r-d),m=Math.floor(u/1e3),a=Math.floor(m/60),s=Math.floor(a/60),i=Math.floor(s/24),c=Math.floor(i/7);return c>0?`${c} week${c>1?"s":""} ago`:i>0?`${i} day${i>1?"s":""} ago`:s>0?`${s} hour${s>1?"s":""} ago`:a>0?`${a} minute${a>1?"s":""} ago`:"Just now"}return(n,r)=>{var u,m,a,s,i,c,k,h,g,b,f,y,w,B,p;const d=e.resolveComponent("router-link");return t.owner?(e.openBlock(),e.createElementBlock("header",S,[e.createElementVNode("div",z,[e.createElementVNode("div",D,[((a=(m=(u=t.owner.target)==null?void 0:u.profile)==null?void 0:m.photo)==null?void 0:a.length)>0&&t.type!=="short"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(n.FILE_SERVER_URL||"")+t.owner.target.profile.photo,class:"radius-medium object-fit-cover mn-r-thin i-thin",onClick:r[0]||(r[0]=e.withModifiers(o=>n.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},null,8,M)):e.createCommentVNode("",!0),!((i=(s=t.owner.target)==null?void 0:s.profile)!=null&&i.photo)&&t.type!=="short"?(e.openBlock(),e.createBlock(C.default,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:r[1]||(r[1]=e.withModifiers(o=>n.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))})):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("span",q,[e.createElementVNode("span",{onClick:r[2]||(r[2]=e.withModifiers(o=>n.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},e.toDisplayString(((k=(c=t.owner.target)==null?void 0:c.profile)==null?void 0:k.name)||((h=t.creator.target)==null?void 0:h.username)||"Anonymous"),1),!t.creator.hidden&&((b=(g=t.owner.target)==null?void 0:g.profile)==null?void 0:b.name)!==((y=(f=t.creator.target)==null?void 0:f.profile)==null?void 0:y.name)?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:r[3]||(r[3]=e.withModifiers(o=>{var l;return n.$router.push({name:"User Profile",params:{_id:(l=t.creator.target)==null?void 0:l._id}})},["stop"]))}," · by "+e.toDisplayString(((B=(w=t.creator.target)==null?void 0:w.profile)==null?void 0:B.name)||((p=t.creator.target)==null?void 0:p.username)||"Anonymous"),1)):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",R,[t.date?(e.openBlock(),e.createBlock(N.default,{key:0,text:n.formatDate(t.date)},{default:e.withCtx(()=>[e.createTextVNode(" · "+e.toDisplayString(E(t.date)),1)]),_:1},8,["text"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.dateFormatted?(e.openBlock(),e.createElementBlock("span",F," · "+e.toDisplayString(t.dateFormatted),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",P,[t.members?(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("span",U,e.toDisplayString(t.members),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.membersPhotos.slice(0,2),(o,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o?(e.openBlock(),e.createElementBlock("img",{key:l,src:(n.FILE_SERVER_URL||"")+o,style:e.normalizeStyle({position:"absolute",top:"0px",right:l*20+20+"%",zIndex:1-l}),class:"br-solid br-2px br-white i-thin bg-light radius-big"},null,12,L)):(e.openBlock(),e.createBlock(C.default,{key:1,style:e.normalizeStyle({position:"absolute",top:"0px",right:l*20+20+"%",zIndex:1-l}),class:"br-solid br-2px br-white i-thin bg-light radius-big"},null,8,["style"]))],64))),256))])):e.createCommentVNode("",!0)]),t.type!=="short"&&t.user?(e.openBlock(),e.createBlock(v.default,{key:3,label:{component:$.default,class:"t-transp i-regular"},align:"right",class:"cursor-pointer z-index-2"},{default:e.withCtx(()=>[e.createElementVNode("section",I,[t.user!==t.creator.target._id?(e.openBlock(),e.createBlock(V.default,{key:0,user:t.user,type:t.entityType,target:t.entity._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[O]),_:1},8,["user","type","target"])):e.createCommentVNode("",!0),t.actions&&t.actions.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.actions,o=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o.to?(e.openBlock(),e.createBlock(d,{key:o.to,to:o.to,class:e.normalizeClass(o.class||"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["to","class"])):e.createCommentVNode("",!0),o.method?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:o.method,class:e.normalizeClass(o.class||"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button")},e.toDisplayString(o.label),11,j)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)}}};exports.default=A;