@ozdao/prometheus-framework 0.2.130 → 0.2.133
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +0 -1
- package/dist/auth.server.mjs +0 -1
- package/dist/community.server.js +172 -31
- package/dist/community.server.mjs +172 -31
- package/dist/events.server.js +1 -1
- package/dist/events.server.mjs +1 -1
- package/dist/files.server.js +38 -4
- package/dist/files.server.mjs +38 -4
- package/dist/gallery.server.js +1 -1
- package/dist/gallery.server.mjs +1 -1
- package/dist/main-CI9l9xMs.js +92 -0
- package/dist/main-DPg58GOU.mjs +14509 -0
- package/dist/main.css +1 -1
- package/dist/orders.server.js +1 -1
- package/dist/orders.server.mjs +1 -1
- package/dist/organizations.server.js +4 -3
- package/dist/organizations.server.mjs +4 -3
- package/dist/products.server.js +2 -1
- package/dist/products.server.mjs +2 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Address/Address.vue.js +89 -0
- package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.js +22 -23
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +13 -13
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +95 -0
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +12 -13
- package/dist/prometheus-framework/src/components/Chips/Chips.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/components/Chips/Chips.vue2.js +26 -0
- package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.js +32 -33
- package/dist/prometheus-framework/src/components/Draggable/Draggable.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Draggable/Draggable.vue.js +75 -0
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +14 -15
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +57 -0
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +93 -87
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +84 -0
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +32 -29
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +22 -23
- package/dist/prometheus-framework/src/components/FieldTags/FieldTags.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldTags/FieldTags.vue.js +39 -39
- package/dist/prometheus-framework/src/components/FieldTags/tag-input.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldTags/tag-input.vue2.js +5 -5
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +127 -0
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +46 -47
- package/dist/prometheus-framework/src/components/Menu/Menu.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Menu/Menu.vue.js +13 -0
- package/dist/prometheus-framework/src/components/PhotoViewer/PhotoViewer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/PhotoViewer/PhotoViewer.vue.js +22 -23
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +77 -0
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +103 -0
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +14 -15
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +9 -10
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +37 -34
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +30 -30
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +30 -30
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +18 -18
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +11 -11
- package/dist/prometheus-framework/src/modules/community/community.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/community.client.js +12 -14
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +54 -71
- package/dist/prometheus-framework/src/modules/community/components/blocks/FooterBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/FooterBlogpost.vue.js +57 -29
- 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 +86 -76
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.js +58 -28
- 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 +71 -80
- package/dist/prometheus-framework/src/modules/community/components/sections/Comment.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/community/components/sections/Comment.vue.js +104 -0
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +99 -54
- 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 +27 -28
- package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/store/blogposts.js +45 -34
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.js +31 -29
- package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +32 -27
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +67 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.js +16 -16
- 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 +119 -112
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +6 -6
- 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 +1 -1
- 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/pages/Gallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +22 -22
- 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 +27 -27
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockFilter.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockFilter.vue.js +33 -22
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.cjs +1 -1
- package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.js +3 -9
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +39 -38
- 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/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
- 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 +112 -85
- 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 +36 -35
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +8 -8
- 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/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.js +17 -17
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +18 -18
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +6 -6
- 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 +12 -12
- 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/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/pages/ProductRecommmendation.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +3 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.js +32 -37
- 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/spots/components/blocks/CardSpot.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +14 -14
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +29 -29
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +53 -35
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardBalanceReplenished.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardBalanceReplenished.vue.js +30 -0
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.js +42 -0
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CashDeposite.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CashDeposite.vue.js +26 -0
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.js +42 -0
- package/dist/prometheus-framework/src/modules/wallet/localization/Wallet.json.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/localization/Wallet.json.js +26 -0
- 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 +154 -77
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +14 -14
- package/dist/queryProcessor-DQSFR9YA.mjs +179 -0
- package/dist/queryProcessor-iewDZq_f.js +178 -0
- package/dist/style.css +1 -1
- package/dist/wallet.server.js +80 -27
- package/dist/wallet.server.mjs +80 -27
- package/dist/web-DZUec7pP.js +1 -0
- package/dist/web-krQQeSb6.mjs +54 -0
- package/package.json +1 -1
- package/src/components/Address/Address.vue +1 -1
- package/src/components/Chips/Chips.vue +1 -1
- package/src/components/Completion/Completion.vue +1 -4
- package/src/components/DatePicker/Calendar.vue +1 -1
- package/src/components/Draggable/Draggable.vue +113 -0
- package/src/components/Dropdown/Dropdown.vue +1 -1
- package/src/components/Feed/Feed.vue +18 -12
- package/src/components/FieldBig/FieldBig.vue +11 -1
- package/src/components/FieldPhone/FieldPhone.vue +1 -1
- package/src/components/FieldTags/FieldTags.vue +2 -1
- package/src/components/FieldTags/tag-input.vue +1 -1
- package/src/components/LocationMarker/LocationMarker.vue +1 -1
- package/src/components/PhotoViewer/PhotoViewer.vue +1 -1
- package/src/components/Shader/Shader.vue +2 -2
- package/src/components/Slider/Slider.vue +1 -5
- package/src/components/Spoiler/Spoiler.vue +1 -1
- package/src/components/Text/Text.vue +1 -4
- package/src/components/Tooltip/Tooltip.vue +1 -1
- package/src/components/Upload/Upload.vue +5 -3
- package/src/modules/auth/controllers/auth.controller.js +0 -2
- package/src/modules/auth/store/auth.js +2 -2
- package/src/modules/community/DOCUMENTATION.MD +4 -0
- package/src/modules/community/community.client.js +0 -2
- package/src/modules/community/components/blocks/CardBlogpost.vue +6 -2
- package/src/modules/community/components/blocks/FooterBlogpost.vue +21 -5
- package/src/modules/community/components/layouts/Community.vue +15 -11
- package/src/modules/community/components/pages/Blog.vue +25 -32
- package/src/modules/community/components/pages/CreateBlogPost.vue +8 -15
- package/src/modules/community/components/sections/Comment.vue +123 -0
- package/src/modules/community/components/sections/Comments.vue +90 -19
- package/src/modules/community/components/sections/HotPosts.vue +3 -6
- package/src/modules/community/controllers/blog.controller.js +1 -1
- package/src/modules/community/controllers/comments.controller.aggr.js +280 -0
- package/src/modules/community/controllers/comments.controller.js +187 -38
- package/src/modules/community/controllers/comments.controller.populate.js +180 -0
- package/src/modules/community/models/comment.model.js +15 -0
- package/src/modules/community/store/blogposts.js +20 -2
- package/src/modules/constructor/components/elements/Audio.vue +28 -40
- package/src/modules/constructor/components/elements/ImageUpload.vue +12 -7
- package/src/modules/constructor/components/elements/Video.vue +10 -18
- package/src/modules/constructor/components/sections/Constructor.vue +54 -47
- package/src/modules/files/controllers/files.controller.js +2 -0
- package/src/modules/files/middlewares/server/middlewareBusboy.js +32 -4
- package/src/modules/files/routes/files.routes.js +8 -0
- package/src/modules/globals/components/blocks/BlockFilter.vue +17 -7
- package/src/modules/globals/components/partials/Header.vue +12 -7
- package/src/modules/globals/controllers/utils/queryProcessor.js +1 -0
- package/src/modules/icons/logos/Logotype.vue +8 -6
- package/src/modules/icons/logos/LogotypeNunito.vue +12 -0
- package/src/modules/marketplace/components/layouts/Marketplace.vue +29 -27
- package/src/modules/marketplace/store/marketplace.js +2 -8
- package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
- package/src/modules/organizations/components/pages/Members.vue +1 -1
- package/src/modules/organizations/components/pages/Organization.vue +33 -5
- package/src/modules/organizations/components/pages/OrganizationEdit.vue +7 -4
- package/src/modules/organizations/components/sections/DetailsTab.vue +10 -10
- package/src/modules/organizations/components/sections/Publics.vue +2 -2
- package/src/modules/organizations/controllers/memberships.controller.js +2 -3
- package/src/modules/organizations/controllers/organizations.controller.js +1 -1
- package/src/modules/organizations/store/memberships.js +4 -1
- package/src/modules/products/components/blocks/CardProduct.vue +1 -1
- package/src/modules/products/components/sections/HeroRecommendation.vue +11 -8
- package/src/modules/products/models/product.model.js +2 -1
- package/src/modules/spots/components/layouts/Spots.vue +0 -3
- package/src/modules/spots/components/pages/Map.vue +13 -3
- package/src/modules/users/components/blocks/CardUser.vue +2 -2
- package/src/modules/users/components/pages/ProfileBlogposts.vue +45 -28
- package/src/modules/wallet/components/blocks/CardBalanceReplenished.vue +40 -0
- package/src/modules/wallet/components/blocks/CardDeposite.vue +55 -0
- package/src/modules/wallet/components/blocks/CashDeposite.vue +28 -0
- package/src/modules/wallet/components/blocks/CryptoDeposite.vue +55 -0
- package/src/modules/wallet/controllers/factories/rewards.factory.aggr.js +181 -0
- package/src/modules/wallet/controllers/factories/rewards.factory.js +87 -113
- package/src/modules/wallet/controllers/factories/rewards.factory.population.js +213 -0
- package/src/modules/wallet/localization/Wallet.json +22 -0
- package/src/modules/wallet/views/components/pages/Wallet.vue +153 -53
- package/src/styles/base/all.scss +16 -26
- package/src/styles/config.scss +70 -34
- package/src/styles/typography.scss +5 -5
- package/src/modules/community/components/sections/Feed.vue +0 -148
- package/src/modules/middlewares/server/accessors/AccessController.js +0 -33
- package/src/modules/middlewares/server/accessors/ReadDepartments.js +0 -101
@@ -1,10 +1,9 @@
|
|
1
|
-
import { mergeModels as w, useModel as $, ref as
|
1
|
+
import { mergeModels as w, useModel as $, ref as T, computed as y, openBlock as g, createElementBlock as v, createElementVNode as r, createCommentVNode as j, withModifiers as h, toDisplayString as m, Fragment as _, renderList as M, normalizeClass as N } from "vue";
|
2
2
|
/* empty css */
|
3
|
-
|
4
|
-
const A = { class: "calendar" }, Z = {
|
3
|
+
const z = { class: "calendar" }, A = {
|
5
4
|
key: 0,
|
6
5
|
class: "br-b br-solid br-grey-transp-25 gap-thin flex flex-nowrap pd-thin"
|
7
|
-
},
|
6
|
+
}, Z = { class: "pd-thin flex flex-nowrap flex-v-center flex-justify-between" }, q = { class: "t-semi" }, G = { class: "pd-thin calendar__body" }, J = { class: "calendar__week" }, K = { class: "gap-micro calendar__dates" }, P = ["onClick"], ae = {
|
8
7
|
__name: "Calendar",
|
9
8
|
props: /* @__PURE__ */ w({
|
10
9
|
modelValue: [Date, Object],
|
@@ -14,11 +13,11 @@ const A = { class: "calendar" }, Z = {
|
|
14
13
|
dateModifiers: {}
|
15
14
|
}),
|
16
15
|
emits: /* @__PURE__ */ w(["update:modelValue"], ["update:date"]),
|
17
|
-
setup(
|
18
|
-
const
|
16
|
+
setup(C, { emit: Q }) {
|
17
|
+
const p = C, c = $(C, "date"), o = T(/* @__PURE__ */ new Date()), D = T(null), n = T(null), s = T(null), b = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], k = (e) => new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate())), i = (e) => new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), 23, 59, 59)), S = y(() => {
|
19
18
|
const e = o.value.toLocaleString("default", { month: "long", timeZone: "UTC" }), t = o.value.getUTCFullYear();
|
20
19
|
return `${e} ${t}`;
|
21
|
-
}),
|
20
|
+
}), F = y(() => {
|
22
21
|
const e = [], t = new Date(Date.UTC(
|
23
22
|
o.value.getUTCFullYear(),
|
24
23
|
o.value.getUTCMonth(),
|
@@ -30,7 +29,7 @@ const A = { class: "calendar" }, Z = {
|
|
30
29
|
)), u = t.getUTCDay();
|
31
30
|
let l = new Date(t);
|
32
31
|
l.setUTCDate(l.getUTCDate() - u);
|
33
|
-
for (let
|
32
|
+
for (let d = 0; d < u; d++)
|
34
33
|
e.push({
|
35
34
|
date: new Date(l),
|
36
35
|
day: l.getUTCDate(),
|
@@ -44,7 +43,7 @@ const A = { class: "calendar" }, Z = {
|
|
44
43
|
isToday: U(l)
|
45
44
|
}), f++;
|
46
45
|
const B = e[e.length - 1].date.getUTCDay();
|
47
|
-
for (let
|
46
|
+
for (let d = B + 1; d <= 6; d++)
|
48
47
|
e.push({
|
49
48
|
date: new Date(l),
|
50
49
|
day: l.getUTCDate(),
|
@@ -54,25 +53,25 @@ const A = { class: "calendar" }, Z = {
|
|
54
53
|
}), U = (e) => {
|
55
54
|
const t = /* @__PURE__ */ new Date();
|
56
55
|
return e.getUTCDate() === t.getUTCDate() && e.getUTCMonth() === t.getUTCMonth() && e.getUTCFullYear() === t.getUTCFullYear();
|
57
|
-
},
|
58
|
-
if (
|
56
|
+
}, Y = (e) => e.getUTCMonth() === o.value.getUTCMonth() && e.getUTCFullYear() === o.value.getUTCFullYear(), x = (e) => {
|
57
|
+
if (p.allowRange) {
|
59
58
|
if (n.value && s.value)
|
60
|
-
return e >= new Date(n.value) &&
|
59
|
+
return e >= new Date(n.value) && i(e) <= new Date(s.value);
|
61
60
|
if (n.value)
|
62
61
|
return e.getTime() === new Date(n.value).getTime();
|
63
62
|
} else
|
64
63
|
return D.value && e.getTime() === new Date(D.value).getTime();
|
65
|
-
}, O = (e) => n.value && s.value ? e > n.value &&
|
64
|
+
}, O = (e) => n.value && s.value ? e > n.value && i(e) < s.value : !1, I = (e) => {
|
66
65
|
const t = k(e);
|
67
|
-
if (!
|
66
|
+
if (!p.allowRange)
|
68
67
|
D.value = t, c.value = t;
|
69
68
|
else if (!n.value && !s.value)
|
70
69
|
n.value = t, c.value.start = t;
|
71
70
|
else if (s.value)
|
72
71
|
n.value = t, s.value = null, c.value = { start: t, end: null };
|
73
72
|
else {
|
74
|
-
if (s.value =
|
75
|
-
const a =
|
73
|
+
if (s.value = i(e), t < n.value) {
|
74
|
+
const a = i(n.value);
|
76
75
|
n.value = t, s.value = a;
|
77
76
|
}
|
78
77
|
c.value = { start: n.value, end: s.value };
|
@@ -94,19 +93,19 @@ const A = { class: "calendar" }, Z = {
|
|
94
93
|
n.value = t.toISOString(), s.value = a.toISOString(), c.value = { start: n.value, end: s.value };
|
95
94
|
}, E = () => {
|
96
95
|
const e = /* @__PURE__ */ new Date(), t = new Date(e);
|
97
|
-
t.setUTCDate(e.getUTCDate() - 7), t.setUTCHours(0, 0, 0, 0), n.value = t, s.value =
|
96
|
+
t.setUTCDate(e.getUTCDate() - 7), t.setUTCHours(0, 0, 0, 0), n.value = t, s.value = i(e), e.setUTCHours(23, 59, 59, 999);
|
98
97
|
const a = t.toISOString(), u = e.toISOString();
|
99
98
|
c.value = { start: a, end: u };
|
100
99
|
}, H = () => {
|
101
100
|
const e = /* @__PURE__ */ new Date(), t = new Date(e);
|
102
|
-
t.setUTCMonth(e.getUTCMonth() - 1), t.setUTCHours(0, 0, 0, 0), n.value = t, s.value =
|
101
|
+
t.setUTCMonth(e.getUTCMonth() - 1), t.setUTCHours(0, 0, 0, 0), n.value = t, s.value = i(e), e.setUTCHours(23, 59, 59, 999);
|
103
102
|
const a = t.toISOString(), u = e.toISOString();
|
104
103
|
c.value = { start: a, end: u };
|
105
104
|
}, V = () => {
|
106
105
|
n.value = null, s.value = null, c.value = { start: null, end: null };
|
107
106
|
};
|
108
|
-
return (e, t) => (g(), v("div",
|
109
|
-
|
107
|
+
return (e, t) => (g(), v("div", z, [
|
108
|
+
C.allowRange ? (g(), v("div", A, [
|
110
109
|
r("button", {
|
111
110
|
onClick: R,
|
112
111
|
class: "font-second t-nowrap pd-thin bg-main-transp-10 radius-small"
|
@@ -124,41 +123,41 @@ const A = { class: "calendar" }, Z = {
|
|
124
123
|
class: "font-second t-nowrap pd-thin bg-main-transp-10 radius-small"
|
125
124
|
}, "All time")
|
126
125
|
])) : j("", !0),
|
127
|
-
r("div",
|
126
|
+
r("div", Z, [
|
128
127
|
r("button", {
|
129
128
|
onClick: h(L, ["stop"]),
|
130
129
|
class: "aspect-ratio-1x1 w-10 pd-thin bg-main-transp-10 radius-small"
|
131
130
|
}, "<"),
|
132
|
-
r("span",
|
131
|
+
r("span", q, m(S.value), 1),
|
133
132
|
r("button", {
|
134
133
|
onClick: h(W, ["stop"]),
|
135
134
|
class: "aspect-ratio-1x1 w-10 pd-thin bg-main-transp-10 radius-small"
|
136
135
|
}, ">")
|
137
136
|
]),
|
138
|
-
r("div",
|
139
|
-
r("div",
|
140
|
-
(g(), v(
|
137
|
+
r("div", G, [
|
138
|
+
r("div", J, [
|
139
|
+
(g(), v(_, null, M(b, (a, u) => r("div", {
|
141
140
|
key: u,
|
142
141
|
class: "calendar__weekday"
|
143
|
-
},
|
142
|
+
}, m(a), 1)), 64))
|
144
143
|
]),
|
145
|
-
r("div",
|
146
|
-
(g(!0), v(
|
144
|
+
r("div", K, [
|
145
|
+
(g(!0), v(_, null, M(F.value, (a) => (g(), v("div", {
|
147
146
|
key: a.date,
|
148
147
|
class: N([
|
149
148
|
"flex flex-center cursor-pointer aspect-ratio-1x1 radius-small",
|
150
149
|
{ "bg-main t-white": a.isToday },
|
151
|
-
{ "calendar__date--selected":
|
150
|
+
{ "calendar__date--selected": x(a.date) },
|
152
151
|
{ "calendar__date--range": O(a.date) },
|
153
|
-
{ "calendar__date--disabled": !
|
152
|
+
{ "calendar__date--disabled": !Y(a.date) }
|
154
153
|
]),
|
155
154
|
onClick: h((u) => I(a.date), ["stop"])
|
156
|
-
},
|
155
|
+
}, m(a.day), 11, P))), 128))
|
157
156
|
])
|
158
157
|
])
|
159
158
|
]));
|
160
159
|
}
|
161
|
-
}
|
160
|
+
};
|
162
161
|
export {
|
163
|
-
|
162
|
+
ae as default
|
164
163
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("vue");;/* empty css */const L={__name:"Draggable",props:{list:{type:Array,required:!0},disabledClass:{type:String,default:"draggable-disabled"}},emits:["update:list","start","end"],setup(v,{emit:p}){const d=v,l=p,r=c.ref(null);let a=null;return c.onMounted(()=>{const o=e=>{const t=e.target.closest(".draggable-item");if(!t||t.classList.contains(d.disabledClass)){e.preventDefault();return}a=Number(t.dataset.index),e.dataTransfer.effectAllowed="move",l("start",a)},u=e=>{e.preventDefault()},f=e=>{e.preventDefault();const t=e.target.closest(".draggable-item");if(!t||t.classList.contains(d.disabledClass))return;const n=Number(t.dataset.index);if(a!==n&&!g(a,n)){const s=[...d.list],[i]=s.splice(a,1);s.splice(n,0,i),l("update:list",s)}l("end",a,n),a=null},m=e=>{const t=e.target.closest(".draggable-item");if(!t||t.classList.contains(d.disabledClass)){e.preventDefault();return}a=Number(t.dataset.index),l("start",a)},b=e=>{e.preventDefault()},h=e=>{const t=document.elementFromPoint(e.changedTouches[0].clientX,e.changedTouches[0].clientY).closest(".draggable-item");if(!t||t.classList.contains(d.disabledClass))return;const n=Number(t.dataset.index);if(a!==n&&!g(a,n)){const s=[...d.list],[i]=s.splice(a,1);s.splice(n,0,i),l("update:list",s)}l("end",a,n),a=null},g=(e,t)=>Array.from(r.value.children).map((s,i)=>s.classList.contains(d.disabledClass)?i:null).filter(s=>s!==null).includes(t);r.value.addEventListener("dragstart",o),r.value.addEventListener("dragover",u),r.value.addEventListener("drop",f),r.value.addEventListener("touchstart",m),r.value.addEventListener("touchmove",b),r.value.addEventListener("touchend",h)}),(o,u)=>(c.openBlock(),c.createElementBlock("div",{ref_key:"container",ref:r,class:"draggable-container"},[c.renderSlot(o.$slots,"default")],512))}};exports.default=L;
|
@@ -0,0 +1,75 @@
|
|
1
|
+
import { ref as h, onMounted as L, openBlock as E, createElementBlock as D, renderSlot as x } from "vue";
|
2
|
+
/* empty css */
|
3
|
+
const T = {
|
4
|
+
__name: "Draggable",
|
5
|
+
props: {
|
6
|
+
list: {
|
7
|
+
type: Array,
|
8
|
+
required: !0
|
9
|
+
},
|
10
|
+
disabledClass: {
|
11
|
+
type: String,
|
12
|
+
default: "draggable-disabled"
|
13
|
+
}
|
14
|
+
},
|
15
|
+
emits: ["update:list", "start", "end"],
|
16
|
+
setup(g, { emit: p }) {
|
17
|
+
const d = g, l = p, r = h(null);
|
18
|
+
let a = null;
|
19
|
+
return L(() => {
|
20
|
+
const o = (e) => {
|
21
|
+
const t = e.target.closest(".draggable-item");
|
22
|
+
if (!t || t.classList.contains(d.disabledClass)) {
|
23
|
+
e.preventDefault();
|
24
|
+
return;
|
25
|
+
}
|
26
|
+
a = Number(t.dataset.index), e.dataTransfer.effectAllowed = "move", l("start", a);
|
27
|
+
}, c = (e) => {
|
28
|
+
e.preventDefault();
|
29
|
+
}, v = (e) => {
|
30
|
+
e.preventDefault();
|
31
|
+
const t = e.target.closest(".draggable-item");
|
32
|
+
if (!t || t.classList.contains(d.disabledClass))
|
33
|
+
return;
|
34
|
+
const n = Number(t.dataset.index);
|
35
|
+
if (a !== n && !u(a, n)) {
|
36
|
+
const s = [...d.list], [i] = s.splice(a, 1);
|
37
|
+
s.splice(n, 0, i), l("update:list", s);
|
38
|
+
}
|
39
|
+
l("end", a, n), a = null;
|
40
|
+
}, m = (e) => {
|
41
|
+
const t = e.target.closest(".draggable-item");
|
42
|
+
if (!t || t.classList.contains(d.disabledClass)) {
|
43
|
+
e.preventDefault();
|
44
|
+
return;
|
45
|
+
}
|
46
|
+
a = Number(t.dataset.index), l("start", a);
|
47
|
+
}, f = (e) => {
|
48
|
+
e.preventDefault();
|
49
|
+
}, b = (e) => {
|
50
|
+
const t = document.elementFromPoint(
|
51
|
+
e.changedTouches[0].clientX,
|
52
|
+
e.changedTouches[0].clientY
|
53
|
+
).closest(".draggable-item");
|
54
|
+
if (!t || t.classList.contains(d.disabledClass))
|
55
|
+
return;
|
56
|
+
const n = Number(t.dataset.index);
|
57
|
+
if (a !== n && !u(a, n)) {
|
58
|
+
const s = [...d.list], [i] = s.splice(a, 1);
|
59
|
+
s.splice(n, 0, i), l("update:list", s);
|
60
|
+
}
|
61
|
+
l("end", a, n), a = null;
|
62
|
+
}, u = (e, t) => Array.from(r.value.children).map((s, i) => s.classList.contains(d.disabledClass) ? i : null).filter((s) => s !== null).includes(t);
|
63
|
+
r.value.addEventListener("dragstart", o), r.value.addEventListener("dragover", c), r.value.addEventListener("drop", v), r.value.addEventListener("touchstart", m), r.value.addEventListener("touchmove", f), r.value.addEventListener("touchend", b);
|
64
|
+
}), (o, c) => (E(), D("div", {
|
65
|
+
ref_key: "container",
|
66
|
+
ref: r,
|
67
|
+
class: "draggable-container"
|
68
|
+
}, [
|
69
|
+
x(o.$slots, "default")
|
70
|
+
], 512));
|
71
|
+
}
|
72
|
+
};
|
73
|
+
export {
|
74
|
+
T as default
|
75
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../FieldPhone/click-outside.cjs");;/* empty css */const u={key:0,class:"w-100 h-100 flex-center flex"},d={key:1},f={__name:"Dropdown",props:{label:{type:[String,Object],default:"Open"},align:{type:String,default:"left"}},setup(t){let n=r.default;const i=t,l=e.ref(!1),a=e.computed(()=>typeof i.label=="object");function s(){l.value=!1}return(c,o)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"dropdown pos-relative",onClick:o[0]||(o[0]=e.withModifiers(v=>l.value=!l.value,["stop"]))},[a.value?(e.openBlock(),e.createElementBlock("div",u,[(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",d,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(c.$slots,"default")],4),[[e.vShow,l.value]])]),_:3})])),[[e.unref(n),s]])}};exports.default=f;
|
@@ -1,11 +1,10 @@
|
|
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
|
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 y, withCtx as h, createElementVNode as w, normalizeStyle as O, renderSlot as S, vShow as C, unref as x } from "vue";
|
2
2
|
import D from "../FieldPhone/click-outside.js";
|
3
3
|
/* empty css */
|
4
|
-
|
5
|
-
const T = {
|
4
|
+
const B = {
|
6
5
|
key: 0,
|
7
6
|
class: "w-100 h-100 flex-center flex"
|
8
|
-
},
|
7
|
+
}, T = { key: 1 }, $ = {
|
9
8
|
__name: "Dropdown",
|
10
9
|
props: {
|
11
10
|
label: {
|
@@ -25,34 +24,34 @@ const T = {
|
|
25
24
|
}
|
26
25
|
return (d, n) => a((l(), o("div", {
|
27
26
|
class: "dropdown pos-relative",
|
28
|
-
onClick: n[0] || (n[0] = m((
|
27
|
+
onClick: n[0] || (n[0] = m((j) => t.value = !t.value, ["stop"]))
|
29
28
|
}, [
|
30
|
-
r.value ? (l(), o("div",
|
29
|
+
r.value ? (l(), o("div", B, [
|
31
30
|
(l(), p(v(e.label.component), b(e.label.props, {
|
32
31
|
class: e.label.class
|
33
32
|
}), null, 16, ["class"]))
|
34
|
-
])) : (l(), o("div",
|
35
|
-
k(
|
33
|
+
])) : (l(), o("div", T, g(e.label), 1)),
|
34
|
+
k(y, {
|
36
35
|
name: "TransitionTranslateY",
|
37
36
|
mode: "out-in"
|
38
37
|
}, {
|
39
|
-
default:
|
40
|
-
a(
|
38
|
+
default: h(() => [
|
39
|
+
a(w("div", {
|
41
40
|
style: O({ left: e.align === "left" ? "0" : "auto", right: e.align === "right" ? "0" : "auto" }),
|
42
41
|
class: "dropdown-content radius-big"
|
43
42
|
}, [
|
44
|
-
S(d.$slots, "default"
|
43
|
+
S(d.$slots, "default")
|
45
44
|
], 4), [
|
46
|
-
[
|
45
|
+
[C, t.value]
|
47
46
|
])
|
48
47
|
]),
|
49
48
|
_: 3
|
50
49
|
})
|
51
50
|
])), [
|
52
|
-
[
|
51
|
+
[x(i), c]
|
53
52
|
]);
|
54
53
|
}
|
55
|
-
}
|
54
|
+
};
|
56
55
|
export {
|
57
|
-
|
56
|
+
$ as default
|
58
57
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../FieldPhone/click-outside.cjs");;/* empty css */const u={key:0,class:"w-100 h-100 flex-center flex"},d={key:1},f={__name:"Dropdown",props:{label:{type:[String,Object],default:"Open"},align:{type:String,default:"left"}},setup(t){let n=r.default;const i=t,l=e.ref(!1),a=e.computed(()=>typeof i.label=="object");function s(){l.value=!1}return(c,o)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"dropdown pos-relative",onClick:o[0]||(o[0]=e.withModifiers(v=>l.value=!l.value,["stop"]))},[a.value?(e.openBlock(),e.createElementBlock("div",u,[(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",d,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(c.$slots,"default")],4),[[e.vShow,l.value]])]),_:3})])),[[e.unref(n),s]])}};exports.default=f;
|
@@ -0,0 +1,57 @@
|
|
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 y, withCtx as h, createElementVNode as w, normalizeStyle as O, renderSlot as S, vShow as C, unref as x } from "vue";
|
2
|
+
import D from "../FieldPhone/click-outside.js";
|
3
|
+
/* empty css */
|
4
|
+
const B = {
|
5
|
+
key: 0,
|
6
|
+
class: "w-100 h-100 flex-center flex"
|
7
|
+
}, T = { key: 1 }, $ = {
|
8
|
+
__name: "Dropdown",
|
9
|
+
props: {
|
10
|
+
label: {
|
11
|
+
type: [String, Object],
|
12
|
+
default: "Open"
|
13
|
+
},
|
14
|
+
align: {
|
15
|
+
type: String,
|
16
|
+
default: "left"
|
17
|
+
}
|
18
|
+
},
|
19
|
+
setup(e) {
|
20
|
+
let i = D;
|
21
|
+
const s = e, t = u(!1), r = f(() => typeof s.label == "object");
|
22
|
+
function c() {
|
23
|
+
t.value = !1;
|
24
|
+
}
|
25
|
+
return (d, n) => a((l(), o("div", {
|
26
|
+
class: "dropdown pos-relative",
|
27
|
+
onClick: n[0] || (n[0] = m((j) => t.value = !t.value, ["stop"]))
|
28
|
+
}, [
|
29
|
+
r.value ? (l(), o("div", B, [
|
30
|
+
(l(), p(v(e.label.component), b(e.label.props, {
|
31
|
+
class: e.label.class
|
32
|
+
}), null, 16, ["class"]))
|
33
|
+
])) : (l(), o("div", T, g(e.label), 1)),
|
34
|
+
k(y, {
|
35
|
+
name: "TransitionTranslateY",
|
36
|
+
mode: "out-in"
|
37
|
+
}, {
|
38
|
+
default: h(() => [
|
39
|
+
a(w("div", {
|
40
|
+
style: O({ left: e.align === "left" ? "0" : "auto", right: e.align === "right" ? "0" : "auto" }),
|
41
|
+
class: "dropdown-content radius-big"
|
42
|
+
}, [
|
43
|
+
S(d.$slots, "default")
|
44
|
+
], 4), [
|
45
|
+
[C, t.value]
|
46
|
+
])
|
47
|
+
]),
|
48
|
+
_: 3
|
49
|
+
})
|
50
|
+
])), [
|
51
|
+
[x(i), c]
|
52
|
+
]);
|
53
|
+
}
|
54
|
+
};
|
55
|
+
export {
|
56
|
+
$ as default
|
57
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../modules/icons/skeletons/SkeletonEvent.vue.cjs");;/* empty css */const M=require("../EmptyState/EmptyState.vue.cjs"),B=require("../Dropdown/Dropdown.vue.cjs"),N=require("../DatePicker/Calendar.vue2.cjs"),
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../modules/icons/skeletons/SkeletonEvent.vue.cjs");;/* empty css */const M=require("../EmptyState/EmptyState.vue.cjs"),B=require("../Dropdown/Dropdown.vue.cjs"),N=require("../DatePicker/Calendar.vue2.cjs"),x=require("../BottomSheet/BottomSheet.vue.cjs"),S=require("../../modules/globals/components/blocks/BlockSearch.vue.cjs"),q=require("../../modules/globals/components/blocks/BlockSorting.vue.cjs"),E=require("../../modules/globals/components/blocks/BlockFilter.vue.cjs"),z=require("../../modules/globals/components/elements/ButtonSort.vue.cjs"),O=require("../../modules/globals/components/elements/ButtonDate.vue.cjs"),L=require("../../modules/icons/navigation/IconFilter.vue.cjs");;/* empty css */const F={key:0,class:"flex-nowrap flex gap-thin"},j={__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:{},filter:{},filterModifiers:{},date:{},dateModifiers:{},items:{},itemsModifiers:{}}),emits:["update:search","update:sort","update:filter","update:date","update:items"],setup(s){const m=e.useModel(s,"search"),a=e.useModel(s,"sort"),o=e.useModel(s,"filter"),r=e.useModel(s,"date"),h=e.useModel(s,"items"),u=s,n=e.ref(h.value||[]),d=e.ref(!1);let p=e.ref(!0),b=e.ref(null),i=e.ref(u.options.skip?u.options.skip:0),v=e.ref(u.options.limit?u.options.limit:10),k=e.ref("");function C(t){k.value=t,i.value=0,v.value=10,f()}const y=async()=>{if(d.value){i.value+=v.value;const t=await u.store.read({skip:i.value,limit:v.value,search:k.value,dateStart:r.value?r.value.start:null,dateEnd:r.value?r.value.end:null,sortParam:a.value?a.value.param:null,sortOrder:a.value?a.value.order:null,...u.options});t.length===0||t.length<v.value?d.value=!1:d.value=!0,n.value=[...n.value,...t],h.value&&(h.value=n.value)}},f=async()=>{const t=await u.store.read({skip:i.value,limit:v.value,dateStart:r.value?r.value.start:null,dateEnd:r.value?r.value.end:null,sortParam:a.value?a.value.param:null,sortOrder:a.value?a.value.order:null,search:k.value,...u.options});t.length===0||t.length<v.value?d.value=!1:d.value=!0,n.value=t,h.value&&(h.value=n.value),p.value=!1};e.watch(()=>u.external,(t,l)=>{t!==l&&(i.value=0,f())},{deep:!0}),e.watch(()=>r.value,(t,l)=>{t!==l&&(i.value=0,f())},{deep:!0}),e.watch(()=>{var t;return(t=a.value)==null?void 0:t.order},(t,l)=>{t!==l&&(i.value=0,f())}),e.watch(()=>{var t;return(t=a.value)==null?void 0:t.param},(t,l)=>{t!==l&&(i.value=0,f())}),e.watch(()=>u.options,(t,l)=>{(t.organization!==l.organization||t.categories!==l.categories||t.prices!==l.prices||t.delivery!==l.delivery||t.search!==l.search||t.status!==l.status||t.hidden!==l.hidden||t.type!==l.type||t.tags!==l.tags||t.following!==l.following)&&(i.value=0,f())},{deep:!0});let g=null;return e.onMounted(async()=>{await f(),typeof window<"u"&&!u.showLoadMore&&(g=new IntersectionObserver(t=>{t.some(l=>l.isIntersecting)&&y()}),g.observe(b.value))}),e.onUnmounted(()=>{g&&g.disconnect()}),(t,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[m.value||r.value||a.value&&!a.value.hideButton?(e.openBlock(),e.createElementBlock("div",F,[m.value?(e.openBlock(),e.createBlock(S.default,{key:0,placeholder:m.value.placeholder||"Search...",class:e.normalizeClass(m.value.class||"bg-light"),onSearch:C},null,8,["placeholder","class"])):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:e.normalizeClass([o.value.class||"bg-light","flex-center flex pd-thin bg-light radius-extra aspect-1x1 h-100"])},[e.createVNode(L.default,{onClick:l[0]||(l[0]=()=>o.value.active=!o.value.active),class:"w-1r h-auto"})],2),o.value.active?(e.openBlock(),e.createBlock(x.default,{key:0,show:o.value.active,onToggle:l[2]||(l[2]=()=>o.value.active=!1),class:e.normalizeClass(["z-index-10 pos-fixed pos-t-0 pos-r-0",{"pos-t-0":o.value.active,"pos-t-100":!o.value.active}])},{default:e.withCtx(()=>[e.createVNode(E.default,{filter:o.value,"onUpdate:filter":l[1]||(l[1]=c=>o.value=c),options:o.value.options,class:"h-100 w-100 pd-small bg-light"},null,8,["filter","options"])]),_:1},8,["show","class"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createBlock(B.default,{key:2,label:{component:O.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(N.default,{date:r.value,"onUpdate:date":l[3]||(l[3]=c=>r.value=c),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),a.value&&!a.value.hideButton?(e.openBlock(),e.createBlock(B.default,{key:3,label:{component:z.default,props:{order:a.value.order},class:"w-1r"},class:e.normalizeClass([a.value.class||"bg-light","radius-extra aspect-1x1 h-100"]),align:m.value?"right":"left"},{default:e.withCtx(()=>[e.createVNode(q.default,{param:a.value.param,"onUpdate:param":l[4]||(l[4]=c=>a.value.param=c),order:a.value.order,"onUpdate:order":l[5]||(l[5]=c=>a.value.order=c),options:a.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(p)?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:1,tag:"ul",name:"scaleTransition"},{default:e.withCtx(()=>[e.unref(p)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(v),c=>(e.openBlock(),e.createBlock(w.default,{key:"skeleton-"+c,class:"mn-b-small radius-big o-hidden d-block"}))),128)):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),!e.unref(p)&&n.value.length<1?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:2,tag:"ul",name:"feed"},{default:e.withCtx(()=>[!e.unref(p)&&n.value.length<1?(e.openBlock(),e.createBlock(M.default,{key:0,title:s.states.empty.title,description:s.states.empty.description,action:s.states.empty.action,callback:s.states.empty.callback,class:"pd-medium mn-b-thin bg-light radius-big"},null,8,["title","description","action","callback"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.TransitionGroup,{tag:"ul",name:"feed",class:e.normalizeClass(t.$attrs.class)},{default:e.withCtx(()=>[!e.unref(p)&&n.value.length>0?e.renderSlot(t.$slots,"default",{key:0,items:n.value}):e.createCommentVNode("",!0),s.showLoadMore&&d.value&&n.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:y,class:"col-w-100 w-100 bg-main button"}," Load More ")):e.createCommentVNode("",!0),e.createElementVNode("div",{key:"sentinel",ref_key:"sentinel",ref:b,class:"sentinel"},null,512)]),_:3},8,["class"])],64))}};exports.default=j;
|