@ozdao/prometheus-framework 0.1.82 → 0.1.84

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/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs +4 -4
  2. package/dist/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js +3 -3
  3. package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.cjs +1 -1
  4. package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.js +22 -22
  5. package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs +1 -1
  6. package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js +2981 -2804
  7. package/dist/prometheus-framework/node_modules/date-fns/esm/getQuarter/index.cjs +1 -0
  8. package/dist/prometheus-framework/node_modules/date-fns/esm/getQuarter/index.js +10 -0
  9. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getNumberType.cjs +2 -2
  10. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +26 -26
  11. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/isObject.cjs +1 -0
  12. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/isObject.js +7 -0
  13. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/metadata.cjs +1 -1
  14. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/metadata.js +28 -29
  15. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/normalizeArguments.cjs +2 -2
  16. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/normalizeArguments.js +55 -65
  17. package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.cjs +1 -1
  18. package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.js +1 -1
  19. package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/components/Address/Address.vue.js +23 -23
  21. package/dist/prometheus-framework/src/components/Breadcrumbs/Breadcrumbs.vue2.cjs +1 -1
  22. package/dist/prometheus-framework/src/components/Breadcrumbs/Breadcrumbs.vue2.js +31 -31
  23. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/components/Button/Button.vue.js +2 -224
  25. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  26. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +224 -2
  27. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.js +22 -22
  29. package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.js +18 -18
  31. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +24 -24
  33. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/components/Field/Field.vue.js +2 -76
  35. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  36. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +76 -2
  37. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +31 -30
  39. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +1 -1
  40. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js +20 -20
  42. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +33 -33
  44. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +21 -21
  46. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/components/Select/Select.vue.js +2 -78
  48. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  49. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +78 -2
  50. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +2 -44
  52. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  53. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +44 -2
  54. package/dist/prometheus-framework/src/components/Text/Text.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/components/Text/Text.vue.js +11 -11
  56. package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +27 -27
  58. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +18 -18
  60. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +17 -17
  62. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
  64. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  66. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
  68. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +3 -3
  70. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
  72. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +44 -43
  74. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
  76. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/auth/store/auth.js +65 -96
  78. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +24 -24
  80. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  82. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  84. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.js +19 -19
  86. package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.cjs +2 -2
  87. package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.js +16 -16
  88. package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.js +13 -13
  90. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +16 -16
  92. package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.cjs +3 -3
  93. package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.js +30 -30
  94. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +22 -22
  96. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -4
  97. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +2 -62
  98. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +4 -1
  99. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +62 -2
  100. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +56 -56
  102. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +44 -43
  104. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +15 -15
  106. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  107. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  108. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  109. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +13 -13
  110. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  111. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +2 -2
  112. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +51 -53
  114. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  115. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +59 -61
  116. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  118. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  120. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Contacts.vue.cjs +1 -1
  121. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Contacts.vue.js +22 -22
  122. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +25 -25
  124. package/dist/prometheus-framework/src/modules/organizations/components/blocks/EditArray.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/organizations/components/blocks/EditArray.vue.js +9 -9
  126. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.js +23 -23
  128. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +11 -11
  130. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +4 -4
  132. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +4 -4
  134. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +4 -4
  136. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  138. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  140. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.js +19 -19
  142. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
  144. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.cjs +1 -1
  145. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.js +30 -30
  146. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +4 -4
  148. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +24 -24
  150. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  152. package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.js +21 -21
  154. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  156. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  157. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  158. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  159. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
  160. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  161. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  162. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.js +1 -1
  164. package/dist/prometheus-framework.cjs.js +27 -27
  165. package/dist/prometheus-framework.es.js +1949 -1937
  166. package/dist/style.css +1 -1
  167. package/package.json +2 -4
  168. package/src/modules/auth/components/pages/ResetPassword.vue +1 -1
  169. package/src/modules/auth/components/pages/SignIn.vue +1 -0
  170. package/src/modules/auth/store/auth.js +42 -51
@@ -1,54 +1,55 @@
1
- import { ref as x, computed as l, openBlock as n, createElementBlock as i, normalizeClass as m, createVNode as D, unref as u, createElementVNode as c, createCommentVNode as a, createBlock as T, withModifiers as E, toDisplayString as d, renderSlot as p } from "vue";
2
- import $ from "../../../../components/Chips/Chips.vue.js";
3
- import I from "../../../icons/navigation/IconEdit.vue.js";
4
- import M from "../../../globals/components/blocks/CardHeader.vue.js";
1
+ import { ref as b, computed as l, openBlock as n, createElementBlock as i, normalizeClass as m, createVNode as x, createElementVNode as c, createCommentVNode as a, createBlock as w, withModifiers as D, toDisplayString as d, renderSlot as E } from "vue";
2
+ import p from "../../../../components/Chips/Chips.vue.js";
3
+ import $ from "../../../icons/navigation/IconEdit.vue.js";
4
+ import I from "../../../globals/components/blocks/CardHeader.vue.js";
5
5
  import "../../../community/store/reactions.js";
