@ozdao/prometheus-framework 0.2.36 → 0.2.38

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. package/dist/main.css +1 -1
  2. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  3. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +42 -52
  4. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  5. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  6. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
  7. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +39 -242
  8. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +1 -0
  9. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +373 -0
  10. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue2.cjs +1 -0
  11. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue2.js +4 -0
  12. package/dist/prometheus-framework/src/components/FieldPhone/click-outside.cjs +1 -2
  13. package/dist/prometheus-framework/src/components/FieldPhone/click-outside.js +13 -13
  14. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  15. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +111 -2
  16. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  17. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +49 -47
  18. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  19. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +43 -42
  20. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +2 -2
  21. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +61 -56
  22. package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue.cjs +1 -1
  23. package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue.js +1 -1
  24. package/dist/prometheus-framework/src/modules/events/store/events.cjs +1 -1
  25. package/dist/prometheus-framework/src/modules/events/store/events.js +59 -39
  26. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +31 -31
  28. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +85 -55
  30. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  31. package/dist/prometheus-framework/src/modules/orders/store/orders.js +30 -38
  32. package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
  33. package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +31 -21
  34. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +95 -92
  36. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +54 -74
  38. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +58 -48
  40. package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/products/store/products.js +26 -26
  42. package/dist/prometheus-framework.cjs.js +18 -18
  43. package/dist/prometheus-framework.es.js +507 -493
  44. package/dist/style.css +1 -1
  45. package/package.json +1 -1
  46. package/src/modules/globals/store/globals.js +0 -1
@@ -1,11 +1,11 @@
1
- import { openBlock as e, createBlock as o, Transition as k, withCtx as l, createElementVNode as r, createVNode as m, createCommentVNode as n, createElementBlock as d, toDisplayString as g, unref as b } from "vue";
1
+ import { openBlock as e, createBlock as o, Transition as k, withCtx as u, createElementVNode as r, createVNode as c, createCommentVNode as n, createElementBlock as b, toDisplayString as f, unref as z } from "vue";
2
2
  import { useRoute as w } from "vue-router";
3
3
  import y from "../../../../components/Dropdown/Dropdown.vue.js";
4
4
  import x from "../../../../components/Text/Text.vue.js";
5
5
  import E from "../../../../components/Chips/Chips.vue.js";
6
6
  import O from "../../../icons/navigation/IconEdit.vue.js";
7
7
  import U from "../../../icons/placeholders/PlaceholderOrganizationPic.vue.js";
8
- import f from "../elements/ButtonToggleMembership.vue.js";
8
+ import h from "../elements/ButtonToggleMembership.vue.js";
9
9
  import $ from "../blocks/Socials.vue.js";
10
10
  import B from "../../../reports/components/sections/FormReport.vue.js";
11
11
  import { state as R } from "../../store/organizations.js";
@@ -20,99 +20,102 @@ const v = { class: "t-center flex-center flex-column flex pd-medium radius-big b
20
20
  user: Object
21
21
  },
