@ozdao/prometheus-framework 0.2.117 → 0.2.119

Sign up to get free protection for your applications and to get access to all the features.
Files changed (217) 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/Button/Button.vue.cjs +1 -1
  19. package/dist/prometheus-framework/src/components/Button/Button.vue.js +1 -94
  20. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  21. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +94 -1
  22. package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.cjs +1 -1
  23. package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.js +116 -117
  24. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +58 -1
  26. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
  27. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +1 -58
  28. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +123 -109
  30. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  31. package/dist/prometheus-framework/src/components/Field/Field.vue.js +1 -84
  32. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  33. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +84 -1
  34. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  36. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js +32 -26
  38. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -73
  40. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  41. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +77 -1
  42. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -103
  44. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  45. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +103 -1
  46. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +1 -45
  48. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
  49. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +45 -1
  50. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
  52. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  54. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
  56. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
  58. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +2 -2
  60. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +2 -2
  62. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +2 -2
  64. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  66. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +3 -3
  68. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +4 -4
  70. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +17 -18
  72. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  74. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
  75. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
  76. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
  77. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
  78. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  80. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +2 -2
  82. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  84. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +4 -4
  86. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +3 -3
  88. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +44 -69
  90. package/dist/prometheus-framework/src/modules/gallery/components/blocks/PhotoViewer.vue.cjs +1 -0
  91. package/dist/prometheus-framework/src/modules/gallery/components/blocks/PhotoViewer.vue.js +64 -0
  92. package/dist/prometheus-framework/src/modules/gallery/components/blocks/PhotoViewer.vue2.cjs +1 -0
  93. package/dist/prometheus-framework/src/modules/gallery/components/blocks/PhotoViewer.vue2.js +1 -0
  94. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +101 -14
  96. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +167 -104
  98. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
  100. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  102. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +4 -4
  104. package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue.js +38 -1
  106. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.cjs +1 -1
  107. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.js +3 -3
  108. package/dist/prometheus-framework/src/modules/globals/services/globals.store.cjs +1 -1
  109. package/dist/prometheus-framework/src/modules/globals/services/globals.store.js +21 -21
  110. package/dist/prometheus-framework/src/modules/icons/navigation/IconChevronBottom.vue.cjs +1 -0
  111. package/dist/prometheus-framework/src/modules/icons/navigation/IconChevronBottom.vue.js +30 -0
  112. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonBlogpost.vue.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonBlogpost.vue.js +3 -3
  114. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEvent.vue.cjs +1 -1
  115. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEvent.vue.js +1 -1
  116. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEventShort.vue.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEventShort.vue.js +5 -5
  118. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonOrganization.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonOrganization.vue.js +1 -1
  120. package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.cjs +1 -0
  121. package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.js +98 -0
  122. package/dist/prometheus-framework/src/modules/landing/landing.client.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/landing/landing.client.js +6 -4
  124. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  126. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  128. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +4 -4
  130. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +3 -3
  132. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +2 -2
  134. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  136. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  138. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  140. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +4 -4
  142. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  144. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  145. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +4 -4
  146. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
  148. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
  150. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
  152. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +5 -5
  154. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
  156. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  157. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  158. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  159. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  160. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  161. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  162. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  164. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  165. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +3 -3
  166. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  167. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +3 -3
  168. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  169. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
  170. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  171. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  172. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  173. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
  174. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  175. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +31 -32
  176. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  177. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  178. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  179. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
  180. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  181. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
  182. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  183. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
  184. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  185. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +5 -5
  186. package/dist/prometheus-framework.cjs.js +1 -1
  187. package/dist/prometheus-framework.es.js +1 -1
  188. package/dist/queryProcessor-g8208K6g.mjs +178 -0
  189. package/dist/queryProcessor-haY_gPGg.js +177 -0
  190. package/dist/style.css +1 -1
  191. package/dist/wallet.server.js +1 -1
  192. package/dist/wallet.server.mjs +1 -1
  193. package/dist/web-B8tq3Fda.mjs +54 -0
  194. package/dist/web-ByJkgGrt.js +1 -0
  195. package/package.json +1 -1
  196. package/src/components/DatePicker/Calendar.vue +82 -55
  197. package/src/components/Feed/Feed.vue +45 -16
  198. package/src/components/FieldTags/BlockTags.vue +30 -23
  199. package/src/components/Popup/Popup.vue +2 -2
  200. package/src/modules/events/components/pages/Events.vue +2 -48
  201. package/src/modules/gallery/components/blocks/PhotoViewer.vue +115 -0
  202. package/src/modules/gallery/components/pages/Gallery.vue +103 -6
  203. package/src/modules/gallery/components/sections/BackofficeGallery.vue +100 -32
  204. package/src/modules/gallery/controllers/gallery.controller.js +45 -38
  205. package/src/modules/globals/components/blocks/CardHeader.vue +1 -1
  206. package/src/modules/globals/components/elements/ButtonDate.vue +37 -43
  207. package/src/modules/globals/components/layouts/Client.vue +1 -1
  208. package/src/modules/globals/components/sections/SectionPageTitle.vue +1 -1
  209. package/src/modules/globals/controllers/utils/queryProcessor.js +21 -2
  210. package/src/modules/globals/services/globals.store.js +13 -17
  211. package/src/modules/icons/skeletons/SkeletonBlogpost.vue +1 -1
  212. package/src/modules/icons/skeletons/SkeletonEvent.vue +1 -1
  213. package/src/modules/icons/skeletons/SkeletonEventShort.vue +1 -1
  214. package/src/modules/icons/skeletons/SkeletonOrganization.vue +1 -1
  215. package/src/modules/landing/landing.client.js +2 -0
  216. package/src/modules/products/components/sections/FilterProducts.vue +2 -1
  217. 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.vue2.cjs");const k=require("../../../../components/Button/Button.vue.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";
