@ozdao/prometheus-framework 0.1.94 → 0.1.96

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. package/dist/community.server.js +0 -1
  2. package/dist/community.server.mjs +0 -1
  3. package/dist/index-96ec80f2.mjs +217 -0
  4. package/dist/index-fd6fdd90.js +216 -0
  5. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  6. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +49 -2
  7. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +2 -49
  9. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +2 -72
  11. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  12. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +72 -2
  13. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/components/Select/Select.vue.js +2 -78
  15. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  16. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +78 -2
  17. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  19. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +4 -4
  21. package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/community/store/blogposts.js +1 -1
  23. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -4
  24. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +2 -62
  25. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +4 -1
  26. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +62 -2
  27. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  29. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  31. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  33. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +3 -3
  35. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  37. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  39. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  41. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  45. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  47. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  49. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
  51. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  53. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  57. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  59. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  61. package/dist/style.css +1 -1
  62. package/package.json +1 -1
  63. package/src/modules/community/components/pages/CreateBlogPost.vue +3 -2
  64. package/src/modules/community/controllers/blog.controller.js +0 -2
  65. package/src/modules/community/store/blogposts.js +1 -0
  66. package/src/modules/middlewares/server/authJwt.js +1 -0
@@ -247,7 +247,6 @@ const controllerFactory$3 = (db) => {
247
247
  }
248
248
  };
