@ozdao/prometheus-framework 0.0.86 → 0.0.88

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-15e71ec4.js +1 -0
  2. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-cdbafd07.mjs +1944 -0
  3. package/dist/CardOrganization-ee5c34ab.js +1 -0
  4. package/dist/CardOrganization-f70bd169.mjs +202 -0
  5. package/dist/Comments-63f154a6.js +9 -0
  6. package/dist/Comments-c5afa4d6.mjs +459 -0
  7. package/dist/Feed-51e4e232.js +1 -0
  8. package/dist/Feed-8fd41524.js +1 -0
  9. package/dist/Feed-dc8b66bf.mjs +367 -0
  10. package/dist/Feed-ecf37814.mjs +367 -0
  11. package/dist/IconEdit-736c89be.js +1 -0
  12. package/dist/IconEdit-e9fd4c6c.mjs +21 -0
  13. package/dist/Image-6c7584f5.mjs +477 -0
  14. package/dist/Image-9a870c88.js +9 -0
  15. package/dist/Popup-105ef2c3.js +1 -0
  16. package/dist/Popup-82fb2c8a.mjs +76 -0
  17. package/dist/Product-1724d88d.mjs +837 -0
  18. package/dist/Product-2f3d592f.mjs +837 -0
  19. package/dist/Product-2fbf9d99.js +7 -0
  20. package/dist/Product-a94d8b65.js +7 -0
  21. package/dist/ProductEdit-20709821.mjs +349 -0
  22. package/dist/ProductEdit-57484f1e.mjs +349 -0
  23. package/dist/ProductEdit-a81d13b9.js +1 -0
  24. package/dist/ProductEdit-ef301baa.js +1 -0
  25. package/dist/ProfileBlogposts-eca9916c.js +1 -0
  26. package/dist/ProfileBlogposts-fb014bc6.mjs +63 -0
  27. package/dist/ProfileComments-58094a50.mjs +43 -0
  28. package/dist/ProfileComments-b919f021.js +1 -0
  29. package/dist/ProfileEvents-05485e20.js +1 -0
  30. package/dist/ProfileEvents-1cfe6858.mjs +55 -0
  31. package/dist/ProfileEvents-5d206e3d.mjs +55 -0
  32. package/dist/ProfileEvents-d8e16509.js +1 -0
  33. package/dist/ProfileLikes-2f3a4488.js +1 -0
  34. package/dist/ProfileLikes-b5ac7f48.mjs +43 -0
  35. package/dist/ProfileOrganizations-0b76e38f.js +1 -0
  36. package/dist/ProfileOrganizations-32ab1e30.mjs +211 -0
  37. package/dist/Publics-3f277c17.js +1 -0
  38. package/dist/Publics-9ebffff1.mjs +122 -0
  39. package/dist/Tab-58cd105f.mjs +46 -0
  40. package/dist/Tab-6f0a4909.js +1 -0
  41. package/dist/UploadImage-441e8526.js +1 -0
  42. package/dist/UploadImage-ff8f9a0c.mjs +83 -0
  43. package/dist/auth.client.cjs +2 -2
  44. package/dist/auth.client.js +60 -40
  45. package/dist/community.client.cjs +1 -9
  46. package/dist/community.client.js +361 -750
  47. package/dist/community.server.js +16 -4
  48. package/dist/community.server.mjs +16 -4
  49. package/dist/events.client.cjs +1 -1
  50. package/dist/events.client.js +442 -321
  51. package/dist/events.server.js +96 -2
  52. package/dist/events.server.mjs +96 -2
  53. package/dist/inputs.validation-24ae76b9.js +1 -0
  54. package/dist/modules/constructor/components/elements/Bullets.vue.d.ts +15 -0
  55. package/dist/modules/constructor/components/elements/Caption.vue.d.ts +15 -0
  56. package/dist/modules/constructor/components/elements/H2.vue.d.ts +16 -0
  57. package/dist/modules/constructor/components/elements/Image.vue.d.ts +8 -0
  58. package/dist/modules/constructor/components/elements/ImageUpload.vue.d.ts +9 -0
  59. package/dist/modules/constructor/components/elements/Textarea.vue.d.ts +12 -0
  60. package/dist/modules/constructor/components/sections/Constructor.vue.d.ts +7 -0
  61. package/dist/modules/events/components/sections/Feed.vue.d.ts +1 -0
  62. package/dist/organizations-1b4c84ee.mjs +121 -0
  63. package/dist/organizations-af43bda4.js +1 -0
  64. package/dist/organizations.client-253c8068.mjs +3179 -0
  65. package/dist/organizations.client-686845be.mjs +3179 -0
  66. package/dist/organizations.client-99bfc474.js +3 -0
  67. package/dist/organizations.client-c60d7659.js +3 -0
  68. package/dist/organizations.client.cjs +1 -3
  69. package/dist/organizations.client.js +49 -3025
  70. package/dist/style.css +1 -1
  71. package/dist/users.client.cjs +1 -1
  72. package/dist/users.client.js +10 -10
  73. package/package.json +1 -1
  74. package/src/modules/auth/router/auth.js +28 -7
  75. package/src/modules/community/community.client.js +1 -12
  76. package/src/modules/community/components/pages/BlogPost.vue +1 -1
  77. package/src/modules/community/components/pages/CreateBlogPost.vue +8 -151
  78. package/src/modules/community/middlewares/server/verifyBlogpost.js +24 -11
  79. package/src/modules/{community → constructor}/components/elements/Textarea.vue +3 -11
  80. package/src/modules/constructor/components/sections/Constructor.vue +167 -0
  81. package/src/modules/events/components/blocks/CardEvent.vue +15 -7
  82. package/src/modules/events/components/pages/EditEvent.vue +233 -133
  83. package/src/modules/events/components/pages/Event.vue +43 -4
  84. package/src/modules/events/components/sections/Feed.vue +7 -1
  85. package/src/modules/events/controllers/events.controller.js +9 -0
  86. package/src/modules/events/controllers/tickets.controller.js +2 -1
  87. package/src/modules/events/middlewares/server/index.js +10 -0
  88. package/src/modules/events/middlewares/server/verifyEvent.js +60 -0
  89. package/src/modules/events/models/event.model.js +10 -0
  90. package/src/modules/events/routes/events.routes.js +14 -1
  91. package/src/modules/events/store/events.js +15 -19
  92. package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -3
  93. package/src/modules/organizations/components/sections/Publics.vue +2 -3
  94. package/src/modules/organizations/organizations.client.js +0 -2
  95. package/src/modules/users/components/pages/ProfileEvents.vue +3 -3
  96. package/src/modules/organizations/components/blocks/CardOrganizationSocial.vue +0 -46
  97. /package/src/modules/{community → constructor}/components/elements/Bullets.vue +0 -0
  98. /package/src/modules/{community → constructor}/components/elements/Caption.vue +0 -0
  99. /package/src/modules/{community → constructor}/components/elements/H2.vue +0 -0
  100. /package/src/modules/{community → constructor}/components/elements/Image.vue +0 -0
  101. /package/src/modules/{community → constructor}/components/elements/ImageUpload.vue +0 -0