3
- import "../../../../components/Field/Field.vue2.js";
4
- import O from "../../../../components/Button/Button.vue.js";
5
- import "../../../../components/Select/Select.vue2.js";
6
- import R from "../../../../components/Chips/Chips.vue.js";
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
+ import "../../../../components/Field/Field.vue.js";
4
+ import O from "../../../../components/Button/Button.vue2.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"),w=require("vue-router");require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue2.cjs");require("../../../../components/Select/Select.vue2.cjs");require("../../../../components/Upload/Upload.vue2.cjs");require("../../store/gallery.cjs");const N={class:"pd-medium flex-v-center gap-big flex-nowrap flex pd-t-thin pd-b-thin o-scroll"},V=["onClick"],C=["data-id"],B=["src","onClick"],q={class:"modal pd-thin"},M={class:"modal-content radius-big"},S={class:""},x=["src"],I=!1,m=10,z={__name:"GalleryWithCategories",setup(G){w.useRoute();const r=e.ref(null),v=["all","place","drinks","people","events"];let s=1,i=e.ref(null),c=e.ref(!1);const f=e.computed(()=>n.value==="all"?state.gallery:state.gallery.filter(l=>l.categories.includes(n.value))),p=async()=>{c.value=!0,await actions.fetchGallery(s,m),c.value=!1},a=e.ref(null),o=e.ref({categories:"",size:"",image:!1}),h=e.ref(null),g=l=>{I.value?_(l):(a.value="modal",o.value.image=l,d())},_=l=>{a.value="edit-modal",o.value=l||{categories:"",size:"",image:null},d()},k=()=>{o.value={categories:"",size:"",image:!1},h.value=null,y()},d=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},y=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""};let n=e.ref("all");const E=l=>{n.value=l};return e.onMounted(async()=>{await actions.fetchGallery(s,m),typeof window<"u"&&new IntersectionObserver(u=>{u.some(t=>t.isIntersecting)&&(s+=1,p())}).observe(i.value)}),(l,u)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",N,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(v,t=>e.createElementVNode("a",{key:t,onClick:b=>E(t),class:e.normalizeClass(["h3 uppercase",{"t-transp":e.unref(n)!==t,"pd-thin bg-main radius-small":e.unref(n)===t}])},e.toDisplayString(l.$t("gallery.categories."+t)),11,V)),64)),e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:r,class:"pd-medium cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(t,b)=>(e.openBlock(),e.createElementBlock("div",{key:t.id,"data-id":t.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+t.cover,class:"w-100 h-100 o-hidden radius-big object-fit-cover",onClick:$=>g(t.image)},null,8,B)):e.createCommentVNode("",!0)]),_:2},1024)],8,C))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:i,class:"sentinel"},null,512),e.withDirectives(e.createElementVNode("div",q,[e.createElementVNode("div",M,[e.createElementVNode("div",S,[e.createElementVNode("span",{class:"close",onClick:k},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+o.value.image},null,8,x)])])],512),[[e.vShow,o.value.image!==!1&&a.value==="modal"]])],512)]))}};exports.default=z;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("vue-router");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Select/Select.vue2.cjs");require("../../../../components/Upload/Upload.vue2.cjs");require("../../store/gallery.cjs");const N={class:"pd-medium flex-v-center gap-big flex-nowrap flex pd-t-thin pd-b-thin o-scroll"},V=["onClick"],C=["data-id"],B=["src","onClick"],q={class:"modal pd-thin"},M={class:"modal-content radius-big"},S={class:""},x=["src"],I=!1,m=10,z={__name:"GalleryWithCategories",setup(G){w.useRoute();const r=e.ref(null),v=["all","place","drinks","people","events"];let s=1,i=e.ref(null),c=e.ref(!1);const f=e.computed(()=>n.value==="all"?state.gallery:state.gallery.filter(l=>l.categories.includes(n.value))),p=async()=>{c.value=!0,await actions.fetchGallery(s,m),c.value=!1},a=e.ref(null),o=e.ref({categories:"",size:"",image:!1}),h=e.ref(null),g=l=>{I.value?_(l):(a.value="modal",o.value.image=l,d())},_=l=>{a.value="edit-modal",o.value=l||{categories:"",size:"",image:null},d()},k=()=>{o.value={categories:"",size:"",image:!1},h.value=null,y()},d=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},y=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""};let n=e.ref("all");const E=l=>{n.value=l};return e.onMounted(async()=>{await actions.fetchGallery(s,m),typeof window<"u"&&new IntersectionObserver(u=>{u.some(t=>t.isIntersecting)&&(s+=1,p())}).observe(i.value)}),(l,u)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",N,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(v,t=>e.createElementVNode("a",{key:t,onClick:b=>E(t),class:e.normalizeClass(["h3 uppercase",{"t-transp":e.unref(n)!==t,"pd-thin bg-main radius-small":e.unref(n)===t}])},e.toDisplayString(l.$t("gallery.categories."+t)),11,V)),64)),e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:r,class:"pd-medium cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(t,b)=>(e.openBlock(),e.createElementBlock("div",{key:t.id,"data-id":t.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+t.cover,class:"w-100 h-100 o-hidden radius-big object-fit-cover",onClick:$=>g(t.image)},null,8,B)):e.createCommentVNode("",!0)]),_:2},1024)],8,C))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:i,class:"sentinel"},null,512),e.withDirectives(e.createElementVNode("div",q,[e.createElementVNode("div",M,[e.createElementVNode("div",S,[e.createElementVNode("span",{class:"close",onClick:k},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+o.value.image},null,8,x)])])],512),[[e.vShow,o.value.image!==!1&&a.value==="modal"]])],512)]))}};exports.default=z;
@@ -1,8 +1,8 @@
1
1
  import { ref as o, computed as S, onMounted as N, openBlock as a, createElementBlock as i, createElementVNode as l, Fragment as f, renderList as h, normalizeClass as V, unref as g, toDisplayString as $, createCommentVNode as _, createVNode as B, Transition as D, withCtx as j, withDirectives as F, vShow as L } from "vue";