249
249
  const create = (req, res) => {
250
- JSON.parse(req.cookies.user);
251
250
  const newBlogpost = {
252
251
  url: req.body.name.toLowerCase().replace(/ /g, "-").replace(/[^\w-]+/g, ""),
253
252
  name: req.body.name,
@@ -246,7 +246,6 @@ const controllerFactory$3 = (db) => {
246
246
  }
247
247
  };
248
248
  const create = (req, res) => {
249
- JSON.parse(req.cookies.user);
250
249
  const newBlogpost = {
251
250
  url: req.body.name.toLowerCase().replace(/ /g, "-").replace(/[^\w-]+/g, ""),
252
251
  name: req.body.name,
@@ -0,0 +1,217 @@
1
+ import require$$0 from "jsonwebtoken";
2
+ import require$$0$1 from "mongodb";
3
+ const jwt = require$$0;
4
+ const middlewareFactory$4 = (db) => {
5
+ const User = db.user;
6
+ const Role = db.role;
7
+ const verifyToken = async (req, res, next) => {
8
+ try {
9
+ console.log(req.cookies);
10
+ if (req.cookies.user) {
11
+ let user = JSON.parse(req.cookies.user);
12
+ let token = req.headers["x-access-token"] || user.accessToken;
13
+ if (!token) {
14
+ return res.status(403).send({ message: "No token provided!" });
15
+ }
16
+ const decoded = jwt.verify(token, process.env.SECRET_KEY);
17
+ req.userId = decoded.id;
18
+ console.log("success");
19
+ } else {
20
+ console.log("unsuccess");
21
+ }
22
+ next();
23
+ } catch (err) {
24
+ console.log(err);
25
+ return res.status(401).send({ message: "Unauthorized!" });
26
+ }
27
+ };
28
+ const checkRole = (roleToCheck) => async (req, res, next) => {
29
+ try {
30
+ const user = await User.findById(req.userId).exec();
31
+ if (!user) {
32
+ return res.status(404).send({ message: "User Not found." });
33
+ }
34
+ const roles = await Role.find({ _id: { $in: user.roles } }).exec();
35
+ for (let role of roles) {
36
+ if (role.name === roleToCheck) {
37
+ next();
38
+ return;
39
+ }
40
+ }
41
+ res.status(403).send({ message: `Require ${roleToCheck} Role!` });
42
+ } catch (err) {
43
+ res.status(500).send({ message: err.message });
44
+ }
45
+ };
46
+ const isAdmin = checkRole("admin");
47
+ const isModerator = checkRole("moderator");
48
+ return {
49
+ verifyToken,
50
+ isAdmin,
51
+ isModerator
52
+ };
53
+ };
54
+ var authJwt = middlewareFactory$4;
55
+ const middlewareFactory$3 = (db) => {
56
+ const User = db.user;
57
+ db.role;
58
+ const checkDuplicateUsernameOrEmail = async (req, res, next) => {
59
+ const { type, email, phone } = req.body;
60
+ let query;
61
+ if (type === "phone" && phone) {
62
+ query = { phone };
63
+ }
64
+ if (type === "email" && email) {
65
+ query = { email };
66
+ }
67
+ try {
68
+ const user = await User.findOne(query).exec();
69
+ if (user) {
70
+ res.status(400).send({ errorCode: "USER_ALREADY_REGISTERED" });
71
+ return;
72
+ }
73
+ next();
74
+ } catch (err) {
75
+ console.log(err);
76
+ res.status(500).send({ message: err.message });
77
+ }
78
+ };
79
+ const checkRolesExisted = (req, res, next) => {
80
+ if (req.body.roles) {
81
+ for (let i = 0; i < req.body.roles.length; i++) {
82
+ if (!ROLES.includes(req.body.roles[i])) {
83
+ res.status(400).send({
84
+ message: `Failed! Role ${req.body.roles[i]} does not exist!`
85
+ });
86
+ return;
87
+ }
88
+ }
89
+ }
90
+ next();
91
+ };
92
+ return {
93
+ checkDuplicateUsernameOrEmail,
94
+ checkRolesExisted
95
+ };
96
+ };
97
+ var verifySignUp = middlewareFactory$3;
98
+ const middlewareFactory$2 = (db) => {
99
+ const User = db.user;
100
+ db.role;
101
+ const checkUserExist = async (req, res, next) => {
102
+ const { type, email, phone } = req.body;
103
+ let query;
104
+ if (type === "phone" && phone) {
105
+ query = { phone };
106
+ }
107
+ if (type === "email" && email) {
108
+ query = { email };
109
+ }
110
+ try {
111
+ const user = await User.findOne(query).exec();
112
+ if (!user) {
113
+ res.status(400).send({ errorCode: "USER_NOT_REGISTERED_YET" });
114
+ return;
115
+ }
116
+ next();
117
+ } catch (err) {
118
+ res.status(500).send({ message: err.message });
119
+ }
120
+ };
121
+ return {
122
+ checkUserExist
123
+ };
124
+ };
125
+ var verifyUser = middlewareFactory$2;
126
+ const { ObjectId } = require$$0$1;
127
+ const middlewareFactory$1 = (db) => {
128
+ const User = db.user;
129
+ const Invite = db.invite;
130
+ const Membership = db.membership;
131
+ const checkInviteExist = async (req, res, next) => {
132
+ for (let invite of req.body) {
133
+ let query;
134
+ if (invite.contact.includes("@")) {
135
+ query = { invitedEmail: invite.contact };
136
+ } else {
137
+ query = { invitedPhone: invite.contact };
138
+ }
139
+ query.organization = req.params._id;
140
+ const userInvite = await Invite.findOne(query).exec();
141
+ if (userInvite) {
142
+ console.log(userInvite);
143
+ res.status(400).send({ message: "Инвайт c таким email или телефоном уже создан!" });
144
+ return;
145
+ }
146
+ }
147
+ next();
148
+ };
149
+ const checkUsersExist = async (req, res, next) => {
150
+ for (let invite of req.body) {
151
+ let query;
152
+ if (invite.contact.includes("@")) {
153
+ query = { email: invite.contact };
154
+ } else {
155
+ query = { phone: invite.contact };
156
+ }
157
+ const user = await User.findOne(query).exec();
158
+ console.log(req.params);
159
+ if (user) {
160
+ const membership = await Membership.findOne({ user: new ObjectId(user._id), organization: req.params._id }).exec();
161
+ if (membership) {
162
+ console.log(membership);
163
+ res.status(400).send({ message: "Пользователь с таким email или телефоном уже добавлен в организацию!" });
164
+ return;
165
+ }
166
+ }
167
+ }
168
+ next();
169
+ };
170
+ return {
171
+ checkInviteExist,
172
+ checkUsersExist
173
+ };
174
+ };
175
+ var verifyInvites = middlewareFactory$1;
176
+ const middlewareFactory = (db) => {
177
+ const Category = db.category;
178
+ const checkCategoryExistOrNot = async (req, res, next) => {
179
+ try {
180
+ const category = await Category.findOne({ url: req.body.url });
181
+ if (category) {
182
+ res.status(400).send({ message: "Failed! Category with this URL is already in use!" });
183
+ return;
184
+ }
185
+ next();
186
+ } catch (err) {
187
+ res.status(500).send({ message: err });
188
+ }
189
+ };
190
+ return {
191
+ checkCategoryExistOrNot
192
+ };
193
+ };
194
+ var verifyCategory = middlewareFactory;
195
+ const middlewareIndexFactory = (db) => {
196
+ const authJwt$1 = authJwt(db);
197
+ const verifySignUp$1 = verifySignUp(db);
198
+ const verifyUser$1 = verifyUser(db);
199
+ const verifyInvites$1 = verifyInvites(db);
200
+ const verifyCategory$1 = verifyCategory(db);
201
+ return {
202
+ authJwt: authJwt$1,
203
+ verifySignUp: verifySignUp$1,
204
+ verifyUser: verifyUser$1,
205
+ verifyInvites: verifyInvites$1,
206
+ verifyCategory: verifyCategory$1
207
+ };
208
+ };
209
+ var server = middlewareIndexFactory;
210
+ export {
211
+ verifyInvites as a,
212
+ authJwt as b,
213
+ verifySignUp as c,
214
+ verifyCategory as d,
215
+ server as s,
216
+ verifyUser as v
217
+ };
@@ -0,0 +1,216 @@
1
+ "use strict";
2
+ const require$$0 = require("jsonwebtoken");
3
+ const require$$0$1 = require("mongodb");
4
+ const jwt = require$$0;
5
+ const middlewareFactory$4 = (db) => {
6
+ const User = db.user;
7
+ const Role = db.role;
8
+ const verifyToken = async (req, res, next) => {
9
+ try {
10
+ console.log(req.cookies);
11
+ if (req.cookies.user) {
12
+ let user = JSON.parse(req.cookies.user);
13
+ let token = req.headers["x-access-token"] || user.accessToken;
14
+ if (!token) {
15
+ return res.status(403).send({ message: "No token provided!" });
16
+ }
17
+ const decoded = jwt.verify(token, process.env.SECRET_KEY);
18
+ req.userId = decoded.id;
19
+ console.log("success");
20
+ } else {
21
+ console.log("unsuccess");
22
+ }
23
+ next();
24
+ } catch (err) {
25
+ console.log(err);
26
+ return res.status(401).send({ message: "Unauthorized!" });
27
+ }
28
+ };
29
+ const checkRole = (roleToCheck) => async (req, res, next) => {
30
+ try {
31
+ const user = await User.findById(req.userId).exec();
32
+ if (!user) {
33
+ return res.status(404).send({ message: "User Not found." });
34
+ }
35
+ const roles = await Role.find({ _id: { $in: user.roles } }).exec();
36
+ for (let role of roles) {
37
+ if (role.name === roleToCheck) {
38
+ next();
39
+ return;
40
+ }
41
+ }
42
+ res.status(403).send({ message: `Require ${roleToCheck} Role!` });
43
+ } catch (err) {
44
+ res.status(500).send({ message: err.message });
45
+ }
46
+ };
47
+ const isAdmin = checkRole("admin");
48
+ const isModerator = checkRole("moderator");
49
+ return {
50
+ verifyToken,
51
+ isAdmin,
52
+ isModerator
53
+ };
54
+ };
55
+ var authJwt = middlewareFactory$4;
56
+ const middlewareFactory$3 = (db) => {
57
+ const User = db.user;
58
+ db.role;
59
+ const checkDuplicateUsernameOrEmail = async (req, res, next) => {
60
+ const { type, email, phone } = req.body;
61
+ let query;
62
+ if (type === "phone" && phone) {
63
+ query = { phone };
64
+ }
65
+ if (type === "email" && email) {
66
+ query = { email };
67
+ }
68
+ try {
69
+ const user = await User.findOne(query).exec();
70
+ if (user) {
71
+ res.status(400).send({ errorCode: "USER_ALREADY_REGISTERED" });
72
+ return;
73
+ }
74
+ next();
75
+ } catch (err) {
76
+ console.log(err);
77
+ res.status(500).send({ message: err.message });
78
+ }
79
+ };
80
+ const checkRolesExisted = (req, res, next) => {
81
+ if (req.body.roles) {
82
+ for (let i = 0; i < req.body.roles.length; i++) {
83
+ if (!ROLES.includes(req.body.roles[i])) {
84
+ res.status(400).send({
85
+ message: `Failed! Role ${req.body.roles[i]} does not exist!`
86
+ });
87
+ return;
88
+ }
89
+ }
90
+ }
91
+ next();
92
+ };
93
+ return {
94
+ checkDuplicateUsernameOrEmail,
95
+ checkRolesExisted
96
+ };
97
+ };
98
+ var verifySignUp = middlewareFactory$3;
99
+ const middlewareFactory$2 = (db) => {
100
+ const User = db.user;
101
+ db.role;
102
+ const checkUserExist = async (req, res, next) => {
103
+ const { type, email, phone } = req.body;
104
+ let query;
105
+ if (type === "phone" && phone) {
106
+ query = { phone };
107
+ }
108
+ if (type === "email" && email) {
109
+ query = { email };
110
+ }
111
+ try {
112
+ const user = await User.findOne(query).exec();
113
+ if (!user) {
114
+ res.status(400).send({ errorCode: "USER_NOT_REGISTERED_YET" });
115
+ return;
116
+ }
117
+ next();
118
+ } catch (err) {
119
+ res.status(500).send({ message: err.message });
120
+ }
121
+ };
122
+ return {
123
+ checkUserExist
124
+ };
125
+ };
126
+ var verifyUser = middlewareFactory$2;
127
+ const { ObjectId } = require$$0$1;
128
+ const middlewareFactory$1 = (db) => {
129
+ const User = db.user;
130
+ const Invite = db.invite;
131
+ const Membership = db.membership;
132
+ const checkInviteExist = async (req, res, next) => {
133
+ for (let invite of req.body) {
134
+ let query;
135
+ if (invite.contact.includes("@")) {
136
+ query = { invitedEmail: invite.contact };
137
+ } else {
138
+ query = { invitedPhone: invite.contact };
139
+ }
140
+ query.organization = req.params._id;
141
+ const userInvite = await Invite.findOne(query).exec();
142
+ if (userInvite) {
143
+ console.log(userInvite);
144
+ res.status(400).send({ message: "Инвайт c таким email или телефоном уже создан!" });
145
+ return;
146
+ }
147
+ }
148
+ next();
149
+ };
150
+ const checkUsersExist = async (req, res, next) => {
151
+ for (let invite of req.body) {
152
+ let query;
153
+ if (invite.contact.includes("@")) {
154
+ query = { email: invite.contact };
155
+ } else {
156
+ query = { phone: invite.contact };
157
+ }
158
+ const user = await User.findOne(query).exec();
159
+ console.log(req.params);
160
+ if (user) {
161
+ const membership = await Membership.findOne({ user: new ObjectId(user._id), organization: req.params._id }).exec();
162
+ if (membership) {
163
+ console.log(membership);
164
+ res.status(400).send({ message: "Пользователь с таким email или телефоном уже добавлен в организацию!" });
165
+ return;
166
+ }
167
+ }
168
+ }
169
+ next();
170
+ };
171
+ return {
172
+ checkInviteExist,
173
+ checkUsersExist
174
+ };
175
+ };
176
+ var verifyInvites = middlewareFactory$1;
177
+ const middlewareFactory = (db) => {
178
+ const Category = db.category;
179
+ const checkCategoryExistOrNot = async (req, res, next) => {
180
+ try {
181
+ const category = await Category.findOne({ url: req.body.url });
182
+ if (category) {
183
+ res.status(400).send({ message: "Failed! Category with this URL is already in use!" });
184
+ return;
185
+ }
186
+ next();
187
+ } catch (err) {
188
+ res.status(500).send({ message: err });
189
+ }
190
+ };
191
+ return {
192
+ checkCategoryExistOrNot
193
+ };
194
+ };
195
+ var verifyCategory = middlewareFactory;
196
+ const middlewareIndexFactory = (db) => {
197
+ const authJwt$1 = authJwt(db);
198
+ const verifySignUp$1 = verifySignUp(db);
199
+ const verifyUser$1 = verifyUser(db);
200
+ const verifyInvites$1 = verifyInvites(db);
201
+ const verifyCategory$1 = verifyCategory(db);
202
+ return {
203
+ authJwt: authJwt$1,
204
+ verifySignUp: verifySignUp$1,
205
+ verifyUser: verifyUser$1,
206
+ verifyInvites: verifyInvites$1,
207
+ verifyCategory: verifyCategory$1
208
+ };
209
+ };
210
+ var server = middlewareIndexFactory;
211
+ exports.authJwt = authJwt;
212
+ exports.server = server;
213
+ exports.verifyCategory = verifyCategory;
214
+ exports.verifyInvites = verifyInvites;
215
+ exports.verifySignUp = verifySignUp;
216
+ exports.verifyUser = verifyUser;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("../FieldPhone/click-outside.cjs");require("./Dropdown.vue2.cjs");const u=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),s={__name:"Dropdown",props:{label:{type:String,default:"Open"},align:{type:String,default:"left"}},setup(i){let n=a.default;const t=e.ref(!1);function r(){t.value=!1}return(o,l)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"dropdown pos-relative",onClick:l[0]||(l[0]=e.withModifiers(c=>t.value=!t.value,["stop"]))},[e.createTextVNode(e.toDisplayString(i.label)+" ",1),e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{style:e.normalizeStyle({left:i.align==="left"?"0":"auto",right:i.align==="right"?"0":"auto"}),class:"dropdown-content w-15r radius-big"},[e.renderSlot(o.$slots,"default",{},void 0,!0)],4),[[e.vShow,t.value]])]),_:3})])),[[e.unref(n),r]])}},d=u.default(s,[["__scopeId","data-v-2f59adb5"]]);exports.default=d;
@@ -1,4 +1,51 @@
1
- const _ = "";
1
+ import { ref as a, withDirectives as i, openBlock as d, createElementBlock as s, withModifiers as u, createTextVNode as c, toDisplayString as f, createVNode as p, Transition as m, withCtx as v, createElementVNode as g, normalizeStyle as w, renderSlot as k, vShow as S, unref as h } from "vue";
2
+ import y from "../FieldPhone/click-outside.js";
3
+ import "./Dropdown.vue2.js";
4
+ import O from "../../../../_virtual/_plugin-vue_export-helper.js";
5
+ const b = {
6
+ __name: "Dropdown",
7
+ props: {
8
+ label: {
9
+ type: String,
10
+ default: "Open"
11
+ },
12
+ align: {
13
+ type: String,
14
+ default: "left"
15
+ }
16
+ },
17
+ setup(t) {
18
+ let l = y;
19
+ const e = a(!1);
20
+ function n() {
21
+ e.value = !1;
22
+ }
23
+ return (r, o) => i((d(), s("div", {
24
+ class: "dropdown pos-relative",
25
+ onClick: o[0] || (o[0] = u((x) => e.value = !e.value, ["stop"]))
26
+ }, [
27
+ c(f(t.label) + " ", 1),
28
+ p(m, {
29
+ name: "TransitionTranslateY",
30
+ mode: "out-in"
31
+ }, {
32
+ default: v(() => [
33
+ i(g("div", {
34
+ style: w({ left: t.align === "left" ? "0" : "auto", right: t.align === "right" ? "0" : "auto" }),
35
+ class: "dropdown-content w-15r radius-big"
36
+ }, [
37
+ k(r.$slots, "default", {}, void 0, !0)
38
+ ], 4), [
39
+ [S, e.value]
40
+ ])
41
+ ]),
42
+ _: 3
43
+ })
44
+ ])), [
45
+ [h(l), n]
46
+ ]);
47
+ }
48
+ }, N = /* @__PURE__ */ O(b, [["__scopeId", "data-v-2f59adb5"]]);
2
49
  export {
3
- _ as default
50
+ N as default
4
51
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("../FieldPhone/click-outside.cjs");require("./Dropdown.vue.cjs");const u=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),s={__name:"Dropdown",props:{label:{type:String,default:"Open"},align:{type:String,default:"left"}},setup(i){let n=a.default;const t=e.ref(!1);function r(){t.value=!1}return(o,l)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"dropdown pos-relative",onClick:l[0]||(l[0]=e.withModifiers(c=>t.value=!t.value,["stop"]))},[e.createTextVNode(e.toDisplayString(i.label)+" ",1),e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{style:e.normalizeStyle({left:i.align==="left"?"0":"auto",right:i.align==="right"?"0":"auto"}),class:"dropdown-content w-15r radius-big"},[e.renderSlot(o.$slots,"default",{},void 0,!0)],4),[[e.vShow,t.value]])]),_:3})])),[[e.unref(n),r]])}},d=u.default(s,[["__scopeId","data-v-2f59adb5"]]);exports.default=d;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
@@ -1,51 +1,4 @@
1
- import { ref as a, withDirectives as i, openBlock as d, createElementBlock as s, withModifiers as u, createTextVNode as c, toDisplayString as f, createVNode as p, Transition as m, withCtx as v, createElementVNode as g, normalizeStyle as w, renderSlot as k, vShow as S, unref as h } from "vue";
2
- import y from "../FieldPhone/click-outside.js";
3
- import "./Dropdown.vue.js";
4
- import O from "../../../../_virtual/_plugin-vue_export-helper.js";
5
- const b = {
6
- __name: "Dropdown",
7
- props: {
8
- label: {
9
- type: String,
10
- default: "Open"
11
- },
12
- align: {
13
- type: String,
14
- default: "left"
15
- }
16
- },
17
- setup(t) {
18
- let l = y;
19
- const e = a(!1);
20
- function n() {
21
- e.value = !1;
22
- }
23
- return (r, o) => i((d(), s("div", {
24
- class: "dropdown pos-relative",
25
- onClick: o[0] || (o[0] = u((x) => e.value = !e.value, ["stop"]))
26
- }, [
27
- c(f(t.label) + " ", 1),
28
- p(m, {
29
- name: "TransitionTranslateY",
30
- mode: "out-in"
31
- }, {
32
- default: v(() => [
33
- i(g("div", {
34
- style: w({ left: t.align === "left" ? "0" : "auto", right: t.align === "right" ? "0" : "auto" }),
35
- class: "dropdown-content w-15r radius-big"
36
- }, [
37
- k(r.$slots, "default", {}, void 0, !0)
38
- ], 4), [
39
- [S, e.value]
40
- ])
41
- ]),
42
- _: 3
43
- })
44
- ])), [
45
- [h(l), n]
46
- ]);
47
- }
48
- }, N = /* @__PURE__ */ O(b, [["__scopeId", "data-v-2f59adb5"]]);
1
+ const _ = "";
49
2
  export {
50
- N as default
3
+ _ as default
51
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),c=require("vue-i18n"),d=require("../../modules/icons/navigation/IconCross.vue.cjs");require("./Popup.vue2.cjs");const m={key:"popup-content",class:"pd-small popup-wrapper"},v={__name:"Popup",props:{isPopupOpen:{type:Boolean,default:!1},style:String},emits:["close-popup"],setup(t,{emit:l}){const u=t,a=l;function s(){a("close-popup")}e.watch(()=>u.isPopupOpen,o=>{o?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll")}),r.useRoute(),r.useRouter();const p={messages:{en:{},ru:{}}};return c.useI18n(p),(o,n)=>t.isPopupOpen?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createVNode(e.Transition,{name:"TransitionTranslateY",appear:""},{default:e.withCtx(()=>[t.isPopupOpen?(e.openBlock(),e.createElementBlock("div",m,[e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[t.isPopupOpen?(e.openBlock(),e.createElementBlock("section",e.mergeProps({key:0,class:"pos-relative z-index-4"},o.$attrs),[e.createElementVNode("button",{onClick:n[0]||(n[0]=i=>s()),class:"pd-regular hover-scale-1 z-index-5 button-close-popup button"},[e.createVNode(d.default)]),e.renderSlot(o.$slots,"default")],16)):e.createCommentVNode("",!0)]),_:3}),e.createElementVNode("div",{onClick:n[1]||(n[1]=i=>s()),class:e.normalizeClass([{active:t.isPopupOpen===!0},"color-overlay z-index-3"])},null,2)])):e.createCommentVNode("",!0)]),_:3})])):e.createCommentVNode("",!0)}};exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
@@ -1,74 +1,4 @@
1
- import { watch as v, openBlock as s, createBlock as y, Teleport as P, createVNode as n, Transition as l, withCtx as a, createElementBlock as i, mergeProps as k, createElementVNode as u, renderSlot as b, createCommentVNode as p, normalizeClass as x } from "vue";
2
- import { useRoute as C, useRouter as O } from "vue-router";
3
- import { useI18n as T } from "vue-i18n";
4
- import g from "../../modules/icons/navigation/IconCross.vue.js";
5
- import "./Popup.vue2.js";
6
- const z = {
7
- key: "popup-content",
8
- class: "pd-small popup-wrapper"
9
- }, I = {
10
- __name: "Popup",
11
- props: {
12
- isPopupOpen: {
13
- type: Boolean,
14
- default: !1
15
- },
16
- style: String
17
- },
18
- emits: ["close-popup"],
19
- setup(e, { emit: c }) {
20
- const m = e, d = c;
21
- function r() {
22
- d("close-popup");
23
- }
24
- return v(() => m.isPopupOpen, (o) => {
25
- o ? document.body.classList.add("no-scroll") : document.body.classList.remove("no-scroll");
26
- }), C(), O(), T({
27
- messages: {
28
- en: {},
29
- ru: {}
30
- }
31
- }), (o, t) => e.isPopupOpen ? (s(), y(P, {
32
- key: 0,
33
- to: "body"
34
- }, [
35
- n(l, {
36
- name: "TransitionTranslateY",
37
- appear: ""
38
- }, {
39
- default: a(() => [
40
- e.isPopupOpen ? (s(), i("div", z, [
41
- n(l, {
42
- name: "TransitionTranslateY",
43
- mode: "out-in"
44
- }, {
45
- default: a(() => [
46
- e.isPopupOpen ? (s(), i("section", k({
47
- key: 0,
48
- class: "pos-relative z-index-4"
49
- }, o.$attrs), [
50
- u("button", {
51
- onClick: t[0] || (t[0] = (f) => r()),
52
- class: "pd-regular hover-scale-1 z-index-5 button-close-popup button"
53
- }, [
54
- n(g)
55
- ]),
56
- b(o.$slots, "default")
57
- ], 16)) : p("", !0)
58
- ]),
59
- _: 3
60
- }),
61
- u("div", {
62
- onClick: t[1] || (t[1] = (f) => r()),
63
- class: x([{ active: e.isPopupOpen === !0 }, "color-overlay z-index-3"])
64
- }, null, 2)
65
- ])) : p("", !0)
66
- ]),
67
- _: 3
68
- })
69
- ])) : p("", !0);
70
- }
71
- };
1
+ const e = "";
72
2
  export {
73
- I as default
3
+ e as default
74
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),c=require("vue-i18n"),d=require("../../modules/icons/navigation/IconCross.vue.cjs");require("./Popup.vue.cjs");const m={key:"popup-content",class:"pd-small popup-wrapper"},v={__name:"Popup",props:{isPopupOpen:{type:Boolean,default:!1},style:String},emits:["close-popup"],setup(t,{emit:l}){const u=t,a=l;function s(){a("close-popup")}e.watch(()=>u.isPopupOpen,o=>{o?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll")}),r.useRoute(),r.useRouter();const p={messages:{en:{},ru:{}}};return c.useI18n(p),(o,n)=>t.isPopupOpen?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createVNode(e.Transition,{name:"TransitionTranslateY",appear:""},{default:e.withCtx(()=>[t.isPopupOpen?(e.openBlock(),e.createElementBlock("div",m,[e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[t.isPopupOpen?(e.openBlock(),e.createElementBlock("section",e.mergeProps({key:0,class:"pos-relative z-index-4"},o.$attrs),[e.createElementVNode("button",{onClick:n[0]||(n[0]=i=>s()),class:"pd-regular hover-scale-1 z-index-5 button-close-popup button"},[e.createVNode(d.default)]),e.renderSlot(o.$slots,"default")],16)):e.createCommentVNode("",!0)]),_:3}),e.createElementVNode("div",{onClick:n[1]||(n[1]=i=>s()),class:e.normalizeClass([{active:t.isPopupOpen===!0},"color-overlay z-index-3"])},null,2)])):e.createCommentVNode("",!0)]),_:3})])):e.createCommentVNode("",!0)}};exports.default=v;