@ozdao/prometheus-framework 0.1.20 → 0.1.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. package/dist/BackofficeGallery-08d96af1.mjs +305 -0
  2. package/dist/BackofficeGallery-2e695fed.js +1 -0
  3. package/dist/BackofficeGallery-7ae8fbba.mjs +307 -0
  4. package/dist/BackofficeGallery-fe39cff3.js +1 -0
  5. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-8660f9cb.js +1 -0
  6. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-bd3889ee.mjs +1945 -0
  7. package/dist/ButtonFollow-81508d85.mjs +132 -0
  8. package/dist/ButtonFollow-df6317f0.js +1 -0
  9. package/dist/CardOrganization-d8f209ee.js +1 -0
  10. package/dist/CardOrganization-de8ec36e.mjs +230 -0
  11. package/dist/Feed-a75d053e.js +1 -0
  12. package/dist/Feed-c4084664.mjs +368 -0
  13. package/dist/Feed-fea84ce7.mjs +439 -0
  14. package/dist/Feed-ff3b96b2.js +1 -0
  15. package/dist/Image-1281bc48.mjs +477 -0
  16. package/dist/Image-8e67dd2d.js +9 -0
  17. package/dist/Popup-b7609baa.js +1 -0
  18. package/dist/Popup-d5c4cb46.mjs +76 -0
  19. package/dist/Product-3c7b2921.mjs +841 -0
  20. package/dist/Product-6df77924.js +7 -0
  21. package/dist/ProductEdit-737e2a5a.mjs +302 -0
  22. package/dist/ProductEdit-c99ab559.js +1 -0
  23. package/dist/ProfileBlogposts-4293a1e3.js +1 -0
  24. package/dist/ProfileBlogposts-4c326fed.mjs +65 -0
  25. package/dist/ProfileComments-03f88b54.mjs +44 -0
  26. package/dist/ProfileComments-761ce00e.js +1 -0
  27. package/dist/ProfileEvents-0bdd36e4.mjs +57 -0
  28. package/dist/ProfileEvents-a9b96fec.js +1 -0
  29. package/dist/ProfileLikes-3edf6fb8.mjs +44 -0
  30. package/dist/ProfileLikes-51729962.js +1 -0
  31. package/dist/ProfileOrganizations-8961aaee.mjs +213 -0
  32. package/dist/ProfileOrganizations-f52e62e1.js +1 -0
  33. package/dist/Publics-70a0ca9c.mjs +45 -0
  34. package/dist/Publics-bbab7a79.js +1 -0
  35. package/dist/Select-90d4b7c8.mjs +81 -0
  36. package/dist/Select-b9299fb6.js +1 -0
  37. package/dist/Select.vue_vue_type_style_index_0_scoped_a78dbba1_lang-0ea8fbf8.js +1 -0
  38. package/dist/Select.vue_vue_type_style_index_0_scoped_a78dbba1_lang-4ed993c7.mjs +1 -0
  39. package/dist/UploadImage-c9711af2.js +1 -0
  40. package/dist/UploadImage-ec3714e8.mjs +83 -0
  41. package/dist/UploadImageMultiple-b4c8d627.js +1 -0
  42. package/dist/UploadImageMultiple-ebcc51e6.mjs +58 -0
  43. package/dist/auth-78d9392a.mjs +612 -0
  44. package/dist/auth-96449d96.js +7 -0
  45. package/dist/auth.client.cjs +8 -8
  46. package/dist/auth.client.js +8 -8
  47. package/dist/auth.validation-9e493d2f.mjs +20 -0
  48. package/dist/auth.validation-d4795c25.js +1 -0
  49. package/dist/backoffice.client.cjs +1 -1
  50. package/dist/backoffice.client.js +41 -48
  51. package/dist/community.client.cjs +1 -1
  52. package/dist/community.client.js +44 -42
  53. package/dist/events.client.cjs +2 -2
  54. package/dist/events.client.js +25 -24
  55. package/dist/index-2a0269fc.js +2 -0
  56. package/dist/index-9128ade5.mjs +1228 -0
  57. package/dist/landing.client.cjs +1 -1
  58. package/dist/organizations-0fb56927.mjs +122 -0
  59. package/dist/organizations-195ec134.js +1 -0
  60. package/dist/organizations.client-b39db194.js +3 -0
  61. package/dist/organizations.client-df5e8a6f.mjs +3020 -0
  62. package/dist/organizations.client.cjs +1 -1
  63. package/dist/organizations.client.js +46 -44
  64. package/dist/style.css +1 -1
  65. package/dist/users.client.cjs +1 -1
  66. package/dist/users.client.js +23 -23
  67. package/package.json +1 -1
  68. package/src/modules/backoffice/components/layouts/Backoffice.vue +0 -13
  69. package/src/modules/gallery/components/sections/BackofficeGallery.vue +13 -12