6
- import { useRouter as F } from "vue-router";
7
- const S = {
6
+ import { useRouter as M } from "vue-router";
7
+ const F = {
8
8
  key: 0,
9
9
  class: "o-hidden pos-relative bg-grey mn-small w-100"
10
- }, R = ["src"], N = ["src"], z = { class: "w-max mn-r-thin pd-thin radius-small t-semi bg-main" }, L = {
10
+ }, S = ["src"], R = ["src"], N = { class: "w-max mn-r-thin pd-thin radius-small t-semi bg-main" }, z = {
11
11
  key: 0,
12
12
  class: "t-semi"
13
- }, V = { class: "t-semi" }, B = {
13
+ }, L = { class: "t-semi" }, V = {
14
14
  key: 0,
15
15
  class: "t-semi uppercase"
16
- }, H = {
16
+ }, B = {
17
17
  key: 1,
18
18
  class: "cursor-pointer mn-thin flex-nowrap flex w-100"
19
- }, P = {
19
+ }, H = {
20
20
  key: 0,
21
21
  class: ""
22
- }, Y = {
22
+ }, P = {
23
23
  key: 1,
24
24
  class: "pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra"
25
- }, O = {
25
+ }, Y = {
26
26
  key: 2,
27
27
  class: "mn-small p-big"
28
- }, Q = {
28
+ }, K = {
29
29
  __name: "CardEvent",
30
30
  props: ["event", "user", "short", "type"],
31
31
  setup(e) {
32
+ b(/* @__PURE__ */ new Date()), M();
32
33
  const s = e;
33
- x(/* @__PURE__ */ new Date()), F(), l(() => s.event.content.find((t) => t.type.name === "ImageUpload")), l(() => s.event.content.find((t) => t.type.name === "Textarea"));
34
- const C = l(() => {
35
- const t = /* @__PURE__ */ new Date(), o = Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate(), t.getUTCHours(), t.getUTCMinutes(), t.getUTCSeconds()), r = new Date(s.event.date.start), f = Date.UTC(r.getUTCFullYear(), r.getUTCMonth(), r.getUTCDate(), r.getUTCHours(), r.getUTCMinutes(), r.getUTCSeconds()) - o;
36
- if (f < 0)
34
+ l(() => s.event.content.find((t) => t.type.name === "ImageUpload")), l(() => s.event.content.find((t) => t.type.name === "Textarea"));
35
+ const T = l(() => {
36
+ const t = /* @__PURE__ */ new Date(), o = Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate(), t.getUTCHours(), t.getUTCMinutes(), t.getUTCSeconds()), r = new Date(s.event.date.start), u = Date.UTC(r.getUTCFullYear(), r.getUTCMonth(), r.getUTCDate(), r.getUTCHours(), r.getUTCMinutes(), r.getUTCSeconds()) - o;
37
+ if (u < 0)
37
38
  return "Finished";
38
- if (f === 0)
39
+ if (u === 0)
39
40
  return "Starting Now";
40
41
  {
41
- const y = Math.floor(f / 1e3), h = Math.floor(y / 60), v = Math.floor(h / 60), w = Math.floor(v / 24);
42
- return w > 0 ? `${w} days until event` : v > 0 ? `${v} hours until event` : h > 0 ? `${h} minutes until event` : `${y} seconds until event`;
42
+ const g = Math.floor(u / 1e3), f = Math.floor(g / 60), h = Math.floor(f / 60), y = Math.floor(h / 24);
43
+ return y > 0 ? `${y} days until event` : h > 0 ? `${h} hours until event` : f > 0 ? `${f} minutes until event` : `${g} seconds until event`;
43
44
  }
44
- }), U = l(() => {
45
+ }), C = l(() => {
45
46
  const t = new Date(s.event.date.start), o = { day: "2-digit", month: "2-digit" };
46
47
  return t.toLocaleDateString(void 0, o);
47
- }), k = l(() => {
48
+ }), U = l(() => {
48
49
  console.log(s.event.date.start), console.log(s.event.date.end);
49
- const t = new Date(s.event.date.start), o = new Date(s.event.date.end), r = new Intl.DateTimeFormat(void 0, { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }).format(t), g = new Intl.DateTimeFormat(void 0, { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }).format(o);
50
- return `${r}-${g}`;
51
- }), b = l(() => {
50
+ const t = new Date(s.event.date.start), o = new Date(s.event.date.end), r = new Intl.DateTimeFormat(void 0, { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }).format(t), v = new Intl.DateTimeFormat(void 0, { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }).format(o);
51
+ return `${r}-${v}`;
52
+ }), k = l(() => {
52
53
  const t = s.event.name;
53
54
  return t.length > 26 ? `${t.substring(0, 22)}…` : t;
54
55
  });
@@ -57,7 +58,7 @@ const S = {
57
58
  "flex-nowrap flex-v-center flex": e.type === "short"
58
59
  }, "pos-relative"])
59
60
  }, [
60
- D(M, {
61
+ x(I, {
61
62
  class: m({
62
63
  "mn-small pd-medium": e.type !== "short",
63
64
  "flex-child-order-last flex-child mn-l-small": e.type === "short"
@@ -70,27 +71,27 @@ const S = {
70
71
  members: e.event.numberOfTickets,
71
72
  membersPhotos: e.event.participantsPhotos,
72
73
  type: e.type,
73
- dateFormatted: u(C)
74
+ dateFormatted: T.value
74
75
  }, null, 8, ["class", "entity", "user", "owner", "creator", "members", "membersPhotos", "type", "dateFormatted"]),
75
- e.event.cover && e.type !== "short" ? (n(), i("div", S, [
76
+ e.event.cover && e.type !== "short" ? (n(), i("div", F, [
76
77
  c("img", {
77
78
  src: (t.FILE_SERVER_URL || "") + e.event.cover,
78
79
  alt: "Event image",
79
80
  class: "pos-relative z-index-1 d-block mn-auto h-20r"
80
- }, null, 8, R),
81
+ }, null, 8, S),
81
82
  c("img", {
82
83
  src: (t.FILE_SERVER_URL || "") + e.event.cover,
83
84
  alt: "Event Background",
84
85
  class: "z-index-0 pos-absolute w-100 h-100 pos-t-0 pos-r-0",
85
86
  style: { transform: "scale(1.5)", filter: "blur(2rem)", "-webkit-filter": "blur(2rem)" }
86
- }, null, 8, N)
87
+ }, null, 8, R)
87
88
  ])) : a("", !0),
88
89
  c("section", {
89
90
  class: m(["pos-relative w-100", { "pd-t-zero pd-medium": e.type !== "short" }])
90
91
  }, [
91
- e.user === e.event.creator.target._id ? (n(), T(I, {
92
+ e.user === e.event.creator.target._id ? (n(), w($, {
92
93
  key: 0,
93
- onClick: o[0] || (o[0] = E((r) => t.$router.push({
94
+ onClick: o[0] || (o[0] = D((r) => t.$router.push({
94
95
  name: "Edit Event",
95
96
  params: {
96
97
  url: e.event.url
@@ -101,19 +102,19 @@ const S = {
101
102
  c("div", {
102
103
  class: m([{ "mn-small": e.type !== "short" }, "flex-v-center flex-nowrap flex"])
103
104
  }, [
104
- c("div", z, [
105
- e.type !== "short" ? (n(), i("span", L, d(u(U)) + " | ", 1)) : a("", !0),
106
- c("span", V, d(u(k)), 1)
105
+ c("div", N, [
106
+ e.type !== "short" ? (n(), i("span", z, d(C.value) + " | ", 1)) : a("", !0),
107
+ c("span", L, d(U.value), 1)
107
108
  ]),
108
- e.type === "short" ? (n(), i("span", B, d(u(b)), 1)) : a("", !0)
109
+ e.type === "short" ? (n(), i("span", V, d(k.value), 1)) : a("", !0)
109
110
  ], 2),
110
- e.type !== "short" ? (n(), i("div", H, [
111
- e.type !== "short" ? (n(), i("h3", P, d(e.event.name), 1)) : a("", !0),
112
- e.event.status === "draft" ? (n(), i("div", Y, d(e.event.status), 1)) : a("", !0)
111
+ e.type !== "short" ? (n(), i("div", B, [
112
+ e.type !== "short" ? (n(), i("h3", H, d(e.event.name), 1)) : a("", !0),
113
+ e.event.status === "draft" ? (n(), i("div", P, d(e.event.status), 1)) : a("", !0)
113
114
  ])) : a("", !0),
114
- e.type !== "short" ? (n(), i("p", O, d(e.event.description), 1)) : a("", !0),
115
- p(t.$slots, "default"),
116
- e.type !== "short" && e.event.tags.length > 0 ? (n(), T($, {
115
+ e.type !== "short" ? (n(), i("p", Y, d(e.event.description), 1)) : a("", !0),
116
+ E(t.$slots, "default"),
117
+ e.type !== "short" && e.event.tags.length > 0 ? (n(), w(p, {
117
118
  key: 3,
118
119
  chips: e.event.tags
119
120
  }, null, 8, ["chips"])) : a("", !0)
@@ -122,5 +123,5 @@ const S = {
122
123
  }
123
124
  };
124
125
  export {
125
- Q as default
126
+ K as default
126
127
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),l=require("../../../../components/Button/Button.vue.cjs");require("../../../auth/store/auth.cjs");const c=require("../../store/tickets.cjs");require("./ButtonJoin.vue2.cjs");const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),g={__name:"ButtonJoin",props:{type:{type:String,required:!0},userId:{type:String,required:!0},hasTicket:{type:Boolean,required:!0},targetId:{type:String,required:!0}},emits:["updateTicket"],setup(o,{emit:n}){const t=o,s=async()=>{t.hasTicket?await d(t.targetId):await u(t.targetId)};async function u(i){try{const e={type:t.type,target:i,user:t.userId},r=await c.actions.create(e);n("updateTicket",{ticket:r,hasTicket:!0,targetId:t.targetId})}catch(e){throw console.log(e),e}}async function d(i){const e={type:t.type,target:i,user:t.userId};try{const r=await c.actions.delete(e);n("updateTicket",{ticket:r,hasTicket:!1,targetId:t.targetId})}catch(r){throw console.log(r),r}}return(i,e)=>(a.openBlock(),a.createBlock(l.default,{submit:s,class:"bg-main button-small radius-extra button"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(o.hasTicket?"Leave":"Join"),1)]),_:1}))}},k=p.default(g,[["__scopeId","data-v-872ff798"]]);exports.default=k;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),p=require("../../../../components/Button/Button.vue2.cjs");require("../../../auth/store/auth.cjs");const s=require("../../store/tickets.cjs");require("./ButtonJoin.vue2.cjs");const g=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),k={__name:"ButtonJoin",props:{type:{type:String,required:!0},userId:{type:String,required:!0},hasTicket:{type:Boolean,required:!0},targetId:{type:String,required:!0}},emits:["updateTicket"],setup(o,{emit:c}){const n=c,t=o,u=async()=>{t.hasTicket?await l(t.targetId):await d(t.targetId)};async function d(i){try{const e={type:t.type,target:i,user:t.userId},r=await s.actions.create(e);n("updateTicket",{ticket:r,hasTicket:!0,targetId:t.targetId})}catch(e){throw console.log(e),e}}async function l(i){const e={type:t.type,target:i,user:t.userId};try{const r=await s.actions.delete(e);n("updateTicket",{ticket:r,hasTicket:!1,targetId:t.targetId})}catch(r){throw console.log(r),r}}return(i,e)=>(a.openBlock(),a.createBlock(p.default,{submit:u,class:"bg-main button-small radius-extra button"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(o.hasTicket?"Leave":"Join"),1)]),_:1}))}},y=g.default(k,[["__scopeId","data-v-872ff798"]]);exports.default=y;
@@ -1,10 +1,10 @@
1
- import { openBlock as p, createBlock as d, withCtx as g, createTextVNode as l, toDisplayString as m } from "vue";
2
- import k from "../../../../components/Button/Button.vue.js";
1
+ import { openBlock as d, createBlock as g, withCtx as m, createTextVNode as l, toDisplayString as k } from "vue";
2
+ import f from "../../../../components/Button/Button.vue2.js";
3
3
  import "../../../auth/store/auth.js";
4
4
  import { actions as c } from "../../store/tickets.js";
5
5
  import "./ButtonJoin.vue2.js";
6
- import f from "../../../../../../_virtual/_plugin-vue_export-helper.js";
7
- const y = {
6
+ import y from "../../../../../../_virtual/_plugin-vue_export-helper.js";
7
+ const h = {
8
8
  __name: "ButtonJoin",
9
9
  props: {
10
10
  type: {
@@ -26,11 +26,11 @@ const y = {
26
26
  }
27
27
  },
28
28
  emits: ["updateTicket"],
29
- setup(o, { emit: i }) {
30
- const t = o, n = async () => {
31
- t.hasTicket ? await u(t.targetId) : await s(t.targetId);
29
+ setup(o, { emit: n }) {
30
+ const i = n, t = o, s = async () => {
31
+ t.hasTicket ? await p(t.targetId) : await u(t.targetId);
32
32
  };
33
- async function s(a) {
33
+ async function u(a) {
34
34
  try {
35
35
  const e = {
36
36
  // Renamed membershipData to ticketData
@@ -43,7 +43,7 @@ const y = {
43
43
  throw console.log(e), e;
44
44
  }
45
45
  }
46
- async function u(a) {
46
+ async function p(a) {
47
47
  const e = {
48
48
  // Renamed membershipData to ticketData
49
49
  type: t.type,
@@ -57,17 +57,17 @@ const y = {
57
57
  throw console.log(r), r;
58
58
  }
59
59
  }
60
- return (a, e) => (p(), d(k, {
61
- submit: n,
60
+ return (a, e) => (d(), g(f, {
61
+ submit: s,
62
62
  class: "bg-main button-small radius-extra button"
63
63
  }, {
64
- default: g(() => [
65
- l(m(o.hasTicket ? "Leave" : "Join"), 1)
64
+ default: m(() => [
65
+ l(k(o.hasTicket ? "Leave" : "Join"), 1)
66
66
  ]),
67
67
  _: 1
68
68
  }));
69
69
  }
70
- }, v = /* @__PURE__ */ f(y, [["__scopeId", "data-v-872ff798"]]);
70
+ }, B = /* @__PURE__ */ y(h, [["__scopeId", "data-v-872ff798"]]);
71
71
  export {
72
- v as default
72
+ B as default
73
73
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../components/Select/Select.vue2.cjs");const f=require("../../../../components/DatePicker/DatePicker.vue.cjs"),i=require("../../store/events.cjs"),m={class:"pd-thin min-h-100vh"},g=e.createElementVNode("div",{class:"mn-thin br-solid br-1px br-grey bg-grey radius-big"},null,-1),y={class:""},_={__name:"layoutEvents",setup(b){const l=c.useRoute(),d=c.useRouter(),u=p(new Date);function p(t){return`${t.getDate().toString().padStart(2,"0")}${(t.getMonth()+1).toString().padStart(2,"0")}${t.getFullYear()}`}if(l.query){const t=l.query,s={tags:t.tags?t.tags.split(","):null,date:t.date?t.date:u};i.state.filter=s}else{const t={date:u};i.state.filter=t}return e.watch(()=>i.state.filter,(t,s)=>{const a={...l.query};Object.keys(s).forEach(o=>{a[o]&&delete a[o]});const n=Object.fromEntries(Object.entries(t).filter(([o,r])=>Array.isArray(r)&&r.length>0||typeof r=="string"&&r).map(([o,r])=>[o,Array.isArray(r)?r.join(","):r]));Object.assign(a,n),d.push({query:a})},{deep:!0}),(t,s)=>{const a=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",m,[e.createVNode(f.default,{date:i.state.filter.date,"onUpdate:date":s[0]||(s[0]=n=>i.state.filter.date=n),locale:t.$i18n.locale,class:"radius-small bg-grey pd-l-zero pd-r-zero pd-medium"},null,8,["date","locale"]),g,e.createElementVNode("section",y,[e.createVNode(a,null,{default:e.withCtx(({Component:n,route:o})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n),{ref:"page",key:o.query}))]),_:2},1024)]),_:1})])])}}};exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../components/Select/Select.vue.cjs");const f=require("../../../../components/DatePicker/DatePicker.vue.cjs"),i=require("../../store/events.cjs"),m={class:"pd-thin min-h-100vh"},g=e.createElementVNode("div",{class:"mn-thin br-solid br-1px br-grey bg-grey radius-big"},null,-1),y={class:""},_={__name:"layoutEvents",setup(b){const l=c.useRoute(),d=c.useRouter(),u=p(new Date);function p(t){return`${t.getDate().toString().padStart(2,"0")}${(t.getMonth()+1).toString().padStart(2,"0")}${t.getFullYear()}`}if(l.query){const t=l.query,s={tags:t.tags?t.tags.split(","):null,date:t.date?t.date:u};i.state.filter=s}else{const t={date:u};i.state.filter=t}return e.watch(()=>i.state.filter,(t,s)=>{const a={...l.query};Object.keys(s).forEach(o=>{a[o]&&delete a[o]});const n=Object.fromEntries(Object.entries(t).filter(([o,r])=>Array.isArray(r)&&r.length>0||typeof r=="string"&&r).map(([o,r])=>[o,Array.isArray(r)?r.join(","):r]));Object.assign(a,n),d.push({query:a})},{deep:!0}),(t,s)=>{const a=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",m,[e.createVNode(f.default,{date:i.state.filter.date,"onUpdate:date":s[0]||(s[0]=n=>i.state.filter.date=n),locale:t.$i18n.locale,class:"radius-small bg-grey pd-l-zero pd-r-zero pd-medium"},null,8,["date","locale"]),g,e.createElementVNode("section",y,[e.createVNode(a,null,{default:e.withCtx(({Component:n,route:o})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n),{ref:"page",key:o.query}))]),_:2},1024)]),_:1})])])}}};exports.default=_;
@@ -1,6 +1,6 @@
1
1
  import { watch as y, resolveComponent as g, openBlock as u, createElementBlock as _, createVNode as l, createElementVNode as m, withCtx as d, Transition as b, createBlock as h, resolveDynamicComponent as w } from "vue";
2
2
  import { useRoute as D, useRouter as q } from "vue-router";
3
- import "../../../../components/Select/Select.vue2.js";
3
+ import "../../../../components/Select/Select.vue.js";
4
4
  import j from "../../../../components/DatePicker/DatePicker.vue.js";
5
5
  import { state as s } from "../../store/events.js";
6
6
  const k = { class: "pd-thin min-h-100vh" }, E = /* @__PURE__ */ m("div", { class: "mn-thin br-solid br-1px br-grey bg-grey radius-big" }, null, -1), V = { class: "" }, B = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../constructor/components/elements/Textarea.vue2.cjs");const N=require("../../../constructor/components/sections/Constructor.vue.cjs"),E=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.cjs");const y=require("../../../../components/Popup/Popup.vue.cjs"),f=require("../../../../components/Field/Field.vue.cjs"),q=require("../../../../components/FieldTags/BlockTags.vue.cjs"),P=require("../../../../components/Checkbox/Checkbox.vue.cjs"),C=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),x=require("../../../../components/UploadImage/UploadImage.vue.cjs"),B=require("../../../../components/Button/Button.vue.cjs"),v=require("vue-router"),s=require("../../store/events.cjs"),u=require("../../../auth/store/auth.cjs"),D=require("../../../organizations/store/organizations.cjs");require("./EditEvent.vue2.cjs");const U={key:0,class:"h-100 pd-thin"},T={class:"mn-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},z=e.createElementVNode("h4",null,"Upload Event Cover",-1),O=e.createElementVNode("h3",{class:"mn-small"},"Date",-1),M=e.createElementVNode("h3",{class:"mn-small"},"Description",-1),S={key:0,class:"pd-b-extra w-100 bg-grey pd-big radius-big"},A={key:1,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},R={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},$=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),F=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),j={key:0,class:"mn-thin"},H={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},G={__name:"EditEvent",setup(J){const i=v.useRoute(),d=v.useRouter();let t=e.ref(null),p=e.ref(null);const m=e.ref([]),n=e.ref(null),r=e.ref(),h=()=>({top:0,left:0});e.onMounted(async()=>{if(i.params.url){const a=await s.read({user:u.state.user._id,url:i.params.url});t.value=a.pop();const l=t.value.date.start,_=t.value.date.end;r.value=[l,_]}else{s.clean(),t.value=s.state.current;const a=new Date,l=new Date;r.value=[a,l]}t.value.owner||(t.value.owner={target:u.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:u.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(n.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const o=await D.actions.read({user:u.state.user._id,postable:u.state.user._id,limit:100});p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const c=e.ref(!1);function g(){c.value=!0}function b(){c.value=!1}function k(){m.value.length>0&&m.value.map(o=>o.text),t.value.status="draft",t.value.date={start:r.value[0],end:r.value[1]},i.params.url?s.update(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.error(o)}):s.create(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.error(o)})}function V(){n.value&&(t.value.owner={target:n.value._id,type:"organization"}),n.value||(t.value.creator.hidden=!1),n.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.date={start:r.value[0],end:r.value[1]},console.log(r.value),i.params.url?s.update(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.log(o)}):s.create(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.log(o)})}function w(){confirm("Are you sure you want to delete this event?")&&s.remove(t.value._id).then(o=>{d.push({name:"User Events",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.error(o)})}return(o,a)=>e.unref(t)?(e.openBlock(),e.createElementBlock("article",U,[e.createElementVNode("div",T,[e.createVNode(x.default,{photo:e.unref(t).cover,"onUpdate:photo":a[0]||(a[0]=l=>e.unref(t).cover=l),uploadPath:"users/"+u.state.user._id+"/events",class:"h-4r w-4r aspect-1x1 o-hidden mn-thin radius-extra"},null,8,["photo","uploadPath"]),z]),e.createVNode(f.default,{field:e.unref(t).name,"onUpdate:field":a[1]||(a[1]=l=>e.unref(t).name=l),placeholder:"Event name",class:"mn-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(f.default,{field:e.unref(t).description,"onUpdate:field":a[2]||(a[2]=l=>e.unref(t).description=l),type:"textfield",placeholder:"Enter short description",class:"mn-semi w-100 bg-grey pd-medium radius-small"},null,8,["field"]),O,e.createVNode(e.unref(E.default),{modelValue:r.value,"onUpdate:modelValue":a[3]||(a[3]=l=>r.value=l),"alt-position":h,range:"",class:"mn-semi"},null,8,["modelValue"]),M,e.unref(t)?(e.openBlock(),e.createElementBlock("section",S,[e.createVNode(N.default,{content:e.unref(t).content,onUpdate:a[4]||(a[4]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",A,[e.createElementVNode("div",R,[e.unref(i).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[5]||(a[5]=l=>w()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[6]||(a[6]=l=>k()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[7]||(a[7]=l=>g()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(y.default,{title:"Добавить участника",onClosePopup:b,isPopupOpen:c.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[$,e.createVNode(q.default,{onTagsChanged:a[8]||(a[8]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),F,e.createVNode(C.default,{modelValue:n.value,"onUpdate:modelValue":a[9]||(a[9]=l=>n.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-medium bg-grey radius-medium pd-small"},null,8,["modelValue","options"]),n.value?(e.openBlock(),e.createElementBlock("h5",j,"Options:")):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createElementBlock("div",H,[e.createVNode(P.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[10]||(a[10]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(B.default,{submit:V,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])])):e.createCommentVNode("",!0)}};exports.default=G;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../constructor/components/elements/Textarea.vue.cjs");const N=require("../../../constructor/components/sections/Constructor.vue.cjs"),E=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.cjs");const y=require("../../../../components/Popup/Popup.vue.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),q=require("../../../../components/FieldTags/BlockTags.vue.cjs"),P=require("../../../../components/Checkbox/Checkbox.vue.cjs"),C=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),x=require("../../../../components/UploadImage/UploadImage.vue.cjs"),B=require("../../../../components/Button/Button.vue2.cjs"),v=require("vue-router"),s=require("../../store/events.cjs"),u=require("../../../auth/store/auth.cjs"),D=require("../../../organizations/store/organizations.cjs");require("./EditEvent.vue2.cjs");const U={key:0,class:"h-100 pd-thin"},T={class:"mn-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},z=e.createElementVNode("h4",null,"Upload Event Cover",-1),O=e.createElementVNode("h3",{class:"mn-small"},"Date",-1),M=e.createElementVNode("h3",{class:"mn-small"},"Description",-1),S={key:0,class:"pd-b-extra w-100 bg-grey pd-big radius-big"},A={key:1,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},R={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},$=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),F=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),j={key:0,class:"mn-thin"},H={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},G={__name:"EditEvent",setup(J){const i=v.useRoute(),d=v.useRouter();let t=e.ref(null),p=e.ref(null);const m=e.ref([]),n=e.ref(null),r=e.ref(),h=()=>({top:0,left:0});e.onMounted(async()=>{if(i.params.url){const a=await s.read({user:u.state.user._id,url:i.params.url});t.value=a.pop();const l=t.value.date.start,_=t.value.date.end;r.value=[l,_]}else{s.clean(),t.value=s.state.current;const a=new Date,l=new Date;r.value=[a,l]}t.value.owner||(t.value.owner={target:u.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:u.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(n.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const o=await D.actions.read({user:u.state.user._id,postable:u.state.user._id,limit:100});p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const c=e.ref(!1);function g(){c.value=!0}function b(){c.value=!1}function k(){m.value.length>0&&m.value.map(o=>o.text),t.value.status="draft",t.value.date={start:r.value[0],end:r.value[1]},i.params.url?s.update(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.error(o)}):s.create(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.error(o)})}function V(){n.value&&(t.value.owner={target:n.value._id,type:"organization"}),n.value||(t.value.creator.hidden=!1),n.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.date={start:r.value[0],end:r.value[1]},console.log(r.value),i.params.url?s.update(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.log(o)}):s.create(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.log(o)})}function w(){confirm("Are you sure you want to delete this event?")&&s.remove(t.value._id).then(o=>{d.push({name:"User Events",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.error(o)})}return(o,a)=>e.unref(t)?(e.openBlock(),e.createElementBlock("article",U,[e.createElementVNode("div",T,[e.createVNode(x.default,{photo:e.unref(t).cover,"onUpdate:photo":a[0]||(a[0]=l=>e.unref(t).cover=l),uploadPath:"users/"+u.state.user._id+"/events",class:"h-4r w-4r aspect-1x1 o-hidden mn-thin radius-extra"},null,8,["photo","uploadPath"]),z]),e.createVNode(f.default,{field:e.unref(t).name,"onUpdate:field":a[1]||(a[1]=l=>e.unref(t).name=l),placeholder:"Event name",class:"mn-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(f.default,{field:e.unref(t).description,"onUpdate:field":a[2]||(a[2]=l=>e.unref(t).description=l),type:"textfield",placeholder:"Enter short description",class:"mn-semi w-100 bg-grey pd-medium radius-small"},null,8,["field"]),O,e.createVNode(e.unref(E.default),{modelValue:r.value,"onUpdate:modelValue":a[3]||(a[3]=l=>r.value=l),"alt-position":h,range:"",class:"mn-semi"},null,8,["modelValue"]),M,e.unref(t)?(e.openBlock(),e.createElementBlock("section",S,[e.createVNode(N.default,{content:e.unref(t).content,onUpdate:a[4]||(a[4]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",A,[e.createElementVNode("div",R,[e.unref(i).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[5]||(a[5]=l=>w()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[6]||(a[6]=l=>k()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[7]||(a[7]=l=>g()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(y.default,{title:"Добавить участника",onClosePopup:b,isPopupOpen:c.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[$,e.createVNode(q.default,{onTagsChanged:a[8]||(a[8]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),F,e.createVNode(C.default,{modelValue:n.value,"onUpdate:modelValue":a[9]||(a[9]=l=>n.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-medium bg-grey radius-medium pd-small"},null,8,["modelValue","options"]),n.value?(e.openBlock(),e.createElementBlock("h5",j,"Options:")):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createElementBlock("div",H,[e.createVNode(P.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[10]||(a[10]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(B.default,{submit:V,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])])):e.createCommentVNode("",!0)}};exports.default=G;
@@ -1,21 +1,21 @@
1
1
  import { ref as u, onMounted as $, unref as l, openBlock as d, createElementBlock as m, createElementVNode as i, createVNode as s, createCommentVNode as p, withCtx as _, createTextVNode as T } from "vue";
2
- import "../../../constructor/components/elements/Textarea.vue2.js";
2
+ import "../../../constructor/components/elements/Textarea.vue.js";
3
3
  import z from "../../../constructor/components/sections/Constructor.vue.js";
4
4
  import N from "../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js";
5
5
  import "../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.js";
6
6
  import O from "../../../../components/Popup/Popup.vue.js";
7
- import w from "../../../../components/Field/Field.vue.js";
7
+ import w from "../../../../components/Field/Field.vue2.js";
8
8
  import A from "../../../../components/FieldTags/BlockTags.vue.js";
9
9
  import B from "../../../../components/Checkbox/Checkbox.vue.js";
10
10
  import F from "../../../../components/SelectMulti/SelectMulti.vue.js";
11
11
  import M from "../../../../components/UploadImage/UploadImage.vue.js";
12
- import R from "../../../../components/Button/Button.vue.js";
13
- import { useRoute as S, useRouter as H } from "vue-router";
14
- import { read as L, clean as j, state as q, update as y, create as k, remove as G } from "../../store/events.js";
12
+ import R from "../../../../components/Button/Button.vue2.js";
13
+ import { useRoute as S, useRouter as j } from "vue-router";
14
+ import { read as H, clean as q, state as G, update as y, create as k, remove as J } from "../../store/events.js";
15
15
  import { state as c } from "../../../auth/store/auth.js";
16
- import { actions as J } from "../../../organizations/store/organizations.js";
16
+ import { actions as K } from "../../../organizations/store/organizations.js";
17
17
  import "./EditEvent.vue2.js";
18
- const K = {
18
+ const L = {
19
19
  key: 0,
20
20
  class: "h-100 pd-thin"
21
21
  }, Q = { class: "mn-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex" }, W = /* @__PURE__ */ i("h4", null, "Upload Event Cover", -1), X = /* @__PURE__ */ i("h3", { class: "mn-small" }, "Date", -1), Y = /* @__PURE__ */ i("h3", { class: "mn-small" }, "Description", -1), Z = {
@@ -33,17 +33,17 @@ const K = {
33
33
  }, xe = {
34
34
  __name: "EditEvent",
35
35
  setup(se) {
36
- const v = S(), f = H();
36
+ const v = S(), f = j();
37
37
  let e = u(null), g = u(null);
38
38
  const b = u([]), n = u(null), r = u(), x = () => ({ top: 0, left: 0 });
39
39
  $(async () => {
40
40
  if (v.params.url) {
41
- const t = await L({ user: c.user._id, url: v.params.url });
41
+ const t = await H({ user: c.user._id, url: v.params.url });
42
42
  e.value = t.pop();
43
43
  const o = e.value.date.start, U = e.value.date.end;
44
44
  r.value = [o, U];
45
45
  } else {
46
- j(), e.value = q.current;
46
+ q(), e.value = G.current;
47
47
  const t = /* @__PURE__ */ new Date(), o = /* @__PURE__ */ new Date();
48
48
  r.value = [t, o];
49
49
  }
@@ -59,7 +59,7 @@ const K = {
59
59
  name: e.value.owner.target.profile.name,
60
60
  photo: e.value.owner.target.profile.photo
61
61
  });
62
- const a = await J.read({
62
+ const a = await K.read({
63
63
  user: c.user._id,
64
64
  postable: c.user._id,
65
65
  limit: 100
@@ -109,13 +109,13 @@ const K = {
109
109
  });
110
110
  }
111
111
  function C() {
112
- confirm("Are you sure you want to delete this event?") && G(e.value._id).then((a) => {
112
+ confirm("Are you sure you want to delete this event?") && J(e.value._id).then((a) => {
113
113
  f.push({ name: "User Events", params: { _id: e.value.creator.target._id } });
114
114
  }).catch((a) => {
115
115
  console.error(a);
116
116
  });
117
117
  }
118
- return (a, t) => l(e) ? (d(), m("article", K, [
118
+ return (a, t) => l(e) ? (d(), m("article", L, [
119
119
  i("div", Q, [
120
120
  s(M, {
121
121
  photo: l(e).cover,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const t=require("../sections/Feed.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../components/Button/Button.vue2.cjs");require("../../../../components/Select/Select.vue2.cjs");require("../../../reports/store/reports.cjs");require("../../../../components/Dropdown/Dropdown.vue.cjs");const i=require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");require("../../../community/store/reactions.cjs");const o=require("../../store/events.cjs");require("../sections/List.vue2.cjs");const s={__name:"Events",setup(c){const r=u.useRoute();return u.useRouter(),(n,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(t.default,{category:e.unref(r).params.category,user:i.state.user._id,period:e.unref(r).query.period,selectedDate:o.state.filter.date},null,8,["category","user","period","selectedDate"])]))}};exports.default=s;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const t=require("../sections/Feed.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../reports/store/reports.cjs");require("../../../../components/Dropdown/Dropdown.vue.cjs");const i=require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");require("../../../community/store/reactions.cjs");const o=require("../../store/events.cjs");require("../sections/List.vue2.cjs");const s={__name:"Events",setup(c){const r=u.useRoute();return u.useRouter(),(n,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(t.default,{category:e.unref(r).params.category,user:i.state.user._id,period:e.unref(r).query.period,selectedDate:o.state.filter.date},null,8,["category","user","period","selectedDate"])]))}};exports.default=s;
@@ -6,8 +6,8 @@ import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
6
6
  import s from "../sections/Feed.vue.js";
7
7
  import "../../../../components/Loader/Loader.vue.js";
8
8
  import "../../../../components/Popup/Popup.vue2.js";
9
- import "../../../../components/Button/Button.vue2.js";
10
- import "../../../../components/Select/Select.vue2.js";
9
+ import "../../../../components/Button/Button.vue.js";
10
+ import "../../../../components/Select/Select.vue.js";
11
11
  import "../../../reports/store/reports.js";
12
12
  import "../../../../components/Dropdown/Dropdown.vue.js";
13
13
  import { state as a } from "../../../auth/store/auth.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),I=require("../../../../components/Field/Field.vue.cjs"),q=require("../../../../components/Button/Button.vue.cjs"),M=require("../../../../components/Select/Select.vue.cjs"),s=require("../../store/gallery.cjs"),P=require("../../../../components/EditImages/EditImages.vue.cjs");require("./BackofficeGallery.vue2.cjs");const j=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),c=i=>(e.pushScopeId("data-v-d6a1c805"),i=i(),e.popScopeId(),i),G={class:"pos-relative w-100"},D={class:"mn-semi flex-v-center flex-nowrap flex"},T=c(()=>e.createElementVNode("h1",{class:"mn-r-small"},"Manage Gallery",-1)),U=["data-id"],$=["src","onClick"],F={key:1,class:"radius-small bg-white"},O=["src","onClick"],L={class:"t-black p-small mn-thin"},A=c(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Size",-1)),H=c(()=>e.createElementVNode("br",null,null,-1)),R={class:"pd-2px radius-big d-inline-block bg-grey"},J={class:"t-black p-small mn-small uppe"},K=c(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Categories",-1)),Q=c(()=>e.createElementVNode("br",null,null,-1)),W={class:"pd-2px radius-big d-inline-block bg-grey t-semi"},X={class:"flex-nowrap flex"},Y=["onClick"],Z={class:"modal pd-thin"},ee={class:"modal-content radius-big"},te={class:""},le=["src"],oe={key:0,class:"flex-v-center flex m modal pd-big"},ae={class:"modal-content radius-small pd-medium bg-white"},se=["src"],ne=["src"],ce={__name:"BackofficeGallery",setup(i){const r=e.ref(!0),h=e.ref(null);let g=1;const f=10;let _=e.ref(null),k=e.ref(!1);const d=e.ref([]),E=o=>{d.value=o},w=e.computed(()=>y.value==="all"?s.state.gallery:s.state.gallery.filter(o=>o.categories.includes(y.value))),V=async()=>{k.value=!0,await s.actions.fetchGallery(g,f),k.value=!1},u=e.ref(null),t=e.ref({categories:"",size:"",image:!1}),m=e.ref(null),v=o=>{console.log(r.value),r.value?N(o):(u.value="modal",t.value.image=o,b())},N=o=>{u.value="edit-modal",t.value=o||{categories:"",size:"",image:null},b()},n=()=>{t.value={categories:"",size:"",image:!1},m.value=null,B()},b=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},B=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""},C=[{name:"Small",value:""},{name:"Regular",value:"grid-item--width1 grid-item--height1"},{name:"Medium",value:"grid-item--width2 grid-item--height2"},{name:"Big",value:"grid-item--width3 grid-item--height3"}],x=async o=>{await s.actions.deletePhoto(o)},S=async()=>{await s.actions.updatePhoto(t.value),n()},z=async o=>{if(d.length<1||!t.value.categories||!t.value.size){console.error("All fields are required.");return}await s.actions.createPhoto({images:d.value,size:t.value.size,categories:typeof t.value.categories=="string"?t.value.categories.split(",").map(a=>a.trim()):t.value.categories}),n()};let y=e.ref("all");return e.onMounted(async()=>{await s.actions.fetchGallery(g,f),typeof window<"u"&&new IntersectionObserver(a=>{a.some(l=>l.isIntersecting)&&(g+=1,V())}).observe(_.value)}),(o,a)=>(e.openBlock(),e.createElementBlock("div",G,[e.createElementVNode("div",D,[T,r.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:a[0]||(a[0]=l=>v(null)),class:"t-white t-black bg-second i-big radius-extra"},"+")):e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:h,class:"cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(w),(l,re)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,"data-id":l.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[!r.value&&h.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 h-100 o-hidden radius-medium object-fit-cover",onClick:p=>v(l.image)},null,8,$)):(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 radius-small mn-small h-10r object-fit-cover",onClick:p=>v(l)},null,8,O),e.createElementVNode("p",L,[A,H,e.createElementVNode("span",R,e.toDisplayString(l.size.name),1)]),e.createElementVNode("p",J,[K,Q,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.categories,p=>(e.openBlock(),e.createElementBlock("span",W,e.toDisplayString(p),1))),256))]),e.createElementVNode("div",X,[e.createElementVNode("button",{class:"button-small w-100 button",onClick:p=>x(l._id)},"Delete",8,Y)])]))]),_:2},1024)],8,U))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:_,class:"sentinel"},null,512),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",Z,[e.createElementVNode("div",ee,[e.createElementVNode("div",te,[e.createElementVNode("span",{class:"close",onClick:n},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+t.value.image},null,8,le)])])],512),[[e.vShow,t.value.image!==!1&&u.value==="modal"]])]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.value.image!==!1&&u.value==="edit-modal"?(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",ae,[e.createElementVNode("span",{class:"close",onClick:n},"×"),typeof m.value=="string"?(e.openBlock(),e.createElementBlock("img",{key:0,src:m.value,class:"radius-small w-100 mn-small h-20r object-fit-cover"},null,8,se)):e.createCommentVNode("",!0),typeof m.value=="object"&&t.value.image!==null?(e.openBlock(),e.createElementBlock("img",{key:1,class:"radius-small w-100 mn-small h-20r object-fit-cover",src:"/photos/"+t.value.cover},null,8,ne)):e.createCommentVNode("",!0),e.createVNode(M.default,{options:C,label:"Size",select:t.value.size,"onUpdate:select":a[1]||(a[1]=l=>t.value.size=l),placeholder:"Select Size",class:"bg-grey pd-thin radius-small mn-thin t-black"},null,8,["select"]),e.createVNode(I.default,{field:t.value.categories,"onUpdate:field":a[2]||(a[2]=l=>t.value.categories=l),type:"text",label:"Categories",placeholder:"Enter categories for image (comma separated)",class:"bg-grey pd-thin radius-small mn-medium t-black"},null,8,["field"]),e.createVNode(P.default,{images:d.value,"onUpdate:images":E,uploadPath:"photos",class:"mn-semi"},null,8,["images"]),e.createVNode(q.default,{submit:t.value._id?S:z,callback:n,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value._id?"Update":"Create"),1)]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)]),_:1})],512)]))}},ie=j.default(ce,[["__scopeId","data-v-d6a1c805"]]);exports.default=ie;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),I=require("../../../../components/Field/Field.vue2.cjs"),q=require("../../../../components/Button/Button.vue2.cjs"),M=require("../../../../components/Select/Select.vue2.cjs"),s=require("../../store/gallery.cjs"),P=require("../../../../components/EditImages/EditImages.vue.cjs");require("./BackofficeGallery.vue2.cjs");const j=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),c=i=>(e.pushScopeId("data-v-d6a1c805"),i=i(),e.popScopeId(),i),G={class:"pos-relative w-100"},D={class:"mn-semi flex-v-center flex-nowrap flex"},T=c(()=>e.createElementVNode("h1",{class:"mn-r-small"},"Manage Gallery",-1)),U=["data-id"],$=["src","onClick"],F={key:1,class:"radius-small bg-white"},O=["src","onClick"],L={class:"t-black p-small mn-thin"},A=c(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Size",-1)),H=c(()=>e.createElementVNode("br",null,null,-1)),R={class:"pd-2px radius-big d-inline-block bg-grey"},J={class:"t-black p-small mn-small uppe"},K=c(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Categories",-1)),Q=c(()=>e.createElementVNode("br",null,null,-1)),W={class:"pd-2px radius-big d-inline-block bg-grey t-semi"},X={class:"flex-nowrap flex"},Y=["onClick"],Z={class:"modal pd-thin"},ee={class:"modal-content radius-big"},te={class:""},le=["src"],oe={key:0,class:"flex-v-center flex m modal pd-big"},ae={class:"modal-content radius-small pd-medium bg-white"},se=["src"],ne=["src"],y=10,ce={__name:"BackofficeGallery",setup(i){const r=e.ref(!0),h=e.ref(null);let v=1,f=e.ref(null),_=e.ref(!1);const d=e.ref([]),E=o=>{d.value=o},w=e.computed(()=>b.value==="all"?s.state.gallery:s.state.gallery.filter(o=>o.categories.includes(b.value))),V=async()=>{_.value=!0,await s.actions.fetchGallery(v,y),_.value=!1},u=e.ref(null),t=e.ref({categories:"",size:"",image:!1}),m=e.ref(null),g=o=>{console.log(r.value),r.value?N(o):(u.value="modal",t.value.image=o,k())},N=o=>{u.value="edit-modal",t.value=o||{categories:"",size:"",image:null},k()},n=()=>{t.value={categories:"",size:"",image:!1},m.value=null,B()},k=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},B=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""},C=[{name:"Small",value:""},{name:"Regular",value:"grid-item--width1 grid-item--height1"},{name:"Medium",value:"grid-item--width2 grid-item--height2"},{name:"Big",value:"grid-item--width3 grid-item--height3"}],x=async o=>{await s.actions.deletePhoto(o)},S=async()=>{await s.actions.updatePhoto(t.value),n()},z=async o=>{if(d.length<1||!t.value.categories||!t.value.size){console.error("All fields are required.");return}await s.actions.createPhoto({images:d.value,size:t.value.size,categories:typeof t.value.categories=="string"?t.value.categories.split(",").map(a=>a.trim()):t.value.categories}),n()};let b=e.ref("all");return e.onMounted(async()=>{await s.actions.fetchGallery(v,y),typeof window<"u"&&new IntersectionObserver(a=>{a.some(l=>l.isIntersecting)&&(v+=1,V())}).observe(f.value)}),(o,a)=>(e.openBlock(),e.createElementBlock("div",G,[e.createElementVNode("div",D,[T,r.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:a[0]||(a[0]=l=>g(null)),class:"t-white t-black bg-second i-big radius-extra"},"+")):e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:h,class:"cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(l,re)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,"data-id":l.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[!r.value&&h.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 h-100 o-hidden radius-medium object-fit-cover",onClick:p=>g(l.image)},null,8,$)):(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 radius-small mn-small h-10r object-fit-cover",onClick:p=>g(l)},null,8,O),e.createElementVNode("p",L,[A,H,e.createElementVNode("span",R,e.toDisplayString(l.size.name),1)]),e.createElementVNode("p",J,[K,Q,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.categories,p=>(e.openBlock(),e.createElementBlock("span",W,e.toDisplayString(p),1))),256))]),e.createElementVNode("div",X,[e.createElementVNode("button",{class:"button-small w-100 button",onClick:p=>x(l._id)},"Delete",8,Y)])]))]),_:2},1024)],8,U))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:f,class:"sentinel"},null,512),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",Z,[e.createElementVNode("div",ee,[e.createElementVNode("div",te,[e.createElementVNode("span",{class:"close",onClick:n},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+t.value.image},null,8,le)])])],512),[[e.vShow,t.value.image!==!1&&u.value==="modal"]])]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.value.image!==!1&&u.value==="edit-modal"?(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",ae,[e.createElementVNode("span",{class:"close",onClick:n},"×"),typeof m.value=="string"?(e.openBlock(),e.createElementBlock("img",{key:0,src:m.value,class:"radius-small w-100 mn-small h-20r object-fit-cover"},null,8,se)):e.createCommentVNode("",!0),typeof m.value=="object"&&t.value.image!==null?(e.openBlock(),e.createElementBlock("img",{key:1,class:"radius-small w-100 mn-small h-20r object-fit-cover",src:"/photos/"+t.value.cover},null,8,ne)):e.createCommentVNode("",!0),e.createVNode(M.default,{options:C,label:"Size",select:t.value.size,"onUpdate:select":a[1]||(a[1]=l=>t.value.size=l),placeholder:"Select Size",class:"bg-grey pd-thin radius-small mn-thin t-black"},null,8,["select"]),e.createVNode(I.default,{field:t.value.categories,"onUpdate:field":a[2]||(a[2]=l=>t.value.categories=l),type:"text",label:"Categories",placeholder:"Enter categories for image (comma separated)",class:"bg-grey pd-thin radius-small mn-medium t-black"},null,8,["field"]),e.createVNode(P.default,{images:d.value,"onUpdate:images":E,uploadPath:"photos",class:"mn-semi"},null,8,["images"]),e.createVNode(q.default,{submit:t.value._id?S:z,callback:n,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value._id?"Update":"Create"),1)]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)]),_:1})],512)]))}},ie=j.default(ce,[["__scopeId","data-v-d6a1c805"]]);exports.default=ie;