22
22
  setup(t) {
23
- const u = w(), c = ({ membership: s, status: i, target: a }, z, h) => {
24
- S.handleMembershipUpdate(R.current, s, i, a, z, h);
23
+ const d = w(), g = ({ membership: s, status: i, target: l }, m, a) => {
24
+ S.handleMembershipUpdate(R.current, s, i, l, m, a);
25
25
  };
26
26
  return (s, i) => (e(), o(k, { name: "slide-fade" }, {
27
- default: l(() => [
28
- r("section", v, [
29
- t.user._id !== t.organization.owner ? (e(), o(y, {
30
- key: 0,
31
- label: "...",
32
- align: "right",
33
- class: "cursor-pointer pos-absolute pos-r-0 pos-t-0 pd-thin radius-extra"
34
- }, {
35
- default: l(() => [
36
- r("section", M, [
37
- m(B, {
38
- user: t.user._id,
39
- type: "organization",
40
- target: t.organization._id,
41
- text: "Report",
42
- class: "w-100"
43
- }, {
44
- default: l(() => [
45
- V
46
- ]),
47
- _: 1
48
- }, 8, ["user", "target"]),
49
- t.user._id && t.user._id !== t.organization.owner ? (e(), o(f, {
50
- key: 0,
51
- user: t.user._id,
52
- type: "organization",
53
- role: "blocked",
54
- target: t.organization._id,
55
- status: t.organization.isBlocked,
56
- text: { create: "Block", remove: "Unblock" },
57
- onUpdateMembership: i[0] || (i[0] = (a) => c(a, "isBlocked")),
58
- class: "t-white mn-t-thin bg-red"
59
- }, null, 8, ["user", "target", "status"])) : n("", !0)
60
- ])
61
- ]),
62
- _: 1
63
- }, 8, ["label"])) : n("", !0),
64
- t.user._id === t.organization.owner ? (e(), o(O, {
65
- key: 1,
66
- onClick: i[1] || (i[1] = (a) => s.$router.push({
67
- name: "Organization Edit",
68
- params: {
69
- _id: t.organization._id
70
- }
27
+ default: u(() => {
28
+ var l, m;
29
+ return [
30
+ r("section", v, [
31
+ t.user._id !== t.organization.owner ? (e(), o(y, {
32
+ key: 0,
33
+ label: "...",
34
+ align: "right",
35
+ class: "cursor-pointer pos-absolute pos-r-0 pos-t-0 pd-thin radius-extra"
36
+ }, {
37
+ default: u(() => [
38
+ r("section", M, [
39
+ c(B, {
40
+ user: t.user._id,
41
+ type: "organization",
42
+ target: t.organization._id,
43
+ text: "Report",
44
+ class: "w-100"
45
+ }, {
46
+ default: u(() => [
47
+ V
48
+ ]),
49
+ _: 1
50
+ }, 8, ["user", "target"]),
51
+ t.user._id && t.user._id !== t.organization.owner ? (e(), o(h, {
52
+ key: 0,
53
+ user: t.user._id,
54
+ type: "organization",
55
+ role: "blocked",
56
+ target: t.organization._id,
57
+ status: t.organization.isBlocked,
58
+ text: { create: "Block", remove: "Unblock" },
59
+ onUpdateMembership: i[0] || (i[0] = (a) => g(a, "isBlocked")),
60
+ class: "t-white mn-t-thin bg-red"
61
+ }, null, 8, ["user", "target", "status"])) : n("", !0)
62
+ ])
63
+ ]),
64
+ _: 1
65
+ }, 8, ["label"])) : n("", !0),
66
+ t.user._id === t.organization.owner ? (e(), o(O, {
67
+ key: 1,
68
+ onClick: i[1] || (i[1] = (a) => s.$router.push({
69
+ name: "Organization Edit",
70
+ params: {
71
+ _id: t.organization._id
72
+ }
73
+ })),
74
+ class: "pos-absolute cursor-pointer pos-t-big pos-r-big i-regular t-transp"
75
+ })) : n("", !0),
76
+ t.organization.profile.photo ? (e(), b("img", {
77
+ key: 2,
78
+ src: (s.FILE_SERVER_URL || "") + t.organization.profile.photo,
79
+ class: "radius-big bg-grey flex-center flex mn-b-small i-extra"
80
+ }, null, 8, j)) : (e(), o(U, {
81
+ key: 3,
82
+ class: "radius-medium mn-b-small i-extra"
71
83
  })),
72
- class: "pos-absolute cursor-pointer pos-t-big pos-r-big i-regular t-transp"
73
- })) : n("", !0),
74
- t.organization.profile.photo ? (e(), d("img", {
75
- key: 2,
76
- src: (s.FILE_SERVER_URL || "") + t.organization.profile.photo,
77
- class: "radius-big bg-grey flex-center flex mn-b-small i-extra"
78
- }, null, 8, j)) : (e(), o(U, {
79
- key: 3,
80
- class: "radius-medium mn-b-small i-extra"
81
- })),
82
- r("h1", C, g(t.organization.profile.name), 1),
83
- r("p", D, [
84
- m(x, {
85
- text: t.organization.profile.description ? t.organization.profile.description : "",
86
- maxLen: 240
87
- }, null, 8, ["text"])
88
- ]),
89
- t.organization.profile.tags.length > 0 ? (e(), o(E, {
90
- key: 4,
91
- chips: t.organization.profile.tags,
92
- class: "mn-b-semi"
93
- }, null, 8, ["chips"])) : n("", !0),
94
- r("p", F, " 👨‍👨‍👧‍👧 " + g(t.organization.numberOfSubscribers) + " followers ", 1),
95
- t.user._id && b(u).params._id && b(u).params._id !== t.user._id && t.organization.owner !== t.user._id ? (e(), o(f, {
96
- key: 5,
97
- user: t.user._id,
98
- type: "organization",
99
- role: "subscriber",
100
- target: t.organization._id,
101
- status: t.organization.isSubscriber,
102
- text: { create: "Follow", remove: "Unfollow" },
103
- onUpdateMembership: i[2] || (i[2] = (a) => c(a, "isSubscriber", "numberOfSubscribers")),
104
- class: "w-min mn-b-medium mn-r-auto mn-l-auto"
105
- }, null, 8, ["user", "target", "status"])) : n("", !0),
106
- Object.values(t.organization.socials).some((a) => a) ? (e(), d("h4", L, " Find us in socials ")) : n("", !0),
107
- m($, {
108
- telegram: t.organization.socials.telegram,
109
- facebook: t.organization.socials.facebook,
110
- instagram: t.organization.socials.instagram,
111
- twitter: t.organization.socials.twitter,
112
- youtube: t.organization.socials.youtube
113
- }, null, 8, ["telegram", "facebook", "instagram", "twitter", "youtube"])
114
- ])
115
- ]),
84
+ r("h1", C, f(t.organization.profile.name), 1),
85
+ r("p", D, [
86
+ c(x, {
87
+ text: t.organization.profile.description || "",
88
+ maxLen: 240
89
+ }, null, 8, ["text"])
90
+ ]),
91
+ ((m = (l = t.organization.profile) == null ? void 0 : l.tags) == null ? void 0 : m.length) > 0 ? (e(), o(E, {
92
+ key: 4,
93
+ chips: t.organization.profile.tags,
94
+ class: "mn-b-semi"
95
+ }, null, 8, ["chips"])) : n("", !0),
96
+ r("p", F, " 👨‍👨‍👧‍👧 " + f(t.organization.numberOfSubscribers) + " followers ", 1),
97
+ t.user._id && z(d).params._id && z(d).params._id !== t.user._id && t.organization.owner !== t.user._id ? (e(), o(h, {
98
+ key: 5,
99
+ user: t.user._id,
100
+ type: "organization",
101
+ role: "subscriber",
102
+ target: t.organization._id,
103
+ status: t.organization.isSubscriber,
104
+ text: { create: "Follow", remove: "Unfollow" },
105
+ onUpdateMembership: i[2] || (i[2] = (a) => g(a, "isSubscriber", "numberOfSubscribers")),
106
+ class: "w-min mn-b-medium mn-r-auto mn-l-auto"
107
+ }, null, 8, ["user", "target", "status"])) : n("", !0),
108
+ Object.values(t.organization.socials).some((a) => a) ? (e(), b("h4", L, " Find us in socials ")) : n("", !0),
109
+ c($, {
110
+ telegram: t.organization.socials.telegram,
111
+ facebook: t.organization.socials.facebook,
112
+ instagram: t.organization.socials.instagram,
113
+ twitter: t.organization.socials.twitter,
114
+ youtube: t.organization.socials.youtube
115
+ }, null, 8, ["telegram", "facebook", "instagram", "twitter", "youtube"])
116
+ ])
117
+ ];
118
+ }),
116
119
  _: 1
117
120
  }));
118
121
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Spoiler/Spoiler.vue2.cjs"),d=require("../../../../components/Checkbox/Checkbox.vue2.cjs"),w=require("vue-i18n"),y=require("vue-router"),m=require("../../store/categories.cjs"),a=require("../../../marketplace/store/marketplace.cjs");require("./FilterProducts.vue2.cjs");const x={class:"pd-medium bg-grey radius-big"},E={class:"cursor-pointer mn-r-auto t-medium p-big"},B=e.createElementVNode("hr",{class:"mn-b-small"},null,-1),q={class:"cursor-pointer mn-r-auto t-medium p-big"},F=e.createElementVNode("hr",{class:"mn-b-small"},null,-1),C=e.createElementVNode("p",{class:"cursor-pointer mn-r-auto t-medium p-big"},"Delivery",-1),V=e.createElementVNode("hr",{class:"mn-b-semi"},null,-1),N={__name:"FilterProducts",props:{selectedFilters:Object,prices:{type:Array,default:()=>[{label:"Under 300฿",value:"<300"},{label:"300฿ to 600฿",value:"300-600"},{label:"600฿ to 1200฿",value:"600-1200"},{label:"$1200 and above",value:">1200"}]},deliveryOptions:{type:Array,default:()=>[{label:"Pickup",value:{min:0,max:25}},{label:"Courier",value:{min:25,max:50}},{label:"Post",value:{min:50,max:100}}]}},emits:["updateFilters","resetFilters"],async setup(p,{emit:h}){let b,f;const n=y.useRoute(),v=y.useRouter();[b,f]=e.withAsyncContext(()=>m.actions.fetchCategories()),await b,f(),e.ref({categories:[],prices:[],delivery:[],extra:[]}),e.watch(()=>a.state.filter,(r,t)=>{const l={...n.query};Object.keys(t).forEach(s=>{l[s]&&delete l[s]});const i=Object.fromEntries(Object.entries(r).filter(([s,o])=>Array.isArray(o)&&o.length>0).map(([s,o])=>[s,o.join(",")]));Object.assign(l,i),v.push({query:l})},{deep:!0}),e.onMounted(async()=>{if(n.query){const r=n.query,t={categories:r.categories?r.categories.split(","):[],prices:r.prices?r.prices.split(","):[],delivery:r.delivery?r.delivery.split(","):[]};a.state.filter=t}});const k=h,_=()=>{k("resetFilters")},g={locale:"en",messages:{en:{categoriesTitle:"Category",categories:[],filters:{title:"Filters",price:{title:"Price",from:"From",to:"To"},filters:[],reset:"Reset Filters"}},ru:{categoriesTitle:"Категория",categories:[],filters:{title:"Фильтры",price:{title:"Цена",from:"От",to:"До"},filters:[],reset:"Сбросить фильтры"}}}};m.state.all.forEach(r=>{r.localization.forEach(t=>{g.messages[t.locale].categories.push(t.text)})});const{t:c}=w.useI18n(g);return(r,t)=>(e.openBlock(),e.createElementBlock("div",x,[e.createVNode(u.default,{class:"radius-small o-hidden br-1px br-solid br-grey mn-b-small",status:!0},{header:e.withCtx(()=>[e.createElementVNode("p",E,e.toDisplayString(e.unref(c)("categoriesTitle")),1)]),content:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.state.all,(l,i)=>(e.openBlock(),e.createBlock(d.default,{key:i,label:l.name,value:l.url,class:"w-100 mn-t-small mn-b-small bg-white radius-small pd-small",radio:a.state.filter.categories,"onUpdate:radio":t[0]||(t[0]=s=>a.state.filter.categories=s)},null,8,["label","value","radio"]))),128))]),_:1}),B,e.createVNode(u.default,{class:"radius-small o-hidden br-1px br-solid br-grey mn-b-small",status:!1},{header:e.withCtx(()=>[e.createElementVNode("p",q,e.toDisplayString(e.unref(c)("filters.price.title")),1)]),content:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.prices,(l,i)=>(e.openBlock(),e.createBlock(d.default,{key:i,label:l.label,value:l.value,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:a.state.filter.prices,"onUpdate:radio":t[1]||(t[1]=s=>a.state.filter.prices=s)},null,8,["label","value","radio"]))),128))]),_:1}),F,e.createVNode(u.default,{class:"radius-small o-hidden br-1px br-solid br-grey mn-b-small",status:!1},{header:e.withCtx(()=>[C]),content:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.deliveryOptions,(l,i)=>(e.openBlock(),e.createBlock(d.default,{key:i,label:l.label,value:l.value,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:a.state.filter.delivery,"onUpdate:radio":t[2]||(t[2]=s=>a.state.filter.delivery=s)},null,8,["label","value","radio"]))),128))]),_:1}),V,e.createElementVNode("button",{onClick:_,class:"bg-main w-100 button"},e.toDisplayString(e.unref(c)("filters.reset")),1)]))}};exports.default=N;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("../../../../components/Spoiler/Spoiler.vue2.cjs"),f=require("../../../../components/Checkbox/Checkbox.vue2.cjs"),x=require("vue-i18n"),g=require("vue-router"),u=require("../../store/categories.cjs"),a=require("../../../marketplace/store/marketplace.cjs");require("./FilterProducts.vue2.cjs");const w={class:"pd-medium bg-grey radius-big"},q={class:"cursor-pointer mn-r-auto t-medium p-big"},E=e.createElementVNode("hr",{class:"mn-b-small"},null,-1),F={class:"cursor-pointer mn-r-auto t-medium p-big"},B=e.createElementVNode("hr",{class:"mn-b-small"},null,-1),C={__name:"FilterProducts",props:{selectedFilters:Object,prices:{type:Array,default:()=>[{label:"Under 300฿",value:"<300"},{label:"300฿ to 600฿",value:"300-600"},{label:"600฿ to 1200฿",value:"600-1200"},{label:"$1200 and above",value:">1200"}]},deliveryOptions:{type:Array,default:()=>[{label:"Pickup",value:{min:0,max:25}},{label:"Courier",value:{min:25,max:50}},{label:"Post",value:{min:50,max:100}}]}},emits:["updateFilters","resetFilters"],async setup(y,{emit:h}){let d,m;const n=g.useRoute(),v=g.useRouter();[d,m]=e.withAsyncContext(()=>u.actions.fetchCategories()),await d,m(),e.ref({categories:[],prices:[],delivery:[],extra:[]}),e.watch(()=>a.state.filter,(t,r)=>{const l={...n.query};Object.keys(r).forEach(s=>{l[s]&&delete l[s]});const i=Object.fromEntries(Object.entries(t).filter(([s,o])=>Array.isArray(o)&&o.length>0).map(([s,o])=>[s,o.join(",")]));Object.assign(l,i),v.push({query:l})},{deep:!0}),e.onMounted(async()=>{if(n.query){const t=n.query,r={categories:t.categories?t.categories.split(","):[],prices:t.prices?t.prices.split(","):[],delivery:t.delivery?t.delivery.split(","):[]};a.state.filter=r}});const _=h,k=()=>{_("resetFilters")},p={locale:"en",messages:{en:{categoriesTitle:"Category",categories:[],filters:{title:"Filters",price:{title:"Price",from:"From",to:"To"},filters:[],reset:"Reset Filters"}},ru:{categoriesTitle:"Категория",categories:[],filters:{title:"Фильтры",price:{title:"Цена",from:"От",to:"До"},filters:[],reset:"Сбросить фильтры"}}}};u.state.all.forEach(t=>{t.localization.forEach(r=>{p.messages[r.locale].categories.push(r.text)})});const{t:c}=x.useI18n(p);return(t,r)=>(e.openBlock(),e.createElementBlock("div",w,[e.createVNode(b.default,{class:"radius-small o-hidden br-1px br-solid br-grey mn-b-small",status:!0},{header:e.withCtx(()=>[e.createElementVNode("p",q,e.toDisplayString(e.unref(c)("categoriesTitle")),1)]),content:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.state.all,(l,i)=>(e.openBlock(),e.createBlock(f.default,{key:i,label:l.name,value:l.url,class:"w-100 mn-t-small mn-b-small bg-white radius-small pd-small",radio:a.state.filter.categories,"onUpdate:radio":r[0]||(r[0]=s=>a.state.filter.categories=s)},null,8,["label","value","radio"]))),128))]),_:1}),E,e.createVNode(b.default,{class:"radius-small o-hidden br-1px br-solid br-grey mn-b-small",status:!1},{header:e.withCtx(()=>[e.createElementVNode("p",F,e.toDisplayString(e.unref(c)("filters.price.title")),1)]),content:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.prices,(l,i)=>(e.openBlock(),e.createBlock(f.default,{key:i,label:l.label,value:l.value,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:a.state.filter.prices,"onUpdate:radio":r[1]||(r[1]=s=>a.state.filter.prices=s)},null,8,["label","value","radio"]))),128))]),_:1}),B,e.createElementVNode("button",{onClick:k,class:"bg-main w-100 button"},e.toDisplayString(e.unref(c)("filters.reset")),1)]))}};exports.default=C;
@@ -1,12 +1,12 @@
1
- import { withAsyncContext as A, ref as P, watch as T, onMounted as U, openBlock as i, createElementBlock as c, createVNode as p, withCtx as n, createElementVNode as o, toDisplayString as b, unref as f, Fragment as g, renderList as y, createBlock as h } from "vue";
2
- import v from "../../../../components/Spoiler/Spoiler.vue2.js";
3
- import _ from "../../../../components/Checkbox/Checkbox.vue2.js";
4
- import { useI18n as V } from "vue-i18n";
5
- import { useRoute as B, useRouter as R } from "vue-router";
6
- import { actions as $, state as C } from "../../store/categories.js";
7
- import { state as s } from "../../../marketplace/store/marketplace.js";
1
+ import { withAsyncContext as A, ref as P, watch as T, onMounted as V, openBlock as a, createElementBlock as d, createVNode as h, withCtx as c, createElementVNode as o, toDisplayString as p, unref as b, Fragment as _, renderList as v, createBlock as x } from "vue";
2
+ import w from "../../../../components/Spoiler/Spoiler.vue2.js";
3
+ import F from "../../../../components/Checkbox/Checkbox.vue2.js";
4
+ import { useI18n as B } from "vue-i18n";
5
+ import { useRoute as R, useRouter as U } from "vue-router";
6
+ import { actions as $, state as k } from "../../store/categories.js";
7
+ import { state as l } from "../../../marketplace/store/marketplace.js";
8
8
  import "./FilterProducts.vue2.js";
9
- const D = { class: "pd-medium bg-grey radius-big" }, N = { class: "cursor-pointer mn-r-auto t-medium p-big" }, I = /* @__PURE__ */ o("hr", { class: "mn-b-small" }, null, -1), L = { class: "cursor-pointer mn-r-auto t-medium p-big" }, M = /* @__PURE__ */ o("hr", { class: "mn-b-small" }, null, -1), Q = /* @__PURE__ */ o("p", { class: "cursor-pointer mn-r-auto t-medium p-big" }, "Delivery", -1), S = /* @__PURE__ */ o("hr", { class: "mn-b-semi" }, null, -1), Z = {
9
+ const N = { class: "pd-medium bg-grey radius-big" }, D = { class: "cursor-pointer mn-r-auto t-medium p-big" }, I = /* @__PURE__ */ o("hr", { class: "mn-b-small" }, null, -1), L = { class: "cursor-pointer mn-r-auto t-medium p-big" }, M = /* @__PURE__ */ o("hr", { class: "mn-b-small" }, null, -1), X = {
10
10
  __name: "FilterProducts",
11
11
  props: {
12
12
  selectedFilters: Object,
@@ -29,37 +29,37 @@ const D = { class: "pd-medium bg-grey radius-big" }, N = { class: "cursor-pointe
29
29
  }
30
30
  },
31
31
  emits: ["updateFilters", "resetFilters"],
32
- async setup(x, { emit: j }) {
33
- let w, F;
34
- const m = B(), E = R();
35
- [w, F] = A(() => $.fetchCategories()), await w, F(), P({
32
+ async setup(C, { emit: j }) {
33
+ let f, g;
34
+ const u = R(), E = U();
35
+ [f, g] = A(() => $.fetchCategories()), await f, g(), P({
36
36
  categories: [],
37
37
  prices: [],
38
38
  delivery: [],
39
39
  extra: []
40
- }), T(() => s.filter, (r, e) => {
41
- const t = { ...m.query };
42
- Object.keys(e).forEach((l) => {
43
- t[l] && delete t[l];
40
+ }), T(() => l.filter, (e, t) => {
41
+ const r = { ...u.query };
42
+ Object.keys(t).forEach((s) => {
43
+ r[s] && delete r[s];
44
44
  });
45
- const a = Object.fromEntries(
46
- Object.entries(r).filter(([l, u]) => Array.isArray(u) && u.length > 0).map(([l, u]) => [l, u.join(",")])
45
+ const i = Object.fromEntries(
46
+ Object.entries(e).filter(([s, n]) => Array.isArray(n) && n.length > 0).map(([s, n]) => [s, n.join(",")])
47
47
  );
48
- Object.assign(t, a), E.push({ query: t });
49
- }, { deep: !0 }), U(async () => {
50
- if (m.query) {
51
- const r = m.query, e = {
52
- categories: r.categories ? r.categories.split(",") : [],
53
- prices: r.prices ? r.prices.split(",") : [],
54
- delivery: r.delivery ? r.delivery.split(",") : []
48
+ Object.assign(r, i), E.push({ query: r });
49
+ }, { deep: !0 }), V(async () => {
50
+ if (u.query) {
51
+ const e = u.query, t = {
52
+ categories: e.categories ? e.categories.split(",") : [],
53
+ prices: e.prices ? e.prices.split(",") : [],
54
+ delivery: e.delivery ? e.delivery.split(",") : []
55
55
  // Продолжайте этот паттерн для остальных полей фильтра
56
56
  };
57
- s.filter = e;
57
+ l.filter = t;
58
58
  }
59
59
  });
60
60
  const O = j, q = () => {
61
61
  O("resetFilters");
62
- }, k = {
62
+ }, y = {
63
63
  locale: "en",
64
64
  messages: {
65
65
  en: {
@@ -92,80 +92,60 @@ const D = { class: "pd-medium bg-grey radius-big" }, N = { class: "cursor-pointe
92
92
  }
93
93
  }
94
94
  };
95
- C.all.forEach((r) => {
96
- r.localization.forEach((e) => {
97
- k.messages[e.locale].categories.push(e.text);
95
+ k.all.forEach((e) => {
96
+ e.localization.forEach((t) => {
97
+ y.messages[t.locale].categories.push(t.text);
98
98
  });
99
99
  });
100
- const { t: d } = V(k);
101
- return (r, e) => (i(), c("div", D, [
102
- p(v, {
100
+ const { t: m } = B(y);
101
+ return (e, t) => (a(), d("div", N, [
102
+ h(w, {
103
103
  class: "radius-small o-hidden br-1px br-solid br-grey mn-b-small",
104
104
  status: !0
105
105
  }, {
106
- header: n(() => [
107
- o("p", N, b(f(d)("categoriesTitle")), 1)
106
+ header: c(() => [
107
+ o("p", D, p(b(m)("categoriesTitle")), 1)
108
108
  ]),
109
- content: n(() => [
110
- (i(!0), c(g, null, y(C.all, (t, a) => (i(), h(_, {
111
- key: a,
112
- label: t.name,
113
- value: t.url,
109
+ content: c(() => [
110
+ (a(!0), d(_, null, v(k.all, (r, i) => (a(), x(F, {
111
+ key: i,
112
+ label: r.name,
113
+ value: r.url,
114
114
  class: "w-100 mn-t-small mn-b-small bg-white radius-small pd-small",
115
- radio: s.filter.categories,
116
- "onUpdate:radio": e[0] || (e[0] = (l) => s.filter.categories = l)
115
+ radio: l.filter.categories,
116
+ "onUpdate:radio": t[0] || (t[0] = (s) => l.filter.categories = s)
117
117
  }, null, 8, ["label", "value", "radio"]))), 128))
118
118
  ]),
119
119
  _: 1
120
120
  }),
121
121
  I,
122
- p(v, {
122
+ h(w, {
123
123
  class: "radius-small o-hidden br-1px br-solid br-grey mn-b-small",
124
124
  status: !1
125
125
  }, {
126
- header: n(() => [
127
- o("p", L, b(f(d)("filters.price.title")), 1)
126
+ header: c(() => [
127
+ o("p", L, p(b(m)("filters.price.title")), 1)
128
128
  ]),
129
- content: n(() => [
130
- (i(!0), c(g, null, y(x.prices, (t, a) => (i(), h(_, {
131
- key: a,
132
- label: t.label,
133
- value: t.value,
129
+ content: c(() => [
130
+ (a(!0), d(_, null, v(C.prices, (r, i) => (a(), x(F, {
131
+ key: i,
132
+ label: r.label,
133
+ value: r.value,
134
134
  class: "w-100 mn-t-small bg-white radius-small pd-small",
135
- radio: s.filter.prices,
136
- "onUpdate:radio": e[1] || (e[1] = (l) => s.filter.prices = l)
135
+ radio: l.filter.prices,
136
+ "onUpdate:radio": t[1] || (t[1] = (s) => l.filter.prices = s)
137
137
  }, null, 8, ["label", "value", "radio"]))), 128))
138
138
  ]),
139
139
  _: 1
140
140
  }),
141
141
  M,
142
- p(v, {
143
- class: "radius-small o-hidden br-1px br-solid br-grey mn-b-small",
144
- status: !1
145
- }, {
146
- header: n(() => [
147
- Q
148
- ]),
149
- content: n(() => [
150
- (i(!0), c(g, null, y(x.deliveryOptions, (t, a) => (i(), h(_, {
151
- key: a,
152
- label: t.label,
153
- value: t.value,
154
- class: "w-100 mn-t-small bg-white radius-small pd-small",
155
- radio: s.filter.delivery,
156
- "onUpdate:radio": e[2] || (e[2] = (l) => s.filter.delivery = l)
157
- }, null, 8, ["label", "value", "radio"]))), 128))
158
- ]),
159
- _: 1
160
- }),
161
- S,
162
142
  o("button", {
163
143
  onClick: q,
164
144
  class: "bg-main w-100 button"
165
- }, b(f(d)("filters.reset")), 1)
145
+ }, p(b(m)("filters.reset")), 1)
166
146
  ]));
167
147
  }
168
148
  };
169
149
  export {
170
- Z as default
150
+ X as default
171
151
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../blocks/Images360.vue.cjs"),g=require("../blocks/ImagesThumbnails.vue.cjs"),h=require("../../../icons/navigation/IconEdit.vue.cjs");require("../elements/THC.vue2.cjs");const p=require("../elements/Price.vue.cjs"),k=require("../../../icons/placeholders/PlaceholderImage.vue.cjs"),f=require("vue-i18n"),c=require("../../../orders/store/shopcart.cjs"),y={class:"cols-2-1_2 w-100 gap-big"},b={class:"flex-nowrap flex-column flex pos-relative"},v={class:"h-100 h-max-50vh bg-grey radius-big o-hidden"},B=["src"],E={class:"pos-relative w-100 h-100 flex-column flex-justify flex col"},V={key:0,class:"t-main t-semi p-big"},N={class:"w-100 h1-product mn-b-thin"},w={key:1,class:"mn-b-semi"},C={key:2,class:"w-100 mn-b-medium t-transp"},S={key:3,class:"w-100 mn-b-medium t-transp"},q={class:"cols-2 w-100 gap-small mn-b-semi"},z={class:"w-100 pd-small radius-small bg-grey-transp-30 product-information"},I={class:"t-demi"},x={class:"max-w-33rem mobile-w-100 t-white gap-small cols-2"},D=["disabled"],P={__name:"SectionProduct",props:{product:{type:Object,required:!0},recommendation:{type:String}},setup(t){const s=t,n=e.computed(()=>s.product.images),l={messages:{en:{airecommend:"AI Recommends You",description:"",addtoorder:"Add to order",fastorder:"Fast Order"},ru:{airecommend:"AI Рекомендует вам",description:"",addtoorder:"Добавить в корзину",fastorder:"Быстрый заказ"}}},{t:i}=f.useI18n(l);function d(o){return!(o.quantity>0)}function m(o){c.state.organization!==o.organization&&(c.state.positions=[],c.state.organization=o.organization),c.actions.addProductToCart(o)}return(o,a)=>(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("div",b,[e.createElementVNode("div",v,[t.product&&t.product.image3d?(e.openBlock(),e.createBlock(u.default,{key:0,class:"h-100 w-100",imagePath:`/assets/images/products/${t.product.image3d}`,imageCount:36},null,8,["imagePath"])):e.createCommentVNode("",!0),n.value[0]&&!t.product.image3d?(e.openBlock(),e.createElementBlock("img",{key:1,class:"h-100 bg-grey w-100",style:{"object-fit":"contain"},src:(o.FILE_SERVER_URL||"")+n.value[0]},null,8,B)):e.createCommentVNode("",!0),!n.value[0]&&!t.product.image3d?(e.openBlock(),e.createBlock(k.default,{key:2,class:"h-100 w-100",style:{"object-fit":"cover"}})):e.createCommentVNode("",!0)]),n.value.length>1?(e.openBlock(),e.createBlock(g.default,{key:0,images:n.value,class:"mn-t-medium"},null,8,["images"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",E,[e.createVNode(h.default,{onClick:a[0]||(a[0]=r=>o.$router.push({name:"ProductEdit",params:{_id:t.product.organization,product:t.product._id}})),class:"pos-absolute pos-t-regular pos-r-regular i-regular t-transp"}),t.recommendation?(e.openBlock(),e.createElementBlock("h2",V,e.toDisplayString(e.unref(i)("airecommend")),1)):e.createCommentVNode("",!0),e.createElementVNode("h1",N,e.toDisplayString(t.product.name),1),e.createVNode(p.default,{product:t.product,size:"big",class:"mn-b-semi"},null,8,["product"]),t.recommendation?(e.openBlock(),e.createElementBlock("h3",w,e.toDisplayString(t.recommendation),1)):e.createCommentVNode("",!0),t.product.description&&!t.product.localization<1&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",C,e.toDisplayString(t.product.description),1)):e.createCommentVNode("",!0),t.product.localization&&t.product.localization.length>1&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",S,e.toDisplayString(e.unref(i)("description")),1)):e.createCommentVNode("",!0),e.createElementVNode("div",q,[t.product.information.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.product.information,r=>(e.openBlock(),e.createElementBlock("div",z,[e.createElementVNode("p",I,e.toDisplayString(r.name),1),e.createElementVNode("p",null,e.toDisplayString(r.value),1)]))),256)):e.createCommentVNode("",!0)]),e.createElementVNode("div",x,[e.createElementVNode("button",{disabled:d(t.product),onClick:a[1]||(a[1]=r=>m(t.product)),class:"w-100 mn-r-small bg-main button"},e.toDisplayString(e.unref(i)("addtoorder")),9,D)])])]))}};exports.default=P;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Button/Button.vue2.cjs"),g=require("../../../icons/navigation/IconEdit.vue.cjs"),h=require("../../../icons/placeholders/PlaceholderImage.vue.cjs"),p=require("../blocks/Images360.vue.cjs"),k=require("../blocks/ImagesThumbnails.vue.cjs");require("../elements/THC.vue2.cjs");const f=require("../elements/Price.vue.cjs"),b=require("vue-i18n"),n=require("../../../orders/store/shopcart.cjs"),y={class:"cols-2-1_2 w-100 gap-big"},v={class:"flex-nowrap flex-column flex pos-relative"},B={class:"h-100 h-max-50vh bg-grey radius-big o-hidden"},V=["src"],E={class:"pos-relative w-100 h-100 flex-column flex-justify flex col"},N={key:0,class:"t-main t-semi p-big"},w={class:"w-100 h1-product mn-b-thin"},C={key:1,class:"mn-b-semi"},S={key:2,class:"w-100 mn-b-medium t-transp"},q={key:3,class:"w-100 mn-b-medium t-transp"},x={class:"cols-2 w-100 gap-small mn-b-semi"},z={class:"w-100 pd-small radius-small bg-grey-transp-30 product-information"},I={class:"t-demi"},D={class:"max-w-33rem mobile-w-100 t-white gap-small cols-2"},P={__name:"SectionProduct",props:{product:{type:Object,required:!0},recommendation:{type:String}},setup(t){const s=t,a=e.computed(()=>s.product.images),d={messages:{en:{airecommend:"AI Recommends You",description:"",addtoorder:"Add to order",fastorder:"Fast Order"},ru:{airecommend:"AI Рекомендует вам",description:"",addtoorder:"Добавить в корзину",fastorder:"Быстрый заказ"}}},{t:c}=b.useI18n(d);function l(o){return!(o.quantity>0)}function m(o){n.state.organization!==o.organization&&(n.state.positions=[],n.state.organization=o.organization),n.actions.addProductToCart(o,o.organization)}return(o,i)=>(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("div",v,[e.createElementVNode("div",B,[t.product&&t.product.image3d?(e.openBlock(),e.createBlock(p.default,{key:0,class:"h-100 w-100",imagePath:`/assets/images/products/${t.product.image3d}`,imageCount:36},null,8,["imagePath"])):e.createCommentVNode("",!0),a.value[0]&&!t.product.image3d?(e.openBlock(),e.createElementBlock("img",{key:1,class:"h-100 bg-grey w-100",style:{"object-fit":"contain"},src:(o.FILE_SERVER_URL||"")+a.value[0]},null,8,V)):e.createCommentVNode("",!0),!a.value[0]&&!t.product.image3d?(e.openBlock(),e.createBlock(h.default,{key:2,class:"h-100 w-100",style:{"object-fit":"cover"}})):e.createCommentVNode("",!0)]),a.value.length>1?(e.openBlock(),e.createBlock(k.default,{key:0,images:a.value,class:"mn-t-medium"},null,8,["images"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",E,[e.createVNode(g.default,{onClick:i[0]||(i[0]=r=>o.$router.push({name:"ProductEdit",params:{_id:t.product.organization,product:t.product._id}})),class:"pos-absolute pos-t-regular pos-r-regular i-regular t-transp"}),t.recommendation?(e.openBlock(),e.createElementBlock("h2",N,e.toDisplayString(e.unref(c)("airecommend")),1)):e.createCommentVNode("",!0),e.createElementVNode("h1",w,e.toDisplayString(t.product.name),1),e.createVNode(f.default,{product:t.product,size:"big",class:"mn-b-semi"},null,8,["product"]),t.recommendation?(e.openBlock(),e.createElementBlock("h3",C,e.toDisplayString(t.recommendation),1)):e.createCommentVNode("",!0),t.product.description&&!t.product.localization<1&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",S,e.toDisplayString(t.product.description),1)):e.createCommentVNode("",!0),t.product.localization&&t.product.localization.length>1&&!t.recommendation?(e.openBlock(),e.createElementBlock("p",q,e.toDisplayString(e.unref(c)("description")),1)):e.createCommentVNode("",!0),e.createElementVNode("div",x,[t.product.information.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.product.information,r=>(e.openBlock(),e.createElementBlock("div",z,[e.createElementVNode("p",I,e.toDisplayString(r.name),1),e.createElementVNode("p",null,e.toDisplayString(r.value),1)]))),256)):e.createCommentVNode("",!0)]),e.createElementVNode("div",D,[e.createVNode(u.default,{submit:r=>m(t.product),disabled:l(t.product),text:{success:" ✔ Added",error:"error"},class:"w-100 mn-r-small bg-main button"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("addtoorder")),1)]),_:1},8,["submit","disabled"])])])]))}};exports.default=P;