@ozdao/prometheus-framework 0.2.125 → 0.2.126
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main-Ba3zK8PO.js +92 -0
- package/dist/main-Btlny-89.mjs +14207 -0
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +58 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +1 -58
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +67 -68
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -103
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +103 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.js +1 -36
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +36 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/web-CvRd3N_J.mjs +54 -0
- package/dist/web-DEysqj0n.js +1 -0
- package/package.json +1 -1
- package/src/components/Feed/Feed.vue +5 -1
- package/src/modules/marketplace/components/pages/Catalog.vue +1 -1
@@ -1 +1 @@
|
|
1
|
-
"use strict";
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../FieldPhone/click-outside.cjs");require("./Dropdown.vue2.cjs");const u=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),d={key:0,class:"w-100 h-100 flex-center flex"},f={key:1},p={__name:"Dropdown",props:{label:{type:[String,Object],default:"Open"},align:{type:String,default:"left"}},setup(t){let n=c.default;const i=t,l=e.ref(!1),a=e.computed(()=>typeof i.label=="object");function s(){l.value=!1}return(r,o)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"dropdown pos-relative",onClick:o[0]||(o[0]=e.withModifiers(m=>l.value=!l.value,["stop"]))},[a.value?(e.openBlock(),e.createElementBlock("div",d,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.label.component),e.mergeProps(t.label.props,{class:t.label.class}),null,16,["class"]))])):(e.openBlock(),e.createElementBlock("div",f,e.toDisplayString(t.label),1)),e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{style:e.normalizeStyle({left:t.align==="left"?"0":"auto",right:t.align==="right"?"0":"auto"}),class:"dropdown-content radius-big"},[e.renderSlot(r.$slots,"default",{},void 0,!0)],4),[[e.vShow,l.value]])]),_:3})])),[[e.unref(n),s]])}},v=u.default(p,[["__scopeId","data-v-96fe1329"]]);exports.default=v;
|
@@ -1 +1,58 @@
|
|
1
|
-
|
1
|
+
import { ref as u, computed as f, withDirectives as a, openBlock as l, createElementBlock as o, withModifiers as m, createBlock as p, resolveDynamicComponent as v, mergeProps as b, toDisplayString as g, createVNode as k, Transition as w, withCtx as y, createElementVNode as h, normalizeStyle as O, renderSlot as S, vShow as x, unref as C } from "vue";
|
2
|
+
import D from "../FieldPhone/click-outside.js";
|
3
|
+
import "./Dropdown.vue2.js";
|
4
|
+
import B from "../../../../_virtual/_plugin-vue_export-helper.js";
|
5
|
+
const T = {
|
6
|
+
key: 0,
|
7
|
+
class: "w-100 h-100 flex-center flex"
|
8
|
+
}, j = { key: 1 }, E = {
|
9
|
+
__name: "Dropdown",
|
10
|
+
props: {
|
11
|
+
label: {
|
12
|
+
type: [String, Object],
|
13
|
+
default: "Open"
|
14
|
+
},
|
15
|
+
align: {
|
16
|
+
type: String,
|
17
|
+
default: "left"
|
18
|
+
}
|
19
|
+
},
|
20
|
+
setup(e) {
|
21
|
+
let i = D;
|
22
|
+
const s = e, t = u(!1), r = f(() => typeof s.label == "object");
|
23
|
+
function c() {
|
24
|
+
t.value = !1;
|
25
|
+
}
|
26
|
+
return (d, n) => a((l(), o("div", {
|
27
|
+
class: "dropdown pos-relative",
|
28
|
+
onClick: n[0] || (n[0] = m((N) => t.value = !t.value, ["stop"]))
|
29
|
+
}, [
|
30
|
+
r.value ? (l(), o("div", T, [
|
31
|
+
(l(), p(v(e.label.component), b(e.label.props, {
|
32
|
+
class: e.label.class
|
33
|
+
}), null, 16, ["class"]))
|
34
|
+
])) : (l(), o("div", j, g(e.label), 1)),
|
35
|
+
k(w, {
|
36
|
+
name: "TransitionTranslateY",
|
37
|
+
mode: "out-in"
|
38
|
+
}, {
|
39
|
+
default: y(() => [
|
40
|
+
a(h("div", {
|
41
|
+
style: O({ left: e.align === "left" ? "0" : "auto", right: e.align === "right" ? "0" : "auto" }),
|
42
|
+
class: "dropdown-content radius-big"
|
43
|
+
}, [
|
44
|
+
S(d.$slots, "default", {}, void 0, !0)
|
45
|
+
], 4), [
|
46
|
+
[x, t.value]
|
47
|
+
])
|
48
|
+
]),
|
49
|
+
_: 3
|
50
|
+
})
|
51
|
+
])), [
|
52
|
+
[C(i), c]
|
53
|
+
]);
|
54
|
+
}
|
55
|
+
}, L = /* @__PURE__ */ B(E, [["__scopeId", "data-v-96fe1329"]]);
|
56
|
+
export {
|
57
|
+
L as default
|
58
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";
|
1
|
+
"use strict";
|
@@ -1,58 +1 @@
|
|
1
|
-
|
2
|
-
import D from "../FieldPhone/click-outside.js";
|
3
|
-
import "./Dropdown.vue.js";
|
4
|
-
import B from "../../../../_virtual/_plugin-vue_export-helper.js";
|
5
|
-
const T = {
|
6
|
-
key: 0,
|
7
|
-
class: "w-100 h-100 flex-center flex"
|
8
|
-
}, j = { key: 1 }, E = {
|
9
|
-
__name: "Dropdown",
|
10
|
-
props: {
|
11
|
-
label: {
|
12
|
-
type: [String, Object],
|
13
|
-
default: "Open"
|
14
|
-
},
|
15
|
-
align: {
|
16
|
-
type: String,
|
17
|
-
default: "left"
|
18
|
-
}
|
19
|
-
},
|
20
|
-
setup(e) {
|
21
|
-
let i = D;
|
22
|
-
const s = e, t = u(!1), r = f(() => typeof s.label == "object");
|
23
|
-
function c() {
|
24
|
-
t.value = !1;
|
25
|
-
}
|
26
|
-
return (d, n) => a((l(), o("div", {
|
27
|
-
class: "dropdown pos-relative",
|
28
|
-
onClick: n[0] || (n[0] = m((N) => t.value = !t.value, ["stop"]))
|
29
|
-
}, [
|
30
|
-
r.value ? (l(), o("div", T, [
|
31
|
-
(l(), p(v(e.label.component), b(e.label.props, {
|
32
|
-
class: e.label.class
|
33
|
-
}), null, 16, ["class"]))
|
34
|
-
])) : (l(), o("div", j, g(e.label), 1)),
|
35
|
-
k(w, {
|
36
|
-
name: "TransitionTranslateY",
|
37
|
-
mode: "out-in"
|
38
|
-
}, {
|
39
|
-
default: y(() => [
|
40
|
-
a(h("div", {
|
41
|
-
style: O({ left: e.align === "left" ? "0" : "auto", right: e.align === "right" ? "0" : "auto" }),
|
42
|
-
class: "dropdown-content radius-big"
|
43
|
-
}, [
|
44
|
-
S(d.$slots, "default", {}, void 0, !0)
|
45
|
-
], 4), [
|
46
|
-
[x, t.value]
|
47
|
-
])
|
48
|
-
]),
|
49
|
-
_: 3
|
50
|
-
})
|
51
|
-
])), [
|
52
|
-
[C(i), c]
|
53
|
-
]);
|
54
|
-
}
|
55
|
-
}, L = /* @__PURE__ */ B(E, [["__scopeId", "data-v-96fe1329"]]);
|
56
|
-
export {
|
57
|
-
L as default
|
58
|
-
};
|
1
|
+
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("../../modules/icons/skeletons/SkeletonEvent.vue.cjs");require("../Loader/Loader.vue.cjs");const w=require("../EmptyState/EmptyState.vue.cjs"),y=require("../Dropdown/Dropdown.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("../../modules/icons/skeletons/SkeletonEvent.vue.cjs");require("../Loader/Loader.vue.cjs");const w=require("../EmptyState/EmptyState.vue.cjs"),y=require("../Dropdown/Dropdown.vue.cjs"),M=require("../DatePicker/Calendar.vue2.cjs"),S=require("../../modules/globals/components/blocks/BlockSearch.vue.cjs"),N=require("../../modules/globals/components/blocks/BlockSorting.vue.cjs"),q=require("../../modules/globals/components/elements/ButtonSort.vue.cjs"),x=require("../../modules/globals/components/elements/ButtonDate.vue.cjs");require("./Feed.vue2.cjs");const E={key:0,class:"flex-nowrap flex gap-thin mn-b-thin"},O={__name:"Feed",props:e.mergeModels({showLoadMore:{type:Boolean,default:!0},search:{type:[Boolean,Object],default:!1},states:{type:Object,default:()=>({empty:{title:String,description:String}})},store:{type:Object,default:()=>({read:Function,state:Object})},external:{type:Boolean,default:!1},options:{type:Object,default:()=>({category:null,limit:20,skip:0,owner:null,creator:null,user:null,status:null,period:null,contain:null})}},{search:{},searchModifiers:{},sort:{},sortModifiers:{},date:{},dateModifiers:{},items:{},itemsModifiers:{}}),emits:["update:search","update:sort","update:date","update:items"],setup(o){const m=e.useModel(o,"search"),l=e.useModel(o,"sort"),r=e.useModel(o,"date"),p=e.useModel(o,"items"),s=o,n=e.ref(p.value||[]),i=e.ref(!1);let f=e.ref(!0),k=e.ref(null),u=e.ref(s.options.skip?s.options.skip:0),c=e.ref(s.options.limit?s.options.limit:10),g=e.ref("");function B(t){g.value=t,u.value=0,c.value=10,d()}const b=async()=>{if(i.value){u.value+=c.value;const t=await s.store.read({skip:u.value,limit:c.value,search:g.value,dateStart:r.value?r.value.start:null,dateEnd:r.value?r.value.end:null,sortParam:l.value?l.value.param:null,sortOrder:l.value?l.value.order:null,...s.options});t.length===0||t.length<c.value?i.value=!1:i.value=!0,n.value=[...n.value,...t],p.value&&(p.value=n.value)}},d=async()=>{const t=await s.store.read({skip:u.value,limit:c.value,dateStart:r.value?r.value.start:null,dateEnd:r.value?r.value.end:null,sortParam:l.value?l.value.param:null,sortOrder:l.value?l.value.order:null,search:g.value,...s.options});t.length===0||t.length<c.value?i.value=!1:i.value=!0,n.value=t,p.value&&(p.value=n.value),f.value=!1};e.watch(()=>s.external,(t,a)=>{t!==a&&(u.value=0,d())},{deep:!0}),e.watch(()=>r.value,(t,a)=>{t!==a&&(u.value=0,d())},{deep:!0}),e.watch(()=>{var t;return(t=l.value)==null?void 0:t.order},(t,a)=>{t!==a&&(u.value=0,d())},{deep:!0}),e.watch(()=>{var t;return(t=l.value)==null?void 0:t.param},(t,a)=>{t!==a&&(u.value=0,d())},{deep:!0}),e.watch(()=>s.options,(t,a)=>{(t.organization!==a.organization||t.categories!==a.categories||t.prices!==a.prices||t.delivery!==a.delivery||t.search!==a.search||t.status!==a.status||t.hidden!==a.hidden||t.type!==a.type||t.tags!==a.tags)&&(u.value=0,d())},{deep:!0});let h=null;return e.onMounted(async()=>{await d(),typeof window<"u"&&!s.showLoadMore&&(h=new IntersectionObserver(t=>{t.some(a=>a.isIntersecting)&&b()}),h.observe(k.value))}),e.onUnmounted(()=>{h&&h.disconnect()}),(t,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[m.value||r.value||l.value?(e.openBlock(),e.createElementBlock("div",E,[m.value?(e.openBlock(),e.createBlock(S.default,{key:0,placeholder:m.value.placeholder||"Search...",class:e.normalizeClass(m.value.class||"bg-light"),onSearch:B},null,8,["placeholder","class"])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createBlock(y.default,{key:1,label:{component:x.default,props:{date:r.value}},class:e.normalizeClass([r.value.class||"bg-light","flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-big"]),align:m.value?"right":"left"},{default:e.withCtx(()=>[e.createVNode(M.default,{date:r.value,"onUpdate:date":a[0]||(a[0]=v=>r.value=v),locale:t.$i18n.locale,allowRange:!0,class:"radius-semi w-100 o-hidden bg-light"},null,8,["date","locale"])]),_:1},8,["label","class","align"])):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createBlock(y.default,{key:2,label:{component:q.default,props:{order:l.value.order},class:"w-1r"},class:e.normalizeClass([l.value.class||"bg-light","radius-extra aspect-1x1 h-100"]),align:m.value?"right":"left"},{default:e.withCtx(()=>[e.createVNode(N.default,{param:l.value.param,"onUpdate:param":a[1]||(a[1]=v=>l.value.param=v),order:l.value.order,"onUpdate:order":a[2]||(a[2]=v=>l.value.order=v),options:l.value.options,class:"h-100 pd-small radius-semi t-white bg-black"},null,8,["param","order","options"])]),_:1},8,["label","class","align"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:1,tag:"ul",name:"scaleTransition",class:e.normalizeClass(["o-hidden bg-light radius-big",t.$attrs.class])},{default:e.withCtx(()=>[e.unref(f)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(c),v=>(e.openBlock(),e.createBlock(C.default,{key:"skeleton-"+v}))),128)):e.createCommentVNode("",!0)]),_:1},8,["class"])):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"scaleTransition"},{default:e.withCtx(()=>[!e.unref(f)&&n.value.length<1?(e.openBlock(),e.createBlock(w.default,{key:0,title:o.states.empty.title,description:o.states.empty.description,action:o.states.empty.action,callback:o.states.empty.callback,class:"pd-medium mn-b-thin bg-light radius-big"},null,8,["title","description","action","callback"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"feed",class:e.normalizeClass(t.$attrs.class)},{default:e.withCtx(()=>[!e.unref(f)&&n.value.length>0?e.renderSlot(t.$slots,"default",{key:0,items:n.value}):e.createCommentVNode("",!0),o.showLoadMore&&i.value&&n.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:b,class:"col-w-100 w-100 bg-main button"}," Load More ")):e.createCommentVNode("",!0),e.createElementVNode("div",{key:"sentinel",ref_key:"sentinel",ref:k,class:"sentinel"},null,512)]),_:3},8,["class"])],64))}};exports.default=O;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { mergeModels as U, useModel as $, ref as
|
1
|
+
import { mergeModels as U, useModel as $, ref as p, watch as y, onMounted as z, onUnmounted as F, openBlock as i, createElementBlock as L, Fragment as C, createBlock as h, normalizeClass as k, createCommentVNode as o, withCtx as M, createVNode as O, unref as w, TransitionGroup as E, renderList as N, Transition as P, renderSlot as D, createElementVNode as G } from "vue";
|
2
2
|
import R from "../../modules/icons/skeletons/SkeletonEvent.vue.js";
|
3
3
|
import "../Loader/Loader.vue.js";
|
4
4
|
import q from "../EmptyState/EmptyState.vue.js";
|
5
|
-
import I from "../Dropdown/Dropdown.
|
5
|
+
import I from "../Dropdown/Dropdown.vue.js";
|
6
6
|
import A from "../DatePicker/Calendar.vue2.js";
|
7
7
|
import H from "../../modules/globals/components/blocks/BlockSearch.vue.js";
|
8
8
|
import J from "../../modules/globals/components/blocks/BlockSorting.vue.js";
|
@@ -69,85 +69,84 @@ const W = {
|
|
69
69
|
}),
|
70
70
|
emits: ["update:search", "update:sort", "update:date", "update:items"],
|
71
71
|
setup(r) {
|
72
|
-
const
|
73
|
-
let
|
72
|
+
const f = $(r, "search"), t = $(r, "sort"), l = $(r, "date"), g = $(r, "items"), s = r, u = p(g.value || []), d = p(!1);
|
73
|
+
let b = p(!0), B = p(null), n = p(s.options.skip ? s.options.skip : 0), c = p(s.options.limit ? s.options.limit : 10), x = p("");
|
74
74
|
function T(e) {
|
75
|
-
x.value = e,
|
75
|
+
x.value = e, n.value = 0, c.value = 10, v();
|
76
76
|
}
|
77
77
|
const j = async () => {
|
78
|
-
if (
|
79
|
-
|
78
|
+
if (d.value) {
|
79
|
+
n.value += c.value;
|
80
80
|
const e = await s.store.read({
|
81
|
-
skip:
|
82
|
-
limit:
|
81
|
+
skip: n.value,
|
82
|
+
limit: c.value,
|
83
83
|
search: x.value,
|
84
84
|
dateStart: l.value ? l.value.start : null,
|
85
85
|
dateEnd: l.value ? l.value.end : null,
|
86
|
-
sortParam:
|
87
|
-
sortOrder:
|
86
|
+
sortParam: t.value ? t.value.param : null,
|
87
|
+
sortOrder: t.value ? t.value.order : null,
|
88
88
|
...s.options
|
89
89
|
});
|
90
|
-
e.length === 0 || e.length <
|
90
|
+
e.length === 0 || e.length < c.value ? d.value = !1 : d.value = !0, u.value = [...u.value, ...e], g.value && (g.value = u.value);
|
91
91
|
}
|
92
|
-
},
|
93
|
-
console.log("Date is", l.value);
|
92
|
+
}, v = async () => {
|
94
93
|
const e = await s.store.read({
|
95
|
-
skip:
|
96
|
-
limit:
|
94
|
+
skip: n.value,
|
95
|
+
limit: c.value,
|
97
96
|
dateStart: l.value ? l.value.start : null,
|
98
97
|
dateEnd: l.value ? l.value.end : null,
|
99
|
-
sortParam:
|
100
|
-
sortOrder:
|
98
|
+
sortParam: t.value ? t.value.param : null,
|
99
|
+
sortOrder: t.value ? t.value.order : null,
|
101
100
|
search: x.value,
|
102
101
|
...s.options
|
103
102
|
});
|
104
|
-
e.length === 0 || e.length <
|
103
|
+
e.length === 0 || e.length < c.value ? d.value = !1 : d.value = !0, u.value = e, g.value && (g.value = u.value), b.value = !1;
|
105
104
|
};
|
106
|
-
|
107
|
-
e !==
|
108
|
-
}, { deep: !0 }),
|
109
|
-
e !==
|
110
|
-
}, { deep: !0 }),
|
105
|
+
y(() => s.external, (e, a) => {
|
106
|
+
e !== a && (n.value = 0, v());
|
107
|
+
}, { deep: !0 }), y(() => l.value, (e, a) => {
|
108
|
+
e !== a && (n.value = 0, v());
|
109
|
+
}, { deep: !0 }), y(() => {
|
111
110
|
var e;
|
112
|
-
return (e =
|
113
|
-
}, (e,
|
114
|
-
e !==
|
115
|
-
}, { deep: !0 }),
|
111
|
+
return (e = t.value) == null ? void 0 : e.order;
|
112
|
+
}, (e, a) => {
|
113
|
+
e !== a && (n.value = 0, v());
|
114
|
+
}, { deep: !0 }), y(() => {
|
116
115
|
var e;
|
117
|
-
return (e =
|
118
|
-
}, (e,
|
119
|
-
e !==
|
120
|
-
}, { deep: !0 }),
|
121
|
-
(e.organization !==
|
116
|
+
return (e = t.value) == null ? void 0 : e.param;
|
117
|
+
}, (e, a) => {
|
118
|
+
e !== a && (n.value = 0, v());
|
119
|
+
}, { deep: !0 }), y(() => s.options, (e, a) => {
|
120
|
+
(e.organization !== a.organization || e.categories !== a.categories || e.prices !== a.prices || e.delivery !== a.delivery || e.search !== a.search || e.status !== a.status || e.hidden !== a.hidden || e.type !== a.type || e.tags !== a.tags) && (n.value = 0, v());
|
122
121
|
}, { deep: !0 });
|
123
122
|
let S = null;
|
124
123
|
return z(async () => {
|
125
|
-
await
|
126
|
-
e.some((
|
124
|
+
await v(), typeof window < "u" && !s.showLoadMore && (S = new IntersectionObserver((e) => {
|
125
|
+
e.some((a) => a.isIntersecting) && j();
|
127
126
|
}), S.observe(B.value));
|
128
127
|
}), F(() => {
|
129
128
|
S && S.disconnect();
|
130
|
-
}), (e,
|
131
|
-
|
132
|
-
|
129
|
+
}), (e, a) => (i(), L(C, null, [
|
130
|
+
f.value || l.value || t.value ? (i(), L("div", W, [
|
131
|
+
f.value ? (i(), h(H, {
|
133
132
|
key: 0,
|
134
|
-
placeholder:
|
135
|
-
class:
|
133
|
+
placeholder: f.value.placeholder || "Search...",
|
134
|
+
class: k(f.value.class || "bg-light"),
|
136
135
|
onSearch: T
|
137
136
|
}, null, 8, ["placeholder", "class"])) : o("", !0),
|
138
|
-
l.value ? (i(),
|
137
|
+
l.value ? (i(), h(I, {
|
139
138
|
key: 1,
|
140
139
|
label: {
|
141
140
|
component: Q,
|
142
141
|
props: { date: l.value }
|
143
142
|
},
|
144
|
-
class:
|
145
|
-
align:
|
143
|
+
class: k([l.value.class || "bg-light", "flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-big"]),
|
144
|
+
align: f.value ? "right" : "left"
|
146
145
|
}, {
|
147
|
-
default:
|
146
|
+
default: M(() => [
|
148
147
|
O(A, {
|
149
148
|
date: l.value,
|
150
|
-
"onUpdate:date":
|
149
|
+
"onUpdate:date": a[0] || (a[0] = (m) => l.value = m),
|
151
150
|
locale: e.$i18n.locale,
|
152
151
|
allowRange: !0,
|
153
152
|
class: "radius-semi w-100 o-hidden bg-light"
|
@@ -155,45 +154,45 @@ const W = {
|
|
155
154
|
]),
|
156
155
|
_: 1
|
157
156
|
}, 8, ["label", "class", "align"])) : o("", !0),
|
158
|
-
|
157
|
+
t.value ? (i(), h(I, {
|
159
158
|
key: 2,
|
160
159
|
label: {
|
161
160
|
component: K,
|
162
|
-
props: { order:
|
161
|
+
props: { order: t.value.order },
|
163
162
|
class: "w-1r"
|
164
163
|
},
|
165
|
-
class:
|
166
|
-
align:
|
164
|
+
class: k([t.value.class || "bg-light", "radius-extra aspect-1x1 h-100"]),
|
165
|
+
align: f.value ? "right" : "left"
|
167
166
|
}, {
|
168
|
-
default:
|
167
|
+
default: M(() => [
|
169
168
|
O(J, {
|
170
|
-
param:
|
171
|
-
"onUpdate:param":
|
172
|
-
order:
|
173
|
-
"onUpdate:order":
|
174
|
-
options:
|
169
|
+
param: t.value.param,
|
170
|
+
"onUpdate:param": a[1] || (a[1] = (m) => t.value.param = m),
|
171
|
+
order: t.value.order,
|
172
|
+
"onUpdate:order": a[2] || (a[2] = (m) => t.value.order = m),
|
173
|
+
options: t.value.options,
|
175
174
|
class: "h-100 pd-small radius-semi t-white bg-black"
|
176
175
|
}, null, 8, ["param", "order", "options"])
|
177
176
|
]),
|
178
177
|
_: 1
|
179
178
|
}, 8, ["label", "class", "align"])) : o("", !0)
|
180
179
|
])) : o("", !0),
|
181
|
-
|
180
|
+
w(b) ? (i(), h(E, {
|
182
181
|
key: 1,
|
183
182
|
tag: "ul",
|
184
183
|
name: "scaleTransition",
|
185
|
-
class:
|
184
|
+
class: k(["o-hidden bg-light radius-big", e.$attrs.class])
|
186
185
|
}, {
|
187
|
-
default:
|
188
|
-
|
189
|
-
key: "skeleton-" +
|
186
|
+
default: M(() => [
|
187
|
+
w(b) ? (i(!0), L(C, { key: 0 }, N(w(c), (m) => (i(), h(R, {
|
188
|
+
key: "skeleton-" + m
|
190
189
|
}))), 128)) : o("", !0)
|
191
190
|
]),
|
192
191
|
_: 1
|
193
192
|
}, 8, ["class"])) : o("", !0),
|
194
|
-
O(
|
195
|
-
default:
|
196
|
-
!
|
193
|
+
O(P, { name: "scaleTransition" }, {
|
194
|
+
default: M(() => [
|
195
|
+
!w(b) && u.value.length < 1 ? (i(), h(q, {
|
197
196
|
key: 0,
|
198
197
|
title: r.states.empty.title,
|
199
198
|
description: r.states.empty.description,
|
@@ -207,14 +206,14 @@ const W = {
|
|
207
206
|
O(E, {
|
208
207
|
tag: "ul",
|
209
208
|
name: "feed",
|
210
|
-
class:
|
209
|
+
class: k(e.$attrs.class)
|
211
210
|
}, {
|
212
|
-
default:
|
213
|
-
!
|
211
|
+
default: M(() => [
|
212
|
+
!w(b) && u.value.length > 0 ? D(e.$slots, "default", {
|
214
213
|
key: 0,
|
215
|
-
items:
|
214
|
+
items: u.value
|
216
215
|
}) : o("", !0),
|
217
|
-
r.showLoadMore &&
|
216
|
+
r.showLoadMore && d.value && u.value.length > 0 ? (i(), L("button", {
|
218
217
|
key: 1,
|
219
218
|
onClick: j,
|
220
219
|
class: "col-w-100 w-100 bg-main button"
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";
|
1
|
+
"use strict";
|
@@ -1,103 +1 @@
|
|
1
|
-
|
2
|
-
import D from "../FieldPhone/click-outside.js";
|
3
|
-
import "./Select.vue2.js";
|
4
|
-
import E from "../../../../_virtual/_plugin-vue_export-helper.js";
|
5
|
-
const L = {
|
6
|
-
key: 0,
|
7
|
-
class: "t-transp mn-r-small"
|
8
|
-
}, A = { class: "w-100" }, F = ["onClick"], I = {
|
9
|
-
key: 0,
|
10
|
-
class: "w-100"
|
11
|
-
}, P = {
|
12
|
-
key: 0,
|
13
|
-
class: "mn-t-thin invalid-feedback"
|
14
|
-
}, Y = {
|
15
|
-
__name: "Select",
|
16
|
-
props: {
|
17
|
-
label: String,
|
18
|
-
placeholder: { type: String, default: "Please select an item" },
|
19
|
-
select: [String, Object],
|
20
|
-
property: String,
|
21
|
-
options: { type: Array, default: () => [] },
|
22
|
-
validation: Boolean
|
23
|
-
},
|
24
|
-
emits: [
|
25
|
-
"update:select",
|
26
|
-
"focus",
|
27
|
-
"blur"
|
28
|
-
],
|
29
|
-
setup(o, { emit: C }) {
|
30
|
-
let O = D;
|
31
|
-
const p = C, e = o, c = y(!1), l = y(
|
32
|
-
e.property ? v(e.select, e.property, e.options) : e.select
|
33
|
-
), B = M(() => e.select ? e.options.filter((t) => t !== e.select) : e.options);
|
34
|
-
N(() => e.select, (t) => {
|
35
|
-
l.value = e.property ? v(e.select, e.property, e.options) : e.select;
|
36
|
-
});
|
37
|
-
const f = () => {
|
38
|
-
c.value = !c.value, p(c.value ? "focus" : "blur");
|
39
|
-
};
|
40
|
-
function V() {
|
41
|
-
c.value = !1;
|
42
|
-
}
|
43
|
-
const j = (t) => {
|
44
|
-
l.value = t, f(), e.property ? p("update:select", l.value[e.property]) : p("update:select", l.value);
|
45
|
-
};
|
46
|
-
function v(t, h, i) {
|
47
|
-
for (const a of i)
|
48
|
-
if (a[h] === t || a === t)
|
49
|
-
return a;
|
50
|
-
return null;
|
51
|
-
}
|
52
|
-
return (t, h) => {
|
53
|
-
var i, a;
|
54
|
-
return s(), n(b, null, [
|
55
|
-
k((s(), n("div", {
|
56
|
-
onClick: w(f, ["stop"]),
|
57
|
-
class: S([t.$attrs.class, "cursor-pointer flex-v-center flex-nowrap flex pos-relative"])
|
58
|
-
}, [
|
59
|
-
o.label ? (s(), n("div", L, [
|
60
|
-
u("span", null, d(o.label), 1)
|
61
|
-
])) : m("", !0),
|
62
|
-
u("li", A, [
|
63
|
-
u("span", null, d((i = l.value) != null && i.name ? (a = l.value) == null ? void 0 : a.name : l.value || o.placeholder), 1)
|
64
|
-
]),
|
65
|
-
_(g, {
|
66
|
-
mode: "out-in",
|
67
|
-
name: "TransitionTranslateY"
|
68
|
-
}, {
|
69
|
-
default: x(() => [
|
70
|
-
k(u("ul", {
|
71
|
-
class: S([t.$attrs.class, "bs-black pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"]),
|
72
|
-
style: { "min-width": "max-content" }
|
73
|
-
}, [
|
74
|
-
(s(!0), n(b, null, T(B.value, (r) => (s(), n("li", {
|
75
|
-
onClick: w((q) => j(r), ["stop"])
|
76
|
-
}, [
|
77
|
-
r ? (s(), n("span", I, d(r.name || r), 1)) : m("", !0)
|
78
|
-
], 8, F))), 256))
|
79
|
-
], 2), [
|
80
|
-
[$, c.value]
|
81
|
-
])
|
82
|
-
]),
|
83
|
-
_: 1
|
84
|
-
})
|
85
|
-
], 2)), [
|
86
|
-
[z(O), V]
|
87
|
-
]),
|
88
|
-
_(g, {
|
89
|
-
mode: "out-in",
|
90
|
-
name: "fade"
|
91
|
-
}, {
|
92
|
-
default: x(() => [
|
93
|
-
o.validation ? (s(), n("div", P, " * " + d(o.validation.message), 1)) : m("", !0)
|
94
|
-
]),
|
95
|
-
_: 1
|
96
|
-
})
|
97
|
-
], 64);
|
98
|
-
};
|
99
|
-
}
|
100
|
-
}, Q = /* @__PURE__ */ E(Y, [["__scopeId", "data-v-bf25c24d"]]);
|
101
|
-
export {
|
102
|
-
Q as default
|
103
|
-
};
|
1
|
+
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("../FieldPhone/click-outside.cjs");require("./Select.vue.cjs");const g=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),B={key:0,class:"t-transp mn-r-small"},b={class:"w-100"},w=["onClick"],S={key:0,class:"w-100"},_={key:0,class:"mn-t-thin invalid-feedback"},C={__name:"Select",props:{label:String,placeholder:{type:String,default:"Please select an item"},select:[String,Object],property:String,options:{type:Array,default:()=>[]},validation:Boolean},emits:["update:select","focus","blur"],setup(n,{emit:m}){let f=y.default;const i=m,t=n,a=e.ref(!1),o=e.ref(t.property?d(t.select,t.property,t.options):t.select),v=e.computed(()=>t.select?t.options.filter(l=>l!==t.select):t.options);e.watch(()=>t.select,l=>{o.value=t.property?d(t.select,t.property,t.options):t.select});const u=()=>{a.value=!a.value,i(a.value?"focus":"blur")};function k(){a.value=!1}const h=l=>{o.value=l,u(),t.property?i("update:select",o.value[t.property]):i("update:select",o.value)};function d(l,p,c){for(const s of c)if(s[p]===l||s===l)return s;return null}return(l,p)=>{var c,s;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives((e.openBlock(),e.createElementBlock("div",{onClick:e.withModifiers(u,["stop"]),class:e.normalizeClass([l.$attrs.class,"cursor-pointer flex-v-center flex-nowrap flex pos-relative"])},[n.label?(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("span",null,e.toDisplayString(n.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("li",b,[e.createElementVNode("span",null,e.toDisplayString((c=o.value)!=null&&c.name?(s=o.value)==null?void 0:s.name:o.value||n.placeholder),1)]),e.createVNode(e.Transition,{mode:"out-in",name:"TransitionTranslateY"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("ul",{class:e.normalizeClass([l.$attrs.class,"bs-black pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"]),style:{"min-width":"max-content"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,r=>(e.openBlock(),e.createElementBlock("li",{onClick:e.withModifiers(V=>h(r),["stop"])},[r?(e.openBlock(),e.createElementBlock("span",S,e.toDisplayString(r.name||r),1)):e.createCommentVNode("",!0)],8,w))),256))],2),[[e.vShow,a.value]])]),_:1})],2)),[[e.unref(f),k]]),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[n.validation?(e.openBlock(),e.createElementBlock("div",_," * "+e.toDisplayString(n.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64)}}},E=g.default(C,[["__scopeId","data-v-bf25c24d"]]);exports.default=E;
|
@@ -1 +1,103 @@
|
|
1
|
-
|
1
|
+
import { ref as y, computed as M, watch as N, openBlock as s, createElementBlock as n, Fragment as b, withDirectives as k, withModifiers as w, normalizeClass as S, createElementVNode as u, toDisplayString as d, createCommentVNode as m, createVNode as _, Transition as g, withCtx as x, renderList as T, vShow as $, unref as z } from "vue";
|
2
|
+
import D from "../FieldPhone/click-outside.js";
|
3
|
+
import "./Select.vue.js";
|
4
|
+
import E from "../../../../_virtual/_plugin-vue_export-helper.js";
|
5
|
+
const L = {
|
6
|
+
key: 0,
|
7
|
+
class: "t-transp mn-r-small"
|
8
|
+
}, A = { class: "w-100" }, F = ["onClick"], I = {
|
9
|
+
key: 0,
|
10
|
+
class: "w-100"
|
11
|
+
}, P = {
|
12
|
+
key: 0,
|
13
|
+
class: "mn-t-thin invalid-feedback"
|
14
|
+
}, Y = {
|
15
|
+
__name: "Select",
|
16
|
+
props: {
|
17
|
+
label: String,
|
18
|
+
placeholder: { type: String, default: "Please select an item" },
|
19
|
+
select: [String, Object],
|
20
|
+
property: String,
|
21
|
+
options: { type: Array, default: () => [] },
|
22
|
+
validation: Boolean
|
23
|
+
},
|
24
|
+
emits: [
|
25
|
+
"update:select",
|
26
|
+
"focus",
|
27
|
+
"blur"
|
28
|
+
],
|
29
|
+
setup(o, { emit: C }) {
|
30
|
+
let O = D;
|
31
|
+
const p = C, e = o, c = y(!1), l = y(
|
32
|
+
e.property ? v(e.select, e.property, e.options) : e.select
|
33
|
+
), B = M(() => e.select ? e.options.filter((t) => t !== e.select) : e.options);
|
34
|
+
N(() => e.select, (t) => {
|
35
|
+
l.value = e.property ? v(e.select, e.property, e.options) : e.select;
|
36
|
+
});
|
37
|
+
const f = () => {
|
38
|
+
c.value = !c.value, p(c.value ? "focus" : "blur");
|
39
|
+
};
|
40
|
+
function V() {
|
41
|
+
c.value = !1;
|
42
|
+
}
|
43
|
+
const j = (t) => {
|
44
|
+
l.value = t, f(), e.property ? p("update:select", l.value[e.property]) : p("update:select", l.value);
|
45
|
+
};
|
46
|
+
function v(t, h, i) {
|
47
|
+
for (const a of i)
|
48
|
+
if (a[h] === t || a === t)
|
49
|
+
return a;
|
50
|
+
return null;
|
51
|
+
}
|
52
|
+
return (t, h) => {
|
53
|
+
var i, a;
|
54
|
+
return s(), n(b, null, [
|
55
|
+
k((s(), n("div", {
|
56
|
+
onClick: w(f, ["stop"]),
|
57
|
+
class: S([t.$attrs.class, "cursor-pointer flex-v-center flex-nowrap flex pos-relative"])
|
58
|
+
}, [
|
59
|
+
o.label ? (s(), n("div", L, [
|
60
|
+
u("span", null, d(o.label), 1)
|
61
|
+
])) : m("", !0),
|
62
|
+
u("li", A, [
|
63
|
+
u("span", null, d((i = l.value) != null && i.name ? (a = l.value) == null ? void 0 : a.name : l.value || o.placeholder), 1)
|
64
|
+
]),
|
65
|
+
_(g, {
|
66
|
+
mode: "out-in",
|
67
|
+
name: "TransitionTranslateY"
|
68
|
+
}, {
|
69
|
+
default: x(() => [
|
70
|
+
k(u("ul", {
|
71
|
+
class: S([t.$attrs.class, "bs-black pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"]),
|
72
|
+
style: { "min-width": "max-content" }
|
73
|
+
}, [
|
74
|
+
(s(!0), n(b, null, T(B.value, (r) => (s(), n("li", {
|
75
|
+
onClick: w((q) => j(r), ["stop"])
|
76
|
+
}, [
|
77
|
+
r ? (s(), n("span", I, d(r.name || r), 1)) : m("", !0)
|
78
|
+
], 8, F))), 256))
|
79
|
+
], 2), [
|
80
|
+
[$, c.value]
|
81
|
+
])
|
82
|
+
]),
|
83
|
+
_: 1
|
84
|
+
})
|
85
|
+
], 2)), [
|
86
|
+
[z(O), V]
|
87
|
+
]),
|
88
|
+
_(g, {
|
89
|
+
mode: "out-in",
|
90
|
+
name: "fade"
|
91
|
+
}, {
|
92
|
+
default: x(() => [
|
93
|
+
o.validation ? (s(), n("div", P, " * " + d(o.validation.message), 1)) : m("", !0)
|
94
|
+
]),
|
95
|
+
_: 1
|
96
|
+
})
|
97
|
+
], 64);
|
98
|
+
};
|
99
|
+
}
|
100
|
+
}, Q = /* @__PURE__ */ E(Y, [["__scopeId", "data-v-bf25c24d"]]);
|
101
|
+
export {
|
102
|
+
Q as default
|
103
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";
|
1
|
+
"use strict";
|