2
2
  import { useRoute as O } from "vue-router";
3
- import "../../../../components/Field/Field.vue2.js";
3
+ import "../../../../components/Field/Field.vue.js";
4
4
  import "../../../../components/Loader/Loader.vue.js";
5
- import "../../../../components/Button/Button.vue2.js";
5
+ import "../../../../components/Button/Button.vue.js";
6
6
  import "../../../../components/Select/Select.vue2.js";
7
7
  import "../../../../components/Upload/Upload.vue2.js";
8
8
  import "../../store/gallery.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("../../../icons/navigation/IconSearch.vue.cjs"),u=require("../../../../components/Field/Field.vue.cjs"),d={class:"flex-v-center flex-nowrap flex pd-small bg-light w-100 radius-big"},i={__name:"BlockSearch",props:{placeholder:{type:String,default:"Enter shop or product name"},button:{type:String,default:"Search"}},emits:["search"],setup(l,{emit:a}){const c=a;e.ref(null);const o=t=>{c("search",t)};return(t,r)=>(e.openBlock(),e.createElementBlock("div",d,[e.createVNode(s.default,{class:"i-medium t-transp mn-r-thin"}),e.createVNode(u.default,{placeholder:l.placeholder,"onUpdate:field":r[0]||(r[0]=n=>o(n)),class:"w-100"},null,8,["placeholder"])]))}};exports.default=i;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("../../../icons/navigation/IconSearch.vue.cjs"),u=require("../../../../components/Field/Field.vue2.cjs"),d={class:"flex-v-center flex-nowrap flex pd-small bg-light w-100 radius-big"},i={__name:"BlockSearch",props:{placeholder:{type:String,default:"Enter shop or product name"},button:{type:String,default:"Search"}},emits:["search"],setup(l,{emit:a}){const c=a;e.ref(null);const o=t=>{c("search",t)};return(t,r)=>(e.openBlock(),e.createElementBlock("div",d,[e.createVNode(s.default,{class:"i-medium t-transp mn-r-thin"}),e.createVNode(u.default,{placeholder:l.placeholder,"onUpdate:field":r[0]||(r[0]=n=>o(n)),class:"w-100"},null,8,["placeholder"])]))}};exports.default=i;