@ozdao/prometheus-framework 0.2.103 → 0.2.104
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main-CXObXjv-.js +92 -0
- package/dist/main-DPsHxX0l.mjs +13633 -0
- package/dist/organizations.server.js +14 -3
- package/dist/organizations.server.mjs +14 -3
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +33 -33
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -73
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +73 -1
- 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/Tooltip/Tooltip.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +45 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +1 -45
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -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 +2 -2
- 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/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.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 +2 -2
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.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/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.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/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +1 -13
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +13 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.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 +2 -2
- 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/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +21 -21
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.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 +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.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/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.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 +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.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/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- 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 +3 -3
- 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-BNKN7kk3.mjs +54 -0
- package/dist/web-Douq6xn6.js +1 -0
- package/package.json +1 -1
- package/src/components/Feed/Feed.vue +2 -0
- package/src/modules/organizations/components/pages/Members.vue +1 -1
- package/src/modules/organizations/controllers/memberships.controller.js +22 -10
@@ -7,6 +7,7 @@ const require$$3 = require("uuidv4");
|
|
7
7
|
const require$$0 = require("mongoose");
|
8
8
|
const require$$5 = require("@googlemaps/google-maps-services-js");
|
9
9
|
const addMembersQuantity$1 = require("./addMembersQuantity-B8UgqlUM.js");
|
10
|
+
const queryProcessor = require("./queryProcessor-DRMo_GWK.js");
|
10
11
|
const mailing = require("./mailing-BX0q8DIs.js");
|
11
12
|
const index = require("./index-BCCiEK_u.js");
|
12
13
|
const require$$0$2 = require("mongodb");
|
@@ -453,6 +454,7 @@ const controllerFactory$5 = (db) => {
|
|
453
454
|
};
|
454
455
|
var organizations_controller = controllerFactory$5;
|
455
456
|
const ObjectId$1 = require$$0.Types.ObjectId;
|
457
|
+
const queryProcessorGlobals = queryProcessor.queryProcessor;
|
456
458
|
const controllerFactory$4 = (db) => {
|
457
459
|
const Membership = db.membership;
|
458
460
|
const read = async (req, res2) => {
|
@@ -463,9 +465,9 @@ const controllerFactory$4 = (db) => {
|
|
463
465
|
search = search.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
|
464
466
|
const parts = search.split(".");
|
465
467
|
if (parts.length === 2) {
|
466
|
-
regexPattern = parts.
|
468
|
+
regexPattern = parts.join("\\.");
|
467
469
|
} else {
|
468
|
-
regexPattern = search
|
470
|
+
regexPattern = search;
|
469
471
|
}
|
470
472
|
}
|
471
473
|
const memberships = await Membership.aggregate([
|
@@ -494,7 +496,16 @@ const controllerFactory$4 = (db) => {
|
|
494
496
|
},
|
495
497
|
{
|
496
498
|
$unwind: "$user"
|
497
|
-
}
|
499
|
+
},
|
500
|
+
// Pagination
|
501
|
+
...queryProcessorGlobals.getSortingOptions(
|
502
|
+
req.query.sortParam,
|
503
|
+
req.query.sortOrder
|
504
|
+
),
|
505
|
+
...queryProcessorGlobals.getPaginationOptions(
|
506
|
+
req.query.skip,
|
507
|
+
req.query.limit
|
508
|
+
)
|
498
509
|
]);
|
499
510
|
if (!memberships || memberships.length === 0) {
|
500
511
|
return res2.status(404).send({ errorCode: "MEMBERSHIPS_NOT_FOUND" });
|
@@ -6,6 +6,7 @@ import require$$3 from "uuidv4";
|
|
6
6
|
import require$$0 from "mongoose";
|
7
7
|
import require$$5 from "@googlemaps/google-maps-services-js";
|
8
8
|
import { a as addUserStatusFields_1, b as addMembersQuantity_1 } from "./addMembersQuantity-BXp_LeQd.mjs";
|
9
|
+
import { q as queryProcessor } from "./queryProcessor-BJdKh0Ow.mjs";
|
9
10
|
import { m as mailing } from "./mailing-Cdp8NXhP.mjs";
|
10
11
|
import { s as server } from "./index-B6a1mPgp.mjs";
|
11
12
|
import require$$0$2 from "mongodb";
|
@@ -452,6 +453,7 @@ const controllerFactory$5 = (db) => {
|
|
452
453
|
};
|
453
454
|
var organizations_controller = controllerFactory$5;
|
454
455
|
const ObjectId$1 = require$$0.Types.ObjectId;
|
456
|
+
const queryProcessorGlobals = queryProcessor;
|
455
457
|
const controllerFactory$4 = (db) => {
|
456
458
|
const Membership = db.membership;
|
457
459
|
const read = async (req, res2) => {
|
@@ -462,9 +464,9 @@ const controllerFactory$4 = (db) => {
|
|
462
464
|
search = search.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
|
463
465
|
const parts = search.split(".");
|
464
466
|
if (parts.length === 2) {
|
465
|
-
regexPattern = parts.
|
467
|
+
regexPattern = parts.join("\\.");
|
466
468
|
} else {
|
467
|
-
regexPattern = search
|
469
|
+
regexPattern = search;
|
468
470
|
}
|
469
471
|
}
|
470
472
|
const memberships = await Membership.aggregate([
|
@@ -493,7 +495,16 @@ const controllerFactory$4 = (db) => {
|
|
493
495
|
},
|
494
496
|
{
|
495
497
|
$unwind: "$user"
|
496
|
-
}
|
498
|
+
},
|
499
|
+
// Pagination
|
500
|
+
...queryProcessorGlobals.getSortingOptions(
|
501
|
+
req.query.sortParam,
|
502
|
+
req.query.sortOrder
|
503
|
+
),
|
504
|
+
...queryProcessorGlobals.getPaginationOptions(
|
505
|
+
req.query.skip,
|
506
|
+
req.query.limit
|
507
|
+
)
|
497
508
|
]);
|
498
509
|
if (!memberships || memberships.length === 0) {
|
499
510
|
return res2.status(404).send({ errorCode: "MEMBERSHIPS_NOT_FOUND" });
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("../Tooltip/Tooltip.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("../Tooltip/Tooltip.vue.cjs"),a={class:"bg-grey pd-medium radius-big"},c={key:0,class:"mn-b-small flex-v-center flex-nowrap flex"},s={key:0,class:"mn-r-thin t-medium p-big"},u=["onClick"],d=e.createElementVNode("p",{class:"bg-main radius-small t-center i-medium"},"i",-1),m={key:1,class:"w-100"},k={__name:"Block",props:{title:{type:String,default:null},tooltip:{type:String,default:null},actions:{type:Array,default:null},placeholder:{type:String,default:"Nothing here"},options:{type:Object,default:{theme:"white"}}},setup(t){e.useSlots();const r=(n,o={})=>n?n(o).some(l=>Array.isArray(l.children)?!!l.children.length:l.type!==e.Comment):!1;return(n,o)=>(e.openBlock(),e.createElementBlock("div",a,[t.title||t.actions?(e.openBlock(),e.createElementBlock("div",c,[t.title?(e.openBlock(),e.createElementBlock("p",s,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.actions,l=>(e.openBlock(),e.createElementBlock("button",{onClick:l.function,class:e.normalizeClass(["pd-thin button-delete button",l.class||"bg-main radius-small t-center i-medium"])},e.toDisplayString(l.label),11,u))),256)),t.tooltip?(e.openBlock(),e.createBlock(i.default,{key:1,text:t.tooltip},{default:e.withCtx(()=>[d]),_:1},8,["text"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),r(n.$slots.default)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",m,e.toDisplayString(t.placeholder),1)),e.renderSlot(n.$slots,"default")]))}};exports.default=k;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { useSlots as u, openBlock as l, createElementBlock as n, toDisplayString as o, createCommentVNode as r, Fragment as c, renderList as d, normalizeClass as m, createBlock as h, withCtx as f, renderSlot as y, createElementVNode as p, Comment as g } from "vue";
|
2
|
-
import b from "../Tooltip/Tooltip.
|
2
|
+
import b from "../Tooltip/Tooltip.vue.js";
|
3
3
|
const k = { class: "bg-grey pd-medium radius-big" }, C = {
|
4
4
|
key: 0,
|
5
5
|
class: "mn-b-small flex-v-center flex-nowrap flex"
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("../../modules/icons/skeletons/SkeletonEvent.vue.cjs");require("../Loader/Loader.vue.cjs");const y=require("../EmptyState/EmptyState.vue.cjs");require("vue-i18n");const g=require("../../modules/globals/components/blocks/BlockSearch.vue.cjs"),
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("../../modules/icons/skeletons/SkeletonEvent.vue.cjs");require("../Loader/Loader.vue.cjs");const y=require("../EmptyState/EmptyState.vue.cjs");require("vue-i18n");const g=require("../../modules/globals/components/blocks/BlockSearch.vue.cjs"),d=null,b={__name:"Feed",props:{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})}},setup(n){const l=n,s=e.ref([]),r=e.ref(!1);let i=e.ref(!0),m=e.ref(null),c=e.ref(l.options.skip?l.options.skip:0),o=e.ref(l.options.limit?l.options.limit:10),f=e.ref("");function h(t){f.value=t,c.value=0,o.value=10,u()}const p=async()=>{if(r.value){c.value+=o.value;const t=await l.store.read({skip:c.value,limit:o.value,search:f.value,...l.options});t.length===0||t.length<o.value?r.value=!1:r.value=!0,s.value=[...s.value,...t]}},u=async()=>{const t=await l.store.read({skip:c.value,limit:o.value,search:f.value,...l.options});t.length===0||t.length<o.value?r.value=!1:r.value=!0,s.value=t,i.value=!1};return e.watch(()=>l.external,t=>{}),e.watch(()=>l.external,(t,a)=>{t!==a&&u()},{deep:!0}),e.watch(()=>l.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)&&u()},{deep:!0}),e.onMounted(async()=>{await u(),typeof window<"u"&&!l.showLoadMore&&(d=new IntersectionObserver(t=>{t.some(a=>a.isIntersecting)&&p()}),d.observe(m.value))}),e.onUnmounted(()=>{d&&d.disconnect()}),(t,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.search?(e.openBlock(),e.createBlock(g.default,{key:0,placeholder:n.search.placeholder||"Search...",class:e.normalizeClass(n.search.class||"bg-grey mn-b-thin"),onSearch:h},null,8,["placeholder","class"])):e.createCommentVNode("",!0),e.unref(i)?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:1,tag:"ul",name:"scaleTransition",class:e.normalizeClass(["o-hidden bg-grey radius-big",t.$attrs.class])},{default:e.withCtx(()=>[e.unref(i)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(o),v=>(e.openBlock(),e.createBlock(k.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(i)&&s.value.length<1?(e.openBlock(),e.createBlock(y.default,{key:0,title:n.states.empty.title,description:n.states.empty.description,action:n.states.empty.action,callback:n.states.empty.callback,class:"pd-medium mn-b-thin bg-grey radius-big"},null,8,["title","description","action","callback"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"scaleTransition",class:e.normalizeClass(t.$attrs.class)},{default:e.withCtx(()=>[!e.unref(i)&&s.value.length>0?e.renderSlot(t.$slots,"default",{key:0,items:s.value}):e.createCommentVNode("",!0),n.showLoadMore&&r.value&&s.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:p,class:"col-w-100 w-100 bg-main button"}," Load More ")):e.createCommentVNode("",!0),e.createElementVNode("div",{key:"sentinel",ref_key:"sentinel",ref:m,class:"sentinel"},null,512)]),_:3},8,["class"])],64))}};exports.default=b;
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { ref as
|
1
|
+
import { ref as r, watch as y, onMounted as I, onUnmounted as T, openBlock as o, createElementBlock as g, Fragment as L, createBlock as p, normalizeClass as k, createCommentVNode as u, unref as d, TransitionGroup as M, withCtx as b, renderList as $, createVNode as B, Transition as C, renderSlot as x, createElementVNode as z } from "vue";
|
2
2
|
import E from "../../modules/icons/skeletons/SkeletonEvent.vue.js";
|
3
3
|
import "../Loader/Loader.vue.js";
|
4
4
|
import F from "../EmptyState/EmptyState.vue.js";
|
5
5
|
import "vue-i18n";
|
6
6
|
import N from "../../modules/globals/components/blocks/BlockSearch.vue.js";
|
7
|
-
const
|
7
|
+
const v = null, J = {
|
8
8
|
__name: "Feed",
|
9
9
|
props: {
|
10
10
|
showLoadMore: {
|
@@ -51,72 +51,72 @@ const p = null, J = {
|
|
51
51
|
}
|
52
52
|
},
|
53
53
|
setup(s) {
|
54
|
-
const a = s, n =
|
55
|
-
let
|
54
|
+
const a = s, n = r([]), l = r(!1);
|
55
|
+
let c = r(!0), S = r(null), m = r(a.options.skip ? a.options.skip : 0), i = r(a.options.limit ? a.options.limit : 10), h = r("");
|
56
56
|
function O(e) {
|
57
|
-
|
57
|
+
h.value = e, m.value = 0, i.value = 10, f();
|
58
58
|
}
|
59
59
|
const w = async () => {
|
60
60
|
if (l.value) {
|
61
|
-
|
61
|
+
m.value += i.value;
|
62
62
|
const e = await a.store.read({
|
63
|
-
skip:
|
64
|
-
limit:
|
65
|
-
search:
|
63
|
+
skip: m.value,
|
64
|
+
limit: i.value,
|
65
|
+
search: h.value,
|
66
66
|
...a.options
|
67
67
|
});
|
68
|
-
e.length === 0 || e.length <
|
68
|
+
e.length === 0 || e.length < i.value ? l.value = !1 : l.value = !0, n.value = [...n.value, ...e];
|
69
69
|
}
|
70
|
-
},
|
70
|
+
}, f = async () => {
|
71
71
|
const e = await a.store.read({
|
72
|
-
skip:
|
73
|
-
limit:
|
74
|
-
search:
|
72
|
+
skip: m.value,
|
73
|
+
limit: i.value,
|
74
|
+
search: h.value,
|
75
75
|
...a.options
|
76
76
|
});
|
77
|
-
e.length === 0 || e.length <
|
77
|
+
e.length === 0 || e.length < i.value ? l.value = !1 : l.value = !0, n.value = e, c.value = !1;
|
78
78
|
};
|
79
79
|
return y(() => a.external, (e) => {
|
80
80
|
}), y(() => a.external, (e, t) => {
|
81
|
-
e !== t &&
|
81
|
+
e !== t && f();
|
82
82
|
}, { deep: !0 }), y(() => a.options, (e, t) => {
|
83
|
-
(e.organization !== t.organization || e.categories !== t.categories || e.prices !== t.prices || e.delivery !== t.delivery || e.search !== t.search || e.status !== t.status || e.hidden !== t.hidden || e.type !== t.type) &&
|
83
|
+
(e.organization !== t.organization || e.categories !== t.categories || e.prices !== t.prices || e.delivery !== t.delivery || e.search !== t.search || e.status !== t.status || e.hidden !== t.hidden || e.type !== t.type) && f();
|
84
84
|
}, { deep: !0 }), I(async () => {
|
85
|
-
await
|
85
|
+
await f(), typeof window < "u" && !a.showLoadMore && (v = new IntersectionObserver((e) => {
|
86
86
|
e.some((t) => t.isIntersecting) && w();
|
87
|
-
}),
|
87
|
+
}), v.observe(S.value));
|
88
88
|
}), T(() => {
|
89
|
-
|
90
|
-
}), (e, t) => (
|
91
|
-
s.search ? (
|
89
|
+
v && v.disconnect();
|
90
|
+
}), (e, t) => (o(), g(L, null, [
|
91
|
+
s.search ? (o(), p(N, {
|
92
92
|
key: 0,
|
93
93
|
placeholder: s.search.placeholder || "Search...",
|
94
94
|
class: k(s.search.class || "bg-grey mn-b-thin"),
|
95
95
|
onSearch: O
|
96
|
-
}, null, 8, ["placeholder", "class"])) :
|
97
|
-
d(
|
96
|
+
}, null, 8, ["placeholder", "class"])) : u("", !0),
|
97
|
+
d(c) ? (o(), p(M, {
|
98
98
|
key: 1,
|
99
99
|
tag: "ul",
|
100
100
|
name: "scaleTransition",
|
101
101
|
class: k(["o-hidden bg-grey radius-big", e.$attrs.class])
|
102
102
|
}, {
|
103
103
|
default: b(() => [
|
104
|
-
d(
|
104
|
+
d(c) ? (o(!0), g(L, { key: 0 }, $(d(i), (j) => (o(), p(E, {
|
105
105
|
key: "skeleton-" + j
|
106
|
-
}))), 128)) :
|
106
|
+
}))), 128)) : u("", !0)
|
107
107
|
]),
|
108
108
|
_: 1
|
109
|
-
}, 8, ["class"])) :
|
109
|
+
}, 8, ["class"])) : u("", !0),
|
110
110
|
B(C, { name: "scaleTransition" }, {
|
111
111
|
default: b(() => [
|
112
|
-
!d(
|
112
|
+
!d(c) && n.value.length < 1 ? (o(), p(F, {
|
113
113
|
key: 0,
|
114
114
|
title: s.states.empty.title,
|
115
115
|
description: s.states.empty.description,
|
116
116
|
action: s.states.empty.action,
|
117
117
|
callback: s.states.empty.callback,
|
118
118
|
class: "pd-medium mn-b-thin bg-grey radius-big"
|
119
|
-
}, null, 8, ["title", "description", "action", "callback"])) :
|
119
|
+
}, null, 8, ["title", "description", "action", "callback"])) : u("", !0)
|
120
120
|
]),
|
121
121
|
_: 1
|
122
122
|
}),
|
@@ -126,15 +126,15 @@ const p = null, J = {
|
|
126
126
|
class: k(e.$attrs.class)
|
127
127
|
}, {
|
128
128
|
default: b(() => [
|
129
|
-
!d(
|
129
|
+
!d(c) && n.value.length > 0 ? x(e.$slots, "default", {
|
130
130
|
key: 0,
|
131
131
|
items: n.value
|
132
|
-
}) :
|
133
|
-
s.showLoadMore && l.value && n.value.length > 0 ? (
|
132
|
+
}) : u("", !0),
|
133
|
+
s.showLoadMore && l.value && n.value.length > 0 ? (o(), g("button", {
|
134
134
|
key: 1,
|
135
135
|
onClick: w,
|
136
136
|
class: "col-w-100 w-100 bg-main button"
|
137
|
-
}, " Load More ")) :
|
137
|
+
}, " Load More ")) : u("", !0),
|
138
138
|
z("div", {
|
139
139
|
key: "sentinel",
|
140
140
|
ref_key: "sentinel",
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";
|
1
|
+
"use strict";
|
@@ -1,73 +1 @@
|
|
1
|
-
|
2
|
-
import { useRoute as b, useRouter as x } from "vue-router";
|
3
|
-
import { useI18n as C } from "vue-i18n";
|
4
|
-
import O from "../../modules/icons/navigation/IconCross.vue.js";
|
5
|
-
import "./Popup.vue2.js";
|
6
|
-
const z = {
|
7
|
-
key: "popup-content",
|
8
|
-
class: "pd-small popup-wrapper"
|
9
|
-
}, B = { class: "mn-b-small" }, L = {
|
10
|
-
__name: "Popup",
|
11
|
-
props: {
|
12
|
-
isPopupOpen: {
|
13
|
-
type: Boolean,
|
14
|
-
default: !1
|
15
|
-
},
|
16
|
-
style: String,
|
17
|
-
title: String
|
18
|
-
},
|
19
|
-
emits: ["close-popup"],
|
20
|
-
setup(e, { emit: m }) {
|
21
|
-
const c = e, d = m;
|
22
|
-
function r() {
|
23
|
-
d("close-popup");
|
24
|
-
}
|
25
|
-
return v(() => c.isPopupOpen, (t) => {
|
26
|
-
t ? document.body.classList.add("no-scroll") : document.body.classList.remove("no-scroll");
|
27
|
-
}), b(), x(), C({
|
28
|
-
messages: {
|
29
|
-
en: {},
|
30
|
-
ru: {}
|
31
|
-
}
|
32
|
-
}), (t, o) => (s(), l(a, {
|
33
|
-
name: "TransitionTranslateY",
|
34
|
-
appear: ""
|
35
|
-
}, {
|
36
|
-
default: i(() => [
|
37
|
-
e.isPopupOpen ? (s(), l(y, {
|
38
|
-
key: 0,
|
39
|
-
to: "body"
|
40
|
-
}, [
|
41
|
-
e.isPopupOpen ? (s(), P("div", z, [
|
42
|
-
p(a, {
|
43
|
-
name: "TransitionTranslateY",
|
44
|
-
mode: "out-in"
|
45
|
-
}, {
|
46
|
-
default: i(() => [
|
47
|
-
n("section", k({ class: "pos-relative z-index-4" }, t.$attrs, {
|
48
|
-
class: t.$attrs.class
|
49
|
-
}), [
|
50
|
-
n("h4", B, g(e.title), 1),
|
51
|
-
p(O, {
|
52
|
-
onClick: o[0] || (o[0] = (f) => r()),
|
53
|
-
class: "cursor-pointer pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-regular z-index-5"
|
54
|
-
}),
|
55
|
-
T(t.$slots, "default")
|
56
|
-
], 16)
|
57
|
-
]),
|
58
|
-
_: 3
|
59
|
-
}),
|
60
|
-
n("div", {
|
61
|
-
onClick: o[1] || (o[1] = (f) => r()),
|
62
|
-
class: $([{ active: e.isPopupOpen === !0 }, "color-overlay z-index-3"])
|
63
|
-
}, null, 2)
|
64
|
-
])) : u("", !0)
|
65
|
-
])) : u("", !0)
|
66
|
-
]),
|
67
|
-
_: 3
|
68
|
-
}));
|
69
|
-
}
|
70
|
-
};
|
71
|
-
export {
|
72
|
-
L as default
|
73
|
-
};
|
1
|
+
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),p=require("vue-i18n"),d=require("../../modules/icons/navigation/IconCross.vue.cjs");require("./Popup.vue.cjs");const m={key:"popup-content",class:"pd-small popup-wrapper"},v={class:"mn-b-small"},f={__name:"Popup",props:{isPopupOpen:{type:Boolean,default:!1},style:String,title:String},emits:["close-popup"],setup(t,{emit:l}){const a=t,i=l;function n(){i("close-popup")}e.watch(()=>a.isPopupOpen,o=>{o?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll")}),r.useRoute(),r.useRouter();const u={messages:{en:{},ru:{}}};return p.useI18n(u),(o,s)=>(e.openBlock(),e.createBlock(e.Transition,{name:"TransitionTranslateY",appear:""},{default:e.withCtx(()=>[t.isPopupOpen?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[t.isPopupOpen?(e.openBlock(),e.createElementBlock("div",m,[e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[e.createElementVNode("section",e.mergeProps({class:"pos-relative z-index-4"},o.$attrs,{class:o.$attrs.class}),[e.createElementVNode("h4",v,e.toDisplayString(t.title),1),e.createVNode(d.default,{onClick:s[0]||(s[0]=c=>n()),class:"cursor-pointer pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-regular z-index-5"}),e.renderSlot(o.$slots,"default")],16)]),_:3}),e.createElementVNode("div",{onClick:s[1]||(s[1]=c=>n()),class:e.normalizeClass([{active:t.isPopupOpen===!0},"color-overlay z-index-3"])},null,2)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:3}))}};exports.default=f;
|
@@ -1 +1,73 @@
|
|
1
|
-
|
1
|
+
import { watch as v, openBlock as s, createBlock as l, Transition as a, withCtx as i, Teleport as y, createElementBlock as P, createVNode as p, createElementVNode as n, mergeProps as k, toDisplayString as g, renderSlot as T, normalizeClass as $, createCommentVNode as u } from "vue";
|
2
|
+
import { useRoute as b, useRouter as x } from "vue-router";
|
3
|
+
import { useI18n as C } from "vue-i18n";
|
4
|
+
import O from "../../modules/icons/navigation/IconCross.vue.js";
|
5
|
+
import "./Popup.vue.js";
|
6
|
+
const z = {
|
7
|
+
key: "popup-content",
|
8
|
+
class: "pd-small popup-wrapper"
|
9
|
+
}, B = { class: "mn-b-small" }, L = {
|
10
|
+
__name: "Popup",
|
11
|
+
props: {
|
12
|
+
isPopupOpen: {
|
13
|
+
type: Boolean,
|
14
|
+
default: !1
|
15
|
+
},
|
16
|
+
style: String,
|
17
|
+
title: String
|
18
|
+
},
|
19
|
+
emits: ["close-popup"],
|
20
|
+
setup(e, { emit: m }) {
|
21
|
+
const c = e, d = m;
|
22
|
+
function r() {
|
23
|
+
d("close-popup");
|
24
|
+
}
|
25
|
+
return v(() => c.isPopupOpen, (t) => {
|
26
|
+
t ? document.body.classList.add("no-scroll") : document.body.classList.remove("no-scroll");
|
27
|
+
}), b(), x(), C({
|
28
|
+
messages: {
|
29
|
+
en: {},
|
30
|
+
ru: {}
|
31
|
+
}
|
32
|
+
}), (t, o) => (s(), l(a, {
|
33
|
+
name: "TransitionTranslateY",
|
34
|
+
appear: ""
|
35
|
+
}, {
|
36
|
+
default: i(() => [
|
37
|
+
e.isPopupOpen ? (s(), l(y, {
|
38
|
+
key: 0,
|
39
|
+
to: "body"
|
40
|
+
}, [
|
41
|
+
e.isPopupOpen ? (s(), P("div", z, [
|
42
|
+
p(a, {
|
43
|
+
name: "TransitionTranslateY",
|
44
|
+
mode: "out-in"
|
45
|
+
}, {
|
46
|
+
default: i(() => [
|
47
|
+
n("section", k({ class: "pos-relative z-index-4" }, t.$attrs, {
|
48
|
+
class: t.$attrs.class
|
49
|
+
}), [
|
50
|
+
n("h4", B, g(e.title), 1),
|
51
|
+
p(O, {
|
52
|
+
onClick: o[0] || (o[0] = (f) => r()),
|
53
|
+
class: "cursor-pointer pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-regular z-index-5"
|
54
|
+
}),
|
55
|
+
T(t.$slots, "default")
|
56
|
+
], 16)
|
57
|
+
]),
|
58
|
+
_: 3
|
59
|
+
}),
|
60
|
+
n("div", {
|
61
|
+
onClick: o[1] || (o[1] = (f) => r()),
|
62
|
+
class: $([{ active: e.isPopupOpen === !0 }, "color-overlay z-index-3"])
|
63
|
+
}, null, 2)
|
64
|
+
])) : u("", !0)
|
65
|
+
])) : u("", !0)
|
66
|
+
]),
|
67
|
+
_: 3
|
68
|
+
}));
|
69
|
+
}
|
70
|
+
};
|
71
|
+
export {
|
72
|
+
L as default
|
73
|
+
};
|
@@ -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;
|