@@ -0,0 +1,349 @@
1
+ import { toRefs as A, openBlock as n, createElementBlock as c, createTextVNode as C, toDisplayString as w, unref as s, createVNode as d, createElementVNode as e, createCommentVNode as k, createBlock as E, withCtx as N, Fragment as P, renderList as z, ref as U, withModifiers as B, withAsyncContext as D } from "vue";
2
+ import { useRoute as M, useRouter as R } from "vue-router";
3
+ import { s as r, a as V, b as $, _ as F, c as T } from "./organizations.client-686845be.mjs";
4
+ import "./inputs.validation-6960f71b.mjs";
5
+ import { F as v, b as L, a as j } from "./auth-35ef1791.mjs";
6
+ import { C as O } from "./Breadcrumbs.vue_vue_type_style_index_0_lang-cdbafd07.mjs";
7
+ import "vue-i18n";
8
+ import { S as q } from "./Publics-9ebffff1.mjs";
9
+ import { u as G } from "./vuex.esm-bundler-57d8b6ba.mjs";
10
+ import { V as H } from "./vue-draggable-next.esm-bundler-ff6e3f52.mjs";
11
+ import "./globals-96ba60e4.mjs";
12
+ import "./Tab-58cd105f.mjs";
13
+ import "./ButtonFollow-728aab73.mjs";
14
+ import "./Feed-dc8b66bf.mjs";
15
+ import "./EmptyState-34d85f10.mjs";
16
+ import "./CardHeader-ce5a1a75.mjs";
17
+ import "./PlaceholderUserpic-995da0fc.mjs";
18
+ import "./Feed-a31c43c2.mjs";
19
+ import "./IconEdit-e9fd4c6c.mjs";
20
+ import "./organizations-1b4c84ee.mjs";
21
+ import "./UploadImage-ff8f9a0c.mjs";
22
+ import "./CardOrganization-f70bd169.mjs";
23
+ const J = { class: "mn-big flex-column flex" }, K = {
24
+ __name: "EditProductInfo",
25
+ props: {
26
+ product: Object
27
+ },
28
+ setup(m) {
29
+ const u = m, o = G();
30
+ return A(u), (t, l) => (n(), c("div", J, [
31
+ C(w(s(o).products.current) + " ", 1),
32
+ d(q, {
33
+ options: [
34
+ "unpublished",
35
+ "published",
36
+ "archivied"
37
+ ],
38
+ select: s(o).products.state.current.status,
39
+ "onUpdate:select": l[0] || (l[0] = (a) => s(o).products.state.current.status = a),
40
+ placeholder: "Display product",
41
+ class: "w-100 mn-small bg-white radius-small pd-medium"
42
+ }, null, 8, ["select"]),
43
+ d(v, {
44
+ field: s(o).products.state.current.name,
45
+ "onUpdate:field": l[1] || (l[1] = (a) => s(o).products.state.current.name = a),
46
+ placeholder: "Введите название",
47
+ class: "w-100 mn-small bg-white radius-small pd-medium"
48
+ }, null, 8, ["field"]),
49
+ d(v, {
50
+ field: s(o).products.state.current.price,
51
+ "onUpdate:field": l[2] || (l[2] = (a) => s(o).products.state.current.price = a),
52
+ placeholder: "Введите цену",
53
+ class: "w-100 mn-small bg-white radius-small pd-medium",
54
+ type: "number"
55
+ }, null, 8, ["field"]),
56
+ d(v, {
57
+ field: s(o).products.state.current.description,
58
+ "onUpdate:field": l[3] || (l[3] = (a) => s(o).products.state.current.description = a),
59
+ placeholder: "Введите описание",
60
+ class: "w-100 mn-small bg-white radius-small pd-medium",
61
+ type: "textarea"
62
+ }, null, 8, ["field"])
63
+ ]));
64
+ }
65
+ }, Q = { class: "mn-big" }, W = { class: "mn-small flex-nowrap flex" }, X = { class: "mn-r-thin" }, Y = { class: "flex-column flex" }, Z = {
66
+ key: 0,
67
+ class: "w-100 mn-small"
68
+ }, ee = ["onClick"], te = /* @__PURE__ */ e("svg", {
69
+ class: "i-small",
70
+ fill: "none",
71
+ height: "20",
72
+ viewBox: "0 0 20 20",
73
+ width: "20",
74
+ xmlns: "http://www.w3.org/2000/svg"
75
+ }, [
76
+ /* @__PURE__ */ e("path", {
77
+ "clip-rule": "evenodd",
78
+ d: "m7.27124 0h5.45456c1.0041 0 1.8182.814027 1.8182 1.81818v.90899h2.7278c1.0042 0 1.8182.81402 1.8182 1.81818v1.81818c0 1.00415-.814 1.81818-1.8182 1.81818h-.0735l-.8363 10.00009c0 1.0042-.814 1.8182-1.8182 1.8182h-9.09087c-1.00416 0-1.81818-.814-1.81504-1.7427l-.83964-10.07559h-.07187c-1.00415 0-1.818177-.81403-1.818177-1.81818v-1.81818c0-1.00416.814027-1.81818 1.818177-1.81818h2.72668v-.90899c0-1.004153.81402-1.81818 1.81818-1.81818zm-1.81889 18.1819-.83047-10h10.75152l-.827 9.9245-.0031.0755zm-2.72612-11.81799v-1.81818h14.54547v1.81818zm10.00137-4.54571v.90909h-5.45456v-.90909z",
79
+ fill: "#8a8a8a",
80
+ "fill-rule": "evenodd"
81
+ })
82
+ ], -1), se = [
83
+ te
84
+ ], S = {
85
+ __name: "EditParameters",
86
+ props: {
87
+ items: {
88
+ type: Array,
89
+ default: () => []
90
+ },
91
+ title: String,
92
+ addButtonLabel: String,
93
+ emptyMessage: String,
94
+ keyName: String,
95
+ valueName: String
96
+ },
97
+ emits: ["add-info", "delete-info"],
98
+ setup(m, { emit: u }) {
99
+ const o = m;
100
+ function t() {
101
+ u("add-info", {});
102
+ }
103
+ function l(i) {
104
+ u("delete-info", i);
105
+ }
106
+ const { items: a, title: _, emptyMessage: b, addButtonLabel: f, keyName: p, valueName: g } = A(o);
107
+ return (i, I) => (n(), c("div", Q, [
108
+ e("div", W, [
109
+ e("h5", X, w(s(_)), 1),
110
+ e("button", {
111
+ onClick: t,
112
+ class: "i-small pd-thin button-delete button"
113
+ }, "+")
114
+ ]),
115
+ e("div", Y, [
116
+ s(a).length == 0 ? (n(), c("p", Z, w(s(b)), 1)) : k("", !0),
117
+ s(a).length == 0 ? (n(), E(L, {
118
+ key: 1,
119
+ onClick: t,
120
+ class: "button"
121
+ }, {
122
+ default: N(() => [
123
+ C(w(s(f)), 1)
124
+ ]),
125
+ _: 1
126
+ })) : k("", !0),
127
+ (n(!0), c(P, null, z(s(a), (h, x) => (n(), c("div", {
128
+ class: "mn-medium w-100 flex-nowrap flex",
129
+ key: x
130
+ }, [
131
+ d(v, {
132
+ field: h[s(p)],
133
+ "onUpdate:field": (y) => h[s(p)] = y,
134
+ placeholder: "Название параметра",
135
+ class: "w-100 mn-r-small bg-white radius-small pd-medium"
136
+ }, null, 8, ["field", "onUpdate:field"]),
137
+ d(v, {
138
+ field: h[s(g)],
139
+ "onUpdate:field": (y) => h[s(g)] = y,
140
+ placeholder: "Значение параметра",
141
+ class: "w-100 bg-white radius-small pd-medium"
142
+ }, null, 8, ["field", "onUpdate:field"]),
143
+ e("button", {
144
+ onClick: (y) => l(x),
145
+ class: "mn-l-small button"
146
+ }, se, 8, ee)
147
+ ]))), 128))
148
+ ])
149
+ ]));
150
+ }
151
+ }, oe = /* @__PURE__ */ e("div", { class: "flex-v-center flex-h-center flex w-100 h-100" }, " upload ", -1), ae = {
152
+ __name: "UploadImageMultiple",
153
+ props: [
154
+ "uploadPath"
155
+ ],
156
+ emits: ["update:images"],
157
+ setup(m, { emit: u }) {
158
+ const o = m, t = U([]), l = U(null);
159
+ function a() {
160
+ l.value.click();
161
+ }
162
+ async function _(f) {
163
+ let p = f.target.files, g = new FormData();
164
+ for (let i = 0; i < p.length; i++)
165
+ g.append("file", p[i]);
166
+ try {
167
+ (await j.create({ baseURL: process.env.API_URL, withCredentials: !0 }).post(`/api/upload/multiple?folderName=${encodeURIComponent(o.uploadPath)}`, g, {
168
+ headers: {
169
+ "Content-Type": "multipart/form-data"
170
+ }
171
+ })).data.forEach((h) => {
172
+ t.value.push(h.filepath);
173
+ }), u("update:images", t.value);
174
+ } catch (i) {
175
+ console.error(i);
176
+ }
177
+ }
178
+ function b(f) {
179
+ f.preventDefault(), _({
180
+ target: {
181
+ files: f.dataTransfer.files
182
+ }
183
+ });
184
+ }
185
+ return (f, p) => (n(), c("div", {
186
+ onClick: a,
187
+ onDrop: b,
188
+ onDragover: p[0] || (p[0] = B(() => {
189
+ }, ["prevent"])),
190
+ class: "flex-v-center flex-h-center flex"
191
+ }, [
192
+ oe,
193
+ e("input", {
194
+ type: "file",
195
+ ref_key: "fileInput",
196
+ ref: l,
197
+ onChange: _,
198
+ multiple: "",
199
+ style: { display: "none" }
200
+ }, null, 544)
201
+ ], 32));
202
+ }
203
+ }, le = {
204
+ key: 0,
205
+ class: "mn-big"
206
+ }, ne = { class: "flex-column block" }, re = ["src"], ie = ["onClick"], de = {
207
+ __name: "EditProductImages",
208
+ props: {
209
+ product: Object
210
+ },
211
+ setup(m) {
212
+ function u(t) {
213
+ console.log(t), console.log(r.current.images), r.current.images.push(...t);
214
+ }
215
+ function o(t) {
216
+ r.current.images.splice(t, 1);
217
+ }
218
+ return (t, l) => (n(), c("div", null, [
219
+ m.product.images.length < 1 ? (n(), c("p", le, " The product doesn't have any images yet. ")) : k("", !0),
220
+ d(s(H), {
221
+ class: "cols-4 dragArea list-group w-full",
222
+ list: m.product.images,
223
+ sort: !0,
224
+ onChange: t.log
225
+ }, {
226
+ default: N(() => [
227
+ (n(!0), c(P, null, z(m.product.images, (a, _) => (n(), c("div", ne, [
228
+ e("img", {
229
+ class: "w-100 mn-small",
230
+ src: a
231
+ }, null, 8, re),
232
+ e("a", {
233
+ onClick: (b) => o(_),
234
+ class: "w-100 br-grey br-solid br-1px button"
235
+ }, "Удалить", 8, ie)
236
+ ]))), 256))
237
+ ]),
238
+ _: 1
239
+ }, 8, ["list", "onChange"]),
240
+ d(ae, {
241
+ "onUpdate:images": u,
242
+ uploadPath: "organizations/" + t.$route.params._id + "/products",
243
+ class: "mn-t-semi pd-small w-100 button bg-main"
244
+ }, null, 8, ["uploadPath"])
245
+ ]));
246
+ }
247
+ };
248
+ const ce = { class: "for-transition w-100" }, ue = { class: "pd-b-zero pd-t-zero pd-thin" }, me = { class: "pd-thin" }, pe = { class: "flex-nowrap flex bg-grey pd-medium radius-big" }, fe = {
249
+ key: 0,
250
+ class: "mn-r-auto"
251
+ }, he = {
252
+ key: 1,
253
+ class: "mn-r-auto"
254
+ }, _e = { class: "flex-nowrap flex pd-thin" }, ge = { class: "pd-b-zero pd-t-zero pd-thin cols-2 gap-thin" }, be = { class: "mn-thin bg-grey pd-medium o-hidden radius-big" }, ve = /* @__PURE__ */ e("h3", { class: "mn-semi" }, "Profile", -1), ye = { class: "mn-semi" }, we = /* @__PURE__ */ e("h5", null, "Categories", -1), xe = { class: "" }, $e = { class: "mn-thin bg-grey pd-medium o-hidden radius-big" }, ke = /* @__PURE__ */ e("h3", { class: "mn-semi" }, "Images", -1), Je = {
255
+ __name: "ProductEdit",
256
+ async setup(m) {
257
+ let u, o;
258
+ const t = M(), l = R();
259
+ [u, o] = D(() => V.fetchCategories()), await u, o(), t.params.product && ([u, o] = D(() => $.read({ _id: t.params.product })), await u, o());
260
+ function a() {
261
+ r.current.information.push({ name: "", value: "" });
262
+ }
263
+ function _(i) {
264
+ r.current.information.splice(i, 1);
265
+ }
266
+ function b() {
267
+ r.current.localization.push({ locale: "", text: "" });
268
+ }
269
+ function f(i) {
270
+ r.current.localization.splice(i, 1);
271
+ }
272
+ function p() {
273
+ t.params.product ? $.update(t.params.product, r.current) : $.create(t.params._id, r.current);
274
+ }
275
+ function g() {
276
+ l.push({ name: "ProductEdit", params: { _id: t.params._id, product: r.current._id } });
277
+ }
278
+ return (i, I) => (n(), c("div", ce, [
279
+ e("div", ue, [
280
+ d(F, { class: "pd-medium bg-grey radius-big" })
281
+ ]),
282
+ e("div", me, [
283
+ e("header", pe, [
284
+ s(t).params.product ? (n(), c("h1", fe, "Edit Product")) : (n(), c("h1", he, "Create Product")),
285
+ e("section", _e, [
286
+ d(L, {
287
+ submit: p,
288
+ callback: g
289
+ }, {
290
+ default: N(() => [
291
+ C("Save Product")
292
+ ]),
293
+ _: 1
294
+ })
295
+ ])
296
+ ])
297
+ ]),
298
+ e("div", ge, [
299
+ e("div", be, [
300
+ ve,
301
+ d(K, {
302
+ product: r.current
303
+ }, null, 8, ["product"]),
304
+ e("div", ye, [
305
+ we,
306
+ (n(!0), c(P, null, z(T.all, (h, x) => (n(), E(O, {
307
+ label: h.name,
308
+ name: "categories",
309
+ value: h.url,
310
+ class: "w-100 mn-t-small bg-white radius-small pd-small",
311
+ radio: r.current.category
312
+ }, null, 8, ["label", "value", "radio"]))), 256))
313
+ ]),
314
+ d(S, {
315
+ items: r.current.information,
316
+ title: "Parameters",
317
+ emptyMessage: "No parameters",
318
+ addButtonLabel: "Add parameter",
319
+ keyName: "name",
320
+ valueName: "value",
321
+ onAddInfo: a,
322
+ onDeleteInfo: _
323
+ }, null, 8, ["items"]),
324
+ d(S, {
325
+ items: r.current.localization,
326
+ title: "Localization",
327
+ emptyMessage: "No localizations",
328
+ addButtonLabel: "Add localization",
329
+ keyName: "locale",
330
+ valueName: "text",
331
+ onAddInfo: b,
332
+ onDeleteInfo: f
333
+ }, null, 8, ["items"])
334
+ ]),
335
+ e("div", xe, [
336
+ e("div", $e, [
337
+ ke,
338
+ d(de, {
339
+ product: r.current
340
+ }, null, 8, ["product"])
341
+ ])
342
+ ])
343
+ ])
344
+ ]));
345
+ }
346
+ };
347
+ export {
348
+ Je as default
349
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),b=require("vue-router"),n=require("./organizations.client-c60d7659.js");require("./inputs.validation-24ae76b9.js");const p=require("./auth-5aa8e90c.js"),k=require("./Breadcrumbs.vue_vue_type_style_index_0_lang-15e71ec4.js");require("vue-i18n");const y=require("./Publics-3f277c17.js"),x=require("./vuex.esm-bundler-e8cf3cd2.js"),E=require("./vue-draggable-next.esm-bundler-80731ae0.js");require("./globals-928eb13c.js");require("./Tab-6f0a4909.js");require("./ButtonFollow-2ce169ca.js");require("./Feed-8fd41524.js");require("./EmptyState-7658d7d6.js");require("./CardHeader-925a972b.js");require("./PlaceholderUserpic-d64d6dd5.js");require("./Feed-55c5907a.js");require("./IconEdit-736c89be.js");require("./organizations-af43bda4.js");require("./UploadImage-441e8526.js");require("./CardOrganization-ee5c34ab.js");const V={class:"mn-big flex-column flex"},w={__name:"EditProductInfo",props:{product:Object},setup(c){const s=c,o=x.useStore();return e.toRefs(s),(t,l)=>(e.openBlock(),e.createElementBlock("div",V,[e.createTextVNode(e.toDisplayString(e.unref(o).products.current)+" ",1),e.createVNode(y.Select,{options:["unpublished","published","archivied"],select:e.unref(o).products.state.current.status,"onUpdate:select":l[0]||(l[0]=r=>e.unref(o).products.state.current.status=r),placeholder:"Display product",class:"w-100 mn-small bg-white radius-small pd-medium"},null,8,["select"]),e.createVNode(p.Field,{field:e.unref(o).products.state.current.name,"onUpdate:field":l[1]||(l[1]=r=>e.unref(o).products.state.current.name=r),placeholder:"Введите название",class:"w-100 mn-small bg-white radius-small pd-medium"},null,8,["field"]),e.createVNode(p.Field,{field:e.unref(o).products.state.current.price,"onUpdate:field":l[2]||(l[2]=r=>e.unref(o).products.state.current.price=r),placeholder:"Введите цену",class:"w-100 mn-small bg-white radius-small pd-medium",type:"number"},null,8,["field"]),e.createVNode(p.Field,{field:e.unref(o).products.state.current.description,"onUpdate:field":l[3]||(l[3]=r=>e.unref(o).products.state.current.description=r),placeholder:"Введите описание",class:"w-100 mn-small bg-white radius-small pd-medium",type:"textarea"},null,8,["field"])]))}},B={class:"mn-big"},C={class:"mn-small flex-nowrap flex"},$={class:"mn-r-thin"},q={class:"flex-column flex"},P={key:0,class:"w-100 mn-small"},z=["onClick"],D=e.createElementVNode("svg",{class:"i-small",fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"clip-rule":"evenodd",d:"m7.27124 0h5.45456c1.0041 0 1.8182.814027 1.8182 1.81818v.90899h2.7278c1.0042 0 1.8182.81402 1.8182 1.81818v1.81818c0 1.00415-.814 1.81818-1.8182 1.81818h-.0735l-.8363 10.00009c0 1.0042-.814 1.8182-1.8182 1.8182h-9.09087c-1.00416 0-1.81818-.814-1.81504-1.7427l-.83964-10.07559h-.07187c-1.00415 0-1.818177-.81403-1.818177-1.81818v-1.81818c0-1.00416.814027-1.81818 1.818177-1.81818h2.72668v-.90899c0-1.004153.81402-1.81818 1.81818-1.81818zm-1.81889 18.1819-.83047-10h10.75152l-.827 9.9245-.0031.0755zm-2.72612-11.81799v-1.81818h14.54547v1.81818zm10.00137-4.54571v.90909h-5.45456v-.90909z",fill:"#8a8a8a","fill-rule":"evenodd"})],-1),I=[D],N={__name:"EditParameters",props:{items:{type:Array,default:()=>[]},title:String,addButtonLabel:String,emptyMessage:String,keyName:String,valueName:String},emits:["add-info","delete-info"],setup(c,{emit:s}){const o=c;function t(){s("add-info",{})}function l(a){s("delete-info",a)}const{items:r,title:m,emptyMessage:_,addButtonLabel:d,keyName:i,valueName:f}=e.toRefs(o);return(a,v)=>(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("div",C,[e.createElementVNode("h5",$,e.toDisplayString(e.unref(m)),1),e.createElementVNode("button",{onClick:t,class:"i-small pd-thin button-delete button"},"+")]),e.createElementVNode("div",q,[e.unref(r).length==0?(e.openBlock(),e.createElementBlock("p",P,e.toDisplayString(e.unref(_)),1)):e.createCommentVNode("",!0),e.unref(r).length==0?(e.openBlock(),e.createBlock(p._sfc_main,{key:1,onClick:t,class:"button"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)),1)]),_:1})):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),(u,g)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-medium w-100 flex-nowrap flex",key:g},[e.createVNode(p.Field,{field:u[e.unref(i)],"onUpdate:field":h=>u[e.unref(i)]=h,placeholder:"Название параметра",class:"w-100 mn-r-small bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(p.Field,{field:u[e.unref(f)],"onUpdate:field":h=>u[e.unref(f)]=h,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("button",{onClick:h=>l(g),class:"mn-l-small button"},I,8,z)]))),128))])]))}},S=e.createElementVNode("div",{class:"flex-v-center flex-h-center flex w-100 h-100"}," upload ",-1),U={__name:"UploadImageMultiple",props:["uploadPath"],emits:["update:images"],setup(c,{emit:s}){const o=c,t=e.ref([]),l=e.ref(null);function r(){l.value.click()}async function m(d){let i=d.target.files,f=new FormData;for(let a=0;a<i.length;a++)f.append("file",i[a]);try{(await p.axios.create({baseURL:process.env.API_URL,withCredentials:!0}).post(`/api/upload/multiple?folderName=${encodeURIComponent(o.uploadPath)}`,f,{headers:{"Content-Type":"multipart/form-data"}})).data.forEach(u=>{t.value.push(u.filepath)}),s("update:images",t.value)}catch(a){console.error(a)}}function _(d){d.preventDefault(),m({target:{files:d.dataTransfer.files}})}return(d,i)=>(e.openBlock(),e.createElementBlock("div",{onClick:r,onDrop:_,onDragover:i[0]||(i[0]=e.withModifiers(()=>{},["prevent"])),class:"flex-v-center flex-h-center flex"},[S,e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:l,onChange:m,multiple:"",style:{display:"none"}},null,544)],32))}},L={key:0,class:"mn-big"},A={class:"flex-column block"},F=["src"],R=["onClick"],T={__name:"EditProductImages",props:{product:Object},setup(c){function s(t){console.log(t),console.log(n.state.current.images),n.state.current.images.push(...t)}function o(t){n.state.current.images.splice(t,1)}return(t,l)=>(e.openBlock(),e.createElementBlock("div",null,[c.product.images.length<1?(e.openBlock(),e.createElementBlock("p",L," The product doesn't have any images yet. ")):e.createCommentVNode("",!0),e.createVNode(e.unref(E.VueDraggableNext),{class:"cols-4 dragArea list-group w-full",list:c.product.images,sort:!0,onChange:t.log},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.product.images,(r,m)=>(e.openBlock(),e.createElementBlock("div",A,[e.createElementVNode("img",{class:"w-100 mn-small",src:r},null,8,F),e.createElementVNode("a",{onClick:_=>o(m),class:"w-100 br-grey br-solid br-1px button"},"Удалить",8,R)]))),256))]),_:1},8,["list","onChange"]),e.createVNode(U,{"onUpdate:images":s,uploadPath:"organizations/"+t.$route.params._id+"/products",class:"mn-t-semi pd-small w-100 button bg-main"},null,8,["uploadPath"])]))}};const M={class:"for-transition w-100"},j={class:"pd-b-zero pd-t-zero pd-thin"},O={class:"pd-thin"},G={class:"flex-nowrap flex bg-grey pd-medium radius-big"},H={key:0,class:"mn-r-auto"},J={key:1,class:"mn-r-auto"},K={class:"flex-nowrap flex pd-thin"},Q={class:"pd-b-zero pd-t-zero pd-thin cols-2 gap-thin"},W={class:"mn-thin bg-grey pd-medium o-hidden radius-big"},X=e.createElementVNode("h3",{class:"mn-semi"},"Profile",-1),Y={class:"mn-semi"},Z=e.createElementVNode("h5",null,"Categories",-1),ee={class:""},te={class:"mn-thin bg-grey pd-medium o-hidden radius-big"},ne=e.createElementVNode("h3",{class:"mn-semi"},"Images",-1),oe={__name:"ProductEdit",async setup(c){let s,o;const t=b.useRoute(),l=b.useRouter();[s,o]=e.withAsyncContext(()=>n.actions.fetchCategories()),await s,o(),t.params.product&&([s,o]=e.withAsyncContext(()=>n.actions$1.read({_id:t.params.product})),await s,o());function r(){n.state.current.information.push({name:"",value:""})}function m(a){n.state.current.information.splice(a,1)}function _(){n.state.current.localization.push({locale:"",text:""})}function d(a){n.state.current.localization.splice(a,1)}function i(){t.params.product?n.actions$1.update(t.params.product,n.state.current):n.actions$1.create(t.params._id,n.state.current)}function f(){l.push({name:"ProductEdit",params:{_id:t.params._id,product:n.state.current._id}})}return(a,v)=>(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",j,[e.createVNode(n._sfc_main,{class:"pd-medium bg-grey radius-big"})]),e.createElementVNode("div",O,[e.createElementVNode("header",G,[e.unref(t).params.product?(e.openBlock(),e.createElementBlock("h1",H,"Edit Product")):(e.openBlock(),e.createElementBlock("h1",J,"Create Product")),e.createElementVNode("section",K,[e.createVNode(p._sfc_main,{submit:i,callback:f},{default:e.withCtx(()=>[e.createTextVNode("Save Product")]),_:1})])])]),e.createElementVNode("div",Q,[e.createElementVNode("div",W,[X,e.createVNode(w,{product:n.state.current},null,8,["product"]),e.createElementVNode("div",Y,[Z,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.state$1.all,(u,g)=>(e.openBlock(),e.createBlock(k.Checkbox,{label:u.name,name:"categories",value:u.url,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:n.state.current.category},null,8,["label","value","radio"]))),256))]),e.createVNode(N,{items:n.state.current.information,title:"Parameters",emptyMessage:"No parameters",addButtonLabel:"Add parameter",keyName:"name",valueName:"value",onAddInfo:r,onDeleteInfo:m},null,8,["items"]),e.createVNode(N,{items:n.state.current.localization,title:"Localization",emptyMessage:"No localizations",addButtonLabel:"Add localization",keyName:"locale",valueName:"text",onAddInfo:_,onDeleteInfo:d},null,8,["items"])]),e.createElementVNode("div",ee,[e.createElementVNode("div",te,[ne,e.createVNode(T,{product:n.state.current},null,8,["product"])])])])]))}};exports.default=oe;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),b=require("vue-router"),n=require("./organizations.client-99bfc474.js");require("./inputs.validation-24ae76b9.js");const p=require("./auth-5aa8e90c.js"),k=require("./Breadcrumbs.vue_vue_type_style_index_0_lang-15e71ec4.js");require("vue-i18n");const y=require("./Publics-3f277c17.js"),x=require("./vuex.esm-bundler-e8cf3cd2.js"),E=require("./vue-draggable-next.esm-bundler-80731ae0.js");require("./globals-928eb13c.js");require("./Tab-6f0a4909.js");require("./ButtonFollow-2ce169ca.js");require("./Feed-51e4e232.js");require("./EmptyState-7658d7d6.js");require("./CardHeader-925a972b.js");require("./PlaceholderUserpic-d64d6dd5.js");require("./Feed-55c5907a.js");require("./IconEdit-736c89be.js");require("./organizations-af43bda4.js");require("./UploadImage-441e8526.js");require("./CardOrganization-ee5c34ab.js");const V={class:"mn-big flex-column flex"},w={__name:"EditProductInfo",props:{product:Object},setup(c){const s=c,o=x.useStore();return e.toRefs(s),(t,l)=>(e.openBlock(),e.createElementBlock("div",V,[e.createTextVNode(e.toDisplayString(e.unref(o).products.current)+" ",1),e.createVNode(y.Select,{options:["unpublished","published","archivied"],select:e.unref(o).products.state.current.status,"onUpdate:select":l[0]||(l[0]=r=>e.unref(o).products.state.current.status=r),placeholder:"Display product",class:"w-100 mn-small bg-white radius-small pd-medium"},null,8,["select"]),e.createVNode(p.Field,{field:e.unref(o).products.state.current.name,"onUpdate:field":l[1]||(l[1]=r=>e.unref(o).products.state.current.name=r),placeholder:"Введите название",class:"w-100 mn-small bg-white radius-small pd-medium"},null,8,["field"]),e.createVNode(p.Field,{field:e.unref(o).products.state.current.price,"onUpdate:field":l[2]||(l[2]=r=>e.unref(o).products.state.current.price=r),placeholder:"Введите цену",class:"w-100 mn-small bg-white radius-small pd-medium",type:"number"},null,8,["field"]),e.createVNode(p.Field,{field:e.unref(o).products.state.current.description,"onUpdate:field":l[3]||(l[3]=r=>e.unref(o).products.state.current.description=r),placeholder:"Введите описание",class:"w-100 mn-small bg-white radius-small pd-medium",type:"textarea"},null,8,["field"])]))}},B={class:"mn-big"},C={class:"mn-small flex-nowrap flex"},$={class:"mn-r-thin"},q={class:"flex-column flex"},P={key:0,class:"w-100 mn-small"},z=["onClick"],D=e.createElementVNode("svg",{class:"i-small",fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"clip-rule":"evenodd",d:"m7.27124 0h5.45456c1.0041 0 1.8182.814027 1.8182 1.81818v.90899h2.7278c1.0042 0 1.8182.81402 1.8182 1.81818v1.81818c0 1.00415-.814 1.81818-1.8182 1.81818h-.0735l-.8363 10.00009c0 1.0042-.814 1.8182-1.8182 1.8182h-9.09087c-1.00416 0-1.81818-.814-1.81504-1.7427l-.83964-10.07559h-.07187c-1.00415 0-1.818177-.81403-1.818177-1.81818v-1.81818c0-1.00416.814027-1.81818 1.818177-1.81818h2.72668v-.90899c0-1.004153.81402-1.81818 1.81818-1.81818zm-1.81889 18.1819-.83047-10h10.75152l-.827 9.9245-.0031.0755zm-2.72612-11.81799v-1.81818h14.54547v1.81818zm10.00137-4.54571v.90909h-5.45456v-.90909z",fill:"#8a8a8a","fill-rule":"evenodd"})],-1),I=[D],N={__name:"EditParameters",props:{items:{type:Array,default:()=>[]},title:String,addButtonLabel:String,emptyMessage:String,keyName:String,valueName:String},emits:["add-info","delete-info"],setup(c,{emit:s}){const o=c;function t(){s("add-info",{})}function l(a){s("delete-info",a)}const{items:r,title:m,emptyMessage:_,addButtonLabel:d,keyName:i,valueName:f}=e.toRefs(o);return(a,v)=>(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("div",C,[e.createElementVNode("h5",$,e.toDisplayString(e.unref(m)),1),e.createElementVNode("button",{onClick:t,class:"i-small pd-thin button-delete button"},"+")]),e.createElementVNode("div",q,[e.unref(r).length==0?(e.openBlock(),e.createElementBlock("p",P,e.toDisplayString(e.unref(_)),1)):e.createCommentVNode("",!0),e.unref(r).length==0?(e.openBlock(),e.createBlock(p._sfc_main,{key:1,onClick:t,class:"button"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)),1)]),_:1})):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),(u,g)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-medium w-100 flex-nowrap flex",key:g},[e.createVNode(p.Field,{field:u[e.unref(i)],"onUpdate:field":h=>u[e.unref(i)]=h,placeholder:"Название параметра",class:"w-100 mn-r-small bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(p.Field,{field:u[e.unref(f)],"onUpdate:field":h=>u[e.unref(f)]=h,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("button",{onClick:h=>l(g),class:"mn-l-small button"},I,8,z)]))),128))])]))}},S=e.createElementVNode("div",{class:"flex-v-center flex-h-center flex w-100 h-100"}," upload ",-1),U={__name:"UploadImageMultiple",props:["uploadPath"],emits:["update:images"],setup(c,{emit:s}){const o=c,t=e.ref([]),l=e.ref(null);function r(){l.value.click()}async function m(d){let i=d.target.files,f=new FormData;for(let a=0;a<i.length;a++)f.append("file",i[a]);try{(await p.axios.create({baseURL:process.env.API_URL,withCredentials:!0}).post(`/api/upload/multiple?folderName=${encodeURIComponent(o.uploadPath)}`,f,{headers:{"Content-Type":"multipart/form-data"}})).data.forEach(u=>{t.value.push(u.filepath)}),s("update:images",t.value)}catch(a){console.error(a)}}function _(d){d.preventDefault(),m({target:{files:d.dataTransfer.files}})}return(d,i)=>(e.openBlock(),e.createElementBlock("div",{onClick:r,onDrop:_,onDragover:i[0]||(i[0]=e.withModifiers(()=>{},["prevent"])),class:"flex-v-center flex-h-center flex"},[S,e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:l,onChange:m,multiple:"",style:{display:"none"}},null,544)],32))}},L={key:0,class:"mn-big"},A={class:"flex-column block"},F=["src"],R=["onClick"],T={__name:"EditProductImages",props:{product:Object},setup(c){function s(t){console.log(t),console.log(n.state.current.images),n.state.current.images.push(...t)}function o(t){n.state.current.images.splice(t,1)}return(t,l)=>(e.openBlock(),e.createElementBlock("div",null,[c.product.images.length<1?(e.openBlock(),e.createElementBlock("p",L," The product doesn't have any images yet. ")):e.createCommentVNode("",!0),e.createVNode(e.unref(E.VueDraggableNext),{class:"cols-4 dragArea list-group w-full",list:c.product.images,sort:!0,onChange:t.log},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.product.images,(r,m)=>(e.openBlock(),e.createElementBlock("div",A,[e.createElementVNode("img",{class:"w-100 mn-small",src:r},null,8,F),e.createElementVNode("a",{onClick:_=>o(m),class:"w-100 br-grey br-solid br-1px button"},"Удалить",8,R)]))),256))]),_:1},8,["list","onChange"]),e.createVNode(U,{"onUpdate:images":s,uploadPath:"organizations/"+t.$route.params._id+"/products",class:"mn-t-semi pd-small w-100 button bg-main"},null,8,["uploadPath"])]))}};const M={class:"for-transition w-100"},j={class:"pd-b-zero pd-t-zero pd-thin"},O={class:"pd-thin"},G={class:"flex-nowrap flex bg-grey pd-medium radius-big"},H={key:0,class:"mn-r-auto"},J={key:1,class:"mn-r-auto"},K={class:"flex-nowrap flex pd-thin"},Q={class:"pd-b-zero pd-t-zero pd-thin cols-2 gap-thin"},W={class:"mn-thin bg-grey pd-medium o-hidden radius-big"},X=e.createElementVNode("h3",{class:"mn-semi"},"Profile",-1),Y={class:"mn-semi"},Z=e.createElementVNode("h5",null,"Categories",-1),ee={class:""},te={class:"mn-thin bg-grey pd-medium o-hidden radius-big"},ne=e.createElementVNode("h3",{class:"mn-semi"},"Images",-1),oe={__name:"ProductEdit",async setup(c){let s,o;const t=b.useRoute(),l=b.useRouter();[s,o]=e.withAsyncContext(()=>n.actions.fetchCategories()),await s,o(),t.params.product&&([s,o]=e.withAsyncContext(()=>n.actions$1.read({_id:t.params.product})),await s,o());function r(){n.state.current.information.push({name:"",value:""})}function m(a){n.state.current.information.splice(a,1)}function _(){n.state.current.localization.push({locale:"",text:""})}function d(a){n.state.current.localization.splice(a,1)}function i(){t.params.product?n.actions$1.update(t.params.product,n.state.current):n.actions$1.create(t.params._id,n.state.current)}function f(){l.push({name:"ProductEdit",params:{_id:t.params._id,product:n.state.current._id}})}return(a,v)=>(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",j,[e.createVNode(n._sfc_main,{class:"pd-medium bg-grey radius-big"})]),e.createElementVNode("div",O,[e.createElementVNode("header",G,[e.unref(t).params.product?(e.openBlock(),e.createElementBlock("h1",H,"Edit Product")):(e.openBlock(),e.createElementBlock("h1",J,"Create Product")),e.createElementVNode("section",K,[e.createVNode(p._sfc_main,{submit:i,callback:f},{default:e.withCtx(()=>[e.createTextVNode("Save Product")]),_:1})])])]),e.createElementVNode("div",Q,[e.createElementVNode("div",W,[X,e.createVNode(w,{product:n.state.current},null,8,["product"]),e.createElementVNode("div",Y,[Z,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.state$1.all,(u,g)=>(e.openBlock(),e.createBlock(k.Checkbox,{label:u.name,name:"categories",value:u.url,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:n.state.current.category},null,8,["label","value","radio"]))),256))]),e.createVNode(N,{items:n.state.current.information,title:"Parameters",emptyMessage:"No parameters",addButtonLabel:"Add parameter",keyName:"name",valueName:"value",onAddInfo:r,onDeleteInfo:m},null,8,["items"]),e.createVNode(N,{items:n.state.current.localization,title:"Localization",emptyMessage:"No localizations",addButtonLabel:"Add localization",keyName:"locale",valueName:"text",onAddInfo:_,onDeleteInfo:d},null,8,["items"])]),e.createElementVNode("div",ee,[e.createElementVNode("div",te,[ne,e.createVNode(T,{product:n.state.current},null,8,["product"])])])])]))}};exports.default=oe;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("vue-router"),d=require("./Tab-6f0a4909.js"),u=require("./Feed-55c5907a.js"),o=require("./auth-5aa8e90c.js");require("./inputs.validation-24ae76b9.js");require("./globals-928eb13c.js");require("vue-i18n");require("./EmptyState-7658d7d6.js");require("./CardHeader-925a972b.js");require("./PlaceholderUserpic-d64d6dd5.js");const m={class:"pd-thin"},p={class:"mn-medium flex-v-center flex-nowrap flex"},_=e.createElementVNode("h2",{class:"mn-r-medium"},"Posts",-1),f={__name:"ProfileBlogposts",setup(k){const t=l.useRoute(),c=l.useRouter();let i=t.query.tab?t.query.tab:"posts";const r=e.ref(i);return t.query.tab=r.value,e.watch(r,a=>{c.push({query:{...t.query,tab:a}})}),(a,s)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",p,[_,o.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:s[0]||(s[0]=n=>a.$router.push({name:"Create BlogPost"})),class:"radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),o.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createBlock(d._sfc_main,{key:0,selected:r.value,"onUpdate:selected":s[1]||(s[1]=n=>r.value=n),tabs:[{name:"My posts",value:"posts"},{name:"Drafts",value:"drafts"},{name:"Following",value:"following"}],class:"mn-small o-hidden h5 radius-big bg-grey"},null,8,["selected"])):e.createCommentVNode("",!0),r.value==="posts"?(e.openBlock(),e.createBlock(u._sfc_main,{key:1,user:o.state.user._id,creator:e.unref(t).params._id},null,8,["user","creator"])):e.createCommentVNode("",!0),r.value==="drafts"?(e.openBlock(),e.createBlock(u._sfc_main,{key:2,user:o.state.user._id,creator:e.unref(t).params._id,status:"draft"},null,8,["user","creator"])):e.createCommentVNode("",!0),r.value==="following"?(e.openBlock(),e.createBlock(u._sfc_main,{key:3,user:o.state.user._id,category:"following"},null,8,["user"])):e.createCommentVNode("",!0)]))}};exports.default=f;
@@ -0,0 +1,63 @@
1
+ import { ref as f, watch as g, openBlock as t, createElementBlock as d, createElementVNode as p, unref as u, createCommentVNode as s, createBlock as l } from "vue";
2
+ import { useRoute as v, useRouter as y } from "vue-router";
3
+ import { _ as b } from "./Tab-58cd105f.mjs";
4
+ import { _ as n } from "./Feed-a31c43c2.mjs";
5
+ import { s as o } from "./auth-35ef1791.mjs";
6
+ import "./inputs.validation-6960f71b.mjs";
7
+ import "./globals-96ba60e4.mjs";
8
+ import "vue-i18n";
9
+ import "./EmptyState-34d85f10.mjs";
10
+ import "./CardHeader-ce5a1a75.mjs";
11
+ import "./PlaceholderUserpic-995da0fc.mjs";
12
+ const h = { class: "pd-thin" }, k = { class: "mn-medium flex-v-center flex-nowrap flex" }, w = /* @__PURE__ */ p("h2", { class: "mn-r-medium" }, "Posts", -1), F = {
13
+ __name: "ProfileBlogposts",
14
+ setup(q) {
15
+ const e = v(), c = y();
16
+ let _ = e.query.tab ? e.query.tab : "posts";
17
+ const r = f(_);
18
+ return e.query.tab = r.value, g(r, (i) => {
19
+ c.push({ query: { ...e.query, tab: i } });
20
+ }), (i, a) => (t(), d("div", h, [
21
+ p("header", k, [
22
+ w,
23
+ o.user._id === u(e).params._id ? (t(), d("button", {
24
+ key: 0,
25
+ onClick: a[0] || (a[0] = (m) => i.$router.push({
26
+ name: "Create BlogPost"
27
+ })),
28
+ class: "radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"
29
+ }, " + ")) : s("", !0)
30
+ ]),
31
+ o.user._id === u(e).params._id ? (t(), l(b, {
32
+ key: 0,
33
+ selected: r.value,
34
+ "onUpdate:selected": a[1] || (a[1] = (m) => r.value = m),
35
+ tabs: [
36
+ { name: "My posts", value: "posts" },
37
+ { name: "Drafts", value: "drafts" },
38
+ { name: "Following", value: "following" }
39
+ ],
40
+ class: "mn-small o-hidden h5 radius-big bg-grey"
41
+ }, null, 8, ["selected"])) : s("", !0),
42
+ r.value === "posts" ? (t(), l(n, {
43
+ key: 1,
44
+ user: o.user._id,
45
+ creator: u(e).params._id
46
+ }, null, 8, ["user", "creator"])) : s("", !0),
47
+ r.value === "drafts" ? (t(), l(n, {
48
+ key: 2,
49
+ user: o.user._id,
50
+ creator: u(e).params._id,
51
+ status: "draft"
52
+ }, null, 8, ["user", "creator"])) : s("", !0),
53
+ r.value === "following" ? (t(), l(n, {
54
+ key: 3,
55
+ user: o.user._id,
56
+ category: "following"
57
+ }, null, 8, ["user"])) : s("", !0)
58
+ ]));
59
+ }
60
+ };
61
+ export {
62
+ F as default
63
+ };
@@ -0,0 +1,43 @@
1
+ import { ref as l, watch as p, openBlock as s, createElementBlock as c, createVNode as d, createBlock as _, unref as a, createCommentVNode as f, createElementVNode as m } from "vue";
2
+ import { useRoute as b, useRouter as h } from "vue-router";
3
+ import { _ as v } from "./Tab-58cd105f.mjs";
4
+ import { _ as y } from "./Feed-a31c43c2.mjs";
5
+ import "./inputs.validation-6960f71b.mjs";
6
+ import "./globals-96ba60e4.mjs";
7
+ import "vue-i18n";
8
+ import "./EmptyState-34d85f10.mjs";
9
+ import "./auth-35ef1791.mjs";
10
+ import "./CardHeader-ce5a1a75.mjs";
11
+ import "./PlaceholderUserpic-995da0fc.mjs";
12
+ const g = { class: "pd-thin" }, q = /* @__PURE__ */ m("header", { class: "mn-medium flex-v-center flex-nowrap flex" }, [
13
+ /* @__PURE__ */ m("h2", { class: "mn-r-medium" }, "Comments")
14
+ ], -1), M = {
15
+ __name: "ProfileComments",
16
+ setup(w) {
17
+ const e = b(), n = h();
18
+ let u = e.query.tab ? e.query.tab : "posts";
19
+ const t = l(u);
20
+ return e.query.tab = t.value, p(t, (r) => {
21
+ n.push({ query: { ...e.query, tab: r } });
22
+ }), (r, o) => (s(), c("div", g, [
23
+ q,
24
+ d(v, {
25
+ selected: t.value,
26
+ "onUpdate:selected": o[0] || (o[0] = (i) => t.value = i),
27
+ tabs: [
28
+ { name: "My posts", value: "posts" },
29
+ { name: "Following", value: "hubs" }
30
+ ],
31
+ class: "mn-r-medium o-hidden h5 radius-big bg-grey"
32
+ }, null, 8, ["selected"]),
33
+ t.value === "posts" ? (s(), _(y, {
34
+ key: 0,
35
+ user: a(e).params._id,
36
+ owner: a(e).params._id
37
+ }, null, 8, ["user", "owner"])) : f("", !0)
38
+ ]));
39
+ }
40
+ };
41
+ export {
42
+ M as default
43
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("vue-router"),c=require("./Tab-6f0a4909.js"),i=require("./Feed-55c5907a.js");require("./inputs.validation-24ae76b9.js");require("./globals-928eb13c.js");require("vue-i18n");require("./EmptyState-7658d7d6.js");require("./auth-5aa8e90c.js");require("./CardHeader-925a972b.js");require("./PlaceholderUserpic-d64d6dd5.js");const m={class:"pd-thin"},d=e.createElementVNode("header",{class:"mn-medium flex-v-center flex-nowrap flex"},[e.createElementVNode("h2",{class:"mn-r-medium"},"Comments")],-1),p={__name:"ProfileComments",setup(q){const r=o.useRoute(),n=o.useRouter();let a=r.query.tab?r.query.tab:"posts";const t=e.ref(a);return r.query.tab=t.value,e.watch(t,u=>{n.push({query:{...r.query,tab:u}})}),(u,s)=>(e.openBlock(),e.createElementBlock("div",m,[d,e.createVNode(c._sfc_main,{selected:t.value,"onUpdate:selected":s[0]||(s[0]=l=>t.value=l),tabs:[{name:"My posts",value:"posts"},{name:"Following",value:"hubs"}],class:"mn-r-medium o-hidden h5 radius-big bg-grey"},null,8,["selected"]),t.value==="posts"?(e.openBlock(),e.createBlock(i._sfc_main,{key:0,user:e.unref(r).params._id,owner:e.unref(r).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]))}};exports.default=p;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("vue-router"),d=require("./Tab-6f0a4909.js"),i=require("./Feed-8fd41524.js"),n=require("./auth-5aa8e90c.js");require("./inputs.validation-24ae76b9.js");require("./globals-928eb13c.js");require("vue-i18n");require("./EmptyState-7658d7d6.js");require("./CardHeader-925a972b.js");require("./PlaceholderUserpic-d64d6dd5.js");const m={class:"pd-thin"},p={class:"mn-medium flex-v-center flex-nowrap flex"},_=e.createElementVNode("h2",{class:"mn-r-medium"}," Events ",-1),v={__name:"ProfileEvents",setup(q){const r=c.useRoute(),s=c.useRouter();let l=r.query.tab?r.query.tab:"owner";const t=e.ref(l);return r.query.tab=t.value,e.watch(t,u=>{s.push({query:{...r.query,tab:u}})}),(u,a)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",p,[_,n.state.user._id===e.unref(r).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:a[0]||(a[0]=o=>e.unref(s).push({name:"Create Event"})),class:"radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),e.createVNode(d._sfc_main,{selected:t.value,"onUpdate:selected":a[1]||(a[1]=o=>t.value=o),tabs:[{name:"My",value:"owner"},{name:"Participant",value:"participant"}],class:"mn-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),t.value==="owner"?(e.openBlock(),e.createBlock(i._sfc_main,{key:0,user:n.state.user._id,creator:e.unref(r).params._id,sortOrder:"asc"},null,8,["user","creator"])):e.createCommentVNode("",!0),t.value==="participant"?(e.openBlock(),e.createBlock(i._sfc_main,{key:1,user:n.state.user._id,participant:e.unref(r).params._id,sortOrder:"desc"},null,8,["user","participant"])):e.createCommentVNode("",!0)]))}};exports.default=v;
@@ -0,0 +1,55 @@
1
+ import { ref as f, watch as v, openBlock as a, createElementBlock as c, createElementVNode as d, unref as s, createCommentVNode as o, createVNode as b, createBlock as l } from "vue";
2
+ import { useRoute as h, useRouter as y } from "vue-router";
3
+ import { _ as k } from "./Tab-58cd105f.mjs";
4
+ import { _ as p } from "./Feed-dc8b66bf.mjs";
5
+ import { s as n } from "./auth-35ef1791.mjs";
6
+ import "./inputs.validation-6960f71b.mjs";
7
+ import "./globals-96ba60e4.mjs";
8
+ import "vue-i18n";
9
+ import "./EmptyState-34d85f10.mjs";
10
+ import "./CardHeader-ce5a1a75.mjs";
11
+ import "./PlaceholderUserpic-995da0fc.mjs";
12
+ const g = { class: "pd-thin" }, w = { class: "mn-medium flex-v-center flex-nowrap flex" }, q = /* @__PURE__ */ d("h2", { class: "mn-r-medium" }, " Events ", -1), U = {
13
+ __name: "ProfileEvents",
14
+ setup(x) {
15
+ const e = h(), i = y();
16
+ let _ = e.query.tab ? e.query.tab : "owner";
17
+ const t = f(_);
18
+ return e.query.tab = t.value, v(t, (u) => {
19
+ i.push({ query: { ...e.query, tab: u } });
20
+ }), (u, r) => (a(), c("div", g, [
21
+ d("header", w, [
22
+ q,
23
+ n.user._id === s(e).params._id ? (a(), c("button", {
24
+ key: 0,
25
+ onClick: r[0] || (r[0] = (m) => s(i).push({ name: "Create Event" })),
26
+ class: "radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"
27
+ }, " + ")) : o("", !0)
28
+ ]),
29
+ b(k, {
30
+ selected: t.value,
31
+ "onUpdate:selected": r[1] || (r[1] = (m) => t.value = m),
32
+ tabs: [
33
+ { name: "My", value: "owner" },
34
+ { name: "Participant", value: "participant" }
35
+ ],
36
+ class: "mn-small o-hidden h5 radius-big bg-grey"
37
+ }, null, 8, ["selected"]),
38
+ t.value === "owner" ? (a(), l(p, {
39
+ key: 0,
40
+ user: n.user._id,
41
+ creator: s(e).params._id,
42
+ sortOrder: "asc"
43
+ }, null, 8, ["user", "creator"])) : o("", !0),
44
+ t.value === "participant" ? (a(), l(p, {
45
+ key: 1,
46
+ user: n.user._id,
47
+ participant: s(e).params._id,
48
+ sortOrder: "desc"
49
+ }, null, 8, ["user", "participant"])) : o("", !0)
50
+ ]));
51
+ }
52
+ };
53
+ export {
54
+ U as default
55
+ };
@@ -0,0 +1,55 @@
1
+ import { ref as f, watch as v, openBlock as a, createElementBlock as c, createElementVNode as d, unref as s, createCommentVNode as o, createVNode as b, createBlock as l } from "vue";
2
+ import { useRoute as h, useRouter as y } from "vue-router";
3
+ import { _ as k } from "./Tab-58cd105f.mjs";
4
+ import { _ as p } from "./Feed-ecf37814.mjs";
5
+ import { s as n } from "./auth-35ef1791.mjs";
6
+ import "./inputs.validation-6960f71b.mjs";
7
+ import "./globals-96ba60e4.mjs";
8
+ import "vue-i18n";
9
+ import "./EmptyState-34d85f10.mjs";
10
+ import "./CardHeader-ce5a1a75.mjs";
11
+ import "./PlaceholderUserpic-995da0fc.mjs";
12
+ const g = { class: "pd-thin" }, w = { class: "mn-medium flex-v-center flex-nowrap flex" }, q = /* @__PURE__ */ d("h2", { class: "mn-r-medium" }, " Events ", -1), U = {
13
+ __name: "ProfileEvents",
14
+ setup(x) {
15
+ const e = h(), i = y();
16
+ let _ = e.query.tab ? e.query.tab : "owner";
17
+ const t = f(_);
18
+ return e.query.tab = t.value, v(t, (u) => {
19
+ i.push({ query: { ...e.query, tab: u } });
20
+ }), (u, r) => (a(), c("div", g, [
21
+ d("header", w, [
22
+ q,
23
+ n.user._id === s(e).params._id ? (a(), c("button", {
24
+ key: 0,
25
+ onClick: r[0] || (r[0] = (m) => s(i).push({ name: "Create Event" })),
26
+ class: "radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"
27
+ }, " + ")) : o("", !0)
28
+ ]),
29
+ b(k, {
30
+ selected: t.value,
31
+ "onUpdate:selected": r[1] || (r[1] = (m) => t.value = m),
32
+ tabs: [
33
+ { name: "My", value: "owner" },
34
+ { name: "Participant", value: "participant" }
35
+ ],
36
+ class: "mn-small o-hidden h5 radius-big bg-grey"
37
+ }, null, 8, ["selected"]),
38
+ t.value === "owner" ? (a(), l(p, {
39
+ key: 0,
40
+ user: n.user._id,
41
+ creator: s(e).params._id,
42
+ sortOrder: "asc"
43
+ }, null, 8, ["user", "creator"])) : o("", !0),
44
+ t.value === "participant" ? (a(), l(p, {
45
+ key: 1,
46
+ user: n.user._id,
47
+ participant: s(e).params._id,
48
+ sortOrder: "desc"
49
+ }, null, 8, ["user", "participant"])) : o("", !0)
50
+ ]));
51
+ }
52
+ };
53
+ export {
54
+ U as default
55
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("vue-router"),d=require("./Tab-6f0a4909.js"),i=require("./Feed-51e4e232.js"),n=require("./auth-5aa8e90c.js");require("./inputs.validation-24ae76b9.js");require("./globals-928eb13c.js");require("vue-i18n");require("./EmptyState-7658d7d6.js");require("./CardHeader-925a972b.js");require("./PlaceholderUserpic-d64d6dd5.js");const m={class:"pd-thin"},p={class:"mn-medium flex-v-center flex-nowrap flex"},_=e.createElementVNode("h2",{class:"mn-r-medium"}," Events ",-1),v={__name:"ProfileEvents",setup(q){const r=c.useRoute(),s=c.useRouter();let l=r.query.tab?r.query.tab:"owner";const t=e.ref(l);return r.query.tab=t.value,e.watch(t,u=>{s.push({query:{...r.query,tab:u}})}),(u,a)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",p,[_,n.state.user._id===e.unref(r).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:a[0]||(a[0]=o=>e.unref(s).push({name:"Create Event"})),class:"radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),e.createVNode(d._sfc_main,{selected:t.value,"onUpdate:selected":a[1]||(a[1]=o=>t.value=o),tabs:[{name:"My",value:"owner"},{name:"Participant",value:"participant"}],class:"mn-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),t.value==="owner"?(e.openBlock(),e.createBlock(i._sfc_main,{key:0,user:n.state.user._id,creator:e.unref(r).params._id,sortOrder:"asc"},null,8,["user","creator"])):e.createCommentVNode("",!0),t.value==="participant"?(e.openBlock(),e.createBlock(i._sfc_main,{key:1,user:n.state.user._id,participant:e.unref(r).params._id,sortOrder:"desc"},null,8,["user","participant"])):e.createCommentVNode("",!0)]))}};exports.default=v;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("vue-router"),l=require("./Tab-6f0a4909.js"),c=require("./Feed-55c5907a.js");require("./inputs.validation-24ae76b9.js");require("./globals-928eb13c.js");require("vue-i18n");require("./EmptyState-7658d7d6.js");require("./auth-5aa8e90c.js");require("./CardHeader-925a972b.js");require("./PlaceholderUserpic-d64d6dd5.js");const d={class:"pd-thin"},m=e.createElementVNode("header",{class:"mn-medium flex-v-center flex-nowrap flex"},[e.createElementVNode("h2",{class:"mn-r-medium"},"Likes")],-1),p={__name:"ProfileLikes",setup(q){const r=o.useRoute(),a=o.useRouter();let n=r.query.tab?r.query.tab:"posts";const t=e.ref(n);return r.query.tab=t.value,e.watch(t,u=>{a.push({query:{...r.query,tab:u}})}),(u,s)=>(e.openBlock(),e.createElementBlock("div",d,[m,e.createVNode(l._sfc_main,{selected:t.value,"onUpdate:selected":s[0]||(s[0]=i=>t.value=i),tabs:[{name:"My posts",value:"posts"},{name:"Following",value:"hubs"}],class:"mn-r-medium o-hidden h5 radius-big bg-grey"},null,8,["selected"]),t.value==="posts"?(e.openBlock(),e.createBlock(c._sfc_main,{key:0,user:e.unref(r).params._id,owner:e.unref(r).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]))}};exports.default=p;