@@ -0,0 +1,213 @@
1
+ import { openBlock as r, createElementBlock as o, createStaticVNode as $, ref as c, onMounted as C, createVNode as d, TransitionGroup as v, withCtx as g, Fragment as k, renderList as w, createBlock as f, createCommentVNode as u, Transition as h, normalizeClass as N, watch as q, createElementVNode as O, unref as y } from "vue";
2
+ import { useRoute as M, useRouter as D } from "vue-router";
3
+ import { _ as F } from "./Tab-a243605d.mjs";
4
+ import { _ as L } from "./EmptyState-34d85f10.mjs";
5
+ import { _ as V } from "./CardOrganization-de8ec36e.mjs";
6
+ import { _ as B } from "./_plugin-vue_export-helper-dad06003.mjs";
7
+ import { a as x } from "./organizations-0fb56927.mjs";
8
+ import { s as _ } from "./auth-78d9392a.mjs";
9
+ import "./inputs.validation-14e8e01f.mjs";
10
+ import "./globals-96ba60e4.mjs";
11
+ import "vue-i18n";
12
+ import "./ButtonFollow-81508d85.mjs";
13
+ import "./index-9128ade5.mjs";
14
+ const E = {}, G = {
15
+ width: "100%",
16
+ height: "20rem",
17
+ xmlns: "http://www.w3.org/2000/svg"
18
+ }, P = /* @__PURE__ */ $('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="4" ry="4" width="40%" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="45" rx="5" ry="5" width="70%" height="50" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="110" rx="3" ry="3" width="90%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="130" rx="3" ry="3" width="70%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" mask="url(#myMask)" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>', 6), R = [
19
+ P
20
+ ];
21
+ function T(p, e) {
22
+ return r(), o("svg", G, R);
23
+ }
24
+ const U = /* @__PURE__ */ B(E, [["render", T]]), j = { class: "feed" }, z = {
25
+ __name: "Feed",
26
+ props: {
27
+ category: {
28
+ type: String,
29
+ default: null
30
+ },
31
+ selectedDate: {
32
+ type: String,
33
+ default: null
34
+ },
35
+ organization: {
36
+ type: String,
37
+ default: null
38
+ },
39
+ owner: {
40
+ type: String,
41
+ default: null
42
+ },
43
+ user: {
44
+ type: [String, Number],
45
+ default: null
46
+ },
47
+ member: {
48
+ type: [String, Number],
49
+ default: null
50
+ },
51
+ subscriber: {
52
+ type: [String, Number],
53
+ default: null
54
+ },
55
+ sortOrder: {
56
+ type: String,
57
+ default: "desc"
58
+ },
59
+ participant: {
60
+ type: String,
61
+ default: null
62
+ },
63
+ period: {
64
+ type: String,
65
+ default: null
66
+ },
67
+ status: {
68
+ type: String,
69
+ default: null
70
+ }
71
+ },
72
+ setup(p) {
73
+ const e = p, a = c([]), n = c(!1), t = c(!0), i = c(0), s = c(20), b = async () => {
74
+ if (n.value) {
75
+ i.value += s.value;
76
+ const l = await x.read({
77
+ skip: i.value,
78
+ limit: s.value,
79
+ category: e.category,
80
+ sortOrder: e.sortOrder,
81
+ member: e.member,
82
+ subscriber: e.subscriber,
83
+ onlyuser: e.onlyuser,
84
+ user: e.user,
85
+ date: e.selectedDate,
86
+ owner: e.owner,
87
+ organization: e.organization,
88
+ period: e.period,
89
+ status: e.status
90
+ });
91
+ l.length === 0 ? n.value = !1 : n.value = !0, a.value = [...a.value, ...l];
92
+ }
93
+ };
94
+ return C(async () => {
95
+ t.value = !0, console.log(e.selectedDate);
96
+ const l = await x.read({
97
+ skip: i.value,
98
+ limit: s.value,
99
+ category: e.category,
100
+ member: e.member,
101
+ subscriber: e.subscriber,
102
+ onlyuser: e.onlyuser,
103
+ sortOrder: e.sortOrder,
104
+ user: e.user,
105
+ owner: e.owner,
106
+ date: e.selectedDate,
107
+ organization: e.organization,
108
+ period: e.period,
109
+ status: e.status
110
+ });
111
+ l.length === 0 ? n.value = !1 : n.value = !0, a.value = l, t.value = !1;
112
+ }), (l, J) => (r(), o("section", j, [
113
+ d(v, {
114
+ tag: "ul",
115
+ name: "fade",
116
+ class: "o-hidden bg-grey radius-big"
117
+ }, {
118
+ default: g(() => [
119
+ t.value ? (r(!0), o(k, { key: 0 }, w(s.value, (m) => (r(), f(U, { key: m }))), 128)) : u("", !0)
120
+ ]),
121
+ _: 1
122
+ }),
123
+ d(h, { name: "fade" }, {
124
+ default: g(() => [
125
+ !t.value && a.value.length < 1 ? (r(), f(L, {
126
+ key: 0,
127
+ title: "No Organizations Found",
128
+ description: "Currently, there are no organizations available. Please check back later.",
129
+ class: "pd-medium mn-thin bg-grey radius-big"
130
+ })) : u("", !0)
131
+ ]),
132
+ _: 1
133
+ }),
134
+ d(v, {
135
+ tag: "ul",
136
+ name: "fade",
137
+ class: "container"
138
+ }, {
139
+ default: g(() => [
140
+ !t.value && a.value.length > 0 ? (r(!0), o(k, { key: 0 }, w(a.value, (m, S) => (r(), f(V, {
141
+ onClick: (K) => l.$router.push({ name: "Organization", params: { _id: m._id } }),
142
+ key: m._id,
143
+ organization: m,
144
+ user: p.user,
145
+ type: "normal",
146
+ class: N(["w-100 radius-big mn-medium", {
147
+ "br-b br-solid br-black-transp-10": S !== a.value.length - 1
148
+ }])
149
+ }, null, 8, ["onClick", "organization", "user", "class"]))), 128)) : u("", !0),
150
+ n.value && a.value.length > 0 ? (r(), o("button", {
151
+ key: 1,
152
+ onClick: b,
153
+ class: "w-100 bg-main button"
154
+ }, "Load more")) : u("", !0)
155
+ ]),
156
+ _: 1
157
+ })
158
+ ]));
159
+ }
160
+ }, A = { class: "pd-thin" }, H = { class: "mn-medium flex-v-center flex-nowrap flex" }, I = /* @__PURE__ */ O("h2", { class: "mn-r-medium" }, "Groups", -1), oe = {
161
+ __name: "ProfileOrganizations",
162
+ setup(p) {
163
+ const e = M(), a = D();
164
+ let n = e.query.tab ? e.query.tab : "member";
165
+ const t = c(n);
166
+ return e.query.tab = t.value, q(t, (i) => {
167
+ a.replace({ query: { ...e.query, tab: i } });
168
+ }), (i, s) => (r(), o("div", A, [
169
+ O("header", H, [
170
+ I,
171
+ _.user._id === y(e).params._id ? (r(), o("button", {
172
+ key: 0,
173
+ onClick: s[0] || (s[0] = (b) => i.$router.push({
174
+ name: "Create Organization"
175
+ })),
176
+ class: "radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"
177
+ }, " + ")) : u("", !0)
178
+ ]),
179
+ d(F, {
180
+ selected: t.value,
181
+ "onUpdate:selected": s[1] || (s[1] = (b) => t.value = b),
182
+ tabs: [
183
+ { name: "Member", value: "member" },
184
+ { name: "Follower", value: "follower" }
185
+ ],
186
+ class: "mn-medium mn-r-medium o-hidden h5 radius-big bg-grey"
187
+ }, null, 8, ["selected"]),
188
+ d(h, { name: "slide-fade" }, {
189
+ default: g(() => [
190
+ t.value === "member" ? (r(), f(z, {
191
+ key: 0,
192
+ user: _.user._id,
193
+ owner: y(e).params._id
194
+ }, null, 8, ["user", "owner"])) : u("", !0)
195
+ ]),
196
+ _: 1
197
+ }),
198
+ d(h, { name: "slide-fade" }, {
199
+ default: g(() => [
200
+ t.value === "follower" ? (r(), f(z, {
201
+ key: 0,
202
+ user: _.user._id,
203
+ subscriber: y(e).params._id
204
+ }, null, 8, ["user", "subscriber"])) : u("", !0)
205
+ ]),
206
+ _: 1
207
+ })
208
+ ]));
209
+ }
210
+ };
211
+ export {
212
+ oe as default
213
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("vue-router"),f=require("./Tab-6f0a4909.js"),y=require("./EmptyState-7658d7d6.js"),h=require("./CardOrganization-d8f209ee.js"),k=require("./_plugin-vue_export-helper-f246444f.js"),g=require("./organizations-195ec134.js"),d=require("./auth-96449d96.js");require("./inputs.validation-24ae76b9.js");require("./globals-928eb13c.js");require("vue-i18n");require("./ButtonFollow-df6317f0.js");require("./index-2a0269fc.js");const _={},v={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},w=e.createStaticVNode('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="4" ry="4" width="40%" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="45" rx="5" ry="5" width="70%" height="50" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="110" rx="3" ry="3" width="90%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="130" rx="3" ry="3" width="70%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" mask="url(#myMask)" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>',6),x=[w];function B(u,t){return e.openBlock(),e.createElementBlock("svg",v,x)}const C=k._export_sfc(_,[["render",B]]),N={class:"feed"},p={__name:"Feed",props:{category:{type:String,default:null},selectedDate:{type:String,default:null},organization:{type:String,default:null},owner:{type:String,default:null},user:{type:[String,Number],default:null},member:{type:[String,Number],default:null},subscriber:{type:[String,Number],default:null},sortOrder:{type:String,default:"desc"},participant:{type:String,default:null},period:{type:String,default:null},status:{type:String,default:null}},setup(u){const t=u,a=e.ref([]),o=e.ref(!1),r=e.ref(!0),l=e.ref(0),n=e.ref(20),c=async()=>{if(o.value){l.value+=n.value;const i=await g.actions.read({skip:l.value,limit:n.value,category:t.category,sortOrder:t.sortOrder,member:t.member,subscriber:t.subscriber,onlyuser:t.onlyuser,user:t.user,date:t.selectedDate,owner:t.owner,organization:t.organization,period:t.period,status:t.status});i.length===0?o.value=!1:o.value=!0,a.value=[...a.value,...i]}};return e.onMounted(async()=>{r.value=!0,console.log(t.selectedDate);const i=await g.actions.read({skip:l.value,limit:n.value,category:t.category,member:t.member,subscriber:t.subscriber,onlyuser:t.onlyuser,sortOrder:t.sortOrder,user:t.user,owner:t.owner,date:t.selectedDate,organization:t.organization,period:t.period,status:t.status});i.length===0?o.value=!1:o.value=!0,a.value=i,r.value=!1}),(i,O)=>(e.openBlock(),e.createElementBlock("section",N,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[r.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.value,s=>(e.openBlock(),e.createBlock(C,{key:s}))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!r.value&&a.value.length<1?(e.openBlock(),e.createBlock(y._sfc_main,{key:0,title:"No Organizations Found",description:"Currently, there are no organizations available. Please check back later.",class:"pd-medium mn-thin bg-grey radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"container"},{default:e.withCtx(()=>[!r.value&&a.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.value,(s,b)=>(e.openBlock(),e.createBlock(h._sfc_main,{onClick:E=>i.$router.push({name:"Organization",params:{_id:s._id}}),key:s._id,organization:s,user:u.user,type:"normal",class:e.normalizeClass(["w-100 radius-big mn-medium",{"br-b br-solid br-black-transp-10":b!==a.value.length-1}])},null,8,["onClick","organization","user","class"]))),128)):e.createCommentVNode("",!0),o.value&&a.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:c,class:"w-100 bg-main button"},"Load more")):e.createCommentVNode("",!0)]),_:1})]))}},q={class:"pd-thin"},z={class:"mn-medium flex-v-center flex-nowrap flex"},V=e.createElementVNode("h2",{class:"mn-r-medium"},"Groups",-1),S={__name:"ProfileOrganizations",setup(u){const t=m.useRoute(),a=m.useRouter();let o=t.query.tab?t.query.tab:"member";const r=e.ref(o);return t.query.tab=r.value,e.watch(r,l=>{a.replace({query:{...t.query,tab:l}})}),(l,n)=>(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("header",z,[V,d.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[0]||(n[0]=c=>l.$router.push({name:"Create Organization"})),class:"radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),e.createVNode(f._sfc_main,{selected:r.value,"onUpdate:selected":n[1]||(n[1]=c=>r.value=c),tabs:[{name:"Member",value:"member"},{name:"Follower",value:"follower"}],class:"mn-medium mn-r-medium o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="member"?(e.openBlock(),e.createBlock(p,{key:0,user:d.state.user._id,owner:e.unref(t).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="follower"?(e.openBlock(),e.createBlock(p,{key:0,user:d.state.user._id,subscriber:e.unref(t).params._id},null,8,["user","subscriber"])):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=S;
@@ -0,0 +1,45 @@
1
+ import { ref as c, onMounted as u, openBlock as t, createElementBlock as n, unref as s, createBlock as a, Fragment as d, renderList as _, createCommentVNode as p } from "vue";
2
+ import { _ as f } from "./CardOrganization-de8ec36e.mjs";
3
+ import { _ as h } from "./EmptyState-34d85f10.mjs";
4
+ import { s as l } from "./auth-78d9392a.mjs";
5
+ import { a as y } from "./organizations-0fb56927.mjs";
6
+ import { m as b } from "./ButtonFollow-81508d85.mjs";
7
+ const x = { class: "w-100 o-scroll" }, g = {
8
+ key: 1,
9
+ class: "w-max gap-thin flex-nowrap flex"
10
+ }, P = {
11
+ __name: "Publics",
12
+ setup(k) {
13
+ let e = c(null);
14
+ u(async () => {
15
+ e.value = await y.read({
16
+ user: l.user._id,
17
+ sort: "numberOfMemberships",
18
+ limit: 10,
19
+ types: ["public"]
20
+ });
21
+ });
22
+ const m = ({ membership: o, isMember: i, targetId: r }) => {
23
+ b.handleMembershipUpdate(e.value, o, i, r);
24
+ };
25
+ return (o, i) => (t(), n("div", x, [
26
+ !s(e) || s(e).length < 1 ? (t(), a(h, {
27
+ key: 0,
28
+ title: "Unfortunately, we couldn't find any recommendations for you",
29
+ description: "Explore and find a community or organization that suits your interests.",
30
+ class: "radius-big bg-grey pd-medium"
31
+ })) : (t(), n("div", g, [
32
+ s(e) ? (t(!0), n(d, { key: 0 }, _(s(e), (r, v) => (t(), a(f, {
33
+ key: r._id,
34
+ organization: r,
35
+ user: l.user,
36
+ onUpdateMembership: m,
37
+ class: "flex-child-1 flex-child w-25r"
38
+ }, null, 8, ["organization", "user"]))), 128)) : p("", !0)
39
+ ]))
40
+ ]));
41
+ }
42
+ };
43
+ export {
44
+ P as _
45
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),a=require("./CardOrganization-d8f209ee.js"),c=require("./EmptyState-7658d7d6.js"),s=require("./auth-96449d96.js"),l=require("./organizations-195ec134.js"),u=require("./ButtonFollow-df6317f0.js");const d={class:"w-100 o-scroll"},_={key:1,class:"w-max gap-thin flex-nowrap flex"},m={__name:"Publics",setup(p){let t=e.ref(null);e.onMounted(async()=>{t.value=await l.actions.read({user:s.state.user._id,sort:"numberOfMemberships",limit:10,types:["public"]})});const i=({membership:r,isMember:o,targetId:n})=>{u.mutations.handleMembershipUpdate(t.value,r,o,n)};return(r,o)=>(e.openBlock(),e.createElementBlock("div",d,[!e.unref(t)||e.unref(t).length<1?(e.openBlock(),e.createBlock(c._sfc_main,{key:0,title:"Unfortunately, we couldn't find any recommendations for you",description:"Explore and find a community or organization that suits your interests.",class:"radius-big bg-grey pd-medium"})):(e.openBlock(),e.createElementBlock("div",_,[e.unref(t)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(t),(n,f)=>(e.openBlock(),e.createBlock(a._sfc_main,{key:n._id,organization:n,user:s.state.user,onUpdateMembership:i,class:"flex-child-1 flex-child w-25r"},null,8,["organization","user"]))),128)):e.createCommentVNode("",!0)]))]))}};exports._sfc_main=m;
@@ -0,0 +1,81 @@
1
+ import { ref as f, watch as y, computed as C, openBlock as t, createElementBlock as l, Fragment as v, createElementVNode as i, normalizeClass as h, toDisplayString as r, createCommentVNode as u, withModifiers as S, createVNode as b, Transition as k, withCtx as g, renderList as x, unref as B } from "vue";
2
+ import "./Select.vue_vue_type_style_index_0_scoped_a78dbba1_lang-4ed993c7.mjs";
3
+ import { _ as M } from "./_plugin-vue_export-helper-dad06003.mjs";
4
+ const N = {
5
+ key: 0,
6
+ class: "t-transp mn-r-small"
7
+ }, O = ["onClick"], V = ["onClick"], $ = {
8
+ key: 0,
9
+ class: "mn-t-thin invalid-feedback"
10
+ }, z = {
11
+ __name: "Select",
12
+ props: {
13
+ label: String,
14
+ select: [String, Object],
15
+ placeholder: { type: String, default: "Please select an item" },
16
+ options: { type: Array, default: () => [] },
17
+ validation: Boolean
18
+ },
19
+ emits: ["update:select", "focus", "blur"],
20
+ setup(a, { emit: d }) {
21
+ const s = a, n = f(s.select), o = f(!1);
22
+ y(() => s.select, (e) => {
23
+ n.value = e;
24
+ });
25
+ const _ = C(() => s.select ? s.options.filter((e) => e !== s.select) : s.options), m = () => {
26
+ o.value = !o.value, d(o.value ? "focus" : "blur");
27
+ }, w = (e) => {
28
+ n.value = e, m(), d("update:select", n.value);
29
+ };
30
+ return (e, E) => {
31
+ var p;
32
+ return t(), l(v, null, [
33
+ i("div", {
34
+ class: h([e.$attrs.class, "flex-nowrap flex"])
35
+ }, [
36
+ a.label ? (t(), l("div", N, [
37
+ i("span", null, r(a.label), 1)
38
+ ])) : u("", !0),
39
+ i("li", {
40
+ onClick: S(m, ["stop"]),
41
+ class: "w-100"
42
+ }, [
43
+ i("span", null, r(((p = n.value) == null ? void 0 : p.name) || n.value || a.placeholder), 1)
44
+ ], 8, O),
45
+ b(k, {
46
+ mode: "out-in",
47
+ name: "fade"
48
+ }, {
49
+ default: g(() => [
50
+ o.value ? (t(), l("ul", {
51
+ key: 0,
52
+ class: h([e.$attrs.class, "pos-absolute pos-l-0 z-index-5 w-100 mn-t-big"])
53
+ }, [
54
+ (t(!0), l(v, null, x(B(_), (c) => (t(), l("li", null, [
55
+ c ? (t(), l("span", {
56
+ key: 0,
57
+ onClick: (L) => w(c),
58
+ class: "w-100"
59
+ }, r(c.name || c), 9, V)) : u("", !0)
60
+ ]))), 256))
61
+ ], 2)) : u("", !0)
62
+ ]),
63
+ _: 1
64
+ })
65
+ ], 2),
66
+ b(k, {
67
+ mode: "out-in",
68
+ name: "fade"
69
+ }, {
70
+ default: g(() => [
71
+ a.validation ? (t(), l("div", $, " * " + r(a.validation.message), 1)) : u("", !0)
72
+ ]),
73
+ _: 1
74
+ })
75
+ ], 64);
76
+ };
77
+ }
78
+ }, F = /* @__PURE__ */ M(z, [["__scopeId", "data-v-a78dbba1"]]);
79
+ export {
80
+ F as S
81
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue");require("./Select.vue_vue_type_style_index_0_scoped_a78dbba1_lang-0ea8fbf8.js");const m=require("./_plugin-vue_export-helper-f246444f.js"),p={key:0,class:"t-transp mn-r-small"},k=["onClick"],f=["onClick"],v={key:0,class:"mn-t-thin invalid-feedback"},B={__name:"Select",props:{label:String,select:[String,Object],placeholder:{type:String,default:"Please select an item"},options:{type:Array,default:()=>[]},validation:Boolean},emits:["update:select","focus","blur"],setup(l,{emit:s}){const n=l,a=e.ref(n.select),o=e.ref(!1);e.watch(()=>n.select,t=>{a.value=t});const u=e.computed(()=>n.select?n.options.filter(t=>t!==n.select):n.options),r=()=>{o.value=!o.value,s(o.value?"focus":"blur")},d=t=>{a.value=t,r(),s("update:select",a.value)};return(t,h)=>{var i;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass([t.$attrs.class,"flex-nowrap flex"])},[l.label?(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("span",null,e.toDisplayString(l.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("li",{onClick:e.withModifiers(r,["stop"]),class:"w-100"},[e.createElementVNode("span",null,e.toDisplayString(((i=a.value)==null?void 0:i.name)||a.value||l.placeholder),1)],8,k),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[o.value?(e.openBlock(),e.createElementBlock("ul",{key:0,class:e.normalizeClass([t.$attrs.class,"pos-absolute pos-l-0 z-index-5 w-100 mn-t-big"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(u),c=>(e.openBlock(),e.createElementBlock("li",null,[c?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:C=>d(c),class:"w-100"},e.toDisplayString(c.name||c),9,f)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0)]),_:1})],2),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[l.validation?(e.openBlock(),e.createElementBlock("div",v," * "+e.toDisplayString(l.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64)}}},g=m._export_sfc(B,[["__scopeId","data-v-a78dbba1"]]);exports.Select=g;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),h=require("./index-2a0269fc.js"),C=["src"],m={key:1,class:"flex-v-center flex-h-center flex w-100 h-100 bg-second"},v=e.createElementVNode("svg",{class:"i-medium",width:"104",height:"104",viewBox:"0 0 104 104",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{fill:"white",d:"M21.2784 37.2973C18.8466 34.6628 18.8466 30.6098 21.2784 27.9753L47.2179 2.03584C48.6364 0.81993 50.2577 0.211974 51.8789 0.211974C53.5001 0.211974 55.1213 0.81993 56.5399 2.03584L82.4793 27.9753C84.9111 30.6098 84.9111 34.6628 82.4793 37.2973C79.8448 39.7291 75.7918 39.7291 73.1573 37.2973L58.3637 22.301V71.5454C58.3637 75.1932 55.5266 78.0303 51.8789 78.0303C48.2311 78.0303 45.394 75.1932 45.394 71.5454V22.301L30.6004 37.2973C27.966 39.7291 23.9129 39.7291 21.2784 37.2973ZM97.2729 71.5454C100.921 71.5454 103.758 74.3825 103.758 78.0303V97.4849C103.758 101.133 100.921 103.97 97.2729 103.97H6.48486C2.83713 103.97 0 101.133 0 97.4849V78.0303C0 74.3825 2.83713 71.5454 6.48486 71.5454H38.9092C38.9092 78.6382 44.7861 84.5151 51.8789 84.5151C58.9717 84.5151 64.8486 78.6382 64.8486 71.5454H97.2729ZM87.5456 92.6212C90.1801 92.6212 92.4092 90.392 92.4092 87.7576C92.4092 85.1231 90.1801 82.8939 87.5456 82.8939C84.9111 82.8939 82.682 85.1231 82.682 87.7576C82.682 90.392 84.9111 92.6212 87.5456 92.6212Z"})],-1),g=[v],w={__name:"UploadImage",props:["uploadPath","photo"],emits:["update:photo"],setup(l,{emit:p}){const a=l,o=e.ref(null),r=e.ref(null);e.watch(a,({photo:t})=>{t&&(o.value=t)});function f(){r.value.click()}async function i(t){let n=t.target.files[0],s=new FormData;s.append("file",n);try{let u=await h.axios.create({baseURL:process.env.API_URL,withCredentials:!0}).post(`/api/upload/file?folderName=${encodeURIComponent(a.uploadPath)}`,s,{headers:{"Content-Type":"multipart/form-data"}});o.value=u.data.filepath,p("update:photo",o.value)}catch(c){console.error(c)}}function d(t){t.preventDefault(),i({target:{files:t.dataTransfer.files}})}return(t,n)=>(e.openBlock(),e.createElementBlock("div",{onClick:f,onDrop:d,onDragover:n[0]||(n[0]=e.withModifiers(()=>{},["prevent"])),class:"image-upload-area flex-v-center flex-h-center flex"},[o.value||l.photo?(e.openBlock(),e.createElementBlock("img",{key:0,src:(t.FILE_SERVER_URL||"")+(o.value||l.photo),alt:"Uploaded image",class:"w-100 h-100 object-fit-cover"},null,8,C)):(e.openBlock(),e.createElementBlock("div",m,g)),e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:r,onChange:i,style:{display:"none"}},null,544)],32))}};exports._sfc_main=w;
@@ -0,0 +1,83 @@
1
+ import { ref as d, watch as v, openBlock as l, createElementBlock as n, withModifiers as g, createElementVNode as i } from "vue";
2
+ import { a as w } from "./index-9128ade5.mjs";
3
+ const x = ["src"], _ = {
4
+ key: 1,
5
+ class: "flex-v-center flex-h-center flex w-100 h-100 bg-second"
6
+ }, y = /* @__PURE__ */ i("svg", {
7
+ class: "i-medium",
8
+ width: "104",
9
+ height: "104",
10
+ viewBox: "0 0 104 104",
11
+ fill: "none",
12
+ xmlns: "http://www.w3.org/2000/svg"
13
+ }, [
14
+ /* @__PURE__ */ i("path", {
15
+ fill: "white",
16
+ d: "M21.2784 37.2973C18.8466 34.6628 18.8466 30.6098 21.2784 27.9753L47.2179 2.03584C48.6364 0.81993 50.2577 0.211974 51.8789 0.211974C53.5001 0.211974 55.1213 0.81993 56.5399 2.03584L82.4793 27.9753C84.9111 30.6098 84.9111 34.6628 82.4793 37.2973C79.8448 39.7291 75.7918 39.7291 73.1573 37.2973L58.3637 22.301V71.5454C58.3637 75.1932 55.5266 78.0303 51.8789 78.0303C48.2311 78.0303 45.394 75.1932 45.394 71.5454V22.301L30.6004 37.2973C27.966 39.7291 23.9129 39.7291 21.2784 37.2973ZM97.2729 71.5454C100.921 71.5454 103.758 74.3825 103.758 78.0303V97.4849C103.758 101.133 100.921 103.97 97.2729 103.97H6.48486C2.83713 103.97 0 101.133 0 97.4849V78.0303C0 74.3825 2.83713 71.5454 6.48486 71.5454H38.9092C38.9092 78.6382 44.7861 84.5151 51.8789 84.5151C58.9717 84.5151 64.8486 78.6382 64.8486 71.5454H97.2729ZM87.5456 92.6212C90.1801 92.6212 92.4092 90.392 92.4092 87.7576C92.4092 85.1231 90.1801 82.8939 87.5456 82.8939C84.9111 82.8939 82.682 85.1231 82.682 87.7576C82.682 90.392 84.9111 92.6212 87.5456 92.6212Z"
17
+ })
18
+ ], -1), k = [
19
+ y
20
+ ], D = {
21
+ __name: "UploadImage",
22
+ props: [
23
+ "uploadPath",
24
+ // only necessary prop
25
+ "photo"
26
+ // new prop for holding the image url
27
+ ],
28
+ emits: ["update:photo"],
29
+ setup(a, { emit: u }) {
30
+ const r = a, t = d(null), s = d(null);
31
+ v(r, ({ photo: e }) => {
32
+ e && (t.value = e);
33
+ });
34
+ function h() {
35
+ s.value.click();
36
+ }
37
+ async function c(e) {
38
+ let o = e.target.files[0], p = new FormData();
39
+ p.append("file", o);
40
+ try {
41
+ let m = await w.create({ baseURL: process.env.API_URL, withCredentials: !0 }).post(`/api/upload/file?folderName=${encodeURIComponent(r.uploadPath)}`, p, {
42
+ headers: {
43
+ "Content-Type": "multipart/form-data"
44
+ }
45
+ });
46
+ t.value = m.data.filepath, u("update:photo", t.value);
47
+ } catch (f) {
48
+ console.error(f);
49
+ }
50
+ }
51
+ function C(e) {
52
+ e.preventDefault(), c({
53
+ target: {
54
+ files: e.dataTransfer.files
55
+ }
56
+ });
57
+ }
58
+ return (e, o) => (l(), n("div", {
59
+ onClick: h,
60
+ onDrop: C,
61
+ onDragover: o[0] || (o[0] = g(() => {
62
+ }, ["prevent"])),
63
+ class: "image-upload-area flex-v-center flex-h-center flex"
64
+ }, [
65
+ t.value || a.photo ? (l(), n("img", {
66
+ key: 0,
67
+ src: (e.FILE_SERVER_URL || "") + (t.value || a.photo),
68
+ alt: "Uploaded image",
69
+ class: "w-100 h-100 object-fit-cover"
70
+ }, null, 8, x)) : (l(), n("div", _, k)),
71
+ i("input", {
72
+ type: "file",
73
+ ref_key: "fileInput",
74
+ ref: s,
75
+ onChange: c,
76
+ style: { display: "none" }
77
+ }, null, 544)
78
+ ], 32));
79
+ }
80
+ };
81
+ export {
82
+ D as _
83
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),m=require("./index-2a0269fc.js"),h=e.createElementVNode("div",{class:"flex-v-center flex-h-center flex w-100 h-100"}," upload ",-1),v={__name:"UploadImageMultiple",props:["uploadPath"],emits:["update:images"],setup(i,{emit:p}){const c=i,a=e.ref([]),l=e.ref(null);function f(){l.value.click()}async function r(n){let o=n.target.files,s=new FormData;for(let t=0;t<o.length;t++)s.append("file",o[t]);try{(await m.axios.create({baseURL:process.env.API_URL,withCredentials:!0}).post(`/api/upload/multiple?folderName=${encodeURIComponent(c.uploadPath)}`,s,{headers:{"Content-Type":"multipart/form-data"}})).data.forEach(d=>{a.value.push(d.filepath)}),p("update:images",a.value)}catch(t){console.error(t)}}function u(n){n.preventDefault(),r({target:{files:n.dataTransfer.files}})}return(n,o)=>(e.openBlock(),e.createElementBlock("div",{onClick:f,onDrop:u,onDragover:o[0]||(o[0]=e.withModifiers(()=>{},["prevent"])),class:"flex-v-center flex-h-center flex"},[h,e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:l,onChange:r,multiple:"",style:{display:"none"}},null,544)],32))}};exports._sfc_main=v;
@@ -0,0 +1,58 @@
1
+ import { ref as s, openBlock as h, createElementBlock as v, withModifiers as x, createElementVNode as i } from "vue";
2
+ import { a as g } from "./index-9128ade5.mjs";
3
+ const _ = /* @__PURE__ */ i("div", { class: "flex-v-center flex-h-center flex w-100 h-100" }, " upload ", -1), D = {
4
+ __name: "UploadImageMultiple",
5
+ props: [
6
+ "uploadPath"
7
+ ],
8
+ emits: ["update:images"],
9
+ setup(p, { emit: f }) {
10
+ const c = p, a = s([]), n = s(null);
11
+ function u() {
12
+ n.value.click();
13
+ }
14
+ async function l(t) {
15
+ let o = t.target.files, r = new FormData();
16
+ for (let e = 0; e < o.length; e++)
17
+ r.append("file", o[e]);
18
+ try {
19
+ (await g.create({ baseURL: process.env.API_URL, withCredentials: !0 }).post(`/api/upload/multiple?folderName=${encodeURIComponent(c.uploadPath)}`, r, {
20
+ headers: {
21
+ "Content-Type": "multipart/form-data"
22
+ }
23
+ })).data.forEach((d) => {
24
+ a.value.push(d.filepath);
25
+ }), f("update:images", a.value);
26
+ } catch (e) {
27
+ console.error(e);
28
+ }
29
+ }
30
+ function m(t) {
31
+ t.preventDefault(), l({
32
+ target: {
33
+ files: t.dataTransfer.files
34
+ }
35
+ });
36
+ }
37
+ return (t, o) => (h(), v("div", {
38
+ onClick: u,
39
+ onDrop: m,
40
+ onDragover: o[0] || (o[0] = x(() => {
41
+ }, ["prevent"])),
42
+ class: "flex-v-center flex-h-center flex"
43
+ }, [
44
+ _,
45
+ i("input", {
46
+ type: "file",
47
+ ref_key: "fileInput",
48
+ ref: n,
49
+ onChange: l,
50
+ multiple: "",
51
+ style: { display: "none" }
52
+ }, null, 544)
53
+ ], 32));
54
+ }
55
+ };
56
+ export {
57
+ D as _
58
+ };