@ozdao/prometheus-framework 0.1.67 → 0.1.69
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/BackofficeGallery-59a591ab.js +1 -0
- package/dist/BackofficeGallery-be6f69a9.mjs +307 -0
- package/dist/BackofficeReports-06166952.js +1 -0
- package/dist/BackofficeReports-50fd799c.mjs +44 -0
- package/dist/BlockTags-00325fa0.mjs +853 -0
- package/dist/BlockTags-58f95c8a.js +1 -0
- package/dist/ButtonToggleMembership-84d0e018.mjs +90 -0
- package/dist/ButtonToggleMembership-b905812f.js +1 -0
- package/dist/CardBlogpost-1b81b54e.mjs +246 -0
- package/dist/CardBlogpost-7107e04a.js +1 -0
- package/dist/CardOrganization-49ab5190.mjs +234 -0
- package/dist/CardOrganization-e6ac27f1.js +1 -0
- package/dist/CardProduct-4c0cb9a1.js +1 -0
- package/dist/CardProduct-ea0e1f84.mjs +192 -0
- package/dist/Chips-817cf959.js +1 -0
- package/dist/Chips-8c836ba6.mjs +213 -0
- package/dist/Community-8c4e011b.js +1 -0
- package/dist/Community-bd6f0cbb.mjs +131 -0
- package/dist/Dashboard-73b50724.js +1 -0
- package/dist/Dashboard-bc81b5f6.mjs +151 -0
- package/dist/Dropdown-60e3dc6c.js +1 -0
- package/dist/Dropdown-d1c81d45.mjs +169 -0
- package/dist/EditOrder-2b746caf.mjs +221 -0
- package/dist/EditOrder-e632f0cc.js +1 -0
- package/dist/Events-999cc8ed.js +1 -0
- package/dist/Events-ad8bbf27.mjs +134 -0
- package/dist/Feed-35e13c22.mjs +156 -0
- package/dist/Feed-53d96b18.mjs +361 -0
- package/dist/Feed-694a2fad.js +1 -0
- package/dist/Feed-ac4bb6ea.js +1 -0
- package/dist/Feed-d1d01771.js +1 -0
- package/dist/Feed-f7c04014.mjs +124 -0
- package/dist/Image-61cfd52d.js +9 -0
- package/dist/Image-e8be4acc.mjs +480 -0
- package/dist/LeftoverAdd-a268a95c.js +1 -0
- package/dist/LeftoverAdd-e4d93760.mjs +229 -0
- package/dist/Leftovers-6976802d.mjs +135 -0
- package/dist/Leftovers-d8f1d152.js +1 -0
- package/dist/Members-aeb2bca1.mjs +109 -0
- package/dist/Members-b9664e83.js +1 -0
- package/dist/Menu-93d34d9f.js +1 -0
- package/dist/Menu-eaf6b44c.mjs +13 -0
- package/dist/MenuItem-4a5881bd.mjs +85 -0
- package/dist/MenuItem-f35cad93.js +1 -0
- package/dist/Orders-8bc8963c.js +1 -0
- package/dist/Orders-eb262d8c.mjs +75 -0
- package/dist/Organizations-9926aa51.mjs +72 -0
- package/dist/Organizations-c653d814.js +1 -0
- package/dist/Payments-98328000.js +1 -0
- package/dist/Payments-a9066cdf.mjs +11 -0
- package/dist/Popup-0d8e1392.mjs +96 -0
- package/dist/Popup-eb11fa82.js +1 -0
- package/dist/Product-15043af7.mjs +651 -0
- package/dist/Product-82c022a4.js +7 -0
- package/dist/ProductEdit-05da9866.mjs +258 -0
- package/dist/ProductEdit-2f075296.js +1 -0
- package/dist/ProductsBackoffice-8462f626.js +1 -0
- package/dist/ProductsBackoffice-8d0f0ee8.mjs +85 -0
- package/dist/ProfileBlogposts-43855cb9.js +1 -0
- package/dist/ProfileBlogposts-f32170a3.mjs +78 -0
- package/dist/ProfileEvents-54be2d43.mjs +69 -0
- package/dist/ProfileEvents-ab69e27e.js +1 -0
- package/dist/ProfileOrganizations-0787cf34.mjs +72 -0
- package/dist/ProfileOrganizations-eb62dde4.js +1 -0
- package/dist/Publics-8e726d20.mjs +45 -0
- package/dist/Publics-ae589bf1.js +1 -0
- package/dist/Select-95f4701a.js +1 -0
- package/dist/Select-dab17282.mjs +80 -0
- package/dist/Select.vue_vue_type_style_index_0_scoped_dfe03dc2_lang-0ea8fbf8.js +1 -0
- package/dist/Select.vue_vue_type_style_index_0_scoped_dfe03dc2_lang-4ed993c7.mjs +1 -0
- package/dist/Socials-43293869.js +1 -0
- package/dist/Socials-8193477c.mjs +189 -0
- package/dist/UploadImage-0e8e4278.mjs +83 -0
- package/dist/UploadImage-8c71bda6.js +1 -0
- package/dist/UploadImageMultiple-c34a6c6f.mjs +58 -0
- package/dist/UploadImageMultiple-d1316df5.js +1 -0
- package/dist/Wallet-727195d9.mjs +21700 -0
- package/dist/Wallet-f4dda407.js +10 -0
- package/dist/auth-04684a60.js +7 -0
- package/dist/auth-7e39361f.mjs +633 -0
- package/dist/auth.client.cjs +1 -1
- package/dist/auth.client.js +5 -5
- package/dist/auth.server.js +1 -1
- package/dist/auth.server.mjs +1 -1
- package/dist/auth.validation-d614130d.js +1 -0
- package/dist/auth.validation-f4bf1deb.mjs +24 -0
- package/dist/axios-33aeb810.mjs +1435 -0
- package/dist/axios-ceccf20e.js +5 -0
- package/dist/backoffice.client.cjs +1 -1
- package/dist/backoffice.client.js +20 -20
- package/dist/categories-7e17a7eb.js +1 -0
- package/dist/categories-b7f9e8c0.mjs +122 -0
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +209 -202
- package/dist/components/Upload/Upload.vue.d.ts.map +1 -1
- package/dist/events.client.cjs +2 -2
- package/dist/events.client.js +24 -27
- package/dist/landing.client.cjs +1 -1
- package/dist/landing.client.js +64 -40
- package/dist/leftovers-86e7d438.mjs +67 -0
- package/dist/leftovers-c9f70579.js +1 -0
- package/dist/legal.client.cjs +1 -1
- package/dist/legal.client.js +6 -7
- package/dist/main.css +1 -1
- package/dist/memberships-559590ad.mjs +68 -0
- package/dist/memberships-58af22e0.js +1 -0
- package/dist/modules/constructor/components/elements/H2.vue.d.ts +1 -1
- package/dist/modules/constructor/components/elements/Textarea.vue.d.ts +1 -1
- package/dist/modules/products/components/sections/EditProductInfo.vue.d.ts +1 -5
- package/dist/orders-1325c51b.js +1 -0
- package/dist/orders-c7cbe706.mjs +85 -0
- package/dist/organizations-71777b32.js +1 -0
- package/dist/organizations-93f7b610.mjs +122 -0
- package/dist/organizations.client-6ca27fb3.js +3 -0
- package/dist/organizations.client-bd63a7b2.mjs +2997 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +56 -61
- package/dist/products-61d83d74.js +1 -0
- package/dist/products-7f1e5a75.mjs +108 -0
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +67 -65
- package/dist/prometheus-framework.cjs.js +21 -21
- package/dist/prometheus-framework.es.js +682 -690
- package/dist/reports-a67b4fb4.js +1 -0
- package/dist/reports-c579b02a.mjs +91 -0
- package/dist/reports.client.cjs +1 -1
- package/dist/reports.client.js +2 -2
- package/dist/states.validation-3b4604bc.mjs +13 -0
- package/dist/states.validation-9b43a097.js +1 -0
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +279 -208
- package/package.json +30 -35
- package/src/components/Button/Button.vue +1 -1
- package/src/components/Sidebar/Sidebar.vue +10 -8
- package/src/components/Upload/Upload.vue +8 -28
- package/src/modules/auth/components/pages/SignIn.vue +2 -2
- package/src/modules/auth/controllers/auth.controller.js +1 -1
- package/src/modules/auth/store/auth.js +21 -24
- package/src/modules/backoffice/components/admin/ProductEdit.vue +2 -0
- package/src/modules/constructor/components/sections/Constructor.vue +7 -54
- package/src/modules/gallery/components/pages/Gallery.vue +7 -1
- package/src/modules/gallery/components/sections/GalleryWithCategories.vue +24 -8
- package/src/modules/gallery/gallery.client.js +5 -1
- package/src/modules/marketplace/components/layouts/Marketplace.vue +1 -0
- package/src/modules/organizations/components/pages/Organization.vue +2 -2
- package/src/modules/payments/components/pages/Payments.vue +4 -3
- package/src/modules/products/components/blocks/CardLeftover.vue +0 -1
- package/src/modules/products/components/blocks/CardProduct.vue +15 -1
- package/src/modules/products/components/sections/EditProductInfo.vue +16 -14
- package/src/modules/products/components/sections/FilterProducts.vue +0 -2
- package/src/modules/products/components/sections/SectionProduct.vue +1 -0
- package/src/modules/products/components/sections/SortProducts.vue +2 -0
- package/src/modules/products/store/categories.js +9 -9
- package/src/modules/products/store/leftovers.js +6 -9
- package/src/modules/products/store/products.js +2 -0
- package/src/modules/users/components/pages/Profile.vue +3 -5
- package/src/modules/wallet/components/pages/Wallet.vue +1 -1
- package/src/styles/components/button.scss +253 -0
- package/src/styles/theme.scss +1 -0
- package/src/modules/constructor/components/elements/Audio.vue +0 -82
- package/src/modules/constructor/components/elements/Embed.vue +0 -85
- package/src/modules/globals/mixins/mixins.js +0 -52
- package/src/modules/globals/router/routerGuards.js +0 -28
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./organizations.client-
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./organizations.client-6ca27fb3.js"),r=require("./Organizations-c653d814.js"),i=require("./CardOrganization-e6ac27f1.js"),t=require("./Socials-43293869.js"),n=require("./Publics-ae589bf1.js"),a=require("./ButtonToggleMembership-b905812f.js"),u=require("./memberships-58af22e0.js"),s=require("./organizations-71777b32.js");require("vue");require("vue-router");require("vue-i18n");require("./globals-928eb13c.js");require("./Breadcrumbs.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./Tab-2c1e4224.js");require("./Tab.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./MenuItem-f35cad93.js");require("./_plugin-vue_export-helper-f246444f.js");require("./Feed-694a2fad.js");require("./Loader.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./EmptyState-d65bab5b.js");require("./Chips-817cf959.js");require("./Dropdown-60e3dc6c.js");require("./Popup-eb11fa82.js");require("./Popup.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./Button-7643c9aa.js");require("./Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./Select-95f4701a.js");require("./Select.vue_vue_type_style_index_0_scoped_dfe03dc2_lang-0ea8fbf8.js");require("./reports-a67b4fb4.js");require("./axios-ceccf20e.js");require("./click-outside-0b0727d1.js");require("./auth-04684a60.js");require("./IconEdit-c0469b45.js");require("./SkeletonEvent-eb284de8.js");require("./Feed-ac4bb6ea.js");require("./Loader-21f016da.js");require("./CardBlogpost-7107e04a.js");require("./Checkbox-76f09248.js");require("./categories-7e17a7eb.js");require("./Feed-98b47c6f.js");require("./CardProduct-4c0cb9a1.js");require("./products-61d83d74.js");require("./Field.vue_vue_type_style_index_0_scoped_f4a29b0d_lang-0ea8fbf8.js");require("./inputs.validation-d7cef32b.js");require("./BlockTags-58f95c8a.js");require("./Field-e2a43424.js");require("./SelectMulti-c25765cf.js");require("./UploadImage-8c71bda6.js");require("./auth.validation-d614130d.js");require("./Feed-d1d01771.js");exports.CardDepartment=e.CardDepartment;exports.Contacts=e._sfc_main$9;exports.Department=e._sfc_main$3;exports.DepartmentEdit=e.DepartmentEdit;exports.DepartmentMemberModify=e.DepartmentMemberModify;exports.DepartmentSub=e.DepartmentSub;exports.DetailsTab=e._sfc_main$11;exports.Documents=e.Documents;exports.EditArray=e._sfc_main$5;exports.EmptyState=e._sfc_main$8;exports.FeedDepartments=e._sfc_main$10;exports.MembersAdd=e._sfc_main;exports.MembersList=e._sfc_main$1;exports.Organization=e._sfc_main$2;exports.OrganizationEdit=e._sfc_main$4;exports.OrganizationsSection=e._sfc_main$12;exports.Rating=e._sfc_main$7;exports.Unit=e._sfc_main$6;exports.User=e.User;exports.departmentsStore=e.departments;exports.invitesStore=e.invites;exports.organizationsRouter=e.organizations;exports.Organizations=r.default;exports.CardOrganization=i._sfc_main;exports.Socials=t._sfc_main;exports.Publics=n._sfc_main;exports.ButtonToggleMembership=a._sfc_main;exports.membershipsStore=u.memberships;exports.organizationStore=s.organization;
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import { C as
|
2
|
-
import { default as
|
3
|
-
import { _ as
|
4
|
-
import { _ as
|
5
|
-
import { _ as
|
6
|
-
import { _ as
|
7
|
-
import { b as
|
8
|
-
import { o as
|
1
|
+
import { C as J, l as K, d as N, D as Q, i as V, h as W, n as X, p as Y, f as Z, k as $, m as tt, _ as rt, b as ot, c as it, e as mt, o as pt, j as at, g as et, U as st, r as nt, q as dt, t as ft } from "./organizations.client-bd63a7b2.mjs";
|
2
|
+
import { default as bt } from "./Organizations-9926aa51.mjs";
|
3
|
+
import { _ as xt } from "./CardOrganization-49ab5190.mjs";
|
4
|
+
import { _ as zt } from "./Socials-8193477c.mjs";
|
5
|
+
import { _ as lt } from "./Publics-8e726d20.mjs";
|
6
|
+
import { _ as Mt } from "./ButtonToggleMembership-84d0e018.mjs";
|
7
|
+
import { b as _t } from "./memberships-559590ad.mjs";
|
8
|
+
import { o as Et } from "./organizations-93f7b610.mjs";
|
9
9
|
import "vue";
|
10
10
|
import "vue-router";
|
11
11
|
import "vue-i18n";
|
@@ -13,74 +13,69 @@ import "./globals-96ba60e4.mjs";
|
|
13
13
|
import "./Breadcrumbs.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
14
14
|
import "./Tab-054b61f7.mjs";
|
15
15
|
import "./Tab.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
16
|
-
import "./MenuItem-
|
17
|
-
import "./IconChevronRight-fae9d012.mjs";
|
16
|
+
import "./MenuItem-4a5881bd.mjs";
|
18
17
|
import "./_plugin-vue_export-helper-dad06003.mjs";
|
19
|
-
import "./Feed-
|
18
|
+
import "./Feed-53d96b18.mjs";
|
20
19
|
import "./Loader.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
21
20
|
import "./EmptyState-e404b05d.mjs";
|
22
|
-
import "./Chips-
|
23
|
-
import "./
|
24
|
-
import "./
|
25
|
-
import "./Popup-0915427c.mjs";
|
26
|
-
import "./IconCross-84cb1292.mjs";
|
21
|
+
import "./Chips-8c836ba6.mjs";
|
22
|
+
import "./Dropdown-d1c81d45.mjs";
|
23
|
+
import "./Popup-0d8e1392.mjs";
|
27
24
|
import "./Popup.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
28
25
|
import "./Button-9e1a9284.mjs";
|
29
26
|
import "./Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
30
|
-
import "./Select-
|
31
|
-
import "./
|
32
|
-
import "./
|
27
|
+
import "./Select-dab17282.mjs";
|
28
|
+
import "./Select.vue_vue_type_style_index_0_scoped_dfe03dc2_lang-4ed993c7.mjs";
|
29
|
+
import "./reports-c579b02a.mjs";
|
30
|
+
import "./axios-33aeb810.mjs";
|
33
31
|
import "./click-outside-6101836c.mjs";
|
34
|
-
import "./auth-
|
32
|
+
import "./auth-7e39361f.mjs";
|
35
33
|
import "./IconEdit-9edfd74d.mjs";
|
36
34
|
import "./SkeletonEvent-8690422d.mjs";
|
37
|
-
import "./Feed-
|
35
|
+
import "./Feed-f7c04014.mjs";
|
38
36
|
import "./Loader-cd422786.mjs";
|
39
|
-
import "./CardBlogpost-
|
37
|
+
import "./CardBlogpost-1b81b54e.mjs";
|
40
38
|
import "./Checkbox-5dbe7b23.mjs";
|
41
|
-
import "./categories-
|
39
|
+
import "./categories-b7f9e8c0.mjs";
|
42
40
|
import "./Feed-d114330c.mjs";
|
43
|
-
import "./CardProduct-
|
44
|
-
import "./
|
45
|
-
import "./products-943fb95e.mjs";
|
41
|
+
import "./CardProduct-ea0e1f84.mjs";
|
42
|
+
import "./products-7f1e5a75.mjs";
|
46
43
|
import "./Field.vue_vue_type_style_index_0_scoped_f4a29b0d_lang-4ed993c7.mjs";
|
47
44
|
import "./inputs.validation-db65277a.mjs";
|
48
|
-
import "./BlockTags-
|
45
|
+
import "./BlockTags-00325fa0.mjs";
|
49
46
|
import "./Field-e5ad88d3.mjs";
|
50
47
|
import "./SelectMulti-58704d69.mjs";
|
51
|
-
import "./UploadImage-
|
52
|
-
import "./auth.validation-
|
53
|
-
import "./Feed-
|
54
|
-
import "./SkeletonOrganization-8690422d.mjs";
|
55
|
-
import "./dribbble-ae37c2ac.mjs";
|
48
|
+
import "./UploadImage-0e8e4278.mjs";
|
49
|
+
import "./auth.validation-f4bf1deb.mjs";
|
50
|
+
import "./Feed-35e13c22.mjs";
|
56
51
|
export {
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
52
|
+
Mt as ButtonToggleMembership,
|
53
|
+
J as CardDepartment,
|
54
|
+
xt as CardOrganization,
|
55
|
+
K as Contacts,
|
56
|
+
N as Department,
|
57
|
+
Q as DepartmentEdit,
|
58
|
+
V as DepartmentMemberModify,
|
59
|
+
W as DepartmentSub,
|
60
|
+
X as DetailsTab,
|
61
|
+
Y as Documents,
|
62
|
+
Z as EditArray,
|
63
|
+
$ as EmptyState,
|
64
|
+
tt as FeedDepartments,
|
65
|
+
rt as MembersAdd,
|
66
|
+
ot as MembersList,
|
67
|
+
it as Organization,
|
68
|
+
mt as OrganizationEdit,
|
69
|
+
bt as Organizations,
|
70
|
+
pt as OrganizationsSection,
|
71
|
+
lt as Publics,
|
72
|
+
at as Rating,
|
73
|
+
zt as Socials,
|
74
|
+
et as Unit,
|
75
|
+
st as User,
|
76
|
+
nt as departmentsStore,
|
77
|
+
dt as invitesStore,
|
78
|
+
_t as membershipsStore,
|
79
|
+
Et as organizationStore,
|
80
|
+
ft as organizationsRouter
|
86
81
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const i=require("vue");require("./auth-04684a60.js");const c=require("./axios-ceccf20e.js"),s=require("./globals-928eb13c.js"),n=c.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),t=i.reactive({all:[],current:{recommendation:!1,category:[],status:"unpublished",information:[],coverImage:"",images:[],files:[],image3d:!1,name:"",sale:0,price:0,localization:[],modifications:[],description:""}}),u={async create(e,r){const a={...r,organization:e};return await n.post("/products/create",a).then(o=>(l(o.data,"current"),Promise.resolve(o.data)),o=>(s.setError(o),Promise.reject(o)))},async read(e={}){let r={params:{}};e._id&&(r.params._id=e._id),e.category&&(r.params.category=e.category),r.params.skip=e.skip||0,r.params.limit=e.limit||10,e.organization&&(r.params.organization=e.organization),console.log(e),e.status&&(r.params.status=e.status),r.params.sort="createdAt",console.log(r);try{const a=await n.get("/products/read",{params:r.params});return e._id?t.current=a.data[0]:t.all=a.data,Promise.resolve(a.data)}catch(a){return s.setError(a),Promise.reject(a)}},async update(e,r){return await n.post("/products/"+e,r).then(a=>Promise.resolve(a.data),a=>(s.setError(a),Promise.reject(a)))},async deleteProduct(e){return await n.delete("/products/"+e).then(r=>Promise.resolve(r.data),r=>(s.setError(r),Promise.reject(r)))},async submitMood(e=null){return console.log(e),n.post("/product/recommended",{mood:e}).then(r=>(t.current=r.data.product,t.current.recommendation=r.data.recommendationText,Promise.resolve(r.data)),r=>(console.log(r),s.setError(r),Promise.reject(r)))},async fetchProducts(){return await n.get("/products/read").then(e=>(t.all=e.data,Promise.resolve(e.data)),e=>(s.setError(e),Promise.reject(e)))},async fetchProductsPopular(){return await n.get("/products/popular").then(e=>(t.popular=e.data,Promise.resolve(e.data)),e=>(s.setError(e),Promise.reject(e)))},async fetchProductsPublished(){return await n.get("/products").then(e=>{let r=e.data.filter(function(a,o){return a.status!=="unpublished"});return t.all=r,t.filtered=r.slice(),t.filteredPrice=t.filtered,t.filteredPrice.sort(function(a,o){return a[t.sort.current]>o[t.sort.current]?t.sort.ascending?1:-1:a[t.sort.current]<o[t.sort.current]?t.sort.ascending?-1:1:0}),Promise.resolve(e.data)},e=>(s.setError(e),Promise.reject(e)))},async fetchProduct(e){return await n.get("/products/"+e).then(r=>(r.localization||(r.localization=[]),t.current=r.data,Promise.resolve(r.data)),r=>(s.setError(r),Promise.reject(r)))},async fetchProductPopular(){return await n.get("/products").then(e=>(t.all=e.data.slice(1,5),Promise.resolve(e.data.slice(1,5))),e=>(s.setError(e),Promise.reject(e)))}};function l(e,r){t[r]=e}i.watch(t,(e,r)=>{});exports.actions=u;exports.state=t;
|
@@ -0,0 +1,108 @@
|
|
1
|
+
import { reactive as c, watch as o } from "vue";
|
2
|
+
import "./auth-7e39361f.mjs";
|
3
|
+
import { a as u } from "./axios-33aeb810.mjs";
|
4
|
+
import { s } from "./globals-96ba60e4.mjs";
|
5
|
+
const n = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = c({
|
6
|
+
all: [],
|
7
|
+
current: {
|
8
|
+
recommendation: !1,
|
9
|
+
category: [],
|
10
|
+
status: "unpublished",
|
11
|
+
information: [],
|
12
|
+
coverImage: "",
|
13
|
+
images: [],
|
14
|
+
files: [],
|
15
|
+
image3d: !1,
|
16
|
+
name: "",
|
17
|
+
sale: 0,
|
18
|
+
price: 0,
|
19
|
+
localization: [],
|
20
|
+
modifications: [],
|
21
|
+
description: ""
|
22
|
+
}
|
23
|
+
}), g = {
|
24
|
+
async create(e, t) {
|
25
|
+
const a = {
|
26
|
+
...t,
|
27
|
+
organization: e
|
28
|
+
};
|
29
|
+
return await n.post("/products/create", a).then(
|
30
|
+
(i) => (d(i.data, "current"), Promise.resolve(i.data)),
|
31
|
+
(i) => (s(i), Promise.reject(i))
|
32
|
+
);
|
33
|
+
},
|
34
|
+
async read(e = {}) {
|
35
|
+
let t = { params: {} };
|
36
|
+
e._id && (t.params._id = e._id), e.category && (t.params.category = e.category), t.params.skip = e.skip || 0, t.params.limit = e.limit || 10, e.organization && (t.params.organization = e.organization), console.log(e), e.status && (t.params.status = e.status), t.params.sort = "createdAt", console.log(t);
|
37
|
+
try {
|
38
|
+
const a = await n.get("/products/read", { params: t.params });
|
39
|
+
return e._id ? r.current = a.data[0] : r.all = a.data, Promise.resolve(a.data);
|
40
|
+
} catch (a) {
|
41
|
+
return s(a), Promise.reject(a);
|
42
|
+
}
|
43
|
+
},
|
44
|
+
async update(e, t) {
|
45
|
+
return await n.post("/products/" + e, t).then(
|
46
|
+
(a) => Promise.resolve(a.data),
|
47
|
+
(a) => (s(a), Promise.reject(a))
|
48
|
+
);
|
49
|
+
},
|
50
|
+
async deleteProduct(e) {
|
51
|
+
return await n.delete("/products/" + e).then(
|
52
|
+
(t) => Promise.resolve(t.data),
|
53
|
+
(t) => (s(t), Promise.reject(t))
|
54
|
+
);
|
55
|
+
},
|
56
|
+
async submitMood(e = null) {
|
57
|
+
return console.log(e), n.post("/product/recommended", { mood: e }).then(
|
58
|
+
(t) => (r.current = t.data.product, r.current.recommendation = t.data.recommendationText, Promise.resolve(t.data)),
|
59
|
+
(t) => (console.log(t), s(t), Promise.reject(t))
|
60
|
+
);
|
61
|
+
},
|
62
|
+
async fetchProducts() {
|
63
|
+
return await n.get("/products/read").then(
|
64
|
+
(e) => (r.all = e.data, Promise.resolve(e.data)),
|
65
|
+
(e) => (s(e), Promise.reject(e))
|
66
|
+
);
|
67
|
+
},
|
68
|
+
async fetchProductsPopular() {
|
69
|
+
return await n.get("/products/popular").then(
|
70
|
+
(e) => (r.popular = e.data, Promise.resolve(e.data)),
|
71
|
+
(e) => (s(e), Promise.reject(e))
|
72
|
+
);
|
73
|
+
},
|
74
|
+
async fetchProductsPublished() {
|
75
|
+
return await n.get("/products").then(
|
76
|
+
(e) => {
|
77
|
+
let t = e.data.filter(function(a, i) {
|
78
|
+
return a.status !== "unpublished";
|
79
|
+
});
|
80
|
+
return r.all = t, r.filtered = t.slice(), r.filteredPrice = r.filtered, r.filteredPrice.sort(function(a, i) {
|
81
|
+
return a[r.sort.current] > i[r.sort.current] ? r.sort.ascending ? 1 : -1 : a[r.sort.current] < i[r.sort.current] ? r.sort.ascending ? -1 : 1 : 0;
|
82
|
+
}), Promise.resolve(e.data);
|
83
|
+
},
|
84
|
+
(e) => (s(e), Promise.reject(e))
|
85
|
+
);
|
86
|
+
},
|
87
|
+
async fetchProduct(e) {
|
88
|
+
return await n.get("/products/" + e).then(
|
89
|
+
(t) => (t.localization || (t.localization = []), r.current = t.data, Promise.resolve(t.data)),
|
90
|
+
(t) => (s(t), Promise.reject(t))
|
91
|
+
);
|
92
|
+
},
|
93
|
+
async fetchProductPopular() {
|
94
|
+
return await n.get("/products").then(
|
95
|
+
(e) => (r.all = e.data.slice(1, 5), Promise.resolve(e.data.slice(1, 5))),
|
96
|
+
(e) => (s(e), Promise.reject(e))
|
97
|
+
);
|
98
|
+
}
|
99
|
+
};
|
100
|
+
function d(e, t) {
|
101
|
+
r[t] = e;
|
102
|
+
}
|
103
|
+
o(r, (e, t) => {
|
104
|
+
});
|
105
|
+
export {
|
106
|
+
g as a,
|
107
|
+
r as s
|
108
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../components/Tab/Tab.vue2.cjs"),c=require("../../../../components/Field/Field.vue2.cjs"),N=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),b=require("../../../../components/Button/Button.vue2.cjs"),p=require("vue-router"),E=require("vue-i18n"),a=require("../../store/auth.cjs"),i=require("../../../middlewares/client/inputs.validation.cjs");require("./SignIn.vue2.cjs");const m=require("./SignIn.vue3.cjs"),y={class:""},S={class:"mn-medium"},q=e.createElementVNode("br",null,null,-1),x={class:"t-semi"},P={class:"mn-big"},C={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},D={class:""},I={class:"mn-thin radius-small"},T={class:"mn-thin radius-small o-hidden"},U={class:"w-100 mn-big"},h={__name:"SignIn",setup(j){const{t:n}=E.useI18n({inheritLocale:!0,useScope:"local"}),d=e.ref(null),f=e.ref(null),u=e.ref(null);p.useRoute();const _=p.useRouter(),l=e.ref("phone");e.inject("APPLE_CLIENTID"),e.inject("APPLE_REDIRECT_URL");const v=r=>new Promise((s,o)=>{const t=document.createElement("script");t.type="text/javascript",t.src=r,t.onload=s,t.onerror=o,document.head.appendChild(t)});e.onMounted(async()=>{await v("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js")});async function w(){try{l.value==="phone"&&await i.validateInputs(d,i.validatePhone,a.state.user.phone,"Некорректный телефон"),l.value==="email"&&await i.validateInputs(u,i.validateEmail,a.state.user.email,"Некорректный email")}catch{throw new Error}a.state.user.phone=a.state.user.phone.number,await a.actions.login(a.state.user,l.value)}function V(){_.push({name:"User Profile",params:{_id:a.state.user._id},query:{afterAuth:"true"}})}return(r,s)=>{const o=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",y,[e.createElementVNode("h3",S,[e.createTextVNode(e.toDisplayString(e.unref(n)("title"))+" ",1),q,e.createElementVNode("span",x,e.toDisplayString(e.unref(n)("subtitle")),1)]),e.createElementVNode("p",P,[e.createVNode(o,{to:{name:"Sign Up"},class:"underline t-second"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("signup")),1)]),_:1})]),e.createElementVNode("div",C,[e.createVNode(g.default,{selected:l.value,"onUpdate:selected":s[0]||(s[0]=t=>l.value=t),tabs:[{name:e.unref(n)("phone"),value:"phone"},{name:e.unref(n)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",D,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",I,[e.createVNode(N.default,{modelValue:a.state.user.phone,"onUpdate:modelValue":s[1]||(s[1]=t=>a.state.user.phone=t),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:d.value,mode:"national",inputOptions:{placeholder:e.unref(n)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])],512),[[e.vShow,l.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",T,[e.createVNode(c.default,{field:a.state.user.email,"onUpdate:field":s[2]||(s[2]=t=>a.state.user.email=t),placeholder:e.unref(n)("emailPlaceholder"),validation:u.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,l.value==="email"]])]),_:1})]),e.createVNode(c.default,{field:a.state.user.password,"onUpdate:field":s[3]||(s[3]=t=>a.state.user.password=t),type:"password",validation:f.value,placeholder:e.unref(n)("passwordPlaceholder"),class:"bg-grey pd-medium radius-small mn-semi"},null,8,["field","validation","placeholder"]),e.createElementVNode("div",U,[e.createVNode(o,{to:"/auth/reset-password",class:"underline d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("forgotPassword")),1)]),_:1})]),e.createVNode(b.default,{submit:w,callback:V,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("signin")),1)]),_:1})])}}};typeof m.default=="function"&&m.default(h);exports.default=h;
|
@@ -1,50 +1,51 @@
|
|
1
|
-
import { ref as p, inject as
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import { useRoute as
|
7
|
-
import { useI18n as
|
8
|
-
import { state as t, actions as
|
9
|
-
import { validateInputs as
|
1
|
+
import { ref as p, inject as _, onMounted as k, resolveComponent as C, openBlock as x, createElementBlock as D, createElementVNode as i, createTextVNode as m, toDisplayString as r, unref as l, createVNode as s, withCtx as d, Transition as v, withDirectives as w, vShow as b } from "vue";
|
2
|
+
import L from "../../../../components/Tab/Tab.vue2.js";
|
3
|
+
import g from "../../../../components/Field/Field.vue2.js";
|
4
|
+
import R from "../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
|
+
import T from "../../../../components/Button/Button.vue2.js";
|
6
|
+
import { useRoute as j, useRouter as A } from "vue-router";
|
7
|
+
import { useI18n as N } from "vue-i18n";
|
8
|
+
import { state as t, actions as F } from "../../store/auth.js";
|
9
|
+
import { validateInputs as y, validatePhone as O, validateEmail as B } from "../../../middlewares/client/inputs.validation.js";
|
10
10
|
import "./SignIn.vue2.js";
|
11
|
-
|
11
|
+
import P from "./SignIn.vue3.js";
|
12
|
+
const $ = { class: "" }, q = { class: "mn-medium" }, M = /* @__PURE__ */ i("br", null, null, -1), z = { class: "t-semi" }, G = { class: "mn-big" }, H = { class: "mn-small p-small uppercase t-semi bg-grey radius-big o-hidden" }, J = { class: "" }, K = { class: "mn-thin radius-small" }, Q = { class: "mn-thin radius-small o-hidden" }, W = { class: "w-100 mn-big" }, X = {
|
12
13
|
__name: "SignIn",
|
13
|
-
setup(
|
14
|
-
const { t:
|
14
|
+
setup(Y) {
|
15
|
+
const { t: o } = N({
|
15
16
|
inheritLocale: !0,
|
16
17
|
useScope: "local"
|
17
|
-
}), h = p(null),
|
18
|
-
|
19
|
-
const
|
20
|
-
|
21
|
-
const
|
18
|
+
}), h = p(null), E = p(null), f = p(null);
|
19
|
+
j();
|
20
|
+
const S = A(), n = p("phone");
|
21
|
+
_("APPLE_CLIENTID"), _("APPLE_REDIRECT_URL");
|
22
|
+
const V = (c) => new Promise((a, u) => {
|
22
23
|
const e = document.createElement("script");
|
23
|
-
e.type = "text/javascript", e.src = c, e.onload =
|
24
|
+
e.type = "text/javascript", e.src = c, e.onload = a, e.onerror = u, document.head.appendChild(e);
|
24
25
|
});
|
25
|
-
|
26
|
-
await
|
26
|
+
k(async () => {
|
27
|
+
await V("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js");
|
27
28
|
});
|
28
|
-
async function
|
29
|
+
async function I() {
|
29
30
|
try {
|
30
|
-
n.value === "phone" && await
|
31
|
+
n.value === "phone" && await y(
|
31
32
|
h,
|
32
|
-
|
33
|
+
O,
|
33
34
|
t.user.phone,
|
34
35
|
"Некорректный телефон"
|
35
|
-
), n.value === "email" && await
|
36
|
-
|
37
|
-
|
36
|
+
), n.value === "email" && await y(
|
37
|
+
f,
|
38
|
+
B,
|
38
39
|
t.user.email,
|
39
40
|
"Некорректный email"
|
40
41
|
);
|
41
42
|
} catch {
|
42
43
|
throw new Error();
|
43
44
|
}
|
44
|
-
t.user.phone = t.user.phone.number, await
|
45
|
+
t.user.phone = t.user.phone.number, await F.login(t.user, n.value);
|
45
46
|
}
|
46
|
-
function
|
47
|
-
|
47
|
+
function U() {
|
48
|
+
S.push({
|
48
49
|
name: "User Profile",
|
49
50
|
params: {
|
50
51
|
_id: t.user._id
|
@@ -52,42 +53,42 @@ const B = { class: "" }, $ = { class: "mn-medium" }, q = /* @__PURE__ */ i("br",
|
|
52
53
|
query: { afterAuth: "true" }
|
53
54
|
});
|
54
55
|
}
|
55
|
-
return (c,
|
56
|
+
return (c, a) => {
|
56
57
|
const u = C("router-link");
|
57
|
-
return
|
58
|
-
i("h3",
|
59
|
-
m(r(o
|
60
|
-
|
61
|
-
i("span",
|
58
|
+
return x(), D("section", $, [
|
59
|
+
i("h3", q, [
|
60
|
+
m(r(l(o)("title")) + " ", 1),
|
61
|
+
M,
|
62
|
+
i("span", z, r(l(o)("subtitle")), 1)
|
62
63
|
]),
|
63
|
-
i("p",
|
64
|
+
i("p", G, [
|
64
65
|
s(u, {
|
65
66
|
to: { name: "Sign Up" },
|
66
67
|
class: "underline t-second"
|
67
68
|
}, {
|
68
69
|
default: d(() => [
|
69
|
-
m(r(o
|
70
|
+
m(r(l(o)("signup")), 1)
|
70
71
|
]),
|
71
72
|
_: 1
|
72
73
|
})
|
73
74
|
]),
|
74
|
-
i("div",
|
75
|
-
s(
|
75
|
+
i("div", H, [
|
76
|
+
s(L, {
|
76
77
|
selected: n.value,
|
77
|
-
"onUpdate:selected":
|
78
|
+
"onUpdate:selected": a[0] || (a[0] = (e) => n.value = e),
|
78
79
|
tabs: [
|
79
|
-
{ name: o
|
80
|
-
{ name: o
|
80
|
+
{ name: l(o)("phone"), value: "phone" },
|
81
|
+
{ name: l(o)("email"), value: "email" }
|
81
82
|
]
|
82
83
|
}, null, 8, ["selected", "tabs"])
|
83
84
|
]),
|
84
|
-
i("div",
|
85
|
+
i("div", J, [
|
85
86
|
s(v, { name: "slide-fade" }, {
|
86
87
|
default: d(() => [
|
87
|
-
w(i("div",
|
88
|
-
s(
|
88
|
+
w(i("div", K, [
|
89
|
+
s(R, {
|
89
90
|
modelValue: t.user.phone,
|
90
|
-
"onUpdate:modelValue":
|
91
|
+
"onUpdate:modelValue": a[1] || (a[1] = (e) => t.user.phone = e),
|
91
92
|
dropdownOptions: {
|
92
93
|
showDialCodeInSelection: !0,
|
93
94
|
showFlags: !0,
|
@@ -95,58 +96,58 @@ const B = { class: "" }, $ = { class: "mn-medium" }, q = /* @__PURE__ */ i("br",
|
|
95
96
|
},
|
96
97
|
validation: h.value,
|
97
98
|
mode: "national",
|
98
|
-
inputOptions: { placeholder: o
|
99
|
+
inputOptions: { placeholder: l(o)("phonePlaceholder") },
|
99
100
|
class: "bg-grey pd-small radius-small mn-thin"
|
100
101
|
}, null, 8, ["modelValue", "validation", "inputOptions"])
|
101
102
|
], 512), [
|
102
|
-
[
|
103
|
+
[b, n.value === "phone"]
|
103
104
|
])
|
104
105
|
]),
|
105
106
|
_: 1
|
106
107
|
}),
|
107
108
|
s(v, { name: "slide-fade" }, {
|
108
109
|
default: d(() => [
|
109
|
-
w(i("div",
|
110
|
-
s(
|
110
|
+
w(i("div", Q, [
|
111
|
+
s(g, {
|
111
112
|
field: t.user.email,
|
112
|
-
"onUpdate:field":
|
113
|
-
placeholder: o
|
114
|
-
validation:
|
113
|
+
"onUpdate:field": a[2] || (a[2] = (e) => t.user.email = e),
|
114
|
+
placeholder: l(o)("emailPlaceholder"),
|
115
|
+
validation: f.value,
|
115
116
|
class: "bg-grey pd-medium radius-small"
|
116
117
|
}, null, 8, ["field", "placeholder", "validation"])
|
117
118
|
], 512), [
|
118
|
-
[
|
119
|
+
[b, n.value === "email"]
|
119
120
|
])
|
120
121
|
]),
|
121
122
|
_: 1
|
122
123
|
})
|
123
124
|
]),
|
124
|
-
s(
|
125
|
+
s(g, {
|
125
126
|
field: t.user.password,
|
126
|
-
"onUpdate:field":
|
127
|
+
"onUpdate:field": a[3] || (a[3] = (e) => t.user.password = e),
|
127
128
|
type: "password",
|
128
|
-
validation:
|
129
|
-
placeholder: o
|
129
|
+
validation: E.value,
|
130
|
+
placeholder: l(o)("passwordPlaceholder"),
|
130
131
|
class: "bg-grey pd-medium radius-small mn-semi"
|
131
132
|
}, null, 8, ["field", "validation", "placeholder"]),
|
132
|
-
i("div",
|
133
|
+
i("div", W, [
|
133
134
|
s(u, {
|
134
135
|
to: "/auth/reset-password",
|
135
136
|
class: "underline d-block t-blue"
|
136
137
|
}, {
|
137
138
|
default: d(() => [
|
138
|
-
m(r(o
|
139
|
+
m(r(l(o)("forgotPassword")), 1)
|
139
140
|
]),
|
140
141
|
_: 1
|
141
142
|
})
|
142
143
|
]),
|
143
|
-
s(
|
144
|
-
submit:
|
145
|
-
callback:
|
144
|
+
s(T, {
|
145
|
+
submit: I,
|
146
|
+
callback: U,
|
146
147
|
class: "mn-thin"
|
147
148
|
}, {
|
148
149
|
default: d(() => [
|
149
|
-
m(r(o
|
150
|
+
m(r(l(o)("signin")), 1)
|
150
151
|
]),
|
151
152
|
_: 1
|
152
153
|
})
|
@@ -154,6 +155,7 @@ const B = { class: "" }, $ = { class: "mn-medium" }, q = /* @__PURE__ */ i("br",
|
|
154
155
|
};
|
155
156
|
}
|
156
157
|
};
|
158
|
+
typeof P == "function" && P(X);
|
157
159
|
export {
|
158
|
-
|
160
|
+
X as default
|
159
161
|
};
|